From f8c3a1a711531e35d8ac16791d00d2a00c9d819f Mon Sep 17 00:00:00 2001
From: Ivo Sonderegger <ivo.sonderegger@srf.ch>
Date: Fri, 16 Jul 2021 15:54:52 +0200
Subject: [PATCH] Release 1.15.0

---
 CHANGELOG.md                                  |  29 +-
 doc/Modelviewer.js.html                       |   2 +-
 doc/RepetitiveRequests.js.html                |   2 +-
 doc/Sounding.js.html                          |   2 +-
 doc/Synview.js.html                           |   2 +-
 doc/ThermodynamicDiagram.js.html              |  11 +-
 doc/ThermodynamicDiagramPluggable.js.html     |   5 +-
 doc/Timeline.js.html                          |   2 +-
 doc/Tooltip.js.html                           |   2 +-
 doc/base_Collection.js.html                   |   2 +-
 doc/base_Named.js.html                        |   2 +-
 doc/base_NamedCollection.js.html              |   2 +-
 doc/base_Unique.js.html                       |   2 +-
 doc/base_UniqueNamed.js.html                  |   2 +-
 doc/calc.js.html                              |   2 +-
 doc/events.js.html                            |   2 +-
 doc/external-Event.html                       |   2 +-
 doc/external-HTMLElement.html                 |   2 +-
 doc/external-SVG.html                         |   2 +-
 doc/external-XMLHttpRequest.html              |   2 +-
 doc/external-jQuery.html                      |   2 +-
 doc/external-momentjs.html                    |   2 +-
 doc/index.html                                | 145 +++--
 doc/index.js.html                             |   2 +-
 doc/modelviewer_Container.js.html             |   2 +-
 doc/modelviewer_Display.js.html               |   2 +-
 doc/modelviewer_NWPResources.js.html          |   2 +-
 doc/modelviewer_Node.js.html                  |   2 +-
 doc/modelviewer_OffsetVariable.js.html        |   2 +-
 doc/modelviewer_Resource.js.html              |   2 +-
 doc/modelviewer_Resources.js.html             |   2 +-
 doc/modelviewer_ResourcesTreeNode.js.html     |   2 +-
 doc/modelviewer_TimeVariable.js.html          |   2 +-
 doc/modelviewer_Variable.js.html              |   2 +-
 doc/modelviewer_VariableCollection.js.html    |   2 +-
 ...delviewer_display_SelectNavigation.js.html |   2 +-
 doc/modelviewer_display_Simple.js.html        |   2 +-
 doc/modelviewer_resource_Image.js.html        |   2 +-
 doc/modelviewer_resource_Sounding.js.html     |   2 +-
 doc/module-meteoJS.html                       |   2 +-
 ...le-meteoJS_base_collection.Collection.html |   2 +-
 doc/module-meteoJS_base_collection.html       |   2 +-
 doc/module-meteoJS_base_named.Named.html      |   2 +-
 doc/module-meteoJS_base_named.html            |   2 +-
 ..._base_namedCollection.NamedCollection.html |   2 +-
 doc/module-meteoJS_base_namedCollection.html  |   2 +-
 doc/module-meteoJS_base_unique.Unique.html    |   2 +-
 doc/module-meteoJS_base_unique.html           |   2 +-
 ...-meteoJS_base_uniquenamed.UniqueNamed.html |   2 +-
 doc/module-meteoJS_base_uniquenamed.html      |   2 +-
 doc/module-meteoJS_calc.html                  |   2 +-
 doc/module-meteoJS_events.html                |   2 +-
 ...odule-meteoJS_modelviewer.Modelviewer.html |   2 +-
 doc/module-meteoJS_modelviewer.html           |   2 +-
 ...teoJS_modelviewer_container.Container.html |   2 +-
 doc/module-meteoJS_modelviewer_container.html |   2 +-
 ...e-meteoJS_modelviewer_display.Display.html |   2 +-
 doc/module-meteoJS_modelviewer_display.html   |   2 +-
 ...lay_selectNavigation.SelectNavigation.html |   2 +-
 ..._modelviewer_display_selectNavigation.html |   2 +-
 ...oJS_modelviewer_display_simple.Simple.html |   2 +-
 ...le-meteoJS_modelviewer_display_simple.html |   2 +-
 doc/module-meteoJS_modelviewer_node.Node.html |   2 +-
 doc/module-meteoJS_modelviewer_node.html      |   2 +-
 ...modelviewer_nwpResources.NWPResources.html |   2 +-
 ...dule-meteoJS_modelviewer_nwpResources.html |   2 +-
 ...lviewer_offsetVariable.OffsetVariable.html |   2 +-
 ...le-meteoJS_modelviewer_offsetVariable.html |   2 +-
 ...meteoJS_modelviewer_resource.Resource.html |   2 +-
 doc/module-meteoJS_modelviewer_resource.html  |   2 +-
 ...eoJS_modelviewer_resource_image.Image.html |   2 +-
 ...le-meteoJS_modelviewer_resource_image.html |   2 +-
 ...odelviewer_resource_sounding.Sounding.html |   2 +-
 ...meteoJS_modelviewer_resource_sounding.html |   2 +-
 ...teoJS_modelviewer_resources.Resources.html |   2 +-
 doc/module-meteoJS_modelviewer_resources.html |   2 +-
 ...r_resourcesTreeNode.ResourcesTreeNode.html |   2 +-
 ...meteoJS_modelviewer_resourcesTreeNode.html |   2 +-
 ...modelviewer_timeVariable.TimeVariable.html |   2 +-
 ...dule-meteoJS_modelviewer_timeVariable.html |   2 +-
 ...meteoJS_modelviewer_variable.Variable.html |   2 +-
 doc/module-meteoJS_modelviewer_variable.html  |   2 +-
 ...variableCollection.VariableCollection.html |   2 +-
 ...eteoJS_modelviewer_variableCollection.html |   2 +-
 ...repetitiveRequests.RepetitiveRequests.html |   2 +-
 doc/module-meteoJS_repetitiveRequests.html    |   2 +-
 doc/module-meteoJS_sounding.Sounding.html     |   2 +-
 doc/module-meteoJS_sounding.html              |   2 +-
 ...module-meteoJS_sounding_parcel.Parcel.html |   2 +-
 doc/module-meteoJS_sounding_parcel.html       |   2 +-
 doc/module-meteoJS_synview.html               |   2 +-
 ...meteoJS_synview_collection.Collection.html |   2 +-
 doc/module-meteoJS_synview_collection.html    |   2 +-
 ...module-meteoJS_synview_map.SynviewMap.html |   2 +-
 doc/module-meteoJS_synview_map.html           |   2 +-
 doc/module-meteoJS_synview_map_ll.MapLL.html  |   2 +-
 doc/module-meteoJS_synview_map_ll.html        |   2 +-
 doc/module-meteoJS_synview_map_ol.MapOL.html  |   2 +-
 doc/module-meteoJS_synview_map_ol.html        |   2 +-
 ...ule-meteoJS_synview_resource.Resource.html |   2 +-
 doc/module-meteoJS_synview_resource.html      |   2 +-
 ...resourceCollection.ResourceCollection.html |   2 +-
 ...le-meteoJS_synview_resourceCollection.html |   2 +-
 ...eoJS_synview_resource_GeoJSON.GeoJSON.html |   2 +-
 ...dule-meteoJS_synview_resource_GeoJSON.html |   2 +-
 ...view_resource_GeoJSONTile.GeoJSONTile.html |   2 +-
 ...-meteoJS_synview_resource_GeoJSONTile.html |   2 +-
 ...JS_synview_resource_Image.ImageStatic.html |   8 +-
 ...module-meteoJS_synview_resource_Image.html |   2 +-
 ...dule-meteoJS_synview_resource_OSM.OSM.html |   2 +-
 doc/module-meteoJS_synview_resource_OSM.html  |   2 +-
 ...eteoJS_synview_resource_Vector.Vector.html |   2 +-
 ...odule-meteoJS_synview_resource_Vector.html |   2 +-
 ...ynview_resource_VectorTile.VectorTile.html |   2 +-
 ...e-meteoJS_synview_resource_VectorTile.html |   2 +-
 ...odule-meteoJS_synview_tooltip.Tooltip.html |   2 +-
 doc/module-meteoJS_synview_tooltip.html       |   2 +-
 doc/module-meteoJS_synview_type.Type.html     |   2 +-
 doc/module-meteoJS_synview_type.html          |   2 +-
 ...synview_typeCollection.TypeCollection.html |   2 +-
 ...module-meteoJS_synview_typeCollection.html |   2 +-
 ...modynamicDiagram.ThermodynamicDiagram.html |   4 +-
 doc/module-meteoJS_thermodynamicDiagram.html  |   2 +-
 ...uggable.ThermodynamicDiagramPluggable.html |   4 +-
 ...meteoJS_thermodynamicDiagramPluggable.html |   2 +-
 ...modynamicDiagram_axes_axes_axisLabels.html |   2 +-
 ...teoJS_thermodynamicDiagram_axes_xAxis.html |   2 +-
 ...thermodynamicDiagram_axes_xAxis.xAxis.html |   2 +-
 ...teoJS_thermodynamicDiagram_axes_yAxis.html |   2 +-
 ...thermodynamicDiagram_axes_yAxis.yAxis.html |   2 +-
 ...ram_coordinateSystem.CoordinateSystem.html |   4 +-
 ...thermodynamicDiagram_coordinateSystem.html |   2 +-
 ...gram_coordinateSystem_emagram.Emagram.html |   2 +-
 ...namicDiagram_coordinateSystem_emagram.html |   2 +-
 ...tem_skewTlogPDiagram.SkewTlogPDiagram.html |   2 +-
 ...ram_coordinateSystem_skewTlogPDiagram.html |   2 +-
 ...ateSystem_stueveDiagram.StueveDiagram.html |   2 +-
 ...iagram_coordinateSystem_stueveDiagram.html |   2 +-
 ...icDiagram_diagramParcel.DiagramParcel.html |   2 +-
 ...JS_thermodynamicDiagram_diagramParcel.html |   2 +-
 ...agram_diagramSounding.DiagramSounding.html |   2 +-
 ..._thermodynamicDiagram_diagramSounding.html | 126 +++-
 ...eteoJS_thermodynamicDiagram_functions.html |   2 +-
 ...rmodynamicDiagram_hodograph.Hodograph.html |  84 ++-
 ...eteoJS_thermodynamicDiagram_hodograph.html | 449 +++++++++++++-
 ...AltitudeDataArea.PlotAltitudeDataArea.html | 104 +++-
 ...modynamicDiagram_plotAltitudeDataArea.html | 138 +----
 ...hermodynamicDiagram_plotArea.PlotArea.html |   6 +-
 ...meteoJS_thermodynamicDiagram_plotArea.html |  31 +-
 ...amicDiagram_plotDataArea.PlotDataArea.html |  46 +-
 ...oJS_thermodynamicDiagram_plotDataArea.html | 374 +++++++++++-
 ...rmodynamicDiagram_tdDiagram.TDDiagram.html |  52 +-
 ...eteoJS_thermodynamicDiagram_tdDiagram.html |   2 +-
 ...ram_windbarbsProfile.WindbarbsProfile.html | 102 +++-
 ...thermodynamicDiagram_windbarbsProfile.html |   2 +-
 ...ram_windspeedProfile.WindspeedProfile.html | 102 +++-
 ...thermodynamicDiagram_windspeedProfile.html |   2 +-
 doc/module-meteoJS_timeline.Timeline.html     |   2 +-
 doc/module-meteoJS_timeline.html              |   2 +-
 ...-meteoJS_timeline_animation.Animation.html |   2 +-
 doc/module-meteoJS_timeline_animation.html    |   2 +-
 ...e_animation_togglebutton.ToggleButton.html |   2 +-
 ...teoJS_timeline_animation_togglebutton.html |   2 +-
 ...e_navigationButtons.NavigationButtons.html |   2 +-
 ...le-meteoJS_timeline_navigationButtons.html |   2 +-
 ..._timeline_visualisation.Visualisation.html |   2 +-
 ...module-meteoJS_timeline_visualisation.html |   2 +-
 ...ine_visualisation_bsButtons.bsButtons.html |   2 +-
 ...eoJS_timeline_visualisation_bsButtons.html |   2 +-
 ...e_visualisation_bsDropdown.bsDropdown.html |   2 +-
 ...oJS_timeline_visualisation_bsDropdown.html |   2 +-
 ..._timeline_visualisation_slider.Slider.html |   2 +-
 ...meteoJS_timeline_visualisation_slider.html |   2 +-
 ...eoJS_timeline_visualisation_text.Text.html |   2 +-
 ...e-meteoJS_timeline_visualisation_text.html |   2 +-
 doc/module-meteoJS_tooltip.Tooltip.html       |   2 +-
 doc/module-meteoJS_tooltip.html               |   2 +-
 ...tip_bootstrapTooltip.BootstrapTooltip.html |   2 +-
 ...dule-meteoJS_tooltip_bootstrapTooltip.html |   2 +-
 doc/sounding_Parcel.js.html                   |   2 +-
 doc/synview_Collection.js.html                |   2 +-
 doc/synview_Resource.js.html                  |   2 +-
 doc/synview_ResourceCollection.js.html        |   2 +-
 doc/synview_SynviewMap.js.html                |   2 +-
 doc/synview_Tooltip.js.html                   |   2 +-
 doc/synview_Type.js.html                      |   2 +-
 doc/synview_TypeCollection.js.html            |   2 +-
 doc/synview_map_MapLL.js.html                 |   2 +-
 doc/synview_map_MapOL.js.html                 |   2 +-
 doc/synview_resource_GeoJSON.js.html          |   2 +-
 doc/synview_resource_GeoJSONTile.js.html      |   2 +-
 doc/synview_resource_Image.js.html            |   8 +-
 doc/synview_resource_OSM.js.html              |   2 +-
 doc/synview_resource_Vector.js.html           |   2 +-
 doc/synview_resource_VectorTile.js.html       |   2 +-
 ...rmodynamicDiagram_CoordinateSystem.js.html |   4 +-
 ...thermodynamicDiagram_DiagramParcel.js.html |   2 +-
 ...ermodynamicDiagram_DiagramSounding.js.html |  97 ++-
 doc/thermodynamicDiagram_Functions.js.html    |  66 +-
 doc/thermodynamicDiagram_Hodograph.js.html    | 574 +++++++++++++++---
 ...ynamicDiagram_PlotAltitudeDataArea.js.html | 102 +---
 doc/thermodynamicDiagram_TDDiagram.js.html    |   6 +-
 ...rmodynamicDiagram_WindbarbsProfile.js.html |   2 +-
 ...rmodynamicDiagram_WindspeedProfile.js.html |   6 +-
 ...ermodynamicDiagram_axes_axisLabels.js.html |   2 +-
 doc/thermodynamicDiagram_axes_xAxis.js.html   |   2 +-
 doc/thermodynamicDiagram_axes_yAxis.js.html   |   2 +-
 ...icDiagram_coordinateSystem_Emagram.js.html |   2 +-
 ..._coordinateSystem_SkewTlogPDiagram.js.html |   2 +-
 ...ram_coordinateSystem_StueveDiagram.js.html |   2 +-
 doc/thermodynamicDiagram_plotArea.js.html     |   6 +-
 doc/thermodynamicDiagram_plotDataArea.js.html | 139 ++++-
 doc/timeline_Animation.js.html                |   2 +-
 doc/timeline_NavigationButtons.js.html        |   2 +-
 doc/timeline_Visualisation.js.html            |   2 +-
 doc/timeline_animation_ToggleButton.js.html   |   2 +-
 doc/timeline_visualisation_Slider.js.html     |   2 +-
 doc/timeline_visualisation_Text.js.html       |   2 +-
 doc/timeline_visualisation_bsButtons.js.html  |   2 +-
 doc/timeline_visualisation_bsDropdown.js.html |   2 +-
 doc/tooltip_BootstrapTooltip.js.html          |   2 +-
 meteoJS.min.js                                |   2 +-
 meteoJS.min.js.LICENSE.txt                    |   2 +-
 meteoJS.min.js.map                            |   2 +-
 package-lock.json                             |   2 +-
 package.json                                  |   2 +-
 226 files changed, 2588 insertions(+), 636 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index a5cb8dab..0e5568c0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,32 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
 
 ## [Unreleased]
 
+## [1.15.0] - 2021-07-
+### Added
+- [Hodograph](https://chird.github.io/meteoJS/doc/module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html):
+  [Examples](https://chird.github.io/meteoJS/examples/thermodynamicdiagram-hodograph.html) how to style the hodograph.
+- [DiagramSounding](https://chird.github.io/meteoJS/doc/module-meteoJS_thermodynamicDiagram_diagramSounding.DiagramSounding.html):
+  The output in the hodograph can know be contraint to a minimum and maximum pressure.
+- [DiagramSounding](https://chird.github.io/meteoJS/doc/module-meteoJS_thermodynamicDiagram_diagramSounding.DiagramSounding.html):
+  In the hodograph the line can be coloured between several pressure intervals.
+- [Hodograph](https://chird.github.io/meteoJS/doc/module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html):
+  Several options were added to style the grid. For the labels: `unit`, `prefix`, `decimalPlaces`, `backdrop`.
+  The origin can be moved away from the center.
+- [Hodograph](https://chird.github.io/meteoJS/doc/module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html):
+  Hover labels were added.
+- [PlotDataArea](https://chird.github.io/meteoJS/doc/module-meteoJS_thermodynamicDiagram_plotDataArea.PlotDataArea.html):
+  For hover labels the option `getHoverSounding` is added to control for whicht sounding a hover label is shown.
+
+### Changed
+- [DiagramSounding](https://chird.github.io/meteoJS/doc/module-meteoJS_thermodynamicDiagram_diagramSounding.DiagramSounding.html)
+  appears now as a green line with width of 2 pixels.
+- Some hover functionality moved from
+  [PlotAltitudeDataArea](https://chird.github.io/meteoJS/doc/module-meteoJS_thermodynamicDiagram_plotAltitudeDataArea.PlotAltitudeDataArea.html) to
+  [PlotDataArea](https://chird.github.io/meteoJS/doc/module-meteoJS_thermodynamicDiagram_plotDataArea.PlotDataArea.html)
+
+### Fixed
+- Some docs.
+
 ## [1.14.7] - 2021-07-02
 
 ### Fixed
@@ -229,7 +255,8 @@ will not work anymore, until you pass a callback to `getTimeText`.
 ### Fixed
 - Some tests with DOM usage.
 
-[Unreleased]: https://github.com/chird/meteoJS/compare/v1.14.7...HEAD
+[Unreleased]: https://github.com/chird/meteoJS/compare/v1.15.0...HEAD
+[1.15.0]: https://github.com/chird/meteoJS/compare/v1.14.7...v1.15.0
 [1.14.7]: https://github.com/chird/meteoJS/compare/v1.14.6...v1.14.7
 [1.14.6]: https://github.com/chird/meteoJS/compare/v1.14.5...v1.14.6
 [1.14.5]: https://github.com/chird/meteoJS/compare/v1.14.4...v1.14.5
diff --git a/doc/Modelviewer.js.html b/doc/Modelviewer.js.html
index 538a88fe..c21f4ba5 100644
--- a/doc/Modelviewer.js.html
+++ b/doc/Modelviewer.js.html
@@ -277,7 +277,7 @@ <h1>Source: Modelviewer.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/RepetitiveRequests.js.html b/doc/RepetitiveRequests.js.html
index 595c66cb..4eaba793 100644
--- a/doc/RepetitiveRequests.js.html
+++ b/doc/RepetitiveRequests.js.html
@@ -389,7 +389,7 @@ <h1>Source: RepetitiveRequests.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/Sounding.js.html b/doc/Sounding.js.html
index 3341b081..65264ef5 100644
--- a/doc/Sounding.js.html
+++ b/doc/Sounding.js.html
@@ -277,7 +277,7 @@ <h1>Source: Sounding.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/Synview.js.html b/doc/Synview.js.html
index 056185f2..4c470abc 100644
--- a/doc/Synview.js.html
+++ b/doc/Synview.js.html
@@ -201,7 +201,7 @@ <h1>Source: Synview.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/ThermodynamicDiagram.js.html b/doc/ThermodynamicDiagram.js.html
index f9ddbb51..466dbb14 100644
--- a/doc/ThermodynamicDiagram.js.html
+++ b/doc/ThermodynamicDiagram.js.html
@@ -80,7 +80,7 @@ <h1>Source: ThermodynamicDiagram.js</h1>
 /**
  * Class to draw a SVG thermodynamic diagram.
  * 
- * &amp;lt;pre&gt;&amp;lt;code&gt;import ThermodynamicDiagram from &#x27;meteoJS/ThermodynamicDiagram&#x27;;&amp;lt;/code&gt;&amp;lt;/pre&gt;
+ * &amp;lt;pre&gt;&amp;lt;code&gt;import ThermodynamicDiagram from &#x27;meteojs/ThermodynamicDiagram&#x27;;&amp;lt;/code&gt;&amp;lt;/pre&gt;
  * 
  * @extends module:meteoJS/thermodynamicDiagramPluggable.ThermodynamicDiagramPluggable
  */
@@ -215,6 +215,13 @@ <h1>Source: ThermodynamicDiagram.js</h1>
     this.appendPlotArea(this.windspeedProfile);
     
     this.hodograph &#x3D; new Hodograph(hodograph);
+    this.hodograph.on(&#x27;prebuild:background&#x27;, ({ node }) &#x3D;&gt; {
+      node
+        .rect(this.hodograph.width-2, this.hodograph.height-2)
+        .move(1,1)
+        .fill({ color: &#x27;white&#x27; })
+        .stroke({ color: &#x27;black&#x27;, width: 1 });
+    });
     this.appendPlotArea(this.hodograph);
     
     if (coordinateSystem.type &#x3D;&#x3D;&#x3D; undefined)
@@ -300,7 +307,7 @@ <h1>Source: ThermodynamicDiagram.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/ThermodynamicDiagramPluggable.js.html b/doc/ThermodynamicDiagramPluggable.js.html
index ca10aeb4..c15e34ff 100644
--- a/doc/ThermodynamicDiagramPluggable.js.html
+++ b/doc/ThermodynamicDiagramPluggable.js.html
@@ -48,7 +48,7 @@ <h1>Source: ThermodynamicDiagramPluggable.js</h1>
 /**
  * Class to draw a SVG thermodynamic diagram.
  * 
- * &amp;lt;pre&gt;&amp;lt;code&gt;import ThermodynamicDiagramPluggable from &#x27;meteoJS/thermodynamicDiagramPluggable&#x27;;&amp;lt;/code&gt;&amp;lt;/pre&gt;
+ * &amp;lt;pre&gt;&amp;lt;code&gt;import ThermodynamicDiagramPluggable from &#x27;meteojs/thermodynamicDiagramPluggable&#x27;;&amp;lt;/code&gt;&amp;lt;/pre&gt;
  * 
  * @extends module:meteoJS/base/collection.Collection
  */
@@ -151,6 +151,7 @@ <h1>Source: ThermodynamicDiagramPluggable.js</h1>
     this._plotAreas.add(plotArea);
     
     plotArea.addTo(this.svgNode);
+    plotArea.onCoordinateSystemChange();
     for (let sounding of this)
       if (&#x27;addSounding&#x27; in plotArea)
         plotArea.addSounding(sounding);
@@ -231,7 +232,7 @@ <h1>Source: ThermodynamicDiagramPluggable.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/Timeline.js.html b/doc/Timeline.js.html
index ebd281d8..1b781855 100644
--- a/doc/Timeline.js.html
+++ b/doc/Timeline.js.html
@@ -896,7 +896,7 @@ <h1>Source: Timeline.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/Tooltip.js.html b/doc/Tooltip.js.html
index 10f92586..f02ada25 100644
--- a/doc/Tooltip.js.html
+++ b/doc/Tooltip.js.html
@@ -155,7 +155,7 @@ <h1>Source: Tooltip.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/base_Collection.js.html b/doc/base_Collection.js.html
index bf23a2e0..06b94f27 100644
--- a/doc/base_Collection.js.html
+++ b/doc/base_Collection.js.html
@@ -318,7 +318,7 @@ <h1>Source: base/Collection.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/base_Named.js.html b/doc/base_Named.js.html
index 3590e7bf..b8439251 100644
--- a/doc/base_Named.js.html
+++ b/doc/base_Named.js.html
@@ -162,7 +162,7 @@ <h1>Source: base/Named.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/base_NamedCollection.js.html b/doc/base_NamedCollection.js.html
index 726edc34..3ccf4fb7 100644
--- a/doc/base_NamedCollection.js.html
+++ b/doc/base_NamedCollection.js.html
@@ -110,7 +110,7 @@ <h1>Source: base/NamedCollection.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/base_Unique.js.html b/doc/base_Unique.js.html
index c827ffa2..1b233b04 100644
--- a/doc/base_Unique.js.html
+++ b/doc/base_Unique.js.html
@@ -83,7 +83,7 @@ <h1>Source: base/Unique.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/base_UniqueNamed.js.html b/doc/base_UniqueNamed.js.html
index 31bfdcb5..c30c302e 100644
--- a/doc/base_UniqueNamed.js.html
+++ b/doc/base_UniqueNamed.js.html
@@ -95,7 +95,7 @@ <h1>Source: base/UniqueNamed.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/calc.js.html b/doc/calc.js.html
index 700b89d5..c67b6146 100644
--- a/doc/calc.js.html
+++ b/doc/calc.js.html
@@ -523,7 +523,7 @@ <h1>Source: calc.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/events.js.html b/doc/events.js.html
index bf982418..cf33c762 100644
--- a/doc/events.js.html
+++ b/doc/events.js.html
@@ -165,7 +165,7 @@ <h1>Source: Events.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/external-Event.html b/doc/external-Event.html
index de799bab..8376f97c 100644
--- a/doc/external-Event.html
+++ b/doc/external-Event.html
@@ -51,7 +51,7 @@ <h1><small></small><span class="symbol-name">Event</span></h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/external-HTMLElement.html b/doc/external-HTMLElement.html
index 0aa89a75..e70aa8a8 100644
--- a/doc/external-HTMLElement.html
+++ b/doc/external-HTMLElement.html
@@ -51,7 +51,7 @@ <h1><small></small><span class="symbol-name">HTMLElement</span></h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/external-SVG.html b/doc/external-SVG.html
index 3707088e..4563e4e0 100644
--- a/doc/external-SVG.html
+++ b/doc/external-SVG.html
@@ -51,7 +51,7 @@ <h1><small></small><span class="symbol-name">SVG</span></h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/external-XMLHttpRequest.html b/doc/external-XMLHttpRequest.html
index f8037edf..bb177124 100644
--- a/doc/external-XMLHttpRequest.html
+++ b/doc/external-XMLHttpRequest.html
@@ -51,7 +51,7 @@ <h1><small></small><span class="symbol-name">XMLHttpRequest</span></h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/external-jQuery.html b/doc/external-jQuery.html
index a4e2b849..064aeb66 100644
--- a/doc/external-jQuery.html
+++ b/doc/external-jQuery.html
@@ -51,7 +51,7 @@ <h1><small></small><span class="symbol-name">jQuery</span></h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/external-momentjs.html b/doc/external-momentjs.html
index d7ebb1f2..79b3a6f5 100644
--- a/doc/external-momentjs.html
+++ b/doc/external-momentjs.html
@@ -51,7 +51,7 @@ <h1><small></small><span class="symbol-name">momentjs</span></h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/index.html b/doc/index.html
index d2131e49..c03d11a7 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -6136,12 +6136,12 @@ <h2 id="meteoJS/thermodynamicDiagram/diagramSounding">meteoJS/thermodynamicDiagr
             <dd>
             </dd>
             <dt class="symbol-index-name">
-                <a href="module-meteoJS_thermodynamicDiagram_diagramSounding.html#~options" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>diagramSounding~<wbr>options</a>
+                <a href="module-meteoJS_thermodynamicDiagram_diagramSounding.html#~hodographOptions" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>diagramSounding~<wbr>hodographOptions</a>
             </dt>
             <dd>
             </dd>
             <dt class="symbol-index-name">
-                <a href="module-meteoJS_thermodynamicDiagram_diagramSounding.html#~parcelsOptions" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>diagramSounding~<wbr>parcelsOptions</a>
+                <a href="module-meteoJS_thermodynamicDiagram_diagramSounding.html#~hodographSegmentOptions" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>diagramSounding~<wbr>hodographSegmentOptions</a>
             </dt>
             <dd>
             </dd>
@@ -6150,6 +6150,16 @@ <h2 id="meteoJS/thermodynamicDiagram/diagramSounding">meteoJS/thermodynamicDiagr
 
                             <div class="symbol-index-column">
     <dl class="symbol-index-list">
+            <dt class="symbol-index-name">
+                <a href="module-meteoJS_thermodynamicDiagram_diagramSounding.html#~options" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>diagramSounding~<wbr>options</a>
+            </dt>
+            <dd>
+            </dd>
+            <dt class="symbol-index-name">
+                <a href="module-meteoJS_thermodynamicDiagram_diagramSounding.html#~parcelsOptions" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>diagramSounding~<wbr>parcelsOptions</a>
+            </dt>
+            <dd>
+            </dd>
             <dt class="symbol-index-name">
                 <a href="module-meteoJS_thermodynamicDiagram_diagramSounding.html#~windprofileOptions" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>diagramSounding~<wbr>windprofileOptions</a>
             </dt>
@@ -6296,6 +6306,11 @@ <h2 id="meteoJS/thermodynamicDiagram/hodograph">meteoJS/thermodynamicDiagram/hod
             </dt>
             <dd>
             </dd>
+            <dt class="symbol-index-name">
+                <a href="module-meteoJS_thermodynamicDiagram_hodograph.html#~backdropOptions" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>hodograph~<wbr>backdropOptions</a>
+            </dt>
+            <dd>
+            </dd>
             <dt class="symbol-index-name">
                 <a href="module-meteoJS_thermodynamicDiagram_hodograph.html#~gridCirclesOptions" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>hodograph~<wbr>gridCirclesOptions</a>
             </dt>
@@ -6312,7 +6327,12 @@ <h2 id="meteoJS/thermodynamicDiagram/hodograph">meteoJS/thermodynamicDiagram/hod
             <dd>
             </dd>
             <dt class="symbol-index-name">
-                <a href="module-meteoJS_thermodynamicDiagram_hodograph.html#~options" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>hodograph~<wbr>options</a>
+                <a href="module-meteoJS_thermodynamicDiagram_hodograph.html#~hoverLabelsOptions" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>hodograph~<wbr>hoverLabelsOptions</a>
+            </dt>
+            <dd>
+            </dd>
+            <dt class="symbol-index-name">
+                <a href="module-meteoJS_thermodynamicDiagram_hodograph.html#~labelsOptions" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>hodograph~<wbr>labelsOptions</a>
             </dt>
             <dd>
             </dd>
@@ -6321,6 +6341,11 @@ <h2 id="meteoJS/thermodynamicDiagram/hodograph">meteoJS/thermodynamicDiagram/hod
 
                             <div class="symbol-index-column">
     <dl class="symbol-index-list">
+            <dt class="symbol-index-name">
+                <a href="module-meteoJS_thermodynamicDiagram_hodograph.html#~options" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>hodograph~<wbr>options</a>
+            </dt>
+            <dd>
+            </dd>
     </dl>
 </div>
 
@@ -6343,6 +6368,11 @@ <h2 id="meteoJS/thermodynamicDiagram/hodograph.Hodograph">meteoJS/thermodynamicD
             </dt>
             <dd>
             </dd>
+            <dt class="symbol-index-name">
+                <a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#_initHoverLabels" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>hodograph.<wbr>Hodograph#<wbr>_initHoverLabels(options)</a>
+            </dt>
+            <dd>
+            </dd>
             <dt class="symbol-index-name">
                 <a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#addSounding" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>hodograph.<wbr>Hodograph#<wbr>addSounding(sounding)</a>
             </dt>
@@ -6354,27 +6384,27 @@ <h2 id="meteoJS/thermodynamicDiagram/hodograph.Hodograph">meteoJS/thermodynamicD
             <dd>
             </dd>
             <dt class="symbol-index-name">
-                <a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#coordinateSystem" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>hodograph.<wbr>Hodograph#<wbr>coordinateSystem</a>
+                <a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#center" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>hodograph.<wbr>Hodograph#<wbr>center</a>
             </dt>
             <dd>
             </dd>
             <dt class="symbol-index-name">
-                <a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#dataGroupIds" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>hodograph.<wbr>Hodograph#<wbr>dataGroupIds</a>
+                <a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#coordinateSystem" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>hodograph.<wbr>Hodograph#<wbr>coordinateSystem</a>
             </dt>
             <dd>
             </dd>
             <dt class="symbol-index-name">
-                <a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#drawBackground" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>hodograph.<wbr>Hodograph#<wbr>drawBackground(svgNode)</a>
+                <a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#dataGroupIds" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>hodograph.<wbr>Hodograph#<wbr>dataGroupIds</a>
             </dt>
             <dd>
             </dd>
             <dt class="symbol-index-name">
-                <a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#drawSounding" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>hodograph.<wbr>Hodograph#<wbr>drawSounding(sounding, group)</a>
+                <a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#drawBackground" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>hodograph.<wbr>Hodograph#<wbr>drawBackground(svgNode)</a>
             </dt>
             <dd>
             </dd>
             <dt class="symbol-index-name">
-                <a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#drawSoundings" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>hodograph.<wbr>Hodograph#<wbr>drawSoundings()</a>
+                <a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#drawSounding" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>hodograph.<wbr>Hodograph#<wbr>drawSounding(sounding, group)</a>
             </dt>
             <dd>
             </dd>
@@ -6383,6 +6413,11 @@ <h2 id="meteoJS/thermodynamicDiagram/hodograph.Hodograph">meteoJS/thermodynamicD
 
                             <div class="symbol-index-column">
     <dl class="symbol-index-list">
+            <dt class="symbol-index-name">
+                <a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#drawSoundings" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>hodograph.<wbr>Hodograph#<wbr>drawSoundings()</a>
+            </dt>
+            <dd>
+            </dd>
             <dt class="symbol-index-name">
                 <a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#getCoordinatesByLevelData" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>hodograph.<wbr>Hodograph#<wbr>getCoordinatesByLevelData</a>
             </dt>
@@ -6433,6 +6468,16 @@ <h2 id="meteoJS/thermodynamicDiagram/hodograph.Hodograph">meteoJS/thermodynamicD
 
                             <div class="symbol-index-column">
     <dl class="symbol-index-list">
+            <dt class="symbol-index-name">
+                <a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#origin" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>hodograph.<wbr>Hodograph#<wbr>origin</a>
+            </dt>
+            <dd>
+            </dd>
+            <dt class="symbol-index-name">
+                <a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#pixelPerSpeed" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>hodograph.<wbr>Hodograph#<wbr>pixelPerSpeed</a>
+            </dt>
+            <dd>
+            </dd>
             <dt class="symbol-index-name">
                 <a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#removeSounding" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>hodograph.<wbr>Hodograph#<wbr>removeSounding(sounding)</a>
             </dt>
@@ -6490,6 +6535,11 @@ <h2 id="meteoJS/thermodynamicDiagram/plotAltitudeDataArea">meteoJS/thermodynamic
             </dt>
             <dd>
             </dd>
+    </dl>
+</div>
+
+                            <div class="symbol-index-column">
+    <dl class="symbol-index-list">
             <dt class="symbol-index-name">
                 <a href="module-meteoJS_thermodynamicDiagram_plotAltitudeDataArea.html#~hoverLabelsOptions" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>plotAltitudeDataArea~<wbr>hoverLabelsOptions</a>
             </dt>
@@ -6500,11 +6550,6 @@ <h2 id="meteoJS/thermodynamicDiagram/plotAltitudeDataArea">meteoJS/thermodynamic
 
                             <div class="symbol-index-column">
     <dl class="symbol-index-list">
-            <dt class="symbol-index-name">
-                <a href="module-meteoJS_thermodynamicDiagram_plotAltitudeDataArea.html#~insertLabelsFunc" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>plotAltitudeDataArea~<wbr>insertLabelsFunc(sounding, levelData, group)</a>
-            </dt>
-            <dd>
-            </dd>
             <dt class="symbol-index-name">
                 <a href="module-meteoJS_thermodynamicDiagram_plotAltitudeDataArea.html#~options" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>plotAltitudeDataArea~<wbr>options</a>
             </dt>
@@ -6513,11 +6558,6 @@ <h2 id="meteoJS/thermodynamicDiagram/plotAltitudeDataArea">meteoJS/thermodynamic
     </dl>
 </div>
 
-                            <div class="symbol-index-column">
-    <dl class="symbol-index-list">
-    </dl>
-</div>
-
                 </div>
             </div>
         </section>
@@ -6568,7 +6608,7 @@ <h2 id="meteoJS/thermodynamicDiagram/plotAltitudeDataArea.PlotAltitudeDataArea">
             <dd>
             </dd>
             <dt class="symbol-index-name">
-                <a href="module-meteoJS_thermodynamicDiagram_plotAltitudeDataArea.PlotAltitudeDataArea.html#drawSounding" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>plotAltitudeDataArea.<wbr>PlotAltitudeDataArea#<wbr>drawSounding()</a>
+                <a href="module-meteoJS_thermodynamicDiagram_plotAltitudeDataArea.PlotAltitudeDataArea.html#drawSounding" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>plotAltitudeDataArea.<wbr>PlotAltitudeDataArea#<wbr>drawSounding(sounding, group)</a>
             </dt>
             <dd>
             </dd>
@@ -6623,7 +6663,7 @@ <h2 id="meteoJS/thermodynamicDiagram/plotAltitudeDataArea.PlotAltitudeDataArea">
             <dd>
             </dd>
             <dt class="symbol-index-name">
-                <a href="module-meteoJS_thermodynamicDiagram_plotAltitudeDataArea.PlotAltitudeDataArea.html#onChangeSoundingVisibility" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>plotAltitudeDataArea.<wbr>PlotAltitudeDataArea#<wbr>onChangeSoundingVisibility()</a>
+                <a href="module-meteoJS_thermodynamicDiagram_plotAltitudeDataArea.PlotAltitudeDataArea.html#onChangeSoundingVisibility" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>plotAltitudeDataArea.<wbr>PlotAltitudeDataArea#<wbr>onChangeSoundingVisibility(sounding, group)</a>
             </dt>
             <dd>
             </dd>
@@ -6933,23 +6973,33 @@ <h2 id="meteoJS/thermodynamicDiagram/plotDataArea">meteoJS/thermodynamicDiagram/
             </dt>
             <dd>
             </dd>
+            <dt class="symbol-index-name">
+                <a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#event:remove:sounding" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>plotDataArea#<wbr>remove:sounding</a>
+            </dt>
+            <dd>
+            </dd>
+            <dt class="symbol-index-name">
+                <a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~filterDataPoint" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>plotDataArea~<wbr>filterDataPoint(pointData, lastPointData)</a>
+            </dt>
+            <dd>
+            </dd>
     </dl>
 </div>
 
                             <div class="symbol-index-column">
     <dl class="symbol-index-list">
             <dt class="symbol-index-name">
-                <a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#event:remove:sounding" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>plotDataArea#<wbr>remove:sounding</a>
+                <a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~getCoordinatesByLevelData" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>plotDataArea~<wbr>getCoordinatesByLevelData(dataGroupId, sounding, levelData, plotArea)</a>
             </dt>
             <dd>
             </dd>
             <dt class="symbol-index-name">
-                <a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~filterDataPoint" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>plotDataArea~<wbr>filterDataPoint(pointData, lastPointData)</a>
+                <a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~getHoverSounding" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>plotDataArea~<wbr>getHoverSounding(soundings)</a>
             </dt>
             <dd>
             </dd>
             <dt class="symbol-index-name">
-                <a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~getCoordinatesByLevelData" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>plotDataArea~<wbr>getCoordinatesByLevelData(dataGroupId, sounding, levelData, plotArea)</a>
+                <a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~getLevelData" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>plotDataArea~<wbr>getLevelData(options)</a>
             </dt>
             <dd>
             </dd>
@@ -6958,13 +7008,23 @@ <h2 id="meteoJS/thermodynamicDiagram/plotDataArea">meteoJS/thermodynamicDiagram/
             </dt>
             <dd>
             </dd>
+            <dt class="symbol-index-name">
+                <a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~hoverLabelsOptions" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>plotDataArea~<wbr>hoverLabelsOptions</a>
+            </dt>
+            <dd>
+            </dd>
+            <dt class="symbol-index-name">
+                <a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~insertDataGroupInto" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>plotDataArea~<wbr>insertDataGroupInto(svgNode, dataGroupId, sounding, data, plotArea)</a>
+            </dt>
+            <dd>
+            </dd>
     </dl>
 </div>
 
                             <div class="symbol-index-column">
     <dl class="symbol-index-list">
             <dt class="symbol-index-name">
-                <a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~insertDataGroupInto" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>plotDataArea~<wbr>insertDataGroupInto(svgNode, dataGroupId, sounding, data, plotArea)</a>
+                <a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~insertLabelsFunc" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>plotDataArea~<wbr>insertLabelsFunc(sounding, levelData, group)</a>
             </dt>
             <dd>
             </dd>
@@ -7005,6 +7065,11 @@ <h2 id="meteoJS/thermodynamicDiagram/plotDataArea.PlotDataArea">meteoJS/thermody
             </dt>
             <dd>
             </dd>
+            <dt class="symbol-index-name">
+                <a href="module-meteoJS_thermodynamicDiagram_plotDataArea.PlotDataArea.html#_initHoverLabels" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>plotDataArea.<wbr>PlotDataArea#<wbr>_initHoverLabels(options)</a>
+            </dt>
+            <dd>
+            </dd>
             <dt class="symbol-index-name">
                 <a href="module-meteoJS_thermodynamicDiagram_plotDataArea.PlotDataArea.html#addSounding" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>plotDataArea.<wbr>PlotDataArea#<wbr>addSounding(sounding)</a>
             </dt>
@@ -7035,16 +7100,16 @@ <h2 id="meteoJS/thermodynamicDiagram/plotDataArea.PlotDataArea">meteoJS/thermody
             </dt>
             <dd>
             </dd>
-            <dt class="symbol-index-name">
-                <a href="module-meteoJS_thermodynamicDiagram_plotDataArea.PlotDataArea.html#drawSoundings" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>plotDataArea.<wbr>PlotDataArea#<wbr>drawSoundings()</a>
-            </dt>
-            <dd>
-            </dd>
     </dl>
 </div>
 
                             <div class="symbol-index-column">
     <dl class="symbol-index-list">
+            <dt class="symbol-index-name">
+                <a href="module-meteoJS_thermodynamicDiagram_plotDataArea.PlotDataArea.html#drawSoundings" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>plotDataArea.<wbr>PlotDataArea#<wbr>drawSoundings()</a>
+            </dt>
+            <dd>
+            </dd>
             <dt class="symbol-index-name">
                 <a href="module-meteoJS_thermodynamicDiagram_plotDataArea.PlotDataArea.html#getCoordinatesByLevelData" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>plotDataArea.<wbr>PlotDataArea#<wbr>getCoordinatesByLevelData</a>
             </dt>
@@ -7085,16 +7150,16 @@ <h2 id="meteoJS/thermodynamicDiagram/plotDataArea.PlotDataArea">meteoJS/thermody
             </dt>
             <dd>
             </dd>
-            <dt class="symbol-index-name">
-                <a href="module-meteoJS_thermodynamicDiagram_plotDataArea.PlotDataArea.html#onCoordinateSystemChange" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>plotDataArea.<wbr>PlotDataArea#<wbr>onCoordinateSystemChange()</a>
-            </dt>
-            <dd>
-            </dd>
     </dl>
 </div>
 
                             <div class="symbol-index-column">
     <dl class="symbol-index-list">
+            <dt class="symbol-index-name">
+                <a href="module-meteoJS_thermodynamicDiagram_plotDataArea.PlotDataArea.html#onCoordinateSystemChange" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>plotDataArea.<wbr>PlotDataArea#<wbr>onCoordinateSystemChange()</a>
+            </dt>
+            <dd>
+            </dd>
             <dt class="symbol-index-name">
                 <a href="module-meteoJS_thermodynamicDiagram_plotDataArea.PlotDataArea.html#removeSounding" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>plotDataArea.<wbr>PlotDataArea#<wbr>removeSounding(sounding)</a>
             </dt>
@@ -7400,7 +7465,7 @@ <h2 id="meteoJS/thermodynamicDiagram/tdDiagram.TDDiagram">meteoJS/thermodynamicD
             <dd>
             </dd>
             <dt class="symbol-index-name">
-                <a href="module-meteoJS_thermodynamicDiagram_tdDiagram.TDDiagram.html#onChangeSoundingVisibility" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>tdDiagram.<wbr>TDDiagram#<wbr>onChangeSoundingVisibility()</a>
+                <a href="module-meteoJS_thermodynamicDiagram_tdDiagram.TDDiagram.html#onChangeSoundingVisibility" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>tdDiagram.<wbr>TDDiagram#<wbr>onChangeSoundingVisibility(sounding, group)</a>
             </dt>
             <dd>
             </dd>
@@ -7564,7 +7629,7 @@ <h2 id="meteoJS/thermodynamicDiagram/windbarbsProfile.WindbarbsProfile">meteoJS/
             <dd>
             </dd>
             <dt class="symbol-index-name">
-                <a href="module-meteoJS_thermodynamicDiagram_windbarbsProfile.WindbarbsProfile.html#drawSounding" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>windbarbsProfile.<wbr>WindbarbsProfile#<wbr>drawSounding()</a>
+                <a href="module-meteoJS_thermodynamicDiagram_windbarbsProfile.WindbarbsProfile.html#drawSounding" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>windbarbsProfile.<wbr>WindbarbsProfile#<wbr>drawSounding(sounding, group)</a>
             </dt>
             <dd>
             </dd>
@@ -7619,7 +7684,7 @@ <h2 id="meteoJS/thermodynamicDiagram/windbarbsProfile.WindbarbsProfile">meteoJS/
             <dd>
             </dd>
             <dt class="symbol-index-name">
-                <a href="module-meteoJS_thermodynamicDiagram_windbarbsProfile.WindbarbsProfile.html#onChangeSoundingVisibility" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>windbarbsProfile.<wbr>WindbarbsProfile#<wbr>onChangeSoundingVisibility()</a>
+                <a href="module-meteoJS_thermodynamicDiagram_windbarbsProfile.WindbarbsProfile.html#onChangeSoundingVisibility" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>windbarbsProfile.<wbr>WindbarbsProfile#<wbr>onChangeSoundingVisibility(sounding, group)</a>
             </dt>
             <dd>
             </dd>
@@ -7763,7 +7828,7 @@ <h2 id="meteoJS/thermodynamicDiagram/windspeedProfile.WindspeedProfile">meteoJS/
             <dd>
             </dd>
             <dt class="symbol-index-name">
-                <a href="module-meteoJS_thermodynamicDiagram_windspeedProfile.WindspeedProfile.html#drawSounding" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>windspeedProfile.<wbr>WindspeedProfile#<wbr>drawSounding()</a>
+                <a href="module-meteoJS_thermodynamicDiagram_windspeedProfile.WindspeedProfile.html#drawSounding" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>windspeedProfile.<wbr>WindspeedProfile#<wbr>drawSounding(sounding, group)</a>
             </dt>
             <dd>
             </dd>
@@ -7818,7 +7883,7 @@ <h2 id="meteoJS/thermodynamicDiagram/windspeedProfile.WindspeedProfile">meteoJS/
             <dd>
             </dd>
             <dt class="symbol-index-name">
-                <a href="module-meteoJS_thermodynamicDiagram_windspeedProfile.WindspeedProfile.html#onChangeSoundingVisibility" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>windspeedProfile.<wbr>WindspeedProfile#<wbr>onChangeSoundingVisibility()</a>
+                <a href="module-meteoJS_thermodynamicDiagram_windspeedProfile.WindspeedProfile.html#onChangeSoundingVisibility" class="!symbol-index-name">meteoJS/<wbr>thermodynamicDiagram/<wbr>windspeedProfile.<wbr>WindspeedProfile#<wbr>onChangeSoundingVisibility(sounding, group)</a>
             </dt>
             <dd>
             </dd>
@@ -9316,7 +9381,7 @@ <h2 id="meteoJS/tooltip/bootstrapTooltip.BootstrapTooltip">meteoJS/tooltip/boots
                     <footer id="jsdoc-footer" class="jsdoc-footer">
                             <div id="jsdoc-footer-container">
                                     <p>
-                                      Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+                                      Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
                                     </p>
                             </div>
                     </footer>
diff --git a/doc/index.js.html b/doc/index.js.html
index 74887468..91958671 100644
--- a/doc/index.js.html
+++ b/doc/index.js.html
@@ -245,7 +245,7 @@ <h1>Source: index.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/modelviewer_Container.js.html b/doc/modelviewer_Container.js.html
index f323def6..66b498e1 100644
--- a/doc/modelviewer_Container.js.html
+++ b/doc/modelviewer_Container.js.html
@@ -854,7 +854,7 @@ <h1>Source: modelviewer/Container.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/modelviewer_Display.js.html b/doc/modelviewer_Display.js.html
index 95c5b6d2..83b9fc90 100644
--- a/doc/modelviewer_Display.js.html
+++ b/doc/modelviewer_Display.js.html
@@ -329,7 +329,7 @@ <h1>Source: modelviewer/Display.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/modelviewer_NWPResources.js.html b/doc/modelviewer_NWPResources.js.html
index 1254f5a3..d26b720b 100644
--- a/doc/modelviewer_NWPResources.js.html
+++ b/doc/modelviewer_NWPResources.js.html
@@ -182,7 +182,7 @@ <h1>Source: modelviewer/NWPResources.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/modelviewer_Node.js.html b/doc/modelviewer_Node.js.html
index 380e1a66..64941e14 100644
--- a/doc/modelviewer_Node.js.html
+++ b/doc/modelviewer_Node.js.html
@@ -397,7 +397,7 @@ <h1>Source: modelviewer/Node.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/modelviewer_OffsetVariable.js.html b/doc/modelviewer_OffsetVariable.js.html
index b6c39dec..184d79ce 100644
--- a/doc/modelviewer_OffsetVariable.js.html
+++ b/doc/modelviewer_OffsetVariable.js.html
@@ -125,7 +125,7 @@ <h1>Source: modelviewer/OffsetVariable.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/modelviewer_Resource.js.html b/doc/modelviewer_Resource.js.html
index 940beb33..4ad0c6e1 100644
--- a/doc/modelviewer_Resource.js.html
+++ b/doc/modelviewer_Resource.js.html
@@ -210,7 +210,7 @@ <h1>Source: modelviewer/Resource.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/modelviewer_Resources.js.html b/doc/modelviewer_Resources.js.html
index 3f7f1581..323fabeb 100644
--- a/doc/modelviewer_Resources.js.html
+++ b/doc/modelviewer_Resources.js.html
@@ -532,7 +532,7 @@ <h1>Source: modelviewer/Resources.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/modelviewer_ResourcesTreeNode.js.html b/doc/modelviewer_ResourcesTreeNode.js.html
index 79a51360..e8287661 100644
--- a/doc/modelviewer_ResourcesTreeNode.js.html
+++ b/doc/modelviewer_ResourcesTreeNode.js.html
@@ -225,7 +225,7 @@ <h1>Source: modelviewer/ResourcesTreeNode.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/modelviewer_TimeVariable.js.html b/doc/modelviewer_TimeVariable.js.html
index aaa99b45..9a5feed0 100644
--- a/doc/modelviewer_TimeVariable.js.html
+++ b/doc/modelviewer_TimeVariable.js.html
@@ -100,7 +100,7 @@ <h1>Source: modelviewer/TimeVariable.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/modelviewer_Variable.js.html b/doc/modelviewer_Variable.js.html
index edce582b..101958de 100644
--- a/doc/modelviewer_Variable.js.html
+++ b/doc/modelviewer_Variable.js.html
@@ -91,7 +91,7 @@ <h1>Source: modelviewer/Variable.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/modelviewer_VariableCollection.js.html b/doc/modelviewer_VariableCollection.js.html
index 539cb60b..1130bcab 100644
--- a/doc/modelviewer_VariableCollection.js.html
+++ b/doc/modelviewer_VariableCollection.js.html
@@ -163,7 +163,7 @@ <h1>Source: modelviewer/VariableCollection.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/modelviewer_display_SelectNavigation.js.html b/doc/modelviewer_display_SelectNavigation.js.html
index 143f8b67..6611309d 100644
--- a/doc/modelviewer_display_SelectNavigation.js.html
+++ b/doc/modelviewer_display_SelectNavigation.js.html
@@ -142,7 +142,7 @@ <h1>Source: modelviewer/display/SelectNavigation.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/modelviewer_display_Simple.js.html b/doc/modelviewer_display_Simple.js.html
index 3570826c..18e27b1c 100644
--- a/doc/modelviewer_display_Simple.js.html
+++ b/doc/modelviewer_display_Simple.js.html
@@ -132,7 +132,7 @@ <h1>Source: modelviewer/display/Simple.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/modelviewer_resource_Image.js.html b/doc/modelviewer_resource_Image.js.html
index 60ad1007..630c3029 100644
--- a/doc/modelviewer_resource_Image.js.html
+++ b/doc/modelviewer_resource_Image.js.html
@@ -89,7 +89,7 @@ <h1>Source: modelviewer/resource/Image.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/modelviewer_resource_Sounding.js.html b/doc/modelviewer_resource_Sounding.js.html
index 22d7d980..454d3521 100644
--- a/doc/modelviewer_resource_Sounding.js.html
+++ b/doc/modelviewer_resource_Sounding.js.html
@@ -93,7 +93,7 @@ <h1>Source: modelviewer/resource/Sounding.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS.html b/doc/module-meteoJS.html
index 809d8af4..f23b8d41 100644
--- a/doc/module-meteoJS.html
+++ b/doc/module-meteoJS.html
@@ -44,7 +44,7 @@ <h1><small></small><span class="symbol-name">meteoJS</span></h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_base_collection.Collection.html b/doc/module-meteoJS_base_collection.Collection.html
index bcc6806e..f0552b43 100644
--- a/doc/module-meteoJS_base_collection.Collection.html
+++ b/doc/module-meteoJS_base_collection.Collection.html
@@ -420,7 +420,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_base_collection.html b/doc/module-meteoJS_base_collection.html
index 5920ca23..9762f1a0 100644
--- a/doc/module-meteoJS_base_collection.html
+++ b/doc/module-meteoJS_base_collection.html
@@ -322,7 +322,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_base_named.Named.html b/doc/module-meteoJS_base_named.Named.html
index cb0a3caa..d1531eb4 100644
--- a/doc/module-meteoJS_base_named.Named.html
+++ b/doc/module-meteoJS_base_named.Named.html
@@ -315,7 +315,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_base_named.html b/doc/module-meteoJS_base_named.html
index ee428ff9..1d6d248d 100644
--- a/doc/module-meteoJS_base_named.html
+++ b/doc/module-meteoJS_base_named.html
@@ -146,7 +146,7 @@ <h4>Properties</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_base_namedCollection.NamedCollection.html b/doc/module-meteoJS_base_namedCollection.NamedCollection.html
index cb6cf888..4114cb14 100644
--- a/doc/module-meteoJS_base_namedCollection.NamedCollection.html
+++ b/doc/module-meteoJS_base_namedCollection.NamedCollection.html
@@ -646,7 +646,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_base_namedCollection.html b/doc/module-meteoJS_base_namedCollection.html
index 86a3e8ae..e4c34dcb 100644
--- a/doc/module-meteoJS_base_namedCollection.html
+++ b/doc/module-meteoJS_base_namedCollection.html
@@ -146,7 +146,7 @@ <h4>Properties</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_base_unique.Unique.html b/doc/module-meteoJS_base_unique.Unique.html
index d40f1fbc..f669984b 100644
--- a/doc/module-meteoJS_base_unique.Unique.html
+++ b/doc/module-meteoJS_base_unique.Unique.html
@@ -156,7 +156,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_base_unique.html b/doc/module-meteoJS_base_unique.html
index 0493b9b6..01124ba9 100644
--- a/doc/module-meteoJS_base_unique.html
+++ b/doc/module-meteoJS_base_unique.html
@@ -118,7 +118,7 @@ <h4>Property</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_base_uniquenamed.UniqueNamed.html b/doc/module-meteoJS_base_uniquenamed.UniqueNamed.html
index 7cb7c769..82ceb4e5 100644
--- a/doc/module-meteoJS_base_uniquenamed.UniqueNamed.html
+++ b/doc/module-meteoJS_base_uniquenamed.UniqueNamed.html
@@ -342,7 +342,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_base_uniquenamed.html b/doc/module-meteoJS_base_uniquenamed.html
index 5e0e93a1..8db4963b 100644
--- a/doc/module-meteoJS_base_uniquenamed.html
+++ b/doc/module-meteoJS_base_uniquenamed.html
@@ -118,7 +118,7 @@ <h4>Property</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_calc.html b/doc/module-meteoJS_calc.html
index c882c337..b861702d 100644
--- a/doc/module-meteoJS_calc.html
+++ b/doc/module-meteoJS_calc.html
@@ -1319,7 +1319,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_events.html b/doc/module-meteoJS_events.html
index 1c75a211..65066f96 100644
--- a/doc/module-meteoJS_events.html
+++ b/doc/module-meteoJS_events.html
@@ -363,7 +363,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_modelviewer.Modelviewer.html b/doc/module-meteoJS_modelviewer.Modelviewer.html
index 25af1b16..9e9f2f5b 100644
--- a/doc/module-meteoJS_modelviewer.Modelviewer.html
+++ b/doc/module-meteoJS_modelviewer.Modelviewer.html
@@ -210,7 +210,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_modelviewer.html b/doc/module-meteoJS_modelviewer.html
index 1354b1ff..204b7fd4 100644
--- a/doc/module-meteoJS_modelviewer.html
+++ b/doc/module-meteoJS_modelviewer.html
@@ -238,7 +238,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_modelviewer_container.Container.html b/doc/module-meteoJS_modelviewer_container.Container.html
index 82440eb4..933da1f1 100644
--- a/doc/module-meteoJS_modelviewer_container.Container.html
+++ b/doc/module-meteoJS_modelviewer_container.Container.html
@@ -403,7 +403,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_modelviewer_container.html b/doc/module-meteoJS_modelviewer_container.html
index 85fd4647..daaa4f18 100644
--- a/doc/module-meteoJS_modelviewer_container.html
+++ b/doc/module-meteoJS_modelviewer_container.html
@@ -621,7 +621,7 @@ <h3 id="event:change:visibleResource"><span class="symbol-name">change:visibleRe
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_modelviewer_display.Display.html b/doc/module-meteoJS_modelviewer_display.Display.html
index 9f3065a3..c1348cd6 100644
--- a/doc/module-meteoJS_modelviewer_display.Display.html
+++ b/doc/module-meteoJS_modelviewer_display.Display.html
@@ -229,7 +229,7 @@ <h3 id="render"><span class="symbol-name">render</span><span class="signature"><
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_modelviewer_display.html b/doc/module-meteoJS_modelviewer_display.html
index 970a6e99..7a4df38b 100644
--- a/doc/module-meteoJS_modelviewer_display.html
+++ b/doc/module-meteoJS_modelviewer_display.html
@@ -174,7 +174,7 @@ <h3 id="event:init:display"><span class="symbol-name">init:display</span></h3>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_modelviewer_display_selectNavigation.SelectNavigation.html b/doc/module-meteoJS_modelviewer_display_selectNavigation.SelectNavigation.html
index 7c0cc37e..ea98bf4c 100644
--- a/doc/module-meteoJS_modelviewer_display_selectNavigation.SelectNavigation.html
+++ b/doc/module-meteoJS_modelviewer_display_selectNavigation.SelectNavigation.html
@@ -69,7 +69,7 @@ <h3 id="onInit"><span class="symbol-name">onInit</span><span class="signature"><
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_modelviewer_display_selectNavigation.html b/doc/module-meteoJS_modelviewer_display_selectNavigation.html
index 05135007..18c63042 100644
--- a/doc/module-meteoJS_modelviewer_display_selectNavigation.html
+++ b/doc/module-meteoJS_modelviewer_display_selectNavigation.html
@@ -64,7 +64,7 @@ <h3><a href="module-meteoJS_modelviewer_display_selectNavigation.SelectNavigatio
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_modelviewer_display_simple.Simple.html b/doc/module-meteoJS_modelviewer_display_simple.Simple.html
index 506b46aa..79fdfa93 100644
--- a/doc/module-meteoJS_modelviewer_display_simple.Simple.html
+++ b/doc/module-meteoJS_modelviewer_display_simple.Simple.html
@@ -106,7 +106,7 @@ <h3 id="onInit"><span class="symbol-name">onInit</span><span class="signature"><
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_modelviewer_display_simple.html b/doc/module-meteoJS_modelviewer_display_simple.html
index 0a7b063e..ea1e83c0 100644
--- a/doc/module-meteoJS_modelviewer_display_simple.html
+++ b/doc/module-meteoJS_modelviewer_display_simple.html
@@ -64,7 +64,7 @@ <h3><a href="module-meteoJS_modelviewer_display_simple.Simple.html">Simple</a></
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_modelviewer_node.Node.html b/doc/module-meteoJS_modelviewer_node.Node.html
index c8ec0004..727b1c05 100644
--- a/doc/module-meteoJS_modelviewer_node.Node.html
+++ b/doc/module-meteoJS_modelviewer_node.Node.html
@@ -440,7 +440,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_modelviewer_node.html b/doc/module-meteoJS_modelviewer_node.html
index 613c50ee..f7458d4f 100644
--- a/doc/module-meteoJS_modelviewer_node.html
+++ b/doc/module-meteoJS_modelviewer_node.html
@@ -116,7 +116,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_modelviewer_nwpResources.NWPResources.html b/doc/module-meteoJS_modelviewer_nwpResources.NWPResources.html
index 45257d36..07fd0f37 100644
--- a/doc/module-meteoJS_modelviewer_nwpResources.NWPResources.html
+++ b/doc/module-meteoJS_modelviewer_nwpResources.NWPResources.html
@@ -287,7 +287,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_modelviewer_nwpResources.html b/doc/module-meteoJS_modelviewer_nwpResources.html
index f325060c..ef40a585 100644
--- a/doc/module-meteoJS_modelviewer_nwpResources.html
+++ b/doc/module-meteoJS_modelviewer_nwpResources.html
@@ -64,7 +64,7 @@ <h3><a href="module-meteoJS_modelviewer_nwpResources.NWPResources.html">NWPResou
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_modelviewer_offsetVariable.OffsetVariable.html b/doc/module-meteoJS_modelviewer_offsetVariable.OffsetVariable.html
index 7bf04a3a..6c916d00 100644
--- a/doc/module-meteoJS_modelviewer_offsetVariable.OffsetVariable.html
+++ b/doc/module-meteoJS_modelviewer_offsetVariable.OffsetVariable.html
@@ -128,7 +128,7 @@ <h3 id="run"><span class="symbol-name">run</span><small class="property-type">
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_modelviewer_offsetVariable.html b/doc/module-meteoJS_modelviewer_offsetVariable.html
index 354e63b9..23afb75e 100644
--- a/doc/module-meteoJS_modelviewer_offsetVariable.html
+++ b/doc/module-meteoJS_modelviewer_offsetVariable.html
@@ -132,7 +132,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_modelviewer_resource.Resource.html b/doc/module-meteoJS_modelviewer_resource.Resource.html
index 658ca00f..ae55dd27 100644
--- a/doc/module-meteoJS_modelviewer_resource.Resource.html
+++ b/doc/module-meteoJS_modelviewer_resource.Resource.html
@@ -310,7 +310,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_modelviewer_resource.html b/doc/module-meteoJS_modelviewer_resource.html
index cd136cf5..0f8dc83c 100644
--- a/doc/module-meteoJS_modelviewer_resource.html
+++ b/doc/module-meteoJS_modelviewer_resource.html
@@ -161,7 +161,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_modelviewer_resource_image.Image.html b/doc/module-meteoJS_modelviewer_resource_image.Image.html
index 5fa9e242..01949ec0 100644
--- a/doc/module-meteoJS_modelviewer_resource_image.Image.html
+++ b/doc/module-meteoJS_modelviewer_resource_image.Image.html
@@ -103,7 +103,7 @@ <h3 id="url"><span class="symbol-name">url</span><small class="property-type">
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_modelviewer_resource_image.html b/doc/module-meteoJS_modelviewer_resource_image.html
index 8753a6b2..c28d677c 100644
--- a/doc/module-meteoJS_modelviewer_resource_image.html
+++ b/doc/module-meteoJS_modelviewer_resource_image.html
@@ -118,7 +118,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_modelviewer_resource_sounding.Sounding.html b/doc/module-meteoJS_modelviewer_resource_sounding.Sounding.html
index 6205cecd..f6bc6dde 100644
--- a/doc/module-meteoJS_modelviewer_resource_sounding.Sounding.html
+++ b/doc/module-meteoJS_modelviewer_resource_sounding.Sounding.html
@@ -103,7 +103,7 @@ <h3 id="sounding"><span class="symbol-name">sounding</span><small class="propert
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_modelviewer_resource_sounding.html b/doc/module-meteoJS_modelviewer_resource_sounding.html
index 699e80f2..0b899cef 100644
--- a/doc/module-meteoJS_modelviewer_resource_sounding.html
+++ b/doc/module-meteoJS_modelviewer_resource_sounding.html
@@ -118,7 +118,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_modelviewer_resources.Resources.html b/doc/module-meteoJS_modelviewer_resources.Resources.html
index b0097c3b..2716eda4 100644
--- a/doc/module-meteoJS_modelviewer_resources.Resources.html
+++ b/doc/module-meteoJS_modelviewer_resources.Resources.html
@@ -601,7 +601,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_modelviewer_resources.html b/doc/module-meteoJS_modelviewer_resources.html
index ab0f7302..a24c393f 100644
--- a/doc/module-meteoJS_modelviewer_resources.html
+++ b/doc/module-meteoJS_modelviewer_resources.html
@@ -201,7 +201,7 @@ <h4>Properties</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_modelviewer_resourcesTreeNode.ResourcesTreeNode.html b/doc/module-meteoJS_modelviewer_resourcesTreeNode.ResourcesTreeNode.html
index 42712657..e244dbd3 100644
--- a/doc/module-meteoJS_modelviewer_resourcesTreeNode.ResourcesTreeNode.html
+++ b/doc/module-meteoJS_modelviewer_resourcesTreeNode.ResourcesTreeNode.html
@@ -328,7 +328,7 @@ <h3 id="removeChild"><span class="symbol-name">removeChild</span><span class="si
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_modelviewer_resourcesTreeNode.html b/doc/module-meteoJS_modelviewer_resourcesTreeNode.html
index b7ecef47..19047f8d 100644
--- a/doc/module-meteoJS_modelviewer_resourcesTreeNode.html
+++ b/doc/module-meteoJS_modelviewer_resourcesTreeNode.html
@@ -118,7 +118,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_modelviewer_timeVariable.TimeVariable.html b/doc/module-meteoJS_modelviewer_timeVariable.TimeVariable.html
index d94109ef..c44b2c9d 100644
--- a/doc/module-meteoJS_modelviewer_timeVariable.TimeVariable.html
+++ b/doc/module-meteoJS_modelviewer_timeVariable.TimeVariable.html
@@ -124,7 +124,7 @@ <h3 id="setId"><span class="symbol-name">setId</span><span class="signature"><sp
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_modelviewer_timeVariable.html b/doc/module-meteoJS_modelviewer_timeVariable.html
index beccbc34..18c00485 100644
--- a/doc/module-meteoJS_modelviewer_timeVariable.html
+++ b/doc/module-meteoJS_modelviewer_timeVariable.html
@@ -118,7 +118,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_modelviewer_variable.Variable.html b/doc/module-meteoJS_modelviewer_variable.Variable.html
index 0752cc30..a39a565b 100644
--- a/doc/module-meteoJS_modelviewer_variable.Variable.html
+++ b/doc/module-meteoJS_modelviewer_variable.Variable.html
@@ -103,7 +103,7 @@ <h3 id="variableCollection"><span class="symbol-name">variableCollection</span><
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_modelviewer_variable.html b/doc/module-meteoJS_modelviewer_variable.html
index beddd16f..ba02cde0 100644
--- a/doc/module-meteoJS_modelviewer_variable.html
+++ b/doc/module-meteoJS_modelviewer_variable.html
@@ -118,7 +118,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_modelviewer_variableCollection.VariableCollection.html b/doc/module-meteoJS_modelviewer_variableCollection.VariableCollection.html
index fcaaf552..c0059379 100644
--- a/doc/module-meteoJS_modelviewer_variableCollection.VariableCollection.html
+++ b/doc/module-meteoJS_modelviewer_variableCollection.VariableCollection.html
@@ -198,7 +198,7 @@ <h3 id="setId"><span class="symbol-name">setId</span><span class="signature"><sp
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_modelviewer_variableCollection.html b/doc/module-meteoJS_modelviewer_variableCollection.html
index 7361ae2f..04950758 100644
--- a/doc/module-meteoJS_modelviewer_variableCollection.html
+++ b/doc/module-meteoJS_modelviewer_variableCollection.html
@@ -179,7 +179,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_repetitiveRequests.RepetitiveRequests.html b/doc/module-meteoJS_repetitiveRequests.RepetitiveRequests.html
index b042228a..66142d2c 100644
--- a/doc/module-meteoJS_repetitiveRequests.RepetitiveRequests.html
+++ b/doc/module-meteoJS_repetitiveRequests.RepetitiveRequests.html
@@ -169,7 +169,7 @@ <h3 id="stop"><span class="symbol-name">stop</span><span class="signature"><span
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_repetitiveRequests.html b/doc/module-meteoJS_repetitiveRequests.html
index 93d12048..24bafd4b 100644
--- a/doc/module-meteoJS_repetitiveRequests.html
+++ b/doc/module-meteoJS_repetitiveRequests.html
@@ -326,7 +326,7 @@ <h4>Property</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_sounding.Sounding.html b/doc/module-meteoJS_sounding.Sounding.html
index bed8848b..dc3daa46 100644
--- a/doc/module-meteoJS_sounding.Sounding.html
+++ b/doc/module-meteoJS_sounding.Sounding.html
@@ -403,7 +403,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_sounding.html b/doc/module-meteoJS_sounding.html
index 8b2ba63e..d027076a 100644
--- a/doc/module-meteoJS_sounding.html
+++ b/doc/module-meteoJS_sounding.html
@@ -347,7 +347,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_sounding_parcel.Parcel.html b/doc/module-meteoJS_sounding_parcel.Parcel.html
index 05b88964..ea0ab4e1 100644
--- a/doc/module-meteoJS_sounding_parcel.Parcel.html
+++ b/doc/module-meteoJS_sounding_parcel.Parcel.html
@@ -502,7 +502,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_sounding_parcel.html b/doc/module-meteoJS_sounding_parcel.html
index e1cf100e..1c3be7ae 100644
--- a/doc/module-meteoJS_sounding_parcel.html
+++ b/doc/module-meteoJS_sounding_parcel.html
@@ -706,7 +706,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_synview.html b/doc/module-meteoJS_synview.html
index 006c626b..da183df5 100644
--- a/doc/module-meteoJS_synview.html
+++ b/doc/module-meteoJS_synview.html
@@ -301,7 +301,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_synview_collection.Collection.html b/doc/module-meteoJS_synview_collection.Collection.html
index b828d3d7..5b929400 100644
--- a/doc/module-meteoJS_synview_collection.Collection.html
+++ b/doc/module-meteoJS_synview_collection.Collection.html
@@ -309,7 +309,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_synview_collection.html b/doc/module-meteoJS_synview_collection.html
index 119c04cd..a94257b6 100644
--- a/doc/module-meteoJS_synview_collection.html
+++ b/doc/module-meteoJS_synview_collection.html
@@ -206,7 +206,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_synview_map.SynviewMap.html b/doc/module-meteoJS_synview_map.SynviewMap.html
index 290583b8..214d880e 100644
--- a/doc/module-meteoJS_synview_map.SynviewMap.html
+++ b/doc/module-meteoJS_synview_map.SynviewMap.html
@@ -342,7 +342,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_synview_map.html b/doc/module-meteoJS_synview_map.html
index bc205497..ea701030 100644
--- a/doc/module-meteoJS_synview_map.html
+++ b/doc/module-meteoJS_synview_map.html
@@ -278,7 +278,7 @@ <h3 id="event:singleclick:pointer"><span class="symbol-name">singleclick:pointer
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_synview_map_ll.MapLL.html b/doc/module-meteoJS_synview_map_ll.MapLL.html
index 82efdad7..7ba4d5d6 100644
--- a/doc/module-meteoJS_synview_map_ll.MapLL.html
+++ b/doc/module-meteoJS_synview_map_ll.MapLL.html
@@ -328,7 +328,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_synview_map_ll.html b/doc/module-meteoJS_synview_map_ll.html
index 5d0ba4a6..46fe5ea5 100644
--- a/doc/module-meteoJS_synview_map_ll.html
+++ b/doc/module-meteoJS_synview_map_ll.html
@@ -64,7 +64,7 @@ <h3><a href="module-meteoJS_synview_map_ll.MapLL.html">MapLL</a></h3>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_synview_map_ol.MapOL.html b/doc/module-meteoJS_synview_map_ol.MapOL.html
index e7ecd30d..eb2f8c06 100644
--- a/doc/module-meteoJS_synview_map_ol.MapOL.html
+++ b/doc/module-meteoJS_synview_map_ol.MapOL.html
@@ -308,7 +308,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_synview_map_ol.html b/doc/module-meteoJS_synview_map_ol.html
index 8ac3728b..3065ed4f 100644
--- a/doc/module-meteoJS_synview_map_ol.html
+++ b/doc/module-meteoJS_synview_map_ol.html
@@ -100,7 +100,7 @@ <h3 id=".projwgs84"><span class="symbol-name">projwgs84</span><small class="prop
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_synview_resource.Resource.html b/doc/module-meteoJS_synview_resource.Resource.html
index 676948dd..bcc85f2b 100644
--- a/doc/module-meteoJS_synview_resource.Resource.html
+++ b/doc/module-meteoJS_synview_resource.Resource.html
@@ -491,7 +491,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_synview_resource.html b/doc/module-meteoJS_synview_resource.html
index 4885a9e6..088aae68 100644
--- a/doc/module-meteoJS_synview_resource.html
+++ b/doc/module-meteoJS_synview_resource.html
@@ -260,7 +260,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_synview_resourceCollection.ResourceCollection.html b/doc/module-meteoJS_synview_resourceCollection.ResourceCollection.html
index f2008b35..d0a9e8d1 100644
--- a/doc/module-meteoJS_synview_resourceCollection.ResourceCollection.html
+++ b/doc/module-meteoJS_synview_resourceCollection.ResourceCollection.html
@@ -517,7 +517,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_synview_resourceCollection.html b/doc/module-meteoJS_synview_resourceCollection.html
index 55fd7681..1a9eca84 100644
--- a/doc/module-meteoJS_synview_resourceCollection.html
+++ b/doc/module-meteoJS_synview_resourceCollection.html
@@ -64,7 +64,7 @@ <h3><a href="module-meteoJS_synview_resourceCollection.ResourceCollection.html">
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_synview_resource_GeoJSON.GeoJSON.html b/doc/module-meteoJS_synview_resource_GeoJSON.GeoJSON.html
index 977f39b9..abe7f929 100644
--- a/doc/module-meteoJS_synview_resource_GeoJSON.GeoJSON.html
+++ b/doc/module-meteoJS_synview_resource_GeoJSON.GeoJSON.html
@@ -549,7 +549,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_synview_resource_GeoJSON.html b/doc/module-meteoJS_synview_resource_GeoJSON.html
index 791e61bc..555c31b1 100644
--- a/doc/module-meteoJS_synview_resource_GeoJSON.html
+++ b/doc/module-meteoJS_synview_resource_GeoJSON.html
@@ -64,7 +64,7 @@ <h3><a href="module-meteoJS_synview_resource_GeoJSON.GeoJSON.html">GeoJSON</a></
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_synview_resource_GeoJSONTile.GeoJSONTile.html b/doc/module-meteoJS_synview_resource_GeoJSONTile.GeoJSONTile.html
index 1f94041f..1537d67b 100644
--- a/doc/module-meteoJS_synview_resource_GeoJSONTile.GeoJSONTile.html
+++ b/doc/module-meteoJS_synview_resource_GeoJSONTile.GeoJSONTile.html
@@ -81,7 +81,7 @@ <h3 id="makeOLLayer"><span class="symbol-name">makeOLLayer</span><span class="si
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_synview_resource_GeoJSONTile.html b/doc/module-meteoJS_synview_resource_GeoJSONTile.html
index 46e32a2e..0d080622 100644
--- a/doc/module-meteoJS_synview_resource_GeoJSONTile.html
+++ b/doc/module-meteoJS_synview_resource_GeoJSONTile.html
@@ -64,7 +64,7 @@ <h3><a href="module-meteoJS_synview_resource_GeoJSONTile.GeoJSONTile.html">GeoJS
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_synview_resource_Image.ImageStatic.html b/doc/module-meteoJS_synview_resource_Image.ImageStatic.html
index 201d961d..950e1fc4 100644
--- a/doc/module-meteoJS_synview_resource_Image.ImageStatic.html
+++ b/doc/module-meteoJS_synview_resource_Image.ImageStatic.html
@@ -29,9 +29,9 @@ <h1><small><a href="module-meteoJS_synview_resource_Image.html">meteoJS/<wbr>syn
             <p class="source-link">Source: <a href="synview_resource_Image.js.html#source-line-27">synview/<wbr>resource/<wbr>Image.<wbr>js:27</a></p>
             <div class="symbol-classdesc">
               <p>Object representing an image.</p>
-              <pre><code>import Image from 'meteoJS/synview/resource/Image';
-import { Image } from 'meteoJS/synview/resource/Image';
-import { ImageStatic } from 'meteoJS/synview/resource/Image';</code></pre>
+              <pre><code>import Image from 'meteojs/synview/resource/Image';
+import { Image } from 'meteojs/synview/resource/Image';
+import { ImageStatic } from 'meteojs/synview/resource/Image';</code></pre>
             </div>
             <dl class="dl-compact">
             </dl>
@@ -538,7 +538,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_synview_resource_Image.html b/doc/module-meteoJS_synview_resource_Image.html
index df722ec8..ac47f252 100644
--- a/doc/module-meteoJS_synview_resource_Image.html
+++ b/doc/module-meteoJS_synview_resource_Image.html
@@ -118,7 +118,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_synview_resource_OSM.OSM.html b/doc/module-meteoJS_synview_resource_OSM.OSM.html
index a8f79ff5..e3bcc346 100644
--- a/doc/module-meteoJS_synview_resource_OSM.OSM.html
+++ b/doc/module-meteoJS_synview_resource_OSM.OSM.html
@@ -506,7 +506,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_synview_resource_OSM.html b/doc/module-meteoJS_synview_resource_OSM.html
index 43fa9f7a..a7f589a9 100644
--- a/doc/module-meteoJS_synview_resource_OSM.html
+++ b/doc/module-meteoJS_synview_resource_OSM.html
@@ -64,7 +64,7 @@ <h3><a href="module-meteoJS_synview_resource_OSM.OSM.html">OSM</a></h3>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_synview_resource_Vector.Vector.html b/doc/module-meteoJS_synview_resource_Vector.Vector.html
index ca87c336..05076fca 100644
--- a/doc/module-meteoJS_synview_resource_Vector.Vector.html
+++ b/doc/module-meteoJS_synview_resource_Vector.Vector.html
@@ -547,7 +547,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_synview_resource_Vector.html b/doc/module-meteoJS_synview_resource_Vector.html
index 66884298..b5bf6ed3 100644
--- a/doc/module-meteoJS_synview_resource_Vector.html
+++ b/doc/module-meteoJS_synview_resource_Vector.html
@@ -64,7 +64,7 @@ <h3><a href="module-meteoJS_synview_resource_Vector.Vector.html">Vector</a></h3>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_synview_resource_VectorTile.VectorTile.html b/doc/module-meteoJS_synview_resource_VectorTile.VectorTile.html
index 9ff8c18d..8ba23d43 100644
--- a/doc/module-meteoJS_synview_resource_VectorTile.VectorTile.html
+++ b/doc/module-meteoJS_synview_resource_VectorTile.VectorTile.html
@@ -79,7 +79,7 @@ <h3 id="makeOLLayer"><span class="symbol-name">makeOLLayer</span><span class="si
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_synview_resource_VectorTile.html b/doc/module-meteoJS_synview_resource_VectorTile.html
index 52ae3eef..4977f36f 100644
--- a/doc/module-meteoJS_synview_resource_VectorTile.html
+++ b/doc/module-meteoJS_synview_resource_VectorTile.html
@@ -64,7 +64,7 @@ <h3><a href="module-meteoJS_synview_resource_VectorTile.VectorTile.html">VectorT
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_synview_tooltip.Tooltip.html b/doc/module-meteoJS_synview_tooltip.Tooltip.html
index 319f64bf..d605bb27 100644
--- a/doc/module-meteoJS_synview_tooltip.Tooltip.html
+++ b/doc/module-meteoJS_synview_tooltip.Tooltip.html
@@ -80,7 +80,7 @@ <h3>Parameter</h3>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_synview_tooltip.html b/doc/module-meteoJS_synview_tooltip.html
index b17a570a..d41e87eb 100644
--- a/doc/module-meteoJS_synview_tooltip.html
+++ b/doc/module-meteoJS_synview_tooltip.html
@@ -191,7 +191,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_synview_type.Type.html b/doc/module-meteoJS_synview_type.Type.html
index 6a1485a8..23b2b834 100644
--- a/doc/module-meteoJS_synview_type.Type.html
+++ b/doc/module-meteoJS_synview_type.Type.html
@@ -619,7 +619,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_synview_type.html b/doc/module-meteoJS_synview_type.html
index d7b59307..b86710bd 100644
--- a/doc/module-meteoJS_synview_type.html
+++ b/doc/module-meteoJS_synview_type.html
@@ -340,7 +340,7 @@ <h3 id="event:change:visible"><span class="symbol-name">change:visible</span></h
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_synview_typeCollection.TypeCollection.html b/doc/module-meteoJS_synview_typeCollection.TypeCollection.html
index 5929f395..dec15a72 100644
--- a/doc/module-meteoJS_synview_typeCollection.TypeCollection.html
+++ b/doc/module-meteoJS_synview_typeCollection.TypeCollection.html
@@ -400,7 +400,7 @@ <h3 id="setSyncVisibility"><span class="symbol-name">setSyncVisibility</span><sp
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_synview_typeCollection.html b/doc/module-meteoJS_synview_typeCollection.html
index ca0ebd2f..b741fefc 100644
--- a/doc/module-meteoJS_synview_typeCollection.html
+++ b/doc/module-meteoJS_synview_typeCollection.html
@@ -133,7 +133,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram.ThermodynamicDiagram.html b/doc/module-meteoJS_thermodynamicDiagram.ThermodynamicDiagram.html
index 70ada9c1..54387c90 100644
--- a/doc/module-meteoJS_thermodynamicDiagram.ThermodynamicDiagram.html
+++ b/doc/module-meteoJS_thermodynamicDiagram.ThermodynamicDiagram.html
@@ -29,7 +29,7 @@ <h1><small><a href="module-meteoJS_thermodynamicDiagram.html">meteoJS/<wbr>therm
             <p class="source-link">Source: <a href="ThermodynamicDiagram.js.html#source-line-56">ThermodynamicDiagram.<wbr>js:56</a></p>
             <div class="symbol-classdesc">
               <p>Class to draw a SVG thermodynamic diagram.</p>
-              <pre><code>import ThermodynamicDiagram from 'meteoJS/ThermodynamicDiagram';</code></pre>
+              <pre><code>import ThermodynamicDiagram from 'meteojs/ThermodynamicDiagram';</code></pre>
             </div>
             <dl class="dl-compact">
             </dl>
@@ -664,7 +664,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram.html b/doc/module-meteoJS_thermodynamicDiagram.html
index 328b67af..120c8829 100644
--- a/doc/module-meteoJS_thermodynamicDiagram.html
+++ b/doc/module-meteoJS_thermodynamicDiagram.html
@@ -609,7 +609,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagramPluggable.ThermodynamicDiagramPluggable.html b/doc/module-meteoJS_thermodynamicDiagramPluggable.ThermodynamicDiagramPluggable.html
index cfe0a80a..81232ad4 100644
--- a/doc/module-meteoJS_thermodynamicDiagramPluggable.ThermodynamicDiagramPluggable.html
+++ b/doc/module-meteoJS_thermodynamicDiagramPluggable.ThermodynamicDiagramPluggable.html
@@ -29,7 +29,7 @@ <h1><small><a href="module-meteoJS_thermodynamicDiagramPluggable.html">meteoJS/<
             <p class="source-link">Source: <a href="ThermodynamicDiagramPluggable.js.html#source-line-24">ThermodynamicDiagramPluggable.<wbr>js:24</a></p>
             <div class="symbol-classdesc">
               <p>Class to draw a SVG thermodynamic diagram.</p>
-              <pre><code>import ThermodynamicDiagramPluggable from 'meteoJS/thermodynamicDiagramPluggable';</code></pre>
+              <pre><code>import ThermodynamicDiagramPluggable from 'meteojs/thermodynamicDiagramPluggable';</code></pre>
             </div>
             <dl class="dl-compact">
             </dl>
@@ -632,7 +632,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagramPluggable.html b/doc/module-meteoJS_thermodynamicDiagramPluggable.html
index fe9c8b65..f8609498 100644
--- a/doc/module-meteoJS_thermodynamicDiagramPluggable.html
+++ b/doc/module-meteoJS_thermodynamicDiagramPluggable.html
@@ -146,7 +146,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram_axes_axes_axisLabels.html b/doc/module-meteoJS_thermodynamicDiagram_axes_axes_axisLabels.html
index 3d352347..9e22796b 100644
--- a/doc/module-meteoJS_thermodynamicDiagram_axes_axes_axisLabels.html
+++ b/doc/module-meteoJS_thermodynamicDiagram_axes_axes_axisLabels.html
@@ -44,7 +44,7 @@ <h1><small></small><span class="symbol-name">meteoJS/thermodynamicDiagram/axes/a
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram_axes_xAxis.html b/doc/module-meteoJS_thermodynamicDiagram_axes_xAxis.html
index 0f701688..ec765224 100644
--- a/doc/module-meteoJS_thermodynamicDiagram_axes_xAxis.html
+++ b/doc/module-meteoJS_thermodynamicDiagram_axes_xAxis.html
@@ -64,7 +64,7 @@ <h3><a href="module-meteoJS_thermodynamicDiagram_axes_xAxis.xAxis.html">xAxis</a
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram_axes_xAxis.xAxis.html b/doc/module-meteoJS_thermodynamicDiagram_axes_xAxis.xAxis.html
index 0f91c17e..49358ea5 100644
--- a/doc/module-meteoJS_thermodynamicDiagram_axes_xAxis.xAxis.html
+++ b/doc/module-meteoJS_thermodynamicDiagram_axes_xAxis.xAxis.html
@@ -75,7 +75,7 @@ <h3 id="_drawBackground"><span class="symbol-name">_drawBackground</span><span c
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram_axes_yAxis.html b/doc/module-meteoJS_thermodynamicDiagram_axes_yAxis.html
index b7a24057..3ea8fc22 100644
--- a/doc/module-meteoJS_thermodynamicDiagram_axes_yAxis.html
+++ b/doc/module-meteoJS_thermodynamicDiagram_axes_yAxis.html
@@ -132,7 +132,7 @@ <h4>Properties</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram_axes_yAxis.yAxis.html b/doc/module-meteoJS_thermodynamicDiagram_axes_yAxis.yAxis.html
index 57d902e9..1f38f801 100644
--- a/doc/module-meteoJS_thermodynamicDiagram_axes_yAxis.yAxis.html
+++ b/doc/module-meteoJS_thermodynamicDiagram_axes_yAxis.yAxis.html
@@ -389,7 +389,7 @@ <h3 id="onCoordinateSystemChange"><span class="symbol-name">onCoordinateSystemCh
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram_coordinateSystem.CoordinateSystem.html b/doc/module-meteoJS_thermodynamicDiagram_coordinateSystem.CoordinateSystem.html
index ef7e8d70..57f98858 100644
--- a/doc/module-meteoJS_thermodynamicDiagram_coordinateSystem.CoordinateSystem.html
+++ b/doc/module-meteoJS_thermodynamicDiagram_coordinateSystem.CoordinateSystem.html
@@ -35,7 +35,7 @@ <h1><small><a href="module-meteoJS_thermodynamicDiagram_coordinateSystem.html">m
                 <li>log-P y-axes with horizontal isobars</li>
                 <li>straight isotherms, inclinated to the right</li>
               </ul>
-              <pre><code>import CoordinateSystem from 'meteoJS/thermodynamicDiagram/CoordinateSystem';</code></pre>
+              <pre><code>import CoordinateSystem from 'meteojs/thermodynamicDiagram/CoordinateSystem';</code></pre>
             </div>
             <dl class="dl-compact">
             </dl>
@@ -1374,7 +1374,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram_coordinateSystem.html b/doc/module-meteoJS_thermodynamicDiagram_coordinateSystem.html
index b3f3717d..4a8d9f7d 100644
--- a/doc/module-meteoJS_thermodynamicDiagram_coordinateSystem.html
+++ b/doc/module-meteoJS_thermodynamicDiagram_coordinateSystem.html
@@ -330,7 +330,7 @@ <h3 id="event:change:options"><span class="symbol-name">change:options</span></h
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram_coordinateSystem_emagram.Emagram.html b/doc/module-meteoJS_thermodynamicDiagram_coordinateSystem_emagram.Emagram.html
index e7f7ef07..6f92e360 100644
--- a/doc/module-meteoJS_thermodynamicDiagram_coordinateSystem_emagram.Emagram.html
+++ b/doc/module-meteoJS_thermodynamicDiagram_coordinateSystem_emagram.Emagram.html
@@ -1394,7 +1394,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram_coordinateSystem_emagram.html b/doc/module-meteoJS_thermodynamicDiagram_coordinateSystem_emagram.html
index 05705237..34af42ab 100644
--- a/doc/module-meteoJS_thermodynamicDiagram_coordinateSystem_emagram.html
+++ b/doc/module-meteoJS_thermodynamicDiagram_coordinateSystem_emagram.html
@@ -64,7 +64,7 @@ <h3><a href="module-meteoJS_thermodynamicDiagram_coordinateSystem_emagram.Emagra
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram_coordinateSystem_skewTlogPDiagram.SkewTlogPDiagram.html b/doc/module-meteoJS_thermodynamicDiagram_coordinateSystem_skewTlogPDiagram.SkewTlogPDiagram.html
index 11d5a03b..fba538e6 100644
--- a/doc/module-meteoJS_thermodynamicDiagram_coordinateSystem_skewTlogPDiagram.SkewTlogPDiagram.html
+++ b/doc/module-meteoJS_thermodynamicDiagram_coordinateSystem_skewTlogPDiagram.SkewTlogPDiagram.html
@@ -1391,7 +1391,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram_coordinateSystem_skewTlogPDiagram.html b/doc/module-meteoJS_thermodynamicDiagram_coordinateSystem_skewTlogPDiagram.html
index a0ae0fd9..99a99fb9 100644
--- a/doc/module-meteoJS_thermodynamicDiagram_coordinateSystem_skewTlogPDiagram.html
+++ b/doc/module-meteoJS_thermodynamicDiagram_coordinateSystem_skewTlogPDiagram.html
@@ -64,7 +64,7 @@ <h3><a href="module-meteoJS_thermodynamicDiagram_coordinateSystem_skewTlogPDiagr
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram_coordinateSystem_stueveDiagram.StueveDiagram.html b/doc/module-meteoJS_thermodynamicDiagram_coordinateSystem_stueveDiagram.StueveDiagram.html
index bb2486bc..dd90892e 100644
--- a/doc/module-meteoJS_thermodynamicDiagram_coordinateSystem_stueveDiagram.StueveDiagram.html
+++ b/doc/module-meteoJS_thermodynamicDiagram_coordinateSystem_stueveDiagram.StueveDiagram.html
@@ -1397,7 +1397,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram_coordinateSystem_stueveDiagram.html b/doc/module-meteoJS_thermodynamicDiagram_coordinateSystem_stueveDiagram.html
index bd88acbf..ece68892 100644
--- a/doc/module-meteoJS_thermodynamicDiagram_coordinateSystem_stueveDiagram.html
+++ b/doc/module-meteoJS_thermodynamicDiagram_coordinateSystem_stueveDiagram.html
@@ -64,7 +64,7 @@ <h3><a href="module-meteoJS_thermodynamicDiagram_coordinateSystem_stueveDiagram.
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram_diagramParcel.DiagramParcel.html b/doc/module-meteoJS_thermodynamicDiagram_diagramParcel.DiagramParcel.html
index e08e2001..ef989fd2 100644
--- a/doc/module-meteoJS_thermodynamicDiagram_diagramParcel.DiagramParcel.html
+++ b/doc/module-meteoJS_thermodynamicDiagram_diagramParcel.DiagramParcel.html
@@ -237,7 +237,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram_diagramParcel.html b/doc/module-meteoJS_thermodynamicDiagram_diagramParcel.html
index 869ffad3..9bacee83 100644
--- a/doc/module-meteoJS_thermodynamicDiagram_diagramParcel.html
+++ b/doc/module-meteoJS_thermodynamicDiagram_diagramParcel.html
@@ -263,7 +263,7 @@ <h3 id="event:change:visible"><span class="symbol-name">change:visible</span></h
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram_diagramSounding.DiagramSounding.html b/doc/module-meteoJS_thermodynamicDiagram_diagramSounding.DiagramSounding.html
index 09a2114f..ab576146 100644
--- a/doc/module-meteoJS_thermodynamicDiagram_diagramSounding.DiagramSounding.html
+++ b/doc/module-meteoJS_thermodynamicDiagram_diagramSounding.DiagramSounding.html
@@ -348,7 +348,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram_diagramSounding.html b/doc/module-meteoJS_thermodynamicDiagram_diagramSounding.html
index 3d8a3bd7..e4330aa6 100644
--- a/doc/module-meteoJS_thermodynamicDiagram_diagramSounding.html
+++ b/doc/module-meteoJS_thermodynamicDiagram_diagramSounding.html
@@ -57,6 +57,16 @@ <h2 class="summary-callout-heading">Abstract types</h2>
                     <dt><a href="module-meteoJS_thermodynamicDiagram_diagramSounding.html#~diagramOptions">diagramOptions</a></dt>
                     <dd>
                     </dd>
+                    <dt><a href="module-meteoJS_thermodynamicDiagram_diagramSounding.html#~hodographOptions">hodographOptions</a></dt>
+                    <dd>
+                    </dd>
+                  </dl>
+                </div>
+                <div class="summary-column">
+                  <dl class="dl-summary-callout">
+                    <dt><a href="module-meteoJS_thermodynamicDiagram_diagramSounding.html#~hodographSegmentOptions">hodographSegmentOptions</a></dt>
+                    <dd>
+                    </dd>
                     <dt><a href="module-meteoJS_thermodynamicDiagram_diagramSounding.html#~options">options</a></dt>
                     <dd>
                     </dd>
@@ -72,8 +82,6 @@ <h2 class="summary-callout-heading">Abstract types</h2>
                     </dd>
                   </dl>
                 </div>
-                <div class="summary-column">
-                </div>
               </div>
             </div>
             <div class="summary-callout">
@@ -184,6 +192,118 @@ <h4>Parameters</h4>
               <dl class="dl-compact">
               </dl>
               <div class="symbol-detail-labels"><span class="label label-inner">inner</span></div>
+              <h3 id="~hodographOptions"><span class="symbol-name">hodographOptions</span><small class="property-type">
+                  &nbsp;<a href="module-meteoJS_thermodynamicDiagram.html#~lineOptions">module:meteoJS/thermodynamicDiagram~lineOptions</a></small></h3>
+              <p>Options for a sounding in the hodograph.</p>
+              <section>
+                <h4>Properties</h4>
+                <table class="jsdoc-details-table">
+                  <thead>
+                    <tr>
+                      <th>Name</th>
+                      <th>Type</th>
+                      <th>Optional</th>
+                      <th>Description</th>
+                    </tr>
+                  </thead>
+                  <tbody>
+                    <tr>
+                      <td>
+                        <p>minPressure</p>
+                      </td>
+                      <td>
+                        <p>(number or undefined)</p>
+                      </td>
+                      <td>
+                        <p>Yes</p>
+                      </td>
+                      <td>
+                        <p>Minimum pressure level to plot in the hodograph. Unit: hPa.</p>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td>
+                        <p>maxPressure</p>
+                      </td>
+                      <td>
+                        <p>(number or undefined)</p>
+                      </td>
+                      <td>
+                        <p>Yes</p>
+                      </td>
+                      <td>
+                        <p>Maximum pressure level to plot in the hodograph. Unit: hPa.</p>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td>
+                        <p>segments</p>
+                      </td>
+                      <td>
+                        <p>Array of <a href="module-meteoJS_thermodynamicDiagram_diagramSounding.html#~hodographSegmentOptions">module:meteoJS/thermodynamicDiagram/diagramSounding~hodographSegmentOptions</a></p>
+                      </td>
+                      <td>
+                        <p>Yes</p>
+                      </td>
+                      <td>
+                        <p>Array of segment definitions.</p>
+                      </td>
+                    </tr>
+                  </tbody>
+                </table>
+              </section>
+              <dl class="dl-compact">
+              </dl>
+              <div class="symbol-detail-labels"><span class="label label-inner">inner</span></div>
+              <h3 id="~hodographSegmentOptions"><span class="symbol-name">hodographSegmentOptions</span><small class="property-type">
+                  &nbsp;<a href="module-meteoJS_thermodynamicDiagram.html#~lineOptions">module:meteoJS/thermodynamicDiagram~lineOptions</a></small></h3>
+              <p>Options for a line-segment of a sounding in the hodograph.</p>
+              <section>
+                <h4>Properties</h4>
+                <table class="jsdoc-details-table">
+                  <thead>
+                    <tr>
+                      <th>Name</th>
+                      <th>Type</th>
+                      <th>Optional</th>
+                      <th>Description</th>
+                    </tr>
+                  </thead>
+                  <tbody>
+                    <tr>
+                      <td>
+                        <p>minPressure</p>
+                      </td>
+                      <td>
+                        <p>(number or undefined)</p>
+                      </td>
+                      <td>
+                        <p>Yes</p>
+                      </td>
+                      <td>
+                        <p>Minimum pressure level of the segment. Unit: hPa.</p>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td>
+                        <p>maxPressure</p>
+                      </td>
+                      <td>
+                        <p>(number or undefined)</p>
+                      </td>
+                      <td>
+                        <p>Yes</p>
+                      </td>
+                      <td>
+                        <p>Maximum pressure level of the segment. Unit: hPa.</p>
+                      </td>
+                    </tr>
+                  </tbody>
+                </table>
+              </section>
+              <dl class="dl-compact">
+              </dl>
+              <div class="symbol-detail-labels"><span class="label label-inner">inner</span></div>
               <h3 id="~options"><span class="symbol-name">options</span><small class="property-type">
                   &nbsp;Object</small></h3>
               <p>Definition of the options for the constructor.</p>
@@ -413,7 +533,7 @@ <h3 id="event:change:visible"><span class="symbol-name">change:visible</span></h
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram_functions.html b/doc/module-meteoJS_thermodynamicDiagram_functions.html
index e8976aec..5c4bd97a 100644
--- a/doc/module-meteoJS_thermodynamicDiagram_functions.html
+++ b/doc/module-meteoJS_thermodynamicDiagram_functions.html
@@ -637,7 +637,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html b/doc/module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html
index d1a28f53..9b0b1f7e 100644
--- a/doc/module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html
+++ b/doc/module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html
@@ -26,7 +26,7 @@
           <header class="page-header">
             <div class="symbol-detail-labels"><span class="label label-kind">class</span>&nbsp;<span class="label label-static">static</span></div>
             <h1><small><a href="module-meteoJS_thermodynamicDiagram_hodograph.html">meteoJS/<wbr>thermodynamicDiagram/<wbr>hodograph</a>.<wbr></small><span class="symbol-name">Hodograph</span></h1>
-            <p class="source-link">Source: <a href="thermodynamicDiagram_Hodograph.js.html#source-line-69">thermodynamicDiagram/<wbr>Hodograph.<wbr>js:69</a></p>
+            <p class="source-link">Source: <a href="thermodynamicDiagram_Hodograph.js.html#source-line-129">thermodynamicDiagram/<wbr>Hodograph.<wbr>js:129</a></p>
             <div class="symbol-classdesc">
               <p>Class to draw the hodograph.</p>
               <pre><code>import Hodograph from 'meteojs/thermodynamicDiagram/Hodograph';</code></pre>
@@ -40,6 +40,9 @@ <h2 class="summary-callout-heading">Properties</h2>
               <div class="summary-content">
                 <div class="summary-column">
                   <dl class="dl-summary-callout">
+                    <dt><a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#center">center</a></dt>
+                    <dd>
+                    </dd>
                     <dt><a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#coordinateSystem">coordinateSystem</a></dt>
                     <dd>
                     </dd>
@@ -65,19 +68,25 @@ <h2 class="summary-callout-heading">Properties</h2>
                     <dt><a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#minExtentLength">minExtentLength</a></dt>
                     <dd>
                     </dd>
-                    <dt><a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#style">style</a></dt>
+                    <dt><a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#origin">origin</a></dt>
                     <dd>
                     </dd>
-                    <dt><a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#svgNode">svgNode</a></dt>
+                    <dt><a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#pixelPerSpeed">pixelPerSpeed</a></dt>
                     <dd>
                     </dd>
-                    <dt><a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#visible">visible</a></dt>
+                    <dt><a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#style">style</a></dt>
+                    <dd>
+                    </dd>
+                    <dt><a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#svgNode">svgNode</a></dt>
                     <dd>
                     </dd>
                   </dl>
                 </div>
                 <div class="summary-column">
                   <dl class="dl-summary-callout">
+                    <dt><a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#visible">visible</a></dt>
+                    <dd>
+                    </dd>
                     <dt><a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#width">width</a></dt>
                     <dd>
                     </dd>
@@ -99,6 +108,9 @@ <h2 class="summary-callout-heading">Methods</h2>
                     <dt><a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#_drawBackground">_drawBackground()</a></dt>
                     <dd>
                     </dd>
+                    <dt><a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#_initHoverLabels">_initHoverLabels(options)</a></dt>
+                    <dd>
+                    </dd>
                     <dt><a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#addSounding">addSounding(sounding)</a></dt>
                     <dd>
                     </dd>
@@ -124,13 +136,13 @@ <h2 class="summary-callout-heading">Methods</h2>
                     <dt><a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#init">init()</a></dt>
                     <dd>
                     </dd>
+                    <dt><a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#onChangeSoundingVisibility">onChangeSoundingVisibility(sounding, group)</a></dt>
+                    <dd>
+                    </dd>
                   </dl>
                 </div>
                 <div class="summary-column">
                   <dl class="dl-summary-callout">
-                    <dt><a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#onChangeSoundingVisibility">onChangeSoundingVisibility(sounding, group)</a></dt>
-                    <dd>
-                    </dd>
                     <dt><a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html#onCoordinateSystemChange">onCoordinateSystemChange()</a></dt>
                     <dd>
                     </dd>
@@ -184,6 +196,12 @@ <h3>Parameter</h3>
           <section>
             <h2>Properties</h2>
             <section>
+              <div class="symbol-detail-labels"><span class="label label-public">public</span>&nbsp;<span class="label label-readonly">read-only</span></div>
+              <h3 id="center"><span class="symbol-name">center</span><small class="property-type">
+                  &nbsp;Array of number</small></h3>
+              <p>The origin of the hodograph in pixel coordinates.</p>
+              <dl class="dl-compact">
+              </dl>
               <div class="symbol-detail-labels"><span class="label label-public">public</span></div>
               <h3 id="coordinateSystem"><span class="symbol-name">coordinateSystem</span><small class="property-type">
                   &nbsp;unknown</small></h3>
@@ -240,6 +258,23 @@ <h3 id="minExtentLength"><span class="symbol-name">minExtentLength</span><small
                 <dd><a href="module-meteoJS_thermodynamicDiagram_plotArea.PlotArea.html#minExtentLength">module:meteoJS/thermodynamicDiagram/plotArea.PlotArea#minExtentLength</a></dd>
               </dl>
               <div class="symbol-detail-labels"><span class="label label-public">public</span></div>
+              <h3 id="origin"><span class="symbol-name">origin</span><small class="property-type">
+                  &nbsp;(Array of number or undefined)</small></h3>
+              <p>Origin of the hodograph relative to the plot area. If not undefined, it
+                has to be a 2-element array. The first element moves the origin in
+                x direction, the second in y direction. The values are interpreted as
+                relative length (relating to the half width resp. height). Positive values
+                to move in North-East direction. E.g. to move the origin the half way to
+                the upper right corner, use [0.5, 0.5].</p>
+              <dl class="dl-compact">
+              </dl>
+              <div class="symbol-detail-labels"><span class="label label-public">public</span>&nbsp;<span class="label label-readonly">read-only</span></div>
+              <h3 id="pixelPerSpeed"><span class="symbol-name">pixelPerSpeed</span><small class="property-type">
+                  &nbsp;number</small></h3>
+              <p>Returns the pixel per speed unit. Mainly for internal usage.</p>
+              <dl class="dl-compact">
+              </dl>
+              <div class="symbol-detail-labels"><span class="label label-public">public</span></div>
               <h3 id="style"><span class="symbol-name">style</span><small class="property-type">
                   &nbsp;unknown</small></h3>
               <p>Overflow-style of the area.</p>
@@ -294,6 +329,39 @@ <h3 id="_drawBackground"><span class="symbol-name">_drawBackground</span><span c
               <p>Plots hodograph background.</p>
               <dl class="dl-compact">
               </dl>
+              <h3 id="_initHoverLabels"><span class="symbol-name">_initHoverLabels</span><span class="signature"><span class="signature-params">(options)</span></span></h3>
+              <p>Initialize hover labels options.</p>
+              <section>
+                <h4>Parameter</h4>
+                <table class="jsdoc-details-table">
+                  <thead>
+                    <tr>
+                      <th>Name</th>
+                      <th>Type</th>
+                      <th>Optional</th>
+                      <th>Description</th>
+                    </tr>
+                  </thead>
+                  <tbody>
+                    <tr>
+                      <td>
+                        <p>options</p>
+                      </td>
+                      <td>
+                        <p><a href="module-meteoJS_thermodynamicDiagram_hodograph.html#~hoverLabelsOptions">module:meteoJS/thermodynamicDiagram/hodograph~hoverLabelsOptions</a></p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>Hover labels options.</p>
+                      </td>
+                    </tr>
+                  </tbody>
+                </table>
+              </section>
+              <dl class="dl-compact">
+              </dl>
               <h3 id="addSounding"><span class="symbol-name">addSounding</span><span class="signature"><span class="signature-params">(sounding)</span></span></h3>
               <p>Adds a sounding to draw into the area.</p>
               <section>
@@ -667,7 +735,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram_hodograph.html b/doc/module-meteoJS_thermodynamicDiagram_hodograph.html
index 8cae9589..f4f18200 100644
--- a/doc/module-meteoJS_thermodynamicDiagram_hodograph.html
+++ b/doc/module-meteoJS_thermodynamicDiagram_hodograph.html
@@ -54,6 +54,9 @@ <h2 class="summary-callout-heading">Abstract types</h2>
               <div class="summary-content">
                 <div class="summary-column">
                   <dl class="dl-summary-callout">
+                    <dt><a href="module-meteoJS_thermodynamicDiagram_hodograph.html#~backdropOptions">backdropOptions</a></dt>
+                    <dd>
+                    </dd>
                     <dt><a href="module-meteoJS_thermodynamicDiagram_hodograph.html#~gridCirclesOptions">gridCirclesOptions</a></dt>
                     <dd>
                     </dd>
@@ -64,10 +67,16 @@ <h2 class="summary-callout-heading">Abstract types</h2>
                     <dt><a href="module-meteoJS_thermodynamicDiagram_hodograph.html#~gridLabelsOptions">gridLabelsOptions</a></dt>
                     <dd>
                     </dd>
+                    <dt><a href="module-meteoJS_thermodynamicDiagram_hodograph.html#~hoverLabelsOptions">hoverLabelsOptions</a></dt>
+                    <dd>
+                    </dd>
                   </dl>
                 </div>
                 <div class="summary-column">
                   <dl class="dl-summary-callout">
+                    <dt><a href="module-meteoJS_thermodynamicDiagram_hodograph.html#~labelsOptions">labelsOptions</a></dt>
+                    <dd>
+                    </dd>
                     <dt><a href="module-meteoJS_thermodynamicDiagram_hodograph.html#~options">options</a></dt>
                     <dd>
                     </dd>
@@ -83,6 +92,57 @@ <h3><a href="module-meteoJS_thermodynamicDiagram_hodograph.Hodograph.html">Hodog
             </section>
             <h2>Abstract types</h2>
             <section>
+              <div class="symbol-detail-labels"><span class="label label-inner">inner</span></div>
+              <h3 id="~backdropOptions"><span class="symbol-name">backdropOptions</span><small class="property-type">
+                  &nbsp;Object</small></h3>
+              <p>Options for a text backdrop.</p>
+              <section>
+                <h4>Properties</h4>
+                <table class="jsdoc-details-table">
+                  <thead>
+                    <tr>
+                      <th>Name</th>
+                      <th>Type</th>
+                      <th>Optional</th>
+                      <th>Description</th>
+                    </tr>
+                  </thead>
+                  <tbody>
+                    <tr>
+                      <td>
+                        <p>visible</p>
+                      </td>
+                      <td>
+                        <p>boolean</p>
+                      </td>
+                      <td>
+                        <p>Yes</p>
+                      </td>
+                      <td>
+                        <p>Visibility.</p>
+                        <p>Defaults to <code>true</code>.</p>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td>
+                        <p>color</p>
+                      </td>
+                      <td>
+                        <p>mixed</p>
+                      </td>
+                      <td>
+                        <p>Yes</p>
+                      </td>
+                      <td>
+                        <p>Color.</p>
+                        <p>Defaults to <code>'white'</code>.</p>
+                      </td>
+                    </tr>
+                  </tbody>
+                </table>
+              </section>
+              <dl class="dl-compact">
+              </dl>
               <div class="symbol-detail-labels"><span class="label label-inner">inner</span></div>
               <h3 id="~gridCirclesOptions"><span class="symbol-name">gridCirclesOptions</span><small class="property-type">
                   &nbsp;<a href="module-meteoJS_thermodynamicDiagram.html#~lineStyleOptions">module:meteoJS/thermodynamicDiagram~lineStyleOptions</a></small></h3>
@@ -125,7 +185,7 @@ <h3 id="~gridLabelsOptions"><span class="symbol-name">gridLabelsOptions</span><s
                   &nbsp;<a href="module-meteoJS_thermodynamicDiagram.html#~textOptions">module:meteoJS/thermodynamicDiagram~textOptions</a></small></h3>
               <p>Options for the grid labels.</p>
               <section>
-                <h4>Parameter</h4>
+                <h4>Properties</h4>
                 <table class="jsdoc-details-table">
                   <thead>
                     <tr>
@@ -147,11 +207,374 @@ <h4>Parameter</h4>
                         <p>Yes</p>
                       </td>
                       <td>
-                        <p>Angle of the labels startin from the origin
+                        <p>Angle of the labels starting from the origin
                           (in degrees, 0 relates to North).</p>
                         <p>Defaults to <code>45</code>.</p>
                       </td>
                     </tr>
+                    <tr>
+                      <td>
+                        <p>unit</p>
+                      </td>
+                      <td>
+                        <p>string</p>
+                      </td>
+                      <td>
+                        <p>Yes</p>
+                      </td>
+                      <td>
+                        <p>Unit of the label values. Allowed values: 'm/s', 'kn', 'km/h'</p>
+                        <p>Defaults to <code>'km/h'</code>.</p>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td>
+                        <p>prefix</p>
+                      </td>
+                      <td>
+                        <p>string</p>
+                      </td>
+                      <td>
+                        <p>Yes</p>
+                      </td>
+                      <td>
+                        <p>Prefix of the label text.</p>
+                        <p>Defaults to <code>''</code>.</p>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td>
+                        <p>decimalPlaces</p>
+                      </td>
+                      <td>
+                        <p>integer</p>
+                      </td>
+                      <td>
+                        <p>Yes</p>
+                      </td>
+                      <td>
+                        <p>Number of digits to appear after
+                          the decimal point of the label values.</p>
+                        <p>Defaults to <code>0</code>.</p>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td>
+                        <p>backdrop</p>
+                      </td>
+                      <td>
+                        <p><a href="module-meteoJS_thermodynamicDiagram_hodograph.html#~backdropOptions">module:meteoJS/thermodynamicDiagram/hodograph~backdropOptions</a></p>
+                      </td>
+                      <td>
+                        <p>Yes</p>
+                      </td>
+                      <td>
+                        <p>Options for the backdrop of the grid labels.</p>
+                      </td>
+                    </tr>
+                  </tbody>
+                </table>
+              </section>
+              <dl class="dl-compact">
+              </dl>
+              <div class="symbol-detail-labels"><span class="label label-inner">inner</span></div>
+              <h3 id="~hoverLabelsOptions"><span class="symbol-name">hoverLabelsOptions</span><small class="property-type">
+                  &nbsp;<a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~hoverLabelsOptions">module:meteoJS/thermodynamicDiagram/plotDataArea~hoverLabelsOptions</a></small></h3>
+              <p>Options for the hover labels.</p>
+              <section>
+                <h4>Properties</h4>
+                <table class="jsdoc-details-table">
+                  <thead>
+                    <tr>
+                      <th>Name</th>
+                      <th>Type</th>
+                      <th>Optional</th>
+                      <th>Description</th>
+                    </tr>
+                  </thead>
+                  <tbody>
+                    <tr>
+                      <td>
+                        <p>maxDistance</p>
+                      </td>
+                      <td>
+                        <p>number</p>
+                      </td>
+                      <td>
+                        <p>Yes</p>
+                      </td>
+                      <td>
+                        <p>Maximum distance to a data point to show a hover label in pixels.
+                          If undefined, always a hover label to the nearest point is shown.</p>
+                        <p>Defaults to <code>20</code>.</p>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td>
+                        <p>hodograph</p>
+                      </td>
+                      <td>
+                        <p><a href="module-meteoJS_thermodynamicDiagram_hodograph.html#~labelsOptions">module:meteoJS/thermodynamicDiagram/hodograph~labelsOptions</a></p>
+                      </td>
+                      <td>
+                        <p>Yes</p>
+                      </td>
+                      <td>
+                        <p>Options for hodograph label.</p>
+                      </td>
+                    </tr>
+                  </tbody>
+                </table>
+              </section>
+              <dl class="dl-compact">
+              </dl>
+              <div class="symbol-detail-labels"><span class="label label-inner">inner</span></div>
+              <h3 id="~labelsOptions"><span class="symbol-name">labelsOptions</span><small class="property-type">
+                  &nbsp;<a href="module-meteoJS_thermodynamicDiagram_tdDiagram.html#~labelsOptions">module:meteoJS/thermodynamicDiagram/tdDiagram~labelsOptions</a></small></h3>
+              <p>Options for the hover labels in the hodograph.</p>
+              <section>
+                <h4>Properties</h4>
+                <table class="jsdoc-details-table">
+                  <thead>
+                    <tr>
+                      <th>Name</th>
+                      <th>Type</th>
+                      <th>Optional</th>
+                      <th>Description</th>
+                    </tr>
+                  </thead>
+                  <tbody>
+                    <tr>
+                      <td>
+                        <p>pressure</p>
+                      </td>
+                      <td>
+                        <p>Object</p>
+                      </td>
+                      <td>
+                        <p>Yes</p>
+                      </td>
+                      <td>
+                        <p>Options for the output of the pressure value.</p>
+                        <p>Values in <code>pressure</code> have the following properties:</p>
+                        <table class="jsdoc-details-table">
+                          <thead>
+                            <tr>
+                              <th>Name</th>
+                              <th>Type</th>
+                              <th>Optional</th>
+                              <th>Description</th>
+                            </tr>
+                          </thead>
+                          <tbody>
+                            <tr>
+                              <td>
+                                <p>visible</p>
+                              </td>
+                              <td>
+                                <p>boolean</p>
+                              </td>
+                              <td>
+                                <p>Yes</p>
+                              </td>
+                              <td>
+                                <p>Visibility.</p>
+                                <p>Defaults to <code>true</code>.</p>
+                              </td>
+                            </tr>
+                            <tr>
+                              <td>
+                                <p>decimalPlaces</p>
+                              </td>
+                              <td>
+                                <p>integer</p>
+                              </td>
+                              <td>
+                                <p>Yes</p>
+                              </td>
+                              <td>
+                                <p>Number of digits to appear after the decimal point.</p>
+                                <p>Defaults to <code>0</code>.</p>
+                              </td>
+                            </tr>
+                            <tr>
+                              <td>
+                                <p>prefix</p>
+                              </td>
+                              <td>
+                                <p>string</p>
+                              </td>
+                              <td>
+                                <p>Yes</p>
+                              </td>
+                              <td>
+                                <p>Prefix of the value text.</p>
+                                <p>Defaults to <code>' hPa'</code>.</p>
+                              </td>
+                            </tr>
+                          </tbody>
+                        </table>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td>
+                        <p>windspeed</p>
+                      </td>
+                      <td>
+                        <p>Object</p>
+                      </td>
+                      <td>
+                        <p>Yes</p>
+                      </td>
+                      <td>
+                        <p>Options for the output of the windspeed value.</p>
+                        <p>Values in <code>windspeed</code> have the following properties:</p>
+                        <table class="jsdoc-details-table">
+                          <thead>
+                            <tr>
+                              <th>Name</th>
+                              <th>Type</th>
+                              <th>Optional</th>
+                              <th>Description</th>
+                            </tr>
+                          </thead>
+                          <tbody>
+                            <tr>
+                              <td>
+                                <p>visible</p>
+                              </td>
+                              <td>
+                                <p>boolean</p>
+                              </td>
+                              <td>
+                                <p>Yes</p>
+                              </td>
+                              <td>
+                                <p>Visibility.</p>
+                                <p>Defaults to <code>true</code>.</p>
+                              </td>
+                            </tr>
+                            <tr>
+                              <td>
+                                <p>unit</p>
+                              </td>
+                              <td>
+                                <p>string</p>
+                              </td>
+                              <td>
+                                <p>Yes</p>
+                              </td>
+                              <td>
+                                <p>Unit of the value text. Allowed values: 'm/s', 'kn', 'km/h'</p>
+                                <p>Defaults to <code>'km/h'</code>.</p>
+                              </td>
+                            </tr>
+                            <tr>
+                              <td>
+                                <p>decimalPlaces</p>
+                              </td>
+                              <td>
+                                <p>integer</p>
+                              </td>
+                              <td>
+                                <p>Yes</p>
+                              </td>
+                              <td>
+                                <p>Number of digits to appear after the decimal point.</p>
+                                <p>Defaults to <code>0</code>.</p>
+                              </td>
+                            </tr>
+                            <tr>
+                              <td>
+                                <p>prefix</p>
+                              </td>
+                              <td>
+                                <p>string</p>
+                              </td>
+                              <td>
+                                <p>Yes</p>
+                              </td>
+                              <td>
+                                <p>Prefix of the value text.</p>
+                                <p>Defaults to <code>' kn'</code>.</p>
+                              </td>
+                            </tr>
+                          </tbody>
+                        </table>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td>
+                        <p>winddir</p>
+                      </td>
+                      <td>
+                        <p>Object</p>
+                      </td>
+                      <td>
+                        <p>Yes</p>
+                      </td>
+                      <td>
+                        <p>Options for the output of the winddir value.</p>
+                        <p>Values in <code>winddir</code> have the following properties:</p>
+                        <table class="jsdoc-details-table">
+                          <thead>
+                            <tr>
+                              <th>Name</th>
+                              <th>Type</th>
+                              <th>Optional</th>
+                              <th>Description</th>
+                            </tr>
+                          </thead>
+                          <tbody>
+                            <tr>
+                              <td>
+                                <p>visible</p>
+                              </td>
+                              <td>
+                                <p>boolean</p>
+                              </td>
+                              <td>
+                                <p>Yes</p>
+                              </td>
+                              <td>
+                                <p>Visibility.</p>
+                                <p>Defaults to <code>true</code>.</p>
+                              </td>
+                            </tr>
+                            <tr>
+                              <td>
+                                <p>decimalPlaces</p>
+                              </td>
+                              <td>
+                                <p>integer</p>
+                              </td>
+                              <td>
+                                <p>Yes</p>
+                              </td>
+                              <td>
+                                <p>Number of digits to appear after the decimal point.</p>
+                                <p>Defaults to <code>0</code>.</p>
+                              </td>
+                            </tr>
+                            <tr>
+                              <td>
+                                <p>prefix</p>
+                              </td>
+                              <td>
+                                <p>string</p>
+                              </td>
+                              <td>
+                                <p>Yes</p>
+                              </td>
+                              <td>
+                                <p>Prefix of the value text.</p>
+                                <p>Defaults to <code>'°'</code>.</p>
+                              </td>
+                            </tr>
+                          </tbody>
+                        </table>
+                      </td>
+                    </tr>
                   </tbody>
                 </table>
               </section>
@@ -250,7 +673,7 @@ <h4>Parameters</h4>
                               </td>
                               <td>
                                 <p>Maximum value for the grid axes and circles. If undefined, determined from
-                                  'minWindspeedRange'.</p>
+                                  'windspeedMax'.</p>
                               </td>
                             </tr>
                           </tbody>
@@ -290,8 +713,22 @@ <h4>Parameters</h4>
                           move, use an array with 2 elements. The first element moves the origin in
                           x direction, the second in y direction. The values are interpreted as
                           relative length (relating to the half width resp. height). Positive values
-                          to move in South-West direction. E.g. to move the origin the half way to
-                          South-West, use [0.5, 0.5].</p>
+                          to move in North-East direction. E.g. to move the origin the half way to
+                          the upper right corner, use [0.5, 0.5].</p>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td>
+                        <p>hoverLabels</p>
+                      </td>
+                      <td>
+                        <p><a href="module-meteoJS_thermodynamicDiagram_hodograph.html#~hoverLabelsOptions">module:meteoJS/thermodynamicDiagram/hodograph~hoverLabelsOptions</a></p>
+                      </td>
+                      <td>
+                        <p>Yes</p>
+                      </td>
+                      <td>
+                        <p>Hover labels options.</p>
                       </td>
                     </tr>
                   </tbody>
@@ -309,7 +746,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram_plotAltitudeDataArea.PlotAltitudeDataArea.html b/doc/module-meteoJS_thermodynamicDiagram_plotAltitudeDataArea.PlotAltitudeDataArea.html
index 7c559c32..24b8eda6 100644
--- a/doc/module-meteoJS_thermodynamicDiagram_plotAltitudeDataArea.PlotAltitudeDataArea.html
+++ b/doc/module-meteoJS_thermodynamicDiagram_plotAltitudeDataArea.PlotAltitudeDataArea.html
@@ -26,7 +26,7 @@
           <header class="page-header">
             <div class="symbol-detail-labels"><span class="label label-kind">class</span>&nbsp;<span class="label label-static">static</span></div>
             <h1><small><a href="module-meteoJS_thermodynamicDiagram_plotAltitudeDataArea.html">meteoJS/<wbr>thermodynamicDiagram/<wbr>plotAltitudeDataArea</a>.<wbr></small><span class="symbol-name">PlotAltitudeDataArea</span></h1>
-            <p class="source-link">Source: <a href="thermodynamicDiagram_PlotAltitudeDataArea.js.html#source-line-50">thermodynamicDiagram/<wbr>PlotAltitudeDataArea.<wbr>js:50</a></p>
+            <p class="source-link">Source: <a href="thermodynamicDiagram_PlotAltitudeDataArea.js.html#source-line-33">thermodynamicDiagram/<wbr>PlotAltitudeDataArea.<wbr>js:33</a></p>
             <div class="symbol-classdesc">
               <p>Abstract class to define an area on the SVG with sounding data, plotted with
                 pressure on the y-axis.</p>
@@ -119,7 +119,7 @@ <h2 class="summary-callout-heading">Methods</h2>
                 </div>
                 <div class="summary-column">
                   <dl class="dl-summary-callout">
-                    <dt><a href="module-meteoJS_thermodynamicDiagram_plotAltitudeDataArea.PlotAltitudeDataArea.html#drawSounding">drawSounding()</a></dt>
+                    <dt><a href="module-meteoJS_thermodynamicDiagram_plotAltitudeDataArea.PlotAltitudeDataArea.html#drawSounding">drawSounding(sounding, group)</a></dt>
                     <dd>
                     </dd>
                     <dt><a href="module-meteoJS_thermodynamicDiagram_plotAltitudeDataArea.PlotAltitudeDataArea.html#drawSoundings">drawSoundings()</a></dt>
@@ -131,7 +131,7 @@ <h2 class="summary-callout-heading">Methods</h2>
                     <dt><a href="module-meteoJS_thermodynamicDiagram_plotAltitudeDataArea.PlotAltitudeDataArea.html#init">init()</a></dt>
                     <dd>
                     </dd>
-                    <dt><a href="module-meteoJS_thermodynamicDiagram_plotAltitudeDataArea.PlotAltitudeDataArea.html#onChangeSoundingVisibility">onChangeSoundingVisibility()</a></dt>
+                    <dt><a href="module-meteoJS_thermodynamicDiagram_plotAltitudeDataArea.PlotAltitudeDataArea.html#onChangeSoundingVisibility">onChangeSoundingVisibility(sounding, group)</a></dt>
                     <dd>
                     </dd>
                   </dl>
@@ -481,9 +481,55 @@ <h4>Parameter</h4>
                 <dt>Inherited from</dt>
                 <dd><a href="module-meteoJS_thermodynamicDiagram_plotArea.PlotArea.html#drawBackground">module:meteoJS/thermodynamicDiagram/plotArea.PlotArea#drawBackground</a></dd>
               </dl>
-              <h3 id="drawSounding"><span class="symbol-name">drawSounding</span><span class="signature"><span class="signature-params">()</span></span></h3>
+              <div class="symbol-detail-labels"><span class="label label-protected">protected</span></div>
+              <h3 id="drawSounding"><span class="symbol-name">drawSounding</span><span class="signature"><span class="signature-params">(sounding, group)</span></span></h3>
               <p>Draw the sounding into the SVG group.</p>
+              <section>
+                <h4>Parameters</h4>
+                <table class="jsdoc-details-table">
+                  <thead>
+                    <tr>
+                      <th>Name</th>
+                      <th>Type</th>
+                      <th>Optional</th>
+                      <th>Description</th>
+                    </tr>
+                  </thead>
+                  <tbody>
+                    <tr>
+                      <td>
+                        <p>sounding</p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>Sounding object.</p>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td>
+                        <p>group</p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>SVG group, SVG.G.</p>
+                      </td>
+                    </tr>
+                  </tbody>
+                </table>
+              </section>
               <dl class="dl-compact">
+                <dt>Inherited from</dt>
+                <dd><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.PlotDataArea.html#drawSounding">module:meteoJS/thermodynamicDiagram/plotDataArea.PlotDataArea#drawSounding</a></dd>
               </dl>
               <div class="symbol-detail-labels"><span class="label label-protected">protected</span></div>
               <h3 id="drawSoundings"><span class="symbol-name">drawSoundings</span><span class="signature"><span class="signature-params">()</span></span></h3>
@@ -503,9 +549,55 @@ <h3 id="init"><span class="symbol-name">init</span><span class="signature"><span
                 <dt>Inherited from</dt>
                 <dd><a href="module-meteoJS_thermodynamicDiagram_plotArea.PlotArea.html#init">module:meteoJS/thermodynamicDiagram/plotArea.PlotArea#init</a></dd>
               </dl>
-              <h3 id="onChangeSoundingVisibility"><span class="symbol-name">onChangeSoundingVisibility</span><span class="signature"><span class="signature-params">()</span></span></h3>
+              <div class="symbol-detail-labels"><span class="label label-protected">protected</span></div>
+              <h3 id="onChangeSoundingVisibility"><span class="symbol-name">onChangeSoundingVisibility</span><span class="signature"><span class="signature-params">(sounding, group)</span></span></h3>
               <p>Called, when a sounding changes its visibilty.</p>
+              <section>
+                <h4>Parameters</h4>
+                <table class="jsdoc-details-table">
+                  <thead>
+                    <tr>
+                      <th>Name</th>
+                      <th>Type</th>
+                      <th>Optional</th>
+                      <th>Description</th>
+                    </tr>
+                  </thead>
+                  <tbody>
+                    <tr>
+                      <td>
+                        <p>sounding</p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>Sounding object.</p>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td>
+                        <p>group</p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>SVG group, SVG.G.</p>
+                      </td>
+                    </tr>
+                  </tbody>
+                </table>
+              </section>
               <dl class="dl-compact">
+                <dt>Inherited from</dt>
+                <dd><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.PlotDataArea.html#onChangeSoundingVisibility">module:meteoJS/thermodynamicDiagram/plotDataArea.PlotDataArea#onChangeSoundingVisibility</a></dd>
               </dl>
               <h3 id="onCoordinateSystemChange"><span class="symbol-name">onCoordinateSystemChange</span><span class="signature"><span class="signature-params">()</span></span></h3>
               <p>Called, when the coordinateSystem object changes.</p>
@@ -609,7 +701,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram_plotAltitudeDataArea.html b/doc/module-meteoJS_thermodynamicDiagram_plotAltitudeDataArea.html
index 7d7f62ad..78cb618d 100644
--- a/doc/module-meteoJS_thermodynamicDiagram_plotAltitudeDataArea.html
+++ b/doc/module-meteoJS_thermodynamicDiagram_plotAltitudeDataArea.html
@@ -61,17 +61,12 @@ <h2 class="summary-callout-heading">Abstract types</h2>
                 </div>
                 <div class="summary-column">
                   <dl class="dl-summary-callout">
-                    <dt><a href="module-meteoJS_thermodynamicDiagram_plotAltitudeDataArea.html#~insertLabelsFunc">insertLabelsFunc(sounding, levelData, group)</a></dt>
+                    <dt><a href="module-meteoJS_thermodynamicDiagram_plotAltitudeDataArea.html#~options">options</a></dt>
                     <dd>
                     </dd>
                   </dl>
                 </div>
                 <div class="summary-column">
-                  <dl class="dl-summary-callout">
-                    <dt><a href="module-meteoJS_thermodynamicDiagram_plotAltitudeDataArea.html#~options">options</a></dt>
-                    <dd>
-                    </dd>
-                  </dl>
                 </div>
               </div>
             </div>
@@ -85,10 +80,10 @@ <h2>Abstract types</h2>
             <section>
               <div class="symbol-detail-labels"><span class="label label-inner">inner</span></div>
               <h3 id="~hoverLabelsOptions"><span class="symbol-name">hoverLabelsOptions</span><small class="property-type">
-                  &nbsp;Object</small></h3>
-              <p>Options for labels on hovering the diagram.</p>
+                  &nbsp;<a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~hoverLabelsOptions">module:meteoJS/thermodynamicDiagram/plotDataArea~hoverLabelsOptions</a></small></h3>
+              <p>Options for labels on hovering the diagram. Extended by the &quot;remote&quot; option.</p>
               <section>
-                <h4>Properties</h4>
+                <h4>Property</h4>
                 <table class="jsdoc-details-table">
                   <thead>
                     <tr>
@@ -99,51 +94,6 @@ <h4>Properties</h4>
                     </tr>
                   </thead>
                   <tbody>
-                    <tr>
-                      <td>
-                        <p>visible</p>
-                      </td>
-                      <td>
-                        <p>boolean</p>
-                      </td>
-                      <td>
-                        <p>Yes</p>
-                      </td>
-                      <td>
-                        <p>Visibility.</p>
-                        <p>Defaults to <code>true</code>.</p>
-                      </td>
-                    </tr>
-                    <tr>
-                      <td>
-                        <p>type</p>
-                      </td>
-                      <td>
-                        <p>string</p>
-                      </td>
-                      <td>
-                        <p>Yes</p>
-                      </td>
-                      <td>
-                        <p>Event type.</p>
-                        <p>Defaults to <code>'mousemove'</code>.</p>
-                      </td>
-                    </tr>
-                    <tr>
-                      <td>
-                        <p>snapToData</p>
-                      </td>
-                      <td>
-                        <p>boolean</p>
-                      </td>
-                      <td>
-                        <p>Yes</p>
-                      </td>
-                      <td>
-                        <p>Snap labels to data points.</p>
-                        <p>Defaults to <code>true</code>.</p>
-                      </td>
-                    </tr>
                     <tr>
                       <td>
                         <p>remote</p>
@@ -160,82 +110,6 @@ <h4>Properties</h4>
                         <p>Defaults to <code>true</code>.</p>
                       </td>
                     </tr>
-                    <tr>
-                      <td>
-                        <p>insertLabelsFunc</p>
-                      </td>
-                      <td>
-                        <p><a href="module-meteoJS_thermodynamicDiagram_plotAltitudeDataArea.html#~insertLabelsFunc">module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea~insertLabelsFunc</a></p>
-                      </td>
-                      <td>
-                        <p>Yes</p>
-                      </td>
-                      <td>
-                        <p>Called to insert labels into a SVG group.</p>
-                      </td>
-                    </tr>
-                  </tbody>
-                </table>
-              </section>
-              <dl class="dl-compact">
-              </dl>
-              <div class="symbol-detail-labels"><span class="label label-inner">inner</span></div>
-              <h3 id="~insertLabelsFunc"><span class="symbol-name">insertLabelsFunc</span><span class="signature"><span class="signature-params">(sounding, levelData, group)</span></span></h3>
-              <p>Function to insert labels.</p>
-              <section>
-                <h4>Parameters</h4>
-                <table class="jsdoc-details-table">
-                  <thead>
-                    <tr>
-                      <th>Name</th>
-                      <th>Type</th>
-                      <th>Optional</th>
-                      <th>Description</th>
-                    </tr>
-                  </thead>
-                  <tbody>
-                    <tr>
-                      <td>
-                        <p>sounding</p>
-                      </td>
-                      <td>
-                        <p><a href="module-meteoJS_thermodynamicDiagram_diagramSounding.DiagramSounding.html">module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding</a></p>
-                      </td>
-                      <td>
-                        <p>&nbsp;</p>
-                      </td>
-                      <td>
-                        <p>Diagram sounding to label.</p>
-                      </td>
-                    </tr>
-                    <tr>
-                      <td>
-                        <p>levelData</p>
-                      </td>
-                      <td>
-                        <p>Object</p>
-                      </td>
-                      <td>
-                        <p>&nbsp;</p>
-                      </td>
-                      <td>
-                        <p>Data to label.</p>
-                      </td>
-                    </tr>
-                    <tr>
-                      <td>
-                        <p>group</p>
-                      </td>
-                      <td>
-                        <p><a href="external-SVG.html">external:SVG</a></p>
-                      </td>
-                      <td>
-                        <p>&nbsp;</p>
-                      </td>
-                      <td>
-                        <p>SVG group to insert labels.</p>
-                      </td>
-                    </tr>
                   </tbody>
                 </table>
               </section>
@@ -246,7 +120,7 @@ <h3 id="~options"><span class="symbol-name">options</span><small class="property
                   &nbsp;<a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~options">module:meteoJS/thermodynamicDiagram/plotDataArea~options</a></small></h3>
               <p>Options for the constructor.</p>
               <section>
-                <h4>Parameter</h4>
+                <h4>Property</h4>
                 <table class="jsdoc-details-table">
                   <thead>
                     <tr>
@@ -286,7 +160,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram_plotArea.PlotArea.html b/doc/module-meteoJS_thermodynamicDiagram_plotArea.PlotArea.html
index ea08bfdf..2a72ca83 100644
--- a/doc/module-meteoJS_thermodynamicDiagram_plotArea.PlotArea.html
+++ b/doc/module-meteoJS_thermodynamicDiagram_plotArea.PlotArea.html
@@ -26,10 +26,10 @@
           <header class="page-header">
             <div class="symbol-detail-labels"><span class="label label-kind">class</span>&nbsp;<span class="label label-static">static</span></div>
             <h1><small><a href="module-meteoJS_thermodynamicDiagram_plotArea.html">meteoJS/<wbr>thermodynamicDiagram/<wbr>plotArea</a>.<wbr></small><span class="symbol-name">PlotArea</span></h1>
-            <p class="source-link">Source: <a href="thermodynamicDiagram_PlotArea.js.html#source-line-155">thermodynamicDiagram/<wbr>PlotArea.<wbr>js:155</a></p>
+            <p class="source-link">Source: <a href="thermodynamicDiagram_PlotArea.js.html#source-line-157">thermodynamicDiagram/<wbr>PlotArea.<wbr>js:157</a></p>
             <div class="symbol-classdesc">
               <p>Abstract class to define an area on the SVG.</p>
-              <pre><code>import PlotArea from 'meteoJS/thermodynamicDiagram/PlotArea';</code></pre>
+              <pre><code>import PlotArea from 'meteojs/thermodynamicDiagram/PlotArea';</code></pre>
             </div>
             <dl class="dl-compact">
             </dl>
@@ -408,7 +408,7 @@ <h3 id="onCoordinateSystemChange"><span class="symbol-name">onCoordinateSystemCh
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram_plotArea.html b/doc/module-meteoJS_thermodynamicDiagram_plotArea.html
index 83a4d164..92ab4cb7 100644
--- a/doc/module-meteoJS_thermodynamicDiagram_plotArea.html
+++ b/doc/module-meteoJS_thermodynamicDiagram_plotArea.html
@@ -555,6 +555,35 @@ <h4>Parameters</h4>
                   </tbody>
                 </table>
               </section>
+              <section>
+                <h4>Property</h4>
+                <table class="jsdoc-details-table">
+                  <thead>
+                    <tr>
+                      <th>Name</th>
+                      <th>Type</th>
+                      <th>Optional</th>
+                      <th>Description</th>
+                    </tr>
+                  </thead>
+                  <tbody>
+                    <tr>
+                      <td>
+                        <p>coordinateSystem</p>
+                      </td>
+                      <td>
+                        <p><a href="module-meteoJS_thermodynamicDiagram_coordinateSystem.CoordinateSystem.html">module:meteoJS/thermodynamicDiagram/coordinateSystem.CoordinateSystem</a></p>
+                      </td>
+                      <td>
+                        <p>Yes</p>
+                      </td>
+                      <td>
+                        <p>Coordinate system.</p>
+                      </td>
+                    </tr>
+                  </tbody>
+                </table>
+              </section>
               <dl class="dl-compact">
               </dl>
             </section>
@@ -628,7 +657,7 @@ <h3 id="event:prebuild:background"><span class="symbol-name">prebuild:background
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram_plotDataArea.PlotDataArea.html b/doc/module-meteoJS_thermodynamicDiagram_plotDataArea.PlotDataArea.html
index cf2aab34..12b36d18 100644
--- a/doc/module-meteoJS_thermodynamicDiagram_plotDataArea.PlotDataArea.html
+++ b/doc/module-meteoJS_thermodynamicDiagram_plotDataArea.PlotDataArea.html
@@ -26,7 +26,7 @@
           <header class="page-header">
             <div class="symbol-detail-labels"><span class="label label-kind">class</span>&nbsp;<span class="label label-static">static</span></div>
             <h1><small><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html">meteoJS/<wbr>thermodynamicDiagram/<wbr>plotDataArea</a>.<wbr></small><span class="symbol-name">PlotDataArea</span></h1>
-            <p class="source-link">Source: <a href="thermodynamicDiagram_PlotDataArea.js.html#source-line-139">thermodynamicDiagram/<wbr>PlotDataArea.<wbr>js:139</a></p>
+            <p class="source-link">Source: <a href="thermodynamicDiagram_PlotDataArea.js.html#source-line-206">thermodynamicDiagram/<wbr>PlotDataArea.<wbr>js:206</a></p>
             <div class="symbol-classdesc">
               <p>Abstract class to define an area on the SVG with sounding data.</p>
               <pre><code>import PlotDataArea from 'meteojs/thermodynamicDiagram/PlotDataArea';</code></pre>
@@ -99,6 +99,9 @@ <h2 class="summary-callout-heading">Methods</h2>
                     <dt><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.PlotDataArea.html#_drawBackground">_drawBackground(svgNode)</a></dt>
                     <dd>
                     </dd>
+                    <dt><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.PlotDataArea.html#_initHoverLabels">_initHoverLabels(options)</a></dt>
+                    <dd>
+                    </dd>
                     <dt><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.PlotDataArea.html#addSounding">addSounding(sounding)</a></dt>
                     <dd>
                     </dd>
@@ -124,13 +127,13 @@ <h2 class="summary-callout-heading">Methods</h2>
                     <dt><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.PlotDataArea.html#init">init()</a></dt>
                     <dd>
                     </dd>
+                    <dt><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.PlotDataArea.html#onChangeSoundingVisibility">onChangeSoundingVisibility(sounding, group)</a></dt>
+                    <dd>
+                    </dd>
                   </dl>
                 </div>
                 <div class="summary-column">
                   <dl class="dl-summary-callout">
-                    <dt><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.PlotDataArea.html#onChangeSoundingVisibility">onChangeSoundingVisibility(sounding, group)</a></dt>
-                    <dd>
-                    </dd>
                     <dt><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.PlotDataArea.html#onCoordinateSystemChange">onCoordinateSystemChange()</a></dt>
                     <dd>
                     </dd>
@@ -327,6 +330,39 @@ <h4>Parameter</h4>
                 <dt>Inherited from</dt>
                 <dd><a href="module-meteoJS_thermodynamicDiagram_plotArea.PlotArea.html#_drawBackground">module:meteoJS/thermodynamicDiagram/plotArea.PlotArea#_drawBackground</a></dd>
               </dl>
+              <h3 id="_initHoverLabels"><span class="symbol-name">_initHoverLabels</span><span class="signature"><span class="signature-params">(options)</span></span></h3>
+              <p>Initialize hover labels options.</p>
+              <section>
+                <h4>Parameter</h4>
+                <table class="jsdoc-details-table">
+                  <thead>
+                    <tr>
+                      <th>Name</th>
+                      <th>Type</th>
+                      <th>Optional</th>
+                      <th>Description</th>
+                    </tr>
+                  </thead>
+                  <tbody>
+                    <tr>
+                      <td>
+                        <p>options</p>
+                      </td>
+                      <td>
+                        <p><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~hoverLabelsOptions">module:meteoJS/thermodynamicDiagram/plotDataArea~hoverLabelsOptions</a></p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>Hover labels options.</p>
+                      </td>
+                    </tr>
+                  </tbody>
+                </table>
+              </section>
+              <dl class="dl-compact">
+              </dl>
               <h3 id="addSounding"><span class="symbol-name">addSounding</span><span class="signature"><span class="signature-params">(sounding)</span></span></h3>
               <p>Adds a sounding to draw into the area.</p>
               <section>
@@ -686,7 +722,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram_plotDataArea.html b/doc/module-meteoJS_thermodynamicDiagram_plotDataArea.html
index 5c141322..0531dcc8 100644
--- a/doc/module-meteoJS_thermodynamicDiagram_plotDataArea.html
+++ b/doc/module-meteoJS_thermodynamicDiagram_plotDataArea.html
@@ -60,26 +60,38 @@ <h2 class="summary-callout-heading">Abstract types</h2>
                     <dt><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~getCoordinatesByLevelData">getCoordinatesByLevelData(dataGroupId, sounding, levelData, plotArea)</a></dt>
                     <dd>
                     </dd>
-                    <dt><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~getSoundingVisibility">getSoundingVisibility(sounding)</a></dt>
+                    <dt><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~getHoverSounding">getHoverSounding(soundings)</a></dt>
+                    <dd>
+                    </dd>
+                    <dt><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~getLevelData">getLevelData(options)</a></dt>
                     <dd>
                     </dd>
                   </dl>
                 </div>
                 <div class="summary-column">
                   <dl class="dl-summary-callout">
-                    <dt><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~insertDataGroupInto">insertDataGroupInto(svgNode, dataGroupId, sounding, data, plotArea)</a></dt>
+                    <dt><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~getSoundingVisibility">getSoundingVisibility(sounding)</a></dt>
                     <dd>
                     </dd>
-                    <dt><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~insertSoundingEvent">insertSoundingEvent</a></dt>
+                    <dt><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~hoverLabelsOptions">hoverLabelsOptions</a></dt>
                     <dd>
                     </dd>
-                    <dt><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~options">options</a></dt>
+                    <dt><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~insertDataGroupInto">insertDataGroupInto(svgNode, dataGroupId, sounding, data, plotArea)</a></dt>
+                    <dd>
+                    </dd>
+                    <dt><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~insertLabelsFunc">insertLabelsFunc(sounding, levelData, group)</a></dt>
                     <dd>
                     </dd>
                   </dl>
                 </div>
                 <div class="summary-column">
                   <dl class="dl-summary-callout">
+                    <dt><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~insertSoundingEvent">insertSoundingEvent</a></dt>
+                    <dd>
+                    </dd>
+                    <dt><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~options">options</a></dt>
+                    <dd>
+                    </dd>
                     <dt><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~soundingEvent">soundingEvent</a></dt>
                     <dd>
                     </dd>
@@ -361,6 +373,142 @@ <h4>Parameters</h4>
                 </dd>
               </dl>
               <div class="symbol-detail-labels"><span class="label label-inner">inner</span></div>
+              <h3 id="~getHoverSounding"><span class="symbol-name">getHoverSounding</span><span class="signature"><span class="signature-params">(soundings)</span>&nbsp;&rarr; <span class="signature-returns"> (undefined or <a href="module-meteoJS_thermodynamicDiagram_diagramSounding.DiagramSounding.html">module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding</a>)</span></span></h3>
+              <p>For the returned sounding, the hover labels are shown. As input all
+                currently visible soundings are passed.</p>
+              <section>
+                <h4>Parameter</h4>
+                <table class="jsdoc-details-table">
+                  <thead>
+                    <tr>
+                      <th>Name</th>
+                      <th>Type</th>
+                      <th>Optional</th>
+                      <th>Description</th>
+                    </tr>
+                  </thead>
+                  <tbody>
+                    <tr>
+                      <td>
+                        <p>soundings</p>
+                      </td>
+                      <td>
+                        <p>Array of <a href="module-meteoJS_thermodynamicDiagram_diagramSounding.DiagramSounding.html">module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding</a></p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>Currently visible soundings. Array length is always at least 1.</p>
+                      </td>
+                    </tr>
+                  </tbody>
+                </table>
+              </section>
+              <dl class="dl-compact">
+                <dt>Returns</dt>
+                <dd>
+                  <p><code>(undefined or <a href="module-meteoJS_thermodynamicDiagram_diagramSounding.DiagramSounding.html">module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding</a>)</code> For this returned sounding, the hover labels are shown. No hover labes are
+                    shown, if undefined is returned.</p>
+                </dd>
+              </dl>
+              <div class="symbol-detail-labels"><span class="label label-inner">inner</span></div>
+              <h3 id="~getLevelData"><span class="symbol-name">getLevelData</span><span class="signature"><span class="signature-params">(options)</span>&nbsp;&rarr; <span class="signature-returns"> <a href="module-meteoJS_sounding.html#~levelData">module:meteoJS/sounding~levelData</a></span></span></h3>
+              <p>Getter for the levelData of a certain DiagramSounding according to an event.</p>
+              <section>
+                <h4>Parameters</h4>
+                <table class="jsdoc-details-table">
+                  <thead>
+                    <tr>
+                      <th>Name</th>
+                      <th>Type</th>
+                      <th>Optional</th>
+                      <th>Description</th>
+                    </tr>
+                  </thead>
+                  <tbody>
+                    <tr>
+                      <td>
+                        <p>options</p>
+                      </td>
+                      <td>
+                        <p>Object</p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>Options.</p>
+                        <p>Values in <code>options</code> have the following properties:</p>
+                        <table class="jsdoc-details-table">
+                          <thead>
+                            <tr>
+                              <th>Name</th>
+                              <th>Type</th>
+                              <th>Optional</th>
+                              <th>Description</th>
+                            </tr>
+                          </thead>
+                          <tbody>
+                            <tr>
+                              <td>
+                                <p>hoverLabelsSounding</p>
+                              </td>
+                              <td>
+                                <p><a href="module-meteoJS_thermodynamicDiagram_diagramSounding.DiagramSounding.html">module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding</a></p>
+                              </td>
+                              <td>
+                                <p>&nbsp;</p>
+                              </td>
+                              <td>
+                                <p>For this sounding, the hover labels are shown.</p>
+                              </td>
+                            </tr>
+                            <tr>
+                              <td>
+                                <p>e</p>
+                              </td>
+                              <td>
+                                <p><a href="module-meteoJS_thermodynamicDiagram_plotArea.html#~event">module:meteoJS/thermodynamicDiagram/plotArea~event</a></p>
+                              </td>
+                              <td>
+                                <p>&nbsp;</p>
+                              </td>
+                              <td>
+                                <p>This event raised the display of hover labels.</p>
+                              </td>
+                            </tr>
+                            <tr>
+                              <td>
+                                <p>maxDistance</p>
+                              </td>
+                              <td>
+                                <p>(undefined or number)</p>
+                              </td>
+                              <td>
+                                <p>&nbsp;</p>
+                              </td>
+                              <td>
+                                <p>Maximum distance to a data point to show a hover label in pixels.
+                                  If undefined, always a hover label to the nearest point is shown.</p>
+                              </td>
+                            </tr>
+                          </tbody>
+                        </table>
+                      </td>
+                    </tr>
+                  </tbody>
+                </table>
+              </section>
+              <dl class="dl-compact">
+                <dt>Returns</dt>
+                <dd>
+                  <p><code><a href="module-meteoJS_sounding.html#~levelData">module:meteoJS/sounding~levelData</a></code> The data to show in the label. This data is passed to
+                    <a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~insertLabelsFunc"><code>module:meteoJS/thermodynamicDiagram/plotDataArea~insertLabelsFunc</code></a>.
+                  </p>
+                </dd>
+              </dl>
+              <div class="symbol-detail-labels"><span class="label label-inner">inner</span></div>
               <h3 id="~getSoundingVisibility"><span class="symbol-name">getSoundingVisibility</span><span class="signature"><span class="signature-params">(sounding)</span>&nbsp;&rarr; <span class="signature-returns"> boolean</span></span></h3>
               <p>Visibility of the sounding in an area.</p>
               <section>
@@ -399,6 +547,131 @@ <h4>Parameter</h4>
                 </dd>
               </dl>
               <div class="symbol-detail-labels"><span class="label label-inner">inner</span></div>
+              <h3 id="~hoverLabelsOptions"><span class="symbol-name">hoverLabelsOptions</span><small class="property-type">
+                  &nbsp;Object</small></h3>
+              <p>Options for labels on hovering the plot area.</p>
+              <section>
+                <h4>Properties</h4>
+                <table class="jsdoc-details-table">
+                  <thead>
+                    <tr>
+                      <th>Name</th>
+                      <th>Type</th>
+                      <th>Optional</th>
+                      <th>Description</th>
+                    </tr>
+                  </thead>
+                  <tbody>
+                    <tr>
+                      <td>
+                        <p>visible</p>
+                      </td>
+                      <td>
+                        <p>boolean</p>
+                      </td>
+                      <td>
+                        <p>Yes</p>
+                      </td>
+                      <td>
+                        <p>Visibility.</p>
+                        <p>Defaults to <code>true</code>.</p>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td>
+                        <p>type</p>
+                      </td>
+                      <td>
+                        <p>string</p>
+                      </td>
+                      <td>
+                        <p>Yes</p>
+                      </td>
+                      <td>
+                        <p>Event type.</p>
+                        <p>Defaults to <code>'mousemove'</code>.</p>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td>
+                        <p>maxDistance</p>
+                      </td>
+                      <td>
+                        <p>number</p>
+                      </td>
+                      <td>
+                        <p>Yes</p>
+                      </td>
+                      <td>
+                        <p>Maximum distance to a data point to show a hover label in pixels.
+                          If undefined, always a hover label to the nearest point is shown.</p>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td>
+                        <p>remote</p>
+                      </td>
+                      <td>
+                        <p>boolean</p>
+                      </td>
+                      <td>
+                        <p>Yes</p>
+                      </td>
+                      <td>
+                        <p>Show labels relative to the mouse position on the diagram, even when the
+                          pointer isn't directly on the plot area.</p>
+                        <p>Defaults to <code>true</code>.</p>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td>
+                        <p>insertLabelsFunc</p>
+                      </td>
+                      <td>
+                        <p><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~insertLabelsFunc">module:meteoJS/thermodynamicDiagram/plotDataArea~insertLabelsFunc</a></p>
+                      </td>
+                      <td>
+                        <p>Yes</p>
+                      </td>
+                      <td>
+                        <p>Called to insert labels into a SVG group.</p>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td>
+                        <p>getLevelData</p>
+                      </td>
+                      <td>
+                        <p><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~getLevelData">module:meteoJS/thermodynamicDiagram/plotDataArea~getLevelData</a></p>
+                      </td>
+                      <td>
+                        <p>Yes</p>
+                      </td>
+                      <td>
+                        <p>.</p>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td>
+                        <p>getHoverSounding</p>
+                      </td>
+                      <td>
+                        <p><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~getHoverSounding">module:meteoJS/thermodynamicDiagram/plotDataArea~getHoverSounding</a></p>
+                      </td>
+                      <td>
+                        <p>Yes</p>
+                      </td>
+                      <td>
+                        <p>Default: Return the first sounding of the
+                          passed input array.</p>
+                      </td>
+                    </tr>
+                  </tbody>
+                </table>
+              </section>
+              <dl class="dl-compact">
+              </dl>
+              <div class="symbol-detail-labels"><span class="label label-inner">inner</span></div>
               <h3 id="~insertDataGroupInto"><span class="symbol-name">insertDataGroupInto</span><span class="signature"><span class="signature-params">(svgNode, dataGroupId, sounding, data, plotArea)</span></span></h3>
               <p>Draws data into a SVG node.</p>
               <section>
@@ -489,6 +762,68 @@ <h4>Parameters</h4>
               <dl class="dl-compact">
               </dl>
               <div class="symbol-detail-labels"><span class="label label-inner">inner</span></div>
+              <h3 id="~insertLabelsFunc"><span class="symbol-name">insertLabelsFunc</span><span class="signature"><span class="signature-params">(sounding, levelData, group)</span></span></h3>
+              <p>Function to insert labels.</p>
+              <section>
+                <h4>Parameters</h4>
+                <table class="jsdoc-details-table">
+                  <thead>
+                    <tr>
+                      <th>Name</th>
+                      <th>Type</th>
+                      <th>Optional</th>
+                      <th>Description</th>
+                    </tr>
+                  </thead>
+                  <tbody>
+                    <tr>
+                      <td>
+                        <p>sounding</p>
+                      </td>
+                      <td>
+                        <p><a href="module-meteoJS_thermodynamicDiagram_diagramSounding.DiagramSounding.html">module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding</a></p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>Diagram sounding to label.</p>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td>
+                        <p>levelData</p>
+                      </td>
+                      <td>
+                        <p><a href="module-meteoJS_sounding.html#~levelData">module:meteoJS/sounding~levelData</a></p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>Data to label.</p>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td>
+                        <p>group</p>
+                      </td>
+                      <td>
+                        <p><a href="external-SVG.html">external:SVG</a></p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>SVG group to insert labels.</p>
+                      </td>
+                    </tr>
+                  </tbody>
+                </table>
+              </section>
+              <dl class="dl-compact">
+              </dl>
+              <div class="symbol-detail-labels"><span class="label label-inner">inner</span></div>
               <h3 id="~insertSoundingEvent"><span class="symbol-name">insertSoundingEvent</span><small class="property-type">
                   &nbsp;<a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~soundingEvent">module:meteoJS/thermodynamicDiagram/plotDataArea~soundingEvent</a></small></h3>
               <p>Event with a sounding object and its SVG node.</p>
@@ -631,6 +966,35 @@ <h4>Parameters</h4>
                   </tbody>
                 </table>
               </section>
+              <section>
+                <h4>Property</h4>
+                <table class="jsdoc-details-table">
+                  <thead>
+                    <tr>
+                      <th>Name</th>
+                      <th>Type</th>
+                      <th>Optional</th>
+                      <th>Description</th>
+                    </tr>
+                  </thead>
+                  <tbody>
+                    <tr>
+                      <td>
+                        <p>hoverLabels</p>
+                      </td>
+                      <td>
+                        <p><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.html#~hoverLabelsOptions">module:meteoJS/thermodynamicDiagram/plotDataArea~hoverLabelsOptions</a></p>
+                      </td>
+                      <td>
+                        <p>Yes</p>
+                      </td>
+                      <td>
+                        <p>Hover labels options.</p>
+                      </td>
+                    </tr>
+                  </tbody>
+                </table>
+              </section>
               <dl class="dl-compact">
               </dl>
               <div class="symbol-detail-labels"><span class="label label-inner">inner</span></div>
@@ -701,7 +1065,7 @@ <h3 id="event:remove:sounding"><span class="symbol-name">remove:sounding</span><
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram_tdDiagram.TDDiagram.html b/doc/module-meteoJS_thermodynamicDiagram_tdDiagram.TDDiagram.html
index f0259354..75fc5169 100644
--- a/doc/module-meteoJS_thermodynamicDiagram_tdDiagram.TDDiagram.html
+++ b/doc/module-meteoJS_thermodynamicDiagram_tdDiagram.TDDiagram.html
@@ -148,7 +148,7 @@ <h2 class="summary-callout-heading">Methods</h2>
                     <dt><a href="module-meteoJS_thermodynamicDiagram_tdDiagram.TDDiagram.html#init">init()</a></dt>
                     <dd>
                     </dd>
-                    <dt><a href="module-meteoJS_thermodynamicDiagram_tdDiagram.TDDiagram.html#onChangeSoundingVisibility">onChangeSoundingVisibility()</a></dt>
+                    <dt><a href="module-meteoJS_thermodynamicDiagram_tdDiagram.TDDiagram.html#onChangeSoundingVisibility">onChangeSoundingVisibility(sounding, group)</a></dt>
                     <dd>
                     </dd>
                   </dl>
@@ -599,11 +599,55 @@ <h3 id="init"><span class="symbol-name">init</span><span class="signature"><span
                 <dt>Inherited from</dt>
                 <dd><a href="module-meteoJS_thermodynamicDiagram_plotArea.PlotArea.html#init">module:meteoJS/thermodynamicDiagram/plotArea.PlotArea#init</a></dd>
               </dl>
-              <h3 id="onChangeSoundingVisibility"><span class="symbol-name">onChangeSoundingVisibility</span><span class="signature"><span class="signature-params">()</span></span></h3>
+              <div class="symbol-detail-labels"><span class="label label-protected">protected</span></div>
+              <h3 id="onChangeSoundingVisibility"><span class="symbol-name">onChangeSoundingVisibility</span><span class="signature"><span class="signature-params">(sounding, group)</span></span></h3>
               <p>Called, when a sounding changes its visibilty.</p>
+              <section>
+                <h4>Parameters</h4>
+                <table class="jsdoc-details-table">
+                  <thead>
+                    <tr>
+                      <th>Name</th>
+                      <th>Type</th>
+                      <th>Optional</th>
+                      <th>Description</th>
+                    </tr>
+                  </thead>
+                  <tbody>
+                    <tr>
+                      <td>
+                        <p>sounding</p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>Sounding object.</p>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td>
+                        <p>group</p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>SVG group, SVG.G.</p>
+                      </td>
+                    </tr>
+                  </tbody>
+                </table>
+              </section>
               <dl class="dl-compact">
                 <dt>Inherited from</dt>
-                <dd><a href="module-meteoJS_thermodynamicDiagram_plotAltitudeDataArea.PlotAltitudeDataArea.html#onChangeSoundingVisibility">module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea.PlotAltitudeDataArea#onChangeSoundingVisibility</a></dd>
+                <dd><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.PlotDataArea.html#onChangeSoundingVisibility">module:meteoJS/thermodynamicDiagram/plotDataArea.PlotDataArea#onChangeSoundingVisibility</a></dd>
               </dl>
               <h3 id="onCoordinateSystemChange"><span class="symbol-name">onCoordinateSystemChange</span><span class="signature"><span class="signature-params">()</span></span></h3>
               <p>Called, when the coordinateSystem object changes.</p>
@@ -902,7 +946,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram_tdDiagram.html b/doc/module-meteoJS_thermodynamicDiagram_tdDiagram.html
index 0bceedf7..ab6c47f7 100644
--- a/doc/module-meteoJS_thermodynamicDiagram_tdDiagram.html
+++ b/doc/module-meteoJS_thermodynamicDiagram_tdDiagram.html
@@ -894,7 +894,7 @@ <h3 id="event:touchstart"><span class="symbol-name">touchstart</span><small clas
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram_windbarbsProfile.WindbarbsProfile.html b/doc/module-meteoJS_thermodynamicDiagram_windbarbsProfile.WindbarbsProfile.html
index 9c10d255..85ba6e5f 100644
--- a/doc/module-meteoJS_thermodynamicDiagram_windbarbsProfile.WindbarbsProfile.html
+++ b/doc/module-meteoJS_thermodynamicDiagram_windbarbsProfile.WindbarbsProfile.html
@@ -118,7 +118,7 @@ <h2 class="summary-callout-heading">Methods</h2>
                 </div>
                 <div class="summary-column">
                   <dl class="dl-summary-callout">
-                    <dt><a href="module-meteoJS_thermodynamicDiagram_windbarbsProfile.WindbarbsProfile.html#drawSounding">drawSounding()</a></dt>
+                    <dt><a href="module-meteoJS_thermodynamicDiagram_windbarbsProfile.WindbarbsProfile.html#drawSounding">drawSounding(sounding, group)</a></dt>
                     <dd>
                     </dd>
                     <dt><a href="module-meteoJS_thermodynamicDiagram_windbarbsProfile.WindbarbsProfile.html#drawSoundings">drawSoundings()</a></dt>
@@ -130,7 +130,7 @@ <h2 class="summary-callout-heading">Methods</h2>
                     <dt><a href="module-meteoJS_thermodynamicDiagram_windbarbsProfile.WindbarbsProfile.html#init">init()</a></dt>
                     <dd>
                     </dd>
-                    <dt><a href="module-meteoJS_thermodynamicDiagram_windbarbsProfile.WindbarbsProfile.html#onChangeSoundingVisibility">onChangeSoundingVisibility()</a></dt>
+                    <dt><a href="module-meteoJS_thermodynamicDiagram_windbarbsProfile.WindbarbsProfile.html#onChangeSoundingVisibility">onChangeSoundingVisibility(sounding, group)</a></dt>
                     <dd>
                     </dd>
                   </dl>
@@ -484,11 +484,55 @@ <h4>Parameter</h4>
                 <dt>Inherited from</dt>
                 <dd><a href="module-meteoJS_thermodynamicDiagram_plotArea.PlotArea.html#drawBackground">module:meteoJS/thermodynamicDiagram/plotArea.PlotArea#drawBackground</a></dd>
               </dl>
-              <h3 id="drawSounding"><span class="symbol-name">drawSounding</span><span class="signature"><span class="signature-params">()</span></span></h3>
+              <div class="symbol-detail-labels"><span class="label label-protected">protected</span></div>
+              <h3 id="drawSounding"><span class="symbol-name">drawSounding</span><span class="signature"><span class="signature-params">(sounding, group)</span></span></h3>
               <p>Draw the sounding into the SVG group.</p>
+              <section>
+                <h4>Parameters</h4>
+                <table class="jsdoc-details-table">
+                  <thead>
+                    <tr>
+                      <th>Name</th>
+                      <th>Type</th>
+                      <th>Optional</th>
+                      <th>Description</th>
+                    </tr>
+                  </thead>
+                  <tbody>
+                    <tr>
+                      <td>
+                        <p>sounding</p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>Sounding object.</p>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td>
+                        <p>group</p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>SVG group, SVG.G.</p>
+                      </td>
+                    </tr>
+                  </tbody>
+                </table>
+              </section>
               <dl class="dl-compact">
                 <dt>Inherited from</dt>
-                <dd><a href="module-meteoJS_thermodynamicDiagram_plotAltitudeDataArea.PlotAltitudeDataArea.html#drawSounding">module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea.PlotAltitudeDataArea#drawSounding</a></dd>
+                <dd><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.PlotDataArea.html#drawSounding">module:meteoJS/thermodynamicDiagram/plotDataArea.PlotDataArea#drawSounding</a></dd>
               </dl>
               <div class="symbol-detail-labels"><span class="label label-protected">protected</span></div>
               <h3 id="drawSoundings"><span class="symbol-name">drawSoundings</span><span class="signature"><span class="signature-params">()</span></span></h3>
@@ -510,11 +554,55 @@ <h3 id="init"><span class="symbol-name">init</span><span class="signature"><span
                 <dt>Inherited from</dt>
                 <dd><a href="module-meteoJS_thermodynamicDiagram_plotArea.PlotArea.html#init">module:meteoJS/thermodynamicDiagram/plotArea.PlotArea#init</a></dd>
               </dl>
-              <h3 id="onChangeSoundingVisibility"><span class="symbol-name">onChangeSoundingVisibility</span><span class="signature"><span class="signature-params">()</span></span></h3>
+              <div class="symbol-detail-labels"><span class="label label-protected">protected</span></div>
+              <h3 id="onChangeSoundingVisibility"><span class="symbol-name">onChangeSoundingVisibility</span><span class="signature"><span class="signature-params">(sounding, group)</span></span></h3>
               <p>Called, when a sounding changes its visibilty.</p>
+              <section>
+                <h4>Parameters</h4>
+                <table class="jsdoc-details-table">
+                  <thead>
+                    <tr>
+                      <th>Name</th>
+                      <th>Type</th>
+                      <th>Optional</th>
+                      <th>Description</th>
+                    </tr>
+                  </thead>
+                  <tbody>
+                    <tr>
+                      <td>
+                        <p>sounding</p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>Sounding object.</p>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td>
+                        <p>group</p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>SVG group, SVG.G.</p>
+                      </td>
+                    </tr>
+                  </tbody>
+                </table>
+              </section>
               <dl class="dl-compact">
                 <dt>Inherited from</dt>
-                <dd><a href="module-meteoJS_thermodynamicDiagram_plotAltitudeDataArea.PlotAltitudeDataArea.html#onChangeSoundingVisibility">module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea.PlotAltitudeDataArea#onChangeSoundingVisibility</a></dd>
+                <dd><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.PlotDataArea.html#onChangeSoundingVisibility">module:meteoJS/thermodynamicDiagram/plotDataArea.PlotDataArea#onChangeSoundingVisibility</a></dd>
               </dl>
               <h3 id="onCoordinateSystemChange"><span class="symbol-name">onCoordinateSystemChange</span><span class="signature"><span class="signature-params">()</span></span></h3>
               <p>Called, when the coordinateSystem object changes.</p>
@@ -618,7 +706,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram_windbarbsProfile.html b/doc/module-meteoJS_thermodynamicDiagram_windbarbsProfile.html
index c0b5c7d4..a90732a5 100644
--- a/doc/module-meteoJS_thermodynamicDiagram_windbarbsProfile.html
+++ b/doc/module-meteoJS_thermodynamicDiagram_windbarbsProfile.html
@@ -134,7 +134,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram_windspeedProfile.WindspeedProfile.html b/doc/module-meteoJS_thermodynamicDiagram_windspeedProfile.WindspeedProfile.html
index c11fc15c..8a59be37 100644
--- a/doc/module-meteoJS_thermodynamicDiagram_windspeedProfile.WindspeedProfile.html
+++ b/doc/module-meteoJS_thermodynamicDiagram_windspeedProfile.WindspeedProfile.html
@@ -118,7 +118,7 @@ <h2 class="summary-callout-heading">Methods</h2>
                 </div>
                 <div class="summary-column">
                   <dl class="dl-summary-callout">
-                    <dt><a href="module-meteoJS_thermodynamicDiagram_windspeedProfile.WindspeedProfile.html#drawSounding">drawSounding()</a></dt>
+                    <dt><a href="module-meteoJS_thermodynamicDiagram_windspeedProfile.WindspeedProfile.html#drawSounding">drawSounding(sounding, group)</a></dt>
                     <dd>
                     </dd>
                     <dt><a href="module-meteoJS_thermodynamicDiagram_windspeedProfile.WindspeedProfile.html#drawSoundings">drawSoundings()</a></dt>
@@ -130,7 +130,7 @@ <h2 class="summary-callout-heading">Methods</h2>
                     <dt><a href="module-meteoJS_thermodynamicDiagram_windspeedProfile.WindspeedProfile.html#init">init()</a></dt>
                     <dd>
                     </dd>
-                    <dt><a href="module-meteoJS_thermodynamicDiagram_windspeedProfile.WindspeedProfile.html#onChangeSoundingVisibility">onChangeSoundingVisibility()</a></dt>
+                    <dt><a href="module-meteoJS_thermodynamicDiagram_windspeedProfile.WindspeedProfile.html#onChangeSoundingVisibility">onChangeSoundingVisibility(sounding, group)</a></dt>
                     <dd>
                     </dd>
                   </dl>
@@ -448,11 +448,55 @@ <h4>Parameter</h4>
                 <dt>Inherited from</dt>
                 <dd><a href="module-meteoJS_thermodynamicDiagram_plotArea.PlotArea.html#drawBackground">module:meteoJS/thermodynamicDiagram/plotArea.PlotArea#drawBackground</a></dd>
               </dl>
-              <h3 id="drawSounding"><span class="symbol-name">drawSounding</span><span class="signature"><span class="signature-params">()</span></span></h3>
+              <div class="symbol-detail-labels"><span class="label label-protected">protected</span></div>
+              <h3 id="drawSounding"><span class="symbol-name">drawSounding</span><span class="signature"><span class="signature-params">(sounding, group)</span></span></h3>
               <p>Draw the sounding into the SVG group.</p>
+              <section>
+                <h4>Parameters</h4>
+                <table class="jsdoc-details-table">
+                  <thead>
+                    <tr>
+                      <th>Name</th>
+                      <th>Type</th>
+                      <th>Optional</th>
+                      <th>Description</th>
+                    </tr>
+                  </thead>
+                  <tbody>
+                    <tr>
+                      <td>
+                        <p>sounding</p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>Sounding object.</p>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td>
+                        <p>group</p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>SVG group, SVG.G.</p>
+                      </td>
+                    </tr>
+                  </tbody>
+                </table>
+              </section>
               <dl class="dl-compact">
                 <dt>Inherited from</dt>
-                <dd><a href="module-meteoJS_thermodynamicDiagram_plotAltitudeDataArea.PlotAltitudeDataArea.html#drawSounding">module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea.PlotAltitudeDataArea#drawSounding</a></dd>
+                <dd><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.PlotDataArea.html#drawSounding">module:meteoJS/thermodynamicDiagram/plotDataArea.PlotDataArea#drawSounding</a></dd>
               </dl>
               <div class="symbol-detail-labels"><span class="label label-protected">protected</span></div>
               <h3 id="drawSoundings"><span class="symbol-name">drawSoundings</span><span class="signature"><span class="signature-params">()</span></span></h3>
@@ -474,11 +518,55 @@ <h3 id="init"><span class="symbol-name">init</span><span class="signature"><span
                 <dt>Inherited from</dt>
                 <dd><a href="module-meteoJS_thermodynamicDiagram_plotArea.PlotArea.html#init">module:meteoJS/thermodynamicDiagram/plotArea.PlotArea#init</a></dd>
               </dl>
-              <h3 id="onChangeSoundingVisibility"><span class="symbol-name">onChangeSoundingVisibility</span><span class="signature"><span class="signature-params">()</span></span></h3>
+              <div class="symbol-detail-labels"><span class="label label-protected">protected</span></div>
+              <h3 id="onChangeSoundingVisibility"><span class="symbol-name">onChangeSoundingVisibility</span><span class="signature"><span class="signature-params">(sounding, group)</span></span></h3>
               <p>Called, when a sounding changes its visibilty.</p>
+              <section>
+                <h4>Parameters</h4>
+                <table class="jsdoc-details-table">
+                  <thead>
+                    <tr>
+                      <th>Name</th>
+                      <th>Type</th>
+                      <th>Optional</th>
+                      <th>Description</th>
+                    </tr>
+                  </thead>
+                  <tbody>
+                    <tr>
+                      <td>
+                        <p>sounding</p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>Sounding object.</p>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td>
+                        <p>group</p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>&nbsp;</p>
+                      </td>
+                      <td>
+                        <p>SVG group, SVG.G.</p>
+                      </td>
+                    </tr>
+                  </tbody>
+                </table>
+              </section>
               <dl class="dl-compact">
                 <dt>Inherited from</dt>
-                <dd><a href="module-meteoJS_thermodynamicDiagram_plotAltitudeDataArea.PlotAltitudeDataArea.html#onChangeSoundingVisibility">module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea.PlotAltitudeDataArea#onChangeSoundingVisibility</a></dd>
+                <dd><a href="module-meteoJS_thermodynamicDiagram_plotDataArea.PlotDataArea.html#onChangeSoundingVisibility">module:meteoJS/thermodynamicDiagram/plotDataArea.PlotDataArea#onChangeSoundingVisibility</a></dd>
               </dl>
               <h3 id="onCoordinateSystemChange"><span class="symbol-name">onCoordinateSystemChange</span><span class="signature"><span class="signature-params">()</span></span></h3>
               <p>Called, when the coordinateSystem object changes.</p>
@@ -582,7 +670,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_thermodynamicDiagram_windspeedProfile.html b/doc/module-meteoJS_thermodynamicDiagram_windspeedProfile.html
index 206135fb..38b13a1b 100644
--- a/doc/module-meteoJS_thermodynamicDiagram_windspeedProfile.html
+++ b/doc/module-meteoJS_thermodynamicDiagram_windspeedProfile.html
@@ -159,7 +159,7 @@ <h3 id="~options"><span class="symbol-name">options</span><small class="property
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_timeline.Timeline.html b/doc/module-meteoJS_timeline.Timeline.html
index 06093aad..10ac101b 100644
--- a/doc/module-meteoJS_timeline.Timeline.html
+++ b/doc/module-meteoJS_timeline.Timeline.html
@@ -686,7 +686,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_timeline.html b/doc/module-meteoJS_timeline.html
index 902c1a0d..44c94ed8 100644
--- a/doc/module-meteoJS_timeline.html
+++ b/doc/module-meteoJS_timeline.html
@@ -408,7 +408,7 @@ <h3 id="event:change:times"><span class="symbol-name">change:times</span></h3>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_timeline_animation.Animation.html b/doc/module-meteoJS_timeline_animation.Animation.html
index 7615739a..cabc7e83 100644
--- a/doc/module-meteoJS_timeline_animation.Animation.html
+++ b/doc/module-meteoJS_timeline_animation.Animation.html
@@ -301,7 +301,7 @@ <h3 id="toggle"><span class="symbol-name">toggle</span><span class="signature"><
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_timeline_animation.html b/doc/module-meteoJS_timeline_animation.html
index 5e2f3e90..14f2a1c5 100644
--- a/doc/module-meteoJS_timeline_animation.html
+++ b/doc/module-meteoJS_timeline_animation.html
@@ -949,7 +949,7 @@ <h3 id="event:stop:animation"><span class="symbol-name">stop:animation</span></h
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_timeline_animation_togglebutton.ToggleButton.html b/doc/module-meteoJS_timeline_animation_togglebutton.ToggleButton.html
index 0c32d502..8bb40cc6 100644
--- a/doc/module-meteoJS_timeline_animation_togglebutton.ToggleButton.html
+++ b/doc/module-meteoJS_timeline_animation_togglebutton.ToggleButton.html
@@ -80,7 +80,7 @@ <h3>Parameter</h3>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_timeline_animation_togglebutton.html b/doc/module-meteoJS_timeline_animation_togglebutton.html
index 351cbf0f..517d2f79 100644
--- a/doc/module-meteoJS_timeline_animation_togglebutton.html
+++ b/doc/module-meteoJS_timeline_animation_togglebutton.html
@@ -301,7 +301,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_timeline_navigationButtons.NavigationButtons.html b/doc/module-meteoJS_timeline_navigationButtons.NavigationButtons.html
index 317e3f84..8ee8b606 100644
--- a/doc/module-meteoJS_timeline_navigationButtons.NavigationButtons.html
+++ b/doc/module-meteoJS_timeline_navigationButtons.NavigationButtons.html
@@ -150,7 +150,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_timeline_navigationButtons.html b/doc/module-meteoJS_timeline_navigationButtons.html
index 78901caa..1142bc5f 100644
--- a/doc/module-meteoJS_timeline_navigationButtons.html
+++ b/doc/module-meteoJS_timeline_navigationButtons.html
@@ -377,7 +377,7 @@ <h4>Properties</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_timeline_visualisation.Visualisation.html b/doc/module-meteoJS_timeline_visualisation.Visualisation.html
index 058dc7df..c8bf7ab8 100644
--- a/doc/module-meteoJS_timeline_visualisation.Visualisation.html
+++ b/doc/module-meteoJS_timeline_visualisation.Visualisation.html
@@ -428,7 +428,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_timeline_visualisation.html b/doc/module-meteoJS_timeline_visualisation.html
index c3f1767c..e786828c 100644
--- a/doc/module-meteoJS_timeline_visualisation.html
+++ b/doc/module-meteoJS_timeline_visualisation.html
@@ -339,7 +339,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_timeline_visualisation_bsButtons.bsButtons.html b/doc/module-meteoJS_timeline_visualisation_bsButtons.bsButtons.html
index 7e95eeca..3847fb48 100644
--- a/doc/module-meteoJS_timeline_visualisation_bsButtons.bsButtons.html
+++ b/doc/module-meteoJS_timeline_visualisation_bsButtons.bsButtons.html
@@ -433,7 +433,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_timeline_visualisation_bsButtons.html b/doc/module-meteoJS_timeline_visualisation_bsButtons.html
index 48c69eaf..00045f9d 100644
--- a/doc/module-meteoJS_timeline_visualisation_bsButtons.html
+++ b/doc/module-meteoJS_timeline_visualisation_bsButtons.html
@@ -162,7 +162,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_timeline_visualisation_bsDropdown.bsDropdown.html b/doc/module-meteoJS_timeline_visualisation_bsDropdown.bsDropdown.html
index beda6394..375b7d55 100644
--- a/doc/module-meteoJS_timeline_visualisation_bsDropdown.bsDropdown.html
+++ b/doc/module-meteoJS_timeline_visualisation_bsDropdown.bsDropdown.html
@@ -434,7 +434,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_timeline_visualisation_bsDropdown.html b/doc/module-meteoJS_timeline_visualisation_bsDropdown.html
index 057ec211..21ac761e 100644
--- a/doc/module-meteoJS_timeline_visualisation_bsDropdown.html
+++ b/doc/module-meteoJS_timeline_visualisation_bsDropdown.html
@@ -357,7 +357,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_timeline_visualisation_slider.Slider.html b/doc/module-meteoJS_timeline_visualisation_slider.Slider.html
index ab1ce736..2f090a04 100644
--- a/doc/module-meteoJS_timeline_visualisation_slider.Slider.html
+++ b/doc/module-meteoJS_timeline_visualisation_slider.Slider.html
@@ -433,7 +433,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_timeline_visualisation_slider.html b/doc/module-meteoJS_timeline_visualisation_slider.html
index cc65f8af..5df48260 100644
--- a/doc/module-meteoJS_timeline_visualisation_slider.html
+++ b/doc/module-meteoJS_timeline_visualisation_slider.html
@@ -89,7 +89,7 @@ <h3 id="~options"><span class="symbol-name">options</span><small class="property
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_timeline_visualisation_text.Text.html b/doc/module-meteoJS_timeline_visualisation_text.Text.html
index 5517a205..e7d8e080 100644
--- a/doc/module-meteoJS_timeline_visualisation_text.Text.html
+++ b/doc/module-meteoJS_timeline_visualisation_text.Text.html
@@ -433,7 +433,7 @@ <h4>Parameters</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_timeline_visualisation_text.html b/doc/module-meteoJS_timeline_visualisation_text.html
index eced92d6..3341a590 100644
--- a/doc/module-meteoJS_timeline_visualisation_text.html
+++ b/doc/module-meteoJS_timeline_visualisation_text.html
@@ -118,7 +118,7 @@ <h4>Parameter</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_tooltip.Tooltip.html b/doc/module-meteoJS_tooltip.Tooltip.html
index dad800ad..481ec60b 100644
--- a/doc/module-meteoJS_tooltip.Tooltip.html
+++ b/doc/module-meteoJS_tooltip.Tooltip.html
@@ -220,7 +220,7 @@ <h3 id="update"><span class="symbol-name">update</span><span class="signature"><
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_tooltip.html b/doc/module-meteoJS_tooltip.html
index 9d7f2004..26feb558 100644
--- a/doc/module-meteoJS_tooltip.html
+++ b/doc/module-meteoJS_tooltip.html
@@ -96,7 +96,7 @@ <h3 id="event:show:tooltip"><span class="symbol-name">show:tooltip</span></h3>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_tooltip_bootstrapTooltip.BootstrapTooltip.html b/doc/module-meteoJS_tooltip_bootstrapTooltip.BootstrapTooltip.html
index 3f46a07c..0f571462 100644
--- a/doc/module-meteoJS_tooltip_bootstrapTooltip.BootstrapTooltip.html
+++ b/doc/module-meteoJS_tooltip_bootstrapTooltip.BootstrapTooltip.html
@@ -267,7 +267,7 @@ <h3 id="update"><span class="symbol-name">update</span><span class="signature"><
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/module-meteoJS_tooltip_bootstrapTooltip.html b/doc/module-meteoJS_tooltip_bootstrapTooltip.html
index 5f7d3c93..d85c3791 100644
--- a/doc/module-meteoJS_tooltip_bootstrapTooltip.html
+++ b/doc/module-meteoJS_tooltip_bootstrapTooltip.html
@@ -162,7 +162,7 @@ <h4>Properties</h4>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/sounding_Parcel.js.html b/doc/sounding_Parcel.js.html
index d1cb9fe2..0a033833 100644
--- a/doc/sounding_Parcel.js.html
+++ b/doc/sounding_Parcel.js.html
@@ -446,7 +446,7 @@ <h1>Source: sounding/Parcel.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/synview_Collection.js.html b/doc/synview_Collection.js.html
index 27259ff8..d4106d89 100644
--- a/doc/synview_Collection.js.html
+++ b/doc/synview_Collection.js.html
@@ -192,7 +192,7 @@ <h1>Source: synview/Collection.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/synview_Resource.js.html b/doc/synview_Resource.js.html
index 11574043..d45bfe4f 100644
--- a/doc/synview_Resource.js.html
+++ b/doc/synview_Resource.js.html
@@ -549,7 +549,7 @@ <h1>Source: synview/Resource.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/synview_ResourceCollection.js.html b/doc/synview_ResourceCollection.js.html
index e2a4dcbe..28dd4f0a 100644
--- a/doc/synview_ResourceCollection.js.html
+++ b/doc/synview_ResourceCollection.js.html
@@ -278,7 +278,7 @@ <h1>Source: synview/ResourceCollection.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/synview_SynviewMap.js.html b/doc/synview_SynviewMap.js.html
index 3aa10100..94848ec0 100644
--- a/doc/synview_SynviewMap.js.html
+++ b/doc/synview_SynviewMap.js.html
@@ -210,7 +210,7 @@ <h1>Source: synview/SynviewMap.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/synview_Tooltip.js.html b/doc/synview_Tooltip.js.html
index 42facd4b..bbbb72fd 100644
--- a/doc/synview_Tooltip.js.html
+++ b/doc/synview_Tooltip.js.html
@@ -171,7 +171,7 @@ <h1>Source: synview/Tooltip.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/synview_Type.js.html b/doc/synview_Type.js.html
index bd0591b0..b4c15b22 100644
--- a/doc/synview_Type.js.html
+++ b/doc/synview_Type.js.html
@@ -574,7 +574,7 @@ <h1>Source: synview/Type.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/synview_TypeCollection.js.html b/doc/synview_TypeCollection.js.html
index e7a5f785..73516f4e 100644
--- a/doc/synview_TypeCollection.js.html
+++ b/doc/synview_TypeCollection.js.html
@@ -200,7 +200,7 @@ <h1>Source: synview/TypeCollection.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/synview_map_MapLL.js.html b/doc/synview_map_MapLL.js.html
index 5ddf0de9..9c2f0fc3 100644
--- a/doc/synview_map_MapLL.js.html
+++ b/doc/synview_map_MapLL.js.html
@@ -70,7 +70,7 @@ <h1>Source: synview/map/MapLL.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/synview_map_MapOL.js.html b/doc/synview_map_MapOL.js.html
index a9263ed1..ee67c8fd 100644
--- a/doc/synview_map_MapOL.js.html
+++ b/doc/synview_map_MapOL.js.html
@@ -253,7 +253,7 @@ <h1>Source: synview/map/MapOL.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/synview_resource_GeoJSON.js.html b/doc/synview_resource_GeoJSON.js.html
index 7c5374fd..69ab1161 100644
--- a/doc/synview_resource_GeoJSON.js.html
+++ b/doc/synview_resource_GeoJSON.js.html
@@ -60,7 +60,7 @@ <h1>Source: synview/resource/GeoJSON.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/synview_resource_GeoJSONTile.js.html b/doc/synview_resource_GeoJSONTile.js.html
index f5494f2c..cc188bea 100644
--- a/doc/synview_resource_GeoJSONTile.js.html
+++ b/doc/synview_resource_GeoJSONTile.js.html
@@ -59,7 +59,7 @@ <h1>Source: synview/resource/GeoJSONTile.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/synview_resource_Image.js.html b/doc/synview_resource_Image.js.html
index 6f1066c7..a97afa80 100644
--- a/doc/synview_resource_Image.js.html
+++ b/doc/synview_resource_Image.js.html
@@ -49,9 +49,9 @@ <h1>Source: synview/resource/Image.js</h1>
 /**
  * Object representing an image.
  * 
- * &amp;lt;pre&gt;&amp;lt;code&gt;import Image from &#x27;meteoJS/synview/resource/Image&#x27;;
-import { Image } from &#x27;meteoJS/synview/resource/Image&#x27;;
-import { ImageStatic } from &#x27;meteoJS/synview/resource/Image&#x27;;&amp;lt;/code&gt;&amp;lt;/pre&gt;
+ * &amp;lt;pre&gt;&amp;lt;code&gt;import Image from &#x27;meteojs/synview/resource/Image&#x27;;
+import { Image } from &#x27;meteojs/synview/resource/Image&#x27;;
+import { ImageStatic } from &#x27;meteojs/synview/resource/Image&#x27;;&amp;lt;/code&gt;&amp;lt;/pre&gt;
  * 
  * @extends  module:meteoJS/synview/resource.Resource
  */
@@ -132,7 +132,7 @@ <h1>Source: synview/resource/Image.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/synview_resource_OSM.js.html b/doc/synview_resource_OSM.js.html
index aa883451..67261f84 100644
--- a/doc/synview_resource_OSM.js.html
+++ b/doc/synview_resource_OSM.js.html
@@ -68,7 +68,7 @@ <h1>Source: synview/resource/OSM.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/synview_resource_Vector.js.html b/doc/synview_resource_Vector.js.html
index aad117e8..8caf2935 100644
--- a/doc/synview_resource_Vector.js.html
+++ b/doc/synview_resource_Vector.js.html
@@ -115,7 +115,7 @@ <h1>Source: synview/resource/Vector.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/synview_resource_VectorTile.js.html b/doc/synview_resource_VectorTile.js.html
index 17c6c98d..5ec89ea5 100644
--- a/doc/synview_resource_VectorTile.js.html
+++ b/doc/synview_resource_VectorTile.js.html
@@ -87,7 +87,7 @@ <h1>Source: synview/resource/VectorTile.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/thermodynamicDiagram_CoordinateSystem.js.html b/doc/thermodynamicDiagram_CoordinateSystem.js.html
index 3346d0dc..b3436bad 100644
--- a/doc/thermodynamicDiagram_CoordinateSystem.js.html
+++ b/doc/thermodynamicDiagram_CoordinateSystem.js.html
@@ -91,7 +91,7 @@ <h1>Source: thermodynamicDiagram/CoordinateSystem.js</h1>
  * * log-P y-axes with horizontal isobars
  * * straight isotherms, inclinated to the right
  * 
- * &amp;lt;pre&gt;&amp;lt;code&gt;import CoordinateSystem from &#x27;meteoJS/thermodynamicDiagram/CoordinateSystem&#x27;;&amp;lt;/code&gt;&amp;lt;/pre&gt;
+ * &amp;lt;pre&gt;&amp;lt;code&gt;import CoordinateSystem from &#x27;meteojs/thermodynamicDiagram/CoordinateSystem&#x27;;&amp;lt;/code&gt;&amp;lt;/pre&gt;
  * 
  * @abstract
  * @fires module:meteoJS/thermodynamicDiagram/coordinateSystem#change:options
@@ -641,7 +641,7 @@ <h1>Source: thermodynamicDiagram/CoordinateSystem.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/thermodynamicDiagram_DiagramParcel.js.html b/doc/thermodynamicDiagram_DiagramParcel.js.html
index 6353be96..701fcbcc 100644
--- a/doc/thermodynamicDiagram_DiagramParcel.js.html
+++ b/doc/thermodynamicDiagram_DiagramParcel.js.html
@@ -213,7 +213,7 @@ <h1>Source: thermodynamicDiagram/DiagramParcel.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/thermodynamicDiagram_DiagramSounding.js.html b/doc/thermodynamicDiagram_DiagramSounding.js.html
index 4bd7cbef..306f5575 100644
--- a/doc/thermodynamicDiagram_DiagramSounding.js.html
+++ b/doc/thermodynamicDiagram_DiagramSounding.js.html
@@ -122,7 +122,7 @@ <h1>Source: thermodynamicDiagram/DiagramSounding.js</h1>
     this._options &#x3D; {
       diagram: getNormalizedDiagramOptions(diagram),
       windprofile:  getNormalizedWindprofileOptions(windprofile),
-      hodograph: getNormalizedLineOptions(hodograph),
+      hodograph: getNormalizedHodographOptions(hodograph),
       parcels: getNormalizedParcelsOptions(parcels)
     };
     
@@ -232,7 +232,7 @@ <h1>Source: thermodynamicDiagram/DiagramSounding.js</h1>
     this._options.windprofile &#x3D;
       updateWindprofileOptions(this._options.windprofile, windprofile);
     this._options.hodograph &#x3D;
-      updateLineOptions(this._options.hodograph, hodograph);
+      updateHodographOptions(this._options.hodograph, hodograph);
     if (willTrigger)
       this.trigger(&#x27;change:options&#x27;);
     
@@ -403,6 +403,97 @@ <h1>Source: thermodynamicDiagram/DiagramSounding.js</h1>
   return updateOptionsPart(options, updateOptions, [&#x27;windbarbs&#x27;, &#x27;windspeed&#x27;]);
 }
 
+/**
+ * Options for a line-segment of a sounding in the hodograph.
+ * 
+ * @typedef {module:meteoJS/thermodynamicDiagram~lineOptions}
+ *   module:meteoJS/thermodynamicDiagram/diagramSounding~hodographSegmentOptions
+ * @property {number|undefined}
+ *   [minPressure] - Minimum pressure level of the segment. Unit: hPa.
+ * @property {number|undefined}
+ *   [maxPressure] - Maximum pressure level of the segment. Unit: hPa.
+ */
+
+/**
+ * Options for a sounding in the hodograph.
+ * 
+ * @typedef {module:meteoJS/thermodynamicDiagram~lineOptions}
+ *   module:meteoJS/thermodynamicDiagram/diagramSounding~hodographOptions
+ * @property {number|undefined}
+ *   [minPressure] - Minimum pressure level to plot in the hodograph. Unit: hPa.
+ * @property {number|undefined}
+ *   [maxPressure] - Maximum pressure level to plot in the hodograph. Unit: hPa.
+ * @property {module:meteoJS/thermodynamicDiagram/diagramSounding~hodographSegmentOptions[]}
+ *   [segments] - Array of segment definitions.
+ */
+
+/**
+ * Returns normalized hodograph options.
+ * 
+ * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~hodographOptions}
+ *   [options] - Options.
+ * @returns {module:meteoJS/thermodynamicDiagram/diagramSounding~hodographOptions}
+ *   Normalized options.
+ * @private
+ */
+function getNormalizedHodographOptions({
+  minPressure &#x3D; undefined,
+  maxPressure &#x3D; undefined,
+  segments &#x3D; [],
+  ...result
+} &#x3D; {}) {
+  result &#x3D; getNormalizedLineOptions(result, {
+    style: {
+      color: &#x27;green&#x27;,
+      width: 2
+    }
+  });
+  result.minPressure &#x3D; minPressure;
+  result.maxPressure &#x3D; maxPressure;
+  result.segments &#x3D; segments.map(({
+    minPressure &#x3D; undefined,
+    maxPressure &#x3D; undefined,
+    ...segment
+  }) &#x3D;&gt; {
+    segment &#x3D; getNormalizedLineOptions(segment);
+    segment.minPressure &#x3D; minPressure;
+    segment.maxPressure &#x3D; maxPressure;
+    return segment;
+  });
+  return result;
+}
+
+/**
+ * Updates hodograph options.
+ * 
+ * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~hodographOptions}
+ *   options - Current options.
+ * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~hodographOptions}
+ *   updateOptions - Some new options.
+ * @returns {module:meteoJS/thermodynamicDiagram/diagramSounding~hodographOptions}
+ *   New options object.
+ * @private
+ */
+function updateHodographOptions(options, updateOptions) {
+  options &#x3D; updateLineOptions(options, updateOptions);
+  [&#x27;minPressure&#x27;, &#x27;maxPressure&#x27;].forEach(styleKey &#x3D;&gt; {
+    if (styleKey in updateOptions)
+      options[styleKey] &#x3D; updateOptions[styleKey];
+  });
+  if (&#x27;segments&#x27; in updateOptions)
+    options.segments &#x3D; updateOptions.segments.map(({
+      minPressure &#x3D; undefined,
+      maxPressure &#x3D; undefined,
+      ...segment
+    }) &#x3D;&gt; {
+      segment &#x3D; getNormalizedLineOptions(segment);
+      segment.minPressure &#x3D; minPressure;
+      segment.maxPressure &#x3D; maxPressure;
+      return segment;
+    });
+  return options;
+}
+
 /**
  * Visibility/style of the parcels. This object can contain further keys with
  * values as {@link module:meteoJS/thermodynamicDiagram/diagramSounding~diagramOptions}
@@ -515,7 +606,7 @@ <h1>Source: thermodynamicDiagram/DiagramSounding.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/thermodynamicDiagram_Functions.js.html b/doc/thermodynamicDiagram_Functions.js.html
index 79db35d5..fd17aabc 100644
--- a/doc/thermodynamicDiagram_Functions.js.html
+++ b/doc/thermodynamicDiagram_Functions.js.html
@@ -134,12 +134,16 @@ <h1>Source: thermodynamicDiagram/Functions.js</h1>
  */
 export function getNormalizedLineOptions({
   visible &#x3D; undefined,
-  style &#x3D; {}
+  style &#x3D; {},
+  ...result
 } &#x3D; {}, defaults &#x3D; {}) {
-  return {
-    visible: getFirstDefinedValue(visible, defaults.visible, true),
-    style: getNormalizedLineStyleOptions(style, defaults.style)
-  };
+  result.visible &#x3D; getFirstDefinedValue(visible, defaults.visible, true);
+  result.style &#x3D; getNormalizedLineStyleOptions(style, defaults.style);
+  Object.keys(defaults).forEach(key &#x3D;&gt; {
+    if (key !&#x3D; &#x27;visible&#x27; &amp;amp;&amp;amp; key !&#x3D; &#x27;style&#x27; &amp;amp;&amp;amp; result[key] &#x3D;&#x3D;&#x3D; undefined)
+      result[key] &#x3D; defaults[key];
+  });
+  return result;
 }
 
 /**
@@ -164,12 +168,17 @@ <h1>Source: thermodynamicDiagram/Functions.js</h1>
  */
 export function getNormalizedTextOptions({
   visible &#x3D; true,
-  font &#x3D; {}
+  font &#x3D; {},
+  ...result
 } &#x3D; {}, defaults &#x3D; {}) {
-  return {
-    visible: getFirstDefinedValue(visible, defaults.visible, true),
-    font: getNormalizedFontOptions(font, defaults.font)
-  };
+  result.visible &#x3D; getFirstDefinedValue(visible, defaults.visible, true);
+  result.font &#x3D; getNormalizedFontOptions(font, defaults.font);
+  Object.keys(defaults).forEach(key &#x3D;&gt; {
+    if (key !&#x3D; &#x27;visible&#x27; &amp;amp;&amp;amp; key !&#x3D; &#x27;font&#x27;
+      &amp;amp;&amp;amp; result[key] &#x3D;&#x3D;&#x3D; undefined)
+      result[key] &#x3D; defaults[key];
+  });
+  return result;
 }
 
 /**
@@ -250,7 +259,8 @@ <h1>Source: thermodynamicDiagram/Functions.js</h1>
  * @param {number} [options.horizontalMargin&#x3D;0] - Padding in x direction.
  * @param {number} [options.verticalMargin&#x3D;0] - Padding in y direction.
  * @param {module:meteoJS/thermodynamicDiagram~fontOptions} [options.font] - Font style.
- * @prarm {string|Object} [options.fill] - Fill for background.
+ * @prarm {string|Object|undefined} [options.fill]
+ *   Fill for background. If undefined, no background is drawn.
  * @returns {external:SVG} - SVG group containing the inserted elements.
  */
 export function drawTextInto({
@@ -261,27 +271,39 @@ <h1>Source: thermodynamicDiagram/Functions.js</h1>
   horizontalMargin &#x3D; 0,
   verticalMargin &#x3D; 0,
   font &#x3D; {},
-  fill &#x3D; {}
+  fill &#x3D; undefined
 }) {
   const group &#x3D; node.group();
-  if (!(&#x27;color&#x27; in fill))
-    fill.color &#x3D; &#x27;white&#x27;;
-  const background &#x3D; group.rect().fill(fill);
+  let background &#x3D; undefined;
+  if (fill !&#x3D;&#x3D; undefined) {
+    if (!(&#x27;color&#x27; in fill))
+      fill.color &#x3D; &#x27;white&#x27;;
+    background &#x3D; group.rect().fill(fill);
+  }
+  const f &#x3D; {...font};
+  let fontColor &#x3D; undefined;
+  if (&#x27;color&#x27; in f) {
+    fontColor &#x3D; f.color;
+    delete f.color;
+  }
   const textNode &#x3D; group
     .text(text)
     .attr({ x, y })
     .font(font);
+  if (fontColor !&#x3D;&#x3D; undefined)
+    textNode.fill(fontColor);
   if (font[&#x27;alignment-baseline&#x27;] &#x3D;&#x3D; &#x27;bottom&#x27;)
     textNode.dy(-textNode.bbox().height - 5);
   textNode
     .dx(horizontalMargin * ((textNode.attr(&#x27;text-anchor&#x27;) &#x3D;&#x3D; &#x27;end&#x27;) ? -1 : 1))
     .dy(verticalMargin * ((font[&#x27;alignment-baseline&#x27;] &#x3D;&#x3D; &#x27;bottom&#x27;) ? -1 : 1));
-  background.attr({
-    x: textNode.bbox().x,
-    y: textNode.bbox().y,
-    width: textNode.bbox().width,
-    height: textNode.bbox().height
-  });
+  if (background !&#x3D;&#x3D; undefined)
+    background.attr({
+      x: textNode.bbox().x,
+      y: textNode.bbox().y,
+      width: textNode.bbox().width,
+      height: textNode.bbox().height
+    });
   return group;
 }
 
@@ -401,7 +423,7 @@ <h1>Source: thermodynamicDiagram/Functions.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/thermodynamicDiagram_Hodograph.js.html b/doc/thermodynamicDiagram_Hodograph.js.html
index 100728bc..88714f11 100644
--- a/doc/thermodynamicDiagram_Hodograph.js.html
+++ b/doc/thermodynamicDiagram_Hodograph.js.html
@@ -32,13 +32,18 @@ <h1>Source: thermodynamicDiagram/Hodograph.js</h1>
             <pre class="prettyprint linenums"><code>/**
  * @module meteoJS/thermodynamicDiagram/hodograph
  */
-import { windspeedKMHToMS,
+import {
+  windspeedKMHToMS,
   windspeedKNToMS,
-  windspeedMSToKMH } from &#x27;../calc.js&#x27;;
+  windspeedMSToKMH,
+  windspeedMSToKN } from &#x27;../calc.js&#x27;;
 import {
   getNormalizedLineOptions,
-  getNormalizedTextOptions
+  getNormalizedTextOptions,
+  getNormalizedFontOptions,
+  drawTextInto
 } from &#x27;./Functions.js&#x27;;
+import CoordinateSystem from &#x27;./CoordinateSystem.js&#x27;;
 import PlotDataArea from &#x27;./PlotDataArea.js&#x27;;
 
 /**
@@ -51,14 +56,67 @@ <h1>Source: thermodynamicDiagram/Hodograph.js</h1>
  *   In m/s.
  */
 
+/**
+ * Options for a text backdrop.
+ * 
+ * @typedef {Object}
+ *   module:meteoJS/thermodynamicDiagram/hodograph~backdropOptions
+ * @property {boolean} [visible&#x3D;true] - Visibility.
+ * @property {mixed} [color&#x3D;&#x27;white&#x27;] - Color.
+ */
+
 /**
  * Options for the grid labels.
  * 
  * @typedef {module:meteoJS/thermodynamicDiagram~textOptions}
  *   module:meteoJS/thermodynamicDiagram/hodograph~gridLabelsOptions
- * @param {number} [angle&#x3D;45]
- *   Angle of the labels startin from the origin
+ * @property {number} [angle&#x3D;45]
+ *   Angle of the labels starting from the origin
  *   (in degrees, 0 relates to North).
+ * @property {string} [unit&#x3D;&#x27;km/h&#x27;]
+ *   Unit of the label values. Allowed values: &#x27;m/s&#x27;, &#x27;kn&#x27;, &#x27;km/h&#x27;
+ * @property {string} [prefix&#x3D;&#x27;&#x27;] - Prefix of the label text.
+ * @property {integer} [decimalPlaces&#x3D;0] - Number of digits to appear after
+ *   the decimal point of the label values.
+ * @property {module:meteoJS/thermodynamicDiagram/hodograph~backdropOptions}
+ *   [backdrop] - Options for the backdrop of the grid labels.
+ */
+
+/**
+ * Options for the hover labels in the hodograph.
+ * 
+ * @typedef {module:meteoJS/thermodynamicDiagram/tdDiagram~labelsOptions}
+ *   module:meteoJS/thermodynamicDiagram/hodograph~labelsOptions
+ * @property {Object} [pressure] - Options for the output of the pressure value.
+ * @property {boolean} [pressure.visible&#x3D;true] - Visibility.
+ * @property {integer} [pressure.decimalPlaces&#x3D;0]
+ *   Number of digits to appear after the decimal point.
+ * @property {string} [pressure.prefix&#x3D;&#x27; hPa&#x27;] - Prefix of the value text.
+ * @property {Object} [windspeed]
+ *   Options for the output of the windspeed value.
+ * @property {boolean} [windspeed.visible&#x3D;true] - Visibility.
+ * @property {string} [windspeed.unit&#x3D;&#x27;km/h&#x27;]
+ *   Unit of the value text. Allowed values: &#x27;m/s&#x27;, &#x27;kn&#x27;, &#x27;km/h&#x27;
+ * @property {integer} [windspeed.decimalPlaces&#x3D;0]
+ *   Number of digits to appear after the decimal point.
+ * @property {string} [windspeed.prefix&#x3D;&#x27; kn&#x27;] - Prefix of the value text.
+ * @property {Object} [winddir] - Options for the output of the winddir value.
+ * @property {boolean} [winddir.visible&#x3D;true] - Visibility.
+ * @property {integer} [winddir.decimalPlaces&#x3D;0]
+ *   Number of digits to appear after the decimal point.
+ * @property {string} [winddir.prefix&#x3D;&#x27;°&#x27;] - Prefix of the value text.
+ */
+
+/**
+ * Options for the hover labels.
+ * 
+ * @typedef {module:meteoJS/thermodynamicDiagram/plotDataArea~hoverLabelsOptions}
+ *   module:meteoJS/thermodynamicDiagram/hodograph~hoverLabelsOptions
+ * @property {number} [maxDistance&#x3D;20]
+ *   Maximum distance to a data point to show a hover label in pixels.
+ *   If undefined, always a hover label to the nearest point is shown.
+ * @property {module:meteoJS/thermodynamicDiagram/hodograph~labelsOptions}
+ *   [hodograph] - Options for hodograph label.
  */
 
 /**
@@ -75,7 +133,7 @@ <h1>Source: thermodynamicDiagram/Hodograph.js</h1>
  *   [grid.labels] - Options for the hodograph grid labels.
  * @param {number|undefined} [grid.max&#x3D;undefined]
  *   Maximum value for the grid axes and circles. If undefined, determined from
- *   &#x27;minWindspeedRange&#x27;.
+ *   &#x27;windspeedMax&#x27;.
  * @param {number} [windspeedMax&#x3D;41.67]
  *   The maximum windspeed [m/s], that should be visible on the plot. This
  *   refers to the x- or y-direction with the origin in the middle of the plot,
@@ -86,8 +144,10 @@ <h1>Source: thermodynamicDiagram/Hodograph.js</h1>
  *   move, use an array with 2 elements. The first element moves the origin in
  *   x direction, the second in y direction. The values are interpreted as
  *   relative length (relating to the half width resp. height). Positive values
- *   to move in South-West direction. E.g. to move the origin the half way to
- *   South-West, use [0.5, 0.5].
+ *   to move in North-East direction. E.g. to move the origin the half way to
+ *   the upper right corner, use [0.5, 0.5].
+ * @param {module:meteoJS/thermodynamicDiagram/hodograph~hoverLabelsOptions}
+ *   [hoverLabels] - Hover labels options.
  */
 
 /**
@@ -105,7 +165,7 @@ <h1>Source: thermodynamicDiagram/Hodograph.js</h1>
    */
   constructor({
     svgNode &#x3D; undefined,
-    coordinateSystem,
+    coordinateSystem &#x3D; new CoordinateSystem(),
     x,
     y,
     width,
@@ -113,6 +173,7 @@ <h1>Source: thermodynamicDiagram/Hodograph.js</h1>
     style &#x3D; {},
     visible &#x3D; true,
     events &#x3D; {},
+    hoverLabels &#x3D; {},
     dataGroupIds &#x3D; [&#x27;windbarbs&#x27;],
     getCoordinatesByLevelData &#x3D; (dataGroupId, sounding, levelData, plotArea) &#x3D;&gt; {
       if (levelData.wspd &#x3D;&#x3D;&#x3D; undefined ||
@@ -127,9 +188,67 @@ <h1>Source: thermodynamicDiagram/Hodograph.js</h1>
       };
     },
     insertDataGroupInto &#x3D; (svgNode, dataGroupId, sounding, data) &#x3D;&gt; {
-      svgNode
-        .polyline(data.map(level &#x3D;&gt; [ level.x, level.y ]))
-        .fill(&#x27;none&#x27;).stroke(sounding.options.hodograph.style);
+      const basePolylines &#x3D; [data
+        .filter(level &#x3D;&gt; {
+          if (sounding.options.hodograph.minPressure !&#x3D;&#x3D; undefined
+            &amp;amp;&amp;amp; level.levelData.pres !&#x3D;&#x3D; undefined
+            &amp;amp;&amp;amp; level.levelData.pres &amp;lt; sounding.options.hodograph.minPressure)
+            return false;
+          if (sounding.options.hodograph.maxPressure !&#x3D;&#x3D; undefined
+            &amp;amp;&amp;amp; level.levelData.pres !&#x3D;&#x3D; undefined
+            &amp;amp;&amp;amp; level.levelData.pres &gt; sounding.options.hodograph.maxPressure)
+            return false;
+          return true;
+        })];
+      basePolylines[0].sort((a,b) &#x3D;&gt; b.levelData.pres-a.levelData.pres);
+      const segmentPolylines &#x3D; [];
+      for (const segment of sounding.options.hodograph.segments) {
+        const def &#x3D; {
+          levels: [],
+          visible: segment.visible,
+          style: segment.style
+        };
+        basePolylines.map((basePolyline, i) &#x3D;&gt; {
+          let lowSplit &#x3D; undefined;
+          let highSplit &#x3D; undefined;
+          basePolyline.map(l &#x3D;&gt; {
+            if ((segment.minPressure !&#x3D;&#x3D; undefined &amp;amp;&amp;amp; segment.minPressure &amp;lt;&#x3D; l.levelData.pres
+              &amp;amp;&amp;amp; segment.maxPressure !&#x3D;&#x3D; undefined &amp;amp;&amp;amp; segment.maxPressure &gt;&#x3D; l.levelData.pres)
+              || (segment.minPressure &#x3D;&#x3D;&#x3D; undefined
+              &amp;amp;&amp;amp; segment.maxPressure !&#x3D;&#x3D; undefined &amp;amp;&amp;amp; segment.maxPressure &gt;&#x3D; l.levelData.pres)
+              || (segment.minPressure !&#x3D;&#x3D; undefined &amp;amp;&amp;amp; segment.minPressure &amp;lt;&#x3D; l.levelData.pres
+              &amp;amp;&amp;amp; segment.maxPressure &#x3D;&#x3D;&#x3D; undefined)) {
+              def.levels.push(l);
+              if (highSplit &#x3D;&#x3D;&#x3D; undefined)
+                highSplit &#x3D; l;
+              lowSplit &#x3D; l;
+            }
+          });
+          if (highSplit !&#x3D;&#x3D; undefined &amp;amp;&amp;amp; lowSplit !&#x3D;&#x3D; undefined &amp;amp;&amp;amp; highSplit !&#x3D;&#x3D; lowSplit) {
+            const indexLow &#x3D; basePolyline
+              .findIndex(l &#x3D;&gt; l.levelData.pres &#x3D;&#x3D;&#x3D; lowSplit.levelData.pres);
+            const indexHigh &#x3D; basePolyline
+              .findIndex(l &#x3D;&gt; l.levelData.pres &#x3D;&#x3D;&#x3D; highSplit.levelData.pres);
+            const newBaseLine &#x3D; basePolyline.slice(indexLow);
+            basePolylines[i] &#x3D; basePolyline.slice(0, indexHigh+1);
+            basePolylines.push(newBaseLine);
+          }
+        });
+        if (def.levels.length &gt; 0)
+          segmentPolylines.push(def);
+      }
+      basePolylines.map(basePolyline &#x3D;&gt; {
+        if (basePolyline.length &amp;lt; 2)
+          return;
+        svgNode
+          .polyline(basePolyline.map(level &#x3D;&gt; [ level.x, level.y ]))
+          .fill(&#x27;none&#x27;).stroke(sounding.options.hodograph.style);
+      });
+      segmentPolylines.map(segmentPolyline &#x3D;&gt; {
+        svgNode
+          .polyline(segmentPolyline.levels.map(level &#x3D;&gt; [ level.x, level.y ]))
+          .fill(&#x27;none&#x27;).stroke(segmentPolyline.style);
+      });
     },
     grid &#x3D; {},
     windspeedMax &#x3D; windspeedKNToMS(150),
@@ -147,6 +266,7 @@ <h1>Source: thermodynamicDiagram/Hodograph.js</h1>
       style,
       visible,
       events,
+      hoverLabels,
       dataGroupIds,
       getCoordinatesByLevelData,
       insertDataGroupInto,
@@ -155,23 +275,82 @@ <h1>Source: thermodynamicDiagram/Hodograph.js</h1>
       filterDataPoint,
       minDataPointsDistance
     });
+
+    /**
+     * @type number[]|undefined
+     * @private
+     */
+    this._origin &#x3D; origin;
+
+    /**
+     * @type number
+     * @private
+     */
+    this._windspeedMax &#x3D; windspeedMax;
     
     this._gridOptions &#x3D; this.getNormalizedGridOptions(grid);
-    
-    this.center &#x3D; [this.width/2, this.height/2];
-    if (origin !&#x3D;&#x3D; undefined) {
-      this.center[0] -&#x3D; origin[0] * this.minLength/2;
-      this.center[1] +&#x3D; origin[1] * this.minLength/2;
-    }
-    this.pixelPerSpeed &#x3D; Math.min(
-      Math.max(this.width - this.center[0], this.center[0]),
-      Math.max(this.height - this.center[1], this.center[1])
-    ) / windspeedMax;
+
     if (this._gridOptions.max &#x3D;&#x3D;&#x3D; undefined)
       this._gridOptions.max &#x3D; windspeedMax;
-    
     this.init();
   }
+
+  /**
+   * Origin of the hodograph relative to the plot area. If not undefined, it
+   * has to be a 2-element array. The first element moves the origin in
+   * x direction, the second in y direction. The values are interpreted as
+   * relative length (relating to the half width resp. height). Positive values
+   * to move in North-East direction. E.g. to move the origin the half way to
+   * the upper right corner, use [0.5, 0.5].
+   * 
+   * @type number[]|undefined
+   * @public
+   */
+  get origin() {
+    return this._origin;
+  }
+  set origin(origin) {
+    const oldOrigin &#x3D; this._origin;
+    this._origin &#x3D; origin;
+    this._hoverLabelsGroup.clear();
+    if (oldOrigin &#x3D;&#x3D;&#x3D; undefined &amp;amp;&amp;amp; this._origin !&#x3D;&#x3D; undefined
+      || oldOrigin !&#x3D;&#x3D; undefined &amp;amp;&amp;amp; this._origin &#x3D;&#x3D;&#x3D; undefined
+      || (oldOrigin !&#x3D;&#x3D; undefined &amp;amp;&amp;amp; this._origin !&#x3D;&#x3D; undefined
+      &amp;amp;&amp;amp; (oldOrigin[0] !&#x3D; this._origin[0]
+      || oldOrigin[1] !&#x3D; this._origin[1])))
+      this.onCoordinateSystemChange();
+  }
+
+  /**
+   * The origin of the hodograph in pixel coordinates.
+   * 
+   * @type number[]
+   * @public
+   * @readonly
+   */
+  get center() {
+    const center &#x3D; [this.width/2, this.height/2];
+    if (this._origin !&#x3D;&#x3D; undefined) {
+      center[0] +&#x3D; this._origin[0] * this.minExtentLength/2;
+      center[1] -&#x3D; this._origin[1] * this.minExtentLength/2;
+    }
+    return center;
+  }
+
+  /**
+   * Returns the pixel per speed unit. Mainly for internal usage.
+   * 
+   * @type number
+   * @public
+   * @readonly
+   */
+  get pixelPerSpeed() {
+    const center &#x3D; this.center;
+    return Math.min(
+      Math.max(this.width - center[0], center[0]),
+      Math.max(this.height - center[1], center[1])
+    ) / this._windspeedMax;
+  }
   
   /**
    * Plots hodograph background.
@@ -181,35 +360,15 @@ <h1>Source: thermodynamicDiagram/Hodograph.js</h1>
   _drawBackground(svgNode) {
     super._drawBackground(svgNode);
     
-    // border, background
-    svgNode
-      .rect(this.width-2, this.height-2)
-      .move(1,1)
-      .fill({color: &#x27;white&#x27;})
-      .stroke({color: &#x27;black&#x27;, width: 1});
-    //.attr({rx: 10, ry: 10});
-    
+    const center &#x3D; this.center;
+    const pixelPerSpeed &#x3D; this.pixelPerSpeed;
     // x-/y-axes
     if (this._gridOptions.axes.visible) {
-      let axesLength &#x3D;
-        this._gridOptions.max + this._gridOptions.circles.interval / 2;
       svgNode
-        .line(
-          Math.max(0, this.center[0] - axesLength * this.pixelPerSpeed),
-          this.center[1],
-          Math.min(this.width,
-            this.center[0] + axesLength * this.pixelPerSpeed),
-          this.center[1]
-        )
+        .line(0, center[1], this.width, center[1])
         .stroke(this._gridOptions.axes.style);
       svgNode
-        .line(
-          this.center[0],
-          Math.max(0, this.center[1] - axesLength * this.pixelPerSpeed),
-          this.center[0],
-          Math.min(this.height,
-            this.center[1] + axesLength * this.pixelPerSpeed)
-        )
+        .line(center[0], 0, center[0], this.height)
         .stroke(this._gridOptions.axes.style);
     }
     
@@ -217,12 +376,12 @@ <h1>Source: thermodynamicDiagram/Hodograph.js</h1>
     for (let v &#x3D; this._gridOptions.circles.interval;
       v &amp;lt;&#x3D; this._gridOptions.max;
       v +&#x3D; this._gridOptions.circles.interval) {
-      let radius &#x3D; v * this.pixelPerSpeed;
+      let radius &#x3D; v * pixelPerSpeed;
       svgNode
         .circle(2*radius)
         .attr({
-          cx: this.center[0],
-          cy: this.center[1]
+          cx: center[0],
+          cy: center[1]
         })
         .fill(&#x27;none&#x27;)
         .stroke(this._gridOptions.circles.style);
@@ -233,34 +392,51 @@ <h1>Source: thermodynamicDiagram/Hodograph.js</h1>
         let yText &#x3D;
           radius *
           Math.sin((this._gridOptions.labels.angle - 90) / 180 * Math.PI);
-        let textAnchor &#x3D; &#x27;middle&#x27;;
-        let dx &#x3D; 0;
-        let dy &#x3D; -this._gridOptions.labels.font.size;
-        if (this._gridOptions.labels.angle &#x3D;&#x3D; 0 ||
-          this._gridOptions.labels.angle &#x3D;&#x3D; 180) {
-          dx &#x3D; -3;
-          textAnchor &#x3D; &#x27;end&#x27;;
+        let text &#x3D; &#x27;&#x27;;
+        switch (this._gridOptions.labels.unit) {
+        case &#x27;m/s&#x27;:
+          text &#x3D; Number.parseFloat(v)
+            .toFixed(this._gridOptions.labels.decimalPlaces);
+          break;
+        case &#x27;kn&#x27;:
+          text &#x3D; windspeedMSToKN(v)
+            .toFixed(this._gridOptions.labels.decimalPlaces);
+          break;
+        default:
+          text &#x3D; windspeedMSToKMH(v)
+            .toFixed(this._gridOptions.labels.decimalPlaces);
+          break;
+        }
+        text +&#x3D; this._gridOptions.labels.prefix;
+        let fontColor &#x3D; undefined;
+        const font &#x3D; {...this._gridOptions.labels.font};
+        if (&#x27;color&#x27; in font) {
+          fontColor &#x3D; font.color;
+          delete font.color;
+        }
+        const textNode &#x3D; svgNode
+          .plain(text)
+          .font(this._gridOptions.labels.font)
+          .center(center[0] + xText, center[1] + yText);
+        if (fontColor !&#x3D;&#x3D; undefined)
+          textNode.fill(fontColor);
+        if (font[&#x27;text-anchor&#x27;] &#x3D;&#x3D; &#x27;end&#x27;)
+          textNode.dx(-textNode.bbox().width/2-3);
+        else if (font[&#x27;text-anchor&#x27;] &#x3D;&#x3D; &#x27;start&#x27;)
+          textNode.dx(+textNode.bbox().width/2+3);
+        if (this._gridOptions.labels.angle &#x3D;&#x3D; 90
+          || this._gridOptions.labels.angle &#x3D;&#x3D; 270)
+          textNode.dy(textNode.bbox().height/2+3);
+
+        if (this._gridOptions.labels.backdrop.visible) {
+          const bbox &#x3D; textNode.bbox();
+          textNode.before(
+            svgNode
+              .rect(bbox.width, bbox.height)
+              .move(bbox.x, bbox.y)
+              .fill({ color: this._gridOptions.labels.backdrop.color })
+          );
         }
-        else if (this._gridOptions.labels.angle &#x3D;&#x3D; 90 ||
-               this._gridOptions.labels.angle &#x3D;&#x3D; 270)
-          dy &#x3D; -3;
-        let text &#x3D; svgNode
-          .plain(&#x27;&#x27; + Math.round(windspeedMSToKMH(v)))
-          .move(this.center[0] + xText, this.center[1] + yText)
-          .attr({
-            &#x27;text-anchor&#x27;: textAnchor,
-            //&#x27;alignment-baseline&#x27;: &#x27;middle&#x27;
-            dx: dx,
-            dy: dy // XXX: Hack für Firefox
-          })
-          .font(this._gridOptions.labels.font);
-        let bbox &#x3D; text.bbox();
-        text.before(
-          svgNode
-            .rect(bbox.width, bbox.height)
-            .move(bbox.x, bbox.y)
-            .fill(&#x27;white&#x27;)
-        );
       }
     }
   }
@@ -285,6 +461,22 @@ <h1>Source: thermodynamicDiagram/Hodograph.js</h1>
     if (!(&#x27;angle&#x27; in labels) ||
         labels.angle &#x3D;&#x3D;&#x3D; undefined)
       labels.angle &#x3D; 225;
+    if (!(&#x27;unit&#x27; in labels) ||
+        labels.unit &#x3D;&#x3D;&#x3D; undefined)
+      labels.unit &#x3D; &#x27;km/h&#x27;;
+    if (!(&#x27;prefix&#x27; in labels) ||
+        labels.prefix &#x3D;&#x3D;&#x3D; undefined)
+      labels.prefix &#x3D; &#x27;&#x27;;
+    if (!(&#x27;decimalPlaces&#x27; in labels) ||
+        labels.decimalPlaces &#x3D;&#x3D;&#x3D; undefined)
+      labels.decimalPlaces &#x3D; 0;
+    if (!(&#x27;backdrop&#x27; in labels) ||
+      labels.backdrop &#x3D;&#x3D;&#x3D; undefined)
+      labels.backdrop &#x3D; {};
+    if (!(&#x27;color&#x27; in labels.backdrop))
+      labels.backdrop.color &#x3D; &#x27;white&#x27;;
+    if (!(&#x27;visible&#x27; in labels.backdrop))
+      labels.backdrop.visible &#x3D; true;
     if (labels.font.size &#x3D;&#x3D;&#x3D; undefined)
       labels.font.size &#x3D; 10;
     
@@ -295,6 +487,232 @@ <h1>Source: thermodynamicDiagram/Hodograph.js</h1>
       max
     };
   }
+
+  /**
+   * Initialize hover labels options.
+   * 
+   * @param {module:meteoJS/thermodynamicDiagram/hodograph~hoverLabelsOptions}
+   *   options - Hover labels options.
+   */
+  _initHoverLabels({
+    visible &#x3D; true,
+    type &#x3D; &#x27;mousemove&#x27;,
+    maxDistance &#x3D; 20,
+    insertLabelsFunc &#x3D; undefined,
+    getLevelData &#x3D; ({ hoverLabelsSounding, e, maxDistance }) &#x3D;&gt; {
+      const sounding &#x3D; hoverLabelsSounding.sounding;
+
+      let smallestDistanceSquare &#x3D; undefined;
+      let nearestLevelData &#x3D; undefined;
+      sounding.getLevels()
+        .filter(pres &#x3D;&gt; 
+          (hoverLabelsSounding.options.hodograph.minPressure &#x3D;&#x3D;&#x3D; undefined
+          || hoverLabelsSounding.options.hodograph.minPressure &amp;lt;&#x3D; pres)
+          &amp;amp;&amp;amp; (hoverLabelsSounding.options.hodograph.maxPressure &#x3D;&#x3D;&#x3D; undefined
+          || pres &amp;lt;&#x3D; hoverLabelsSounding.options.hodograph.maxPressure))
+        .map(pres &#x3D;&gt; {
+          const levelData &#x3D; sounding.getData(pres);
+          if (levelData.wspd &#x3D;&#x3D;&#x3D; undefined || levelData.wdir &#x3D;&#x3D;&#x3D; undefined)
+            return;
+          const { x, y } &#x3D;
+            this._getCoordinatesByLevelData(&#x27;windbarbs&#x27;,
+              sounding, levelData, this);
+          const distanceSquare &#x3D;
+            Math.pow(e.elementX - x, 2)
+            + Math.pow(e.elementY - y, 2);
+          if (nearestLevelData &#x3D;&#x3D;&#x3D; undefined
+            || distanceSquare &amp;lt; smallestDistanceSquare) {
+            smallestDistanceSquare &#x3D; distanceSquare;
+            nearestLevelData &#x3D; levelData;
+          }
+        });
+
+      if (maxDistance !&#x3D;&#x3D; undefined
+        &amp;amp;&amp;amp; Math.pow(maxDistance, 2) &amp;lt; smallestDistanceSquare)
+        nearestLevelData &#x3D; {};
+      return nearestLevelData;
+    },
+    hodograph &#x3D; {}
+  }) {
+    if (!(&#x27;visible&#x27; in hodograph))
+      hodograph.visible &#x3D; true;
+    if (!(&#x27;style&#x27; in hodograph))
+      hodograph.style &#x3D; {};
+    hodograph.font &#x3D; getNormalizedFontOptions(hodograph.font, {
+      anchor: &#x27;end&#x27;,
+      &#x27;alignment-baseline&#x27;: &#x27;bottom&#x27;
+    });
+    if (!(&#x27;fill&#x27; in hodograph))
+      hodograph.fill &#x3D; {};
+    if (hodograph.fill.opacity &#x3D;&#x3D;&#x3D; undefined)
+      hodograph.fill.opacity &#x3D; 0.7;
+    if (hodograph.fill.color &#x3D;&#x3D;&#x3D; undefined)
+      hodograph.fill.color &#x3D; &#x27;white&#x27;;
+    if (insertLabelsFunc &#x3D;&#x3D;&#x3D; undefined)
+      insertLabelsFunc &#x3D; this._makeInsertLabelsFunc(hodograph);
+
+    super._initHoverLabels({
+      visible,
+      type,
+      maxDistance,
+      insertLabelsFunc,
+      getLevelData
+    });
+  }
+
+  /**
+   * Makes a default insertLabelsFunc.
+   * 
+   * @param {module:meteoJS/thermodynamicDiagram/hodograph~labelsOptions}
+   *   options - Style options for the hover labels.
+   * @private
+   */
+  _makeInsertLabelsFunc({
+    visible &#x3D; true,
+    style &#x3D; {},
+    font &#x3D; {},
+    fill &#x3D; {},
+    horizontalMargin &#x3D; 10,
+    verticalMargin &#x3D; 0,
+    radius &#x3D; undefined,
+    radiusPlus &#x3D; 2,
+    pressure &#x3D; {},
+    windspeed &#x3D; {},
+    winddir &#x3D; {}
+  }) {
+    pressure &#x3D; (({
+      visible &#x3D; true,
+      decimalPlaces &#x3D; 0,
+      prefix &#x3D; &#x27; hPa&#x27;
+    }) &#x3D;&gt; { return { visible, decimalPlaces, prefix }; })(pressure);
+    windspeed &#x3D;  (({
+      visible &#x3D; true,
+      unit &#x3D; &#x27;kn&#x27;,
+      decimalPlaces &#x3D; 0,
+      prefix &#x3D; &#x27; kn&#x27;
+    }) &#x3D;&gt; { return { visible, unit, decimalPlaces, prefix }; })(windspeed);
+    winddir &#x3D;  (({
+      visible &#x3D; true,
+      decimalPlaces &#x3D; 0,
+      prefix &#x3D; &#x27;°&#x27;
+    }) &#x3D;&gt; { return { visible, decimalPlaces, prefix }; })(winddir);
+    return (sounding, levelData, group) &#x3D;&gt; {
+      group.clear();
+
+      if (levelData &#x3D;&#x3D;&#x3D; undefined
+        || !visible)
+        return;
+
+      const { x, y } &#x3D;
+        this._getCoordinatesByLevelData(&#x27;windbarbs&#x27;,
+          sounding, levelData, this);
+      if (x &#x3D;&#x3D;&#x3D; undefined ||
+          y &#x3D;&#x3D;&#x3D; undefined)
+        return;
+
+      let defaultStyle &#x3D; sounding.options.hodograph.style;
+      if (levelData.pres !&#x3D;&#x3D; undefined)
+        sounding.options.hodograph.segments.map(segment &#x3D;&gt; {
+          if ((segment.minPressure &#x3D;&#x3D;&#x3D; undefined
+            || segment.minPressure &amp;lt;&#x3D; levelData.pres)
+            &amp;amp;&amp;amp; (segment.maxPressure &#x3D;&#x3D;&#x3D; undefined
+            || segment.maxPressure &gt;&#x3D; levelData.pres))
+            defaultStyle &#x3D; segment.style;
+        });
+      
+      const dotRadius &#x3D; (radius &#x3D;&#x3D;&#x3D; undefined)
+        ? defaultStyle.width / 2 + radiusPlus
+        : radius;
+      const fillOptions &#x3D; {...style}; // Deep copy
+      if (!(&#x27;color&#x27; in fillOptions))
+        fillOptions.color &#x3D; defaultStyle.color;
+      group
+        .circle(2 * dotRadius)
+        .attr({ cx: x, cy: y })
+        .fill(fillOptions);
+      const background &#x3D; group.rect().fill(fill);
+      const labelFont &#x3D; {...font}; // Deep copy
+      labelFont.anchor &#x3D; &#x27;start&#x27;;
+      if (labelFont.anchor &#x3D;&#x3D; &#x27;start&#x27; &amp;amp;&amp;amp;
+          this.width - x &amp;lt; 45)
+        labelFont.anchor &#x3D; &#x27;end&#x27;;
+      if (labelFont.anchor &#x3D;&#x3D; &#x27;end&#x27; &amp;amp;&amp;amp;
+          x &amp;lt; 45)
+        labelFont.anchor &#x3D; &#x27;start&#x27;;
+      let yDelta &#x3D; 0;
+      let textGroups &#x3D; [];
+      const texts &#x3D; [];
+      if (pressure.visible) {
+        const text &#x3D; Number.parseFloat(levelData.pres)
+          .toFixed(pressure.decimalPlaces);
+        texts.push(&#x60;${text}${pressure.prefix}&#x60;);
+      }
+      if (windspeed.visible) {
+        let text &#x3D; &#x27;&#x27;;
+        switch (windspeed.unit) {
+        case &#x27;m/s&#x27;:
+          text &#x3D; Number.parseFloat(levelData.wspd)
+            .toFixed(windspeed.decimalPlaces);
+          break;
+        case &#x27;kn&#x27;:
+          text &#x3D; windspeedMSToKN(levelData.wspd)
+            .toFixed(windspeed.decimalPlaces);
+          break;
+        default:
+          text &#x3D; windspeedMSToKMH(levelData.wspd)
+            .toFixed(windspeed.decimalPlaces);
+          break;
+        }
+        texts.push(&#x60;${text}${windspeed.prefix}&#x60;);
+      }
+      if (winddir.visible) {
+        const text &#x3D; Number.parseFloat(levelData.wdir)
+          .toFixed(winddir.decimalPlaces);
+        texts.push(&#x60;${text}${winddir.prefix}&#x60;);
+      }
+      texts.map(text &#x3D;&gt; {
+        yDelta +&#x3D; labelFont.size * 5/4;
+        textGroups.push(drawTextInto({
+          node: group,
+          text,
+          x,
+          y: y + yDelta,
+          horizontalMargin,
+          verticalMargin,
+          font: labelFont
+        }));
+      });
+      if (y+yDelta &gt; this.height)
+        textGroups.map(g &#x3D;&gt; g.dy(-yDelta));
+      const maxBBox &#x3D; {
+        x: undefined,
+        y: undefined,
+        x2: undefined,
+        y2: undefined
+      };
+      textGroups.map(g &#x3D;&gt; {
+        g.children().map(el &#x3D;&gt; {
+          if (el.type !&#x3D; &#x27;text&#x27;)
+            return;
+          const bbox &#x3D; el.bbox();
+          if (maxBBox.x &#x3D;&#x3D;&#x3D; undefined || bbox.x &amp;lt; maxBBox.x)
+            maxBBox.x &#x3D; bbox.x;
+          if (maxBBox.y &#x3D;&#x3D;&#x3D; undefined || bbox.y &amp;lt; maxBBox.y)
+            maxBBox.y &#x3D; bbox.y;
+          if (maxBBox.x2 &#x3D;&#x3D;&#x3D; undefined || maxBBox.x2 &amp;lt; bbox.x2)
+            maxBBox.x2 &#x3D; bbox.x2;
+          if (maxBBox.y2 &#x3D;&#x3D;&#x3D; undefined || maxBBox.y2 &amp;lt; bbox.y2)
+            maxBBox.y2 &#x3D; bbox.y2;
+        });
+      });
+      background.attr({
+        x: maxBBox.x,
+        y: maxBBox.y,
+        width: maxBBox.x2 - maxBBox.x,
+        height: maxBBox.y2 - maxBBox.y
+      });
+    };
+  }
 }
 export default Hodograph;</code></pre>
           </article>
@@ -306,7 +724,7 @@ <h1>Source: thermodynamicDiagram/Hodograph.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/thermodynamicDiagram_PlotAltitudeDataArea.js.html b/doc/thermodynamicDiagram_PlotAltitudeDataArea.js.html
index 2584bd97..5d156c4c 100644
--- a/doc/thermodynamicDiagram_PlotAltitudeDataArea.js.html
+++ b/doc/thermodynamicDiagram_PlotAltitudeDataArea.js.html
@@ -35,30 +35,13 @@ <h1>Source: thermodynamicDiagram/PlotAltitudeDataArea.js</h1>
 import PlotDataArea from &#x27;./PlotDataArea.js&#x27;;
 
 /**
- * Function to insert labels.
+ * Options for labels on hovering the diagram. Extended by the &quot;remote&quot; option.
  * 
- * @typedef {Function}
- *   module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea~insertLabelsFunc
- * @param {module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding}
- *   sounding - Diagram sounding to label.
- * @param {Object} levelData - Data to label.
- * @param {external:SVG} group - SVG group to insert labels.
- */
-
-/**
- * Options for labels on hovering the diagram.
- * 
- * @typedef {Object}
+ * @typedef {module:meteoJS/thermodynamicDiagram/plotDataArea~hoverLabelsOptions}
  *   module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea~hoverLabelsOptions
- * @property {boolean} [visible&#x3D;true] - Visibility.
- * @property {string} [type&#x3D;&#x27;mousemove&#x27;] - Event type.
- * @property {boolean} [snapToData&#x3D;true]
- *   Snap labels to data points.
  * @property {boolean} [remote&#x3D;true]
  *   Show labels relative to the mouse position on the diagram, even when the
  *   pointer isn&#x27;t directly on the plot area.
- * @property {module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea~insertLabelsFunc}
- *   [insertLabelsFunc] - Called to insert labels into a SVG group.
  */
 
 /**
@@ -66,7 +49,7 @@ <h1>Source: thermodynamicDiagram/PlotAltitudeDataArea.js</h1>
  * 
  * @typedef {module:meteoJS/thermodynamicDiagram/plotDataArea~options}
  *   module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea~options
- * @param {module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea~hoverLabelsOptions}
+ * @property {module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea~hoverLabelsOptions}
  *   [hoverLabels] - Hover labels options.
  */
 
@@ -112,6 +95,7 @@ <h1>Source: thermodynamicDiagram/PlotAltitudeDataArea.js</h1>
       style,
       visible,
       events,
+      hoverLabels,
       getSoundingVisibility,
       dataGroupIds,
       getCoordinatesByLevelData,
@@ -120,41 +104,11 @@ <h1>Source: thermodynamicDiagram/PlotAltitudeDataArea.js</h1>
       minDataPointsDistance
     });
     
-    /**
-     * @type external:SVG
-     * @private
-     */
-    this._hoverLabelsGroup &#x3D; this.svgNode.group();
-    
     /**
      * @type boolean
      * @private
      */
-    this._isHoverLabelsRemote &#x3D; true;
-    
-    this._initHoverLabels(hoverLabels);
-  }
-  
-  /**
-   * Called, when a sounding changes its visibilty.
-   * 
-   * @override
-   */
-  onChangeSoundingVisibility(sounding, group) {
-    super.onChangeSoundingVisibility(sounding, group);
-    this._hoverLabelsGroup.clear();
-  }
-  
-  /**
-   * Draw the sounding into the SVG group.
-   * 
-   * @override
-   */
-  drawSounding(sounding, group) {
-    super.drawSounding(sounding, group);
-    /* Only hide hoverLabels, when Sounding is visible. */
-    if (this._getSoundingVisibility(sounding))
-      this._hoverLabelsGroup.clear();
+    this._isHoverLabelsRemote;
   }
   
   /**
@@ -184,46 +138,34 @@ <h1>Source: thermodynamicDiagram/PlotAltitudeDataArea.js</h1>
     return this._isHoverLabelsRemote;
   }
   
-  get hoverLabelsSounding() {
-    // Wie &quot;manuell&quot; setzen?
-    for (let sounding of this._soundings.keys()) {
-      if (this._getSoundingVisibility(sounding))
-        return sounding;
-    }
-    return undefined;
-  }
-  
   /**
    * Initialize hover labels options.
    * 
    * @param {module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea~hoverLabelsOptions}
    *   options - Hover labels options.
+   * @override
    */
   _initHoverLabels({
     visible &#x3D; true,
     type &#x3D; &#x27;mousemove&#x27;,
-    //snapToData &#x3D; true,
+    maxDistance &#x3D; undefined,
     remote &#x3D; true,
-    insertLabelsFunc &#x3D; undefined
-  }) {
-    this._isHoverLabelsRemote &#x3D; remote;
-    
-    if (!visible ||
-        insertLabelsFunc &#x3D;&#x3D;&#x3D; undefined)
-      return;
-    
-    this.on(&#x27;change:extent&#x27;, () &#x3D;&gt; this._hoverLabelsGroup.clear());
-    this.on(type, e &#x3D;&gt; {
+    insertLabelsFunc &#x3D; undefined,
+    getLevelData &#x3D; ({ hoverLabelsSounding, e }) &#x3D;&gt; {
       if (!e.diagramPres)
-        return;
-      const hoverLabelsSounding &#x3D; this.hoverLabelsSounding;
-      if (hoverLabelsSounding &#x3D;&#x3D;&#x3D; undefined)
-        return;
-      
+        return {};
       const sounding &#x3D; hoverLabelsSounding.sounding;
-      insertLabelsFunc(hoverLabelsSounding,
-        sounding.getData(sounding.getNearestLevel(e.diagramPres)),
-        this._hoverLabelsGroup);
+      return sounding.getData(sounding.getNearestLevel(e.diagramPres));
+    }
+  }) {
+    this._isHoverLabelsRemote &#x3D; remote;
+
+    super._initHoverLabels({
+      visible,
+      type,
+      maxDistance,
+      insertLabelsFunc,
+      getLevelData
     });
   }
 }
@@ -237,7 +179,7 @@ <h1>Source: thermodynamicDiagram/PlotAltitudeDataArea.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/thermodynamicDiagram_TDDiagram.js.html b/doc/thermodynamicDiagram_TDDiagram.js.html
index f3f18223..2b784cae 100644
--- a/doc/thermodynamicDiagram_TDDiagram.js.html
+++ b/doc/thermodynamicDiagram_TDDiagram.js.html
@@ -1036,7 +1036,7 @@ <h1>Source: thermodynamicDiagram/TDDiagram.js</h1>
   _initHoverLabels({
     visible &#x3D; true,
     type &#x3D; &#x27;mousemove&#x27;,
-    snapToData &#x3D; true,
+    maxDistance &#x3D; undefined,
     remote &#x3D; true,
     insertLabelsFunc &#x3D; undefined,
     pres &#x3D; {},
@@ -1117,7 +1117,7 @@ <h1>Source: thermodynamicDiagram/TDDiagram.js</h1>
     super._initHoverLabels({
       visible,
       type,
-      snapToData,
+      maxDistance,
       remote,
       insertLabelsFunc
     });
@@ -1290,7 +1290,7 @@ <h1>Source: thermodynamicDiagram/TDDiagram.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/thermodynamicDiagram_WindbarbsProfile.js.html b/doc/thermodynamicDiagram_WindbarbsProfile.js.html
index 6750a971..fd4274af 100644
--- a/doc/thermodynamicDiagram_WindbarbsProfile.js.html
+++ b/doc/thermodynamicDiagram_WindbarbsProfile.js.html
@@ -147,7 +147,7 @@ <h1>Source: thermodynamicDiagram/WindbarbsProfile.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/thermodynamicDiagram_WindspeedProfile.js.html b/doc/thermodynamicDiagram_WindspeedProfile.js.html
index de44a041..5f006b2a 100644
--- a/doc/thermodynamicDiagram_WindspeedProfile.js.html
+++ b/doc/thermodynamicDiagram_WindspeedProfile.js.html
@@ -155,7 +155,7 @@ <h1>Source: thermodynamicDiagram/WindspeedProfile.js</h1>
   _initHoverLabels({
     visible &#x3D; true,
     type &#x3D; &#x27;mousemove&#x27;,
-    snapToData &#x3D; true,
+    maxDistance &#x3D; undefined,
     remote &#x3D; true,
     insertLabelsFunc &#x3D; undefined,
     windspeed &#x3D; {}
@@ -184,7 +184,7 @@ <h1>Source: thermodynamicDiagram/WindspeedProfile.js</h1>
     super._initHoverLabels({
       visible,
       type,
-      snapToData,
+      maxDistance,
       remote,
       insertLabelsFunc
     });
@@ -261,7 +261,7 @@ <h1>Source: thermodynamicDiagram/WindspeedProfile.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/thermodynamicDiagram_axes_axisLabels.js.html b/doc/thermodynamicDiagram_axes_axisLabels.js.html
index 087db8eb..17f9becd 100644
--- a/doc/thermodynamicDiagram_axes_axisLabels.js.html
+++ b/doc/thermodynamicDiagram_axes_axisLabels.js.html
@@ -49,7 +49,7 @@ <h1>Source: thermodynamicDiagram/axes/axisLabels.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/thermodynamicDiagram_axes_xAxis.js.html b/doc/thermodynamicDiagram_axes_xAxis.js.html
index c3fa2295..0ca1b01f 100644
--- a/doc/thermodynamicDiagram_axes_xAxis.js.html
+++ b/doc/thermodynamicDiagram_axes_xAxis.js.html
@@ -100,7 +100,7 @@ <h1>Source: thermodynamicDiagram/axes/xAxis.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/thermodynamicDiagram_axes_yAxis.js.html b/doc/thermodynamicDiagram_axes_yAxis.js.html
index bc519618..0eb6448c 100644
--- a/doc/thermodynamicDiagram_axes_yAxis.js.html
+++ b/doc/thermodynamicDiagram_axes_yAxis.js.html
@@ -185,7 +185,7 @@ <h1>Source: thermodynamicDiagram/axes/yAxis.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/thermodynamicDiagram_coordinateSystem_Emagram.js.html b/doc/thermodynamicDiagram_coordinateSystem_Emagram.js.html
index 2735f3b9..6150ef2d 100644
--- a/doc/thermodynamicDiagram_coordinateSystem_Emagram.js.html
+++ b/doc/thermodynamicDiagram_coordinateSystem_Emagram.js.html
@@ -76,7 +76,7 @@ <h1>Source: thermodynamicDiagram/coordinateSystem/Emagram.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/thermodynamicDiagram_coordinateSystem_SkewTlogPDiagram.js.html b/doc/thermodynamicDiagram_coordinateSystem_SkewTlogPDiagram.js.html
index 39ffbd5d..98d4a5b9 100644
--- a/doc/thermodynamicDiagram_coordinateSystem_SkewTlogPDiagram.js.html
+++ b/doc/thermodynamicDiagram_coordinateSystem_SkewTlogPDiagram.js.html
@@ -53,7 +53,7 @@ <h1>Source: thermodynamicDiagram/coordinateSystem/SkewTlogPDiagram.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/thermodynamicDiagram_coordinateSystem_StueveDiagram.js.html b/doc/thermodynamicDiagram_coordinateSystem_StueveDiagram.js.html
index a8f30169..2859bbcf 100644
--- a/doc/thermodynamicDiagram_coordinateSystem_StueveDiagram.js.html
+++ b/doc/thermodynamicDiagram_coordinateSystem_StueveDiagram.js.html
@@ -120,7 +120,7 @@ <h1>Source: thermodynamicDiagram/coordinateSystem/StueveDiagram.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/thermodynamicDiagram_plotArea.js.html b/doc/thermodynamicDiagram_plotArea.js.html
index 020093d5..bc6d6417 100644
--- a/doc/thermodynamicDiagram_plotArea.js.html
+++ b/doc/thermodynamicDiagram_plotArea.js.html
@@ -150,6 +150,8 @@ <h1>Source: thermodynamicDiagram/PlotArea.js</h1>
  * 
  * @typedef {Object} module:meteoJS/thermodynamicDiagram/plotArea~options
  * @param {external:SVG} [svgNode] - SVG Node.
+ * @property {module:meteoJS/thermodynamicDiagram/coordinateSystem.CoordinateSystem}
+ *   [coordinateSystem] - Coordinate system.
  * @param {integer} [x&#x3D;0] - X.
  * @param {integer} [y&#x3D;0] - Y.
  * @param {integer} [width&#x3D;100] - Width.
@@ -163,7 +165,7 @@ <h1>Source: thermodynamicDiagram/PlotArea.js</h1>
 /**
  * Abstract class to define an area on the SVG.
  * 
- * &amp;lt;pre&gt;&amp;lt;code&gt;import PlotArea from &#x27;meteoJS/thermodynamicDiagram/PlotArea&#x27;;&amp;lt;/code&gt;&amp;lt;/pre&gt;
+ * &amp;lt;pre&gt;&amp;lt;code&gt;import PlotArea from &#x27;meteojs/thermodynamicDiagram/PlotArea&#x27;;&amp;lt;/code&gt;&amp;lt;/pre&gt;
  * 
  * @fires module:meteoJS/thermodynamicDiagram/plotArea#change:visible
  * @fires module:meteoJS/thermodynamicDiagram/plotArea#change:position
@@ -528,7 +530,7 @@ <h1>Source: thermodynamicDiagram/PlotArea.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/thermodynamicDiagram_plotDataArea.js.html b/doc/thermodynamicDiagram_plotDataArea.js.html
index 13806871..36651362 100644
--- a/doc/thermodynamicDiagram_plotDataArea.js.html
+++ b/doc/thermodynamicDiagram_plotDataArea.js.html
@@ -78,6 +78,71 @@ <h1>Source: thermodynamicDiagram/PlotDataArea.js</h1>
  * @type {module:meteoJS/thermodynamicDiagram/plotDataArea~insertSoundingEvent}
  */
 
+/**
+ * Function to insert labels.
+ * 
+ * @typedef {Function}
+ *   module:meteoJS/thermodynamicDiagram/plotDataArea~insertLabelsFunc
+ * @param {module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding}
+ *   sounding - Diagram sounding to label.
+ * @param {module:meteoJS/sounding~levelData} levelData - Data to label.
+ * @param {external:SVG} group - SVG group to insert labels.
+ */
+
+/**
+ * Getter for the levelData of a certain DiagramSounding according to an event.
+ * 
+ * @typedef {Function}
+ *   module:meteoJS/thermodynamicDiagram/plotDataArea~getLevelData
+ * @param {Object} options - Options.
+ * @param {module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding}
+ *   options.hoverLabelsSounding
+ *   For this sounding, the hover labels are shown.
+ * @param {module:meteoJS/thermodynamicDiagram/plotArea~event} options.e
+ *   This event raised the display of hover labels.
+ * @param {undefined|number} options.maxDistance
+ *   Maximum distance to a data point to show a hover label in pixels.
+ *   If undefined, always a hover label to the nearest point is shown.
+ * @returns {module:meteoJS/sounding~levelData}
+ *   The data to show in the label. This data is passed to
+ *   {@link module:meteoJS/thermodynamicDiagram/plotDataArea~insertLabelsFunc}.
+ */
+
+/**
+ * For the returned sounding, the hover labels are shown. As input all
+ * currently visible soundings are passed.
+ * 
+ * @typedef {Function}
+ *   module:meteoJS/thermodynamicDiagram/plotDataArea~getHoverSounding
+ * @param {module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding[]}
+ *   soundings - Currently visible soundings. Array length is always at least 1.
+ * @returns {undefined|module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding}
+ *   For this returned sounding, the hover labels are shown. No hover labes are
+ *   shown, if undefined is returned.
+ */
+
+/**
+ * Options for labels on hovering the plot area.
+ * 
+ * @typedef {Object}
+ *   module:meteoJS/thermodynamicDiagram/plotDataArea~hoverLabelsOptions
+ * @property {boolean} [visible&#x3D;true] - Visibility.
+ * @property {string} [type&#x3D;&#x27;mousemove&#x27;] - Event type.
+ * @property {number} [maxDistance&#x3D;undefined]
+ *   Maximum distance to a data point to show a hover label in pixels.
+ *   If undefined, always a hover label to the nearest point is shown.
+ * @property {boolean} [remote&#x3D;true]
+ *   Show labels relative to the mouse position on the diagram, even when the
+ *   pointer isn&#x27;t directly on the plot area.
+ * @property {module:meteoJS/thermodynamicDiagram/plotDataArea~insertLabelsFunc}
+ *   [insertLabelsFunc] - Called to insert labels into a SVG group.
+ * @property {module:meteoJS/thermodynamicDiagram/plotDataArea~getLevelData}
+ *   [getLevelData] - .
+ * @property {module:meteoJS/thermodynamicDiagram/plotDataArea~getHoverSounding}
+ *   [getHoverSounding] - Default: Return the first sounding of the
+ *   passed input array.
+ */
+
 /**
  * Visibility of the sounding in an area.
  * 
@@ -139,6 +204,8 @@ <h1>Source: thermodynamicDiagram/PlotDataArea.js</h1>
  * 
  * @typedef {module:meteoJS/thermodynamicDiagram/plotArea~options}
  *   module:meteoJS/thermodynamicDiagram/plotDataArea~options
+ * @property {module:meteoJS/thermodynamicDiagram/plotDataArea~hoverLabelsOptions}
+ *   [hoverLabels] - Hover labels options.
  * @param {module:meteoJS/thermodynamicDiagram/plotDataArea~getSoundingVisibility} [getSoundingVisibility]
  *   Takes a sounding object and returns the visibility for the area.
  * @param {string[]} [dataGroupIds&#x3D;[]] - IDs of several grouped datas.
@@ -183,6 +250,7 @@ <h1>Source: thermodynamicDiagram/PlotDataArea.js</h1>
     style &#x3D; {},
     visible &#x3D; true,
     events &#x3D; {},
+    hoverLabels &#x3D; {},
     getSoundingVisibility &#x3D; sounding &#x3D;&gt; sounding.visible,
     dataGroupIds &#x3D; [],
     getCoordinatesByLevelData &#x3D; () &#x3D;&gt; { return { x: undefined, y: undefined }; },
@@ -252,6 +320,20 @@ <h1>Source: thermodynamicDiagram/PlotDataArea.js</h1>
      * @private
      */
     this._soundings &#x3D; new Map();
+    
+    /**
+     * @type external:SVG
+     * @private
+     */
+    this._hoverLabelsGroup &#x3D; this.svgNode.group();
+
+    /**
+     * @type module:meteoJS/thermodynamicDiagram/plotDataArea~getHoverSounding
+     * @private
+     */
+    this._getHoverSounding; // Will be set inside _initHoverLabels()
+    
+    this._initHoverLabels(hoverLabels);
   }
   
   /**
@@ -290,6 +372,24 @@ <h1>Source: thermodynamicDiagram/PlotDataArea.js</h1>
       this.drawSoundings();
   }
   
+  /**
+   * The current sounding, for which hover labels should be shown.
+   * 
+   * @type undefined|module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding
+   * @readonly
+   * @private
+   */
+  get hoverLabelsSounding() {
+    const soundings &#x3D; [];
+    for (let sounding of this._soundings.keys()) {
+      if (this._getSoundingVisibility(sounding))
+        soundings.push(sounding);
+    }
+    if (soundings.length &gt; 0)
+      return this._getHoverSounding(soundings);
+    return undefined;
+  }
+  
   /**
    * Adds a sounding to draw into the area.
    * 
@@ -359,6 +459,7 @@ <h1>Source: thermodynamicDiagram/PlotDataArea.js</h1>
    */
   onChangeSoundingVisibility(sounding, group) {
     this.setDisplayOfSounding(sounding, group);
+    this._hoverLabelsGroup.clear();
   }
   
   /**
@@ -442,6 +543,10 @@ <h1>Source: thermodynamicDiagram/PlotDataArea.js</h1>
     });
     
     this.trigger(&#x27;postinsert:sounding&#x27;, { sounding, node: group });
+
+    /* Only hide hoverLabels, when Sounding is visible. */
+    if (this._getSoundingVisibility(sounding))
+      this._hoverLabelsGroup.clear();
   }
   
   /**
@@ -452,6 +557,38 @@ <h1>Source: thermodynamicDiagram/PlotDataArea.js</h1>
       makeFilterDataPointFunction(this._minDataPointsDistance) :
       this._filterDataPoint;
   }
+  
+  /**
+   * Initialize hover labels options.
+   * 
+   * @param {module:meteoJS/thermodynamicDiagram/plotDataArea~hoverLabelsOptions}
+   *   options - Hover labels options.
+   */
+  _initHoverLabels({
+    visible &#x3D; true,
+    type &#x3D; &#x27;mousemove&#x27;,
+    maxDistance &#x3D; undefined,
+    insertLabelsFunc &#x3D; undefined,
+    getLevelData &#x3D; () &#x3D;&gt; {},
+    getHoverSounding &#x3D; soundings &#x3D;&gt; soundings.shift()
+  }) {
+    this._getHoverSounding &#x3D; getHoverSounding;
+
+    if (!visible ||
+        insertLabelsFunc &#x3D;&#x3D;&#x3D; undefined)
+      return;
+    
+    this.on(&#x27;change:extent&#x27;, () &#x3D;&gt; this._hoverLabelsGroup.clear());
+    this.on(type, e &#x3D;&gt; {
+      const hoverLabelsSounding &#x3D; this.hoverLabelsSounding;
+      if (hoverLabelsSounding &#x3D;&#x3D;&#x3D; undefined)
+        return;
+
+      insertLabelsFunc(hoverLabelsSounding,
+        getLevelData({ hoverLabelsSounding, e , maxDistance }),
+        this._hoverLabelsGroup);
+    });
+  }
 }
 export default PlotDataArea;
 
@@ -494,7 +631,7 @@ <h1>Source: thermodynamicDiagram/PlotDataArea.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/timeline_Animation.js.html b/doc/timeline_Animation.js.html
index b725ef61..887b0b92 100644
--- a/doc/timeline_Animation.js.html
+++ b/doc/timeline_Animation.js.html
@@ -622,7 +622,7 @@ <h1>Source: timeline/Animation.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/timeline_NavigationButtons.js.html b/doc/timeline_NavigationButtons.js.html
index f464d376..2b25d0c1 100644
--- a/doc/timeline_NavigationButtons.js.html
+++ b/doc/timeline_NavigationButtons.js.html
@@ -212,7 +212,7 @@ <h1>Source: timeline/NavigationButtons.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/timeline_Visualisation.js.html b/doc/timeline_Visualisation.js.html
index 76b1ab37..8de22ca3 100644
--- a/doc/timeline_Visualisation.js.html
+++ b/doc/timeline_Visualisation.js.html
@@ -351,7 +351,7 @@ <h1>Source: timeline/Visualisation.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/timeline_animation_ToggleButton.js.html b/doc/timeline_animation_ToggleButton.js.html
index 687023b5..7b279866 100644
--- a/doc/timeline_animation_ToggleButton.js.html
+++ b/doc/timeline_animation_ToggleButton.js.html
@@ -226,7 +226,7 @@ <h1>Source: timeline/animation/ToggleButton.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/timeline_visualisation_Slider.js.html b/doc/timeline_visualisation_Slider.js.html
index 39398876..b9186a25 100644
--- a/doc/timeline_visualisation_Slider.js.html
+++ b/doc/timeline_visualisation_Slider.js.html
@@ -124,7 +124,7 @@ <h1>Source: timeline/visualisation/Slider.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/timeline_visualisation_Text.js.html b/doc/timeline_visualisation_Text.js.html
index 23e1ad62..b4b1b5e7 100644
--- a/doc/timeline_visualisation_Text.js.html
+++ b/doc/timeline_visualisation_Text.js.html
@@ -92,7 +92,7 @@ <h1>Source: timeline/visualisation/Text.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/timeline_visualisation_bsButtons.js.html b/doc/timeline_visualisation_bsButtons.js.html
index 9f1a4aa2..766be45a 100644
--- a/doc/timeline_visualisation_bsButtons.js.html
+++ b/doc/timeline_visualisation_bsButtons.js.html
@@ -232,7 +232,7 @@ <h1>Source: timeline/visualisation/bsButtons.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/timeline_visualisation_bsDropdown.js.html b/doc/timeline_visualisation_bsDropdown.js.html
index 51bc8f64..f9b9f975 100644
--- a/doc/timeline_visualisation_bsDropdown.js.html
+++ b/doc/timeline_visualisation_bsDropdown.js.html
@@ -287,7 +287,7 @@ <h1>Source: timeline/visualisation/bsDropdown.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/doc/tooltip_BootstrapTooltip.js.html b/doc/tooltip_BootstrapTooltip.js.html
index 0dbfea21..99bca3bf 100644
--- a/doc/tooltip_BootstrapTooltip.js.html
+++ b/doc/tooltip_BootstrapTooltip.js.html
@@ -247,7 +247,7 @@ <h1>Source: tooltip/BootstrapTooltip.js</h1>
   <footer id="jsdoc-footer" class="jsdoc-footer">
     <div id="jsdoc-footer-container">
       <p>
-        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 2, 2021.
+        Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on July 16, 2021.
       </p>
     </div>
   </footer>
diff --git a/meteoJS.min.js b/meteoJS.min.js
index 42e5bd5e..53a6d039 100644
--- a/meteoJS.min.js
+++ b/meteoJS.min.js
@@ -1,3 +1,3 @@
 /*! For license information please see meteoJS.min.js.LICENSE.txt */
-var meteoJS,SVG=SVG||{},jQuery=jQuery||{},ol=ol||{layer:{},source:{},format:{},style:{}},Popper=Popper||{},bootstrap=bootstrap||{};(()=>{var e={588:(e,t,n)=>{function i(e){return(i="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 o=function(e){"use strict";var t,n=Object.prototype,o=n.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",s=r.asyncIterator||"@@asyncIterator",l=r.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var o=t&&t.prototype instanceof m?t:m,r=Object.create(o.prototype),a=new j(i||[]);return r._invoke=function(e,t,n){var i=d;return function(o,r){if(i===p)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw r;return C()}for(n.method=o,n.arg=r;;){var a=n.delegate;if(a){var s=P(a,n);if(s){if(s===y)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=p;var l=f(e,t,n);if("normal"===l.type){if(i=n.done?v:h,l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i=v,n.method="throw",n.arg=l.arg)}}}(e,n,a),r}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var d="suspendedStart",h="suspendedYield",p="executing",v="completed",y={};function m(){}function b(){}function g(){}var w={};w[a]=function(){return this};var _=Object.getPrototypeOf,O=_&&_(_(E([])));O&&O!==n&&o.call(O,a)&&(w=O);var S=g.prototype=m.prototype=Object.create(w);function T(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(r,a,s,l){var u=f(e[r],e,a);if("throw"!==u.type){var c=u.arg,d=c.value;return d&&"object"===i(d)&&o.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,s,l)}),(function(e){n("throw",e,s,l)})):t.resolve(d).then((function(e){c.value=e,s(c)}),(function(e){return n("throw",e,s,l)}))}l(u.arg)}var r;this._invoke=function(e,i){function o(){return new t((function(t,o){n(e,i,t,o)}))}return r=r?r.then(o,o):o()}}function P(e,n){var i=e.iterator[n.method];if(i===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,P(e,n),"throw"===n.method))return y;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var r=o.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function E(e){if(e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,r=function n(){for(;++i<e.length;)if(o.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return r.next=r}}return{next:C}}function C(){return{value:t,done:!0}}return b.prototype=S.constructor=g,g.constructor=b,b.displayName=u(g,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},e.awrap=function(e){return{__await:e}},T(k.prototype),k.prototype[s]=function(){return this},e.AsyncIterator=k,e.async=function(t,n,i,o,r){void 0===r&&(r=Promise);var a=new k(c(t,n,i,o),r);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},T(S),u(S,l,"Generator"),S[a]=function(){return this},S.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var i=t.pop();if(i in e)return n.value=i,n.done=!1,n}return n.done=!0,n}},e.values=E,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(R),!e)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(i,o){return s.type="throw",s.arg=e,n.next=i,o&&(n.method="next",n.arg=t),!!o}for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var r=i;break}}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var a=r?r.completion:{};return a.type=e,a.arg=t,r?(this.method="next",this.next=r.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),R(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var o=i.arg;R(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:E(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),y}},e}("object"===i(e=n.nmd(e))?e.exports:{});try{regeneratorRuntime=o}catch(e){Function("r","regeneratorRuntime = r")(o)}}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={id:i,loaded:!1,exports:{}};return e[i](r,r.exports,n),r.loaded=!0,r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var i={};(()=>{"use strict";n.r(i),n.d(i,{Modelviewer:()=>Ti,RepetitiveRequests:()=>V,Sounding:()=>Ho,Synview:()=>kt,ThermodynamicDiagram:()=>kl,ThermodynamicDiagramPluggable:()=>ja,Timeline:()=>z,Tooltip:()=>Hn,calc:()=>e,events:()=>Yl,modelviewer:()=>ql,sounding:()=>Hl,synview:()=>Xl,thermodynamicDiagram:()=>Kl,timeline:()=>Fl,tooltip:()=>zl});var e={};function t(e){if(void 0!==e&&!isNaN(e))return 44330.769*(1-Math.pow(e/1013.25,.19029496))}function o(e){if(void 0!==e&&!isNaN(e))return 1013.25*Math.pow(1-e/44330.769,5.255)}function r(e,t){if(void 0!==e&&!isNaN(e)&&void 0!==t&&!isNaN(t))return e*Math.pow(1e3/t,.286)}function a(e,t){if(void 0!==e&&!isNaN(e)&&void 0!==t&&!isNaN(t))return e*Math.pow(t/1e3,.286)}function s(e,t){if(void 0!==t&&!isNaN(t)){for(var n=void 0,i=Math.pow(1e3/t,.286),o=273,r=20,a=0;Math.abs(r)>.1&&a<100;)a++,n=d(o,t),(o*i*Math.exp(2.5*n/o)-e)*r>0&&(r*=-.5),o+=r;return o}}function l(e,t){if(void 0!==e&&!isNaN(e)&&void 0!==t&&!isNaN(t)){var n=.4343*Math.log(e*t/(622+e));return Math.pow(10,.0498646455*n+2.4082965)-7.07475+38.9114*Math.pow(Math.pow(10,.0915*n)-1.2035,2)}}function u(e,t,n){if(!(void 0===e||isNaN(e)||void 0===t||isNaN(t)||void 0===n||isNaN(n))){for(var i=t-273.15,o=1,r=10,a=1,s=6.112*Math.exp(17.67*i/(i+243.5));Math.abs(o)>.05&&0!=(o=s-(6.112*Math.exp(17.67*i/(i+243.5))-n*(e-273.15-i)*66e-5*(1+.00115*i)))&&(o<0?-1!=a&&(a=-1,r/=10):1!=a&&(a=1,r/=10),!(Math.abs(o)<=.05));)i+=r*a;return i+273.15}}function c(e,t,n){var i=r(e,n);if(!(void 0===i||void 0===t||isNaN(t)||void 0===e||isNaN(e)||void 0===n||isNaN(n)))return i*Math.exp(2.4819*d(t,n)/v(e,t))}function f(e){if(void 0!==e&&!isNaN(e)){var t=new Array(6.1104546,.4442351,.014302099,.00026454708,30357098e-13,2.0972268e-8,60487594e-18,-1469687e-19),n=new Array(.06485546857696639,.03783195122560735,.02224449342887902,.013182892842468312,.007874020771412448,.004739730494884733,.0028751203550435793,.001757430376758103,.0010824173951885098,.0006717089391856059,.0004199647026320394,.0002645243638634699,.00016784796373681322,.00010728539763162038,6907426344961356e-20,4479404897680843e-20,2925704195639373e-20,19245291263499416e-21,12749137241074795e-21,8505070102755051e-21,5713400253349711e-21,3864650296738762e-21,2632109719650053e-21,18049107293057043e-22,12460785055581605e-22,8.660705713468708e-7,6.059822176688955e-7,4.2682119794324277e-7,3.026165085143795e-7,2.15963854234914e-7,1.5512895457833687e-7),i=0;if((e-=273.15)>-50)i=t[0]+e*(t[1]+e*(t[2]+e*(t[3]+e*(t[4]+e*(t[5]+e*(t[6]+e*t[7]))))));else{var o=(-e-50)/5;i=0<n.length-1?n[0]+o%1*(n[1]-n[0]):1e-7}return i}}function d(e,t){var n=f(e);if(void 0!==n&&void 0!==t&&!isNaN(t))return 621.97*n/(t-n)}function h(e,t){if(void 0!==t&&!isNaN(t)){for(var n=1013,i=100;n-i>10;){var o=i+(n-i)/2,r=d(a(e,o),o);if(void 0===r)return;r<t?i=o:n=o}return i+(n-i)/2}}function p(e,t){if(void 0!==e&&!isNaN(e)){for(var n=323,i=223;n-i>.1;){var o=i+(n-i)/2,r=h(o,t);if(void 0===r)return;r>e?i=o:n=o}return i+(n-i)/2}}function v(e,t){if(void 0!==e&&!isNaN(e)&&void 0!==t&&!isNaN(t))return t-(.001296*t-.15772)*(e-t)}function y(e){return void 0===e||isNaN(e)?void 0:e+273.15}function m(e){return void 0===e||isNaN(e)?void 0:e-273.15}function b(e){return void 0===e||isNaN(e)?void 0:3.6*e}function g(e){return void 0===e||isNaN(e)?void 0:e/3.6}function w(e){return void 0===e||isNaN(e)?void 0:900*e/463}function _(e){return void 0===e||isNaN(e)?void 0:463*e/900}function O(e){return void 0===e||isNaN(e)?void 0:Math.min(12,Math.pow(e/.836,2/3))}function S(e){return void 0===e||isNaN(e)?void 0:.836*Math.pow(e,1.5)}function T(e,t){if(void 0!==e&&!isNaN(e)&&void 0!==t&&!isNaN(t))return 153*m(e)+.9985*t-304.26}function k(e,t,n,i){if(!(void 0===e||isNaN(e)||void 0===t||isNaN(t)||void 0===n||isNaN(n))){if(0==t)return e;var o=.02896;if(void 0===i&&(i=n),n==i)return e*Math.exp(9.807*-o/8.314/n*t);var r=(n-i)/t;return e*Math.exp(9.807*o/8.314/r*Math.log(1-r*t/n))}}function P(e,t,n){if(!(void 0===e||isNaN(e)||void 0===t||isNaN(t)||void 0===n||isNaN(n))){var i=f(t)*n;return 100*(e-i)/287.058/t+100*i/461.495/t}}function x(e){return(x="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)}function R(e,t,n){"listeners"in this&&void 0!==this.listeners||(this.listeners={}),e in this.listeners||(this.listeners[e]={});var i=Math.random().toString(36).substr(2,9);return this.listeners[e][i]={callback:t,thisArg:n},i}function j(e,t){"listeners"in this&&void 0!==this.listeners&&e in this.listeners&&t in this.listeners[e]&&delete this.listeners[e][t]}function E(e,t,n){"once_listeners"in this&&void 0!==this.once_listeners||(this.once_listeners={}),e in this.once_listeners&&"push"in this.once_listeners[e]||(this.once_listeners[e]=[]),this.once_listeners[e].push({callback:t,thisArg:n})}function C(e){return"listeners"in this&&void 0!==this.listeners&&e in this.listeners&&Object.keys(this.listeners[e]).length||"once_listeners"in this&&e in this.once_listeners&&Object.keys(this.once_listeners[e]).length}function N(e){var t=this,n=Array.prototype.slice.call(arguments);if(n.shift(),"listeners"in this&&void 0!==this.listeners&&e in this.listeners&&"object"==x(this.listeners[e])&&Object.keys(this.listeners[e]).forEach((function(i){t.listeners[e][i].callback.apply(void 0===t.listeners[e][i].thisArg?t:t.listeners[e][i].thisArg,n)})),"once_listeners"in this&&void 0!==this.once_listeners&&e in this.once_listeners&&"forEach"in this.once_listeners[e]){var i=this.once_listeners[e];this.once_listeners[e]=[],i.forEach((function(e){e.callback.apply(void 0===e.thisArg?t:e.thisArg,n)}))}}n.r(e),n.d(e,{altitudeISAByPres:()=>t,densityHumidAirByPressureAndTempAndRelHumidity:()=>P,dewpointByHMRAndPres:()=>l,equiPotentialTempByTempAndDewpointAndPres:()=>c,lclByPotentialTempAndHMR:()=>h,lclTemperatureByTempAndDewpoint:()=>v,potentialTempByLCLAndHMR:()=>p,potentialTempByTempAndPres:()=>r,pressureByBarometricFormula:()=>k,pressureISAByAltitude:()=>o,saturationHMRByTempAndPres:()=>d,saturationPressureByTemp:()=>f,snowlineByTemp850hPaAndAltidude:()=>T,tempByEquiPotTempAndPres:()=>s,tempByPotentialTempAndPres:()=>a,tempCelsiusToKelvin:()=>y,tempKelvinToCelsius:()=>m,wetbulbTempByTempAndDewpointAndPres:()=>u,windspeedBFToMS:()=>S,windspeedKMHToMS:()=>g,windspeedKNToMS:()=>_,windspeedMSToBF:()=>O,windspeedMSToKMH:()=>b,windspeedMSToKN:()=>w}),n(588);const B=function(e){e.on=R,e.un=j,e.once=E,e.hasListener=C,e.trigger=N};function I(e,t,n,i,o,r,a){try{var s=e[r](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(i,o)}function D(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var M=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.url,i=void 0===n?void 0:n,o=t.user,r=void 0===o?"":o,a=t.password,s=void 0===a?"":a,l=t.start,u=void 0===l||l,c=t.defaultTimeout,f=void 0===c?void 0:c,d=t.timeoutOnError,h=void 0===d?void 0:d,p=t.pauseOnHiddenDocument,v=void 0!==p&&p,y=t.responseType,m=void 0===y?"":y;D(this,e),this._url=i,this._user=r,this._password=s,this._isStarted=u,this._defaultTimeout=f,this._timeoutOnError=h,this._pauseOnHiddenDocument=v,this._initPauseOnHiddenDocument(),this._isSuppressedByHiddenDocument=!1,this._responseType=m,this._timeoutID=void 0,this._loading=!1,this._isStarted&&this.start()}var t,n,i,o;return t=e,(n=[{key:"url",get:function(){return this._url},set:function(e){this._url=e}},{key:"user",get:function(){return this._user},set:function(e){this._user=e}},{key:"password",get:function(){return this._password},set:function(e){this._password=e}},{key:"responseType",get:function(){return this._responseType},set:function(e){this._responseType=e}},{key:"start",value:function(){this._isStarted=!0,this._startRequest()}},{key:"stop",value:function(){this._isStarted=!1,void 0!==this._timeoutID&&(clearTimeout(this._timeoutID),this._timeoutID=void 0)}},{key:"_planRequest",value:function(e){var t=this,n=e.delay;void 0===this._timeoutID&&(this._timeoutID=setTimeout((function(){t._pauseOnHiddenDocument&&"hidden"in document&&document.hidden?t._isSuppressedByHiddenDocument=!0:t._startRequest()}),n))}},{key:"_startRequest",value:function(){var e=this;void 0!==this._timeoutID&&(clearTimeout(this._timeoutID),this._timeoutID=void 0),this._makeRequest().then((function(t){var n=t.request;if(e._isStarted){var i=e._defaultTimeout,o=n.getResponseHeader("Cache-Control");if(null!==o){var r=/(^|,\s*)max-age=([0-9]+)($|\s*,)/.exec(o);null!==r&&r[2]>0&&(i=Math.round(1e3*r[2]))}e.trigger("success:request",{request:n}),void 0!==i&&e._planRequest({delay:i})}}),(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.request;e._isStarted&&void 0!==n&&(e.trigger("error:request",{request:n}),void 0!==e._timeoutOnError&&e._planRequest({delay:e._timeoutOnError}))}),(function(t){var n=t.request,i=void 0===n?void 0:n;void 0!==i&&e.trigger("error:request",{request:i})}))}},{key:"_makeRequest",value:(i=regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.trigger("before:request"),e.abrupt("return",new Promise((function(e,n){if(void 0!==t._url)if(t._loading)n();else{t._loading=!0;var i=new XMLHttpRequest;void 0!==t.responseType&&(i.responseType=t.responseType),i.addEventListener("load",(function(){t._loading=!1,200==i.status?e({request:i}):n({request:i})})),i.addEventListener("error",(function(){t._loading=!1,n({request:i})})),i.open("GET",t._url,!0,t._user,t._password),i.send()}else n()})));case 2:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(n,o){var r=i.apply(e,t);function a(e){I(r,n,o,a,s,"next",e)}function s(e){I(r,n,o,a,s,"throw",e)}a(void 0)}))},function(){return o.apply(this,arguments)})},{key:"_initPauseOnHiddenDocument",value:function(){var e=this;this._pauseOnHiddenDocument&&document.addEventListener("visibilitychange",(function(){"hidden"in document&&!document.hidden&&e._isSuppressedByHiddenDocument&&e._isStarted&&(e._isSuppressedByHiddenDocument=!1,e.start())}))}}])&&A(t.prototype,n),e}();B(M.prototype);const V=M;function G(e){return(G="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)}function Y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var X=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.maxTimeGap,i=void 0===n?void 0:n,o=t.keyboardNavigation,r=void 0===o?{}:o;Y(this,e),this.maxTimeGap=i,this.selectedTime=new Date("invalid"),this.times=[],this.enabledTimes=[],this.allEnabledTimes=[],this.timesByKey={},this._keyboardNavigation={},this._initKeyboardNavigation(r)}var t,n;return t=e,(n=[{key:"getSelectedTime",value:function(){return this.selectedTime}},{key:"setSelectedTime",value:function(e){return this._setSelectedTime(q(e,this.times)>-1?e:new Date("invalid")),this}},{key:"getTimes",value:function(){return this.times}},{key:"getEnabledTimes",value:function(){return this.enabledTimes}},{key:"getAllEnabledTimes",value:function(){return this.allEnabledTimes}},{key:"setTimesBySetID",value:function(e,t){return this.timesByKey[e]={times:t,enabled:t},this._updateTimes(),this._updateEnabledTimes(),this}},{key:"setEnabledTimesBySetID",value:function(e,t){return e in this.timesByKey&&(this.timesByKey[e].enabled=t,this._updateEnabledTimes()),this}},{key:"getSetIDs",value:function(){return Object.keys(this.timesByKey)}},{key:"deleteSetID",value:function(e){return e in this.timesByKey&&(delete this.timesByKey[e],this._updateTimes(),this._updateEnabledTimes()),this}},{key:"first",value:function(){return this._setSelectedTime(this.getFirstEnabledTime()),this}},{key:"last",value:function(){return this._setSelectedTime(this.getLastEnabledTime()),this}},{key:"next",value:function(){return this._setSelectedTime(this.getNextEnabledTime()),this}},{key:"prev",value:function(){return this._setSelectedTime(this.getPrevEnabledTime()),this}},{key:"nextAllEnabledTime",value:function(){return this._setSelectedTime(this.getNextAllEnabledTime()),this}},{key:"prevAllEnabledTime",value:function(){return this._setSelectedTime(this.getPrevAllEnabledTime()),this}},{key:"add",value:function(e,t){var n=this.getSelectedTime(),i=0;switch(t){case"hours":case"h":i=3600*e*1e3;break;case"minutes":case"m":i=60*e*1e3;break;case"seconds":case"s":i=1e3*e;break;case"milliseconds":case"ms":i=e}switch(0!=i&&(n=new Date(n.valueOf()+i)),t){case"years":case"y":n.setUTCFullYear(n.getUTCFullYear()+e);break;case"months":case"M":n.setUTCMonth(n.getUTCMonth()+e);break;case"days":case"d":n.setUTCDate(n.getUTCDate()+e)}return q(n,this.times)>-1&&this._setSelectedTime(n),this}},{key:"sub",value:function(e,t){var n=this.getSelectedTime(),i=0;switch(t){case"hours":case"h":i=3600*e*1e3;break;case"minutes":case"m":i=60*e*1e3;break;case"seconds":case"s":i=1e3*e;break;case"milliseconds":case"ms":i=e}switch(0!=i&&(n=new Date(n.valueOf()-i)),t){case"years":case"y":n.setUTCFullYear(n.getUTCFullYear()-e);break;case"months":case"M":n.setUTCMonth(n.getUTCMonth()-e);break;case"days":case"d":n.setUTCDate(n.getUTCDate()-e)}return q(n,this.times)>-1&&this._setSelectedTime(n),this}},{key:"getFirstEnabledTime",value:function(){return this.enabledTimes.length>0?this.enabledTimes[0]:new Date("invalid")}},{key:"getLastEnabledTime",value:function(){return this.enabledTimes.length>0?this.enabledTimes[this.enabledTimes.length-1]:new Date("invalid")}},{key:"getNextEnabledTime",value:function(){if(this.enabledTimes.length<1)return new Date("invalid");var e=q(this.getSelectedTime(),this.enabledTimes);if(e>-1)return++e<this.enabledTimes.length?this.enabledTimes[e]:this.enabledTimes[this.enabledTimes.length-1];if(isNaN(this.getSelectedTime()))return this.enabledTimes[0];for(var t=new Date("invalid"),n=0;n<this.enabledTimes.length;n++)if(this.getSelectedTime().valueOf()<this.enabledTimes[n].valueOf()){t=this.enabledTimes[n];break}return t}},{key:"getPrevEnabledTime",value:function(){if(this.enabledTimes.length<1)return new Date("invalid");var e=q(this.getSelectedTime(),this.enabledTimes);if(e>-1)return-1<--e?this.enabledTimes[e]:this.enabledTimes[0];if(isNaN(this.getSelectedTime()))return this.enabledTimes[0];for(var t=new Date("invalid"),n=this.enabledTimes.length-1;n>=0;n--)if(this.getSelectedTime().valueOf()>this.enabledTimes[n].valueOf()){t=this.enabledTimes[n];break}return t}},{key:"getFirstAllEnabledTime",value:function(){return this.allEnabledTimes.length>0?this.allEnabledTimes[0]:new Date("invalid")}},{key:"getLastAllEnabledTime",value:function(){return this.allEnabledTimes.length>0?this.allEnabledTimes[this.allEnabledTimes.length-1]:new Date("invalid")}},{key:"getNextAllEnabledTime",value:function(){if(this.allEnabledTimes.length<1)return new Date("invalid");var e=q(this.getSelectedTime(),this.allEnabledTimes);if(e>-1)return++e<this.allEnabledTimes.length?this.allEnabledTimes[e]:this.allEnabledTimes[this.allEnabledTimes.length-1];if(isNaN(this.getSelectedTime()))return this.allEnabledTimes[0];for(var t=new Date("invalid"),n=0;n<this.allEnabledTimes.length;n++)if(this.getSelectedTime().valueOf()<this.allEnabledTimes[n].valueOf()){t=this.allEnabledTimes[n];break}return t}},{key:"getPrevAllEnabledTime",value:function(){if(this.allEnabledTimes.length<1)return new Date("invalid");var e=q(this.getSelectedTime(),this.allEnabledTimes);if(e>-1)return-1<--e?this.allEnabledTimes[e]:this.allEnabledTimes[0];if(isNaN(this.getSelectedTime()))return this.allEnabledTimes[0];for(var t=new Date("invalid"),n=this.allEnabledTimes.length-1;n>=0;n--)if(this.getSelectedTime().valueOf()>this.allEnabledTimes[n].valueOf()){t=this.allEnabledTimes[n];break}return t}},{key:"isTimeEnabled",value:function(e){return this.enabledTimes.reduce((function(t,n){return n.valueOf()==e.valueOf()||t}),!1)}},{key:"isTimeAllEnabled",value:function(e){return this.allEnabledTimes.reduce((function(t,n){return n.valueOf()==e.valueOf()||t}),!1)}},{key:"isFirstEnabledTime",value:function(){return this.getFirstEnabledTime().valueOf()==this.getSelectedTime().valueOf()}},{key:"isLastEnabledTime",value:function(){return this.getLastEnabledTime().valueOf()==this.getSelectedTime().valueOf()}},{key:"_setSelectedTime",value:function(e){var t=this.selectedTime;return this.selectedTime=e,this.trigger("change:time",t),this.selectedTime}},{key:"_updateTimes",value:function(){this.times=[];var e=[],t={};for(var n in this.timesByKey)this.timesByKey[n].times.forEach((function(n){n.valueOf()in t||(e.push(n),t[n.valueOf()]=n)}));H(e),e.forEach((function(e){if(this.times.length<1)this.times.push(e);else{var t=this.times[this.times.length-1];if(void 0!==this.maxTimeGap&&e.valueOf()-t.valueOf()>1e3*this.maxTimeGap){var n=t;do{n=new Date(n.getTime()+1e3*this.maxTimeGap),this.times.push(n)}while(e.valueOf()-n.valueOf()>1e3*this.maxTimeGap)}this.times.push(e)}}),this),H(this.times),this.trigger("change:times")}},{key:"_updateEnabledTimes",value:function(){this.enabledTimes=[],this.allEnabledTimes=[];var e={},t={};for(var n in this.timesByKey)this.timesByKey[n].enabled.forEach((function(n){n.valueOf()in e||(this.enabledTimes.push(n),e[n.valueOf()]=n),n.valueOf()in t?t[n.valueOf()]++:t[n.valueOf()]=1}),this);for(var i in H(this.enabledTimes),t)t[i]==Object.keys(this.timesByKey).length&&this.allEnabledTimes.push(e[i]);H(this.allEnabledTimes),this.trigger("change:enabledTimes")}},{key:"_initKeyboardNavigation",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.enabled,i=void 0!==n&&n,o=t.first,r=void 0===o?36:o,a=t.last,s=void 0===a?35:a,l=t.prev,u=void 0===l?37:l,c=t.next,f=void 0===c?39:c,d=t.prevAllEnabledTime,h=void 0===d?[37,"ctrl"]:d,p=t.nextAllEnabledTime,v=void 0===p?[39,"ctrl"]:p,y=t.add,m=void 0===y?void 0:y,b=t.sub,g=void 0===b?void 0:b;void 0===m&&(m={"3h":[39,"ctrl","shift"],"6h":[39,"shift"],"12h":[39,"alt","shift"],"24h":[39,"alt"]}),void 0===g&&(g={"3h":[37,"ctrl","shift"],"6h":[37,"shift"],"12h":[37,"alt","shift"],"24h":[37,"alt"]}),this._keyboardNavigation={enabled:i,first:r,last:s,prev:u,next:f,prevAllEnabledTime:h,nextAllEnabledTime:v,add:m,sub:g},document&&this._keyboardNavigation.enabled&&document.addEventListener("keydown",(function(t){Object.keys(e._keyboardNavigation).forEach((function(n){"enabled"!=n&&(/^(add|sub)$/.test(n)?Object.keys(e._keyboardNavigation[n]).forEach((function(i){var o=i.match(/^([0-9]+)\s*([a-zA-Z]+)$/);null!==o&&K(t,e._keyboardNavigation[n][i])&&(e[n](+o[1],o[2]),t.preventDefault(),t.stopPropagation())})):n in e&&K(t,e._keyboardNavigation[n])&&(e[n](),t.preventDefault(),t.stopPropagation()))}))}))}}])&&F(t.prototype,n),e}();B(X.prototype);const z=X;var q=function(e,t){return t.findIndex((function(t){return t.valueOf()==e.valueOf()}))};function H(e){e.sort((function(e,t){return e.valueOf()-t.valueOf()}))}function K(e,t){if("object"==G(t)&&"forEach"in t||(t=[t]),0==t.length)return!1;var n=[["ctrl","ctrlKey"],["alt","altKey"],["shift","shiftKey"],["meta","metaKey"]].reduce((function(n,i){return n&&(t.indexOf(i[0])>-1?e[i[1]]:!e[i[1]])}),!0);return t.forEach((function(t){switch(t){case"ctrl":case"alt":case"shift":case"meta":break;default:t!=e.keyCode&&(n=!1)}})),n}const U=jQuery;var $=n.n(U);function Z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function W(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var J=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.timeline,o=n.restartPause,r=void 0===o?1.8:o,a=n.imagePeriod,s=void 0===a?.2:a,l=n.imageFrequency,u=void 0===l?void 0:l,c=n.enabledStepsOnly,f=void 0===c||c,d=n.allEnabledStepsOnly,h=void 0!==d&&d;Z(this,e),this.options={timeline:i,restartPause:r,imagePeriod:s,imageFrequency:u,enabledStepsOnly:f,allEnabledStepsOnly:h},void 0===this.options.timeline&&(this.options.timeline=new z),void 0!==this.options.imageFrequency&&0!=this.options.imageFrequency&&(this.options.imagePeriod=1/this.options.imageFrequency),this.animationIntervalID=void 0,this.animationTimeoutID=void 0,this.animationStep=0,this.timesHash={},this.times=[];var p=function(){t.times=t.options.timeline[t._getTimelineTimesMethod()](),t.timesHash={},t.times.forEach((function(e,n){return t.timesHash[e.valueOf()]=n}))};this.options.timeline.on(this._getTimelineChangeTimesEvent(),p),p()}var t,n;return t=e,(n=[{key:"getImagePeriod",value:function(){return this.options.imagePeriod}},{key:"setImagePeriod",value:function(e){return this.options.imagePeriod=e,this.isStarted()&&this._updateAnimation(),this.trigger("change:imageFrequency"),this}},{key:"getImageFrequency",value:function(){return 1/this.options.imagePeriod}},{key:"setImageFrequency",value:function(e){return 0!=e&&this.setImagePeriod(1/e),this}},{key:"getRestartPause",value:function(){return this.options.restartPause}},{key:"setRestartPause",value:function(e){return this.options.restartPause=Number(e),this.trigger("change:restartPause"),this}},{key:"isStarted",value:function(){return void 0!==this.animationIntervalID||void 0!==this.animationTimeoutID}},{key:"start",value:function(){this.options.timeline.getSelectedTime().valueOf()in this.timesHash&&this._setStep(this.timesHash[this.options.timeline.getSelectedTime().valueOf()]),this.isStarted()||this._updateAnimation(),this.trigger("start:animation")}},{key:"stop",value:function(){this._clearAnimation(),this.trigger("stop:animation")}},{key:"toggle",value:function(){this.isStarted()?this.stop():this.start()}},{key:"_setStep",value:function(e){0<=e&&e<this._getCount()&&(this.animationStep=e)}},{key:"_getTimelineChangeTimesEvent",value:function(){return this.options.enabledStepsOnly||this.options.allEnabledStepsOnly?"change:enabledTimes":"change:times"}},{key:"_getTimelineTimesMethod",value:function(){return this.options.allEnabledStepsOnly?"getAllEnabledTimes":this.options.enabledStepsOnly?"getEnabledTimes":"getTimes"}},{key:"_getCount",value:function(){return this.options.timeline[this._getTimelineTimesMethod()]().length}},{key:"_updateAnimation",value:function(){this._clearAnimation(),this.animationStep<this._getCount()-1?this._initAnimation():this._initRestartPause()}},{key:"_initAnimation",value:function(){var e=this;void 0===this.animationIntervalID&&(this.animationIntervalID=window.setInterval((function(){e.animationStep++,e.animationStep<e.times.length&&e.options.timeline.setSelectedTime(e.times[e.animationStep]),e.animationStep>=e._getCount()-1&&(e.trigger("end:animation"),e._clearAnimation(),e._initRestartPause())}),1e3*this.options.imagePeriod))}},{key:"_initRestartPause",value:function(){var e=this;void 0===this.animationTimeoutID&&(this.animationTimeoutID=window.setTimeout((function(){e.animationStep=0,e.trigger("restart:animation"),e.animationStep<e.times.length&&e.options.timeline.setSelectedTime(e.times[e.animationStep]),e._clearAnimation(),e._initAnimation()}),1e3*(this.options.imagePeriod+this.options.restartPause)))}},{key:"_clearAnimation",value:function(){void 0!==this.animationIntervalID&&(window.clearInterval(this.animationIntervalID),this.animationIntervalID=void 0),void 0!==this.animationTimeoutID&&(window.clearTimeout(this.animationTimeoutID),this.animationTimeoutID=void 0)}}])&&W(t.prototype,n),e}();B(J.prototype);const Q=J;function ee(e,t){var n=t.animation,i=t.suffix,o=void 0===i?"fps":i,r=$()("<input>").addClass("form-control").attr("type","number").attr("min",1).attr("step",1),a=$()("<div>").addClass("input-group").append(r).append($()("<span>").addClass("input-group-text").text(o));r.on("change",(function(){return n.setImageFrequency(r.val())}));var s=function(){return r.val(n.getImageFrequency())};return n.on("change:imageFrequency",s),s(),e.append(a),a}function te(e,t){var n=t.animation,i=t.frequencies;i=i||[1];var o=$()("<input>").addClass("form-range").attr("type","range").attr("min",0).attr("max",i.length-1);o.on("change input",(function(){var e=o.val();e<i.length&&n.setImageFrequency(i[e])}));var r=function(){var e=i.indexOf(n.getImageFrequency());e>-1&&o.val(e)};return n.on("change:imageFrequency",r),r(),e.append(o),o}function ne(e,t){var n=t.animation,i=t.suffix,o=void 0===i?"s":i,r=$()("<input>").addClass("form-control").attr("type","number").attr("min",0).attr("step",.1),a=$()("<div>").addClass("input-group").append(r).append($()("<span>").addClass("input-group-text").text(o));r.on("change",(function(){return n.setRestartPause(r.val())}));var s=function(){return r.val(n.getRestartPause())};return n.on("change:restartPause",s),s(),e.append(a),a}const ie='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-play-fill" viewBox="0 0 16 16">\n  <path d="m11.596 8.697-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.692-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z"/>\n</svg>',oe='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pause-fill" viewBox="0 0 16 16">\n  <path d="M5.5 3.5A1.5 1.5 0 0 1 7 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5zm5 0A1.5 1.5 0 0 1 12 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5z"/>\n</svg>';function re(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function se(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var le=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.timeline,i=void 0===n?void 0:n,o=t.node,r=void 0===o?void 0:o,a=t.animation,s=void 0===a?void 0:a,l=t.enabledStepsOnly,u=void 0===l||l,c=t.allEnabledStepsOnly,f=void 0!==c&&c,d=t.textInvalid,h=void 0===d?"-":d,p=t.getTimeText,v=void 0===p?void 0:p,y=t.outputTimezone,m=void 0===y?void 0:y;ae(this,e),this.options={timeline:i,node:r,animation:s,enabledStepsOnly:u,allEnabledStepsOnly:f,textInvalid:h,getTimeText:v,outputTimezone:m},void 0===this.options.timeline&&(this.options.timeline=new z),this.listeners=[],this.inputListener=void 0}var t,n;return t=e,(n=[{key:"setNode",value:function(e){if(void 0!==this.options.node&&this.emptyNode(),void 0===e)this.detachEventListeners(),this.options.node=e;else{this.options.node=e;var t=this.listeners.length>0;t||(this.attachEventListener(this.options.timeline,"change:time",(function(){this.onChangeTime()}),this),this.attachEventListener(this.options.timeline,"change:times",(function(){this.onChangeTimes()}),this),this.attachEventListener(this.options.timeline,"change:enabledTimes",(function(){this.onChangeTimes()}),this)),this.onInitNode(t),this.onChangeTimes(),this.onChangeTime()}return void 0===this.inputListener&&(this.inputListener=this.on("input",(function(){void 0!==this.options.animation&&this.options.animation.stop()}),this)),this}},{key:"getOutputTimezone",value:function(){return this.options.outputTimezone}},{key:"setOutputTimezone",value:function(e){var t=this.options.outputTimezone!=e;return this.options.outputTimezone=e,t&&void 0!==this.options.node&&(this.onChangeTimes(),this.onChangeTime()),this}},{key:"onChangeTime",value:function(){}},{key:"onChangeTimes",value:function(){}},{key:"emptyNode",value:function(){}},{key:"onInitNode",value:function(){}},{key:"getTimelineTimes",value:function(){var e=this.options.allEnabledStepsOnly?"getAllEnabledTimes":this.options.enabledStepsOnly?"getEnabledTimes":"getTimes";return this.options.timeline[e]()}},{key:"timeToText",value:function(e,t){return isNaN(e)?this.options.textInvalid:void 0!==this.options.getTimeText?this.options.getTimeText.call(this,e,t):e.toISOString()}},{key:"attachEventListener",value:function(e,t,n,i){this.listeners.push([e,t]),e.on(t,n,i)}},{key:"detachEventListeners",value:function(){this.listeners.forEach((function(e){"un"in e[0]?e[0].un(e[1]):"off"in e[0]&&e[0].off(e[1])})),this.listeners=[]}}])&&se(t.prototype,n),e}();B(le.prototype);const ue=le;function ce(e){return(ce="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 fe=["format"];function de(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n,i,o={},r=Object.keys(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function he(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pe(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ve(e,t){return(ve=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ye(e,t){return!t||"object"!==ce(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function me(e){return(me=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const be=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ve(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=me(i);if(o){var n=me(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ye(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.format,i=void 0===n?void 0:n,o=de(t,fe);return he(this,a),(e=r.call(this,o)).options.format=i,e.setNode(e.options.node),e}return t=a,(n=[{key:"onChangeTime",value:function(){this.options.node.text(this.timeToText(this.options.timeline.getSelectedTime(),this.options.format))}},{key:"emptyNode",value:function(){this.options.node.text("")}}])&&pe(t.prototype,n),a}(ue);function ge(e){return(ge="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)}function we(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _e(e,t){return(_e=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Oe(e,t){return!t||"object"!==ge(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Se(e){return(Se=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const Te=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_e(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Se(i);if(o){var n=Se(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Oe(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=r.call(this,e)).times=[],t.timesIndexes={},t.setNode(t.options.node),t}return t=a,(n=[{key:"onChangeTime",value:function(){var e=this.options.timeline.getSelectedTime();e.valueOf()in this.timesIndexes?this.options.node.val(this.timesIndexes[e.valueOf()]+1):this.options.node.val(1)}},{key:"onChangeTimes",value:function(){this.times=this.getTimelineTimes(),this.timesIndexes={},this.times.forEach((function(e,t){this.timesIndexes[e.valueOf()]=t}),this),this.options.node.prop("max",this.times.length)}},{key:"onInitNode",value:function(e){if(this.options.node.prop("min",1),this.options.node.prop("step",1),!e){var t=this;this.attachEventListener(this.options.node,"change input",(function(){var e=+$()(this).val();0<e&&e<=t.times.length&&t.options.timeline.setSelectedTime(t.times[e-1]),t.trigger("input")}))}}}])&&we(t.prototype,n),a}(ue);function ke(e){return(ke="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 Pe=["format","grouping","groupingFormat","classMain","classButtonGroup","classButtonGroupMargin","classLabel","classLabelSpan","classButton","classButtonActive","classButtonNotEnabled","classButtonEnabled","classButtonAllEnabled"];function xe(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n,i,o={},r=Object.keys(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Re(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function je(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Ee(e,t){return(Ee=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ce(e,t){return!t||"object"!==ke(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ne(e){return(Ne=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const Be=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ee(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ne(i);if(o){var n=Ne(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Ce(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.format,i=void 0===n?"HH":n,o=t.grouping,s=void 0===o?"daily":o,l=t.groupingFormat,u=void 0===l?"ddd, DD. MMM":l,c=t.classMain,f=void 0===c?"btn-toolbar":c,d=t.classButtonGroup,h=void 0===d?"btn-group":d,p=t.classButtonGroupMargin,v=void 0===p?"me-2":p,y=t.classLabel,m=void 0===y?void 0:y,b=t.classLabelSpan,g=void 0===b?"d-block w-100":b,w=t.classButton,_=void 0===w?"btn":w,O=t.classButtonActive,S=void 0===O?"active":O,T=t.classButtonNotEnabled,k=void 0===T?"btn-light":T,P=t.classButtonEnabled,x=void 0===P?"btn-secondary":P,R=t.classButtonAllEnabled,j=void 0===R?"btn-primary":R,E=xe(t,Pe);return Re(this,a),(e=r.call(this,E)).options.format=i,e.options.grouping=s,e.options.groupingFormat=u,e.options.classMain=f,e.options.classButtonGroup=h,e.options.classButtonGroupMargin=v,e.options.classLabel=m,e.options.classLabelSpan=g,e.options.classButton=_,e.options.classButtonActive=S,e.options.classButtonNotEnabled=k,e.options.classButtonEnabled=x,e.options.classButtonAllEnabled=j,e.toolbarNode=void 0,e.setNode(e.options.node),e}return t=a,(n=[{key:"onChangeTime",value:function(){if(void 0!==this.toolbarNode){var e=this.options.timeline.getSelectedTime(),t=this;this.toolbarNode.find("button").each((function(){var n=new Date(+$()(this).data("time"));$()(this).removeClass(t.options.classButtonActive),e.valueOf()==n.valueOf()&&$()(this).addClass(t.options.classButtonActive)}))}}},{key:"onChangeTimes",value:function(){void 0===this.toolbarNode&&(this.toolbarNode=$()("<div>")),this.toolbarNode.empty();var e="daily"==this.options.grouping?"YYYY-MM-DD":"hourly"==this.options.grouping?"YYYY-MM-DD HH":this.options.grouping,t=void 0;this.getTimelineTimes().forEach((function(n){if(void 0===t||t.data("date")!=this.timeToText(n,e)){var i=$()("<div>").addClass(this.options.classButtonGroup).addClass(this.options.classButtonGroupMargin).attr("role","group").attr("aria-label",this.timeToText(n,e));if(void 0===this.options.groupingFormat)t=i;else{var o=$()("<span>").addClass(this.options.classLabelSpan).text(this.timeToText(n,this.options.groupingFormat));t=$()("<label>").addClass(this.options.classLabel).append(o),i.attr("aria-label",o.text()),t.append(i)}t.data("date",this.timeToText(n,e)),this.toolbarNode.append(t)}var r=$()("<button>").addClass(this.options.classButton).attr("type","button").data("time",n.valueOf());"function"==typeof this.options.format?r.text(this.timeToText(n,this.options.format.call(this,n))):r.text(this.timeToText(n,this.options.format)),this.options.timeline.isTimeAllEnabled(n)?r.addClass(this.options.classButtonAllEnabled):this.options.timeline.isTimeEnabled(n)?r.addClass(this.options.classButtonEnabled):r.addClass(this.options.classButtonNotEnabled);var a=this.options.timeline.getSelectedTime();n.valueOf()==a.valueOf()&&r.addClass(this.options.classButtonActive);var s=this;r.click((function(){s.options.timeline.setSelectedTime(new Date(+$()(this).data("time"))),s.trigger("input")})),t.hasClass(this.options.classButtonGroup)?t.append(r):t.children("div").append(r)}),this),this.toolbarNode.find("div."+this.options.classButtonGroup).last().removeClass(this.options.classButtonGroupMargin)}},{key:"emptyNode",value:function(){this.toolbarNode=void 0,this.options.node.empty()}},{key:"onInitNode",value:function(){this.toolbarNode=$()("<div>").addClass(this.options.classMain).attr("role","toolbar").attr("aria-label","Timeline toolbar"),this.options.node.append(this.toolbarNode)}}])&&je(t.prototype,n),a}(ue);function Ie(e){return(Ie="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 De=["format","buttonFormat","grouping","groupingDivider","groupingFormat","classMain","classDropdownMenu","classDropdownItem","classItemActive","classItemNotEnabled","classItemEnabled","classItemAllEnabled","classDropdownHeader","classDropdownDivider","classDropdownButton","classButtonNotEnabled","classButtonEnabled","classButtonAllEnabled"];function Ae(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n,i,o={},r=Object.keys(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Le(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Me(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Ve(e,t,n){return(Ve="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Fe(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function Ge(e,t){return(Ge=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ye(e,t){return!t||"object"!==Ie(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Fe(e){return(Fe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const Xe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ge(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Fe(i);if(o){var n=Fe(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Ye(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.format,i=void 0===n?"HH:mm":n,o=t.buttonFormat,s=void 0===o?"DD. MMMM YYYY HH:mm":o,l=t.grouping,u=void 0===l?"daily":l,c=t.groupingDivider,f=void 0===c||c,d=t.groupingFormat,h=void 0===d?"ddd, DD. MMMM YYYY":d,p=t.classMain,v=void 0===p?"dropdown":p,y=t.classDropdownMenu,m=void 0===y?"dropdown-menu":y,b=t.classDropdownItem,g=void 0===b?"dropdown-item":b,w=t.classItemActive,_=void 0===w?"active":w,O=t.classItemNotEnabled,S=void 0===O?"disabled":O,T=t.classItemEnabled,k=void 0===T?void 0:T,P=t.classItemAllEnabled,x=void 0===P?void 0:P,R=t.classDropdownHeader,j=void 0===R?"dropdown-header":R,E=t.classDropdownDivider,C=void 0===E?"dropdown-divider":E,N=t.classDropdownButton,B=void 0===N?"btn dropdown-toggle":N,I=t.classButtonNotEnabled,D=void 0===I?void 0:I,A=t.classButtonEnabled,L=void 0===A?void 0:A,M=t.classButtonAllEnabled,V=void 0===M?void 0:M,G=Ae(t,De);return Le(this,a),(e=r.call(this,G)).options.format=i,e.options.buttonFormat=s,e.options.grouping=u,e.options.groupingDivider=f,e.options.groupingFormat=h,e.options.classMain=v,e.options.classDropdownMenu=m,e.options.classDropdownItem=g,e.options.classItemActive=_,e.options.classItemNotEnabled=S,e.options.classItemEnabled=k,e.options.classItemAllEnabled=x,e.options.classDropdownHeader=j,e.options.classDropdownDivider=C,e.options.classDropdownButton=B,e.options.classButtonNotEnabled=D,e.options.classButtonEnabled=L,e.options.classButtonAllEnabled=V,e.visualisationButtonText=new be({timeline:e.options.timeline,format:e.options.buttonFormat,textInvalid:e.options.textInvalid,outputTimezone:e.options.outputTimezone,getTimeText:e.options.getTimeText}),e.dropdownNode=void 0,e.setNode(e.options.node),e}return t=a,(n=[{key:"setOutputTimezone",value:function(e){return Ve(Fe(a.prototype),"setOutputTimezone",this).call(this,e),this.visualisationButtonText.setOutputTimezone(e),this}},{key:"onChangeTime",value:function(){if(void 0!==this.dropdownNode){var e=this.options.timeline.getSelectedTime();this.options.node.children("li").children("button").removeClass(this.options.classButtonActive).removeClass(this.options.classButtonNotEnabled).removeClass(this.options.classButtonEnabled).removeClass(this.options.classButtonAllEnabled),this.options.timeline.isTimeAllEnabled(e)?this.options.node.children("button").addClass(this.options.classButtonAllEnabled):this.options.timeline.isTimeEnabled(e)?this.options.node.children("button").addClass(this.options.classButtonEnabled):this.options.node.children("button").addClass(this.options.classButtonNotEnabled);var t=this;this.dropdownNode.children("li").children("button."+this.options.classDropdownItem).each((function(){var n=new Date(+$()(this).data("time"));$()(this).removeClass(t.options.classItemActive).removeClass(t.options.classItemNotEnabled).removeClass(t.options.classItemEnabled).removeClass(t.options.classItemAllEnabled),e.valueOf()==n.valueOf()?$()(this).addClass(t.options.classItemActive):t.options.timeline.isTimeAllEnabled(n)?$()(this).addClass(t.options.classItemAllEnabled):t.options.timeline.isTimeEnabled(n)?$()(this).addClass(t.options.classItemEnabled):$()(this).addClass(t.options.classItemNotEnabled)}))}}},{key:"onChangeTimes",value:function(){void 0===this.dropdownNode&&(this.dropdownNode=$()("<div>")),this.dropdownNode.empty();var e="daily"==this.options.grouping?"YYYY-MM-DD":"hourly"==this.options.grouping?"YYYY-MM-DD HH":this.options.grouping,t=void 0;this.getTimelineTimes().forEach((function(n){void 0!==t&&t==this.timeToText(n,e)||(void 0!==t&&this.options.groupingDivider&&this.dropdownNode.append($()("<div>").addClass(this.options.classDropdownDivider)),void 0!==this.options.groupingFormat&&this.dropdownNode.append($()("<h6>").addClass(this.options.classDropdownHeader).text(this.timeToText(n,this.options.groupingFormat))),t=this.timeToText(n,e));var i=$()("<button>").addClass(this.options.classDropdownItem).attr("type","button").text(this.timeToText(n,this.options.format)).data("time",n.valueOf()),o=this;i.click((function(){o.options.timeline.setSelectedTime(new Date(+$()(this).data("time"))),o.trigger("input")})),this.dropdownNode.append($()("<li>").append(i))}),this)}},{key:"emptyNode",value:function(){void 0!==this.visualisationButtonText&&this.visualisationButtonText.setNode(void 0),this.dropdownNode=void 0,this.options.node.empty()}},{key:"onInitNode",value:function(){for(var e="dropdownMenuButton",t=0;null!=document.getElementById(e);)e="dropdownMenuButton"+ ++t;var n=$()("<button>").addClass(this.options.classDropdownButton).attr("type","button").attr("id",e).attr("data-bs-toggle","dropdown").attr("aria-haspopup",!0).attr("aria-expanded",!1);this.visualisationButtonText.setNode(n),this.dropdownNode=$()("<ul>").addClass(this.options.classDropdownMenu).attr("aria-labelledby",e),this.options.node.addClass(this.options.classMain).append(n).append(this.dropdownNode)}}])&&Me(t.prototype,n),a}(ue);function ze(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var qe=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=$().extend(!0,{map:void 0,layerGroup:void 0},t)}var t,n;return t=e,(n=[{key:"getMap",value:function(){return this.options.map}},{key:"getViewCenter",value:function(){}},{key:"setViewCenter",value:function(){return this}},{key:"getViewZoom",value:function(){}},{key:"setViewZoom",value:function(){return this}},{key:"makeLayerGroup",value:function(){}},{key:"getExtendedEventByTypeCollection",value:function(e){return e.synviewType=void 0,e.layer=void 0,e.feature=void 0,e.color=void 0,e}},{key:"findLayerInType",value:function(){return-1}}])&&ze(t.prototype,n),e}();B(qe.prototype);const He=qe;function Ke(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Ue=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.itemIds=[],this.items={}}var t,n;return t=e,(n=[{key:"getCount",value:function(){return this.itemIds.length}},{key:"getItems",value:function(){return this.itemIds.map((function(e){return this.items[e]}),this)}},{key:"getItemIds",value:function(){return this.itemIds}},{key:"getItemById",value:function(e){return e in this.items?this.items[e]:void 0}},{key:"containsId",value:function(e){return-1!==this.getIndexById(e)}},{key:"getIndexById",value:function(e){var t=-1;return this.itemIds.forEach((function(n,i){n==e&&(t=i)})),t}},{key:"append",value:function(e){var t=e.getId();return this.containsId(t)?(this.trigger("replace:item",e,this.getItemById(t)),this.items[t]=e):(this.itemIds.push(t),this.items[t]=e,this.trigger("add:item",e)),this}},{key:"remove",value:function(e){var t=this.getItemById(e);if(void 0!==t){var n=this.getIndexById(e);delete this.items[e],this.itemIds.splice(n,1),this.trigger("remove:item",t)}return this}}])&&Ke(t.prototype,n),e}();B(Ue.prototype);const $e=Ue,Ze=ol.layer.Group;var We=n.n(Ze);const Je=ol.layer.Vector;var Qe=n.n(Je);const et=ol.Observable;function tt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nt(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var it=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.url,i=void 0===n?void 0:n,o=t.datetime,r=void 0===o?void 0:o,a=t.mimetype,s=void 0===a?void 0:a,l=t.reloadTime,u=void 0===l?void 0:l,c=t.className,f=void 0===c?void 0:c,d=t.imageSmoothingEnabled,h=void 0===d?void 0:d,p=t.ol,v=void 0===p?{}:p;tt(this,e),this.options={url:i,datetime:r,mimetype:s,reloadTime:u,className:f,ol:v},this._normalizeOLOptions(this.options.ol),this.layer=void 0,this.layerGroup=void 0,this.reloadTimerId=void 0,this.visible=!1,this.zIndex=void 0,this.opacity=1,this._imageSmoothing=h}var t,n;return t=e,(n=[{key:"getId",value:function(){return this.getUrl()}},{key:"getUrl",value:function(){return this.options.url}},{key:"getDatetime",value:function(){return this.options.datetime}},{key:"getMIMEType",value:function(){return void 0===this.options.mimetype?"application/octet-stream":this.options.mimetype}},{key:"getReloadTime",value:function(){return this.options.reloadTime}},{key:"setReloadTime",value:function(e){return this.options.reloadTime=e,this._reload(),this}},{key:"getVisible",value:function(){return this.visible}},{key:"setVisible",value:function(e){return this.visible=e,void 0!==this.layer&&("setVisible"in this.layer?this.layer.setVisible(e):this.visible?this.layer.addTo(this.layerGroup):this.layerGroup.removeLayer(this.layer)),this}},{key:"getZIndex",value:function(){return this.zIndex}},{key:"setZIndex",value:function(e){return this.zIndex=e,void 0!==this.layer&&this.layer.setZIndex(e),this}},{key:"getOpacity",value:function(){return this.opacity}},{key:"setOpacity",value:function(e){return this.opacity=e,void 0!==this.layer&&this.layer.setOpacity(e),this}},{key:"className",get:function(){return this.options.className},set:function(e){this.options.className=e}},{key:"imageSmoothingEnabled",get:function(){return this._imageSmoothing},set:function(e){this._imageSmoothing=e}},{key:"getLayerGroup",value:function(){return this.layerGroup}},{key:"setLayerGroup",value:function(e){if(void 0!==this.layerGroup&&void 0!==this.layer&&("remove"in this.layerGroup.getLayers()?this.layerGroup.getLayers().remove(this.layer):this.layerGroup.removeLayer(this.layer)),void 0===e&&(this.layer=void 0),this.layerGroup=e,void 0!==this.layerGroup)if("addLayer"in this.layerGroup){var t=this.getLLLayer();this.getVisible()&&this.layerGroup.addLayer(t)}else this.layerGroup.getLayers().push(this.getOLLayer());return this.setReloadTime(this.getReloadTime()),this}},{key:"getOLLayer",value:function(){return void 0!==this.layer||(this.layer=this._makeOLLayer()),this.layer}},{key:"makeOLLayer",value:function(){return new(Qe())({className:this.className})}},{key:"_makeOLLayer",value:function(){var e=this,t=this.makeOLLayer();if(t.setVisible(this.visible),t.setZIndex(this.zIndex),t.setOpacity(this.opacity),"events"in this.options.ol&&void 0!==this.options.ol.events&&["prerender","postrender"].forEach((function(n){n in e.options.ol.events&&void 0!==e.options.ol.events[n]&&t.on(n,(function(i){e.options.ol.events[n].call(e,i,t)}))})),!this._imageSmoothing){var n=t.getSource();null!==n&&"contextOptions_"in n&&(n.contextOptions_={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1})}return t}},{key:"getLLLayer",value:function(){return void 0!==this.layer||(this.layer=this._makeLLLayer()),this.layer}},{key:"makeLLLayer",value:function(){return L.Layer()}},{key:"preload",value:function(){}},{key:"_makeLLLayer",value:function(){return this.makeLLLayer()}},{key:"_reload",value:function(){if(void 0!==this.reloadTimerId&&(clearTimeout(this.reloadTimerId),this.reloadTimerId=void 0),void 0!==this.options.reloadTime&&void 0!==this.layerGroup){var e=function(){if(this.reloadTimerId=void 0,void 0!==this.layerGroup){var t=this._makeOLLayer();if("getUrl"in t.getSource()){var n=this.layerGroup,i=t.getSource().on("change",function(){"ready"!=t.getSource().getState()&&"error"!=t.getSource().getState()||((0,et.unByKey)(i),"ready"==t.getSource().getState()&&void 0!==this.layerGroup?(t.setVisible(this.layer.getVisible()),t.setOpacity(this.layer.getOpacity()),t.setZIndex(this.layer.getZIndex()),this.layerGroup.getLayers().remove(this.layer),this.layer=t):void 0!==this.layerGroup?this.layerGroup.getLayers().remove(t):n.getLayers().remove(t),void 0===this.reloadTimerId&&void 0!==this.options.reloadTime&&void 0!==this.layerGroup&&(this.reloadTimerId=setTimeout(e,1e3*this.options.reloadTime)))}.bind(this));this.layerGroup.getLayers().push(t),t.setVisible(!0)}else this.layerGroup.getLayers().push(t),t.setVisible(!0),setTimeout(function(){this.layer=t,void 0===this.reloadTimerId&&void 0!==this.options.reloadTime&&(this.reloadTimerId=setTimeout(e,1e3*this.options.reloadTime))}.bind(this),1e3)}}.bind(this);return this.reloadTimerId=setTimeout(e,1e3*this.options.reloadTime),this}}},{key:"_normalizeOLOptions",value:function(e){var t=e.source,n=void 0===t?{}:t,i=e.events,o=void 0===i?void 0:i,r=e.style,a=void 0===r?void 0:r;this.options.ol={source:n,events:o,style:a}}}])&&nt(t.prototype,n),e}();B(it.prototype);const ot=it;function rt(e){return(rt="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)}function at(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function st(e,t,n){return(st="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ct(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function lt(e,t){return(lt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ut(e,t){return!t||"object"!==rt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ct(e){return(ct=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const ft=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&lt(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ct(i);if(o){var n=ct(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ut(this,e)});function a(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(e=r.call(this)).times=[],e}return t=a,(n=[{key:"getResources",value:function(){return this.times.map((function(e){return this.items[e.valueOf()]}),this)}},{key:"getTimes",value:function(){return this.times}},{key:"getItemById",value:function(e){var t=st(ct(a.prototype),"getItemById",this).call(this,e);return void 0===t?new ot:t}},{key:"getResourceByTime",value:function(e){return this.getItemById(isNaN(e)?"":e.valueOf())}},{key:"containsTime",value:function(e){return this.getIndexById(isNaN(e)?"":e.valueOf())>-1}},{key:"getIndexByTime",value:function(e){var t=-1;return isNaN(e)||this.times.forEach((function(n,i){n.valueOf()==e.valueOf()&&(t=i)})),t}},{key:"getNewestResource",value:function(){return this.times.length<1?new ot:this.getResourceByTime(this.times[this.times.length-1])}},{key:"append",value:function(e){return this._append(e),this._sortTimes(),this}},{key:"remove",value:function(e){return this._remove(isNaN(e)?"":e.valueOf()),this._sortTimes(),this}},{key:"setResources",value:function(e){return e.forEach((function(e){this._append(e)}),this),this._filterTimesByResources(e),this._sortTimes(),this}},{key:"_append",value:function(e){var t=e.getDatetime(),n=void 0===t?"":t.valueOf();this.containsId(n)?(this.trigger("replace:item",e,this.getItemById(n)),this.items[n]=e):(this.itemIds.push(n),this.items[n]=e,void 0===t||isNaN(t)||this.times.push(t),this.trigger("add:item",e))}},{key:"_remove",value:function(e){var t=this.getIndexById(e);if(t>-1){var n=this.items[e];if(delete this.items[e],this.itemIds.splice(t,1),void 0!==e&&""!==e&&!isNaN(e)){var i=this.times.findIndex((function(t){return t.valueOf()==e}));i>-1&&this.times.splice(i,1)}this.trigger("remove:item",n)}}},{key:"_filterTimesByResources",value:function(e){var t=!1;this.times=this.times.filter((function(n){var i=!1;return e.findIndex((function(e){var i=!1,o=e.getDatetime();return void 0!==o&&n.valueOf()==o.valueOf()?i=!0:void 0===o&&(t=!0),i}),this)<0&&(this.remove(n.valueOf()),i=!0),!i}),this),t&&this.remove("")}},{key:"_sortTimes",value:function(){this.times.sort((function(e,t){return e.valueOf()-t.valueOf()}))}}])&&at(t.prototype,n),a}($e);function dt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ht(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var pt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.id,i=void 0===n?void 0:n,o=t.visible,r=void 0===o||o,a=t.zIndex,s=void 0===a?void 0:a,l=t.displayMethod,u=void 0===l?"floor":l,c=t.displayMaxResourceAge,f=void 0===c?10800:c,d=t.displayFadeStart,h=void 0===d?900:d,p=t.displayFadeStartOpacity,v=void 0===p?.95:p,y=t.resources,m=void 0===y?void 0:y,b=t.className,g=void 0===b?void 0:b,w=t.imageSmoothingEnabled,_=void 0===w?void 0:w,O=t.tooltip,S=void 0===O?void 0:O,T=t.preload,k=void 0===T?{}:T;dt(this,e),this.options={id:i,visible:r,zIndex:s,displayMethod:u,displayMaxResourceAge:f,displayFadeStart:h,displayFadeStartOpacity:v,resources:m,className:g,imageSmoothingEnabled:_,tooltip:S},this.layerGroup=void 0,this.collection=new ft,this.displayedResourceTime=new Date("invalid"),this.collection.on("add:item",(function(e){e.className=this.className,this._addOLLayer(e),this._preload.enabled&&e.preload()}),this),this.collection.on("remove:item",(function(e){this._removeOLLayer(e)}),this),this.collection.on("replace:item",(function(e,t){e!==t&&(e.className=this.className,this._replaceOLLayer(e,t),this._preload.enabled&&e.preload())}),this),this._preload=k,void 0!==this.options.resources&&this.collection.setResources(this.options.resources),delete this.options.resources}var t,n;return t=e,(n=[{key:"getId",value:function(){return this.options.id}},{key:"setId",value:function(e){return this.options.id=e,this}},{key:"getVisible",value:function(){return this.options.visible}},{key:"setVisible",value:function(e){return(this.options.visible?!e:e)&&(this.options.visible=!!e,void 0!==this.layerGroup&&this.layerGroup.setVisible(this.options.visible),this.getResourceCollection().getItems().forEach((function(e){isNaN(e.getDatetime())&&e.setVisible(this.options.visible),e.setLayerGroup(this.options.visible?this.layerGroup:void 0)}),this),this.trigger("change:visible")),this}},{key:"getZIndex",value:function(){return this.options.zIndex}},{key:"setZIndex",value:function(e){return this.options.zIndex=e,void 0!==this.layerGroup&&this.layerGroup.setZIndex(e),this.getResourceCollection().getItems().forEach((function(t){t.setZIndex(e)})),this}},{key:"className",get:function(){return this.options.className},set:function(e){this.options.className=e}},{key:"getLayerGroup",value:function(){return void 0===this.layerGroup?new(We()):this.layerGroup}},{key:"setLayerGroup",value:function(e){return this.layerGroup=e,void 0!==this.layerGroup&&("setVisible"in this.layerGroup&&this.layerGroup.setVisible(this.options.visible),this.layerGroup.setZIndex(this.options.zIndex)),this.getResourceCollection().getItems().forEach((function(t){t.setLayerGroup(this.options.visible?e:void 0)}),this),this}},{key:"getResourceCollection",value:function(){return this.collection}},{key:"appendResource",value:function(e){return this.collection.append(e),this.setDisplayTime(this.displayedResourceTime),this.trigger("change:resources"),this}},{key:"removeResource",value:function(e){return this._hideVisibleResource(),this.collection.remove(e.getDatetime()),this.setDisplayTime(this.displayedResourceTime),this.trigger("change:resources"),this}},{key:"setResources",value:function(e){return this._hideVisibleResource(),this.collection.setResources(e),this.setDisplayTime(this.displayedResourceTime),this.trigger("change:resources"),this}},{key:"getDisplayedResource",value:function(){return this.getVisible()&&void 0!==this.layerGroup?isNaN(this.displayedResourceTime)&&this.collection.getTimes().length>0?new ot:this.collection.getResourceByTime(this.displayedResourceTime):new ot}},{key:"setDisplayTime",value:function(e){if(!this.getVisible())return this;var t=this._getResourceTimeByDisplayTime(e);if((void 0===t||void 0!==t&&!isNaN(this.displayedResourceTime)&&this.displayedResourceTime.valueOf()!=t.valueOf())&&this._hideVisibleResource(),void 0!==t){this.displayedResourceTime=t;var n=this.getResourceCollection().getItemById(t.valueOf());if(n.getId()){n.setVisible(!0);var i=1;Math.abs(e.valueOf()-t.valueOf())>1e3*this.options.displayMaxResourceAge?i=0:Math.abs(e.valueOf()-t.valueOf())>1e3*this.options.displayFadeStart&&(i=this.options.displayFadeStartOpacity*(Math.abs(e.valueOf()-t.valueOf())-1e3*this.options.displayMaxResourceAge)/(1e3*(this.options.displayFadeStart-this.options.displayMaxResourceAge))),n.setOpacity(i)}}else this.displayedResourceTime=new Date("invalid");return this}},{key:"getTooltip",value:function(){return this.options.tooltip}},{key:"setTooltip",value:function(e){return this.options.tooltip=e,this}},{key:"setResourcesOLStyle",value:function(){var e=arguments;return this.getResourceCollection().getItems().forEach((function(t){"setOLStyle"in t&&t.setOLStyle.apply(t,e)})),this}},{key:"_hideVisibleResource",value:function(){isNaN(this.displayedResourceTime)||this.getResourceCollection().getItemById(this.displayedResourceTime.valueOf()).setVisible(!1)}},{key:"_addOLLayer",value:function(e){isNaN(e.getDatetime())&&e.setVisible(this.getVisible()),void 0!==this.options.imageSmoothingEnabled&&void 0===e.imageSmoothingEnabled&&(e.imageSmoothingEnabled=this.options.imageSmoothingEnabled),e.setLayerGroup(this.getLayerGroup()),e.setZIndex(this.options.zIndex)}},{key:"_removeOLLayer",value:function(e){e.setLayerGroup(void 0)}},{key:"_replaceOLLayer",value:function(e,t){this._removeOLLayer(t),this._addOLLayer(e)}},{key:"_getResourceTimeByDisplayTime",value:function(e){if(!isNaN(e)){var t=void 0;return this.collection.getTimes().forEach((function(n){switch(this.options.displayMethod){case"exact":e.valueOf()==n.valueOf()&&(t=n);break;case"nearest":(void 0===t||Math.abs(e.valueOf()-n.valueOf())<Math.abs(e.valueOf()-t.valueOf()))&&(t=n);break;case"floor":default:(void 0===t||n.valueOf()<=e.valueOf()&&e.valueOf()-n.valueOf()<e.valueOf()-t.valueOf())&&(t=n)}}),this),t}}}])&&ht(t.prototype,n),e}();B(pt.prototype);const vt=pt;function yt(e){return(yt="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)}function mt(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function bt(e,t,n){return(bt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_t(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function gt(e,t){return(gt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wt(e,t){return!t||"object"!==yt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _t(e){return(_t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const Ot=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gt(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=_t(i);if(o){var n=_t(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return wt(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=r.call(this)).options=$().extend(!0,{exclusiveVisibility:!1,syncVisibility:!1},e),t}return t=a,(n=[{key:"getItemById",value:function(e){return void 0===bt(_t(a.prototype),"getItemById",this).call(this,e)?new vt:this.items[e]}},{key:"append",value:function(e){var t=this;return this.options.exclusiveVisibility&&e.getVisible()&&this.isVisible()?e.setVisible(!1):t.options.syncVisibility&&(e.getVisible()?this.isVisible()||this.getItems().forEach((function(e){e.setVisible(!0)}),this):this.isVisible()&&e.setVisible(!0)),e.on("change:visible",(function(){t.options.exclusiveVisibility?this.getVisible()&&t.getItems().forEach((function(e){e.getId()!=this.getId()&&e.setVisible(!1)}),this):t.options.syncVisibility&&t.getItems().forEach((function(e){e.getId()!=this.getId()&&e.setVisible(this.getVisible())}),this)})),bt(_t(a.prototype),"append",this).call(this,e)}},{key:"getVisibleTypes",value:function(){return this.getItems().filter((function(e){return e.getVisible()}))}},{key:"isVisible",value:function(){return this.getVisibleTypes().length>0}},{key:"setExclusiveVisibility",value:function(e){if(this.options.exclusiveVisibility!=e&&e){var t=!1;this.getItems().forEach((function(e){t?e.setVisible(!1):t=e.getVisible()}),this)}return this.options.exclusiveVisibility=e,this}},{key:"setSyncVisibility",value:function(e){return this.options.syncVisibility!=e&&e&&this.isVisible()&&this.getItems().forEach((function(e){e.setVisible(!0)}),this),this.options.syncVisibility=e,this}}])&&mt(t.prototype,n),a}($e),St=function e(t){var n=this,i=t.map,o=t.typeCollection,r=t.tooltip;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.tooltipFeature=void 0,this.tooltipPixelColor=void 0,this.map=i,this.typeCollection=o,this.tooltip=r,Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this.tooltip),"tooltipNode")&&void 0===this.tooltip.tooltipNode&&(this.tooltip.tooltipNode=$()("<div>").css("position","absolute").prependTo(this.map.getMap().getTargetElement())),this.tooltip.on("hide:tooltip",(function(){n.tooltipFeature=void 0,n.tooltipPixelColor=void 0})),this.map.on("move:pointer",(function(e){if(!e.dragging)if((e=n.map.getExtendedEventByTypeCollection(e,n.typeCollection)).feature||e.color){if(e.feature===n.tooltipFeature&&(void 0===e.color&&void 0===n.tooltipPixelColor||void 0!==e.color&&void 0!==n.tooltipPixelColor&&e.color.join(",")===n.tooltipPixelColor.join(",")))return void n.tooltip.show({posX:e.pixel[0],posY:e.pixel[1]});n.tooltipFeature=void 0,n.tooltipPixelColor=void 0;var t=e.synviewType.getTooltip().call(void 0,e);void 0!==t?(n.tooltipFeature=e.feature,n.tooltipPixelColor=e.color,n.tooltip.content=t,n.tooltip.hide().show({posX:e.pixel[0],posY:e.pixel[1]})):n.tooltip.hide()}else n.tooltip.hide()}))};function Tt(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var kt=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=$().extend(!0,{map:void 0,timeline:void 0,tooltip:void 0},t),void 0===this.options.map&&(this.options.map=new He),void 0===this.options.timeline&&(this.options.timeline=new z),this.typeCollection=new Ot,this.tooltip=void 0,this.options.timeline.on("change:time",(function(){this.getTypeCollection().getItems().map((function(e){e.setDisplayTime(this.options.timeline.getSelectedTime())}),this)}),this);var n=this.options.timeline,i=function(){var e=n.isLastEnabledTime();this.getVisible()?n.setTimesBySetID(this.getId(),this.getResourceCollection().getTimes()):n.setTimesBySetID(this.getId(),[]),e?n.last():isNaN(n.getSelectedTime())&&n.first()},o=function(e){e.setLayerGroup(this.options.map.makeLayerGroup()),i.call(e),e.setDisplayTime(this.getTimeline().getSelectedTime()),e.on("change:resources",i),e.on("change:visible",i),void 0!==e.getTooltip()&&void 0===this.tooltip&&(this.tooltip=new St({map:this.options.map,typeCollection:this.typeCollection,tooltip:this.options.tooltip}))},r=function(e){this.getTimeline().deleteSetID(e.getId())};this.typeCollection.on("add:item",o,this),this.typeCollection.on("remove:item",r,this),this.typeCollection.on("replace:item",(function(e,t){o.call(this,e),r.call(this,t)}),this)}var t,n;return t=e,(n=[{key:"getTimeline",value:function(){return this.options.timeline}},{key:"getMap",value:function(){return this.options.map}},{key:"getTypeCollection",value:function(){return this.typeCollection}},{key:"appendType",value:function(e){if(void 0===e.getId()){var t,n=0;do{t="synview-type-"+n++}while(this.getTypeCollection().containsId(t));e.setId(t)}return this.getTypeCollection().append(e),this}},{key:"getTooltip",value:function(){return this.options.tooltip}}])&&Tt(t.prototype,n),e}();const Pt=ol.proj;function xt(e){return(xt="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)}function Rt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return jt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jt(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function jt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Et(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Ct(e,t,n){return(Ct="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Dt(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function Nt(e,t){return(Nt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Bt(e,t){return!t||"object"!==xt(t)&&"function"!=typeof t?It(e):t}function It(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Dt(e){return(Dt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var At="EPSG:4326";const Lt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Nt(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Dt(i);if(o){var n=Dt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Bt(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),void 0===(t=r.call(this,e)).options.layerGroup&&(t.options.layerGroup=new(We()),t.options.map.addLayer(t.options.layerGroup)),t.options.map.getView().on("change:center",function(){this.trigger("change:view",this)}.bind(It(t))),t.options.map.getView().on("change:resolution",function(){this.trigger("change:view",this)}.bind(It(t))),t.options.map.on("pointermove",function(e){this.trigger("move:pointer",e)}.bind(It(t))),t.options.map.on("click",function(e){this.trigger("click:pointer",e)}.bind(It(t))),t.options.map.on("singleclick",function(e){this.trigger("singleclick:pointer",e)}.bind(It(t))),t.options.map.on("dblclick",function(e){this.trigger("dblclick:pointer",e)}.bind(It(t))),t.options.map.on("pointerdrag",function(e){this.trigger("drag:pointer",e)}.bind(It(t))),t}return t=a,(n=[{key:"getViewCenter",value:function(){return(0,Pt.transform)(this.options.map.getView().getCenter(),this.options.map.getView().getProjection(),At)}},{key:"setViewCenter",value:function(e){var t=!0;return e=e.map((function(e){return isNaN(e)?void(t=!1):1*e})),t&&this.options.map.getView().setCenter((0,Pt.fromLonLat)(e)),this}},{key:"getViewZoom",value:function(){return this.options.map.getView().getZoom()}},{key:"setViewZoom",value:function(e){return isNaN(e)||this.options.map.getView().setZoom(1*e),this}},{key:"makeLayerGroup",value:function(){var e=new(We());return this.options.layerGroup.getLayers().push(e),e}},{key:"getExtendedEventByTypeCollection",value:function(e,t){e=Ct(Dt(a.prototype),"getExtendedEventByTypeCollection",this).call(this,e,t);var n=new Map;t.getVisibleTypes().filter((function(e){return void 0!==e.getTooltip()})).map((function(e){return n.set(e,[])}));var i,o=new Set,r=new Set,s=Rt(n.keys());try{var l=function(){var e=i.value;e.getLayerGroup().getLayers().getArray().filter((function(e){return e.getVisible()})).forEach((function(t){n.get(e).push(t),o.add(t),r.add(t.getClassName())}))};for(s.s();!(i=s.n()).done;)l()}catch(e){s.e(e)}finally{s.f()}return this.options.map.forEachFeatureAtPixel(e.pixel,(function(t,i){var o,r=Rt(n.keys());try{var a=function(){var r=o.value;if(n.get(r).forEach((function(n){void 0===e.synviewType&&n===i&&(e.feature=t,e.layer=i,e.synviewType=r)})),void 0!==e.synviewType)return"break"};for(r.s();!(o=r.n()).done&&"break"!==a(););}catch(e){r.e(e)}finally{r.f()}return void 0!==e.synviewType}),{hitTolerance:5,layerFilter:function(e){return o.has(e)}}),void 0===e.feature&&this.options.map.forEachLayerAtPixel(e.pixel,(function(t,i){if(null==i||i.length<1)return!1;var o,r=Rt(n.keys());try{var a=function(){var r=o.value;if(n.get(r).forEach((function(n){void 0===e.synviewType&&n.getClassName()==t.getClassName()&&(e.color=i,e.layer=t,e.synviewType=r)})),void 0!==e.synviewType)return"break"};for(r.s();!(o=r.n()).done&&"break"!==a(););}catch(e){r.e(e)}finally{r.f()}return void 0!==e.synviewType}),{hitTolerance:5,layerFilter:function(e){return r.has(e.getClassName())}}),e}},{key:"findLayerInType",value:function(e,t){return t.getLayerGroup().getLayers().getArray().findIndex((function(t){return t==e}))>-1}}])&&Et(t.prototype,n),a}(He);function Mt(e){return(Mt="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)}function Vt(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Gt(e,t){return(Gt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Yt(e,t){return!t||"object"!==Mt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ft(e){return(Ft=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const Xt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Gt(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ft(i);if(o){var n=Ft(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Yt(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),void 0===(t=r.call(this,e)).options.layerGroup&&(t.options.layerGroup=L.layerGroup().addTo(t.options.map)),t}return t=a,(n=[{key:"makeLayerGroup",value:function(){return L.layerGroup().addTo(this.options.layerGroup)}}])&&Vt(t.prototype,n),a}(He),zt=ol.format.GeoJSON;var qt=n.n(zt);const Ht=ol.source.Vector;var Kt=n.n(Ht);function Ut(e){return(Ut="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)}function $t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zt(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Wt(e,t){return(Wt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Jt(e,t){return!t||"object"!==Ut(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Qt(e){return(Qt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const en=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Wt(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Qt(i);if(o){var n=Qt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Jt(this,e)});function a(){return $t(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getId",value:function(){var e=this.getDatetime();return isNaN(e)?"":e.toISOString()}},{key:"makeOLLayer",value:function(){var e={source:this.options.ol.source,events:this.options.ol.events,style:this.options.ol.style};if(this.options.ol,!("refresh"in e.source)){var t=e.source;void 0!==this.options.url&&"format"in t&&void 0!==t.format&&(t.url=this.options.url),"projection"in t&&void 0!==t.projection||(t.projection=At),e.source=new(Kt())(t)}return"function"==typeof e.style&&(e.style=e.style.bind(this)),this.className&&(e.className=this.className),new(Qe())(e)}},{key:"setOLStyle",value:function(e){return void 0===this.layer&&this.getOLLayer(),void 0!==this.layer&&"setStyle"in this.layer?(0==arguments.length?this.layer.setStyle(this.layer.getStyle()):this.layer.setStyle(e),this):this}}])&&Zt(t.prototype,n),a}(ot);function tn(e){return(tn="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)}function nn(e,t){return(nn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function on(e,t){return!t||"object"!==tn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function rn(e){return(rn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const an=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&nn(e,t)}(o,e);var t,n,i=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,i=rn(t);if(n){var o=rn(this).constructor;e=Reflect.construct(i,arguments,o)}else e=i.apply(this,arguments);return on(this,e)});function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).options.ol.source.url=t.options.url,t.options.ol.source.format=new(qt()),t}return o}(en),sn=ol.source.VectorTile;var ln=n.n(sn);const un=ol.layer.VectorTile;var cn=n.n(un);function fn(e){return(fn="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)}function dn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hn(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function pn(e,t){return(pn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vn(e,t){return!t||"object"!==fn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function yn(e){return(yn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const mn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&pn(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=yn(i);if(o){var n=yn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return vn(this,e)});function a(){return dn(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"makeOLLayer",value:function(){var e={source:this.options.ol.source,events:this.options.ol.events,style:this.options.ol.style};if(!("refresh"in e.source)){var t=e.source;!("tileUrlFunction"in t)&&void 0!==this.options.url&&"format"in t&&void 0!==t.format&&(t.url=this.options.url),"projection"in t&&void 0!==t.projection||(t.projection=At),e.source=new(ln())(t)}return"function"==typeof e.style&&(e.style=e.style.bind(this)),this.className&&(e.className=this.className),new(cn())(e)}}])&&hn(t.prototype,n),a}(en);function bn(e){return(bn="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)}function gn(e,t){return(gn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wn(e,t){return!t||"object"!==bn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _n(e){return(_n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const On=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gn(e,t)}(o,e);var t,n,i=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,i=_n(t);if(n){var o=_n(this).constructor;e=Reflect.construct(i,arguments,o)}else e=i.apply(this,arguments);return wn(this,e)});function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).options.ol.source.format=new(qt()),t}return o}(mn),Sn=ol.source.ImageStatic;var Tn=n.n(Sn);const kn=ol.layer.Image;var Pn=n.n(kn);function xn(e){return(xn="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)}function Rn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jn(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function En(e,t){return(En=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Cn(e,t){return!t||"object"!==xn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Nn(e){return(Nn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const Bn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&En(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Nn(i);if(o){var n=Nn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Cn(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.url,i=void 0===n?void 0:n,o=t.datetime,s=void 0===o?void 0:o,l=t.mimetype,u=void 0===l?void 0:l,c=t.reloadTime,f=void 0===c?void 0:c,d=t.className,h=void 0===d?void 0:d,p=t.extent,v=t.ol,y=void 0===v?{}:v;return Rn(this,a),(e=r.call(this,{url:i,datetime:s,mimetype:u,reloadTime:f,className:h,ol:y})).options.extent=p,e}return t=a,(n=[{key:"makeOLLayer",value:function(){var e=this.options.ol.source;return e.url=this.options.url,e.imageExtent=(0,Pt.transformExtent)(this.options.extent,At,"EPSG:3857"),new(Pn())({source:new(Tn())(e),className:this.className})}},{key:"makeLLLayer",value:function(){return L.imageOverlay(this.options.url,[[this.options.extent[1],this.options.extent[0]],[this.options.extent[3],this.options.extent[2]]])}},{key:"preload",value:function(){this.getOLLayer().getSource().image_.load()}}])&&jn(t.prototype,n),a}(ot),In=ol.source.OSM;var Dn=n.n(In);const An=ol.layer.Tile;var Ln=n.n(An);function Mn(e){return(Mn="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)}function Vn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gn(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Yn(e,t){return(Yn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fn(e,t){return!t||"object"!==Mn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Xn(e){return(Xn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const zn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Yn(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Xn(i);if(o){var n=Xn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Fn(this,e)});function a(){return Vn(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"makeOLLayer",value:function(){var e=this.options.ol.source;return e.url=this.options.url,new(Ln())({source:new(Dn())(e)})}}])&&Gn(t.prototype,n),a}(ot);function qn(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Hn=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._isShown=!1,this._content=void 0}var t,n;return t=e,(n=[{key:"isShown",get:function(){return this._isShown}},{key:"content",get:function(){return this._content},set:function(e){var t=this._content;this._content=e,t!==this._content&&this.onContentChange()}},{key:"show",value:function(){var e=!this.isShown;return this._isShown=!0,e&&this.trigger("show:tooltip"),this}},{key:"hide",value:function(){var e=this.isShown;return this._isShown=!1,e&&this.trigger("hide:tooltip"),this}},{key:"update",value:function(){return this}},{key:"onContentChange",value:function(){}}])&&qn(t.prototype,n),e}();B(Hn.prototype);const Kn=bootstrap;function Un(e){return(Un="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)}function $n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zn(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Wn(e,t,n){return(Wn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ei(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function Jn(e,t){return(Jn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qn(e,t){return!t||"object"!==Un(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ei(e){return(ei=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const ti=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jn(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ei(i);if(o){var n=ei(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Qn(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.tooltipNode,i=void 0===n?void 0:n,o=t.bootstrapOptions,s=void 0===o?void 0:o,l=t.closeOnMouseMove,u=void 0===l||l,c=t.closeOnMouseEnter,f=void 0!==c&&c;return $n(this,a),(e=r.call(this)).bootstrapOptions=s||{},e._initBootstrapOptions(s),e.closeOnMouseMove=u,e.closeOnMouseEnter=f,e._tooltipNode=void 0,e.tooltipNode=i,e._bsTooltip=void 0,e}return t=a,(n=[{key:"tooltipNode",get:function(){return this._tooltipNode},set:function(e){if(void 0===e)return this._tooltipNode=e,void(this._bsTooltip=void 0);this._tooltipNode=$()(e),this._initTooltipNode()}},{key:"show",value:function(e){var t=e.posX,n=e.posY;if(void 0!==this._tooltipNode&&void 0!==this._bsTooltip)return this.tooltipNode.css({left:"".concat(t,"px"),top:"".concat(n,"px")}),this.isShown?this._bsTooltip.update():this._bsTooltip.show(),Wn(ei(a.prototype),"show",this).call(this)}},{key:"hide",value:function(){if(void 0!==this._tooltipNode&&void 0!==this._bsTooltip)return this.isShown&&(this.tooltipNode.attr("data-original-title",void 0),this._bsTooltip.hide()),Wn(ei(a.prototype),"hide",this).call(this)}},{key:"update",value:function(){if(void 0!==this._bsTooltip)return this._bsTooltip.update(),Wn(ei(a.prototype),"update",this).call(this)}},{key:"onContentChange",value:function(){this.tooltipNode.attr("data-bs-original-title",ni(this.content)?this.content:"-"),this._updateNonStringContent(),this.update()}},{key:"_initBootstrapOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.trigger,n=void 0===t?"manual":t;this.bootstrapOptions.trigger=n}},{key:"_initTooltipNode",value:function(){var e=this;void 0!==this._bsTooltip&&this._bsTooltip.dispose(),this._bsTooltip=new Kn.Tooltip(this._tooltipNode[0],this.bootstrapOptions),this.tooltipNode[0].addEventListener("inserted.bs.tooltip",(function(){var t=e._updateNonStringContent();t.length&&(e.closeOnMouseMove&&t.children(".tooltip-inner").mousemove((function(){return e.hide()})),e.closeOnMouseEnter&&t.children(".tooltip-inner").mouseenter((function(){return e.hide()})))}))}},{key:"_updateNonStringContent",value:function(){var e=$()(document.getElementById(this.tooltipNode.attr("aria-describedby")));if(e.length)return void 0===this.content||ni(this.content)||e.children(".tooltip-inner").empty().append(this.content),e}}])&&Zn(t.prototype,n),a}(Hn);var ni=function(e){return"[object String]"==Object.prototype.toString.call(e)};function ii(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oi(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}const ri=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.id;ii(this,e),this._id=n}var t,n;return t=e,(n=[{key:"id",get:function(){return this._id},set:function(e){this._id=e,this.setId(e)}},{key:"setId",value:function(){}}])&&oi(t.prototype,n),e}();function ai(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var i,o,r=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(i=n.next()).done)&&(r.push(i.value),!t||r.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return si(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?si(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function si(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function li(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ui(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var ci=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.fireReplace,i=void 0===n||n,o=t.fireAddRemoveOnReplace,r=void 0!==o&&o,a=t.appendOnReplace,s=void 0===a||a,l=t.sortFunction,u=t.emptyObjectMaker;li(this,e),this.options={fireReplace:i,fireAddRemoveOnReplace:r,appendOnReplace:s,sortFunction:l,emptyObjectMaker:u},this._itemIds=[],this._items={}}var t,n;return t=e,(n=[{key:"count",get:function(){return this._itemIds.length}},{key:Symbol.iterator,value:function(){var e=this,t=0;return{next:function(){return t<e._itemIds.length?{value:e._items[e._itemIds[t++]]}:{done:!0}}}}},{key:"items",get:function(){var e=this;return this._itemIds.map((function(t){return e._items[t]}))}},{key:"itemIds",get:function(){return this._itemIds}},{key:"sortFunction",get:function(){return this.options.sortFunction}},{key:"sortFunction",set:function(e){this.options.sortFunction=e,this._sort()}},{key:"getItemById",value:function(e){return e in this._items?this._items[e]:void 0===this.options.emptyObjectMaker?new ri:this.options.emptyObjectMaker.call(this)}},{key:"contains",value:function(e){var t=this.containsId(e.id);return t&&(t=e===this.getItemById(e.id)),t}},{key:"containsId",value:function(e){return e in this._items}},{key:"append",value:function(){for(var e=this,t=[],n=[],i=[],o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return r.forEach((function(o){var r=o.id;if(e.containsId(r)){var a=e.getItemById(r);e.options.appendOnReplace&&(e._itemIds.splice(e._itemIds.indexOf(r),1),e._itemIds.push(r)),a!==o&&(e._items[r]=o,e.options.fireReplace&&i.push([o,a]),e.options.fireAddRemoveOnReplace&&(n.push(a),t.push(o)))}else e._itemIds.push(r),e._items[r]=o,t.push(o)})),this._sort(),t.forEach((function(t){return e.trigger("add:item",t)})),n.forEach((function(t){return e.trigger("remove:item",t)})),i.forEach((function(t){var n=ai(t,2),i=n[0],o=n[1];return e.trigger("replace:item",i,o)})),this}},{key:"remove",value:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return n.forEach((function(t){var n=e._itemIds.indexOf(t.id);if(n>-1){var i=e._items[t.id];delete e._items[t.id],e._itemIds.splice(n,1),e.trigger("remove:item",i)}})),this}},{key:"removeById",value:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return n.forEach((function(t){var n=e._itemIds.indexOf(t);if(n>-1){var i=e._items[t];delete e._items[t],e._itemIds.splice(n,1),e.trigger("remove:item",i)}})),this}},{key:"_sort",value:function(){var e=this;void 0!==this.options.sortFunction&&this._itemIds.sort((function(t,n){return e.options.sortFunction(e._items[t],e._items[n])}))}}])&&ui(t.prototype,n),e}();B(ci.prototype);const fi=ci;function di(e){return function(e){if(Array.isArray(e))return vi(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||pi(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hi(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=pi(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function pi(e,t){if(e){if("string"==typeof e)return vi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vi(e,t):void 0}}function vi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function yi(e){return(yi="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)}function mi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bi(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function gi(e,t,n){return(gi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Si(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function wi(e,t){return(wi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _i(e,t){return!t||"object"!==yi(t)&&"function"!=typeof t?Oi(e):t}function Oi(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Si(e){return(Si=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const Ti=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&wi(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Si(i);if(o){var n=Si(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return _i(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.resources,i=t.containersNode,o=t.timeline,s=void 0===o?void 0:o,l=t.makeContainerNode,u=void 0===l?void 0:l,c=t.firstTimeOnInit,f=void 0===c||c,d=t.lastTimeOnInit,h=void 0!==d&&d;mi(this,a),(e=r.call(this,{fireReplace:!1,fireAddRemoveOnReplace:!0}))._resources=n,e._containersNode="object"==yi(i)&&i.jquery?i[0]:i,e._timeline=void 0===s?new z:s,e._makeContainerNode=u;var p=new Map;return e.on("add:item",(function(t){t.modelviewer=Oi(e),t.containerNode=e._getContainerNode(t),isNaN(e.timeline.getSelectedTime().valueOf())&&(f||h)&&p.set(t,t.on("change:selectedVariables",(function(){if(isNaN(e._timeline.getSelectedTime().valueOf())&&(f?e._timeline.first():h&&e._timeline.last(),!isNaN(e._timeline.getSelectedTime().valueOf()))){var t,n=hi(p.keys());try{for(n.s();!(t=n.n()).done;){var i=t.value;i.un("change:selectedVariables",p.get(i)),p.delete(i)}}catch(e){n.e(e)}finally{n.f()}}})))})),e.on("remove:item",(function(t){void 0!==t.containerNode&&null!=t.containerNode.parentNode&&t.containerNode.parentNode.removeChild(t.containerNode),t.modelviewer=void 0,t.containerNode=void 0,p.has(t)&&(t.un("change:selectedVariables",p.get(t)),p.delete(t)),e.timeline.deleteSetID(t.id)})),e}return t=a,(n=[{key:"resources",get:function(){return this._resources}},{key:"containersNode",get:function(){return this._containersNode}},{key:"timeline",get:function(){return this._timeline}},{key:"append",value:function(){for(var e,t=di(this.itemIds),n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return i.filter((function(e){return void 0!==e.id})).forEach((function(e){return t.push(e.id)})),i.filter((function(e){return void 0===e.id})).forEach((function(e){for(var n=1,i="container".concat(n);t.indexOf(i)>-1;)n++,i="container".concat(n);e.id=i,t.push(i)})),(e=gi(Si(a.prototype),"append",this)).call.apply(e,[this].concat(i)),this}},{key:"_getContainerNode",value:function(e){if(void 0!==this._makeContainerNode){var t=this._makeContainerNode.call(this,this.containersNode,e);return"object"==yi(t)&&t.jquery?t[0]:t}var n=void 0!==e.containerNode?e.containerNode:document.createElement("div");return void 0!==this.containersNode&&this.containersNode.appendChild(n),n}}])&&bi(t.prototype,n),a}(fi);function ki(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pi(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}const xi=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.name,i=void 0===n?void 0:n,o=t.names,r=void 0===o?{}:o,a=t.langSortation,s=void 0===a?[]:a;ki(this,e),this._name=i,this._names=r,this._langSortation=s}var t,n;return t=e,(n=[{key:"name",get:function(){return this.getDefaultName()},set:function(e){this._name=e}},{key:"getNameByLangNoFallback",value:function(e){return e in this._names?this._names[e]:""}},{key:"setNameByLang",value:function(e,t){this._names[e]=t,void 0===t&&delete this._names[e]}},{key:"langSortation",get:function(){return this._langSortation},set:function(e){this._langSortation=e}},{key:"getDefaultName",value:function(){return void 0!==this._name?this._name:this.getNameByLang()}},{key:"getNameByLang",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.langSortation,i=void 0===n?void 0:n,o=void 0===i?this._langSortation:i,r=Object.keys(this._names);return r.length<1?void 0===this._name?"":this._name:this._names[r.sort((function(t,n){if(t==e)return-1;if(n==e)return 1;var i=o.indexOf(t),r=o.indexOf(n);return r<0?0:i<0?1:i<r?-1:i==r?0:1}))[0]]}}])&&Pi(t.prototype,n),e}();function Ri(e){return(Ri="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)}function ji(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ei(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Ci(e,t){return(Ci=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ni(e,t){return!t||"object"!==Ri(t)&&"function"!=typeof t?Bi(e):t}function Bi(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ii(e){return(Ii=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const Di=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ci(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ii(i);if(o){var n=Ii(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Ni(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.id,i=t.name,o=void 0===i?void 0:i,s=t.names,l=void 0===s?{}:s,u=t.langSortation,c=void 0===u?[]:u;return ji(this,a),e=r.call(this,{name:o,names:l,langSortation:c}),Object.defineProperty(Bi(e),"id",Object.getOwnPropertyDescriptor(ri.prototype,"id")),e._id=n,e}return t=a,(n=[{key:"setId",value:function(e){ri.prototype.setId.call(this,e)}},{key:"getDefaultName",value:function(){return void 0!==this._name?this._name:Object.keys(this._names).length>0?this.getNameByLang():void 0===this._id?"":this._id}}])&&Ei(t.prototype,n),a}(xi);function Ai(e){return(Ai="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)}function Li(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mi(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Vi(e,t){return(Vi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gi(e,t){return!t||"object"!==Ai(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Yi(e){return(Yi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const Fi=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Vi(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Yi(i);if(o){var n=Yi(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Gi(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.id,i=t.name,o=void 0===i?void 0:i,s=t.names,l=void 0===s?{}:s,u=t.langSortation,c=void 0===u?[]:u,f=t.variableCollection;return Li(this,a),(e=r.call(this,{id:n,name:o,names:l,langSortation:c}))._variableCollection=f,e}return t=a,(n=[{key:"variableCollection",get:function(){return this._variableCollection},set:function(e){this._variableCollection=e}}])&&Mi(t.prototype,n),a}(Di);function Xi(e){return(Xi="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)}function zi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qi(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Hi(e,t){return(Hi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ki(e,t){return!t||"object"!==Xi(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ui(e){return(Ui=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const $i=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Hi(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ui(i);if(o){var n=Ui(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Ki(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.id,i=t.name,o=void 0===i?void 0:i,s=t.names,l=void 0===s?{}:s,u=t.langSortation,c=void 0===u?[]:u,f=t.datetime,d=void 0===f?void 0:f;return zi(this,a),(e=r.call(this,{id:n,name:o,names:l,langSortation:c}))._datetime=void 0===e.id?void 0:new Date(e.id),void 0!==d&&(e.datetime=d),e}return t=a,(n=[{key:"setId",value:function(e){this._datetime=void 0===e?void 0:new Date(e)}},{key:"datetime",get:function(){return this._datetime},set:function(e){this._datetime=e,this._id=void 0!==e?e.valueOf():void 0}}])&&qi(t.prototype,n),a}(Fi);function Zi(e){return(Zi="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)}function Wi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ji(e,t){return(Ji=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qi(e,t){return!t||"object"!==Zi(t)&&"function"!=typeof t?eo(e):t}function eo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function to(e){return(to=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function no(e){return(no="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)}function io(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oo(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ro(e,t){return(ro=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ao(e,t){return!t||"object"!==no(t)&&"function"!=typeof t?so(e):t}function so(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lo(e){return(lo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const uo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ro(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=lo(i);if(o){var n=lo(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ao(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.id,i=t.fireReplace,o=void 0===i||i,s=t.fireAddRemoveOnReplace,l=void 0!==s&&s,u=t.appendOnReplace,c=void 0===u||u,f=t.sortFunction,d=t.names,h=t.langSortation;return io(this,a),e=r.call(this,{emptyObjectMaker:function(){return new Fi},fireReplace:o,fireAddRemoveOnReplace:l,appendOnReplace:c,sortFunction:f,names:d,langSortation:h}),Object.defineProperty(so(e),"id",Object.getOwnPropertyDescriptor(ri.prototype,"id")),e._id=n,Object.defineProperty(so(e),"getDefaultName",Object.getOwnPropertyDescriptor(Di.prototype,"getDefaultName")),e._node=void 0,e.on("add:item",(function(t){void 0!==t.variableCollection&&t.variableCollection.remove(t),t.variableCollection=so(e),e.trigger("add:variable",t)})),e.on("remove:item",(function(t){return e.trigger("remove:variable",t)})),e}return t=a,(n=[{key:"setId",value:function(e){ri.prototype.setId.call(this,e)}},{key:"variables",get:function(){return this.items}},{key:"getVariableById",value:function(e){return this.getItemById(e)}},{key:"node",get:function(){return this._node},set:function(e){this._node=e}}])&&oo(t.prototype,n),a}(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ji(e,t)}(o,e);var t,n,i=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,i=to(t);if(n){var o=to(this).constructor;e=Reflect.construct(i,arguments,o)}else e=i.apply(this,arguments);return Qi(this,e)});function o(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.fireReplace,r=void 0===n||n,a=t.fireAddRemoveOnReplace,s=void 0!==a&&a,l=t.appendOnReplace,u=void 0===l||l,c=t.sortFunction,f=t.emptyObjectMaker,d=t.name,h=void 0===d?void 0:d,p=t.names,v=void 0===p?{}:p,y=t.langSortation,m=void 0===y?[]:y;return Wi(this,o),e=i.call(this,{fireReplace:r,fireAddRemoveOnReplace:s,appendOnReplace:u,sortFunction:c,emptyObjectMaker:f}),Object.defineProperty(eo(e),"name",Object.getOwnPropertyDescriptor(xi.prototype,"name")),Object.getPrototypeOf(eo(e)).getDefaultName=xi.prototype.getDefaultName,Object.getPrototypeOf(eo(e)).getNameByLang=xi.prototype.getNameByLang,Object.getPrototypeOf(eo(e)).setNameByLang=xi.prototype.setNameByLang,Object.getPrototypeOf(eo(e)).getNameByLangNoFallback=xi.prototype.getNameByLangNoFallback,e._name=h,e._names=v,e._langSortation=m,e}return o}(fi));function co(e,t){if(e){if("string"==typeof e)return fo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fo(e,t):void 0}}function fo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function ho(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}const po=function(){function e(t){var n=t.node;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._node=n,this._children=new Map,this._parent=void 0}var t,n;return t=e,(n=[{key:"node",get:function(){return this._node}},{key:"variableCollection",get:function(){return this._node.variableCollection}},{key:"children",get:function(){return function(e){if(Array.isArray(e))return fo(e)}(e=this._children.values())||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||co(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();var e}},{key:"parent",get:function(){return this._parent},set:function(e){this._parent=e}},{key:"getChildByVariable",value:function(e){return this._children.get(e)}},{key:"buildChildrenTreeForResource",value:function(t){var n=t.resource,i=t.aimedNode;if(this.node===i)return this;var o=n.getVariableByVariableCollection(this.variableCollection);if(void 0!==o.id){var r=this._children.get(o);return void 0!==r?r.buildChildrenTreeForResource({resource:n,aimedNode:i}):(this.node.children.forEach((function(t){void 0!==n.getVariableByVariableCollection(t.variableCollection).id&&(r=new e({node:t}))})),void 0!==r?(this._children.set(o,r),r.parent=this,r.buildChildrenTreeForResource({resource:n,aimedNode:i})):void 0)}}},{key:"removeChild",value:function(e){var t,n,i,o=e.child,r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=co(e))){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}(this._children.entries());try{for(r.s();!(t=r.n()).done;){var a=(n=t.value,i=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var i,o,r=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(i=n.next()).done)&&(r.push(i.value),!t||r.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return r}}(n,i)||co(n,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=a[0];a[1]===o&&this._children.delete(s)}}catch(e){r.e(e)}finally{r.f()}this._children.size<1&&void 0!==this.parent&&this.parent.removeChild({child:this})}},{key:"findNodeByVariables",value:function(){for(var e=this,t=void 0,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];if(i.forEach((function(n){n.variableCollection===e.variableCollection&&(t=n)})),void 0!==t){var r=this._children.get(t);if(void 0!==r){var a=r.findNodeByVariables.apply(r,i);return void 0===a?this:a}return this}}}])&&ho(t.prototype,n),e}();function vo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var i,o,r=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(i=n.next()).done)&&(r.push(i.value),!t||r.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return r}}(e,t)||go(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yo(e){return(yo="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)}function mo(e){return function(e){if(Array.isArray(e))return wo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||go(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bo(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=go(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function go(e,t){if(e){if("string"==typeof e)return wo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wo(e,t):void 0}}function wo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function _o(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Oo=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._variableCollection=t,t.node=this,this._parents=[],this._children=[],this._resourcesTopNode=void 0,this._resources=new Map}var t,n;return t=e,(n=[{key:"variableCollection",get:function(){return this._variableCollection}},{key:"parents",get:function(){return this._parents}},{key:"children",get:function(){return this._children}},{key:"appendChild",value:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return n.forEach((function(t){e._children.push(t),t._addParent(e),e.trigger("append:child",t)})),this}},{key:"_addParent",value:function(e){this._parents.push(e)}},{key:"resources",get:function(){var e,t=[],n=bo(this._resources.values());try{for(n.s();!(e=n.n()).done;)mo(e.value.values()).forEach((function(e){return t.push.apply(t,mo(e))}))}catch(e){n.e(e)}finally{n.f()}return t}},{key:"append",value:function(){var e=this;void 0===this._resourcesTopNode&&this._makeResourcesTopNode();for(var t=0,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return i.forEach((function(n){if(!(n.variables.filter((function(t){return t.variableCollection===e.variableCollection})).length<1)){var i=e._resourcesTopNode.buildChildrenTreeForResource({resource:n,aimedNode:e});if(void 0!==i){var o=n.getVariableByVariableCollection(i.variableCollection);if(void 0!==o){var r=e._resources.get(i);void 0===r&&(r=new Map,e._resources.set(i,r));var a=r.get(o);void 0===a&&(a=new Set,r.set(o,a)),a.has(n)||(a.add(n),t++)}}}})),t}},{key:"remove",value:function(){for(var e=this,t=0,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return i.forEach((function(n){var i,o=(i=e._resourcesTopNode).findNodeByVariables.apply(i,mo(n.variables));if(void 0!==o){var r=n.getVariableByVariableCollection(o.variableCollection),a=e._resources.get(o);if(void 0!==a){var s=a.get(r);if(void 0!==s&&(s.delete(n),t++,s.size<1&&(a.delete(r),a.size<1))){e._resources.delete(o);var l=o.parent;void 0!==l&&l.removeChild({child:o})}}}})),t}},{key:"getResourcesByVariables",value:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];if(void 0===this._resourcesTopNode)return[];var o=!1;if(n.length&&"boolean"==typeof n[0]&&(o=n.shift()),o&&0==n.length)return[];if(o){var r,a=new Set(n),s=(r=this._resourcesTopNode).findNodeByVariables.apply(r,n),l=this._resources.get(s);if(void 0!==l){var u,c=bo(l);try{var f=function(){var e=vo(u.value,2),t=e[0],i=e[1];if(!a.has(t))return"continue";if(void 0===i||i.size<1)return{v:[]};var o=mo(i)[0],r=!0;return n.forEach((function(e){o.getVariableByVariableCollection(e.variableCollection)!==e&&(r=!1)})),{v:r?mo(i):[]}};for(c.s();!(u=c.n()).done;){var d=f();if("continue"!==d&&"object"===yo(d))return d.v}}catch(e){c.e(e)}finally{c.f()}}return[]}var h=function e(t){var i=new Set;if(t.children.length<1)return i.add(t),i;var o=void 0;if(n.forEach((function(e){e.variableCollection===t.variableCollection&&(o=e)})),void 0===o)t.children.forEach((function(t){i=new Set([].concat(mo(i),mo(e(t))))}));else{var r=t.getChildByVariable(o);void 0!==r&&(i=new Set([].concat(mo(i),mo(e(r)))))}return i},p=h(this._resourcesTopNode),v=[];return mo(p).forEach((function(t){var i=e._resources.get(t);if(void 0!==i){var o,r=bo(i);try{var a=function(){var e=vo(o.value,2),i=e[0],r=e[1];if(i.variableCollection!==t.variableCollection)return"continue";if(void 0===r||r.size<1)return{v:void 0};var a=mo(r)[0],s=!0;n.forEach((function(e){a.getVariableByVariableCollection(e.variableCollection)!==e&&(s=!1)})),s&&v.push.apply(v,mo(r))};for(r.s();!(o=r.n()).done;){var s=a();if("continue"!==s&&"object"===yo(s))return s.v}}catch(e){r.e(e)}finally{r.f()}}})),v}},{key:"hasResourcesByVariables",value:function(){return this.getResourcesByVariables.apply(this,arguments).length>0}},{key:"_makeResourcesTopNode",value:function(){var e=new Set;this._resourcesTopNode=new po({node:function t(n){var i=n.parents;if(i.length<1)return n;var o=void 0;return i.forEach((function(n){if(!e.has(n)){e.add(n);var i=t(n);void 0!==i&&(o=i)}})),o}(this)})}}])&&_o(t.prototype,n),e}();B(Oo.prototype);const So=Oo;function To(e){return function(e){if(Array.isArray(e))return ko(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return ko(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ko(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ko(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Po(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xo(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}const Ro=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.variables,o=void 0===i?[]:i,r=n.datetime,a=void 0===r?void 0:r,s=n.run,l=void 0===s?void 0:s,u=n.offset,c=void 0===u?void 0:u;Po(this,e),this._variables=new Map,o.forEach((function(e){return t._variables.set(e.variableCollection,e)})),this._datetime=a,this._run=l,this._offset=c,this._updateDatetime()}var t,n;return t=e,(n=[{key:"variables",get:function(){return To(this._variables.values())}},{key:"datetime",get:function(){return this._datetime},set:function(e){this._datetime=e}},{key:"run",get:function(){return this._run},set:function(e){this._run=e,this._updateDatetime()}},{key:"offset",get:function(){return this._offset},set:function(e){this._offset=e,this._updateDatetime()}},{key:"getVariableByVariableCollection",value:function(e){var t=this._variables.get(e);return void 0===t?new Fi:t}},{key:"isDefinedBy",value:function(){for(var e=!1,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];n.length&&"boolean"==typeof n[0]&&(e=n.shift());var o=new Set(To(this._variables.values()));if(!e)return 0==n.filter((function(e){return!o.has(e)})).length;if(0!=n.filter((function(e){return!o.has(e)})).length)return!1;var r=new Set(n);return 0==To(o).filter((function(e){return!r.has(e)})).length}},{key:"isDefinedByVariableOf",value:function(e){return void 0!==this._variables.get(e)}},{key:"_updateDatetime",value:function(){void 0!==this._run&&void 0!==this._offset&&(this.datetime=new Date(this._run.valueOf()+1e3*this._offset))}}])&&xo(t.prototype,n),e}();function jo(e){return(jo="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)}function Eo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Co(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function No(e,t){return(No=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Bo(e,t){return!t||"object"!==jo(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Io(e){return(Io=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const Do=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&No(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Io(i);if(o){var n=Io(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Bo(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.variables,i=void 0===n?[]:n,o=t.datetime,s=void 0===o?void 0:o,l=t.run,u=void 0===l?void 0:l,c=t.offset,f=void 0===c?void 0:c,d=t.url,h=void 0===d?void 0:d;return Eo(this,a),(e=r.call(this,{variables:i,datetime:s,run:u,offset:f}))._url=h,e}return t=a,(n=[{key:"url",get:function(){return this._url}}])&&Co(t.prototype,n),a}(Ro);function Ao(e){return(Ao="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)}function Lo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mo(e,t){return(Mo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Vo(e,t){return!t||"object"!==Ao(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Go(e){return(Go=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const Yo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Mo(e,t)}(o,e);var t,n,i=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,i=Go(t);if(n){var o=Go(this).constructor;e=Reflect.construct(i,arguments,o)}else e=i.apply(this,arguments);return Vo(this,e)});function o(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.id,r=void 0===n?void 0:n,a=t.pres,s=void 0===a?void 0:a,l=t.tmpc,u=void 0===l?void 0:l,c=t.dwpc,f=void 0===c?void 0:c,d=t.ptrace,h=void 0===d?void 0:d,p=t.ttrace,v=void 0===p?void 0:p,y=t.blayer,m=void 0===y?void 0:y,b=t.tlayer,g=void 0===b?void 0:b,w=t.lclpres,_=void 0===w?void 0:w,O=t.lclhght,S=void 0===O?void 0:O,T=t.lfcpres,k=void 0===T?void 0:T,P=t.lfchght,x=void 0===P?void 0:P,R=t.elpres,j=void 0===R?void 0:R,E=t.elhght,C=void 0===E?void 0:E,N=t.mplpres,B=void 0===N?void 0:N,I=t.mplhght,D=void 0===I?void 0:I,A=t.bplus,L=void 0===A?void 0:A,M=t.bminus,V=void 0===M?void 0:M,G=t.bfzl,Y=void 0===G?void 0:G,F=t.b3km,X=void 0===F?void 0:F,z=t.b6km,q=void 0===z?void 0:z,H=t.p0c,K=void 0===H?void 0:H,U=t.pm10c,$=void 0===U?void 0:U,Z=t.pm20c,W=void 0===Z?void 0:Z,J=t.pm30c,Q=void 0===J?void 0:J,ee=t.hght0c,te=void 0===ee?void 0:ee,ne=t.hghtm10c,ie=void 0===ne?void 0:ne,oe=t.hghtm20c,re=void 0===oe?void 0:oe,ae=t.hghtm30c,se=void 0===ae?void 0:ae,le=t.wm10c,ue=void 0===le?void 0:le,ce=t.wm20c,fe=void 0===ce?void 0:ce,de=t.wm30c,he=void 0===de?void 0:de,pe=t.li5,ve=void 0===pe?void 0:pe,ye=t.li3,me=void 0===ye?void 0:ye,be=t.brnshear,ge=void 0===be?void 0:be,we=t.brnu,_e=void 0===we?void 0:we,Oe=t.brnv,Se=void 0===Oe?void 0:Oe,Te=t.limax,ke=void 0===Te?void 0:Te,Pe=t.limaxpres,xe=void 0===Pe?void 0:Pe,Re=t.cap,je=void 0===Re?void 0:Re,Ee=t.cappres,Ce=void 0===Ee?void 0:Ee,Ne=t.bmin,Be=void 0===Ne?void 0:Ne,Ie=t.bminpres,De=void 0===Ie?void 0:Ie;return Lo(this,o),(e=i.call(this,{id:r})).pres=s,e.tmpc=u,e.dwpc=f,e.ptrace=h,e.ttrace=v,e.blayer=m,e.tlayer=g,e.lclpres=_,e.lclhght=S,e.lfcpres=k,e.lfchght=x,e.elpres=j,e.elhght=C,e.mplpres=B,e.mplhght=D,e.bplus=L,e.bminus=V,e.bfzl=Y,e.b3km=X,e.b6km=q,e.p0c=K,e.pm10c=$,e.pm20c=W,e.pm30c=Q,e.hght0c=te,e.hghtm10c=ie,e.hghtm20c=re,e.hghtm30c=se,e.wm10c=ue,e.wm20c=fe,e.wm30c=he,e.li5=ve,e.li3=me,e.brnshear=ge,e.brnu=_e,e.brnv=Se,e.limax=ke,e.limaxpres=xe,e.cap=je,e.cappres=Ce,e.bmin=Be,e.bminpres=De,e}return o}(ri);function Fo(e){return function(e){if(Array.isArray(e))return Xo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Xo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xo(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function zo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qo(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}const Ho=function(){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.calcMissing,o=void 0!==i&&i,r=n.parcels,a=void 0===r?[]:r;zo(this,e),this.options={calcMissing:o},this.levels={},this._parcelCollection=new fi({fireAddRemoveOnReplace:!0,fireReplace:!1,emptyObjectMaker:function(){return new Yo}}),(t=this._parcelCollection).append.apply(t,Fo(a))}var n,i;return n=e,(i=[{key:"parcelCollection",get:function(){return this._parcelCollection}},{key:"addLevels",value:function(e,t){return e.forEach((function(e){this.addLevel(e,t)}),this),this}},{key:"addLevel",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.calcMissing;return n=n||this.options.calcMissing,"pres"in e&&void 0!==e.pres&&(n&&(e=this.calculateMissingData(e)),this.levels[e.pres]=e),this}},{key:"calculateMissingData",value:function(e){var n={pres:e.pres,hght:e.hght,u:e.u,v:e.v,wdir:e.wdir,wspd:e.wspd,tmpk:e.tmpk,dwpk:e.dwpk,relh:e.relh,mixr:e.mixr,theta:e.theta,thetae:e.thetae,wetbulb:e.wetbulb,vtmp:e.vtmp};return void 0===n.hght&&(n.hght=t(n.pres)),void 0===n.u&&void 0===n.v&&void 0!==n.wdir&&void 0!==n.wspd?(n.u=n.wspd*Math.sin(n.wdir/180*Math.PI),n.v=n.wspd*Math.cos(n.wdir/180*Math.PI)):void 0!==n.u&&void 0!==n.v&&void 0===n.wdir&&void 0===n.wspd&&(n.wspd=Math.sqrt(Math.pow(n.u,2)+Math.pow(n.v,2)),n.wdir=Math.arctan(n.u/n.v)/Math.PI*180),void 0!==n.tmpk&&void 0!==n.dwpk?(void 0===n.theta&&(n.theta=r(n.tmpk,n.pres)),void 0===n.thetae&&(n.thetae=c(n.tmpk,n.dwpk,n.pres))):void 0!==n.mixr&&void 0===n.dwpk&&(n.dwpk=l(n.mixr,n.pres)),n}},{key:"removeLevel",value:function(e){return e in this.levels&&delete this.levels[e],this}},{key:"getData",value:function(e){return e in this.levels?this.levels[e]:{pres:void 0,hght:void 0,tmpk:void 0,dwpk:void 0,wdir:void 0,wspd:void 0,u:void 0,v:void 0,relh:void 0,mixr:void 0,theta:void 0,thetae:void 0,wetbulb:void 0,vtmp:void 0}}},{key:"getLevels",value:function(){return Object.keys(this.levels).map((function(e){return+e})).sort((function(e,t){return e-t}))}},{key:"getNearestLevel",value:function(e){if(!(Object.keys(this.levels).length<1))return Object.keys(this.levels).sort((function(t,n){return Math.abs(t-e)-Math.abs(n-e)})).shift()}}])&&qo(n.prototype,i),e}();function Ko(e){return(Ko="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)}function Uo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $o(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Zo(e,t){return(Zo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wo(e,t){return!t||"object"!==Ko(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Jo(e){return(Jo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const Qo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Zo(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Jo(i);if(o){var n=Jo(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Wo(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.variables,i=void 0===n?[]:n,o=t.datetime,s=void 0===o?void 0:o,l=t.run,u=void 0===l?void 0:l,c=t.offset,f=void 0===c?void 0:c,d=t.sounding,h=void 0===d?void 0:d;return Uo(this,a),(e=r.call(this,{variables:i,datetime:s,run:u,offset:f}))._sounding=h,e}return t=a,(n=[{key:"sounding",get:function(){return void 0===this._sounding?new Ho:this._sounding},set:function(e){this._sounding=e}}])&&$o(t.prototype,n),a}(Ro);function er(e){return function(e){if(Array.isArray(e))return ir(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||nr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tr(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=nr(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function nr(e,t){if(e){if("string"==typeof e)return ir(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ir(e,t):void 0}}function ir(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function or(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rr(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var ar=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.topNode,i=t.timesVariableCollections,o=void 0===i?[]:i;or(this,e),this._topNode=n,this._availableVariablesMap=new Map,this._timesVariableCollections=o}var t,n;return t=e,(n=[{key:"topNode",get:function(){return this._topNode}},{key:"variableCollections",get:function(){var e;e=function(n){n.children.forEach((function(n){t.push(n.variableCollection),e(n)}))};var t=[this.topNode.variableCollection];return e(this.topNode),t}},{key:"availableVariablesMap",get:function(){return this._availableVariablesMap}},{key:"append",value:function(){for(var e,t=this,n=[],i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return o.forEach((function(e){var i=t._getTopNodeOfResourceDefinition(e,t.topNode);if(void 0!==i){var o=t._getTopMostChildWithAllVariables(new Set(e.variables),i,!0);void 0!==o&&o.append(e)>0&&(n.push(e),t._addAvailableVariablesMapByResource(e))}})),n.length>0&&(lr.timeoutId&&clearTimeout(lr.timeoutId),(e=lr.addedResources).push.apply(e,n),lr.timeoutId=setTimeout((function(){t.trigger("change:resources",{addedResources:lr.addedResources}),lr.addedResources=[]}),100)),this}},{key:"_addAvailableVariablesMapByResource",value:function(e){var t=this;e.variables.forEach((function(e){void 0!==e.variableCollection.node&&(t._availableVariablesMap.has(e.variableCollection.node)||t._availableVariablesMap.set(e.variableCollection.node,new Set),t._availableVariablesMap.get(e.variableCollection.node).add(e))}))}},{key:"remove",value:function(){for(var e=this,t=[],n=new Map,i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return o.forEach((function(i){var o=e._getTopNodeOfResourceDefinition(i,e.topNode);if(void 0!==o){var r=e._getTopMostChildWithAllVariables(new Set(i.variables),o,!0);void 0!==r&&r.remove(i)>0&&(t.push(i),n.has(r)||n.set(r,new Set),n.get(r).add(i))}})),n.size>0&&this._removeAvailableVariablesMapByResources(n),t.length>0&&this.trigger("change:resources",{removedResources:t}),this}},{key:"_removeAvailableVariablesMapByResources",value:function(e){var t,n=new Set,i=tr(e.entries());try{var o=function(){var e,i,o,r=(i=t.value,o=2,function(e){if(Array.isArray(e))return e}(i)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var i,o,r=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(i=n.next()).done)&&(r.push(i.value),!t||r.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return r}}(i,o)||nr(i,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=r[0],s=r[1],l=new Set,u=tr(s);try{for(u.s();!(e=u.n()).done;)e.value.variables.forEach((function(e){return l.add(e)}))}catch(e){u.e(e)}finally{u.f()}var c,f=tr(l);try{for(f.s();!(c=f.n()).done;){var d=c.value;a.hasResourcesByVariables(d)||n.add(d)}}catch(e){f.e(e)}finally{f.f()}};for(i.s();!(t=i.n()).done;)o()}catch(e){i.e(e)}finally{i.f()}var r,a=tr(n);try{for(a.s();!(r=a.n()).done;){var s=r.value,l=this.getNodeByVariableCollection(s.variableCollection);this._hasResourcesOfNodeChildren(l,[s])||this._availableVariablesMap.has(l)&&this._availableVariablesMap.get(l).delete(s)}}catch(e){a.e(e)}finally{a.f()}}},{key:"getTopMostNodeWithAllVariables",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=this._getTopMostChildWithAllVariables(new Set(t),this.topNode,!0);return void 0===i?new So(new uo):i}},{key:"_getTopNodeOfResourceDefinition",value:function(e,t){var n=this;if(e.isDefinedByVariableOf(t.variableCollection))return t;var i=void 0;return t.children.forEach((function(t){void 0!==i&&(i=n._getTopNodeOfResourceDefinition(e,t))})),i}},{key:"_getTopMostChildWithAllVariables",value:function(e,t,n){var i=this,o=!1;if(t.variableCollection.variables.forEach((function(t){e.has(t)&&(o=!0,e.delete(t))})),0==e.size)return t;if(0!=t.children.length&&(o||n)){var r=void 0;return t.children.forEach((function(t){void 0===r&&(r=i._getTopMostChildWithAllVariables(e,t,n))})),r}}},{key:"getNodeByVariableCollection",value:function(e){return void 0===e.node?new So(new uo):e.node}},{key:"getNodeByVariableCollectionId",value:function(e){var t=this._getNodeByVariableCollection((function(t){return e==t.id}));return void 0===t?new So(new uo):t}},{key:"_getNodeByVariableCollection",value:function(e){return e(this.topNode.variableCollection)?this.topNode:this._findChildNodeByVariableCollection(e,this.topNode)}},{key:"_findChildNodeByVariableCollection",value:function(e,t){var n,i=this;return t.children.forEach((function(t){void 0===n&&e(t.variableCollection)?n=t:void 0===n&&t.children.length>0&&(n=i._findChildNodeByVariableCollection(e,t))})),n}},{key:"appendImage",value:function(e){var t=e.variables,n=e.datetime,i=e.run,o=e.offset,r=e.url;return this.append(new Do({variables:t,datetime:n,run:i,offset:o,url:r})),this}},{key:"getAvailableVariables",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.variables,i=void 0===n?[]:n,o=new Set,r=function e(t,n){if(n.resources.length>0){var r,a=tr(n.resources);try{for(a.s();!(r=a.n()).done;){var s=r.value;if(s.isDefinedBy.apply(s,[!1,t].concat(er(i))))return o.add(t),!0}}catch(e){a.e(e)}finally{a.f()}return!1}var l,u=tr(n.children);try{for(u.s();!(l=u.n()).done;)if(e(t,l.value))return!0}catch(e){u.e(e)}finally{u.f()}return!1};return Array.from(e).forEach((function(t){r(t,e.node)})),o}},{key:"_hasResourcesOfNodeChildren",value:function(e,t){var n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set,o=tr(e.children);try{for(o.s();!(n=o.n()).done;){var r=n.value;if(!i.has(r)){if(i.add(r),r.hasResourcesByVariables.apply(r,er(t)))return!0;if(this._hasResourcesOfNodeChildren(r,t,i))return!0}}}catch(e){o.e(e)}finally{o.f()}}},{key:"getTimesByVariables",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.variables,n=void 0===t?[]:t,i=e.exact,o=void 0!==i&&i,r=this._getTopMostChildWithAllVariables(new Set(n),this.topNode,!0);if(void 0===r)return[];var a=new Set,s=function e(t){t.getResourcesByVariables.apply(t,[o].concat(er(n))).forEach((function(e){void 0!==e.datetime&&a.add(e.datetime.valueOf())})),t.children.forEach((function(t){return e(t)}))};return s(r),er(a).sort().map((function(e){return new Date(e)}))}}])&&rr(t.prototype,n),e}();B(ar.prototype);const sr=ar;var lr={timeoutId:void 0,addedResources:[]};function ur(e){return(ur="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)}function cr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function fr(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function dr(e,t){return(dr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function hr(e,t){return!t||"object"!==ur(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function pr(e){return(pr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const vr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&dr(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=pr(i);if(o){var n=pr(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return hr(this,e)});function a(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);var e=new Set;["models","runs","regions","fields","levels","accumulations","thresholds"].forEach((function(t){return e.add(new uo({id:t}))}));var t,n={},i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return cr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cr(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}(e);try{for(i.s();!(t=i.n()).done;){var o=t.value;n[o.id]=new So(o)}}catch(e){i.e(e)}finally{i.f()}return n.models.appendChild(n.runs),n.runs.appendChild(n.regions),n.regions.appendChild(n.fields),n.fields.appendChild(n.levels,n.accumulations),n.accumulations.appendChild(n.thresholds),r.call(this,{topNode:n.models,timesVariableCollections:new Set([n.models.variableCollection,n.runs.variableCollection])})}return t=a,(n=[{key:"addVariable",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.id,i=t.name,o=void 0===i?void 0:i,r=t.names,a=void 0===r?{}:r,s=t.langSortation,l=void 0===s?[]:s,u=t.datetime,c=void 0===u?void 0:u,f=void 0===c?new Fi({id:n,name:o,names:a,langSortation:l}):new $i({id:n,name:o,names:a,langSortation:l,datetime:c});return e.append(f),this}},{key:"models",get:function(){return this.getNodeByVariableCollectionId("models").variableCollection}},{key:"runs",get:function(){return this.getNodeByVariableCollectionId("runs").variableCollection}},{key:"regions",get:function(){return this.getNodeByVariableCollectionId("regions").variableCollection}},{key:"fields",get:function(){return this.getNodeByVariableCollectionId("fields").variableCollection}},{key:"levels",get:function(){return this.getNodeByVariableCollectionId("levels").variableCollection}},{key:"accumulations",get:function(){return this.getNodeByVariableCollectionId("accumulations").variableCollection}},{key:"thresholds",get:function(){return this.getNodeByVariableCollectionId("thresholds").variableCollection}}])&&fr(t.prototype,n),a}(sr);function yr(e){return function(e){if(Array.isArray(e))return br(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||mr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mr(e,t){if(e){if("string"==typeof e)return br(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?br(e,t):void 0}}function br(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function gr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wr(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var _r=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.alwaysAvailableCollections,i=void 0===n?[]:n;gr(this,e),this._alwaysAvailableCollections=new Set(i),this._modelviewer=void 0,this._container=void 0,this._parentNode=void 0,this._resourceNode=void 0,this._resourceOutput={image:void 0,thermodynamicDiagram:void 0}}var t,n;return t=e,(n=[{key:"modelviewer",get:function(){return this._modelviewer},set:function(e){var t=this;this._modelviewer=e,void 0!==this._modelviewer&&this._modelviewer.resources.variableCollections.forEach((function(e){e.on("add:variable",(function(e){t.trigger("add:variable",{variable:e})}))}))}},{key:"container",get:function(){return this._container},set:function(e){var t=this;this._container=e,void 0!==this._container&&this._container.on("change:visibleResource",(function(){t._onChangeVisibleResource()}))}},{key:"parentNode",get:function(){return this._parentNode},set:function(e){this._parentNode=e,this.onInit()}},{key:"resourceNode",get:function(){return this._resourceNode},set:function(e){this._resourceNode=e,this._onChangeVisibleResource()}},{key:"render",value:function(){this.onInit(),this.onChangeVisibleResource()}},{key:"onInit",value:function(){var e=this;void 0!==this.parentNode&&($()(this.parentNode).empty(),this.trigger("init:display"),void 0!==this._modelviewer&&this._modelviewer.resources.variableCollections.forEach((function(t){e.trigger("add:variableCollection",{variableCollection:t});var n,i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=mr(e))){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}(t);try{for(i.s();!(n=i.n()).done;){var o=n.value;e.trigger("add:variable",{variable:o})}}catch(e){i.e(e)}finally{i.f()}})))}},{key:"getAvailableVariables",value:function(e){var t=e.variableCollection,n=this._getParentsVariables(t.node);return this._modelviewer.resources.getAvailableVariables(t,{variables:n})}},{key:"_getParentsVariables",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Set,i=new Set;return e.parents.forEach((function(e){if(!n.has(e)){n.add(e),Array.from(e.variableCollection).forEach((function(e){t._container.selectedVariables.has(e)&&i.add(e)}));var o=t._getParentsVariables(e,n);o.size>0&&(i=new Set([].concat(yr(i),yr(o))))}})),i}},{key:"_onChangeVisibleResource",value:function(){if(void 0!==this._resourceNode){if(void 0!==this._container){var e=this._container.visibleResource;if("url"in e)void 0!==this.thermodynamicDiagram&&(this.thermodynamicDiagram=void 0,$()(this._resourceNode).empty()),void 0===this._resourceOutput.image&&($()(this._resourceNode).empty(),this._resourceOutput.image=$()("<img>").css({"max-width":"100%"}),$()(this._resourceNode).append(this._resourceOutput.image)),this._resourceOutput.image.attr("src",e.url);else if("sounding"in e){void 0!==this._resourceOutput.image&&(this._resourceOutput.image=void 0,$()(this._resourceNode).empty());var t=!1;this._resourceOutput.thermodynamicDiagram.soundings.forEach((function(n){n.getSounding()===e.sounding?(t=!0,n.visible(!0)):n.visible(!1)})),t||this._resourceOutput.thermodynamicDiagram.addSounding(e.sounding)}else void 0!==this._resourceOutput.image&&(this._resourceOutput.image=void 0,$()(this._resourceNode).empty()),void 0!==this._resourceOutput.thermodynamicDiagram&&this._resourceOutput.thermodynamicDiagram.soundings.forEach((function(e){return e.visible(!1)}))}}else this.trigger("change:visibleResource")}}])&&wr(t.prototype,n),e}();B(_r.prototype);const Or=_r;function Sr(e){return(Sr="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)}function Tr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var i,o,r=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(i=n.next()).done)&&(r.push(i.value),!t||r.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return r}}(e,t)||xr(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kr(e){return function(e){if(Array.isArray(e))return Rr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||xr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pr(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=xr(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function xr(e,t){if(e){if("string"==typeof e)return Rr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Rr(e,t):void 0}}function Rr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function jr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Er(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Cr(e,t){return(Cr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Nr(e,t){return!t||"object"!==Sr(t)&&"function"!=typeof t?Br(e):t}function Br(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ir(e){return(Ir=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Dr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Cr(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ir(i);if(o){var n=Ir(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Nr(this,e)});function a(){var e,t,n,i,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=o.id,l=o.display,u=void 0===l?void 0:l,c=o.adaptSuitableResource,f=void 0===c?{}:c;return jr(this,a),(e=r.call(this,{id:s}))._display=void 0===u?new Or:u,e._display.modelviewer=e.modelviewer,e._display.container=Br(e),e._display.parentNode=e._containerNode,e._adaptSuitableResource={},e._initAdaptSuitableResource(f),e._modelviewer=void 0,e._visibleResource,e._displayVariables=new Set,e._selectedVariables=new Map,e._selectedNode=void 0,e._enabledResources=new Map,e._containerNode=void 0,e._debouncedChangeSelectedVariables=(n=new Set,i=new Set,function(o){var r,a=o.addedVariables,s=o.removedVariables,l=Pr(a);try{for(l.s();!(r=l.n()).done;){var u=r.value;i.has(u)&&i.delete(u)}}catch(e){l.e(e)}finally{l.f()}var c,f=Pr(s);try{for(f.s();!(c=f.n()).done;){var d=c.value;n.has(d)&&n.delete(d)}}catch(e){f.e(e)}finally{f.f()}n=new Set([].concat(kr(n),kr(a))),i=new Set([].concat(kr(i),kr(s))),clearTimeout(t),t=setTimeout((function(){e.trigger("change:selectedVariables",{addedVariables:n,removedVariables:i}),n.clear(),i.clear()}),300)}),e._listeners={mirror:[],timeline:{timeline:void 0,listenerKey:void 0},resources:{resources:void 0,listenerKey:void 0}},e}return t=a,(n=[{key:"display",get:function(){return this._display}},{key:"modelviewer",get:function(){return this._modelviewer},set:function(e){var t=this;if(this._modelviewer=e,void 0===this._modelviewer)return void 0!==this._listeners.timeline.listenerKey&&this._listeners.timeline.timeline.un("change:time",this._listeners.timeline.listenerKey),void(void 0!==this._listeners.resources.listenerKey&&this._listeners.resources.resources.un("change:resources",this._listeners.resources.listenerKey));this._display.modelviewer=e,this._listeners.timeline.timeline=this._modelviewer.timeline,this._listeners.timeline.listenerKey=this._modelviewer.timeline.on("change:time",(function(){return t._setVisibleResource()})),this._listeners.resources.resources=this._modelviewer.resources,this._listeners.resources.listenerKey=this._modelviewer.resources.on("change:resources",(function(){t._setTimes(),t._setEnabledResources(),t._updateSelectedVariables()})),this._setTimes()}},{key:"containerNode",get:function(){return this._containerNode},set:function(e){this._containerNode=e,void 0!==this._containerNode&&(this._display.parentNode=this._containerNode)}},{key:"visibleResource",get:function(){return void 0===this._visibleResource?new Ro:this._visibleResource}},{key:"displayVariables",get:function(){return this._displayVariables},set:function(e){var t,n=new Set,i=Pr(e=new Set(e));try{for(i.s();!(t=i.n()).done;){var o=t.value;this._displayVariables.has(o)||n.add(o)}}catch(e){i.e(e)}finally{i.f()}var r,a=new Set,s=Pr(this.displayVariables);try{for(s.s();!(r=s.n()).done;){var l=r.value;e.has(l)||a.add(l)}}catch(e){s.e(e)}finally{s.f()}(n.size>0||a.size>0)&&(this._displayVariables=e,this._updateSelectedVariables({addedVariables:n,removedVariables:a}),this.trigger("change:displayVariables",{addedVariables:n,removedVariables:a}))}},{key:"selectedVariables",get:function(){return new Set(kr(this._selectedVariables.values()))}},{key:"getSelectedVariable",value:function(e){var t=this._selectedVariables.get(e);return void 0===t?new Fi({id:void 0}):t}},{key:"enabledTimes",get:function(){return kr(this._enabledResources.keys()).filter((function(e){return!isNaN(e)})).map((function(e){return new Date(e)}))}},{key:"exchangeDisplayVariable",value:function(e){var t,n=new Set(this.displayVariables),i=Pr(e);try{for(i.s();!(t=i.n()).done;){var o,r=t.value,a=Pr(this.displayVariables);try{for(a.s();!(o=a.n()).done;){var s=o.value;s.variableCollection===r.variableCollection&&(n.delete(s),n.add(r))}}catch(e){a.e(e)}finally{a.f()}}}catch(e){i.e(e)}finally{i.f()}var l,u=Pr(e);try{for(u.s();!(l=u.n()).done;){var c=l.value;n.has(c)||n.add(c)}}catch(e){u.e(e)}finally{u.f()}return this.displayVariables=n,this}},{key:"mirrorsFrom",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(this._listeners.mirror=this._listeners.mirror.filter((function(e){return e.container!==t&&void 0!==t||(e.container.un("change:displayVariables",e.listenerKey),!1)})),void 0!==t&&!(void 0!==n&&n.length<1)){void 0===n&&(n=this.modelviewer.resources.variableCollections);var i=function(){var i,o=new Set,r=Pr(t.displayVariables);try{var a=function(){var e=i.value;n.forEach((function(t){e.variableCollection===t&&o.add(e)}))};for(r.s();!(i=r.n()).done;)a()}catch(e){r.e(e)}finally{r.f()}e.exchangeDisplayVariable(o)},o=t.on("change:displayVariables",i),r={container:t,listenerKey:o,variableCollections:n};this._listeners.mirror.forEach((function(t){var i=[];t.variableCollections.forEach((function(e){var t=!1;n.forEach((function(n){n===e&&(t=!0)})),t||i.push(e)})),i.length<t.variableCollections.length&&e.mirrorsFrom(t.container,i)})),this._listeners.mirror.push(r),i()}}},{key:"getMirrorsFrom",value:function(){var e=new Map;return this._listeners.mirror.forEach((function(t){e.set(t.container,t.variableCollections)})),e}},{key:"_setTimes",value:function(){var e=this,t=Tr(this._getSelectedVariablesWithResources([this.modelviewer.resources.topNode],new Set,void 0,(function(t){var n=!0;return e.modelviewer.resources._timesVariableCollections.forEach((function(e){var i,o=!1,r=Pr(t);try{for(r.s();!(i=r.n()).done;){var a=i.value;e.contains(a)&&(o=!0)}}catch(e){r.e(e)}finally{r.f()}o||(n=!1)})),n})),1)[0];void 0===t&&(t=new Set);var n=0==t.size?[]:this.modelviewer.resources.getTimesByVariables({variables:t});this.modelviewer.timeline.setTimesBySetID(this.id,n)}},{key:"_updateSelectedVariables",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.addedVariables,i=void 0===n?void 0:n,o=t.removedVariables,r=void 0===o?void 0:o;if(!this._adaptSuitableResource.enabled){var a=void 0,s=function t(n){if(n.hasResourcesByVariables.apply(n,[!0].concat(kr(e.displayVariables))))a=n;else{var i,o=Pr(n.children);try{for(o.s();!(i=o.n()).done;)t(i.value)}catch(e){o.e(e)}finally{o.f()}}};return s(this.modelviewer.resources.topNode),void this._setSelectedVariables(this.displayVariables,a)}var l=[],u=new Set,c=void 0;if(void 0===i||void 0===r)l.push(this.modelviewer.resources.topNode);else{var f=function t(n){for(var o=!1,a=0,s=[].concat(kr(i),kr(r));a<s.length;a++)if(s[a].variableCollection.node===n){l.push(n),o=!0;break}if(!o){var f=e.getSelectedVariable(n.variableCollection);if(void 0!==f.id){c=f,u.add(c);var d,h=Pr(n.children);try{for(h.s();!(d=h.n()).done;)t(d.value)}catch(e){h.e(e)}finally{h.f()}}}};f(this.modelviewer.resources.topNode),(l=l.filter((function(e,t,n){return t===n.indexOf(e)}))).length<1&&l.push(this.modelviewer.resources.topNode)}var d,h=this._getSelectedVariablesWithResources(l,u,c),p=Tr(h,2),v=p[0],y=p[1];void 0===v?(v=u,d=void 0!==c?c.variableCollection.node:new So({variableCollection:new uo})):d=y.variableCollection.node,this._setSelectedVariables(v,d)}},{key:"_getSelectedVariablesWithResources",value:function(e,t,n){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this._adaptSuitableResource.isResourceSelected;if(o.call(this,t,n))return[t,n];var r,a=[void 0,void 0],s=function(e){var n=new Set(t);n.add(e);var r=Tr(i._getSelectedVariablesWithResources(e.variableCollection.node.children,n,e,o),2),s=r[0],l=r[1];if(void 0!==s)return a[0]=s,void(a[1]=l);var u,c=!0,f=Pr(n);try{var d=function(){var e=u.value,t=!1;i.modelviewer.resources._timesVariableCollections.forEach((function(n){n.contains(e)&&(t=!0)})),t||(c=!1)};for(f.s();!(u=f.n()).done;)d()}catch(e){f.e(e)}finally{f.f()}c&&n.size==i.modelviewer.resources._timesVariableCollections.size&&(a[0]=n,a[1]=e)},l=[],u=Pr(e);try{for(u.s();!(r=u.n()).done;){var c=r.value;if(this.modelviewer.resources.availableVariablesMap.has(c)&&this.modelviewer.resources.availableVariablesMap.get(c).size){var f,d=Pr(c.variableCollection);try{for(d.s();!(f=d.n()).done;){var h=f.value;if(this.modelviewer.resources.availableVariablesMap.get(c).has(h)&&(this.displayVariables.has(h)?s(h):this._adaptSuitableResource.enabled&&l.push(h),void 0!==a[0]))break}}catch(e){d.e(e)}finally{d.f()}}if(void 0!==a[0])break}}catch(e){u.e(e)}finally{u.f()}if(void 0!==a[0])return a;var p,v=this._adaptSuitableResource.getPossibleVariables.call(this,l,t),y=Pr(v);try{for(y.s();!(p=y.n()).done;){var m=p.value;if(s(m),void 0!==a[0])break}}catch(e){y.e(e)}finally{y.f()}return a}},{key:"_setSelectedVariables",value:function(e,t){var n,i=new Set,o=Pr(e=new Set(e));try{for(o.s();!(n=o.n()).done;){var r=n.value;this.selectedVariables.has(r)||i.add(r)}}catch(e){o.e(e)}finally{o.f()}var a,s=new Set,l=Pr(this.selectedVariables);try{for(l.s();!(a=l.n()).done;){var u=a.value;e.has(u)||s.add(u)}}catch(e){l.e(e)}finally{l.f()}if(i.size>0||s.size>0||this._selectedNode!==t){this._selectedVariables.clear();var c,f=Pr(e);try{for(f.s();!(c=f.n()).done;){var d=c.value;this._selectedVariables.set(d.variableCollection,d)}}catch(e){f.e(e)}finally{f.f()}this._selectedNode=t,this._setTimes(),this._setEnabledResources(),this._debouncedChangeSelectedVariables({addedVariables:i,removedVariables:s})}}},{key:"_setEnabledResources",value:function(){var e,t=this;this._enabledResources.clear(),void 0!==this._selectedNode&&(0!=this.selectedVariables.size&&(e=this._selectedNode).getResourcesByVariables.apply(e,[!0].concat(kr(this.selectedVariables))).filter((function(e){return e.datetime&&!isNaN(e.datetime.valueOf())})).forEach((function(e){return t._enabledResources.set(e.datetime.valueOf(),e)})),this.modelviewer.timeline.setEnabledTimesBySetID(this.id,this.enabledTimes),this.trigger("change:enabledResources",this._enabledResources),this._setVisibleResource())}},{key:"_setVisibleResource",value:function(){var e=this._visibleResource,t=this.modelviewer.timeline.getSelectedTime().valueOf();this._enabledResources.has(t)?this._visibleResource=this._enabledResources.get(t):this._visibleResource=void 0,this._visibleResource!==e&&this.trigger("change:visibleResource")}},{key:"_initAdaptSuitableResource",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.enabled,n=void 0===t||t,i=e.getPossibleVariables,o=void 0===i?void 0:i,r=e.isResourceSelected,a=void 0===r?void 0:r;this._adaptSuitableResource={enabled:n,getPossibleVariables:o,isResourceSelected:a},void 0===this._adaptSuitableResource.getPossibleVariables&&(this._adaptSuitableResource.getPossibleVariables=function(e){return e}),void 0===this._adaptSuitableResource.isResourceSelected&&(this._adaptSuitableResource.isResourceSelected=function(e,t){var n;return void 0!==t&&(n=t.variableCollection.node).getResourcesByVariables.apply(n,[!0].concat(kr(e))).length>0})}}])&&Er(t.prototype,n),a}(ri);B(Dr.prototype);const Ar=Dr,Lr=SVG;var Mr=["color","width"],Vr=["size","color","anchor"];function Gr(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n,i,o={},r=Object.keys(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Yr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.color,n=void 0===t?void 0:t,i=e.width,o=void 0===i?void 0:i,r=Gr(e,Mr),a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.color=qr(n,a.color,"black"),r.width=qr(o,a.width,1),Object.keys(a).forEach((function(e){"color"!=e&&"width"!=e&&void 0===r[e]&&(r[e]=a[e])})),r}function Fr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.size,n=void 0===t?void 0:t,i=e.color,o=void 0===i?void 0:i,r=e.anchor,a=void 0===r?void 0:r,s=Gr(e,Vr),l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s.size=qr(n,l.size,12),s.color=qr(o,l.color,"black"),void 0!==(a=qr(a,l.anchor))&&(s.anchor=a),Object.keys(l).forEach((function(e){"color"!=e&&"size"!=e&&"anchor"!=e&&void 0===s[e]&&(s[e]=l[e])})),s}function Xr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.visible,n=void 0===t?void 0:t,i=e.style,o=void 0===i?{}:i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{visible:qr(n,r.visible,!0),style:Yr(o,r.style)}}function zr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"visible"in t&&(e.visible=t.visible),"style"in t&&["color","width","opacity","linecap","linejoin","dasharray"].forEach((function(n){n in t.style&&(e.style[n]=t.style[n])})),e}function qr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){return void 0!==e?e:t}))}function Hr(e){var t=e.node,n=e.text,i=e.x,o=e.y,r=e.horizontalMargin,a=void 0===r?0:r,s=e.verticalMargin,l=void 0===s?0:s,u=e.font,c=void 0===u?{}:u,f=e.fill,d=void 0===f?{}:f,h=t.group();"color"in d||(d.color="white");var p=h.rect().fill(d),v=h.text(n).attr({x:i,y:o}).font(c);return"bottom"==c["alignment-baseline"]&&v.dy(-v.bbox().height-5),v.dx(a*("end"==v.attr("text-anchor")?-1:1)).dy(l*("bottom"==c["alignment-baseline"]?-1:1)),p.attr({x:v.bbox().x,y:v.bbox().y,width:v.bbox().width,height:v.bbox().height}),h}function Kr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.node,n=e.x,i=void 0===n?0:n,o=e.y,r=void 0===o?0:o,a=e.wspd,s=void 0===a?0:a,l=e.wdir,u=void 0===l?270:l,c=e.length,f=void 0===c?50:c,d=e.strokeStyle,h=void 0===d?void 0:d,p=e.fillTriangle,v=void 0===p||p,y=e.triangleRatio,m=void 0===y?.2:y,b=e.barbDistanceRatio,g=void 0===b?.1:b,_=e.barbHeightRatio,O=void 0===_?3/8:_,S=e.circleOnLowWindspeed,T=void 0===S||S,k=e.circleRadiusRatio,P=void 0===k?.1:k;h=Yr(h);var x=w(s),R=t.group(),j=x>=5?R.group():void 0,E=f*m,C=f*g,N=f*O,B=r-f,I=x;if(x<5&&T)R.circle(f*P).cx(i).cy(r).stroke(h).fill("none");else{for(R.line(i,B,i,r).stroke(h);I>=50;)j.polyline([[i,B],[i+N,B+E/2],[i,B+E]]).fill(v?h:"none").stroke(h),B+=E+((I-=50)>=50?C/2:C);for(;I>=10;)j.line(i,B,i+N,B-E/2).stroke(h),B+=C,I-=10;x<10&&(B+=C),I>=5&&j.line(i,B,i+N/2,B-E/4).stroke(h);var D=B-(r-f);D>.9*f&&j.scale(1,.9*f/D,i,r-f),0!=u&&R.rotate(u,i,r)}}function Ur(e){return(Ur="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 $r=["parcel","visible","temp","dewp"];function Zr(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n,i,o={},r=Object.keys(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Wr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jr(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Qr(e,t){return(Qr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ea(e,t){return!t||"object"!==Ur(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ta(e){return(ta=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var na=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Qr(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ta(i);if(o){var n=ta(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ea(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.parcel,i=void 0===n?void 0:n,o=t.visible,s=void 0===o||o,l=t.temp,u=void 0===l?{}:l,c=t.dewp,f=void 0===c?{}:c,d=Zr(t,$r);return Wr(this,a),(e=r.call(this,d))._parcel=i,void 0===e.id&&void 0!==i&&(e.id=i.id),e._options={visible:s,temp:Xr(u,{style:{color:"rgb(255, 153, 0)",width:3,linecap:"round"}}),dewp:Xr(f,{style:{color:"rgb(255, 153, 0)",width:3,linecap:"round"}})},e}return t=a,(n=[{key:"parcel",get:function(){return this._parcel}},{key:"visible",get:function(){return this._options.visible},set:function(e){var t=this._options.visible;this._options.visible=!!e,t!=this._options.visible&&this.trigger("change:visible")}},{key:"options",get:function(){return this._options}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.visible,n=void 0===t?void 0:t,i=e.temp,o=void 0===i?void 0:i,r=e.dewp,a=void 0===r?void 0:r,s=!1;void 0===o?o={}:s=!0,void 0===a?a={}:s=!0,this._options.temp=zr(this._options.temp,o),this._options.dewp=zr(this._options.dewp,a),s&&this.trigger("change:options"),void 0!==n&&(this.visible=n)}}])&&Jr(t.prototype,n),a}(ri);B(na.prototype);const ia=na;function oa(e){return(oa="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)}function ra(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return aa(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?aa(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function aa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function sa(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function la(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ua(e,t){return(ua=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ca(e,t){return!t||"object"!==oa(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fa(e){return(fa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var da=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ua(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=fa(i);if(o){var n=fa(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ca(this,e)});function a(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.visible,o=void 0===i||i,s=n.diagram,l=void 0===s?{}:s,u=n.windprofile,c=void 0===u?{}:u,f=n.hodograph,d=void 0===f?{}:f,h=n.parcels,p=void 0===h?{}:h;if(sa(this,a),(t=r.call(this))._sounding=e,t._diagramParcelCollection=new fi({fireReplace:!1,fireAddRemoveOnReplace:!0,emptyObjectMaker:function(){return new ia}}),t._visible=o,t._options={diagram:pa(l),windprofile:ya(c),hodograph:Xr(d),parcels:ba(p)},void 0!==t._sounding){t._sounding.parcelCollection.on("add:item",(function(e){return t.addParcel(e)})),t._sounding.parcelCollection.on("remove:item",(function(e){var n,i=ra(t._diagramParcelCollection);try{for(i.s();!(n=i.n()).done;){var o=n.value;o.parcel===e&&t._diagramParcelCollection.remove(o)}}catch(e){i.e(e)}finally{i.f()}}));var v,y=ra(t._sounding.parcelCollection);try{for(y.s();!(v=y.n()).done;){var m=v.value;t.addParcel(m)}}catch(e){y.e(e)}finally{y.f()}}return t}return t=a,(n=[{key:"sounding",get:function(){return this._sounding}},{key:"visible",get:function(){return this._visible},set:function(e){var t=this._visible;this._visible=!!e,t!=this._visible&&this.trigger("change:visible")}},{key:"options",get:function(){return this._options}},{key:"diagramParcelCollection",get:function(){return this._diagramParcelCollection}},{key:"addParcel",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;(t=void 0===t?this.getParcelOptions(e):t).parcel=e;var n=new ia(t);return this._diagramParcelCollection.append(n),n}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.visible,n=void 0===t?void 0:t,i=e.diagram,o=void 0===i?void 0:i,r=e.windprofile,a=void 0===r?void 0:r,s=e.hodograph,l=void 0===s?void 0:s,u=e.parcels,c=void 0===u?void 0:u,f=!1;void 0===o?o={}:f=!0,void 0===a?a={}:f=!0,void 0===l?l={}:f=!0,this._options.diagram=va(this._options.diagram,o),this._options.windprofile=ma(this._options.windprofile,a),this._options.hodograph=zr(this._options.hodograph,l),f&&this.trigger("change:options"),void 0===c&&(c={}),this._options.parcels=ga(this._options.parcels,c);var d,h=ra(this.diagramParcelCollection);try{for(h.s();!(d=h.n()).done;){var p=d.value;p.id in c&&p.update(c[p.id])}}catch(e){h.e(e)}finally{h.f()}void 0!==n&&(this.visible=n)}},{key:"getParcelOptions",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,n={visible:this.options.parcels.default.visible,temp:{visible:this.options.parcels.default.temp.visible,style:{}},dewp:{visible:this.options.parcels.default.dewp.visible,style:{}}};return["temp","dewp"].forEach((function(t){Object.keys(e.options.parcels.default[t].style).forEach((function(i){n[t].style[i]=e.options.parcels.default[t].style[i]}))})),void 0!==t&&t.id in this.options.parcels&&(n=wa(n,this.options.parcels[t.id],["temp","dewp"])),n}}])&&la(t.prototype,n),a}(ri);B(da.prototype);const ha=da;function pa(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.visible,n=void 0===t||t,i=e.temp,o=void 0===i?{}:i,r=e.dewp,a=void 0===r?{}:r,s=e.wetbulb,l=void 0===s?{}:s;return{visible:n,temp:Xr(o,{style:{color:"red",width:3,linecap:"round"}}),dewp:Xr(a,{style:{color:"blue",width:3,linecap:"round"}}),wetbulb:Xr(l,{style:{color:"green",width:2,linecap:"round"}})}}function va(e,t){return wa(e,t,["temp","dewp","wetbulb"])}function ya(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.visible,n=void 0===t||t,i=e.windbarbs,o=void 0===i?{}:i,r=e.windspeed,a=void 0===r?{}:r;return{visible:n,windbarbs:Xr(o),windspeed:Xr(a)}}function ma(e,t){return wa(e,t,["windbarbs","windspeed"])}function ba(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return void 0===e.visible&&(e.visible=!0),void 0===e.default&&(e.default={}),void 0===e.default.visible&&(e.default.visible=!1),void 0===e.default.temp&&(e.default.temp={}),void 0===e.default.temp.visible&&(e.default.temp.visible=!0),void 0===e.default.temp.style&&(e.default.temp.style={}),void 0===e.default.temp.style.color&&(e.default.temp.style.color="rgb(255, 153, 0)"),void 0===e.default.temp.style.width&&(e.default.temp.style.width=3),void 0===e.default.temp.style.linecap&&(e.default.temp.style.linecap="round"),void 0===e.default.dewp&&(e.default.dewp={}),void 0===e.default.dewp.visible&&(e.default.dewp.visible=!0),void 0===e.default.dewp.style&&(e.default.dewp.style={}),void 0===e.default.dewp.style.color&&(e.default.dewp.style.color="rgb(255, 194, 102)"),void 0===e.default.dewp.style.width&&(e.default.dewp.style.width=3),void 0===e.default.dewp.style.linecap&&(e.default.dewp.style.linecap="round"),e}function ga(e,t){return"visible"in t&&(e.visible=t.visible),"default"in t&&(e.default=wa(e.default,t.default,["temp","dewp"])),Object.keys(t).filter((function(e){return"visible"!=e&&"default"!=e})).forEach((function(n){return e[n]=va(n in e?e[n]:{},t[n])})),e}function wa(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return"visible"in t&&(e.visible=t.visible),n.forEach((function(n){n in t&&(e[n]=zr(e[n]?e[n]:{style:{}},t[n]))})),e}function _a(e){return(_a="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)}function Oa(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Sa(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sa(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function Sa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Ta(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ka(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Pa(e,t){return(Pa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xa(e,t){return!t||"object"!==_a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ra(e){return(Ra=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const ja=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Pa(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ra(i);if(o){var n=Ra(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return xa(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.renderTo,i=void 0===n?void 0:n,o=t.width,s=void 0===o?void 0:o,l=t.height,u=void 0===l?void 0:l;if(Ta(this,a),(e=r.call(this,{fireReplace:!1,fireAddRemoveOnReplace:!0,emptyObjectMaker:function(){return new ha}}))._svgNode=void 0===i||"node"in i||"instance"in i?(0,Lr.SVG)(i):(0,Lr.SVG)().addTo(i),void 0!==s||void 0!==u)e._svgNode.size(s,u);else if(void 0===s&&void 0===u&&void 0!==i&&"getBoundingClientRect"in i){var c=i.getBoundingClientRect(),f=window.getComputedStyle(i);e._svgNode.size(c.width-parseFloat(f.getPropertyValue("padding-left"))-parseFloat(f.getPropertyValue("padding-right")),c.height-parseFloat(f.getPropertyValue("padding-top"))-parseFloat(f.getPropertyValue("padding-bottom")))}return e._plotAreas=new Set,e._svgNode.on("mousemove",(function(t){var n,i=Oa(e._plotAreas);try{for(i.s();!(n=i.n()).done;){var o=n.value;"isHoverLabelsRemote"in o&&o.svgNode.dispatchEvent(t)}}catch(e){i.e(e)}finally{i.f()}})),e._svgNode.on("mouseout",(function(t){if(e._svgNode.node===t.target){var n,i=Oa(e._plotAreas);try{for(i.s();!(n=i.n()).done;){var o=n.value;"_hoverLabelsGroup"in o&&o._hoverLabelsGroup.clear()}}catch(e){i.e(e)}finally{i.f()}}})),e.on("add:item",(function(t){var n,i=Oa(e._plotAreas);try{for(i.s();!(n=i.n()).done;){var o=n.value;"addSounding"in o&&o.addSounding(t)}}catch(e){i.e(e)}finally{i.f()}})),e.on("remove:item",(function(t){var n,i=Oa(e._plotAreas);try{for(i.s();!(n=i.n()).done;){var o=n.value;"removeSounding"in o&&o.removeSounding(t)}}catch(e){i.e(e)}finally{i.f()}})),e}return t=a,(n=[{key:"svgNode",get:function(){return this._svgNode}},{key:"appendPlotArea",value:function(e){if(!this._plotAreas.has(e)){this._plotAreas.add(e),e.addTo(this.svgNode);var t,n=Oa(this);try{for(n.s();!(t=n.n()).done;){var i=t.value;"addSounding"in e&&e.addSounding(i)}}catch(e){n.e(e)}finally{n.f()}return this}}},{key:"removePlotArea",value:function(e){if(this._plotAreas.has(e)){var t,n=Oa(this);try{for(n.s();!(t=n.n()).done;){var i=t.value;e.removeSounding(i)}}catch(e){n.e(e)}finally{n.f()}return this._plotAreas.delete(e),this}}},{key:"exchangeCoordinateSystem",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=Oa(this._plotAreas);try{for(i.s();!(t=i.n()).done;){var o=t.value;void 0!==n&&o.coordinateSystem!==n||(o.coordinateSystem=e)}}catch(e){i.e(e)}finally{i.f()}}},{key:"addSounding",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new ha(e,t),i=1,o="sounding-".concat(i);this.containsId(o);)i++,o="sounding-".concat(i);return n.id=o,this.append(n),n}}])&&ka(t.prototype,n),a}(fi);function Ea(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ca(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Na=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width,i=void 0===n?100:n,o=t.height,r=void 0===o?100:o,a=t.pressure,s=void 0===a?{}:a,l=t.temperature,u=void 0===l?{}:l;Ea(this,e),this._width=i,this._height=r,this.temperatureBottomLeft,this.temperatureBottomRight,this.inclinationTan,this.options={pressure:{},temperature:{}},this._initPressureOptions(s),this._initTemperatureOptions(u)}var t,n;return t=e,(n=[{key:"width",get:function(){return this._width},set:function(e){var t=this._width;this._width=e,t!=this._width&&this.trigger("change:options")}},{key:"height",get:function(){return this._height},set:function(e){var t=this._height;this._height=e,t!=this._height&&this.trigger("change:options")}},{key:"isIsobarsStraightLine",value:function(){return!0}},{key:"isDryAdiabatStraightLine",value:function(){return!1}},{key:"isIsothermsVertical",value:function(){return void 0!==this.options.temperature.inclinationAngle&&0==this.options.temperature.inclinationAngle}},{key:"getPByXY",value:function(e,t){return Math.pow(this.options.pressure.min,t/this.height)*Math.pow(this.options.pressure.max,(this.height-t)/this.height)}},{key:"getTByXY",value:function(e,t){var n=e-t*this.inclinationTan;return this.temperatureBottomLeft+n*(this.temperatureBottomRight-this.temperatureBottomLeft)/this.width}},{key:"getYByXP",value:function(e,t){return this.height*Math.log(this.options.pressure.max/t)/Math.log(this.options.pressure.max/this.options.pressure.min)}},{key:"getTByXP",value:function(e,t){return this.getTByXY(e,this.getYByXP(e,t))}},{key:"getXByYT",value:function(e,t){return(t-this.temperatureBottomLeft)*this.width/(this.temperatureBottomRight-this.temperatureBottomLeft)+e*this.inclinationTan}},{key:"getYByXT",value:function(e,t){return 0!=this.inclinationTan?(e-this.getXByYT(0,t))/this.inclinationTan:void 0}},{key:"getXByPT",value:function(e,t){return this.getXByYT(this.getYByXP(0,e),t)}},{key:"getYByPT",value:function(e){return this.getYByXP(0,e)}},{key:"getXByYPotentialTemperature",value:function(e,t){return t=a(t,this.getPByXY(0,e)),this.getXByYT(e,t)}},{key:"getYByXPotentialTemperature",value:function(e,t){var n=this.getPByXY(e,0),i=this.getPByXY(e,this.height);if(!(r(this.getTByXP(e,i),i)<t||t<r(this.getTByXP(e,n),n))){for(;n-i>10;){var o=i+(n-i)/2,a=r(this.getTByXP(e,o),o);if(void 0===a)return;a<t?n=o:i=o}return this.getYByXP(e,i+(n-i)/2)}}},{key:"getXByPPotentialTemperatur",value:function(e,t){return t=a(t,e),this.getXByPT(e,t)}},{key:"getYByPPotentialTemperatur",value:function(e,t){var n=this.getXByPPotentialTemperatur(e,t);return this.getYByXPotentialTemperature(n,t)}},{key:"getXByYHMR",value:function(e,t){var n=this.getPByXY(0,e);return this.getXByYT(e,l(t,n))}},{key:"getYByXHMR",value:function(e,t){for(var n=this.getPByXY(e,0),i=this.getPByXY(e,this.height);n-i>10;){var o=i+(n-i)/2,r=d(this.getTByXP(e,o),o);if(void 0===r)return;r<t?i=o:n=o}return this.getYByXP(e,i+(n-i)/2)}},{key:"getXByPHMR",value:function(e,t){var n=l(t,e);return this.getXByPT(e,n)}},{key:"getYByPHMR",value:function(e,t){var n=l(t,e);return this.getYByPT(e,n)}},{key:"getXByYEquiPotTemp",value:function(e,t){var n=s(t,this.getPByXY(0,e));return this.getXByYT(e,n)}},{key:"getYByXEquiPotTemp",value:function(e,t){for(var n=0,i=this.height,o=void 0;i-n>10;){o=n+(i-n)/2;var r=this.getYByXT(e,s(t,this.getPByXY(e,o)));if(void 0===r)return;r<t?i=o:n=o}return o}},{key:"getXByPEquiPotTemp",value:function(e,t){var n=s(t,e);return this.getXByPT(e,n)}},{key:"getYByPEquiPotTemp",value:function(e,t){var n=s(t,e);return this.getYByPT(e,n)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.pressure,n=void 0===t?{}:t,i=e.temperature,o=void 0===i?{}:i;"min"in n&&(this.options.pressure.min=void 0===n.min?100:n.min),"max"in n&&(this.options.pressure.max=void 0===n.max?1e3:n.max),"min"in o&&(this.options.temperature.min=void 0===o.min?y(-40):o.min),"max"in o&&(this.options.temperature.max=void 0===o.max?y(-45):o.max),"reference"in o&&(this.options.temperature.reference=void 0===o.reference?"base":o.reference),"inclinationAngle"in o&&(this.options.temperature.inclinationAngle=void 0===o.inclinationAngle?45:o.inclinationAngle),this._normalizeTemperatureRange(),this.trigger("change:options")}},{key:"_initPressureOptions",value:function(e){var t=e.min,n=void 0===t?100:t,i=e.max,o=void 0===i?1050:i;this.options.pressure={min:n,max:o}}},{key:"_initTemperatureOptions",value:function(e){var t=e.min,n=void 0===t?y(-40):t,i=e.max,o=void 0===i?y(45):i,r=e.reference,a=void 0===r?"base":r,s=e.inclinationAngle,l=void 0===s?45:s;this.options.temperature={min:n,max:o,reference:a,inclinationAngle:l},this._normalizeTemperatureRange()}},{key:"_normalizeTemperatureRange",value:function(){if(this.temperatureBottomLeft=this.options.temperature.min,this.temperatureBottomRight=this.options.temperature.max,this.inclinationTan=45==this.options.temperature.inclinationAngle?1:0==this.options.temperature.inclinationAngle?0:Math.tan(this.options.temperature.inclinationAngle*Math.PI/180),/^[0-9]+$/.test(this.options.temperature.reference)){var e=this.getYByXP(0,this.options.temperature.reference),t=this.inclinationTan*e,n=(this.temperatureBottomRight-this.temperatureBottomLeft)/this.width;this.temperatureBottomLeft+=n*t,this.temperatureBottomRight+=n*t}}}])&&Ca(t.prototype,n),e}();B(Na.prototype);const Ba=Na;function Ia(e){return(Ia="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)}function Da(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Aa(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function La(e,t){return(La=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ma(e,t){return!t||"object"!==Ia(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Va(e){return(Va=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ga=.2857;const Ya=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&La(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Va(i);if(o){var n=Va(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Ma(this,e)});function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,n=void 0===t?100:t,i=e.height,o=void 0===i?100:i,s=e.pressure,l=void 0===s?{}:s,u=e.temperature,c=void 0===u?{}:u;return Da(this,a),c.inclinationAngle=0,r.call(this,{width:n,height:o,pressure:l,temperature:c})}return t=a,(n=[{key:"isDryAdiabatStraightLine",value:function(){return!0}},{key:"getPByXY",value:function(e,t){return Math.pow(Math.pow(this.options.pressure.max,Ga)-t*(Math.pow(this.options.pressure.max,Ga)-Math.pow(this.options.pressure.min,Ga))/this.height,1/Ga)}},{key:"getYByXP",value:function(e,t){return this.height*(Math.pow(this.options.pressure.max,Ga)-Math.pow(t,Ga))/(Math.pow(this.options.pressure.max,Ga)-Math.pow(this.options.pressure.min,Ga))}},{key:"getYByXT",value:function(){}}])&&Aa(t.prototype,n),a}(Ba);function Fa(e){return(Fa="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)}function Xa(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function za(e,t){return(za=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qa(e,t){return!t||"object"!==Fa(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ha(e){return(Ha=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const Ka=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&za(e,t)}(o,e);var t,n,i=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,i=Ha(t);if(n){var o=Ha(this).constructor;e=Reflect.construct(i,arguments,o)}else e=i.apply(this,arguments);return qa(this,e)});function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,n=void 0===t?100:t,r=e.height,a=void 0===r?100:r,s=e.pressure,l=void 0===s?{}:s,u=e.temperature,c=void 0===u?{}:u;return Xa(this,o),c.inclinationAngle=0,i.call(this,{width:n,height:a,pressure:l,temperature:c})}return o}(Ba);function Ua(e){return(Ua="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)}function $a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Za(e,t){return(Za=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wa(e,t){return!t||"object"!==Ua(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ja(e){return(Ja=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const Qa=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Za(e,t)}(o,e);var t,n,i=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,i=Ja(t);if(n){var o=Ja(this).constructor;e=Reflect.construct(i,arguments,o)}else e=i.apply(this,arguments);return Wa(this,e)});function o(){return $a(this,o),i.apply(this,arguments)}return o}(Ba);function es(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ts(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var ns=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.svgNode,o=void 0===i?void 0:i,r=n.coordinateSystem,a=void 0===r?void 0:r,s=n.x,l=void 0===s?0:s,u=n.y,c=void 0===u?0:u,f=n.width,d=void 0===f?100:f,h=n.height,p=void 0===h?100:h,v=n.style,y=void 0===v?{}:v,m=n.visible,b=void 0===m||m,g=n.events,w=void 0===g?{}:g;es(this,e),this._svgNode=(0,Lr.SVG)().attr({x:l,y:c,width:d,height:p}).css(this._getNormalizedStyle(y)).css("display",b?"inline":"none"),void 0!==o&&this.addTo(o),this._svgNodeBackground=this._svgNode.group(),this._visible=b,this._coordinateSystem=a,this._coordinateSystemListenerKey=void 0!==this._coordinateSystem?this._coordinateSystem.on("change:options",(function(){return t.onCoordinateSystemChange()})):void 0,this.on("change:extent",(function(){return t.onCoordinateSystemChange()})),this._initEvents(w)}var t,n;return t=e,(n=[{key:"svgNode",get:function(){return this._svgNode}},{key:"visible",get:function(){return this._visible},set:function(e){var t=this._visible;this._visible=e,t!=this._visible&&(this._svgNode.style("display",this._visible?"inline":"none"),this.trigger("change:visible"))}},{key:"x",get:function(){return this._svgNode.attr("x")},set:function(e){this._svgNode.attr({x:e}),this.trigger("change:position")}},{key:"y",get:function(){return this._svgNode.attr("y")},set:function(e){this._svgNode.attr({y:e}),this.trigger("change:position")}},{key:"width",get:function(){return this._svgNode.attr("width")},set:function(e){this._svgNode.attr({width:e}),this.trigger("change:extent")}},{key:"height",get:function(){return this._svgNode.attr("height")},set:function(e){this._svgNode.attr({height:e}),this.trigger("change:extent")}},{key:"style",get:function(){return this._svgNode.css()},set:function(e){this._svgNode.css(e)}},{key:"coordinateSystem",get:function(){return this._coordinateSystem},set:function(e){var t=this;void 0!==this._coordinateSystemListenerKey&&this._coordinateSystem.un("change:options",this._coordinateSystemListenerKey),this._coordinateSystem=e,this._coordinateSystemListenerKey=this._coordinateSystem.on("change:options",(function(){return t.onCoordinateSystemChange()})),this.onCoordinateSystemChange()}},{key:"minExtentLength",get:function(){return Math.min(this.width,this.height)}},{key:"maxExtentLength",get:function(){return Math.max(this.width,this.height)}},{key:"addTo",value:function(e){this._svgNode.addTo(e)}},{key:"init",value:function(){this.onCoordinateSystemChange()}},{key:"onCoordinateSystemChange",value:function(){void 0!==this._coordinateSystem&&this.drawBackground(this._svgNodeBackground)}},{key:"drawBackground",value:function(e){e.clear(),this.trigger("prebuild:background",{node:e}),this._drawBackground(e),this.trigger("postbuild:background",{node:e})}},{key:"_drawBackground",value:function(){}},{key:"_getNormalizedStyle",value:function(e){var t=e.overflow;return{overflow:void 0===t?"hidden":t}}},{key:"_initEvents",value:function(e){var t=this,n=e.click,i=void 0===n?void 0:n,o=e.dblclick,r=void 0===o?void 0:o,a=e.mousedown,s=void 0===a?void 0:a,l=e.mouseup,u=void 0===l?void 0:l,c=e.mouseover,f=void 0===c?void 0:c,d=e.mouseout,h=void 0===d?void 0:d,p=e.mousemove,v=void 0===p?void 0:p,y=e.touchstart,m=void 0===y?void 0:y,b=e.touchmove,g=void 0===b?void 0:b,w=e.touchleave,_=void 0===w?void 0:w,O=e.touchend,S=void 0===O?void 0:O,T=e.touchcancel,k={click:i,dblclick:r,mousedown:s,mouseup:u,mouseover:f,mouseout:h,mousemove:v,touchstart:m,touchmove:g,touchleave:_,touchend:S,touchcancel:void 0===T?void 0:T};Object.keys(k).forEach((function(e){t._svgNode.on(e,(function(n){var i=t.getExtendedEvent(n,t._svgNode.point(n.pageX-window.pageXOffset,n.pageY-window.pageYOffset));void 0!==k[e]&&k[e].call(t,i),t.trigger(e,i)}))}))}},{key:"getExtendedEvent",value:function(e,t){return e.elementX=t.x,e.elementY=t.y,e}}])&&ts(t.prototype,n),e}();B(ns.prototype);const is=ns;function os(e){return(os="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)}function rs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function as(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ss(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function ls(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function us(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function cs(e,t,n){return(cs="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=hs(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function fs(e,t){return(fs=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ds(e,t){return!t||"object"!==os(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function hs(e){return(hs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const ps=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fs(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=hs(i);if(o){var n=hs(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ds(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.svgNode,i=void 0===n?void 0:n,o=t.coordinateSystem,s=void 0===o?void 0:o,l=t.x,u=void 0===l?0:l,c=t.y,f=void 0===c?0:c,d=t.width,h=void 0===d?100:d,p=t.height,v=void 0===p?100:p,y=t.style,m=void 0===y?{}:y,b=t.visible,g=void 0===b||b,w=t.events,_=void 0===w?{}:w,O=t.getSoundingVisibility,S=void 0===O?function(e){return e.visible}:O,T=t.dataGroupIds,k=void 0===T?[]:T,P=t.getCoordinatesByLevelData,x=void 0===P?function(){return{x:void 0,y:void 0}}:P,R=t.insertDataGroupInto,j=void 0===R?function(){}:R,E=t.filterDataPoint,C=void 0===E?void 0:E,N=t.minDataPointsDistance,B=void 0===N?0:N;return ls(this,a),(e=r.call(this,{svgNode:i,coordinateSystem:s,x:u,y:f,width:h,height:v,style:m,visible:g,events:_}))._getSoundingVisibility=S,e._dataGroupIds=k,e._getCoordinatesByLevelData=x,e._insertDataGroupInto=j,e._filterDataPoint=C,e._minDataPointsDistance=B,e._svgNodeData=e.svgNode.group(),e._soundings=new Map,e}return t=a,(n=[{key:"dataGroupIds",get:function(){return this._dataGroupIds}},{key:"getCoordinatesByLevelData",get:function(){return this._getCoordinatesByLevelData}},{key:"minDataPointsDistance",get:function(){return this._minDataPointsDistance},set:function(e){var t=this._minDataPointsDistance;this._minDataPointsDistance=e,t!=this._minDataPointsDistance&&this.drawSoundings()}},{key:"addSounding",value:function(e){var t=this,n=this._svgNodeData.group(),i=e.on("change:visible",(function(){return t.onChangeSoundingVisibility(e,n)})),o=e.on("change:options",(function(){void 0!==t.coordinateSystem&&t.drawSounding(e,n),t.onChangeSoundingVisibility(e,n)}));this._soundings.set(e,{group:n,listenerKeyVisible:i,listenerKeyOptions:o}),this.trigger("add:sounding",e),void 0!==this.coordinateSystem&&this.drawSounding(e,n),this.setDisplayOfSounding(e,n)}},{key:"removeSounding",value:function(e){this._soundings.has(e)&&(this._soundings.get(e).group.remove(),e.un(this._soundings.get(e).listenerKeyVisible),e.un(this._soundings.get(e).listenerKeyOptions),this._soundings.delete(e)),this.trigger("remove:sounding",e)}},{key:"onCoordinateSystemChange",value:function(){cs(hs(a.prototype),"onCoordinateSystemChange",this).call(this),this.drawSoundings()}},{key:"onChangeSoundingVisibility",value:function(e,t){this.setDisplayOfSounding(e,t)}},{key:"setDisplayOfSounding",value:function(e,t){t.css("display",this._getSoundingVisibility(e)?"inline":"none")}},{key:"drawSoundings",value:function(){if(void 0!==this.coordinateSystem){var e,t=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ss(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ss(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}(this._soundings.keys());try{for(t.s();!(e=t.n()).done;){var n=e.value;this.drawSounding(n,this._soundings.get(n).group)}}catch(e){t.e(e)}finally{t.f()}}}},{key:"drawSounding",value:function(e,t){var n=this;t.clear(),this.trigger("preinsert:sounding",{sounding:e,node:t});var i=t.group(),o={},r=this._getFilterDataPointFunction(),a={};e.sounding.getLevels().reverse().forEach((function(t){var i=e.sounding.getData(t);n._dataGroupIds.forEach((function(t){t in o||(o[t]=[]);var s={levelData:i,x:void 0,y:void 0},l=n._getCoordinatesByLevelData(t,e,s.levelData,n),u=l.x,c=l.y;s.x=u,s.y=c,void 0===u||void 0===c||void 0!==r&&r(s,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rs(Object(n),!0).forEach((function(t){as(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},a))||(a=s,o[t].push(s))}))})),Object.keys(o).forEach((function(t){o[t].length>0&&n._insertDataGroupInto(i,t,e,o[t],n)})),this.trigger("postinsert:sounding",{sounding:e,node:t})}},{key:"_getFilterDataPointFunction",value:function(){return void 0===this._filterDataPoint?0===(e=this._minDataPointsDistance)?void 0:function(t,n){var i=t.x,o=t.y;if(void 0===n.x||void 0===n.y)return n.x=i,n.y=o,!1;var r=Math.sqrt(Math.pow(i-n.x,2)+Math.pow(o-n.y,2))<e;return r||(n.x=i,n.y=o),r}:this._filterDataPoint;var e}}])&&us(t.prototype,n),a}(is);function vs(e){return(vs="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)}function ys(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function ms(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bs(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function gs(e,t,n){return(gs="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Os(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function ws(e,t){return(ws=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _s(e,t){return!t||"object"!==vs(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Os(e){return(Os=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const Ss=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ws(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Os(i);if(o){var n=Os(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return _s(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.svgNode,i=void 0===n?void 0:n,o=t.coordinateSystem,s=void 0===o?void 0:o,l=t.x,u=void 0===l?0:l,c=t.y,f=void 0===c?0:c,d=t.width,h=void 0===d?100:d,p=t.height,v=void 0===p?100:p,y=t.style,m=void 0===y?{}:y,b=t.visible,g=void 0===b||b,w=t.events,_=void 0===w?{}:w,O=t.hoverLabels,S=void 0===O?{}:O,T=t.getSoundingVisibility,k=void 0===T?function(e){return e.visible}:T,P=t.dataGroupIds,x=void 0===P?void 0:P,R=t.getCoordinatesByLevelData,j=void 0===R?void 0:R,E=t.insertDataGroupInto,C=void 0===E?void 0:E,N=t.filterDataPoint,B=void 0===N?void 0:N,I=t.minDataPointsDistance,D=void 0===I?0:I;return ms(this,a),(e=r.call(this,{svgNode:i,coordinateSystem:s,x:u,y:f,width:h,height:v,style:m,visible:g,events:_,getSoundingVisibility:k,dataGroupIds:x,getCoordinatesByLevelData:j,insertDataGroupInto:C,filterDataPoint:B,minDataPointsDistance:D}))._hoverLabelsGroup=e.svgNode.group(),e._isHoverLabelsRemote=!0,e._initHoverLabels(S),e}return t=a,(n=[{key:"onChangeSoundingVisibility",value:function(e,t){gs(Os(a.prototype),"onChangeSoundingVisibility",this).call(this,e,t),this._hoverLabelsGroup.clear()}},{key:"drawSounding",value:function(e,t){gs(Os(a.prototype),"drawSounding",this).call(this,e,t),this._getSoundingVisibility(e)&&this._hoverLabelsGroup.clear()}},{key:"getExtendedEvent",value:function(e,t){return(e=gs(Os(a.prototype),"getExtendedEvent",this).call(this,e,t)).diagramPres=void 0,void 0!==this.coordinateSystem&&(e.diagramPres=this.coordinateSystem.getPByXY(0,this.coordinateSystem.height-e.elementY)),e}},{key:"isHoverLabelsRemote",get:function(){return this._isHoverLabelsRemote}},{key:"hoverLabelsSounding",get:function(){var e,t=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ys(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ys(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}(this._soundings.keys());try{for(t.s();!(e=t.n()).done;){var n=e.value;if(this._getSoundingVisibility(n))return n}}catch(e){t.e(e)}finally{t.f()}}},{key:"_initHoverLabels",value:function(e){var t=this,n=e.visible,i=void 0===n||n,o=e.type,r=void 0===o?"mousemove":o,a=e.remote,s=void 0===a||a,l=e.insertLabelsFunc,u=void 0===l?void 0:l;this._isHoverLabelsRemote=s,i&&void 0!==u&&(this.on("change:extent",(function(){return t._hoverLabelsGroup.clear()})),this.on(r,(function(e){if(e.diagramPres){var n=t.hoverLabelsSounding;if(void 0!==n){var i=n.sounding;u(n,i.getData(i.getNearestLevel(e.diagramPres)),t._hoverLabelsGroup)}}})))}}])&&bs(t.prototype,n),a}(ps);function Ts(e){return(Ts="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)}function ks(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ps(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ps(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function Ps(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function xs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rs(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function js(e,t,n){return(js="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ns(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function Es(e,t){return(Es=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Cs(e,t){return!t||"object"!==Ts(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ns(e){return(Ns=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const Bs=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Es(e,t)}(l,e);var n,i,o,a,s=(o=l,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ns(o);if(a){var n=Ns(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Cs(this,e)});function l(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.svgNode,i=void 0===n?void 0:n,o=t.coordinateSystem,r=void 0===o?void 0:o,a=t.x,c=void 0===a?0:a,f=t.y,d=void 0===f?0:f,h=t.width,p=void 0===h?100:h,v=t.height,b=void 0===v?100:v,g=t.style,w=void 0===g?{}:g,_=t.visible,O=void 0===_||_,S=t.events,T=void 0===S?{}:S,k=t.dataGroupIds,P=void 0===k?["temp","dewp","wetbulb"]:k,x=t.getCoordinatesByLevelData,R=void 0===x?function(e,t,n,i){if(void 0===n.pres)return{};var o=void 0;switch(e){case"temp":o=n.tmpk;break;case"dewp":o=n.dwpk;break;case"wetbulb":o=u(n.tmpk,n.dwpk,n.pres)}return void 0===o?{}:{x:i.coordinateSystem.getXByPT(n.pres,o),y:i.coordinateSystem.height-i.coordinateSystem.getYByPT(n.pres,o),value:Math.round(10*m(o))/10,unit:"℃"}}:x,j=t.insertDataGroupInto,E=void 0===j?function(e,t,n,i){var o=t in n.options.diagram?n.options.diagram[t].style:{};e.group().polyline(i.map((function(e){return[e.x,e.y]}))).fill("none").stroke(o)}:j,C=t.filterDataPoint,N=void 0===C?void 0:C,B=t.minDataPointsDistance,I=void 0===B?0:B,D=t.isobars,A=void 0===D?{}:D,L=t.isotherms,M=void 0===L?{}:L,V=t.dryadiabats,G=void 0===V?{}:V,Y=t.pseudoadiabats,F=void 0===Y?{}:Y,X=t.mixingratio,z=void 0===X?{}:X,q=t.hoverLabels,H=void 0===q?{}:q,K=t.parcels,U=void 0===K?{}:K;return xs(this,l),(e=s.call(this,{svgNode:i,coordinateSystem:r,x:c,y:d,width:p,height:b,style:w,visible:O,events:T,hoverLabels:H,getSoundingVisibility:function(e){return e.visible&&e.options.diagram.visible},dataGroupIds:P,getCoordinatesByLevelData:R,insertDataGroupInto:E,filterDataPoint:N,minDataPointsDistance:I})).options={isobars:Is(A),isotherms:Is(M,{highlightedLines:[y(0)]}),dryadiabats:Is(G),pseudoadiabats:Is(F,{style:{color:"rgb(102, 51, 0)",dasharray:6}}),mixingratio:Is(z,{minPressure:500,style:{color:"rgb(102, 51, 0)",dasharray:2}})},e.svgGroups={border:e._svgNodeBackground.group(),isobars:e._svgNodeBackground.group(),isotherms:e._svgNodeBackground.group(),dryadiabats:e._svgNodeBackground.group(),mixingratio:e._svgNodeBackground.group(),pseudoadiabats:e._svgNodeBackground.group()},e._parcelsOptions=U,"visible"in e._parcelsOptions||(e._parcelsOptions.visible=!0),e._parcels=new Map,e.on("add:sounding",(function(t){var n={parcelsGroup:void 0,parcelsGroups:new Map,addItemListenerKey:void 0,removeItemListenerKey:void 0,changeVisibleListeners:[],changeOptionsListeners:[]},i=function(i){n.changeVisibleListeners.push({diagramParcel:i,listenerKey:i.on("change:visible",(function(){if(n.parcelsGroups.has(i)){var e=n.parcelsGroups.get(i);i.visible?e.show():e.hide()}}))}),n.changeOptionsListeners.push({diagramParcel:i,listenerKey:i.on("change:options",(function(){var n=e._parcels.get(t);if(void 0!==n){var o=n.parcelsGroups.get(i);void 0!==o&&(n.parcelsGroups.delete(i),o.remove())}e.drawParcel(t,i)}))})};n.addItemListenerKey=t.diagramParcelCollection.on("add:item",(function(n){i(n),e.drawParcel(t,n)})),n.removeItemListenerKey=t.diagramParcelCollection.on("remove:item",(function(e){var t=n.parcelsGroups.get(e);void 0!==t&&(n.parcelsGroups.delete(e),t.remove())}));var o,r=ks(t.diagramParcelCollection);try{for(r.s();!(o=r.n()).done;){var a=o.value;i(a)}}catch(e){r.e(e)}finally{r.f()}e._parcels.set(t,n)})),e.on("remove:sounding",(function(t){if(e._parcels.has(t)){var n=e._parcels.get(t);t.diagramParcelCollection.un("add:item",n.addItemListenerKey),t.diagramParcelCollection.un("remove:item",n.removeItemListenerKey),n.changeVisibleListeners.forEach((function(e){return e.diagramParcel.un("change:visible",e.listenerKey)})),n.changeOptionsListeners.forEach((function(e){return e.diagramParcel.un("change:options",e.listenerKey)}))}e._parcels.delete(t)})),e.init(),e}return n=l,(i=[{key:"getIsobarsVisible",value:function(){return this.options.isobars.visible}},{key:"setIsobarsVisible",value:function(e){return this.options.isobars.visible=!!e,this.plotIsobars(),this}},{key:"getIsothermsVisible",value:function(){return this.options.isotherms.visible}},{key:"setIsothermsVisible",value:function(e){return this.options.isotherms.visible=!!e,this.plotIsotherms(),this}},{key:"getDryadiabatsVisible",value:function(){return this.options.dryadiabats.visible}},{key:"setDryadiabatsVisible",value:function(e){return this.options.dryadiabats.visible=!!e,this.plotDryadiabats(),this}},{key:"getPseudoadiabatsVisible",value:function(){return this.options.pseudoadiabats.visible}},{key:"setPseudoadiabatsVisible",value:function(e){return this.options.pseudoadiabats.visible=!!e,this.plotPseudoadiabats(),this}},{key:"getMixingratioVisible",value:function(){return this.options.mixingratio.visible}},{key:"setMixingratioVisible",value:function(e){return this.options.mixingratio.visible=!!e,this.plotMixingratio(),this}},{key:"drawSounding",value:function(e,t){if(js(Ns(l.prototype),"drawSounding",this).call(this,e,t),this._parcels.has(e)){var n=this._parcels.get(e);n.parcelsGroup=t.group(),e.options.parcels.visible||n.parcelsGroup.hide(),this._parcels.set(e,n)}this.drawParcels(e)}},{key:"drawParcels",value:function(e){if(this._parcelsOptions.visible&&this._parcels.has(e)){var t=this._parcels.get(e);t.parcelsGroup.clear(),t.parcelsGroups.clear();var n,i=ks(e.diagramParcelCollection);try{for(i.s();!(n=i.n()).done;){var o=n.value;this.drawParcel(e,o)}}catch(e){i.e(e)}finally{i.f()}}}},{key:"drawParcel",value:function(e,t){var n=this,i=t.parcel;if(void 0!==i.pres&&void 0!==i.tmpc&&void 0!==i.dwpc&&this._parcels.has(e)){var o=this._parcels.get(e),a=o.parcelsGroup.group();o.parcelsGroups.set(t,a),this._parcels.set(e,o);var s=r(y(i.tmpc),i.pres),l=d(y(i.dwpc),i.pres),u=h(s,l),f=v(y(i.tmpc),y(i.dwpc)),p=c(f,f,u),m=t.options;m.visible||a.hide();var b=a.group();m.temp.visible||b.hide();var g=a.group();m.dewp.visible||g.hide();var w=10,_=this.coordinateSystem.getYByPT(i.pres,y(i.tmpc)),O=this.coordinateSystem.getXByYPotentialTemperature(_,s),S=this.coordinateSystem.getYByPPotentialTemperatur(u,s),T=this.coordinateSystem.getXByYPotentialTemperature(S,s),k=[[O,_]];if(!this.coordinateSystem.isDryAdiabatStraightLine())for(var P=_+w;P<S;P+=w)k.push([this.coordinateSystem.getXByYPotentialTemperature(P,s),P]);k.push([T,S]);for(var x=this.coordinateSystem.height,R=this.coordinateSystem.getXByYEquiPotTemp(x,p),j=S+w;j<x;j+=w)k.push([this.coordinateSystem.getXByYEquiPotTemp(j,p),j]);k.push([R,x]),b.polyline(k.map((function(e){return e[1]=n.coordinateSystem.height-e[1],e}))).fill("none").stroke(m.temp.style);for(var E=this.coordinateSystem.getXByYHMR(_,l),C=this.coordinateSystem.getXByYHMR(S,l),N=[[E,_]],B=_+w;B<S;B+=w)N.push([this.coordinateSystem.getXByYHMR(B,l),B]);N.push([C,S]),g.polyline(N.map((function(e){return e[1]=n.coordinateSystem.height-e[1],e}))).fill("none").stroke(m.dewp.style)}}},{key:"_drawBackground",value:function(e){js(Ns(l.prototype),"_drawBackground",this).call(this,e),this.svgGroups={border:e.group(),isobars:e.group(),isotherms:e.group(),dryadiabats:e.group(),mixingratio:e.group(),pseudoadiabats:e.group()},this.svgGroups.border.clear(),this.svgGroups.border.rect(this.coordinateSystem.width,this.coordinateSystem.height).attr({stroke:"black","stroke-width":1,"fill-opacity":0}),this.plotIsobars(!0),this.plotIsotherms(!0),this.plotDryadiabats(!0),this.plotPseudoadiabats(!0),this.plotMixingratio(!0)}},{key:"plotIsobars",value:function(e){var t=this,n=this.coordinateSystem.getPByXY(0,this.coordinateSystem.height),i=this.coordinateSystem.getPByXY(0,0),o=i-n;this._plotLines(this.svgGroups.isobars,this.options.isobars,{min:n,max:i,interval:o>500?100:o>50?10:1},(function(e){var n=t.coordinateSystem.getYByXP(0,e);return[[0,n],[t.coordinateSystem.width,n]]}),e)}},{key:"plotIsotherms",value:function(e){var t=this,n=m(this.coordinateSystem.getTByXY(0,this.coordinateSystem.height)),i=m(this.coordinateSystem.getTByXY(this.coordinateSystem.width,0)),o=i-n;this._plotLines(this.svgGroups.isotherms,this.options.isotherms,{min:n,max:i,interval:o>50?10:5},(function(e){e=y(e);var n=[[void 0,void 0],[void 0,void 0]];return t.coordinateSystem.isIsothermsVertical()?(n[0][1]=0,n[1][1]=t.coordinateSystem.height,n[0][0]=n[1][0]=t.coordinateSystem.getXByYT(n[0][1],e)):(n[0][1]=0,n[0][0]=t.coordinateSystem.getXByYT(n[0][1],e),n[0][0]<0&&(n[0][1]=t.coordinateSystem.getYByXT(n[0][0]=0,e)),n[1][0]=t.coordinateSystem.width,n[1][1]=t.coordinateSystem.getYByXT(n[1][0],e),void 0===n[1][1]?(n[1][0]=n[0][0],n[1][1]=t.coordinateSystem.height):n[1][1]>t.coordinateSystem.height&&(n[1][1]=t.coordinateSystem.height,n[1][0]=t.coordinateSystem.getXByYT(n[1][1],e))),n}),e)}},{key:"plotDryadiabats",value:function(e){var t=this;this._plotLines(this.svgGroups.dryadiabats,this.options.dryadiabats,{min:m(r(this.coordinateSystem.getTByXY(0,0),this.coordinateSystem.getPByXY(0,0))),max:m(r(this.coordinateSystem.getTByXY(this.coordinateSystem.width,this.coordinateSystem.height),this.coordinateSystem.getPByXY(this.coordinateSystem.width,this.coordinateSystem.height))),interval:10},(function(e){var n=y(e),i=0,o=t.coordinateSystem.getXByYPotentialTemperature(i,n);(void 0===o||o>t.coordinateSystem.width)&&(o=t.coordinateSystem.width,i=t.coordinateSystem.getYByXPotentialTemperature(o,n));var r=0,a=t.coordinateSystem.getYByXPotentialTemperature(r,n);if((void 0===a||a>t.coordinateSystem.height)&&(a=t.coordinateSystem.height,r=t.coordinateSystem.getXByYPotentialTemperature(a,n)),void 0!==o&&void 0!==i&&void 0!==r&&void 0!==a){if(t.coordinateSystem.isDryAdiabatStraightLine())return[[o,i],[r,a]];for(var s=[[o,i]],l=i+10;l<a;l+=10)s.push([t.coordinateSystem.getXByYPotentialTemperature(l,n),l]);return s.push([r,a]),s}}),e)}},{key:"plotPseudoadiabats",value:function(e){var t=this;this._plotLines(this.svgGroups.pseudoadiabats,this.options.pseudoadiabats,{lines:[-18,-5,10,30,60,110,180]},(function(e){for(var n=y(e),i=Math.max(0,void 0===t.options.pseudoadiabats.maxPressure?0:t.coordinateSystem.getYByPEquiPotTemp(t.options.pseudoadiabats.maxPressure,n)),o=t.coordinateSystem.getXByYEquiPotTemp(i,n),r=Math.min(t.coordinateSystem.height,void 0===t.options.pseudoadiabats.minPressure?t.coordinateSystem.height:t.coordinateSystem.getYByPEquiPotTemp(t.options.pseudoadiabats.minPressure,n)),a=t.coordinateSystem.getXByYEquiPotTemp(r,n),s=[[o,i]],l=i+10;l<r;l+=10)s.push([t.coordinateSystem.getXByYEquiPotTemp(l,n),l]);return s.push([a,r]),s}),e)}},{key:"plotMixingratio",value:function(e){var t=this;this._plotLines(this.svgGroups.mixingratio,this.options.mixingratio,{lines:[.01,.1,1,2,4,7,10,16,21,32,40]},(function(e){for(var n=Math.max(0,void 0===t.options.mixingratio.maxPressure?0:t.coordinateSystem.getYByPHMR(t.options.mixingratio.maxPressure,e)),i=t.coordinateSystem.getXByYHMR(n,e),o=Math.min(t.coordinateSystem.height,void 0===t.options.mixingratio.minPressure?t.coordinateSystem.height:t.coordinateSystem.getYByPHMR(t.options.mixingratio.minPressure,e)),r=t.coordinateSystem.getXByYHMR(o,e),a=[[i,n]],s=n+10;s<o;s+=10)a.push([t.coordinateSystem.getXByYHMR(s,e),s]);return a.push([r,o]),a}),e)}},{key:"_plotLines",value:function(e,t,n,i,o){if(t.visible?e.show():e.hide(),o){e.clear();var r=[];if(void 0!==t.lines)r=t.lines;else if(void 0===t.min&&void 0===t.max&&void 0===t.interval&&void 0!==n.lines)r=n.lines;else{void 0!==t.min&&(n.min=t.min),void 0!==t.max&&(n.max=t.max);var a=t.interval;void 0===a&&(a=n.interval);for(var s=Math.ceil(n.min/a)*a,l=Math.floor(n.max/a)*a,u=s;u<=l;u+=a)r.push(u)}var c=3;void 0!==t.style.width&&(c=t.style.width+2),r.forEach((function(n){var o=i.call(this,n),r=2==o.length?e.line(o[0][0],this.coordinateSystem.height-o[0][1],o[1][0],this.coordinateSystem.height-o[1][1]).stroke(t.style):e.polyline(o.map((function(e){return e[1]=this.coordinateSystem.height-e[1],e}),this)).fill("none").stroke(t.style);void 0!==t.highlightedLines&&t.highlightedLines.forEach((function(e){n==e&&r.stroke({width:c})}),this)}),this)}}},{key:"getExtendedEvent",value:function(e,t){return(e=js(Ns(l.prototype),"getExtendedEvent",this).call(this,e,t)).diagramTmpk=this.coordinateSystem.getTByXY(e.elementX,this.coordinateSystem.height-e.elementY),e}},{key:"_initHoverLabels",value:function(e){var t=e.visible,n=void 0===t||t,i=e.type,o=void 0===i?"mousemove":i,r=e.snapToData,a=void 0===r||r,s=e.remote,u=void 0===s||s,c=e.insertLabelsFunc,f=void 0===c?void 0:c,d=e.pres,h=void 0===d?{}:d,p=e.temp,v=void 0===p?{}:p,y=e.dewp,m=void 0===y?{}:y,b=e.wetbulb,g=void 0===b?{}:b;h.length="length"in h?h.length:60,h.align="align"in h?h.align:"left","visible"in h||(h.visible=!0),"style"in h||(h.style={}),h.font=Fr(h.font,{anchor:"right"==h.align?"end":"start"}),"fill"in h||(h.fill={}),void 0===h.fill.opacity&&(h.fill.opacity=.7),void 0===h.horizontalMargin&&(h.horizontalMargin=5),"visible"in v||(v.visible=!0),"style"in v||(v.style={}),v.font=Fr(v.font,{anchor:"start","alignment-baseline":"bottom"}),"fill"in v||(v.fill={}),void 0===v.fill.opacity&&(v.fill.opacity=.7),v.radius="radius"in v?v.radius:void 0,v.radiusPlus="radiusPlus"in v?v.radiusPlus:2,void 0===v.horizontalMargin&&(v.horizontalMargin=10),"visible"in m||(m.visible=!0),"style"in m||(m.style={}),m.font=Fr(m.font,{anchor:"end","alignment-baseline":"bottom"}),"fill"in m||(m.fill={}),void 0===m.fill.opacity&&(m.fill.opacity=.7),m.radius="radius"in m?m.radius:void 0,m.radiusPlus="radiusPlus"in m?m.radiusPlus:2,void 0===m.horizontalMargin&&(m.horizontalMargin=10),"visible"in g||(g.visible=!0),"style"in g||(g.style={}),g.font=Fr(g.font,{anchor:"middle"}),"fill"in g||(g.fill={}),void 0===g.fill.opacity&&(g.fill.opacity=.7),g.radius="radius"in g?g.radius:void 0,g.radiusPlus="radiusPlus"in g?g.radiusPlus:2,void 0===g.verticalMargin&&(g.verticalMargin=10),void 0===f&&(f=this._makeInsertLabelsFunc(h,v,m,g)),js(Ns(l.prototype),"_initHoverLabels",this).call(this,{visible:n,type:o,snapToData:a,remote:u,insertLabelsFunc:f})}},{key:"_makeInsertLabelsFunc",value:function(e,n,i,o){var r=this;return function(a,s,l){l.clear(),void 0!==s.pres&&(e.visible&&function(e,n,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=o.length,a=void 0===r?60:r,s=o.align,l=void 0===s?"left":s,u=o.horizontalMargin,c=void 0===u?void 0:u,f=o.verticalMargin,d=void 0===f?void 0:f,h=o.style,p=void 0===h?{}:h,v=o.font,y=void 0===v?{}:v,m=o.fill,b=void 0===m?{}:m,g=0,w=a,_=/^([0-9]+)%$/.exec(w);_&&(w=_[1]/100*i.width),"right"==l&&(g=i.width,w=i.width-w);var O=i.height-i.getYByXP(0,n.pres);p=Yr(p),e.line([[Math.min(g,w),O],[Math.max(g,w),O]]).stroke(p),(y=Fr(y))["alignment-baseline"]="bottom",Hr({node:e,text:"".concat(Math.round(n.pres)," hPa"),x:g,y:O,horizontalMargin:c,verticalMargin:d,font:y,fill:b}),y["alignment-baseline"]="top";var S=void 0===n.hght?"~".concat(Math.round(t(n.pres))," m"):"".concat(Math.round(n.hght)," m");Hr({node:e,text:S,x:g,y:O,horizontalMargin:c,verticalMargin:d,font:y,fill:b})}(l,s,r.coordinateSystem,e),r.dataGroupIds.reverse().forEach((function(e){var t={visible:!1};switch(e){case"temp":t=n;break;case"dewp":t=i;break;case"wetbulb":t=o}if(t.visible){var u=r._getCoordinatesByLevelData(e,a,s,r),c=u.x,f=u.y,d=u.value,h=u.unit;if(void 0!==c&&void 0!==f){var p=e in r.hoverLabelsSounding.options.diagram?r.hoverLabelsSounding.options.diagram[e].style.width:3,v=void 0===t.radius?p+t.radiusPlus:t.radius,y=t.style;!("color"in y)&&e in r.hoverLabelsSounding.options.diagram&&(y.color=a.options.diagram[e].style.color),l.circle(2*v).attr({cx:c,cy:f}).fill(y),Hr({node:l,text:"".concat(d," ").concat(h),x:c,y:f,horizontalMargin:t.horizontalMargin,verticalMargin:t.verticalMargin,font:t.font,fill:t.fill})}}})))}}}])&&Rs(n.prototype,i),l}(Ss);function Is(e){var t=e.highlightedLines,n=void 0===t?void 0:t,i=e.interval,o=void 0===i?void 0:i,r=e.lines,a=void 0===r?void 0:r,s=e.max,l=void 0===s?void 0:s,u=e.min,c=void 0===u?void 0:u,f=e.maxPressure,d=void 0===f?void 0:f,h=e.minPressure,p=void 0===h?void 0:h,v=e.style,y=void 0===v?void 0:v,m=e.visible,b=void 0===m?void 0:m,g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{highlightedLines:qr(n,g.highlightedLines),interval:qr(o,g.interval),lines:qr(a,g.lines),max:qr(l,g.max),min:qr(c,g.min),maxPressure:qr(d,g.maxPressure),minPressure:qr(p,g.minPressure),style:Yr(y,g.style),visible:qr(b,g.visible,!0)}}function Ds(e){return(Ds="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)}function As(e,t){return(As=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ls(e,t){return!t||"object"!==Ds(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ms(e){return(Ms=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const Vs=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&As(e,t)}(o,e);var t,n,i=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,i=Ms(t);if(n){var o=Ms(this).constructor;e=Reflect.construct(i,arguments,o)}else e=i.apply(this,arguments);return Ls(this,e)});function o(e){var t,n=e.svgNode,r=void 0===n?void 0:n,a=e.coordinateSystem,s=void 0===a?void 0:a,l=e.x,u=void 0===l?void 0:l,c=e.y,f=void 0===c?void 0:c,d=e.width,h=void 0===d?void 0:d,p=e.height,v=void 0===p?void 0:p,y=e.style,m=void 0===y?{}:y,b=e.visible,g=void 0===b||b,w=e.events,_=void 0===w?{}:w,O=e.hoverLabels,S=void 0===O?{}:O,T=e.windbarbLength,k=void 0===T?void 0:T,P=e.dataGroupIds,x=void 0===P?["windbarbs"]:P,R=e.getCoordinatesByLevelData,j=void 0===R?function(e,t,n,i){return void 0===n.pres||void 0===n.wspd||void 0===n.wdir?{}:{x:i.width/2,y:i.coordinateSystem.height-i.coordinateSystem.getYByXP(0,n.pres)}}:R,E=e.insertDataGroupInto,C=void 0===E?function(e,t,n,i,o){i.forEach((function(t){Kr({node:e,x:o.width/2,y:t.y,wspd:t.levelData.wspd,wdir:t.levelData.wdir,length:o._windbarbLength,strokeStyle:n.options.windprofile.windbarbs.style})}))}:E,N=e.filterDataPoint,B=void 0===N?void 0:N,I=e.minDataPointsDistance,D=void 0===I?void 0:I;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,{svgNode:r,coordinateSystem:s,x:u,y:f,width:h,height:v,style:m,visible:g,events:_,hoverLabels:S,getSoundingVisibility:function(e){return e.visible&&e.options.windprofile.windbarbs.visible},dataGroupIds:x,getCoordinatesByLevelData:j,insertDataGroupInto:C,filterDataPoint:B,minDataPointsDistance:void 0===D?0:D}))._windbarbLength=k,void 0===t._windbarbLength&&(t._windbarbLength=2*t.width/5),void 0===D&&(t.minDataPointsDistance=t._windbarbLength/2),t.init(),t}return o}(Ss);function Gs(e){return(Gs="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)}function Ys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Fs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xs(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function zs(e,t,n){return(zs="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ks(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function qs(e,t){return(qs=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Hs(e,t){return!t||"object"!==Gs(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ks(e){return(Ks=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const Us=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&qs(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ks(i);if(o){var n=Ks(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Hs(this,e)});function a(e){var t,n=e.svgNode,i=void 0===n?void 0:n,o=e.coordinateSystem,s=void 0===o?void 0:o,l=e.x,u=void 0===l?void 0:l,c=e.y,f=void 0===c?void 0:c,d=e.width,h=void 0===d?void 0:d,p=e.height,v=void 0===p?void 0:p,y=e.style,m=void 0===y?{}:y,b=e.visible,g=void 0===b||b,w=e.events,O=void 0===w?{}:w,S=e.hoverLabels,T=void 0===S?{}:S,k=e.windspeedMax,P=void 0===k?_(150):k,x=e.dataGroupIds,R=void 0===x?["windspeed"]:x,j=e.getCoordinatesByLevelData,E=void 0===j?function(e,t,n,i){return void 0===n.pres||void 0===n.wspd?{}:{x:i.width*n.wspd/P,y:i.coordinateSystem.height-i.coordinateSystem.getYByXP(0,n.pres)}}:j,C=e.insertDataGroupInto,N=void 0===C?function(e,t,n,i){e.polyline(i.map((function(e){return[e.x,e.y]}))).fill("none").stroke(n.options.windprofile.windspeed.style)}:C,B=e.filterDataPoint,I=void 0===B?void 0:B,D=e.minDataPointsDistance,A=void 0===D?0:D;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=r.call(this,{svgNode:i,coordinateSystem:s,x:u,y:f,width:h,height:v,style:m,visible:g,events:O,hoverLabels:T,getSoundingVisibility:function(e){return e.visible&&e.options.windprofile.windspeed.visible},dataGroupIds:R,getCoordinatesByLevelData:E,insertDataGroupInto:N,filterDataPoint:I,minDataPointsDistance:A})).init(),t}return t=a,(n=[{key:"_drawBackground",value:function(e){zs(Ks(a.prototype),"_drawBackground",this).call(this,e),e.line(0,0,0,this.height).stroke({color:"black",width:1}),e.line(this.width,0,this.width,this.height).stroke({color:"black",width:1})}},{key:"_initHoverLabels",value:function(e){var t=e.visible,n=void 0===t||t,i=e.type,o=void 0===i?"mousemove":i,r=e.snapToData,s=void 0===r||r,l=e.remote,u=void 0===l||l,c=e.insertLabelsFunc,f=void 0===c?void 0:c,d=e.windspeed,h=void 0===d?{}:d;"visible"in h||(h.visible=!0),"style"in h||(h.style={}),h.font=Fr(h.font,{anchor:"end","alignment-baseline":"bottom"}),"fill"in h||(h.fill={}),void 0===h.fill.opacity&&(h.fill.opacity=.7),h.radius="radius"in h?h.radius:void 0,h.radiusPlus="radiusPlus"in h?h.radiusPlus:2,void 0===h.horizontalMargin&&(h.horizontalMargin=10),void 0===f&&(f=this._makeInsertLabelsFunc(h)),zs(Ks(a.prototype),"_initHoverLabels",this).call(this,{visible:n,type:o,snapToData:s,remote:u,insertLabelsFunc:f})}},{key:"_makeInsertLabelsFunc",value:function(e){var t=this;return function(n,i,o){if(o.clear(),void 0!==i.pres&&e.visible&&void 0!==i.wspd){var r=t._getCoordinatesByLevelData("windspeed",n,i,t),a=r.x,s=r.y;if(void 0!==a&&void 0!==s){var l=void 0===e.radius?t.hoverLabelsSounding.options.windprofile.windspeed.style.width/2+e.radiusPlus:e.radius,u=e.style;"color"in u||(u.color=n.options.windprofile.windspeed.style.color);var c=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ys(Object(n),!0).forEach((function(t){Fs(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ys(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.font);"start"==c.anchor&&t.width-a<45&&(c.anchor="end"),"end"==c.anchor&&a<45&&(c.anchor="start"),"bottom"==c["alignment-baseline"]&&s<5*c.size/4&&(c["alignment-baseline"]="top"),"top"==c["alignment-baseline"]&&t.height-s<5*c.size/4&&(c["alignment-baseline"]="bottom"),o.circle(2*l).attr({cx:a,cy:s}).fill(u),Hr({node:o,text:"".concat(Math.round(10*w(i.wspd))/10," kn"),x:a,y:s,horizontalMargin:e.horizontalMargin,verticalMargin:e.verticalMargin,font:c,fill:e.fill})}}}}}])&&Xs(t.prototype,n),a}(Ss);function $s(e){return($s="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)}function Zs(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Ws(e,t,n){return(Ws="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=el(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function Js(e,t){return(Js=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qs(e,t){return!t||"object"!==$s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function el(e){return(el=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const tl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Js(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=el(i);if(o){var n=el(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Qs(this,e)});function a(e){var t,n=e.svgNode,i=void 0===n?void 0:n,o=e.coordinateSystem,s=e.x,l=e.y,u=e.width,c=e.height,f=e.style,d=void 0===f?{}:f,h=e.visible,p=void 0===h||h,v=e.events,y=void 0===v?{}:v,m=e.dataGroupIds,b=void 0===m?["windbarbs"]:m,g=e.getCoordinatesByLevelData,w=void 0===g?function(e,t,n,i){if(void 0===n.wspd||void 0===n.wdir)return{};var o=n.wspd*-Math.sin(n.wdir/180*Math.PI),r=n.wspd*Math.cos(n.wdir/180*Math.PI);return{x:i.center[0]+o*i.pixelPerSpeed,y:i.center[1]+r*i.pixelPerSpeed}}:g,O=e.insertDataGroupInto,S=void 0===O?function(e,t,n,i){e.polyline(i.map((function(e){return[e.x,e.y]}))).fill("none").stroke(n.options.hodograph.style)}:O,T=e.grid,k=void 0===T?{}:T,P=e.windspeedMax,x=void 0===P?_(150):P,R=e.origin,j=void 0===R?void 0:R,E=e.filterDataPoint,C=void 0===E?void 0:E,N=e.minDataPointsDistance,B=void 0===N?0:N;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=r.call(this,{svgNode:i,coordinateSystem:o,x:s,y:l,width:u,height:c,style:d,visible:p,events:y,dataGroupIds:b,getCoordinatesByLevelData:w,insertDataGroupInto:S,getSoundingVisibility:function(e){return e.visible&&e.options.hodograph.visible},filterDataPoint:C,minDataPointsDistance:B}))._gridOptions=t.getNormalizedGridOptions(k),t.center=[t.width/2,t.height/2],void 0!==j&&(t.center[0]-=j[0]*t.minLength/2,t.center[1]+=j[1]*t.minLength/2),t.pixelPerSpeed=Math.min(Math.max(t.width-t.center[0],t.center[0]),Math.max(t.height-t.center[1],t.center[1]))/x,void 0===t._gridOptions.max&&(t._gridOptions.max=x),t.init(),t}return t=a,(n=[{key:"_drawBackground",value:function(e){if(Ws(el(a.prototype),"_drawBackground",this).call(this,e),e.rect(this.width-2,this.height-2).move(1,1).fill({color:"white"}).stroke({color:"black",width:1}),this._gridOptions.axes.visible){var t=this._gridOptions.max+this._gridOptions.circles.interval/2;e.line(Math.max(0,this.center[0]-t*this.pixelPerSpeed),this.center[1],Math.min(this.width,this.center[0]+t*this.pixelPerSpeed),this.center[1]).stroke(this._gridOptions.axes.style),e.line(this.center[0],Math.max(0,this.center[1]-t*this.pixelPerSpeed),this.center[0],Math.min(this.height,this.center[1]+t*this.pixelPerSpeed)).stroke(this._gridOptions.axes.style)}for(var n=this._gridOptions.circles.interval;n<=this._gridOptions.max;n+=this._gridOptions.circles.interval){var i=n*this.pixelPerSpeed;if(e.circle(2*i).attr({cx:this.center[0],cy:this.center[1]}).fill("none").stroke(this._gridOptions.circles.style),this._gridOptions.labels.visible){var o=i*Math.cos((this._gridOptions.labels.angle-90)/180*Math.PI),r=i*Math.sin((this._gridOptions.labels.angle-90)/180*Math.PI),s="middle",l=0,u=-this._gridOptions.labels.font.size;0==this._gridOptions.labels.angle||180==this._gridOptions.labels.angle?(l=-3,s="end"):90!=this._gridOptions.labels.angle&&270!=this._gridOptions.labels.angle||(u=-3);var c=e.plain(""+Math.round(b(n))).move(this.center[0]+o,this.center[1]+r).attr({"text-anchor":s,dx:l,dy:u}).font(this._gridOptions.labels.font),f=c.bbox();c.before(e.rect(f.width,f.height).move(f.x,f.y).fill("white"))}}}},{key:"getNormalizedGridOptions",value:function(e){var t=e.axes,n=void 0===t?{}:t,i=e.circles,o=void 0===i?{}:i,r=e.labels,a=void 0===r?{}:r,s=e.max,l=void 0===s?void 0:s;return n=Xr(n),"interval"in(o=Xr(o))&&void 0!==o.interval||(o.interval=g(50)),"angle"in(a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.visible,n=void 0===t||t,i=e.font,o=void 0===i?{}:i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{visible:qr(n,r.visible,!0),font:Fr(o,r.font)}}(a))&&void 0!==a.angle||(a.angle=225),void 0===a.font.size&&(a.font.size=10),{axes:n,circles:o,labels:a,max:l}}}])&&Zs(t.prototype,n),a}(ps);function nl(e){return(nl="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)}function il(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function rl(e,t,n){return(rl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ll(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function al(e,t){return(al=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sl(e,t){return!t||"object"!==nl(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ll(e){return(ll=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ul=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&al(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ll(i);if(o){var n=ll(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return sl(this,e)});function a(e){var t,n,i,o,s,l=e.svgNode,u=void 0===l?void 0:l,c=e.coordinateSystem,f=e.x,d=e.y,h=e.width,p=e.height,v=e.style,y=void 0===v?{}:v,m=e.visible,b=void 0===m||m,g=e.events,w=void 0===g?{}:g,_=e.labels,O=void 0===_?{}:_,S=e.title,T=void 0===S?{}:S;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),void 0===y.overflow&&(y.overflow="visible"),(t=r.call(this,{svgNode:u,coordinateSystem:c,x:f,y:d,width:h,height:p,style:y,visible:b,events:w}))._labelsOptions=((s={enabled:void 0===(i=(n=O).enabled)||i,style:void 0===(o=n.style)?{}:o}).style=Yr(s.style),s),t._titleOptions=function(e){var t=e.align,n=void 0===t?"middle":t,i=e.style,o=void 0===i?{}:i,r=e.text,a={align:n,style:o,text:void 0===r?void 0:r};return a.style=Yr(a.style),a}(T),t.init(),t}return t=a,(n=[{key:"_drawBackground",value:function(e){if(rl(ll(a.prototype),"_drawBackground",this).call(this,e),this._labelsOptions.enabled)for(var t=e.group(),n=50*Math.ceil(this.coordinateSystem.getPByXY(0,this.height)/50),i=50*Math.floor(this.coordinateSystem.getPByXY(0,0)/50),o=n;o<=i;o+=50){var r=this.height-this.coordinateSystem.getYByXP(0,o);t.plain(o).attr({y:r+3.3,x:this.width}).font({size:"11px",anchor:"end"}).attr({fill:this._labelsOptions.style.color})}void 0!==this._titleOptions.text&&e.group().plain(this._titleOptions.text).attr({x:12*.4,y:this.height/2,fill:this._titleOptions.style.color}).font({size:12,anchor:"middle"}).rotate(-90)}}])&&il(t.prototype,n),a}(is);const cl=ul;function fl(e){return(fl="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)}function dl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hl(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function pl(e,t){return(pl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vl(e,t){return!t||"object"!==fl(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function yl(e){return(yl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ml=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&pl(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=yl(i);if(o){var n=yl(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return vl(this,e)});function a(){return dl(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"_drawBackground",value:function(e){if(e.clear(),this._labelsOptions.enabled)for(var t=e.group(),n=10*Math.ceil(m(this.coordinateSystem.getTByXY(0,0))/10),i=10*Math.floor(m(this.coordinateSystem.getTByXY(this.width,0))/10),o=n;o<=i;o+=10){var r=y(o);t.plain(Math.round(m(r))).attr({x:this.coordinateSystem.getXByYT(0,r),y:10,fill:this._labelsOptions.style.color}).font({size:"10px",anchor:"middle"})}void 0!==this._titleOptions.text&&e.group().plain(this._titleOptions.text).attr({x:this.width/2,y:this.height-12*.3,fill:this._titleOptions.style.color}).font({size:12,anchor:"middle"})}}])&&hl(t.prototype,n),a}(cl);const bl=ml;function gl(e){return(gl="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 wl=["svgNode","coordinateSystem","x","y","width","height","style","visible","events","hoverLabels"];function _l(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Ol(e,t){return(Ol=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Sl(e,t){return!t||"object"!==gl(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Tl(e){return(Tl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const kl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ol(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Tl(i);if(o){var n=Tl(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Sl(this,e)});function a(e){var t,n=e.renderTo,i=void 0===n?void 0:n,o=e.width,s=void 0===o?void 0:o,l=e.height,u=void 0===l?void 0:l,c=e.coordinateSystem,f=void 0===c?{}:c,d=e.diagram,h=void 0===d?{}:d,p=e.windbarbsProfile,v=void 0===p?{}:p,y=e.windspeedProfile,m=void 0===y?{}:y,b=e.hodograph,g=void 0===b?{}:b,w=e.xAxis,_=void 0===w?{}:w,O=e.yAxis,S=void 0===O?{}:O;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),t=r.call(this,{renderTo:i,width:s,height:u}),h=Pl(h),v=Pl(v),m=Pl(m),g=Pl(g),_=Pl(_),S=Pl(S);var T=.05*t.svgNode.width();return void 0===_.width&&void 0===h.width&&void 0===v.width&&void 0===m.width?(S.width=.1*(t.svgNode.width()-2*T),h.width=.7*(t.svgNode.width()-2*T),v.width=.2*(t.svgNode.width()-2*T)*1/3,m.width=.2*(t.svgNode.width()-2*T)*2/3):void 0===h.width?h.width=t.svgNode.width()-2*T-v.width-m.width:void 0===v.width&&void 0===m.width&&(v.width=1*(t.svgNode.width()-2*T-h.width)/3,m.width=2*(t.svgNode.width()-2*T-h.width)/3),void 0===S.x&&void 0===h.x&&void 0===v.x&&void 0===m.x?(S.x=T,h.x=S.x+S.width,v.x=h.x+h.width,m.x=v.x+v.width):void 0===h.x?h.x=v.x-v.width:void 0===v.x&&void 0===m.x&&(v.x=h.x+h.width,m.x=v.x+v.width),void 0===_.height&&(_.height=.06*t.svgNode.height()),void 0===h.height&&(h.height=t.svgNode.height()-_.height-2*T),void 0===S.height&&(S.height=h.height),void 0===v.height&&(v.height=h.height),void 0===m.height&&(m.height=h.height),void 0===h.y&&(h.y=T),void 0===S.y&&(S.y=h.y),void 0===v.y&&(v.y=h.y),void 0===m.y&&(m.y=h.y),void 0===_.width&&(_.width=h.width),void 0===_.x&&(_.x=h.x),void 0===_.y&&(_.y=h.y+h.height),void 0===_.height&&(_.height=T),void 0===g.x&&(g.x=h.x),void 0===g.y&&(g.y=h.y),void 0===g.width&&(g.width=.4*Math.min(h.width,h.height)),void 0===g.height&&(g.height=g.width),t.diagram=new Bs(h),t.appendPlotArea(t.diagram),t.yAxis=new ul(S),t.appendPlotArea(t.yAxis),t.xAxis=new ml(_),t.appendPlotArea(t.xAxis),t.windbarbsProfile=new Vs(v),t.appendPlotArea(t.windbarbsProfile),t.windspeedProfile=new Us(m),t.appendPlotArea(t.windspeedProfile),t.hodograph=new tl(g),t.appendPlotArea(t.hodograph),void 0===f.type&&(f.type="skewTlogP"),f.width=h.width,f.height=h.height,t._coordinateSystem,t.coordinateSystem="stueve"==f.type?new Ya(f):"emagram"==f.type?new Ka(f):new Qa(f),t}return t=a,(n=[{key:"coordinateSystem",get:function(){return this._coordinateSystem},set:function(e){this._coordinateSystem=e,this.exchangeCoordinateSystem(this._coordinateSystem)}},{key:"getDiagramPlotArea",value:function(){return this.diagram}}])&&_l(t.prototype,n),a}(ja);function Pl(e){var t=e.svgNode,n=void 0===t?void 0:t,i=e.coordinateSystem,o=void 0===i?void 0:i,r=e.x,a=void 0===r?void 0:r,s=e.y,l=void 0===s?void 0:s,u=e.width,c=void 0===u?void 0:u,f=e.height,d=void 0===f?void 0:f,h=e.style,p=void 0===h?{}:h,v=e.visible,y=void 0===v||v,m=e.events,b=void 0===m?{}:m,g=e.hoverLabels,w=void 0===g?{}:g,_=function(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n,i,o={},r=Object.keys(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,wl);return _.svgNode=n,_.coordinateSystem=o,_.x=a,_.y=l,_.width=c,_.height=d,_.style=p,_.visible=y,_.events=b,_.hoverLabels=w,_}function xl(e){return(xl="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)}function Rl(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function jl(e,t){return(jl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function El(e,t){return!t||"object"!==xl(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Cl(e){return(Cl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Nl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jl(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Cl(i);if(o){var n=Cl(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return El(this,e)});function a(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(e=r.call(this)).imgNode=void 0,e.thermodynamicDiagram=void 0,e.resourceNode=void 0,e}return t=a,(n=[{key:"onInit",value:function(){void 0!==this.parentNode&&(this.resourceNode=$()(this.parentNode),this.resourceNode.empty())}},{key:"onChangeVisibleResource",value:function(){if(void 0!==this.resourceNode){var e=this.container.visibleResource;if("url"in e)void 0!==this.thermodynamicDiagram&&(this.thermodynamicDiagram=void 0,this.resourceNode.empty()),void 0===this.imgNode&&(this.resourceNode.empty(),this.imgNode=$()("<img>"),this.resourceNode.append(this.imgNode)),this.imgNode.attr("src",e.url),this.imgNode.css({"max-width":"100%"});else if("sounding"in e){void 0!==this.imgNode&&(this.imgNode=void 0,this.resourceNode.empty()),void 0===this.thermodynamicDiagram&&(this.thermodynamicDiagram=new kl({renderTo:this.resourceNode}));var t=!1;this.thermodynamicDiagram.soundings.forEach((function(n){n.getSounding()===e.sounding?(t=!0,n.visible(!0)):n.visible(!1)})),t||this.thermodynamicDiagram.addSounding(e.sounding)}else this.imgNode=void 0,this.resourceNode.empty()}}}])&&Rl(t.prototype,n),a}(Or);function Bl(e){return(Bl="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)}function Il(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Dl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Al(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Ll(e,t,n){return(Ll="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Gl(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function Ml(e,t){return(Ml=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Vl(e,t){return!t||"object"!==Bl(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Gl(e){return(Gl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Yl={addEventFunctions:B},Fl={Animation:Q,Visualisation:ue,makeTimeTextCallbackFunction:function(e){return function(t,n){var i=e.utc(t);return void 0!==this.options.outputTimezone&&("local"==this.options.outputTimezone?i.local():i.tz(this.options.outputTimezone)),i.format(n)}},animation:{ToggleButton:function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};re(this,e);var i=n.animation,o=void 0===i?void 0:i,r=n.node,a=void 0===r?void 0:r,s=n.startedContent,l=void 0===s?void 0:s,u=n.startedClass,c=void 0===u?void 0:u,f=n.stoppedContent,d=void 0===f?void 0:f,h=n.stoppedClass,p=void 0===h?void 0:h,v=n.classButton,y=void 0===v?void 0:v,m=n.classDropdownToggle,b=void 0===m?void 0:m,g=n.menu,w=void 0===g||g,_=n.menuImageFrequency,O=void 0===_||_,S=n.imageFrequencyCaption,T=void 0===S?"Frequency":S,k=n.menuFrequencies,P=void 0===k?void 0:k,x=n.menuRestartPause,R=void 0===x||x,j=n.restartPauseCaption,E=void 0===j?"Restart pause":j;"startedContent"in n||(l=$()(oe)),"stoppedContent"in n||(d=$()(ie)),this.options={animation:o,node:a,startedContent:l,startedClass:c,stoppedContent:d,stoppedClass:p,classButton:y,classDropdownToggle:b,menu:w,menuImageFrequency:O,imageFrequencyCaption:T,menuFrequencies:P,menuRestartPause:R,restartPauseCaption:E},this.options.node=$()(this.options.node);var C=this.options.node;this.options.node.is("button")||(C=$()("<button>").addClass("btn"),this.options.node.append(C)),C.addClass(this.options.classButton);var N=function(){C.removeClass(t.options.stoppedClass),C.addClass(t.options.startedClass),C.empty(),"string"==typeof t.options.startedContent||t.options.startedContent instanceof String?C.text(t.options.startedContent):C.append(t.options.startedContent)},B=function(){C.removeClass(t.options.startedClass),C.addClass(t.options.stoppedClass),C.empty(),"string"==typeof t.options.stoppedContent||t.options.stoppedContent instanceof String?C.text(t.options.stoppedContent):C.append(t.options.stoppedContent)};if(this.options.animation.on("start:animation",N),this.options.animation.on("stop:animation",B),C.click((function(){return t.options.animation.toggle()})),this.options.animation.isStarted()?N():B(),!this.options.node.is("button")&&this.options.menu){this.options.node.addClass("btn-group");var I=$()("<button>").attr("type","button").addClass("btn dropdown-toggle dropdown-toggle-split").addClass(this.options.classDropdownToggle).attr("data-bs-toggle","dropdown").attr("aria-expanded",!1);I.append($()("<span>").addClass("visually-hidden").text("Toggle Dropdown")),this.options.node.append(I);var D=$()("<div>").addClass("dropdown-menu");this.options.node.append(D);var A=$()("<form>").addClass("px-4 py-3");if((this.options.menuImageFrequency||this.options.menuRestartPause)&&D.append(A),this.options.menuImageFrequency){var L=$()("<label>").addClass("form-label").text(this.options.imageFrequencyCaption),M=$()("<div>").append(L);this.options.menuRestartPause&&M.addClass("mb-3"),A.append(M),ee(M,{animation:this.options.animation}),void 0!==this.options.menuFrequencies&&te(M,{animation:this.options.animation,frequencies:this.options.menuFrequencies})}if(this.options.menuRestartPause){var V=$()("<label>").addClass("form-label").text(this.options.restartPauseCaption),G=$()("<div>").append(V);A.append(G),ne(G,{animation:this.options.animation})}}},insertFrequencyInput:ee,insertFrequencyRange:te,insertFrequencyButtonGroup:function(e,t){var n=t.animation,i=t.frequencies,o=t.btnGroupClass,r=void 0===o?"btn-group":o,a=t.btnClass,s=void 0===a?"btn btn-primary":a,l=t.suffix,u=void 0===l?"fps":l,c=$()("<div>").addClass(r);(i=i||[]).forEach((function(e){c.append($()("<button>").addClass(s).data("frequency",e).text(e+" "+u).click((function(){return n.setImageFrequency(e)})))}));var f=function(){c.children("button").removeClass("active").each((function(){$()(this).data("frequency")==n.getImageFrequency()&&$()(this).addClass("active")}))};return n.on("change:imageFrequency",f),f(),e.append(c),c},insertRestartPauseInput:ne,insertRestartPauseRange:function(e,t){var n=t.animation,i=t.pauses;i=(i=i||[1]).map((function(e){return Math.round(1e3*e)}));var o=$()("<input>").addClass("form-range").attr("type","range").attr("min",0).attr("max",i.length-1);o.on("change input",(function(){var e=o.val();e<i.length&&n.setRestartPause(i[e]/1e3)}));var r=function(){var e=i.indexOf(Math.round(1e3*n.getRestartPause()));e>-1&&o.val(e)};return n.on("change:imageFrequency",r),r(),e.append(o),o},insertRestartPauseButtonGroup:function(e,t){var n=t.animation,i=t.pauses,o=t.btnGroupClass,r=void 0===o?"btn-group":o,a=t.btnClass,s=void 0===a?"btn btn-primary":a,l=t.suffix,u=void 0===l?"s":l,c=$()("<div>").addClass(r);(i=i||[]).forEach((function(e){c.append($()("<button>").addClass(s).data("pause",e).text(e+" "+u).click((function(){return n.setRestartPause(e)})))}));var f=function(){c.children("button").removeClass("active").each((function(){$()(this).data("pause")==n.getRestartPause()&&$()(this).addClass("active")}))};return n.on("change:restartPause",f),f(),e.append(c),c}},visualisation:{Text:be,Slider:Te,bsButtons:Be,bsDropdown:Xe}},Xl={Collection:$e,Map:He,map:{MapOL:Lt,MapLL:Xt},Resource:ot,resource:{GeoJSON:an,GeoJSONTile:On,Image:Bn,OSM:zn,Vector:en,VectorTile:mn},ResourceCollection:ft,Tooltip:St,Type:vt,TypeCollection:Ot},zl={BootstrapTooltip:ti},ql={Variable:Fi,TimeVariable:$i,VariableCollection:uo,Node:So,Resource:Ro,resource:{Image:Do,Sounding:Qo},Resources:sr,NWPResources:vr,Container:Ar,Display:Or,display:{Simple:Nl,SelectNavigation:function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ml(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Gl(i);if(o){var n=Gl(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Vl(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.ignoreVariableCollections,i=void 0===n?[]:n,o=t.selectCaption,s=void 0!==o&&o,l=t.navigationClass,u=void 0===l?void 0:l,c=t.selectDivClass,f=void 0===c?void 0:c,d=t.selectClass,h=void 0===d?void 0:d;return Dl(this,a),(e=r.call(this)).options={ignoreVariableCollections:new Set(i),selectCaption:s,navigationClass:u,selectDivClass:f,selectClass:h},e.navigationNode=void 0,e.selectNodes=new Map,e}return t=a,(n=[{key:"onInit",value:function(){var e=this;void 0!==this.parentNode&&(this.navigationNode=$()("<div>").addClass(this.options.navigationClass),this.resourceNode=$()("<div>"),$()(this.parentNode).empty().append(this.navigationNode,this.resourceNode),void 0!==this.modelviewer&&this.modelviewer.resources.variableCollections.filter((function(t){return!e.options.ignoreVariableCollections.has(t)&&t.count>0})).forEach((function(t){return e._appendSelectNode(t)})),this._changeSelected())}},{key:"onChangeVisibleResource",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.variable;Ll(Gl(a.prototype),"onChangeVisibleResource",this).call(this,{variable:t}),this._changeSelected()}},{key:"onAppendVariable",value:function(e){this.selectNodes.has(e.variableCollection)?this._appendOptionNode(this.selectNodes.get(e.variableCollection),e):this._appendSelectNode(e.variableCollection),this._changeSelected()}},{key:"_appendSelectNode",value:function(e){var t=this,n=$()("<select>").addClass(this.options.selectClass);if(n.on("change",(function(){var i=e.getItemById(n.val());t.container.exchangeDisplayVariable=[i]})),this.options.selectCaption){var i=$()("<option>").text(e.name).attr("disabled","disabled").prop("selected","selected");n.append(i)}e.variables.forEach((function(e){t._appendOptionNode(n,e)})),this.navigationNode.append($()("<div>").addClass(this.options.selectDivClass).append(n)),this.selectNodes.set(e,n)}},{key:"_appendOptionNode",value:function(e,t){var n=$()("<option>").attr("value",t.id).text(t.name).addClass(this.options.optionsClass);e.append(n)}},{key:"_changeSelected",value:function(){var e,t=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Il(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Il(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}(this.selectNodes.keys());try{for(t.s();!(e=t.n()).done;){var n=e.value;if(this.selectNodes.has(n)){var i=this.container.visibleResource.getVariableByVariableCollection(n);this.selectNodes.get(n).val(i.id)}}}catch(e){t.e(e)}finally{t.f()}}}])&&Al(t.prototype,n),a}(Nl)}},Hl={Parcel:Yo},Kl={CoordinateSystem:Ba,coordinateSystem:{StueveDiagram:Ya,Emagram:Ka,SkewTlogPDiagram:Qa},DiagramSounding:ha,Hodograph:tl,TDDiagram:Bs,functions:{drawWindbarbInto:Kr},WindbarbsProfile:Vs,WindspeedProfile:Us,axes:{xAxis:bl,yAxis:cl}}})(),meteoJS=i})();
+var meteoJS,SVG=SVG||{},jQuery=jQuery||{},ol=ol||{layer:{},source:{},format:{},style:{}},Popper=Popper||{},bootstrap=bootstrap||{};(()=>{var e={588:(e,t,n)=>{function i(e){return(i="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 o=function(e){"use strict";var t,n=Object.prototype,o=n.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",s=r.asyncIterator||"@@asyncIterator",l=r.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function c(e,t,n,i){var o=t&&t.prototype instanceof m?t:m,r=Object.create(o.prototype),a=new R(i||[]);return r._invoke=function(e,t,n){var i=d;return function(o,r){if(i===h)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw r;return C()}for(n.method=o,n.arg=r;;){var a=n.delegate;if(a){var s=T(a,n);if(s){if(s===y)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=h;var l=f(e,t,n);if("normal"===l.type){if(i=n.done?v:p,l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i=v,n.method="throw",n.arg=l.arg)}}}(e,n,a),r}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var d="suspendedStart",p="suspendedYield",h="executing",v="completed",y={};function m(){}function b(){}function g(){}var w={};w[a]=function(){return this};var _=Object.getPrototypeOf,O=_&&_(_(E([])));O&&O!==n&&o.call(O,a)&&(w=O);var S=g.prototype=m.prototype=Object.create(w);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(r,a,s,l){var u=f(e[r],e,a);if("throw"!==u.type){var c=u.arg,d=c.value;return d&&"object"===i(d)&&o.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,s,l)}),(function(e){n("throw",e,s,l)})):t.resolve(d).then((function(e){c.value=e,s(c)}),(function(e){return n("throw",e,s,l)}))}l(u.arg)}var r;this._invoke=function(e,i){function o(){return new t((function(t,o){n(e,i,t,o)}))}return r=r?r.then(o,o):o()}}function T(e,n){var i=e.iterator[n.method];if(i===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,T(e,n),"throw"===n.method))return y;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var r=o.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function E(e){if(e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,r=function n(){for(;++i<e.length;)if(o.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return r.next=r}}return{next:C}}function C(){return{value:t,done:!0}}return b.prototype=S.constructor=g,g.constructor=b,b.displayName=u(g,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},e.awrap=function(e){return{__await:e}},k(P.prototype),P.prototype[s]=function(){return this},e.AsyncIterator=P,e.async=function(t,n,i,o,r){void 0===r&&(r=Promise);var a=new P(c(t,n,i,o),r);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(S),u(S,l,"Generator"),S[a]=function(){return this},S.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var i=t.pop();if(i in e)return n.value=i,n.done=!1,n}return n.done=!0,n}},e.values=E,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(i,o){return s.type="throw",s.arg=e,n.next=i,o&&(n.method="next",n.arg=t),!!o}for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var r=i;break}}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var a=r?r.completion:{};return a.type=e,a.arg=t,r?(this.method="next",this.next=r.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),j(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var o=i.arg;j(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:E(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),y}},e}("object"===i(e=n.nmd(e))?e.exports:{});try{regeneratorRuntime=o}catch(e){Function("r","regeneratorRuntime = r")(o)}}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={id:i,loaded:!1,exports:{}};return e[i](r,r.exports,n),r.loaded=!0,r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var i={};(()=>{"use strict";n.r(i),n.d(i,{Modelviewer:()=>ki,RepetitiveRequests:()=>V,Sounding:()=>Ho,Synview:()=>Pt,ThermodynamicDiagram:()=>Vl,ThermodynamicDiagramPluggable:()=>Va,Timeline:()=>z,Tooltip:()=>Hn,calc:()=>e,events:()=>tu,modelviewer:()=>ru,sounding:()=>au,synview:()=>iu,thermodynamicDiagram:()=>su,timeline:()=>nu,tooltip:()=>ou});var e={};function t(e){if(void 0!==e&&!isNaN(e))return 44330.769*(1-Math.pow(e/1013.25,.19029496))}function o(e){if(void 0!==e&&!isNaN(e))return 1013.25*Math.pow(1-e/44330.769,5.255)}function r(e,t){if(void 0!==e&&!isNaN(e)&&void 0!==t&&!isNaN(t))return e*Math.pow(1e3/t,.286)}function a(e,t){if(void 0!==e&&!isNaN(e)&&void 0!==t&&!isNaN(t))return e*Math.pow(t/1e3,.286)}function s(e,t){if(void 0!==t&&!isNaN(t)){for(var n=void 0,i=Math.pow(1e3/t,.286),o=273,r=20,a=0;Math.abs(r)>.1&&a<100;)a++,n=d(o,t),(o*i*Math.exp(2.5*n/o)-e)*r>0&&(r*=-.5),o+=r;return o}}function l(e,t){if(void 0!==e&&!isNaN(e)&&void 0!==t&&!isNaN(t)){var n=.4343*Math.log(e*t/(622+e));return Math.pow(10,.0498646455*n+2.4082965)-7.07475+38.9114*Math.pow(Math.pow(10,.0915*n)-1.2035,2)}}function u(e,t,n){if(!(void 0===e||isNaN(e)||void 0===t||isNaN(t)||void 0===n||isNaN(n))){for(var i=t-273.15,o=1,r=10,a=1,s=6.112*Math.exp(17.67*i/(i+243.5));Math.abs(o)>.05&&0!=(o=s-(6.112*Math.exp(17.67*i/(i+243.5))-n*(e-273.15-i)*66e-5*(1+.00115*i)))&&(o<0?-1!=a&&(a=-1,r/=10):1!=a&&(a=1,r/=10),!(Math.abs(o)<=.05));)i+=r*a;return i+273.15}}function c(e,t,n){var i=r(e,n);if(!(void 0===i||void 0===t||isNaN(t)||void 0===e||isNaN(e)||void 0===n||isNaN(n)))return i*Math.exp(2.4819*d(t,n)/v(e,t))}function f(e){if(void 0!==e&&!isNaN(e)){var t=new Array(6.1104546,.4442351,.014302099,.00026454708,30357098e-13,2.0972268e-8,60487594e-18,-1469687e-19),n=new Array(.06485546857696639,.03783195122560735,.02224449342887902,.013182892842468312,.007874020771412448,.004739730494884733,.0028751203550435793,.001757430376758103,.0010824173951885098,.0006717089391856059,.0004199647026320394,.0002645243638634699,.00016784796373681322,.00010728539763162038,6907426344961356e-20,4479404897680843e-20,2925704195639373e-20,19245291263499416e-21,12749137241074795e-21,8505070102755051e-21,5713400253349711e-21,3864650296738762e-21,2632109719650053e-21,18049107293057043e-22,12460785055581605e-22,8.660705713468708e-7,6.059822176688955e-7,4.2682119794324277e-7,3.026165085143795e-7,2.15963854234914e-7,1.5512895457833687e-7),i=0;if((e-=273.15)>-50)i=t[0]+e*(t[1]+e*(t[2]+e*(t[3]+e*(t[4]+e*(t[5]+e*(t[6]+e*t[7]))))));else{var o=(-e-50)/5;i=0<n.length-1?n[0]+o%1*(n[1]-n[0]):1e-7}return i}}function d(e,t){var n=f(e);if(void 0!==n&&void 0!==t&&!isNaN(t))return 621.97*n/(t-n)}function p(e,t){if(void 0!==t&&!isNaN(t)){for(var n=1013,i=100;n-i>10;){var o=i+(n-i)/2,r=d(a(e,o),o);if(void 0===r)return;r<t?i=o:n=o}return i+(n-i)/2}}function h(e,t){if(void 0!==e&&!isNaN(e)){for(var n=323,i=223;n-i>.1;){var o=i+(n-i)/2,r=p(o,t);if(void 0===r)return;r>e?i=o:n=o}return i+(n-i)/2}}function v(e,t){if(void 0!==e&&!isNaN(e)&&void 0!==t&&!isNaN(t))return t-(.001296*t-.15772)*(e-t)}function y(e){return void 0===e||isNaN(e)?void 0:e+273.15}function m(e){return void 0===e||isNaN(e)?void 0:e-273.15}function b(e){return void 0===e||isNaN(e)?void 0:3.6*e}function g(e){return void 0===e||isNaN(e)?void 0:e/3.6}function w(e){return void 0===e||isNaN(e)?void 0:900*e/463}function _(e){return void 0===e||isNaN(e)?void 0:463*e/900}function O(e){return void 0===e||isNaN(e)?void 0:Math.min(12,Math.pow(e/.836,2/3))}function S(e){return void 0===e||isNaN(e)?void 0:.836*Math.pow(e,1.5)}function k(e,t){if(void 0!==e&&!isNaN(e)&&void 0!==t&&!isNaN(t))return 153*m(e)+.9985*t-304.26}function P(e,t,n,i){if(!(void 0===e||isNaN(e)||void 0===t||isNaN(t)||void 0===n||isNaN(n))){if(0==t)return e;var o=.02896;if(void 0===i&&(i=n),n==i)return e*Math.exp(9.807*-o/8.314/n*t);var r=(n-i)/t;return e*Math.exp(9.807*o/8.314/r*Math.log(1-r*t/n))}}function T(e,t,n){if(!(void 0===e||isNaN(e)||void 0===t||isNaN(t)||void 0===n||isNaN(n))){var i=f(t)*n;return 100*(e-i)/287.058/t+100*i/461.495/t}}function x(e){return(x="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)}function j(e,t,n){"listeners"in this&&void 0!==this.listeners||(this.listeners={}),e in this.listeners||(this.listeners[e]={});var i=Math.random().toString(36).substr(2,9);return this.listeners[e][i]={callback:t,thisArg:n},i}function R(e,t){"listeners"in this&&void 0!==this.listeners&&e in this.listeners&&t in this.listeners[e]&&delete this.listeners[e][t]}function E(e,t,n){"once_listeners"in this&&void 0!==this.once_listeners||(this.once_listeners={}),e in this.once_listeners&&"push"in this.once_listeners[e]||(this.once_listeners[e]=[]),this.once_listeners[e].push({callback:t,thisArg:n})}function C(e){return"listeners"in this&&void 0!==this.listeners&&e in this.listeners&&Object.keys(this.listeners[e]).length||"once_listeners"in this&&e in this.once_listeners&&Object.keys(this.once_listeners[e]).length}function N(e){var t=this,n=Array.prototype.slice.call(arguments);if(n.shift(),"listeners"in this&&void 0!==this.listeners&&e in this.listeners&&"object"==x(this.listeners[e])&&Object.keys(this.listeners[e]).forEach((function(i){t.listeners[e][i].callback.apply(void 0===t.listeners[e][i].thisArg?t:t.listeners[e][i].thisArg,n)})),"once_listeners"in this&&void 0!==this.once_listeners&&e in this.once_listeners&&"forEach"in this.once_listeners[e]){var i=this.once_listeners[e];this.once_listeners[e]=[],i.forEach((function(e){e.callback.apply(void 0===e.thisArg?t:e.thisArg,n)}))}}n.r(e),n.d(e,{altitudeISAByPres:()=>t,densityHumidAirByPressureAndTempAndRelHumidity:()=>T,dewpointByHMRAndPres:()=>l,equiPotentialTempByTempAndDewpointAndPres:()=>c,lclByPotentialTempAndHMR:()=>p,lclTemperatureByTempAndDewpoint:()=>v,potentialTempByLCLAndHMR:()=>h,potentialTempByTempAndPres:()=>r,pressureByBarometricFormula:()=>P,pressureISAByAltitude:()=>o,saturationHMRByTempAndPres:()=>d,saturationPressureByTemp:()=>f,snowlineByTemp850hPaAndAltidude:()=>k,tempByEquiPotTempAndPres:()=>s,tempByPotentialTempAndPres:()=>a,tempCelsiusToKelvin:()=>y,tempKelvinToCelsius:()=>m,wetbulbTempByTempAndDewpointAndPres:()=>u,windspeedBFToMS:()=>S,windspeedKMHToMS:()=>g,windspeedKNToMS:()=>_,windspeedMSToBF:()=>O,windspeedMSToKMH:()=>b,windspeedMSToKN:()=>w}),n(588);const B=function(e){e.on=j,e.un=R,e.once=E,e.hasListener=C,e.trigger=N};function I(e,t,n,i,o,r,a){try{var s=e[r](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(i,o)}function D(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var M=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.url,i=void 0===n?void 0:n,o=t.user,r=void 0===o?"":o,a=t.password,s=void 0===a?"":a,l=t.start,u=void 0===l||l,c=t.defaultTimeout,f=void 0===c?void 0:c,d=t.timeoutOnError,p=void 0===d?void 0:d,h=t.pauseOnHiddenDocument,v=void 0!==h&&h,y=t.responseType,m=void 0===y?"":y;D(this,e),this._url=i,this._user=r,this._password=s,this._isStarted=u,this._defaultTimeout=f,this._timeoutOnError=p,this._pauseOnHiddenDocument=v,this._initPauseOnHiddenDocument(),this._isSuppressedByHiddenDocument=!1,this._responseType=m,this._timeoutID=void 0,this._loading=!1,this._isStarted&&this.start()}var t,n,i,o;return t=e,(n=[{key:"url",get:function(){return this._url},set:function(e){this._url=e}},{key:"user",get:function(){return this._user},set:function(e){this._user=e}},{key:"password",get:function(){return this._password},set:function(e){this._password=e}},{key:"responseType",get:function(){return this._responseType},set:function(e){this._responseType=e}},{key:"start",value:function(){this._isStarted=!0,this._startRequest()}},{key:"stop",value:function(){this._isStarted=!1,void 0!==this._timeoutID&&(clearTimeout(this._timeoutID),this._timeoutID=void 0)}},{key:"_planRequest",value:function(e){var t=this,n=e.delay;void 0===this._timeoutID&&(this._timeoutID=setTimeout((function(){t._pauseOnHiddenDocument&&"hidden"in document&&document.hidden?t._isSuppressedByHiddenDocument=!0:t._startRequest()}),n))}},{key:"_startRequest",value:function(){var e=this;void 0!==this._timeoutID&&(clearTimeout(this._timeoutID),this._timeoutID=void 0),this._makeRequest().then((function(t){var n=t.request;if(e._isStarted){var i=e._defaultTimeout,o=n.getResponseHeader("Cache-Control");if(null!==o){var r=/(^|,\s*)max-age=([0-9]+)($|\s*,)/.exec(o);null!==r&&r[2]>0&&(i=Math.round(1e3*r[2]))}e.trigger("success:request",{request:n}),void 0!==i&&e._planRequest({delay:i})}}),(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.request;e._isStarted&&void 0!==n&&(e.trigger("error:request",{request:n}),void 0!==e._timeoutOnError&&e._planRequest({delay:e._timeoutOnError}))}),(function(t){var n=t.request,i=void 0===n?void 0:n;void 0!==i&&e.trigger("error:request",{request:i})}))}},{key:"_makeRequest",value:(i=regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.trigger("before:request"),e.abrupt("return",new Promise((function(e,n){if(void 0!==t._url)if(t._loading)n();else{t._loading=!0;var i=new XMLHttpRequest;void 0!==t.responseType&&(i.responseType=t.responseType),i.addEventListener("load",(function(){t._loading=!1,200==i.status?e({request:i}):n({request:i})})),i.addEventListener("error",(function(){t._loading=!1,n({request:i})})),i.open("GET",t._url,!0,t._user,t._password),i.send()}else n()})));case 2:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(n,o){var r=i.apply(e,t);function a(e){I(r,n,o,a,s,"next",e)}function s(e){I(r,n,o,a,s,"throw",e)}a(void 0)}))},function(){return o.apply(this,arguments)})},{key:"_initPauseOnHiddenDocument",value:function(){var e=this;this._pauseOnHiddenDocument&&document.addEventListener("visibilitychange",(function(){"hidden"in document&&!document.hidden&&e._isSuppressedByHiddenDocument&&e._isStarted&&(e._isSuppressedByHiddenDocument=!1,e.start())}))}}])&&A(t.prototype,n),e}();B(M.prototype);const V=M;function G(e){return(G="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)}function F(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Y(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var X=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.maxTimeGap,i=void 0===n?void 0:n,o=t.keyboardNavigation,r=void 0===o?{}:o;F(this,e),this.maxTimeGap=i,this.selectedTime=new Date("invalid"),this.times=[],this.enabledTimes=[],this.allEnabledTimes=[],this.timesByKey={},this._keyboardNavigation={},this._initKeyboardNavigation(r)}var t,n;return t=e,(n=[{key:"getSelectedTime",value:function(){return this.selectedTime}},{key:"setSelectedTime",value:function(e){return this._setSelectedTime(q(e,this.times)>-1?e:new Date("invalid")),this}},{key:"getTimes",value:function(){return this.times}},{key:"getEnabledTimes",value:function(){return this.enabledTimes}},{key:"getAllEnabledTimes",value:function(){return this.allEnabledTimes}},{key:"setTimesBySetID",value:function(e,t){return this.timesByKey[e]={times:t,enabled:t},this._updateTimes(),this._updateEnabledTimes(),this}},{key:"setEnabledTimesBySetID",value:function(e,t){return e in this.timesByKey&&(this.timesByKey[e].enabled=t,this._updateEnabledTimes()),this}},{key:"getSetIDs",value:function(){return Object.keys(this.timesByKey)}},{key:"deleteSetID",value:function(e){return e in this.timesByKey&&(delete this.timesByKey[e],this._updateTimes(),this._updateEnabledTimes()),this}},{key:"first",value:function(){return this._setSelectedTime(this.getFirstEnabledTime()),this}},{key:"last",value:function(){return this._setSelectedTime(this.getLastEnabledTime()),this}},{key:"next",value:function(){return this._setSelectedTime(this.getNextEnabledTime()),this}},{key:"prev",value:function(){return this._setSelectedTime(this.getPrevEnabledTime()),this}},{key:"nextAllEnabledTime",value:function(){return this._setSelectedTime(this.getNextAllEnabledTime()),this}},{key:"prevAllEnabledTime",value:function(){return this._setSelectedTime(this.getPrevAllEnabledTime()),this}},{key:"add",value:function(e,t){var n=this.getSelectedTime(),i=0;switch(t){case"hours":case"h":i=3600*e*1e3;break;case"minutes":case"m":i=60*e*1e3;break;case"seconds":case"s":i=1e3*e;break;case"milliseconds":case"ms":i=e}switch(0!=i&&(n=new Date(n.valueOf()+i)),t){case"years":case"y":n.setUTCFullYear(n.getUTCFullYear()+e);break;case"months":case"M":n.setUTCMonth(n.getUTCMonth()+e);break;case"days":case"d":n.setUTCDate(n.getUTCDate()+e)}return q(n,this.times)>-1&&this._setSelectedTime(n),this}},{key:"sub",value:function(e,t){var n=this.getSelectedTime(),i=0;switch(t){case"hours":case"h":i=3600*e*1e3;break;case"minutes":case"m":i=60*e*1e3;break;case"seconds":case"s":i=1e3*e;break;case"milliseconds":case"ms":i=e}switch(0!=i&&(n=new Date(n.valueOf()-i)),t){case"years":case"y":n.setUTCFullYear(n.getUTCFullYear()-e);break;case"months":case"M":n.setUTCMonth(n.getUTCMonth()-e);break;case"days":case"d":n.setUTCDate(n.getUTCDate()-e)}return q(n,this.times)>-1&&this._setSelectedTime(n),this}},{key:"getFirstEnabledTime",value:function(){return this.enabledTimes.length>0?this.enabledTimes[0]:new Date("invalid")}},{key:"getLastEnabledTime",value:function(){return this.enabledTimes.length>0?this.enabledTimes[this.enabledTimes.length-1]:new Date("invalid")}},{key:"getNextEnabledTime",value:function(){if(this.enabledTimes.length<1)return new Date("invalid");var e=q(this.getSelectedTime(),this.enabledTimes);if(e>-1)return++e<this.enabledTimes.length?this.enabledTimes[e]:this.enabledTimes[this.enabledTimes.length-1];if(isNaN(this.getSelectedTime()))return this.enabledTimes[0];for(var t=new Date("invalid"),n=0;n<this.enabledTimes.length;n++)if(this.getSelectedTime().valueOf()<this.enabledTimes[n].valueOf()){t=this.enabledTimes[n];break}return t}},{key:"getPrevEnabledTime",value:function(){if(this.enabledTimes.length<1)return new Date("invalid");var e=q(this.getSelectedTime(),this.enabledTimes);if(e>-1)return-1<--e?this.enabledTimes[e]:this.enabledTimes[0];if(isNaN(this.getSelectedTime()))return this.enabledTimes[0];for(var t=new Date("invalid"),n=this.enabledTimes.length-1;n>=0;n--)if(this.getSelectedTime().valueOf()>this.enabledTimes[n].valueOf()){t=this.enabledTimes[n];break}return t}},{key:"getFirstAllEnabledTime",value:function(){return this.allEnabledTimes.length>0?this.allEnabledTimes[0]:new Date("invalid")}},{key:"getLastAllEnabledTime",value:function(){return this.allEnabledTimes.length>0?this.allEnabledTimes[this.allEnabledTimes.length-1]:new Date("invalid")}},{key:"getNextAllEnabledTime",value:function(){if(this.allEnabledTimes.length<1)return new Date("invalid");var e=q(this.getSelectedTime(),this.allEnabledTimes);if(e>-1)return++e<this.allEnabledTimes.length?this.allEnabledTimes[e]:this.allEnabledTimes[this.allEnabledTimes.length-1];if(isNaN(this.getSelectedTime()))return this.allEnabledTimes[0];for(var t=new Date("invalid"),n=0;n<this.allEnabledTimes.length;n++)if(this.getSelectedTime().valueOf()<this.allEnabledTimes[n].valueOf()){t=this.allEnabledTimes[n];break}return t}},{key:"getPrevAllEnabledTime",value:function(){if(this.allEnabledTimes.length<1)return new Date("invalid");var e=q(this.getSelectedTime(),this.allEnabledTimes);if(e>-1)return-1<--e?this.allEnabledTimes[e]:this.allEnabledTimes[0];if(isNaN(this.getSelectedTime()))return this.allEnabledTimes[0];for(var t=new Date("invalid"),n=this.allEnabledTimes.length-1;n>=0;n--)if(this.getSelectedTime().valueOf()>this.allEnabledTimes[n].valueOf()){t=this.allEnabledTimes[n];break}return t}},{key:"isTimeEnabled",value:function(e){return this.enabledTimes.reduce((function(t,n){return n.valueOf()==e.valueOf()||t}),!1)}},{key:"isTimeAllEnabled",value:function(e){return this.allEnabledTimes.reduce((function(t,n){return n.valueOf()==e.valueOf()||t}),!1)}},{key:"isFirstEnabledTime",value:function(){return this.getFirstEnabledTime().valueOf()==this.getSelectedTime().valueOf()}},{key:"isLastEnabledTime",value:function(){return this.getLastEnabledTime().valueOf()==this.getSelectedTime().valueOf()}},{key:"_setSelectedTime",value:function(e){var t=this.selectedTime;return this.selectedTime=e,this.trigger("change:time",t),this.selectedTime}},{key:"_updateTimes",value:function(){this.times=[];var e=[],t={};for(var n in this.timesByKey)this.timesByKey[n].times.forEach((function(n){n.valueOf()in t||(e.push(n),t[n.valueOf()]=n)}));H(e),e.forEach((function(e){if(this.times.length<1)this.times.push(e);else{var t=this.times[this.times.length-1];if(void 0!==this.maxTimeGap&&e.valueOf()-t.valueOf()>1e3*this.maxTimeGap){var n=t;do{n=new Date(n.getTime()+1e3*this.maxTimeGap),this.times.push(n)}while(e.valueOf()-n.valueOf()>1e3*this.maxTimeGap)}this.times.push(e)}}),this),H(this.times),this.trigger("change:times")}},{key:"_updateEnabledTimes",value:function(){this.enabledTimes=[],this.allEnabledTimes=[];var e={},t={};for(var n in this.timesByKey)this.timesByKey[n].enabled.forEach((function(n){n.valueOf()in e||(this.enabledTimes.push(n),e[n.valueOf()]=n),n.valueOf()in t?t[n.valueOf()]++:t[n.valueOf()]=1}),this);for(var i in H(this.enabledTimes),t)t[i]==Object.keys(this.timesByKey).length&&this.allEnabledTimes.push(e[i]);H(this.allEnabledTimes),this.trigger("change:enabledTimes")}},{key:"_initKeyboardNavigation",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.enabled,i=void 0!==n&&n,o=t.first,r=void 0===o?36:o,a=t.last,s=void 0===a?35:a,l=t.prev,u=void 0===l?37:l,c=t.next,f=void 0===c?39:c,d=t.prevAllEnabledTime,p=void 0===d?[37,"ctrl"]:d,h=t.nextAllEnabledTime,v=void 0===h?[39,"ctrl"]:h,y=t.add,m=void 0===y?void 0:y,b=t.sub,g=void 0===b?void 0:b;void 0===m&&(m={"3h":[39,"ctrl","shift"],"6h":[39,"shift"],"12h":[39,"alt","shift"],"24h":[39,"alt"]}),void 0===g&&(g={"3h":[37,"ctrl","shift"],"6h":[37,"shift"],"12h":[37,"alt","shift"],"24h":[37,"alt"]}),this._keyboardNavigation={enabled:i,first:r,last:s,prev:u,next:f,prevAllEnabledTime:p,nextAllEnabledTime:v,add:m,sub:g},document&&this._keyboardNavigation.enabled&&document.addEventListener("keydown",(function(t){Object.keys(e._keyboardNavigation).forEach((function(n){"enabled"!=n&&(/^(add|sub)$/.test(n)?Object.keys(e._keyboardNavigation[n]).forEach((function(i){var o=i.match(/^([0-9]+)\s*([a-zA-Z]+)$/);null!==o&&K(t,e._keyboardNavigation[n][i])&&(e[n](+o[1],o[2]),t.preventDefault(),t.stopPropagation())})):n in e&&K(t,e._keyboardNavigation[n])&&(e[n](),t.preventDefault(),t.stopPropagation()))}))}))}}])&&Y(t.prototype,n),e}();B(X.prototype);const z=X;var q=function(e,t){return t.findIndex((function(t){return t.valueOf()==e.valueOf()}))};function H(e){e.sort((function(e,t){return e.valueOf()-t.valueOf()}))}function K(e,t){if("object"==G(t)&&"forEach"in t||(t=[t]),0==t.length)return!1;var n=[["ctrl","ctrlKey"],["alt","altKey"],["shift","shiftKey"],["meta","metaKey"]].reduce((function(n,i){return n&&(t.indexOf(i[0])>-1?e[i[1]]:!e[i[1]])}),!0);return t.forEach((function(t){switch(t){case"ctrl":case"alt":case"shift":case"meta":break;default:t!=e.keyCode&&(n=!1)}})),n}const U=jQuery;var $=n.n(U);function Z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function W(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var J=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.timeline,o=n.restartPause,r=void 0===o?1.8:o,a=n.imagePeriod,s=void 0===a?.2:a,l=n.imageFrequency,u=void 0===l?void 0:l,c=n.enabledStepsOnly,f=void 0===c||c,d=n.allEnabledStepsOnly,p=void 0!==d&&d;Z(this,e),this.options={timeline:i,restartPause:r,imagePeriod:s,imageFrequency:u,enabledStepsOnly:f,allEnabledStepsOnly:p},void 0===this.options.timeline&&(this.options.timeline=new z),void 0!==this.options.imageFrequency&&0!=this.options.imageFrequency&&(this.options.imagePeriod=1/this.options.imageFrequency),this.animationIntervalID=void 0,this.animationTimeoutID=void 0,this.animationStep=0,this.timesHash={},this.times=[];var h=function(){t.times=t.options.timeline[t._getTimelineTimesMethod()](),t.timesHash={},t.times.forEach((function(e,n){return t.timesHash[e.valueOf()]=n}))};this.options.timeline.on(this._getTimelineChangeTimesEvent(),h),h()}var t,n;return t=e,(n=[{key:"getImagePeriod",value:function(){return this.options.imagePeriod}},{key:"setImagePeriod",value:function(e){return this.options.imagePeriod=e,this.isStarted()&&this._updateAnimation(),this.trigger("change:imageFrequency"),this}},{key:"getImageFrequency",value:function(){return 1/this.options.imagePeriod}},{key:"setImageFrequency",value:function(e){return 0!=e&&this.setImagePeriod(1/e),this}},{key:"getRestartPause",value:function(){return this.options.restartPause}},{key:"setRestartPause",value:function(e){return this.options.restartPause=Number(e),this.trigger("change:restartPause"),this}},{key:"isStarted",value:function(){return void 0!==this.animationIntervalID||void 0!==this.animationTimeoutID}},{key:"start",value:function(){this.options.timeline.getSelectedTime().valueOf()in this.timesHash&&this._setStep(this.timesHash[this.options.timeline.getSelectedTime().valueOf()]),this.isStarted()||this._updateAnimation(),this.trigger("start:animation")}},{key:"stop",value:function(){this._clearAnimation(),this.trigger("stop:animation")}},{key:"toggle",value:function(){this.isStarted()?this.stop():this.start()}},{key:"_setStep",value:function(e){0<=e&&e<this._getCount()&&(this.animationStep=e)}},{key:"_getTimelineChangeTimesEvent",value:function(){return this.options.enabledStepsOnly||this.options.allEnabledStepsOnly?"change:enabledTimes":"change:times"}},{key:"_getTimelineTimesMethod",value:function(){return this.options.allEnabledStepsOnly?"getAllEnabledTimes":this.options.enabledStepsOnly?"getEnabledTimes":"getTimes"}},{key:"_getCount",value:function(){return this.options.timeline[this._getTimelineTimesMethod()]().length}},{key:"_updateAnimation",value:function(){this._clearAnimation(),this.animationStep<this._getCount()-1?this._initAnimation():this._initRestartPause()}},{key:"_initAnimation",value:function(){var e=this;void 0===this.animationIntervalID&&(this.animationIntervalID=window.setInterval((function(){e.animationStep++,e.animationStep<e.times.length&&e.options.timeline.setSelectedTime(e.times[e.animationStep]),e.animationStep>=e._getCount()-1&&(e.trigger("end:animation"),e._clearAnimation(),e._initRestartPause())}),1e3*this.options.imagePeriod))}},{key:"_initRestartPause",value:function(){var e=this;void 0===this.animationTimeoutID&&(this.animationTimeoutID=window.setTimeout((function(){e.animationStep=0,e.trigger("restart:animation"),e.animationStep<e.times.length&&e.options.timeline.setSelectedTime(e.times[e.animationStep]),e._clearAnimation(),e._initAnimation()}),1e3*(this.options.imagePeriod+this.options.restartPause)))}},{key:"_clearAnimation",value:function(){void 0!==this.animationIntervalID&&(window.clearInterval(this.animationIntervalID),this.animationIntervalID=void 0),void 0!==this.animationTimeoutID&&(window.clearTimeout(this.animationTimeoutID),this.animationTimeoutID=void 0)}}])&&W(t.prototype,n),e}();B(J.prototype);const Q=J;function ee(e,t){var n=t.animation,i=t.suffix,o=void 0===i?"fps":i,r=$()("<input>").addClass("form-control").attr("type","number").attr("min",1).attr("step",1),a=$()("<div>").addClass("input-group").append(r).append($()("<span>").addClass("input-group-text").text(o));r.on("change",(function(){return n.setImageFrequency(r.val())}));var s=function(){return r.val(n.getImageFrequency())};return n.on("change:imageFrequency",s),s(),e.append(a),a}function te(e,t){var n=t.animation,i=t.frequencies;i=i||[1];var o=$()("<input>").addClass("form-range").attr("type","range").attr("min",0).attr("max",i.length-1);o.on("change input",(function(){var e=o.val();e<i.length&&n.setImageFrequency(i[e])}));var r=function(){var e=i.indexOf(n.getImageFrequency());e>-1&&o.val(e)};return n.on("change:imageFrequency",r),r(),e.append(o),o}function ne(e,t){var n=t.animation,i=t.suffix,o=void 0===i?"s":i,r=$()("<input>").addClass("form-control").attr("type","number").attr("min",0).attr("step",.1),a=$()("<div>").addClass("input-group").append(r).append($()("<span>").addClass("input-group-text").text(o));r.on("change",(function(){return n.setRestartPause(r.val())}));var s=function(){return r.val(n.getRestartPause())};return n.on("change:restartPause",s),s(),e.append(a),a}const ie='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-play-fill" viewBox="0 0 16 16">\n  <path d="m11.596 8.697-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.692-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z"/>\n</svg>',oe='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pause-fill" viewBox="0 0 16 16">\n  <path d="M5.5 3.5A1.5 1.5 0 0 1 7 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5zm5 0A1.5 1.5 0 0 1 12 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5z"/>\n</svg>';function re(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function se(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var le=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.timeline,i=void 0===n?void 0:n,o=t.node,r=void 0===o?void 0:o,a=t.animation,s=void 0===a?void 0:a,l=t.enabledStepsOnly,u=void 0===l||l,c=t.allEnabledStepsOnly,f=void 0!==c&&c,d=t.textInvalid,p=void 0===d?"-":d,h=t.getTimeText,v=void 0===h?void 0:h,y=t.outputTimezone,m=void 0===y?void 0:y;ae(this,e),this.options={timeline:i,node:r,animation:s,enabledStepsOnly:u,allEnabledStepsOnly:f,textInvalid:p,getTimeText:v,outputTimezone:m},void 0===this.options.timeline&&(this.options.timeline=new z),this.listeners=[],this.inputListener=void 0}var t,n;return t=e,(n=[{key:"setNode",value:function(e){if(void 0!==this.options.node&&this.emptyNode(),void 0===e)this.detachEventListeners(),this.options.node=e;else{this.options.node=e;var t=this.listeners.length>0;t||(this.attachEventListener(this.options.timeline,"change:time",(function(){this.onChangeTime()}),this),this.attachEventListener(this.options.timeline,"change:times",(function(){this.onChangeTimes()}),this),this.attachEventListener(this.options.timeline,"change:enabledTimes",(function(){this.onChangeTimes()}),this)),this.onInitNode(t),this.onChangeTimes(),this.onChangeTime()}return void 0===this.inputListener&&(this.inputListener=this.on("input",(function(){void 0!==this.options.animation&&this.options.animation.stop()}),this)),this}},{key:"getOutputTimezone",value:function(){return this.options.outputTimezone}},{key:"setOutputTimezone",value:function(e){var t=this.options.outputTimezone!=e;return this.options.outputTimezone=e,t&&void 0!==this.options.node&&(this.onChangeTimes(),this.onChangeTime()),this}},{key:"onChangeTime",value:function(){}},{key:"onChangeTimes",value:function(){}},{key:"emptyNode",value:function(){}},{key:"onInitNode",value:function(){}},{key:"getTimelineTimes",value:function(){var e=this.options.allEnabledStepsOnly?"getAllEnabledTimes":this.options.enabledStepsOnly?"getEnabledTimes":"getTimes";return this.options.timeline[e]()}},{key:"timeToText",value:function(e,t){return isNaN(e)?this.options.textInvalid:void 0!==this.options.getTimeText?this.options.getTimeText.call(this,e,t):e.toISOString()}},{key:"attachEventListener",value:function(e,t,n,i){this.listeners.push([e,t]),e.on(t,n,i)}},{key:"detachEventListeners",value:function(){this.listeners.forEach((function(e){"un"in e[0]?e[0].un(e[1]):"off"in e[0]&&e[0].off(e[1])})),this.listeners=[]}}])&&se(t.prototype,n),e}();B(le.prototype);const ue=le;function ce(e){return(ce="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 fe=["format"];function de(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n,i,o={},r=Object.keys(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function pe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function he(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ve(e,t){return(ve=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ye(e,t){return!t||"object"!==ce(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function me(e){return(me=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const be=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ve(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=me(i);if(o){var n=me(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ye(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.format,i=void 0===n?void 0:n,o=de(t,fe);return pe(this,a),(e=r.call(this,o)).options.format=i,e.setNode(e.options.node),e}return t=a,(n=[{key:"onChangeTime",value:function(){this.options.node.text(this.timeToText(this.options.timeline.getSelectedTime(),this.options.format))}},{key:"emptyNode",value:function(){this.options.node.text("")}}])&&he(t.prototype,n),a}(ue);function ge(e){return(ge="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)}function we(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _e(e,t){return(_e=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Oe(e,t){return!t||"object"!==ge(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Se(e){return(Se=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const ke=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_e(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Se(i);if(o){var n=Se(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Oe(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=r.call(this,e)).times=[],t.timesIndexes={},t.setNode(t.options.node),t}return t=a,(n=[{key:"onChangeTime",value:function(){var e=this.options.timeline.getSelectedTime();e.valueOf()in this.timesIndexes?this.options.node.val(this.timesIndexes[e.valueOf()]+1):this.options.node.val(1)}},{key:"onChangeTimes",value:function(){this.times=this.getTimelineTimes(),this.timesIndexes={},this.times.forEach((function(e,t){this.timesIndexes[e.valueOf()]=t}),this),this.options.node.prop("max",this.times.length)}},{key:"onInitNode",value:function(e){if(this.options.node.prop("min",1),this.options.node.prop("step",1),!e){var t=this;this.attachEventListener(this.options.node,"change input",(function(){var e=+$()(this).val();0<e&&e<=t.times.length&&t.options.timeline.setSelectedTime(t.times[e-1]),t.trigger("input")}))}}}])&&we(t.prototype,n),a}(ue);function Pe(e){return(Pe="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 Te=["format","grouping","groupingFormat","classMain","classButtonGroup","classButtonGroupMargin","classLabel","classLabelSpan","classButton","classButtonActive","classButtonNotEnabled","classButtonEnabled","classButtonAllEnabled"];function xe(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n,i,o={},r=Object.keys(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function je(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Re(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Ee(e,t){return(Ee=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ce(e,t){return!t||"object"!==Pe(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ne(e){return(Ne=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const Be=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ee(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ne(i);if(o){var n=Ne(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Ce(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.format,i=void 0===n?"HH":n,o=t.grouping,s=void 0===o?"daily":o,l=t.groupingFormat,u=void 0===l?"ddd, DD. MMM":l,c=t.classMain,f=void 0===c?"btn-toolbar":c,d=t.classButtonGroup,p=void 0===d?"btn-group":d,h=t.classButtonGroupMargin,v=void 0===h?"me-2":h,y=t.classLabel,m=void 0===y?void 0:y,b=t.classLabelSpan,g=void 0===b?"d-block w-100":b,w=t.classButton,_=void 0===w?"btn":w,O=t.classButtonActive,S=void 0===O?"active":O,k=t.classButtonNotEnabled,P=void 0===k?"btn-light":k,T=t.classButtonEnabled,x=void 0===T?"btn-secondary":T,j=t.classButtonAllEnabled,R=void 0===j?"btn-primary":j,E=xe(t,Te);return je(this,a),(e=r.call(this,E)).options.format=i,e.options.grouping=s,e.options.groupingFormat=u,e.options.classMain=f,e.options.classButtonGroup=p,e.options.classButtonGroupMargin=v,e.options.classLabel=m,e.options.classLabelSpan=g,e.options.classButton=_,e.options.classButtonActive=S,e.options.classButtonNotEnabled=P,e.options.classButtonEnabled=x,e.options.classButtonAllEnabled=R,e.toolbarNode=void 0,e.setNode(e.options.node),e}return t=a,(n=[{key:"onChangeTime",value:function(){if(void 0!==this.toolbarNode){var e=this.options.timeline.getSelectedTime(),t=this;this.toolbarNode.find("button").each((function(){var n=new Date(+$()(this).data("time"));$()(this).removeClass(t.options.classButtonActive),e.valueOf()==n.valueOf()&&$()(this).addClass(t.options.classButtonActive)}))}}},{key:"onChangeTimes",value:function(){void 0===this.toolbarNode&&(this.toolbarNode=$()("<div>")),this.toolbarNode.empty();var e="daily"==this.options.grouping?"YYYY-MM-DD":"hourly"==this.options.grouping?"YYYY-MM-DD HH":this.options.grouping,t=void 0;this.getTimelineTimes().forEach((function(n){if(void 0===t||t.data("date")!=this.timeToText(n,e)){var i=$()("<div>").addClass(this.options.classButtonGroup).addClass(this.options.classButtonGroupMargin).attr("role","group").attr("aria-label",this.timeToText(n,e));if(void 0===this.options.groupingFormat)t=i;else{var o=$()("<span>").addClass(this.options.classLabelSpan).text(this.timeToText(n,this.options.groupingFormat));t=$()("<label>").addClass(this.options.classLabel).append(o),i.attr("aria-label",o.text()),t.append(i)}t.data("date",this.timeToText(n,e)),this.toolbarNode.append(t)}var r=$()("<button>").addClass(this.options.classButton).attr("type","button").data("time",n.valueOf());"function"==typeof this.options.format?r.text(this.timeToText(n,this.options.format.call(this,n))):r.text(this.timeToText(n,this.options.format)),this.options.timeline.isTimeAllEnabled(n)?r.addClass(this.options.classButtonAllEnabled):this.options.timeline.isTimeEnabled(n)?r.addClass(this.options.classButtonEnabled):r.addClass(this.options.classButtonNotEnabled);var a=this.options.timeline.getSelectedTime();n.valueOf()==a.valueOf()&&r.addClass(this.options.classButtonActive);var s=this;r.click((function(){s.options.timeline.setSelectedTime(new Date(+$()(this).data("time"))),s.trigger("input")})),t.hasClass(this.options.classButtonGroup)?t.append(r):t.children("div").append(r)}),this),this.toolbarNode.find("div."+this.options.classButtonGroup).last().removeClass(this.options.classButtonGroupMargin)}},{key:"emptyNode",value:function(){this.toolbarNode=void 0,this.options.node.empty()}},{key:"onInitNode",value:function(){this.toolbarNode=$()("<div>").addClass(this.options.classMain).attr("role","toolbar").attr("aria-label","Timeline toolbar"),this.options.node.append(this.toolbarNode)}}])&&Re(t.prototype,n),a}(ue);function Ie(e){return(Ie="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 De=["format","buttonFormat","grouping","groupingDivider","groupingFormat","classMain","classDropdownMenu","classDropdownItem","classItemActive","classItemNotEnabled","classItemEnabled","classItemAllEnabled","classDropdownHeader","classDropdownDivider","classDropdownButton","classButtonNotEnabled","classButtonEnabled","classButtonAllEnabled"];function Le(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n,i,o={},r=Object.keys(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Ae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Me(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Ve(e,t,n){return(Ve="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ye(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function Ge(e,t){return(Ge=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fe(e,t){return!t||"object"!==Ie(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ye(e){return(Ye=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const Xe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ge(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ye(i);if(o){var n=Ye(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Fe(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.format,i=void 0===n?"HH:mm":n,o=t.buttonFormat,s=void 0===o?"DD. MMMM YYYY HH:mm":o,l=t.grouping,u=void 0===l?"daily":l,c=t.groupingDivider,f=void 0===c||c,d=t.groupingFormat,p=void 0===d?"ddd, DD. MMMM YYYY":d,h=t.classMain,v=void 0===h?"dropdown":h,y=t.classDropdownMenu,m=void 0===y?"dropdown-menu":y,b=t.classDropdownItem,g=void 0===b?"dropdown-item":b,w=t.classItemActive,_=void 0===w?"active":w,O=t.classItemNotEnabled,S=void 0===O?"disabled":O,k=t.classItemEnabled,P=void 0===k?void 0:k,T=t.classItemAllEnabled,x=void 0===T?void 0:T,j=t.classDropdownHeader,R=void 0===j?"dropdown-header":j,E=t.classDropdownDivider,C=void 0===E?"dropdown-divider":E,N=t.classDropdownButton,B=void 0===N?"btn dropdown-toggle":N,I=t.classButtonNotEnabled,D=void 0===I?void 0:I,L=t.classButtonEnabled,A=void 0===L?void 0:L,M=t.classButtonAllEnabled,V=void 0===M?void 0:M,G=Le(t,De);return Ae(this,a),(e=r.call(this,G)).options.format=i,e.options.buttonFormat=s,e.options.grouping=u,e.options.groupingDivider=f,e.options.groupingFormat=p,e.options.classMain=v,e.options.classDropdownMenu=m,e.options.classDropdownItem=g,e.options.classItemActive=_,e.options.classItemNotEnabled=S,e.options.classItemEnabled=P,e.options.classItemAllEnabled=x,e.options.classDropdownHeader=R,e.options.classDropdownDivider=C,e.options.classDropdownButton=B,e.options.classButtonNotEnabled=D,e.options.classButtonEnabled=A,e.options.classButtonAllEnabled=V,e.visualisationButtonText=new be({timeline:e.options.timeline,format:e.options.buttonFormat,textInvalid:e.options.textInvalid,outputTimezone:e.options.outputTimezone,getTimeText:e.options.getTimeText}),e.dropdownNode=void 0,e.setNode(e.options.node),e}return t=a,(n=[{key:"setOutputTimezone",value:function(e){return Ve(Ye(a.prototype),"setOutputTimezone",this).call(this,e),this.visualisationButtonText.setOutputTimezone(e),this}},{key:"onChangeTime",value:function(){if(void 0!==this.dropdownNode){var e=this.options.timeline.getSelectedTime();this.options.node.children("li").children("button").removeClass(this.options.classButtonActive).removeClass(this.options.classButtonNotEnabled).removeClass(this.options.classButtonEnabled).removeClass(this.options.classButtonAllEnabled),this.options.timeline.isTimeAllEnabled(e)?this.options.node.children("button").addClass(this.options.classButtonAllEnabled):this.options.timeline.isTimeEnabled(e)?this.options.node.children("button").addClass(this.options.classButtonEnabled):this.options.node.children("button").addClass(this.options.classButtonNotEnabled);var t=this;this.dropdownNode.children("li").children("button."+this.options.classDropdownItem).each((function(){var n=new Date(+$()(this).data("time"));$()(this).removeClass(t.options.classItemActive).removeClass(t.options.classItemNotEnabled).removeClass(t.options.classItemEnabled).removeClass(t.options.classItemAllEnabled),e.valueOf()==n.valueOf()?$()(this).addClass(t.options.classItemActive):t.options.timeline.isTimeAllEnabled(n)?$()(this).addClass(t.options.classItemAllEnabled):t.options.timeline.isTimeEnabled(n)?$()(this).addClass(t.options.classItemEnabled):$()(this).addClass(t.options.classItemNotEnabled)}))}}},{key:"onChangeTimes",value:function(){void 0===this.dropdownNode&&(this.dropdownNode=$()("<div>")),this.dropdownNode.empty();var e="daily"==this.options.grouping?"YYYY-MM-DD":"hourly"==this.options.grouping?"YYYY-MM-DD HH":this.options.grouping,t=void 0;this.getTimelineTimes().forEach((function(n){void 0!==t&&t==this.timeToText(n,e)||(void 0!==t&&this.options.groupingDivider&&this.dropdownNode.append($()("<div>").addClass(this.options.classDropdownDivider)),void 0!==this.options.groupingFormat&&this.dropdownNode.append($()("<h6>").addClass(this.options.classDropdownHeader).text(this.timeToText(n,this.options.groupingFormat))),t=this.timeToText(n,e));var i=$()("<button>").addClass(this.options.classDropdownItem).attr("type","button").text(this.timeToText(n,this.options.format)).data("time",n.valueOf()),o=this;i.click((function(){o.options.timeline.setSelectedTime(new Date(+$()(this).data("time"))),o.trigger("input")})),this.dropdownNode.append($()("<li>").append(i))}),this)}},{key:"emptyNode",value:function(){void 0!==this.visualisationButtonText&&this.visualisationButtonText.setNode(void 0),this.dropdownNode=void 0,this.options.node.empty()}},{key:"onInitNode",value:function(){for(var e="dropdownMenuButton",t=0;null!=document.getElementById(e);)e="dropdownMenuButton"+ ++t;var n=$()("<button>").addClass(this.options.classDropdownButton).attr("type","button").attr("id",e).attr("data-bs-toggle","dropdown").attr("aria-haspopup",!0).attr("aria-expanded",!1);this.visualisationButtonText.setNode(n),this.dropdownNode=$()("<ul>").addClass(this.options.classDropdownMenu).attr("aria-labelledby",e),this.options.node.addClass(this.options.classMain).append(n).append(this.dropdownNode)}}])&&Me(t.prototype,n),a}(ue);function ze(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var qe=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=$().extend(!0,{map:void 0,layerGroup:void 0},t)}var t,n;return t=e,(n=[{key:"getMap",value:function(){return this.options.map}},{key:"getViewCenter",value:function(){}},{key:"setViewCenter",value:function(){return this}},{key:"getViewZoom",value:function(){}},{key:"setViewZoom",value:function(){return this}},{key:"makeLayerGroup",value:function(){}},{key:"getExtendedEventByTypeCollection",value:function(e){return e.synviewType=void 0,e.layer=void 0,e.feature=void 0,e.color=void 0,e}},{key:"findLayerInType",value:function(){return-1}}])&&ze(t.prototype,n),e}();B(qe.prototype);const He=qe;function Ke(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Ue=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.itemIds=[],this.items={}}var t,n;return t=e,(n=[{key:"getCount",value:function(){return this.itemIds.length}},{key:"getItems",value:function(){return this.itemIds.map((function(e){return this.items[e]}),this)}},{key:"getItemIds",value:function(){return this.itemIds}},{key:"getItemById",value:function(e){return e in this.items?this.items[e]:void 0}},{key:"containsId",value:function(e){return-1!==this.getIndexById(e)}},{key:"getIndexById",value:function(e){var t=-1;return this.itemIds.forEach((function(n,i){n==e&&(t=i)})),t}},{key:"append",value:function(e){var t=e.getId();return this.containsId(t)?(this.trigger("replace:item",e,this.getItemById(t)),this.items[t]=e):(this.itemIds.push(t),this.items[t]=e,this.trigger("add:item",e)),this}},{key:"remove",value:function(e){var t=this.getItemById(e);if(void 0!==t){var n=this.getIndexById(e);delete this.items[e],this.itemIds.splice(n,1),this.trigger("remove:item",t)}return this}}])&&Ke(t.prototype,n),e}();B(Ue.prototype);const $e=Ue,Ze=ol.layer.Group;var We=n.n(Ze);const Je=ol.layer.Vector;var Qe=n.n(Je);const et=ol.Observable;function tt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nt(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var it=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.url,i=void 0===n?void 0:n,o=t.datetime,r=void 0===o?void 0:o,a=t.mimetype,s=void 0===a?void 0:a,l=t.reloadTime,u=void 0===l?void 0:l,c=t.className,f=void 0===c?void 0:c,d=t.imageSmoothingEnabled,p=void 0===d?void 0:d,h=t.ol,v=void 0===h?{}:h;tt(this,e),this.options={url:i,datetime:r,mimetype:s,reloadTime:u,className:f,ol:v},this._normalizeOLOptions(this.options.ol),this.layer=void 0,this.layerGroup=void 0,this.reloadTimerId=void 0,this.visible=!1,this.zIndex=void 0,this.opacity=1,this._imageSmoothing=p}var t,n;return t=e,(n=[{key:"getId",value:function(){return this.getUrl()}},{key:"getUrl",value:function(){return this.options.url}},{key:"getDatetime",value:function(){return this.options.datetime}},{key:"getMIMEType",value:function(){return void 0===this.options.mimetype?"application/octet-stream":this.options.mimetype}},{key:"getReloadTime",value:function(){return this.options.reloadTime}},{key:"setReloadTime",value:function(e){return this.options.reloadTime=e,this._reload(),this}},{key:"getVisible",value:function(){return this.visible}},{key:"setVisible",value:function(e){return this.visible=e,void 0!==this.layer&&("setVisible"in this.layer?this.layer.setVisible(e):this.visible?this.layer.addTo(this.layerGroup):this.layerGroup.removeLayer(this.layer)),this}},{key:"getZIndex",value:function(){return this.zIndex}},{key:"setZIndex",value:function(e){return this.zIndex=e,void 0!==this.layer&&this.layer.setZIndex(e),this}},{key:"getOpacity",value:function(){return this.opacity}},{key:"setOpacity",value:function(e){return this.opacity=e,void 0!==this.layer&&this.layer.setOpacity(e),this}},{key:"className",get:function(){return this.options.className},set:function(e){this.options.className=e}},{key:"imageSmoothingEnabled",get:function(){return this._imageSmoothing},set:function(e){this._imageSmoothing=e}},{key:"getLayerGroup",value:function(){return this.layerGroup}},{key:"setLayerGroup",value:function(e){if(void 0!==this.layerGroup&&void 0!==this.layer&&("remove"in this.layerGroup.getLayers()?this.layerGroup.getLayers().remove(this.layer):this.layerGroup.removeLayer(this.layer)),void 0===e&&(this.layer=void 0),this.layerGroup=e,void 0!==this.layerGroup)if("addLayer"in this.layerGroup){var t=this.getLLLayer();this.getVisible()&&this.layerGroup.addLayer(t)}else this.layerGroup.getLayers().push(this.getOLLayer());return this.setReloadTime(this.getReloadTime()),this}},{key:"getOLLayer",value:function(){return void 0!==this.layer||(this.layer=this._makeOLLayer()),this.layer}},{key:"makeOLLayer",value:function(){return new(Qe())({className:this.className})}},{key:"_makeOLLayer",value:function(){var e=this,t=this.makeOLLayer();if(t.setVisible(this.visible),t.setZIndex(this.zIndex),t.setOpacity(this.opacity),"events"in this.options.ol&&void 0!==this.options.ol.events&&["prerender","postrender"].forEach((function(n){n in e.options.ol.events&&void 0!==e.options.ol.events[n]&&t.on(n,(function(i){e.options.ol.events[n].call(e,i,t)}))})),!this._imageSmoothing){var n=t.getSource();null!==n&&"contextOptions_"in n&&(n.contextOptions_={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1})}return t}},{key:"getLLLayer",value:function(){return void 0!==this.layer||(this.layer=this._makeLLLayer()),this.layer}},{key:"makeLLLayer",value:function(){return L.Layer()}},{key:"preload",value:function(){}},{key:"_makeLLLayer",value:function(){return this.makeLLLayer()}},{key:"_reload",value:function(){if(void 0!==this.reloadTimerId&&(clearTimeout(this.reloadTimerId),this.reloadTimerId=void 0),void 0!==this.options.reloadTime&&void 0!==this.layerGroup){var e=function(){if(this.reloadTimerId=void 0,void 0!==this.layerGroup){var t=this._makeOLLayer();if("getUrl"in t.getSource()){var n=this.layerGroup,i=t.getSource().on("change",function(){"ready"!=t.getSource().getState()&&"error"!=t.getSource().getState()||((0,et.unByKey)(i),"ready"==t.getSource().getState()&&void 0!==this.layerGroup?(t.setVisible(this.layer.getVisible()),t.setOpacity(this.layer.getOpacity()),t.setZIndex(this.layer.getZIndex()),this.layerGroup.getLayers().remove(this.layer),this.layer=t):void 0!==this.layerGroup?this.layerGroup.getLayers().remove(t):n.getLayers().remove(t),void 0===this.reloadTimerId&&void 0!==this.options.reloadTime&&void 0!==this.layerGroup&&(this.reloadTimerId=setTimeout(e,1e3*this.options.reloadTime)))}.bind(this));this.layerGroup.getLayers().push(t),t.setVisible(!0)}else this.layerGroup.getLayers().push(t),t.setVisible(!0),setTimeout(function(){this.layer=t,void 0===this.reloadTimerId&&void 0!==this.options.reloadTime&&(this.reloadTimerId=setTimeout(e,1e3*this.options.reloadTime))}.bind(this),1e3)}}.bind(this);return this.reloadTimerId=setTimeout(e,1e3*this.options.reloadTime),this}}},{key:"_normalizeOLOptions",value:function(e){var t=e.source,n=void 0===t?{}:t,i=e.events,o=void 0===i?void 0:i,r=e.style,a=void 0===r?void 0:r;this.options.ol={source:n,events:o,style:a}}}])&&nt(t.prototype,n),e}();B(it.prototype);const ot=it;function rt(e){return(rt="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)}function at(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function st(e,t,n){return(st="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ct(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function lt(e,t){return(lt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ut(e,t){return!t||"object"!==rt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ct(e){return(ct=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const ft=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&lt(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ct(i);if(o){var n=ct(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ut(this,e)});function a(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(e=r.call(this)).times=[],e}return t=a,(n=[{key:"getResources",value:function(){return this.times.map((function(e){return this.items[e.valueOf()]}),this)}},{key:"getTimes",value:function(){return this.times}},{key:"getItemById",value:function(e){var t=st(ct(a.prototype),"getItemById",this).call(this,e);return void 0===t?new ot:t}},{key:"getResourceByTime",value:function(e){return this.getItemById(isNaN(e)?"":e.valueOf())}},{key:"containsTime",value:function(e){return this.getIndexById(isNaN(e)?"":e.valueOf())>-1}},{key:"getIndexByTime",value:function(e){var t=-1;return isNaN(e)||this.times.forEach((function(n,i){n.valueOf()==e.valueOf()&&(t=i)})),t}},{key:"getNewestResource",value:function(){return this.times.length<1?new ot:this.getResourceByTime(this.times[this.times.length-1])}},{key:"append",value:function(e){return this._append(e),this._sortTimes(),this}},{key:"remove",value:function(e){return this._remove(isNaN(e)?"":e.valueOf()),this._sortTimes(),this}},{key:"setResources",value:function(e){return e.forEach((function(e){this._append(e)}),this),this._filterTimesByResources(e),this._sortTimes(),this}},{key:"_append",value:function(e){var t=e.getDatetime(),n=void 0===t?"":t.valueOf();this.containsId(n)?(this.trigger("replace:item",e,this.getItemById(n)),this.items[n]=e):(this.itemIds.push(n),this.items[n]=e,void 0===t||isNaN(t)||this.times.push(t),this.trigger("add:item",e))}},{key:"_remove",value:function(e){var t=this.getIndexById(e);if(t>-1){var n=this.items[e];if(delete this.items[e],this.itemIds.splice(t,1),void 0!==e&&""!==e&&!isNaN(e)){var i=this.times.findIndex((function(t){return t.valueOf()==e}));i>-1&&this.times.splice(i,1)}this.trigger("remove:item",n)}}},{key:"_filterTimesByResources",value:function(e){var t=!1;this.times=this.times.filter((function(n){var i=!1;return e.findIndex((function(e){var i=!1,o=e.getDatetime();return void 0!==o&&n.valueOf()==o.valueOf()?i=!0:void 0===o&&(t=!0),i}),this)<0&&(this.remove(n.valueOf()),i=!0),!i}),this),t&&this.remove("")}},{key:"_sortTimes",value:function(){this.times.sort((function(e,t){return e.valueOf()-t.valueOf()}))}}])&&at(t.prototype,n),a}($e);function dt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pt(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var ht=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.id,i=void 0===n?void 0:n,o=t.visible,r=void 0===o||o,a=t.zIndex,s=void 0===a?void 0:a,l=t.displayMethod,u=void 0===l?"floor":l,c=t.displayMaxResourceAge,f=void 0===c?10800:c,d=t.displayFadeStart,p=void 0===d?900:d,h=t.displayFadeStartOpacity,v=void 0===h?.95:h,y=t.resources,m=void 0===y?void 0:y,b=t.className,g=void 0===b?void 0:b,w=t.imageSmoothingEnabled,_=void 0===w?void 0:w,O=t.tooltip,S=void 0===O?void 0:O,k=t.preload,P=void 0===k?{}:k;dt(this,e),this.options={id:i,visible:r,zIndex:s,displayMethod:u,displayMaxResourceAge:f,displayFadeStart:p,displayFadeStartOpacity:v,resources:m,className:g,imageSmoothingEnabled:_,tooltip:S},this.layerGroup=void 0,this.collection=new ft,this.displayedResourceTime=new Date("invalid"),this.collection.on("add:item",(function(e){e.className=this.className,this._addOLLayer(e),this._preload.enabled&&e.preload()}),this),this.collection.on("remove:item",(function(e){this._removeOLLayer(e)}),this),this.collection.on("replace:item",(function(e,t){e!==t&&(e.className=this.className,this._replaceOLLayer(e,t),this._preload.enabled&&e.preload())}),this),this._preload=P,void 0!==this.options.resources&&this.collection.setResources(this.options.resources),delete this.options.resources}var t,n;return t=e,(n=[{key:"getId",value:function(){return this.options.id}},{key:"setId",value:function(e){return this.options.id=e,this}},{key:"getVisible",value:function(){return this.options.visible}},{key:"setVisible",value:function(e){return(this.options.visible?!e:e)&&(this.options.visible=!!e,void 0!==this.layerGroup&&this.layerGroup.setVisible(this.options.visible),this.getResourceCollection().getItems().forEach((function(e){isNaN(e.getDatetime())&&e.setVisible(this.options.visible),e.setLayerGroup(this.options.visible?this.layerGroup:void 0)}),this),this.trigger("change:visible")),this}},{key:"getZIndex",value:function(){return this.options.zIndex}},{key:"setZIndex",value:function(e){return this.options.zIndex=e,void 0!==this.layerGroup&&this.layerGroup.setZIndex(e),this.getResourceCollection().getItems().forEach((function(t){t.setZIndex(e)})),this}},{key:"className",get:function(){return this.options.className},set:function(e){this.options.className=e}},{key:"getLayerGroup",value:function(){return void 0===this.layerGroup?new(We()):this.layerGroup}},{key:"setLayerGroup",value:function(e){return this.layerGroup=e,void 0!==this.layerGroup&&("setVisible"in this.layerGroup&&this.layerGroup.setVisible(this.options.visible),this.layerGroup.setZIndex(this.options.zIndex)),this.getResourceCollection().getItems().forEach((function(t){t.setLayerGroup(this.options.visible?e:void 0)}),this),this}},{key:"getResourceCollection",value:function(){return this.collection}},{key:"appendResource",value:function(e){return this.collection.append(e),this.setDisplayTime(this.displayedResourceTime),this.trigger("change:resources"),this}},{key:"removeResource",value:function(e){return this._hideVisibleResource(),this.collection.remove(e.getDatetime()),this.setDisplayTime(this.displayedResourceTime),this.trigger("change:resources"),this}},{key:"setResources",value:function(e){return this._hideVisibleResource(),this.collection.setResources(e),this.setDisplayTime(this.displayedResourceTime),this.trigger("change:resources"),this}},{key:"getDisplayedResource",value:function(){return this.getVisible()&&void 0!==this.layerGroup?isNaN(this.displayedResourceTime)&&this.collection.getTimes().length>0?new ot:this.collection.getResourceByTime(this.displayedResourceTime):new ot}},{key:"setDisplayTime",value:function(e){if(!this.getVisible())return this;var t=this._getResourceTimeByDisplayTime(e);if((void 0===t||void 0!==t&&!isNaN(this.displayedResourceTime)&&this.displayedResourceTime.valueOf()!=t.valueOf())&&this._hideVisibleResource(),void 0!==t){this.displayedResourceTime=t;var n=this.getResourceCollection().getItemById(t.valueOf());if(n.getId()){n.setVisible(!0);var i=1;Math.abs(e.valueOf()-t.valueOf())>1e3*this.options.displayMaxResourceAge?i=0:Math.abs(e.valueOf()-t.valueOf())>1e3*this.options.displayFadeStart&&(i=this.options.displayFadeStartOpacity*(Math.abs(e.valueOf()-t.valueOf())-1e3*this.options.displayMaxResourceAge)/(1e3*(this.options.displayFadeStart-this.options.displayMaxResourceAge))),n.setOpacity(i)}}else this.displayedResourceTime=new Date("invalid");return this}},{key:"getTooltip",value:function(){return this.options.tooltip}},{key:"setTooltip",value:function(e){return this.options.tooltip=e,this}},{key:"setResourcesOLStyle",value:function(){var e=arguments;return this.getResourceCollection().getItems().forEach((function(t){"setOLStyle"in t&&t.setOLStyle.apply(t,e)})),this}},{key:"_hideVisibleResource",value:function(){isNaN(this.displayedResourceTime)||this.getResourceCollection().getItemById(this.displayedResourceTime.valueOf()).setVisible(!1)}},{key:"_addOLLayer",value:function(e){isNaN(e.getDatetime())&&e.setVisible(this.getVisible()),void 0!==this.options.imageSmoothingEnabled&&void 0===e.imageSmoothingEnabled&&(e.imageSmoothingEnabled=this.options.imageSmoothingEnabled),e.setLayerGroup(this.getLayerGroup()),e.setZIndex(this.options.zIndex)}},{key:"_removeOLLayer",value:function(e){e.setLayerGroup(void 0)}},{key:"_replaceOLLayer",value:function(e,t){this._removeOLLayer(t),this._addOLLayer(e)}},{key:"_getResourceTimeByDisplayTime",value:function(e){if(!isNaN(e)){var t=void 0;return this.collection.getTimes().forEach((function(n){switch(this.options.displayMethod){case"exact":e.valueOf()==n.valueOf()&&(t=n);break;case"nearest":(void 0===t||Math.abs(e.valueOf()-n.valueOf())<Math.abs(e.valueOf()-t.valueOf()))&&(t=n);break;case"floor":default:(void 0===t||n.valueOf()<=e.valueOf()&&e.valueOf()-n.valueOf()<e.valueOf()-t.valueOf())&&(t=n)}}),this),t}}}])&&pt(t.prototype,n),e}();B(ht.prototype);const vt=ht;function yt(e){return(yt="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)}function mt(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function bt(e,t,n){return(bt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_t(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function gt(e,t){return(gt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wt(e,t){return!t||"object"!==yt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _t(e){return(_t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const Ot=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gt(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=_t(i);if(o){var n=_t(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return wt(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=r.call(this)).options=$().extend(!0,{exclusiveVisibility:!1,syncVisibility:!1},e),t}return t=a,(n=[{key:"getItemById",value:function(e){return void 0===bt(_t(a.prototype),"getItemById",this).call(this,e)?new vt:this.items[e]}},{key:"append",value:function(e){var t=this;return this.options.exclusiveVisibility&&e.getVisible()&&this.isVisible()?e.setVisible(!1):t.options.syncVisibility&&(e.getVisible()?this.isVisible()||this.getItems().forEach((function(e){e.setVisible(!0)}),this):this.isVisible()&&e.setVisible(!0)),e.on("change:visible",(function(){t.options.exclusiveVisibility?this.getVisible()&&t.getItems().forEach((function(e){e.getId()!=this.getId()&&e.setVisible(!1)}),this):t.options.syncVisibility&&t.getItems().forEach((function(e){e.getId()!=this.getId()&&e.setVisible(this.getVisible())}),this)})),bt(_t(a.prototype),"append",this).call(this,e)}},{key:"getVisibleTypes",value:function(){return this.getItems().filter((function(e){return e.getVisible()}))}},{key:"isVisible",value:function(){return this.getVisibleTypes().length>0}},{key:"setExclusiveVisibility",value:function(e){if(this.options.exclusiveVisibility!=e&&e){var t=!1;this.getItems().forEach((function(e){t?e.setVisible(!1):t=e.getVisible()}),this)}return this.options.exclusiveVisibility=e,this}},{key:"setSyncVisibility",value:function(e){return this.options.syncVisibility!=e&&e&&this.isVisible()&&this.getItems().forEach((function(e){e.setVisible(!0)}),this),this.options.syncVisibility=e,this}}])&&mt(t.prototype,n),a}($e),St=function e(t){var n=this,i=t.map,o=t.typeCollection,r=t.tooltip;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.tooltipFeature=void 0,this.tooltipPixelColor=void 0,this.map=i,this.typeCollection=o,this.tooltip=r,Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this.tooltip),"tooltipNode")&&void 0===this.tooltip.tooltipNode&&(this.tooltip.tooltipNode=$()("<div>").css("position","absolute").prependTo(this.map.getMap().getTargetElement())),this.tooltip.on("hide:tooltip",(function(){n.tooltipFeature=void 0,n.tooltipPixelColor=void 0})),this.map.on("move:pointer",(function(e){if(!e.dragging)if((e=n.map.getExtendedEventByTypeCollection(e,n.typeCollection)).feature||e.color){if(e.feature===n.tooltipFeature&&(void 0===e.color&&void 0===n.tooltipPixelColor||void 0!==e.color&&void 0!==n.tooltipPixelColor&&e.color.join(",")===n.tooltipPixelColor.join(",")))return void n.tooltip.show({posX:e.pixel[0],posY:e.pixel[1]});n.tooltipFeature=void 0,n.tooltipPixelColor=void 0;var t=e.synviewType.getTooltip().call(void 0,e);void 0!==t?(n.tooltipFeature=e.feature,n.tooltipPixelColor=e.color,n.tooltip.content=t,n.tooltip.hide().show({posX:e.pixel[0],posY:e.pixel[1]})):n.tooltip.hide()}else n.tooltip.hide()}))};function kt(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Pt=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=$().extend(!0,{map:void 0,timeline:void 0,tooltip:void 0},t),void 0===this.options.map&&(this.options.map=new He),void 0===this.options.timeline&&(this.options.timeline=new z),this.typeCollection=new Ot,this.tooltip=void 0,this.options.timeline.on("change:time",(function(){this.getTypeCollection().getItems().map((function(e){e.setDisplayTime(this.options.timeline.getSelectedTime())}),this)}),this);var n=this.options.timeline,i=function(){var e=n.isLastEnabledTime();this.getVisible()?n.setTimesBySetID(this.getId(),this.getResourceCollection().getTimes()):n.setTimesBySetID(this.getId(),[]),e?n.last():isNaN(n.getSelectedTime())&&n.first()},o=function(e){e.setLayerGroup(this.options.map.makeLayerGroup()),i.call(e),e.setDisplayTime(this.getTimeline().getSelectedTime()),e.on("change:resources",i),e.on("change:visible",i),void 0!==e.getTooltip()&&void 0===this.tooltip&&(this.tooltip=new St({map:this.options.map,typeCollection:this.typeCollection,tooltip:this.options.tooltip}))},r=function(e){this.getTimeline().deleteSetID(e.getId())};this.typeCollection.on("add:item",o,this),this.typeCollection.on("remove:item",r,this),this.typeCollection.on("replace:item",(function(e,t){o.call(this,e),r.call(this,t)}),this)}var t,n;return t=e,(n=[{key:"getTimeline",value:function(){return this.options.timeline}},{key:"getMap",value:function(){return this.options.map}},{key:"getTypeCollection",value:function(){return this.typeCollection}},{key:"appendType",value:function(e){if(void 0===e.getId()){var t,n=0;do{t="synview-type-"+n++}while(this.getTypeCollection().containsId(t));e.setId(t)}return this.getTypeCollection().append(e),this}},{key:"getTooltip",value:function(){return this.options.tooltip}}])&&kt(t.prototype,n),e}();const Tt=ol.proj;function xt(e){return(xt="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)}function jt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Rt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Rt(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function Rt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Et(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Ct(e,t,n){return(Ct="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Dt(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function Nt(e,t){return(Nt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Bt(e,t){return!t||"object"!==xt(t)&&"function"!=typeof t?It(e):t}function It(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Dt(e){return(Dt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Lt="EPSG:4326";const At=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Nt(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Dt(i);if(o){var n=Dt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Bt(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),void 0===(t=r.call(this,e)).options.layerGroup&&(t.options.layerGroup=new(We()),t.options.map.addLayer(t.options.layerGroup)),t.options.map.getView().on("change:center",function(){this.trigger("change:view",this)}.bind(It(t))),t.options.map.getView().on("change:resolution",function(){this.trigger("change:view",this)}.bind(It(t))),t.options.map.on("pointermove",function(e){this.trigger("move:pointer",e)}.bind(It(t))),t.options.map.on("click",function(e){this.trigger("click:pointer",e)}.bind(It(t))),t.options.map.on("singleclick",function(e){this.trigger("singleclick:pointer",e)}.bind(It(t))),t.options.map.on("dblclick",function(e){this.trigger("dblclick:pointer",e)}.bind(It(t))),t.options.map.on("pointerdrag",function(e){this.trigger("drag:pointer",e)}.bind(It(t))),t}return t=a,(n=[{key:"getViewCenter",value:function(){return(0,Tt.transform)(this.options.map.getView().getCenter(),this.options.map.getView().getProjection(),Lt)}},{key:"setViewCenter",value:function(e){var t=!0;return e=e.map((function(e){return isNaN(e)?void(t=!1):1*e})),t&&this.options.map.getView().setCenter((0,Tt.fromLonLat)(e)),this}},{key:"getViewZoom",value:function(){return this.options.map.getView().getZoom()}},{key:"setViewZoom",value:function(e){return isNaN(e)||this.options.map.getView().setZoom(1*e),this}},{key:"makeLayerGroup",value:function(){var e=new(We());return this.options.layerGroup.getLayers().push(e),e}},{key:"getExtendedEventByTypeCollection",value:function(e,t){e=Ct(Dt(a.prototype),"getExtendedEventByTypeCollection",this).call(this,e,t);var n=new Map;t.getVisibleTypes().filter((function(e){return void 0!==e.getTooltip()})).map((function(e){return n.set(e,[])}));var i,o=new Set,r=new Set,s=jt(n.keys());try{var l=function(){var e=i.value;e.getLayerGroup().getLayers().getArray().filter((function(e){return e.getVisible()})).forEach((function(t){n.get(e).push(t),o.add(t),r.add(t.getClassName())}))};for(s.s();!(i=s.n()).done;)l()}catch(e){s.e(e)}finally{s.f()}return this.options.map.forEachFeatureAtPixel(e.pixel,(function(t,i){var o,r=jt(n.keys());try{var a=function(){var r=o.value;if(n.get(r).forEach((function(n){void 0===e.synviewType&&n===i&&(e.feature=t,e.layer=i,e.synviewType=r)})),void 0!==e.synviewType)return"break"};for(r.s();!(o=r.n()).done&&"break"!==a(););}catch(e){r.e(e)}finally{r.f()}return void 0!==e.synviewType}),{hitTolerance:5,layerFilter:function(e){return o.has(e)}}),void 0===e.feature&&this.options.map.forEachLayerAtPixel(e.pixel,(function(t,i){if(null==i||i.length<1)return!1;var o,r=jt(n.keys());try{var a=function(){var r=o.value;if(n.get(r).forEach((function(n){void 0===e.synviewType&&n.getClassName()==t.getClassName()&&(e.color=i,e.layer=t,e.synviewType=r)})),void 0!==e.synviewType)return"break"};for(r.s();!(o=r.n()).done&&"break"!==a(););}catch(e){r.e(e)}finally{r.f()}return void 0!==e.synviewType}),{hitTolerance:5,layerFilter:function(e){return r.has(e.getClassName())}}),e}},{key:"findLayerInType",value:function(e,t){return t.getLayerGroup().getLayers().getArray().findIndex((function(t){return t==e}))>-1}}])&&Et(t.prototype,n),a}(He);function Mt(e){return(Mt="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)}function Vt(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Gt(e,t){return(Gt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ft(e,t){return!t||"object"!==Mt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Yt(e){return(Yt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const Xt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Gt(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Yt(i);if(o){var n=Yt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Ft(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),void 0===(t=r.call(this,e)).options.layerGroup&&(t.options.layerGroup=L.layerGroup().addTo(t.options.map)),t}return t=a,(n=[{key:"makeLayerGroup",value:function(){return L.layerGroup().addTo(this.options.layerGroup)}}])&&Vt(t.prototype,n),a}(He),zt=ol.format.GeoJSON;var qt=n.n(zt);const Ht=ol.source.Vector;var Kt=n.n(Ht);function Ut(e){return(Ut="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)}function $t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zt(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Wt(e,t){return(Wt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Jt(e,t){return!t||"object"!==Ut(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Qt(e){return(Qt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const en=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Wt(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Qt(i);if(o){var n=Qt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Jt(this,e)});function a(){return $t(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getId",value:function(){var e=this.getDatetime();return isNaN(e)?"":e.toISOString()}},{key:"makeOLLayer",value:function(){var e={source:this.options.ol.source,events:this.options.ol.events,style:this.options.ol.style};if(this.options.ol,!("refresh"in e.source)){var t=e.source;void 0!==this.options.url&&"format"in t&&void 0!==t.format&&(t.url=this.options.url),"projection"in t&&void 0!==t.projection||(t.projection=Lt),e.source=new(Kt())(t)}return"function"==typeof e.style&&(e.style=e.style.bind(this)),this.className&&(e.className=this.className),new(Qe())(e)}},{key:"setOLStyle",value:function(e){return void 0===this.layer&&this.getOLLayer(),void 0!==this.layer&&"setStyle"in this.layer?(0==arguments.length?this.layer.setStyle(this.layer.getStyle()):this.layer.setStyle(e),this):this}}])&&Zt(t.prototype,n),a}(ot);function tn(e){return(tn="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)}function nn(e,t){return(nn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function on(e,t){return!t||"object"!==tn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function rn(e){return(rn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const an=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&nn(e,t)}(o,e);var t,n,i=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,i=rn(t);if(n){var o=rn(this).constructor;e=Reflect.construct(i,arguments,o)}else e=i.apply(this,arguments);return on(this,e)});function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).options.ol.source.url=t.options.url,t.options.ol.source.format=new(qt()),t}return o}(en),sn=ol.source.VectorTile;var ln=n.n(sn);const un=ol.layer.VectorTile;var cn=n.n(un);function fn(e){return(fn="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)}function dn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pn(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function hn(e,t){return(hn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vn(e,t){return!t||"object"!==fn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function yn(e){return(yn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const mn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&hn(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=yn(i);if(o){var n=yn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return vn(this,e)});function a(){return dn(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"makeOLLayer",value:function(){var e={source:this.options.ol.source,events:this.options.ol.events,style:this.options.ol.style};if(!("refresh"in e.source)){var t=e.source;!("tileUrlFunction"in t)&&void 0!==this.options.url&&"format"in t&&void 0!==t.format&&(t.url=this.options.url),"projection"in t&&void 0!==t.projection||(t.projection=Lt),e.source=new(ln())(t)}return"function"==typeof e.style&&(e.style=e.style.bind(this)),this.className&&(e.className=this.className),new(cn())(e)}}])&&pn(t.prototype,n),a}(en);function bn(e){return(bn="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)}function gn(e,t){return(gn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wn(e,t){return!t||"object"!==bn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _n(e){return(_n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const On=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gn(e,t)}(o,e);var t,n,i=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,i=_n(t);if(n){var o=_n(this).constructor;e=Reflect.construct(i,arguments,o)}else e=i.apply(this,arguments);return wn(this,e)});function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).options.ol.source.format=new(qt()),t}return o}(mn),Sn=ol.source.ImageStatic;var kn=n.n(Sn);const Pn=ol.layer.Image;var Tn=n.n(Pn);function xn(e){return(xn="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)}function jn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rn(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function En(e,t){return(En=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Cn(e,t){return!t||"object"!==xn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Nn(e){return(Nn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const Bn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&En(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Nn(i);if(o){var n=Nn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Cn(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.url,i=void 0===n?void 0:n,o=t.datetime,s=void 0===o?void 0:o,l=t.mimetype,u=void 0===l?void 0:l,c=t.reloadTime,f=void 0===c?void 0:c,d=t.className,p=void 0===d?void 0:d,h=t.extent,v=t.ol,y=void 0===v?{}:v;return jn(this,a),(e=r.call(this,{url:i,datetime:s,mimetype:u,reloadTime:f,className:p,ol:y})).options.extent=h,e}return t=a,(n=[{key:"makeOLLayer",value:function(){var e=this.options.ol.source;return e.url=this.options.url,e.imageExtent=(0,Tt.transformExtent)(this.options.extent,Lt,"EPSG:3857"),new(Tn())({source:new(kn())(e),className:this.className})}},{key:"makeLLLayer",value:function(){return L.imageOverlay(this.options.url,[[this.options.extent[1],this.options.extent[0]],[this.options.extent[3],this.options.extent[2]]])}},{key:"preload",value:function(){this.getOLLayer().getSource().image_.load()}}])&&Rn(t.prototype,n),a}(ot),In=ol.source.OSM;var Dn=n.n(In);const Ln=ol.layer.Tile;var An=n.n(Ln);function Mn(e){return(Mn="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)}function Vn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gn(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Fn(e,t){return(Fn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Yn(e,t){return!t||"object"!==Mn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Xn(e){return(Xn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const zn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Fn(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Xn(i);if(o){var n=Xn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Yn(this,e)});function a(){return Vn(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"makeOLLayer",value:function(){var e=this.options.ol.source;return e.url=this.options.url,new(An())({source:new(Dn())(e)})}}])&&Gn(t.prototype,n),a}(ot);function qn(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Hn=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._isShown=!1,this._content=void 0}var t,n;return t=e,(n=[{key:"isShown",get:function(){return this._isShown}},{key:"content",get:function(){return this._content},set:function(e){var t=this._content;this._content=e,t!==this._content&&this.onContentChange()}},{key:"show",value:function(){var e=!this.isShown;return this._isShown=!0,e&&this.trigger("show:tooltip"),this}},{key:"hide",value:function(){var e=this.isShown;return this._isShown=!1,e&&this.trigger("hide:tooltip"),this}},{key:"update",value:function(){return this}},{key:"onContentChange",value:function(){}}])&&qn(t.prototype,n),e}();B(Hn.prototype);const Kn=bootstrap;function Un(e){return(Un="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)}function $n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zn(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Wn(e,t,n){return(Wn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ei(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function Jn(e,t){return(Jn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qn(e,t){return!t||"object"!==Un(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ei(e){return(ei=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const ti=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jn(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ei(i);if(o){var n=ei(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Qn(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.tooltipNode,i=void 0===n?void 0:n,o=t.bootstrapOptions,s=void 0===o?void 0:o,l=t.closeOnMouseMove,u=void 0===l||l,c=t.closeOnMouseEnter,f=void 0!==c&&c;return $n(this,a),(e=r.call(this)).bootstrapOptions=s||{},e._initBootstrapOptions(s),e.closeOnMouseMove=u,e.closeOnMouseEnter=f,e._tooltipNode=void 0,e.tooltipNode=i,e._bsTooltip=void 0,e}return t=a,(n=[{key:"tooltipNode",get:function(){return this._tooltipNode},set:function(e){if(void 0===e)return this._tooltipNode=e,void(this._bsTooltip=void 0);this._tooltipNode=$()(e),this._initTooltipNode()}},{key:"show",value:function(e){var t=e.posX,n=e.posY;if(void 0!==this._tooltipNode&&void 0!==this._bsTooltip)return this.tooltipNode.css({left:"".concat(t,"px"),top:"".concat(n,"px")}),this.isShown?this._bsTooltip.update():this._bsTooltip.show(),Wn(ei(a.prototype),"show",this).call(this)}},{key:"hide",value:function(){if(void 0!==this._tooltipNode&&void 0!==this._bsTooltip)return this.isShown&&(this.tooltipNode.attr("data-original-title",void 0),this._bsTooltip.hide()),Wn(ei(a.prototype),"hide",this).call(this)}},{key:"update",value:function(){if(void 0!==this._bsTooltip)return this._bsTooltip.update(),Wn(ei(a.prototype),"update",this).call(this)}},{key:"onContentChange",value:function(){this.tooltipNode.attr("data-bs-original-title",ni(this.content)?this.content:"-"),this._updateNonStringContent(),this.update()}},{key:"_initBootstrapOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.trigger,n=void 0===t?"manual":t;this.bootstrapOptions.trigger=n}},{key:"_initTooltipNode",value:function(){var e=this;void 0!==this._bsTooltip&&this._bsTooltip.dispose(),this._bsTooltip=new Kn.Tooltip(this._tooltipNode[0],this.bootstrapOptions),this.tooltipNode[0].addEventListener("inserted.bs.tooltip",(function(){var t=e._updateNonStringContent();t.length&&(e.closeOnMouseMove&&t.children(".tooltip-inner").mousemove((function(){return e.hide()})),e.closeOnMouseEnter&&t.children(".tooltip-inner").mouseenter((function(){return e.hide()})))}))}},{key:"_updateNonStringContent",value:function(){var e=$()(document.getElementById(this.tooltipNode.attr("aria-describedby")));if(e.length)return void 0===this.content||ni(this.content)||e.children(".tooltip-inner").empty().append(this.content),e}}])&&Zn(t.prototype,n),a}(Hn);var ni=function(e){return"[object String]"==Object.prototype.toString.call(e)};function ii(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oi(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}const ri=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.id;ii(this,e),this._id=n}var t,n;return t=e,(n=[{key:"id",get:function(){return this._id},set:function(e){this._id=e,this.setId(e)}},{key:"setId",value:function(){}}])&&oi(t.prototype,n),e}();function ai(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,o,r=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(i=n.next()).done)&&(r.push(i.value),!t||r.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return si(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?si(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function si(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function li(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ui(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var ci=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.fireReplace,i=void 0===n||n,o=t.fireAddRemoveOnReplace,r=void 0!==o&&o,a=t.appendOnReplace,s=void 0===a||a,l=t.sortFunction,u=t.emptyObjectMaker;li(this,e),this.options={fireReplace:i,fireAddRemoveOnReplace:r,appendOnReplace:s,sortFunction:l,emptyObjectMaker:u},this._itemIds=[],this._items={}}var t,n;return t=e,(n=[{key:"count",get:function(){return this._itemIds.length}},{key:Symbol.iterator,value:function(){var e=this,t=0;return{next:function(){return t<e._itemIds.length?{value:e._items[e._itemIds[t++]]}:{done:!0}}}}},{key:"items",get:function(){var e=this;return this._itemIds.map((function(t){return e._items[t]}))}},{key:"itemIds",get:function(){return this._itemIds}},{key:"sortFunction",get:function(){return this.options.sortFunction}},{key:"sortFunction",set:function(e){this.options.sortFunction=e,this._sort()}},{key:"getItemById",value:function(e){return e in this._items?this._items[e]:void 0===this.options.emptyObjectMaker?new ri:this.options.emptyObjectMaker.call(this)}},{key:"contains",value:function(e){var t=this.containsId(e.id);return t&&(t=e===this.getItemById(e.id)),t}},{key:"containsId",value:function(e){return e in this._items}},{key:"append",value:function(){for(var e=this,t=[],n=[],i=[],o=arguments.length,r=new Array(o),a=0;a<o;a++)r[a]=arguments[a];return r.forEach((function(o){var r=o.id;if(e.containsId(r)){var a=e.getItemById(r);e.options.appendOnReplace&&(e._itemIds.splice(e._itemIds.indexOf(r),1),e._itemIds.push(r)),a!==o&&(e._items[r]=o,e.options.fireReplace&&i.push([o,a]),e.options.fireAddRemoveOnReplace&&(n.push(a),t.push(o)))}else e._itemIds.push(r),e._items[r]=o,t.push(o)})),this._sort(),t.forEach((function(t){return e.trigger("add:item",t)})),n.forEach((function(t){return e.trigger("remove:item",t)})),i.forEach((function(t){var n=ai(t,2),i=n[0],o=n[1];return e.trigger("replace:item",i,o)})),this}},{key:"remove",value:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return n.forEach((function(t){var n=e._itemIds.indexOf(t.id);if(n>-1){var i=e._items[t.id];delete e._items[t.id],e._itemIds.splice(n,1),e.trigger("remove:item",i)}})),this}},{key:"removeById",value:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return n.forEach((function(t){var n=e._itemIds.indexOf(t);if(n>-1){var i=e._items[t];delete e._items[t],e._itemIds.splice(n,1),e.trigger("remove:item",i)}})),this}},{key:"_sort",value:function(){var e=this;void 0!==this.options.sortFunction&&this._itemIds.sort((function(t,n){return e.options.sortFunction(e._items[t],e._items[n])}))}}])&&ui(t.prototype,n),e}();B(ci.prototype);const fi=ci;function di(e){return function(e){if(Array.isArray(e))return vi(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||hi(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pi(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=hi(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function hi(e,t){if(e){if("string"==typeof e)return vi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vi(e,t):void 0}}function vi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function yi(e){return(yi="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)}function mi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bi(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function gi(e,t,n){return(gi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Si(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function wi(e,t){return(wi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _i(e,t){return!t||"object"!==yi(t)&&"function"!=typeof t?Oi(e):t}function Oi(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Si(e){return(Si=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const ki=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&wi(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Si(i);if(o){var n=Si(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return _i(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.resources,i=t.containersNode,o=t.timeline,s=void 0===o?void 0:o,l=t.makeContainerNode,u=void 0===l?void 0:l,c=t.firstTimeOnInit,f=void 0===c||c,d=t.lastTimeOnInit,p=void 0!==d&&d;mi(this,a),(e=r.call(this,{fireReplace:!1,fireAddRemoveOnReplace:!0}))._resources=n,e._containersNode="object"==yi(i)&&i.jquery?i[0]:i,e._timeline=void 0===s?new z:s,e._makeContainerNode=u;var h=new Map;return e.on("add:item",(function(t){t.modelviewer=Oi(e),t.containerNode=e._getContainerNode(t),isNaN(e.timeline.getSelectedTime().valueOf())&&(f||p)&&h.set(t,t.on("change:selectedVariables",(function(){if(isNaN(e._timeline.getSelectedTime().valueOf())&&(f?e._timeline.first():p&&e._timeline.last(),!isNaN(e._timeline.getSelectedTime().valueOf()))){var t,n=pi(h.keys());try{for(n.s();!(t=n.n()).done;){var i=t.value;i.un("change:selectedVariables",h.get(i)),h.delete(i)}}catch(e){n.e(e)}finally{n.f()}}})))})),e.on("remove:item",(function(t){void 0!==t.containerNode&&null!=t.containerNode.parentNode&&t.containerNode.parentNode.removeChild(t.containerNode),t.modelviewer=void 0,t.containerNode=void 0,h.has(t)&&(t.un("change:selectedVariables",h.get(t)),h.delete(t)),e.timeline.deleteSetID(t.id)})),e}return t=a,(n=[{key:"resources",get:function(){return this._resources}},{key:"containersNode",get:function(){return this._containersNode}},{key:"timeline",get:function(){return this._timeline}},{key:"append",value:function(){for(var e,t=di(this.itemIds),n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return i.filter((function(e){return void 0!==e.id})).forEach((function(e){return t.push(e.id)})),i.filter((function(e){return void 0===e.id})).forEach((function(e){for(var n=1,i="container".concat(n);t.indexOf(i)>-1;)n++,i="container".concat(n);e.id=i,t.push(i)})),(e=gi(Si(a.prototype),"append",this)).call.apply(e,[this].concat(i)),this}},{key:"_getContainerNode",value:function(e){if(void 0!==this._makeContainerNode){var t=this._makeContainerNode.call(this,this.containersNode,e);return"object"==yi(t)&&t.jquery?t[0]:t}var n=void 0!==e.containerNode?e.containerNode:document.createElement("div");return void 0!==this.containersNode&&this.containersNode.appendChild(n),n}}])&&bi(t.prototype,n),a}(fi);function Pi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ti(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}const xi=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.name,i=void 0===n?void 0:n,o=t.names,r=void 0===o?{}:o,a=t.langSortation,s=void 0===a?[]:a;Pi(this,e),this._name=i,this._names=r,this._langSortation=s}var t,n;return t=e,(n=[{key:"name",get:function(){return this.getDefaultName()},set:function(e){this._name=e}},{key:"getNameByLangNoFallback",value:function(e){return e in this._names?this._names[e]:""}},{key:"setNameByLang",value:function(e,t){this._names[e]=t,void 0===t&&delete this._names[e]}},{key:"langSortation",get:function(){return this._langSortation},set:function(e){this._langSortation=e}},{key:"getDefaultName",value:function(){return void 0!==this._name?this._name:this.getNameByLang()}},{key:"getNameByLang",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.langSortation,i=void 0===n?void 0:n,o=void 0===i?this._langSortation:i,r=Object.keys(this._names);return r.length<1?void 0===this._name?"":this._name:this._names[r.sort((function(t,n){if(t==e)return-1;if(n==e)return 1;var i=o.indexOf(t),r=o.indexOf(n);return r<0?0:i<0?1:i<r?-1:i==r?0:1}))[0]]}}])&&Ti(t.prototype,n),e}();function ji(e){return(ji="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)}function Ri(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ei(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Ci(e,t){return(Ci=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ni(e,t){return!t||"object"!==ji(t)&&"function"!=typeof t?Bi(e):t}function Bi(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ii(e){return(Ii=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const Di=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ci(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ii(i);if(o){var n=Ii(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Ni(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.id,i=t.name,o=void 0===i?void 0:i,s=t.names,l=void 0===s?{}:s,u=t.langSortation,c=void 0===u?[]:u;return Ri(this,a),e=r.call(this,{name:o,names:l,langSortation:c}),Object.defineProperty(Bi(e),"id",Object.getOwnPropertyDescriptor(ri.prototype,"id")),e._id=n,e}return t=a,(n=[{key:"setId",value:function(e){ri.prototype.setId.call(this,e)}},{key:"getDefaultName",value:function(){return void 0!==this._name?this._name:Object.keys(this._names).length>0?this.getNameByLang():void 0===this._id?"":this._id}}])&&Ei(t.prototype,n),a}(xi);function Li(e){return(Li="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)}function Ai(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mi(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Vi(e,t){return(Vi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gi(e,t){return!t||"object"!==Li(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Fi(e){return(Fi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const Yi=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Vi(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Fi(i);if(o){var n=Fi(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Gi(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.id,i=t.name,o=void 0===i?void 0:i,s=t.names,l=void 0===s?{}:s,u=t.langSortation,c=void 0===u?[]:u,f=t.variableCollection;return Ai(this,a),(e=r.call(this,{id:n,name:o,names:l,langSortation:c}))._variableCollection=f,e}return t=a,(n=[{key:"variableCollection",get:function(){return this._variableCollection},set:function(e){this._variableCollection=e}}])&&Mi(t.prototype,n),a}(Di);function Xi(e){return(Xi="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)}function zi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qi(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Hi(e,t){return(Hi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ki(e,t){return!t||"object"!==Xi(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ui(e){return(Ui=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const $i=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Hi(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ui(i);if(o){var n=Ui(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Ki(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.id,i=t.name,o=void 0===i?void 0:i,s=t.names,l=void 0===s?{}:s,u=t.langSortation,c=void 0===u?[]:u,f=t.datetime,d=void 0===f?void 0:f;return zi(this,a),(e=r.call(this,{id:n,name:o,names:l,langSortation:c}))._datetime=void 0===e.id?void 0:new Date(e.id),void 0!==d&&(e.datetime=d),e}return t=a,(n=[{key:"setId",value:function(e){this._datetime=void 0===e?void 0:new Date(e)}},{key:"datetime",get:function(){return this._datetime},set:function(e){this._datetime=e,this._id=void 0!==e?e.valueOf():void 0}}])&&qi(t.prototype,n),a}(Yi);function Zi(e){return(Zi="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)}function Wi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ji(e,t){return(Ji=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qi(e,t){return!t||"object"!==Zi(t)&&"function"!=typeof t?eo(e):t}function eo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function to(e){return(to=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function no(e){return(no="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)}function io(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oo(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ro(e,t){return(ro=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ao(e,t){return!t||"object"!==no(t)&&"function"!=typeof t?so(e):t}function so(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lo(e){return(lo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const uo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ro(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=lo(i);if(o){var n=lo(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ao(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.id,i=t.fireReplace,o=void 0===i||i,s=t.fireAddRemoveOnReplace,l=void 0!==s&&s,u=t.appendOnReplace,c=void 0===u||u,f=t.sortFunction,d=t.names,p=t.langSortation;return io(this,a),e=r.call(this,{emptyObjectMaker:function(){return new Yi},fireReplace:o,fireAddRemoveOnReplace:l,appendOnReplace:c,sortFunction:f,names:d,langSortation:p}),Object.defineProperty(so(e),"id",Object.getOwnPropertyDescriptor(ri.prototype,"id")),e._id=n,Object.defineProperty(so(e),"getDefaultName",Object.getOwnPropertyDescriptor(Di.prototype,"getDefaultName")),e._node=void 0,e.on("add:item",(function(t){void 0!==t.variableCollection&&t.variableCollection.remove(t),t.variableCollection=so(e),e.trigger("add:variable",t)})),e.on("remove:item",(function(t){return e.trigger("remove:variable",t)})),e}return t=a,(n=[{key:"setId",value:function(e){ri.prototype.setId.call(this,e)}},{key:"variables",get:function(){return this.items}},{key:"getVariableById",value:function(e){return this.getItemById(e)}},{key:"node",get:function(){return this._node},set:function(e){this._node=e}}])&&oo(t.prototype,n),a}(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ji(e,t)}(o,e);var t,n,i=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,i=to(t);if(n){var o=to(this).constructor;e=Reflect.construct(i,arguments,o)}else e=i.apply(this,arguments);return Qi(this,e)});function o(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.fireReplace,r=void 0===n||n,a=t.fireAddRemoveOnReplace,s=void 0!==a&&a,l=t.appendOnReplace,u=void 0===l||l,c=t.sortFunction,f=t.emptyObjectMaker,d=t.name,p=void 0===d?void 0:d,h=t.names,v=void 0===h?{}:h,y=t.langSortation,m=void 0===y?[]:y;return Wi(this,o),e=i.call(this,{fireReplace:r,fireAddRemoveOnReplace:s,appendOnReplace:u,sortFunction:c,emptyObjectMaker:f}),Object.defineProperty(eo(e),"name",Object.getOwnPropertyDescriptor(xi.prototype,"name")),Object.getPrototypeOf(eo(e)).getDefaultName=xi.prototype.getDefaultName,Object.getPrototypeOf(eo(e)).getNameByLang=xi.prototype.getNameByLang,Object.getPrototypeOf(eo(e)).setNameByLang=xi.prototype.setNameByLang,Object.getPrototypeOf(eo(e)).getNameByLangNoFallback=xi.prototype.getNameByLangNoFallback,e._name=p,e._names=v,e._langSortation=m,e}return o}(fi));function co(e,t){if(e){if("string"==typeof e)return fo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fo(e,t):void 0}}function fo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function po(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}const ho=function(){function e(t){var n=t.node;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._node=n,this._children=new Map,this._parent=void 0}var t,n;return t=e,(n=[{key:"node",get:function(){return this._node}},{key:"variableCollection",get:function(){return this._node.variableCollection}},{key:"children",get:function(){return function(e){if(Array.isArray(e))return fo(e)}(e=this._children.values())||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||co(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();var e}},{key:"parent",get:function(){return this._parent},set:function(e){this._parent=e}},{key:"getChildByVariable",value:function(e){return this._children.get(e)}},{key:"buildChildrenTreeForResource",value:function(t){var n=t.resource,i=t.aimedNode;if(this.node===i)return this;var o=n.getVariableByVariableCollection(this.variableCollection);if(void 0!==o.id){var r=this._children.get(o);return void 0!==r?r.buildChildrenTreeForResource({resource:n,aimedNode:i}):(this.node.children.forEach((function(t){void 0!==n.getVariableByVariableCollection(t.variableCollection).id&&(r=new e({node:t}))})),void 0!==r?(this._children.set(o,r),r.parent=this,r.buildChildrenTreeForResource({resource:n,aimedNode:i})):void 0)}}},{key:"removeChild",value:function(e){var t,n,i,o=e.child,r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=co(e))){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}(this._children.entries());try{for(r.s();!(t=r.n()).done;){var a=(n=t.value,i=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,o,r=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(i=n.next()).done)&&(r.push(i.value),!t||r.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return r}}(n,i)||co(n,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=a[0];a[1]===o&&this._children.delete(s)}}catch(e){r.e(e)}finally{r.f()}this._children.size<1&&void 0!==this.parent&&this.parent.removeChild({child:this})}},{key:"findNodeByVariables",value:function(){for(var e=this,t=void 0,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];if(i.forEach((function(n){n.variableCollection===e.variableCollection&&(t=n)})),void 0!==t){var r=this._children.get(t);if(void 0!==r){var a=r.findNodeByVariables.apply(r,i);return void 0===a?this:a}return this}}}])&&po(t.prototype,n),e}();function vo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,o,r=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(i=n.next()).done)&&(r.push(i.value),!t||r.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return r}}(e,t)||go(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yo(e){return(yo="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)}function mo(e){return function(e){if(Array.isArray(e))return wo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||go(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bo(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=go(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function go(e,t){if(e){if("string"==typeof e)return wo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wo(e,t):void 0}}function wo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function _o(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Oo=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._variableCollection=t,t.node=this,this._parents=[],this._children=[],this._resourcesTopNode=void 0,this._resources=new Map}var t,n;return t=e,(n=[{key:"variableCollection",get:function(){return this._variableCollection}},{key:"parents",get:function(){return this._parents}},{key:"children",get:function(){return this._children}},{key:"appendChild",value:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return n.forEach((function(t){e._children.push(t),t._addParent(e),e.trigger("append:child",t)})),this}},{key:"_addParent",value:function(e){this._parents.push(e)}},{key:"resources",get:function(){var e,t=[],n=bo(this._resources.values());try{for(n.s();!(e=n.n()).done;)mo(e.value.values()).forEach((function(e){return t.push.apply(t,mo(e))}))}catch(e){n.e(e)}finally{n.f()}return t}},{key:"append",value:function(){var e=this;void 0===this._resourcesTopNode&&this._makeResourcesTopNode();for(var t=0,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return i.forEach((function(n){if(!(n.variables.filter((function(t){return t.variableCollection===e.variableCollection})).length<1)){var i=e._resourcesTopNode.buildChildrenTreeForResource({resource:n,aimedNode:e});if(void 0!==i){var o=n.getVariableByVariableCollection(i.variableCollection);if(void 0!==o){var r=e._resources.get(i);void 0===r&&(r=new Map,e._resources.set(i,r));var a=r.get(o);void 0===a&&(a=new Set,r.set(o,a)),a.has(n)||(a.add(n),t++)}}}})),t}},{key:"remove",value:function(){for(var e=this,t=0,n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return i.forEach((function(n){var i,o=(i=e._resourcesTopNode).findNodeByVariables.apply(i,mo(n.variables));if(void 0!==o){var r=n.getVariableByVariableCollection(o.variableCollection),a=e._resources.get(o);if(void 0!==a){var s=a.get(r);if(void 0!==s&&(s.delete(n),t++,s.size<1&&(a.delete(r),a.size<1))){e._resources.delete(o);var l=o.parent;void 0!==l&&l.removeChild({child:o})}}}})),t}},{key:"getResourcesByVariables",value:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];if(void 0===this._resourcesTopNode)return[];var o=!1;if(n.length&&"boolean"==typeof n[0]&&(o=n.shift()),o&&0==n.length)return[];if(o){var r,a=new Set(n),s=(r=this._resourcesTopNode).findNodeByVariables.apply(r,n),l=this._resources.get(s);if(void 0!==l){var u,c=bo(l);try{var f=function(){var e=vo(u.value,2),t=e[0],i=e[1];if(!a.has(t))return"continue";if(void 0===i||i.size<1)return{v:[]};var o=mo(i)[0],r=!0;return n.forEach((function(e){o.getVariableByVariableCollection(e.variableCollection)!==e&&(r=!1)})),{v:r?mo(i):[]}};for(c.s();!(u=c.n()).done;){var d=f();if("continue"!==d&&"object"===yo(d))return d.v}}catch(e){c.e(e)}finally{c.f()}}return[]}var p=function e(t){var i=new Set;if(t.children.length<1)return i.add(t),i;var o=void 0;if(n.forEach((function(e){e.variableCollection===t.variableCollection&&(o=e)})),void 0===o)t.children.forEach((function(t){i=new Set([].concat(mo(i),mo(e(t))))}));else{var r=t.getChildByVariable(o);void 0!==r&&(i=new Set([].concat(mo(i),mo(e(r)))))}return i},h=p(this._resourcesTopNode),v=[];return mo(h).forEach((function(t){var i=e._resources.get(t);if(void 0!==i){var o,r=bo(i);try{var a=function(){var e=vo(o.value,2),i=e[0],r=e[1];if(i.variableCollection!==t.variableCollection)return"continue";if(void 0===r||r.size<1)return{v:void 0};var a=mo(r)[0],s=!0;n.forEach((function(e){a.getVariableByVariableCollection(e.variableCollection)!==e&&(s=!1)})),s&&v.push.apply(v,mo(r))};for(r.s();!(o=r.n()).done;){var s=a();if("continue"!==s&&"object"===yo(s))return s.v}}catch(e){r.e(e)}finally{r.f()}}})),v}},{key:"hasResourcesByVariables",value:function(){return this.getResourcesByVariables.apply(this,arguments).length>0}},{key:"_makeResourcesTopNode",value:function(){var e=new Set;this._resourcesTopNode=new ho({node:function t(n){var i=n.parents;if(i.length<1)return n;var o=void 0;return i.forEach((function(n){if(!e.has(n)){e.add(n);var i=t(n);void 0!==i&&(o=i)}})),o}(this)})}}])&&_o(t.prototype,n),e}();B(Oo.prototype);const So=Oo;function ko(e){return function(e){if(Array.isArray(e))return Po(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Po(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Po(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Po(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function To(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xo(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}const jo=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.variables,o=void 0===i?[]:i,r=n.datetime,a=void 0===r?void 0:r,s=n.run,l=void 0===s?void 0:s,u=n.offset,c=void 0===u?void 0:u;To(this,e),this._variables=new Map,o.forEach((function(e){return t._variables.set(e.variableCollection,e)})),this._datetime=a,this._run=l,this._offset=c,this._updateDatetime()}var t,n;return t=e,(n=[{key:"variables",get:function(){return ko(this._variables.values())}},{key:"datetime",get:function(){return this._datetime},set:function(e){this._datetime=e}},{key:"run",get:function(){return this._run},set:function(e){this._run=e,this._updateDatetime()}},{key:"offset",get:function(){return this._offset},set:function(e){this._offset=e,this._updateDatetime()}},{key:"getVariableByVariableCollection",value:function(e){var t=this._variables.get(e);return void 0===t?new Yi:t}},{key:"isDefinedBy",value:function(){for(var e=!1,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];n.length&&"boolean"==typeof n[0]&&(e=n.shift());var o=new Set(ko(this._variables.values()));if(!e)return 0==n.filter((function(e){return!o.has(e)})).length;if(0!=n.filter((function(e){return!o.has(e)})).length)return!1;var r=new Set(n);return 0==ko(o).filter((function(e){return!r.has(e)})).length}},{key:"isDefinedByVariableOf",value:function(e){return void 0!==this._variables.get(e)}},{key:"_updateDatetime",value:function(){void 0!==this._run&&void 0!==this._offset&&(this.datetime=new Date(this._run.valueOf()+1e3*this._offset))}}])&&xo(t.prototype,n),e}();function Ro(e){return(Ro="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)}function Eo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Co(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function No(e,t){return(No=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Bo(e,t){return!t||"object"!==Ro(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Io(e){return(Io=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const Do=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&No(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Io(i);if(o){var n=Io(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Bo(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.variables,i=void 0===n?[]:n,o=t.datetime,s=void 0===o?void 0:o,l=t.run,u=void 0===l?void 0:l,c=t.offset,f=void 0===c?void 0:c,d=t.url,p=void 0===d?void 0:d;return Eo(this,a),(e=r.call(this,{variables:i,datetime:s,run:u,offset:f}))._url=p,e}return t=a,(n=[{key:"url",get:function(){return this._url}}])&&Co(t.prototype,n),a}(jo);function Lo(e){return(Lo="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)}function Ao(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mo(e,t){return(Mo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Vo(e,t){return!t||"object"!==Lo(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Go(e){return(Go=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const Fo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Mo(e,t)}(o,e);var t,n,i=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,i=Go(t);if(n){var o=Go(this).constructor;e=Reflect.construct(i,arguments,o)}else e=i.apply(this,arguments);return Vo(this,e)});function o(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.id,r=void 0===n?void 0:n,a=t.pres,s=void 0===a?void 0:a,l=t.tmpc,u=void 0===l?void 0:l,c=t.dwpc,f=void 0===c?void 0:c,d=t.ptrace,p=void 0===d?void 0:d,h=t.ttrace,v=void 0===h?void 0:h,y=t.blayer,m=void 0===y?void 0:y,b=t.tlayer,g=void 0===b?void 0:b,w=t.lclpres,_=void 0===w?void 0:w,O=t.lclhght,S=void 0===O?void 0:O,k=t.lfcpres,P=void 0===k?void 0:k,T=t.lfchght,x=void 0===T?void 0:T,j=t.elpres,R=void 0===j?void 0:j,E=t.elhght,C=void 0===E?void 0:E,N=t.mplpres,B=void 0===N?void 0:N,I=t.mplhght,D=void 0===I?void 0:I,L=t.bplus,A=void 0===L?void 0:L,M=t.bminus,V=void 0===M?void 0:M,G=t.bfzl,F=void 0===G?void 0:G,Y=t.b3km,X=void 0===Y?void 0:Y,z=t.b6km,q=void 0===z?void 0:z,H=t.p0c,K=void 0===H?void 0:H,U=t.pm10c,$=void 0===U?void 0:U,Z=t.pm20c,W=void 0===Z?void 0:Z,J=t.pm30c,Q=void 0===J?void 0:J,ee=t.hght0c,te=void 0===ee?void 0:ee,ne=t.hghtm10c,ie=void 0===ne?void 0:ne,oe=t.hghtm20c,re=void 0===oe?void 0:oe,ae=t.hghtm30c,se=void 0===ae?void 0:ae,le=t.wm10c,ue=void 0===le?void 0:le,ce=t.wm20c,fe=void 0===ce?void 0:ce,de=t.wm30c,pe=void 0===de?void 0:de,he=t.li5,ve=void 0===he?void 0:he,ye=t.li3,me=void 0===ye?void 0:ye,be=t.brnshear,ge=void 0===be?void 0:be,we=t.brnu,_e=void 0===we?void 0:we,Oe=t.brnv,Se=void 0===Oe?void 0:Oe,ke=t.limax,Pe=void 0===ke?void 0:ke,Te=t.limaxpres,xe=void 0===Te?void 0:Te,je=t.cap,Re=void 0===je?void 0:je,Ee=t.cappres,Ce=void 0===Ee?void 0:Ee,Ne=t.bmin,Be=void 0===Ne?void 0:Ne,Ie=t.bminpres,De=void 0===Ie?void 0:Ie;return Ao(this,o),(e=i.call(this,{id:r})).pres=s,e.tmpc=u,e.dwpc=f,e.ptrace=p,e.ttrace=v,e.blayer=m,e.tlayer=g,e.lclpres=_,e.lclhght=S,e.lfcpres=P,e.lfchght=x,e.elpres=R,e.elhght=C,e.mplpres=B,e.mplhght=D,e.bplus=A,e.bminus=V,e.bfzl=F,e.b3km=X,e.b6km=q,e.p0c=K,e.pm10c=$,e.pm20c=W,e.pm30c=Q,e.hght0c=te,e.hghtm10c=ie,e.hghtm20c=re,e.hghtm30c=se,e.wm10c=ue,e.wm20c=fe,e.wm30c=pe,e.li5=ve,e.li3=me,e.brnshear=ge,e.brnu=_e,e.brnv=Se,e.limax=Pe,e.limaxpres=xe,e.cap=Re,e.cappres=Ce,e.bmin=Be,e.bminpres=De,e}return o}(ri);function Yo(e){return function(e){if(Array.isArray(e))return Xo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Xo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xo(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function zo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qo(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}const Ho=function(){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.calcMissing,o=void 0!==i&&i,r=n.parcels,a=void 0===r?[]:r;zo(this,e),this.options={calcMissing:o},this.levels={},this._parcelCollection=new fi({fireAddRemoveOnReplace:!0,fireReplace:!1,emptyObjectMaker:function(){return new Fo}}),(t=this._parcelCollection).append.apply(t,Yo(a))}var n,i;return n=e,(i=[{key:"parcelCollection",get:function(){return this._parcelCollection}},{key:"addLevels",value:function(e,t){return e.forEach((function(e){this.addLevel(e,t)}),this),this}},{key:"addLevel",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.calcMissing;return n=n||this.options.calcMissing,"pres"in e&&void 0!==e.pres&&(n&&(e=this.calculateMissingData(e)),this.levels[e.pres]=e),this}},{key:"calculateMissingData",value:function(e){var n={pres:e.pres,hght:e.hght,u:e.u,v:e.v,wdir:e.wdir,wspd:e.wspd,tmpk:e.tmpk,dwpk:e.dwpk,relh:e.relh,mixr:e.mixr,theta:e.theta,thetae:e.thetae,wetbulb:e.wetbulb,vtmp:e.vtmp};return void 0===n.hght&&(n.hght=t(n.pres)),void 0===n.u&&void 0===n.v&&void 0!==n.wdir&&void 0!==n.wspd?(n.u=n.wspd*Math.sin(n.wdir/180*Math.PI),n.v=n.wspd*Math.cos(n.wdir/180*Math.PI)):void 0!==n.u&&void 0!==n.v&&void 0===n.wdir&&void 0===n.wspd&&(n.wspd=Math.sqrt(Math.pow(n.u,2)+Math.pow(n.v,2)),n.wdir=Math.arctan(n.u/n.v)/Math.PI*180),void 0!==n.tmpk&&void 0!==n.dwpk?(void 0===n.theta&&(n.theta=r(n.tmpk,n.pres)),void 0===n.thetae&&(n.thetae=c(n.tmpk,n.dwpk,n.pres))):void 0!==n.mixr&&void 0===n.dwpk&&(n.dwpk=l(n.mixr,n.pres)),n}},{key:"removeLevel",value:function(e){return e in this.levels&&delete this.levels[e],this}},{key:"getData",value:function(e){return e in this.levels?this.levels[e]:{pres:void 0,hght:void 0,tmpk:void 0,dwpk:void 0,wdir:void 0,wspd:void 0,u:void 0,v:void 0,relh:void 0,mixr:void 0,theta:void 0,thetae:void 0,wetbulb:void 0,vtmp:void 0}}},{key:"getLevels",value:function(){return Object.keys(this.levels).map((function(e){return+e})).sort((function(e,t){return e-t}))}},{key:"getNearestLevel",value:function(e){if(!(Object.keys(this.levels).length<1))return Object.keys(this.levels).sort((function(t,n){return Math.abs(t-e)-Math.abs(n-e)})).shift()}}])&&qo(n.prototype,i),e}();function Ko(e){return(Ko="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)}function Uo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $o(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Zo(e,t){return(Zo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wo(e,t){return!t||"object"!==Ko(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Jo(e){return(Jo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const Qo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Zo(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Jo(i);if(o){var n=Jo(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Wo(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.variables,i=void 0===n?[]:n,o=t.datetime,s=void 0===o?void 0:o,l=t.run,u=void 0===l?void 0:l,c=t.offset,f=void 0===c?void 0:c,d=t.sounding,p=void 0===d?void 0:d;return Uo(this,a),(e=r.call(this,{variables:i,datetime:s,run:u,offset:f}))._sounding=p,e}return t=a,(n=[{key:"sounding",get:function(){return void 0===this._sounding?new Ho:this._sounding},set:function(e){this._sounding=e}}])&&$o(t.prototype,n),a}(jo);function er(e){return function(e){if(Array.isArray(e))return ir(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||nr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tr(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=nr(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function nr(e,t){if(e){if("string"==typeof e)return ir(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ir(e,t):void 0}}function ir(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function or(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rr(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var ar=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.topNode,i=t.timesVariableCollections,o=void 0===i?[]:i;or(this,e),this._topNode=n,this._availableVariablesMap=new Map,this._timesVariableCollections=o}var t,n;return t=e,(n=[{key:"topNode",get:function(){return this._topNode}},{key:"variableCollections",get:function(){var e;e=function(n){n.children.forEach((function(n){t.push(n.variableCollection),e(n)}))};var t=[this.topNode.variableCollection];return e(this.topNode),t}},{key:"availableVariablesMap",get:function(){return this._availableVariablesMap}},{key:"append",value:function(){for(var e,t=this,n=[],i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return o.forEach((function(e){var i=t._getTopNodeOfResourceDefinition(e,t.topNode);if(void 0!==i){var o=t._getTopMostChildWithAllVariables(new Set(e.variables),i,!0);void 0!==o&&o.append(e)>0&&(n.push(e),t._addAvailableVariablesMapByResource(e))}})),n.length>0&&(lr.timeoutId&&clearTimeout(lr.timeoutId),(e=lr.addedResources).push.apply(e,n),lr.timeoutId=setTimeout((function(){t.trigger("change:resources",{addedResources:lr.addedResources}),lr.addedResources=[]}),100)),this}},{key:"_addAvailableVariablesMapByResource",value:function(e){var t=this;e.variables.forEach((function(e){void 0!==e.variableCollection.node&&(t._availableVariablesMap.has(e.variableCollection.node)||t._availableVariablesMap.set(e.variableCollection.node,new Set),t._availableVariablesMap.get(e.variableCollection.node).add(e))}))}},{key:"remove",value:function(){for(var e=this,t=[],n=new Map,i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return o.forEach((function(i){var o=e._getTopNodeOfResourceDefinition(i,e.topNode);if(void 0!==o){var r=e._getTopMostChildWithAllVariables(new Set(i.variables),o,!0);void 0!==r&&r.remove(i)>0&&(t.push(i),n.has(r)||n.set(r,new Set),n.get(r).add(i))}})),n.size>0&&this._removeAvailableVariablesMapByResources(n),t.length>0&&this.trigger("change:resources",{removedResources:t}),this}},{key:"_removeAvailableVariablesMapByResources",value:function(e){var t,n=new Set,i=tr(e.entries());try{var o=function(){var e,i,o,r=(i=t.value,o=2,function(e){if(Array.isArray(e))return e}(i)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,o,r=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(i=n.next()).done)&&(r.push(i.value),!t||r.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return r}}(i,o)||nr(i,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=r[0],s=r[1],l=new Set,u=tr(s);try{for(u.s();!(e=u.n()).done;)e.value.variables.forEach((function(e){return l.add(e)}))}catch(e){u.e(e)}finally{u.f()}var c,f=tr(l);try{for(f.s();!(c=f.n()).done;){var d=c.value;a.hasResourcesByVariables(d)||n.add(d)}}catch(e){f.e(e)}finally{f.f()}};for(i.s();!(t=i.n()).done;)o()}catch(e){i.e(e)}finally{i.f()}var r,a=tr(n);try{for(a.s();!(r=a.n()).done;){var s=r.value,l=this.getNodeByVariableCollection(s.variableCollection);this._hasResourcesOfNodeChildren(l,[s])||this._availableVariablesMap.has(l)&&this._availableVariablesMap.get(l).delete(s)}}catch(e){a.e(e)}finally{a.f()}}},{key:"getTopMostNodeWithAllVariables",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=this._getTopMostChildWithAllVariables(new Set(t),this.topNode,!0);return void 0===i?new So(new uo):i}},{key:"_getTopNodeOfResourceDefinition",value:function(e,t){var n=this;if(e.isDefinedByVariableOf(t.variableCollection))return t;var i=void 0;return t.children.forEach((function(t){void 0!==i&&(i=n._getTopNodeOfResourceDefinition(e,t))})),i}},{key:"_getTopMostChildWithAllVariables",value:function(e,t,n){var i=this,o=!1;if(t.variableCollection.variables.forEach((function(t){e.has(t)&&(o=!0,e.delete(t))})),0==e.size)return t;if(0!=t.children.length&&(o||n)){var r=void 0;return t.children.forEach((function(t){void 0===r&&(r=i._getTopMostChildWithAllVariables(e,t,n))})),r}}},{key:"getNodeByVariableCollection",value:function(e){return void 0===e.node?new So(new uo):e.node}},{key:"getNodeByVariableCollectionId",value:function(e){var t=this._getNodeByVariableCollection((function(t){return e==t.id}));return void 0===t?new So(new uo):t}},{key:"_getNodeByVariableCollection",value:function(e){return e(this.topNode.variableCollection)?this.topNode:this._findChildNodeByVariableCollection(e,this.topNode)}},{key:"_findChildNodeByVariableCollection",value:function(e,t){var n,i=this;return t.children.forEach((function(t){void 0===n&&e(t.variableCollection)?n=t:void 0===n&&t.children.length>0&&(n=i._findChildNodeByVariableCollection(e,t))})),n}},{key:"appendImage",value:function(e){var t=e.variables,n=e.datetime,i=e.run,o=e.offset,r=e.url;return this.append(new Do({variables:t,datetime:n,run:i,offset:o,url:r})),this}},{key:"getAvailableVariables",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.variables,i=void 0===n?[]:n,o=new Set,r=function e(t,n){if(n.resources.length>0){var r,a=tr(n.resources);try{for(a.s();!(r=a.n()).done;){var s=r.value;if(s.isDefinedBy.apply(s,[!1,t].concat(er(i))))return o.add(t),!0}}catch(e){a.e(e)}finally{a.f()}return!1}var l,u=tr(n.children);try{for(u.s();!(l=u.n()).done;)if(e(t,l.value))return!0}catch(e){u.e(e)}finally{u.f()}return!1};return Array.from(e).forEach((function(t){r(t,e.node)})),o}},{key:"_hasResourcesOfNodeChildren",value:function(e,t){var n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set,o=tr(e.children);try{for(o.s();!(n=o.n()).done;){var r=n.value;if(!i.has(r)){if(i.add(r),r.hasResourcesByVariables.apply(r,er(t)))return!0;if(this._hasResourcesOfNodeChildren(r,t,i))return!0}}}catch(e){o.e(e)}finally{o.f()}}},{key:"getTimesByVariables",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.variables,n=void 0===t?[]:t,i=e.exact,o=void 0!==i&&i,r=this._getTopMostChildWithAllVariables(new Set(n),this.topNode,!0);if(void 0===r)return[];var a=new Set,s=function e(t){t.getResourcesByVariables.apply(t,[o].concat(er(n))).forEach((function(e){void 0!==e.datetime&&a.add(e.datetime.valueOf())})),t.children.forEach((function(t){return e(t)}))};return s(r),er(a).sort().map((function(e){return new Date(e)}))}}])&&rr(t.prototype,n),e}();B(ar.prototype);const sr=ar;var lr={timeoutId:void 0,addedResources:[]};function ur(e){return(ur="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)}function cr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function fr(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function dr(e,t){return(dr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pr(e,t){return!t||"object"!==ur(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function hr(e){return(hr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const vr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&dr(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=hr(i);if(o){var n=hr(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return pr(this,e)});function a(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);var e=new Set;["models","runs","regions","fields","levels","accumulations","thresholds"].forEach((function(t){return e.add(new uo({id:t}))}));var t,n={},i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return cr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cr(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}(e);try{for(i.s();!(t=i.n()).done;){var o=t.value;n[o.id]=new So(o)}}catch(e){i.e(e)}finally{i.f()}return n.models.appendChild(n.runs),n.runs.appendChild(n.regions),n.regions.appendChild(n.fields),n.fields.appendChild(n.levels,n.accumulations),n.accumulations.appendChild(n.thresholds),r.call(this,{topNode:n.models,timesVariableCollections:new Set([n.models.variableCollection,n.runs.variableCollection])})}return t=a,(n=[{key:"addVariable",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.id,i=t.name,o=void 0===i?void 0:i,r=t.names,a=void 0===r?{}:r,s=t.langSortation,l=void 0===s?[]:s,u=t.datetime,c=void 0===u?void 0:u,f=void 0===c?new Yi({id:n,name:o,names:a,langSortation:l}):new $i({id:n,name:o,names:a,langSortation:l,datetime:c});return e.append(f),this}},{key:"models",get:function(){return this.getNodeByVariableCollectionId("models").variableCollection}},{key:"runs",get:function(){return this.getNodeByVariableCollectionId("runs").variableCollection}},{key:"regions",get:function(){return this.getNodeByVariableCollectionId("regions").variableCollection}},{key:"fields",get:function(){return this.getNodeByVariableCollectionId("fields").variableCollection}},{key:"levels",get:function(){return this.getNodeByVariableCollectionId("levels").variableCollection}},{key:"accumulations",get:function(){return this.getNodeByVariableCollectionId("accumulations").variableCollection}},{key:"thresholds",get:function(){return this.getNodeByVariableCollectionId("thresholds").variableCollection}}])&&fr(t.prototype,n),a}(sr);function yr(e){return function(e){if(Array.isArray(e))return br(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||mr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mr(e,t){if(e){if("string"==typeof e)return br(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?br(e,t):void 0}}function br(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function gr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wr(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var _r=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.alwaysAvailableCollections,i=void 0===n?[]:n;gr(this,e),this._alwaysAvailableCollections=new Set(i),this._modelviewer=void 0,this._container=void 0,this._parentNode=void 0,this._resourceNode=void 0,this._resourceOutput={image:void 0,thermodynamicDiagram:void 0}}var t,n;return t=e,(n=[{key:"modelviewer",get:function(){return this._modelviewer},set:function(e){var t=this;this._modelviewer=e,void 0!==this._modelviewer&&this._modelviewer.resources.variableCollections.forEach((function(e){e.on("add:variable",(function(e){t.trigger("add:variable",{variable:e})}))}))}},{key:"container",get:function(){return this._container},set:function(e){var t=this;this._container=e,void 0!==this._container&&this._container.on("change:visibleResource",(function(){t._onChangeVisibleResource()}))}},{key:"parentNode",get:function(){return this._parentNode},set:function(e){this._parentNode=e,this.onInit()}},{key:"resourceNode",get:function(){return this._resourceNode},set:function(e){this._resourceNode=e,this._onChangeVisibleResource()}},{key:"render",value:function(){this.onInit(),this.onChangeVisibleResource()}},{key:"onInit",value:function(){var e=this;void 0!==this.parentNode&&($()(this.parentNode).empty(),this.trigger("init:display"),void 0!==this._modelviewer&&this._modelviewer.resources.variableCollections.forEach((function(t){e.trigger("add:variableCollection",{variableCollection:t});var n,i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=mr(e))){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}(t);try{for(i.s();!(n=i.n()).done;){var o=n.value;e.trigger("add:variable",{variable:o})}}catch(e){i.e(e)}finally{i.f()}})))}},{key:"getAvailableVariables",value:function(e){var t=e.variableCollection,n=this._getParentsVariables(t.node);return this._modelviewer.resources.getAvailableVariables(t,{variables:n})}},{key:"_getParentsVariables",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Set,i=new Set;return e.parents.forEach((function(e){if(!n.has(e)){n.add(e),Array.from(e.variableCollection).forEach((function(e){t._container.selectedVariables.has(e)&&i.add(e)}));var o=t._getParentsVariables(e,n);o.size>0&&(i=new Set([].concat(yr(i),yr(o))))}})),i}},{key:"_onChangeVisibleResource",value:function(){if(void 0!==this._resourceNode){if(void 0!==this._container){var e=this._container.visibleResource;if("url"in e)void 0!==this.thermodynamicDiagram&&(this.thermodynamicDiagram=void 0,$()(this._resourceNode).empty()),void 0===this._resourceOutput.image&&($()(this._resourceNode).empty(),this._resourceOutput.image=$()("<img>").css({"max-width":"100%"}),$()(this._resourceNode).append(this._resourceOutput.image)),this._resourceOutput.image.attr("src",e.url);else if("sounding"in e){void 0!==this._resourceOutput.image&&(this._resourceOutput.image=void 0,$()(this._resourceNode).empty());var t=!1;this._resourceOutput.thermodynamicDiagram.soundings.forEach((function(n){n.getSounding()===e.sounding?(t=!0,n.visible(!0)):n.visible(!1)})),t||this._resourceOutput.thermodynamicDiagram.addSounding(e.sounding)}else void 0!==this._resourceOutput.image&&(this._resourceOutput.image=void 0,$()(this._resourceNode).empty()),void 0!==this._resourceOutput.thermodynamicDiagram&&this._resourceOutput.thermodynamicDiagram.soundings.forEach((function(e){return e.visible(!1)}))}}else this.trigger("change:visibleResource")}}])&&wr(t.prototype,n),e}();B(_r.prototype);const Or=_r;function Sr(e){return(Sr="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)}function kr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,o,r=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(i=n.next()).done)&&(r.push(i.value),!t||r.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return r}}(e,t)||xr(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pr(e){return function(e){if(Array.isArray(e))return jr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||xr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Tr(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=xr(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function xr(e,t){if(e){if("string"==typeof e)return jr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jr(e,t):void 0}}function jr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Rr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Er(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Cr(e,t){return(Cr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Nr(e,t){return!t||"object"!==Sr(t)&&"function"!=typeof t?Br(e):t}function Br(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ir(e){return(Ir=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Dr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Cr(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ir(i);if(o){var n=Ir(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Nr(this,e)});function a(){var e,t,n,i,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=o.id,l=o.display,u=void 0===l?void 0:l,c=o.adaptSuitableResource,f=void 0===c?{}:c;return Rr(this,a),(e=r.call(this,{id:s}))._display=void 0===u?new Or:u,e._display.modelviewer=e.modelviewer,e._display.container=Br(e),e._display.parentNode=e._containerNode,e._adaptSuitableResource={},e._initAdaptSuitableResource(f),e._modelviewer=void 0,e._visibleResource,e._displayVariables=new Set,e._selectedVariables=new Map,e._selectedNode=void 0,e._enabledResources=new Map,e._containerNode=void 0,e._debouncedChangeSelectedVariables=(n=new Set,i=new Set,function(o){var r,a=o.addedVariables,s=o.removedVariables,l=Tr(a);try{for(l.s();!(r=l.n()).done;){var u=r.value;i.has(u)&&i.delete(u)}}catch(e){l.e(e)}finally{l.f()}var c,f=Tr(s);try{for(f.s();!(c=f.n()).done;){var d=c.value;n.has(d)&&n.delete(d)}}catch(e){f.e(e)}finally{f.f()}n=new Set([].concat(Pr(n),Pr(a))),i=new Set([].concat(Pr(i),Pr(s))),clearTimeout(t),t=setTimeout((function(){e.trigger("change:selectedVariables",{addedVariables:n,removedVariables:i}),n.clear(),i.clear()}),300)}),e._listeners={mirror:[],timeline:{timeline:void 0,listenerKey:void 0},resources:{resources:void 0,listenerKey:void 0}},e}return t=a,(n=[{key:"display",get:function(){return this._display}},{key:"modelviewer",get:function(){return this._modelviewer},set:function(e){var t=this;if(this._modelviewer=e,void 0===this._modelviewer)return void 0!==this._listeners.timeline.listenerKey&&this._listeners.timeline.timeline.un("change:time",this._listeners.timeline.listenerKey),void(void 0!==this._listeners.resources.listenerKey&&this._listeners.resources.resources.un("change:resources",this._listeners.resources.listenerKey));this._display.modelviewer=e,this._listeners.timeline.timeline=this._modelviewer.timeline,this._listeners.timeline.listenerKey=this._modelviewer.timeline.on("change:time",(function(){return t._setVisibleResource()})),this._listeners.resources.resources=this._modelviewer.resources,this._listeners.resources.listenerKey=this._modelviewer.resources.on("change:resources",(function(){t._setTimes(),t._setEnabledResources(),t._updateSelectedVariables()})),this._setTimes()}},{key:"containerNode",get:function(){return this._containerNode},set:function(e){this._containerNode=e,void 0!==this._containerNode&&(this._display.parentNode=this._containerNode)}},{key:"visibleResource",get:function(){return void 0===this._visibleResource?new jo:this._visibleResource}},{key:"displayVariables",get:function(){return this._displayVariables},set:function(e){var t,n=new Set,i=Tr(e=new Set(e));try{for(i.s();!(t=i.n()).done;){var o=t.value;this._displayVariables.has(o)||n.add(o)}}catch(e){i.e(e)}finally{i.f()}var r,a=new Set,s=Tr(this.displayVariables);try{for(s.s();!(r=s.n()).done;){var l=r.value;e.has(l)||a.add(l)}}catch(e){s.e(e)}finally{s.f()}(n.size>0||a.size>0)&&(this._displayVariables=e,this._updateSelectedVariables({addedVariables:n,removedVariables:a}),this.trigger("change:displayVariables",{addedVariables:n,removedVariables:a}))}},{key:"selectedVariables",get:function(){return new Set(Pr(this._selectedVariables.values()))}},{key:"getSelectedVariable",value:function(e){var t=this._selectedVariables.get(e);return void 0===t?new Yi({id:void 0}):t}},{key:"enabledTimes",get:function(){return Pr(this._enabledResources.keys()).filter((function(e){return!isNaN(e)})).map((function(e){return new Date(e)}))}},{key:"exchangeDisplayVariable",value:function(e){var t,n=new Set(this.displayVariables),i=Tr(e);try{for(i.s();!(t=i.n()).done;){var o,r=t.value,a=Tr(this.displayVariables);try{for(a.s();!(o=a.n()).done;){var s=o.value;s.variableCollection===r.variableCollection&&(n.delete(s),n.add(r))}}catch(e){a.e(e)}finally{a.f()}}}catch(e){i.e(e)}finally{i.f()}var l,u=Tr(e);try{for(u.s();!(l=u.n()).done;){var c=l.value;n.has(c)||n.add(c)}}catch(e){u.e(e)}finally{u.f()}return this.displayVariables=n,this}},{key:"mirrorsFrom",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(this._listeners.mirror=this._listeners.mirror.filter((function(e){return e.container!==t&&void 0!==t||(e.container.un("change:displayVariables",e.listenerKey),!1)})),void 0!==t&&!(void 0!==n&&n.length<1)){void 0===n&&(n=this.modelviewer.resources.variableCollections);var i=function(){var i,o=new Set,r=Tr(t.displayVariables);try{var a=function(){var e=i.value;n.forEach((function(t){e.variableCollection===t&&o.add(e)}))};for(r.s();!(i=r.n()).done;)a()}catch(e){r.e(e)}finally{r.f()}e.exchangeDisplayVariable(o)},o=t.on("change:displayVariables",i),r={container:t,listenerKey:o,variableCollections:n};this._listeners.mirror.forEach((function(t){var i=[];t.variableCollections.forEach((function(e){var t=!1;n.forEach((function(n){n===e&&(t=!0)})),t||i.push(e)})),i.length<t.variableCollections.length&&e.mirrorsFrom(t.container,i)})),this._listeners.mirror.push(r),i()}}},{key:"getMirrorsFrom",value:function(){var e=new Map;return this._listeners.mirror.forEach((function(t){e.set(t.container,t.variableCollections)})),e}},{key:"_setTimes",value:function(){var e=this,t=kr(this._getSelectedVariablesWithResources([this.modelviewer.resources.topNode],new Set,void 0,(function(t){var n=!0;return e.modelviewer.resources._timesVariableCollections.forEach((function(e){var i,o=!1,r=Tr(t);try{for(r.s();!(i=r.n()).done;){var a=i.value;e.contains(a)&&(o=!0)}}catch(e){r.e(e)}finally{r.f()}o||(n=!1)})),n})),1)[0];void 0===t&&(t=new Set);var n=0==t.size?[]:this.modelviewer.resources.getTimesByVariables({variables:t});this.modelviewer.timeline.setTimesBySetID(this.id,n)}},{key:"_updateSelectedVariables",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.addedVariables,i=void 0===n?void 0:n,o=t.removedVariables,r=void 0===o?void 0:o;if(!this._adaptSuitableResource.enabled){var a=void 0,s=function t(n){if(n.hasResourcesByVariables.apply(n,[!0].concat(Pr(e.displayVariables))))a=n;else{var i,o=Tr(n.children);try{for(o.s();!(i=o.n()).done;)t(i.value)}catch(e){o.e(e)}finally{o.f()}}};return s(this.modelviewer.resources.topNode),void this._setSelectedVariables(this.displayVariables,a)}var l=[],u=new Set,c=void 0;if(void 0===i||void 0===r)l.push(this.modelviewer.resources.topNode);else{var f=function t(n){for(var o=!1,a=0,s=[].concat(Pr(i),Pr(r));a<s.length;a++){var f=s[a];if(void 0!==f.variableCollection&&f.variableCollection.node===n){l.push(n),o=!0;break}}if(!o){var d=e.getSelectedVariable(n.variableCollection);if(void 0!==d.id){c=d,u.add(c);var p,h=Tr(n.children);try{for(h.s();!(p=h.n()).done;)t(p.value)}catch(e){h.e(e)}finally{h.f()}}}};f(this.modelviewer.resources.topNode),(l=l.filter((function(e,t,n){return t===n.indexOf(e)}))).length<1&&l.push(this.modelviewer.resources.topNode)}var d,p=this._getSelectedVariablesWithResources(l,u,c),h=kr(p,2),v=h[0],y=h[1];void 0===v?(v=u,d=void 0!==c?c.variableCollection.node:new So({variableCollection:new uo})):d=y.variableCollection.node,this._setSelectedVariables(v,d)}},{key:"_getSelectedVariablesWithResources",value:function(e,t,n){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this._adaptSuitableResource.isResourceSelected;if(o.call(this,t,n))return[t,n];var r,a=[void 0,void 0],s=function(e){var n=new Set(t);n.add(e);var r=kr(i._getSelectedVariablesWithResources(e.variableCollection.node.children,n,e,o),2),s=r[0],l=r[1];if(void 0!==s)return a[0]=s,void(a[1]=l);var u,c=!0,f=Tr(n);try{var d=function(){var e=u.value,t=!1;i.modelviewer.resources._timesVariableCollections.forEach((function(n){n.contains(e)&&(t=!0)})),t||(c=!1)};for(f.s();!(u=f.n()).done;)d()}catch(e){f.e(e)}finally{f.f()}c&&n.size==i.modelviewer.resources._timesVariableCollections.size&&(a[0]=n,a[1]=e)},l=[],u=Tr(e);try{for(u.s();!(r=u.n()).done;){var c=r.value;if(this.modelviewer.resources.availableVariablesMap.has(c)&&this.modelviewer.resources.availableVariablesMap.get(c).size){var f,d=Tr(c.variableCollection);try{for(d.s();!(f=d.n()).done;){var p=f.value;if(this.modelviewer.resources.availableVariablesMap.get(c).has(p)&&(this.displayVariables.has(p)?s(p):this._adaptSuitableResource.enabled&&l.push(p),void 0!==a[0]))break}}catch(e){d.e(e)}finally{d.f()}}if(void 0!==a[0])break}}catch(e){u.e(e)}finally{u.f()}if(void 0!==a[0])return a;var h,v=this._adaptSuitableResource.getPossibleVariables.call(this,l,t),y=Tr(v);try{for(y.s();!(h=y.n()).done;){var m=h.value;if(s(m),void 0!==a[0])break}}catch(e){y.e(e)}finally{y.f()}return a}},{key:"_setSelectedVariables",value:function(e,t){var n,i=new Set,o=Tr(e=new Set(e));try{for(o.s();!(n=o.n()).done;){var r=n.value;this.selectedVariables.has(r)||i.add(r)}}catch(e){o.e(e)}finally{o.f()}var a,s=new Set,l=Tr(this.selectedVariables);try{for(l.s();!(a=l.n()).done;){var u=a.value;e.has(u)||s.add(u)}}catch(e){l.e(e)}finally{l.f()}if(i.size>0||s.size>0||this._selectedNode!==t){this._selectedVariables.clear();var c,f=Tr(e);try{for(f.s();!(c=f.n()).done;){var d=c.value;this._selectedVariables.set(d.variableCollection,d)}}catch(e){f.e(e)}finally{f.f()}this._selectedNode=t,this._setTimes(),this._setEnabledResources(),this._debouncedChangeSelectedVariables({addedVariables:i,removedVariables:s})}}},{key:"_setEnabledResources",value:function(){var e,t=this;this._enabledResources.clear(),void 0!==this._selectedNode&&(0!=this.selectedVariables.size&&(e=this._selectedNode).getResourcesByVariables.apply(e,[!0].concat(Pr(this.selectedVariables))).filter((function(e){return e.datetime&&!isNaN(e.datetime.valueOf())})).forEach((function(e){return t._enabledResources.set(e.datetime.valueOf(),e)})),this.modelviewer.timeline.setEnabledTimesBySetID(this.id,this.enabledTimes),this.trigger("change:enabledResources",this._enabledResources),this._setVisibleResource())}},{key:"_setVisibleResource",value:function(){var e=this._visibleResource,t=this.modelviewer.timeline.getSelectedTime().valueOf();this._enabledResources.has(t)?this._visibleResource=this._enabledResources.get(t):this._visibleResource=void 0,this._visibleResource!==e&&this.trigger("change:visibleResource")}},{key:"_initAdaptSuitableResource",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.enabled,n=void 0===t||t,i=e.getPossibleVariables,o=void 0===i?void 0:i,r=e.isResourceSelected,a=void 0===r?void 0:r;this._adaptSuitableResource={enabled:n,getPossibleVariables:o,isResourceSelected:a},void 0===this._adaptSuitableResource.getPossibleVariables&&(this._adaptSuitableResource.getPossibleVariables=function(e){return e}),void 0===this._adaptSuitableResource.isResourceSelected&&(this._adaptSuitableResource.isResourceSelected=function(e,t){var n;return void 0!==t&&(n=t.variableCollection.node).getResourcesByVariables.apply(n,[!0].concat(Pr(e))).length>0})}}])&&Er(t.prototype,n),a}(ri);B(Dr.prototype);const Lr=Dr,Ar=SVG;var Mr=["color","width"],Vr=["size","color","anchor"],Gr=["visible","style"],Fr=["visible","font"];function Yr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Xr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zr(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n,i,o={},r=Object.keys(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function qr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.color,n=void 0===t?void 0:t,i=e.width,o=void 0===i?void 0:i,r=zr(e,Mr),a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.color=$r(n,a.color,"black"),r.width=$r(o,a.width,1),Object.keys(a).forEach((function(e){"color"!=e&&"width"!=e&&void 0===r[e]&&(r[e]=a[e])})),r}function Hr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.size,n=void 0===t?void 0:t,i=e.color,o=void 0===i?void 0:i,r=e.anchor,a=void 0===r?void 0:r,s=zr(e,Vr),l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s.size=$r(n,l.size,12),s.color=$r(o,l.color,"black"),void 0!==(a=$r(a,l.anchor))&&(s.anchor=a),Object.keys(l).forEach((function(e){"color"!=e&&"size"!=e&&"anchor"!=e&&void 0===s[e]&&(s[e]=l[e])})),s}function Kr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.visible,n=void 0===t?void 0:t,i=e.style,o=void 0===i?{}:i,r=zr(e,Gr),a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.visible=$r(n,a.visible,!0),r.style=qr(o,a.style),Object.keys(a).forEach((function(e){"visible"!=e&&"style"!=e&&void 0===r[e]&&(r[e]=a[e])})),r}function Ur(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"visible"in t&&(e.visible=t.visible),"style"in t&&["color","width","opacity","linecap","linejoin","dasharray"].forEach((function(n){n in t.style&&(e.style[n]=t.style[n])})),e}function $r(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){return void 0!==e?e:t}))}function Zr(e){var t=e.node,n=e.text,i=e.x,o=e.y,r=e.horizontalMargin,a=void 0===r?0:r,s=e.verticalMargin,l=void 0===s?0:s,u=e.font,c=void 0===u?{}:u,f=e.fill,d=void 0===f?void 0:f,p=t.group(),h=void 0;void 0!==d&&("color"in d||(d.color="white"),h=p.rect().fill(d));var v=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yr(Object(n),!0).forEach((function(t){Xr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},c),y=void 0;"color"in v&&(y=v.color,delete v.color);var m=p.text(n).attr({x:i,y:o}).font(c);return void 0!==y&&m.fill(y),"bottom"==c["alignment-baseline"]&&m.dy(-m.bbox().height-5),m.dx(a*("end"==m.attr("text-anchor")?-1:1)).dy(l*("bottom"==c["alignment-baseline"]?-1:1)),void 0!==h&&h.attr({x:m.bbox().x,y:m.bbox().y,width:m.bbox().width,height:m.bbox().height}),p}function Wr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.node,n=e.x,i=void 0===n?0:n,o=e.y,r=void 0===o?0:o,a=e.wspd,s=void 0===a?0:a,l=e.wdir,u=void 0===l?270:l,c=e.length,f=void 0===c?50:c,d=e.strokeStyle,p=void 0===d?void 0:d,h=e.fillTriangle,v=void 0===h||h,y=e.triangleRatio,m=void 0===y?.2:y,b=e.barbDistanceRatio,g=void 0===b?.1:b,_=e.barbHeightRatio,O=void 0===_?3/8:_,S=e.circleOnLowWindspeed,k=void 0===S||S,P=e.circleRadiusRatio,T=void 0===P?.1:P;p=qr(p);var x=w(s),j=t.group(),R=x>=5?j.group():void 0,E=f*m,C=f*g,N=f*O,B=r-f,I=x;if(x<5&&k)j.circle(f*T).cx(i).cy(r).stroke(p).fill("none");else{for(j.line(i,B,i,r).stroke(p);I>=50;)R.polyline([[i,B],[i+N,B+E/2],[i,B+E]]).fill(v?p:"none").stroke(p),B+=E+((I-=50)>=50?C/2:C);for(;I>=10;)R.line(i,B,i+N,B-E/2).stroke(p),B+=C,I-=10;x<10&&(B+=C),I>=5&&R.line(i,B,i+N/2,B-E/4).stroke(p);var D=B-(r-f);D>.9*f&&R.scale(1,.9*f/D,i,r-f),0!=u&&j.rotate(u,i,r)}}function Jr(e){return(Jr="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 Qr=["parcel","visible","temp","dewp"];function ea(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n,i,o={},r=Object.keys(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ta(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function na(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ia(e,t){return(ia=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function oa(e,t){return!t||"object"!==Jr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ra(e){return(ra=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var aa=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ia(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ra(i);if(o){var n=ra(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return oa(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.parcel,i=void 0===n?void 0:n,o=t.visible,s=void 0===o||o,l=t.temp,u=void 0===l?{}:l,c=t.dewp,f=void 0===c?{}:c,d=ea(t,Qr);return ta(this,a),(e=r.call(this,d))._parcel=i,void 0===e.id&&void 0!==i&&(e.id=i.id),e._options={visible:s,temp:Kr(u,{style:{color:"rgb(255, 153, 0)",width:3,linecap:"round"}}),dewp:Kr(f,{style:{color:"rgb(255, 153, 0)",width:3,linecap:"round"}})},e}return t=a,(n=[{key:"parcel",get:function(){return this._parcel}},{key:"visible",get:function(){return this._options.visible},set:function(e){var t=this._options.visible;this._options.visible=!!e,t!=this._options.visible&&this.trigger("change:visible")}},{key:"options",get:function(){return this._options}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.visible,n=void 0===t?void 0:t,i=e.temp,o=void 0===i?void 0:i,r=e.dewp,a=void 0===r?void 0:r,s=!1;void 0===o?o={}:s=!0,void 0===a?a={}:s=!0,this._options.temp=Ur(this._options.temp,o),this._options.dewp=Ur(this._options.dewp,a),s&&this.trigger("change:options"),void 0!==n&&(this.visible=n)}}])&&na(t.prototype,n),a}(ri);B(aa.prototype);const sa=aa;function la(e){return(la="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 ua=["minPressure","maxPressure","segments"],ca=["minPressure","maxPressure"],fa=["minPressure","maxPressure"];function da(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n,i,o={},r=Object.keys(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function pa(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ha(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ha(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function ha(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function va(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ya(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ma(e,t){return(ma=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ba(e,t){return!t||"object"!==la(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ga(e){return(ga=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var wa=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ma(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ga(i);if(o){var n=ga(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ba(this,e)});function a(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.visible,o=void 0===i||i,s=n.diagram,l=void 0===s?{}:s,u=n.windprofile,c=void 0===u?{}:u,f=n.hodograph,d=void 0===f?{}:f,p=n.parcels,h=void 0===p?{}:p;if(va(this,a),(t=r.call(this))._sounding=e,t._diagramParcelCollection=new fi({fireReplace:!1,fireAddRemoveOnReplace:!0,emptyObjectMaker:function(){return new sa}}),t._visible=o,t._options={diagram:Oa(l),windprofile:ka(c),hodograph:Ta(d),parcels:ja(h)},void 0!==t._sounding){t._sounding.parcelCollection.on("add:item",(function(e){return t.addParcel(e)})),t._sounding.parcelCollection.on("remove:item",(function(e){var n,i=pa(t._diagramParcelCollection);try{for(i.s();!(n=i.n()).done;){var o=n.value;o.parcel===e&&t._diagramParcelCollection.remove(o)}}catch(e){i.e(e)}finally{i.f()}}));var v,y=pa(t._sounding.parcelCollection);try{for(y.s();!(v=y.n()).done;){var m=v.value;t.addParcel(m)}}catch(e){y.e(e)}finally{y.f()}}return t}return t=a,(n=[{key:"sounding",get:function(){return this._sounding}},{key:"visible",get:function(){return this._visible},set:function(e){var t=this._visible;this._visible=!!e,t!=this._visible&&this.trigger("change:visible")}},{key:"options",get:function(){return this._options}},{key:"diagramParcelCollection",get:function(){return this._diagramParcelCollection}},{key:"addParcel",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;(t=void 0===t?this.getParcelOptions(e):t).parcel=e;var n=new sa(t);return this._diagramParcelCollection.append(n),n}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.visible,n=void 0===t?void 0:t,i=e.diagram,o=void 0===i?void 0:i,r=e.windprofile,a=void 0===r?void 0:r,s=e.hodograph,l=void 0===s?void 0:s,u=e.parcels,c=void 0===u?void 0:u,f=!1;void 0===o?o={}:f=!0,void 0===a?a={}:f=!0,void 0===l?l={}:f=!0,this._options.diagram=Sa(this._options.diagram,o),this._options.windprofile=Pa(this._options.windprofile,a),this._options.hodograph=xa(this._options.hodograph,l),f&&this.trigger("change:options"),void 0===c&&(c={}),this._options.parcels=Ra(this._options.parcels,c);var d,p=pa(this.diagramParcelCollection);try{for(p.s();!(d=p.n()).done;){var h=d.value;h.id in c&&h.update(c[h.id])}}catch(e){p.e(e)}finally{p.f()}void 0!==n&&(this.visible=n)}},{key:"getParcelOptions",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,n={visible:this.options.parcels.default.visible,temp:{visible:this.options.parcels.default.temp.visible,style:{}},dewp:{visible:this.options.parcels.default.dewp.visible,style:{}}};return["temp","dewp"].forEach((function(t){Object.keys(e.options.parcels.default[t].style).forEach((function(i){n[t].style[i]=e.options.parcels.default[t].style[i]}))})),void 0!==t&&t.id in this.options.parcels&&(n=Ea(n,this.options.parcels[t.id],["temp","dewp"])),n}}])&&ya(t.prototype,n),a}(ri);B(wa.prototype);const _a=wa;function Oa(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.visible,n=void 0===t||t,i=e.temp,o=void 0===i?{}:i,r=e.dewp,a=void 0===r?{}:r,s=e.wetbulb,l=void 0===s?{}:s;return{visible:n,temp:Kr(o,{style:{color:"red",width:3,linecap:"round"}}),dewp:Kr(a,{style:{color:"blue",width:3,linecap:"round"}}),wetbulb:Kr(l,{style:{color:"green",width:2,linecap:"round"}})}}function Sa(e,t){return Ea(e,t,["temp","dewp","wetbulb"])}function ka(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.visible,n=void 0===t||t,i=e.windbarbs,o=void 0===i?{}:i,r=e.windspeed,a=void 0===r?{}:r;return{visible:n,windbarbs:Kr(o),windspeed:Kr(a)}}function Pa(e,t){return Ea(e,t,["windbarbs","windspeed"])}function Ta(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.minPressure,n=void 0===t?void 0:t,i=e.maxPressure,o=void 0===i?void 0:i,r=e.segments,a=void 0===r?[]:r,s=da(e,ua);return(s=Kr(s,{style:{color:"green",width:2}})).minPressure=n,s.maxPressure=o,s.segments=a.map((function(e){var t=e.minPressure,n=void 0===t?void 0:t,i=e.maxPressure,o=void 0===i?void 0:i,r=da(e,ca);return(r=Kr(r)).minPressure=n,r.maxPressure=o,r})),s}function xa(e,t){return e=Ur(e,t),["minPressure","maxPressure"].forEach((function(n){n in t&&(e[n]=t[n])})),"segments"in t&&(e.segments=t.segments.map((function(e){var t=e.minPressure,n=void 0===t?void 0:t,i=e.maxPressure,o=void 0===i?void 0:i,r=da(e,fa);return(r=Kr(r)).minPressure=n,r.maxPressure=o,r}))),e}function ja(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return void 0===e.visible&&(e.visible=!0),void 0===e.default&&(e.default={}),void 0===e.default.visible&&(e.default.visible=!1),void 0===e.default.temp&&(e.default.temp={}),void 0===e.default.temp.visible&&(e.default.temp.visible=!0),void 0===e.default.temp.style&&(e.default.temp.style={}),void 0===e.default.temp.style.color&&(e.default.temp.style.color="rgb(255, 153, 0)"),void 0===e.default.temp.style.width&&(e.default.temp.style.width=3),void 0===e.default.temp.style.linecap&&(e.default.temp.style.linecap="round"),void 0===e.default.dewp&&(e.default.dewp={}),void 0===e.default.dewp.visible&&(e.default.dewp.visible=!0),void 0===e.default.dewp.style&&(e.default.dewp.style={}),void 0===e.default.dewp.style.color&&(e.default.dewp.style.color="rgb(255, 194, 102)"),void 0===e.default.dewp.style.width&&(e.default.dewp.style.width=3),void 0===e.default.dewp.style.linecap&&(e.default.dewp.style.linecap="round"),e}function Ra(e,t){return"visible"in t&&(e.visible=t.visible),"default"in t&&(e.default=Ea(e.default,t.default,["temp","dewp"])),Object.keys(t).filter((function(e){return"visible"!=e&&"default"!=e})).forEach((function(n){return e[n]=Sa(n in e?e[n]:{},t[n])})),e}function Ea(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return"visible"in t&&(e.visible=t.visible),n.forEach((function(n){n in t&&(e[n]=Ur(e[n]?e[n]:{style:{}},t[n]))})),e}function Ca(e){return(Ca="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)}function Na(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ba(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ba(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function Ba(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Ia(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Da(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function La(e,t){return(La=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Aa(e,t){return!t||"object"!==Ca(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ma(e){return(Ma=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const Va=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&La(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ma(i);if(o){var n=Ma(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Aa(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.renderTo,i=void 0===n?void 0:n,o=t.width,s=void 0===o?void 0:o,l=t.height,u=void 0===l?void 0:l;if(Ia(this,a),(e=r.call(this,{fireReplace:!1,fireAddRemoveOnReplace:!0,emptyObjectMaker:function(){return new _a}}))._svgNode=void 0===i||"node"in i||"instance"in i?(0,Ar.SVG)(i):(0,Ar.SVG)().addTo(i),void 0!==s||void 0!==u)e._svgNode.size(s,u);else if(void 0===s&&void 0===u&&void 0!==i&&"getBoundingClientRect"in i){var c=i.getBoundingClientRect(),f=window.getComputedStyle(i);e._svgNode.size(c.width-parseFloat(f.getPropertyValue("padding-left"))-parseFloat(f.getPropertyValue("padding-right")),c.height-parseFloat(f.getPropertyValue("padding-top"))-parseFloat(f.getPropertyValue("padding-bottom")))}return e._plotAreas=new Set,e._svgNode.on("mousemove",(function(t){var n,i=Na(e._plotAreas);try{for(i.s();!(n=i.n()).done;){var o=n.value;"isHoverLabelsRemote"in o&&o.svgNode.dispatchEvent(t)}}catch(e){i.e(e)}finally{i.f()}})),e._svgNode.on("mouseout",(function(t){if(e._svgNode.node===t.target){var n,i=Na(e._plotAreas);try{for(i.s();!(n=i.n()).done;){var o=n.value;"_hoverLabelsGroup"in o&&o._hoverLabelsGroup.clear()}}catch(e){i.e(e)}finally{i.f()}}})),e.on("add:item",(function(t){var n,i=Na(e._plotAreas);try{for(i.s();!(n=i.n()).done;){var o=n.value;"addSounding"in o&&o.addSounding(t)}}catch(e){i.e(e)}finally{i.f()}})),e.on("remove:item",(function(t){var n,i=Na(e._plotAreas);try{for(i.s();!(n=i.n()).done;){var o=n.value;"removeSounding"in o&&o.removeSounding(t)}}catch(e){i.e(e)}finally{i.f()}})),e}return t=a,(n=[{key:"svgNode",get:function(){return this._svgNode}},{key:"appendPlotArea",value:function(e){if(!this._plotAreas.has(e)){this._plotAreas.add(e),e.addTo(this.svgNode),e.onCoordinateSystemChange();var t,n=Na(this);try{for(n.s();!(t=n.n()).done;){var i=t.value;"addSounding"in e&&e.addSounding(i)}}catch(e){n.e(e)}finally{n.f()}return this}}},{key:"removePlotArea",value:function(e){if(this._plotAreas.has(e)){var t,n=Na(this);try{for(n.s();!(t=n.n()).done;){var i=t.value;e.removeSounding(i)}}catch(e){n.e(e)}finally{n.f()}return this._plotAreas.delete(e),this}}},{key:"exchangeCoordinateSystem",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=Na(this._plotAreas);try{for(i.s();!(t=i.n()).done;){var o=t.value;void 0!==n&&o.coordinateSystem!==n||(o.coordinateSystem=e)}}catch(e){i.e(e)}finally{i.f()}}},{key:"addSounding",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new _a(e,t),i=1,o="sounding-".concat(i);this.containsId(o);)i++,o="sounding-".concat(i);return n.id=o,this.append(n),n}}])&&Da(t.prototype,n),a}(fi);function Ga(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fa(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Ya=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width,i=void 0===n?100:n,o=t.height,r=void 0===o?100:o,a=t.pressure,s=void 0===a?{}:a,l=t.temperature,u=void 0===l?{}:l;Ga(this,e),this._width=i,this._height=r,this.temperatureBottomLeft,this.temperatureBottomRight,this.inclinationTan,this.options={pressure:{},temperature:{}},this._initPressureOptions(s),this._initTemperatureOptions(u)}var t,n;return t=e,(n=[{key:"width",get:function(){return this._width},set:function(e){var t=this._width;this._width=e,t!=this._width&&this.trigger("change:options")}},{key:"height",get:function(){return this._height},set:function(e){var t=this._height;this._height=e,t!=this._height&&this.trigger("change:options")}},{key:"isIsobarsStraightLine",value:function(){return!0}},{key:"isDryAdiabatStraightLine",value:function(){return!1}},{key:"isIsothermsVertical",value:function(){return void 0!==this.options.temperature.inclinationAngle&&0==this.options.temperature.inclinationAngle}},{key:"getPByXY",value:function(e,t){return Math.pow(this.options.pressure.min,t/this.height)*Math.pow(this.options.pressure.max,(this.height-t)/this.height)}},{key:"getTByXY",value:function(e,t){var n=e-t*this.inclinationTan;return this.temperatureBottomLeft+n*(this.temperatureBottomRight-this.temperatureBottomLeft)/this.width}},{key:"getYByXP",value:function(e,t){return this.height*Math.log(this.options.pressure.max/t)/Math.log(this.options.pressure.max/this.options.pressure.min)}},{key:"getTByXP",value:function(e,t){return this.getTByXY(e,this.getYByXP(e,t))}},{key:"getXByYT",value:function(e,t){return(t-this.temperatureBottomLeft)*this.width/(this.temperatureBottomRight-this.temperatureBottomLeft)+e*this.inclinationTan}},{key:"getYByXT",value:function(e,t){return 0!=this.inclinationTan?(e-this.getXByYT(0,t))/this.inclinationTan:void 0}},{key:"getXByPT",value:function(e,t){return this.getXByYT(this.getYByXP(0,e),t)}},{key:"getYByPT",value:function(e){return this.getYByXP(0,e)}},{key:"getXByYPotentialTemperature",value:function(e,t){return t=a(t,this.getPByXY(0,e)),this.getXByYT(e,t)}},{key:"getYByXPotentialTemperature",value:function(e,t){var n=this.getPByXY(e,0),i=this.getPByXY(e,this.height);if(!(r(this.getTByXP(e,i),i)<t||t<r(this.getTByXP(e,n),n))){for(;n-i>10;){var o=i+(n-i)/2,a=r(this.getTByXP(e,o),o);if(void 0===a)return;a<t?n=o:i=o}return this.getYByXP(e,i+(n-i)/2)}}},{key:"getXByPPotentialTemperatur",value:function(e,t){return t=a(t,e),this.getXByPT(e,t)}},{key:"getYByPPotentialTemperatur",value:function(e,t){var n=this.getXByPPotentialTemperatur(e,t);return this.getYByXPotentialTemperature(n,t)}},{key:"getXByYHMR",value:function(e,t){var n=this.getPByXY(0,e);return this.getXByYT(e,l(t,n))}},{key:"getYByXHMR",value:function(e,t){for(var n=this.getPByXY(e,0),i=this.getPByXY(e,this.height);n-i>10;){var o=i+(n-i)/2,r=d(this.getTByXP(e,o),o);if(void 0===r)return;r<t?i=o:n=o}return this.getYByXP(e,i+(n-i)/2)}},{key:"getXByPHMR",value:function(e,t){var n=l(t,e);return this.getXByPT(e,n)}},{key:"getYByPHMR",value:function(e,t){var n=l(t,e);return this.getYByPT(e,n)}},{key:"getXByYEquiPotTemp",value:function(e,t){var n=s(t,this.getPByXY(0,e));return this.getXByYT(e,n)}},{key:"getYByXEquiPotTemp",value:function(e,t){for(var n=0,i=this.height,o=void 0;i-n>10;){o=n+(i-n)/2;var r=this.getYByXT(e,s(t,this.getPByXY(e,o)));if(void 0===r)return;r<t?i=o:n=o}return o}},{key:"getXByPEquiPotTemp",value:function(e,t){var n=s(t,e);return this.getXByPT(e,n)}},{key:"getYByPEquiPotTemp",value:function(e,t){var n=s(t,e);return this.getYByPT(e,n)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.pressure,n=void 0===t?{}:t,i=e.temperature,o=void 0===i?{}:i;"min"in n&&(this.options.pressure.min=void 0===n.min?100:n.min),"max"in n&&(this.options.pressure.max=void 0===n.max?1e3:n.max),"min"in o&&(this.options.temperature.min=void 0===o.min?y(-40):o.min),"max"in o&&(this.options.temperature.max=void 0===o.max?y(-45):o.max),"reference"in o&&(this.options.temperature.reference=void 0===o.reference?"base":o.reference),"inclinationAngle"in o&&(this.options.temperature.inclinationAngle=void 0===o.inclinationAngle?45:o.inclinationAngle),this._normalizeTemperatureRange(),this.trigger("change:options")}},{key:"_initPressureOptions",value:function(e){var t=e.min,n=void 0===t?100:t,i=e.max,o=void 0===i?1050:i;this.options.pressure={min:n,max:o}}},{key:"_initTemperatureOptions",value:function(e){var t=e.min,n=void 0===t?y(-40):t,i=e.max,o=void 0===i?y(45):i,r=e.reference,a=void 0===r?"base":r,s=e.inclinationAngle,l=void 0===s?45:s;this.options.temperature={min:n,max:o,reference:a,inclinationAngle:l},this._normalizeTemperatureRange()}},{key:"_normalizeTemperatureRange",value:function(){if(this.temperatureBottomLeft=this.options.temperature.min,this.temperatureBottomRight=this.options.temperature.max,this.inclinationTan=45==this.options.temperature.inclinationAngle?1:0==this.options.temperature.inclinationAngle?0:Math.tan(this.options.temperature.inclinationAngle*Math.PI/180),/^[0-9]+$/.test(this.options.temperature.reference)){var e=this.getYByXP(0,this.options.temperature.reference),t=this.inclinationTan*e,n=(this.temperatureBottomRight-this.temperatureBottomLeft)/this.width;this.temperatureBottomLeft+=n*t,this.temperatureBottomRight+=n*t}}}])&&Fa(t.prototype,n),e}();B(Ya.prototype);const Xa=Ya;function za(e){return(za="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)}function qa(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ha(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Ka(e,t){return(Ka=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ua(e,t){return!t||"object"!==za(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $a(e){return($a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Za=.2857;const Wa=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ka(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=$a(i);if(o){var n=$a(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Ua(this,e)});function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,n=void 0===t?100:t,i=e.height,o=void 0===i?100:i,s=e.pressure,l=void 0===s?{}:s,u=e.temperature,c=void 0===u?{}:u;return qa(this,a),c.inclinationAngle=0,r.call(this,{width:n,height:o,pressure:l,temperature:c})}return t=a,(n=[{key:"isDryAdiabatStraightLine",value:function(){return!0}},{key:"getPByXY",value:function(e,t){return Math.pow(Math.pow(this.options.pressure.max,Za)-t*(Math.pow(this.options.pressure.max,Za)-Math.pow(this.options.pressure.min,Za))/this.height,1/Za)}},{key:"getYByXP",value:function(e,t){return this.height*(Math.pow(this.options.pressure.max,Za)-Math.pow(t,Za))/(Math.pow(this.options.pressure.max,Za)-Math.pow(this.options.pressure.min,Za))}},{key:"getYByXT",value:function(){}}])&&Ha(t.prototype,n),a}(Xa);function Ja(e){return(Ja="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)}function Qa(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function es(e,t){return(es=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ts(e,t){return!t||"object"!==Ja(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ns(e){return(ns=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const is=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&es(e,t)}(o,e);var t,n,i=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,i=ns(t);if(n){var o=ns(this).constructor;e=Reflect.construct(i,arguments,o)}else e=i.apply(this,arguments);return ts(this,e)});function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,n=void 0===t?100:t,r=e.height,a=void 0===r?100:r,s=e.pressure,l=void 0===s?{}:s,u=e.temperature,c=void 0===u?{}:u;return Qa(this,o),c.inclinationAngle=0,i.call(this,{width:n,height:a,pressure:l,temperature:c})}return o}(Xa);function os(e){return(os="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)}function rs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function as(e,t){return(as=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ss(e,t){return!t||"object"!==os(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ls(e){return(ls=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const us=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&as(e,t)}(o,e);var t,n,i=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,i=ls(t);if(n){var o=ls(this).constructor;e=Reflect.construct(i,arguments,o)}else e=i.apply(this,arguments);return ss(this,e)});function o(){return rs(this,o),i.apply(this,arguments)}return o}(Xa);function cs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fs(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var ds=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.svgNode,o=void 0===i?void 0:i,r=n.coordinateSystem,a=void 0===r?void 0:r,s=n.x,l=void 0===s?0:s,u=n.y,c=void 0===u?0:u,f=n.width,d=void 0===f?100:f,p=n.height,h=void 0===p?100:p,v=n.style,y=void 0===v?{}:v,m=n.visible,b=void 0===m||m,g=n.events,w=void 0===g?{}:g;cs(this,e),this._svgNode=(0,Ar.SVG)().attr({x:l,y:c,width:d,height:h}).css(this._getNormalizedStyle(y)).css("display",b?"inline":"none"),void 0!==o&&this.addTo(o),this._svgNodeBackground=this._svgNode.group(),this._visible=b,this._coordinateSystem=a,this._coordinateSystemListenerKey=void 0!==this._coordinateSystem?this._coordinateSystem.on("change:options",(function(){return t.onCoordinateSystemChange()})):void 0,this.on("change:extent",(function(){return t.onCoordinateSystemChange()})),this._initEvents(w)}var t,n;return t=e,(n=[{key:"svgNode",get:function(){return this._svgNode}},{key:"visible",get:function(){return this._visible},set:function(e){var t=this._visible;this._visible=e,t!=this._visible&&(this._svgNode.style("display",this._visible?"inline":"none"),this.trigger("change:visible"))}},{key:"x",get:function(){return this._svgNode.attr("x")},set:function(e){this._svgNode.attr({x:e}),this.trigger("change:position")}},{key:"y",get:function(){return this._svgNode.attr("y")},set:function(e){this._svgNode.attr({y:e}),this.trigger("change:position")}},{key:"width",get:function(){return this._svgNode.attr("width")},set:function(e){this._svgNode.attr({width:e}),this.trigger("change:extent")}},{key:"height",get:function(){return this._svgNode.attr("height")},set:function(e){this._svgNode.attr({height:e}),this.trigger("change:extent")}},{key:"style",get:function(){return this._svgNode.css()},set:function(e){this._svgNode.css(e)}},{key:"coordinateSystem",get:function(){return this._coordinateSystem},set:function(e){var t=this;void 0!==this._coordinateSystemListenerKey&&this._coordinateSystem.un("change:options",this._coordinateSystemListenerKey),this._coordinateSystem=e,this._coordinateSystemListenerKey=this._coordinateSystem.on("change:options",(function(){return t.onCoordinateSystemChange()})),this.onCoordinateSystemChange()}},{key:"minExtentLength",get:function(){return Math.min(this.width,this.height)}},{key:"maxExtentLength",get:function(){return Math.max(this.width,this.height)}},{key:"addTo",value:function(e){this._svgNode.addTo(e)}},{key:"init",value:function(){this.onCoordinateSystemChange()}},{key:"onCoordinateSystemChange",value:function(){void 0!==this._coordinateSystem&&this.drawBackground(this._svgNodeBackground)}},{key:"drawBackground",value:function(e){e.clear(),this.trigger("prebuild:background",{node:e}),this._drawBackground(e),this.trigger("postbuild:background",{node:e})}},{key:"_drawBackground",value:function(){}},{key:"_getNormalizedStyle",value:function(e){var t=e.overflow;return{overflow:void 0===t?"hidden":t}}},{key:"_initEvents",value:function(e){var t=this,n=e.click,i=void 0===n?void 0:n,o=e.dblclick,r=void 0===o?void 0:o,a=e.mousedown,s=void 0===a?void 0:a,l=e.mouseup,u=void 0===l?void 0:l,c=e.mouseover,f=void 0===c?void 0:c,d=e.mouseout,p=void 0===d?void 0:d,h=e.mousemove,v=void 0===h?void 0:h,y=e.touchstart,m=void 0===y?void 0:y,b=e.touchmove,g=void 0===b?void 0:b,w=e.touchleave,_=void 0===w?void 0:w,O=e.touchend,S=void 0===O?void 0:O,k=e.touchcancel,P={click:i,dblclick:r,mousedown:s,mouseup:u,mouseover:f,mouseout:p,mousemove:v,touchstart:m,touchmove:g,touchleave:_,touchend:S,touchcancel:void 0===k?void 0:k};Object.keys(P).forEach((function(e){t._svgNode.on(e,(function(n){var i=t.getExtendedEvent(n,t._svgNode.point(n.pageX-window.pageXOffset,n.pageY-window.pageYOffset));void 0!==P[e]&&P[e].call(t,i),t.trigger(e,i)}))}))}},{key:"getExtendedEvent",value:function(e,t){return e.elementX=t.x,e.elementY=t.y,e}}])&&fs(t.prototype,n),e}();B(ds.prototype);const ps=ds;function hs(e){return(hs="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)}function vs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function ys(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ms(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return bs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bs(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function bs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function gs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ws(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _s(e,t,n){return(_s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ks(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function Os(e,t){return(Os=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ss(e,t){return!t||"object"!==hs(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ks(e){return(ks=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const Ps=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Os(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ks(i);if(o){var n=ks(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Ss(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.svgNode,i=void 0===n?void 0:n,o=t.coordinateSystem,s=void 0===o?void 0:o,l=t.x,u=void 0===l?0:l,c=t.y,f=void 0===c?0:c,d=t.width,p=void 0===d?100:d,h=t.height,v=void 0===h?100:h,y=t.style,m=void 0===y?{}:y,b=t.visible,g=void 0===b||b,w=t.events,_=void 0===w?{}:w,O=t.hoverLabels,S=void 0===O?{}:O,k=t.getSoundingVisibility,P=void 0===k?function(e){return e.visible}:k,T=t.dataGroupIds,x=void 0===T?[]:T,j=t.getCoordinatesByLevelData,R=void 0===j?function(){return{x:void 0,y:void 0}}:j,E=t.insertDataGroupInto,C=void 0===E?function(){}:E,N=t.filterDataPoint,B=void 0===N?void 0:N,I=t.minDataPointsDistance,D=void 0===I?0:I;return gs(this,a),(e=r.call(this,{svgNode:i,coordinateSystem:s,x:u,y:f,width:p,height:v,style:m,visible:g,events:_}))._getSoundingVisibility=P,e._dataGroupIds=x,e._getCoordinatesByLevelData=R,e._insertDataGroupInto=C,e._filterDataPoint=B,e._minDataPointsDistance=D,e._svgNodeData=e.svgNode.group(),e._soundings=new Map,e._hoverLabelsGroup=e.svgNode.group(),e._getHoverSounding,e._initHoverLabels(S),e}return t=a,(n=[{key:"dataGroupIds",get:function(){return this._dataGroupIds}},{key:"getCoordinatesByLevelData",get:function(){return this._getCoordinatesByLevelData}},{key:"minDataPointsDistance",get:function(){return this._minDataPointsDistance},set:function(e){var t=this._minDataPointsDistance;this._minDataPointsDistance=e,t!=this._minDataPointsDistance&&this.drawSoundings()}},{key:"hoverLabelsSounding",get:function(){var e,t=[],n=ms(this._soundings.keys());try{for(n.s();!(e=n.n()).done;){var i=e.value;this._getSoundingVisibility(i)&&t.push(i)}}catch(e){n.e(e)}finally{n.f()}if(t.length>0)return this._getHoverSounding(t)}},{key:"addSounding",value:function(e){var t=this,n=this._svgNodeData.group(),i=e.on("change:visible",(function(){return t.onChangeSoundingVisibility(e,n)})),o=e.on("change:options",(function(){void 0!==t.coordinateSystem&&t.drawSounding(e,n),t.onChangeSoundingVisibility(e,n)}));this._soundings.set(e,{group:n,listenerKeyVisible:i,listenerKeyOptions:o}),this.trigger("add:sounding",e),void 0!==this.coordinateSystem&&this.drawSounding(e,n),this.setDisplayOfSounding(e,n)}},{key:"removeSounding",value:function(e){this._soundings.has(e)&&(this._soundings.get(e).group.remove(),e.un(this._soundings.get(e).listenerKeyVisible),e.un(this._soundings.get(e).listenerKeyOptions),this._soundings.delete(e)),this.trigger("remove:sounding",e)}},{key:"onCoordinateSystemChange",value:function(){_s(ks(a.prototype),"onCoordinateSystemChange",this).call(this),this.drawSoundings()}},{key:"onChangeSoundingVisibility",value:function(e,t){this.setDisplayOfSounding(e,t),this._hoverLabelsGroup.clear()}},{key:"setDisplayOfSounding",value:function(e,t){t.css("display",this._getSoundingVisibility(e)?"inline":"none")}},{key:"drawSoundings",value:function(){if(void 0!==this.coordinateSystem){var e,t=ms(this._soundings.keys());try{for(t.s();!(e=t.n()).done;){var n=e.value;this.drawSounding(n,this._soundings.get(n).group)}}catch(e){t.e(e)}finally{t.f()}}}},{key:"drawSounding",value:function(e,t){var n=this;t.clear(),this.trigger("preinsert:sounding",{sounding:e,node:t});var i=t.group(),o={},r=this._getFilterDataPointFunction(),a={};e.sounding.getLevels().reverse().forEach((function(t){var i=e.sounding.getData(t);n._dataGroupIds.forEach((function(t){t in o||(o[t]=[]);var s={levelData:i,x:void 0,y:void 0},l=n._getCoordinatesByLevelData(t,e,s.levelData,n),u=l.x,c=l.y;s.x=u,s.y=c,void 0===u||void 0===c||void 0!==r&&r(s,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vs(Object(n),!0).forEach((function(t){ys(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},a))||(a=s,o[t].push(s))}))})),Object.keys(o).forEach((function(t){o[t].length>0&&n._insertDataGroupInto(i,t,e,o[t],n)})),this.trigger("postinsert:sounding",{sounding:e,node:t}),this._getSoundingVisibility(e)&&this._hoverLabelsGroup.clear()}},{key:"_getFilterDataPointFunction",value:function(){return void 0===this._filterDataPoint?0===(e=this._minDataPointsDistance)?void 0:function(t,n){var i=t.x,o=t.y;if(void 0===n.x||void 0===n.y)return n.x=i,n.y=o,!1;var r=Math.sqrt(Math.pow(i-n.x,2)+Math.pow(o-n.y,2))<e;return r||(n.x=i,n.y=o),r}:this._filterDataPoint;var e}},{key:"_initHoverLabels",value:function(e){var t=this,n=e.visible,i=void 0===n||n,o=e.type,r=void 0===o?"mousemove":o,a=e.maxDistance,s=void 0===a?void 0:a,l=e.insertLabelsFunc,u=void 0===l?void 0:l,c=e.getLevelData,f=void 0===c?function(){}:c,d=e.getHoverSounding,p=void 0===d?function(e){return e.shift()}:d;this._getHoverSounding=p,i&&void 0!==u&&(this.on("change:extent",(function(){return t._hoverLabelsGroup.clear()})),this.on(r,(function(e){var n=t.hoverLabelsSounding;void 0!==n&&u(n,f({hoverLabelsSounding:n,e,maxDistance:s}),t._hoverLabelsGroup)})))}}])&&ws(t.prototype,n),a}(ps);function Ts(e){return(Ts="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)}function xs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function js(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Rs(e,t,n){return(Rs="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ns(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function Es(e,t){return(Es=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Cs(e,t){return!t||"object"!==Ts(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ns(e){return(Ns=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const Bs=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Es(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ns(i);if(o){var n=Ns(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Cs(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.svgNode,i=void 0===n?void 0:n,o=t.coordinateSystem,s=void 0===o?void 0:o,l=t.x,u=void 0===l?0:l,c=t.y,f=void 0===c?0:c,d=t.width,p=void 0===d?100:d,h=t.height,v=void 0===h?100:h,y=t.style,m=void 0===y?{}:y,b=t.visible,g=void 0===b||b,w=t.events,_=void 0===w?{}:w,O=t.hoverLabels,S=void 0===O?{}:O,k=t.getSoundingVisibility,P=void 0===k?function(e){return e.visible}:k,T=t.dataGroupIds,x=void 0===T?void 0:T,j=t.getCoordinatesByLevelData,R=void 0===j?void 0:j,E=t.insertDataGroupInto,C=void 0===E?void 0:E,N=t.filterDataPoint,B=void 0===N?void 0:N,I=t.minDataPointsDistance,D=void 0===I?0:I;return xs(this,a),(e=r.call(this,{svgNode:i,coordinateSystem:s,x:u,y:f,width:p,height:v,style:m,visible:g,events:_,hoverLabels:S,getSoundingVisibility:P,dataGroupIds:x,getCoordinatesByLevelData:R,insertDataGroupInto:C,filterDataPoint:B,minDataPointsDistance:D}))._isHoverLabelsRemote,e}return t=a,(n=[{key:"getExtendedEvent",value:function(e,t){return(e=Rs(Ns(a.prototype),"getExtendedEvent",this).call(this,e,t)).diagramPres=void 0,void 0!==this.coordinateSystem&&(e.diagramPres=this.coordinateSystem.getPByXY(0,this.coordinateSystem.height-e.elementY)),e}},{key:"isHoverLabelsRemote",get:function(){return this._isHoverLabelsRemote}},{key:"_initHoverLabels",value:function(e){var t=e.visible,n=void 0===t||t,i=e.type,o=void 0===i?"mousemove":i,r=e.maxDistance,s=void 0===r?void 0:r,l=e.remote,u=void 0===l||l,c=e.insertLabelsFunc,f=void 0===c?void 0:c,d=e.getLevelData,p=void 0===d?function(e){var t=e.hoverLabelsSounding,n=e.e;if(!n.diagramPres)return{};var i=t.sounding;return i.getData(i.getNearestLevel(n.diagramPres))}:d;this._isHoverLabelsRemote=u,Rs(Ns(a.prototype),"_initHoverLabels",this).call(this,{visible:n,type:o,maxDistance:s,insertLabelsFunc:f,getLevelData:p})}}])&&js(t.prototype,n),a}(Ps);function Is(e){return(Is="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)}function Ds(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ls(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ls(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function Ls(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function As(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ms(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Vs(e,t,n){return(Vs="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ys(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function Gs(e,t){return(Gs=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fs(e,t){return!t||"object"!==Is(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ys(e){return(Ys=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const Xs=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Gs(e,t)}(l,e);var n,i,o,a,s=(o=l,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ys(o);if(a){var n=Ys(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Fs(this,e)});function l(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.svgNode,i=void 0===n?void 0:n,o=t.coordinateSystem,r=void 0===o?void 0:o,a=t.x,c=void 0===a?0:a,f=t.y,d=void 0===f?0:f,p=t.width,h=void 0===p?100:p,v=t.height,b=void 0===v?100:v,g=t.style,w=void 0===g?{}:g,_=t.visible,O=void 0===_||_,S=t.events,k=void 0===S?{}:S,P=t.dataGroupIds,T=void 0===P?["temp","dewp","wetbulb"]:P,x=t.getCoordinatesByLevelData,j=void 0===x?function(e,t,n,i){if(void 0===n.pres)return{};var o=void 0;switch(e){case"temp":o=n.tmpk;break;case"dewp":o=n.dwpk;break;case"wetbulb":o=u(n.tmpk,n.dwpk,n.pres)}return void 0===o?{}:{x:i.coordinateSystem.getXByPT(n.pres,o),y:i.coordinateSystem.height-i.coordinateSystem.getYByPT(n.pres,o),value:Math.round(10*m(o))/10,unit:"℃"}}:x,R=t.insertDataGroupInto,E=void 0===R?function(e,t,n,i){var o=t in n.options.diagram?n.options.diagram[t].style:{};e.group().polyline(i.map((function(e){return[e.x,e.y]}))).fill("none").stroke(o)}:R,C=t.filterDataPoint,N=void 0===C?void 0:C,B=t.minDataPointsDistance,I=void 0===B?0:B,D=t.isobars,L=void 0===D?{}:D,A=t.isotherms,M=void 0===A?{}:A,V=t.dryadiabats,G=void 0===V?{}:V,F=t.pseudoadiabats,Y=void 0===F?{}:F,X=t.mixingratio,z=void 0===X?{}:X,q=t.hoverLabels,H=void 0===q?{}:q,K=t.parcels,U=void 0===K?{}:K;return As(this,l),(e=s.call(this,{svgNode:i,coordinateSystem:r,x:c,y:d,width:h,height:b,style:w,visible:O,events:k,hoverLabels:H,getSoundingVisibility:function(e){return e.visible&&e.options.diagram.visible},dataGroupIds:T,getCoordinatesByLevelData:j,insertDataGroupInto:E,filterDataPoint:N,minDataPointsDistance:I})).options={isobars:zs(L),isotherms:zs(M,{highlightedLines:[y(0)]}),dryadiabats:zs(G),pseudoadiabats:zs(Y,{style:{color:"rgb(102, 51, 0)",dasharray:6}}),mixingratio:zs(z,{minPressure:500,style:{color:"rgb(102, 51, 0)",dasharray:2}})},e.svgGroups={border:e._svgNodeBackground.group(),isobars:e._svgNodeBackground.group(),isotherms:e._svgNodeBackground.group(),dryadiabats:e._svgNodeBackground.group(),mixingratio:e._svgNodeBackground.group(),pseudoadiabats:e._svgNodeBackground.group()},e._parcelsOptions=U,"visible"in e._parcelsOptions||(e._parcelsOptions.visible=!0),e._parcels=new Map,e.on("add:sounding",(function(t){var n={parcelsGroup:void 0,parcelsGroups:new Map,addItemListenerKey:void 0,removeItemListenerKey:void 0,changeVisibleListeners:[],changeOptionsListeners:[]},i=function(i){n.changeVisibleListeners.push({diagramParcel:i,listenerKey:i.on("change:visible",(function(){if(n.parcelsGroups.has(i)){var e=n.parcelsGroups.get(i);i.visible?e.show():e.hide()}}))}),n.changeOptionsListeners.push({diagramParcel:i,listenerKey:i.on("change:options",(function(){var n=e._parcels.get(t);if(void 0!==n){var o=n.parcelsGroups.get(i);void 0!==o&&(n.parcelsGroups.delete(i),o.remove())}e.drawParcel(t,i)}))})};n.addItemListenerKey=t.diagramParcelCollection.on("add:item",(function(n){i(n),e.drawParcel(t,n)})),n.removeItemListenerKey=t.diagramParcelCollection.on("remove:item",(function(e){var t=n.parcelsGroups.get(e);void 0!==t&&(n.parcelsGroups.delete(e),t.remove())}));var o,r=Ds(t.diagramParcelCollection);try{for(r.s();!(o=r.n()).done;){var a=o.value;i(a)}}catch(e){r.e(e)}finally{r.f()}e._parcels.set(t,n)})),e.on("remove:sounding",(function(t){if(e._parcels.has(t)){var n=e._parcels.get(t);t.diagramParcelCollection.un("add:item",n.addItemListenerKey),t.diagramParcelCollection.un("remove:item",n.removeItemListenerKey),n.changeVisibleListeners.forEach((function(e){return e.diagramParcel.un("change:visible",e.listenerKey)})),n.changeOptionsListeners.forEach((function(e){return e.diagramParcel.un("change:options",e.listenerKey)}))}e._parcels.delete(t)})),e.init(),e}return n=l,(i=[{key:"getIsobarsVisible",value:function(){return this.options.isobars.visible}},{key:"setIsobarsVisible",value:function(e){return this.options.isobars.visible=!!e,this.plotIsobars(),this}},{key:"getIsothermsVisible",value:function(){return this.options.isotherms.visible}},{key:"setIsothermsVisible",value:function(e){return this.options.isotherms.visible=!!e,this.plotIsotherms(),this}},{key:"getDryadiabatsVisible",value:function(){return this.options.dryadiabats.visible}},{key:"setDryadiabatsVisible",value:function(e){return this.options.dryadiabats.visible=!!e,this.plotDryadiabats(),this}},{key:"getPseudoadiabatsVisible",value:function(){return this.options.pseudoadiabats.visible}},{key:"setPseudoadiabatsVisible",value:function(e){return this.options.pseudoadiabats.visible=!!e,this.plotPseudoadiabats(),this}},{key:"getMixingratioVisible",value:function(){return this.options.mixingratio.visible}},{key:"setMixingratioVisible",value:function(e){return this.options.mixingratio.visible=!!e,this.plotMixingratio(),this}},{key:"drawSounding",value:function(e,t){if(Vs(Ys(l.prototype),"drawSounding",this).call(this,e,t),this._parcels.has(e)){var n=this._parcels.get(e);n.parcelsGroup=t.group(),e.options.parcels.visible||n.parcelsGroup.hide(),this._parcels.set(e,n)}this.drawParcels(e)}},{key:"drawParcels",value:function(e){if(this._parcelsOptions.visible&&this._parcels.has(e)){var t=this._parcels.get(e);t.parcelsGroup.clear(),t.parcelsGroups.clear();var n,i=Ds(e.diagramParcelCollection);try{for(i.s();!(n=i.n()).done;){var o=n.value;this.drawParcel(e,o)}}catch(e){i.e(e)}finally{i.f()}}}},{key:"drawParcel",value:function(e,t){var n=this,i=t.parcel;if(void 0!==i.pres&&void 0!==i.tmpc&&void 0!==i.dwpc&&this._parcels.has(e)){var o=this._parcels.get(e),a=o.parcelsGroup.group();o.parcelsGroups.set(t,a),this._parcels.set(e,o);var s=r(y(i.tmpc),i.pres),l=d(y(i.dwpc),i.pres),u=p(s,l),f=v(y(i.tmpc),y(i.dwpc)),h=c(f,f,u),m=t.options;m.visible||a.hide();var b=a.group();m.temp.visible||b.hide();var g=a.group();m.dewp.visible||g.hide();var w=10,_=this.coordinateSystem.getYByPT(i.pres,y(i.tmpc)),O=this.coordinateSystem.getXByYPotentialTemperature(_,s),S=this.coordinateSystem.getYByPPotentialTemperatur(u,s),k=this.coordinateSystem.getXByYPotentialTemperature(S,s),P=[[O,_]];if(!this.coordinateSystem.isDryAdiabatStraightLine())for(var T=_+w;T<S;T+=w)P.push([this.coordinateSystem.getXByYPotentialTemperature(T,s),T]);P.push([k,S]);for(var x=this.coordinateSystem.height,j=this.coordinateSystem.getXByYEquiPotTemp(x,h),R=S+w;R<x;R+=w)P.push([this.coordinateSystem.getXByYEquiPotTemp(R,h),R]);P.push([j,x]),b.polyline(P.map((function(e){return e[1]=n.coordinateSystem.height-e[1],e}))).fill("none").stroke(m.temp.style);for(var E=this.coordinateSystem.getXByYHMR(_,l),C=this.coordinateSystem.getXByYHMR(S,l),N=[[E,_]],B=_+w;B<S;B+=w)N.push([this.coordinateSystem.getXByYHMR(B,l),B]);N.push([C,S]),g.polyline(N.map((function(e){return e[1]=n.coordinateSystem.height-e[1],e}))).fill("none").stroke(m.dewp.style)}}},{key:"_drawBackground",value:function(e){Vs(Ys(l.prototype),"_drawBackground",this).call(this,e),this.svgGroups={border:e.group(),isobars:e.group(),isotherms:e.group(),dryadiabats:e.group(),mixingratio:e.group(),pseudoadiabats:e.group()},this.svgGroups.border.clear(),this.svgGroups.border.rect(this.coordinateSystem.width,this.coordinateSystem.height).attr({stroke:"black","stroke-width":1,"fill-opacity":0}),this.plotIsobars(!0),this.plotIsotherms(!0),this.plotDryadiabats(!0),this.plotPseudoadiabats(!0),this.plotMixingratio(!0)}},{key:"plotIsobars",value:function(e){var t=this,n=this.coordinateSystem.getPByXY(0,this.coordinateSystem.height),i=this.coordinateSystem.getPByXY(0,0),o=i-n;this._plotLines(this.svgGroups.isobars,this.options.isobars,{min:n,max:i,interval:o>500?100:o>50?10:1},(function(e){var n=t.coordinateSystem.getYByXP(0,e);return[[0,n],[t.coordinateSystem.width,n]]}),e)}},{key:"plotIsotherms",value:function(e){var t=this,n=m(this.coordinateSystem.getTByXY(0,this.coordinateSystem.height)),i=m(this.coordinateSystem.getTByXY(this.coordinateSystem.width,0)),o=i-n;this._plotLines(this.svgGroups.isotherms,this.options.isotherms,{min:n,max:i,interval:o>50?10:5},(function(e){e=y(e);var n=[[void 0,void 0],[void 0,void 0]];return t.coordinateSystem.isIsothermsVertical()?(n[0][1]=0,n[1][1]=t.coordinateSystem.height,n[0][0]=n[1][0]=t.coordinateSystem.getXByYT(n[0][1],e)):(n[0][1]=0,n[0][0]=t.coordinateSystem.getXByYT(n[0][1],e),n[0][0]<0&&(n[0][1]=t.coordinateSystem.getYByXT(n[0][0]=0,e)),n[1][0]=t.coordinateSystem.width,n[1][1]=t.coordinateSystem.getYByXT(n[1][0],e),void 0===n[1][1]?(n[1][0]=n[0][0],n[1][1]=t.coordinateSystem.height):n[1][1]>t.coordinateSystem.height&&(n[1][1]=t.coordinateSystem.height,n[1][0]=t.coordinateSystem.getXByYT(n[1][1],e))),n}),e)}},{key:"plotDryadiabats",value:function(e){var t=this;this._plotLines(this.svgGroups.dryadiabats,this.options.dryadiabats,{min:m(r(this.coordinateSystem.getTByXY(0,0),this.coordinateSystem.getPByXY(0,0))),max:m(r(this.coordinateSystem.getTByXY(this.coordinateSystem.width,this.coordinateSystem.height),this.coordinateSystem.getPByXY(this.coordinateSystem.width,this.coordinateSystem.height))),interval:10},(function(e){var n=y(e),i=0,o=t.coordinateSystem.getXByYPotentialTemperature(i,n);(void 0===o||o>t.coordinateSystem.width)&&(o=t.coordinateSystem.width,i=t.coordinateSystem.getYByXPotentialTemperature(o,n));var r=0,a=t.coordinateSystem.getYByXPotentialTemperature(r,n);if((void 0===a||a>t.coordinateSystem.height)&&(a=t.coordinateSystem.height,r=t.coordinateSystem.getXByYPotentialTemperature(a,n)),void 0!==o&&void 0!==i&&void 0!==r&&void 0!==a){if(t.coordinateSystem.isDryAdiabatStraightLine())return[[o,i],[r,a]];for(var s=[[o,i]],l=i+10;l<a;l+=10)s.push([t.coordinateSystem.getXByYPotentialTemperature(l,n),l]);return s.push([r,a]),s}}),e)}},{key:"plotPseudoadiabats",value:function(e){var t=this;this._plotLines(this.svgGroups.pseudoadiabats,this.options.pseudoadiabats,{lines:[-18,-5,10,30,60,110,180]},(function(e){for(var n=y(e),i=Math.max(0,void 0===t.options.pseudoadiabats.maxPressure?0:t.coordinateSystem.getYByPEquiPotTemp(t.options.pseudoadiabats.maxPressure,n)),o=t.coordinateSystem.getXByYEquiPotTemp(i,n),r=Math.min(t.coordinateSystem.height,void 0===t.options.pseudoadiabats.minPressure?t.coordinateSystem.height:t.coordinateSystem.getYByPEquiPotTemp(t.options.pseudoadiabats.minPressure,n)),a=t.coordinateSystem.getXByYEquiPotTemp(r,n),s=[[o,i]],l=i+10;l<r;l+=10)s.push([t.coordinateSystem.getXByYEquiPotTemp(l,n),l]);return s.push([a,r]),s}),e)}},{key:"plotMixingratio",value:function(e){var t=this;this._plotLines(this.svgGroups.mixingratio,this.options.mixingratio,{lines:[.01,.1,1,2,4,7,10,16,21,32,40]},(function(e){for(var n=Math.max(0,void 0===t.options.mixingratio.maxPressure?0:t.coordinateSystem.getYByPHMR(t.options.mixingratio.maxPressure,e)),i=t.coordinateSystem.getXByYHMR(n,e),o=Math.min(t.coordinateSystem.height,void 0===t.options.mixingratio.minPressure?t.coordinateSystem.height:t.coordinateSystem.getYByPHMR(t.options.mixingratio.minPressure,e)),r=t.coordinateSystem.getXByYHMR(o,e),a=[[i,n]],s=n+10;s<o;s+=10)a.push([t.coordinateSystem.getXByYHMR(s,e),s]);return a.push([r,o]),a}),e)}},{key:"_plotLines",value:function(e,t,n,i,o){if(t.visible?e.show():e.hide(),o){e.clear();var r=[];if(void 0!==t.lines)r=t.lines;else if(void 0===t.min&&void 0===t.max&&void 0===t.interval&&void 0!==n.lines)r=n.lines;else{void 0!==t.min&&(n.min=t.min),void 0!==t.max&&(n.max=t.max);var a=t.interval;void 0===a&&(a=n.interval);for(var s=Math.ceil(n.min/a)*a,l=Math.floor(n.max/a)*a,u=s;u<=l;u+=a)r.push(u)}var c=3;void 0!==t.style.width&&(c=t.style.width+2),r.forEach((function(n){var o=i.call(this,n),r=2==o.length?e.line(o[0][0],this.coordinateSystem.height-o[0][1],o[1][0],this.coordinateSystem.height-o[1][1]).stroke(t.style):e.polyline(o.map((function(e){return e[1]=this.coordinateSystem.height-e[1],e}),this)).fill("none").stroke(t.style);void 0!==t.highlightedLines&&t.highlightedLines.forEach((function(e){n==e&&r.stroke({width:c})}),this)}),this)}}},{key:"getExtendedEvent",value:function(e,t){return(e=Vs(Ys(l.prototype),"getExtendedEvent",this).call(this,e,t)).diagramTmpk=this.coordinateSystem.getTByXY(e.elementX,this.coordinateSystem.height-e.elementY),e}},{key:"_initHoverLabels",value:function(e){var t=e.visible,n=void 0===t||t,i=e.type,o=void 0===i?"mousemove":i,r=e.maxDistance,a=void 0===r?void 0:r,s=e.remote,u=void 0===s||s,c=e.insertLabelsFunc,f=void 0===c?void 0:c,d=e.pres,p=void 0===d?{}:d,h=e.temp,v=void 0===h?{}:h,y=e.dewp,m=void 0===y?{}:y,b=e.wetbulb,g=void 0===b?{}:b;p.length="length"in p?p.length:60,p.align="align"in p?p.align:"left","visible"in p||(p.visible=!0),"style"in p||(p.style={}),p.font=Hr(p.font,{anchor:"right"==p.align?"end":"start"}),"fill"in p||(p.fill={}),void 0===p.fill.opacity&&(p.fill.opacity=.7),void 0===p.horizontalMargin&&(p.horizontalMargin=5),"visible"in v||(v.visible=!0),"style"in v||(v.style={}),v.font=Hr(v.font,{anchor:"start","alignment-baseline":"bottom"}),"fill"in v||(v.fill={}),void 0===v.fill.opacity&&(v.fill.opacity=.7),v.radius="radius"in v?v.radius:void 0,v.radiusPlus="radiusPlus"in v?v.radiusPlus:2,void 0===v.horizontalMargin&&(v.horizontalMargin=10),"visible"in m||(m.visible=!0),"style"in m||(m.style={}),m.font=Hr(m.font,{anchor:"end","alignment-baseline":"bottom"}),"fill"in m||(m.fill={}),void 0===m.fill.opacity&&(m.fill.opacity=.7),m.radius="radius"in m?m.radius:void 0,m.radiusPlus="radiusPlus"in m?m.radiusPlus:2,void 0===m.horizontalMargin&&(m.horizontalMargin=10),"visible"in g||(g.visible=!0),"style"in g||(g.style={}),g.font=Hr(g.font,{anchor:"middle"}),"fill"in g||(g.fill={}),void 0===g.fill.opacity&&(g.fill.opacity=.7),g.radius="radius"in g?g.radius:void 0,g.radiusPlus="radiusPlus"in g?g.radiusPlus:2,void 0===g.verticalMargin&&(g.verticalMargin=10),void 0===f&&(f=this._makeInsertLabelsFunc(p,v,m,g)),Vs(Ys(l.prototype),"_initHoverLabels",this).call(this,{visible:n,type:o,maxDistance:a,remote:u,insertLabelsFunc:f})}},{key:"_makeInsertLabelsFunc",value:function(e,n,i,o){var r=this;return function(a,s,l){l.clear(),void 0!==s.pres&&(e.visible&&function(e,n,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=o.length,a=void 0===r?60:r,s=o.align,l=void 0===s?"left":s,u=o.horizontalMargin,c=void 0===u?void 0:u,f=o.verticalMargin,d=void 0===f?void 0:f,p=o.style,h=void 0===p?{}:p,v=o.font,y=void 0===v?{}:v,m=o.fill,b=void 0===m?{}:m,g=0,w=a,_=/^([0-9]+)%$/.exec(w);_&&(w=_[1]/100*i.width),"right"==l&&(g=i.width,w=i.width-w);var O=i.height-i.getYByXP(0,n.pres);h=qr(h),e.line([[Math.min(g,w),O],[Math.max(g,w),O]]).stroke(h),(y=Hr(y))["alignment-baseline"]="bottom",Zr({node:e,text:"".concat(Math.round(n.pres)," hPa"),x:g,y:O,horizontalMargin:c,verticalMargin:d,font:y,fill:b}),y["alignment-baseline"]="top";var S=void 0===n.hght?"~".concat(Math.round(t(n.pres))," m"):"".concat(Math.round(n.hght)," m");Zr({node:e,text:S,x:g,y:O,horizontalMargin:c,verticalMargin:d,font:y,fill:b})}(l,s,r.coordinateSystem,e),r.dataGroupIds.reverse().forEach((function(e){var t={visible:!1};switch(e){case"temp":t=n;break;case"dewp":t=i;break;case"wetbulb":t=o}if(t.visible){var u=r._getCoordinatesByLevelData(e,a,s,r),c=u.x,f=u.y,d=u.value,p=u.unit;if(void 0!==c&&void 0!==f){var h=e in r.hoverLabelsSounding.options.diagram?r.hoverLabelsSounding.options.diagram[e].style.width:3,v=void 0===t.radius?h+t.radiusPlus:t.radius,y=t.style;!("color"in y)&&e in r.hoverLabelsSounding.options.diagram&&(y.color=a.options.diagram[e].style.color),l.circle(2*v).attr({cx:c,cy:f}).fill(y),Zr({node:l,text:"".concat(d," ").concat(p),x:c,y:f,horizontalMargin:t.horizontalMargin,verticalMargin:t.verticalMargin,font:t.font,fill:t.fill})}}})))}}}])&&Ms(n.prototype,i),l}(Bs);function zs(e){var t=e.highlightedLines,n=void 0===t?void 0:t,i=e.interval,o=void 0===i?void 0:i,r=e.lines,a=void 0===r?void 0:r,s=e.max,l=void 0===s?void 0:s,u=e.min,c=void 0===u?void 0:u,f=e.maxPressure,d=void 0===f?void 0:f,p=e.minPressure,h=void 0===p?void 0:p,v=e.style,y=void 0===v?void 0:v,m=e.visible,b=void 0===m?void 0:m,g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{highlightedLines:$r(n,g.highlightedLines),interval:$r(o,g.interval),lines:$r(a,g.lines),max:$r(l,g.max),min:$r(c,g.min),maxPressure:$r(d,g.maxPressure),minPressure:$r(h,g.minPressure),style:qr(y,g.style),visible:$r(b,g.visible,!0)}}function qs(e){return(qs="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)}function Hs(e,t){return(Hs=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ks(e,t){return!t||"object"!==qs(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Us(e){return(Us=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const $s=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Hs(e,t)}(o,e);var t,n,i=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,i=Us(t);if(n){var o=Us(this).constructor;e=Reflect.construct(i,arguments,o)}else e=i.apply(this,arguments);return Ks(this,e)});function o(e){var t,n=e.svgNode,r=void 0===n?void 0:n,a=e.coordinateSystem,s=void 0===a?void 0:a,l=e.x,u=void 0===l?void 0:l,c=e.y,f=void 0===c?void 0:c,d=e.width,p=void 0===d?void 0:d,h=e.height,v=void 0===h?void 0:h,y=e.style,m=void 0===y?{}:y,b=e.visible,g=void 0===b||b,w=e.events,_=void 0===w?{}:w,O=e.hoverLabels,S=void 0===O?{}:O,k=e.windbarbLength,P=void 0===k?void 0:k,T=e.dataGroupIds,x=void 0===T?["windbarbs"]:T,j=e.getCoordinatesByLevelData,R=void 0===j?function(e,t,n,i){return void 0===n.pres||void 0===n.wspd||void 0===n.wdir?{}:{x:i.width/2,y:i.coordinateSystem.height-i.coordinateSystem.getYByXP(0,n.pres)}}:j,E=e.insertDataGroupInto,C=void 0===E?function(e,t,n,i,o){i.forEach((function(t){Wr({node:e,x:o.width/2,y:t.y,wspd:t.levelData.wspd,wdir:t.levelData.wdir,length:o._windbarbLength,strokeStyle:n.options.windprofile.windbarbs.style})}))}:E,N=e.filterDataPoint,B=void 0===N?void 0:N,I=e.minDataPointsDistance,D=void 0===I?void 0:I;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,{svgNode:r,coordinateSystem:s,x:u,y:f,width:p,height:v,style:m,visible:g,events:_,hoverLabels:S,getSoundingVisibility:function(e){return e.visible&&e.options.windprofile.windbarbs.visible},dataGroupIds:x,getCoordinatesByLevelData:R,insertDataGroupInto:C,filterDataPoint:B,minDataPointsDistance:void 0===D?0:D}))._windbarbLength=P,void 0===t._windbarbLength&&(t._windbarbLength=2*t.width/5),void 0===D&&(t.minDataPointsDistance=t._windbarbLength/2),t.init(),t}return o}(Bs);function Zs(e){return(Zs="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)}function Ws(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Js(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qs(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function el(e,t,n){return(el="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=il(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function tl(e,t){return(tl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function nl(e,t){return!t||"object"!==Zs(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function il(e){return(il=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const rl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&tl(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=il(i);if(o){var n=il(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return nl(this,e)});function a(e){var t,n=e.svgNode,i=void 0===n?void 0:n,o=e.coordinateSystem,s=void 0===o?void 0:o,l=e.x,u=void 0===l?void 0:l,c=e.y,f=void 0===c?void 0:c,d=e.width,p=void 0===d?void 0:d,h=e.height,v=void 0===h?void 0:h,y=e.style,m=void 0===y?{}:y,b=e.visible,g=void 0===b||b,w=e.events,O=void 0===w?{}:w,S=e.hoverLabels,k=void 0===S?{}:S,P=e.windspeedMax,T=void 0===P?_(150):P,x=e.dataGroupIds,j=void 0===x?["windspeed"]:x,R=e.getCoordinatesByLevelData,E=void 0===R?function(e,t,n,i){return void 0===n.pres||void 0===n.wspd?{}:{x:i.width*n.wspd/T,y:i.coordinateSystem.height-i.coordinateSystem.getYByXP(0,n.pres)}}:R,C=e.insertDataGroupInto,N=void 0===C?function(e,t,n,i){e.polyline(i.map((function(e){return[e.x,e.y]}))).fill("none").stroke(n.options.windprofile.windspeed.style)}:C,B=e.filterDataPoint,I=void 0===B?void 0:B,D=e.minDataPointsDistance,L=void 0===D?0:D;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=r.call(this,{svgNode:i,coordinateSystem:s,x:u,y:f,width:p,height:v,style:m,visible:g,events:O,hoverLabels:k,getSoundingVisibility:function(e){return e.visible&&e.options.windprofile.windspeed.visible},dataGroupIds:j,getCoordinatesByLevelData:E,insertDataGroupInto:N,filterDataPoint:I,minDataPointsDistance:L})).init(),t}return t=a,(n=[{key:"_drawBackground",value:function(e){el(il(a.prototype),"_drawBackground",this).call(this,e),e.line(0,0,0,this.height).stroke({color:"black",width:1}),e.line(this.width,0,this.width,this.height).stroke({color:"black",width:1})}},{key:"_initHoverLabels",value:function(e){var t=e.visible,n=void 0===t||t,i=e.type,o=void 0===i?"mousemove":i,r=e.maxDistance,s=void 0===r?void 0:r,l=e.remote,u=void 0===l||l,c=e.insertLabelsFunc,f=void 0===c?void 0:c,d=e.windspeed,p=void 0===d?{}:d;"visible"in p||(p.visible=!0),"style"in p||(p.style={}),p.font=Hr(p.font,{anchor:"end","alignment-baseline":"bottom"}),"fill"in p||(p.fill={}),void 0===p.fill.opacity&&(p.fill.opacity=.7),p.radius="radius"in p?p.radius:void 0,p.radiusPlus="radiusPlus"in p?p.radiusPlus:2,void 0===p.horizontalMargin&&(p.horizontalMargin=10),void 0===f&&(f=this._makeInsertLabelsFunc(p)),el(il(a.prototype),"_initHoverLabels",this).call(this,{visible:n,type:o,maxDistance:s,remote:u,insertLabelsFunc:f})}},{key:"_makeInsertLabelsFunc",value:function(e){var t=this;return function(n,i,o){if(o.clear(),void 0!==i.pres&&e.visible&&void 0!==i.wspd){var r=t._getCoordinatesByLevelData("windspeed",n,i,t),a=r.x,s=r.y;if(void 0!==a&&void 0!==s){var l=void 0===e.radius?t.hoverLabelsSounding.options.windprofile.windspeed.style.width/2+e.radiusPlus:e.radius,u=e.style;"color"in u||(u.color=n.options.windprofile.windspeed.style.color);var c=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ws(Object(n),!0).forEach((function(t){Js(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ws(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.font);"start"==c.anchor&&t.width-a<45&&(c.anchor="end"),"end"==c.anchor&&a<45&&(c.anchor="start"),"bottom"==c["alignment-baseline"]&&s<5*c.size/4&&(c["alignment-baseline"]="top"),"top"==c["alignment-baseline"]&&t.height-s<5*c.size/4&&(c["alignment-baseline"]="bottom"),o.circle(2*l).attr({cx:a,cy:s}).fill(u),Zr({node:o,text:"".concat(Math.round(10*w(i.wspd))/10," kn"),x:a,y:s,horizontalMargin:e.horizontalMargin,verticalMargin:e.verticalMargin,font:c,fill:e.fill})}}}}}])&&Qs(t.prototype,n),a}(Bs);function al(e){return(al="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)}function sl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function ll(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sl(Object(n),!0).forEach((function(t){ul(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ul(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function fl(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function dl(e,t,n){return(dl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=vl(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function pl(e,t){return(pl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function hl(e,t){return!t||"object"!==al(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function vl(e){return(vl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const yl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&pl(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=vl(i);if(o){var n=vl(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return hl(this,e)});function a(e){var t,n=e.svgNode,i=void 0===n?void 0:n,o=e.coordinateSystem,s=void 0===o?new Xa:o,l=e.x,u=e.y,c=e.width,f=e.height,d=e.style,p=void 0===d?{}:d,h=e.visible,v=void 0===h||h,y=e.events,m=void 0===y?{}:y,b=e.hoverLabels,g=void 0===b?{}:b,w=e.dataGroupIds,O=void 0===w?["windbarbs"]:w,S=e.getCoordinatesByLevelData,k=void 0===S?function(e,t,n,i){if(void 0===n.wspd||void 0===n.wdir)return{};var o=n.wspd*-Math.sin(n.wdir/180*Math.PI),r=n.wspd*Math.cos(n.wdir/180*Math.PI);return{x:i.center[0]+o*i.pixelPerSpeed,y:i.center[1]+r*i.pixelPerSpeed}}:S,P=e.insertDataGroupInto,T=void 0===P?function(e,t,n,i){var o=[i.filter((function(e){return!(void 0!==n.options.hodograph.minPressure&&void 0!==e.levelData.pres&&e.levelData.pres<n.options.hodograph.minPressure||void 0!==n.options.hodograph.maxPressure&&void 0!==e.levelData.pres&&e.levelData.pres>n.options.hodograph.maxPressure)}))];o[0].sort((function(e,t){return t.levelData.pres-e.levelData.pres}));var r,a=[],s=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return cl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cl(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}(n.options.hodograph.segments);try{var l=function(){var e=r.value,t={levels:[],visible:e.visible,style:e.style};o.map((function(n,i){var r=void 0,a=void 0;if(n.map((function(n){(void 0!==e.minPressure&&e.minPressure<=n.levelData.pres&&void 0!==e.maxPressure&&e.maxPressure>=n.levelData.pres||void 0===e.minPressure&&void 0!==e.maxPressure&&e.maxPressure>=n.levelData.pres||void 0!==e.minPressure&&e.minPressure<=n.levelData.pres&&void 0===e.maxPressure)&&(t.levels.push(n),void 0===a&&(a=n),r=n)})),void 0!==a&&void 0!==r&&a!==r){var s=n.findIndex((function(e){return e.levelData.pres===r.levelData.pres})),l=n.findIndex((function(e){return e.levelData.pres===a.levelData.pres})),u=n.slice(s);o[i]=n.slice(0,l+1),o.push(u)}})),t.levels.length>0&&a.push(t)};for(s.s();!(r=s.n()).done;)l()}catch(e){s.e(e)}finally{s.f()}o.map((function(t){t.length<2||e.polyline(t.map((function(e){return[e.x,e.y]}))).fill("none").stroke(n.options.hodograph.style)})),a.map((function(t){e.polyline(t.levels.map((function(e){return[e.x,e.y]}))).fill("none").stroke(t.style)}))}:P,x=e.grid,j=void 0===x?{}:x,R=e.windspeedMax,E=void 0===R?_(150):R,C=e.origin,N=void 0===C?void 0:C,B=e.filterDataPoint,I=void 0===B?void 0:B,D=e.minDataPointsDistance,L=void 0===D?0:D;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=r.call(this,{svgNode:i,coordinateSystem:s,x:l,y:u,width:c,height:f,style:p,visible:v,events:m,hoverLabels:g,dataGroupIds:O,getCoordinatesByLevelData:k,insertDataGroupInto:T,getSoundingVisibility:function(e){return e.visible&&e.options.hodograph.visible},filterDataPoint:I,minDataPointsDistance:L}))._origin=N,t._windspeedMax=E,t._gridOptions=t.getNormalizedGridOptions(j),void 0===t._gridOptions.max&&(t._gridOptions.max=E),t.init(),t}return t=a,(n=[{key:"origin",get:function(){return this._origin},set:function(e){var t=this._origin;this._origin=e,this._hoverLabelsGroup.clear(),(void 0===t&&void 0!==this._origin||void 0!==t&&void 0===this._origin||void 0!==t&&void 0!==this._origin&&(t[0]!=this._origin[0]||t[1]!=this._origin[1]))&&this.onCoordinateSystemChange()}},{key:"center",get:function(){var e=[this.width/2,this.height/2];return void 0!==this._origin&&(e[0]+=this._origin[0]*this.minExtentLength/2,e[1]-=this._origin[1]*this.minExtentLength/2),e}},{key:"pixelPerSpeed",get:function(){var e=this.center;return Math.min(Math.max(this.width-e[0],e[0]),Math.max(this.height-e[1],e[1]))/this._windspeedMax}},{key:"_drawBackground",value:function(e){dl(vl(a.prototype),"_drawBackground",this).call(this,e);var t=this.center,n=this.pixelPerSpeed;this._gridOptions.axes.visible&&(e.line(0,t[1],this.width,t[1]).stroke(this._gridOptions.axes.style),e.line(t[0],0,t[0],this.height).stroke(this._gridOptions.axes.style));for(var i=this._gridOptions.circles.interval;i<=this._gridOptions.max;i+=this._gridOptions.circles.interval){var o=i*n;if(e.circle(2*o).attr({cx:t[0],cy:t[1]}).fill("none").stroke(this._gridOptions.circles.style),this._gridOptions.labels.visible){var r=o*Math.cos((this._gridOptions.labels.angle-90)/180*Math.PI),s=o*Math.sin((this._gridOptions.labels.angle-90)/180*Math.PI),l="";switch(this._gridOptions.labels.unit){case"m/s":l=Number.parseFloat(i).toFixed(this._gridOptions.labels.decimalPlaces);break;case"kn":l=w(i).toFixed(this._gridOptions.labels.decimalPlaces);break;default:l=b(i).toFixed(this._gridOptions.labels.decimalPlaces)}l+=this._gridOptions.labels.prefix;var u=void 0,c=ll({},this._gridOptions.labels.font);"color"in c&&(u=c.color,delete c.color);var f=e.plain(l).font(this._gridOptions.labels.font).center(t[0]+r,t[1]+s);if(void 0!==u&&f.fill(u),"end"==c["text-anchor"]?f.dx(-f.bbox().width/2-3):"start"==c["text-anchor"]&&f.dx(+f.bbox().width/2+3),90!=this._gridOptions.labels.angle&&270!=this._gridOptions.labels.angle||f.dy(f.bbox().height/2+3),this._gridOptions.labels.backdrop.visible){var d=f.bbox();f.before(e.rect(d.width,d.height).move(d.x,d.y).fill({color:this._gridOptions.labels.backdrop.color}))}}}}},{key:"getNormalizedGridOptions",value:function(e){var t=e.axes,n=void 0===t?{}:t,i=e.circles,o=void 0===i?{}:i,r=e.labels,a=void 0===r?{}:r,s=e.max,l=void 0===s?void 0:s;return n=Kr(n),"interval"in(o=Kr(o))&&void 0!==o.interval||(o.interval=g(50)),"angle"in(a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.visible,n=void 0===t||t,i=e.font,o=void 0===i?{}:i,r=zr(e,Fr),a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.visible=$r(n,a.visible,!0),r.font=Hr(o,a.font),Object.keys(a).forEach((function(e){"visible"!=e&&"font"!=e&&void 0===r[e]&&(r[e]=a[e])})),r}(a))&&void 0!==a.angle||(a.angle=225),"unit"in a&&void 0!==a.unit||(a.unit="km/h"),"prefix"in a&&void 0!==a.prefix||(a.prefix=""),"decimalPlaces"in a&&void 0!==a.decimalPlaces||(a.decimalPlaces=0),"backdrop"in a&&void 0!==a.backdrop||(a.backdrop={}),"color"in a.backdrop||(a.backdrop.color="white"),"visible"in a.backdrop||(a.backdrop.visible=!0),void 0===a.font.size&&(a.font.size=10),{axes:n,circles:o,labels:a,max:l}}},{key:"_initHoverLabels",value:function(e){var t=this,n=e.visible,i=void 0===n||n,o=e.type,r=void 0===o?"mousemove":o,s=e.maxDistance,l=void 0===s?20:s,u=e.insertLabelsFunc,c=void 0===u?void 0:u,f=e.getLevelData,d=void 0===f?function(e){var n=e.hoverLabelsSounding,i=e.e,o=e.maxDistance,r=n.sounding,a=void 0,s=void 0;return r.getLevels().filter((function(e){return(void 0===n.options.hodograph.minPressure||n.options.hodograph.minPressure<=e)&&(void 0===n.options.hodograph.maxPressure||e<=n.options.hodograph.maxPressure)})).map((function(e){var n=r.getData(e);if(void 0!==n.wspd&&void 0!==n.wdir){var o=t._getCoordinatesByLevelData("windbarbs",r,n,t),l=o.x,u=o.y,c=Math.pow(i.elementX-l,2)+Math.pow(i.elementY-u,2);(void 0===s||c<a)&&(a=c,s=n)}})),void 0!==o&&Math.pow(o,2)<a&&(s={}),s}:f,p=e.hodograph,h=void 0===p?{}:p;"visible"in h||(h.visible=!0),"style"in h||(h.style={}),h.font=Hr(h.font,{anchor:"end","alignment-baseline":"bottom"}),"fill"in h||(h.fill={}),void 0===h.fill.opacity&&(h.fill.opacity=.7),void 0===h.fill.color&&(h.fill.color="white"),void 0===c&&(c=this._makeInsertLabelsFunc(h)),dl(vl(a.prototype),"_initHoverLabels",this).call(this,{visible:i,type:r,maxDistance:l,insertLabelsFunc:c,getLevelData:d})}},{key:"_makeInsertLabelsFunc",value:function(e){var t=this,n=e.visible,i=void 0===n||n,o=e.style,r=void 0===o?{}:o,a=e.font,s=void 0===a?{}:a,l=e.fill,u=void 0===l?{}:l,c=e.horizontalMargin,f=void 0===c?10:c,d=e.verticalMargin,p=void 0===d?0:d,h=e.radius,v=void 0===h?void 0:h,y=e.radiusPlus,m=void 0===y?2:y,g=e.pressure,_=void 0===g?{}:g,O=e.windspeed,S=void 0===O?{}:O,k=e.winddir,P=void 0===k?{}:k;return _=function(e){var t=e.visible,n=void 0===t||t,i=e.decimalPlaces,o=void 0===i?0:i,r=e.prefix;return{visible:n,decimalPlaces:o,prefix:void 0===r?" hPa":r}}(_),S=function(e){var t=e.visible,n=void 0===t||t,i=e.unit,o=void 0===i?"kn":i,r=e.decimalPlaces,a=void 0===r?0:r,s=e.prefix;return{visible:n,unit:o,decimalPlaces:a,prefix:void 0===s?" kn":s}}(S),P=function(e){var t=e.visible,n=void 0===t||t,i=e.decimalPlaces,o=void 0===i?0:i,r=e.prefix;return{visible:n,decimalPlaces:o,prefix:void 0===r?"°":r}}(P),function(e,n,o){if(o.clear(),void 0!==n&&i){var a=t._getCoordinatesByLevelData("windbarbs",e,n,t),l=a.x,c=a.y;if(void 0!==l&&void 0!==c){var d=e.options.hodograph.style;void 0!==n.pres&&e.options.hodograph.segments.map((function(e){(void 0===e.minPressure||e.minPressure<=n.pres)&&(void 0===e.maxPressure||e.maxPressure>=n.pres)&&(d=e.style)}));var h=void 0===v?d.width/2+m:v,y=ll({},r);"color"in y||(y.color=d.color),o.circle(2*h).attr({cx:l,cy:c}).fill(y);var g=o.rect().fill(u),O=ll({},s);O.anchor="start","start"==O.anchor&&t.width-l<45&&(O.anchor="end"),"end"==O.anchor&&l<45&&(O.anchor="start");var k=0,T=[],x=[];if(_.visible){var j=Number.parseFloat(n.pres).toFixed(_.decimalPlaces);x.push("".concat(j).concat(_.prefix))}if(S.visible){var R="";switch(S.unit){case"m/s":R=Number.parseFloat(n.wspd).toFixed(S.decimalPlaces);break;case"kn":R=w(n.wspd).toFixed(S.decimalPlaces);break;default:R=b(n.wspd).toFixed(S.decimalPlaces)}x.push("".concat(R).concat(S.prefix))}if(P.visible){var E=Number.parseFloat(n.wdir).toFixed(P.decimalPlaces);x.push("".concat(E).concat(P.prefix))}x.map((function(e){k+=5*O.size/4,T.push(Zr({node:o,text:e,x:l,y:c+k,horizontalMargin:f,verticalMargin:p,font:O}))})),c+k>t.height&&T.map((function(e){return e.dy(-k)}));var C={x:void 0,y:void 0,x2:void 0,y2:void 0};T.map((function(e){e.children().map((function(e){if("text"==e.type){var t=e.bbox();(void 0===C.x||t.x<C.x)&&(C.x=t.x),(void 0===C.y||t.y<C.y)&&(C.y=t.y),(void 0===C.x2||C.x2<t.x2)&&(C.x2=t.x2),(void 0===C.y2||C.y2<t.y2)&&(C.y2=t.y2)}}))})),g.attr({x:C.x,y:C.y,width:C.x2-C.x,height:C.y2-C.y})}}}}}])&&fl(t.prototype,n),a}(Ps);function ml(e){return(ml="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)}function bl(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function gl(e,t,n){return(gl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ol(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function wl(e,t){return(wl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _l(e,t){return!t||"object"!==ml(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ol(e){return(Ol=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Sl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&wl(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ol(i);if(o){var n=Ol(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return _l(this,e)});function a(e){var t,n,i,o,s,l=e.svgNode,u=void 0===l?void 0:l,c=e.coordinateSystem,f=e.x,d=e.y,p=e.width,h=e.height,v=e.style,y=void 0===v?{}:v,m=e.visible,b=void 0===m||m,g=e.events,w=void 0===g?{}:g,_=e.labels,O=void 0===_?{}:_,S=e.title,k=void 0===S?{}:S;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),void 0===y.overflow&&(y.overflow="visible"),(t=r.call(this,{svgNode:u,coordinateSystem:c,x:f,y:d,width:p,height:h,style:y,visible:b,events:w}))._labelsOptions=((s={enabled:void 0===(i=(n=O).enabled)||i,style:void 0===(o=n.style)?{}:o}).style=qr(s.style),s),t._titleOptions=function(e){var t=e.align,n=void 0===t?"middle":t,i=e.style,o=void 0===i?{}:i,r=e.text,a={align:n,style:o,text:void 0===r?void 0:r};return a.style=qr(a.style),a}(k),t.init(),t}return t=a,(n=[{key:"_drawBackground",value:function(e){if(gl(Ol(a.prototype),"_drawBackground",this).call(this,e),this._labelsOptions.enabled)for(var t=e.group(),n=50*Math.ceil(this.coordinateSystem.getPByXY(0,this.height)/50),i=50*Math.floor(this.coordinateSystem.getPByXY(0,0)/50),o=n;o<=i;o+=50){var r=this.height-this.coordinateSystem.getYByXP(0,o);t.plain(o).attr({y:r+3.3,x:this.width}).font({size:"11px",anchor:"end"}).attr({fill:this._labelsOptions.style.color})}void 0!==this._titleOptions.text&&e.group().plain(this._titleOptions.text).attr({x:12*.4,y:this.height/2,fill:this._titleOptions.style.color}).font({size:12,anchor:"middle"}).rotate(-90)}}])&&bl(t.prototype,n),a}(ps);const kl=Sl;function Pl(e){return(Pl="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)}function Tl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xl(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function jl(e,t){return(jl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Rl(e,t){return!t||"object"!==Pl(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function El(e){return(El=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Cl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jl(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=El(i);if(o){var n=El(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Rl(this,e)});function a(){return Tl(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"_drawBackground",value:function(e){if(e.clear(),this._labelsOptions.enabled)for(var t=e.group(),n=10*Math.ceil(m(this.coordinateSystem.getTByXY(0,0))/10),i=10*Math.floor(m(this.coordinateSystem.getTByXY(this.width,0))/10),o=n;o<=i;o+=10){var r=y(o);t.plain(Math.round(m(r))).attr({x:this.coordinateSystem.getXByYT(0,r),y:10,fill:this._labelsOptions.style.color}).font({size:"10px",anchor:"middle"})}void 0!==this._titleOptions.text&&e.group().plain(this._titleOptions.text).attr({x:this.width/2,y:this.height-12*.3,fill:this._titleOptions.style.color}).font({size:12,anchor:"middle"})}}])&&xl(t.prototype,n),a}(kl);const Nl=Cl;function Bl(e){return(Bl="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 Il=["svgNode","coordinateSystem","x","y","width","height","style","visible","events","hoverLabels"];function Dl(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Ll(e,t){return(Ll=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Al(e,t){return!t||"object"!==Bl(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ml(e){return(Ml=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const Vl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ll(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ml(i);if(o){var n=Ml(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Al(this,e)});function a(e){var t,n=e.renderTo,i=void 0===n?void 0:n,o=e.width,s=void 0===o?void 0:o,l=e.height,u=void 0===l?void 0:l,c=e.coordinateSystem,f=void 0===c?{}:c,d=e.diagram,p=void 0===d?{}:d,h=e.windbarbsProfile,v=void 0===h?{}:h,y=e.windspeedProfile,m=void 0===y?{}:y,b=e.hodograph,g=void 0===b?{}:b,w=e.xAxis,_=void 0===w?{}:w,O=e.yAxis,S=void 0===O?{}:O;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),t=r.call(this,{renderTo:i,width:s,height:u}),p=Gl(p),v=Gl(v),m=Gl(m),g=Gl(g),_=Gl(_),S=Gl(S);var k=.05*t.svgNode.width();return void 0===_.width&&void 0===p.width&&void 0===v.width&&void 0===m.width?(S.width=.1*(t.svgNode.width()-2*k),p.width=.7*(t.svgNode.width()-2*k),v.width=.2*(t.svgNode.width()-2*k)*1/3,m.width=.2*(t.svgNode.width()-2*k)*2/3):void 0===p.width?p.width=t.svgNode.width()-2*k-v.width-m.width:void 0===v.width&&void 0===m.width&&(v.width=1*(t.svgNode.width()-2*k-p.width)/3,m.width=2*(t.svgNode.width()-2*k-p.width)/3),void 0===S.x&&void 0===p.x&&void 0===v.x&&void 0===m.x?(S.x=k,p.x=S.x+S.width,v.x=p.x+p.width,m.x=v.x+v.width):void 0===p.x?p.x=v.x-v.width:void 0===v.x&&void 0===m.x&&(v.x=p.x+p.width,m.x=v.x+v.width),void 0===_.height&&(_.height=.06*t.svgNode.height()),void 0===p.height&&(p.height=t.svgNode.height()-_.height-2*k),void 0===S.height&&(S.height=p.height),void 0===v.height&&(v.height=p.height),void 0===m.height&&(m.height=p.height),void 0===p.y&&(p.y=k),void 0===S.y&&(S.y=p.y),void 0===v.y&&(v.y=p.y),void 0===m.y&&(m.y=p.y),void 0===_.width&&(_.width=p.width),void 0===_.x&&(_.x=p.x),void 0===_.y&&(_.y=p.y+p.height),void 0===_.height&&(_.height=k),void 0===g.x&&(g.x=p.x),void 0===g.y&&(g.y=p.y),void 0===g.width&&(g.width=.4*Math.min(p.width,p.height)),void 0===g.height&&(g.height=g.width),t.diagram=new Xs(p),t.appendPlotArea(t.diagram),t.yAxis=new Sl(S),t.appendPlotArea(t.yAxis),t.xAxis=new Cl(_),t.appendPlotArea(t.xAxis),t.windbarbsProfile=new $s(v),t.appendPlotArea(t.windbarbsProfile),t.windspeedProfile=new rl(m),t.appendPlotArea(t.windspeedProfile),t.hodograph=new yl(g),t.hodograph.on("prebuild:background",(function(e){e.node.rect(t.hodograph.width-2,t.hodograph.height-2).move(1,1).fill({color:"white"}).stroke({color:"black",width:1})})),t.appendPlotArea(t.hodograph),void 0===f.type&&(f.type="skewTlogP"),f.width=p.width,f.height=p.height,t._coordinateSystem,t.coordinateSystem="stueve"==f.type?new Wa(f):"emagram"==f.type?new is(f):new us(f),t}return t=a,(n=[{key:"coordinateSystem",get:function(){return this._coordinateSystem},set:function(e){this._coordinateSystem=e,this.exchangeCoordinateSystem(this._coordinateSystem)}},{key:"getDiagramPlotArea",value:function(){return this.diagram}}])&&Dl(t.prototype,n),a}(Va);function Gl(e){var t=e.svgNode,n=void 0===t?void 0:t,i=e.coordinateSystem,o=void 0===i?void 0:i,r=e.x,a=void 0===r?void 0:r,s=e.y,l=void 0===s?void 0:s,u=e.width,c=void 0===u?void 0:u,f=e.height,d=void 0===f?void 0:f,p=e.style,h=void 0===p?{}:p,v=e.visible,y=void 0===v||v,m=e.events,b=void 0===m?{}:m,g=e.hoverLabels,w=void 0===g?{}:g,_=function(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n,i,o={},r=Object.keys(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Il);return _.svgNode=n,_.coordinateSystem=o,_.x=a,_.y=l,_.width=c,_.height=d,_.style=h,_.visible=y,_.events=b,_.hoverLabels=w,_}function Fl(e){return(Fl="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)}function Yl(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Xl(e,t){return(Xl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function zl(e,t){return!t||"object"!==Fl(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ql(e){return(ql=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Hl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Xl(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ql(i);if(o){var n=ql(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return zl(this,e)});function a(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(e=r.call(this)).imgNode=void 0,e.thermodynamicDiagram=void 0,e.resourceNode=void 0,e}return t=a,(n=[{key:"onInit",value:function(){void 0!==this.parentNode&&(this.resourceNode=$()(this.parentNode),this.resourceNode.empty())}},{key:"onChangeVisibleResource",value:function(){if(void 0!==this.resourceNode){var e=this.container.visibleResource;if("url"in e)void 0!==this.thermodynamicDiagram&&(this.thermodynamicDiagram=void 0,this.resourceNode.empty()),void 0===this.imgNode&&(this.resourceNode.empty(),this.imgNode=$()("<img>"),this.resourceNode.append(this.imgNode)),this.imgNode.attr("src",e.url),this.imgNode.css({"max-width":"100%"});else if("sounding"in e){void 0!==this.imgNode&&(this.imgNode=void 0,this.resourceNode.empty()),void 0===this.thermodynamicDiagram&&(this.thermodynamicDiagram=new Vl({renderTo:this.resourceNode}));var t=!1;this.thermodynamicDiagram.soundings.forEach((function(n){n.getSounding()===e.sounding?(t=!0,n.visible(!0)):n.visible(!1)})),t||this.thermodynamicDiagram.addSounding(e.sounding)}else this.imgNode=void 0,this.resourceNode.empty()}}}])&&Yl(t.prototype,n),a}(Or);function Kl(e){return(Kl="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)}function Ul(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function $l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zl(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Wl(e,t,n){return(Wl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=eu(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function Jl(e,t){return(Jl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ql(e,t){return!t||"object"!==Kl(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function eu(e){return(eu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var tu={addEventFunctions:B},nu={Animation:Q,Visualisation:ue,makeTimeTextCallbackFunction:function(e){return function(t,n){var i=e.utc(t);return void 0!==this.options.outputTimezone&&("local"==this.options.outputTimezone?i.local():i.tz(this.options.outputTimezone)),i.format(n)}},animation:{ToggleButton:function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};re(this,e);var i=n.animation,o=void 0===i?void 0:i,r=n.node,a=void 0===r?void 0:r,s=n.startedContent,l=void 0===s?void 0:s,u=n.startedClass,c=void 0===u?void 0:u,f=n.stoppedContent,d=void 0===f?void 0:f,p=n.stoppedClass,h=void 0===p?void 0:p,v=n.classButton,y=void 0===v?void 0:v,m=n.classDropdownToggle,b=void 0===m?void 0:m,g=n.menu,w=void 0===g||g,_=n.menuImageFrequency,O=void 0===_||_,S=n.imageFrequencyCaption,k=void 0===S?"Frequency":S,P=n.menuFrequencies,T=void 0===P?void 0:P,x=n.menuRestartPause,j=void 0===x||x,R=n.restartPauseCaption,E=void 0===R?"Restart pause":R;"startedContent"in n||(l=$()(oe)),"stoppedContent"in n||(d=$()(ie)),this.options={animation:o,node:a,startedContent:l,startedClass:c,stoppedContent:d,stoppedClass:h,classButton:y,classDropdownToggle:b,menu:w,menuImageFrequency:O,imageFrequencyCaption:k,menuFrequencies:T,menuRestartPause:j,restartPauseCaption:E},this.options.node=$()(this.options.node);var C=this.options.node;this.options.node.is("button")||(C=$()("<button>").addClass("btn"),this.options.node.append(C)),C.addClass(this.options.classButton);var N=function(){C.removeClass(t.options.stoppedClass),C.addClass(t.options.startedClass),C.empty(),"string"==typeof t.options.startedContent||t.options.startedContent instanceof String?C.text(t.options.startedContent):C.append(t.options.startedContent)},B=function(){C.removeClass(t.options.startedClass),C.addClass(t.options.stoppedClass),C.empty(),"string"==typeof t.options.stoppedContent||t.options.stoppedContent instanceof String?C.text(t.options.stoppedContent):C.append(t.options.stoppedContent)};if(this.options.animation.on("start:animation",N),this.options.animation.on("stop:animation",B),C.click((function(){return t.options.animation.toggle()})),this.options.animation.isStarted()?N():B(),!this.options.node.is("button")&&this.options.menu){this.options.node.addClass("btn-group");var I=$()("<button>").attr("type","button").addClass("btn dropdown-toggle dropdown-toggle-split").addClass(this.options.classDropdownToggle).attr("data-bs-toggle","dropdown").attr("aria-expanded",!1);I.append($()("<span>").addClass("visually-hidden").text("Toggle Dropdown")),this.options.node.append(I);var D=$()("<div>").addClass("dropdown-menu");this.options.node.append(D);var L=$()("<form>").addClass("px-4 py-3");if((this.options.menuImageFrequency||this.options.menuRestartPause)&&D.append(L),this.options.menuImageFrequency){var A=$()("<label>").addClass("form-label").text(this.options.imageFrequencyCaption),M=$()("<div>").append(A);this.options.menuRestartPause&&M.addClass("mb-3"),L.append(M),ee(M,{animation:this.options.animation}),void 0!==this.options.menuFrequencies&&te(M,{animation:this.options.animation,frequencies:this.options.menuFrequencies})}if(this.options.menuRestartPause){var V=$()("<label>").addClass("form-label").text(this.options.restartPauseCaption),G=$()("<div>").append(V);L.append(G),ne(G,{animation:this.options.animation})}}},insertFrequencyInput:ee,insertFrequencyRange:te,insertFrequencyButtonGroup:function(e,t){var n=t.animation,i=t.frequencies,o=t.btnGroupClass,r=void 0===o?"btn-group":o,a=t.btnClass,s=void 0===a?"btn btn-primary":a,l=t.suffix,u=void 0===l?"fps":l,c=$()("<div>").addClass(r);(i=i||[]).forEach((function(e){c.append($()("<button>").addClass(s).data("frequency",e).text(e+" "+u).click((function(){return n.setImageFrequency(e)})))}));var f=function(){c.children("button").removeClass("active").each((function(){$()(this).data("frequency")==n.getImageFrequency()&&$()(this).addClass("active")}))};return n.on("change:imageFrequency",f),f(),e.append(c),c},insertRestartPauseInput:ne,insertRestartPauseRange:function(e,t){var n=t.animation,i=t.pauses;i=(i=i||[1]).map((function(e){return Math.round(1e3*e)}));var o=$()("<input>").addClass("form-range").attr("type","range").attr("min",0).attr("max",i.length-1);o.on("change input",(function(){var e=o.val();e<i.length&&n.setRestartPause(i[e]/1e3)}));var r=function(){var e=i.indexOf(Math.round(1e3*n.getRestartPause()));e>-1&&o.val(e)};return n.on("change:imageFrequency",r),r(),e.append(o),o},insertRestartPauseButtonGroup:function(e,t){var n=t.animation,i=t.pauses,o=t.btnGroupClass,r=void 0===o?"btn-group":o,a=t.btnClass,s=void 0===a?"btn btn-primary":a,l=t.suffix,u=void 0===l?"s":l,c=$()("<div>").addClass(r);(i=i||[]).forEach((function(e){c.append($()("<button>").addClass(s).data("pause",e).text(e+" "+u).click((function(){return n.setRestartPause(e)})))}));var f=function(){c.children("button").removeClass("active").each((function(){$()(this).data("pause")==n.getRestartPause()&&$()(this).addClass("active")}))};return n.on("change:restartPause",f),f(),e.append(c),c}},visualisation:{Text:be,Slider:ke,bsButtons:Be,bsDropdown:Xe}},iu={Collection:$e,Map:He,map:{MapOL:At,MapLL:Xt},Resource:ot,resource:{GeoJSON:an,GeoJSONTile:On,Image:Bn,OSM:zn,Vector:en,VectorTile:mn},ResourceCollection:ft,Tooltip:St,Type:vt,TypeCollection:Ot},ou={BootstrapTooltip:ti},ru={Variable:Yi,TimeVariable:$i,VariableCollection:uo,Node:So,Resource:jo,resource:{Image:Do,Sounding:Qo},Resources:sr,NWPResources:vr,Container:Lr,Display:Or,display:{Simple:Hl,SelectNavigation:function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jl(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=eu(i);if(o){var n=eu(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Ql(this,e)});function a(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.ignoreVariableCollections,i=void 0===n?[]:n,o=t.selectCaption,s=void 0!==o&&o,l=t.navigationClass,u=void 0===l?void 0:l,c=t.selectDivClass,f=void 0===c?void 0:c,d=t.selectClass,p=void 0===d?void 0:d;return $l(this,a),(e=r.call(this)).options={ignoreVariableCollections:new Set(i),selectCaption:s,navigationClass:u,selectDivClass:f,selectClass:p},e.navigationNode=void 0,e.selectNodes=new Map,e}return t=a,(n=[{key:"onInit",value:function(){var e=this;void 0!==this.parentNode&&(this.navigationNode=$()("<div>").addClass(this.options.navigationClass),this.resourceNode=$()("<div>"),$()(this.parentNode).empty().append(this.navigationNode,this.resourceNode),void 0!==this.modelviewer&&this.modelviewer.resources.variableCollections.filter((function(t){return!e.options.ignoreVariableCollections.has(t)&&t.count>0})).forEach((function(t){return e._appendSelectNode(t)})),this._changeSelected())}},{key:"onChangeVisibleResource",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.variable;Wl(eu(a.prototype),"onChangeVisibleResource",this).call(this,{variable:t}),this._changeSelected()}},{key:"onAppendVariable",value:function(e){this.selectNodes.has(e.variableCollection)?this._appendOptionNode(this.selectNodes.get(e.variableCollection),e):this._appendSelectNode(e.variableCollection),this._changeSelected()}},{key:"_appendSelectNode",value:function(e){var t=this,n=$()("<select>").addClass(this.options.selectClass);if(n.on("change",(function(){var i=e.getItemById(n.val());t.container.exchangeDisplayVariable=[i]})),this.options.selectCaption){var i=$()("<option>").text(e.name).attr("disabled","disabled").prop("selected","selected");n.append(i)}e.variables.forEach((function(e){t._appendOptionNode(n,e)})),this.navigationNode.append($()("<div>").addClass(this.options.selectDivClass).append(n)),this.selectNodes.set(e,n)}},{key:"_appendOptionNode",value:function(e,t){var n=$()("<option>").attr("value",t.id).text(t.name).addClass(this.options.optionsClass);e.append(n)}},{key:"_changeSelected",value:function(){var e,t=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ul(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ul(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}(this.selectNodes.keys());try{for(t.s();!(e=t.n()).done;){var n=e.value;if(this.selectNodes.has(n)){var i=this.container.visibleResource.getVariableByVariableCollection(n);this.selectNodes.get(n).val(i.id)}}}catch(e){t.e(e)}finally{t.f()}}}])&&Zl(t.prototype,n),a}(Hl)}},au={Parcel:Fo},su={CoordinateSystem:Xa,coordinateSystem:{StueveDiagram:Wa,Emagram:is,SkewTlogPDiagram:us},DiagramSounding:_a,Hodograph:yl,TDDiagram:Xs,functions:{drawWindbarbInto:Wr},WindbarbsProfile:$s,WindspeedProfile:rl,axes:{xAxis:Nl,yAxis:kl}}})(),meteoJS=i})();
 //# sourceMappingURL=meteoJS.min.js.map
\ No newline at end of file
diff --git a/meteoJS.min.js.LICENSE.txt b/meteoJS.min.js.LICENSE.txt
index 3c70f852..cfdaba41 100644
--- a/meteoJS.min.js.LICENSE.txt
+++ b/meteoJS.min.js.LICENSE.txt
@@ -1 +1 @@
-/*! /*meteoJS v1.14.6 | (c) Ivo Sonderegger, SRF Meteo | https://chird.github.io/meteoJS/LICENSE* / */
+/*! /*meteoJS v1.15.0 | (c) Ivo Sonderegger, SRF Meteo | https://chird.github.io/meteoJS/LICENSE* / */
diff --git a/meteoJS.min.js.map b/meteoJS.min.js.map
index b197962d..a8bddb02 100644
--- a/meteoJS.min.js.map
+++ b/meteoJS.min.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack://meteoJS/./node_modules/regenerator-runtime/runtime.js","webpack://meteoJS/webpack/bootstrap","webpack://meteoJS/webpack/runtime/compat get default export","webpack://meteoJS/webpack/runtime/define property getters","webpack://meteoJS/webpack/runtime/hasOwnProperty shorthand","webpack://meteoJS/webpack/runtime/make namespace object","webpack://meteoJS/webpack/runtime/node module decorator","webpack://meteoJS/./src/meteoJS/calc.js","webpack://meteoJS/./src/meteoJS/Events.js","webpack://meteoJS/./src/meteoJS/RepetitiveRequests.js","webpack://meteoJS/./src/meteoJS/Timeline.js","webpack://meteoJS/external \"jQuery\"","webpack://meteoJS/./src/meteoJS/timeline/Animation.js","webpack://meteoJS/./node_modules/bootstrap-icons/icons/play-fill.svg","webpack://meteoJS/./node_modules/bootstrap-icons/icons/pause-fill.svg","webpack://meteoJS/./src/meteoJS/timeline/Visualisation.js","webpack://meteoJS/./src/meteoJS/timeline/visualisation/Text.js","webpack://meteoJS/./src/meteoJS/timeline/visualisation/Slider.js","webpack://meteoJS/./src/meteoJS/timeline/visualisation/bsButtons.js","webpack://meteoJS/./src/meteoJS/timeline/visualisation/bsDropdown.js","webpack://meteoJS/./src/meteoJS/synview/SynviewMap.js","webpack://meteoJS/./src/meteoJS/synview/Collection.js","webpack://meteoJS/external \"ol.layer.Group\"","webpack://meteoJS/external \"ol.layer.Vector\"","webpack://meteoJS/external \"ol.Observable\"","webpack://meteoJS/./src/meteoJS/synview/Resource.js","webpack://meteoJS/./src/meteoJS/synview/ResourceCollection.js","webpack://meteoJS/./src/meteoJS/synview/Type.js","webpack://meteoJS/./src/meteoJS/synview/TypeCollection.js","webpack://meteoJS/./src/meteoJS/synview/Tooltip.js","webpack://meteoJS/./src/meteoJS/Synview.js","webpack://meteoJS/external \"ol.proj\"","webpack://meteoJS/./src/meteoJS/synview/map/MapOL.js","webpack://meteoJS/./src/meteoJS/synview/map/MapLL.js","webpack://meteoJS/external \"ol.format.GeoJSON\"","webpack://meteoJS/external \"ol.source.Vector\"","webpack://meteoJS/./src/meteoJS/synview/resource/Vector.js","webpack://meteoJS/./src/meteoJS/synview/resource/GeoJSON.js","webpack://meteoJS/external \"ol.source.VectorTile\"","webpack://meteoJS/external \"ol.layer.VectorTile\"","webpack://meteoJS/./src/meteoJS/synview/resource/VectorTile.js","webpack://meteoJS/./src/meteoJS/synview/resource/GeoJSONTile.js","webpack://meteoJS/external \"ol.source.ImageStatic\"","webpack://meteoJS/external \"ol.layer.Image\"","webpack://meteoJS/./src/meteoJS/synview/resource/Image.js","webpack://meteoJS/external \"ol.source.OSM\"","webpack://meteoJS/external \"ol.layer.Tile\"","webpack://meteoJS/./src/meteoJS/synview/resource/OSM.js","webpack://meteoJS/./src/meteoJS/Tooltip.js","webpack://meteoJS/external \"bootstrap\"","webpack://meteoJS/./src/meteoJS/tooltip/BootstrapTooltip.js","webpack://meteoJS/./src/meteoJS/base/Unique.js","webpack://meteoJS/./src/meteoJS/base/Collection.js","webpack://meteoJS/./src/meteoJS/Modelviewer.js","webpack://meteoJS/./src/meteoJS/base/Named.js","webpack://meteoJS/./src/meteoJS/base/UniqueNamed.js","webpack://meteoJS/./src/meteoJS/modelviewer/Variable.js","webpack://meteoJS/./src/meteoJS/modelviewer/TimeVariable.js","webpack://meteoJS/./src/meteoJS/modelviewer/VariableCollection.js","webpack://meteoJS/./src/meteoJS/base/NamedCollection.js","webpack://meteoJS/./src/meteoJS/modelviewer/ResourcesTreeNode.js","webpack://meteoJS/./src/meteoJS/modelviewer/Node.js","webpack://meteoJS/./src/meteoJS/modelviewer/Resource.js","webpack://meteoJS/./src/meteoJS/modelviewer/resource/Image.js","webpack://meteoJS/./src/meteoJS/sounding/Parcel.js","webpack://meteoJS/./src/meteoJS/Sounding.js","webpack://meteoJS/./src/meteoJS/modelviewer/resource/Sounding.js","webpack://meteoJS/./src/meteoJS/modelviewer/Resources.js","webpack://meteoJS/./src/meteoJS/modelviewer/NWPResources.js","webpack://meteoJS/./src/meteoJS/modelviewer/Display.js","webpack://meteoJS/./src/meteoJS/modelviewer/Container.js","webpack://meteoJS/external \"SVG\"","webpack://meteoJS/./src/meteoJS/thermodynamicDiagram/Functions.js","webpack://meteoJS/./src/meteoJS/thermodynamicDiagram/DiagramParcel.js","webpack://meteoJS/./src/meteoJS/thermodynamicDiagram/DiagramSounding.js","webpack://meteoJS/./src/meteoJS/ThermodynamicDiagramPluggable.js","webpack://meteoJS/./src/meteoJS/thermodynamicDiagram/CoordinateSystem.js","webpack://meteoJS/./src/meteoJS/thermodynamicDiagram/coordinateSystem/StueveDiagram.js","webpack://meteoJS/./src/meteoJS/thermodynamicDiagram/coordinateSystem/Emagram.js","webpack://meteoJS/./src/meteoJS/thermodynamicDiagram/coordinateSystem/SkewTlogPDiagram.js","webpack://meteoJS/./src/meteoJS/thermodynamicDiagram/PlotArea.js","webpack://meteoJS/./src/meteoJS/thermodynamicDiagram/PlotDataArea.js","webpack://meteoJS/./src/meteoJS/thermodynamicDiagram/PlotAltitudeDataArea.js","webpack://meteoJS/./src/meteoJS/thermodynamicDiagram/TDDiagram.js","webpack://meteoJS/./src/meteoJS/thermodynamicDiagram/WindbarbsProfile.js","webpack://meteoJS/./src/meteoJS/thermodynamicDiagram/WindspeedProfile.js","webpack://meteoJS/./src/meteoJS/thermodynamicDiagram/Hodograph.js","webpack://meteoJS/./src/meteoJS/thermodynamicDiagram/axes/yAxis.js","webpack://meteoJS/./src/meteoJS/thermodynamicDiagram/axes/xAxis.js","webpack://meteoJS/./src/meteoJS/ThermodynamicDiagram.js","webpack://meteoJS/./src/meteoJS/modelviewer/display/Simple.js","webpack://meteoJS/./src/meteoJS/index.js","webpack://meteoJS/./src/meteoJS/timeline/animation/ToggleButton.js","webpack://meteoJS/./src/meteoJS/modelviewer/display/SelectNavigation.js"],"names":["runtime","exports","undefined","Op","Object","prototype","hasOwn","hasOwnProperty","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","obj","key","value","defineProperty","enumerable","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","state","GenStateSuspendedStart","method","arg","GenStateExecuting","Error","GenStateCompleted","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","type","done","GenStateSuspendedYield","makeInvokeMethod","fn","call","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","this","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","AsyncIterator","PromiseImpl","invoke","resolve","reject","result","__await","then","unwrapped","error","previousPromise","callInvokeWithMethodAndArg","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","length","i","constructor","displayName","isGeneratorFunction","genFun","ctor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","toString","keys","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","module","regeneratorRuntime","accidentalStrictMode","Function","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","id","loaded","__webpack_modules__","n","getter","__esModule","d","a","definition","o","get","prop","r","nmd","paths","children","altitudeISAByPres","p","Math","pow","pressureISAByAltitude","potentialTempByTempAndPres","temp","pres","tempByPotentialTempAndPres","potentialTemp","tempByEquiPotTempAndPres","thetae","s","pcon","t","delta","abs","saturationHMRByTempAndPres","exp","dewpointByHMRAndPres","hmr","x","log","wetbulbTempByTempAndDewpointAndPres","dewpoint","Ediff","incr","previoussign","E","equiPotentialTempByTempAndDewpointAndPres","potTemp","lclTemperatureByTempAndDewpoint","saturationPressureByTemp","coef","Array","escold","retval","tt","inx","e","lclByPotentialTempAndHMR","b","hmrp","potentialTempByLCLAndHMR","lcl","Th","lclTh","tempCelsiusToKelvin","tempKelvinToCelsius","windspeedMSToKMH","wind","windspeedKMHToMS","windspeedMSToKN","windspeedKNToMS","windspeedMSToBF","min","windspeedBFToMS","snowlineByTemp850hPaAndAltidude","pressureByBarometricFormula","p0","h","T0","T1","M","densityHumidAirByPressureAndTempAndRelHumidity","T","rh","pv","on","listener","callback","thisArg","listeners","result_key","random","substr","un","once","once_listeners","hasListener","trigger","args","arguments","shift","apply","RepetitiveRequests","url","user","password","start","defaultTimeout","timeoutOnError","pauseOnHiddenDocument","responseType","_url","_user","_password","_isStarted","_defaultTimeout","_timeoutOnError","_pauseOnHiddenDocument","_initPauseOnHiddenDocument","_isSuppressedByHiddenDocument","_responseType","_timeoutID","_loading","_startRequest","clearTimeout","delay","setTimeout","document","hidden","_makeRequest","request","cacheControl","getResponseHeader","maxAges","exec","round","_planRequest","XMLHttpRequest","addEventListener","status","open","send","addEventFunctions","Timeline","maxTimeGap","keyboardNavigation","selectedTime","Date","times","enabledTimes","allEnabledTimes","timesByKey","_keyboardNavigation","_initKeyboardNavigation","time","_setSelectedTime","_indexOfTimeInTimesArray","enabled","_updateTimes","_updateEnabledTimes","getFirstEnabledTime","getLastEnabledTime","getNextEnabledTime","getPrevEnabledTime","getNextAllEnabledTime","getPrevAllEnabledTime","amount","timeKey","getSelectedTime","valueOf","setUTCFullYear","getUTCFullYear","setUTCMonth","getUTCMonth","setUTCDate","getUTCDate","index","reduce","acc","oldTime","timesArr","_sortTimesArray","lastTime","getTime","first","last","prevAllEnabledTime","nextAllEnabledTime","add","sub","event","test","matches","match","_isEventMatchPressedKeys","preventDefault","stopPropagation","findIndex","sort","keyboardEvent","pressedKeys","cur","indexOf","keyCode","jQuery","Animation","timeline","restartPause","imagePeriod","imageFrequency","enabledStepsOnly","allEnabledStepsOnly","options","animationIntervalID","animationTimeoutID","animationStep","timesHash","onChangeTimes","_getTimelineTimesMethod","_getTimelineChangeTimesEvent","isStarted","_updateAnimation","setImagePeriod","Number","_setStep","_clearAnimation","step","_getCount","_initAnimation","_initRestartPause","window","setInterval","setSelectedTime","clearInterval","insertFrequencyInput","node","animation","suffix","number","$","addClass","attr","inputGroupNumber","append","text","setImageFrequency","val","onChangeImageFrequency","getImageFrequency","insertFrequencyRange","frequencies","range","insertRestartPauseInput","input","setRestartPause","onChange","getRestartPause","Visualisation","textInvalid","getTimeText","outputTimezone","inputListener","emptyNode","detachEventListeners","isListenersDefined","attachEventListener","onChangeTime","onInitNode","updateOutput","methodName","format","toISOString","func","listenerArr","off","rest","setNode","timeToText","timesIndexes","getTimelineTimes","that","grouping","groupingFormat","classMain","classButtonGroup","classButtonGroupMargin","classLabel","classLabelSpan","classButton","classButtonActive","classButtonNotEnabled","classButtonEnabled","classButtonAllEnabled","toolbarNode","find","each","data","removeClass","empty","lastNode","btnGroup","span","btn","isTimeAllEnabled","isTimeEnabled","click","hasClass","buttonFormat","groupingDivider","classDropdownMenu","classDropdownItem","classItemActive","classItemNotEnabled","classItemEnabled","classItemAllEnabled","classDropdownHeader","classDropdownDivider","classDropdownButton","visualisationButtonText","Text","dropdownNode","setOutputTimezone","lastGroupTimeStr","getElementById","button","SynviewMap","map","layerGroup","synviewType","layer","feature","color","Collection","itemIds","items","getIndexById","itemId","item","getId","containsId","getItemById","splice","ol","Group","Vector","Observable","Resource","datetime","mimetype","reloadTime","className","imageSmoothingEnabled","_normalizeOLOptions","reloadTimerId","visible","zIndex","opacity","_imageSmoothing","getUrl","_reload","setVisible","addTo","removeLayer","setZIndex","setOpacity","imageSmoothing","getLayers","remove","getLLLayer","getVisible","addLayer","getOLLayer","setReloadTime","getReloadTime","_makeOLLayer","VectorLayer","makeOLLayer","events","eventName","source","getSource","contextOptions_","msImageSmoothingEnabled","_makeLLLayer","L","Layer","makeLLLayer","reloadFunction","getState","unByKey","getOpacity","getZIndex","bind","style","res","getResourceByTime","resource","_append","_sortTimes","_remove","resources","_filterTimesByResources","getDatetime","tIndex","containsStaticResource","filter","Type","displayMethod","displayMaxResourceAge","displayFadeStart","displayFadeStartOpacity","tooltip","preload","collection","ResourceCollection","displayedResourceTime","_addOLLayer","_preload","_removeOLLayer","newResource","oldResource","_replaceOLLayer","setResources","getResourceCollection","getItems","setLayerGroup","LayerGroup","group","setDisplayTime","_hideVisibleResource","getTimes","time_to_show","_getResourceTimeByDisplayTime","styleArguments","setOLStyle","getLayerGroup","resultTime","resourceTime","exclusiveVisibility","syncVisibility","isVisible","getVisibleTypes","isVisibleType","typeCollection","tooltipFeature","tooltipPixelColor","getOwnPropertyDescriptor","tooltipNode","css","prependTo","getMap","getTargetElement","dragging","getExtendedEventByTypeCollection","join","show","posX","pixel","posY","tooltipContent","getTooltip","content","hide","Synview","TypeCollection","getTypeCollection","updateTimes","isLastTime","isLastEnabledTime","setTimesBySetID","appendType","makeLayerGroup","getTimeline","Tooltip","removeType","deleteSetID","removedType","newId","setId","proj","projwgs84","getView","transform","getCenter","getProjection","center","valid","setCenter","fromLonLat","getZoom","zoom","setZoom","visibleTypes","Map","set","visibleLayers","Set","visibleLayerClassnames","getArray","getClassName","forEachFeatureAtPixel","l","hitTolerance","layerFilter","has","forEachLayerAtPixel","GeoJSON","opt","sourceOptions","projection","VectorSource","setStyle","getStyle","GeoJSONFormat","VectorTile","VectorTileSource","VectorTileLayer","ImageStatic","Image","extent","imageExtent","transformExtent","ImageLayer","Static","imageOverlay","image_","load","OSM","Tile","TileLayer","OSMSource","_isShown","_content","oldContent","onContentChange","fireShowEvent","isShown","fireHideEvent","bootstrap","bootstrapOptions","closeOnMouseMove","closeOnMouseEnter","_initBootstrapOptions","_tooltipNode","_bsTooltip","_initTooltipNode","left","top","update","isStringContent","_updateNonStringContent","dispose","bsTooltip","mousemove","mouseenter","_id","fireReplace","fireAddRemoveOnReplace","appendOnReplace","sortFunction","emptyObjectMaker","_itemIds","_items","_sort","Unique","addItem","removeItem","replaceItem","itemInCollection","realItem","ids","containersNode","makeContainerNode","firstTimeOnInit","lastTimeOnInit","_resources","_containersNode","jquery","_timeline","_makeContainerNode","listenerKeys","container","modelviewer","containerNode","_getContainerNode","c","parentNode","removeChild","containers","createElement","appendChild","names","langSortation","_name","_names","_langSortation","getDefaultName","lang","getNameByLang","lS","langs","ia","ib","Named","variableCollection","_variableCollection","UniqueNamed","_datetime","Variable","_node","setNameByLang","getNameByLangNoFallback","_children","_parent","parent","variable","aimedNode","getVariableByVariableCollection","child","buildChildrenTreeForResource","ResourcesTreeNode","entries","size","v","variables","findNodeByVariables","Node","_parents","_resourcesTopNode","nodes","_addParent","_makeResourcesTopNode","addedCount","resourcesTreeNode","mapByVariables","removedCount","resourcesSet","exactlyMatch","variablesSet","isAdded","collectResourcesTreeChildren","getChildByVariable","resourcesTreeNodes","getResourcesByVariables","traversedNodes","getTopNode","parents","run","offset","_variables","_run","_offset","_updateDatetime","vars","tmpc","dwpc","ptrace","ttrace","blayer","tlayer","lclpres","lclhght","lfcpres","lfchght","elpres","elhght","mplpres","mplhght","bplus","bminus","bfzl","b3km","b6km","p0c","pm10c","pm20c","pm30c","hght0c","hghtm10c","hghtm20c","hghtm30c","wm10c","wm20c","wm30c","li5","li3","brnshear","brnu","brnv","limax","limaxpres","cap","cappres","bmin","bminpres","calcMissing","parcels","levels","_parcelCollection","Parcel","levelsData","levelData","addLevel","calculateMissingData","hght","u","wdir","wspd","tmpk","dwpk","relh","mixr","theta","wetbulb","vtmp","sin","PI","cos","sqrt","arctan","levelA","levelB","sounding","_sounding","SoundingData","Resources","topNode","timesVariableCollections","_topNode","_availableVariablesMap","_timesVariableCollections","pushChildCollections","addedResources","_getTopNodeOfResourceDefinition","_getTopMostChildWithAllVariables","_addAvailableVariablesMapByResource","INTERNAL_CHANGE_RESOURCES","timeoutId","removedResources","removedNodeResourcesMap","_removeAvailableVariablesMapByResources","fullCheckVariables","hasResourcesByVariables","getNodeByVariableCollection","_hasResourcesOfNodeChildren","VariableCollection","isDefinedByVariableOf","childNode","bubbleDown","isVariableContained","_getNodeByVariableCollection","compareFunc","_findChildNodeByVariableCollection","_checkVariableInNode","isDefinedBy","from","traversedNode","exact","collectTimes","collections","models","runs","regions","fields","accumulations","thresholds","TimeVariable","getNodeByVariableCollectionId","Display","alwaysAvailableCollections","_alwaysAvailableCollections","_modelviewer","_container","_parentNode","_resourceNode","_resourceOutput","image","thermodynamicDiagram","variableCollections","_onChangeVisibleResource","onInit","resourceNode","onChangeVisibleResource","_getParentsVariables","getAvailableVariables","selectedVariables","parentResult","visibleResource","isAppended","soundings","getSounding","addSounding","Container","totalAddedVariables","totalRemovedVariables","display","adaptSuitableResource","_display","_containerNode","_adaptSuitableResource","_initAdaptSuitableResource","_visibleResource","_displayVariables","_selectedVariables","_selectedNode","_enabledResources","_debouncedChangeSelectedVariables","addedVariables","removedVariables","clear","_listeners","mirror","listenerKey","_setVisibleResource","_setTimes","_setEnabledResources","_updateSelectedVariables","displayVariables","displayVariable","f","mirrorConfig","onChangeDisplayVariables","newDisplayVariables","exchangeDisplayVariable","mC","newVariableCollection","isContained","mirrorsFrom","_getSelectedVariablesWithResources","contained","selectedVariable","contains","availableTimes","getTimesByVariables","selectedNode","findFirstNodeWithVariable","_setSelectedVariables","sV","lSV","isFound","tempSV","getSelectedVariable","lastSelectedVariable","isResourceSelected","checkPossibleVariable","possibleSelectedVariable","tempSelectedVariables","resultSelectedVariables","resultLastSelectedVariable","isOnlyTimesVariables","availableSelectedVariables","availableVariablesMap","possibleSelectedVariables","getPossibleVariables","setEnabledTimesBySetID","oldVisibleResource","availableSV","lastAddedVariable","SVG","getNormalizedLineStyleOptions","width","defaults","getFirstDefinedValue","getNormalizedFontOptions","anchor","getNormalizedLineOptions","updateLineOptions","updateOptions","styleKey","params","drawTextInto","y","horizontalMargin","verticalMargin","font","fill","background","rect","textNode","dy","bbox","height","dx","drawWindbarbInto","strokeStyle","fillTriangle","triangleRatio","barbDistanceRatio","barbHeightRatio","circleOnLowWindspeed","circleRadiusRatio","windspeed","windbarbGroup","barbGroup","triangleWidth","barbDistance","windbarbHeight","yPosition","windspeedResidual","circle","cx","cy","stroke","line","polyline","barbsWidth","scale","rotate","DiagramParcel","parcel","dewp","_parcel","_options","linecap","oldVisible","willTrigger","DiagramSounding","diagram","windprofile","hodograph","_diagramParcelCollection","_visible","getNormalizedDiagramOptions","getNormalizedWindprofileOptions","getNormalizedParcelsOptions","parcelCollection","addParcel","diagramParcel","getParcelOptions","dp","updateDiagramOptions","updateWindprofileOptions","updateParcelsOptions","diagramParcelCollection","updateOptionsPart","windbarbs","lineKeys","renderTo","_svgNode","boundingRect","getBoundingClientRect","computedStyle","getComputedStyle","parseFloat","getPropertyValue","_plotAreas","plotArea","svgNode","dispatchEvent","target","_hoverLabelsGroup","removeSounding","coordinateSystem","formerCoordinateSystem","diagramSounding","CoordinateSystem","pressure","temperature","_width","_height","temperatureBottomLeft","temperatureBottomRight","inclinationTan","_initPressureOptions","_initTemperatureOptions","oldWidth","oldHeight","inclinationAngle","max","x0","getTByXY","getYByXP","getXByYT","getPByXY","getTByXP","getXByPT","getXByPPotentialTemperatur","getYByXPotentialTemperature","getYByPT","thetaEY","getYByXT","reference","_normalizeTemperatureRange","tan","yReference","xTmin","deltaT","k","PlotArea","_getNormalizedStyle","_svgNodeBackground","_coordinateSystem","_coordinateSystemListenerKey","onCoordinateSystemChange","_initEvents","drawBackground","_drawBackground","overflow","dblclick","mousedown","mouseup","mouseover","mouseout","touchstart","touchmove","touchleave","touchend","touchcancel","eventKey","customEvent","getExtendedEvent","point","pageX","pageXOffset","pageY","pageYOffset","elementX","elementY","getSoundingVisibility","dataGroupIds","getCoordinatesByLevelData","insertDataGroupInto","filterDataPoint","minDataPointsDistance","_getSoundingVisibility","_dataGroupIds","_getCoordinatesByLevelData","_insertDataGroupInto","_filterDataPoint","_minDataPointsDistance","_svgNodeData","_soundings","oldValue","drawSoundings","listenerKeyVisible","onChangeSoundingVisibility","listenerKeyOptions","drawSounding","setDisplayOfSounding","soundingGroup","filterDataPointFunction","_getFilterDataPointFunction","lastLevel","getLevels","getData","dataGroupId","level","lastPoint","hoverLabels","_isHoverLabelsRemote","_initHoverLabels","diagramPres","remote","insertLabelsFunc","hoverLabelsSounding","getNearestLevel","PlotDataArea","unit","isobars","isotherms","dryadiabats","pseudoadiabats","mixingratio","getNormalizedDiagramLineOptions","highlightedLines","dasharray","minPressure","svgGroups","border","_parcelsOptions","_parcels","soundingParcelsItems","parcelsGroup","parcelsGroups","addItemListenerKey","removeItemListenerKey","changeVisibleListeners","changeOptionsListeners","onAddParcel","drawParcel","listenerObj","init","plotIsobars","plotIsotherms","plotDryadiabats","plotPseudoadiabats","plotMixingratio","parcelsObj","drawParcels","pottmpk","lcltmpk","lclthetaek","tempGroup","dewpGroup","yInterval","y0","getXByYPotentialTemperature","y1","getYByPPotentialTemperatur","x1","tempPolyline","isDryAdiabatStraightLine","y2","x2","getXByYEquiPotTemp","x0dwp","getXByYHMR","x1dwp","dewpPolyline","redraw","_plotLines","interval","isIsothermsVertical","TKelvin","points","lines","thetaeKelvin","maxPressure","getYByPEquiPotTemp","getYByPHMR","valuesOptions","pointsFunc","ceil","end","floor","highlightLineWidth","vHighlight","diagramTmpk","snapToData","align","radius","radiusPlus","_makeInsertLabelsFunc","hghtStr","drawPressureHoverLabelInto","labelOptions","lineWidth","fillOptions","PlotAltitudeDataArea","windbarbLength","windbarbData","_windbarbLength","windspeedMax","pixelPerSpeed","grid","origin","_gridOptions","getNormalizedGridOptions","minLength","move","axes","axesLength","circles","labels","xText","angle","yText","textAnchor","plain","before","getNormalizedTextOptions","yAxis","title","_labelsOptions","_titleOptions","getNormalizedTitleOptions","svgLabelsGroup","minLevel","maxLevel","fontSize","xAxis","minT","maxT","windbarbsProfile","windspeedProfile","normalizePlotAreaOptions","defaultPadding","TDDiagram","appendPlotArea","yAxisClass","xAxisClass","WindbarbsProfile","WindspeedProfile","Hodograph","StueveDiagram","Emagram","SkewTlogPDiagram","exchangeCoordinateSystem","ThermodynamicDiagramPluggable","Simple","imgNode","ThermodynamicDiagram","makeTimeTextCallbackFunction","moment","m","utc","local","tz","ToggleButton","startedContent","startedClass","stoppedContent","stoppedClass","classDropdownToggle","menu","menuImageFrequency","imageFrequencyCaption","menuFrequencies","menuRestartPause","restartPauseCaption","biPauseFill","biPlayFill","animationButton","is","onStart","String","onStop","toggle","btnDropdown","menuDropdown","form","label","div","insertFrequencyButtonGroup","btnGroupClass","btnClass","freq","insertRestartPauseRange","pauses","insertRestartPauseButtonGroup","pause","visualisation","Slider","bsButtons","bsDropdown","synview","SynviewCollection","MapOL","MapLL","GeoJSONTile","BootstrapTooltip","ModelviewerResource","ModelviewerImage","Sounding","ModelviewerSounding","NWPResources","SelectNavigation","ignoreVariableCollections","selectCaption","navigationClass","selectDivClass","selectClass","navigationNode","selectNodes","count","_appendSelectNode","_changeSelected","_appendOptionNode","selectNode","captionOption","option","optionsClass","functions"],"mappings":";mYAOA,IAAIA,EAAW,SAAUC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BAAkBC,EAAYnoB,MAErC5rB,KAAKyzC,eAAej/B,OAAOJ,IAAE,SAASC,SAASrU,KAAKyS,QAAQ8gC,gBAAgB/+B,OAAOu/B,IACnF/zC,KAAK0zC,YAAYvvB,IAAI8G,EAAoB8oB,KAzE7C,+BA4EE,SAAkBA,EAAYnoB,GAC5B,IAAIqoB,EACF7/B,IAAE,YACCE,KAAK,QAASsX,EAAStmB,IACvBmP,KAAKmX,EAAS7oB,MACdsR,SAASrU,KAAKyS,QAAQyhC,cAC3BH,EAAWv/B,OAAOy/B,KAlFtB,6BAqFE,WAAkB,Q,65BAAA,CACej0C,KAAK0zC,YAAYlwC,QADhC,IAChB,2BAAwD,KAA/CynB,EAA+C,QACtD,GAAKjrB,KAAK0zC,YAAY7uB,IAAIoG,GAA1B,CAEA,IAAIW,EAAW5rB,KAAK0pB,UAAU8M,gBAAgB1K,gCAAgCb,GAC9EjrB,KAAK0zC,YAAY1tC,IAAIilB,GAAoBtW,IAAIiX,EAAStmB,MALxC,oC,kBArFpB,GHoFA,MC4EaitB,GAAW,CACtBvB,WAiBW8E,GAAuB,CAClCkL,oBACAH,iBAAkB,CAChBwO,iBACAC,WACAC,qBAEF9Q,mBACA2Q,aACAN,aACAqF,UAAW,CACT3X,qBAEF0S,oBACAC,oBACAhC,KAAM,CACJoB,SACAT,Y","file":"meteoJS.min.js","sourcesContent":["/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n  \"use strict\";\n\n  var Op = Object.prototype;\n  var hasOwn = Op.hasOwnProperty;\n  var undefined; // More compressible than void 0.\n  var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n  var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n  var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n  var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n  function define(obj, key, value) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n    return obj[key];\n  }\n  try {\n    // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n    define({}, \"\");\n  } catch (err) {\n    define = function(obj, key, value) {\n      return obj[key] = value;\n    };\n  }\n\n  function wrap(innerFn, outerFn, self, tryLocsList) {\n    // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n    var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n    var generator = Object.create(protoGenerator.prototype);\n    var context = new Context(tryLocsList || []);\n\n    // The ._invoke method unifies the implementations of the .next,\n    // .throw, and .return methods.\n    generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n    return generator;\n  }\n  exports.wrap = wrap;\n\n  // Try/catch helper to minimize deoptimizations. Returns a completion\n  // record like context.tryEntries[i].completion. This interface could\n  // have been (and was previously) designed to take a closure to be\n  // invoked without arguments, but in all the cases we care about we\n  // already have an existing method we want to call, so there's no need\n  // to create a new function object. We can even get away with assuming\n  // the method takes exactly one argument, since that happens to be true\n  // in every case, so we don't have to touch the arguments object. The\n  // only additional allocation required is the completion record, which\n  // has a stable shape and so hopefully should be cheap to allocate.\n  function tryCatch(fn, obj, arg) {\n    try {\n      return { type: \"normal\", arg: fn.call(obj, arg) };\n    } catch (err) {\n      return { type: \"throw\", arg: err };\n    }\n  }\n\n  var GenStateSuspendedStart = \"suspendedStart\";\n  var GenStateSuspendedYield = \"suspendedYield\";\n  var GenStateExecuting = \"executing\";\n  var GenStateCompleted = \"completed\";\n\n  // Returning this object from the innerFn has the same effect as\n  // breaking out of the dispatch switch statement.\n  var ContinueSentinel = {};\n\n  // Dummy constructor functions that we use as the .constructor and\n  // .constructor.prototype properties for functions that return Generator\n  // objects. For full spec compliance, you may wish to configure your\n  // minifier not to mangle the names of these two functions.\n  function Generator() {}\n  function GeneratorFunction() {}\n  function GeneratorFunctionPrototype() {}\n\n  // This is a polyfill for %IteratorPrototype% for environments that\n  // don't natively support it.\n  var IteratorPrototype = {};\n  IteratorPrototype[iteratorSymbol] = function () {\n    return this;\n  };\n\n  var getProto = Object.getPrototypeOf;\n  var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n  if (NativeIteratorPrototype &&\n      NativeIteratorPrototype !== Op &&\n      hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n    // This environment has a native %IteratorPrototype%; use it instead\n    // of the polyfill.\n    IteratorPrototype = NativeIteratorPrototype;\n  }\n\n  var Gp = GeneratorFunctionPrototype.prototype =\n    Generator.prototype = Object.create(IteratorPrototype);\n  GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n  GeneratorFunctionPrototype.constructor = GeneratorFunction;\n  GeneratorFunction.displayName = define(\n    GeneratorFunctionPrototype,\n    toStringTagSymbol,\n    \"GeneratorFunction\"\n  );\n\n  // Helper for defining the .next, .throw, and .return methods of the\n  // Iterator interface in terms of a single ._invoke method.\n  function defineIteratorMethods(prototype) {\n    [\"next\", \"throw\", \"return\"].forEach(function(method) {\n      define(prototype, method, function(arg) {\n        return this._invoke(method, arg);\n      });\n    });\n  }\n\n  exports.isGeneratorFunction = function(genFun) {\n    var ctor = typeof genFun === \"function\" && genFun.constructor;\n    return ctor\n      ? ctor === GeneratorFunction ||\n        // For the native GeneratorFunction constructor, the best we can\n        // do is to check its .name property.\n        (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n      : false;\n  };\n\n  exports.mark = function(genFun) {\n    if (Object.setPrototypeOf) {\n      Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n    } else {\n      genFun.__proto__ = GeneratorFunctionPrototype;\n      define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n    }\n    genFun.prototype = Object.create(Gp);\n    return genFun;\n  };\n\n  // Within the body of any async function, `await x` is transformed to\n  // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n  // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n  // meant to be awaited.\n  exports.awrap = function(arg) {\n    return { __await: arg };\n  };\n\n  function AsyncIterator(generator, PromiseImpl) {\n    function invoke(method, arg, resolve, reject) {\n      var record = tryCatch(generator[method], generator, arg);\n      if (record.type === \"throw\") {\n        reject(record.arg);\n      } else {\n        var result = record.arg;\n        var value = result.value;\n        if (value &&\n            typeof value === \"object\" &&\n            hasOwn.call(value, \"__await\")) {\n          return PromiseImpl.resolve(value.__await).then(function(value) {\n            invoke(\"next\", value, resolve, reject);\n          }, function(err) {\n            invoke(\"throw\", err, resolve, reject);\n          });\n        }\n\n        return PromiseImpl.resolve(value).then(function(unwrapped) {\n          // When a yielded Promise is resolved, its final value becomes\n          // the .value of the Promise<{value,done}> result for the\n          // current iteration.\n          result.value = unwrapped;\n          resolve(result);\n        }, function(error) {\n          // If a rejected Promise was yielded, throw the rejection back\n          // into the async generator function so it can be handled there.\n          return invoke(\"throw\", error, resolve, reject);\n        });\n      }\n    }\n\n    var previousPromise;\n\n    function enqueue(method, arg) {\n      function callInvokeWithMethodAndArg() {\n        return new PromiseImpl(function(resolve, reject) {\n          invoke(method, arg, resolve, reject);\n        });\n      }\n\n      return previousPromise =\n        // If enqueue has been called before, then we want to wait until\n        // all previous Promises have been resolved before calling invoke,\n        // so that results are always delivered in the correct order. If\n        // enqueue has not been called before, then it is important to\n        // call invoke immediately, without waiting on a callback to fire,\n        // so that the async generator function has the opportunity to do\n        // any necessary setup in a predictable way. This predictability\n        // is why the Promise constructor synchronously invokes its\n        // executor callback, and why async functions synchronously\n        // execute code before the first await. Since we implement simple\n        // async functions in terms of async generators, it is especially\n        // important to get this right, even though it requires care.\n        previousPromise ? previousPromise.then(\n          callInvokeWithMethodAndArg,\n          // Avoid propagating failures to Promises returned by later\n          // invocations of the iterator.\n          callInvokeWithMethodAndArg\n        ) : callInvokeWithMethodAndArg();\n    }\n\n    // Define the unified helper method that is used to implement .next,\n    // .throw, and .return (see defineIteratorMethods).\n    this._invoke = enqueue;\n  }\n\n  defineIteratorMethods(AsyncIterator.prototype);\n  AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n    return this;\n  };\n  exports.AsyncIterator = AsyncIterator;\n\n  // Note that simple async functions are implemented on top of\n  // AsyncIterator objects; they just return a Promise for the value of\n  // the final result produced by the iterator.\n  exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n    if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n    var iter = new AsyncIterator(\n      wrap(innerFn, outerFn, self, tryLocsList),\n      PromiseImpl\n    );\n\n    return exports.isGeneratorFunction(outerFn)\n      ? iter // If outerFn is a generator, return the full iterator.\n      : iter.next().then(function(result) {\n          return result.done ? result.value : iter.next();\n        });\n  };\n\n  function makeInvokeMethod(innerFn, self, context) {\n    var state = GenStateSuspendedStart;\n\n    return function invoke(method, arg) {\n      if (state === GenStateExecuting) {\n        throw new Error(\"Generator is already running\");\n      }\n\n      if (state === GenStateCompleted) {\n        if (method === \"throw\") {\n          throw arg;\n        }\n\n        // Be forgiving, per 25.3.3.3.3 of the spec:\n        // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n        return doneResult();\n      }\n\n      context.method = method;\n      context.arg = arg;\n\n      while (true) {\n        var delegate = context.delegate;\n        if (delegate) {\n          var delegateResult = maybeInvokeDelegate(delegate, context);\n          if (delegateResult) {\n            if (delegateResult === ContinueSentinel) continue;\n            return delegateResult;\n          }\n        }\n\n        if (context.method === \"next\") {\n          // Setting context._sent for legacy support of Babel's\n          // function.sent implementation.\n          context.sent = context._sent = context.arg;\n\n        } else if (context.method === \"throw\") {\n          if (state === GenStateSuspendedStart) {\n            state = GenStateCompleted;\n            throw context.arg;\n          }\n\n          context.dispatchException(context.arg);\n\n        } else if (context.method === \"return\") {\n          context.abrupt(\"return\", context.arg);\n        }\n\n        state = GenStateExecuting;\n\n        var record = tryCatch(innerFn, self, context);\n        if (record.type === \"normal\") {\n          // If an exception is thrown from innerFn, we leave state ===\n          // GenStateExecuting and loop back for another invocation.\n          state = context.done\n            ? GenStateCompleted\n            : GenStateSuspendedYield;\n\n          if (record.arg === ContinueSentinel) {\n            continue;\n          }\n\n          return {\n            value: record.arg,\n            done: context.done\n          };\n\n        } else if (record.type === \"throw\") {\n          state = GenStateCompleted;\n          // Dispatch the exception by looping back around to the\n          // context.dispatchException(context.arg) call above.\n          context.method = \"throw\";\n          context.arg = record.arg;\n        }\n      }\n    };\n  }\n\n  // Call delegate.iterator[context.method](context.arg) and handle the\n  // result, either by returning a { value, done } result from the\n  // delegate iterator, or by modifying context.method and context.arg,\n  // setting context.delegate to null, and returning the ContinueSentinel.\n  function maybeInvokeDelegate(delegate, context) {\n    var method = delegate.iterator[context.method];\n    if (method === undefined) {\n      // A .throw or .return when the delegate iterator has no .throw\n      // method always terminates the yield* loop.\n      context.delegate = null;\n\n      if (context.method === \"throw\") {\n        // Note: [\"return\"] must be used for ES3 parsing compatibility.\n        if (delegate.iterator[\"return\"]) {\n          // If the delegate iterator has a return method, give it a\n          // chance to clean up.\n          context.method = \"return\";\n          context.arg = undefined;\n          maybeInvokeDelegate(delegate, context);\n\n          if (context.method === \"throw\") {\n            // If maybeInvokeDelegate(context) changed context.method from\n            // \"return\" to \"throw\", let that override the TypeError below.\n            return ContinueSentinel;\n          }\n        }\n\n        context.method = \"throw\";\n        context.arg = new TypeError(\n          \"The iterator does not provide a 'throw' method\");\n      }\n\n      return ContinueSentinel;\n    }\n\n    var record = tryCatch(method, delegate.iterator, context.arg);\n\n    if (record.type === \"throw\") {\n      context.method = \"throw\";\n      context.arg = record.arg;\n      context.delegate = null;\n      return ContinueSentinel;\n    }\n\n    var info = record.arg;\n\n    if (! info) {\n      context.method = \"throw\";\n      context.arg = new TypeError(\"iterator result is not an object\");\n      context.delegate = null;\n      return ContinueSentinel;\n    }\n\n    if (info.done) {\n      // Assign the result of the finished delegate to the temporary\n      // variable specified by delegate.resultName (see delegateYield).\n      context[delegate.resultName] = info.value;\n\n      // Resume execution at the desired location (see delegateYield).\n      context.next = delegate.nextLoc;\n\n      // If context.method was \"throw\" but the delegate handled the\n      // exception, let the outer generator proceed normally. If\n      // context.method was \"next\", forget context.arg since it has been\n      // \"consumed\" by the delegate iterator. If context.method was\n      // \"return\", allow the original .return call to continue in the\n      // outer generator.\n      if (context.method !== \"return\") {\n        context.method = \"next\";\n        context.arg = undefined;\n      }\n\n    } else {\n      // Re-yield the result returned by the delegate method.\n      return info;\n    }\n\n    // The delegate iterator is finished, so forget it and continue with\n    // the outer generator.\n    context.delegate = null;\n    return ContinueSentinel;\n  }\n\n  // Define Generator.prototype.{next,throw,return} in terms of the\n  // unified ._invoke helper method.\n  defineIteratorMethods(Gp);\n\n  define(Gp, toStringTagSymbol, \"Generator\");\n\n  // A Generator should always return itself as the iterator object when the\n  // @@iterator function is called on it. Some browsers' implementations of the\n  // iterator prototype chain incorrectly implement this, causing the Generator\n  // object to not be returned from this call. This ensures that doesn't happen.\n  // See https://github.com/facebook/regenerator/issues/274 for more details.\n  Gp[iteratorSymbol] = function() {\n    return this;\n  };\n\n  Gp.toString = function() {\n    return \"[object Generator]\";\n  };\n\n  function pushTryEntry(locs) {\n    var entry = { tryLoc: locs[0] };\n\n    if (1 in locs) {\n      entry.catchLoc = locs[1];\n    }\n\n    if (2 in locs) {\n      entry.finallyLoc = locs[2];\n      entry.afterLoc = locs[3];\n    }\n\n    this.tryEntries.push(entry);\n  }\n\n  function resetTryEntry(entry) {\n    var record = entry.completion || {};\n    record.type = \"normal\";\n    delete record.arg;\n    entry.completion = record;\n  }\n\n  function Context(tryLocsList) {\n    // The root entry object (effectively a try statement without a catch\n    // or a finally block) gives us a place to store values thrown from\n    // locations where there is no enclosing try statement.\n    this.tryEntries = [{ tryLoc: \"root\" }];\n    tryLocsList.forEach(pushTryEntry, this);\n    this.reset(true);\n  }\n\n  exports.keys = function(object) {\n    var keys = [];\n    for (var key in object) {\n      keys.push(key);\n    }\n    keys.reverse();\n\n    // Rather than returning an object with a next method, we keep\n    // things simple and return the next function itself.\n    return function next() {\n      while (keys.length) {\n        var key = keys.pop();\n        if (key in object) {\n          next.value = key;\n          next.done = false;\n          return next;\n        }\n      }\n\n      // To avoid creating an additional object, we just hang the .value\n      // and .done properties off the next function object itself. This\n      // also ensures that the minifier will not anonymize the function.\n      next.done = true;\n      return next;\n    };\n  };\n\n  function values(iterable) {\n    if (iterable) {\n      var iteratorMethod = iterable[iteratorSymbol];\n      if (iteratorMethod) {\n        return iteratorMethod.call(iterable);\n      }\n\n      if (typeof iterable.next === \"function\") {\n        return iterable;\n      }\n\n      if (!isNaN(iterable.length)) {\n        var i = -1, next = function next() {\n          while (++i < iterable.length) {\n            if (hasOwn.call(iterable, i)) {\n              next.value = iterable[i];\n              next.done = false;\n              return next;\n            }\n          }\n\n          next.value = undefined;\n          next.done = true;\n\n          return next;\n        };\n\n        return next.next = next;\n      }\n    }\n\n    // Return an iterator with no values.\n    return { next: doneResult };\n  }\n  exports.values = values;\n\n  function doneResult() {\n    return { value: undefined, done: true };\n  }\n\n  Context.prototype = {\n    constructor: Context,\n\n    reset: function(skipTempReset) {\n      this.prev = 0;\n      this.next = 0;\n      // Resetting context._sent for legacy support of Babel's\n      // function.sent implementation.\n      this.sent = this._sent = undefined;\n      this.done = false;\n      this.delegate = null;\n\n      this.method = \"next\";\n      this.arg = undefined;\n\n      this.tryEntries.forEach(resetTryEntry);\n\n      if (!skipTempReset) {\n        for (var name in this) {\n          // Not sure about the optimal order of these conditions:\n          if (name.charAt(0) === \"t\" &&\n              hasOwn.call(this, name) &&\n              !isNaN(+name.slice(1))) {\n            this[name] = undefined;\n          }\n        }\n      }\n    },\n\n    stop: function() {\n      this.done = true;\n\n      var rootEntry = this.tryEntries[0];\n      var rootRecord = rootEntry.completion;\n      if (rootRecord.type === \"throw\") {\n        throw rootRecord.arg;\n      }\n\n      return this.rval;\n    },\n\n    dispatchException: function(exception) {\n      if (this.done) {\n        throw exception;\n      }\n\n      var context = this;\n      function handle(loc, caught) {\n        record.type = \"throw\";\n        record.arg = exception;\n        context.next = loc;\n\n        if (caught) {\n          // If the dispatched exception was caught by a catch block,\n          // then let that catch block handle the exception normally.\n          context.method = \"next\";\n          context.arg = undefined;\n        }\n\n        return !! caught;\n      }\n\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        var record = entry.completion;\n\n        if (entry.tryLoc === \"root\") {\n          // Exception thrown outside of any try block that could handle\n          // it, so set the completion value of the entire function to\n          // throw the exception.\n          return handle(\"end\");\n        }\n\n        if (entry.tryLoc <= this.prev) {\n          var hasCatch = hasOwn.call(entry, \"catchLoc\");\n          var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n          if (hasCatch && hasFinally) {\n            if (this.prev < entry.catchLoc) {\n              return handle(entry.catchLoc, true);\n            } else if (this.prev < entry.finallyLoc) {\n              return handle(entry.finallyLoc);\n            }\n\n          } else if (hasCatch) {\n            if (this.prev < entry.catchLoc) {\n              return handle(entry.catchLoc, true);\n            }\n\n          } else if (hasFinally) {\n            if (this.prev < entry.finallyLoc) {\n              return handle(entry.finallyLoc);\n            }\n\n          } else {\n            throw new Error(\"try statement without catch or finally\");\n          }\n        }\n      }\n    },\n\n    abrupt: function(type, arg) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.tryLoc <= this.prev &&\n            hasOwn.call(entry, \"finallyLoc\") &&\n            this.prev < entry.finallyLoc) {\n          var finallyEntry = entry;\n          break;\n        }\n      }\n\n      if (finallyEntry &&\n          (type === \"break\" ||\n           type === \"continue\") &&\n          finallyEntry.tryLoc <= arg &&\n          arg <= finallyEntry.finallyLoc) {\n        // Ignore the finally entry if control is not jumping to a\n        // location outside the try/catch block.\n        finallyEntry = null;\n      }\n\n      var record = finallyEntry ? finallyEntry.completion : {};\n      record.type = type;\n      record.arg = arg;\n\n      if (finallyEntry) {\n        this.method = \"next\";\n        this.next = finallyEntry.finallyLoc;\n        return ContinueSentinel;\n      }\n\n      return this.complete(record);\n    },\n\n    complete: function(record, afterLoc) {\n      if (record.type === \"throw\") {\n        throw record.arg;\n      }\n\n      if (record.type === \"break\" ||\n          record.type === \"continue\") {\n        this.next = record.arg;\n      } else if (record.type === \"return\") {\n        this.rval = this.arg = record.arg;\n        this.method = \"return\";\n        this.next = \"end\";\n      } else if (record.type === \"normal\" && afterLoc) {\n        this.next = afterLoc;\n      }\n\n      return ContinueSentinel;\n    },\n\n    finish: function(finallyLoc) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.finallyLoc === finallyLoc) {\n          this.complete(entry.completion, entry.afterLoc);\n          resetTryEntry(entry);\n          return ContinueSentinel;\n        }\n      }\n    },\n\n    \"catch\": function(tryLoc) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.tryLoc === tryLoc) {\n          var record = entry.completion;\n          if (record.type === \"throw\") {\n            var thrown = record.arg;\n            resetTryEntry(entry);\n          }\n          return thrown;\n        }\n      }\n\n      // The context.catch method must only be called with a location\n      // argument that corresponds to a known catch block.\n      throw new Error(\"illegal catch attempt\");\n    },\n\n    delegateYield: function(iterable, resultName, nextLoc) {\n      this.delegate = {\n        iterator: values(iterable),\n        resultName: resultName,\n        nextLoc: nextLoc\n      };\n\n      if (this.method === \"next\") {\n        // Deliberately forget the last sent value so that we don't\n        // accidentally pass it on to the delegate.\n        this.arg = undefined;\n      }\n\n      return ContinueSentinel;\n    }\n  };\n\n  // Regardless of whether this script is executing as a CommonJS module\n  // or not, return the runtime object so that we can declare the variable\n  // regeneratorRuntime in the outer scope, which allows this module to be\n  // injected easily by `bin/regenerator --include-runtime script.js`.\n  return exports;\n\n}(\n  // If this script is executing as a CommonJS module, use module.exports\n  // as the regeneratorRuntime namespace. Otherwise create a new empty\n  // object. Either way, the resulting object will be used to initialize\n  // the regeneratorRuntime variable at the top of this file.\n  typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n  regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n  // This module should not be running in strict mode, so the above\n  // assignment should always work unless something is misconfigured. Just\n  // in case runtime.js accidentally runs in strict mode, we can escape\n  // strict mode using a global Function call. This could conceivably fail\n  // if a Content Security Policy forbids using Function, but in that case\n  // the proper solution is to fix the accidental strict mode problem. If\n  // you've misconfigured your bundler to force strict mode and applied a\n  // CSP to forbid Function, and you're not willing to fix either of those\n  // problems, please detail your unique predicament in a GitHub issue.\n  Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","/**\n * @module meteoJS/calc\n */\n\n/**\n * Umrechnung eines Luftdrucks zur entsprechenden Höhe in der\n * Internationalen Standard-Atmosphäre (ISA).\n * \n * Formel ist gültig bis 11 km Höhe\n * (https://de.wikipedia.org/wiki/Barometrische_H%C3%B6henformel#Internationale_H.C3.B6henformel)\n * \n * @static\n * @public\n * @param {number|undefined} p Luftdruck [hPa]\n * @return {number|undefined} Höhe in der Standard-Atmosphäre [m ü.M.]\n */\nexport function altitudeISAByPres(p) {\n  if (p === undefined ||\n      isNaN(p))\n    return undefined;\n  return 44330.769*(1 - Math.pow(p/1013.25, 0.19029496));\n}\n\n/**\n * Umrechnung einer Höhe in einen Luftdruck in der\n * Internationalen Standard-Atmosphäre (ISA).\n * \n * Formel ist gültig bis 11 km Höhe\n * (https://de.wikipedia.org/wiki/Barometrische_H%C3%B6henformel#Internationale_H.C3.B6henformel)\n * \n * @static\n * @public\n * @param {number|undefined} a Höhe [m ü.M.]\n * @return {number|undefined} Luftdruck in der Standard-Atmosphäre [hPa]\n */\nexport function pressureISAByAltitude(a) {\n  if (a === undefined ||\n      isNaN(a))\n    return undefined;\n  return 1013.25*Math.pow(1-a/44330.769, 5.255);\n}\n\n/**\n * Berechnung der potentielle Temperatur θ aus der Temperatur und des Drucks\n * eines Luftpakets.\n * \n * Berechnung zum Normaldruck von 1000 hPa\n * (https://de.wikipedia.org/wiki/Potentielle_Temperatur#Trockenpotentielle_Temperatur)\n * \n * @param {number|undefined} temp Temperatur [K]\n * @param {number|undefined} pres Luftdruck [hPa]\n * @return {number|undefined} Potentielle Temperatur [K]\n */\nexport function potentialTempByTempAndPres(temp, pres) {\n  if (temp === undefined || isNaN(temp) ||\n      pres === undefined || isNaN(pres))\n    return undefined;\n  return temp * Math.pow(1000/pres, 0.286);\n}\n\n/**\n * Berechnung der Lufttemperatur bei einem Luftdruck für ein Luftpaket mit\n * entsprechender potentiellen Temperatur.\n * \n * Berechnung zum Normaldurck von 1000 hPa\n * \n * @param {number|undefined} potentialTemp Potentielle Temperatur [K]\n * @param {number|undefined} pres Luftdruck [hPa]\n * @return {number|undefined} Temperatur [K]\n */\nexport function tempByPotentialTempAndPres(potentialTemp, pres) {\n  if (potentialTemp === undefined || isNaN(potentialTemp) ||\n      pres === undefined || isNaN(pres))\n    return undefined;\n  return potentialTemp*Math.pow(pres/1000, 0.286);\n}\n\n/**\n * Temperatur eines Luftpaktes mit Druck 'pres' und der Äquivalent potentiellen Temperatur 'thetae'.\n * \n * @param {number|undefined} thetae Äquivalent potentielle Temperatur [K]\n * @param {number|undefined} pres Luftdruck [hPa]\n * @return {number|undefined} Temperatur [K]\n */\nexport function tempByEquiPotTempAndPres(thetae, pres) {\n  if (pres === undefined || isNaN(pres))\n    return undefined;\n  var s = undefined;\n  var th = undefined;\n  var pcon = Math.pow(1000/pres, .286);\n  var t = 273.0;\n  var delta = 20;\n  var i = 0;\n  while (Math.abs(delta) > 0.1 && i < 100) {\n    i++;\n    s = saturationHMRByTempAndPres(t, pres);\n    th = t * pcon * Math.exp(2.5*s/t);\n    if ((th-thetae)*delta > 0.0)\n      delta = -.5 * delta;\n    t = t + delta;\n  }\n  return t;\n}\n\n/**\n * Taupunkt eines Luftpaktes über Mischungsverhältnis und Druck.\n * \n * @param {number|undefined} hmr Mischungsverhätlnis [g/kg]\n * @param {number|undefined} pres Luftdruck [hPa]\n * @return {number|undefined} Taupunkttemperatur [K]\n */\nexport function dewpointByHMRAndPres(hmr, pres) {\n  if (hmr === undefined || isNaN(hmr) ||\n      pres === undefined || isNaN(pres))\n    return undefined;\n  var x = 0.4343 * Math.log(hmr * pres /(622. + hmr));\n  return Math.pow(10,.0498646455 * x + 2.4082965 ) -\n         7.07475 +\n         38.9114 * Math.pow((Math.pow(10, .0915 * x) - 1.2035),2);\n}\n\n/**\n * Wetbulb-Temperature, Psychro-Temperature aus Temperatur, Taupunkt und Luftdruck\n * \n * @param {number|undefined} temp Temperatur [K]\n * @param {number|undefined} dewpoint Taupunkttemperatur [K]\n * @param {number|undefined} pres Luftdruck [hPa]\n * @return {number|undefined} Wetbulb-Temperatur [K]\n */\nexport function wetbulbTempByTempAndDewpointAndPres(temp, dewpoint, pres) {\n  if (temp === undefined || isNaN(temp) ||\n      dewpoint === undefined || isNaN(dewpoint) ||\n      pres === undefined || isNaN(pres))\n    return undefined;\n  var result = dewpoint-273.15;\n  var Ediff = 1;\n  var incr = 10;\n  var previoussign = 1;\n  var E = 6.112 * Math.exp((17.67 * result) / (result + 243.5));\n  while (Math.abs(Ediff) > 0.05) {\n    var Eguess = 6.112 * Math.exp((17.67 * result) / (result + 243.5)) -\n                 pres * (temp-273.15 - result) * 0.00066 * (1 + (0.00115 * result));\n    Ediff = E - Eguess;\n    if (Ediff == 0)\n      break;\n    else {\n      if (Ediff < 0) {\n        if (-1 != previoussign) {\n          previoussign = -1;\n          incr = incr/10;\n        }\n      }\n      else {\n        if (1 != previoussign) {\n          previoussign = 1;\n          incr = incr/10;\n        }\n      }\n    }\n    if (Math.abs(Ediff) <= 0.05)\n      break;\n    else\n      result = result + incr*previoussign;\n  }\n  return result+273.15;\n}\n\n/**\n * Äquivalent Potentielle Temperatur eines Luftpaktes.\n * \n * Gemäss Formel von Holten (https://en.wikipedia.org/wiki/Equivalent_potential_temperature#Formula)\n * \n * @param {number|undefined} temp Temperatur [K]\n * @param {number|undefined} dewpoint Taupunkts-Temperatur [K]\n * @param {number|undefined} pres Luftdruck [hPa]\n * @return {number|undefined} Äquivalent potentielle Temperatur [K]\n */\nexport function equiPotentialTempByTempAndDewpointAndPres(temp, dewpoint, pres) {\n  var potTemp = potentialTempByTempAndPres(temp, pres);\n  if (potTemp === undefined ||\n      dewpoint === undefined || isNaN(dewpoint) ||\n      temp === undefined || isNaN(temp) ||\n      pres === undefined || isNaN(pres))\n    return undefined;\n  return potTemp *\n    Math.exp(2481.9e-3 *\n             saturationHMRByTempAndPres(dewpoint, pres) /\n             lclTemperatureByTempAndDewpoint(temp, dewpoint));\n}\n\n/**\n * Berechnung des Sättigung-Dampfdrucks zu einer Temperatur\n * \n * @param {number|undefined} temp Temperatur [K]\n * @return {number|undefined} Sättigungs-Dampfdruck [hPa]\n */\nexport function saturationPressureByTemp(temp) {\n  if (temp === undefined || isNaN(temp))\n    return undefined;\n  var coef= new Array(6.1104546, 0.4442351, 1.4302099e-2, 2.6454708e-4, 3.0357098e-6, 2.0972268e-8, 6.0487594e-11,-1.469687e-13);\n  var inx=0;\n  // sat vap pressures every 5C from -50 to -200\n  var escold= new Array(\n    0.648554685769663908E-01, 0.378319512256073479E-01,\n    0.222444934288790197E-01, 0.131828928424683120E-01,\n    0.787402077141244848E-02, 0.473973049488473318E-02,\n    0.287512035504357928E-02, 0.175743037675810294E-02,\n    0.108241739518850975E-02, 0.671708939185605941E-03,\n    0.419964702632039404E-03, 0.264524363863469876E-03,\n    0.167847963736813220E-03, 0.107285397631620379E-03,\n    0.690742634496135612E-04, 0.447940489768084267E-04,\n    0.292570419563937303E-04, 0.192452912634994161E-04,\n    0.127491372410747951E-04, 0.850507010275505138E-05,\n    0.571340025334971129E-05, 0.386465029673876238E-05,\n    0.263210971965005286E-05, 0.180491072930570428E-05,\n    0.124607850555816049E-05, 0.866070571346870824E-06,\n    0.605982217668895538E-06, 0.426821197943242768E-06,\n    0.302616508514379476E-06, 0.215963854234913987E-06,\n    0.155128954578336869E-06);\n\n  temp = temp - 273.15;\n  var retval = 0;\n  //try {\n  if (temp > -50.) {\n    retval = ( coef[0] + temp*(coef[1] + temp*(coef[2] + temp*(coef[3] +\n    temp*(coef[4] + temp*(coef[5] + temp*(coef[6] + temp*coef[7])))))));\n\n  } else {\n    var tt = (-temp - 50.)/5.;\n    //var = (int) tt;\n    if (inx < escold.length-1) {\n      retval = escold[inx] + (tt % 1.)*(escold[inx+1]-escold[inx]);\n    } else {\n      retval = 1e-7;\n    }\n  }\n  // } catch (Exception e) {\n  //   GWT.log(\"caught exception: \"+e);\n  //  retval = 1e-7;\n  //}\n  return retval;\n}\n\n/**\n * Berechnung des Sättigungs-Mischungsverhältnisses aus Temperatur und Druck\n * \n * HMR = humidity mixing ratio\n * \n * @param {number|undefined} temp Temperatur [K]\n * @param {number|undefined} pres Luftdruck [hPa]\n * @return {number|undefined} Sättigungs-Mischungsverhältnis [g/kg]\n */\nexport function saturationHMRByTempAndPres(temp, pres) {\n  var e = saturationPressureByTemp(temp);\n  if (e === undefined ||\n      pres === undefined || isNaN(pres))\n    return undefined;\n  return 621.97*e/(pres - e);\n}\n\n/**\n * Lifting Condensation Level (LCL) eines Luftpakets mit entsprechender\n * potentieller Temperatur und Mischungsverhältnis.\n * \n * @param {number|undefined} potentialTemp Potentielle Temperatur [K]\n * @param {number|undefined} hmr Mischungsverhältnis [g/kg]\n * @return {undefined|number} LCL [hPa]\n */\nexport function lclByPotentialTempAndHMR(potentialTemp, hmr) {\n  if (hmr === undefined || isNaN(hmr))\n    return undefined;\n  // Binäre Suche\n  var a = 1013;\n  var b = 100;\n  while (a-b > 10) {\n    var p = b+(a-b)/2;\n    var hmrp = saturationHMRByTempAndPres(\n      tempByPotentialTempAndPres(potentialTemp, p),\n      p);\n    if (hmrp === undefined)\n      return undefined;\n    if (hmrp < hmr)\n      b = p;\n    else\n      a = p;\n  }\n  return b+(a-b)/2;\n}\n\n/**\n * Potentielle Temperatur zu einem Lifting Condensation Level (LCL) bei\n * gegebenem Mischungsverhältnis.\n * \n * @param {number|undefined} lcl LCL [hPa]\n * @param {number|undefined} hmr Mischungsverhältnis [g/kg]\n * @return {number|undefined} Potentielle Temperatur [K]\n */\nexport function potentialTempByLCLAndHMR(lcl, hmr) {\n  if (lcl === undefined || isNaN(lcl))\n    return undefined;\n  // Binäre Suche\n  var a = 323;\n  var b = 223;\n  while (a-b > 0.1) {\n    var Th = b+(a-b)/2;\n    var lclTh = lclByPotentialTempAndHMR(Th, hmr);\n    if (lclTh === undefined)\n      return undefined;\n    if (lclTh > lcl)\n      b = Th;\n    else\n      a = Th;\n  }\n  return b+(a-b)/2;\n}\n\n/**\n * Temperatur eines Luftpaktes, welches zum LCL angehoben wird.\n * \n * @param {number|undefined} temp Lufttemperatur [K]\n * @param {number|undefined} dewpoint Taupunktstemperatur [K]\n * @return {undefined|number} Temperatur [K]\n */\nexport function lclTemperatureByTempAndDewpoint(temp, dewpoint) {\n  if (temp === undefined || isNaN(temp) ||\n      dewpoint === undefined || isNaN(dewpoint))\n    return undefined;\n  return (dewpoint - (.001296*dewpoint - .15772)*(temp-dewpoint) );\n}\n\n/**\n * Umwandlung Temperatur von Celsius in Kelvin\n * \n * @param {number|undefined} temp [°C]\n * @return {undefined|number} [K]\n */\nexport function tempCelsiusToKelvin(temp) {\n  return (temp === undefined || isNaN(temp)) ? undefined : temp+273.15;\n}\n\n/**\n * Umwandlung Temperatur von Kelvin zu Celsius\n * \n * @param {number|undefined} temp [K]\n * @return {undefined|number} [°C]\n */\nexport function tempKelvinToCelsius(temp) {\n  return (temp === undefined || isNaN(temp)) ? undefined : temp-273.15;\n}\n\n/**\n * Umwandlung Windgeschwindigkeit von m/s in km/h\n * \n * @param {number|undefined} wind [m/s]\n * @return {undefined|number} [km/h]\n */\nexport function windspeedMSToKMH(wind) {\n  return (wind === undefined || isNaN(wind)) ? undefined : wind*3.6;\n}\n\n/**\n * Umwandlung Windgeschwindigkeit von km/h in m/s\n * \n * @param {number|undefined} wind [km/h]\n * @return {undefined|number} [m/s]\n */\nexport function windspeedKMHToMS(wind) {\n  return (wind === undefined || isNaN(wind)) ? undefined : wind/3.6;\n}\n\n/**\n * Umwandlung Windgeschwindigkeit von m/s in Knoten\n * \n * @param {number|undefined} wind [m/s]\n * @return {undefined|number} [kn]\n */\nexport function windspeedMSToKN(wind) {\n  return (wind === undefined || isNaN(wind)) ? undefined : wind*900/463;\n}\n\n/**\n * Umwandlung Windgeschwindigkeit von Knoten in m/s\n * \n * @param {number|undefined} wind [kn]\n * @return {undefined|number} [m/s]\n */\nexport function windspeedKNToMS(wind) {\n  return (wind === undefined || isNaN(wind)) ? undefined : wind*463/900;\n}\n\n/**\n * Umwandlung Windgeschwindigkeit von m/s in Beaufort\n * \n * @param {number|undefined} wind [m/s]\n * @return {undefined|number} [bf]\n */\nexport function windspeedMSToBF(wind) {\n  return (wind === undefined || isNaN(wind)) ?\n    undefined :\n    Math.min(12, Math.pow(wind/0.8360, 2/3));\n}\n\n/**\n * Umwandlung Windgeschwindigkeit von Beaufort in m/s\n * \n * @param {number|undefined} wind [bf]\n * @return {undefined|number} [m/s\n */\nexport function windspeedBFToMS(wind) {\n  return (wind === undefined || isNaN(wind)) ?\n    undefined :\n    0.8360 * Math.pow(wind, 3/2);\n}\n\n/**\n * Abschätzung der Schneefallgrenze aus Temperatur und Höhe des 850hPa-Levels\n * \n * Formel aus Weathercalc herauskopiert.\n * \n * @static\n * @public\n * @param {number|undefined} temp Temperatur auf 850 hPa [K]\n * @param {number|undefined} a Höhe des 850 hPa Levels [m ü.M.]\n * @return {number|undefined} Abgeschätzte Schneefallgrenze [m ü.M.]\n */\nexport function snowlineByTemp850hPaAndAltidude(temp, a) {\n  if (temp === undefined || isNaN(temp) ||\n      a === undefined || isNaN(a))\n    return undefined;\n  return 153.0 * tempKelvinToCelsius(temp) + 0.9985 * a - 304.26;\n}\n\n/**\n * Barometrische Höhenformel. Berechnung von Luftdruck in anderer Höhe.\n * \n * Formel aus Wiki-Artikel https://de.wikipedia.org/wiki/Barometrische_H%C3%B6henformel\n * \n * @static\n * @public\n * @param {number|undefined} p0 Druck auf dem Startlevel [hPa]\n * @param {number|undefined} h Höhe bis zum Ziellevel (positiv für höher über Meereslevel) [m]\n * @param {number|undefined} T0 Temperatur auf dem Startlevel [K]\n * @param {number|undefined} T1 Temperatur auf dem Ziellevel, wenn undefined\n *                              wird Isothermie angenommen [K]\n * @return {number|undefined} Luftdruck auf dem Ziellevel [hPa]\n */\nexport function pressureByBarometricFormula(p0, h, T0, T1) {\n  if (p0 === undefined || isNaN(p0) ||\n      h === undefined || isNaN(h) ||\n      T0 === undefined || isNaN(T0))\n    return undefined;\n  if (h == 0)\n    return p0;\n  var M = 0.02896;\n  var g = 9.807;\n  var R = 8.314;\n  if (T1 === undefined)\n    T1 = T0;\n  // Isotherme Atmosphäre\n  if (T0 == T1)\n    return p0 * Math.exp(-M*g/R/T0*h);\n  var a = (T0 - T1)/h;\n  return p0 * Math.exp(M*g/R/a*Math.log(1-a*h/T0));\n}\n\n/**\n * Dichte von feuchter Luft.\n * \n * Formel aus Wiki-Artikel https://en.wikipedia.org/wiki/Density_of_air\n * \n * @param {number|undefined} p Luftdruck [hPa]\n * @param {number|undefined} T Lufttemperatur [K]\n * @param {number|undefined} rh Luftfeuchtigkeit []\n * @return {number|undefined} Dichte [kg/m^3]\n */\nexport function densityHumidAirByPressureAndTempAndRelHumidity(p, T, rh) {\n  if (p === undefined || isNaN(p) ||\n      T === undefined || isNaN(T) ||\n      rh === undefined || isNaN(rh))\n    return undefined;\n  var Rd = 287.058; // J/(kg·K)\n  var Rv = 461.495; // J/(kg·K)\n  var pv = saturationPressureByTemp(T)*rh;\n  return (p - pv)*100/Rd/T + pv*100/Rv/T;\n}","/**\n * @module meteoJS/events\n */\n\n/**\n * Listen for a certain type of event\n * \n * @abstract\n * @param {string} listener - Event type.\n * @param {callback} callback - Listener function.\n * @param {mixed} [thisArg] - Objekt für this beim Ausführen von callback.\n * @returns {number} Listener function key.\n */\nfunction on(listener, callback, thisArg) {\n  if (!('listeners' in this) ||\n      this.listeners === undefined)\n    this.listeners = {};\n  if (!(listener in this.listeners))\n    this.listeners[listener] = {};\n  // Adapted from https://gist.github.com/gordonbrander/2230317\n  var result_key = Math.random().toString(36).substr(2, 9);\n  this.listeners[listener][result_key] = {\n    callback: callback,\n    thisArg:  thisArg\n  };\n  return result_key;\n}\n\n/**\n * Unlisten for a certain type of event\n * \n * @abstract\n * @param {string} listener - Event type.\n * @param {number} key - Listener function key.\n */\nfunction un(listener, key) {\n  if ('listeners' in this &&\n      this.listeners !== undefined &&\n      listener in this.listeners &&\n      key in this.listeners[listener])\n    delete this.listeners[listener][key];\n}\n\n/**\n * Listen once for a certain type of event\n * \n * @abstract\n * @param {string} listener - Event type.\n * @param {callback} callback - Listener function.\n * @param {mixed} [thisArg] - Objekt für this beim Ausführen von callback.\n */\nfunction once(listener, callback, thisArg) {\n  if (!('once_listeners' in this) ||\n      this.once_listeners === undefined)\n    this.once_listeners = {};\n  if (!(listener in this.once_listeners) ||\n      !('push' in this.once_listeners[listener]))\n    this.once_listeners[listener] = [];\n  this.once_listeners[listener].push({\n    callback: callback,\n    thisArg:  thisArg\n  });\n}\n\n/**\n * Gibt es Listener Funktionen für einen Event Type\n * \n * @abstract\n * @param {string} listener - Event type.\n * @returns {boolean}\n */\nfunction hasListener(listener) {\n  return ('listeners' in this &&\n          this.listeners !== undefined &&\n          listener in this.listeners &&\n          Object.keys(this.listeners[listener]).length) ||\n         ('once_listeners' in this &&\n          listener in this.once_listeners &&\n          Object.keys(this.once_listeners[listener]).length);\n}\n\n/**\n * Execute all listener functions für einen Event Type\n * \n * @abstract\n * @param {string} listener - Event type.\n */\nfunction trigger(listener) {\n  let args = Array.prototype.slice.call(arguments);\n  args.shift();\n  if ('listeners' in this &&\n      this.listeners !== undefined &&\n      listener in this.listeners &&\n      typeof this.listeners[listener] == 'object') {\n    Object.keys(this.listeners[listener]).forEach(key => {\n      this.listeners[listener][key].callback.apply(\n        this.listeners[listener][key].thisArg === undefined ?\n          this :\n          this.listeners[listener][key].thisArg,\n        args);\n    });\n  }\n  if ('once_listeners' in this &&\n      this.once_listeners !== undefined &&\n      listener in this.once_listeners &&\n      'forEach' in this.once_listeners[listener]) {\n    let once_listeners = this.once_listeners[listener];\n    this.once_listeners[listener] = [];\n    once_listeners.forEach(obj => {\n      obj.callback.apply(obj.thisArg === undefined ? this : obj.thisArg, args);\n    });\n  }\n}\n\n/**\n * Fügt einem Objekt alle Event-Funktionen hinzu.\n * \n * @param {object} obj\n */\nexport function addEventFunctions(obj) {\n  obj.on = on;\n  obj.un = un;\n  obj.once = once;\n  obj.hasListener = hasListener;\n  obj.trigger = trigger;\n}\nexport default addEventFunctions;","/**\n * @module meteoJS/repetitiveRequests\n */\nimport addEventFunctions from './Events.js';\n\n/**\n * Event fired before a request is executed.\n * \n * @event module:meteoJS/repetitiveRequests#before:request\n */\n\n/**\n * Event fired on a successful request.\n * \n * @event module:meteoJS/repetitiveRequests#success:request\n * @property {external:XMLHttpRequest} request - XMLHttpRequest of the successful request.\n */\n\n/**\n * Event fired if a request failed.\n * \n * @event module:meteoJS/repetitiveRequests#error:request\n * @property {external:XMLHttpRequest} request - XMLHttpRequest of the failed request.\n */\n\n/**\n * Options for constructor.\n * \n * @typedef {Object} module:meteoJS/repetitiveRequests~options\n * @property {undefined|string} [url=undefined] - URL to make repetitive\n *   requests to. If undefined, no request will be done.\n * @property {string} [user=''] - User to send with request.\n * @property {string} [password=''] - Password to send with request.\n * @property {boolean} [start=true] - Start repetetive requests on construction.\n * @property {undefined|string} [defaultTimeout=undefined]\n *   Default timeout until next request, if response has no Cache-Control\n *   HTTP-Header. In milliseconds. If undefined, a further request will only be\n *   done, if the reponse returned a valid Cache-Control header.\n * @property {undefined|string} [timeoutOnError=undefined]\n *   Timeout until next request after a error response. In milliseconds. If\n *   undefined, no further request will be done after an error.\n * @property {boolean} [pauseOnHiddenDocument=false] - Pause making repetitive\n *   requests when document is hidden.\n * @property {''|'arraybuffer'|'blob'|'document'|'json'|'text'} [responseType='']\n *   Specifies the content type of the response.\n *   See {@link https://developer.mozilla.org/de/docs/Web/API/XMLHttpRequest/responseType}.\n */\n\n/**\n * Makes requests again and again. Useful to stay up to date with\n *   the data available on the server. If the response returns a Cache-Control\n *   HTTP-Header, then the next request will be done per default after this\n *   time.\n * \n * @fires module:meteoJS/repetitiveRequests#before:request\n * @fires module:meteoJS/repetitiveRequests#success:request\n * @fires module:meteoJS/repetitiveRequests#error:request\n */\nexport class RepetitiveRequests {\n  \n  /**\n   * @param {module:meteoJS/repetitiveRequests~options} [options] - Options.\n   */\n  constructor({\n    url = undefined,\n    user = '',\n    password = '',\n    start = true,\n    defaultTimeout = undefined,\n    timeoutOnError = undefined,\n    pauseOnHiddenDocument = false,\n    responseType = ''\n  } = {}) {\n    \n    /**\n     * @type undefined|string\n     * @private\n     */\n    this._url = url;\n    \n    /**\n     * @type string\n     * @private\n     */\n    this._user = user;\n    \n    /**\n     * @type string\n     * @private\n     */\n    this._password = password;\n    \n    /**\n     * @type boolean\n     * @private\n     */\n    this._isStarted = start;\n    \n    /**\n     * @type undefined|integer\n     * @private\n     */\n    this._defaultTimeout = defaultTimeout;\n    \n    /**\n     * @type undefined|integer\n     * @private\n     */\n    this._timeoutOnError = timeoutOnError;\n    \n    /**\n     * @type boolean\n     * @private\n     */\n    this._pauseOnHiddenDocument = pauseOnHiddenDocument;\n    this._initPauseOnHiddenDocument();\n\n    /**\n     * @type boolean\n     * @private\n     */\n    this._isSuppressedByHiddenDocument = false;\n    \n    /**\n     * @type string\n     * @private\n     */\n    this._responseType = responseType;\n    \n    /**\n     * @type mixed\n     * @private\n     */\n    this._timeoutID = undefined;\n    \n    /**\n     * @type boolean\n     * @private\n     */\n    this._loading = false;\n    \n    if (this._isStarted)\n      this.start();\n  }\n  \n  /**\n   * Current URL to make requests to.\n   * \n   * @type undefined|string\n   */\n  get url() {\n    return this._url;\n  }\n  set url(url) {\n    this._url = url;\n  }\n  \n  /**\n   * User to send with request.\n   * \n   * @type string\n   */\n  get user() {\n    return this._user;\n  }\n  set user(user) {\n    this._user = user;\n  }\n  \n  /**\n   * Password to send with request.\n   * \n   * @type string\n   */\n  get password() {\n    return this._password;\n  }\n  set password(password) {\n    this._password = password;\n  }\n  \n  /**\n   * Content type of the response.\n   * \n   * @type string\n   */\n  get responseType() {\n    return this._responseType;\n  }\n  set responseType(responseType) {\n    this._responseType = responseType;\n  }\n  \n  /**\n   * Start repetitive requests. Makes immediatly the first request.\n   */\n  start() {\n    this._isStarted = true;\n    this._startRequest();\n  }\n  \n  /**\n   * Stops repetitive requests. Events aren't triggered anymore. Even if a\n   * former request creates a response.\n   */\n  stop() {\n    this._isStarted = false;\n    if (this._timeoutID !== undefined) {\n      clearTimeout(this._timeoutID);\n      this._timeoutID = undefined;\n    }\n  }\n  \n  /**\n   * Executes next request after the passed delay. If already another request\n   * is planned, nothing is done.\n   * \n   * @private\n   * @param {integer} delay - Delay in milliseconds.\n   */\n  _planRequest({\n    delay\n  }) {\n    if (this._timeoutID !== undefined)\n      return;\n    \n    this._timeoutID = setTimeout(() => {\n      if (this._pauseOnHiddenDocument\n        && ('hidden' in document)\n        && document.hidden) {\n        this._isSuppressedByHiddenDocument = true;\n        return;\n      }\n\n      this._startRequest();\n    }, delay);\n  }\n  \n  /**\n   * Makes a new request and triggeres events.\n   * \n   * @private\n   */\n  _startRequest() {\n    if (this._timeoutID !== undefined) {\n      clearTimeout(this._timeoutID);\n      this._timeoutID = undefined;\n    }\n    \n    this._makeRequest()\n      .then(({ request }) => {\n        if (!this._isStarted)\n          return;\n      \n        let delay = this._defaultTimeout;\n      \n        // Read ResponseHeader\n        let cacheControl = request.getResponseHeader('Cache-Control');\n        if (cacheControl !== null) {\n          let maxAges = /(^|,\\s*)max-age=([0-9]+)($|\\s*,)/.exec(cacheControl);\n          if (maxAges !== null &&\n            maxAges[2] > 0)\n            delay = Math.round(maxAges[2]*1000);\n        }\n      \n        this.trigger('success:request', { request });\n      \n        if (delay !== undefined)\n          this._planRequest({ delay });\n      }, ({ request } = {}) => {\n        if (!this._isStarted)\n          return;\n      \n        if (request === undefined)\n          return;\n      \n        this.trigger('error:request', { request });\n      \n        if (this._timeoutOnError !== undefined)\n          this._planRequest({ delay: this._timeoutOnError });\n      }, ({ request = undefined }) => {\n        /* Promise() returned by _makeRequest() also rejects, when URL isn't\n         * defined or is actually loading. In these cases don't throw an\n         * error event. */\n        if (request !== undefined)\n          this.trigger('error:request', { request })\n      });\n  }\n  \n  /**\n   * Makes a new request immediatly, except another request is already loading.\n   * \n   * @private\n   * @returns {Promise}\n   */\n  async _makeRequest() {\n    this.trigger('before:request');\n    return new Promise((resolve, reject) => {\n      if (this._url === undefined) {\n        reject();\n        return;\n      }\n      \n      if (this._loading) {\n        reject();\n        return;\n      }\n      this._loading = true;\n      \n      let request = new XMLHttpRequest();\n      if (this.responseType !== undefined)\n        request.responseType = this.responseType;\n      request.addEventListener('load', () => {\n        this._loading = false;\n        \n        if (request.status == 200)\n          resolve({ request });\n        else\n          reject({ request });\n      });\n      request.addEventListener('error', () => {\n        this._loading = false;\n        reject({ request });\n      });\n      \n      request.open('GET', this._url, true, this._user, this._password);\n      request.send();\n    });\n  }\n  \n  /**\n   * @private\n   */\n  _initPauseOnHiddenDocument() {\n    if (!this._pauseOnHiddenDocument)\n      return;\n    \n    document.addEventListener('visibilitychange', () => {\n      if (('hidden' in document)\n        && !document.hidden\n        && this._isSuppressedByHiddenDocument\n        && this._isStarted) {\n        this._isSuppressedByHiddenDocument = false;\n        this.start();\n      }\n    });\n  }\n}\naddEventFunctions(RepetitiveRequests.prototype);\nexport default RepetitiveRequests;\n","/**\n * @module meteoJS/timeline\n */\nimport addEventFunctions from './Events.js';\n\n/**\n * Special key identifier.\n * \n * @typedef {\"ctrl\"|\"alt\"|\"shift\"|\"meta\"|Number}\n *   module:meteoJS/timeline~specialKeyIdentifier\n */\n\n/**\n * Definition of pressed keys with optional special keys.\n * \n * @typedef {module:meteoJS/timeline~specialKeyIdentifier|\n             module:meteoJS/timeline~specialKeyIdentifier[]}\n *   module:meteoJS/timeline~optionPressedKeys\n */\n\n/**\n * Keyboard navigation options.\n * \n * @typedef {Object} module:meteoJS/timeline~optionKeyboardNavigation\n * @param {boolean} [enabled=false] - Enable Keyboard Navigation.\n * @param {module:meteoJS/timeline~optionPressedKeys} [first=36]\n *   Keyboard event to execute\n *   {@link module:meteoJS/timeline.Timeline#first|first()}.\n *   Default: Home.\n * @param {module:meteoJS/timeline~optionPressedKeys} [last=35]\n *   Keyboard event to execute\n *   {@link module:meteoJS/timeline.Timeline#last|last()}.\n *   Default: End.\n * @param {module:meteoJS/timeline~optionPressedKeys} [prev=37]\n *   Keyboard event to execute\n *   {@link module:meteoJS/timeline.Timeline#prev|prev()}.\n *   Default: Arrow left.\n * @param {module:meteoJS/timeline~optionPressedKeys} [next=39]\n *   Keyboard event to execute\n *   {@link module:meteoJS/timeline.Timeline#next|next()}.\n *   Default: Arrow right.\n * @param {module:meteoJS/timeline~optionPressedKeys} [prevAllEnabledTime=[37, 'ctrl']]\n *   Keyboard event to execute\n *   {@link module:meteoJS/timeline.Timeline#prevAllEnabledTime|prevAllEnabledTime()}.\n *   Default: Arrow left + Ctrl.\n * @param {module:meteoJS/timeline~optionPressedKeys} [nextAllEnabledTime=[39, 'ctrl']]\n *   Keyboard event to execute\n *   {@link module:meteoJS/timeline.Timeline#nextAllEnabledTime|nextAllEnabledTime()}.\n *   Default: Arrow right + Ctrl.\n * @param {Object.<string,module:meteoJS/timeline~optionPressedKeys>} [add]\n *   Keyboard event to execute {@link module:meteoJS/timeline.Timeline#add|add()}.\n *   The keys are combined with an amount integer and a timeKey\n *   (definition analog to the add() function).\n *   Defaults: ArrowRight plus 3h:Ctrl+Shift, 6h:Shift, 12h:Alt+Shift, 24h:Alt\n * @param {Object.<string,module:meteoJS/timeline~optionPressedKeys>} [sub]\n *   Keyboard event to execute {@link module:meteoJS/timeline.Timeline#sub|sub()}.\n *   The keys are combined with an amount integer and a timeKey\n *   (definition analog to the add() function).\n *   Defaults: ArrowLeft plus 3h:Ctrl+Shift, 6h:Shift, 12h:Alt+Shift, 24h:Alt\n */\n\n/**\n * Options for timeline constructor.\n * \n * @typedef {Object} module:meteoJS/timeline~options\n * @param {number|undefined} [maxTimeGap]\n *   Maximum of time period (in seconds) between two timestamps. If this option\n *   is specified, than e.g. the method getTimes() could return more timestamps\n *   than defined by setTimesBySetID.\n * @param {module:meteoJS/timeline~optionKeyboardNavigation}\n *   [keyboardNavigation] - Keyboard navigation options.\n */\n\n/**\n * @event module:meteoJS/timeline#change:time\n * @property {Date} oldDate - Time before change.\n */\n\n/**\n * @event module:meteoJS/timeline#change:times\n */\n\n/**\n * @event module:meteoJS/timeline#change:enabledTimes\n */\n\n/**\n * @classdesc\n * Class represents a timeline.\n * On this timeline, you could define different set of times. This is useful for\n * the usecase 1: You have different data types for different times (like radar\n * and satellite pictures). Then, the timeline provides a list of all available\n * times. Each time in each set of times could be enabled or disabled. This\n * yields to the usecase 2: In a viewer of model charts, you probably want to\n * show all the times with charts. (Global models normally have a time interval\n * of 3 hours between charts) But for different parameters, you only provide\n * charts at a greater interval. E.g. you calculate 24h-precipiation sums only\n * for 00 UTC. So you can set the times of the 3-hour-interval and only set\n * the 00 UTC timestamps as enabled. To visualise the timeline use some\n * child class of the\n * {@link module:meteoJS/timeline/visualisation.Visualisation} class. To animate\n * through time steps use the {@link module:meteoJS/timeline/animation.Animation}\n * class.\n * \n * <pre><code>import Timeline from 'meteojs/Timeline';</code></pre>\n */\nexport class Timeline {\n  \n  /**\n   * @param {module:meteoJS/timeline~options} [options] - Options.\n   */\n  constructor({ maxTimeGap = undefined,\n    keyboardNavigation = {} } = {}) {\n    /**\n     * @type undefined|number\n     * @private\n     */\n    this.maxTimeGap = maxTimeGap;\n  \n    /**\n     * Date object with current selected time. Maybe invalid.\n     * @member {Date}\n     * @private\n     */\n    this.selectedTime = new Date('invalid');\n  \n    /**\n     * Times of this timeline. Sorted upwardly.\n     * @member {Date[]}\n     * @private\n     */\n    this.times = [];\n  \n    /**\n     * Times of this timeline, that are enabled at least in one set of times.\n     * Sorted upwardly.\n     * @member {Date[]}\n     * @private\n     */\n    this.enabledTimes = [];\n  \n    /**\n     * Times of this timeline, that are enabled through all set of times.\n     * Sorted upwardly.\n     * @member {Date[]}\n     * @private\n     */\n    this.allEnabledTimes = [];\n  \n    /**\n     * Objekt mit keys und Date-Arrays (zeitlich sortiert)\n     * @type Object.<mixed,Object>\n     * @private\n     */\n    this.timesByKey = {};\n    \n    /**\n     * @type {module:meteoJS/timeline~keyboardNavigationOptions}\n     * @private\n     */\n    this._keyboardNavigation = {};\n    this._initKeyboardNavigation(keyboardNavigation);\n  }\n  \n  /**\n   * Current selected time.\n   * \n   * @returns {Date} Selected time, could be invalid.\n   */\n  getSelectedTime() {\n    return this.selectedTime;\n  }\n  \n  /**\n   * Sets current selected time. You can select a time returned by getTimes only.\n   * If this is not the case, an invalid timestamp will be set.\n   * \n   * @param {Date} time - Time to select.\n   * @returns {module:meteoJS/timeline.Timeline} Returns this.\n   * @fires module:meteoJS/timeline#change:time\n   */\n  setSelectedTime(time) {\n    this._setSelectedTime(\n      (_indexOfTimeInTimesArray(time, this.times) > -1) ?\n        time : new Date('invalid'));\n    return this;\n  }\n  \n  /**\n   * Returns a list of all timestamps represented by this timeline.\n   * This includes on the one hand all timestamps defined by setTimesBySetID, on\n   * the other hand there could exists additional timestamps (e.g. through the\n   * maxTimeGap option).\n   * \n   * @returns {Date[]} All defined times, sorted upwardly.\n   */\n  getTimes() {\n    return this.times;\n  }\n  \n  /**\n   * Returns a list of all enabled timestamps of this timeline.\n   * \n   * @returns {Date[]} All enabled times, sorted upwardly.\n   */\n  getEnabledTimes() {\n    return this.enabledTimes;\n  }\n  \n  /**\n   * Returns a list of times. These times are enabled throug every set of times.\n   * \n   * @returns {Date[]} Enabled times, sorted upwardly.\n   */\n  getAllEnabledTimes() {\n    return this.allEnabledTimes;\n  }\n  \n  /**\n   * Defines a set of times. Set is identified by an ID.\n   * If the set was already defined, the set of times will be overwritten.\n   * \n   * @param {mixed} id - ID of the set of times.\n   * @param {Date[]} times - Times (must be sorted upwardly).\n   * @returns {module:meteoJS/timeline.Timeline} Returns this.\n   * @fires module:meteoJS/timeline#change:times\n   * @fires module:meteoJS/timeline#change:enabledTimes\n   */\n  setTimesBySetID(id, times) {\n    this.timesByKey[id] = {\n      times: times,\n      enabled: times\n    };\n    this._updateTimes();\n    this._updateEnabledTimes();\n    return this;\n  }\n  \n  /**\n   * Defines the enbaled times of a set of times. The passed times must be\n   * contained in the times of the set (defined earlier by setTimesBySetID).\n   * \n   * @param {mixed} id - ID of the set of times.\n   * @param {Date[]} times - Times to set enabled (must be sorted upwardly).\n   * @returns {module:meteoJS/timeline.Timeline} Returns this.\n   * @fires module:meteoJS/timeline#change:enabledTimes\n   */\n  setEnabledTimesBySetID(id, times) {\n    if (id in this.timesByKey) {\n      this.timesByKey[id].enabled = times;\n      this._updateEnabledTimes();\n    }\n    return this;\n  }\n  \n  /**\n   * Returns IDs of all defined sets.\n   * \n   * @return {mixed[]} IDs.\n   */\n  getSetIDs() {\n    return Object.keys(this.timesByKey);\n  }\n  \n  /**\n   * Deletes a set of times.\n   * \n   * @param {mixed} id - ID of the set of times.\n   * @returns {module:meteoJS/timeline.Timeline} Returns this.\n   * @fires module:meteoJS/timeline#change:times\n   * @fires module:meteoJS/timeline#change:enabledTimes\n   */\n  deleteSetID(id) {\n    if (id in this.timesByKey) {\n      delete this.timesByKey[id];\n      this._updateTimes();\n      this._updateEnabledTimes();\n    }\n    return this;\n  }\n  \n  /**\n   * Set selected time to the first time, which is enabled.\n   * \n   * @returns {module:meteoJS/timeline.Timeline} Returns this.\n   */\n  first() {\n    this._setSelectedTime(this.getFirstEnabledTime());\n    return this;\n  }\n  \n  /**\n   * Set selected time to the last time, which is enabled.\n   * \n   * @returns {module:meteoJS/timeline.Timeline} Returns this.\n   */\n  last() {\n    this._setSelectedTime(this.getLastEnabledTime());\n    return this;\n  }\n  \n  /**\n   * Changes selected time to the next enabled time.\n   * \n   * @returns {module:meteoJS/timeline.Timeline} Returns this.\n   */\n  next() {\n    this._setSelectedTime(this.getNextEnabledTime());\n    return this;\n  }\n  \n  /**\n   * Changes selected time to the previous enabled time.\n   * \n   * @returns {module:meteoJS/timeline.Timeline} Returns this.\n   */\n  prev() {\n    this._setSelectedTime(this.getPrevEnabledTime());\n    return this;\n  }\n  \n  /**\n   * Changes selected time to the next time, which is enabled by all sets.\n   * \n   * @returns {module:meteoJS/timeline.Timeline} Returns this.\n   */\n  nextAllEnabledTime() {\n    this._setSelectedTime(this.getNextAllEnabledTime());\n    return this;\n  }\n  \n  /**\n   * Changes selected time to the previous time, which is enabled by all sets.\n   * \n   * @returns {module:meteoJS/timeline.Timeline} Returns this.\n   */\n  prevAllEnabledTime() {\n    this._setSelectedTime(this.getPrevAllEnabledTime());\n    return this;\n  }\n  \n  /**\n   * Changes the selected time width adding an amount of \"time\".\n   * If the \"new\" timestamp is not available, the selected time is not changed.\n   * \n   * @param {number} amount - \"Time\"-Amount.\n   * @param {'years'|'y'|'months'|'M'|'days'|'d'|'hours'|'h'|'minutes'|'m'|'seconds'|'s'|'milliseconds'|'ms'}\n   *   timeKey - Period, nomenclature analogue to momentjs.\n   * @returns {module:meteoJS/timeline.Timeline} - Returns this.\n   */\n  add(amount, timeKey) {\n    let d = this.getSelectedTime();\n    let delta = 0;\n    switch (timeKey) {\n    case 'hours':\n    case 'h':\n      delta = amount * 3600 * 1000;\n      break;\n    case 'minutes':\n    case 'm':\n      delta = amount * 60 * 1000;\n      break;\n    case 'seconds':\n    case 's':\n      delta = amount * 1000;\n      break;\n    case 'milliseconds':\n    case 'ms':\n      delta = amount;\n      break;\n    }\n    if (delta != 0)\n      d = new Date(d.valueOf() + delta);\n    \n    switch (timeKey) {\n    case 'years':\n    case 'y':\n      d.setUTCFullYear(d.getUTCFullYear() + amount);\n      break;\n    case 'months':\n    case 'M':\n      d.setUTCMonth(d.getUTCMonth() + amount);\n      break;\n    case 'days':\n    case 'd':\n      d.setUTCDate(d.getUTCDate() + amount);\n      break;\n    }\n    \n    if (_indexOfTimeInTimesArray(d, this.times) > -1)\n      this._setSelectedTime(d);\n    return this;\n  }\n  \n  /**\n   * Changes the selected time width subracting an amount of \"time\".\n   * If the \"new\" timestamp is not available, the selected time is not changed.\n   * \n   * @param {number} amount - \"Time\"-Amount.\n   * @param {'years'|'y'|'months'|'M'|'days'|'d'|'hours'|'h'|'minutes'|'m'|'seconds'|'s'|'milliseconds'|'ms'}\n   *   timeKey - Period, nomenclature analogue to momentjs.\n   * @returns {module:meteoJS/timeline.Timeline} - Returns this.\n   */\n  sub(amount, timeKey) {\n    let d = this.getSelectedTime();\n    let delta = 0;\n    switch (timeKey) {\n    case 'hours':\n    case 'h':\n      delta = amount * 3600 * 1000;\n      break;\n    case 'minutes':\n    case 'm':\n      delta = amount * 60 * 1000;\n      break;\n    case 'seconds':\n    case 's':\n      delta = amount * 1000;\n      break;\n    case 'milliseconds':\n    case 'ms':\n      delta = amount;\n      break;\n    }\n    if (delta != 0)\n      d = new Date(d.valueOf() - delta);\n    \n    switch (timeKey) {\n    case 'years':\n    case 'y':\n      d.setUTCFullYear(d.getUTCFullYear() - amount);\n      break;\n    case 'months':\n    case 'M':\n      d.setUTCMonth(d.getUTCMonth() - amount);\n      break;\n    case 'days':\n    case 'd':\n      d.setUTCDate(d.getUTCDate() - amount);\n      break;\n    }\n    \n    if (_indexOfTimeInTimesArray(d, this.times) > -1)\n      this._setSelectedTime(d);\n    return this;\n  }\n  \n  /**\n   * Returns first time in this timeline, which is enabled by at least one set.\n   * \n   * @returns {Date} First enabled time, could be invalid.\n   */\n  getFirstEnabledTime() {\n    return (this.enabledTimes.length > 0) ?\n      this.enabledTimes[0] : new Date('invalid');\n  }\n  \n  /**\n   * Returns last time in this timeline, which is enabled by at least one set.\n   * \n   * @returns {Date} Last enabled time, could be invalid.\n   */\n  getLastEnabledTime() {\n    return (this.enabledTimes.length > 0) ?\n      this.enabledTimes[this.enabledTimes.length-1] : new Date('invalid');\n  }\n  \n  /**\n   * Returns next time after the selected time, which is enabled by at least\n   * one set. If selected time is invalid, the first enabled time is returned.\n   * \n   * @returns {Date} Next enabled time.\n   */\n  getNextEnabledTime() {\n    if (this.enabledTimes.length < 1)\n      return new Date('invalid');\n    var index = _indexOfTimeInTimesArray(this.getSelectedTime(), this.enabledTimes);\n    if (index > -1) {\n      index++;\n      return (index < this.enabledTimes.length) ?\n        this.enabledTimes[index] :\n        this.enabledTimes[this.enabledTimes.length-1];\n    }\n    else if (isNaN(this.getSelectedTime()))\n      return this.enabledTimes[0];\n    else {\n      // Es war kein Zeitpunkt aus enabledTimes\n      var result = new Date('invalid');\n      for (var i=0; i<this.enabledTimes.length; i++)\n        if (this.getSelectedTime().valueOf() < this.enabledTimes[i].valueOf()) {\n          result = this.enabledTimes[i];\n          break;\n        }\n      return result;\n    }\n  }\n  \n  /**\n   * Returns previous time before the selected time, which is enabled by at least\n   * one set. If selected time is invalid, the last enabled time is returned.\n   * \n   * @returns {Date} Previous enabled time.\n   */\n  getPrevEnabledTime() {\n    if (this.enabledTimes.length < 1)\n      return new Date('invalid');\n    var index = _indexOfTimeInTimesArray(this.getSelectedTime(), this.enabledTimes);\n    if (index > -1) {\n      index--;\n      return (-1 < index) ? this.enabledTimes[index] : this.enabledTimes[0];\n    }\n    else if (isNaN(this.getSelectedTime()))\n      return this.enabledTimes[0];\n    else {\n      // Es war kein Zeitpunkt aus enabledTimes\n      var result = new Date('invalid');\n      for (var i=this.enabledTimes.length-1; i>=0; i--)\n        if (this.getSelectedTime().valueOf() > this.enabledTimes[i].valueOf()) {\n          result = this.enabledTimes[i];\n          break;\n        }\n      return result;\n    }\n  }\n  \n  /**\n   * Returns first time in this timeline, which is enabled by at all sets.\n   * \n   * @returns {Date} First time, which is enabled by all sets.\n   */\n  getFirstAllEnabledTime() {\n    return (this.allEnabledTimes.length > 0) ?\n      this.allEnabledTimes[0] : new Date('invalid');\n  }\n  \n  /**\n   * Returns last time in this timeline, which is enabled by at all sets.\n   * \n   * @returns {Date} Last time, which is enabled by all sets.\n   */\n  getLastAllEnabledTime() {\n    return (this.allEnabledTimes.length > 0) ?\n      this.allEnabledTimes[this.allEnabledTimes.length-1] : new Date('invalid');\n  }\n  \n  /**\n   * Returns next time after the selected time, which is enabled by\n   * all sets. If selected time is invalid, the last all enabled time is returned.\n   * \n   * @returns {Date} Next time, which is enabled by all sets.\n   */\n  getNextAllEnabledTime() {\n    if (this.allEnabledTimes.length < 1)\n      return new Date('invalid');\n    var index = _indexOfTimeInTimesArray(this.getSelectedTime(), this.allEnabledTimes);\n    if (index > -1) {\n      index++;\n      return (index < this.allEnabledTimes.length) ?\n        this.allEnabledTimes[index] :\n        this.allEnabledTimes[this.allEnabledTimes.length-1];\n    }\n    else if (isNaN(this.getSelectedTime()))\n      return this.allEnabledTimes[0];\n    else {\n      // Es war kein Zeitpunkt aus allEnabledTimes\n      var result = new Date('invalid');\n      for (var i=0; i<this.allEnabledTimes.length; i++)\n        if (this.getSelectedTime().valueOf() < this.allEnabledTimes[i].valueOf()) {\n          result = this.allEnabledTimes[i];\n          break;\n        }\n      return result;\n    }\n  }\n  \n  /**\n   * Returns previous time before the selected time, which is enabled by\n   * all sets. If selected time is invalid, the first all enabled time is returned.\n   * \n   * @returns {Date} Previous time, which is enabled by all sets.\n   */\n  getPrevAllEnabledTime() {\n    if (this.allEnabledTimes.length < 1)\n      return new Date('invalid');\n    var index = _indexOfTimeInTimesArray(this.getSelectedTime(), this.allEnabledTimes);\n    if (index > -1) {\n      index--;\n      return (-1 < index) ? this.allEnabledTimes[index] : this.allEnabledTimes[0];\n    }\n    else if (isNaN(this.getSelectedTime()))\n      return this.allEnabledTimes[0];\n    else {\n      // Es war kein Zeitpunkt aus allEnabledTimes\n      var result = new Date('invalid');\n      for (var i=this.allEnabledTimes.length-1; i>=0; i--)\n        if (this.getSelectedTime().valueOf() > this.allEnabledTimes[i].valueOf()) {\n          result = this.allEnabledTimes[i];\n          break;\n        }\n      return result;\n    }\n  }\n  \n  /**\n   * Returns if the passed time is an enabled time.\n   * \n   * @returns {boolean}\n   */\n  isTimeEnabled(time) {\n    return this.enabledTimes.reduce(function (acc, t) {\n      return (t.valueOf() == time.valueOf()) ? true : acc;\n    }, false);\n  }\n  \n  /**\n   * Returns if the passed time is an enabled time.\n   * \n   * @returns {boolean}\n   */\n  isTimeAllEnabled(time) {\n    return this.allEnabledTimes.reduce(function (acc, t) {\n      return (t.valueOf() == time.valueOf()) ? true : acc;\n    }, false);\n  }\n  \n  /**\n   * Is the selected time the first enabled time.\n   * \n   * @returns {boolean}\n   */\n  isFirstEnabledTime() {\n    return this.getFirstEnabledTime().valueOf() == this.getSelectedTime().valueOf();\n  }\n  \n  /**\n   * Is the selected time the last enabled time.\n   * \n   * @returns {boolean}\n   */\n  isLastEnabledTime() {\n    return this.getLastEnabledTime().valueOf() == this.getSelectedTime().valueOf();\n  }\n  \n  /**\n   * Internal setter of the selected time. Caller must guarantee, that either\n   * the passed timestamp exists in this.times or is invalid.\n   * @param {Date} selectedTime - Selected time.\n   * @fires module:meteoJS/timeline#change:time\n   * @private\n   */\n  _setSelectedTime(selectedTime) {\n    var oldTime = this.selectedTime;\n    this.selectedTime = selectedTime;\n    this.trigger('change:time', oldTime);\n    return this.selectedTime;\n  }\n  \n  /**\n   * Bringt den Inhalt des Arrays this.times in\n   * Übereinstimmung mit dem Inhalt von this.timesByKey\n   * @private\n   * @fires module:meteoJS/timeline#change:times\n   */\n  _updateTimes() {\n    this.times = [];\n    var timesArr = [];\n    var times = {};\n    for (var key in this.timesByKey)\n      this.timesByKey[key].times.forEach(function (t) {\n        if (!(t.valueOf() in times)) {\n          timesArr.push(t);\n          times[t.valueOf()] = t;\n        }\n      });\n    _sortTimesArray(timesArr);\n    timesArr.forEach(function (time) {\n      if (this.times.length < 1) {\n        this.times.push(time);\n        return;\n      }\n      var lastTime = this.times[this.times.length-1];\n      if (this.maxTimeGap !== undefined &&\n          (time.valueOf()-lastTime.valueOf()) > 1000*this.maxTimeGap) {\n        var t = lastTime;\n        do {\n          t = new Date(t.getTime() + this.maxTimeGap*1000);\n          this.times.push(t);\n        } while ((time.valueOf()-t.valueOf()) > 1000*this.maxTimeGap);\n      }\n      this.times.push(time);\n    }, this);\n    _sortTimesArray(this.times);\n    this.trigger('change:times');\n  }\n  \n  /**\n   * Bringt den Inhalt der Arrays this.enabledTimes und this.allEnabledTimes in\n   * Übereinstimmung mit dem Inhalt von this.timesByKey\n   * @private\n   * @fires module:meteoJS/timeline#change:enabledTimes\n   */\n  _updateEnabledTimes() {\n    this.enabledTimes = [];\n    this.allEnabledTimes = [];\n    var enabledTimes = {};\n    var allEnabledTimes = {};\n    for (var key in this.timesByKey) {\n      this.timesByKey[key].enabled.forEach(function (t) {\n        if (!(t.valueOf() in enabledTimes)) {\n          this.enabledTimes.push(t);\n          enabledTimes[t.valueOf()] = t;\n        }\n        if (!(t.valueOf() in allEnabledTimes))\n          allEnabledTimes[t.valueOf()] = 1;\n        else\n          allEnabledTimes[t.valueOf()]++;\n      }, this);\n    }\n    _sortTimesArray(this.enabledTimes);\n    for (var value in allEnabledTimes)\n      if (allEnabledTimes[value] == Object.keys(this.timesByKey).length)\n        this.allEnabledTimes.push(enabledTimes[value]);\n    _sortTimesArray(this.allEnabledTimes);\n    this.trigger('change:enabledTimes');\n  }\n  \n  /**\n   * Intialize property \"_keyboardNavigation\".\n   * \n   * @param {module:meteoJS/timeline~optionKeyboardNavigation}\n   *   [keyboardNavigation] - Keyboard navigation options.\n   * @private\n   */\n  _initKeyboardNavigation({\n    enabled = false,\n    first = 36,\n    last = 35,\n    prev = 37,\n    next = 39,\n    prevAllEnabledTime = [37, 'ctrl'],\n    nextAllEnabledTime = [39, 'ctrl'],\n    add = undefined,\n    sub = undefined\n  } = {}) {\n    if (add === undefined)\n      add = {\n        '3h': [39, 'ctrl', 'shift'],\n        '6h': [39, 'shift'],\n        '12h': [39, 'alt', 'shift'],\n        '24h': [39, 'alt']\n      };\n    if (sub === undefined)\n      sub = {\n        '3h': [37, 'ctrl', 'shift'],\n        '6h': [37, 'shift'],\n        '12h': [37, 'alt', 'shift'],\n        '24h': [37, 'alt']\n      };\n    this._keyboardNavigation = {\n      enabled,\n      first,\n      last,\n      prev,\n      next,\n      prevAllEnabledTime,\n      nextAllEnabledTime,\n      add,\n      sub\n    };\n    if (document && this._keyboardNavigation.enabled)\n      document.addEventListener('keydown', event => {\n        Object.keys(this._keyboardNavigation).forEach(method => {\n          if (method == 'enabled')\n            return;\n          if (/^(add|sub)$/.test(method)) {\n            Object.keys(this._keyboardNavigation[method]).forEach(time => {\n              const matches = time.match(/^([0-9]+)\\s*([a-zA-Z]+)$/);\n              if (matches === null)\n                return;\n              if (_isEventMatchPressedKeys(event, this._keyboardNavigation[method][time])) {\n                this[method](+matches[1], matches[2]);\n                event.preventDefault();\n                event.stopPropagation();\n              }\n            });\n          }\n          else if (method in this\n            && _isEventMatchPressedKeys(event, this._keyboardNavigation[method])) {\n            this[method]();\n            event.preventDefault();\n            event.stopPropagation();\n          }\n        });\n      });\n  }\n}\naddEventFunctions(Timeline.prototype);\nexport default Timeline;\n\n/**\n * Gibt den Index eines Zeitpunktes in einem Array aus Zeitpunkten zurück.\n * @param {Date} time Zeitpunkt\n * @param {Date[]} times Array aus Zeitpunkten\n * @returns {number} -1 für \"nicht gefunden\n * @static\n * @private\n */\nexport let _indexOfTimeInTimesArray = (time, times) => {\n  return times.findIndex(function (t) {\n    return t.valueOf() == time.valueOf();\n  });\n};\n\n/**\n * Sortiert einen Array aus Zeitpunkten zeitlich aufwärts\n * @param {Date[]} times Array aus Zeitpunkten\n * @static\n * @private\n */\nfunction _sortTimesArray(times) {\n  times.sort(function (a,b) { return a.valueOf()-b.valueOf(); });\n}\n\n/**\n * Returns if an event represents a certain key pressed with (optional)\n * additional special keys.\n * \n * @param {KeyboardEvent} keyboardEvent - Keyboard event.\n * @param {module:meteoJS/timeline~optionPressedKeys} pressedKeys\n *   Checks if this keys are pressed.\n * @private\n */\nexport function _isEventMatchPressedKeys(keyboardEvent, pressedKeys) {\n  if (typeof pressedKeys != 'object' ||\n      !('forEach' in pressedKeys))\n    pressedKeys = [pressedKeys];\n  if (pressedKeys.length == 0)\n    return false;\n  let result =\n    [['ctrl', 'ctrlKey'],\n      ['alt', 'altKey'],\n      ['shift', 'shiftKey'],\n      ['meta', 'metaKey']]\n      .reduce((acc, cur) => acc && (((pressedKeys.indexOf(cur[0]) > -1))\n        ? keyboardEvent[cur[1]]\n        : !keyboardEvent[cur[1]]),\n      true);\n  pressedKeys.forEach(o => {\n    switch (o) {\n    case 'ctrl':\n    case 'alt':\n    case 'shift':\n    case 'meta':  break;\n    default:      if (o != keyboardEvent.keyCode) result = false;\n    }\n  });\n  return result;\n}","const __WEBPACK_NAMESPACE_OBJECT__ = jQuery;","/**\n * @module meteoJS/timeline/animation\n */\nimport $ from 'jquery';\nimport addEventFunctions from '../Events.js';\nimport Timeline from '../Timeline.js';\n\n/**\n * Options for animation constructor.\n * \n * @typedef {Object} module:meteoJS/timeline/animation~options\n * @param {module:meteoJS/timeline.Timeline} timeline - Timeline to animate.\n * @param {number} [restartPause=1.8]\n *   Time in seconds to pause before the animation restart.\n * @param {number} [imagePeriod=0.2]\n *   Time in seconds between animation of two images.\n *   Ignored, if imageFrequency is specified.\n * @param {number|undefined} [imageFrequency]\n *   Time of images during one second.\n * @param {boolean} [enabledStepsOnly=true] - Use only enabled times.\n * @param {boolean} [allEnabledStepsOnly=false]\n *   Use only times that are enabled by all sets of time.\n */\n\n/**\n * Event on animation start.\n * \n * @event module:meteoJS/timeline/animation#start:animation\n */\n\n/**\n * Event on animation stop.\n * \n * @event module:meteoJS/timeline/animation#stop:animation\n */\n\n/**\n * Event on reaching last timestamp.\n * \n * @event module:meteoJS/timeline/animation#end:animation\n */\n\n/**\n * Event triggered immediatly before restart of animation.\n * \n * @event module:meteoJS/timeline/animation#restart:animation\n */\n\n/**\n * Event triggered when imageFrequency/imagePeriod is changed.\n * \n * @event module:meteoJS/timeline/animation#change:imageFrequency\n */\n\n/**\n * Event triggered when restartPause is changed.\n * \n * @event module:meteoJS/timeline/animation#change:restartPause\n */\n\n/**\n * Object to animate {@link module:meteoJS/timeline.Timeline}.\n * \n * <pre><code>import Animation from 'meteojs/timeline/Animation';</code></pre>\n */\nexport class Animation {\n  \n  /**\n   * @param {module:meteoJS/timeline/animation~options} options - Options.\n   */\n  constructor({ timeline,\n    restartPause = 1.8,\n    imagePeriod = 0.2,\n    imageFrequency = undefined,\n    enabledStepsOnly = true,\n    allEnabledStepsOnly = false } = {}) {\n    /**\n     * @type module:meteoJS/timeline/animation~options\n     * @private\n     */\n    this.options = {\n      timeline,\n      restartPause,\n      imagePeriod,\n      imageFrequency,\n      enabledStepsOnly,\n      allEnabledStepsOnly\n    };\n    // Normalize options\n    if (this.options.timeline === undefined)\n      this.options.timeline = new Timeline();\n    if (this.options.imageFrequency !== undefined &&\n        this.options.imageFrequency != 0)\n      this.options.imagePeriod = 1/this.options.imageFrequency;\n    /**\n     * ID to window.setInterval() of the animation.\n     * If undefined, there is no started animation.\n     * @type undefined|number\n     * @private\n     */\n    this.animationIntervalID = undefined;\n    \n    /**\n     * ID to window.setTimeout() ot the animation (used for restart-pause).\n     * If undefined, there is no started setTimeout (i.e. no restart-pause).\n     * @type undefined|number\n     * @private\n     */\n    this.animationTimeoutID = undefined;\n    \n    /**\n     * Current position in this.times in the animation.\n     * @type integer\n     * @private\n     */\n    this.animationStep = 0;\n    \n    /**\n     * Hash with timestamps-valueOf's as keys and index in this.times as values.\n     * @type Object\n     * @private\n     */\n    this.timesHash = {};\n    \n    /**\n     * List of timestamps. Current list of times of the timeline to animate over.\n     * @type Date[]\n     * @private\n     */\n    this.times = [];\n    \n    // Timeline initialisieren\n    let onChangeTimes = () => {\n      this.times = this.options.timeline[this._getTimelineTimesMethod()]();\n      this.timesHash = {};\n      this.times.forEach((time, i) => this.timesHash[time.valueOf()] = i);\n    };\n    this.options.timeline.on(this._getTimelineChangeTimesEvent(), onChangeTimes);\n    onChangeTimes();\n  }\n  \n  /**\n   * Returns time period between two animation steps (in s).\n   * \n   * @returns {number} Time period.\n   */\n  getImagePeriod() {\n    return this.options.imagePeriod;\n  }\n  \n  /**\n   * Sets time period between to animation steps (in s)\n   * \n   * @param {number} imagePeriod - Time period.\n   * @returns {module:meteoJS/timeline/animation.Animation} This.\n   */\n  setImagePeriod(imagePeriod) {\n    this.options.imagePeriod = imagePeriod;\n    if (this.isStarted())\n      this._updateAnimation();\n    this.trigger('change:imageFrequency');\n    return this;\n  }\n  \n  /**\n   * Returns time frequency of animation steps (in 1/s).\n   * \n   * @returns {number} Time frequency.\n   */\n  getImageFrequency() {\n    return 1/this.options.imagePeriod;\n  }\n  \n  /**\n   * Sets time frequency of animation steps (in 1/s).\n   * \n   * @param {number} imageFrequency - Time frequency.\n   * @returns {module:meteoJS/timeline/animation.Animation} This.\n   */\n  setImageFrequency(imageFrequency) {\n    if (imageFrequency != 0)\n      this.setImagePeriod(1/imageFrequency);\n    return this;\n  }\n  \n  /**\n   * Returns time duration before a restart (jump from end to beginning, in s).\n   * \n   * @returns {number} Time duration.\n   */\n  getRestartPause() {\n    return this.options.restartPause;\n  }\n  \n  /**\n   * Sets time duration before a restart (in s).\n   * \n   * @param {number} restartPause - Time duration.\n   * @returns {module:meteoJS/timeline/animation.Animation} This.\n   */\n  setRestartPause(restartPause) {\n    this.options.restartPause = Number(restartPause); // Convert string to number\n    this.trigger('change:restartPause');\n    return this;\n  }\n  \n  /**\n   * Is animation started.\n   * \n   * @returns {boolean}\n   */\n  isStarted() {\n    return this.animationIntervalID !== undefined ||\n           this.animationTimeoutID !== undefined;\n  }\n  \n  /**\n   * Starts the animation.\n   * \n   * @returns {module:meteoJS/timeline/animation.Animation} This.\n   * @fires module:meteoJS/timeline/animation#start:animation\n   */\n  start() {\n    if (this.options.timeline.getSelectedTime().valueOf() in this.timesHash)\n      this._setStep(this.timesHash[this.options.timeline.getSelectedTime().valueOf()]);\n    if (!this.isStarted())\n      this._updateAnimation();\n    this.trigger('start:animation');\n  }\n  \n  /**\n   * Stops the animation.\n   * \n   * @returns {module:meteoJS/timeline/animation.Animation} This.\n   * @fires module:meteoJS/timeline/animation#stop:animation\n   */\n  stop() {\n    this._clearAnimation();\n    this.trigger('stop:animation');\n  }\n  \n  /**\n   * Toggles the animation.\n   * \n   * @returns {module:meteoJS/timeline/animation.Animation} This.\n   */\n  toggle() {\n    if (this.isStarted())\n      this.stop();\n    else\n      this.start();\n  }\n  \n  /**\n   * Setzt Schritt der Animation\n   * @private\n   * @param {number} step\n   */\n  _setStep(step) {\n    if (0 <= step && step < this._getCount())\n      this.animationStep = step;\n  }\n  \n  /**\n   * Gibt timeline-Event Name zum abhören von Änderungen der Zeitschritte zurück.\n   * @private\n   * @returns {string}\n   */\n  _getTimelineChangeTimesEvent() {\n    return (this.options.enabledStepsOnly || this.options.allEnabledStepsOnly)\n      ? 'change:enabledTimes' : 'change:times';\n  }\n  \n  /**\n   * Gibt timeline-Methode aller Zeitschritte zurück.\n   * @private\n   * @returns {string}\n   */\n  _getTimelineTimesMethod() {\n    return this.options.allEnabledStepsOnly ? 'getAllEnabledTimes' :\n      this.options.enabledStepsOnly ? 'getEnabledTimes' : 'getTimes';\n  }\n  \n  /**\n   * Gibt Anzahl Animationsschritte zurück\n   * @private\n   * @returns {number}\n   */\n  _getCount() {\n    return this.options.timeline[this._getTimelineTimesMethod()]().length;\n  }\n  \n  /**\n   * Handelt die Animation\n   * @private\n   * @fires module:meteoJS/timeline/animation#end:animation\n   * @fires module:meteoJS/timeline/animation#restart:animation\n   */\n  _updateAnimation() {\n    this._clearAnimation();\n    if (this.animationStep < this._getCount()-1)\n      this._initAnimation();\n    else\n      this._initRestartPause();\n  }\n  \n  /**\n   * Startet Animation\n   * @private\n   */\n  _initAnimation() {\n    if (this.animationIntervalID === undefined)\n      this.animationIntervalID = window.setInterval(() => {\n        this.animationStep++;\n        if (this.animationStep < this.times.length)\n          this.options.timeline.setSelectedTime(this.times[this.animationStep]);\n        if (this.animationStep >= this._getCount()-1) {\n          this.trigger('end:animation');\n          this._clearAnimation();\n          this._initRestartPause();\n        }\n      }, this.options.imagePeriod * 1000);\n  }\n  \n  /**\n   * Startet den Timer für die Restart-Pause\n   * Verwende als Zeitspanne imagePeriod+restartPause. Sonst wird bei restartPause\n   * 0s der letzte Zeitschritt gar nie angezeigt.\n   * @private\n   */\n  _initRestartPause() {\n    if (this.animationTimeoutID === undefined)\n      this.animationTimeoutID = window.setTimeout(() => {\n        this.animationStep = 0;\n        this.trigger('restart:animation');\n        if (this.animationStep < this.times.length)\n          this.options.timeline.setSelectedTime(this.times[this.animationStep]);\n        this._clearAnimation();\n        this._initAnimation();\n      }, (this.options.imagePeriod + this.options.restartPause) * 1000);\n  }\n  \n  /**\n   * Löscht window.interval, falls vorhanden\n   * @private\n   */\n  _clearAnimation() {\n    if (this.animationIntervalID !== undefined) {\n      window.clearInterval(this.animationIntervalID);\n      this.animationIntervalID = undefined;\n    }\n    if (this.animationTimeoutID !== undefined) {\n      window.clearTimeout(this.animationTimeoutID);\n      this.animationTimeoutID = undefined;\n    }\n  }\n  \n}\naddEventFunctions(Animation.prototype);\nexport default Animation;\n\n/**\n * Insert an input-group to change frequency.\n * \n * <pre><code>import { insertFrequencyInput } from 'meteojs/timeline/Animation';</code></pre>\n * \n * @param {external:jQuery} node - Node to insert input-group.\n * @param {Object} options - Options for input-group.\n * @param {module:meteoJS/timeline/animation.Animation} options.animation\n *   Animation object.\n * @param {string} [options.suffix='fps'] - Suffix text for input-group.\n * @returns {external:jQuery} Input-group node.\n */\nexport function insertFrequencyInput(node, { animation, suffix = 'fps' }) {\n  const number = $('<input>')\n    .addClass('form-control')\n    .attr('type', 'number')\n    .attr('min', 1)\n    .attr('step', 1);\n  const inputGroupNumber = $('<div>')\n    .addClass('input-group')\n    .append(number)\n    .append($('<span>').addClass('input-group-text').text(suffix));\n  number.on('change', () => animation.setImageFrequency(number.val()));\n  const onChangeImageFrequency = () => number.val(animation.getImageFrequency());\n  animation.on('change:imageFrequency', onChangeImageFrequency);\n  onChangeImageFrequency();\n  node.append(inputGroupNumber);\n  return inputGroupNumber;\n}\n\n/**\n * Insert an input-range to change frequency.\n * \n * <pre><code>import { insertFrequencyRange } from 'meteojs/timeline/Animation';</code></pre>\n * \n * @param {external:jQuery} node - Node to insert input-range.\n * @param {Object} options - Options for input-range.\n * @param {module:meteoJS/timeline/animation.Animation} options.animation\n *   Animation object.\n * @param {number[]} options.frequencies - Frequencies to select.\n * @returns {external:jQuery} Input-range node.\n */\nexport function insertFrequencyRange(node, { animation, frequencies }) {\n  frequencies = frequencies ? frequencies : [1];\n  let range = $('<input>')\n    .addClass('form-range')\n    .attr('type', 'range')\n    .attr('min', 0)\n    .attr('max', frequencies.length-1);\n  range.on('change input', () => {\n    let i = range.val();\n    if (i < frequencies.length)\n      animation.setImageFrequency(frequencies[i]);\n  });\n  let onChangeImageFrequency = () => {\n    let i = frequencies.indexOf(animation.getImageFrequency());\n    if (i > -1)\n      range.val(i);\n  };\n  animation.on('change:imageFrequency', onChangeImageFrequency);\n  onChangeImageFrequency();\n  node.append(range);\n  return range;\n}\n\n/**\n * Insert an button-group to change frequency.\n * \n * <pre><code>import { insertFrequencyButtonGroup } from 'meteojs/timeline/Animation';</code></pre>\n * \n * @param {external:jQuery} node - Node to insert the button-group.\n * @param {Object} options - Options for the button-group.\n * @param {module:meteoJS/timeline/animation.Animation} options.animation\n *   Animation object.\n * @param {number[]} options.frequencies - Frequencies to select.\n * @param {string|undefined} [options.btnGroupClass='btn-group']\n *   Class added to the button-group node.\n * @param {string|undefined} [options.btnClass='btn btn-primary']\n *   Class added to each button.\n * @param {string} [options.suffix='fps']\n *   Suffix text for each button after frequency.\n * @returns {external:jQuery} Button-group node.\n */\nexport function insertFrequencyButtonGroup(node, {\n  animation,\n  frequencies,\n  btnGroupClass = 'btn-group',\n  btnClass = 'btn btn-primary',\n  suffix = 'fps'\n}) {\n  let btnGroup = $('<div>').addClass(btnGroupClass);\n  frequencies = frequencies ? frequencies : [];\n  frequencies.forEach(freq => {\n    btnGroup.append($('<button>')\n      .addClass(btnClass)\n      .data('frequency', freq)\n      .text(freq + ' ' + suffix)\n      .click(() => animation.setImageFrequency(freq)));\n  });\n  let onChange = () => {\n    btnGroup.children('button').removeClass('active').each(function () {\n      if ($(this).data('frequency') == animation.getImageFrequency())\n        $(this).addClass('active');\n    });\n  };\n  animation.on('change:imageFrequency', onChange);\n  onChange();\n  node.append(btnGroup);\n  return btnGroup;\n}\n\n/**\n * Insert an input-group to change restart pause.\n * \n * <pre><code>import { insertRestartPauseInput } from 'meteojs/timeline/Animation';</code></pre>\n * \n * @param {external:jQuery} node - Node to insert input-group.\n * @param {Object} options - Options for input-group.\n * @param {module:meteoJS/timeline/animation.Animation} options.animation\n *   Animation object.\n * @param {string} [options.suffix='s'] - Suffix text for input-group.\n * @returns {external:jQuery} Input-group node.\n */\nexport function insertRestartPauseInput(node, { animation, suffix = 's' }) {\n  const input = $('<input>')\n    .addClass('form-control')\n    .attr('type', 'number')\n    .attr('min', 0)\n    .attr('step', 0.1);\n  const inputGroupNumber = $('<div>')\n    .addClass('input-group')\n    .append(input)\n    .append($('<span>').addClass('input-group-text').text(suffix));\n  input.on('change', () => animation.setRestartPause(input.val()));\n  const onChange = () => input.val(animation.getRestartPause());\n  animation.on('change:restartPause', onChange);\n  onChange();\n  node.append(inputGroupNumber);\n  return inputGroupNumber;\n}\n\n/**\n * Insert an input-range to change restart pause.\n * \n * <pre><code>import { insertRestartPauseRange } from 'meteojs/timeline/Animation';</code></pre>\n * \n * @param {external:jQuery} node - Node to insert input-range.\n * @param {Object} options - Options for input-range.\n * @param {module:meteoJS/timeline/animation.Animation} options.animation\n *   Animation object.\n * @param {number[]} options.pauses - Restart pauses to select.\n * @returns {external:jQuery} Input-range node.\n */\nexport function insertRestartPauseRange(node, { animation, pauses }) {\n  pauses = pauses ? pauses : [1];\n  pauses = pauses.map(p => Math.round(p * 1000));\n  let range = $('<input>')\n    .addClass('form-range')\n    .attr('type', 'range')\n    .attr('min', 0)\n    .attr('max', pauses.length-1);\n  range.on('change input', () => {\n    let i = range.val();\n    if (i < pauses.length)\n      animation.setRestartPause(pauses[i] / 1000);\n  });\n  let onChangeImageFrequency = () => {\n    let i =\n      pauses.indexOf(Math.round(animation.getRestartPause() * 1000));\n    if (i > -1)\n      range.val(i);\n  };\n  animation.on('change:imageFrequency', onChangeImageFrequency);\n  onChangeImageFrequency();\n  node.append(range);\n  return range;\n}\n\n/**\n * Insert an button-group to change restart pause.\n * \n * <pre><code>import { insertRestartPauseButtonGroup } from 'meteojs/timeline/Animation';</code></pre>\n * \n * @param {external:jQuery} node - Node to insert the button-group.\n * @param {Object} options - Options for the button-group.\n * @param {module:meteoJS/timeline/animation.Animation} options.animation\n *   Animation object.\n * @param {number[]} options.pauses - Restart pauses to select.\n * @param {string|undefined} [options.btnGroupClass='btn-group']\n *   Class added to the button-group node.\n * @param {string|undefined} [options.btnClass='btn btn-primary']\n *   Class added to each button.\n * @param {string} [options.suffix='s']\n *   Suffix in each button after duration text.\n * @returns {external:jQuery} Button-group node.\n */\nexport function insertRestartPauseButtonGroup(node, {\n  animation,\n  pauses,\n  btnGroupClass = 'btn-group',\n  btnClass = 'btn btn-primary',\n  suffix = 's'\n}) {\n  let btnGroup = $('<div>').addClass(btnGroupClass);\n  pauses = pauses ? pauses : [];\n  pauses.forEach(pause => {\n    btnGroup.append($('<button>')\n      .addClass(btnClass)\n      .data('pause', pause)\n      .text(pause + ' ' + suffix)\n      .click(() => animation.setRestartPause(pause)));\n  });\n  let onChange = () => {\n    btnGroup.children('button').removeClass('active').each(function () {\n      if ($(this).data('pause') == animation.getRestartPause())\n        $(this).addClass('active');\n    });\n  };\n  animation.on('change:restartPause', onChange);\n  onChange();\n  node.append(btnGroup);\n  return btnGroup;\n}","export default \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"16\\\" height=\\\"16\\\" fill=\\\"currentColor\\\" class=\\\"bi bi-play-fill\\\" viewBox=\\\"0 0 16 16\\\">\\n  <path d=\\\"m11.596 8.697-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.692-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z\\\"/>\\n</svg>\";","export default \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"16\\\" height=\\\"16\\\" fill=\\\"currentColor\\\" class=\\\"bi bi-pause-fill\\\" viewBox=\\\"0 0 16 16\\\">\\n  <path d=\\\"M5.5 3.5A1.5 1.5 0 0 1 7 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5zm5 0A1.5 1.5 0 0 1 12 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5z\\\"/>\\n</svg>\";","/**\n * @module meteoJS/timeline/visualisation\n */\nimport addEventFunctions from '../Events.js';\nimport Timeline from '../Timeline.js';\n\n/**\n * Returns a textual representation of a time according to a passed format.\n * \n * This function could be used to convert Date-objects to a readable time with\n * external libraries. One such implementation is given by\n * {@link module:meteoJS/timeline/visualisation.makeTimeTextCallbackFunction}.\n * \n * @typedef {Function}\n *   module:meteoJS/timeline/visualisation~timeTextCallbackFunction\n * @param {Date} time - A valid datetime.\n * @param {string} format - Format string.\n * @returns {string} Textual representation.\n */\n\n/**\n * Options for Visualisation.\n * \n * @typedef {Object} module:meteoJS/timeline/visualisation~options\n * @param {module:meteoJS/timeline.Timeline} [timeline]\n *   Timeline object.\n * @param {external:jQuery} [node] - Node.\n * @param {module:meteoJS/timeline/animation.Animation} [animation]\n *   Animation object. If specified, the animation will be stopped on user\n *   interaction with the visualisation object.\n * @param {boolean} [enabledStepsOnly=true] - Use only enabled times.\n * @param {boolean} [allEnabledStepsOnly=false]\n *   Use only times that are enabled by all sets of time.\n * @param {string} [textInvalid='-']\n *   Output string, if time of timeline is invalid.\n * @param {module:meteoJS/timeline/visualisation~timeTextCallbackFunction}\n *   [getTimeText]\n *   Returns a textual representation of a time according to a passed format.\n * @param {string} [outputTimezone]\n *   'local' for browser local timezone.\n */\n\n/**\n * Object to visualise {@link module:meteoJS/timeline.Timeline}.\n * \n * How to create your own visualisation object:\n * * Inherit this object\n * * Inherit method onChangeTime()\n * * Inherit method onChangeTimes()\n * * Inherit method emptyNode()\n * * Inherit method onInitNode()\n * * To get all times to display use getTimelineTimes()\n * * Use method timeToText() to convert a Date to String.\n * * Use method attachEventListener() to attach event listeners on a object.\n *   The event listener will be deleted automatically if the output is muted.\n * * At the end of the constructor call \"this.setNode(this.options.node);\".\n * \n * <pre><code>import Visualisation from 'meteojs/timeline/Visualisation';</code></pre>\n * \n * @abstract\n * @listens module:meteoJS/timeline#change:time\n * @listens module:meteoJS/timeline#change:times\n * @listens module:meteoJS/timeline#change:enabledTimes\n */\nexport class Visualisation {\n  \n  /**\n   * @param {module:meteoJS/timeline/visualisation~options} options - Options.\n   */\n  constructor({\n    timeline = undefined,\n    node = undefined,\n    animation = undefined,\n    enabledStepsOnly = true,\n    allEnabledStepsOnly = false,\n    textInvalid = '-',\n    getTimeText = undefined,\n    outputTimezone = undefined\n  } = {}) {\n    /**\n     * @type Object\n     * @private\n     */\n    this.options = {\n      timeline,\n      node,\n      animation,\n      enabledStepsOnly,\n      allEnabledStepsOnly,\n      textInvalid,\n      getTimeText,\n      outputTimezone\n    };\n    \n    // Normalize options\n    if (this.options.timeline === undefined)\n      this.options.timeline = new Timeline();\n    \n    /**\n     * @member {Array[]}\n     * @private\n     */\n    this.listeners = [];\n    \n    /**\n     * @member {undefined|mixed}\n     * @private\n     */\n    this.inputListener = undefined;\n  }\n  \n  /**\n   * Sets jQuery-Node for output.\n   * \n   * @public\n   * @param {external:jQuery|undefined} node Node, undefined to mute the output.\n   * @returns {module:meteoJS/timeline/visualisation.Visualisation} This.\n   */\n  setNode(node) {\n    if (this.options.node !== undefined)\n      this.emptyNode();\n  \n    if (node === undefined) {\n      this.detachEventListeners();\n      this.options.node = node;\n    }\n    else {\n      this.options.node = node;\n      var isListenersDefined = this.listeners.length > 0;\n      if (!isListenersDefined) {\n        this.attachEventListener(this.options.timeline, 'change:time', function () {\n          this.onChangeTime();\n        }, this);\n        this.attachEventListener(this.options.timeline, 'change:times', function () {\n          this.onChangeTimes();\n        }, this);\n        this.attachEventListener(this.options.timeline, 'change:enabledTimes', function () {\n          this.onChangeTimes();\n        }, this);\n      }\n      this.onInitNode(isListenersDefined);\n      this.onChangeTimes();\n      this.onChangeTime();\n    }\n  \n    if (this.inputListener === undefined)\n      this.inputListener = this.on('input', function () {\n        if (this.options.animation !== undefined)\n          this.options.animation.stop();\n      }, this);\n  \n    return this;\n  }\n  \n  /**\n   * Gets current value of output timezone.\n   * \n   * @public\n   * @returns {string|undefined} Output timezone.\n   */\n  getOutputTimezone() {\n    return this.options.outputTimezone;\n  }\n  \n  /**\n   * Sets output timezone, undefined for UTC.\n   * \n   * @public\n   * @param {string|undefined} outputTimezone Timezone for datetime output.\n   * @returns {module:meteoJS/timeline/visualisation.Visualisation} This.\n   */\n  setOutputTimezone(outputTimezone) {\n    var updateOutput = (this.options.outputTimezone != outputTimezone);\n    this.options.outputTimezone = outputTimezone;\n    if (updateOutput &&\n        this.options.node !== undefined) {\n      this.onChangeTimes();\n      this.onChangeTime();\n    }\n    return this;\n  }\n  \n  /**\n   * Called if the timeline triggers the\n   * {@link module:meteoJS/timeline#change:time} event.\n   * Prerequisite: this.options.node must be defined.\n   * \n   * @abstract\n   * @protected\n   */\n  onChangeTime() {}\n  \n  /**\n   * Called if the timeline triggers the {@link module:meteoJS/timeline#change:times}\n   * or {@link module:meteoJS/timeline#change:enabledTimes} event.\n   * Prerequisite: this.options.node must be defined.\n   * \n   * @abstract\n   * @protected\n   */\n  onChangeTimes() {}\n  \n  /**\n   * Called to empty the output node. Mainly if the output is muted.\n   * Prerequisite: this.options.node must be defined.\n   * \n   * @abstract\n   * @protected\n   */\n  emptyNode() {}\n  \n  /**\n   * Called once an output node is set.\n   * Prerequisite: this.options.node must be defined.\n   * \n   * @abstract\n   * @protected\n   * @param {boolean} isListenersDefined\n   *   True if the event listeners are already set.\n   */\n  onInitNode() {}\n  \n  /**\n   * Returns the times to display. This could be either all times in the timeline\n   * or only the enabled times or the all enabled times. The user of the\n   * visualisation object select this by the options.\n   * \n   * @protected\n   * @returns {Date[]} Times.\n   */\n  getTimelineTimes() {\n    var methodName = this.options.allEnabledStepsOnly ?\n      'getAllEnabledTimes' :\n      this.options.enabledStepsOnly ? 'getEnabledTimes' : 'getTimes';\n    return this.options.timeline[methodName]();\n  }\n  \n  /**\n   * Converts a Date-object to a string.\n   * \n   * @protected\n   * @param {Date} time - Time.\n   * @param {string} format - Format string, passed to the .\n   * @returns {string} String.\n   */\n  timeToText(time, format) {\n    if (isNaN(time))\n      return this.options.textInvalid;\n    if (this.options.getTimeText !== undefined)\n      return this.options.getTimeText.call(this, time, format);\n    return time.toISOString();\n  }\n  \n  /**\n   * Attach an event listener on an object. Object could be a jQuery-object or\n   * an object using {@link module:meteoJS/events}.\n   * \n   * @protected\n   * @param {Object} obj - Object to put the event listener on.\n   * @param {mixed} listener - Event listener key.\n   * @param {Function} func - Function to be executed when event is triggered.\n   * @param {Object} [thisArg] - This in the function func when event triggered.\n   */\n  attachEventListener(obj, listener, func, thisArg) {\n    this.listeners.push([obj, listener]);\n    obj.on(listener, func, thisArg);\n  }\n  \n  /**\n   * Detaches all event listeners.\n   * \n   * @private\n   */\n  detachEventListeners() {\n    this.listeners.forEach(function (listenerArr) {\n      if ('un' in listenerArr[0])\n        listenerArr[0].un(listenerArr[1]);\n      else if ('off' in listenerArr[0])\n        listenerArr[0].off(listenerArr[1]);\n    });\n    this.listeners = [];\n  }\n  \n}\naddEventFunctions(Visualisation.prototype);\nexport default Visualisation;\n\n/**\n * moment.js object.\n * \n * @external momentjs\n * @see {@link https://momentjs.com}\n */\n\n/**\n * Format a Date-object via the {@link https://momentjs.com|Moment.js} library.\n * \n * <pre><code>import { makeTimeTextCallbackFunction } from 'meteojs/timeline/Visualisation';</code></pre>\n * \n * @param {external:momentjs} moment - Moment.js object.\n * @returns {module:meteoJS/timeline/visualisation~timeTextCallbackFunction}\n *   Callback.\n */\nexport function makeTimeTextCallbackFunction(moment) {\n  return function (time, format) {\n    const m = moment.utc(time);\n    if (this.options.outputTimezone !== undefined)\n      (this.options.outputTimezone == 'local')\n        ? m.local()\n        : m.tz(this.options.outputTimezone);\n    return m.format(format);\n  };\n}","/**\n * @module meteoJS/timeline/visualisation/text\n */\nimport Visualisation from '../Visualisation.js';\n\n/**\n * Options for constructor.\n * \n * @typedef {module:meteoJS/timeline/visualisation/slider~options}\n *  module:meteoJS/timeline/visualisation/text~options\n * @param {string|undefined} format\n *   Format string, used for 'getTimeText'.\n */\n\n/**\n * Show current selected time of a timeline as text.\n * \n * <pre><code>import Text from 'meteojs/timeline/visualisation/Text';</code></pre>\n * \n * @extends module:meteoJS/timeline/visualisation.Visualisation\n */\nexport class Text extends Visualisation {\n  \n  /**\n   * @param {module:meteoJS/timeline/visualisation/text~options} options - Options.\n   */\n  constructor({\n    format = undefined,\n    ...rest\n  } = {}) {\n    super(rest);\n    \n    this.options.format = format;\n    this.setNode(this.options.node);\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  onChangeTime() {\n    this.options.node.text(\n      this.timeToText(this.options.timeline.getSelectedTime(),\n        this.options.format));\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  emptyNode() {\n    this.options.node.text('');\n  }\n  \n}\nexport default Text;","/**\n * @module meteoJS/timeline/visualisation/slider\n */\nimport $ from 'jquery';\nimport Visualisation from '../Visualisation.js';\n\n/**\n * Options for constructor.\n * \n * @typedef {module:meteoJS/timeline/visualisation~options}\n     module:meteoJS/timeline/visualisation/slider~options\n */\n\n/**\n * Show timeline as a slider.\n * \n * <pre><code>import Slider from 'meteojs/timeline/visualisation/Slider';</code></pre>\n * \n * @extends module:meteoJS/timeline/visualisation.Visualisation\n */\nexport class Slider extends Visualisation {\n  \n  /**\n   * @param {module:meteoJS/timeline/visualisation/slider~options} options\n   *   Options.\n   */\n  constructor(options) {\n    super(options);\n    \n    /**\n     * @member {Date[]}\n     * @private\n     */\n    this.times = [];\n    /**\n     * @member {Object}\n     * @private\n     */\n    this.timesIndexes = {};\n    \n    this.setNode(this.options.node);\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  onChangeTime() {\n    var t = this.options.timeline.getSelectedTime();\n    if (t.valueOf() in this.timesIndexes)\n      this.options.node.val(this.timesIndexes[t.valueOf()]+1);\n    else\n      this.options.node.val(1);\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  onChangeTimes() {\n    this.times = this.getTimelineTimes();\n    this.timesIndexes = {};\n    this.times.forEach(function (time, i) {\n      this.timesIndexes[time.valueOf()] = i;\n    }, this);\n    this.options.node.prop('max', this.times.length);\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  onInitNode(isListenersDefined) {\n    this.options.node.prop('min', 1);\n    this.options.node.prop('step', 1);\n    if (!isListenersDefined) {\n      var that = this;\n      this.attachEventListener(this.options.node, 'change input', function () {\n        var i = +$(this).val();\n        if (0 < i &&\n            i <= that.times.length)\n          that.options.timeline.setSelectedTime(that.times[i-1]);\n        that.trigger('input');\n      });\n    }\n  }\n  \n}\nexport default Slider;","/**\n * @module meteoJS/timeline/visualisation/bsButtons\n */\nimport $ from 'jquery';\nimport Visualisation from '../Visualisation.js';\n\n/**\n * Dynamic format string to output the time for each Time-Button.\n * \n * @typedef {Function} module:meteoJS/timeline/visualisation/bsButtons~timeFormatFunction\n * @param {Date} time - Timestamp of the Button.\n * @returns {String} A string to format the time for the Time-Buttons.\n */\n\n/**\n * Options for constructor.\n * \n * @typedef {module:meteoJS/timeline/visualisation~options}\n *   module:meteoJS/timeline/visualisation/bsButtons~options\n * @property {String|module:meteoJS/timeline/visualisation/bsButtons~timeFormatFunction} [format='HH']\n *   Format-String for the time of the Time-Buttons.\n */\n\n/**\n * Show timeline as a group of buttons.\n * \n * <pre><code>import bsButtons from 'meteojs/timeline/visualisation/bsButtons';</code></pre>\n * \n * @extends module:meteoJS/timeline/visualisation.Visualisation\n */\nexport class bsButtons extends Visualisation {\n  \n  /**\n   * @param {module:meteoJS/timeline/visualisation/bsButtons~options} options - Options.\n   */\n  constructor({\n    format = 'HH',\n    grouping = 'daily',\n    groupingFormat = 'ddd, DD. MMM',\n    classMain = 'btn-toolbar',\n    classButtonGroup = 'btn-group',\n    classButtonGroupMargin = 'me-2',\n    classLabel = undefined,\n    classLabelSpan = 'd-block w-100',\n    classButton = 'btn',\n    classButtonActive = 'active',\n    classButtonNotEnabled = 'btn-light',\n    classButtonEnabled = 'btn-secondary',\n    classButtonAllEnabled = 'btn-primary',\n    /*prependNodes = undefined,\n      appendNodes = undefined*/\n    ...rest\n  } = {}) {\n    super(rest);\n    \n    this.options.format = format;\n    this.options.grouping = grouping;\n    this.options.groupingFormat = groupingFormat;\n    this.options.classMain = classMain;\n    this.options.classButtonGroup = classButtonGroup;\n    this.options.classButtonGroupMargin = classButtonGroupMargin;\n    this.options.classLabel = classLabel;\n    this.options.classLabelSpan = classLabelSpan;\n    this.options.classButton = classButton;\n    this.options.classButtonActive = classButtonActive;\n    this.options.classButtonNotEnabled = classButtonNotEnabled;\n    this.options.classButtonEnabled = classButtonEnabled;\n    this.options.classButtonAllEnabled = classButtonAllEnabled;\n    \n    /**\n     * @member {external:jQuery|undefined}\n     * @private\n     */\n    this.toolbarNode = undefined;\n    \n    this.setNode(this.options.node);\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  onChangeTime() {\n    if (this.toolbarNode === undefined)\n      return;\n    \n    var time = this.options.timeline.getSelectedTime();\n    var that = this;\n    this.toolbarNode.find('button').each(function () {\n      var t = new Date(+$(this).data('time'));\n      $(this)\n        .removeClass(that.options.classButtonActive);\n      /*.removeClass(that.options.classButtonAllEnabled)\n        .removeClass(that.options.classButtonEnabled)\n        .removeClass(that.options.classButtonNotEnabled);*/\n      if (time.valueOf() == t.valueOf())\n        $(this).addClass(that.options.classButtonActive);\n      /*else if (that.options.timeline.isTimeAllEnabled(t))\n        $(this).addClass(that.options.classButtonAllEnabled);\n      else if (that.options.timeline.isTimeEnabled(t))\n        $(this).addClass(that.options.classButtonEnabled);\n      else\n        $(this).addClass(that.options.classButtonNotEnabled);*/\n    });\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  onChangeTimes() {\n    if (this.toolbarNode === undefined)\n      this.toolbarNode = $('<div>');\n    this.toolbarNode.empty();\n    \n    var groupingFormat =\n      (this.options.grouping == 'daily') ? 'YYYY-MM-DD' :\n        (this.options.grouping == 'hourly') ? 'YYYY-MM-DD HH' :\n          this.options.grouping;\n    var lastNode = undefined;\n    this.getTimelineTimes().forEach(function (time) {\n      if (lastNode === undefined ||\n          lastNode.data('date') != this.timeToText(time, groupingFormat)) {\n        var btnGroup = $('<div>')\n          .addClass(this.options.classButtonGroup)\n          .addClass(this.options.classButtonGroupMargin)\n          .attr('role', 'group')\n          .attr('aria-label', this.timeToText(time, groupingFormat));\n        if (this.options.groupingFormat === undefined) {\n          lastNode = btnGroup;\n        }\n        else {\n          var span = $('<span>')\n            .addClass(this.options.classLabelSpan)\n            .text(this.timeToText(time, this.options.groupingFormat));\n          lastNode = $('<label>')\n            .addClass(this.options.classLabel)\n            .append(span);\n          btnGroup.attr('aria-label', span.text());\n          lastNode.append(btnGroup);\n        }\n        lastNode.data('date', this.timeToText(time, groupingFormat));\n        this.toolbarNode.append(lastNode);\n      }\n      \n      var btn = $('<button>')\n        .addClass(this.options.classButton)\n        .attr('type', 'button')\n        .data('time', time.valueOf());\n      if (typeof this.options.format == 'function')\n        btn.text(this.timeToText(time, this.options.format.call(this, time)));\n      else\n        btn.text(this.timeToText(time, this.options.format));\n      if (this.options.timeline.isTimeAllEnabled(time))\n        btn.addClass(this.options.classButtonAllEnabled);\n      else if (this.options.timeline.isTimeEnabled(time))\n        btn.addClass(this.options.classButtonEnabled);\n      else\n        btn.addClass(this.options.classButtonNotEnabled);\n      let selectedTime = this.options.timeline.getSelectedTime();\n      if (time.valueOf() == selectedTime.valueOf())\n        btn.addClass(this.options.classButtonActive);\n      var that = this;\n      btn.click(function () {\n        that.options.timeline.setSelectedTime(new Date(+$(this).data('time')));\n        that.trigger('input');\n      });\n      if (lastNode.hasClass(this.options.classButtonGroup))\n        lastNode.append(btn);\n      else\n        lastNode.children('div').append(btn);\n    }, this);\n    this.toolbarNode.find('div.'+this.options.classButtonGroup).last().removeClass(this.options.classButtonGroupMargin);\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  emptyNode() {\n    this.toolbarNode = undefined;\n    this.options.node.empty();\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  onInitNode() {\n    this.toolbarNode = $('<div>')\n      .addClass(this.options.classMain)\n      .attr('role', 'toolbar')\n      .attr('aria-label', 'Timeline toolbar');\n    this.options.node.append(this.toolbarNode);\n  }\n  \n}\nexport default bsButtons;","/**\n * @module meteoJS/timeline/visualisation/bsDropdown\n */\nimport $ from 'jquery';\nimport Visualisation from '../Visualisation.js';\nimport Text from './Text.js';\n\n/**\n * Options for constructor.\n * \n * @typedef {module:meteoJS/timeline/visualisation~options}\n *   module:meteoJS/timeline/visualisation/bsDropdown~options\n * @param {string|undefined} format\n *   Format string for dropdown items, used for 'getTimeText'.\n * @param {string|undefined} buttonFormat\n *   Format string for dropdown button, used for 'getTimeText'.\n * @param {string} grouping\n *   'daily', 'hourly' or a format string. Defines if items will be grouped and\n *   be title depending on groupingDivider and groupingFormat.\n * @param {boolean} groupingDivider Show dropdown divider above an item group.\n * @param {undefined|string} groupingFormat\n *   Format string for a dropdown header above an item group.\n * @param {undefined|string} classMain Class for the main node.\n * @param {undefined|string} classDropdownMenu Class for the dropdown node.\n * @param {undefined|string} classDropdownItem Class for a dropdown item.\n * @param {undefined|string} classItemActive Class for an active item.\n * @param {undefined|string} classItemNotEnabled Class for a not enabled item.\n * @param {undefined|string} classItemEnabled Class for an enabled item.\n * @param {undefined|string} classItemAllEnabled Class for an all enabled item.\n * @param {undefined|string} classDropdownHeader Class for dropdown header.\n * @param {undefined|string} classDropdownDivider Class for dropdown divider.\n * @param {undefined|string} classDropdownButton Class for the dropdown button.\n * @param {undefined|string} classButtonNotEnabled\n *   Class for the dropdown button if the selected time is not enabled.\n * @param {undefined|string} classButtonEnabled\n *   Class for the dropdown button if the selected time is enabled.\n * @param {undefined|string} classButtonAllEnabled\n *   Class for the dropdown button if the selected time is all enabled.\n */\n\n/**\n * Show timeline in a dropdown menu. The menu will be build according to\n * bootstrap.\n * \n * <pre><code>import bsDropdown from 'meteojs/timeline/visualisation/bsDropdown';</code></pre>\n * \n * @extends module:meteoJS/timeline/visualisation.Visualisation\n */\nexport class bsDropdown extends Visualisation {\n  \n  /**\n   * @param {module:meteoJS/timeline/visualisation/bsDropdown~options} options - Options.\n   */\n  constructor({\n    format = 'HH:mm',\n    buttonFormat = 'DD. MMMM YYYY HH:mm',\n    grouping = 'daily',\n    groupingDivider = true,\n    groupingFormat = 'ddd, DD. MMMM YYYY',\n    classMain = 'dropdown',\n    classDropdownMenu = 'dropdown-menu',\n    classDropdownItem = 'dropdown-item',\n    classItemActive = 'active',\n    classItemNotEnabled = 'disabled',\n    classItemEnabled = undefined,\n    classItemAllEnabled = undefined,\n    classDropdownHeader = 'dropdown-header',\n    classDropdownDivider = 'dropdown-divider',\n    classDropdownButton = 'btn dropdown-toggle',\n    classButtonNotEnabled = undefined,\n    classButtonEnabled = undefined,\n    classButtonAllEnabled = undefined,\n    ...rest\n  } = {}) {\n    super(rest);\n    \n    this.options.format = format;\n    this.options.buttonFormat = buttonFormat;\n    this.options.grouping = grouping;\n    this.options.groupingDivider = groupingDivider;\n    this.options.groupingFormat = groupingFormat;\n    this.options.classMain = classMain;\n    this.options.classDropdownMenu = classDropdownMenu;\n    this.options.classDropdownItem = classDropdownItem;\n    this.options.classItemActive = classItemActive;\n    this.options.classItemNotEnabled = classItemNotEnabled;\n    this.options.classItemEnabled = classItemEnabled;\n    this.options.classItemAllEnabled = classItemAllEnabled;\n    this.options.classDropdownHeader = classDropdownHeader;\n    this.options.classDropdownDivider = classDropdownDivider;\n    this.options.classDropdownButton = classDropdownButton;\n    this.options.classButtonNotEnabled = classButtonNotEnabled;\n    this.options.classButtonEnabled = classButtonEnabled;\n    this.options.classButtonAllEnabled = classButtonAllEnabled;\n    \n    /**\n     * @member {module:meteoJS/timeline/visualisation/text.Text}\n     * @private\n     */\n    this.visualisationButtonText = new Text({\n      timeline: this.options.timeline,\n      format: this.options.buttonFormat,\n      textInvalid: this.options.textInvalid,\n      outputTimezone: this.options.outputTimezone,\n      getTimeText: this.options.getTimeText\n    });\n    /**\n     * @member {external:jQuery|undefined}\n     * @private\n     */\n    this.dropdownNode = undefined;\n    \n    this.setNode(this.options.node);\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  setOutputTimezone(outputTimezone) {\n    super.setOutputTimezone(outputTimezone);\n    this.visualisationButtonText.setOutputTimezone(outputTimezone);\n    return this;\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  onChangeTime() {\n    if (this.dropdownNode === undefined)\n      return;\n    \n    var time = this.options.timeline.getSelectedTime();\n    this.options.node.children('li').children('button')\n      .removeClass(this.options.classButtonActive)\n      .removeClass(this.options.classButtonNotEnabled)\n      .removeClass(this.options.classButtonEnabled)\n      .removeClass(this.options.classButtonAllEnabled);\n    if (this.options.timeline.isTimeAllEnabled(time))\n      this.options.node.children('button')\n        .addClass(this.options.classButtonAllEnabled);\n    else if (this.options.timeline.isTimeEnabled(time))\n      this.options.node.children('button')\n        .addClass(this.options.classButtonEnabled);\n    else\n      this.options.node.children('button')\n        .addClass(this.options.classButtonNotEnabled);\n    var that = this;\n    this.dropdownNode\n      .children('li')\n      .children('button.'+this.options.classDropdownItem)\n      .each(function () {\n        var t = new Date(+$(this).data('time'));\n        $(this)\n          .removeClass(that.options.classItemActive)\n          .removeClass(that.options.classItemNotEnabled)\n          .removeClass(that.options.classItemEnabled)\n          .removeClass(that.options.classItemAllEnabled);\n        if (time.valueOf() == t.valueOf())\n          $(this).addClass(that.options.classItemActive);\n        else if (that.options.timeline.isTimeAllEnabled(t))\n          $(this).addClass(that.options.classItemAllEnabled);\n        else if (that.options.timeline.isTimeEnabled(t))\n          $(this).addClass(that.options.classItemEnabled);\n        else\n          $(this).addClass(that.options.classItemNotEnabled);\n      });\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  onChangeTimes() {\n    if (this.dropdownNode === undefined)\n      this.dropdownNode = $('<div>');\n    this.dropdownNode.empty();\n    \n    var groupingFormat =\n            (this.options.grouping == 'daily') ? 'YYYY-MM-DD' :\n              (this.options.grouping == 'hourly') ? 'YYYY-MM-DD HH' :\n                this.options.grouping;\n    var lastGroupTimeStr = undefined;\n    this.getTimelineTimes().forEach(function (time) {\n      if (lastGroupTimeStr === undefined ||\n                    lastGroupTimeStr != this.timeToText(time, groupingFormat)) {\n        if (lastGroupTimeStr !== undefined && // No divider at the beginning\n                        this.options.groupingDivider)\n          this.dropdownNode\n            .append($('<div>')\n              .addClass(this.options.classDropdownDivider));\n        if (this.options.groupingFormat !== undefined)\n          this.dropdownNode\n            .append($('<h6>')\n              .addClass(this.options.classDropdownHeader)\n              .text(this.timeToText(time, this.options.groupingFormat)));\n        lastGroupTimeStr = this.timeToText(time, groupingFormat);\n      }\n      var btn = $('<button>')\n        .addClass(this.options.classDropdownItem)\n        .attr('type', 'button')\n        .text(this.timeToText(time, this.options.format))\n        .data('time', time.valueOf());\n      var that = this;\n      btn.click(function () {\n        that.options.timeline.setSelectedTime(new Date(+$(this).data('time')));\n        that.trigger('input');\n      });\n      this.dropdownNode.append($('<li>').append(btn));\n    }, this);\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  emptyNode() {\n    if (this.visualisationButtonText !== undefined)\n      this.visualisationButtonText.setNode(undefined);\n    this.dropdownNode = undefined;\n    this.options.node.empty();\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  onInitNode() {\n    var id = 'dropdownMenuButton';\n    var i=0;\n    while (document.getElementById(id) != null) {\n      id = 'dropdownMenuButton'+(++i);\n    }\n    \n    var button = $('<button>')\n      .addClass(this.options.classDropdownButton)\n      .attr('type', 'button')\n      .attr('id', id)\n      .attr('data-bs-toggle', 'dropdown')\n      .attr('aria-haspopup', true)\n      .attr('aria-expanded', false);\n    this.visualisationButtonText.setNode(button);\n    this.dropdownNode = $('<ul>')\n      .addClass(this.options.classDropdownMenu)\n      .attr('aria-labelledby', id);\n    this.options.node\n      .addClass(this.options.classMain)\n      .append(button)\n      .append(this.dropdownNode);\n  }\n  \n}\nexport default bsDropdown;","/**\n * @module meteoJS/synview/map\n */\nimport $ from 'jquery';\nimport addEventFunctions from '../Events.js';\n\n/** \n * Event object.\n * \n * @typedef {Object} module:meteoJS/synview/map~extendedEvent\n * @param {module:meteoJS/synview/type.Type} type Type belonging to the event.\n * @param {Object} layer Layer belonging to the event.\n * @param {Object} feature Vector feature, if present.\n * @param {Mixed[]} color Color of pixel (rgba), if present.\n */\n\n/**\n * Options for meteoJS/synview/map.\n * \n * @typedef {Object} module:meteoJS/synview/map~options\n * @param {mixed} map Map object.\n * @param {mixed} layerGroup Layer group within synview will operate.\n */\n\n/**\n * Triggered on view changes.\n * \n * @event module:meteoJS/synview/map#change:view\n */\n\n/**\n * Triggered on pointer moves over map.\n * \n * @event module:meteoJS/synview/map#move:pointer\n */\n\n/**\n * Triggered on pointer clicks into the map, with no dragging. A double click\n * will fire two events.\n * \n * @event module:meteoJS/synview/map#click:pointer\n */\n\n/**\n * Triggered on pointer clicks into the map, with no dragging and no double\n * click.\n * \n * @event module:meteoJS/synview/map#singleclick:pointer\n */\n\n/**\n * Triggered on pointer double clicks into the map, with no dragging.\n * \n * @event module:meteoJS/synview/map#dblclick:pointer\n */\n\n/**\n * Triggered on pointer dragging.\n * \n * @event module:meteoJS/synview/map#drag:pointer\n */\n\n/**\n * Abstract class to defined interface to the mapping library.\n * \n * @abstract\n * @fires module:meteoJS/synview/map#change:view\n */\nexport class SynviewMap {\n  \n  /**\n   * @param {module:meteoJS/synview/map~options} options Options.\n   */\n  constructor(options) {\n    /**\n     * @member {meteoJS/synview/map~options}\n     * @private\n     */\n    this.options = $.extend(true, {\n      map: undefined,\n      layerGroup: undefined\n    }, options);\n  }\n  \n  /**\n   * Returns map object.\n   * \n   * @return {mixed} Map object.\n   */\n  getMap() {\n    return this.options.map;\n  }\n  \n  /**\n   * Helper function. Returns the view center in WGS84 coordinates, lat/lon.\n   * \n   * @abstract\n   * @return {number[]|undefined} Center.\n   */\n  getViewCenter() {}\n  \n  /**\n   * Helper function. Sets the view center in WGS84 coordinates, lat/lon.\n   * \n   * @abstract\n   * @param {number[]|undefined} center Center.\n   * @return {module:meteoJS/synview/map.SynviewMap} This.\n   */\n  setViewCenter() {\n    return this;\n  }\n  \n  /**\n   * Helper function. Returns the view zoom level.\n   * \n   * @abstract\n   * @return {number|undefined} Zoom level.\n   */\n  getViewZoom() {}\n  \n  /**\n   * Helper function. Sets the view zoom level.\n   * \n   * @abstract\n   * @param {number|undefined} zoom Zoom level.\n   * @return {module:meteoJS/synview/map.SynviewMap} This.\n   */\n  setViewZoom() {\n    return this;\n  }\n  \n  /**\n   * Returns a new layer group, already added to the map.\n   * \n   * @abstract\n   * @return {mixed} New layer group.\n   */\n  makeLayerGroup() {}\n  \n  /**\n   * Returns an event object, that is extended by several keys.\n   * Synview internal method.\n   * \n   * @abstract\n   * @param {object} event Map event object.\n   * @param {module:meteoJS/synview/typeCollection.TypeCollection} collection Type collection.\n   * @return {module:meteoJS/synview/map~extendedEvent} Event object.\n   */\n  getExtendedEventByTypeCollection(event) {\n    event.synviewType = undefined;\n    event.layer = undefined;\n    event.feature = undefined;\n    event.color = undefined;\n    return event;\n  }\n  \n  /**\n   * Returns index of the passed layer inside the layer group of the passed type.\n   * Synview internal method.\n   * \n   * @abstract\n   * @param {object} layer Layer object.\n   * @param {module:meteoJS/synview/type.Type} type Type.\n   * @return {integer} Index.\n   */\n  findLayerInType() {\n    return -1;\n  }\n  \n}\naddEventFunctions(SynviewMap.prototype);\nexport default SynviewMap;","/**\n * @module meteoJS/synview/collection\n */\nimport addEventFunctions from '../Events.js';\n\n/**\n * Triggered on adding item to collection.\n * \n * @event module:meteoJS/synview/collection#add:item\n * @param {object} Added item.\n */\n\n/**\n * Triggered on replacing item with already existing ID.\n * \n * @event module:meteoJS/synview/collection#replace:item\n * @param {object} Added item.\n * @param {object} Replaced and removed item.\n */\n\n/**\n * Triggered on removing item from collection.\n * \n * @event module:meteoJS/synview/collection#remove:item\n * @param {object} Removed item.\n */\n\n/**\n * Collection of items.\n * Items have at least a getId() method, which returns a unique ID.\n */\nexport class Collection {\n  \n  constructor() {\n    /**\n     * List of IDs of the items.\n     * @member {mixed}\n     * @private\n     */\n    this.itemIds = [];\n    \n    /**\n     * List of items, ID as key of the object.\n     * @member {Object}\n     * @private\n     */\n    this.items = {};\n  }\n  \n  /**\n   * Returns count of items in this collection.\n   * \n   * @return {integer} Count.\n   */\n  getCount() {\n    return this.itemIds.length;\n  }\n  \n  /**\n   * Returns items (in order as appended).\n   * \n   * @return {Object[]} Items.\n   */\n  getItems() {\n    return this.itemIds.map(function (id) { return this.items[id]; }, this);\n  }\n  \n  /**\n   * Returns a list of IDs (in order as appended).\n   * \n   * @return {mixed[]} List of IDs.\n   */\n  getItemIds() {\n    return this.itemIds;\n  }\n  \n  /**\n   * Returns item by ID, undefined if ID doesn't exist.\n   * \n   * @param {mixed} id ID.\n   * @return {Object|undefined} Item.\n   */\n  getItemById(id) {\n    return (id in this.items) ? this.items[id] : undefined;\n  }\n  \n  /**\n   * Returns if an ID exists in this collection.\n   * \n   * @param {mixed} id ID.\n   * @return {boolean} If exists.\n   */\n  containsId(id) {\n    return this.getIndexById(id) !== -1;\n  }\n  \n  /**\n   * Returns index of the item in this collecition, -1 if not existant.\n   * \n   * @param {mixed} id ID.\n   * @return {integer} Index.\n   */\n  getIndexById(id) {\n    var result = -1;\n    this.itemIds.forEach(function (itemId, i) {\n      if (itemId == id)\n        result = i;\n    });\n    return result;\n  }\n  \n  /**\n   * Append an item to the collection.\n   * \n   * @param {object} item New item.\n   * @return {module:meteoJS/synview/collection.Collection} This.\n   * @fires module:meteoJS/synview/collection#add:item\n   * @fires module:meteoJS/synview/collection#replace:item\n   */\n  append(item) {\n    var id = item.getId();\n    if (this.containsId(id)) {\n      this.trigger('replace:item', item, this.getItemById(id));\n      this.items[id] = item;\n    }\n    else {\n      this.itemIds.push(id);\n      this.items[id] = item;\n      this.trigger('add:item', item);\n    }\n    return this;\n  }\n  \n  /**\n   * Removes an item from the collection.\n   * \n   * @param {mixed} id ID of the item to delete.\n   * @return {module:meteoJS/synview/collection.Collection} This.\n   * @fires module:meteoJS/synview/collection#remove:item\n   */\n  remove(id) {\n    var item = this.getItemById(id);\n    if (item !== undefined) {\n      var index = this.getIndexById(id);\n      delete this.items[id];\n      this.itemIds.splice(index, 1);\n      this.trigger('remove:item', item);\n    }\n    return this;\n  }\n  \n}\naddEventFunctions(Collection.prototype);\nexport default Collection;","const __WEBPACK_NAMESPACE_OBJECT__ = ol.layer.Group;","const __WEBPACK_NAMESPACE_OBJECT__ = ol.layer.Vector;","const __WEBPACK_NAMESPACE_OBJECT__ = ol.Observable;","/**\n * @module meteoJS/synview/resource\n */\nimport VectorLayer from 'ol/layer/Vector';\nimport { unByKey } from 'ol/Observable';\nimport addEventFunctions from '../Events.js';\n\n/**\n * Options for the constructor.\n * \n * @typedef {Object} module:meteoJS/synview/resource~options\n * @param {undefined|String} url - URL to resource.\n * @param {undefined|Date} datetime\n *   Datetime for this resource, undefined if resource have no datetime.\n * @param {undefined|String} mimetype - MIME-Type of the resource.\n * @param {undefined|Integer} reloadTime\n *   After this time period the resource will be reloaded. Undefined for no\n *   reload. (in seconds)\n * @param {undefined|String} className - Type's classname.\n * @param {undefined|boolean} [imageSmoothingEnabled=undefined]\n *   Disable image smoothing to draw sharp edges in image layers.\n *   Undefined uses the default (true).\n * @param {Object} ol - Options for openlayers.\n * @param {Object|external:ol/source/Source~Source|undefined} ol.source\n *   Options for openlayers source object or OL source object already.\n * @param {Object.<string,Function>|undefined} ol.events \n *   Function to listen to module:ol/render/Event~RenderEvent.\n * @param {undefined|external:ol/style/Style~Style|external:ol/style/Style~Style|external:ol/style/Style~StyleFunction} [ol.style]\n *   Style for features. If this is a module:ol/style/Style~StyleFunction,\n *   then \"this\" will be bound to this module:meteoJS/synview/resource~Resource.\n */\n\n/**\n * Object representing a resource.\n */\nexport class Resource {\n  \n  /**\n   * @param {module:meteoJS/synview/resource~options} options - Options.\n   */\n  constructor({\n    url = undefined,\n    datetime = undefined,\n    mimetype = undefined,\n    reloadTime = undefined,\n    className = undefined,\n    imageSmoothingEnabled = undefined,\n    ol = {}\n  } = {}) {\n    /**\n     * @type {Object}\n     * @private\n     */\n    this.options = {\n      url,\n      datetime,\n      mimetype,\n      reloadTime,\n      className,\n      ol\n    };\n    this._normalizeOLOptions(this.options.ol);\n    \n    /**\n     * @type {external:ol.layer.Layer|undefined}\n     * @private\n     */\n    this.layer = undefined;\n    \n    /**\n     * @type {ol.layer.Group|L.layerGroup|undefined}\n     * @private\n     */\n    this.layerGroup = undefined;\n    \n    /**\n     * @type {number|undefined}\n     * @private\n     */\n    this.reloadTimerId = undefined;\n    \n    /**\n     * @type {boolean}\n     * @private\n     */\n    this.visible = false;\n    \n    /**\n     * @type {number|undefined}\n     * @private\n     */\n    this.zIndex = undefined;\n    \n    /**\n     * @type {number}\n     * @private\n     */\n    this.opacity = 1.0;\n    \n    /**\n     * @type {boolean}\n     * @private\n     */\n    this._imageSmoothing = imageSmoothingEnabled;\n  }\n  \n  /**\n   * Returns an ID for this resource. Should change, if content of resource\n   * changes.\n   * \n   * @return {mixed} Id.\n   */\n  getId() {\n    return this.getUrl();\n  }\n  \n  /**\n   * Returns URL to the resource. Undefined if unknown.\n   * \n   * @return {string|undefined} URL.\n   */\n  getUrl() {\n    return this.options.url;\n  }\n  \n  /**\n   * Returns the datetime of the resource.\n   * \n   * @return {Date|undefined} Date.\n   */\n  getDatetime() {\n    return this.options.datetime;\n  }\n  \n  /**\n   * Returns MIME-Type of the resource.\n   * \n   * @return {string} MIME-Type.\n   */\n  getMIMEType() {\n    return (this.options.mimetype === undefined) ?\n      'application/octet-stream' : this.options.mimetype;\n  }\n  \n  /**\n   * Returns the current reload time.\n   * \n   * @return {undefined|integer} Reload time period.\n   */\n  getReloadTime() {\n    return this.options.reloadTime;\n  }\n  \n  /**\n   * Sets the reload time.\n   * \n   * @param {undefined|integer} reloadTime Reload time period.\n   * @return {module:meteoJS/synview/resource.Resource} This.\n   */\n  setReloadTime(reloadTime) {\n    this.options.reloadTime = reloadTime;\n    this._reload(); // starts or stops frequent reload\n    return this;\n  }\n  \n  /**\n   * Returns the visibility of the resource layer.\n   * \n   * @return {boolean} Visible.\n   */\n  getVisible() {\n    return this.visible;\n  }\n  \n  /**\n   * Sets the visibility of the resource layer.\n   * \n   * @param {boolean} visible Visible.\n   * @return {module:meteoJS/synview/resource.Resource} This.\n   */\n  setVisible(visible) {\n    this.visible = visible;\n    if (this.layer !== undefined) {\n      // OpenLayers\n      if ('setVisible' in this.layer)\n        this.layer.setVisible(visible);\n      // Leaflet\n      else {\n        if (this.visible)\n          this.layer.addTo(this.layerGroup);\n        else\n          this.layerGroup.removeLayer(this.layer);\n      }\n    }\n    return this;\n  }\n  \n  /**\n   * Returns the z-Index of the resource layer.\n   * \n   * @return {number|undefined} z-Index.\n   */\n  getZIndex() {\n    return this.zIndex;\n  }\n  \n  /**\n   * Sets the z-Index of the resource layer.\n   * \n   * @param {number|undefined} zIndex z-Index.\n   * @return {module:meteoJS/synview/resource.Resource} This.\n   */\n  setZIndex(zIndex) {\n    this.zIndex = zIndex;\n    if (this.layer !== undefined)\n      this.layer.setZIndex(zIndex);\n    return this;\n  }\n  \n  /**\n   * Returns opacity of the resource layer.\n   * \n   * @return {number} Opacity.\n   */\n  getOpacity() {\n    return this.opacity;\n  }\n  \n  /**\n   * Sets opacity of the resource layer.\n   * \n   * @param {number} opacity Opacity.\n   * @return {module:meteoJS/synview/resource.Resource} This.\n   */\n  setOpacity(opacity) {\n    this.opacity = opacity;\n    if (this.layer !== undefined)\n      this.layer.setOpacity(opacity);\n    return this;\n  }\n  \n  /**\n   * Classname.\n   * \n   * @type undefined|String\n   */\n  get className() {\n    return this.options.className;\n  }\n  set className(className) {\n    this.options.className = className;\n  }\n  \n  /**\n   * imageSmoothingEnabled.\n   * \n   * @type undefined|boolean\n   */\n  get imageSmoothingEnabled() {\n    return this._imageSmoothing;\n  }\n  set imageSmoothingEnabled(imageSmoothing) {\n    this._imageSmoothing = imageSmoothing;\n  }\n  \n  /**\n   * Returns the layer group of the resource layer.\n   * \n   * @return {external:ol.layer.group|external:L.layerGroup|undefined} Layer group.\n   */\n  getLayerGroup() {\n    return this.layerGroup;\n  }\n  \n  /**\n   * Sets the layer group and adds the resource layer to this group.\n   * If undefined is passed, the resource layer will be deleted and removed for\n   * any layer group.\n   * \n   * @param {external:ol.layer.group|external:L.layerGroup|undefined} layerGroup Layer group.\n   * @return {module:meteoJS/synview/resource.Resource} This.\n   */\n  setLayerGroup(layerGroup) {\n    if (this.layerGroup !== undefined &&\n        this.layer !== undefined) {\n      // OpenLayers\n      if ('remove' in this.layerGroup.getLayers())\n        this.layerGroup.getLayers().remove(this.layer);\n      // Leaflet\n      else\n        this.layerGroup.removeLayer(this.layer);\n    }\n    if (layerGroup === undefined)\n      this.layer = undefined;\n    this.layerGroup = layerGroup;\n    if (this.layerGroup !== undefined) {\n      // Leaflet\n      if ('addLayer' in this.layerGroup) {\n        var layer = this.getLLLayer();\n        if (this.getVisible())\n          this.layerGroup.addLayer(layer);\n      }\n      // OpenLayers\n      else\n        this.layerGroup.getLayers().push(this.getOLLayer());\n    }\n    this.setReloadTime(this.getReloadTime()); // Trigger reload interval\n    return this;\n  }\n  \n  /**\n   * Returns layer for openlayers of this resource.\n   * \n   * @return {external:ol.layer.Layer} openlayers layer.\n   */\n  getOLLayer() {\n    if (this.layer !== undefined)\n      return this.layer;\n    this.layer = this._makeOLLayer();\n    return this.layer;\n  }\n  \n  /**\n   * Returns openlayers layer of this resource. Must be overwritten by child\n   * classes.\n   * \n   * @protected\n   * @return {external:ol.layer.Layer} openlayers layer.\n   */\n  makeOLLayer() {\n    // Dies on instantiation of ol.layer.Layer, so use ol.layer.Vector\n    return new VectorLayer({\n      className: this.className\n    });\n  }\n  \n  /**\n   * Returns a ready to use OpenLayers layer.\n   * \n   * @private\n   * @return {external:ol.layer.Layer} openlayers layer.\n   */\n  _makeOLLayer() {\n    let layer = this.makeOLLayer();\n    layer.setVisible(this.visible);\n    layer.setZIndex(this.zIndex);\n    layer.setOpacity(this.opacity);\n    if ('events' in this.options.ol &&\n        this.options.ol.events !== undefined)\n      ['prerender', 'postrender'].forEach(eventName => {\n        if (eventName in this.options.ol.events &&\n            this.options.ol.events[eventName] !== undefined)\n          layer.on(eventName, event => {\n            this.options.ol.events[eventName].call(this, event, layer);\n          });\n      });\n    \n    if (!this._imageSmoothing) {\n      const source = layer.getSource();\n      if (source !== null &&\n          'contextOptions_' in source)\n        source.contextOptions_ = {\n          imageSmoothingEnabled: false,\n          msImageSmoothingEnabled: false\n        };\n    }\n    \n    return layer;\n  }\n  \n  /**\n   * Returns layer for Leaflet of this resource.\n   * \n   * @return {external:L.layer} Leaflet layer.\n   */\n  getLLLayer() {\n    if (this.layer !== undefined)\n      return this.layer;\n    this.layer = this._makeLLLayer();\n    return this.layer;\n  }\n  \n  /**\n   * Returns Leaflet layer of this resource. Must be overwritten by child\n   * classes.\n   * \n   * @protected\n   * @return {external:L.Layer} Leaflet layer.\n   */\n  makeLLLayer() {\n    // Dies on instantiation of ol.layer.Layer, so use ol.layer.Vector\n    return L.Layer();\n  }\n  \n  /**\n   * Preload resource. By default, openlayers loads the resource as soon as\n   * the resource gets visible.\n   */\n  preload() {}\n  \n  /**\n   * Returns a ready to use Leaflet layer.\n   * \n   * @private\n   * @return {external:L.Layer} Leaflet layer.\n   */\n  _makeLLLayer() {\n    return this.makeLLLayer();\n  }\n  \n  /**\n   * Reload source.\n   * \n   * @private\n   * @return {module:meteoJS/synview/resource.Resource} This.\n   */\n  _reload() {\n    // Stop possible earlier reload\n    if (this.reloadTimerId !== undefined) {\n      clearTimeout(this.reloadTimerId);\n      this.reloadTimerId = undefined;\n    }\n    // No frequent reload\n    if (this.options.reloadTime === undefined)\n      return;\n    // Reload could only be handled, if layerGroup is defined\n    if (this.layerGroup === undefined)\n      return;\n    var reloadFunction = (function () {\n      this.reloadTimerId = undefined;\n      if (this.layerGroup === undefined)\n        return;\n      var layer = this._makeOLLayer();\n      // Hackish reload of sources, it is not handled properly by OpenLayers.\n      // 1. Non-tile sources, they have a 'getUrl' method.\n      if ('getUrl' in layer.getSource()) {\n        var layerGroup = this.layerGroup;\n        // event triggered, even if source is cached.\n        var key = layer.getSource().on('change', (function () {\n          if (layer.getSource().getState() == 'ready' ||\n              layer.getSource().getState() == 'error') {\n            // Execute code once, once the data is loaded.\n            unByKey(key);\n            if (layer.getSource().getState() == 'ready' &&\n                this.layerGroup !== undefined) {\n              layer.setVisible(this.layer.getVisible());\n              layer.setOpacity(this.layer.getOpacity());\n              layer.setZIndex(this.layer.getZIndex());\n              this.layerGroup.getLayers().remove(this.layer);\n              this.layer = layer;\n            }\n            else if (this.layerGroup !== undefined)\n              this.layerGroup.getLayers().remove(layer);\n            else\n              layerGroup.getLayers().remove(layer);\n            if (this.reloadTimerId === undefined &&\n                this.options.reloadTime !== undefined &&\n                this.layerGroup !== undefined)\n              this.reloadTimerId =\n                setTimeout(reloadFunction, this.options.reloadTime * 1000);\n          }\n        }).bind(this));\n        this.layerGroup.getLayers().push(layer);\n        layer.setVisible(true); // Force load of data by make the layer visible.\n      }\n      else {\n        /* Tile sources in OpenLayers doesn't support a request to check, if all\n         * tiles are loaded, because cached tiles doesn't generate any event.\n         * Uncached tiles fire tileloadstart/end/error events.\n         * So we wait a second and exchange then the old with the new layer. If\n         * the reload of the data is smaller of one second, this suppresses that\n         * neither the old layer nor the new data is visible. */\n        this.layerGroup.getLayers().push(layer);\n        layer.setVisible(true);\n        setTimeout((function () {\n          this.layer = layer;\n          if (this.reloadTimerId === undefined &&\n              this.options.reloadTime !== undefined)\n            this.reloadTimerId =\n              setTimeout(reloadFunction, this.options.reloadTime * 1000);\n        }).bind(this), 1000);\n      }\n    }).bind(this);\n    this.reloadTimerId =\n      setTimeout(reloadFunction, this.options.reloadTime * 1000);\n    return this;\n  }\n  \n  /**\n   * Normalizes this.options.ol.\n   * \n   * @private\n   * @param {Object|external:ol/source/Source~Source|undefined} source\n   * @param {Object.<string,Function>|undefined} events\n   * @param {external:ol/style/Style~Style|external:ol/style/Style~StyleLike|external:ol/style/Style~StyleFunction|undefined} [style]\n   */\n  _normalizeOLOptions({\n    source = {},\n    events = undefined,\n    style = undefined\n  }) {\n    this.options.ol = {\n      source,\n      events,\n      style\n    };\n  }\n  \n}\naddEventFunctions(Resource.prototype);\nexport default Resource;","/**\n * @module meteoJS/synview/resourceCollection\n */\nimport Collection from './Collection.js';\nimport Resource from './Resource.js';\n\n/**\n * Collection of resource objects.\n * Extends meteoJS.synview.collection with storage of time objects.\n * This collection contains either a list of resources assigned with time or\n * one resource with no time (or both). With the methods from\n * meteoJS.synview.collection all resources (with or without time) will be\n * retrieved. Id of the resource without time is '' (empty string).\n * \n * @extends module:meteoJS/synview/collection.Collection\n */\nexport class ResourceCollection extends Collection {\n  \n  constructor() {\n    super();\n    \n    /**\n     * List of the datetime objects of the resources (sorted upwardly).\n     * @member {Date[]}\n     * @private\n     */\n    this.times = [];\n  }\n  \n  /**\n   * Returns all resources assigned with time (ordered temporal upwardly).\n   * \n   * @return {module:meteoJS/synview/resource.Resource[]} Resources.\n   */\n  getResources() {\n    return this.times.map(function (time) {\n      return this.items[time.valueOf()];\n    }, this);\n  }\n  \n  /**\n   * Returns times (ordered temporal upwardly).\n   * \n   * @return {Date[]} Times (no invalid times).\n   */\n  getTimes() {\n    return this.times;\n  }\n  \n  /**\n   * @override\n   * @param {mixed} id ID.\n   * @return {module:meteoJS/synview/resource.Resource} Resource.\n   */\n  getItemById(id) {\n    var res = super.getItemById(id);\n    return (res === undefined) ? new Resource() : res;\n  }\n  \n  /**\n   * Returns resource valid at passed datetime (could be an invalid datetime).\n   * If resource doesn't exist, an empty object is returned.\n   * \n   * @param {Date} time Datetime.\n   * @return {module:meteoJS/synview/resource.Resource} Resource.\n   */\n  getResourceByTime(time) {\n    return this.getItemById(isNaN(time) ? '' : time.valueOf());\n  }\n  \n  /**\n   * Returns if a resource with passed time exists. Time could be invalid.\n   * \n   * @param {Date} Time.\n   * @return {boolean} If exists.\n   */\n  containsTime(time) {\n    return this.getIndexById(isNaN(time) ? '' : time.valueOf()) > -1;\n  }\n  \n  /**\n   * Returns index of the time inside the times array. Time could be invalid.\n   * -1 if not existant.\n   * \n   * @param {Date} time Time.\n   * @return {integer} Index.\n   */\n  getIndexByTime(time) {\n    var result = -1;\n    if (!isNaN(time))\n      this.times.forEach(function (t, i) {\n        if (t.valueOf() == time.valueOf())\n          result = i;\n      });\n    return result;\n  }\n  \n  /**\n   * Returns if a resource with ID exists in this collection.\n   * \n   * @return {module:meteoJS/synview/resource.Resource}\n   */\n  getNewestResource() {\n    if (this.times.length < 1)\n      return new Resource();\n    return this.getResourceByTime(this.times[this.times.length-1]);\n  }\n  \n  /**\n   * Append a resource to the collection.\n   * \n   * @override\n   * @param {module:meteoJS/synview/resource.Resource} resource Resource.\n   * @return {module:meteoJS/synview/resourceCollection.ResourceCollection} This.\n   */\n  append(resource) {\n    this._append(resource);\n    this._sortTimes();\n    return this;\n  }\n  \n  /**\n   * Removes a resource from the collection.\n   * \n   * @override\n   * @param {Date} time Resource's time.\n   * @return {module:meteoJS/synview/resourceCollection.ResourceCollection} This.\n   */\n  remove(time) {\n    this._remove(isNaN(time) ? '' : time.valueOf());\n    this._sortTimes();\n    return this;\n  }\n  \n  /**\n   * Exchanges the collection content with a list of resource.\n   * \n   * @param {module:meteoJS/synview/resource.Resource[]} resources Resources.\n   * @fires module:meteoJS/synview/collection#add:item\n   * @fires module:meteoJS/synview/collection#replace:item\n   * @fires module:meteoJS/synview/collection#remove:item\n   * @return {module:meteoJS/synview/resourceCollection.ResourceCollection} This.\n   */\n  setResources(resources) {\n    resources.forEach(function (resource) {\n      this._append(resource);\n    }, this);\n    this._filterTimesByResources(resources);\n    this._sortTimes();\n    return this;\n  }\n  \n  /**\n   * Append a resource to the collection without reordering times-array.\n   * \n   * @private\n   * @param {module:meteoJS/synview/resource.Resource} resource Resource.\n   */\n  _append(resource) {\n    var time = resource.getDatetime();\n    var id = (time === undefined) ? '' : time.valueOf();\n    if (this.containsId(id)) {\n      this.trigger('replace:item', resource, this.getItemById(id));\n      this.items[id] = resource;\n    }\n    else {\n      this.itemIds.push(id);\n      this.items[id] = resource;\n      if (time !== undefined && !isNaN(time))\n        this.times.push(time);\n      this.trigger('add:item', resource);\n    }\n  }\n  \n  /**\n   * Removes a resource fromt the collection without reordering times-array.\n   * \n   * @private\n   * @param {mixed} id Resource ID.\n   */\n  _remove(id) {\n    var index = this.getIndexById(id);\n    if (index > -1) {\n      var resource = this.items[id];\n      delete this.items[id];\n      this.itemIds.splice(index, 1);\n      if (id !== undefined && id !== '' && !isNaN(id)) {\n        var tIndex = this.times.findIndex(function (t) {\n          return t.valueOf() == id;\n        });\n        if (tIndex > -1)\n          this.times.splice(tIndex, 1);\n      }\n      this.trigger('remove:item', resource);\n    }\n  }\n  \n  /**\n   * Removes all resources whose times doesn't exist in the collection.\n   * \n   * @private\n   * @param {module:meteoJS/synview/resource.Resource[]}\n   */\n  _filterTimesByResources(resources) {\n    var containsStaticResource = false;\n    this.times = this.times.filter(function (t) {\n      var filter = false;\n      var i = resources.findIndex(function (resource) {\n        var match = false;\n        var time = resource.getDatetime();\n        if (time !== undefined &&\n            t.valueOf() == time.valueOf()) {\n          match = true;\n        }\n        else if (time === undefined)\n          containsStaticResource = true;\n        return match;\n      }, this);\n      if (i < 0) {\n        this.remove(t.valueOf());\n        filter = true;\n      }\n      return !filter;\n    }, this);\n    if (containsStaticResource)\n      this.remove('');\n  }\n  \n  /**\n   * Sortiert den Zeit-Array this.times der Reihe nach.\n   * @private\n   */\n  _sortTimes() {\n    this.times.sort(function (a, b) {\n      return a.valueOf()-b.valueOf();\n    });\n  }\n  \n}\nexport default ResourceCollection;","/**\n * @module meteoJS/synview/type\n */\nimport LayerGroup from 'ol/layer/Group';\nimport addEventFunctions from '../Events.js';\nimport ResourceCollection from './ResourceCollection.js';\nimport Resource from './Resource.js';\n\n/**\n * Preload options.\n * \n * @typedef {Object} module:meteoJS/synview/type~preloadOptions\n * @property {boolean} [enabled=false] - Enable preload of the resources.\n */\n\n/**\n * Options for the constructor.\n * \n * @typedef {Object} module:meteoJS/synview/type~options\n * @param {string|undefined} id ID.\n * @param {boolean} [visible] Visibility.\n * @param {undefined|number} [zIndex] zIndex on map.\n * @param {'nearest'|'floor'} [displayMethod]\n *   Method to determine the displayed resource.\n * @param {number} [displayMaxResourceAge]\n *   Maximum time space between display and resource time (in seconds).\n * @param {number} [displayFadeStart]\n *   Fade resource from this age to the display time (in seconds).\n * @param {number} [displayFadeStartOpacity]\n *   Opacity (between 0 and 1) at displayFadingTime.\n * @param {undefined|String} className - Classname.\n * @param {undefined|boolean} [imageSmoothingEnabled=undefined]\n *   Value of\n *   {@link https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/imageSmoothingEnabled|imageSmoothingEnabled}\n *   when drawing the layers of this type to canvas.\n *   Undefined uses the default (true). When a\n *   {@link module:meteoJS/synview/resource.Resource}\n *   has explicitly set an own value \n *   ({@link module:meteoJS/synview/resource.Resource#imageSmoothingEnabled}),\n *   this will be ignored.\n * @param {module:meteoJS/synview/tooltip~contentFunction|undefined} [tooltip]\n *   Tooltip function. If color detection will be used with this type, you must\n *   set an unique className.\n * @param {module:meteoJS/synview/type~preloadOptions} [preload]\n *   Preload options.\n */\n\n/**\n * Triggered on change of visibilty.\n * \n * @event module:meteoJS/synview/type#change:visible\n */\n\n/**\n * Triggered, if the set of timestamps changes (due to resource changes).\n * \n * @event module:meteoJS/synview/type#change:resources\n */\n\n/**\n * @classdesc Type to display by synview, like a serie of radar images.\n * \n * @fires module:meteoJS/synview/type#change:visible\n */\nexport class Type {\n  \n  /**\n   * @param {module:meteoJS/synview/type~options} options Options.\n   */\n  constructor({\n    id = undefined,\n    visible = true,\n    zIndex = undefined,\n    displayMethod = 'floor',\n    displayMaxResourceAge = 3*3600,\n    displayFadeStart = 15*60,\n    displayFadeStartOpacity = 0.95,\n    resources = undefined,\n    className = undefined,\n    imageSmoothingEnabled = undefined,\n    tooltip = undefined,\n    preload = {}\n  } = {}) {\n    /**\n     * @type Object\n     * @private\n     */\n    this.options = {\n      id,\n      visible,\n      zIndex,\n      displayMethod,\n      displayMaxResourceAge,\n      displayFadeStart,\n      displayFadeStartOpacity,\n      resources,\n      className,\n      imageSmoothingEnabled,\n      tooltip\n    };\n    \n    /**\n     * The mapping group to display all the resources. (openlayers specific)\n     * @member {undefined|external:ol/layer/Group~LayerGroup}\n     * @default\n     * @private\n     */\n    this.layerGroup = undefined;\n    \n    /**\n     * Collection of resources.\n     * @member {module:meteoJS/synview/resourceCollection.ResourceCollection}\n     * @private\n     */\n    this.collection = new ResourceCollection();\n    \n    /**\n     * Time of displayed resource.\n     * @member {Date}\n     * @private\n     */\n    this.displayedResourceTime = new Date('invalid');\n    \n    // Collection initialisieren\n    this.collection.on('add:item', function (resource) {\n      resource.className = this.className;\n      this._addOLLayer(resource);\n      if (this._preload.enabled)\n        resource.preload();\n    }, this);\n    this.collection.on('remove:item', function (resource) {\n      this._removeOLLayer(resource);\n    }, this);\n    this.collection.on('replace:item', function (newResource, oldResource) {\n      if (newResource !== oldResource) {\n        newResource.className = this.className;\n        this._replaceOLLayer(newResource, oldResource);\n        if (this._preload.enabled)\n          newResource.preload();\n      }\n    }, this);\n    \n    /**\n     * Preload options.\n     * @type module:meteoJS/synview/type~preloadOptions\n     * @private\n     */\n    this._preload = preload;\n    \n    if (this.options.resources !== undefined)\n      this.collection.setResources(this.options.resources);\n    delete this.options.resources;\n  }\n  \n  /**\n   * Returns ID of type.\n   * \n   * @return {string|undefined}\n   */\n  getId() {\n    return this.options.id;\n  }\n  \n  /**\n   * Sets ID of type.\n   * \n   * @param {string|undefined} id ID.\n   * @return {module:meteoJS/synview/type.Type} This.\n   */\n  setId(id) {\n    this.options.id = id;\n    return this;\n  }\n  \n  /**\n   * Returns visibility.\n   * \n   * @return {boolean} Visibility.\n   */\n  getVisible() {\n    return this.options.visible;\n  }\n  \n  /**\n   * Sets visibility.\n   * \n   * @param {boolean} visible Visibility.\n   * @return {module:meteoJS/synview/type.Type} This.\n   * @fires module:meteoJS/synview/type#change:visible\n   */\n  setVisible(visible) {\n    // Nur etwas unternehmen, falls Visible ändert\n    if (this.options.visible ? !visible : visible) {\n      this.options.visible = visible ? true : false;\n      if (this.layerGroup !== undefined)\n        this.layerGroup.setVisible(this.options.visible);\n      this.getResourceCollection().getItems().forEach(function (resource) {\n        if (isNaN(resource.getDatetime()))\n          resource.setVisible(this.options.visible);\n        resource.setLayerGroup(this.options.visible ? this.layerGroup : undefined);\n      }, this);\n      this.trigger('change:visible');\n    }\n    return this;\n  }\n  \n  /**\n   * Returns the z Index.\n   * \n   * @return {undefined|number}\n   */\n  getZIndex() {\n    return this.options.zIndex;\n  }\n  \n  /**\n   * Sets the z Index.\n   * \n   * @param {undefined|number} zIndex z-Index.\n   * @return {module:meteoJS/synview/type.Type} This.\n   */\n  setZIndex(zIndex) {\n    this.options.zIndex = zIndex;\n    if (this.layerGroup !== undefined)\n      this.layerGroup.setZIndex(zIndex);\n    this.getResourceCollection().getItems().forEach(function (resource) {\n      resource.setZIndex(zIndex);\n    });\n    return this;\n  }\n  \n  /**\n   * Classname.\n   * \n   * @type undefined|String\n   */\n  get className() {\n    return this.options.className;\n  }\n  set className(className) {\n    this.options.className = className;\n  }\n  \n  /**\n   * Returns layer-group of this type on the map.\n   * \n   * return {external:ol/layer/Group~LayerGroup} Layer-group.\n   */\n  getLayerGroup() {\n    return (this.layerGroup === undefined) ? new LayerGroup() : this.layerGroup;\n  }\n  \n  /**\n   * Sets map layer-group for this type.\n   * \n   * @param {external:ol/layer/Group~LayerGroup} group layer-group.\n   * @return {module:meteoJS/synview/type.Type} This.\n   */\n  setLayerGroup(group) {\n    this.layerGroup = group;\n    if (this.layerGroup !== undefined) {\n      if ('setVisible' in this.layerGroup) // Leaflet doesn't know visibility\n        this.layerGroup.setVisible(this.options.visible);\n      this.layerGroup.setZIndex(this.options.zIndex);\n    }\n    this.getResourceCollection().getItems().forEach(function (resource) {\n      resource.setLayerGroup(this.options.visible ? group : undefined);\n    }, this);\n    return this;\n  }\n  \n  /**\n   * Returns collection of the resources.\n   * Note: If you directly append resources to the collection, no\n   * {@link module:meteoJS/synview/type#change:resources} event will be fired.\n   * \n   * @return {module:meteoJS/synview/resourceCollection.ResourceCollection} resourceCollection.\n   */\n  getResourceCollection() {\n    return this.collection;\n  }\n  \n  /**\n   * Append a resource to the collection.\n   * If type is visible, this might also change the resources on the map.\n   * \n   * @param {module:meteoJS/synview/resource.Resource} resource Resource object.\n   * @return {module:meteoJS/synview/type.Type} This.\n   * @fires module:meteoJS/synview/type#change:resources\n   */\n  appendResource(resource) {\n    this.collection.append(resource);\n    \n    // show current layer again\n    this.setDisplayTime(this.displayedResourceTime);\n    \n    /* Trigger event after setDisplayTime, therewith the synview object can\n     * set the desired time in the timeline object. */\n    this.trigger('change:resources');\n    return this;\n  }\n  \n  /**\n   * Removes a resource from the collection.\n   * If type is visible, this might also change the resources on the map.\n   * \n   * @param {module:meteoJS/synview/resource.Resource} resource Resource object.\n   * @return {module:meteoJS/synview/type.Type} This.\n   * @fires module:meteoJS/synview/type#change:resources\n   */\n  removeResource(resource) {\n    // hide current layer\n    this._hideVisibleResource();\n    \n    this.collection.remove(resource.getDatetime());\n    \n    // show current layer again\n    this.setDisplayTime(this.displayedResourceTime);\n    \n    /* Trigger event after setDisplayTime, therewith the synview object can\n     * set the desired time in the timeline object. */\n    this.trigger('change:resources');\n    return this;\n  }\n  \n  /**\n   * Sets resources in the collection (and replaces previous ones).\n   * If type is visible, this might also change the resources on the map.\n   * \n   * @param {module:meteoJS/synview/resource.Resource[]} resources List of resource objects.\n   * @return {module:meteoJS/synview/type.Type} This.\n   * @fires module:meteoJS/synview/type#change:resources\n   */\n  setResources(resources) {\n    // hide current layer\n    this._hideVisibleResource();\n    \n    this.collection.setResources(resources);\n    \n    // show current layer again\n    this.setDisplayTime(this.displayedResourceTime);\n    \n    /* Trigger event after setDisplayTime, therewith the synview object can\n     * set the desired time in the timeline object. */\n    this.trigger('change:resources');\n    return this;\n  }\n  \n  /**\n   * Returns resource of the displayed resource. If type contains resources\n   * with timestamps as well as a static resource, only a resource with timestamp\n   * will be returned. If type is invisible or no layer group is set, no resource\n   * is display, therefore an empty resource will be returned.\n   * \n   * @return {module:meteoJS/synview/resource.Resource} Resource.\n   */\n  getDisplayedResource() {\n    if (this.getVisible() &&\n        this.layerGroup !== undefined) {\n      if (isNaN(this.displayedResourceTime))\n        return (this.collection.getTimes().length > 0) ?\n          new Resource() :\n          this.collection.getResourceByTime(this.displayedResourceTime);\n      else\n        return this.collection.getResourceByTime(this.displayedResourceTime);\n    }\n    else\n      return new Resource();\n  }\n  \n  /**\n   * Sets time to display. Corresponding to the options an adequate resource will\n   * be searched and displayed. (accessible via getDisplayedResource())\n   * \n   * @param {Date} time Display time.\n   * @return {module:meteoJS/synview/type.Type} This.\n   */\n  setDisplayTime(time) {\n    if (!this.getVisible())\n      return this;\n    var time_to_show = this._getResourceTimeByDisplayTime(time);\n    if (time_to_show === undefined ||\n        time_to_show !== undefined &&\n        !isNaN(this.displayedResourceTime) &&\n        this.displayedResourceTime.valueOf() != time_to_show.valueOf())\n      this._hideVisibleResource();\n    if (time_to_show !== undefined) {\n      this.displayedResourceTime = time_to_show;\n      var resource = this.getResourceCollection().getItemById(time_to_show.valueOf());\n      if (resource.getId()) {\n        resource.setVisible(true);\n        var opacity = 1.0;\n        if (Math.abs(time.valueOf() - time_to_show.valueOf()) > this.options.displayMaxResourceAge*1000) // 3h\n          opacity = 0.0;\n        else if (Math.abs(time.valueOf() - time_to_show.valueOf()) > this.options.displayFadeStart*1000) // 15min\n          opacity = this.options.displayFadeStartOpacity *\n            (Math.abs(time.valueOf() - time_to_show.valueOf()) -\n             this.options.displayMaxResourceAge * 1000) /\n            (1000 *\n             (this.options.displayFadeStart - this.options.displayMaxResourceAge));\n        resource.setOpacity(opacity);\n      }\n    }\n    else\n      this.displayedResourceTime = new Date('invalid');\n    return this;\n  }\n  \n  /**\n   * Returns the current tooltip function, undefined for no tooltip.\n   * \n   * @return {module:meteoJS/synview/tooltip~contentFunction|undefined} Tooltip function.\n   */\n  getTooltip() {\n    return this.options.tooltip;\n  }\n  \n  /**\n   * Sets the tooltip function. Undefined for no tooltip.\n   * \n   * @param {module:meteoJS/synview/tooltip~contentFunction|undefined} tooltip Tooltip function.\n   * @return {module:meteoJS/synview/type.Type} This.\n   */\n  setTooltip(tooltip) {\n    this.options.tooltip = tooltip;\n    return this;\n  }\n  \n  /**\n   * Sets style of all resources (if resource has 'setOLStyle' method).\n   * If argument 'style' isn't declared, the style will be updated.\n   * Convenience method, you could also loop over all resources.\n   * \n   * @param {externalol/style/Style~Style} [style] OpenLayers style.\n   * @returns {module:meteoJS/synview/type.Type} This.\n   */\n  setResourcesOLStyle() {\n    var styleArguments = arguments;\n    this.getResourceCollection().getItems().forEach(function (resource) {\n      if ('setOLStyle' in resource)\n        resource.setOLStyle.apply(resource, styleArguments);\n    });\n    return this;\n  }\n  \n  /**\n   * Blendet aktuell dargestellten OL-Layer aus.\n   * @private\n   */\n  _hideVisibleResource() {\n    if (!isNaN(this.displayedResourceTime))\n      this.getResourceCollection()\n        .getItemById(this.displayedResourceTime.valueOf())\n        .setVisible(false);\n  }\n  \n  /**\n   * Füge dem layers-Objekt einen neuen OL-Layer hinzu\n   * @private\n   * @param {module:meteoJS/synview/resource.Resource} resource Entsprechende Resource zum Hinzufügen\n   */\n  _addOLLayer(resource) {\n    // Show static resources if visible\n    if (isNaN(resource.getDatetime()))\n      resource.setVisible(this.getVisible());\n    if (this.options.imageSmoothingEnabled !== undefined &&\n        resource.imageSmoothingEnabled === undefined)\n      resource.imageSmoothingEnabled = this.options.imageSmoothingEnabled;\n    resource.setLayerGroup(this.getLayerGroup());\n    resource.setZIndex(this.options.zIndex);\n  }\n  \n  /**\n   * Löscht aus layers-Objekt einen OL-Layer\n   * @private\n   * @param {module:meteoJS/synview/resource.Resource} resource Entsprechende Resource zum Hinzufügen\n   */\n  _removeOLLayer(resource) {\n    resource.setLayerGroup(undefined);\n  }\n  \n  /**\n   * Ersetzt im layers-Objekt einen OL-Layer\n   * @private\n   * @param {module:meteoJS/synview/resource.Resource} newResource Resource zum Hinzufügen\n   * @param {module:meteoJS/synview/resource.Resource} oldResource Resource zum Ersetzen\n   */\n  _replaceOLLayer(newResource, oldResource) {\n    this._removeOLLayer(oldResource);\n    this._addOLLayer(newResource);\n  }\n  \n  /**\n   * Gibt eine Zeit mit vorhandener Resource zu einer darzustellenden Zeit zurück.\n   * Es gibt dazu verschiedene Optionen (this.options.displayMethod):\n   * 'nearest': Wähle die zeitlich nächstgelegene Resource aus\n   * 'floor':   Wähle die Resource direkt zum Zeitpunkt oder zeitlich direkt vor\n   *            dem Termin.\n   * @private\n   * @return {undefined|Date} Resource time or undefined if not existing.\n   */\n  _getResourceTimeByDisplayTime(time) {\n    if (isNaN(time))\n      return undefined;\n    var resultTime = undefined;\n    this.collection.getTimes().forEach(function (resourceTime) {\n      /*if (resultTime === undefined)\n        resultTime = resourceTime;\n      else {*/\n      switch (this.options.displayMethod) {\n      case 'exact':\n        if (time.valueOf() == resourceTime.valueOf())\n          resultTime = resourceTime;\n        break;\n      case 'nearest':\n        if (resultTime === undefined ||\n                Math.abs(time.valueOf() - resourceTime.valueOf()) <\n                  Math.abs(time.valueOf() - resultTime.valueOf()))\n          resultTime = resourceTime;\n        break;\n      case 'floor':\n      default:\n        if (resultTime === undefined ||\n                resourceTime.valueOf() <= time.valueOf() &&\n                (time.valueOf() - resourceTime.valueOf() <\n                 time.valueOf() - resultTime.valueOf()))\n          resultTime = resourceTime;\n      }\n      //}\n    }, this);\n    return resultTime;\n  }\n  \n}\naddEventFunctions(Type.prototype);\nexport default Type;","/**\n * @module meteoJS/synview/typeCollection\n */\nimport $ from 'jquery';\nimport Collection from './Collection.js';\nimport Type from './Type.js';\n\n/**\n * Options for constructor.\n * \n * @typedef {Object} module:meteoJS/synview/typeCollection~options\n * @param {boolean} [exclusiveVisibility]\n *   At the same time, only one single type is visible.\n * @param {boolean} [syncVisibility]\n *   If the visibility of a type changes, all other types are also adjusted.\n *   If exclusiveVisibility is set to true, this will be ignored.\n */\n\n/**\n * Collection of type-objects.\n * Could ensure, that only a single type of this collection is visible.\n * \n * @extends module:meteoJS/synview/collection.Collection\n * @fires module:meteoJS/synview/typeCollection#change:typeVisible\n */\nexport class TypeCollection extends Collection {\n  \n  /**\n   * @param {module:meteoJS/synview/typeCollection~options} options - Options.\n   */\n  constructor(options) {\n    super();\n    \n    /**\n     * Options.\n     * @member {module:meteoJS/synview/typeCollection~options}\n     * @private\n     */\n    this.options = $.extend(true, {\n      exclusiveVisibility: false,\n      syncVisibility: false\n    }, options);\n  }\n  \n  /**\n   * Returns type with the passed ID or empty type if not existant.\n   * \n   * @override\n   * @param {mixed} id ID.\n   * @return {module:meteoJS/synview/type.Type} Type.\n   */\n  getItemById(id) {\n    var item = super.getItemById(id);\n    return (item === undefined) ? new Type() : this.items[id];\n  }\n  \n  /**\n   * Append type to this collection. If type with same ID is present, the type\n   * will be exchanged.\n   * \n   * @override\n   * @param {module:meteoJS/synview/type.Type} type Type.\n   * @return {module:meteoJS/synview/typeCollection.TypeCollection} This.\n   */\n  append(type) {\n    var that = this;\n    if (this.options.exclusiveVisibility &&\n        type.getVisible() &&\n        this.isVisible()) {\n      type.setVisible(false);\n    }\n    else if (that.options.syncVisibility) {\n      if (type.getVisible()) {\n        if (!this.isVisible())\n          this.getItems().forEach(function (t) {\n            t.setVisible(true);\n          }, this);\n      }\n      else {\n        if (this.isVisible())\n          type.setVisible(true);\n      }\n    }\n    type.on('change:visible', function () {\n      if (that.options.exclusiveVisibility) {\n        if (this.getVisible())\n          that.getItems().forEach(function (t) {\n            if (t.getId() != this.getId())\n              t.setVisible(false);\n          }, this);\n      }\n      else if (that.options.syncVisibility) {\n        that.getItems().forEach(function (t) {\n          if (t.getId() != this.getId())\n            t.setVisible(this.getVisible());\n        }, this);\n      }\n    });\n    return super.append(type);\n  }\n  \n  /**\n   * Returns the types of this collection with getVisible() == true.\n   * \n   * @return {module:meteoJS/synview/type.Type[]} Types.\n   */\n  getVisibleTypes() {\n    return this.getItems().filter(function (type) { return type.getVisible(); });\n  }\n  \n  /**\n   * Returns, if at least one type is visible.\n   * \n   * @return {boolean}\n   */\n  isVisible() {\n    return this.getVisibleTypes().length > 0;\n  }\n  \n  /**\n   * Sets the option exclusiveVisibility.\n   * If several types are visible and this will be set to true, then the first\n   * type in the getItems() iterator will stay visible.\n   * \n   * @return {module:meteoJS/synview/typeCollection.TypeCollection} This.\n   */\n  setExclusiveVisibility(exclusiveVisibility) {\n    if (this.options.exclusiveVisibility != exclusiveVisibility &&\n        exclusiveVisibility) {\n      var isVisibleType = false;\n      this.getItems().forEach(function (t) {\n        if (!isVisibleType)\n          isVisibleType = t.getVisible();\n        else\n          t.setVisible(false);\n      }, this);\n    }\n    this.options.exclusiveVisibility = exclusiveVisibility;\n    return this;\n  }\n  \n  /**\n   * Sets the option syncVisibility.\n   * If any type is visible and this will be set to true, then every type will\n   * be set visible.\n   * \n   * @return {module:meteoJS/synview/typeCollection.TypeCollection} This.\n   */\n  setSyncVisibility(syncVisibility) {\n    if (this.options.syncVisibility != syncVisibility &&\n        syncVisibility &&\n        this.isVisible()) {\n      this.getItems().forEach(function (t) {\n        t.setVisible(true);\n      }, this);\n    }\n    this.options.syncVisibility = syncVisibility;\n    return this;\n  }\n  \n}\nexport default TypeCollection;","/**\n * @module meteoJS/synview/tooltip\n */\nimport $ from 'jquery';\n\n/**\n * Function called that should return content for the tooltip. Undefined for\n * no tooltip.\n * \n * @typedef {Object} module:meteoJS/synview/tooltip~contentFunction\n * @param\n * @return {string|external:jQuery|undefined} Tooltip content.\n\n  sollte auch irgendwie die Resource-Objekt übernehmen...\n */\n\n/**\n * Options for constructor.\n * \n * @typedef {Object} module:meteoJS/synview/tooltip~options\n * @param {module:meteoJS/synview/map.SynviewMap} map - Map object.\n * @param {module:meteoJS/synview/typeCollection.TypeCollection} typeCollection\n *   Collection with all types.\n * @param {module:meteoJS/tooltip.Tooltip} tooltip - Tooltip object.\n */\n\n/**\n * Object to show a tooltip. Is instantiated by the main synview\n *   object.\n */\nexport class Tooltip {\n  \n  /**\n   * @param {module:meteoJS/synview/tooltip~options} [options] - Options.\n   */\n  constructor({\n    map,\n    typeCollection,\n    tooltip\n  }) {\n    \n    /**\n     * @type Object|undefined\n     * @private\n     */\n    this.tooltipFeature = undefined;\n    \n    /**\n     * @type mixed[]|undefined\n     * @private\n     */\n    this.tooltipPixelColor = undefined;\n    \n    /**\n     * @type module:meteoJS/synview/map.SynviewMap\n     * @private\n     */\n    this.map = map;\n    \n    /**\n     * @type module:meteoJS/synview/typeCollection.TypeCollection\n     * @private\n     */\n    this.typeCollection = typeCollection;\n    \n    /**\n     * @type module:meteoJS/tooltip.Tooltip\n     * @private\n     */\n    this.tooltip = tooltip;\n    \n    // Initialize tooltipNode\n    if (Object.getOwnPropertyDescriptor(\n      Object.getPrototypeOf(this.tooltip),\n      'tooltipNode'\n    ) &&\n        this.tooltip.tooltipNode === undefined)\n      this.tooltip.tooltipNode =\n        $('<div>')\n          .css('position', 'absolute')\n          .prependTo(this.map.getMap().getTargetElement());\n    \n    // On hide tooltip\n    this.tooltip.on('hide:tooltip', () => {\n      this.tooltipFeature = undefined;\n      this.tooltipPixelColor = undefined;\n    });\n    \n    // Mouse moves on map\n    this.map.on('move:pointer', e => {\n      if (e.dragging)\n        return;\n      e = this.map.getExtendedEventByTypeCollection(e, this.typeCollection);\n      if (e.feature ||\n          e.color) {\n        if (e.feature === this.tooltipFeature &&\n            (e.color === undefined &&\n             this.tooltipPixelColor === undefined ||\n             e.color !== undefined &&\n             this.tooltipPixelColor !== undefined &&\n             e.color.join(',') === this.tooltipPixelColor.join(','))) {\n          this.tooltip.show({\n            posX: e.pixel[0],\n            posY: e.pixel[1]\n          });\n          return;\n        }\n        \n        this.tooltipFeature = undefined;\n        this.tooltipPixelColor = undefined;\n        let tooltipContent = e.synviewType.getTooltip().call(undefined, e);\n        // Show tooltip only if there is content\n        if (tooltipContent !== undefined) {\n          this.tooltipFeature = e.feature;\n          this.tooltipPixelColor = e.color;\n          this.tooltip.content = tooltipContent;\n          this.tooltip\n            .hide()\n            .show({\n              posX: e.pixel[0],\n              posY: e.pixel[1]\n            });\n        }\n        else\n          this.tooltip.hide();\n      }\n      else\n        this.tooltip.hide();\n    });\n  }\n  \n}\nexport default Tooltip;","/**\n * @module meteoJS/synview\n */\n\nimport $ from 'jquery';\nimport SynviewMap from './synview/SynviewMap.js';\nimport Timeline from './Timeline.js';\nimport TypeCollection from './synview/TypeCollection.js';\nimport Tooltip from './synview/Tooltip.js';\n\n/**\n * Options for constructor.\n * \n * @typedef {Object} module:meteoJS/synview~options\n * @param {module:meteoJS/synview/map.SynviewMap|undefined} [map]\n *   Synview map object.\n * @param {module:meteoJS/timeline.Timeline|undefined} [timeline]\n *   Timeline object.\n * @param {module:meteoJS/tooltip.Tooltip} [tooltip] - Tooltip object.\n */\n\n/**\n * Mapping object to show map data for different timestamps. Create one object\n * per map.\n */\nexport default class Synview {\n  \n  /**\n   * @param {module:meteoJS/synview~options} options - Options.\n   */\n  constructor(options) {\n    /**\n     * @type {module:meteoJS/synview~options}\n     * @private\n     */\n    this.options = $.extend(true, {\n      map: undefined,\n      timeline: undefined,\n      tooltip: undefined\n    }, options);\n    // Normalize options\n    if (this.options.map === undefined)\n      this.options.map = new SynviewMap();\n    if (this.options.timeline === undefined)\n      this.options.timeline = new Timeline();\n    \n    /**\n     * Collection of synview types.\n     * @member {module:meteoJS/synview/typecollection.TypeCollection}\n     */\n    this.typeCollection = new TypeCollection();\n    /** @type meteoJS/synview/tooltip~Tooltip|undefined */\n    this.tooltip = undefined;\n    \n    // Timeline initialisieren\n    this.options.timeline.on('change:time', function () {\n      this.getTypeCollection().getItems().map(function (type) {\n        type.setDisplayTime(this.options.timeline.getSelectedTime());\n      }, this);\n    }, this);\n    \n    // typeCollection initialisieren\n    var timeline = this.options.timeline;\n    var updateTimes = function () {\n      var isLastTime = timeline.isLastEnabledTime();\n      // Zeitpunkte einlesen\n      if (this.getVisible())\n        timeline.setTimesBySetID(this.getId(), this.getResourceCollection().getTimes());\n      else\n        timeline.setTimesBySetID(this.getId(), []);\n      // Switch to last timestamp, if it was the last one already before.\n      if (isLastTime)\n        timeline.last();\n      else if (isNaN(timeline.getSelectedTime()))\n        timeline.first();\n    };\n    var appendType = function (type) {\n      type.setLayerGroup(this.options.map.makeLayerGroup());\n      updateTimes.call(type);\n      type.setDisplayTime(this.getTimeline().getSelectedTime());\n      type.on('change:resources', updateTimes);\n      // Zeitpunkte bei visible-Änderungen löschen oder hinzufügen\n      type.on('change:visible', updateTimes);\n      if (type.getTooltip() !== undefined &&\n          this.tooltip === undefined) {\n        this.tooltip = new Tooltip({\n          map: this.options.map,\n          typeCollection: this.typeCollection,\n          tooltip: this.options.tooltip\n        });\n      }\n    };\n    var removeType = function (type) {\n      this.getTimeline().deleteSetID(type.getId());\n      // Layer-Group löschen (bzw. aus OL entfernen)\n      // Events aus dem Type löschen\n    };\n    this.typeCollection.on('add:item', appendType, this);\n    this.typeCollection.on('remove:item', removeType, this);\n    this.typeCollection.on('replace:item', function (type, removedType) {\n      appendType.call(this, type);\n      removeType.call(this, removedType);\n    }, this);\n  }\n  \n  /**\n   * Returns timeline object.\n   * \n   * @return {meteoJS.timeline} Timeline.\n   */\n  getTimeline() {\n    return this.options.timeline;\n  }\n  \n  /**\n   * Returns map object.\n   * \n   * @return {meteoJS.synview.map} Map object.\n   */\n  getMap() {\n    return this.options.map;\n  }\n  \n  /**\n   * Returns collection object of appended types.\n   * \n   * @return {meteoJS.synview.typeCollection} Type collection.\n   */\n  getTypeCollection() {\n    return this.typeCollection;\n  }\n  \n  /**\n   * Append a type to this synview. Wrapper for getTypeCollection().append(type),\n   * but ensures, that the new type has an id different than undefined.\n   * \n   * @param {meteoJS.synview.type} type Type to append.\n   * @return {meteoJS.synview} This.\n   */\n  appendType(type) {\n    if (type.getId() === undefined) {\n      var prefixId = 'synview-type-';\n      var i = 0;\n      var newId;\n      do {\n        newId = prefixId + (i++);\n      } while (this.getTypeCollection().containsId(newId));\n      type.setId(newId);\n    }\n    this.getTypeCollection().append(type);\n    return this;\n  }\n  \n  /**\n   * Returns the tooltip object.\n   * \n   * @returns {module:meteoJS/tooltip~Tooltip} - Tooltip object.\n   */\n  getTooltip() {\n    return this.options.tooltip;\n  }\n  \n}","const __WEBPACK_NAMESPACE_OBJECT__ = ol.proj;","/**\n * @module meteoJS/synview/map/ol\n */\nimport SynviewMap from '../SynviewMap.js';\nimport LayerGroup from 'ol/layer/Group';\nimport { transform, fromLonLat } from 'ol/proj';\n\n/**\n * Name of mercator projection in openlayers\n * \n * @constant {string}\n */\nexport const projmerc = 'EPSG:3857';\n\n/**\n * Name of wgs84 projection in openlayers (lat/lon in degrees)\n * \n * @constant {string}\n */\nexport const projwgs84 = 'EPSG:4326';\n\n/**\n * Object to \"communicate\" with openlayers.\n * \n * @extends module:meteoJS/synview/map.SynviewMap\n */\nexport class MapOL extends SynviewMap {\n  \n  constructor(options) {\n    super(options);\n    \n    // Normalize options\n    if (this.options.layerGroup === undefined) {\n      this.options.layerGroup = new LayerGroup();\n      this.options.map.addLayer(this.options.layerGroup);\n    }\n    \n    // Listen to view changes.\n    this.options.map.getView().on('change:center', (function () {\n      this.trigger('change:view', this);\n    }).bind(this));\n    this.options.map.getView().on('change:resolution', (function () {\n      this.trigger('change:view', this);\n    }).bind(this));\n    this.options.map.on('pointermove', (function (e) {\n      this.trigger('move:pointer', e);\n    }).bind(this));\n    this.options.map.on('click', (function (e) {\n      this.trigger('click:pointer', e);\n    }).bind(this));\n    this.options.map.on('singleclick', (function (e) {\n      this.trigger('singleclick:pointer', e);\n    }).bind(this));\n    this.options.map.on('dblclick', (function (e) {\n      this.trigger('dblclick:pointer', e);\n    }).bind(this));\n    this.options.map.on('pointerdrag', (function (e) {\n      this.trigger('drag:pointer', e);\n    }).bind(this));\n  }\n  \n  /**\n   * Helper function. Returns the view center in WGS84 coordinates, lat/lon.\n   * \n   * @return {number[]} Center.\n   */\n  getViewCenter() {\n    return transform(\n      this.options.map.getView().getCenter(),\n      this.options.map.getView().getProjection(),\n      projwgs84\n    );\n  }\n  \n  /**\n   * Helper function. Sets the view center in WGS84 coordinates, lat/lon.\n   * \n   * @param {number[]} center Center.\n   * @return {module:meteoJS/synview/map/ol~MapOL} This.\n   */\n  setViewCenter(center) {\n    var valid = true;\n    center = center.map(function (a) {\n      if (isNaN(a)) {\n        valid = false;\n        return undefined;\n      }\n      else\n        return a*1;\n    });\n    if (valid)\n      this.options.map.getView().setCenter(fromLonLat(center));\n    return this;\n  }\n  \n  /**\n   * Helper function. Returns the view zoom level.\n   * \n   * @return {number|undefined} Zoom level.\n   */\n  getViewZoom() {\n    return this.options.map.getView().getZoom();\n  }\n  \n  /**\n   * Helper function. Sets the view zoom level.\n   * \n   * @param {number|undefined} zoom Zoom level.\n   * @returns {module:meteoJS/synview/map/ol~MapOL} This.\n   */\n  setViewZoom(zoom) {\n    if (!isNaN(zoom))\n      this.options.map.getView().setZoom(zoom*1);\n    return this;\n  }\n  \n  /**\n   * Returns a new layer group, already added to the map.\n   * \n   * @returns {external:ol/layer/Group~LayerGroup} New layer group.\n   */\n  makeLayerGroup() {\n    var group = new LayerGroup();\n    this.options.layerGroup.getLayers().push(group);\n    return group;\n  }\n  \n  /**\n   * Returns an event object, that is extended by several keys.\n   * Synview internal method.\n   * \n   * @param {external:ol/MapBrowserPointerEvent} event Map event object.\n   * @param {module:meteoJS/synview/typeCollection.TypeCollection} collection Type collection.\n   * @returns {module:meteoJS/synview/map~extendedEvent} Event object.\n   */\n  getExtendedEventByTypeCollection(event, collection) {\n    event = super.getExtendedEventByTypeCollection(event, collection);\n    let visibleTypes = new Map();\n    collection.getVisibleTypes()\n      .filter(type => { return type.getTooltip() !== undefined; })\n      .map(type => visibleTypes.set(type, []));\n    let visibleLayers = new Set();\n    let visibleLayerClassnames = new Set();\n    for (let type of visibleTypes.keys()) {\n      type.getLayerGroup().getLayers().getArray()\n        .filter(layer => layer.getVisible())\n        .forEach(layer => {\n          visibleTypes.get(type).push(layer);\n          visibleLayers.add(layer);\n          visibleLayerClassnames.add(layer.getClassName());\n        });\n    }\n    \n    this.options.map.forEachFeatureAtPixel(event.pixel, (feature, layer) => {\n      for (let type of visibleTypes.keys()) {\n        visibleTypes.get(type).forEach(l => {\n          if (event.synviewType !== undefined)\n            return;\n          if (l === layer) {\n            event.feature = feature;\n            event.layer = layer;\n            event.synviewType = type;\n          }\n        });\n        if (event.synviewType !== undefined)\n          break;\n      }\n      return event.synviewType !== undefined;\n    }, {\n      hitTolerance: 5,\n      layerFilter: layer => visibleLayers.has(layer)\n    });\n    \n    if (event.feature === undefined) {\n      this.options.map.forEachLayerAtPixel(event.pixel, (layer, color) => {\n        if (color == null || color.length < 1)\n          return false;\n        for (let type of visibleTypes.keys()) {\n          visibleTypes.get(type).forEach(l => {\n            if (event.synviewType !== undefined)\n              return;\n            if (l.getClassName() == layer.getClassName()) {\n              event.color = color;\n              event.layer = layer;\n              event.synviewType = type;\n            }\n          });\n          if (event.synviewType !== undefined)\n            break;\n        }\n        return event.synviewType !== undefined;\n      }, {\n        hitTolerance: 5,\n        layerFilter: layer => visibleLayerClassnames.has(layer.getClassName())\n      });\n    }\n    return event;\n  }\n  \n  /**\n   * Returns index of the passed layer inside the layer group of the passed type.\n   * Synview internal method.\n   * \n   * @param {external:ol/layer/Layer~Layer} layer Layer object.\n   * @param {module:meteoJS/synview/type.Type} type Type.\n   * @return {integer} Index.\n   */\n  findLayerInType(layer, type) {\n    return type.getLayerGroup().getLayers().getArray().findIndex(function (l) {\n      return l == layer;\n    }) > -1;\n  }\n  \n}\nexport default MapOL;","/**\n * @module meteoJS/synview/map/ll\n */\nimport SynviewMap from '../SynviewMap.js';\n\n/**\n * Object to \"communicate\" with Leaflet.\n * \n * @extends module:meteoJS/synview/map.SynviewMap\n */\nexport class MapLL extends SynviewMap {\n  \n  constructor(options) {\n    super (options);\n    \n    // Normalize options\n    if (this.options.layerGroup === undefined)\n      this.options.layerGroup = L.layerGroup().addTo(this.options.map);\n  }\n  \n  /**\n   * Returns a new layer group, already added to the map.\n   * \n   * @inheritdoc\n   * @return {L.layerGroup} New layer group.\n   */\n  makeLayerGroup() {\n    return L.layerGroup().addTo(this.options.layerGroup);\n  }\n  \n}\nexport default MapLL;","const __WEBPACK_NAMESPACE_OBJECT__ = ol.format.GeoJSON;","const __WEBPACK_NAMESPACE_OBJECT__ = ol.source.Vector;","/**\n * @module meteoJS/synview/resource/Vector\n */\nimport VectorSource from 'ol/source/Vector';\nimport VectorLayer from 'ol/layer/Vector';\nimport Resource from '../Resource.js';\nimport { projwgs84 } from '../map/MapOL.js';\n\n/**\n * Object representing a Vector-resource.\n * \n * @extends  module:meteoJS/synview/resource.Resource\n */\nexport class Vector extends Resource {\n  \n  /**\n   * @inheritdoc\n   */\n  getId() {\n    var d = this.getDatetime();\n    return isNaN(d) ? '' : d.toISOString();\n  }\n  \n  /**\n   * Returns openlayers layer of this resource.\n   * \n   * @inheritdoc\n   * @return {external:ol/layer/Vector~VectorLayer} Openlayers layer.\n   */\n  makeOLLayer() {\n    let opt = {\n      source: this.options.ol.source,\n      events: this.options.ol.events,\n      style: this.options.ol.style\n    };\n    this.options.ol;\n    // source not an ol/source/Source~Source object (via duck typing)\n    if (!('refresh' in opt.source)) {\n      let sourceOptions = opt.source;\n      if (this.options.url !== undefined &&\n          'format' in sourceOptions &&\n          sourceOptions.format !== undefined)\n        sourceOptions.url = this.options.url;\n      if (!('projection' in sourceOptions) ||\n          sourceOptions.projection === undefined)\n        sourceOptions.projection = projwgs84;\n      opt.source = new VectorSource(sourceOptions);\n    }\n    if (typeof opt.style === 'function')\n      opt.style = opt.style.bind(this);\n    if (this.className)\n      opt.className = this.className;\n    return new VectorLayer(opt);\n  }\n  \n  /**\n   * Sets style of the OpenLayers vector layer.\n   * If argument 'style' is omitted, the style will be updated.\n   * \n   * @param {external:ol/style/Style~Style} [style] OpenLayers style.\n   * @returns {module:meteoJS/synview/resource/Vector.Vector} This.\n   */\n  setOLStyle(style) {\n    if (this.layer === undefined)\n      this.getOLLayer();\n    if (this.layer === undefined ||\n        !('setStyle' in this.layer))\n      return this;\n    if (arguments.length == 0)\n      this.layer.setStyle(this.layer.getStyle());\n    else\n      this.layer.setStyle(style);\n    return this;\n  }\n  \n}\nexport default Vector;","/**\n * @module meteoJS/synview/resource/GeoJSON\n */\nimport GeoJSONFormat from 'ol/format/GeoJSON';\nimport Vector from './Vector.js';\n\n/**\n * Object representing a GeoJSON-resource.\n * \n * @extends module:meteoJS/synview/resource/Vector.Vector\n */\nexport class GeoJSON extends Vector {\n  \n  constructor(options) {\n    super(options);\n    \n    this.options.ol.source.url = this.options.url;\n    this.options.ol.source.format = new GeoJSONFormat();\n  }\n  \n}\nexport default GeoJSON;","const __WEBPACK_NAMESPACE_OBJECT__ = ol.source.VectorTile;","const __WEBPACK_NAMESPACE_OBJECT__ = ol.layer.VectorTile;","/**\n * @module meteoJS/synview/resource/VectorTile\n */\nimport VectorTileSource from 'ol/source/VectorTile';\nimport VectorTileLayer from 'ol/layer/VectorTile';\nimport Vector from './Vector.js';\nimport { projwgs84 } from '../map/MapOL.js';\n\n/**\n * Object representing a VectorTile-resource.\n * \n * @extends  module:meteoJS/synview/resource/Vector~Vector\n */\nexport class VectorTile extends Vector {\n  \n  /**\n   * Returns openlayers layer of this resource.\n   * \n   * @inheritdoc\n   * @return {external:ol/layer/VectorTile~VectorTileLayer} Openlayers layer.\n   */\n  makeOLLayer() {\n    let opt = {\n      source: this.options.ol.source,\n      events: this.options.ol.events,\n      style: this.options.ol.style\n    };\n    // source not an ol/source/Source~Source object (via duck typing)\n    if (!('refresh' in opt.source)) {\n      let sourceOptions = opt.source;\n      if (!('tileUrlFunction' in sourceOptions) &&\n          this.options.url !== undefined &&\n          'format' in sourceOptions &&\n          sourceOptions.format !== undefined)\n        sourceOptions.url = this.options.url;\n      if (!('projection' in sourceOptions) ||\n          sourceOptions.projection === undefined)\n        sourceOptions.projection = projwgs84;\n      opt.source = new VectorTileSource(sourceOptions);\n    }\n    if (typeof opt.style === 'function')\n      opt.style = opt.style.bind(this);\n    if (this.className)\n      opt.className = this.className;\n    return new VectorTileLayer(opt);\n  }\n  \n}\nexport default VectorTile;","/**\n * @module meteoJS/synview/resource/GeoJSONTile\n */\nimport GeoJSON from 'ol/format/GeoJSON';\nimport VectorTile from './VectorTile.js';\n\n/**\n * Object representing a GeoJSON-Tile-resource.\n * \n * @extends module:meteoJS/synview/resource/VectorTile.VectorTile\n */\nexport class GeoJSONTile extends VectorTile {\n  \n  constructor(options) {\n    super(options);\n    \n    this.options.ol.source.format = new GeoJSON();\n  }\n  \n}\nexport default GeoJSONTile;","const __WEBPACK_NAMESPACE_OBJECT__ = ol.source.ImageStatic;","const __WEBPACK_NAMESPACE_OBJECT__ = ol.layer.Image;","/**\n * @module meteoJS/synview/resource/Image\n */\nimport Static from 'ol/source/ImageStatic';\nimport ImageLayer from 'ol/layer/Image';\nimport { transformExtent } from 'ol/proj';\nimport Resource from '../Resource.js';\nimport { projmerc, projwgs84 } from '../map/MapOL.js';\n\n/**\n * Options for module:meteoJS/synview/resource/Image~Image.\n * \n * @typedef {module:meteoJS/synview/resource~options}\n *   module:meteoJS/synview/resource/Image~options\n * @param {number[]} extent - Extent.\n */\n\n/**\n * Object representing an image.\n * \n * <pre><code>import Image from 'meteoJS/synview/resource/Image';\nimport { Image } from 'meteoJS/synview/resource/Image';\nimport { ImageStatic } from 'meteoJS/synview/resource/Image';</code></pre>\n * \n * @extends  module:meteoJS/synview/resource.Resource\n */\nexport class ImageStatic extends Resource {\n  \n  /**\n   * @param {module:meteoJS/synview/resource/Image~options} options - Options.\n   */\n  constructor({\n    url = undefined,\n    datetime = undefined,\n    mimetype = undefined,\n    reloadTime = undefined,\n    className = undefined,\n    extent,\n    ol = {}\n  } = {}) {\n    super({\n      url,\n      datetime,\n      mimetype,\n      reloadTime,\n      className,\n      ol\n    });\n    \n    this.options.extent = extent;\n  }\n  \n  /**\n   * Returns openlayers layer of this resource.\n   * \n   * @inheritdoc\n   * @return {external:ol/layer/Image~ImageLayer} Openlayers layer.\n   */\n  makeOLLayer() {\n    let sourceOptions = this.options.ol.source;\n    sourceOptions.url = this.options.url;\n    sourceOptions.imageExtent =\n      transformExtent(this.options.extent,\n        projwgs84,\n        projmerc);\n    return new ImageLayer({\n      source: new Static(sourceOptions),\n      className: this.className\n    });\n  }\n  \n  /**\n   * Returns Leaflet layer of this resource.\n   * \n   * @inheritdoc\n   * @return {external:L.imageOverlay} Leaflet layer.\n   */\n  makeLLLayer() {\n    return L.imageOverlay(this.options.url, [\n      [this.options.extent[1], this.options.extent[0]],\n      [this.options.extent[3], this.options.extent[2]]\n    ]);\n  }\n  \n  \n  /**\n   * @inheritdoc\n   */\n  preload() {\n    this.getOLLayer().getSource().image_.load();\n  }\n}\nexport { ImageStatic as Image };\nexport default ImageStatic;","const __WEBPACK_NAMESPACE_OBJECT__ = ol.source.OSM;","const __WEBPACK_NAMESPACE_OBJECT__ = ol.layer.Tile;","/**\n * @module meteoJS/synview/resource/OSM\n */\nimport OSMSource from 'ol/source/OSM';\nimport TileLayer from 'ol/layer/Tile';\nimport Resource from '../Resource.js';\n\n/**\n * Object representing a OSM-resource.\n * \n * @extends  module:meteoJS/synview/resource.Resource\n */\nexport class OSM extends Resource {\n  \n  /**\n   * Returns openlayers layer of this resource.\n   * \n   * @inheritdoc\n   * @return {external:ol/layer/Tile~TileLayer} Openlayers layer.\n   */\n  makeOLLayer() {\n    let sourceOptions = this.options.ol.source;\n    sourceOptions.url = this.options.url;\n    return new TileLayer({\n      source: new OSMSource(sourceOptions)\n    });\n  }\n  \n}\nexport default OSM;","/**\n * @module meteoJS/tooltip\n */\nimport addEventFunctions from './Events.js';\n\n/**\n * Triggered, when tooltip starts to be shown.\n * \n * @event module:meteoJS/tooltip#show:tooltip\n */\n\n/**\n * Triggered, when tooltip starts to be hidden.\n * \n * @event module:meteoJS/tooltip#hide:tooltip\n */\n\n/**\n * @classdesc Abstract class to create a tooltip.\n * \n * @abstract\n * @fires module:meteoJS/tooltip#show:tooltip\n * @fires module:meteoJS/tooltip#hide:tooltip\n */\nexport class Tooltip {\n  \n  constructor() {\n    /**\n     * @type Boolean\n     * @private\n     */\n    this._isShown = false;\n    \n    /**\n     * @type undefined|mixed\n     * @private\n     */\n    this._content = undefined;\n  }\n  \n  /**\n   * Is tooltip shown.\n   * \n   * @type Boolean\n   * @readonly\n   */\n  get isShown() {\n    return this._isShown;\n  }\n  \n  /**\n   * Content of tooltip. Could be a String or a HTMLElement or a jQuery object.\n   * \n   * @type undefined|mixed\n   */\n  get content() {\n    return this._content;\n  }\n  set content(content) {\n    let oldContent = this._content;\n    this._content = content;\n    if (oldContent !== this._content)\n      this.onContentChange();\n  }\n  \n  /**\n   * Show tooltip.\n   * \n   * @abstract\n   * @param {Object} [options] - Options.\n   * @param {Number} options.posX - Position in x direction.\n   * @param {Number} options.posY - Position in y direction.\n   * @returns {module:meteoJS/tooltip.Tooltip} This.\n   */\n  show() {\n    let fireShowEvent = !this.isShown;\n    this._isShown = true;\n    if (fireShowEvent)\n      this.trigger('show:tooltip');\n    return this;\n  }\n  \n  /**\n   * Hide tooltip.\n   * \n   * @abstract\n   * @returns {module:meteoJS/tooltip.Tooltip} This.\n   */\n  hide() {\n    let fireHideEvent = this.isShown;\n    this._isShown = false;\n    if (fireHideEvent)\n      this.trigger('hide:tooltip');\n    return this;\n  }\n  \n  /**\n   * Update tooltip. E.g. due to content change, which moved the tooltip.\n   * \n   * @abstract\n   * @returns {module:meteoJS/tooltip.Tooltip} This.\n   */\n  update() {\n    return this;\n  }\n  \n  /**\n   * Called when property 'content' changes.\n   * \n   * @abstract\n   * @protected\n   */\n  onContentChange() {}\n  \n}\naddEventFunctions(Tooltip.prototype);\nexport default Tooltip;","const __WEBPACK_NAMESPACE_OBJECT__ = bootstrap;","/**\n * @module meteoJS/tooltip/bootstrapTooltip\n */\nimport $ from 'jquery';\nimport { Tooltip as bsTooltip } from 'bootstrap';\nimport Tooltip from '../Tooltip.js';\n\n/**\n * Options for constructor.\n * \n * @typedef {Object} module:meteoJS/tooltip/bootstrapTooltip~options\n * @property {undefined|external:jQuery|external:HTMLElement} [tooltipNode=undefined]\n *   Create Bootstrap's tooltip on this element.\n * @property {Object} [bootstrapOptions] - Options passed to the '.tooltip' method.\n * @property {boolean} [closeOnMouseMove=true]\n *   Close tooltip, when mouse is moved over the tooltip.\n * @property {boolean} [closeOnMouseEnter=false]\n *   Close tooltip, when mouse is entered in the tooltip.\n */\n\n/**\n * Tooltip which uses the Bootstrap's tooltip.\n * \n * @extends module:meteoJS/tooltip.Tooltip\n * @inheritdoc\n */\nexport class BootstrapTooltip extends Tooltip {\n  \n  /**\n   * @param {module:meteoJS/tooltip/bootstrapTooltip~options} [options] - Options.\n   */\n  constructor({\n    tooltipNode = undefined,\n    bootstrapOptions = undefined,\n    closeOnMouseMove = true,\n    closeOnMouseEnter = false\n  } = {}) {\n    super();\n    \n    /**\n     * @type undefined|Object\n     * @private\n     */\n    this.bootstrapOptions = bootstrapOptions ? bootstrapOptions : {};\n    this._initBootstrapOptions(bootstrapOptions);\n    \n    /**\n     * @type boolean\n     * @private\n     */\n    this.closeOnMouseMove = closeOnMouseMove;\n    \n    /**\n     * @type Bboolean\n     * @private\n     */\n    this.closeOnMouseEnter = closeOnMouseEnter;\n    \n    /**\n     * @type external:jQuery\n     * @private\n     */\n    this._tooltipNode = undefined;\n    this.tooltipNode = tooltipNode;\n\n    /**\n     * @type external:bootrap|undefined\n     * @private\n     */\n    this._bsTooltip = undefined;\n  }\n  \n  /**\n   * Bootstap's tooltip is assigned to this node.\n   * \n   * @type undefined|external:jQuery\n   */\n  get tooltipNode() {\n    return this._tooltipNode;\n  }\n  set tooltipNode(tooltipNode) {\n    if (tooltipNode === undefined) {\n      this._tooltipNode = tooltipNode;\n      this._bsTooltip = undefined;\n      return;\n    }\n    \n    this._tooltipNode = $(tooltipNode);\n    this._initTooltipNode();\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  show({\n    posX,\n    posY\n  }) {\n    if (this._tooltipNode === undefined ||  this._bsTooltip === undefined)\n      return;\n\n    this.tooltipNode\n      .css({\n        left: `${posX}px`,\n        top: `${posY}px`\n      });\n    if (this.isShown)\n      this._bsTooltip.update();\n    else\n      this._bsTooltip.show();\n    return super.show();\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  hide() {\n    if (this._tooltipNode === undefined ||  this._bsTooltip === undefined)\n      return;\n\n    if (this.isShown) {\n      this.tooltipNode\n        .attr('data-original-title', undefined);\n      this._bsTooltip.hide();\n    }\n    return super.hide();\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  update() {\n    if (this._bsTooltip === undefined)\n      return;\n    this._bsTooltip.update();\n    return super.update();\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  onContentChange() {\n    /* If no content is passed, the tooltip will not open with a\n     * content-callback until the tooltip is initialized otherwise. */\n    this.tooltipNode.attr('data-bs-original-title',\n      isStringContent(this.content) ? this.content : '-');\n    \n    this._updateNonStringContent();\n    this.update();\n  }\n  \n  /**\n   * Default options to Bootstrap's tooltip.\n   * \n   * @private\n   */\n  _initBootstrapOptions({\n    trigger = 'manual'\n  } = {}) {\n    this.bootstrapOptions.trigger = trigger;\n  }\n  \n  /**\n   * Initialize Bootstrap's tooltip.\n   * \n   * @private\n   */\n  _initTooltipNode() {\n    if (this._bsTooltip !== undefined)\n      this._bsTooltip.dispose();\n    this._bsTooltip =\n      new bsTooltip(this._tooltipNode[0], this.bootstrapOptions);\n    this.tooltipNode[0].addEventListener('inserted.bs.tooltip', () => {\n      let tooltipNode = this._updateNonStringContent();\n      if (!tooltipNode.length)\n        return;\n      if (this.closeOnMouseMove)\n        tooltipNode.children('.tooltip-inner').mousemove(() => this.hide());\n      if (this.closeOnMouseEnter)\n        tooltipNode.children('.tooltip-inner').mouseenter(() => this.hide());\n    });\n  }\n  \n  /**\n   * Updates tooltips content, if not simply a string.\n   * \n   * @private\n   * @returns {external:jQuery} - Tooltip node.\n   */\n  _updateNonStringContent() {\n    let tooltipNode =\n      $(document.getElementById(this.tooltipNode.attr('aria-describedby')));\n    if (!tooltipNode.length)\n      return;\n    if (this.content !== undefined &&\n        !isStringContent(this.content))\n      tooltipNode\n        .children('.tooltip-inner')\n        .empty()\n        .append(this.content);\n    return tooltipNode;\n  }\n  \n}\nexport default BootstrapTooltip;\n\nconst isStringContent = function(content) {\n  return Object.prototype.toString.call(content) == '[object String]';\n};","/**\n * @module meteoJS/base/unique\n */\n\n/**\n * Options for constructor.\n * \n * @typedef {Object} module:meteoJS/base/unique~options\n * @property {mixed} [id] - Id.\n */\n\n/**\n * Class that describe an object with an unique id.\n */\nexport class Unique {\n  \n  /**\n   * @param {module:meteoJS/base/unique~options} [options] - Options.\n   */\n  constructor({ id } = {}) {\n    this._id = id;\n  }\n  \n  /**\n   * Id.\n   * \n   * @type {mixed}\n   */\n  get id() {\n    return this._id;\n  }\n  set id(id) {\n    this._id = id;\n    this.setId(id);\n  }\n  \n  /**\n   * Fired, wenn id-setter is called.\n   * \n   * @protected\n   * @param {mixed} id - Id.\n   */\n  setId() {}\n}\nexport default Unique;","/**\n * @module meteoJS/base/collection\n */\nimport addEventFunctions from '../Events.js';\nimport Unique from './Unique.js';\n\n/**\n * Triggered on adding item to collection.\n * \n * @event module:meteoJS/base/collection#add:item\n * @param {module:meteoJS/base/unique.Unique} item - Added item.\n */\n\n/**\n * Triggered on replacing item with already existing ID.\n * \n * @event module:meteoJS/base/collection#replace:item\n * @param {module:meteoJS/base/unique.Unique} item - Added item.\n * @param {module:meteoJS/base/unique.Unique} removedItem - Replaced and removed item.\n */\n\n/**\n * Triggered on removing item from collection.\n * \n * @event module:meteoJS/base/collection#remove:item\n * @param {module:meteoJS/base/unique.Unique} item - Removed item.\n */\n\n/**\n * Options for constructor.\n * \n * @typedef {Object} module:meteoJS/base/collection~options\n * @property {boolean} [fireReplace] - Fire {@link module:meteoJS/base/collection#replace:item|replace:item}.\n * @property {boolean} [fireAddRemoveOnReplace] -\n *   Fire {@link module:meteoJS/base/collection#add:item|add:item} and\n *   {@link module:meteoJS/base/collection#remove:item|remove:item} on\n *   replacing an item.\n * @property {boolean} [appendOnReplace] -\n *   Append item to the end, if item is replaced.\n * @property {undefined|Function} [sortFunction] -\n *   Sort function to sort the collection list.\n * @property {undefined|Function} [emptyObjectMaker] -\n *   Function that returns an empty\n *   {@link module:meteoJS/base/unqiue.Unique|Unique}-Object or\n *   an instance of a child class.\n */\n\n/**\n * Collection-class for {@link module:meteoJS/base/unqiue.Unique|Unique}-Objects\n * or objects of child classes.\n * \n * @implements {Iterator}\n * @fires module:meteoJS/base/collection#add:item\n * @fires module:meteoJS/base/collection#remove:item\n * @fires module:meteoJS/base/collection#replace:item\n */\nexport class Collection {\n  \n  /**\n   * @param {module:meteoJS/base/collection~options} options - Options.\n   */\n  constructor({ fireReplace=true,\n    fireAddRemoveOnReplace=false,\n    appendOnReplace=true,\n    sortFunction,\n    emptyObjectMaker\n  } = {}) {\n    /** @type Object */\n    this.options = {\n      fireReplace,\n      fireAddRemoveOnReplace,\n      appendOnReplace,\n      sortFunction,\n      emptyObjectMaker\n    };\n    \n    /**\n     * List of the IDs of the items.\n     * @type mixed[]\n     * @private\n     */\n    this._itemIds = [];\n    \n    /**\n     * Items, ID as key of the object.\n     * @type Object.<mixed,module:meteoJS/base/unique.Unique>\n     * @private\n     */\n    this._items = {};\n  }\n  \n  /**\n   * Count of the items in this collection.\n   * \n   * @type integer\n   * @readonly\n   */\n  get count() {\n    return this._itemIds.length;\n  }\n  \n  [Symbol.iterator]() {\n    let i = 0;\n    return {\n      next: () => {\n        return (i < this._itemIds.length)\n          ? { value: this._items[this._itemIds[i++]] }\n          : { done: true };\n      }\n    };\n  }\n  \n  /**\n   * Items (ordered list).\n   * \n   * @type module:meteoJS/base/unique.Unique[]\n   * @readonly\n   */\n  get items() {\n    return this._itemIds.map(id => this._items[id]);\n  }\n  \n  /**\n   * List of IDs (ordered list).\n   * \n   * @type mixed[]\n   * @readonly\n   */\n  get itemIds() {\n    return this._itemIds;\n  }\n  \n  /**\n   * Sort function for the items.\n   * \n   * @type undefined|Function\n   */\n  get sortFunction() {\n    return this.options.sortFunction;\n  }\n  set sortFunction(sortFunction) {\n    this.options.sortFunction = sortFunction;\n    this._sort();\n  }\n  \n  /**\n   * Returns item by ID, Unique-Object with undefined id, if ID doesn't exist.\n   * \n   * @param {mixed} id - ID.\n   * @returns {module:meteoJS/base/unique.Unique} Item.\n   */\n  getItemById(id) {\n    return (id in this._items) ? this._items[id] :\n      (this.options.emptyObjectMaker === undefined)\n        ? new Unique()\n        : this.options.emptyObjectMaker.call(this);\n  }\n  \n  /**\n   * Is item appended to the collection.\n   * \n   * @param {module:meteoJS/base/unique.Unique} item - Item.\n   * @returns {boolean} If appended.\n   */\n  contains(item) {\n    let result = this.containsId(item.id);\n    if (result)\n      result = item === this.getItemById(item.id);\n    return result;\n  }\n  \n  /**\n   * Exists an ID in this collection.\n   * \n   * @param {mixed} id - ID.\n   * @returns {boolean} If exists.\n   */\n  containsId(id) {\n    return (id in this._items);\n  }\n  \n  /**\n   * Append an item to the collection.\n   * \n   * @param {...module:meteoJS/base/unique.Unique} items - New items.\n   * @returns {module:meteoJS/base/collection.Collection} This.\n   * @fires module:meteoJS/base/collection#add:item\n   * @fires module:meteoJS/base/collection#remove:item\n   * @fires module:meteoJS/base/collection#replace:item\n   */\n  append(...items) {\n    const addItem = [];\n    const removeItem = [];\n    const replaceItem = [];\n    items.forEach(item => {\n      let id = item.id;\n      if (this.containsId(id)) {\n        let itemInCollection = this.getItemById(id);\n        if (this.options.appendOnReplace) {\n          this._itemIds.splice(this._itemIds.indexOf(id), 1);\n          this._itemIds.push(id);\n        }\n        if (itemInCollection !== item) {\n          this._items[id] = item;\n          if (this.options.fireReplace)\n            replaceItem.push([item, itemInCollection]);\n          if (this.options.fireAddRemoveOnReplace) {\n            removeItem.push(itemInCollection);\n            addItem.push(item);\n          }\n        }\n      }\n      else {\n        this._itemIds.push(id);\n        this._items[id] = item;\n        addItem.push(item);\n      }\n    });\n    this._sort();\n    addItem.forEach(item => this.trigger('add:item', item));\n    removeItem.forEach(item => this.trigger('remove:item', item));\n    replaceItem.forEach(([item, itemInCollection]) => this.trigger('replace:item', item, itemInCollection));\n    return this;\n  }\n  \n  /**\n   * Removes an item from the collection.\n   * \n   * @param {...module:meteoJS/base/unique.Unique} items - Items to remove.\n   * @returns {module:meteoJS/base/collection.Collection} This.\n   * @fires module:meteoJS/base/collection#remove:item\n   */\n  remove(...items) {\n    items.forEach(item => {\n      let i = this._itemIds.indexOf(item.id);\n      if (i > -1) {\n        let realItem = this._items[item.id];\n        delete this._items[item.id];\n        this._itemIds.splice(i, 1);\n        this.trigger('remove:item', realItem);\n      }\n    });\n    return this;\n  }\n  \n  /**\n   * Removes an item by ID from the collection.\n   * \n   * @param {mixed} id - ID of the item to delete.\n   * @returns {module:meteoJS/base/collection.Collection} This.\n   * @fires module:meteoJS/base/collection#remove:item\n   */\n  removeById(...ids) {\n    ids.forEach(id => {\n      let i = this._itemIds.indexOf(id);\n      if (i > -1) {\n        let item = this._items[id];\n        delete this._items[id];\n        this._itemIds.splice(i, 1);\n        this.trigger('remove:item', item);\n      }\n    });\n    return this;\n  }\n  \n  /**\n   * Sorts Collection-List.\n   * \n   * @private\n   */\n  _sort() {\n    if (this.options.sortFunction === undefined)\n      return;\n    this._itemIds.sort((a,b) => {\n      return this.options.sortFunction(this._items[a], this._items[b]);\n    });\n  }\n}\naddEventFunctions(Collection.prototype);\nexport default Collection;","/**\n * @module meteoJS/modelviewer\n */\nimport Collection from './base/Collection.js';\nimport Timeline from './Timeline.js';\n\n/**\n * Creates and returns a HTMLElement or jQuery object for a container. The\n * content of the container is appended to this element. This function has to\n * append the element to the modelviewer's containersNode.\n * \n * @typedef {Function} module:meteoJS/modelviewer~makeContainerNode\n * @param {module:meteoJS/modelviewer/container.Container} container\n *   Container to append.\n * @this module:meteoJS/modelviewer~Modelviewer\n * @returns {HTMLElement|jQuery} Top node of the appended container.\n */\n\n/**\n * Options for constructor.\n * \n * @typedef {Object} module:meteoJS/modelviewer~options\n * @param {module:meteoJS/modelviewer/resources.Resources} resources\n *   Available resources.\n * @param {HTMLElement|jQuery} containersNode Node to append the containers.\n * @param {module:meteoJS/timeline.Timeline} [timeline]\n *   Shared Timeline between containers.\n * @param {module:meteoJS/modelviewer~makeContainerNode} [makeContainerNode]\n *   Function to create the top node of each container.\n * @param {boolean} [firstTimeOnInit=true] - Selects the first time in timeline\n *   once for the first time times are added to the timeline.\n * @param {boolean} [lastTimeOnInit=false] - Selects the last time in timeline\n *   once for the first time times are added to the timeline.\n *   Ignored if firstTimeOnInit is true.\n */\n\n/**\n * @classdesc\n \n * Entscheidet über das Design der Container (auch Darstellungsbreite -> entsprechend welche Navigation)\n * Wie kann der User die Anordnung der Container ändern?\n   * Dies soll für Bootstrap aber auch allg. funktionieren\n   * Wie soll dazu die Navigation angepasst werden können\n * Handelt wahrscheinlich die Darstellung der Container (irgendwie…)\n * Eigentlich wäre gut, wenn auch keine Abhängikeit von jQuery… (geht das?)\n * Output Container -> Modelviewer\n   * Kann entweder nur ein Bild/Sounding/etc. anzeigen\n   * Kann je nach dem auch noch Navigation(en) ausgeben\n   * Je nach Output unterschiedlicher Aufbau des Container-div's\n   * Wie übergibt man diesem Objekt die Darstellung (z.B. der Navigation)\n   * Navigation muss sich anpassen (Änderung einer Collection, Änderung der Resource, …)\n * Wie löst man das Vererben der Anzeige des vorangegangenen Containers -> Modelviewer\n * Wie löst man, dass öffnen eines nächsten Runs vom vorangegangenen Container -> Modelviewer\n * Bei Image -> hover funktion -> Modelviewer\n * Bei Image -> Überblenden von Punkten für z.B. Ensembles -> Modelviewer\n * Default-Navigation mit <select>-Nodes. -> Modelviewer\n * 2te Default-Navigation mit vertikal angeordneten Listen -> Modelviewer\n * \n * ToDo:\n * * Alle Zeitpunkte für Modell/Run\n * * Alle Zeitpunkte für eine gewählte Resource (oder mind. displayVariables)\n *   -> dabei sollten keine Unter-Nodes berücksichtigt werden.\n * * Auswahl der DisplayVariable entweder nur per 1:1 Übereinstimmung oder aber\n *   durch Best-Match (wie soll dies gelöst werden).\n * Aktuell befindet sich ziemlicher Rubbish-Code in den Klassen.\n * collectTimesVariableCollections in Resources ist nicht die Lösung\n */\nexport class Modelviewer extends Collection {\n  \n  /**\n   * @param {module:meteoJS/modelviewer~options} options - Options.\n   */\n  constructor({ resources,\n    containersNode,\n    timeline = undefined,\n    makeContainerNode = undefined,\n    firstTimeOnInit = true,\n    lastTimeOnInit = false } = {}) {\n    super({\n      fireReplace: false,\n      fireAddRemoveOnReplace: true\n    });\n    \n    /**\n     * @type module:meteoJS/modelviewer/resources.Resources\n     * @private\n     */\n    this._resources = resources;\n    \n    /**\n     * @type HTMLElement\n     * @private\n     */\n    this._containersNode =\n      (typeof containersNode == 'object' && containersNode.jquery)\n        ? containersNode[0] : containersNode;\n    \n    /**\n     * @type module:meteoJS/timeline.Timeline\n     * @private\n     */\n    this._timeline = (timeline === undefined) ? new Timeline() : timeline;\n    \n    /**\n     * @type undefined|Function\n     * @private\n     */\n    this._makeContainerNode = makeContainerNode;\n    \n    /**\n     * @type Map<module:meteoJS/modelviewer/container.Container,mixed>\n     * @private\n     */\n    let listenerKeys = new Map();\n    \n    this.on('add:item', container => {\n      container.modelviewer = this;\n      container.containerNode =\n        this._getContainerNode(container);\n      if (!isNaN(this.timeline.getSelectedTime().valueOf()) ||\n          !firstTimeOnInit && !lastTimeOnInit)\n        return;\n      \n      listenerKeys\n        .set(container, container.on('change:selectedVariables', ()  => {\n          if (isNaN(this._timeline.getSelectedTime().valueOf())) {\n            if (firstTimeOnInit)\n              this._timeline.first();\n            else if (lastTimeOnInit)\n              this._timeline.last();\n            if (!isNaN(this._timeline.getSelectedTime().valueOf()))\n              for (let c of listenerKeys.keys()) {\n                c.un('change:selectedVariables', listenerKeys.get(c));\n                listenerKeys.delete(c);\n              }\n          }\n        }));\n    });\n    \n    this.on('remove:item', container => {\n      if (container.containerNode !== undefined &&\n          container.containerNode.parentNode != null)\n        container.containerNode.parentNode.removeChild(container.containerNode);\n      container.modelviewer = undefined;\n      container.containerNode = undefined;\n      if (listenerKeys.has(container)) {\n        container.un('change:selectedVariables', listenerKeys.get(container));\n        listenerKeys.delete(container);\n      }\n      this.timeline.deleteSetID(container.id);\n    });\n  }\n  \n  /**\n   * Resources.\n   * \n   * @type module:meteoJS/modelviewer/resources.Resources\n   * @readonly\n   */\n  get resources() {\n    return this._resources;\n  }\n  \n  /**\n   * Node to append the container's node into.\n   * \n   * @type HTMLElement\n   * @readonly\n   */\n  get containersNode() {\n    return this._containersNode;\n  }\n  \n  /**\n   * Timeline.\n   * \n   * @type module:meteoJS/timeline.Timeline\n   * @readonly\n   */\n  get timeline() {\n    return this._timeline;\n  }\n  \n  /**\n   * Appends container(s).\n   * \n   * @param {...module:meteoJS/modelviewer/container.Container} containers\n   *   New containers.\n   * @returns {module:meteoJS/modelviewer.Modelviewer} This.\n   * @override\n   */\n  append(...containers) {\n    let ids = [...this.itemIds];\n    containers\n      .filter(container => container.id !== undefined)\n      .forEach(container => ids.push(container.id));\n    containers\n      .filter(container => container.id === undefined)\n      .forEach(container => {\n        let i = 1;\n        let id = `container${i}`;\n        while (ids.indexOf(id) > -1) {\n          i++;\n          id = `container${i}`;\n        }\n        container.id = id;\n        ids.push(id);\n      });\n    super.append(...containers);\n    return this;\n  }\n  \n  /**\n   * Creates a HTMLElement to append the container content into it. This\n   * element is appended to the containersNode.\n   * \n   * @param {module:meteoJS/modelviewer/container.Container} container\n   *   Create Node for this container.\n   * @returns {HTMLElement} Node.\n   * @private\n   */\n  _getContainerNode(container) {\n    if (this._makeContainerNode !== undefined) {\n      let result =\n        this._makeContainerNode.call(this, this.containersNode, container);\n      return (typeof result == 'object' && result.jquery) ? result[0] : result;\n    }\n    else {\n      let containerNode =\n        (container.containerNode !== undefined)\n          ? container.containerNode\n          : document.createElement('div');\n      if (this.containersNode !== undefined)\n        this.containersNode.appendChild(containerNode);\n      return containerNode;\n    }\n  }\n}\nexport default Modelviewer;","/**\n * @module meteoJS/base/named\n */\n\n/**\n * Options for constructor.\n * \n * @typedef {Object} module:meteoJS/base/named~options\n * @property {string} [name] - Default name.\n * @property {Object.<string,string>} [names] - Names.\n * @property {string[]} [langSortation] - Priority of language codes.\n */\n\n/**\n * Class with a name in different languages.\n */\nexport class Named {\n  \n  /**\n   * @param {module:meteoJS/base/named~options} [options] - Options.\n   */\n  constructor({ name = undefined, names = {}, langSortation = [] } = {}) {\n    /**\n     * @type undefined|string\n     * @private\n     */\n    this._name = name;\n    \n    /**\n     * @type Object<string,string>\n     * @private\n     */\n    this._names = names;\n    \n    /**\n     * @type string[]\n     * @private\n     */\n    this._langSortation = langSortation;\n  }\n  \n  /**\n   * Default name.\n   * \n   * @type {string}\n   */\n  get name() {\n    return this.getDefaultName();\n  }\n  set name(name) {\n    this._name = name;\n  }\n  \n  /**\n   * Returns the name in the passed language.\n   * \n   * @param {string} lang - Language code.\n   * @returns {string} Name in the passed language.\n   */\n  getNameByLangNoFallback(lang) {\n    return (lang in this._names)  ? this._names[lang] : '';\n  }\n  \n  /**\n   * Sets the name of a certain language. Pass undefined to delete name.\n   * \n   * @param {string} lang - Language code.\n   * @param {string} name - Name.\n   */\n  setNameByLang(lang, name) {\n    this._names[lang] = name;\n    if (name === undefined)\n      delete this._names[lang];\n  }\n  \n  /**\n   * Default order of the languages.\n   * \n   * @type string[]\n   */\n  get langSortation() {\n    return this._langSortation;\n  }\n  set langSortation(langSortation) {\n    this._langSortation = langSortation;\n  }\n  \n  /**\n   * Default name.\n   * \n   * @returns {string}\n   * @protected\n   */\n  getDefaultName() {\n    return (this._name !== undefined) ? this._name : this.getNameByLang();\n  }\n  \n  /**\n   * Returns a name, if available in the passed language, otherwise in a\n   * fallback language.\n   * \n   * @param {string} [lang] - Language code.\n   * @param {Object} [options] - Options.\n   * @param {string[]} [options.langSortation] - Priority of language codes.\n   * @returns {string} Name in the passed or a fallback language.\n   */\n  getNameByLang(lang = undefined, { langSortation = undefined } = {}) {\n    let lS =\n      (langSortation === undefined) ? this._langSortation : langSortation;\n    let langs = Object.keys(this._names);\n    if (langs.length < 1)\n      return (this._name === undefined) ? '' : this._name;\n    return this._names[langs.sort((a, b) => {\n      if (a == lang) return -1;\n      if (b == lang) return 1;\n      let ia = lS.indexOf(a);\n      let ib = lS.indexOf(b);\n      if (ib < 0) return 0;\n      if (ia < 0) return 1;\n      return ia < ib ? -1 : ia == ib ? 0 : 1;\n    })[0]];\n  }\n}\nexport default Named;","/**\n * @module meteoJS/base/uniquenamed\n */\nimport Unique from './Unique.js';\nimport Named from './Named.js';\n\n/**\n * Options for constructor.\n * \n * @typedef {module:meteoJS/base/named~options}\n *   module:meteoJS/base/uniquenamed~options\n * @property {mixed} [id] - Id.\n */\n\n/**\n * Class that describe objects with an unique id and with names.\n * \n * @extends module:meteoJS/base/unique.Unique\n * @extends module:meteoJS/base/named.Named\n */\nexport class UniqueNamed extends Named {\n  \n  /**\n   * @param {module:meteoJS/base/uniquenamed~options} [options] - Options.\n   */\n  constructor({ id, name = undefined, names = {}, langSortation = [] } = {}) {\n    super({\n      name,\n      names,\n      langSortation\n    });\n    \n    Object.defineProperty(this, 'id',\n      Object.getOwnPropertyDescriptor(Unique.prototype, 'id'));\n    // constructor code of Unique\n    this._id = id;\n  }\n  \n  /**\n   * @override\n   */\n  setId(id) {\n    Unique.prototype.setId.call(this, id);\n  }\n  \n  /**\n   * @override\n   */\n  getDefaultName() {\n    return (this._name !== undefined)\n      ? this._name\n      : (Object.keys(this._names).length > 0)\n        ? this.getNameByLang()\n        : (this._id === undefined) ? '' : this._id;\n  }\n}\nexport default UniqueNamed;","/**\n * @module meteoJS/modelviewer/variable\n */\nimport UniqueNamed from '../base/UniqueNamed.js';\n\n/**\n * Options for constructor.\n * \n * @typedef {module:meteoJS/base/uniquenamed~options}\n *   module:meteoJS/modelviewer/variable~options\n * @param {module:meteoJS/modelviewer/variableCollection.VariableCollection}\n *   [variableCollection] - Belongs to this VariableCollection.\n */\n\n/**\n * @classdesc Object for e.g. a model, a runtime or a field.\n */\nexport class Variable extends UniqueNamed {\n  \n  /**\n   * @param {module:meteoJS/modelviewer/variable~options} [options] - Options.\n   */\n  constructor({ id,\n    name = undefined,\n    names = {},\n    langSortation = [],\n    variableCollection } = {}) {\n    super({\n      id,\n      name,\n      names,\n      langSortation\n    });\n    \n    /**\n     * @type undefined|module:meteoJS/modelviewer/variableCollection.VariableCollection\n     * @private\n     */\n    this._variableCollection = variableCollection;\n  }\n  \n  /**\n   * This Variable belongs to this VariableCollection.\n   * @type undefined|module:meteoJS/modelviewer/variableCollection.VariableCollection\n   */\n  get variableCollection() {\n    return this._variableCollection;\n  }\n  set variableCollection(variableCollection) {\n    this._variableCollection = variableCollection;\n  }\n}\nexport default Variable;","/**\n * @module meteoJS/modelviewer/timeVariable\n */\nimport Variable from './Variable.js';\n\n/**\n * Options for TimeVariable constructor\n * \n * @typedef {module:meteoJS/base/uniquenamed~options}\n *   module:meteoJS/modelviewer/timeVariable~options\n * @param {Date|undefined} [datetime] - Datetime.\n */\n\n/**\n * @classdesc Class for something representing a time, e.g. runtime or offset.\n */\nexport class TimeVariable extends Variable {\n  \n  /**\n   * @param {module:meteoJS/modelviewer/timeVariable~options} options - Options.\n   */\n  constructor({ id,\n    name = undefined,\n    names = {},\n    langSortation = [],\n    datetime = undefined } = {}) {\n    super({\n      id,\n      name,\n      names,\n      langSortation\n    });\n    \n    /**\n     * @type Date|undefined\n     * @private\n     */\n    this._datetime = (this.id === undefined) ? undefined : new Date(this.id);\n    \n    if (datetime !== undefined)\n      this.datetime = datetime;\n  }\n  \n  /**\n   * @override\n   */\n  setId(id) {\n    this._datetime = (id === undefined) ? undefined : new Date(id);\n  }\n  \n  /**\n   * @type Date|undefined\n   */\n  get datetime() {\n    return this._datetime;\n  }\n  set datetime(datetime) {\n    this._datetime = datetime;\n    this._id = (datetime !== undefined) ? datetime.valueOf() : undefined;\n  }\n}\nexport default TimeVariable;","/**\n * @module meteoJS/modelviewer/variableCollection\n */\nimport Variable from './Variable.js';\nimport Unique from '../base/Unique.js';\nimport UniqueNamed from '../base/UniqueNamed.js';\nimport NamedCollection from '../base/NamedCollection.js';\n\n/**\n * Triggered on adding a Variable to collection.\n * \n * @event module:meteoJS/modelviewer/variableCollection#add:variable\n * @param {module:meteoJS/modelviewer/variable.Variable} variable -\n *   Added variable.\n */\n\n/**\n * Triggered on removing a Variable from collection.\n * \n * @event module:meteoJS/modelviewer/variableCollection#remove:variable\n * @param {module:meteoJS/modelviewer/variable.Variable} variable -\n *   Removed variable.\n */\n\n/**\n * Options for constructor.\n * \n * @typedef {module:meteoJS/base/namedCollection~options}\n *   module:meteoJS/modelviewer/variableCollection~options\n */\n\n/**\n * @classdesc A collection of Variable-objects. It also defines a hierarchy\n *   of the collections. So a VariableCollection could have children and\n *   parents. A variable object can only belong to one collection.\n * @augments module:meteoJS/base/unique.Unique\n * @fires module:meteoJS/modelviewer/variableCollection#add:variable\n * @fires module:meteoJS/modelviewer/variableCollection#remove:variable\n */\nexport class VariableCollection extends NamedCollection {\n  \n  /**\n   * @param {module:meteoJS/modelviewer/variableCollection~options} options\n   *   - Options.\n   */\n  constructor({ id,\n    fireReplace=true,\n    fireAddRemoveOnReplace=false,\n    appendOnReplace=true,\n    sortFunction,\n    names,\n    langSortation } = {}) {\n    super({\n      emptyObjectMaker: () => { return new Variable(); },\n      fireReplace,\n      fireAddRemoveOnReplace,\n      appendOnReplace,\n      sortFunction,\n      names,\n      langSortation\n    });\n    \n    Object.defineProperty(this, 'id',\n      Object.getOwnPropertyDescriptor(Unique.prototype, 'id'));\n    // constructor code of Unique\n    this._id = id;\n    \n    // ID as name\n    Object.defineProperty(this, 'getDefaultName',\n      Object.getOwnPropertyDescriptor(UniqueNamed.prototype, 'getDefaultName'));\n    \n    /**\n     * @type undefined|module:meteoJS/modelviewer/node.Node\n     * @private\n     */\n    this._node = undefined;\n    \n    this.on('add:item', item => {\n      if (item.variableCollection !== undefined)\n        item.variableCollection.remove(item);\n      item.variableCollection = this;\n      this.trigger('add:variable', item);\n    });\n    this.on('remove:item', item => this.trigger('remove:variable', item));\n  }\n  \n  /**\n   * @override\n   */\n  setId(id) {\n    Unique.prototype.setId.call(this, id);\n  }\n  \n  /**\n   * Variables contained by this collection.\n   * \n   * @type module:meteoJS/modelviewer/variable.Variable[]\n   */\n  get variables() {\n    return this.items;\n  }\n  \n  /**\n   * Alias of getItemById.\n   * \n   * @param {mixed} id ID.\n   * @returns {module:meteoJS/modelviewer/variable.Variable} Variable.\n   */\n  getVariableById(id) {\n    return this.getItemById(id);\n  }\n  \n  /**\n   * If defined, this VariableCollection belongs to this node.\n   * \n   * @type undefined|module:meteoJS/modelviewer/node.Node\n   */\n  get node() {\n    return this._node;\n  }\n  set node(node) {\n    this._node = node;\n  }\n}\nexport default VariableCollection;","/**\n * @module meteoJS/base/namedCollection\n */\nimport Collection from './Collection.js';\nimport Named from './Named.js';\n\n/**\n * Options for constructor.\n * \n * @typedef {module:meteoJS/base/collection~options}\n *   module:meteoJS/base/namedCollection~options\n * @property {string} [name] - Default name.\n * @property {Object.<string,string>} [names] - Names.\n * @property {string[]} [langSortation] - Priority of language codes.\n */\n\n/**\n * Collection-class with i18n names.\n * \n * @extends module:meteoJS/base/collection.Collection\n * @extends module:meteoJS/base/named.Named\n */\nexport class NamedCollection extends Collection {\n  \n  /**\n   * @param {module:meteoJS/base/namedCollection~options} options - Options.\n   */\n  constructor({ fireReplace=true,\n    fireAddRemoveOnReplace=false,\n    appendOnReplace=true,\n    sortFunction,\n    emptyObjectMaker,\n    name = undefined,\n    names = {},\n    langSortation = []\n  } = {}) {\n    super({\n      fireReplace,\n      fireAddRemoveOnReplace,\n      appendOnReplace,\n      sortFunction,\n      emptyObjectMaker\n    });\n    \n    Object.defineProperty(this, 'name',\n      Object.getOwnPropertyDescriptor(Named.prototype, 'name'));\n    Object.getPrototypeOf(this).getDefaultName = Named.prototype.getDefaultName;\n    Object.getPrototypeOf(this).getNameByLang = Named.prototype.getNameByLang;\n    Object.getPrototypeOf(this).setNameByLang = Named.prototype.setNameByLang;\n    Object.getPrototypeOf(this).getNameByLangNoFallback =\n      Named.prototype.getNameByLangNoFallback;\n    // Named constructor code\n    /**\n     * @type undefined|string\n     * @private\n     */\n    this._name = name;\n    \n    /**\n     * @type Object<string,string>\n     * @private\n     */\n    this._names = names;\n    \n    /**\n     * @type string[]\n     * @private\n     */\n    this._langSortation = langSortation;\n  }\n}\nexport default NamedCollection;","/**\n * @module meteoJS/modelviewer/resourcesTreeNode\n */\n\n/**\n * Options for constructor.\n * \n * @typedef {Object} module:meteoJS/modelviewer/resourcesTreeNode~options\n * @param {module:meteoJS/modelviewer/node.Node} node\n *   The object is linked to this node.\n */\n\n/**\n * Internal class to manage the available resources inside the\n * {@link module:meteoJS/modelviewer/node.Node|Node class}. Each\n * ResourcesTreeNode object is linked to a Node object. It is a many to one\n * relation. The hierarchy of the ResourcesTree is analogue to the Node\n * hierarchy. But the tree is build via the\n * {@link module:meteoJS/modelviewer/variable.Variable|Variable objects}.\n * So, this class is not only linked to a Node object, but subsequently for a\n * {@link module:meteoJS/modelviewer/variableCollection.VariableCollection|VariableCollection object}.\n * If a {@link module:meteoJS/modelviewer/resource.Resource|Resource} for a\n * certain Variable object from this VariableCollection is added, then a\n * child ResourcesTreeNode object is inserted in the tree (if it doesn't exists)\n * for the Variable object.\n * \n * @internal\n */\nexport class ResourcesTreeNode {\n  \n  /**\n   * @param {module:meteoJS/modelviewer/resourcesNode~options} [options]\n   *   Options.\n   */\n  constructor({ node }) {\n    \n    /**\n     * @type module:meteoJS/modelviewer/node.Node\n     * @private\n     */\n    this._node = node;\n\n    /**\n     * @type Map.<module:meteoJS/modelviewer/variable.Variable,module:meteoJS/modelviewer/resourcesTreeNode.ResourcesTreeNode>\n     * @private\n     */\n    this._children = new Map();\n\n    /**\n     * @type module:meteoJS/modelviewer/resourcesTreeNode.ResourcesTreeNode\n     * @private\n     */\n    this._parent = undefined;\n  }\n\n  /**\n   * Linked Node object.\n   * \n   * @type module:meteoJS/modelviewer/node.Node\n   * @readonly\n   */\n  get node() {\n    return this._node;\n  }\n\n  /**\n   * Linked VariableCollection object.\n   * \n   * @type module:meteoJS/modelviewer/variableCollection.VariableCollection\n   * @readonly\n   */\n  get variableCollection() {\n    return this._node.variableCollection;\n  }\n\n  get children() {\n    return [...this._children.values()];\n  }\n\n  /**\n   * The parent object of this ResourcesTree-Node.\n   * \n   * @type undefined|module:meteoJS/modelviewer/resourcesTreeNode.ResourcesTreeNode\n   */\n  get parent() {\n    return this._parent;\n  }\n  set parent(parent) {\n    this._parent = parent;\n  }\n\n  /**\n   * Returns the child corresponding to the passed variable.\n   * \n   * @param {module:meteoJS/modelviewer/variable.Variable} variable - Variable.\n   * @returns {module:meteoJS/modelviewer/resourcesTreeNode.ResourcesTreeNode}\n   *   Child ResourcesTreeNode object for the passed variable.\n   */\n  getChildByVariable(variable) {\n    return this._children.get(variable);\n  }\n\n  /**\n   * Build tree \n   * \n   * @param {Object} options - Options.\n   * @param {module:meteoJS/modelviewer/resource.Resource} options.resource\n   *   The added Resource object.\n   * @param {module:meteoJS/modelviewer/node.Node} options.aimedNode\n   *   The Resource object will be inserted into this Node object.\n   * @returns {undefined|module:meteoJS/modelviewer/resourcesTreeNode.ResourcesTreeNode}\n   */\n  buildChildrenTreeForResource({\n    resource,\n    aimedNode\n  }) {\n    if (this.node === aimedNode)\n      return this;\n\n    const variable =\n      resource.getVariableByVariableCollection(this.variableCollection);\n    /* Shouldn't get an unknown Variable. The resource is inserted in the\n     * Node-tree with a Variable in each Node. */\n    if (variable.id === undefined)\n      return undefined;\n\n    let child = this._children.get(variable);\n    if (child !== undefined)\n      return child.buildChildrenTreeForResource({ resource, aimedNode });\n    // Child doesn't already exist\n    this.node.children.forEach(node => {\n      // The resource will belong only to one node.\n      const childVariable =\n        resource.getVariableByVariableCollection(node.variableCollection);\n      if (childVariable.id !== undefined)\n        child = new ResourcesTreeNode({ node });\n    });\n    if (child !== undefined) {\n      this._children.set(variable, child);\n      child.parent = this;\n      return child.buildChildrenTreeForResource({ resource, aimedNode });\n    }\n    return undefined;\n  }\n\n  /**\n   * Removes a child in the Resources-Tree. If this was the only child of this\n   * Resources-Tree-Node, then remove this Tree-Node from the parent.\n   */\n  removeChild({\n    child\n  }) {\n    for (const [variable, c] of this._children.entries())\n      if (c === child)\n        this._children.delete(variable);\n    if (this._children.size < 1\n      && this.parent !== undefined)\n      this.parent.removeChild({ child: this });\n  }\n\n  /**\n   * Returns the bottom most ResourcesTreeNode object. On the way from the top\n   * ResourcesTreeNode to this object, for every passed Variable object a\n   * suitable ResourcesTreeNode is passed.\n   * \n   * @param {...module:meteoJS/modelviewer/variable.Variable} - variables\n   *   A set of Variable objects.\n   * @returns {undefined|module:meteoJS/modelviewer/resourcesTreeNode.ResourcesTreeNode}\n   *   Bottom most object.\n   */\n  findNodeByVariables(...variables) {\n    let v = undefined;\n    variables.forEach(variable => {\n      if (variable.variableCollection === this.variableCollection)\n        v = variable;\n    });\n    if (v === undefined)\n      return undefined;\n    const child = this._children.get(v);\n    if (child !== undefined) {\n      const result = child.findNodeByVariables(...variables);\n      return (result === undefined) ? this : result;\n    }\n    return this;\n  }\n}\nexport default ResourcesTreeNode;","/**\n * @module meteoJS/modelviewer/node\n */\nimport addEventFunctions from '../Events.js';\nimport ResourcesTreeNode from './ResourcesTreeNode.js';\n\n/**\n * Triggered on append of a child node.\n * \n * @event module:meteoJS/modelviewer/node#append:child\n * @param {module:meteoJS/modelviewer/node.Node} node - Appended child node.\n */\n\n/**\n * A node has always a correspondent VariableCollection. With the node objects\n * a hierarchy of the collections is build up. This hierarchy is mainly used\n * to achieve a good user experience. This way, the menus in the\n * {@link module:meteoJS/modelviewer/container.Container|modelviewer-container}\n * could be setup to present the user only available fields or levels or only\n * activate buttons which are available for a certain model and run.\n * Additionally a node contains a list of resources, this is used internally\n * in {@link module:meteoJS/modelviewer/resources.Resources}.\n * \n * @fires module:meteoJS/modelviewer/node#append:child\n */\nexport class Node {\n  \n  /**\n   * @param {module:meteoJS/modelviewer/variableCollection.VariableCollection}\n   *   variableCollection\n   *   This node belongs to this collection.\n   */\n  constructor(variableCollection) {\n    \n    /**\n     * @type module:meteoJS/modelviewer/variableCollection.VariableCollection\n     * @private\n     */\n    this._variableCollection = variableCollection;\n    variableCollection.node = this;\n    \n    /**\n     * @type module:meteoJS/modelviewer/node.Node[]\n     * @private\n     */\n    this._parents = [];\n    \n    /**\n     * @type module:meteoJS/modelviewer/node.Node[]\n     * @private\n     */\n    this._children = [];\n    \n    /**\n     * @type undefined|module:meteoJS/modelviewer/resourcesTreeNode.ResourcesTreeNode\n     * @private\n     */\n    this._resourcesTopNode = undefined;\n\n    /**\n     * @type Map<module:meteoJS/modelviewer/resourcesTreeNode.ResourcesTreeNode,\n     *           Map<module:meteoJS/modelviewer/variable.Variable,\n     *               Set<module:meteoJS/modelviewer/resource.Resource>>>\n     * @private\n     */\n    this._resources = new Map();\n  }\n  \n  /**\n   * VariableCollection correspondent to this node.\n   * \n   * @type module:meteoJS/modelviewer/variableCollection.VariableCollection\n   */\n  get variableCollection() {\n    return this._variableCollection;\n  }\n  \n  /**\n   * Parent nodes.\n   * \n   * @type module:meteoJS/modelviewer/node.Node[]\n   */\n  get parents() {\n    return this._parents;\n  }\n  \n  /**\n   * Child nodes.\n   * \n   * @type module:meteoJS/modelviewer/node.Node[]\n   */\n  get children() {\n    return this._children;\n  }\n  \n  /**\n   * Appends a node as a child.\n   * \n   * @param {...module:meteoJS/modelviewer/node.Node} nodes - Node to append.\n   * @returns {module:meteoJS/modelviewer/node.Node} This.\n   * @fires module:meteoJS/modelviewer/node#append:child\n   */\n  appendChild(...nodes) {\n    nodes.forEach(node => {\n      this._children.push(node);\n      node._addParent(this);\n      this.trigger('append:child', node);\n    });\n    return this;\n  }\n  \n  /**\n   * Adds a parent node.\n   * \n   * @param {module:meteoJS/modelviewer/node.Node} node - Node to add.\n   * @package\n   */\n  _addParent(node) {\n    this._parents.push(node);\n  }\n  \n  /**\n   * All contained resources.\n   * \n   * @type module:meteoJS/modelviewer/resource.Resource[]\n   * @package\n   */\n  get resources() {\n    const result = [];\n    for (const m of this._resources.values()) {\n      [...m.values()]\n        .forEach(resources => result.push(...resources));\n    }\n    return result;\n  }\n  \n  /**\n   * Append resources.\n   * \n   * @param {...module:meteoJS/modelviewer/resource.Resource} resources\n   *   Resources.\n   * @returns {integer} Count of really added resources.\n   * @package\n   */\n  append(...resources) {\n    if (this._resourcesTopNode === undefined)\n      this._makeResourcesTopNode();\n\n    let addedCount = 0;\n    resources.forEach(resource => {\n      if (resource.variables\n        .filter(v => v.variableCollection === this.variableCollection)\n        .length < 1)\n        return;\n      const resourcesTreeNode =\n        this._resourcesTopNode.buildChildrenTreeForResource({\n          resource,\n          aimedNode: this\n        });\n      if (resourcesTreeNode !== undefined) {\n        const variable = resource\n          .getVariableByVariableCollection(resourcesTreeNode.variableCollection);\n        if (variable !== undefined) {\n          let mapByVariables = this._resources.get(resourcesTreeNode);\n          if (mapByVariables === undefined) {\n            mapByVariables = new Map();\n            this._resources.set(resourcesTreeNode, mapByVariables);\n          }\n          let resources = mapByVariables.get(variable);\n          if (resources === undefined) {\n            resources = new Set();\n            mapByVariables.set(variable, resources);\n          }\n          if (!resources.has(resource)) {\n            resources.add(resource);\n            addedCount++;\n          }\n        }\n      }\n    });\n    return addedCount;\n  }\n  \n  /**\n   * Removes resources.\n   * \n   * @param {...module:meteoJS/modelviewer/resource.Resource} resources\n   *   Resources.\n   * @returns {integer} Count of really removed resources.\n   * @package\n   */\n  remove(...resources) {\n    let removedCount = 0;\n    resources.forEach(resource => {\n      const resourcesTreeNode = this._resourcesTopNode\n        .findNodeByVariables(...resource.variables);\n      if (resourcesTreeNode !== undefined) {\n        const variable = resource\n          .getVariableByVariableCollection(resourcesTreeNode.variableCollection);\n        const mapByVariables = this._resources.get(resourcesTreeNode);\n        if (mapByVariables !== undefined) {\n          const resourcesSet = mapByVariables.get(variable);\n          if (resourcesSet !== undefined) {\n            resourcesSet.delete(resource);\n            removedCount++;\n            if (resourcesSet.size < 1) {\n              mapByVariables.delete(variable);\n              if (mapByVariables.size < 1) {\n                this._resources.delete(resourcesTreeNode);\n                const parent = resourcesTreeNode.parent;\n                if (parent !== undefined)\n                  parent.removeChild({ child: resourcesTreeNode });\n              }\n            }\n          }\n        }\n      }\n    });\n    return removedCount;\n  }\n  \n  /**\n   * Returns all or a part of the resources contained in this node. The returned\n   * resources are defined by all of the passed variables.\n   * \n   * @param {boolean} [exactlyMatch=false] - Only return resources, which are\n   *   defined exactly by the passed variables.\n   * @param {...module:meteoJS/modelviewer/variable.Variable} variables\n   *   Variables.\n   * @returns {module:meteoJS/modelviewer/resource.Resource[]} Resources.\n   */\n  getResourcesByVariables(...variables) {\n    if (this._resourcesTopNode === undefined)\n      return [];\n\n    let exactlyMatch = false;\n    if (variables.length &&\n        typeof variables[0] === 'boolean')\n      exactlyMatch = variables.shift();\n    \n    if (exactlyMatch && variables.length == 0)\n      return [];\n\n    if (exactlyMatch) {\n      const variablesSet = new Set(variables);\n      const node = this._resourcesTopNode.findNodeByVariables(...variables);\n      const mapByVariables = this._resources.get(node);\n      if (mapByVariables !== undefined) {\n        for (const [variable, resources] of mapByVariables) {\n          if (!variablesSet.has(variable))\n            continue;\n          if (resources === undefined || resources.size < 1)\n            return [];\n          const resource = [...resources][0];\n          let isAdded = true;\n          variables.forEach(variable => {\n            const v = resource.getVariableByVariableCollection(variable.variableCollection);\n            if (v !== variable)\n              isAdded = false;\n          });\n          return isAdded ? [...resources] : [];\n        }\n      }\n      return [];\n    }\n\n    // !exactlyMatch\n    const collectResourcesTreeChildren = resourcesTreeNode => {\n      let result = new Set();\n      if (resourcesTreeNode.children.length < 1) {\n        result.add(resourcesTreeNode);\n        return result;\n      }\n      let v = undefined;\n      variables.forEach(variable => {\n        if (variable.variableCollection === resourcesTreeNode.variableCollection)\n          v = variable;\n      });\n      /* If no variable is found, then collect the nodes of all children. */\n      if (v === undefined) {\n        resourcesTreeNode.children.forEach(child => {\n          result = new Set([...result, ...collectResourcesTreeChildren(child)]);\n        });\n      }\n      else {\n        const child = resourcesTreeNode.getChildByVariable(v);\n        if (child !== undefined)\n          result = new Set([...result, ...collectResourcesTreeChildren(child)]);\n      }\n      return result;\n    };\n    const resourcesTreeNodes = collectResourcesTreeChildren(this._resourcesTopNode);\n    const result = [];\n    [...resourcesTreeNodes].forEach(resourcesTreeNode => {\n      const mapByVariables = this._resources.get(resourcesTreeNode);\n      if (mapByVariables === undefined)\n        return;\n      for (const [variable, resources] of mapByVariables) {\n        if (variable.variableCollection !== resourcesTreeNode.variableCollection)\n          continue;\n        if (resources === undefined || resources.size < 1)\n          return;\n        const resource = [...resources][0];\n        let isAdded = true;\n        variables.forEach(variable => {\n          const v = resource.getVariableByVariableCollection(variable.variableCollection);\n          if (v !== variable) {\n            isAdded = false;\n          }\n        });\n        if (isAdded)\n          result.push(...resources);\n      }\n    });\n    return result;\n  }\n\n  /**\n   * Returns if there exists resources which are defined by all of the passed\n   * variables.\n   * \n   * @param {boolean} [exactlyMatch=false] - Only returns true, if there exists\n   *  at least one resource, which is defined exactly by the passed variables.\n   * @param {...module:meteoJS/modelviewer/variable.Variable} variables\n   *   Variables.\n   * @returns {boolean} Exists at least one resource.\n   */\n  hasResourcesByVariables(...variables) {\n    return (this.getResourcesByVariables(...variables).length > 0);\n  }\n\n  /**\n   * Creates to top node for the resources-tree.\n   * \n   * @private\n   */\n  _makeResourcesTopNode() {\n    const traversedNodes = new Set();\n    const getTopNode = node => {\n      const parents = node.parents;\n      if (parents.length < 1)\n        return node;\n      let result = undefined;\n      parents.forEach(parentNode => {\n        if (!traversedNodes.has(parentNode)) {\n          traversedNodes.add(parentNode);\n          const r = getTopNode(parentNode);\n          if (r !== undefined)\n            result = r;\n        }\n      });\n      return result;\n    };\n    this._resourcesTopNode =\n      new ResourcesTreeNode({ node: getTopNode(this) });\n  }\n}\naddEventFunctions(Node.prototype);\nexport default Node;","/**\n * @module meteoJS/modelviewer/resource\n */\nimport Variable from './Variable.js';\n\n/**\n * Options for constructor.\n * \n * @typedef {Object} module:meteoJS/modelviewer/resource~options\n * @param {module:meteoJS/modelviewer/variable.Variable[]} [variables] -\n *   Variables, which define this resource uniquely.\n *   The variables must be from different VariableCollections.\n * @param {Date} [datetime] - Datetime, ignored if run and offset are defined.\n * @param {Date} [run] - Runtime.\n * @param {integer} [offset] - Offset in seconds.\n */\n\n/**\n * @classdesc Class to describe a data resource like a modelplot or a\n *   sounding data. The resource must be defined uniquely by several variables\n *   (like model, runtime, …). You should not define the resource by\n *   several variables of the same collection.\n * @abstract\n */\nexport class Resource {\n  \n  /**\n   * @param {module:meteoJS/modelviewer/resource~options} [options] - Options.\n   */\n  constructor({ variables = [],\n    datetime = undefined,\n    run = undefined,\n    offset = undefined } = {}) {\n    /**\n     * @type Set<module:meteoJS/modelviewer/variable.Variable>\n     * @private\n     */\n    this._variables = new Map();\n    variables.forEach(variable =>\n      this._variables.set(variable.variableCollection, variable));\n    \n    /**\n     * @type Date|undefined\n     * @private\n     */\n    this._datetime = datetime;\n    \n    /**\n     * @type undefined|Date\n     */\n    this._run = run;\n    \n    /**\n     * @type undefined|integer\n     */\n    this._offset = offset;\n    \n    this._updateDatetime();\n  }\n  \n  /**\n   * Variable objects, which define this resource. Like model, run, offset,…\n   * \n   * @type module:meteoJS/modelviewer/variable.Variable[]\n   * @readonly\n   */\n  get variables() {\n    return [...this._variables.values()];\n  }\n  \n  /**\n   * Resource is valid for this datetime. If undefined, than the resource is\n   * not only valid at one datetime.\n   * \n   * @type Date|undefined\n   */\n  get datetime() {\n    return this._datetime;\n  }\n  set datetime(datetime) {\n    this._datetime = datetime;\n  }\n  \n  /**\n   * Runtime.\n   * \n   * @type Date|undefined\n   */\n  get run() {\n    return this._run;\n  }\n  set run(run) {\n    this._run = run;\n    this._updateDatetime();\n  }\n  \n  /**\n   * Offset.\n   * \n   * @type integer|undefined\n   */\n  get offset() {\n    return this._offset;\n  }\n  set offset(offset) {\n    this._offset = offset;\n    this._updateDatetime();\n  }\n  \n  /**\n   * Returns the variable-object that is part of the definition of this resource\n   * and contains to the passed collection. If you define the resource by\n   * several variables of the same variable collection, it is not defined\n   * which variable is returned.\n   * \n   * @param {module:meteoJS/modelviewer/variableCollection.VariableCollection}\n   *   variableCollection - VariableCollection.\n   * @returns {module:meteoJS/modelviewer/variable.Variable}\n   */\n  getVariableByVariableCollection(variableCollection) {\n    const result = this._variables.get(variableCollection);\n    return (result === undefined) ? new Variable() : result;\n  }\n  \n  /**\n   * Returns if the passed Variable-objects all define this resource.\n   * \n   * @param {boolean} [exactlyMatch] - Only return true, if the passed\n   *   variables exactly define the resource.\n   * @param {...module:meteoJS/modelviewer/variable.Variable} variables\n   *   Variables.\n   * @returns {boolean} All passed variables defines the resource.\n   */\n  isDefinedBy(...variables) {\n    let exactlyMatch = false;\n    if (variables.length &&\n        typeof variables[0] === 'boolean')\n      exactlyMatch = variables.shift();\n    const vars = new Set([...this._variables.values()]);\n    if (!exactlyMatch)\n      return variables.filter(v => !vars.has(v)).length == 0;\n    \n    if (variables.filter(v => !vars.has(v)).length != 0)\n      return false;\n    const variablesSet = new Set(variables);\n    return [...vars].filter(v => !variablesSet.has(v)).length == 0;\n  }\n  \n  /**\n   * Returns if a Variable-object of the passed collection defines this\n   * resource.\n   * \n   * @param {module:meteoJS/modelviewer/variableCollection.VariableCollection}\n   *   variableCollection - VariableCollection.\n   * @returns {boolean} A variable of the collection defines the resource.\n   */\n  isDefinedByVariableOf(variableCollection) {\n    return this._variables.get(variableCollection) !== undefined;\n  }\n  \n  /**\n   * Sets datetime according to run and offset.\n   * \n   * @private\n   */\n  _updateDatetime() {\n    if (this._run !== undefined &&\n        this._offset !== undefined)\n      this.datetime = new Date(this._run.valueOf() + this._offset * 1000);\n  }\n}\nexport default Resource;","/**\n * @module meteoJS/modelviewer/resource/image\n */\nimport Resource from '../Resource.js';\n\n/**\n * Options for constructor.\n * \n * @typedef {module:meteoJS/modelviewer/resource~options}\n *   module:meteoJS/modelviewer/resource/image~options\n * @param {string} [url] - URL to the Image.\n */\n\n/**\n * @classdesc Class to describe an image resource.\n */\nexport class Image extends Resource {\n  \n  /**\n   * @param {module:meteoJS/modelviewer/resource/image~options} [options]\n   *   Options.\n   */\n  constructor({ variables = [],\n    datetime = undefined,\n    run = undefined,\n    offset = undefined,\n    url = undefined /*, mimetype, ...*/ } = {}) {\n    super({\n      variables,\n      datetime,\n      run,\n      offset\n    });\n    \n    /**\n     * @type string\n     * @private\n     */\n    this._url = url;\n  }\n  \n  /**\n   * URL to the Image.\n   * \n   * @type string\n   */\n  get url() {\n    return this._url;\n  }\n}\nexport default Image;","/**\n * @module meteoJS/sounding/parcel\n */\nimport Unique from '../base/Unique.js';\n\n/**\n * Options for the constructor.\n * \n * @typedef {Object} module:meteoJS/sounding/parcel~options\n * @param {undefined|number} [pres=undefined]\n *   Parcel beginning pressure (mb).\n * @param {undefined|number} [tmpc=undefined]\n *   Parcel beginning temperature (C).\n * @param {undefined|number} [dwpc=undefined]\n *   Parcel beginning dewpoint (C).\n * @param {undefined|number} [ptrace=undefined]\n *   Parcel trace pressure (mb).\n * @param {undefined|number} [ttrace=undefined]\n *   Parcel trace temperature (C).\n * @param {undefined|number} [blayer=undefined]\n *   Pressure of the bottom of the layer the parcel is lifted (mb).\n * @param {undefined|number} [tlayer=undefined]\n *   Pressure of the top of the layer the parcel is lifted (mb).\n * @param {undefined|number} [lclpres=undefined]\n *   Parcel LCL (lifted condensation level) pressure (mb).\n * @param {undefined|number} [lclhght=undefined]\n *   Parcel LCL height (m AGL).\n * @param {undefined|number} [lfcpres=undefined]\n *   Parcel LFC (level of free convection) pressure (mb).\n * @param {undefined|number} [lfchght=undefined]\n *   Parcel LFC height (m AGL).\n * @param {undefined|number} [elpres=undefined]\n *   Parcel EL (equilibrium level) pressure (mb).\n * @param {undefined|number} [elhght=undefined]\n *   Parcel EL height (m AGL).\n * @param {undefined|number} [mplpres=undefined]\n *   Maximum Parcel Level (mb).\n * @param {undefined|number} [mplhght=undefined]\n *   Maximum Parcel Level (m AGL).\n * @param {undefined|number} [bplus=undefined]\n *   Parcel CAPE (J/kg).\n * @param {undefined|number} [bminus=undefined]\n *   Parcel CIN (J/kg).\n * @param {undefined|number} [bfzl=undefined]\n *   Parcel CAPE up to freezing level (J/kg).\n * @param {undefined|number} [b3km=undefined]\n *   Parcel CAPE up to 3 km (J/kg).\n * @param {undefined|number} [b6km=undefined]\n *   Parcel CAPE up to 6 km (J/kg).\n * @param {undefined|number} [p0c=undefined]\n *   Pressure value at 0 C  (mb).\n * @param {undefined|number} [pm10c=undefined]\n *   Pressure value at -10 C (mb).\n * @param {undefined|number} [pm20c=undefined]\n *   Pressure value at -20 C (mb).\n * @param {undefined|number} [pm30c=undefined]\n *   Pressure value at -30 C (mb).\n * @param {undefined|number} [hght0c=undefined]\n *   Height value at 0 C (m AGL).\n * @param {undefined|number} [hghtm10c=undefined]\n *   Height value at -10 C (m AGL).\n * @param {undefined|number} [hghtm20c=undefined]\n *   Height value at -20 C (m AGL).\n * @param {undefined|number} [hghtm30c=undefined]\n *   Height value at -30 C (m AGL).\n * @param {undefined|number} [wm10c=undefined]\n *   Wet bulb velocity at -10 C.\n * @param {undefined|number} [wm20c=undefined]\n *   Wet bulb velocity at -20 C.\n * @param {undefined|number} [wm30c=undefined]\n *   Wet bulb at -30 C.\n * @param {undefined|number} [li5=undefined]\n *   Lifted Index at 500 mb (C).\n * @param {undefined|number} [li3=undefined]\n *   Lifted Index at 300 mb (C).\n * @param {undefined|number} [brnshear=undefined]\n *   Bulk Richardson Number Shear.\n * @param {undefined|number} [brnu=undefined]\n *   Bulk Richardson Number U (kts).\n * @param {undefined|number} [brnv=undefined]\n *   Bulk Richardson Number V (kts).\n * @param {undefined|number} [brn=undefined]\n *   Bulk Richardson Number (unitless).\n * @param {undefined|number} [limax=undefined]\n *   Maximum Lifted Index (C).\n * @param {undefined|number} [limaxpres=undefined]\n *   Pressure at Maximum Lifted Index (mb).\n * @param {undefined|number} [cap=undefined]\n *   Cap Strength (C).\n * @param {undefined|number} [cappres=undefined]\n *   Cap strength pressure (mb).\n * @param {undefined|number} [bmin=undefined]\n *   Buoyancy minimum in profile (C).\n * @param {undefined|number} [bminpres=undefined]\n *   Buoyancy minimum pressure (mb).\n */\n\n/**\n * Class representing a parcel lifting.\n * \n * @extends module:meteoJS/base/unique.Unique\n */\nexport class Parcel extends Unique {\n  \n  /**\n   * @param {module:meteoJS/sounding/parcel~options} [options] - Options.\n   */\n  constructor({\n    id = undefined,\n    pres = undefined,\n    tmpc = undefined,\n    dwpc = undefined,\n    ptrace = undefined,\n    ttrace = undefined,\n    blayer = undefined,\n    tlayer = undefined,\n    lclpres = undefined,\n    lclhght = undefined,\n    lfcpres = undefined,\n    lfchght = undefined,\n    elpres = undefined,\n    elhght = undefined,\n    mplpres = undefined,\n    mplhght = undefined,\n    bplus = undefined,\n    bminus = undefined,\n    bfzl = undefined,\n    b3km = undefined,\n    b6km = undefined,\n    p0c = undefined,\n    pm10c = undefined,\n    pm20c = undefined,\n    pm30c = undefined,\n    hght0c = undefined,\n    hghtm10c = undefined,\n    hghtm20c = undefined,\n    hghtm30c = undefined,\n    wm10c = undefined,\n    wm20c = undefined,\n    wm30c = undefined,\n    li5 = undefined,\n    li3 = undefined,\n    brnshear = undefined,\n    brnu = undefined,\n    brnv = undefined,\n    limax = undefined,\n    limaxpres = undefined,\n    cap = undefined,\n    cappres = undefined,\n    bmin = undefined,\n    bminpres = undefined\n  } = {}) {\n    super({ id });\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.pres = pres;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.tmpc = tmpc;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.dwpc = dwpc;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.ptrace = ptrace;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.ttrace = ttrace;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.blayer = blayer;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.tlayer = tlayer;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.lclpres = lclpres;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.lclhght = lclhght;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.lfcpres = lfcpres;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.lfchght = lfchght;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.elpres = elpres;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.elhght = elhght;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.mplpres = mplpres;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.mplhght = mplhght;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.bplus = bplus;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.bminus = bminus;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.bfzl = bfzl;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.b3km = b3km;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.b6km = b6km;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.p0c = p0c;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.pm10c = pm10c;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.pm20c = pm20c;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.pm30c = pm30c;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.hght0c = hght0c;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.hghtm10c = hghtm10c;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.hghtm20c = hghtm20c;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.hghtm30c = hghtm30c;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.wm10c = wm10c;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.wm20c = wm20c;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.wm30c = wm30c;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.li5 = li5;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.li3 = li3;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.brnshear = brnshear;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.brnu = brnu;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.brnv = brnv;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.limax = limax;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.limaxpres = limaxpres;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.cap = cap;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.cappres = cappres;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.bmin = bmin;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.bminpres = bminpres;\n  }\n}\nexport default Parcel;","/**\n * @module meteoJS/sounding\n */\nimport { altitudeISAByPres,\n  potentialTempByTempAndPres,\n  equiPotentialTempByTempAndDewpointAndPres,\n  dewpointByHMRAndPres } from './calc.js';\nimport Collection from './base/Collection.js';\nimport Parcel from './sounding/Parcel.js';\n\n/**\n * Data for a sounding level.\n * Nomenclature is analogue to the SHARPpy project (sharppy/sharptab/profile.py)\n * Exception for some units:\n * * Windspeed always in m/s\n * * Temperature in Kelvin\n * * Relative humidity unitless\n * \n * @typedef {Object} module:meteoJS/sounding~levelData\n * @param {float} pres Pressure level [hPa].\n * @param {float|undefined} [hght] Altitude above sealevel [m].\n * @param {float|undefined} [tmpk] Temperature [K].\n * @param {float|undefined} [dwpk] Dewpoint-temperature [K].\n * @param {float|undefined} [wdir] Wind direction [°].\n * @param {float|undefined} [wspd] Absolute windspeed [m/s].\n * @param {float|undefined} [u] Windspeed in U-direction [m/s].\n * @param {float|undefined} [v] Windspeed in V-direction [m/s].\n * @param {float|undefined} [relh] Relative humidity [].\n * @param {float|undefined} [mixr] Mixing ration [g/kg].\n * @param {float|undefined} [theta] Isentropic temperature [K].\n * @param {float|undefined} [thetae] Equivalent isentropic temperature [K].\n * @param {float|undefined} [wetbulb] Wetbulb isentropic temperature [K].\n * @param {float|undefined} [vtmp] Virtual temperature [K].\n */\n\n/**\n * Options for the constructor.\n * \n * @typedef {Object} module:meteoJS/sounding~options\n * @param {boolean} [calcMissing] - Calculate missing data in each level.\n */\n\n/**\n * Class represents an atmospheric (radio-)sounding.\n */\nexport class Sounding {\n  \n  /**\n   * @param {module:meteoJS/sounding~options} [options] - Options.\n   */\n  constructor({\n    calcMissing = false,\n    parcels = []\n  } = {}) {\n    this.options = {\n      calcMissing\n    };\n    this.levels = {};\n    \n    /**\n     * @type module:meteoJS/base/collection.Collection\n     * @private\n     */\n    this._parcelCollection = new Collection({\n      fireAddRemoveOnReplace: true,\n      fireReplace: false,\n      emptyObjectMaker: () => new Parcel()\n    });\n    this._parcelCollection.append(...parcels);\n  }\n  \n  /**\n   * @type module:meteoJS/base/collection.Collection\n   * @public\n   * @readonly\n   */\n  get parcelCollection() {\n    return this._parcelCollection;\n  }\n  \n  /**\n   * Adds/replaces sounding data.\n   * \n   * @param {module:meteoJS/sounding~levelData[]} levelsData\n   *   Array with data at different levels.\n   * @param {module:meteoJS/sounding~options} [options] - Options.\n   * @returns {module:meteoJS/sounding.Sounding} This.\n   */\n  addLevels(levelsData, options) {\n    levelsData.forEach(function (levelData) {\n      this.addLevel(levelData, options);\n    }, this);\n    return this;\n  }\n\n  /**\n   * Adds/replaces Data for a certain level.\n   * \n   * @param {module:meteoJS/sounding~levelData} levelData - Data to add.\n   * @param {module:meteoJS/sounding~options} [options] - Options.\n   * @returns {module:meteoJS/sounding.Sounding} This.\n   */\n  addLevel(levelData, { calcMissing } = {}) {\n    calcMissing = calcMissing ? calcMissing : this.options.calcMissing;\n    if ('pres' in levelData &&\n      levelData.pres !== undefined) {\n      if (calcMissing)\n        levelData = this.calculateMissingData(levelData);\n      this.levels[levelData.pres] = levelData;\n    }\n    return this;\n  }\n\n  /**\n   * Calculates different parameters, if missing.\n   * \n   * @param {module:meteoJS/sounding~levelData} d - Data.\n   * @returns {module:meteoJS/sounding~levelData} Adjusted data.\n   */\n  calculateMissingData({ pres, hght,\n    u, v, wdir, wspd,\n    tmpk, dwpk,\n    relh, mixr, theta, thetae, wetbulb, vtmp }) {\n    let d = { pres, hght,\n      u, v, wdir, wspd,\n      tmpk, dwpk,\n      relh, mixr, theta, thetae, wetbulb, vtmp };\n  \n    // Height\n    if (d.hght === undefined)\n      d.hght = altitudeISAByPres(d.pres);\n  \n    // Wind\n    if (d.u === undefined &&\n      d.v === undefined &&\n      d.wdir !== undefined &&\n      d.wspd !== undefined) {\n      d.u = d.wspd * Math.sin(d.wdir / 180 * Math.PI);\n      d.v = d.wspd * Math.cos(d.wdir / 180 * Math.PI);\n    }\n    else if (d.u !== undefined &&\n           d.v !== undefined &&\n           d.wdir === undefined &&\n           d.wspd === undefined) {\n      d.wspd = Math.sqrt(Math.pow(d.u, 2) + Math.pow(d.v, 2));\n      d.wdir = Math.arctan(d.u/d.v) / Math.PI * 180;\n    }\n  \n    // Humidity\n    if (d.tmpk !== undefined &&\n      d.dwpk !== undefined) {\n    //if (d.relh === undefined)\n    //  meteoJS.calc.;\n    //if (d.mixr === undefined)\n    //  d.mixr = meteoJS.calc;\n      if (d.theta === undefined)\n        d.theta = potentialTempByTempAndPres(d.tmpk, d.pres);\n      if (d.thetae === undefined)\n        d.thetae =\n        equiPotentialTempByTempAndDewpointAndPres(d.tmpk, d.dwpk, d.pres);\n    }\n    else if (d.mixr !== undefined) {\n      if (d.dwpk === undefined)\n        d.dwpk = dewpointByHMRAndPres(d.mixr, d.pres);\n    }\n  \n    return d;\n  }\n\n  /**\n   * Removes the Data for a certain level (if existing).\n   * \n   * @param {float} pres - Remove the data at this Level [hPa].\n   * @returns {module:meteoJS/sounding.Sounding} this.\n   */\n  removeLevel(pres) {\n    if (pres in this.levels)\n      delete this.levels[pres];\n    return this;\n  }\n\n  /**\n   * Get the data for a specific level. Returns the levelData as passed to the\n   * constructor or addLevel.\n   * \n   * @param {float} pres - Level [hPa].\n   * @returns {module:meteoJS/sounding~levelData|undefined}\n   *   Data at a level, undefined if no data available.\n   */\n  getData(pres) {\n    return (pres in this.levels) ? \n      this.levels[pres] :\n      {\n        pres: undefined,\n        hght: undefined,\n        tmpk: undefined,\n        dwpk: undefined,\n        wdir: undefined,\n        wspd: undefined,\n        u: undefined,\n        v: undefined,\n        relh: undefined,\n        mixr: undefined,\n        theta: undefined,\n        thetae: undefined,\n        wetbulb: undefined,\n        vtmp: undefined\n      };\n  }\n\n  /**\n   * Get data for all defined levels. Upward sorted.\n   * \n   * @returns {module:meteoJS/sounding~levelData[]} Array of all the data.\n   */\n  getLevels() {\n    return Object\n      .keys(this.levels)\n      .map(function (pres) { return +pres; })\n      .sort(function (a,b) { return a-b; });\n  }\n\n  /**\n   * Get nearest level [hPa] with data.\n   * \n   * @param {float} pres Pressure [hPa].\n   * @returns {float|undefined} Level with data or undefined. [hPa]\n   */\n  getNearestLevel(pres) {\n    if (Object.keys(this.levels).length < 1)\n      return undefined;\n    return Object\n      .keys(this.levels)\n      .sort(function (levelA, levelB) {\n        return Math.abs(levelA-pres) - Math.abs(levelB-pres);\n      }).shift();\n  }\n}\nexport default Sounding;","/**\n * @module meteoJS/modelviewer/resource/sounding\n */\nimport Resource from '../Resource.js';\nimport SoundingData from '../../Sounding.js';\n\n/**\n * Options for constructor.\n * \n * @typedef {module:meteoJS/modelviewer/resource~options}\n *   module:meteoJS/modelviewer/resource/sounding~options\n * @param {module:meteoJS/sounding.Sounding} [sounding] - Sounding data.\n */\n\n/**\n * @classdesc Class to describe an sounding resource.\n */\nexport class Sounding extends Resource {\n  \n  /**\n   * @param {module:meteoJS/modelviewer/resource/sounding~options} [options]\n   *   Options.\n   */\n  constructor({ variables = [],\n    datetime = undefined,\n    run = undefined,\n    offset = undefined,\n    sounding = undefined } = {}) {\n    super({\n      variables,\n      datetime,\n      run,\n      offset\n    });\n    \n    /**\n     * @type undefined|module:meteoJS/sounding.Sounding\n     * @private\n     */\n    this._sounding = sounding;\n  }\n  \n  /**\n   * Sounding data.\n   * \n   * @type module:meteoJS/sounding.Sounding\n   */\n  get sounding() {\n    return (this._sounding === undefined) ? new SoundingData() : this._sounding;\n  }\n  set sounding(sounding) {\n    this._sounding = sounding;\n  }\n}\nexport default Sounding;","/**\n * @module meteoJS/modelviewer/resources\n */\nimport addEventFunctions from '../Events.js';\nimport Image from './resource/Image.js';\nimport VariableCollection from './VariableCollection.js';\nimport Node from './Node.js';\n\n/**\n * Triggered on adding and removing Resource-Objects.\n * \n * @event module:meteoJS/modelviewer/resources#change:resources\n * @type {Object}\n * @property {module:meteoJS/modelviewer/resource.Resource} [addedResources] -\n *   Added resources.\n * @property {module:meteoJS/modelviewer/resource.Resource} [removedResources] -\n *   Removed resources.\n */\n\n/**\n * Options for constructor.\n * \n * @typedef {Object} module:meteoJS/modelviewer/resources~options\n * @param {module:meteoJS/modelviewer/node.Node} topNode - Top level node.\n * @param {Set<module:meteoJS/modelviewer/variableCollection.VariableCollection>}\n *   timesVariableCollections - These collections group the top part of the\n *   hierarchy. For NWP, this contains  typically the model and the run\n *   collection.\n */\n\n/**\n * @classdesc Linchpin of the modelviewer. In this class every available\n *   resource is registered. Additionally requests about data per Variable can\n *   be performed, like all available run times of a model or all available\n *   fields of model, etc. The hierarchy via\n *   {@link module:meteoJS/modelviewer/node.Node|Node}\n *   has to be defined before the construction of Resources.\n * \n * @fires module:meteoJS/modelviewer/resources#change:resources\n */\nexport class Resources {\n  \n  constructor({ topNode,\n    timesVariableCollections = [] } = {}) {\n    \n    /**\n     * @type module:meteoJS/modelviewer/variableCollection.VariableCollection\n     * @private\n     */\n    this._topNode = topNode;\n    \n    /**\n     * @type Map<module:meteoJS/modelviewer/node.Node,\n     *           Set<module:meteoJS/modelviewer/variable.Variable>>\n     * @private\n     */\n    this._availableVariablesMap = new Map();\n    \n    /**\n     * @type Set<module:meteoJS/modelviewer/variableCollection.VariableCollection>\n     * @private\n     */\n    this._timesVariableCollections = timesVariableCollections;\n  }\n  \n  /**\n   * VariableCollectionNode that stand on the top of the hierarchy.\n   * \n   * @type module:meteoJS/modelviewer/variableCollection.VariableCollection\n   * @readonly\n   */\n  get topNode() {\n    return this._topNode;\n  }\n  \n  /**\n   * @type module:meteoJS/modelviewer/variableCollection.VariableCollection[]\n   * @readonly\n   */\n  get variableCollections() {\n    let pushChildCollections;\n    pushChildCollections = node => {\n      node.children.forEach(n => {\n        result.push(n.variableCollection);\n        pushChildCollections(n);\n      });\n    };\n    let result = [this.topNode.variableCollection];\n    pushChildCollections(this.topNode);\n    return result;\n  }\n  \n  /**\n   * Map of nodes and their variables (contained in the variableCollection of\n   * the node). For each variable exists at least one resource in this\n   * Resources-object that is defined by this variable.\n   * \n   * @type Map<module:meteoJS/modelviewer/node.Node,\n   *           Set<module:meteoJS/modelviewer/variable.Variable>>\n   * @readonly\n   */\n  get availableVariablesMap() {\n    return this._availableVariablesMap;\n  }\n  \n  /**\n   * Append resources.\n   * \n   * @param {...module:meteoJS/modelviewer/resource.Resource} resources\n   *   Available resources.\n   * @returns {module:meteoJS/modelviewer/resources.Resources} This.\n   * @fires module:meteoJS/modelviewer/resources#change:resources\n   */\n  append(...resources) {\n    let addedResources = [];\n    resources.forEach(resource => {\n      let topNode = this._getTopNodeOfResourceDefinition(resource, this.topNode);\n      if (topNode !== undefined) {\n        let node = this._getTopMostChildWithAllVariables(new Set(resource.variables), topNode, true);\n        if (node !== undefined) {\n          let addedCount = node.append(resource);\n          if (addedCount > 0) {\n            addedResources.push(resource);\n            this._addAvailableVariablesMapByResource(resource);\n          }\n        }\n      }\n    });\n    if (addedResources.length > 0) {\n      // Debounce firing\n      if (INTERNAL_CHANGE_RESOURCES.timeoutId)\n        clearTimeout(INTERNAL_CHANGE_RESOURCES.timeoutId);\n      INTERNAL_CHANGE_RESOURCES.addedResources.push(...addedResources);\n      INTERNAL_CHANGE_RESOURCES.timeoutId = setTimeout(() => {\n        this.trigger('change:resources', {\n          addedResources: INTERNAL_CHANGE_RESOURCES.addedResources\n        });\n        INTERNAL_CHANGE_RESOURCES.addedResources = [];\n      }, 100);\n    }\n    return this;\n  }\n  \n  /**\n   * Adds variables of a resource to _availableVariablesMap.\n   * \n   * @param {module:meteoJS/modelviewer/resource.Resource} resource - Resource.\n   * @private\n   */\n  _addAvailableVariablesMapByResource(resource) {\n    resource.variables.forEach(variable => {\n      if (variable.variableCollection.node === undefined)\n        return;\n      if (!this._availableVariablesMap.has(variable.variableCollection.node))\n        this._availableVariablesMap.set(variable.variableCollection.node, new Set());\n      this._availableVariablesMap.get(variable.variableCollection.node).add(variable);\n    });\n  }\n  \n  /**\n   * Removes resources.\n   * \n   * @param {...module:meteoJS/modelviewer/resource.Resource} resources\n   *   Resources.\n   * @returns {module:meteoJS/modelviewer/resources.Resources} This.\n   * @fires module:meteoJS/modelviewer/resources#change:resources\n   */\n  remove(...resources) {\n    let removedResources = [];\n    let removedNodeResourcesMap = new Map();\n    resources.forEach(resource => {\n      let topNode = this._getTopNodeOfResourceDefinition(resource, this.topNode);\n      if (topNode !== undefined) {\n        let node = this._getTopMostChildWithAllVariables(new Set(resource.variables), topNode, true);\n        if (node !== undefined) {\n          let removedCount = node.remove(resource);\n          if (removedCount > 0) {\n            removedResources.push(resource);\n            if (!removedNodeResourcesMap.has(node))\n              removedNodeResourcesMap.set(node, new Set());\n            removedNodeResourcesMap.get(node).add(resource);\n          }\n        }\n      }\n    });\n    if (removedNodeResourcesMap.size > 0)\n      this._removeAvailableVariablesMapByResources(removedNodeResourcesMap);\n    if (removedResources.length > 0)\n      this.trigger('change:resources', { removedResources });\n    return this;\n  }\n  \n  /**\n   * Removes variables from _availableVariablesMap.\n   * Prerequisite: The resources have already to be removed of the nodes.\n   * \n   * @param {Map<module:meteoJS/modelviewer/node.Node,\n   *         Set<module:meteoJS/modelviewer/resource.Resource>>}\n   *   removedNodeResourcesMap - Map of Nodes with their removed Resources.\n   * @private\n   */\n  _removeAvailableVariablesMapByResources(removedNodeResourcesMap) {\n    let fullCheckVariables = new Set();\n    for (let [node, resourcesSet] of removedNodeResourcesMap.entries()) {\n      let variables = new Set();\n      for (let resource of resourcesSet)\n        resource.variables.forEach(variable => variables.add(variable));\n      for (let variable of variables)\n        if (!node.hasResourcesByVariables(variable))\n          fullCheckVariables.add(variable);\n    }\n    for (let variable of fullCheckVariables) {\n      let node = this.getNodeByVariableCollection(variable.variableCollection);\n      if (!this._hasResourcesOfNodeChildren(node, [ variable ]))\n        if (this._availableVariablesMap.has(node))\n          this._availableVariablesMap.get(node).delete(variable);\n    }\n  }\n  \n  /**\n   * Returns a node of the hierarchy, so that all parents and itself contain\n   * all the passed variables. The returned node is the most top in hierarchy\n   * as possible. If no node is found, an empty node object is returned.\n   * \n   * @param {...module:meteoJS/modelviewer/variable.Variable} variables\n   *   Variables.\n   * @returns {module:meteoJS/modelviewer/node.Node} - Node.\n   */\n  getTopMostNodeWithAllVariables(...variables) {\n    let result =\n      this._getTopMostChildWithAllVariables(new Set(variables), this.topNode, true);\n    return (result === undefined) ? new Node(new VariableCollection()) : result;\n  }\n  \n  /**\n   * Returns first node in hierarchy that contains a VariableCollection which\n   * is part of the definition of the passed resource.\n   * \n   * @param {module:meteoJS/modelviewer/resource.Resource} resource\n   *   Resource.\n   * @param {module:meteoJS/modelviewer/node.Node} node\n   *   Search from 'node' and all the children.\n   * @returns {undefined|module:meteoJS/modelviewer/node.Node}\n   *   Node or undefined if no node is found.\n   * @private\n   */\n  _getTopNodeOfResourceDefinition(resource, node) {\n    if (resource.isDefinedByVariableOf(node.variableCollection))\n      return node;\n    let result = undefined;\n    node.children.forEach(childNode => {\n      if (result !== undefined)\n        result = this._getTopNodeOfResourceDefinition(resource, childNode);\n    });\n    return result;\n  }\n  \n  /**\n   * Returns top most node for which on the way down (beginning from node)\n   * all variables are contained by the VariableCollections of the travelled\n   * nodes.\n   * \n   * @param {Set<module:meteoJS/modelviewer/variable.Variable>} variables\n   *   Variables which have still to be found.\n   * @param {module:meteoJS/modelviewer/node.Node} node - Node.\n   * @param {boolean} bubbleDown - .\n   * @returns {undefined|module:meteoJS/modelviewer/node.Node} Child node.\n   */\n  _getTopMostChildWithAllVariables(variables, node, bubbleDown) {\n    let isVariableContained = false;\n    node.variableCollection.variables.forEach(variable => {\n      if (variables.has(variable)) {\n        isVariableContained = true;\n        variables.delete(variable);\n      }\n    });\n    if (variables.size == 0)\n      return node;\n    else if (node.children.length == 0)\n      return undefined;\n    else if (!isVariableContained &&\n             !bubbleDown)\n      return undefined;\n    let result = undefined;\n    node.children.forEach(childNode => {\n      if (result === undefined)\n        result = this._getTopMostChildWithAllVariables(variables, childNode, bubbleDown);\n    });\n    return result;\n  }\n  \n  /**\n   * Returns node which contains the passed variableCollection\n   * \n   * @param {module:meteoJS/modelviewer/variableCollection.VariableCollection}\n   *   variableCollection\n   *   VariableCollection.\n   * @returns {module:meteoJS/modelviewer/node.Node} Node.\n   */\n  getNodeByVariableCollection(variableCollection) {\n    return (variableCollection.node === undefined)\n      ? new Node(new VariableCollection())\n      : variableCollection.node;\n  }\n  \n  /**\n   * Returns node which contains the variableCollection with the passed Id.\n   * \n   * @param {mixed} id - Id.\n   * @returns {module:meteoJS/modelviewer/node.Node} Node.\n   */\n  getNodeByVariableCollectionId(id) {\n    let result = this._getNodeByVariableCollection(a => id == a.id);\n    return (result === undefined) ? new Node(new VariableCollection()) : result;\n  }\n  \n  /**\n   * Returns node which contains the passed variableCollection.\n   * \n   * @param {Function} compareFunc - Argument is a VariableCollection-object.\n   * @returns {undefined|module:meteoJS/modelviewer/node.Node} Node.\n   * @private\n   */\n  _getNodeByVariableCollection(compareFunc) {\n    return (compareFunc(this.topNode.variableCollection))\n      ? this.topNode\n      : this._findChildNodeByVariableCollection(compareFunc, this.topNode);\n  }\n  \n  /**\n   * Returns a VariableCollection with passed variableCollection of\n   * node's children.\n   * \n   * @param {Function} compareFunc - Argument is a VariableCollection-object.\n   * @param {module:meteoJS/modelviewer/node.Node} parentNode\n   *   Search recursively in this node's children.\n   * @returns {undefined|module:meteoJS/modelviewer/node.Node} Node.\n   * @private\n   */\n  _findChildNodeByVariableCollection(compareFunc, parentNode) {\n    let result;\n    parentNode.children.forEach(n => {\n      if (result === undefined &&\n          compareFunc(n.variableCollection)) {\n        result = n;\n        return;\n      }\n      if (result === undefined &&\n          n.children.length > 0)\n        result = this._findChildNodeByVariableCollection(compareFunc, n);\n    });\n    return result;\n  }\n  \n  /**\n   * Appends an Image-resource. Alias for append(new Image(…)).\n   * \n   * @see module:meteoJS/modelviewer/resource/image.Image\n   * @returns {module:meteoJS/modelviewer/resources.Resources} This.\n   */\n  appendImage({ variables, datetime, run, offset, url }) {\n    this.append(new Image({\n      variables,\n      datetime,\n      run,\n      offset,\n      url\n    }));\n    return this;\n  }\n  \n  /**\n   * Returns the {@link module:meteoJS/modelviewer/variable.Variable|Variable}-Objects\n   * from the {@link module:meteoJS/modelviewer/variableCollection.VariableCollection|collection}\n   *  with content. With this method\n   * you can deactive for example the other variables, so the user can't select\n   * a variable with no resource.\n   * \n   * This means the method returns a subset from the passed collection. For\n   * these Variable-Objects at least one resource is available (in the\n   * {@link meteoJS/modelviewer/variableCollection.VariableCollection#node|node}\n   * of the collection or one of its children). The resources are defined by\n   * on of these Variable-Objects. If you pass 'variables', you can\n   * additionally constrain the returned variables. E.g. you look for all\n   * run's with resources of a model, you pass the model's Variable-Object.\n   * \n   * @param {module:meteoJS/modelviewer/variableCollection.VariableCollection}\n   *   variableCollection\n   *   Return Variables of this VariableCollection.\n   * @param {Object} options - Options.\n   * @param {module:meteoJS/modelviewer/variable.Variable[]} [options.variables]\n   *   Only \n   * @returns {Set<module:meteoJS/modelviewer/variable.Variable>}\n   *   Available variables.\n   */\n  getAvailableVariables(variableCollection, { variables = [] } = {}) {\n    const result = new Set();\n    const _checkVariableInNode = (variable, node) => {\n      if (node.resources.length > 0) {\n        for (const resource of node.resources) {\n          if (resource.isDefinedBy(false, variable, ...variables)) {\n            result.add(variable);\n            return true;\n          }\n        }\n        return false;\n      }\n      for (const n of node.children) {\n        if (_checkVariableInNode(variable, n))\n          return true;\n      }\n      return false;\n    };\n    Array.from(variableCollection).forEach(variable => {\n      _checkVariableInNode(variable, variableCollection.node);\n    });\n    return result;\n  }\n  \n  /**\n   * Traverses all child nodes of the passed node and looks for a resource\n   * that is defined by all of the passed variables. If one child node contains\n   * such a resource, true is returned.\n   * \n   * @param {module:meteoJS/modelviewer/node.Node} node - Node.\n   * @param {module:meteoJS/modelviewer/variable.Variable[]} variables\n   *   Look for resources defined by these variables.\n   * @param {Set} [traversedNode] - Internal Set.\n   * @returns {Boolean} A resource is contained in the child nodes.\n   * @private\n   */\n  _hasResourcesOfNodeChildren(node, variables, traversedNode = new Set()) {\n    for (const n of node.children) {\n      if (traversedNode.has(n))\n        continue;\n      traversedNode.add(n);\n      if (n.hasResourcesByVariables(...variables))\n        return true;\n      if (this._hasResourcesOfNodeChildren(n, variables, traversedNode))\n        return true;\n    }\n  }\n  \n  /**\n   * Returns all times with at least one resource. The resources are defined\n   * by the passed variable. If exact=true, then the resources are exactly\n   * defined by the variables.\n   * With NWP models, you could get all times from a model-run with at least\n   * one resource when you pass the model and run variable object.\n   * If you want to know all available times for a set of variables (e.g. all\n   * available image-plots for the EU-region, from the temperature in a specific\n   * level), then pass exact=true and all the variables.\n   * \n   * @param {Object} [options] - Options.\n   * @param {module:meteoJS/modelviewer/variable.Variable[]} [options.variables]\n   *   Variables.\n   * @param {boolean} [options.exact=false] - When true, only resources which\n   *   are exactly defined by the passed variables are taken into account.\n   * @returns {Date[]} - Sorted upwardly.\n   */\n  getTimesByVariables({\n    variables = [],\n    exact = false\n  } = {}) {\n    const node = this._getTopMostChildWithAllVariables(\n      new Set(variables),\n      this.topNode,\n      true);\n    if (node === undefined)\n      return [];\n    \n    const times = new Set();\n    const collectTimes = node => {\n      node.getResourcesByVariables(exact, ...variables).forEach(resource => {\n        if (resource.datetime !== undefined)\n          times.add(resource.datetime.valueOf());\n      });\n      node.children.forEach(n => collectTimes(n));\n    };\n    collectTimes(node);\n    return [...times].sort().map(t => new Date(t));\n  }\n}\naddEventFunctions(Resources.prototype);\nexport default Resources;\n\n/**\n * @private\n */\nconst INTERNAL_CHANGE_RESOURCES = {\n  timeoutId: undefined,\n  addedResources: []\n};\n","/**\n * @module meteoJS/modelviewer/nwpResources\n */\nimport Resources from './Resources.js';\nimport VariableCollection from './VariableCollection.js';\nimport Node from './Node.js';\nimport Variable from './Variable.js';\nimport TimeVariable from './TimeVariable.js';\n\n/**\n * @classdesc For usage of NWP (numerical weather prediction). This class is\n *   designed to use the modelviewer for NWP.\n */\nexport class NWPResources extends Resources {\n  \n  constructor() {\n    let collections = new Set();\n    ['models', 'runs', 'regions', 'fields', 'levels', 'accumulations', 'thresholds']\n      .forEach(id => collections.add(new VariableCollection({ id })));\n    let nodes = {};\n    for (let collection of collections)\n      nodes[collection.id] = new Node(collection);\n    // build hierarchy\n    nodes.models.appendChild(nodes.runs);\n    nodes.runs.appendChild(nodes.regions);\n    nodes.regions.appendChild(nodes.fields);\n    nodes.fields.appendChild(nodes.levels, nodes.accumulations);\n    nodes.accumulations.appendChild(nodes.thresholds);\n    \n    super({\n      topNode: nodes.models,\n      timesVariableCollections: new Set([nodes.models.variableCollection, nodes.runs.variableCollection])\n    });\n  }\n  \n  /**\n   * Creates a Variable-Object and adds it to the VariableCollection.\n   * \n   * @param {module:meteoJS/modelviewer/variableCollection.VariableCollection}\n   *   variableCollection - VariableCollection.\n   * @param {Object} [options] - Variable options.\n   * @param {mixed} [options.id] - Variable id.\n   * @param {string} [options.name] - Default name.\n   * @param {Object.<string,string>} [options.names] - Names.\n   * @param {string[]} [options.langSortation] - Priority of language codes.\n   * @param {Date|undefined} [option.sdatetime] - Datetime.\n   * @returns {module:meteoJS/modelviewer/nwpResources.NWPResources} This.\n   */\n  addVariable(variableCollection,\n    { id,\n      name = undefined,\n      names = {},\n      langSortation = [],\n      datetime = undefined } = {}) {\n    let variable =\n      (datetime === undefined)\n        ? new Variable({\n          id,\n          name,\n          names,\n          langSortation\n        })\n        : new TimeVariable({\n          id,\n          name,\n          names,\n          langSortation,\n          datetime\n        });\n    variableCollection.append(variable);\n    return this;\n  }\n  \n  /**\n   * Collection of all defined models.\n   * \n   * @type module:meteoJS/modelviewer/variableCollection.VariableCollection\n   * @readonly\n   */\n  get models() {\n    return this.getNodeByVariableCollectionId('models').variableCollection;\n  }\n  \n  /**\n   * Collection of all defined runs.\n   * \n   * @type module:meteoJS/modelviewer/variableCollection.VariableCollection\n   * @readonly\n   */\n  get runs() {\n    return this.getNodeByVariableCollectionId('runs').variableCollection;\n  }\n  \n  /**\n   * Collection of all defined regions.\n   * \n   * @type module:meteoJS/modelviewer/variableCollection.VariableCollection\n   * @readonly\n   */\n  get regions() {\n    return this.getNodeByVariableCollectionId('regions').variableCollection;\n  }\n  \n  /**\n   * Collection of all defined fields.\n   * \n   * @type module:meteoJS/modelviewer/variableCollection.VariableCollection\n   * @readonly\n   */\n  get fields() {\n    return this.getNodeByVariableCollectionId('fields').variableCollection;\n  }\n  \n  /**\n   * Collection of all defined levels.\n   * \n   * @type module:meteoJS/modelviewer/variableCollection.VariableCollection\n   * @readonly\n   */\n  get levels() {\n    return this.getNodeByVariableCollectionId('levels').variableCollection;\n  }\n  \n  /**\n   * Collection of all defined accumulations.\n   * \n   * @type module:meteoJS/modelviewer/variableCollection.VariableCollection\n   * @readonly\n   */\n  get accumulations() {\n    return this.getNodeByVariableCollectionId('accumulations').variableCollection;\n  }\n  \n  /**\n   * Collection of all defined thresholds.\n   * \n   * @type module:meteoJS/modelviewer/variableCollection.VariableCollection\n   * @readonly\n   */\n  get thresholds() {\n    return this.getNodeByVariableCollectionId('thresholds').variableCollection;\n  }\n}\nexport default NWPResources;","/**\n * @module meteoJS/modelviewer/display\n */\nimport $ from 'jquery';\nimport addEventFunctions from '../Events.js';\n\n/**\n * Display initalisation event.\n * \n * @event module:meteoJS/modelviewer/display#init:display\n */\n\n/**\n * VariableCollection add event. Also fired, once the object is assigned to\n * a Container object.\n * \n * @event module:meteoJS/modelviewer/display#add:variableCollection\n * @type {Object}\n * @property {module:meteoJS/modelviewer/variableCollection.VariableCollection}\n *   variableCollection - The added variableCollection.\n */\n\n/**\n * Adding a variable to a variableCollection event. Also fired for each variable\n * in the available variableCollections, once the object is assigned to a\n * Container object.\n * \n * @event module:meteoJS/modelviewer/display#add:variable\n * @type {Object}\n * @property {module:meteoJS/modelviewer/variable.Variable} variable\n *   The added variable.\n */\n\n/**\n * Change visible resource event.\n * \n * @event module:meteoJS/modelviewer/display#change:visibleResource\n * @type {Object}\n */\n\n/**\n * Options for constructor.\n * \n * @typedef {Object}\n * @param\n *   {Iterable.<module:meteoJS/modelviewer/variableCollection.VariableCollection>}\n *   [alwaysAvailableCollections]\n *   Variables from these variableCollections are always available.\n */\n\n/**\n * @classdesc\n * \n * @fires module:meteoJS/modelviewer/display#init:display\n * @fires module:meteoJS/modelviewer/display#add:variableCollection\n * @fires module:meteoJS/modelviewer/display#add:variable\n * @fires module:meteoJS/modelviewer/display#change:visibleResource\n */\nexport class Display {\n  \n  /**\n   * @param {module:meteoJS/modelviewer/display~options} [options] - Options.\n   */\n  constructor({\n    alwaysAvailableCollections = []\n  } = {}) {\n    \n    /**\n     * @type Set<module:meteoJS/modelviewer/variableCollection.VariableCollection>\n     * @private\n     */\n    this._alwaysAvailableCollections = new Set(alwaysAvailableCollections);\n    \n    /**\n     * @type undefined|module:meteoJS/modelviewer.Modelviewer\n     * @private\n     */\n    this._modelviewer = undefined;\n    \n    /**\n     * @type undefined|module:meteoJS/modelviewer/container.Container\n     * @private\n     */\n    this._container = undefined;\n    \n    /**\n     * @type undefined|HTMLElement|jQuery\n     * @private\n     */\n    this._parentNode = undefined;\n    \n    /**\n     * @type undefined|HTMLElement|jQuery\n     * @private\n     */\n    this._resourceNode = undefined;\n    \n    this._resourceOutput = {\n      image: undefined,\n      thermodynamicDiagram: undefined\n    };\n  }\n  \n  /**\n   * @type undefined|module:meteoJS/modelviewer.Modelviewer\n   * @package\n   */\n  get modelviewer() {\n    return this._modelviewer;\n  }\n  set modelviewer(modelviewer) {\n    this._modelviewer = modelviewer;\n    if (this._modelviewer === undefined)\n      return;\n    \n    this._modelviewer.resources.variableCollections.forEach(collection => {\n      collection.on('add:variable', variable => {\n        this.trigger('add:variable', { variable });\n      });\n    });\n  }\n  \n  /**\n   * @type undefined|module:meteoJS/modelviewer/container.Container\n   * @package\n   */\n  get container() {\n    return this._container;\n  }\n  set container(container) {\n    this._container = container;\n    if (this._container === undefined)\n      return;\n    \n    this._container.on('change:visibleResource', () => {\n      this._onChangeVisibleResource();\n    });\n  }\n  \n  /**\n   * @type HTMLElement|jQuery\n   * @package\n   */\n  get parentNode() {\n    return this._parentNode;\n  }\n  set parentNode(parentNode) {\n    this._parentNode = parentNode;\n    this.onInit();\n  }\n  \n  /**\n   * @type undefined|HTMLElement|jQuery\n   * @package\n   */\n  get resourceNode() {\n    return this._resourceNode;\n  }\n  set resourceNode(resourceNode) {\n    this._resourceNode = resourceNode;\n    this._onChangeVisibleResource();\n  }\n  \n  /**\n   * Re-Render this display.\n   */\n  render() {\n    this.onInit();\n    this.onChangeVisibleResource();\n  }\n  \n  /**\n   * @private\n   */\n  onInit() {\n    if (this.parentNode === undefined)\n      return;\n    \n    $(this.parentNode).empty();\n    this.trigger('init:display');\n    if (this._modelviewer === undefined)\n      return;\n    \n    this._modelviewer.resources.variableCollections\n      .forEach(variableCollection => {\n        this.trigger('add:variableCollection', { variableCollection });\n        for (let variable of variableCollection)\n          this.trigger('add:variable', { variable });\n      });\n  }\n\n  /**\n   * Returns a subset of variables of the passed VariableCollection object. For\n   * all of the returned variables, there exists at least one resource. Theses\n   * resources are defined by this variable and the selected variables of the\n   * parent node.\n   * This method isn't enough performant to be executed in loops or recursive\n   * functions.\n   * \n   * @param {Object} options - Options.\n   * @param {module:meteoJS/modelviewer/variableCollection.VariableCollection}\n   *   options.variableCollection - VariableCollection object.\n   * @returns {Set<module:meteoJS/modelviewer/variable.Variable>}\n   *   Available variables.\n   * @public\n   */\n  getAvailableVariables({ variableCollection }) {\n    const variables = this._getParentsVariables(variableCollection.node);\n    return this._modelviewer.resources\n      .getAvailableVariables(variableCollection, { variables });\n  }\n  \n  /**\n   * @private\n   */\n  _getParentsVariables(node, traversedNodes = new Set()) {\n    let result = new Set();\n    node.parents.forEach(parentNode => {\n      if (traversedNodes.has(parentNode))\n        return;\n      traversedNodes.add(parentNode);\n      Array.from(parentNode.variableCollection).forEach(variable => {\n        if (this._container.selectedVariables.has(variable))\n          result.add(variable);\n      });\n      const parentResult = this._getParentsVariables(parentNode, traversedNodes);\n      if (parentResult.size > 0)\n        result = new Set([...result, ...parentResult]);\n    });\n    return result;\n  }\n  \n  /**\n   * @private\n   */\n  _onChangeVisibleResource() {\n    if (this._resourceNode === undefined) {\n      this.trigger('change:visibleResource');\n      return;\n    }\n    if (this._container === undefined)\n      return;\n    \n    let visibleResource = this._container.visibleResource;\n    if ('url' in visibleResource) {\n      if (this.thermodynamicDiagram !== undefined) {\n        this.thermodynamicDiagram = undefined;\n        $(this._resourceNode).empty();\n      }\n      if (this._resourceOutput.image === undefined) {\n        $(this._resourceNode).empty();\n        this._resourceOutput.image = $('<img>').css({ 'max-width': '100%' });\n        $(this._resourceNode).append(this._resourceOutput.image);\n      }\n      this._resourceOutput.image.attr('src', visibleResource.url);\n    }\n    else if ('sounding' in visibleResource) {\n      if (this._resourceOutput.image !== undefined) {\n        this._resourceOutput.image = undefined;\n        $(this._resourceNode).empty();\n      }\n      /*if (this._resourceOutput.thermodynamicDiagram === undefined)\n        this._resourceOutput.thermodynamicDiagram = new ThermodynamicDiagram({\n          renderTo: $(this._resourceNode)\n        });*/\n      let isAppended = false;\n      this._resourceOutput.thermodynamicDiagram.soundings.forEach(sounding => {\n        if (sounding.getSounding() === visibleResource.sounding) {\n          isAppended = true;\n          sounding.visible(true);\n        }\n        else\n          sounding.visible(false);\n      });\n      if (!isAppended)\n        this._resourceOutput.thermodynamicDiagram\n          .addSounding(visibleResource.sounding);\n    }\n    else {\n      if (this._resourceOutput.image !== undefined) {\n        this._resourceOutput.image = undefined;\n        $(this._resourceNode).empty();\n      }\n      if (this._resourceOutput.thermodynamicDiagram !== undefined)\n        this._resourceOutput.thermodynamicDiagram.soundings\n          .forEach(sounding => sounding.visible(false));\n    }\n  }\n}\naddEventFunctions(Display.prototype);\nexport default Display;","/**\n * @module meteoJS/modelviewer/container\n */\nimport Unique from '../base/Unique.js';\nimport addEventFunctions from '../Events.js';\nimport Resource from './Resource.js';\nimport Node from './Node.js';\nimport Display from './Display.js';\nimport Variable from './Variable.js';\nimport VariableCollection from './VariableCollection.js';\n\n/**\n * Triggered, when visible Resource changes.\n * \n * @event module:meteoJS/modelviewer/container#change:enabledResources\n * @type {Object}\n * @property {Object} options - Options.\n * @property {Map.<integer,module:meteoJS/modelviewer/resource.Resource>}\n *   [options.enabledResources] - Enabled resources, selected by selectedVariables.\n */\n\n/**\n * Triggered, when visible Resource changes.\n * \n * @event module:meteoJS/modelviewer/container#change:visibleResource\n */\n\n/**\n * Triggered, when displayVariables is changed.\n * \n * @event module:meteoJS/modelviewer/container#change:displayVariables\n * @type {Object}\n * @property {Object} options - Options.\n * @property {Set.<module:meteoJS/modelviewer/variable.Variable>}\n *   [options.addedVariables] - Added variables to displayVariables.\n * @property {Set.<module:meteoJS/modelviewer/variable.Variable>}\n *   [options.removedVariables] - Removed variables to displayVariables.\n */\n\n/**\n * Triggered, when selectedVariables is changed.\n * \n * @event module:meteoJS/modelviewer/container#change:selectedVariables\n * @type {Object}\n * @property {Object} options - Options.\n * @property {Set.<module:meteoJS/modelviewer/variable.Variable>}\n *   [options.addedVariables] - Added variables to selectedVariables.\n * @property {Set.<module:meteoJS/modelviewer/variable.Variable>}\n *   [options.removedVariables] - Removed variables to selectedVariables.\n */\n\n/**\n * If a suitable resource is searched, this method will be called several times.\n * The first argument ist a list of variables. These variables are collected of\n * one hierarchy level, defined by the\n * {@link module:meteoJS/modelviewer/resources.Resources|resources object}.\n * The method returns an ordered list of these passed variables (or a subset).\n * For these variables, further down in the hierarchy, a possible resource is\n * searched. If one is found, this variable will be used for selectedVariables.\n * Method is only used if adaptSuitableResource is enabled. Default algorythm is\n * to return the list in the order of the Iterator.\n * \n * @typedef {Function} module:meteoJS/modelviewer/container~getPossibleVariables\n * @param {module:meteoJS/modelviewer/variable.Variable[]}\n *   possibleSelectedVariables - Variables to return an ordered list.\n * @param {Set<module:meteoJS/modelviewer/variable.Variable>}\n *   selectedVariables - Already selected variables so far, top-down in\n *   hierarchy.\n * @returns {module:meteoJS/modelviewer/variable.Variable[]} - Ordered list.\n */\n\n/**\n * With the passed selectedVariables, the method determines if already a\n * suitable resource should be selected. If method returns true, the property\n * selectedVariables will be set by the passed Set.\n * Method used if adaptSuitableResource is enabled. Default algorythm is to\n * return true if the Node of the lastAddedVariable contains resources.\n * \n * @typedef {Function} module:meteoJS/modelviewer/container~isResourceSelected\n * @param {Set<module:meteoJS/modelviewer/variable.Variable>}\n *   selectedVariables - Selected variables so far.\n * @param {undefined|module:meteoJS/modelviewer/variable.Variable}\n *   lastAddedVariable - Last added variable to selectedVariables.\n * @returns {boolean} - True if a suitable resource should be selected with the\n *   current state of selectedVariables.\n */\n\n/**\n * Options to adapt a suitable resource to display.\n * \n * @typedef {Object}\n *   module:meteoJS/modelviewer/container~adaptSuitableResource\n * @param {boolean} enabled - Enabled adapt suitable resource.\n * @param {module:meteoJS/modelviewer/container~getPossibleVariables}\n *   getPossibleVariables - Determines order of variables of a hierarchy level.\n * @param {module:meteoJS/modelviewer/container~isResourceSelected}\n *   isResourceSelected - Is selectedVariables complete.\n */\n\n/**\n * Options for constructor.\n * \n * @typedef {module:meteoJS/base/unique~options}\n *   module:meteoJS/modelviewer/container~options\n * @param {module:meteoJS/modelviewer/display.Display} [display]\n *   Display object to output the container content to DOM.\n * @param {module:meteoJS/modelviewer/container~adaptSuitableResource}\n *   [adaptSuitableResource] - Options for adapt suitable resource.\n */\n\n/**\n * This object represents a container, that displays one resource.\n * Via displayVariables the appropriate resource is chosen.\n * \n * @extends module:meteoJS/base/unique.Unique\n * @fires module:meteoJS/modelviewer/container#change:visibleResource\n * @fires module:meteoJS/modelviewer/container#change:enabledResources\n * @fires module:meteoJS/modelviewer/container#change:displayVariables\n * @fires module:meteoJS/modelviewer/container#change:selectedVariables\n */\nexport class Container extends Unique {\n\n  /**\n   * @param {module:meteoJS/modelviewer/container~options} [options] - Options.\n   */\n  constructor({\n    id,\n    display = undefined,\n    adaptSuitableResource = {}\n  } = {}) {\n    super({\n      id\n    });\n    \n    /**\n     * @type undefined|module:meteoJS/modelviewer/display.Display\n     * @private\n     */\n    this._display = (display === undefined) ? new Display() : display;\n    this._display.modelviewer = this.modelviewer;\n    this._display.container = this;\n    this._display.parentNode = this._containerNode;\n    \n    /**\n     * @type module:meteoJS/modelviewer/container~adaptSuitableResource\n     * @private\n     */\n    this._adaptSuitableResource = {};\n    this._initAdaptSuitableResource(adaptSuitableResource);\n    \n    /**\n     * @type undefined|module:meteoJS/modelviewer.Modelviewer\n     * @private\n     */\n    this._modelviewer = undefined;\n    \n    /**\n     * @type undefined|module:meteoJS/modelviewer/resource.Resource\n     * @private\n     */\n    this._visibleResource;\n    \n    /**\n     * @type Set<module:meteoJS/modelviewer/variable.Variable>\n     * @private\n     */\n    this._displayVariables = new Set();\n    \n    /**\n     * @type Map.<module:meteoJS/modelviewer/variableCollection.VariableCollection,module:meteoJS/modelviewer/variable.Variable>\n     * @private\n     */\n    this._selectedVariables = new Map();\n    \n    /**\n     * @type module:meteoJS/modelviewer/node.Node|undefined\n     * @private\n     */\n    this._selectedNode = undefined;\n    \n    /**\n     * @type Map<integer,module:meteoJS/modelviewer/resource.Resource>\n     * @private\n     */\n    this._enabledResources = new Map();\n    \n    /**\n     * @type undefined|external:HTMLElement\n     * @private\n     */\n    this._containerNode = undefined;\n\n    /**\n     * Function to call change:selectedVariables debouncec.\n     * \n     * @type Function\n     * @private\n     */\n    this._debouncedChangeSelectedVariables = (() => {\n      let timeoutId;\n      let totalAddedVariables = new Set();\n      let totalRemovedVariables = new Set();\n      return ({ addedVariables, removedVariables }) => {\n        for (const v of addedVariables)\n          if (totalRemovedVariables.has(v))\n            totalRemovedVariables.delete(v);\n        for (const v of removedVariables)\n          if (totalAddedVariables.has(v))\n            totalAddedVariables.delete(v);\n        totalAddedVariables = new Set([...totalAddedVariables, ...addedVariables]);\n        totalRemovedVariables = new Set([...totalRemovedVariables, ...removedVariables]);\n        /*console.log([\n          [...addedVariables].map(v => v.id),\n          [...removedVariables].map(v => v.id),\n          [...totalAddedVariables].map(v => v.id),\n          [...totalRemovedVariables].map(v => v.id),\n        ]);*/\n        clearTimeout(timeoutId);\n        timeoutId = setTimeout(() => {\n          this.trigger('change:selectedVariables', {\n            addedVariables: totalAddedVariables,\n            removedVariables: totalRemovedVariables\n          });\n          totalAddedVariables.clear();\n          totalRemovedVariables.clear();\n        }, 300);\n      };\n    })();\n    \n    /**\n     * @type Object<string,Object<string,mixed>>\n     * @private\n     */\n    this._listeners = {\n      mirror: [],\n      timeline: {\n        timeline: undefined,\n        listenerKey: undefined\n      },\n      resources: {\n        resources: undefined,\n        listenerKey: undefined\n      }\n    };\n  }\n  \n  /**\n   * Display object to generate dom output.\n   * \n   * @type undefined|module:meteoJS/modelviewer/display.Display\n   * @readonly\n   */\n  get display() {\n    return this._display;\n  }\n  \n  /**\n   * This container belongs to this modelviewer object.\n   * \n   * @type undefined|module:meteoJS/modelviewer.Modelviewer\n   * @package\n   */\n  get modelviewer() {\n    return this._modelviewer;\n  }\n  set modelviewer(modelviewer) {\n    this._modelviewer = modelviewer;\n    if (this._modelviewer === undefined) {\n      if (this._listeners.timeline.listenerKey !== undefined)\n        this._listeners.timeline.timeline\n          .un('change:time', this._listeners.timeline.listenerKey);\n      if (this._listeners.resources.listenerKey !== undefined)\n        this._listeners.resources.resources\n          .un('change:resources', this._listeners.resources.listenerKey);\n      return;\n    }\n    this._display.modelviewer = modelviewer;\n    \n    this._listeners.timeline.timeline = this._modelviewer.timeline;\n    this._listeners.timeline.listenerKey = this._modelviewer.timeline\n      .on('change:time', () => this._setVisibleResource());\n    this._listeners.resources.resources = this._modelviewer.resources;\n    this._listeners.resources.listenerKey = this._modelviewer.resources\n      .on('change:resources', () => {\n        this._setTimes();\n        this._setEnabledResources();\n        this._updateSelectedVariables();\n      });\n    this._setTimes();\n  }\n  \n  /**\n   * DOM node to append container's output.\n   * \n   * @type undefined|external:HTMLElement\n   * @package\n   */\n  get containerNode() {\n    return this._containerNode;\n  }\n  set containerNode(containerNode) {\n    this._containerNode = containerNode;\n    if (this._containerNode === undefined)\n      return;\n    this._display.parentNode = this._containerNode;\n  }\n  \n  /**\n   * Currently visible resource. Could be an empty resource.\n   * \n   * @type module:meteoJS/modelviewer/resource.Resource\n   * @readonly\n   */\n  get visibleResource() {\n    return (this._visibleResource === undefined) ?\n      new Resource() : this._visibleResource;\n  }\n  \n  /**\n   * These variables define, which resource is displayed.\n   * If adaptSuitableResource is not enabled, then the displayed resource is\n   * exactly defined by these variables (and additionally the datetime selected\n   * by the timeline object). If adaptSuitableResource is enabled, then a\n   * resource is displayed, that matches the variables but can be defined by\n   * additional variables.\n   * Setter allows Set or Array. Getter returns always Set.\n   * \n   * @type Set<module:meteoJS/modelviewer/variable.Variable>\n   */\n  get displayVariables() {\n    return this._displayVariables;\n  }\n  set displayVariables(variables) {\n    let addedVariables = new Set();\n    variables = new Set(variables);\n    for (let variable of variables)\n      if (!this._displayVariables.has(variable))\n        addedVariables.add(variable);\n    let removedVariables = new Set();\n    for (let displayVariable of this.displayVariables)\n      if (!variables.has(displayVariable))\n        removedVariables.add(displayVariable);\n    if (\n      addedVariables.size > 0 ||\n      removedVariables.size > 0\n    ) {\n      this._displayVariables = variables;\n      this._updateSelectedVariables({\n        addedVariables,\n        removedVariables\n      });\n      this.trigger(\n        'change:displayVariables',\n        { addedVariables, removedVariables }\n      );\n    }\n  }\n  \n  /**\n   * These variables define excactly, which resource will be displayed. These\n   * variables are retrieved from the available resources and displayVariables.\n   * Together with the selected time in the timeline, the resource to display\n   * is uniquely defined.\n   * If adaptSuitableResource is not enabled, selectedVariables is equal to\n   * displayVariables.\n   * \n   * @type Set<module:meteoJS/modelviewer/variable.Variable>\n   * @readonly\n   */\n  get selectedVariables() {\n    return new Set([...this._selectedVariables.values()]);\n  }\n\n  /**\n   * Returns the selected Variable of a VariableCollection. If no selected\n   * variable exists, an empty Variable-Object will be returned.\n   * \n   * @param {module:meteoJS/modelviewer/variableCollection.VariableCollection}\n   *   variableCollection - VariableCollection.\n   * @returns {module:meteoJS/modelviewer/variable.Variable}\n   *   The selected Variable of the colleciton.\n   */\n  getSelectedVariable(variableCollection) {\n    const result = this._selectedVariables.get(variableCollection);\n    return (result === undefined) ? new Variable({ id: undefined }) : result;\n  }\n  \n  /**\n   * Returns an array of times (for the timeline). For all of these times, there\n   * exists resources which match with the current displayVariables.\n   * \n   * @type Date[]\n   * @readonly\n   */\n  get enabledTimes() {\n    return [...this._enabledResources.keys()]\n      .filter(datetime => !isNaN(datetime))\n      .map(datetime => new Date(datetime));\n  }\n  \n  /**\n   * Exchanges variables in displayVariables. The variable with the same\n   * Collection will be exchanged. If none is found, the variable will be added.\n   * \n   * @param {Set<module:meteoJS/modelviewer/variable.Variable>} variables\n   *   Add these variables to the set of displayVariables.\n   * @returns {module:meteoJS/modelviewer/container.Container} - This.\n   * @fires module:meteoJS/modelviewer/container#change:displayVariables\n   */\n  exchangeDisplayVariable(variables) {\n    let displayVariables = new Set(this.displayVariables);\n    for (let variable of variables)\n      for (let displayVariable of this.displayVariables)\n        if (displayVariable.variableCollection ===\n            variable.variableCollection) {\n          displayVariables.delete(displayVariable);\n          displayVariables.add(variable);\n        }\n    for (let variable of variables)\n      if (!displayVariables.has(variable))\n        displayVariables.add(variable);\n    this.displayVariables = displayVariables;\n    return this;\n  }\n  \n  /**\n   * Mirrors (parts of) the displayVariables form another container. With this\n   * feature, e.g. in different containers can be viewed plots of different\n   * models. If you change e.g. the field in the first container, all other\n   * containers, that mirrors form this container, will also change the viewed\n   * content. It is possible to mirror different VariableCollections from\n   * different containers.\n   * \n   * @param {module:meteoJS/modelviewer/container.Container} [container]\n   *   Mirrors from this container.\n   * @param {module:meteoJS/modelviewer/variableCollection.VariableCollection[]}\n   *   [variableCollections] - The displayVariables of these VariableCollections\n   *   are mirrored. If omitted, all VariableCollections are mirrored.\n   */\n  mirrorsFrom(container = undefined, variableCollections = undefined) {\n    this._listeners.mirror =\n      this._listeners.mirror.filter(mirrorConfig => {\n        if (mirrorConfig.container === container\n          || container === undefined) {\n          mirrorConfig.container\n            .un('change:displayVariables', mirrorConfig.listenerKey);\n          return false;\n        }\n        return true;\n      });\n    if (container === undefined)\n      return;\n    if (variableCollections !== undefined\n      && variableCollections.length < 1)\n      return;\n    if (variableCollections === undefined)\n      variableCollections = this.modelviewer.resources.variableCollections;\n    const onChangeDisplayVariables = () => {\n      const newDisplayVariables = new Set();\n      for (const variable of container.displayVariables)\n        variableCollections.forEach(collection => {\n          if (variable.variableCollection === collection)\n            newDisplayVariables.add(variable);\n        });\n      this.exchangeDisplayVariable(newDisplayVariables);\n    };\n    const listenerKey = container\n      .on('change:displayVariables', onChangeDisplayVariables);\n    const mirrorConfig = {\n      container,\n      listenerKey,\n      variableCollections\n    };\n    this._listeners.mirror.forEach(mC => {\n      const newVariableCollection = [];\n      mC.variableCollections.forEach(collection => {\n        let isContained = false;\n        variableCollections.forEach(variableCollection => {\n          if (variableCollection === collection)\n            isContained = true;\n        });\n        if (!isContained)\n          newVariableCollection.push(collection);\n      });\n      if (newVariableCollection.length < mC.variableCollections.length)\n        this.mirrorsFrom(mC.container, newVariableCollection);\n    });\n    this._listeners.mirror.push(mirrorConfig);\n    onChangeDisplayVariables();\n  }\n\n  /**\n   * Get all containers, from which this container mirrors some variables from.\n   * As values of the returned Map-Object an array with the mirrored\n   * VariableColletions is returned.\n   * \n   * @returns {Map.<module:meteoJS/modelviewer/container.Container,module:meteoJS/modelviewer/variableCollection.VariableCollection[]>}\n   */\n  getMirrorsFrom() {\n    const result = new Map();\n    this._listeners.mirror.forEach(mirrorConfig => {\n      result.set(mirrorConfig.container, mirrorConfig.variableCollections);\n    });\n    return result;\n  }\n  \n  /**\n   * Sets all available times in the timeline object for this container.\n   * \n   * @private\n   */\n  _setTimes() {\n    let [selectedVariables] =\n      this._getSelectedVariablesWithResources(\n        [this.modelviewer.resources.topNode],\n        new Set(),\n        undefined,\n        selectedVariables => {\n          let result = true;\n          this.modelviewer.resources._timesVariableCollections.forEach(collection => {\n            let contained = false;\n            for (let selectedVariable of selectedVariables) {\n              if (collection.contains(selectedVariable))\n                contained = true;\n            }\n            if (!contained)\n              result = false;\n          });\n          return result;\n        }\n      );\n    \n    if (selectedVariables === undefined)\n      selectedVariables = new Set();\n    \n    const availableTimes = (selectedVariables.size == 0)\n      ? []\n      : this.modelviewer.resources\n        .getTimesByVariables({ variables: selectedVariables });\n    this.modelviewer.timeline.setTimesBySetID(this.id, availableTimes);\n  }\n  \n  /**\n   * Updates the selected variables, according to displayVariables.\n   * \n   * @private\n   */\n  _updateSelectedVariables({\n    addedVariables = undefined,\n    removedVariables = undefined\n  } = {}) {\n    if (!this._adaptSuitableResource.enabled) {\n      let selectedNode = undefined;\n      const findFirstNodeWithVariable = node => {\n        if (node.hasResourcesByVariables(true, ...this.displayVariables))\n          selectedNode = node;\n        else\n          for (const childNode of node.children)\n            findFirstNodeWithVariable(childNode);\n      };\n      findFirstNodeWithVariable(this.modelviewer.resources.topNode);\n      this._setSelectedVariables(this.displayVariables, selectedNode);\n      return;\n    }\n\n    let nodes = [];\n    const sV = new Set();\n    let lSV = undefined;\n    if (addedVariables === undefined || removedVariables === undefined)\n      nodes.push(this.modelviewer.resources.topNode);\n    else {\n      const findFirstNodeWithVariable = node => {\n        let isFound = false;\n        for (const variable of [...addedVariables, ...removedVariables]) {\n          if (variable.variableCollection.node === node) {\n            nodes.push(node);\n            isFound = true;\n            break;\n          }\n        }\n        if (!isFound) {\n          const tempSV = this.getSelectedVariable(node.variableCollection);\n          if (tempSV.id !== undefined) {\n            lSV = tempSV;\n            sV.add(lSV);\n            for (const childNode of node.children)\n              findFirstNodeWithVariable(childNode);\n          }\n        }\n      };\n      findFirstNodeWithVariable(this.modelviewer.resources.topNode);\n      nodes = nodes.filter((n,i,a) => i===a.indexOf(n));\n      if (nodes.length < 1)\n        nodes.push(this.modelviewer.resources.topNode);\n    }\n    let [selectedVariables, lastSelectedVariable] =\n      this._getSelectedVariablesWithResources(\n        nodes,\n        sV,\n        lSV\n      );\n    \n    let node;\n    if (selectedVariables === undefined) {\n      selectedVariables = sV;\n      node = (lSV !== undefined)\n        ? lSV.variableCollection.node\n        : new Node({ variableCollection: new VariableCollection() });\n    }\n    else\n      node = lastSelectedVariable.variableCollection.node;\n    this._setSelectedVariables(selectedVariables, node);\n  }\n  \n  /**\n   * @typedef result_getSelectedVariablesWithResources\n   * @type {Array}\n   * @property {undefined|Set<module:meteoJS/modelviewer/variable.Variable>} 0\n   * @property {undefined|module:meteoJS/modelviewer/variable.Variable} 1\n   */\n  \n  /**\n   * \n   * \n   * @param {Set<module:meteoJS/modelviewer/node.Node>} nodes - Nodes to check.\n   * @param {Set<module:meteoJS/modelviewer/variable.Variable>}\n   *   selectedVariables - Selected Variables from top until this node.\n   * @returns {result_getSelectedVariablesWithResources}\n   *   Array with first element the SelectedVariables, second element the last\n   *   selectedVariable (node most down in the tree).\n   * @private\n   */\n  _getSelectedVariablesWithResources(\n    nodes,\n    selectedVariables,\n    lastSelectedVariable,\n    isResourceSelected = this._adaptSuitableResource.isResourceSelected\n  ) {\n    if (isResourceSelected.call(this, selectedVariables, lastSelectedVariable))\n      return [selectedVariables, lastSelectedVariable];\n    \n    let result = [undefined, undefined];\n    const checkPossibleVariable = possibleSelectedVariable => {\n      let tempSelectedVariables = new Set(selectedVariables);\n      tempSelectedVariables.add(possibleSelectedVariable);\n      let [resultSelectedVariables, resultLastSelectedVariable] =\n        this\n          ._getSelectedVariablesWithResources(\n            possibleSelectedVariable.variableCollection.node.children,\n            tempSelectedVariables,\n            possibleSelectedVariable,\n            isResourceSelected\n          );\n      if (resultSelectedVariables !== undefined) {\n        result[0] = resultSelectedVariables;\n        result[1] = resultLastSelectedVariable;\n        return;\n      }\n      \n      let isOnlyTimesVariables = true;\n      for (let selectedVariable of tempSelectedVariables) {\n        let contained = false;\n        this.modelviewer.resources._timesVariableCollections.forEach(collection => {\n          if (collection.contains(selectedVariable))\n            contained = true;\n        });\n        if (!contained)\n          isOnlyTimesVariables = false;\n      }\n      if (isOnlyTimesVariables &&\n          tempSelectedVariables.size == this.modelviewer.resources._timesVariableCollections.size) {\n        result[0] = tempSelectedVariables;\n        result[1] = possibleSelectedVariable;\n      }\n    };\n\n    let availableSelectedVariables = [];\n    for (let childNode of nodes) {\n      if (this.modelviewer.resources.availableVariablesMap.has(childNode) &&\n          this.modelviewer.resources.availableVariablesMap.get(childNode).size)\n        for (const variable of childNode.variableCollection) {\n          if (!this.modelviewer.resources\n            .availableVariablesMap.get(childNode).has(variable))\n            continue;\n          if (this.displayVariables.has(variable))\n            checkPossibleVariable(variable);\n          else if (this._adaptSuitableResource.enabled)\n            availableSelectedVariables.push(variable);\n          if (result[0] !== undefined)\n            break;\n        }\n      if (result[0] !== undefined)\n        break;\n    }\n    if (result[0] !== undefined)\n      return result;\n    \n    const possibleSelectedVariables = this._adaptSuitableResource\n      .getPossibleVariables\n      .call(this, availableSelectedVariables, selectedVariables);\n    for (const variable of possibleSelectedVariables) {\n      checkPossibleVariable(variable);\n      if (result[0] !== undefined)\n        break;\n    }\n    \n    return result;\n  }\n  \n  /**\n   * @param {Set<module:meteoJS/modelviewer/variable.Variable>}\n   *   selectedVariables - New selectedVariables.\n   * @param {module:meteoJS/modelviewer/node.Node} selectedNode\n   *   Selectes resources from this Node.\n   * @private\n   */\n  _setSelectedVariables(selectedVariables, selectedNode) {\n    let addedVariables = new Set();\n    selectedVariables = new Set(selectedVariables);\n    for (let variable of selectedVariables)\n      if (!this.selectedVariables.has(variable))\n        addedVariables.add(variable);\n    let removedVariables = new Set();\n    for (let selectedVariable of this.selectedVariables)\n      if (!selectedVariables.has(selectedVariable))\n        removedVariables.add(selectedVariable);\n    if (\n      addedVariables.size > 0 ||\n      removedVariables.size > 0 ||\n      this._selectedNode !== selectedNode\n    ) {\n      this._selectedVariables.clear();\n      for (const variable of selectedVariables)\n        this._selectedVariables.set(variable.variableCollection, variable);\n      this._selectedNode = selectedNode;\n      this._setTimes();\n      this._setEnabledResources();\n      this._debouncedChangeSelectedVariables({\n        addedVariables,\n        removedVariables\n      });\n    }\n  }\n  \n  /**\n   * Sets internally _enabledResources. These resources are selected by\n   * selectedVariable. The visibleResource is determined from this resources.\n   * \n   * @private\n   */\n  _setEnabledResources() {\n    this._enabledResources.clear();\n    if (this._selectedNode === undefined)\n      return;\n    if (this.selectedVariables.size != 0)\n      this._selectedNode\n        .getResourcesByVariables(true, ...this.selectedVariables)\n        .filter(r => r.datetime && !isNaN(r.datetime.valueOf()))\n        .forEach(r => this._enabledResources.set(r.datetime.valueOf(), r));\n    this.modelviewer.timeline\n      .setEnabledTimesBySetID(this.id, this.enabledTimes);\n    this.trigger('change:enabledResources', this._enabledResources);\n    this._setVisibleResource();\n  }\n  \n  /**\n   * Sets visible resource.\n   * \n   * @private\n   */\n  _setVisibleResource() {\n    let oldVisibleResource = this._visibleResource;\n    let datetime = this.modelviewer.timeline.getSelectedTime().valueOf();\n    if (this._enabledResources.has(datetime))\n      this._visibleResource = this._enabledResources.get(datetime);\n    else\n      this._visibleResource = undefined;\n    if (this._visibleResource !== oldVisibleResource)\n      this.trigger('change:visibleResource');\n  }\n  \n  /**\n   * Inits private property _adaptSuitableResource.\n   * \n   * @param {module:meteoJS/modelviewer/container~adaptSuitableResource}\n   *   [adaptSuitableResource] - Adapt suitable resource.\n   * @private\n   */\n  _initAdaptSuitableResource({ enabled = true,\n    getPossibleVariables = undefined,\n    isResourceSelected = undefined,\n    //excludeVariableCollectionFromSimiliarDisplay = []\n  } = {}) {\n    this._adaptSuitableResource = {\n      enabled,\n      getPossibleVariables,\n      isResourceSelected\n    };\n    \n    if (this._adaptSuitableResource.getPossibleVariables === undefined)\n      this._adaptSuitableResource.getPossibleVariables =\n        availableSV => availableSV;\n    if (this._adaptSuitableResource.isResourceSelected === undefined)\n      this._adaptSuitableResource.isResourceSelected =\n      (selectedVariables, lastAddedVariable) => {\n        if (lastAddedVariable === undefined)\n          return false;\n        let resources = lastAddedVariable.variableCollection\n          .node.getResourcesByVariables(true, ...selectedVariables);\n        return resources.length > 0;\n      };\n  }\n}\naddEventFunctions(Container.prototype);\nexport default Container;","const __WEBPACK_NAMESPACE_OBJECT__ = SVG;","/**\n * @module meteoJS/thermodynamicDiagram/functions\n */\nimport { windspeedMSToKN } from '../calc.js';\n\n/**\n * Definition of a line style. Some properties misses.\n * \n * @typedef {Object} module:meteoJS/thermodynamicDiagram~lineStyleOptions\n * @property {string} [color='black'] - Color.\n * @property {number} [width=1] - Width.\n * @property {undefined|number} [opacity=undefined] - Opacity.\n * @property {'butt'|'round'|'square'} [linecap=undefined] - Linecap.\n * @property {'arcs'|'bevel'|'miter'|'miter-clip'|'round'} [linejoin=undefined]\n *   Linejoin.\n * @property {string} [dasharray=undefined] - Dasharray.\n * @property {number|string} [dashoffset=undefined] - Dashoffset.\n */\n\n/**\n * Returns normalized lineStyle-Options.\n * \n * @param {module:meteoJS/thermodynamicDiagram~lineStyleOptions}\n *   [options] - Options.\n * @param {module:meteoJS/thermodynamicDiagram~lineStyleOptions}\n *   [defaults] - Optional defaults.\n * @returns {module:meteoJS/thermodynamicDiagram~lineStyleOptions}\n *   Normalized options.\n * @private\n */\nexport function getNormalizedLineStyleOptions({\n  color = undefined,\n  width = undefined,\n  ...result\n} = {}, defaults = {}) {\n  result.color = getFirstDefinedValue(color, defaults.color, 'black');\n  result.width = getFirstDefinedValue(width, defaults.width, 1);\n  Object.keys(defaults).forEach(key => {\n    if (key != 'color' && key != 'width' && result[key] === undefined)\n      result[key] = defaults[key];\n  });\n  return result;\n}\n\n/**\n * Definition of font options. Some properties misses.\n * \n * @typedef {Object} module:meteoJS/thermodynamicDiagram~fontOptions\n * @param {mixed} [size=12] - Size.\n * @param {mixed} [color='black'] - Color.\n * @param {'start'|'middle'|'end'} [anchor=undefined] - Anchor.\n */\n\n/**\n * Returns normalized font-Options.\n * \n * @param {module:meteoJS/thermodynamicDiagram~fontOptions}\n *   [options] - Options.\n * @param {module:meteoJS/thermodynamicDiagram~fontOptions}\n *   [defaults] - Optional defaults.\n * @returns {module:meteoJS/thermodynamicDiagram~fontOptions}\n *   Normalized options.\n * @private\n */\nexport function getNormalizedFontOptions({\n  size = undefined,\n  color = undefined,\n  anchor = undefined,\n  ...result\n} = {}, defaults = {}) {\n  result.size = getFirstDefinedValue(size, defaults.size, 12);\n  result.color = getFirstDefinedValue(color, defaults.color, 'black');\n  anchor = getFirstDefinedValue(anchor, defaults.anchor);\n  if (anchor !== undefined)\n    result.anchor = anchor;\n  Object.keys(defaults).forEach(key => {\n    if (key != 'color' && key != 'size' && key != 'anchor'\n      && result[key] === undefined)\n      result[key] = defaults[key];\n  });\n  return result;\n}\n\n/**\n * A line with its visibility and style.\n * \n * @typedef {Object} module:meteoJS/thermodynamicDiagram~lineOptions\n * @param {boolean} [visible=true] - Visibility of the line.\n * @param {module:meteoJS/thermodynamicDiagram~lineStyleOptions}\n *   [style] - Line style.\n */\n\n/**\n * Returns normalized line options with visibility and line style.\n * \n * @param {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   [options] - Options.\n * @param {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   [defaults] - Optional defaults.\n * @returns {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   Normalized options.\n * @internal\n */\nexport function getNormalizedLineOptions({\n  visible = undefined,\n  style = {}\n} = {}, defaults = {}) {\n  return {\n    visible: getFirstDefinedValue(visible, defaults.visible, true),\n    style: getNormalizedLineStyleOptions(style, defaults.style)\n  };\n}\n\n/**\n * A text with its visibility, style and font style.\n * \n * @typedef {Object} module:meteoJS/thermodynamicDiagram~textOptions\n * @param {boolean} [visible=true] - Visibility of the line.\n * @param {module:meteoJS/thermodynamicDiagram~fontOptions}\n *   [font] - Font defintions.\n */\n\n/**\n * Returns normalized text options with visibility and line style.\n * \n * @param {module:meteoJS/thermodynamicDiagram~textOptions}\n *   [options] - Options.\n * @param {module:meteoJS/thermodynamicDiagram~textOptions}\n *   [defaults] - Optional defaults.\n * @returns {module:meteoJS/thermodynamicDiagram~textOptions}\n *   Normalized options.\n * @internal\n */\nexport function getNormalizedTextOptions({\n  visible = true,\n  font = {}\n} = {}, defaults = {}) {\n  return {\n    visible: getFirstDefinedValue(visible, defaults.visible, true),\n    font: getNormalizedFontOptions(font, defaults.font)\n  };\n}\n\n/**\n * An object with its visibility, style and font style.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   module:meteoJS/thermodynamicDiagram~lineTextOptions\n * @property {module:meteoJS/thermodynamicDiagram~fontOptions}\n *   [font] - Font defintions.\n */\n\n/**\n * Returns normalized text options with visibility, line and font style.\n * \n * @param {module:meteoJS/thermodynamicDiagram~lineTextOptions}\n *   [options] - Options.\n * @param {module:meteoJS/thermodynamicDiagram~lineTextOptions}\n *   [defaults] - Optional defaults.\n * @returns {module:meteoJS/thermodynamicDiagram~lineTextOptions}\n *   Normalized options.\n * @internal\n */\nexport function getNormalizedLineTextOptions({\n  visible = true,\n  style = {},\n  font = {}\n} = {}, defaults = {}) {\n  return {\n    visible: getFirstDefinedValue(visible, defaults.visible, true),\n    style: getNormalizedLineStyleOptions(style, defaults.style),\n    font: getNormalizedFontOptions(font, defaults.font)\n  };\n}\n\n/**\n * Updates current options with some new options.\n * \n * @param {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   [options] - Current options.\n * @param {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   [updateOptions] - Some new options.\n * @returns {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   New options object.\n * @private\n */\nexport function updateLineOptions(options = {}, updateOptions = {}) {\n  if ('visible' in updateOptions)\n    options.visible = updateOptions.visible;\n  if ('style' in updateOptions) {\n    ['color', 'width', 'opacity',  'linecap',  'linejoin',  'dasharray']\n      .forEach(styleKey => {\n        if (styleKey in updateOptions.style)\n          options.style[styleKey] = updateOptions.style[styleKey];\n      });\n  }\n  return options;\n}\n\n/**\n * Returns the first defined argument.\n * \n * @param {mixed|undefined} [...params] - Some values.\n * @returns {mixed|undefined} - First defined value, if available.\n */\nexport function getFirstDefinedValue(...params) {\n  return params\n    .reduce((acc, cur) => { return (acc !== undefined) ? acc : cur; });\n}\n\n/**\n * Draws text in a SVG node.\n * \n * @param {Object} options - Options.\n * @param {external:SVG} options.node - SVG node.\n * @param {string} options.text - Text.\n * @param {number} options.x - X coordinate.\n * @param {number} options.y - Base Y coordinate.\n * @param {number} [options.horizontalMargin=0] - Padding in x direction.\n * @param {number} [options.verticalMargin=0] - Padding in y direction.\n * @param {module:meteoJS/thermodynamicDiagram~fontOptions} [options.font] - Font style.\n * @prarm {string|Object} [options.fill] - Fill for background.\n * @returns {external:SVG} - SVG group containing the inserted elements.\n */\nexport function drawTextInto({\n  node,\n  text,\n  x,\n  y,\n  horizontalMargin = 0,\n  verticalMargin = 0,\n  font = {},\n  fill = {}\n}) {\n  const group = node.group();\n  if (!('color' in fill))\n    fill.color = 'white';\n  const background = group.rect().fill(fill);\n  const textNode = group\n    .text(text)\n    .attr({ x, y })\n    .font(font);\n  if (font['alignment-baseline'] == 'bottom')\n    textNode.dy(-textNode.bbox().height - 5);\n  textNode\n    .dx(horizontalMargin * ((textNode.attr('text-anchor') == 'end') ? -1 : 1))\n    .dy(verticalMargin * ((font['alignment-baseline'] == 'bottom') ? -1 : 1));\n  background.attr({\n    x: textNode.bbox().x,\n    y: textNode.bbox().y,\n    width: textNode.bbox().width,\n    height: textNode.bbox().height\n  });\n  return group;\n}\n\n/**\n * Draws a windbarb into an SVG node.\n * \n * @param {Object} options - Options.\n * @param {external:SVG} options.node - SVG node.\n * @param {number} [options.x=0] - X coordinate for windbarb tip.\n * @param {number} [options.y=0] - Y coordinate for windbarb tip.\n * @param {number} [options.wspd=0] - Wind speed [m/s].\n * @param {number} [options.wdir=0] - Wind direction [°].\n * @param {number} [options.length=50] - Windbarb length.\n * @param {module:meteoJS/thermodynamicDiagram~lineStyleOptions}\n *   [options.strokeStyle] - Line style.\n * @param {boolean} [options.fillTriangle=true] - Fill the 50 knots triangles.\n * @param {boolean} [options.triangleRatio=0.2]\n *   Width of the 50 knots triangles according to length.\n * @param {boolean} [options.barbDistanceRatio=0.1]\n *   Distance between triangles and/or 10 knot lines according to length.\n * @param {boolean} [options.barbHeightRatio=0.375]\n *   Height of the triangles and lines according to length.\n */\nexport function drawWindbarbInto({\n  node,\n  x = 0,\n  y = 0,\n  wspd = 0,\n  wdir = 270,\n  length = 50,\n  strokeStyle = undefined,\n  fillTriangle = true,\n  triangleRatio = 1 / 5,\n  barbDistanceRatio = 1 / 10,\n  barbHeightRatio = 3 / 8,\n  circleOnLowWindspeed = true,\n  circleRadiusRatio = 1 / 10\n} = {}) {\n  strokeStyle = getNormalizedLineStyleOptions(strokeStyle);\n  \n  const windspeed = windspeedMSToKN(wspd);\n  const windbarbGroup = node.group();\n  const barbGroup = (windspeed >= 5) ? windbarbGroup.group() : undefined;\n  const triangleWidth = length * triangleRatio;\n  const barbDistance = length * barbDistanceRatio;\n  const windbarbHeight = length * barbHeightRatio;\n  let yPosition = y - length;\n  let windspeedResidual = windspeed;\n  \n  if (windspeed < 5 && circleOnLowWindspeed) {\n    windbarbGroup\n      .circle(length * circleRadiusRatio)\n      .cx(x)\n      .cy(y)\n      .stroke(strokeStyle)\n      .fill('none');\n    return;\n  }\n  \n  // base line\n  windbarbGroup\n    .line(x, yPosition, x, y)\n    .stroke(strokeStyle);\n  \n  // 50 knots triangles\n  while (windspeedResidual >= 50) {\n    barbGroup\n      .polyline([\n        [x, yPosition],\n        [x + windbarbHeight, yPosition + triangleWidth/2],\n        [x, yPosition + triangleWidth]\n      ])\n      .fill(fillTriangle ? strokeStyle : 'none')\n      .stroke(strokeStyle);\n    windspeedResidual -= 50;\n    yPosition += triangleWidth + ((windspeedResidual >= 50) ? barbDistance/2 : barbDistance);\n  }\n  \n  // 10 knots lines\n  while (windspeedResidual >= 10) {\n    barbGroup\n      .line(\n        x, yPosition,\n        x + windbarbHeight, yPosition - triangleWidth/2\n      )\n      .stroke(strokeStyle);\n    yPosition += barbDistance;\n    windspeedResidual -= 10;\n  }\n  \n  if (windspeed < 10)\n    yPosition += barbDistance;\n  \n  // 5 knot line\n  if (windspeedResidual >= 5)\n    barbGroup\n      .line(\n        x, yPosition,\n        x + windbarbHeight/2, yPosition - triangleWidth/4\n      )\n      .stroke(strokeStyle);\n  \n  // compress barbs on high windspeed\n  const barbsWidth = yPosition - (y - length);\n  if (barbsWidth > length * 0.9)\n    barbGroup.scale(1, (length * 0.9) / barbsWidth, x, y - length);\n  \n  if (wdir != 0)\n    windbarbGroup.rotate(wdir, x, y);\n}","/**\n * @module meteoJS/thermodynamicDiagram/diagramParcel\n */\nimport addEventFunctions from '../Events.js';\nimport Unique from '../base/Unique.js';\nimport {\n  getNormalizedLineOptions,\n  updateLineOptions\n} from '../thermodynamicDiagram/Functions.js';\n\n/**\n * Change visibility event. Only triggered, if the visibility of the parcel\n * changes.\n * \n * @event module:meteoJS/thermodynamicDiagram/diagramParcel#change:visible\n */\n\n/**\n * Change options event.\n * \n * @event module:meteoJS/thermodynamicDiagram/diagramParcel#change:options\n */\n\n/**\n * Style/visibility options for a parcel in the thermodynamic diagram.\n * \n * @typedef {Object}\n *   module:meteoJS/thermodynamicDiagram/diagramParcel~parcelOptions\n * @property {boolean} [visible=true]\n *   Visibility in the thermodynamic diagram.\n * @property {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   [temp] - Options for the temperature curve.\n * @property {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   [dewp] - Options for the dewpoint curve.\n */\n\n/**\n * Definition of the options for the constructor.\n * \n * @typedef {module:meteoJS/base/unique~options}\n *   module:meteoJS/thermodynamicDiagram/diagramParcel~options\n * @property {module:meteoJS/sounding/parcel.Parcel} [parcel] - Parcel object.\n * @property {boolean} [visible=true] - Visibility of the parcel.\n * @property {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   [temp] - Options for the temperature curve.\n * @property {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   [dewp] - Options for the dewpoint curve.\n */\n\n/**\n * Representation of a plotted parcel (data and display options)\n * \n * <pre><code>import DiagramParcel from 'meteojs/thermodynamicDiagram/DiagramParcel';</code></pre>\n * \n * @extends module:meteoJS/base/unique.Unique\n * @fires module:meteoJS/thermodynamicDiagram/diagramParcel#change:visible\n * @fires module:meteoJS/thermodynamicDiagram/diagramParcel#change:options\n */\nexport class DiagramParcel extends Unique {\n  \n  /**\n   * @param {module:meteoJS/thermodynamicDiagram/diagramParcel~options} [options] - Options.\n   */\n  constructor({\n    parcel = undefined,\n    visible = true,\n    temp = {},\n    dewp = {},\n    ...rest\n  } = {}) {\n    super(rest);\n    \n    /**\n     * @type module:meteoJS/sounding/parcel.Parcel\n     * @private\n     */\n    this._parcel = parcel;\n    if (this.id === undefined && parcel !== undefined)\n      this.id = parcel.id;\n    \n    /**\n     * @type {module:meteoJS/thermodynamicDiagram/diagramParcel~parcelOptions}\n     * @private\n     */\n    this._options = {\n      visible,\n      temp: getNormalizedLineOptions(temp, {\n        style: {\n          color: 'rgb(255, 153, 0)',\n          width: 3,\n          linecap: 'round'\n        }\n      }),\n      dewp: getNormalizedLineOptions(dewp, {\n        style: {\n          color: 'rgb(255, 153, 0)',\n          width: 3,\n          linecap: 'round'\n        }\n      })\n    };\n  }\n\n  /**\n   * Parcel object.\n   * \n   * @type module:meteoJS/sounding/parcel.Parcel\n   * @readonly\n   */\n  get parcel() {\n    return this._parcel;\n  }\n  \n  /**\n   * Visibility of the parcel.\n   * \n   * @type {boolean}\n   * @fires module:meteoJS/thermodynamicDiagram/diagramParcel#change:visible\n   */\n  get visible() {\n    return this._options.visible;\n  }\n  set visible(visible) {\n    let oldVisible = this._options.visible;\n    this._options.visible = visible ? true : false;\n    if (oldVisible != this._options.visible)\n      this.trigger('change:visible');\n  }\n  \n  /**\n   * Style options for the parcel.\n   * \n   * @type {module:meteoJS/thermodynamicDiagram/diagramParcel~parcelOptions}\n   * @readonly\n   */\n  get options() {\n    return this._options;\n  }\n  \n  /**\n   * Updates the style options for the parcel.\n   * \n   * @param {module:meteoJS/thermodynamicDiagram/diagramParcel~parcelOptions}\n   *   [options] - Options.\n   * @fires module:meteoJS/thermodynamicDiagram/diagramParcel#change:visible\n   * @fires module:meteoJS/thermodynamicDiagram/diagramParcel#change:options\n   */\n  update({\n    visible = undefined,\n    temp = undefined,\n    dewp = undefined\n  } = {}) {\n    let willTrigger = false;\n    if (temp === undefined)\n      temp = {};\n    else\n      willTrigger = true;\n    if (dewp === undefined)\n      dewp = {};\n    else\n      willTrigger = true;\n    \n    \n    this._options.temp = updateLineOptions(this._options.temp, temp);\n    this._options.dewp = updateLineOptions(this._options.dewp, dewp);\n    \n    if (willTrigger)\n      this.trigger('change:options');\n    \n    if (visible !== undefined)\n      this.visible = visible;\n  }\n}\naddEventFunctions(DiagramParcel.prototype);\nexport default DiagramParcel;","/**\n * @module meteoJS/thermodynamicDiagram/diagramSounding\n */\nimport addEventFunctions from '../Events.js';\nimport Unique from '../base/Unique.js';\nimport Collection from '../base/Collection.js';\nimport {\n  getNormalizedLineOptions,\n  updateLineOptions\n} from '../thermodynamicDiagram/Functions.js';\nimport DiagramParcel from './DiagramParcel.js';\n\n/**\n * Change visibility event. Only triggered, if the visibility of the sounding\n * changes, not if only a part's visibility (like hodograph) changes.\n * \n * @event module:meteoJS/thermodynamicDiagram/diagramSounding#change:visible\n */\n\n/**\n * Change options event.\n * \n * @event module:meteoJS/thermodynamicDiagram/diagramSounding#change:options\n */\n\n/**\n * Definition of the options for the constructor.\n * \n * @typedef {Object} module:meteoJS/thermodynamicDiagram/diagramSounding~options\n * @param {boolean} [visible=true] - Visibility of the sounding.\n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~diagramOptions}\n *   [diagram] - Options for the thermodynamic diagram part.\n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~windprofileOptions}\n *   [windprofile] - Options for the windprofile part.\n * @param {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   [hodograph] - Options for this sounding for the hodograph.\n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~parcelsOptions}\n *   [parcels] - Options for this sounding for the parcels.\n */\n\n/**\n * Representation of a plotted sounding (data and display options)\n * \n * <pre><code>import DiagramSounding from 'meteojs/thermodynamicDiagram/DiagramSounding';</code></pre>\n * \n * @extends module:meteoJS/base/unique.Unique\n * @fires module:meteoJS/thermodynamicDiagram/diagramSounding#change:visible\n * @fires module:meteoJS/thermodynamicDiagram/diagramSounding#change:options\n */\nexport class DiagramSounding extends Unique {\n  \n  /**\n   * @param {module:meteoJS/sounding.Sounding} sounding - Sounding data.\n   * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~options} [options] - Options.\n   */\n  constructor(sounding, {\n    visible = true,\n    diagram = {},\n    windprofile = {},\n    hodograph = {},\n    parcels = {}\n  } = {}) {\n    super();\n    \n    /**\n     * @type module:meteoJS/sounding.Sounding\n     * @private\n     */\n    this._sounding = sounding;\n    \n    /**\n     * @type module:meteoJS/base/collection.Collection\n     * @private\n     */\n    this._diagramParcelCollection = new Collection({\n      fireReplace: false,\n      fireAddRemoveOnReplace: true,\n      emptyObjectMaker: () => new DiagramParcel()\n    });\n    \n    /**\n     * @type boolean\n     * @private\n     */\n    this._visible = visible;\n    \n    /**\n     * @type Object\n     * @private\n     */\n    this._options = {\n      diagram: getNormalizedDiagramOptions(diagram),\n      windprofile:  getNormalizedWindprofileOptions(windprofile),\n      hodograph: getNormalizedLineOptions(hodograph),\n      parcels: getNormalizedParcelsOptions(parcels)\n    };\n    \n    // Initialize soundig-object with its parcels.\n    if (this._sounding !== undefined) {\n      this._sounding.parcelCollection.on('add:item',\n        parcel => this.addParcel(parcel));\n      this._sounding.parcelCollection.on('remove:item', parcel => {\n        for (let diagramParcel of this._diagramParcelCollection)\n          if (diagramParcel.parcel === parcel)\n            this._diagramParcelCollection.remove(diagramParcel);\n      });\n      for (let parcel of this._sounding.parcelCollection)\n        this.addParcel(parcel);\n    }\n  }\n  \n  /**\n   * Sounding data.\n   * \n   * @type module:meteoJS/sounding.Sounding\n   * @readonly\n   */\n  get sounding() {\n    return this._sounding;\n  }\n  \n  /**\n   * Visibility of the sounding.\n   * \n   * @type {boolean}\n   * @fires module:meteoJS/thermodynamicDiagram/diagramSounding#change:visible\n   */\n  get visible() {\n    return this._visible;\n  }\n  set visible(visible) {\n    let oldVisible = this._visible;\n    this._visible = visible ? true : false;\n    if (oldVisible != this._visible)\n      this.trigger('change:visible');\n  }\n  \n  get options() {\n    return this._options;\n  }\n  \n  /**\n   * Collection of the DiagramParcel objects.\n   * \n   * @type module:meteoJS/base/collection.Collection\n   * @readonly\n   */\n  get diagramParcelCollection() {\n    return this._diagramParcelCollection;\n  }\n  \n  /**\n   * Add a parcel with styles to the sounding.\n   * (analogue to {@link module:meteoJS/thermodynamicDiagramPluggable.ThermodynamicDiagramPluggable#addSounding})\n   * \n   * @param {module:meteoJS/sounding/parcel.Parcel} parcel - Parcel object.\n   * @param {module:meteoJS/thermodynamicDiagram/diagramParcel~parcelOptions}\n   *   [options] - Style options.\n   * @returns {module:meteoJS/thermodynamicDiagram/diagramParcel.diagramParcel}\n   *   Parcel object for the diagram with style options.\n   */\n  addParcel(parcel, options = undefined) {\n    options = (options === undefined) ? this.getParcelOptions(parcel) : options;\n    options.parcel = parcel;\n    const dp = new DiagramParcel(options);\n    this._diagramParcelCollection.append(dp);\n    return dp;\n  }\n  \n  /**\n   * Updated the style options for this sounding.\n   * \n   * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~options}\n   *   [options] - Options.\n   * @fires module:meteoJS/thermodynamicDiagram/diagramSounding#change:visible\n   * @fires module:meteoJS/thermodynamicDiagram/diagramSounding#change:options\n   */\n  update({\n    visible = undefined,\n    diagram = undefined,\n    windprofile = undefined,\n    hodograph = undefined,\n    parcels = undefined\n  } = {}) {\n    let willTrigger = false;\n    if (diagram === undefined)\n      diagram = {};\n    else\n      willTrigger = true;\n    if (windprofile === undefined)\n      windprofile = {};\n    else\n      willTrigger = true;\n    if (hodograph === undefined)\n      hodograph = {};\n    else\n      willTrigger = true;\n    \n    this._options.diagram =\n      updateDiagramOptions(this._options.diagram, diagram);\n    this._options.windprofile =\n      updateWindprofileOptions(this._options.windprofile, windprofile);\n    this._options.hodograph =\n      updateLineOptions(this._options.hodograph, hodograph);\n    if (willTrigger)\n      this.trigger('change:options');\n    \n    if (parcels === undefined)\n      parcels = {};\n    this._options.parcels =\n      updateParcelsOptions(this._options.parcels, parcels);\n    for (let diagramParcel of this.diagramParcelCollection) {\n      if (diagramParcel.id in parcels)\n        diagramParcel.update(parcels[diagramParcel.id]);\n    }\n    \n    if (visible !== undefined)\n      this.visible = visible;\n  }\n  \n  /**\n   * Returns normalized visibility and style options for a parcel. This is a\n   * combination of the specific options for the passed parcel and the defaults.\n   * \n   * @param {module:meteoJS/sounding/parcel.Parcel} [parcel] - Parcel.\n   * @returns {module:meteoJS/thermodynamicDiagram/diagramSounding~parcelsOptions}\n   *   Parcel options.\n   * @public\n   */\n  getParcelOptions(parcel = undefined) {\n    let result = {\n      visible: this.options.parcels.default.visible,\n      temp: {\n        visible: this.options.parcels.default.temp.visible,\n        style: {}\n      },\n      dewp: {\n        visible: this.options.parcels.default.dewp.visible,\n        style: {}\n      }\n    };\n    ['temp', 'dewp'].forEach(key => {\n      Object.keys(this.options.parcels.default[key].style).forEach(styleKey => {\n        result[key].style[styleKey] =\n          this.options.parcels.default[key].style[styleKey];\n      });\n    });\n    if (parcel !== undefined &&\n        parcel.id in this.options.parcels)\n      result = updateOptionsPart(result, this.options.parcels[parcel.id],\n        ['temp', 'dewp']);\n    return result;\n  }\n}\naddEventFunctions(DiagramSounding.prototype);\nexport default DiagramSounding;\n\n/**\n * Style/visibility options for a sounding in the thermodynamic diagram.\n * \n * @typedef {Object} module:meteoJS/thermodynamicDiagram/diagramSounding~diagramOptions\n * @param {boolean} [visible=true]\n *   Visibility in the thermodynamic diagram.\n * @param {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   [temp] - Options for the temperature curve.\n * @param {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   [dewp] - Options for the dewpoint curve.\n * @param {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   [wetbulb] - Options for the wetbulb temperature curve.\n */\n\n/**\n * Returns normalized diagram options.\n * \n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~diagramOptions}\n *   [options] - Options.\n * @returns {module:meteoJS/thermodynamicDiagram/diagramSounding~diagramOptions}\n *   Normalized options.\n * @private\n */\nfunction getNormalizedDiagramOptions({\n  visible = true,\n  temp = {},\n  dewp = {},\n  wetbulb = {}\n} = {}) {\n  return {\n    visible,\n    temp: getNormalizedLineOptions(temp, {\n      style: {\n        color: 'red',\n        width: 3,\n        linecap: 'round'\n      }\n    }),\n    dewp: getNormalizedLineOptions(dewp, {\n      style: {\n        color: 'blue',\n        width: 3,\n        linecap: 'round'\n      }\n    }),\n    wetbulb: getNormalizedLineOptions(wetbulb, {\n      style: {\n        color: 'green',\n        width: 2,\n        linecap: 'round'\n      }\n    })\n  };\n}\n\n/**\n * Updates diagram options.\n * \n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~diagramOptions}\n *   options - Current options.\n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~diagramOptions}\n *   updateOptions - Some new options.\n * @returns {module:meteoJS/thermodynamicDiagram/diagramSounding~diagramOptions}\n *   New options object.\n * @private\n */\nfunction updateDiagramOptions(options, updateOptions) {\n  return updateOptionsPart(options, updateOptions, ['temp', 'dewp', 'wetbulb']);\n}\n\n/**\n * Style/visibility options for a sounding in the windprofile.\n * \n * @typedef {Object} module:meteoJS/thermodynamicDiagram/diagramSounding~windprofileOptions\n * @param {boolean} [visible=true] - Visibility in the windprofile part.\n * @param {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   [windbarbs] - Options for the windbarbs.\n * @param {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   [windspeed] - Options for the windspeed line.\n */\n\n/**\n * Returns normalized windprofile options.\n * \n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~windprofileOptions}\n *   [options] - Options.\n * @returns {module:meteoJS/thermodynamicDiagram/diagramSounding~windprofileOptions}\n *   Normalized options.\n * @private\n */\nfunction getNormalizedWindprofileOptions({\n  visible = true,\n  windbarbs = {},\n  windspeed = {}\n} = {}) {\n  return {\n    visible,\n    windbarbs: getNormalizedLineOptions(windbarbs),\n    windspeed: getNormalizedLineOptions(windspeed)\n  };\n}\n\n/**\n * Updates windprofile options.\n * \n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~windprofileOptions}\n *   options - Current options.\n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~windprofileOptions}\n *   updateOptions - Some new options.\n * @returns {module:meteoJS/thermodynamicDiagram/diagramSounding~windprofileOptions}\n *   New options object.\n * @private\n */\nfunction updateWindprofileOptions(options, updateOptions) {\n  return updateOptionsPart(options, updateOptions, ['windbarbs', 'windspeed']);\n}\n\n/**\n * Visibility/style of the parcels. This object can contain further keys with\n * values as {@link module:meteoJS/thermodynamicDiagram/diagramSounding~diagramOptions}\n * which applies to the parcel with the equivalent id.\n * \n * @typedef {Object} module:meteoJS/thermodynamicDiagram/diagramSounding~parcelsOptions\n * @param {boolean} [visible=true] - Visibility of the parcels.\n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~diagramOptions}\n *   [default] - Default options for a parcel.\n */\n\n/**\n * Returns normalized parcels options.\n * \n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~parcelsOptions}\n *   [options] - Options.\n * @returns {module:meteoJS/thermodynamicDiagram/diagramSounding~parcelsOptions}\n *   Normalized options.\n * @private\n */\nfunction getNormalizedParcelsOptions(options = {}) {\n  if (options.visible === undefined)\n    options.visible = true;\n  if (options.default === undefined)\n    options.default = {};\n  if (options.default.visible === undefined)\n    options.default.visible = false;\n  if (options.default.temp === undefined)\n    options.default.temp = {};\n  if (options.default.temp.visible === undefined)\n    options.default.temp.visible = true;\n  if (options.default.temp.style === undefined)\n    options.default.temp.style = {};\n  if (options.default.temp.style.color === undefined)\n    options.default.temp.style.color = 'rgb(255, 153, 0)';\n  if (options.default.temp.style.width === undefined)\n    options.default.temp.style.width = 3;\n  if (options.default.temp.style.linecap === undefined)\n    options.default.temp.style.linecap = 'round';\n  if (options.default.dewp === undefined)\n    options.default.dewp = {};\n  if (options.default.dewp.visible === undefined)\n    options.default.dewp.visible = true;\n  if (options.default.dewp.style === undefined)\n    options.default.dewp.style = {};\n  if (options.default.dewp.style.color === undefined)\n    options.default.dewp.style.color = 'rgb(255, 194, 102)';\n  if (options.default.dewp.style.width === undefined)\n    options.default.dewp.style.width = 3;\n  if (options.default.dewp.style.linecap === undefined)\n    options.default.dewp.style.linecap = 'round';\n  return options;\n}\n\n/**\n * Updates Parcels options.\n * \n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~parcelsOptions}\n *   options - Current options.\n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~parcelsOptions}\n *   updateOptions - Some new options.\n * @returns {module:meteoJS/thermodynamicDiagram/diagramSounding~parcelsOptions}\n *   New options object.\n * @private\n */\nfunction updateParcelsOptions(options, updateOptions) {\n  if ('visible' in updateOptions)\n    options.visible = updateOptions.visible;\n  if ('default' in updateOptions)\n    options.default =\n      updateOptionsPart(options.default, updateOptions.default,\n        ['temp', 'dewp']);\n  Object.keys(updateOptions)\n    .filter(key => key != 'visible' && key != 'default')\n    .forEach(key =>\n      options[key] =\n        updateDiagramOptions(\n          (key in options) ? options[key] : {},\n          updateOptions[key]));\n  return options;\n}\n\n/**\n * Updates diagram/windprofile options.\n * \n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~diagramOptions|module:meteoJS/thermodynamicDiagram/diagramSounding~windprofileOptions}\n *   options - Current options.\n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~diagramOptions|module:meteoJS/thermodynamicDiagram/diagramSounding~windprofileOptions}\n *   updateOptions - Some new options.\n * @param {Array.<string>} [lineKeys] - Keys to update.\n * @returns {module:meteoJS/thermodynamicDiagram/diagramSounding~diagramOptions|module:meteoJS/thermodynamicDiagram/diagramSounding~windprofileOptions}\n *   New options object.\n * @private\n */\nfunction updateOptionsPart(options, updateOptions, lineKeys = []) {\n  if ('visible' in updateOptions)\n    options.visible = updateOptions.visible;\n  lineKeys.forEach(key => {\n    if (key in updateOptions)\n      options[key] = updateLineOptions(options[key] ? options[key] : { style: {} }, updateOptions[key]);\n  });\n  return options;\n}","/**\n * @module meteoJS/thermodynamicDiagramPluggable\n */\nimport { SVG } from '@svgdotjs/svg.js';\nimport Collection from './base/Collection.js';\nimport DiagramSounding from './thermodynamicDiagram/DiagramSounding.js';\n\n/**\n * Options for the constructor.\n * \n * @typedef {Object} module:meteoJS/thermodynamicDiagramPluggable~options\n * @param {external:HTMLElement} [renderTo] - Element to render diagram into.\n * @param {integer} [width=undefined] - Width of the whole container.\n * @param {integer} [height=undefined] - Height of the whole container.\n */\n\n/**\n * Class to draw a SVG thermodynamic diagram.\n * \n * <pre><code>import ThermodynamicDiagramPluggable from 'meteoJS/thermodynamicDiagramPluggable';</code></pre>\n * \n * @extends module:meteoJS/base/collection.Collection\n */\nexport class ThermodynamicDiagramPluggable extends Collection {\n  \n  /**\n   * @param {module:meteoJS/thermodynamicDiagram~options} options - Options.\n   */\n  constructor({\n    renderTo = undefined,\n    width = undefined,\n    height = undefined\n  } = {}) {\n    super({\n      fireReplace: false,\n      fireAddRemoveOnReplace: true,\n      emptyObjectMaker: () => new DiagramSounding()\n    });\n    \n    /**\n     * @type external:SVG\n     * @private\n     */\n    this._svgNode =\n      (renderTo === undefined || 'node' in renderTo || 'instance' in renderTo)\n        ? SVG(renderTo) : SVG().addTo(renderTo);\n    if (width !== undefined ||\n        height !== undefined)\n      this._svgNode.size(width, height);\n    else if (width === undefined &&\n             height === undefined &&\n             renderTo !== undefined &&\n             'getBoundingClientRect' in renderTo) {\n      let boundingRect = renderTo.getBoundingClientRect(); // size incl. padding\n      let computedStyle = window.getComputedStyle(renderTo);\n      this._svgNode.size(\n        boundingRect.width -\n        parseFloat(computedStyle.getPropertyValue('padding-left')) -\n        parseFloat(computedStyle.getPropertyValue('padding-right')),\n        boundingRect.height - \n        parseFloat(computedStyle.getPropertyValue('padding-top')) -\n        parseFloat(computedStyle.getPropertyValue('padding-bottom'))\n      );\n    }\n    \n    /**\n     * @type Set.<module:meteoJS/thermodynamicDiagram/plotArea.PlotArea>\n     * @private\n     */\n    this._plotAreas = new Set();\n    \n    // PlotAltitudeDataArea objects\n    this._svgNode.on('mousemove', e => {\n      for (let plotArea of this._plotAreas)\n        if ('isHoverLabelsRemote' in plotArea)\n          plotArea.svgNode.dispatchEvent(e);\n    });\n    this._svgNode.on('mouseout', e => {\n      if (this._svgNode.node === e.target)\n        for (let plotArea of this._plotAreas)\n          if ('_hoverLabelsGroup' in plotArea)\n            plotArea._hoverLabelsGroup.clear();\n    });\n    \n    // PlotDataArea objects\n    this.on('add:item', sounding => {\n      for (let plotArea of this._plotAreas)\n        if ('addSounding' in plotArea)\n          plotArea.addSounding(sounding);\n    });\n    this.on('remove:item', sounding => {\n      for (let plotArea of this._plotAreas)\n        if ('removeSounding' in plotArea)\n          plotArea.removeSounding(sounding);\n    });\n  }\n\n  /**\n   * SVG object of the complete diagram.\n   * \n   * @type external:SVG\n   * @readonly\n   */\n  get svgNode() {\n    return this._svgNode;\n  }\n  \n  /**\n   * Appends a PlotArea object to this thermodynamic diagram.\n   * \n   * @param {module:meteoJS/thermodynamicDiagram/plotArea.PlotArea} plotArea\n   *   PlotArea object.\n   * @returns {module:meteoJS/thermodynamicDiagramPluggable.ThermodynamicDiagramPluggable}\n   *   This.\n   */\n  appendPlotArea(plotArea) {\n    if (this._plotAreas.has(plotArea))\n      return;\n    \n    this._plotAreas.add(plotArea);\n    \n    plotArea.addTo(this.svgNode);\n    for (let sounding of this)\n      if ('addSounding' in plotArea)\n        plotArea.addSounding(sounding);\n    \n    return this;\n  }\n  \n  /**\n   * Removes a PlotArea object from this thermodynamic diagram.\n   * \n   * @param {module:meteoJS/thermodynamicDiagram/plotArea.PlotArea} plotArea\n   *   PlotArea object.\n   * @returns {module:meteoJS/thermodynamicDiagramPluggable.ThermodynamicDiagramPluggable}\n   *   This.\n   */\n  removePlotArea(plotArea) {\n    if (!this._plotAreas.has(plotArea))\n      return;\n    \n    for (let sounding of this)\n      plotArea.removeSounding(sounding);\n    this._plotAreas.delete(plotArea);\n    \n    return this;\n  }\n  \n  /**\n   * Exchanges the coordinate system in the PlotArea objects. The optional,\n   * second argument defines an already used coordinate system. If this\n   * argument is passed, only the coordinate system of the PlotArea's with\n   * this coordinate system will exchanged.\n   * \n   * @param {module:meteoJS/thermodynamicDiagram/coordinateSystem.CoordinateSystem}\n   *   coordinateSystem - Coordinate system.\n   * @param {module:meteoJS/thermodynamicDiagram/coordinateSystem.CoordinateSystem}\n   *   [formerCoordinateSystem=undefined] - Coordinate system.\n   */\n  exchangeCoordinateSystem(\n    coordinateSystem,\n    formerCoordinateSystem = undefined\n  ) {\n    for (let plotArea of this._plotAreas)\n      if (formerCoordinateSystem === undefined ||\n          plotArea.coordinateSystem === formerCoordinateSystem)\n        plotArea.coordinateSystem = coordinateSystem;\n  }\n  \n  /**\n   * Add a sounding to the diagram.\n   * \n   * @param {module:meteoJS/sounding.Sounding} sounding - Sounding object.\n   * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~options}\n   *   [options] - Display options.\n   * @returns {module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding}\n   *   Sounding object for the diagram with display options.\n   */\n  addSounding(sounding, options = {}) {\n    let diagramSounding = new DiagramSounding(sounding, options);\n    let i = 1;\n    let id = `sounding-${i}`;\n    while (this.containsId(id)) {\n      i++;\n      id = `sounding-${i}`;\n    }\n    diagramSounding.id = id;\n    this.append(diagramSounding);\n    return diagramSounding;\n  }\n  \n}\nexport default ThermodynamicDiagramPluggable;","/**\n * @module meteoJS/thermodynamicDiagram/coordinateSystem\n */\nimport { tempCelsiusToKelvin,\n  tempByPotentialTempAndPres,\n  tempByEquiPotTempAndPres,\n  potentialTempByTempAndPres,\n  dewpointByHMRAndPres,\n  saturationHMRByTempAndPres } from '../calc.js';\nimport addEventFunctions from '../Events.js';\n\n/**\n * Options change event.\n * \n * @event module:meteoJS/thermodynamicDiagram/coordinateSystem#change:options\n */\n\n/**\n * Pressure options.\n * \n * @typedef {Object} module:meteoJS/thermodynamicDiagram/coordinateSystem~pressureOptions\n * @property {number} [min=100] - Minimum pressure on the diagram.\n * @property {number} [max=1050] - Maximum pressure on the diagram.\n */\n\n/**\n * Temperature options.\n * \n * @typedef {Object} module:meteoJS/thermodynamicDiagram/coordinateSystem~temperatureOptions\n * @property {number} [min=-40°C]\n *   Temperature either on bottom-left on the diagram (if reference equals\n *   'base') or on the left of an isobar (if reference is a number).\n * @property {number} [max=45°C]\n *   Temperature either on bottom-right on the diagram (if reference equals\n *   'base') or on the right of an isobar (if reference is a number).\n * @property {'base'|integer} [reference='base']\n *   Reference for 'min' and 'max' values. Allowed values: 'base' or number.\n * @property {integer} [inclinationAngle=45]\n *   Angle of inclination to the right of the isotherms. Allowed values between\n *   0 and 90 (exclusive), in degrees.\n */\n\n/**\n * Options for the constructor.\n * \n * @typedef {Object} module:meteoJS/thermodynamicDiagram/coordinateSystem~options\n * @param {integer} [width=100] - Width of the diagram.\n * @param {integer} [height=100] - Height of the diagram.\n * @param {module:meteoJS/thermodynamicDiagram/coordinateSystem~pressureOptions}\n *   [pressure] - Pressure options.\n * @param {module:meteoJS/thermodynamicDiagram/coordinateSystem~temperatureOptions}\n *   [temperature] - Temperature options.\n */\n\n/**\n * Abstract class to specify the coordinate system of the thermodynamicDiagram.\n * \n * Child classes define the explicit coordinate system.\n * This class defines already: (can be overridden by child classes)\n * * log-P y-axes with horizontal isobars\n * * straight isotherms, inclinated to the right\n * \n * <pre><code>import CoordinateSystem from 'meteoJS/thermodynamicDiagram/CoordinateSystem';</code></pre>\n * \n * @abstract\n * @fires module:meteoJS/thermodynamicDiagram/coordinateSystem#change:options\n */\nexport class CoordinateSystem {\n  \n  /**\n   * @param {module:meteoJS/thermodynamicDiagram/coordinateSystem~options} options\n   */\n  constructor({\n    width = 100,\n    height = 100,\n    pressure = {},\n    temperature = {}\n  } = {}) {\n    /**\n     * @type integer\n     * @private\n     */\n    this._width = width;\n    \n    /**\n     * @type integer\n     * @private\n     */\n    this._height = height;\n    \n    /**\n     * @type number\n     * @private\n     */\n    this.temperatureBottomLeft;\n    \n    /**\n     * @type number\n     * @private\n     */\n    this.temperatureBottomRight;\n    \n    /**\n     * @type number\n     * @private\n     */\n    this.inclinationTan;\n    \n    /**\n     * @type Object\n     * @private\n     */\n    this.options = {\n      pressure: {},\n      temperature: {}\n    };\n    \n    this._initPressureOptions(pressure);\n    this._initTemperatureOptions(temperature);\n  }\n  \n  /**\n   * Visible width, in pixels.\n   * \n   * @type integer\n   * @public\n   */\n  get width() {\n    return this._width;\n  }\n  set width(width) {\n    const oldWidth = this._width;\n    this._width = width;\n    if (oldWidth != this._width)\n      this.trigger('change:options');\n  }\n  \n  /**\n   * Visible height, in pixels.\n   * \n   * @type integer\n   * @public\n   */\n  get height() {\n    return this._height;\n  }\n  set height(height) {\n    const oldHeight = this._height;\n    this._height = height;\n    if (oldHeight != this._height)\n      this.trigger('change:options');\n  }\n  \n  /**\n   * Returns if isobars are straight lines in the defined coordinate system.\n   * \n   * @returns {boolean}\n   */\n  isIsobarsStraightLine() {\n    return true;\n  }\n\n  /**\n   * Returns if the dry adiabats are straight lines\n   * in the defined coordinate system.\n   * \n   * @returns {boolean}\n   */\n  isDryAdiabatStraightLine() {\n    return false;\n  }\n  \n  /**\n   * @returns {boolean}\n   */\n  isIsothermsVertical() {\n    return (this.options.temperature.inclinationAngle !== undefined) &&\n         (this.options.temperature.inclinationAngle == 0);\n  }\n\n  /**\n   * Pressure for a x-y coordinate.\n   * Implementation valid for horizontal isobars, log-P y-axes.\n   * \n   * @param {number} x - Pixels from the left.\n   * @param {number} y - Pixels from bottom.\n   * @returns {number} Pressure in hPa.\n   */\n  getPByXY(x, y) {\n    return Math.pow(this.options.pressure.min, y / this.height) *\n         Math.pow(this.options.pressure.max,\n           (this.height - y)/this.height);\n  }\n\n  /**\n   * Temperature for x-y coordinate.\n   * Implementation valid for straight isotherms.\n   * \n   * @param {number} x - Pixels from the left.\n   * @param {number} y - Pixels from bottom.\n   * @returns {number} Temperature in Kelvin.\n   */\n  getTByXY(x, y) {\n  // bottom x coordinate of isotherm\n    let x0 = x - y * this.inclinationTan;\n    return this.temperatureBottomLeft +\n    x0 *\n    (this.temperatureBottomRight-this.temperatureBottomLeft) / this.width;\n  }\n\n  /**\n   * y coordinate for pressure and x coordinate.\n   * Implementation valid for horizontal isobars, log-P y-axes.\n   * \n   * @param {number} x - Pixels from the left.\n   * @param {number} p - Pressure in hPa.\n   * @returns {number} Pixels from bottom.\n   */\n  getYByXP(x, p) {\n    return this.height *\n    Math.log(this.options.pressure.max / p) /\n    Math.log(this.options.pressure.max / this.options.pressure.min);\n  }\n\n  /**\n   * Temperature for pressure and x coordinate.\n   * Implementation valid for horizontal isobars, log-P y-axes and straight\n   * isotherms.\n   * \n   * @param {number} x - Pixels from the left.\n   * @param {number} p - Pressure in hPa.\n   * @returns {number} Temperature in Kelvin.\n   */\n  getTByXP(x, p) {\n    return this.getTByXY(x, this.getYByXP(x, p));\n  }\n\n  /**\n   * x coordinate for temperature and y coordinate.\n   * Implementation valid for straight isotherms.\n   * \n   * @param {number} y - Pixels from bottom.\n   * @param {number} T - Temperature in Kelvin.\n   * @returns {number} Pixels from the left.\n   */\n  getXByYT(y, T) {\n  // bottom x coordinate \n    let x0 =\n    (T-this.temperatureBottomLeft) *\n    this.width / (this.temperatureBottomRight-this.temperatureBottomLeft);\n    return x0 + y * this.inclinationTan;\n  }\n\n  /**\n   * y coordinate for temperature and x coordinate.\n   * Implementation valid for straight isotherms.\n   * \n   * @param {number} x - Pixels from the left.\n   * @param {number} T - Temperature in Kelvin.\n   * @returns {number|undefined} Pixels from bottom.\n   */\n  getYByXT(x, T) {\n    return (this.inclinationTan != 0) ?\n      (x - this.getXByYT(0, T)) / this.inclinationTan :\n      undefined;\n  }\n\n  /**\n   * x coordinate for pressure and temperature.\n   * Implementation valid for horizontal isobars, log-P y-axes and straight\n   * isotherms.\n   * \n   * @param {number} p - Pressure in hPa.\n   * @param {number} T - Temperature in Kelvin.\n   * @returns {number} Pixels from the left.\n   */\n  getXByPT(p, T) {\n    return this.getXByYT(this.getYByXP(0, p), T);\n  }\n\n  /**\n   * y coordinate for pressure and temperature.\n   * Implementation valid for horizontal isobars, log-P y-axes and straight\n   * isotherms.\n   * \n   * @param {number} p - Pressure in hPa.\n   * @param {number} T - Temperature in Kelvin.\n   * @returns {number} Pixels from bottom.\n   */\n  getYByPT(p) {\n    return this.getYByXP(0, p);\n  }\n\n  /**\n   * x coordinate for potential temperature and y coordinate.\n   * Implementation valid for horizontal isobars, log-P y-axes and straight\n   * isotherms.\n   * \n   * @param {number} y - Pixels from bottom.\n   * @param {number} T - Potential temperature in Kelvin.\n   * @returns {number} Pixels from the left.\n   */\n  getXByYPotentialTemperature(y, T) {\n    T = tempByPotentialTempAndPres(T, this.getPByXY(0, y));\n    return this.getXByYT(y, T);\n  }\n\n  /**\n   * y coordinate for potential temperature and x coordinate.\n   * Implementation valid for horizontal isobars, log-P y-axes and straight\n   * isotherms.\n   * \n   * @param {number} x - Pixels from the left.\n   * @param {number} T - Potential temperature in Kelvin.\n   * @returns {number|undefined} Pixels from bottom.\n   */\n  getYByXPotentialTemperature(x, T) {\n    let a = this.getPByXY(x, 0);\n    let b = this.getPByXY(x, this.height);\n    if (potentialTempByTempAndPres(this.getTByXP(x, b), b) < T ||\n      T < potentialTempByTempAndPres(this.getTByXP(x, a), a))\n      return undefined;\n    while (a-b > 10) {\n      let p = b+(a-b)/2;\n      let tBin = this.getTByXP(x, p);\n      let potTemp = potentialTempByTempAndPres(tBin, p);\n      if (potTemp === undefined)\n        return undefined;\n      if (potTemp < T)\n        a = p;\n      else\n        b = p;\n    }\n    let y = this.getYByXP(x, b+(a-b)/2);\n    return y;\n  }\n\n  /**\n   * x coordinate for pressure and potential temperature.\n   * Implementation valid for horizontal isobars, log-P y-axes and straight\n   * isotherms.\n   * \n   * @param {number} p - Pressure in hPa.\n   * @param {number} T - Potential temperature in Kelvin.\n   * @returns {number} Pixels from the left.\n   */\n  getXByPPotentialTemperatur(p, T) {\n    T = tempByPotentialTempAndPres(T, p);\n    return this.getXByPT(p, T);\n  }\n\n  /**\n   * y coordinate for pressure and potential temperature.\n   * Implementation valid for horizontal isobars, log-P y-axes and straight\n   * isotherms.\n   * \n   * @param {number} p - Pressure in hPa.\n   * @param {number} T - Potential temperature in Kelvin.\n   * @returns {number} Pixels from bottom.\n   */\n  getYByPPotentialTemperatur(p, T) {\n    let x = this.getXByPPotentialTemperatur(p, T);\n    return this.getYByXPotentialTemperature(x, T);\n  }\n\n  /**\n   * x coordinate for humid mixing ratio and y coordinate.\n   * Implementation valid for horizontal isobars, log-P y-axes and straight\n   * isotherms.\n   * \n   * @param {number} y - Pixels from bottom.\n   * @param {number} hmr - Humid mixing ratio. []\n   * @returns {number} Pixels from the left.\n   */\n  getXByYHMR(y, hmr) {\n    let p = this.getPByXY(0, y); // horizontal isobars\n    return this.getXByYT(y, dewpointByHMRAndPres(hmr, p));\n  }\n\n  /**\n   * y coordinate for humid mixing ratio and x coordinate.\n   * Implementation valid for horizontal isobars, log-P y-axes and straight\n   * isotherms.\n   * \n   * @param {number} x - Pixels from the left.\n   * @param {number} hmr - Humid mixing ratio. []\n   * @returns {number|undefined} Pixels from bottom.\n   */\n  getYByXHMR(x, hmr) {\n    let a = this.getPByXY(x, 0);\n    let b = this.getPByXY(x, this.height);\n    while (a-b > 10) {\n      let p = b+(a-b)/2;\n      let hmrp = saturationHMRByTempAndPres(this.getTByXP(x, p), p);\n      if (hmrp === undefined)\n        return undefined;\n      if (hmrp < hmr)\n        b = p;\n      else\n        a = p;\n    }\n    let y = this.getYByXP(x, b+(a-b)/2);\n    return y;\n  }\n\n  /**\n   * x coordinate for pressure and humid mixing ratio.\n   * Implementation valid for horizontal isobars, log-P y-axes and straight\n   * isotherms.\n   * \n   * @param {number} p - Pressure in hPa.\n   * @param {number} hmr - Humid mixing ratio. []\n   * @returns {number} Pixels from the left.\n   */\n  getXByPHMR(p, hmr) {\n    let dewpoint = dewpointByHMRAndPres(hmr, p);\n    return this.getXByPT(p, dewpoint);\n  }\n\n  /**\n   * y coordinate for pressure and humid mixing ratio.\n   * Implementation valid for horizontal isobars, log-P y-axes and straight\n   * isotherms.\n   * \n   * @param {number} p - Pressure in hPa.\n   * @param {number} hmr - Humid mixing ratio. []\n   * @returns {number|undefined} Pixels from bottom.\n   */\n  getYByPHMR(p, hmr) {\n    let dewpoint = dewpointByHMRAndPres(hmr, p);\n    return this.getYByPT(p, dewpoint);\n  }\n\n  /**\n   * x coordinate for equipotential temperature and y coordainte.\n   * Implementation valid for horizontal isobars, log-P y-axes and straight\n   * isotherms.\n   * \n   * @param {number} y - Pixels from bottom.\n   * @param {number} thetae - Equipotential temperaturen in Kelvin.\n   * @returns {number} Pixels from the left.\n   */\n  getXByYEquiPotTemp(y, thetae) {\n    let T = tempByEquiPotTempAndPres(thetae, this.getPByXY(0, y));\n    return this.getXByYT(y, T);\n  }\n\n  /**\n   * y coordinate for equipotential temperature and x coordinate.\n   * Implementation valid for horizontal isobars, log-P y-axes and straight\n   * isotherms.\n   * \n   * @param {number} x - Pixels from the left.\n   * @param {number} thetae - Equipotential temperaturen in Kelvin.\n   * @returns {number|undefined} Pixels from bottom.\n   */\n  getYByXEquiPotTemp(x, thetae) {\n    let a = 0;\n    let b = this.height;\n    let y = undefined;\n    while (b-a > 10) {\n      y = a+(b-a)/2;\n      let thetaEY =\n      this.getYByXT(x,\n        tempByEquiPotTempAndPres(thetae, this.getPByXY(x, y)));\n      if (thetaEY === undefined)\n        return undefined;\n      if (thetaEY < thetae)\n        b = y;\n      else\n        a = y;\n    }\n    return y;\n  }\n\n  /**\n   * x coordinate for pressure and equipotential temperature .\n   * Implementation valid for horizontal isobars, log-P y-axes and straight\n   * isotherms.\n   * \n   * @param {number} p - Pressure in hPa.\n   * @param {number} thetae - Equipotential temperaturen in Kelvin.\n   * @returns {number} Pixels from the left.\n   */\n  getXByPEquiPotTemp(p, thetae) {\n    let T = tempByEquiPotTempAndPres(thetae, p);\n    return this.getXByPT(p, T);\n  }\n\n  /**\n   * y coordinate for pressure and equipotential temperature .\n   * Implementation valid for horizontal isobars, log-P y-axes and straight\n   * isotherms.\n   * \n   * @param {number} p - Pressure in hPa.\n   * @param {number} thetae - Equipotential temperaturen in Kelvin.\n   * @returns {number|undefined} Pixels from bottom.\n   */\n  getYByPEquiPotTemp(p, thetae) {\n    let T = tempByEquiPotTempAndPres(thetae, p);\n    return this.getYByPT(p, T);\n  }\n  \n  /**\n   * Updates options. To restore a default value, pass undefined.\n   * \n   * @param {Object} [options] - Options.\n   * @param {module:meteoJS/thermodynamicDiagram/coordinateSystem~pressureOptions}\n   *   [options.pressure] - Pressure options.\n   * @param {module:meteoJS/thermodynamicDiagram/coordinateSystem~temperatureOptions}\n   *   [options.temperature] - Temperature options.\n   */\n  update({\n    pressure = {},\n    temperature = {}\n  } = {}) {\n    if ('min' in pressure)\n      this.options.pressure.min =\n        (pressure.min === undefined) ? 100 : pressure.min;\n    if ('max' in pressure)\n      this.options.pressure.max =\n        (pressure.max === undefined) ? 1000 : pressure.max;\n    \n    if ('min' in temperature)\n      this.options.temperature.min =\n        (temperature.min === undefined)\n          ? tempCelsiusToKelvin(-40) : temperature.min;\n    if ('max' in temperature)\n      this.options.temperature.max =\n        (temperature.max === undefined)\n          ? tempCelsiusToKelvin(-45) : temperature.max;\n    if ('reference' in temperature)\n      this.options.temperature.reference =\n        (temperature.reference === undefined) ? 'base' : temperature.reference;\n    if ('inclinationAngle' in temperature)\n      this.options.temperature.inclinationAngle =\n        (temperature.inclinationAngle === undefined)\n          ? 45 : temperature.inclinationAngle;\n    \n    this._normalizeTemperatureRange();\n    \n    this.trigger('change:options');\n  }\n  \n  /**\n   * @private\n   */\n  _initPressureOptions({\n    min = 100,\n    max = 1050\n  }) {\n    this.options.pressure = {\n      min,\n      max\n    };\n  }\n  \n  /**\n   * @private\n   */\n  _initTemperatureOptions({\n    min = tempCelsiusToKelvin(-40),\n    max = tempCelsiusToKelvin(45),\n    reference = 'base',\n    inclinationAngle = 45\n  }) {\n    this.options.temperature = {\n      min,\n      max,\n      reference,\n      inclinationAngle\n    };\n    \n    this._normalizeTemperatureRange();\n  }\n  \n  /**\n   * @internal\n   */\n  _normalizeTemperatureRange() {\n    this.temperatureBottomLeft = this.options.temperature.min;\n    this.temperatureBottomRight = this.options.temperature.max;\n    this.inclinationTan =\n    (this.options.temperature.inclinationAngle == 45) ?\n      1 :\n      (this.options.temperature.inclinationAngle == 0) ?\n        0 :\n        Math.tan(this.options.temperature.inclinationAngle * Math.PI/180);\n    \n    // specific pressure level for temperature range\n    if (/^[0-9]+$/.test(this.options.temperature.reference)) {\n      let yReference = this.getYByXP(0, this.options.temperature.reference);\n      let xTmin = this.inclinationTan * yReference;\n      let deltaT =\n      (this.temperatureBottomRight - this.temperatureBottomLeft) /\n      this.width;\n      this.temperatureBottomLeft += deltaT * xTmin;\n      this.temperatureBottomRight += deltaT * xTmin;\n    }\n  }\n}\naddEventFunctions(CoordinateSystem.prototype);\nexport default CoordinateSystem;","/**\n * @module meteoJS/thermodynamicDiagram/coordinateSystem/stueveDiagram\n */\n\nimport CoordinateSystem from '../CoordinateSystem.js';\n\nconst k = 0.2857;\n\n/**\n * Coordinate system for a Stüve-Diagram. Straight lines:\n * * pressure/isobars (horizontal)\n * * temperature/isotherms (vertical)\n * * potential temperature/dry adiabats\n * \n * y-Axes in exponential Scale: p^k (k = 0.2857), thus dry adiabats are\n * straight lines (M. K. Yau and R. R. Rogers, Short Course in Cloud Physics,\n * Third Edition, published by Butterworth-Heinemann, pp. 8).\n * \n * @see {@link https://en.wikipedia.org/wiki/St%C3%BCve_diagram}\n * @extends module:meteoJS/thermodynamicDiagram/coordinateSystem.CoordinateSystem\n */\nexport class StueveDiagram extends CoordinateSystem {\n\n  /**\n   * @inheritdoc\n   */\n  constructor({\n    width = 100,\n    height = 100,\n    pressure = {},\n    temperature = {}\n  } = {}) {\n    // vertical isotherms\n    temperature.inclinationAngle = 0;\n    \n    super({\n      width,\n      height,\n      pressure,\n      temperature\n    });\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  isDryAdiabatStraightLine() {\n    return true;\n  }\n\n  /**\n   * @inheritdoc\n   */\n  getPByXY(x, y) {\n    return Math.pow(\n      Math.pow(this.options.pressure.max, k) -\n      y *\n      (Math.pow(this.options.pressure.max, k) -\n       Math.pow(this.options.pressure.min, k)) /\n      this.height,\n      1/k);\n  }\n\n  /**\n   * @inheritdoc\n   */\n  getYByXP(x, p) {\n    return this.height *\n    (Math.pow(this.options.pressure.max, k) - Math.pow(p, k)) /\n    (Math.pow(this.options.pressure.max, k) -\n     Math.pow(this.options.pressure.min, k));\n  }\n\n  /**\n   * @inheritdoc\n   */\n  getYByXT() {\n    return undefined;\n  }\n\n}\nexport default StueveDiagram;","/**\n * @module meteoJS/thermodynamicDiagram/coordinateSystem/emagram\n */\nimport CoordinateSystem from '../CoordinateSystem.js';\n\n/**\n * Coordinate system for an emagram. This diagram has straight lines:\n * Straight lines:\n * * pressure/isobars (horizontal)\n * * temperature/isotherms (vertical)\n * \n * @see {@link https://en.wikipedia.org/wiki/Emagram}\n * @extends module:meteoJS/thermodynamicDiagram/coordinateSystem.CoordinateSystem\n */\nexport class Emagram extends CoordinateSystem {\n  \n  /**\n   * @inheritdoc\n   */\n  constructor({\n    width = 100,\n    height = 100,\n    pressure = {},\n    temperature = {}\n  } = {}) {\n    // vertical isotherms\n    temperature.inclinationAngle = 0;\n    \n    super({\n      width,\n      height,\n      pressure,\n      temperature\n    });\n  }\n\n}\nexport default Emagram;","/**\n * @module meteoJS/thermodynamicDiagram/coordinateSystem/skewTlogPDiagram\n */\nimport CoordinateSystem from '../CoordinateSystem.js';\n\n/**\n * Coordinate system for a skew-T-log-P diagram. This diagram has straight lines:\n * * pressure/isobars (horizontal)\n * * temperature/isotherms (normally 45 degree inclination to the right)\n * \n * @extends module:meteoJS/thermodynamicDiagram/coordinateSystem.CoordinateSystem\n */\nexport class SkewTlogPDiagram extends CoordinateSystem {\n}\nexport default SkewTlogPDiagram;","/**\n * @module meteoJS/thermodynamicDiagram/plotArea\n */\nimport addEventFunctions from '../Events.js';\nimport { SVG } from '@svgdotjs/svg.js';\n\n/**\n * Event with a sounding object.\n * \n * @typedef {Object} module:meteoJS/thermodynamicDiagram/plotArea~backgroundEvent\n * @property {external:SVG} node\n *   SVG node which contains the background nodes.\n */\n\n/**\n * Fired before creating the background.\n * \n * @event module:meteoJS/thermodynamicDiagram/plotArea#prebuild:background\n * @type {module:meteoJS/thermodynamicDiagram/plotArea~backgroundEvent}\n */\n\n/**\n * Fired after creating the background.\n * \n * @event module:meteoJS/thermodynamicDiagram/plotArea#postbuild:background\n * @type {module:meteoJS/thermodynamicDiagram/plotArea~backgroundEvent}\n */\n\n/**\n * Object passed on events.\n * \n * @typedef {external:Event} module:meteoJS/thermodynamicDiagram/plotArea~event\n * @property {number} elementX - X coordinate.\n * @property {number} elementY - Y coordinate.\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/plotArea#click\n * @type {module:meteoJS/thermodynamicDiagram/plotArea~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/plotArea#dblclick\n * @type {module:meteoJS/thermodynamicDiagram/plotArea~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/plotArea#mousedown\n * @type {module:meteoJS/thermodynamicDiagram/plotArea~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/plotArea#mouseup\n * @type {module:meteoJS/thermodynamicDiagram/plotArea~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/plotArea#mouseover\n * @type {module:meteoJS/thermodynamicDiagram/plotArea~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/plotArea#mouseout\n * @type {module:meteoJS/thermodynamicDiagram/plotArea~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/plotArea#mousemove\n * @type {module:meteoJS/thermodynamicDiagram/plotArea~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/plotArea#touchstart\n * @type {module:meteoJS/thermodynamicDiagram/plotArea~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/plotArea#touchmove\n * @type {module:meteoJS/thermodynamicDiagram/plotArea~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/plotArea#touchleave\n * @type {module:meteoJS/thermodynamicDiagram/plotArea~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/plotArea#touchend\n * @type {module:meteoJS/thermodynamicDiagram/plotArea~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/plotArea#touchcancel\n * @type {module:meteoJS/thermodynamicDiagram/plotArea~event}\n */\n\n/**\n * Events options. On event a\n * {@link module:meteoJS/thermodynamicDiagram/plotArea~event}\n * is passed to the listener.\n * \n * @typedef {Object} module:meteoJS/thermodynamicDiagram/plotArea~eventsOptions\n * @property {Function} [click] - Click listener.\n * @property {Function} [dblclick] - Dblclick listener.\n * @property {Function} [mousedown] - Mousedown listener.\n * @property {Function} [mouseup] - Mouseup listener.\n * @property {Function} [mouseover] - Mouseover listener.\n * @property {Function} [mouseout] - Mouseout listener.\n * @property {Function} [mousemove] - Mousemove listener.\n * @property {Function} [touchstart] - Touchstart listener.\n * @property {Function} [touchmove] - Touchmove listener.\n * @property {Function} [touchleave] - Touchleave listener.\n * @property {Function} [touchend] - Touchend listener.\n * @property {Function} [touchcancel] - Touchcancel listener.\n */\n\n/**\n * Options for the constructor.\n * \n * @typedef {Object} module:meteoJS/thermodynamicDiagram/plotArea~options\n * @param {external:SVG} [svgNode] - SVG Node.\n * @param {integer} [x=0] - X.\n * @param {integer} [y=0] - Y.\n * @param {integer} [width=100] - Width.\n * @param {integer} [height=100] - Height.\n * @param {Object} [style] - SVG-Style for this Area. Default: overflow=hidden.\n * @param {boolean} [visible=true] - Visibility.\n * @param {module:meteoJS/thermodynamicDiagram/plotArea~eventsOptions}\n *   [events] - Events.\n */\n\n/**\n * Abstract class to define an area on the SVG.\n * \n * <pre><code>import PlotArea from 'meteoJS/thermodynamicDiagram/PlotArea';</code></pre>\n * \n * @fires module:meteoJS/thermodynamicDiagram/plotArea#change:visible\n * @fires module:meteoJS/thermodynamicDiagram/plotArea#change:position\n * @fires module:meteoJS/thermodynamicDiagram/plotArea#change:extent\n * @fires module:meteoJS/thermodynamicDiagram/plotArea#prebuild:background\n * @fires module:meteoJS/thermodynamicDiagram/plotArea#postbuild:background\n * @fires module:meteoJS/thermodynamicDiagram/plotArea#click\n * @fires module:meteoJS/thermodynamicDiagram/plotArea#dblclick\n * @fires module:meteoJS/thermodynamicDiagram/plotArea#mousedown\n * @fires module:meteoJS/thermodynamicDiagram/plotArea#mouseup\n * @fires module:meteoJS/thermodynamicDiagram/plotArea#mouseover\n * @fires module:meteoJS/thermodynamicDiagram/plotArea#mouseout\n * @fires module:meteoJS/thermodynamicDiagram/plotArea#mousemove\n * @fires module:meteoJS/thermodynamicDiagram/plotArea#touchstart\n * @fires module:meteoJS/thermodynamicDiagram/plotArea#touchmove\n * @fires module:meteoJS/thermodynamicDiagram/plotArea#touchleave\n * @fires module:meteoJS/thermodynamicDiagram/plotArea#touchend\n * @fires module:meteoJS/thermodynamicDiagram/plotArea#touchcancel\n */\nexport class PlotArea {\n  \n  /**\n   * @param {module:meteoJS/thermodynamicDiagram/plotArea~options}\n   *   options - Options.\n   */\n  constructor({\n    svgNode = undefined,\n    coordinateSystem = undefined,\n    x = 0,\n    y = 0,\n    width = 100,\n    height = 100,\n    style = {},\n    visible = true,\n    events = {}\n  } = {}) {\n    /**\n     * @type external:SVG\n     * @private\n     */\n    this._svgNode = SVG()\n      .attr({\n        x,\n        y,\n        width,\n        height\n      })\n      .css(this._getNormalizedStyle(style))\n      .css('display', visible ? 'inline' : 'none');\n    if (svgNode !== undefined)\n      this.addTo(svgNode);\n    \n    /**\n     * @type external:SVG\n     * @private\n     */\n    this._svgNodeBackground = this._svgNode.group();\n    \n    /**\n     * @type boolean\n     * @private\n     */\n    this._visible = visible;\n    \n    /**\n     * @type module:meteoJS/thermodynamicDiagram/coordinateSystem.CoordinateSystem\n     * @private\n     */\n    this._coordinateSystem = coordinateSystem;\n    \n    /**\n     * @type mixed\n     * @private\n     */\n    this._coordinateSystemListenerKey = (this._coordinateSystem !== undefined)\n      ? this._coordinateSystem\n        .on('change:options', () => this.onCoordinateSystemChange())\n      : undefined;\n    \n    this.on('change:extent', () => this.onCoordinateSystemChange());\n    \n    this._initEvents(events);\n  }\n  \n  /**\n   * SVG container node.\n   * \n   * @type external:SVG\n   * @public\n   * @readonly\n   */\n  get svgNode() {\n    return this._svgNode;\n  }\n  \n  /**\n   * Visibility of the area.\n   * \n   * @type boolean\n   * @public\n   */\n  get visible() {\n    return this._visible;\n  }\n  set visible(visible) {\n    let oldVisible = this._visible;\n    this._visible = visible;\n    if (oldVisible != this._visible) {\n      this._svgNode.style('display', this._visible ? 'inline' : 'none');\n      this.trigger('change:visible');\n    }\n  }\n  \n  /**\n   * X of the top-left edge.\n   * \n   * @type integer\n   * @public\n   */\n  get x() {\n    return this._svgNode.attr('x');\n  }\n  set x(x) {\n    this._svgNode.attr({ x });\n    this.trigger('change:position');\n  }\n  \n  /**\n   * Y of the top-left edge.\n   * \n   * @type integer\n   * @public\n   */\n  get y() {\n    return this._svgNode.attr('y');\n  }\n  set y(y) {\n    this._svgNode.attr({ y });\n    this.trigger('change:position');\n  }\n  \n  /**\n   * Width of the area.\n   * \n   * @type integer\n   * @public\n   */\n  get width() {\n    return this._svgNode.attr('width');\n  }\n  set width(width) {\n    this._svgNode.attr({ width });\n    this.trigger('change:extent');\n  }\n  \n  /**\n   * Height of the area.\n   * \n   * @type integer\n   * @public\n   */\n  get height() {\n    return this._svgNode.attr('height');\n  }\n  set height(height) {\n    this._svgNode.attr({ height });\n    this.trigger('change:extent');\n  }\n  \n  /**\n   * Overflow-style of the area.\n   * \n   * @type string\n   * @public\n   */\n  get style() {\n    return this._svgNode.css();\n  }\n  set style(style) {\n    this._svgNode.css(style);\n  }\n  \n  /**\n   * Coordinate system.\n   * \n   * @type module:meteoJS/thermodynamicDiagram/coordinateSystem.CoordinateSystem\n   * @public\n   */\n  get coordinateSystem() {\n    return this._coordinateSystem;\n  }\n  set coordinateSystem(coordinateSystem) {\n    if (this._coordinateSystemListenerKey !== undefined)\n      this._coordinateSystem\n        .un('change:options', this._coordinateSystemListenerKey);\n    this._coordinateSystem = coordinateSystem;\n    this._coordinateSystemListenerKey =\n      this._coordinateSystem\n        .on('change:options', () => this.onCoordinateSystemChange());\n    this.onCoordinateSystemChange();\n  }\n  \n  /**\n   * Minimal extent length (either width or height).\n   * \n   * @type integer\n   * @readonly\n   */\n  get minExtentLength() {\n    return Math.min(this.width, this.height);\n  }\n  \n  /**\n   * Maximal extent length (either width or height).\n   * \n   * @type integer\n   * @readonly\n   */\n  get maxExtentLength() {\n    return Math.max(this.width, this.height);\n  }\n  \n  /**\n   * Sets the plot area as a child of the argument.\n   * \n   * @param {external:SVG} svgNode - SVG node.\n   */\n  addTo(svgNode) {\n    this._svgNode.addTo(svgNode);\n  }\n  \n  /**\n   * Init the area.\n   * \n   * @protected\n   */\n  init() {\n    this.onCoordinateSystemChange();\n  }\n  \n  /**\n   * Called, when the coordinateSystem object changes.\n   * \n   * @protected\n   */\n  onCoordinateSystemChange() {\n    if (this._coordinateSystem !== undefined)\n      this.drawBackground(this._svgNodeBackground);\n  }\n  \n  /**\n   * Draw background into SVG group.\n   * \n   * This method is only called, when this.coordinateSystem isn't undefined.\n   * \n   * @param {external:SVG} svgNode - SVG group, SVG.G.\n   * @protected\n   */\n  drawBackground(svgNode) {\n    svgNode.clear();\n    this.trigger('prebuild:background', { node: svgNode });\n    this._drawBackground(svgNode);\n    this.trigger('postbuild:background', { node: svgNode });\n  }\n  \n  /**\n   * Method to inherit from child classes to draw the background of the plot\n   * area.\n   * \n   * This method is only called, when this.coordinateSystem isn't undefined.\n   * \n   * @param {external:SVG} svgNode - SVG group, SVG.G.\n   * @protected\n   */\n  _drawBackground() {}\n  \n  /**\n   * Returns normalized SVG style.\n   * \n   * @private\n   * @param {Object} style - Input SVG style.\n   * @param {string} [style.overflow='hidden'] - Overflow style.\n   * @returns {Object} - SVG style.\n   */\n  _getNormalizedStyle({\n    overflow = 'hidden'\n  }) {\n    return {\n      overflow\n    };\n  }\n  \n  /**\n   * Initialize events.\n   * \n   * @param {Object} options - Options.\n   * @private\n   */\n  _initEvents({\n    click = undefined,\n    dblclick = undefined,\n    mousedown = undefined,\n    mouseup = undefined,\n    mouseover = undefined,\n    mouseout = undefined,\n    mousemove = undefined,\n    touchstart = undefined,\n    touchmove = undefined,\n    touchleave = undefined,\n    touchend = undefined,\n    touchcancel = undefined\n  }) {\n    const events = {\n      click,\n      dblclick,\n      mousedown,\n      mouseup,\n      mouseover,\n      mouseout,\n      mousemove,\n      touchstart,\n      touchmove,\n      touchleave,\n      touchend,\n      touchcancel\n    };\n    Object.keys(events).forEach(eventKey => {\n      this._svgNode.on(eventKey, e => {\n        const customEvent =\n          this.getExtendedEvent(e,\n            this._svgNode.point(\n              e.pageX - window.pageXOffset,\n              e.pageY - window.pageYOffset));\n        if (events[eventKey] !== undefined)\n          events[eventKey].call(this, customEvent);\n        this.trigger(eventKey, customEvent);\n      });\n    });\n  }\n  \n  /**\n   * Extend an event with some properties.\n   * \n   * @param {external:Event} e - Event.\n   * @param {external:SVG} p - Point.\n   * @protected\n   */\n  getExtendedEvent(e, p) {\n    e.elementX = p.x;\n    e.elementY = p.y;\n    return e;\n  }\n}\naddEventFunctions(PlotArea.prototype);\nexport default PlotArea;","/**\n * @module meteoJS/thermodynamicDiagram/plotDataArea\n */\nimport PlotArea from './PlotArea.js';\n\n/**\n * Event with a sounding object.\n * \n * @typedef {Object} module:meteoJS/thermodynamicDiagram/plotDataArea~soundingEvent\n * @property {module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding}\n *   sounding - Sounding.\n */\n\n/**\n * Fired on adding a sounding.\n * \n * @event module:meteoJS/thermodynamicDiagram/plotDataArea#add:sounding\n * @type {module:meteoJS/thermodynamicDiagram/plotDataArea~soundingEvent}\n */\n\n/**\n * Fired on removing a sounding.\n * \n * @event module:meteoJS/thermodynamicDiagram/plotDataArea#remove:sounding\n * @type {module:meteoJS/thermodynamicDiagram/plotDataArea~soundingEvent}\n */\n\n/**\n * Event with a sounding object and its SVG node.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram/plotDataArea~soundingEvent}\n *   module:meteoJS/thermodynamicDiagram/plotDataArea~insertSoundingEvent\n * @property {external:SVG} node - SVG node, SVG.G.\n */\n\n/**\n * Fired before inserting the sounding data into the svg.\n * \n * @event module:meteoJS/thermodynamicDiagram/plotDataArea#preinsert:sounding\n * @type {module:meteoJS/thermodynamicDiagram/plotDataArea~insertSoundingEvent}\n */\n\n/**\n * Fired after inserting the sounding data into the svg.\n * \n * @event module:meteoJS/thermodynamicDiagram/plotDataArea#postinsert:sounding\n * @type {module:meteoJS/thermodynamicDiagram/plotDataArea~insertSoundingEvent}\n */\n\n/**\n * Visibility of the sounding in an area.\n * \n * @typedef {Function}\n *   module:meteoJS/thermodynamicDiagram/plotDataArea~getSoundingVisibility\n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding}\n *   sounding - Sounding to determine its visibility.\n * @returns {boolean} Visibility.\n */\n\n/**\n * Returns x and y coordinates in the Plot-Area for the passed levelData.\n * \n * @typedef {Function}\n *   module:meteoJS/thermodynamicDiagram/plotDataArea~getCoordinatesByLevelData\n * @param {string} dataGroupId - Data group id.\n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding}\n *   sounding - Corresponding sounding.\n * @param {module:meteoJS/sounding~levelData}\n *   levelData - Level data of the sounding.\n * @param {module:meteoJS/thermodynamicDiagram/plotDataArea.PlotDataArea}\n *   plotArea - Plot-Area.\n * @returns {Object} - Containing x and y.\n */\n\n/**\n * Draws data into a SVG node.\n * \n * @typedef {Function}\n *   module:meteoJS/thermodynamicDiagram/plotDataArea~insertDataGroupInto\n * @param {external:SVG} svgNode - Insert sounding data into this SVG node.\n * @param {string} dataGroupId - Data group id.\n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding}\n *   sounding - Corresponding sounding.\n * @param {Object[]}\n *   data - Data of the sounding, containing x and y coordinates and levelData.\n * @param {module:meteoJS/thermodynamicDiagram/plotDataArea.PlotDataArea}\n *   plotArea - Plot-Area.\n */\n\n/**\n * Filter data point before drawing.\n * \n * @typedef {Function}\n *   module:meteoJS/thermodynamicDiagram/plotDataArea~filterDataPoint\n * @param {Object} pointData - Point data.\n * @param {module:meteoJS/sounding~levelData} pointData.levelData - Level data.\n * @param {number} pointData.x - x coordinate of the data point.\n * @param {nmber} pointData.y - y coordinate of the data point.\n * @param {Object} lastPointData - Data of the last point.\n * @param {module:meteoJS/sounding~levelData} [lastPointData.levelData]\n *   Level data of the last point.\n * @param {number} [lastPointData.x] - x coordinate of the last data point.\n * @param {nmber} [lastPointData.y] - y coordinate of the last data point.\n */\n\n/**\n * Options for the constructor.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram/plotArea~options}\n *   module:meteoJS/thermodynamicDiagram/plotDataArea~options\n * @param {module:meteoJS/thermodynamicDiagram/plotDataArea~getSoundingVisibility} [getSoundingVisibility]\n *   Takes a sounding object and returns the visibility for the area.\n * @param {string[]} [dataGroupIds=[]] - IDs of several grouped datas.\n * @param {module:meteoJS/thermodynamicDiagram/plotDataArea~getCoordinatesByLevelData}\n *   [getCoordinatesByLevelData] - Coordinate function.\n * @param {module:meteoJS/thermodynamicDiagram/plotDataArea~insertDataGroupInto}\n *   [insertDataGroupInto] - SVG drawing function.\n * @param {undefined|module:meteoJS/thermodynamicDiagram/plotDataArea~filterDataPoint}\n *   [filterDataPoint] - Function to filter data points, that shouldn't be\n *   plotted. If undefined, no data point is filtered\n *   (expect minDataPointsDistance is set).\n * @param {number} [minDataPointsDistance=0]\n *   Minimum distance between data points in pixels. If filterDataPoint is set,\n *   minDataPointsDistance is ignored.\n */\n\n/**\n * Abstract class to define an area on the SVG with sounding data.\n * \n * <pre><code>import PlotDataArea from 'meteojs/thermodynamicDiagram/PlotDataArea';</code></pre>\n * \n * @extends module:meteoJS/thermodynamicDiagram/plotArea.PlotArea\n * \n * @fires module:meteoJS/thermodynamicDiagram/plotDataArea#add:sounding\n * @fires module:meteoJS/thermodynamicDiagram/plotDataArea#remove:sounding\n * @fires module:meteoJS/thermodynamicDiagram/plotDataArea#prebuild:sounding\n * @fires module:meteoJS/thermodynamicDiagram/plotDataArea#postbuild:sounding\n */\nexport class PlotDataArea extends PlotArea {\n  \n  /**\n   * @param {module:meteoJS/thermodynamicDiagram/plotDataArea~options}\n   *   options - Options.\n   */\n  constructor({\n    svgNode = undefined,\n    coordinateSystem = undefined,\n    x = 0,\n    y = 0,\n    width = 100,\n    height = 100,\n    style = {},\n    visible = true,\n    events = {},\n    getSoundingVisibility = sounding => sounding.visible,\n    dataGroupIds = [],\n    getCoordinatesByLevelData = () => { return { x: undefined, y: undefined }; },\n    insertDataGroupInto = () => {},\n    filterDataPoint = undefined,\n    minDataPointsDistance = 0\n  } = {}) {\n    super({\n      svgNode,\n      coordinateSystem,\n      x,\n      y,\n      width,\n      height,\n      style,\n      visible,\n      events\n    });\n    \n    /**\n     * @type Function\n     * @private\n     */\n    this._getSoundingVisibility = getSoundingVisibility;\n    \n    /**\n     * @type string[]\n     * @private\n     */\n    this._dataGroupIds = dataGroupIds;\n    \n    /**\n     * @type module:meteoJS/thermodynamicDiagram/plotDataArea~getCoordinatesByLevelData\n     * @private\n     */\n    this._getCoordinatesByLevelData = getCoordinatesByLevelData;\n    \n    /**\n     * @type module:meteoJS/thermodynamicDiagram/plotDataArea~insertDataGroupInto\n     * @private\n     */\n    this._insertDataGroupInto = insertDataGroupInto;\n    \n    /**\n     * @type undefined|module:meteoJS/thermodynamicDiagram/plotDataArea~filterDataPoint\n     * @private\n     */\n    this._filterDataPoint = filterDataPoint;\n    \n    /**\n     * @type number\n     * @private\n     */\n    this._minDataPointsDistance = minDataPointsDistance;\n    \n    /**\n     * @type external:SVG\n     * @private\n     */\n    this._svgNodeData = this.svgNode.group();\n    \n    /**\n     * Contains all soundings to draw as key. The value-object contains 3 items:\n     * group (SVG), listenerKeyVisible, listenerKeyOptions.\n     * \n     * @type Map.<module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding,Object>\n     * @private\n     */\n    this._soundings = new Map();\n  }\n  \n  /**\n   * Groups of different data to plot onto the plot area.\n   * \n   * @type string[]\n   * @readonly\n   */\n  get dataGroupIds() {\n    return this._dataGroupIds;\n  }\n  \n  /**\n   * Returns x and y coordinated of some sounding data.\n   * \n   * @type module:meteoJS/thermodynamicDiagram/plotDataArea~getCoordinatesByLevelData\n   * @readonly\n   */\n  get getCoordinatesByLevelData() {\n    return this._getCoordinatesByLevelData;\n  }\n  \n  /**\n   * Minimum distance between data points in pixels.\n   * \n   * @type number\n   */\n  get minDataPointsDistance() {\n    return this._minDataPointsDistance;\n  }\n  set minDataPointsDistance(minDataPointsDistance) {\n    const oldValue = this._minDataPointsDistance;\n    this._minDataPointsDistance = minDataPointsDistance;\n    \n    if (oldValue != this._minDataPointsDistance)\n      this.drawSoundings();\n  }\n  \n  /**\n   * Adds a sounding to draw into the area.\n   * \n   * @param {module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding}\n   *   sounding - Sounding object.\n   */\n  addSounding(sounding) {\n    let group = this._svgNodeData.group();\n    let listenerKeyVisible = sounding.on('change:visible',\n      () => this.onChangeSoundingVisibility(sounding, group));\n    let listenerKeyOptions = sounding.on('change:options', () => {\n      if (this.coordinateSystem !== undefined)\n        this.drawSounding(sounding, group);\n      this.onChangeSoundingVisibility(sounding, group);\n    });\n    this._soundings.set(sounding, {\n      group,\n      listenerKeyVisible,\n      listenerKeyOptions\n    });\n    this.trigger('add:sounding', sounding);\n    \n    if (this.coordinateSystem !== undefined)\n      this.drawSounding(sounding, group);\n    /* Don't call onChangeSoundingVisibility here.\n     * This is due to PlotAltitudeDataArea. In this class, hoverLabels will get\n     * invisible, when onChangeSoundingVisibility is called. This is not itended\n     * when the added sounding is invisible. But intended if the sounding is\n     * visible. */\n    this.setDisplayOfSounding(sounding, group);\n  }\n  \n  /**\n   * Removes a sounding from the area.\n   * \n   * @param {module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding}\n   *   sounding - Sounding object.\n   */\n  removeSounding(sounding) {\n    if (this._soundings.has(sounding)) {\n      this._soundings.get(sounding).group.remove();\n      sounding.un(this._soundings.get(sounding).listenerKeyVisible);\n      sounding.un(this._soundings.get(sounding).listenerKeyOptions);\n      this._soundings.delete(sounding);\n    }\n    this.trigger('remove:sounding', sounding);\n  }\n  \n  /**\n   * Called, when the coordinateSystem object changes.\n   * \n   * @override\n   */\n  onCoordinateSystemChange() {\n    super.onCoordinateSystemChange();\n    \n    this.drawSoundings();\n  }\n  \n  /**\n   * Called, when a sounding changes its visibilty.\n   * \n   * @param {module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding}\n   *   sounding - Sounding object.\n   * @param {external:SVG} group - SVG group, SVG.G.\n   * @protected\n   */\n  onChangeSoundingVisibility(sounding, group) {\n    this.setDisplayOfSounding(sounding, group);\n  }\n  \n  /**\n   * Sets 'display' property of a SVG group of a sounding, depending of the\n   * sounding's visibility.\n   * \n   * @param {module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding}\n   *   sounding - Sounding object.\n   * @param {external:SVG} group - SVG group, SVG.G.\n   * @protected\n   */\n  setDisplayOfSounding(sounding, group) {\n    group.css('display',\n      this._getSoundingVisibility(sounding) ? 'inline' : 'none');\n  }\n  \n  /**\n   * Draws all soundings.\n   * \n   * @protected\n   */\n  drawSoundings() {\n    if (this.coordinateSystem === undefined)\n      return;\n    \n    for (let sounding of this._soundings.keys())\n      this.drawSounding(sounding, this._soundings.get(sounding).group);\n  }\n  \n  /**\n   * Draw the sounding into the SVG group.\n   * \n   * @param {module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding}\n   *   sounding - Sounding object.\n   * @param {external:SVG} group - SVG group, SVG.G.\n   * @protected\n   */\n  drawSounding(sounding, group) {\n    group.clear();\n    \n    this.trigger('preinsert:sounding', { sounding, node: group });\n    \n    const soundingGroup = group.group();\n    \n    let data = {};\n    const filterDataPointFunction = this._getFilterDataPointFunction();\n    let lastLevel = {};\n    sounding.sounding.getLevels().reverse().forEach(pres => {\n      const levelData = sounding.sounding.getData(pres);\n      \n      this._dataGroupIds.forEach(dataGroupId => {\n        if (!(dataGroupId in data))\n          data[dataGroupId] = [];\n        \n        const level = {\n          levelData,\n          x: undefined,\n          y: undefined\n        };\n        const {x, y} =\n          this._getCoordinatesByLevelData(dataGroupId,\n            sounding, level.levelData, this);\n        level.x = x;\n        level.y = y;\n        \n        if (x === undefined ||\n            y === undefined ||\n            filterDataPointFunction !== undefined &&\n            filterDataPointFunction(level, {...lastLevel}))\n          return;\n        \n        lastLevel = level;\n        data[dataGroupId].push(level);\n      });\n    });\n    \n    Object.keys(data).forEach(dataGroupId => {\n      if (data[dataGroupId].length > 0)\n        this._insertDataGroupInto(soundingGroup, dataGroupId,\n          sounding, data[dataGroupId], this);\n    });\n    \n    this.trigger('postinsert:sounding', { sounding, node: group });\n  }\n  \n  /**\n   * @private\n   */\n  _getFilterDataPointFunction() {\n    return (this._filterDataPoint === undefined) ?\n      makeFilterDataPointFunction(this._minDataPointsDistance) :\n      this._filterDataPoint;\n  }\n}\nexport default PlotDataArea;\n\n/**\n * Creates a filterDataPoint function. It filters data points, which doesn't\n * have a minimal distance.\n * \n * @param {number} minDataPointsDistance - Minimal distance.\n * @returns {undefined|module:meteoJS/thermodynamicDiagram/plotDataArea~filterDataPoint}\n *   filterDataPoint function.\n * @private\n */\nfunction makeFilterDataPointFunction(minDataPointsDistance) {\n  if (minDataPointsDistance === 0)\n    return undefined;\n  \n  return ({ x, y }, lastPoint) => {\n    if (lastPoint.x === undefined ||\n        lastPoint.y === undefined) {\n      lastPoint.x = x;\n      lastPoint.y = y;\n      return false;\n    }\n    const distance =\n      Math.sqrt(Math.pow(x - lastPoint.x, 2) + Math.pow(y - lastPoint.y, 2));\n    const result = (distance < minDataPointsDistance);\n    if (!result) {\n      lastPoint.x = x;\n      lastPoint.y = y;\n    }\n    return result;\n  };\n}","/**\n * @module meteoJS/thermodynamicDiagram/plotAltitudeDataArea\n */\nimport PlotDataArea from './PlotDataArea.js';\n\n/**\n * Function to insert labels.\n * \n * @typedef {Function}\n *   module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea~insertLabelsFunc\n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding}\n *   sounding - Diagram sounding to label.\n * @param {Object} levelData - Data to label.\n * @param {external:SVG} group - SVG group to insert labels.\n */\n\n/**\n * Options for labels on hovering the diagram.\n * \n * @typedef {Object}\n *   module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea~hoverLabelsOptions\n * @property {boolean} [visible=true] - Visibility.\n * @property {string} [type='mousemove'] - Event type.\n * @property {boolean} [snapToData=true]\n *   Snap labels to data points.\n * @property {boolean} [remote=true]\n *   Show labels relative to the mouse position on the diagram, even when the\n *   pointer isn't directly on the plot area.\n * @property {module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea~insertLabelsFunc}\n *   [insertLabelsFunc] - Called to insert labels into a SVG group.\n */\n\n/**\n * Options for the constructor.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram/plotDataArea~options}\n *   module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea~options\n * @param {module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea~hoverLabelsOptions}\n *   [hoverLabels] - Hover labels options.\n */\n\n/**\n * Abstract class to define an area on the SVG with sounding data, plotted with\n * pressure on the y-axis.\n * \n * <pre><code>import PlotAltitudeArea from 'meteojs/thermodynamicDiagram/PlotAltitudeArea';</code></pre>\n * \n * @extends module:meteoJS/thermodynamicDiagram/plotDataArea.PlotDataArea\n */\nexport class PlotAltitudeDataArea extends PlotDataArea {\n  \n  /**\n   * @param {module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea~options}\n   *   options - Options.\n   */\n  constructor({\n    svgNode = undefined,\n    coordinateSystem = undefined,\n    x = 0,\n    y = 0,\n    width = 100,\n    height = 100,\n    style = {},\n    visible = true,\n    events = {},\n    hoverLabels = {},\n    getSoundingVisibility = sounding => sounding.visible,\n    dataGroupIds = undefined,\n    getCoordinatesByLevelData = undefined,\n    insertDataGroupInto = undefined,\n    filterDataPoint = undefined,\n    minDataPointsDistance = 0\n  } = {}) {\n    super({\n      svgNode,\n      coordinateSystem,\n      x,\n      y,\n      width,\n      height,\n      style,\n      visible,\n      events,\n      getSoundingVisibility,\n      dataGroupIds,\n      getCoordinatesByLevelData,\n      insertDataGroupInto,\n      filterDataPoint,\n      minDataPointsDistance\n    });\n    \n    /**\n     * @type external:SVG\n     * @private\n     */\n    this._hoverLabelsGroup = this.svgNode.group();\n    \n    /**\n     * @type boolean\n     * @private\n     */\n    this._isHoverLabelsRemote = true;\n    \n    this._initHoverLabels(hoverLabels);\n  }\n  \n  /**\n   * Called, when a sounding changes its visibilty.\n   * \n   * @override\n   */\n  onChangeSoundingVisibility(sounding, group) {\n    super.onChangeSoundingVisibility(sounding, group);\n    this._hoverLabelsGroup.clear();\n  }\n  \n  /**\n   * Draw the sounding into the SVG group.\n   * \n   * @override\n   */\n  drawSounding(sounding, group) {\n    super.drawSounding(sounding, group);\n    /* Only hide hoverLabels, when Sounding is visible. */\n    if (this._getSoundingVisibility(sounding))\n      this._hoverLabelsGroup.clear();\n  }\n  \n  /**\n   * Extend an event with pressure.\n   * \n   * @override\n   */\n  getExtendedEvent(e, p) {\n    e = super.getExtendedEvent(e, p);\n    \n    e.diagramPres = undefined;\n    if (this.coordinateSystem !== undefined)\n      e.diagramPres =\n        this.coordinateSystem.getPByXY(0,\n          this.coordinateSystem.height - e.elementY);\n    \n    return e;\n  }\n  \n  /**\n   * Show also hover labels when mouse isn't over the area.\n   * \n   * @type boolean\n   * @readonly\n   */\n  get isHoverLabelsRemote() {\n    return this._isHoverLabelsRemote;\n  }\n  \n  get hoverLabelsSounding() {\n    // Wie \"manuell\" setzen?\n    for (let sounding of this._soundings.keys()) {\n      if (this._getSoundingVisibility(sounding))\n        return sounding;\n    }\n    return undefined;\n  }\n  \n  /**\n   * Initialize hover labels options.\n   * \n   * @param {module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea~hoverLabelsOptions}\n   *   options - Hover labels options.\n   */\n  _initHoverLabels({\n    visible = true,\n    type = 'mousemove',\n    //snapToData = true,\n    remote = true,\n    insertLabelsFunc = undefined\n  }) {\n    this._isHoverLabelsRemote = remote;\n    \n    if (!visible ||\n        insertLabelsFunc === undefined)\n      return;\n    \n    this.on('change:extent', () => this._hoverLabelsGroup.clear());\n    this.on(type, e => {\n      if (!e.diagramPres)\n        return;\n      const hoverLabelsSounding = this.hoverLabelsSounding;\n      if (hoverLabelsSounding === undefined)\n        return;\n      \n      const sounding = hoverLabelsSounding.sounding;\n      insertLabelsFunc(hoverLabelsSounding,\n        sounding.getData(sounding.getNearestLevel(e.diagramPres)),\n        this._hoverLabelsGroup);\n    });\n  }\n}\nexport default PlotAltitudeDataArea;","/**\n * @module meteoJS/thermodynamicDiagram/tdDiagram\n */\nimport {\n  tempCelsiusToKelvin,\n  tempKelvinToCelsius,\n  potentialTempByTempAndPres,\n  saturationHMRByTempAndPres,\n  lclByPotentialTempAndHMR,\n  lclTemperatureByTempAndDewpoint,\n  equiPotentialTempByTempAndDewpointAndPres,\n  wetbulbTempByTempAndDewpointAndPres,\n  altitudeISAByPres\n} from '../calc.js';\nimport {\n  getNormalizedLineStyleOptions,\n  getNormalizedFontOptions,\n  getFirstDefinedValue,\n  drawTextInto\n} from './Functions.js';\nimport PlotAltitudeDataArea from './PlotAltitudeDataArea.js';\n\n/**\n * Object passed on events.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram/plotArea~event}\n *   module:meteoJS/thermodynamicDiagram/tdDiagram~event\n * @property {number} p - Pressure coordinate [hPa].\n * @property {number} T - Temperature coordinate [K].\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/tdDiagram#click\n * @type {module:meteoJS/thermodynamicDiagram/tdDiagram~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/tdDiagram#dblclick\n * @type {module:meteoJS/thermodynamicDiagram/tdDiagram~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/tdDiagram#mousedown\n * @type {module:meteoJS/thermodynamicDiagram/tdDiagram~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/tdDiagram#mouseup\n * @type {module:meteoJS/thermodynamicDiagram/tdDiagram~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/tdDiagram#mouseover\n * @type {module:meteoJS/thermodynamicDiagram/tdDiagram~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/tdDiagram#mouseout\n * @type {module:meteoJS/thermodynamicDiagram/tdDiagram~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/tdDiagram#mousemove\n * @type {module:meteoJS/thermodynamicDiagram/tdDiagram~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/tdDiagram#touchstart\n * @type {module:meteoJS/thermodynamicDiagram/tdDiagram~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/tdDiagram#touchmove\n * @type {module:meteoJS/thermodynamicDiagram/tdDiagram~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/tdDiagram#touchleave\n * @type {module:meteoJS/thermodynamicDiagram/tdDiagram~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/tdDiagram#touchend\n * @type {module:meteoJS/thermodynamicDiagram/tdDiagram~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/tdDiagram#touchcancel\n * @type {module:meteoJS/thermodynamicDiagram/tdDiagram~event}\n */\n\n/**\n * Options for pressure label.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram~lineTextOptions}\n *   module:meteoJS/thermodynamicDiagram/tdDiagram~presLabelOptions\n * @property {string|Object} [fill]\n *   Fill option for background rect. Default is 'white' with opacity 0.7.\n * @property {number} [horizontalMargin=5] - Margin in x direction.\n * @property {number} [verticalMargin=0] - Margin in y direction.\n * @property {number|'100%'} [length=60]\n *   Length of the horizontal line. A number is in pixel unit. A string\n *   with a appended '%' indicates a length relative to the diagram width.\n * @property {'left'|'right'} [align='left']\n *   Align pressure label left/right in the diagram.\n */\n\n/**\n * Options for labels.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram~lineTextOptions}\n *   module:meteoJS/thermodynamicDiagram/tdDiagram~labelsOptions\n * @property {string|Object} [fill]\n *   Fill option for background rect. Default is 'white' with opacity 0.7.\n * @property {number} [horizontalMargin=10] - Margin in x direction.\n * @property {number} [verticalMargin=0] - Margin in y direction.\n * @property {number} [radius=undefined] - Radius for hover circle.\n * @property {number} [radiusPlus=2]\n *   Radius relative to line width for hover circle.\n */\n\n/**\n * Options for labels on hovering the thermodynamic diagram.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea~hoverLabelsOptions}\n *   module:meteoJS/thermodynamicDiagram/tdDiagram~hoverLabelsOptions\n * @property {module:meteoJS/thermodynamicDiagram/tdDiagram~presLabelOptions}\n *   [pres] - Options for pressure label.\n * @property {module:meteoJS/thermodynamicDiagram/tdDiagram~labelsOptions}\n *   [temp] - Options for temperature label.\n * @property {module:meteoJS/thermodynamicDiagram/tdDiagram~labelsOptions}\n *   [dewp] - Options for dew point label.\n * @property {module:meteoJS/thermodynamicDiagram/tdDiagram~labelsOptions}\n *   [wetbulb] - Options for wetbulb temperature label.\n */\n\n/**\n * Options for parcels in the diagram.\n * \n * @typedef {Object}\n *   module:meteoJS/thermodynamicDiagram/tdDiagram~parcelsOptions\n * @property {boolean} [visible=true] - Visibility of parcels.\n */\n\n/**\n * Definition of lines in a thermodynamic diagram.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram~lineStyleOptions}\n *   module:meteoJS/thermodynamicDiagram/tdDiagram~linesOptions\n * @property {undefined|Array<number>} [highlightedLines=undefined]\n *   Highlight lines at this values.\n * @property {undefined|Array<number>} [lines=undefined]\n *   Draw values for this values.\n * @property {number} [max=undefined]\n *   Maximum value for a line. Ignored if lines is set.\n * @property {number} [min=undefined]\n *   Minimum value for a line. Ignored if lines is set.\n * @property {number} [interval=undefined]\n *   Interval between different lines. Ignored if lines is set.\n * @property {number} [maxPressure=undefined]\n *   Start line from this maximum pressure.\n * @property {number} [minPressure=undefined]\n *   End line at this minimum pressure.\n */\n\n/**\n * Options for the constructor.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea~options}\n *   module:meteoJS/thermodynamicDiagram/tdDiagram~options\n * @param {module:meteoJS/thermodynamicDiagram/tdDiagram~linesOptions}\n *   [isobars] - Isobars configuration.\n * @param {module:meteoJS/thermodynamicDiagram/tdDiagram~linesOptions}\n *   [isotherms] - Isotherms configuration.\n * @param {module:meteoJS/thermodynamicDiagram/tdDiagram~linesOptions}\n *   [dryadiabats] - Dry adiabats configuration.\n * @param {module:meteoJS/thermodynamicDiagram/tdDiagram~linesOptions}\n *   [pseudoadiabats] - Pseudo adiabats configuration.\n * @param {module:meteoJS/thermodynamicDiagram/tdDiagram~linesOptions}\n *   [mixingratio] - Mixing ratio configuration.\n * @param {module:meteoJS/thermodynamicDiagram/tdDiagram~hoverLabelsOptions}\n *   [hoverLabels] - Hover labels options.\n * @param {module:meteoJS/thermodynamicDiagram/tdDiagram~parcelsOptions}\n *   [parcels] - Parcels options.\n */\n\n/**\n * Class to draw the real thermodynamic diagram.\n * \n * <pre><code>import TDDiagram from 'meteojs/thermodynamicDiagram/TDDiagram';</code></pre>\n * \n * @extends module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea.PlotAltitudeDataArea\n * \n * @fires module:meteoJS/thermodynamicDiagram/tdDiagram#click\n * @fires module:meteoJS/thermodynamicDiagram/tdDiagram#dblclick\n * @fires module:meteoJS/thermodynamicDiagram/tdDiagram#mousedown\n * @fires module:meteoJS/thermodynamicDiagram/tdDiagram#mouseup\n * @fires module:meteoJS/thermodynamicDiagram/tdDiagram#mouseover\n * @fires module:meteoJS/thermodynamicDiagram/tdDiagram#mouseout\n * @fires module:meteoJS/thermodynamicDiagram/tdDiagram#mousemove\n * @fires module:meteoJS/thermodynamicDiagram/tdDiagram#touchstart\n * @fires module:meteoJS/thermodynamicDiagram/tdDiagram#touchmove\n * @fires module:meteoJS/thermodynamicDiagram/tdDiagram#touchleave\n * @fires module:meteoJS/thermodynamicDiagram/tdDiagram#touchend\n * @fires module:meteoJS/thermodynamicDiagram/tdDiagram#touchcancel\n */\nexport class TDDiagram extends PlotAltitudeDataArea {\n  \n  /**\n   * @param {module:meteoJS/thermodynamicDiagram/tdDiagram~linesOptions} [options]\n   *   Options.\n   */\n  constructor({\n    svgNode = undefined,\n    coordinateSystem = undefined,\n    x = 0,\n    y = 0,\n    width = 100,\n    height = 100,\n    style = {},\n    visible = true,\n    events = {},\n    dataGroupIds = ['temp', 'dewp', 'wetbulb'],\n    getCoordinatesByLevelData = (dataGroupId, sounding, levelData, plotArea) => {\n      if (levelData.pres === undefined)\n        return {};\n      \n      let value = undefined;\n      switch (dataGroupId) {\n      case 'temp':\n        value = levelData.tmpk;\n        break;\n      case 'dewp':\n        value = levelData.dwpk;\n        break;\n      case 'wetbulb':\n        value = wetbulbTempByTempAndDewpointAndPres(\n          levelData.tmpk,\n          levelData.dwpk,\n          levelData.pres\n        );\n        break;\n      }\n      if (value === undefined)\n        return {};\n      \n      return {\n        x: plotArea.coordinateSystem.getXByPT(levelData.pres, value),\n        y: plotArea.coordinateSystem.height -\n          plotArea.coordinateSystem.getYByPT(levelData.pres, value),\n        value: Math.round(tempKelvinToCelsius(value)*10)/10,\n        unit: '℃'\n      };\n    },\n    insertDataGroupInto = (svgNode, dataGroupId, sounding, data) => {\n      const options =\n        (dataGroupId in sounding.options.diagram)\n          ? sounding.options.diagram[dataGroupId].style : {};\n      svgNode.group()\n        .polyline(data.map(level => [ level.x, level.y ]))\n        .fill('none').stroke(options);\n    },\n    filterDataPoint = undefined,\n    minDataPointsDistance = 0,\n    isobars = {},\n    isotherms = {},\n    dryadiabats = {},\n    pseudoadiabats = {},\n    mixingratio = {},\n    hoverLabels = {},\n    parcels = {}\n  } = {}) {\n    super({\n      svgNode,\n      coordinateSystem,\n      x,\n      y,\n      width,\n      height,\n      style,\n      visible,\n      events,\n      hoverLabels,\n      getSoundingVisibility:\n        sounding => sounding.visible && sounding.options.diagram.visible,\n      dataGroupIds,\n      getCoordinatesByLevelData,\n      insertDataGroupInto,\n      filterDataPoint,\n      minDataPointsDistance\n    });\n    \n    this.options = {\n      isobars: getNormalizedDiagramLineOptions(isobars),\n      isotherms:\n        getNormalizedDiagramLineOptions(isotherms, {\n          highlightedLines: [tempCelsiusToKelvin(0)]\n        }),\n      dryadiabats:\n        getNormalizedDiagramLineOptions(dryadiabats),\n      pseudoadiabats:\n        getNormalizedDiagramLineOptions(pseudoadiabats, {\n          style: {\n            color: 'rgb(102, 51, 0)',\n            dasharray: 6\n          }\n        }),\n      mixingratio:\n        getNormalizedDiagramLineOptions(mixingratio, {\n          minPressure: 500,\n          style: {\n            color: 'rgb(102, 51, 0)',\n            dasharray: 2\n          }\n        })\n    };\n    \n    this.svgGroups = {\n      border: this._svgNodeBackground.group(),\n      isobars: this._svgNodeBackground.group(),\n      isotherms: this._svgNodeBackground.group(),\n      dryadiabats: this._svgNodeBackground.group(),\n      mixingratio: this._svgNodeBackground.group(),\n      pseudoadiabats: this._svgNodeBackground.group()\n    };\n    \n    /**\n     * @type module:meteoJS/thermodynamicDiagram/tdDiagram~parcelsOptions\n     * @private\n     */\n    this._parcelsOptions = parcels;\n    if (!('visible' in this._parcelsOptions))\n      this._parcelsOptions.visible = true;\n    \n    /**\n     * @typedef {module:meteoJS/thermodynamicDiagram/diagramSounding~parcelsItems}\n     * @property {undefined|external:SVG} parcelsGroup\n     *   SVG Group to plot the parcels.\n     * @property {Map.<module:meteoJS/thermodynamicDiagram/diagramParcel.DiagramParcel,external:SVG>} parcelsGroup\n     *   Pairs of DiagramParcel objects and SVG Group. The parcel is plotted\n     *   into the group. The group is contained in 'parcelsGroup'.\n     * @property {undefined|mixed} addItemListenerKey\n     *   Listener key for the {@link module:meteoJS/base/collection#add:item} event\n     *   on {@link module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding#diagramParcelCollection}\n     *   for each sounding plotted in this diagram.\n     * @property {Object[]} changeVisibleListeners\n     * @property {Object[]} changeOptionsListeners\n     */\n    \n    /**\n     * @type Map.<module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding,module:meteoJS/thermodynamicDiagram/diagramSounding~parcelsItems>\n     * @private\n     */\n    this._parcels = new Map();\n    this.on('add:sounding', sounding => {\n      /** @type module:meteoJS/thermodynamicDiagram/diagramSounding~parcelsItems */\n      const soundingParcelsItems = {\n        parcelsGroup: undefined,\n        parcelsGroups: new Map(),\n        addItemListenerKey: undefined,\n        removeItemListenerKey: undefined,\n        changeVisibleListeners: [],\n        changeOptionsListeners: []\n      };\n      const onAddParcel = diagramParcel => {\n        soundingParcelsItems.changeVisibleListeners.push({\n          diagramParcel,\n          listenerKey: diagramParcel.on('change:visible', () => {\n            if (!soundingParcelsItems.parcelsGroups.has(diagramParcel))\n              return;\n            const group = soundingParcelsItems.parcelsGroups.get(diagramParcel);\n            diagramParcel.visible ? group.show() : group.hide();\n          })\n        });\n        soundingParcelsItems.changeOptionsListeners.push({\n          diagramParcel,\n          listenerKey: diagramParcel.on('change:options', () => {\n            // Delte old parcel\n            const soundingParcelsItems = this._parcels.get(sounding);\n            if (soundingParcelsItems !== undefined) {\n              const group =\n                soundingParcelsItems.parcelsGroups.get(diagramParcel);\n              if (group !== undefined) {\n                soundingParcelsItems.parcelsGroups.delete(diagramParcel);\n                group.remove();\n              }\n            }\n            // Redraw\n            this.drawParcel(sounding, diagramParcel);\n          })\n        });\n      };\n      soundingParcelsItems.addItemListenerKey =\n        sounding.diagramParcelCollection.on('add:item', diagramParcel => {\n          onAddParcel(diagramParcel);\n          this.drawParcel(sounding, diagramParcel);\n        });\n      soundingParcelsItems.removeItemListenerKey =\n        sounding.diagramParcelCollection.on('remove:item', diagramParcel => {\n          const group =\n            soundingParcelsItems.parcelsGroups.get(diagramParcel);\n          if (group !== undefined) {\n            soundingParcelsItems.parcelsGroups.delete(diagramParcel);\n            group.remove();\n          }\n        });\n      for (let diagramParcel of sounding.diagramParcelCollection)\n        onAddParcel(diagramParcel);\n      this._parcels.set(sounding, soundingParcelsItems);\n      /* After this event, {@link module:meteoJS/thermodynamicDiagram/tdDiagram.TDDiagram#drawSounding}\n       * is executed and therefore also\n       * {@link module:meteoJS/thermodynamicDiagram/tdDiagram.TDDiagram#drawParcels}.\n       */\n    });\n    // Remove all listeners on the parcels contained in the removed sounding.\n    this.on('remove:sounding', sounding => {\n      if (this._parcels.has(sounding)) {\n        /** @type module:meteoJS/thermodynamicDiagram/diagramSounding~parcelsItems */\n        const soundingParcelsItems = this._parcels.get(sounding);\n        sounding.diagramParcelCollection\n          .un('add:item', soundingParcelsItems.addItemListenerKey);\n        sounding.diagramParcelCollection\n          .un('remove:item', soundingParcelsItems.removeItemListenerKey);\n        soundingParcelsItems.changeVisibleListeners\n          .forEach(listenerObj =>\n            listenerObj.diagramParcel\n              .un('change:visible', listenerObj.listenerKey));\n        soundingParcelsItems.changeOptionsListeners\n          .forEach(listenerObj =>\n            listenerObj.diagramParcel\n              .un('change:options', listenerObj.listenerKey));\n      }\n      this._parcels.delete(sounding);\n    });\n    \n    this.init();\n  }\n  \n  /**\n   * Return the visibility of the isobars.\n   * @returns {boolean} Visibility of the isobars.\n   * @deprecated\n   */\n  getIsobarsVisible() {\n    return this.options.isobars.visible;\n  }\n  \n  /**\n   * Sets the visibility of the isobars.\n   * @param {boolean} visible Visibility of the isobars.\n   * @returns {module:meteoJS/thermodynamicDiagram/tdDiagram.TDDiagram} this.\n   * @deprecated\n   */\n  setIsobarsVisible(visible) {\n    this.options.isobars.visible = visible ? true : false;\n    this.plotIsobars();\n    return this;\n  }\n  \n  /**\n   * Return the visibility of the isotherms.\n   * @returns {boolean} Visibility of the isotherms.\n   * @deprecated\n   */\n  getIsothermsVisible() {\n    return this.options.isotherms.visible;\n  }\n  \n  /**\n   * Sets the visibility of the isotherms.\n   * @param {boolean} visible Visibility of the isotherms.\n   * @returns {module:meteoJS/thermodynamicDiagram/tdDiagram.TDDiagram} this.\n   * @deprecated\n   */\n  setIsothermsVisible(visible) {\n    this.options.isotherms.visible = visible ? true : false;\n    this.plotIsotherms();\n    return this;\n  }\n  \n  /**\n   * Return the visibility of the dry adiabats.\n   * @returns {boolean} Visibility of the dry adiabats.\n   * @deprecated\n   */\n  getDryadiabatsVisible() {\n    return this.options.dryadiabats.visible;\n  }\n  \n  /**\n   * Sets the visibility of the dry adiabats.\n   * @param {boolean} visible Visibility of the dry adiabats.\n   * @returns {module:meteoJS/thermodynamicDiagram/tdDiagram.TDDiagram} this.\n   * @deprecated\n   */\n  setDryadiabatsVisible(visible) {\n    this.options.dryadiabats.visible = visible ? true : false;\n    this.plotDryadiabats();\n    return this;\n  }\n  \n  /**\n   * Return the visibility of the pseudo adiabats.\n   * @returns {boolean} Visibility of the pseudo adiabats.\n   * @deprecated\n   */\n  getPseudoadiabatsVisible() {\n    return this.options.pseudoadiabats.visible;\n  }\n  \n  /**\n   * Sets the visibility of the pseudo adiabats.\n   * @param {boolean} visible Visibility of the pseudo adiabats.\n   * @returns {module:meteoJS/thermodynamicDiagram/tdDiagram.TDDiagram} this.\n   * @deprecated\n   */\n  setPseudoadiabatsVisible(visible) {\n    this.options.pseudoadiabats.visible = visible ? true : false;\n    this.plotPseudoadiabats();\n    return this;\n  }\n  \n  /**\n   * Return the visibility of the mixing ratio.\n   * @returns {boolean} Visibility of the mixing ratio.\n   * @deprecated\n   */\n  getMixingratioVisible() {\n    return this.options.mixingratio.visible;\n  }\n  \n  /**\n   * Sets the visibility of the mixing ratio.\n   * @param {boolean} visible Visibility of the mixing ratio.\n   * @returns {module:meteoJS/thermodynamicDiagram/tdDiagram.TDDiagram} this.\n   * @deprecated\n   */\n  setMixingratioVisible(visible) {\n    this.options.mixingratio.visible = visible ? true : false;\n    this.plotMixingratio();\n    return this;\n  }\n  \n  /**\n   * Draw the sounding into the SVG group.\n   * \n   * @override\n   */\n  drawSounding(sounding, group) {\n    super.drawSounding(sounding, group);\n    \n    // Draw parcels\n    if (this._parcels.has(sounding)) {\n      let parcelsObj = this._parcels.get(sounding);\n      parcelsObj.parcelsGroup = group.group();\n      if (!sounding.options.parcels.visible)\n        parcelsObj.parcelsGroup.hide();\n      this._parcels.set(sounding, parcelsObj);\n    }\n    this.drawParcels(sounding);\n  }\n  \n  /**\n   * Draws parcels of a sounding.\n   * \n   * @param {module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding}\n   *   sounding - Sounding.\n   */\n  drawParcels(sounding) {\n    if (!this._parcelsOptions.visible)\n      return;\n    if (!this._parcels.has(sounding))\n      return;\n    \n    /** @type module:meteoJS/thermodynamicDiagram/diagramSounding~parcelsItems */\n    const soundingParcelsItems = this._parcels.get(sounding);\n    soundingParcelsItems.parcelsGroup.clear();\n    soundingParcelsItems.parcelsGroups.clear();\n    for (let diagramParcel of sounding.diagramParcelCollection)\n      this.drawParcel(sounding, diagramParcel);\n  }\n  \n  /**\n   * Draws a parcel.\n   * \n   * @param {module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding}\n   *   diagramSounding - DiagramSounding object, which contains the parcel.\n   * @param {module:meteoJS/thermodynamicDiagram/diagramParcel.DiagramParcel}\n   *   diagramParcel - Parcel lift to draw.\n   * @param {external:SVG} group - SVG group to draw parcel into.\n   * @private\n   */\n  drawParcel(diagramSounding, diagramParcel) {\n    const parcel = diagramParcel.parcel;\n    if (parcel.pres === undefined ||\n        parcel.tmpc === undefined ||\n        parcel.dwpc === undefined)\n      return;\n    if (!this._parcels.has(diagramSounding))\n      return;\n    const soundingParcelsItems = this._parcels.get(diagramSounding);\n    const group = soundingParcelsItems.parcelsGroup.group();\n    soundingParcelsItems.parcelsGroups.set(diagramParcel, group);\n    this._parcels.set(diagramSounding, soundingParcelsItems);\n    \n    const pottmpk =\n      potentialTempByTempAndPres(tempCelsiusToKelvin(parcel.tmpc), parcel.pres);\n    const hmr =\n      saturationHMRByTempAndPres(tempCelsiusToKelvin(parcel.dwpc), parcel.pres);\n    const lclpres = lclByPotentialTempAndHMR(pottmpk, hmr);\n    const lcltmpk = lclTemperatureByTempAndDewpoint(\n      tempCelsiusToKelvin(parcel.tmpc),\n      tempCelsiusToKelvin(parcel.dwpc));\n    const lclthetaek = equiPotentialTempByTempAndDewpointAndPres(\n      lcltmpk, lcltmpk, lclpres);\n    \n    const options = diagramParcel.options;\n    \n    // SVG groups\n    if (!options.visible)\n      group.hide();\n    const tempGroup = group.group();\n    if (!options.temp.visible)\n      tempGroup.hide();\n    let dewpGroup = group.group();\n    if (!options.dewp.visible)\n      dewpGroup.hide();\n    \n    // Draw temp curve\n    const yInterval = 10;\n    const y0 = this.coordinateSystem\n      .getYByPT(parcel.pres, tempCelsiusToKelvin(parcel.tmpc));\n    const x0 = this.coordinateSystem.getXByYPotentialTemperature(y0, pottmpk);\n    const y1 = this.coordinateSystem.getYByPPotentialTemperatur(lclpres, pottmpk);\n    const x1 = this.coordinateSystem.getXByYPotentialTemperature(y1, pottmpk);\n    let tempPolyline = [[x0, y0]];\n    if (!this.coordinateSystem.isDryAdiabatStraightLine())\n      for (let y=y0+yInterval; y<y1; y+=yInterval) {\n        tempPolyline.push([\n          this.coordinateSystem.getXByYPotentialTemperature(y, pottmpk),\n          y\n        ]);\n      }\n    tempPolyline.push([x1, y1]);\n    const y2 = this.coordinateSystem.height;\n    const x2 = this.coordinateSystem.getXByYEquiPotTemp(y2, lclthetaek);\n    for (let y=y1+yInterval; y<y2; y+=yInterval) {\n      tempPolyline.push([\n        this.coordinateSystem.getXByYEquiPotTemp(y, lclthetaek),\n        y\n      ]);\n    }\n    tempPolyline.push([x2, y2]);\n    tempGroup\n      .polyline(tempPolyline.map(point => {\n        point[1] = this.coordinateSystem.height - point[1];\n        return point;\n      }))\n      .fill('none')\n      .stroke(options.temp.style);\n    \n    // Draw mixing ratio curve\n    const x0dwp = this.coordinateSystem.getXByYHMR(y0, hmr);\n    const x1dwp = this.coordinateSystem.getXByYHMR(y1, hmr);\n    let dewpPolyline = [[x0dwp, y0]];\n    for (let y=y0+yInterval; y<y1; y+=yInterval) {\n      dewpPolyline.push([\n        this.coordinateSystem.getXByYHMR(y, hmr),\n        y\n      ]);\n    }\n    dewpPolyline.push([x1dwp, y1]);\n    dewpGroup\n      .polyline(dewpPolyline.map(point => {\n        point[1] = this.coordinateSystem.height - point[1];\n        return point;\n      }))\n      .fill('none')\n      .stroke(options.dewp.style);\n  }\n  \n  /**\n   * Draw background into SVG group.\n   * \n   * @override\n   */\n  _drawBackground(svgNode) {\n    super._drawBackground(svgNode);\n    \n    this.svgGroups = {\n      border: svgNode.group(),\n      isobars: svgNode.group(),\n      isotherms: svgNode.group(),\n      dryadiabats: svgNode.group(),\n      mixingratio: svgNode.group(),\n      pseudoadiabats: svgNode.group()\n    };\n    \n    // Rand des Diagramms\n    this.svgGroups.border.clear();\n    this.svgGroups.border\n      .rect(this.coordinateSystem.width, this.coordinateSystem.height)\n      .attr({stroke: 'black', 'stroke-width': 1, 'fill-opacity': 0});\n    \n    // Hilfelinien zeichnen\n    this.plotIsobars(true);\n    this.plotIsotherms(true);\n    this.plotDryadiabats(true);\n    this.plotPseudoadiabats(true);\n    this.plotMixingratio(true);\n  }\n   \n  /**\n   * @private\n   */\n  plotIsobars(redraw) {\n    let min = this.coordinateSystem.getPByXY(0, this.coordinateSystem.height);\n    let max = this.coordinateSystem.getPByXY(0, 0);\n    let delta = max - min;\n    this._plotLines(\n      this.svgGroups.isobars,\n      this.options.isobars,\n      {\n        min: min,\n        max: max,\n        interval: (delta > 500) ? 100 : (delta > 50) ? 10 : 1\n      },\n      p => {\n        let y = this.coordinateSystem.getYByXP(0, p);\n        return [[0, y], [this.coordinateSystem.width, y]];\n      },\n      redraw\n    );\n  }\n  \n  /**\n   * @private\n   */\n  plotIsotherms(redraw) {\n    let min = tempKelvinToCelsius(\n      this.coordinateSystem.getTByXY(0, this.coordinateSystem.height));\n    let max = tempKelvinToCelsius(\n      this.coordinateSystem.getTByXY(this.coordinateSystem.width, 0));\n    let delta = max - min;\n    this._plotLines(\n      this.svgGroups.isotherms,\n      this.options.isotherms,\n      {\n        min: min,\n        max: max,\n        interval: (delta > 50) ? 10 : 5\n      },\n      T => {\n        T = tempCelsiusToKelvin(T);\n        let result = [[undefined, undefined], [undefined, undefined]];\n        if (this.coordinateSystem.isIsothermsVertical()) {\n          result[0][1] = 0;\n          result[1][1] = this.coordinateSystem.height;\n          result[0][0] = result[1][0] = this.coordinateSystem.getXByYT(result[0][1], T);\n        }\n        else {\n          result[0][1] = 0;\n          result[0][0] = this.coordinateSystem.getXByYT(result[0][1], T);\n          if (result[0][0] < 0)\n            result[0][1] = this.coordinateSystem.getYByXT(result[0][0] = 0, T);\n          result[1][0] = this.coordinateSystem.width;\n          result[1][1] = this.coordinateSystem.getYByXT(result[1][0], T);\n          if (result[1][1] === undefined) {\n            result[1][0] = result[0][0];\n            result[1][1] = this.coordinateSystem.height;\n          }\n          else if (result[1][1] > this.coordinateSystem.height) {\n            result[1][1] = this.coordinateSystem.height;\n            result[1][0] = this.coordinateSystem.getXByYT(result[1][1], T);\n          }\n        }\n        return result;\n      },\n      redraw\n    );\n  }\n  \n  /**\n   * @private\n   */\n  plotDryadiabats(redraw) {\n    this._plotLines(\n      this.svgGroups.dryadiabats,\n      this.options.dryadiabats,\n      {\n        min: tempKelvinToCelsius(\n          potentialTempByTempAndPres(\n            this.coordinateSystem.getTByXY(0, 0),\n            this.coordinateSystem.getPByXY(0, 0))),\n        max: tempKelvinToCelsius(\n          potentialTempByTempAndPres(\n            this.coordinateSystem.getTByXY(this.coordinateSystem.width, this.coordinateSystem.height),\n            this.coordinateSystem.getPByXY(this.coordinateSystem.width, this.coordinateSystem.height))),\n        interval: 10\n      },\n      T => {\n        let TKelvin = tempCelsiusToKelvin(T);\n        let y0 = 0;\n        let x0 = this.coordinateSystem.getXByYPotentialTemperature(y0, TKelvin);\n        if (x0 === undefined ||\n          x0 > this.coordinateSystem.width) {\n          x0 = this.coordinateSystem.width;\n          y0 = this.coordinateSystem.getYByXPotentialTemperature(x0, TKelvin);\n        }\n        let x1 = 0;\n        let y1 = this.coordinateSystem.getYByXPotentialTemperature(x1, TKelvin);\n        if (y1 === undefined ||\n          y1 > this.coordinateSystem.height) {\n          y1 = this.coordinateSystem.height;\n          x1 = this.coordinateSystem.getXByYPotentialTemperature(y1, TKelvin);\n        }\n        if (x0 === undefined ||\n          y0 === undefined ||\n          x1 === undefined ||\n          y1 === undefined)\n          return undefined;\n        if (this.coordinateSystem.isDryAdiabatStraightLine()) {\n          return [[x0, y0], [x1, y1]];\n        }\n        else {\n          let points = [[x0, y0]];\n          let yInterval = 10;\n          for (let y=y0+yInterval; y<y1; y+=yInterval) {\n            points.push([\n              this.coordinateSystem.getXByYPotentialTemperature(y, TKelvin),\n              y\n            ]);\n          }\n          points.push([x1, y1]);\n          return points;\n        }\n      },\n      redraw\n    );\n  }\n  \n  /**\n   * @private\n   */\n  plotPseudoadiabats(redraw) {\n    this._plotLines(\n      this.svgGroups.pseudoadiabats,\n      this.options.pseudoadiabats,\n      {\n        lines: [-18, -5, 10, 30, 60, 110, 180]\n      },\n      thetae => {\n        let thetaeKelvin = tempCelsiusToKelvin(thetae);\n        const y0 =\n          Math.max(\n            0,\n            (this.options.pseudoadiabats.maxPressure === undefined)\n              ? 0\n              : this.coordinateSystem.getYByPEquiPotTemp(\n                this.options.pseudoadiabats.maxPressure, thetaeKelvin)\n          );\n        const x0 = this.coordinateSystem.getXByYEquiPotTemp(y0, thetaeKelvin);\n        const y1 =\n          Math.min(\n            this.coordinateSystem.height,\n            (this.options.pseudoadiabats.minPressure === undefined)\n              ? this.coordinateSystem.height\n              : this.coordinateSystem.getYByPEquiPotTemp(\n                this.options.pseudoadiabats.minPressure, thetaeKelvin)\n          );\n        const x1 = this.coordinateSystem.getXByYEquiPotTemp(y1, thetaeKelvin);\n        let points = [[x0, y0]];\n        let yInterval = 10;\n        for (let y=y0+yInterval; y<y1; y+=yInterval) {\n          points.push([\n            this.coordinateSystem.getXByYEquiPotTemp(y, thetaeKelvin),\n            y\n          ]);\n        }\n        points.push([x1, y1]);\n        return points;\n      },\n      redraw\n    );\n  }\n  \n  /**\n   * @private\n   */\n  plotMixingratio(redraw) {\n    this._plotLines(\n      this.svgGroups.mixingratio,\n      this.options.mixingratio,\n      {\n        lines: [0.01, 0.1, 1, 2, 4, 7, 10, 16, 21, 32, 40]\n      },\n      hmr => {\n        const y0 =\n          Math.max(\n            0,\n            (this.options.mixingratio.maxPressure === undefined)\n              ? 0\n              : this.coordinateSystem.getYByPHMR(\n                this.options.mixingratio.maxPressure, hmr)\n          );\n        const x0 = this.coordinateSystem.getXByYHMR(y0, hmr);\n        const y1 =\n          Math.min(\n            this.coordinateSystem.height,\n            (this.options.mixingratio.minPressure === undefined)\n              ? this.coordinateSystem.height\n              : this.coordinateSystem.getYByPHMR(\n                this.options.mixingratio.minPressure, hmr)\n          );\n        const x1 = this.coordinateSystem.getXByYHMR(y1, hmr);\n        let points = [[x0, y0]];\n        const yInterval = 10;\n        for (let y=y0+yInterval; y<y1; y+=yInterval) {\n          points.push([\n            this.coordinateSystem.getXByYHMR(y, hmr),\n            y\n          ]);\n        }\n        points.push([x1, y1]);\n        return points;\n      },\n      redraw\n    );\n  }\n  \n  /**\n   * @private\n   */\n  _plotLines(node, options, valuesOptions, pointsFunc, redraw) {\n    options.visible\n      ? node.show()\n      : node.hide();\n    if (!redraw)\n      return;\n    node.clear();\n    let lines = [];\n    if (options.lines !== undefined)\n      lines = options.lines;\n    else if (options.min === undefined &&\n           options.max === undefined &&\n           options.interval === undefined &&\n           valuesOptions.lines !== undefined)\n      lines = valuesOptions.lines;\n    else {\n      if (options.min !== undefined)\n        valuesOptions.min = options.min;\n      if (options.max !== undefined)\n        valuesOptions.max = options.max;\n      let interval = options.interval;\n      if (interval === undefined)\n        interval = valuesOptions.interval;\n      let start = Math.ceil(valuesOptions.min/interval)*interval;\n      let end = Math.floor(valuesOptions.max/interval)*interval;\n      for (let v=start; v<=end; v+=interval) {\n        lines.push(v);\n      }\n    }\n    let highlightLineWidth = 3;\n    if (options.style.width !== undefined)\n      highlightLineWidth = options.style.width+2;\n    lines.forEach(function (v) {\n      let points = pointsFunc.call(this, v);\n      let line = (points.length == 2) ?\n        node.line(points[0][0], this.coordinateSystem.height-points[0][1],\n          points[1][0], this.coordinateSystem.height-points[1][1])\n          .stroke(options.style) :\n        node.polyline(points.map(function (point) {\n          point[1] = this.coordinateSystem.height - point[1];\n          return point;\n        }, this))\n          .fill('none').stroke(options.style);\n      if (options.highlightedLines !== undefined)\n        options.highlightedLines.forEach(function (vHighlight) {\n          if (v == vHighlight)\n            line.stroke({width: highlightLineWidth});\n        }, this);\n    }, this);\n  }\n  \n  /**\n   * Extend an event with temperature and pressure.\n   * \n   * @override\n   */\n  getExtendedEvent(e, p) {\n    e = super.getExtendedEvent(e, p);\n    e.diagramTmpk =\n      this.coordinateSystem.getTByXY(e.elementX,\n        this.coordinateSystem.height - e.elementY);\n    return e;\n  }\n  \n  /**\n   * Initialize hover labels options.\n   * \n   * @param {module:meteoJS/thermodynamicDiagram/tdDiagram~hoverLabelsOptions}\n   *   options - Hover labels options.\n   * @override\n   */\n  _initHoverLabels({\n    visible = true,\n    type = 'mousemove',\n    snapToData = true,\n    remote = true,\n    insertLabelsFunc = undefined,\n    pres = {},\n    temp = {},\n    dewp = {},\n    wetbulb = {}\n  }) {\n    pres.length = ('length' in pres) ? pres.length : 60;\n    pres.align = ('align' in pres) ? pres.align : 'left';\n    if (!('visible' in pres))\n      pres.visible = true;\n    if (!('style' in pres))\n      pres.style = {};\n    pres.font = getNormalizedFontOptions(pres.font, {\n      anchor: (pres.align == 'right') ? 'end' : 'start'\n    });\n    if (!('fill' in pres))\n      pres.fill = {};\n    if (pres.fill.opacity === undefined)\n      pres.fill.opacity = 0.7;\n    if (pres.horizontalMargin === undefined)\n      pres.horizontalMargin = 5;\n    \n    if (!('visible' in temp))\n      temp.visible = true;\n    if (!('style' in temp))\n      temp.style = {};\n    temp.font = getNormalizedFontOptions(temp.font, {\n      anchor: 'start',\n      'alignment-baseline': 'bottom'\n    });\n    if (!('fill' in temp))\n      temp.fill = {};\n    if (temp.fill.opacity === undefined)\n      temp.fill.opacity = 0.7;\n    temp.radius = ('radius' in temp) ? temp.radius : undefined;\n    temp.radiusPlus = ('radiusPlus' in temp) ? temp.radiusPlus : 2;\n    if (temp.horizontalMargin === undefined)\n      temp.horizontalMargin = 10;\n    \n    if (!('visible' in dewp))\n      dewp.visible = true;\n    if (!('style' in dewp))\n      dewp.style = {};\n    dewp.font = getNormalizedFontOptions(dewp.font, {\n      anchor: 'end',\n      'alignment-baseline': 'bottom'\n    });\n    if (!('fill' in dewp))\n      dewp.fill = {};\n    if (dewp.fill.opacity === undefined)\n      dewp.fill.opacity = 0.7;\n    dewp.radius = ('radius' in dewp) ? dewp.radius : undefined;\n    dewp.radiusPlus = ('radiusPlus' in dewp) ? dewp.radiusPlus : 2;\n    if (dewp.horizontalMargin === undefined)\n      dewp.horizontalMargin = 10;\n    \n    if (!('visible' in wetbulb))\n      wetbulb.visible = true;\n    if (!('style' in wetbulb))\n      wetbulb.style = {};\n    wetbulb.font = getNormalizedFontOptions(wetbulb.font, {\n      anchor: 'middle'\n    });\n    if (!('fill' in wetbulb))\n      wetbulb.fill = {};\n    if (wetbulb.fill.opacity === undefined)\n      wetbulb.fill.opacity = 0.7;\n    wetbulb.radius = ('radius' in wetbulb) ? wetbulb.radius : undefined;\n    wetbulb.radiusPlus = ('radiusPlus' in wetbulb) ? wetbulb.radiusPlus : 2;\n    if (wetbulb.verticalMargin === undefined)\n      wetbulb.verticalMargin = 10;\n    \n    if (insertLabelsFunc === undefined)\n      insertLabelsFunc =\n        this._makeInsertLabelsFunc(pres, temp, dewp, wetbulb);\n    \n    super._initHoverLabels({\n      visible,\n      type,\n      snapToData,\n      remote,\n      insertLabelsFunc\n    });\n  }\n  \n  /**\n   * Makes a default insertLabelsFunc.\n   * \n   * @param {Object} pres\n   * @param {Object} temp\n   * @param {Object} dewp\n   * @param {Object} wetbulb\n   * @private\n   */\n  _makeInsertLabelsFunc(pres, temp, dewp, wetbulb) {\n    return (sounding, levelData, group) => {\n      group.clear();\n      \n      if (levelData.pres === undefined)\n        return;\n      \n      if (pres.visible)\n        drawPressureHoverLabelInto(group, levelData, this.coordinateSystem, pres);\n      \n      this.dataGroupIds.reverse().forEach(dataGroupId => {\n        let labelOptions = {\n          visible: false\n        };\n        switch (dataGroupId) {\n        case 'temp': labelOptions = temp; break;\n        case 'dewp': labelOptions = dewp; break;\n        case 'wetbulb': labelOptions = wetbulb; break;\n        }\n        if (!labelOptions.visible)\n          return;\n        \n        const { x, y, value, unit } =\n          this._getCoordinatesByLevelData(dataGroupId,\n            sounding, levelData, this);\n        if (x === undefined ||\n            y === undefined)\n          return;\n        \n        const lineWidth =\n          (dataGroupId in this.hoverLabelsSounding.options.diagram)\n            ? this.hoverLabelsSounding.options.diagram[dataGroupId].style.width\n            : 3;\n        const radius = (labelOptions.radius === undefined)\n          ? lineWidth + labelOptions.radiusPlus\n          : labelOptions.radius;\n        const fillOptions = labelOptions.style;\n        if (!('color' in fillOptions) &&\n            (dataGroupId in this.hoverLabelsSounding.options.diagram))\n          fillOptions.color = sounding.options.diagram[dataGroupId].style.color;\n        group\n          .circle(2 * radius)\n          .attr({ cx: x, cy: y })\n          .fill(fillOptions);\n        drawTextInto({\n          node: group,\n          text: `${value} ${unit}`,\n          x,\n          y,\n          horizontalMargin: labelOptions.horizontalMargin,\n          verticalMargin: labelOptions.verticalMargin,\n          font: labelOptions.font,\n          fill: labelOptions.fill\n        });\n      });\n    };\n  }\n}\nexport default TDDiagram;\n\n/**\n * Draws pressure hover label.\n * \n * @param {external:SVG} svgNode - SVG node to draw into.\n * @param {number} pres - Pressure.\n * @param {module:meteoJS/thermodynamicDiagram/coordinateSystem.CoordinateSystem}\n *   coordinateSystem - Coordinate system.\n * @param {module:meteoJS/thermodynamicDiagram/tdDiagram~presLabelOptions}\n *   [options] - Options.\n */\nexport function drawPressureHoverLabelInto(svgNode, levelData, coordinateSystem, {\n  length = 60,\n  align = 'left',\n  horizontalMargin = undefined,\n  verticalMargin = undefined,\n  style = {},\n  font = {},\n  fill = {}\n} = {}) {\n  let x0 = 0;\n  let x1 = length;\n  const match = /^([0-9]+)%$/.exec(x1);\n  if (match)\n    x1 = match[1] / 100 * coordinateSystem.width;\n  if (align == 'right') {\n    x0 = coordinateSystem.width;\n    x1 = coordinateSystem.width - x1;\n  }\n  const y = coordinateSystem.height -\n    coordinateSystem.getYByXP(0, levelData.pres);\n  style = getNormalizedLineStyleOptions(style);\n  svgNode\n    .line([\n      [Math.min(x0, x1), y],\n      [Math.max(x0, x1), y]\n    ])\n    .stroke(style);\n  font = getNormalizedFontOptions(font);\n  font['alignment-baseline'] = 'bottom';\n  drawTextInto({\n    node: svgNode,\n    text: `${Math.round(levelData.pres)} hPa`,\n    x: x0,\n    y,\n    horizontalMargin,\n    verticalMargin,\n    font,\n    fill\n  });\n  \n  font['alignment-baseline'] = 'top';\n  let hghtStr = (levelData.hght === undefined)\n    ? `~${Math.round(altitudeISAByPres(levelData.pres))} m`\n    : `${Math.round(levelData.hght)} m`;\n  drawTextInto({\n    node: svgNode,\n    text: hghtStr,\n    x: x0,\n    y: y,\n    horizontalMargin,\n    verticalMargin,\n    font,\n    fill\n  });\n}\n\nfunction getNormalizedDiagramLineOptions({\n  highlightedLines = undefined,\n  interval = undefined,\n  lines = undefined,\n  max = undefined,\n  min = undefined,\n  maxPressure = undefined,\n  minPressure = undefined,\n  style = undefined,\n  visible = undefined\n}, defaults = {}) {\n  return {\n    highlightedLines: getFirstDefinedValue(highlightedLines, defaults.highlightedLines),\n    interval: getFirstDefinedValue(interval, defaults.interval),\n    lines: getFirstDefinedValue(lines, defaults.lines),\n    max: getFirstDefinedValue(max, defaults.max),\n    min: getFirstDefinedValue(min, defaults.min),\n    maxPressure: getFirstDefinedValue(maxPressure, defaults.maxPressure),\n    minPressure: getFirstDefinedValue(minPressure, defaults.minPressure),\n    style: getNormalizedLineStyleOptions(style, defaults.style),\n    visible: getFirstDefinedValue(visible, defaults.visible, true)\n  };\n}","/**\n * @module meteoJS/thermodynamicDiagram/windbarbsProfile\n */\nimport { drawWindbarbInto } from './Functions.js';\nimport PlotAltitudeDataArea from './PlotAltitudeDataArea.js';\n\n/**\n * Options for the constructor.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea~options}\n *   module:meteoJS/thermodynamicDiagram/windbarbsProfile~options\n * @param {number} [windbarbLength]\n *   Length of windbarbs. Default is 40% of the Plot-Area width.\n * @param {number} [minDataPointsDistance]\n *   Minimum distance between data points in pixels. If filterDataPoint is set,\n *   minDataPointsDistance is ignored. If undefined, then minDataPointsDistance\n *   is set to the half of windbarbLength.\n */\n\n/**\n * Class to draw the profile with windbarbs.\n * \n * <pre><code>import WindbarbsProfile from 'meteojs/thermodynamicDiagram/WindbarbsProfile';</code></pre>\n * \n * @extends module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea.PlotAltitudeDataArea\n */\nexport class WindbarbsProfile extends PlotAltitudeDataArea {\n  \n  /**\n   * @param {module:meteoJS/thermodynamicDiagram/windbarbsProfile~options}\n   *   options - Options.\n   */\n  constructor({\n    svgNode = undefined,\n    coordinateSystem = undefined,\n    x = undefined,\n    y = undefined,\n    width = undefined,\n    height = undefined,\n    style = {},\n    visible = true,\n    events = {},\n    hoverLabels = {},\n    windbarbLength = undefined,\n    dataGroupIds = ['windbarbs'],\n    getCoordinatesByLevelData = (dataGroupId, sounding, levelData, plotArea) => {\n      if (levelData.pres === undefined ||\n          levelData.wspd === undefined ||\n          levelData.wdir === undefined)\n        return {};\n      \n      return {\n        x: plotArea.width / 2,\n        y: plotArea.coordinateSystem.height -\n          plotArea.coordinateSystem.getYByXP(0, levelData.pres)\n      };\n    },\n    insertDataGroupInto = (svgNode, dataGroupId, sounding, data, plotArea) => {\n      data.forEach(windbarbData => {\n        drawWindbarbInto({\n          node: svgNode,\n          x: plotArea.width/2,\n          y: windbarbData.y,\n          wspd: windbarbData.levelData.wspd,\n          wdir: windbarbData.levelData.wdir,\n          length: plotArea._windbarbLength,\n          strokeStyle: sounding.options.windprofile.windbarbs.style\n        });\n      });\n    },\n    filterDataPoint = undefined,\n    minDataPointsDistance = undefined\n  }) {\n    super({\n      svgNode,\n      coordinateSystem,\n      x,\n      y,\n      width,\n      height,\n      style,\n      visible,\n      events,\n      hoverLabels,\n      getSoundingVisibility:\n        sounding => sounding.visible && sounding.options.windprofile.windbarbs.visible,\n      dataGroupIds,\n      getCoordinatesByLevelData,\n      insertDataGroupInto,\n      filterDataPoint,\n      minDataPointsDistance:\n        (minDataPointsDistance === undefined) ? 0 : minDataPointsDistance\n    });\n    \n    /**\n     * @type number\n     * @private\n     */\n    this._windbarbLength = windbarbLength;\n    if (this._windbarbLength === undefined)\n      this._windbarbLength = this.width * 2/5;\n    \n    if (minDataPointsDistance === undefined)\n      this.minDataPointsDistance = this._windbarbLength / 2;\n    \n    this.init();\n  }\n}\nexport default WindbarbsProfile;","/**\n * @module meteoJS/thermodynamicDiagram/windspeedProfile\n */\nimport {\n  windspeedMSToKN,\n  windspeedKNToMS\n} from '../calc.js';\nimport {\n  getNormalizedFontOptions,\n  drawTextInto\n} from './Functions.js';\nimport PlotAltitudeDataArea from './PlotAltitudeDataArea.js';\n\n/**\n * Options for labels on hovering the windspeed profile.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea~hoverLabelsOptions}\n *   module:meteoJS/thermodynamicDiagram/windspeedProfile~hoverLabelsOptions\n * @property {module:meteoJS/thermodynamicDiagram/tdDiagram~labelsOptions}\n *   [windspeed] - Options for windspeed label.\n * @param {number} [windspeedMax=41.67]\n *   The maximum visible windspeed [m/s].\n */\n\n/**\n * Options for the constructor.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea~options}\n *   module:meteoJS/thermodynamicDiagram/windspeedProfile~options\n */\n\n/**\n * Class to draw windspeed profiles.\n * \n * <pre><code>import WindspeedProfile from 'meteojs/thermodynamicDiagram/WindspeedProfile';</code></pre>\n * \n * @extends module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea.PlotAltitudeDataArea\n */\nexport class WindspeedProfile extends PlotAltitudeDataArea {\n  \n  /**\n   * @param {module:meteoJS/thermodynamicDiagram/windspeedProfile~options} options\n   *   Options.\n   */\n  constructor({\n    svgNode = undefined,\n    coordinateSystem = undefined,\n    x = undefined,\n    y = undefined,\n    width = undefined,\n    height = undefined,\n    style = {},\n    visible = true,\n    events = {},\n    hoverLabels = {},\n    windspeedMax = windspeedKNToMS(150),\n    dataGroupIds = ['windspeed'],\n    getCoordinatesByLevelData = (dataGroupId, sounding, levelData, plotArea) => {\n      if (levelData.pres === undefined ||\n          levelData.wspd === undefined)\n        return {};\n      \n      return {\n        x: plotArea.width * levelData.wspd / windspeedMax,\n        y: plotArea.coordinateSystem.height -\n          plotArea.coordinateSystem.getYByXP(0, levelData.pres)\n      };\n    },\n    insertDataGroupInto = (svgNode, dataGroupId, sounding, data) => {\n      svgNode\n        .polyline(data.map(level => [ level.x, level.y ]))\n        .fill('none')\n        .stroke(sounding.options.windprofile.windspeed.style);\n    },\n    filterDataPoint = undefined,\n    minDataPointsDistance = 0\n  }) {\n    super({\n      svgNode,\n      coordinateSystem,\n      x,\n      y,\n      width,\n      height,\n      style,\n      visible,\n      events,\n      hoverLabels,\n      getSoundingVisibility:\n        sounding => sounding.visible && sounding.options.windprofile.windspeed.visible,\n      dataGroupIds,\n      getCoordinatesByLevelData,\n      insertDataGroupInto,\n      filterDataPoint,\n      minDataPointsDistance\n    });\n    \n    this.init();\n  }\n  \n  /**\n   * Draw background into SVG group.\n   * \n   * @override\n   */\n  _drawBackground(svgNode) {\n    super._drawBackground(svgNode);\n    \n    svgNode\n      .line(0, 0, 0, this.height)\n      .stroke({color: 'black', width: 1});\n    svgNode\n      .line(this.width, 0, this.width, this.height)\n      .stroke({color: 'black', width: 1});\n  }\n  \n  /**\n   * Initialize hover labels options.\n   * \n   * @param {module:meteoJS/thermodynamicDiagram/windspeedProfile~hoverLabelsOptions}\n   *   options - Hover labels options.\n   * @override\n   */\n  _initHoverLabels({\n    visible = true,\n    type = 'mousemove',\n    snapToData = true,\n    remote = true,\n    insertLabelsFunc = undefined,\n    windspeed = {}\n  }) {\n    if (!('visible' in windspeed))\n      windspeed.visible = true;\n    if (!('style' in windspeed))\n      windspeed.style = {};\n    windspeed.font = getNormalizedFontOptions(windspeed.font, {\n      anchor: 'end',\n      'alignment-baseline': 'bottom'\n    });\n    if (!('fill' in windspeed))\n      windspeed.fill = {};\n    if (windspeed.fill.opacity === undefined)\n      windspeed.fill.opacity = 0.7;\n    windspeed.radius = ('radius' in windspeed) ? windspeed.radius : undefined;\n    windspeed.radiusPlus =\n      ('radiusPlus' in windspeed) ? windspeed.radiusPlus : 2;\n    if (windspeed.horizontalMargin === undefined)\n      windspeed.horizontalMargin = 10;\n    \n    if (insertLabelsFunc === undefined)\n      insertLabelsFunc = this._makeInsertLabelsFunc(windspeed);\n    \n    super._initHoverLabels({\n      visible,\n      type,\n      snapToData,\n      remote,\n      insertLabelsFunc\n    });\n  }\n  \n  /**\n   * Makes a default insertLabelsFunc.\n   * \n   * @param {Object} windspeed\n   * @private\n   */\n  _makeInsertLabelsFunc(windspeed) {\n    return (sounding, levelData, group) => {\n      group.clear();\n      \n      if (levelData.pres === undefined)\n        return;\n      \n      if (!windspeed.visible ||\n          levelData.wspd === undefined)\n        return;\n      \n      const { x, y } =\n        this._getCoordinatesByLevelData('windspeed',\n          sounding, levelData, this);\n      if (x === undefined ||\n          y === undefined)\n        return;\n      \n      const radius = (windspeed.radius === undefined)\n        ? this.hoverLabelsSounding.options.windprofile.windspeed.style.width / 2 +\n          windspeed.radiusPlus\n        : windspeed.radius;\n      const fillOptions = windspeed.style;\n      if (!('color' in fillOptions))\n        fillOptions.color = sounding.options.windprofile.windspeed.style.color;\n      const font = {...windspeed.font};\n      if (font.anchor == 'start' &&\n          this.width - x < 45)\n        font.anchor = 'end';\n      if (font.anchor == 'end' &&\n          x < 45)\n        font.anchor = 'start';\n      if (font['alignment-baseline'] == 'bottom' &&\n          y < font.size * 5/4)\n        font['alignment-baseline'] = 'top';\n      if (font['alignment-baseline'] == 'top' &&\n          this.height - y < font.size * 5/4)\n        font['alignment-baseline'] = 'bottom';\n      group\n        .circle(2 * radius)\n        .attr({ cx: x, cy: y })\n        .fill(fillOptions);\n      drawTextInto({\n        node: group,\n        text: `${Math.round(windspeedMSToKN(levelData.wspd)*10)/10} kn`,\n        x,\n        y,\n        horizontalMargin: windspeed.horizontalMargin,\n        verticalMargin: windspeed.verticalMargin,\n        font: font,\n        fill: windspeed.fill\n      });\n    };\n  }\n}\nexport default WindspeedProfile;","/**\n * @module meteoJS/thermodynamicDiagram/hodograph\n */\nimport { windspeedKMHToMS,\n  windspeedKNToMS,\n  windspeedMSToKMH } from '../calc.js';\nimport {\n  getNormalizedLineOptions,\n  getNormalizedTextOptions\n} from './Functions.js';\nimport PlotDataArea from './PlotDataArea.js';\n\n/**\n * Options for the circle grid.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram~lineStyleOptions}\n *   module:meteoJS/thermodynamicDiagram/hodograph~gridCirclesOptions\n * @param {number} [interval=13.89]\n *   Interval between grid circles (and value for the first grid circle).\n *   In m/s.\n */\n\n/**\n * Options for the grid labels.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram~textOptions}\n *   module:meteoJS/thermodynamicDiagram/hodograph~gridLabelsOptions\n * @param {number} [angle=45]\n *   Angle of the labels startin from the origin\n *   (in degrees, 0 relates to North).\n */\n\n/**\n * Options for the constructor.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram/plotDataArea~options}\n *   module:meteoJS/thermodynamicDiagram/hodograph~options\n * @param {Object} [grid] - Options for the hodograph grid.\n * @param {module:meteoJS/thermodynamicDiagram~lineOptions} [grid.axes]\n *   Options for the hodograph's x- and y-axes.\n * @param {module:meteoJS/thermodynamicDiagram/hodograph~gridCirclesOptions}\n *   [grid.circles] - Options for the hodograph circle grid.\n * @param {module:meteoJS/thermodynamicDiagram/hodograph~gridLabelsOptions}\n *   [grid.labels] - Options for the hodograph grid labels.\n * @param {number|undefined} [grid.max=undefined]\n *   Maximum value for the grid axes and circles. If undefined, determined from\n *   'minWindspeedRange'.\n * @param {number} [windspeedMax=41.67]\n *   The maximum windspeed [m/s], that should be visible on the plot. This\n *   refers to the x- or y-direction with the origin in the middle of the plot,\n *   because in these directions, a polar plot has the least extent concerning\n *   distance.\n * @param {number[]|undefined} [origin=undefined]\n *   Move origin of polar plot. If 'undefined' the origin is in the center. To\n *   move, use an array with 2 elements. The first element moves the origin in\n *   x direction, the second in y direction. The values are interpreted as\n *   relative length (relating to the half width resp. height). Positive values\n *   to move in South-West direction. E.g. to move the origin the half way to\n *   South-West, use [0.5, 0.5].\n */\n\n/**\n * Class to draw the hodograph.\n * \n * <pre><code>import Hodograph from 'meteojs/thermodynamicDiagram/Hodograph';</code></pre>\n * \n * @extends module:meteoJS/thermodynamicDiagram/plotDataArea.PlotDataArea\n */\nexport class Hodograph extends PlotDataArea {\n  \n  /**\n   * @param {module:meteoJS/thermodynamicDiagram/hodograph~options} options\n   *   Options.\n   */\n  constructor({\n    svgNode = undefined,\n    coordinateSystem,\n    x,\n    y,\n    width,\n    height,\n    style = {},\n    visible = true,\n    events = {},\n    dataGroupIds = ['windbarbs'],\n    getCoordinatesByLevelData = (dataGroupId, sounding, levelData, plotArea) => {\n      if (levelData.wspd === undefined ||\n          levelData.wdir === undefined)\n        return {};\n      \n      const x = levelData.wspd * -Math.sin(levelData.wdir / 180 * Math.PI);\n      const y = levelData.wspd * Math.cos(levelData.wdir / 180 * Math.PI);\n      return {\n        x: plotArea.center[0] + x * plotArea.pixelPerSpeed,\n        y: plotArea.center[1] + y * plotArea.pixelPerSpeed\n      };\n    },\n    insertDataGroupInto = (svgNode, dataGroupId, sounding, data) => {\n      svgNode\n        .polyline(data.map(level => [ level.x, level.y ]))\n        .fill('none').stroke(sounding.options.hodograph.style);\n    },\n    grid = {},\n    windspeedMax = windspeedKNToMS(150),\n    origin = undefined,\n    filterDataPoint = undefined,\n    minDataPointsDistance = 0\n  }) {\n    super({\n      svgNode,\n      coordinateSystem,\n      x,\n      y,\n      width,\n      height,\n      style,\n      visible,\n      events,\n      dataGroupIds,\n      getCoordinatesByLevelData,\n      insertDataGroupInto,\n      getSoundingVisibility:\n        sounding => sounding.visible && sounding.options.hodograph.visible,\n      filterDataPoint,\n      minDataPointsDistance\n    });\n    \n    this._gridOptions = this.getNormalizedGridOptions(grid);\n    \n    this.center = [this.width/2, this.height/2];\n    if (origin !== undefined) {\n      this.center[0] -= origin[0] * this.minLength/2;\n      this.center[1] += origin[1] * this.minLength/2;\n    }\n    this.pixelPerSpeed = Math.min(\n      Math.max(this.width - this.center[0], this.center[0]),\n      Math.max(this.height - this.center[1], this.center[1])\n    ) / windspeedMax;\n    if (this._gridOptions.max === undefined)\n      this._gridOptions.max = windspeedMax;\n    \n    this.init();\n  }\n  \n  /**\n   * Plots hodograph background.\n   * \n   * @override\n   */\n  _drawBackground(svgNode) {\n    super._drawBackground(svgNode);\n    \n    // border, background\n    svgNode\n      .rect(this.width-2, this.height-2)\n      .move(1,1)\n      .fill({color: 'white'})\n      .stroke({color: 'black', width: 1});\n    //.attr({rx: 10, ry: 10});\n    \n    // x-/y-axes\n    if (this._gridOptions.axes.visible) {\n      let axesLength =\n        this._gridOptions.max + this._gridOptions.circles.interval / 2;\n      svgNode\n        .line(\n          Math.max(0, this.center[0] - axesLength * this.pixelPerSpeed),\n          this.center[1],\n          Math.min(this.width,\n            this.center[0] + axesLength * this.pixelPerSpeed),\n          this.center[1]\n        )\n        .stroke(this._gridOptions.axes.style);\n      svgNode\n        .line(\n          this.center[0],\n          Math.max(0, this.center[1] - axesLength * this.pixelPerSpeed),\n          this.center[0],\n          Math.min(this.height,\n            this.center[1] + axesLength * this.pixelPerSpeed)\n        )\n        .stroke(this._gridOptions.axes.style);\n    }\n    \n    // circles and labels\n    for (let v = this._gridOptions.circles.interval;\n      v <= this._gridOptions.max;\n      v += this._gridOptions.circles.interval) {\n      let radius = v * this.pixelPerSpeed;\n      svgNode\n        .circle(2*radius)\n        .attr({\n          cx: this.center[0],\n          cy: this.center[1]\n        })\n        .fill('none')\n        .stroke(this._gridOptions.circles.style);\n      if (this._gridOptions.labels.visible) {\n        let xText =\n          radius *\n          Math.cos((this._gridOptions.labels.angle - 90) / 180 * Math.PI);\n        let yText =\n          radius *\n          Math.sin((this._gridOptions.labels.angle - 90) / 180 * Math.PI);\n        let textAnchor = 'middle';\n        let dx = 0;\n        let dy = -this._gridOptions.labels.font.size;\n        if (this._gridOptions.labels.angle == 0 ||\n          this._gridOptions.labels.angle == 180) {\n          dx = -3;\n          textAnchor = 'end';\n        }\n        else if (this._gridOptions.labels.angle == 90 ||\n               this._gridOptions.labels.angle == 270)\n          dy = -3;\n        let text = svgNode\n          .plain('' + Math.round(windspeedMSToKMH(v)))\n          .move(this.center[0] + xText, this.center[1] + yText)\n          .attr({\n            'text-anchor': textAnchor,\n            //'alignment-baseline': 'middle'\n            dx: dx,\n            dy: dy // XXX: Hack für Firefox\n          })\n          .font(this._gridOptions.labels.font);\n        let bbox = text.bbox();\n        text.before(\n          svgNode\n            .rect(bbox.width, bbox.height)\n            .move(bbox.x, bbox.y)\n            .fill('white')\n        );\n      }\n    }\n  }\n  \n  /**\n   * Normalizes options for grid.\n   * \n   * @private\n   */\n  getNormalizedGridOptions({\n    axes = {},\n    circles = {},\n    labels = {},\n    max = undefined\n  }) {\n    axes = getNormalizedLineOptions(axes);\n    circles = getNormalizedLineOptions(circles);\n    if (!('interval' in circles) ||\n        circles.interval === undefined)\n      circles.interval = windspeedKMHToMS(50);\n    labels = getNormalizedTextOptions(labels);\n    if (!('angle' in labels) ||\n        labels.angle === undefined)\n      labels.angle = 225;\n    if (labels.font.size === undefined)\n      labels.font.size = 10;\n    \n    return {\n      axes,\n      circles,\n      labels,\n      max\n    };\n  }\n}\nexport default Hodograph;","/**\n * @module meteoJS/thermodynamicDiagram/axes/yAxis\n */\nimport { getNormalizedLineStyleOptions } from '../Functions.js';\nimport PlotArea from '../PlotArea.js';\n\n/**\n * Options for the constructor.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram/plotArea~options}\n *   module:meteoJS/thermodynamicDiagram/axes/yAxis~options\n * @property {module:meteoJS/thermodynamicDiagram/axes/axisLabels~options} labels\n *   Options for the yAxis Labels.\n * @property {module:meteoJS/thermodynamicDiagram/axes/axisTitle~options} title\n *   Options for the title of the x-Axis.\n */\n\n/**\n * Class to draw the yAxis labelling.\n * \n * @extends module:meteoJS/thermodynamicDiagram/plotArea.PlotArea\n */\nexport class yAxis extends PlotArea {\n\n  /**\n   * @param {module:meteoJS/thermodynamicDiagram/yAxis~options} options\n   *   Options.\n   */\n  constructor({\n    svgNode = undefined,\n    coordinateSystem,\n    x,\n    y,\n    width,\n    height,\n    style = {},\n    visible = true,\n    events = {},\n    labels = {},\n    title = {}\n  }) {\n    if (style.overflow === undefined)\n      style.overflow = 'visible';\n    \n    super({\n      svgNode,\n      coordinateSystem,\n      x,\n      y,\n      width,\n      height,\n      style,\n      visible,\n      events\n    });\n    \n    /**\n     * @type Object\n     * @private\n     */\n    this._labelsOptions = getNormalizedLabelsOptions(labels);\n    \n    /**\n     * @type Object\n     * @private\n     */\n    this._titleOptions = getNormalizedTitleOptions(title);\n    \n    this.init();\n  }\n  \n  /**\n   * Draw background into SVG group.\n   * \n   * @override\n   */\n  _drawBackground(svgNode) {\n    super._drawBackground(svgNode);\n    \n    if (this._labelsOptions.enabled) {\n      let svgLabelsGroup = svgNode.group();\n      let isobarsAzimut = 50;\n      let minLevel = Math.ceil(this.coordinateSystem.getPByXY(0, this.height)/isobarsAzimut)*isobarsAzimut;\n      let maxLevel = Math.floor(this.coordinateSystem.getPByXY(0, 0)/isobarsAzimut)*isobarsAzimut;\n      let fontSize = 11;\n      for (let level=minLevel; level<=maxLevel; level+=isobarsAzimut) {\n        let y = this.height - this.coordinateSystem.getYByXP(0, level);\n        let text = svgLabelsGroup.plain(level).attr({\n          y: y+fontSize*0.3,\n          x: this.width\n        });\n        text\n          .font({\n            size: fontSize+'px',\n            anchor: 'end'\n          })\n          .attr({\n            fill: this._labelsOptions.style.color\n          });\n      }\n    }\n    \n    if (this._titleOptions.text !== undefined) {\n      let svgTitleGroup = svgNode.group();\n      let fontSize = 12;\n      svgTitleGroup.plain(this._titleOptions.text)\n        .attr({\n          x: fontSize*0.4,\n          y: this.height/2,\n          fill: this._titleOptions.style.color\n        })\n        .font({\n          size: fontSize,\n          anchor: 'middle'\n        })\n        .rotate(-90);\n    }\n  }\n  \n}\nexport default yAxis;\n\nfunction getNormalizedLabelsOptions({\n  enabled = true,\n  style = {}\n}) {\n  let options = {\n    enabled,\n    style\n  };\n  options.style = getNormalizedLineStyleOptions(options.style);\n  return options;\n}\n\nfunction getNormalizedTitleOptions({\n  align = 'middle',\n  style = {},\n  text = undefined\n}) {\n  let options = {\n    align,\n    style,\n    text\n  };\n  options.style = getNormalizedLineStyleOptions(options.style);\n  return options;\n}","/**\n * @module meteoJS/thermodynamicDiagram/axes/xAxis\n */\nimport { tempKelvinToCelsius, tempCelsiusToKelvin } from '../../calc.js';\nimport yAxis from './yAxis.js';\n\n/**\n * Class to draw the xAxis labelling.\n * \n * @extends module:meteoJS/thermodynamicDiagram/axes/yAxis.yAxis\n */\nexport class xAxis extends yAxis {\n  \n  /**\n   * Draw background into SVG group.\n   * \n   * @override\n   */\n  _drawBackground(svgNode) {\n    svgNode.clear();\n    //super.drawBackground(svgNode);\n    \n    if (this._labelsOptions.enabled) {\n      let svgLabelsGroup = svgNode.group();\n      let isothermsAzimut = 10;\n      let minT = Math.ceil(tempKelvinToCelsius(this.coordinateSystem.getTByXY(0, 0))/isothermsAzimut)*isothermsAzimut;\n      let maxT = Math.floor(tempKelvinToCelsius(this.coordinateSystem.getTByXY(this.width, 0))/isothermsAzimut)*isothermsAzimut;\n      let fontSize = 10;\n      for (let T=minT; T<=maxT; T+=isothermsAzimut) {\n        let TKelvin = tempCelsiusToKelvin(T);\n        svgLabelsGroup\n          .plain(Math.round(tempKelvinToCelsius(TKelvin)))\n          .attr({\n            x: this.coordinateSystem.getXByYT(0, TKelvin),\n            y: fontSize,\n            fill: this._labelsOptions.style.color\n          })\n          .font({\n            size: fontSize+'px',\n            anchor: 'middle'\n          });\n      }\n    }\n    \n    if (this._titleOptions.text !== undefined) {\n      let svgTitleGroup = svgNode.group();\n      let fontSize = 12;\n      svgTitleGroup.plain(this._titleOptions.text)\n        .attr({\n          x: this.width/2,\n          y: this.height - fontSize*0.3,\n          fill: this._titleOptions.style.color\n        })\n        .font({\n          size: fontSize,\n          anchor: 'middle'\n        });\n    }\n  }\n  \n}\nexport default xAxis;","/**\n * @module meteoJS/thermodynamicDiagram\n */\nimport ThermodynamicDiagramPluggable from './ThermodynamicDiagramPluggable.js';\nimport StueveDiagram from './thermodynamicDiagram/coordinateSystem/StueveDiagram.js';\nimport Emagram from './thermodynamicDiagram/coordinateSystem/Emagram.js';\nimport SkewTlogPDiagram from './thermodynamicDiagram/coordinateSystem/SkewTlogPDiagram.js';\nimport TDDiagram from './thermodynamicDiagram/TDDiagram.js';\nimport WindbarbsProfile from './thermodynamicDiagram/WindbarbsProfile.js';\nimport WindspeedProfile from './thermodynamicDiagram/WindspeedProfile.js';\nimport Hodograph from './thermodynamicDiagram/Hodograph.js';\nimport { xAxis as xAxisClass } from './thermodynamicDiagram/axes/xAxis.js';\nimport { yAxis as yAxisClass } from './thermodynamicDiagram/axes/yAxis.js';\n\n/**\n * Options for the coordinate system.\n * \n * @typedef {module:meteoJS/thermodynamicDiagramPluggable~options}\n *   module:meteoJS/thermodynamicDiagram~coordinateSystemOptions\n * @property {'skewTlogP'|'stueve'|'emagram'} [type='skewTlogP']\n *   Thermodynamic diagarm type.\n * @property {module:meteoJS/thermodynamicDiagram/coordinateSystem~pressureOptions}\n *   [pressure] - Pressure options.\n * @property {module:meteoJS/thermodynamicDiagram/coordinateSystem~temperatureOptions}\n *   [temperature] - Temperature options.\n */\n\n/**\n * Options for the constructor.\n * \n * @typedef {module:meteoJS/thermodynamicDiagramPluggable~options}\n *   module:meteoJS/thermodynamicDiagram~options\n * @param {module:meteoJS/thermodynamicDiagram~coordinateSystemOptions}\n *   [coordinateSystem] - Coordinate system options.\n * @param {module:meteoJS/thermodynamicDiagram/tdDiagram~options} [diagram]\n *   Options for the real thermodynamic diagram.\n * @param {module:meteoJS/thermodynamicDiagram/windbarbsProfile~options}\n *   [windbarbs] - Options for the windbarbs profile.\n * @param {module:meteoJS/thermodynamicDiagram/windspeedProfile~options}\n *   [windprofile] - Options for the windspeed profile.\n * @param {module:meteoJS/thermodynamicDiagram/hodograph~options} [hodograph]\n *   Options for the hodograph container.\n * @param {module:meteoJS/thermodynamicDiagram/axes/xAxis~options} [xAxis]\n *   Options for the xAxis container.\n * @param {module:meteoJS/thermodynamicDiagram/axes/yAxis~options} [yAxis]\n *   Options for the yAxis container.\n */\n\n/**\n * Class to draw a SVG thermodynamic diagram.\n * \n * <pre><code>import ThermodynamicDiagram from 'meteoJS/ThermodynamicDiagram';</code></pre>\n * \n * @extends module:meteoJS/thermodynamicDiagramPluggable.ThermodynamicDiagramPluggable\n */\nexport class ThermodynamicDiagram extends ThermodynamicDiagramPluggable {\n  \n  /**\n   * @param {module:meteoJS/thermodynamicDiagram~options} options - Options.\n   */\n  constructor({\n    renderTo = undefined,\n    width = undefined,\n    height = undefined,\n    coordinateSystem = {},\n    diagram = {},\n    windbarbsProfile = {},\n    windspeedProfile = {},\n    hodograph = {},\n    xAxis = {},\n    yAxis = {}\n  }) {\n    super({\n      renderTo,\n      width,\n      height\n    });\n    \n    diagram = normalizePlotAreaOptions(diagram);\n    windbarbsProfile = normalizePlotAreaOptions(windbarbsProfile);\n    windspeedProfile = normalizePlotAreaOptions(windspeedProfile);\n    hodograph = normalizePlotAreaOptions(hodograph);\n    xAxis = normalizePlotAreaOptions(xAxis);\n    yAxis = normalizePlotAreaOptions(yAxis);\n    \n    let defaultPadding = this.svgNode.width() * 0.05;\n    if (xAxis.width === undefined &&\n      diagram.width === undefined &&\n      windbarbsProfile.width === undefined &&\n      windspeedProfile.width === undefined) {\n      yAxis.width =\n        (this.svgNode.width() - 2 * defaultPadding) * 0.1;\n      diagram.width =\n        (this.svgNode.width() - 2 * defaultPadding) * 0.7;\n      windbarbsProfile.width =\n        (this.svgNode.width() - 2 * defaultPadding) * 0.2 * 1/3;\n      windspeedProfile.width =\n        (this.svgNode.width() - 2 * defaultPadding) * 0.2 * 2/3;\n    }\n    else if (diagram.width === undefined)\n      diagram.width =\n        this.svgNode.width() - 2 * defaultPadding\n        - windbarbsProfile.width- windspeedProfile.width;\n    else if (windbarbsProfile.width === undefined &&\n             windspeedProfile.width === undefined) {\n      windbarbsProfile.width =\n        (this.svgNode.width() - 2 * defaultPadding - diagram.width) * 1/3;\n      windspeedProfile.width =\n        (this.svgNode.width() - 2 * defaultPadding - diagram.width) * 2/3;\n    }\n    if (yAxis.x === undefined &&\n      diagram.x === undefined &&\n      windbarbsProfile.x === undefined &&\n      windspeedProfile.x === undefined) {\n      yAxis.x = defaultPadding;\n      diagram.x =\n        yAxis.x + yAxis.width;\n      windbarbsProfile.x =\n        diagram.x + diagram.width;\n      windspeedProfile.x =\n        windbarbsProfile.x + windbarbsProfile.width;\n    }\n    else if (diagram.x === undefined)\n      diagram.x =\n        windbarbsProfile.x - windbarbsProfile.width;\n    else if (windbarbsProfile.x === undefined &&\n             windspeedProfile.x === undefined) {\n      windbarbsProfile.x =\n        diagram.x + diagram.width;\n      windspeedProfile.x =\n        windbarbsProfile.x + windbarbsProfile.width;\n    }\n    if (xAxis.height === undefined)\n      xAxis.height = this.svgNode.height() * 0.06;\n    if (diagram.height === undefined)\n      diagram.height =\n        this.svgNode.height() - xAxis.height - 2 * defaultPadding;\n    if (yAxis.height === undefined)\n      yAxis.height = diagram.height;\n    if (windbarbsProfile.height === undefined)\n      windbarbsProfile.height = diagram.height;\n    if (windspeedProfile.height === undefined)\n      windspeedProfile.height = diagram.height;\n    if (diagram.y === undefined)\n      diagram.y = defaultPadding;\n    if (yAxis.y === undefined)\n      yAxis.y = diagram.y;\n    if (windbarbsProfile.y === undefined)\n      windbarbsProfile.y = diagram.y;\n    if (windspeedProfile.y === undefined)\n      windspeedProfile.y = diagram.y;\n    if (xAxis.width === undefined)\n      xAxis.width = diagram.width;\n    if (xAxis.x === undefined)\n      xAxis.x = diagram.x;\n    if (xAxis.y === undefined)\n      xAxis.y = diagram.y + diagram.height;\n    if (xAxis.height === undefined)\n      xAxis.height = defaultPadding;\n    \n    // Defintionen zum Hodograph\n    if (hodograph.x === undefined)\n      hodograph.x = diagram.x;\n    if (hodograph.y === undefined)\n      hodograph.y = diagram.y;\n    if (hodograph.width === undefined)\n      hodograph.width = Math.min(diagram.width, diagram.height) * 0.4;\n    if (hodograph.height === undefined)\n      hodograph.height = hodograph.width;\n    \n    this.diagram = new TDDiagram(diagram);\n    this.appendPlotArea(this.diagram);\n    \n    this.yAxis = new yAxisClass(yAxis);\n    this.appendPlotArea(this.yAxis);\n    \n    this.xAxis = new xAxisClass(xAxis);\n    this.appendPlotArea(this.xAxis);\n    \n    this.windbarbsProfile = new WindbarbsProfile(windbarbsProfile);\n    this.appendPlotArea(this.windbarbsProfile);\n    \n    this.windspeedProfile = new WindspeedProfile(windspeedProfile);\n    this.appendPlotArea(this.windspeedProfile);\n    \n    this.hodograph = new Hodograph(hodograph);\n    this.appendPlotArea(this.hodograph);\n    \n    if (coordinateSystem.type === undefined)\n      coordinateSystem.type = 'skewTlogP';\n    coordinateSystem.width = diagram.width;\n    coordinateSystem.height = diagram.height;\n    \n    /**\n     * @type module:meteoJS/thermodynamicDiagram/coordinateSystem.CoordinateSystem\n     * @private\n     */\n    this._coordinateSystem;\n    this.coordinateSystem =\n      (coordinateSystem.type == 'stueve') ?\n        new StueveDiagram(coordinateSystem) :\n        (coordinateSystem.type == 'emagram') ?\n          new Emagram(coordinateSystem) :\n          new SkewTlogPDiagram(coordinateSystem);\n  }\n  \n  /**\n   * Coordinate system for the different plot areas.\n   * \n   * @type module:meteoJS/thermodynamicDiagram/coordinateSystem.CoordinateSystem\n   * @public\n   */\n  get coordinateSystem() {\n    return this._coordinateSystem;\n  }\n  set coordinateSystem(coordinateSystem) {\n    this._coordinateSystem = coordinateSystem;\n    this.exchangeCoordinateSystem(this._coordinateSystem);\n  }\n  \n  /**\n   * Returns the object of the thermodynamic diagram plot area.\n   * \n   * @returns {module:meteoJS/thermodynamicDiagram/tdDiagram.TDDiagram} Diagram object.\n   * @deprecated\n   */\n  getDiagramPlotArea() {\n    return this.diagram;\n  }\n}\nexport default ThermodynamicDiagram;\n\n/**\n * Returns normalized PlotArea options.\n * \n * @private\n */\nfunction normalizePlotAreaOptions({\n  svgNode = undefined,\n  coordinateSystem = undefined,\n  x = undefined,\n  y = undefined,\n  width = undefined,\n  height = undefined,\n  style = {},\n  visible = true,\n  events = {},\n  hoverLabels = {},\n  ...result\n}) {\n  result.svgNode = svgNode;\n  result.coordinateSystem = coordinateSystem;\n  result.x = x;\n  result.y = y;\n  result.width = width;\n  result.height = height;\n  result.style = style;\n  result.visible = visible;\n  result.events = events;\n  result.hoverLabels = hoverLabels;\n  return result;\n}","/**\n * @module meteoJS/modelviewer/display/simple\n */\nimport $ from 'jquery';\nimport ThermodynamicDiagram from '../../ThermodynamicDiagram.js';\nimport Display from '../Display.js';\n\n/**\n * @classdesc Displays a modelviewer container with a navigation on top of the\n *   resource. The navigation contains of several select-Nodes (each for a\n *   VariableCollection).\n */\nexport class Simple extends Display {\n  \n  constructor() {\n    super();\n    \n    /**\n     * @type undefined|jQuery\n     * @private\n     */\n    this.imgNode = undefined;\n    \n    /**\n     * @type undefined|meteoJS/thermodynamicDiagram.ThermodynamicDiagram\n     * @private\n     */\n    this.thermodynamicDiagram = undefined;\n    \n    /**\n     * @type undefined|jQuery\n     * @protected\n     */\n    this.resourceNode = undefined;\n  }\n  \n  /**\n   * @override\n   */\n  onInit() {\n    if (this.parentNode !== undefined) {\n      this.resourceNode = $(this.parentNode);\n      this.resourceNode.empty();\n    }\n  }\n  \n  /**\n   * @override\n   */\n  onChangeVisibleResource() {\n    if (this.resourceNode === undefined)\n      return;\n    let visibleResource = this.container.visibleResource;\n    if ('url' in visibleResource) {\n      if (this.thermodynamicDiagram !== undefined) {\n        this.thermodynamicDiagram = undefined;\n        this.resourceNode.empty();\n      }\n      if (this.imgNode === undefined) {\n        this.resourceNode.empty();\n        this.imgNode = $('<img>');\n        this.resourceNode.append(this.imgNode);\n      }\n      this.imgNode.attr('src', visibleResource.url);\n      this.imgNode.css({ 'max-width': '100%' });\n    }\n    else if ('sounding' in visibleResource) {\n      if (this.imgNode !== undefined) {\n        this.imgNode = undefined;\n        this.resourceNode.empty();\n      }\n      if (this.thermodynamicDiagram === undefined)\n        this.thermodynamicDiagram = new ThermodynamicDiagram({\n          renderTo: this.resourceNode\n        });\n      let isAppended = false;\n      this.thermodynamicDiagram.soundings.forEach(sounding => {\n        if (sounding.getSounding() === visibleResource.sounding) {\n          isAppended = true;\n          sounding.visible(true);\n        }\n        else\n          sounding.visible(false);\n      });\n      if (!isAppended)\n        this.thermodynamicDiagram.addSounding(visibleResource.sounding);\n    }\n    else {\n      this.imgNode = undefined;\n      this.resourceNode.empty();\n    }\n  }\n}\nexport default Simple;","/**\n * @module meteoJS\n */\n\n/**\n * jQuery object.\n * \n * @external jQuery\n * @see {@link https://api.jquery.com|API Doc}\n */\n\n/**\n * Any HTML element.\n * \n * @external HTMLElement\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement}\n */\n\n/**\n * Any event.\n * \n * @external Event\n * @see {@link https://developer.mozilla.org/de/docs/Web/API/Event}\n */\n\n/**\n * XMLHttpRequest object.\n * \n * @external XMLHttpRequest\n * @see {@link https://developer.mozilla.org/de/docs/Web/API/XMLHttpRequest}\n */\n\n/**\n * SVG object.\n * \n * @external SVG\n * @see {@link https://svgjs.com/docs/3.0/|API Doc}\n */\n\nimport 'regenerator-runtime/runtime.js';\n\nimport * as calc from './calc.js';\nexport { calc };\n\nimport { default as addEventFunctions } from './Events.js';\nexport const events = {\n  addEventFunctions\n};\n\nexport { default as RepetitiveRequests } from './RepetitiveRequests.js';\n\nexport { default as Timeline } from './Timeline.js';\nimport { default as Animation,\n  insertFrequencyInput,\n  insertFrequencyRange,\n  insertFrequencyButtonGroup,\n  insertRestartPauseInput,\n  insertRestartPauseRange,\n  insertRestartPauseButtonGroup } from './timeline/Animation.js';\nimport { default as ToggleButton } from './timeline/animation/ToggleButton.js';\nimport {\n  default as Visualisation,\n  makeTimeTextCallbackFunction\n} from './timeline/Visualisation.js';\nimport { default as Text } from './timeline/visualisation/Text.js';\nimport { default as Slider } from './timeline/visualisation/Slider.js';\nimport { default as bsButtons } from './timeline/visualisation/bsButtons.js';\nimport { default as bsDropdown } from './timeline/visualisation/bsDropdown.js';\nexport const timeline = {\n  Animation,\n  Visualisation,\n  makeTimeTextCallbackFunction,\n  animation: {\n    ToggleButton,\n    insertFrequencyInput,\n    insertFrequencyRange,\n    insertFrequencyButtonGroup,\n    insertRestartPauseInput,\n    insertRestartPauseRange,\n    insertRestartPauseButtonGroup\n  },\n  visualisation: {\n    Text,\n    Slider,\n    bsButtons,\n    bsDropdown\n  }\n};\n\nexport { default as Synview } from './Synview.js';\nimport { default as SynviewCollection } from './synview/Collection.js';\nimport { default as Map } from './synview/SynviewMap.js';\nimport { default as MapOL } from './synview/map/MapOL.js';\nimport { default as MapLL } from './synview/map/MapLL.js';\nimport { default as Resource } from './synview/Resource.js';\nimport { default as GeoJSON } from './synview/resource/GeoJSON.js';\nimport { default as GeoJSONTile } from './synview/resource/GeoJSONTile.js';\nimport { default as Image } from './synview/resource/Image.js';\nimport { default as OSM } from './synview/resource/OSM.js';\nimport { default as Vector } from './synview/resource/Vector.js';\nimport { default as VectorTile } from './synview/resource/VectorTile.js';\nimport { default as ResourceCollection } from './synview/ResourceCollection.js';\nimport { default as Tooltip } from './synview/Tooltip.js';\nimport { default as Type } from './synview/Type.js';\nimport { default as TypeCollection } from './synview/TypeCollection.js';\nexport const synview = {\n  Collection: SynviewCollection,\n  Map,\n  map: {\n    MapOL,\n    MapLL\n  },\n  Resource,\n  resource: {\n    GeoJSON,\n    GeoJSONTile,\n    Image,\n    OSM,\n    Vector,\n    VectorTile\n  },\n  ResourceCollection,\n  Tooltip,\n  Type,\n  TypeCollection\n};\n\nexport { Tooltip } from './Tooltip.js';\nimport BootstrapTooltip from './tooltip/BootstrapTooltip.js';\nexport const tooltip = {\n  BootstrapTooltip\n};\n\nexport { default as Modelviewer } from './Modelviewer.js';\nimport Variable from './modelviewer/Variable.js';\nimport TimeVariable from './modelviewer/TimeVariable.js';\nimport VariableCollection from './modelviewer/VariableCollection.js';\nimport Node from './modelviewer/Node.js';\nimport ModelviewerResource from './modelviewer/Resource.js';\nimport ModelviewerImage from './modelviewer/resource/Image.js';\nimport ModelviewerSounding from './modelviewer/resource/Sounding.js';\nimport Resources from './modelviewer/Resources.js';\nimport NWPResources from './modelviewer/NWPResources.js';\nimport Container from './modelviewer/Container.js';\nimport Display from './modelviewer/Display.js';\nimport Simple from './modelviewer/display/Simple.js';\nimport SelectNavigation from './modelviewer/display/SelectNavigation.js';\nexport const modelviewer = {\n  Variable,\n  TimeVariable,\n  VariableCollection,\n  Node,\n  Resource: ModelviewerResource,\n  resource: {\n    Image: ModelviewerImage,\n    Sounding: ModelviewerSounding\n  },\n  Resources,\n  NWPResources,\n  Container,\n  Display,\n  display: {\n    Simple,\n    SelectNavigation\n  }\n};\n\nexport { default as Sounding } from './Sounding.js';\nimport { default as Parcel } from './sounding/Parcel.js';\nexport const sounding = {\n  Parcel\n};\n\nexport { default as ThermodynamicDiagramPluggable } from './ThermodynamicDiagramPluggable.js';\nexport { default as ThermodynamicDiagram } from './ThermodynamicDiagram.js';\nimport CoordinateSystem from './thermodynamicDiagram/CoordinateSystem.js';\nimport StueveDiagram from './thermodynamicDiagram/coordinateSystem/StueveDiagram.js';\nimport Emagram from './thermodynamicDiagram/coordinateSystem/Emagram.js';\nimport SkewTlogPDiagram from './thermodynamicDiagram/coordinateSystem/SkewTlogPDiagram.js';\nimport DiagramSounding from './thermodynamicDiagram/DiagramSounding.js';\nimport Hodograph from './thermodynamicDiagram/Hodograph.js';\nimport TDDiagram from './thermodynamicDiagram/TDDiagram.js';\nimport { drawWindbarbInto } from './thermodynamicDiagram/Functions.js';\nimport WindbarbsProfile from './thermodynamicDiagram/WindbarbsProfile.js';\nimport WindspeedProfile from './thermodynamicDiagram/WindspeedProfile.js';\nimport xAxis from './thermodynamicDiagram/axes/xAxis.js';\nimport yAxis from './thermodynamicDiagram/axes/yAxis.js';\nexport const thermodynamicDiagram = {\n  CoordinateSystem,\n  coordinateSystem: {\n    StueveDiagram,\n    Emagram,\n    SkewTlogPDiagram\n  },\n  DiagramSounding,\n  Hodograph,\n  TDDiagram,\n  functions: {\n    drawWindbarbInto\n  },\n  WindbarbsProfile,\n  WindspeedProfile,\n  axes: {\n    xAxis,\n    yAxis\n  }\n};","/**\n * @module meteoJS/timeline/animation/togglebutton\n */\nimport $ from 'jquery';\nimport { insertFrequencyInput,\n  insertFrequencyRange,\n  insertRestartPauseInput } from '../Animation.js';\nimport biPlayFill from 'bootstrap-icons/icons/play-fill.svg';\nimport biPauseFill from 'bootstrap-icons/icons/pause-fill.svg';\n\n/**\n * Options for constructor.\n * \n * @typedef {Object} module:meteoJS/timeline/animation/togglebutton~options\n * @param {module:meteoJS/timeline/animation.Animation} animation Animation object.\n * @param {external:HTMLElement} node\n *   Node to append the button and the dropdown menu (if menu set to true).\n *   If this is a 'button' element, this will be the animation button and\n *   no menu is added.\n * @param {string|external:HTMLElement|undefined} [startedContent]\n *   Content or text of button node if animation is running.\n *   Default ist the Bootstrap\n *   {@link https://icons.getbootstrap.com/icons/pause-fill/|pause-fill} Icon.\n * @param {string|undefined} [startedClass]\n *   Classed added to button node if animation is running.\n * @param {string|external:HTMLElement|undefined} [stoppedContent]\n *   Content of button node if animation is stopped.\n *   Default ist the Bootstrap\n *   {@link https://icons.getbootstrap.com/icons/play-fill/|play-fill} Icon.\n * @param {string|undefined} [stoppedClass]\n *   Classed added to button node if animation is running.\n * @param {string|undefined} [classButton]\n *   Classed added to button node.\n * @param {boolean} [menu=true]\n *   Add dropdown menu for animation setup to the button. Ignored, if node is a\n *   button element.\n * @param {boolean} [menuImageFrequency=true]\n *   Show frequency configuration in the dropdown menu.\n * @param {string} [imageFrequencyCaption='Frequency']\n *   Label text for the frequency configuration in the dropdown menu.\n * @param {undefined|integer[]} [menuFrequencies]\n *   Array of frequencies for the range slider. If undefined the slider will be\n *   hidden.\n * @param {boolean} [menuRestartPause=true]\n *   Show restart pause configuration in the dropdown menu.\n * @param {string} [restartPauseCaption='Restart pause']\n *   Label text for the restart pause configuration in the dropdown menu.\n */\n\n/**\n * @classdesc\n * Object to style a button accordingly to the status of an animation object.\n * \n * <pre><code>import ToggleButton from 'meteojs/timeline/animation/ToggleButton';</code></pre>\n */\nexport class ToggleButton {\n  \n  /**\n   * @param {module:meteoJS/timeline/animation/togglebutton~options} options Options.\n   */\n  constructor(options = {}) {\n    let { animation = undefined,\n      node = undefined,\n      startedContent = undefined,\n      startedClass = undefined,\n      stoppedContent = undefined,\n      stoppedClass = undefined,\n      classButton = undefined,\n      classDropdownToggle = undefined,\n      menu = true,\n      menuImageFrequency = true,\n      imageFrequencyCaption = 'Frequency',\n      menuFrequencies = undefined,\n      menuRestartPause = true,\n      restartPauseCaption = 'Restart pause' } = options;\n    if (!('startedContent' in options))\n      startedContent = $(biPauseFill);\n    if (!('stoppedContent' in options))\n      stoppedContent = $(biPlayFill);\n    /**\n     * @type meteoJS/timeline/animation/togglebutton~options\n     * @private\n     */\n    this.options = {\n      animation,\n      node,\n      startedContent,\n      startedClass,\n      stoppedContent,\n      stoppedClass,\n      classButton,\n      classDropdownToggle,\n      menu,\n      menuImageFrequency,\n      imageFrequencyCaption,\n      menuFrequencies,\n      menuRestartPause,\n      restartPauseCaption\n    };\n    \n    this.options.node = $(this.options.node);\n    let animationButton = this.options.node;\n    if (!this.options.node.is('button')) {\n      animationButton = $('<button>').addClass('btn');\n      this.options.node.append(animationButton);\n    }\n    animationButton.addClass(this.options.classButton);\n    \n    let onStart = () => {\n      animationButton.removeClass(this.options.stoppedClass);\n      animationButton.addClass(this.options.startedClass);\n      animationButton.empty();\n      if (typeof this.options.startedContent === 'string' ||\n          this.options.startedContent instanceof String)\n        animationButton.text(this.options.startedContent);\n      else\n        animationButton.append(this.options.startedContent);\n    };\n    let onStop = () => {\n      animationButton.removeClass(this.options.startedClass);\n      animationButton.addClass(this.options.stoppedClass);\n      animationButton.empty();\n      if (typeof this.options.stoppedContent === 'string' ||\n          this.options.stoppedContent instanceof String)\n        animationButton.text(this.options.stoppedContent);\n      else\n        animationButton.append(this.options.stoppedContent);\n    };\n    this.options.animation.on('start:animation', onStart);\n    this.options.animation.on('stop:animation', onStop);\n    animationButton.click(() => this.options.animation.toggle());\n    this.options.animation.isStarted() ? onStart() : onStop();\n    \n    if (!this.options.node.is('button') &&\n        this.options.menu) {\n      // Add dropdown menu\n      this.options.node.addClass('btn-group');\n      let btnDropdown = $('<button>')\n        .attr('type', 'button')\n        .addClass('btn dropdown-toggle dropdown-toggle-split')\n        .addClass(this.options.classDropdownToggle)\n        .attr('data-bs-toggle', 'dropdown')\n        .attr('aria-expanded', false);\n      btnDropdown.append($('<span>')\n        .addClass('visually-hidden')\n        .text('Toggle Dropdown'));\n      this.options.node.append(btnDropdown);\n      let menuDropdown = $('<div>')\n        .addClass('dropdown-menu');\n      this.options.node.append(menuDropdown);\n      \n      let form = $('<form>').addClass('px-4 py-3');\n      if (this.options.menuImageFrequency || this.options.menuRestartPause)\n        menuDropdown.append(form);\n\n      if (this.options.menuImageFrequency) {\n        const label = $('<label>')\n          .addClass('form-label')\n          .text(this.options.imageFrequencyCaption);\n        const div = $('<div>').append(label);\n        if (this.options.menuRestartPause)\n          div.addClass('mb-3');\n        form.append(div);\n        insertFrequencyInput(div, {\n          animation: this.options.animation\n        });\n        if (this.options.menuFrequencies !== undefined)\n          insertFrequencyRange(div, {\n            animation: this.options.animation,\n            frequencies: this.options.menuFrequencies\n          });\n      }\n      \n      if (this.options.menuRestartPause) {\n        const label = $('<label>')\n          .addClass('form-label')\n          .text(this.options.restartPauseCaption);\n        const div = $('<div>').append(label);\n        form.append(div);\n        insertRestartPauseInput(div, {\n          animation: this.options.animation\n        });\n      }\n    }\n  }\n  \n}\nexport default ToggleButton;","/**\n * @module meteoJS/modelviewer/display/selectNavigation\n */\nimport $ from 'jquery';\nimport Simple from './Simple.js';\n\n/**\n * @classdesc \n */\nexport class SelectNavigation extends Simple {\n  \n  constructor({ ignoreVariableCollections = [],\n    selectCaption = false,\n    navigationClass = undefined,\n    selectDivClass = undefined,\n    selectClass = undefined } = {}) {\n    super();\n    \n    this.options = {\n      ignoreVariableCollections: new Set(ignoreVariableCollections),\n      selectCaption,\n      navigationClass,\n      selectDivClass,\n      selectClass\n    };\n    \n    /**\n     * @type undefined|jQuery\n     * @private\n     */\n    this.navigationNode = undefined;\n    \n    /**\n     * @type Map<module:meteoJS/modelviewer/variableCollection.variableCollection,jQuery>\n     * @private\n     */\n    this.selectNodes = new Map();\n  }\n  \n  /**\n   * @override\n   */\n  onInit() {\n    if (this.parentNode === undefined)\n      return;\n    this.navigationNode = $('<div>').addClass(this.options.navigationClass);\n    this.resourceNode = $('<div>');\n    $(this.parentNode).empty().append(this.navigationNode, this.resourceNode);\n    if (this.modelviewer !== undefined)\n      this.modelviewer.resources.variableCollections\n        .filter(collection => !this.options.ignoreVariableCollections.has(collection) && collection.count > 0)\n        .forEach(collection => this._appendSelectNode(collection));\n    this._changeSelected();\n  }\n  \n  onChangeVisibleResource({ variable } = {}) {\n    super.onChangeVisibleResource({ variable });\n    this._changeSelected();\n  }\n  \n  onAppendVariable(variable) {\n    if (this.selectNodes.has(variable.variableCollection))\n      this._appendOptionNode(this.selectNodes.get(variable.variableCollection), variable);\n    else\n      this._appendSelectNode(variable.variableCollection);\n    this._changeSelected();\n  }\n  \n  _appendSelectNode(variableCollection) {\n    let selectNode = $('<select>').addClass(this.options.selectClass);\n    selectNode.on('change', () => {\n      let variable = variableCollection.getItemById(selectNode.val());\n      this.container.exchangeDisplayVariable = [ variable ];\n    });\n    if (this.options.selectCaption) {\n      let captionOption = $('<option>').text(variableCollection.name).attr('disabled', 'disabled').prop('selected', 'selected');\n      selectNode.append(captionOption);\n    }\n    variableCollection.variables.forEach(variable => {\n      this._appendOptionNode(selectNode, variable);\n    });\n    this.navigationNode.append($('<div>').addClass(this.options.selectDivClass).append(selectNode));\n    this.selectNodes.set(variableCollection, selectNode);\n  }\n  \n  _appendOptionNode(selectNode, variable) {\n    let option =\n      $('<option>')\n        .attr('value', variable.id)\n        .text(variable.name)\n        .addClass(this.options.optionsClass);\n    selectNode.append(option);\n  }\n  \n  _changeSelected() {\n    for (let variableCollection of this.selectNodes.keys()) {\n      if (!this.selectNodes.has(variableCollection))\n        continue;\n      let variable = this.container.visibleResource.getVariableByVariableCollection(variableCollection);\n      this.selectNodes.get(variableCollection).val(variable.id);\n    }\n  }\n}\nexport default SelectNavigation;"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"sources":["webpack://meteoJS/./node_modules/regenerator-runtime/runtime.js","webpack://meteoJS/webpack/bootstrap","webpack://meteoJS/webpack/runtime/compat get default export","webpack://meteoJS/webpack/runtime/define property getters","webpack://meteoJS/webpack/runtime/hasOwnProperty shorthand","webpack://meteoJS/webpack/runtime/make namespace object","webpack://meteoJS/webpack/runtime/node module decorator","webpack://meteoJS/./src/meteoJS/calc.js","webpack://meteoJS/./src/meteoJS/Events.js","webpack://meteoJS/./src/meteoJS/RepetitiveRequests.js","webpack://meteoJS/./src/meteoJS/Timeline.js","webpack://meteoJS/external \"jQuery\"","webpack://meteoJS/./src/meteoJS/timeline/Animation.js","webpack://meteoJS/./node_modules/bootstrap-icons/icons/play-fill.svg","webpack://meteoJS/./node_modules/bootstrap-icons/icons/pause-fill.svg","webpack://meteoJS/./src/meteoJS/timeline/Visualisation.js","webpack://meteoJS/./src/meteoJS/timeline/visualisation/Text.js","webpack://meteoJS/./src/meteoJS/timeline/visualisation/Slider.js","webpack://meteoJS/./src/meteoJS/timeline/visualisation/bsButtons.js","webpack://meteoJS/./src/meteoJS/timeline/visualisation/bsDropdown.js","webpack://meteoJS/./src/meteoJS/synview/SynviewMap.js","webpack://meteoJS/./src/meteoJS/synview/Collection.js","webpack://meteoJS/external \"ol.layer.Group\"","webpack://meteoJS/external \"ol.layer.Vector\"","webpack://meteoJS/external \"ol.Observable\"","webpack://meteoJS/./src/meteoJS/synview/Resource.js","webpack://meteoJS/./src/meteoJS/synview/ResourceCollection.js","webpack://meteoJS/./src/meteoJS/synview/Type.js","webpack://meteoJS/./src/meteoJS/synview/TypeCollection.js","webpack://meteoJS/./src/meteoJS/synview/Tooltip.js","webpack://meteoJS/./src/meteoJS/Synview.js","webpack://meteoJS/external \"ol.proj\"","webpack://meteoJS/./src/meteoJS/synview/map/MapOL.js","webpack://meteoJS/./src/meteoJS/synview/map/MapLL.js","webpack://meteoJS/external \"ol.format.GeoJSON\"","webpack://meteoJS/external \"ol.source.Vector\"","webpack://meteoJS/./src/meteoJS/synview/resource/Vector.js","webpack://meteoJS/./src/meteoJS/synview/resource/GeoJSON.js","webpack://meteoJS/external \"ol.source.VectorTile\"","webpack://meteoJS/external \"ol.layer.VectorTile\"","webpack://meteoJS/./src/meteoJS/synview/resource/VectorTile.js","webpack://meteoJS/./src/meteoJS/synview/resource/GeoJSONTile.js","webpack://meteoJS/external \"ol.source.ImageStatic\"","webpack://meteoJS/external \"ol.layer.Image\"","webpack://meteoJS/./src/meteoJS/synview/resource/Image.js","webpack://meteoJS/external \"ol.source.OSM\"","webpack://meteoJS/external \"ol.layer.Tile\"","webpack://meteoJS/./src/meteoJS/synview/resource/OSM.js","webpack://meteoJS/./src/meteoJS/Tooltip.js","webpack://meteoJS/external \"bootstrap\"","webpack://meteoJS/./src/meteoJS/tooltip/BootstrapTooltip.js","webpack://meteoJS/./src/meteoJS/base/Unique.js","webpack://meteoJS/./src/meteoJS/base/Collection.js","webpack://meteoJS/./src/meteoJS/Modelviewer.js","webpack://meteoJS/./src/meteoJS/base/Named.js","webpack://meteoJS/./src/meteoJS/base/UniqueNamed.js","webpack://meteoJS/./src/meteoJS/modelviewer/Variable.js","webpack://meteoJS/./src/meteoJS/modelviewer/TimeVariable.js","webpack://meteoJS/./src/meteoJS/modelviewer/VariableCollection.js","webpack://meteoJS/./src/meteoJS/base/NamedCollection.js","webpack://meteoJS/./src/meteoJS/modelviewer/ResourcesTreeNode.js","webpack://meteoJS/./src/meteoJS/modelviewer/Node.js","webpack://meteoJS/./src/meteoJS/modelviewer/Resource.js","webpack://meteoJS/./src/meteoJS/modelviewer/resource/Image.js","webpack://meteoJS/./src/meteoJS/sounding/Parcel.js","webpack://meteoJS/./src/meteoJS/Sounding.js","webpack://meteoJS/./src/meteoJS/modelviewer/resource/Sounding.js","webpack://meteoJS/./src/meteoJS/modelviewer/Resources.js","webpack://meteoJS/./src/meteoJS/modelviewer/NWPResources.js","webpack://meteoJS/./src/meteoJS/modelviewer/Display.js","webpack://meteoJS/./src/meteoJS/modelviewer/Container.js","webpack://meteoJS/external \"SVG\"","webpack://meteoJS/./src/meteoJS/thermodynamicDiagram/Functions.js","webpack://meteoJS/./src/meteoJS/thermodynamicDiagram/DiagramParcel.js","webpack://meteoJS/./src/meteoJS/thermodynamicDiagram/DiagramSounding.js","webpack://meteoJS/./src/meteoJS/ThermodynamicDiagramPluggable.js","webpack://meteoJS/./src/meteoJS/thermodynamicDiagram/CoordinateSystem.js","webpack://meteoJS/./src/meteoJS/thermodynamicDiagram/coordinateSystem/StueveDiagram.js","webpack://meteoJS/./src/meteoJS/thermodynamicDiagram/coordinateSystem/Emagram.js","webpack://meteoJS/./src/meteoJS/thermodynamicDiagram/coordinateSystem/SkewTlogPDiagram.js","webpack://meteoJS/./src/meteoJS/thermodynamicDiagram/PlotArea.js","webpack://meteoJS/./src/meteoJS/thermodynamicDiagram/PlotDataArea.js","webpack://meteoJS/./src/meteoJS/thermodynamicDiagram/PlotAltitudeDataArea.js","webpack://meteoJS/./src/meteoJS/thermodynamicDiagram/TDDiagram.js","webpack://meteoJS/./src/meteoJS/thermodynamicDiagram/WindbarbsProfile.js","webpack://meteoJS/./src/meteoJS/thermodynamicDiagram/WindspeedProfile.js","webpack://meteoJS/./src/meteoJS/thermodynamicDiagram/Hodograph.js","webpack://meteoJS/./src/meteoJS/thermodynamicDiagram/axes/yAxis.js","webpack://meteoJS/./src/meteoJS/thermodynamicDiagram/axes/xAxis.js","webpack://meteoJS/./src/meteoJS/ThermodynamicDiagram.js","webpack://meteoJS/./src/meteoJS/modelviewer/display/Simple.js","webpack://meteoJS/./src/meteoJS/index.js","webpack://meteoJS/./src/meteoJS/timeline/animation/ToggleButton.js","webpack://meteoJS/./src/meteoJS/modelviewer/display/SelectNavigation.js"],"names":["runtime","exports","undefined","Op","Object","prototype","hasOwn","hasOwnProperty","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","obj","key","value","defineProperty","enumerable","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","state","GenStateSuspendedStart","method","arg","GenStateExecuting","Error","GenStateCompleted","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","type","done","GenStateSuspendedYield","makeInvokeMethod","fn","call","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","this","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","AsyncIterator","PromiseImpl","invoke","resolve","reject","result","__await","then","unwrapped","error","previousPromise","callInvokeWithMethodAndArg","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","length","i","constructor","displayName","isGeneratorFunction","genFun","ctor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","toString","keys","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","module","regeneratorRuntime","accidentalStrictMode","Function","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","id","loaded","__webpack_modules__","n","getter","__esModule","d","a","definition","o","get","prop","r","nmd","paths","children","altitudeISAByPres","p","Math","pow","pressureISAByAltitude","potentialTempByTempAndPres","temp","pres","tempByPotentialTempAndPres","potentialTemp","tempByEquiPotTempAndPres","thetae","s","pcon","t","delta","abs","saturationHMRByTempAndPres","exp","dewpointByHMRAndPres","hmr","x","log","wetbulbTempByTempAndDewpointAndPres","dewpoint","Ediff","incr","previoussign","E","equiPotentialTempByTempAndDewpointAndPres","potTemp","lclTemperatureByTempAndDewpoint","saturationPressureByTemp","coef","Array","escold","retval","tt","inx","e","lclByPotentialTempAndHMR","b","hmrp","potentialTempByLCLAndHMR","lcl","Th","lclTh","tempCelsiusToKelvin","tempKelvinToCelsius","windspeedMSToKMH","wind","windspeedKMHToMS","windspeedMSToKN","windspeedKNToMS","windspeedMSToBF","min","windspeedBFToMS","snowlineByTemp850hPaAndAltidude","pressureByBarometricFormula","p0","h","T0","T1","M","densityHumidAirByPressureAndTempAndRelHumidity","T","rh","pv","on","listener","callback","thisArg","listeners","result_key","random","substr","un","once","once_listeners","hasListener","trigger","args","arguments","shift","apply","RepetitiveRequests","url","user","password","start","defaultTimeout","timeoutOnError","pauseOnHiddenDocument","responseType","_url","_user","_password","_isStarted","_defaultTimeout","_timeoutOnError","_pauseOnHiddenDocument","_initPauseOnHiddenDocument","_isSuppressedByHiddenDocument","_responseType","_timeoutID","_loading","_startRequest","clearTimeout","delay","setTimeout","document","hidden","_makeRequest","request","cacheControl","getResponseHeader","maxAges","exec","round","_planRequest","XMLHttpRequest","addEventListener","status","open","send","addEventFunctions","Timeline","maxTimeGap","keyboardNavigation","selectedTime","Date","times","enabledTimes","allEnabledTimes","timesByKey","_keyboardNavigation","_initKeyboardNavigation","time","_setSelectedTime","_indexOfTimeInTimesArray","enabled","_updateTimes","_updateEnabledTimes","getFirstEnabledTime","getLastEnabledTime","getNextEnabledTime","getPrevEnabledTime","getNextAllEnabledTime","getPrevAllEnabledTime","amount","timeKey","getSelectedTime","valueOf","setUTCFullYear","getUTCFullYear","setUTCMonth","getUTCMonth","setUTCDate","getUTCDate","index","reduce","acc","oldTime","timesArr","_sortTimesArray","lastTime","getTime","first","last","prevAllEnabledTime","nextAllEnabledTime","add","sub","event","test","matches","match","_isEventMatchPressedKeys","preventDefault","stopPropagation","findIndex","sort","keyboardEvent","pressedKeys","cur","indexOf","keyCode","jQuery","Animation","timeline","restartPause","imagePeriod","imageFrequency","enabledStepsOnly","allEnabledStepsOnly","options","animationIntervalID","animationTimeoutID","animationStep","timesHash","onChangeTimes","_getTimelineTimesMethod","_getTimelineChangeTimesEvent","isStarted","_updateAnimation","setImagePeriod","Number","_setStep","_clearAnimation","step","_getCount","_initAnimation","_initRestartPause","window","setInterval","setSelectedTime","clearInterval","insertFrequencyInput","node","animation","suffix","number","$","addClass","attr","inputGroupNumber","append","text","setImageFrequency","val","onChangeImageFrequency","getImageFrequency","insertFrequencyRange","frequencies","range","insertRestartPauseInput","input","setRestartPause","onChange","getRestartPause","Visualisation","textInvalid","getTimeText","outputTimezone","inputListener","emptyNode","detachEventListeners","isListenersDefined","attachEventListener","onChangeTime","onInitNode","updateOutput","methodName","format","toISOString","func","listenerArr","off","rest","setNode","timeToText","timesIndexes","getTimelineTimes","that","grouping","groupingFormat","classMain","classButtonGroup","classButtonGroupMargin","classLabel","classLabelSpan","classButton","classButtonActive","classButtonNotEnabled","classButtonEnabled","classButtonAllEnabled","toolbarNode","find","each","data","removeClass","empty","lastNode","btnGroup","span","btn","isTimeAllEnabled","isTimeEnabled","click","hasClass","buttonFormat","groupingDivider","classDropdownMenu","classDropdownItem","classItemActive","classItemNotEnabled","classItemEnabled","classItemAllEnabled","classDropdownHeader","classDropdownDivider","classDropdownButton","visualisationButtonText","Text","dropdownNode","setOutputTimezone","lastGroupTimeStr","getElementById","button","SynviewMap","map","layerGroup","synviewType","layer","feature","color","Collection","itemIds","items","getIndexById","itemId","item","getId","containsId","getItemById","splice","ol","Group","Vector","Observable","Resource","datetime","mimetype","reloadTime","className","imageSmoothingEnabled","_normalizeOLOptions","reloadTimerId","visible","zIndex","opacity","_imageSmoothing","getUrl","_reload","setVisible","addTo","removeLayer","setZIndex","setOpacity","imageSmoothing","getLayers","remove","getLLLayer","getVisible","addLayer","getOLLayer","setReloadTime","getReloadTime","_makeOLLayer","VectorLayer","makeOLLayer","events","eventName","source","getSource","contextOptions_","msImageSmoothingEnabled","_makeLLLayer","L","Layer","makeLLLayer","reloadFunction","getState","unByKey","getOpacity","getZIndex","bind","style","res","getResourceByTime","resource","_append","_sortTimes","_remove","resources","_filterTimesByResources","getDatetime","tIndex","containsStaticResource","filter","Type","displayMethod","displayMaxResourceAge","displayFadeStart","displayFadeStartOpacity","tooltip","preload","collection","ResourceCollection","displayedResourceTime","_addOLLayer","_preload","_removeOLLayer","newResource","oldResource","_replaceOLLayer","setResources","getResourceCollection","getItems","setLayerGroup","LayerGroup","group","setDisplayTime","_hideVisibleResource","getTimes","time_to_show","_getResourceTimeByDisplayTime","styleArguments","setOLStyle","getLayerGroup","resultTime","resourceTime","exclusiveVisibility","syncVisibility","isVisible","getVisibleTypes","isVisibleType","typeCollection","tooltipFeature","tooltipPixelColor","getOwnPropertyDescriptor","tooltipNode","css","prependTo","getMap","getTargetElement","dragging","getExtendedEventByTypeCollection","join","show","posX","pixel","posY","tooltipContent","getTooltip","content","hide","Synview","TypeCollection","getTypeCollection","updateTimes","isLastTime","isLastEnabledTime","setTimesBySetID","appendType","makeLayerGroup","getTimeline","Tooltip","removeType","deleteSetID","removedType","newId","setId","proj","projwgs84","getView","transform","getCenter","getProjection","center","valid","setCenter","fromLonLat","getZoom","zoom","setZoom","visibleTypes","Map","set","visibleLayers","Set","visibleLayerClassnames","getArray","getClassName","forEachFeatureAtPixel","l","hitTolerance","layerFilter","has","forEachLayerAtPixel","GeoJSON","opt","sourceOptions","projection","VectorSource","setStyle","getStyle","GeoJSONFormat","VectorTile","VectorTileSource","VectorTileLayer","ImageStatic","Image","extent","imageExtent","transformExtent","ImageLayer","Static","imageOverlay","image_","load","OSM","Tile","TileLayer","OSMSource","_isShown","_content","oldContent","onContentChange","fireShowEvent","isShown","fireHideEvent","bootstrap","bootstrapOptions","closeOnMouseMove","closeOnMouseEnter","_initBootstrapOptions","_tooltipNode","_bsTooltip","_initTooltipNode","left","top","update","isStringContent","_updateNonStringContent","dispose","bsTooltip","mousemove","mouseenter","_id","fireReplace","fireAddRemoveOnReplace","appendOnReplace","sortFunction","emptyObjectMaker","_itemIds","_items","_sort","Unique","addItem","removeItem","replaceItem","itemInCollection","realItem","ids","containersNode","makeContainerNode","firstTimeOnInit","lastTimeOnInit","_resources","_containersNode","jquery","_timeline","_makeContainerNode","listenerKeys","container","modelviewer","containerNode","_getContainerNode","c","parentNode","removeChild","containers","createElement","appendChild","names","langSortation","_name","_names","_langSortation","getDefaultName","lang","getNameByLang","lS","langs","ia","ib","Named","variableCollection","_variableCollection","UniqueNamed","_datetime","Variable","_node","setNameByLang","getNameByLangNoFallback","_children","_parent","parent","variable","aimedNode","getVariableByVariableCollection","child","buildChildrenTreeForResource","ResourcesTreeNode","entries","size","v","variables","findNodeByVariables","Node","_parents","_resourcesTopNode","nodes","_addParent","_makeResourcesTopNode","addedCount","resourcesTreeNode","mapByVariables","removedCount","resourcesSet","exactlyMatch","variablesSet","isAdded","collectResourcesTreeChildren","getChildByVariable","resourcesTreeNodes","getResourcesByVariables","traversedNodes","getTopNode","parents","run","offset","_variables","_run","_offset","_updateDatetime","vars","tmpc","dwpc","ptrace","ttrace","blayer","tlayer","lclpres","lclhght","lfcpres","lfchght","elpres","elhght","mplpres","mplhght","bplus","bminus","bfzl","b3km","b6km","p0c","pm10c","pm20c","pm30c","hght0c","hghtm10c","hghtm20c","hghtm30c","wm10c","wm20c","wm30c","li5","li3","brnshear","brnu","brnv","limax","limaxpres","cap","cappres","bmin","bminpres","calcMissing","parcels","levels","_parcelCollection","Parcel","levelsData","levelData","addLevel","calculateMissingData","hght","u","wdir","wspd","tmpk","dwpk","relh","mixr","theta","wetbulb","vtmp","sin","PI","cos","sqrt","arctan","levelA","levelB","sounding","_sounding","SoundingData","Resources","topNode","timesVariableCollections","_topNode","_availableVariablesMap","_timesVariableCollections","pushChildCollections","addedResources","_getTopNodeOfResourceDefinition","_getTopMostChildWithAllVariables","_addAvailableVariablesMapByResource","INTERNAL_CHANGE_RESOURCES","timeoutId","removedResources","removedNodeResourcesMap","_removeAvailableVariablesMapByResources","fullCheckVariables","hasResourcesByVariables","getNodeByVariableCollection","_hasResourcesOfNodeChildren","VariableCollection","isDefinedByVariableOf","childNode","bubbleDown","isVariableContained","_getNodeByVariableCollection","compareFunc","_findChildNodeByVariableCollection","_checkVariableInNode","isDefinedBy","from","traversedNode","exact","collectTimes","collections","models","runs","regions","fields","accumulations","thresholds","TimeVariable","getNodeByVariableCollectionId","Display","alwaysAvailableCollections","_alwaysAvailableCollections","_modelviewer","_container","_parentNode","_resourceNode","_resourceOutput","image","thermodynamicDiagram","variableCollections","_onChangeVisibleResource","onInit","resourceNode","onChangeVisibleResource","_getParentsVariables","getAvailableVariables","selectedVariables","parentResult","visibleResource","isAppended","soundings","getSounding","addSounding","Container","totalAddedVariables","totalRemovedVariables","display","adaptSuitableResource","_display","_containerNode","_adaptSuitableResource","_initAdaptSuitableResource","_visibleResource","_displayVariables","_selectedVariables","_selectedNode","_enabledResources","_debouncedChangeSelectedVariables","addedVariables","removedVariables","clear","_listeners","mirror","listenerKey","_setVisibleResource","_setTimes","_setEnabledResources","_updateSelectedVariables","displayVariables","displayVariable","f","mirrorConfig","onChangeDisplayVariables","newDisplayVariables","exchangeDisplayVariable","mC","newVariableCollection","isContained","mirrorsFrom","_getSelectedVariablesWithResources","contained","selectedVariable","contains","availableTimes","getTimesByVariables","selectedNode","findFirstNodeWithVariable","_setSelectedVariables","sV","lSV","isFound","tempSV","getSelectedVariable","lastSelectedVariable","isResourceSelected","checkPossibleVariable","possibleSelectedVariable","tempSelectedVariables","resultSelectedVariables","resultLastSelectedVariable","isOnlyTimesVariables","availableSelectedVariables","availableVariablesMap","possibleSelectedVariables","getPossibleVariables","setEnabledTimesBySetID","oldVisibleResource","availableSV","lastAddedVariable","SVG","getNormalizedLineStyleOptions","width","defaults","getFirstDefinedValue","getNormalizedFontOptions","anchor","getNormalizedLineOptions","updateLineOptions","updateOptions","styleKey","params","drawTextInto","y","horizontalMargin","verticalMargin","font","fill","background","rect","fontColor","textNode","dy","bbox","height","dx","drawWindbarbInto","strokeStyle","fillTriangle","triangleRatio","barbDistanceRatio","barbHeightRatio","circleOnLowWindspeed","circleRadiusRatio","windspeed","windbarbGroup","barbGroup","triangleWidth","barbDistance","windbarbHeight","yPosition","windspeedResidual","circle","cx","cy","stroke","line","polyline","barbsWidth","scale","rotate","DiagramParcel","parcel","dewp","_parcel","_options","linecap","oldVisible","willTrigger","DiagramSounding","diagram","windprofile","hodograph","_diagramParcelCollection","_visible","getNormalizedDiagramOptions","getNormalizedWindprofileOptions","getNormalizedHodographOptions","getNormalizedParcelsOptions","parcelCollection","addParcel","diagramParcel","getParcelOptions","dp","updateDiagramOptions","updateWindprofileOptions","updateHodographOptions","updateParcelsOptions","diagramParcelCollection","updateOptionsPart","windbarbs","minPressure","maxPressure","segments","segment","lineKeys","renderTo","_svgNode","boundingRect","getBoundingClientRect","computedStyle","getComputedStyle","parseFloat","getPropertyValue","_plotAreas","plotArea","svgNode","dispatchEvent","target","_hoverLabelsGroup","removeSounding","onCoordinateSystemChange","coordinateSystem","formerCoordinateSystem","diagramSounding","CoordinateSystem","pressure","temperature","_width","_height","temperatureBottomLeft","temperatureBottomRight","inclinationTan","_initPressureOptions","_initTemperatureOptions","oldWidth","oldHeight","inclinationAngle","max","x0","getTByXY","getYByXP","getXByYT","getPByXY","getTByXP","getXByPT","getXByPPotentialTemperatur","getYByXPotentialTemperature","getYByPT","thetaEY","getYByXT","reference","_normalizeTemperatureRange","tan","yReference","xTmin","deltaT","k","PlotArea","_getNormalizedStyle","_svgNodeBackground","_coordinateSystem","_coordinateSystemListenerKey","_initEvents","drawBackground","_drawBackground","overflow","dblclick","mousedown","mouseup","mouseover","mouseout","touchstart","touchmove","touchleave","touchend","touchcancel","eventKey","customEvent","getExtendedEvent","point","pageX","pageXOffset","pageY","pageYOffset","elementX","elementY","hoverLabels","getSoundingVisibility","dataGroupIds","getCoordinatesByLevelData","insertDataGroupInto","filterDataPoint","minDataPointsDistance","_getSoundingVisibility","_dataGroupIds","_getCoordinatesByLevelData","_insertDataGroupInto","_filterDataPoint","_minDataPointsDistance","_svgNodeData","_soundings","_getHoverSounding","_initHoverLabels","oldValue","drawSoundings","listenerKeyVisible","onChangeSoundingVisibility","listenerKeyOptions","drawSounding","setDisplayOfSounding","soundingGroup","filterDataPointFunction","_getFilterDataPointFunction","lastLevel","getLevels","getData","dataGroupId","level","lastPoint","maxDistance","insertLabelsFunc","getLevelData","getHoverSounding","hoverLabelsSounding","_isHoverLabelsRemote","diagramPres","remote","getNearestLevel","PlotDataArea","unit","isobars","isotherms","dryadiabats","pseudoadiabats","mixingratio","getNormalizedDiagramLineOptions","highlightedLines","dasharray","svgGroups","border","_parcelsOptions","_parcels","soundingParcelsItems","parcelsGroup","parcelsGroups","addItemListenerKey","removeItemListenerKey","changeVisibleListeners","changeOptionsListeners","onAddParcel","drawParcel","listenerObj","init","plotIsobars","plotIsotherms","plotDryadiabats","plotPseudoadiabats","plotMixingratio","parcelsObj","drawParcels","pottmpk","lcltmpk","lclthetaek","tempGroup","dewpGroup","yInterval","y0","getXByYPotentialTemperature","y1","getYByPPotentialTemperatur","x1","tempPolyline","isDryAdiabatStraightLine","y2","x2","getXByYEquiPotTemp","x0dwp","getXByYHMR","x1dwp","dewpPolyline","redraw","_plotLines","interval","isIsothermsVertical","TKelvin","points","lines","thetaeKelvin","getYByPEquiPotTemp","getYByPHMR","valuesOptions","pointsFunc","ceil","end","floor","highlightLineWidth","vHighlight","diagramTmpk","align","radius","radiusPlus","_makeInsertLabelsFunc","hghtStr","drawPressureHoverLabelInto","labelOptions","lineWidth","fillOptions","PlotAltitudeDataArea","windbarbLength","windbarbData","_windbarbLength","windspeedMax","pixelPerSpeed","basePolylines","segmentPolylines","def","basePolyline","lowSplit","highSplit","indexLow","indexHigh","newBaseLine","segmentPolyline","grid","origin","_origin","_windspeedMax","_gridOptions","getNormalizedGridOptions","oldOrigin","minExtentLength","axes","circles","labels","xText","angle","yText","toFixed","decimalPlaces","prefix","plain","backdrop","before","move","getNormalizedTextOptions","smallestDistanceSquare","nearestLevelData","distanceSquare","winddir","defaultStyle","dotRadius","labelFont","yDelta","textGroups","texts","g","maxBBox","el","yAxis","title","_labelsOptions","_titleOptions","getNormalizedTitleOptions","svgLabelsGroup","minLevel","maxLevel","fontSize","xAxis","minT","maxT","windbarbsProfile","windspeedProfile","normalizePlotAreaOptions","defaultPadding","TDDiagram","appendPlotArea","yAxisClass","xAxisClass","WindbarbsProfile","WindspeedProfile","Hodograph","StueveDiagram","Emagram","SkewTlogPDiagram","exchangeCoordinateSystem","ThermodynamicDiagramPluggable","Simple","imgNode","ThermodynamicDiagram","makeTimeTextCallbackFunction","moment","m","utc","local","tz","ToggleButton","startedContent","startedClass","stoppedContent","stoppedClass","classDropdownToggle","menu","menuImageFrequency","imageFrequencyCaption","menuFrequencies","menuRestartPause","restartPauseCaption","biPauseFill","biPlayFill","animationButton","is","onStart","String","onStop","toggle","btnDropdown","menuDropdown","form","label","div","insertFrequencyButtonGroup","btnGroupClass","btnClass","freq","insertRestartPauseRange","pauses","insertRestartPauseButtonGroup","pause","visualisation","Slider","bsButtons","bsDropdown","synview","SynviewCollection","MapOL","MapLL","GeoJSONTile","BootstrapTooltip","ModelviewerResource","ModelviewerImage","Sounding","ModelviewerSounding","NWPResources","SelectNavigation","ignoreVariableCollections","selectCaption","navigationClass","selectDivClass","selectClass","navigationNode","selectNodes","count","_appendSelectNode","_changeSelected","_appendOptionNode","selectNode","captionOption","option","optionsClass","functions"],"mappings":";mYAOA,IAAIA,EAAW,SAAUC,GACvB,aAEA,IAEIC,EAFAC,EAAKC,OAAOC,UACZC,EAASH,EAAGI,eAEZC,EAA4B,mBAAXC,OAAwBA,OAAS,GAClDC,EAAiBF,EAAQG,UAAY,aACrCC,EAAsBJ,EAAQK,eAAiB,kBAC/CC,EAAoBN,EAAQO,aAAe,gBAE/C,SAASC,EAAOC,EAAKC,EAAKC,GAOxB,OANAf,OAAOgB,eAAeH,EAAKC,EAAK,CAC9BC,MAAOA,EACPE,YAAY,EACZC,cAAc,EACdC,UAAU,IAELN,EAAIC,GAEb,IAEEF,EAAO,GAAI,IACX,MAAOQ,GACPR,EAAS,SAASC,EAAKC,EAAKC,GAC1B,OAAOF,EAAIC,GAAOC,GAItB,SAASM,EAAKC,EAASC,EAASC,EAAMC,GAEpC,IAAIC,EAAiBH,GAAWA,EAAQtB,qBAAqB0B,EAAYJ,EAAUI,EAC/EC,EAAY5B,OAAO6B,OAAOH,EAAezB,WACzC6B,EAAU,IAAIC,EAAQN,GAAe,IAMzC,OAFAG,EAAUI,QAsMZ,SAA0BV,EAASE,EAAMM,GACvC,IAAIG,EAAQC,EAEZ,OAAO,SAAgBC,EAAQC,GAC7B,GAAIH,IAAUI,EACZ,MAAM,IAAIC,MAAM,gCAGlB,GAAIL,IAAUM,EAAmB,CAC/B,GAAe,UAAXJ,EACF,MAAMC,E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AoBtW,IAAIiX,EAAStmB,MALxC,oC,kBArFpB,GHoFA,MC4EaitB,GAAW,CACtBvB,WAiBW8E,GAAuB,CAClC0L,oBACAH,iBAAkB,CAChBoQ,iBACAC,WACAC,qBAEFjT,mBACA8S,aACAN,aACAqF,UAAW,CACT9Z,qBAEF6U,oBACAC,oBACAhD,KAAM,CACJoC,SACAT,Y","file":"meteoJS.min.js","sourcesContent":["/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n  \"use strict\";\n\n  var Op = Object.prototype;\n  var hasOwn = Op.hasOwnProperty;\n  var undefined; // More compressible than void 0.\n  var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n  var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n  var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n  var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n  function define(obj, key, value) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n    return obj[key];\n  }\n  try {\n    // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n    define({}, \"\");\n  } catch (err) {\n    define = function(obj, key, value) {\n      return obj[key] = value;\n    };\n  }\n\n  function wrap(innerFn, outerFn, self, tryLocsList) {\n    // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n    var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n    var generator = Object.create(protoGenerator.prototype);\n    var context = new Context(tryLocsList || []);\n\n    // The ._invoke method unifies the implementations of the .next,\n    // .throw, and .return methods.\n    generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n    return generator;\n  }\n  exports.wrap = wrap;\n\n  // Try/catch helper to minimize deoptimizations. Returns a completion\n  // record like context.tryEntries[i].completion. This interface could\n  // have been (and was previously) designed to take a closure to be\n  // invoked without arguments, but in all the cases we care about we\n  // already have an existing method we want to call, so there's no need\n  // to create a new function object. We can even get away with assuming\n  // the method takes exactly one argument, since that happens to be true\n  // in every case, so we don't have to touch the arguments object. The\n  // only additional allocation required is the completion record, which\n  // has a stable shape and so hopefully should be cheap to allocate.\n  function tryCatch(fn, obj, arg) {\n    try {\n      return { type: \"normal\", arg: fn.call(obj, arg) };\n    } catch (err) {\n      return { type: \"throw\", arg: err };\n    }\n  }\n\n  var GenStateSuspendedStart = \"suspendedStart\";\n  var GenStateSuspendedYield = \"suspendedYield\";\n  var GenStateExecuting = \"executing\";\n  var GenStateCompleted = \"completed\";\n\n  // Returning this object from the innerFn has the same effect as\n  // breaking out of the dispatch switch statement.\n  var ContinueSentinel = {};\n\n  // Dummy constructor functions that we use as the .constructor and\n  // .constructor.prototype properties for functions that return Generator\n  // objects. For full spec compliance, you may wish to configure your\n  // minifier not to mangle the names of these two functions.\n  function Generator() {}\n  function GeneratorFunction() {}\n  function GeneratorFunctionPrototype() {}\n\n  // This is a polyfill for %IteratorPrototype% for environments that\n  // don't natively support it.\n  var IteratorPrototype = {};\n  IteratorPrototype[iteratorSymbol] = function () {\n    return this;\n  };\n\n  var getProto = Object.getPrototypeOf;\n  var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n  if (NativeIteratorPrototype &&\n      NativeIteratorPrototype !== Op &&\n      hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n    // This environment has a native %IteratorPrototype%; use it instead\n    // of the polyfill.\n    IteratorPrototype = NativeIteratorPrototype;\n  }\n\n  var Gp = GeneratorFunctionPrototype.prototype =\n    Generator.prototype = Object.create(IteratorPrototype);\n  GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n  GeneratorFunctionPrototype.constructor = GeneratorFunction;\n  GeneratorFunction.displayName = define(\n    GeneratorFunctionPrototype,\n    toStringTagSymbol,\n    \"GeneratorFunction\"\n  );\n\n  // Helper for defining the .next, .throw, and .return methods of the\n  // Iterator interface in terms of a single ._invoke method.\n  function defineIteratorMethods(prototype) {\n    [\"next\", \"throw\", \"return\"].forEach(function(method) {\n      define(prototype, method, function(arg) {\n        return this._invoke(method, arg);\n      });\n    });\n  }\n\n  exports.isGeneratorFunction = function(genFun) {\n    var ctor = typeof genFun === \"function\" && genFun.constructor;\n    return ctor\n      ? ctor === GeneratorFunction ||\n        // For the native GeneratorFunction constructor, the best we can\n        // do is to check its .name property.\n        (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n      : false;\n  };\n\n  exports.mark = function(genFun) {\n    if (Object.setPrototypeOf) {\n      Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n    } else {\n      genFun.__proto__ = GeneratorFunctionPrototype;\n      define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n    }\n    genFun.prototype = Object.create(Gp);\n    return genFun;\n  };\n\n  // Within the body of any async function, `await x` is transformed to\n  // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n  // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n  // meant to be awaited.\n  exports.awrap = function(arg) {\n    return { __await: arg };\n  };\n\n  function AsyncIterator(generator, PromiseImpl) {\n    function invoke(method, arg, resolve, reject) {\n      var record = tryCatch(generator[method], generator, arg);\n      if (record.type === \"throw\") {\n        reject(record.arg);\n      } else {\n        var result = record.arg;\n        var value = result.value;\n        if (value &&\n            typeof value === \"object\" &&\n            hasOwn.call(value, \"__await\")) {\n          return PromiseImpl.resolve(value.__await).then(function(value) {\n            invoke(\"next\", value, resolve, reject);\n          }, function(err) {\n            invoke(\"throw\", err, resolve, reject);\n          });\n        }\n\n        return PromiseImpl.resolve(value).then(function(unwrapped) {\n          // When a yielded Promise is resolved, its final value becomes\n          // the .value of the Promise<{value,done}> result for the\n          // current iteration.\n          result.value = unwrapped;\n          resolve(result);\n        }, function(error) {\n          // If a rejected Promise was yielded, throw the rejection back\n          // into the async generator function so it can be handled there.\n          return invoke(\"throw\", error, resolve, reject);\n        });\n      }\n    }\n\n    var previousPromise;\n\n    function enqueue(method, arg) {\n      function callInvokeWithMethodAndArg() {\n        return new PromiseImpl(function(resolve, reject) {\n          invoke(method, arg, resolve, reject);\n        });\n      }\n\n      return previousPromise =\n        // If enqueue has been called before, then we want to wait until\n        // all previous Promises have been resolved before calling invoke,\n        // so that results are always delivered in the correct order. If\n        // enqueue has not been called before, then it is important to\n        // call invoke immediately, without waiting on a callback to fire,\n        // so that the async generator function has the opportunity to do\n        // any necessary setup in a predictable way. This predictability\n        // is why the Promise constructor synchronously invokes its\n        // executor callback, and why async functions synchronously\n        // execute code before the first await. Since we implement simple\n        // async functions in terms of async generators, it is especially\n        // important to get this right, even though it requires care.\n        previousPromise ? previousPromise.then(\n          callInvokeWithMethodAndArg,\n          // Avoid propagating failures to Promises returned by later\n          // invocations of the iterator.\n          callInvokeWithMethodAndArg\n        ) : callInvokeWithMethodAndArg();\n    }\n\n    // Define the unified helper method that is used to implement .next,\n    // .throw, and .return (see defineIteratorMethods).\n    this._invoke = enqueue;\n  }\n\n  defineIteratorMethods(AsyncIterator.prototype);\n  AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n    return this;\n  };\n  exports.AsyncIterator = AsyncIterator;\n\n  // Note that simple async functions are implemented on top of\n  // AsyncIterator objects; they just return a Promise for the value of\n  // the final result produced by the iterator.\n  exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n    if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n    var iter = new AsyncIterator(\n      wrap(innerFn, outerFn, self, tryLocsList),\n      PromiseImpl\n    );\n\n    return exports.isGeneratorFunction(outerFn)\n      ? iter // If outerFn is a generator, return the full iterator.\n      : iter.next().then(function(result) {\n          return result.done ? result.value : iter.next();\n        });\n  };\n\n  function makeInvokeMethod(innerFn, self, context) {\n    var state = GenStateSuspendedStart;\n\n    return function invoke(method, arg) {\n      if (state === GenStateExecuting) {\n        throw new Error(\"Generator is already running\");\n      }\n\n      if (state === GenStateCompleted) {\n        if (method === \"throw\") {\n          throw arg;\n        }\n\n        // Be forgiving, per 25.3.3.3.3 of the spec:\n        // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n        return doneResult();\n      }\n\n      context.method = method;\n      context.arg = arg;\n\n      while (true) {\n        var delegate = context.delegate;\n        if (delegate) {\n          var delegateResult = maybeInvokeDelegate(delegate, context);\n          if (delegateResult) {\n            if (delegateResult === ContinueSentinel) continue;\n            return delegateResult;\n          }\n        }\n\n        if (context.method === \"next\") {\n          // Setting context._sent for legacy support of Babel's\n          // function.sent implementation.\n          context.sent = context._sent = context.arg;\n\n        } else if (context.method === \"throw\") {\n          if (state === GenStateSuspendedStart) {\n            state = GenStateCompleted;\n            throw context.arg;\n          }\n\n          context.dispatchException(context.arg);\n\n        } else if (context.method === \"return\") {\n          context.abrupt(\"return\", context.arg);\n        }\n\n        state = GenStateExecuting;\n\n        var record = tryCatch(innerFn, self, context);\n        if (record.type === \"normal\") {\n          // If an exception is thrown from innerFn, we leave state ===\n          // GenStateExecuting and loop back for another invocation.\n          state = context.done\n            ? GenStateCompleted\n            : GenStateSuspendedYield;\n\n          if (record.arg === ContinueSentinel) {\n            continue;\n          }\n\n          return {\n            value: record.arg,\n            done: context.done\n          };\n\n        } else if (record.type === \"throw\") {\n          state = GenStateCompleted;\n          // Dispatch the exception by looping back around to the\n          // context.dispatchException(context.arg) call above.\n          context.method = \"throw\";\n          context.arg = record.arg;\n        }\n      }\n    };\n  }\n\n  // Call delegate.iterator[context.method](context.arg) and handle the\n  // result, either by returning a { value, done } result from the\n  // delegate iterator, or by modifying context.method and context.arg,\n  // setting context.delegate to null, and returning the ContinueSentinel.\n  function maybeInvokeDelegate(delegate, context) {\n    var method = delegate.iterator[context.method];\n    if (method === undefined) {\n      // A .throw or .return when the delegate iterator has no .throw\n      // method always terminates the yield* loop.\n      context.delegate = null;\n\n      if (context.method === \"throw\") {\n        // Note: [\"return\"] must be used for ES3 parsing compatibility.\n        if (delegate.iterator[\"return\"]) {\n          // If the delegate iterator has a return method, give it a\n          // chance to clean up.\n          context.method = \"return\";\n          context.arg = undefined;\n          maybeInvokeDelegate(delegate, context);\n\n          if (context.method === \"throw\") {\n            // If maybeInvokeDelegate(context) changed context.method from\n            // \"return\" to \"throw\", let that override the TypeError below.\n            return ContinueSentinel;\n          }\n        }\n\n        context.method = \"throw\";\n        context.arg = new TypeError(\n          \"The iterator does not provide a 'throw' method\");\n      }\n\n      return ContinueSentinel;\n    }\n\n    var record = tryCatch(method, delegate.iterator, context.arg);\n\n    if (record.type === \"throw\") {\n      context.method = \"throw\";\n      context.arg = record.arg;\n      context.delegate = null;\n      return ContinueSentinel;\n    }\n\n    var info = record.arg;\n\n    if (! info) {\n      context.method = \"throw\";\n      context.arg = new TypeError(\"iterator result is not an object\");\n      context.delegate = null;\n      return ContinueSentinel;\n    }\n\n    if (info.done) {\n      // Assign the result of the finished delegate to the temporary\n      // variable specified by delegate.resultName (see delegateYield).\n      context[delegate.resultName] = info.value;\n\n      // Resume execution at the desired location (see delegateYield).\n      context.next = delegate.nextLoc;\n\n      // If context.method was \"throw\" but the delegate handled the\n      // exception, let the outer generator proceed normally. If\n      // context.method was \"next\", forget context.arg since it has been\n      // \"consumed\" by the delegate iterator. If context.method was\n      // \"return\", allow the original .return call to continue in the\n      // outer generator.\n      if (context.method !== \"return\") {\n        context.method = \"next\";\n        context.arg = undefined;\n      }\n\n    } else {\n      // Re-yield the result returned by the delegate method.\n      return info;\n    }\n\n    // The delegate iterator is finished, so forget it and continue with\n    // the outer generator.\n    context.delegate = null;\n    return ContinueSentinel;\n  }\n\n  // Define Generator.prototype.{next,throw,return} in terms of the\n  // unified ._invoke helper method.\n  defineIteratorMethods(Gp);\n\n  define(Gp, toStringTagSymbol, \"Generator\");\n\n  // A Generator should always return itself as the iterator object when the\n  // @@iterator function is called on it. Some browsers' implementations of the\n  // iterator prototype chain incorrectly implement this, causing the Generator\n  // object to not be returned from this call. This ensures that doesn't happen.\n  // See https://github.com/facebook/regenerator/issues/274 for more details.\n  Gp[iteratorSymbol] = function() {\n    return this;\n  };\n\n  Gp.toString = function() {\n    return \"[object Generator]\";\n  };\n\n  function pushTryEntry(locs) {\n    var entry = { tryLoc: locs[0] };\n\n    if (1 in locs) {\n      entry.catchLoc = locs[1];\n    }\n\n    if (2 in locs) {\n      entry.finallyLoc = locs[2];\n      entry.afterLoc = locs[3];\n    }\n\n    this.tryEntries.push(entry);\n  }\n\n  function resetTryEntry(entry) {\n    var record = entry.completion || {};\n    record.type = \"normal\";\n    delete record.arg;\n    entry.completion = record;\n  }\n\n  function Context(tryLocsList) {\n    // The root entry object (effectively a try statement without a catch\n    // or a finally block) gives us a place to store values thrown from\n    // locations where there is no enclosing try statement.\n    this.tryEntries = [{ tryLoc: \"root\" }];\n    tryLocsList.forEach(pushTryEntry, this);\n    this.reset(true);\n  }\n\n  exports.keys = function(object) {\n    var keys = [];\n    for (var key in object) {\n      keys.push(key);\n    }\n    keys.reverse();\n\n    // Rather than returning an object with a next method, we keep\n    // things simple and return the next function itself.\n    return function next() {\n      while (keys.length) {\n        var key = keys.pop();\n        if (key in object) {\n          next.value = key;\n          next.done = false;\n          return next;\n        }\n      }\n\n      // To avoid creating an additional object, we just hang the .value\n      // and .done properties off the next function object itself. This\n      // also ensures that the minifier will not anonymize the function.\n      next.done = true;\n      return next;\n    };\n  };\n\n  function values(iterable) {\n    if (iterable) {\n      var iteratorMethod = iterable[iteratorSymbol];\n      if (iteratorMethod) {\n        return iteratorMethod.call(iterable);\n      }\n\n      if (typeof iterable.next === \"function\") {\n        return iterable;\n      }\n\n      if (!isNaN(iterable.length)) {\n        var i = -1, next = function next() {\n          while (++i < iterable.length) {\n            if (hasOwn.call(iterable, i)) {\n              next.value = iterable[i];\n              next.done = false;\n              return next;\n            }\n          }\n\n          next.value = undefined;\n          next.done = true;\n\n          return next;\n        };\n\n        return next.next = next;\n      }\n    }\n\n    // Return an iterator with no values.\n    return { next: doneResult };\n  }\n  exports.values = values;\n\n  function doneResult() {\n    return { value: undefined, done: true };\n  }\n\n  Context.prototype = {\n    constructor: Context,\n\n    reset: function(skipTempReset) {\n      this.prev = 0;\n      this.next = 0;\n      // Resetting context._sent for legacy support of Babel's\n      // function.sent implementation.\n      this.sent = this._sent = undefined;\n      this.done = false;\n      this.delegate = null;\n\n      this.method = \"next\";\n      this.arg = undefined;\n\n      this.tryEntries.forEach(resetTryEntry);\n\n      if (!skipTempReset) {\n        for (var name in this) {\n          // Not sure about the optimal order of these conditions:\n          if (name.charAt(0) === \"t\" &&\n              hasOwn.call(this, name) &&\n              !isNaN(+name.slice(1))) {\n            this[name] = undefined;\n          }\n        }\n      }\n    },\n\n    stop: function() {\n      this.done = true;\n\n      var rootEntry = this.tryEntries[0];\n      var rootRecord = rootEntry.completion;\n      if (rootRecord.type === \"throw\") {\n        throw rootRecord.arg;\n      }\n\n      return this.rval;\n    },\n\n    dispatchException: function(exception) {\n      if (this.done) {\n        throw exception;\n      }\n\n      var context = this;\n      function handle(loc, caught) {\n        record.type = \"throw\";\n        record.arg = exception;\n        context.next = loc;\n\n        if (caught) {\n          // If the dispatched exception was caught by a catch block,\n          // then let that catch block handle the exception normally.\n          context.method = \"next\";\n          context.arg = undefined;\n        }\n\n        return !! caught;\n      }\n\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        var record = entry.completion;\n\n        if (entry.tryLoc === \"root\") {\n          // Exception thrown outside of any try block that could handle\n          // it, so set the completion value of the entire function to\n          // throw the exception.\n          return handle(\"end\");\n        }\n\n        if (entry.tryLoc <= this.prev) {\n          var hasCatch = hasOwn.call(entry, \"catchLoc\");\n          var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n          if (hasCatch && hasFinally) {\n            if (this.prev < entry.catchLoc) {\n              return handle(entry.catchLoc, true);\n            } else if (this.prev < entry.finallyLoc) {\n              return handle(entry.finallyLoc);\n            }\n\n          } else if (hasCatch) {\n            if (this.prev < entry.catchLoc) {\n              return handle(entry.catchLoc, true);\n            }\n\n          } else if (hasFinally) {\n            if (this.prev < entry.finallyLoc) {\n              return handle(entry.finallyLoc);\n            }\n\n          } else {\n            throw new Error(\"try statement without catch or finally\");\n          }\n        }\n      }\n    },\n\n    abrupt: function(type, arg) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.tryLoc <= this.prev &&\n            hasOwn.call(entry, \"finallyLoc\") &&\n            this.prev < entry.finallyLoc) {\n          var finallyEntry = entry;\n          break;\n        }\n      }\n\n      if (finallyEntry &&\n          (type === \"break\" ||\n           type === \"continue\") &&\n          finallyEntry.tryLoc <= arg &&\n          arg <= finallyEntry.finallyLoc) {\n        // Ignore the finally entry if control is not jumping to a\n        // location outside the try/catch block.\n        finallyEntry = null;\n      }\n\n      var record = finallyEntry ? finallyEntry.completion : {};\n      record.type = type;\n      record.arg = arg;\n\n      if (finallyEntry) {\n        this.method = \"next\";\n        this.next = finallyEntry.finallyLoc;\n        return ContinueSentinel;\n      }\n\n      return this.complete(record);\n    },\n\n    complete: function(record, afterLoc) {\n      if (record.type === \"throw\") {\n        throw record.arg;\n      }\n\n      if (record.type === \"break\" ||\n          record.type === \"continue\") {\n        this.next = record.arg;\n      } else if (record.type === \"return\") {\n        this.rval = this.arg = record.arg;\n        this.method = \"return\";\n        this.next = \"end\";\n      } else if (record.type === \"normal\" && afterLoc) {\n        this.next = afterLoc;\n      }\n\n      return ContinueSentinel;\n    },\n\n    finish: function(finallyLoc) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.finallyLoc === finallyLoc) {\n          this.complete(entry.completion, entry.afterLoc);\n          resetTryEntry(entry);\n          return ContinueSentinel;\n        }\n      }\n    },\n\n    \"catch\": function(tryLoc) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.tryLoc === tryLoc) {\n          var record = entry.completion;\n          if (record.type === \"throw\") {\n            var thrown = record.arg;\n            resetTryEntry(entry);\n          }\n          return thrown;\n        }\n      }\n\n      // The context.catch method must only be called with a location\n      // argument that corresponds to a known catch block.\n      throw new Error(\"illegal catch attempt\");\n    },\n\n    delegateYield: function(iterable, resultName, nextLoc) {\n      this.delegate = {\n        iterator: values(iterable),\n        resultName: resultName,\n        nextLoc: nextLoc\n      };\n\n      if (this.method === \"next\") {\n        // Deliberately forget the last sent value so that we don't\n        // accidentally pass it on to the delegate.\n        this.arg = undefined;\n      }\n\n      return ContinueSentinel;\n    }\n  };\n\n  // Regardless of whether this script is executing as a CommonJS module\n  // or not, return the runtime object so that we can declare the variable\n  // regeneratorRuntime in the outer scope, which allows this module to be\n  // injected easily by `bin/regenerator --include-runtime script.js`.\n  return exports;\n\n}(\n  // If this script is executing as a CommonJS module, use module.exports\n  // as the regeneratorRuntime namespace. Otherwise create a new empty\n  // object. Either way, the resulting object will be used to initialize\n  // the regeneratorRuntime variable at the top of this file.\n  typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n  regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n  // This module should not be running in strict mode, so the above\n  // assignment should always work unless something is misconfigured. Just\n  // in case runtime.js accidentally runs in strict mode, we can escape\n  // strict mode using a global Function call. This could conceivably fail\n  // if a Content Security Policy forbids using Function, but in that case\n  // the proper solution is to fix the accidental strict mode problem. If\n  // you've misconfigured your bundler to force strict mode and applied a\n  // CSP to forbid Function, and you're not willing to fix either of those\n  // problems, please detail your unique predicament in a GitHub issue.\n  Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","/**\n * @module meteoJS/calc\n */\n\n/**\n * Umrechnung eines Luftdrucks zur entsprechenden Höhe in der\n * Internationalen Standard-Atmosphäre (ISA).\n * \n * Formel ist gültig bis 11 km Höhe\n * (https://de.wikipedia.org/wiki/Barometrische_H%C3%B6henformel#Internationale_H.C3.B6henformel)\n * \n * @static\n * @public\n * @param {number|undefined} p Luftdruck [hPa]\n * @return {number|undefined} Höhe in der Standard-Atmosphäre [m ü.M.]\n */\nexport function altitudeISAByPres(p) {\n  if (p === undefined ||\n      isNaN(p))\n    return undefined;\n  return 44330.769*(1 - Math.pow(p/1013.25, 0.19029496));\n}\n\n/**\n * Umrechnung einer Höhe in einen Luftdruck in der\n * Internationalen Standard-Atmosphäre (ISA).\n * \n * Formel ist gültig bis 11 km Höhe\n * (https://de.wikipedia.org/wiki/Barometrische_H%C3%B6henformel#Internationale_H.C3.B6henformel)\n * \n * @static\n * @public\n * @param {number|undefined} a Höhe [m ü.M.]\n * @return {number|undefined} Luftdruck in der Standard-Atmosphäre [hPa]\n */\nexport function pressureISAByAltitude(a) {\n  if (a === undefined ||\n      isNaN(a))\n    return undefined;\n  return 1013.25*Math.pow(1-a/44330.769, 5.255);\n}\n\n/**\n * Berechnung der potentielle Temperatur θ aus der Temperatur und des Drucks\n * eines Luftpakets.\n * \n * Berechnung zum Normaldruck von 1000 hPa\n * (https://de.wikipedia.org/wiki/Potentielle_Temperatur#Trockenpotentielle_Temperatur)\n * \n * @param {number|undefined} temp Temperatur [K]\n * @param {number|undefined} pres Luftdruck [hPa]\n * @return {number|undefined} Potentielle Temperatur [K]\n */\nexport function potentialTempByTempAndPres(temp, pres) {\n  if (temp === undefined || isNaN(temp) ||\n      pres === undefined || isNaN(pres))\n    return undefined;\n  return temp * Math.pow(1000/pres, 0.286);\n}\n\n/**\n * Berechnung der Lufttemperatur bei einem Luftdruck für ein Luftpaket mit\n * entsprechender potentiellen Temperatur.\n * \n * Berechnung zum Normaldurck von 1000 hPa\n * \n * @param {number|undefined} potentialTemp Potentielle Temperatur [K]\n * @param {number|undefined} pres Luftdruck [hPa]\n * @return {number|undefined} Temperatur [K]\n */\nexport function tempByPotentialTempAndPres(potentialTemp, pres) {\n  if (potentialTemp === undefined || isNaN(potentialTemp) ||\n      pres === undefined || isNaN(pres))\n    return undefined;\n  return potentialTemp*Math.pow(pres/1000, 0.286);\n}\n\n/**\n * Temperatur eines Luftpaktes mit Druck 'pres' und der Äquivalent potentiellen Temperatur 'thetae'.\n * \n * @param {number|undefined} thetae Äquivalent potentielle Temperatur [K]\n * @param {number|undefined} pres Luftdruck [hPa]\n * @return {number|undefined} Temperatur [K]\n */\nexport function tempByEquiPotTempAndPres(thetae, pres) {\n  if (pres === undefined || isNaN(pres))\n    return undefined;\n  var s = undefined;\n  var th = undefined;\n  var pcon = Math.pow(1000/pres, .286);\n  var t = 273.0;\n  var delta = 20;\n  var i = 0;\n  while (Math.abs(delta) > 0.1 && i < 100) {\n    i++;\n    s = saturationHMRByTempAndPres(t, pres);\n    th = t * pcon * Math.exp(2.5*s/t);\n    if ((th-thetae)*delta > 0.0)\n      delta = -.5 * delta;\n    t = t + delta;\n  }\n  return t;\n}\n\n/**\n * Taupunkt eines Luftpaktes über Mischungsverhältnis und Druck.\n * \n * @param {number|undefined} hmr Mischungsverhätlnis [g/kg]\n * @param {number|undefined} pres Luftdruck [hPa]\n * @return {number|undefined} Taupunkttemperatur [K]\n */\nexport function dewpointByHMRAndPres(hmr, pres) {\n  if (hmr === undefined || isNaN(hmr) ||\n      pres === undefined || isNaN(pres))\n    return undefined;\n  var x = 0.4343 * Math.log(hmr * pres /(622. + hmr));\n  return Math.pow(10,.0498646455 * x + 2.4082965 ) -\n         7.07475 +\n         38.9114 * Math.pow((Math.pow(10, .0915 * x) - 1.2035),2);\n}\n\n/**\n * Wetbulb-Temperature, Psychro-Temperature aus Temperatur, Taupunkt und Luftdruck\n * \n * @param {number|undefined} temp Temperatur [K]\n * @param {number|undefined} dewpoint Taupunkttemperatur [K]\n * @param {number|undefined} pres Luftdruck [hPa]\n * @return {number|undefined} Wetbulb-Temperatur [K]\n */\nexport function wetbulbTempByTempAndDewpointAndPres(temp, dewpoint, pres) {\n  if (temp === undefined || isNaN(temp) ||\n      dewpoint === undefined || isNaN(dewpoint) ||\n      pres === undefined || isNaN(pres))\n    return undefined;\n  var result = dewpoint-273.15;\n  var Ediff = 1;\n  var incr = 10;\n  var previoussign = 1;\n  var E = 6.112 * Math.exp((17.67 * result) / (result + 243.5));\n  while (Math.abs(Ediff) > 0.05) {\n    var Eguess = 6.112 * Math.exp((17.67 * result) / (result + 243.5)) -\n                 pres * (temp-273.15 - result) * 0.00066 * (1 + (0.00115 * result));\n    Ediff = E - Eguess;\n    if (Ediff == 0)\n      break;\n    else {\n      if (Ediff < 0) {\n        if (-1 != previoussign) {\n          previoussign = -1;\n          incr = incr/10;\n        }\n      }\n      else {\n        if (1 != previoussign) {\n          previoussign = 1;\n          incr = incr/10;\n        }\n      }\n    }\n    if (Math.abs(Ediff) <= 0.05)\n      break;\n    else\n      result = result + incr*previoussign;\n  }\n  return result+273.15;\n}\n\n/**\n * Äquivalent Potentielle Temperatur eines Luftpaktes.\n * \n * Gemäss Formel von Holten (https://en.wikipedia.org/wiki/Equivalent_potential_temperature#Formula)\n * \n * @param {number|undefined} temp Temperatur [K]\n * @param {number|undefined} dewpoint Taupunkts-Temperatur [K]\n * @param {number|undefined} pres Luftdruck [hPa]\n * @return {number|undefined} Äquivalent potentielle Temperatur [K]\n */\nexport function equiPotentialTempByTempAndDewpointAndPres(temp, dewpoint, pres) {\n  var potTemp = potentialTempByTempAndPres(temp, pres);\n  if (potTemp === undefined ||\n      dewpoint === undefined || isNaN(dewpoint) ||\n      temp === undefined || isNaN(temp) ||\n      pres === undefined || isNaN(pres))\n    return undefined;\n  return potTemp *\n    Math.exp(2481.9e-3 *\n             saturationHMRByTempAndPres(dewpoint, pres) /\n             lclTemperatureByTempAndDewpoint(temp, dewpoint));\n}\n\n/**\n * Berechnung des Sättigung-Dampfdrucks zu einer Temperatur\n * \n * @param {number|undefined} temp Temperatur [K]\n * @return {number|undefined} Sättigungs-Dampfdruck [hPa]\n */\nexport function saturationPressureByTemp(temp) {\n  if (temp === undefined || isNaN(temp))\n    return undefined;\n  var coef= new Array(6.1104546, 0.4442351, 1.4302099e-2, 2.6454708e-4, 3.0357098e-6, 2.0972268e-8, 6.0487594e-11,-1.469687e-13);\n  var inx=0;\n  // sat vap pressures every 5C from -50 to -200\n  var escold= new Array(\n    0.648554685769663908E-01, 0.378319512256073479E-01,\n    0.222444934288790197E-01, 0.131828928424683120E-01,\n    0.787402077141244848E-02, 0.473973049488473318E-02,\n    0.287512035504357928E-02, 0.175743037675810294E-02,\n    0.108241739518850975E-02, 0.671708939185605941E-03,\n    0.419964702632039404E-03, 0.264524363863469876E-03,\n    0.167847963736813220E-03, 0.107285397631620379E-03,\n    0.690742634496135612E-04, 0.447940489768084267E-04,\n    0.292570419563937303E-04, 0.192452912634994161E-04,\n    0.127491372410747951E-04, 0.850507010275505138E-05,\n    0.571340025334971129E-05, 0.386465029673876238E-05,\n    0.263210971965005286E-05, 0.180491072930570428E-05,\n    0.124607850555816049E-05, 0.866070571346870824E-06,\n    0.605982217668895538E-06, 0.426821197943242768E-06,\n    0.302616508514379476E-06, 0.215963854234913987E-06,\n    0.155128954578336869E-06);\n\n  temp = temp - 273.15;\n  var retval = 0;\n  //try {\n  if (temp > -50.) {\n    retval = ( coef[0] + temp*(coef[1] + temp*(coef[2] + temp*(coef[3] +\n    temp*(coef[4] + temp*(coef[5] + temp*(coef[6] + temp*coef[7])))))));\n\n  } else {\n    var tt = (-temp - 50.)/5.;\n    //var = (int) tt;\n    if (inx < escold.length-1) {\n      retval = escold[inx] + (tt % 1.)*(escold[inx+1]-escold[inx]);\n    } else {\n      retval = 1e-7;\n    }\n  }\n  // } catch (Exception e) {\n  //   GWT.log(\"caught exception: \"+e);\n  //  retval = 1e-7;\n  //}\n  return retval;\n}\n\n/**\n * Berechnung des Sättigungs-Mischungsverhältnisses aus Temperatur und Druck\n * \n * HMR = humidity mixing ratio\n * \n * @param {number|undefined} temp Temperatur [K]\n * @param {number|undefined} pres Luftdruck [hPa]\n * @return {number|undefined} Sättigungs-Mischungsverhältnis [g/kg]\n */\nexport function saturationHMRByTempAndPres(temp, pres) {\n  var e = saturationPressureByTemp(temp);\n  if (e === undefined ||\n      pres === undefined || isNaN(pres))\n    return undefined;\n  return 621.97*e/(pres - e);\n}\n\n/**\n * Lifting Condensation Level (LCL) eines Luftpakets mit entsprechender\n * potentieller Temperatur und Mischungsverhältnis.\n * \n * @param {number|undefined} potentialTemp Potentielle Temperatur [K]\n * @param {number|undefined} hmr Mischungsverhältnis [g/kg]\n * @return {undefined|number} LCL [hPa]\n */\nexport function lclByPotentialTempAndHMR(potentialTemp, hmr) {\n  if (hmr === undefined || isNaN(hmr))\n    return undefined;\n  // Binäre Suche\n  var a = 1013;\n  var b = 100;\n  while (a-b > 10) {\n    var p = b+(a-b)/2;\n    var hmrp = saturationHMRByTempAndPres(\n      tempByPotentialTempAndPres(potentialTemp, p),\n      p);\n    if (hmrp === undefined)\n      return undefined;\n    if (hmrp < hmr)\n      b = p;\n    else\n      a = p;\n  }\n  return b+(a-b)/2;\n}\n\n/**\n * Potentielle Temperatur zu einem Lifting Condensation Level (LCL) bei\n * gegebenem Mischungsverhältnis.\n * \n * @param {number|undefined} lcl LCL [hPa]\n * @param {number|undefined} hmr Mischungsverhältnis [g/kg]\n * @return {number|undefined} Potentielle Temperatur [K]\n */\nexport function potentialTempByLCLAndHMR(lcl, hmr) {\n  if (lcl === undefined || isNaN(lcl))\n    return undefined;\n  // Binäre Suche\n  var a = 323;\n  var b = 223;\n  while (a-b > 0.1) {\n    var Th = b+(a-b)/2;\n    var lclTh = lclByPotentialTempAndHMR(Th, hmr);\n    if (lclTh === undefined)\n      return undefined;\n    if (lclTh > lcl)\n      b = Th;\n    else\n      a = Th;\n  }\n  return b+(a-b)/2;\n}\n\n/**\n * Temperatur eines Luftpaktes, welches zum LCL angehoben wird.\n * \n * @param {number|undefined} temp Lufttemperatur [K]\n * @param {number|undefined} dewpoint Taupunktstemperatur [K]\n * @return {undefined|number} Temperatur [K]\n */\nexport function lclTemperatureByTempAndDewpoint(temp, dewpoint) {\n  if (temp === undefined || isNaN(temp) ||\n      dewpoint === undefined || isNaN(dewpoint))\n    return undefined;\n  return (dewpoint - (.001296*dewpoint - .15772)*(temp-dewpoint) );\n}\n\n/**\n * Umwandlung Temperatur von Celsius in Kelvin\n * \n * @param {number|undefined} temp [°C]\n * @return {undefined|number} [K]\n */\nexport function tempCelsiusToKelvin(temp) {\n  return (temp === undefined || isNaN(temp)) ? undefined : temp+273.15;\n}\n\n/**\n * Umwandlung Temperatur von Kelvin zu Celsius\n * \n * @param {number|undefined} temp [K]\n * @return {undefined|number} [°C]\n */\nexport function tempKelvinToCelsius(temp) {\n  return (temp === undefined || isNaN(temp)) ? undefined : temp-273.15;\n}\n\n/**\n * Umwandlung Windgeschwindigkeit von m/s in km/h\n * \n * @param {number|undefined} wind [m/s]\n * @return {undefined|number} [km/h]\n */\nexport function windspeedMSToKMH(wind) {\n  return (wind === undefined || isNaN(wind)) ? undefined : wind*3.6;\n}\n\n/**\n * Umwandlung Windgeschwindigkeit von km/h in m/s\n * \n * @param {number|undefined} wind [km/h]\n * @return {undefined|number} [m/s]\n */\nexport function windspeedKMHToMS(wind) {\n  return (wind === undefined || isNaN(wind)) ? undefined : wind/3.6;\n}\n\n/**\n * Umwandlung Windgeschwindigkeit von m/s in Knoten\n * \n * @param {number|undefined} wind [m/s]\n * @return {undefined|number} [kn]\n */\nexport function windspeedMSToKN(wind) {\n  return (wind === undefined || isNaN(wind)) ? undefined : wind*900/463;\n}\n\n/**\n * Umwandlung Windgeschwindigkeit von Knoten in m/s\n * \n * @param {number|undefined} wind [kn]\n * @return {undefined|number} [m/s]\n */\nexport function windspeedKNToMS(wind) {\n  return (wind === undefined || isNaN(wind)) ? undefined : wind*463/900;\n}\n\n/**\n * Umwandlung Windgeschwindigkeit von m/s in Beaufort\n * \n * @param {number|undefined} wind [m/s]\n * @return {undefined|number} [bf]\n */\nexport function windspeedMSToBF(wind) {\n  return (wind === undefined || isNaN(wind)) ?\n    undefined :\n    Math.min(12, Math.pow(wind/0.8360, 2/3));\n}\n\n/**\n * Umwandlung Windgeschwindigkeit von Beaufort in m/s\n * \n * @param {number|undefined} wind [bf]\n * @return {undefined|number} [m/s\n */\nexport function windspeedBFToMS(wind) {\n  return (wind === undefined || isNaN(wind)) ?\n    undefined :\n    0.8360 * Math.pow(wind, 3/2);\n}\n\n/**\n * Abschätzung der Schneefallgrenze aus Temperatur und Höhe des 850hPa-Levels\n * \n * Formel aus Weathercalc herauskopiert.\n * \n * @static\n * @public\n * @param {number|undefined} temp Temperatur auf 850 hPa [K]\n * @param {number|undefined} a Höhe des 850 hPa Levels [m ü.M.]\n * @return {number|undefined} Abgeschätzte Schneefallgrenze [m ü.M.]\n */\nexport function snowlineByTemp850hPaAndAltidude(temp, a) {\n  if (temp === undefined || isNaN(temp) ||\n      a === undefined || isNaN(a))\n    return undefined;\n  return 153.0 * tempKelvinToCelsius(temp) + 0.9985 * a - 304.26;\n}\n\n/**\n * Barometrische Höhenformel. Berechnung von Luftdruck in anderer Höhe.\n * \n * Formel aus Wiki-Artikel https://de.wikipedia.org/wiki/Barometrische_H%C3%B6henformel\n * \n * @static\n * @public\n * @param {number|undefined} p0 Druck auf dem Startlevel [hPa]\n * @param {number|undefined} h Höhe bis zum Ziellevel (positiv für höher über Meereslevel) [m]\n * @param {number|undefined} T0 Temperatur auf dem Startlevel [K]\n * @param {number|undefined} T1 Temperatur auf dem Ziellevel, wenn undefined\n *                              wird Isothermie angenommen [K]\n * @return {number|undefined} Luftdruck auf dem Ziellevel [hPa]\n */\nexport function pressureByBarometricFormula(p0, h, T0, T1) {\n  if (p0 === undefined || isNaN(p0) ||\n      h === undefined || isNaN(h) ||\n      T0 === undefined || isNaN(T0))\n    return undefined;\n  if (h == 0)\n    return p0;\n  var M = 0.02896;\n  var g = 9.807;\n  var R = 8.314;\n  if (T1 === undefined)\n    T1 = T0;\n  // Isotherme Atmosphäre\n  if (T0 == T1)\n    return p0 * Math.exp(-M*g/R/T0*h);\n  var a = (T0 - T1)/h;\n  return p0 * Math.exp(M*g/R/a*Math.log(1-a*h/T0));\n}\n\n/**\n * Dichte von feuchter Luft.\n * \n * Formel aus Wiki-Artikel https://en.wikipedia.org/wiki/Density_of_air\n * \n * @param {number|undefined} p Luftdruck [hPa]\n * @param {number|undefined} T Lufttemperatur [K]\n * @param {number|undefined} rh Luftfeuchtigkeit []\n * @return {number|undefined} Dichte [kg/m^3]\n */\nexport function densityHumidAirByPressureAndTempAndRelHumidity(p, T, rh) {\n  if (p === undefined || isNaN(p) ||\n      T === undefined || isNaN(T) ||\n      rh === undefined || isNaN(rh))\n    return undefined;\n  var Rd = 287.058; // J/(kg·K)\n  var Rv = 461.495; // J/(kg·K)\n  var pv = saturationPressureByTemp(T)*rh;\n  return (p - pv)*100/Rd/T + pv*100/Rv/T;\n}","/**\n * @module meteoJS/events\n */\n\n/**\n * Listen for a certain type of event\n * \n * @abstract\n * @param {string} listener - Event type.\n * @param {callback} callback - Listener function.\n * @param {mixed} [thisArg] - Objekt für this beim Ausführen von callback.\n * @returns {number} Listener function key.\n */\nfunction on(listener, callback, thisArg) {\n  if (!('listeners' in this) ||\n      this.listeners === undefined)\n    this.listeners = {};\n  if (!(listener in this.listeners))\n    this.listeners[listener] = {};\n  // Adapted from https://gist.github.com/gordonbrander/2230317\n  var result_key = Math.random().toString(36).substr(2, 9);\n  this.listeners[listener][result_key] = {\n    callback: callback,\n    thisArg:  thisArg\n  };\n  return result_key;\n}\n\n/**\n * Unlisten for a certain type of event\n * \n * @abstract\n * @param {string} listener - Event type.\n * @param {number} key - Listener function key.\n */\nfunction un(listener, key) {\n  if ('listeners' in this &&\n      this.listeners !== undefined &&\n      listener in this.listeners &&\n      key in this.listeners[listener])\n    delete this.listeners[listener][key];\n}\n\n/**\n * Listen once for a certain type of event\n * \n * @abstract\n * @param {string} listener - Event type.\n * @param {callback} callback - Listener function.\n * @param {mixed} [thisArg] - Objekt für this beim Ausführen von callback.\n */\nfunction once(listener, callback, thisArg) {\n  if (!('once_listeners' in this) ||\n      this.once_listeners === undefined)\n    this.once_listeners = {};\n  if (!(listener in this.once_listeners) ||\n      !('push' in this.once_listeners[listener]))\n    this.once_listeners[listener] = [];\n  this.once_listeners[listener].push({\n    callback: callback,\n    thisArg:  thisArg\n  });\n}\n\n/**\n * Gibt es Listener Funktionen für einen Event Type\n * \n * @abstract\n * @param {string} listener - Event type.\n * @returns {boolean}\n */\nfunction hasListener(listener) {\n  return ('listeners' in this &&\n          this.listeners !== undefined &&\n          listener in this.listeners &&\n          Object.keys(this.listeners[listener]).length) ||\n         ('once_listeners' in this &&\n          listener in this.once_listeners &&\n          Object.keys(this.once_listeners[listener]).length);\n}\n\n/**\n * Execute all listener functions für einen Event Type\n * \n * @abstract\n * @param {string} listener - Event type.\n */\nfunction trigger(listener) {\n  let args = Array.prototype.slice.call(arguments);\n  args.shift();\n  if ('listeners' in this &&\n      this.listeners !== undefined &&\n      listener in this.listeners &&\n      typeof this.listeners[listener] == 'object') {\n    Object.keys(this.listeners[listener]).forEach(key => {\n      this.listeners[listener][key].callback.apply(\n        this.listeners[listener][key].thisArg === undefined ?\n          this :\n          this.listeners[listener][key].thisArg,\n        args);\n    });\n  }\n  if ('once_listeners' in this &&\n      this.once_listeners !== undefined &&\n      listener in this.once_listeners &&\n      'forEach' in this.once_listeners[listener]) {\n    let once_listeners = this.once_listeners[listener];\n    this.once_listeners[listener] = [];\n    once_listeners.forEach(obj => {\n      obj.callback.apply(obj.thisArg === undefined ? this : obj.thisArg, args);\n    });\n  }\n}\n\n/**\n * Fügt einem Objekt alle Event-Funktionen hinzu.\n * \n * @param {object} obj\n */\nexport function addEventFunctions(obj) {\n  obj.on = on;\n  obj.un = un;\n  obj.once = once;\n  obj.hasListener = hasListener;\n  obj.trigger = trigger;\n}\nexport default addEventFunctions;","/**\n * @module meteoJS/repetitiveRequests\n */\nimport addEventFunctions from './Events.js';\n\n/**\n * Event fired before a request is executed.\n * \n * @event module:meteoJS/repetitiveRequests#before:request\n */\n\n/**\n * Event fired on a successful request.\n * \n * @event module:meteoJS/repetitiveRequests#success:request\n * @property {external:XMLHttpRequest} request - XMLHttpRequest of the successful request.\n */\n\n/**\n * Event fired if a request failed.\n * \n * @event module:meteoJS/repetitiveRequests#error:request\n * @property {external:XMLHttpRequest} request - XMLHttpRequest of the failed request.\n */\n\n/**\n * Options for constructor.\n * \n * @typedef {Object} module:meteoJS/repetitiveRequests~options\n * @property {undefined|string} [url=undefined] - URL to make repetitive\n *   requests to. If undefined, no request will be done.\n * @property {string} [user=''] - User to send with request.\n * @property {string} [password=''] - Password to send with request.\n * @property {boolean} [start=true] - Start repetetive requests on construction.\n * @property {undefined|string} [defaultTimeout=undefined]\n *   Default timeout until next request, if response has no Cache-Control\n *   HTTP-Header. In milliseconds. If undefined, a further request will only be\n *   done, if the reponse returned a valid Cache-Control header.\n * @property {undefined|string} [timeoutOnError=undefined]\n *   Timeout until next request after a error response. In milliseconds. If\n *   undefined, no further request will be done after an error.\n * @property {boolean} [pauseOnHiddenDocument=false] - Pause making repetitive\n *   requests when document is hidden.\n * @property {''|'arraybuffer'|'blob'|'document'|'json'|'text'} [responseType='']\n *   Specifies the content type of the response.\n *   See {@link https://developer.mozilla.org/de/docs/Web/API/XMLHttpRequest/responseType}.\n */\n\n/**\n * Makes requests again and again. Useful to stay up to date with\n *   the data available on the server. If the response returns a Cache-Control\n *   HTTP-Header, then the next request will be done per default after this\n *   time.\n * \n * @fires module:meteoJS/repetitiveRequests#before:request\n * @fires module:meteoJS/repetitiveRequests#success:request\n * @fires module:meteoJS/repetitiveRequests#error:request\n */\nexport class RepetitiveRequests {\n  \n  /**\n   * @param {module:meteoJS/repetitiveRequests~options} [options] - Options.\n   */\n  constructor({\n    url = undefined,\n    user = '',\n    password = '',\n    start = true,\n    defaultTimeout = undefined,\n    timeoutOnError = undefined,\n    pauseOnHiddenDocument = false,\n    responseType = ''\n  } = {}) {\n    \n    /**\n     * @type undefined|string\n     * @private\n     */\n    this._url = url;\n    \n    /**\n     * @type string\n     * @private\n     */\n    this._user = user;\n    \n    /**\n     * @type string\n     * @private\n     */\n    this._password = password;\n    \n    /**\n     * @type boolean\n     * @private\n     */\n    this._isStarted = start;\n    \n    /**\n     * @type undefined|integer\n     * @private\n     */\n    this._defaultTimeout = defaultTimeout;\n    \n    /**\n     * @type undefined|integer\n     * @private\n     */\n    this._timeoutOnError = timeoutOnError;\n    \n    /**\n     * @type boolean\n     * @private\n     */\n    this._pauseOnHiddenDocument = pauseOnHiddenDocument;\n    this._initPauseOnHiddenDocument();\n\n    /**\n     * @type boolean\n     * @private\n     */\n    this._isSuppressedByHiddenDocument = false;\n    \n    /**\n     * @type string\n     * @private\n     */\n    this._responseType = responseType;\n    \n    /**\n     * @type mixed\n     * @private\n     */\n    this._timeoutID = undefined;\n    \n    /**\n     * @type boolean\n     * @private\n     */\n    this._loading = false;\n    \n    if (this._isStarted)\n      this.start();\n  }\n  \n  /**\n   * Current URL to make requests to.\n   * \n   * @type undefined|string\n   */\n  get url() {\n    return this._url;\n  }\n  set url(url) {\n    this._url = url;\n  }\n  \n  /**\n   * User to send with request.\n   * \n   * @type string\n   */\n  get user() {\n    return this._user;\n  }\n  set user(user) {\n    this._user = user;\n  }\n  \n  /**\n   * Password to send with request.\n   * \n   * @type string\n   */\n  get password() {\n    return this._password;\n  }\n  set password(password) {\n    this._password = password;\n  }\n  \n  /**\n   * Content type of the response.\n   * \n   * @type string\n   */\n  get responseType() {\n    return this._responseType;\n  }\n  set responseType(responseType) {\n    this._responseType = responseType;\n  }\n  \n  /**\n   * Start repetitive requests. Makes immediatly the first request.\n   */\n  start() {\n    this._isStarted = true;\n    this._startRequest();\n  }\n  \n  /**\n   * Stops repetitive requests. Events aren't triggered anymore. Even if a\n   * former request creates a response.\n   */\n  stop() {\n    this._isStarted = false;\n    if (this._timeoutID !== undefined) {\n      clearTimeout(this._timeoutID);\n      this._timeoutID = undefined;\n    }\n  }\n  \n  /**\n   * Executes next request after the passed delay. If already another request\n   * is planned, nothing is done.\n   * \n   * @private\n   * @param {integer} delay - Delay in milliseconds.\n   */\n  _planRequest({\n    delay\n  }) {\n    if (this._timeoutID !== undefined)\n      return;\n    \n    this._timeoutID = setTimeout(() => {\n      if (this._pauseOnHiddenDocument\n        && ('hidden' in document)\n        && document.hidden) {\n        this._isSuppressedByHiddenDocument = true;\n        return;\n      }\n\n      this._startRequest();\n    }, delay);\n  }\n  \n  /**\n   * Makes a new request and triggeres events.\n   * \n   * @private\n   */\n  _startRequest() {\n    if (this._timeoutID !== undefined) {\n      clearTimeout(this._timeoutID);\n      this._timeoutID = undefined;\n    }\n    \n    this._makeRequest()\n      .then(({ request }) => {\n        if (!this._isStarted)\n          return;\n      \n        let delay = this._defaultTimeout;\n      \n        // Read ResponseHeader\n        let cacheControl = request.getResponseHeader('Cache-Control');\n        if (cacheControl !== null) {\n          let maxAges = /(^|,\\s*)max-age=([0-9]+)($|\\s*,)/.exec(cacheControl);\n          if (maxAges !== null &&\n            maxAges[2] > 0)\n            delay = Math.round(maxAges[2]*1000);\n        }\n      \n        this.trigger('success:request', { request });\n      \n        if (delay !== undefined)\n          this._planRequest({ delay });\n      }, ({ request } = {}) => {\n        if (!this._isStarted)\n          return;\n      \n        if (request === undefined)\n          return;\n      \n        this.trigger('error:request', { request });\n      \n        if (this._timeoutOnError !== undefined)\n          this._planRequest({ delay: this._timeoutOnError });\n      }, ({ request = undefined }) => {\n        /* Promise() returned by _makeRequest() also rejects, when URL isn't\n         * defined or is actually loading. In these cases don't throw an\n         * error event. */\n        if (request !== undefined)\n          this.trigger('error:request', { request })\n      });\n  }\n  \n  /**\n   * Makes a new request immediatly, except another request is already loading.\n   * \n   * @private\n   * @returns {Promise}\n   */\n  async _makeRequest() {\n    this.trigger('before:request');\n    return new Promise((resolve, reject) => {\n      if (this._url === undefined) {\n        reject();\n        return;\n      }\n      \n      if (this._loading) {\n        reject();\n        return;\n      }\n      this._loading = true;\n      \n      let request = new XMLHttpRequest();\n      if (this.responseType !== undefined)\n        request.responseType = this.responseType;\n      request.addEventListener('load', () => {\n        this._loading = false;\n        \n        if (request.status == 200)\n          resolve({ request });\n        else\n          reject({ request });\n      });\n      request.addEventListener('error', () => {\n        this._loading = false;\n        reject({ request });\n      });\n      \n      request.open('GET', this._url, true, this._user, this._password);\n      request.send();\n    });\n  }\n  \n  /**\n   * @private\n   */\n  _initPauseOnHiddenDocument() {\n    if (!this._pauseOnHiddenDocument)\n      return;\n    \n    document.addEventListener('visibilitychange', () => {\n      if (('hidden' in document)\n        && !document.hidden\n        && this._isSuppressedByHiddenDocument\n        && this._isStarted) {\n        this._isSuppressedByHiddenDocument = false;\n        this.start();\n      }\n    });\n  }\n}\naddEventFunctions(RepetitiveRequests.prototype);\nexport default RepetitiveRequests;\n","/**\n * @module meteoJS/timeline\n */\nimport addEventFunctions from './Events.js';\n\n/**\n * Special key identifier.\n * \n * @typedef {\"ctrl\"|\"alt\"|\"shift\"|\"meta\"|Number}\n *   module:meteoJS/timeline~specialKeyIdentifier\n */\n\n/**\n * Definition of pressed keys with optional special keys.\n * \n * @typedef {module:meteoJS/timeline~specialKeyIdentifier|\n             module:meteoJS/timeline~specialKeyIdentifier[]}\n *   module:meteoJS/timeline~optionPressedKeys\n */\n\n/**\n * Keyboard navigation options.\n * \n * @typedef {Object} module:meteoJS/timeline~optionKeyboardNavigation\n * @param {boolean} [enabled=false] - Enable Keyboard Navigation.\n * @param {module:meteoJS/timeline~optionPressedKeys} [first=36]\n *   Keyboard event to execute\n *   {@link module:meteoJS/timeline.Timeline#first|first()}.\n *   Default: Home.\n * @param {module:meteoJS/timeline~optionPressedKeys} [last=35]\n *   Keyboard event to execute\n *   {@link module:meteoJS/timeline.Timeline#last|last()}.\n *   Default: End.\n * @param {module:meteoJS/timeline~optionPressedKeys} [prev=37]\n *   Keyboard event to execute\n *   {@link module:meteoJS/timeline.Timeline#prev|prev()}.\n *   Default: Arrow left.\n * @param {module:meteoJS/timeline~optionPressedKeys} [next=39]\n *   Keyboard event to execute\n *   {@link module:meteoJS/timeline.Timeline#next|next()}.\n *   Default: Arrow right.\n * @param {module:meteoJS/timeline~optionPressedKeys} [prevAllEnabledTime=[37, 'ctrl']]\n *   Keyboard event to execute\n *   {@link module:meteoJS/timeline.Timeline#prevAllEnabledTime|prevAllEnabledTime()}.\n *   Default: Arrow left + Ctrl.\n * @param {module:meteoJS/timeline~optionPressedKeys} [nextAllEnabledTime=[39, 'ctrl']]\n *   Keyboard event to execute\n *   {@link module:meteoJS/timeline.Timeline#nextAllEnabledTime|nextAllEnabledTime()}.\n *   Default: Arrow right + Ctrl.\n * @param {Object.<string,module:meteoJS/timeline~optionPressedKeys>} [add]\n *   Keyboard event to execute {@link module:meteoJS/timeline.Timeline#add|add()}.\n *   The keys are combined with an amount integer and a timeKey\n *   (definition analog to the add() function).\n *   Defaults: ArrowRight plus 3h:Ctrl+Shift, 6h:Shift, 12h:Alt+Shift, 24h:Alt\n * @param {Object.<string,module:meteoJS/timeline~optionPressedKeys>} [sub]\n *   Keyboard event to execute {@link module:meteoJS/timeline.Timeline#sub|sub()}.\n *   The keys are combined with an amount integer and a timeKey\n *   (definition analog to the add() function).\n *   Defaults: ArrowLeft plus 3h:Ctrl+Shift, 6h:Shift, 12h:Alt+Shift, 24h:Alt\n */\n\n/**\n * Options for timeline constructor.\n * \n * @typedef {Object} module:meteoJS/timeline~options\n * @param {number|undefined} [maxTimeGap]\n *   Maximum of time period (in seconds) between two timestamps. If this option\n *   is specified, than e.g. the method getTimes() could return more timestamps\n *   than defined by setTimesBySetID.\n * @param {module:meteoJS/timeline~optionKeyboardNavigation}\n *   [keyboardNavigation] - Keyboard navigation options.\n */\n\n/**\n * @event module:meteoJS/timeline#change:time\n * @property {Date} oldDate - Time before change.\n */\n\n/**\n * @event module:meteoJS/timeline#change:times\n */\n\n/**\n * @event module:meteoJS/timeline#change:enabledTimes\n */\n\n/**\n * @classdesc\n * Class represents a timeline.\n * On this timeline, you could define different set of times. This is useful for\n * the usecase 1: You have different data types for different times (like radar\n * and satellite pictures). Then, the timeline provides a list of all available\n * times. Each time in each set of times could be enabled or disabled. This\n * yields to the usecase 2: In a viewer of model charts, you probably want to\n * show all the times with charts. (Global models normally have a time interval\n * of 3 hours between charts) But for different parameters, you only provide\n * charts at a greater interval. E.g. you calculate 24h-precipiation sums only\n * for 00 UTC. So you can set the times of the 3-hour-interval and only set\n * the 00 UTC timestamps as enabled. To visualise the timeline use some\n * child class of the\n * {@link module:meteoJS/timeline/visualisation.Visualisation} class. To animate\n * through time steps use the {@link module:meteoJS/timeline/animation.Animation}\n * class.\n * \n * <pre><code>import Timeline from 'meteojs/Timeline';</code></pre>\n */\nexport class Timeline {\n  \n  /**\n   * @param {module:meteoJS/timeline~options} [options] - Options.\n   */\n  constructor({ maxTimeGap = undefined,\n    keyboardNavigation = {} } = {}) {\n    /**\n     * @type undefined|number\n     * @private\n     */\n    this.maxTimeGap = maxTimeGap;\n  \n    /**\n     * Date object with current selected time. Maybe invalid.\n     * @member {Date}\n     * @private\n     */\n    this.selectedTime = new Date('invalid');\n  \n    /**\n     * Times of this timeline. Sorted upwardly.\n     * @member {Date[]}\n     * @private\n     */\n    this.times = [];\n  \n    /**\n     * Times of this timeline, that are enabled at least in one set of times.\n     * Sorted upwardly.\n     * @member {Date[]}\n     * @private\n     */\n    this.enabledTimes = [];\n  \n    /**\n     * Times of this timeline, that are enabled through all set of times.\n     * Sorted upwardly.\n     * @member {Date[]}\n     * @private\n     */\n    this.allEnabledTimes = [];\n  \n    /**\n     * Objekt mit keys und Date-Arrays (zeitlich sortiert)\n     * @type Object.<mixed,Object>\n     * @private\n     */\n    this.timesByKey = {};\n    \n    /**\n     * @type {module:meteoJS/timeline~keyboardNavigationOptions}\n     * @private\n     */\n    this._keyboardNavigation = {};\n    this._initKeyboardNavigation(keyboardNavigation);\n  }\n  \n  /**\n   * Current selected time.\n   * \n   * @returns {Date} Selected time, could be invalid.\n   */\n  getSelectedTime() {\n    return this.selectedTime;\n  }\n  \n  /**\n   * Sets current selected time. You can select a time returned by getTimes only.\n   * If this is not the case, an invalid timestamp will be set.\n   * \n   * @param {Date} time - Time to select.\n   * @returns {module:meteoJS/timeline.Timeline} Returns this.\n   * @fires module:meteoJS/timeline#change:time\n   */\n  setSelectedTime(time) {\n    this._setSelectedTime(\n      (_indexOfTimeInTimesArray(time, this.times) > -1) ?\n        time : new Date('invalid'));\n    return this;\n  }\n  \n  /**\n   * Returns a list of all timestamps represented by this timeline.\n   * This includes on the one hand all timestamps defined by setTimesBySetID, on\n   * the other hand there could exists additional timestamps (e.g. through the\n   * maxTimeGap option).\n   * \n   * @returns {Date[]} All defined times, sorted upwardly.\n   */\n  getTimes() {\n    return this.times;\n  }\n  \n  /**\n   * Returns a list of all enabled timestamps of this timeline.\n   * \n   * @returns {Date[]} All enabled times, sorted upwardly.\n   */\n  getEnabledTimes() {\n    return this.enabledTimes;\n  }\n  \n  /**\n   * Returns a list of times. These times are enabled throug every set of times.\n   * \n   * @returns {Date[]} Enabled times, sorted upwardly.\n   */\n  getAllEnabledTimes() {\n    return this.allEnabledTimes;\n  }\n  \n  /**\n   * Defines a set of times. Set is identified by an ID.\n   * If the set was already defined, the set of times will be overwritten.\n   * \n   * @param {mixed} id - ID of the set of times.\n   * @param {Date[]} times - Times (must be sorted upwardly).\n   * @returns {module:meteoJS/timeline.Timeline} Returns this.\n   * @fires module:meteoJS/timeline#change:times\n   * @fires module:meteoJS/timeline#change:enabledTimes\n   */\n  setTimesBySetID(id, times) {\n    this.timesByKey[id] = {\n      times: times,\n      enabled: times\n    };\n    this._updateTimes();\n    this._updateEnabledTimes();\n    return this;\n  }\n  \n  /**\n   * Defines the enbaled times of a set of times. The passed times must be\n   * contained in the times of the set (defined earlier by setTimesBySetID).\n   * \n   * @param {mixed} id - ID of the set of times.\n   * @param {Date[]} times - Times to set enabled (must be sorted upwardly).\n   * @returns {module:meteoJS/timeline.Timeline} Returns this.\n   * @fires module:meteoJS/timeline#change:enabledTimes\n   */\n  setEnabledTimesBySetID(id, times) {\n    if (id in this.timesByKey) {\n      this.timesByKey[id].enabled = times;\n      this._updateEnabledTimes();\n    }\n    return this;\n  }\n  \n  /**\n   * Returns IDs of all defined sets.\n   * \n   * @return {mixed[]} IDs.\n   */\n  getSetIDs() {\n    return Object.keys(this.timesByKey);\n  }\n  \n  /**\n   * Deletes a set of times.\n   * \n   * @param {mixed} id - ID of the set of times.\n   * @returns {module:meteoJS/timeline.Timeline} Returns this.\n   * @fires module:meteoJS/timeline#change:times\n   * @fires module:meteoJS/timeline#change:enabledTimes\n   */\n  deleteSetID(id) {\n    if (id in this.timesByKey) {\n      delete this.timesByKey[id];\n      this._updateTimes();\n      this._updateEnabledTimes();\n    }\n    return this;\n  }\n  \n  /**\n   * Set selected time to the first time, which is enabled.\n   * \n   * @returns {module:meteoJS/timeline.Timeline} Returns this.\n   */\n  first() {\n    this._setSelectedTime(this.getFirstEnabledTime());\n    return this;\n  }\n  \n  /**\n   * Set selected time to the last time, which is enabled.\n   * \n   * @returns {module:meteoJS/timeline.Timeline} Returns this.\n   */\n  last() {\n    this._setSelectedTime(this.getLastEnabledTime());\n    return this;\n  }\n  \n  /**\n   * Changes selected time to the next enabled time.\n   * \n   * @returns {module:meteoJS/timeline.Timeline} Returns this.\n   */\n  next() {\n    this._setSelectedTime(this.getNextEnabledTime());\n    return this;\n  }\n  \n  /**\n   * Changes selected time to the previous enabled time.\n   * \n   * @returns {module:meteoJS/timeline.Timeline} Returns this.\n   */\n  prev() {\n    this._setSelectedTime(this.getPrevEnabledTime());\n    return this;\n  }\n  \n  /**\n   * Changes selected time to the next time, which is enabled by all sets.\n   * \n   * @returns {module:meteoJS/timeline.Timeline} Returns this.\n   */\n  nextAllEnabledTime() {\n    this._setSelectedTime(this.getNextAllEnabledTime());\n    return this;\n  }\n  \n  /**\n   * Changes selected time to the previous time, which is enabled by all sets.\n   * \n   * @returns {module:meteoJS/timeline.Timeline} Returns this.\n   */\n  prevAllEnabledTime() {\n    this._setSelectedTime(this.getPrevAllEnabledTime());\n    return this;\n  }\n  \n  /**\n   * Changes the selected time width adding an amount of \"time\".\n   * If the \"new\" timestamp is not available, the selected time is not changed.\n   * \n   * @param {number} amount - \"Time\"-Amount.\n   * @param {'years'|'y'|'months'|'M'|'days'|'d'|'hours'|'h'|'minutes'|'m'|'seconds'|'s'|'milliseconds'|'ms'}\n   *   timeKey - Period, nomenclature analogue to momentjs.\n   * @returns {module:meteoJS/timeline.Timeline} - Returns this.\n   */\n  add(amount, timeKey) {\n    let d = this.getSelectedTime();\n    let delta = 0;\n    switch (timeKey) {\n    case 'hours':\n    case 'h':\n      delta = amount * 3600 * 1000;\n      break;\n    case 'minutes':\n    case 'm':\n      delta = amount * 60 * 1000;\n      break;\n    case 'seconds':\n    case 's':\n      delta = amount * 1000;\n      break;\n    case 'milliseconds':\n    case 'ms':\n      delta = amount;\n      break;\n    }\n    if (delta != 0)\n      d = new Date(d.valueOf() + delta);\n    \n    switch (timeKey) {\n    case 'years':\n    case 'y':\n      d.setUTCFullYear(d.getUTCFullYear() + amount);\n      break;\n    case 'months':\n    case 'M':\n      d.setUTCMonth(d.getUTCMonth() + amount);\n      break;\n    case 'days':\n    case 'd':\n      d.setUTCDate(d.getUTCDate() + amount);\n      break;\n    }\n    \n    if (_indexOfTimeInTimesArray(d, this.times) > -1)\n      this._setSelectedTime(d);\n    return this;\n  }\n  \n  /**\n   * Changes the selected time width subracting an amount of \"time\".\n   * If the \"new\" timestamp is not available, the selected time is not changed.\n   * \n   * @param {number} amount - \"Time\"-Amount.\n   * @param {'years'|'y'|'months'|'M'|'days'|'d'|'hours'|'h'|'minutes'|'m'|'seconds'|'s'|'milliseconds'|'ms'}\n   *   timeKey - Period, nomenclature analogue to momentjs.\n   * @returns {module:meteoJS/timeline.Timeline} - Returns this.\n   */\n  sub(amount, timeKey) {\n    let d = this.getSelectedTime();\n    let delta = 0;\n    switch (timeKey) {\n    case 'hours':\n    case 'h':\n      delta = amount * 3600 * 1000;\n      break;\n    case 'minutes':\n    case 'm':\n      delta = amount * 60 * 1000;\n      break;\n    case 'seconds':\n    case 's':\n      delta = amount * 1000;\n      break;\n    case 'milliseconds':\n    case 'ms':\n      delta = amount;\n      break;\n    }\n    if (delta != 0)\n      d = new Date(d.valueOf() - delta);\n    \n    switch (timeKey) {\n    case 'years':\n    case 'y':\n      d.setUTCFullYear(d.getUTCFullYear() - amount);\n      break;\n    case 'months':\n    case 'M':\n      d.setUTCMonth(d.getUTCMonth() - amount);\n      break;\n    case 'days':\n    case 'd':\n      d.setUTCDate(d.getUTCDate() - amount);\n      break;\n    }\n    \n    if (_indexOfTimeInTimesArray(d, this.times) > -1)\n      this._setSelectedTime(d);\n    return this;\n  }\n  \n  /**\n   * Returns first time in this timeline, which is enabled by at least one set.\n   * \n   * @returns {Date} First enabled time, could be invalid.\n   */\n  getFirstEnabledTime() {\n    return (this.enabledTimes.length > 0) ?\n      this.enabledTimes[0] : new Date('invalid');\n  }\n  \n  /**\n   * Returns last time in this timeline, which is enabled by at least one set.\n   * \n   * @returns {Date} Last enabled time, could be invalid.\n   */\n  getLastEnabledTime() {\n    return (this.enabledTimes.length > 0) ?\n      this.enabledTimes[this.enabledTimes.length-1] : new Date('invalid');\n  }\n  \n  /**\n   * Returns next time after the selected time, which is enabled by at least\n   * one set. If selected time is invalid, the first enabled time is returned.\n   * \n   * @returns {Date} Next enabled time.\n   */\n  getNextEnabledTime() {\n    if (this.enabledTimes.length < 1)\n      return new Date('invalid');\n    var index = _indexOfTimeInTimesArray(this.getSelectedTime(), this.enabledTimes);\n    if (index > -1) {\n      index++;\n      return (index < this.enabledTimes.length) ?\n        this.enabledTimes[index] :\n        this.enabledTimes[this.enabledTimes.length-1];\n    }\n    else if (isNaN(this.getSelectedTime()))\n      return this.enabledTimes[0];\n    else {\n      // Es war kein Zeitpunkt aus enabledTimes\n      var result = new Date('invalid');\n      for (var i=0; i<this.enabledTimes.length; i++)\n        if (this.getSelectedTime().valueOf() < this.enabledTimes[i].valueOf()) {\n          result = this.enabledTimes[i];\n          break;\n        }\n      return result;\n    }\n  }\n  \n  /**\n   * Returns previous time before the selected time, which is enabled by at least\n   * one set. If selected time is invalid, the last enabled time is returned.\n   * \n   * @returns {Date} Previous enabled time.\n   */\n  getPrevEnabledTime() {\n    if (this.enabledTimes.length < 1)\n      return new Date('invalid');\n    var index = _indexOfTimeInTimesArray(this.getSelectedTime(), this.enabledTimes);\n    if (index > -1) {\n      index--;\n      return (-1 < index) ? this.enabledTimes[index] : this.enabledTimes[0];\n    }\n    else if (isNaN(this.getSelectedTime()))\n      return this.enabledTimes[0];\n    else {\n      // Es war kein Zeitpunkt aus enabledTimes\n      var result = new Date('invalid');\n      for (var i=this.enabledTimes.length-1; i>=0; i--)\n        if (this.getSelectedTime().valueOf() > this.enabledTimes[i].valueOf()) {\n          result = this.enabledTimes[i];\n          break;\n        }\n      return result;\n    }\n  }\n  \n  /**\n   * Returns first time in this timeline, which is enabled by at all sets.\n   * \n   * @returns {Date} First time, which is enabled by all sets.\n   */\n  getFirstAllEnabledTime() {\n    return (this.allEnabledTimes.length > 0) ?\n      this.allEnabledTimes[0] : new Date('invalid');\n  }\n  \n  /**\n   * Returns last time in this timeline, which is enabled by at all sets.\n   * \n   * @returns {Date} Last time, which is enabled by all sets.\n   */\n  getLastAllEnabledTime() {\n    return (this.allEnabledTimes.length > 0) ?\n      this.allEnabledTimes[this.allEnabledTimes.length-1] : new Date('invalid');\n  }\n  \n  /**\n   * Returns next time after the selected time, which is enabled by\n   * all sets. If selected time is invalid, the last all enabled time is returned.\n   * \n   * @returns {Date} Next time, which is enabled by all sets.\n   */\n  getNextAllEnabledTime() {\n    if (this.allEnabledTimes.length < 1)\n      return new Date('invalid');\n    var index = _indexOfTimeInTimesArray(this.getSelectedTime(), this.allEnabledTimes);\n    if (index > -1) {\n      index++;\n      return (index < this.allEnabledTimes.length) ?\n        this.allEnabledTimes[index] :\n        this.allEnabledTimes[this.allEnabledTimes.length-1];\n    }\n    else if (isNaN(this.getSelectedTime()))\n      return this.allEnabledTimes[0];\n    else {\n      // Es war kein Zeitpunkt aus allEnabledTimes\n      var result = new Date('invalid');\n      for (var i=0; i<this.allEnabledTimes.length; i++)\n        if (this.getSelectedTime().valueOf() < this.allEnabledTimes[i].valueOf()) {\n          result = this.allEnabledTimes[i];\n          break;\n        }\n      return result;\n    }\n  }\n  \n  /**\n   * Returns previous time before the selected time, which is enabled by\n   * all sets. If selected time is invalid, the first all enabled time is returned.\n   * \n   * @returns {Date} Previous time, which is enabled by all sets.\n   */\n  getPrevAllEnabledTime() {\n    if (this.allEnabledTimes.length < 1)\n      return new Date('invalid');\n    var index = _indexOfTimeInTimesArray(this.getSelectedTime(), this.allEnabledTimes);\n    if (index > -1) {\n      index--;\n      return (-1 < index) ? this.allEnabledTimes[index] : this.allEnabledTimes[0];\n    }\n    else if (isNaN(this.getSelectedTime()))\n      return this.allEnabledTimes[0];\n    else {\n      // Es war kein Zeitpunkt aus allEnabledTimes\n      var result = new Date('invalid');\n      for (var i=this.allEnabledTimes.length-1; i>=0; i--)\n        if (this.getSelectedTime().valueOf() > this.allEnabledTimes[i].valueOf()) {\n          result = this.allEnabledTimes[i];\n          break;\n        }\n      return result;\n    }\n  }\n  \n  /**\n   * Returns if the passed time is an enabled time.\n   * \n   * @returns {boolean}\n   */\n  isTimeEnabled(time) {\n    return this.enabledTimes.reduce(function (acc, t) {\n      return (t.valueOf() == time.valueOf()) ? true : acc;\n    }, false);\n  }\n  \n  /**\n   * Returns if the passed time is an enabled time.\n   * \n   * @returns {boolean}\n   */\n  isTimeAllEnabled(time) {\n    return this.allEnabledTimes.reduce(function (acc, t) {\n      return (t.valueOf() == time.valueOf()) ? true : acc;\n    }, false);\n  }\n  \n  /**\n   * Is the selected time the first enabled time.\n   * \n   * @returns {boolean}\n   */\n  isFirstEnabledTime() {\n    return this.getFirstEnabledTime().valueOf() == this.getSelectedTime().valueOf();\n  }\n  \n  /**\n   * Is the selected time the last enabled time.\n   * \n   * @returns {boolean}\n   */\n  isLastEnabledTime() {\n    return this.getLastEnabledTime().valueOf() == this.getSelectedTime().valueOf();\n  }\n  \n  /**\n   * Internal setter of the selected time. Caller must guarantee, that either\n   * the passed timestamp exists in this.times or is invalid.\n   * @param {Date} selectedTime - Selected time.\n   * @fires module:meteoJS/timeline#change:time\n   * @private\n   */\n  _setSelectedTime(selectedTime) {\n    var oldTime = this.selectedTime;\n    this.selectedTime = selectedTime;\n    this.trigger('change:time', oldTime);\n    return this.selectedTime;\n  }\n  \n  /**\n   * Bringt den Inhalt des Arrays this.times in\n   * Übereinstimmung mit dem Inhalt von this.timesByKey\n   * @private\n   * @fires module:meteoJS/timeline#change:times\n   */\n  _updateTimes() {\n    this.times = [];\n    var timesArr = [];\n    var times = {};\n    for (var key in this.timesByKey)\n      this.timesByKey[key].times.forEach(function (t) {\n        if (!(t.valueOf() in times)) {\n          timesArr.push(t);\n          times[t.valueOf()] = t;\n        }\n      });\n    _sortTimesArray(timesArr);\n    timesArr.forEach(function (time) {\n      if (this.times.length < 1) {\n        this.times.push(time);\n        return;\n      }\n      var lastTime = this.times[this.times.length-1];\n      if (this.maxTimeGap !== undefined &&\n          (time.valueOf()-lastTime.valueOf()) > 1000*this.maxTimeGap) {\n        var t = lastTime;\n        do {\n          t = new Date(t.getTime() + this.maxTimeGap*1000);\n          this.times.push(t);\n        } while ((time.valueOf()-t.valueOf()) > 1000*this.maxTimeGap);\n      }\n      this.times.push(time);\n    }, this);\n    _sortTimesArray(this.times);\n    this.trigger('change:times');\n  }\n  \n  /**\n   * Bringt den Inhalt der Arrays this.enabledTimes und this.allEnabledTimes in\n   * Übereinstimmung mit dem Inhalt von this.timesByKey\n   * @private\n   * @fires module:meteoJS/timeline#change:enabledTimes\n   */\n  _updateEnabledTimes() {\n    this.enabledTimes = [];\n    this.allEnabledTimes = [];\n    var enabledTimes = {};\n    var allEnabledTimes = {};\n    for (var key in this.timesByKey) {\n      this.timesByKey[key].enabled.forEach(function (t) {\n        if (!(t.valueOf() in enabledTimes)) {\n          this.enabledTimes.push(t);\n          enabledTimes[t.valueOf()] = t;\n        }\n        if (!(t.valueOf() in allEnabledTimes))\n          allEnabledTimes[t.valueOf()] = 1;\n        else\n          allEnabledTimes[t.valueOf()]++;\n      }, this);\n    }\n    _sortTimesArray(this.enabledTimes);\n    for (var value in allEnabledTimes)\n      if (allEnabledTimes[value] == Object.keys(this.timesByKey).length)\n        this.allEnabledTimes.push(enabledTimes[value]);\n    _sortTimesArray(this.allEnabledTimes);\n    this.trigger('change:enabledTimes');\n  }\n  \n  /**\n   * Intialize property \"_keyboardNavigation\".\n   * \n   * @param {module:meteoJS/timeline~optionKeyboardNavigation}\n   *   [keyboardNavigation] - Keyboard navigation options.\n   * @private\n   */\n  _initKeyboardNavigation({\n    enabled = false,\n    first = 36,\n    last = 35,\n    prev = 37,\n    next = 39,\n    prevAllEnabledTime = [37, 'ctrl'],\n    nextAllEnabledTime = [39, 'ctrl'],\n    add = undefined,\n    sub = undefined\n  } = {}) {\n    if (add === undefined)\n      add = {\n        '3h': [39, 'ctrl', 'shift'],\n        '6h': [39, 'shift'],\n        '12h': [39, 'alt', 'shift'],\n        '24h': [39, 'alt']\n      };\n    if (sub === undefined)\n      sub = {\n        '3h': [37, 'ctrl', 'shift'],\n        '6h': [37, 'shift'],\n        '12h': [37, 'alt', 'shift'],\n        '24h': [37, 'alt']\n      };\n    this._keyboardNavigation = {\n      enabled,\n      first,\n      last,\n      prev,\n      next,\n      prevAllEnabledTime,\n      nextAllEnabledTime,\n      add,\n      sub\n    };\n    if (document && this._keyboardNavigation.enabled)\n      document.addEventListener('keydown', event => {\n        Object.keys(this._keyboardNavigation).forEach(method => {\n          if (method == 'enabled')\n            return;\n          if (/^(add|sub)$/.test(method)) {\n            Object.keys(this._keyboardNavigation[method]).forEach(time => {\n              const matches = time.match(/^([0-9]+)\\s*([a-zA-Z]+)$/);\n              if (matches === null)\n                return;\n              if (_isEventMatchPressedKeys(event, this._keyboardNavigation[method][time])) {\n                this[method](+matches[1], matches[2]);\n                event.preventDefault();\n                event.stopPropagation();\n              }\n            });\n          }\n          else if (method in this\n            && _isEventMatchPressedKeys(event, this._keyboardNavigation[method])) {\n            this[method]();\n            event.preventDefault();\n            event.stopPropagation();\n          }\n        });\n      });\n  }\n}\naddEventFunctions(Timeline.prototype);\nexport default Timeline;\n\n/**\n * Gibt den Index eines Zeitpunktes in einem Array aus Zeitpunkten zurück.\n * @param {Date} time Zeitpunkt\n * @param {Date[]} times Array aus Zeitpunkten\n * @returns {number} -1 für \"nicht gefunden\n * @static\n * @private\n */\nexport let _indexOfTimeInTimesArray = (time, times) => {\n  return times.findIndex(function (t) {\n    return t.valueOf() == time.valueOf();\n  });\n};\n\n/**\n * Sortiert einen Array aus Zeitpunkten zeitlich aufwärts\n * @param {Date[]} times Array aus Zeitpunkten\n * @static\n * @private\n */\nfunction _sortTimesArray(times) {\n  times.sort(function (a,b) { return a.valueOf()-b.valueOf(); });\n}\n\n/**\n * Returns if an event represents a certain key pressed with (optional)\n * additional special keys.\n * \n * @param {KeyboardEvent} keyboardEvent - Keyboard event.\n * @param {module:meteoJS/timeline~optionPressedKeys} pressedKeys\n *   Checks if this keys are pressed.\n * @private\n */\nexport function _isEventMatchPressedKeys(keyboardEvent, pressedKeys) {\n  if (typeof pressedKeys != 'object' ||\n      !('forEach' in pressedKeys))\n    pressedKeys = [pressedKeys];\n  if (pressedKeys.length == 0)\n    return false;\n  let result =\n    [['ctrl', 'ctrlKey'],\n      ['alt', 'altKey'],\n      ['shift', 'shiftKey'],\n      ['meta', 'metaKey']]\n      .reduce((acc, cur) => acc && (((pressedKeys.indexOf(cur[0]) > -1))\n        ? keyboardEvent[cur[1]]\n        : !keyboardEvent[cur[1]]),\n      true);\n  pressedKeys.forEach(o => {\n    switch (o) {\n    case 'ctrl':\n    case 'alt':\n    case 'shift':\n    case 'meta':  break;\n    default:      if (o != keyboardEvent.keyCode) result = false;\n    }\n  });\n  return result;\n}","const __WEBPACK_NAMESPACE_OBJECT__ = jQuery;","/**\n * @module meteoJS/timeline/animation\n */\nimport $ from 'jquery';\nimport addEventFunctions from '../Events.js';\nimport Timeline from '../Timeline.js';\n\n/**\n * Options for animation constructor.\n * \n * @typedef {Object} module:meteoJS/timeline/animation~options\n * @param {module:meteoJS/timeline.Timeline} timeline - Timeline to animate.\n * @param {number} [restartPause=1.8]\n *   Time in seconds to pause before the animation restart.\n * @param {number} [imagePeriod=0.2]\n *   Time in seconds between animation of two images.\n *   Ignored, if imageFrequency is specified.\n * @param {number|undefined} [imageFrequency]\n *   Time of images during one second.\n * @param {boolean} [enabledStepsOnly=true] - Use only enabled times.\n * @param {boolean} [allEnabledStepsOnly=false]\n *   Use only times that are enabled by all sets of time.\n */\n\n/**\n * Event on animation start.\n * \n * @event module:meteoJS/timeline/animation#start:animation\n */\n\n/**\n * Event on animation stop.\n * \n * @event module:meteoJS/timeline/animation#stop:animation\n */\n\n/**\n * Event on reaching last timestamp.\n * \n * @event module:meteoJS/timeline/animation#end:animation\n */\n\n/**\n * Event triggered immediatly before restart of animation.\n * \n * @event module:meteoJS/timeline/animation#restart:animation\n */\n\n/**\n * Event triggered when imageFrequency/imagePeriod is changed.\n * \n * @event module:meteoJS/timeline/animation#change:imageFrequency\n */\n\n/**\n * Event triggered when restartPause is changed.\n * \n * @event module:meteoJS/timeline/animation#change:restartPause\n */\n\n/**\n * Object to animate {@link module:meteoJS/timeline.Timeline}.\n * \n * <pre><code>import Animation from 'meteojs/timeline/Animation';</code></pre>\n */\nexport class Animation {\n  \n  /**\n   * @param {module:meteoJS/timeline/animation~options} options - Options.\n   */\n  constructor({ timeline,\n    restartPause = 1.8,\n    imagePeriod = 0.2,\n    imageFrequency = undefined,\n    enabledStepsOnly = true,\n    allEnabledStepsOnly = false } = {}) {\n    /**\n     * @type module:meteoJS/timeline/animation~options\n     * @private\n     */\n    this.options = {\n      timeline,\n      restartPause,\n      imagePeriod,\n      imageFrequency,\n      enabledStepsOnly,\n      allEnabledStepsOnly\n    };\n    // Normalize options\n    if (this.options.timeline === undefined)\n      this.options.timeline = new Timeline();\n    if (this.options.imageFrequency !== undefined &&\n        this.options.imageFrequency != 0)\n      this.options.imagePeriod = 1/this.options.imageFrequency;\n    /**\n     * ID to window.setInterval() of the animation.\n     * If undefined, there is no started animation.\n     * @type undefined|number\n     * @private\n     */\n    this.animationIntervalID = undefined;\n    \n    /**\n     * ID to window.setTimeout() ot the animation (used for restart-pause).\n     * If undefined, there is no started setTimeout (i.e. no restart-pause).\n     * @type undefined|number\n     * @private\n     */\n    this.animationTimeoutID = undefined;\n    \n    /**\n     * Current position in this.times in the animation.\n     * @type integer\n     * @private\n     */\n    this.animationStep = 0;\n    \n    /**\n     * Hash with timestamps-valueOf's as keys and index in this.times as values.\n     * @type Object\n     * @private\n     */\n    this.timesHash = {};\n    \n    /**\n     * List of timestamps. Current list of times of the timeline to animate over.\n     * @type Date[]\n     * @private\n     */\n    this.times = [];\n    \n    // Timeline initialisieren\n    let onChangeTimes = () => {\n      this.times = this.options.timeline[this._getTimelineTimesMethod()]();\n      this.timesHash = {};\n      this.times.forEach((time, i) => this.timesHash[time.valueOf()] = i);\n    };\n    this.options.timeline.on(this._getTimelineChangeTimesEvent(), onChangeTimes);\n    onChangeTimes();\n  }\n  \n  /**\n   * Returns time period between two animation steps (in s).\n   * \n   * @returns {number} Time period.\n   */\n  getImagePeriod() {\n    return this.options.imagePeriod;\n  }\n  \n  /**\n   * Sets time period between to animation steps (in s)\n   * \n   * @param {number} imagePeriod - Time period.\n   * @returns {module:meteoJS/timeline/animation.Animation} This.\n   */\n  setImagePeriod(imagePeriod) {\n    this.options.imagePeriod = imagePeriod;\n    if (this.isStarted())\n      this._updateAnimation();\n    this.trigger('change:imageFrequency');\n    return this;\n  }\n  \n  /**\n   * Returns time frequency of animation steps (in 1/s).\n   * \n   * @returns {number} Time frequency.\n   */\n  getImageFrequency() {\n    return 1/this.options.imagePeriod;\n  }\n  \n  /**\n   * Sets time frequency of animation steps (in 1/s).\n   * \n   * @param {number} imageFrequency - Time frequency.\n   * @returns {module:meteoJS/timeline/animation.Animation} This.\n   */\n  setImageFrequency(imageFrequency) {\n    if (imageFrequency != 0)\n      this.setImagePeriod(1/imageFrequency);\n    return this;\n  }\n  \n  /**\n   * Returns time duration before a restart (jump from end to beginning, in s).\n   * \n   * @returns {number} Time duration.\n   */\n  getRestartPause() {\n    return this.options.restartPause;\n  }\n  \n  /**\n   * Sets time duration before a restart (in s).\n   * \n   * @param {number} restartPause - Time duration.\n   * @returns {module:meteoJS/timeline/animation.Animation} This.\n   */\n  setRestartPause(restartPause) {\n    this.options.restartPause = Number(restartPause); // Convert string to number\n    this.trigger('change:restartPause');\n    return this;\n  }\n  \n  /**\n   * Is animation started.\n   * \n   * @returns {boolean}\n   */\n  isStarted() {\n    return this.animationIntervalID !== undefined ||\n           this.animationTimeoutID !== undefined;\n  }\n  \n  /**\n   * Starts the animation.\n   * \n   * @returns {module:meteoJS/timeline/animation.Animation} This.\n   * @fires module:meteoJS/timeline/animation#start:animation\n   */\n  start() {\n    if (this.options.timeline.getSelectedTime().valueOf() in this.timesHash)\n      this._setStep(this.timesHash[this.options.timeline.getSelectedTime().valueOf()]);\n    if (!this.isStarted())\n      this._updateAnimation();\n    this.trigger('start:animation');\n  }\n  \n  /**\n   * Stops the animation.\n   * \n   * @returns {module:meteoJS/timeline/animation.Animation} This.\n   * @fires module:meteoJS/timeline/animation#stop:animation\n   */\n  stop() {\n    this._clearAnimation();\n    this.trigger('stop:animation');\n  }\n  \n  /**\n   * Toggles the animation.\n   * \n   * @returns {module:meteoJS/timeline/animation.Animation} This.\n   */\n  toggle() {\n    if (this.isStarted())\n      this.stop();\n    else\n      this.start();\n  }\n  \n  /**\n   * Setzt Schritt der Animation\n   * @private\n   * @param {number} step\n   */\n  _setStep(step) {\n    if (0 <= step && step < this._getCount())\n      this.animationStep = step;\n  }\n  \n  /**\n   * Gibt timeline-Event Name zum abhören von Änderungen der Zeitschritte zurück.\n   * @private\n   * @returns {string}\n   */\n  _getTimelineChangeTimesEvent() {\n    return (this.options.enabledStepsOnly || this.options.allEnabledStepsOnly)\n      ? 'change:enabledTimes' : 'change:times';\n  }\n  \n  /**\n   * Gibt timeline-Methode aller Zeitschritte zurück.\n   * @private\n   * @returns {string}\n   */\n  _getTimelineTimesMethod() {\n    return this.options.allEnabledStepsOnly ? 'getAllEnabledTimes' :\n      this.options.enabledStepsOnly ? 'getEnabledTimes' : 'getTimes';\n  }\n  \n  /**\n   * Gibt Anzahl Animationsschritte zurück\n   * @private\n   * @returns {number}\n   */\n  _getCount() {\n    return this.options.timeline[this._getTimelineTimesMethod()]().length;\n  }\n  \n  /**\n   * Handelt die Animation\n   * @private\n   * @fires module:meteoJS/timeline/animation#end:animation\n   * @fires module:meteoJS/timeline/animation#restart:animation\n   */\n  _updateAnimation() {\n    this._clearAnimation();\n    if (this.animationStep < this._getCount()-1)\n      this._initAnimation();\n    else\n      this._initRestartPause();\n  }\n  \n  /**\n   * Startet Animation\n   * @private\n   */\n  _initAnimation() {\n    if (this.animationIntervalID === undefined)\n      this.animationIntervalID = window.setInterval(() => {\n        this.animationStep++;\n        if (this.animationStep < this.times.length)\n          this.options.timeline.setSelectedTime(this.times[this.animationStep]);\n        if (this.animationStep >= this._getCount()-1) {\n          this.trigger('end:animation');\n          this._clearAnimation();\n          this._initRestartPause();\n        }\n      }, this.options.imagePeriod * 1000);\n  }\n  \n  /**\n   * Startet den Timer für die Restart-Pause\n   * Verwende als Zeitspanne imagePeriod+restartPause. Sonst wird bei restartPause\n   * 0s der letzte Zeitschritt gar nie angezeigt.\n   * @private\n   */\n  _initRestartPause() {\n    if (this.animationTimeoutID === undefined)\n      this.animationTimeoutID = window.setTimeout(() => {\n        this.animationStep = 0;\n        this.trigger('restart:animation');\n        if (this.animationStep < this.times.length)\n          this.options.timeline.setSelectedTime(this.times[this.animationStep]);\n        this._clearAnimation();\n        this._initAnimation();\n      }, (this.options.imagePeriod + this.options.restartPause) * 1000);\n  }\n  \n  /**\n   * Löscht window.interval, falls vorhanden\n   * @private\n   */\n  _clearAnimation() {\n    if (this.animationIntervalID !== undefined) {\n      window.clearInterval(this.animationIntervalID);\n      this.animationIntervalID = undefined;\n    }\n    if (this.animationTimeoutID !== undefined) {\n      window.clearTimeout(this.animationTimeoutID);\n      this.animationTimeoutID = undefined;\n    }\n  }\n  \n}\naddEventFunctions(Animation.prototype);\nexport default Animation;\n\n/**\n * Insert an input-group to change frequency.\n * \n * <pre><code>import { insertFrequencyInput } from 'meteojs/timeline/Animation';</code></pre>\n * \n * @param {external:jQuery} node - Node to insert input-group.\n * @param {Object} options - Options for input-group.\n * @param {module:meteoJS/timeline/animation.Animation} options.animation\n *   Animation object.\n * @param {string} [options.suffix='fps'] - Suffix text for input-group.\n * @returns {external:jQuery} Input-group node.\n */\nexport function insertFrequencyInput(node, { animation, suffix = 'fps' }) {\n  const number = $('<input>')\n    .addClass('form-control')\n    .attr('type', 'number')\n    .attr('min', 1)\n    .attr('step', 1);\n  const inputGroupNumber = $('<div>')\n    .addClass('input-group')\n    .append(number)\n    .append($('<span>').addClass('input-group-text').text(suffix));\n  number.on('change', () => animation.setImageFrequency(number.val()));\n  const onChangeImageFrequency = () => number.val(animation.getImageFrequency());\n  animation.on('change:imageFrequency', onChangeImageFrequency);\n  onChangeImageFrequency();\n  node.append(inputGroupNumber);\n  return inputGroupNumber;\n}\n\n/**\n * Insert an input-range to change frequency.\n * \n * <pre><code>import { insertFrequencyRange } from 'meteojs/timeline/Animation';</code></pre>\n * \n * @param {external:jQuery} node - Node to insert input-range.\n * @param {Object} options - Options for input-range.\n * @param {module:meteoJS/timeline/animation.Animation} options.animation\n *   Animation object.\n * @param {number[]} options.frequencies - Frequencies to select.\n * @returns {external:jQuery} Input-range node.\n */\nexport function insertFrequencyRange(node, { animation, frequencies }) {\n  frequencies = frequencies ? frequencies : [1];\n  let range = $('<input>')\n    .addClass('form-range')\n    .attr('type', 'range')\n    .attr('min', 0)\n    .attr('max', frequencies.length-1);\n  range.on('change input', () => {\n    let i = range.val();\n    if (i < frequencies.length)\n      animation.setImageFrequency(frequencies[i]);\n  });\n  let onChangeImageFrequency = () => {\n    let i = frequencies.indexOf(animation.getImageFrequency());\n    if (i > -1)\n      range.val(i);\n  };\n  animation.on('change:imageFrequency', onChangeImageFrequency);\n  onChangeImageFrequency();\n  node.append(range);\n  return range;\n}\n\n/**\n * Insert an button-group to change frequency.\n * \n * <pre><code>import { insertFrequencyButtonGroup } from 'meteojs/timeline/Animation';</code></pre>\n * \n * @param {external:jQuery} node - Node to insert the button-group.\n * @param {Object} options - Options for the button-group.\n * @param {module:meteoJS/timeline/animation.Animation} options.animation\n *   Animation object.\n * @param {number[]} options.frequencies - Frequencies to select.\n * @param {string|undefined} [options.btnGroupClass='btn-group']\n *   Class added to the button-group node.\n * @param {string|undefined} [options.btnClass='btn btn-primary']\n *   Class added to each button.\n * @param {string} [options.suffix='fps']\n *   Suffix text for each button after frequency.\n * @returns {external:jQuery} Button-group node.\n */\nexport function insertFrequencyButtonGroup(node, {\n  animation,\n  frequencies,\n  btnGroupClass = 'btn-group',\n  btnClass = 'btn btn-primary',\n  suffix = 'fps'\n}) {\n  let btnGroup = $('<div>').addClass(btnGroupClass);\n  frequencies = frequencies ? frequencies : [];\n  frequencies.forEach(freq => {\n    btnGroup.append($('<button>')\n      .addClass(btnClass)\n      .data('frequency', freq)\n      .text(freq + ' ' + suffix)\n      .click(() => animation.setImageFrequency(freq)));\n  });\n  let onChange = () => {\n    btnGroup.children('button').removeClass('active').each(function () {\n      if ($(this).data('frequency') == animation.getImageFrequency())\n        $(this).addClass('active');\n    });\n  };\n  animation.on('change:imageFrequency', onChange);\n  onChange();\n  node.append(btnGroup);\n  return btnGroup;\n}\n\n/**\n * Insert an input-group to change restart pause.\n * \n * <pre><code>import { insertRestartPauseInput } from 'meteojs/timeline/Animation';</code></pre>\n * \n * @param {external:jQuery} node - Node to insert input-group.\n * @param {Object} options - Options for input-group.\n * @param {module:meteoJS/timeline/animation.Animation} options.animation\n *   Animation object.\n * @param {string} [options.suffix='s'] - Suffix text for input-group.\n * @returns {external:jQuery} Input-group node.\n */\nexport function insertRestartPauseInput(node, { animation, suffix = 's' }) {\n  const input = $('<input>')\n    .addClass('form-control')\n    .attr('type', 'number')\n    .attr('min', 0)\n    .attr('step', 0.1);\n  const inputGroupNumber = $('<div>')\n    .addClass('input-group')\n    .append(input)\n    .append($('<span>').addClass('input-group-text').text(suffix));\n  input.on('change', () => animation.setRestartPause(input.val()));\n  const onChange = () => input.val(animation.getRestartPause());\n  animation.on('change:restartPause', onChange);\n  onChange();\n  node.append(inputGroupNumber);\n  return inputGroupNumber;\n}\n\n/**\n * Insert an input-range to change restart pause.\n * \n * <pre><code>import { insertRestartPauseRange } from 'meteojs/timeline/Animation';</code></pre>\n * \n * @param {external:jQuery} node - Node to insert input-range.\n * @param {Object} options - Options for input-range.\n * @param {module:meteoJS/timeline/animation.Animation} options.animation\n *   Animation object.\n * @param {number[]} options.pauses - Restart pauses to select.\n * @returns {external:jQuery} Input-range node.\n */\nexport function insertRestartPauseRange(node, { animation, pauses }) {\n  pauses = pauses ? pauses : [1];\n  pauses = pauses.map(p => Math.round(p * 1000));\n  let range = $('<input>')\n    .addClass('form-range')\n    .attr('type', 'range')\n    .attr('min', 0)\n    .attr('max', pauses.length-1);\n  range.on('change input', () => {\n    let i = range.val();\n    if (i < pauses.length)\n      animation.setRestartPause(pauses[i] / 1000);\n  });\n  let onChangeImageFrequency = () => {\n    let i =\n      pauses.indexOf(Math.round(animation.getRestartPause() * 1000));\n    if (i > -1)\n      range.val(i);\n  };\n  animation.on('change:imageFrequency', onChangeImageFrequency);\n  onChangeImageFrequency();\n  node.append(range);\n  return range;\n}\n\n/**\n * Insert an button-group to change restart pause.\n * \n * <pre><code>import { insertRestartPauseButtonGroup } from 'meteojs/timeline/Animation';</code></pre>\n * \n * @param {external:jQuery} node - Node to insert the button-group.\n * @param {Object} options - Options for the button-group.\n * @param {module:meteoJS/timeline/animation.Animation} options.animation\n *   Animation object.\n * @param {number[]} options.pauses - Restart pauses to select.\n * @param {string|undefined} [options.btnGroupClass='btn-group']\n *   Class added to the button-group node.\n * @param {string|undefined} [options.btnClass='btn btn-primary']\n *   Class added to each button.\n * @param {string} [options.suffix='s']\n *   Suffix in each button after duration text.\n * @returns {external:jQuery} Button-group node.\n */\nexport function insertRestartPauseButtonGroup(node, {\n  animation,\n  pauses,\n  btnGroupClass = 'btn-group',\n  btnClass = 'btn btn-primary',\n  suffix = 's'\n}) {\n  let btnGroup = $('<div>').addClass(btnGroupClass);\n  pauses = pauses ? pauses : [];\n  pauses.forEach(pause => {\n    btnGroup.append($('<button>')\n      .addClass(btnClass)\n      .data('pause', pause)\n      .text(pause + ' ' + suffix)\n      .click(() => animation.setRestartPause(pause)));\n  });\n  let onChange = () => {\n    btnGroup.children('button').removeClass('active').each(function () {\n      if ($(this).data('pause') == animation.getRestartPause())\n        $(this).addClass('active');\n    });\n  };\n  animation.on('change:restartPause', onChange);\n  onChange();\n  node.append(btnGroup);\n  return btnGroup;\n}","export default \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"16\\\" height=\\\"16\\\" fill=\\\"currentColor\\\" class=\\\"bi bi-play-fill\\\" viewBox=\\\"0 0 16 16\\\">\\n  <path d=\\\"m11.596 8.697-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.692-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z\\\"/>\\n</svg>\";","export default \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"16\\\" height=\\\"16\\\" fill=\\\"currentColor\\\" class=\\\"bi bi-pause-fill\\\" viewBox=\\\"0 0 16 16\\\">\\n  <path d=\\\"M5.5 3.5A1.5 1.5 0 0 1 7 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5zm5 0A1.5 1.5 0 0 1 12 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5z\\\"/>\\n</svg>\";","/**\n * @module meteoJS/timeline/visualisation\n */\nimport addEventFunctions from '../Events.js';\nimport Timeline from '../Timeline.js';\n\n/**\n * Returns a textual representation of a time according to a passed format.\n * \n * This function could be used to convert Date-objects to a readable time with\n * external libraries. One such implementation is given by\n * {@link module:meteoJS/timeline/visualisation.makeTimeTextCallbackFunction}.\n * \n * @typedef {Function}\n *   module:meteoJS/timeline/visualisation~timeTextCallbackFunction\n * @param {Date} time - A valid datetime.\n * @param {string} format - Format string.\n * @returns {string} Textual representation.\n */\n\n/**\n * Options for Visualisation.\n * \n * @typedef {Object} module:meteoJS/timeline/visualisation~options\n * @param {module:meteoJS/timeline.Timeline} [timeline]\n *   Timeline object.\n * @param {external:jQuery} [node] - Node.\n * @param {module:meteoJS/timeline/animation.Animation} [animation]\n *   Animation object. If specified, the animation will be stopped on user\n *   interaction with the visualisation object.\n * @param {boolean} [enabledStepsOnly=true] - Use only enabled times.\n * @param {boolean} [allEnabledStepsOnly=false]\n *   Use only times that are enabled by all sets of time.\n * @param {string} [textInvalid='-']\n *   Output string, if time of timeline is invalid.\n * @param {module:meteoJS/timeline/visualisation~timeTextCallbackFunction}\n *   [getTimeText]\n *   Returns a textual representation of a time according to a passed format.\n * @param {string} [outputTimezone]\n *   'local' for browser local timezone.\n */\n\n/**\n * Object to visualise {@link module:meteoJS/timeline.Timeline}.\n * \n * How to create your own visualisation object:\n * * Inherit this object\n * * Inherit method onChangeTime()\n * * Inherit method onChangeTimes()\n * * Inherit method emptyNode()\n * * Inherit method onInitNode()\n * * To get all times to display use getTimelineTimes()\n * * Use method timeToText() to convert a Date to String.\n * * Use method attachEventListener() to attach event listeners on a object.\n *   The event listener will be deleted automatically if the output is muted.\n * * At the end of the constructor call \"this.setNode(this.options.node);\".\n * \n * <pre><code>import Visualisation from 'meteojs/timeline/Visualisation';</code></pre>\n * \n * @abstract\n * @listens module:meteoJS/timeline#change:time\n * @listens module:meteoJS/timeline#change:times\n * @listens module:meteoJS/timeline#change:enabledTimes\n */\nexport class Visualisation {\n  \n  /**\n   * @param {module:meteoJS/timeline/visualisation~options} options - Options.\n   */\n  constructor({\n    timeline = undefined,\n    node = undefined,\n    animation = undefined,\n    enabledStepsOnly = true,\n    allEnabledStepsOnly = false,\n    textInvalid = '-',\n    getTimeText = undefined,\n    outputTimezone = undefined\n  } = {}) {\n    /**\n     * @type Object\n     * @private\n     */\n    this.options = {\n      timeline,\n      node,\n      animation,\n      enabledStepsOnly,\n      allEnabledStepsOnly,\n      textInvalid,\n      getTimeText,\n      outputTimezone\n    };\n    \n    // Normalize options\n    if (this.options.timeline === undefined)\n      this.options.timeline = new Timeline();\n    \n    /**\n     * @member {Array[]}\n     * @private\n     */\n    this.listeners = [];\n    \n    /**\n     * @member {undefined|mixed}\n     * @private\n     */\n    this.inputListener = undefined;\n  }\n  \n  /**\n   * Sets jQuery-Node for output.\n   * \n   * @public\n   * @param {external:jQuery|undefined} node Node, undefined to mute the output.\n   * @returns {module:meteoJS/timeline/visualisation.Visualisation} This.\n   */\n  setNode(node) {\n    if (this.options.node !== undefined)\n      this.emptyNode();\n  \n    if (node === undefined) {\n      this.detachEventListeners();\n      this.options.node = node;\n    }\n    else {\n      this.options.node = node;\n      var isListenersDefined = this.listeners.length > 0;\n      if (!isListenersDefined) {\n        this.attachEventListener(this.options.timeline, 'change:time', function () {\n          this.onChangeTime();\n        }, this);\n        this.attachEventListener(this.options.timeline, 'change:times', function () {\n          this.onChangeTimes();\n        }, this);\n        this.attachEventListener(this.options.timeline, 'change:enabledTimes', function () {\n          this.onChangeTimes();\n        }, this);\n      }\n      this.onInitNode(isListenersDefined);\n      this.onChangeTimes();\n      this.onChangeTime();\n    }\n  \n    if (this.inputListener === undefined)\n      this.inputListener = this.on('input', function () {\n        if (this.options.animation !== undefined)\n          this.options.animation.stop();\n      }, this);\n  \n    return this;\n  }\n  \n  /**\n   * Gets current value of output timezone.\n   * \n   * @public\n   * @returns {string|undefined} Output timezone.\n   */\n  getOutputTimezone() {\n    return this.options.outputTimezone;\n  }\n  \n  /**\n   * Sets output timezone, undefined for UTC.\n   * \n   * @public\n   * @param {string|undefined} outputTimezone Timezone for datetime output.\n   * @returns {module:meteoJS/timeline/visualisation.Visualisation} This.\n   */\n  setOutputTimezone(outputTimezone) {\n    var updateOutput = (this.options.outputTimezone != outputTimezone);\n    this.options.outputTimezone = outputTimezone;\n    if (updateOutput &&\n        this.options.node !== undefined) {\n      this.onChangeTimes();\n      this.onChangeTime();\n    }\n    return this;\n  }\n  \n  /**\n   * Called if the timeline triggers the\n   * {@link module:meteoJS/timeline#change:time} event.\n   * Prerequisite: this.options.node must be defined.\n   * \n   * @abstract\n   * @protected\n   */\n  onChangeTime() {}\n  \n  /**\n   * Called if the timeline triggers the {@link module:meteoJS/timeline#change:times}\n   * or {@link module:meteoJS/timeline#change:enabledTimes} event.\n   * Prerequisite: this.options.node must be defined.\n   * \n   * @abstract\n   * @protected\n   */\n  onChangeTimes() {}\n  \n  /**\n   * Called to empty the output node. Mainly if the output is muted.\n   * Prerequisite: this.options.node must be defined.\n   * \n   * @abstract\n   * @protected\n   */\n  emptyNode() {}\n  \n  /**\n   * Called once an output node is set.\n   * Prerequisite: this.options.node must be defined.\n   * \n   * @abstract\n   * @protected\n   * @param {boolean} isListenersDefined\n   *   True if the event listeners are already set.\n   */\n  onInitNode() {}\n  \n  /**\n   * Returns the times to display. This could be either all times in the timeline\n   * or only the enabled times or the all enabled times. The user of the\n   * visualisation object select this by the options.\n   * \n   * @protected\n   * @returns {Date[]} Times.\n   */\n  getTimelineTimes() {\n    var methodName = this.options.allEnabledStepsOnly ?\n      'getAllEnabledTimes' :\n      this.options.enabledStepsOnly ? 'getEnabledTimes' : 'getTimes';\n    return this.options.timeline[methodName]();\n  }\n  \n  /**\n   * Converts a Date-object to a string.\n   * \n   * @protected\n   * @param {Date} time - Time.\n   * @param {string} format - Format string, passed to the .\n   * @returns {string} String.\n   */\n  timeToText(time, format) {\n    if (isNaN(time))\n      return this.options.textInvalid;\n    if (this.options.getTimeText !== undefined)\n      return this.options.getTimeText.call(this, time, format);\n    return time.toISOString();\n  }\n  \n  /**\n   * Attach an event listener on an object. Object could be a jQuery-object or\n   * an object using {@link module:meteoJS/events}.\n   * \n   * @protected\n   * @param {Object} obj - Object to put the event listener on.\n   * @param {mixed} listener - Event listener key.\n   * @param {Function} func - Function to be executed when event is triggered.\n   * @param {Object} [thisArg] - This in the function func when event triggered.\n   */\n  attachEventListener(obj, listener, func, thisArg) {\n    this.listeners.push([obj, listener]);\n    obj.on(listener, func, thisArg);\n  }\n  \n  /**\n   * Detaches all event listeners.\n   * \n   * @private\n   */\n  detachEventListeners() {\n    this.listeners.forEach(function (listenerArr) {\n      if ('un' in listenerArr[0])\n        listenerArr[0].un(listenerArr[1]);\n      else if ('off' in listenerArr[0])\n        listenerArr[0].off(listenerArr[1]);\n    });\n    this.listeners = [];\n  }\n  \n}\naddEventFunctions(Visualisation.prototype);\nexport default Visualisation;\n\n/**\n * moment.js object.\n * \n * @external momentjs\n * @see {@link https://momentjs.com}\n */\n\n/**\n * Format a Date-object via the {@link https://momentjs.com|Moment.js} library.\n * \n * <pre><code>import { makeTimeTextCallbackFunction } from 'meteojs/timeline/Visualisation';</code></pre>\n * \n * @param {external:momentjs} moment - Moment.js object.\n * @returns {module:meteoJS/timeline/visualisation~timeTextCallbackFunction}\n *   Callback.\n */\nexport function makeTimeTextCallbackFunction(moment) {\n  return function (time, format) {\n    const m = moment.utc(time);\n    if (this.options.outputTimezone !== undefined)\n      (this.options.outputTimezone == 'local')\n        ? m.local()\n        : m.tz(this.options.outputTimezone);\n    return m.format(format);\n  };\n}","/**\n * @module meteoJS/timeline/visualisation/text\n */\nimport Visualisation from '../Visualisation.js';\n\n/**\n * Options for constructor.\n * \n * @typedef {module:meteoJS/timeline/visualisation/slider~options}\n *  module:meteoJS/timeline/visualisation/text~options\n * @param {string|undefined} format\n *   Format string, used for 'getTimeText'.\n */\n\n/**\n * Show current selected time of a timeline as text.\n * \n * <pre><code>import Text from 'meteojs/timeline/visualisation/Text';</code></pre>\n * \n * @extends module:meteoJS/timeline/visualisation.Visualisation\n */\nexport class Text extends Visualisation {\n  \n  /**\n   * @param {module:meteoJS/timeline/visualisation/text~options} options - Options.\n   */\n  constructor({\n    format = undefined,\n    ...rest\n  } = {}) {\n    super(rest);\n    \n    this.options.format = format;\n    this.setNode(this.options.node);\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  onChangeTime() {\n    this.options.node.text(\n      this.timeToText(this.options.timeline.getSelectedTime(),\n        this.options.format));\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  emptyNode() {\n    this.options.node.text('');\n  }\n  \n}\nexport default Text;","/**\n * @module meteoJS/timeline/visualisation/slider\n */\nimport $ from 'jquery';\nimport Visualisation from '../Visualisation.js';\n\n/**\n * Options for constructor.\n * \n * @typedef {module:meteoJS/timeline/visualisation~options}\n     module:meteoJS/timeline/visualisation/slider~options\n */\n\n/**\n * Show timeline as a slider.\n * \n * <pre><code>import Slider from 'meteojs/timeline/visualisation/Slider';</code></pre>\n * \n * @extends module:meteoJS/timeline/visualisation.Visualisation\n */\nexport class Slider extends Visualisation {\n  \n  /**\n   * @param {module:meteoJS/timeline/visualisation/slider~options} options\n   *   Options.\n   */\n  constructor(options) {\n    super(options);\n    \n    /**\n     * @member {Date[]}\n     * @private\n     */\n    this.times = [];\n    /**\n     * @member {Object}\n     * @private\n     */\n    this.timesIndexes = {};\n    \n    this.setNode(this.options.node);\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  onChangeTime() {\n    var t = this.options.timeline.getSelectedTime();\n    if (t.valueOf() in this.timesIndexes)\n      this.options.node.val(this.timesIndexes[t.valueOf()]+1);\n    else\n      this.options.node.val(1);\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  onChangeTimes() {\n    this.times = this.getTimelineTimes();\n    this.timesIndexes = {};\n    this.times.forEach(function (time, i) {\n      this.timesIndexes[time.valueOf()] = i;\n    }, this);\n    this.options.node.prop('max', this.times.length);\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  onInitNode(isListenersDefined) {\n    this.options.node.prop('min', 1);\n    this.options.node.prop('step', 1);\n    if (!isListenersDefined) {\n      var that = this;\n      this.attachEventListener(this.options.node, 'change input', function () {\n        var i = +$(this).val();\n        if (0 < i &&\n            i <= that.times.length)\n          that.options.timeline.setSelectedTime(that.times[i-1]);\n        that.trigger('input');\n      });\n    }\n  }\n  \n}\nexport default Slider;","/**\n * @module meteoJS/timeline/visualisation/bsButtons\n */\nimport $ from 'jquery';\nimport Visualisation from '../Visualisation.js';\n\n/**\n * Dynamic format string to output the time for each Time-Button.\n * \n * @typedef {Function} module:meteoJS/timeline/visualisation/bsButtons~timeFormatFunction\n * @param {Date} time - Timestamp of the Button.\n * @returns {String} A string to format the time for the Time-Buttons.\n */\n\n/**\n * Options for constructor.\n * \n * @typedef {module:meteoJS/timeline/visualisation~options}\n *   module:meteoJS/timeline/visualisation/bsButtons~options\n * @property {String|module:meteoJS/timeline/visualisation/bsButtons~timeFormatFunction} [format='HH']\n *   Format-String for the time of the Time-Buttons.\n */\n\n/**\n * Show timeline as a group of buttons.\n * \n * <pre><code>import bsButtons from 'meteojs/timeline/visualisation/bsButtons';</code></pre>\n * \n * @extends module:meteoJS/timeline/visualisation.Visualisation\n */\nexport class bsButtons extends Visualisation {\n  \n  /**\n   * @param {module:meteoJS/timeline/visualisation/bsButtons~options} options - Options.\n   */\n  constructor({\n    format = 'HH',\n    grouping = 'daily',\n    groupingFormat = 'ddd, DD. MMM',\n    classMain = 'btn-toolbar',\n    classButtonGroup = 'btn-group',\n    classButtonGroupMargin = 'me-2',\n    classLabel = undefined,\n    classLabelSpan = 'd-block w-100',\n    classButton = 'btn',\n    classButtonActive = 'active',\n    classButtonNotEnabled = 'btn-light',\n    classButtonEnabled = 'btn-secondary',\n    classButtonAllEnabled = 'btn-primary',\n    /*prependNodes = undefined,\n      appendNodes = undefined*/\n    ...rest\n  } = {}) {\n    super(rest);\n    \n    this.options.format = format;\n    this.options.grouping = grouping;\n    this.options.groupingFormat = groupingFormat;\n    this.options.classMain = classMain;\n    this.options.classButtonGroup = classButtonGroup;\n    this.options.classButtonGroupMargin = classButtonGroupMargin;\n    this.options.classLabel = classLabel;\n    this.options.classLabelSpan = classLabelSpan;\n    this.options.classButton = classButton;\n    this.options.classButtonActive = classButtonActive;\n    this.options.classButtonNotEnabled = classButtonNotEnabled;\n    this.options.classButtonEnabled = classButtonEnabled;\n    this.options.classButtonAllEnabled = classButtonAllEnabled;\n    \n    /**\n     * @member {external:jQuery|undefined}\n     * @private\n     */\n    this.toolbarNode = undefined;\n    \n    this.setNode(this.options.node);\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  onChangeTime() {\n    if (this.toolbarNode === undefined)\n      return;\n    \n    var time = this.options.timeline.getSelectedTime();\n    var that = this;\n    this.toolbarNode.find('button').each(function () {\n      var t = new Date(+$(this).data('time'));\n      $(this)\n        .removeClass(that.options.classButtonActive);\n      /*.removeClass(that.options.classButtonAllEnabled)\n        .removeClass(that.options.classButtonEnabled)\n        .removeClass(that.options.classButtonNotEnabled);*/\n      if (time.valueOf() == t.valueOf())\n        $(this).addClass(that.options.classButtonActive);\n      /*else if (that.options.timeline.isTimeAllEnabled(t))\n        $(this).addClass(that.options.classButtonAllEnabled);\n      else if (that.options.timeline.isTimeEnabled(t))\n        $(this).addClass(that.options.classButtonEnabled);\n      else\n        $(this).addClass(that.options.classButtonNotEnabled);*/\n    });\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  onChangeTimes() {\n    if (this.toolbarNode === undefined)\n      this.toolbarNode = $('<div>');\n    this.toolbarNode.empty();\n    \n    var groupingFormat =\n      (this.options.grouping == 'daily') ? 'YYYY-MM-DD' :\n        (this.options.grouping == 'hourly') ? 'YYYY-MM-DD HH' :\n          this.options.grouping;\n    var lastNode = undefined;\n    this.getTimelineTimes().forEach(function (time) {\n      if (lastNode === undefined ||\n          lastNode.data('date') != this.timeToText(time, groupingFormat)) {\n        var btnGroup = $('<div>')\n          .addClass(this.options.classButtonGroup)\n          .addClass(this.options.classButtonGroupMargin)\n          .attr('role', 'group')\n          .attr('aria-label', this.timeToText(time, groupingFormat));\n        if (this.options.groupingFormat === undefined) {\n          lastNode = btnGroup;\n        }\n        else {\n          var span = $('<span>')\n            .addClass(this.options.classLabelSpan)\n            .text(this.timeToText(time, this.options.groupingFormat));\n          lastNode = $('<label>')\n            .addClass(this.options.classLabel)\n            .append(span);\n          btnGroup.attr('aria-label', span.text());\n          lastNode.append(btnGroup);\n        }\n        lastNode.data('date', this.timeToText(time, groupingFormat));\n        this.toolbarNode.append(lastNode);\n      }\n      \n      var btn = $('<button>')\n        .addClass(this.options.classButton)\n        .attr('type', 'button')\n        .data('time', time.valueOf());\n      if (typeof this.options.format == 'function')\n        btn.text(this.timeToText(time, this.options.format.call(this, time)));\n      else\n        btn.text(this.timeToText(time, this.options.format));\n      if (this.options.timeline.isTimeAllEnabled(time))\n        btn.addClass(this.options.classButtonAllEnabled);\n      else if (this.options.timeline.isTimeEnabled(time))\n        btn.addClass(this.options.classButtonEnabled);\n      else\n        btn.addClass(this.options.classButtonNotEnabled);\n      let selectedTime = this.options.timeline.getSelectedTime();\n      if (time.valueOf() == selectedTime.valueOf())\n        btn.addClass(this.options.classButtonActive);\n      var that = this;\n      btn.click(function () {\n        that.options.timeline.setSelectedTime(new Date(+$(this).data('time')));\n        that.trigger('input');\n      });\n      if (lastNode.hasClass(this.options.classButtonGroup))\n        lastNode.append(btn);\n      else\n        lastNode.children('div').append(btn);\n    }, this);\n    this.toolbarNode.find('div.'+this.options.classButtonGroup).last().removeClass(this.options.classButtonGroupMargin);\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  emptyNode() {\n    this.toolbarNode = undefined;\n    this.options.node.empty();\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  onInitNode() {\n    this.toolbarNode = $('<div>')\n      .addClass(this.options.classMain)\n      .attr('role', 'toolbar')\n      .attr('aria-label', 'Timeline toolbar');\n    this.options.node.append(this.toolbarNode);\n  }\n  \n}\nexport default bsButtons;","/**\n * @module meteoJS/timeline/visualisation/bsDropdown\n */\nimport $ from 'jquery';\nimport Visualisation from '../Visualisation.js';\nimport Text from './Text.js';\n\n/**\n * Options for constructor.\n * \n * @typedef {module:meteoJS/timeline/visualisation~options}\n *   module:meteoJS/timeline/visualisation/bsDropdown~options\n * @param {string|undefined} format\n *   Format string for dropdown items, used for 'getTimeText'.\n * @param {string|undefined} buttonFormat\n *   Format string for dropdown button, used for 'getTimeText'.\n * @param {string} grouping\n *   'daily', 'hourly' or a format string. Defines if items will be grouped and\n *   be title depending on groupingDivider and groupingFormat.\n * @param {boolean} groupingDivider Show dropdown divider above an item group.\n * @param {undefined|string} groupingFormat\n *   Format string for a dropdown header above an item group.\n * @param {undefined|string} classMain Class for the main node.\n * @param {undefined|string} classDropdownMenu Class for the dropdown node.\n * @param {undefined|string} classDropdownItem Class for a dropdown item.\n * @param {undefined|string} classItemActive Class for an active item.\n * @param {undefined|string} classItemNotEnabled Class for a not enabled item.\n * @param {undefined|string} classItemEnabled Class for an enabled item.\n * @param {undefined|string} classItemAllEnabled Class for an all enabled item.\n * @param {undefined|string} classDropdownHeader Class for dropdown header.\n * @param {undefined|string} classDropdownDivider Class for dropdown divider.\n * @param {undefined|string} classDropdownButton Class for the dropdown button.\n * @param {undefined|string} classButtonNotEnabled\n *   Class for the dropdown button if the selected time is not enabled.\n * @param {undefined|string} classButtonEnabled\n *   Class for the dropdown button if the selected time is enabled.\n * @param {undefined|string} classButtonAllEnabled\n *   Class for the dropdown button if the selected time is all enabled.\n */\n\n/**\n * Show timeline in a dropdown menu. The menu will be build according to\n * bootstrap.\n * \n * <pre><code>import bsDropdown from 'meteojs/timeline/visualisation/bsDropdown';</code></pre>\n * \n * @extends module:meteoJS/timeline/visualisation.Visualisation\n */\nexport class bsDropdown extends Visualisation {\n  \n  /**\n   * @param {module:meteoJS/timeline/visualisation/bsDropdown~options} options - Options.\n   */\n  constructor({\n    format = 'HH:mm',\n    buttonFormat = 'DD. MMMM YYYY HH:mm',\n    grouping = 'daily',\n    groupingDivider = true,\n    groupingFormat = 'ddd, DD. MMMM YYYY',\n    classMain = 'dropdown',\n    classDropdownMenu = 'dropdown-menu',\n    classDropdownItem = 'dropdown-item',\n    classItemActive = 'active',\n    classItemNotEnabled = 'disabled',\n    classItemEnabled = undefined,\n    classItemAllEnabled = undefined,\n    classDropdownHeader = 'dropdown-header',\n    classDropdownDivider = 'dropdown-divider',\n    classDropdownButton = 'btn dropdown-toggle',\n    classButtonNotEnabled = undefined,\n    classButtonEnabled = undefined,\n    classButtonAllEnabled = undefined,\n    ...rest\n  } = {}) {\n    super(rest);\n    \n    this.options.format = format;\n    this.options.buttonFormat = buttonFormat;\n    this.options.grouping = grouping;\n    this.options.groupingDivider = groupingDivider;\n    this.options.groupingFormat = groupingFormat;\n    this.options.classMain = classMain;\n    this.options.classDropdownMenu = classDropdownMenu;\n    this.options.classDropdownItem = classDropdownItem;\n    this.options.classItemActive = classItemActive;\n    this.options.classItemNotEnabled = classItemNotEnabled;\n    this.options.classItemEnabled = classItemEnabled;\n    this.options.classItemAllEnabled = classItemAllEnabled;\n    this.options.classDropdownHeader = classDropdownHeader;\n    this.options.classDropdownDivider = classDropdownDivider;\n    this.options.classDropdownButton = classDropdownButton;\n    this.options.classButtonNotEnabled = classButtonNotEnabled;\n    this.options.classButtonEnabled = classButtonEnabled;\n    this.options.classButtonAllEnabled = classButtonAllEnabled;\n    \n    /**\n     * @member {module:meteoJS/timeline/visualisation/text.Text}\n     * @private\n     */\n    this.visualisationButtonText = new Text({\n      timeline: this.options.timeline,\n      format: this.options.buttonFormat,\n      textInvalid: this.options.textInvalid,\n      outputTimezone: this.options.outputTimezone,\n      getTimeText: this.options.getTimeText\n    });\n    /**\n     * @member {external:jQuery|undefined}\n     * @private\n     */\n    this.dropdownNode = undefined;\n    \n    this.setNode(this.options.node);\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  setOutputTimezone(outputTimezone) {\n    super.setOutputTimezone(outputTimezone);\n    this.visualisationButtonText.setOutputTimezone(outputTimezone);\n    return this;\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  onChangeTime() {\n    if (this.dropdownNode === undefined)\n      return;\n    \n    var time = this.options.timeline.getSelectedTime();\n    this.options.node.children('li').children('button')\n      .removeClass(this.options.classButtonActive)\n      .removeClass(this.options.classButtonNotEnabled)\n      .removeClass(this.options.classButtonEnabled)\n      .removeClass(this.options.classButtonAllEnabled);\n    if (this.options.timeline.isTimeAllEnabled(time))\n      this.options.node.children('button')\n        .addClass(this.options.classButtonAllEnabled);\n    else if (this.options.timeline.isTimeEnabled(time))\n      this.options.node.children('button')\n        .addClass(this.options.classButtonEnabled);\n    else\n      this.options.node.children('button')\n        .addClass(this.options.classButtonNotEnabled);\n    var that = this;\n    this.dropdownNode\n      .children('li')\n      .children('button.'+this.options.classDropdownItem)\n      .each(function () {\n        var t = new Date(+$(this).data('time'));\n        $(this)\n          .removeClass(that.options.classItemActive)\n          .removeClass(that.options.classItemNotEnabled)\n          .removeClass(that.options.classItemEnabled)\n          .removeClass(that.options.classItemAllEnabled);\n        if (time.valueOf() == t.valueOf())\n          $(this).addClass(that.options.classItemActive);\n        else if (that.options.timeline.isTimeAllEnabled(t))\n          $(this).addClass(that.options.classItemAllEnabled);\n        else if (that.options.timeline.isTimeEnabled(t))\n          $(this).addClass(that.options.classItemEnabled);\n        else\n          $(this).addClass(that.options.classItemNotEnabled);\n      });\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  onChangeTimes() {\n    if (this.dropdownNode === undefined)\n      this.dropdownNode = $('<div>');\n    this.dropdownNode.empty();\n    \n    var groupingFormat =\n            (this.options.grouping == 'daily') ? 'YYYY-MM-DD' :\n              (this.options.grouping == 'hourly') ? 'YYYY-MM-DD HH' :\n                this.options.grouping;\n    var lastGroupTimeStr = undefined;\n    this.getTimelineTimes().forEach(function (time) {\n      if (lastGroupTimeStr === undefined ||\n                    lastGroupTimeStr != this.timeToText(time, groupingFormat)) {\n        if (lastGroupTimeStr !== undefined && // No divider at the beginning\n                        this.options.groupingDivider)\n          this.dropdownNode\n            .append($('<div>')\n              .addClass(this.options.classDropdownDivider));\n        if (this.options.groupingFormat !== undefined)\n          this.dropdownNode\n            .append($('<h6>')\n              .addClass(this.options.classDropdownHeader)\n              .text(this.timeToText(time, this.options.groupingFormat)));\n        lastGroupTimeStr = this.timeToText(time, groupingFormat);\n      }\n      var btn = $('<button>')\n        .addClass(this.options.classDropdownItem)\n        .attr('type', 'button')\n        .text(this.timeToText(time, this.options.format))\n        .data('time', time.valueOf());\n      var that = this;\n      btn.click(function () {\n        that.options.timeline.setSelectedTime(new Date(+$(this).data('time')));\n        that.trigger('input');\n      });\n      this.dropdownNode.append($('<li>').append(btn));\n    }, this);\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  emptyNode() {\n    if (this.visualisationButtonText !== undefined)\n      this.visualisationButtonText.setNode(undefined);\n    this.dropdownNode = undefined;\n    this.options.node.empty();\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  onInitNode() {\n    var id = 'dropdownMenuButton';\n    var i=0;\n    while (document.getElementById(id) != null) {\n      id = 'dropdownMenuButton'+(++i);\n    }\n    \n    var button = $('<button>')\n      .addClass(this.options.classDropdownButton)\n      .attr('type', 'button')\n      .attr('id', id)\n      .attr('data-bs-toggle', 'dropdown')\n      .attr('aria-haspopup', true)\n      .attr('aria-expanded', false);\n    this.visualisationButtonText.setNode(button);\n    this.dropdownNode = $('<ul>')\n      .addClass(this.options.classDropdownMenu)\n      .attr('aria-labelledby', id);\n    this.options.node\n      .addClass(this.options.classMain)\n      .append(button)\n      .append(this.dropdownNode);\n  }\n  \n}\nexport default bsDropdown;","/**\n * @module meteoJS/synview/map\n */\nimport $ from 'jquery';\nimport addEventFunctions from '../Events.js';\n\n/** \n * Event object.\n * \n * @typedef {Object} module:meteoJS/synview/map~extendedEvent\n * @param {module:meteoJS/synview/type.Type} type Type belonging to the event.\n * @param {Object} layer Layer belonging to the event.\n * @param {Object} feature Vector feature, if present.\n * @param {Mixed[]} color Color of pixel (rgba), if present.\n */\n\n/**\n * Options for meteoJS/synview/map.\n * \n * @typedef {Object} module:meteoJS/synview/map~options\n * @param {mixed} map Map object.\n * @param {mixed} layerGroup Layer group within synview will operate.\n */\n\n/**\n * Triggered on view changes.\n * \n * @event module:meteoJS/synview/map#change:view\n */\n\n/**\n * Triggered on pointer moves over map.\n * \n * @event module:meteoJS/synview/map#move:pointer\n */\n\n/**\n * Triggered on pointer clicks into the map, with no dragging. A double click\n * will fire two events.\n * \n * @event module:meteoJS/synview/map#click:pointer\n */\n\n/**\n * Triggered on pointer clicks into the map, with no dragging and no double\n * click.\n * \n * @event module:meteoJS/synview/map#singleclick:pointer\n */\n\n/**\n * Triggered on pointer double clicks into the map, with no dragging.\n * \n * @event module:meteoJS/synview/map#dblclick:pointer\n */\n\n/**\n * Triggered on pointer dragging.\n * \n * @event module:meteoJS/synview/map#drag:pointer\n */\n\n/**\n * Abstract class to defined interface to the mapping library.\n * \n * @abstract\n * @fires module:meteoJS/synview/map#change:view\n */\nexport class SynviewMap {\n  \n  /**\n   * @param {module:meteoJS/synview/map~options} options Options.\n   */\n  constructor(options) {\n    /**\n     * @member {meteoJS/synview/map~options}\n     * @private\n     */\n    this.options = $.extend(true, {\n      map: undefined,\n      layerGroup: undefined\n    }, options);\n  }\n  \n  /**\n   * Returns map object.\n   * \n   * @return {mixed} Map object.\n   */\n  getMap() {\n    return this.options.map;\n  }\n  \n  /**\n   * Helper function. Returns the view center in WGS84 coordinates, lat/lon.\n   * \n   * @abstract\n   * @return {number[]|undefined} Center.\n   */\n  getViewCenter() {}\n  \n  /**\n   * Helper function. Sets the view center in WGS84 coordinates, lat/lon.\n   * \n   * @abstract\n   * @param {number[]|undefined} center Center.\n   * @return {module:meteoJS/synview/map.SynviewMap} This.\n   */\n  setViewCenter() {\n    return this;\n  }\n  \n  /**\n   * Helper function. Returns the view zoom level.\n   * \n   * @abstract\n   * @return {number|undefined} Zoom level.\n   */\n  getViewZoom() {}\n  \n  /**\n   * Helper function. Sets the view zoom level.\n   * \n   * @abstract\n   * @param {number|undefined} zoom Zoom level.\n   * @return {module:meteoJS/synview/map.SynviewMap} This.\n   */\n  setViewZoom() {\n    return this;\n  }\n  \n  /**\n   * Returns a new layer group, already added to the map.\n   * \n   * @abstract\n   * @return {mixed} New layer group.\n   */\n  makeLayerGroup() {}\n  \n  /**\n   * Returns an event object, that is extended by several keys.\n   * Synview internal method.\n   * \n   * @abstract\n   * @param {object} event Map event object.\n   * @param {module:meteoJS/synview/typeCollection.TypeCollection} collection Type collection.\n   * @return {module:meteoJS/synview/map~extendedEvent} Event object.\n   */\n  getExtendedEventByTypeCollection(event) {\n    event.synviewType = undefined;\n    event.layer = undefined;\n    event.feature = undefined;\n    event.color = undefined;\n    return event;\n  }\n  \n  /**\n   * Returns index of the passed layer inside the layer group of the passed type.\n   * Synview internal method.\n   * \n   * @abstract\n   * @param {object} layer Layer object.\n   * @param {module:meteoJS/synview/type.Type} type Type.\n   * @return {integer} Index.\n   */\n  findLayerInType() {\n    return -1;\n  }\n  \n}\naddEventFunctions(SynviewMap.prototype);\nexport default SynviewMap;","/**\n * @module meteoJS/synview/collection\n */\nimport addEventFunctions from '../Events.js';\n\n/**\n * Triggered on adding item to collection.\n * \n * @event module:meteoJS/synview/collection#add:item\n * @param {object} Added item.\n */\n\n/**\n * Triggered on replacing item with already existing ID.\n * \n * @event module:meteoJS/synview/collection#replace:item\n * @param {object} Added item.\n * @param {object} Replaced and removed item.\n */\n\n/**\n * Triggered on removing item from collection.\n * \n * @event module:meteoJS/synview/collection#remove:item\n * @param {object} Removed item.\n */\n\n/**\n * Collection of items.\n * Items have at least a getId() method, which returns a unique ID.\n */\nexport class Collection {\n  \n  constructor() {\n    /**\n     * List of IDs of the items.\n     * @member {mixed}\n     * @private\n     */\n    this.itemIds = [];\n    \n    /**\n     * List of items, ID as key of the object.\n     * @member {Object}\n     * @private\n     */\n    this.items = {};\n  }\n  \n  /**\n   * Returns count of items in this collection.\n   * \n   * @return {integer} Count.\n   */\n  getCount() {\n    return this.itemIds.length;\n  }\n  \n  /**\n   * Returns items (in order as appended).\n   * \n   * @return {Object[]} Items.\n   */\n  getItems() {\n    return this.itemIds.map(function (id) { return this.items[id]; }, this);\n  }\n  \n  /**\n   * Returns a list of IDs (in order as appended).\n   * \n   * @return {mixed[]} List of IDs.\n   */\n  getItemIds() {\n    return this.itemIds;\n  }\n  \n  /**\n   * Returns item by ID, undefined if ID doesn't exist.\n   * \n   * @param {mixed} id ID.\n   * @return {Object|undefined} Item.\n   */\n  getItemById(id) {\n    return (id in this.items) ? this.items[id] : undefined;\n  }\n  \n  /**\n   * Returns if an ID exists in this collection.\n   * \n   * @param {mixed} id ID.\n   * @return {boolean} If exists.\n   */\n  containsId(id) {\n    return this.getIndexById(id) !== -1;\n  }\n  \n  /**\n   * Returns index of the item in this collecition, -1 if not existant.\n   * \n   * @param {mixed} id ID.\n   * @return {integer} Index.\n   */\n  getIndexById(id) {\n    var result = -1;\n    this.itemIds.forEach(function (itemId, i) {\n      if (itemId == id)\n        result = i;\n    });\n    return result;\n  }\n  \n  /**\n   * Append an item to the collection.\n   * \n   * @param {object} item New item.\n   * @return {module:meteoJS/synview/collection.Collection} This.\n   * @fires module:meteoJS/synview/collection#add:item\n   * @fires module:meteoJS/synview/collection#replace:item\n   */\n  append(item) {\n    var id = item.getId();\n    if (this.containsId(id)) {\n      this.trigger('replace:item', item, this.getItemById(id));\n      this.items[id] = item;\n    }\n    else {\n      this.itemIds.push(id);\n      this.items[id] = item;\n      this.trigger('add:item', item);\n    }\n    return this;\n  }\n  \n  /**\n   * Removes an item from the collection.\n   * \n   * @param {mixed} id ID of the item to delete.\n   * @return {module:meteoJS/synview/collection.Collection} This.\n   * @fires module:meteoJS/synview/collection#remove:item\n   */\n  remove(id) {\n    var item = this.getItemById(id);\n    if (item !== undefined) {\n      var index = this.getIndexById(id);\n      delete this.items[id];\n      this.itemIds.splice(index, 1);\n      this.trigger('remove:item', item);\n    }\n    return this;\n  }\n  \n}\naddEventFunctions(Collection.prototype);\nexport default Collection;","const __WEBPACK_NAMESPACE_OBJECT__ = ol.layer.Group;","const __WEBPACK_NAMESPACE_OBJECT__ = ol.layer.Vector;","const __WEBPACK_NAMESPACE_OBJECT__ = ol.Observable;","/**\n * @module meteoJS/synview/resource\n */\nimport VectorLayer from 'ol/layer/Vector';\nimport { unByKey } from 'ol/Observable';\nimport addEventFunctions from '../Events.js';\n\n/**\n * Options for the constructor.\n * \n * @typedef {Object} module:meteoJS/synview/resource~options\n * @param {undefined|String} url - URL to resource.\n * @param {undefined|Date} datetime\n *   Datetime for this resource, undefined if resource have no datetime.\n * @param {undefined|String} mimetype - MIME-Type of the resource.\n * @param {undefined|Integer} reloadTime\n *   After this time period the resource will be reloaded. Undefined for no\n *   reload. (in seconds)\n * @param {undefined|String} className - Type's classname.\n * @param {undefined|boolean} [imageSmoothingEnabled=undefined]\n *   Disable image smoothing to draw sharp edges in image layers.\n *   Undefined uses the default (true).\n * @param {Object} ol - Options for openlayers.\n * @param {Object|external:ol/source/Source~Source|undefined} ol.source\n *   Options for openlayers source object or OL source object already.\n * @param {Object.<string,Function>|undefined} ol.events \n *   Function to listen to module:ol/render/Event~RenderEvent.\n * @param {undefined|external:ol/style/Style~Style|external:ol/style/Style~Style|external:ol/style/Style~StyleFunction} [ol.style]\n *   Style for features. If this is a module:ol/style/Style~StyleFunction,\n *   then \"this\" will be bound to this module:meteoJS/synview/resource~Resource.\n */\n\n/**\n * Object representing a resource.\n */\nexport class Resource {\n  \n  /**\n   * @param {module:meteoJS/synview/resource~options} options - Options.\n   */\n  constructor({\n    url = undefined,\n    datetime = undefined,\n    mimetype = undefined,\n    reloadTime = undefined,\n    className = undefined,\n    imageSmoothingEnabled = undefined,\n    ol = {}\n  } = {}) {\n    /**\n     * @type {Object}\n     * @private\n     */\n    this.options = {\n      url,\n      datetime,\n      mimetype,\n      reloadTime,\n      className,\n      ol\n    };\n    this._normalizeOLOptions(this.options.ol);\n    \n    /**\n     * @type {external:ol.layer.Layer|undefined}\n     * @private\n     */\n    this.layer = undefined;\n    \n    /**\n     * @type {ol.layer.Group|L.layerGroup|undefined}\n     * @private\n     */\n    this.layerGroup = undefined;\n    \n    /**\n     * @type {number|undefined}\n     * @private\n     */\n    this.reloadTimerId = undefined;\n    \n    /**\n     * @type {boolean}\n     * @private\n     */\n    this.visible = false;\n    \n    /**\n     * @type {number|undefined}\n     * @private\n     */\n    this.zIndex = undefined;\n    \n    /**\n     * @type {number}\n     * @private\n     */\n    this.opacity = 1.0;\n    \n    /**\n     * @type {boolean}\n     * @private\n     */\n    this._imageSmoothing = imageSmoothingEnabled;\n  }\n  \n  /**\n   * Returns an ID for this resource. Should change, if content of resource\n   * changes.\n   * \n   * @return {mixed} Id.\n   */\n  getId() {\n    return this.getUrl();\n  }\n  \n  /**\n   * Returns URL to the resource. Undefined if unknown.\n   * \n   * @return {string|undefined} URL.\n   */\n  getUrl() {\n    return this.options.url;\n  }\n  \n  /**\n   * Returns the datetime of the resource.\n   * \n   * @return {Date|undefined} Date.\n   */\n  getDatetime() {\n    return this.options.datetime;\n  }\n  \n  /**\n   * Returns MIME-Type of the resource.\n   * \n   * @return {string} MIME-Type.\n   */\n  getMIMEType() {\n    return (this.options.mimetype === undefined) ?\n      'application/octet-stream' : this.options.mimetype;\n  }\n  \n  /**\n   * Returns the current reload time.\n   * \n   * @return {undefined|integer} Reload time period.\n   */\n  getReloadTime() {\n    return this.options.reloadTime;\n  }\n  \n  /**\n   * Sets the reload time.\n   * \n   * @param {undefined|integer} reloadTime Reload time period.\n   * @return {module:meteoJS/synview/resource.Resource} This.\n   */\n  setReloadTime(reloadTime) {\n    this.options.reloadTime = reloadTime;\n    this._reload(); // starts or stops frequent reload\n    return this;\n  }\n  \n  /**\n   * Returns the visibility of the resource layer.\n   * \n   * @return {boolean} Visible.\n   */\n  getVisible() {\n    return this.visible;\n  }\n  \n  /**\n   * Sets the visibility of the resource layer.\n   * \n   * @param {boolean} visible Visible.\n   * @return {module:meteoJS/synview/resource.Resource} This.\n   */\n  setVisible(visible) {\n    this.visible = visible;\n    if (this.layer !== undefined) {\n      // OpenLayers\n      if ('setVisible' in this.layer)\n        this.layer.setVisible(visible);\n      // Leaflet\n      else {\n        if (this.visible)\n          this.layer.addTo(this.layerGroup);\n        else\n          this.layerGroup.removeLayer(this.layer);\n      }\n    }\n    return this;\n  }\n  \n  /**\n   * Returns the z-Index of the resource layer.\n   * \n   * @return {number|undefined} z-Index.\n   */\n  getZIndex() {\n    return this.zIndex;\n  }\n  \n  /**\n   * Sets the z-Index of the resource layer.\n   * \n   * @param {number|undefined} zIndex z-Index.\n   * @return {module:meteoJS/synview/resource.Resource} This.\n   */\n  setZIndex(zIndex) {\n    this.zIndex = zIndex;\n    if (this.layer !== undefined)\n      this.layer.setZIndex(zIndex);\n    return this;\n  }\n  \n  /**\n   * Returns opacity of the resource layer.\n   * \n   * @return {number} Opacity.\n   */\n  getOpacity() {\n    return this.opacity;\n  }\n  \n  /**\n   * Sets opacity of the resource layer.\n   * \n   * @param {number} opacity Opacity.\n   * @return {module:meteoJS/synview/resource.Resource} This.\n   */\n  setOpacity(opacity) {\n    this.opacity = opacity;\n    if (this.layer !== undefined)\n      this.layer.setOpacity(opacity);\n    return this;\n  }\n  \n  /**\n   * Classname.\n   * \n   * @type undefined|String\n   */\n  get className() {\n    return this.options.className;\n  }\n  set className(className) {\n    this.options.className = className;\n  }\n  \n  /**\n   * imageSmoothingEnabled.\n   * \n   * @type undefined|boolean\n   */\n  get imageSmoothingEnabled() {\n    return this._imageSmoothing;\n  }\n  set imageSmoothingEnabled(imageSmoothing) {\n    this._imageSmoothing = imageSmoothing;\n  }\n  \n  /**\n   * Returns the layer group of the resource layer.\n   * \n   * @return {external:ol.layer.group|external:L.layerGroup|undefined} Layer group.\n   */\n  getLayerGroup() {\n    return this.layerGroup;\n  }\n  \n  /**\n   * Sets the layer group and adds the resource layer to this group.\n   * If undefined is passed, the resource layer will be deleted and removed for\n   * any layer group.\n   * \n   * @param {external:ol.layer.group|external:L.layerGroup|undefined} layerGroup Layer group.\n   * @return {module:meteoJS/synview/resource.Resource} This.\n   */\n  setLayerGroup(layerGroup) {\n    if (this.layerGroup !== undefined &&\n        this.layer !== undefined) {\n      // OpenLayers\n      if ('remove' in this.layerGroup.getLayers())\n        this.layerGroup.getLayers().remove(this.layer);\n      // Leaflet\n      else\n        this.layerGroup.removeLayer(this.layer);\n    }\n    if (layerGroup === undefined)\n      this.layer = undefined;\n    this.layerGroup = layerGroup;\n    if (this.layerGroup !== undefined) {\n      // Leaflet\n      if ('addLayer' in this.layerGroup) {\n        var layer = this.getLLLayer();\n        if (this.getVisible())\n          this.layerGroup.addLayer(layer);\n      }\n      // OpenLayers\n      else\n        this.layerGroup.getLayers().push(this.getOLLayer());\n    }\n    this.setReloadTime(this.getReloadTime()); // Trigger reload interval\n    return this;\n  }\n  \n  /**\n   * Returns layer for openlayers of this resource.\n   * \n   * @return {external:ol.layer.Layer} openlayers layer.\n   */\n  getOLLayer() {\n    if (this.layer !== undefined)\n      return this.layer;\n    this.layer = this._makeOLLayer();\n    return this.layer;\n  }\n  \n  /**\n   * Returns openlayers layer of this resource. Must be overwritten by child\n   * classes.\n   * \n   * @protected\n   * @return {external:ol.layer.Layer} openlayers layer.\n   */\n  makeOLLayer() {\n    // Dies on instantiation of ol.layer.Layer, so use ol.layer.Vector\n    return new VectorLayer({\n      className: this.className\n    });\n  }\n  \n  /**\n   * Returns a ready to use OpenLayers layer.\n   * \n   * @private\n   * @return {external:ol.layer.Layer} openlayers layer.\n   */\n  _makeOLLayer() {\n    let layer = this.makeOLLayer();\n    layer.setVisible(this.visible);\n    layer.setZIndex(this.zIndex);\n    layer.setOpacity(this.opacity);\n    if ('events' in this.options.ol &&\n        this.options.ol.events !== undefined)\n      ['prerender', 'postrender'].forEach(eventName => {\n        if (eventName in this.options.ol.events &&\n            this.options.ol.events[eventName] !== undefined)\n          layer.on(eventName, event => {\n            this.options.ol.events[eventName].call(this, event, layer);\n          });\n      });\n    \n    if (!this._imageSmoothing) {\n      const source = layer.getSource();\n      if (source !== null &&\n          'contextOptions_' in source)\n        source.contextOptions_ = {\n          imageSmoothingEnabled: false,\n          msImageSmoothingEnabled: false\n        };\n    }\n    \n    return layer;\n  }\n  \n  /**\n   * Returns layer for Leaflet of this resource.\n   * \n   * @return {external:L.layer} Leaflet layer.\n   */\n  getLLLayer() {\n    if (this.layer !== undefined)\n      return this.layer;\n    this.layer = this._makeLLLayer();\n    return this.layer;\n  }\n  \n  /**\n   * Returns Leaflet layer of this resource. Must be overwritten by child\n   * classes.\n   * \n   * @protected\n   * @return {external:L.Layer} Leaflet layer.\n   */\n  makeLLLayer() {\n    // Dies on instantiation of ol.layer.Layer, so use ol.layer.Vector\n    return L.Layer();\n  }\n  \n  /**\n   * Preload resource. By default, openlayers loads the resource as soon as\n   * the resource gets visible.\n   */\n  preload() {}\n  \n  /**\n   * Returns a ready to use Leaflet layer.\n   * \n   * @private\n   * @return {external:L.Layer} Leaflet layer.\n   */\n  _makeLLLayer() {\n    return this.makeLLLayer();\n  }\n  \n  /**\n   * Reload source.\n   * \n   * @private\n   * @return {module:meteoJS/synview/resource.Resource} This.\n   */\n  _reload() {\n    // Stop possible earlier reload\n    if (this.reloadTimerId !== undefined) {\n      clearTimeout(this.reloadTimerId);\n      this.reloadTimerId = undefined;\n    }\n    // No frequent reload\n    if (this.options.reloadTime === undefined)\n      return;\n    // Reload could only be handled, if layerGroup is defined\n    if (this.layerGroup === undefined)\n      return;\n    var reloadFunction = (function () {\n      this.reloadTimerId = undefined;\n      if (this.layerGroup === undefined)\n        return;\n      var layer = this._makeOLLayer();\n      // Hackish reload of sources, it is not handled properly by OpenLayers.\n      // 1. Non-tile sources, they have a 'getUrl' method.\n      if ('getUrl' in layer.getSource()) {\n        var layerGroup = this.layerGroup;\n        // event triggered, even if source is cached.\n        var key = layer.getSource().on('change', (function () {\n          if (layer.getSource().getState() == 'ready' ||\n              layer.getSource().getState() == 'error') {\n            // Execute code once, once the data is loaded.\n            unByKey(key);\n            if (layer.getSource().getState() == 'ready' &&\n                this.layerGroup !== undefined) {\n              layer.setVisible(this.layer.getVisible());\n              layer.setOpacity(this.layer.getOpacity());\n              layer.setZIndex(this.layer.getZIndex());\n              this.layerGroup.getLayers().remove(this.layer);\n              this.layer = layer;\n            }\n            else if (this.layerGroup !== undefined)\n              this.layerGroup.getLayers().remove(layer);\n            else\n              layerGroup.getLayers().remove(layer);\n            if (this.reloadTimerId === undefined &&\n                this.options.reloadTime !== undefined &&\n                this.layerGroup !== undefined)\n              this.reloadTimerId =\n                setTimeout(reloadFunction, this.options.reloadTime * 1000);\n          }\n        }).bind(this));\n        this.layerGroup.getLayers().push(layer);\n        layer.setVisible(true); // Force load of data by make the layer visible.\n      }\n      else {\n        /* Tile sources in OpenLayers doesn't support a request to check, if all\n         * tiles are loaded, because cached tiles doesn't generate any event.\n         * Uncached tiles fire tileloadstart/end/error events.\n         * So we wait a second and exchange then the old with the new layer. If\n         * the reload of the data is smaller of one second, this suppresses that\n         * neither the old layer nor the new data is visible. */\n        this.layerGroup.getLayers().push(layer);\n        layer.setVisible(true);\n        setTimeout((function () {\n          this.layer = layer;\n          if (this.reloadTimerId === undefined &&\n              this.options.reloadTime !== undefined)\n            this.reloadTimerId =\n              setTimeout(reloadFunction, this.options.reloadTime * 1000);\n        }).bind(this), 1000);\n      }\n    }).bind(this);\n    this.reloadTimerId =\n      setTimeout(reloadFunction, this.options.reloadTime * 1000);\n    return this;\n  }\n  \n  /**\n   * Normalizes this.options.ol.\n   * \n   * @private\n   * @param {Object|external:ol/source/Source~Source|undefined} source\n   * @param {Object.<string,Function>|undefined} events\n   * @param {external:ol/style/Style~Style|external:ol/style/Style~StyleLike|external:ol/style/Style~StyleFunction|undefined} [style]\n   */\n  _normalizeOLOptions({\n    source = {},\n    events = undefined,\n    style = undefined\n  }) {\n    this.options.ol = {\n      source,\n      events,\n      style\n    };\n  }\n  \n}\naddEventFunctions(Resource.prototype);\nexport default Resource;","/**\n * @module meteoJS/synview/resourceCollection\n */\nimport Collection from './Collection.js';\nimport Resource from './Resource.js';\n\n/**\n * Collection of resource objects.\n * Extends meteoJS.synview.collection with storage of time objects.\n * This collection contains either a list of resources assigned with time or\n * one resource with no time (or both). With the methods from\n * meteoJS.synview.collection all resources (with or without time) will be\n * retrieved. Id of the resource without time is '' (empty string).\n * \n * @extends module:meteoJS/synview/collection.Collection\n */\nexport class ResourceCollection extends Collection {\n  \n  constructor() {\n    super();\n    \n    /**\n     * List of the datetime objects of the resources (sorted upwardly).\n     * @member {Date[]}\n     * @private\n     */\n    this.times = [];\n  }\n  \n  /**\n   * Returns all resources assigned with time (ordered temporal upwardly).\n   * \n   * @return {module:meteoJS/synview/resource.Resource[]} Resources.\n   */\n  getResources() {\n    return this.times.map(function (time) {\n      return this.items[time.valueOf()];\n    }, this);\n  }\n  \n  /**\n   * Returns times (ordered temporal upwardly).\n   * \n   * @return {Date[]} Times (no invalid times).\n   */\n  getTimes() {\n    return this.times;\n  }\n  \n  /**\n   * @override\n   * @param {mixed} id ID.\n   * @return {module:meteoJS/synview/resource.Resource} Resource.\n   */\n  getItemById(id) {\n    var res = super.getItemById(id);\n    return (res === undefined) ? new Resource() : res;\n  }\n  \n  /**\n   * Returns resource valid at passed datetime (could be an invalid datetime).\n   * If resource doesn't exist, an empty object is returned.\n   * \n   * @param {Date} time Datetime.\n   * @return {module:meteoJS/synview/resource.Resource} Resource.\n   */\n  getResourceByTime(time) {\n    return this.getItemById(isNaN(time) ? '' : time.valueOf());\n  }\n  \n  /**\n   * Returns if a resource with passed time exists. Time could be invalid.\n   * \n   * @param {Date} Time.\n   * @return {boolean} If exists.\n   */\n  containsTime(time) {\n    return this.getIndexById(isNaN(time) ? '' : time.valueOf()) > -1;\n  }\n  \n  /**\n   * Returns index of the time inside the times array. Time could be invalid.\n   * -1 if not existant.\n   * \n   * @param {Date} time Time.\n   * @return {integer} Index.\n   */\n  getIndexByTime(time) {\n    var result = -1;\n    if (!isNaN(time))\n      this.times.forEach(function (t, i) {\n        if (t.valueOf() == time.valueOf())\n          result = i;\n      });\n    return result;\n  }\n  \n  /**\n   * Returns if a resource with ID exists in this collection.\n   * \n   * @return {module:meteoJS/synview/resource.Resource}\n   */\n  getNewestResource() {\n    if (this.times.length < 1)\n      return new Resource();\n    return this.getResourceByTime(this.times[this.times.length-1]);\n  }\n  \n  /**\n   * Append a resource to the collection.\n   * \n   * @override\n   * @param {module:meteoJS/synview/resource.Resource} resource Resource.\n   * @return {module:meteoJS/synview/resourceCollection.ResourceCollection} This.\n   */\n  append(resource) {\n    this._append(resource);\n    this._sortTimes();\n    return this;\n  }\n  \n  /**\n   * Removes a resource from the collection.\n   * \n   * @override\n   * @param {Date} time Resource's time.\n   * @return {module:meteoJS/synview/resourceCollection.ResourceCollection} This.\n   */\n  remove(time) {\n    this._remove(isNaN(time) ? '' : time.valueOf());\n    this._sortTimes();\n    return this;\n  }\n  \n  /**\n   * Exchanges the collection content with a list of resource.\n   * \n   * @param {module:meteoJS/synview/resource.Resource[]} resources Resources.\n   * @fires module:meteoJS/synview/collection#add:item\n   * @fires module:meteoJS/synview/collection#replace:item\n   * @fires module:meteoJS/synview/collection#remove:item\n   * @return {module:meteoJS/synview/resourceCollection.ResourceCollection} This.\n   */\n  setResources(resources) {\n    resources.forEach(function (resource) {\n      this._append(resource);\n    }, this);\n    this._filterTimesByResources(resources);\n    this._sortTimes();\n    return this;\n  }\n  \n  /**\n   * Append a resource to the collection without reordering times-array.\n   * \n   * @private\n   * @param {module:meteoJS/synview/resource.Resource} resource Resource.\n   */\n  _append(resource) {\n    var time = resource.getDatetime();\n    var id = (time === undefined) ? '' : time.valueOf();\n    if (this.containsId(id)) {\n      this.trigger('replace:item', resource, this.getItemById(id));\n      this.items[id] = resource;\n    }\n    else {\n      this.itemIds.push(id);\n      this.items[id] = resource;\n      if (time !== undefined && !isNaN(time))\n        this.times.push(time);\n      this.trigger('add:item', resource);\n    }\n  }\n  \n  /**\n   * Removes a resource fromt the collection without reordering times-array.\n   * \n   * @private\n   * @param {mixed} id Resource ID.\n   */\n  _remove(id) {\n    var index = this.getIndexById(id);\n    if (index > -1) {\n      var resource = this.items[id];\n      delete this.items[id];\n      this.itemIds.splice(index, 1);\n      if (id !== undefined && id !== '' && !isNaN(id)) {\n        var tIndex = this.times.findIndex(function (t) {\n          return t.valueOf() == id;\n        });\n        if (tIndex > -1)\n          this.times.splice(tIndex, 1);\n      }\n      this.trigger('remove:item', resource);\n    }\n  }\n  \n  /**\n   * Removes all resources whose times doesn't exist in the collection.\n   * \n   * @private\n   * @param {module:meteoJS/synview/resource.Resource[]}\n   */\n  _filterTimesByResources(resources) {\n    var containsStaticResource = false;\n    this.times = this.times.filter(function (t) {\n      var filter = false;\n      var i = resources.findIndex(function (resource) {\n        var match = false;\n        var time = resource.getDatetime();\n        if (time !== undefined &&\n            t.valueOf() == time.valueOf()) {\n          match = true;\n        }\n        else if (time === undefined)\n          containsStaticResource = true;\n        return match;\n      }, this);\n      if (i < 0) {\n        this.remove(t.valueOf());\n        filter = true;\n      }\n      return !filter;\n    }, this);\n    if (containsStaticResource)\n      this.remove('');\n  }\n  \n  /**\n   * Sortiert den Zeit-Array this.times der Reihe nach.\n   * @private\n   */\n  _sortTimes() {\n    this.times.sort(function (a, b) {\n      return a.valueOf()-b.valueOf();\n    });\n  }\n  \n}\nexport default ResourceCollection;","/**\n * @module meteoJS/synview/type\n */\nimport LayerGroup from 'ol/layer/Group';\nimport addEventFunctions from '../Events.js';\nimport ResourceCollection from './ResourceCollection.js';\nimport Resource from './Resource.js';\n\n/**\n * Preload options.\n * \n * @typedef {Object} module:meteoJS/synview/type~preloadOptions\n * @property {boolean} [enabled=false] - Enable preload of the resources.\n */\n\n/**\n * Options for the constructor.\n * \n * @typedef {Object} module:meteoJS/synview/type~options\n * @param {string|undefined} id ID.\n * @param {boolean} [visible] Visibility.\n * @param {undefined|number} [zIndex] zIndex on map.\n * @param {'nearest'|'floor'} [displayMethod]\n *   Method to determine the displayed resource.\n * @param {number} [displayMaxResourceAge]\n *   Maximum time space between display and resource time (in seconds).\n * @param {number} [displayFadeStart]\n *   Fade resource from this age to the display time (in seconds).\n * @param {number} [displayFadeStartOpacity]\n *   Opacity (between 0 and 1) at displayFadingTime.\n * @param {undefined|String} className - Classname.\n * @param {undefined|boolean} [imageSmoothingEnabled=undefined]\n *   Value of\n *   {@link https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/imageSmoothingEnabled|imageSmoothingEnabled}\n *   when drawing the layers of this type to canvas.\n *   Undefined uses the default (true). When a\n *   {@link module:meteoJS/synview/resource.Resource}\n *   has explicitly set an own value \n *   ({@link module:meteoJS/synview/resource.Resource#imageSmoothingEnabled}),\n *   this will be ignored.\n * @param {module:meteoJS/synview/tooltip~contentFunction|undefined} [tooltip]\n *   Tooltip function. If color detection will be used with this type, you must\n *   set an unique className.\n * @param {module:meteoJS/synview/type~preloadOptions} [preload]\n *   Preload options.\n */\n\n/**\n * Triggered on change of visibilty.\n * \n * @event module:meteoJS/synview/type#change:visible\n */\n\n/**\n * Triggered, if the set of timestamps changes (due to resource changes).\n * \n * @event module:meteoJS/synview/type#change:resources\n */\n\n/**\n * @classdesc Type to display by synview, like a serie of radar images.\n * \n * @fires module:meteoJS/synview/type#change:visible\n */\nexport class Type {\n  \n  /**\n   * @param {module:meteoJS/synview/type~options} options Options.\n   */\n  constructor({\n    id = undefined,\n    visible = true,\n    zIndex = undefined,\n    displayMethod = 'floor',\n    displayMaxResourceAge = 3*3600,\n    displayFadeStart = 15*60,\n    displayFadeStartOpacity = 0.95,\n    resources = undefined,\n    className = undefined,\n    imageSmoothingEnabled = undefined,\n    tooltip = undefined,\n    preload = {}\n  } = {}) {\n    /**\n     * @type Object\n     * @private\n     */\n    this.options = {\n      id,\n      visible,\n      zIndex,\n      displayMethod,\n      displayMaxResourceAge,\n      displayFadeStart,\n      displayFadeStartOpacity,\n      resources,\n      className,\n      imageSmoothingEnabled,\n      tooltip\n    };\n    \n    /**\n     * The mapping group to display all the resources. (openlayers specific)\n     * @member {undefined|external:ol/layer/Group~LayerGroup}\n     * @default\n     * @private\n     */\n    this.layerGroup = undefined;\n    \n    /**\n     * Collection of resources.\n     * @member {module:meteoJS/synview/resourceCollection.ResourceCollection}\n     * @private\n     */\n    this.collection = new ResourceCollection();\n    \n    /**\n     * Time of displayed resource.\n     * @member {Date}\n     * @private\n     */\n    this.displayedResourceTime = new Date('invalid');\n    \n    // Collection initialisieren\n    this.collection.on('add:item', function (resource) {\n      resource.className = this.className;\n      this._addOLLayer(resource);\n      if (this._preload.enabled)\n        resource.preload();\n    }, this);\n    this.collection.on('remove:item', function (resource) {\n      this._removeOLLayer(resource);\n    }, this);\n    this.collection.on('replace:item', function (newResource, oldResource) {\n      if (newResource !== oldResource) {\n        newResource.className = this.className;\n        this._replaceOLLayer(newResource, oldResource);\n        if (this._preload.enabled)\n          newResource.preload();\n      }\n    }, this);\n    \n    /**\n     * Preload options.\n     * @type module:meteoJS/synview/type~preloadOptions\n     * @private\n     */\n    this._preload = preload;\n    \n    if (this.options.resources !== undefined)\n      this.collection.setResources(this.options.resources);\n    delete this.options.resources;\n  }\n  \n  /**\n   * Returns ID of type.\n   * \n   * @return {string|undefined}\n   */\n  getId() {\n    return this.options.id;\n  }\n  \n  /**\n   * Sets ID of type.\n   * \n   * @param {string|undefined} id ID.\n   * @return {module:meteoJS/synview/type.Type} This.\n   */\n  setId(id) {\n    this.options.id = id;\n    return this;\n  }\n  \n  /**\n   * Returns visibility.\n   * \n   * @return {boolean} Visibility.\n   */\n  getVisible() {\n    return this.options.visible;\n  }\n  \n  /**\n   * Sets visibility.\n   * \n   * @param {boolean} visible Visibility.\n   * @return {module:meteoJS/synview/type.Type} This.\n   * @fires module:meteoJS/synview/type#change:visible\n   */\n  setVisible(visible) {\n    // Nur etwas unternehmen, falls Visible ändert\n    if (this.options.visible ? !visible : visible) {\n      this.options.visible = visible ? true : false;\n      if (this.layerGroup !== undefined)\n        this.layerGroup.setVisible(this.options.visible);\n      this.getResourceCollection().getItems().forEach(function (resource) {\n        if (isNaN(resource.getDatetime()))\n          resource.setVisible(this.options.visible);\n        resource.setLayerGroup(this.options.visible ? this.layerGroup : undefined);\n      }, this);\n      this.trigger('change:visible');\n    }\n    return this;\n  }\n  \n  /**\n   * Returns the z Index.\n   * \n   * @return {undefined|number}\n   */\n  getZIndex() {\n    return this.options.zIndex;\n  }\n  \n  /**\n   * Sets the z Index.\n   * \n   * @param {undefined|number} zIndex z-Index.\n   * @return {module:meteoJS/synview/type.Type} This.\n   */\n  setZIndex(zIndex) {\n    this.options.zIndex = zIndex;\n    if (this.layerGroup !== undefined)\n      this.layerGroup.setZIndex(zIndex);\n    this.getResourceCollection().getItems().forEach(function (resource) {\n      resource.setZIndex(zIndex);\n    });\n    return this;\n  }\n  \n  /**\n   * Classname.\n   * \n   * @type undefined|String\n   */\n  get className() {\n    return this.options.className;\n  }\n  set className(className) {\n    this.options.className = className;\n  }\n  \n  /**\n   * Returns layer-group of this type on the map.\n   * \n   * return {external:ol/layer/Group~LayerGroup} Layer-group.\n   */\n  getLayerGroup() {\n    return (this.layerGroup === undefined) ? new LayerGroup() : this.layerGroup;\n  }\n  \n  /**\n   * Sets map layer-group for this type.\n   * \n   * @param {external:ol/layer/Group~LayerGroup} group layer-group.\n   * @return {module:meteoJS/synview/type.Type} This.\n   */\n  setLayerGroup(group) {\n    this.layerGroup = group;\n    if (this.layerGroup !== undefined) {\n      if ('setVisible' in this.layerGroup) // Leaflet doesn't know visibility\n        this.layerGroup.setVisible(this.options.visible);\n      this.layerGroup.setZIndex(this.options.zIndex);\n    }\n    this.getResourceCollection().getItems().forEach(function (resource) {\n      resource.setLayerGroup(this.options.visible ? group : undefined);\n    }, this);\n    return this;\n  }\n  \n  /**\n   * Returns collection of the resources.\n   * Note: If you directly append resources to the collection, no\n   * {@link module:meteoJS/synview/type#change:resources} event will be fired.\n   * \n   * @return {module:meteoJS/synview/resourceCollection.ResourceCollection} resourceCollection.\n   */\n  getResourceCollection() {\n    return this.collection;\n  }\n  \n  /**\n   * Append a resource to the collection.\n   * If type is visible, this might also change the resources on the map.\n   * \n   * @param {module:meteoJS/synview/resource.Resource} resource Resource object.\n   * @return {module:meteoJS/synview/type.Type} This.\n   * @fires module:meteoJS/synview/type#change:resources\n   */\n  appendResource(resource) {\n    this.collection.append(resource);\n    \n    // show current layer again\n    this.setDisplayTime(this.displayedResourceTime);\n    \n    /* Trigger event after setDisplayTime, therewith the synview object can\n     * set the desired time in the timeline object. */\n    this.trigger('change:resources');\n    return this;\n  }\n  \n  /**\n   * Removes a resource from the collection.\n   * If type is visible, this might also change the resources on the map.\n   * \n   * @param {module:meteoJS/synview/resource.Resource} resource Resource object.\n   * @return {module:meteoJS/synview/type.Type} This.\n   * @fires module:meteoJS/synview/type#change:resources\n   */\n  removeResource(resource) {\n    // hide current layer\n    this._hideVisibleResource();\n    \n    this.collection.remove(resource.getDatetime());\n    \n    // show current layer again\n    this.setDisplayTime(this.displayedResourceTime);\n    \n    /* Trigger event after setDisplayTime, therewith the synview object can\n     * set the desired time in the timeline object. */\n    this.trigger('change:resources');\n    return this;\n  }\n  \n  /**\n   * Sets resources in the collection (and replaces previous ones).\n   * If type is visible, this might also change the resources on the map.\n   * \n   * @param {module:meteoJS/synview/resource.Resource[]} resources List of resource objects.\n   * @return {module:meteoJS/synview/type.Type} This.\n   * @fires module:meteoJS/synview/type#change:resources\n   */\n  setResources(resources) {\n    // hide current layer\n    this._hideVisibleResource();\n    \n    this.collection.setResources(resources);\n    \n    // show current layer again\n    this.setDisplayTime(this.displayedResourceTime);\n    \n    /* Trigger event after setDisplayTime, therewith the synview object can\n     * set the desired time in the timeline object. */\n    this.trigger('change:resources');\n    return this;\n  }\n  \n  /**\n   * Returns resource of the displayed resource. If type contains resources\n   * with timestamps as well as a static resource, only a resource with timestamp\n   * will be returned. If type is invisible or no layer group is set, no resource\n   * is display, therefore an empty resource will be returned.\n   * \n   * @return {module:meteoJS/synview/resource.Resource} Resource.\n   */\n  getDisplayedResource() {\n    if (this.getVisible() &&\n        this.layerGroup !== undefined) {\n      if (isNaN(this.displayedResourceTime))\n        return (this.collection.getTimes().length > 0) ?\n          new Resource() :\n          this.collection.getResourceByTime(this.displayedResourceTime);\n      else\n        return this.collection.getResourceByTime(this.displayedResourceTime);\n    }\n    else\n      return new Resource();\n  }\n  \n  /**\n   * Sets time to display. Corresponding to the options an adequate resource will\n   * be searched and displayed. (accessible via getDisplayedResource())\n   * \n   * @param {Date} time Display time.\n   * @return {module:meteoJS/synview/type.Type} This.\n   */\n  setDisplayTime(time) {\n    if (!this.getVisible())\n      return this;\n    var time_to_show = this._getResourceTimeByDisplayTime(time);\n    if (time_to_show === undefined ||\n        time_to_show !== undefined &&\n        !isNaN(this.displayedResourceTime) &&\n        this.displayedResourceTime.valueOf() != time_to_show.valueOf())\n      this._hideVisibleResource();\n    if (time_to_show !== undefined) {\n      this.displayedResourceTime = time_to_show;\n      var resource = this.getResourceCollection().getItemById(time_to_show.valueOf());\n      if (resource.getId()) {\n        resource.setVisible(true);\n        var opacity = 1.0;\n        if (Math.abs(time.valueOf() - time_to_show.valueOf()) > this.options.displayMaxResourceAge*1000) // 3h\n          opacity = 0.0;\n        else if (Math.abs(time.valueOf() - time_to_show.valueOf()) > this.options.displayFadeStart*1000) // 15min\n          opacity = this.options.displayFadeStartOpacity *\n            (Math.abs(time.valueOf() - time_to_show.valueOf()) -\n             this.options.displayMaxResourceAge * 1000) /\n            (1000 *\n             (this.options.displayFadeStart - this.options.displayMaxResourceAge));\n        resource.setOpacity(opacity);\n      }\n    }\n    else\n      this.displayedResourceTime = new Date('invalid');\n    return this;\n  }\n  \n  /**\n   * Returns the current tooltip function, undefined for no tooltip.\n   * \n   * @return {module:meteoJS/synview/tooltip~contentFunction|undefined} Tooltip function.\n   */\n  getTooltip() {\n    return this.options.tooltip;\n  }\n  \n  /**\n   * Sets the tooltip function. Undefined for no tooltip.\n   * \n   * @param {module:meteoJS/synview/tooltip~contentFunction|undefined} tooltip Tooltip function.\n   * @return {module:meteoJS/synview/type.Type} This.\n   */\n  setTooltip(tooltip) {\n    this.options.tooltip = tooltip;\n    return this;\n  }\n  \n  /**\n   * Sets style of all resources (if resource has 'setOLStyle' method).\n   * If argument 'style' isn't declared, the style will be updated.\n   * Convenience method, you could also loop over all resources.\n   * \n   * @param {externalol/style/Style~Style} [style] OpenLayers style.\n   * @returns {module:meteoJS/synview/type.Type} This.\n   */\n  setResourcesOLStyle() {\n    var styleArguments = arguments;\n    this.getResourceCollection().getItems().forEach(function (resource) {\n      if ('setOLStyle' in resource)\n        resource.setOLStyle.apply(resource, styleArguments);\n    });\n    return this;\n  }\n  \n  /**\n   * Blendet aktuell dargestellten OL-Layer aus.\n   * @private\n   */\n  _hideVisibleResource() {\n    if (!isNaN(this.displayedResourceTime))\n      this.getResourceCollection()\n        .getItemById(this.displayedResourceTime.valueOf())\n        .setVisible(false);\n  }\n  \n  /**\n   * Füge dem layers-Objekt einen neuen OL-Layer hinzu\n   * @private\n   * @param {module:meteoJS/synview/resource.Resource} resource Entsprechende Resource zum Hinzufügen\n   */\n  _addOLLayer(resource) {\n    // Show static resources if visible\n    if (isNaN(resource.getDatetime()))\n      resource.setVisible(this.getVisible());\n    if (this.options.imageSmoothingEnabled !== undefined &&\n        resource.imageSmoothingEnabled === undefined)\n      resource.imageSmoothingEnabled = this.options.imageSmoothingEnabled;\n    resource.setLayerGroup(this.getLayerGroup());\n    resource.setZIndex(this.options.zIndex);\n  }\n  \n  /**\n   * Löscht aus layers-Objekt einen OL-Layer\n   * @private\n   * @param {module:meteoJS/synview/resource.Resource} resource Entsprechende Resource zum Hinzufügen\n   */\n  _removeOLLayer(resource) {\n    resource.setLayerGroup(undefined);\n  }\n  \n  /**\n   * Ersetzt im layers-Objekt einen OL-Layer\n   * @private\n   * @param {module:meteoJS/synview/resource.Resource} newResource Resource zum Hinzufügen\n   * @param {module:meteoJS/synview/resource.Resource} oldResource Resource zum Ersetzen\n   */\n  _replaceOLLayer(newResource, oldResource) {\n    this._removeOLLayer(oldResource);\n    this._addOLLayer(newResource);\n  }\n  \n  /**\n   * Gibt eine Zeit mit vorhandener Resource zu einer darzustellenden Zeit zurück.\n   * Es gibt dazu verschiedene Optionen (this.options.displayMethod):\n   * 'nearest': Wähle die zeitlich nächstgelegene Resource aus\n   * 'floor':   Wähle die Resource direkt zum Zeitpunkt oder zeitlich direkt vor\n   *            dem Termin.\n   * @private\n   * @return {undefined|Date} Resource time or undefined if not existing.\n   */\n  _getResourceTimeByDisplayTime(time) {\n    if (isNaN(time))\n      return undefined;\n    var resultTime = undefined;\n    this.collection.getTimes().forEach(function (resourceTime) {\n      /*if (resultTime === undefined)\n        resultTime = resourceTime;\n      else {*/\n      switch (this.options.displayMethod) {\n      case 'exact':\n        if (time.valueOf() == resourceTime.valueOf())\n          resultTime = resourceTime;\n        break;\n      case 'nearest':\n        if (resultTime === undefined ||\n                Math.abs(time.valueOf() - resourceTime.valueOf()) <\n                  Math.abs(time.valueOf() - resultTime.valueOf()))\n          resultTime = resourceTime;\n        break;\n      case 'floor':\n      default:\n        if (resultTime === undefined ||\n                resourceTime.valueOf() <= time.valueOf() &&\n                (time.valueOf() - resourceTime.valueOf() <\n                 time.valueOf() - resultTime.valueOf()))\n          resultTime = resourceTime;\n      }\n      //}\n    }, this);\n    return resultTime;\n  }\n  \n}\naddEventFunctions(Type.prototype);\nexport default Type;","/**\n * @module meteoJS/synview/typeCollection\n */\nimport $ from 'jquery';\nimport Collection from './Collection.js';\nimport Type from './Type.js';\n\n/**\n * Options for constructor.\n * \n * @typedef {Object} module:meteoJS/synview/typeCollection~options\n * @param {boolean} [exclusiveVisibility]\n *   At the same time, only one single type is visible.\n * @param {boolean} [syncVisibility]\n *   If the visibility of a type changes, all other types are also adjusted.\n *   If exclusiveVisibility is set to true, this will be ignored.\n */\n\n/**\n * Collection of type-objects.\n * Could ensure, that only a single type of this collection is visible.\n * \n * @extends module:meteoJS/synview/collection.Collection\n * @fires module:meteoJS/synview/typeCollection#change:typeVisible\n */\nexport class TypeCollection extends Collection {\n  \n  /**\n   * @param {module:meteoJS/synview/typeCollection~options} options - Options.\n   */\n  constructor(options) {\n    super();\n    \n    /**\n     * Options.\n     * @member {module:meteoJS/synview/typeCollection~options}\n     * @private\n     */\n    this.options = $.extend(true, {\n      exclusiveVisibility: false,\n      syncVisibility: false\n    }, options);\n  }\n  \n  /**\n   * Returns type with the passed ID or empty type if not existant.\n   * \n   * @override\n   * @param {mixed} id ID.\n   * @return {module:meteoJS/synview/type.Type} Type.\n   */\n  getItemById(id) {\n    var item = super.getItemById(id);\n    return (item === undefined) ? new Type() : this.items[id];\n  }\n  \n  /**\n   * Append type to this collection. If type with same ID is present, the type\n   * will be exchanged.\n   * \n   * @override\n   * @param {module:meteoJS/synview/type.Type} type Type.\n   * @return {module:meteoJS/synview/typeCollection.TypeCollection} This.\n   */\n  append(type) {\n    var that = this;\n    if (this.options.exclusiveVisibility &&\n        type.getVisible() &&\n        this.isVisible()) {\n      type.setVisible(false);\n    }\n    else if (that.options.syncVisibility) {\n      if (type.getVisible()) {\n        if (!this.isVisible())\n          this.getItems().forEach(function (t) {\n            t.setVisible(true);\n          }, this);\n      }\n      else {\n        if (this.isVisible())\n          type.setVisible(true);\n      }\n    }\n    type.on('change:visible', function () {\n      if (that.options.exclusiveVisibility) {\n        if (this.getVisible())\n          that.getItems().forEach(function (t) {\n            if (t.getId() != this.getId())\n              t.setVisible(false);\n          }, this);\n      }\n      else if (that.options.syncVisibility) {\n        that.getItems().forEach(function (t) {\n          if (t.getId() != this.getId())\n            t.setVisible(this.getVisible());\n        }, this);\n      }\n    });\n    return super.append(type);\n  }\n  \n  /**\n   * Returns the types of this collection with getVisible() == true.\n   * \n   * @return {module:meteoJS/synview/type.Type[]} Types.\n   */\n  getVisibleTypes() {\n    return this.getItems().filter(function (type) { return type.getVisible(); });\n  }\n  \n  /**\n   * Returns, if at least one type is visible.\n   * \n   * @return {boolean}\n   */\n  isVisible() {\n    return this.getVisibleTypes().length > 0;\n  }\n  \n  /**\n   * Sets the option exclusiveVisibility.\n   * If several types are visible and this will be set to true, then the first\n   * type in the getItems() iterator will stay visible.\n   * \n   * @return {module:meteoJS/synview/typeCollection.TypeCollection} This.\n   */\n  setExclusiveVisibility(exclusiveVisibility) {\n    if (this.options.exclusiveVisibility != exclusiveVisibility &&\n        exclusiveVisibility) {\n      var isVisibleType = false;\n      this.getItems().forEach(function (t) {\n        if (!isVisibleType)\n          isVisibleType = t.getVisible();\n        else\n          t.setVisible(false);\n      }, this);\n    }\n    this.options.exclusiveVisibility = exclusiveVisibility;\n    return this;\n  }\n  \n  /**\n   * Sets the option syncVisibility.\n   * If any type is visible and this will be set to true, then every type will\n   * be set visible.\n   * \n   * @return {module:meteoJS/synview/typeCollection.TypeCollection} This.\n   */\n  setSyncVisibility(syncVisibility) {\n    if (this.options.syncVisibility != syncVisibility &&\n        syncVisibility &&\n        this.isVisible()) {\n      this.getItems().forEach(function (t) {\n        t.setVisible(true);\n      }, this);\n    }\n    this.options.syncVisibility = syncVisibility;\n    return this;\n  }\n  \n}\nexport default TypeCollection;","/**\n * @module meteoJS/synview/tooltip\n */\nimport $ from 'jquery';\n\n/**\n * Function called that should return content for the tooltip. Undefined for\n * no tooltip.\n * \n * @typedef {Object} module:meteoJS/synview/tooltip~contentFunction\n * @param\n * @return {string|external:jQuery|undefined} Tooltip content.\n\n  sollte auch irgendwie die Resource-Objekt übernehmen...\n */\n\n/**\n * Options for constructor.\n * \n * @typedef {Object} module:meteoJS/synview/tooltip~options\n * @param {module:meteoJS/synview/map.SynviewMap} map - Map object.\n * @param {module:meteoJS/synview/typeCollection.TypeCollection} typeCollection\n *   Collection with all types.\n * @param {module:meteoJS/tooltip.Tooltip} tooltip - Tooltip object.\n */\n\n/**\n * Object to show a tooltip. Is instantiated by the main synview\n *   object.\n */\nexport class Tooltip {\n  \n  /**\n   * @param {module:meteoJS/synview/tooltip~options} [options] - Options.\n   */\n  constructor({\n    map,\n    typeCollection,\n    tooltip\n  }) {\n    \n    /**\n     * @type Object|undefined\n     * @private\n     */\n    this.tooltipFeature = undefined;\n    \n    /**\n     * @type mixed[]|undefined\n     * @private\n     */\n    this.tooltipPixelColor = undefined;\n    \n    /**\n     * @type module:meteoJS/synview/map.SynviewMap\n     * @private\n     */\n    this.map = map;\n    \n    /**\n     * @type module:meteoJS/synview/typeCollection.TypeCollection\n     * @private\n     */\n    this.typeCollection = typeCollection;\n    \n    /**\n     * @type module:meteoJS/tooltip.Tooltip\n     * @private\n     */\n    this.tooltip = tooltip;\n    \n    // Initialize tooltipNode\n    if (Object.getOwnPropertyDescriptor(\n      Object.getPrototypeOf(this.tooltip),\n      'tooltipNode'\n    ) &&\n        this.tooltip.tooltipNode === undefined)\n      this.tooltip.tooltipNode =\n        $('<div>')\n          .css('position', 'absolute')\n          .prependTo(this.map.getMap().getTargetElement());\n    \n    // On hide tooltip\n    this.tooltip.on('hide:tooltip', () => {\n      this.tooltipFeature = undefined;\n      this.tooltipPixelColor = undefined;\n    });\n    \n    // Mouse moves on map\n    this.map.on('move:pointer', e => {\n      if (e.dragging)\n        return;\n      e = this.map.getExtendedEventByTypeCollection(e, this.typeCollection);\n      if (e.feature ||\n          e.color) {\n        if (e.feature === this.tooltipFeature &&\n            (e.color === undefined &&\n             this.tooltipPixelColor === undefined ||\n             e.color !== undefined &&\n             this.tooltipPixelColor !== undefined &&\n             e.color.join(',') === this.tooltipPixelColor.join(','))) {\n          this.tooltip.show({\n            posX: e.pixel[0],\n            posY: e.pixel[1]\n          });\n          return;\n        }\n        \n        this.tooltipFeature = undefined;\n        this.tooltipPixelColor = undefined;\n        let tooltipContent = e.synviewType.getTooltip().call(undefined, e);\n        // Show tooltip only if there is content\n        if (tooltipContent !== undefined) {\n          this.tooltipFeature = e.feature;\n          this.tooltipPixelColor = e.color;\n          this.tooltip.content = tooltipContent;\n          this.tooltip\n            .hide()\n            .show({\n              posX: e.pixel[0],\n              posY: e.pixel[1]\n            });\n        }\n        else\n          this.tooltip.hide();\n      }\n      else\n        this.tooltip.hide();\n    });\n  }\n  \n}\nexport default Tooltip;","/**\n * @module meteoJS/synview\n */\n\nimport $ from 'jquery';\nimport SynviewMap from './synview/SynviewMap.js';\nimport Timeline from './Timeline.js';\nimport TypeCollection from './synview/TypeCollection.js';\nimport Tooltip from './synview/Tooltip.js';\n\n/**\n * Options for constructor.\n * \n * @typedef {Object} module:meteoJS/synview~options\n * @param {module:meteoJS/synview/map.SynviewMap|undefined} [map]\n *   Synview map object.\n * @param {module:meteoJS/timeline.Timeline|undefined} [timeline]\n *   Timeline object.\n * @param {module:meteoJS/tooltip.Tooltip} [tooltip] - Tooltip object.\n */\n\n/**\n * Mapping object to show map data for different timestamps. Create one object\n * per map.\n */\nexport default class Synview {\n  \n  /**\n   * @param {module:meteoJS/synview~options} options - Options.\n   */\n  constructor(options) {\n    /**\n     * @type {module:meteoJS/synview~options}\n     * @private\n     */\n    this.options = $.extend(true, {\n      map: undefined,\n      timeline: undefined,\n      tooltip: undefined\n    }, options);\n    // Normalize options\n    if (this.options.map === undefined)\n      this.options.map = new SynviewMap();\n    if (this.options.timeline === undefined)\n      this.options.timeline = new Timeline();\n    \n    /**\n     * Collection of synview types.\n     * @member {module:meteoJS/synview/typecollection.TypeCollection}\n     */\n    this.typeCollection = new TypeCollection();\n    /** @type meteoJS/synview/tooltip~Tooltip|undefined */\n    this.tooltip = undefined;\n    \n    // Timeline initialisieren\n    this.options.timeline.on('change:time', function () {\n      this.getTypeCollection().getItems().map(function (type) {\n        type.setDisplayTime(this.options.timeline.getSelectedTime());\n      }, this);\n    }, this);\n    \n    // typeCollection initialisieren\n    var timeline = this.options.timeline;\n    var updateTimes = function () {\n      var isLastTime = timeline.isLastEnabledTime();\n      // Zeitpunkte einlesen\n      if (this.getVisible())\n        timeline.setTimesBySetID(this.getId(), this.getResourceCollection().getTimes());\n      else\n        timeline.setTimesBySetID(this.getId(), []);\n      // Switch to last timestamp, if it was the last one already before.\n      if (isLastTime)\n        timeline.last();\n      else if (isNaN(timeline.getSelectedTime()))\n        timeline.first();\n    };\n    var appendType = function (type) {\n      type.setLayerGroup(this.options.map.makeLayerGroup());\n      updateTimes.call(type);\n      type.setDisplayTime(this.getTimeline().getSelectedTime());\n      type.on('change:resources', updateTimes);\n      // Zeitpunkte bei visible-Änderungen löschen oder hinzufügen\n      type.on('change:visible', updateTimes);\n      if (type.getTooltip() !== undefined &&\n          this.tooltip === undefined) {\n        this.tooltip = new Tooltip({\n          map: this.options.map,\n          typeCollection: this.typeCollection,\n          tooltip: this.options.tooltip\n        });\n      }\n    };\n    var removeType = function (type) {\n      this.getTimeline().deleteSetID(type.getId());\n      // Layer-Group löschen (bzw. aus OL entfernen)\n      // Events aus dem Type löschen\n    };\n    this.typeCollection.on('add:item', appendType, this);\n    this.typeCollection.on('remove:item', removeType, this);\n    this.typeCollection.on('replace:item', function (type, removedType) {\n      appendType.call(this, type);\n      removeType.call(this, removedType);\n    }, this);\n  }\n  \n  /**\n   * Returns timeline object.\n   * \n   * @return {meteoJS.timeline} Timeline.\n   */\n  getTimeline() {\n    return this.options.timeline;\n  }\n  \n  /**\n   * Returns map object.\n   * \n   * @return {meteoJS.synview.map} Map object.\n   */\n  getMap() {\n    return this.options.map;\n  }\n  \n  /**\n   * Returns collection object of appended types.\n   * \n   * @return {meteoJS.synview.typeCollection} Type collection.\n   */\n  getTypeCollection() {\n    return this.typeCollection;\n  }\n  \n  /**\n   * Append a type to this synview. Wrapper for getTypeCollection().append(type),\n   * but ensures, that the new type has an id different than undefined.\n   * \n   * @param {meteoJS.synview.type} type Type to append.\n   * @return {meteoJS.synview} This.\n   */\n  appendType(type) {\n    if (type.getId() === undefined) {\n      var prefixId = 'synview-type-';\n      var i = 0;\n      var newId;\n      do {\n        newId = prefixId + (i++);\n      } while (this.getTypeCollection().containsId(newId));\n      type.setId(newId);\n    }\n    this.getTypeCollection().append(type);\n    return this;\n  }\n  \n  /**\n   * Returns the tooltip object.\n   * \n   * @returns {module:meteoJS/tooltip~Tooltip} - Tooltip object.\n   */\n  getTooltip() {\n    return this.options.tooltip;\n  }\n  \n}","const __WEBPACK_NAMESPACE_OBJECT__ = ol.proj;","/**\n * @module meteoJS/synview/map/ol\n */\nimport SynviewMap from '../SynviewMap.js';\nimport LayerGroup from 'ol/layer/Group';\nimport { transform, fromLonLat } from 'ol/proj';\n\n/**\n * Name of mercator projection in openlayers\n * \n * @constant {string}\n */\nexport const projmerc = 'EPSG:3857';\n\n/**\n * Name of wgs84 projection in openlayers (lat/lon in degrees)\n * \n * @constant {string}\n */\nexport const projwgs84 = 'EPSG:4326';\n\n/**\n * Object to \"communicate\" with openlayers.\n * \n * @extends module:meteoJS/synview/map.SynviewMap\n */\nexport class MapOL extends SynviewMap {\n  \n  constructor(options) {\n    super(options);\n    \n    // Normalize options\n    if (this.options.layerGroup === undefined) {\n      this.options.layerGroup = new LayerGroup();\n      this.options.map.addLayer(this.options.layerGroup);\n    }\n    \n    // Listen to view changes.\n    this.options.map.getView().on('change:center', (function () {\n      this.trigger('change:view', this);\n    }).bind(this));\n    this.options.map.getView().on('change:resolution', (function () {\n      this.trigger('change:view', this);\n    }).bind(this));\n    this.options.map.on('pointermove', (function (e) {\n      this.trigger('move:pointer', e);\n    }).bind(this));\n    this.options.map.on('click', (function (e) {\n      this.trigger('click:pointer', e);\n    }).bind(this));\n    this.options.map.on('singleclick', (function (e) {\n      this.trigger('singleclick:pointer', e);\n    }).bind(this));\n    this.options.map.on('dblclick', (function (e) {\n      this.trigger('dblclick:pointer', e);\n    }).bind(this));\n    this.options.map.on('pointerdrag', (function (e) {\n      this.trigger('drag:pointer', e);\n    }).bind(this));\n  }\n  \n  /**\n   * Helper function. Returns the view center in WGS84 coordinates, lat/lon.\n   * \n   * @return {number[]} Center.\n   */\n  getViewCenter() {\n    return transform(\n      this.options.map.getView().getCenter(),\n      this.options.map.getView().getProjection(),\n      projwgs84\n    );\n  }\n  \n  /**\n   * Helper function. Sets the view center in WGS84 coordinates, lat/lon.\n   * \n   * @param {number[]} center Center.\n   * @return {module:meteoJS/synview/map/ol~MapOL} This.\n   */\n  setViewCenter(center) {\n    var valid = true;\n    center = center.map(function (a) {\n      if (isNaN(a)) {\n        valid = false;\n        return undefined;\n      }\n      else\n        return a*1;\n    });\n    if (valid)\n      this.options.map.getView().setCenter(fromLonLat(center));\n    return this;\n  }\n  \n  /**\n   * Helper function. Returns the view zoom level.\n   * \n   * @return {number|undefined} Zoom level.\n   */\n  getViewZoom() {\n    return this.options.map.getView().getZoom();\n  }\n  \n  /**\n   * Helper function. Sets the view zoom level.\n   * \n   * @param {number|undefined} zoom Zoom level.\n   * @returns {module:meteoJS/synview/map/ol~MapOL} This.\n   */\n  setViewZoom(zoom) {\n    if (!isNaN(zoom))\n      this.options.map.getView().setZoom(zoom*1);\n    return this;\n  }\n  \n  /**\n   * Returns a new layer group, already added to the map.\n   * \n   * @returns {external:ol/layer/Group~LayerGroup} New layer group.\n   */\n  makeLayerGroup() {\n    var group = new LayerGroup();\n    this.options.layerGroup.getLayers().push(group);\n    return group;\n  }\n  \n  /**\n   * Returns an event object, that is extended by several keys.\n   * Synview internal method.\n   * \n   * @param {external:ol/MapBrowserPointerEvent} event Map event object.\n   * @param {module:meteoJS/synview/typeCollection.TypeCollection} collection Type collection.\n   * @returns {module:meteoJS/synview/map~extendedEvent} Event object.\n   */\n  getExtendedEventByTypeCollection(event, collection) {\n    event = super.getExtendedEventByTypeCollection(event, collection);\n    let visibleTypes = new Map();\n    collection.getVisibleTypes()\n      .filter(type => { return type.getTooltip() !== undefined; })\n      .map(type => visibleTypes.set(type, []));\n    let visibleLayers = new Set();\n    let visibleLayerClassnames = new Set();\n    for (let type of visibleTypes.keys()) {\n      type.getLayerGroup().getLayers().getArray()\n        .filter(layer => layer.getVisible())\n        .forEach(layer => {\n          visibleTypes.get(type).push(layer);\n          visibleLayers.add(layer);\n          visibleLayerClassnames.add(layer.getClassName());\n        });\n    }\n    \n    this.options.map.forEachFeatureAtPixel(event.pixel, (feature, layer) => {\n      for (let type of visibleTypes.keys()) {\n        visibleTypes.get(type).forEach(l => {\n          if (event.synviewType !== undefined)\n            return;\n          if (l === layer) {\n            event.feature = feature;\n            event.layer = layer;\n            event.synviewType = type;\n          }\n        });\n        if (event.synviewType !== undefined)\n          break;\n      }\n      return event.synviewType !== undefined;\n    }, {\n      hitTolerance: 5,\n      layerFilter: layer => visibleLayers.has(layer)\n    });\n    \n    if (event.feature === undefined) {\n      this.options.map.forEachLayerAtPixel(event.pixel, (layer, color) => {\n        if (color == null || color.length < 1)\n          return false;\n        for (let type of visibleTypes.keys()) {\n          visibleTypes.get(type).forEach(l => {\n            if (event.synviewType !== undefined)\n              return;\n            if (l.getClassName() == layer.getClassName()) {\n              event.color = color;\n              event.layer = layer;\n              event.synviewType = type;\n            }\n          });\n          if (event.synviewType !== undefined)\n            break;\n        }\n        return event.synviewType !== undefined;\n      }, {\n        hitTolerance: 5,\n        layerFilter: layer => visibleLayerClassnames.has(layer.getClassName())\n      });\n    }\n    return event;\n  }\n  \n  /**\n   * Returns index of the passed layer inside the layer group of the passed type.\n   * Synview internal method.\n   * \n   * @param {external:ol/layer/Layer~Layer} layer Layer object.\n   * @param {module:meteoJS/synview/type.Type} type Type.\n   * @return {integer} Index.\n   */\n  findLayerInType(layer, type) {\n    return type.getLayerGroup().getLayers().getArray().findIndex(function (l) {\n      return l == layer;\n    }) > -1;\n  }\n  \n}\nexport default MapOL;","/**\n * @module meteoJS/synview/map/ll\n */\nimport SynviewMap from '../SynviewMap.js';\n\n/**\n * Object to \"communicate\" with Leaflet.\n * \n * @extends module:meteoJS/synview/map.SynviewMap\n */\nexport class MapLL extends SynviewMap {\n  \n  constructor(options) {\n    super (options);\n    \n    // Normalize options\n    if (this.options.layerGroup === undefined)\n      this.options.layerGroup = L.layerGroup().addTo(this.options.map);\n  }\n  \n  /**\n   * Returns a new layer group, already added to the map.\n   * \n   * @inheritdoc\n   * @return {L.layerGroup} New layer group.\n   */\n  makeLayerGroup() {\n    return L.layerGroup().addTo(this.options.layerGroup);\n  }\n  \n}\nexport default MapLL;","const __WEBPACK_NAMESPACE_OBJECT__ = ol.format.GeoJSON;","const __WEBPACK_NAMESPACE_OBJECT__ = ol.source.Vector;","/**\n * @module meteoJS/synview/resource/Vector\n */\nimport VectorSource from 'ol/source/Vector';\nimport VectorLayer from 'ol/layer/Vector';\nimport Resource from '../Resource.js';\nimport { projwgs84 } from '../map/MapOL.js';\n\n/**\n * Object representing a Vector-resource.\n * \n * @extends  module:meteoJS/synview/resource.Resource\n */\nexport class Vector extends Resource {\n  \n  /**\n   * @inheritdoc\n   */\n  getId() {\n    var d = this.getDatetime();\n    return isNaN(d) ? '' : d.toISOString();\n  }\n  \n  /**\n   * Returns openlayers layer of this resource.\n   * \n   * @inheritdoc\n   * @return {external:ol/layer/Vector~VectorLayer} Openlayers layer.\n   */\n  makeOLLayer() {\n    let opt = {\n      source: this.options.ol.source,\n      events: this.options.ol.events,\n      style: this.options.ol.style\n    };\n    this.options.ol;\n    // source not an ol/source/Source~Source object (via duck typing)\n    if (!('refresh' in opt.source)) {\n      let sourceOptions = opt.source;\n      if (this.options.url !== undefined &&\n          'format' in sourceOptions &&\n          sourceOptions.format !== undefined)\n        sourceOptions.url = this.options.url;\n      if (!('projection' in sourceOptions) ||\n          sourceOptions.projection === undefined)\n        sourceOptions.projection = projwgs84;\n      opt.source = new VectorSource(sourceOptions);\n    }\n    if (typeof opt.style === 'function')\n      opt.style = opt.style.bind(this);\n    if (this.className)\n      opt.className = this.className;\n    return new VectorLayer(opt);\n  }\n  \n  /**\n   * Sets style of the OpenLayers vector layer.\n   * If argument 'style' is omitted, the style will be updated.\n   * \n   * @param {external:ol/style/Style~Style} [style] OpenLayers style.\n   * @returns {module:meteoJS/synview/resource/Vector.Vector} This.\n   */\n  setOLStyle(style) {\n    if (this.layer === undefined)\n      this.getOLLayer();\n    if (this.layer === undefined ||\n        !('setStyle' in this.layer))\n      return this;\n    if (arguments.length == 0)\n      this.layer.setStyle(this.layer.getStyle());\n    else\n      this.layer.setStyle(style);\n    return this;\n  }\n  \n}\nexport default Vector;","/**\n * @module meteoJS/synview/resource/GeoJSON\n */\nimport GeoJSONFormat from 'ol/format/GeoJSON';\nimport Vector from './Vector.js';\n\n/**\n * Object representing a GeoJSON-resource.\n * \n * @extends module:meteoJS/synview/resource/Vector.Vector\n */\nexport class GeoJSON extends Vector {\n  \n  constructor(options) {\n    super(options);\n    \n    this.options.ol.source.url = this.options.url;\n    this.options.ol.source.format = new GeoJSONFormat();\n  }\n  \n}\nexport default GeoJSON;","const __WEBPACK_NAMESPACE_OBJECT__ = ol.source.VectorTile;","const __WEBPACK_NAMESPACE_OBJECT__ = ol.layer.VectorTile;","/**\n * @module meteoJS/synview/resource/VectorTile\n */\nimport VectorTileSource from 'ol/source/VectorTile';\nimport VectorTileLayer from 'ol/layer/VectorTile';\nimport Vector from './Vector.js';\nimport { projwgs84 } from '../map/MapOL.js';\n\n/**\n * Object representing a VectorTile-resource.\n * \n * @extends  module:meteoJS/synview/resource/Vector~Vector\n */\nexport class VectorTile extends Vector {\n  \n  /**\n   * Returns openlayers layer of this resource.\n   * \n   * @inheritdoc\n   * @return {external:ol/layer/VectorTile~VectorTileLayer} Openlayers layer.\n   */\n  makeOLLayer() {\n    let opt = {\n      source: this.options.ol.source,\n      events: this.options.ol.events,\n      style: this.options.ol.style\n    };\n    // source not an ol/source/Source~Source object (via duck typing)\n    if (!('refresh' in opt.source)) {\n      let sourceOptions = opt.source;\n      if (!('tileUrlFunction' in sourceOptions) &&\n          this.options.url !== undefined &&\n          'format' in sourceOptions &&\n          sourceOptions.format !== undefined)\n        sourceOptions.url = this.options.url;\n      if (!('projection' in sourceOptions) ||\n          sourceOptions.projection === undefined)\n        sourceOptions.projection = projwgs84;\n      opt.source = new VectorTileSource(sourceOptions);\n    }\n    if (typeof opt.style === 'function')\n      opt.style = opt.style.bind(this);\n    if (this.className)\n      opt.className = this.className;\n    return new VectorTileLayer(opt);\n  }\n  \n}\nexport default VectorTile;","/**\n * @module meteoJS/synview/resource/GeoJSONTile\n */\nimport GeoJSON from 'ol/format/GeoJSON';\nimport VectorTile from './VectorTile.js';\n\n/**\n * Object representing a GeoJSON-Tile-resource.\n * \n * @extends module:meteoJS/synview/resource/VectorTile.VectorTile\n */\nexport class GeoJSONTile extends VectorTile {\n  \n  constructor(options) {\n    super(options);\n    \n    this.options.ol.source.format = new GeoJSON();\n  }\n  \n}\nexport default GeoJSONTile;","const __WEBPACK_NAMESPACE_OBJECT__ = ol.source.ImageStatic;","const __WEBPACK_NAMESPACE_OBJECT__ = ol.layer.Image;","/**\n * @module meteoJS/synview/resource/Image\n */\nimport Static from 'ol/source/ImageStatic';\nimport ImageLayer from 'ol/layer/Image';\nimport { transformExtent } from 'ol/proj';\nimport Resource from '../Resource.js';\nimport { projmerc, projwgs84 } from '../map/MapOL.js';\n\n/**\n * Options for module:meteoJS/synview/resource/Image~Image.\n * \n * @typedef {module:meteoJS/synview/resource~options}\n *   module:meteoJS/synview/resource/Image~options\n * @param {number[]} extent - Extent.\n */\n\n/**\n * Object representing an image.\n * \n * <pre><code>import Image from 'meteojs/synview/resource/Image';\nimport { Image } from 'meteojs/synview/resource/Image';\nimport { ImageStatic } from 'meteojs/synview/resource/Image';</code></pre>\n * \n * @extends  module:meteoJS/synview/resource.Resource\n */\nexport class ImageStatic extends Resource {\n  \n  /**\n   * @param {module:meteoJS/synview/resource/Image~options} options - Options.\n   */\n  constructor({\n    url = undefined,\n    datetime = undefined,\n    mimetype = undefined,\n    reloadTime = undefined,\n    className = undefined,\n    extent,\n    ol = {}\n  } = {}) {\n    super({\n      url,\n      datetime,\n      mimetype,\n      reloadTime,\n      className,\n      ol\n    });\n    \n    this.options.extent = extent;\n  }\n  \n  /**\n   * Returns openlayers layer of this resource.\n   * \n   * @inheritdoc\n   * @return {external:ol/layer/Image~ImageLayer} Openlayers layer.\n   */\n  makeOLLayer() {\n    let sourceOptions = this.options.ol.source;\n    sourceOptions.url = this.options.url;\n    sourceOptions.imageExtent =\n      transformExtent(this.options.extent,\n        projwgs84,\n        projmerc);\n    return new ImageLayer({\n      source: new Static(sourceOptions),\n      className: this.className\n    });\n  }\n  \n  /**\n   * Returns Leaflet layer of this resource.\n   * \n   * @inheritdoc\n   * @return {external:L.imageOverlay} Leaflet layer.\n   */\n  makeLLLayer() {\n    return L.imageOverlay(this.options.url, [\n      [this.options.extent[1], this.options.extent[0]],\n      [this.options.extent[3], this.options.extent[2]]\n    ]);\n  }\n  \n  \n  /**\n   * @inheritdoc\n   */\n  preload() {\n    this.getOLLayer().getSource().image_.load();\n  }\n}\nexport { ImageStatic as Image };\nexport default ImageStatic;","const __WEBPACK_NAMESPACE_OBJECT__ = ol.source.OSM;","const __WEBPACK_NAMESPACE_OBJECT__ = ol.layer.Tile;","/**\n * @module meteoJS/synview/resource/OSM\n */\nimport OSMSource from 'ol/source/OSM';\nimport TileLayer from 'ol/layer/Tile';\nimport Resource from '../Resource.js';\n\n/**\n * Object representing a OSM-resource.\n * \n * @extends  module:meteoJS/synview/resource.Resource\n */\nexport class OSM extends Resource {\n  \n  /**\n   * Returns openlayers layer of this resource.\n   * \n   * @inheritdoc\n   * @return {external:ol/layer/Tile~TileLayer} Openlayers layer.\n   */\n  makeOLLayer() {\n    let sourceOptions = this.options.ol.source;\n    sourceOptions.url = this.options.url;\n    return new TileLayer({\n      source: new OSMSource(sourceOptions)\n    });\n  }\n  \n}\nexport default OSM;","/**\n * @module meteoJS/tooltip\n */\nimport addEventFunctions from './Events.js';\n\n/**\n * Triggered, when tooltip starts to be shown.\n * \n * @event module:meteoJS/tooltip#show:tooltip\n */\n\n/**\n * Triggered, when tooltip starts to be hidden.\n * \n * @event module:meteoJS/tooltip#hide:tooltip\n */\n\n/**\n * @classdesc Abstract class to create a tooltip.\n * \n * @abstract\n * @fires module:meteoJS/tooltip#show:tooltip\n * @fires module:meteoJS/tooltip#hide:tooltip\n */\nexport class Tooltip {\n  \n  constructor() {\n    /**\n     * @type Boolean\n     * @private\n     */\n    this._isShown = false;\n    \n    /**\n     * @type undefined|mixed\n     * @private\n     */\n    this._content = undefined;\n  }\n  \n  /**\n   * Is tooltip shown.\n   * \n   * @type Boolean\n   * @readonly\n   */\n  get isShown() {\n    return this._isShown;\n  }\n  \n  /**\n   * Content of tooltip. Could be a String or a HTMLElement or a jQuery object.\n   * \n   * @type undefined|mixed\n   */\n  get content() {\n    return this._content;\n  }\n  set content(content) {\n    let oldContent = this._content;\n    this._content = content;\n    if (oldContent !== this._content)\n      this.onContentChange();\n  }\n  \n  /**\n   * Show tooltip.\n   * \n   * @abstract\n   * @param {Object} [options] - Options.\n   * @param {Number} options.posX - Position in x direction.\n   * @param {Number} options.posY - Position in y direction.\n   * @returns {module:meteoJS/tooltip.Tooltip} This.\n   */\n  show() {\n    let fireShowEvent = !this.isShown;\n    this._isShown = true;\n    if (fireShowEvent)\n      this.trigger('show:tooltip');\n    return this;\n  }\n  \n  /**\n   * Hide tooltip.\n   * \n   * @abstract\n   * @returns {module:meteoJS/tooltip.Tooltip} This.\n   */\n  hide() {\n    let fireHideEvent = this.isShown;\n    this._isShown = false;\n    if (fireHideEvent)\n      this.trigger('hide:tooltip');\n    return this;\n  }\n  \n  /**\n   * Update tooltip. E.g. due to content change, which moved the tooltip.\n   * \n   * @abstract\n   * @returns {module:meteoJS/tooltip.Tooltip} This.\n   */\n  update() {\n    return this;\n  }\n  \n  /**\n   * Called when property 'content' changes.\n   * \n   * @abstract\n   * @protected\n   */\n  onContentChange() {}\n  \n}\naddEventFunctions(Tooltip.prototype);\nexport default Tooltip;","const __WEBPACK_NAMESPACE_OBJECT__ = bootstrap;","/**\n * @module meteoJS/tooltip/bootstrapTooltip\n */\nimport $ from 'jquery';\nimport { Tooltip as bsTooltip } from 'bootstrap';\nimport Tooltip from '../Tooltip.js';\n\n/**\n * Options for constructor.\n * \n * @typedef {Object} module:meteoJS/tooltip/bootstrapTooltip~options\n * @property {undefined|external:jQuery|external:HTMLElement} [tooltipNode=undefined]\n *   Create Bootstrap's tooltip on this element.\n * @property {Object} [bootstrapOptions] - Options passed to the '.tooltip' method.\n * @property {boolean} [closeOnMouseMove=true]\n *   Close tooltip, when mouse is moved over the tooltip.\n * @property {boolean} [closeOnMouseEnter=false]\n *   Close tooltip, when mouse is entered in the tooltip.\n */\n\n/**\n * Tooltip which uses the Bootstrap's tooltip.\n * \n * @extends module:meteoJS/tooltip.Tooltip\n * @inheritdoc\n */\nexport class BootstrapTooltip extends Tooltip {\n  \n  /**\n   * @param {module:meteoJS/tooltip/bootstrapTooltip~options} [options] - Options.\n   */\n  constructor({\n    tooltipNode = undefined,\n    bootstrapOptions = undefined,\n    closeOnMouseMove = true,\n    closeOnMouseEnter = false\n  } = {}) {\n    super();\n    \n    /**\n     * @type undefined|Object\n     * @private\n     */\n    this.bootstrapOptions = bootstrapOptions ? bootstrapOptions : {};\n    this._initBootstrapOptions(bootstrapOptions);\n    \n    /**\n     * @type boolean\n     * @private\n     */\n    this.closeOnMouseMove = closeOnMouseMove;\n    \n    /**\n     * @type Bboolean\n     * @private\n     */\n    this.closeOnMouseEnter = closeOnMouseEnter;\n    \n    /**\n     * @type external:jQuery\n     * @private\n     */\n    this._tooltipNode = undefined;\n    this.tooltipNode = tooltipNode;\n\n    /**\n     * @type external:bootrap|undefined\n     * @private\n     */\n    this._bsTooltip = undefined;\n  }\n  \n  /**\n   * Bootstap's tooltip is assigned to this node.\n   * \n   * @type undefined|external:jQuery\n   */\n  get tooltipNode() {\n    return this._tooltipNode;\n  }\n  set tooltipNode(tooltipNode) {\n    if (tooltipNode === undefined) {\n      this._tooltipNode = tooltipNode;\n      this._bsTooltip = undefined;\n      return;\n    }\n    \n    this._tooltipNode = $(tooltipNode);\n    this._initTooltipNode();\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  show({\n    posX,\n    posY\n  }) {\n    if (this._tooltipNode === undefined ||  this._bsTooltip === undefined)\n      return;\n\n    this.tooltipNode\n      .css({\n        left: `${posX}px`,\n        top: `${posY}px`\n      });\n    if (this.isShown)\n      this._bsTooltip.update();\n    else\n      this._bsTooltip.show();\n    return super.show();\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  hide() {\n    if (this._tooltipNode === undefined ||  this._bsTooltip === undefined)\n      return;\n\n    if (this.isShown) {\n      this.tooltipNode\n        .attr('data-original-title', undefined);\n      this._bsTooltip.hide();\n    }\n    return super.hide();\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  update() {\n    if (this._bsTooltip === undefined)\n      return;\n    this._bsTooltip.update();\n    return super.update();\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  onContentChange() {\n    /* If no content is passed, the tooltip will not open with a\n     * content-callback until the tooltip is initialized otherwise. */\n    this.tooltipNode.attr('data-bs-original-title',\n      isStringContent(this.content) ? this.content : '-');\n    \n    this._updateNonStringContent();\n    this.update();\n  }\n  \n  /**\n   * Default options to Bootstrap's tooltip.\n   * \n   * @private\n   */\n  _initBootstrapOptions({\n    trigger = 'manual'\n  } = {}) {\n    this.bootstrapOptions.trigger = trigger;\n  }\n  \n  /**\n   * Initialize Bootstrap's tooltip.\n   * \n   * @private\n   */\n  _initTooltipNode() {\n    if (this._bsTooltip !== undefined)\n      this._bsTooltip.dispose();\n    this._bsTooltip =\n      new bsTooltip(this._tooltipNode[0], this.bootstrapOptions);\n    this.tooltipNode[0].addEventListener('inserted.bs.tooltip', () => {\n      let tooltipNode = this._updateNonStringContent();\n      if (!tooltipNode.length)\n        return;\n      if (this.closeOnMouseMove)\n        tooltipNode.children('.tooltip-inner').mousemove(() => this.hide());\n      if (this.closeOnMouseEnter)\n        tooltipNode.children('.tooltip-inner').mouseenter(() => this.hide());\n    });\n  }\n  \n  /**\n   * Updates tooltips content, if not simply a string.\n   * \n   * @private\n   * @returns {external:jQuery} - Tooltip node.\n   */\n  _updateNonStringContent() {\n    let tooltipNode =\n      $(document.getElementById(this.tooltipNode.attr('aria-describedby')));\n    if (!tooltipNode.length)\n      return;\n    if (this.content !== undefined &&\n        !isStringContent(this.content))\n      tooltipNode\n        .children('.tooltip-inner')\n        .empty()\n        .append(this.content);\n    return tooltipNode;\n  }\n  \n}\nexport default BootstrapTooltip;\n\nconst isStringContent = function(content) {\n  return Object.prototype.toString.call(content) == '[object String]';\n};","/**\n * @module meteoJS/base/unique\n */\n\n/**\n * Options for constructor.\n * \n * @typedef {Object} module:meteoJS/base/unique~options\n * @property {mixed} [id] - Id.\n */\n\n/**\n * Class that describe an object with an unique id.\n */\nexport class Unique {\n  \n  /**\n   * @param {module:meteoJS/base/unique~options} [options] - Options.\n   */\n  constructor({ id } = {}) {\n    this._id = id;\n  }\n  \n  /**\n   * Id.\n   * \n   * @type {mixed}\n   */\n  get id() {\n    return this._id;\n  }\n  set id(id) {\n    this._id = id;\n    this.setId(id);\n  }\n  \n  /**\n   * Fired, wenn id-setter is called.\n   * \n   * @protected\n   * @param {mixed} id - Id.\n   */\n  setId() {}\n}\nexport default Unique;","/**\n * @module meteoJS/base/collection\n */\nimport addEventFunctions from '../Events.js';\nimport Unique from './Unique.js';\n\n/**\n * Triggered on adding item to collection.\n * \n * @event module:meteoJS/base/collection#add:item\n * @param {module:meteoJS/base/unique.Unique} item - Added item.\n */\n\n/**\n * Triggered on replacing item with already existing ID.\n * \n * @event module:meteoJS/base/collection#replace:item\n * @param {module:meteoJS/base/unique.Unique} item - Added item.\n * @param {module:meteoJS/base/unique.Unique} removedItem - Replaced and removed item.\n */\n\n/**\n * Triggered on removing item from collection.\n * \n * @event module:meteoJS/base/collection#remove:item\n * @param {module:meteoJS/base/unique.Unique} item - Removed item.\n */\n\n/**\n * Options for constructor.\n * \n * @typedef {Object} module:meteoJS/base/collection~options\n * @property {boolean} [fireReplace] - Fire {@link module:meteoJS/base/collection#replace:item|replace:item}.\n * @property {boolean} [fireAddRemoveOnReplace] -\n *   Fire {@link module:meteoJS/base/collection#add:item|add:item} and\n *   {@link module:meteoJS/base/collection#remove:item|remove:item} on\n *   replacing an item.\n * @property {boolean} [appendOnReplace] -\n *   Append item to the end, if item is replaced.\n * @property {undefined|Function} [sortFunction] -\n *   Sort function to sort the collection list.\n * @property {undefined|Function} [emptyObjectMaker] -\n *   Function that returns an empty\n *   {@link module:meteoJS/base/unqiue.Unique|Unique}-Object or\n *   an instance of a child class.\n */\n\n/**\n * Collection-class for {@link module:meteoJS/base/unqiue.Unique|Unique}-Objects\n * or objects of child classes.\n * \n * @implements {Iterator}\n * @fires module:meteoJS/base/collection#add:item\n * @fires module:meteoJS/base/collection#remove:item\n * @fires module:meteoJS/base/collection#replace:item\n */\nexport class Collection {\n  \n  /**\n   * @param {module:meteoJS/base/collection~options} options - Options.\n   */\n  constructor({ fireReplace=true,\n    fireAddRemoveOnReplace=false,\n    appendOnReplace=true,\n    sortFunction,\n    emptyObjectMaker\n  } = {}) {\n    /** @type Object */\n    this.options = {\n      fireReplace,\n      fireAddRemoveOnReplace,\n      appendOnReplace,\n      sortFunction,\n      emptyObjectMaker\n    };\n    \n    /**\n     * List of the IDs of the items.\n     * @type mixed[]\n     * @private\n     */\n    this._itemIds = [];\n    \n    /**\n     * Items, ID as key of the object.\n     * @type Object.<mixed,module:meteoJS/base/unique.Unique>\n     * @private\n     */\n    this._items = {};\n  }\n  \n  /**\n   * Count of the items in this collection.\n   * \n   * @type integer\n   * @readonly\n   */\n  get count() {\n    return this._itemIds.length;\n  }\n  \n  [Symbol.iterator]() {\n    let i = 0;\n    return {\n      next: () => {\n        return (i < this._itemIds.length)\n          ? { value: this._items[this._itemIds[i++]] }\n          : { done: true };\n      }\n    };\n  }\n  \n  /**\n   * Items (ordered list).\n   * \n   * @type module:meteoJS/base/unique.Unique[]\n   * @readonly\n   */\n  get items() {\n    return this._itemIds.map(id => this._items[id]);\n  }\n  \n  /**\n   * List of IDs (ordered list).\n   * \n   * @type mixed[]\n   * @readonly\n   */\n  get itemIds() {\n    return this._itemIds;\n  }\n  \n  /**\n   * Sort function for the items.\n   * \n   * @type undefined|Function\n   */\n  get sortFunction() {\n    return this.options.sortFunction;\n  }\n  set sortFunction(sortFunction) {\n    this.options.sortFunction = sortFunction;\n    this._sort();\n  }\n  \n  /**\n   * Returns item by ID, Unique-Object with undefined id, if ID doesn't exist.\n   * \n   * @param {mixed} id - ID.\n   * @returns {module:meteoJS/base/unique.Unique} Item.\n   */\n  getItemById(id) {\n    return (id in this._items) ? this._items[id] :\n      (this.options.emptyObjectMaker === undefined)\n        ? new Unique()\n        : this.options.emptyObjectMaker.call(this);\n  }\n  \n  /**\n   * Is item appended to the collection.\n   * \n   * @param {module:meteoJS/base/unique.Unique} item - Item.\n   * @returns {boolean} If appended.\n   */\n  contains(item) {\n    let result = this.containsId(item.id);\n    if (result)\n      result = item === this.getItemById(item.id);\n    return result;\n  }\n  \n  /**\n   * Exists an ID in this collection.\n   * \n   * @param {mixed} id - ID.\n   * @returns {boolean} If exists.\n   */\n  containsId(id) {\n    return (id in this._items);\n  }\n  \n  /**\n   * Append an item to the collection.\n   * \n   * @param {...module:meteoJS/base/unique.Unique} items - New items.\n   * @returns {module:meteoJS/base/collection.Collection} This.\n   * @fires module:meteoJS/base/collection#add:item\n   * @fires module:meteoJS/base/collection#remove:item\n   * @fires module:meteoJS/base/collection#replace:item\n   */\n  append(...items) {\n    const addItem = [];\n    const removeItem = [];\n    const replaceItem = [];\n    items.forEach(item => {\n      let id = item.id;\n      if (this.containsId(id)) {\n        let itemInCollection = this.getItemById(id);\n        if (this.options.appendOnReplace) {\n          this._itemIds.splice(this._itemIds.indexOf(id), 1);\n          this._itemIds.push(id);\n        }\n        if (itemInCollection !== item) {\n          this._items[id] = item;\n          if (this.options.fireReplace)\n            replaceItem.push([item, itemInCollection]);\n          if (this.options.fireAddRemoveOnReplace) {\n            removeItem.push(itemInCollection);\n            addItem.push(item);\n          }\n        }\n      }\n      else {\n        this._itemIds.push(id);\n        this._items[id] = item;\n        addItem.push(item);\n      }\n    });\n    this._sort();\n    addItem.forEach(item => this.trigger('add:item', item));\n    removeItem.forEach(item => this.trigger('remove:item', item));\n    replaceItem.forEach(([item, itemInCollection]) => this.trigger('replace:item', item, itemInCollection));\n    return this;\n  }\n  \n  /**\n   * Removes an item from the collection.\n   * \n   * @param {...module:meteoJS/base/unique.Unique} items - Items to remove.\n   * @returns {module:meteoJS/base/collection.Collection} This.\n   * @fires module:meteoJS/base/collection#remove:item\n   */\n  remove(...items) {\n    items.forEach(item => {\n      let i = this._itemIds.indexOf(item.id);\n      if (i > -1) {\n        let realItem = this._items[item.id];\n        delete this._items[item.id];\n        this._itemIds.splice(i, 1);\n        this.trigger('remove:item', realItem);\n      }\n    });\n    return this;\n  }\n  \n  /**\n   * Removes an item by ID from the collection.\n   * \n   * @param {mixed} id - ID of the item to delete.\n   * @returns {module:meteoJS/base/collection.Collection} This.\n   * @fires module:meteoJS/base/collection#remove:item\n   */\n  removeById(...ids) {\n    ids.forEach(id => {\n      let i = this._itemIds.indexOf(id);\n      if (i > -1) {\n        let item = this._items[id];\n        delete this._items[id];\n        this._itemIds.splice(i, 1);\n        this.trigger('remove:item', item);\n      }\n    });\n    return this;\n  }\n  \n  /**\n   * Sorts Collection-List.\n   * \n   * @private\n   */\n  _sort() {\n    if (this.options.sortFunction === undefined)\n      return;\n    this._itemIds.sort((a,b) => {\n      return this.options.sortFunction(this._items[a], this._items[b]);\n    });\n  }\n}\naddEventFunctions(Collection.prototype);\nexport default Collection;","/**\n * @module meteoJS/modelviewer\n */\nimport Collection from './base/Collection.js';\nimport Timeline from './Timeline.js';\n\n/**\n * Creates and returns a HTMLElement or jQuery object for a container. The\n * content of the container is appended to this element. This function has to\n * append the element to the modelviewer's containersNode.\n * \n * @typedef {Function} module:meteoJS/modelviewer~makeContainerNode\n * @param {module:meteoJS/modelviewer/container.Container} container\n *   Container to append.\n * @this module:meteoJS/modelviewer~Modelviewer\n * @returns {HTMLElement|jQuery} Top node of the appended container.\n */\n\n/**\n * Options for constructor.\n * \n * @typedef {Object} module:meteoJS/modelviewer~options\n * @param {module:meteoJS/modelviewer/resources.Resources} resources\n *   Available resources.\n * @param {HTMLElement|jQuery} containersNode Node to append the containers.\n * @param {module:meteoJS/timeline.Timeline} [timeline]\n *   Shared Timeline between containers.\n * @param {module:meteoJS/modelviewer~makeContainerNode} [makeContainerNode]\n *   Function to create the top node of each container.\n * @param {boolean} [firstTimeOnInit=true] - Selects the first time in timeline\n *   once for the first time times are added to the timeline.\n * @param {boolean} [lastTimeOnInit=false] - Selects the last time in timeline\n *   once for the first time times are added to the timeline.\n *   Ignored if firstTimeOnInit is true.\n */\n\n/**\n * @classdesc\n \n * Entscheidet über das Design der Container (auch Darstellungsbreite -> entsprechend welche Navigation)\n * Wie kann der User die Anordnung der Container ändern?\n   * Dies soll für Bootstrap aber auch allg. funktionieren\n   * Wie soll dazu die Navigation angepasst werden können\n * Handelt wahrscheinlich die Darstellung der Container (irgendwie…)\n * Eigentlich wäre gut, wenn auch keine Abhängikeit von jQuery… (geht das?)\n * Output Container -> Modelviewer\n   * Kann entweder nur ein Bild/Sounding/etc. anzeigen\n   * Kann je nach dem auch noch Navigation(en) ausgeben\n   * Je nach Output unterschiedlicher Aufbau des Container-div's\n   * Wie übergibt man diesem Objekt die Darstellung (z.B. der Navigation)\n   * Navigation muss sich anpassen (Änderung einer Collection, Änderung der Resource, …)\n * Wie löst man das Vererben der Anzeige des vorangegangenen Containers -> Modelviewer\n * Wie löst man, dass öffnen eines nächsten Runs vom vorangegangenen Container -> Modelviewer\n * Bei Image -> hover funktion -> Modelviewer\n * Bei Image -> Überblenden von Punkten für z.B. Ensembles -> Modelviewer\n * Default-Navigation mit <select>-Nodes. -> Modelviewer\n * 2te Default-Navigation mit vertikal angeordneten Listen -> Modelviewer\n * \n * ToDo:\n * * Alle Zeitpunkte für Modell/Run\n * * Alle Zeitpunkte für eine gewählte Resource (oder mind. displayVariables)\n *   -> dabei sollten keine Unter-Nodes berücksichtigt werden.\n * * Auswahl der DisplayVariable entweder nur per 1:1 Übereinstimmung oder aber\n *   durch Best-Match (wie soll dies gelöst werden).\n * Aktuell befindet sich ziemlicher Rubbish-Code in den Klassen.\n * collectTimesVariableCollections in Resources ist nicht die Lösung\n */\nexport class Modelviewer extends Collection {\n  \n  /**\n   * @param {module:meteoJS/modelviewer~options} options - Options.\n   */\n  constructor({ resources,\n    containersNode,\n    timeline = undefined,\n    makeContainerNode = undefined,\n    firstTimeOnInit = true,\n    lastTimeOnInit = false } = {}) {\n    super({\n      fireReplace: false,\n      fireAddRemoveOnReplace: true\n    });\n    \n    /**\n     * @type module:meteoJS/modelviewer/resources.Resources\n     * @private\n     */\n    this._resources = resources;\n    \n    /**\n     * @type HTMLElement\n     * @private\n     */\n    this._containersNode =\n      (typeof containersNode == 'object' && containersNode.jquery)\n        ? containersNode[0] : containersNode;\n    \n    /**\n     * @type module:meteoJS/timeline.Timeline\n     * @private\n     */\n    this._timeline = (timeline === undefined) ? new Timeline() : timeline;\n    \n    /**\n     * @type undefined|Function\n     * @private\n     */\n    this._makeContainerNode = makeContainerNode;\n    \n    /**\n     * @type Map<module:meteoJS/modelviewer/container.Container,mixed>\n     * @private\n     */\n    let listenerKeys = new Map();\n    \n    this.on('add:item', container => {\n      container.modelviewer = this;\n      container.containerNode =\n        this._getContainerNode(container);\n      if (!isNaN(this.timeline.getSelectedTime().valueOf()) ||\n          !firstTimeOnInit && !lastTimeOnInit)\n        return;\n      \n      listenerKeys\n        .set(container, container.on('change:selectedVariables', ()  => {\n          if (isNaN(this._timeline.getSelectedTime().valueOf())) {\n            if (firstTimeOnInit)\n              this._timeline.first();\n            else if (lastTimeOnInit)\n              this._timeline.last();\n            if (!isNaN(this._timeline.getSelectedTime().valueOf()))\n              for (let c of listenerKeys.keys()) {\n                c.un('change:selectedVariables', listenerKeys.get(c));\n                listenerKeys.delete(c);\n              }\n          }\n        }));\n    });\n    \n    this.on('remove:item', container => {\n      if (container.containerNode !== undefined &&\n          container.containerNode.parentNode != null)\n        container.containerNode.parentNode.removeChild(container.containerNode);\n      container.modelviewer = undefined;\n      container.containerNode = undefined;\n      if (listenerKeys.has(container)) {\n        container.un('change:selectedVariables', listenerKeys.get(container));\n        listenerKeys.delete(container);\n      }\n      this.timeline.deleteSetID(container.id);\n    });\n  }\n  \n  /**\n   * Resources.\n   * \n   * @type module:meteoJS/modelviewer/resources.Resources\n   * @readonly\n   */\n  get resources() {\n    return this._resources;\n  }\n  \n  /**\n   * Node to append the container's node into.\n   * \n   * @type HTMLElement\n   * @readonly\n   */\n  get containersNode() {\n    return this._containersNode;\n  }\n  \n  /**\n   * Timeline.\n   * \n   * @type module:meteoJS/timeline.Timeline\n   * @readonly\n   */\n  get timeline() {\n    return this._timeline;\n  }\n  \n  /**\n   * Appends container(s).\n   * \n   * @param {...module:meteoJS/modelviewer/container.Container} containers\n   *   New containers.\n   * @returns {module:meteoJS/modelviewer.Modelviewer} This.\n   * @override\n   */\n  append(...containers) {\n    let ids = [...this.itemIds];\n    containers\n      .filter(container => container.id !== undefined)\n      .forEach(container => ids.push(container.id));\n    containers\n      .filter(container => container.id === undefined)\n      .forEach(container => {\n        let i = 1;\n        let id = `container${i}`;\n        while (ids.indexOf(id) > -1) {\n          i++;\n          id = `container${i}`;\n        }\n        container.id = id;\n        ids.push(id);\n      });\n    super.append(...containers);\n    return this;\n  }\n  \n  /**\n   * Creates a HTMLElement to append the container content into it. This\n   * element is appended to the containersNode.\n   * \n   * @param {module:meteoJS/modelviewer/container.Container} container\n   *   Create Node for this container.\n   * @returns {HTMLElement} Node.\n   * @private\n   */\n  _getContainerNode(container) {\n    if (this._makeContainerNode !== undefined) {\n      let result =\n        this._makeContainerNode.call(this, this.containersNode, container);\n      return (typeof result == 'object' && result.jquery) ? result[0] : result;\n    }\n    else {\n      let containerNode =\n        (container.containerNode !== undefined)\n          ? container.containerNode\n          : document.createElement('div');\n      if (this.containersNode !== undefined)\n        this.containersNode.appendChild(containerNode);\n      return containerNode;\n    }\n  }\n}\nexport default Modelviewer;","/**\n * @module meteoJS/base/named\n */\n\n/**\n * Options for constructor.\n * \n * @typedef {Object} module:meteoJS/base/named~options\n * @property {string} [name] - Default name.\n * @property {Object.<string,string>} [names] - Names.\n * @property {string[]} [langSortation] - Priority of language codes.\n */\n\n/**\n * Class with a name in different languages.\n */\nexport class Named {\n  \n  /**\n   * @param {module:meteoJS/base/named~options} [options] - Options.\n   */\n  constructor({ name = undefined, names = {}, langSortation = [] } = {}) {\n    /**\n     * @type undefined|string\n     * @private\n     */\n    this._name = name;\n    \n    /**\n     * @type Object<string,string>\n     * @private\n     */\n    this._names = names;\n    \n    /**\n     * @type string[]\n     * @private\n     */\n    this._langSortation = langSortation;\n  }\n  \n  /**\n   * Default name.\n   * \n   * @type {string}\n   */\n  get name() {\n    return this.getDefaultName();\n  }\n  set name(name) {\n    this._name = name;\n  }\n  \n  /**\n   * Returns the name in the passed language.\n   * \n   * @param {string} lang - Language code.\n   * @returns {string} Name in the passed language.\n   */\n  getNameByLangNoFallback(lang) {\n    return (lang in this._names)  ? this._names[lang] : '';\n  }\n  \n  /**\n   * Sets the name of a certain language. Pass undefined to delete name.\n   * \n   * @param {string} lang - Language code.\n   * @param {string} name - Name.\n   */\n  setNameByLang(lang, name) {\n    this._names[lang] = name;\n    if (name === undefined)\n      delete this._names[lang];\n  }\n  \n  /**\n   * Default order of the languages.\n   * \n   * @type string[]\n   */\n  get langSortation() {\n    return this._langSortation;\n  }\n  set langSortation(langSortation) {\n    this._langSortation = langSortation;\n  }\n  \n  /**\n   * Default name.\n   * \n   * @returns {string}\n   * @protected\n   */\n  getDefaultName() {\n    return (this._name !== undefined) ? this._name : this.getNameByLang();\n  }\n  \n  /**\n   * Returns a name, if available in the passed language, otherwise in a\n   * fallback language.\n   * \n   * @param {string} [lang] - Language code.\n   * @param {Object} [options] - Options.\n   * @param {string[]} [options.langSortation] - Priority of language codes.\n   * @returns {string} Name in the passed or a fallback language.\n   */\n  getNameByLang(lang = undefined, { langSortation = undefined } = {}) {\n    let lS =\n      (langSortation === undefined) ? this._langSortation : langSortation;\n    let langs = Object.keys(this._names);\n    if (langs.length < 1)\n      return (this._name === undefined) ? '' : this._name;\n    return this._names[langs.sort((a, b) => {\n      if (a == lang) return -1;\n      if (b == lang) return 1;\n      let ia = lS.indexOf(a);\n      let ib = lS.indexOf(b);\n      if (ib < 0) return 0;\n      if (ia < 0) return 1;\n      return ia < ib ? -1 : ia == ib ? 0 : 1;\n    })[0]];\n  }\n}\nexport default Named;","/**\n * @module meteoJS/base/uniquenamed\n */\nimport Unique from './Unique.js';\nimport Named from './Named.js';\n\n/**\n * Options for constructor.\n * \n * @typedef {module:meteoJS/base/named~options}\n *   module:meteoJS/base/uniquenamed~options\n * @property {mixed} [id] - Id.\n */\n\n/**\n * Class that describe objects with an unique id and with names.\n * \n * @extends module:meteoJS/base/unique.Unique\n * @extends module:meteoJS/base/named.Named\n */\nexport class UniqueNamed extends Named {\n  \n  /**\n   * @param {module:meteoJS/base/uniquenamed~options} [options] - Options.\n   */\n  constructor({ id, name = undefined, names = {}, langSortation = [] } = {}) {\n    super({\n      name,\n      names,\n      langSortation\n    });\n    \n    Object.defineProperty(this, 'id',\n      Object.getOwnPropertyDescriptor(Unique.prototype, 'id'));\n    // constructor code of Unique\n    this._id = id;\n  }\n  \n  /**\n   * @override\n   */\n  setId(id) {\n    Unique.prototype.setId.call(this, id);\n  }\n  \n  /**\n   * @override\n   */\n  getDefaultName() {\n    return (this._name !== undefined)\n      ? this._name\n      : (Object.keys(this._names).length > 0)\n        ? this.getNameByLang()\n        : (this._id === undefined) ? '' : this._id;\n  }\n}\nexport default UniqueNamed;","/**\n * @module meteoJS/modelviewer/variable\n */\nimport UniqueNamed from '../base/UniqueNamed.js';\n\n/**\n * Options for constructor.\n * \n * @typedef {module:meteoJS/base/uniquenamed~options}\n *   module:meteoJS/modelviewer/variable~options\n * @param {module:meteoJS/modelviewer/variableCollection.VariableCollection}\n *   [variableCollection] - Belongs to this VariableCollection.\n */\n\n/**\n * @classdesc Object for e.g. a model, a runtime or a field.\n */\nexport class Variable extends UniqueNamed {\n  \n  /**\n   * @param {module:meteoJS/modelviewer/variable~options} [options] - Options.\n   */\n  constructor({ id,\n    name = undefined,\n    names = {},\n    langSortation = [],\n    variableCollection } = {}) {\n    super({\n      id,\n      name,\n      names,\n      langSortation\n    });\n    \n    /**\n     * @type undefined|module:meteoJS/modelviewer/variableCollection.VariableCollection\n     * @private\n     */\n    this._variableCollection = variableCollection;\n  }\n  \n  /**\n   * This Variable belongs to this VariableCollection.\n   * @type undefined|module:meteoJS/modelviewer/variableCollection.VariableCollection\n   */\n  get variableCollection() {\n    return this._variableCollection;\n  }\n  set variableCollection(variableCollection) {\n    this._variableCollection = variableCollection;\n  }\n}\nexport default Variable;","/**\n * @module meteoJS/modelviewer/timeVariable\n */\nimport Variable from './Variable.js';\n\n/**\n * Options for TimeVariable constructor\n * \n * @typedef {module:meteoJS/base/uniquenamed~options}\n *   module:meteoJS/modelviewer/timeVariable~options\n * @param {Date|undefined} [datetime] - Datetime.\n */\n\n/**\n * @classdesc Class for something representing a time, e.g. runtime or offset.\n */\nexport class TimeVariable extends Variable {\n  \n  /**\n   * @param {module:meteoJS/modelviewer/timeVariable~options} options - Options.\n   */\n  constructor({ id,\n    name = undefined,\n    names = {},\n    langSortation = [],\n    datetime = undefined } = {}) {\n    super({\n      id,\n      name,\n      names,\n      langSortation\n    });\n    \n    /**\n     * @type Date|undefined\n     * @private\n     */\n    this._datetime = (this.id === undefined) ? undefined : new Date(this.id);\n    \n    if (datetime !== undefined)\n      this.datetime = datetime;\n  }\n  \n  /**\n   * @override\n   */\n  setId(id) {\n    this._datetime = (id === undefined) ? undefined : new Date(id);\n  }\n  \n  /**\n   * @type Date|undefined\n   */\n  get datetime() {\n    return this._datetime;\n  }\n  set datetime(datetime) {\n    this._datetime = datetime;\n    this._id = (datetime !== undefined) ? datetime.valueOf() : undefined;\n  }\n}\nexport default TimeVariable;","/**\n * @module meteoJS/modelviewer/variableCollection\n */\nimport Variable from './Variable.js';\nimport Unique from '../base/Unique.js';\nimport UniqueNamed from '../base/UniqueNamed.js';\nimport NamedCollection from '../base/NamedCollection.js';\n\n/**\n * Triggered on adding a Variable to collection.\n * \n * @event module:meteoJS/modelviewer/variableCollection#add:variable\n * @param {module:meteoJS/modelviewer/variable.Variable} variable -\n *   Added variable.\n */\n\n/**\n * Triggered on removing a Variable from collection.\n * \n * @event module:meteoJS/modelviewer/variableCollection#remove:variable\n * @param {module:meteoJS/modelviewer/variable.Variable} variable -\n *   Removed variable.\n */\n\n/**\n * Options for constructor.\n * \n * @typedef {module:meteoJS/base/namedCollection~options}\n *   module:meteoJS/modelviewer/variableCollection~options\n */\n\n/**\n * @classdesc A collection of Variable-objects. It also defines a hierarchy\n *   of the collections. So a VariableCollection could have children and\n *   parents. A variable object can only belong to one collection.\n * @augments module:meteoJS/base/unique.Unique\n * @fires module:meteoJS/modelviewer/variableCollection#add:variable\n * @fires module:meteoJS/modelviewer/variableCollection#remove:variable\n */\nexport class VariableCollection extends NamedCollection {\n  \n  /**\n   * @param {module:meteoJS/modelviewer/variableCollection~options} options\n   *   - Options.\n   */\n  constructor({ id,\n    fireReplace=true,\n    fireAddRemoveOnReplace=false,\n    appendOnReplace=true,\n    sortFunction,\n    names,\n    langSortation } = {}) {\n    super({\n      emptyObjectMaker: () => { return new Variable(); },\n      fireReplace,\n      fireAddRemoveOnReplace,\n      appendOnReplace,\n      sortFunction,\n      names,\n      langSortation\n    });\n    \n    Object.defineProperty(this, 'id',\n      Object.getOwnPropertyDescriptor(Unique.prototype, 'id'));\n    // constructor code of Unique\n    this._id = id;\n    \n    // ID as name\n    Object.defineProperty(this, 'getDefaultName',\n      Object.getOwnPropertyDescriptor(UniqueNamed.prototype, 'getDefaultName'));\n    \n    /**\n     * @type undefined|module:meteoJS/modelviewer/node.Node\n     * @private\n     */\n    this._node = undefined;\n    \n    this.on('add:item', item => {\n      if (item.variableCollection !== undefined)\n        item.variableCollection.remove(item);\n      item.variableCollection = this;\n      this.trigger('add:variable', item);\n    });\n    this.on('remove:item', item => this.trigger('remove:variable', item));\n  }\n  \n  /**\n   * @override\n   */\n  setId(id) {\n    Unique.prototype.setId.call(this, id);\n  }\n  \n  /**\n   * Variables contained by this collection.\n   * \n   * @type module:meteoJS/modelviewer/variable.Variable[]\n   */\n  get variables() {\n    return this.items;\n  }\n  \n  /**\n   * Alias of getItemById.\n   * \n   * @param {mixed} id ID.\n   * @returns {module:meteoJS/modelviewer/variable.Variable} Variable.\n   */\n  getVariableById(id) {\n    return this.getItemById(id);\n  }\n  \n  /**\n   * If defined, this VariableCollection belongs to this node.\n   * \n   * @type undefined|module:meteoJS/modelviewer/node.Node\n   */\n  get node() {\n    return this._node;\n  }\n  set node(node) {\n    this._node = node;\n  }\n}\nexport default VariableCollection;","/**\n * @module meteoJS/base/namedCollection\n */\nimport Collection from './Collection.js';\nimport Named from './Named.js';\n\n/**\n * Options for constructor.\n * \n * @typedef {module:meteoJS/base/collection~options}\n *   module:meteoJS/base/namedCollection~options\n * @property {string} [name] - Default name.\n * @property {Object.<string,string>} [names] - Names.\n * @property {string[]} [langSortation] - Priority of language codes.\n */\n\n/**\n * Collection-class with i18n names.\n * \n * @extends module:meteoJS/base/collection.Collection\n * @extends module:meteoJS/base/named.Named\n */\nexport class NamedCollection extends Collection {\n  \n  /**\n   * @param {module:meteoJS/base/namedCollection~options} options - Options.\n   */\n  constructor({ fireReplace=true,\n    fireAddRemoveOnReplace=false,\n    appendOnReplace=true,\n    sortFunction,\n    emptyObjectMaker,\n    name = undefined,\n    names = {},\n    langSortation = []\n  } = {}) {\n    super({\n      fireReplace,\n      fireAddRemoveOnReplace,\n      appendOnReplace,\n      sortFunction,\n      emptyObjectMaker\n    });\n    \n    Object.defineProperty(this, 'name',\n      Object.getOwnPropertyDescriptor(Named.prototype, 'name'));\n    Object.getPrototypeOf(this).getDefaultName = Named.prototype.getDefaultName;\n    Object.getPrototypeOf(this).getNameByLang = Named.prototype.getNameByLang;\n    Object.getPrototypeOf(this).setNameByLang = Named.prototype.setNameByLang;\n    Object.getPrototypeOf(this).getNameByLangNoFallback =\n      Named.prototype.getNameByLangNoFallback;\n    // Named constructor code\n    /**\n     * @type undefined|string\n     * @private\n     */\n    this._name = name;\n    \n    /**\n     * @type Object<string,string>\n     * @private\n     */\n    this._names = names;\n    \n    /**\n     * @type string[]\n     * @private\n     */\n    this._langSortation = langSortation;\n  }\n}\nexport default NamedCollection;","/**\n * @module meteoJS/modelviewer/resourcesTreeNode\n */\n\n/**\n * Options for constructor.\n * \n * @typedef {Object} module:meteoJS/modelviewer/resourcesTreeNode~options\n * @param {module:meteoJS/modelviewer/node.Node} node\n *   The object is linked to this node.\n */\n\n/**\n * Internal class to manage the available resources inside the\n * {@link module:meteoJS/modelviewer/node.Node|Node class}. Each\n * ResourcesTreeNode object is linked to a Node object. It is a many to one\n * relation. The hierarchy of the ResourcesTree is analogue to the Node\n * hierarchy. But the tree is build via the\n * {@link module:meteoJS/modelviewer/variable.Variable|Variable objects}.\n * So, this class is not only linked to a Node object, but subsequently for a\n * {@link module:meteoJS/modelviewer/variableCollection.VariableCollection|VariableCollection object}.\n * If a {@link module:meteoJS/modelviewer/resource.Resource|Resource} for a\n * certain Variable object from this VariableCollection is added, then a\n * child ResourcesTreeNode object is inserted in the tree (if it doesn't exists)\n * for the Variable object.\n * \n * @internal\n */\nexport class ResourcesTreeNode {\n  \n  /**\n   * @param {module:meteoJS/modelviewer/resourcesNode~options} [options]\n   *   Options.\n   */\n  constructor({ node }) {\n    \n    /**\n     * @type module:meteoJS/modelviewer/node.Node\n     * @private\n     */\n    this._node = node;\n\n    /**\n     * @type Map.<module:meteoJS/modelviewer/variable.Variable,module:meteoJS/modelviewer/resourcesTreeNode.ResourcesTreeNode>\n     * @private\n     */\n    this._children = new Map();\n\n    /**\n     * @type module:meteoJS/modelviewer/resourcesTreeNode.ResourcesTreeNode\n     * @private\n     */\n    this._parent = undefined;\n  }\n\n  /**\n   * Linked Node object.\n   * \n   * @type module:meteoJS/modelviewer/node.Node\n   * @readonly\n   */\n  get node() {\n    return this._node;\n  }\n\n  /**\n   * Linked VariableCollection object.\n   * \n   * @type module:meteoJS/modelviewer/variableCollection.VariableCollection\n   * @readonly\n   */\n  get variableCollection() {\n    return this._node.variableCollection;\n  }\n\n  get children() {\n    return [...this._children.values()];\n  }\n\n  /**\n   * The parent object of this ResourcesTree-Node.\n   * \n   * @type undefined|module:meteoJS/modelviewer/resourcesTreeNode.ResourcesTreeNode\n   */\n  get parent() {\n    return this._parent;\n  }\n  set parent(parent) {\n    this._parent = parent;\n  }\n\n  /**\n   * Returns the child corresponding to the passed variable.\n   * \n   * @param {module:meteoJS/modelviewer/variable.Variable} variable - Variable.\n   * @returns {module:meteoJS/modelviewer/resourcesTreeNode.ResourcesTreeNode}\n   *   Child ResourcesTreeNode object for the passed variable.\n   */\n  getChildByVariable(variable) {\n    return this._children.get(variable);\n  }\n\n  /**\n   * Build tree \n   * \n   * @param {Object} options - Options.\n   * @param {module:meteoJS/modelviewer/resource.Resource} options.resource\n   *   The added Resource object.\n   * @param {module:meteoJS/modelviewer/node.Node} options.aimedNode\n   *   The Resource object will be inserted into this Node object.\n   * @returns {undefined|module:meteoJS/modelviewer/resourcesTreeNode.ResourcesTreeNode}\n   */\n  buildChildrenTreeForResource({\n    resource,\n    aimedNode\n  }) {\n    if (this.node === aimedNode)\n      return this;\n\n    const variable =\n      resource.getVariableByVariableCollection(this.variableCollection);\n    /* Shouldn't get an unknown Variable. The resource is inserted in the\n     * Node-tree with a Variable in each Node. */\n    if (variable.id === undefined)\n      return undefined;\n\n    let child = this._children.get(variable);\n    if (child !== undefined)\n      return child.buildChildrenTreeForResource({ resource, aimedNode });\n    // Child doesn't already exist\n    this.node.children.forEach(node => {\n      // The resource will belong only to one node.\n      const childVariable =\n        resource.getVariableByVariableCollection(node.variableCollection);\n      if (childVariable.id !== undefined)\n        child = new ResourcesTreeNode({ node });\n    });\n    if (child !== undefined) {\n      this._children.set(variable, child);\n      child.parent = this;\n      return child.buildChildrenTreeForResource({ resource, aimedNode });\n    }\n    return undefined;\n  }\n\n  /**\n   * Removes a child in the Resources-Tree. If this was the only child of this\n   * Resources-Tree-Node, then remove this Tree-Node from the parent.\n   */\n  removeChild({\n    child\n  }) {\n    for (const [variable, c] of this._children.entries())\n      if (c === child)\n        this._children.delete(variable);\n    if (this._children.size < 1\n      && this.parent !== undefined)\n      this.parent.removeChild({ child: this });\n  }\n\n  /**\n   * Returns the bottom most ResourcesTreeNode object. On the way from the top\n   * ResourcesTreeNode to this object, for every passed Variable object a\n   * suitable ResourcesTreeNode is passed.\n   * \n   * @param {...module:meteoJS/modelviewer/variable.Variable} - variables\n   *   A set of Variable objects.\n   * @returns {undefined|module:meteoJS/modelviewer/resourcesTreeNode.ResourcesTreeNode}\n   *   Bottom most object.\n   */\n  findNodeByVariables(...variables) {\n    let v = undefined;\n    variables.forEach(variable => {\n      if (variable.variableCollection === this.variableCollection)\n        v = variable;\n    });\n    if (v === undefined)\n      return undefined;\n    const child = this._children.get(v);\n    if (child !== undefined) {\n      const result = child.findNodeByVariables(...variables);\n      return (result === undefined) ? this : result;\n    }\n    return this;\n  }\n}\nexport default ResourcesTreeNode;","/**\n * @module meteoJS/modelviewer/node\n */\nimport addEventFunctions from '../Events.js';\nimport ResourcesTreeNode from './ResourcesTreeNode.js';\n\n/**\n * Triggered on append of a child node.\n * \n * @event module:meteoJS/modelviewer/node#append:child\n * @param {module:meteoJS/modelviewer/node.Node} node - Appended child node.\n */\n\n/**\n * A node has always a correspondent VariableCollection. With the node objects\n * a hierarchy of the collections is build up. This hierarchy is mainly used\n * to achieve a good user experience. This way, the menus in the\n * {@link module:meteoJS/modelviewer/container.Container|modelviewer-container}\n * could be setup to present the user only available fields or levels or only\n * activate buttons which are available for a certain model and run.\n * Additionally a node contains a list of resources, this is used internally\n * in {@link module:meteoJS/modelviewer/resources.Resources}.\n * \n * @fires module:meteoJS/modelviewer/node#append:child\n */\nexport class Node {\n  \n  /**\n   * @param {module:meteoJS/modelviewer/variableCollection.VariableCollection}\n   *   variableCollection\n   *   This node belongs to this collection.\n   */\n  constructor(variableCollection) {\n    \n    /**\n     * @type module:meteoJS/modelviewer/variableCollection.VariableCollection\n     * @private\n     */\n    this._variableCollection = variableCollection;\n    variableCollection.node = this;\n    \n    /**\n     * @type module:meteoJS/modelviewer/node.Node[]\n     * @private\n     */\n    this._parents = [];\n    \n    /**\n     * @type module:meteoJS/modelviewer/node.Node[]\n     * @private\n     */\n    this._children = [];\n    \n    /**\n     * @type undefined|module:meteoJS/modelviewer/resourcesTreeNode.ResourcesTreeNode\n     * @private\n     */\n    this._resourcesTopNode = undefined;\n\n    /**\n     * @type Map<module:meteoJS/modelviewer/resourcesTreeNode.ResourcesTreeNode,\n     *           Map<module:meteoJS/modelviewer/variable.Variable,\n     *               Set<module:meteoJS/modelviewer/resource.Resource>>>\n     * @private\n     */\n    this._resources = new Map();\n  }\n  \n  /**\n   * VariableCollection correspondent to this node.\n   * \n   * @type module:meteoJS/modelviewer/variableCollection.VariableCollection\n   */\n  get variableCollection() {\n    return this._variableCollection;\n  }\n  \n  /**\n   * Parent nodes.\n   * \n   * @type module:meteoJS/modelviewer/node.Node[]\n   */\n  get parents() {\n    return this._parents;\n  }\n  \n  /**\n   * Child nodes.\n   * \n   * @type module:meteoJS/modelviewer/node.Node[]\n   */\n  get children() {\n    return this._children;\n  }\n  \n  /**\n   * Appends a node as a child.\n   * \n   * @param {...module:meteoJS/modelviewer/node.Node} nodes - Node to append.\n   * @returns {module:meteoJS/modelviewer/node.Node} This.\n   * @fires module:meteoJS/modelviewer/node#append:child\n   */\n  appendChild(...nodes) {\n    nodes.forEach(node => {\n      this._children.push(node);\n      node._addParent(this);\n      this.trigger('append:child', node);\n    });\n    return this;\n  }\n  \n  /**\n   * Adds a parent node.\n   * \n   * @param {module:meteoJS/modelviewer/node.Node} node - Node to add.\n   * @package\n   */\n  _addParent(node) {\n    this._parents.push(node);\n  }\n  \n  /**\n   * All contained resources.\n   * \n   * @type module:meteoJS/modelviewer/resource.Resource[]\n   * @package\n   */\n  get resources() {\n    const result = [];\n    for (const m of this._resources.values()) {\n      [...m.values()]\n        .forEach(resources => result.push(...resources));\n    }\n    return result;\n  }\n  \n  /**\n   * Append resources.\n   * \n   * @param {...module:meteoJS/modelviewer/resource.Resource} resources\n   *   Resources.\n   * @returns {integer} Count of really added resources.\n   * @package\n   */\n  append(...resources) {\n    if (this._resourcesTopNode === undefined)\n      this._makeResourcesTopNode();\n\n    let addedCount = 0;\n    resources.forEach(resource => {\n      if (resource.variables\n        .filter(v => v.variableCollection === this.variableCollection)\n        .length < 1)\n        return;\n      const resourcesTreeNode =\n        this._resourcesTopNode.buildChildrenTreeForResource({\n          resource,\n          aimedNode: this\n        });\n      if (resourcesTreeNode !== undefined) {\n        const variable = resource\n          .getVariableByVariableCollection(resourcesTreeNode.variableCollection);\n        if (variable !== undefined) {\n          let mapByVariables = this._resources.get(resourcesTreeNode);\n          if (mapByVariables === undefined) {\n            mapByVariables = new Map();\n            this._resources.set(resourcesTreeNode, mapByVariables);\n          }\n          let resources = mapByVariables.get(variable);\n          if (resources === undefined) {\n            resources = new Set();\n            mapByVariables.set(variable, resources);\n          }\n          if (!resources.has(resource)) {\n            resources.add(resource);\n            addedCount++;\n          }\n        }\n      }\n    });\n    return addedCount;\n  }\n  \n  /**\n   * Removes resources.\n   * \n   * @param {...module:meteoJS/modelviewer/resource.Resource} resources\n   *   Resources.\n   * @returns {integer} Count of really removed resources.\n   * @package\n   */\n  remove(...resources) {\n    let removedCount = 0;\n    resources.forEach(resource => {\n      const resourcesTreeNode = this._resourcesTopNode\n        .findNodeByVariables(...resource.variables);\n      if (resourcesTreeNode !== undefined) {\n        const variable = resource\n          .getVariableByVariableCollection(resourcesTreeNode.variableCollection);\n        const mapByVariables = this._resources.get(resourcesTreeNode);\n        if (mapByVariables !== undefined) {\n          const resourcesSet = mapByVariables.get(variable);\n          if (resourcesSet !== undefined) {\n            resourcesSet.delete(resource);\n            removedCount++;\n            if (resourcesSet.size < 1) {\n              mapByVariables.delete(variable);\n              if (mapByVariables.size < 1) {\n                this._resources.delete(resourcesTreeNode);\n                const parent = resourcesTreeNode.parent;\n                if (parent !== undefined)\n                  parent.removeChild({ child: resourcesTreeNode });\n              }\n            }\n          }\n        }\n      }\n    });\n    return removedCount;\n  }\n  \n  /**\n   * Returns all or a part of the resources contained in this node. The returned\n   * resources are defined by all of the passed variables.\n   * \n   * @param {boolean} [exactlyMatch=false] - Only return resources, which are\n   *   defined exactly by the passed variables.\n   * @param {...module:meteoJS/modelviewer/variable.Variable} variables\n   *   Variables.\n   * @returns {module:meteoJS/modelviewer/resource.Resource[]} Resources.\n   */\n  getResourcesByVariables(...variables) {\n    if (this._resourcesTopNode === undefined)\n      return [];\n\n    let exactlyMatch = false;\n    if (variables.length &&\n        typeof variables[0] === 'boolean')\n      exactlyMatch = variables.shift();\n    \n    if (exactlyMatch && variables.length == 0)\n      return [];\n\n    if (exactlyMatch) {\n      const variablesSet = new Set(variables);\n      const node = this._resourcesTopNode.findNodeByVariables(...variables);\n      const mapByVariables = this._resources.get(node);\n      if (mapByVariables !== undefined) {\n        for (const [variable, resources] of mapByVariables) {\n          if (!variablesSet.has(variable))\n            continue;\n          if (resources === undefined || resources.size < 1)\n            return [];\n          const resource = [...resources][0];\n          let isAdded = true;\n          variables.forEach(variable => {\n            const v = resource.getVariableByVariableCollection(variable.variableCollection);\n            if (v !== variable)\n              isAdded = false;\n          });\n          return isAdded ? [...resources] : [];\n        }\n      }\n      return [];\n    }\n\n    // !exactlyMatch\n    const collectResourcesTreeChildren = resourcesTreeNode => {\n      let result = new Set();\n      if (resourcesTreeNode.children.length < 1) {\n        result.add(resourcesTreeNode);\n        return result;\n      }\n      let v = undefined;\n      variables.forEach(variable => {\n        if (variable.variableCollection === resourcesTreeNode.variableCollection)\n          v = variable;\n      });\n      /* If no variable is found, then collect the nodes of all children. */\n      if (v === undefined) {\n        resourcesTreeNode.children.forEach(child => {\n          result = new Set([...result, ...collectResourcesTreeChildren(child)]);\n        });\n      }\n      else {\n        const child = resourcesTreeNode.getChildByVariable(v);\n        if (child !== undefined)\n          result = new Set([...result, ...collectResourcesTreeChildren(child)]);\n      }\n      return result;\n    };\n    const resourcesTreeNodes = collectResourcesTreeChildren(this._resourcesTopNode);\n    const result = [];\n    [...resourcesTreeNodes].forEach(resourcesTreeNode => {\n      const mapByVariables = this._resources.get(resourcesTreeNode);\n      if (mapByVariables === undefined)\n        return;\n      for (const [variable, resources] of mapByVariables) {\n        if (variable.variableCollection !== resourcesTreeNode.variableCollection)\n          continue;\n        if (resources === undefined || resources.size < 1)\n          return;\n        const resource = [...resources][0];\n        let isAdded = true;\n        variables.forEach(variable => {\n          const v = resource.getVariableByVariableCollection(variable.variableCollection);\n          if (v !== variable) {\n            isAdded = false;\n          }\n        });\n        if (isAdded)\n          result.push(...resources);\n      }\n    });\n    return result;\n  }\n\n  /**\n   * Returns if there exists resources which are defined by all of the passed\n   * variables.\n   * \n   * @param {boolean} [exactlyMatch=false] - Only returns true, if there exists\n   *  at least one resource, which is defined exactly by the passed variables.\n   * @param {...module:meteoJS/modelviewer/variable.Variable} variables\n   *   Variables.\n   * @returns {boolean} Exists at least one resource.\n   */\n  hasResourcesByVariables(...variables) {\n    return (this.getResourcesByVariables(...variables).length > 0);\n  }\n\n  /**\n   * Creates to top node for the resources-tree.\n   * \n   * @private\n   */\n  _makeResourcesTopNode() {\n    const traversedNodes = new Set();\n    const getTopNode = node => {\n      const parents = node.parents;\n      if (parents.length < 1)\n        return node;\n      let result = undefined;\n      parents.forEach(parentNode => {\n        if (!traversedNodes.has(parentNode)) {\n          traversedNodes.add(parentNode);\n          const r = getTopNode(parentNode);\n          if (r !== undefined)\n            result = r;\n        }\n      });\n      return result;\n    };\n    this._resourcesTopNode =\n      new ResourcesTreeNode({ node: getTopNode(this) });\n  }\n}\naddEventFunctions(Node.prototype);\nexport default Node;","/**\n * @module meteoJS/modelviewer/resource\n */\nimport Variable from './Variable.js';\n\n/**\n * Options for constructor.\n * \n * @typedef {Object} module:meteoJS/modelviewer/resource~options\n * @param {module:meteoJS/modelviewer/variable.Variable[]} [variables] -\n *   Variables, which define this resource uniquely.\n *   The variables must be from different VariableCollections.\n * @param {Date} [datetime] - Datetime, ignored if run and offset are defined.\n * @param {Date} [run] - Runtime.\n * @param {integer} [offset] - Offset in seconds.\n */\n\n/**\n * @classdesc Class to describe a data resource like a modelplot or a\n *   sounding data. The resource must be defined uniquely by several variables\n *   (like model, runtime, …). You should not define the resource by\n *   several variables of the same collection.\n * @abstract\n */\nexport class Resource {\n  \n  /**\n   * @param {module:meteoJS/modelviewer/resource~options} [options] - Options.\n   */\n  constructor({ variables = [],\n    datetime = undefined,\n    run = undefined,\n    offset = undefined } = {}) {\n    /**\n     * @type Set<module:meteoJS/modelviewer/variable.Variable>\n     * @private\n     */\n    this._variables = new Map();\n    variables.forEach(variable =>\n      this._variables.set(variable.variableCollection, variable));\n    \n    /**\n     * @type Date|undefined\n     * @private\n     */\n    this._datetime = datetime;\n    \n    /**\n     * @type undefined|Date\n     */\n    this._run = run;\n    \n    /**\n     * @type undefined|integer\n     */\n    this._offset = offset;\n    \n    this._updateDatetime();\n  }\n  \n  /**\n   * Variable objects, which define this resource. Like model, run, offset,…\n   * \n   * @type module:meteoJS/modelviewer/variable.Variable[]\n   * @readonly\n   */\n  get variables() {\n    return [...this._variables.values()];\n  }\n  \n  /**\n   * Resource is valid for this datetime. If undefined, than the resource is\n   * not only valid at one datetime.\n   * \n   * @type Date|undefined\n   */\n  get datetime() {\n    return this._datetime;\n  }\n  set datetime(datetime) {\n    this._datetime = datetime;\n  }\n  \n  /**\n   * Runtime.\n   * \n   * @type Date|undefined\n   */\n  get run() {\n    return this._run;\n  }\n  set run(run) {\n    this._run = run;\n    this._updateDatetime();\n  }\n  \n  /**\n   * Offset.\n   * \n   * @type integer|undefined\n   */\n  get offset() {\n    return this._offset;\n  }\n  set offset(offset) {\n    this._offset = offset;\n    this._updateDatetime();\n  }\n  \n  /**\n   * Returns the variable-object that is part of the definition of this resource\n   * and contains to the passed collection. If you define the resource by\n   * several variables of the same variable collection, it is not defined\n   * which variable is returned.\n   * \n   * @param {module:meteoJS/modelviewer/variableCollection.VariableCollection}\n   *   variableCollection - VariableCollection.\n   * @returns {module:meteoJS/modelviewer/variable.Variable}\n   */\n  getVariableByVariableCollection(variableCollection) {\n    const result = this._variables.get(variableCollection);\n    return (result === undefined) ? new Variable() : result;\n  }\n  \n  /**\n   * Returns if the passed Variable-objects all define this resource.\n   * \n   * @param {boolean} [exactlyMatch] - Only return true, if the passed\n   *   variables exactly define the resource.\n   * @param {...module:meteoJS/modelviewer/variable.Variable} variables\n   *   Variables.\n   * @returns {boolean} All passed variables defines the resource.\n   */\n  isDefinedBy(...variables) {\n    let exactlyMatch = false;\n    if (variables.length &&\n        typeof variables[0] === 'boolean')\n      exactlyMatch = variables.shift();\n    const vars = new Set([...this._variables.values()]);\n    if (!exactlyMatch)\n      return variables.filter(v => !vars.has(v)).length == 0;\n    \n    if (variables.filter(v => !vars.has(v)).length != 0)\n      return false;\n    const variablesSet = new Set(variables);\n    return [...vars].filter(v => !variablesSet.has(v)).length == 0;\n  }\n  \n  /**\n   * Returns if a Variable-object of the passed collection defines this\n   * resource.\n   * \n   * @param {module:meteoJS/modelviewer/variableCollection.VariableCollection}\n   *   variableCollection - VariableCollection.\n   * @returns {boolean} A variable of the collection defines the resource.\n   */\n  isDefinedByVariableOf(variableCollection) {\n    return this._variables.get(variableCollection) !== undefined;\n  }\n  \n  /**\n   * Sets datetime according to run and offset.\n   * \n   * @private\n   */\n  _updateDatetime() {\n    if (this._run !== undefined &&\n        this._offset !== undefined)\n      this.datetime = new Date(this._run.valueOf() + this._offset * 1000);\n  }\n}\nexport default Resource;","/**\n * @module meteoJS/modelviewer/resource/image\n */\nimport Resource from '../Resource.js';\n\n/**\n * Options for constructor.\n * \n * @typedef {module:meteoJS/modelviewer/resource~options}\n *   module:meteoJS/modelviewer/resource/image~options\n * @param {string} [url] - URL to the Image.\n */\n\n/**\n * @classdesc Class to describe an image resource.\n */\nexport class Image extends Resource {\n  \n  /**\n   * @param {module:meteoJS/modelviewer/resource/image~options} [options]\n   *   Options.\n   */\n  constructor({ variables = [],\n    datetime = undefined,\n    run = undefined,\n    offset = undefined,\n    url = undefined /*, mimetype, ...*/ } = {}) {\n    super({\n      variables,\n      datetime,\n      run,\n      offset\n    });\n    \n    /**\n     * @type string\n     * @private\n     */\n    this._url = url;\n  }\n  \n  /**\n   * URL to the Image.\n   * \n   * @type string\n   */\n  get url() {\n    return this._url;\n  }\n}\nexport default Image;","/**\n * @module meteoJS/sounding/parcel\n */\nimport Unique from '../base/Unique.js';\n\n/**\n * Options for the constructor.\n * \n * @typedef {Object} module:meteoJS/sounding/parcel~options\n * @param {undefined|number} [pres=undefined]\n *   Parcel beginning pressure (mb).\n * @param {undefined|number} [tmpc=undefined]\n *   Parcel beginning temperature (C).\n * @param {undefined|number} [dwpc=undefined]\n *   Parcel beginning dewpoint (C).\n * @param {undefined|number} [ptrace=undefined]\n *   Parcel trace pressure (mb).\n * @param {undefined|number} [ttrace=undefined]\n *   Parcel trace temperature (C).\n * @param {undefined|number} [blayer=undefined]\n *   Pressure of the bottom of the layer the parcel is lifted (mb).\n * @param {undefined|number} [tlayer=undefined]\n *   Pressure of the top of the layer the parcel is lifted (mb).\n * @param {undefined|number} [lclpres=undefined]\n *   Parcel LCL (lifted condensation level) pressure (mb).\n * @param {undefined|number} [lclhght=undefined]\n *   Parcel LCL height (m AGL).\n * @param {undefined|number} [lfcpres=undefined]\n *   Parcel LFC (level of free convection) pressure (mb).\n * @param {undefined|number} [lfchght=undefined]\n *   Parcel LFC height (m AGL).\n * @param {undefined|number} [elpres=undefined]\n *   Parcel EL (equilibrium level) pressure (mb).\n * @param {undefined|number} [elhght=undefined]\n *   Parcel EL height (m AGL).\n * @param {undefined|number} [mplpres=undefined]\n *   Maximum Parcel Level (mb).\n * @param {undefined|number} [mplhght=undefined]\n *   Maximum Parcel Level (m AGL).\n * @param {undefined|number} [bplus=undefined]\n *   Parcel CAPE (J/kg).\n * @param {undefined|number} [bminus=undefined]\n *   Parcel CIN (J/kg).\n * @param {undefined|number} [bfzl=undefined]\n *   Parcel CAPE up to freezing level (J/kg).\n * @param {undefined|number} [b3km=undefined]\n *   Parcel CAPE up to 3 km (J/kg).\n * @param {undefined|number} [b6km=undefined]\n *   Parcel CAPE up to 6 km (J/kg).\n * @param {undefined|number} [p0c=undefined]\n *   Pressure value at 0 C  (mb).\n * @param {undefined|number} [pm10c=undefined]\n *   Pressure value at -10 C (mb).\n * @param {undefined|number} [pm20c=undefined]\n *   Pressure value at -20 C (mb).\n * @param {undefined|number} [pm30c=undefined]\n *   Pressure value at -30 C (mb).\n * @param {undefined|number} [hght0c=undefined]\n *   Height value at 0 C (m AGL).\n * @param {undefined|number} [hghtm10c=undefined]\n *   Height value at -10 C (m AGL).\n * @param {undefined|number} [hghtm20c=undefined]\n *   Height value at -20 C (m AGL).\n * @param {undefined|number} [hghtm30c=undefined]\n *   Height value at -30 C (m AGL).\n * @param {undefined|number} [wm10c=undefined]\n *   Wet bulb velocity at -10 C.\n * @param {undefined|number} [wm20c=undefined]\n *   Wet bulb velocity at -20 C.\n * @param {undefined|number} [wm30c=undefined]\n *   Wet bulb at -30 C.\n * @param {undefined|number} [li5=undefined]\n *   Lifted Index at 500 mb (C).\n * @param {undefined|number} [li3=undefined]\n *   Lifted Index at 300 mb (C).\n * @param {undefined|number} [brnshear=undefined]\n *   Bulk Richardson Number Shear.\n * @param {undefined|number} [brnu=undefined]\n *   Bulk Richardson Number U (kts).\n * @param {undefined|number} [brnv=undefined]\n *   Bulk Richardson Number V (kts).\n * @param {undefined|number} [brn=undefined]\n *   Bulk Richardson Number (unitless).\n * @param {undefined|number} [limax=undefined]\n *   Maximum Lifted Index (C).\n * @param {undefined|number} [limaxpres=undefined]\n *   Pressure at Maximum Lifted Index (mb).\n * @param {undefined|number} [cap=undefined]\n *   Cap Strength (C).\n * @param {undefined|number} [cappres=undefined]\n *   Cap strength pressure (mb).\n * @param {undefined|number} [bmin=undefined]\n *   Buoyancy minimum in profile (C).\n * @param {undefined|number} [bminpres=undefined]\n *   Buoyancy minimum pressure (mb).\n */\n\n/**\n * Class representing a parcel lifting.\n * \n * @extends module:meteoJS/base/unique.Unique\n */\nexport class Parcel extends Unique {\n  \n  /**\n   * @param {module:meteoJS/sounding/parcel~options} [options] - Options.\n   */\n  constructor({\n    id = undefined,\n    pres = undefined,\n    tmpc = undefined,\n    dwpc = undefined,\n    ptrace = undefined,\n    ttrace = undefined,\n    blayer = undefined,\n    tlayer = undefined,\n    lclpres = undefined,\n    lclhght = undefined,\n    lfcpres = undefined,\n    lfchght = undefined,\n    elpres = undefined,\n    elhght = undefined,\n    mplpres = undefined,\n    mplhght = undefined,\n    bplus = undefined,\n    bminus = undefined,\n    bfzl = undefined,\n    b3km = undefined,\n    b6km = undefined,\n    p0c = undefined,\n    pm10c = undefined,\n    pm20c = undefined,\n    pm30c = undefined,\n    hght0c = undefined,\n    hghtm10c = undefined,\n    hghtm20c = undefined,\n    hghtm30c = undefined,\n    wm10c = undefined,\n    wm20c = undefined,\n    wm30c = undefined,\n    li5 = undefined,\n    li3 = undefined,\n    brnshear = undefined,\n    brnu = undefined,\n    brnv = undefined,\n    limax = undefined,\n    limaxpres = undefined,\n    cap = undefined,\n    cappres = undefined,\n    bmin = undefined,\n    bminpres = undefined\n  } = {}) {\n    super({ id });\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.pres = pres;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.tmpc = tmpc;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.dwpc = dwpc;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.ptrace = ptrace;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.ttrace = ttrace;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.blayer = blayer;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.tlayer = tlayer;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.lclpres = lclpres;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.lclhght = lclhght;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.lfcpres = lfcpres;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.lfchght = lfchght;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.elpres = elpres;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.elhght = elhght;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.mplpres = mplpres;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.mplhght = mplhght;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.bplus = bplus;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.bminus = bminus;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.bfzl = bfzl;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.b3km = b3km;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.b6km = b6km;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.p0c = p0c;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.pm10c = pm10c;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.pm20c = pm20c;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.pm30c = pm30c;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.hght0c = hght0c;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.hghtm10c = hghtm10c;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.hghtm20c = hghtm20c;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.hghtm30c = hghtm30c;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.wm10c = wm10c;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.wm20c = wm20c;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.wm30c = wm30c;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.li5 = li5;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.li3 = li3;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.brnshear = brnshear;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.brnu = brnu;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.brnv = brnv;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.limax = limax;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.limaxpres = limaxpres;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.cap = cap;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.cappres = cappres;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.bmin = bmin;\n    \n    /**\n     * @type undefined|number\n     * @public\n     */\n    this.bminpres = bminpres;\n  }\n}\nexport default Parcel;","/**\n * @module meteoJS/sounding\n */\nimport { altitudeISAByPres,\n  potentialTempByTempAndPres,\n  equiPotentialTempByTempAndDewpointAndPres,\n  dewpointByHMRAndPres } from './calc.js';\nimport Collection from './base/Collection.js';\nimport Parcel from './sounding/Parcel.js';\n\n/**\n * Data for a sounding level.\n * Nomenclature is analogue to the SHARPpy project (sharppy/sharptab/profile.py)\n * Exception for some units:\n * * Windspeed always in m/s\n * * Temperature in Kelvin\n * * Relative humidity unitless\n * \n * @typedef {Object} module:meteoJS/sounding~levelData\n * @param {float} pres Pressure level [hPa].\n * @param {float|undefined} [hght] Altitude above sealevel [m].\n * @param {float|undefined} [tmpk] Temperature [K].\n * @param {float|undefined} [dwpk] Dewpoint-temperature [K].\n * @param {float|undefined} [wdir] Wind direction [°].\n * @param {float|undefined} [wspd] Absolute windspeed [m/s].\n * @param {float|undefined} [u] Windspeed in U-direction [m/s].\n * @param {float|undefined} [v] Windspeed in V-direction [m/s].\n * @param {float|undefined} [relh] Relative humidity [].\n * @param {float|undefined} [mixr] Mixing ration [g/kg].\n * @param {float|undefined} [theta] Isentropic temperature [K].\n * @param {float|undefined} [thetae] Equivalent isentropic temperature [K].\n * @param {float|undefined} [wetbulb] Wetbulb isentropic temperature [K].\n * @param {float|undefined} [vtmp] Virtual temperature [K].\n */\n\n/**\n * Options for the constructor.\n * \n * @typedef {Object} module:meteoJS/sounding~options\n * @param {boolean} [calcMissing] - Calculate missing data in each level.\n */\n\n/**\n * Class represents an atmospheric (radio-)sounding.\n */\nexport class Sounding {\n  \n  /**\n   * @param {module:meteoJS/sounding~options} [options] - Options.\n   */\n  constructor({\n    calcMissing = false,\n    parcels = []\n  } = {}) {\n    this.options = {\n      calcMissing\n    };\n    this.levels = {};\n    \n    /**\n     * @type module:meteoJS/base/collection.Collection\n     * @private\n     */\n    this._parcelCollection = new Collection({\n      fireAddRemoveOnReplace: true,\n      fireReplace: false,\n      emptyObjectMaker: () => new Parcel()\n    });\n    this._parcelCollection.append(...parcels);\n  }\n  \n  /**\n   * @type module:meteoJS/base/collection.Collection\n   * @public\n   * @readonly\n   */\n  get parcelCollection() {\n    return this._parcelCollection;\n  }\n  \n  /**\n   * Adds/replaces sounding data.\n   * \n   * @param {module:meteoJS/sounding~levelData[]} levelsData\n   *   Array with data at different levels.\n   * @param {module:meteoJS/sounding~options} [options] - Options.\n   * @returns {module:meteoJS/sounding.Sounding} This.\n   */\n  addLevels(levelsData, options) {\n    levelsData.forEach(function (levelData) {\n      this.addLevel(levelData, options);\n    }, this);\n    return this;\n  }\n\n  /**\n   * Adds/replaces Data for a certain level.\n   * \n   * @param {module:meteoJS/sounding~levelData} levelData - Data to add.\n   * @param {module:meteoJS/sounding~options} [options] - Options.\n   * @returns {module:meteoJS/sounding.Sounding} This.\n   */\n  addLevel(levelData, { calcMissing } = {}) {\n    calcMissing = calcMissing ? calcMissing : this.options.calcMissing;\n    if ('pres' in levelData &&\n      levelData.pres !== undefined) {\n      if (calcMissing)\n        levelData = this.calculateMissingData(levelData);\n      this.levels[levelData.pres] = levelData;\n    }\n    return this;\n  }\n\n  /**\n   * Calculates different parameters, if missing.\n   * \n   * @param {module:meteoJS/sounding~levelData} d - Data.\n   * @returns {module:meteoJS/sounding~levelData} Adjusted data.\n   */\n  calculateMissingData({ pres, hght,\n    u, v, wdir, wspd,\n    tmpk, dwpk,\n    relh, mixr, theta, thetae, wetbulb, vtmp }) {\n    let d = { pres, hght,\n      u, v, wdir, wspd,\n      tmpk, dwpk,\n      relh, mixr, theta, thetae, wetbulb, vtmp };\n  \n    // Height\n    if (d.hght === undefined)\n      d.hght = altitudeISAByPres(d.pres);\n  \n    // Wind\n    if (d.u === undefined &&\n      d.v === undefined &&\n      d.wdir !== undefined &&\n      d.wspd !== undefined) {\n      d.u = d.wspd * Math.sin(d.wdir / 180 * Math.PI);\n      d.v = d.wspd * Math.cos(d.wdir / 180 * Math.PI);\n    }\n    else if (d.u !== undefined &&\n           d.v !== undefined &&\n           d.wdir === undefined &&\n           d.wspd === undefined) {\n      d.wspd = Math.sqrt(Math.pow(d.u, 2) + Math.pow(d.v, 2));\n      d.wdir = Math.arctan(d.u/d.v) / Math.PI * 180;\n    }\n  \n    // Humidity\n    if (d.tmpk !== undefined &&\n      d.dwpk !== undefined) {\n    //if (d.relh === undefined)\n    //  meteoJS.calc.;\n    //if (d.mixr === undefined)\n    //  d.mixr = meteoJS.calc;\n      if (d.theta === undefined)\n        d.theta = potentialTempByTempAndPres(d.tmpk, d.pres);\n      if (d.thetae === undefined)\n        d.thetae =\n        equiPotentialTempByTempAndDewpointAndPres(d.tmpk, d.dwpk, d.pres);\n    }\n    else if (d.mixr !== undefined) {\n      if (d.dwpk === undefined)\n        d.dwpk = dewpointByHMRAndPres(d.mixr, d.pres);\n    }\n  \n    return d;\n  }\n\n  /**\n   * Removes the Data for a certain level (if existing).\n   * \n   * @param {float} pres - Remove the data at this Level [hPa].\n   * @returns {module:meteoJS/sounding.Sounding} this.\n   */\n  removeLevel(pres) {\n    if (pres in this.levels)\n      delete this.levels[pres];\n    return this;\n  }\n\n  /**\n   * Get the data for a specific level. Returns the levelData as passed to the\n   * constructor or addLevel.\n   * \n   * @param {float} pres - Level [hPa].\n   * @returns {module:meteoJS/sounding~levelData|undefined}\n   *   Data at a level, undefined if no data available.\n   */\n  getData(pres) {\n    return (pres in this.levels) ? \n      this.levels[pres] :\n      {\n        pres: undefined,\n        hght: undefined,\n        tmpk: undefined,\n        dwpk: undefined,\n        wdir: undefined,\n        wspd: undefined,\n        u: undefined,\n        v: undefined,\n        relh: undefined,\n        mixr: undefined,\n        theta: undefined,\n        thetae: undefined,\n        wetbulb: undefined,\n        vtmp: undefined\n      };\n  }\n\n  /**\n   * Get data for all defined levels. Upward sorted.\n   * \n   * @returns {module:meteoJS/sounding~levelData[]} Array of all the data.\n   */\n  getLevels() {\n    return Object\n      .keys(this.levels)\n      .map(function (pres) { return +pres; })\n      .sort(function (a,b) { return a-b; });\n  }\n\n  /**\n   * Get nearest level [hPa] with data.\n   * \n   * @param {float} pres Pressure [hPa].\n   * @returns {float|undefined} Level with data or undefined. [hPa]\n   */\n  getNearestLevel(pres) {\n    if (Object.keys(this.levels).length < 1)\n      return undefined;\n    return Object\n      .keys(this.levels)\n      .sort(function (levelA, levelB) {\n        return Math.abs(levelA-pres) - Math.abs(levelB-pres);\n      }).shift();\n  }\n}\nexport default Sounding;","/**\n * @module meteoJS/modelviewer/resource/sounding\n */\nimport Resource from '../Resource.js';\nimport SoundingData from '../../Sounding.js';\n\n/**\n * Options for constructor.\n * \n * @typedef {module:meteoJS/modelviewer/resource~options}\n *   module:meteoJS/modelviewer/resource/sounding~options\n * @param {module:meteoJS/sounding.Sounding} [sounding] - Sounding data.\n */\n\n/**\n * @classdesc Class to describe an sounding resource.\n */\nexport class Sounding extends Resource {\n  \n  /**\n   * @param {module:meteoJS/modelviewer/resource/sounding~options} [options]\n   *   Options.\n   */\n  constructor({ variables = [],\n    datetime = undefined,\n    run = undefined,\n    offset = undefined,\n    sounding = undefined } = {}) {\n    super({\n      variables,\n      datetime,\n      run,\n      offset\n    });\n    \n    /**\n     * @type undefined|module:meteoJS/sounding.Sounding\n     * @private\n     */\n    this._sounding = sounding;\n  }\n  \n  /**\n   * Sounding data.\n   * \n   * @type module:meteoJS/sounding.Sounding\n   */\n  get sounding() {\n    return (this._sounding === undefined) ? new SoundingData() : this._sounding;\n  }\n  set sounding(sounding) {\n    this._sounding = sounding;\n  }\n}\nexport default Sounding;","/**\n * @module meteoJS/modelviewer/resources\n */\nimport addEventFunctions from '../Events.js';\nimport Image from './resource/Image.js';\nimport VariableCollection from './VariableCollection.js';\nimport Node from './Node.js';\n\n/**\n * Triggered on adding and removing Resource-Objects.\n * \n * @event module:meteoJS/modelviewer/resources#change:resources\n * @type {Object}\n * @property {module:meteoJS/modelviewer/resource.Resource} [addedResources] -\n *   Added resources.\n * @property {module:meteoJS/modelviewer/resource.Resource} [removedResources] -\n *   Removed resources.\n */\n\n/**\n * Options for constructor.\n * \n * @typedef {Object} module:meteoJS/modelviewer/resources~options\n * @param {module:meteoJS/modelviewer/node.Node} topNode - Top level node.\n * @param {Set<module:meteoJS/modelviewer/variableCollection.VariableCollection>}\n *   timesVariableCollections - These collections group the top part of the\n *   hierarchy. For NWP, this contains  typically the model and the run\n *   collection.\n */\n\n/**\n * @classdesc Linchpin of the modelviewer. In this class every available\n *   resource is registered. Additionally requests about data per Variable can\n *   be performed, like all available run times of a model or all available\n *   fields of model, etc. The hierarchy via\n *   {@link module:meteoJS/modelviewer/node.Node|Node}\n *   has to be defined before the construction of Resources.\n * \n * @fires module:meteoJS/modelviewer/resources#change:resources\n */\nexport class Resources {\n  \n  constructor({ topNode,\n    timesVariableCollections = [] } = {}) {\n    \n    /**\n     * @type module:meteoJS/modelviewer/variableCollection.VariableCollection\n     * @private\n     */\n    this._topNode = topNode;\n    \n    /**\n     * @type Map<module:meteoJS/modelviewer/node.Node,\n     *           Set<module:meteoJS/modelviewer/variable.Variable>>\n     * @private\n     */\n    this._availableVariablesMap = new Map();\n    \n    /**\n     * @type Set<module:meteoJS/modelviewer/variableCollection.VariableCollection>\n     * @private\n     */\n    this._timesVariableCollections = timesVariableCollections;\n  }\n  \n  /**\n   * VariableCollectionNode that stand on the top of the hierarchy.\n   * \n   * @type module:meteoJS/modelviewer/variableCollection.VariableCollection\n   * @readonly\n   */\n  get topNode() {\n    return this._topNode;\n  }\n  \n  /**\n   * @type module:meteoJS/modelviewer/variableCollection.VariableCollection[]\n   * @readonly\n   */\n  get variableCollections() {\n    let pushChildCollections;\n    pushChildCollections = node => {\n      node.children.forEach(n => {\n        result.push(n.variableCollection);\n        pushChildCollections(n);\n      });\n    };\n    let result = [this.topNode.variableCollection];\n    pushChildCollections(this.topNode);\n    return result;\n  }\n  \n  /**\n   * Map of nodes and their variables (contained in the variableCollection of\n   * the node). For each variable exists at least one resource in this\n   * Resources-object that is defined by this variable.\n   * \n   * @type Map<module:meteoJS/modelviewer/node.Node,\n   *           Set<module:meteoJS/modelviewer/variable.Variable>>\n   * @readonly\n   */\n  get availableVariablesMap() {\n    return this._availableVariablesMap;\n  }\n  \n  /**\n   * Append resources.\n   * \n   * @param {...module:meteoJS/modelviewer/resource.Resource} resources\n   *   Available resources.\n   * @returns {module:meteoJS/modelviewer/resources.Resources} This.\n   * @fires module:meteoJS/modelviewer/resources#change:resources\n   */\n  append(...resources) {\n    let addedResources = [];\n    resources.forEach(resource => {\n      let topNode = this._getTopNodeOfResourceDefinition(resource, this.topNode);\n      if (topNode !== undefined) {\n        let node = this._getTopMostChildWithAllVariables(new Set(resource.variables), topNode, true);\n        if (node !== undefined) {\n          let addedCount = node.append(resource);\n          if (addedCount > 0) {\n            addedResources.push(resource);\n            this._addAvailableVariablesMapByResource(resource);\n          }\n        }\n      }\n    });\n    if (addedResources.length > 0) {\n      // Debounce firing\n      if (INTERNAL_CHANGE_RESOURCES.timeoutId)\n        clearTimeout(INTERNAL_CHANGE_RESOURCES.timeoutId);\n      INTERNAL_CHANGE_RESOURCES.addedResources.push(...addedResources);\n      INTERNAL_CHANGE_RESOURCES.timeoutId = setTimeout(() => {\n        this.trigger('change:resources', {\n          addedResources: INTERNAL_CHANGE_RESOURCES.addedResources\n        });\n        INTERNAL_CHANGE_RESOURCES.addedResources = [];\n      }, 100);\n    }\n    return this;\n  }\n  \n  /**\n   * Adds variables of a resource to _availableVariablesMap.\n   * \n   * @param {module:meteoJS/modelviewer/resource.Resource} resource - Resource.\n   * @private\n   */\n  _addAvailableVariablesMapByResource(resource) {\n    resource.variables.forEach(variable => {\n      if (variable.variableCollection.node === undefined)\n        return;\n      if (!this._availableVariablesMap.has(variable.variableCollection.node))\n        this._availableVariablesMap.set(variable.variableCollection.node, new Set());\n      this._availableVariablesMap.get(variable.variableCollection.node).add(variable);\n    });\n  }\n  \n  /**\n   * Removes resources.\n   * \n   * @param {...module:meteoJS/modelviewer/resource.Resource} resources\n   *   Resources.\n   * @returns {module:meteoJS/modelviewer/resources.Resources} This.\n   * @fires module:meteoJS/modelviewer/resources#change:resources\n   */\n  remove(...resources) {\n    let removedResources = [];\n    let removedNodeResourcesMap = new Map();\n    resources.forEach(resource => {\n      let topNode = this._getTopNodeOfResourceDefinition(resource, this.topNode);\n      if (topNode !== undefined) {\n        let node = this._getTopMostChildWithAllVariables(new Set(resource.variables), topNode, true);\n        if (node !== undefined) {\n          let removedCount = node.remove(resource);\n          if (removedCount > 0) {\n            removedResources.push(resource);\n            if (!removedNodeResourcesMap.has(node))\n              removedNodeResourcesMap.set(node, new Set());\n            removedNodeResourcesMap.get(node).add(resource);\n          }\n        }\n      }\n    });\n    if (removedNodeResourcesMap.size > 0)\n      this._removeAvailableVariablesMapByResources(removedNodeResourcesMap);\n    if (removedResources.length > 0)\n      this.trigger('change:resources', { removedResources });\n    return this;\n  }\n  \n  /**\n   * Removes variables from _availableVariablesMap.\n   * Prerequisite: The resources have already to be removed of the nodes.\n   * \n   * @param {Map<module:meteoJS/modelviewer/node.Node,\n   *         Set<module:meteoJS/modelviewer/resource.Resource>>}\n   *   removedNodeResourcesMap - Map of Nodes with their removed Resources.\n   * @private\n   */\n  _removeAvailableVariablesMapByResources(removedNodeResourcesMap) {\n    let fullCheckVariables = new Set();\n    for (let [node, resourcesSet] of removedNodeResourcesMap.entries()) {\n      let variables = new Set();\n      for (let resource of resourcesSet)\n        resource.variables.forEach(variable => variables.add(variable));\n      for (let variable of variables)\n        if (!node.hasResourcesByVariables(variable))\n          fullCheckVariables.add(variable);\n    }\n    for (let variable of fullCheckVariables) {\n      let node = this.getNodeByVariableCollection(variable.variableCollection);\n      if (!this._hasResourcesOfNodeChildren(node, [ variable ]))\n        if (this._availableVariablesMap.has(node))\n          this._availableVariablesMap.get(node).delete(variable);\n    }\n  }\n  \n  /**\n   * Returns a node of the hierarchy, so that all parents and itself contain\n   * all the passed variables. The returned node is the most top in hierarchy\n   * as possible. If no node is found, an empty node object is returned.\n   * \n   * @param {...module:meteoJS/modelviewer/variable.Variable} variables\n   *   Variables.\n   * @returns {module:meteoJS/modelviewer/node.Node} - Node.\n   */\n  getTopMostNodeWithAllVariables(...variables) {\n    let result =\n      this._getTopMostChildWithAllVariables(new Set(variables), this.topNode, true);\n    return (result === undefined) ? new Node(new VariableCollection()) : result;\n  }\n  \n  /**\n   * Returns first node in hierarchy that contains a VariableCollection which\n   * is part of the definition of the passed resource.\n   * \n   * @param {module:meteoJS/modelviewer/resource.Resource} resource\n   *   Resource.\n   * @param {module:meteoJS/modelviewer/node.Node} node\n   *   Search from 'node' and all the children.\n   * @returns {undefined|module:meteoJS/modelviewer/node.Node}\n   *   Node or undefined if no node is found.\n   * @private\n   */\n  _getTopNodeOfResourceDefinition(resource, node) {\n    if (resource.isDefinedByVariableOf(node.variableCollection))\n      return node;\n    let result = undefined;\n    node.children.forEach(childNode => {\n      if (result !== undefined)\n        result = this._getTopNodeOfResourceDefinition(resource, childNode);\n    });\n    return result;\n  }\n  \n  /**\n   * Returns top most node for which on the way down (beginning from node)\n   * all variables are contained by the VariableCollections of the travelled\n   * nodes.\n   * \n   * @param {Set<module:meteoJS/modelviewer/variable.Variable>} variables\n   *   Variables which have still to be found.\n   * @param {module:meteoJS/modelviewer/node.Node} node - Node.\n   * @param {boolean} bubbleDown - .\n   * @returns {undefined|module:meteoJS/modelviewer/node.Node} Child node.\n   */\n  _getTopMostChildWithAllVariables(variables, node, bubbleDown) {\n    let isVariableContained = false;\n    node.variableCollection.variables.forEach(variable => {\n      if (variables.has(variable)) {\n        isVariableContained = true;\n        variables.delete(variable);\n      }\n    });\n    if (variables.size == 0)\n      return node;\n    else if (node.children.length == 0)\n      return undefined;\n    else if (!isVariableContained &&\n             !bubbleDown)\n      return undefined;\n    let result = undefined;\n    node.children.forEach(childNode => {\n      if (result === undefined)\n        result = this._getTopMostChildWithAllVariables(variables, childNode, bubbleDown);\n    });\n    return result;\n  }\n  \n  /**\n   * Returns node which contains the passed variableCollection\n   * \n   * @param {module:meteoJS/modelviewer/variableCollection.VariableCollection}\n   *   variableCollection\n   *   VariableCollection.\n   * @returns {module:meteoJS/modelviewer/node.Node} Node.\n   */\n  getNodeByVariableCollection(variableCollection) {\n    return (variableCollection.node === undefined)\n      ? new Node(new VariableCollection())\n      : variableCollection.node;\n  }\n  \n  /**\n   * Returns node which contains the variableCollection with the passed Id.\n   * \n   * @param {mixed} id - Id.\n   * @returns {module:meteoJS/modelviewer/node.Node} Node.\n   */\n  getNodeByVariableCollectionId(id) {\n    let result = this._getNodeByVariableCollection(a => id == a.id);\n    return (result === undefined) ? new Node(new VariableCollection()) : result;\n  }\n  \n  /**\n   * Returns node which contains the passed variableCollection.\n   * \n   * @param {Function} compareFunc - Argument is a VariableCollection-object.\n   * @returns {undefined|module:meteoJS/modelviewer/node.Node} Node.\n   * @private\n   */\n  _getNodeByVariableCollection(compareFunc) {\n    return (compareFunc(this.topNode.variableCollection))\n      ? this.topNode\n      : this._findChildNodeByVariableCollection(compareFunc, this.topNode);\n  }\n  \n  /**\n   * Returns a VariableCollection with passed variableCollection of\n   * node's children.\n   * \n   * @param {Function} compareFunc - Argument is a VariableCollection-object.\n   * @param {module:meteoJS/modelviewer/node.Node} parentNode\n   *   Search recursively in this node's children.\n   * @returns {undefined|module:meteoJS/modelviewer/node.Node} Node.\n   * @private\n   */\n  _findChildNodeByVariableCollection(compareFunc, parentNode) {\n    let result;\n    parentNode.children.forEach(n => {\n      if (result === undefined &&\n          compareFunc(n.variableCollection)) {\n        result = n;\n        return;\n      }\n      if (result === undefined &&\n          n.children.length > 0)\n        result = this._findChildNodeByVariableCollection(compareFunc, n);\n    });\n    return result;\n  }\n  \n  /**\n   * Appends an Image-resource. Alias for append(new Image(…)).\n   * \n   * @see module:meteoJS/modelviewer/resource/image.Image\n   * @returns {module:meteoJS/modelviewer/resources.Resources} This.\n   */\n  appendImage({ variables, datetime, run, offset, url }) {\n    this.append(new Image({\n      variables,\n      datetime,\n      run,\n      offset,\n      url\n    }));\n    return this;\n  }\n  \n  /**\n   * Returns the {@link module:meteoJS/modelviewer/variable.Variable|Variable}-Objects\n   * from the {@link module:meteoJS/modelviewer/variableCollection.VariableCollection|collection}\n   *  with content. With this method\n   * you can deactive for example the other variables, so the user can't select\n   * a variable with no resource.\n   * \n   * This means the method returns a subset from the passed collection. For\n   * these Variable-Objects at least one resource is available (in the\n   * {@link meteoJS/modelviewer/variableCollection.VariableCollection#node|node}\n   * of the collection or one of its children). The resources are defined by\n   * on of these Variable-Objects. If you pass 'variables', you can\n   * additionally constrain the returned variables. E.g. you look for all\n   * run's with resources of a model, you pass the model's Variable-Object.\n   * \n   * @param {module:meteoJS/modelviewer/variableCollection.VariableCollection}\n   *   variableCollection\n   *   Return Variables of this VariableCollection.\n   * @param {Object} options - Options.\n   * @param {module:meteoJS/modelviewer/variable.Variable[]} [options.variables]\n   *   Only \n   * @returns {Set<module:meteoJS/modelviewer/variable.Variable>}\n   *   Available variables.\n   */\n  getAvailableVariables(variableCollection, { variables = [] } = {}) {\n    const result = new Set();\n    const _checkVariableInNode = (variable, node) => {\n      if (node.resources.length > 0) {\n        for (const resource of node.resources) {\n          if (resource.isDefinedBy(false, variable, ...variables)) {\n            result.add(variable);\n            return true;\n          }\n        }\n        return false;\n      }\n      for (const n of node.children) {\n        if (_checkVariableInNode(variable, n))\n          return true;\n      }\n      return false;\n    };\n    Array.from(variableCollection).forEach(variable => {\n      _checkVariableInNode(variable, variableCollection.node);\n    });\n    return result;\n  }\n  \n  /**\n   * Traverses all child nodes of the passed node and looks for a resource\n   * that is defined by all of the passed variables. If one child node contains\n   * such a resource, true is returned.\n   * \n   * @param {module:meteoJS/modelviewer/node.Node} node - Node.\n   * @param {module:meteoJS/modelviewer/variable.Variable[]} variables\n   *   Look for resources defined by these variables.\n   * @param {Set} [traversedNode] - Internal Set.\n   * @returns {Boolean} A resource is contained in the child nodes.\n   * @private\n   */\n  _hasResourcesOfNodeChildren(node, variables, traversedNode = new Set()) {\n    for (const n of node.children) {\n      if (traversedNode.has(n))\n        continue;\n      traversedNode.add(n);\n      if (n.hasResourcesByVariables(...variables))\n        return true;\n      if (this._hasResourcesOfNodeChildren(n, variables, traversedNode))\n        return true;\n    }\n  }\n  \n  /**\n   * Returns all times with at least one resource. The resources are defined\n   * by the passed variable. If exact=true, then the resources are exactly\n   * defined by the variables.\n   * With NWP models, you could get all times from a model-run with at least\n   * one resource when you pass the model and run variable object.\n   * If you want to know all available times for a set of variables (e.g. all\n   * available image-plots for the EU-region, from the temperature in a specific\n   * level), then pass exact=true and all the variables.\n   * \n   * @param {Object} [options] - Options.\n   * @param {module:meteoJS/modelviewer/variable.Variable[]} [options.variables]\n   *   Variables.\n   * @param {boolean} [options.exact=false] - When true, only resources which\n   *   are exactly defined by the passed variables are taken into account.\n   * @returns {Date[]} - Sorted upwardly.\n   */\n  getTimesByVariables({\n    variables = [],\n    exact = false\n  } = {}) {\n    const node = this._getTopMostChildWithAllVariables(\n      new Set(variables),\n      this.topNode,\n      true);\n    if (node === undefined)\n      return [];\n    \n    const times = new Set();\n    const collectTimes = node => {\n      node.getResourcesByVariables(exact, ...variables).forEach(resource => {\n        if (resource.datetime !== undefined)\n          times.add(resource.datetime.valueOf());\n      });\n      node.children.forEach(n => collectTimes(n));\n    };\n    collectTimes(node);\n    return [...times].sort().map(t => new Date(t));\n  }\n}\naddEventFunctions(Resources.prototype);\nexport default Resources;\n\n/**\n * @private\n */\nconst INTERNAL_CHANGE_RESOURCES = {\n  timeoutId: undefined,\n  addedResources: []\n};\n","/**\n * @module meteoJS/modelviewer/nwpResources\n */\nimport Resources from './Resources.js';\nimport VariableCollection from './VariableCollection.js';\nimport Node from './Node.js';\nimport Variable from './Variable.js';\nimport TimeVariable from './TimeVariable.js';\n\n/**\n * @classdesc For usage of NWP (numerical weather prediction). This class is\n *   designed to use the modelviewer for NWP.\n */\nexport class NWPResources extends Resources {\n  \n  constructor() {\n    let collections = new Set();\n    ['models', 'runs', 'regions', 'fields', 'levels', 'accumulations', 'thresholds']\n      .forEach(id => collections.add(new VariableCollection({ id })));\n    let nodes = {};\n    for (let collection of collections)\n      nodes[collection.id] = new Node(collection);\n    // build hierarchy\n    nodes.models.appendChild(nodes.runs);\n    nodes.runs.appendChild(nodes.regions);\n    nodes.regions.appendChild(nodes.fields);\n    nodes.fields.appendChild(nodes.levels, nodes.accumulations);\n    nodes.accumulations.appendChild(nodes.thresholds);\n    \n    super({\n      topNode: nodes.models,\n      timesVariableCollections: new Set([nodes.models.variableCollection, nodes.runs.variableCollection])\n    });\n  }\n  \n  /**\n   * Creates a Variable-Object and adds it to the VariableCollection.\n   * \n   * @param {module:meteoJS/modelviewer/variableCollection.VariableCollection}\n   *   variableCollection - VariableCollection.\n   * @param {Object} [options] - Variable options.\n   * @param {mixed} [options.id] - Variable id.\n   * @param {string} [options.name] - Default name.\n   * @param {Object.<string,string>} [options.names] - Names.\n   * @param {string[]} [options.langSortation] - Priority of language codes.\n   * @param {Date|undefined} [option.sdatetime] - Datetime.\n   * @returns {module:meteoJS/modelviewer/nwpResources.NWPResources} This.\n   */\n  addVariable(variableCollection,\n    { id,\n      name = undefined,\n      names = {},\n      langSortation = [],\n      datetime = undefined } = {}) {\n    let variable =\n      (datetime === undefined)\n        ? new Variable({\n          id,\n          name,\n          names,\n          langSortation\n        })\n        : new TimeVariable({\n          id,\n          name,\n          names,\n          langSortation,\n          datetime\n        });\n    variableCollection.append(variable);\n    return this;\n  }\n  \n  /**\n   * Collection of all defined models.\n   * \n   * @type module:meteoJS/modelviewer/variableCollection.VariableCollection\n   * @readonly\n   */\n  get models() {\n    return this.getNodeByVariableCollectionId('models').variableCollection;\n  }\n  \n  /**\n   * Collection of all defined runs.\n   * \n   * @type module:meteoJS/modelviewer/variableCollection.VariableCollection\n   * @readonly\n   */\n  get runs() {\n    return this.getNodeByVariableCollectionId('runs').variableCollection;\n  }\n  \n  /**\n   * Collection of all defined regions.\n   * \n   * @type module:meteoJS/modelviewer/variableCollection.VariableCollection\n   * @readonly\n   */\n  get regions() {\n    return this.getNodeByVariableCollectionId('regions').variableCollection;\n  }\n  \n  /**\n   * Collection of all defined fields.\n   * \n   * @type module:meteoJS/modelviewer/variableCollection.VariableCollection\n   * @readonly\n   */\n  get fields() {\n    return this.getNodeByVariableCollectionId('fields').variableCollection;\n  }\n  \n  /**\n   * Collection of all defined levels.\n   * \n   * @type module:meteoJS/modelviewer/variableCollection.VariableCollection\n   * @readonly\n   */\n  get levels() {\n    return this.getNodeByVariableCollectionId('levels').variableCollection;\n  }\n  \n  /**\n   * Collection of all defined accumulations.\n   * \n   * @type module:meteoJS/modelviewer/variableCollection.VariableCollection\n   * @readonly\n   */\n  get accumulations() {\n    return this.getNodeByVariableCollectionId('accumulations').variableCollection;\n  }\n  \n  /**\n   * Collection of all defined thresholds.\n   * \n   * @type module:meteoJS/modelviewer/variableCollection.VariableCollection\n   * @readonly\n   */\n  get thresholds() {\n    return this.getNodeByVariableCollectionId('thresholds').variableCollection;\n  }\n}\nexport default NWPResources;","/**\n * @module meteoJS/modelviewer/display\n */\nimport $ from 'jquery';\nimport addEventFunctions from '../Events.js';\n\n/**\n * Display initalisation event.\n * \n * @event module:meteoJS/modelviewer/display#init:display\n */\n\n/**\n * VariableCollection add event. Also fired, once the object is assigned to\n * a Container object.\n * \n * @event module:meteoJS/modelviewer/display#add:variableCollection\n * @type {Object}\n * @property {module:meteoJS/modelviewer/variableCollection.VariableCollection}\n *   variableCollection - The added variableCollection.\n */\n\n/**\n * Adding a variable to a variableCollection event. Also fired for each variable\n * in the available variableCollections, once the object is assigned to a\n * Container object.\n * \n * @event module:meteoJS/modelviewer/display#add:variable\n * @type {Object}\n * @property {module:meteoJS/modelviewer/variable.Variable} variable\n *   The added variable.\n */\n\n/**\n * Change visible resource event.\n * \n * @event module:meteoJS/modelviewer/display#change:visibleResource\n * @type {Object}\n */\n\n/**\n * Options for constructor.\n * \n * @typedef {Object}\n * @param\n *   {Iterable.<module:meteoJS/modelviewer/variableCollection.VariableCollection>}\n *   [alwaysAvailableCollections]\n *   Variables from these variableCollections are always available.\n */\n\n/**\n * @classdesc\n * \n * @fires module:meteoJS/modelviewer/display#init:display\n * @fires module:meteoJS/modelviewer/display#add:variableCollection\n * @fires module:meteoJS/modelviewer/display#add:variable\n * @fires module:meteoJS/modelviewer/display#change:visibleResource\n */\nexport class Display {\n  \n  /**\n   * @param {module:meteoJS/modelviewer/display~options} [options] - Options.\n   */\n  constructor({\n    alwaysAvailableCollections = []\n  } = {}) {\n    \n    /**\n     * @type Set<module:meteoJS/modelviewer/variableCollection.VariableCollection>\n     * @private\n     */\n    this._alwaysAvailableCollections = new Set(alwaysAvailableCollections);\n    \n    /**\n     * @type undefined|module:meteoJS/modelviewer.Modelviewer\n     * @private\n     */\n    this._modelviewer = undefined;\n    \n    /**\n     * @type undefined|module:meteoJS/modelviewer/container.Container\n     * @private\n     */\n    this._container = undefined;\n    \n    /**\n     * @type undefined|HTMLElement|jQuery\n     * @private\n     */\n    this._parentNode = undefined;\n    \n    /**\n     * @type undefined|HTMLElement|jQuery\n     * @private\n     */\n    this._resourceNode = undefined;\n    \n    this._resourceOutput = {\n      image: undefined,\n      thermodynamicDiagram: undefined\n    };\n  }\n  \n  /**\n   * @type undefined|module:meteoJS/modelviewer.Modelviewer\n   * @package\n   */\n  get modelviewer() {\n    return this._modelviewer;\n  }\n  set modelviewer(modelviewer) {\n    this._modelviewer = modelviewer;\n    if (this._modelviewer === undefined)\n      return;\n    \n    this._modelviewer.resources.variableCollections.forEach(collection => {\n      collection.on('add:variable', variable => {\n        this.trigger('add:variable', { variable });\n      });\n    });\n  }\n  \n  /**\n   * @type undefined|module:meteoJS/modelviewer/container.Container\n   * @package\n   */\n  get container() {\n    return this._container;\n  }\n  set container(container) {\n    this._container = container;\n    if (this._container === undefined)\n      return;\n    \n    this._container.on('change:visibleResource', () => {\n      this._onChangeVisibleResource();\n    });\n  }\n  \n  /**\n   * @type HTMLElement|jQuery\n   * @package\n   */\n  get parentNode() {\n    return this._parentNode;\n  }\n  set parentNode(parentNode) {\n    this._parentNode = parentNode;\n    this.onInit();\n  }\n  \n  /**\n   * @type undefined|HTMLElement|jQuery\n   * @package\n   */\n  get resourceNode() {\n    return this._resourceNode;\n  }\n  set resourceNode(resourceNode) {\n    this._resourceNode = resourceNode;\n    this._onChangeVisibleResource();\n  }\n  \n  /**\n   * Re-Render this display.\n   */\n  render() {\n    this.onInit();\n    this.onChangeVisibleResource();\n  }\n  \n  /**\n   * @private\n   */\n  onInit() {\n    if (this.parentNode === undefined)\n      return;\n    \n    $(this.parentNode).empty();\n    this.trigger('init:display');\n    if (this._modelviewer === undefined)\n      return;\n    \n    this._modelviewer.resources.variableCollections\n      .forEach(variableCollection => {\n        this.trigger('add:variableCollection', { variableCollection });\n        for (let variable of variableCollection)\n          this.trigger('add:variable', { variable });\n      });\n  }\n\n  /**\n   * Returns a subset of variables of the passed VariableCollection object. For\n   * all of the returned variables, there exists at least one resource. Theses\n   * resources are defined by this variable and the selected variables of the\n   * parent node.\n   * This method isn't enough performant to be executed in loops or recursive\n   * functions.\n   * \n   * @param {Object} options - Options.\n   * @param {module:meteoJS/modelviewer/variableCollection.VariableCollection}\n   *   options.variableCollection - VariableCollection object.\n   * @returns {Set<module:meteoJS/modelviewer/variable.Variable>}\n   *   Available variables.\n   * @public\n   */\n  getAvailableVariables({ variableCollection }) {\n    const variables = this._getParentsVariables(variableCollection.node);\n    return this._modelviewer.resources\n      .getAvailableVariables(variableCollection, { variables });\n  }\n  \n  /**\n   * @private\n   */\n  _getParentsVariables(node, traversedNodes = new Set()) {\n    let result = new Set();\n    node.parents.forEach(parentNode => {\n      if (traversedNodes.has(parentNode))\n        return;\n      traversedNodes.add(parentNode);\n      Array.from(parentNode.variableCollection).forEach(variable => {\n        if (this._container.selectedVariables.has(variable))\n          result.add(variable);\n      });\n      const parentResult = this._getParentsVariables(parentNode, traversedNodes);\n      if (parentResult.size > 0)\n        result = new Set([...result, ...parentResult]);\n    });\n    return result;\n  }\n  \n  /**\n   * @private\n   */\n  _onChangeVisibleResource() {\n    if (this._resourceNode === undefined) {\n      this.trigger('change:visibleResource');\n      return;\n    }\n    if (this._container === undefined)\n      return;\n    \n    let visibleResource = this._container.visibleResource;\n    if ('url' in visibleResource) {\n      if (this.thermodynamicDiagram !== undefined) {\n        this.thermodynamicDiagram = undefined;\n        $(this._resourceNode).empty();\n      }\n      if (this._resourceOutput.image === undefined) {\n        $(this._resourceNode).empty();\n        this._resourceOutput.image = $('<img>').css({ 'max-width': '100%' });\n        $(this._resourceNode).append(this._resourceOutput.image);\n      }\n      this._resourceOutput.image.attr('src', visibleResource.url);\n    }\n    else if ('sounding' in visibleResource) {\n      if (this._resourceOutput.image !== undefined) {\n        this._resourceOutput.image = undefined;\n        $(this._resourceNode).empty();\n      }\n      /*if (this._resourceOutput.thermodynamicDiagram === undefined)\n        this._resourceOutput.thermodynamicDiagram = new ThermodynamicDiagram({\n          renderTo: $(this._resourceNode)\n        });*/\n      let isAppended = false;\n      this._resourceOutput.thermodynamicDiagram.soundings.forEach(sounding => {\n        if (sounding.getSounding() === visibleResource.sounding) {\n          isAppended = true;\n          sounding.visible(true);\n        }\n        else\n          sounding.visible(false);\n      });\n      if (!isAppended)\n        this._resourceOutput.thermodynamicDiagram\n          .addSounding(visibleResource.sounding);\n    }\n    else {\n      if (this._resourceOutput.image !== undefined) {\n        this._resourceOutput.image = undefined;\n        $(this._resourceNode).empty();\n      }\n      if (this._resourceOutput.thermodynamicDiagram !== undefined)\n        this._resourceOutput.thermodynamicDiagram.soundings\n          .forEach(sounding => sounding.visible(false));\n    }\n  }\n}\naddEventFunctions(Display.prototype);\nexport default Display;","/**\n * @module meteoJS/modelviewer/container\n */\nimport Unique from '../base/Unique.js';\nimport addEventFunctions from '../Events.js';\nimport Resource from './Resource.js';\nimport Node from './Node.js';\nimport Display from './Display.js';\nimport Variable from './Variable.js';\nimport VariableCollection from './VariableCollection.js';\n\n/**\n * Triggered, when visible Resource changes.\n * \n * @event module:meteoJS/modelviewer/container#change:enabledResources\n * @type {Object}\n * @property {Object} options - Options.\n * @property {Map.<integer,module:meteoJS/modelviewer/resource.Resource>}\n *   [options.enabledResources] - Enabled resources, selected by selectedVariables.\n */\n\n/**\n * Triggered, when visible Resource changes.\n * \n * @event module:meteoJS/modelviewer/container#change:visibleResource\n */\n\n/**\n * Triggered, when displayVariables is changed.\n * \n * @event module:meteoJS/modelviewer/container#change:displayVariables\n * @type {Object}\n * @property {Object} options - Options.\n * @property {Set.<module:meteoJS/modelviewer/variable.Variable>}\n *   [options.addedVariables] - Added variables to displayVariables.\n * @property {Set.<module:meteoJS/modelviewer/variable.Variable>}\n *   [options.removedVariables] - Removed variables to displayVariables.\n */\n\n/**\n * Triggered, when selectedVariables is changed.\n * \n * @event module:meteoJS/modelviewer/container#change:selectedVariables\n * @type {Object}\n * @property {Object} options - Options.\n * @property {Set.<module:meteoJS/modelviewer/variable.Variable>}\n *   [options.addedVariables] - Added variables to selectedVariables.\n * @property {Set.<module:meteoJS/modelviewer/variable.Variable>}\n *   [options.removedVariables] - Removed variables to selectedVariables.\n */\n\n/**\n * If a suitable resource is searched, this method will be called several times.\n * The first argument ist a list of variables. These variables are collected of\n * one hierarchy level, defined by the\n * {@link module:meteoJS/modelviewer/resources.Resources|resources object}.\n * The method returns an ordered list of these passed variables (or a subset).\n * For these variables, further down in the hierarchy, a possible resource is\n * searched. If one is found, this variable will be used for selectedVariables.\n * Method is only used if adaptSuitableResource is enabled. Default algorythm is\n * to return the list in the order of the Iterator.\n * \n * @typedef {Function} module:meteoJS/modelviewer/container~getPossibleVariables\n * @param {module:meteoJS/modelviewer/variable.Variable[]}\n *   possibleSelectedVariables - Variables to return an ordered list.\n * @param {Set<module:meteoJS/modelviewer/variable.Variable>}\n *   selectedVariables - Already selected variables so far, top-down in\n *   hierarchy.\n * @returns {module:meteoJS/modelviewer/variable.Variable[]} - Ordered list.\n */\n\n/**\n * With the passed selectedVariables, the method determines if already a\n * suitable resource should be selected. If method returns true, the property\n * selectedVariables will be set by the passed Set.\n * Method used if adaptSuitableResource is enabled. Default algorythm is to\n * return true if the Node of the lastAddedVariable contains resources.\n * \n * @typedef {Function} module:meteoJS/modelviewer/container~isResourceSelected\n * @param {Set<module:meteoJS/modelviewer/variable.Variable>}\n *   selectedVariables - Selected variables so far.\n * @param {undefined|module:meteoJS/modelviewer/variable.Variable}\n *   lastAddedVariable - Last added variable to selectedVariables.\n * @returns {boolean} - True if a suitable resource should be selected with the\n *   current state of selectedVariables.\n */\n\n/**\n * Options to adapt a suitable resource to display.\n * \n * @typedef {Object}\n *   module:meteoJS/modelviewer/container~adaptSuitableResource\n * @param {boolean} enabled - Enabled adapt suitable resource.\n * @param {module:meteoJS/modelviewer/container~getPossibleVariables}\n *   getPossibleVariables - Determines order of variables of a hierarchy level.\n * @param {module:meteoJS/modelviewer/container~isResourceSelected}\n *   isResourceSelected - Is selectedVariables complete.\n */\n\n/**\n * Options for constructor.\n * \n * @typedef {module:meteoJS/base/unique~options}\n *   module:meteoJS/modelviewer/container~options\n * @param {module:meteoJS/modelviewer/display.Display} [display]\n *   Display object to output the container content to DOM.\n * @param {module:meteoJS/modelviewer/container~adaptSuitableResource}\n *   [adaptSuitableResource] - Options for adapt suitable resource.\n */\n\n/**\n * This object represents a container, that displays one resource.\n * Via displayVariables the appropriate resource is chosen.\n * \n * @extends module:meteoJS/base/unique.Unique\n * @fires module:meteoJS/modelviewer/container#change:visibleResource\n * @fires module:meteoJS/modelviewer/container#change:enabledResources\n * @fires module:meteoJS/modelviewer/container#change:displayVariables\n * @fires module:meteoJS/modelviewer/container#change:selectedVariables\n */\nexport class Container extends Unique {\n\n  /**\n   * @param {module:meteoJS/modelviewer/container~options} [options] - Options.\n   */\n  constructor({\n    id,\n    display = undefined,\n    adaptSuitableResource = {}\n  } = {}) {\n    super({\n      id\n    });\n    \n    /**\n     * @type undefined|module:meteoJS/modelviewer/display.Display\n     * @private\n     */\n    this._display = (display === undefined) ? new Display() : display;\n    this._display.modelviewer = this.modelviewer;\n    this._display.container = this;\n    this._display.parentNode = this._containerNode;\n    \n    /**\n     * @type module:meteoJS/modelviewer/container~adaptSuitableResource\n     * @private\n     */\n    this._adaptSuitableResource = {};\n    this._initAdaptSuitableResource(adaptSuitableResource);\n    \n    /**\n     * @type undefined|module:meteoJS/modelviewer.Modelviewer\n     * @private\n     */\n    this._modelviewer = undefined;\n    \n    /**\n     * @type undefined|module:meteoJS/modelviewer/resource.Resource\n     * @private\n     */\n    this._visibleResource;\n    \n    /**\n     * @type Set<module:meteoJS/modelviewer/variable.Variable>\n     * @private\n     */\n    this._displayVariables = new Set();\n    \n    /**\n     * @type Map.<module:meteoJS/modelviewer/variableCollection.VariableCollection,module:meteoJS/modelviewer/variable.Variable>\n     * @private\n     */\n    this._selectedVariables = new Map();\n    \n    /**\n     * @type module:meteoJS/modelviewer/node.Node|undefined\n     * @private\n     */\n    this._selectedNode = undefined;\n    \n    /**\n     * @type Map<integer,module:meteoJS/modelviewer/resource.Resource>\n     * @private\n     */\n    this._enabledResources = new Map();\n    \n    /**\n     * @type undefined|external:HTMLElement\n     * @private\n     */\n    this._containerNode = undefined;\n\n    /**\n     * Function to call change:selectedVariables debouncec.\n     * \n     * @type Function\n     * @private\n     */\n    this._debouncedChangeSelectedVariables = (() => {\n      let timeoutId;\n      let totalAddedVariables = new Set();\n      let totalRemovedVariables = new Set();\n      return ({ addedVariables, removedVariables }) => {\n        for (const v of addedVariables)\n          if (totalRemovedVariables.has(v))\n            totalRemovedVariables.delete(v);\n        for (const v of removedVariables)\n          if (totalAddedVariables.has(v))\n            totalAddedVariables.delete(v);\n        totalAddedVariables = new Set([...totalAddedVariables, ...addedVariables]);\n        totalRemovedVariables = new Set([...totalRemovedVariables, ...removedVariables]);\n        /*console.log([\n          [...addedVariables].map(v => v.id),\n          [...removedVariables].map(v => v.id),\n          [...totalAddedVariables].map(v => v.id),\n          [...totalRemovedVariables].map(v => v.id),\n        ]);*/\n        clearTimeout(timeoutId);\n        timeoutId = setTimeout(() => {\n          this.trigger('change:selectedVariables', {\n            addedVariables: totalAddedVariables,\n            removedVariables: totalRemovedVariables\n          });\n          totalAddedVariables.clear();\n          totalRemovedVariables.clear();\n        }, 300);\n      };\n    })();\n    \n    /**\n     * @type Object<string,Object<string,mixed>>\n     * @private\n     */\n    this._listeners = {\n      mirror: [],\n      timeline: {\n        timeline: undefined,\n        listenerKey: undefined\n      },\n      resources: {\n        resources: undefined,\n        listenerKey: undefined\n      }\n    };\n  }\n  \n  /**\n   * Display object to generate dom output.\n   * \n   * @type undefined|module:meteoJS/modelviewer/display.Display\n   * @readonly\n   */\n  get display() {\n    return this._display;\n  }\n  \n  /**\n   * This container belongs to this modelviewer object.\n   * \n   * @type undefined|module:meteoJS/modelviewer.Modelviewer\n   * @package\n   */\n  get modelviewer() {\n    return this._modelviewer;\n  }\n  set modelviewer(modelviewer) {\n    this._modelviewer = modelviewer;\n    if (this._modelviewer === undefined) {\n      if (this._listeners.timeline.listenerKey !== undefined)\n        this._listeners.timeline.timeline\n          .un('change:time', this._listeners.timeline.listenerKey);\n      if (this._listeners.resources.listenerKey !== undefined)\n        this._listeners.resources.resources\n          .un('change:resources', this._listeners.resources.listenerKey);\n      return;\n    }\n    this._display.modelviewer = modelviewer;\n    \n    this._listeners.timeline.timeline = this._modelviewer.timeline;\n    this._listeners.timeline.listenerKey = this._modelviewer.timeline\n      .on('change:time', () => this._setVisibleResource());\n    this._listeners.resources.resources = this._modelviewer.resources;\n    this._listeners.resources.listenerKey = this._modelviewer.resources\n      .on('change:resources', () => {\n        this._setTimes();\n        this._setEnabledResources();\n        this._updateSelectedVariables();\n      });\n    this._setTimes();\n  }\n  \n  /**\n   * DOM node to append container's output.\n   * \n   * @type undefined|external:HTMLElement\n   * @package\n   */\n  get containerNode() {\n    return this._containerNode;\n  }\n  set containerNode(containerNode) {\n    this._containerNode = containerNode;\n    if (this._containerNode === undefined)\n      return;\n    this._display.parentNode = this._containerNode;\n  }\n  \n  /**\n   * Currently visible resource. Could be an empty resource.\n   * \n   * @type module:meteoJS/modelviewer/resource.Resource\n   * @readonly\n   */\n  get visibleResource() {\n    return (this._visibleResource === undefined) ?\n      new Resource() : this._visibleResource;\n  }\n  \n  /**\n   * These variables define, which resource is displayed.\n   * If adaptSuitableResource is not enabled, then the displayed resource is\n   * exactly defined by these variables (and additionally the datetime selected\n   * by the timeline object). If adaptSuitableResource is enabled, then a\n   * resource is displayed, that matches the variables but can be defined by\n   * additional variables.\n   * Setter allows Set or Array. Getter returns always Set.\n   * \n   * @type Set<module:meteoJS/modelviewer/variable.Variable>\n   */\n  get displayVariables() {\n    return this._displayVariables;\n  }\n  set displayVariables(variables) {\n    let addedVariables = new Set();\n    variables = new Set(variables);\n    for (let variable of variables)\n      if (!this._displayVariables.has(variable))\n        addedVariables.add(variable);\n    let removedVariables = new Set();\n    for (let displayVariable of this.displayVariables)\n      if (!variables.has(displayVariable))\n        removedVariables.add(displayVariable);\n    if (\n      addedVariables.size > 0 ||\n      removedVariables.size > 0\n    ) {\n      this._displayVariables = variables;\n      this._updateSelectedVariables({\n        addedVariables,\n        removedVariables\n      });\n      this.trigger(\n        'change:displayVariables',\n        { addedVariables, removedVariables }\n      );\n    }\n  }\n  \n  /**\n   * These variables define excactly, which resource will be displayed. These\n   * variables are retrieved from the available resources and displayVariables.\n   * Together with the selected time in the timeline, the resource to display\n   * is uniquely defined.\n   * If adaptSuitableResource is not enabled, selectedVariables is equal to\n   * displayVariables.\n   * \n   * @type Set<module:meteoJS/modelviewer/variable.Variable>\n   * @readonly\n   */\n  get selectedVariables() {\n    return new Set([...this._selectedVariables.values()]);\n  }\n\n  /**\n   * Returns the selected Variable of a VariableCollection. If no selected\n   * variable exists, an empty Variable-Object will be returned.\n   * \n   * @param {module:meteoJS/modelviewer/variableCollection.VariableCollection}\n   *   variableCollection - VariableCollection.\n   * @returns {module:meteoJS/modelviewer/variable.Variable}\n   *   The selected Variable of the colleciton.\n   */\n  getSelectedVariable(variableCollection) {\n    const result = this._selectedVariables.get(variableCollection);\n    return (result === undefined) ? new Variable({ id: undefined }) : result;\n  }\n  \n  /**\n   * Returns an array of times (for the timeline). For all of these times, there\n   * exists resources which match with the current displayVariables.\n   * \n   * @type Date[]\n   * @readonly\n   */\n  get enabledTimes() {\n    return [...this._enabledResources.keys()]\n      .filter(datetime => !isNaN(datetime))\n      .map(datetime => new Date(datetime));\n  }\n  \n  /**\n   * Exchanges variables in displayVariables. The variable with the same\n   * Collection will be exchanged. If none is found, the variable will be added.\n   * \n   * @param {Set<module:meteoJS/modelviewer/variable.Variable>} variables\n   *   Add these variables to the set of displayVariables.\n   * @returns {module:meteoJS/modelviewer/container.Container} - This.\n   * @fires module:meteoJS/modelviewer/container#change:displayVariables\n   */\n  exchangeDisplayVariable(variables) {\n    let displayVariables = new Set(this.displayVariables);\n    for (let variable of variables)\n      for (let displayVariable of this.displayVariables)\n        if (displayVariable.variableCollection ===\n            variable.variableCollection) {\n          displayVariables.delete(displayVariable);\n          displayVariables.add(variable);\n        }\n    for (let variable of variables)\n      if (!displayVariables.has(variable))\n        displayVariables.add(variable);\n    this.displayVariables = displayVariables;\n    return this;\n  }\n  \n  /**\n   * Mirrors (parts of) the displayVariables form another container. With this\n   * feature, e.g. in different containers can be viewed plots of different\n   * models. If you change e.g. the field in the first container, all other\n   * containers, that mirrors form this container, will also change the viewed\n   * content. It is possible to mirror different VariableCollections from\n   * different containers.\n   * \n   * @param {module:meteoJS/modelviewer/container.Container} [container]\n   *   Mirrors from this container.\n   * @param {module:meteoJS/modelviewer/variableCollection.VariableCollection[]}\n   *   [variableCollections] - The displayVariables of these VariableCollections\n   *   are mirrored. If omitted, all VariableCollections are mirrored.\n   */\n  mirrorsFrom(container = undefined, variableCollections = undefined) {\n    this._listeners.mirror =\n      this._listeners.mirror.filter(mirrorConfig => {\n        if (mirrorConfig.container === container\n          || container === undefined) {\n          mirrorConfig.container\n            .un('change:displayVariables', mirrorConfig.listenerKey);\n          return false;\n        }\n        return true;\n      });\n    if (container === undefined)\n      return;\n    if (variableCollections !== undefined\n      && variableCollections.length < 1)\n      return;\n    if (variableCollections === undefined)\n      variableCollections = this.modelviewer.resources.variableCollections;\n    const onChangeDisplayVariables = () => {\n      const newDisplayVariables = new Set();\n      for (const variable of container.displayVariables)\n        variableCollections.forEach(collection => {\n          if (variable.variableCollection === collection)\n            newDisplayVariables.add(variable);\n        });\n      this.exchangeDisplayVariable(newDisplayVariables);\n    };\n    const listenerKey = container\n      .on('change:displayVariables', onChangeDisplayVariables);\n    const mirrorConfig = {\n      container,\n      listenerKey,\n      variableCollections\n    };\n    this._listeners.mirror.forEach(mC => {\n      const newVariableCollection = [];\n      mC.variableCollections.forEach(collection => {\n        let isContained = false;\n        variableCollections.forEach(variableCollection => {\n          if (variableCollection === collection)\n            isContained = true;\n        });\n        if (!isContained)\n          newVariableCollection.push(collection);\n      });\n      if (newVariableCollection.length < mC.variableCollections.length)\n        this.mirrorsFrom(mC.container, newVariableCollection);\n    });\n    this._listeners.mirror.push(mirrorConfig);\n    onChangeDisplayVariables();\n  }\n\n  /**\n   * Get all containers, from which this container mirrors some variables from.\n   * As values of the returned Map-Object an array with the mirrored\n   * VariableColletions is returned.\n   * \n   * @returns {Map.<module:meteoJS/modelviewer/container.Container,module:meteoJS/modelviewer/variableCollection.VariableCollection[]>}\n   */\n  getMirrorsFrom() {\n    const result = new Map();\n    this._listeners.mirror.forEach(mirrorConfig => {\n      result.set(mirrorConfig.container, mirrorConfig.variableCollections);\n    });\n    return result;\n  }\n  \n  /**\n   * Sets all available times in the timeline object for this container.\n   * \n   * @private\n   */\n  _setTimes() {\n    let [selectedVariables] =\n      this._getSelectedVariablesWithResources(\n        [this.modelviewer.resources.topNode],\n        new Set(),\n        undefined,\n        selectedVariables => {\n          let result = true;\n          this.modelviewer.resources._timesVariableCollections.forEach(collection => {\n            let contained = false;\n            for (let selectedVariable of selectedVariables) {\n              if (collection.contains(selectedVariable))\n                contained = true;\n            }\n            if (!contained)\n              result = false;\n          });\n          return result;\n        }\n      );\n    \n    if (selectedVariables === undefined)\n      selectedVariables = new Set();\n    \n    const availableTimes = (selectedVariables.size == 0)\n      ? []\n      : this.modelviewer.resources\n        .getTimesByVariables({ variables: selectedVariables });\n    this.modelviewer.timeline.setTimesBySetID(this.id, availableTimes);\n  }\n  \n  /**\n   * Updates the selected variables, according to displayVariables.\n   * \n   * @private\n   */\n  _updateSelectedVariables({\n    addedVariables = undefined,\n    removedVariables = undefined\n  } = {}) {\n    if (!this._adaptSuitableResource.enabled) {\n      let selectedNode = undefined;\n      const findFirstNodeWithVariable = node => {\n        if (node.hasResourcesByVariables(true, ...this.displayVariables))\n          selectedNode = node;\n        else\n          for (const childNode of node.children)\n            findFirstNodeWithVariable(childNode);\n      };\n      findFirstNodeWithVariable(this.modelviewer.resources.topNode);\n      this._setSelectedVariables(this.displayVariables, selectedNode);\n      return;\n    }\n\n    let nodes = [];\n    const sV = new Set();\n    let lSV = undefined;\n    if (addedVariables === undefined || removedVariables === undefined)\n      nodes.push(this.modelviewer.resources.topNode);\n    else {\n      const findFirstNodeWithVariable = node => {\n        let isFound = false;\n        for (const variable of [...addedVariables, ...removedVariables]) {\n          if (variable.variableCollection !== undefined\n            && variable.variableCollection.node === node) {\n            nodes.push(node);\n            isFound = true;\n            break;\n          }\n        }\n        if (!isFound) {\n          const tempSV = this.getSelectedVariable(node.variableCollection);\n          if (tempSV.id !== undefined) {\n            lSV = tempSV;\n            sV.add(lSV);\n            for (const childNode of node.children)\n              findFirstNodeWithVariable(childNode);\n          }\n        }\n      };\n      findFirstNodeWithVariable(this.modelviewer.resources.topNode);\n      nodes = nodes.filter((n,i,a) => i===a.indexOf(n));\n      if (nodes.length < 1)\n        nodes.push(this.modelviewer.resources.topNode);\n    }\n    let [selectedVariables, lastSelectedVariable] =\n      this._getSelectedVariablesWithResources(\n        nodes,\n        sV,\n        lSV\n      );\n    \n    let node;\n    if (selectedVariables === undefined) {\n      selectedVariables = sV;\n      node = (lSV !== undefined)\n        ? lSV.variableCollection.node\n        : new Node({ variableCollection: new VariableCollection() });\n    }\n    else\n      node = lastSelectedVariable.variableCollection.node;\n    this._setSelectedVariables(selectedVariables, node);\n  }\n  \n  /**\n   * @typedef result_getSelectedVariablesWithResources\n   * @type {Array}\n   * @property {undefined|Set<module:meteoJS/modelviewer/variable.Variable>} 0\n   * @property {undefined|module:meteoJS/modelviewer/variable.Variable} 1\n   */\n  \n  /**\n   * \n   * \n   * @param {Set<module:meteoJS/modelviewer/node.Node>} nodes - Nodes to check.\n   * @param {Set<module:meteoJS/modelviewer/variable.Variable>}\n   *   selectedVariables - Selected Variables from top until this node.\n   * @returns {result_getSelectedVariablesWithResources}\n   *   Array with first element the SelectedVariables, second element the last\n   *   selectedVariable (node most down in the tree).\n   * @private\n   */\n  _getSelectedVariablesWithResources(\n    nodes,\n    selectedVariables,\n    lastSelectedVariable,\n    isResourceSelected = this._adaptSuitableResource.isResourceSelected\n  ) {\n    if (isResourceSelected.call(this, selectedVariables, lastSelectedVariable))\n      return [selectedVariables, lastSelectedVariable];\n    \n    let result = [undefined, undefined];\n    const checkPossibleVariable = possibleSelectedVariable => {\n      let tempSelectedVariables = new Set(selectedVariables);\n      tempSelectedVariables.add(possibleSelectedVariable);\n      let [resultSelectedVariables, resultLastSelectedVariable] =\n        this\n          ._getSelectedVariablesWithResources(\n            possibleSelectedVariable.variableCollection.node.children,\n            tempSelectedVariables,\n            possibleSelectedVariable,\n            isResourceSelected\n          );\n      if (resultSelectedVariables !== undefined) {\n        result[0] = resultSelectedVariables;\n        result[1] = resultLastSelectedVariable;\n        return;\n      }\n      \n      let isOnlyTimesVariables = true;\n      for (let selectedVariable of tempSelectedVariables) {\n        let contained = false;\n        this.modelviewer.resources._timesVariableCollections.forEach(collection => {\n          if (collection.contains(selectedVariable))\n            contained = true;\n        });\n        if (!contained)\n          isOnlyTimesVariables = false;\n      }\n      if (isOnlyTimesVariables &&\n          tempSelectedVariables.size == this.modelviewer.resources._timesVariableCollections.size) {\n        result[0] = tempSelectedVariables;\n        result[1] = possibleSelectedVariable;\n      }\n    };\n\n    let availableSelectedVariables = [];\n    for (let childNode of nodes) {\n      if (this.modelviewer.resources.availableVariablesMap.has(childNode) &&\n          this.modelviewer.resources.availableVariablesMap.get(childNode).size)\n        for (const variable of childNode.variableCollection) {\n          if (!this.modelviewer.resources\n            .availableVariablesMap.get(childNode).has(variable))\n            continue;\n          if (this.displayVariables.has(variable))\n            checkPossibleVariable(variable);\n          else if (this._adaptSuitableResource.enabled)\n            availableSelectedVariables.push(variable);\n          if (result[0] !== undefined)\n            break;\n        }\n      if (result[0] !== undefined)\n        break;\n    }\n    if (result[0] !== undefined)\n      return result;\n    \n    const possibleSelectedVariables = this._adaptSuitableResource\n      .getPossibleVariables\n      .call(this, availableSelectedVariables, selectedVariables);\n    for (const variable of possibleSelectedVariables) {\n      checkPossibleVariable(variable);\n      if (result[0] !== undefined)\n        break;\n    }\n    \n    return result;\n  }\n  \n  /**\n   * @param {Set<module:meteoJS/modelviewer/variable.Variable>}\n   *   selectedVariables - New selectedVariables.\n   * @param {module:meteoJS/modelviewer/node.Node} selectedNode\n   *   Selectes resources from this Node.\n   * @private\n   */\n  _setSelectedVariables(selectedVariables, selectedNode) {\n    let addedVariables = new Set();\n    selectedVariables = new Set(selectedVariables);\n    for (let variable of selectedVariables)\n      if (!this.selectedVariables.has(variable))\n        addedVariables.add(variable);\n    let removedVariables = new Set();\n    for (let selectedVariable of this.selectedVariables)\n      if (!selectedVariables.has(selectedVariable))\n        removedVariables.add(selectedVariable);\n    if (\n      addedVariables.size > 0 ||\n      removedVariables.size > 0 ||\n      this._selectedNode !== selectedNode\n    ) {\n      this._selectedVariables.clear();\n      for (const variable of selectedVariables)\n        this._selectedVariables.set(variable.variableCollection, variable);\n      this._selectedNode = selectedNode;\n      this._setTimes();\n      this._setEnabledResources();\n      this._debouncedChangeSelectedVariables({\n        addedVariables,\n        removedVariables\n      });\n    }\n  }\n  \n  /**\n   * Sets internally _enabledResources. These resources are selected by\n   * selectedVariable. The visibleResource is determined from this resources.\n   * \n   * @private\n   */\n  _setEnabledResources() {\n    this._enabledResources.clear();\n    if (this._selectedNode === undefined)\n      return;\n    if (this.selectedVariables.size != 0)\n      this._selectedNode\n        .getResourcesByVariables(true, ...this.selectedVariables)\n        .filter(r => r.datetime && !isNaN(r.datetime.valueOf()))\n        .forEach(r => this._enabledResources.set(r.datetime.valueOf(), r));\n    this.modelviewer.timeline\n      .setEnabledTimesBySetID(this.id, this.enabledTimes);\n    this.trigger('change:enabledResources', this._enabledResources);\n    this._setVisibleResource();\n  }\n  \n  /**\n   * Sets visible resource.\n   * \n   * @private\n   */\n  _setVisibleResource() {\n    let oldVisibleResource = this._visibleResource;\n    let datetime = this.modelviewer.timeline.getSelectedTime().valueOf();\n    if (this._enabledResources.has(datetime))\n      this._visibleResource = this._enabledResources.get(datetime);\n    else\n      this._visibleResource = undefined;\n    if (this._visibleResource !== oldVisibleResource)\n      this.trigger('change:visibleResource');\n  }\n  \n  /**\n   * Inits private property _adaptSuitableResource.\n   * \n   * @param {module:meteoJS/modelviewer/container~adaptSuitableResource}\n   *   [adaptSuitableResource] - Adapt suitable resource.\n   * @private\n   */\n  _initAdaptSuitableResource({ enabled = true,\n    getPossibleVariables = undefined,\n    isResourceSelected = undefined,\n    //excludeVariableCollectionFromSimiliarDisplay = []\n  } = {}) {\n    this._adaptSuitableResource = {\n      enabled,\n      getPossibleVariables,\n      isResourceSelected\n    };\n    \n    if (this._adaptSuitableResource.getPossibleVariables === undefined)\n      this._adaptSuitableResource.getPossibleVariables =\n        availableSV => availableSV;\n    if (this._adaptSuitableResource.isResourceSelected === undefined)\n      this._adaptSuitableResource.isResourceSelected =\n      (selectedVariables, lastAddedVariable) => {\n        if (lastAddedVariable === undefined)\n          return false;\n        let resources = lastAddedVariable.variableCollection\n          .node.getResourcesByVariables(true, ...selectedVariables);\n        return resources.length > 0;\n      };\n  }\n}\naddEventFunctions(Container.prototype);\nexport default Container;","const __WEBPACK_NAMESPACE_OBJECT__ = SVG;","/**\n * @module meteoJS/thermodynamicDiagram/functions\n */\nimport { windspeedMSToKN } from '../calc.js';\n\n/**\n * Definition of a line style. Some properties misses.\n * \n * @typedef {Object} module:meteoJS/thermodynamicDiagram~lineStyleOptions\n * @property {string} [color='black'] - Color.\n * @property {number} [width=1] - Width.\n * @property {undefined|number} [opacity=undefined] - Opacity.\n * @property {'butt'|'round'|'square'} [linecap=undefined] - Linecap.\n * @property {'arcs'|'bevel'|'miter'|'miter-clip'|'round'} [linejoin=undefined]\n *   Linejoin.\n * @property {string} [dasharray=undefined] - Dasharray.\n * @property {number|string} [dashoffset=undefined] - Dashoffset.\n */\n\n/**\n * Returns normalized lineStyle-Options.\n * \n * @param {module:meteoJS/thermodynamicDiagram~lineStyleOptions}\n *   [options] - Options.\n * @param {module:meteoJS/thermodynamicDiagram~lineStyleOptions}\n *   [defaults] - Optional defaults.\n * @returns {module:meteoJS/thermodynamicDiagram~lineStyleOptions}\n *   Normalized options.\n * @private\n */\nexport function getNormalizedLineStyleOptions({\n  color = undefined,\n  width = undefined,\n  ...result\n} = {}, defaults = {}) {\n  result.color = getFirstDefinedValue(color, defaults.color, 'black');\n  result.width = getFirstDefinedValue(width, defaults.width, 1);\n  Object.keys(defaults).forEach(key => {\n    if (key != 'color' && key != 'width' && result[key] === undefined)\n      result[key] = defaults[key];\n  });\n  return result;\n}\n\n/**\n * Definition of font options. Some properties misses.\n * \n * @typedef {Object} module:meteoJS/thermodynamicDiagram~fontOptions\n * @param {mixed} [size=12] - Size.\n * @param {mixed} [color='black'] - Color.\n * @param {'start'|'middle'|'end'} [anchor=undefined] - Anchor.\n */\n\n/**\n * Returns normalized font-Options.\n * \n * @param {module:meteoJS/thermodynamicDiagram~fontOptions}\n *   [options] - Options.\n * @param {module:meteoJS/thermodynamicDiagram~fontOptions}\n *   [defaults] - Optional defaults.\n * @returns {module:meteoJS/thermodynamicDiagram~fontOptions}\n *   Normalized options.\n * @private\n */\nexport function getNormalizedFontOptions({\n  size = undefined,\n  color = undefined,\n  anchor = undefined,\n  ...result\n} = {}, defaults = {}) {\n  result.size = getFirstDefinedValue(size, defaults.size, 12);\n  result.color = getFirstDefinedValue(color, defaults.color, 'black');\n  anchor = getFirstDefinedValue(anchor, defaults.anchor);\n  if (anchor !== undefined)\n    result.anchor = anchor;\n  Object.keys(defaults).forEach(key => {\n    if (key != 'color' && key != 'size' && key != 'anchor'\n      && result[key] === undefined)\n      result[key] = defaults[key];\n  });\n  return result;\n}\n\n/**\n * A line with its visibility and style.\n * \n * @typedef {Object} module:meteoJS/thermodynamicDiagram~lineOptions\n * @param {boolean} [visible=true] - Visibility of the line.\n * @param {module:meteoJS/thermodynamicDiagram~lineStyleOptions}\n *   [style] - Line style.\n */\n\n/**\n * Returns normalized line options with visibility and line style.\n * \n * @param {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   [options] - Options.\n * @param {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   [defaults] - Optional defaults.\n * @returns {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   Normalized options.\n * @internal\n */\nexport function getNormalizedLineOptions({\n  visible = undefined,\n  style = {},\n  ...result\n} = {}, defaults = {}) {\n  result.visible = getFirstDefinedValue(visible, defaults.visible, true);\n  result.style = getNormalizedLineStyleOptions(style, defaults.style);\n  Object.keys(defaults).forEach(key => {\n    if (key != 'visible' && key != 'style' && result[key] === undefined)\n      result[key] = defaults[key];\n  });\n  return result;\n}\n\n/**\n * A text with its visibility, style and font style.\n * \n * @typedef {Object} module:meteoJS/thermodynamicDiagram~textOptions\n * @param {boolean} [visible=true] - Visibility of the line.\n * @param {module:meteoJS/thermodynamicDiagram~fontOptions}\n *   [font] - Font defintions.\n */\n\n/**\n * Returns normalized text options with visibility and line style.\n * \n * @param {module:meteoJS/thermodynamicDiagram~textOptions}\n *   [options] - Options.\n * @param {module:meteoJS/thermodynamicDiagram~textOptions}\n *   [defaults] - Optional defaults.\n * @returns {module:meteoJS/thermodynamicDiagram~textOptions}\n *   Normalized options.\n * @internal\n */\nexport function getNormalizedTextOptions({\n  visible = true,\n  font = {},\n  ...result\n} = {}, defaults = {}) {\n  result.visible = getFirstDefinedValue(visible, defaults.visible, true);\n  result.font = getNormalizedFontOptions(font, defaults.font);\n  Object.keys(defaults).forEach(key => {\n    if (key != 'visible' && key != 'font'\n      && result[key] === undefined)\n      result[key] = defaults[key];\n  });\n  return result;\n}\n\n/**\n * An object with its visibility, style and font style.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   module:meteoJS/thermodynamicDiagram~lineTextOptions\n * @property {module:meteoJS/thermodynamicDiagram~fontOptions}\n *   [font] - Font defintions.\n */\n\n/**\n * Returns normalized text options with visibility, line and font style.\n * \n * @param {module:meteoJS/thermodynamicDiagram~lineTextOptions}\n *   [options] - Options.\n * @param {module:meteoJS/thermodynamicDiagram~lineTextOptions}\n *   [defaults] - Optional defaults.\n * @returns {module:meteoJS/thermodynamicDiagram~lineTextOptions}\n *   Normalized options.\n * @internal\n */\nexport function getNormalizedLineTextOptions({\n  visible = true,\n  style = {},\n  font = {}\n} = {}, defaults = {}) {\n  return {\n    visible: getFirstDefinedValue(visible, defaults.visible, true),\n    style: getNormalizedLineStyleOptions(style, defaults.style),\n    font: getNormalizedFontOptions(font, defaults.font)\n  };\n}\n\n/**\n * Updates current options with some new options.\n * \n * @param {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   [options] - Current options.\n * @param {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   [updateOptions] - Some new options.\n * @returns {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   New options object.\n * @private\n */\nexport function updateLineOptions(options = {}, updateOptions = {}) {\n  if ('visible' in updateOptions)\n    options.visible = updateOptions.visible;\n  if ('style' in updateOptions) {\n    ['color', 'width', 'opacity',  'linecap',  'linejoin',  'dasharray']\n      .forEach(styleKey => {\n        if (styleKey in updateOptions.style)\n          options.style[styleKey] = updateOptions.style[styleKey];\n      });\n  }\n  return options;\n}\n\n/**\n * Returns the first defined argument.\n * \n * @param {mixed|undefined} [...params] - Some values.\n * @returns {mixed|undefined} - First defined value, if available.\n */\nexport function getFirstDefinedValue(...params) {\n  return params\n    .reduce((acc, cur) => { return (acc !== undefined) ? acc : cur; });\n}\n\n/**\n * Draws text in a SVG node.\n * \n * @param {Object} options - Options.\n * @param {external:SVG} options.node - SVG node.\n * @param {string} options.text - Text.\n * @param {number} options.x - X coordinate.\n * @param {number} options.y - Base Y coordinate.\n * @param {number} [options.horizontalMargin=0] - Padding in x direction.\n * @param {number} [options.verticalMargin=0] - Padding in y direction.\n * @param {module:meteoJS/thermodynamicDiagram~fontOptions} [options.font] - Font style.\n * @prarm {string|Object|undefined} [options.fill]\n *   Fill for background. If undefined, no background is drawn.\n * @returns {external:SVG} - SVG group containing the inserted elements.\n */\nexport function drawTextInto({\n  node,\n  text,\n  x,\n  y,\n  horizontalMargin = 0,\n  verticalMargin = 0,\n  font = {},\n  fill = undefined\n}) {\n  const group = node.group();\n  let background = undefined;\n  if (fill !== undefined) {\n    if (!('color' in fill))\n      fill.color = 'white';\n    background = group.rect().fill(fill);\n  }\n  const f = {...font};\n  let fontColor = undefined;\n  if ('color' in f) {\n    fontColor = f.color;\n    delete f.color;\n  }\n  const textNode = group\n    .text(text)\n    .attr({ x, y })\n    .font(font);\n  if (fontColor !== undefined)\n    textNode.fill(fontColor);\n  if (font['alignment-baseline'] == 'bottom')\n    textNode.dy(-textNode.bbox().height - 5);\n  textNode\n    .dx(horizontalMargin * ((textNode.attr('text-anchor') == 'end') ? -1 : 1))\n    .dy(verticalMargin * ((font['alignment-baseline'] == 'bottom') ? -1 : 1));\n  if (background !== undefined)\n    background.attr({\n      x: textNode.bbox().x,\n      y: textNode.bbox().y,\n      width: textNode.bbox().width,\n      height: textNode.bbox().height\n    });\n  return group;\n}\n\n/**\n * Draws a windbarb into an SVG node.\n * \n * @param {Object} options - Options.\n * @param {external:SVG} options.node - SVG node.\n * @param {number} [options.x=0] - X coordinate for windbarb tip.\n * @param {number} [options.y=0] - Y coordinate for windbarb tip.\n * @param {number} [options.wspd=0] - Wind speed [m/s].\n * @param {number} [options.wdir=0] - Wind direction [°].\n * @param {number} [options.length=50] - Windbarb length.\n * @param {module:meteoJS/thermodynamicDiagram~lineStyleOptions}\n *   [options.strokeStyle] - Line style.\n * @param {boolean} [options.fillTriangle=true] - Fill the 50 knots triangles.\n * @param {boolean} [options.triangleRatio=0.2]\n *   Width of the 50 knots triangles according to length.\n * @param {boolean} [options.barbDistanceRatio=0.1]\n *   Distance between triangles and/or 10 knot lines according to length.\n * @param {boolean} [options.barbHeightRatio=0.375]\n *   Height of the triangles and lines according to length.\n */\nexport function drawWindbarbInto({\n  node,\n  x = 0,\n  y = 0,\n  wspd = 0,\n  wdir = 270,\n  length = 50,\n  strokeStyle = undefined,\n  fillTriangle = true,\n  triangleRatio = 1 / 5,\n  barbDistanceRatio = 1 / 10,\n  barbHeightRatio = 3 / 8,\n  circleOnLowWindspeed = true,\n  circleRadiusRatio = 1 / 10\n} = {}) {\n  strokeStyle = getNormalizedLineStyleOptions(strokeStyle);\n  \n  const windspeed = windspeedMSToKN(wspd);\n  const windbarbGroup = node.group();\n  const barbGroup = (windspeed >= 5) ? windbarbGroup.group() : undefined;\n  const triangleWidth = length * triangleRatio;\n  const barbDistance = length * barbDistanceRatio;\n  const windbarbHeight = length * barbHeightRatio;\n  let yPosition = y - length;\n  let windspeedResidual = windspeed;\n  \n  if (windspeed < 5 && circleOnLowWindspeed) {\n    windbarbGroup\n      .circle(length * circleRadiusRatio)\n      .cx(x)\n      .cy(y)\n      .stroke(strokeStyle)\n      .fill('none');\n    return;\n  }\n  \n  // base line\n  windbarbGroup\n    .line(x, yPosition, x, y)\n    .stroke(strokeStyle);\n  \n  // 50 knots triangles\n  while (windspeedResidual >= 50) {\n    barbGroup\n      .polyline([\n        [x, yPosition],\n        [x + windbarbHeight, yPosition + triangleWidth/2],\n        [x, yPosition + triangleWidth]\n      ])\n      .fill(fillTriangle ? strokeStyle : 'none')\n      .stroke(strokeStyle);\n    windspeedResidual -= 50;\n    yPosition += triangleWidth + ((windspeedResidual >= 50) ? barbDistance/2 : barbDistance);\n  }\n  \n  // 10 knots lines\n  while (windspeedResidual >= 10) {\n    barbGroup\n      .line(\n        x, yPosition,\n        x + windbarbHeight, yPosition - triangleWidth/2\n      )\n      .stroke(strokeStyle);\n    yPosition += barbDistance;\n    windspeedResidual -= 10;\n  }\n  \n  if (windspeed < 10)\n    yPosition += barbDistance;\n  \n  // 5 knot line\n  if (windspeedResidual >= 5)\n    barbGroup\n      .line(\n        x, yPosition,\n        x + windbarbHeight/2, yPosition - triangleWidth/4\n      )\n      .stroke(strokeStyle);\n  \n  // compress barbs on high windspeed\n  const barbsWidth = yPosition - (y - length);\n  if (barbsWidth > length * 0.9)\n    barbGroup.scale(1, (length * 0.9) / barbsWidth, x, y - length);\n  \n  if (wdir != 0)\n    windbarbGroup.rotate(wdir, x, y);\n}","/**\n * @module meteoJS/thermodynamicDiagram/diagramParcel\n */\nimport addEventFunctions from '../Events.js';\nimport Unique from '../base/Unique.js';\nimport {\n  getNormalizedLineOptions,\n  updateLineOptions\n} from '../thermodynamicDiagram/Functions.js';\n\n/**\n * Change visibility event. Only triggered, if the visibility of the parcel\n * changes.\n * \n * @event module:meteoJS/thermodynamicDiagram/diagramParcel#change:visible\n */\n\n/**\n * Change options event.\n * \n * @event module:meteoJS/thermodynamicDiagram/diagramParcel#change:options\n */\n\n/**\n * Style/visibility options for a parcel in the thermodynamic diagram.\n * \n * @typedef {Object}\n *   module:meteoJS/thermodynamicDiagram/diagramParcel~parcelOptions\n * @property {boolean} [visible=true]\n *   Visibility in the thermodynamic diagram.\n * @property {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   [temp] - Options for the temperature curve.\n * @property {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   [dewp] - Options for the dewpoint curve.\n */\n\n/**\n * Definition of the options for the constructor.\n * \n * @typedef {module:meteoJS/base/unique~options}\n *   module:meteoJS/thermodynamicDiagram/diagramParcel~options\n * @property {module:meteoJS/sounding/parcel.Parcel} [parcel] - Parcel object.\n * @property {boolean} [visible=true] - Visibility of the parcel.\n * @property {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   [temp] - Options for the temperature curve.\n * @property {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   [dewp] - Options for the dewpoint curve.\n */\n\n/**\n * Representation of a plotted parcel (data and display options)\n * \n * <pre><code>import DiagramParcel from 'meteojs/thermodynamicDiagram/DiagramParcel';</code></pre>\n * \n * @extends module:meteoJS/base/unique.Unique\n * @fires module:meteoJS/thermodynamicDiagram/diagramParcel#change:visible\n * @fires module:meteoJS/thermodynamicDiagram/diagramParcel#change:options\n */\nexport class DiagramParcel extends Unique {\n  \n  /**\n   * @param {module:meteoJS/thermodynamicDiagram/diagramParcel~options} [options] - Options.\n   */\n  constructor({\n    parcel = undefined,\n    visible = true,\n    temp = {},\n    dewp = {},\n    ...rest\n  } = {}) {\n    super(rest);\n    \n    /**\n     * @type module:meteoJS/sounding/parcel.Parcel\n     * @private\n     */\n    this._parcel = parcel;\n    if (this.id === undefined && parcel !== undefined)\n      this.id = parcel.id;\n    \n    /**\n     * @type {module:meteoJS/thermodynamicDiagram/diagramParcel~parcelOptions}\n     * @private\n     */\n    this._options = {\n      visible,\n      temp: getNormalizedLineOptions(temp, {\n        style: {\n          color: 'rgb(255, 153, 0)',\n          width: 3,\n          linecap: 'round'\n        }\n      }),\n      dewp: getNormalizedLineOptions(dewp, {\n        style: {\n          color: 'rgb(255, 153, 0)',\n          width: 3,\n          linecap: 'round'\n        }\n      })\n    };\n  }\n\n  /**\n   * Parcel object.\n   * \n   * @type module:meteoJS/sounding/parcel.Parcel\n   * @readonly\n   */\n  get parcel() {\n    return this._parcel;\n  }\n  \n  /**\n   * Visibility of the parcel.\n   * \n   * @type {boolean}\n   * @fires module:meteoJS/thermodynamicDiagram/diagramParcel#change:visible\n   */\n  get visible() {\n    return this._options.visible;\n  }\n  set visible(visible) {\n    let oldVisible = this._options.visible;\n    this._options.visible = visible ? true : false;\n    if (oldVisible != this._options.visible)\n      this.trigger('change:visible');\n  }\n  \n  /**\n   * Style options for the parcel.\n   * \n   * @type {module:meteoJS/thermodynamicDiagram/diagramParcel~parcelOptions}\n   * @readonly\n   */\n  get options() {\n    return this._options;\n  }\n  \n  /**\n   * Updates the style options for the parcel.\n   * \n   * @param {module:meteoJS/thermodynamicDiagram/diagramParcel~parcelOptions}\n   *   [options] - Options.\n   * @fires module:meteoJS/thermodynamicDiagram/diagramParcel#change:visible\n   * @fires module:meteoJS/thermodynamicDiagram/diagramParcel#change:options\n   */\n  update({\n    visible = undefined,\n    temp = undefined,\n    dewp = undefined\n  } = {}) {\n    let willTrigger = false;\n    if (temp === undefined)\n      temp = {};\n    else\n      willTrigger = true;\n    if (dewp === undefined)\n      dewp = {};\n    else\n      willTrigger = true;\n    \n    \n    this._options.temp = updateLineOptions(this._options.temp, temp);\n    this._options.dewp = updateLineOptions(this._options.dewp, dewp);\n    \n    if (willTrigger)\n      this.trigger('change:options');\n    \n    if (visible !== undefined)\n      this.visible = visible;\n  }\n}\naddEventFunctions(DiagramParcel.prototype);\nexport default DiagramParcel;","/**\n * @module meteoJS/thermodynamicDiagram/diagramSounding\n */\nimport addEventFunctions from '../Events.js';\nimport Unique from '../base/Unique.js';\nimport Collection from '../base/Collection.js';\nimport {\n  getNormalizedLineOptions,\n  updateLineOptions\n} from '../thermodynamicDiagram/Functions.js';\nimport DiagramParcel from './DiagramParcel.js';\n\n/**\n * Change visibility event. Only triggered, if the visibility of the sounding\n * changes, not if only a part's visibility (like hodograph) changes.\n * \n * @event module:meteoJS/thermodynamicDiagram/diagramSounding#change:visible\n */\n\n/**\n * Change options event.\n * \n * @event module:meteoJS/thermodynamicDiagram/diagramSounding#change:options\n */\n\n/**\n * Definition of the options for the constructor.\n * \n * @typedef {Object} module:meteoJS/thermodynamicDiagram/diagramSounding~options\n * @param {boolean} [visible=true] - Visibility of the sounding.\n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~diagramOptions}\n *   [diagram] - Options for the thermodynamic diagram part.\n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~windprofileOptions}\n *   [windprofile] - Options for the windprofile part.\n * @param {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   [hodograph] - Options for this sounding for the hodograph.\n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~parcelsOptions}\n *   [parcels] - Options for this sounding for the parcels.\n */\n\n/**\n * Representation of a plotted sounding (data and display options)\n * \n * <pre><code>import DiagramSounding from 'meteojs/thermodynamicDiagram/DiagramSounding';</code></pre>\n * \n * @extends module:meteoJS/base/unique.Unique\n * @fires module:meteoJS/thermodynamicDiagram/diagramSounding#change:visible\n * @fires module:meteoJS/thermodynamicDiagram/diagramSounding#change:options\n */\nexport class DiagramSounding extends Unique {\n  \n  /**\n   * @param {module:meteoJS/sounding.Sounding} sounding - Sounding data.\n   * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~options} [options] - Options.\n   */\n  constructor(sounding, {\n    visible = true,\n    diagram = {},\n    windprofile = {},\n    hodograph = {},\n    parcels = {}\n  } = {}) {\n    super();\n    \n    /**\n     * @type module:meteoJS/sounding.Sounding\n     * @private\n     */\n    this._sounding = sounding;\n    \n    /**\n     * @type module:meteoJS/base/collection.Collection\n     * @private\n     */\n    this._diagramParcelCollection = new Collection({\n      fireReplace: false,\n      fireAddRemoveOnReplace: true,\n      emptyObjectMaker: () => new DiagramParcel()\n    });\n    \n    /**\n     * @type boolean\n     * @private\n     */\n    this._visible = visible;\n    \n    /**\n     * @type Object\n     * @private\n     */\n    this._options = {\n      diagram: getNormalizedDiagramOptions(diagram),\n      windprofile:  getNormalizedWindprofileOptions(windprofile),\n      hodograph: getNormalizedHodographOptions(hodograph),\n      parcels: getNormalizedParcelsOptions(parcels)\n    };\n    \n    // Initialize soundig-object with its parcels.\n    if (this._sounding !== undefined) {\n      this._sounding.parcelCollection.on('add:item',\n        parcel => this.addParcel(parcel));\n      this._sounding.parcelCollection.on('remove:item', parcel => {\n        for (let diagramParcel of this._diagramParcelCollection)\n          if (diagramParcel.parcel === parcel)\n            this._diagramParcelCollection.remove(diagramParcel);\n      });\n      for (let parcel of this._sounding.parcelCollection)\n        this.addParcel(parcel);\n    }\n  }\n  \n  /**\n   * Sounding data.\n   * \n   * @type module:meteoJS/sounding.Sounding\n   * @readonly\n   */\n  get sounding() {\n    return this._sounding;\n  }\n  \n  /**\n   * Visibility of the sounding.\n   * \n   * @type {boolean}\n   * @fires module:meteoJS/thermodynamicDiagram/diagramSounding#change:visible\n   */\n  get visible() {\n    return this._visible;\n  }\n  set visible(visible) {\n    let oldVisible = this._visible;\n    this._visible = visible ? true : false;\n    if (oldVisible != this._visible)\n      this.trigger('change:visible');\n  }\n  \n  get options() {\n    return this._options;\n  }\n  \n  /**\n   * Collection of the DiagramParcel objects.\n   * \n   * @type module:meteoJS/base/collection.Collection\n   * @readonly\n   */\n  get diagramParcelCollection() {\n    return this._diagramParcelCollection;\n  }\n  \n  /**\n   * Add a parcel with styles to the sounding.\n   * (analogue to {@link module:meteoJS/thermodynamicDiagramPluggable.ThermodynamicDiagramPluggable#addSounding})\n   * \n   * @param {module:meteoJS/sounding/parcel.Parcel} parcel - Parcel object.\n   * @param {module:meteoJS/thermodynamicDiagram/diagramParcel~parcelOptions}\n   *   [options] - Style options.\n   * @returns {module:meteoJS/thermodynamicDiagram/diagramParcel.diagramParcel}\n   *   Parcel object for the diagram with style options.\n   */\n  addParcel(parcel, options = undefined) {\n    options = (options === undefined) ? this.getParcelOptions(parcel) : options;\n    options.parcel = parcel;\n    const dp = new DiagramParcel(options);\n    this._diagramParcelCollection.append(dp);\n    return dp;\n  }\n  \n  /**\n   * Updated the style options for this sounding.\n   * \n   * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~options}\n   *   [options] - Options.\n   * @fires module:meteoJS/thermodynamicDiagram/diagramSounding#change:visible\n   * @fires module:meteoJS/thermodynamicDiagram/diagramSounding#change:options\n   */\n  update({\n    visible = undefined,\n    diagram = undefined,\n    windprofile = undefined,\n    hodograph = undefined,\n    parcels = undefined\n  } = {}) {\n    let willTrigger = false;\n    if (diagram === undefined)\n      diagram = {};\n    else\n      willTrigger = true;\n    if (windprofile === undefined)\n      windprofile = {};\n    else\n      willTrigger = true;\n    if (hodograph === undefined)\n      hodograph = {};\n    else\n      willTrigger = true;\n    \n    this._options.diagram =\n      updateDiagramOptions(this._options.diagram, diagram);\n    this._options.windprofile =\n      updateWindprofileOptions(this._options.windprofile, windprofile);\n    this._options.hodograph =\n      updateHodographOptions(this._options.hodograph, hodograph);\n    if (willTrigger)\n      this.trigger('change:options');\n    \n    if (parcels === undefined)\n      parcels = {};\n    this._options.parcels =\n      updateParcelsOptions(this._options.parcels, parcels);\n    for (let diagramParcel of this.diagramParcelCollection) {\n      if (diagramParcel.id in parcels)\n        diagramParcel.update(parcels[diagramParcel.id]);\n    }\n    \n    if (visible !== undefined)\n      this.visible = visible;\n  }\n  \n  /**\n   * Returns normalized visibility and style options for a parcel. This is a\n   * combination of the specific options for the passed parcel and the defaults.\n   * \n   * @param {module:meteoJS/sounding/parcel.Parcel} [parcel] - Parcel.\n   * @returns {module:meteoJS/thermodynamicDiagram/diagramSounding~parcelsOptions}\n   *   Parcel options.\n   * @public\n   */\n  getParcelOptions(parcel = undefined) {\n    let result = {\n      visible: this.options.parcels.default.visible,\n      temp: {\n        visible: this.options.parcels.default.temp.visible,\n        style: {}\n      },\n      dewp: {\n        visible: this.options.parcels.default.dewp.visible,\n        style: {}\n      }\n    };\n    ['temp', 'dewp'].forEach(key => {\n      Object.keys(this.options.parcels.default[key].style).forEach(styleKey => {\n        result[key].style[styleKey] =\n          this.options.parcels.default[key].style[styleKey];\n      });\n    });\n    if (parcel !== undefined &&\n        parcel.id in this.options.parcels)\n      result = updateOptionsPart(result, this.options.parcels[parcel.id],\n        ['temp', 'dewp']);\n    return result;\n  }\n}\naddEventFunctions(DiagramSounding.prototype);\nexport default DiagramSounding;\n\n/**\n * Style/visibility options for a sounding in the thermodynamic diagram.\n * \n * @typedef {Object} module:meteoJS/thermodynamicDiagram/diagramSounding~diagramOptions\n * @param {boolean} [visible=true]\n *   Visibility in the thermodynamic diagram.\n * @param {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   [temp] - Options for the temperature curve.\n * @param {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   [dewp] - Options for the dewpoint curve.\n * @param {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   [wetbulb] - Options for the wetbulb temperature curve.\n */\n\n/**\n * Returns normalized diagram options.\n * \n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~diagramOptions}\n *   [options] - Options.\n * @returns {module:meteoJS/thermodynamicDiagram/diagramSounding~diagramOptions}\n *   Normalized options.\n * @private\n */\nfunction getNormalizedDiagramOptions({\n  visible = true,\n  temp = {},\n  dewp = {},\n  wetbulb = {}\n} = {}) {\n  return {\n    visible,\n    temp: getNormalizedLineOptions(temp, {\n      style: {\n        color: 'red',\n        width: 3,\n        linecap: 'round'\n      }\n    }),\n    dewp: getNormalizedLineOptions(dewp, {\n      style: {\n        color: 'blue',\n        width: 3,\n        linecap: 'round'\n      }\n    }),\n    wetbulb: getNormalizedLineOptions(wetbulb, {\n      style: {\n        color: 'green',\n        width: 2,\n        linecap: 'round'\n      }\n    })\n  };\n}\n\n/**\n * Updates diagram options.\n * \n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~diagramOptions}\n *   options - Current options.\n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~diagramOptions}\n *   updateOptions - Some new options.\n * @returns {module:meteoJS/thermodynamicDiagram/diagramSounding~diagramOptions}\n *   New options object.\n * @private\n */\nfunction updateDiagramOptions(options, updateOptions) {\n  return updateOptionsPart(options, updateOptions, ['temp', 'dewp', 'wetbulb']);\n}\n\n/**\n * Style/visibility options for a sounding in the windprofile.\n * \n * @typedef {Object} module:meteoJS/thermodynamicDiagram/diagramSounding~windprofileOptions\n * @param {boolean} [visible=true] - Visibility in the windprofile part.\n * @param {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   [windbarbs] - Options for the windbarbs.\n * @param {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   [windspeed] - Options for the windspeed line.\n */\n\n/**\n * Returns normalized windprofile options.\n * \n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~windprofileOptions}\n *   [options] - Options.\n * @returns {module:meteoJS/thermodynamicDiagram/diagramSounding~windprofileOptions}\n *   Normalized options.\n * @private\n */\nfunction getNormalizedWindprofileOptions({\n  visible = true,\n  windbarbs = {},\n  windspeed = {}\n} = {}) {\n  return {\n    visible,\n    windbarbs: getNormalizedLineOptions(windbarbs),\n    windspeed: getNormalizedLineOptions(windspeed)\n  };\n}\n\n/**\n * Updates windprofile options.\n * \n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~windprofileOptions}\n *   options - Current options.\n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~windprofileOptions}\n *   updateOptions - Some new options.\n * @returns {module:meteoJS/thermodynamicDiagram/diagramSounding~windprofileOptions}\n *   New options object.\n * @private\n */\nfunction updateWindprofileOptions(options, updateOptions) {\n  return updateOptionsPart(options, updateOptions, ['windbarbs', 'windspeed']);\n}\n\n/**\n * Options for a line-segment of a sounding in the hodograph.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   module:meteoJS/thermodynamicDiagram/diagramSounding~hodographSegmentOptions\n * @property {number|undefined}\n *   [minPressure] - Minimum pressure level of the segment. Unit: hPa.\n * @property {number|undefined}\n *   [maxPressure] - Maximum pressure level of the segment. Unit: hPa.\n */\n\n/**\n * Options for a sounding in the hodograph.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram~lineOptions}\n *   module:meteoJS/thermodynamicDiagram/diagramSounding~hodographOptions\n * @property {number|undefined}\n *   [minPressure] - Minimum pressure level to plot in the hodograph. Unit: hPa.\n * @property {number|undefined}\n *   [maxPressure] - Maximum pressure level to plot in the hodograph. Unit: hPa.\n * @property {module:meteoJS/thermodynamicDiagram/diagramSounding~hodographSegmentOptions[]}\n *   [segments] - Array of segment definitions.\n */\n\n/**\n * Returns normalized hodograph options.\n * \n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~hodographOptions}\n *   [options] - Options.\n * @returns {module:meteoJS/thermodynamicDiagram/diagramSounding~hodographOptions}\n *   Normalized options.\n * @private\n */\nfunction getNormalizedHodographOptions({\n  minPressure = undefined,\n  maxPressure = undefined,\n  segments = [],\n  ...result\n} = {}) {\n  result = getNormalizedLineOptions(result, {\n    style: {\n      color: 'green',\n      width: 2\n    }\n  });\n  result.minPressure = minPressure;\n  result.maxPressure = maxPressure;\n  result.segments = segments.map(({\n    minPressure = undefined,\n    maxPressure = undefined,\n    ...segment\n  }) => {\n    segment = getNormalizedLineOptions(segment);\n    segment.minPressure = minPressure;\n    segment.maxPressure = maxPressure;\n    return segment;\n  });\n  return result;\n}\n\n/**\n * Updates hodograph options.\n * \n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~hodographOptions}\n *   options - Current options.\n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~hodographOptions}\n *   updateOptions - Some new options.\n * @returns {module:meteoJS/thermodynamicDiagram/diagramSounding~hodographOptions}\n *   New options object.\n * @private\n */\nfunction updateHodographOptions(options, updateOptions) {\n  options = updateLineOptions(options, updateOptions);\n  ['minPressure', 'maxPressure'].forEach(styleKey => {\n    if (styleKey in updateOptions)\n      options[styleKey] = updateOptions[styleKey];\n  });\n  if ('segments' in updateOptions)\n    options.segments = updateOptions.segments.map(({\n      minPressure = undefined,\n      maxPressure = undefined,\n      ...segment\n    }) => {\n      segment = getNormalizedLineOptions(segment);\n      segment.minPressure = minPressure;\n      segment.maxPressure = maxPressure;\n      return segment;\n    });\n  return options;\n}\n\n/**\n * Visibility/style of the parcels. This object can contain further keys with\n * values as {@link module:meteoJS/thermodynamicDiagram/diagramSounding~diagramOptions}\n * which applies to the parcel with the equivalent id.\n * \n * @typedef {Object} module:meteoJS/thermodynamicDiagram/diagramSounding~parcelsOptions\n * @param {boolean} [visible=true] - Visibility of the parcels.\n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~diagramOptions}\n *   [default] - Default options for a parcel.\n */\n\n/**\n * Returns normalized parcels options.\n * \n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~parcelsOptions}\n *   [options] - Options.\n * @returns {module:meteoJS/thermodynamicDiagram/diagramSounding~parcelsOptions}\n *   Normalized options.\n * @private\n */\nfunction getNormalizedParcelsOptions(options = {}) {\n  if (options.visible === undefined)\n    options.visible = true;\n  if (options.default === undefined)\n    options.default = {};\n  if (options.default.visible === undefined)\n    options.default.visible = false;\n  if (options.default.temp === undefined)\n    options.default.temp = {};\n  if (options.default.temp.visible === undefined)\n    options.default.temp.visible = true;\n  if (options.default.temp.style === undefined)\n    options.default.temp.style = {};\n  if (options.default.temp.style.color === undefined)\n    options.default.temp.style.color = 'rgb(255, 153, 0)';\n  if (options.default.temp.style.width === undefined)\n    options.default.temp.style.width = 3;\n  if (options.default.temp.style.linecap === undefined)\n    options.default.temp.style.linecap = 'round';\n  if (options.default.dewp === undefined)\n    options.default.dewp = {};\n  if (options.default.dewp.visible === undefined)\n    options.default.dewp.visible = true;\n  if (options.default.dewp.style === undefined)\n    options.default.dewp.style = {};\n  if (options.default.dewp.style.color === undefined)\n    options.default.dewp.style.color = 'rgb(255, 194, 102)';\n  if (options.default.dewp.style.width === undefined)\n    options.default.dewp.style.width = 3;\n  if (options.default.dewp.style.linecap === undefined)\n    options.default.dewp.style.linecap = 'round';\n  return options;\n}\n\n/**\n * Updates Parcels options.\n * \n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~parcelsOptions}\n *   options - Current options.\n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~parcelsOptions}\n *   updateOptions - Some new options.\n * @returns {module:meteoJS/thermodynamicDiagram/diagramSounding~parcelsOptions}\n *   New options object.\n * @private\n */\nfunction updateParcelsOptions(options, updateOptions) {\n  if ('visible' in updateOptions)\n    options.visible = updateOptions.visible;\n  if ('default' in updateOptions)\n    options.default =\n      updateOptionsPart(options.default, updateOptions.default,\n        ['temp', 'dewp']);\n  Object.keys(updateOptions)\n    .filter(key => key != 'visible' && key != 'default')\n    .forEach(key =>\n      options[key] =\n        updateDiagramOptions(\n          (key in options) ? options[key] : {},\n          updateOptions[key]));\n  return options;\n}\n\n/**\n * Updates diagram/windprofile options.\n * \n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~diagramOptions|module:meteoJS/thermodynamicDiagram/diagramSounding~windprofileOptions}\n *   options - Current options.\n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~diagramOptions|module:meteoJS/thermodynamicDiagram/diagramSounding~windprofileOptions}\n *   updateOptions - Some new options.\n * @param {Array.<string>} [lineKeys] - Keys to update.\n * @returns {module:meteoJS/thermodynamicDiagram/diagramSounding~diagramOptions|module:meteoJS/thermodynamicDiagram/diagramSounding~windprofileOptions}\n *   New options object.\n * @private\n */\nfunction updateOptionsPart(options, updateOptions, lineKeys = []) {\n  if ('visible' in updateOptions)\n    options.visible = updateOptions.visible;\n  lineKeys.forEach(key => {\n    if (key in updateOptions)\n      options[key] = updateLineOptions(options[key] ? options[key] : { style: {} }, updateOptions[key]);\n  });\n  return options;\n}","/**\n * @module meteoJS/thermodynamicDiagramPluggable\n */\nimport { SVG } from '@svgdotjs/svg.js';\nimport Collection from './base/Collection.js';\nimport DiagramSounding from './thermodynamicDiagram/DiagramSounding.js';\n\n/**\n * Options for the constructor.\n * \n * @typedef {Object} module:meteoJS/thermodynamicDiagramPluggable~options\n * @param {external:HTMLElement} [renderTo] - Element to render diagram into.\n * @param {integer} [width=undefined] - Width of the whole container.\n * @param {integer} [height=undefined] - Height of the whole container.\n */\n\n/**\n * Class to draw a SVG thermodynamic diagram.\n * \n * <pre><code>import ThermodynamicDiagramPluggable from 'meteojs/thermodynamicDiagramPluggable';</code></pre>\n * \n * @extends module:meteoJS/base/collection.Collection\n */\nexport class ThermodynamicDiagramPluggable extends Collection {\n  \n  /**\n   * @param {module:meteoJS/thermodynamicDiagram~options} options - Options.\n   */\n  constructor({\n    renderTo = undefined,\n    width = undefined,\n    height = undefined\n  } = {}) {\n    super({\n      fireReplace: false,\n      fireAddRemoveOnReplace: true,\n      emptyObjectMaker: () => new DiagramSounding()\n    });\n    \n    /**\n     * @type external:SVG\n     * @private\n     */\n    this._svgNode =\n      (renderTo === undefined || 'node' in renderTo || 'instance' in renderTo)\n        ? SVG(renderTo) : SVG().addTo(renderTo);\n    if (width !== undefined ||\n        height !== undefined)\n      this._svgNode.size(width, height);\n    else if (width === undefined &&\n             height === undefined &&\n             renderTo !== undefined &&\n             'getBoundingClientRect' in renderTo) {\n      let boundingRect = renderTo.getBoundingClientRect(); // size incl. padding\n      let computedStyle = window.getComputedStyle(renderTo);\n      this._svgNode.size(\n        boundingRect.width -\n        parseFloat(computedStyle.getPropertyValue('padding-left')) -\n        parseFloat(computedStyle.getPropertyValue('padding-right')),\n        boundingRect.height - \n        parseFloat(computedStyle.getPropertyValue('padding-top')) -\n        parseFloat(computedStyle.getPropertyValue('padding-bottom'))\n      );\n    }\n    \n    /**\n     * @type Set.<module:meteoJS/thermodynamicDiagram/plotArea.PlotArea>\n     * @private\n     */\n    this._plotAreas = new Set();\n    \n    // PlotAltitudeDataArea objects\n    this._svgNode.on('mousemove', e => {\n      for (let plotArea of this._plotAreas)\n        if ('isHoverLabelsRemote' in plotArea)\n          plotArea.svgNode.dispatchEvent(e);\n    });\n    this._svgNode.on('mouseout', e => {\n      if (this._svgNode.node === e.target)\n        for (let plotArea of this._plotAreas)\n          if ('_hoverLabelsGroup' in plotArea)\n            plotArea._hoverLabelsGroup.clear();\n    });\n    \n    // PlotDataArea objects\n    this.on('add:item', sounding => {\n      for (let plotArea of this._plotAreas)\n        if ('addSounding' in plotArea)\n          plotArea.addSounding(sounding);\n    });\n    this.on('remove:item', sounding => {\n      for (let plotArea of this._plotAreas)\n        if ('removeSounding' in plotArea)\n          plotArea.removeSounding(sounding);\n    });\n  }\n\n  /**\n   * SVG object of the complete diagram.\n   * \n   * @type external:SVG\n   * @readonly\n   */\n  get svgNode() {\n    return this._svgNode;\n  }\n  \n  /**\n   * Appends a PlotArea object to this thermodynamic diagram.\n   * \n   * @param {module:meteoJS/thermodynamicDiagram/plotArea.PlotArea} plotArea\n   *   PlotArea object.\n   * @returns {module:meteoJS/thermodynamicDiagramPluggable.ThermodynamicDiagramPluggable}\n   *   This.\n   */\n  appendPlotArea(plotArea) {\n    if (this._plotAreas.has(plotArea))\n      return;\n    \n    this._plotAreas.add(plotArea);\n    \n    plotArea.addTo(this.svgNode);\n    plotArea.onCoordinateSystemChange();\n    for (let sounding of this)\n      if ('addSounding' in plotArea)\n        plotArea.addSounding(sounding);\n    \n    return this;\n  }\n  \n  /**\n   * Removes a PlotArea object from this thermodynamic diagram.\n   * \n   * @param {module:meteoJS/thermodynamicDiagram/plotArea.PlotArea} plotArea\n   *   PlotArea object.\n   * @returns {module:meteoJS/thermodynamicDiagramPluggable.ThermodynamicDiagramPluggable}\n   *   This.\n   */\n  removePlotArea(plotArea) {\n    if (!this._plotAreas.has(plotArea))\n      return;\n    \n    for (let sounding of this)\n      plotArea.removeSounding(sounding);\n    this._plotAreas.delete(plotArea);\n    \n    return this;\n  }\n  \n  /**\n   * Exchanges the coordinate system in the PlotArea objects. The optional,\n   * second argument defines an already used coordinate system. If this\n   * argument is passed, only the coordinate system of the PlotArea's with\n   * this coordinate system will exchanged.\n   * \n   * @param {module:meteoJS/thermodynamicDiagram/coordinateSystem.CoordinateSystem}\n   *   coordinateSystem - Coordinate system.\n   * @param {module:meteoJS/thermodynamicDiagram/coordinateSystem.CoordinateSystem}\n   *   [formerCoordinateSystem=undefined] - Coordinate system.\n   */\n  exchangeCoordinateSystem(\n    coordinateSystem,\n    formerCoordinateSystem = undefined\n  ) {\n    for (let plotArea of this._plotAreas)\n      if (formerCoordinateSystem === undefined ||\n          plotArea.coordinateSystem === formerCoordinateSystem)\n        plotArea.coordinateSystem = coordinateSystem;\n  }\n  \n  /**\n   * Add a sounding to the diagram.\n   * \n   * @param {module:meteoJS/sounding.Sounding} sounding - Sounding object.\n   * @param {module:meteoJS/thermodynamicDiagram/diagramSounding~options}\n   *   [options] - Display options.\n   * @returns {module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding}\n   *   Sounding object for the diagram with display options.\n   */\n  addSounding(sounding, options = {}) {\n    let diagramSounding = new DiagramSounding(sounding, options);\n    let i = 1;\n    let id = `sounding-${i}`;\n    while (this.containsId(id)) {\n      i++;\n      id = `sounding-${i}`;\n    }\n    diagramSounding.id = id;\n    this.append(diagramSounding);\n    return diagramSounding;\n  }\n  \n}\nexport default ThermodynamicDiagramPluggable;","/**\n * @module meteoJS/thermodynamicDiagram/coordinateSystem\n */\nimport { tempCelsiusToKelvin,\n  tempByPotentialTempAndPres,\n  tempByEquiPotTempAndPres,\n  potentialTempByTempAndPres,\n  dewpointByHMRAndPres,\n  saturationHMRByTempAndPres } from '../calc.js';\nimport addEventFunctions from '../Events.js';\n\n/**\n * Options change event.\n * \n * @event module:meteoJS/thermodynamicDiagram/coordinateSystem#change:options\n */\n\n/**\n * Pressure options.\n * \n * @typedef {Object} module:meteoJS/thermodynamicDiagram/coordinateSystem~pressureOptions\n * @property {number} [min=100] - Minimum pressure on the diagram.\n * @property {number} [max=1050] - Maximum pressure on the diagram.\n */\n\n/**\n * Temperature options.\n * \n * @typedef {Object} module:meteoJS/thermodynamicDiagram/coordinateSystem~temperatureOptions\n * @property {number} [min=-40°C]\n *   Temperature either on bottom-left on the diagram (if reference equals\n *   'base') or on the left of an isobar (if reference is a number).\n * @property {number} [max=45°C]\n *   Temperature either on bottom-right on the diagram (if reference equals\n *   'base') or on the right of an isobar (if reference is a number).\n * @property {'base'|integer} [reference='base']\n *   Reference for 'min' and 'max' values. Allowed values: 'base' or number.\n * @property {integer} [inclinationAngle=45]\n *   Angle of inclination to the right of the isotherms. Allowed values between\n *   0 and 90 (exclusive), in degrees.\n */\n\n/**\n * Options for the constructor.\n * \n * @typedef {Object} module:meteoJS/thermodynamicDiagram/coordinateSystem~options\n * @param {integer} [width=100] - Width of the diagram.\n * @param {integer} [height=100] - Height of the diagram.\n * @param {module:meteoJS/thermodynamicDiagram/coordinateSystem~pressureOptions}\n *   [pressure] - Pressure options.\n * @param {module:meteoJS/thermodynamicDiagram/coordinateSystem~temperatureOptions}\n *   [temperature] - Temperature options.\n */\n\n/**\n * Abstract class to specify the coordinate system of the thermodynamicDiagram.\n * \n * Child classes define the explicit coordinate system.\n * This class defines already: (can be overridden by child classes)\n * * log-P y-axes with horizontal isobars\n * * straight isotherms, inclinated to the right\n * \n * <pre><code>import CoordinateSystem from 'meteojs/thermodynamicDiagram/CoordinateSystem';</code></pre>\n * \n * @abstract\n * @fires module:meteoJS/thermodynamicDiagram/coordinateSystem#change:options\n */\nexport class CoordinateSystem {\n  \n  /**\n   * @param {module:meteoJS/thermodynamicDiagram/coordinateSystem~options} options\n   */\n  constructor({\n    width = 100,\n    height = 100,\n    pressure = {},\n    temperature = {}\n  } = {}) {\n    /**\n     * @type integer\n     * @private\n     */\n    this._width = width;\n    \n    /**\n     * @type integer\n     * @private\n     */\n    this._height = height;\n    \n    /**\n     * @type number\n     * @private\n     */\n    this.temperatureBottomLeft;\n    \n    /**\n     * @type number\n     * @private\n     */\n    this.temperatureBottomRight;\n    \n    /**\n     * @type number\n     * @private\n     */\n    this.inclinationTan;\n    \n    /**\n     * @type Object\n     * @private\n     */\n    this.options = {\n      pressure: {},\n      temperature: {}\n    };\n    \n    this._initPressureOptions(pressure);\n    this._initTemperatureOptions(temperature);\n  }\n  \n  /**\n   * Visible width, in pixels.\n   * \n   * @type integer\n   * @public\n   */\n  get width() {\n    return this._width;\n  }\n  set width(width) {\n    const oldWidth = this._width;\n    this._width = width;\n    if (oldWidth != this._width)\n      this.trigger('change:options');\n  }\n  \n  /**\n   * Visible height, in pixels.\n   * \n   * @type integer\n   * @public\n   */\n  get height() {\n    return this._height;\n  }\n  set height(height) {\n    const oldHeight = this._height;\n    this._height = height;\n    if (oldHeight != this._height)\n      this.trigger('change:options');\n  }\n  \n  /**\n   * Returns if isobars are straight lines in the defined coordinate system.\n   * \n   * @returns {boolean}\n   */\n  isIsobarsStraightLine() {\n    return true;\n  }\n\n  /**\n   * Returns if the dry adiabats are straight lines\n   * in the defined coordinate system.\n   * \n   * @returns {boolean}\n   */\n  isDryAdiabatStraightLine() {\n    return false;\n  }\n  \n  /**\n   * @returns {boolean}\n   */\n  isIsothermsVertical() {\n    return (this.options.temperature.inclinationAngle !== undefined) &&\n         (this.options.temperature.inclinationAngle == 0);\n  }\n\n  /**\n   * Pressure for a x-y coordinate.\n   * Implementation valid for horizontal isobars, log-P y-axes.\n   * \n   * @param {number} x - Pixels from the left.\n   * @param {number} y - Pixels from bottom.\n   * @returns {number} Pressure in hPa.\n   */\n  getPByXY(x, y) {\n    return Math.pow(this.options.pressure.min, y / this.height) *\n         Math.pow(this.options.pressure.max,\n           (this.height - y)/this.height);\n  }\n\n  /**\n   * Temperature for x-y coordinate.\n   * Implementation valid for straight isotherms.\n   * \n   * @param {number} x - Pixels from the left.\n   * @param {number} y - Pixels from bottom.\n   * @returns {number} Temperature in Kelvin.\n   */\n  getTByXY(x, y) {\n  // bottom x coordinate of isotherm\n    let x0 = x - y * this.inclinationTan;\n    return this.temperatureBottomLeft +\n    x0 *\n    (this.temperatureBottomRight-this.temperatureBottomLeft) / this.width;\n  }\n\n  /**\n   * y coordinate for pressure and x coordinate.\n   * Implementation valid for horizontal isobars, log-P y-axes.\n   * \n   * @param {number} x - Pixels from the left.\n   * @param {number} p - Pressure in hPa.\n   * @returns {number} Pixels from bottom.\n   */\n  getYByXP(x, p) {\n    return this.height *\n    Math.log(this.options.pressure.max / p) /\n    Math.log(this.options.pressure.max / this.options.pressure.min);\n  }\n\n  /**\n   * Temperature for pressure and x coordinate.\n   * Implementation valid for horizontal isobars, log-P y-axes and straight\n   * isotherms.\n   * \n   * @param {number} x - Pixels from the left.\n   * @param {number} p - Pressure in hPa.\n   * @returns {number} Temperature in Kelvin.\n   */\n  getTByXP(x, p) {\n    return this.getTByXY(x, this.getYByXP(x, p));\n  }\n\n  /**\n   * x coordinate for temperature and y coordinate.\n   * Implementation valid for straight isotherms.\n   * \n   * @param {number} y - Pixels from bottom.\n   * @param {number} T - Temperature in Kelvin.\n   * @returns {number} Pixels from the left.\n   */\n  getXByYT(y, T) {\n  // bottom x coordinate \n    let x0 =\n    (T-this.temperatureBottomLeft) *\n    this.width / (this.temperatureBottomRight-this.temperatureBottomLeft);\n    return x0 + y * this.inclinationTan;\n  }\n\n  /**\n   * y coordinate for temperature and x coordinate.\n   * Implementation valid for straight isotherms.\n   * \n   * @param {number} x - Pixels from the left.\n   * @param {number} T - Temperature in Kelvin.\n   * @returns {number|undefined} Pixels from bottom.\n   */\n  getYByXT(x, T) {\n    return (this.inclinationTan != 0) ?\n      (x - this.getXByYT(0, T)) / this.inclinationTan :\n      undefined;\n  }\n\n  /**\n   * x coordinate for pressure and temperature.\n   * Implementation valid for horizontal isobars, log-P y-axes and straight\n   * isotherms.\n   * \n   * @param {number} p - Pressure in hPa.\n   * @param {number} T - Temperature in Kelvin.\n   * @returns {number} Pixels from the left.\n   */\n  getXByPT(p, T) {\n    return this.getXByYT(this.getYByXP(0, p), T);\n  }\n\n  /**\n   * y coordinate for pressure and temperature.\n   * Implementation valid for horizontal isobars, log-P y-axes and straight\n   * isotherms.\n   * \n   * @param {number} p - Pressure in hPa.\n   * @param {number} T - Temperature in Kelvin.\n   * @returns {number} Pixels from bottom.\n   */\n  getYByPT(p) {\n    return this.getYByXP(0, p);\n  }\n\n  /**\n   * x coordinate for potential temperature and y coordinate.\n   * Implementation valid for horizontal isobars, log-P y-axes and straight\n   * isotherms.\n   * \n   * @param {number} y - Pixels from bottom.\n   * @param {number} T - Potential temperature in Kelvin.\n   * @returns {number} Pixels from the left.\n   */\n  getXByYPotentialTemperature(y, T) {\n    T = tempByPotentialTempAndPres(T, this.getPByXY(0, y));\n    return this.getXByYT(y, T);\n  }\n\n  /**\n   * y coordinate for potential temperature and x coordinate.\n   * Implementation valid for horizontal isobars, log-P y-axes and straight\n   * isotherms.\n   * \n   * @param {number} x - Pixels from the left.\n   * @param {number} T - Potential temperature in Kelvin.\n   * @returns {number|undefined} Pixels from bottom.\n   */\n  getYByXPotentialTemperature(x, T) {\n    let a = this.getPByXY(x, 0);\n    let b = this.getPByXY(x, this.height);\n    if (potentialTempByTempAndPres(this.getTByXP(x, b), b) < T ||\n      T < potentialTempByTempAndPres(this.getTByXP(x, a), a))\n      return undefined;\n    while (a-b > 10) {\n      let p = b+(a-b)/2;\n      let tBin = this.getTByXP(x, p);\n      let potTemp = potentialTempByTempAndPres(tBin, p);\n      if (potTemp === undefined)\n        return undefined;\n      if (potTemp < T)\n        a = p;\n      else\n        b = p;\n    }\n    let y = this.getYByXP(x, b+(a-b)/2);\n    return y;\n  }\n\n  /**\n   * x coordinate for pressure and potential temperature.\n   * Implementation valid for horizontal isobars, log-P y-axes and straight\n   * isotherms.\n   * \n   * @param {number} p - Pressure in hPa.\n   * @param {number} T - Potential temperature in Kelvin.\n   * @returns {number} Pixels from the left.\n   */\n  getXByPPotentialTemperatur(p, T) {\n    T = tempByPotentialTempAndPres(T, p);\n    return this.getXByPT(p, T);\n  }\n\n  /**\n   * y coordinate for pressure and potential temperature.\n   * Implementation valid for horizontal isobars, log-P y-axes and straight\n   * isotherms.\n   * \n   * @param {number} p - Pressure in hPa.\n   * @param {number} T - Potential temperature in Kelvin.\n   * @returns {number} Pixels from bottom.\n   */\n  getYByPPotentialTemperatur(p, T) {\n    let x = this.getXByPPotentialTemperatur(p, T);\n    return this.getYByXPotentialTemperature(x, T);\n  }\n\n  /**\n   * x coordinate for humid mixing ratio and y coordinate.\n   * Implementation valid for horizontal isobars, log-P y-axes and straight\n   * isotherms.\n   * \n   * @param {number} y - Pixels from bottom.\n   * @param {number} hmr - Humid mixing ratio. []\n   * @returns {number} Pixels from the left.\n   */\n  getXByYHMR(y, hmr) {\n    let p = this.getPByXY(0, y); // horizontal isobars\n    return this.getXByYT(y, dewpointByHMRAndPres(hmr, p));\n  }\n\n  /**\n   * y coordinate for humid mixing ratio and x coordinate.\n   * Implementation valid for horizontal isobars, log-P y-axes and straight\n   * isotherms.\n   * \n   * @param {number} x - Pixels from the left.\n   * @param {number} hmr - Humid mixing ratio. []\n   * @returns {number|undefined} Pixels from bottom.\n   */\n  getYByXHMR(x, hmr) {\n    let a = this.getPByXY(x, 0);\n    let b = this.getPByXY(x, this.height);\n    while (a-b > 10) {\n      let p = b+(a-b)/2;\n      let hmrp = saturationHMRByTempAndPres(this.getTByXP(x, p), p);\n      if (hmrp === undefined)\n        return undefined;\n      if (hmrp < hmr)\n        b = p;\n      else\n        a = p;\n    }\n    let y = this.getYByXP(x, b+(a-b)/2);\n    return y;\n  }\n\n  /**\n   * x coordinate for pressure and humid mixing ratio.\n   * Implementation valid for horizontal isobars, log-P y-axes and straight\n   * isotherms.\n   * \n   * @param {number} p - Pressure in hPa.\n   * @param {number} hmr - Humid mixing ratio. []\n   * @returns {number} Pixels from the left.\n   */\n  getXByPHMR(p, hmr) {\n    let dewpoint = dewpointByHMRAndPres(hmr, p);\n    return this.getXByPT(p, dewpoint);\n  }\n\n  /**\n   * y coordinate for pressure and humid mixing ratio.\n   * Implementation valid for horizontal isobars, log-P y-axes and straight\n   * isotherms.\n   * \n   * @param {number} p - Pressure in hPa.\n   * @param {number} hmr - Humid mixing ratio. []\n   * @returns {number|undefined} Pixels from bottom.\n   */\n  getYByPHMR(p, hmr) {\n    let dewpoint = dewpointByHMRAndPres(hmr, p);\n    return this.getYByPT(p, dewpoint);\n  }\n\n  /**\n   * x coordinate for equipotential temperature and y coordainte.\n   * Implementation valid for horizontal isobars, log-P y-axes and straight\n   * isotherms.\n   * \n   * @param {number} y - Pixels from bottom.\n   * @param {number} thetae - Equipotential temperaturen in Kelvin.\n   * @returns {number} Pixels from the left.\n   */\n  getXByYEquiPotTemp(y, thetae) {\n    let T = tempByEquiPotTempAndPres(thetae, this.getPByXY(0, y));\n    return this.getXByYT(y, T);\n  }\n\n  /**\n   * y coordinate for equipotential temperature and x coordinate.\n   * Implementation valid for horizontal isobars, log-P y-axes and straight\n   * isotherms.\n   * \n   * @param {number} x - Pixels from the left.\n   * @param {number} thetae - Equipotential temperaturen in Kelvin.\n   * @returns {number|undefined} Pixels from bottom.\n   */\n  getYByXEquiPotTemp(x, thetae) {\n    let a = 0;\n    let b = this.height;\n    let y = undefined;\n    while (b-a > 10) {\n      y = a+(b-a)/2;\n      let thetaEY =\n      this.getYByXT(x,\n        tempByEquiPotTempAndPres(thetae, this.getPByXY(x, y)));\n      if (thetaEY === undefined)\n        return undefined;\n      if (thetaEY < thetae)\n        b = y;\n      else\n        a = y;\n    }\n    return y;\n  }\n\n  /**\n   * x coordinate for pressure and equipotential temperature .\n   * Implementation valid for horizontal isobars, log-P y-axes and straight\n   * isotherms.\n   * \n   * @param {number} p - Pressure in hPa.\n   * @param {number} thetae - Equipotential temperaturen in Kelvin.\n   * @returns {number} Pixels from the left.\n   */\n  getXByPEquiPotTemp(p, thetae) {\n    let T = tempByEquiPotTempAndPres(thetae, p);\n    return this.getXByPT(p, T);\n  }\n\n  /**\n   * y coordinate for pressure and equipotential temperature .\n   * Implementation valid for horizontal isobars, log-P y-axes and straight\n   * isotherms.\n   * \n   * @param {number} p - Pressure in hPa.\n   * @param {number} thetae - Equipotential temperaturen in Kelvin.\n   * @returns {number|undefined} Pixels from bottom.\n   */\n  getYByPEquiPotTemp(p, thetae) {\n    let T = tempByEquiPotTempAndPres(thetae, p);\n    return this.getYByPT(p, T);\n  }\n  \n  /**\n   * Updates options. To restore a default value, pass undefined.\n   * \n   * @param {Object} [options] - Options.\n   * @param {module:meteoJS/thermodynamicDiagram/coordinateSystem~pressureOptions}\n   *   [options.pressure] - Pressure options.\n   * @param {module:meteoJS/thermodynamicDiagram/coordinateSystem~temperatureOptions}\n   *   [options.temperature] - Temperature options.\n   */\n  update({\n    pressure = {},\n    temperature = {}\n  } = {}) {\n    if ('min' in pressure)\n      this.options.pressure.min =\n        (pressure.min === undefined) ? 100 : pressure.min;\n    if ('max' in pressure)\n      this.options.pressure.max =\n        (pressure.max === undefined) ? 1000 : pressure.max;\n    \n    if ('min' in temperature)\n      this.options.temperature.min =\n        (temperature.min === undefined)\n          ? tempCelsiusToKelvin(-40) : temperature.min;\n    if ('max' in temperature)\n      this.options.temperature.max =\n        (temperature.max === undefined)\n          ? tempCelsiusToKelvin(-45) : temperature.max;\n    if ('reference' in temperature)\n      this.options.temperature.reference =\n        (temperature.reference === undefined) ? 'base' : temperature.reference;\n    if ('inclinationAngle' in temperature)\n      this.options.temperature.inclinationAngle =\n        (temperature.inclinationAngle === undefined)\n          ? 45 : temperature.inclinationAngle;\n    \n    this._normalizeTemperatureRange();\n    \n    this.trigger('change:options');\n  }\n  \n  /**\n   * @private\n   */\n  _initPressureOptions({\n    min = 100,\n    max = 1050\n  }) {\n    this.options.pressure = {\n      min,\n      max\n    };\n  }\n  \n  /**\n   * @private\n   */\n  _initTemperatureOptions({\n    min = tempCelsiusToKelvin(-40),\n    max = tempCelsiusToKelvin(45),\n    reference = 'base',\n    inclinationAngle = 45\n  }) {\n    this.options.temperature = {\n      min,\n      max,\n      reference,\n      inclinationAngle\n    };\n    \n    this._normalizeTemperatureRange();\n  }\n  \n  /**\n   * @internal\n   */\n  _normalizeTemperatureRange() {\n    this.temperatureBottomLeft = this.options.temperature.min;\n    this.temperatureBottomRight = this.options.temperature.max;\n    this.inclinationTan =\n    (this.options.temperature.inclinationAngle == 45) ?\n      1 :\n      (this.options.temperature.inclinationAngle == 0) ?\n        0 :\n        Math.tan(this.options.temperature.inclinationAngle * Math.PI/180);\n    \n    // specific pressure level for temperature range\n    if (/^[0-9]+$/.test(this.options.temperature.reference)) {\n      let yReference = this.getYByXP(0, this.options.temperature.reference);\n      let xTmin = this.inclinationTan * yReference;\n      let deltaT =\n      (this.temperatureBottomRight - this.temperatureBottomLeft) /\n      this.width;\n      this.temperatureBottomLeft += deltaT * xTmin;\n      this.temperatureBottomRight += deltaT * xTmin;\n    }\n  }\n}\naddEventFunctions(CoordinateSystem.prototype);\nexport default CoordinateSystem;","/**\n * @module meteoJS/thermodynamicDiagram/coordinateSystem/stueveDiagram\n */\n\nimport CoordinateSystem from '../CoordinateSystem.js';\n\nconst k = 0.2857;\n\n/**\n * Coordinate system for a Stüve-Diagram. Straight lines:\n * * pressure/isobars (horizontal)\n * * temperature/isotherms (vertical)\n * * potential temperature/dry adiabats\n * \n * y-Axes in exponential Scale: p^k (k = 0.2857), thus dry adiabats are\n * straight lines (M. K. Yau and R. R. Rogers, Short Course in Cloud Physics,\n * Third Edition, published by Butterworth-Heinemann, pp. 8).\n * \n * @see {@link https://en.wikipedia.org/wiki/St%C3%BCve_diagram}\n * @extends module:meteoJS/thermodynamicDiagram/coordinateSystem.CoordinateSystem\n */\nexport class StueveDiagram extends CoordinateSystem {\n\n  /**\n   * @inheritdoc\n   */\n  constructor({\n    width = 100,\n    height = 100,\n    pressure = {},\n    temperature = {}\n  } = {}) {\n    // vertical isotherms\n    temperature.inclinationAngle = 0;\n    \n    super({\n      width,\n      height,\n      pressure,\n      temperature\n    });\n  }\n  \n  /**\n   * @inheritdoc\n   */\n  isDryAdiabatStraightLine() {\n    return true;\n  }\n\n  /**\n   * @inheritdoc\n   */\n  getPByXY(x, y) {\n    return Math.pow(\n      Math.pow(this.options.pressure.max, k) -\n      y *\n      (Math.pow(this.options.pressure.max, k) -\n       Math.pow(this.options.pressure.min, k)) /\n      this.height,\n      1/k);\n  }\n\n  /**\n   * @inheritdoc\n   */\n  getYByXP(x, p) {\n    return this.height *\n    (Math.pow(this.options.pressure.max, k) - Math.pow(p, k)) /\n    (Math.pow(this.options.pressure.max, k) -\n     Math.pow(this.options.pressure.min, k));\n  }\n\n  /**\n   * @inheritdoc\n   */\n  getYByXT() {\n    return undefined;\n  }\n\n}\nexport default StueveDiagram;","/**\n * @module meteoJS/thermodynamicDiagram/coordinateSystem/emagram\n */\nimport CoordinateSystem from '../CoordinateSystem.js';\n\n/**\n * Coordinate system for an emagram. This diagram has straight lines:\n * Straight lines:\n * * pressure/isobars (horizontal)\n * * temperature/isotherms (vertical)\n * \n * @see {@link https://en.wikipedia.org/wiki/Emagram}\n * @extends module:meteoJS/thermodynamicDiagram/coordinateSystem.CoordinateSystem\n */\nexport class Emagram extends CoordinateSystem {\n  \n  /**\n   * @inheritdoc\n   */\n  constructor({\n    width = 100,\n    height = 100,\n    pressure = {},\n    temperature = {}\n  } = {}) {\n    // vertical isotherms\n    temperature.inclinationAngle = 0;\n    \n    super({\n      width,\n      height,\n      pressure,\n      temperature\n    });\n  }\n\n}\nexport default Emagram;","/**\n * @module meteoJS/thermodynamicDiagram/coordinateSystem/skewTlogPDiagram\n */\nimport CoordinateSystem from '../CoordinateSystem.js';\n\n/**\n * Coordinate system for a skew-T-log-P diagram. This diagram has straight lines:\n * * pressure/isobars (horizontal)\n * * temperature/isotherms (normally 45 degree inclination to the right)\n * \n * @extends module:meteoJS/thermodynamicDiagram/coordinateSystem.CoordinateSystem\n */\nexport class SkewTlogPDiagram extends CoordinateSystem {\n}\nexport default SkewTlogPDiagram;","/**\n * @module meteoJS/thermodynamicDiagram/plotArea\n */\nimport addEventFunctions from '../Events.js';\nimport { SVG } from '@svgdotjs/svg.js';\n\n/**\n * Event with a sounding object.\n * \n * @typedef {Object} module:meteoJS/thermodynamicDiagram/plotArea~backgroundEvent\n * @property {external:SVG} node\n *   SVG node which contains the background nodes.\n */\n\n/**\n * Fired before creating the background.\n * \n * @event module:meteoJS/thermodynamicDiagram/plotArea#prebuild:background\n * @type {module:meteoJS/thermodynamicDiagram/plotArea~backgroundEvent}\n */\n\n/**\n * Fired after creating the background.\n * \n * @event module:meteoJS/thermodynamicDiagram/plotArea#postbuild:background\n * @type {module:meteoJS/thermodynamicDiagram/plotArea~backgroundEvent}\n */\n\n/**\n * Object passed on events.\n * \n * @typedef {external:Event} module:meteoJS/thermodynamicDiagram/plotArea~event\n * @property {number} elementX - X coordinate.\n * @property {number} elementY - Y coordinate.\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/plotArea#click\n * @type {module:meteoJS/thermodynamicDiagram/plotArea~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/plotArea#dblclick\n * @type {module:meteoJS/thermodynamicDiagram/plotArea~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/plotArea#mousedown\n * @type {module:meteoJS/thermodynamicDiagram/plotArea~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/plotArea#mouseup\n * @type {module:meteoJS/thermodynamicDiagram/plotArea~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/plotArea#mouseover\n * @type {module:meteoJS/thermodynamicDiagram/plotArea~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/plotArea#mouseout\n * @type {module:meteoJS/thermodynamicDiagram/plotArea~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/plotArea#mousemove\n * @type {module:meteoJS/thermodynamicDiagram/plotArea~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/plotArea#touchstart\n * @type {module:meteoJS/thermodynamicDiagram/plotArea~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/plotArea#touchmove\n * @type {module:meteoJS/thermodynamicDiagram/plotArea~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/plotArea#touchleave\n * @type {module:meteoJS/thermodynamicDiagram/plotArea~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/plotArea#touchend\n * @type {module:meteoJS/thermodynamicDiagram/plotArea~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/plotArea#touchcancel\n * @type {module:meteoJS/thermodynamicDiagram/plotArea~event}\n */\n\n/**\n * Events options. On event a\n * {@link module:meteoJS/thermodynamicDiagram/plotArea~event}\n * is passed to the listener.\n * \n * @typedef {Object} module:meteoJS/thermodynamicDiagram/plotArea~eventsOptions\n * @property {Function} [click] - Click listener.\n * @property {Function} [dblclick] - Dblclick listener.\n * @property {Function} [mousedown] - Mousedown listener.\n * @property {Function} [mouseup] - Mouseup listener.\n * @property {Function} [mouseover] - Mouseover listener.\n * @property {Function} [mouseout] - Mouseout listener.\n * @property {Function} [mousemove] - Mousemove listener.\n * @property {Function} [touchstart] - Touchstart listener.\n * @property {Function} [touchmove] - Touchmove listener.\n * @property {Function} [touchleave] - Touchleave listener.\n * @property {Function} [touchend] - Touchend listener.\n * @property {Function} [touchcancel] - Touchcancel listener.\n */\n\n/**\n * Options for the constructor.\n * \n * @typedef {Object} module:meteoJS/thermodynamicDiagram/plotArea~options\n * @param {external:SVG} [svgNode] - SVG Node.\n * @property {module:meteoJS/thermodynamicDiagram/coordinateSystem.CoordinateSystem}\n *   [coordinateSystem] - Coordinate system.\n * @param {integer} [x=0] - X.\n * @param {integer} [y=0] - Y.\n * @param {integer} [width=100] - Width.\n * @param {integer} [height=100] - Height.\n * @param {Object} [style] - SVG-Style for this Area. Default: overflow=hidden.\n * @param {boolean} [visible=true] - Visibility.\n * @param {module:meteoJS/thermodynamicDiagram/plotArea~eventsOptions}\n *   [events] - Events.\n */\n\n/**\n * Abstract class to define an area on the SVG.\n * \n * <pre><code>import PlotArea from 'meteojs/thermodynamicDiagram/PlotArea';</code></pre>\n * \n * @fires module:meteoJS/thermodynamicDiagram/plotArea#change:visible\n * @fires module:meteoJS/thermodynamicDiagram/plotArea#change:position\n * @fires module:meteoJS/thermodynamicDiagram/plotArea#change:extent\n * @fires module:meteoJS/thermodynamicDiagram/plotArea#prebuild:background\n * @fires module:meteoJS/thermodynamicDiagram/plotArea#postbuild:background\n * @fires module:meteoJS/thermodynamicDiagram/plotArea#click\n * @fires module:meteoJS/thermodynamicDiagram/plotArea#dblclick\n * @fires module:meteoJS/thermodynamicDiagram/plotArea#mousedown\n * @fires module:meteoJS/thermodynamicDiagram/plotArea#mouseup\n * @fires module:meteoJS/thermodynamicDiagram/plotArea#mouseover\n * @fires module:meteoJS/thermodynamicDiagram/plotArea#mouseout\n * @fires module:meteoJS/thermodynamicDiagram/plotArea#mousemove\n * @fires module:meteoJS/thermodynamicDiagram/plotArea#touchstart\n * @fires module:meteoJS/thermodynamicDiagram/plotArea#touchmove\n * @fires module:meteoJS/thermodynamicDiagram/plotArea#touchleave\n * @fires module:meteoJS/thermodynamicDiagram/plotArea#touchend\n * @fires module:meteoJS/thermodynamicDiagram/plotArea#touchcancel\n */\nexport class PlotArea {\n  \n  /**\n   * @param {module:meteoJS/thermodynamicDiagram/plotArea~options}\n   *   options - Options.\n   */\n  constructor({\n    svgNode = undefined,\n    coordinateSystem = undefined,\n    x = 0,\n    y = 0,\n    width = 100,\n    height = 100,\n    style = {},\n    visible = true,\n    events = {}\n  } = {}) {\n    /**\n     * @type external:SVG\n     * @private\n     */\n    this._svgNode = SVG()\n      .attr({\n        x,\n        y,\n        width,\n        height\n      })\n      .css(this._getNormalizedStyle(style))\n      .css('display', visible ? 'inline' : 'none');\n    if (svgNode !== undefined)\n      this.addTo(svgNode);\n    \n    /**\n     * @type external:SVG\n     * @private\n     */\n    this._svgNodeBackground = this._svgNode.group();\n    \n    /**\n     * @type boolean\n     * @private\n     */\n    this._visible = visible;\n    \n    /**\n     * @type module:meteoJS/thermodynamicDiagram/coordinateSystem.CoordinateSystem\n     * @private\n     */\n    this._coordinateSystem = coordinateSystem;\n    \n    /**\n     * @type mixed\n     * @private\n     */\n    this._coordinateSystemListenerKey = (this._coordinateSystem !== undefined)\n      ? this._coordinateSystem\n        .on('change:options', () => this.onCoordinateSystemChange())\n      : undefined;\n    \n    this.on('change:extent', () => this.onCoordinateSystemChange());\n    \n    this._initEvents(events);\n  }\n  \n  /**\n   * SVG container node.\n   * \n   * @type external:SVG\n   * @public\n   * @readonly\n   */\n  get svgNode() {\n    return this._svgNode;\n  }\n  \n  /**\n   * Visibility of the area.\n   * \n   * @type boolean\n   * @public\n   */\n  get visible() {\n    return this._visible;\n  }\n  set visible(visible) {\n    let oldVisible = this._visible;\n    this._visible = visible;\n    if (oldVisible != this._visible) {\n      this._svgNode.style('display', this._visible ? 'inline' : 'none');\n      this.trigger('change:visible');\n    }\n  }\n  \n  /**\n   * X of the top-left edge.\n   * \n   * @type integer\n   * @public\n   */\n  get x() {\n    return this._svgNode.attr('x');\n  }\n  set x(x) {\n    this._svgNode.attr({ x });\n    this.trigger('change:position');\n  }\n  \n  /**\n   * Y of the top-left edge.\n   * \n   * @type integer\n   * @public\n   */\n  get y() {\n    return this._svgNode.attr('y');\n  }\n  set y(y) {\n    this._svgNode.attr({ y });\n    this.trigger('change:position');\n  }\n  \n  /**\n   * Width of the area.\n   * \n   * @type integer\n   * @public\n   */\n  get width() {\n    return this._svgNode.attr('width');\n  }\n  set width(width) {\n    this._svgNode.attr({ width });\n    this.trigger('change:extent');\n  }\n  \n  /**\n   * Height of the area.\n   * \n   * @type integer\n   * @public\n   */\n  get height() {\n    return this._svgNode.attr('height');\n  }\n  set height(height) {\n    this._svgNode.attr({ height });\n    this.trigger('change:extent');\n  }\n  \n  /**\n   * Overflow-style of the area.\n   * \n   * @type string\n   * @public\n   */\n  get style() {\n    return this._svgNode.css();\n  }\n  set style(style) {\n    this._svgNode.css(style);\n  }\n  \n  /**\n   * Coordinate system.\n   * \n   * @type module:meteoJS/thermodynamicDiagram/coordinateSystem.CoordinateSystem\n   * @public\n   */\n  get coordinateSystem() {\n    return this._coordinateSystem;\n  }\n  set coordinateSystem(coordinateSystem) {\n    if (this._coordinateSystemListenerKey !== undefined)\n      this._coordinateSystem\n        .un('change:options', this._coordinateSystemListenerKey);\n    this._coordinateSystem = coordinateSystem;\n    this._coordinateSystemListenerKey =\n      this._coordinateSystem\n        .on('change:options', () => this.onCoordinateSystemChange());\n    this.onCoordinateSystemChange();\n  }\n  \n  /**\n   * Minimal extent length (either width or height).\n   * \n   * @type integer\n   * @readonly\n   */\n  get minExtentLength() {\n    return Math.min(this.width, this.height);\n  }\n  \n  /**\n   * Maximal extent length (either width or height).\n   * \n   * @type integer\n   * @readonly\n   */\n  get maxExtentLength() {\n    return Math.max(this.width, this.height);\n  }\n  \n  /**\n   * Sets the plot area as a child of the argument.\n   * \n   * @param {external:SVG} svgNode - SVG node.\n   */\n  addTo(svgNode) {\n    this._svgNode.addTo(svgNode);\n  }\n  \n  /**\n   * Init the area.\n   * \n   * @protected\n   */\n  init() {\n    this.onCoordinateSystemChange();\n  }\n  \n  /**\n   * Called, when the coordinateSystem object changes.\n   * \n   * @protected\n   */\n  onCoordinateSystemChange() {\n    if (this._coordinateSystem !== undefined)\n      this.drawBackground(this._svgNodeBackground);\n  }\n  \n  /**\n   * Draw background into SVG group.\n   * \n   * This method is only called, when this.coordinateSystem isn't undefined.\n   * \n   * @param {external:SVG} svgNode - SVG group, SVG.G.\n   * @protected\n   */\n  drawBackground(svgNode) {\n    svgNode.clear();\n    this.trigger('prebuild:background', { node: svgNode });\n    this._drawBackground(svgNode);\n    this.trigger('postbuild:background', { node: svgNode });\n  }\n  \n  /**\n   * Method to inherit from child classes to draw the background of the plot\n   * area.\n   * \n   * This method is only called, when this.coordinateSystem isn't undefined.\n   * \n   * @param {external:SVG} svgNode - SVG group, SVG.G.\n   * @protected\n   */\n  _drawBackground() {}\n  \n  /**\n   * Returns normalized SVG style.\n   * \n   * @private\n   * @param {Object} style - Input SVG style.\n   * @param {string} [style.overflow='hidden'] - Overflow style.\n   * @returns {Object} - SVG style.\n   */\n  _getNormalizedStyle({\n    overflow = 'hidden'\n  }) {\n    return {\n      overflow\n    };\n  }\n  \n  /**\n   * Initialize events.\n   * \n   * @param {Object} options - Options.\n   * @private\n   */\n  _initEvents({\n    click = undefined,\n    dblclick = undefined,\n    mousedown = undefined,\n    mouseup = undefined,\n    mouseover = undefined,\n    mouseout = undefined,\n    mousemove = undefined,\n    touchstart = undefined,\n    touchmove = undefined,\n    touchleave = undefined,\n    touchend = undefined,\n    touchcancel = undefined\n  }) {\n    const events = {\n      click,\n      dblclick,\n      mousedown,\n      mouseup,\n      mouseover,\n      mouseout,\n      mousemove,\n      touchstart,\n      touchmove,\n      touchleave,\n      touchend,\n      touchcancel\n    };\n    Object.keys(events).forEach(eventKey => {\n      this._svgNode.on(eventKey, e => {\n        const customEvent =\n          this.getExtendedEvent(e,\n            this._svgNode.point(\n              e.pageX - window.pageXOffset,\n              e.pageY - window.pageYOffset));\n        if (events[eventKey] !== undefined)\n          events[eventKey].call(this, customEvent);\n        this.trigger(eventKey, customEvent);\n      });\n    });\n  }\n  \n  /**\n   * Extend an event with some properties.\n   * \n   * @param {external:Event} e - Event.\n   * @param {external:SVG} p - Point.\n   * @protected\n   */\n  getExtendedEvent(e, p) {\n    e.elementX = p.x;\n    e.elementY = p.y;\n    return e;\n  }\n}\naddEventFunctions(PlotArea.prototype);\nexport default PlotArea;","/**\n * @module meteoJS/thermodynamicDiagram/plotDataArea\n */\nimport PlotArea from './PlotArea.js';\n\n/**\n * Event with a sounding object.\n * \n * @typedef {Object} module:meteoJS/thermodynamicDiagram/plotDataArea~soundingEvent\n * @property {module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding}\n *   sounding - Sounding.\n */\n\n/**\n * Fired on adding a sounding.\n * \n * @event module:meteoJS/thermodynamicDiagram/plotDataArea#add:sounding\n * @type {module:meteoJS/thermodynamicDiagram/plotDataArea~soundingEvent}\n */\n\n/**\n * Fired on removing a sounding.\n * \n * @event module:meteoJS/thermodynamicDiagram/plotDataArea#remove:sounding\n * @type {module:meteoJS/thermodynamicDiagram/plotDataArea~soundingEvent}\n */\n\n/**\n * Event with a sounding object and its SVG node.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram/plotDataArea~soundingEvent}\n *   module:meteoJS/thermodynamicDiagram/plotDataArea~insertSoundingEvent\n * @property {external:SVG} node - SVG node, SVG.G.\n */\n\n/**\n * Fired before inserting the sounding data into the svg.\n * \n * @event module:meteoJS/thermodynamicDiagram/plotDataArea#preinsert:sounding\n * @type {module:meteoJS/thermodynamicDiagram/plotDataArea~insertSoundingEvent}\n */\n\n/**\n * Fired after inserting the sounding data into the svg.\n * \n * @event module:meteoJS/thermodynamicDiagram/plotDataArea#postinsert:sounding\n * @type {module:meteoJS/thermodynamicDiagram/plotDataArea~insertSoundingEvent}\n */\n\n/**\n * Function to insert labels.\n * \n * @typedef {Function}\n *   module:meteoJS/thermodynamicDiagram/plotDataArea~insertLabelsFunc\n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding}\n *   sounding - Diagram sounding to label.\n * @param {module:meteoJS/sounding~levelData} levelData - Data to label.\n * @param {external:SVG} group - SVG group to insert labels.\n */\n\n/**\n * Getter for the levelData of a certain DiagramSounding according to an event.\n * \n * @typedef {Function}\n *   module:meteoJS/thermodynamicDiagram/plotDataArea~getLevelData\n * @param {Object} options - Options.\n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding}\n *   options.hoverLabelsSounding\n *   For this sounding, the hover labels are shown.\n * @param {module:meteoJS/thermodynamicDiagram/plotArea~event} options.e\n *   This event raised the display of hover labels.\n * @param {undefined|number} options.maxDistance\n *   Maximum distance to a data point to show a hover label in pixels.\n *   If undefined, always a hover label to the nearest point is shown.\n * @returns {module:meteoJS/sounding~levelData}\n *   The data to show in the label. This data is passed to\n *   {@link module:meteoJS/thermodynamicDiagram/plotDataArea~insertLabelsFunc}.\n */\n\n/**\n * For the returned sounding, the hover labels are shown. As input all\n * currently visible soundings are passed.\n * \n * @typedef {Function}\n *   module:meteoJS/thermodynamicDiagram/plotDataArea~getHoverSounding\n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding[]}\n *   soundings - Currently visible soundings. Array length is always at least 1.\n * @returns {undefined|module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding}\n *   For this returned sounding, the hover labels are shown. No hover labes are\n *   shown, if undefined is returned.\n */\n\n/**\n * Options for labels on hovering the plot area.\n * \n * @typedef {Object}\n *   module:meteoJS/thermodynamicDiagram/plotDataArea~hoverLabelsOptions\n * @property {boolean} [visible=true] - Visibility.\n * @property {string} [type='mousemove'] - Event type.\n * @property {number} [maxDistance=undefined]\n *   Maximum distance to a data point to show a hover label in pixels.\n *   If undefined, always a hover label to the nearest point is shown.\n * @property {boolean} [remote=true]\n *   Show labels relative to the mouse position on the diagram, even when the\n *   pointer isn't directly on the plot area.\n * @property {module:meteoJS/thermodynamicDiagram/plotDataArea~insertLabelsFunc}\n *   [insertLabelsFunc] - Called to insert labels into a SVG group.\n * @property {module:meteoJS/thermodynamicDiagram/plotDataArea~getLevelData}\n *   [getLevelData] - .\n * @property {module:meteoJS/thermodynamicDiagram/plotDataArea~getHoverSounding}\n *   [getHoverSounding] - Default: Return the first sounding of the\n *   passed input array.\n */\n\n/**\n * Visibility of the sounding in an area.\n * \n * @typedef {Function}\n *   module:meteoJS/thermodynamicDiagram/plotDataArea~getSoundingVisibility\n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding}\n *   sounding - Sounding to determine its visibility.\n * @returns {boolean} Visibility.\n */\n\n/**\n * Returns x and y coordinates in the Plot-Area for the passed levelData.\n * \n * @typedef {Function}\n *   module:meteoJS/thermodynamicDiagram/plotDataArea~getCoordinatesByLevelData\n * @param {string} dataGroupId - Data group id.\n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding}\n *   sounding - Corresponding sounding.\n * @param {module:meteoJS/sounding~levelData}\n *   levelData - Level data of the sounding.\n * @param {module:meteoJS/thermodynamicDiagram/plotDataArea.PlotDataArea}\n *   plotArea - Plot-Area.\n * @returns {Object} - Containing x and y.\n */\n\n/**\n * Draws data into a SVG node.\n * \n * @typedef {Function}\n *   module:meteoJS/thermodynamicDiagram/plotDataArea~insertDataGroupInto\n * @param {external:SVG} svgNode - Insert sounding data into this SVG node.\n * @param {string} dataGroupId - Data group id.\n * @param {module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding}\n *   sounding - Corresponding sounding.\n * @param {Object[]}\n *   data - Data of the sounding, containing x and y coordinates and levelData.\n * @param {module:meteoJS/thermodynamicDiagram/plotDataArea.PlotDataArea}\n *   plotArea - Plot-Area.\n */\n\n/**\n * Filter data point before drawing.\n * \n * @typedef {Function}\n *   module:meteoJS/thermodynamicDiagram/plotDataArea~filterDataPoint\n * @param {Object} pointData - Point data.\n * @param {module:meteoJS/sounding~levelData} pointData.levelData - Level data.\n * @param {number} pointData.x - x coordinate of the data point.\n * @param {nmber} pointData.y - y coordinate of the data point.\n * @param {Object} lastPointData - Data of the last point.\n * @param {module:meteoJS/sounding~levelData} [lastPointData.levelData]\n *   Level data of the last point.\n * @param {number} [lastPointData.x] - x coordinate of the last data point.\n * @param {nmber} [lastPointData.y] - y coordinate of the last data point.\n */\n\n/**\n * Options for the constructor.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram/plotArea~options}\n *   module:meteoJS/thermodynamicDiagram/plotDataArea~options\n * @property {module:meteoJS/thermodynamicDiagram/plotDataArea~hoverLabelsOptions}\n *   [hoverLabels] - Hover labels options.\n * @param {module:meteoJS/thermodynamicDiagram/plotDataArea~getSoundingVisibility} [getSoundingVisibility]\n *   Takes a sounding object and returns the visibility for the area.\n * @param {string[]} [dataGroupIds=[]] - IDs of several grouped datas.\n * @param {module:meteoJS/thermodynamicDiagram/plotDataArea~getCoordinatesByLevelData}\n *   [getCoordinatesByLevelData] - Coordinate function.\n * @param {module:meteoJS/thermodynamicDiagram/plotDataArea~insertDataGroupInto}\n *   [insertDataGroupInto] - SVG drawing function.\n * @param {undefined|module:meteoJS/thermodynamicDiagram/plotDataArea~filterDataPoint}\n *   [filterDataPoint] - Function to filter data points, that shouldn't be\n *   plotted. If undefined, no data point is filtered\n *   (expect minDataPointsDistance is set).\n * @param {number} [minDataPointsDistance=0]\n *   Minimum distance between data points in pixels. If filterDataPoint is set,\n *   minDataPointsDistance is ignored.\n */\n\n/**\n * Abstract class to define an area on the SVG with sounding data.\n * \n * <pre><code>import PlotDataArea from 'meteojs/thermodynamicDiagram/PlotDataArea';</code></pre>\n * \n * @extends module:meteoJS/thermodynamicDiagram/plotArea.PlotArea\n * \n * @fires module:meteoJS/thermodynamicDiagram/plotDataArea#add:sounding\n * @fires module:meteoJS/thermodynamicDiagram/plotDataArea#remove:sounding\n * @fires module:meteoJS/thermodynamicDiagram/plotDataArea#prebuild:sounding\n * @fires module:meteoJS/thermodynamicDiagram/plotDataArea#postbuild:sounding\n */\nexport class PlotDataArea extends PlotArea {\n  \n  /**\n   * @param {module:meteoJS/thermodynamicDiagram/plotDataArea~options}\n   *   options - Options.\n   */\n  constructor({\n    svgNode = undefined,\n    coordinateSystem = undefined,\n    x = 0,\n    y = 0,\n    width = 100,\n    height = 100,\n    style = {},\n    visible = true,\n    events = {},\n    hoverLabels = {},\n    getSoundingVisibility = sounding => sounding.visible,\n    dataGroupIds = [],\n    getCoordinatesByLevelData = () => { return { x: undefined, y: undefined }; },\n    insertDataGroupInto = () => {},\n    filterDataPoint = undefined,\n    minDataPointsDistance = 0\n  } = {}) {\n    super({\n      svgNode,\n      coordinateSystem,\n      x,\n      y,\n      width,\n      height,\n      style,\n      visible,\n      events\n    });\n    \n    /**\n     * @type Function\n     * @private\n     */\n    this._getSoundingVisibility = getSoundingVisibility;\n    \n    /**\n     * @type string[]\n     * @private\n     */\n    this._dataGroupIds = dataGroupIds;\n    \n    /**\n     * @type module:meteoJS/thermodynamicDiagram/plotDataArea~getCoordinatesByLevelData\n     * @private\n     */\n    this._getCoordinatesByLevelData = getCoordinatesByLevelData;\n    \n    /**\n     * @type module:meteoJS/thermodynamicDiagram/plotDataArea~insertDataGroupInto\n     * @private\n     */\n    this._insertDataGroupInto = insertDataGroupInto;\n    \n    /**\n     * @type undefined|module:meteoJS/thermodynamicDiagram/plotDataArea~filterDataPoint\n     * @private\n     */\n    this._filterDataPoint = filterDataPoint;\n    \n    /**\n     * @type number\n     * @private\n     */\n    this._minDataPointsDistance = minDataPointsDistance;\n    \n    /**\n     * @type external:SVG\n     * @private\n     */\n    this._svgNodeData = this.svgNode.group();\n    \n    /**\n     * Contains all soundings to draw as key. The value-object contains 3 items:\n     * group (SVG), listenerKeyVisible, listenerKeyOptions.\n     * \n     * @type Map.<module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding,Object>\n     * @private\n     */\n    this._soundings = new Map();\n    \n    /**\n     * @type external:SVG\n     * @private\n     */\n    this._hoverLabelsGroup = this.svgNode.group();\n\n    /**\n     * @type module:meteoJS/thermodynamicDiagram/plotDataArea~getHoverSounding\n     * @private\n     */\n    this._getHoverSounding; // Will be set inside _initHoverLabels()\n    \n    this._initHoverLabels(hoverLabels);\n  }\n  \n  /**\n   * Groups of different data to plot onto the plot area.\n   * \n   * @type string[]\n   * @readonly\n   */\n  get dataGroupIds() {\n    return this._dataGroupIds;\n  }\n  \n  /**\n   * Returns x and y coordinated of some sounding data.\n   * \n   * @type module:meteoJS/thermodynamicDiagram/plotDataArea~getCoordinatesByLevelData\n   * @readonly\n   */\n  get getCoordinatesByLevelData() {\n    return this._getCoordinatesByLevelData;\n  }\n  \n  /**\n   * Minimum distance between data points in pixels.\n   * \n   * @type number\n   */\n  get minDataPointsDistance() {\n    return this._minDataPointsDistance;\n  }\n  set minDataPointsDistance(minDataPointsDistance) {\n    const oldValue = this._minDataPointsDistance;\n    this._minDataPointsDistance = minDataPointsDistance;\n    \n    if (oldValue != this._minDataPointsDistance)\n      this.drawSoundings();\n  }\n  \n  /**\n   * The current sounding, for which hover labels should be shown.\n   * \n   * @type undefined|module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding\n   * @readonly\n   * @private\n   */\n  get hoverLabelsSounding() {\n    const soundings = [];\n    for (let sounding of this._soundings.keys()) {\n      if (this._getSoundingVisibility(sounding))\n        soundings.push(sounding);\n    }\n    if (soundings.length > 0)\n      return this._getHoverSounding(soundings);\n    return undefined;\n  }\n  \n  /**\n   * Adds a sounding to draw into the area.\n   * \n   * @param {module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding}\n   *   sounding - Sounding object.\n   */\n  addSounding(sounding) {\n    let group = this._svgNodeData.group();\n    let listenerKeyVisible = sounding.on('change:visible',\n      () => this.onChangeSoundingVisibility(sounding, group));\n    let listenerKeyOptions = sounding.on('change:options', () => {\n      if (this.coordinateSystem !== undefined)\n        this.drawSounding(sounding, group);\n      this.onChangeSoundingVisibility(sounding, group);\n    });\n    this._soundings.set(sounding, {\n      group,\n      listenerKeyVisible,\n      listenerKeyOptions\n    });\n    this.trigger('add:sounding', sounding);\n    \n    if (this.coordinateSystem !== undefined)\n      this.drawSounding(sounding, group);\n    /* Don't call onChangeSoundingVisibility here.\n     * This is due to PlotAltitudeDataArea. In this class, hoverLabels will get\n     * invisible, when onChangeSoundingVisibility is called. This is not itended\n     * when the added sounding is invisible. But intended if the sounding is\n     * visible. */\n    this.setDisplayOfSounding(sounding, group);\n  }\n  \n  /**\n   * Removes a sounding from the area.\n   * \n   * @param {module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding}\n   *   sounding - Sounding object.\n   */\n  removeSounding(sounding) {\n    if (this._soundings.has(sounding)) {\n      this._soundings.get(sounding).group.remove();\n      sounding.un(this._soundings.get(sounding).listenerKeyVisible);\n      sounding.un(this._soundings.get(sounding).listenerKeyOptions);\n      this._soundings.delete(sounding);\n    }\n    this.trigger('remove:sounding', sounding);\n  }\n  \n  /**\n   * Called, when the coordinateSystem object changes.\n   * \n   * @override\n   */\n  onCoordinateSystemChange() {\n    super.onCoordinateSystemChange();\n    \n    this.drawSoundings();\n  }\n  \n  /**\n   * Called, when a sounding changes its visibilty.\n   * \n   * @param {module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding}\n   *   sounding - Sounding object.\n   * @param {external:SVG} group - SVG group, SVG.G.\n   * @protected\n   */\n  onChangeSoundingVisibility(sounding, group) {\n    this.setDisplayOfSounding(sounding, group);\n    this._hoverLabelsGroup.clear();\n  }\n  \n  /**\n   * Sets 'display' property of a SVG group of a sounding, depending of the\n   * sounding's visibility.\n   * \n   * @param {module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding}\n   *   sounding - Sounding object.\n   * @param {external:SVG} group - SVG group, SVG.G.\n   * @protected\n   */\n  setDisplayOfSounding(sounding, group) {\n    group.css('display',\n      this._getSoundingVisibility(sounding) ? 'inline' : 'none');\n  }\n  \n  /**\n   * Draws all soundings.\n   * \n   * @protected\n   */\n  drawSoundings() {\n    if (this.coordinateSystem === undefined)\n      return;\n    \n    for (let sounding of this._soundings.keys())\n      this.drawSounding(sounding, this._soundings.get(sounding).group);\n  }\n  \n  /**\n   * Draw the sounding into the SVG group.\n   * \n   * @param {module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding}\n   *   sounding - Sounding object.\n   * @param {external:SVG} group - SVG group, SVG.G.\n   * @protected\n   */\n  drawSounding(sounding, group) {\n    group.clear();\n    \n    this.trigger('preinsert:sounding', { sounding, node: group });\n    \n    const soundingGroup = group.group();\n    \n    let data = {};\n    const filterDataPointFunction = this._getFilterDataPointFunction();\n    let lastLevel = {};\n    sounding.sounding.getLevels().reverse().forEach(pres => {\n      const levelData = sounding.sounding.getData(pres);\n      \n      this._dataGroupIds.forEach(dataGroupId => {\n        if (!(dataGroupId in data))\n          data[dataGroupId] = [];\n        \n        const level = {\n          levelData,\n          x: undefined,\n          y: undefined\n        };\n        const {x, y} =\n          this._getCoordinatesByLevelData(dataGroupId,\n            sounding, level.levelData, this);\n        level.x = x;\n        level.y = y;\n        \n        if (x === undefined ||\n            y === undefined ||\n            filterDataPointFunction !== undefined &&\n            filterDataPointFunction(level, {...lastLevel}))\n          return;\n        \n        lastLevel = level;\n        data[dataGroupId].push(level);\n      });\n    });\n    \n    Object.keys(data).forEach(dataGroupId => {\n      if (data[dataGroupId].length > 0)\n        this._insertDataGroupInto(soundingGroup, dataGroupId,\n          sounding, data[dataGroupId], this);\n    });\n    \n    this.trigger('postinsert:sounding', { sounding, node: group });\n\n    /* Only hide hoverLabels, when Sounding is visible. */\n    if (this._getSoundingVisibility(sounding))\n      this._hoverLabelsGroup.clear();\n  }\n  \n  /**\n   * @private\n   */\n  _getFilterDataPointFunction() {\n    return (this._filterDataPoint === undefined) ?\n      makeFilterDataPointFunction(this._minDataPointsDistance) :\n      this._filterDataPoint;\n  }\n  \n  /**\n   * Initialize hover labels options.\n   * \n   * @param {module:meteoJS/thermodynamicDiagram/plotDataArea~hoverLabelsOptions}\n   *   options - Hover labels options.\n   */\n  _initHoverLabels({\n    visible = true,\n    type = 'mousemove',\n    maxDistance = undefined,\n    insertLabelsFunc = undefined,\n    getLevelData = () => {},\n    getHoverSounding = soundings => soundings.shift()\n  }) {\n    this._getHoverSounding = getHoverSounding;\n\n    if (!visible ||\n        insertLabelsFunc === undefined)\n      return;\n    \n    this.on('change:extent', () => this._hoverLabelsGroup.clear());\n    this.on(type, e => {\n      const hoverLabelsSounding = this.hoverLabelsSounding;\n      if (hoverLabelsSounding === undefined)\n        return;\n\n      insertLabelsFunc(hoverLabelsSounding,\n        getLevelData({ hoverLabelsSounding, e , maxDistance }),\n        this._hoverLabelsGroup);\n    });\n  }\n}\nexport default PlotDataArea;\n\n/**\n * Creates a filterDataPoint function. It filters data points, which doesn't\n * have a minimal distance.\n * \n * @param {number} minDataPointsDistance - Minimal distance.\n * @returns {undefined|module:meteoJS/thermodynamicDiagram/plotDataArea~filterDataPoint}\n *   filterDataPoint function.\n * @private\n */\nfunction makeFilterDataPointFunction(minDataPointsDistance) {\n  if (minDataPointsDistance === 0)\n    return undefined;\n  \n  return ({ x, y }, lastPoint) => {\n    if (lastPoint.x === undefined ||\n        lastPoint.y === undefined) {\n      lastPoint.x = x;\n      lastPoint.y = y;\n      return false;\n    }\n    const distance =\n      Math.sqrt(Math.pow(x - lastPoint.x, 2) + Math.pow(y - lastPoint.y, 2));\n    const result = (distance < minDataPointsDistance);\n    if (!result) {\n      lastPoint.x = x;\n      lastPoint.y = y;\n    }\n    return result;\n  };\n}","/**\n * @module meteoJS/thermodynamicDiagram/plotAltitudeDataArea\n */\nimport PlotDataArea from './PlotDataArea.js';\n\n/**\n * Options for labels on hovering the diagram. Extended by the \"remote\" option.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram/plotDataArea~hoverLabelsOptions}\n *   module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea~hoverLabelsOptions\n * @property {boolean} [remote=true]\n *   Show labels relative to the mouse position on the diagram, even when the\n *   pointer isn't directly on the plot area.\n */\n\n/**\n * Options for the constructor.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram/plotDataArea~options}\n *   module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea~options\n * @property {module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea~hoverLabelsOptions}\n *   [hoverLabels] - Hover labels options.\n */\n\n/**\n * Abstract class to define an area on the SVG with sounding data, plotted with\n * pressure on the y-axis.\n * \n * <pre><code>import PlotAltitudeArea from 'meteojs/thermodynamicDiagram/PlotAltitudeArea';</code></pre>\n * \n * @extends module:meteoJS/thermodynamicDiagram/plotDataArea.PlotDataArea\n */\nexport class PlotAltitudeDataArea extends PlotDataArea {\n  \n  /**\n   * @param {module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea~options}\n   *   options - Options.\n   */\n  constructor({\n    svgNode = undefined,\n    coordinateSystem = undefined,\n    x = 0,\n    y = 0,\n    width = 100,\n    height = 100,\n    style = {},\n    visible = true,\n    events = {},\n    hoverLabels = {},\n    getSoundingVisibility = sounding => sounding.visible,\n    dataGroupIds = undefined,\n    getCoordinatesByLevelData = undefined,\n    insertDataGroupInto = undefined,\n    filterDataPoint = undefined,\n    minDataPointsDistance = 0\n  } = {}) {\n    super({\n      svgNode,\n      coordinateSystem,\n      x,\n      y,\n      width,\n      height,\n      style,\n      visible,\n      events,\n      hoverLabels,\n      getSoundingVisibility,\n      dataGroupIds,\n      getCoordinatesByLevelData,\n      insertDataGroupInto,\n      filterDataPoint,\n      minDataPointsDistance\n    });\n    \n    /**\n     * @type boolean\n     * @private\n     */\n    this._isHoverLabelsRemote;\n  }\n  \n  /**\n   * Extend an event with pressure.\n   * \n   * @override\n   */\n  getExtendedEvent(e, p) {\n    e = super.getExtendedEvent(e, p);\n    \n    e.diagramPres = undefined;\n    if (this.coordinateSystem !== undefined)\n      e.diagramPres =\n        this.coordinateSystem.getPByXY(0,\n          this.coordinateSystem.height - e.elementY);\n    \n    return e;\n  }\n  \n  /**\n   * Show also hover labels when mouse isn't over the area.\n   * \n   * @type boolean\n   * @readonly\n   */\n  get isHoverLabelsRemote() {\n    return this._isHoverLabelsRemote;\n  }\n  \n  /**\n   * Initialize hover labels options.\n   * \n   * @param {module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea~hoverLabelsOptions}\n   *   options - Hover labels options.\n   * @override\n   */\n  _initHoverLabels({\n    visible = true,\n    type = 'mousemove',\n    maxDistance = undefined,\n    remote = true,\n    insertLabelsFunc = undefined,\n    getLevelData = ({ hoverLabelsSounding, e }) => {\n      if (!e.diagramPres)\n        return {};\n      const sounding = hoverLabelsSounding.sounding;\n      return sounding.getData(sounding.getNearestLevel(e.diagramPres));\n    }\n  }) {\n    this._isHoverLabelsRemote = remote;\n\n    super._initHoverLabels({\n      visible,\n      type,\n      maxDistance,\n      insertLabelsFunc,\n      getLevelData\n    });\n  }\n}\nexport default PlotAltitudeDataArea;","/**\n * @module meteoJS/thermodynamicDiagram/tdDiagram\n */\nimport {\n  tempCelsiusToKelvin,\n  tempKelvinToCelsius,\n  potentialTempByTempAndPres,\n  saturationHMRByTempAndPres,\n  lclByPotentialTempAndHMR,\n  lclTemperatureByTempAndDewpoint,\n  equiPotentialTempByTempAndDewpointAndPres,\n  wetbulbTempByTempAndDewpointAndPres,\n  altitudeISAByPres\n} from '../calc.js';\nimport {\n  getNormalizedLineStyleOptions,\n  getNormalizedFontOptions,\n  getFirstDefinedValue,\n  drawTextInto\n} from './Functions.js';\nimport PlotAltitudeDataArea from './PlotAltitudeDataArea.js';\n\n/**\n * Object passed on events.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram/plotArea~event}\n *   module:meteoJS/thermodynamicDiagram/tdDiagram~event\n * @property {number} p - Pressure coordinate [hPa].\n * @property {number} T - Temperature coordinate [K].\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/tdDiagram#click\n * @type {module:meteoJS/thermodynamicDiagram/tdDiagram~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/tdDiagram#dblclick\n * @type {module:meteoJS/thermodynamicDiagram/tdDiagram~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/tdDiagram#mousedown\n * @type {module:meteoJS/thermodynamicDiagram/tdDiagram~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/tdDiagram#mouseup\n * @type {module:meteoJS/thermodynamicDiagram/tdDiagram~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/tdDiagram#mouseover\n * @type {module:meteoJS/thermodynamicDiagram/tdDiagram~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/tdDiagram#mouseout\n * @type {module:meteoJS/thermodynamicDiagram/tdDiagram~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/tdDiagram#mousemove\n * @type {module:meteoJS/thermodynamicDiagram/tdDiagram~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/tdDiagram#touchstart\n * @type {module:meteoJS/thermodynamicDiagram/tdDiagram~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/tdDiagram#touchmove\n * @type {module:meteoJS/thermodynamicDiagram/tdDiagram~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/tdDiagram#touchleave\n * @type {module:meteoJS/thermodynamicDiagram/tdDiagram~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/tdDiagram#touchend\n * @type {module:meteoJS/thermodynamicDiagram/tdDiagram~event}\n */\n\n/**\n * @event module:meteoJS/thermodynamicDiagram/tdDiagram#touchcancel\n * @type {module:meteoJS/thermodynamicDiagram/tdDiagram~event}\n */\n\n/**\n * Options for pressure label.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram~lineTextOptions}\n *   module:meteoJS/thermodynamicDiagram/tdDiagram~presLabelOptions\n * @property {string|Object} [fill]\n *   Fill option for background rect. Default is 'white' with opacity 0.7.\n * @property {number} [horizontalMargin=5] - Margin in x direction.\n * @property {number} [verticalMargin=0] - Margin in y direction.\n * @property {number|'100%'} [length=60]\n *   Length of the horizontal line. A number is in pixel unit. A string\n *   with a appended '%' indicates a length relative to the diagram width.\n * @property {'left'|'right'} [align='left']\n *   Align pressure label left/right in the diagram.\n */\n\n/**\n * Options for labels.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram~lineTextOptions}\n *   module:meteoJS/thermodynamicDiagram/tdDiagram~labelsOptions\n * @property {string|Object} [fill]\n *   Fill option for background rect. Default is 'white' with opacity 0.7.\n * @property {number} [horizontalMargin=10] - Margin in x direction.\n * @property {number} [verticalMargin=0] - Margin in y direction.\n * @property {number} [radius=undefined] - Radius for hover circle.\n * @property {number} [radiusPlus=2]\n *   Radius relative to line width for hover circle.\n */\n\n/**\n * Options for labels on hovering the thermodynamic diagram.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea~hoverLabelsOptions}\n *   module:meteoJS/thermodynamicDiagram/tdDiagram~hoverLabelsOptions\n * @property {module:meteoJS/thermodynamicDiagram/tdDiagram~presLabelOptions}\n *   [pres] - Options for pressure label.\n * @property {module:meteoJS/thermodynamicDiagram/tdDiagram~labelsOptions}\n *   [temp] - Options for temperature label.\n * @property {module:meteoJS/thermodynamicDiagram/tdDiagram~labelsOptions}\n *   [dewp] - Options for dew point label.\n * @property {module:meteoJS/thermodynamicDiagram/tdDiagram~labelsOptions}\n *   [wetbulb] - Options for wetbulb temperature label.\n */\n\n/**\n * Options for parcels in the diagram.\n * \n * @typedef {Object}\n *   module:meteoJS/thermodynamicDiagram/tdDiagram~parcelsOptions\n * @property {boolean} [visible=true] - Visibility of parcels.\n */\n\n/**\n * Definition of lines in a thermodynamic diagram.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram~lineStyleOptions}\n *   module:meteoJS/thermodynamicDiagram/tdDiagram~linesOptions\n * @property {undefined|Array<number>} [highlightedLines=undefined]\n *   Highlight lines at this values.\n * @property {undefined|Array<number>} [lines=undefined]\n *   Draw values for this values.\n * @property {number} [max=undefined]\n *   Maximum value for a line. Ignored if lines is set.\n * @property {number} [min=undefined]\n *   Minimum value for a line. Ignored if lines is set.\n * @property {number} [interval=undefined]\n *   Interval between different lines. Ignored if lines is set.\n * @property {number} [maxPressure=undefined]\n *   Start line from this maximum pressure.\n * @property {number} [minPressure=undefined]\n *   End line at this minimum pressure.\n */\n\n/**\n * Options for the constructor.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea~options}\n *   module:meteoJS/thermodynamicDiagram/tdDiagram~options\n * @param {module:meteoJS/thermodynamicDiagram/tdDiagram~linesOptions}\n *   [isobars] - Isobars configuration.\n * @param {module:meteoJS/thermodynamicDiagram/tdDiagram~linesOptions}\n *   [isotherms] - Isotherms configuration.\n * @param {module:meteoJS/thermodynamicDiagram/tdDiagram~linesOptions}\n *   [dryadiabats] - Dry adiabats configuration.\n * @param {module:meteoJS/thermodynamicDiagram/tdDiagram~linesOptions}\n *   [pseudoadiabats] - Pseudo adiabats configuration.\n * @param {module:meteoJS/thermodynamicDiagram/tdDiagram~linesOptions}\n *   [mixingratio] - Mixing ratio configuration.\n * @param {module:meteoJS/thermodynamicDiagram/tdDiagram~hoverLabelsOptions}\n *   [hoverLabels] - Hover labels options.\n * @param {module:meteoJS/thermodynamicDiagram/tdDiagram~parcelsOptions}\n *   [parcels] - Parcels options.\n */\n\n/**\n * Class to draw the real thermodynamic diagram.\n * \n * <pre><code>import TDDiagram from 'meteojs/thermodynamicDiagram/TDDiagram';</code></pre>\n * \n * @extends module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea.PlotAltitudeDataArea\n * \n * @fires module:meteoJS/thermodynamicDiagram/tdDiagram#click\n * @fires module:meteoJS/thermodynamicDiagram/tdDiagram#dblclick\n * @fires module:meteoJS/thermodynamicDiagram/tdDiagram#mousedown\n * @fires module:meteoJS/thermodynamicDiagram/tdDiagram#mouseup\n * @fires module:meteoJS/thermodynamicDiagram/tdDiagram#mouseover\n * @fires module:meteoJS/thermodynamicDiagram/tdDiagram#mouseout\n * @fires module:meteoJS/thermodynamicDiagram/tdDiagram#mousemove\n * @fires module:meteoJS/thermodynamicDiagram/tdDiagram#touchstart\n * @fires module:meteoJS/thermodynamicDiagram/tdDiagram#touchmove\n * @fires module:meteoJS/thermodynamicDiagram/tdDiagram#touchleave\n * @fires module:meteoJS/thermodynamicDiagram/tdDiagram#touchend\n * @fires module:meteoJS/thermodynamicDiagram/tdDiagram#touchcancel\n */\nexport class TDDiagram extends PlotAltitudeDataArea {\n  \n  /**\n   * @param {module:meteoJS/thermodynamicDiagram/tdDiagram~linesOptions} [options]\n   *   Options.\n   */\n  constructor({\n    svgNode = undefined,\n    coordinateSystem = undefined,\n    x = 0,\n    y = 0,\n    width = 100,\n    height = 100,\n    style = {},\n    visible = true,\n    events = {},\n    dataGroupIds = ['temp', 'dewp', 'wetbulb'],\n    getCoordinatesByLevelData = (dataGroupId, sounding, levelData, plotArea) => {\n      if (levelData.pres === undefined)\n        return {};\n      \n      let value = undefined;\n      switch (dataGroupId) {\n      case 'temp':\n        value = levelData.tmpk;\n        break;\n      case 'dewp':\n        value = levelData.dwpk;\n        break;\n      case 'wetbulb':\n        value = wetbulbTempByTempAndDewpointAndPres(\n          levelData.tmpk,\n          levelData.dwpk,\n          levelData.pres\n        );\n        break;\n      }\n      if (value === undefined)\n        return {};\n      \n      return {\n        x: plotArea.coordinateSystem.getXByPT(levelData.pres, value),\n        y: plotArea.coordinateSystem.height -\n          plotArea.coordinateSystem.getYByPT(levelData.pres, value),\n        value: Math.round(tempKelvinToCelsius(value)*10)/10,\n        unit: '℃'\n      };\n    },\n    insertDataGroupInto = (svgNode, dataGroupId, sounding, data) => {\n      const options =\n        (dataGroupId in sounding.options.diagram)\n          ? sounding.options.diagram[dataGroupId].style : {};\n      svgNode.group()\n        .polyline(data.map(level => [ level.x, level.y ]))\n        .fill('none').stroke(options);\n    },\n    filterDataPoint = undefined,\n    minDataPointsDistance = 0,\n    isobars = {},\n    isotherms = {},\n    dryadiabats = {},\n    pseudoadiabats = {},\n    mixingratio = {},\n    hoverLabels = {},\n    parcels = {}\n  } = {}) {\n    super({\n      svgNode,\n      coordinateSystem,\n      x,\n      y,\n      width,\n      height,\n      style,\n      visible,\n      events,\n      hoverLabels,\n      getSoundingVisibility:\n        sounding => sounding.visible && sounding.options.diagram.visible,\n      dataGroupIds,\n      getCoordinatesByLevelData,\n      insertDataGroupInto,\n      filterDataPoint,\n      minDataPointsDistance\n    });\n    \n    this.options = {\n      isobars: getNormalizedDiagramLineOptions(isobars),\n      isotherms:\n        getNormalizedDiagramLineOptions(isotherms, {\n          highlightedLines: [tempCelsiusToKelvin(0)]\n        }),\n      dryadiabats:\n        getNormalizedDiagramLineOptions(dryadiabats),\n      pseudoadiabats:\n        getNormalizedDiagramLineOptions(pseudoadiabats, {\n          style: {\n            color: 'rgb(102, 51, 0)',\n            dasharray: 6\n          }\n        }),\n      mixingratio:\n        getNormalizedDiagramLineOptions(mixingratio, {\n          minPressure: 500,\n          style: {\n            color: 'rgb(102, 51, 0)',\n            dasharray: 2\n          }\n        })\n    };\n    \n    this.svgGroups = {\n      border: this._svgNodeBackground.group(),\n      isobars: this._svgNodeBackground.group(),\n      isotherms: this._svgNodeBackground.group(),\n      dryadiabats: this._svgNodeBackground.group(),\n      mixingratio: this._svgNodeBackground.group(),\n      pseudoadiabats: this._svgNodeBackground.group()\n    };\n    \n    /**\n     * @type module:meteoJS/thermodynamicDiagram/tdDiagram~parcelsOptions\n     * @private\n     */\n    this._parcelsOptions = parcels;\n    if (!('visible' in this._parcelsOptions))\n      this._parcelsOptions.visible = true;\n    \n    /**\n     * @typedef {module:meteoJS/thermodynamicDiagram/diagramSounding~parcelsItems}\n     * @property {undefined|external:SVG} parcelsGroup\n     *   SVG Group to plot the parcels.\n     * @property {Map.<module:meteoJS/thermodynamicDiagram/diagramParcel.DiagramParcel,external:SVG>} parcelsGroup\n     *   Pairs of DiagramParcel objects and SVG Group. The parcel is plotted\n     *   into the group. The group is contained in 'parcelsGroup'.\n     * @property {undefined|mixed} addItemListenerKey\n     *   Listener key for the {@link module:meteoJS/base/collection#add:item} event\n     *   on {@link module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding#diagramParcelCollection}\n     *   for each sounding plotted in this diagram.\n     * @property {Object[]} changeVisibleListeners\n     * @property {Object[]} changeOptionsListeners\n     */\n    \n    /**\n     * @type Map.<module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding,module:meteoJS/thermodynamicDiagram/diagramSounding~parcelsItems>\n     * @private\n     */\n    this._parcels = new Map();\n    this.on('add:sounding', sounding => {\n      /** @type module:meteoJS/thermodynamicDiagram/diagramSounding~parcelsItems */\n      const soundingParcelsItems = {\n        parcelsGroup: undefined,\n        parcelsGroups: new Map(),\n        addItemListenerKey: undefined,\n        removeItemListenerKey: undefined,\n        changeVisibleListeners: [],\n        changeOptionsListeners: []\n      };\n      const onAddParcel = diagramParcel => {\n        soundingParcelsItems.changeVisibleListeners.push({\n          diagramParcel,\n          listenerKey: diagramParcel.on('change:visible', () => {\n            if (!soundingParcelsItems.parcelsGroups.has(diagramParcel))\n              return;\n            const group = soundingParcelsItems.parcelsGroups.get(diagramParcel);\n            diagramParcel.visible ? group.show() : group.hide();\n          })\n        });\n        soundingParcelsItems.changeOptionsListeners.push({\n          diagramParcel,\n          listenerKey: diagramParcel.on('change:options', () => {\n            // Delte old parcel\n            const soundingParcelsItems = this._parcels.get(sounding);\n            if (soundingParcelsItems !== undefined) {\n              const group =\n                soundingParcelsItems.parcelsGroups.get(diagramParcel);\n              if (group !== undefined) {\n                soundingParcelsItems.parcelsGroups.delete(diagramParcel);\n                group.remove();\n              }\n            }\n            // Redraw\n            this.drawParcel(sounding, diagramParcel);\n          })\n        });\n      };\n      soundingParcelsItems.addItemListenerKey =\n        sounding.diagramParcelCollection.on('add:item', diagramParcel => {\n          onAddParcel(diagramParcel);\n          this.drawParcel(sounding, diagramParcel);\n        });\n      soundingParcelsItems.removeItemListenerKey =\n        sounding.diagramParcelCollection.on('remove:item', diagramParcel => {\n          const group =\n            soundingParcelsItems.parcelsGroups.get(diagramParcel);\n          if (group !== undefined) {\n            soundingParcelsItems.parcelsGroups.delete(diagramParcel);\n            group.remove();\n          }\n        });\n      for (let diagramParcel of sounding.diagramParcelCollection)\n        onAddParcel(diagramParcel);\n      this._parcels.set(sounding, soundingParcelsItems);\n      /* After this event, {@link module:meteoJS/thermodynamicDiagram/tdDiagram.TDDiagram#drawSounding}\n       * is executed and therefore also\n       * {@link module:meteoJS/thermodynamicDiagram/tdDiagram.TDDiagram#drawParcels}.\n       */\n    });\n    // Remove all listeners on the parcels contained in the removed sounding.\n    this.on('remove:sounding', sounding => {\n      if (this._parcels.has(sounding)) {\n        /** @type module:meteoJS/thermodynamicDiagram/diagramSounding~parcelsItems */\n        const soundingParcelsItems = this._parcels.get(sounding);\n        sounding.diagramParcelCollection\n          .un('add:item', soundingParcelsItems.addItemListenerKey);\n        sounding.diagramParcelCollection\n          .un('remove:item', soundingParcelsItems.removeItemListenerKey);\n        soundingParcelsItems.changeVisibleListeners\n          .forEach(listenerObj =>\n            listenerObj.diagramParcel\n              .un('change:visible', listenerObj.listenerKey));\n        soundingParcelsItems.changeOptionsListeners\n          .forEach(listenerObj =>\n            listenerObj.diagramParcel\n              .un('change:options', listenerObj.listenerKey));\n      }\n      this._parcels.delete(sounding);\n    });\n    \n    this.init();\n  }\n  \n  /**\n   * Return the visibility of the isobars.\n   * @returns {boolean} Visibility of the isobars.\n   * @deprecated\n   */\n  getIsobarsVisible() {\n    return this.options.isobars.visible;\n  }\n  \n  /**\n   * Sets the visibility of the isobars.\n   * @param {boolean} visible Visibility of the isobars.\n   * @returns {module:meteoJS/thermodynamicDiagram/tdDiagram.TDDiagram} this.\n   * @deprecated\n   */\n  setIsobarsVisible(visible) {\n    this.options.isobars.visible = visible ? true : false;\n    this.plotIsobars();\n    return this;\n  }\n  \n  /**\n   * Return the visibility of the isotherms.\n   * @returns {boolean} Visibility of the isotherms.\n   * @deprecated\n   */\n  getIsothermsVisible() {\n    return this.options.isotherms.visible;\n  }\n  \n  /**\n   * Sets the visibility of the isotherms.\n   * @param {boolean} visible Visibility of the isotherms.\n   * @returns {module:meteoJS/thermodynamicDiagram/tdDiagram.TDDiagram} this.\n   * @deprecated\n   */\n  setIsothermsVisible(visible) {\n    this.options.isotherms.visible = visible ? true : false;\n    this.plotIsotherms();\n    return this;\n  }\n  \n  /**\n   * Return the visibility of the dry adiabats.\n   * @returns {boolean} Visibility of the dry adiabats.\n   * @deprecated\n   */\n  getDryadiabatsVisible() {\n    return this.options.dryadiabats.visible;\n  }\n  \n  /**\n   * Sets the visibility of the dry adiabats.\n   * @param {boolean} visible Visibility of the dry adiabats.\n   * @returns {module:meteoJS/thermodynamicDiagram/tdDiagram.TDDiagram} this.\n   * @deprecated\n   */\n  setDryadiabatsVisible(visible) {\n    this.options.dryadiabats.visible = visible ? true : false;\n    this.plotDryadiabats();\n    return this;\n  }\n  \n  /**\n   * Return the visibility of the pseudo adiabats.\n   * @returns {boolean} Visibility of the pseudo adiabats.\n   * @deprecated\n   */\n  getPseudoadiabatsVisible() {\n    return this.options.pseudoadiabats.visible;\n  }\n  \n  /**\n   * Sets the visibility of the pseudo adiabats.\n   * @param {boolean} visible Visibility of the pseudo adiabats.\n   * @returns {module:meteoJS/thermodynamicDiagram/tdDiagram.TDDiagram} this.\n   * @deprecated\n   */\n  setPseudoadiabatsVisible(visible) {\n    this.options.pseudoadiabats.visible = visible ? true : false;\n    this.plotPseudoadiabats();\n    return this;\n  }\n  \n  /**\n   * Return the visibility of the mixing ratio.\n   * @returns {boolean} Visibility of the mixing ratio.\n   * @deprecated\n   */\n  getMixingratioVisible() {\n    return this.options.mixingratio.visible;\n  }\n  \n  /**\n   * Sets the visibility of the mixing ratio.\n   * @param {boolean} visible Visibility of the mixing ratio.\n   * @returns {module:meteoJS/thermodynamicDiagram/tdDiagram.TDDiagram} this.\n   * @deprecated\n   */\n  setMixingratioVisible(visible) {\n    this.options.mixingratio.visible = visible ? true : false;\n    this.plotMixingratio();\n    return this;\n  }\n  \n  /**\n   * Draw the sounding into the SVG group.\n   * \n   * @override\n   */\n  drawSounding(sounding, group) {\n    super.drawSounding(sounding, group);\n    \n    // Draw parcels\n    if (this._parcels.has(sounding)) {\n      let parcelsObj = this._parcels.get(sounding);\n      parcelsObj.parcelsGroup = group.group();\n      if (!sounding.options.parcels.visible)\n        parcelsObj.parcelsGroup.hide();\n      this._parcels.set(sounding, parcelsObj);\n    }\n    this.drawParcels(sounding);\n  }\n  \n  /**\n   * Draws parcels of a sounding.\n   * \n   * @param {module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding}\n   *   sounding - Sounding.\n   */\n  drawParcels(sounding) {\n    if (!this._parcelsOptions.visible)\n      return;\n    if (!this._parcels.has(sounding))\n      return;\n    \n    /** @type module:meteoJS/thermodynamicDiagram/diagramSounding~parcelsItems */\n    const soundingParcelsItems = this._parcels.get(sounding);\n    soundingParcelsItems.parcelsGroup.clear();\n    soundingParcelsItems.parcelsGroups.clear();\n    for (let diagramParcel of sounding.diagramParcelCollection)\n      this.drawParcel(sounding, diagramParcel);\n  }\n  \n  /**\n   * Draws a parcel.\n   * \n   * @param {module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding}\n   *   diagramSounding - DiagramSounding object, which contains the parcel.\n   * @param {module:meteoJS/thermodynamicDiagram/diagramParcel.DiagramParcel}\n   *   diagramParcel - Parcel lift to draw.\n   * @param {external:SVG} group - SVG group to draw parcel into.\n   * @private\n   */\n  drawParcel(diagramSounding, diagramParcel) {\n    const parcel = diagramParcel.parcel;\n    if (parcel.pres === undefined ||\n        parcel.tmpc === undefined ||\n        parcel.dwpc === undefined)\n      return;\n    if (!this._parcels.has(diagramSounding))\n      return;\n    const soundingParcelsItems = this._parcels.get(diagramSounding);\n    const group = soundingParcelsItems.parcelsGroup.group();\n    soundingParcelsItems.parcelsGroups.set(diagramParcel, group);\n    this._parcels.set(diagramSounding, soundingParcelsItems);\n    \n    const pottmpk =\n      potentialTempByTempAndPres(tempCelsiusToKelvin(parcel.tmpc), parcel.pres);\n    const hmr =\n      saturationHMRByTempAndPres(tempCelsiusToKelvin(parcel.dwpc), parcel.pres);\n    const lclpres = lclByPotentialTempAndHMR(pottmpk, hmr);\n    const lcltmpk = lclTemperatureByTempAndDewpoint(\n      tempCelsiusToKelvin(parcel.tmpc),\n      tempCelsiusToKelvin(parcel.dwpc));\n    const lclthetaek = equiPotentialTempByTempAndDewpointAndPres(\n      lcltmpk, lcltmpk, lclpres);\n    \n    const options = diagramParcel.options;\n    \n    // SVG groups\n    if (!options.visible)\n      group.hide();\n    const tempGroup = group.group();\n    if (!options.temp.visible)\n      tempGroup.hide();\n    let dewpGroup = group.group();\n    if (!options.dewp.visible)\n      dewpGroup.hide();\n    \n    // Draw temp curve\n    const yInterval = 10;\n    const y0 = this.coordinateSystem\n      .getYByPT(parcel.pres, tempCelsiusToKelvin(parcel.tmpc));\n    const x0 = this.coordinateSystem.getXByYPotentialTemperature(y0, pottmpk);\n    const y1 = this.coordinateSystem.getYByPPotentialTemperatur(lclpres, pottmpk);\n    const x1 = this.coordinateSystem.getXByYPotentialTemperature(y1, pottmpk);\n    let tempPolyline = [[x0, y0]];\n    if (!this.coordinateSystem.isDryAdiabatStraightLine())\n      for (let y=y0+yInterval; y<y1; y+=yInterval) {\n        tempPolyline.push([\n          this.coordinateSystem.getXByYPotentialTemperature(y, pottmpk),\n          y\n        ]);\n      }\n    tempPolyline.push([x1, y1]);\n    const y2 = this.coordinateSystem.height;\n    const x2 = this.coordinateSystem.getXByYEquiPotTemp(y2, lclthetaek);\n    for (let y=y1+yInterval; y<y2; y+=yInterval) {\n      tempPolyline.push([\n        this.coordinateSystem.getXByYEquiPotTemp(y, lclthetaek),\n        y\n      ]);\n    }\n    tempPolyline.push([x2, y2]);\n    tempGroup\n      .polyline(tempPolyline.map(point => {\n        point[1] = this.coordinateSystem.height - point[1];\n        return point;\n      }))\n      .fill('none')\n      .stroke(options.temp.style);\n    \n    // Draw mixing ratio curve\n    const x0dwp = this.coordinateSystem.getXByYHMR(y0, hmr);\n    const x1dwp = this.coordinateSystem.getXByYHMR(y1, hmr);\n    let dewpPolyline = [[x0dwp, y0]];\n    for (let y=y0+yInterval; y<y1; y+=yInterval) {\n      dewpPolyline.push([\n        this.coordinateSystem.getXByYHMR(y, hmr),\n        y\n      ]);\n    }\n    dewpPolyline.push([x1dwp, y1]);\n    dewpGroup\n      .polyline(dewpPolyline.map(point => {\n        point[1] = this.coordinateSystem.height - point[1];\n        return point;\n      }))\n      .fill('none')\n      .stroke(options.dewp.style);\n  }\n  \n  /**\n   * Draw background into SVG group.\n   * \n   * @override\n   */\n  _drawBackground(svgNode) {\n    super._drawBackground(svgNode);\n    \n    this.svgGroups = {\n      border: svgNode.group(),\n      isobars: svgNode.group(),\n      isotherms: svgNode.group(),\n      dryadiabats: svgNode.group(),\n      mixingratio: svgNode.group(),\n      pseudoadiabats: svgNode.group()\n    };\n    \n    // Rand des Diagramms\n    this.svgGroups.border.clear();\n    this.svgGroups.border\n      .rect(this.coordinateSystem.width, this.coordinateSystem.height)\n      .attr({stroke: 'black', 'stroke-width': 1, 'fill-opacity': 0});\n    \n    // Hilfelinien zeichnen\n    this.plotIsobars(true);\n    this.plotIsotherms(true);\n    this.plotDryadiabats(true);\n    this.plotPseudoadiabats(true);\n    this.plotMixingratio(true);\n  }\n   \n  /**\n   * @private\n   */\n  plotIsobars(redraw) {\n    let min = this.coordinateSystem.getPByXY(0, this.coordinateSystem.height);\n    let max = this.coordinateSystem.getPByXY(0, 0);\n    let delta = max - min;\n    this._plotLines(\n      this.svgGroups.isobars,\n      this.options.isobars,\n      {\n        min: min,\n        max: max,\n        interval: (delta > 500) ? 100 : (delta > 50) ? 10 : 1\n      },\n      p => {\n        let y = this.coordinateSystem.getYByXP(0, p);\n        return [[0, y], [this.coordinateSystem.width, y]];\n      },\n      redraw\n    );\n  }\n  \n  /**\n   * @private\n   */\n  plotIsotherms(redraw) {\n    let min = tempKelvinToCelsius(\n      this.coordinateSystem.getTByXY(0, this.coordinateSystem.height));\n    let max = tempKelvinToCelsius(\n      this.coordinateSystem.getTByXY(this.coordinateSystem.width, 0));\n    let delta = max - min;\n    this._plotLines(\n      this.svgGroups.isotherms,\n      this.options.isotherms,\n      {\n        min: min,\n        max: max,\n        interval: (delta > 50) ? 10 : 5\n      },\n      T => {\n        T = tempCelsiusToKelvin(T);\n        let result = [[undefined, undefined], [undefined, undefined]];\n        if (this.coordinateSystem.isIsothermsVertical()) {\n          result[0][1] = 0;\n          result[1][1] = this.coordinateSystem.height;\n          result[0][0] = result[1][0] = this.coordinateSystem.getXByYT(result[0][1], T);\n        }\n        else {\n          result[0][1] = 0;\n          result[0][0] = this.coordinateSystem.getXByYT(result[0][1], T);\n          if (result[0][0] < 0)\n            result[0][1] = this.coordinateSystem.getYByXT(result[0][0] = 0, T);\n          result[1][0] = this.coordinateSystem.width;\n          result[1][1] = this.coordinateSystem.getYByXT(result[1][0], T);\n          if (result[1][1] === undefined) {\n            result[1][0] = result[0][0];\n            result[1][1] = this.coordinateSystem.height;\n          }\n          else if (result[1][1] > this.coordinateSystem.height) {\n            result[1][1] = this.coordinateSystem.height;\n            result[1][0] = this.coordinateSystem.getXByYT(result[1][1], T);\n          }\n        }\n        return result;\n      },\n      redraw\n    );\n  }\n  \n  /**\n   * @private\n   */\n  plotDryadiabats(redraw) {\n    this._plotLines(\n      this.svgGroups.dryadiabats,\n      this.options.dryadiabats,\n      {\n        min: tempKelvinToCelsius(\n          potentialTempByTempAndPres(\n            this.coordinateSystem.getTByXY(0, 0),\n            this.coordinateSystem.getPByXY(0, 0))),\n        max: tempKelvinToCelsius(\n          potentialTempByTempAndPres(\n            this.coordinateSystem.getTByXY(this.coordinateSystem.width, this.coordinateSystem.height),\n            this.coordinateSystem.getPByXY(this.coordinateSystem.width, this.coordinateSystem.height))),\n        interval: 10\n      },\n      T => {\n        let TKelvin = tempCelsiusToKelvin(T);\n        let y0 = 0;\n        let x0 = this.coordinateSystem.getXByYPotentialTemperature(y0, TKelvin);\n        if (x0 === undefined ||\n          x0 > this.coordinateSystem.width) {\n          x0 = this.coordinateSystem.width;\n          y0 = this.coordinateSystem.getYByXPotentialTemperature(x0, TKelvin);\n        }\n        let x1 = 0;\n        let y1 = this.coordinateSystem.getYByXPotentialTemperature(x1, TKelvin);\n        if (y1 === undefined ||\n          y1 > this.coordinateSystem.height) {\n          y1 = this.coordinateSystem.height;\n          x1 = this.coordinateSystem.getXByYPotentialTemperature(y1, TKelvin);\n        }\n        if (x0 === undefined ||\n          y0 === undefined ||\n          x1 === undefined ||\n          y1 === undefined)\n          return undefined;\n        if (this.coordinateSystem.isDryAdiabatStraightLine()) {\n          return [[x0, y0], [x1, y1]];\n        }\n        else {\n          let points = [[x0, y0]];\n          let yInterval = 10;\n          for (let y=y0+yInterval; y<y1; y+=yInterval) {\n            points.push([\n              this.coordinateSystem.getXByYPotentialTemperature(y, TKelvin),\n              y\n            ]);\n          }\n          points.push([x1, y1]);\n          return points;\n        }\n      },\n      redraw\n    );\n  }\n  \n  /**\n   * @private\n   */\n  plotPseudoadiabats(redraw) {\n    this._plotLines(\n      this.svgGroups.pseudoadiabats,\n      this.options.pseudoadiabats,\n      {\n        lines: [-18, -5, 10, 30, 60, 110, 180]\n      },\n      thetae => {\n        let thetaeKelvin = tempCelsiusToKelvin(thetae);\n        const y0 =\n          Math.max(\n            0,\n            (this.options.pseudoadiabats.maxPressure === undefined)\n              ? 0\n              : this.coordinateSystem.getYByPEquiPotTemp(\n                this.options.pseudoadiabats.maxPressure, thetaeKelvin)\n          );\n        const x0 = this.coordinateSystem.getXByYEquiPotTemp(y0, thetaeKelvin);\n        const y1 =\n          Math.min(\n            this.coordinateSystem.height,\n            (this.options.pseudoadiabats.minPressure === undefined)\n              ? this.coordinateSystem.height\n              : this.coordinateSystem.getYByPEquiPotTemp(\n                this.options.pseudoadiabats.minPressure, thetaeKelvin)\n          );\n        const x1 = this.coordinateSystem.getXByYEquiPotTemp(y1, thetaeKelvin);\n        let points = [[x0, y0]];\n        let yInterval = 10;\n        for (let y=y0+yInterval; y<y1; y+=yInterval) {\n          points.push([\n            this.coordinateSystem.getXByYEquiPotTemp(y, thetaeKelvin),\n            y\n          ]);\n        }\n        points.push([x1, y1]);\n        return points;\n      },\n      redraw\n    );\n  }\n  \n  /**\n   * @private\n   */\n  plotMixingratio(redraw) {\n    this._plotLines(\n      this.svgGroups.mixingratio,\n      this.options.mixingratio,\n      {\n        lines: [0.01, 0.1, 1, 2, 4, 7, 10, 16, 21, 32, 40]\n      },\n      hmr => {\n        const y0 =\n          Math.max(\n            0,\n            (this.options.mixingratio.maxPressure === undefined)\n              ? 0\n              : this.coordinateSystem.getYByPHMR(\n                this.options.mixingratio.maxPressure, hmr)\n          );\n        const x0 = this.coordinateSystem.getXByYHMR(y0, hmr);\n        const y1 =\n          Math.min(\n            this.coordinateSystem.height,\n            (this.options.mixingratio.minPressure === undefined)\n              ? this.coordinateSystem.height\n              : this.coordinateSystem.getYByPHMR(\n                this.options.mixingratio.minPressure, hmr)\n          );\n        const x1 = this.coordinateSystem.getXByYHMR(y1, hmr);\n        let points = [[x0, y0]];\n        const yInterval = 10;\n        for (let y=y0+yInterval; y<y1; y+=yInterval) {\n          points.push([\n            this.coordinateSystem.getXByYHMR(y, hmr),\n            y\n          ]);\n        }\n        points.push([x1, y1]);\n        return points;\n      },\n      redraw\n    );\n  }\n  \n  /**\n   * @private\n   */\n  _plotLines(node, options, valuesOptions, pointsFunc, redraw) {\n    options.visible\n      ? node.show()\n      : node.hide();\n    if (!redraw)\n      return;\n    node.clear();\n    let lines = [];\n    if (options.lines !== undefined)\n      lines = options.lines;\n    else if (options.min === undefined &&\n           options.max === undefined &&\n           options.interval === undefined &&\n           valuesOptions.lines !== undefined)\n      lines = valuesOptions.lines;\n    else {\n      if (options.min !== undefined)\n        valuesOptions.min = options.min;\n      if (options.max !== undefined)\n        valuesOptions.max = options.max;\n      let interval = options.interval;\n      if (interval === undefined)\n        interval = valuesOptions.interval;\n      let start = Math.ceil(valuesOptions.min/interval)*interval;\n      let end = Math.floor(valuesOptions.max/interval)*interval;\n      for (let v=start; v<=end; v+=interval) {\n        lines.push(v);\n      }\n    }\n    let highlightLineWidth = 3;\n    if (options.style.width !== undefined)\n      highlightLineWidth = options.style.width+2;\n    lines.forEach(function (v) {\n      let points = pointsFunc.call(this, v);\n      let line = (points.length == 2) ?\n        node.line(points[0][0], this.coordinateSystem.height-points[0][1],\n          points[1][0], this.coordinateSystem.height-points[1][1])\n          .stroke(options.style) :\n        node.polyline(points.map(function (point) {\n          point[1] = this.coordinateSystem.height - point[1];\n          return point;\n        }, this))\n          .fill('none').stroke(options.style);\n      if (options.highlightedLines !== undefined)\n        options.highlightedLines.forEach(function (vHighlight) {\n          if (v == vHighlight)\n            line.stroke({width: highlightLineWidth});\n        }, this);\n    }, this);\n  }\n  \n  /**\n   * Extend an event with temperature and pressure.\n   * \n   * @override\n   */\n  getExtendedEvent(e, p) {\n    e = super.getExtendedEvent(e, p);\n    e.diagramTmpk =\n      this.coordinateSystem.getTByXY(e.elementX,\n        this.coordinateSystem.height - e.elementY);\n    return e;\n  }\n  \n  /**\n   * Initialize hover labels options.\n   * \n   * @param {module:meteoJS/thermodynamicDiagram/tdDiagram~hoverLabelsOptions}\n   *   options - Hover labels options.\n   * @override\n   */\n  _initHoverLabels({\n    visible = true,\n    type = 'mousemove',\n    maxDistance = undefined,\n    remote = true,\n    insertLabelsFunc = undefined,\n    pres = {},\n    temp = {},\n    dewp = {},\n    wetbulb = {}\n  }) {\n    pres.length = ('length' in pres) ? pres.length : 60;\n    pres.align = ('align' in pres) ? pres.align : 'left';\n    if (!('visible' in pres))\n      pres.visible = true;\n    if (!('style' in pres))\n      pres.style = {};\n    pres.font = getNormalizedFontOptions(pres.font, {\n      anchor: (pres.align == 'right') ? 'end' : 'start'\n    });\n    if (!('fill' in pres))\n      pres.fill = {};\n    if (pres.fill.opacity === undefined)\n      pres.fill.opacity = 0.7;\n    if (pres.horizontalMargin === undefined)\n      pres.horizontalMargin = 5;\n    \n    if (!('visible' in temp))\n      temp.visible = true;\n    if (!('style' in temp))\n      temp.style = {};\n    temp.font = getNormalizedFontOptions(temp.font, {\n      anchor: 'start',\n      'alignment-baseline': 'bottom'\n    });\n    if (!('fill' in temp))\n      temp.fill = {};\n    if (temp.fill.opacity === undefined)\n      temp.fill.opacity = 0.7;\n    temp.radius = ('radius' in temp) ? temp.radius : undefined;\n    temp.radiusPlus = ('radiusPlus' in temp) ? temp.radiusPlus : 2;\n    if (temp.horizontalMargin === undefined)\n      temp.horizontalMargin = 10;\n    \n    if (!('visible' in dewp))\n      dewp.visible = true;\n    if (!('style' in dewp))\n      dewp.style = {};\n    dewp.font = getNormalizedFontOptions(dewp.font, {\n      anchor: 'end',\n      'alignment-baseline': 'bottom'\n    });\n    if (!('fill' in dewp))\n      dewp.fill = {};\n    if (dewp.fill.opacity === undefined)\n      dewp.fill.opacity = 0.7;\n    dewp.radius = ('radius' in dewp) ? dewp.radius : undefined;\n    dewp.radiusPlus = ('radiusPlus' in dewp) ? dewp.radiusPlus : 2;\n    if (dewp.horizontalMargin === undefined)\n      dewp.horizontalMargin = 10;\n    \n    if (!('visible' in wetbulb))\n      wetbulb.visible = true;\n    if (!('style' in wetbulb))\n      wetbulb.style = {};\n    wetbulb.font = getNormalizedFontOptions(wetbulb.font, {\n      anchor: 'middle'\n    });\n    if (!('fill' in wetbulb))\n      wetbulb.fill = {};\n    if (wetbulb.fill.opacity === undefined)\n      wetbulb.fill.opacity = 0.7;\n    wetbulb.radius = ('radius' in wetbulb) ? wetbulb.radius : undefined;\n    wetbulb.radiusPlus = ('radiusPlus' in wetbulb) ? wetbulb.radiusPlus : 2;\n    if (wetbulb.verticalMargin === undefined)\n      wetbulb.verticalMargin = 10;\n    \n    if (insertLabelsFunc === undefined)\n      insertLabelsFunc =\n        this._makeInsertLabelsFunc(pres, temp, dewp, wetbulb);\n    \n    super._initHoverLabels({\n      visible,\n      type,\n      maxDistance,\n      remote,\n      insertLabelsFunc\n    });\n  }\n  \n  /**\n   * Makes a default insertLabelsFunc.\n   * \n   * @param {Object} pres\n   * @param {Object} temp\n   * @param {Object} dewp\n   * @param {Object} wetbulb\n   * @private\n   */\n  _makeInsertLabelsFunc(pres, temp, dewp, wetbulb) {\n    return (sounding, levelData, group) => {\n      group.clear();\n      \n      if (levelData.pres === undefined)\n        return;\n      \n      if (pres.visible)\n        drawPressureHoverLabelInto(group, levelData, this.coordinateSystem, pres);\n      \n      this.dataGroupIds.reverse().forEach(dataGroupId => {\n        let labelOptions = {\n          visible: false\n        };\n        switch (dataGroupId) {\n        case 'temp': labelOptions = temp; break;\n        case 'dewp': labelOptions = dewp; break;\n        case 'wetbulb': labelOptions = wetbulb; break;\n        }\n        if (!labelOptions.visible)\n          return;\n        \n        const { x, y, value, unit } =\n          this._getCoordinatesByLevelData(dataGroupId,\n            sounding, levelData, this);\n        if (x === undefined ||\n            y === undefined)\n          return;\n        \n        const lineWidth =\n          (dataGroupId in this.hoverLabelsSounding.options.diagram)\n            ? this.hoverLabelsSounding.options.diagram[dataGroupId].style.width\n            : 3;\n        const radius = (labelOptions.radius === undefined)\n          ? lineWidth + labelOptions.radiusPlus\n          : labelOptions.radius;\n        const fillOptions = labelOptions.style;\n        if (!('color' in fillOptions) &&\n            (dataGroupId in this.hoverLabelsSounding.options.diagram))\n          fillOptions.color = sounding.options.diagram[dataGroupId].style.color;\n        group\n          .circle(2 * radius)\n          .attr({ cx: x, cy: y })\n          .fill(fillOptions);\n        drawTextInto({\n          node: group,\n          text: `${value} ${unit}`,\n          x,\n          y,\n          horizontalMargin: labelOptions.horizontalMargin,\n          verticalMargin: labelOptions.verticalMargin,\n          font: labelOptions.font,\n          fill: labelOptions.fill\n        });\n      });\n    };\n  }\n}\nexport default TDDiagram;\n\n/**\n * Draws pressure hover label.\n * \n * @param {external:SVG} svgNode - SVG node to draw into.\n * @param {number} pres - Pressure.\n * @param {module:meteoJS/thermodynamicDiagram/coordinateSystem.CoordinateSystem}\n *   coordinateSystem - Coordinate system.\n * @param {module:meteoJS/thermodynamicDiagram/tdDiagram~presLabelOptions}\n *   [options] - Options.\n */\nexport function drawPressureHoverLabelInto(svgNode, levelData, coordinateSystem, {\n  length = 60,\n  align = 'left',\n  horizontalMargin = undefined,\n  verticalMargin = undefined,\n  style = {},\n  font = {},\n  fill = {}\n} = {}) {\n  let x0 = 0;\n  let x1 = length;\n  const match = /^([0-9]+)%$/.exec(x1);\n  if (match)\n    x1 = match[1] / 100 * coordinateSystem.width;\n  if (align == 'right') {\n    x0 = coordinateSystem.width;\n    x1 = coordinateSystem.width - x1;\n  }\n  const y = coordinateSystem.height -\n    coordinateSystem.getYByXP(0, levelData.pres);\n  style = getNormalizedLineStyleOptions(style);\n  svgNode\n    .line([\n      [Math.min(x0, x1), y],\n      [Math.max(x0, x1), y]\n    ])\n    .stroke(style);\n  font = getNormalizedFontOptions(font);\n  font['alignment-baseline'] = 'bottom';\n  drawTextInto({\n    node: svgNode,\n    text: `${Math.round(levelData.pres)} hPa`,\n    x: x0,\n    y,\n    horizontalMargin,\n    verticalMargin,\n    font,\n    fill\n  });\n  \n  font['alignment-baseline'] = 'top';\n  let hghtStr = (levelData.hght === undefined)\n    ? `~${Math.round(altitudeISAByPres(levelData.pres))} m`\n    : `${Math.round(levelData.hght)} m`;\n  drawTextInto({\n    node: svgNode,\n    text: hghtStr,\n    x: x0,\n    y: y,\n    horizontalMargin,\n    verticalMargin,\n    font,\n    fill\n  });\n}\n\nfunction getNormalizedDiagramLineOptions({\n  highlightedLines = undefined,\n  interval = undefined,\n  lines = undefined,\n  max = undefined,\n  min = undefined,\n  maxPressure = undefined,\n  minPressure = undefined,\n  style = undefined,\n  visible = undefined\n}, defaults = {}) {\n  return {\n    highlightedLines: getFirstDefinedValue(highlightedLines, defaults.highlightedLines),\n    interval: getFirstDefinedValue(interval, defaults.interval),\n    lines: getFirstDefinedValue(lines, defaults.lines),\n    max: getFirstDefinedValue(max, defaults.max),\n    min: getFirstDefinedValue(min, defaults.min),\n    maxPressure: getFirstDefinedValue(maxPressure, defaults.maxPressure),\n    minPressure: getFirstDefinedValue(minPressure, defaults.minPressure),\n    style: getNormalizedLineStyleOptions(style, defaults.style),\n    visible: getFirstDefinedValue(visible, defaults.visible, true)\n  };\n}","/**\n * @module meteoJS/thermodynamicDiagram/windbarbsProfile\n */\nimport { drawWindbarbInto } from './Functions.js';\nimport PlotAltitudeDataArea from './PlotAltitudeDataArea.js';\n\n/**\n * Options for the constructor.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea~options}\n *   module:meteoJS/thermodynamicDiagram/windbarbsProfile~options\n * @param {number} [windbarbLength]\n *   Length of windbarbs. Default is 40% of the Plot-Area width.\n * @param {number} [minDataPointsDistance]\n *   Minimum distance between data points in pixels. If filterDataPoint is set,\n *   minDataPointsDistance is ignored. If undefined, then minDataPointsDistance\n *   is set to the half of windbarbLength.\n */\n\n/**\n * Class to draw the profile with windbarbs.\n * \n * <pre><code>import WindbarbsProfile from 'meteojs/thermodynamicDiagram/WindbarbsProfile';</code></pre>\n * \n * @extends module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea.PlotAltitudeDataArea\n */\nexport class WindbarbsProfile extends PlotAltitudeDataArea {\n  \n  /**\n   * @param {module:meteoJS/thermodynamicDiagram/windbarbsProfile~options}\n   *   options - Options.\n   */\n  constructor({\n    svgNode = undefined,\n    coordinateSystem = undefined,\n    x = undefined,\n    y = undefined,\n    width = undefined,\n    height = undefined,\n    style = {},\n    visible = true,\n    events = {},\n    hoverLabels = {},\n    windbarbLength = undefined,\n    dataGroupIds = ['windbarbs'],\n    getCoordinatesByLevelData = (dataGroupId, sounding, levelData, plotArea) => {\n      if (levelData.pres === undefined ||\n          levelData.wspd === undefined ||\n          levelData.wdir === undefined)\n        return {};\n      \n      return {\n        x: plotArea.width / 2,\n        y: plotArea.coordinateSystem.height -\n          plotArea.coordinateSystem.getYByXP(0, levelData.pres)\n      };\n    },\n    insertDataGroupInto = (svgNode, dataGroupId, sounding, data, plotArea) => {\n      data.forEach(windbarbData => {\n        drawWindbarbInto({\n          node: svgNode,\n          x: plotArea.width/2,\n          y: windbarbData.y,\n          wspd: windbarbData.levelData.wspd,\n          wdir: windbarbData.levelData.wdir,\n          length: plotArea._windbarbLength,\n          strokeStyle: sounding.options.windprofile.windbarbs.style\n        });\n      });\n    },\n    filterDataPoint = undefined,\n    minDataPointsDistance = undefined\n  }) {\n    super({\n      svgNode,\n      coordinateSystem,\n      x,\n      y,\n      width,\n      height,\n      style,\n      visible,\n      events,\n      hoverLabels,\n      getSoundingVisibility:\n        sounding => sounding.visible && sounding.options.windprofile.windbarbs.visible,\n      dataGroupIds,\n      getCoordinatesByLevelData,\n      insertDataGroupInto,\n      filterDataPoint,\n      minDataPointsDistance:\n        (minDataPointsDistance === undefined) ? 0 : minDataPointsDistance\n    });\n    \n    /**\n     * @type number\n     * @private\n     */\n    this._windbarbLength = windbarbLength;\n    if (this._windbarbLength === undefined)\n      this._windbarbLength = this.width * 2/5;\n    \n    if (minDataPointsDistance === undefined)\n      this.minDataPointsDistance = this._windbarbLength / 2;\n    \n    this.init();\n  }\n}\nexport default WindbarbsProfile;","/**\n * @module meteoJS/thermodynamicDiagram/windspeedProfile\n */\nimport {\n  windspeedMSToKN,\n  windspeedKNToMS\n} from '../calc.js';\nimport {\n  getNormalizedFontOptions,\n  drawTextInto\n} from './Functions.js';\nimport PlotAltitudeDataArea from './PlotAltitudeDataArea.js';\n\n/**\n * Options for labels on hovering the windspeed profile.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea~hoverLabelsOptions}\n *   module:meteoJS/thermodynamicDiagram/windspeedProfile~hoverLabelsOptions\n * @property {module:meteoJS/thermodynamicDiagram/tdDiagram~labelsOptions}\n *   [windspeed] - Options for windspeed label.\n * @param {number} [windspeedMax=41.67]\n *   The maximum visible windspeed [m/s].\n */\n\n/**\n * Options for the constructor.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea~options}\n *   module:meteoJS/thermodynamicDiagram/windspeedProfile~options\n */\n\n/**\n * Class to draw windspeed profiles.\n * \n * <pre><code>import WindspeedProfile from 'meteojs/thermodynamicDiagram/WindspeedProfile';</code></pre>\n * \n * @extends module:meteoJS/thermodynamicDiagram/plotAltitudeDataArea.PlotAltitudeDataArea\n */\nexport class WindspeedProfile extends PlotAltitudeDataArea {\n  \n  /**\n   * @param {module:meteoJS/thermodynamicDiagram/windspeedProfile~options} options\n   *   Options.\n   */\n  constructor({\n    svgNode = undefined,\n    coordinateSystem = undefined,\n    x = undefined,\n    y = undefined,\n    width = undefined,\n    height = undefined,\n    style = {},\n    visible = true,\n    events = {},\n    hoverLabels = {},\n    windspeedMax = windspeedKNToMS(150),\n    dataGroupIds = ['windspeed'],\n    getCoordinatesByLevelData = (dataGroupId, sounding, levelData, plotArea) => {\n      if (levelData.pres === undefined ||\n          levelData.wspd === undefined)\n        return {};\n      \n      return {\n        x: plotArea.width * levelData.wspd / windspeedMax,\n        y: plotArea.coordinateSystem.height -\n          plotArea.coordinateSystem.getYByXP(0, levelData.pres)\n      };\n    },\n    insertDataGroupInto = (svgNode, dataGroupId, sounding, data) => {\n      svgNode\n        .polyline(data.map(level => [ level.x, level.y ]))\n        .fill('none')\n        .stroke(sounding.options.windprofile.windspeed.style);\n    },\n    filterDataPoint = undefined,\n    minDataPointsDistance = 0\n  }) {\n    super({\n      svgNode,\n      coordinateSystem,\n      x,\n      y,\n      width,\n      height,\n      style,\n      visible,\n      events,\n      hoverLabels,\n      getSoundingVisibility:\n        sounding => sounding.visible && sounding.options.windprofile.windspeed.visible,\n      dataGroupIds,\n      getCoordinatesByLevelData,\n      insertDataGroupInto,\n      filterDataPoint,\n      minDataPointsDistance\n    });\n    \n    this.init();\n  }\n  \n  /**\n   * Draw background into SVG group.\n   * \n   * @override\n   */\n  _drawBackground(svgNode) {\n    super._drawBackground(svgNode);\n    \n    svgNode\n      .line(0, 0, 0, this.height)\n      .stroke({color: 'black', width: 1});\n    svgNode\n      .line(this.width, 0, this.width, this.height)\n      .stroke({color: 'black', width: 1});\n  }\n  \n  /**\n   * Initialize hover labels options.\n   * \n   * @param {module:meteoJS/thermodynamicDiagram/windspeedProfile~hoverLabelsOptions}\n   *   options - Hover labels options.\n   * @override\n   */\n  _initHoverLabels({\n    visible = true,\n    type = 'mousemove',\n    maxDistance = undefined,\n    remote = true,\n    insertLabelsFunc = undefined,\n    windspeed = {}\n  }) {\n    if (!('visible' in windspeed))\n      windspeed.visible = true;\n    if (!('style' in windspeed))\n      windspeed.style = {};\n    windspeed.font = getNormalizedFontOptions(windspeed.font, {\n      anchor: 'end',\n      'alignment-baseline': 'bottom'\n    });\n    if (!('fill' in windspeed))\n      windspeed.fill = {};\n    if (windspeed.fill.opacity === undefined)\n      windspeed.fill.opacity = 0.7;\n    windspeed.radius = ('radius' in windspeed) ? windspeed.radius : undefined;\n    windspeed.radiusPlus =\n      ('radiusPlus' in windspeed) ? windspeed.radiusPlus : 2;\n    if (windspeed.horizontalMargin === undefined)\n      windspeed.horizontalMargin = 10;\n    \n    if (insertLabelsFunc === undefined)\n      insertLabelsFunc = this._makeInsertLabelsFunc(windspeed);\n    \n    super._initHoverLabels({\n      visible,\n      type,\n      maxDistance,\n      remote,\n      insertLabelsFunc\n    });\n  }\n  \n  /**\n   * Makes a default insertLabelsFunc.\n   * \n   * @param {Object} windspeed\n   * @private\n   */\n  _makeInsertLabelsFunc(windspeed) {\n    return (sounding, levelData, group) => {\n      group.clear();\n      \n      if (levelData.pres === undefined)\n        return;\n      \n      if (!windspeed.visible ||\n          levelData.wspd === undefined)\n        return;\n      \n      const { x, y } =\n        this._getCoordinatesByLevelData('windspeed',\n          sounding, levelData, this);\n      if (x === undefined ||\n          y === undefined)\n        return;\n      \n      const radius = (windspeed.radius === undefined)\n        ? this.hoverLabelsSounding.options.windprofile.windspeed.style.width / 2 +\n          windspeed.radiusPlus\n        : windspeed.radius;\n      const fillOptions = windspeed.style;\n      if (!('color' in fillOptions))\n        fillOptions.color = sounding.options.windprofile.windspeed.style.color;\n      const font = {...windspeed.font};\n      if (font.anchor == 'start' &&\n          this.width - x < 45)\n        font.anchor = 'end';\n      if (font.anchor == 'end' &&\n          x < 45)\n        font.anchor = 'start';\n      if (font['alignment-baseline'] == 'bottom' &&\n          y < font.size * 5/4)\n        font['alignment-baseline'] = 'top';\n      if (font['alignment-baseline'] == 'top' &&\n          this.height - y < font.size * 5/4)\n        font['alignment-baseline'] = 'bottom';\n      group\n        .circle(2 * radius)\n        .attr({ cx: x, cy: y })\n        .fill(fillOptions);\n      drawTextInto({\n        node: group,\n        text: `${Math.round(windspeedMSToKN(levelData.wspd)*10)/10} kn`,\n        x,\n        y,\n        horizontalMargin: windspeed.horizontalMargin,\n        verticalMargin: windspeed.verticalMargin,\n        font: font,\n        fill: windspeed.fill\n      });\n    };\n  }\n}\nexport default WindspeedProfile;","/**\n * @module meteoJS/thermodynamicDiagram/hodograph\n */\nimport {\n  windspeedKMHToMS,\n  windspeedKNToMS,\n  windspeedMSToKMH,\n  windspeedMSToKN } from '../calc.js';\nimport {\n  getNormalizedLineOptions,\n  getNormalizedTextOptions,\n  getNormalizedFontOptions,\n  drawTextInto\n} from './Functions.js';\nimport CoordinateSystem from './CoordinateSystem.js';\nimport PlotDataArea from './PlotDataArea.js';\n\n/**\n * Options for the circle grid.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram~lineStyleOptions}\n *   module:meteoJS/thermodynamicDiagram/hodograph~gridCirclesOptions\n * @param {number} [interval=13.89]\n *   Interval between grid circles (and value for the first grid circle).\n *   In m/s.\n */\n\n/**\n * Options for a text backdrop.\n * \n * @typedef {Object}\n *   module:meteoJS/thermodynamicDiagram/hodograph~backdropOptions\n * @property {boolean} [visible=true] - Visibility.\n * @property {mixed} [color='white'] - Color.\n */\n\n/**\n * Options for the grid labels.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram~textOptions}\n *   module:meteoJS/thermodynamicDiagram/hodograph~gridLabelsOptions\n * @property {number} [angle=45]\n *   Angle of the labels starting from the origin\n *   (in degrees, 0 relates to North).\n * @property {string} [unit='km/h']\n *   Unit of the label values. Allowed values: 'm/s', 'kn', 'km/h'\n * @property {string} [prefix=''] - Prefix of the label text.\n * @property {integer} [decimalPlaces=0] - Number of digits to appear after\n *   the decimal point of the label values.\n * @property {module:meteoJS/thermodynamicDiagram/hodograph~backdropOptions}\n *   [backdrop] - Options for the backdrop of the grid labels.\n */\n\n/**\n * Options for the hover labels in the hodograph.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram/tdDiagram~labelsOptions}\n *   module:meteoJS/thermodynamicDiagram/hodograph~labelsOptions\n * @property {Object} [pressure] - Options for the output of the pressure value.\n * @property {boolean} [pressure.visible=true] - Visibility.\n * @property {integer} [pressure.decimalPlaces=0]\n *   Number of digits to appear after the decimal point.\n * @property {string} [pressure.prefix=' hPa'] - Prefix of the value text.\n * @property {Object} [windspeed]\n *   Options for the output of the windspeed value.\n * @property {boolean} [windspeed.visible=true] - Visibility.\n * @property {string} [windspeed.unit='km/h']\n *   Unit of the value text. Allowed values: 'm/s', 'kn', 'km/h'\n * @property {integer} [windspeed.decimalPlaces=0]\n *   Number of digits to appear after the decimal point.\n * @property {string} [windspeed.prefix=' kn'] - Prefix of the value text.\n * @property {Object} [winddir] - Options for the output of the winddir value.\n * @property {boolean} [winddir.visible=true] - Visibility.\n * @property {integer} [winddir.decimalPlaces=0]\n *   Number of digits to appear after the decimal point.\n * @property {string} [winddir.prefix='°'] - Prefix of the value text.\n */\n\n/**\n * Options for the hover labels.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram/plotDataArea~hoverLabelsOptions}\n *   module:meteoJS/thermodynamicDiagram/hodograph~hoverLabelsOptions\n * @property {number} [maxDistance=20]\n *   Maximum distance to a data point to show a hover label in pixels.\n *   If undefined, always a hover label to the nearest point is shown.\n * @property {module:meteoJS/thermodynamicDiagram/hodograph~labelsOptions}\n *   [hodograph] - Options for hodograph label.\n */\n\n/**\n * Options for the constructor.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram/plotDataArea~options}\n *   module:meteoJS/thermodynamicDiagram/hodograph~options\n * @param {Object} [grid] - Options for the hodograph grid.\n * @param {module:meteoJS/thermodynamicDiagram~lineOptions} [grid.axes]\n *   Options for the hodograph's x- and y-axes.\n * @param {module:meteoJS/thermodynamicDiagram/hodograph~gridCirclesOptions}\n *   [grid.circles] - Options for the hodograph circle grid.\n * @param {module:meteoJS/thermodynamicDiagram/hodograph~gridLabelsOptions}\n *   [grid.labels] - Options for the hodograph grid labels.\n * @param {number|undefined} [grid.max=undefined]\n *   Maximum value for the grid axes and circles. If undefined, determined from\n *   'windspeedMax'.\n * @param {number} [windspeedMax=41.67]\n *   The maximum windspeed [m/s], that should be visible on the plot. This\n *   refers to the x- or y-direction with the origin in the middle of the plot,\n *   because in these directions, a polar plot has the least extent concerning\n *   distance.\n * @param {number[]|undefined} [origin=undefined]\n *   Move origin of polar plot. If 'undefined' the origin is in the center. To\n *   move, use an array with 2 elements. The first element moves the origin in\n *   x direction, the second in y direction. The values are interpreted as\n *   relative length (relating to the half width resp. height). Positive values\n *   to move in North-East direction. E.g. to move the origin the half way to\n *   the upper right corner, use [0.5, 0.5].\n * @param {module:meteoJS/thermodynamicDiagram/hodograph~hoverLabelsOptions}\n *   [hoverLabels] - Hover labels options.\n */\n\n/**\n * Class to draw the hodograph.\n * \n * <pre><code>import Hodograph from 'meteojs/thermodynamicDiagram/Hodograph';</code></pre>\n * \n * @extends module:meteoJS/thermodynamicDiagram/plotDataArea.PlotDataArea\n */\nexport class Hodograph extends PlotDataArea {\n  \n  /**\n   * @param {module:meteoJS/thermodynamicDiagram/hodograph~options} options\n   *   Options.\n   */\n  constructor({\n    svgNode = undefined,\n    coordinateSystem = new CoordinateSystem(),\n    x,\n    y,\n    width,\n    height,\n    style = {},\n    visible = true,\n    events = {},\n    hoverLabels = {},\n    dataGroupIds = ['windbarbs'],\n    getCoordinatesByLevelData = (dataGroupId, sounding, levelData, plotArea) => {\n      if (levelData.wspd === undefined ||\n          levelData.wdir === undefined)\n        return {};\n      \n      const x = levelData.wspd * -Math.sin(levelData.wdir / 180 * Math.PI);\n      const y = levelData.wspd * Math.cos(levelData.wdir / 180 * Math.PI);\n      return {\n        x: plotArea.center[0] + x * plotArea.pixelPerSpeed,\n        y: plotArea.center[1] + y * plotArea.pixelPerSpeed\n      };\n    },\n    insertDataGroupInto = (svgNode, dataGroupId, sounding, data) => {\n      const basePolylines = [data\n        .filter(level => {\n          if (sounding.options.hodograph.minPressure !== undefined\n            && level.levelData.pres !== undefined\n            && level.levelData.pres < sounding.options.hodograph.minPressure)\n            return false;\n          if (sounding.options.hodograph.maxPressure !== undefined\n            && level.levelData.pres !== undefined\n            && level.levelData.pres > sounding.options.hodograph.maxPressure)\n            return false;\n          return true;\n        })];\n      basePolylines[0].sort((a,b) => b.levelData.pres-a.levelData.pres);\n      const segmentPolylines = [];\n      for (const segment of sounding.options.hodograph.segments) {\n        const def = {\n          levels: [],\n          visible: segment.visible,\n          style: segment.style\n        };\n        basePolylines.map((basePolyline, i) => {\n          let lowSplit = undefined;\n          let highSplit = undefined;\n          basePolyline.map(l => {\n            if ((segment.minPressure !== undefined && segment.minPressure <= l.levelData.pres\n              && segment.maxPressure !== undefined && segment.maxPressure >= l.levelData.pres)\n              || (segment.minPressure === undefined\n              && segment.maxPressure !== undefined && segment.maxPressure >= l.levelData.pres)\n              || (segment.minPressure !== undefined && segment.minPressure <= l.levelData.pres\n              && segment.maxPressure === undefined)) {\n              def.levels.push(l);\n              if (highSplit === undefined)\n                highSplit = l;\n              lowSplit = l;\n            }\n          });\n          if (highSplit !== undefined && lowSplit !== undefined && highSplit !== lowSplit) {\n            const indexLow = basePolyline\n              .findIndex(l => l.levelData.pres === lowSplit.levelData.pres);\n            const indexHigh = basePolyline\n              .findIndex(l => l.levelData.pres === highSplit.levelData.pres);\n            const newBaseLine = basePolyline.slice(indexLow);\n            basePolylines[i] = basePolyline.slice(0, indexHigh+1);\n            basePolylines.push(newBaseLine);\n          }\n        });\n        if (def.levels.length > 0)\n          segmentPolylines.push(def);\n      }\n      basePolylines.map(basePolyline => {\n        if (basePolyline.length < 2)\n          return;\n        svgNode\n          .polyline(basePolyline.map(level => [ level.x, level.y ]))\n          .fill('none').stroke(sounding.options.hodograph.style);\n      });\n      segmentPolylines.map(segmentPolyline => {\n        svgNode\n          .polyline(segmentPolyline.levels.map(level => [ level.x, level.y ]))\n          .fill('none').stroke(segmentPolyline.style);\n      });\n    },\n    grid = {},\n    windspeedMax = windspeedKNToMS(150),\n    origin = undefined,\n    filterDataPoint = undefined,\n    minDataPointsDistance = 0\n  }) {\n    super({\n      svgNode,\n      coordinateSystem,\n      x,\n      y,\n      width,\n      height,\n      style,\n      visible,\n      events,\n      hoverLabels,\n      dataGroupIds,\n      getCoordinatesByLevelData,\n      insertDataGroupInto,\n      getSoundingVisibility:\n        sounding => sounding.visible && sounding.options.hodograph.visible,\n      filterDataPoint,\n      minDataPointsDistance\n    });\n\n    /**\n     * @type number[]|undefined\n     * @private\n     */\n    this._origin = origin;\n\n    /**\n     * @type number\n     * @private\n     */\n    this._windspeedMax = windspeedMax;\n    \n    this._gridOptions = this.getNormalizedGridOptions(grid);\n\n    if (this._gridOptions.max === undefined)\n      this._gridOptions.max = windspeedMax;\n    this.init();\n  }\n\n  /**\n   * Origin of the hodograph relative to the plot area. If not undefined, it\n   * has to be a 2-element array. The first element moves the origin in\n   * x direction, the second in y direction. The values are interpreted as\n   * relative length (relating to the half width resp. height). Positive values\n   * to move in North-East direction. E.g. to move the origin the half way to\n   * the upper right corner, use [0.5, 0.5].\n   * \n   * @type number[]|undefined\n   * @public\n   */\n  get origin() {\n    return this._origin;\n  }\n  set origin(origin) {\n    const oldOrigin = this._origin;\n    this._origin = origin;\n    this._hoverLabelsGroup.clear();\n    if (oldOrigin === undefined && this._origin !== undefined\n      || oldOrigin !== undefined && this._origin === undefined\n      || (oldOrigin !== undefined && this._origin !== undefined\n      && (oldOrigin[0] != this._origin[0]\n      || oldOrigin[1] != this._origin[1])))\n      this.onCoordinateSystemChange();\n  }\n\n  /**\n   * The origin of the hodograph in pixel coordinates.\n   * \n   * @type number[]\n   * @public\n   * @readonly\n   */\n  get center() {\n    const center = [this.width/2, this.height/2];\n    if (this._origin !== undefined) {\n      center[0] += this._origin[0] * this.minExtentLength/2;\n      center[1] -= this._origin[1] * this.minExtentLength/2;\n    }\n    return center;\n  }\n\n  /**\n   * Returns the pixel per speed unit. Mainly for internal usage.\n   * \n   * @type number\n   * @public\n   * @readonly\n   */\n  get pixelPerSpeed() {\n    const center = this.center;\n    return Math.min(\n      Math.max(this.width - center[0], center[0]),\n      Math.max(this.height - center[1], center[1])\n    ) / this._windspeedMax;\n  }\n  \n  /**\n   * Plots hodograph background.\n   * \n   * @override\n   */\n  _drawBackground(svgNode) {\n    super._drawBackground(svgNode);\n    \n    const center = this.center;\n    const pixelPerSpeed = this.pixelPerSpeed;\n    // x-/y-axes\n    if (this._gridOptions.axes.visible) {\n      svgNode\n        .line(0, center[1], this.width, center[1])\n        .stroke(this._gridOptions.axes.style);\n      svgNode\n        .line(center[0], 0, center[0], this.height)\n        .stroke(this._gridOptions.axes.style);\n    }\n    \n    // circles and labels\n    for (let v = this._gridOptions.circles.interval;\n      v <= this._gridOptions.max;\n      v += this._gridOptions.circles.interval) {\n      let radius = v * pixelPerSpeed;\n      svgNode\n        .circle(2*radius)\n        .attr({\n          cx: center[0],\n          cy: center[1]\n        })\n        .fill('none')\n        .stroke(this._gridOptions.circles.style);\n      if (this._gridOptions.labels.visible) {\n        let xText =\n          radius *\n          Math.cos((this._gridOptions.labels.angle - 90) / 180 * Math.PI);\n        let yText =\n          radius *\n          Math.sin((this._gridOptions.labels.angle - 90) / 180 * Math.PI);\n        let text = '';\n        switch (this._gridOptions.labels.unit) {\n        case 'm/s':\n          text = Number.parseFloat(v)\n            .toFixed(this._gridOptions.labels.decimalPlaces);\n          break;\n        case 'kn':\n          text = windspeedMSToKN(v)\n            .toFixed(this._gridOptions.labels.decimalPlaces);\n          break;\n        default:\n          text = windspeedMSToKMH(v)\n            .toFixed(this._gridOptions.labels.decimalPlaces);\n          break;\n        }\n        text += this._gridOptions.labels.prefix;\n        let fontColor = undefined;\n        const font = {...this._gridOptions.labels.font};\n        if ('color' in font) {\n          fontColor = font.color;\n          delete font.color;\n        }\n        const textNode = svgNode\n          .plain(text)\n          .font(this._gridOptions.labels.font)\n          .center(center[0] + xText, center[1] + yText);\n        if (fontColor !== undefined)\n          textNode.fill(fontColor);\n        if (font['text-anchor'] == 'end')\n          textNode.dx(-textNode.bbox().width/2-3);\n        else if (font['text-anchor'] == 'start')\n          textNode.dx(+textNode.bbox().width/2+3);\n        if (this._gridOptions.labels.angle == 90\n          || this._gridOptions.labels.angle == 270)\n          textNode.dy(textNode.bbox().height/2+3);\n\n        if (this._gridOptions.labels.backdrop.visible) {\n          const bbox = textNode.bbox();\n          textNode.before(\n            svgNode\n              .rect(bbox.width, bbox.height)\n              .move(bbox.x, bbox.y)\n              .fill({ color: this._gridOptions.labels.backdrop.color })\n          );\n        }\n      }\n    }\n  }\n  \n  /**\n   * Normalizes options for grid.\n   * \n   * @private\n   */\n  getNormalizedGridOptions({\n    axes = {},\n    circles = {},\n    labels = {},\n    max = undefined\n  }) {\n    axes = getNormalizedLineOptions(axes);\n    circles = getNormalizedLineOptions(circles);\n    if (!('interval' in circles) ||\n        circles.interval === undefined)\n      circles.interval = windspeedKMHToMS(50);\n    labels = getNormalizedTextOptions(labels);\n    if (!('angle' in labels) ||\n        labels.angle === undefined)\n      labels.angle = 225;\n    if (!('unit' in labels) ||\n        labels.unit === undefined)\n      labels.unit = 'km/h';\n    if (!('prefix' in labels) ||\n        labels.prefix === undefined)\n      labels.prefix = '';\n    if (!('decimalPlaces' in labels) ||\n        labels.decimalPlaces === undefined)\n      labels.decimalPlaces = 0;\n    if (!('backdrop' in labels) ||\n      labels.backdrop === undefined)\n      labels.backdrop = {};\n    if (!('color' in labels.backdrop))\n      labels.backdrop.color = 'white';\n    if (!('visible' in labels.backdrop))\n      labels.backdrop.visible = true;\n    if (labels.font.size === undefined)\n      labels.font.size = 10;\n    \n    return {\n      axes,\n      circles,\n      labels,\n      max\n    };\n  }\n\n  /**\n   * Initialize hover labels options.\n   * \n   * @param {module:meteoJS/thermodynamicDiagram/hodograph~hoverLabelsOptions}\n   *   options - Hover labels options.\n   */\n  _initHoverLabels({\n    visible = true,\n    type = 'mousemove',\n    maxDistance = 20,\n    insertLabelsFunc = undefined,\n    getLevelData = ({ hoverLabelsSounding, e, maxDistance }) => {\n      const sounding = hoverLabelsSounding.sounding;\n\n      let smallestDistanceSquare = undefined;\n      let nearestLevelData = undefined;\n      sounding.getLevels()\n        .filter(pres => \n          (hoverLabelsSounding.options.hodograph.minPressure === undefined\n          || hoverLabelsSounding.options.hodograph.minPressure <= pres)\n          && (hoverLabelsSounding.options.hodograph.maxPressure === undefined\n          || pres <= hoverLabelsSounding.options.hodograph.maxPressure))\n        .map(pres => {\n          const levelData = sounding.getData(pres);\n          if (levelData.wspd === undefined || levelData.wdir === undefined)\n            return;\n          const { x, y } =\n            this._getCoordinatesByLevelData('windbarbs',\n              sounding, levelData, this);\n          const distanceSquare =\n            Math.pow(e.elementX - x, 2)\n            + Math.pow(e.elementY - y, 2);\n          if (nearestLevelData === undefined\n            || distanceSquare < smallestDistanceSquare) {\n            smallestDistanceSquare = distanceSquare;\n            nearestLevelData = levelData;\n          }\n        });\n\n      if (maxDistance !== undefined\n        && Math.pow(maxDistance, 2) < smallestDistanceSquare)\n        nearestLevelData = {};\n      return nearestLevelData;\n    },\n    hodograph = {}\n  }) {\n    if (!('visible' in hodograph))\n      hodograph.visible = true;\n    if (!('style' in hodograph))\n      hodograph.style = {};\n    hodograph.font = getNormalizedFontOptions(hodograph.font, {\n      anchor: 'end',\n      'alignment-baseline': 'bottom'\n    });\n    if (!('fill' in hodograph))\n      hodograph.fill = {};\n    if (hodograph.fill.opacity === undefined)\n      hodograph.fill.opacity = 0.7;\n    if (hodograph.fill.color === undefined)\n      hodograph.fill.color = 'white';\n    if (insertLabelsFunc === undefined)\n      insertLabelsFunc = this._makeInsertLabelsFunc(hodograph);\n\n    super._initHoverLabels({\n      visible,\n      type,\n      maxDistance,\n      insertLabelsFunc,\n      getLevelData\n    });\n  }\n\n  /**\n   * Makes a default insertLabelsFunc.\n   * \n   * @param {module:meteoJS/thermodynamicDiagram/hodograph~labelsOptions}\n   *   options - Style options for the hover labels.\n   * @private\n   */\n  _makeInsertLabelsFunc({\n    visible = true,\n    style = {},\n    font = {},\n    fill = {},\n    horizontalMargin = 10,\n    verticalMargin = 0,\n    radius = undefined,\n    radiusPlus = 2,\n    pressure = {},\n    windspeed = {},\n    winddir = {}\n  }) {\n    pressure = (({\n      visible = true,\n      decimalPlaces = 0,\n      prefix = ' hPa'\n    }) => { return { visible, decimalPlaces, prefix }; })(pressure);\n    windspeed =  (({\n      visible = true,\n      unit = 'kn',\n      decimalPlaces = 0,\n      prefix = ' kn'\n    }) => { return { visible, unit, decimalPlaces, prefix }; })(windspeed);\n    winddir =  (({\n      visible = true,\n      decimalPlaces = 0,\n      prefix = '°'\n    }) => { return { visible, decimalPlaces, prefix }; })(winddir);\n    return (sounding, levelData, group) => {\n      group.clear();\n\n      if (levelData === undefined\n        || !visible)\n        return;\n\n      const { x, y } =\n        this._getCoordinatesByLevelData('windbarbs',\n          sounding, levelData, this);\n      if (x === undefined ||\n          y === undefined)\n        return;\n\n      let defaultStyle = sounding.options.hodograph.style;\n      if (levelData.pres !== undefined)\n        sounding.options.hodograph.segments.map(segment => {\n          if ((segment.minPressure === undefined\n            || segment.minPressure <= levelData.pres)\n            && (segment.maxPressure === undefined\n            || segment.maxPressure >= levelData.pres))\n            defaultStyle = segment.style;\n        });\n      \n      const dotRadius = (radius === undefined)\n        ? defaultStyle.width / 2 + radiusPlus\n        : radius;\n      const fillOptions = {...style}; // Deep copy\n      if (!('color' in fillOptions))\n        fillOptions.color = defaultStyle.color;\n      group\n        .circle(2 * dotRadius)\n        .attr({ cx: x, cy: y })\n        .fill(fillOptions);\n      const background = group.rect().fill(fill);\n      const labelFont = {...font}; // Deep copy\n      labelFont.anchor = 'start';\n      if (labelFont.anchor == 'start' &&\n          this.width - x < 45)\n        labelFont.anchor = 'end';\n      if (labelFont.anchor == 'end' &&\n          x < 45)\n        labelFont.anchor = 'start';\n      let yDelta = 0;\n      let textGroups = [];\n      const texts = [];\n      if (pressure.visible) {\n        const text = Number.parseFloat(levelData.pres)\n          .toFixed(pressure.decimalPlaces);\n        texts.push(`${text}${pressure.prefix}`);\n      }\n      if (windspeed.visible) {\n        let text = '';\n        switch (windspeed.unit) {\n        case 'm/s':\n          text = Number.parseFloat(levelData.wspd)\n            .toFixed(windspeed.decimalPlaces);\n          break;\n        case 'kn':\n          text = windspeedMSToKN(levelData.wspd)\n            .toFixed(windspeed.decimalPlaces);\n          break;\n        default:\n          text = windspeedMSToKMH(levelData.wspd)\n            .toFixed(windspeed.decimalPlaces);\n          break;\n        }\n        texts.push(`${text}${windspeed.prefix}`);\n      }\n      if (winddir.visible) {\n        const text = Number.parseFloat(levelData.wdir)\n          .toFixed(winddir.decimalPlaces);\n        texts.push(`${text}${winddir.prefix}`);\n      }\n      texts.map(text => {\n        yDelta += labelFont.size * 5/4;\n        textGroups.push(drawTextInto({\n          node: group,\n          text,\n          x,\n          y: y + yDelta,\n          horizontalMargin,\n          verticalMargin,\n          font: labelFont\n        }));\n      });\n      if (y+yDelta > this.height)\n        textGroups.map(g => g.dy(-yDelta));\n      const maxBBox = {\n        x: undefined,\n        y: undefined,\n        x2: undefined,\n        y2: undefined\n      };\n      textGroups.map(g => {\n        g.children().map(el => {\n          if (el.type != 'text')\n            return;\n          const bbox = el.bbox();\n          if (maxBBox.x === undefined || bbox.x < maxBBox.x)\n            maxBBox.x = bbox.x;\n          if (maxBBox.y === undefined || bbox.y < maxBBox.y)\n            maxBBox.y = bbox.y;\n          if (maxBBox.x2 === undefined || maxBBox.x2 < bbox.x2)\n            maxBBox.x2 = bbox.x2;\n          if (maxBBox.y2 === undefined || maxBBox.y2 < bbox.y2)\n            maxBBox.y2 = bbox.y2;\n        });\n      });\n      background.attr({\n        x: maxBBox.x,\n        y: maxBBox.y,\n        width: maxBBox.x2 - maxBBox.x,\n        height: maxBBox.y2 - maxBBox.y\n      });\n    };\n  }\n}\nexport default Hodograph;","/**\n * @module meteoJS/thermodynamicDiagram/axes/yAxis\n */\nimport { getNormalizedLineStyleOptions } from '../Functions.js';\nimport PlotArea from '../PlotArea.js';\n\n/**\n * Options for the constructor.\n * \n * @typedef {module:meteoJS/thermodynamicDiagram/plotArea~options}\n *   module:meteoJS/thermodynamicDiagram/axes/yAxis~options\n * @property {module:meteoJS/thermodynamicDiagram/axes/axisLabels~options} labels\n *   Options for the yAxis Labels.\n * @property {module:meteoJS/thermodynamicDiagram/axes/axisTitle~options} title\n *   Options for the title of the x-Axis.\n */\n\n/**\n * Class to draw the yAxis labelling.\n * \n * @extends module:meteoJS/thermodynamicDiagram/plotArea.PlotArea\n */\nexport class yAxis extends PlotArea {\n\n  /**\n   * @param {module:meteoJS/thermodynamicDiagram/yAxis~options} options\n   *   Options.\n   */\n  constructor({\n    svgNode = undefined,\n    coordinateSystem,\n    x,\n    y,\n    width,\n    height,\n    style = {},\n    visible = true,\n    events = {},\n    labels = {},\n    title = {}\n  }) {\n    if (style.overflow === undefined)\n      style.overflow = 'visible';\n    \n    super({\n      svgNode,\n      coordinateSystem,\n      x,\n      y,\n      width,\n      height,\n      style,\n      visible,\n      events\n    });\n    \n    /**\n     * @type Object\n     * @private\n     */\n    this._labelsOptions = getNormalizedLabelsOptions(labels);\n    \n    /**\n     * @type Object\n     * @private\n     */\n    this._titleOptions = getNormalizedTitleOptions(title);\n    \n    this.init();\n  }\n  \n  /**\n   * Draw background into SVG group.\n   * \n   * @override\n   */\n  _drawBackground(svgNode) {\n    super._drawBackground(svgNode);\n    \n    if (this._labelsOptions.enabled) {\n      let svgLabelsGroup = svgNode.group();\n      let isobarsAzimut = 50;\n      let minLevel = Math.ceil(this.coordinateSystem.getPByXY(0, this.height)/isobarsAzimut)*isobarsAzimut;\n      let maxLevel = Math.floor(this.coordinateSystem.getPByXY(0, 0)/isobarsAzimut)*isobarsAzimut;\n      let fontSize = 11;\n      for (let level=minLevel; level<=maxLevel; level+=isobarsAzimut) {\n        let y = this.height - this.coordinateSystem.getYByXP(0, level);\n        let text = svgLabelsGroup.plain(level).attr({\n          y: y+fontSize*0.3,\n          x: this.width\n        });\n        text\n          .font({\n            size: fontSize+'px',\n            anchor: 'end'\n          })\n          .attr({\n            fill: this._labelsOptions.style.color\n          });\n      }\n    }\n    \n    if (this._titleOptions.text !== undefined) {\n      let svgTitleGroup = svgNode.group();\n      let fontSize = 12;\n      svgTitleGroup.plain(this._titleOptions.text)\n        .attr({\n          x: fontSize*0.4,\n          y: this.height/2,\n          fill: this._titleOptions.style.color\n        })\n        .font({\n          size: fontSize,\n          anchor: 'middle'\n        })\n        .rotate(-90);\n    }\n  }\n  \n}\nexport default yAxis;\n\nfunction getNormalizedLabelsOptions({\n  enabled = true,\n  style = {}\n}) {\n  let options = {\n    enabled,\n    style\n  };\n  options.style = getNormalizedLineStyleOptions(options.style);\n  return options;\n}\n\nfunction getNormalizedTitleOptions({\n  align = 'middle',\n  style = {},\n  text = undefined\n}) {\n  let options = {\n    align,\n    style,\n    text\n  };\n  options.style = getNormalizedLineStyleOptions(options.style);\n  return options;\n}","/**\n * @module meteoJS/thermodynamicDiagram/axes/xAxis\n */\nimport { tempKelvinToCelsius, tempCelsiusToKelvin } from '../../calc.js';\nimport yAxis from './yAxis.js';\n\n/**\n * Class to draw the xAxis labelling.\n * \n * @extends module:meteoJS/thermodynamicDiagram/axes/yAxis.yAxis\n */\nexport class xAxis extends yAxis {\n  \n  /**\n   * Draw background into SVG group.\n   * \n   * @override\n   */\n  _drawBackground(svgNode) {\n    svgNode.clear();\n    //super.drawBackground(svgNode);\n    \n    if (this._labelsOptions.enabled) {\n      let svgLabelsGroup = svgNode.group();\n      let isothermsAzimut = 10;\n      let minT = Math.ceil(tempKelvinToCelsius(this.coordinateSystem.getTByXY(0, 0))/isothermsAzimut)*isothermsAzimut;\n      let maxT = Math.floor(tempKelvinToCelsius(this.coordinateSystem.getTByXY(this.width, 0))/isothermsAzimut)*isothermsAzimut;\n      let fontSize = 10;\n      for (let T=minT; T<=maxT; T+=isothermsAzimut) {\n        let TKelvin = tempCelsiusToKelvin(T);\n        svgLabelsGroup\n          .plain(Math.round(tempKelvinToCelsius(TKelvin)))\n          .attr({\n            x: this.coordinateSystem.getXByYT(0, TKelvin),\n            y: fontSize,\n            fill: this._labelsOptions.style.color\n          })\n          .font({\n            size: fontSize+'px',\n            anchor: 'middle'\n          });\n      }\n    }\n    \n    if (this._titleOptions.text !== undefined) {\n      let svgTitleGroup = svgNode.group();\n      let fontSize = 12;\n      svgTitleGroup.plain(this._titleOptions.text)\n        .attr({\n          x: this.width/2,\n          y: this.height - fontSize*0.3,\n          fill: this._titleOptions.style.color\n        })\n        .font({\n          size: fontSize,\n          anchor: 'middle'\n        });\n    }\n  }\n  \n}\nexport default xAxis;","/**\n * @module meteoJS/thermodynamicDiagram\n */\nimport ThermodynamicDiagramPluggable from './ThermodynamicDiagramPluggable.js';\nimport StueveDiagram from './thermodynamicDiagram/coordinateSystem/StueveDiagram.js';\nimport Emagram from './thermodynamicDiagram/coordinateSystem/Emagram.js';\nimport SkewTlogPDiagram from './thermodynamicDiagram/coordinateSystem/SkewTlogPDiagram.js';\nimport TDDiagram from './thermodynamicDiagram/TDDiagram.js';\nimport WindbarbsProfile from './thermodynamicDiagram/WindbarbsProfile.js';\nimport WindspeedProfile from './thermodynamicDiagram/WindspeedProfile.js';\nimport Hodograph from './thermodynamicDiagram/Hodograph.js';\nimport { xAxis as xAxisClass } from './thermodynamicDiagram/axes/xAxis.js';\nimport { yAxis as yAxisClass } from './thermodynamicDiagram/axes/yAxis.js';\n\n/**\n * Options for the coordinate system.\n * \n * @typedef {module:meteoJS/thermodynamicDiagramPluggable~options}\n *   module:meteoJS/thermodynamicDiagram~coordinateSystemOptions\n * @property {'skewTlogP'|'stueve'|'emagram'} [type='skewTlogP']\n *   Thermodynamic diagarm type.\n * @property {module:meteoJS/thermodynamicDiagram/coordinateSystem~pressureOptions}\n *   [pressure] - Pressure options.\n * @property {module:meteoJS/thermodynamicDiagram/coordinateSystem~temperatureOptions}\n *   [temperature] - Temperature options.\n */\n\n/**\n * Options for the constructor.\n * \n * @typedef {module:meteoJS/thermodynamicDiagramPluggable~options}\n *   module:meteoJS/thermodynamicDiagram~options\n * @param {module:meteoJS/thermodynamicDiagram~coordinateSystemOptions}\n *   [coordinateSystem] - Coordinate system options.\n * @param {module:meteoJS/thermodynamicDiagram/tdDiagram~options} [diagram]\n *   Options for the real thermodynamic diagram.\n * @param {module:meteoJS/thermodynamicDiagram/windbarbsProfile~options}\n *   [windbarbs] - Options for the windbarbs profile.\n * @param {module:meteoJS/thermodynamicDiagram/windspeedProfile~options}\n *   [windprofile] - Options for the windspeed profile.\n * @param {module:meteoJS/thermodynamicDiagram/hodograph~options} [hodograph]\n *   Options for the hodograph container.\n * @param {module:meteoJS/thermodynamicDiagram/axes/xAxis~options} [xAxis]\n *   Options for the xAxis container.\n * @param {module:meteoJS/thermodynamicDiagram/axes/yAxis~options} [yAxis]\n *   Options for the yAxis container.\n */\n\n/**\n * Class to draw a SVG thermodynamic diagram.\n * \n * <pre><code>import ThermodynamicDiagram from 'meteojs/ThermodynamicDiagram';</code></pre>\n * \n * @extends module:meteoJS/thermodynamicDiagramPluggable.ThermodynamicDiagramPluggable\n */\nexport class ThermodynamicDiagram extends ThermodynamicDiagramPluggable {\n  \n  /**\n   * @param {module:meteoJS/thermodynamicDiagram~options} options - Options.\n   */\n  constructor({\n    renderTo = undefined,\n    width = undefined,\n    height = undefined,\n    coordinateSystem = {},\n    diagram = {},\n    windbarbsProfile = {},\n    windspeedProfile = {},\n    hodograph = {},\n    xAxis = {},\n    yAxis = {}\n  }) {\n    super({\n      renderTo,\n      width,\n      height\n    });\n    \n    diagram = normalizePlotAreaOptions(diagram);\n    windbarbsProfile = normalizePlotAreaOptions(windbarbsProfile);\n    windspeedProfile = normalizePlotAreaOptions(windspeedProfile);\n    hodograph = normalizePlotAreaOptions(hodograph);\n    xAxis = normalizePlotAreaOptions(xAxis);\n    yAxis = normalizePlotAreaOptions(yAxis);\n    \n    let defaultPadding = this.svgNode.width() * 0.05;\n    if (xAxis.width === undefined &&\n      diagram.width === undefined &&\n      windbarbsProfile.width === undefined &&\n      windspeedProfile.width === undefined) {\n      yAxis.width =\n        (this.svgNode.width() - 2 * defaultPadding) * 0.1;\n      diagram.width =\n        (this.svgNode.width() - 2 * defaultPadding) * 0.7;\n      windbarbsProfile.width =\n        (this.svgNode.width() - 2 * defaultPadding) * 0.2 * 1/3;\n      windspeedProfile.width =\n        (this.svgNode.width() - 2 * defaultPadding) * 0.2 * 2/3;\n    }\n    else if (diagram.width === undefined)\n      diagram.width =\n        this.svgNode.width() - 2 * defaultPadding\n        - windbarbsProfile.width- windspeedProfile.width;\n    else if (windbarbsProfile.width === undefined &&\n             windspeedProfile.width === undefined) {\n      windbarbsProfile.width =\n        (this.svgNode.width() - 2 * defaultPadding - diagram.width) * 1/3;\n      windspeedProfile.width =\n        (this.svgNode.width() - 2 * defaultPadding - diagram.width) * 2/3;\n    }\n    if (yAxis.x === undefined &&\n      diagram.x === undefined &&\n      windbarbsProfile.x === undefined &&\n      windspeedProfile.x === undefined) {\n      yAxis.x = defaultPadding;\n      diagram.x =\n        yAxis.x + yAxis.width;\n      windbarbsProfile.x =\n        diagram.x + diagram.width;\n      windspeedProfile.x =\n        windbarbsProfile.x + windbarbsProfile.width;\n    }\n    else if (diagram.x === undefined)\n      diagram.x =\n        windbarbsProfile.x - windbarbsProfile.width;\n    else if (windbarbsProfile.x === undefined &&\n             windspeedProfile.x === undefined) {\n      windbarbsProfile.x =\n        diagram.x + diagram.width;\n      windspeedProfile.x =\n        windbarbsProfile.x + windbarbsProfile.width;\n    }\n    if (xAxis.height === undefined)\n      xAxis.height = this.svgNode.height() * 0.06;\n    if (diagram.height === undefined)\n      diagram.height =\n        this.svgNode.height() - xAxis.height - 2 * defaultPadding;\n    if (yAxis.height === undefined)\n      yAxis.height = diagram.height;\n    if (windbarbsProfile.height === undefined)\n      windbarbsProfile.height = diagram.height;\n    if (windspeedProfile.height === undefined)\n      windspeedProfile.height = diagram.height;\n    if (diagram.y === undefined)\n      diagram.y = defaultPadding;\n    if (yAxis.y === undefined)\n      yAxis.y = diagram.y;\n    if (windbarbsProfile.y === undefined)\n      windbarbsProfile.y = diagram.y;\n    if (windspeedProfile.y === undefined)\n      windspeedProfile.y = diagram.y;\n    if (xAxis.width === undefined)\n      xAxis.width = diagram.width;\n    if (xAxis.x === undefined)\n      xAxis.x = diagram.x;\n    if (xAxis.y === undefined)\n      xAxis.y = diagram.y + diagram.height;\n    if (xAxis.height === undefined)\n      xAxis.height = defaultPadding;\n    \n    // Defintionen zum Hodograph\n    if (hodograph.x === undefined)\n      hodograph.x = diagram.x;\n    if (hodograph.y === undefined)\n      hodograph.y = diagram.y;\n    if (hodograph.width === undefined)\n      hodograph.width = Math.min(diagram.width, diagram.height) * 0.4;\n    if (hodograph.height === undefined)\n      hodograph.height = hodograph.width;\n    \n    this.diagram = new TDDiagram(diagram);\n    this.appendPlotArea(this.diagram);\n    \n    this.yAxis = new yAxisClass(yAxis);\n    this.appendPlotArea(this.yAxis);\n    \n    this.xAxis = new xAxisClass(xAxis);\n    this.appendPlotArea(this.xAxis);\n    \n    this.windbarbsProfile = new WindbarbsProfile(windbarbsProfile);\n    this.appendPlotArea(this.windbarbsProfile);\n    \n    this.windspeedProfile = new WindspeedProfile(windspeedProfile);\n    this.appendPlotArea(this.windspeedProfile);\n    \n    this.hodograph = new Hodograph(hodograph);\n    this.hodograph.on('prebuild:background', ({ node }) => {\n      node\n        .rect(this.hodograph.width-2, this.hodograph.height-2)\n        .move(1,1)\n        .fill({ color: 'white' })\n        .stroke({ color: 'black', width: 1 });\n    });\n    this.appendPlotArea(this.hodograph);\n    \n    if (coordinateSystem.type === undefined)\n      coordinateSystem.type = 'skewTlogP';\n    coordinateSystem.width = diagram.width;\n    coordinateSystem.height = diagram.height;\n    \n    /**\n     * @type module:meteoJS/thermodynamicDiagram/coordinateSystem.CoordinateSystem\n     * @private\n     */\n    this._coordinateSystem;\n    this.coordinateSystem =\n      (coordinateSystem.type == 'stueve') ?\n        new StueveDiagram(coordinateSystem) :\n        (coordinateSystem.type == 'emagram') ?\n          new Emagram(coordinateSystem) :\n          new SkewTlogPDiagram(coordinateSystem);\n  }\n  \n  /**\n   * Coordinate system for the different plot areas.\n   * \n   * @type module:meteoJS/thermodynamicDiagram/coordinateSystem.CoordinateSystem\n   * @public\n   */\n  get coordinateSystem() {\n    return this._coordinateSystem;\n  }\n  set coordinateSystem(coordinateSystem) {\n    this._coordinateSystem = coordinateSystem;\n    this.exchangeCoordinateSystem(this._coordinateSystem);\n  }\n  \n  /**\n   * Returns the object of the thermodynamic diagram plot area.\n   * \n   * @returns {module:meteoJS/thermodynamicDiagram/tdDiagram.TDDiagram} Diagram object.\n   * @deprecated\n   */\n  getDiagramPlotArea() {\n    return this.diagram;\n  }\n}\nexport default ThermodynamicDiagram;\n\n/**\n * Returns normalized PlotArea options.\n * \n * @private\n */\nfunction normalizePlotAreaOptions({\n  svgNode = undefined,\n  coordinateSystem = undefined,\n  x = undefined,\n  y = undefined,\n  width = undefined,\n  height = undefined,\n  style = {},\n  visible = true,\n  events = {},\n  hoverLabels = {},\n  ...result\n}) {\n  result.svgNode = svgNode;\n  result.coordinateSystem = coordinateSystem;\n  result.x = x;\n  result.y = y;\n  result.width = width;\n  result.height = height;\n  result.style = style;\n  result.visible = visible;\n  result.events = events;\n  result.hoverLabels = hoverLabels;\n  return result;\n}","/**\n * @module meteoJS/modelviewer/display/simple\n */\nimport $ from 'jquery';\nimport ThermodynamicDiagram from '../../ThermodynamicDiagram.js';\nimport Display from '../Display.js';\n\n/**\n * @classdesc Displays a modelviewer container with a navigation on top of the\n *   resource. The navigation contains of several select-Nodes (each for a\n *   VariableCollection).\n */\nexport class Simple extends Display {\n  \n  constructor() {\n    super();\n    \n    /**\n     * @type undefined|jQuery\n     * @private\n     */\n    this.imgNode = undefined;\n    \n    /**\n     * @type undefined|meteoJS/thermodynamicDiagram.ThermodynamicDiagram\n     * @private\n     */\n    this.thermodynamicDiagram = undefined;\n    \n    /**\n     * @type undefined|jQuery\n     * @protected\n     */\n    this.resourceNode = undefined;\n  }\n  \n  /**\n   * @override\n   */\n  onInit() {\n    if (this.parentNode !== undefined) {\n      this.resourceNode = $(this.parentNode);\n      this.resourceNode.empty();\n    }\n  }\n  \n  /**\n   * @override\n   */\n  onChangeVisibleResource() {\n    if (this.resourceNode === undefined)\n      return;\n    let visibleResource = this.container.visibleResource;\n    if ('url' in visibleResource) {\n      if (this.thermodynamicDiagram !== undefined) {\n        this.thermodynamicDiagram = undefined;\n        this.resourceNode.empty();\n      }\n      if (this.imgNode === undefined) {\n        this.resourceNode.empty();\n        this.imgNode = $('<img>');\n        this.resourceNode.append(this.imgNode);\n      }\n      this.imgNode.attr('src', visibleResource.url);\n      this.imgNode.css({ 'max-width': '100%' });\n    }\n    else if ('sounding' in visibleResource) {\n      if (this.imgNode !== undefined) {\n        this.imgNode = undefined;\n        this.resourceNode.empty();\n      }\n      if (this.thermodynamicDiagram === undefined)\n        this.thermodynamicDiagram = new ThermodynamicDiagram({\n          renderTo: this.resourceNode\n        });\n      let isAppended = false;\n      this.thermodynamicDiagram.soundings.forEach(sounding => {\n        if (sounding.getSounding() === visibleResource.sounding) {\n          isAppended = true;\n          sounding.visible(true);\n        }\n        else\n          sounding.visible(false);\n      });\n      if (!isAppended)\n        this.thermodynamicDiagram.addSounding(visibleResource.sounding);\n    }\n    else {\n      this.imgNode = undefined;\n      this.resourceNode.empty();\n    }\n  }\n}\nexport default Simple;","/**\n * @module meteoJS\n */\n\n/**\n * jQuery object.\n * \n * @external jQuery\n * @see {@link https://api.jquery.com|API Doc}\n */\n\n/**\n * Any HTML element.\n * \n * @external HTMLElement\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement}\n */\n\n/**\n * Any event.\n * \n * @external Event\n * @see {@link https://developer.mozilla.org/de/docs/Web/API/Event}\n */\n\n/**\n * XMLHttpRequest object.\n * \n * @external XMLHttpRequest\n * @see {@link https://developer.mozilla.org/de/docs/Web/API/XMLHttpRequest}\n */\n\n/**\n * SVG object.\n * \n * @external SVG\n * @see {@link https://svgjs.com/docs/3.0/|API Doc}\n */\n\nimport 'regenerator-runtime/runtime.js';\n\nimport * as calc from './calc.js';\nexport { calc };\n\nimport { default as addEventFunctions } from './Events.js';\nexport const events = {\n  addEventFunctions\n};\n\nexport { default as RepetitiveRequests } from './RepetitiveRequests.js';\n\nexport { default as Timeline } from './Timeline.js';\nimport { default as Animation,\n  insertFrequencyInput,\n  insertFrequencyRange,\n  insertFrequencyButtonGroup,\n  insertRestartPauseInput,\n  insertRestartPauseRange,\n  insertRestartPauseButtonGroup } from './timeline/Animation.js';\nimport { default as ToggleButton } from './timeline/animation/ToggleButton.js';\nimport {\n  default as Visualisation,\n  makeTimeTextCallbackFunction\n} from './timeline/Visualisation.js';\nimport { default as Text } from './timeline/visualisation/Text.js';\nimport { default as Slider } from './timeline/visualisation/Slider.js';\nimport { default as bsButtons } from './timeline/visualisation/bsButtons.js';\nimport { default as bsDropdown } from './timeline/visualisation/bsDropdown.js';\nexport const timeline = {\n  Animation,\n  Visualisation,\n  makeTimeTextCallbackFunction,\n  animation: {\n    ToggleButton,\n    insertFrequencyInput,\n    insertFrequencyRange,\n    insertFrequencyButtonGroup,\n    insertRestartPauseInput,\n    insertRestartPauseRange,\n    insertRestartPauseButtonGroup\n  },\n  visualisation: {\n    Text,\n    Slider,\n    bsButtons,\n    bsDropdown\n  }\n};\n\nexport { default as Synview } from './Synview.js';\nimport { default as SynviewCollection } from './synview/Collection.js';\nimport { default as Map } from './synview/SynviewMap.js';\nimport { default as MapOL } from './synview/map/MapOL.js';\nimport { default as MapLL } from './synview/map/MapLL.js';\nimport { default as Resource } from './synview/Resource.js';\nimport { default as GeoJSON } from './synview/resource/GeoJSON.js';\nimport { default as GeoJSONTile } from './synview/resource/GeoJSONTile.js';\nimport { default as Image } from './synview/resource/Image.js';\nimport { default as OSM } from './synview/resource/OSM.js';\nimport { default as Vector } from './synview/resource/Vector.js';\nimport { default as VectorTile } from './synview/resource/VectorTile.js';\nimport { default as ResourceCollection } from './synview/ResourceCollection.js';\nimport { default as Tooltip } from './synview/Tooltip.js';\nimport { default as Type } from './synview/Type.js';\nimport { default as TypeCollection } from './synview/TypeCollection.js';\nexport const synview = {\n  Collection: SynviewCollection,\n  Map,\n  map: {\n    MapOL,\n    MapLL\n  },\n  Resource,\n  resource: {\n    GeoJSON,\n    GeoJSONTile,\n    Image,\n    OSM,\n    Vector,\n    VectorTile\n  },\n  ResourceCollection,\n  Tooltip,\n  Type,\n  TypeCollection\n};\n\nexport { Tooltip } from './Tooltip.js';\nimport BootstrapTooltip from './tooltip/BootstrapTooltip.js';\nexport const tooltip = {\n  BootstrapTooltip\n};\n\nexport { default as Modelviewer } from './Modelviewer.js';\nimport Variable from './modelviewer/Variable.js';\nimport TimeVariable from './modelviewer/TimeVariable.js';\nimport VariableCollection from './modelviewer/VariableCollection.js';\nimport Node from './modelviewer/Node.js';\nimport ModelviewerResource from './modelviewer/Resource.js';\nimport ModelviewerImage from './modelviewer/resource/Image.js';\nimport ModelviewerSounding from './modelviewer/resource/Sounding.js';\nimport Resources from './modelviewer/Resources.js';\nimport NWPResources from './modelviewer/NWPResources.js';\nimport Container from './modelviewer/Container.js';\nimport Display from './modelviewer/Display.js';\nimport Simple from './modelviewer/display/Simple.js';\nimport SelectNavigation from './modelviewer/display/SelectNavigation.js';\nexport const modelviewer = {\n  Variable,\n  TimeVariable,\n  VariableCollection,\n  Node,\n  Resource: ModelviewerResource,\n  resource: {\n    Image: ModelviewerImage,\n    Sounding: ModelviewerSounding\n  },\n  Resources,\n  NWPResources,\n  Container,\n  Display,\n  display: {\n    Simple,\n    SelectNavigation\n  }\n};\n\nexport { default as Sounding } from './Sounding.js';\nimport { default as Parcel } from './sounding/Parcel.js';\nexport const sounding = {\n  Parcel\n};\n\nexport { default as ThermodynamicDiagramPluggable } from './ThermodynamicDiagramPluggable.js';\nexport { default as ThermodynamicDiagram } from './ThermodynamicDiagram.js';\nimport CoordinateSystem from './thermodynamicDiagram/CoordinateSystem.js';\nimport StueveDiagram from './thermodynamicDiagram/coordinateSystem/StueveDiagram.js';\nimport Emagram from './thermodynamicDiagram/coordinateSystem/Emagram.js';\nimport SkewTlogPDiagram from './thermodynamicDiagram/coordinateSystem/SkewTlogPDiagram.js';\nimport DiagramSounding from './thermodynamicDiagram/DiagramSounding.js';\nimport Hodograph from './thermodynamicDiagram/Hodograph.js';\nimport TDDiagram from './thermodynamicDiagram/TDDiagram.js';\nimport { drawWindbarbInto } from './thermodynamicDiagram/Functions.js';\nimport WindbarbsProfile from './thermodynamicDiagram/WindbarbsProfile.js';\nimport WindspeedProfile from './thermodynamicDiagram/WindspeedProfile.js';\nimport xAxis from './thermodynamicDiagram/axes/xAxis.js';\nimport yAxis from './thermodynamicDiagram/axes/yAxis.js';\nexport const thermodynamicDiagram = {\n  CoordinateSystem,\n  coordinateSystem: {\n    StueveDiagram,\n    Emagram,\n    SkewTlogPDiagram\n  },\n  DiagramSounding,\n  Hodograph,\n  TDDiagram,\n  functions: {\n    drawWindbarbInto\n  },\n  WindbarbsProfile,\n  WindspeedProfile,\n  axes: {\n    xAxis,\n    yAxis\n  }\n};","/**\n * @module meteoJS/timeline/animation/togglebutton\n */\nimport $ from 'jquery';\nimport { insertFrequencyInput,\n  insertFrequencyRange,\n  insertRestartPauseInput } from '../Animation.js';\nimport biPlayFill from 'bootstrap-icons/icons/play-fill.svg';\nimport biPauseFill from 'bootstrap-icons/icons/pause-fill.svg';\n\n/**\n * Options for constructor.\n * \n * @typedef {Object} module:meteoJS/timeline/animation/togglebutton~options\n * @param {module:meteoJS/timeline/animation.Animation} animation Animation object.\n * @param {external:HTMLElement} node\n *   Node to append the button and the dropdown menu (if menu set to true).\n *   If this is a 'button' element, this will be the animation button and\n *   no menu is added.\n * @param {string|external:HTMLElement|undefined} [startedContent]\n *   Content or text of button node if animation is running.\n *   Default ist the Bootstrap\n *   {@link https://icons.getbootstrap.com/icons/pause-fill/|pause-fill} Icon.\n * @param {string|undefined} [startedClass]\n *   Classed added to button node if animation is running.\n * @param {string|external:HTMLElement|undefined} [stoppedContent]\n *   Content of button node if animation is stopped.\n *   Default ist the Bootstrap\n *   {@link https://icons.getbootstrap.com/icons/play-fill/|play-fill} Icon.\n * @param {string|undefined} [stoppedClass]\n *   Classed added to button node if animation is running.\n * @param {string|undefined} [classButton]\n *   Classed added to button node.\n * @param {boolean} [menu=true]\n *   Add dropdown menu for animation setup to the button. Ignored, if node is a\n *   button element.\n * @param {boolean} [menuImageFrequency=true]\n *   Show frequency configuration in the dropdown menu.\n * @param {string} [imageFrequencyCaption='Frequency']\n *   Label text for the frequency configuration in the dropdown menu.\n * @param {undefined|integer[]} [menuFrequencies]\n *   Array of frequencies for the range slider. If undefined the slider will be\n *   hidden.\n * @param {boolean} [menuRestartPause=true]\n *   Show restart pause configuration in the dropdown menu.\n * @param {string} [restartPauseCaption='Restart pause']\n *   Label text for the restart pause configuration in the dropdown menu.\n */\n\n/**\n * @classdesc\n * Object to style a button accordingly to the status of an animation object.\n * \n * <pre><code>import ToggleButton from 'meteojs/timeline/animation/ToggleButton';</code></pre>\n */\nexport class ToggleButton {\n  \n  /**\n   * @param {module:meteoJS/timeline/animation/togglebutton~options} options Options.\n   */\n  constructor(options = {}) {\n    let { animation = undefined,\n      node = undefined,\n      startedContent = undefined,\n      startedClass = undefined,\n      stoppedContent = undefined,\n      stoppedClass = undefined,\n      classButton = undefined,\n      classDropdownToggle = undefined,\n      menu = true,\n      menuImageFrequency = true,\n      imageFrequencyCaption = 'Frequency',\n      menuFrequencies = undefined,\n      menuRestartPause = true,\n      restartPauseCaption = 'Restart pause' } = options;\n    if (!('startedContent' in options))\n      startedContent = $(biPauseFill);\n    if (!('stoppedContent' in options))\n      stoppedContent = $(biPlayFill);\n    /**\n     * @type meteoJS/timeline/animation/togglebutton~options\n     * @private\n     */\n    this.options = {\n      animation,\n      node,\n      startedContent,\n      startedClass,\n      stoppedContent,\n      stoppedClass,\n      classButton,\n      classDropdownToggle,\n      menu,\n      menuImageFrequency,\n      imageFrequencyCaption,\n      menuFrequencies,\n      menuRestartPause,\n      restartPauseCaption\n    };\n    \n    this.options.node = $(this.options.node);\n    let animationButton = this.options.node;\n    if (!this.options.node.is('button')) {\n      animationButton = $('<button>').addClass('btn');\n      this.options.node.append(animationButton);\n    }\n    animationButton.addClass(this.options.classButton);\n    \n    let onStart = () => {\n      animationButton.removeClass(this.options.stoppedClass);\n      animationButton.addClass(this.options.startedClass);\n      animationButton.empty();\n      if (typeof this.options.startedContent === 'string' ||\n          this.options.startedContent instanceof String)\n        animationButton.text(this.options.startedContent);\n      else\n        animationButton.append(this.options.startedContent);\n    };\n    let onStop = () => {\n      animationButton.removeClass(this.options.startedClass);\n      animationButton.addClass(this.options.stoppedClass);\n      animationButton.empty();\n      if (typeof this.options.stoppedContent === 'string' ||\n          this.options.stoppedContent instanceof String)\n        animationButton.text(this.options.stoppedContent);\n      else\n        animationButton.append(this.options.stoppedContent);\n    };\n    this.options.animation.on('start:animation', onStart);\n    this.options.animation.on('stop:animation', onStop);\n    animationButton.click(() => this.options.animation.toggle());\n    this.options.animation.isStarted() ? onStart() : onStop();\n    \n    if (!this.options.node.is('button') &&\n        this.options.menu) {\n      // Add dropdown menu\n      this.options.node.addClass('btn-group');\n      let btnDropdown = $('<button>')\n        .attr('type', 'button')\n        .addClass('btn dropdown-toggle dropdown-toggle-split')\n        .addClass(this.options.classDropdownToggle)\n        .attr('data-bs-toggle', 'dropdown')\n        .attr('aria-expanded', false);\n      btnDropdown.append($('<span>')\n        .addClass('visually-hidden')\n        .text('Toggle Dropdown'));\n      this.options.node.append(btnDropdown);\n      let menuDropdown = $('<div>')\n        .addClass('dropdown-menu');\n      this.options.node.append(menuDropdown);\n      \n      let form = $('<form>').addClass('px-4 py-3');\n      if (this.options.menuImageFrequency || this.options.menuRestartPause)\n        menuDropdown.append(form);\n\n      if (this.options.menuImageFrequency) {\n        const label = $('<label>')\n          .addClass('form-label')\n          .text(this.options.imageFrequencyCaption);\n        const div = $('<div>').append(label);\n        if (this.options.menuRestartPause)\n          div.addClass('mb-3');\n        form.append(div);\n        insertFrequencyInput(div, {\n          animation: this.options.animation\n        });\n        if (this.options.menuFrequencies !== undefined)\n          insertFrequencyRange(div, {\n            animation: this.options.animation,\n            frequencies: this.options.menuFrequencies\n          });\n      }\n      \n      if (this.options.menuRestartPause) {\n        const label = $('<label>')\n          .addClass('form-label')\n          .text(this.options.restartPauseCaption);\n        const div = $('<div>').append(label);\n        form.append(div);\n        insertRestartPauseInput(div, {\n          animation: this.options.animation\n        });\n      }\n    }\n  }\n  \n}\nexport default ToggleButton;","/**\n * @module meteoJS/modelviewer/display/selectNavigation\n */\nimport $ from 'jquery';\nimport Simple from './Simple.js';\n\n/**\n * @classdesc \n */\nexport class SelectNavigation extends Simple {\n  \n  constructor({ ignoreVariableCollections = [],\n    selectCaption = false,\n    navigationClass = undefined,\n    selectDivClass = undefined,\n    selectClass = undefined } = {}) {\n    super();\n    \n    this.options = {\n      ignoreVariableCollections: new Set(ignoreVariableCollections),\n      selectCaption,\n      navigationClass,\n      selectDivClass,\n      selectClass\n    };\n    \n    /**\n     * @type undefined|jQuery\n     * @private\n     */\n    this.navigationNode = undefined;\n    \n    /**\n     * @type Map<module:meteoJS/modelviewer/variableCollection.variableCollection,jQuery>\n     * @private\n     */\n    this.selectNodes = new Map();\n  }\n  \n  /**\n   * @override\n   */\n  onInit() {\n    if (this.parentNode === undefined)\n      return;\n    this.navigationNode = $('<div>').addClass(this.options.navigationClass);\n    this.resourceNode = $('<div>');\n    $(this.parentNode).empty().append(this.navigationNode, this.resourceNode);\n    if (this.modelviewer !== undefined)\n      this.modelviewer.resources.variableCollections\n        .filter(collection => !this.options.ignoreVariableCollections.has(collection) && collection.count > 0)\n        .forEach(collection => this._appendSelectNode(collection));\n    this._changeSelected();\n  }\n  \n  onChangeVisibleResource({ variable } = {}) {\n    super.onChangeVisibleResource({ variable });\n    this._changeSelected();\n  }\n  \n  onAppendVariable(variable) {\n    if (this.selectNodes.has(variable.variableCollection))\n      this._appendOptionNode(this.selectNodes.get(variable.variableCollection), variable);\n    else\n      this._appendSelectNode(variable.variableCollection);\n    this._changeSelected();\n  }\n  \n  _appendSelectNode(variableCollection) {\n    let selectNode = $('<select>').addClass(this.options.selectClass);\n    selectNode.on('change', () => {\n      let variable = variableCollection.getItemById(selectNode.val());\n      this.container.exchangeDisplayVariable = [ variable ];\n    });\n    if (this.options.selectCaption) {\n      let captionOption = $('<option>').text(variableCollection.name).attr('disabled', 'disabled').prop('selected', 'selected');\n      selectNode.append(captionOption);\n    }\n    variableCollection.variables.forEach(variable => {\n      this._appendOptionNode(selectNode, variable);\n    });\n    this.navigationNode.append($('<div>').addClass(this.options.selectDivClass).append(selectNode));\n    this.selectNodes.set(variableCollection, selectNode);\n  }\n  \n  _appendOptionNode(selectNode, variable) {\n    let option =\n      $('<option>')\n        .attr('value', variable.id)\n        .text(variable.name)\n        .addClass(this.options.optionsClass);\n    selectNode.append(option);\n  }\n  \n  _changeSelected() {\n    for (let variableCollection of this.selectNodes.keys()) {\n      if (!this.selectNodes.has(variableCollection))\n        continue;\n      let variable = this.container.visibleResource.getVariableByVariableCollection(variableCollection);\n      this.selectNodes.get(variableCollection).val(variable.id);\n    }\n  }\n}\nexport default SelectNavigation;"],"sourceRoot":""}
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index b645d3bb..e41b5eec 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
 {
   "name": "meteojs",
-  "version": "1.14.7",
+  "version": "1.15.0",
   "lockfileVersion": 2,
   "requires": true,
   "packages": {
diff --git a/package.json b/package.json
index 87ee336a..e8c63d0c 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "meteojs",
-  "version": "1.14.7",
+  "version": "1.15.0",
   "description": "library for meteorological and atmospheric science tools",
   "keywords": [
     "meteorology",