diff --git a/CHANGELOG.md b/CHANGELOG.md index 47a830715b8..fed773df368 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,86 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.0.0] - 2022-12-15 + +### Added + +- Python wheel for Python 3.11. + + +- `residual_plot()`. + + See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot/blob/master/docs/f-22e/residual_plot.ipynb). + +- `geom_area_ridges()`. + + See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot/blob/master/docs/f-22e/ridgeline_plot.ipynb). + +- `geom_pie()`. + + See: [example notebook](https://nbviewer.jupyter.org/github/JetBrains/lets-plot/blob/master/docs/f-22e/geom_pie.ipynb). + + +- Annotations for pie chart: + + See: [example notebook](https://nbviewer.jupyter.org/github/JetBrains/lets-plot/blob/master/docs/f-22e/annotations_for_pie.ipynb). + +- New variables computed by `'count'` and `'count2d'` statistics: `'..sum..'`, `'..prop..'`, `'..proppct..'`. + + See: [example notebook](https://nbviewer.jupyter.org/github/JetBrains/lets-plot/blob/master/docs/f-22e/stat_count(2d)_vars.ipynb). + + +- Maps: + + - "Spatial pies" on interactive maps. + + See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot/blob/master/docs/f-22e/titanic.ipynb). + + - The `flat` parameter for `geom_path()` and `geom_segment()` (replaces the retired `geodesic` parameter in `geom_livemap`). + + See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot/blob/master/docs/f-22e/param_flat.ipynb). + + +- Static maps: + + - The value "provided" for `use_crs` parameter. + + See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot/blob/master/docs/f-22e/projection_provided.ipynb). + + +- `geom_imshow()`: + + - Improved performance by orders of magnitude. + + - Transparency of `NaN` values in grayscale images [[#631](https://github.com/JetBrains/lets-plot/issues/631)]. + See: [example notebook](https://nbviewer.jupyter.org/github/JetBrains/lets-plot/blob/master/docs/f-22e/image_nan_values.ipynb). + + - `alpha` parameter [[#630](https://github.com/JetBrains/lets-plot/issues/630)]. + See: [example notebook](https://nbviewer.jupyter.org/github/JetBrains/lets-plot/blob/master/docs/f-22e/image_alpha_param.ipynb). + + +- `tails_cutoff` parameter in `geom_violin()` + See: [example notebook](https://nbviewer.jupyter.org/github/JetBrains/lets-plot/blob/master/docs/f-22e/violin_tails_cutoff.ipynb). + + +### Changed + +- [BREAKING] Dropped support for Python 3.6 as it is in the ["end-of-life"](https://devguide.python.org/versions/) of its release cycle. +- [BREAKING] `geom_livemap()` itself no longer draws geometries, so the following options are no longer supported: + `symbol`, `data`, `mapping`, `map`, `map_join`, `ontop`, `stat`, `position`, `show_legend`, `sampling`, `tooltips`. + To draw **point** and **pie** markers on map, please, use the `geom_point()` and `geom_pie()` geometry layers. +- Java/Swing platf.: Apache Batik upgraded to v.1.16 [[#624](https://github.com/JetBrains/lets-plot/issues/624)], [[LPK #140](https://github.com/JetBrains/lets-plot-kotlin/issues/140)]. +- The default size is increased for the plot title and decreased for the caption. +- Upgraded Kotlin version to 1.7.21 (was 1.7.20). + +### Fixed + +- Themes: can't change plot background after applying a "flavor" [[#623](https://github.com/JetBrains/lets-plot/issues/623)]. +- Layout: uneven left/right, top/bottom plot margins [[#625](https://github.com/JetBrains/lets-plot/issues/625)]. +- A plot building error with empty data on various geoms. +- Precision error in gradient [[#634](https://github.com/JetBrains/lets-plot/issues/634)]. +- geom_livemap: wrong position when datapoints geodesic line goes close to the N.P. [[#645](https://github.com/JetBrains/lets-plot/issues/645)]. + ## [2.5.1] - 2022-11-03 ### Added diff --git a/build.gradle b/build.gradle index 36394f42642..872418a2495 100644 --- a/build.gradle +++ b/build.gradle @@ -62,8 +62,8 @@ configurations { allprojects { group = 'org.jetbrains.lets-plot' - version = "3.0.1-alpha1" - project.ext.js_artifact_version = "3.0.1.dev1" + version = "3.0.0" + project.ext.js_artifact_version = "3.0.0" // see also: python-package/lets_plot/_version.py // Generate JVM 1.8 bytecode diff --git a/future_changes.md b/future_changes.md index ab29d5adb15..c765d12c6dd 100644 --- a/future_changes.md +++ b/future_changes.md @@ -1,79 +1,7 @@ -## [3.0.0] - 2022-12-?? +## [3.0.1] - 2023-??-?? ### Added -- Python wheel for Python 3.11. - - -- `residual_plot()`. - - See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot/blob/master/docs/f-22e/residual_plot.ipynb). - -- `geom_area_ridges()`. - - See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot/blob/master/docs/f-22e/ridgeline_plot.ipynb). - -- `geom_pie()`. - - See: [example notebook](https://nbviewer.jupyter.org/github/JetBrains/lets-plot/blob/master/docs/f-22e/geom_pie.ipynb). - - -- Annotations for pie chart: - - See: [example notebook](https://nbviewer.jupyter.org/github/JetBrains/lets-plot/blob/master/docs/f-22e/annotations_for_pie.ipynb). - -- New variables computed by `'count'` and `'count2d'` statistics: `'..sum..'`, `'..prop..'`, `'..proppct..'`. - - See: [example notebook](https://nbviewer.jupyter.org/github/JetBrains/lets-plot/blob/master/docs/f-22e/stat_count(2d)_vars.ipynb). - - -- Maps: - - - "Spatial pies" on interactive maps. - - See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot/blob/master/docs/f-22e/titanic.ipynb). - - - The `flat` parameter for `geom_path()` and `geom_segment()` (replaces the retired `geodesic` parameter in `geom_livemap`). - - See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot/blob/master/docs/f-22e/param_flat.ipynb). - - -- Static maps: - - - The value "provided" for `use_crs` parameter. - - See: [example notebook](https://nbviewer.org/github/JetBrains/lets-plot/blob/master/docs/f-22e/projection_provided.ipynb). - - -- `geom_imshow()`: - - - Improved performance by orders of magnitude. - - - Transparency of `NaN` values in grayscale images [[#631](https://github.com/JetBrains/lets-plot/issues/631)]. - See: [example notebook](https://nbviewer.jupyter.org/github/JetBrains/lets-plot/blob/master/docs/f-22e/image_nan_values.ipynb). - - - `alpha` parameter [[#630](https://github.com/JetBrains/lets-plot/issues/630)]. - See: [example notebook](https://nbviewer.jupyter.org/github/JetBrains/lets-plot/blob/master/docs/f-22e/image_alpha_param.ipynb). - - -- `tails_cutoff` parameter in `geom_violin()` - See: [example notebook](https://nbviewer.jupyter.org/github/JetBrains/lets-plot/blob/master/docs/f-22e/violin_tails_cutoff.ipynb). - - ### Changed -- [BREAKING] Dropped support for Python 3.6 as it is in the ["end-of-life"](https://devguide.python.org/versions/) of its release cycle. -- [BREAKING] `geom_livemap()` itself no longer draws geometries, so the following options are no longer supported: - `symbol`, `data`, `mapping`, `map`, `map_join`, `ontop`, `stat`, `position`, `show_legend`, `sampling`, `tooltips`. - To draw **point** and **pie** markers on map, please, use the `geom_point()` and `geom_pie()` geometry layers. -- Java/Swing platf.: Apache Batik upgraded to v.1.16 [[#624](https://github.com/JetBrains/lets-plot/issues/624)], [[LPK #140](https://github.com/JetBrains/lets-plot-kotlin/issues/140)]. -- The default size is increased for the plot title and decreased for the caption. -- Upgraded Kotlin version to 1.7.21 (was 1.7.20). - ### Fixed - -- Themes: can't change plot background after applying a "flavor" [[#623](https://github.com/JetBrains/lets-plot/issues/623)]. -- Layout: uneven left/right, top/bottom plot margins [[#625](https://github.com/JetBrains/lets-plot/issues/625)]. -- A plot building error with empty data on various geoms. -- Precision error in gradient [[#634](https://github.com/JetBrains/lets-plot/issues/634)]. -- geom_livemap: wrong position when datapoints geodesic line goes close to the N.P. [[#645](https://github.com/JetBrains/lets-plot/issues/645)]. \ No newline at end of file diff --git a/js-package/distr/lets-plot.js b/js-package/distr/lets-plot.js index bdc8cb4d307..4e291c32c21 100644 --- a/js-package/distr/lets-plot.js +++ b/js-package/distr/lets-plot.js @@ -215,7 +215,7 @@ eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPAC \*********************************************************************/ /***/ (function(module, exports, __webpack_require__) { -eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (root, factory) {\n if (true)\n !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! kotlin */ \"./kotlin-dce-dev/kotlin.js\"), __webpack_require__(/*! lets-plot-base-portable-js-legacy */ \"./kotlin-dce-dev/lets-plot-base-portable-js-legacy.js\"), __webpack_require__(/*! lets-plot-plot-base-portable-js-legacy */ \"./kotlin-dce-dev/lets-plot-plot-base-portable-js-legacy.js\"), __webpack_require__(/*! lets-plot-vis-svg-portable-js-legacy */ \"./kotlin-dce-dev/lets-plot-vis-svg-portable-js-legacy.js\"), __webpack_require__(/*! lets-plot-plot-common-portable-js-legacy */ \"./kotlin-dce-dev/lets-plot-plot-common-portable-js-legacy.js\")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n else {}\n}(this, function (_, Kotlin, $module$lets_plot_base_portable_js_legacy, $module$lets_plot_plot_base_portable_js_legacy, $module$lets_plot_vis_svg_portable_js_legacy, $module$lets_plot_plot_common_portable_js_legacy) {\n 'use strict';\n var Kind_OBJECT = Kotlin.Kind.OBJECT;\n var zip = Kotlin.kotlin.collections.zip_45mdf7$;\n var ArrayList_init = Kotlin.kotlin.collections.ArrayList_init_287e2$;\n var DoubleVector = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.geometry.DoubleVector;\n var Pair = Kotlin.kotlin.Pair;\n var IllegalStateException_init = Kotlin.kotlin.IllegalStateException_init_pdl1vj$;\n var Kind_CLASS = Kotlin.Kind.CLASS;\n var Scale = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.Scale;\n var Kind_INTERFACE = Kotlin.Kind.INTERFACE;\n var scale = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.scale;\n var util = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.util;\n var YOrientationAesthetics = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.util.YOrientationAesthetics;\n var getCallableRef = Kotlin.getCallableRef;\n var toSet = Kotlin.kotlin.collections.toSet_7wnvza$;\n var Enum = Kotlin.kotlin.Enum;\n var throwISE = Kotlin.throwISE;\n var LinkedHashMap_init = Kotlin.kotlin.collections.LinkedHashMap_init_q3lmfv$;\n var getValue = Kotlin.kotlin.collections.getValue_t9ocha$;\n var listOf = Kotlin.kotlin.collections.listOf_mh5how$;\n var first = Kotlin.kotlin.collections.first_2p1efm$;\n var to = Kotlin.kotlin.to_ujzrz7$;\n var mapOf = Kotlin.kotlin.collections.mapOf_qfcya0$;\n var Aes = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.Aes;\n var transform = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.scale.transform;\n var mapCapacity = Kotlin.kotlin.collections.mapCapacity_za3lpa$;\n var LinkedHashMap_init_0 = Kotlin.kotlin.collections.LinkedHashMap_init_bwtc7$;\n var svg = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.render.svg;\n var SvgCssResource = $module$lets_plot_vis_svg_portable_js_legacy.jetbrains.datalore.vis.svg.SvgCssResource;\n var CompositeRegistration = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.registration.CompositeRegistration;\n var SvgSvgElement = $module$lets_plot_vis_svg_portable_js_legacy.jetbrains.datalore.vis.svg.SvgSvgElement;\n var base = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.gcommon.base;\n var TextLabel = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.render.svg.TextLabel;\n var Text$HorizontalAnchor = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.render.svg.Text.HorizontalAnchor;\n var Text$VerticalAnchor = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.render.svg.Text.VerticalAnchor;\n var RuntimeException = Kotlin.kotlin.RuntimeException;\n var Unit = Kotlin.kotlin.Unit;\n var emptyList = Kotlin.kotlin.collections.emptyList_287e2$;\n var Registration = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.registration.Registration;\n var DoubleRectangle = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.geometry.DoubleRectangle;\n var SvgRectElement_init = $module$lets_plot_vis_svg_portable_js_legacy.jetbrains.datalore.vis.svg.SvgRectElement_init_wthzt5$;\n var Color = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.values.Color;\n var plus = Kotlin.kotlin.collections.plus_mydzjv$;\n var DoubleRectangle_init = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.geometry.DoubleRectangle_init_6y0v78$;\n var ensureNotNull = Kotlin.ensureNotNull;\n var listOf_0 = Kotlin.kotlin.collections.listOf_i5x0yv$;\n var MultilineLabel = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.render.svg.MultilineLabel;\n var toString = Kotlin.toString;\n var SvgEventSpec = $module$lets_plot_vis_svg_portable_js_legacy.jetbrains.datalore.vis.svg.event.SvgEventSpec;\n var println = Kotlin.kotlin.io.println_s8jyv4$;\n var SvgEventHandler = $module$lets_plot_vis_svg_portable_js_legacy.jetbrains.datalore.vis.svg.event.SvgEventHandler;\n var logging = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.logging;\n var getKClass = Kotlin.getKClass;\n var SvgComponent = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.render.svg.SvgComponent;\n var flatten = Kotlin.kotlin.collections.flatten_u0ad8z$;\n var getPropertyCallableRef = Kotlin.getPropertyCallableRef;\n var Collection = Kotlin.kotlin.collections.Collection;\n var JsMath = Math;\n var NullGeomTargetCollector = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.NullGeomTargetCollector;\n var LiveMapGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.LiveMapGeom;\n var throwCCE = Kotlin.throwCCE;\n var collectionSizeOrDefault = Kotlin.kotlin.collections.collectionSizeOrDefault_ba2ldo$;\n var ArrayList_init_0 = Kotlin.kotlin.collections.ArrayList_init_ww73n8$;\n var lazy = Kotlin.kotlin.lazy_klfg04$;\n var HashMap_init = Kotlin.kotlin.collections.HashMap_init_q3lmfv$;\n var equals = Kotlin.equals;\n var AestheticsBuilder = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.aes.AestheticsBuilder;\n var data = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.data;\n var DoubleSpan = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.interval.DoubleSpan;\n var isNaN_0 = Kotlin.kotlin.isNaN_yrwdxr$;\n var ContinuousTransform = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.ContinuousTransform;\n var nativeSign = Math.sign;\n var SvgRoot = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.render.SvgRoot;\n var hashCode = Kotlin.hashCode;\n var TextStyle = $module$lets_plot_vis_svg_portable_js_legacy.jetbrains.datalore.vis.TextStyle;\n var Annotations = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.annotations.Annotations;\n var FontFamily = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.values.FontFamily;\n var FontFace = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.values.FontFace;\n var StringFormat = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.stringFormat.StringFormat;\n var AnnotationLineSpec = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.annotations.AnnotationLineSpec;\n var breaks = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.scale.breaks;\n var data_0 = $module$lets_plot_plot_common_portable_js_legacy.jetbrains.datalore.plot.common.data;\n var numberToInt = Kotlin.numberToInt;\n var Font = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.values.Font;\n var HashMap_init_0 = Kotlin.kotlin.collections.HashMap_init_73mtqc$;\n var afterOrientation = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.util.afterOrientation_aa6a3t$;\n var GeomBase = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.GeomBase;\n var ArrayList_init_1 = Kotlin.kotlin.collections.ArrayList_init_mqih57$;\n var TypedKeyHashMap = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.typedKey.TypedKeyHashMap;\n var pos = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.pos;\n var stat = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.stat;\n var SimpleStatContext = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.stat.SimpleStatContext;\n var GeomTargetLocator$LookupSpec = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.GeomTargetLocator.LookupSpec;\n var kotlin_js_internal_DoubleCompanionObject = Kotlin.kotlin.js.internal.DoubleCompanionObject;\n var coerceAtLeast = Kotlin.kotlin.ranges.coerceAtLeast_dqglrj$;\n var IllegalArgumentException_init = Kotlin.kotlin.IllegalArgumentException_init_pdl1vj$;\n var GeomContext = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.GeomContext;\n var Any = Object;\n var NoSuchElementException_init = Kotlin.kotlin.NoSuchElementException_init;\n var DoubleRectangle_init_0 = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.geometry.DoubleRectangle_init_7e97im$;\n var isFinite = Kotlin.kotlin.isFinite_yrwdxr$;\n var PlotContext$Layer = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.PlotContext.Layer;\n var PlotContext = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.PlotContext;\n var ScaleMapper = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.ScaleMapper;\n var HashSet_init = Kotlin.kotlin.collections.HashSet_init_mqih57$;\n var until = Kotlin.kotlin.ranges.until_dqglrj$;\n var toList = Kotlin.kotlin.collections.toList_7wnvza$;\n var distinct = Kotlin.kotlin.collections.distinct_7wnvza$;\n var toMap = Kotlin.kotlin.collections.toMap_6hr0sd$;\n var List = Kotlin.kotlin.collections.List;\n var sortedDescending = Kotlin.kotlin.collections.sortedDescending_exjks8$;\n var sorted = Kotlin.kotlin.collections.sorted_exjks8$;\n var PositionAdjustments$Meta = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.pos.PositionAdjustments.Meta;\n var filterNotNull = Kotlin.kotlin.collections.filterNotNull_m3lr2h$;\n var WithWidth = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.WithWidth;\n var geom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom;\n var WithHeight = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.WithHeight;\n var toList_0 = Kotlin.kotlin.toList_tt9upe$;\n var DiscreteTransform = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.DiscreteTransform;\n var checkIndexOverflow = Kotlin.kotlin.collections.checkIndexOverflow_za3lpa$;\n var listOfNotNull = Kotlin.kotlin.collections.listOfNotNull_jurz7g$;\n var get_indices = Kotlin.kotlin.collections.get_indices_gzk92b$;\n var UnsupportedOperationException_init = Kotlin.kotlin.UnsupportedOperationException_init_pdl1vj$;\n var sortedWith = Kotlin.kotlin.collections.sortedWith_eknfly$;\n var wrapFunction = Kotlin.wrapFunction;\n var Comparator = Kotlin.kotlin.Comparator;\n var L37 = Kotlin.Long.fromInt(37);\n var base_0 = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base;\n var PointGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.PointGeom;\n var GeomKind = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.GeomKind;\n var AestheticsDefaults = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.aes.AestheticsDefaults;\n var PathGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.PathGeom;\n var LineGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.LineGeom;\n var SmoothGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.SmoothGeom;\n var BarGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.BarGeom;\n var HistogramGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.HistogramGeom;\n var DotplotGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.DotplotGeom;\n var TileGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.TileGeom;\n var Bin2dGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.Bin2dGeom;\n var ErrorBarGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.ErrorBarGeom;\n var CrossBarGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.CrossBarGeom;\n var LineRangeGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.LineRangeGeom;\n var PointRangeGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.PointRangeGeom;\n var ContourGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.ContourGeom;\n var ContourfGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.ContourfGeom;\n var PolygonGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.PolygonGeom;\n var MapGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.MapGeom;\n var ABLineGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.ABLineGeom;\n var HLineGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.HLineGeom;\n var VLineGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.VLineGeom;\n var BoxplotGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.BoxplotGeom;\n var AreaRidgesGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.AreaRidgesGeom;\n var ViolinGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.ViolinGeom;\n var YDotplotGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.YDotplotGeom;\n var RibbonGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.RibbonGeom;\n var AreaGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.AreaGeom;\n var DensityGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.DensityGeom;\n var Density2dGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.Density2dGeom;\n var Density2dfGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.Density2dfGeom;\n var JitterGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.JitterGeom;\n var QQGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.QQGeom;\n var QQ2Geom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.QQ2Geom;\n var QQLineGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.QQLineGeom;\n var QQ2LineGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.QQ2LineGeom;\n var FreqpolyGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.FreqpolyGeom;\n var StepGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.StepGeom;\n var RectGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.RectGeom;\n var SegmentGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.SegmentGeom;\n var TextGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.TextGeom;\n var RasterGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.RasterGeom;\n var ImageGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.ImageGeom;\n var PieGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.PieGeom;\n var MappedDataAccess = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.MappedDataAccess;\n var coord = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.coord;\n var trimMargin = Kotlin.kotlin.text.trimMargin_rjktp$;\n var CoordinatesMapper = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.coord.CoordinatesMapper;\n var identity = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.spatial.projections.identity;\n var mercator = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.spatial.projections.mercator;\n var UNSUPPORTED = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.unsupported.UNSUPPORTED_61zpoe$;\n var geometry = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.geometry;\n var first_0 = Kotlin.kotlin.collections.first_7wnvza$;\n var DataFrame$DataFrame$Builder_init = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.DataFrame.Builder_init;\n var plus_0 = Kotlin.kotlin.collections.plus_iwxh38$;\n var maxOrNull = Kotlin.kotlin.collections.maxOrNull_exjks8$;\n var listOfNotNull_0 = Kotlin.kotlin.collections.listOfNotNull_issdgt$;\n var plus_1 = Kotlin.kotlin.collections.plus_q4559j$;\n var compareValues = Kotlin.kotlin.comparisons.compareValues_s00gnj$;\n var requireNoNulls = Kotlin.kotlin.collections.requireNoNulls_whsx6z$;\n var firstOrNull = Kotlin.kotlin.collections.firstOrNull_2p1efm$;\n var Comparable = Kotlin.kotlin.Comparable;\n var binarySearch = Kotlin.kotlin.collections.binarySearch_jhx6be$;\n var LinkedHashSet_init = Kotlin.kotlin.collections.LinkedHashSet_init_287e2$;\n var linkedSetOf = Kotlin.kotlin.collections.linkedSetOf_i5x0yv$;\n var plus_2 = Kotlin.kotlin.collections.plus_khz7k3$;\n var DataFrame$OrderSpec = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.DataFrame.OrderSpec;\n var minus = Kotlin.kotlin.collections.minus_2ws7j4$;\n var Map = Kotlin.kotlin.collections.Map;\n var toMutableMap = Kotlin.kotlin.collections.toMutableMap_abgq59$;\n var mapOf_0 = Kotlin.kotlin.collections.mapOf_x2b85n$;\n var emptyMap = Kotlin.kotlin.collections.emptyMap_q3lmfv$;\n var numberToDouble = Kotlin.numberToDouble;\n var asReversed = Kotlin.kotlin.collections.asReversed_2p1efm$;\n var values = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.values;\n var Listeners = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.observable.event.Listeners;\n var ListenerCaller = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.observable.event.ListenerCaller;\n var EventHandler = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.observable.event.EventHandler;\n var MouseEventSource = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.event.MouseEventSource;\n var svg_0 = $module$lets_plot_vis_svg_portable_js_legacy.jetbrains.datalore.vis.svg;\n var SvgLineElement_init = $module$lets_plot_vis_svg_portable_js_legacy.jetbrains.datalore.vis.svg.SvgLineElement_init_6y0v78$;\n var SvgLineElement = $module$lets_plot_vis_svg_portable_js_legacy.jetbrains.datalore.vis.svg.SvgLineElement;\n var SvgGElement = $module$lets_plot_vis_svg_portable_js_legacy.jetbrains.datalore.vis.svg.SvgGElement;\n var take = Kotlin.kotlin.collections.take_ba2ldo$;\n var takeLast = Kotlin.kotlin.collections.takeLast_yzln2o$;\n var last = Kotlin.kotlin.collections.last_2p1efm$;\n var reverse = Kotlin.kotlin.collections.reverse_vvxzk3$;\n var SvgRectElement_init_0 = $module$lets_plot_vis_svg_portable_js_legacy.jetbrains.datalore.vis.svg.SvgRectElement_init_6y0v78$;\n var isBlank = Kotlin.kotlin.text.isBlank_gw00vp$;\n var GroupComponent = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.render.svg.GroupComponent;\n var ContextualMapping = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.ContextualMapping;\n var minus_0 = Kotlin.kotlin.collections.minus_q4559j$;\n var toMutableList = Kotlin.kotlin.collections.toMutableList_4c7yge$;\n var GeomTargetLocator$LookupStrategy = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.GeomTargetLocator.LookupStrategy;\n var GeomTargetLocator$LookupSpace = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.GeomTargetLocator.LookupSpace;\n var DoubleSegment = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.geometry.DoubleSegment;\n var Disposable = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.registration.Disposable;\n var contains = Kotlin.kotlin.collections.contains_2ws7j4$;\n var TipLayoutHint = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.TipLayoutHint;\n var addAll = Kotlin.kotlin.collections.addAll_ipc267$;\n var withIndex = Kotlin.kotlin.collections.withIndex_7wnvza$;\n var reversed = Kotlin.kotlin.collections.reversed_7wnvza$;\n var GeomTargetCollector = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.GeomTargetCollector;\n var HitShape = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.HitShape;\n var GeomTargetLocator = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.GeomTargetLocator;\n var GeomTargetLocator$LookupResult = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.GeomTargetLocator.LookupResult;\n var TipLayoutHint$Kind = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.TipLayoutHint.Kind;\n var setOf = Kotlin.kotlin.collections.setOf_i5x0yv$;\n var plus_3 = Kotlin.kotlin.collections.plus_qloxvw$;\n var minOrNull = Kotlin.kotlin.collections.minOrNull_l63kqw$;\n var NoSuchElementException_init_0 = Kotlin.kotlin.NoSuchElementException;\n var HashSet_init_0 = Kotlin.kotlin.collections.HashSet_init_287e2$;\n var get_lastIndex = Kotlin.kotlin.collections.get_lastIndex_55thoc$;\n var checkCountOverflow = Kotlin.kotlin.collections.checkCountOverflow_za3lpa$;\n var splitRings = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.algorithms.splitRings_bemo1h$;\n var calculateArea = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.algorithms.calculateArea_ytws2g$;\n var PolylineSimplifier = $module$lets_plot_plot_common_portable_js_legacy.jetbrains.datalore.plot.common.geometry.PolylineSimplifier;\n var sortWith = Kotlin.kotlin.collections.sortWith_nqfjgj$;\n var GeomTarget = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.GeomTarget;\n var GeomTargetCollector$TooltipParams = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.GeomTargetCollector.TooltipParams;\n var sum = Kotlin.kotlin.collections.sum_plj8ka$;\n var maxOrNull_0 = Kotlin.kotlin.collections.maxOrNull_l63kqw$;\n var ScaleBreaks = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.scale.ScaleBreaks;\n var RuntimeException_init = Kotlin.kotlin.RuntimeException_init_pdl1vj$;\n var toRadians = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.math.toRadians_14dthe$;\n var UNSUPPORTED_0 = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.unsupported.UNSUPPORTED;\n var endsWith = Kotlin.kotlin.text.endsWith_7epoxm$;\n var trim = Kotlin.kotlin.text.trim_gw00vp$;\n var StringBuilder = Kotlin.kotlin.text.StringBuilder;\n var StyleSheet = $module$lets_plot_vis_svg_portable_js_legacy.jetbrains.datalore.vis.StyleSheet;\n var toBoxedChar = Kotlin.toBoxedChar;\n var unboxChar = Kotlin.unboxChar;\n var sum_0 = Kotlin.kotlin.collections.sum_l63kqw$;\n var iterator = Kotlin.kotlin.text.iterator_gw00vp$;\n var shuffle = Kotlin.kotlin.collections.shuffle_9jeydg$;\n var Random = Kotlin.kotlin.random.Random_s8cxhz$;\n var Random_0 = Kotlin.kotlin.random.Random;\n var round = Kotlin.kotlin.math.round_14dthe$;\n var MutableDouble = $module$lets_plot_plot_common_portable_js_legacy.jetbrains.datalore.plot.common.util.MutableDouble;\n var MutableInteger = $module$lets_plot_plot_common_portable_js_legacy.jetbrains.datalore.plot.common.util.MutableInteger;\n var asSequence = Kotlin.kotlin.collections.asSequence_7wnvza$;\n var map = Kotlin.kotlin.sequences.map_z5avom$;\n var reversed_0 = Kotlin.kotlin.comparisons.reversed_2avth4$;\n var sortedWith_0 = Kotlin.kotlin.sequences.sortedWith_vjgqpk$;\n var roundToInt = Kotlin.kotlin.math.roundToInt_yrwdxr$;\n var toList_1 = Kotlin.kotlin.sequences.toList_veqyi0$;\n var isClosed = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.algorithms.isClosed_2p1efm$;\n var AbstractList = Kotlin.kotlin.collections.AbstractList;\n var point = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.render.point;\n var NamedLineType = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.render.linetype.NamedLineType;\n var aes = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.aes;\n var DateTimeBreaksGen = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.scale.transform.DateTimeBreaksGen;\n var NamedShape = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.render.point.NamedShape;\n var NamedShape$values = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.render.point.NamedShape.values;\n var LinkedHashSet_init_0 = Kotlin.kotlin.collections.LinkedHashSet_init_mqih57$;\n var color = $module$lets_plot_plot_common_portable_js_legacy.jetbrains.datalore.plot.common.color;\n var ColorPalette$Type = $module$lets_plot_plot_common_portable_js_legacy.jetbrains.datalore.plot.common.color.ColorPalette.Type;\n var ColorPalette$Qualitative = $module$lets_plot_plot_common_portable_js_legacy.jetbrains.datalore.plot.common.color.ColorPalette.Qualitative;\n var ColorPalette$Sequential$valueOf = $module$lets_plot_plot_common_portable_js_legacy.jetbrains.datalore.plot.common.color.ColorPalette.Sequential.valueOf_61zpoe$;\n var ColorPalette$Diverging$valueOf = $module$lets_plot_plot_common_portable_js_legacy.jetbrains.datalore.plot.common.color.ColorPalette.Diverging.valueOf_61zpoe$;\n var ColorPalette$Qualitative$valueOf = $module$lets_plot_plot_common_portable_js_legacy.jetbrains.datalore.plot.common.color.ColorPalette.Qualitative.valueOf_61zpoe$;\n var IllegalArgumentException = Kotlin.kotlin.IllegalArgumentException;\n var ColorPalette$Sequential$values = $module$lets_plot_plot_common_portable_js_legacy.jetbrains.datalore.plot.common.color.ColorPalette.Sequential.values;\n var ColorPalette$Diverging$values = $module$lets_plot_plot_common_portable_js_legacy.jetbrains.datalore.plot.common.color.ColorPalette.Diverging.values;\n var ColorPalette$Qualitative$values = $module$lets_plot_plot_common_portable_js_legacy.jetbrains.datalore.plot.common.color.ColorPalette.Qualitative.values;\n var joinToString = Kotlin.kotlin.collections.joinToString_cgipc5$;\n var windowed = Kotlin.kotlin.collections.windowed_vo9c23$;\n var abs = Kotlin.kotlin.math.abs_za3lpa$;\n var HSV = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.values.HSV;\n var colormap = $module$lets_plot_plot_common_portable_js_legacy.jetbrains.datalore.plot.common.colormap;\n var rangeTo = Kotlin.kotlin.ranges.rangeTo_38ydlf$;\n var TooltipLineSpec$DataPoint = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.TooltipLineSpec.DataPoint;\n var throwUPAE = Kotlin.throwUPAE;\n var single = Kotlin.kotlin.collections.single_2p1efm$;\n var joinToString_0 = Kotlin.kotlin.collections.joinToString_fmv235$;\n var TooltipLineSpec = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.TooltipLineSpec;\n MarginSide.prototype = Object.create(Enum.prototype);\n MarginSide.prototype.constructor = MarginSide;\n PlotSvgComponent$buildPlot$ObjectLiteral.prototype = Object.create(Registration.prototype);\n PlotSvgComponent$buildPlot$ObjectLiteral.prototype.constructor = PlotSvgComponent$buildPlot$ObjectLiteral;\n PlotSvgComponent.prototype = Object.create(SvgComponent.prototype);\n PlotSvgComponent.prototype.constructor = PlotSvgComponent;\n PlotTile.prototype = Object.create(SvgComponent.prototype);\n PlotTile.prototype.constructor = PlotTile;\n SvgLayerRenderer.prototype = Object.create(SvgComponent.prototype);\n SvgLayerRenderer.prototype.constructor = SvgLayerRenderer;\n AnnotationLine.prototype = Object.create(LinesContentSpecification$Companion$LineSpec.prototype);\n AnnotationLine.prototype.constructor = AnnotationLine;\n ColorBarAssembler$createColorBar$ObjectLiteral.prototype = Object.create(LegendBoxInfo.prototype);\n ColorBarAssembler$createColorBar$ObjectLiteral.prototype.constructor = ColorBarAssembler$createColorBar$ObjectLiteral;\n ColorBarOptions.prototype = Object.create(GuideOptions.prototype);\n ColorBarOptions.prototype.constructor = ColorBarOptions;\n GuideOptions$Companion$NONE$ObjectLiteral.prototype = Object.create(GuideOptions.prototype);\n GuideOptions$Companion$NONE$ObjectLiteral.prototype.constructor = GuideOptions$Companion$NONE$ObjectLiteral;\n LegendAssembler$createLegend$ObjectLiteral.prototype = Object.create(LegendBoxInfo.prototype);\n LegendAssembler$createLegend$ObjectLiteral.prototype.constructor = LegendAssembler$createLegend$ObjectLiteral;\n LegendOptions.prototype = Object.create(GuideOptions.prototype);\n LegendOptions.prototype.constructor = LegendOptions;\n PosProvider$Companion$wrap$ObjectLiteral.prototype = Object.create(PosProvider.prototype);\n PosProvider$Companion$wrap$ObjectLiteral.prototype.constructor = PosProvider$Companion$wrap$ObjectLiteral;\n PosProvider$Companion$barStack$ObjectLiteral.prototype = Object.create(PosProvider.prototype);\n PosProvider$Companion$barStack$ObjectLiteral.prototype.constructor = PosProvider$Companion$barStack$ObjectLiteral;\n PosProvider$Companion$dodge$ObjectLiteral.prototype = Object.create(PosProvider.prototype);\n PosProvider$Companion$dodge$ObjectLiteral.prototype.constructor = PosProvider$Companion$dodge$ObjectLiteral;\n PosProvider$Companion$fill$ObjectLiteral.prototype = Object.create(PosProvider.prototype);\n PosProvider$Companion$fill$ObjectLiteral.prototype.constructor = PosProvider$Companion$fill$ObjectLiteral;\n PosProvider$Companion$jitter$ObjectLiteral.prototype = Object.create(PosProvider.prototype);\n PosProvider$Companion$jitter$ObjectLiteral.prototype.constructor = PosProvider$Companion$jitter$ObjectLiteral;\n PosProvider$Companion$nudge$ObjectLiteral.prototype = Object.create(PosProvider.prototype);\n PosProvider$Companion$nudge$ObjectLiteral.prototype.constructor = PosProvider$Companion$nudge$ObjectLiteral;\n PosProvider$Companion$jitterDodge$ObjectLiteral.prototype = Object.create(PosProvider.prototype);\n PosProvider$Companion$jitterDodge$ObjectLiteral.prototype.constructor = PosProvider$Companion$jitterDodge$ObjectLiteral;\n FacetGrid.prototype = Object.create(PlotFacets.prototype);\n FacetGrid.prototype.constructor = FacetGrid;\n FacetScales.prototype = Object.create(Enum.prototype);\n FacetScales.prototype.constructor = FacetScales;\n FacetWrap$Direction.prototype = Object.create(Enum.prototype);\n FacetWrap$Direction.prototype.constructor = FacetWrap$Direction;\n FacetWrap.prototype = Object.create(PlotFacets.prototype);\n FacetWrap.prototype.constructor = FacetWrap;\n GeomProvider$GeomProviderBuilder$build$ObjectLiteral.prototype = Object.create(GeomProvider.prototype);\n GeomProvider$GeomProviderBuilder$build$ObjectLiteral.prototype.constructor = GeomProvider$GeomProviderBuilder$build$ObjectLiteral;\n CartesianCoordProvider.prototype = Object.create(CoordProviderBase.prototype);\n CartesianCoordProvider.prototype.constructor = CartesianCoordProvider;\n FixedRatioCoordProvider.prototype = Object.create(CoordProviderBase.prototype);\n FixedRatioCoordProvider.prototype.constructor = FixedRatioCoordProvider;\n MarginalLayerCoordProvider.prototype = Object.create(CoordProviderBase.prototype);\n MarginalLayerCoordProvider.prototype.constructor = MarginalLayerCoordProvider;\n ProjectionCoordProvider.prototype = Object.create(CoordProviderBase.prototype);\n ProjectionCoordProvider.prototype.constructor = ProjectionCoordProvider;\n DefaultAxisTheme.prototype = Object.create(ThemeValuesAccess.prototype);\n DefaultAxisTheme.prototype.constructor = DefaultAxisTheme;\n DefaultFacetsTheme.prototype = Object.create(ThemeValuesAccess.prototype);\n DefaultFacetsTheme.prototype.constructor = DefaultFacetsTheme;\n DefaultLegendTheme.prototype = Object.create(ThemeValuesAccess.prototype);\n DefaultLegendTheme.prototype.constructor = DefaultLegendTheme;\n DefaultPanelGridTheme.prototype = Object.create(ThemeValuesAccess.prototype);\n DefaultPanelGridTheme.prototype.constructor = DefaultPanelGridTheme;\n DefaultPanelTheme.prototype = Object.create(ThemeValuesAccess.prototype);\n DefaultPanelTheme.prototype.constructor = DefaultPanelTheme;\n DefaultPlotTheme.prototype = Object.create(ThemeValuesAccess.prototype);\n DefaultPlotTheme.prototype.constructor = DefaultPlotTheme;\n DefaultTooltipsTheme.prototype = Object.create(ThemeValuesAccess.prototype);\n DefaultTooltipsTheme.prototype.constructor = DefaultTooltipsTheme;\n ThemeValuesBase.prototype = Object.create(ThemeValues.prototype);\n ThemeValuesBase.prototype.constructor = ThemeValuesBase;\n ThemeValuesLPMinimal2.prototype = Object.create(ThemeValues.prototype);\n ThemeValuesLPMinimal2.prototype.constructor = ThemeValuesLPMinimal2;\n ThemeValuesLPNone.prototype = Object.create(ThemeValuesBase.prototype);\n ThemeValuesLPNone.prototype.constructor = ThemeValuesLPNone;\n ThemeValuesRBW.prototype = Object.create(ThemeValues.prototype);\n ThemeValuesRBW.prototype.constructor = ThemeValuesRBW;\n ThemeValuesRClassic.prototype = Object.create(ThemeValues.prototype);\n ThemeValuesRClassic.prototype.constructor = ThemeValuesRClassic;\n ThemeValuesRGrey.prototype = Object.create(ThemeValues.prototype);\n ThemeValuesRGrey.prototype.constructor = ThemeValuesRGrey;\n ThemeValuesRLight.prototype = Object.create(ThemeValues.prototype);\n ThemeValuesRLight.prototype.constructor = ThemeValuesRLight;\n ThemeValuesRMinimal.prototype = Object.create(ThemeValues.prototype);\n ThemeValuesRMinimal.prototype.constructor = ThemeValuesRMinimal;\n MouseEventPeer$addEventHandler$ObjectLiteral.prototype = Object.create(Registration.prototype);\n MouseEventPeer$addEventHandler$ObjectLiteral.prototype.constructor = MouseEventPeer$addEventHandler$ObjectLiteral;\n AxisComponent.prototype = Object.create(SvgComponent.prototype);\n AxisComponent.prototype.constructor = AxisComponent;\n LegendBox.prototype = Object.create(SvgComponent.prototype);\n LegendBox.prototype.constructor = LegendBox;\n ColorBarComponent.prototype = Object.create(LegendBox.prototype);\n ColorBarComponent.prototype.constructor = ColorBarComponent;\n ColorBarComponentLayout.prototype = Object.create(LegendBoxLayout.prototype);\n ColorBarComponentLayout.prototype.constructor = ColorBarComponentLayout;\n ColorBarComponentLayout$HorizontalLayout.prototype = Object.create(ColorBarComponentLayout.prototype);\n ColorBarComponentLayout$HorizontalLayout.prototype.constructor = ColorBarComponentLayout$HorizontalLayout;\n ColorBarComponentLayout$VerticalLayout.prototype = Object.create(ColorBarComponentLayout.prototype);\n ColorBarComponentLayout$VerticalLayout.prototype.constructor = ColorBarComponentLayout$VerticalLayout;\n ColorBarComponentSpec.prototype = Object.create(LegendBoxSpec.prototype);\n ColorBarComponentSpec.prototype.constructor = ColorBarComponentSpec;\n LegendArrangement.prototype = Object.create(Enum.prototype);\n LegendArrangement.prototype.constructor = LegendArrangement;\n LegendComponent.prototype = Object.create(LegendBox.prototype);\n LegendComponent.prototype.constructor = LegendComponent;\n LegendComponentLayout.prototype = Object.create(LegendBoxLayout.prototype);\n LegendComponentLayout.prototype.constructor = LegendComponentLayout;\n LegendComponentLayout$MyHorizontal.prototype = Object.create(LegendComponentLayout.prototype);\n LegendComponentLayout$MyHorizontal.prototype.constructor = LegendComponentLayout$MyHorizontal;\n LegendComponentLayout$MyMultiRow.prototype = Object.create(LegendComponentLayout.prototype);\n LegendComponentLayout$MyMultiRow.prototype.constructor = LegendComponentLayout$MyMultiRow;\n LegendComponentLayout$MyHorizontalMultiRow.prototype = Object.create(LegendComponentLayout$MyMultiRow.prototype);\n LegendComponentLayout$MyHorizontalMultiRow.prototype.constructor = LegendComponentLayout$MyHorizontalMultiRow;\n LegendComponentLayout$MyVertical.prototype = Object.create(LegendComponentLayout$MyMultiRow.prototype);\n LegendComponentLayout$MyVertical.prototype.constructor = LegendComponentLayout$MyVertical;\n LegendComponentSpec.prototype = Object.create(LegendBoxSpec.prototype);\n LegendComponentSpec.prototype.constructor = LegendComponentSpec;\n LegendDirection.prototype = Object.create(Enum.prototype);\n LegendDirection.prototype.constructor = LegendDirection;\n Orientation.prototype = Object.create(Enum.prototype);\n Orientation.prototype.constructor = Orientation;\n MathUtil$ClosestPointChecker$COMPARISON_RESULT.prototype = Object.create(Enum.prototype);\n MathUtil$ClosestPointChecker$COMPARISON_RESULT.prototype.constructor = MathUtil$ClosestPointChecker$COMPARISON_RESULT;\n LayerTargetLocator$Collector$CollectingStrategy.prototype = Object.create(Enum.prototype);\n LayerTargetLocator$Collector$CollectingStrategy.prototype.constructor = LayerTargetLocator$Collector$CollectingStrategy;\n PointTargetProjection.prototype = Object.create(TargetProjection.prototype);\n PointTargetProjection.prototype.constructor = PointTargetProjection;\n RectTargetProjection.prototype = Object.create(TargetProjection.prototype);\n RectTargetProjection.prototype.constructor = RectTargetProjection;\n PolygonTargetProjection.prototype = Object.create(TargetProjection.prototype);\n PolygonTargetProjection.prototype.constructor = PolygonTargetProjection;\n PathTargetProjection.prototype = Object.create(TargetProjection.prototype);\n PathTargetProjection.prototype.constructor = PathTargetProjection;\n FacetedPlotLayout.prototype = Object.create(PlotLayoutBase.prototype);\n FacetedPlotLayout.prototype.constructor = FacetedPlotLayout;\n LegendBoxInfo$Companion$EMPTY$ObjectLiteral.prototype = Object.create(LegendBoxInfo.prototype);\n LegendBoxInfo$Companion$EMPTY$ObjectLiteral.prototype.constructor = LegendBoxInfo$Companion$EMPTY$ObjectLiteral;\n SingleTilePlotLayout.prototype = Object.create(PlotLayoutBase.prototype);\n SingleTilePlotLayout.prototype.constructor = SingleTilePlotLayout;\n TextJustification$Companion$TextRotation.prototype = Object.create(Enum.prototype);\n TextJustification$Companion$TextRotation.prototype.constructor = TextJustification$Companion$TextRotation;\n AxisBreaksProviderFactory$FixedBreaksProviderFactory.prototype = Object.create(AxisBreaksProviderFactory.prototype);\n AxisBreaksProviderFactory$FixedBreaksProviderFactory.prototype.constructor = AxisBreaksProviderFactory$FixedBreaksProviderFactory;\n AxisBreaksProviderFactory$AdaptableBreaksProviderFactory.prototype = Object.create(AxisBreaksProviderFactory.prototype);\n AxisBreaksProviderFactory$AdaptableBreaksProviderFactory.prototype.constructor = AxisBreaksProviderFactory$AdaptableBreaksProviderFactory;\n HorizontalAxisLayouter.prototype = Object.create(AxisLayouter.prototype);\n HorizontalAxisLayouter.prototype.constructor = HorizontalAxisLayouter;\n VerticalAxisLayouter.prototype = Object.create(AxisLayouter.prototype);\n VerticalAxisLayouter.prototype.constructor = VerticalAxisLayouter;\n AbstractFixedBreaksLabelsLayout.prototype = Object.create(AxisLabelsLayout.prototype);\n AbstractFixedBreaksLabelsLayout.prototype.constructor = AbstractFixedBreaksLabelsLayout;\n HorizontalFixedBreaksLabelsLayout.prototype = Object.create(AbstractFixedBreaksLabelsLayout.prototype);\n HorizontalFixedBreaksLabelsLayout.prototype.constructor = HorizontalFixedBreaksLabelsLayout;\n HorizontalFlexBreaksLabelsLayout.prototype = Object.create(AxisLabelsLayout.prototype);\n HorizontalFlexBreaksLabelsLayout.prototype.constructor = HorizontalFlexBreaksLabelsLayout;\n HorizontalMultilineLabelsLayout.prototype = Object.create(AbstractFixedBreaksLabelsLayout.prototype);\n HorizontalMultilineLabelsLayout.prototype.constructor = HorizontalMultilineLabelsLayout;\n HorizontalSimpleLabelsLayout.prototype = Object.create(AbstractFixedBreaksLabelsLayout.prototype);\n HorizontalSimpleLabelsLayout.prototype.constructor = HorizontalSimpleLabelsLayout;\n HorizontalTiltedLabelsLayout.prototype = Object.create(AbstractFixedBreaksLabelsLayout.prototype);\n HorizontalTiltedLabelsLayout.prototype.constructor = HorizontalTiltedLabelsLayout;\n HorizontalVerticalLabelsLayout.prototype = Object.create(AbstractFixedBreaksLabelsLayout.prototype);\n HorizontalVerticalLabelsLayout.prototype.constructor = HorizontalVerticalLabelsLayout;\n VerticalFixedBreaksLabelsLayout.prototype = Object.create(AbstractFixedBreaksLabelsLayout.prototype);\n VerticalFixedBreaksLabelsLayout.prototype.constructor = VerticalFixedBreaksLabelsLayout;\n VerticalFlexBreaksLabelsLayout.prototype = Object.create(AxisLabelsLayout.prototype);\n VerticalFlexBreaksLabelsLayout.prototype.constructor = VerticalFlexBreaksLabelsLayout;\n GeomAreaInsets.prototype = Object.create(Insets.prototype);\n GeomAreaInsets.prototype.constructor = GeomAreaInsets;\n GroupSamplingBase.prototype = Object.create(SamplingBase.prototype);\n GroupSamplingBase.prototype.constructor = GroupSamplingBase;\n GroupRandomSampling.prototype = Object.create(GroupSamplingBase.prototype);\n GroupRandomSampling.prototype.constructor = GroupRandomSampling;\n GroupSystematicSampling.prototype = Object.create(GroupSamplingBase.prototype);\n GroupSystematicSampling.prototype.constructor = GroupSystematicSampling;\n PickSampling.prototype = Object.create(SamplingBase.prototype);\n PickSampling.prototype.constructor = PickSampling;\n RandomSampling.prototype = Object.create(SamplingBase.prototype);\n RandomSampling.prototype.constructor = RandomSampling;\n RandomStratifiedSampling.prototype = Object.create(SamplingBase.prototype);\n RandomStratifiedSampling.prototype.constructor = RandomStratifiedSampling;\n SystematicSampling.prototype = Object.create(SamplingBase.prototype);\n SystematicSampling.prototype.constructor = SystematicSampling;\n VertexSampling.prototype = Object.create(SamplingBase.prototype);\n VertexSampling.prototype.constructor = VertexSampling;\n VertexSampling$VertexVwSampling.prototype = Object.create(VertexSampling.prototype);\n VertexSampling$VertexVwSampling.prototype.constructor = VertexSampling$VertexVwSampling;\n VertexSampling$VertexDpSampling.prototype = Object.create(VertexSampling.prototype);\n VertexSampling$VertexDpSampling.prototype.constructor = VertexSampling$VertexDpSampling;\n VertexSampling$DoubleVectorComponentsList.prototype = Object.create(AbstractList.prototype);\n VertexSampling$DoubleVectorComponentsList.prototype.constructor = VertexSampling$DoubleVectorComponentsList;\n ContinuousOnlyMapperProvider.prototype = Object.create(MapperProviderBase.prototype);\n ContinuousOnlyMapperProvider.prototype.constructor = ContinuousOnlyMapperProvider;\n GuideMapperWithGuideBreaks.prototype = Object.create(GuideMapper.prototype);\n GuideMapperWithGuideBreaks.prototype.constructor = GuideMapperWithGuideBreaks;\n LinearNormalizingMapperProvider.prototype = Object.create(MapperProviderBase.prototype);\n LinearNormalizingMapperProvider.prototype.constructor = LinearNormalizingMapperProvider;\n AlphaMapperProvider.prototype = Object.create(LinearNormalizingMapperProvider.prototype);\n AlphaMapperProvider.prototype.constructor = AlphaMapperProvider;\n ColorBrewerMapperProvider.prototype = Object.create(MapperProviderBase.prototype);\n ColorBrewerMapperProvider.prototype.constructor = ColorBrewerMapperProvider;\n ColorGradient2MapperProvider.prototype = Object.create(ContinuousOnlyMapperProvider.prototype);\n ColorGradient2MapperProvider.prototype.constructor = ColorGradient2MapperProvider;\n ColorGradientMapperProvider.prototype = Object.create(MapperProviderBase.prototype);\n ColorGradientMapperProvider.prototype.constructor = ColorGradientMapperProvider;\n ColorGradientnMapperProvider.prototype = Object.create(MapperProviderBase.prototype);\n ColorGradientnMapperProvider.prototype.constructor = ColorGradientnMapperProvider;\n HSVColorMapperProvider.prototype = Object.create(MapperProviderBase.prototype);\n HSVColorMapperProvider.prototype.constructor = HSVColorMapperProvider;\n ColorHueMapperProvider.prototype = Object.create(HSVColorMapperProvider.prototype);\n ColorHueMapperProvider.prototype.constructor = ColorHueMapperProvider;\n ColormapMapperProvider.prototype = Object.create(MapperProviderBase.prototype);\n ColormapMapperProvider.prototype.constructor = ColormapMapperProvider;\n DirectlyProportionalMapperProvider.prototype = Object.create(ContinuousOnlyMapperProvider.prototype);\n DirectlyProportionalMapperProvider.prototype.constructor = DirectlyProportionalMapperProvider;\n GreyscaleLightnessMapperProvider.prototype = Object.create(HSVColorMapperProvider.prototype);\n GreyscaleLightnessMapperProvider.prototype.constructor = GreyscaleLightnessMapperProvider;\n IdentityDiscreteMapperProvider.prototype = Object.create(DiscreteOnlyMapperProvider.prototype);\n IdentityDiscreteMapperProvider.prototype.constructor = IdentityDiscreteMapperProvider;\n SizeAreaMapperProvider.prototype = Object.create(DirectlyProportionalMapperProvider.prototype);\n SizeAreaMapperProvider.prototype.constructor = SizeAreaMapperProvider;\n SizeMapperProvider.prototype = Object.create(LinearNormalizingMapperProvider.prototype);\n SizeMapperProvider.prototype.constructor = SizeMapperProvider;\n TooltipLine.prototype = Object.create(LinesContentSpecification$Companion$LineSpec.prototype);\n TooltipLine.prototype.constructor = TooltipLine;\n function FeatureSwitch() {\n FeatureSwitch_instance = this;\n this.PLOT_VIEW_TOOLBOX = false;\n this.PLOT_DEBUG_DRAWING = false;\n this.LEGEND_DEBUG_DRAWING = false;\n }\n FeatureSwitch.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'FeatureSwitch',\n interfaces: []\n };\n var FeatureSwitch_instance = null;\n function FeatureSwitch_getInstance() {\n if (FeatureSwitch_instance === null) {\n new FeatureSwitch();\n }\n return FeatureSwitch_instance;\n }\n function AxisUtil() {\n AxisUtil_instance = this;\n }\n AxisUtil.prototype.breaksData_zh7dbf$ = function (scaleBreaks, coord, flipAxis, horizontal) {\n var tmp$ = this.toAxisCoord_0(scaleBreaks, coord, flipAxis, horizontal);\n var breakCoords = tmp$.component1()\n , breakLabels = tmp$.component2();\n return new AxisComponent$BreaksData(breakCoords, breakLabels);\n };\n AxisUtil.prototype.toAxisCoord_0 = function (scaleBreaks, coord, flipAxis, horizontal) {\n var tmp$, tmp$_0;\n var breaksDataAndLabel = zip(scaleBreaks.transformedValues, scaleBreaks.labels);\n var axisBreaks = ArrayList_init();\n var axisLabels = ArrayList_init();\n tmp$ = breaksDataAndLabel.iterator();\n while (tmp$.hasNext()) {\n var tmp$_1 = tmp$.next();\n var br = tmp$_1.component1()\n , label = tmp$_1.component2();\n if (horizontal === true)\n tmp$_0 = new DoubleVector(br, 0.0);\n else if (horizontal === false)\n tmp$_0 = new DoubleVector(0.0, br);\n else\n tmp$_0 = Kotlin.noWhenBranchMatched();\n var it = tmp$_0;\n var block$result;\n if (flipAxis) {\n block$result = it.flip();\n } else {\n block$result = it;\n }\n var bpCoord = block$result;\n var bpClientCoord = coord.toClient_gpjtzr$(bpCoord);\n if (!(bpClientCoord != null && bpClientCoord.isFinite)) {\n continue;\n }\n var bpOnAxis = horizontal ? bpClientCoord.x : bpClientCoord.y;\n axisBreaks.add_11rb$(bpOnAxis);\n axisLabels.add_11rb$(label);\n }\n return new Pair(axisBreaks, axisLabels);\n };\n AxisUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'AxisUtil',\n interfaces: []\n };\n var AxisUtil_instance = null;\n function AxisUtil_getInstance() {\n if (AxisUtil_instance === null) {\n new AxisUtil();\n }\n return AxisUtil_instance;\n }\n function BogusScale() {\n }\n Object.defineProperty(BogusScale.prototype, 'name', {\n configurable: true,\n get: function () {\n throw IllegalStateException_init('Bogus scale is not supposed to be used.');\n }\n });\n Object.defineProperty(BogusScale.prototype, 'labelFormatter', {\n configurable: true,\n get: function () {\n throw IllegalStateException_init('Bogus scale is not supposed to be used.');\n }\n });\n Object.defineProperty(BogusScale.prototype, 'isContinuous', {\n configurable: true,\n get: function () {\n throw IllegalStateException_init('Bogus scale is not supposed to be used.');\n }\n });\n Object.defineProperty(BogusScale.prototype, 'isContinuousDomain', {\n configurable: true,\n get: function () {\n throw IllegalStateException_init('Bogus scale is not supposed to be used.');\n }\n });\n Object.defineProperty(BogusScale.prototype, 'multiplicativeExpand', {\n configurable: true,\n get: function () {\n throw IllegalStateException_init('Bogus scale is not supposed to be used.');\n }\n });\n Object.defineProperty(BogusScale.prototype, 'additiveExpand', {\n configurable: true,\n get: function () {\n throw IllegalStateException_init('Bogus scale is not supposed to be used.');\n }\n });\n Object.defineProperty(BogusScale.prototype, 'transform', {\n configurable: true,\n get: function () {\n throw IllegalStateException_init('Bogus scale is not supposed to be used.');\n }\n });\n BogusScale.prototype.hasBreaks = function () {\n throw IllegalStateException_init('Bogus scale is not supposed to be used.');\n };\n BogusScale.prototype.getScaleBreaks = function () {\n throw IllegalStateException_init('Bogus scale is not supposed to be used.');\n };\n BogusScale.prototype.getBreaksGenerator = function () {\n throw IllegalStateException_init('Bogus scale is not supposed to be used.');\n };\n BogusScale.prototype.with = function () {\n throw IllegalStateException_init('Bogus scale is not supposed to be used.');\n };\n BogusScale.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'BogusScale',\n interfaces: [Scale]\n };\n function DemoAndTest() {\n DemoAndTest_instance = this;\n }\n DemoAndTest.prototype.buildGeom_21esde$ = function (layer, xyAesBounds, coord, flippedAxis, targetCollector) {\n return SquareFrameOfReference$Companion_getInstance().buildGeom_y8ndk1$(layer, xyAesBounds, coord, flippedAxis, targetCollector);\n };\n DemoAndTest.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'DemoAndTest',\n interfaces: []\n };\n var DemoAndTest_instance = null;\n function DemoAndTest_getInstance() {\n if (DemoAndTest_instance === null) {\n new DemoAndTest();\n }\n return DemoAndTest_instance;\n }\n function FrameOfReference() {\n }\n FrameOfReference.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'FrameOfReference',\n interfaces: []\n };\n function FrameOfReferenceProvider() {\n }\n FrameOfReferenceProvider.prototype.createTileFrame_sd8y8$ = function (layoutInfo, coordProvider, debugDrawing, callback$default) {\n if (debugDrawing === void 0)\n debugDrawing = false;\n return callback$default ? callback$default(layoutInfo, coordProvider, debugDrawing) : this.createTileFrame_sd8y8$$default(layoutInfo, coordProvider, debugDrawing);\n };\n FrameOfReferenceProvider.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'FrameOfReferenceProvider',\n interfaces: []\n };\n function GeomLayer() {\n }\n GeomLayer.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'GeomLayer',\n interfaces: []\n };\n function GeomLayerListUtil() {\n GeomLayerListUtil_instance = this;\n }\n GeomLayerListUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'GeomLayerListUtil',\n interfaces: []\n };\n var GeomLayerListUtil_instance = null;\n function GeomLayerListUtil_getInstance() {\n if (GeomLayerListUtil_instance === null) {\n new GeomLayerListUtil();\n }\n return GeomLayerListUtil_instance;\n }\n function LayerRendererUtil() {\n LayerRendererUtil_instance = this;\n }\n LayerRendererUtil.prototype.createLayerRendererData_sqg2xh$ = function (layer) {\n var aestheticMappers = PlotUtil_getInstance().prepareLayerAestheticMappers_evxbuk$(layer, scale.Mappers.IDENTITY, scale.Mappers.IDENTITY);\n var aesthetics = PlotUtil_getInstance().createLayerAesthetics_6wb5xp$(layer, layer.renderedAes(), aestheticMappers);\n var block$result;\n var tmp$;\n tmp$ = layer.isYOrientation;\n if (tmp$ === true) {\n block$result = util.YOrientationBaseUtil.flipAesKeys_fzsz32$(aestheticMappers);\n } else if (tmp$ === false) {\n block$result = aestheticMappers;\n } else {\n block$result = Kotlin.noWhenBranchMatched();\n }\n var aestheticMappersAfterOrientation = block$result;\n var block$result_0;\n var tmp$_0;\n tmp$_0 = layer.isYOrientation;\n if (tmp$_0 === true) {\n block$result_0 = new YOrientationAesthetics(aesthetics);\n } else if (tmp$_0 === false) {\n block$result_0 = aesthetics;\n } else {\n block$result_0 = Kotlin.noWhenBranchMatched();\n }\n var aestheticsAfterOrientation = block$result_0;\n var $receiver = layer.renderedAes();\n var predicate = getCallableRef('hasBinding', function ($receiver, p1) {\n return $receiver.hasBinding_896ixz$(p1);\n }.bind(null, layer));\n var destination = ArrayList_init();\n var tmp$_1;\n tmp$_1 = $receiver.iterator();\n while (tmp$_1.hasNext()) {\n var element = tmp$_1.next();\n if (predicate(element))\n destination.add_11rb$(element);\n }\n var mappedAes = toSet(destination);\n var pos = PlotUtil_getInstance().createPositionAdjustment_h0u0lr$(layer.posProvider, aestheticsAfterOrientation);\n return new LayerRendererUtil$LayerRendererData(layer.geom, layer.geomKind, aestheticsAfterOrientation, aestheticMappersAfterOrientation, pos, layer.createContextualMapping(), mappedAes, layer.createAnnotations());\n };\n function LayerRendererUtil$LayerRendererData(geom, geomKind, aesthetics, aestheticMappers, pos, contextualMapping, mappedAes, annotations) {\n this.geom = geom;\n this.geomKind = geomKind;\n this.aesthetics = aesthetics;\n this.aestheticMappers = aestheticMappers;\n this.pos = pos;\n this.contextualMapping = contextualMapping;\n this.mappedAes = mappedAes;\n this.annotations = annotations;\n }\n LayerRendererUtil$LayerRendererData.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LayerRendererData',\n interfaces: []\n };\n LayerRendererUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'LayerRendererUtil',\n interfaces: []\n };\n var LayerRendererUtil_instance = null;\n function LayerRendererUtil_getInstance() {\n if (LayerRendererUtil_instance === null) {\n new LayerRendererUtil();\n }\n return LayerRendererUtil_instance;\n }\n function MarginSide(name, ordinal, id) {\n Enum.call(this);\n this.id_zg94u8$_0 = id;\n this.name$ = name;\n this.ordinal$ = ordinal;\n }\n function MarginSide_initFields() {\n MarginSide_initFields = function () {\n };\n MarginSide$LEFT_instance = new MarginSide('LEFT', 0, 'LEFT');\n MarginSide$RIGHT_instance = new MarginSide('RIGHT', 1, 'RIGHT');\n MarginSide$TOP_instance = new MarginSide('TOP', 2, 'TOP');\n MarginSide$BOTTOM_instance = new MarginSide('BOTTOM', 3, 'BOTTOM');\n }\n var MarginSide$LEFT_instance;\n function MarginSide$LEFT_getInstance() {\n MarginSide_initFields();\n return MarginSide$LEFT_instance;\n }\n var MarginSide$RIGHT_instance;\n function MarginSide$RIGHT_getInstance() {\n MarginSide_initFields();\n return MarginSide$RIGHT_instance;\n }\n var MarginSide$TOP_instance;\n function MarginSide$TOP_getInstance() {\n MarginSide_initFields();\n return MarginSide$TOP_instance;\n }\n var MarginSide$BOTTOM_instance;\n function MarginSide$BOTTOM_getInstance() {\n MarginSide_initFields();\n return MarginSide$BOTTOM_instance;\n }\n MarginSide.prototype.toString = function () {\n return 'MarginSide ' + this.id_zg94u8$_0;\n };\n MarginSide.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'MarginSide',\n interfaces: [Enum]\n };\n function MarginSide$values() {\n return [MarginSide$LEFT_getInstance(), MarginSide$RIGHT_getInstance(), MarginSide$TOP_getInstance(), MarginSide$BOTTOM_getInstance()];\n }\n MarginSide.values = MarginSide$values;\n function MarginSide$valueOf(name) {\n switch (name) {\n case 'LEFT':\n return MarginSide$LEFT_getInstance();\n case 'RIGHT':\n return MarginSide$RIGHT_getInstance();\n case 'TOP':\n return MarginSide$TOP_getInstance();\n case 'BOTTOM':\n return MarginSide$BOTTOM_getInstance();\n default:\n throwISE('No enum constant jetbrains.datalore.plot.builder.MarginSide.' + name);\n }\n }\n MarginSide.valueOf_61zpoe$ = MarginSide$valueOf;\n function MarginalLayerUtil() {\n MarginalLayerUtil_instance = this;\n this.MARGINAL_SCALE_0 = scale.Scales.continuousDomain_shloz7$('marginal', true);\n this.MARGINAL_SCALE_REVERSED_0 = this.MARGINAL_SCALE_0.with().continuousTransform_gxz7zd$(transform.Transforms.REVERSE).build();\n this.MARGINAL_SCALES_0 = mapOf([to(MarginSide$LEFT_getInstance(), this.MARGINAL_SCALE_REVERSED_0), to(MarginSide$TOP_getInstance(), this.MARGINAL_SCALE_0), to(MarginSide$RIGHT_getInstance(), this.MARGINAL_SCALE_0), to(MarginSide$BOTTOM_getInstance(), this.MARGINAL_SCALE_REVERSED_0)]);\n }\n MarginalLayerUtil.prototype.marginalLayersByMargin_relqli$ = function (marginalLayers) {\n var tmp$;\n var accumulator = LinkedHashMap_init();\n tmp$ = marginalLayers.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n var map = accumulator;\n var key = element.marginalSide;\n var tmp$_0;\n var value = map.get_11rb$(key);\n if (value == null) {\n var answer = ArrayList_init();\n map.put_xwzc9p$(key, answer);\n tmp$_0 = answer;\n } else {\n tmp$_0 = value;\n }\n tmp$_0.add_11rb$(element);\n accumulator = map;\n }\n return accumulator;\n };\n MarginalLayerUtil.prototype.marginalDomainByMargin_2z8kva$ = function (marginalLayers, scaleXProto, scaleYProto) {\n var scaleXYByMargin = this.scaleXYByMargin_0(scaleXProto, scaleYProto);\n var layersByMargin = this.marginalLayersByMargin_relqli$(marginalLayers);\n var destination = LinkedHashMap_init_0(mapCapacity(layersByMargin.size));\n var tmp$;\n tmp$ = layersByMargin.entries.iterator();\n loop_label: while (tmp$.hasNext()) {\n var element = tmp$.next();\n var tmp$_0 = destination.put_xwzc9p$;\n var tmp$_1 = element.key;\n var transform$result;\n transform$break: do {\n var side = element.key;\n var layers = element.value;\n var tmp$_2 = getValue(scaleXYByMargin, side);\n var marginScaleXProto = tmp$_2.component1()\n , marginScaleYProto = tmp$_2.component2();\n var layersByTile = listOf(layers);\n var domainXYByTile = PositionalScalesUtil_getInstance().computePlotXYTransformedDomains_6ppuq6$(layersByTile, marginScaleXProto, marginScaleYProto, PlotFacets$Companion_getInstance().undefined());\n var tmp$_3 = first(domainXYByTile);\n var xDomain = tmp$_3.component1()\n , yDomain = tmp$_3.component2();\n switch (side.name) {\n case 'LEFT':\n case 'RIGHT':\n transform$result = xDomain;\n break transform$break;\n case 'TOP':\n case 'BOTTOM':\n transform$result = yDomain;\n break transform$break;\n default:\n transform$result = Kotlin.noWhenBranchMatched();\n break transform$break;\n }\n }\n while (false);\n tmp$_0.call(destination, tmp$_1, transform$result);\n }\n return destination;\n };\n MarginalLayerUtil.prototype.scaleXYByMargin_0 = function (scaleXProto, scaleYProto) {\n return mapOf([to(MarginSide$LEFT_getInstance(), new Pair(this.MARGINAL_SCALE_REVERSED_0, scaleYProto)), to(MarginSide$RIGHT_getInstance(), new Pair(this.MARGINAL_SCALE_0, scaleYProto)), to(MarginSide$TOP_getInstance(), new Pair(scaleXProto, this.MARGINAL_SCALE_0)), to(MarginSide$BOTTOM_getInstance(), new Pair(scaleXProto, this.MARGINAL_SCALE_REVERSED_0))]);\n };\n function MarginalLayerUtil$toMarginalScaleMap$isXAxis(closure$flipOrientation) {\n return function (aes) {\n var tmp$, tmp$_0;\n tmp$ = closure$flipOrientation;\n if (tmp$ === true)\n tmp$_0 = Aes.Companion.isPositionalY_896ixz$(aes);\n else if (tmp$ === false)\n tmp$_0 = Aes.Companion.isPositionalX_896ixz$(aes);\n else\n tmp$_0 = Kotlin.noWhenBranchMatched();\n return tmp$_0;\n };\n }\n function MarginalLayerUtil$toMarginalScaleMap$isYAxis(closure$flipOrientation) {\n return function (aes) {\n var tmp$, tmp$_0;\n tmp$ = closure$flipOrientation;\n if (tmp$ === true)\n tmp$_0 = Aes.Companion.isPositionalX_896ixz$(aes);\n else if (tmp$ === false)\n tmp$_0 = Aes.Companion.isPositionalY_896ixz$(aes);\n else\n tmp$_0 = Kotlin.noWhenBranchMatched();\n return tmp$_0;\n };\n }\n MarginalLayerUtil.prototype.toMarginalScaleMap_2q3kgy$ = function (scaleMap, margin, flipOrientation) {\n var isXAxis = MarginalLayerUtil$toMarginalScaleMap$isXAxis(flipOrientation);\n var isYAxis = MarginalLayerUtil$toMarginalScaleMap$isYAxis(flipOrientation);\n var destination = LinkedHashMap_init_0(mapCapacity(scaleMap.size));\n var tmp$;\n tmp$ = scaleMap.entries.iterator();\n loop_label: while (tmp$.hasNext()) {\n var element = tmp$.next();\n var tmp$_0 = destination.put_xwzc9p$;\n var tmp$_1 = element.key;\n var transform$result;\n transform$break: do {\n var aes = element.key;\n var scale = element.value;\n switch (margin.name) {\n case 'LEFT':\n case 'RIGHT':\n transform$result = isXAxis(aes) ? getValue(this.MARGINAL_SCALES_0, margin) : scale;\n break transform$break;\n case 'TOP':\n case 'BOTTOM':\n transform$result = isYAxis(aes) ? getValue(this.MARGINAL_SCALES_0, margin) : scale;\n break transform$break;\n default:\n transform$result = Kotlin.noWhenBranchMatched();\n break transform$break;\n }\n }\n while (false);\n tmp$_0.call(destination, tmp$_1, transform$result);\n }\n return destination;\n };\n MarginalLayerUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'MarginalLayerUtil',\n interfaces: []\n };\n var MarginalLayerUtil_instance = null;\n function MarginalLayerUtil_getInstance() {\n if (MarginalLayerUtil_instance === null) {\n new MarginalLayerUtil();\n }\n return MarginalLayerUtil_instance;\n }\n function PlotContainerPortable(plot, plotSize) {\n PlotContainerPortable$Companion_getInstance();\n this.plot = plot;\n this.svg = new SvgSvgElement();\n this.myContentBuilt_l8hvkk$_0 = false;\n this.myRegistrations_wwtuqx$_0 = new CompositeRegistration([]);\n this.svg.addClass_61zpoe$(Style_getInstance().PLOT_CONTAINER);\n this.setSvgSize_2l8z8v$_0(plotSize);\n this.plot.resize_gpjtzr$(plotSize);\n this.decorationLayerId = svg.SvgUID.get_61zpoe$(PlotContainerPortable$Companion_getInstance().DECORATION_LAYER_ID_PREFIX);\n }\n Object.defineProperty(PlotContainerPortable.prototype, 'liveMapFigures', {\n configurable: true,\n get: function () {\n return this.plot.liveMapFigures_8be2vx$;\n }\n });\n Object.defineProperty(PlotContainerPortable.prototype, 'isLiveMap', {\n configurable: true,\n get: function () {\n return !this.plot.liveMapFigures_8be2vx$.isEmpty();\n }\n });\n PlotContainerPortable.prototype.ensureContentBuilt = function () {\n if (!this.myContentBuilt_l8hvkk$_0) {\n this.buildContent();\n }\n };\n PlotContainerPortable.prototype.resize_gpjtzr$ = function (plotSize) {\n if (plotSize.x <= 0 || plotSize.y <= 0)\n return;\n if (plotSize != null ? plotSize.equals(this.plot.plotSize) : null)\n return;\n this.clearContent();\n this.setSvgSize_2l8z8v$_0(plotSize);\n this.plot.resize_gpjtzr$(plotSize);\n };\n function PlotContainerPortable$buildContent$ObjectLiteral(this$PlotContainerPortable, closure$id) {\n this.this$PlotContainerPortable = this$PlotContainerPortable;\n this.closure$id = closure$id;\n }\n PlotContainerPortable$buildContent$ObjectLiteral.prototype.css = function () {\n return Style_getInstance().generateCSS_kgh34e$(this.this$PlotContainerPortable.plot.styleSheet, this.closure$id, this.this$PlotContainerPortable.decorationLayerId);\n };\n PlotContainerPortable$buildContent$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [SvgCssResource]\n };\n PlotContainerPortable.prototype.buildContent = function () {\n if (!!this.myContentBuilt_l8hvkk$_0) {\n var message = 'Check failed.';\n throw IllegalStateException_init(message.toString());\n }\n this.myContentBuilt_l8hvkk$_0 = true;\n var id = svg.SvgUID.get_61zpoe$(PlotContainerPortable$Companion_getInstance().PLOT_ID_PREFIX);\n this.svg.setStyle_i8z0m3$(new PlotContainerPortable$buildContent$ObjectLiteral(this, id));\n this.plot.rootGroup.id().set_11rb$(id);\n this.svg.children().add_11rb$(this.plot.rootGroup);\n };\n PlotContainerPortable.prototype.clearContent = function () {\n if (this.myContentBuilt_l8hvkk$_0) {\n this.myContentBuilt_l8hvkk$_0 = false;\n this.svg.children().clear();\n this.plot.clear();\n this.myRegistrations_wwtuqx$_0.remove();\n this.myRegistrations_wwtuqx$_0 = new CompositeRegistration([]);\n }\n };\n PlotContainerPortable.prototype.reg_3xv6fb$ = function (registration) {\n this.myRegistrations_wwtuqx$_0.add_3xv6fb$(registration);\n };\n PlotContainerPortable.prototype.setSvgSize_2l8z8v$_0 = function (size) {\n this.svg.width().set_11rb$(size.x);\n this.svg.height().set_11rb$(size.y);\n };\n function PlotContainerPortable$Companion() {\n PlotContainerPortable$Companion_instance = this;\n this.PLOT_ID_PREFIX = 'p';\n this.DECORATION_LAYER_ID_PREFIX = 'd';\n }\n PlotContainerPortable$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var PlotContainerPortable$Companion_instance = null;\n function PlotContainerPortable$Companion_getInstance() {\n if (PlotContainerPortable$Companion_instance === null) {\n new PlotContainerPortable$Companion();\n }\n return PlotContainerPortable$Companion_instance;\n }\n PlotContainerPortable.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PlotContainerPortable',\n interfaces: []\n };\n function PlotSvgComponent(title, subtitle, caption, coreLayersByTile, marginalLayersByTile, plotLayout, frameProviderByTile, coordProvider, legendBoxInfos, interactionsEnabled, theme, styleSheet, plotContext) {\n PlotSvgComponent$Companion_getInstance();\n SvgComponent.call(this);\n this.title_0 = title;\n this.subtitle_0 = subtitle;\n this.caption_0 = caption;\n this.coreLayersByTile_0 = coreLayersByTile;\n this.marginalLayersByTile_0 = marginalLayersByTile;\n this.plotLayout_0 = plotLayout;\n this.frameProviderByTile_0 = frameProviderByTile;\n this.coordProvider_0 = coordProvider;\n this.legendBoxInfos_0 = legendBoxInfos;\n this.interactionsEnabled = interactionsEnabled;\n this.theme = theme;\n this.styleSheet = styleSheet;\n this.plotContext = plotContext;\n this.flippedAxis = this.frameProviderByTile_0.get_za3lpa$(0).flipAxis;\n this.mouseEventPeer = new MouseEventPeer();\n this.interactor_6ntbrr$_0 = null;\n this.liveMapFigures_8be2vx$_v4aopx$_0 = emptyList();\n this.plotSize_jypdvy$_0 = Defaults_getInstance().DEF_PLOT_SIZE;\n this.axisTitleLeft_0 = this.frameProviderByTile_0.get_za3lpa$(0).vAxisLabel;\n this.axisTitleBottom_0 = this.frameProviderByTile_0.get_za3lpa$(0).hAxisLabel;\n var $receiver = flatten(this.coreLayersByTile_0);\n var predicate = getPropertyCallableRef('isLiveMap', 1, function ($receiver) {\n return $receiver.isLiveMap;\n });\n var any$result;\n any$break: do {\n var tmp$;\n if (Kotlin.isType($receiver, Collection) && $receiver.isEmpty()) {\n any$result = false;\n break any$break;\n }\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n if (predicate(element)) {\n any$result = true;\n break any$break;\n }\n }\n any$result = false;\n }\n while (false);\n this.containsLiveMap_0 = any$result;\n }\n Object.defineProperty(PlotSvgComponent.prototype, 'interactor', {\n configurable: true,\n get: function () {\n return this.interactor_6ntbrr$_0;\n },\n set: function (value) {\n if (!(this.interactor_6ntbrr$_0 == null)) {\n var message = 'Can be initialize only once.';\n throw IllegalStateException_init(message.toString());\n }\n this.interactor_6ntbrr$_0 = value;\n }\n });\n Object.defineProperty(PlotSvgComponent.prototype, 'liveMapFigures_8be2vx$', {\n configurable: true,\n get: function () {\n return this.liveMapFigures_8be2vx$_v4aopx$_0;\n },\n set: function (liveMapFigures) {\n this.liveMapFigures_8be2vx$_v4aopx$_0 = liveMapFigures;\n }\n });\n Object.defineProperty(PlotSvgComponent.prototype, 'plotSize', {\n configurable: true,\n get: function () {\n return this.plotSize_jypdvy$_0;\n },\n set: function (plotSize) {\n this.plotSize_jypdvy$_0 = plotSize;\n }\n });\n function PlotSvgComponent$buildComponent$lambda() {\n return 'buildPlot';\n }\n PlotSvgComponent.prototype.buildComponent = function () {\n var tmp$, tmp$_0;\n try {\n this.buildPlot_0();\n } catch (e) {\n if (Kotlin.isType(e, RuntimeException)) {\n PlotSvgComponent$Companion_getInstance().LOG_0.error_l35kib$(e, PlotSvgComponent$buildComponent$lambda);\n var rootCause = base.Throwables.getRootCause_tcv7n7$(e);\n var messages = ['Error building plot: ' + Kotlin.getKClassFromExpression(rootCause).simpleName, rootCause.message != null ? \"'\" + rootCause.message + \"'\" : ''];\n var y = this.plotSize.y / 2 - 8;\n for (tmp$ = 0; tmp$ !== messages.length; ++tmp$) {\n var s = messages[tmp$];\n var errorLabel = new TextLabel(s);\n if (this.theme.plot().showBackground())\n tmp$_0 = this.theme.plot().textColor();\n else\n tmp$_0 = Defaults_getInstance().TEXT_COLOR;\n var textColor = tmp$_0;\n errorLabel.textColor().set_11rb$(textColor);\n errorLabel.setFontWeight_pdl1vj$('normal');\n errorLabel.setFontStyle_pdl1vj$('normal');\n errorLabel.setHorizontalAnchor_mf4siq$(Text$HorizontalAnchor.MIDDLE);\n errorLabel.setVerticalAnchor_yaylw0$(Text$VerticalAnchor.CENTER);\n errorLabel.moveTo_lu1900$(this.plotSize.x / 2, y);\n this.rootGroup.children().add_11rb$(errorLabel.rootGroup);\n y += 16.0;\n }\n } else\n throw e;\n }\n };\n function PlotSvgComponent$buildPlot$ObjectLiteral(this$PlotSvgComponent) {\n this.this$PlotSvgComponent = this$PlotSvgComponent;\n Registration.call(this);\n }\n PlotSvgComponent$buildPlot$ObjectLiteral.prototype.doRemove = function () {\n var tmp$;\n (tmp$ = this.this$PlotSvgComponent.interactor) != null ? (tmp$.dispose(), Unit) : null;\n this.this$PlotSvgComponent.liveMapFigures_8be2vx$ = emptyList();\n };\n PlotSvgComponent$buildPlot$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [Registration]\n };\n PlotSvgComponent.prototype.buildPlot_0 = function () {\n this.buildPlotComponents_0();\n this.reg_3xv6fb$(new PlotSvgComponent$buildPlot$ObjectLiteral(this));\n };\n PlotSvgComponent.prototype.resize_gpjtzr$ = function (plotSize) {\n if (plotSize.x <= 0 || plotSize.y <= 0)\n return;\n if (plotSize != null ? plotSize.equals(this.plotSize) : null)\n return;\n this.plotSize = plotSize;\n this.clear();\n };\n function PlotSvgComponent$buildPlotComponents$textRectangle(this$PlotSvgComponent) {\n return function (elementRect, margins) {\n return this$PlotSvgComponent.createTextRectangle_0(elementRect, margins.top, void 0, margins.bottom);\n };\n }\n PlotSvgComponent.prototype.buildPlotComponents_0 = function () {\n var tmp$, tmp$_0, tmp$_1, tmp$_2;\n var tmp$_3;\n var overallRect = new DoubleRectangle(DoubleVector.Companion.ZERO, this.plotSize);\n var plotTheme = this.theme.plot();\n if (plotTheme.showBackground()) {\n var $receiver = SvgRectElement_init(overallRect);\n $receiver.strokeColor().set_11rb$(plotTheme.backgroundColor());\n $receiver.strokeWidth().set_11rb$(plotTheme.backgroundStrokeWidth());\n $receiver.fillColor().set_11rb$(plotTheme.backgroundFill());\n if (this.containsLiveMap_0) {\n $receiver.fillOpacity().set_11rb$(0.0);\n }\n this.add_26jijc$($receiver);\n }\n if (PlotSvgComponent$Companion_getInstance().DEBUG_DRAWING_0) {\n this.drawDebugRect_0(overallRect, Color.Companion.MAGENTA, 'MAGENTA: overallRect');\n }\n if (this.containsLiveMap_0) {\n tmp$ = PlotLayoutUtil_getInstance().liveMapBounds_wthzt5$(overallRect);\n } else {\n tmp$ = overallRect;\n }\n var entirePlot = tmp$;\n var legendTheme = this.theme.legend();\n var legendsBlockInfo = LegendBoxesLayoutUtil_getInstance().arrangeLegendBoxes_wcxvwm$(this.legendBoxInfos_0, legendTheme);\n var axisEnabled = !this.containsLiveMap_0;\n var plotInnerSizeAvailable = PlotLayoutUtil_getInstance().subtractTitlesAndLegends_krgcoj$(entirePlot.dimension, this.title_0, this.subtitle_0, this.caption_0, this.axisTitleLeft_0, this.axisTitleBottom_0, axisEnabled, legendsBlockInfo, this.theme, this.flippedAxis);\n var plotInfo = this.plotLayout_0.doLayout_3twog0$(plotInnerSizeAvailable, this.coordProvider_0);\n if (plotInfo.tiles.isEmpty()) {\n return;\n }\n var plotInnerSize = plotInfo.size;\n var plotOuterSize = PlotLayoutUtil_getInstance().addTitlesAndLegends_krgcoj$(plotInnerSize, this.title_0, this.subtitle_0, this.caption_0, this.axisTitleLeft_0, this.axisTitleBottom_0, axisEnabled, legendsBlockInfo, this.theme, this.flippedAxis);\n var delta = overallRect.center.subtract_gpjtzr$((new DoubleRectangle(overallRect.origin, plotOuterSize)).center);\n var b = delta.x;\n var tmp$_4 = JsMath.max(0.0, b);\n var b_0 = delta.y;\n var deltaApplied = new DoubleVector(tmp$_4, JsMath.max(0.0, b_0));\n var plotOuterOrigin = overallRect.origin.add_gpjtzr$(deltaApplied);\n var plotOuterBounds = new DoubleRectangle(plotOuterOrigin, plotOuterSize);\n if (PlotSvgComponent$Companion_getInstance().DEBUG_DRAWING_0) {\n this.drawDebugRect_0(plotOuterBounds, Color.Companion.BLUE, 'BLUE: plotOuterBounds');\n }\n var titleSizeDelta = PlotLayoutUtil_getInstance().titleSizeDelta_9qd63d$(this.title_0, this.subtitle_0, this.theme.plot());\n var captionSizeDelta = PlotLayoutUtil_getInstance().captionSizeDelta_n8fzqq$(this.caption_0, this.theme.plot());\n var plotOuterBoundsWithoutTitleAndCaption = new DoubleRectangle(plotOuterBounds.origin.add_gpjtzr$(titleSizeDelta), plotOuterBounds.dimension.subtract_gpjtzr$(titleSizeDelta).subtract_gpjtzr$(captionSizeDelta));\n if (PlotSvgComponent$Companion_getInstance().DEBUG_DRAWING_0) {\n this.drawDebugRect_0(plotOuterBoundsWithoutTitleAndCaption, Color.Companion.BLUE, 'BLUE: plotOuterBoundsWithoutTitleAndCaption');\n }\n var plotInnerOrigin = plotOuterBoundsWithoutTitleAndCaption.origin.add_gpjtzr$(PlotLayoutUtil_getInstance().legendBlockLeftTopDelta_284vw0$(legendsBlockInfo, legendTheme)).add_gpjtzr$(PlotLayoutUtil_getInstance().axisTitleSizeDelta_5fzsug$(to(this.axisTitleLeft_0, PlotLabelSpecFactory_getInstance().axisTitle_9yvfuv$(this.theme.verticalAxis_6taknv$(this.flippedAxis))), to(null, PlotLabelSpec$Companion_getInstance().DUMMY), axisEnabled, PlotLayoutUtil_getInstance().axisMarginDimensions_1crrl9$(this.theme, this.flippedAxis)));\n var geomAreaBounds = PlotLayoutUtil_getInstance().overallGeomBounds_93w4c3$(plotInfo).add_gpjtzr$(plotInnerOrigin);\n var tilesOrigin = plotInnerOrigin;\n tmp$_0 = plotInfo.tiles.iterator();\n while (tmp$_0.hasNext()) {\n var tileLayoutInfo = tmp$_0.next();\n var tileIndex = tileLayoutInfo.trueIndex;\n var tileFrameProvider = this.frameProviderByTile_0.get_za3lpa$(tileIndex);\n var tileFrame = tileFrameProvider.createTileFrame_sd8y8$(tileLayoutInfo, this.coordProvider_0, PlotSvgComponent$Companion_getInstance().DEBUG_DRAWING_0);\n var marginalFrameByMargin = tileFrameProvider.createMarginalFrames_sd8y8$(tileLayoutInfo, this.coordProvider_0, PlotSvgComponent$Companion_getInstance().DEBUG_DRAWING_0);\n var tile = new PlotTile(this.coreLayersByTile_0.get_za3lpa$(tileIndex), this.marginalLayersByTile_0.get_za3lpa$(tileIndex), tilesOrigin, tileLayoutInfo, this.theme, tileFrame, marginalFrameByMargin);\n var plotOriginAbsolute = tilesOrigin.add_gpjtzr$(tileLayoutInfo.offset);\n tile.moveTo_gpjtzr$(plotOriginAbsolute);\n this.add_8icvvv$(tile);\n if ((tmp$_1 = tile.liveMapFigure) != null) {\n this.liveMapFigures_8be2vx$ = plus(this.liveMapFigures_8be2vx$, listOf(tmp$_1));\n }\n var geomOuterBoundsAbsolute = tileLayoutInfo.geomOuterBounds.add_gpjtzr$(plotOriginAbsolute);\n var geomInnerBoundsAbsolute = tileLayoutInfo.geomInnerBounds.add_gpjtzr$(plotOriginAbsolute);\n (tmp$_2 = this.interactor) != null ? (tmp$_2.onTileAdded_3frgn6$(geomInnerBoundsAbsolute, tile.targetLocators, tile.layerYOrientations, new DoubleVector(geomOuterBoundsAbsolute.left, geomOuterBoundsAbsolute.bottom)), Unit) : null;\n if (PlotSvgComponent$Companion_getInstance().DEBUG_DRAWING_0) {\n this.drawDebugRect_0(geomInnerBoundsAbsolute, Color.Companion.ORANGE, 'ORANGE: geomInnerBoundsAbsolute');\n }\n }\n if (PlotSvgComponent$Companion_getInstance().DEBUG_DRAWING_0) {\n this.drawDebugRect_0(geomAreaBounds, Color.Companion.RED, 'RED: geomAreaBounds');\n }\n var textRectangle = PlotSvgComponent$buildPlotComponents$textRectangle(this);\n var plotTitleElementRect = this.title_0 != null ? DoubleRectangle_init(geomAreaBounds.left, plotOuterBounds.top, geomAreaBounds.width, PlotLayoutUtil_getInstance().titleThickness_kyoegs$(this.title_0, PlotLabelSpecFactory_getInstance().plotTitle_5dhkxz$(plotTheme), this.theme.plot().titleMargins())) : null;\n var plotTitleTextRect = plotTitleElementRect != null ? textRectangle(plotTitleElementRect, this.theme.plot().titleMargins()) : null;\n if (PlotSvgComponent$Companion_getInstance().DEBUG_DRAWING_0) {\n if (plotTitleTextRect != null) {\n this.drawDebugRect_0(plotTitleTextRect, Color.Companion.LIGHT_BLUE);\n }\n if (plotTitleElementRect != null) {\n this.drawDebugRect_0(plotTitleElementRect, Color.Companion.GRAY);\n }\n if (plotTitleTextRect != null) {\n this.drawDebugRect_0(this.textBoundingBox_0(ensureNotNull(this.title_0), plotTitleTextRect, PlotLabelSpecFactory_getInstance().plotTitle_5dhkxz$(plotTheme), void 0, -1), Color.Companion.DARK_GREEN);\n }\n }\n var tmp$_5;\n if (this.subtitle_0 != null) {\n var tmp$_6;\n tmp$_5 = DoubleRectangle_init(geomAreaBounds.left, (tmp$_6 = plotTitleElementRect != null ? plotTitleElementRect.bottom : null) != null ? tmp$_6 : plotOuterBounds.top, geomAreaBounds.width, PlotLayoutUtil_getInstance().titleThickness_kyoegs$(this.subtitle_0, PlotLabelSpecFactory_getInstance().plotSubtitle_5dhkxz$(plotTheme), this.theme.plot().subtitleMargins()));\n } else\n tmp$_5 = null;\n var subtitleElementRect = tmp$_5;\n var subtitleTextRect = subtitleElementRect != null ? textRectangle(subtitleElementRect, this.theme.plot().subtitleMargins()) : null;\n if (PlotSvgComponent$Companion_getInstance().DEBUG_DRAWING_0) {\n if (subtitleTextRect != null) {\n this.drawDebugRect_0(subtitleTextRect, Color.Companion.LIGHT_BLUE);\n }\n if (subtitleElementRect != null) {\n this.drawDebugRect_0(subtitleElementRect, Color.Companion.GRAY);\n }\n if (subtitleTextRect != null) {\n this.drawDebugRect_0(this.textBoundingBox_0(ensureNotNull(this.subtitle_0), subtitleTextRect, PlotLabelSpecFactory_getInstance().plotTitle_5dhkxz$(plotTheme), void 0, -1), Color.Companion.DARK_GREEN);\n }\n }\n var tmp$_7;\n if (this.caption_0 != null) {\n var captionRectHeight = PlotLayoutUtil_getInstance().titleThickness_kyoegs$(this.caption_0, PlotLabelSpecFactory_getInstance().plotCaption_5dhkxz$(plotTheme), this.theme.plot().captionMargins());\n tmp$_7 = DoubleRectangle_init(geomAreaBounds.left, plotOuterBounds.bottom - captionRectHeight, geomAreaBounds.width, captionRectHeight);\n } else\n tmp$_7 = null;\n var captionElementRect = tmp$_7;\n var captionTextRect = captionElementRect != null ? textRectangle(captionElementRect, this.theme.plot().captionMargins()) : null;\n if (PlotSvgComponent$Companion_getInstance().DEBUG_DRAWING_0) {\n if (captionTextRect != null) {\n this.drawDebugRect_0(captionTextRect, Color.Companion.LIGHT_BLUE);\n }\n if (captionElementRect != null) {\n this.drawDebugRect_0(captionElementRect, Color.Companion.GRAY);\n }\n if (captionTextRect != null) {\n this.drawDebugRect_0(this.textBoundingBox_0(ensureNotNull(this.caption_0), captionTextRect, PlotLabelSpecFactory_getInstance().plotTitle_5dhkxz$(plotTheme), void 0, 1), Color.Companion.DARK_GREEN);\n }\n }\n if (plotTitleTextRect != null) {\n this.addTitle_0(this.title_0, PlotLabelSpecFactory_getInstance().plotTitle_5dhkxz$(plotTheme), plotTheme.titleJustification(), plotTitleTextRect, void 0, Style_getInstance().PLOT_TITLE);\n }\n if (subtitleTextRect != null) {\n this.addTitle_0(this.subtitle_0, PlotLabelSpecFactory_getInstance().plotSubtitle_5dhkxz$(plotTheme), plotTheme.subtitleJustification(), subtitleTextRect, void 0, Style_getInstance().PLOT_SUBTITLE);\n }\n var overallTileBounds = PlotLayoutUtil_getInstance().overallTileBounds_93w4c3$(plotInfo).add_gpjtzr$(plotInnerOrigin);\n if (PlotSvgComponent$Companion_getInstance().DEBUG_DRAWING_0) {\n this.drawDebugRect_0(overallTileBounds, Color.Companion.DARK_MAGENTA, 'DARK_MAGENTA: overallTileBounds');\n }\n if (axisEnabled) {\n if (this.axisTitleLeft_0 != null) {\n var vAxisOrientation = ensureNotNull(first(plotInfo.tiles).vAxisInfo).orientation;\n this.addAxisTitle_0(this.axisTitleLeft_0, vAxisOrientation, overallTileBounds, geomAreaBounds, PlotLabelSpecFactory_getInstance().axisTitle_9yvfuv$(this.theme.verticalAxis_6taknv$(this.flippedAxis)), this.theme.verticalAxis_6taknv$(this.flippedAxis).titleJustification(), this.theme.verticalAxis_6taknv$(this.flippedAxis).titleMargins(), Style_getInstance().AXIS_TITLE + '-' + this.theme.verticalAxis_6taknv$(this.flippedAxis).axis);\n }\n if (this.axisTitleBottom_0 != null) {\n var hAxisOrientation = ensureNotNull(first(plotInfo.tiles).hAxisInfo).orientation;\n this.addAxisTitle_0(this.axisTitleBottom_0, hAxisOrientation, overallTileBounds, geomAreaBounds, PlotLabelSpecFactory_getInstance().axisTitle_9yvfuv$(this.theme.horizontalAxis_6taknv$(this.flippedAxis)), this.theme.horizontalAxis_6taknv$(this.flippedAxis).titleJustification(), this.theme.horizontalAxis_6taknv$(this.flippedAxis).titleMargins(), Style_getInstance().AXIS_TITLE + '-' + this.theme.horizontalAxis_6taknv$(this.flippedAxis).axis);\n }\n }\n if (!legendTheme.position().isHidden) {\n var legendsBlockInfoLayouted = (new LegendBoxesLayout(plotOuterBoundsWithoutTitleAndCaption, geomAreaBounds, legendTheme)).doLayout_mx3cup$(legendsBlockInfo);\n tmp$_3 = legendsBlockInfoLayouted.boxWithLocationList.iterator();\n while (tmp$_3.hasNext()) {\n var boxWithLocation = tmp$_3.next();\n var legendBox = boxWithLocation.legendBox.createLegendBox();\n legendBox.moveTo_gpjtzr$(boxWithLocation.location);\n this.add_8icvvv$(legendBox);\n }\n }\n if (captionTextRect != null) {\n this.addTitle_0(this.caption_0, PlotLabelSpecFactory_getInstance().plotCaption_5dhkxz$(plotTheme), plotTheme.captionJustification(), captionTextRect, void 0, Style_getInstance().PLOT_CAPTION);\n }\n };\n PlotSvgComponent.prototype.createTextRectangle_0 = function (elementRect, topMargin, rightMargin, bottomMargin, leftMargin) {\n if (topMargin === void 0)\n topMargin = 0.0;\n if (rightMargin === void 0)\n rightMargin = 0.0;\n if (bottomMargin === void 0)\n bottomMargin = 0.0;\n if (leftMargin === void 0)\n leftMargin = 0.0;\n return DoubleRectangle_init(elementRect.left + leftMargin, elementRect.top + topMargin, elementRect.width - (rightMargin + leftMargin), elementRect.height - (topMargin + bottomMargin));\n };\n PlotSvgComponent.prototype.addAxisTitle_0 = function (text, orientation, overallTileBounds, overallGeomBounds, labelSpec, justification, margins, className) {\n var tmp$, tmp$_0, tmp$_1, tmp$_2;\n switch (orientation.name) {\n case 'LEFT':\n case 'RIGHT':\n tmp$ = DoubleRectangle_init(overallTileBounds.left, overallGeomBounds.top, overallTileBounds.width, overallGeomBounds.height);\n break;\n case 'TOP':\n case 'BOTTOM':\n tmp$ = DoubleRectangle_init(overallGeomBounds.left, overallTileBounds.top, overallGeomBounds.width, overallTileBounds.height);\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n var referenceRect = tmp$;\n switch (orientation.name) {\n case 'LEFT':\n tmp$_0 = TextJustification$Companion$TextRotation$ANTICLOCKWISE_getInstance();\n break;\n case 'RIGHT':\n tmp$_0 = TextJustification$Companion$TextRotation$ANTICLOCKWISE_getInstance();\n break;\n default:\n tmp$_0 = null;\n break;\n }\n var rotation = tmp$_0;\n var textHeight = PlotLayoutUtil_getInstance().textDimensions_1al14g$(text, labelSpec).y;\n switch (orientation.name) {\n case 'LEFT':\n tmp$_1 = DoubleRectangle_init(referenceRect.left - textHeight - margins.width(), referenceRect.top, textHeight + margins.width(), referenceRect.height);\n break;\n case 'RIGHT':\n tmp$_1 = DoubleRectangle_init(referenceRect.right, referenceRect.top, textHeight + margins.width(), referenceRect.height);\n break;\n case 'TOP':\n tmp$_1 = DoubleRectangle_init(referenceRect.left, referenceRect.top - textHeight - margins.height(), referenceRect.width, textHeight + margins.height());\n break;\n case 'BOTTOM':\n tmp$_1 = DoubleRectangle_init(referenceRect.left, referenceRect.bottom, referenceRect.width, textHeight + margins.height());\n break;\n default:\n tmp$_1 = Kotlin.noWhenBranchMatched();\n break;\n }\n var axisTitleElementRect = tmp$_1;\n if (orientation.isHorizontal)\n tmp$_2 = this.createTextRectangle_0(axisTitleElementRect, margins.top, void 0, margins.bottom);\n else {\n tmp$_2 = this.createTextRectangle_0(axisTitleElementRect, void 0, margins.right, void 0, margins.left);\n }\n var axisTitleTextRect = tmp$_2;\n this.addTitle_0(text, labelSpec, justification, axisTitleTextRect, rotation, className);\n if (PlotSvgComponent$Companion_getInstance().DEBUG_DRAWING_0) {\n this.drawDebugRect_0(axisTitleTextRect, Color.Companion.LIGHT_BLUE);\n this.drawDebugRect_0(axisTitleElementRect, Color.Companion.GRAY);\n this.drawDebugRect_0(this.textBoundingBox_0(text, axisTitleTextRect, labelSpec, orientation), Color.Companion.DARK_GREEN);\n }\n };\n PlotSvgComponent.prototype.textBoundingBox_0 = function (text, boundRect, labelSpec, orientation, align) {\n if (orientation === void 0)\n orientation = Orientation$TOP_getInstance();\n if (align === void 0)\n align = 0;\n var tmp$, tmp$_0, tmp$_1;\n var d = PlotLayoutUtil_getInstance().textDimensions_1al14g$(text, labelSpec);\n if (listOf_0([Orientation$TOP_getInstance(), Orientation$BOTTOM_getInstance()]).contains_11rb$(orientation)) {\n if (align > 0)\n tmp$ = boundRect.right - d.x;\n else if (align < 0)\n tmp$ = boundRect.left;\n else\n tmp$ = boundRect.center.x - d.x / 2;\n var x = tmp$;\n tmp$_1 = DoubleRectangle_init(x, boundRect.center.y - d.y / 2, d.x, d.y);\n } else {\n if (align > 0)\n tmp$_0 = boundRect.bottom - d.x;\n else if (align < 0)\n tmp$_0 = boundRect.top;\n else\n tmp$_0 = boundRect.center.y - d.x / 2;\n var y = tmp$_0;\n tmp$_1 = DoubleRectangle_init(boundRect.center.x - d.y / 2, y, d.y, d.x);\n }\n return tmp$_1;\n };\n PlotSvgComponent.prototype.addTitle_0 = function (title, labelSpec, justification, boundRect, rotation, className) {\n if (rotation === void 0)\n rotation = null;\n var tmp$;\n if (title == null)\n return;\n var lineHeight = labelSpec.height();\n var titleLabel = new MultilineLabel(title);\n titleLabel.addClassName_61zpoe$(className);\n var tmp$_0 = TextJustification$Companion_getInstance().applyJustification_x3kzr8$(boundRect, PlotLayoutUtil_getInstance().textDimensions_1al14g$(title, labelSpec), lineHeight, justification, rotation);\n var position = tmp$_0.component1()\n , hAnchor = tmp$_0.component2();\n titleLabel.setLineHeight_14dthe$(lineHeight);\n titleLabel.setHorizontalAnchor_mf4siq$(hAnchor);\n titleLabel.moveTo_gpjtzr$(position);\n if ((tmp$ = rotation != null ? rotation.angle : null) != null) {\n getCallableRef('rotate', function ($receiver, p1) {\n return $receiver.rotate_14dthe$(p1), Unit;\n }.bind(null, titleLabel))(tmp$);\n }\n this.add_8icvvv$(titleLabel);\n };\n PlotSvgComponent.prototype.drawDebugRect_0 = function (r, color, message) {\n if (message === void 0)\n message = null;\n var rect = SvgRectElement_init(r);\n rect.strokeColor().set_11rb$(color);\n rect.strokeWidth().set_11rb$(1.0);\n rect.fillOpacity().set_11rb$(0.0);\n if (message != null) {\n this.onMouseMove_0(rect, toString(message) + ': ' + r);\n }\n this.add_26jijc$(rect);\n };\n function PlotSvgComponent$onMouseMove$ObjectLiteral(closure$message) {\n this.closure$message = closure$message;\n }\n PlotSvgComponent$onMouseMove$ObjectLiteral.prototype.handle_42da0z$ = function (node, e) {\n println(this.closure$message);\n };\n PlotSvgComponent$onMouseMove$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [SvgEventHandler]\n };\n PlotSvgComponent.prototype.onMouseMove_0 = function (e, message) {\n e.addEventHandler_mm8kk2$(SvgEventSpec.MOUSE_MOVE, new PlotSvgComponent$onMouseMove$ObjectLiteral(message));\n };\n function PlotSvgComponent$Companion() {\n PlotSvgComponent$Companion_instance = this;\n this.LOG_0 = logging.PortableLogging.logger_xo1ogr$(getKClass(PlotSvgComponent));\n this.DEBUG_DRAWING_0 = FeatureSwitch_getInstance().PLOT_DEBUG_DRAWING;\n }\n PlotSvgComponent$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var PlotSvgComponent$Companion_instance = null;\n function PlotSvgComponent$Companion_getInstance() {\n if (PlotSvgComponent$Companion_instance === null) {\n new PlotSvgComponent$Companion();\n }\n return PlotSvgComponent$Companion_instance;\n }\n PlotSvgComponent.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PlotSvgComponent',\n interfaces: [SvgComponent]\n };\n function PlotTile(coreLayers, marginalLayers, tilesOrigin, tileLayoutInfo, theme, frameOfReference, marginalFrameByMargin) {\n PlotTile$Companion_getInstance();\n SvgComponent.call(this);\n this.coreLayers_0 = coreLayers;\n this.marginalLayers_0 = marginalLayers;\n this.tilesOrigin_0 = tilesOrigin;\n this.tileLayoutInfo_0 = tileLayoutInfo;\n this.theme_0 = theme;\n this.frameOfReference_0 = frameOfReference;\n this.marginalFrameByMargin_0 = marginalFrameByMargin;\n this._targetLocators_0 = ArrayList_init();\n this.liveMapFigure_y5x745$_0 = null;\n var $receiver = this.coreLayers_0;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n destination.add_11rb$(item.isYOrientation);\n }\n this.layerYOrientations = destination;\n this.moveTo_gpjtzr$(this.tileLayoutInfo_0.getAbsoluteBounds_gpjtzr$(this.tilesOrigin_0).origin);\n }\n Object.defineProperty(PlotTile.prototype, 'liveMapFigure', {\n configurable: true,\n get: function () {\n return this.liveMapFigure_y5x745$_0;\n },\n set: function (liveMapFigure) {\n this.liveMapFigure_y5x745$_0 = liveMapFigure;\n }\n });\n Object.defineProperty(PlotTile.prototype, 'targetLocators', {\n configurable: true,\n get: function () {\n return this._targetLocators_0;\n }\n });\n PlotTile.prototype.buildComponent = function () {\n var tmp$, tmp$_0, tmp$_1;\n var geomOuterBounds = this.tileLayoutInfo_0.geomOuterBounds;\n this.addFacetLabels_0(geomOuterBounds, this.theme_0.facets());\n var $receiver = this.coreLayers_0;\n var firstOrNull$result;\n firstOrNull$break: do {\n var tmp$_2;\n tmp$_2 = $receiver.iterator();\n while (tmp$_2.hasNext()) {\n var element = tmp$_2.next();\n if (element.isLiveMap) {\n firstOrNull$result = element;\n break firstOrNull$break;\n }\n }\n firstOrNull$result = null;\n }\n while (false);\n var liveMapGeomLayer = firstOrNull$result;\n if (liveMapGeomLayer != null) {\n var realBounds = this.tileLayoutInfo_0.getAbsoluteOuterGeomBounds_gpjtzr$(this.tilesOrigin_0);\n var liveMapData = PlotTile$Companion_getInstance().createCanvasFigure_0(liveMapGeomLayer, realBounds);\n this.liveMapFigure = liveMapData.canvasFigure;\n this._targetLocators_0.add_11rb$(liveMapData.targetLocator);\n } else {\n this.frameOfReference_0.drawBeforeGeomLayer_8icvvv$(this);\n tmp$ = this.coreLayers_0.iterator();\n while (tmp$.hasNext()) {\n var layer = tmp$.next();\n var collectorWithLocator = new LayerTargetCollectorWithLocator(layer.geomKind, layer.locatorLookupSpec, layer.createContextualMapping());\n this._targetLocators_0.add_11rb$(collectorWithLocator);\n var layerComponent = this.frameOfReference_0.buildGeomComponent_ge0scz$(layer, collectorWithLocator);\n this.add_8icvvv$(layerComponent);\n }\n var marginalLayersByMargin = MarginalLayerUtil_getInstance().marginalLayersByMargin_relqli$(this.marginalLayers_0);\n tmp$_0 = marginalLayersByMargin.entries.iterator();\n while (tmp$_0.hasNext()) {\n var tmp$_3 = tmp$_0.next();\n var margin = tmp$_3.key;\n var layers = tmp$_3.value;\n var marginFrame = getValue(this.marginalFrameByMargin_0, margin);\n tmp$_1 = layers.iterator();\n while (tmp$_1.hasNext()) {\n var layer_0 = tmp$_1.next();\n var marginComponent = marginFrame.buildGeomComponent_ge0scz$(layer_0, new NullGeomTargetCollector());\n this.add_8icvvv$(marginComponent);\n }\n }\n this.frameOfReference_0.drawAfterGeomLayer_8icvvv$(this);\n }\n };\n PlotTile.prototype.addFacetLabels_0 = function (geomBounds, theme) {\n var tmp$;\n var xLabels = this.tileLayoutInfo_0.facetXLabels;\n if (!xLabels.isEmpty()) {\n var labelSize = FacetedPlotLayout$Companion_getInstance().facetColLabelSize_14dthe$(geomBounds.width);\n var labelOrig = new DoubleVector(geomBounds.left + 0, geomBounds.top - FacetedPlotLayout$Companion_getInstance().facetColHeadHeight_za3lpa$(xLabels.size) + 6);\n var labelBounds = new DoubleRectangle(labelOrig, labelSize);\n tmp$ = xLabels.iterator();\n while (tmp$.hasNext()) {\n var xLabel = tmp$.next();\n this.addFacetLabBackground_0(labelBounds, theme);\n var x = labelBounds.center.x;\n var y = labelBounds.center.y;\n var lab = new TextLabel(xLabel);\n lab.addClassName_61zpoe$('facet-strip-text-x');\n lab.moveTo_lu1900$(x, y);\n lab.setHorizontalAnchor_mf4siq$(Text$HorizontalAnchor.MIDDLE);\n lab.setVerticalAnchor_yaylw0$(Text$VerticalAnchor.CENTER);\n this.add_8icvvv$(lab);\n labelBounds = labelBounds.add_gpjtzr$(new DoubleVector(0.0, labelSize.y));\n }\n }\n if (this.tileLayoutInfo_0.facetYLabel != null) {\n var hPad = 6;\n var vPad = 0;\n var labelBounds_0 = DoubleRectangle_init(geomBounds.right + hPad, geomBounds.top - vPad, FacetedPlotLayout$Companion_getInstance().FACET_TAB_HEIGHT - (hPad * 2 | 0), geomBounds.height - (vPad * 2 | 0));\n this.addFacetLabBackground_0(labelBounds_0, theme);\n var x_0 = labelBounds_0.center.x;\n var y_0 = labelBounds_0.center.y;\n var lab_0 = new TextLabel(this.tileLayoutInfo_0.facetYLabel);\n lab_0.addClassName_61zpoe$('facet-strip-text-y');\n lab_0.moveTo_lu1900$(x_0, y_0);\n lab_0.setHorizontalAnchor_mf4siq$(Text$HorizontalAnchor.MIDDLE);\n lab_0.setVerticalAnchor_yaylw0$(Text$VerticalAnchor.CENTER);\n lab_0.rotate_14dthe$(90.0);\n this.add_8icvvv$(lab_0);\n }\n };\n PlotTile.prototype.addFacetLabBackground_0 = function (labelBounds, facetTheme) {\n if (facetTheme.showStripBackground()) {\n var $receiver = SvgRectElement_init(labelBounds);\n $receiver.strokeWidth().set_11rb$(facetTheme.stripStrokeWidth());\n $receiver.fillColor().set_11rb$(facetTheme.stripFill());\n $receiver.strokeColor().set_11rb$(facetTheme.stripColor());\n var rect = $receiver;\n this.add_26jijc$(rect);\n }\n };\n function PlotTile$Companion() {\n PlotTile$Companion_instance = this;\n }\n PlotTile$Companion.prototype.createCanvasFigure_0 = function (layer, bounds) {\n var tmp$;\n return (Kotlin.isType(tmp$ = layer.geom, LiveMapGeom) ? tmp$ : throwCCE()).createCanvasFigure_wthzt5$(bounds);\n };\n PlotTile$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var PlotTile$Companion_instance = null;\n function PlotTile$Companion_getInstance() {\n if (PlotTile$Companion_instance === null) {\n new PlotTile$Companion();\n }\n return PlotTile$Companion_instance;\n }\n PlotTile.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PlotTile',\n interfaces: [SvgComponent]\n };\n function PlotUtil() {\n PlotUtil_instance = this;\n }\n function PlotUtil$createPositionAdjustment$ObjectLiteral(closure$aes) {\n this.closure$aes = closure$aes;\n this.groupCount_n24wkg$_0 = lazy(PlotUtil$createPositionAdjustment$ObjectLiteral$groupCount$lambda(closure$aes));\n }\n Object.defineProperty(PlotUtil$createPositionAdjustment$ObjectLiteral.prototype, 'aesthetics', {\n configurable: true,\n get: function () {\n return this.closure$aes;\n }\n });\n Object.defineProperty(PlotUtil$createPositionAdjustment$ObjectLiteral.prototype, 'groupCount', {\n configurable: true,\n get: function () {\n return this.groupCount_n24wkg$_0.value;\n }\n });\n function PlotUtil$createPositionAdjustment$ObjectLiteral$groupCount$lambda(closure$aes) {\n return function () {\n var set = toSet(closure$aes.groups());\n return set.size;\n };\n }\n PlotUtil$createPositionAdjustment$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [PosProviderContext]\n };\n PlotUtil.prototype.createPositionAdjustment_h0u0lr$ = function (posProvider, aes) {\n return posProvider.createPos_q7kk9g$(new PlotUtil$createPositionAdjustment$ObjectLiteral(aes));\n };\n PlotUtil.prototype.prepareLayerAestheticMappers_evxbuk$ = function (layer, xAesMapper, yAesMapper) {\n var tmp$, tmp$_0;\n var yOrientation = layer.isYOrientation;\n var mappers = HashMap_init();\n var renderedAes = plus(layer.renderedAes(), listOf_0([Aes.Companion.X, Aes.Companion.Y]));\n tmp$ = renderedAes.iterator();\n while (tmp$.hasNext()) {\n var aes = tmp$.next();\n if (equals(aes, Aes.Companion.SLOPE))\n tmp$_0 = scale.Mappers.mul_14dthe$(ensureNotNull(yAesMapper.invoke_yrwdxb$(1.0)) / ensureNotNull(xAesMapper.invoke_yrwdxb$(1.0)));\n else if (equals(aes, Aes.Companion.X))\n tmp$_0 = xAesMapper;\n else if (equals(aes, Aes.Companion.Y))\n tmp$_0 = yAesMapper;\n else if (Aes.Companion.isPositionalX_896ixz$(aes))\n tmp$_0 = yOrientation ? yAesMapper : xAesMapper;\n else if (Aes.Companion.isPositionalY_896ixz$(aes))\n tmp$_0 = yOrientation ? xAesMapper : yAesMapper;\n else if (layer.hasBinding_896ixz$(aes))\n tmp$_0 = getValue(layer.scaleMapppersNP, aes);\n else\n tmp$_0 = null;\n var mapper = tmp$_0;\n if (mapper != null) {\n mappers.put_xwzc9p$(aes, mapper);\n }\n }\n return mappers;\n };\n PlotUtil.prototype.createLayerAesthetics_6wb5xp$ = function (layer, aesList, mapperByAes) {\n var tmp$, tmp$_0, tmp$_1, tmp$_2;\n var aesBuilder = new AestheticsBuilder();\n aesBuilder.group_ddsh32$(layer.group);\n var hasPositionalConstants = false;\n tmp$ = aesList.iterator();\n while (tmp$.hasNext()) {\n var aes = tmp$.next();\n if (Aes.Companion.isPositional_896ixz$(aes) && layer.hasConstant_896ixz$(aes)) {\n hasPositionalConstants = true;\n break;\n }\n }\n var data_0 = layer.dataFrame;\n var dataPointCount = {v: null};\n tmp$_0 = aesList.iterator();\n while (tmp$_0.hasNext()) {\n var aes_0 = tmp$_0.next();\n var aes_1 = Kotlin.isType(tmp$_1 = aes_0, Aes) ? tmp$_1 : throwCCE();\n if (Aes.Companion.isPositional_896ixz$(aes_1))\n tmp$_2 = scale.Mappers.IDENTITY;\n else\n tmp$_2 = mapperByAes.get_11rb$(aes_1);\n var mapperOption = tmp$_2;\n if (layer.hasConstant_896ixz$(aes_1)) {\n var v = layer.getConstant_31786j$(aes_1);\n var t = this.transformIfContinuous_0(this.scale_0(aes_1, layer));\n aesBuilder.constantAes_bbdhip$(aes_1, this.constantToAesValue_0(aes_1, v, t, mapperOption));\n } else {\n if (layer.hasBinding_896ixz$(aes_1)) {\n if (!(mapperOption != null)) {\n var message = 'No scale mapper defined for aesthetic ' + aes_1;\n throw IllegalStateException_init(message.toString());\n }\n var transformVar = data.DataFrameUtil.transformVarFor_896ixz$(aes_1);\n if (!data_0.has_8xm3sj$(transformVar)) {\n var message_0 = 'Undefined var ' + transformVar + ' for aesthetic ' + aes_1;\n throw IllegalStateException_init(message_0.toString());\n }\n var numericValues = data_0.getNumeric_8xm3sj$(transformVar);\n if (dataPointCount.v == null) {\n dataPointCount.v = numericValues.size;\n } else {\n if (!(dataPointCount.v === numericValues.size)) {\n var message_1 = '' + toString(aes_1) + ' expected data size=' + toString(dataPointCount.v) + ' was size=' + toString(numericValues.size);\n throw IllegalStateException_init(message_1.toString());\n }\n }\n if (dataPointCount.v === 0 && hasPositionalConstants) {\n aesBuilder.constantAes_bbdhip$(aes_1, layer.aestheticsDefaults.defaultValue_31786j$(aes_1));\n } else {\n var integerFunction = AestheticsBuilder.Companion.listMapper_ci44bt$(numericValues, mapperOption);\n aesBuilder.aes_u42xfl$(aes_1, integerFunction);\n }\n } else {\n var v_0 = layer.getDefault_31786j$(aes_1);\n var t_0 = this.transformIfContinuous_0(this.scale_0(aes_1, layer));\n aesBuilder.constantAes_bbdhip$(aes_1, this.constantToAesValue_0(aes_1, v_0, t_0, mapperOption));\n }\n }\n }\n if (dataPointCount.v != null && dataPointCount.v > 0) {\n aesBuilder.dataPointCount_za3lpa$(dataPointCount.v);\n } else if (hasPositionalConstants) {\n aesBuilder.dataPointCount_za3lpa$(1);\n }\n return aesBuilder.build();\n };\n PlotUtil.prototype.constantToAesValue_0 = function (aes, v, continuousTransform, mapperOption) {\n var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3, tmp$_4;\n if (aes.isNumeric) {\n if (continuousTransform != null) {\n tmp$_0 = continuousTransform.isInDomain_yrwdxb$(typeof (tmp$ = v) === 'number' ? tmp$ : throwCCE());\n if (tmp$_0 === true)\n tmp$_2 = continuousTransform.apply_yrwdxb$(v);\n else if (tmp$_0 === false)\n tmp$_2 = null;\n else\n tmp$_2 = Kotlin.noWhenBranchMatched();\n } else {\n tmp$_2 = typeof (tmp$_1 = v) === 'number' ? tmp$_1 : null;\n }\n var transformed = tmp$_2;\n tmp$_4 = (tmp$_3 = mapperOption != null ? mapperOption.invoke_yrwdxb$(transformed) : null) != null ? tmp$_3 : transformed;\n } else {\n tmp$_4 = v;\n }\n return tmp$_4;\n };\n PlotUtil.prototype.rangeWithExpand_wxtkag$ = function (range, scale, includeZero) {\n var tmp$, tmp$_0;\n if (range == null)\n return null;\n var mulExp = scale.multiplicativeExpand;\n var addExp = scale.additiveExpand;\n var continuousTransform = this.transformIfContinuous_0(scale);\n var domain = new DoubleSpan((tmp$ = continuousTransform != null ? continuousTransform.applyInverse_yrwdxb$(range.lowerEnd) : null) != null ? tmp$ : range.lowerEnd, (tmp$_0 = continuousTransform != null ? continuousTransform.applyInverse_yrwdxb$(range.upperEnd) : null) != null ? tmp$_0 : range.upperEnd);\n var lowerEndpoint = domain.lowerEnd;\n var upperEndpoint = domain.upperEnd;\n var length = upperEndpoint - lowerEndpoint;\n var lowerExpand = addExp + length * mulExp;\n var upperExpand = lowerExpand;\n if (includeZero) {\n var tmp$_1 = lowerEndpoint === 0.0 || upperEndpoint === 0.0;\n if (!tmp$_1) {\n tmp$_1 = nativeSign(lowerEndpoint) === nativeSign(upperEndpoint);\n }\n if (tmp$_1) {\n if (lowerEndpoint >= 0) {\n lowerExpand = 0.0;\n } else {\n upperExpand = 0.0;\n }\n }\n }\n var it = lowerEndpoint - lowerExpand;\n var block$result;\n var tmp$_2;\n var transformed = (tmp$_2 = continuousTransform != null ? continuousTransform.apply_yrwdxb$(it) : null) != null ? tmp$_2 : it;\n if (isNaN_0(transformed)) {\n block$result = range.lowerEnd;\n } else {\n block$result = transformed;\n }\n var lowerEndWithExpand = block$result;\n var it_0 = upperEndpoint + upperExpand;\n var block$result_0;\n var tmp$_3;\n var transformed_0 = (tmp$_3 = continuousTransform != null ? continuousTransform.apply_yrwdxb$(it_0) : null) != null ? tmp$_3 : it_0;\n if (isNaN_0(transformed_0)) {\n block$result_0 = range.upperEnd;\n } else {\n block$result_0 = transformed_0;\n }\n var upperEndWithExpand = block$result_0;\n return new DoubleSpan(lowerEndWithExpand, upperEndWithExpand);\n };\n PlotUtil.prototype.transformIfContinuous_0 = function (scale) {\n var tmp$, tmp$_0;\n if (scale == null)\n return null;\n if (scale.isContinuousDomain) {\n tmp$_0 = Kotlin.isType(tmp$ = scale.transform, ContinuousTransform) ? tmp$ : throwCCE();\n } else {\n tmp$_0 = null;\n }\n return tmp$_0;\n };\n PlotUtil.prototype.scale_0 = function (aes, layer) {\n var tmp$, tmp$_0;\n if (Aes.Companion.isPositionalXY_896ixz$(aes))\n tmp$ = Aes.Companion.toAxisAes_pnj1mo$(aes, layer.isYOrientation);\n else\n tmp$ = aes;\n var aes_0 = tmp$;\n if (layer.scaleMap.containsKey_896ixz$(aes_0)) {\n tmp$_0 = layer.scaleMap.get_31786j$(aes_0);\n } else {\n tmp$_0 = null;\n }\n return tmp$_0;\n };\n function PlotUtil$DemoAndTest() {\n PlotUtil$DemoAndTest_instance = this;\n }\n PlotUtil$DemoAndTest.prototype.layerAestheticsWithoutLayout_sqg2xh$ = function (layer) {\n var mappers = PlotUtil_getInstance().prepareLayerAestheticMappers_evxbuk$(layer, scale.Mappers.IDENTITY, scale.Mappers.IDENTITY);\n return PlotUtil_getInstance().createLayerAesthetics_6wb5xp$(layer, layer.renderedAes(), mappers);\n };\n PlotUtil$DemoAndTest.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'DemoAndTest',\n interfaces: []\n };\n var PlotUtil$DemoAndTest_instance = null;\n function PlotUtil$DemoAndTest_getInstance() {\n if (PlotUtil$DemoAndTest_instance === null) {\n new PlotUtil$DemoAndTest();\n }\n return PlotUtil$DemoAndTest_instance;\n }\n PlotUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'PlotUtil',\n interfaces: []\n };\n var PlotUtil_instance = null;\n function PlotUtil_getInstance() {\n if (PlotUtil_instance === null) {\n new PlotUtil();\n }\n return PlotUtil_instance;\n }\n function PosProviderContext() {\n }\n PosProviderContext.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'PosProviderContext',\n interfaces: []\n };\n function SvgLayerRenderer(aesthetics, geom, pos, coord, geomContext) {\n SvgComponent.call(this);\n this.aesthetics_0 = aesthetics;\n this.geom_0 = geom;\n this.pos_0 = pos;\n this.coord_0 = coord;\n this.geomContext_0 = geomContext;\n }\n SvgLayerRenderer.prototype.buildComponent = function () {\n this.buildLayer_0();\n };\n SvgLayerRenderer.prototype.buildLayer_0 = function () {\n this.geom_0.build_uzv8ab$(this, this.aesthetics_0, this.pos_0, this.coord_0, this.geomContext_0);\n };\n SvgLayerRenderer.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'SvgLayerRenderer',\n interfaces: [SvgRoot, SvgComponent]\n };\n function VarBinding(variable, aes) {\n this.variable = variable;\n this.aes = aes;\n }\n VarBinding.prototype.toString = function () {\n return 'VarBinding{variable=' + this.variable + ', aes=' + this.aes;\n };\n VarBinding.prototype.equals = function (other) {\n var tmp$, tmp$_0;\n if (this === other)\n return true;\n if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null))\n return false;\n Kotlin.isType(tmp$_0 = other, VarBinding) ? tmp$_0 : throwCCE();\n if (!equals(this.variable, other.variable))\n return false;\n if (!equals(this.aes, other.aes))\n return false;\n return true;\n };\n VarBinding.prototype.hashCode = function () {\n var result = hashCode(this.variable);\n result = (31 * result | 0) + hashCode(this.aes) | 0;\n return result;\n };\n VarBinding.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'VarBinding',\n interfaces: []\n };\n function AnnotationLine(pattern, fields) {\n AnnotationLine$Companion_getInstance();\n LinesContentSpecification$Companion$LineSpec.call(this, null, pattern, fields);\n this.myLineFormatter_0 = StringFormat.Companion.forNArgs_zeh6sj$(pattern, fields.size, 'fields');\n }\n AnnotationLine.prototype.initDataContext_nqispu$ = function (data, mappedDataAccess) {\n var tmp$;\n tmp$ = this.fields.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n element.initDataContext_nqispu$(data, mappedDataAccess);\n }\n };\n AnnotationLine.prototype.getAnnotationText_za3lpa$ = function (index) {\n var $receiver = this.fields;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n var tmp$_0 = destination.add_11rb$;\n var tmp$_1;\n tmp$_1 = item.getAnnotationText_za3lpa$(index);\n if (tmp$_1 == null) {\n return null;\n }\n tmp$_0.call(destination, tmp$_1);\n }\n var dataValues = destination;\n var tmp$_2 = this.myLineFormatter_0;\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(dataValues, 10));\n var tmp$_3;\n tmp$_3 = dataValues.iterator();\n while (tmp$_3.hasNext()) {\n var item_0 = tmp$_3.next();\n destination_0.add_11rb$(item_0);\n }\n return tmp$_2.format_pqjuzw$(destination_0);\n };\n function AnnotationLine$Companion() {\n AnnotationLine$Companion_instance = this;\n this.DEFAULT_STYLE_0 = new ThemeTextStyle(FontFamily.Companion.SERIF, FontFace.Companion.NORMAL, 10.0, Color.Companion.BLACK);\n }\n AnnotationLine$Companion.prototype.createAnnotations_6mw9qm$ = function (spec, dataAccess, dataFrame, themeTextStyle) {\n var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3, tmp$_4;\n if (spec.linePatterns.isEmpty()) {\n return null;\n }\n var $receiver = spec.linePatterns;\n var destination = ArrayList_init();\n var tmp$_5;\n tmp$_5 = $receiver.iterator();\n loop_label: while (tmp$_5.hasNext()) {\n var element = tmp$_5.next();\n var $receiver_0 = element.fields;\n var destination_0 = ArrayList_init();\n var tmp$_6;\n tmp$_6 = $receiver_0.iterator();\n while (tmp$_6.hasNext()) {\n var element_0 = tmp$_6.next();\n if (Kotlin.isType(element_0, MappingValue))\n destination_0.add_11rb$(element_0);\n }\n var dataAesList = destination_0;\n var all$result;\n all$break: do {\n var tmp$_7;\n if (Kotlin.isType(dataAesList, Collection) && dataAesList.isEmpty()) {\n all$result = true;\n break all$break;\n }\n tmp$_7 = dataAesList.iterator();\n while (tmp$_7.hasNext()) {\n var element_1 = tmp$_7.next();\n if (!dataAccess.isMapped_896ixz$(element_1.aes)) {\n all$result = false;\n break all$break;\n }\n }\n all$result = true;\n }\n while (false);\n if (all$result)\n destination.add_11rb$(element);\n }\n var mappedLines = destination;\n var tmp$_8;\n tmp$_8 = mappedLines.iterator();\n while (tmp$_8.hasNext()) {\n var element_2 = tmp$_8.next();\n element_2.initDataContext_nqispu$(dataFrame, dataAccess);\n }\n return new Annotations(mappedLines, new TextStyle((tmp$_0 = (tmp$ = themeTextStyle != null ? themeTextStyle.family : null) != null ? tmp$.name : null) != null ? tmp$_0 : this.DEFAULT_STYLE_0.family.name, (tmp$_1 = themeTextStyle != null ? themeTextStyle.face : null) != null ? tmp$_1 : this.DEFAULT_STYLE_0.face, (tmp$_3 = (tmp$_2 = spec.textSize) != null ? tmp$_2 : themeTextStyle != null ? themeTextStyle.size : null) != null ? tmp$_3 : this.DEFAULT_STYLE_0.size, (tmp$_4 = themeTextStyle != null ? themeTextStyle.color : null) != null ? tmp$_4 : this.DEFAULT_STYLE_0.color));\n };\n AnnotationLine$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var AnnotationLine$Companion_instance = null;\n function AnnotationLine$Companion_getInstance() {\n if (AnnotationLine$Companion_instance === null) {\n new AnnotationLine$Companion();\n }\n return AnnotationLine$Companion_instance;\n }\n AnnotationLine.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'AnnotationLine',\n interfaces: [AnnotationLineSpec, LinesContentSpecification$Companion$LineSpec]\n };\n function AnnotationLine_init(other, $this) {\n $this = $this || Object.create(AnnotationLine.prototype);\n var tmp$ = other.pattern;\n var $receiver = other.fields;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$_0;\n tmp$_0 = $receiver.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n destination.add_11rb$(item.copy());\n }\n AnnotationLine.call($this, tmp$, destination);\n return $this;\n }\n function AnnotationSpecification(valueSources, linePatterns, textSize) {\n AnnotationSpecification$Companion_getInstance();\n this.valueSources = valueSources;\n this.linePatterns = linePatterns;\n this.textSize = textSize;\n }\n function AnnotationSpecification$Companion() {\n AnnotationSpecification$Companion_instance = this;\n this.NONE = new AnnotationSpecification(emptyList(), emptyList(), null);\n }\n AnnotationSpecification$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var AnnotationSpecification$Companion_instance = null;\n function AnnotationSpecification$Companion_getInstance() {\n if (AnnotationSpecification$Companion_instance === null) {\n new AnnotationSpecification$Companion();\n }\n return AnnotationSpecification$Companion_instance;\n }\n AnnotationSpecification.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'AnnotationSpecification',\n interfaces: []\n };\n function ColorBarAssembler(legendTitle, transformedDomain, scale, scaleMapper, theme) {\n ColorBarAssembler$Companion_getInstance();\n this.legendTitle_0 = legendTitle;\n this.transformedDomain_0 = transformedDomain;\n this.scale_0 = scale;\n this.scaleMapper_0 = scaleMapper;\n this.theme_0 = theme;\n this.colorBarOptions_0 = null;\n }\n function ColorBarAssembler$createColorBar$ObjectLiteral(closure$spec, size) {\n this.closure$spec = closure$spec;\n LegendBoxInfo.call(this, size);\n }\n ColorBarAssembler$createColorBar$ObjectLiteral.prototype.createLegendBox = function () {\n var c = new ColorBarComponent(this.closure$spec);\n c.debug = ColorBarAssembler$Companion_getInstance().DEBUG_DRAWING_0;\n return c;\n };\n ColorBarAssembler$createColorBar$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [LegendBoxInfo]\n };\n ColorBarAssembler.prototype.createColorBar = function () {\n var scale = this.scale_0;\n if (!scale.hasBreaks()) {\n scale = breaks.ScaleBreaksUtil.withBreaks_ssmbt$(scale, this.transformedDomain_0, 5);\n }\n var scaleBreaks = scale.getScaleBreaks();\n if (scaleBreaks.isEmpty) {\n return LegendBoxInfo$Companion_getInstance().EMPTY;\n }\n var spec = ColorBarAssembler$Companion_getInstance().createColorBarSpec_9whx24$(this.legendTitle_0, this.transformedDomain_0, scaleBreaks, this.scaleMapper_0, this.theme_0, this.colorBarOptions_0);\n return new ColorBarAssembler$createColorBar$ObjectLiteral(spec, spec.size);\n };\n ColorBarAssembler.prototype.setOptions_p8ufd2$ = function (options) {\n this.colorBarOptions_0 = options;\n };\n function ColorBarAssembler$Companion() {\n ColorBarAssembler$Companion_instance = this;\n this.DEBUG_DRAWING_0 = FeatureSwitch_getInstance().LEGEND_DEBUG_DRAWING;\n }\n ColorBarAssembler$Companion.prototype.createColorBarSpec_9whx24$ = function (title, transformedDomain, breaks, scaleMapper, theme, options) {\n if (options === void 0)\n options = null;\n var tmp$, tmp$_0;\n var legendDirection = LegendAssemblerUtil_getInstance().legendDirection_730mk3$(theme);\n var horizontal = legendDirection === LegendDirection$HORIZONTAL_getInstance();\n var width = options != null ? options.width : null;\n var height = options != null ? options.height : null;\n var barSize = ColorBarComponentSpec$Companion_getInstance().barAbsoluteSize_kkcal5$(horizontal, theme);\n if (width != null) {\n barSize = new DoubleVector(width, barSize.y);\n }\n if (height != null) {\n barSize = new DoubleVector(barSize.x, height);\n }\n var reverse = !horizontal;\n if (horizontal)\n tmp$ = ColorBarComponentLayout$Companion_getInstance().horizontal_6u4c86$(title, transformedDomain, breaks, barSize, reverse, theme);\n else\n tmp$ = ColorBarComponentLayout$Companion_getInstance().vertical_6u4c86$(title, transformedDomain, breaks, barSize, reverse, theme);\n var layout = tmp$;\n return new ColorBarComponentSpec(title, transformedDomain, breaks, scaleMapper, (tmp$_0 = options != null ? options.binCount : null) != null ? tmp$_0 : 20, theme, layout, reverse);\n };\n ColorBarAssembler$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ColorBarAssembler$Companion_instance = null;\n function ColorBarAssembler$Companion_getInstance() {\n if (ColorBarAssembler$Companion_instance === null) {\n new ColorBarAssembler$Companion();\n }\n return ColorBarAssembler$Companion_instance;\n }\n ColorBarAssembler.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ColorBarAssembler',\n interfaces: []\n };\n function ColorBarOptions() {\n GuideOptions.call(this);\n this.width = null;\n this.height = null;\n this.binCount = null;\n }\n ColorBarOptions.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ColorBarOptions',\n interfaces: [GuideOptions]\n };\n function GeomContextBuilder() {\n this.flipped_0 = false;\n this.aesthetics_0 = null;\n this.aestheticMappers_0 = null;\n this.aesBounds_0 = null;\n this.geomTargetCollector_0 = new NullGeomTargetCollector();\n this.fontFamilyRegistry_0 = null;\n this.annotations_0 = null;\n }\n GeomContextBuilder.prototype.flipped_6taknv$ = function (flipped) {\n this.flipped_0 = flipped;\n return this;\n };\n GeomContextBuilder.prototype.aesthetics_m7huy5$ = function (aesthetics) {\n this.aesthetics_0 = aesthetics;\n return this;\n };\n GeomContextBuilder.prototype.aestheticMappers_yu359v$ = function (aestheticMappers) {\n this.aestheticMappers_0 = aestheticMappers;\n return this;\n };\n GeomContextBuilder.prototype.aesBounds_wthzt5$ = function (aesBounds) {\n this.aesBounds_0 = aesBounds;\n return this;\n };\n GeomContextBuilder.prototype.geomTargetCollector_xrq6q$ = function (geomTargetCollector) {\n this.geomTargetCollector_0 = geomTargetCollector;\n return this;\n };\n GeomContextBuilder.prototype.fontFamilyRegistry_exm2t6$ = function (v) {\n this.fontFamilyRegistry_0 = v;\n return this;\n };\n GeomContextBuilder.prototype.annotations_dq13fv$ = function (annotations) {\n this.annotations_0 = annotations;\n return this;\n };\n GeomContextBuilder.prototype.build = function () {\n return new GeomContextBuilder$MyGeomContext(this);\n };\n function GeomContextBuilder$MyGeomContext(b) {\n this.aesthetics = b.aesthetics_0;\n this.aestheticMappers = b.aestheticMappers_0;\n this._aesBounds = b.aesBounds_0;\n this.flipped_nf6vrh$_0 = b.flipped_0;\n this.targetCollector_2hnek9$_0 = b.geomTargetCollector_0;\n this.annotations_7kjnwx$_0 = b.annotations_0;\n this.fontFamilyRegistry_0 = b.fontFamilyRegistry_0;\n }\n Object.defineProperty(GeomContextBuilder$MyGeomContext.prototype, 'flipped', {\n configurable: true,\n get: function () {\n return this.flipped_nf6vrh$_0;\n }\n });\n Object.defineProperty(GeomContextBuilder$MyGeomContext.prototype, 'targetCollector', {\n configurable: true,\n get: function () {\n return this.targetCollector_2hnek9$_0;\n }\n });\n Object.defineProperty(GeomContextBuilder$MyGeomContext.prototype, 'annotations', {\n configurable: true,\n get: function () {\n return this.annotations_7kjnwx$_0;\n }\n });\n GeomContextBuilder$MyGeomContext.prototype.getResolution_vktour$ = function (aes) {\n var resolution = 0.0;\n if (this.aesthetics != null) {\n resolution = this.aesthetics.resolution_594811$(aes, 0.0);\n }\n if (resolution <= data_0.SeriesUtil.TINY) {\n resolution = 1.0;\n }\n return resolution;\n };\n GeomContextBuilder$MyGeomContext.prototype.isMappedAes_896ixz$ = function (aes) {\n var tmp$, tmp$_0;\n return (tmp$_0 = (tmp$ = this.aestheticMappers) != null ? tmp$.containsKey_11rb$(aes) : null) != null ? tmp$_0 : false;\n };\n GeomContextBuilder$MyGeomContext.prototype.estimateTextSize_9wnxdu$ = function (text, family, size, isBold, isItalic) {\n var registry = this.fontFamilyRegistry_0;\n if (!(registry != null)) {\n var message = 'Font-family registry is not specified.';\n throw IllegalStateException_init(message.toString());\n }\n var family_0 = registry.get_61zpoe$(family);\n return (new PlotLabelSpec(new Font(family_0, numberToInt(size), isBold, isItalic))).dimensions_61zpoe$(text);\n };\n GeomContextBuilder$MyGeomContext.prototype.getAesBounds = function () {\n if (!(this._aesBounds != null)) {\n var message = 'GeomContext: aesthetics bounds are not defined.';\n throw IllegalStateException_init(message.toString());\n }\n return this._aesBounds;\n };\n GeomContextBuilder$MyGeomContext.prototype.withTargetCollector_xrq6q$ = function (targetCollector) {\n return this.with().geomTargetCollector_xrq6q$(targetCollector).build();\n };\n GeomContextBuilder$MyGeomContext.prototype.with = function () {\n return GeomContextBuilder_init_0(this);\n };\n GeomContextBuilder$MyGeomContext.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'MyGeomContext',\n interfaces: [ImmutableGeomContext]\n };\n GeomContextBuilder.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GeomContextBuilder',\n interfaces: [ImmutableGeomContext$Builder]\n };\n function GeomContextBuilder_init($this) {\n $this = $this || Object.create(GeomContextBuilder.prototype);\n GeomContextBuilder.call($this);\n return $this;\n }\n function GeomContextBuilder_init_0(ctx, $this) {\n $this = $this || Object.create(GeomContextBuilder.prototype);\n GeomContextBuilder.call($this);\n $this.flipped_0 = ctx.flipped;\n $this.aesthetics_0 = ctx.aesthetics;\n $this.aestheticMappers_0 = ctx.aestheticMappers;\n $this.aesBounds_0 = ctx._aesBounds;\n $this.geomTargetCollector_0 = ctx.targetCollector;\n $this.annotations_0 = ctx.annotations;\n return $this;\n }\n function GeomLayerBuilder(geomProvider, stat, posProvider, fontFamilyRegistry) {\n GeomLayerBuilder$Companion_getInstance();\n this.geomProvider_0 = geomProvider;\n this.stat_0 = stat;\n this.posProvider_0 = posProvider;\n this.fontFamilyRegistry_0 = fontFamilyRegistry;\n this.myBindings_0 = ArrayList_init();\n this.myConstantByAes_0 = new TypedKeyHashMap();\n this.myGroupingVarName_0 = null;\n this.myPathIdVarName_0 = null;\n this.myScaleProviderByAes_0 = HashMap_init();\n this.myDataPreprocessor_0 = null;\n this.myLocatorLookupSpec_0 = GeomTargetLocator$LookupSpec.Companion.NONE;\n this.myContextualMappingProvider_0 = ContextualMappingProvider$Companion_getInstance().NONE;\n this.myIsLegendDisabled_0 = false;\n this.isYOrientation_0 = false;\n this.isMarginal_0 = false;\n this.marginalSide_0 = MarginSide$LEFT_getInstance();\n this.marginalSize_0 = kotlin_js_internal_DoubleCompanionObject.NaN;\n this.myAnnotationsProvider_0 = null;\n }\n GeomLayerBuilder.prototype.addBinding_14cn14$ = function (v) {\n this.myBindings_0.add_11rb$(v);\n return this;\n };\n GeomLayerBuilder.prototype.groupingVar_8xm3sj$ = function (v) {\n this.myGroupingVarName_0 = v.name;\n return this;\n };\n GeomLayerBuilder.prototype.groupingVarName_61zpoe$ = function (v) {\n this.myGroupingVarName_0 = v;\n return this;\n };\n GeomLayerBuilder.prototype.pathIdVarName_61zpoe$ = function (v) {\n this.myPathIdVarName_0 = v;\n return this;\n };\n GeomLayerBuilder.prototype.addConstantAes_bbdhip$ = function (aes, v) {\n this.myConstantByAes_0.put_ev6mlr$(aes, v);\n return this;\n };\n GeomLayerBuilder.prototype.addScaleProvider_jv3qxe$ = function (aes, scaleProvider) {\n this.myScaleProviderByAes_0.put_xwzc9p$(aes, scaleProvider);\n return this;\n };\n GeomLayerBuilder.prototype.locatorLookupSpec_271kgc$ = function (v) {\n this.myLocatorLookupSpec_0 = v;\n return this;\n };\n GeomLayerBuilder.prototype.contextualMappingProvider_td8fxc$ = function (v) {\n this.myContextualMappingProvider_0 = v;\n return this;\n };\n GeomLayerBuilder.prototype.disableLegend_6taknv$ = function (v) {\n this.myIsLegendDisabled_0 = v;\n return this;\n };\n GeomLayerBuilder.prototype.yOrientation_6taknv$ = function (v) {\n this.isYOrientation_0 = v;\n return this;\n };\n GeomLayerBuilder.prototype.marginal_fbs2by$ = function (isMarginal, marginalSide, marginalSize) {\n this.isMarginal_0 = isMarginal;\n this.marginalSide_0 = marginalSide;\n this.marginalSize_0 = marginalSize;\n return this;\n };\n function GeomLayerBuilder$annotationSpecification$lambda(closure$annotationSpec, closure$themeTextStyle) {\n return function (dataAccess, dataFrame) {\n return AnnotationLine$Companion_getInstance().createAnnotations_6mw9qm$(closure$annotationSpec, dataAccess, dataFrame, closure$themeTextStyle);\n };\n }\n GeomLayerBuilder.prototype.annotationSpecification_vimm4p$ = function (annotationSpec, themeTextStyle) {\n this.myAnnotationsProvider_0 = GeomLayerBuilder$annotationSpecification$lambda(annotationSpec, themeTextStyle);\n return this;\n };\n GeomLayerBuilder.prototype.build_e3vjvq$ = function (data_0, scaleMap, scaleMapppersNP) {\n var tmp$, tmp$_0;\n var $receiver = scaleMap.keySet();\n var result = LinkedHashMap_init_0(coerceAtLeast(mapCapacity(collectionSizeOrDefault($receiver, 10)), 16));\n var tmp$_1;\n tmp$_1 = $receiver.iterator();\n while (tmp$_1.hasNext()) {\n var element = tmp$_1.next();\n result.put_xwzc9p$(element, scaleMap.get_31786j$(element).transform);\n }\n var transformByAes = result;\n var data_1 = data_0;\n if (this.myDataPreprocessor_0 != null) {\n data_1 = ensureNotNull(this.myDataPreprocessor_0)(data_1, transformByAes);\n }\n data_1 = DataProcessing_getInstance().transformOriginals_9nntby$(data_1, this.myBindings_0, transformByAes);\n var $receiver_0 = this.myBindings_0;\n var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault($receiver_0, 10)), 16);\n var destination = LinkedHashMap_init_0(capacity);\n var tmp$_2;\n tmp$_2 = $receiver_0.iterator();\n while (tmp$_2.hasNext()) {\n var element_0 = tmp$_2.next();\n var tmp$_3, tmp$_4;\n tmp$_4 = element_0.aes;\n if (element_0.variable.isOrigin) {\n var transformVar = data.DataFrameUtil.transformVarFor_896ixz$(element_0.aes);\n tmp$_3 = new VarBinding(transformVar, element_0.aes);\n } else {\n tmp$_3 = element_0;\n }\n var pair = to(tmp$_4, tmp$_3);\n destination.put_xwzc9p$(pair.first, pair.second);\n }\n var replacementBindings = HashMap_init_0(destination);\n var bindingsToPut = ArrayList_init();\n tmp$ = replacementBindings.values.iterator();\n while (tmp$.hasNext()) {\n var binding = tmp$.next();\n var variable = binding.variable;\n if (variable.isStat) {\n var aes = binding.aes;\n var transform = getValue(transformByAes, aes);\n var transformVar_0 = data.TransformVar.forAes_896ixz$(aes);\n data_1 = data.DataFrameUtil.applyTransform_3268a5$(data_1, variable, transformVar_0, transform);\n bindingsToPut.add_11rb$(new VarBinding(transformVar_0, aes));\n }\n }\n tmp$_0 = bindingsToPut.iterator();\n while (tmp$_0.hasNext()) {\n var binding_0 = tmp$_0.next();\n var key = binding_0.aes;\n replacementBindings.put_xwzc9p$(key, binding_0);\n }\n var groupingVariables = DataProcessing_getInstance().defaultGroupingVariables_39xr23$(data_1, this.myBindings_0, this.myPathIdVarName_0);\n var groupingContext = new GroupingContext(data_1, groupingVariables, this.myGroupingVarName_0, this.handlesGroups_0());\n return new GeomLayerBuilder$MyGeomLayer(data_1, this.geomProvider_0, this.posProvider_0, this.geomProvider_0.renders(), groupingContext.groupMapper, replacementBindings, this.myConstantByAes_0, scaleMap, scaleMapppersNP, this.myLocatorLookupSpec_0, this.myContextualMappingProvider_0, this.myIsLegendDisabled_0, this.isYOrientation_0, this.isMarginal_0, this.marginalSide_0, this.marginalSize_0, this.fontFamilyRegistry_0, this.myAnnotationsProvider_0);\n };\n GeomLayerBuilder.prototype.handlesGroups_0 = function () {\n return this.geomProvider_0.handlesGroups() || this.posProvider_0.handlesGroups();\n };\n function GeomLayerBuilder$MyGeomLayer(dataFrame, geomProvider, posProvider, renderedAes, group, varBindings, constantByAes, scaleMap, scaleMapppersNP, locatorLookupSpec, contextualMappingProvider, isLegendDisabled, isYOrientation, isMarginal, marginalSide, marginalSize, fontFamilyRegistry, annotationsProvider) {\n this.dataFrame_uc8k26$_0 = dataFrame;\n this.posProvider_sk8uxc$_0 = posProvider;\n this.group_btwr86$_0 = group;\n this.varBindings_0 = varBindings;\n this.scaleMap_9lvzv7$_0 = scaleMap;\n this.scaleMapppersNP_xaevk1$_0 = scaleMapppersNP;\n this.locatorLookupSpec_65qeye$_0 = locatorLookupSpec;\n this.contextualMappingProvider_0 = contextualMappingProvider;\n this.isLegendDisabled_1bnyfg$_0 = isLegendDisabled;\n this.isYOrientation_gj59r2$_0 = isYOrientation;\n this.isMarginal_jm2roc$_0 = isMarginal;\n this.marginalSide_i85i29$_0 = marginalSide;\n this.marginalSize_i851qz$_0 = marginalSize;\n this.fontFamilyRegistry_xk06j5$_0 = fontFamilyRegistry;\n this.annotationsProvider_0 = annotationsProvider;\n this.geom_ipep5v$_0 = geomProvider.createGeom();\n this.geomKind_qyi6z5$_0 = geomProvider.geomKind;\n this.aestheticsDefaults_4lnusm$_0 = geomProvider.aestheticsDefaults();\n this.myRenderedAes_0 = null;\n this.myConstantByAes_0 = null;\n var tmp$;\n this.myRenderedAes_0 = ArrayList_init_1(renderedAes);\n this.myConstantByAes_0 = new TypedKeyHashMap();\n tmp$ = constantByAes.keys_287e2$().iterator();\n while (tmp$.hasNext()) {\n var key = tmp$.next();\n this.myConstantByAes_0.put_ev6mlr$(key, constantByAes.get_ex36zt$(key));\n }\n }\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'dataFrame', {\n get: function () {\n return this.dataFrame_uc8k26$_0;\n }\n });\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'posProvider', {\n get: function () {\n return this.posProvider_sk8uxc$_0;\n }\n });\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'group', {\n get: function () {\n return this.group_btwr86$_0;\n }\n });\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'scaleMap', {\n get: function () {\n return this.scaleMap_9lvzv7$_0;\n }\n });\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'scaleMapppersNP', {\n get: function () {\n return this.scaleMapppersNP_xaevk1$_0;\n }\n });\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'locatorLookupSpec', {\n get: function () {\n return this.locatorLookupSpec_65qeye$_0;\n }\n });\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'isLegendDisabled', {\n get: function () {\n return this.isLegendDisabled_1bnyfg$_0;\n }\n });\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'isYOrientation', {\n get: function () {\n return this.isYOrientation_gj59r2$_0;\n }\n });\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'isMarginal', {\n get: function () {\n return this.isMarginal_jm2roc$_0;\n }\n });\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'marginalSide', {\n get: function () {\n return this.marginalSide_i85i29$_0;\n }\n });\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'marginalSize', {\n get: function () {\n return this.marginalSize_i851qz$_0;\n }\n });\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'fontFamilyRegistry', {\n get: function () {\n return this.fontFamilyRegistry_xk06j5$_0;\n }\n });\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'geom', {\n configurable: true,\n get: function () {\n return this.geom_ipep5v$_0;\n }\n });\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'geomKind', {\n configurable: true,\n get: function () {\n return this.geomKind_qyi6z5$_0;\n }\n });\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'aestheticsDefaults', {\n configurable: true,\n get: function () {\n return this.aestheticsDefaults_4lnusm$_0;\n }\n });\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'legendKeyElementFactory', {\n configurable: true,\n get: function () {\n return this.geom.legendKeyElementFactory;\n }\n });\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'isLiveMap', {\n configurable: true,\n get: function () {\n return Kotlin.isType(this.geom, LiveMapGeom);\n }\n });\n GeomLayerBuilder$MyGeomLayer.prototype.renderedAes = function () {\n return this.myRenderedAes_0;\n };\n GeomLayerBuilder$MyGeomLayer.prototype.hasBinding_896ixz$ = function (aes) {\n return this.varBindings_0.containsKey_11rb$(aes);\n };\n GeomLayerBuilder$MyGeomLayer.prototype.getBinding_31786j$ = function (aes) {\n return ensureNotNull(this.varBindings_0.get_11rb$(aes));\n };\n GeomLayerBuilder$MyGeomLayer.prototype.hasConstant_896ixz$ = function (aes) {\n return this.myConstantByAes_0.containsKey_ex36zt$(aes);\n };\n GeomLayerBuilder$MyGeomLayer.prototype.getConstant_31786j$ = function (aes) {\n if (!this.hasConstant_896ixz$(aes)) {\n var message = 'Constant value is not defined for aes ' + aes;\n throw IllegalArgumentException_init(message.toString());\n }\n return this.myConstantByAes_0.get_ex36zt$(aes);\n };\n GeomLayerBuilder$MyGeomLayer.prototype.getDefault_31786j$ = function (aes) {\n return this.aestheticsDefaults.defaultValue_31786j$(aes);\n };\n GeomLayerBuilder$MyGeomLayer.prototype.preferableNullDomain_896ixz$ = function (aes) {\n var tmp$;\n var aes_0 = afterOrientation(aes, this.isYOrientation);\n return (Kotlin.isType(tmp$ = this.geom, GeomBase) ? tmp$ : throwCCE()).preferableNullDomain_896ixz$(aes_0);\n };\n GeomLayerBuilder$MyGeomLayer.prototype.rangeIncludesZero_896ixz$ = function (aes) {\n var aes_0 = afterOrientation(aes, this.isYOrientation);\n return this.aestheticsDefaults.rangeIncludesZero_896ixz$(aes_0);\n };\n GeomLayerBuilder$MyGeomLayer.prototype.setLiveMapProvider_kld0fp$ = function (liveMapProvider) {\n if (Kotlin.isType(this.geom, LiveMapGeom)) {\n this.geom.setLiveMapProvider_kld0fp$(liveMapProvider);\n } else {\n throw IllegalStateException_init('Not Livemap: ' + Kotlin.getKClassFromExpression(this.geom).simpleName);\n }\n };\n GeomLayerBuilder$MyGeomLayer.prototype.createContextualMapping = function () {\n var dataAccess = new PointDataAccess(this.dataFrame, this.varBindings_0, this.scaleMap, this.isYOrientation);\n return this.contextualMappingProvider_0.createContextualMapping_8fr62e$(dataAccess, this.dataFrame);\n };\n GeomLayerBuilder$MyGeomLayer.prototype.createAnnotations = function () {\n var tmp$;\n var tmp$_0;\n if ((tmp$ = this.annotationsProvider_0) != null) {\n var dataAccess = new PointDataAccess(this.dataFrame, this.varBindings_0, this.scaleMap, this.isYOrientation);\n tmp$_0 = tmp$(dataAccess, this.dataFrame);\n } else\n tmp$_0 = null;\n return tmp$_0;\n };\n GeomLayerBuilder$MyGeomLayer.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'MyGeomLayer',\n interfaces: [GeomLayer]\n };\n function GeomLayerBuilder$Companion() {\n GeomLayerBuilder$Companion_instance = this;\n }\n function GeomLayerBuilder$Companion$demoAndTest$lambda(closure$builder) {\n return function (data, transformByAes) {\n var transformedData = DataProcessing_getInstance().transformOriginals_9nntby$(data, closure$builder.myBindings_0, transformByAes);\n if (equals(closure$builder.stat_0, stat.Stats.IDENTITY))\n return transformedData;\n else {\n var statCtx = new SimpleStatContext(transformedData);\n var groupingVariables = DataProcessing_getInstance().defaultGroupingVariables_39xr23$(data, closure$builder.myBindings_0, closure$builder.myPathIdVarName_0);\n var groupingCtx = new GroupingContext(transformedData, groupingVariables, closure$builder.myGroupingVarName_0, true);\n var statInput = new StatInput(transformedData, closure$builder.myBindings_0, transformByAes, statCtx, false);\n var dataAndGroupingContext = DataProcessing_getInstance().buildStatData_ardmvj$(statInput, closure$builder.stat_0, groupingCtx, emptyList(), emptyList(), emptyList(), null, getCallableRef('println', function (p1) {\n return println(p1), Unit;\n }));\n return dataAndGroupingContext.data;\n }\n };\n }\n GeomLayerBuilder$Companion.prototype.demoAndTest_ij5gxo$ = function (geomProvider, stat, posProvider) {\n if (posProvider === void 0)\n posProvider = PosProvider$Companion_getInstance().wrap_dkjclg$(pos.PositionAdjustments.identity());\n var builder = new GeomLayerBuilder(geomProvider, stat, posProvider, new DefaultFontFamilyRegistry());\n builder.myDataPreprocessor_0 = GeomLayerBuilder$Companion$demoAndTest$lambda(builder);\n return builder;\n };\n GeomLayerBuilder$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var GeomLayerBuilder$Companion_instance = null;\n function GeomLayerBuilder$Companion_getInstance() {\n if (GeomLayerBuilder$Companion_instance === null) {\n new GeomLayerBuilder$Companion();\n }\n return GeomLayerBuilder$Companion_instance;\n }\n GeomLayerBuilder.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GeomLayerBuilder',\n interfaces: []\n };\n function GuideOptions() {\n GuideOptions$Companion_getInstance();\n this.isReverse = false;\n }\n function GuideOptions$Companion() {\n GuideOptions$Companion_instance = this;\n this.NONE = new GuideOptions$Companion$NONE$ObjectLiteral();\n }\n function GuideOptions$Companion$NONE$ObjectLiteral() {\n GuideOptions.call(this);\n }\n GuideOptions$Companion$NONE$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [GuideOptions]\n };\n GuideOptions$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var GuideOptions$Companion_instance = null;\n function GuideOptions$Companion_getInstance() {\n if (GuideOptions$Companion_instance === null) {\n new GuideOptions$Companion();\n }\n return GuideOptions$Companion_instance;\n }\n GuideOptions.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GuideOptions',\n interfaces: []\n };\n function ImmutableGeomContext() {\n }\n function ImmutableGeomContext$Builder() {\n }\n ImmutableGeomContext$Builder.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'Builder',\n interfaces: []\n };\n ImmutableGeomContext.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'ImmutableGeomContext',\n interfaces: [GeomContext]\n };\n function LegendAssembler(legendTitle, guideOptionsMap, scaleMappers, theme) {\n LegendAssembler$Companion_getInstance();\n this.legendTitle_0 = legendTitle;\n this.guideOptionsMap_0 = guideOptionsMap;\n this.scaleMappers_0 = scaleMappers;\n this.theme_0 = theme;\n this.legendLayers_0 = ArrayList_init();\n }\n LegendAssembler.prototype.addLayer_ut0rz1$ = function (keyFactory, aesList, constantByAes, aestheticsDefaults, ctx) {\n this.legendLayers_0.add_11rb$(new LegendAssembler$LegendLayer(keyFactory, aesList, constantByAes, aestheticsDefaults, this.scaleMappers_0, ctx));\n };\n function LegendAssembler$createLegend$ObjectLiteral(closure$spec, size) {\n this.closure$spec = closure$spec;\n LegendBoxInfo.call(this, size);\n }\n LegendAssembler$createLegend$ObjectLiteral.prototype.createLegendBox = function () {\n var c = new LegendComponent(this.closure$spec);\n c.debug = LegendAssembler$Companion_getInstance().DEBUG_DRAWING_0;\n return c;\n };\n LegendAssembler$createLegend$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [LegendBoxInfo]\n };\n LegendAssembler.prototype.createLegend = function () {\n var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3, tmp$_4;\n var legendBreaksByLabel = LinkedHashMap_init();\n tmp$ = this.legendLayers_0.iterator();\n while (tmp$.hasNext()) {\n var legendLayer = tmp$.next();\n var keyElementFactory = legendLayer.keyElementFactory_8be2vx$;\n var dataPoints = legendLayer.keyAesthetics_8be2vx$.dataPoints().iterator();\n tmp$_0 = legendLayer.keyLabels_8be2vx$.iterator();\n while (tmp$_0.hasNext()) {\n var label = tmp$_0.next();\n var tmp$_5;\n var value = legendBreaksByLabel.get_11rb$(label);\n if (value == null) {\n var answer = new LegendBreak(label);\n legendBreaksByLabel.put_xwzc9p$(label, answer);\n tmp$_5 = answer;\n } else {\n tmp$_5 = value;\n }\n tmp$_5.addLayer_w0u015$(dataPoints.next(), keyElementFactory);\n }\n }\n var legendBreaks = ArrayList_init();\n tmp$_1 = legendBreaksByLabel.values.iterator();\n while (tmp$_1.hasNext()) {\n var legendBreak = tmp$_1.next();\n if (legendBreak.isEmpty) {\n continue;\n }\n legendBreaks.add_11rb$(legendBreak);\n }\n if (legendBreaks.isEmpty()) {\n return LegendBoxInfo$Companion_getInstance().EMPTY;\n }\n var legendOptionsList = ArrayList_init();\n tmp$_2 = this.legendLayers_0.iterator();\n while (tmp$_2.hasNext()) {\n var legendLayer_0 = tmp$_2.next();\n var aesList = legendLayer_0.aesList_8be2vx$;\n tmp$_3 = aesList.iterator();\n while (tmp$_3.hasNext()) {\n var aes = tmp$_3.next();\n if (Kotlin.isType(this.guideOptionsMap_0.get_11rb$(aes), LegendOptions)) {\n legendOptionsList.add_11rb$(Kotlin.isType(tmp$_4 = this.guideOptionsMap_0.get_11rb$(aes), LegendOptions) ? tmp$_4 : throwCCE());\n }\n }\n }\n var spec = LegendAssembler$Companion_getInstance().createLegendSpec_esqxbx$(this.legendTitle_0, legendBreaks, this.theme_0, LegendOptions$Companion_getInstance().combine_pmdc6s$(legendOptionsList));\n return new LegendAssembler$createLegend$ObjectLiteral(spec, spec.size);\n };\n function LegendAssembler$LegendLayer(keyElementFactory, aesList, constantByAes, aestheticsDefaults, scaleMappers, ctx) {\n this.keyElementFactory_8be2vx$ = keyElementFactory;\n this.aesList_8be2vx$ = aesList;\n this.keyAesthetics_8be2vx$ = null;\n this.keyLabels_8be2vx$ = null;\n var tmp$, tmp$_0;\n var aesValuesByLabel = LinkedHashMap_init();\n tmp$ = this.aesList_8be2vx$.iterator();\n while (tmp$.hasNext()) {\n var aes = tmp$.next();\n var scale = ctx.getScale_896ixz$(aes);\n if (!scale.hasBreaks()) {\n scale = breaks.ScaleBreaksUtil.withBreaks_ssmbt$(scale, ctx.overallTransformedDomain_896ixz$(aes), 5);\n }\n if (!scale.hasBreaks()) {\n var message = 'No breaks were defined for scale ' + aes;\n throw IllegalStateException_init(message.toString());\n }\n var scaleBreaks = scale.getScaleBreaks();\n var $receiver = scaleBreaks.transformedValues;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$_1;\n tmp$_1 = $receiver.iterator();\n while (tmp$_1.hasNext()) {\n var item = tmp$_1.next();\n var tmp$_2;\n destination.add_11rb$(Kotlin.isType(tmp$_2 = getValue(scaleMappers, aes).invoke_yrwdxb$(item), Any) ? tmp$_2 : throwCCE());\n }\n var aesValues = destination;\n var labels = scaleBreaks.labels;\n tmp$_0 = zip(labels, aesValues).iterator();\n while (tmp$_0.hasNext()) {\n var tmp$_3 = tmp$_0.next();\n var label = tmp$_3.component1()\n , aesValue = tmp$_3.component2();\n var tmp$_4;\n var value = aesValuesByLabel.get_11rb$(label);\n if (value == null) {\n var answer = HashMap_init();\n aesValuesByLabel.put_xwzc9p$(label, answer);\n tmp$_4 = answer;\n } else {\n tmp$_4 = value;\n }\n tmp$_4.put_xwzc9p$(aes, aesValue);\n }\n }\n this.keyAesthetics_8be2vx$ = LegendAssemblerUtil_getInstance().mapToAesthetics_8kbmqf$(aesValuesByLabel.values, constantByAes, aestheticsDefaults);\n this.keyLabels_8be2vx$ = ArrayList_init_1(aesValuesByLabel.keys);\n }\n LegendAssembler$LegendLayer.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendLayer',\n interfaces: []\n };\n function LegendAssembler$Companion() {\n LegendAssembler$Companion_instance = this;\n this.DEBUG_DRAWING_0 = FeatureSwitch_getInstance().LEGEND_DEBUG_DRAWING;\n }\n function LegendAssembler$Companion$createLegendSpec$pretty(v) {\n var margin = 1.0;\n var x = v.x / 2;\n var tmp$ = JsMath.floor(x) * 2 + 1.0 + margin;\n var x_0 = v.y / 2;\n return new DoubleVector(tmp$, JsMath.floor(x_0) * 2 + 1.0 + margin);\n }\n LegendAssembler$Companion.prototype.createLegendSpec_esqxbx$ = function (title, breaks, theme, options) {\n if (options === void 0)\n options = new LegendOptions();\n var tmp$, tmp$_0;\n var legendDirection = LegendAssemblerUtil_getInstance().legendDirection_730mk3$(theme);\n var pretty = LegendAssembler$Companion$createLegendSpec$pretty;\n var themeKeySize = new DoubleVector(theme.keySize(), theme.keySize());\n var destination = ArrayList_init_0(collectionSizeOrDefault(breaks, 10));\n var tmp$_1;\n tmp$_1 = breaks.iterator();\n while (tmp$_1.hasNext()) {\n var item = tmp$_1.next();\n destination.add_11rb$(themeKeySize.max_gpjtzr$(pretty(item.minimumKeySize)));\n }\n var block$result;\n if (legendDirection === LegendDirection$HORIZONTAL_getInstance()) {\n var selector = getPropertyCallableRef('y', 1, function ($receiver) {\n return $receiver.y;\n });\n var iterator = destination.iterator();\n if (!iterator.hasNext())\n throw NoSuchElementException_init();\n var maxValue = selector(iterator.next());\n while (iterator.hasNext()) {\n var v = selector(iterator.next());\n maxValue = JsMath.max(maxValue, v);\n }\n var maxKeyHeight = maxValue;\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(destination, 10));\n var tmp$_2;\n tmp$_2 = destination.iterator();\n while (tmp$_2.hasNext()) {\n var item_0 = tmp$_2.next();\n destination_0.add_11rb$(new DoubleVector(item_0.x, maxKeyHeight));\n }\n block$result = destination_0;\n } else {\n var selector_0 = getPropertyCallableRef('x', 1, function ($receiver) {\n return $receiver.x;\n });\n var iterator_0 = destination.iterator();\n if (!iterator_0.hasNext())\n throw NoSuchElementException_init();\n var maxValue_0 = selector_0(iterator_0.next());\n while (iterator_0.hasNext()) {\n var v_0 = selector_0(iterator_0.next());\n maxValue_0 = JsMath.max(maxValue_0, v_0);\n }\n var maxKeyWidth = maxValue_0;\n var destination_1 = ArrayList_init_0(collectionSizeOrDefault(destination, 10));\n var tmp$_3;\n tmp$_3 = destination.iterator();\n while (tmp$_3.hasNext()) {\n var item_1 = tmp$_3.next();\n destination_1.add_11rb$(new DoubleVector(maxKeyWidth, item_1.y));\n }\n block$result = destination_1;\n }\n var keySizes = block$result;\n var breakCount = breaks.size;\n var colCount;\n var rowCount;\n if (options.isByRow) {\n if (options.hasColCount()) {\n var a = options.colCount;\n tmp$ = JsMath.min(a, breakCount);\n } else if (options.hasRowCount()) {\n var x = breakCount / options.rowCount;\n tmp$ = numberToInt(JsMath.ceil(x));\n } else if (legendDirection === LegendDirection$HORIZONTAL_getInstance())\n tmp$ = breakCount;\n else\n tmp$ = 1;\n colCount = tmp$;\n var x_0 = breakCount / colCount;\n rowCount = numberToInt(JsMath.ceil(x_0));\n } else {\n if (options.hasRowCount()) {\n var a_0 = options.rowCount;\n tmp$_0 = JsMath.min(a_0, breakCount);\n } else if (options.hasColCount()) {\n var x_1 = breakCount / options.colCount;\n tmp$_0 = numberToInt(JsMath.ceil(x_1));\n } else if (legendDirection !== LegendDirection$HORIZONTAL_getInstance())\n tmp$_0 = breakCount;\n else\n tmp$_0 = 1;\n rowCount = tmp$_0;\n var x_2 = breakCount / rowCount;\n colCount = numberToInt(JsMath.ceil(x_2));\n }\n var layout;\n if (legendDirection === LegendDirection$HORIZONTAL_getInstance()) {\n if (options.hasRowCount() || (options.hasColCount() && options.colCount < breakCount)) {\n layout = LegendComponentLayout$Companion_getInstance().horizontalMultiRow_d02gve$(title, breaks, keySizes, theme);\n } else {\n layout = LegendComponentLayout$Companion_getInstance().horizontal_d02gve$(title, breaks, keySizes, theme);\n }\n } else {\n layout = LegendComponentLayout$Companion_getInstance().vertical_d02gve$(title, breaks, keySizes, theme);\n }\n layout.colCount = colCount;\n layout.rowCount = rowCount;\n layout.isFillByRow = options.isByRow;\n return new LegendComponentSpec(title, breaks, theme, layout, false);\n };\n LegendAssembler$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var LegendAssembler$Companion_instance = null;\n function LegendAssembler$Companion_getInstance() {\n if (LegendAssembler$Companion_instance === null) {\n new LegendAssembler$Companion();\n }\n return LegendAssembler$Companion_instance;\n }\n LegendAssembler.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendAssembler',\n interfaces: []\n };\n function LegendAssemblerUtil() {\n LegendAssemblerUtil_instance = this;\n }\n LegendAssemblerUtil.prototype.mapToAesthetics_ml5orx$ = function (valuesByAes, constantByAes, aestheticsDefaults) {\n var tmp$, tmp$_0, tmp$_1, tmp$_2;\n var builder = new AestheticsBuilder(0);\n tmp$ = Aes.Companion.values().iterator();\n while (tmp$.hasNext()) {\n var aes = tmp$.next();\n builder.constantAes_bbdhip$(Kotlin.isType(tmp$_0 = aes, Aes) ? tmp$_0 : throwCCE(), aestheticsDefaults.defaultValue_31786j$(aes));\n }\n tmp$_1 = valuesByAes.keys.iterator();\n while (tmp$_1.hasNext()) {\n var aes_0 = tmp$_1.next();\n var values = getValue(valuesByAes, aes_0);\n builder.aes_u42xfl$(aes_0, AestheticsBuilder.Companion.list_bemo1h$(values));\n builder.dataPointCount_za3lpa$(values.size);\n }\n tmp$_2 = constantByAes.keys.iterator();\n while (tmp$_2.hasNext()) {\n var aes_1 = tmp$_2.next();\n builder.constantAes_bbdhip$(aes_1, ensureNotNull(constantByAes.get_11rb$(aes_1)));\n }\n return builder.build();\n };\n function LegendAssemblerUtil$mapToAesthetics$lambda(closure$dataPoints, closure$aes) {\n return function (index) {\n return ensureNotNull(closure$dataPoints.get_za3lpa$(index).get_11rb$(closure$aes));\n };\n }\n LegendAssemblerUtil.prototype.mapToAesthetics_8kbmqf$ = function (valueByAesIterable, constantByAes, aestheticsDefaults) {\n var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3, tmp$_4;\n var dataPoints = ArrayList_init();\n tmp$ = valueByAesIterable.iterator();\n while (tmp$.hasNext()) {\n var valueByAes = tmp$.next();\n var dataPoint = HashMap_init();\n tmp$_0 = Aes.Companion.values().iterator();\n while (tmp$_0.hasNext()) {\n var aes = tmp$_0.next();\n var value = ensureNotNull(aestheticsDefaults.defaultValueInLegend_31786j$(aes));\n dataPoint.put_xwzc9p$(aes, value);\n }\n tmp$_1 = constantByAes.keys.iterator();\n while (tmp$_1.hasNext()) {\n var constantAes = tmp$_1.next();\n if (equals(constantAes, Aes.Companion.SHAPE) || equals(constantAes, Aes.Companion.COLOR) || equals(constantAes, Aes.Companion.FILL)) {\n var value_0 = ensureNotNull(constantByAes.get_11rb$(constantAes));\n dataPoint.put_xwzc9p$(constantAes, value_0);\n }\n }\n tmp$_2 = valueByAes.keys.iterator();\n while (tmp$_2.hasNext()) {\n var aes_0 = tmp$_2.next();\n var value_1 = ensureNotNull(valueByAes.get_11rb$(aes_0));\n dataPoint.put_xwzc9p$(aes_0, value_1);\n }\n dataPoints.add_11rb$(dataPoint);\n }\n var builder = new AestheticsBuilder(dataPoints.size);\n tmp$_3 = Aes.Companion.values().iterator();\n while (tmp$_3.hasNext()) {\n var aes_1 = tmp$_3.next();\n builder.aes_u42xfl$(Kotlin.isType(tmp$_4 = aes_1, Aes) ? tmp$_4 : throwCCE(), LegendAssemblerUtil$mapToAesthetics$lambda(dataPoints, aes_1));\n }\n return builder.build();\n };\n LegendAssemblerUtil.prototype.legendDirection_730mk3$ = function (theme) {\n var legendDirection = theme.direction();\n if (legendDirection === LegendDirection$AUTO_getInstance()) {\n var legendPosition = theme.position();\n legendDirection = legendPosition === LegendPosition$Companion_getInstance().TOP || legendPosition === LegendPosition$Companion_getInstance().BOTTOM ? LegendDirection$HORIZONTAL_getInstance() : LegendDirection$VERTICAL_getInstance();\n }\n return legendDirection;\n };\n LegendAssemblerUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'LegendAssemblerUtil',\n interfaces: []\n };\n var LegendAssemblerUtil_instance = null;\n function LegendAssemblerUtil_getInstance() {\n if (LegendAssemblerUtil_instance === null) {\n new LegendAssemblerUtil();\n }\n return LegendAssemblerUtil_instance;\n }\n function LegendOptions() {\n LegendOptions$Companion_getInstance();\n GuideOptions.call(this);\n this.myColCount_0 = null;\n this.myRowCount_0 = null;\n this.isByRow = false;\n }\n Object.defineProperty(LegendOptions.prototype, 'colCount', {\n configurable: true,\n get: function () {\n return ensureNotNull(this.myColCount_0);\n },\n set: function (colCount) {\n this.myColCount_0 = JsMath.max(1, colCount);\n }\n });\n Object.defineProperty(LegendOptions.prototype, 'rowCount', {\n configurable: true,\n get: function () {\n return ensureNotNull(this.myRowCount_0);\n },\n set: function (rowCount) {\n this.myRowCount_0 = JsMath.max(1, rowCount);\n }\n });\n LegendOptions.prototype.hasColCount = function () {\n return this.myColCount_0 != null;\n };\n LegendOptions.prototype.hasRowCount = function () {\n return this.myRowCount_0 != null;\n };\n function LegendOptions$Companion() {\n LegendOptions$Companion_instance = this;\n }\n LegendOptions$Companion.prototype.combine_pmdc6s$ = function (optionsList) {\n var tmp$;\n var result = new LegendOptions();\n tmp$ = optionsList.iterator();\n while (tmp$.hasNext()) {\n var options = tmp$.next();\n if (options.isByRow) {\n result.isByRow = true;\n }\n if (options.hasColCount()) {\n result.colCount = options.colCount;\n }\n if (options.hasRowCount()) {\n result.rowCount = options.rowCount;\n }\n }\n return result;\n };\n LegendOptions$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var LegendOptions$Companion_instance = null;\n function LegendOptions$Companion_getInstance() {\n if (LegendOptions$Companion_instance === null) {\n new LegendOptions$Companion();\n }\n return LegendOptions$Companion_instance;\n }\n LegendOptions.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendOptions',\n interfaces: [GuideOptions]\n };\n function PlotAssembler(layersByTile, scaleMap, scaleMappersNP, coordProvider, xAxisOrientation, yAxisOrientation, theme) {\n PlotAssembler$Companion_getInstance();\n this.layersByTile_0 = layersByTile;\n this.scaleMap_0 = scaleMap;\n this.scaleMappersNP_0 = scaleMappersNP;\n this.coordProvider_0 = coordProvider;\n this.xAxisOrientation_0 = xAxisOrientation;\n this.yAxisOrientation_0 = yAxisOrientation;\n this.theme_0 = theme;\n this.scaleXProto_0 = this.scaleMap_0.get_31786j$(Aes.Companion.X);\n this.scaleYProto_0 = this.scaleMap_0.get_31786j$(Aes.Companion.Y);\n var $receiver = this.layersByTile_0;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n var tmp$_0 = destination.add_11rb$;\n var destination_0 = ArrayList_init();\n var tmp$_1;\n tmp$_1 = item.iterator();\n while (tmp$_1.hasNext()) {\n var element = tmp$_1.next();\n if (!element.isMarginal)\n destination_0.add_11rb$(element);\n }\n tmp$_0.call(destination, destination_0);\n }\n this.coreLayersByTile = destination;\n var $receiver_0 = this.layersByTile_0;\n var destination_1 = ArrayList_init_0(collectionSizeOrDefault($receiver_0, 10));\n var tmp$_2;\n tmp$_2 = $receiver_0.iterator();\n while (tmp$_2.hasNext()) {\n var item_0 = tmp$_2.next();\n var tmp$_3 = destination_1.add_11rb$;\n var destination_2 = ArrayList_init();\n var tmp$_4;\n tmp$_4 = item_0.iterator();\n while (tmp$_4.hasNext()) {\n var element_0 = tmp$_4.next();\n if (element_0.isMarginal)\n destination_2.add_11rb$(element_0);\n }\n var destination_3 = ArrayList_init();\n var tmp$_5;\n tmp$_5 = destination_2.iterator();\n while (tmp$_5.hasNext()) {\n var element_1 = tmp$_5.next();\n if (!element_1.isLiveMap)\n destination_3.add_11rb$(element_1);\n }\n tmp$_3.call(destination_1, destination_3);\n }\n this.marginalLayersByTile_0 = destination_1;\n var $receiver_1 = flatten(this.coreLayersByTile);\n var predicate = getPropertyCallableRef('isLiveMap', 1, function ($receiver) {\n return $receiver.isLiveMap;\n });\n var any$result;\n any$break: do {\n var tmp$_6;\n if (Kotlin.isType($receiver_1, Collection) && $receiver_1.isEmpty()) {\n any$result = false;\n break any$break;\n }\n tmp$_6 = $receiver_1.iterator();\n while (tmp$_6.hasNext()) {\n var element_2 = tmp$_6.next();\n if (predicate(element_2)) {\n any$result = true;\n break any$break;\n }\n }\n any$result = false;\n }\n while (false);\n this.containsLiveMap = any$result;\n this.facets = PlotFacets$Companion_getInstance().undefined();\n this.title = null;\n this.subtitle = null;\n this.caption = null;\n this.guideOptionsMap = HashMap_init();\n this.legendsEnabled_0 = true;\n this.interactionsEnabled_0 = true;\n }\n PlotAssembler.prototype.hasLayers_0 = function () {\n var $receiver = this.coreLayersByTile;\n var any$result;\n any$break: do {\n var tmp$;\n if (Kotlin.isType($receiver, Collection) && $receiver.isEmpty()) {\n any$result = false;\n break any$break;\n }\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n if (!element.isEmpty()) {\n any$result = true;\n break any$break;\n }\n }\n any$result = false;\n }\n while (false);\n return any$result;\n };\n PlotAssembler.prototype.createPlot = function () {\n var tmp$, tmp$_0, tmp$_1, tmp$_2;\n if (!this.hasLayers_0()) {\n var message = 'No layers in plot';\n throw IllegalArgumentException_init(message.toString());\n }\n var styleSheet = Style_getInstance().fromTheme_1crrl9$(this.theme_0, this.coordProvider_0.flipped);\n var plotContext = new PlotAssemblerPlotContext(this.layersByTile_0, this.scaleMap_0);\n if (this.legendsEnabled_0)\n tmp$ = PlotAssemblerUtil_getInstance().createLegends_enmjz4$(plotContext, this.scaleMappersNP_0, this.guideOptionsMap, this.theme_0.legend());\n else\n tmp$ = emptyList();\n var legendsBoxInfos = tmp$;\n if (this.containsLiveMap) {\n var $receiver = this.coreLayersByTile;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$_3;\n tmp$_3 = $receiver.iterator();\n while (tmp$_3.hasNext()) {\n var item = tmp$_3.next();\n destination.add_11rb$(new LiveMapTileLayoutProvider());\n }\n var layoutProviderByTile = destination;\n var plotLayout = PlotAssemblerUtil_getInstance().createPlotLayout_4j7bvh$(layoutProviderByTile, this.facets, this.theme_0.facets(), new LiveMapAxisTheme(), new LiveMapAxisTheme());\n var $receiver_0 = this.coreLayersByTile;\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault($receiver_0, 10));\n var tmp$_4;\n tmp$_4 = $receiver_0.iterator();\n while (tmp$_4.hasNext()) {\n var item_0 = tmp$_4.next();\n destination_0.add_11rb$(new BogusFrameOfReferenceProvider());\n }\n var frameProviderByTile = destination_0;\n tmp$_2 = this.createPlot_0(frameProviderByTile, plotLayout, legendsBoxInfos, styleSheet, plotContext);\n } else {\n var flipAxis = this.coordProvider_0.flipped;\n var domainsXYByTile = PositionalScalesUtil_getInstance().computePlotXYTransformedDomains_6ppuq6$(this.coreLayersByTile, this.scaleXProto_0, this.scaleYProto_0, this.facets);\n if (flipAxis === true)\n tmp$_0 = to(this.scaleYProto_0, this.scaleXProto_0);\n else\n tmp$_0 = to(this.scaleXProto_0, this.scaleYProto_0);\n var tmp$_5 = tmp$_0;\n var hScaleProto = tmp$_5.component1()\n , vScaleProto = tmp$_5.component2();\n if (flipAxis === true)\n tmp$_1 = to(this.yAxisOrientation_0.flip(), this.xAxisOrientation_0.flip());\n else\n tmp$_1 = to(this.xAxisOrientation_0, this.yAxisOrientation_0);\n var tmp$_6 = tmp$_1;\n var hAxisOrientation = tmp$_6.component1()\n , vAxisOrientation = tmp$_6.component2();\n var marginalLayers = flatten(this.marginalLayersByTile_0);\n var domainByMargin = MarginalLayerUtil_getInstance().marginalDomainByMargin_2z8kva$(marginalLayers, this.scaleXProto_0, this.scaleYProto_0);\n var marginsLayout = GeomMarginsLayout$Companion_getInstance().create_relqli$(marginalLayers);\n var destination_1 = ArrayList_init_0(collectionSizeOrDefault(domainsXYByTile, 10));\n var tmp$_7;\n tmp$_7 = domainsXYByTile.iterator();\n while (tmp$_7.hasNext()) {\n var item_1 = tmp$_7.next();\n var tmp$_8 = destination_1.add_11rb$;\n var xDomain = item_1.component1()\n , yDomain = item_1.component2();\n var adjustedDomain = this.coordProvider_0.adjustDomain_wthzt5$(DoubleRectangle_init_0(xDomain, yDomain));\n tmp$_8.call(destination_1, new SquareFrameOfReferenceProvider(hScaleProto, vScaleProto, adjustedDomain, flipAxis, hAxisOrientation, vAxisOrientation, this.theme_0, marginsLayout, domainByMargin));\n }\n var frameProviderByTile_0 = destination_1;\n var destination_2 = ArrayList_init_0(collectionSizeOrDefault(frameProviderByTile_0, 10));\n var tmp$_9;\n tmp$_9 = frameProviderByTile_0.iterator();\n while (tmp$_9.hasNext()) {\n var item_2 = tmp$_9.next();\n destination_2.add_11rb$(item_2.createTileLayoutProvider());\n }\n var layoutProviderByTile_0 = destination_2;\n var plotLayout_0 = PlotAssemblerUtil_getInstance().createPlotLayout_4j7bvh$(layoutProviderByTile_0, this.facets, this.theme_0.facets(), this.theme_0.horizontalAxis_6taknv$(flipAxis), this.theme_0.verticalAxis_6taknv$(flipAxis));\n tmp$_2 = this.createPlot_0(frameProviderByTile_0, plotLayout_0, legendsBoxInfos, styleSheet, plotContext);\n }\n return tmp$_2;\n };\n PlotAssembler.prototype.createPlot_0 = function (frameProviderByTile, plotLayout, legendBoxInfos, styleSheet, plotContext) {\n return new PlotSvgComponent(this.title, this.subtitle, this.caption, this.coreLayersByTile, this.marginalLayersByTile_0, plotLayout, frameProviderByTile, this.coordProvider_0, legendBoxInfos, this.interactionsEnabled_0, this.theme_0, styleSheet, plotContext);\n };\n PlotAssembler.prototype.disableLegends = function () {\n this.legendsEnabled_0 = false;\n };\n PlotAssembler.prototype.disableInteractions = function () {\n this.interactionsEnabled_0 = false;\n };\n function PlotAssembler$Companion() {\n PlotAssembler$Companion_instance = this;\n }\n PlotAssembler$Companion.prototype.demoAndTest_bl9f0c$ = function (plotLayers, scaleMap, scaleMappersNP, coordProvider, theme, xAxisOrientation, yAxisOrientation) {\n if (xAxisOrientation === void 0)\n xAxisOrientation = Orientation$BOTTOM_getInstance();\n if (yAxisOrientation === void 0)\n yAxisOrientation = Orientation$LEFT_getInstance();\n var layersByTile = ArrayList_init();\n layersByTile.add_11rb$(plotLayers);\n return this.multiTile_s59xp3$(layersByTile, scaleMap, scaleMappersNP, coordProvider, xAxisOrientation, yAxisOrientation, theme);\n };\n PlotAssembler$Companion.prototype.multiTile_s59xp3$ = function (layersByTile, scaleMap, scaleMappersNP, coordProvider, xAxisOrientation, yAxisOrientation, theme) {\n return new PlotAssembler(layersByTile, scaleMap, scaleMappersNP, coordProvider, xAxisOrientation, yAxisOrientation, theme);\n };\n PlotAssembler$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var PlotAssembler$Companion_instance = null;\n function PlotAssembler$Companion_getInstance() {\n if (PlotAssembler$Companion_instance === null) {\n new PlotAssembler$Companion();\n }\n return PlotAssembler$Companion_instance;\n }\n PlotAssembler.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PlotAssembler',\n interfaces: []\n };\n function PlotAssemblerPlotContext(layersByTile, scaleMap) {\n PlotAssemblerPlotContext$Companion_getInstance();\n this.scaleMap_0 = scaleMap;\n this.stitchedPlotLayers_0 = PlotAssemblerPlotContext$Companion_getInstance().createStitchedLayers_7yawgb$(layersByTile);\n this.transformedDomainByAes_0 = HashMap_init();\n this.tooltipFormatters_0 = HashMap_init();\n var $receiver = this.stitchedPlotLayers_0;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n destination.add_11rb$(new PlotAssemblerPlotContext$ContextPlotLayer(item));\n }\n this.layers_nhmcyd$_0 = destination;\n }\n Object.defineProperty(PlotAssemblerPlotContext.prototype, 'layers', {\n configurable: true,\n get: function () {\n return this.layers_nhmcyd$_0;\n }\n });\n PlotAssemblerPlotContext.prototype.getScale_896ixz$ = function (aes) {\n PlotAssemblerPlotContext$Companion_getInstance().checkPositionalAes_896ixz$(aes);\n return this.scaleMap_0.get_31786j$(aes);\n };\n PlotAssemblerPlotContext.prototype.overallTransformedDomain_896ixz$ = function (aes) {\n PlotAssemblerPlotContext$Companion_getInstance().checkPositionalAes_896ixz$(aes);\n var $receiver = this.transformedDomainByAes_0;\n var tmp$;\n var value = $receiver.get_11rb$(aes);\n if (value == null) {\n var answer = PlotAssemblerPlotContext$Companion_getInstance().computeOverallTransformedDomain_dcdl1o$(aes, this.stitchedPlotLayers_0, this.scaleMap_0);\n $receiver.put_xwzc9p$(aes, answer);\n tmp$ = answer;\n } else {\n tmp$ = value;\n }\n return tmp$;\n };\n PlotAssemblerPlotContext.prototype.getTooltipFormatter_scwrln$ = function (aes, defaultValue) {\n PlotAssemblerPlotContext$Companion_getInstance().checkPositionalAes_896ixz$(aes);\n var $receiver = this.tooltipFormatters_0;\n var tmp$;\n var value = $receiver.get_11rb$(aes);\n if (value == null) {\n var answer = defaultValue();\n $receiver.put_xwzc9p$(aes, answer);\n tmp$ = answer;\n } else {\n tmp$ = value;\n }\n return tmp$;\n };\n function PlotAssemblerPlotContext$Companion() {\n PlotAssemblerPlotContext$Companion_instance = this;\n }\n PlotAssemblerPlotContext$Companion.prototype.createStitchedLayers_7yawgb$ = function (layersByPanel) {\n var tmp$;\n if (layersByPanel.isEmpty())\n return emptyList();\n var layerCount = layersByPanel.get_za3lpa$(0).size;\n var stitchedLayers = ArrayList_init();\n for (var i = 0; i < layerCount; i++) {\n var layersOnPlane = ArrayList_init();\n tmp$ = layersByPanel.iterator();\n while (tmp$.hasNext()) {\n var panelLayers = tmp$.next();\n layersOnPlane.add_11rb$(panelLayers.get_za3lpa$(i));\n }\n stitchedLayers.add_11rb$(new StitchedPlotLayer(layersOnPlane));\n }\n return stitchedLayers;\n };\n function PlotAssemblerPlotContext$Companion$computeOverallTransformedDomain$isMatching(v, aes, isYOrientation) {\n var tmp$;\n var varAes = data.TransformVar.toAes_8xm3sj$(v);\n if (Aes.Companion.isPositionalXY_896ixz$(varAes))\n tmp$ = equals(Aes.Companion.toAxisAes_pnj1mo$(varAes, isYOrientation), aes);\n else\n tmp$ = equals(varAes, aes);\n return tmp$;\n }\n PlotAssemblerPlotContext$Companion.prototype.computeOverallTransformedDomain_dcdl1o$ = function (aes, stitchedLayers, scaleMap) {\n var tmp$, tmp$_0, tmp$_1, tmp$_2;\n this.checkPositionalAes_896ixz$(aes);\n var isMatching = PlotAssemblerPlotContext$Companion$computeOverallTransformedDomain$isMatching;\n var domainsRaw = ArrayList_init();\n tmp$ = stitchedLayers.iterator();\n while (tmp$.hasNext()) {\n var layer = tmp$.next();\n var $receiver = layer.getVariables_8be2vx$();\n var destination = ArrayList_init();\n var tmp$_3;\n tmp$_3 = $receiver.iterator();\n while (tmp$_3.hasNext()) {\n var element = tmp$_3.next();\n if (element.isTransform)\n destination.add_11rb$(element);\n }\n var destination_0 = ArrayList_init();\n var tmp$_4;\n tmp$_4 = destination.iterator();\n while (tmp$_4.hasNext()) {\n var element_0 = tmp$_4.next();\n if (isMatching(element_0, aes, layer.isYOrientation))\n destination_0.add_11rb$(element_0);\n }\n var variables = destination_0;\n tmp$_0 = variables.iterator();\n while (tmp$_0.hasNext()) {\n var transformVar = tmp$_0.next();\n var domain = layer.getDataRange_8xm3sj$(transformVar);\n if (domain != null) {\n domainsRaw.add_11rb$(domain);\n }\n }\n }\n var reduceOrNull$result;\n reduceOrNull$break: do {\n var iterator = domainsRaw.iterator();\n if (!iterator.hasNext()) {\n reduceOrNull$result = null;\n break reduceOrNull$break;\n }\n var accumulator = iterator.next();\n while (iterator.hasNext()) {\n accumulator = accumulator.union_3lmjpf$(iterator.next());\n }\n reduceOrNull$result = accumulator;\n }\n while (false);\n var overallTransformedDomain = reduceOrNull$result;\n var scale = scaleMap.get_31786j$(aes);\n if (scale.isContinuousDomain) {\n tmp$_2 = this.finalizeOverallTransformedDomain_0(overallTransformedDomain, Kotlin.isType(tmp$_1 = scale.transform, ContinuousTransform) ? tmp$_1 : throwCCE());\n } else {\n tmp$_2 = overallTransformedDomain != null ? overallTransformedDomain : DoubleSpan.Companion.singleton_14dthe$(0.0);\n }\n return tmp$_2;\n };\n PlotAssemblerPlotContext$Companion.prototype.finalizeOverallTransformedDomain_0 = function (transformedDomain, transform) {\n var tmp$, tmp$_0;\n if (transformedDomain == null)\n tmp$ = new Pair(kotlin_js_internal_DoubleCompanionObject.NaN, kotlin_js_internal_DoubleCompanionObject.NaN);\n else\n tmp$ = new Pair(transformedDomain.lowerEnd, transformedDomain.upperEnd);\n var tmp$_1 = tmp$;\n var dataLower = tmp$_1.component1()\n , dataUpper = tmp$_1.component2();\n var tmp$_2 = scale.ScaleUtil.transformedDefinedLimits_gxz7zd$(transform);\n var scaleLower = tmp$_2.component1()\n , scaleUpper = tmp$_2.component2();\n var lowerEnd = isFinite(scaleLower) ? scaleLower : dataLower;\n var upperEnd = isFinite(scaleUpper) ? scaleUpper : dataUpper;\n if (isFinite(lowerEnd) && isFinite(upperEnd))\n tmp$_0 = new DoubleSpan(lowerEnd, upperEnd);\n else if (isFinite(lowerEnd))\n tmp$_0 = new DoubleSpan(lowerEnd, lowerEnd);\n else if (isFinite(upperEnd))\n tmp$_0 = new DoubleSpan(upperEnd, upperEnd);\n else\n tmp$_0 = null;\n var newRange = tmp$_0;\n return data_0.SeriesUtil.ensureApplicableRange_w2blas$(newRange);\n };\n PlotAssemblerPlotContext$Companion.prototype.checkPositionalAes_896ixz$ = function (aes) {\n if (!(!Aes.Companion.isPositionalXY_896ixz$(aes) || equals(aes, Aes.Companion.X) || equals(aes, Aes.Companion.Y))) {\n var message = 'Positional aesthetic should be either X or Y but was ' + aes;\n throw IllegalStateException_init(message.toString());\n }\n };\n PlotAssemblerPlotContext$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var PlotAssemblerPlotContext$Companion_instance = null;\n function PlotAssemblerPlotContext$Companion_getInstance() {\n if (PlotAssemblerPlotContext$Companion_instance === null) {\n new PlotAssemblerPlotContext$Companion();\n }\n return PlotAssemblerPlotContext$Companion_instance;\n }\n function PlotAssemblerPlotContext$ContextPlotLayer(stitchedPlotLayer) {\n this.stitchedPlotLayer_0 = stitchedPlotLayer;\n }\n Object.defineProperty(PlotAssemblerPlotContext$ContextPlotLayer.prototype, 'isLegendDisabled', {\n configurable: true,\n get: function () {\n return this.stitchedPlotLayer_0.isLegendDisabled;\n }\n });\n Object.defineProperty(PlotAssemblerPlotContext$ContextPlotLayer.prototype, 'aestheticsDefaults', {\n configurable: true,\n get: function () {\n return this.stitchedPlotLayer_0.aestheticsDefaults;\n }\n });\n Object.defineProperty(PlotAssemblerPlotContext$ContextPlotLayer.prototype, 'legendKeyElementFactory', {\n configurable: true,\n get: function () {\n return this.stitchedPlotLayer_0.legendKeyElementFactory;\n }\n });\n PlotAssemblerPlotContext$ContextPlotLayer.prototype.renderedAes = function () {\n return this.stitchedPlotLayer_0.renderedAes();\n };\n PlotAssemblerPlotContext$ContextPlotLayer.prototype.hasBinding_896ixz$ = function (aes) {\n return this.stitchedPlotLayer_0.hasBinding_896ixz$(aes);\n };\n PlotAssemblerPlotContext$ContextPlotLayer.prototype.hasConstant_896ixz$ = function (aes) {\n return this.stitchedPlotLayer_0.hasConstant_896ixz$(aes);\n };\n PlotAssemblerPlotContext$ContextPlotLayer.prototype.getConstant_31786j$ = function (aes) {\n return this.stitchedPlotLayer_0.getConstant_31786j$(aes);\n };\n PlotAssemblerPlotContext$ContextPlotLayer.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ContextPlotLayer',\n interfaces: [PlotContext$Layer]\n };\n PlotAssemblerPlotContext.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PlotAssemblerPlotContext',\n interfaces: [PlotContext]\n };\n function PlotAssemblerUtil() {\n PlotAssemblerUtil_instance = this;\n }\n PlotAssemblerUtil.prototype.updateAesRangeMap_0 = function (aes, range, rangeByAes) {\n var range_0 = range;\n if (range_0 != null) {\n var wasRange = rangeByAes.get_11rb$(aes);\n if (wasRange != null) {\n range_0 = wasRange.union_3lmjpf$(range_0);\n }\n var value = range_0;\n rangeByAes.put_xwzc9p$(aes, value);\n }\n };\n PlotAssemblerUtil.prototype.createLegends_enmjz4$ = function (ctx, scaleMappersNP, guideOptionsMap, theme) {\n var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3, tmp$_4, tmp$_5, tmp$_6, tmp$_7, tmp$_8, tmp$_9, tmp$_10, tmp$_11, tmp$_12, tmp$_13, tmp$_14;\n var legendAssemblerByTitle = LinkedHashMap_init();\n var colorBarAssemblerByTitle = LinkedHashMap_init();\n tmp$ = ctx.layers.iterator();\n while (tmp$.hasNext()) {\n var contextLayer = tmp$.next();\n var layerConstantByAes = HashMap_init();\n tmp$_0 = contextLayer.renderedAes().iterator();\n while (tmp$_0.hasNext()) {\n var aes = tmp$_0.next();\n if (contextLayer.hasConstant_896ixz$(aes)) {\n var value = ensureNotNull(contextLayer.getConstant_31786j$(aes));\n layerConstantByAes.put_xwzc9p$(aes, value);\n }\n }\n var aesListByScaleName = LinkedHashMap_init();\n var aesList = PlotGuidesAssemblerUtil_getInstance().mappedRenderedAesToCreateGuides_afs8c5$(contextLayer, guideOptionsMap);\n tmp$_1 = aesList.iterator();\n while (tmp$_1.hasNext()) {\n var aes_0 = tmp$_1.next();\n var colorBar = false;\n var scale = ctx.getScale_896ixz$(aes_0);\n var scaleName = scale.name;\n if (guideOptionsMap.containsKey_11rb$(aes_0)) {\n var guideOptions = guideOptionsMap.get_11rb$(aes_0);\n if (Kotlin.isType(guideOptions, ColorBarOptions)) {\n PlotGuidesAssemblerUtil_getInstance().checkFitsColorBar_k9b7d3$(aes_0, scale);\n colorBar = true;\n tmp$_2 = ctx.overallTransformedDomain_896ixz$(aes_0);\n tmp$_4 = Kotlin.isType(tmp$_3 = scale, Scale) ? tmp$_3 : throwCCE();\n tmp$_6 = Kotlin.isType(tmp$_5 = getValue(scaleMappersNP, aes_0), ScaleMapper) ? tmp$_5 : throwCCE();\n var value_0 = PlotGuidesAssemblerUtil_getInstance().createColorBarAssembler_q2gm1k$(scaleName, tmp$_2, tmp$_4, tmp$_6, guideOptions, theme);\n colorBarAssemblerByTitle.put_xwzc9p$(scaleName, value_0);\n }\n } else if (PlotGuidesAssemblerUtil_getInstance().fitsColorBar_k9b7d3$(aes_0, scale)) {\n colorBar = true;\n tmp$_7 = ctx.overallTransformedDomain_896ixz$(aes_0);\n tmp$_9 = Kotlin.isType(tmp$_8 = scale, Scale) ? tmp$_8 : throwCCE();\n tmp$_11 = Kotlin.isType(tmp$_10 = getValue(scaleMappersNP, aes_0), ScaleMapper) ? tmp$_10 : throwCCE();\n var value_1 = PlotGuidesAssemblerUtil_getInstance().createColorBarAssembler_q2gm1k$(scaleName, tmp$_7, tmp$_9, tmp$_11, null, theme);\n colorBarAssemblerByTitle.put_xwzc9p$(scaleName, value_1);\n }\n if (!colorBar) {\n var tmp$_15;\n var value_2 = aesListByScaleName.get_11rb$(scaleName);\n if (value_2 == null) {\n var answer = ArrayList_init();\n aesListByScaleName.put_xwzc9p$(scaleName, answer);\n tmp$_15 = answer;\n } else {\n tmp$_15 = value_2;\n }\n tmp$_15.add_11rb$(aes_0);\n }\n }\n tmp$_12 = aesListByScaleName.keys.iterator();\n while (tmp$_12.hasNext()) {\n var scaleName_0 = tmp$_12.next();\n var tmp$_16;\n var value_3 = legendAssemblerByTitle.get_11rb$(scaleName_0);\n if (value_3 == null) {\n var answer_0 = new LegendAssembler(scaleName_0, guideOptionsMap, scaleMappersNP, theme);\n legendAssemblerByTitle.put_xwzc9p$(scaleName_0, answer_0);\n tmp$_16 = answer_0;\n } else {\n tmp$_16 = value_3;\n }\n var legendAssembler = tmp$_16;\n var aesListForScaleName = getValue(aesListByScaleName, scaleName_0);\n var legendKeyFactory = contextLayer.legendKeyElementFactory;\n var aestheticsDefaults = contextLayer.aestheticsDefaults;\n legendAssembler.addLayer_ut0rz1$(legendKeyFactory, aesListForScaleName, layerConstantByAes, aestheticsDefaults, ctx);\n }\n }\n var legendBoxInfos = ArrayList_init();\n tmp$_13 = colorBarAssemblerByTitle.keys.iterator();\n while (tmp$_13.hasNext()) {\n var legendTitle = tmp$_13.next();\n var boxInfo = ensureNotNull(colorBarAssemblerByTitle.get_11rb$(legendTitle)).createColorBar();\n if (!boxInfo.isEmpty) {\n legendBoxInfos.add_11rb$(boxInfo);\n }\n }\n tmp$_14 = legendAssemblerByTitle.keys.iterator();\n while (tmp$_14.hasNext()) {\n var legendTitle_0 = tmp$_14.next();\n var boxInfo_0 = ensureNotNull(legendAssemblerByTitle.get_11rb$(legendTitle_0)).createLegend();\n if (!boxInfo_0.isEmpty) {\n legendBoxInfos.add_11rb$(boxInfo_0);\n }\n }\n return legendBoxInfos;\n };\n PlotAssemblerUtil.prototype.createPlotLayout_4j7bvh$ = function (layoutProviderByTile, facets, facetsTheme, hAxisTheme, vAxisTheme) {\n if (!facets.isDefined) {\n var topDownLayout = layoutProviderByTile.get_za3lpa$(0).createTopDownTileLayout();\n return new SingleTilePlotLayout(topDownLayout, hAxisTheme, vAxisTheme);\n }\n return new FacetedPlotLayout(facets, layoutProviderByTile, facetsTheme.showStrip(), hAxisTheme, vAxisTheme);\n };\n PlotAssemblerUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'PlotAssemblerUtil',\n interfaces: []\n };\n var PlotAssemblerUtil_instance = null;\n function PlotAssemblerUtil_getInstance() {\n if (PlotAssemblerUtil_instance === null) {\n new PlotAssemblerUtil();\n }\n return PlotAssemblerUtil_instance;\n }\n function PlotFacets() {\n PlotFacets$Companion_getInstance();\n }\n PlotFacets.prototype.adjustHDomains_7qj307$ = function (domains) {\n return domains;\n };\n PlotFacets.prototype.adjustVDomains_7qj307$ = function (domains) {\n return domains;\n };\n function PlotFacets$Companion() {\n PlotFacets$Companion_instance = this;\n this.DEF_ORDER_DIR = 0;\n this.DEF_FORMATTER = PlotFacets$Companion$DEF_FORMATTER$lambda;\n }\n PlotFacets$Companion.prototype.undefined = function () {\n return new FacetGrid(null, null, emptyList(), emptyList(), 1, 1);\n };\n PlotFacets$Companion.prototype.dataByLevelTuple_w4sfrb$ = function (data, varNames, varLevels) {\n var tmp$, tmp$_0;\n var nameLevelTuples = this.createNameLevelTuples_5cxrh4$(varNames, varLevels);\n var indicesByVarByLevel = this.dataIndicesByVarByLevel_0(data, varNames, varLevels);\n var dataByLevelKey = ArrayList_init();\n tmp$ = nameLevelTuples.iterator();\n while (tmp$.hasNext()) {\n var nameLevelTuple = tmp$.next();\n var topName = first(nameLevelTuple).first;\n var topLevel = first(nameLevelTuple).second;\n var indices = ArrayList_init_1(getValue(getValue(indicesByVarByLevel, topName), topLevel));\n tmp$_0 = nameLevelTuple.size;\n for (var i = 1; i < tmp$_0; i++) {\n var name = nameLevelTuple.get_za3lpa$(i).first;\n var level = nameLevelTuple.get_za3lpa$(i).second;\n var levelIndices = getValue(getValue(indicesByVarByLevel, name), level);\n indices.retainAll_brywnq$(HashSet_init(levelIndices));\n }\n var destination = ArrayList_init_0(collectionSizeOrDefault(nameLevelTuple, 10));\n var tmp$_1;\n tmp$_1 = nameLevelTuple.iterator();\n while (tmp$_1.hasNext()) {\n var item = tmp$_1.next();\n destination.add_11rb$(item.second);\n }\n var levelKey = destination;\n var levelData = data.slice_ampky3$(indices);\n dataByLevelKey.add_11rb$(to(levelKey, levelData));\n }\n return dataByLevelKey;\n };\n PlotFacets$Companion.prototype.dataIndicesByVarByLevel_0 = function (data_1, varNames, varLevels) {\n var indicesByVarByLevel = HashMap_init();\n var i = 0;\n for (var tmp$ = varNames.iterator(); tmp$.hasNext(); ++i) {\n var varName = tmp$.next();\n var tmp$_0, tmp$_1;\n var levels = varLevels.get_za3lpa$(i);\n var indicesByLevel = HashMap_init();\n tmp$_0 = levels.iterator();\n while (tmp$_0.hasNext()) {\n var level = tmp$_0.next();\n if (data_1.isEmpty)\n tmp$_1 = emptyList();\n else if (data.DataFrameUtil.hasVariable_vede35$(data_1, varName)) {\n var variable = data.DataFrameUtil.findVariableOrFail_vede35$(data_1, varName);\n tmp$_1 = data_0.SeriesUtil.matchingIndices_3vukww$(data_1.get_8xm3sj$(variable), level);\n } else {\n tmp$_1 = toList(until(0, data_1.rowCount()));\n }\n var indices = tmp$_1;\n indicesByLevel.put_xwzc9p$(level, indices);\n }\n indicesByVarByLevel.put_xwzc9p$(varName, indicesByLevel);\n }\n return indicesByVarByLevel;\n };\n PlotFacets$Companion.prototype.createNameLevelTuples_5cxrh4$ = function (varNames, varLevels) {\n if (!!varNames.isEmpty()) {\n var message = 'Empty list of facet variables.';\n throw IllegalArgumentException_init(message.toString());\n }\n if (!(varNames.size === distinct(varNames).size)) {\n var message_0 = 'Facet variables must be distinct, were: ' + varNames + '.';\n throw IllegalArgumentException_init(message_0.toString());\n }\n if (!(varNames.size === varLevels.size)) {\n var message_1 = 'Check failed.';\n throw IllegalStateException_init(message_1.toString());\n }\n return this.createNameLevelTuplesIntern_0(varNames, varLevels);\n };\n PlotFacets$Companion.prototype.createNameLevelTuplesIntern_0 = function (varNames, varLevels) {\n var tmp$, tmp$_0;\n var name = first(varNames);\n var levels = first(varLevels);\n var levelKeys = ArrayList_init();\n tmp$ = levels.iterator();\n while (tmp$.hasNext()) {\n var level = tmp$.next();\n if (varNames.size > 1) {\n var subKeys = this.createNameLevelTuples_5cxrh4$(varNames.subList_vux9f0$(1, varNames.size), varLevels.subList_vux9f0$(1, varLevels.size));\n tmp$_0 = subKeys.iterator();\n while (tmp$_0.hasNext()) {\n var subKey = tmp$_0.next();\n levelKeys.add_11rb$(plus(listOf(to(name, level)), subKey));\n }\n } else {\n levelKeys.add_11rb$(listOf(to(name, level)));\n }\n }\n return levelKeys;\n };\n PlotFacets$Companion.prototype.reorderLevels_dyo1lv$ = function (varNames, varLevels, ordering) {\n var orderingByFacet = toMap(zip(varNames, ordering));\n var result = ArrayList_init();\n var i = 0;\n for (var tmp$ = varNames.iterator(); tmp$.hasNext(); ++i) {\n var name = tmp$.next();\n if (i >= varLevels.size)\n break;\n result.add_11rb$(this.reorderVarLevels_pbdvt$(name, varLevels.get_za3lpa$(i), getValue(orderingByFacet, name)));\n }\n return result;\n };\n PlotFacets$Companion.prototype.reorderVarLevels_pbdvt$ = function (name, levels, order) {\n var tmp$, tmp$_0;\n if (name == null)\n return levels;\n Kotlin.isType(tmp$ = levels, List) ? tmp$ : throwCCE();\n if (order <= -1)\n tmp$_0 = sortedDescending(levels);\n else if (order >= 1)\n tmp$_0 = sorted(levels);\n else\n tmp$_0 = levels;\n return tmp$_0;\n };\n function PlotFacets$Companion$DEF_FORMATTER$lambda(it) {\n return it.toString();\n }\n PlotFacets$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var PlotFacets$Companion_instance = null;\n function PlotFacets$Companion_getInstance() {\n if (PlotFacets$Companion_instance === null) {\n new PlotFacets$Companion();\n }\n return PlotFacets$Companion_instance;\n }\n function PlotFacets$FacetTileInfo(col, row, colLabs, rowLab, hasHAxis, hasVAxis, isBottom, trueIndex) {\n this.col = col;\n this.row = row;\n this.colLabs = colLabs;\n this.rowLab = rowLab;\n this.hasHAxis = hasHAxis;\n this.hasVAxis = hasVAxis;\n this.isBottom = isBottom;\n this.trueIndex = trueIndex;\n }\n PlotFacets$FacetTileInfo.prototype.toString = function () {\n return 'FacetTileInfo(col=' + this.col + ', row=' + this.row + ', colLabs=' + this.colLabs + ', rowLab=' + toString(this.rowLab) + ')';\n };\n PlotFacets$FacetTileInfo.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'FacetTileInfo',\n interfaces: []\n };\n PlotFacets.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PlotFacets',\n interfaces: []\n };\n function PlotGuidesAssemblerUtil() {\n PlotGuidesAssemblerUtil_instance = this;\n }\n PlotGuidesAssemblerUtil.prototype.mappedRenderedAesToCreateGuides_afs8c5$ = function (layer, guideOptionsMap) {\n var tmp$;\n if (layer.isLegendDisabled) {\n return emptyList();\n }\n var result = ArrayList_init();\n tmp$ = layer.renderedAes().iterator();\n while (tmp$.hasNext()) {\n var aes = tmp$.next();\n if (Aes.Companion.noGuideNeeded_896ixz$(aes)) {\n continue;\n }\n if (layer.hasConstant_896ixz$(aes)) {\n continue;\n }\n if (!layer.hasBinding_896ixz$(aes)) {\n continue;\n }\n if (guideOptionsMap.containsKey_11rb$(aes)) {\n if (guideOptionsMap.get_11rb$(aes) === GuideOptions$Companion_getInstance().NONE) {\n continue;\n }\n }\n result.add_11rb$(aes);\n }\n return result;\n };\n PlotGuidesAssemblerUtil.prototype.createColorBarAssembler_q2gm1k$ = function (scaleName, transformedDomain, scale, scaleMapper, options, theme) {\n var result = new ColorBarAssembler(scaleName, transformedDomain, scale, scaleMapper, theme);\n result.setOptions_p8ufd2$(options);\n return result;\n };\n PlotGuidesAssemblerUtil.prototype.fitsColorBar_k9b7d3$ = function (aes, scale) {\n return aes.isColor && scale.isContinuous;\n };\n PlotGuidesAssemblerUtil.prototype.checkFitsColorBar_k9b7d3$ = function (aes, scale) {\n if (!aes.isColor) {\n var message = 'Color-bar is not applicable to ' + aes + ' aesthetic';\n throw IllegalStateException_init(message.toString());\n }\n if (!scale.isContinuous) {\n var message_0 = 'Color-bar is only applicable when both domain and color palette are continuous';\n throw IllegalStateException_init(message_0.toString());\n }\n };\n PlotGuidesAssemblerUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'PlotGuidesAssemblerUtil',\n interfaces: []\n };\n var PlotGuidesAssemblerUtil_instance = null;\n function PlotGuidesAssemblerUtil_getInstance() {\n if (PlotGuidesAssemblerUtil_instance === null) {\n new PlotGuidesAssemblerUtil();\n }\n return PlotGuidesAssemblerUtil_instance;\n }\n function PosProvider() {\n PosProvider$Companion_getInstance();\n }\n function PosProvider$Companion() {\n PosProvider$Companion_instance = this;\n }\n function PosProvider$Companion$wrap$ObjectLiteral(closure$pos) {\n this.closure$pos = closure$pos;\n PosProvider.call(this);\n }\n PosProvider$Companion$wrap$ObjectLiteral.prototype.createPos_q7kk9g$ = function (ctx) {\n return this.closure$pos;\n };\n PosProvider$Companion$wrap$ObjectLiteral.prototype.handlesGroups = function () {\n return this.closure$pos.handlesGroups();\n };\n PosProvider$Companion$wrap$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [PosProvider]\n };\n PosProvider$Companion.prototype.wrap_dkjclg$ = function (pos) {\n return new PosProvider$Companion$wrap$ObjectLiteral(pos);\n };\n function PosProvider$Companion$barStack$ObjectLiteral(closure$vjust) {\n this.closure$vjust = closure$vjust;\n PosProvider.call(this);\n }\n PosProvider$Companion$barStack$ObjectLiteral.prototype.createPos_q7kk9g$ = function (ctx) {\n return pos.PositionAdjustments.stack_nvozds$(ctx.aesthetics, this.closure$vjust);\n };\n PosProvider$Companion$barStack$ObjectLiteral.prototype.handlesGroups = function () {\n return PositionAdjustments$Meta.STACK.handlesGroups();\n };\n PosProvider$Companion$barStack$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [PosProvider]\n };\n PosProvider$Companion.prototype.barStack_yrwdxb$ = function (vjust) {\n if (vjust === void 0)\n vjust = null;\n return new PosProvider$Companion$barStack$ObjectLiteral(vjust);\n };\n function PosProvider$Companion$dodge$ObjectLiteral(closure$width) {\n this.closure$width = closure$width;\n PosProvider.call(this);\n }\n PosProvider$Companion$dodge$ObjectLiteral.prototype.createPos_q7kk9g$ = function (ctx) {\n var aesthetics = ctx.aesthetics;\n var groupCount = ctx.groupCount;\n return pos.PositionAdjustments.dodge_vvhcz8$(aesthetics, groupCount, this.closure$width);\n };\n PosProvider$Companion$dodge$ObjectLiteral.prototype.handlesGroups = function () {\n return PositionAdjustments$Meta.DODGE.handlesGroups();\n };\n PosProvider$Companion$dodge$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [PosProvider]\n };\n PosProvider$Companion.prototype.dodge_yrwdxb$ = function (width) {\n if (width === void 0)\n width = null;\n return new PosProvider$Companion$dodge$ObjectLiteral(width);\n };\n function PosProvider$Companion$fill$ObjectLiteral(closure$vjust) {\n this.closure$vjust = closure$vjust;\n PosProvider.call(this);\n }\n PosProvider$Companion$fill$ObjectLiteral.prototype.createPos_q7kk9g$ = function (ctx) {\n return pos.PositionAdjustments.fill_nvozds$(ctx.aesthetics, this.closure$vjust);\n };\n PosProvider$Companion$fill$ObjectLiteral.prototype.handlesGroups = function () {\n return PositionAdjustments$Meta.FILL.handlesGroups();\n };\n PosProvider$Companion$fill$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [PosProvider]\n };\n PosProvider$Companion.prototype.fill_yrwdxb$ = function (vjust) {\n if (vjust === void 0)\n vjust = null;\n return new PosProvider$Companion$fill$ObjectLiteral(vjust);\n };\n function PosProvider$Companion$jitter$ObjectLiteral(closure$width, closure$height) {\n this.closure$width = closure$width;\n this.closure$height = closure$height;\n PosProvider.call(this);\n }\n PosProvider$Companion$jitter$ObjectLiteral.prototype.createPos_q7kk9g$ = function (ctx) {\n return pos.PositionAdjustments.jitter_jma9l8$(this.closure$width, this.closure$height);\n };\n PosProvider$Companion$jitter$ObjectLiteral.prototype.handlesGroups = function () {\n return PositionAdjustments$Meta.JITTER.handlesGroups();\n };\n PosProvider$Companion$jitter$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [PosProvider]\n };\n PosProvider$Companion.prototype.jitter_jma9l8$ = function (width, height) {\n return new PosProvider$Companion$jitter$ObjectLiteral(width, height);\n };\n function PosProvider$Companion$nudge$ObjectLiteral(closure$width, closure$height) {\n this.closure$width = closure$width;\n this.closure$height = closure$height;\n PosProvider.call(this);\n }\n PosProvider$Companion$nudge$ObjectLiteral.prototype.createPos_q7kk9g$ = function (ctx) {\n return pos.PositionAdjustments.nudge_jma9l8$(this.closure$width, this.closure$height);\n };\n PosProvider$Companion$nudge$ObjectLiteral.prototype.handlesGroups = function () {\n return PositionAdjustments$Meta.NUDGE.handlesGroups();\n };\n PosProvider$Companion$nudge$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [PosProvider]\n };\n PosProvider$Companion.prototype.nudge_jma9l8$ = function (width, height) {\n return new PosProvider$Companion$nudge$ObjectLiteral(width, height);\n };\n function PosProvider$Companion$jitterDodge$ObjectLiteral(closure$width, closure$jitterWidth, closure$jitterHeight) {\n this.closure$width = closure$width;\n this.closure$jitterWidth = closure$jitterWidth;\n this.closure$jitterHeight = closure$jitterHeight;\n PosProvider.call(this);\n }\n PosProvider$Companion$jitterDodge$ObjectLiteral.prototype.createPos_q7kk9g$ = function (ctx) {\n var aesthetics = ctx.aesthetics;\n var groupCount = ctx.groupCount;\n return pos.PositionAdjustments.jitterDodge_e2pc44$(aesthetics, groupCount, this.closure$width, this.closure$jitterWidth, this.closure$jitterHeight);\n };\n PosProvider$Companion$jitterDodge$ObjectLiteral.prototype.handlesGroups = function () {\n return PositionAdjustments$Meta.JITTER_DODGE.handlesGroups();\n };\n PosProvider$Companion$jitterDodge$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [PosProvider]\n };\n PosProvider$Companion.prototype.jitterDodge_xjrefz$ = function (width, jitterWidth, jitterHeight) {\n return new PosProvider$Companion$jitterDodge$ObjectLiteral(width, jitterWidth, jitterHeight);\n };\n PosProvider$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var PosProvider$Companion_instance = null;\n function PosProvider$Companion_getInstance() {\n if (PosProvider$Companion_instance === null) {\n new PosProvider$Companion();\n }\n return PosProvider$Companion_instance;\n }\n PosProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PosProvider',\n interfaces: []\n };\n function PositionalScalesUtil() {\n PositionalScalesUtil_instance = this;\n }\n PositionalScalesUtil.prototype.computePlotXYTransformedDomains_6ppuq6$ = function (layersByTile, xScaleProto, yScaleProto, facets) {\n var tmp$;\n var xInitialDomain = PositionalScalesUtil$RangeUtil_getInstance().initialRange_abdep2$(xScaleProto.transform);\n var yInitialDomain = PositionalScalesUtil$RangeUtil_getInstance().initialRange_abdep2$(yScaleProto.transform);\n var xDomains = ArrayList_init();\n var yDomains = ArrayList_init();\n tmp$ = layersByTile.iterator();\n while (tmp$.hasNext()) {\n var tileLayers = tmp$.next();\n var tmp$_0 = this.computeTileXYDomains_0(tileLayers, xInitialDomain, yInitialDomain);\n var xDomain = tmp$_0.component1()\n , yDomain = tmp$_0.component2();\n xDomains.add_11rb$(xDomain);\n yDomains.add_11rb$(yDomain);\n }\n var adjustedXDomains = facets.adjustHDomains_7qj307$(xDomains);\n var adjustedYDomains = facets.adjustVDomains_7qj307$(yDomains);\n var finalizedXDomains = this.finalizeDomains_0(Aes.Companion.X, xScaleProto, adjustedXDomains, layersByTile, facets.freeHScale);\n var finalizedYDomains = this.finalizeDomains_0(Aes.Companion.Y, yScaleProto, adjustedYDomains, layersByTile, facets.freeVScale);\n return zip(finalizedXDomains, finalizedYDomains);\n };\n PositionalScalesUtil.prototype.finalizeDomains_0 = function (aes, scaleProto, domains, layersByTile, freeScale) {\n var tmp$;\n if (freeScale) {\n var destination = ArrayList_init_0(collectionSizeOrDefault(domains, 10));\n var tmp$_0, tmp$_0_0;\n var index = 0;\n tmp$_0 = domains.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n var tmp$_1 = destination.add_11rb$;\n var i = checkIndexOverflow((tmp$_0_0 = index, index = tmp$_0_0 + 1 | 0, tmp$_0_0));\n var domainExpanded = PositionalScalesUtil$RangeUtil_getInstance().expandRange_902xfk$(item, aes, scaleProto, layersByTile.get_za3lpa$(i));\n tmp$_1.call(destination, data_0.SeriesUtil.ensureApplicableRange_w2blas$(domainExpanded));\n }\n tmp$ = destination;\n } else {\n var $receiver = filterNotNull(domains);\n var reduceOrNull$result;\n reduceOrNull$break: do {\n var iterator = $receiver.iterator();\n if (!iterator.hasNext()) {\n reduceOrNull$result = null;\n break reduceOrNull$break;\n }\n var accumulator = iterator.next();\n while (iterator.hasNext()) {\n var r0 = accumulator;\n var r1 = iterator.next();\n accumulator = ensureNotNull(PositionalScalesUtil$RangeUtil_getInstance().updateRange_y0d4pd$(r0, r1));\n }\n reduceOrNull$result = accumulator;\n }\n while (false);\n var domainOverall = reduceOrNull$result;\n var $receiver_0 = layersByTile.get_za3lpa$(0);\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault($receiver_0, 10));\n var tmp$_2;\n tmp$_2 = $receiver_0.iterator();\n while (tmp$_2.hasNext()) {\n var item_0 = tmp$_2.next();\n destination_0.add_11rb$(item_0.preferableNullDomain_896ixz$(aes));\n }\n var reduceOrNull$result_0;\n reduceOrNull$break: do {\n var iterator_0 = destination_0.iterator();\n if (!iterator_0.hasNext()) {\n reduceOrNull$result_0 = null;\n break reduceOrNull$break;\n }\n var accumulator_0 = iterator_0.next();\n while (iterator_0.hasNext()) {\n var r0_0 = accumulator_0;\n var r1_0 = iterator_0.next();\n accumulator_0 = ensureNotNull(PositionalScalesUtil$RangeUtil_getInstance().updateRange_y0d4pd$(r0_0, r1_0));\n }\n reduceOrNull$result_0 = accumulator_0;\n }\n while (false);\n var preferableNullDomainOverall = reduceOrNull$result_0;\n var domainExpanded_0 = PositionalScalesUtil$RangeUtil_getInstance().expandRange_902xfk$(domainOverall, aes, scaleProto, layersByTile.get_za3lpa$(0));\n var domain = data_0.SeriesUtil.ensureApplicableRange_w2blas$(domainExpanded_0, preferableNullDomainOverall);\n var destination_1 = ArrayList_init_0(collectionSizeOrDefault(layersByTile, 10));\n var tmp$_3;\n tmp$_3 = layersByTile.iterator();\n while (tmp$_3.hasNext()) {\n var item_1 = tmp$_3.next();\n destination_1.add_11rb$(domain);\n }\n tmp$ = destination_1;\n }\n return tmp$;\n };\n PositionalScalesUtil.prototype.computeTileXYDomains_0 = function (layers, xInitialDomain, yInitialDomain) {\n var tmp$;\n var result = LinkedHashMap_init_0(coerceAtLeast(mapCapacity(collectionSizeOrDefault(layers, 10)), 16));\n var tmp$_0;\n tmp$_0 = layers.iterator();\n while (tmp$_0.hasNext()) {\n var element = tmp$_0.next();\n result.put_xwzc9p$(element, this.positionalDryRunAesthetics_0(element));\n }\n var positionaDryRunAestheticsByLayer = result;\n var xDomainOverall = null;\n var yDomainOverall = null;\n tmp$ = positionaDryRunAestheticsByLayer.entries.iterator();\n while (tmp$.hasNext()) {\n var tmp$_1 = tmp$.next();\n var layer = tmp$_1.key;\n var aesthetics = tmp$_1.value;\n var xyRanges = this.computeLayerDryRunXYRanges_0(layer, aesthetics);\n var xRangeLayer = PositionalScalesUtil$RangeUtil_getInstance().updateRange_y0d4pd$(xInitialDomain, xyRanges.first);\n var yRangeLayer = PositionalScalesUtil$RangeUtil_getInstance().updateRange_y0d4pd$(yInitialDomain, xyRanges.second);\n xDomainOverall = PositionalScalesUtil$RangeUtil_getInstance().updateRange_y0d4pd$(xRangeLayer, xDomainOverall);\n yDomainOverall = PositionalScalesUtil$RangeUtil_getInstance().updateRange_y0d4pd$(yRangeLayer, yDomainOverall);\n }\n return new Pair(xDomainOverall, yDomainOverall);\n };\n PositionalScalesUtil.prototype.positionalDryRunAesthetics_0 = function (layer) {\n var $receiver = layer.renderedAes();\n var destination = ArrayList_init();\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n if (Aes.Companion.affectingScaleX_896ixz$(element) || Aes.Companion.affectingScaleY_896ixz$(element) || equals(element, Aes.Companion.HEIGHT) || equals(element, Aes.Companion.WIDTH))\n destination.add_11rb$(element);\n }\n var aesList = destination;\n var result = LinkedHashMap_init_0(coerceAtLeast(mapCapacity(collectionSizeOrDefault(aesList, 10)), 16));\n var tmp$_0;\n tmp$_0 = aesList.iterator();\n while (tmp$_0.hasNext()) {\n var element_0 = tmp$_0.next();\n result.put_xwzc9p$(element_0, scale.Mappers.IDENTITY);\n }\n var mappers = result;\n return PlotUtil_getInstance().createLayerAesthetics_6wb5xp$(layer, aesList, mappers);\n };\n PositionalScalesUtil.prototype.computeLayerDryRunXYRanges_0 = function (layer, aesthetics) {\n var tmp$, tmp$_0;\n tmp$ = layer.isYOrientation;\n if (tmp$ === true)\n tmp$_0 = new YOrientationAesthetics(aesthetics);\n else if (tmp$ === false)\n tmp$_0 = aesthetics;\n else\n tmp$_0 = Kotlin.noWhenBranchMatched();\n var aesthetics_0 = tmp$_0;\n var block$result;\n var tmp$_1;\n var geomCtx = GeomContextBuilder_init().aesthetics_m7huy5$(aesthetics_0).build();\n var rangesXY = this.computeLayerDryRunXYRangesAfterPosAdjustment_0(layer, aesthetics_0, geomCtx);\n tmp$_1 = layer.isYOrientation;\n if (tmp$_1 === true) {\n block$result = new Pair(rangesXY.second, rangesXY.first);\n } else if (tmp$_1 === false) {\n block$result = rangesXY;\n } else {\n block$result = Kotlin.noWhenBranchMatched();\n }\n var rangesAfterPosAdjustment = block$result;\n var geomCtx_0 = GeomContextBuilder_init().aesthetics_m7huy5$(aesthetics).build();\n var tmp$_2 = this.computeLayerDryRunXYRangesAfterSizeExpand_0(layer, aesthetics, geomCtx_0);\n var xRangeAfterSizeExpand = tmp$_2.component1()\n , yRangeAfterSizeExpand = tmp$_2.component2();\n var rangeX = rangesAfterPosAdjustment.first;\n if (rangeX == null) {\n rangeX = xRangeAfterSizeExpand;\n } else if (xRangeAfterSizeExpand != null) {\n rangeX = rangeX.union_3lmjpf$(xRangeAfterSizeExpand);\n }\n var rangeY = rangesAfterPosAdjustment.second;\n if (rangeY == null) {\n rangeY = yRangeAfterSizeExpand;\n } else if (yRangeAfterSizeExpand != null) {\n rangeY = rangeY.union_3lmjpf$(yRangeAfterSizeExpand);\n }\n return new Pair(rangeX, rangeY);\n };\n PositionalScalesUtil.prototype.computeLayerDryRunXYRangesAfterPosAdjustment_0 = function (layer, aes, geomCtx) {\n var tmp$, tmp$_0, tmp$_1;\n var posAesX = Aes.Companion.affectingScaleX_shhb9a$(layer.renderedAes());\n var posAesY = Aes.Companion.affectingScaleY_shhb9a$(layer.renderedAes());\n var pos = PlotUtil_getInstance().createPositionAdjustment_h0u0lr$(layer.posProvider, aes);\n if (pos.isIdentity) {\n var rangeX = PositionalScalesUtil$RangeUtil_getInstance().combineRanges_73x37m$(posAesX, aes);\n var rangeY = PositionalScalesUtil$RangeUtil_getInstance().combineRanges_73x37m$(posAesY, aes);\n return new Pair(rangeX, rangeY);\n }\n var adjustedMinX = 0.0;\n var adjustedMaxX = 0.0;\n var adjustedMinY = 0.0;\n var adjustedMaxY = 0.0;\n var rangesInited = false;\n var cardinality = Kotlin.imul(posAesX.size, posAesY.size);\n var px = Kotlin.newArray(cardinality, null);\n var py = Kotlin.newArray(cardinality, null);\n tmp$ = aes.dataPoints().iterator();\n while (tmp$.hasNext()) {\n var p = tmp$.next();\n var i = -1;\n tmp$_0 = posAesX.iterator();\n while (tmp$_0.hasNext()) {\n var aesX = tmp$_0.next();\n var valX = p.numeric_vktour$(aesX);\n tmp$_1 = posAesY.iterator();\n while (tmp$_1.hasNext()) {\n var aesY = tmp$_1.next();\n var valY = p.numeric_vktour$(aesY);\n i = i + 1 | 0;\n px[i] = valX;\n py[i] = valY;\n }\n }\n while (i >= 0) {\n if (px[i] != null && py[i] != null) {\n var x = px[i];\n var y = py[i];\n if (data_0.SeriesUtil.isFinite_yrwdxb$(x) && data_0.SeriesUtil.isFinite_yrwdxb$(y)) {\n var newLoc = pos.translate_tshsjz$(new DoubleVector(ensureNotNull(x), ensureNotNull(y)), p, geomCtx);\n var adjustedX = newLoc.x;\n var adjustedY = newLoc.y;\n if (rangesInited) {\n var b = adjustedMinX;\n adjustedMinX = JsMath.min(adjustedX, b);\n var b_0 = adjustedMaxX;\n adjustedMaxX = JsMath.max(adjustedX, b_0);\n var b_1 = adjustedMinY;\n adjustedMinY = JsMath.min(adjustedY, b_1);\n var b_2 = adjustedMaxY;\n adjustedMaxY = JsMath.max(adjustedY, b_2);\n } else {\n adjustedMaxX = adjustedX;\n adjustedMinX = adjustedMaxX;\n adjustedMaxY = adjustedY;\n adjustedMinY = adjustedMaxY;\n rangesInited = true;\n }\n }\n }\n i = i - 1 | 0;\n }\n }\n var xRange = rangesInited ? new DoubleSpan(adjustedMinX, adjustedMaxX) : null;\n var yRange = rangesInited ? new DoubleSpan(adjustedMinY, adjustedMaxY) : null;\n return new Pair(xRange, yRange);\n };\n function PositionalScalesUtil$computeLayerDryRunXYRangesAfterSizeExpand$lambda(closure$geom, closure$widthAxis, closure$resolution, closure$isDiscrete) {\n return function (p) {\n return closure$geom.widthSpan_rxtiyv$(p, closure$widthAxis, closure$resolution, closure$isDiscrete);\n };\n }\n function PositionalScalesUtil$computeLayerDryRunXYRangesAfterSizeExpand$lambda_0(closure$widthAxis, closure$resolution) {\n return function (p) {\n return geom.PointDimensionsUtil.dimensionSpan_qdql09$(p, closure$widthAxis, Aes.Companion.WIDTH, closure$resolution);\n };\n }\n function PositionalScalesUtil$computeLayerDryRunXYRangesAfterSizeExpand$lambda_1(closure$geom, closure$heightAxis, closure$resolution, closure$isDiscrete) {\n return function (p) {\n return closure$geom.heightSpan_rxtiyv$(p, closure$heightAxis, closure$resolution, closure$isDiscrete);\n };\n }\n function PositionalScalesUtil$computeLayerDryRunXYRangesAfterSizeExpand$lambda_2(closure$heightAxis, closure$resolution) {\n return function (p) {\n return geom.PointDimensionsUtil.dimensionSpan_qdql09$(p, closure$heightAxis, Aes.Companion.HEIGHT, closure$resolution);\n };\n }\n PositionalScalesUtil.prototype.computeLayerDryRunXYRangesAfterSizeExpand_0 = function (layer, aesthetics, geomCtx) {\n var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3;\n tmp$ = layer.isYOrientation;\n if (tmp$ === true)\n tmp$_0 = to(Aes.Companion.Y, Aes.Companion.X);\n else if (tmp$ === false)\n tmp$_0 = to(Aes.Companion.X, Aes.Companion.Y);\n else\n tmp$_0 = Kotlin.noWhenBranchMatched();\n var tmp$_4 = tmp$_0;\n var widthAxis = tmp$_4.component1()\n , heightAxis = tmp$_4.component2();\n var geom = layer.geom;\n var renderedAes = layer.renderedAes();\n if (Kotlin.isType(geom, WithWidth)) {\n var resolution = geomCtx.getResolution_vktour$(widthAxis);\n var isDiscrete = !layer.scaleMap.get_31786j$(widthAxis).isContinuousDomain;\n tmp$_1 = this.computeLayerDryRunRangeAfterSizeExpand_0(aesthetics, PositionalScalesUtil$computeLayerDryRunXYRangesAfterSizeExpand$lambda(geom, widthAxis, resolution, isDiscrete));\n } else if (renderedAes.contains_11rb$(Aes.Companion.WIDTH)) {\n var resolution_0 = geomCtx.getResolution_vktour$(widthAxis);\n tmp$_1 = this.computeLayerDryRunRangeAfterSizeExpand_0(aesthetics, PositionalScalesUtil$computeLayerDryRunXYRangesAfterSizeExpand$lambda_0(widthAxis, resolution_0));\n } else\n tmp$_1 = null;\n tmp$_2 = to(widthAxis, tmp$_1);\n if (Kotlin.isType(geom, WithHeight)) {\n var resolution_1 = geomCtx.getResolution_vktour$(heightAxis);\n var isDiscrete_0 = !layer.scaleMap.get_31786j$(heightAxis).isContinuousDomain;\n tmp$_3 = this.computeLayerDryRunRangeAfterSizeExpand_0(aesthetics, PositionalScalesUtil$computeLayerDryRunXYRangesAfterSizeExpand$lambda_1(geom, heightAxis, resolution_1, isDiscrete_0));\n } else if (renderedAes.contains_11rb$(Aes.Companion.HEIGHT)) {\n var resolution_2 = geomCtx.getResolution_vktour$(heightAxis);\n tmp$_3 = this.computeLayerDryRunRangeAfterSizeExpand_0(aesthetics, PositionalScalesUtil$computeLayerDryRunXYRangesAfterSizeExpand$lambda_2(heightAxis, resolution_2));\n } else\n tmp$_3 = null;\n var xy = mapOf([tmp$_2, to(heightAxis, tmp$_3)]);\n return new Pair(getValue(xy, Aes.Companion.X), getValue(xy, Aes.Companion.Y));\n };\n PositionalScalesUtil.prototype.computeLayerDryRunRangeAfterSizeExpand_0 = function (aesthetics, pointSpan) {\n var tmp$;\n var minMax = null;\n tmp$ = aesthetics.dataPoints().iterator();\n while (tmp$.hasNext()) {\n var p = tmp$.next();\n var span = pointSpan(p);\n minMax = data_0.SeriesUtil.span_w2blas$(minMax, span);\n }\n return minMax;\n };\n function PositionalScalesUtil$RangeUtil() {\n PositionalScalesUtil$RangeUtil_instance = this;\n }\n PositionalScalesUtil$RangeUtil.prototype.initialRange_abdep2$ = function (transform) {\n var tmp$;\n if (Kotlin.isType(transform, ContinuousTransform)) {\n var $receiver = toList_0(scale.ScaleUtil.transformedDefinedLimits_gxz7zd$(transform));\n var destination = ArrayList_init();\n var tmp$_0;\n tmp$_0 = $receiver.iterator();\n while (tmp$_0.hasNext()) {\n var element = tmp$_0.next();\n if (isFinite(element))\n destination.add_11rb$(element);\n }\n var lims = destination;\n tmp$ = lims.isEmpty() ? null : DoubleSpan.Companion.encloseAll_l63ks6$(lims);\n } else if (Kotlin.isType(transform, DiscreteTransform))\n tmp$ = DoubleSpan.Companion.encloseAll_l63ks6$(transform.effectiveDomainTransformed);\n else\n throw IllegalStateException_init('Unexpected transform type: ' + toString(Kotlin.getKClassFromExpression(transform).simpleName));\n return tmp$;\n };\n PositionalScalesUtil$RangeUtil.prototype.expandRange_902xfk$ = function (range, aes, scale, layers) {\n var tmp$;\n var any$result;\n any$break: do {\n var tmp$_0;\n if (Kotlin.isType(layers, Collection) && layers.isEmpty()) {\n any$result = false;\n break any$break;\n }\n tmp$_0 = layers.iterator();\n while (tmp$_0.hasNext()) {\n var element = tmp$_0.next();\n if (element.rangeIncludesZero_896ixz$(aes)) {\n any$result = true;\n break any$break;\n }\n }\n any$result = false;\n }\n while (false);\n var includeZero = any$result;\n if (includeZero === true)\n tmp$ = this.updateRange_y0d4pd$(DoubleSpan.Companion.singleton_14dthe$(0.0), range);\n else if (includeZero === false)\n tmp$ = range;\n else\n tmp$ = Kotlin.noWhenBranchMatched();\n var range_0 = tmp$;\n return PlotUtil_getInstance().rangeWithExpand_wxtkag$(range_0, scale, includeZero);\n };\n PositionalScalesUtil$RangeUtil.prototype.updateRange_0 = function (values, wasRange) {\n var tmp$;\n var newRange = DoubleSpan.Companion.encloseAll_l63ks6$(values);\n if (wasRange == null)\n tmp$ = newRange;\n else\n tmp$ = wasRange.union_3lmjpf$(newRange);\n return tmp$;\n };\n PositionalScalesUtil$RangeUtil.prototype.updateRange_y0d4pd$ = function (range, wasRange) {\n var range_0 = range;\n if (range_0 != null) {\n if (wasRange != null) {\n range_0 = wasRange.union_3lmjpf$(range_0);\n }\n return range_0;\n }\n return wasRange;\n };\n PositionalScalesUtil$RangeUtil.prototype.combineRanges_73x37m$ = function (aesList, aesthetics) {\n var tmp$, tmp$_0;\n var result = null;\n tmp$ = aesList.iterator();\n while (tmp$.hasNext()) {\n var aes = tmp$.next();\n var range = aesthetics.range_vktour$(aes);\n if (range != null) {\n result = (tmp$_0 = result != null ? result.union_3lmjpf$(range) : null) != null ? tmp$_0 : range;\n }\n }\n return result;\n };\n PositionalScalesUtil$RangeUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'RangeUtil',\n interfaces: []\n };\n var PositionalScalesUtil$RangeUtil_instance = null;\n function PositionalScalesUtil$RangeUtil_getInstance() {\n if (PositionalScalesUtil$RangeUtil_instance === null) {\n new PositionalScalesUtil$RangeUtil();\n }\n return PositionalScalesUtil$RangeUtil_instance;\n }\n PositionalScalesUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'PositionalScalesUtil',\n interfaces: []\n };\n var PositionalScalesUtil_instance = null;\n function PositionalScalesUtil_getInstance() {\n if (PositionalScalesUtil_instance === null) {\n new PositionalScalesUtil();\n }\n return PositionalScalesUtil_instance;\n }\n function StitchedPlotLayer(geomLayers) {\n this.geomLayers_0 = geomLayers;\n }\n Object.defineProperty(StitchedPlotLayer.prototype, 'isYOrientation', {\n configurable: true,\n get: function () {\n if (!!this.geomLayers_0.isEmpty()) {\n var message = 'Check failed.';\n throw IllegalStateException_init(message.toString());\n }\n return this.geomLayers_0.get_za3lpa$(0).isYOrientation;\n }\n });\n Object.defineProperty(StitchedPlotLayer.prototype, 'legendKeyElementFactory', {\n configurable: true,\n get: function () {\n if (!!this.geomLayers_0.isEmpty()) {\n var message = 'Check failed.';\n throw IllegalStateException_init(message.toString());\n }\n return this.geomLayers_0.get_za3lpa$(0).legendKeyElementFactory;\n }\n });\n Object.defineProperty(StitchedPlotLayer.prototype, 'aestheticsDefaults', {\n configurable: true,\n get: function () {\n if (!!this.geomLayers_0.isEmpty()) {\n var message = 'Check failed.';\n throw IllegalStateException_init(message.toString());\n }\n return this.geomLayers_0.get_za3lpa$(0).aestheticsDefaults;\n }\n });\n Object.defineProperty(StitchedPlotLayer.prototype, 'isLegendDisabled', {\n configurable: true,\n get: function () {\n if (!!this.geomLayers_0.isEmpty()) {\n var message = 'Check failed.';\n throw IllegalStateException_init(message.toString());\n }\n return this.geomLayers_0.get_za3lpa$(0).isLegendDisabled;\n }\n });\n StitchedPlotLayer.prototype.renderedAes = function () {\n var tmp$;\n if (this.geomLayers_0.isEmpty()) {\n tmp$ = emptyList();\n } else\n tmp$ = this.geomLayers_0.get_za3lpa$(0).renderedAes();\n return tmp$;\n };\n StitchedPlotLayer.prototype.hasBinding_896ixz$ = function (aes) {\n return !this.geomLayers_0.isEmpty() && this.geomLayers_0.get_za3lpa$(0).hasBinding_896ixz$(aes);\n };\n StitchedPlotLayer.prototype.hasConstant_896ixz$ = function (aes) {\n return !this.geomLayers_0.isEmpty() && this.geomLayers_0.get_za3lpa$(0).hasConstant_896ixz$(aes);\n };\n StitchedPlotLayer.prototype.getConstant_31786j$ = function (aes) {\n if (!!this.geomLayers_0.isEmpty()) {\n var message = 'Check failed.';\n throw IllegalStateException_init(message.toString());\n }\n return this.geomLayers_0.get_za3lpa$(0).getConstant_31786j$(aes);\n };\n StitchedPlotLayer.prototype.getDataRange_8xm3sj$ = function (variable) {\n var tmp$;\n if (!this.isNumericData_0(variable)) {\n var message = 'Not numeric data [' + variable + ']';\n throw IllegalStateException_init(message.toString());\n }\n var result = null;\n tmp$ = this.geomLayers_0.iterator();\n while (tmp$.hasNext()) {\n var layer = tmp$.next();\n var range = layer.dataFrame.range_8xm3sj$(variable);\n result = data_0.SeriesUtil.span_w2blas$(result, range);\n }\n return result;\n };\n StitchedPlotLayer.prototype.isNumericData_0 = function (variable) {\n var tmp$;\n if (!!this.geomLayers_0.isEmpty()) {\n var message = 'Check failed.';\n throw IllegalStateException_init(message.toString());\n }\n tmp$ = this.geomLayers_0.iterator();\n while (tmp$.hasNext()) {\n var layer = tmp$.next();\n if (!layer.dataFrame.isNumeric_8xm3sj$(variable)) {\n return false;\n }\n }\n return true;\n };\n StitchedPlotLayer.prototype.getVariables_8be2vx$ = function () {\n if (!!this.geomLayers_0.isEmpty()) {\n var message = 'Check failed.';\n throw IllegalStateException_init(message.toString());\n }\n return this.geomLayers_0.get_za3lpa$(0).dataFrame.variables();\n };\n StitchedPlotLayer.prototype.hasVariable_tkpq40$ = function (v) {\n if (!!this.geomLayers_0.isEmpty()) {\n var message = 'Check failed.';\n throw IllegalStateException_init(message.toString());\n }\n return this.geomLayers_0.get_za3lpa$(0).dataFrame.has_8xm3sj$(v);\n };\n StitchedPlotLayer.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'StitchedPlotLayer',\n interfaces: []\n };\n function TestingPlotContext() {\n TestingPlotContext_instance = this;\n }\n TestingPlotContext.prototype.create_sqg2xh$ = function (layer) {\n return new PlotAssemblerPlotContext(listOf(listOf(layer)), layer.scaleMap);\n };\n TestingPlotContext.prototype.create_11vaeo$ = function (layers, scaleMap) {\n var layersByTile = listOf(layers);\n return new PlotAssemblerPlotContext(layersByTile, scaleMap);\n };\n TestingPlotContext.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'TestingPlotContext',\n interfaces: []\n };\n var TestingPlotContext_instance = null;\n function TestingPlotContext_getInstance() {\n if (TestingPlotContext_instance === null) {\n new TestingPlotContext();\n }\n return TestingPlotContext_instance;\n }\n function TypedScaleMap(map) {\n TypedScaleMap$Companion_getInstance();\n this.map = map;\n }\n function TypedScaleMap$get$lambda$lambda(closure$message) {\n return function () {\n return closure$message;\n };\n }\n TypedScaleMap.prototype.get_31786j$ = function (aes) {\n var tmp$, tmp$_0;\n var tmp$_1;\n if ((tmp$_0 = Kotlin.isType(tmp$ = this.map.get_11rb$(aes), Scale) ? tmp$ : null) != null)\n tmp$_1 = tmp$_0;\n else {\n var message = 'No scale found for aes: ' + aes;\n TypedScaleMap$Companion_getInstance().LOG_0.error_l35kib$(IllegalStateException_init(message), TypedScaleMap$get$lambda$lambda(message));\n throw IllegalStateException_init(message.toString());\n }\n return tmp$_1;\n };\n TypedScaleMap.prototype.containsKey_896ixz$ = function (aes) {\n return this.map.containsKey_11rb$(aes);\n };\n TypedScaleMap.prototype.keySet = function () {\n return this.map.keys;\n };\n function TypedScaleMap$Companion() {\n TypedScaleMap$Companion_instance = this;\n this.LOG_0 = logging.PortableLogging.logger_xo1ogr$(getKClass(TypedScaleMap));\n }\n TypedScaleMap$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var TypedScaleMap$Companion_instance = null;\n function TypedScaleMap$Companion_getInstance() {\n if (TypedScaleMap$Companion_instance === null) {\n new TypedScaleMap$Companion();\n }\n return TypedScaleMap$Companion_instance;\n }\n TypedScaleMap.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TypedScaleMap',\n interfaces: []\n };\n function FacetGrid(xVar, yVar, xLevels, yLevels, xOrder, yOrder, xFormatter, yFormatter, scales) {\n if (xFormatter === void 0)\n xFormatter = PlotFacets$Companion_getInstance().DEF_FORMATTER;\n if (yFormatter === void 0)\n yFormatter = PlotFacets$Companion_getInstance().DEF_FORMATTER;\n if (scales === void 0)\n scales = FacetScales$FIXED_getInstance();\n PlotFacets.call(this);\n this.xVar_0 = xVar;\n this.yVar_0 = yVar;\n this.xFormatter_0 = xFormatter;\n this.yFormatter_0 = yFormatter;\n this.isDefined_f95yff$_0 = this.xVar_0 != null || this.yVar_0 != null;\n var b = xLevels.size;\n this.colCount_bhcvpt$_0 = JsMath.max(1, b);\n var b_0 = yLevels.size;\n this.rowCount_8ohw8b$_0 = JsMath.max(1, b_0);\n this.numTiles_kasr4x$_0 = Kotlin.imul(this.colCount, this.rowCount);\n this.freeHScale_syofma$_0 = ((scales === FacetScales$FREE_getInstance() || scales === FacetScales$FREE_X_getInstance()) && this.xVar_0 != null);\n this.freeVScale_lcw8tc$_0 = ((scales === FacetScales$FREE_getInstance() || scales === FacetScales$FREE_Y_getInstance()) && this.yVar_0 != null);\n this.xLevels_0 = PlotFacets$Companion_getInstance().reorderVarLevels_pbdvt$(this.xVar_0, xLevels, xOrder);\n this.yLevels_0 = PlotFacets$Companion_getInstance().reorderVarLevels_pbdvt$(this.yVar_0, yLevels, yOrder);\n }\n Object.defineProperty(FacetGrid.prototype, 'isDefined', {\n configurable: true,\n get: function () {\n return this.isDefined_f95yff$_0;\n }\n });\n Object.defineProperty(FacetGrid.prototype, 'colCount', {\n configurable: true,\n get: function () {\n return this.colCount_bhcvpt$_0;\n }\n });\n Object.defineProperty(FacetGrid.prototype, 'rowCount', {\n configurable: true,\n get: function () {\n return this.rowCount_8ohw8b$_0;\n }\n });\n Object.defineProperty(FacetGrid.prototype, 'numTiles', {\n configurable: true,\n get: function () {\n return this.numTiles_kasr4x$_0;\n }\n });\n Object.defineProperty(FacetGrid.prototype, 'variables', {\n configurable: true,\n get: function () {\n return listOfNotNull([this.xVar_0, this.yVar_0]);\n }\n });\n Object.defineProperty(FacetGrid.prototype, 'freeHScale', {\n configurable: true,\n get: function () {\n return this.freeHScale_syofma$_0;\n }\n });\n Object.defineProperty(FacetGrid.prototype, 'freeVScale', {\n configurable: true,\n get: function () {\n return this.freeVScale_lcw8tc$_0;\n }\n });\n Object.defineProperty(FacetGrid.prototype, 'colLevels_0', {\n configurable: true,\n get: function () {\n var $receiver = this.xLevels_0;\n return $receiver.isEmpty() ? listOf(null) : $receiver;\n }\n });\n Object.defineProperty(FacetGrid.prototype, 'rowLevels_0', {\n configurable: true,\n get: function () {\n var $receiver = this.yLevels_0;\n return $receiver.isEmpty() ? listOf(null) : $receiver;\n }\n });\n FacetGrid.prototype.dataByTile_dhhkv7$ = function (data) {\n var tmp$;\n var tmp$_0, tmp$_1, tmp$_2;\n if (!this.isDefined) {\n var message = 'dataByTile() called on Undefined plot facets.';\n throw IllegalArgumentException_init(message.toString());\n }\n tmp$ = listOfNotNull([this.xVar_0, this.yVar_0]);\n tmp$_0 = listOfNotNull([this.xVar_0 != null ? this.xLevels_0 : null, this.yVar_0 != null ? this.yLevels_0 : null]);\n var dataByLevelTupleList = PlotFacets$Companion_getInstance().dataByLevelTuple_w4sfrb$(data, tmp$, tmp$_0);\n var dataByLevelTuple = toMap(dataByLevelTupleList);\n var dataByTile = ArrayList_init();\n tmp$_1 = this.rowLevels_0.iterator();\n while (tmp$_1.hasNext()) {\n var rowLevel = tmp$_1.next();\n tmp$_2 = this.colLevels_0.iterator();\n while (tmp$_2.hasNext()) {\n var colLevel = tmp$_2.next();\n var levelTuple = listOfNotNull([colLevel, rowLevel]);\n var tileData = getValue(dataByLevelTuple, levelTuple);\n dataByTile.add_11rb$(tileData);\n }\n }\n return dataByTile;\n };\n FacetGrid.prototype.tileInfos = function () {\n var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3;\n var $receiver = this.colLevels_0;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$_4;\n tmp$_4 = $receiver.iterator();\n while (tmp$_4.hasNext()) {\n var item = tmp$_4.next();\n destination.add_11rb$(item != null ? this.xFormatter_0(item) : null);\n }\n var colLabels = destination;\n var $receiver_0 = this.rowLevels_0;\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault($receiver_0, 10));\n var tmp$_5;\n tmp$_5 = $receiver_0.iterator();\n while (tmp$_5.hasNext()) {\n var item_0 = tmp$_5.next();\n destination_0.add_11rb$(item_0 != null ? this.yFormatter_0(item_0) : null);\n }\n var rowLabels = destination_0;\n var infos = ArrayList_init();\n tmp$ = this.rowCount;\n for (var row = 0; row < tmp$; row++) {\n var addColLab = row === 0;\n var hasHAxis = row === (this.rowCount - 1 | 0);\n tmp$_0 = this.colCount;\n for (var col = 0; col < tmp$_0; col++) {\n var addRowLab = col === (this.colCount - 1 | 0);\n var hasVAxis = col === 0;\n if (addColLab) {\n tmp$_3 = (tmp$_2 = (tmp$_1 = colLabels.get_za3lpa$(col)) != null ? listOf(tmp$_1) : null) != null ? tmp$_2 : emptyList();\n } else {\n tmp$_3 = emptyList();\n }\n var colLabs = tmp$_3;\n infos.add_11rb$(new PlotFacets$FacetTileInfo(col, row, colLabs, addRowLab ? rowLabels.get_za3lpa$(row) : null, hasHAxis, hasVAxis, row === (this.rowCount - 1 | 0), infos.size));\n }\n }\n return infos;\n };\n function FacetGrid$adjustHDomains$colIndices(this$FacetGrid) {\n return function (col) {\n var $receiver = get_indices(this$FacetGrid.rowLevels_0);\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n destination.add_11rb$(Kotlin.imul(item, this$FacetGrid.colLevels_0.size) + col | 0);\n }\n return toList(destination);\n };\n }\n FacetGrid.prototype.adjustHDomains_7qj307$ = function (domains) {\n var tmp$, tmp$_0;\n var colIndices = FacetGrid$adjustHDomains$colIndices(this);\n if (this.freeHScale) {\n var size = domains.size;\n var list = ArrayList_init_0(size);\n for (var index = 0; index < size; index++) {\n list.add_11rb$(null);\n }\n var adjusted = list;\n tmp$ = this.colLevels_0;\n for (var col = 0; col !== tmp$.size; ++col) {\n var indices = colIndices(col);\n var destination = ArrayList_init_0(collectionSizeOrDefault(indices, 10));\n var tmp$_1;\n tmp$_1 = indices.iterator();\n while (tmp$_1.hasNext()) {\n var item = tmp$_1.next();\n destination.add_11rb$(domains.get_za3lpa$(item));\n }\n var iterator = destination.iterator();\n if (!iterator.hasNext())\n throw UnsupportedOperationException_init(\"Empty collection can't be reduced.\");\n var accumulator = iterator.next();\n while (iterator.hasNext()) {\n var d0 = accumulator;\n var d1 = iterator.next();\n accumulator = data_0.SeriesUtil.span_w2blas$(d0, d1);\n }\n var union = accumulator;\n var tmp$_2;\n tmp$_2 = indices.iterator();\n while (tmp$_2.hasNext()) {\n var element = tmp$_2.next();\n adjusted.set_wxm5ur$(element, union);\n }\n }\n tmp$_0 = adjusted;\n } else {\n tmp$_0 = domains;\n }\n return tmp$_0;\n };\n function FacetGrid$adjustVDomains$rowIndices(this$FacetGrid) {\n return function (row) {\n var start = Kotlin.imul(row, this$FacetGrid.colLevels_0.size);\n return toList(until(start, start + this$FacetGrid.colLevels_0.size | 0));\n };\n }\n FacetGrid.prototype.adjustVDomains_7qj307$ = function (domains) {\n var tmp$, tmp$_0;\n var rowIndices = FacetGrid$adjustVDomains$rowIndices(this);\n if (this.freeVScale) {\n var size = domains.size;\n var list = ArrayList_init_0(size);\n for (var index = 0; index < size; index++) {\n list.add_11rb$(null);\n }\n var adjusted = list;\n tmp$ = this.rowLevels_0;\n for (var row = 0; row !== tmp$.size; ++row) {\n var indices = rowIndices(row);\n var destination = ArrayList_init_0(collectionSizeOrDefault(indices, 10));\n var tmp$_1;\n tmp$_1 = indices.iterator();\n while (tmp$_1.hasNext()) {\n var item = tmp$_1.next();\n destination.add_11rb$(domains.get_za3lpa$(item));\n }\n var iterator = destination.iterator();\n if (!iterator.hasNext())\n throw UnsupportedOperationException_init(\"Empty collection can't be reduced.\");\n var accumulator = iterator.next();\n while (iterator.hasNext()) {\n var d0 = accumulator;\n var d1 = iterator.next();\n accumulator = data_0.SeriesUtil.span_w2blas$(d0, d1);\n }\n var union = accumulator;\n var tmp$_2;\n tmp$_2 = indices.iterator();\n while (tmp$_2.hasNext()) {\n var element = tmp$_2.next();\n adjusted.set_wxm5ur$(element, union);\n }\n }\n tmp$_0 = adjusted;\n } else {\n tmp$_0 = domains;\n }\n return tmp$_0;\n };\n FacetGrid.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'FacetGrid',\n interfaces: [PlotFacets]\n };\n function FacetScales(name, ordinal) {\n Enum.call(this);\n this.name$ = name;\n this.ordinal$ = ordinal;\n }\n function FacetScales_initFields() {\n FacetScales_initFields = function () {\n };\n FacetScales$FIXED_instance = new FacetScales('FIXED', 0);\n FacetScales$FREE_instance = new FacetScales('FREE', 1);\n FacetScales$FREE_X_instance = new FacetScales('FREE_X', 2);\n FacetScales$FREE_Y_instance = new FacetScales('FREE_Y', 3);\n }\n var FacetScales$FIXED_instance;\n function FacetScales$FIXED_getInstance() {\n FacetScales_initFields();\n return FacetScales$FIXED_instance;\n }\n var FacetScales$FREE_instance;\n function FacetScales$FREE_getInstance() {\n FacetScales_initFields();\n return FacetScales$FREE_instance;\n }\n var FacetScales$FREE_X_instance;\n function FacetScales$FREE_X_getInstance() {\n FacetScales_initFields();\n return FacetScales$FREE_X_instance;\n }\n var FacetScales$FREE_Y_instance;\n function FacetScales$FREE_Y_getInstance() {\n FacetScales_initFields();\n return FacetScales$FREE_Y_instance;\n }\n FacetScales.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'FacetScales',\n interfaces: [Enum]\n };\n function FacetScales$values() {\n return [FacetScales$FIXED_getInstance(), FacetScales$FREE_getInstance(), FacetScales$FREE_X_getInstance(), FacetScales$FREE_Y_getInstance()];\n }\n FacetScales.values = FacetScales$values;\n function FacetScales$valueOf(name) {\n switch (name) {\n case 'FIXED':\n return FacetScales$FIXED_getInstance();\n case 'FREE':\n return FacetScales$FREE_getInstance();\n case 'FREE_X':\n return FacetScales$FREE_X_getInstance();\n case 'FREE_Y':\n return FacetScales$FREE_Y_getInstance();\n default:\n throwISE('No enum constant jetbrains.datalore.plot.builder.assemble.facet.FacetScales.' + name);\n }\n }\n FacetScales.valueOf_61zpoe$ = FacetScales$valueOf;\n var compareBy$lambda = wrapFunction(function () {\n var compareValues = Kotlin.kotlin.comparisons.compareValues_s00gnj$;\n return function (closure$selector) {\n return function (a, b) {\n var selector = closure$selector;\n return compareValues(selector(a), selector(b));\n };\n };\n });\n var thenBy$lambda = wrapFunction(function () {\n var compareValues = Kotlin.kotlin.comparisons.compareValues_s00gnj$;\n return function (this$thenBy, closure$selector) {\n return function (a, b) {\n var previousCompare = this$thenBy.compare(a, b);\n var tmp$;\n if (previousCompare !== 0)\n tmp$ = previousCompare;\n else {\n var selector = closure$selector;\n tmp$ = compareValues(selector(a), selector(b));\n }\n return tmp$;\n };\n };\n });\n function FacetWrap(facets, levels, nrow, ncol, direction, facetOrdering, facetFormatters, scales) {\n FacetWrap$Companion_getInstance();\n if (scales === void 0)\n scales = FacetScales$FIXED_getInstance();\n PlotFacets.call(this);\n this.facets_0 = facets;\n this.nrow_0 = nrow;\n this.ncol_0 = ncol;\n this.direction_0 = direction;\n this.facetFormatters_0 = facetFormatters;\n this.isDefined_lws8hd$_0 = true;\n this.levels_0 = PlotFacets$Companion_getInstance().reorderLevels_dyo1lv$(this.facets_0, levels, facetOrdering);\n this.numTiles_a1ir1h$_0 = FacetWrap$Companion_getInstance().numTiles_0(this.facets_0, levels);\n this.shape_0 = FacetWrap$Companion_getInstance().shape_0(this.numTiles, this.ncol_0, this.nrow_0, this.direction_0);\n this.colCount_182vmd$_0 = this.shape_0.first;\n this.rowCount_1ks3v5$_0 = this.shape_0.second;\n this.variables_i11eyv$_0 = this.facets_0;\n this.freeHScale_qfsjqi$_0 = scales === FacetScales$FREE_getInstance() || scales === FacetScales$FREE_X_getInstance();\n this.freeVScale_y1kqjg$_0 = scales === FacetScales$FREE_getInstance() || scales === FacetScales$FREE_Y_getInstance();\n }\n Object.defineProperty(FacetWrap.prototype, 'isDefined', {\n configurable: true,\n get: function () {\n return this.isDefined_lws8hd$_0;\n }\n });\n Object.defineProperty(FacetWrap.prototype, 'numTiles', {\n configurable: true,\n get: function () {\n return this.numTiles_a1ir1h$_0;\n }\n });\n Object.defineProperty(FacetWrap.prototype, 'colCount', {\n configurable: true,\n get: function () {\n return this.colCount_182vmd$_0;\n }\n });\n Object.defineProperty(FacetWrap.prototype, 'rowCount', {\n configurable: true,\n get: function () {\n return this.rowCount_1ks3v5$_0;\n }\n });\n Object.defineProperty(FacetWrap.prototype, 'variables', {\n configurable: true,\n get: function () {\n return this.variables_i11eyv$_0;\n }\n });\n Object.defineProperty(FacetWrap.prototype, 'freeHScale', {\n configurable: true,\n get: function () {\n return this.freeHScale_qfsjqi$_0;\n }\n });\n Object.defineProperty(FacetWrap.prototype, 'freeVScale', {\n configurable: true,\n get: function () {\n return this.freeVScale_y1kqjg$_0;\n }\n });\n FacetWrap.prototype.dataByTile_dhhkv7$ = function (data) {\n var tmp$;\n var dataByLevelTuple = PlotFacets$Companion_getInstance().dataByLevelTuple_w4sfrb$(data, this.variables, this.levels_0);\n var dataByTile = ArrayList_init();\n tmp$ = dataByLevelTuple.iterator();\n while (tmp$.hasNext()) {\n var tmp$_0 = tmp$.next();\n var tileData = tmp$_0.component2();\n dataByTile.add_11rb$(tileData);\n }\n return dataByTile;\n };\n function FacetWrap$tileInfos$toCol(this$FacetWrap) {\n return function (index) {\n var tmp$;\n switch (this$FacetWrap.direction_0.name) {\n case 'H':\n tmp$ = index % this$FacetWrap.colCount | 0;\n break;\n case 'V':\n tmp$ = index / this$FacetWrap.rowCount | 0;\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n }\n function FacetWrap$tileInfos$toRow(this$FacetWrap) {\n return function (index) {\n var tmp$;\n switch (this$FacetWrap.direction_0.name) {\n case 'H':\n tmp$ = index / this$FacetWrap.colCount | 0;\n break;\n case 'V':\n tmp$ = index % this$FacetWrap.rowCount | 0;\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n }\n function FacetWrap$tileInfos$toIndex(this$FacetWrap) {\n return function (col, row) {\n var tmp$;\n switch (this$FacetWrap.direction_0.name) {\n case 'H':\n tmp$ = Kotlin.imul(row, this$FacetWrap.colCount) + col | 0;\n break;\n case 'V':\n tmp$ = Kotlin.imul(col, this$FacetWrap.rowCount) + row | 0;\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n }\n function FacetWrap$tileInfos$isBottom(closure$toIndex, this$FacetWrap) {\n return function (col, row) {\n var nextRowIndex = closure$toIndex(col, row + 1 | 0);\n return ((row + 1 | 0) % this$FacetWrap.rowCount | 0) === 0 || nextRowIndex >= this$FacetWrap.numTiles;\n };\n }\n function FacetWrap$tileInfos$lambda(it) {\n return it.row;\n }\n function FacetWrap$tileInfos$lambda_0(it) {\n return it.col;\n }\n FacetWrap.prototype.tileInfos = function () {\n var levelTuples = PlotFacets$Companion_getInstance().createNameLevelTuples_5cxrh4$(this.facets_0, this.levels_0);\n var destination = ArrayList_init_0(collectionSizeOrDefault(levelTuples, 10));\n var tmp$;\n tmp$ = levelTuples.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n var tmp$_0 = destination.add_11rb$;\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(item, 10));\n var tmp$_1;\n tmp$_1 = item.iterator();\n while (tmp$_1.hasNext()) {\n var item_0 = tmp$_1.next();\n destination_0.add_11rb$(item_0.second);\n }\n tmp$_0.call(destination, destination_0);\n }\n var destination_1 = ArrayList_init_0(collectionSizeOrDefault(destination, 10));\n var tmp$_2;\n tmp$_2 = destination.iterator();\n while (tmp$_2.hasNext()) {\n var item_1 = tmp$_2.next();\n var tmp$_3 = destination_1.add_11rb$;\n var destination_2 = ArrayList_init_0(collectionSizeOrDefault(item_1, 10));\n var tmp$_4, tmp$_0_0;\n var index = 0;\n tmp$_4 = item_1.iterator();\n while (tmp$_4.hasNext()) {\n var item_2 = tmp$_4.next();\n destination_2.add_11rb$(this.facetFormatters_0.get_za3lpa$(checkIndexOverflow((tmp$_0_0 = index, index = tmp$_0_0 + 1 | 0, tmp$_0_0)))(item_2));\n }\n tmp$_3.call(destination_1, destination_2);\n }\n var tileLabels = destination_1;\n var toCol = FacetWrap$tileInfos$toCol(this);\n var toRow = FacetWrap$tileInfos$toRow(this);\n var toIndex = FacetWrap$tileInfos$toIndex(this);\n var isBottom = FacetWrap$tileInfos$isBottom(toIndex, this);\n var infos = ArrayList_init();\n var i = 0;\n for (var tmp$_5 = tileLabels.iterator(); tmp$_5.hasNext(); ++i) {\n var tileLabelTuple = tmp$_5.next();\n var col = toCol(i);\n var row = toRow(i);\n var hasHAxis = isBottom(col, row) || this.freeHScale;\n var hasVAxis = col === 0 || this.freeVScale;\n infos.add_11rb$(new PlotFacets$FacetTileInfo(col, row, tileLabelTuple, null, hasHAxis, hasVAxis, isBottom(col, row), i));\n }\n return sortedWith(infos, new Comparator(thenBy$lambda(new Comparator(compareBy$lambda(FacetWrap$tileInfos$lambda)), FacetWrap$tileInfos$lambda_0)));\n };\n function FacetWrap$Direction(name, ordinal) {\n Enum.call(this);\n this.name$ = name;\n this.ordinal$ = ordinal;\n }\n function FacetWrap$Direction_initFields() {\n FacetWrap$Direction_initFields = function () {\n };\n FacetWrap$Direction$H_instance = new FacetWrap$Direction('H', 0);\n FacetWrap$Direction$V_instance = new FacetWrap$Direction('V', 1);\n }\n var FacetWrap$Direction$H_instance;\n function FacetWrap$Direction$H_getInstance() {\n FacetWrap$Direction_initFields();\n return FacetWrap$Direction$H_instance;\n }\n var FacetWrap$Direction$V_instance;\n function FacetWrap$Direction$V_getInstance() {\n FacetWrap$Direction_initFields();\n return FacetWrap$Direction$V_instance;\n }\n FacetWrap$Direction.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'Direction',\n interfaces: [Enum]\n };\n function FacetWrap$Direction$values() {\n return [FacetWrap$Direction$H_getInstance(), FacetWrap$Direction$V_getInstance()];\n }\n FacetWrap$Direction.values = FacetWrap$Direction$values;\n function FacetWrap$Direction$valueOf(name) {\n switch (name) {\n case 'H':\n return FacetWrap$Direction$H_getInstance();\n case 'V':\n return FacetWrap$Direction$V_getInstance();\n default:\n throwISE('No enum constant jetbrains.datalore.plot.builder.assemble.facet.FacetWrap.Direction.' + name);\n }\n }\n FacetWrap$Direction.valueOf_61zpoe$ = FacetWrap$Direction$valueOf;\n function FacetWrap$Companion() {\n FacetWrap$Companion_instance = this;\n }\n FacetWrap$Companion.prototype.numTiles_0 = function (facets, levels) {\n if (!!facets.isEmpty()) {\n var message = 'List of facets is empty.';\n throw IllegalArgumentException_init(message.toString());\n }\n if (!(distinct(facets).size === facets.size)) {\n var message_0 = 'Duplicated values in the facets list: ' + facets;\n throw IllegalArgumentException_init(message_0.toString());\n }\n if (!(facets.size === levels.size)) {\n var message_1 = 'Check failed.';\n throw IllegalStateException_init(message_1.toString());\n }\n return PlotFacets$Companion_getInstance().createNameLevelTuples_5cxrh4$(facets, levels).size;\n };\n function FacetWrap$Companion$shape$lambda(closure$ncol) {\n return function () {\n return \"'ncol' must be positive, was \" + toString(closure$ncol);\n };\n }\n function FacetWrap$Companion$shape$lambda_0(closure$nrow) {\n return function () {\n return \"'nrow' must be positive, was \" + toString(closure$nrow);\n };\n }\n FacetWrap$Companion.prototype.shape_0 = function (tilesCount, ncol, nrow, dir) {\n var tmp$, tmp$_0, tmp$_1, tmp$_2;\n if (!((tmp$ = ncol != null ? ncol > 0 : null) != null ? tmp$ : true)) {\n var message = FacetWrap$Companion$shape$lambda(ncol)();\n throw IllegalArgumentException_init(message.toString());\n }\n if (!((tmp$_0 = nrow != null ? nrow > 0 : null) != null ? tmp$_0 : true)) {\n var message_0 = FacetWrap$Companion$shape$lambda_0(nrow)();\n throw IllegalArgumentException_init(message_0.toString());\n }\n if (ncol != null) {\n var ncolActual = JsMath.min(ncol, tilesCount);\n var x = tilesCount / ncolActual;\n var nrowActual = numberToInt(JsMath.ceil(x));\n tmp$_1 = to(ncolActual, JsMath.max(1, nrowActual));\n } else if (nrow != null) {\n var nrowActual_0 = JsMath.min(nrow, tilesCount);\n var x_0 = tilesCount / nrowActual_0;\n var ncolActual_0 = numberToInt(JsMath.ceil(x_0));\n tmp$_1 = to(ncolActual_0, JsMath.max(1, nrowActual_0));\n } else {\n var b = tilesCount / 2 | 0;\n var b_0 = JsMath.max(1, b);\n var w = JsMath.min(4, b_0);\n var x_1 = tilesCount / w;\n var b_1 = numberToInt(JsMath.ceil(x_1));\n var h = JsMath.max(1, b_1);\n tmp$_1 = to(w, h);\n }\n var shape = tmp$_1;\n var w_0 = shape.component1()\n , h_0 = shape.component2();\n switch (dir.name) {\n case 'H':\n var x_2 = tilesCount / w_0;\n tmp$_2 = new Pair(w_0, numberToInt(JsMath.ceil(x_2)));\n break;\n case 'V':\n var x_3 = tilesCount / h_0;\n tmp$_2 = new Pair(numberToInt(JsMath.ceil(x_3)), h_0);\n break;\n default:\n tmp$_2 = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$_2;\n };\n FacetWrap$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var FacetWrap$Companion_instance = null;\n function FacetWrap$Companion_getInstance() {\n if (FacetWrap$Companion_instance === null) {\n new FacetWrap$Companion();\n }\n return FacetWrap$Companion_instance;\n }\n FacetWrap.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'FacetWrap',\n interfaces: [PlotFacets]\n };\n function DefaultSampling() {\n DefaultSampling_instance = this;\n this.SEED_0 = L37;\n this.SAFETY_SAMPLING = Samplings_getInstance().random_280ow0$(200000, this.SEED_0);\n this.POINT = Samplings_getInstance().random_280ow0$(50000, this.SEED_0);\n this.TILE = Samplings_getInstance().random_280ow0$(50000, this.SEED_0);\n this.BIN_2D = this.TILE;\n this.AB_LINE = Samplings_getInstance().random_280ow0$(5000, this.SEED_0);\n this.H_LINE = Samplings_getInstance().random_280ow0$(5000, this.SEED_0);\n this.V_LINE = Samplings_getInstance().random_280ow0$(5000, this.SEED_0);\n this.JITTER = Samplings_getInstance().random_280ow0$(5000, this.SEED_0);\n this.Q_Q = Samplings_getInstance().random_280ow0$(5000, this.SEED_0);\n this.Q_Q_LINE = Samplings_getInstance().random_280ow0$(5000, this.SEED_0);\n this.RECT = Samplings_getInstance().random_280ow0$(5000, this.SEED_0);\n this.SEGMENT = Samplings_getInstance().random_280ow0$(5000, this.SEED_0);\n this.TEXT = Samplings_getInstance().random_280ow0$(500, this.SEED_0);\n this.ERROR_BAR = Samplings_getInstance().random_280ow0$(500, this.SEED_0);\n this.CROSS_BAR = Samplings_getInstance().random_280ow0$(500, this.SEED_0);\n this.LINE_RANGE = Samplings_getInstance().random_280ow0$(500, this.SEED_0);\n this.POINT_RANGE = Samplings_getInstance().random_280ow0$(500, this.SEED_0);\n this.BAR = Samplings_getInstance().pick_za3lpa$(50);\n this.HISTOGRAM = Samplings_getInstance().systematic_za3lpa$(500);\n this.DOT_PLOT = Samplings_getInstance().systematic_za3lpa$(500);\n this.Y_DOT_PLOT = Samplings_getInstance().systematic_za3lpa$(500);\n this.PIE = Samplings_getInstance().systematic_za3lpa$(500);\n this.LINE = Samplings_getInstance().systematic_za3lpa$(5000);\n this.RIBBON = Samplings_getInstance().systematic_za3lpa$(5000);\n this.AREA = Samplings_getInstance().systematic_za3lpa$(5000);\n this.DENSITY = Samplings_getInstance().systematic_za3lpa$(5000);\n this.AREA_RIDGES = Samplings_getInstance().systematic_za3lpa$(5000);\n this.VIOLIN = Samplings_getInstance().pick_za3lpa$(50);\n this.FREQPOLY = Samplings_getInstance().systematic_za3lpa$(5000);\n this.STEP = Samplings_getInstance().systematic_za3lpa$(5000);\n this.PATH = Samplings_getInstance().vertexDp_za3lpa$(20000);\n this.POLYGON = Samplings_getInstance().vertexDp_za3lpa$(20000);\n this.MAP = Samplings_getInstance().vertexDp_za3lpa$(20000);\n this.SMOOTH = Samplings_getInstance().systematicGroup_za3lpa$(200);\n this.CONTOUR = Samplings_getInstance().systematicGroup_za3lpa$(200);\n this.CONTOURF = Samplings_getInstance().systematicGroup_za3lpa$(200);\n this.DENSITY2D = Samplings_getInstance().systematicGroup_za3lpa$(200);\n this.DENSITY2DF = Samplings_getInstance().systematicGroup_za3lpa$(200);\n }\n DefaultSampling.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'DefaultSampling',\n interfaces: []\n };\n var DefaultSampling_instance = null;\n function DefaultSampling_getInstance() {\n if (DefaultSampling_instance === null) {\n new DefaultSampling();\n }\n return DefaultSampling_instance;\n }\n function GeomProvider(geomKind) {\n GeomProvider$Companion_getInstance();\n this.geomKind = geomKind;\n }\n Object.defineProperty(GeomProvider.prototype, 'preferredCoordinateSystem', {\n configurable: true,\n get: function () {\n throw IllegalStateException_init('No preferred coordinate system');\n }\n });\n GeomProvider.prototype.renders = function () {\n return base_0.GeomMeta.renders_7dhqpi$(this.geomKind);\n };\n function GeomProvider$GeomProviderBuilder(myKind, myAestheticsDefaults, myHandlesGroups, myGeomSupplier) {\n this.myKind_0 = myKind;\n this.myAestheticsDefaults_0 = myAestheticsDefaults;\n this.myHandlesGroups_0 = myHandlesGroups;\n this.myGeomSupplier_0 = myGeomSupplier;\n }\n function GeomProvider$GeomProviderBuilder$build$ObjectLiteral(this$GeomProviderBuilder, geomKind) {\n this.this$GeomProviderBuilder = this$GeomProviderBuilder;\n GeomProvider.call(this, geomKind);\n }\n GeomProvider$GeomProviderBuilder$build$ObjectLiteral.prototype.createGeom = function () {\n return this.this$GeomProviderBuilder.myGeomSupplier_0();\n };\n GeomProvider$GeomProviderBuilder$build$ObjectLiteral.prototype.aestheticsDefaults = function () {\n return this.this$GeomProviderBuilder.myAestheticsDefaults_0;\n };\n GeomProvider$GeomProviderBuilder$build$ObjectLiteral.prototype.handlesGroups = function () {\n return this.this$GeomProviderBuilder.myHandlesGroups_0;\n };\n GeomProvider$GeomProviderBuilder$build$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [GeomProvider]\n };\n GeomProvider$GeomProviderBuilder.prototype.build_8be2vx$ = function () {\n return new GeomProvider$GeomProviderBuilder$build$ObjectLiteral(this, this.myKind_0);\n };\n GeomProvider$GeomProviderBuilder.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GeomProviderBuilder',\n interfaces: []\n };\n function GeomProvider$Companion() {\n GeomProvider$Companion_instance = this;\n }\n function GeomProvider$Companion$point$lambda() {\n return new PointGeom();\n }\n GeomProvider$Companion.prototype.point = function () {\n return this.point_8j1y0m$(GeomProvider$Companion$point$lambda);\n };\n GeomProvider$Companion.prototype.point_8j1y0m$ = function (supplier) {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.POINT, AestheticsDefaults.Companion.point(), PointGeom.Companion.HANDLES_GROUPS, supplier)).build_8be2vx$();\n };\n function GeomProvider$Companion$path$lambda() {\n return new PathGeom();\n }\n GeomProvider$Companion.prototype.path = function () {\n return this.path_8j1y0m$(GeomProvider$Companion$path$lambda);\n };\n GeomProvider$Companion.prototype.path_8j1y0m$ = function (supplier) {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.PATH, AestheticsDefaults.Companion.path(), PathGeom.Companion.HANDLES_GROUPS, supplier)).build_8be2vx$();\n };\n function GeomProvider$Companion$line$lambda() {\n return new LineGeom();\n }\n GeomProvider$Companion.prototype.line = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.LINE, AestheticsDefaults.Companion.line(), LineGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$line$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$smooth$lambda() {\n return new SmoothGeom();\n }\n GeomProvider$Companion.prototype.smooth = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.SMOOTH, AestheticsDefaults.Companion.smooth(), SmoothGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$smooth$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$bar$lambda() {\n return new BarGeom();\n }\n GeomProvider$Companion.prototype.bar = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.BAR, AestheticsDefaults.Companion.bar(), BarGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$bar$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$histogram$lambda() {\n return new HistogramGeom();\n }\n GeomProvider$Companion.prototype.histogram = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.HISTOGRAM, AestheticsDefaults.Companion.histogram(), HistogramGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$histogram$lambda)).build_8be2vx$();\n };\n GeomProvider$Companion.prototype.dotplot_8j1y0m$ = function (supplier) {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.DOT_PLOT, AestheticsDefaults.Companion.dotplot(), DotplotGeom.Companion.HANDLES_GROUPS, supplier)).build_8be2vx$();\n };\n function GeomProvider$Companion$tile$lambda() {\n return new TileGeom();\n }\n GeomProvider$Companion.prototype.tile = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.TILE, AestheticsDefaults.Companion.tile(), TileGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$tile$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$bin2d$lambda() {\n return new Bin2dGeom();\n }\n GeomProvider$Companion.prototype.bin2d = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.BIN_2D, AestheticsDefaults.Companion.bin2d(), Bin2dGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$bin2d$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$errorBar$lambda() {\n return new ErrorBarGeom();\n }\n GeomProvider$Companion.prototype.errorBar = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.ERROR_BAR, AestheticsDefaults.Companion.errorBar(), ErrorBarGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$errorBar$lambda)).build_8be2vx$();\n };\n GeomProvider$Companion.prototype.crossBar_8j1y0m$ = function (supplier) {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.CROSS_BAR, AestheticsDefaults.Companion.crossBar(), CrossBarGeom.Companion.HANDLES_GROUPS, supplier)).build_8be2vx$();\n };\n function GeomProvider$Companion$lineRange$lambda() {\n return new LineRangeGeom();\n }\n GeomProvider$Companion.prototype.lineRange = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.LINE_RANGE, AestheticsDefaults.Companion.lineRange(), LineRangeGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$lineRange$lambda)).build_8be2vx$();\n };\n GeomProvider$Companion.prototype.pointRange_8j1y0m$ = function (supplier) {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.POINT_RANGE, AestheticsDefaults.Companion.pointRange(), PointRangeGeom.Companion.HANDLES_GROUPS, supplier)).build_8be2vx$();\n };\n function GeomProvider$Companion$contour$lambda() {\n return new ContourGeom();\n }\n GeomProvider$Companion.prototype.contour = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.CONTOUR, AestheticsDefaults.Companion.contour(), ContourGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$contour$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$contourf$lambda() {\n return new ContourfGeom();\n }\n GeomProvider$Companion.prototype.contourf = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.CONTOURF, AestheticsDefaults.Companion.contourf(), ContourfGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$contourf$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$polygon$lambda() {\n return new PolygonGeom();\n }\n GeomProvider$Companion.prototype.polygon = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.POLYGON, AestheticsDefaults.Companion.polygon(), PolygonGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$polygon$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$map$lambda() {\n return new MapGeom();\n }\n GeomProvider$Companion.prototype.map = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.MAP, AestheticsDefaults.Companion.map(), MapGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$map$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$abline$lambda() {\n return new ABLineGeom();\n }\n GeomProvider$Companion.prototype.abline = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.AB_LINE, AestheticsDefaults.Companion.abline(), ABLineGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$abline$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$hline$lambda() {\n return new HLineGeom();\n }\n GeomProvider$Companion.prototype.hline = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.H_LINE, AestheticsDefaults.Companion.hline(), HLineGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$hline$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$vline$lambda() {\n return new VLineGeom();\n }\n GeomProvider$Companion.prototype.vline = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.V_LINE, AestheticsDefaults.Companion.vline(), VLineGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$vline$lambda)).build_8be2vx$();\n };\n GeomProvider$Companion.prototype.boxplot_8j1y0m$ = function (supplier) {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.BOX_PLOT, AestheticsDefaults.Companion.boxplot(), BoxplotGeom.Companion.HANDLES_GROUPS, supplier)).build_8be2vx$();\n };\n GeomProvider$Companion.prototype.arearidges_8j1y0m$ = function (supplier) {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.AREA_RIDGES, AestheticsDefaults.Companion.areaRidges(), AreaRidgesGeom.Companion.HANDLES_GROUPS, supplier)).build_8be2vx$();\n };\n GeomProvider$Companion.prototype.violin_8j1y0m$ = function (supplier) {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.VIOLIN, AestheticsDefaults.Companion.violin(), ViolinGeom.Companion.HANDLES_GROUPS, supplier)).build_8be2vx$();\n };\n GeomProvider$Companion.prototype.ydotplot_8j1y0m$ = function (supplier) {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.Y_DOT_PLOT, AestheticsDefaults.Companion.ydotplot(), YDotplotGeom.Companion.HANDLES_GROUPS, supplier)).build_8be2vx$();\n };\n function GeomProvider$Companion$livemap$lambda() {\n return new LiveMapGeom();\n }\n GeomProvider$Companion.prototype.livemap = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.LIVE_MAP, AestheticsDefaults.Companion.livemap(), LiveMapGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$livemap$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$ribbon$lambda() {\n return new RibbonGeom();\n }\n GeomProvider$Companion.prototype.ribbon = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.RIBBON, AestheticsDefaults.Companion.ribbon(), RibbonGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$ribbon$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$area$lambda() {\n return new AreaGeom();\n }\n GeomProvider$Companion.prototype.area = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.AREA, AestheticsDefaults.Companion.area(), AreaGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$area$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$density$lambda() {\n return new DensityGeom();\n }\n GeomProvider$Companion.prototype.density = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.DENSITY, AestheticsDefaults.Companion.density(), DensityGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$density$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$density2d$lambda() {\n return new Density2dGeom();\n }\n GeomProvider$Companion.prototype.density2d = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.DENSITY2D, AestheticsDefaults.Companion.density2d(), Density2dGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$density2d$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$density2df$lambda() {\n return new Density2dfGeom();\n }\n GeomProvider$Companion.prototype.density2df = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.DENSITY2DF, AestheticsDefaults.Companion.density2df(), Density2dfGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$density2df$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$jitter$lambda() {\n return new JitterGeom();\n }\n GeomProvider$Companion.prototype.jitter = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.JITTER, AestheticsDefaults.Companion.jitter(), JitterGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$jitter$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$qq$lambda() {\n return new QQGeom();\n }\n GeomProvider$Companion.prototype.qq = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.Q_Q, AestheticsDefaults.Companion.qq(), QQGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$qq$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$qq2$lambda() {\n return new QQ2Geom();\n }\n GeomProvider$Companion.prototype.qq2 = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.Q_Q_2, AestheticsDefaults.Companion.qq2(), QQ2Geom.Companion.HANDLES_GROUPS, GeomProvider$Companion$qq2$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$qqline$lambda() {\n return new QQLineGeom();\n }\n GeomProvider$Companion.prototype.qqline = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.Q_Q_LINE, AestheticsDefaults.Companion.qq_line(), QQLineGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$qqline$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$qq2line$lambda() {\n return new QQ2LineGeom();\n }\n GeomProvider$Companion.prototype.qq2line = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.Q_Q_2_LINE, AestheticsDefaults.Companion.qq2_line(), QQ2LineGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$qq2line$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$freqpoly$lambda() {\n return new FreqpolyGeom();\n }\n GeomProvider$Companion.prototype.freqpoly = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.FREQPOLY, AestheticsDefaults.Companion.freqpoly(), FreqpolyGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$freqpoly$lambda)).build_8be2vx$();\n };\n GeomProvider$Companion.prototype.step_8j1y0m$ = function (supplier) {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.STEP, AestheticsDefaults.Companion.step(), StepGeom.Companion.HANDLES_GROUPS, supplier)).build_8be2vx$();\n };\n function GeomProvider$Companion$rect$lambda() {\n return new RectGeom();\n }\n GeomProvider$Companion.prototype.rect = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.RECT, AestheticsDefaults.Companion.rect(), RectGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$rect$lambda)).build_8be2vx$();\n };\n GeomProvider$Companion.prototype.segment_8j1y0m$ = function (supplier) {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.SEGMENT, AestheticsDefaults.Companion.segment(), SegmentGeom.Companion.HANDLES_GROUPS, supplier)).build_8be2vx$();\n };\n GeomProvider$Companion.prototype.text_8j1y0m$ = function (supplier) {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.TEXT, AestheticsDefaults.Companion.text(), TextGeom.Companion.HANDLES_GROUPS, supplier)).build_8be2vx$();\n };\n GeomProvider$Companion.prototype.label_8j1y0m$ = function (supplier) {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.LABEL, AestheticsDefaults.Companion.label(), TextGeom.Companion.HANDLES_GROUPS, supplier)).build_8be2vx$();\n };\n function GeomProvider$Companion$raster$lambda() {\n return new RasterGeom();\n }\n GeomProvider$Companion.prototype.raster = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.RASTER, AestheticsDefaults.Companion.raster(), RasterGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$raster$lambda)).build_8be2vx$();\n };\n GeomProvider$Companion.prototype.image_8j1y0m$ = function (supplier) {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.IMAGE, AestheticsDefaults.Companion.image(), ImageGeom.Companion.HANDLES_GROUPS, supplier)).build_8be2vx$();\n };\n GeomProvider$Companion.prototype.pie_8j1y0m$ = function (supplier) {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.PIE, AestheticsDefaults.Companion.pie(), PieGeom.Companion.HANDLES_GROUPS, supplier)).build_8be2vx$();\n };\n GeomProvider$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var GeomProvider$Companion_instance = null;\n function GeomProvider$Companion_getInstance() {\n if (GeomProvider$Companion_instance === null) {\n new GeomProvider$Companion();\n }\n return GeomProvider$Companion_instance;\n }\n GeomProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GeomProvider',\n interfaces: []\n };\n function PointDataAccess(data, bindings, scaleMap, isYOrientation) {\n this.data_0 = data;\n this.bindings_0 = bindings;\n this.scaleMap_0 = scaleMap;\n this.isYOrientation_daywl3$_0 = isYOrientation;\n this.myFormatters_0 = HashMap_init();\n }\n Object.defineProperty(PointDataAccess.prototype, 'isYOrientation', {\n get: function () {\n return this.isYOrientation_daywl3$_0;\n }\n });\n PointDataAccess.prototype.isMapped_896ixz$ = function (aes) {\n return this.bindings_0.containsKey_11rb$(aes);\n };\n PointDataAccess.prototype.getOriginalValue_m6grlz$ = function (aes, index) {\n if (!this.isMapped_896ixz$(aes)) {\n var message = 'Not mapped: ' + aes;\n throw IllegalArgumentException_init(message.toString());\n }\n var binding = getValue(this.bindings_0, aes);\n var scale = this.scaleMap_0.get_31786j$(aes);\n var value = this.data_0.getNumeric_8xm3sj$(binding.variable).get_za3lpa$(index);\n return scale.transform.applyInverse_yrwdxb$(value);\n };\n PointDataAccess.prototype.getMappedDataLabel_896ixz$ = function (aes) {\n return this.scaleMap_0.get_31786j$(aes).name;\n };\n PointDataAccess.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PointDataAccess',\n interfaces: [MappedDataAccess]\n };\n function CartesianCoordProvider(xLim, yLim, flipped) {\n if (flipped === void 0)\n flipped = false;\n CoordProviderBase.call(this, xLim, yLim, flipped);\n }\n CartesianCoordProvider.prototype.with_11nazf$ = function (xLim, yLim, flipped) {\n return new CartesianCoordProvider(xLim, yLim, flipped);\n };\n CartesianCoordProvider.prototype.adjustGeomSize_3y20zv$ = function (hDomain, vDomain, geomSize) {\n return geomSize;\n };\n CartesianCoordProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'CartesianCoordProvider',\n interfaces: [CoordProviderBase]\n };\n function CoordProvider() {\n }\n CoordProvider.prototype.createCoordinateSystem_26v79i$ = function (adjustedDomain, clientSize) {\n var coordMapper = this.createCoordinateMapper_26v79i$(adjustedDomain, clientSize);\n return coord.Coords.create_i06iub$(coordMapper);\n };\n CoordProvider.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'CoordProvider',\n interfaces: []\n };\n function CoordProviderBase(xLim, yLim, flipped, projection) {\n if (projection === void 0)\n projection = identity();\n this.xLim_0 = xLim;\n this.yLim_0 = yLim;\n this.flipped_u4pwwe$_0 = flipped;\n this.projection_0 = projection;\n if (!(this.xLim_0 == null || this.xLim_0.length > 0.0)) {\n var message = 'Coord x-limits range should be > 0.0';\n throw IllegalArgumentException_init(message.toString());\n }\n if (!(this.yLim_0 == null || this.yLim_0.length > 0.0)) {\n var message_0 = 'Coord y-limits range should be > 0.0';\n throw IllegalArgumentException_init(message_0.toString());\n }\n }\n Object.defineProperty(CoordProviderBase.prototype, 'flipped', {\n get: function () {\n return this.flipped_u4pwwe$_0;\n }\n });\n CoordProviderBase.prototype.adjustDomain_wthzt5$ = function (domain) {\n var tmp$;\n var tmp$_0, tmp$_1;\n var withLims = DoubleRectangle_init_0((tmp$_0 = this.xLim_0) != null ? tmp$_0 : domain.xRange(), (tmp$_1 = this.yLim_0) != null ? tmp$_1 : domain.yRange());\n var validDomain = this.projection_0.validDomain().intersect_wthzt5$(withLims);\n if (validDomain != null && validDomain.height > 0.0 && validDomain.width > 0.0) {\n tmp$ = this.flipped ? validDomain.flip() : validDomain;\n } else {\n throw IllegalArgumentException_init(trimMargin(\"Can't create a valid domain.\" + '\\n' + ' | data bbox: ' + domain + '\\n' + ' | x-lim: ' + toString(this.xLim_0) + '\\n' + ' | y-lim: ' + toString(this.yLim_0) + '\\n' + ' '));\n }\n return tmp$;\n };\n CoordProviderBase.prototype.createCoordinateMapper_26v79i$ = function (adjustedDomain, clientSize) {\n return CoordinatesMapper.Companion.create_u2nuxj$(adjustedDomain, clientSize, this.projection_0, this.flipped);\n };\n CoordProviderBase.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'CoordProviderBase',\n interfaces: [CoordProvider]\n };\n function CoordProviders() {\n CoordProviders_instance = this;\n }\n CoordProviders.prototype.cartesian_11nazf$ = function (xLim, yLim, flipped) {\n if (xLim === void 0)\n xLim = null;\n if (yLim === void 0)\n yLim = null;\n if (flipped === void 0)\n flipped = false;\n return new CartesianCoordProvider(xLim, yLim, flipped);\n };\n CoordProviders.prototype.fixed_kt8gy1$ = function (ratio, xLim, yLim, flipped) {\n if (xLim === void 0)\n xLim = null;\n if (yLim === void 0)\n yLim = null;\n if (flipped === void 0)\n flipped = false;\n return new FixedRatioCoordProvider(ratio, xLim, yLim, flipped);\n };\n CoordProviders.prototype.map_bjve6d$ = function (xLim, yLim, flipped, projection) {\n if (xLim === void 0)\n xLim = null;\n if (yLim === void 0)\n yLim = null;\n if (flipped === void 0)\n flipped = false;\n if (projection === void 0)\n projection = mercator();\n return new ProjectionCoordProvider(projection, xLim, yLim, flipped);\n };\n CoordProviders.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'CoordProviders',\n interfaces: []\n };\n var CoordProviders_instance = null;\n function CoordProviders_getInstance() {\n if (CoordProviders_instance === null) {\n new CoordProviders();\n }\n return CoordProviders_instance;\n }\n function FixedRatioCoordProvider(ratio, xLim, yLim, flipped) {\n FixedRatioCoordProvider$Companion_getInstance();\n CoordProviderBase.call(this, xLim, yLim, flipped);\n this.ratio_0 = ratio;\n }\n FixedRatioCoordProvider.prototype.with_11nazf$ = function (xLim, yLim, flipped) {\n return new FixedRatioCoordProvider(this.ratio_0, xLim, yLim, flipped);\n };\n FixedRatioCoordProvider.prototype.adjustGeomSize_3y20zv$ = function (hDomain, vDomain, geomSize) {\n var domainRatio = hDomain.length / vDomain.length;\n var effectiveDomainRatio = domainRatio / this.ratio_0;\n return FixedRatioCoordProvider$Companion_getInstance().reshapeGeom_e1sv3v$(geomSize, effectiveDomainRatio);\n };\n function FixedRatioCoordProvider$Companion() {\n FixedRatioCoordProvider$Companion_instance = this;\n }\n FixedRatioCoordProvider$Companion.prototype.reshapeGeom_e1sv3v$ = function (geomSize, targetWidthToHeightRatio) {\n var tmp$;\n var geomRatio = geomSize.x / geomSize.y;\n if (targetWidthToHeightRatio > geomRatio) {\n var h = geomSize.x / targetWidthToHeightRatio;\n tmp$ = new DoubleVector(geomSize.x, h);\n } else {\n var w = geomSize.y * targetWidthToHeightRatio;\n tmp$ = new DoubleVector(w, geomSize.y);\n }\n var newSize = tmp$;\n return newSize;\n };\n FixedRatioCoordProvider$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var FixedRatioCoordProvider$Companion_instance = null;\n function FixedRatioCoordProvider$Companion_getInstance() {\n if (FixedRatioCoordProvider$Companion_instance === null) {\n new FixedRatioCoordProvider$Companion();\n }\n return FixedRatioCoordProvider$Companion_instance;\n }\n FixedRatioCoordProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'FixedRatioCoordProvider',\n interfaces: [CoordProviderBase]\n };\n function MarginalLayerCoordProvider() {\n CoordProviderBase.call(this, null, null, false);\n }\n MarginalLayerCoordProvider.prototype.with_11nazf$ = function (xLim, yLim, flipped) {\n UNSUPPORTED('MarginalLayerCoordProvider.with()');\n };\n MarginalLayerCoordProvider.prototype.adjustGeomSize_3y20zv$ = function (hDomain, vDomain, geomSize) {\n return geomSize;\n };\n MarginalLayerCoordProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'MarginalLayerCoordProvider',\n interfaces: [CoordProviderBase]\n };\n function ProjectionCoordProvider(projection, xLim, yLim, flipped) {\n CoordProviderBase.call(this, xLim, yLim, flipped, projection);\n }\n ProjectionCoordProvider.prototype.with_11nazf$ = function (xLim, yLim, flipped) {\n return new ProjectionCoordProvider(this.projection_0, xLim, yLim, flipped);\n };\n ProjectionCoordProvider.prototype.adjustGeomSize_3y20zv$ = function (hDomain, vDomain, geomSize) {\n var tmp$;\n var tmp$_0 = geometry.DoubleRectangles;\n var tmp$_1;\n var $receiver = listOf_0([new DoubleVector(hDomain.lowerEnd, vDomain.lowerEnd), new DoubleVector(hDomain.lowerEnd, vDomain.upperEnd), new DoubleVector(hDomain.upperEnd, vDomain.lowerEnd), new DoubleVector(hDomain.upperEnd, vDomain.upperEnd)]);\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$_2;\n tmp$_2 = $receiver.iterator();\n while (tmp$_2.hasNext()) {\n var item = tmp$_2.next();\n destination.add_11rb$(this.flipped ? item.flip() : item);\n }\n var transform = getCallableRef('project', function ($receiver, p1) {\n return $receiver.project_gpjtzr$(p1);\n }.bind(null, this.projection_0));\n var destination_0 = ArrayList_init();\n var tmp$_3;\n tmp$_3 = destination.iterator();\n while (tmp$_3.hasNext()) {\n var element = tmp$_3.next();\n var tmp$_0_0;\n if ((tmp$_0_0 = transform(element)) != null) {\n destination_0.add_11rb$(tmp$_0_0);\n }\n }\n var destination_1 = ArrayList_init_0(collectionSizeOrDefault(destination_0, 10));\n var tmp$_4;\n tmp$_4 = destination_0.iterator();\n while (tmp$_4.hasNext()) {\n var item_0 = tmp$_4.next();\n destination_1.add_11rb$(this.flipped ? item_0.flip() : item_0);\n }\n if ((tmp$ = tmp$_0.boundingBox_qdtdbw$(destination_1)) != null)\n tmp$_1 = tmp$;\n else {\n throw IllegalStateException_init(\"adjustGeomSize() - can't compute bbox\".toString());\n }\n var bbox = tmp$_1;\n var domainRatio = bbox.width / bbox.height;\n return FixedRatioCoordProvider$Companion_getInstance().reshapeGeom_e1sv3v$(geomSize, domainRatio);\n };\n ProjectionCoordProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ProjectionCoordProvider',\n interfaces: [CoordProviderBase]\n };\n function DataProcessing() {\n DataProcessing_instance = this;\n }\n DataProcessing.prototype.transformOriginals_9nntby$ = function (data_0, bindings, transformByAes) {\n var tmp$;\n var data_1 = data_0;\n tmp$ = bindings.iterator();\n while (tmp$.hasNext()) {\n var binding = tmp$.next();\n var variable = binding.variable;\n if (variable.isOrigin) {\n data_1.assertDefined_8xm3sj$(variable);\n data_1 = data.DataFrameUtil.applyTransform_f2tird$(data_1, variable, binding.aes, getValue(transformByAes, binding.aes));\n }\n }\n return data_1;\n };\n DataProcessing.prototype.buildStatData_ardmvj$ = function (statInput, stat_0, groupingContext, facetVariables, varsWithoutBinding, orderOptions, aggregateOperation, messageConsumer) {\n var tmp$, tmp$_0;\n if (!!equals(stat_0, stat.Stats.IDENTITY)) {\n var message = 'Check failed.';\n throw IllegalStateException_init(message.toString());\n }\n var groups = groupingContext.groupMapper;\n var resultSeries;\n var groupSizeListAfterStat;\n if (groups === GroupUtil_getInstance().SINGLE_GROUP_8be2vx$) {\n var statData = this.applyStat_0(statInput.data, stat_0, statInput.bindings, statInput.transformByAes, facetVariables, statInput.statCtx, varsWithoutBinding, messageConsumer);\n groupSizeListAfterStat = listOf(statData.rowCount());\n var $receiver = statData.variables();\n var result = LinkedHashMap_init_0(coerceAtLeast(mapCapacity(collectionSizeOrDefault($receiver, 10)), 16));\n var tmp$_1;\n tmp$_1 = $receiver.iterator();\n while (tmp$_1.hasNext()) {\n var element = tmp$_1.next();\n result.put_xwzc9p$(element, statData.get_8xm3sj$(element));\n }\n resultSeries = result;\n } else {\n var groupMerger = new GroupMerger();\n var lastStatGroupEnd = -1;\n tmp$ = this.splitByGroup_0(statInput.data, groups).iterator();\n while (tmp$.hasNext()) {\n var d = tmp$.next();\n var statData_0 = this.applyStat_0(d, stat_0, statInput.bindings, statInput.transformByAes, facetVariables, statInput.statCtx, varsWithoutBinding, messageConsumer);\n if (statData_0.isEmpty) {\n continue;\n }\n groupMerger.initOrderSpecs_37be8y$(orderOptions, statData_0.variables(), statInput.bindings, aggregateOperation);\n var curGroupSizeAfterStat = statData_0.rowCount();\n if (statData_0.has_8xm3sj$(stat.Stats.GROUP)) {\n var range = statData_0.range_8xm3sj$(stat.Stats.GROUP);\n if (range != null) {\n var start = lastStatGroupEnd + 1 | 0;\n var offset = start - numberToInt(range.lowerEnd) | 0;\n lastStatGroupEnd = numberToInt(range.upperEnd) + offset | 0;\n if (offset !== 0) {\n var newG = ArrayList_init();\n tmp$_0 = statData_0.getNumeric_8xm3sj$(stat.Stats.GROUP).iterator();\n while (tmp$_0.hasNext()) {\n var g = tmp$_0.next();\n newG.add_11rb$(ensureNotNull(g) + offset);\n }\n statData_0 = statData_0.builder().putNumeric_s1rqo9$(stat.Stats.GROUP, newG).build();\n }\n }\n } else {\n var groupingVar = groupingContext.optionalGroupingVar_8be2vx$;\n if (groupingVar != null) {\n var size = statData_0.get_8xm3sj$(first_0(statData_0.variables())).size;\n var v = d.get_8xm3sj$(groupingVar).get_za3lpa$(0);\n var tmp$_2 = statData_0.builder();\n var list = ArrayList_init_0(size);\n for (var index = 0; index < size; index++) {\n list.add_11rb$(v);\n }\n statData_0 = tmp$_2.put_2l962d$(groupingVar, list).build();\n }\n }\n groupMerger.addGroup_s4jycv$(statData_0, curGroupSizeAfterStat);\n }\n resultSeries = groupMerger.getResultSeries();\n groupSizeListAfterStat = groupMerger.getGroupSizes();\n }\n var closure$resultSeries = resultSeries;\n var $receiver_0 = DataFrame$DataFrame$Builder_init();\n var tmp$_3;\n tmp$_3 = closure$resultSeries.keys.iterator();\n while (tmp$_3.hasNext()) {\n var variable = tmp$_3.next();\n $receiver_0.put_2l962d$(variable, ensureNotNull(closure$resultSeries.get_11rb$(variable)));\n }\n var destination = ArrayList_init_0(collectionSizeOrDefault(orderOptions, 10));\n var tmp$_4;\n tmp$_4 = orderOptions.iterator();\n while (tmp$_4.hasNext()) {\n var item = tmp$_4.next();\n destination.add_11rb$(OrderOptionUtil_getInstance().createOrderSpec_e64h97$(closure$resultSeries.keys, statInput.bindings, item, aggregateOperation));\n }\n var orderSpecs = destination;\n $receiver_0.addOrderSpecs_l2t0xf$(orderSpecs);\n var dataAfterStat = $receiver_0.build();\n var normalizedData = stat_0.normalize_dhhkv7$(dataAfterStat);\n var groupingContextAfterStat = GroupingContext$Companion_getInstance().withOrderedGroups_vi90cb$(normalizedData, groupSizeListAfterStat);\n return new DataProcessing$DataAndGroupingContext(normalizedData, groupingContextAfterStat);\n };\n DataProcessing.prototype.findOptionalVariable_hrxl0z$ = function (data_0, name) {\n return name == null || name.length === 0 ? null : data.DataFrameUtil.findVariableOrFail_vede35$(data_0, name);\n };\n DataProcessing.prototype.splitByGroup_0 = function (data, groups) {\n var $receiver = GroupUtil_getInstance().indicesByGroup_wc9gac$(data.rowCount(), groups).values;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n var tmp$_0 = destination.add_11rb$;\n var $receiver_0 = data.variables();\n var tmp$_1;\n var accumulator = DataFrame$DataFrame$Builder_init();\n tmp$_1 = $receiver_0.iterator();\n while (tmp$_1.hasNext()) {\n var element = tmp$_1.next();\n var b = accumulator;\n var operation$result;\n var tmp$_2;\n tmp$_2 = data.isNumeric_8xm3sj$(element);\n if (tmp$_2 === true) {\n operation$result = b.putNumeric_s1rqo9$(element, data_0.SeriesUtil.pickAtIndices_ge51dg$(data.getNumeric_8xm3sj$(element), item));\n } else if (tmp$_2 === false) {\n operation$result = b.putDiscrete_2l962d$(element, data_0.SeriesUtil.pickAtIndices_ge51dg$(data.get_8xm3sj$(element), item));\n } else {\n operation$result = Kotlin.noWhenBranchMatched();\n }\n accumulator = operation$result;\n }\n tmp$_0.call(destination, accumulator);\n }\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(destination, 10));\n var tmp$_3;\n tmp$_3 = destination.iterator();\n while (tmp$_3.hasNext()) {\n var item_0 = tmp$_3.next();\n destination_0.add_11rb$(item_0.build());\n }\n return destination_0;\n };\n function DataProcessing$applyStat$newSerieForVariable(closure$data, closure$statDataSize) {\n return function (variable) {\n var tmp$, tmp$_0;\n tmp$ = closure$data.isNumeric_8xm3sj$(variable);\n if (tmp$ === true)\n tmp$_0 = data_0.SeriesUtil.mean_l4tjj7$(closure$data.getNumeric_8xm3sj$(variable), null);\n else if (tmp$ === false)\n tmp$_0 = data_0.SeriesUtil.firstNotNull_rath1t$(closure$data.get_8xm3sj$(variable), null);\n else\n tmp$_0 = Kotlin.noWhenBranchMatched();\n var value = tmp$_0;\n var size = closure$statDataSize;\n var list = ArrayList_init_0(size);\n for (var index = 0; index < size; index++) {\n list.add_11rb$(value);\n }\n return list;\n };\n }\n DataProcessing.prototype.applyStat_0 = function (data_0, stat_0, bindings, transformByAes, facetVariables, statCtx, varsWithoutBinding, compMessageConsumer) {\n var tmp$, tmp$_0;\n var statData = stat_0.apply_kdy6bf$(data_0, statCtx, compMessageConsumer);\n var statVariables = statData.variables();\n if (statVariables.isEmpty()) {\n return statData;\n }\n statData = this.inverseTransformStatData_0(statData, stat_0, bindings, transformByAes);\n var statDataSize = statData.rowCount();\n var result = LinkedHashMap_init_0(coerceAtLeast(mapCapacity(collectionSizeOrDefault(facetVariables, 10)), 16));\n var tmp$_1;\n tmp$_1 = facetVariables.iterator();\n while (tmp$_1.hasNext()) {\n var element = tmp$_1.next();\n result.put_xwzc9p$(element, data_0.get_8xm3sj$(element).get_za3lpa$(0));\n }\n var facetLevelByFacetVar = result;\n var destination = LinkedHashMap_init_0(mapCapacity(facetLevelByFacetVar.size));\n var tmp$_2;\n tmp$_2 = facetLevelByFacetVar.entries.iterator();\n while (tmp$_2.hasNext()) {\n var element_0 = tmp$_2.next();\n var tmp$_3 = destination.put_xwzc9p$;\n var tmp$_4 = element_0.key;\n var facetLevel = element_0.value;\n var list = ArrayList_init_0(statDataSize);\n for (var index = 0; index < statDataSize; index++) {\n list.add_11rb$(facetLevel);\n }\n tmp$_3.call(destination, tmp$_4, list);\n }\n var inputSeriesForFacetVars = destination;\n var newSerieForVariable = DataProcessing$applyStat$newSerieForVariable(data_0, statDataSize);\n var newInputSeries = HashMap_init();\n tmp$ = bindings.iterator();\n while (tmp$.hasNext()) {\n var binding = tmp$.next();\n var variable = binding.variable;\n if (variable.isStat || facetVariables.contains_11rb$(variable)) {\n continue;\n }\n var aes = binding.aes;\n if (stat_0.hasDefaultMapping_896ixz$(aes)) {\n var defaultStatVar = stat_0.getDefaultMapping_896ixz$(aes);\n var value = statData.get_8xm3sj$(defaultStatVar);\n newInputSeries.put_xwzc9p$(variable, value);\n } else {\n if (!newInputSeries.containsKey_11rb$(variable)) {\n var value_0 = newSerieForVariable(variable);\n newInputSeries.put_xwzc9p$(variable, value_0);\n }\n }\n }\n var predicate = getCallableRef('isStatVar', function ($receiver, p1) {\n return $receiver.isStatVar_61zpoe$(p1);\n }.bind(null, stat.Stats));\n var destination_0 = ArrayList_init();\n var tmp$_5;\n tmp$_5 = varsWithoutBinding.iterator();\n while (tmp$_5.hasNext()) {\n var element_1 = tmp$_5.next();\n if (!predicate(element_1))\n destination_0.add_11rb$(element_1);\n }\n tmp$_0 = destination_0.iterator();\n while (tmp$_0.hasNext()) {\n var varName = tmp$_0.next();\n var variable_0 = data.DataFrameUtil.findVariableOrFail_vede35$(data_0, varName);\n if (!newInputSeries.containsKey_11rb$(variable_0)) {\n var value_1 = newSerieForVariable(variable_0);\n newInputSeries.put_xwzc9p$(variable_0, value_1);\n }\n }\n var b = statData.builder();\n var tmp$_6;\n tmp$_6 = plus_0(newInputSeries, inputSeriesForFacetVars).entries.iterator();\n while (tmp$_6.hasNext()) {\n var element_2 = tmp$_6.next();\n var variable_1 = element_2.key;\n var serie = element_2.value;\n b.put_2l962d$(variable_1, serie);\n }\n return b.build();\n };\n function DataProcessing$inverseTransformStatData$transformForAes(closure$transformByAes) {\n return function (aes) {\n var tmp$;\n if (Aes.Companion.isPositionalX_896ixz$(aes))\n tmp$ = getValue(closure$transformByAes, Aes.Companion.X);\n else if (Aes.Companion.isPositionalY_896ixz$(aes))\n tmp$ = getValue(closure$transformByAes, Aes.Companion.Y);\n else\n throw IllegalStateException_init('Positional aes expected but was ' + aes + '.');\n return tmp$;\n };\n }\n function DataProcessing$inverseTransformStatData$needInverseTransform(closure$needTransformX, closure$needTransformY) {\n return function (aes) {\n if (Aes.Companion.isPositionalX_896ixz$(aes))\n return closure$needTransformX;\n if (Aes.Companion.isPositionalY_896ixz$(aes))\n return closure$needTransformY;\n return false;\n };\n }\n DataProcessing.prototype.inverseTransformStatData_0 = function (statData, stat, bindings, transformByAes) {\n if (!transformByAes.containsKey_11rb$(Aes.Companion.X)) {\n var message = 'Check failed.';\n throw IllegalStateException_init(message.toString());\n }\n if (!transformByAes.containsKey_11rb$(Aes.Companion.Y)) {\n var message_0 = 'Check failed.';\n throw IllegalStateException_init(message_0.toString());\n }\n var transformForAes = DataProcessing$inverseTransformStatData$transformForAes(transformByAes);\n var $receiver = stat.consumes();\n var any$result;\n any$break: do {\n var tmp$;\n if (Kotlin.isType($receiver, Collection) && $receiver.isEmpty()) {\n any$result = false;\n break any$break;\n }\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n if (Aes.Companion.isPositionalX_896ixz$(element)) {\n any$result = true;\n break any$break;\n }\n }\n any$result = false;\n }\n while (false);\n var needTransformX = any$result;\n var $receiver_0 = stat.consumes();\n var any$result_0;\n any$break: do {\n var tmp$_0;\n if (Kotlin.isType($receiver_0, Collection) && $receiver_0.isEmpty()) {\n any$result_0 = false;\n break any$break;\n }\n tmp$_0 = $receiver_0.iterator();\n while (tmp$_0.hasNext()) {\n var element_0 = tmp$_0.next();\n if (Aes.Companion.isPositionalY_896ixz$(element_0)) {\n any$result_0 = true;\n break any$break;\n }\n }\n any$result_0 = false;\n }\n while (false);\n var needTransformY = any$result_0;\n var needInverseTransform = DataProcessing$inverseTransformStatData$needInverseTransform(needTransformX, needTransformY);\n var $receiver_1 = Aes.Companion.values();\n var destination = ArrayList_init();\n var tmp$_1;\n tmp$_1 = $receiver_1.iterator();\n while (tmp$_1.hasNext()) {\n var element_1 = tmp$_1.next();\n if (stat.hasDefaultMapping_896ixz$(element_1))\n destination.add_11rb$(element_1);\n }\n var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(destination, 10)), 16);\n var destination_0 = LinkedHashMap_init_0(capacity);\n var tmp$_2;\n tmp$_2 = destination.iterator();\n while (tmp$_2.hasNext()) {\n var element_2 = tmp$_2.next();\n destination_0.put_xwzc9p$(stat.getDefaultMapping_896ixz$(element_2), element_2);\n }\n var aesByStatVarDefault = destination_0;\n var destination_1 = ArrayList_init();\n var tmp$_3;\n tmp$_3 = bindings.iterator();\n while (tmp$_3.hasNext()) {\n var element_3 = tmp$_3.next();\n if (!element_3.variable.isStat)\n destination_1.add_11rb$(element_3);\n }\n var capacity_0 = coerceAtLeast(mapCapacity(collectionSizeOrDefault(destination_1, 10)), 16);\n var destination_2 = LinkedHashMap_init_0(capacity_0);\n var tmp$_4;\n tmp$_4 = destination_1.iterator();\n while (tmp$_4.hasNext()) {\n var element_4 = tmp$_4.next();\n var pair = to(element_4.variable, element_4.aes);\n destination_2.put_xwzc9p$(pair.first, pair.second);\n }\n var aesByStatVarMapped = destination_2;\n var aesByStatVar = plus_0(aesByStatVarDefault, aesByStatVarMapped);\n var $receiver_2 = statData.variables();\n var destination_3 = ArrayList_init();\n var tmp$_5;\n tmp$_5 = $receiver_2.iterator();\n while (tmp$_5.hasNext()) {\n var element_5 = tmp$_5.next();\n if (aesByStatVar.containsKey_11rb$(element_5))\n destination_3.add_11rb$(element_5);\n }\n var destination_4 = ArrayList_init();\n var tmp$_6;\n tmp$_6 = destination_3.iterator();\n while (tmp$_6.hasNext()) {\n var element_6 = tmp$_6.next();\n var aes = getValue(aesByStatVar, element_6);\n if (needInverseTransform(aes))\n destination_4.add_11rb$(element_6);\n }\n var result = LinkedHashMap_init_0(coerceAtLeast(mapCapacity(collectionSizeOrDefault(destination_4, 10)), 16));\n var tmp$_7;\n tmp$_7 = destination_4.iterator();\n while (tmp$_7.hasNext()) {\n var element_7 = tmp$_7.next();\n var tmp$_8 = result.put_xwzc9p$;\n var aes_0 = getValue(aesByStatVar, element_7);\n var transform = transformForAes(aes_0);\n var statSerie = statData.getNumeric_8xm3sj$(element_7);\n tmp$_8.call(result, element_7, transform.applyInverse_k9kaly$(statSerie));\n }\n var inverseTransformedSeries = result;\n var builder = statData.builder();\n var tmp$_9;\n tmp$_9 = inverseTransformedSeries.entries.iterator();\n while (tmp$_9.hasNext()) {\n var element_8 = tmp$_9.next();\n var variable = element_8.key;\n var serie = element_8.value;\n builder.put_2l962d$(variable, serie);\n }\n return builder.build();\n };\n DataProcessing.prototype.computeGroups_ps74eq$ = function (data, groupingVariables) {\n var tmp$, tmp$_0;\n var currentGroups = {v: null};\n tmp$ = groupingVariables.iterator();\n while (tmp$.hasNext()) {\n var groupingVariable = tmp$.next();\n var values = data.get_8xm3sj$(groupingVariable);\n var groups = this.computeGroups_0(values);\n if (currentGroups.v == null) {\n currentGroups.v = groups;\n continue;\n }\n if (!(currentGroups.v.size === groups.size)) {\n var tmp$_1;\n var message = 'Data series used to compute groups must be equal in size (encountered sizes: ' + (toString((tmp$_1 = currentGroups.v) != null ? tmp$_1.size : null) + ', ' + groups.size + ' )');\n throw IllegalStateException_init(message.toString());\n }\n var dummies = this.computeDummyValues_0(currentGroups.v, groups);\n currentGroups.v = this.computeGroups_0(dummies);\n }\n if (currentGroups.v != null) {\n tmp$_0 = GroupUtil_getInstance().wrap_2wzaym$(currentGroups.v);\n } else {\n tmp$_0 = GroupUtil_getInstance().SINGLE_GROUP_8be2vx$;\n }\n return tmp$_0;\n };\n DataProcessing.prototype.computeGroups_0 = function (values) {\n var tmp$, tmp$_0;\n var groups = ArrayList_init();\n var groupByVal = HashMap_init();\n var count = 0;\n tmp$ = values.iterator();\n while (tmp$.hasNext()) {\n var v = tmp$.next();\n if (!groupByVal.containsKey_11rb$(v)) {\n var value = (tmp$_0 = count, count = tmp$_0 + 1 | 0, tmp$_0);\n groupByVal.put_xwzc9p$(v, value);\n }\n groups.add_11rb$(ensureNotNull(groupByVal.get_11rb$(v)));\n }\n return groups;\n };\n DataProcessing.prototype.computeDummyValues_0 = function (list1, list2) {\n if (list1.isEmpty())\n return emptyList();\n var limit = 1000;\n var max = ensureNotNull(maxOrNull(plus(list1, list2)));\n if (!(max < limit)) {\n var message = 'Too many groups: ' + max;\n throw IllegalStateException_init(message.toString());\n }\n var dummies = ArrayList_init();\n var it1 = list1.iterator();\n var it2 = list2.iterator();\n while (it1.hasNext()) {\n var v1 = it1.next();\n var v2 = it2.next();\n var dummy = Kotlin.imul(v1, limit) + v2 | 0;\n dummies.add_11rb$(dummy);\n }\n return dummies;\n };\n DataProcessing.prototype.defaultGroupingVariables_39xr23$ = function (data, bindings, pathIdVarName) {\n var pathIdVar = this.findOptionalVariable_hrxl0z$(data, pathIdVarName);\n return plus_1(this.defaultGroupingVariables_0(data, bindings), listOfNotNull_0(pathIdVar));\n };\n DataProcessing.prototype.defaultGroupingVariables_0 = function (data, bindings) {\n var destination = ArrayList_init();\n var tmp$;\n tmp$ = bindings.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n if (this.isDefaultGroupingVariable_0(data, element.aes, element.variable))\n destination.add_11rb$(element);\n }\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(destination, 10));\n var tmp$_0;\n tmp$_0 = destination.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n destination_0.add_11rb$(item.variable);\n }\n return distinct(destination_0);\n };\n DataProcessing.prototype.isDefaultGroupingVariable_0 = function (data, aes, variable) {\n return variable.isOrigin && !(Aes.Companion.isPositional_896ixz$(aes) || data.isNumeric_8xm3sj$(variable));\n };\n function DataProcessing$DataAndGroupingContext(data, groupingContext) {\n this.data = data;\n this.groupingContext = groupingContext;\n }\n DataProcessing$DataAndGroupingContext.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'DataAndGroupingContext',\n interfaces: []\n };\n DataProcessing.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'DataProcessing',\n interfaces: []\n };\n var DataProcessing_instance = null;\n function DataProcessing_getInstance() {\n if (DataProcessing_instance === null) {\n new DataProcessing();\n }\n return DataProcessing_instance;\n }\n function GroupMerger() {\n this.myOrderSpecs_0 = null;\n this.myOrderedGroups_0 = ArrayList_init();\n }\n GroupMerger.prototype.initOrderSpecs_37be8y$ = function (orderOptions, variables, bindings, aggregateOperation) {\n if (this.myOrderSpecs_0 != null)\n return;\n var destination = ArrayList_init();\n var tmp$;\n tmp$ = orderOptions.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n var firstOrNull$result;\n firstOrNull$break: do {\n var tmp$_0;\n tmp$_0 = bindings.iterator();\n while (tmp$_0.hasNext()) {\n var element_0 = tmp$_0.next();\n if (equals(element_0.variable.name, element.variableName) && equals(element_0.aes, Aes.Companion.X)) {\n firstOrNull$result = element_0;\n break firstOrNull$break;\n }\n }\n firstOrNull$result = null;\n }\n while (false);\n if (firstOrNull$result == null)\n destination.add_11rb$(element);\n }\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(destination, 10));\n var tmp$_1;\n tmp$_1 = destination.iterator();\n while (tmp$_1.hasNext()) {\n var item = tmp$_1.next();\n destination_0.add_11rb$(OrderOptionUtil_getInstance().createOrderSpec_e64h97$(variables, bindings, item, aggregateOperation));\n }\n this.myOrderSpecs_0 = destination_0;\n };\n GroupMerger.prototype.getResultSeries = function () {\n var resultSeries = HashMap_init();\n var tmp$;\n tmp$ = this.myOrderedGroups_0.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n var tmp$_0;\n tmp$_0 = element.df.variables().iterator();\n while (tmp$_0.hasNext()) {\n var element_0 = tmp$_0.next();\n var tmp$_1;\n var value = resultSeries.get_11rb$(element_0);\n if (value == null) {\n var answer = ArrayList_init();\n resultSeries.put_xwzc9p$(element_0, answer);\n tmp$_1 = answer;\n } else {\n tmp$_1 = value;\n }\n tmp$_1.addAll_brywnq$(element.df.get_8xm3sj$(element_0));\n }\n }\n return resultSeries;\n };\n GroupMerger.prototype.getGroupSizes = function () {\n var $receiver = this.myOrderedGroups_0;\n var transform = getPropertyCallableRef('groupSize', 1, function ($receiver) {\n return $receiver.groupSize;\n });\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n destination.add_11rb$(transform(item));\n }\n return destination;\n };\n function GroupMerger$Group($outer, df, groupSize) {\n this.$outer = $outer;\n this.df = df;\n this.groupSize = groupSize;\n }\n function GroupMerger$Group$compareTo$compareGroupValue(v1, v2, dir) {\n var tmp$, tmp$_0;\n if (v1 == null && v2 == null)\n return 0;\n if (v1 == null)\n return 1;\n if (v2 == null)\n return -1;\n return Kotlin.imul(compareValues(Kotlin.isComparable(tmp$ = v1) ? tmp$ : throwCCE(), Kotlin.isComparable(tmp$_0 = v2) ? tmp$_0 : throwCCE()), dir);\n }\n function GroupMerger$Group$compareTo$getValue(df, variable, aggregateOperation) {\n if (aggregateOperation === void 0)\n aggregateOperation = null;\n var tmp$;\n if (aggregateOperation != null) {\n if (!df.isNumeric_8xm3sj$(variable)) {\n var message = \"Can't apply aggregate operation to non-numeric values\";\n throw IllegalArgumentException_init(message.toString());\n }\n tmp$ = aggregateOperation(requireNoNulls(df.getNumeric_8xm3sj$(variable)));\n } else {\n tmp$ = firstOrNull(df.get_8xm3sj$(variable));\n }\n return tmp$;\n }\n GroupMerger$Group.prototype.compareTo_11rb$ = function (other) {\n var tmp$;\n var compareGroupValue = GroupMerger$Group$compareTo$compareGroupValue;\n var getValue = GroupMerger$Group$compareTo$getValue;\n if ((tmp$ = this.$outer.myOrderSpecs_0) != null) {\n var tmp$_0;\n tmp$_0 = tmp$.iterator();\n while (tmp$_0.hasNext()) {\n var element = tmp$_0.next();\n var cmp = compareGroupValue(getValue(this.df, element.orderBy, element.aggregateOperation), getValue(other.df, element.orderBy, element.aggregateOperation), element.direction);\n if (cmp === 0) {\n cmp = compareGroupValue(getValue(this.df, element.variable), getValue(other.df, element.variable), element.direction);\n }\n if (cmp !== 0) {\n return cmp;\n }\n }\n }\n return 0;\n };\n GroupMerger$Group.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'Group',\n interfaces: [Comparable]\n };\n GroupMerger.prototype.addGroup_s4jycv$ = function (d, groupSize) {\n var group = new GroupMerger$Group(this, d, groupSize);\n var indexToInsert = this.findIndexToInsert_0(group);\n this.myOrderedGroups_0.add_wxm5ur$(indexToInsert, group);\n };\n GroupMerger.prototype.findIndexToInsert_0 = function (group) {\n var $receiver = this.myOrderSpecs_0;\n if ($receiver == null || $receiver.isEmpty()) {\n return this.myOrderedGroups_0.size;\n }\n var index = binarySearch(this.myOrderedGroups_0, group);\n if (index < 0)\n index = ~index;\n return index;\n };\n GroupMerger.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GroupMerger',\n interfaces: []\n };\n function GroupUtil() {\n GroupUtil_instance = this;\n this.SINGLE_GROUP_8be2vx$ = GroupUtil$SINGLE_GROUP$lambda;\n }\n function GroupUtil$wrap$lambda(closure$l) {\n return function (index) {\n return index > 0 && index < closure$l.size ? numberToInt(ensureNotNull(closure$l.get_za3lpa$(index))) : 0;\n };\n }\n GroupUtil.prototype.wrap_2wzaym$ = function (l) {\n return GroupUtil$wrap$lambda(l);\n };\n function GroupUtil$wrap$lambda_0(closure$groupByPointIndex) {\n return function (it) {\n return ensureNotNull(closure$groupByPointIndex.get_11rb$(it));\n };\n }\n GroupUtil.prototype.wrap_orwq1h$ = function (groupByPointIndex) {\n return GroupUtil$wrap$lambda_0(groupByPointIndex);\n };\n GroupUtil.prototype.indicesByGroup_wc9gac$ = function (dataLength, groups) {\n var indicesByGroup = LinkedHashMap_init();\n for (var i = 0; i < dataLength; i++) {\n var group = groups(i);\n if (!indicesByGroup.containsKey_11rb$(group)) {\n var value = ArrayList_init();\n indicesByGroup.put_xwzc9p$(group, value);\n }\n ensureNotNull(indicesByGroup.get_11rb$(group)).add_11rb$(i);\n }\n return indicesByGroup;\n };\n function GroupUtil$SINGLE_GROUP$lambda(f) {\n return 0;\n }\n GroupUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'GroupUtil',\n interfaces: []\n };\n var GroupUtil_instance = null;\n function GroupUtil_getInstance() {\n if (GroupUtil_instance === null) {\n new GroupUtil();\n }\n return GroupUtil_instance;\n }\n function GroupingContext(data, defaultGroupingVariables, explicitGroupingVarName, expectMultiple, groupSizeList) {\n GroupingContext$Companion_getInstance();\n if (groupSizeList === void 0)\n groupSizeList = null;\n this.data_0 = data;\n this.expectMultiple_0 = expectMultiple;\n this.groupSizeList_0 = groupSizeList;\n this.optionalGroupingVar_8be2vx$ = DataProcessing_getInstance().findOptionalVariable_hrxl0z$(this.data_0, explicitGroupingVarName);\n var tmp$;\n if (this.optionalGroupingVar_8be2vx$ == null)\n tmp$ = defaultGroupingVariables;\n else {\n tmp$ = toList(plus_2(linkedSetOf([this.optionalGroupingVar_8be2vx$]), defaultGroupingVariables));\n }\n this.groupingVariables_0 = tmp$;\n this._groupMapper_0 = null;\n }\n Object.defineProperty(GroupingContext.prototype, 'groupMapper', {\n configurable: true,\n get: function () {\n if (this._groupMapper_0 == null) {\n this._groupMapper_0 = this.computeGroups_0();\n }\n return ensureNotNull(this._groupMapper_0);\n }\n });\n GroupingContext.prototype.computeGroups_0 = function () {\n if (this.data_0.rowCount() === 0)\n return GroupUtil_getInstance().SINGLE_GROUP_8be2vx$;\n if (this.data_0.has_8xm3sj$(stat.Stats.GROUP)) {\n var list = this.data_0.getNumeric_8xm3sj$(stat.Stats.GROUP);\n return GroupUtil_getInstance().wrap_2wzaym$(list);\n } else if (this.groupSizeList_0 != null) {\n if (this.groupSizeList_0.size === this.data_0.rowCount()) {\n return GroupUtil_getInstance().SINGLE_GROUP_8be2vx$;\n } else {\n var groupByPointIndex = GroupingContext$Companion_getInstance().toIndexMap_0(this.groupSizeList_0);\n return GroupUtil_getInstance().wrap_orwq1h$(groupByPointIndex);\n }\n } else if (this.expectMultiple_0) {\n return DataProcessing_getInstance().computeGroups_ps74eq$(this.data_0, this.groupingVariables_0);\n }\n return GroupUtil_getInstance().SINGLE_GROUP_8be2vx$;\n };\n function GroupingContext$Companion() {\n GroupingContext$Companion_instance = this;\n }\n GroupingContext$Companion.prototype.withOrderedGroups_vi90cb$ = function (data, groupSizeList) {\n var groupingVariables = DataProcessing_getInstance().defaultGroupingVariables_39xr23$(data, emptyList(), null);\n return new GroupingContext(data, groupingVariables, null, false, ArrayList_init_1(groupSizeList));\n };\n GroupingContext$Companion.prototype.toIndexMap_0 = function (groupSizeList) {\n var tmp$;\n var result = HashMap_init();\n var currentGroup = 0;\n var currentGroupIndexOffset = 0;\n tmp$ = groupSizeList.iterator();\n while (tmp$.hasNext()) {\n var groupSize = tmp$.next();\n for (var i = 0; i < groupSize; i++) {\n var key = currentGroupIndexOffset + i | 0;\n var value = currentGroup;\n result.put_xwzc9p$(key, value);\n }\n currentGroup = currentGroup + 1 | 0;\n currentGroupIndexOffset = currentGroupIndexOffset + groupSize | 0;\n }\n return result;\n };\n GroupingContext$Companion.prototype.getGroupingVariables_0 = function (data, bindings, explicitGroupingVar) {\n var tmp$;\n var result = LinkedHashSet_init();\n tmp$ = bindings.iterator();\n while (tmp$.hasNext()) {\n var binding = tmp$.next();\n var variable = binding.variable;\n if (!result.contains_11rb$(variable)) {\n if (variable.isOrigin) {\n if (equals(variable, explicitGroupingVar) || this.isDefaultGroupingVariable_0(data, binding.aes, variable)) {\n result.add_11rb$(variable);\n }\n }\n }\n }\n return result;\n };\n GroupingContext$Companion.prototype.isDefaultGroupingVariable_0 = function (data, aes, variable) {\n return !(Aes.Companion.isPositional_896ixz$(aes) || data.isNumeric_8xm3sj$(variable));\n };\n GroupingContext$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var GroupingContext$Companion_instance = null;\n function GroupingContext$Companion_getInstance() {\n if (GroupingContext$Companion_instance === null) {\n new GroupingContext$Companion();\n }\n return GroupingContext$Companion_instance;\n }\n GroupingContext.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GroupingContext',\n interfaces: []\n };\n function OrderOptionUtil() {\n OrderOptionUtil_instance = this;\n }\n function OrderOptionUtil$OrderOption(variableName, byVariable, orderDir) {\n OrderOptionUtil$OrderOption$Companion_getInstance();\n this.variableName = variableName;\n this.byVariable = byVariable;\n this.orderDir_0 = orderDir;\n }\n OrderOptionUtil$OrderOption.prototype.getOrderDir = function () {\n var tmp$;\n return (tmp$ = this.orderDir_0) != null ? tmp$ : -1;\n };\n OrderOptionUtil$OrderOption.prototype.equals = function (other) {\n var tmp$, tmp$_0;\n if (this === other)\n return true;\n if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null))\n return false;\n Kotlin.isType(tmp$_0 = other, OrderOptionUtil$OrderOption) ? tmp$_0 : throwCCE();\n if (!equals(this.variableName, other.variableName))\n return false;\n if (!equals(this.byVariable, other.byVariable))\n return false;\n if (this.orderDir_0 != other.orderDir_0)\n return false;\n return true;\n };\n OrderOptionUtil$OrderOption.prototype.hashCode = function () {\n var tmp$, tmp$_0, tmp$_1;\n var result = hashCode(this.variableName);\n result = (31 * result | 0) + ((tmp$_0 = (tmp$ = this.byVariable) != null ? hashCode(tmp$) : null) != null ? tmp$_0 : 0) | 0;\n result = (31 * result | 0) + ((tmp$_1 = this.orderDir_0) != null ? tmp$_1 : 0) | 0;\n return result;\n };\n OrderOptionUtil$OrderOption.prototype.toString = function () {\n return \"OrderOption(variableName='\" + this.variableName + \"', byVariable=\" + toString(this.byVariable) + ', orderDir=' + toString(this.orderDir_0) + ')';\n };\n function OrderOptionUtil$OrderOption$Companion() {\n OrderOptionUtil$OrderOption$Companion_instance = this;\n }\n OrderOptionUtil$OrderOption$Companion.prototype.create_yyjhqb$ = function (variableName, orderBy, order) {\n var tmp$, tmp$_0;\n if (orderBy == null && order == null) {\n return null;\n }\n if (!(order == null || (Kotlin.isNumber(order) && listOf_0([-1, 1]).contains_11rb$(numberToInt(order))))) {\n var message = 'Unsupported `order` value: ' + toString(order) + '. Use 1 (ascending) or -1 (descending).';\n throw IllegalArgumentException_init(message.toString());\n }\n return new OrderOptionUtil$OrderOption(variableName, orderBy, (tmp$_0 = Kotlin.isNumber(tmp$ = order) ? tmp$ : null) != null ? numberToInt(tmp$_0) : null);\n };\n OrderOptionUtil$OrderOption$Companion.prototype.mergeWith_me9ya9$ = function ($receiver, other) {\n var tmp$, tmp$_0;\n if (!equals($receiver.variableName, other.variableName)) {\n var message = \"Can't merge order options for different variables: '\" + $receiver.variableName + \"' and '\" + other.variableName + \"'\";\n throw IllegalArgumentException_init(message.toString());\n }\n if (!($receiver.byVariable == null || other.byVariable == null || equals(other.byVariable, $receiver.byVariable))) {\n var message_0 = \"Multiple ordering options for the variable '\" + $receiver.variableName + \"' with different non-empty 'order_by' fields: '\" + toString($receiver.byVariable) + \"' and '\" + toString(other.byVariable) + \"'\";\n throw IllegalArgumentException_init(message_0.toString());\n }\n if (!($receiver.orderDir_0 == null || other.orderDir_0 == null || other.orderDir_0 == $receiver.orderDir_0)) {\n var message_1 = \"Multiple ordering options for the variable '\" + $receiver.variableName + \"' with different order direction: '\" + toString($receiver.orderDir_0) + \"' and '\" + toString(other.orderDir_0) + \"'\";\n throw IllegalArgumentException_init(message_1.toString());\n }\n return new OrderOptionUtil$OrderOption($receiver.variableName, (tmp$ = $receiver.byVariable) != null ? tmp$ : other.byVariable, (tmp$_0 = $receiver.orderDir_0) != null ? tmp$_0 : other.orderDir_0);\n };\n OrderOptionUtil$OrderOption$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var OrderOptionUtil$OrderOption$Companion_instance = null;\n function OrderOptionUtil$OrderOption$Companion_getInstance() {\n if (OrderOptionUtil$OrderOption$Companion_instance === null) {\n new OrderOptionUtil$OrderOption$Companion();\n }\n return OrderOptionUtil$OrderOption$Companion_instance;\n }\n OrderOptionUtil$OrderOption.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'OrderOption',\n interfaces: []\n };\n function OrderOptionUtil$createOrderSpec$getVariableByName(closure$variables) {\n return function (varName) {\n var tmp$;\n var tmp$_0;\n var $receiver = closure$variables;\n var firstOrNull$result;\n firstOrNull$break: do {\n var tmp$_1;\n tmp$_1 = $receiver.iterator();\n while (tmp$_1.hasNext()) {\n var element = tmp$_1.next();\n if (equals(element.name, varName)) {\n firstOrNull$result = element;\n break firstOrNull$break;\n }\n }\n firstOrNull$result = null;\n }\n while (false);\n if ((tmp$ = firstOrNull$result) != null)\n tmp$_0 = tmp$;\n else {\n var tmp$_2 = \"Undefined variable '\" + varName + \"' in order options. Full variable list: \";\n var $receiver_0 = closure$variables;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver_0, 10));\n var tmp$_3;\n tmp$_3 = $receiver_0.iterator();\n while (tmp$_3.hasNext()) {\n var item = tmp$_3.next();\n destination.add_11rb$(\"'\" + item.name + \"'\");\n }\n throw IllegalStateException_init((tmp$_2 + destination).toString());\n }\n return tmp$_0;\n };\n }\n OrderOptionUtil.prototype.createOrderSpec_e64h97$ = function (variables, varBindings, orderOption, aggregateOperation) {\n var tmp$, tmp$_0, tmp$_1;\n var getVariableByName = OrderOptionUtil$createOrderSpec$getVariableByName(variables);\n var firstOrNull$result;\n firstOrNull$break: do {\n var tmp$_2;\n tmp$_2 = varBindings.iterator();\n while (tmp$_2.hasNext()) {\n var element = tmp$_2.next();\n if (equals(element.variable.name, orderOption.variableName) && equals(element.aes, Aes.Companion.X)) {\n firstOrNull$result = element;\n break firstOrNull$break;\n }\n }\n firstOrNull$result = null;\n }\n while (false);\n if (firstOrNull$result != null && SamplingUtil_getInstance().xVar_bbyvt0$(variables) != null) {\n tmp$ = ensureNotNull(SamplingUtil_getInstance().xVar_bbyvt0$(variables));\n } else {\n tmp$ = getVariableByName(orderOption.variableName);\n }\n var variable = tmp$;\n return new DataFrame$OrderSpec(variable, (tmp$_1 = (tmp$_0 = orderOption.byVariable) != null ? getVariableByName(tmp$_0) : null) != null ? tmp$_1 : getVariableByName(orderOption.variableName), orderOption.getOrderDir(), orderOption.byVariable != null && !equals(orderOption.byVariable, orderOption.variableName) ? aggregateOperation : null);\n };\n OrderOptionUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'OrderOptionUtil',\n interfaces: []\n };\n var OrderOptionUtil_instance = null;\n function OrderOptionUtil_getInstance() {\n if (OrderOptionUtil_instance === null) {\n new OrderOptionUtil();\n }\n return OrderOptionUtil_instance;\n }\n function StatInput(data, bindings, transformByAes, statCtx, flipXY) {\n this.data = flipXY ? YOrientationUtil_getInstance().flipDataFrame_dhhkv7$(data) : data;\n this.bindings = flipXY ? YOrientationUtil_getInstance().flipVarBinding_gg2air$(bindings) : bindings;\n this.transformByAes = flipXY ? util.YOrientationBaseUtil.flipAesKeys_fzsz32$(transformByAes) : transformByAes;\n this.statCtx = flipXY ? statCtx.getFlipped() : statCtx;\n }\n StatInput.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'StatInput',\n interfaces: []\n };\n function YOrientationUtil() {\n YOrientationUtil_instance = this;\n }\n YOrientationUtil.prototype.flipDataFrame_dhhkv7$ = function (data_0) {\n var tmp$, tmp$_0;\n var $receiver = data_0.variables();\n var destination = ArrayList_init();\n var tmp$_1;\n tmp$_1 = $receiver.iterator();\n while (tmp$_1.hasNext()) {\n var element = tmp$_1.next();\n if (element.isTransform)\n destination.add_11rb$(element);\n }\n var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(destination, 10)), 16);\n var destination_0 = LinkedHashMap_init_0(capacity);\n var tmp$_2;\n tmp$_2 = destination.iterator();\n while (tmp$_2.hasNext()) {\n var element_0 = tmp$_2.next();\n destination_0.put_xwzc9p$(data.TransformVar.toAes_8xm3sj$(element_0), element_0);\n }\n var tmp$_3;\n var result = LinkedHashMap_init();\n tmp$_3 = destination_0.entries.iterator();\n while (tmp$_3.hasNext()) {\n var entry = tmp$_3.next();\n var it = entry.key;\n if (Aes.Companion.isPositionalXY_896ixz$(it)) {\n result.put_xwzc9p$(entry.key, entry.value);\n }\n }\n var positionalTransformVars = result.values;\n var toDataBuilder = data_0.builder();\n tmp$ = positionalTransformVars.iterator();\n while (tmp$.hasNext()) {\n var transformVar = tmp$.next();\n toDataBuilder.remove_8xm3sj$(transformVar);\n }\n tmp$_0 = positionalTransformVars.iterator();\n while (tmp$_0.hasNext()) {\n var transformVar_0 = tmp$_0.next();\n var aes = data.TransformVar.toAes_8xm3sj$(transformVar_0);\n var flippedAes = util.YOrientationBaseUtil.flipAes_31786j$(aes);\n var toVar = data.TransformVar.forAes_896ixz$(flippedAes);\n var serie = data_0.getNumeric_8xm3sj$(transformVar_0);\n toDataBuilder.putNumeric_s1rqo9$(toVar, serie);\n }\n return toDataBuilder.build();\n };\n YOrientationUtil.prototype.flipVarBinding_gg2air$ = function (bindings) {\n var destination = ArrayList_init_0(collectionSizeOrDefault(bindings, 10));\n var tmp$;\n tmp$ = bindings.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n var tmp$_0 = destination.add_11rb$;\n var transform$result;\n if (Aes.Companion.isPositionalXY_896ixz$(item.aes)) {\n var flippedAes = util.YOrientationBaseUtil.flipAes_31786j$(item.aes);\n transform$result = new VarBinding(item.variable, flippedAes);\n } else {\n transform$result = item;\n }\n tmp$_0.call(destination, transform$result);\n }\n return destination;\n };\n YOrientationUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'YOrientationUtil',\n interfaces: []\n };\n var YOrientationUtil_instance = null;\n function YOrientationUtil_getInstance() {\n if (YOrientationUtil_instance === null) {\n new YOrientationUtil();\n }\n return YOrientationUtil_instance;\n }\n function DefaultAxisTheme(axis, options, fontFamilyRegistry) {\n ThemeValuesAccess.call(this, options, fontFamilyRegistry);\n this.axis_k6gqr6$_0 = axis;\n this.suffix_0 = '_' + this.axis;\n this.ontopKey_8be2vx$ = listOf_0([ThemeOption_getInstance().AXIS_ONTOP + this.suffix_0, ThemeOption_getInstance().AXIS_ONTOP]);\n this.lineKey_8be2vx$ = listOf_0([ThemeOption_getInstance().AXIS_LINE + this.suffix_0, ThemeOption_getInstance().AXIS_LINE, ThemeOption_getInstance().AXIS + this.suffix_0, ThemeOption_getInstance().AXIS, ThemeOption_getInstance().LINE]);\n this.textKey_8be2vx$ = listOf_0([ThemeOption_getInstance().AXIS_TEXT + this.suffix_0, ThemeOption_getInstance().AXIS_TEXT, ThemeOption_getInstance().TEXT, ThemeOption_getInstance().AXIS + this.suffix_0, ThemeOption_getInstance().AXIS]);\n this.titleKey_8be2vx$ = listOf_0([ThemeOption_getInstance().AXIS_TITLE + this.suffix_0, ThemeOption_getInstance().AXIS_TITLE, ThemeOption_getInstance().TITLE, ThemeOption_getInstance().TEXT, ThemeOption_getInstance().AXIS + this.suffix_0, ThemeOption_getInstance().AXIS]);\n this.tickKey_8be2vx$ = listOf_0([ThemeOption_getInstance().AXIS_TICKS + this.suffix_0, ThemeOption_getInstance().AXIS_TICKS, ThemeOption_getInstance().AXIS + this.suffix_0, ThemeOption_getInstance().AXIS, ThemeOption_getInstance().LINE]);\n this.tickLengthKey_8be2vx$ = listOf_0([ThemeOption_getInstance().AXIS_TICKS_LENGTH + this.suffix_0, ThemeOption_getInstance().AXIS_TICKS_LENGTH]);\n this.tooltipKey_8be2vx$ = listOf_0([ThemeOption_getInstance().AXIS_TOOLTIP + this.suffix_0, ThemeOption_getInstance().AXIS_TOOLTIP, ThemeOption_getInstance().RECT]);\n this.tooltipFillKey_8be2vx$ = plus(this.tooltipKey_8be2vx$, this.lineKey_8be2vx$);\n this.tooltipTextKey_8be2vx$ = listOf_0([ThemeOption_getInstance().AXIS_TOOLTIP_TEXT + this.suffix_0, ThemeOption_getInstance().AXIS_TOOLTIP_TEXT, ThemeOption_getInstance().TOOLTIP_TEXT, ThemeOption_getInstance().TEXT]);\n this.tooltipTextColorKey_8be2vx$ = plus(minus(this.tooltipTextKey_8be2vx$, ThemeOption_getInstance().TEXT), this.tooltipKey_8be2vx$);\n }\n Object.defineProperty(DefaultAxisTheme.prototype, 'axis', {\n get: function () {\n return this.axis_k6gqr6$_0;\n }\n });\n DefaultAxisTheme.prototype.isOntop = function () {\n return this.getBoolean_0(this.ontopKey_8be2vx$);\n };\n DefaultAxisTheme.prototype.showLine = function () {\n return !this.isElemBlank_0(this.lineKey_8be2vx$);\n };\n DefaultAxisTheme.prototype.showTickMarks = function () {\n return !this.isElemBlank_0(this.tickKey_8be2vx$);\n };\n DefaultAxisTheme.prototype.showLabels = function () {\n return !this.isElemBlank_0(this.textKey_8be2vx$);\n };\n DefaultAxisTheme.prototype.showTitle = function () {\n return !this.isElemBlank_0(this.titleKey_8be2vx$);\n };\n DefaultAxisTheme.prototype.showTooltip = function () {\n return !this.isElemBlank_0(this.tooltipKey_8be2vx$);\n };\n DefaultAxisTheme.prototype.titleStyle = function () {\n return this.getTextStyle_0(this.getElemValue_0(this.titleKey_8be2vx$));\n };\n DefaultAxisTheme.prototype.titleJustification = function () {\n return this.getTextJustification_0(this.getElemValue_0(this.titleKey_8be2vx$));\n };\n DefaultAxisTheme.prototype.titleMargins = function () {\n return this.getMargins_0(this.getElemValue_0(this.titleKey_8be2vx$));\n };\n DefaultAxisTheme.prototype.lineWidth = function () {\n return this.getNumber_0(this.getElemValue_0(this.lineKey_8be2vx$), ThemeOption$Elem_getInstance().SIZE);\n };\n DefaultAxisTheme.prototype.lineColor = function () {\n return this.getColor_0(this.getElemValue_0(this.lineKey_8be2vx$), ThemeOption$Elem_getInstance().COLOR);\n };\n DefaultAxisTheme.prototype.tickMarkWidth = function () {\n return this.getNumber_0(this.getElemValue_0(this.tickKey_8be2vx$), ThemeOption$Elem_getInstance().SIZE);\n };\n DefaultAxisTheme.prototype.tickMarkLength = function () {\n return this.getNumber_1(this.tickLengthKey_8be2vx$);\n };\n DefaultAxisTheme.prototype.tickMarkColor = function () {\n return this.getColor_0(this.getElemValue_0(this.tickKey_8be2vx$), ThemeOption$Elem_getInstance().COLOR);\n };\n DefaultAxisTheme.prototype.tickLabelMargins = function () {\n return this.getMargins_0(this.getElemValue_0(this.textKey_8be2vx$));\n };\n DefaultAxisTheme.prototype.labelStyle = function () {\n return this.getTextStyle_0(this.getElemValue_0(this.textKey_8be2vx$));\n };\n DefaultAxisTheme.prototype.tooltipFill = function () {\n return this.getColor_0(this.getElemValue_0(this.tooltipFillKey_8be2vx$), ThemeOption$Elem_getInstance().FILL);\n };\n DefaultAxisTheme.prototype.tooltipColor = function () {\n return this.getColor_0(this.getElemValue_0(this.tooltipKey_8be2vx$), ThemeOption$Elem_getInstance().COLOR);\n };\n DefaultAxisTheme.prototype.tooltipStrokeWidth = function () {\n return this.getNumber_0(this.getElemValue_0(this.tooltipKey_8be2vx$), ThemeOption$Elem_getInstance().SIZE);\n };\n DefaultAxisTheme.prototype.tooltipTextStyle = function () {\n var tooltipTextColor = this.getColor_0(this.getElemValue_0(this.tooltipTextColorKey_8be2vx$), ThemeOption$Elem_getInstance().COLOR);\n var textStyle = this.getTextStyle_0(this.getElemValue_0(this.tooltipTextKey_8be2vx$));\n return textStyle.copy_y7dxx7$(void 0, void 0, void 0, tooltipTextColor);\n };\n DefaultAxisTheme.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'DefaultAxisTheme',\n interfaces: [AxisTheme, ThemeValuesAccess]\n };\n function DefaultFacetsTheme(options, fontFamilyRegistry) {\n ThemeValuesAccess.call(this, options, fontFamilyRegistry);\n this.rectKey_8be2vx$ = listOf_0([ThemeOption_getInstance().FACET_STRIP_BGR_RECT, ThemeOption_getInstance().RECT]);\n this.textKey_8be2vx$ = listOf_0([ThemeOption_getInstance().FACET_STRIP_TEXT, ThemeOption_getInstance().TEXT]);\n }\n DefaultFacetsTheme.prototype.showStrip = function () {\n return !this.isElemBlank_0(this.textKey_8be2vx$);\n };\n DefaultFacetsTheme.prototype.showStripBackground = function () {\n return this.showStrip() && !this.isElemBlank_0(this.rectKey_8be2vx$);\n };\n DefaultFacetsTheme.prototype.stripFill = function () {\n return this.getColor_0(this.getElemValue_0(this.rectKey_8be2vx$), ThemeOption$Elem_getInstance().FILL);\n };\n DefaultFacetsTheme.prototype.stripColor = function () {\n return this.getColor_0(this.getElemValue_0(this.rectKey_8be2vx$), ThemeOption$Elem_getInstance().COLOR);\n };\n DefaultFacetsTheme.prototype.stripStrokeWidth = function () {\n return this.getNumber_0(this.getElemValue_0(this.rectKey_8be2vx$), ThemeOption$Elem_getInstance().SIZE);\n };\n DefaultFacetsTheme.prototype.stripTextStyle = function () {\n return this.getTextStyle_0(this.getElemValue_0(this.textKey_8be2vx$));\n };\n DefaultFacetsTheme.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'DefaultFacetsTheme',\n interfaces: [FacetsTheme, ThemeValuesAccess]\n };\n function DefaultLegendTheme(options, fontFamilyRegistry) {\n ThemeValuesAccess.call(this, options, fontFamilyRegistry);\n this.backgroundKey_8be2vx$ = listOf_0([ThemeOption_getInstance().LEGEND_BKGR_RECT, ThemeOption_getInstance().RECT]);\n this.titleKey_8be2vx$ = listOf_0([ThemeOption_getInstance().LEGEND_TITLE, ThemeOption_getInstance().TITLE, ThemeOption_getInstance().TEXT]);\n this.textKey_8be2vx$ = listOf_0([ThemeOption_getInstance().LEGEND_TEXT, ThemeOption_getInstance().TEXT]);\n }\n DefaultLegendTheme.prototype.keySize = function () {\n return 23.0;\n };\n DefaultLegendTheme.prototype.margin = function () {\n return 5.0;\n };\n DefaultLegendTheme.prototype.padding = function () {\n return 5.0;\n };\n DefaultLegendTheme.prototype.position = function () {\n var tmp$;\n return Kotlin.isType(tmp$ = this.getValue_0(ThemeOption_getInstance().LEGEND_POSITION), LegendPosition) ? tmp$ : throwCCE();\n };\n DefaultLegendTheme.prototype.justification = function () {\n var tmp$;\n return Kotlin.isType(tmp$ = this.getValue_0(ThemeOption_getInstance().LEGEND_JUSTIFICATION), LegendJustification) ? tmp$ : throwCCE();\n };\n DefaultLegendTheme.prototype.direction = function () {\n var tmp$;\n return Kotlin.isType(tmp$ = this.getValue_0(ThemeOption_getInstance().LEGEND_DIRECTION), LegendDirection) ? tmp$ : throwCCE();\n };\n DefaultLegendTheme.prototype.showTitle = function () {\n return !this.isElemBlank_0(this.titleKey_8be2vx$);\n };\n DefaultLegendTheme.prototype.titleStyle = function () {\n return this.getTextStyle_0(this.getElemValue_0(this.titleKey_8be2vx$));\n };\n DefaultLegendTheme.prototype.titleJustification = function () {\n return this.getTextJustification_0(this.getElemValue_0(this.titleKey_8be2vx$));\n };\n DefaultLegendTheme.prototype.textStyle = function () {\n return this.getTextStyle_0(this.getElemValue_0(this.textKey_8be2vx$));\n };\n DefaultLegendTheme.prototype.showBackground = function () {\n return !this.isElemBlank_0(this.backgroundKey_8be2vx$);\n };\n DefaultLegendTheme.prototype.backgroundColor = function () {\n return this.getColor_0(this.getElemValue_0(this.backgroundKey_8be2vx$), ThemeOption$Elem_getInstance().COLOR);\n };\n DefaultLegendTheme.prototype.backgroundFill = function () {\n return this.getColor_0(this.getElemValue_0(this.backgroundKey_8be2vx$), ThemeOption$Elem_getInstance().FILL);\n };\n DefaultLegendTheme.prototype.backgroundStrokeWidth = function () {\n return this.getNumber_0(this.getElemValue_0(this.backgroundKey_8be2vx$), ThemeOption$Elem_getInstance().SIZE);\n };\n DefaultLegendTheme.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'DefaultLegendTheme',\n interfaces: [LegendTheme, ThemeValuesAccess]\n };\n function DefaultPanelGridTheme(axis, options, fontFamilyRegistry) {\n ThemeValuesAccess.call(this, options, fontFamilyRegistry);\n this.suffix_0 = '_' + axis;\n this.majorLineKey_8be2vx$ = listOf_0([ThemeOption_getInstance().PANEL_GRID_MAJOR + this.suffix_0, ThemeOption_getInstance().PANEL_GRID_MAJOR, ThemeOption_getInstance().PANEL_GRID + this.suffix_0, ThemeOption_getInstance().PANEL_GRID, ThemeOption_getInstance().LINE]);\n this.minorLineKey_8be2vx$ = listOf_0([ThemeOption_getInstance().PANEL_GRID_MINOR + this.suffix_0, ThemeOption_getInstance().PANEL_GRID_MINOR, ThemeOption_getInstance().PANEL_GRID + this.suffix_0, ThemeOption_getInstance().PANEL_GRID, ThemeOption_getInstance().LINE]);\n }\n DefaultPanelGridTheme.prototype.showMajor = function () {\n return !this.isElemBlank_0(this.majorLineKey_8be2vx$);\n };\n DefaultPanelGridTheme.prototype.showMinor = function () {\n return !this.isElemBlank_0(this.minorLineKey_8be2vx$);\n };\n DefaultPanelGridTheme.prototype.majorLineWidth = function () {\n return this.getNumber_0(this.getElemValue_0(this.majorLineKey_8be2vx$), ThemeOption$Elem_getInstance().SIZE);\n };\n DefaultPanelGridTheme.prototype.minorLineWidth = function () {\n return this.getNumber_0(this.getElemValue_0(this.minorLineKey_8be2vx$), ThemeOption$Elem_getInstance().SIZE);\n };\n DefaultPanelGridTheme.prototype.majorLineColor = function () {\n return this.getColor_0(this.getElemValue_0(this.majorLineKey_8be2vx$), ThemeOption$Elem_getInstance().COLOR);\n };\n DefaultPanelGridTheme.prototype.minorLineColor = function () {\n return this.getColor_0(this.getElemValue_0(this.minorLineKey_8be2vx$), ThemeOption$Elem_getInstance().COLOR);\n };\n DefaultPanelGridTheme.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'DefaultPanelGridTheme',\n interfaces: [PanelGridTheme, ThemeValuesAccess]\n };\n function DefaultPanelTheme(options, fontFamilyRegistry) {\n ThemeValuesAccess.call(this, options, fontFamilyRegistry);\n this.gridX_0 = new DefaultPanelGridTheme('x', options, fontFamilyRegistry);\n this.gridY_0 = new DefaultPanelGridTheme('y', options, fontFamilyRegistry);\n this.rectKey_8be2vx$ = listOf_0([ThemeOption_getInstance().PANEL_BKGR_RECT, ThemeOption_getInstance().RECT]);\n this.borderKey_8be2vx$ = listOf_0([ThemeOption_getInstance().PANEL_BORDER_RECT, ThemeOption_getInstance().RECT]);\n }\n DefaultPanelTheme.prototype.showRect = function () {\n return !this.isElemBlank_0(this.rectKey_8be2vx$);\n };\n DefaultPanelTheme.prototype.rectColor = function () {\n return this.getColor_0(this.getElemValue_0(this.rectKey_8be2vx$), ThemeOption$Elem_getInstance().COLOR);\n };\n DefaultPanelTheme.prototype.rectFill = function () {\n return this.getColor_0(this.getElemValue_0(this.rectKey_8be2vx$), ThemeOption$Elem_getInstance().FILL);\n };\n DefaultPanelTheme.prototype.rectStrokeWidth = function () {\n return this.getNumber_0(this.getElemValue_0(this.rectKey_8be2vx$), ThemeOption$Elem_getInstance().SIZE);\n };\n DefaultPanelTheme.prototype.showBorder = function () {\n return !this.isElemBlank_0(this.borderKey_8be2vx$);\n };\n DefaultPanelTheme.prototype.borderColor = function () {\n return this.getColor_0(this.getElemValue_0(this.borderKey_8be2vx$), ThemeOption$Elem_getInstance().COLOR);\n };\n DefaultPanelTheme.prototype.borderWidth = function () {\n return this.getNumber_0(this.getElemValue_0(this.borderKey_8be2vx$), ThemeOption$Elem_getInstance().SIZE);\n };\n DefaultPanelTheme.prototype.gridX_6taknv$$default = function (flipAxis) {\n return flipAxis ? this.gridY_0 : this.gridX_0;\n };\n DefaultPanelTheme.prototype.gridY_6taknv$$default = function (flipAxis) {\n return flipAxis ? this.gridX_0 : this.gridY_0;\n };\n DefaultPanelTheme.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'DefaultPanelTheme',\n interfaces: [PanelTheme, ThemeValuesAccess]\n };\n function DefaultPlotTheme(options, fontFamilyRegistry) {\n ThemeValuesAccess.call(this, options, fontFamilyRegistry);\n this.backgroundKey_8be2vx$ = listOf_0([ThemeOption_getInstance().PLOT_BKGR_RECT, ThemeOption_getInstance().RECT]);\n this.titleKey_8be2vx$ = listOf_0([ThemeOption_getInstance().PLOT_TITLE, ThemeOption_getInstance().TITLE, ThemeOption_getInstance().TEXT]);\n this.subtitleKey_8be2vx$ = listOf_0([ThemeOption_getInstance().PLOT_SUBTITLE, ThemeOption_getInstance().TITLE, ThemeOption_getInstance().TEXT]);\n this.captionKey_8be2vx$ = listOf_0([ThemeOption_getInstance().PLOT_CAPTION, ThemeOption_getInstance().TITLE, ThemeOption_getInstance().TEXT]);\n }\n DefaultPlotTheme.prototype.showBackground = function () {\n return !this.isElemBlank_0(this.backgroundKey_8be2vx$);\n };\n DefaultPlotTheme.prototype.backgroundColor = function () {\n return this.getColor_0(this.getElemValue_0(this.backgroundKey_8be2vx$), ThemeOption$Elem_getInstance().COLOR);\n };\n DefaultPlotTheme.prototype.backgroundFill = function () {\n return this.getColor_0(this.getElemValue_0(this.backgroundKey_8be2vx$), ThemeOption$Elem_getInstance().FILL);\n };\n DefaultPlotTheme.prototype.backgroundStrokeWidth = function () {\n return this.getNumber_0(this.getElemValue_0(this.backgroundKey_8be2vx$), ThemeOption$Elem_getInstance().SIZE);\n };\n DefaultPlotTheme.prototype.titleStyle = function () {\n return this.getTextStyle_0(this.getElemValue_0(this.titleKey_8be2vx$));\n };\n DefaultPlotTheme.prototype.subtitleStyle = function () {\n return this.getTextStyle_0(this.getElemValue_0(this.subtitleKey_8be2vx$));\n };\n DefaultPlotTheme.prototype.captionStyle = function () {\n return this.getTextStyle_0(this.getElemValue_0(this.captionKey_8be2vx$));\n };\n DefaultPlotTheme.prototype.textColor = function () {\n return this.getColor_0(this.getElemValue_0(listOf(ThemeOption_getInstance().TEXT)), ThemeOption$Elem_getInstance().COLOR);\n };\n DefaultPlotTheme.prototype.textStyle = function () {\n return this.getTextStyle_0(this.getElemValue_0(listOf(ThemeOption_getInstance().TEXT)));\n };\n DefaultPlotTheme.prototype.titleJustification = function () {\n return this.getTextJustification_0(this.getElemValue_0(this.titleKey_8be2vx$));\n };\n DefaultPlotTheme.prototype.subtitleJustification = function () {\n return this.getTextJustification_0(this.getElemValue_0(this.subtitleKey_8be2vx$));\n };\n DefaultPlotTheme.prototype.captionJustification = function () {\n return this.getTextJustification_0(this.getElemValue_0(this.captionKey_8be2vx$));\n };\n DefaultPlotTheme.prototype.titleMargins = function () {\n return this.getMargins_0(this.getElemValue_0(this.titleKey_8be2vx$));\n };\n DefaultPlotTheme.prototype.subtitleMargins = function () {\n return this.getMargins_0(this.getElemValue_0(this.subtitleKey_8be2vx$));\n };\n DefaultPlotTheme.prototype.captionMargins = function () {\n return this.getMargins_0(this.getElemValue_0(this.captionKey_8be2vx$));\n };\n DefaultPlotTheme.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'DefaultPlotTheme',\n interfaces: [PlotTheme, ThemeValuesAccess]\n };\n function DefaultTheme(options, fontFamilyRegistry) {\n DefaultTheme$Companion_getInstance();\n if (fontFamilyRegistry === void 0)\n fontFamilyRegistry = new DefaultFontFamilyRegistry();\n this.options_0 = options;\n this.axisX_0 = new DefaultAxisTheme('x', this.options_0, fontFamilyRegistry);\n this.axisY_0 = new DefaultAxisTheme('y', this.options_0, fontFamilyRegistry);\n this.legend_0 = new DefaultLegendTheme(this.options_0, fontFamilyRegistry);\n this.panel_0 = new DefaultPanelTheme(this.options_0, fontFamilyRegistry);\n this.facets_0 = new DefaultFacetsTheme(this.options_0, fontFamilyRegistry);\n this.plot_0 = new DefaultPlotTheme(this.options_0, fontFamilyRegistry);\n this.tooltips_0 = new DefaultTooltipsTheme(this.options_0, fontFamilyRegistry);\n }\n DefaultTheme.prototype.horizontalAxis_6taknv$ = function (flipAxis) {\n return flipAxis ? this.axisY_0 : this.axisX_0;\n };\n DefaultTheme.prototype.verticalAxis_6taknv$ = function (flipAxis) {\n return flipAxis ? this.axisX_0 : this.axisY_0;\n };\n DefaultTheme.prototype.legend = function () {\n return this.legend_0;\n };\n DefaultTheme.prototype.panel = function () {\n return this.panel_0;\n };\n DefaultTheme.prototype.facets = function () {\n return this.facets_0;\n };\n DefaultTheme.prototype.plot = function () {\n return this.plot_0;\n };\n DefaultTheme.prototype.tooltips = function () {\n return this.tooltips_0;\n };\n function DefaultTheme$Companion() {\n DefaultTheme$Companion_instance = this;\n }\n DefaultTheme$Companion.prototype.minimal2 = function () {\n return new DefaultTheme((new ThemeValuesLPMinimal2()).values);\n };\n DefaultTheme$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var DefaultTheme$Companion_instance = null;\n function DefaultTheme$Companion_getInstance() {\n if (DefaultTheme$Companion_instance === null) {\n new DefaultTheme$Companion();\n }\n return DefaultTheme$Companion_instance;\n }\n DefaultTheme.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'DefaultTheme',\n interfaces: [Theme]\n };\n function DefaultTooltipsTheme(options, fontFamilyRegistry) {\n ThemeValuesAccess.call(this, options, fontFamilyRegistry);\n this.tooltipKey_8be2vx$ = listOf_0([ThemeOption_getInstance().TOOLTIP_RECT, ThemeOption_getInstance().RECT]);\n this.textKey_8be2vx$ = listOf_0([ThemeOption_getInstance().TOOLTIP_TEXT, ThemeOption_getInstance().TEXT]);\n this.titleTextKey_8be2vx$ = listOf_0([ThemeOption_getInstance().TOOLTIP_TITLE_TEXT, ThemeOption_getInstance().TOOLTIP_TEXT, ThemeOption_getInstance().TEXT]);\n }\n DefaultTooltipsTheme.prototype.tooltipColor = function () {\n return this.getColor_0(this.getElemValue_0(this.tooltipKey_8be2vx$), ThemeOption$Elem_getInstance().COLOR);\n };\n DefaultTooltipsTheme.prototype.tooltipFill = function () {\n return this.getColor_0(this.getElemValue_0(this.tooltipKey_8be2vx$), ThemeOption$Elem_getInstance().FILL);\n };\n DefaultTooltipsTheme.prototype.tooltipStrokeWidth = function () {\n return this.getNumber_0(this.getElemValue_0(this.tooltipKey_8be2vx$), ThemeOption$Elem_getInstance().SIZE);\n };\n DefaultTooltipsTheme.prototype.textStyle = function () {\n return this.getTextStyle_0(this.getElemValue_0(this.textKey_8be2vx$));\n };\n DefaultTooltipsTheme.prototype.titleStyle = function () {\n var titleStyle = this.getTextStyle_0(this.getElemValue_0(this.titleTextKey_8be2vx$));\n var textFontFace = this.getFontFace_0(this.getElemValue_0(this.textKey_8be2vx$));\n return titleStyle.copy_y7dxx7$(void 0, titleStyle.face.plus_j9uppr$(textFontFace));\n };\n DefaultTooltipsTheme.prototype.labelStyle = function () {\n var $receiver = this.textStyle();\n return new ThemeTextStyle($receiver.family, FontFace.Companion.BOLD.plus_j9uppr$($receiver.face), $receiver.size, $receiver.color);\n };\n DefaultTooltipsTheme.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'DefaultTooltipsTheme',\n interfaces: [TooltipsTheme, ThemeValuesAccess]\n };\n function ThemeFlavor(fill, color, specialColors) {\n ThemeFlavor$Companion_getInstance();\n if (specialColors === void 0)\n specialColors = emptyMap();\n this.fill_0 = fill;\n this.color_0 = color;\n this.specialColors_0 = specialColors;\n }\n function ThemeFlavor$updateColors$chooseNewColor(closure$plotBackgroundColor, this$ThemeFlavor) {\n return function (elementName, elementColor, isFillColor) {\n var tmp$, tmp$_0;\n if (equals(elementColor, closure$plotBackgroundColor)) {\n return this$ThemeFlavor.fill_0;\n }\n return (tmp$_0 = (tmp$ = this$ThemeFlavor.specialColors_0.get_11rb$(elementName)) != null ? tmp$.get_11rb$(isFillColor ? ThemeOption$Elem_getInstance().FILL : ThemeOption$Elem_getInstance().COLOR) : null) != null ? tmp$_0 : isFillColor ? this$ThemeFlavor.fill_0 : this$ThemeFlavor.color_0;\n };\n }\n ThemeFlavor.prototype.updateColors_x7u0o8$ = function (options) {\n var tmp$;\n var tmp$_0;\n if ((tmp$ = options.get_11rb$(ThemeOption_getInstance().PLOT_BKGR_RECT)) != null) {\n var tmp$_1;\n if (Kotlin.isType(tmp$, Map)) {\n var key = ThemeOption$Elem_getInstance().FILL;\n var tmp$_2;\n tmp$_1 = (Kotlin.isType(tmp$_2 = tmp$, Map) ? tmp$_2 : throwCCE()).get_11rb$(key);\n } else\n tmp$_1 = null;\n tmp$_0 = tmp$_1;\n } else\n tmp$_0 = null;\n var plotBackgroundColor = tmp$_0;\n var chooseNewColor = ThemeFlavor$updateColors$chooseNewColor(plotBackgroundColor, this);\n var destination = LinkedHashMap_init_0(mapCapacity(options.size));\n var tmp$_3;\n tmp$_3 = options.entries.iterator();\n while (tmp$_3.hasNext()) {\n var element = tmp$_3.next();\n var tmp$_4 = destination.put_xwzc9p$;\n var tmp$_5 = element.key;\n var transform$result;\n var key_0 = element.key;\n var value = element.value;\n var tmp$_6, tmp$_7;\n if (Kotlin.isType(value, Map)) {\n var updated = toMutableMap(value);\n if (ThemeFlavor$Companion_getInstance().ELEM_TO_UPDATE_COLOR_0.contains_11rb$(key_0)) {\n var tmp$_8 = ThemeOption$Elem_getInstance().COLOR;\n var key_1 = ThemeOption$Elem_getInstance().COLOR;\n var tmp$_9;\n var value_0 = chooseNewColor(key_0, (Kotlin.isType(tmp$_9 = value, Map) ? tmp$_9 : throwCCE()).get_11rb$(key_1), false);\n updated.put_xwzc9p$(tmp$_8, value_0);\n }\n if (ThemeFlavor$Companion_getInstance().ELEM_TO_UPDATE_FILL_0.contains_11rb$(key_0)) {\n var tmp$_10 = ThemeOption$Elem_getInstance().FILL;\n var key_2 = ThemeOption$Elem_getInstance().FILL;\n var tmp$_11;\n var value_1 = chooseNewColor(key_0, (Kotlin.isType(tmp$_11 = value, Map) ? tmp$_11 : throwCCE()).get_11rb$(key_2), true);\n updated.put_xwzc9p$(tmp$_10, value_1);\n }\n if (equals(key_0, ThemeOption_getInstance().TOOLTIP_RECT)) {\n if ((tmp$_7 = (tmp$_6 = this.specialColors_0.get_11rb$(key_0)) != null ? tmp$_6.get_11rb$(ThemeOption$Elem_getInstance().FILL) : null) != null) {\n var key_3 = ThemeOption$Elem_getInstance().FILL;\n updated.put_xwzc9p$(key_3, tmp$_7);\n }\n }\n transform$result = updated;\n } else {\n transform$result = value;\n }\n tmp$_4.call(destination, tmp$_5, transform$result);\n }\n return destination;\n };\n function ThemeFlavor$Companion() {\n ThemeFlavor$Companion_instance = this;\n this.ELEM_TO_UPDATE_COLOR_0 = listOf_0([ThemeOption_getInstance().LINE, ThemeOption_getInstance().RECT, ThemeOption_getInstance().PANEL_GRID, ThemeOption_getInstance().PANEL_BKGR_RECT, ThemeOption_getInstance().PANEL_BORDER_RECT, ThemeOption_getInstance().FACET_STRIP_BGR_RECT, ThemeOption_getInstance().AXIS, ThemeOption_getInstance().AXIS_TOOLTIP, ThemeOption_getInstance().TOOLTIP_RECT, ThemeOption_getInstance().TEXT, ThemeOption_getInstance().TITLE]);\n this.ELEM_TO_UPDATE_FILL_0 = listOf_0([ThemeOption_getInstance().RECT, ThemeOption_getInstance().PLOT_BKGR_RECT, ThemeOption_getInstance().PANEL_BKGR_RECT, ThemeOption_getInstance().FACET_STRIP_BGR_RECT, ThemeOption_getInstance().LEGEND_BKGR_RECT, ThemeOption_getInstance().AXIS_TOOLTIP, ThemeOption_getInstance().TOOLTIP_RECT]);\n }\n ThemeFlavor$Companion.prototype.forName_61zpoe$ = function (flavor) {\n var tmp$;\n switch (flavor) {\n case 'darcula':\n tmp$ = new ThemeFlavor(Color.Companion.parseHex_61zpoe$('#303030'), Color.Companion.parseHex_61zpoe$('#BBBBBB'), mapOf([to(ThemeOption_getInstance().PANEL_BKGR_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#3B3B3B')))), to(ThemeOption_getInstance().FACET_STRIP_BGR_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#363636')))), to(ThemeOption_getInstance().PANEL_GRID, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, Color.Companion.parseHex_61zpoe$('#474747')))), to(ThemeOption_getInstance().TOOLTIP_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#141414')))), to(ThemeOption_getInstance().AXIS_TOOLTIP, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#BBBBBB'))))]));\n break;\n case 'solarized_light':\n tmp$ = new ThemeFlavor(Color.Companion.parseHex_61zpoe$('#FDF6E3'), Color.Companion.parseHex_61zpoe$('#2E4E58'), mapOf([to(ThemeOption_getInstance().PANEL_BKGR_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#EEE8D5')))), to(ThemeOption_getInstance().FACET_STRIP_BGR_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#E6DFCA')))), to(ThemeOption_getInstance().PANEL_GRID, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, Color.Companion.parseHex_61zpoe$('#D7D4CB')))), to(ThemeOption_getInstance().TOOLTIP_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#FEFBF3')))), to(ThemeOption_getInstance().AXIS_TOOLTIP, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#2E4E58'))))]));\n break;\n case 'solarized_dark':\n tmp$ = new ThemeFlavor(Color.Companion.parseHex_61zpoe$('#0E3C4A'), Color.Companion.parseHex_61zpoe$('#A7B6BA'), mapOf([to(ThemeOption_getInstance().PANEL_BKGR_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#1B4854')))), to(ThemeOption_getInstance().FACET_STRIP_BGR_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#1F4650')))), to(ThemeOption_getInstance().PANEL_GRID, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, Color.Companion.parseHex_61zpoe$('#455458')))), to(ThemeOption_getInstance().TOOLTIP_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#0B2F3A')))), to(ThemeOption_getInstance().AXIS_TOOLTIP, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#A7B6BA'))))]));\n break;\n case 'high_contrast_light':\n tmp$ = new ThemeFlavor(Color.Companion.WHITE, Color.Companion.BLACK, mapOf([to(ThemeOption_getInstance().PANEL_BKGR_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#EBEBEB')))), to(ThemeOption_getInstance().FACET_STRIP_BGR_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#D9D9D9')))), to(ThemeOption_getInstance().PANEL_GRID, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, Color.Companion.parseHex_61zpoe$('#E9E9E9')))), to(ThemeOption_getInstance().TOOLTIP_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.WHITE))), to(ThemeOption_getInstance().AXIS_TOOLTIP, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.BLACK)))]));\n break;\n case 'high_contrast_dark':\n tmp$ = new ThemeFlavor(Color.Companion.BLACK, Color.Companion.WHITE, mapOf([to(ThemeOption_getInstance().PANEL_BKGR_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#3B3B3B')))), to(ThemeOption_getInstance().FACET_STRIP_BGR_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#363636')))), to(ThemeOption_getInstance().PANEL_GRID, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, Color.Companion.parseHex_61zpoe$('#474747')))), to(ThemeOption_getInstance().TOOLTIP_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#460073')))), to(ThemeOption_getInstance().AXIS_TOOLTIP, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.WHITE)))]));\n break;\n default:\n throw IllegalArgumentException_init(\"Unsupported theme flavor: '\" + flavor + \"'\");\n }\n return tmp$;\n };\n ThemeFlavor$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ThemeFlavor$Companion_instance = null;\n function ThemeFlavor$Companion_getInstance() {\n if (ThemeFlavor$Companion_instance === null) {\n new ThemeFlavor$Companion();\n }\n return ThemeFlavor$Companion_instance;\n }\n ThemeFlavor.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ThemeFlavor',\n interfaces: []\n };\n function ThemeValuesAccess(values, fontFamilyRegistry) {\n this.values_0 = values;\n this.fontFamilyRegistry_0 = fontFamilyRegistry;\n this.mem_0 = HashMap_init();\n }\n ThemeValuesAccess.prototype.get_0 = function (key) {\n return this.values_0.get_11rb$(key);\n };\n ThemeValuesAccess.prototype.getValue_0 = function (key) {\n return getValue(this.values_0, key);\n };\n ThemeValuesAccess.prototype.getValue_1 = function (key) {\n var specificOption = first(key);\n var tmp$;\n var value = this.mem_0.get_11rb$(specificOption);\n if (value == null) {\n var tmp$_0;\n var firstNotNullOfOrNull$result;\n firstNotNullOfOrNull$break: do {\n var tmp$_1;\n tmp$_1 = key.iterator();\n while (tmp$_1.hasNext()) {\n var element = tmp$_1.next();\n var result = this.values_0.get_11rb$(element);\n if (result != null) {\n firstNotNullOfOrNull$result = result;\n break firstNotNullOfOrNull$break;\n }\n }\n firstNotNullOfOrNull$result = null;\n }\n while (false);\n tmp$_0 = firstNotNullOfOrNull$result;\n if (tmp$_0 == null) {\n throw IllegalStateException_init('No theme value found. Key : ' + key + '.');\n }\n return tmp$_0;\n } else {\n tmp$ = value;\n }\n return tmp$;\n };\n ThemeValuesAccess.prototype.getNumber_1 = function (key) {\n var tmp$, tmp$_0, tmp$_1;\n var value = this.getValue_1(key);\n tmp$_1 = (tmp$_0 = Kotlin.isNumber(tmp$ = value) ? tmp$ : null) != null ? numberToDouble(tmp$_0) : null;\n if (tmp$_1 == null) {\n throw IllegalStateException_init('Theme value is not a number: ' + value.toString() + '. Key : ' + key + '.');\n }\n return tmp$_1;\n };\n ThemeValuesAccess.prototype.getBoolean_0 = function (key) {\n var tmp$, tmp$_0;\n var value = this.getValue_1(key);\n tmp$_0 = typeof (tmp$ = value) === 'boolean' ? tmp$ : null;\n if (tmp$_0 == null) {\n throw IllegalStateException_init('Theme value is not boolean: ' + value.toString() + '. Key : ' + key + '.');\n }\n return tmp$_0;\n };\n ThemeValuesAccess.prototype.getElemValue_0 = function (key) {\n var tmp$;\n var specificOption = first(key);\n var tmp$_0;\n var value = this.mem_0.get_11rb$(specificOption);\n if (value == null) {\n var $receiver = asReversed(key);\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$_1;\n tmp$_1 = $receiver.iterator();\n while (tmp$_1.hasNext()) {\n var item = tmp$_1.next();\n destination.add_11rb$(this.values_0.get_11rb$(item));\n }\n var tmp$_2;\n var accumulator = HashMap_init();\n tmp$_2 = destination.iterator();\n while (tmp$_2.hasNext()) {\n var element = tmp$_2.next();\n var acc = accumulator;\n var tmp$_3;\n if (element != null) {\n acc.putAll_a2k3zr$(Kotlin.isType(tmp$_3 = element, Map) ? tmp$_3 : throwCCE());\n }\n accumulator = acc;\n }\n return accumulator;\n } else {\n tmp$_0 = value;\n }\n return Kotlin.isType(tmp$ = tmp$_0, Map) ? tmp$ : throwCCE();\n };\n ThemeValuesAccess.prototype.isElemBlank_0 = function (key) {\n var tmp$;\n var blankValue = this.getElemValue_0(key).get_11rb$(ThemeOption$Elem_getInstance().BLANK);\n return blankValue != null && (typeof (tmp$ = blankValue) === 'boolean' ? tmp$ : throwCCE());\n };\n ThemeValuesAccess.prototype.getNumber_0 = function (elem, key) {\n var tmp$;\n return numberToDouble(Kotlin.isNumber(tmp$ = getValue(elem, key)) ? tmp$ : throwCCE());\n };\n ThemeValuesAccess.prototype.getColor_0 = function (elem, key) {\n var tmp$, tmp$_0;\n var value = getValue(elem, key);\n if (Kotlin.isType(value, Color))\n tmp$_0 = value;\n else {\n tmp$_0 = values.Colors.parseColor_61zpoe$(typeof (tmp$ = value) === 'string' ? tmp$ : throwCCE());\n }\n return tmp$_0;\n };\n ThemeValuesAccess.prototype.getFontFace_0 = function (elem) {\n var tmp$;\n var value = getValue(elem, ThemeOption$Elem_getInstance().FONT_FACE);\n if (Kotlin.isType(value, FontFace))\n tmp$ = value;\n else if (typeof value === 'string')\n tmp$ = FontFace.Companion.fromString_61zpoe$(value);\n else\n tmp$ = FontFace.Companion.NORMAL;\n return tmp$;\n };\n ThemeValuesAccess.prototype.getFontFamily_0 = function (elem) {\n var tmp$, tmp$_0;\n var value = typeof (tmp$ = getValue(elem, ThemeOption$Elem_getInstance().FONT_FAMILY)) === 'string' ? tmp$ : null;\n tmp$_0 = value != null ? this.fontFamilyRegistry_0.get_61zpoe$(value) : null;\n if (tmp$_0 == null) {\n throw IllegalStateException_init(\"Theme value '\" + ThemeOption$Elem_getInstance().FONT_FAMILY + \"' is not a string. Elem : \" + elem + '.');\n }\n return tmp$_0;\n };\n ThemeValuesAccess.prototype.getTextStyle_0 = function (elem) {\n return new ThemeTextStyle(this.getFontFamily_0(elem), this.getFontFace_0(elem), this.getNumber_0(elem, ThemeOption$Elem_getInstance().SIZE), this.getColor_0(elem, ThemeOption$Elem_getInstance().COLOR));\n };\n ThemeValuesAccess.prototype.getTextJustification_0 = function (elem) {\n var hjust = this.getNumber_0(elem, ThemeOption$Elem_getInstance().HJUST);\n var vjust = this.getNumber_0(elem, ThemeOption$Elem_getInstance().VJUST);\n return new TextJustification(hjust, vjust);\n };\n ThemeValuesAccess.prototype.getMargins_0 = function (elem) {\n return new Margins(this.getNumber_0(elem, ThemeOption$Elem$Margin_getInstance().TOP), this.getNumber_0(elem, ThemeOption$Elem$Margin_getInstance().RIGHT), this.getNumber_0(elem, ThemeOption$Elem$Margin_getInstance().BOTTOM), this.getNumber_0(elem, ThemeOption$Elem$Margin_getInstance().LEFT));\n };\n ThemeValuesAccess.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ThemeValuesAccess',\n interfaces: []\n };\n function ThemeOption() {\n ThemeOption_instance = this;\n this.TITLE = 'title';\n this.TEXT = 'text';\n this.LINE = 'line';\n this.RECT = 'rect';\n this.PLOT_BKGR_RECT = 'plot_background';\n this.PLOT_TITLE = 'plot_title';\n this.PLOT_SUBTITLE = 'plot_subtitle';\n this.PLOT_CAPTION = 'plot_caption';\n this.AXIS = 'axis';\n this.AXIS_X = 'axis_x';\n this.AXIS_Y = 'axis_y';\n this.AXIS_ONTOP = 'axis_ontop';\n this.AXIS_ONTOP_X = 'axis_ontop_x';\n this.AXIS_ONTOP_Y = 'axis_ontop_y';\n this.AXIS_TITLE = 'axis_title';\n this.AXIS_TEXT = 'axis_text';\n this.AXIS_TICKS = 'axis_ticks';\n this.AXIS_TICKS_LENGTH = 'axis_ticks_length';\n this.AXIS_LINE = 'axis_line';\n this.AXIS_TOOLTIP = 'axis_tooltip';\n this.AXIS_TOOLTIP_TEXT = 'axis_tooltip_text';\n this.AXIS_TITLE_X = 'axis_title_x';\n this.AXIS_TITLE_Y = 'axis_title_y';\n this.AXIS_TEXT_X = 'axis_text_x';\n this.AXIS_TEXT_Y = 'axis_text_y';\n this.AXIS_TICKS_X = 'axis_ticks_x';\n this.AXIS_TICKS_Y = 'axis_ticks_y';\n this.AXIS_TICKS_LENGTH_X = 'axis_ticks_length_x';\n this.AXIS_TICKS_LENGTH_Y = 'axis_ticks_length_y';\n this.AXIS_LINE_X = 'axis_line_x';\n this.AXIS_LINE_Y = 'axis_line_y';\n this.AXIS_TOOLTIP_X = 'axis_tooltip_x';\n this.AXIS_TOOLTIP_Y = 'axis_tooltip_y';\n this.AXIS_TOOLTIP_TEXT_X = 'axis_tooltip_text_x';\n this.AXIS_TOOLTIP_TEXT_Y = 'axis_tooltip_text_y';\n this.PANEL_BKGR_RECT = 'panel_background';\n this.PANEL_BORDER_RECT = 'panel_border';\n this.PANEL_GRID = 'panel_grid';\n this.PANEL_GRID_MAJOR = 'panel_grid_major';\n this.PANEL_GRID_MINOR = 'panel_grid_minor';\n this.PANEL_GRID_MAJOR_X = 'panel_grid_major_x';\n this.PANEL_GRID_MINOR_X = 'panel_grid_minor_x';\n this.PANEL_GRID_MAJOR_Y = 'panel_grid_major_y';\n this.PANEL_GRID_MINOR_Y = 'panel_grid_minor_y';\n this.FACET_STRIP_BGR_RECT = 'strip_background';\n this.FACET_STRIP_TEXT = 'strip_text';\n this.LEGEND_BKGR_RECT = 'legend_background';\n this.LEGEND_TEXT = 'legend_text';\n this.LEGEND_TITLE = 'legend_title';\n this.LEGEND_POSITION = 'legend_position';\n this.LEGEND_JUSTIFICATION = 'legend_justification';\n this.LEGEND_DIRECTION = 'legend_direction';\n this.TOOLTIP_RECT = 'tooltip';\n this.TOOLTIP_TEXT = 'tooltip_text';\n this.TOOLTIP_TITLE_TEXT = 'tooltip_title_text';\n this.ELEMENT_BLANK = mapOf_0(to(ThemeOption$Elem_getInstance().BLANK, true));\n this.ELEMENT_BLANK_SHORTHAND = 'blank';\n }\n function ThemeOption$Elem() {\n ThemeOption$Elem_instance = this;\n this.BLANK = 'blank';\n this.FILL = 'fill';\n this.COLOR = 'color';\n this.SIZE = 'size';\n this.LINETYPE = 'linetype';\n this.ARROW = 'arrow';\n this.FONT_FAMILY = 'family';\n this.FONT_FACE = 'face';\n this.HJUST = 'hjust';\n this.VJUST = 'vjust';\n this.ANGLE = 'angle';\n this.LINEHEIGHT = 'lineheight';\n this.MARGIN = 'margin';\n }\n function ThemeOption$Elem$Margin() {\n ThemeOption$Elem$Margin_instance = this;\n this.TOP = 'margin_t';\n this.RIGHT = 'margin_r';\n this.BOTTOM = 'margin_b';\n this.LEFT = 'margin_l';\n }\n ThemeOption$Elem$Margin.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Margin',\n interfaces: []\n };\n var ThemeOption$Elem$Margin_instance = null;\n function ThemeOption$Elem$Margin_getInstance() {\n if (ThemeOption$Elem$Margin_instance === null) {\n new ThemeOption$Elem$Margin();\n }\n return ThemeOption$Elem$Margin_instance;\n }\n ThemeOption$Elem.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Elem',\n interfaces: []\n };\n var ThemeOption$Elem_instance = null;\n function ThemeOption$Elem_getInstance() {\n if (ThemeOption$Elem_instance === null) {\n new ThemeOption$Elem();\n }\n return ThemeOption$Elem_instance;\n }\n function ThemeOption$Name() {\n ThemeOption$Name_instance = this;\n this.R_GREY = 'grey';\n this.R_LIGHT = 'light';\n this.R_CLASSIC = 'classic';\n this.R_MINIMAL = 'minimal';\n this.R_BW = 'bw';\n this.LP_MINIMAL = 'minimal2';\n this.LP_NONE = 'none';\n }\n ThemeOption$Name.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Name',\n interfaces: []\n };\n var ThemeOption$Name_instance = null;\n function ThemeOption$Name_getInstance() {\n if (ThemeOption$Name_instance === null) {\n new ThemeOption$Name();\n }\n return ThemeOption$Name_instance;\n }\n function ThemeOption$Flavor() {\n ThemeOption$Flavor_instance = this;\n this.DARCULA = 'darcula';\n this.SOLARIZED_LIGHT = 'solarized_light';\n this.SOLARIZED_DARK = 'solarized_dark';\n this.HIGH_CONTRAST_LIGHT = 'high_contrast_light';\n this.HIGH_CONTRAST_DARK = 'high_contrast_dark';\n }\n ThemeOption$Flavor.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Flavor',\n interfaces: []\n };\n var ThemeOption$Flavor_instance = null;\n function ThemeOption$Flavor_getInstance() {\n if (ThemeOption$Flavor_instance === null) {\n new ThemeOption$Flavor();\n }\n return ThemeOption$Flavor_instance;\n }\n function ThemeOption$ForTest() {\n ThemeOption$ForTest_instance = this;\n this.themeNames = listOf_0([ThemeOption$Name_getInstance().R_GREY, ThemeOption$Name_getInstance().R_LIGHT, ThemeOption$Name_getInstance().R_CLASSIC, ThemeOption$Name_getInstance().R_MINIMAL, ThemeOption$Name_getInstance().R_BW, ThemeOption$Name_getInstance().LP_MINIMAL, ThemeOption$Name_getInstance().LP_NONE]);\n this.elemWithColorAndSize = listOf_0([ThemeOption_getInstance().PLOT_BKGR_RECT, ThemeOption_getInstance().LEGEND_BKGR_RECT, ThemeOption_getInstance().AXIS_TICKS_X, ThemeOption_getInstance().AXIS_TICKS_Y, ThemeOption_getInstance().AXIS_LINE_X, ThemeOption_getInstance().AXIS_LINE_Y, ThemeOption_getInstance().AXIS_TOOLTIP_X, ThemeOption_getInstance().AXIS_TOOLTIP_Y, ThemeOption_getInstance().PANEL_BKGR_RECT, ThemeOption_getInstance().PANEL_BORDER_RECT, ThemeOption_getInstance().PANEL_GRID_MAJOR_X, ThemeOption_getInstance().PANEL_GRID_MINOR_X, ThemeOption_getInstance().PANEL_GRID_MAJOR_Y, ThemeOption_getInstance().PANEL_GRID_MINOR_Y, ThemeOption_getInstance().FACET_STRIP_BGR_RECT, ThemeOption_getInstance().TOOLTIP_RECT]);\n this.elemWithColorOnly = listOf_0([ThemeOption_getInstance().PLOT_TITLE, ThemeOption_getInstance().PLOT_SUBTITLE, ThemeOption_getInstance().PLOT_CAPTION, ThemeOption_getInstance().AXIS_TITLE_X, ThemeOption_getInstance().AXIS_TITLE_Y, ThemeOption_getInstance().AXIS_TEXT_X, ThemeOption_getInstance().AXIS_TEXT_Y, ThemeOption_getInstance().AXIS_TOOLTIP_TEXT_X, ThemeOption_getInstance().AXIS_TOOLTIP_TEXT_Y, ThemeOption_getInstance().FACET_STRIP_TEXT, ThemeOption_getInstance().LEGEND_TEXT, ThemeOption_getInstance().LEGEND_TITLE, ThemeOption_getInstance().TOOLTIP_TEXT, ThemeOption_getInstance().TOOLTIP_TITLE_TEXT]);\n this.elemWithFill = listOf_0([ThemeOption_getInstance().PLOT_BKGR_RECT, ThemeOption_getInstance().LEGEND_BKGR_RECT, ThemeOption_getInstance().AXIS_TOOLTIP_X, ThemeOption_getInstance().AXIS_TOOLTIP_Y, ThemeOption_getInstance().PANEL_BKGR_RECT, ThemeOption_getInstance().FACET_STRIP_BGR_RECT, ThemeOption_getInstance().TOOLTIP_RECT]);\n this.numericOptions = listOf_0([ThemeOption_getInstance().AXIS_TICKS_LENGTH_X, ThemeOption_getInstance().AXIS_TICKS_LENGTH_Y]);\n this.elemWithFontOptions = listOf_0([ThemeOption_getInstance().PLOT_TITLE, ThemeOption_getInstance().PLOT_SUBTITLE, ThemeOption_getInstance().PLOT_CAPTION, ThemeOption_getInstance().AXIS_TITLE_X, ThemeOption_getInstance().AXIS_TITLE_Y, ThemeOption_getInstance().AXIS_TEXT_X, ThemeOption_getInstance().AXIS_TEXT_Y, ThemeOption_getInstance().AXIS_TOOLTIP_TEXT_X, ThemeOption_getInstance().AXIS_TOOLTIP_TEXT_Y, ThemeOption_getInstance().FACET_STRIP_TEXT, ThemeOption_getInstance().LEGEND_TEXT, ThemeOption_getInstance().LEGEND_TITLE, ThemeOption_getInstance().TOOLTIP_TEXT, ThemeOption_getInstance().TOOLTIP_TITLE_TEXT]);\n }\n ThemeOption$ForTest.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'ForTest',\n interfaces: []\n };\n var ThemeOption$ForTest_instance = null;\n function ThemeOption$ForTest_getInstance() {\n if (ThemeOption$ForTest_instance === null) {\n new ThemeOption$ForTest();\n }\n return ThemeOption$ForTest_instance;\n }\n ThemeOption.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'ThemeOption',\n interfaces: []\n };\n var ThemeOption_instance = null;\n function ThemeOption_getInstance() {\n if (ThemeOption_instance === null) {\n new ThemeOption();\n }\n return ThemeOption_instance;\n }\n function ThemeValues(values) {\n ThemeValues$Companion_getInstance();\n this.values = values;\n }\n ThemeValues.prototype.plus_x7u0o8$ = function (other) {\n return ThemeValues$Companion_getInstance().mergeWith_oz50u7$(this.values, other);\n };\n function ThemeValues$Companion() {\n ThemeValues$Companion_instance = this;\n }\n ThemeValues$Companion.prototype.mergeWith_oz50u7$ = function ($receiver, other) {\n var tmp$, tmp$_0;\n var result = HashMap_init_0($receiver);\n tmp$ = other.entries.iterator();\n while (tmp$.hasNext()) {\n var tmp$_1 = tmp$.next();\n var k = tmp$_1.key;\n var v = tmp$_1.value;\n var wasVal = result.put_xwzc9p$(k, v);\n if (Kotlin.isType(wasVal, Map)) {\n result.put_xwzc9p$(k, plus_0(wasVal, Kotlin.isType(tmp$_0 = v, Map) ? tmp$_0 : throwCCE()));\n }\n }\n return result;\n };\n ThemeValues$Companion.prototype.forName_61zpoe$ = function (theme) {\n var tmp$;\n switch (theme) {\n case 'grey':\n tmp$ = new ThemeValuesRGrey();\n break;\n case 'light':\n tmp$ = new ThemeValuesRLight();\n break;\n case 'classic':\n tmp$ = new ThemeValuesRClassic();\n break;\n case 'minimal':\n tmp$ = new ThemeValuesRMinimal();\n break;\n case 'bw':\n tmp$ = new ThemeValuesRBW();\n break;\n case 'minimal2':\n tmp$ = new ThemeValuesLPMinimal2();\n break;\n case 'none':\n tmp$ = new ThemeValuesLPNone();\n break;\n default:\n throw IllegalArgumentException_init(\"Unsupported theme: '\" + theme + \"'\");\n }\n return tmp$;\n };\n ThemeValues$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ThemeValues$Companion_instance = null;\n function ThemeValues$Companion_getInstance() {\n if (ThemeValues$Companion_instance === null) {\n new ThemeValues$Companion();\n }\n return ThemeValues$Companion_instance;\n }\n ThemeValues.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ThemeValues',\n interfaces: []\n };\n function ThemeValuesBase() {\n ThemeValuesBase$Companion_getInstance();\n ThemeValues.call(this, ThemeValuesBase$Companion_getInstance().VALUES_0);\n }\n function ThemeValuesBase$Companion() {\n ThemeValuesBase$Companion_instance = this;\n this.VALUES_0 = mapOf([to(ThemeOption_getInstance().LINE, mapOf([to(ThemeOption$Elem_getInstance().COLOR, Color.Companion.BLUE), to(ThemeOption$Elem_getInstance().SIZE, 1.0)])), to(ThemeOption_getInstance().RECT, mapOf([to(ThemeOption$Elem_getInstance().COLOR, Color.Companion.BLUE), to(ThemeOption$Elem_getInstance().FILL, Color.Companion.LIGHT_BLUE), to(ThemeOption$Elem_getInstance().SIZE, 1.0)])), to(ThemeOption_getInstance().TEXT, mapOf([to(ThemeOption$Elem_getInstance().COLOR, Color.Companion.BLUE), to(ThemeOption$Elem_getInstance().SIZE, Defaults_getInstance().FONT_SMALL), to(ThemeOption$Elem_getInstance().FONT_FACE, FontFace.Companion.NORMAL), to(ThemeOption$Elem_getInstance().FONT_FAMILY, Defaults_getInstance().FONT_FAMILY_NORMAL), to(ThemeOption$Elem_getInstance().HJUST, 0.0), to(ThemeOption$Elem_getInstance().VJUST, 0.5)])), to(ThemeOption_getInstance().TITLE, mapOf([to(ThemeOption$Elem_getInstance().SIZE, Defaults_getInstance().FONT_MEDIUM), to(ThemeOption$Elem$Margin_getInstance().TOP, 4.0), to(ThemeOption$Elem$Margin_getInstance().RIGHT, 0.0), to(ThemeOption$Elem$Margin_getInstance().BOTTOM, 4.0), to(ThemeOption$Elem$Margin_getInstance().LEFT, 0.0)])), to(ThemeOption_getInstance().PLOT_TITLE, mapOf_0(to(ThemeOption$Elem_getInstance().SIZE, Defaults_getInstance().FONT_LARGE))), to(ThemeOption_getInstance().PLOT_SUBTITLE, mapOf_0(to(ThemeOption$Elem_getInstance().SIZE, Defaults_getInstance().FONT_MEDIUM))), to(ThemeOption_getInstance().PLOT_CAPTION, mapOf([to(ThemeOption$Elem_getInstance().HJUST, 1.0), to(ThemeOption$Elem_getInstance().SIZE, Defaults_getInstance().FONT_SMALL)])), to(ThemeOption_getInstance().PANEL_BORDER_RECT, ThemeOption_getInstance().ELEMENT_BLANK), to(ThemeOption_getInstance().PLOT_BKGR_RECT, mapOf([to(ThemeOption$Elem_getInstance().FILL, Color.Companion.WHITE), to(ThemeOption$Elem_getInstance().SIZE, 0.0)])), to(ThemeOption_getInstance().LEGEND_BKGR_RECT, mapOf([to(ThemeOption$Elem_getInstance().FILL, Color.Companion.WHITE), to(ThemeOption$Elem_getInstance().SIZE, 0.0)])), to(ThemeOption_getInstance().AXIS_ONTOP, false), to(ThemeOption_getInstance().AXIS_TICKS_LENGTH, 4.0), to(ThemeOption_getInstance().AXIS_TEXT, mapOf([to(ThemeOption$Elem$Margin_getInstance().TOP, 3.0), to(ThemeOption$Elem$Margin_getInstance().RIGHT, 3.0), to(ThemeOption$Elem$Margin_getInstance().BOTTOM, 0.0), to(ThemeOption$Elem$Margin_getInstance().LEFT, 0.0)])), to(ThemeOption_getInstance().AXIS_TITLE, mapOf([to(ThemeOption$Elem_getInstance().SIZE, Defaults_getInstance().FONT_MEDIUM), to(ThemeOption$Elem_getInstance().HJUST, 0.5), to(ThemeOption$Elem$Margin_getInstance().TOP, 4.0), to(ThemeOption$Elem$Margin_getInstance().RIGHT, 4.0), to(ThemeOption$Elem$Margin_getInstance().BOTTOM, 4.0), to(ThemeOption$Elem$Margin_getInstance().LEFT, 4.0)])), to(ThemeOption_getInstance().PANEL_GRID_MINOR, mapOf_0(to(ThemeOption$Elem_getInstance().SIZE, 0.5))), to(ThemeOption_getInstance().LEGEND_TITLE, mapOf_0(to(ThemeOption$Elem_getInstance().SIZE, Defaults_getInstance().FONT_MEDIUM))), to(ThemeOption_getInstance().LEGEND_POSITION, LegendPosition$Companion_getInstance().RIGHT), to(ThemeOption_getInstance().LEGEND_JUSTIFICATION, LegendJustification$Companion_getInstance().CENTER), to(ThemeOption_getInstance().LEGEND_DIRECTION, LegendDirection$AUTO_getInstance()), to(ThemeOption_getInstance().TOOLTIP_RECT, mapOf([to(ThemeOption$Elem_getInstance().FILL, Color.Companion.WHITE), to(ThemeOption$Elem_getInstance().COLOR, Color.Companion.BLACK), to(ThemeOption$Elem_getInstance().SIZE, 1.0)])), to(ThemeOption_getInstance().TOOLTIP_TITLE_TEXT, mapOf_0(to(ThemeOption$Elem_getInstance().FONT_FACE, FontFace.Companion.BOLD)))]);\n }\n ThemeValuesBase$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ThemeValuesBase$Companion_instance = null;\n function ThemeValuesBase$Companion_getInstance() {\n if (ThemeValuesBase$Companion_instance === null) {\n new ThemeValuesBase$Companion();\n }\n return ThemeValuesBase$Companion_instance;\n }\n ThemeValuesBase.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ThemeValuesBase',\n interfaces: [ThemeValues]\n };\n function ThemeValuesLPMinimal2() {\n ThemeValuesLPMinimal2$Companion_getInstance();\n ThemeValues.call(this, ThemeValuesLPMinimal2$Companion_getInstance().VALUES_0);\n }\n function ThemeValuesLPMinimal2$Companion() {\n ThemeValuesLPMinimal2$Companion_instance = this;\n this.PLOT_BACKGROUND_0 = Color.Companion.WHITE;\n this.BLACK_0 = Color.Companion.parseHex_61zpoe$('#171717');\n this.DARK_GREY_0 = Color.Companion.parseHex_61zpoe$('#474747');\n this.LIGHT_GREY_0 = Color.Companion.parseHex_61zpoe$('#E9E9E9');\n this.VALUES_0 = (new ThemeValuesBase()).plus_x7u0o8$(mapOf([to(ThemeOption_getInstance().LINE, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().RECT, mapOf([to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0), to(ThemeOption$Elem_getInstance().FILL, this.LIGHT_GREY_0)])), to(ThemeOption_getInstance().TEXT, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().PANEL_BKGR_RECT, ThemeOption_getInstance().ELEMENT_BLANK), to(ThemeOption_getInstance().PANEL_GRID_MINOR, ThemeOption_getInstance().ELEMENT_BLANK), to(ThemeOption_getInstance().PANEL_GRID, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.LIGHT_GREY_0))), to(ThemeOption_getInstance().AXIS_LINE_Y, ThemeOption_getInstance().ELEMENT_BLANK), to(ThemeOption_getInstance().AXIS_TICKS_Y, ThemeOption_getInstance().ELEMENT_BLANK), to(ThemeOption_getInstance().AXIS, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().AXIS_TOOLTIP, mapOf([to(ThemeOption$Elem_getInstance().COLOR, this.PLOT_BACKGROUND_0), to(ThemeOption$Elem_getInstance().FILL, this.DARK_GREY_0)])), to(ThemeOption_getInstance().FACET_STRIP_BGR_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().BLANK, true)))]));\n }\n ThemeValuesLPMinimal2$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ThemeValuesLPMinimal2$Companion_instance = null;\n function ThemeValuesLPMinimal2$Companion_getInstance() {\n if (ThemeValuesLPMinimal2$Companion_instance === null) {\n new ThemeValuesLPMinimal2$Companion();\n }\n return ThemeValuesLPMinimal2$Companion_instance;\n }\n ThemeValuesLPMinimal2.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ThemeValuesLPMinimal2',\n interfaces: [ThemeValues]\n };\n function ThemeValuesLPNone() {\n ThemeValuesBase.call(this);\n }\n ThemeValuesLPNone.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ThemeValuesLPNone',\n interfaces: [ThemeValuesBase]\n };\n function ThemeValuesRBW() {\n ThemeValuesRBW$Companion_getInstance();\n ThemeValues.call(this, ThemeValuesRBW$Companion_getInstance().VALUES_0);\n }\n function ThemeValuesRBW$Companion() {\n ThemeValuesRBW$Companion_instance = this;\n this.PLOT_BACKGROUND_0 = Color.Companion.WHITE;\n this.PANEL_BORDER_0 = Color.Companion.parseHex_61zpoe$('#333333');\n this.STRIP_BACKGROUND_0 = Color.Companion.parseHex_61zpoe$('#D9D9D9');\n this.DARK_GREY_0 = Color.Companion.parseHex_61zpoe$('#474747');\n this.LIGHT_GREY_0 = Color.Companion.parseHex_61zpoe$('#E9E9E9');\n this.VALUES_0 = (new ThemeValuesBase()).plus_x7u0o8$(mapOf([to(ThemeOption_getInstance().LINE, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().RECT, mapOf([to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0), to(ThemeOption$Elem_getInstance().FILL, this.LIGHT_GREY_0)])), to(ThemeOption_getInstance().TEXT, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().PANEL_BKGR_RECT, mapOf([to(ThemeOption$Elem_getInstance().FILL, this.PLOT_BACKGROUND_0), to(ThemeOption$Elem_getInstance().COLOR, this.PANEL_BORDER_0)])), to(ThemeOption_getInstance().PANEL_GRID, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.LIGHT_GREY_0))), to(ThemeOption_getInstance().PANEL_GRID_MAJOR, mapOf_0(to(ThemeOption$Elem_getInstance().SIZE, 1.4))), to(ThemeOption_getInstance().PANEL_GRID_MINOR, mapOf_0(to(ThemeOption$Elem_getInstance().SIZE, 0.5))), to(ThemeOption_getInstance().AXIS_LINE, ThemeOption_getInstance().ELEMENT_BLANK), to(ThemeOption_getInstance().AXIS, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.PANEL_BORDER_0))), to(ThemeOption_getInstance().AXIS_TOOLTIP, mapOf([to(ThemeOption$Elem_getInstance().COLOR, this.PLOT_BACKGROUND_0), to(ThemeOption$Elem_getInstance().FILL, this.DARK_GREY_0)])), to(ThemeOption_getInstance().FACET_STRIP_BGR_RECT, mapOf([to(ThemeOption$Elem_getInstance().FILL, this.STRIP_BACKGROUND_0), to(ThemeOption$Elem_getInstance().COLOR, this.PANEL_BORDER_0)]))]));\n }\n ThemeValuesRBW$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ThemeValuesRBW$Companion_instance = null;\n function ThemeValuesRBW$Companion_getInstance() {\n if (ThemeValuesRBW$Companion_instance === null) {\n new ThemeValuesRBW$Companion();\n }\n return ThemeValuesRBW$Companion_instance;\n }\n ThemeValuesRBW.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ThemeValuesRBW',\n interfaces: [ThemeValues]\n };\n function ThemeValuesRClassic() {\n ThemeValuesRClassic$Companion_getInstance();\n ThemeValues.call(this, ThemeValuesRClassic$Companion_getInstance().VALUES_0);\n }\n function ThemeValuesRClassic$Companion() {\n ThemeValuesRClassic$Companion_instance = this;\n this.PLOT_BACKGROUND_0 = Color.Companion.WHITE;\n this.BLACK_0 = Color.Companion.parseHex_61zpoe$('#171717');\n this.DARK_GREY_0 = Color.Companion.parseHex_61zpoe$('#474747');\n this.LIGHT_GREY_0 = Color.Companion.parseHex_61zpoe$('#E9E9E9');\n this.VALUES_0 = (new ThemeValuesBase()).plus_x7u0o8$(mapOf([to(ThemeOption_getInstance().LINE, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().RECT, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().TEXT, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().PANEL_BKGR_RECT, ThemeOption_getInstance().ELEMENT_BLANK), to(ThemeOption_getInstance().PANEL_GRID, mapOf([to(ThemeOption$Elem_getInstance().BLANK, true), to(ThemeOption$Elem_getInstance().COLOR, this.LIGHT_GREY_0)])), to(ThemeOption_getInstance().AXIS, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().AXIS_TOOLTIP, mapOf([to(ThemeOption$Elem_getInstance().COLOR, this.PLOT_BACKGROUND_0), to(ThemeOption$Elem_getInstance().FILL, this.DARK_GREY_0)])), to(ThemeOption_getInstance().FACET_STRIP_BGR_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, this.PLOT_BACKGROUND_0)))]));\n }\n ThemeValuesRClassic$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ThemeValuesRClassic$Companion_instance = null;\n function ThemeValuesRClassic$Companion_getInstance() {\n if (ThemeValuesRClassic$Companion_instance === null) {\n new ThemeValuesRClassic$Companion();\n }\n return ThemeValuesRClassic$Companion_instance;\n }\n ThemeValuesRClassic.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ThemeValuesRClassic',\n interfaces: [ThemeValues]\n };\n function ThemeValuesRGrey() {\n ThemeValuesRGrey$Companion_getInstance();\n ThemeValues.call(this, ThemeValuesRGrey$Companion_getInstance().VALUES_0);\n }\n function ThemeValuesRGrey$Companion() {\n ThemeValuesRGrey$Companion_instance = this;\n this.PLOT_BACKGROUND_0 = Color.Companion.WHITE;\n this.PANEL_BACKGROUND_0 = Color.Companion.parseHex_61zpoe$('#EBEBEB');\n this.STRIP_BACKGROUND_0 = Color.Companion.parseHex_61zpoe$('#D9D9D9');\n this.BLACK_0 = Color.Companion.parseHex_61zpoe$('#171717');\n this.DARK_GREY_0 = Color.Companion.parseHex_61zpoe$('#474747');\n this.LIGHT_GREY_0 = Color.Companion.parseHex_61zpoe$('#E9E9E9');\n this.VALUES_0 = (new ThemeValuesBase()).plus_x7u0o8$(mapOf([to(ThemeOption_getInstance().LINE, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().RECT, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().TEXT, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().PANEL_BKGR_RECT, mapOf([to(ThemeOption$Elem_getInstance().FILL, this.PANEL_BACKGROUND_0), to(ThemeOption$Elem_getInstance().SIZE, 0.0)])), to(ThemeOption_getInstance().PANEL_GRID, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.PLOT_BACKGROUND_0))), to(ThemeOption_getInstance().PANEL_GRID_MAJOR, mapOf_0(to(ThemeOption$Elem_getInstance().SIZE, 1.4))), to(ThemeOption_getInstance().PANEL_GRID_MINOR, mapOf_0(to(ThemeOption$Elem_getInstance().SIZE, 0.5))), to(ThemeOption_getInstance().AXIS, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().AXIS_LINE, ThemeOption_getInstance().ELEMENT_BLANK), to(ThemeOption_getInstance().AXIS_TICKS, mapOf_0(to(ThemeOption$Elem_getInstance().SIZE, 1.4))), to(ThemeOption_getInstance().AXIS_TOOLTIP, mapOf([to(ThemeOption$Elem_getInstance().COLOR, this.PLOT_BACKGROUND_0), to(ThemeOption$Elem_getInstance().FILL, this.DARK_GREY_0)])), to(ThemeOption_getInstance().FACET_STRIP_BGR_RECT, mapOf([to(ThemeOption$Elem_getInstance().FILL, this.STRIP_BACKGROUND_0), to(ThemeOption$Elem_getInstance().SIZE, 0.0)]))]));\n }\n ThemeValuesRGrey$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ThemeValuesRGrey$Companion_instance = null;\n function ThemeValuesRGrey$Companion_getInstance() {\n if (ThemeValuesRGrey$Companion_instance === null) {\n new ThemeValuesRGrey$Companion();\n }\n return ThemeValuesRGrey$Companion_instance;\n }\n ThemeValuesRGrey.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ThemeValuesRGrey',\n interfaces: [ThemeValues]\n };\n function ThemeValuesRLight() {\n ThemeValuesRLight$Companion_getInstance();\n ThemeValues.call(this, ThemeValuesRLight$Companion_getInstance().VALUES_0);\n }\n function ThemeValuesRLight$Companion() {\n ThemeValuesRLight$Companion_instance = this;\n this.PLOT_BACKGROUND_0 = Color.Companion.WHITE;\n this.PANEL_BORDER_0 = Color.Companion.parseHex_61zpoe$('#C9C9C9');\n this.STRIP_BACKGROUND_0 = Color.Companion.parseHex_61zpoe$('#D9D9D9');\n this.BLACK_0 = Color.Companion.parseHex_61zpoe$('#171717');\n this.DARK_GREY_0 = Color.Companion.parseHex_61zpoe$('#474747');\n this.LIGHT_GREY_0 = Color.Companion.parseHex_61zpoe$('#E9E9E9');\n this.VALUES_0 = (new ThemeValuesBase()).plus_x7u0o8$(mapOf([to(ThemeOption_getInstance().LINE, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().RECT, mapOf([to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0), to(ThemeOption$Elem_getInstance().FILL, this.LIGHT_GREY_0)])), to(ThemeOption_getInstance().TEXT, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().PANEL_BKGR_RECT, mapOf([to(ThemeOption$Elem_getInstance().FILL, this.PLOT_BACKGROUND_0), to(ThemeOption$Elem_getInstance().COLOR, this.PANEL_BORDER_0)])), to(ThemeOption_getInstance().PANEL_GRID, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.LIGHT_GREY_0))), to(ThemeOption_getInstance().AXIS_LINE, ThemeOption_getInstance().ELEMENT_BLANK), to(ThemeOption_getInstance().AXIS, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.PANEL_BORDER_0))), to(ThemeOption_getInstance().AXIS_TOOLTIP, mapOf([to(ThemeOption$Elem_getInstance().COLOR, this.PLOT_BACKGROUND_0), to(ThemeOption$Elem_getInstance().FILL, this.DARK_GREY_0)])), to(ThemeOption_getInstance().FACET_STRIP_BGR_RECT, mapOf([to(ThemeOption$Elem_getInstance().FILL, this.STRIP_BACKGROUND_0), to(ThemeOption$Elem_getInstance().SIZE, 0.0)]))]));\n }\n ThemeValuesRLight$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ThemeValuesRLight$Companion_instance = null;\n function ThemeValuesRLight$Companion_getInstance() {\n if (ThemeValuesRLight$Companion_instance === null) {\n new ThemeValuesRLight$Companion();\n }\n return ThemeValuesRLight$Companion_instance;\n }\n ThemeValuesRLight.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ThemeValuesRLight',\n interfaces: [ThemeValues]\n };\n function ThemeValuesRMinimal() {\n ThemeValuesRMinimal$Companion_getInstance();\n ThemeValues.call(this, ThemeValuesRMinimal$Companion_getInstance().VALUES_0);\n }\n function ThemeValuesRMinimal$Companion() {\n ThemeValuesRMinimal$Companion_instance = this;\n this.PLOT_BACKGROUND_0 = Color.Companion.WHITE;\n this.BLACK_0 = Color.Companion.parseHex_61zpoe$('#171717');\n this.DARK_GREY_0 = Color.Companion.parseHex_61zpoe$('#474747');\n this.LIGHT_GREY_0 = Color.Companion.parseHex_61zpoe$('#E9E9E9');\n this.VALUES_0 = (new ThemeValuesBase()).plus_x7u0o8$(mapOf([to(ThemeOption_getInstance().LINE, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().RECT, mapOf([to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0), to(ThemeOption$Elem_getInstance().FILL, this.LIGHT_GREY_0)])), to(ThemeOption_getInstance().TEXT, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().PANEL_BKGR_RECT, ThemeOption_getInstance().ELEMENT_BLANK), to(ThemeOption_getInstance().PANEL_GRID, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.LIGHT_GREY_0))), to(ThemeOption_getInstance().AXIS_LINE, ThemeOption_getInstance().ELEMENT_BLANK), to(ThemeOption_getInstance().AXIS_TICKS, ThemeOption_getInstance().ELEMENT_BLANK), to(ThemeOption_getInstance().AXIS, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().AXIS_TOOLTIP, mapOf([to(ThemeOption$Elem_getInstance().COLOR, this.PLOT_BACKGROUND_0), to(ThemeOption$Elem_getInstance().FILL, this.DARK_GREY_0)])), to(ThemeOption_getInstance().FACET_STRIP_BGR_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().BLANK, true)))]));\n }\n ThemeValuesRMinimal$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ThemeValuesRMinimal$Companion_instance = null;\n function ThemeValuesRMinimal$Companion_getInstance() {\n if (ThemeValuesRMinimal$Companion_instance === null) {\n new ThemeValuesRMinimal$Companion();\n }\n return ThemeValuesRMinimal$Companion_instance;\n }\n ThemeValuesRMinimal.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ThemeValuesRMinimal',\n interfaces: [ThemeValues]\n };\n function MouseEventPeer() {\n this.myEventHandlers_0 = HashMap_init();\n this.myEventSources_0 = ArrayList_init();\n this.mySourceRegistrations_0 = HashMap_init();\n }\n function MouseEventPeer$addEventHandler$ObjectLiteral(closure$addReg, this$MouseEventPeer, closure$eventSpec) {\n this.closure$addReg = closure$addReg;\n this.this$MouseEventPeer = this$MouseEventPeer;\n this.closure$eventSpec = closure$eventSpec;\n Registration.call(this);\n }\n MouseEventPeer$addEventHandler$ObjectLiteral.prototype.doRemove = function () {\n var tmp$;\n (tmp$ = this.closure$addReg) != null ? (tmp$.remove(), Unit) : null;\n if (ensureNotNull(this.this$MouseEventPeer.myEventHandlers_0.get_11rb$(this.closure$eventSpec)).isEmpty) {\n this.this$MouseEventPeer.myEventHandlers_0.remove_11rb$(this.closure$eventSpec);\n this.this$MouseEventPeer.onRemoveSpec_0(this.closure$eventSpec);\n }\n };\n MouseEventPeer$addEventHandler$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [Registration]\n };\n MouseEventPeer.prototype.addEventHandler_mfdhbe$ = function (eventSpec, eventHandler) {\n var tmp$;\n if (!this.myEventHandlers_0.containsKey_11rb$(eventSpec)) {\n var $receiver = this.myEventHandlers_0;\n var value = new Listeners();\n $receiver.put_xwzc9p$(eventSpec, value);\n this.onAddSpec_0(eventSpec);\n }\n var addReg = (tmp$ = this.myEventHandlers_0.get_11rb$(eventSpec)) != null ? tmp$.add_11rb$(eventHandler) : null;\n return new MouseEventPeer$addEventHandler$ObjectLiteral(addReg, this, eventSpec);\n };\n function MouseEventPeer$dispatch$ObjectLiteral(closure$mouseEvent) {\n this.closure$mouseEvent = closure$mouseEvent;\n }\n MouseEventPeer$dispatch$ObjectLiteral.prototype.call_11rb$ = function (l) {\n l.onEvent_11rb$(this.closure$mouseEvent);\n };\n MouseEventPeer$dispatch$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [ListenerCaller]\n };\n MouseEventPeer.prototype.dispatch_w7zfbj$ = function (eventSpec, mouseEvent) {\n var tmp$;\n if (this.myEventHandlers_0.containsKey_11rb$(eventSpec)) {\n (tmp$ = this.myEventHandlers_0.get_11rb$(eventSpec)) != null ? (tmp$.fire_kucmxw$(new MouseEventPeer$dispatch$ObjectLiteral(mouseEvent)), Unit) : null;\n }\n };\n MouseEventPeer.prototype.addEventSource_u4bej9$ = function (eventSource) {\n var tmp$;\n tmp$ = this.myEventHandlers_0.keys.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n this.startHandleSpecInSource_0(eventSource, element);\n }\n this.myEventSources_0.add_11rb$(eventSource);\n };\n MouseEventPeer.prototype.onAddSpec_0 = function (eventSpec) {\n var tmp$;\n tmp$ = this.myEventSources_0.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n this.startHandleSpecInSource_0(element, eventSpec);\n }\n };\n function MouseEventPeer$startHandleSpecInSource$ObjectLiteral(closure$eventSpec, this$MouseEventPeer) {\n this.closure$eventSpec = closure$eventSpec;\n this.this$MouseEventPeer = this$MouseEventPeer;\n }\n MouseEventPeer$startHandleSpecInSource$ObjectLiteral.prototype.onEvent_11rb$ = function (event) {\n this.this$MouseEventPeer.dispatch_w7zfbj$(this.closure$eventSpec, event);\n };\n MouseEventPeer$startHandleSpecInSource$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [EventHandler]\n };\n MouseEventPeer.prototype.startHandleSpecInSource_0 = function (eventSource, eventSpec) {\n var tmp$;\n var registration = eventSource.addEventHandler_mfdhbe$(eventSpec, new MouseEventPeer$startHandleSpecInSource$ObjectLiteral(eventSpec, this));\n if (!this.mySourceRegistrations_0.containsKey_11rb$(eventSpec)) {\n var $receiver = this.mySourceRegistrations_0;\n var value = new CompositeRegistration([]);\n $receiver.put_xwzc9p$(eventSpec, value);\n }\n (tmp$ = this.mySourceRegistrations_0.get_11rb$(eventSpec)) != null ? tmp$.add_3xv6fb$(registration) : null;\n };\n MouseEventPeer.prototype.onRemoveSpec_0 = function (eventSpec) {\n var tmp$;\n if (this.mySourceRegistrations_0.containsKey_11rb$(eventSpec)) {\n (tmp$ = this.mySourceRegistrations_0.remove_11rb$(eventSpec)) != null ? (tmp$.dispose(), Unit) : null;\n }\n };\n MouseEventPeer.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'MouseEventPeer',\n interfaces: [MouseEventSource]\n };\n function BogusFrameOfReference() {\n }\n BogusFrameOfReference.prototype.drawBeforeGeomLayer_8icvvv$ = function (parent) {\n throw IllegalStateException_init('Bogus frame of reference is not supposed to be used.');\n };\n BogusFrameOfReference.prototype.drawAfterGeomLayer_8icvvv$ = function (parent) {\n throw IllegalStateException_init('Bogus frame of reference is not supposed to be used.');\n };\n BogusFrameOfReference.prototype.buildGeomComponent_ge0scz$ = function (layer, targetCollector) {\n throw IllegalStateException_init('Bogus frame of reference is not supposed to be used.');\n };\n BogusFrameOfReference.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'BogusFrameOfReference',\n interfaces: [FrameOfReference]\n };\n function BogusFrameOfReferenceProvider() {\n this.hAxisLabel_8fd9ly$_0 = null;\n this.vAxisLabel_ik0xv8$_0 = null;\n this.flipAxis_wnu2cd$_0 = false;\n }\n Object.defineProperty(BogusFrameOfReferenceProvider.prototype, 'hAxisLabel', {\n configurable: true,\n get: function () {\n return this.hAxisLabel_8fd9ly$_0;\n }\n });\n Object.defineProperty(BogusFrameOfReferenceProvider.prototype, 'vAxisLabel', {\n configurable: true,\n get: function () {\n return this.vAxisLabel_ik0xv8$_0;\n }\n });\n Object.defineProperty(BogusFrameOfReferenceProvider.prototype, 'flipAxis', {\n configurable: true,\n get: function () {\n return this.flipAxis_wnu2cd$_0;\n }\n });\n BogusFrameOfReferenceProvider.prototype.createTileLayoutProvider = function () {\n throw IllegalStateException_init('Bogus frame of reference provider is not supposed to be used.');\n };\n BogusFrameOfReferenceProvider.prototype.createTileFrame_sd8y8$$default = function (layoutInfo, coordProvider, debugDrawing) {\n return new BogusFrameOfReference();\n };\n BogusFrameOfReferenceProvider.prototype.createMarginalFrames_sd8y8$ = function (tileLayoutInfo, coordProvider, debugDrawing) {\n return emptyMap();\n };\n BogusFrameOfReferenceProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'BogusFrameOfReferenceProvider',\n interfaces: [FrameOfReferenceProvider]\n };\n function MarginalFrameOfReference(geomBounds, adjustedDomain, coord, isDebugDrawing) {\n this.geomBounds_0 = geomBounds;\n this.adjustedDomain_0 = adjustedDomain;\n this.coord_0 = coord;\n this.isDebugDrawing_0 = isDebugDrawing;\n }\n MarginalFrameOfReference.prototype.drawBeforeGeomLayer_8icvvv$ = function (parent) {\n };\n MarginalFrameOfReference.prototype.drawAfterGeomLayer_8icvvv$ = function (parent) {\n if (this.isDebugDrawing_0) {\n var $receiver = SvgRectElement_init(this.geomBounds_0);\n $receiver.strokeColor().set_11rb$(Color.Companion.ORANGE);\n $receiver.fillColor().set_11rb$(Color.Companion.ORANGE);\n $receiver.strokeWidth().set_11rb$(0.0);\n $receiver.fillOpacity().set_11rb$(0.5);\n parent.add_26jijc$($receiver);\n }\n };\n MarginalFrameOfReference.prototype.buildGeomComponent_ge0scz$ = function (layer, targetCollector) {\n var layerComponent = SquareFrameOfReference$Companion_getInstance().buildGeom_y8ndk1$(layer, this.adjustedDomain_0, this.coord_0, false, targetCollector);\n layerComponent.moveTo_gpjtzr$(this.geomBounds_0.origin);\n layerComponent.clipBounds_wthzt5$(new DoubleRectangle(DoubleVector.Companion.ZERO, this.geomBounds_0.dimension));\n return layerComponent;\n };\n MarginalFrameOfReference.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'MarginalFrameOfReference',\n interfaces: [FrameOfReference]\n };\n function SquareFrameOfReference(hScaleBreaks, vScaleBreaks, adjustedDomain, coord, layoutInfo, marginsLayout, theme, flipAxis) {\n SquareFrameOfReference$Companion_getInstance();\n this.hScaleBreaks_0 = hScaleBreaks;\n this.vScaleBreaks_0 = vScaleBreaks;\n this.adjustedDomain_0 = adjustedDomain;\n this.coord_0 = coord;\n this.layoutInfo_0 = layoutInfo;\n this.marginsLayout_0 = marginsLayout;\n this.theme_0 = theme;\n this.flipAxis_0 = flipAxis;\n this.isDebugDrawing = false;\n }\n SquareFrameOfReference.prototype.drawBeforeGeomLayer_8icvvv$ = function (parent) {\n this.drawPanelAndAxis_0(parent, true);\n };\n SquareFrameOfReference.prototype.drawAfterGeomLayer_8icvvv$ = function (parent) {\n this.drawPanelAndAxis_0(parent, false);\n };\n SquareFrameOfReference.prototype.drawPanelAndAxis_0 = function (parent, beforeGeomLayer) {\n var tmp$, tmp$_0;\n var geomBounds = this.layoutInfo_0.geomInnerBounds;\n var geomOuterBounds = this.layoutInfo_0.geomOuterBounds;\n var panelTheme = this.theme_0.panel();\n var hAxisTheme = this.theme_0.horizontalAxis_6taknv$(this.flipAxis_0);\n var vAxisTheme = this.theme_0.verticalAxis_6taknv$(this.flipAxis_0);\n var hGridTheme = panelTheme.gridX_6taknv$(this.flipAxis_0);\n var vGridTheme = panelTheme.gridY_6taknv$(this.flipAxis_0);\n var drawPanel = panelTheme.showRect() && beforeGeomLayer;\n var drawPanelBorder = panelTheme.showBorder() && !beforeGeomLayer;\n var drawGridlines = beforeGeomLayer;\n if (beforeGeomLayer)\n tmp$ = !hAxisTheme.isOntop();\n else\n tmp$ = hAxisTheme.isOntop();\n var drawHAxis = tmp$;\n if (beforeGeomLayer)\n tmp$_0 = !vAxisTheme.isOntop();\n else\n tmp$_0 = vAxisTheme.isOntop();\n var drawVAxis = tmp$_0;\n if (drawPanel) {\n var panel = SquareFrameOfReference$Companion_getInstance().buildPanelComponent_0(geomBounds, panelTheme);\n parent.add_26jijc$(panel);\n }\n if (drawHAxis || drawGridlines) {\n var axisInfo = ensureNotNull(this.layoutInfo_0.hAxisInfo);\n var hAxis = SquareFrameOfReference$Companion_getInstance().buildAxis_0(this.hScaleBreaks_0, axisInfo, !drawHAxis, !this.layoutInfo_0.hAxisShown, !drawGridlines, this.coord_0, this.flipAxis_0, hAxisTheme, hGridTheme, geomBounds.height, SquareFrameOfReference$Companion_getInstance().gridLineDistance_0(geomBounds, geomOuterBounds, axisInfo.orientation), this.isDebugDrawing);\n var axisOrigin = this.marginsLayout_0.toAxisOrigin_gdlhkh$(geomBounds, axisInfo.orientation);\n hAxis.moveTo_gpjtzr$(axisOrigin);\n parent.add_8icvvv$(hAxis);\n }\n if (drawVAxis || drawGridlines) {\n var axisInfo_0 = ensureNotNull(this.layoutInfo_0.vAxisInfo);\n var vAxis = SquareFrameOfReference$Companion_getInstance().buildAxis_0(this.vScaleBreaks_0, axisInfo_0, !drawVAxis, !this.layoutInfo_0.vAxisShown, !drawGridlines, this.coord_0, this.flipAxis_0, vAxisTheme, vGridTheme, geomBounds.width, SquareFrameOfReference$Companion_getInstance().gridLineDistance_0(geomBounds, geomOuterBounds, axisInfo_0.orientation), this.isDebugDrawing);\n var axisOrigin_0 = this.marginsLayout_0.toAxisOrigin_gdlhkh$(geomBounds, axisInfo_0.orientation);\n vAxis.moveTo_gpjtzr$(axisOrigin_0);\n parent.add_8icvvv$(vAxis);\n }\n if (drawPanelBorder) {\n var panelBorder = SquareFrameOfReference$Companion_getInstance().buildPanelBorderComponent_0(geomBounds, panelTheme);\n parent.add_26jijc$(panelBorder);\n }\n if (this.isDebugDrawing && !beforeGeomLayer) {\n this.drawDebugShapes_0(parent, geomBounds);\n }\n };\n SquareFrameOfReference.prototype.drawDebugShapes_0 = function (parent, geomBounds) {\n var tileBounds = this.layoutInfo_0.bounds;\n var rect = SvgRectElement_init(tileBounds);\n rect.fillColor().set_11rb$(Color.Companion.BLACK);\n rect.strokeWidth().set_11rb$(0.0);\n rect.fillOpacity().set_11rb$(0.1);\n parent.add_26jijc$(rect);\n var rect_0 = SvgRectElement_init(geomBounds);\n rect_0.fillColor().set_11rb$(Color.Companion.PINK);\n rect_0.strokeWidth().set_11rb$(1.0);\n rect_0.fillOpacity().set_11rb$(0.5);\n parent.add_26jijc$(rect_0);\n };\n SquareFrameOfReference.prototype.buildGeomComponent_ge0scz$ = function (layer, targetCollector) {\n var layerComponent = SquareFrameOfReference$Companion_getInstance().buildGeom_y8ndk1$(layer, this.adjustedDomain_0, this.coord_0, this.flipAxis_0, targetCollector);\n var geomBounds = this.layoutInfo_0.geomInnerBounds;\n layerComponent.moveTo_gpjtzr$(geomBounds.origin);\n layerComponent.clipBounds_wthzt5$(new DoubleRectangle(DoubleVector.Companion.ZERO, geomBounds.dimension));\n return layerComponent;\n };\n function SquareFrameOfReference$Companion() {\n SquareFrameOfReference$Companion_instance = this;\n }\n function SquareFrameOfReference$Companion$buildAxis$drawDebugRect(closure$axis) {\n return function (r, color) {\n var rect = SvgRectElement_init(r);\n rect.strokeColor().set_11rb$(color);\n rect.strokeWidth().set_11rb$(1.0);\n rect.fillOpacity().set_11rb$(0.0);\n closure$axis.add_26jijc$(rect);\n };\n }\n SquareFrameOfReference$Companion.prototype.buildAxis_0 = function (scaleBreaks, info, hideAxis, hideAxisBreaks, hideGridlines, coord, flipAxis, axisTheme, gridTheme, gridLineLength, gridLineDistance, isDebugDrawing) {\n var tmp$;\n if (!!(hideAxis && hideGridlines)) {\n var message = 'Trying to build an empty axis component';\n throw IllegalStateException_init(message.toString());\n }\n var orientation = info.orientation;\n var labelAdjustments = new AxisComponent$TickLabelAdjustments(orientation, info.tickLabelHorizontalAnchor, info.tickLabelVerticalAnchor, info.tickLabelRotationAngle, info.tickLabelAdditionalOffsets);\n var breaksData = AxisUtil_getInstance().breaksData_zh7dbf$(scaleBreaks, coord, flipAxis, orientation.isHorizontal);\n var axis = new AxisComponent(info.axisLength, orientation, breaksData, labelAdjustments, gridLineLength, gridLineDistance, axisTheme, gridTheme, hideAxis, hideAxisBreaks, hideGridlines);\n if (isDebugDrawing) {\n var drawDebugRect = SquareFrameOfReference$Companion$buildAxis$drawDebugRect(axis);\n drawDebugRect(info.tickLabelsBounds, Color.Companion.GREEN);\n if ((tmp$ = info.tickLabelsTextBounds_8be2vx$) != null) {\n drawDebugRect(tmp$, Color.Companion.LIGHT_BLUE);\n }\n }\n return axis;\n };\n SquareFrameOfReference$Companion.prototype.buildPanelComponent_0 = function (bounds, theme) {\n var $receiver = SvgRectElement_init(bounds);\n $receiver.strokeColor().set_11rb$(theme.rectColor());\n $receiver.strokeWidth().set_11rb$(theme.rectStrokeWidth());\n $receiver.fillColor().set_11rb$(theme.rectFill());\n return $receiver;\n };\n SquareFrameOfReference$Companion.prototype.buildPanelBorderComponent_0 = function (bounds, theme) {\n var $receiver = SvgRectElement_init(bounds);\n $receiver.strokeColor().set_11rb$(theme.borderColor());\n $receiver.strokeWidth().set_11rb$(theme.borderWidth());\n $receiver.fillOpacity().set_11rb$(0.0);\n return $receiver;\n };\n SquareFrameOfReference$Companion.prototype.buildGeom_y8ndk1$ = function (layer, xyAesBounds, coord, flippedAxis, targetCollector) {\n var tmp$, tmp$_0;\n var rendererData = LayerRendererUtil_getInstance().createLayerRendererData_sqg2xh$(layer);\n var flippedAxis_0 = layer.isYOrientation ? !flippedAxis : flippedAxis;\n var aestheticMappers = rendererData.aestheticMappers;\n var aesthetics = rendererData.aesthetics;\n tmp$ = layer.isYOrientation;\n if (tmp$ === true)\n tmp$_0 = coord.flip();\n else if (tmp$ === false)\n tmp$_0 = coord;\n else\n tmp$_0 = Kotlin.noWhenBranchMatched();\n var coord_0 = tmp$_0;\n var block$result;\n if (flippedAxis_0) {\n block$result = targetCollector.withFlippedAxis();\n } else {\n block$result = targetCollector;\n }\n var it = block$result;\n var block$result_0;\n if (layer.isYOrientation) {\n block$result_0 = it.withYOrientation();\n } else {\n block$result_0 = it;\n }\n var targetCollector_0 = block$result_0;\n var ctx = GeomContextBuilder_init().flipped_6taknv$(flippedAxis_0).aesthetics_m7huy5$(aesthetics).aestheticMappers_yu359v$(aestheticMappers).aesBounds_wthzt5$(xyAesBounds).geomTargetCollector_xrq6q$(targetCollector_0).fontFamilyRegistry_exm2t6$(layer.fontFamilyRegistry).annotations_dq13fv$(rendererData.annotations).build();\n var pos = rendererData.pos;\n var geom = layer.geom;\n return new SvgLayerRenderer(aesthetics, geom, pos, coord_0, ctx);\n };\n SquareFrameOfReference$Companion.prototype.gridLineDistance_0 = function (geomInnerBounds, geomOuterBounds, orientation) {\n var tmp$;\n switch (orientation.name) {\n case 'LEFT':\n tmp$ = geomInnerBounds.left - geomOuterBounds.left;\n break;\n case 'RIGHT':\n tmp$ = geomOuterBounds.right - geomInnerBounds.right;\n break;\n case 'TOP':\n tmp$ = geomInnerBounds.top - geomOuterBounds.top;\n break;\n case 'BOTTOM':\n tmp$ = geomOuterBounds.bottom - geomInnerBounds.bottom;\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n SquareFrameOfReference$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var SquareFrameOfReference$Companion_instance = null;\n function SquareFrameOfReference$Companion_getInstance() {\n if (SquareFrameOfReference$Companion_instance === null) {\n new SquareFrameOfReference$Companion();\n }\n return SquareFrameOfReference$Companion_instance;\n }\n SquareFrameOfReference.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'SquareFrameOfReference',\n interfaces: [FrameOfReference]\n };\n function SquareFrameOfReferenceProvider(hScaleProto, vScaleProto, adjustedDomain, flipAxis, hAxisOrientation, vAxisOrientation, theme, marginsLayout, domainByMargin) {\n this.hScaleProto_0 = hScaleProto;\n this.vScaleProto_0 = vScaleProto;\n this.adjustedDomain_0 = adjustedDomain;\n this.flipAxis_l96n6m$_0 = flipAxis;\n this.hAxisOrientation_0 = hAxisOrientation;\n this.vAxisOrientation_0 = vAxisOrientation;\n this.theme_0 = theme;\n this.marginsLayout_0 = marginsLayout;\n this.domainByMargin_0 = domainByMargin;\n this.hAxisSpec_0 = null;\n this.vAxisSpec_0 = null;\n this.hAxisSpec_0 = new SquareFrameOfReferenceProvider$AxisSpec(AxisBreaksProviderFactory$Companion_getInstance().forScale_iu85h4$(this.hScaleProto_0), this.hScaleProto_0.name, this.theme_0.horizontalAxis_6taknv$(this.flipAxis));\n this.vAxisSpec_0 = new SquareFrameOfReferenceProvider$AxisSpec(AxisBreaksProviderFactory$Companion_getInstance().forScale_iu85h4$(this.vScaleProto_0), this.vScaleProto_0.name, this.theme_0.verticalAxis_6taknv$(this.flipAxis));\n this.hAxisLabel_toxcwv$_0 = this.hAxisSpec_0.theme.showTitle() ? this.hAxisSpec_0.label : null;\n this.vAxisLabel_jk9onl$_0 = this.vAxisSpec_0.theme.showTitle() ? this.vAxisSpec_0.label : null;\n }\n Object.defineProperty(SquareFrameOfReferenceProvider.prototype, 'flipAxis', {\n get: function () {\n return this.flipAxis_l96n6m$_0;\n }\n });\n Object.defineProperty(SquareFrameOfReferenceProvider.prototype, 'hAxisLabel', {\n configurable: true,\n get: function () {\n return this.hAxisLabel_toxcwv$_0;\n }\n });\n Object.defineProperty(SquareFrameOfReferenceProvider.prototype, 'vAxisLabel', {\n configurable: true,\n get: function () {\n return this.vAxisLabel_jk9onl$_0;\n }\n });\n SquareFrameOfReferenceProvider.prototype.createTileLayoutProvider = function () {\n var hAxisLayout = new PlotAxisLayout(this.hAxisSpec_0.breaksProviderFactory, this.hAxisSpec_0.theme, this.hAxisOrientation_0);\n var vAxisLayout = new PlotAxisLayout(this.vAxisSpec_0.breaksProviderFactory, this.vAxisSpec_0.theme, this.vAxisOrientation_0);\n return new SquareFrameOfReferenceProvider$MyTileLayoutProvider(hAxisLayout, vAxisLayout, this.adjustedDomain_0, this.marginsLayout_0);\n };\n SquareFrameOfReferenceProvider.prototype.createTileFrame_sd8y8$$default = function (layoutInfo, coordProvider, debugDrawing) {\n var hAxisLayoutInfo = ensureNotNull(layoutInfo.hAxisInfo);\n var vAxisLayoutInfo = ensureNotNull(layoutInfo.vAxisInfo);\n var client = new DoubleVector(hAxisLayoutInfo.axisLength, vAxisLayoutInfo.axisLength);\n var coord = coordProvider.createCoordinateSystem_26v79i$(this.adjustedDomain_0, client);\n var hScale = this.hScaleProto_0.with().breaks_pqjuzw$(hAxisLayoutInfo.axisBreaks.domainValues).labels_mhpeer$(hAxisLayoutInfo.axisBreaks.labels).build();\n var vScale = this.vScaleProto_0.with().breaks_pqjuzw$(vAxisLayoutInfo.axisBreaks.domainValues).labels_mhpeer$(vAxisLayoutInfo.axisBreaks.labels).build();\n var tileFrameOfReference = new SquareFrameOfReference(hScale.getScaleBreaks(), vScale.getScaleBreaks(), this.adjustedDomain_0, coord, layoutInfo, this.marginsLayout_0, this.theme_0, this.flipAxis);\n tileFrameOfReference.isDebugDrawing = debugDrawing;\n return tileFrameOfReference;\n };\n SquareFrameOfReferenceProvider.prototype.createMarginalFrames_sd8y8$ = function (tileLayoutInfo, coordProvider, debugDrawing) {\n if (this.domainByMargin_0.isEmpty()) {\n return emptyMap();\n }\n if (!!coordProvider.flipped) {\n var message = '`flipped` corrdinate system is not supported on plots with marginal layers.';\n throw IllegalStateException_init(message.toString());\n }\n var inner = tileLayoutInfo.geomInnerBounds;\n var outer = tileLayoutInfo.geomOuterBounds;\n var origins = mapOf([to(MarginSide$LEFT_getInstance(), new DoubleVector(outer.left, inner.top)), to(MarginSide$TOP_getInstance(), new DoubleVector(inner.left, outer.top)), to(MarginSide$RIGHT_getInstance(), new DoubleVector(inner.right, inner.top)), to(MarginSide$BOTTOM_getInstance(), new DoubleVector(inner.left, inner.bottom))]);\n var tmp$ = MarginSide$LEFT_getInstance();\n var b = inner.left - outer.left;\n var tmp$_0 = to(tmp$, new DoubleVector(JsMath.max(0.0, b), inner.height));\n var tmp$_1 = MarginSide$TOP_getInstance();\n var tmp$_2 = inner.width;\n var b_0 = inner.top - outer.top;\n var tmp$_3 = to(tmp$_1, new DoubleVector(tmp$_2, JsMath.max(0.0, b_0)));\n var tmp$_4 = MarginSide$RIGHT_getInstance();\n var b_1 = outer.right - inner.right;\n var tmp$_5 = to(tmp$_4, new DoubleVector(JsMath.max(0.0, b_1), inner.height));\n var tmp$_6 = MarginSide$BOTTOM_getInstance();\n var tmp$_7 = inner.width;\n var b_2 = outer.bottom - inner.bottom;\n var sizes = mapOf([tmp$_0, tmp$_3, tmp$_5, to(tmp$_6, new DoubleVector(tmp$_7, JsMath.max(0.0, b_2)))]);\n var destination = LinkedHashMap_init_0(mapCapacity(origins.size));\n var tmp$_8;\n tmp$_8 = origins.entries.iterator();\n while (tmp$_8.hasNext()) {\n var element = tmp$_8.next();\n var tmp$_9 = destination.put_xwzc9p$;\n var tmp$_10 = element.key;\n var margin = element.key;\n var origin = element.value;\n tmp$_9.call(destination, tmp$_10, new DoubleRectangle(origin, getValue(sizes, margin)));\n }\n var boundsByMargin = destination;\n var hAxisLayoutInfo = ensureNotNull(tileLayoutInfo.hAxisInfo);\n var vAxisLayoutInfo = ensureNotNull(tileLayoutInfo.vAxisInfo);\n var $receiver = this.domainByMargin_0;\n var destination_0 = LinkedHashMap_init_0(mapCapacity($receiver.size));\n var tmp$_11;\n tmp$_11 = $receiver.entries.iterator();\n while (tmp$_11.hasNext()) {\n var element_0 = tmp$_11.next();\n var tmp$_12 = destination_0.put_xwzc9p$;\n var tmp$_13 = element_0.key;\n var side = element_0.key;\n var domain = element_0.value;\n var tmp$_14, tmp$_15;\n switch (side.name) {\n case 'LEFT':\n case 'RIGHT':\n tmp$_14 = domain;\n break;\n case 'TOP':\n case 'BOTTOM':\n tmp$_14 = hAxisLayoutInfo.axisDomain;\n break;\n default:\n tmp$_14 = Kotlin.noWhenBranchMatched();\n break;\n }\n var hDomain = tmp$_14;\n switch (side.name) {\n case 'LEFT':\n case 'RIGHT':\n tmp$_15 = vAxisLayoutInfo.axisDomain;\n break;\n case 'TOP':\n case 'BOTTOM':\n tmp$_15 = domain;\n break;\n default:\n tmp$_15 = Kotlin.noWhenBranchMatched();\n break;\n }\n var vDomain = tmp$_15;\n var marginCoordProvider = new MarginalLayerCoordProvider();\n var clientSize = getValue(sizes, side);\n var adjustedDomain = DoubleRectangle_init_0(hDomain, vDomain);\n var coord = marginCoordProvider.createCoordinateSystem_26v79i$(adjustedDomain, clientSize);\n tmp$_12.call(destination_0, tmp$_13, new MarginalFrameOfReference(getValue(boundsByMargin, side), adjustedDomain, coord, debugDrawing));\n }\n return destination_0;\n };\n function SquareFrameOfReferenceProvider$AxisSpec(breaksProviderFactory, label, theme) {\n this.breaksProviderFactory = breaksProviderFactory;\n this.label = label;\n this.theme = theme;\n }\n SquareFrameOfReferenceProvider$AxisSpec.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'AxisSpec',\n interfaces: []\n };\n function SquareFrameOfReferenceProvider$MyTileLayoutProvider(hAxisLayout, vAxisLayout, adjustedDomain, marginsLayout) {\n this.hAxisLayout_0 = hAxisLayout;\n this.vAxisLayout_0 = vAxisLayout;\n this.adjustedDomain_0 = adjustedDomain;\n this.marginsLayout_0 = marginsLayout;\n }\n SquareFrameOfReferenceProvider$MyTileLayoutProvider.prototype.createTopDownTileLayout = function () {\n return new TopDownTileLayout(this.hAxisLayout_0, this.vAxisLayout_0, this.adjustedDomain_0.xRange(), this.adjustedDomain_0.yRange(), this.marginsLayout_0);\n };\n SquareFrameOfReferenceProvider$MyTileLayoutProvider.prototype.createInsideOutTileLayout = function () {\n return new InsideOutTileLayout(this.hAxisLayout_0, this.vAxisLayout_0, this.adjustedDomain_0.xRange(), this.adjustedDomain_0.yRange(), this.marginsLayout_0);\n };\n SquareFrameOfReferenceProvider$MyTileLayoutProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'MyTileLayoutProvider',\n interfaces: [TileLayoutProvider]\n };\n SquareFrameOfReferenceProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'SquareFrameOfReferenceProvider',\n interfaces: [FrameOfReferenceProvider]\n };\n function AxisComponent(length, orientation, breaksData, labelAdjustments, gridLineLength, gridLineDistance, axisTheme, gridTheme, hideAxis, hideAxisBreaks, hideGridlines) {\n if (labelAdjustments === void 0)\n labelAdjustments = new AxisComponent$TickLabelAdjustments(orientation);\n if (hideAxis === void 0)\n hideAxis = false;\n if (hideAxisBreaks === void 0)\n hideAxisBreaks = false;\n if (hideGridlines === void 0)\n hideGridlines = false;\n SvgComponent.call(this);\n this.length_0 = length;\n this.orientation_0 = orientation;\n this.breaksData_0 = breaksData;\n this.labelAdjustments_0 = labelAdjustments;\n this.gridLineLength_0 = gridLineLength;\n this.gridLineDistance_0 = gridLineDistance;\n this.axisTheme_0 = axisTheme;\n this.gridTheme_0 = gridTheme;\n this.hideAxis_0 = hideAxis;\n this.hideAxisBreaks_0 = hideAxisBreaks;\n this.hideGridlines_0 = hideGridlines;\n }\n AxisComponent.prototype.buildComponent = function () {\n this.buildAxis_0();\n };\n AxisComponent.prototype.buildAxis_0 = function () {\n var tmp$, tmp$_0;\n var rootElement = this.rootGroup;\n var x1;\n var y1;\n var x2;\n var y2;\n var start = 0.0;\n var end = this.length_0;\n switch (this.orientation_0.name) {\n case 'LEFT':\n case 'RIGHT':\n x1 = 0.0;\n x2 = 0.0;\n y1 = start;\n y2 = end;\n break;\n case 'TOP':\n case 'BOTTOM':\n x1 = start;\n x2 = end;\n y1 = 0.0;\n y2 = 0.0;\n break;\n default:\n Kotlin.noWhenBranchMatched();\n break;\n }\n if (!this.hideGridlines_0) {\n var gridLineMinPos = start + 6;\n var gridLineMaxPos = end - 6;\n if (this.gridTheme_0.showMinor()) {\n tmp$ = this.breaksData_0.minorBreaks.iterator();\n while (tmp$.hasNext()) {\n var br = tmp$.next();\n if (br >= gridLineMinPos && br <= gridLineMaxPos) {\n var elem = this.buildGridLine_0(br, this.gridTheme_0.minorLineWidth(), this.gridTheme_0.minorLineColor());\n rootElement.children().add_11rb$(elem);\n }\n }\n }\n if (this.gridTheme_0.showMajor()) {\n tmp$_0 = this.breaksData_0.majorBreaks.iterator();\n while (tmp$_0.hasNext()) {\n var br_0 = tmp$_0.next();\n if (br_0 >= gridLineMinPos && br_0 <= gridLineMaxPos) {\n var elem_0 = this.buildGridLine_0(br_0, this.gridTheme_0.majorLineWidth(), this.gridTheme_0.majorLineColor());\n rootElement.children().add_11rb$(elem_0);\n }\n }\n }\n }\n if (!this.hideAxis_0) {\n if (!this.hideAxisBreaks_0 && (this.axisTheme_0.showLabels() || this.axisTheme_0.showTickMarks())) {\n var labelsCleaner = new AxisComponent$TickLabelsCleaner(this.orientation_0.isHorizontal);\n var i = 0;\n for (var tmp$_1 = this.breaksData_0.majorBreaks.iterator(); tmp$_1.hasNext(); ++i) {\n var br_1 = tmp$_1.next();\n if (br_1 >= start && br_1 <= end) {\n var label = this.breaksData_0.majorLabels.get_za3lpa$(i % this.breaksData_0.majorLabels.size | 0);\n var labelOffset = this.tickLabelBaseOffset_0().add_gpjtzr$(this.labelAdjustments_0.additionalOffset_za3lpa$(i));\n var group = this.buildTick_0(label, labelOffset, !labelsCleaner.beforeAddLabel_yvo9jy$(br_1, this.labelAdjustments_0.rotationDegree, PlotLabelSpecFactory_getInstance().axisTick_9yvfuv$(this.axisTheme_0).height()), this.axisTheme_0);\n switch (this.orientation_0.name) {\n case 'LEFT':\n case 'RIGHT':\n svg_0.SvgUtils.transformTranslate_pw34rw$(group, 0.0, br_1);\n break;\n case 'TOP':\n case 'BOTTOM':\n svg_0.SvgUtils.transformTranslate_pw34rw$(group, br_1, 0.0);\n break;\n }\n rootElement.children().add_11rb$(group);\n }\n }\n }\n if (!this.hideAxisBreaks_0 && this.axisTheme_0.showLine()) {\n var $receiver = SvgLineElement_init(x1, y1, x2, y2);\n $receiver.strokeWidth().set_11rb$(this.axisTheme_0.lineWidth());\n $receiver.strokeColor().set_11rb$(this.axisTheme_0.lineColor());\n var axisLine = $receiver;\n rootElement.children().add_11rb$(axisLine);\n }\n }\n };\n AxisComponent.prototype.buildGridLine_0 = function (br, width, color) {\n var tmp$;\n var start = this.gridLineDistance_0;\n var end = start + this.gridLineLength_0;\n switch (this.orientation_0.name) {\n case 'LEFT':\n tmp$ = SvgLineElement_init(start, 0.0, end, 0.0);\n break;\n case 'RIGHT':\n tmp$ = SvgLineElement_init(-start, 0.0, -end, 0.0);\n break;\n case 'TOP':\n tmp$ = SvgLineElement_init(0.0, start, 0.0, end);\n break;\n case 'BOTTOM':\n tmp$ = SvgLineElement_init(0.0, -start, 0.0, -end);\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n var elem = tmp$;\n elem.strokeColor().set_11rb$(color);\n elem.strokeWidth().set_11rb$(width);\n switch (this.orientation_0.name) {\n case 'LEFT':\n case 'RIGHT':\n elem.y1().set_11rb$(br);\n elem.y2().set_11rb$(br);\n break;\n case 'TOP':\n case 'BOTTOM':\n elem.x1().set_11rb$(br);\n elem.x2().set_11rb$(br);\n break;\n }\n return elem;\n };\n AxisComponent.prototype.buildTick_0 = function (label, labelOffset, skipLabel, axisTheme) {\n var tickMark = null;\n if (axisTheme.showTickMarks()) {\n tickMark = new SvgLineElement();\n tickMark.strokeWidth().set_11rb$(axisTheme.tickMarkWidth());\n tickMark.strokeColor().set_11rb$(axisTheme.tickMarkColor());\n }\n var tickLabel = null;\n if (!skipLabel && axisTheme.showLabels()) {\n tickLabel = new TextLabel(label);\n tickLabel.addClassName_61zpoe$(Style_getInstance().AXIS_TEXT + '-' + axisTheme.axis);\n }\n var markLength = axisTheme.tickMarkLength();\n switch (this.orientation_0.name) {\n case 'LEFT':\n if (tickMark != null) {\n tickMark.x2().set_11rb$(-markLength);\n tickMark.y2().set_11rb$(0.0);\n }\n\n break;\n case 'RIGHT':\n if (tickMark != null) {\n tickMark.x2().set_11rb$(markLength);\n tickMark.y2().set_11rb$(0.0);\n }\n\n break;\n case 'TOP':\n if (tickMark != null) {\n tickMark.x2().set_11rb$(0.0);\n tickMark.y2().set_11rb$(-markLength);\n }\n\n break;\n case 'BOTTOM':\n if (tickMark != null) {\n tickMark.x2().set_11rb$(0.0);\n tickMark.y2().set_11rb$(markLength);\n }\n\n break;\n }\n var g = new SvgGElement();\n if (tickMark != null) {\n g.children().add_11rb$(tickMark);\n }\n if (tickLabel != null) {\n tickLabel.moveTo_lu1900$(labelOffset.x, labelOffset.y);\n tickLabel.setHorizontalAnchor_mf4siq$(this.labelAdjustments_0.horizontalAnchor);\n tickLabel.setVerticalAnchor_yaylw0$(this.labelAdjustments_0.verticalAnchor);\n tickLabel.rotate_14dthe$(this.labelAdjustments_0.rotationDegree);\n g.children().add_11rb$(tickLabel.rootGroup);\n }\n return g;\n };\n AxisComponent.prototype.tickLabelBaseOffset_0 = function () {\n var tmp$;\n var distance = this.axisTheme_0.tickLabelDistance_6taknv$(this.orientation_0.isHorizontal);\n switch (this.orientation_0.name) {\n case 'LEFT':\n tmp$ = new DoubleVector(this.axisTheme_0.tickLabelMargins().left - distance, 0.0);\n break;\n case 'RIGHT':\n tmp$ = new DoubleVector(distance - this.axisTheme_0.tickLabelMargins().right, 0.0);\n break;\n case 'TOP':\n tmp$ = new DoubleVector(0.0, this.axisTheme_0.tickLabelMargins().top - distance);\n break;\n case 'BOTTOM':\n tmp$ = new DoubleVector(0.0, distance - this.axisTheme_0.tickLabelMargins().bottom);\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n function AxisComponent$BreaksData(majorBreaks, majorLabels, minorBreaks) {\n if (minorBreaks === void 0)\n minorBreaks = null;\n this.majorBreaks = majorBreaks;\n this.majorLabels = majorLabels;\n var tmp$;\n if (minorBreaks != null)\n tmp$ = minorBreaks;\n else {\n var block$result;\n if (this.majorBreaks.size <= 1) {\n block$result = emptyList();\n } else {\n var $receiver = zip(this.majorBreaks.subList_vux9f0$(0, this.majorBreaks.size - 1 | 0), this.majorBreaks.subList_vux9f0$(1, this.majorBreaks.size));\n var tmp$_0;\n var accumulator = ArrayList_init();\n tmp$_0 = $receiver.iterator();\n while (tmp$_0.hasNext()) {\n var element = tmp$_0.next();\n var l = accumulator;\n l.add_11rb$((element.second - element.first) / 2 + element.first);\n accumulator = l;\n }\n var minorBreaks_0 = accumulator;\n var iterator = take(this.majorBreaks, 2).iterator();\n if (!iterator.hasNext())\n throw UnsupportedOperationException_init(\"Empty collection can't be reduced.\");\n var accumulator_0 = iterator.next();\n while (iterator.hasNext()) {\n var first_0 = accumulator_0;\n accumulator_0 = iterator.next() - first_0;\n }\n var $receiver_0 = accumulator_0;\n minorBreaks_0.add_wxm5ur$(0, first(minorBreaks_0) - $receiver_0);\n var iterator_0 = takeLast(this.majorBreaks, 2).iterator();\n if (!iterator_0.hasNext())\n throw UnsupportedOperationException_init(\"Empty collection can't be reduced.\");\n var accumulator_1 = iterator_0.next();\n while (iterator_0.hasNext()) {\n var first_1 = accumulator_1;\n accumulator_1 = iterator_0.next() - first_1;\n }\n var $receiver_1 = accumulator_1;\n minorBreaks_0.add_wxm5ur$(0, last(minorBreaks_0) + $receiver_1);\n block$result = minorBreaks_0;\n }\n tmp$ = block$result;\n }\n this.minorBreaks = tmp$;\n }\n AxisComponent$BreaksData.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'BreaksData',\n interfaces: []\n };\n function AxisComponent$TickLabelAdjustments(orientation, horizontalAnchor, verticalAnchor, rotationDegree, additionalOffsets) {\n if (horizontalAnchor === void 0)\n horizontalAnchor = null;\n if (verticalAnchor === void 0)\n verticalAnchor = null;\n if (rotationDegree === void 0)\n rotationDegree = 0.0;\n if (additionalOffsets === void 0)\n additionalOffsets = null;\n this.rotationDegree = rotationDegree;\n this.additionalOffsets_0 = additionalOffsets;\n var tmp$, tmp$_0;\n if (horizontalAnchor == null) {\n switch (orientation.name) {\n case 'LEFT':\n tmp$ = Text$HorizontalAnchor.RIGHT;\n break;\n case 'RIGHT':\n tmp$ = Text$HorizontalAnchor.LEFT;\n break;\n case 'TOP':\n case 'BOTTOM':\n tmp$ = Text$HorizontalAnchor.MIDDLE;\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n horizontalAnchor = tmp$;\n }\n this.horizontalAnchor = horizontalAnchor;\n if (verticalAnchor == null) {\n switch (orientation.name) {\n case 'LEFT':\n case 'RIGHT':\n tmp$_0 = Text$VerticalAnchor.CENTER;\n break;\n case 'TOP':\n tmp$_0 = Text$VerticalAnchor.BOTTOM;\n break;\n case 'BOTTOM':\n tmp$_0 = Text$VerticalAnchor.TOP;\n break;\n default:\n tmp$_0 = Kotlin.noWhenBranchMatched();\n break;\n }\n verticalAnchor = tmp$_0;\n }\n this.verticalAnchor = verticalAnchor;\n }\n AxisComponent$TickLabelAdjustments.prototype.additionalOffset_za3lpa$ = function (tickIndex) {\n var tmp$, tmp$_0;\n return (tmp$_0 = (tmp$ = this.additionalOffsets_0) != null ? tmp$.get_za3lpa$(tickIndex) : null) != null ? tmp$_0 : DoubleVector.Companion.ZERO;\n };\n AxisComponent$TickLabelAdjustments.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TickLabelAdjustments',\n interfaces: []\n };\n function AxisComponent$TickLabelsCleaner(horizontalAxis) {\n this.horizontalAxis = horizontalAxis;\n this.filledRanges_0 = ArrayList_init();\n }\n AxisComponent$TickLabelsCleaner.prototype.beforeAddLabel_yvo9jy$ = function (loc, rotationDegree, axisTickHeight) {\n if (!this.isRelevant_0(rotationDegree))\n return true;\n var $receiver = this.filledRanges_0;\n var any$result;\n any$break: do {\n var tmp$;\n if (Kotlin.isType($receiver, Collection) && $receiver.isEmpty()) {\n any$result = false;\n break any$break;\n }\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n if (element.contains_14dthe$(loc) || element.contains_14dthe$(loc + axisTickHeight)) {\n any$result = true;\n break any$break;\n }\n }\n any$result = false;\n }\n while (false);\n if (any$result) {\n return false;\n }\n this.filledRanges_0.add_11rb$(new DoubleSpan(loc, loc + axisTickHeight));\n return true;\n };\n AxisComponent$TickLabelsCleaner.prototype.isRelevant_0 = function (rotationDegree) {\n var tmp$;\n if (this.horizontalAxis)\n tmp$ = this.isVertical_0(rotationDegree);\n else\n tmp$ = this.isHorizontal_0(rotationDegree);\n return tmp$;\n };\n AxisComponent$TickLabelsCleaner.prototype.isHorizontal_0 = function (rotationDegree) {\n return rotationDegree % 180 === 0.0;\n };\n AxisComponent$TickLabelsCleaner.prototype.isVertical_0 = function (rotationDegree) {\n return rotationDegree / 90 % 2 === 1.0;\n };\n AxisComponent$TickLabelsCleaner.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TickLabelsCleaner',\n interfaces: []\n };\n AxisComponent.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'AxisComponent',\n interfaces: [SvgComponent]\n };\n function ColorBarComponent(spec) {\n LegendBox.call(this);\n this.spec_xr0de$_0 = spec;\n }\n Object.defineProperty(ColorBarComponent.prototype, 'spec', {\n get: function () {\n return this.spec_xr0de$_0;\n }\n });\n ColorBarComponent.prototype.appendGuideContent_26jijc$ = function (contentRoot) {\n var tmp$, tmp$_0;\n var layout = this.spec.layout;\n var guideBarGroup = new SvgGElement();\n var barBounds = layout.barBounds;\n var horizontal = layout.isHorizontal;\n this.addColorBar_0(guideBarGroup, this.spec.domain, this.spec.scaleMapper, this.spec.binCount, barBounds, layout.barLengthExpand, horizontal, this.spec.reverse);\n if (horizontal)\n tmp$ = barBounds.height;\n else\n tmp$ = barBounds.width;\n var barThickness = tmp$;\n var tickLength = barThickness / 5;\n var breakInfos = layout.breakInfos_8be2vx$.iterator();\n tmp$_0 = this.spec.breaks.labels.iterator();\n while (tmp$_0.hasNext()) {\n var brLabel = tmp$_0.next();\n var brInfo = breakInfos.next();\n var tickLocation = brInfo.tickLocation;\n var tickMarkPoints = ArrayList_init();\n if (horizontal) {\n var tickX = barBounds.left + tickLocation;\n tickMarkPoints.add_11rb$(new DoubleVector(tickX, barBounds.top));\n tickMarkPoints.add_11rb$(new DoubleVector(tickX, barBounds.top + tickLength));\n tickMarkPoints.add_11rb$(new DoubleVector(tickX, barBounds.bottom - tickLength));\n tickMarkPoints.add_11rb$(new DoubleVector(tickX, barBounds.bottom));\n } else {\n var tickY = barBounds.top + tickLocation;\n tickMarkPoints.add_11rb$(new DoubleVector(barBounds.left, tickY));\n tickMarkPoints.add_11rb$(new DoubleVector(barBounds.left + tickLength, tickY));\n tickMarkPoints.add_11rb$(new DoubleVector(barBounds.right - tickLength, tickY));\n tickMarkPoints.add_11rb$(new DoubleVector(barBounds.right, tickY));\n }\n this.addTickMark_0(guideBarGroup, tickMarkPoints.get_za3lpa$(0), tickMarkPoints.get_za3lpa$(1));\n this.addTickMark_0(guideBarGroup, tickMarkPoints.get_za3lpa$(2), tickMarkPoints.get_za3lpa$(3));\n var label = new TextLabel(brLabel);\n label.addClassName_61zpoe$(Style_getInstance().LEGEND_ITEM);\n label.setHorizontalAnchor_mf4siq$(brInfo.labelHorizontalAnchor);\n label.setVerticalAnchor_yaylw0$(brInfo.labelVerticalAnchor);\n label.moveTo_lu1900$(brInfo.labelLocation.x, brInfo.labelLocation.y + barBounds.top);\n guideBarGroup.children().add_11rb$(label.rootGroup);\n }\n if (this.debug) {\n var graphBounds = new DoubleRectangle(DoubleVector.Companion.ZERO, layout.graphSize);\n guideBarGroup.children().add_11rb$(LegendBox$Companion_getInstance().createTransparentRect_a5dgib$(graphBounds, Color.Companion.DARK_BLUE, 1.0));\n }\n contentRoot.children().add_11rb$(guideBarGroup);\n return layout.size;\n };\n ColorBarComponent.prototype.addColorBar_0 = function (g, domain, mapper, numBins, barBounds, barLengthExpand, horizontal, reverse_0) {\n var tmp$;\n var domainSpan = domain.length;\n var stepCount = JsMath.max(2, numBins);\n var step = domainSpan / stepCount;\n var v = domain.lowerEnd + step / 2;\n var domainValues = ArrayList_init();\n for (var i = 0; i < stepCount; i++) {\n domainValues.add_11rb$(v + step * i);\n }\n if (reverse_0) {\n reverse(domainValues);\n }\n var destination = ArrayList_init_0(collectionSizeOrDefault(domainValues, 10));\n var tmp$_0;\n tmp$_0 = domainValues.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n destination.add_11rb$(mapper.invoke_yrwdxb$(item));\n }\n var colors = destination;\n if (horizontal)\n tmp$ = barBounds.width;\n else\n tmp$ = barBounds.height;\n var barLength = tmp$;\n var effectiveBarLength = barLength - barLengthExpand * 2;\n var segmentStep = effectiveBarLength / stepCount;\n var segmentLeft = barBounds.left;\n var segmentRight = barBounds.right;\n var segmentBottom = barBounds.bottom;\n var segmentTop = barBounds.top;\n var i_0 = 0;\n for (var tmp$_1 = colors.iterator(); tmp$_1.hasNext(); ++i_0) {\n var color = tmp$_1.next();\n var r = SvgRectElement_init_0(segmentLeft, segmentTop, segmentRight - segmentLeft, segmentBottom - segmentTop);\n r.strokeWidth().set_11rb$(0.0);\n r.fillColor().set_11rb$(color);\n g.children().add_11rb$(r);\n if (horizontal) {\n segmentLeft += segmentStep;\n } else {\n segmentTop += segmentStep;\n }\n if (i_0 === 0) {\n if (horizontal) {\n segmentLeft += barLengthExpand;\n } else {\n segmentTop += barLengthExpand;\n }\n }\n }\n };\n ColorBarComponent.prototype.addTickMark_0 = function (g, p0, p1) {\n var line = SvgLineElement_init(p0.x, p0.y, p1.x, p1.y);\n line.strokeWidth().set_11rb$(1.0);\n line.strokeColor().set_11rb$(this.theme.backgroundFill());\n g.children().add_11rb$(line);\n };\n ColorBarComponent.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ColorBarComponent',\n interfaces: [LegendBox]\n };\n function ColorBarComponentLayout(title, domain, breaks, guideBarSize, legendDirection, reverse, theme) {\n ColorBarComponentLayout$Companion_getInstance();\n LegendBoxLayout.call(this, title, legendDirection, theme);\n this.guideBarSize = guideBarSize;\n this.barBounds_qhvd9h$_0 = null;\n this.barLengthExpand = 2.0;\n this.breakInfos_8be2vx$ = null;\n var guideBarLength = this.guideBarLength;\n var targetRange = new DoubleSpan(0.0 + this.barLengthExpand, guideBarLength - this.barLengthExpand);\n var mapper = scale.Mappers.linear_jbbmpz$(domain, targetRange, reverse);\n var $receiver = breaks.transformedValues;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n var tmp$_0 = destination.add_11rb$;\n var tickLocation = ensureNotNull(mapper.invoke_yrwdxb$(item));\n tmp$_0.call(destination, this.createBreakInfo_14dthe$(tickLocation));\n }\n this.breakInfos_8be2vx$ = destination;\n this.barBounds = new DoubleRectangle(DoubleVector.Companion.ZERO, this.guideBarSize);\n }\n Object.defineProperty(ColorBarComponentLayout.prototype, 'barBounds', {\n configurable: true,\n get: function () {\n return this.barBounds_qhvd9h$_0;\n },\n set: function (barBounds) {\n this.barBounds_qhvd9h$_0 = barBounds;\n }\n });\n function ColorBarComponentLayout$BreakInfo(tickLocation, labelLocation, labelHorizontalAnchor, labelVerticalAnchor) {\n this.tickLocation = tickLocation;\n this.labelLocation = labelLocation;\n this.labelHorizontalAnchor = labelHorizontalAnchor;\n this.labelVerticalAnchor = labelVerticalAnchor;\n }\n ColorBarComponentLayout$BreakInfo.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'BreakInfo',\n interfaces: []\n };\n function ColorBarComponentLayout$HorizontalLayout(title, domain, breaks, barSize, reverse, theme) {\n ColorBarComponentLayout.call(this, title, domain, breaks, barSize, LegendDirection$HORIZONTAL_getInstance(), reverse, theme);\n this.graphSize_4lks14$_0 = null;\n this.graphSize_4lks14$_0 = new DoubleVector(this.guideBarSize.x, this.guideBarSize.y + this.labelDistance_0 + PlotLabelSpecFactory_getInstance().legendItem_730mk3$(theme).height());\n }\n Object.defineProperty(ColorBarComponentLayout$HorizontalLayout.prototype, 'graphSize', {\n configurable: true,\n get: function () {\n return this.graphSize_4lks14$_0;\n }\n });\n Object.defineProperty(ColorBarComponentLayout$HorizontalLayout.prototype, 'labelDistance_0', {\n configurable: true,\n get: function () {\n return PlotLabelSpecFactory_getInstance().legendItem_730mk3$(this.theme).height() / 3;\n }\n });\n Object.defineProperty(ColorBarComponentLayout$HorizontalLayout.prototype, 'guideBarLength', {\n configurable: true,\n get: function () {\n return this.guideBarSize.x;\n }\n });\n ColorBarComponentLayout$HorizontalLayout.prototype.createBreakInfo_14dthe$ = function (tickLocation) {\n var labelLocation = new DoubleVector(tickLocation, this.guideBarSize.y + this.labelDistance_0);\n return new ColorBarComponentLayout$BreakInfo(tickLocation, labelLocation, Text$HorizontalAnchor.MIDDLE, Text$VerticalAnchor.TOP);\n };\n ColorBarComponentLayout$HorizontalLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'HorizontalLayout',\n interfaces: [ColorBarComponentLayout]\n };\n function ColorBarComponentLayout$VerticalLayout(title, domain, breaks, barSize, reverse, theme) {\n ColorBarComponentLayout.call(this, title, domain, breaks, barSize, LegendDirection$VERTICAL_getInstance(), reverse, theme);\n this.graphSize_ld8mnu$_0 = null;\n if (!!breaks.isEmpty) {\n var message = 'Colorbar VerticalLayout received empty breaks list.';\n throw IllegalStateException_init(message.toString());\n }\n var iterator = breaks.labels.iterator();\n if (!iterator.hasNext())\n throw NoSuchElementException_init();\n var it = iterator.next();\n var maxValue = PlotLabelSpecFactory_getInstance().legendItem_730mk3$(theme).width_61zpoe$(it);\n while (iterator.hasNext()) {\n var it_0 = iterator.next();\n var v = PlotLabelSpecFactory_getInstance().legendItem_730mk3$(theme).width_61zpoe$(it_0);\n maxValue = JsMath.max(maxValue, v);\n }\n var maxLabelWidth = maxValue;\n this.graphSize_ld8mnu$_0 = new DoubleVector(this.guideBarSize.x + this.labelDistance_0 + maxLabelWidth, this.guideBarSize.y);\n }\n Object.defineProperty(ColorBarComponentLayout$VerticalLayout.prototype, 'graphSize', {\n configurable: true,\n get: function () {\n return this.graphSize_ld8mnu$_0;\n }\n });\n Object.defineProperty(ColorBarComponentLayout$VerticalLayout.prototype, 'labelDistance_0', {\n configurable: true,\n get: function () {\n return PlotLabelSpecFactory_getInstance().legendItem_730mk3$(this.theme).width_61zpoe$(PlotLabelSpecFactory_getInstance().DISTANCE_TO_LABEL_IN_CHARS) / 2;\n }\n });\n Object.defineProperty(ColorBarComponentLayout$VerticalLayout.prototype, 'guideBarLength', {\n configurable: true,\n get: function () {\n return this.guideBarSize.y;\n }\n });\n ColorBarComponentLayout$VerticalLayout.prototype.createBreakInfo_14dthe$ = function (tickLocation) {\n var labelLocation = new DoubleVector(this.guideBarSize.x + this.labelDistance_0, tickLocation);\n return new ColorBarComponentLayout$BreakInfo(tickLocation, labelLocation, Text$HorizontalAnchor.LEFT, Text$VerticalAnchor.CENTER);\n };\n ColorBarComponentLayout$VerticalLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'VerticalLayout',\n interfaces: [ColorBarComponentLayout]\n };\n function ColorBarComponentLayout$Companion() {\n ColorBarComponentLayout$Companion_instance = this;\n }\n ColorBarComponentLayout$Companion.prototype.horizontal_6u4c86$ = function (title, domain, breaks, barSize, reverse, theme) {\n return new ColorBarComponentLayout$HorizontalLayout(title, domain, breaks, barSize, reverse, theme);\n };\n ColorBarComponentLayout$Companion.prototype.vertical_6u4c86$ = function (title, domain, breaks, barSize, reverse, theme) {\n return new ColorBarComponentLayout$VerticalLayout(title, domain, breaks, barSize, reverse, theme);\n };\n ColorBarComponentLayout$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ColorBarComponentLayout$Companion_instance = null;\n function ColorBarComponentLayout$Companion_getInstance() {\n if (ColorBarComponentLayout$Companion_instance === null) {\n new ColorBarComponentLayout$Companion();\n }\n return ColorBarComponentLayout$Companion_instance;\n }\n ColorBarComponentLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ColorBarComponentLayout',\n interfaces: [LegendBoxLayout]\n };\n function ColorBarComponentSpec(title, domain, breaks, scaleMapper, binCount, theme, layout, reverse) {\n ColorBarComponentSpec$Companion_getInstance();\n LegendBoxSpec.call(this, title, theme, reverse);\n this.domain = domain;\n this.breaks = breaks;\n this.scaleMapper = scaleMapper;\n this.binCount = binCount;\n this.layout_smwmum$_0 = layout;\n }\n Object.defineProperty(ColorBarComponentSpec.prototype, 'layout', {\n get: function () {\n return this.layout_smwmum$_0;\n }\n });\n function ColorBarComponentSpec$Companion() {\n ColorBarComponentSpec$Companion_instance = this;\n this.DEF_NUM_BIN = 20;\n this.DEF_BAR_THICKNESS_0 = 1.0;\n this.DEF_BAR_LENGTH_0 = 5.0;\n }\n ColorBarComponentSpec$Companion.prototype.barAbsoluteSize_kkcal5$ = function (horizontal, theme) {\n var tmp$;\n if (horizontal)\n tmp$ = new DoubleVector(this.DEF_BAR_LENGTH_0 * theme.keySize(), this.DEF_BAR_THICKNESS_0 * theme.keySize());\n else\n tmp$ = new DoubleVector(this.DEF_BAR_THICKNESS_0 * theme.keySize(), this.DEF_BAR_LENGTH_0 * theme.keySize());\n return tmp$;\n };\n ColorBarComponentSpec$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ColorBarComponentSpec$Companion_instance = null;\n function ColorBarComponentSpec$Companion_getInstance() {\n if (ColorBarComponentSpec$Companion_instance === null) {\n new ColorBarComponentSpec$Companion();\n }\n return ColorBarComponentSpec$Companion_instance;\n }\n ColorBarComponentSpec.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ColorBarComponentSpec',\n interfaces: [LegendBoxSpec]\n };\n function LegendArrangement(name, ordinal) {\n Enum.call(this);\n this.name$ = name;\n this.ordinal$ = ordinal;\n }\n function LegendArrangement_initFields() {\n LegendArrangement_initFields = function () {\n };\n LegendArrangement$HORIZONTAL_instance = new LegendArrangement('HORIZONTAL', 0);\n LegendArrangement$VERTICAL_instance = new LegendArrangement('VERTICAL', 1);\n }\n var LegendArrangement$HORIZONTAL_instance;\n function LegendArrangement$HORIZONTAL_getInstance() {\n LegendArrangement_initFields();\n return LegendArrangement$HORIZONTAL_instance;\n }\n var LegendArrangement$VERTICAL_instance;\n function LegendArrangement$VERTICAL_getInstance() {\n LegendArrangement_initFields();\n return LegendArrangement$VERTICAL_instance;\n }\n LegendArrangement.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendArrangement',\n interfaces: [Enum]\n };\n function LegendArrangement$values() {\n return [LegendArrangement$HORIZONTAL_getInstance(), LegendArrangement$VERTICAL_getInstance()];\n }\n LegendArrangement.values = LegendArrangement$values;\n function LegendArrangement$valueOf(name) {\n switch (name) {\n case 'HORIZONTAL':\n return LegendArrangement$HORIZONTAL_getInstance();\n case 'VERTICAL':\n return LegendArrangement$VERTICAL_getInstance();\n default:\n throwISE('No enum constant jetbrains.datalore.plot.builder.guide.LegendArrangement.' + name);\n }\n }\n LegendArrangement.valueOf_61zpoe$ = LegendArrangement$valueOf;\n function LegendBox() {\n LegendBox$Companion_getInstance();\n SvgComponent.call(this);\n this.debug = false;\n }\n Object.defineProperty(LegendBox.prototype, 'theme', {\n configurable: true,\n get: function () {\n return this.spec.theme;\n }\n });\n Object.defineProperty(LegendBox.prototype, 'title_aaysjy$_0', {\n configurable: true,\n get: function () {\n return this.spec.title;\n }\n });\n Object.defineProperty(LegendBox.prototype, 'size', {\n configurable: true,\n get: function () {\n return this.spec.size;\n }\n });\n LegendBox.prototype.hasTitle_kmjss0$_0 = function () {\n return this.spec.hasTitle();\n };\n LegendBox.prototype.buildComponent = function () {\n if (this.theme.showBackground()) {\n var $receiver = SvgRectElement_init(this.spec.innerBounds);\n $receiver.strokeColor().set_11rb$(this.theme.backgroundColor());\n $receiver.strokeWidth().set_11rb$(this.theme.backgroundStrokeWidth());\n $receiver.fillColor().set_11rb$(this.theme.backgroundFill());\n this.add_26jijc$($receiver);\n }\n var innerGroup = new SvgGElement();\n innerGroup.transform().set_11rb$(SvgComponent.Companion.buildTransform_e1sv3v$(this.spec.contentOrigin, 0.0));\n var l = this.spec.layout;\n var block$result;\n block$break: do {\n var tmp$;\n if (!this.hasTitle_kmjss0$_0()) {\n block$result = new DoubleRectangle(DoubleVector.Companion.ZERO, DoubleVector.Companion.ZERO);\n break block$break;\n }\n if (l.isHorizontal)\n tmp$ = this.spec.contentBounds.dimension.subtract_gpjtzr$(new DoubleVector(l.graphSize.x, 0.0));\n else {\n tmp$ = new DoubleVector(this.spec.contentBounds.width, l.titleSize_8be2vx$.y);\n }\n var titleRectSize = tmp$;\n block$result = new DoubleRectangle(DoubleVector.Companion.ZERO, titleRectSize);\n }\n while (false);\n var titleBoundingRect = block$result;\n if (this.hasTitle_kmjss0$_0()) {\n var label = this.createTitleLabel_mqkgsb$_0(titleBoundingRect, l.titleSize_8be2vx$, this.theme.titleJustification());\n innerGroup.children().add_11rb$(label.rootGroup);\n }\n var graphGroup = new SvgGElement();\n graphGroup.transform().set_11rb$(SvgComponent.Companion.buildTransform_e1sv3v$(l.graphOrigin, 0.0));\n this.appendGuideContent_26jijc$(graphGroup);\n innerGroup.children().add_11rb$(graphGroup);\n if (this.debug) {\n var outerBounds = new DoubleRectangle(DoubleVector.Companion.ZERO, this.spec.size);\n this.add_26jijc$(LegendBox$Companion_getInstance().createTransparentRect_a5dgib$(outerBounds, Color.Companion.CYAN, 1.0));\n var rect = SvgRectElement_init(this.spec.innerBounds);\n rect.fillColor().set_11rb$(Color.Companion.BLACK);\n rect.strokeWidth().set_11rb$(0.0);\n rect.fillOpacity().set_11rb$(0.1);\n this.add_26jijc$(rect);\n this.add_26jijc$(LegendBox$Companion_getInstance().createTransparentRect_a5dgib$(this.spec.contentBounds, Color.Companion.DARK_MAGENTA, 1.0));\n var rect_0 = titleBoundingRect.add_gpjtzr$(this.spec.contentOrigin);\n this.add_26jijc$(LegendBox$Companion_getInstance().createTransparentRect_a5dgib$(rect_0, Color.Companion.MAGENTA, 1.0));\n var textDimensions = PlotLayoutUtil_getInstance().textDimensions_1al14g$(this.title_aaysjy$_0, PlotLabelSpecFactory_getInstance().legendTitle_730mk3$(this.theme));\n var titleBoundingBox = DoubleRectangle_init(this.spec.contentBounds.left, this.spec.contentBounds.top, textDimensions.x, textDimensions.y);\n this.add_26jijc$(LegendBox$Companion_getInstance().createTransparentRect_a5dgib$(titleBoundingBox, Color.Companion.DARK_GREEN, 1.0));\n }\n this.add_26jijc$(innerGroup);\n };\n LegendBox.prototype.createTitleLabel_mqkgsb$_0 = function (boundRect, titleSize, justification) {\n var lineHeight = PlotLabelSpecFactory_getInstance().legendTitle_730mk3$(this.theme).height();\n var label = new MultilineLabel(this.title_aaysjy$_0);\n var tmp$ = TextJustification$Companion_getInstance().applyJustification_x3kzr8$(boundRect, titleSize, lineHeight, justification);\n var pos = tmp$.component1()\n , hAnchor = tmp$.component2();\n label.addClassName_61zpoe$(Style_getInstance().LEGEND_TITLE);\n label.setHorizontalAnchor_mf4siq$(hAnchor);\n label.setLineHeight_14dthe$(lineHeight);\n label.moveTo_gpjtzr$(pos);\n return label;\n };\n function LegendBox$Companion() {\n LegendBox$Companion_instance = this;\n }\n LegendBox$Companion.prototype.createTransparentRect_a5dgib$ = function (bounds, strokeColor, strokeWidth) {\n var rect = SvgRectElement_init(bounds);\n rect.strokeColor().set_11rb$(strokeColor);\n rect.strokeWidth().set_11rb$(strokeWidth);\n rect.fillOpacity().set_11rb$(0.0);\n return rect;\n };\n LegendBox$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var LegendBox$Companion_instance = null;\n function LegendBox$Companion_getInstance() {\n if (LegendBox$Companion_instance === null) {\n new LegendBox$Companion();\n }\n return LegendBox$Companion_instance;\n }\n LegendBox.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendBox',\n interfaces: [SvgComponent]\n };\n function LegendBoxLayout(title, legendDirection, theme) {\n this.title_47v7cs$_0 = title;\n this.theme = theme;\n this.isHorizontal = legendDirection === LegendDirection$HORIZONTAL_getInstance();\n }\n Object.defineProperty(LegendBoxLayout.prototype, 'titleBounds_27vr67$_0', {\n configurable: true,\n get: function () {\n return new DoubleRectangle(DoubleVector.Companion.ZERO, this.titleSize_8be2vx$);\n }\n });\n Object.defineProperty(LegendBoxLayout.prototype, 'graphOrigin', {\n configurable: true,\n get: function () {\n if (this.isHorizontal) {\n var $receiver = this.titleSize_8be2vx$;\n return new DoubleVector($receiver.x, $receiver.y > this.graphSize.y ? ($receiver.y - this.graphSize.y) / 2 : 0.0);\n } else\n return new DoubleVector(0.0, this.titleSize_8be2vx$.y + PlotLabelSpecFactory_getInstance().legendTitle_730mk3$(this.theme).height() / 2);\n }\n });\n Object.defineProperty(LegendBoxLayout.prototype, 'size', {\n configurable: true,\n get: function () {\n var graphBounds = new DoubleRectangle(this.graphOrigin, this.graphSize);\n var titleAndContent = (new DoubleRectangle(DoubleVector.Companion.ZERO, DoubleVector.Companion.ZERO)).union_wthzt5$(this.titleBounds_27vr67$_0).union_wthzt5$(graphBounds);\n return titleAndContent.dimension;\n }\n });\n Object.defineProperty(LegendBoxLayout.prototype, 'titleSize_8be2vx$', {\n configurable: true,\n get: function () {\n var tmp$;\n if (isBlank(this.title_47v7cs$_0))\n tmp$ = DoubleVector.Companion.ZERO;\n else\n tmp$ = PlotLayoutUtil_getInstance().textDimensions_1al14g$(this.title_47v7cs$_0, PlotLabelSpecFactory_getInstance().legendTitle_730mk3$(this.theme));\n return tmp$;\n }\n });\n LegendBoxLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendBoxLayout',\n interfaces: []\n };\n function LegendBoxSpec(title, theme, reverse) {\n this.title = title;\n this.theme = theme;\n this.reverse = reverse;\n this.contentOrigin = null;\n this.fullContentExtend_5hau13$_0 = null;\n this.innerOrigin_3w1y5t$_0 = null;\n this.innerContentExtend_wllzuc$_0 = null;\n var contentExpand = this.theme.margin() + this.theme.padding();\n this.contentOrigin = new DoubleVector(contentExpand, contentExpand);\n this.fullContentExtend_5hau13$_0 = new DoubleVector(contentExpand * 2, contentExpand * 2);\n this.innerOrigin_3w1y5t$_0 = new DoubleVector(this.theme.margin(), this.theme.margin());\n this.innerContentExtend_wllzuc$_0 = new DoubleVector(this.theme.padding() * 2, this.theme.padding() * 2);\n }\n Object.defineProperty(LegendBoxSpec.prototype, 'contentSize_cb71ch$_0', {\n configurable: true,\n get: function () {\n return this.layout.size;\n }\n });\n Object.defineProperty(LegendBoxSpec.prototype, 'size', {\n configurable: true,\n get: function () {\n return this.contentSize_cb71ch$_0.add_gpjtzr$(this.fullContentExtend_5hau13$_0);\n }\n });\n Object.defineProperty(LegendBoxSpec.prototype, 'innerBounds', {\n configurable: true,\n get: function () {\n return new DoubleRectangle(this.innerOrigin_3w1y5t$_0, this.contentSize_cb71ch$_0.add_gpjtzr$(this.innerContentExtend_wllzuc$_0));\n }\n });\n Object.defineProperty(LegendBoxSpec.prototype, 'contentBounds', {\n configurable: true,\n get: function () {\n return new DoubleRectangle(this.contentOrigin, this.contentSize_cb71ch$_0);\n }\n });\n LegendBoxSpec.prototype.hasTitle = function () {\n return !isBlank(this.title) && this.theme.showTitle();\n };\n LegendBoxSpec.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendBoxSpec',\n interfaces: []\n };\n function LegendBreak(label) {\n LegendBreak$Companion_getInstance();\n this.label = label;\n this.myLayers_0 = ArrayList_init();\n }\n Object.defineProperty(LegendBreak.prototype, 'minimumKeySize', {\n configurable: true,\n get: function () {\n var tmp$;\n var minSize = DoubleVector.Companion.ZERO;\n tmp$ = this.myLayers_0.iterator();\n while (tmp$.hasNext()) {\n var layer = tmp$.next();\n var layerMinKeySize = layer.keyElementFactory.minimumKeySize_l6g9mh$(layer.dataPoint);\n minSize = minSize.max_gpjtzr$(layerMinKeySize);\n }\n return minSize;\n }\n });\n Object.defineProperty(LegendBreak.prototype, 'isEmpty', {\n configurable: true,\n get: function () {\n return this.myLayers_0.isEmpty();\n }\n });\n LegendBreak.prototype.addLayer_w0u015$ = function (dataPoint, keyElementFactory) {\n this.myLayers_0.add_11rb$(new LegendBreak$LegendBreakLayer(dataPoint, keyElementFactory));\n };\n LegendBreak.prototype.createKeyElement_gpjtzr$ = function (size) {\n var tmp$;\n var g = new SvgGElement();\n tmp$ = this.myLayers_0.iterator();\n while (tmp$.hasNext()) {\n var layer = tmp$.next();\n var keyElement = layer.keyElementFactory.createKeyElement_s1fn0c$(layer.dataPoint, size);\n g.children().add_11rb$(keyElement);\n }\n return g;\n };\n function LegendBreak$LegendBreakLayer(dataPoint, keyElementFactory) {\n this.dataPoint = dataPoint;\n this.keyElementFactory = keyElementFactory;\n }\n LegendBreak$LegendBreakLayer.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendBreakLayer',\n interfaces: []\n };\n function LegendBreak$Companion() {\n LegendBreak$Companion_instance = this;\n }\n LegendBreak$Companion.prototype.simple_998ysp$ = function (label, dataPoint, keyElementFactory) {\n var br = new LegendBreak(label);\n br.addLayer_w0u015$(dataPoint, keyElementFactory);\n return br;\n };\n LegendBreak$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var LegendBreak$Companion_instance = null;\n function LegendBreak$Companion_getInstance() {\n if (LegendBreak$Companion_instance === null) {\n new LegendBreak$Companion();\n }\n return LegendBreak$Companion_instance;\n }\n LegendBreak.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendBreak',\n interfaces: []\n };\n function LegendComponent(spec) {\n LegendBox.call(this);\n this.spec_8zhhsr$_0 = spec;\n }\n Object.defineProperty(LegendComponent.prototype, 'spec', {\n get: function () {\n return this.spec_8zhhsr$_0;\n }\n });\n LegendComponent.prototype.appendGuideContent_26jijc$ = function (contentRoot) {\n var tmp$;\n var layout = this.spec.layout;\n var keyLabelBoxes = layout.keyLabelBoxes.iterator();\n var labelBoxes = layout.labelBoxes.iterator();\n var keySizes = layout.keySizes.iterator();\n tmp$ = this.spec.breaks_8be2vx$.iterator();\n while (tmp$.hasNext()) {\n var br = tmp$.next();\n var keyLabelBox = keyLabelBoxes.next();\n var labelBox = labelBoxes.next();\n var keySize = keySizes.next();\n var breakElement = this.createBreakElement_0(br, keySize, keyLabelBox, labelBox);\n contentRoot.children().add_11rb$(breakElement);\n }\n if (this.debug) {\n var graphBounds = new DoubleRectangle(DoubleVector.Companion.ZERO, layout.graphSize);\n contentRoot.children().add_11rb$(LegendBox$Companion_getInstance().createTransparentRect_a5dgib$(graphBounds, Color.Companion.DARK_BLUE, 1.0));\n }\n return layout.size;\n };\n LegendComponent.prototype.createBreakElement_0 = function (br, keySize, keyLabelBox, labelBox) {\n var breakComponent = new GroupComponent();\n breakComponent.add_26jijc$(this.createKeyElement_0(br, keySize));\n var label = new TextLabel(br.label);\n label.addClassName_61zpoe$(Style_getInstance().LEGEND_ITEM);\n label.setHorizontalAnchor_mf4siq$(Text$HorizontalAnchor.LEFT);\n label.setVerticalAnchor_yaylw0$(Text$VerticalAnchor.CENTER);\n label.moveTo_gpjtzr$(labelBox.origin.add_gpjtzr$(new DoubleVector(0.0, labelBox.height / 2)));\n breakComponent.add_8icvvv$(label);\n breakComponent.moveTo_gpjtzr$(keyLabelBox.origin);\n return breakComponent.rootGroup;\n };\n LegendComponent.prototype.createKeyElement_0 = function (legendBreak, size) {\n var g = new SvgGElement();\n var keyBounds = new DoubleRectangle(DoubleVector.Companion.ZERO, size);\n var backgroundRect = SvgRectElement_init(keyBounds);\n backgroundRect.strokeWidth().set_11rb$(0.0);\n backgroundRect.fillColor().set_11rb$(this.theme.backgroundFill());\n g.children().add_11rb$(backgroundRect);\n var innerSize = new DoubleVector(size.x - 2, size.y - 2);\n var keyElement = legendBreak.createKeyElement_gpjtzr$(innerSize);\n var keyElementTransform = SvgComponent.Companion.buildTransform_e1sv3v$(new DoubleVector(1.0, 1.0), 0.0);\n keyElement.transform().set_11rb$(keyElementTransform);\n g.children().add_11rb$(keyElement);\n var frame = LegendBox$Companion_getInstance().createTransparentRect_a5dgib$(keyBounds, this.theme.backgroundFill(), 1.0);\n g.children().add_11rb$(frame);\n return g;\n };\n LegendComponent.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendComponent',\n interfaces: [LegendBox]\n };\n function LegendComponentLayout(title, breaks, keySizes, legendDirection, theme) {\n LegendComponentLayout$Companion_getInstance();\n LegendBoxLayout.call(this, title, legendDirection, theme);\n this.breaks = breaks;\n this.keySizes = keySizes;\n this.myContentSize_8rvo9o$_0 = null;\n this.myKeyLabelBoxes_uk7fn2$_0 = ArrayList_init();\n this.myLabelBoxes_9jhh53$_0 = ArrayList_init();\n this.isFillByRow = false;\n this.rowCount_kvp0d1$_0 = 0;\n this.colCount_nojzuj$_0 = 0;\n }\n Object.defineProperty(LegendComponentLayout.prototype, 'rowCount', {\n configurable: true,\n get: function () {\n return this.rowCount_kvp0d1$_0;\n },\n set: function (rowCount) {\n if (!(rowCount > 0)) {\n var message = 'Row count must be greater than 0, was ' + rowCount;\n throw IllegalStateException_init(message.toString());\n }\n this.rowCount_kvp0d1$_0 = rowCount;\n }\n });\n Object.defineProperty(LegendComponentLayout.prototype, 'colCount', {\n configurable: true,\n get: function () {\n return this.colCount_nojzuj$_0;\n },\n set: function (colCount) {\n if (!(colCount > 0)) {\n var message = 'Col count must be greater than 0, was ' + colCount;\n throw IllegalStateException_init(message.toString());\n }\n this.colCount_nojzuj$_0 = colCount;\n }\n });\n Object.defineProperty(LegendComponentLayout.prototype, 'graphSize', {\n configurable: true,\n get: function () {\n this.ensureInited_chkycd$_0();\n return ensureNotNull(this.myContentSize_8rvo9o$_0);\n }\n });\n Object.defineProperty(LegendComponentLayout.prototype, 'keyLabelBoxes', {\n configurable: true,\n get: function () {\n this.ensureInited_chkycd$_0();\n return this.myKeyLabelBoxes_uk7fn2$_0;\n }\n });\n Object.defineProperty(LegendComponentLayout.prototype, 'labelBoxes', {\n configurable: true,\n get: function () {\n this.ensureInited_chkycd$_0();\n return this.myLabelBoxes_9jhh53$_0;\n }\n });\n LegendComponentLayout.prototype.ensureInited_chkycd$_0 = function () {\n if (this.myContentSize_8rvo9o$_0 == null) {\n this.doLayout_zctv6z$_0();\n }\n };\n LegendComponentLayout.prototype.doLayout_zctv6z$_0 = function () {\n var tmp$;\n var labelHeight = PlotLabelSpecFactory_getInstance().legendItem_730mk3$(this.theme).height();\n var labelLeftMargin = PlotLabelSpecFactory_getInstance().legendItem_730mk3$(this.theme).width_61zpoe$(PlotLabelSpecFactory_getInstance().DISTANCE_TO_LABEL_IN_CHARS) / 2;\n var contentOrigin = DoubleVector.Companion.ZERO;\n var breakBoxBounds = null;\n tmp$ = this.breaks;\n for (var i = 0; i !== tmp$.size; ++i) {\n var tmp$_0;\n var labelSize = this.labelSize_za3lpa$(i);\n var keySize = this.keySizes.get_za3lpa$(i);\n var labelVOffset = (keySize.y - labelHeight) / 2;\n var labelHOffset = keySize.x + labelLeftMargin;\n var breakBoxSize = new DoubleVector(labelHOffset + labelSize.x, keySize.y);\n breakBoxBounds = new DoubleRectangle((tmp$_0 = breakBoxBounds != null ? this.breakBoxOrigin_b4d9xv$(i, breakBoxBounds) : null) != null ? tmp$_0 : contentOrigin, breakBoxSize);\n this.myKeyLabelBoxes_uk7fn2$_0.add_11rb$(breakBoxBounds);\n this.myLabelBoxes_9jhh53$_0.add_11rb$(DoubleRectangle_init(labelHOffset, labelVOffset, labelSize.x, labelSize.y));\n }\n this.myContentSize_8rvo9o$_0 = GeometryUtil_getInstance().union_a7nkjf$(new DoubleRectangle(contentOrigin, DoubleVector.Companion.ZERO), this.myKeyLabelBoxes_uk7fn2$_0).dimension;\n };\n function LegendComponentLayout$MyHorizontal(title, breaks, keySizes, theme) {\n LegendComponentLayout.call(this, title, breaks, keySizes, LegendDirection$HORIZONTAL_getInstance(), theme);\n this.colCount = breaks.size;\n this.rowCount = 1;\n }\n LegendComponentLayout$MyHorizontal.prototype.breakBoxOrigin_b4d9xv$ = function (index, prevBreakBoxBounds) {\n return new DoubleVector(prevBreakBoxBounds.right, 0.0);\n };\n LegendComponentLayout$MyHorizontal.prototype.labelSize_za3lpa$ = function (index) {\n var label = this.breaks.get_za3lpa$(index).label;\n return new DoubleVector(PlotLabelSpecFactory_getInstance().legendItem_730mk3$(this.theme).width_61zpoe$(label), PlotLabelSpecFactory_getInstance().legendItem_730mk3$(this.theme).height());\n };\n LegendComponentLayout$MyHorizontal.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'MyHorizontal',\n interfaces: [LegendComponentLayout]\n };\n function LegendComponentLayout$MyHorizontalMultiRow(title, breaks, keySizes, theme) {\n LegendComponentLayout$MyMultiRow.call(this, title, breaks, keySizes, LegendDirection$HORIZONTAL_getInstance(), theme);\n this.colCount = breaks.size;\n this.rowCount = 1;\n }\n LegendComponentLayout$MyHorizontalMultiRow.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'MyHorizontalMultiRow',\n interfaces: [LegendComponentLayout$MyMultiRow]\n };\n function LegendComponentLayout$MyVertical(title, breaks, keySizes, theme) {\n LegendComponentLayout$MyMultiRow.call(this, title, breaks, keySizes, LegendDirection$VERTICAL_getInstance(), theme);\n this.colCount = 1;\n this.rowCount = breaks.size;\n }\n LegendComponentLayout$MyVertical.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'MyVertical',\n interfaces: [LegendComponentLayout$MyMultiRow]\n };\n function LegendComponentLayout$MyMultiRow(title, breaks, keySizes, legendDirection, theme) {\n LegendComponentLayout.call(this, title, breaks, keySizes, legendDirection, theme);\n this.myMaxLabelWidth_0 = 0.0;\n var tmp$;\n tmp$ = breaks.iterator();\n while (tmp$.hasNext()) {\n var br = tmp$.next();\n var a = this.myMaxLabelWidth_0;\n var b = PlotLabelSpecFactory_getInstance().legendItem_730mk3$(theme).width_61zpoe$(br.label);\n this.myMaxLabelWidth_0 = JsMath.max(a, b);\n }\n }\n LegendComponentLayout$MyMultiRow.prototype.breakBoxOrigin_b4d9xv$ = function (index, prevBreakBoxBounds) {\n var tmp$, tmp$_0;\n if (this.isFillByRow) {\n if ((index % this.colCount | 0) === 0) {\n tmp$ = new DoubleVector(0.0, prevBreakBoxBounds.bottom);\n } else\n tmp$ = new DoubleVector(prevBreakBoxBounds.right, prevBreakBoxBounds.top);\n return tmp$;\n }\n if ((index % this.rowCount | 0) === 0) {\n tmp$_0 = new DoubleVector(prevBreakBoxBounds.right, 0.0);\n } else\n tmp$_0 = new DoubleVector(prevBreakBoxBounds.left, prevBreakBoxBounds.bottom);\n return tmp$_0;\n };\n LegendComponentLayout$MyMultiRow.prototype.labelSize_za3lpa$ = function (index) {\n return new DoubleVector(this.myMaxLabelWidth_0, PlotLabelSpecFactory_getInstance().legendItem_730mk3$(this.theme).height());\n };\n LegendComponentLayout$MyMultiRow.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'MyMultiRow',\n interfaces: [LegendComponentLayout]\n };\n function LegendComponentLayout$Companion() {\n LegendComponentLayout$Companion_instance = this;\n }\n LegendComponentLayout$Companion.prototype.horizontal_d02gve$ = function (title, breaks, keySizes, theme) {\n return new LegendComponentLayout$MyHorizontal(title, breaks, keySizes, theme);\n };\n LegendComponentLayout$Companion.prototype.horizontalMultiRow_d02gve$ = function (title, breaks, keySizes, theme) {\n return new LegendComponentLayout$MyHorizontalMultiRow(title, breaks, keySizes, theme);\n };\n LegendComponentLayout$Companion.prototype.vertical_d02gve$ = function (title, breaks, keySizes, theme) {\n return new LegendComponentLayout$MyVertical(title, breaks, keySizes, theme);\n };\n LegendComponentLayout$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var LegendComponentLayout$Companion_instance = null;\n function LegendComponentLayout$Companion_getInstance() {\n if (LegendComponentLayout$Companion_instance === null) {\n new LegendComponentLayout$Companion();\n }\n return LegendComponentLayout$Companion_instance;\n }\n LegendComponentLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendComponentLayout',\n interfaces: [LegendBoxLayout]\n };\n function LegendComponentSpec(title, breaks, theme, layout, reverse) {\n LegendBoxSpec.call(this, title, theme, reverse);\n this.breaks_8be2vx$ = breaks;\n this.layout_ebqbgv$_0 = layout;\n }\n Object.defineProperty(LegendComponentSpec.prototype, 'layout', {\n get: function () {\n return this.layout_ebqbgv$_0;\n }\n });\n LegendComponentSpec.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendComponentSpec',\n interfaces: [LegendBoxSpec]\n };\n function LegendDirection(name, ordinal) {\n Enum.call(this);\n this.name$ = name;\n this.ordinal$ = ordinal;\n }\n function LegendDirection_initFields() {\n LegendDirection_initFields = function () {\n };\n LegendDirection$HORIZONTAL_instance = new LegendDirection('HORIZONTAL', 0);\n LegendDirection$VERTICAL_instance = new LegendDirection('VERTICAL', 1);\n LegendDirection$AUTO_instance = new LegendDirection('AUTO', 2);\n }\n var LegendDirection$HORIZONTAL_instance;\n function LegendDirection$HORIZONTAL_getInstance() {\n LegendDirection_initFields();\n return LegendDirection$HORIZONTAL_instance;\n }\n var LegendDirection$VERTICAL_instance;\n function LegendDirection$VERTICAL_getInstance() {\n LegendDirection_initFields();\n return LegendDirection$VERTICAL_instance;\n }\n var LegendDirection$AUTO_instance;\n function LegendDirection$AUTO_getInstance() {\n LegendDirection_initFields();\n return LegendDirection$AUTO_instance;\n }\n LegendDirection.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendDirection',\n interfaces: [Enum]\n };\n function LegendDirection$values() {\n return [LegendDirection$HORIZONTAL_getInstance(), LegendDirection$VERTICAL_getInstance(), LegendDirection$AUTO_getInstance()];\n }\n LegendDirection.values = LegendDirection$values;\n function LegendDirection$valueOf(name) {\n switch (name) {\n case 'HORIZONTAL':\n return LegendDirection$HORIZONTAL_getInstance();\n case 'VERTICAL':\n return LegendDirection$VERTICAL_getInstance();\n case 'AUTO':\n return LegendDirection$AUTO_getInstance();\n default:\n throwISE('No enum constant jetbrains.datalore.plot.builder.guide.LegendDirection.' + name);\n }\n }\n LegendDirection.valueOf_61zpoe$ = LegendDirection$valueOf;\n function LegendJustification(x, y) {\n LegendJustification$Companion_getInstance();\n this.x = x;\n this.y = y;\n }\n function LegendJustification$Companion() {\n LegendJustification$Companion_instance = this;\n this.CENTER = new LegendJustification(0.5, 0.5);\n }\n LegendJustification$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var LegendJustification$Companion_instance = null;\n function LegendJustification$Companion_getInstance() {\n if (LegendJustification$Companion_instance === null) {\n new LegendJustification$Companion();\n }\n return LegendJustification$Companion_instance;\n }\n LegendJustification.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendJustification',\n interfaces: []\n };\n function LegendPosition(x, y) {\n LegendPosition$Companion_getInstance();\n this.x = x;\n this.y = y;\n }\n Object.defineProperty(LegendPosition.prototype, 'isFixed', {\n configurable: true,\n get: function () {\n return this === LegendPosition$Companion_getInstance().LEFT || this === LegendPosition$Companion_getInstance().RIGHT || this === LegendPosition$Companion_getInstance().TOP || this === LegendPosition$Companion_getInstance().BOTTOM;\n }\n });\n Object.defineProperty(LegendPosition.prototype, 'isHidden', {\n configurable: true,\n get: function () {\n return this === LegendPosition$Companion_getInstance().NONE;\n }\n });\n Object.defineProperty(LegendPosition.prototype, 'isOverlay', {\n configurable: true,\n get: function () {\n return !(this.isFixed || this.isHidden);\n }\n });\n function LegendPosition$Companion() {\n LegendPosition$Companion_instance = this;\n this.RIGHT = new LegendPosition(1.0, 0.5);\n this.LEFT = new LegendPosition(0.0, 0.5);\n this.TOP = new LegendPosition(0.5, 1.0);\n this.BOTTOM = new LegendPosition(0.5, 1.0);\n this.NONE = new LegendPosition(kotlin_js_internal_DoubleCompanionObject.NaN, kotlin_js_internal_DoubleCompanionObject.NaN);\n }\n LegendPosition$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var LegendPosition$Companion_instance = null;\n function LegendPosition$Companion_getInstance() {\n if (LegendPosition$Companion_instance === null) {\n new LegendPosition$Companion();\n }\n return LegendPosition$Companion_instance;\n }\n LegendPosition.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendPosition',\n interfaces: []\n };\n function Orientation(name, ordinal, id) {\n Enum.call(this);\n this.id_db4vdn$_0 = id;\n this.name$ = name;\n this.ordinal$ = ordinal;\n }\n function Orientation_initFields() {\n Orientation_initFields = function () {\n };\n Orientation$LEFT_instance = new Orientation('LEFT', 0, 'LEFT');\n Orientation$RIGHT_instance = new Orientation('RIGHT', 1, 'RIGHT');\n Orientation$TOP_instance = new Orientation('TOP', 2, 'TOP');\n Orientation$BOTTOM_instance = new Orientation('BOTTOM', 3, 'BOTTOM');\n }\n var Orientation$LEFT_instance;\n function Orientation$LEFT_getInstance() {\n Orientation_initFields();\n return Orientation$LEFT_instance;\n }\n var Orientation$RIGHT_instance;\n function Orientation$RIGHT_getInstance() {\n Orientation_initFields();\n return Orientation$RIGHT_instance;\n }\n var Orientation$TOP_instance;\n function Orientation$TOP_getInstance() {\n Orientation_initFields();\n return Orientation$TOP_instance;\n }\n var Orientation$BOTTOM_instance;\n function Orientation$BOTTOM_getInstance() {\n Orientation_initFields();\n return Orientation$BOTTOM_instance;\n }\n Object.defineProperty(Orientation.prototype, 'isHorizontal', {\n configurable: true,\n get: function () {\n return this === Orientation$TOP_getInstance() || this === Orientation$BOTTOM_getInstance();\n }\n });\n Orientation.prototype.flip = function () {\n var tmp$;\n switch (this.name) {\n case 'LEFT':\n tmp$ = Orientation$BOTTOM_getInstance();\n break;\n case 'RIGHT':\n tmp$ = Orientation$TOP_getInstance();\n break;\n case 'TOP':\n tmp$ = Orientation$RIGHT_getInstance();\n break;\n case 'BOTTOM':\n tmp$ = Orientation$LEFT_getInstance();\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n Orientation.prototype.toString = function () {\n return 'Orientation ' + this.id_db4vdn$_0;\n };\n Orientation.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'Orientation',\n interfaces: [Enum]\n };\n function Orientation$values() {\n return [Orientation$LEFT_getInstance(), Orientation$RIGHT_getInstance(), Orientation$TOP_getInstance(), Orientation$BOTTOM_getInstance()];\n }\n Orientation.values = Orientation$values;\n function Orientation$valueOf(name) {\n switch (name) {\n case 'LEFT':\n return Orientation$LEFT_getInstance();\n case 'RIGHT':\n return Orientation$RIGHT_getInstance();\n case 'TOP':\n return Orientation$TOP_getInstance();\n case 'BOTTOM':\n return Orientation$BOTTOM_getInstance();\n default:\n throwISE('No enum constant jetbrains.datalore.plot.builder.guide.Orientation.' + name);\n }\n }\n Orientation.valueOf_61zpoe$ = Orientation$valueOf;\n function ContextualMappingProvider() {\n ContextualMappingProvider$Companion_getInstance();\n }\n function ContextualMappingProvider$Companion() {\n ContextualMappingProvider$Companion_instance = this;\n this.NONE = new ContextualMappingProvider$Companion$NONE$ObjectLiteral();\n }\n function ContextualMappingProvider$Companion$NONE$ObjectLiteral() {\n }\n ContextualMappingProvider$Companion$NONE$ObjectLiteral.prototype.createContextualMapping_8fr62e$ = function (dataAccess, dataFrame) {\n return new ContextualMapping(emptyList(), null, null, false, false, false, false, null);\n };\n ContextualMappingProvider$Companion$NONE$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [ContextualMappingProvider]\n };\n ContextualMappingProvider$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ContextualMappingProvider$Companion_instance = null;\n function ContextualMappingProvider$Companion_getInstance() {\n if (ContextualMappingProvider$Companion_instance === null) {\n new ContextualMappingProvider$Companion();\n }\n return ContextualMappingProvider$Companion_instance;\n }\n ContextualMappingProvider.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'ContextualMappingProvider',\n interfaces: []\n };\n function GeomInteraction(builder) {\n GeomInteraction$Companion_getInstance();\n this.myLocatorLookupSpace_0 = builder.locatorLookupSpace;\n this.myLocatorLookupStrategy_0 = builder.locatorLookupStrategy;\n this.myTooltipLines_0 = builder.tooltipLines;\n this.myTooltipProperties_0 = builder.tooltipProperties;\n this.myIgnoreInvisibleTargets_0 = builder.ignoreInvisibleTargets;\n this.myIsCrosshairEnabled_0 = builder.isCrosshairEnabled;\n this.myTooltipTitle_0 = builder.tooltipTitle;\n }\n GeomInteraction.prototype.createLookupSpec = function () {\n return new GeomTargetLocator$LookupSpec(this.myLocatorLookupSpace_0, this.myLocatorLookupStrategy_0);\n };\n GeomInteraction.prototype.createContextualMapping_8fr62e$ = function (dataAccess, dataFrame) {\n var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3;\n var $receiver = this.myTooltipLines_0;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$_4;\n tmp$_4 = $receiver.iterator();\n while (tmp$_4.hasNext()) {\n var item = tmp$_4.next();\n destination.add_11rb$(TooltipLine_init(item));\n }\n tmp$ = this.myTooltipProperties_0;\n tmp$_0 = this.myIgnoreInvisibleTargets_0;\n tmp$_1 = this.myIsCrosshairEnabled_0;\n tmp$_3 = (tmp$_2 = this.myTooltipTitle_0) != null ? TooltipLine_init(tmp$_2) : null;\n return GeomInteraction$Companion_getInstance().createContextualMapping_0(destination, dataAccess, dataFrame, tmp$, tmp$_0, tmp$_1, tmp$_3);\n };\n function GeomInteraction$Companion() {\n GeomInteraction$Companion_instance = this;\n }\n GeomInteraction$Companion.prototype.createTestContextualMapping_fdc7hd$ = function (aesListForTooltip, axisAes, outliers, dataAccess, dataFrame, userDefinedValueSources) {\n if (userDefinedValueSources === void 0)\n userDefinedValueSources = null;\n var defaultTooltipLines = GeomInteractionBuilderUtil_getInstance().defaultValueSourceTooltipLines_l73v50$(aesListForTooltip, axisAes, outliers, userDefinedValueSources);\n return this.createContextualMapping_0(defaultTooltipLines, dataAccess, dataFrame, TooltipSpecification$TooltipProperties$Companion_getInstance().NONE, false, false, null);\n };\n GeomInteraction$Companion.prototype.createContextualMapping_0 = function (tooltipLines, dataAccess, dataFrame, tooltipProperties, ignoreInvisibleTargets, isCrosshairEnabled, tooltipTitle) {\n var destination = ArrayList_init();\n var tmp$;\n tmp$ = tooltipLines.iterator();\n loop_label: while (tmp$.hasNext()) {\n var element = tmp$.next();\n var $receiver = element.fields;\n var destination_0 = ArrayList_init();\n var tmp$_0;\n tmp$_0 = $receiver.iterator();\n while (tmp$_0.hasNext()) {\n var element_0 = tmp$_0.next();\n if (Kotlin.isType(element_0, MappingValue))\n destination_0.add_11rb$(element_0);\n }\n var dataAesList = destination_0;\n var all$result;\n all$break: do {\n var tmp$_1;\n if (Kotlin.isType(dataAesList, Collection) && dataAesList.isEmpty()) {\n all$result = true;\n break all$break;\n }\n tmp$_1 = dataAesList.iterator();\n while (tmp$_1.hasNext()) {\n var element_1 = tmp$_1.next();\n if (!dataAccess.isMapped_896ixz$(element_1.aes)) {\n all$result = false;\n break all$break;\n }\n }\n all$result = true;\n }\n while (false);\n if (all$result)\n destination.add_11rb$(element);\n }\n var mappedTooltipLines = destination;\n var tmp$_2;\n tmp$_2 = mappedTooltipLines.iterator();\n while (tmp$_2.hasNext()) {\n var element_2 = tmp$_2.next();\n element_2.initDataContext_nqispu$(dataFrame, dataAccess);\n }\n var any$result;\n any$break: do {\n var tmp$_3;\n if (Kotlin.isType(mappedTooltipLines, Collection) && mappedTooltipLines.isEmpty()) {\n any$result = false;\n break any$break;\n }\n tmp$_3 = mappedTooltipLines.iterator();\n loop_label: while (tmp$_3.hasNext()) {\n var element_3 = tmp$_3.next();\n var $receiver_0 = element_3.fields;\n var predicate = getPropertyCallableRef('isOutlier', 1, function ($receiver) {\n return $receiver.isOutlier;\n });\n var none$result;\n none$break: do {\n var tmp$_4;\n if (Kotlin.isType($receiver_0, Collection) && $receiver_0.isEmpty()) {\n none$result = true;\n break none$break;\n }\n tmp$_4 = $receiver_0.iterator();\n while (tmp$_4.hasNext()) {\n var element_4 = tmp$_4.next();\n if (predicate(element_4)) {\n none$result = false;\n break none$break;\n }\n }\n none$result = true;\n }\n while (false);\n if (none$result) {\n any$result = true;\n break any$break;\n }\n }\n any$result = false;\n }\n while (false);\n var hasGeneralTooltip = any$result;\n var any$result_0;\n any$break: do {\n var tmp$_5;\n if (Kotlin.isType(mappedTooltipLines, Collection) && mappedTooltipLines.isEmpty()) {\n any$result_0 = false;\n break any$break;\n }\n tmp$_5 = mappedTooltipLines.iterator();\n loop_label: while (tmp$_5.hasNext()) {\n var element_5 = tmp$_5.next();\n var $receiver_1 = element_5.fields;\n var predicate_0 = getPropertyCallableRef('isAxis', 1, function ($receiver) {\n return $receiver.isAxis;\n });\n var any$result_1;\n any$break_0: do {\n var tmp$_6;\n if (Kotlin.isType($receiver_1, Collection) && $receiver_1.isEmpty()) {\n any$result_1 = false;\n break any$break_0;\n }\n tmp$_6 = $receiver_1.iterator();\n while (tmp$_6.hasNext()) {\n var element_6 = tmp$_6.next();\n if (predicate_0(element_6)) {\n any$result_1 = true;\n break any$break_0;\n }\n }\n any$result_1 = false;\n }\n while (false);\n if (any$result_1) {\n any$result_0 = true;\n break any$break;\n }\n }\n any$result_0 = false;\n }\n while (false);\n var hasAxisTooltip = any$result_0;\n tooltipTitle != null ? (tooltipTitle.initDataContext_nqispu$(dataFrame, dataAccess), Unit) : null;\n return new ContextualMapping(mappedTooltipLines, tooltipProperties.anchor, tooltipProperties.minWidth, ignoreInvisibleTargets, hasGeneralTooltip, hasAxisTooltip, isCrosshairEnabled, tooltipTitle);\n };\n GeomInteraction$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var GeomInteraction$Companion_instance = null;\n function GeomInteraction$Companion_getInstance() {\n if (GeomInteraction$Companion_instance === null) {\n new GeomInteraction$Companion();\n }\n return GeomInteraction$Companion_instance;\n }\n GeomInteraction.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GeomInteraction',\n interfaces: [ContextualMappingProvider]\n };\n function GeomInteractionBuilder(locatorLookupSpace, locatorLookupStrategy, tooltipAes, tooltipAxisAes, tooltipOutlierAes) {\n this.locatorLookupSpace = locatorLookupSpace;\n this.locatorLookupStrategy = locatorLookupStrategy;\n this.tooltipAes_0 = tooltipAes;\n this.tooltipAxisAes_0 = tooltipAxisAes;\n this.tooltipOutlierAes_0 = tooltipOutlierAes;\n this.myUserTooltipSpec_0 = null;\n this.ignoreInvisibleTargets_ddo194$_0 = false;\n this.tooltipConstants_xwrflf$_0 = null;\n this.isCrosshairEnabled_vgz91y$_0 = false;\n }\n Object.defineProperty(GeomInteractionBuilder.prototype, 'ignoreInvisibleTargets', {\n configurable: true,\n get: function () {\n return this.ignoreInvisibleTargets_ddo194$_0;\n },\n set: function (ignoreInvisibleTargets) {\n this.ignoreInvisibleTargets_ddo194$_0 = ignoreInvisibleTargets;\n }\n });\n Object.defineProperty(GeomInteractionBuilder.prototype, 'tooltipConstants', {\n configurable: true,\n get: function () {\n return this.tooltipConstants_xwrflf$_0;\n },\n set: function (tooltipConstants) {\n this.tooltipConstants_xwrflf$_0 = tooltipConstants;\n }\n });\n Object.defineProperty(GeomInteractionBuilder.prototype, 'isCrosshairEnabled', {\n configurable: true,\n get: function () {\n return this.isCrosshairEnabled_vgz91y$_0;\n },\n set: function (isCrosshairEnabled) {\n this.isCrosshairEnabled_vgz91y$_0 = isCrosshairEnabled;\n }\n });\n Object.defineProperty(GeomInteractionBuilder.prototype, 'tooltipLines', {\n configurable: true,\n get: function () {\n return GeomInteractionBuilderUtil_getInstance().createTooltipLines_ntnr8o$(this.myUserTooltipSpec_0, this.tooltipAes_0, this.tooltipAxisAes_0, this.tooltipOutlierAes_0, this.tooltipConstants);\n }\n });\n Object.defineProperty(GeomInteractionBuilder.prototype, 'tooltipProperties', {\n configurable: true,\n get: function () {\n var tmp$, tmp$_0;\n return (tmp$_0 = (tmp$ = this.myUserTooltipSpec_0) != null ? tmp$.tooltipProperties : null) != null ? tmp$_0 : TooltipSpecification$TooltipProperties$Companion_getInstance().NONE;\n }\n });\n Object.defineProperty(GeomInteractionBuilder.prototype, 'tooltipTitle', {\n configurable: true,\n get: function () {\n var tmp$;\n return (tmp$ = this.myUserTooltipSpec_0) != null ? tmp$.tooltipTitle : null;\n }\n });\n GeomInteractionBuilder.prototype.tooltipConstants_ayg7dr$ = function (v) {\n this.tooltipConstants = v;\n return this;\n };\n GeomInteractionBuilder.prototype.tooltipLinesSpec_uvmyj9$ = function (v) {\n this.myUserTooltipSpec_0 = v;\n return this;\n };\n GeomInteractionBuilder.prototype.enableCrosshair_6taknv$ = function (v) {\n this.isCrosshairEnabled = v;\n return this;\n };\n GeomInteractionBuilder.prototype.ignoreInvisibleTargets_6taknv$ = function (v) {\n this.ignoreInvisibleTargets = v;\n return this;\n };\n GeomInteractionBuilder.prototype.build = function () {\n return new GeomInteraction(this);\n };\n function GeomInteractionBuilder$DemoAndTest(supportedAes, axisAes) {\n if (axisAes === void 0)\n axisAes = null;\n this.supportedAes_0 = supportedAes;\n this.axisAes_0 = axisAes;\n }\n GeomInteractionBuilder$DemoAndTest.prototype.univariateFunction_7k7ojo$ = function (lookupStrategy) {\n return this.createBuilder_0(GeomTooltipSetup$Companion_getInstance().univariateFunction_ahqhwk$(lookupStrategy));\n };\n GeomInteractionBuilder$DemoAndTest.prototype.bivariateFunction_6taknv$ = function (area) {\n return this.createBuilder_0(GeomTooltipSetup$Companion_getInstance().bivariateFunction_xss3$(area));\n };\n GeomInteractionBuilder$DemoAndTest.prototype.createBuilder_0 = function (geomTooltipSetup) {\n var tmp$;\n return new GeomInteractionBuilder(geomTooltipSetup.locatorLookupSpace, geomTooltipSetup.locatorLookupStrategy, minus_0(this.supportedAes_0, geomTooltipSetup.axisAesFromFunctionKind), (tmp$ = this.axisAes_0) != null ? tmp$ : !geomTooltipSetup.axisTooltipEnabled ? emptyList() : geomTooltipSetup.axisAesFromFunctionKind, emptyList());\n };\n GeomInteractionBuilder$DemoAndTest.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'DemoAndTest',\n interfaces: []\n };\n GeomInteractionBuilder.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GeomInteractionBuilder',\n interfaces: []\n };\n function GeomInteractionBuilderUtil() {\n GeomInteractionBuilderUtil_instance = this;\n }\n GeomInteractionBuilderUtil.prototype.createTooltipLines_ntnr8o$ = function (userTooltipSpec, tooltipAes, tooltipAxisAes, sideTooltipAes, tooltipConstantAes) {\n var tmp$;\n if (userTooltipSpec == null)\n tmp$ = this.defaultValueSourceTooltipLines_l73v50$(tooltipAes, tooltipAxisAes, sideTooltipAes, null, tooltipConstantAes);\n else if (userTooltipSpec.useDefaultTooltips())\n tmp$ = this.defaultValueSourceTooltipLines_l73v50$(tooltipAes, tooltipAxisAes, sideTooltipAes, userTooltipSpec.valueSources, tooltipConstantAes);\n else if (userTooltipSpec.hideTooltips())\n tmp$ = emptyList();\n else {\n var geomOutliers = toMutableList(sideTooltipAes);\n var tmp$_0;\n tmp$_0 = ensureNotNull(userTooltipSpec.tooltipLinePatterns).iterator();\n while (tmp$_0.hasNext()) {\n var element = tmp$_0.next();\n var $receiver = element.fields;\n var destination = ArrayList_init();\n var tmp$_1;\n tmp$_1 = $receiver.iterator();\n while (tmp$_1.hasNext()) {\n var element_0 = tmp$_1.next();\n if (Kotlin.isType(element_0, MappingValue))\n destination.add_11rb$(element_0);\n }\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(destination, 10));\n var tmp$_2;\n tmp$_2 = destination.iterator();\n while (tmp$_2.hasNext()) {\n var item = tmp$_2.next();\n destination_0.add_11rb$(item.aes);\n }\n var userDataAesList = destination_0;\n geomOutliers.removeAll_brywnq$(userDataAesList);\n }\n var destination_1 = ArrayList_init_0(collectionSizeOrDefault(tooltipAxisAes, 10));\n var tmp$_3;\n tmp$_3 = tooltipAxisAes.iterator();\n while (tmp$_3.hasNext()) {\n var item_0 = tmp$_3.next();\n destination_1.add_11rb$(this.getMappingValueSource_0(item_0, true, true, userTooltipSpec.valueSources));\n }\n var axisValueSources = destination_1;\n var destination_2 = ArrayList_init_0(collectionSizeOrDefault(geomOutliers, 10));\n var tmp$_4;\n tmp$_4 = geomOutliers.iterator();\n while (tmp$_4.hasNext()) {\n var item_1 = tmp$_4.next();\n destination_2.add_11rb$(this.getMappingValueSource_0(item_1, true, false, userTooltipSpec.valueSources));\n }\n var geomOutlierValueSources = destination_2;\n var tmp$_5 = userTooltipSpec.tooltipLinePatterns;\n var $receiver_0 = plus(axisValueSources, geomOutlierValueSources);\n var transform = getCallableRef('defaultLineForValueSource', function ($receiver, p1) {\n return $receiver.defaultLineForValueSource_u47np3$(p1);\n }.bind(null, TooltipLine$Companion_getInstance()));\n var destination_3 = ArrayList_init_0(collectionSizeOrDefault($receiver_0, 10));\n var tmp$_6;\n tmp$_6 = $receiver_0.iterator();\n while (tmp$_6.hasNext()) {\n var item_2 = tmp$_6.next();\n destination_3.add_11rb$(transform(item_2));\n }\n tmp$ = plus(tmp$_5, destination_3);\n }\n return tmp$;\n };\n GeomInteractionBuilderUtil.prototype.getMappingValueSource_0 = function (aes, isOutlier, isAxis, userDefinedValueSources) {\n var tmp$, tmp$_0;\n var tmp$_1;\n if (userDefinedValueSources != null) {\n var destination = ArrayList_init();\n var tmp$_2;\n tmp$_2 = userDefinedValueSources.iterator();\n while (tmp$_2.hasNext()) {\n var element = tmp$_2.next();\n if (Kotlin.isType(element, MappingValue))\n destination.add_11rb$(element);\n }\n tmp$_1 = destination;\n } else\n tmp$_1 = null;\n var tmp$_3;\n if ((tmp$ = tmp$_1) != null) {\n var firstOrNull$result;\n firstOrNull$break: do {\n var tmp$_4;\n tmp$_4 = tmp$.iterator();\n while (tmp$_4.hasNext()) {\n var element_0 = tmp$_4.next();\n if (equals(element_0.aes, aes)) {\n firstOrNull$result = element_0;\n break firstOrNull$break;\n }\n }\n firstOrNull$result = null;\n }\n while (false);\n tmp$_3 = firstOrNull$result;\n } else\n tmp$_3 = null;\n var userDefined = tmp$_3;\n return (tmp$_0 = userDefined != null ? userDefined.withFlags_dqye30$(isOutlier, isAxis) : null) != null ? tmp$_0 : new MappingValue(aes, isOutlier, isAxis);\n };\n GeomInteractionBuilderUtil.prototype.defaultValueSourceTooltipLines_l73v50$ = function (aesListForTooltip, axisAes, outliers, userDefinedValueSources, constantsMap) {\n if (userDefinedValueSources === void 0)\n userDefinedValueSources = null;\n if (constantsMap === void 0)\n constantsMap = null;\n var tmp$;\n var destination = ArrayList_init_0(collectionSizeOrDefault(axisAes, 10));\n var tmp$_0;\n tmp$_0 = axisAes.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n destination.add_11rb$(this.getMappingValueSource_0(item, true, true, userDefinedValueSources));\n }\n var axisValueSources = destination;\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(outliers, 10));\n var tmp$_1;\n tmp$_1 = outliers.iterator();\n while (tmp$_1.hasNext()) {\n var item_0 = tmp$_1.next();\n destination_0.add_11rb$(this.getMappingValueSource_0(item_0, true, false, userDefinedValueSources));\n }\n var outlierValueSources = destination_0;\n var destination_1 = ArrayList_init_0(collectionSizeOrDefault(aesListForTooltip, 10));\n var tmp$_2;\n tmp$_2 = aesListForTooltip.iterator();\n while (tmp$_2.hasNext()) {\n var item_1 = tmp$_2.next();\n destination_1.add_11rb$(this.getMappingValueSource_0(item_1, false, false, userDefinedValueSources));\n }\n var aesValueSources = destination_1;\n var tmp$_3;\n if (constantsMap != null) {\n var destination_2 = ArrayList_init_0(constantsMap.size);\n var tmp$_4;\n tmp$_4 = constantsMap.entries.iterator();\n while (tmp$_4.hasNext()) {\n var item_2 = tmp$_4.next();\n var tmp$_5 = destination_2.add_11rb$;\n var aes = item_2.key;\n var value = item_2.value;\n tmp$_5.call(destination_2, new ConstantValue(aes, value, null));\n }\n tmp$_3 = destination_2;\n } else\n tmp$_3 = null;\n var constantValues = (tmp$ = tmp$_3) != null ? tmp$ : emptyList();\n var $receiver = plus(plus(plus(aesValueSources, axisValueSources), outlierValueSources), constantValues);\n var transform = getCallableRef('defaultLineForValueSource', function ($receiver, p1) {\n return $receiver.defaultLineForValueSource_u47np3$(p1);\n }.bind(null, TooltipLine$Companion_getInstance()));\n var destination_3 = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$_6;\n tmp$_6 = $receiver.iterator();\n while (tmp$_6.hasNext()) {\n var item_3 = tmp$_6.next();\n destination_3.add_11rb$(transform(item_3));\n }\n return destination_3;\n };\n GeomInteractionBuilderUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'GeomInteractionBuilderUtil',\n interfaces: []\n };\n var GeomInteractionBuilderUtil_instance = null;\n function GeomInteractionBuilderUtil_getInstance() {\n if (GeomInteractionBuilderUtil_instance === null) {\n new GeomInteractionBuilderUtil();\n }\n return GeomInteractionBuilderUtil_instance;\n }\n function GeomTooltipSetup(locatorLookupSpace, locatorLookupStrategy, axisAesFromFunctionKind, axisTooltipVisibilityFromFunctionKind, axisTooltipEnabled) {\n GeomTooltipSetup$Companion_getInstance();\n this.locatorLookupSpace = locatorLookupSpace;\n this.locatorLookupStrategy = locatorLookupStrategy;\n this.axisAesFromFunctionKind = axisAesFromFunctionKind;\n this.axisTooltipVisibilityFromFunctionKind = axisTooltipVisibilityFromFunctionKind;\n this.axisTooltipEnabled = axisTooltipEnabled;\n }\n GeomTooltipSetup.prototype.toMultilayerLookupStrategy = function () {\n var tmp$;\n tmp$ = GeomTargetLocator$LookupStrategy.NEAREST;\n return new GeomTooltipSetup(GeomTargetLocator$LookupSpace.XY, tmp$, this.axisAesFromFunctionKind, this.axisTooltipVisibilityFromFunctionKind, this.axisTooltipEnabled);\n };\n function GeomTooltipSetup$Companion() {\n GeomTooltipSetup$Companion_instance = this;\n this.AREA_GEOM = true;\n this.NON_AREA_GEOM = false;\n this.AES_X_0 = listOf(Aes.Companion.X);\n this.AES_XY_0 = listOf_0([Aes.Companion.X, Aes.Companion.Y]);\n }\n GeomTooltipSetup$Companion.prototype.univariateFunction_ahqhwk$ = function (lookupStrategy, axisTooltipVisibilityFromConfig) {\n if (axisTooltipVisibilityFromConfig === void 0)\n axisTooltipVisibilityFromConfig = null;\n var axisTooltipVisibilityFromFunctionKind = true;\n return new GeomTooltipSetup(GeomTargetLocator$LookupSpace.X, lookupStrategy, this.AES_X_0, axisTooltipVisibilityFromFunctionKind, this.isAxisTooltipEnabled_0(axisTooltipVisibilityFromConfig, axisTooltipVisibilityFromFunctionKind));\n };\n GeomTooltipSetup$Companion.prototype.bivariateFunction_xss3$ = function (area, axisTooltipVisibilityFromConfig) {\n if (axisTooltipVisibilityFromConfig === void 0)\n axisTooltipVisibilityFromConfig = null;\n var tmp$;\n var axisTooltipVisibilityFromFunctionKind = !area;\n if (area) {\n tmp$ = GeomTargetLocator$LookupStrategy.HOVER;\n } else {\n tmp$ = GeomTargetLocator$LookupStrategy.NEAREST;\n }\n var locatorLookupStrategy = tmp$;\n return new GeomTooltipSetup(GeomTargetLocator$LookupSpace.XY, locatorLookupStrategy, this.AES_XY_0, axisTooltipVisibilityFromFunctionKind, this.isAxisTooltipEnabled_0(axisTooltipVisibilityFromConfig, axisTooltipVisibilityFromFunctionKind));\n };\n GeomTooltipSetup$Companion.prototype.none = function () {\n var tmp$;\n var axisTooltipVisibilityFromFunctionKind = true;\n tmp$ = GeomTargetLocator$LookupStrategy.NONE;\n return new GeomTooltipSetup(GeomTargetLocator$LookupSpace.NONE, tmp$, emptyList(), axisTooltipVisibilityFromFunctionKind, this.isAxisTooltipEnabled_0(null, axisTooltipVisibilityFromFunctionKind));\n };\n GeomTooltipSetup$Companion.prototype.isAxisTooltipEnabled_0 = function (axisTooltipVisibilityFromConfig, axisTooltipVisibilityFromFunctionKind) {\n return axisTooltipVisibilityFromConfig != null ? axisTooltipVisibilityFromConfig : axisTooltipVisibilityFromFunctionKind;\n };\n GeomTooltipSetup$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var GeomTooltipSetup$Companion_instance = null;\n function GeomTooltipSetup$Companion_getInstance() {\n if (GeomTooltipSetup$Companion_instance === null) {\n new GeomTooltipSetup$Companion();\n }\n return GeomTooltipSetup$Companion_instance;\n }\n GeomTooltipSetup.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GeomTooltipSetup',\n interfaces: []\n };\n function MathUtil() {\n MathUtil_instance = this;\n }\n MathUtil.prototype.polygonContainsCoordinate_sz9prc$ = function (points, coord) {\n var tmp$;\n var intersectionCount = 0;\n tmp$ = points.size;\n for (var i = 1; i < tmp$; i++) {\n var start = points.get_za3lpa$(i - 1 | 0);\n var end = points.get_za3lpa$(i);\n if (start.y >= coord.y && end.y >= coord.y || (start.y < coord.y && end.y < coord.y)) {\n continue;\n }\n var x = start.x + (coord.y - start.y) * (end.x - start.x) / (end.y - start.y);\n if (x <= coord.x) {\n intersectionCount = intersectionCount + 1 | 0;\n }\n }\n return (intersectionCount % 2 | 0) !== 0;\n };\n MathUtil.prototype.liesOnSegment_e9v9yt$ = function (p1, p2, c, epsilon) {\n return (new DoubleSegment(p1, p2)).distance_gpjtzr$(c) < epsilon;\n };\n MathUtil.prototype.areEqual_f1g2it$ = function (p1, p2, epsilon) {\n return p1.subtract_gpjtzr$(p2).length() < epsilon;\n };\n MathUtil.prototype.areEqual_hln2n9$ = function (a, b, epsilon) {\n var x = a - b;\n return JsMath.abs(x) < epsilon;\n };\n MathUtil.prototype.distance_l9poh5$ = function (p1, p2) {\n return (new DoubleSegment(p1, p2)).length();\n };\n MathUtil.prototype.subtractX_l3ea4i$ = function (v, x) {\n return new DoubleVector(v.x - x, v.y);\n };\n MathUtil.prototype.addX_l3ea4i$ = function (v, x) {\n return new DoubleVector(v.x + x, v.y);\n };\n MathUtil.prototype.leftEdgeOf_wthzt5$ = function (rect) {\n return new DoubleSegment(new DoubleVector(rect.left, rect.top), new DoubleVector(rect.left, rect.bottom));\n };\n MathUtil.prototype.topEdgeOf_wthzt5$ = function (rect) {\n return new DoubleSegment(new DoubleVector(rect.left, rect.top), new DoubleVector(rect.right, rect.top));\n };\n MathUtil.prototype.rightEdgeOf_wthzt5$ = function (rect) {\n return new DoubleSegment(new DoubleVector(rect.right, rect.top), new DoubleVector(rect.right, rect.bottom));\n };\n MathUtil.prototype.bottomEdgeOf_wthzt5$ = function (rect) {\n return new DoubleSegment(new DoubleVector(rect.left, rect.bottom), new DoubleVector(rect.right, rect.bottom));\n };\n function MathUtil$ClosestPointChecker(target) {\n this.target = target;\n this.distance_pberzz$_0 = -1.0;\n this.coord_ovwx85$_0 = null;\n }\n Object.defineProperty(MathUtil$ClosestPointChecker.prototype, 'distance', {\n configurable: true,\n get: function () {\n return this.distance_pberzz$_0;\n },\n set: function (distance) {\n this.distance_pberzz$_0 = distance;\n }\n });\n Object.defineProperty(MathUtil$ClosestPointChecker.prototype, 'coord', {\n configurable: true,\n get: function () {\n return this.coord_ovwx85$_0;\n },\n set: function (coord) {\n this.coord_ovwx85$_0 = coord;\n }\n });\n MathUtil$ClosestPointChecker.prototype.check_gpjtzr$ = function (coord) {\n var cmpResult = this.compare_gpjtzr$(coord);\n return cmpResult === MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_CLOSER_getInstance() || cmpResult === MathUtil$ClosestPointChecker$COMPARISON_RESULT$EQUAL_getInstance();\n };\n MathUtil$ClosestPointChecker.prototype.compare_gpjtzr$ = function (coord) {\n var newDistance = MathUtil_getInstance().distance_l9poh5$(this.target, coord);\n if (this.distance < 0) {\n this.setNewClosestCoord_0(coord, newDistance);\n return MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_CLOSER_getInstance();\n }\n if (this.distance < newDistance) {\n return MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_FARTHER_getInstance();\n }\n if (this.distance === newDistance) {\n return MathUtil$ClosestPointChecker$COMPARISON_RESULT$EQUAL_getInstance();\n }\n this.setNewClosestCoord_0(coord, newDistance);\n return MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_CLOSER_getInstance();\n };\n MathUtil$ClosestPointChecker.prototype.setNewClosestCoord_0 = function (coord, distance) {\n this.distance = distance;\n this.coord = coord;\n };\n function MathUtil$ClosestPointChecker$COMPARISON_RESULT(name, ordinal) {\n Enum.call(this);\n this.name$ = name;\n this.ordinal$ = ordinal;\n }\n function MathUtil$ClosestPointChecker$COMPARISON_RESULT_initFields() {\n MathUtil$ClosestPointChecker$COMPARISON_RESULT_initFields = function () {\n };\n MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_CLOSER_instance = new MathUtil$ClosestPointChecker$COMPARISON_RESULT('NEW_CLOSER', 0);\n MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_FARTHER_instance = new MathUtil$ClosestPointChecker$COMPARISON_RESULT('NEW_FARTHER', 1);\n MathUtil$ClosestPointChecker$COMPARISON_RESULT$EQUAL_instance = new MathUtil$ClosestPointChecker$COMPARISON_RESULT('EQUAL', 2);\n }\n var MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_CLOSER_instance;\n function MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_CLOSER_getInstance() {\n MathUtil$ClosestPointChecker$COMPARISON_RESULT_initFields();\n return MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_CLOSER_instance;\n }\n var MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_FARTHER_instance;\n function MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_FARTHER_getInstance() {\n MathUtil$ClosestPointChecker$COMPARISON_RESULT_initFields();\n return MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_FARTHER_instance;\n }\n var MathUtil$ClosestPointChecker$COMPARISON_RESULT$EQUAL_instance;\n function MathUtil$ClosestPointChecker$COMPARISON_RESULT$EQUAL_getInstance() {\n MathUtil$ClosestPointChecker$COMPARISON_RESULT_initFields();\n return MathUtil$ClosestPointChecker$COMPARISON_RESULT$EQUAL_instance;\n }\n MathUtil$ClosestPointChecker$COMPARISON_RESULT.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'COMPARISON_RESULT',\n interfaces: [Enum]\n };\n function MathUtil$ClosestPointChecker$COMPARISON_RESULT$values() {\n return [MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_CLOSER_getInstance(), MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_FARTHER_getInstance(), MathUtil$ClosestPointChecker$COMPARISON_RESULT$EQUAL_getInstance()];\n }\n MathUtil$ClosestPointChecker$COMPARISON_RESULT.values = MathUtil$ClosestPointChecker$COMPARISON_RESULT$values;\n function MathUtil$ClosestPointChecker$COMPARISON_RESULT$valueOf(name) {\n switch (name) {\n case 'NEW_CLOSER':\n return MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_CLOSER_getInstance();\n case 'NEW_FARTHER':\n return MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_FARTHER_getInstance();\n case 'EQUAL':\n return MathUtil$ClosestPointChecker$COMPARISON_RESULT$EQUAL_getInstance();\n default:\n throwISE('No enum constant jetbrains.datalore.plot.builder.interact.MathUtil.ClosestPointChecker.COMPARISON_RESULT.' + name);\n }\n }\n MathUtil$ClosestPointChecker$COMPARISON_RESULT.valueOf_61zpoe$ = MathUtil$ClosestPointChecker$COMPARISON_RESULT$valueOf;\n MathUtil$ClosestPointChecker.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ClosestPointChecker',\n interfaces: []\n };\n function MathUtil$MathUtil$ClosestPointChecker_init(x, y, $this) {\n $this = $this || Object.create(MathUtil$ClosestPointChecker.prototype);\n MathUtil$ClosestPointChecker.call($this, new DoubleVector(x, y));\n return $this;\n }\n MathUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'MathUtil',\n interfaces: []\n };\n var MathUtil_instance = null;\n function MathUtil_getInstance() {\n if (MathUtil_instance === null) {\n new MathUtil();\n }\n return MathUtil_instance;\n }\n function PlotInteractor() {\n }\n PlotInteractor.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'PlotInteractor',\n interfaces: [Disposable]\n };\n function TooltipSpec(layoutHint, title, lines, fill, markerColors, isOutlier, anchor, minWidth, isCrosshairEnabled) {\n if (anchor === void 0)\n anchor = null;\n if (minWidth === void 0)\n minWidth = null;\n if (isCrosshairEnabled === void 0)\n isCrosshairEnabled = false;\n this.layoutHint = layoutHint;\n this.title = title;\n this.lines = lines;\n this.fill = fill;\n this.markerColors = markerColors;\n this.isOutlier = isOutlier;\n this.anchor = anchor;\n this.minWidth = minWidth;\n this.isCrosshairEnabled = isCrosshairEnabled;\n }\n TooltipSpec.prototype.toString = function () {\n var tmp$ = 'TooltipSpec(' + this.layoutHint + ', lines=';\n var $receiver = this.lines;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$_0;\n tmp$_0 = $receiver.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n destination.add_11rb$(item.toString());\n }\n return tmp$ + destination + ')';\n };\n function TooltipSpec$Line(label, value) {\n TooltipSpec$Line$Companion_getInstance();\n this.label = label;\n this.value = value;\n }\n TooltipSpec$Line.prototype.toString = function () {\n var $receiver = this.label;\n return $receiver == null || $receiver.length === 0 ? this.value : toString(this.label) + ': ' + this.value;\n };\n function TooltipSpec$Line$Companion() {\n TooltipSpec$Line$Companion_instance = this;\n }\n TooltipSpec$Line$Companion.prototype.withValue_61zpoe$ = function (value) {\n return new TooltipSpec$Line(null, value);\n };\n TooltipSpec$Line$Companion.prototype.withLabelAndValue_f5e6j7$ = function (label, value) {\n return new TooltipSpec$Line(label, value);\n };\n TooltipSpec$Line$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var TooltipSpec$Line$Companion_instance = null;\n function TooltipSpec$Line$Companion_getInstance() {\n if (TooltipSpec$Line$Companion_instance === null) {\n new TooltipSpec$Line$Companion();\n }\n return TooltipSpec$Line$Companion_instance;\n }\n TooltipSpec$Line.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'Line',\n interfaces: []\n };\n TooltipSpec.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TooltipSpec',\n interfaces: []\n };\n function TooltipSpecFactory(contextualMapping, axisOrigin, flippedAxis, xAxisTheme, yAxisTheme) {\n this.contextualMapping_0 = contextualMapping;\n this.axisOrigin_0 = axisOrigin;\n this.flippedAxis_0 = flippedAxis;\n this.xAxisTheme_0 = xAxisTheme;\n this.yAxisTheme_0 = yAxisTheme;\n }\n TooltipSpecFactory.prototype.create_obwj3p$ = function (geomTarget, ctx) {\n return ArrayList_init_1((new TooltipSpecFactory$Helper(this, geomTarget, this.flippedAxis_0, ctx)).createTooltipSpecs_8be2vx$());\n };\n function TooltipSpecFactory$Helper($outer, myGeomTarget, flippedAxis, ctx) {\n this.$outer = $outer;\n this.myGeomTarget_0 = myGeomTarget;\n this.flippedAxis_0 = flippedAxis;\n this.myDataPoints_0 = this.$outer.contextualMapping_0.getDataPoints_o6b7hq$(this.hitIndex_0(), ctx);\n this.myTooltipAnchor_0 = this.$outer.contextualMapping_0.tooltipAnchor;\n this.myTooltipMinWidth_0 = this.$outer.contextualMapping_0.tooltipMinWidth;\n this.myIsCrosshairEnabled_0 = this.$outer.contextualMapping_0.isCrosshairEnabled;\n this.myTooltipTitle_0 = this.$outer.contextualMapping_0.getTitle_o6b7hq$(this.hitIndex_0(), ctx);\n }\n TooltipSpecFactory$Helper.prototype.createTooltipSpecs_8be2vx$ = function () {\n var tooltipSpecs = ArrayList_init();\n addAll(tooltipSpecs, this.axisTooltipSpec_0());\n addAll(tooltipSpecs, this.outlierTooltipSpec_0());\n addAll(tooltipSpecs, this.generalTooltipSpec_0());\n return tooltipSpecs;\n };\n TooltipSpecFactory$Helper.prototype.hitIndex_0 = function () {\n return this.myGeomTarget_0.hitIndex;\n };\n TooltipSpecFactory$Helper.prototype.tipLayoutHint_0 = function () {\n return this.myGeomTarget_0.tipLayoutHint;\n };\n TooltipSpecFactory$Helper.prototype.outlierHints_0 = function () {\n return this.myGeomTarget_0.aesTipLayoutHints;\n };\n TooltipSpecFactory$Helper.prototype.outlierTooltipSpec_0 = function () {\n var tooltipSpecs = ArrayList_init();\n var outlierDataPoints = this.outlierDataPoints_0();\n var tmp$;\n tmp$ = this.outlierHints_0().entries.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n var aes = element.key;\n var hint = element.value;\n var tmp$_0, tmp$_1, tmp$_2;\n var destination = ArrayList_init();\n var tmp$_3;\n tmp$_3 = outlierDataPoints.iterator();\n while (tmp$_3.hasNext()) {\n var element_0 = tmp$_3.next();\n if (equals(aes, element_0.aes))\n destination.add_11rb$(element_0);\n }\n var transform = getPropertyCallableRef('value', 1, function ($receiver) {\n return $receiver.value;\n });\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(destination, 10));\n var tmp$_4;\n tmp$_4 = destination.iterator();\n while (tmp$_4.hasNext()) {\n var item = tmp$_4.next();\n destination_0.add_11rb$(transform(item));\n }\n var transform_0 = getCallableRef('withValue', function ($receiver, p1) {\n return $receiver.withValue_61zpoe$(p1);\n }.bind(null, TooltipSpec$Line$Companion_getInstance()));\n var destination_1 = ArrayList_init_0(collectionSizeOrDefault(destination_0, 10));\n var tmp$_5;\n tmp$_5 = destination_0.iterator();\n while (tmp$_5.hasNext()) {\n var item_0 = tmp$_5.next();\n destination_1.add_11rb$(transform_0(item_0));\n }\n var linesForAes = destination_1;\n if (!linesForAes.isEmpty()) {\n tooltipSpecs.add_11rb$(new TooltipSpec(hint, null, linesForAes, (tmp$_2 = (tmp$_1 = (tmp$_0 = hint.fillColor) != null ? tmp$_0 : this.tipLayoutHint_0().fillColor) != null ? tmp$_1 : firstOrNull(this.tipLayoutHint_0().markerColors)) != null ? tmp$_2 : Color.Companion.WHITE, emptyList(), true));\n }\n }\n return tooltipSpecs;\n };\n TooltipSpecFactory$Helper.prototype.axisTooltipSpec_0 = function () {\n var tooltipSpecs = ArrayList_init();\n var tmp$ = Aes.Companion.X;\n var $receiver = this.axisDataPoints_0();\n var destination = ArrayList_init();\n var tmp$_0;\n tmp$_0 = $receiver.iterator();\n while (tmp$_0.hasNext()) {\n var element = tmp$_0.next();\n if (equals(Aes.Companion.X, element.aes))\n destination.add_11rb$(element);\n }\n var transform = getPropertyCallableRef('value', 1, function ($receiver) {\n return $receiver.value;\n });\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(destination, 10));\n var tmp$_1;\n tmp$_1 = destination.iterator();\n while (tmp$_1.hasNext()) {\n var item = tmp$_1.next();\n destination_0.add_11rb$(transform(item));\n }\n var transform_0 = getCallableRef('withValue', function ($receiver, p1) {\n return $receiver.withValue_61zpoe$(p1);\n }.bind(null, TooltipSpec$Line$Companion_getInstance()));\n var destination_1 = ArrayList_init_0(collectionSizeOrDefault(destination_0, 10));\n var tmp$_2;\n tmp$_2 = destination_0.iterator();\n while (tmp$_2.hasNext()) {\n var item_0 = tmp$_2.next();\n destination_1.add_11rb$(transform_0(item_0));\n }\n var tmp$_3 = to(tmp$, destination_1);\n var tmp$_4 = Aes.Companion.Y;\n var $receiver_0 = this.axisDataPoints_0();\n var destination_2 = ArrayList_init();\n var tmp$_5;\n tmp$_5 = $receiver_0.iterator();\n while (tmp$_5.hasNext()) {\n var element_0 = tmp$_5.next();\n if (equals(Aes.Companion.Y, element_0.aes))\n destination_2.add_11rb$(element_0);\n }\n var transform_1 = getPropertyCallableRef('value', 1, function ($receiver) {\n return $receiver.value;\n });\n var destination_3 = ArrayList_init_0(collectionSizeOrDefault(destination_2, 10));\n var tmp$_6;\n tmp$_6 = destination_2.iterator();\n while (tmp$_6.hasNext()) {\n var item_1 = tmp$_6.next();\n destination_3.add_11rb$(transform_1(item_1));\n }\n var transform_2 = getCallableRef('withValue', function ($receiver, p1) {\n return $receiver.withValue_61zpoe$(p1);\n }.bind(null, TooltipSpec$Line$Companion_getInstance()));\n var destination_4 = ArrayList_init_0(collectionSizeOrDefault(destination_3, 10));\n var tmp$_7;\n tmp$_7 = destination_3.iterator();\n while (tmp$_7.hasNext()) {\n var item_2 = tmp$_7.next();\n destination_4.add_11rb$(transform_2(item_2));\n }\n var axis = mapOf([tmp$_3, to(tmp$_4, destination_4)]);\n var tmp$_8;\n tmp$_8 = axis.entries.iterator();\n while (tmp$_8.hasNext()) {\n var element_1 = tmp$_8.next();\n var aes = element_1.key;\n var lines = element_1.value;\n if (!lines.isEmpty()) {\n var layoutHint = this.createHintForAxis_0(aes, this.flippedAxis_0);\n tooltipSpecs.add_11rb$(new TooltipSpec(layoutHint, null, lines, ensureNotNull(layoutHint.fillColor), emptyList(), true));\n }\n }\n return tooltipSpecs;\n };\n TooltipSpecFactory$Helper.prototype.generalTooltipSpec_0 = function () {\n var tmp$;\n var generalDataPoints = this.generalDataPoints_0();\n var destination = ArrayList_init_0(collectionSizeOrDefault(generalDataPoints, 10));\n var tmp$_0;\n tmp$_0 = generalDataPoints.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n destination.add_11rb$(TooltipSpec$Line$Companion_getInstance().withLabelAndValue_f5e6j7$(item.label, item.value));\n }\n var generalLines = destination;\n if (!generalLines.isEmpty()) {\n tmp$ = listOf(new TooltipSpec(this.tipLayoutHint_0(), this.myTooltipTitle_0, generalLines, null, this.tipLayoutHint_0().markerColors, false, this.myTooltipAnchor_0, this.myTooltipMinWidth_0, this.myIsCrosshairEnabled_0));\n } else {\n tmp$ = emptyList();\n }\n return tmp$;\n };\n TooltipSpecFactory$Helper.prototype.outlierDataPoints_0 = function () {\n var $receiver = this.myDataPoints_0;\n var destination = ArrayList_init();\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n if (element.isOutlier && !element.isAxis)\n destination.add_11rb$(element);\n }\n return destination;\n };\n TooltipSpecFactory$Helper.prototype.axisDataPoints_0 = function () {\n var $receiver = this.myDataPoints_0;\n var predicate = getPropertyCallableRef('isAxis', 1, function ($receiver) {\n return $receiver.isAxis;\n });\n var destination = ArrayList_init();\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n if (predicate(element))\n destination.add_11rb$(element);\n }\n return destination;\n };\n TooltipSpecFactory$Helper.prototype.generalDataPoints_0 = function () {\n var $receiver = this.myDataPoints_0;\n var predicate = getPropertyCallableRef('isOutlier', 1, function ($receiver) {\n return $receiver.isOutlier;\n });\n var destination = ArrayList_init();\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n if (!predicate(element))\n destination.add_11rb$(element);\n }\n var nonOutlierDataPoints = destination;\n var $receiver_0 = this.outlierDataPoints_0();\n var transform = getPropertyCallableRef('aes', 1, function ($receiver) {\n return $receiver.aes;\n });\n var destination_0 = ArrayList_init();\n var tmp$_0;\n tmp$_0 = $receiver_0.iterator();\n while (tmp$_0.hasNext()) {\n var element_0 = tmp$_0.next();\n var tmp$_0_0;\n if ((tmp$_0_0 = transform(element_0)) != null) {\n destination_0.add_11rb$(tmp$_0_0);\n }\n }\n var outliers = destination_0;\n var transform_0 = getPropertyCallableRef('aes', 1, function ($receiver) {\n return $receiver.aes;\n });\n var destination_1 = ArrayList_init();\n var tmp$_1;\n tmp$_1 = nonOutlierDataPoints.iterator();\n while (tmp$_1.hasNext()) {\n var element_1 = tmp$_1.next();\n var tmp$_0_1;\n if ((tmp$_0_1 = transform_0(element_1)) != null) {\n destination_1.add_11rb$(tmp$_0_1);\n }\n }\n var generalAesList = minus_0(destination_1, outliers);\n var destination_2 = ArrayList_init();\n var tmp$_2;\n tmp$_2 = nonOutlierDataPoints.iterator();\n while (tmp$_2.hasNext()) {\n var element_2 = tmp$_2.next();\n var predicate$result;\n var tmp$_3;\n tmp$_3 = element_2.aes;\n if (tmp$_3 == null) {\n predicate$result = true;\n } else if (contains(generalAesList, tmp$_3)) {\n predicate$result = true;\n } else {\n predicate$result = false;\n }\n if (predicate$result)\n destination_2.add_11rb$(element_2);\n }\n return destination_2;\n };\n TooltipSpecFactory$Helper.prototype.createHintForAxis_0 = function (aes, flippedAxis) {\n var tmp$;\n var block$result;\n if (flippedAxis && equals(aes, Aes.Companion.X)) {\n block$result = Aes.Companion.Y;\n } else if (flippedAxis && equals(aes, Aes.Companion.Y)) {\n block$result = Aes.Companion.X;\n } else {\n block$result = aes;\n }\n var axis = block$result;\n if (equals(axis, Aes.Companion.X))\n tmp$ = TipLayoutHint.Companion.xAxisTooltip_yyg4p0$(new DoubleVector(ensureNotNull(this.tipLayoutHint_0().coord).x, this.$outer.axisOrigin_0.y), Defaults$Common$Tooltip_getInstance().AXIS_RADIUS, void 0, this.$outer.xAxisTheme_0.tooltipFill());\n else if (equals(axis, Aes.Companion.Y))\n tmp$ = TipLayoutHint.Companion.yAxisTooltip_yyg4p0$(new DoubleVector(this.$outer.axisOrigin_0.x, ensureNotNull(this.tipLayoutHint_0().coord).y), Defaults$Common$Tooltip_getInstance().AXIS_RADIUS, void 0, this.$outer.yAxisTheme_0.tooltipFill());\n else {\n throw IllegalStateException_init(('Not an axis aes: ' + axis).toString());\n }\n return tmp$;\n };\n TooltipSpecFactory$Helper.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'Helper',\n interfaces: []\n };\n TooltipSpecFactory.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TooltipSpecFactory',\n interfaces: []\n };\n function FlippedTargetCollector(targetCollector) {\n this.targetCollector_0 = targetCollector;\n }\n FlippedTargetCollector.prototype.addPoint_cnsimy$$default = function (index, point, radius, tooltipParams, tooltipKind) {\n this.targetCollector_0.addPoint_cnsimy$(index, point.flip(), radius, tooltipParams, tooltipKind);\n };\n FlippedTargetCollector.prototype.addRectangle_bxzvr8$$default = function (index, rectangle, tooltipParams, tooltipKind) {\n this.targetCollector_0.addRectangle_bxzvr8$(index, rectangle.flip(), tooltipParams, tooltipKind);\n };\n function FlippedTargetCollector$addPath$lambda(closure$indices) {\n return function (it) {\n return closure$indices.get_za3lpa$(it);\n };\n }\n FlippedTargetCollector.prototype.addPath_sa5m83$$default = function (points, localToGlobalIndex, tooltipParams, tooltipKind) {\n var destination = ArrayList_init_0(collectionSizeOrDefault(points, 10));\n var tmp$;\n tmp$ = points.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n destination.add_11rb$(item.flip());\n }\n var pointsWithIndex = reversed(withIndex(destination));\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(pointsWithIndex, 10));\n var tmp$_0;\n tmp$_0 = pointsWithIndex.iterator();\n while (tmp$_0.hasNext()) {\n var item_0 = tmp$_0.next();\n destination_0.add_11rb$(localToGlobalIndex(item_0.index));\n }\n var indices = destination_0;\n var tmp$_1 = this.targetCollector_0;\n var transform = getPropertyCallableRef('value', 1, function ($receiver) {\n return $receiver.value;\n });\n var destination_1 = ArrayList_init_0(collectionSizeOrDefault(pointsWithIndex, 10));\n var tmp$_2;\n tmp$_2 = pointsWithIndex.iterator();\n while (tmp$_2.hasNext()) {\n var item_1 = tmp$_2.next();\n destination_1.add_11rb$(transform(item_1));\n }\n tmp$_1.addPath_sa5m83$(destination_1, FlippedTargetCollector$addPath$lambda(indices), tooltipParams, tooltipKind);\n };\n FlippedTargetCollector.prototype.addPolygon_sa5m83$$default = function (points, localToGlobalIndex, tooltipParams, tooltipKind) {\n var tmp$ = this.targetCollector_0;\n var destination = ArrayList_init_0(collectionSizeOrDefault(points, 10));\n var tmp$_0;\n tmp$_0 = points.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n destination.add_11rb$(item.flip());\n }\n tmp$.addPolygon_sa5m83$(destination, localToGlobalIndex, tooltipParams, tooltipKind);\n };\n FlippedTargetCollector.prototype.withFlippedAxis = function () {\n throw IllegalStateException_init(\"'withFlippedAxis()' is not applicable to FlippedTargetCollector\");\n };\n FlippedTargetCollector.prototype.withYOrientation = function () {\n if (!!Kotlin.isType(this.targetCollector_0, YOrientationTargetCollector)) {\n var message = \"'withYOrientation()' is not applicable to YOrientationTargetCollector\";\n throw IllegalStateException_init(message.toString());\n }\n return new YOrientationTargetCollector(this);\n };\n FlippedTargetCollector.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'FlippedTargetCollector',\n interfaces: [GeomTargetCollector]\n };\n function LayerTargetCollectorWithLocator(geomKind, lookupSpec, contextualMapping) {\n this.geomKind_0 = geomKind;\n this.lookupSpec_0 = lookupSpec;\n this.contextualMapping_0 = contextualMapping;\n this.myTargets_0 = ArrayList_init();\n this.myLocator_0 = null;\n }\n function LayerTargetCollectorWithLocator$addPoint$lambda(closure$index) {\n return function (it) {\n return closure$index;\n };\n }\n LayerTargetCollectorWithLocator.prototype.addPoint_cnsimy$$default = function (index, point, radius, tooltipParams, tooltipKind) {\n if (this.contextualMapping_0.ignoreInvisibleTargets) {\n var tmp$ = radius === 0.0;\n if (!tmp$) {\n var $receiver = tooltipParams.markerColors;\n var all$result;\n all$break: do {\n var tmp$_0;\n if (Kotlin.isType($receiver, Collection) && $receiver.isEmpty()) {\n all$result = true;\n break all$break;\n }\n tmp$_0 = $receiver.iterator();\n while (tmp$_0.hasNext()) {\n var element = tmp$_0.next();\n if (!(element.alpha === 0)) {\n all$result = false;\n break all$break;\n }\n }\n all$result = true;\n }\n while (false);\n tmp$ = all$result;\n }\n if (tmp$) {\n return;\n }\n }\n this.addTarget_0(new TargetPrototype(HitShape.Companion.point_e1sv3v$(point, radius), LayerTargetCollectorWithLocator$addPoint$lambda(index), tooltipParams, tooltipKind));\n };\n function LayerTargetCollectorWithLocator$addRectangle$lambda(closure$index) {\n return function (it) {\n return closure$index;\n };\n }\n LayerTargetCollectorWithLocator.prototype.addRectangle_bxzvr8$$default = function (index, rectangle, tooltipParams, tooltipKind) {\n if (this.contextualMapping_0.ignoreInvisibleTargets) {\n var tmp$ = rectangle.width === 0.0 || rectangle.height === 0.0;\n if (!tmp$) {\n var $receiver = tooltipParams.markerColors;\n var all$result;\n all$break: do {\n var tmp$_0;\n if (Kotlin.isType($receiver, Collection) && $receiver.isEmpty()) {\n all$result = true;\n break all$break;\n }\n tmp$_0 = $receiver.iterator();\n while (tmp$_0.hasNext()) {\n var element = tmp$_0.next();\n if (!(element.alpha === 0)) {\n all$result = false;\n break all$break;\n }\n }\n all$result = true;\n }\n while (false);\n tmp$ = all$result;\n }\n if (tmp$) {\n return;\n }\n }\n this.addTarget_0(new TargetPrototype(HitShape.Companion.rect_wthzt5$(rectangle), LayerTargetCollectorWithLocator$addRectangle$lambda(index), tooltipParams, tooltipKind));\n };\n LayerTargetCollectorWithLocator.prototype.addPath_sa5m83$$default = function (points, localToGlobalIndex, tooltipParams, tooltipKind) {\n this.addTarget_0(new TargetPrototype(HitShape.Companion.path_ytws2g$(points), localToGlobalIndex, tooltipParams, tooltipKind));\n };\n LayerTargetCollectorWithLocator.prototype.addPolygon_sa5m83$$default = function (points, localToGlobalIndex, tooltipParams, tooltipKind) {\n this.addTarget_0(new TargetPrototype(HitShape.Companion.polygon_ytws2g$(points), localToGlobalIndex, tooltipParams, tooltipKind));\n };\n LayerTargetCollectorWithLocator.prototype.withFlippedAxis = function () {\n return new FlippedTargetCollector(this);\n };\n LayerTargetCollectorWithLocator.prototype.withYOrientation = function () {\n return new YOrientationTargetCollector(this);\n };\n LayerTargetCollectorWithLocator.prototype.addTarget_0 = function (targetPrototype) {\n this.myTargets_0.add_11rb$(targetPrototype);\n this.myLocator_0 = null;\n };\n LayerTargetCollectorWithLocator.prototype.search_gpjtzr$ = function (coord) {\n if (this.myLocator_0 == null) {\n this.myLocator_0 = new LayerTargetLocator(this.geomKind_0, this.lookupSpec_0, this.contextualMapping_0, this.myTargets_0);\n }\n return ensureNotNull(this.myLocator_0).search_gpjtzr$(coord);\n };\n LayerTargetCollectorWithLocator.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LayerTargetCollectorWithLocator',\n interfaces: [GeomTargetLocator, GeomTargetCollector]\n };\n function LayerTargetLocator(geomKind, lookupSpec, contextualMapping, targetPrototypes) {\n this.geomKind_0 = geomKind;\n this.lookupSpec_0 = lookupSpec;\n this.contextualMapping_0 = contextualMapping;\n this.myTargets_0 = ArrayList_init();\n this.myTargetDetector_0 = new TargetDetector(this.lookupSpec_0.lookupSpace, this.lookupSpec_0.lookupStrategy);\n this.mySimpleGeometry_0 = setOf([GeomKind.RECT, GeomKind.POLYGON]);\n var tmp$, tmp$_0;\n if (this.mySimpleGeometry_0.contains_11rb$(this.geomKind_0))\n tmp$ = LayerTargetLocator$Collector$CollectingStrategy$REPLACE_getInstance();\n else if (this.lookupSpec_0.lookupSpace === GeomTargetLocator$LookupSpace.X && this.lookupSpec_0.lookupStrategy === GeomTargetLocator$LookupStrategy.NEAREST)\n tmp$ = LayerTargetLocator$Collector$CollectingStrategy$APPEND_IF_EQUAL_getInstance();\n else if (this.lookupSpec_0.lookupSpace === GeomTargetLocator$LookupSpace.X)\n tmp$ = LayerTargetLocator$Collector$CollectingStrategy$APPEND_getInstance();\n else if (this.lookupSpec_0.lookupStrategy === GeomTargetLocator$LookupStrategy.HOVER)\n tmp$ = LayerTargetLocator$Collector$CollectingStrategy$APPEND_getInstance();\n else if (this.lookupSpec_0.lookupStrategy === GeomTargetLocator$LookupStrategy.NONE || this.lookupSpec_0.lookupSpace === GeomTargetLocator$LookupSpace.NONE)\n tmp$ = LayerTargetLocator$Collector$CollectingStrategy$IGNORE_getInstance();\n else {\n tmp$ = LayerTargetLocator$Collector$CollectingStrategy$REPLACE_getInstance();\n }\n this.myCollectingStrategy_0 = tmp$;\n var toProjection = LayerTargetLocator_init$toProjection(this);\n tmp$_0 = targetPrototypes.iterator();\n while (tmp$_0.hasNext()) {\n var prototype = tmp$_0.next();\n this.myTargets_0.add_11rb$(new LayerTargetLocator$Target(toProjection(prototype), prototype));\n }\n }\n LayerTargetLocator.prototype.addLookupResults_0 = function (collector, targets) {\n if (collector.size() === 0) {\n return;\n }\n var tmp$ = collector.collection();\n var b = collector.closestPointChecker.distance;\n targets.add_11rb$(new GeomTargetLocator$LookupResult(tmp$, JsMath.max(0.0, b), this.geomKind_0, this.contextualMapping_0, this.contextualMapping_0.isCrosshairEnabled));\n };\n LayerTargetLocator.prototype.search_gpjtzr$ = function (coord) {\n var tmp$;\n if (this.myTargets_0.isEmpty()) {\n return null;\n }\n var rectCollector = new LayerTargetLocator$Collector(coord, this.myCollectingStrategy_0, this.lookupSpec_0.lookupSpace);\n var pointCollector = new LayerTargetLocator$Collector(coord, this.myCollectingStrategy_0, this.lookupSpec_0.lookupSpace);\n var pathCollector = new LayerTargetLocator$Collector(coord, this.myCollectingStrategy_0, this.lookupSpec_0.lookupSpace);\n var polygonCollector = new LayerTargetLocator$Collector(coord, LayerTargetLocator$Collector$CollectingStrategy$REPLACE_getInstance(), this.lookupSpec_0.lookupSpace);\n tmp$ = this.myTargets_0.iterator();\n while (tmp$.hasNext()) {\n var target = tmp$.next();\n switch (target.prototype.hitShape_8be2vx$.kind.name) {\n case 'RECT':\n this.processRect_0(coord, target, rectCollector);\n break;\n case 'POINT':\n this.processPoint_0(coord, target, pointCollector);\n break;\n case 'PATH':\n this.processPath_0(coord, target, pathCollector);\n break;\n case 'POLYGON':\n this.processPolygon_0(coord, target, polygonCollector);\n break;\n }\n }\n var lookupResults = ArrayList_init();\n this.addLookupResults_0(pathCollector, lookupResults);\n this.addLookupResults_0(rectCollector, lookupResults);\n this.addLookupResults_0(pointCollector, lookupResults);\n this.addLookupResults_0(polygonCollector, lookupResults);\n return this.getClosestTarget_0(lookupResults);\n };\n LayerTargetLocator.prototype.getClosestTarget_0 = function (lookupResults) {\n var tmp$;\n if (lookupResults.isEmpty()) {\n return null;\n }\n var closestTargets = lookupResults.get_za3lpa$(0);\n if (!(closestTargets.distance >= 0)) {\n var message = 'Failed requirement.';\n throw IllegalArgumentException_init(message.toString());\n }\n tmp$ = lookupResults.iterator();\n while (tmp$.hasNext()) {\n var lookupResult = tmp$.next();\n if (lookupResult.distance < closestTargets.distance) {\n closestTargets = lookupResult;\n }\n }\n return closestTargets;\n };\n LayerTargetLocator.prototype.processRect_0 = function (coord, target, resultCollector) {\n var tmp$;\n if (this.myTargetDetector_0.checkRect_fqo6rd$(coord, target.rectProjection, resultCollector.closestPointChecker)) {\n var rect = target.prototype.hitShape_8be2vx$.rect;\n if (equals(target.prototype.tooltipKind_8be2vx$, TipLayoutHint$Kind.CURSOR_TOOLTIP))\n tmp$ = rect.height / 2.0;\n else\n tmp$ = 0.0;\n var yOffset = tmp$;\n resultCollector.collect_11rb$(target.prototype.createGeomTarget_x7nr8i$(rect.origin.add_gpjtzr$(new DoubleVector(rect.width / 2, yOffset)), this.getKeyForSingleObjectGeometry_0(target.prototype)));\n }\n };\n LayerTargetLocator.prototype.processPolygon_0 = function (coord, target, resultCollector) {\n if (this.myTargetDetector_0.checkPolygon_q60eo3$(coord, target.polygonProjection, resultCollector.closestPointChecker)) {\n resultCollector.collect_11rb$(target.prototype.createGeomTarget_x7nr8i$(coord, this.getKeyForSingleObjectGeometry_0(target.prototype)));\n }\n };\n LayerTargetLocator.prototype.processPoint_0 = function (coord, target, resultCollector) {\n if (this.myTargetDetector_0.checkPoint_w0b42b$(coord, target.pointProjection, resultCollector.closestPointChecker)) {\n resultCollector.collect_11rb$(target.prototype.createGeomTarget_x7nr8i$(target.prototype.hitShape_8be2vx$.point.center, this.getKeyForSingleObjectGeometry_0(target.prototype)));\n }\n };\n LayerTargetLocator.prototype.processPath_0 = function (coord, target, resultCollector) {\n var pointChecker = this.myCollectingStrategy_0 === LayerTargetLocator$Collector$CollectingStrategy$APPEND_getInstance() ? new MathUtil$ClosestPointChecker(coord) : resultCollector.closestPointChecker;\n var hitPoint = this.myTargetDetector_0.checkPath_z3141m$(coord, target.pathProjection, pointChecker);\n if (hitPoint != null) {\n resultCollector.collect_11rb$(target.prototype.createGeomTarget_x7nr8i$(hitPoint.originalCoord, hitPoint.index));\n }\n };\n LayerTargetLocator.prototype.getKeyForSingleObjectGeometry_0 = function (prototype) {\n return prototype.indexMapper_8be2vx$(0);\n };\n function LayerTargetLocator$Target(targetProjection, prototype) {\n this.targetProjection_0 = targetProjection;\n this.prototype = prototype;\n }\n Object.defineProperty(LayerTargetLocator$Target.prototype, 'pointProjection', {\n configurable: true,\n get: function () {\n var tmp$;\n return Kotlin.isType(tmp$ = this.targetProjection_0, PointTargetProjection) ? tmp$ : throwCCE();\n }\n });\n Object.defineProperty(LayerTargetLocator$Target.prototype, 'rectProjection', {\n configurable: true,\n get: function () {\n var tmp$;\n return Kotlin.isType(tmp$ = this.targetProjection_0, RectTargetProjection) ? tmp$ : throwCCE();\n }\n });\n Object.defineProperty(LayerTargetLocator$Target.prototype, 'polygonProjection', {\n configurable: true,\n get: function () {\n var tmp$;\n return Kotlin.isType(tmp$ = this.targetProjection_0, PolygonTargetProjection) ? tmp$ : throwCCE();\n }\n });\n Object.defineProperty(LayerTargetLocator$Target.prototype, 'pathProjection', {\n configurable: true,\n get: function () {\n var tmp$;\n return Kotlin.isType(tmp$ = this.targetProjection_0, PathTargetProjection) ? tmp$ : throwCCE();\n }\n });\n LayerTargetLocator$Target.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'Target',\n interfaces: []\n };\n function LayerTargetLocator$Collector(cursor, myStrategy, lookupSpace) {\n this.myStrategy_0 = myStrategy;\n this.result_0 = ArrayList_init();\n var tmp$;\n if (lookupSpace === GeomTargetLocator$LookupSpace.X) {\n tmp$ = new MathUtil$ClosestPointChecker(new DoubleVector(cursor.x, 0.0));\n } else {\n tmp$ = new MathUtil$ClosestPointChecker(cursor);\n }\n this.closestPointChecker = tmp$;\n this.myLastAddedDistance_0 = -1.0;\n }\n LayerTargetLocator$Collector.prototype.collect_11rb$ = function (data) {\n switch (this.myStrategy_0.name) {\n case 'APPEND':\n this.add_0(data);\n break;\n case 'REPLACE':\n this.replace_0(data);\n break;\n case 'APPEND_IF_EQUAL':\n if (this.myLastAddedDistance_0 === this.closestPointChecker.distance) {\n this.add_0(data);\n } else {\n this.replace_0(data);\n }\n\n break;\n case 'IGNORE':\n return;\n }\n };\n LayerTargetLocator$Collector.prototype.collection = function () {\n return this.result_0;\n };\n LayerTargetLocator$Collector.prototype.size = function () {\n return this.result_0.size;\n };\n LayerTargetLocator$Collector.prototype.add_0 = function (data) {\n this.result_0.add_11rb$(data);\n this.myLastAddedDistance_0 = this.closestPointChecker.distance;\n };\n LayerTargetLocator$Collector.prototype.replace_0 = function (locationData) {\n this.result_0.clear();\n this.result_0.add_11rb$(locationData);\n this.myLastAddedDistance_0 = this.closestPointChecker.distance;\n };\n function LayerTargetLocator$Collector$CollectingStrategy(name, ordinal) {\n Enum.call(this);\n this.name$ = name;\n this.ordinal$ = ordinal;\n }\n function LayerTargetLocator$Collector$CollectingStrategy_initFields() {\n LayerTargetLocator$Collector$CollectingStrategy_initFields = function () {\n };\n LayerTargetLocator$Collector$CollectingStrategy$APPEND_instance = new LayerTargetLocator$Collector$CollectingStrategy('APPEND', 0);\n LayerTargetLocator$Collector$CollectingStrategy$REPLACE_instance = new LayerTargetLocator$Collector$CollectingStrategy('REPLACE', 1);\n LayerTargetLocator$Collector$CollectingStrategy$APPEND_IF_EQUAL_instance = new LayerTargetLocator$Collector$CollectingStrategy('APPEND_IF_EQUAL', 2);\n LayerTargetLocator$Collector$CollectingStrategy$IGNORE_instance = new LayerTargetLocator$Collector$CollectingStrategy('IGNORE', 3);\n }\n var LayerTargetLocator$Collector$CollectingStrategy$APPEND_instance;\n function LayerTargetLocator$Collector$CollectingStrategy$APPEND_getInstance() {\n LayerTargetLocator$Collector$CollectingStrategy_initFields();\n return LayerTargetLocator$Collector$CollectingStrategy$APPEND_instance;\n }\n var LayerTargetLocator$Collector$CollectingStrategy$REPLACE_instance;\n function LayerTargetLocator$Collector$CollectingStrategy$REPLACE_getInstance() {\n LayerTargetLocator$Collector$CollectingStrategy_initFields();\n return LayerTargetLocator$Collector$CollectingStrategy$REPLACE_instance;\n }\n var LayerTargetLocator$Collector$CollectingStrategy$APPEND_IF_EQUAL_instance;\n function LayerTargetLocator$Collector$CollectingStrategy$APPEND_IF_EQUAL_getInstance() {\n LayerTargetLocator$Collector$CollectingStrategy_initFields();\n return LayerTargetLocator$Collector$CollectingStrategy$APPEND_IF_EQUAL_instance;\n }\n var LayerTargetLocator$Collector$CollectingStrategy$IGNORE_instance;\n function LayerTargetLocator$Collector$CollectingStrategy$IGNORE_getInstance() {\n LayerTargetLocator$Collector$CollectingStrategy_initFields();\n return LayerTargetLocator$Collector$CollectingStrategy$IGNORE_instance;\n }\n LayerTargetLocator$Collector$CollectingStrategy.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'CollectingStrategy',\n interfaces: [Enum]\n };\n function LayerTargetLocator$Collector$CollectingStrategy$values() {\n return [LayerTargetLocator$Collector$CollectingStrategy$APPEND_getInstance(), LayerTargetLocator$Collector$CollectingStrategy$REPLACE_getInstance(), LayerTargetLocator$Collector$CollectingStrategy$APPEND_IF_EQUAL_getInstance(), LayerTargetLocator$Collector$CollectingStrategy$IGNORE_getInstance()];\n }\n LayerTargetLocator$Collector$CollectingStrategy.values = LayerTargetLocator$Collector$CollectingStrategy$values;\n function LayerTargetLocator$Collector$CollectingStrategy$valueOf(name) {\n switch (name) {\n case 'APPEND':\n return LayerTargetLocator$Collector$CollectingStrategy$APPEND_getInstance();\n case 'REPLACE':\n return LayerTargetLocator$Collector$CollectingStrategy$REPLACE_getInstance();\n case 'APPEND_IF_EQUAL':\n return LayerTargetLocator$Collector$CollectingStrategy$APPEND_IF_EQUAL_getInstance();\n case 'IGNORE':\n return LayerTargetLocator$Collector$CollectingStrategy$IGNORE_getInstance();\n default:\n throwISE('No enum constant jetbrains.datalore.plot.builder.interact.loc.LayerTargetLocator.Collector.CollectingStrategy.' + name);\n }\n }\n LayerTargetLocator$Collector$CollectingStrategy.valueOf_61zpoe$ = LayerTargetLocator$Collector$CollectingStrategy$valueOf;\n LayerTargetLocator$Collector.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'Collector',\n interfaces: []\n };\n function LayerTargetLocator_init$toProjection(this$LayerTargetLocator) {\n return function (prototype) {\n var tmp$;\n switch (prototype.hitShape_8be2vx$.kind.name) {\n case 'POINT':\n tmp$ = PointTargetProjection$Companion_getInstance().create_p1yge$(prototype.hitShape_8be2vx$.point.center, this$LayerTargetLocator.lookupSpec_0.lookupSpace);\n break;\n case 'RECT':\n tmp$ = RectTargetProjection$Companion_getInstance().create_tb1cvm$(prototype.hitShape_8be2vx$.rect, this$LayerTargetLocator.lookupSpec_0.lookupSpace);\n break;\n case 'POLYGON':\n tmp$ = PolygonTargetProjection$Companion_getInstance().create_a95qp$(prototype.hitShape_8be2vx$.points, this$LayerTargetLocator.lookupSpec_0.lookupSpace);\n break;\n case 'PATH':\n tmp$ = PathTargetProjection$Companion_getInstance().create_zb7j6l$(prototype.hitShape_8be2vx$.points, prototype.indexMapper_8be2vx$, this$LayerTargetLocator.lookupSpec_0.lookupSpace);\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n }\n LayerTargetLocator.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LayerTargetLocator',\n interfaces: [GeomTargetLocator]\n };\n var compareByDescending$lambda = wrapFunction(function () {\n var compareValues = Kotlin.kotlin.comparisons.compareValues_s00gnj$;\n return function (closure$selector) {\n return function (a, b) {\n var selector = closure$selector;\n return compareValues(selector(b), selector(a));\n };\n };\n });\n function LocatedTargetsPicker(flippedAxis, myCursorCoord) {\n LocatedTargetsPicker$Companion_getInstance();\n if (myCursorCoord === void 0)\n myCursorCoord = null;\n this.flippedAxis = flippedAxis;\n this.myCursorCoord_0 = myCursorCoord;\n this.myAllLookupResults_0 = ArrayList_init();\n }\n Object.defineProperty(LocatedTargetsPicker.prototype, 'picked', {\n configurable: true,\n get: function () {\n return this.chooseBestResult_0();\n }\n });\n LocatedTargetsPicker.prototype.addLookupResult_ljcmc2$ = function (result) {\n var lookupResult = LocatedTargetsPicker$Companion_getInstance().filterResults_0(result, this.myCursorCoord_0, this.flippedAxis);\n this.myAllLookupResults_0.add_11rb$(lookupResult);\n };\n function LocatedTargetsPicker$chooseBestResult$hasGeneralTooltip(lookupResult) {\n return lookupResult.contextualMapping.hasGeneralTooltip;\n }\n function LocatedTargetsPicker$chooseBestResult$hasAxisTooltip(lookupResult) {\n return lookupResult.contextualMapping.hasAxisTooltip || listOf_0([GeomKind.V_LINE, GeomKind.H_LINE]).contains_11rb$(lookupResult.geomKind);\n }\n function LocatedTargetsPicker$chooseBestResult$lambda(f) {\n var distance = f.component2();\n return distance;\n }\n function LocatedTargetsPicker$chooseBestResult$lambda_0(f) {\n var distance = f.component2();\n return distance;\n }\n LocatedTargetsPicker.prototype.chooseBestResult_0 = function () {\n var tmp$, tmp$_0, tmp$_1;\n var hasGeneralTooltip = LocatedTargetsPicker$chooseBestResult$hasGeneralTooltip;\n var hasAxisTooltip = LocatedTargetsPicker$chooseBestResult$hasAxisTooltip;\n var $receiver = this.myAllLookupResults_0;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$_2;\n tmp$_2 = $receiver.iterator();\n while (tmp$_2.hasNext()) {\n var item = tmp$_2.next();\n destination.add_11rb$(to(item, LocatedTargetsPicker$Companion_getInstance().distance_0(item, this.myCursorCoord_0)));\n }\n var destination_0 = ArrayList_init();\n var tmp$_3;\n tmp$_3 = destination.iterator();\n while (tmp$_3.hasNext()) {\n var element = tmp$_3.next();\n var lookupResult = element.component1()\n , distance = element.component2();\n if (lookupResult.isCrosshairEnabled || distance <= LocatedTargetsPicker$Companion_getInstance().CUTOFF_DISTANCE_8be2vx$)\n destination_0.add_11rb$(element);\n }\n var withDistances = destination_0;\n var minByOrNull$result;\n minByOrNull$break: do {\n var iterator = withDistances.iterator();\n if (!iterator.hasNext()) {\n minByOrNull$result = null;\n break minByOrNull$break;\n }\n var minElem = iterator.next();\n if (!iterator.hasNext()) {\n minByOrNull$result = minElem;\n break minByOrNull$break;\n }\n var distance_0 = minElem.component2();\n var minValue = distance_0;\n do {\n var e = iterator.next();\n var distance_1 = e.component2();\n var v = distance_1;\n if (Kotlin.compareTo(minValue, v) > 0) {\n minElem = e;\n minValue = v;\n }\n }\n while (iterator.hasNext());\n minByOrNull$result = minElem;\n }\n while (false);\n var minDistance = (tmp$_0 = (tmp$ = minByOrNull$result) != null ? tmp$.second : null) != null ? tmp$_0 : 0.0;\n var picked = {v: emptyList()};\n var destination_1 = ArrayList_init();\n var tmp$_4;\n tmp$_4 = withDistances.iterator();\n while (tmp$_4.hasNext()) {\n var element_0 = tmp$_4.next();\n var distance_2 = element_0.component2();\n if (distance_2 === minDistance)\n destination_1.add_11rb$(element_0);\n }\n var destination_2 = ArrayList_init_0(collectionSizeOrDefault(destination_1, 10));\n var tmp$_5;\n tmp$_5 = destination_1.iterator();\n while (tmp$_5.hasNext()) {\n var item_0 = tmp$_5.next();\n var tmp$_6 = destination_2.add_11rb$;\n var lookupResult_0 = item_0.component1();\n tmp$_6.call(destination_2, lookupResult_0);\n }\n var tmp$_7;\n tmp$_7 = destination_2.iterator();\n while (tmp$_7.hasNext()) {\n var element_1 = tmp$_7.next();\n var tmp$_8;\n if (!picked.v.isEmpty() && listOf_0([GeomKind.TEXT, GeomKind.LABEL]).contains_11rb$(element_1.geomKind))\n tmp$_8 = picked.v;\n else {\n if (!picked.v.isEmpty() && LocatedTargetsPicker$Companion_getInstance().stackableResults_0(picked.v.get_za3lpa$(0), element_1))\n tmp$_8 = plus_3(picked.v, element_1);\n else {\n tmp$_8 = listOf(element_1);\n }\n }\n picked.v = tmp$_8;\n }\n var destination_3 = ArrayList_init_0(collectionSizeOrDefault(withDistances, 10));\n var tmp$_9;\n tmp$_9 = withDistances.iterator();\n while (tmp$_9.hasNext()) {\n var item_1 = tmp$_9.next();\n var tmp$_10 = destination_3.add_11rb$;\n var lookupResult_1 = item_1.component1();\n tmp$_10.call(destination_3, lookupResult_1);\n }\n var allConsideredResults = destination_3;\n var $receiver_0 = picked.v;\n var any$result;\n any$break: do {\n var tmp$_11;\n if (Kotlin.isType($receiver_0, Collection) && $receiver_0.isEmpty()) {\n any$result = false;\n break any$break;\n }\n tmp$_11 = $receiver_0.iterator();\n while (tmp$_11.hasNext()) {\n var element_2 = tmp$_11.next();\n if (hasGeneralTooltip(element_2) && hasAxisTooltip(element_2)) {\n any$result = true;\n break any$break;\n }\n }\n any$result = false;\n }\n while (false);\n if (any$result)\n tmp$_1 = picked.v;\n else {\n var none$result;\n none$break: do {\n var tmp$_12;\n if (Kotlin.isType(allConsideredResults, Collection) && allConsideredResults.isEmpty()) {\n none$result = true;\n break none$break;\n }\n tmp$_12 = allConsideredResults.iterator();\n while (tmp$_12.hasNext()) {\n var element_3 = tmp$_12.next();\n if (hasGeneralTooltip(element_3)) {\n none$result = false;\n break none$break;\n }\n }\n none$result = true;\n }\n while (false);\n if (none$result)\n tmp$_1 = picked.v;\n else {\n var any$result_0;\n any$break: do {\n var tmp$_13;\n if (Kotlin.isType(allConsideredResults, Collection) && allConsideredResults.isEmpty()) {\n any$result_0 = false;\n break any$break;\n }\n tmp$_13 = allConsideredResults.iterator();\n while (tmp$_13.hasNext()) {\n var element_4 = tmp$_13.next();\n if (hasGeneralTooltip(element_4) && hasAxisTooltip(element_4)) {\n any$result_0 = true;\n break any$break;\n }\n }\n any$result_0 = false;\n }\n while (false);\n if (any$result_0) {\n var $receiver_1 = sortedWith(withDistances, new Comparator(compareByDescending$lambda(LocatedTargetsPicker$chooseBestResult$lambda)));\n var destination_4 = ArrayList_init_0(collectionSizeOrDefault($receiver_1, 10));\n var tmp$_14;\n tmp$_14 = $receiver_1.iterator();\n while (tmp$_14.hasNext()) {\n var item_2 = tmp$_14.next();\n var tmp$_15 = destination_4.add_11rb$;\n var lookupResult_2 = item_2.component1();\n tmp$_15.call(destination_4, lookupResult_2);\n }\n var last$result;\n last$break: do {\n var iterator_0 = destination_4.listIterator_za3lpa$(destination_4.size);\n while (iterator_0.hasPrevious()) {\n var element_5 = iterator_0.previous();\n if (hasGeneralTooltip(element_5) && hasAxisTooltip(element_5)) {\n last$result = element_5;\n break last$break;\n }\n }\n throw new NoSuchElementException_init_0('List contains no element matching the predicate.');\n }\n while (false);\n tmp$_1 = listOf(last$result);\n } else {\n var $receiver_2 = sortedWith(withDistances, new Comparator(compareByDescending$lambda(LocatedTargetsPicker$chooseBestResult$lambda_0)));\n var destination_5 = ArrayList_init_0(collectionSizeOrDefault($receiver_2, 10));\n var tmp$_16;\n tmp$_16 = $receiver_2.iterator();\n while (tmp$_16.hasNext()) {\n var item_3 = tmp$_16.next();\n var tmp$_17 = destination_5.add_11rb$;\n var lookupResult_3 = item_3.component1();\n tmp$_17.call(destination_5, lookupResult_3);\n }\n var lastOrNull$result;\n lastOrNull$break: do {\n var iterator_1 = destination_5.listIterator_za3lpa$(destination_5.size);\n while (iterator_1.hasPrevious()) {\n var element_6 = iterator_1.previous();\n if (hasGeneralTooltip(element_6)) {\n lastOrNull$result = element_6;\n break lastOrNull$break;\n }\n }\n lastOrNull$result = null;\n }\n while (false);\n var tmp$_18 = lastOrNull$result;\n var lastOrNull$result_0;\n lastOrNull$break: do {\n var iterator_2 = destination_5.listIterator_za3lpa$(destination_5.size);\n while (iterator_2.hasPrevious()) {\n var element_7 = iterator_2.previous();\n if (hasAxisTooltip(element_7)) {\n lastOrNull$result_0 = element_7;\n break lastOrNull$break;\n }\n }\n lastOrNull$result_0 = null;\n }\n while (false);\n tmp$_1 = listOfNotNull([tmp$_18, lastOrNull$result_0]);\n }\n }\n }\n return tmp$_1;\n };\n function LocatedTargetsPicker$Companion() {\n LocatedTargetsPicker$Companion_instance = this;\n this.CUTOFF_DISTANCE_8be2vx$ = 30.0;\n this.FAKE_DISTANCE_8be2vx$ = 15.0;\n this.STACKABLE_GEOMS_0 = setOf([GeomKind.DENSITY, GeomKind.FREQPOLY, GeomKind.BOX_PLOT, GeomKind.HISTOGRAM, GeomKind.LINE, GeomKind.AREA, GeomKind.BAR, GeomKind.ERROR_BAR, GeomKind.CROSS_BAR, GeomKind.LINE_RANGE, GeomKind.POINT_RANGE]);\n }\n LocatedTargetsPicker$Companion.prototype.distance_0 = function (locatedTargetList, coord) {\n var tmp$, tmp$_0;\n var distance = locatedTargetList.distance;\n if (distance === 0.0) {\n if (!locatedTargetList.isCrosshairEnabled || coord == null) {\n tmp$_0 = this.FAKE_DISTANCE_8be2vx$;\n } else {\n var $receiver = locatedTargetList.targets;\n var destination = ArrayList_init();\n var tmp$_1;\n tmp$_1 = $receiver.iterator();\n while (tmp$_1.hasNext()) {\n var element = tmp$_1.next();\n if (element.tipLayoutHint.coord != null)\n destination.add_11rb$(element);\n }\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(destination, 10));\n var tmp$_2;\n tmp$_2 = destination.iterator();\n while (tmp$_2.hasNext()) {\n var item = tmp$_2.next();\n destination_0.add_11rb$(MathUtil_getInstance().distance_l9poh5$(coord, ensureNotNull(item.tipLayoutHint.coord)));\n }\n tmp$_0 = (tmp$ = minOrNull(destination_0)) != null ? tmp$ : this.FAKE_DISTANCE_8be2vx$;\n }\n } else {\n tmp$_0 = distance;\n }\n return tmp$_0;\n };\n LocatedTargetsPicker$Companion.prototype.stackableResults_0 = function (lft, rgt) {\n return lft.geomKind === rgt.geomKind && this.STACKABLE_GEOMS_0.contains_11rb$(rgt.geomKind);\n };\n function LocatedTargetsPicker$Companion$filterResults$xDistanceToCoord(closure$coord, closure$flippedAxis) {\n return function (target) {\n var tmp$, tmp$_0;\n var distance = ensureNotNull(target.tipLayoutHint.coord).subtract_gpjtzr$(closure$coord);\n tmp$ = closure$flippedAxis;\n if (tmp$ === true)\n tmp$_0 = distance.y;\n else if (tmp$ === false)\n tmp$_0 = distance.x;\n else\n tmp$_0 = Kotlin.noWhenBranchMatched();\n return tmp$_0;\n };\n }\n LocatedTargetsPicker$Companion.prototype.filterResults_0 = function (lookupResult, coord, flippedAxis) {\n if (coord == null || !setOf([GeomKind.DENSITY, GeomKind.HISTOGRAM, GeomKind.FREQPOLY, GeomKind.LINE, GeomKind.AREA, GeomKind.SEGMENT]).contains_11rb$(lookupResult.geomKind)) {\n return lookupResult;\n }\n var xDistanceToCoord = LocatedTargetsPicker$Companion$filterResults$xDistanceToCoord(coord, flippedAxis);\n var $receiver = lookupResult.targets;\n var destination = ArrayList_init();\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n if (element.tipLayoutHint.coord != null)\n destination.add_11rb$(element);\n }\n var geomTargets = destination;\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(geomTargets, 10));\n var tmp$_0;\n tmp$_0 = geomTargets.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n destination_0.add_11rb$(xDistanceToCoord(item));\n }\n var minByOrNull$result;\n minByOrNull$break: do {\n var iterator = destination_0.iterator();\n if (!iterator.hasNext()) {\n minByOrNull$result = null;\n break minByOrNull$break;\n }\n var minElem = iterator.next();\n if (!iterator.hasNext()) {\n minByOrNull$result = minElem;\n break minByOrNull$break;\n }\n var p1 = minElem;\n var minValue = JsMath.abs(p1);\n do {\n var e = iterator.next();\n var v = JsMath.abs(e);\n if (Kotlin.compareTo(minValue, v) > 0) {\n minElem = e;\n minValue = v;\n }\n }\n while (iterator.hasNext());\n minByOrNull$result = minElem;\n }\n while (false);\n var minXDistanceToTarget = minByOrNull$result;\n var destination_1 = ArrayList_init();\n var tmp$_1;\n tmp$_1 = geomTargets.iterator();\n while (tmp$_1.hasNext()) {\n var element_0 = tmp$_1.next();\n if (xDistanceToCoord(element_0) === minXDistanceToTarget)\n destination_1.add_11rb$(element_0);\n }\n var selector = getPropertyCallableRef('hitIndex', 1, function ($receiver) {\n return $receiver.hitIndex;\n });\n var tmp$_2;\n var set = HashSet_init_0();\n var list = ArrayList_init();\n tmp$_2 = destination_1.iterator();\n while (tmp$_2.hasNext()) {\n var e_0 = tmp$_2.next();\n var key = selector(e_0);\n if (set.add_11rb$(key))\n list.add_11rb$(e_0);\n }\n var newTargets = list;\n return new GeomTargetLocator$LookupResult(newTargets, lookupResult.distance, lookupResult.geomKind, lookupResult.contextualMapping, lookupResult.isCrosshairEnabled);\n };\n LocatedTargetsPicker$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var LocatedTargetsPicker$Companion_instance = null;\n function LocatedTargetsPicker$Companion_getInstance() {\n if (LocatedTargetsPicker$Companion_instance === null) {\n new LocatedTargetsPicker$Companion();\n }\n return LocatedTargetsPicker$Companion_instance;\n }\n LocatedTargetsPicker.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LocatedTargetsPicker',\n interfaces: []\n };\n function TargetDetector(locatorLookupSpace, locatorLookupStrategy) {\n TargetDetector$Companion_getInstance();\n this.locatorLookupSpace_0 = locatorLookupSpace;\n this.locatorLookupStrategy_0 = locatorLookupStrategy;\n }\n function TargetDetector$checkPath$lambda(it) {\n return it.projection().x();\n }\n function TargetDetector$checkPath$lambda_0(it) {\n return it.projection().x();\n }\n TargetDetector.prototype.checkPath_z3141m$ = function (cursorCoord, pathProjection, closestPointChecker) {\n var tmp$, tmp$_0, tmp$_1;\n if (pathProjection.points.isEmpty()) {\n return null;\n }\n switch (this.locatorLookupSpace_0.name) {\n case 'NONE':\n tmp$_1 = null;\n break;\n case 'X':\n switch (this.locatorLookupStrategy_0.name) {\n case 'NONE':\n tmp$_1 = null;\n break;\n case 'NEAREST':\n tmp$_1 = TargetDetector$Companion_getInstance().searchNearest_0(cursorCoord.x, pathProjection.points, TargetDetector$checkPath$lambda);\n break;\n case 'HOVER':\n if (cursorCoord.x < first(pathProjection.points).projection().x() || cursorCoord.x > last(pathProjection.points).projection().x()) {\n tmp$_1 = null;\n } else {\n tmp$_1 = TargetDetector$Companion_getInstance().searchNearest_0(cursorCoord.x, pathProjection.points, TargetDetector$checkPath$lambda_0);\n }\n\n break;\n default:\n tmp$_1 = Kotlin.noWhenBranchMatched();\n break;\n }\n\n break;\n case 'XY':\n switch (this.locatorLookupStrategy_0.name) {\n case 'NONE':\n return null;\n case 'HOVER':\n tmp$ = pathProjection.points.iterator();\n while (tmp$.hasNext()) {\n var pathPoint = tmp$.next();\n var targetPointCoord = pathPoint.projection().xy();\n if (MathUtil_getInstance().areEqual_f1g2it$(targetPointCoord, cursorCoord, TargetDetector$Companion_getInstance().POINT_AREA_EPSILON_0)) {\n return pathPoint;\n }\n }\n\n return null;\n case 'NEAREST':\n var nearestPoint = null;\n tmp$_0 = pathProjection.points.iterator();\n while (tmp$_0.hasNext()) {\n var pathPoint_0 = tmp$_0.next();\n var targetPointCoord_0 = pathPoint_0.projection().xy();\n if (closestPointChecker.check_gpjtzr$(targetPointCoord_0)) {\n nearestPoint = pathPoint_0;\n }\n }\n\n return nearestPoint;\n default:\n tmp$_1 = Kotlin.noWhenBranchMatched();\n break;\n }\n\n break;\n default:\n tmp$_1 = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$_1;\n };\n TargetDetector.prototype.checkPoint_w0b42b$ = function (cursorCoord, pointProjection, closestPointChecker) {\n var tmp$;\n switch (this.locatorLookupSpace_0.name) {\n case 'NONE':\n tmp$ = false;\n break;\n case 'X':\n switch (this.locatorLookupStrategy_0.name) {\n case 'NONE':\n tmp$ = false;\n break;\n case 'HOVER':\n tmp$ = MathUtil_getInstance().areEqual_hln2n9$(pointProjection.x(), cursorCoord.x, TargetDetector$Companion_getInstance().POINT_AREA_EPSILON_0);\n break;\n case 'NEAREST':\n tmp$ = closestPointChecker.check_gpjtzr$(new DoubleVector(pointProjection.x(), 0.0));\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n\n break;\n case 'XY':\n switch (this.locatorLookupStrategy_0.name) {\n case 'NONE':\n tmp$ = false;\n break;\n case 'HOVER':\n tmp$ = MathUtil_getInstance().areEqual_f1g2it$(pointProjection.xy(), cursorCoord, TargetDetector$Companion_getInstance().POINT_AREA_EPSILON_0);\n break;\n case 'NEAREST':\n tmp$ = closestPointChecker.check_gpjtzr$(pointProjection.xy());\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n TargetDetector.prototype.checkRect_fqo6rd$ = function (cursorCoord, rectProjection, closestPointChecker) {\n var tmp$;\n switch (this.locatorLookupSpace_0.name) {\n case 'NONE':\n tmp$ = false;\n break;\n case 'X':\n tmp$ = this.rangeBasedLookup_0(cursorCoord, closestPointChecker, rectProjection.x());\n break;\n case 'XY':\n var rect = rectProjection.xy();\n switch (this.locatorLookupStrategy_0.name) {\n case 'NONE':\n tmp$ = false;\n break;\n case 'HOVER':\n tmp$ = rect.contains_gpjtzr$(cursorCoord);\n break;\n case 'NEAREST':\n if (rect.contains_gpjtzr$(cursorCoord)) {\n tmp$ = closestPointChecker.check_gpjtzr$(cursorCoord);\n } else {\n var x = cursorCoord.x < rect.left ? rect.left : rect.right;\n var y = cursorCoord.y < rect.top ? rect.top : rect.bottom;\n x = rect.xRange().contains_14dthe$(cursorCoord.x) ? cursorCoord.x : x;\n y = rect.yRange().contains_14dthe$(cursorCoord.y) ? cursorCoord.y : y;\n tmp$ = closestPointChecker.check_gpjtzr$(new DoubleVector(x, y));\n }\n\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n TargetDetector.prototype.checkPolygon_q60eo3$ = function (cursorCoord, polygonProjection, closestPointChecker) {\n var tmp$;\n switch (this.locatorLookupSpace_0.name) {\n case 'NONE':\n tmp$ = false;\n break;\n case 'X':\n tmp$ = this.rangeBasedLookup_0(cursorCoord, closestPointChecker, polygonProjection.x());\n break;\n case 'XY':\n loop_label: switch (this.locatorLookupStrategy_0.name) {\n case 'NONE':\n tmp$ = false;\n break loop_label;\n case 'NEAREST':\n case 'HOVER':\n var $receiver = polygonProjection.xy();\n var count$result;\n count$break: do {\n var tmp$_0;\n if (Kotlin.isType($receiver, Collection) && $receiver.isEmpty()) {\n count$result = 0;\n break count$break;\n }\n var count = 0;\n tmp$_0 = $receiver.iterator();\n while (tmp$_0.hasNext()) {\n var element = tmp$_0.next();\n if (element.contains_gpjtzr$(cursorCoord))\n checkCountOverflow((count = count + 1 | 0, count));\n }\n count$result = count;\n }\n while (false);\n tmp$ = (count$result % 2 | 0) !== 0;\n break loop_label;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break loop_label;\n }\n\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n TargetDetector.prototype.rangeBasedLookup_0 = function (cursorCoord, closestPointChecker, range) {\n var tmp$;\n switch (this.locatorLookupStrategy_0.name) {\n case 'NONE':\n tmp$ = false;\n break;\n case 'HOVER':\n tmp$ = range.contains_14dthe$(cursorCoord.x);\n break;\n case 'NEAREST':\n if (range.contains_14dthe$(cursorCoord.x - TargetDetector$Companion_getInstance().RECT_X_NEAREST_EPSILON_0) || range.contains_14dthe$(cursorCoord.x + TargetDetector$Companion_getInstance().RECT_X_NEAREST_EPSILON_0))\n tmp$ = closestPointChecker.compare_gpjtzr$(new DoubleVector(range.lowerEnd + range.length / 2, cursorCoord.y)) !== MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_FARTHER_getInstance();\n else {\n tmp$ = false;\n }\n\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n function TargetDetector$Companion() {\n TargetDetector$Companion_instance = this;\n this.POINT_AREA_EPSILON_0 = 0.1;\n this.RECT_X_NEAREST_EPSILON_0 = 2.0;\n }\n TargetDetector$Companion.prototype.searchNearest_0 = function (value, items, mapper) {\n var tmp$;\n if (value < mapper(first(items))) {\n return first(items);\n }\n if (value > mapper(last(items))) {\n return last(items);\n }\n var lo = 0;\n var hi = get_lastIndex(items);\n while (lo <= hi) {\n var mid = (hi + lo | 0) / 2 | 0;\n var midValue = mapper(items.get_za3lpa$(mid));\n if (value < midValue)\n hi = mid - 1 | 0;\n else if (value > midValue)\n lo = mid + 1 | 0;\n else\n return items.get_za3lpa$(mid);\n }\n if (mapper(items.get_za3lpa$(lo)) - value < value - mapper(items.get_za3lpa$(hi))) {\n tmp$ = items.get_za3lpa$(lo);\n } else {\n tmp$ = items.get_za3lpa$(hi);\n }\n return tmp$;\n };\n TargetDetector$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var TargetDetector$Companion_instance = null;\n function TargetDetector$Companion_getInstance() {\n if (TargetDetector$Companion_instance === null) {\n new TargetDetector$Companion();\n }\n return TargetDetector$Companion_instance;\n }\n TargetDetector.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TargetDetector',\n interfaces: []\n };\n var compareBy$lambda_0 = wrapFunction(function () {\n var compareValues = Kotlin.kotlin.comparisons.compareValues_s00gnj$;\n return function (closure$selector) {\n return function (a, b) {\n var selector = closure$selector;\n return compareValues(selector(a), selector(b));\n };\n };\n });\n function TargetProjection() {\n }\n TargetProjection.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TargetProjection',\n interfaces: []\n };\n function PointTargetProjection(data) {\n PointTargetProjection$Companion_getInstance();\n TargetProjection.call(this);\n this.data = data;\n }\n PointTargetProjection.prototype.x = function () {\n var tmp$;\n return typeof (tmp$ = this.data) === 'number' ? tmp$ : throwCCE();\n };\n PointTargetProjection.prototype.xy = function () {\n var tmp$;\n return Kotlin.isType(tmp$ = this.data, DoubleVector) ? tmp$ : throwCCE();\n };\n function PointTargetProjection$Companion() {\n PointTargetProjection$Companion_instance = this;\n }\n PointTargetProjection$Companion.prototype.create_p1yge$ = function (p, lookupSpace) {\n var tmp$;\n switch (lookupSpace.name) {\n case 'X':\n tmp$ = new PointTargetProjection(p.x);\n break;\n case 'XY':\n tmp$ = new PointTargetProjection(p);\n break;\n case 'NONE':\n tmp$ = undefinedLookupSpaceError();\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n PointTargetProjection$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var PointTargetProjection$Companion_instance = null;\n function PointTargetProjection$Companion_getInstance() {\n if (PointTargetProjection$Companion_instance === null) {\n new PointTargetProjection$Companion();\n }\n return PointTargetProjection$Companion_instance;\n }\n PointTargetProjection.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PointTargetProjection',\n interfaces: [TargetProjection]\n };\n function RectTargetProjection(data) {\n RectTargetProjection$Companion_getInstance();\n TargetProjection.call(this);\n this.data = data;\n }\n RectTargetProjection.prototype.x = function () {\n var tmp$;\n return Kotlin.isType(tmp$ = this.data, DoubleSpan) ? tmp$ : throwCCE();\n };\n RectTargetProjection.prototype.xy = function () {\n var tmp$;\n return Kotlin.isType(tmp$ = this.data, DoubleRectangle) ? tmp$ : throwCCE();\n };\n function RectTargetProjection$Companion() {\n RectTargetProjection$Companion_instance = this;\n }\n RectTargetProjection$Companion.prototype.create_tb1cvm$ = function (rect, lookupSpace) {\n var tmp$;\n switch (lookupSpace.name) {\n case 'X':\n tmp$ = new RectTargetProjection(new DoubleSpan(rect.left, rect.right));\n break;\n case 'XY':\n tmp$ = new RectTargetProjection(rect);\n break;\n case 'NONE':\n tmp$ = undefinedLookupSpaceError();\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n RectTargetProjection$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var RectTargetProjection$Companion_instance = null;\n function RectTargetProjection$Companion_getInstance() {\n if (RectTargetProjection$Companion_instance === null) {\n new RectTargetProjection$Companion();\n }\n return RectTargetProjection$Companion_instance;\n }\n RectTargetProjection.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'RectTargetProjection',\n interfaces: [TargetProjection]\n };\n function PolygonTargetProjection(data) {\n PolygonTargetProjection$Companion_getInstance();\n TargetProjection.call(this);\n this.data = data;\n }\n PolygonTargetProjection.prototype.x = function () {\n var tmp$;\n return Kotlin.isType(tmp$ = this.data, DoubleSpan) ? tmp$ : throwCCE();\n };\n PolygonTargetProjection.prototype.xy = function () {\n var tmp$;\n return Kotlin.isType(tmp$ = this.data, List) ? tmp$ : throwCCE();\n };\n function PolygonTargetProjection$Companion() {\n PolygonTargetProjection$Companion_instance = this;\n this.POINTS_COUNT_TO_SKIP_SIMPLIFICATION_0 = 20.0;\n this.AREA_TOLERANCE_RATIO_0 = 0.1;\n this.MAX_TOLERANCE_0 = 40.0;\n this.isLogEnabled_0 = false;\n }\n PolygonTargetProjection$Companion.prototype.create_a95qp$ = function (points, lookupSpace) {\n var tmp$;\n var rings = splitRings(points);\n switch (lookupSpace.name) {\n case 'X':\n tmp$ = new PolygonTargetProjection(this.mapToX_0(rings));\n break;\n case 'XY':\n tmp$ = new PolygonTargetProjection(this.mapToXY_0(rings));\n break;\n case 'NONE':\n tmp$ = undefinedLookupSpaceError();\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n PolygonTargetProjection$Companion.prototype.mapToX_0 = function (rings) {\n var tmp$, tmp$_0;\n var min = rings.get_za3lpa$(0).get_za3lpa$(0).x;\n var max = min;\n tmp$ = rings.iterator();\n while (tmp$.hasNext()) {\n var ring = tmp$.next();\n tmp$_0 = ring.iterator();\n while (tmp$_0.hasNext()) {\n var point = tmp$_0.next();\n var a = min;\n var b = point.x;\n min = JsMath.min(a, b);\n var a_0 = max;\n var b_0 = point.x;\n max = JsMath.max(a_0, b_0);\n }\n }\n return new DoubleSpan(min, max);\n };\n PolygonTargetProjection$Companion.prototype.mapToXY_0 = function (rings) {\n var tmp$, tmp$_0;\n var polygon = ArrayList_init();\n tmp$ = rings.iterator();\n while (tmp$.hasNext()) {\n var ring = tmp$.next();\n if (ring.size < 4) {\n continue;\n }\n var tmp$_1;\n if ((tmp$_0 = geometry.DoubleRectangles.boundingBox_qdtdbw$(ring)) != null)\n tmp$_1 = tmp$_0;\n else {\n throw IllegalStateException_init('bbox should be not null - ring is not empty'.toString());\n }\n var bbox = tmp$_1;\n var area = calculateArea(ring);\n var simplifiedRing;\n if (ring.size > this.POINTS_COUNT_TO_SKIP_SIMPLIFICATION_0) {\n var a = area * this.AREA_TOLERANCE_RATIO_0;\n var b = this.MAX_TOLERANCE_0;\n var tolerance = JsMath.min(a, b);\n simplifiedRing = PolylineSimplifier.Companion.visvalingamWhyatt_ytws2g$(ring).setWeightLimit_14dthe$(tolerance).points;\n if (this.isLogEnabled_0) {\n this.log_0('Simp: ' + toString(ring.size) + ' -> ' + toString(simplifiedRing.size) + ', tolerance=' + toString(tolerance) + ', bbox=' + toString(bbox) + ', area=' + toString(area));\n }\n } else {\n if (this.isLogEnabled_0) {\n this.log_0('Keep: size: ' + toString(ring.size) + ', bbox=' + toString(bbox) + ', area=' + toString(area));\n }\n simplifiedRing = ring;\n }\n if (simplifiedRing.size < 4) {\n continue;\n }\n polygon.add_11rb$(new PolygonTargetProjection$RingXY(simplifiedRing, bbox));\n }\n return polygon;\n };\n PolygonTargetProjection$Companion.prototype.log_0 = function (str) {\n println(str);\n };\n PolygonTargetProjection$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var PolygonTargetProjection$Companion_instance = null;\n function PolygonTargetProjection$Companion_getInstance() {\n if (PolygonTargetProjection$Companion_instance === null) {\n new PolygonTargetProjection$Companion();\n }\n return PolygonTargetProjection$Companion_instance;\n }\n function PolygonTargetProjection$RingXY(edges, bbox) {\n this.edges_0 = edges;\n this.bbox_0 = bbox;\n }\n PolygonTargetProjection$RingXY.prototype.contains_gpjtzr$ = function (p) {\n return this.bbox_0.contains_gpjtzr$(p) && MathUtil_getInstance().polygonContainsCoordinate_sz9prc$(this.edges_0, p);\n };\n PolygonTargetProjection$RingXY.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'RingXY',\n interfaces: []\n };\n PolygonTargetProjection.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PolygonTargetProjection',\n interfaces: [TargetProjection]\n };\n function PathTargetProjection(data) {\n PathTargetProjection$Companion_getInstance();\n TargetProjection.call(this);\n this.data = data;\n this.points = this.data;\n }\n function PathTargetProjection$PathPoint(myPointTargetProjection, originalCoord, index) {\n PathTargetProjection$PathPoint$Companion_getInstance();\n this.myPointTargetProjection_0 = myPointTargetProjection;\n this.originalCoord = originalCoord;\n this.index = index;\n }\n PathTargetProjection$PathPoint.prototype.projection = function () {\n return this.myPointTargetProjection_0;\n };\n function PathTargetProjection$PathPoint$Companion() {\n PathTargetProjection$PathPoint$Companion_instance = this;\n }\n PathTargetProjection$PathPoint$Companion.prototype.create_d0y48l$ = function (p, index, lookupSpace) {\n var tmp$;\n switch (lookupSpace.name) {\n case 'X':\n tmp$ = new PathTargetProjection$PathPoint(PointTargetProjection$Companion_getInstance().create_p1yge$(p, lookupSpace), p, index);\n break;\n case 'XY':\n tmp$ = new PathTargetProjection$PathPoint(PointTargetProjection$Companion_getInstance().create_p1yge$(p, lookupSpace), p, index);\n break;\n case 'NONE':\n tmp$ = undefinedLookupSpaceError();\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n PathTargetProjection$PathPoint$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var PathTargetProjection$PathPoint$Companion_instance = null;\n function PathTargetProjection$PathPoint$Companion_getInstance() {\n if (PathTargetProjection$PathPoint$Companion_instance === null) {\n new PathTargetProjection$PathPoint$Companion();\n }\n return PathTargetProjection$PathPoint$Companion_instance;\n }\n PathTargetProjection$PathPoint.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PathPoint',\n interfaces: []\n };\n function PathTargetProjection$Companion() {\n PathTargetProjection$Companion_instance = this;\n }\n function PathTargetProjection$Companion$create$lambda(it) {\n return it.projection().x();\n }\n PathTargetProjection$Companion.prototype.create_zb7j6l$ = function (points, indexMapper, lookupSpace) {\n var pointsLocation = ArrayList_init();\n var i = 0;\n for (var tmp$ = points.iterator(); tmp$.hasNext(); ++i) {\n var point = tmp$.next();\n pointsLocation.add_11rb$(PathTargetProjection$PathPoint$Companion_getInstance().create_d0y48l$(point, indexMapper(i), lookupSpace));\n }\n if (lookupSpace === GeomTargetLocator$LookupSpace.X) {\n if (pointsLocation.size > 1) {\n sortWith(pointsLocation, new Comparator(compareBy$lambda_0(PathTargetProjection$Companion$create$lambda)));\n }\n }\n return new PathTargetProjection(pointsLocation);\n };\n PathTargetProjection$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var PathTargetProjection$Companion_instance = null;\n function PathTargetProjection$Companion_getInstance() {\n if (PathTargetProjection$Companion_instance === null) {\n new PathTargetProjection$Companion();\n }\n return PathTargetProjection$Companion_instance;\n }\n PathTargetProjection.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PathTargetProjection',\n interfaces: [TargetProjection]\n };\n function undefinedLookupSpaceError() {\n throw IllegalStateException_init('Undefined geom lookup space');\n }\n function TargetPrototype(hitShape, indexMapper, tooltipParams, tooltipKind) {\n TargetPrototype$Companion_getInstance();\n this.hitShape_8be2vx$ = hitShape;\n this.indexMapper_8be2vx$ = indexMapper;\n this.tooltipParams_0 = tooltipParams;\n this.tooltipKind_8be2vx$ = tooltipKind;\n }\n TargetPrototype.prototype.createGeomTarget_x7nr8i$ = function (hitCoord, hitIndex) {\n return new GeomTarget(hitIndex, TargetPrototype$Companion_getInstance().createTipLayoutHint_po16gq$(hitCoord, this.hitShape_8be2vx$, this.tooltipKind_8be2vx$, this.tooltipParams_0.stemLength, this.tooltipParams_0.fillColor, this.tooltipParams_0.markerColors), this.tooltipParams_0.tipLayoutHints);\n };\n function TargetPrototype$Companion() {\n TargetPrototype$Companion_instance = this;\n }\n TargetPrototype$Companion.prototype.createTipLayoutHint_po16gq$ = function (hitCoord, hitShape, tooltipKind, stemLength, fillColor, markerColors) {\n var tmp$;\n switch (hitShape.kind.name) {\n case 'POINT':\n switch (tooltipKind.name) {\n case 'VERTICAL_TOOLTIP':\n tmp$ = TipLayoutHint.Companion.verticalTooltip_eox10j$(hitCoord, hitShape.point.radius, stemLength, fillColor, markerColors);\n break;\n case 'CURSOR_TOOLTIP':\n tmp$ = TipLayoutHint.Companion.cursorTooltip_un7elx$(hitCoord, stemLength, fillColor, markerColors);\n break;\n default:\n throw IllegalStateException_init(('Wrong TipLayoutHint.kind = ' + tooltipKind + ' for POINT').toString());\n }\n\n break;\n case 'RECT':\n switch (tooltipKind.name) {\n case 'VERTICAL_TOOLTIP':\n tmp$ = TipLayoutHint.Companion.verticalTooltip_eox10j$(hitCoord, hitShape.rect.width / 2, stemLength, fillColor, markerColors);\n break;\n case 'HORIZONTAL_TOOLTIP':\n tmp$ = TipLayoutHint.Companion.horizontalTooltip_eox10j$(hitCoord, hitShape.rect.width / 2, stemLength, fillColor, markerColors);\n break;\n case 'CURSOR_TOOLTIP':\n tmp$ = TipLayoutHint.Companion.cursorTooltip_un7elx$(hitCoord, stemLength, fillColor, markerColors);\n break;\n case 'ROTATED_TOOLTIP':\n tmp$ = TipLayoutHint.Companion.rotatedTooltip_6lq1u6$(hitCoord, 0.0, null, stemLength);\n break;\n default:\n throw IllegalStateException_init(('Wrong TipLayoutHint.kind = ' + tooltipKind + ' for RECT').toString());\n }\n\n break;\n case 'PATH':\n switch (tooltipKind.name) {\n case 'HORIZONTAL_TOOLTIP':\n tmp$ = TipLayoutHint.Companion.horizontalTooltip_eox10j$(hitCoord, 0.0, stemLength, fillColor, markerColors);\n break;\n case 'VERTICAL_TOOLTIP':\n tmp$ = TipLayoutHint.Companion.verticalTooltip_eox10j$(hitCoord, 0.0, stemLength, fillColor, markerColors);\n break;\n default:\n throw IllegalStateException_init(('Wrong TipLayoutHint.kind = ' + tooltipKind + ' for PATH').toString());\n }\n\n break;\n case 'POLYGON':\n if (equals(tooltipKind, TipLayoutHint$Kind.CURSOR_TOOLTIP))\n tmp$ = TipLayoutHint.Companion.cursorTooltip_un7elx$(hitCoord, stemLength, fillColor, markerColors);\n else {\n throw IllegalStateException_init(('Wrong TipLayoutHint.kind = ' + tooltipKind + ' for POLYGON').toString());\n }\n\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n TargetPrototype$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var TargetPrototype$Companion_instance = null;\n function TargetPrototype$Companion_getInstance() {\n if (TargetPrototype$Companion_instance === null) {\n new TargetPrototype$Companion();\n }\n return TargetPrototype$Companion_instance;\n }\n TargetPrototype.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TargetPrototype',\n interfaces: []\n };\n function TransformedTargetLocator(targetLocator) {\n this.targetLocator_q7bze5$_0 = targetLocator;\n }\n TransformedTargetLocator.prototype.search_gpjtzr$ = function (coord) {\n var tmp$;\n var targetCoord = this.convertToTargetCoord_gpjtzr$(coord);\n tmp$ = this.targetLocator_q7bze5$_0.search_gpjtzr$(targetCoord);\n if (tmp$ == null) {\n return null;\n }\n var result = tmp$;\n return this.convertLookupResult_rz45e2$_0(result);\n };\n TransformedTargetLocator.prototype.convertLookupResult_rz45e2$_0 = function (lookupResult) {\n return new GeomTargetLocator$LookupResult(this.convertGeomTargets_cu5hhh$_0(lookupResult.targets), this.convertToPlotDistance_14dthe$(lookupResult.distance), lookupResult.geomKind, lookupResult.contextualMapping, lookupResult.contextualMapping.isCrosshairEnabled);\n };\n TransformedTargetLocator.prototype.convertGeomTargets_cu5hhh$_0 = function (geomTargets) {\n var destination = ArrayList_init_0(collectionSizeOrDefault(geomTargets, 10));\n var tmp$;\n tmp$ = geomTargets.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n destination.add_11rb$(new GeomTarget(item.hitIndex, this.convertTipLayoutHint_jnrdzl$_0(item.tipLayoutHint), this.convertTipLayoutHints_dshtp8$_0(item.aesTipLayoutHints)));\n }\n return destination;\n };\n TransformedTargetLocator.prototype.convertTipLayoutHint_jnrdzl$_0 = function (hint) {\n return new TipLayoutHint(hint.kind, ensureNotNull(this.safeConvertToPlotCoord_eoxeor$_0(hint.coord)), this.convertToPlotDistance_14dthe$(hint.objectRadius), hint.stemLength, hint.fillColor, hint.markerColors);\n };\n TransformedTargetLocator.prototype.convertTipLayoutHints_dshtp8$_0 = function (tipLayoutHints) {\n var result = HashMap_init();\n var tmp$;\n tmp$ = tipLayoutHints.entries.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n var aes = element.key;\n var hint = element.value;\n var value = this.convertTipLayoutHint_jnrdzl$_0(hint);\n result.put_xwzc9p$(aes, value);\n }\n return result;\n };\n TransformedTargetLocator.prototype.safeConvertToPlotCoord_eoxeor$_0 = function (coord) {\n return coord == null ? null : this.convertToPlotCoord_gpjtzr$(coord);\n };\n TransformedTargetLocator.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TransformedTargetLocator',\n interfaces: [GeomTargetLocator]\n };\n function YOrientationTargetCollector(targetCollector) {\n YOrientationTargetCollector$Companion_getInstance();\n this.targetCollector_0 = targetCollector;\n }\n YOrientationTargetCollector.prototype.addPoint_cnsimy$$default = function (index, point, radius, tooltipParams, tooltipKind) {\n this.targetCollector_0.addPoint_cnsimy$(index, point, radius, YOrientationTargetCollector$Companion_getInstance().afterYOrientation_0(tooltipParams), tooltipKind);\n };\n YOrientationTargetCollector.prototype.addRectangle_bxzvr8$$default = function (index, rectangle, tooltipParams, tooltipKind) {\n this.targetCollector_0.addRectangle_bxzvr8$(index, rectangle, YOrientationTargetCollector$Companion_getInstance().afterYOrientation_0(tooltipParams), tooltipKind);\n };\n YOrientationTargetCollector.prototype.addPath_sa5m83$$default = function (points, localToGlobalIndex, tooltipParams, tooltipKind) {\n this.targetCollector_0.addPath_sa5m83$(points, localToGlobalIndex, YOrientationTargetCollector$Companion_getInstance().afterYOrientation_0(tooltipParams), tooltipKind);\n };\n YOrientationTargetCollector.prototype.addPolygon_sa5m83$$default = function (points, localToGlobalIndex, tooltipParams, tooltipKind) {\n this.targetCollector_0.addPolygon_sa5m83$(points, localToGlobalIndex, YOrientationTargetCollector$Companion_getInstance().afterYOrientation_0(tooltipParams), tooltipKind);\n };\n YOrientationTargetCollector.prototype.withFlippedAxis = function () {\n if (!!Kotlin.isType(this.targetCollector_0, FlippedTargetCollector)) {\n var message = \"'withFlippedAxis()' is not applicable to FlippedTargetCollector\";\n throw IllegalStateException_init(message.toString());\n }\n return new FlippedTargetCollector(this);\n };\n YOrientationTargetCollector.prototype.withYOrientation = function () {\n throw IllegalStateException_init(\"'withYOrientation()' is not applicable to YOrientationTargetCollector\");\n };\n function YOrientationTargetCollector$Companion() {\n YOrientationTargetCollector$Companion_instance = this;\n }\n YOrientationTargetCollector$Companion.prototype.afterYOrientation_0 = function (tooltipParams) {\n return new GeomTargetCollector$TooltipParams(util.YOrientationBaseUtil.flipAesKeys_fzsz32$(tooltipParams.tipLayoutHints), tooltipParams.stemLength, tooltipParams.fillColor, tooltipParams.markerColors);\n };\n YOrientationTargetCollector$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var YOrientationTargetCollector$Companion_instance = null;\n function YOrientationTargetCollector$Companion_getInstance() {\n if (YOrientationTargetCollector$Companion_instance === null) {\n new YOrientationTargetCollector$Companion();\n }\n return YOrientationTargetCollector$Companion_instance;\n }\n YOrientationTargetCollector.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'YOrientationTargetCollector',\n interfaces: [GeomTargetCollector]\n };\n function ToolFeedback() {\n }\n ToolFeedback.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'ToolFeedback',\n interfaces: []\n };\n function AxisLayout() {\n }\n AxisLayout.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'AxisLayout',\n interfaces: []\n };\n function AxisLayoutInfo(axisLength, axisDomain, orientation, axisBreaks, tickLabelsBounds, tickLabelRotationAngle, tickLabelHorizontalAnchor, tickLabelVerticalAnchor, tickLabelAdditionalOffsets, tickLabelsBoundsMax, tickLabelsTextBounds) {\n if (tickLabelHorizontalAnchor === void 0)\n tickLabelHorizontalAnchor = null;\n if (tickLabelVerticalAnchor === void 0)\n tickLabelVerticalAnchor = null;\n if (tickLabelAdditionalOffsets === void 0)\n tickLabelAdditionalOffsets = null;\n if (tickLabelsBoundsMax === void 0)\n tickLabelsBoundsMax = null;\n if (tickLabelsTextBounds === void 0)\n tickLabelsTextBounds = null;\n this.axisLength = axisLength;\n this.axisDomain = axisDomain;\n this.orientation = orientation;\n this.axisBreaks = axisBreaks;\n this.tickLabelsBounds = tickLabelsBounds;\n this.tickLabelRotationAngle = tickLabelRotationAngle;\n this.tickLabelHorizontalAnchor = tickLabelHorizontalAnchor;\n this.tickLabelVerticalAnchor = tickLabelVerticalAnchor;\n this.tickLabelAdditionalOffsets = tickLabelAdditionalOffsets;\n this.tickLabelsBoundsMax_0 = tickLabelsBoundsMax;\n this.tickLabelsTextBounds_8be2vx$ = tickLabelsTextBounds;\n }\n AxisLayoutInfo.prototype.withAxisLength_14dthe$ = function (axisLength) {\n return new AxisLayoutInfo(axisLength, this.axisDomain, this.orientation, this.axisBreaks, this.tickLabelsBounds, this.tickLabelRotationAngle, this.tickLabelHorizontalAnchor, this.tickLabelVerticalAnchor, this.tickLabelAdditionalOffsets, this.tickLabelsBoundsMax_0, this.tickLabelsTextBounds_8be2vx$);\n };\n AxisLayoutInfo.prototype.axisBounds = function () {\n return this.tickLabelsBounds.union_wthzt5$(DoubleRectangle_init(0.0, 0.0, 0.0, 0.0));\n };\n AxisLayoutInfo.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'AxisLayoutInfo',\n interfaces: []\n };\n function FacetedPlotLayout(facets, layoutProviderByTile, showFacetStrip, hAxisTheme, vAxisTheme) {\n FacetedPlotLayout$Companion_getInstance();\n PlotLayoutBase.call(this);\n this.facets_0 = facets;\n this.layoutProviderByTile_0 = layoutProviderByTile;\n this.showFacetStrip_0 = showFacetStrip;\n this.hAxisTheme_0 = hAxisTheme;\n this.vAxisTheme_0 = vAxisTheme;\n this.totalAddedHSize_0 = FacetedPlotLayout$Companion_getInstance().PANEL_PADDING_0 * (this.facets_0.colCount - 1 | 0);\n this.totalAddedVSize_0 = FacetedPlotLayout$Companion_getInstance().PANEL_PADDING_0 * (this.facets_0.rowCount - 1 | 0);\n var padding = 10.0;\n var leftPadding = !this.vAxisTheme_0.showTitle() && !this.vAxisTheme_0.showLabels() ? padding : 0.0;\n var bottomPadding = !this.hAxisTheme_0.showTitle() && !this.hAxisTheme_0.showLabels() ? padding : 0.0;\n this.setPadding_6y0v78$(padding, padding, bottomPadding, leftPadding);\n if (!this.facets_0.isDefined) {\n var message = 'Undefined facets.';\n throw IllegalArgumentException_init(message.toString());\n }\n }\n FacetedPlotLayout.prototype.doLayout_3twog0$ = function (preferredSize, coordProvider) {\n var tmp$, tmp$_0, tmp$_1, tmp$_2;\n var tilesAreaSize = new DoubleVector(preferredSize.x - (this.paddingLeft_0 + this.paddingRight_0), preferredSize.y - (this.paddingTop_0 + this.paddingBottom_0));\n var facetTiles = this.facets_0.tileInfos();\n if (this.showFacetStrip_0) {\n var firstOrNull$result;\n firstOrNull$break: do {\n var tmp$_3;\n tmp$_3 = facetTiles.iterator();\n while (tmp$_3.hasNext()) {\n var element = tmp$_3.next();\n if (!element.colLabs.isEmpty()) {\n firstOrNull$result = element;\n break firstOrNull$break;\n }\n }\n firstOrNull$result = null;\n }\n while (false);\n var tileColLabCounts = (tmp$_1 = (tmp$_0 = (tmp$ = firstOrNull$result) != null ? tmp$.colLabs : null) != null ? tmp$_0.size : null) != null ? tmp$_1 : 0;\n var destination = ArrayList_init();\n var tmp$_4;\n tmp$_4 = facetTiles.iterator();\n while (tmp$_4.hasNext()) {\n var element_0 = tmp$_4.next();\n if (!element_0.colLabs.isEmpty())\n destination.add_11rb$(element_0);\n }\n var tmp$_5;\n var set = HashSet_init_0();\n var list = ArrayList_init();\n tmp$_5 = destination.iterator();\n while (tmp$_5.hasNext()) {\n var e = tmp$_5.next();\n var key = e.row;\n if (set.add_11rb$(key))\n list.add_11rb$(e);\n }\n var tileWithColLabInRowCount = list.size;\n var totalAddedHeight = FacetedPlotLayout$Companion_getInstance().facetColHeadHeight_za3lpa$(tileColLabCounts) * tileWithColLabInRowCount;\n var any$result;\n any$break: do {\n var tmp$_6;\n if (Kotlin.isType(facetTiles, Collection) && facetTiles.isEmpty()) {\n any$result = false;\n break any$break;\n }\n tmp$_6 = facetTiles.iterator();\n while (tmp$_6.hasNext()) {\n var element_1 = tmp$_6.next();\n if (element_1.rowLab != null) {\n any$result = true;\n break any$break;\n }\n }\n any$result = false;\n }\n while (false);\n var labsInRow = any$result ? 1 : 0;\n var labsTotalDim = new DoubleVector(labsInRow * FacetedPlotLayout$Companion_getInstance().FACET_TAB_HEIGHT, totalAddedHeight);\n tilesAreaSize = tilesAreaSize.subtract_gpjtzr$(labsTotalDim);\n }\n if (this.facets_0.freeHScale || this.facets_0.freeVScale) {\n tmp$_2 = FreeScalesTilesLayouter_getInstance().createTileLayoutInfos_m2eqzh$(tilesAreaSize, this.facets_0, this.layoutProviderByTile_0, this.totalAddedHSize_0, this.totalAddedVSize_0, coordProvider, this.hAxisTheme_0, this.vAxisTheme_0);\n } else {\n tmp$_2 = FixedScalesTilesLayouter_getInstance().createTileLayoutInfos_m2eqzh$(tilesAreaSize, this.facets_0, this.layoutProviderByTile_0, this.totalAddedHSize_0, this.totalAddedVSize_0, coordProvider, this.hAxisTheme_0, this.vAxisTheme_0);\n }\n var layoutInfos = tmp$_2;\n var geomOffsetByCol = FacetedPlotLayoutUtil_getInstance().geomOffsetsByCol_53l30a$(layoutInfos, facetTiles, FacetedPlotLayout$Companion_getInstance().PANEL_PADDING_0, this.facets_0.colCount);\n var geomOffsetByRow = FacetedPlotLayoutUtil_getInstance().geomOffsetsByRow_igosif$(layoutInfos, facetTiles, this.showFacetStrip_0, FacetedPlotLayout$Companion_getInstance().PANEL_PADDING_0, this.facets_0.rowCount);\n var tileBoundsList = ArrayList_init();\n var geomOuterBoundsList = ArrayList_init();\n var index = 0;\n for (var tmp$_7 = facetTiles.iterator(); tmp$_7.hasNext(); ++index) {\n var facetTile = tmp$_7.next();\n var tmp$_8, tmp$_9, tmp$_10, tmp$_11;\n var layoutInfo = layoutInfos.get_za3lpa$(index);\n var col = facetTile.col;\n var row = facetTile.row;\n var geomX = geomOffsetByCol.get_za3lpa$(col);\n var geomY = geomOffsetByRow.get_za3lpa$(row);\n var outerGeomSize = layoutInfo.geomOuterBounds.dimension;\n if (facetTile.rowLab != null && this.showFacetStrip_0) {\n tmp$_8 = FacetedPlotLayout$Companion_getInstance().FACET_TAB_HEIGHT;\n } else {\n tmp$_8 = 0.0;\n }\n var tileLabelWidth = tmp$_8;\n if (facetTile.hasVAxis) {\n tmp$_9 = layoutInfo.axisThicknessY();\n } else {\n tmp$_9 = 0.0;\n }\n var axisWidth = tmp$_9;\n var tileX = geomX - axisWidth;\n var tileWidth = outerGeomSize.x + axisWidth + tileLabelWidth;\n if (this.showFacetStrip_0) {\n tmp$_10 = FacetedPlotLayout$Companion_getInstance().facetColHeadHeight_za3lpa$(facetTile.colLabs.size);\n } else {\n tmp$_10 = 0.0;\n }\n var tileLabelHeight = tmp$_10;\n if (facetTile.hasHAxis) {\n tmp$_11 = layoutInfo.axisThicknessX();\n } else {\n tmp$_11 = 0.0;\n }\n var axisHeight = tmp$_11;\n var tileY = geomY - tileLabelHeight;\n var tileHeight = outerGeomSize.y + tileLabelHeight + axisHeight;\n var tileBounds = new DoubleRectangle(new DoubleVector(tileX, tileY), new DoubleVector(tileWidth, tileHeight));\n var geomOuterBounds = new DoubleRectangle(new DoubleVector(geomX, geomY), outerGeomSize);\n tileBoundsList.add_11rb$(tileBounds);\n geomOuterBoundsList.add_11rb$(geomOuterBounds);\n }\n var iterator = tileBoundsList.iterator();\n if (!iterator.hasNext())\n throw UnsupportedOperationException_init(\"Empty collection can't be reduced.\");\n var accumulator = iterator.next();\n while (iterator.hasNext()) {\n accumulator = accumulator.union_wthzt5$(iterator.next());\n }\n var tilesAreaOrigin = accumulator.origin;\n var originDelta = tilesAreaOrigin.negate();\n var tilesPaddingLeftTop = new DoubleVector(this.paddingLeft_0, this.paddingTop_0);\n var finalLayoutInfos = ArrayList_init();\n var index_0 = 0;\n for (var tmp$_12 = facetTiles.iterator(); tmp$_12.hasNext(); ++index_0) {\n var facetTile_0 = tmp$_12.next();\n var tmp$_13;\n var layoutInfo_0 = layoutInfos.get_za3lpa$(index_0);\n var geomInnerBoundsOffset = layoutInfo_0.geomInnerBounds.origin.subtract_gpjtzr$(layoutInfo_0.geomOuterBounds.origin);\n var tileBounds_0 = tileBoundsList.get_za3lpa$(index_0);\n var geomOuterBounds_0 = geomOuterBoundsList.get_za3lpa$(index_0);\n var geomInnerBounds = new DoubleRectangle(geomOuterBounds_0.origin.add_gpjtzr$(geomInnerBoundsOffset), layoutInfo_0.geomInnerBounds.dimension);\n var newLayoutInfo = new TileLayoutInfo(tilesPaddingLeftTop, tileBounds_0.add_gpjtzr$(originDelta), geomOuterBounds_0.add_gpjtzr$(originDelta), geomInnerBounds.add_gpjtzr$(originDelta), layoutInfo_0.hAxisInfo, layoutInfo_0.vAxisInfo, facetTile_0.hasHAxis, facetTile_0.hasVAxis, void 0, void 0, facetTile_0.trueIndex);\n if (this.showFacetStrip_0) {\n tmp$_13 = newLayoutInfo.withFacetLabels_5hkr16$(facetTile_0.colLabs, facetTile_0.rowLab);\n } else {\n tmp$_13 = newLayoutInfo;\n }\n finalLayoutInfos.add_11rb$(tmp$_13);\n }\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(finalLayoutInfos, 10));\n var tmp$_14;\n tmp$_14 = finalLayoutInfos.iterator();\n while (tmp$_14.hasNext()) {\n var item = tmp$_14.next();\n destination_0.add_11rb$(item.bounds);\n }\n var iterator_0 = destination_0.iterator();\n if (!iterator_0.hasNext())\n throw UnsupportedOperationException_init(\"Empty collection can't be reduced.\");\n var accumulator_0 = iterator_0.next();\n while (iterator_0.hasNext()) {\n accumulator_0 = accumulator_0.union_wthzt5$(iterator_0.next());\n }\n var combinedTilesSize = accumulator_0.dimension;\n var plotSize = combinedTilesSize.add_gpjtzr$(tilesPaddingLeftTop).add_gpjtzr$(new DoubleVector(this.paddingRight_0, this.paddingBottom_0));\n return new PlotLayoutInfo(finalLayoutInfos, plotSize);\n };\n function FacetedPlotLayout$Companion() {\n FacetedPlotLayout$Companion_instance = this;\n this.FACET_TAB_HEIGHT = 30.0;\n this.FACET_H_PADDING = 0;\n this.FACET_V_PADDING = 6;\n this.PANEL_PADDING_0 = 10.0;\n }\n FacetedPlotLayout$Companion.prototype.facetColLabelSize_14dthe$ = function (colWidth) {\n return new DoubleVector(colWidth - 0, this.FACET_TAB_HEIGHT - 6 * 2.0);\n };\n FacetedPlotLayout$Companion.prototype.facetColHeadHeight_za3lpa$ = function (labCount) {\n var tmp$;\n if (labCount > 0) {\n tmp$ = this.facetColLabelSize_14dthe$(0.0).y * labCount + 12;\n } else {\n tmp$ = 0.0;\n }\n return tmp$;\n };\n FacetedPlotLayout$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var FacetedPlotLayout$Companion_instance = null;\n function FacetedPlotLayout$Companion_getInstance() {\n if (FacetedPlotLayout$Companion_instance === null) {\n new FacetedPlotLayout$Companion();\n }\n return FacetedPlotLayout$Companion_instance;\n }\n FacetedPlotLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'FacetedPlotLayout',\n interfaces: [PlotLayoutBase]\n };\n function FacetedPlotLayoutUtil() {\n FacetedPlotLayoutUtil_instance = this;\n }\n FacetedPlotLayoutUtil.prototype.countVAxisInFirstRow_75mdod$ = function (facetTiles) {\n var destination = ArrayList_init();\n var tmp$;\n tmp$ = facetTiles.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n if (element.row === 0)\n destination.add_11rb$(element);\n }\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(destination, 10));\n var tmp$_0;\n tmp$_0 = destination.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n destination_0.add_11rb$(item.hasVAxis ? 1 : 0);\n }\n return sum(destination_0);\n };\n FacetedPlotLayoutUtil.prototype.countHAxisInFirstCol_75mdod$ = function (facetTiles) {\n var destination = ArrayList_init();\n var tmp$;\n tmp$ = facetTiles.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n if (element.col === 0)\n destination.add_11rb$(element);\n }\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(destination, 10));\n var tmp$_0;\n tmp$_0 = destination.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n destination_0.add_11rb$(item.hasHAxis ? 1 : 0);\n }\n return sum(destination_0);\n };\n FacetedPlotLayoutUtil.prototype.tilesAreaSize_xxmnvs$ = function (layoutInfos, facets, addedHSize, addedVSize) {\n var tmp$, tmp$_0;\n var facetTiles = facets.tileInfos();\n var tmp$_1;\n var sum = 0;\n tmp$_1 = until(0, facets.colCount).iterator();\n while (tmp$_1.hasNext()) {\n var element = tmp$_1.next();\n sum += this.maxVAxisThickness_0(layoutInfos, facetTiles, element);\n }\n var addedVAxisWidth = sum;\n var tmp$_2;\n var sum_0 = 0;\n tmp$_2 = until(0, facets.rowCount).iterator();\n while (tmp$_2.hasNext()) {\n var element_0 = tmp$_2.next();\n sum_0 += this.maxHAxisThickness_0(layoutInfos, facetTiles, element_0, facets.rowCount);\n }\n var addedHAxisHeight = sum_0;\n var $receiver = until(0, facets.rowCount);\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$_3;\n tmp$_3 = $receiver.iterator();\n while (tmp$_3.hasNext()) {\n var item = tmp$_3.next();\n var tmp$_4 = destination.add_11rb$;\n var tmp$_5;\n var sum_1 = 0;\n tmp$_5 = this.rowIndices_0(facetTiles, item).iterator();\n while (tmp$_5.hasNext()) {\n var element_1 = tmp$_5.next();\n sum_1 += layoutInfos.get_za3lpa$(element_1).geomOuterWidth();\n }\n tmp$_4.call(destination, sum_1);\n }\n var maxRowWidthGeomOnly = (tmp$ = maxOrNull_0(destination)) != null ? tmp$ : 0.0;\n var $receiver_0 = until(0, facets.colCount);\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault($receiver_0, 10));\n var tmp$_6;\n tmp$_6 = $receiver_0.iterator();\n while (tmp$_6.hasNext()) {\n var item_0 = tmp$_6.next();\n var tmp$_7 = destination_0.add_11rb$;\n var tmp$_8;\n var sum_2 = 0;\n tmp$_8 = this.colIndices_0(facetTiles, item_0).iterator();\n while (tmp$_8.hasNext()) {\n var element_2 = tmp$_8.next();\n sum_2 += layoutInfos.get_za3lpa$(element_2).geomOuterHeight();\n }\n tmp$_7.call(destination_0, sum_2);\n }\n var maxColHeightGeomOnly = (tmp$_0 = maxOrNull_0(destination_0)) != null ? tmp$_0 : 0.0;\n var w = addedVAxisWidth + maxRowWidthGeomOnly + addedHSize;\n var h = addedHAxisHeight + maxColHeightGeomOnly + addedVSize;\n return new DoubleVector(w, h);\n };\n FacetedPlotLayoutUtil.prototype.maxVAxisThickness_0 = function (layoutInfos, facetTiles, col) {\n var $receiver = this.colIndices_0(facetTiles, col);\n var maxOfOrNull$result;\n maxOfOrNull$break: do {\n var iterator = $receiver.iterator();\n if (!iterator.hasNext()) {\n maxOfOrNull$result = null;\n break maxOfOrNull$break;\n }\n var it = layoutInfos.get_za3lpa$(iterator.next());\n var block$result;\n if (it.vAxisShown) {\n block$result = it.axisThicknessY();\n } else {\n block$result = 0.0;\n }\n var maxValue = block$result;\n while (iterator.hasNext()) {\n var it_0 = layoutInfos.get_za3lpa$(iterator.next());\n var block$result_0;\n if (it_0.vAxisShown) {\n block$result_0 = it_0.axisThicknessY();\n } else {\n block$result_0 = 0.0;\n }\n var v = block$result_0;\n maxValue = JsMath.max(maxValue, v);\n }\n maxOfOrNull$result = maxValue;\n }\n while (false);\n var maxThickness = maxOfOrNull$result;\n return maxThickness != null ? maxThickness : 0.0;\n };\n FacetedPlotLayoutUtil.prototype.maxHAxisThickness_0 = function (layoutInfos, facetTiles, row, numRows) {\n var $receiver = this.rowIndices_0(facetTiles, row);\n var maxOfOrNull$result;\n maxOfOrNull$break: do {\n var iterator = $receiver.iterator();\n if (!iterator.hasNext()) {\n maxOfOrNull$result = null;\n break maxOfOrNull$break;\n }\n var ind = iterator.next();\n var selector$result;\n if (facetTiles.get_za3lpa$(ind).isBottom && row < (numRows - 1 | 0)) {\n selector$result = 0.0;\n } else {\n var it = layoutInfos.get_za3lpa$(ind);\n var block$result;\n if (it.hAxisShown) {\n block$result = it.axisThicknessX();\n } else {\n block$result = 0.0;\n }\n selector$result = block$result;\n }\n var maxValue = selector$result;\n while (iterator.hasNext()) {\n var ind_0 = iterator.next();\n var selector$result_0;\n if (facetTiles.get_za3lpa$(ind_0).isBottom && row < (numRows - 1 | 0)) {\n selector$result_0 = 0.0;\n } else {\n var it_0 = layoutInfos.get_za3lpa$(ind_0);\n var block$result_0;\n if (it_0.hAxisShown) {\n block$result_0 = it_0.axisThicknessX();\n } else {\n block$result_0 = 0.0;\n }\n selector$result_0 = block$result_0;\n }\n var v = selector$result_0;\n maxValue = JsMath.max(maxValue, v);\n }\n maxOfOrNull$result = maxValue;\n }\n while (false);\n var maxThickness = maxOfOrNull$result;\n return maxThickness != null ? maxThickness : 0.0;\n };\n FacetedPlotLayoutUtil.prototype.colIndices_0 = function (facetTiles, col) {\n var $receiver = withIndex(facetTiles);\n var destination = ArrayList_init();\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n var tile = element.component2();\n if (tile.col === col)\n destination.add_11rb$(element);\n }\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(destination, 10));\n var tmp$_0;\n tmp$_0 = destination.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n var tmp$_1 = destination_0.add_11rb$;\n var index = item.component1();\n tmp$_1.call(destination_0, index);\n }\n return destination_0;\n };\n FacetedPlotLayoutUtil.prototype.rowIndices_0 = function (facetTiles, row) {\n var $receiver = withIndex(facetTiles);\n var destination = ArrayList_init();\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n var tile = element.component2();\n if (tile.row === row)\n destination.add_11rb$(element);\n }\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(destination, 10));\n var tmp$_0;\n tmp$_0 = destination.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n var tmp$_1 = destination_0.add_11rb$;\n var index = item.component1();\n tmp$_1.call(destination_0, index);\n }\n return destination_0;\n };\n FacetedPlotLayoutUtil.prototype.geomOffsetsByCol_53l30a$ = function (layoutInfos, facetTiles, colSpace, numCols) {\n var list = ArrayList_init_0(numCols);\n for (var index = 0; index < numCols; index++) {\n list.add_11rb$(this.maxVAxisThickness_0(layoutInfos, facetTiles, index));\n }\n var axisWidths = list;\n var list_0 = ArrayList_init_0(numCols);\n for (var index_0 = 0; index_0 < numCols; index_0++) {\n list_0.add_11rb$(index_0 === 0 ? 0.0 : colSpace);\n }\n var spacesBefore = list_0;\n var baseOffset = 0.0;\n var offsets = ArrayList_init();\n for (var i = 0; i < numCols; i++) {\n var currOffset = baseOffset + spacesBefore.get_za3lpa$(i) + axisWidths.get_za3lpa$(i);\n offsets.add_11rb$(currOffset);\n baseOffset = currOffset + layoutInfos.get_za3lpa$(i).geomOuterWidth();\n }\n return offsets;\n };\n FacetedPlotLayoutUtil.prototype.geomOffsetsByRow_igosif$ = function (layoutInfos, facetTiles, showFacetStrip, rowSpace, numRows) {\n var list = ArrayList_init_0(numRows);\n for (var index = 0; index < numRows; index++) {\n list.add_11rb$(this.maxHAxisThickness_0(layoutInfos, facetTiles, index, numRows));\n }\n var axisHeights = list;\n var list_0 = ArrayList_init_0(numRows);\n for (var index_0 = 0; index_0 < numRows; index_0++) {\n list_0.add_11rb$(index_0 === 0 ? 0.0 : rowSpace);\n }\n var spacesBefore = list_0;\n var $receiver = this.colIndices_0(facetTiles, 0);\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n var tmp$_0 = destination.add_11rb$;\n var transform$result;\n if (item === 0) {\n transform$result = 0.0;\n } else if (showFacetStrip) {\n transform$result = FacetedPlotLayout$Companion_getInstance().facetColHeadHeight_za3lpa$(facetTiles.get_za3lpa$(item).colLabs.size);\n } else {\n transform$result = 0.0;\n }\n tmp$_0.call(destination, transform$result);\n }\n var tileLabelHights = destination;\n var baseOffset = 0.0;\n var offsets = ArrayList_init();\n for (var i = 0; i < numRows; i++) {\n var currOffset = baseOffset + spacesBefore.get_za3lpa$(i) + tileLabelHights.get_za3lpa$(i);\n offsets.add_11rb$(currOffset);\n baseOffset = currOffset + layoutInfos.get_za3lpa$(i).geomOuterHeight() + axisHeights.get_za3lpa$(i);\n }\n return offsets;\n };\n FacetedPlotLayoutUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'FacetedPlotLayoutUtil',\n interfaces: []\n };\n var FacetedPlotLayoutUtil_instance = null;\n function FacetedPlotLayoutUtil_getInstance() {\n if (FacetedPlotLayoutUtil_instance === null) {\n new FacetedPlotLayoutUtil();\n }\n return FacetedPlotLayoutUtil_instance;\n }\n function GeomMarginsLayout(left, top, right, bottom) {\n GeomMarginsLayout$Companion_getInstance();\n this.left_0 = left;\n this.top_0 = top;\n this.right_0 = right;\n this.bottom_0 = bottom;\n }\n GeomMarginsLayout.prototype.toInnerSize_gpjtzr$ = function (outer) {\n var lt = new DoubleVector(outer.x * this.left_0, outer.y * this.top_0);\n var rb = new DoubleVector(outer.x * this.right_0, outer.y * this.bottom_0);\n return outer.subtract_gpjtzr$(lt).subtract_gpjtzr$(rb);\n };\n GeomMarginsLayout.prototype.toInnerBounds_wthzt5$ = function (outer) {\n var lt = new DoubleVector(outer.width * this.left_0, outer.height * this.top_0);\n return new DoubleRectangle(outer.origin.add_gpjtzr$(lt), this.toInnerSize_gpjtzr$(outer.dimension));\n };\n GeomMarginsLayout.prototype.toOuterSize_gpjtzr$ = function (inner) {\n var outerWidth = inner.x / (1 - (this.left_0 + this.right_0));\n var outerHeight = inner.y / (1 - (this.top_0 + this.bottom_0));\n return new DoubleVector(outerWidth, outerHeight);\n };\n GeomMarginsLayout.prototype.toOuterBounds_wthzt5$ = function (inner) {\n var outerSize = this.toOuterSize_gpjtzr$(inner.dimension);\n var lt = new DoubleVector(outerSize.x * this.left_0, outerSize.y * this.top_0);\n return new DoubleRectangle(inner.origin.subtract_gpjtzr$(lt), outerSize);\n };\n GeomMarginsLayout.prototype.toAxisOrigin_gdlhkh$ = function (geomInnerBounds, axisOrientation) {\n var tmp$;\n var outerBounds = this.toOuterBounds_wthzt5$(geomInnerBounds);\n switch (axisOrientation.name) {\n case 'LEFT':\n tmp$ = new DoubleVector(outerBounds.left, geomInnerBounds.top);\n break;\n case 'TOP':\n tmp$ = geomInnerBounds.origin;\n break;\n case 'RIGHT':\n tmp$ = new DoubleVector(geomInnerBounds.right, geomInnerBounds.top);\n break;\n case 'BOTTOM':\n tmp$ = new DoubleVector(geomInnerBounds.left, outerBounds.bottom);\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n function GeomMarginsLayout$Companion() {\n GeomMarginsLayout$Companion_instance = this;\n }\n GeomMarginsLayout$Companion.prototype.create_relqli$ = function (marginalLayers) {\n var tmp$, tmp$_0, tmp$_1, tmp$_2;\n var marginalLayersByMargin = MarginalLayerUtil_getInstance().marginalLayersByMargin_relqli$(marginalLayers);\n var tmp$_3;\n if ((tmp$ = marginalLayersByMargin.get_11rb$(MarginSide$LEFT_getInstance())) != null) {\n var maxOfOrNull$result;\n maxOfOrNull$break: do {\n var iterator = tmp$.iterator();\n if (!iterator.hasNext()) {\n maxOfOrNull$result = null;\n break maxOfOrNull$break;\n }\n var maxValue = iterator.next().marginalSize;\n while (iterator.hasNext()) {\n var v = iterator.next().marginalSize;\n maxValue = JsMath.max(maxValue, v);\n }\n maxOfOrNull$result = maxValue;\n }\n while (false);\n tmp$_3 = maxOfOrNull$result;\n } else\n tmp$_3 = null;\n var left = tmp$_3;\n var tmp$_4;\n if ((tmp$_0 = marginalLayersByMargin.get_11rb$(MarginSide$TOP_getInstance())) != null) {\n var maxOfOrNull$result_0;\n maxOfOrNull$break: do {\n var iterator_0 = tmp$_0.iterator();\n if (!iterator_0.hasNext()) {\n maxOfOrNull$result_0 = null;\n break maxOfOrNull$break;\n }\n var maxValue_0 = iterator_0.next().marginalSize;\n while (iterator_0.hasNext()) {\n var v_0 = iterator_0.next().marginalSize;\n maxValue_0 = JsMath.max(maxValue_0, v_0);\n }\n maxOfOrNull$result_0 = maxValue_0;\n }\n while (false);\n tmp$_4 = maxOfOrNull$result_0;\n } else\n tmp$_4 = null;\n var top = tmp$_4;\n var tmp$_5;\n if ((tmp$_1 = marginalLayersByMargin.get_11rb$(MarginSide$RIGHT_getInstance())) != null) {\n var maxOfOrNull$result_1;\n maxOfOrNull$break: do {\n var iterator_1 = tmp$_1.iterator();\n if (!iterator_1.hasNext()) {\n maxOfOrNull$result_1 = null;\n break maxOfOrNull$break;\n }\n var maxValue_1 = iterator_1.next().marginalSize;\n while (iterator_1.hasNext()) {\n var v_1 = iterator_1.next().marginalSize;\n maxValue_1 = JsMath.max(maxValue_1, v_1);\n }\n maxOfOrNull$result_1 = maxValue_1;\n }\n while (false);\n tmp$_5 = maxOfOrNull$result_1;\n } else\n tmp$_5 = null;\n var right = tmp$_5;\n var tmp$_6;\n if ((tmp$_2 = marginalLayersByMargin.get_11rb$(MarginSide$BOTTOM_getInstance())) != null) {\n var maxOfOrNull$result_2;\n maxOfOrNull$break: do {\n var iterator_2 = tmp$_2.iterator();\n if (!iterator_2.hasNext()) {\n maxOfOrNull$result_2 = null;\n break maxOfOrNull$break;\n }\n var maxValue_2 = iterator_2.next().marginalSize;\n while (iterator_2.hasNext()) {\n var v_2 = iterator_2.next().marginalSize;\n maxValue_2 = JsMath.max(maxValue_2, v_2);\n }\n maxOfOrNull$result_2 = maxValue_2;\n }\n while (false);\n tmp$_6 = maxOfOrNull$result_2;\n } else\n tmp$_6 = null;\n var bottom = tmp$_6;\n return new GeomMarginsLayout(left != null ? left : 0.0, top != null ? top : 0.0, right != null ? right : 0.0, bottom != null ? bottom : 0.0);\n };\n GeomMarginsLayout$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var GeomMarginsLayout$Companion_instance = null;\n function GeomMarginsLayout$Companion_getInstance() {\n if (GeomMarginsLayout$Companion_instance === null) {\n new GeomMarginsLayout$Companion();\n }\n return GeomMarginsLayout$Companion_instance;\n }\n GeomMarginsLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GeomMarginsLayout',\n interfaces: []\n };\n function GeometryUtil() {\n GeometryUtil_instance = this;\n }\n GeometryUtil.prototype.union_te9coj$ = function (first, optionalSecond) {\n var tmp$;\n if (optionalSecond == null) {\n tmp$ = first;\n } else\n tmp$ = first.union_wthzt5$(optionalSecond);\n return tmp$;\n };\n GeometryUtil.prototype.union_a7nkjf$ = function (head, c) {\n var tmp$;\n var result = head;\n tmp$ = c.iterator();\n while (tmp$.hasNext()) {\n var r = tmp$.next();\n result = result.union_wthzt5$(r);\n }\n return result;\n };\n GeometryUtil.prototype.changeWidth_j6cmed$ = function (r, width) {\n return DoubleRectangle_init(r.origin.x, r.origin.y, width, r.dimension.y);\n };\n GeometryUtil.prototype.changeWidthKeepRight_j6cmed$ = function (r, width) {\n return DoubleRectangle_init(r.right - width, r.origin.y, width, r.dimension.y);\n };\n GeometryUtil.prototype.changeHeight_j6cmed$ = function (r, height) {\n return DoubleRectangle_init(r.origin.x, r.origin.y, r.dimension.x, height);\n };\n GeometryUtil.prototype.changeHeightKeepBottom_j6cmed$ = function (r, height) {\n return DoubleRectangle_init(r.origin.x, r.bottom - height, r.dimension.x, height);\n };\n GeometryUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'GeometryUtil',\n interfaces: []\n };\n var GeometryUtil_instance = null;\n function GeometryUtil_getInstance() {\n if (GeometryUtil_instance === null) {\n new GeometryUtil();\n }\n return GeometryUtil_instance;\n }\n function LegendBoxInfo(size) {\n LegendBoxInfo$Companion_getInstance();\n this.size_8be2vx$ = size;\n }\n Object.defineProperty(LegendBoxInfo.prototype, 'isEmpty', {\n configurable: true,\n get: function () {\n return false;\n }\n });\n function LegendBoxInfo$Companion() {\n LegendBoxInfo$Companion_instance = this;\n this.EMPTY = new LegendBoxInfo$Companion$EMPTY$ObjectLiteral(DoubleVector.Companion.ZERO);\n }\n function LegendBoxInfo$Companion$EMPTY$ObjectLiteral(size) {\n LegendBoxInfo.call(this, size);\n }\n Object.defineProperty(LegendBoxInfo$Companion$EMPTY$ObjectLiteral.prototype, 'isEmpty', {\n configurable: true,\n get: function () {\n return true;\n }\n });\n LegendBoxInfo$Companion$EMPTY$ObjectLiteral.prototype.createLegendBox = function () {\n throw IllegalStateException_init('Empty legend box info');\n };\n LegendBoxInfo$Companion$EMPTY$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [LegendBoxInfo]\n };\n LegendBoxInfo$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var LegendBoxInfo$Companion_instance = null;\n function LegendBoxInfo$Companion_getInstance() {\n if (LegendBoxInfo$Companion_instance === null) {\n new LegendBoxInfo$Companion();\n }\n return LegendBoxInfo$Companion_instance;\n }\n LegendBoxInfo.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendBoxInfo',\n interfaces: []\n };\n function LegendBoxesLayout(outerBounds, innerBounds, theme) {\n this.outerBounds_0 = outerBounds;\n this.innerBounds_0 = innerBounds;\n this.theme_0 = theme;\n }\n LegendBoxesLayout.prototype.doLayout_mx3cup$ = function (legendsBlockInfo) {\n var tmp$;\n var legendPosition = this.theme_0.position();\n var legendJustification = this.theme_0.justification();\n var blockSize = legendsBlockInfo.size();\n var innerCenter = this.innerBounds_0.center;\n var a = this.outerBounds_0.top;\n var b = innerCenter.y - blockSize.y / 2;\n var sideLegendTop = JsMath.max(a, b);\n if (equals(legendPosition, LegendPosition$Companion_getInstance().LEFT))\n tmp$ = new DoubleVector(this.outerBounds_0.left, sideLegendTop);\n else if (equals(legendPosition, LegendPosition$Companion_getInstance().RIGHT))\n tmp$ = new DoubleVector(this.outerBounds_0.right - blockSize.x, sideLegendTop);\n else if (equals(legendPosition, LegendPosition$Companion_getInstance().TOP))\n tmp$ = new DoubleVector(innerCenter.x - blockSize.x / 2, this.outerBounds_0.top);\n else if (equals(legendPosition, LegendPosition$Companion_getInstance().BOTTOM))\n tmp$ = new DoubleVector(innerCenter.x - blockSize.x / 2, this.outerBounds_0.bottom - blockSize.y);\n else\n tmp$ = LegendBoxesLayoutUtil_getInstance().overlayLegendOrigin_tmgej$(this.innerBounds_0, blockSize, legendPosition, legendJustification);\n var legendOrigin = tmp$;\n return legendsBlockInfo.moveAll_gpjtzr$(legendOrigin);\n };\n function LegendBoxesLayout$BoxWithLocation(legendBox, location) {\n this.legendBox = legendBox;\n this.location = location;\n }\n LegendBoxesLayout$BoxWithLocation.prototype.size_8be2vx$ = function () {\n return this.legendBox.size_8be2vx$;\n };\n LegendBoxesLayout$BoxWithLocation.prototype.bounds_8be2vx$ = function () {\n return new DoubleRectangle(this.location, this.legendBox.size_8be2vx$);\n };\n LegendBoxesLayout$BoxWithLocation.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'BoxWithLocation',\n interfaces: []\n };\n LegendBoxesLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendBoxesLayout',\n interfaces: []\n };\n function LegendBoxesLayoutUtil() {\n LegendBoxesLayoutUtil_instance = this;\n }\n LegendBoxesLayoutUtil.prototype.arrangeLegendBoxes_wcxvwm$ = function (infos, theme) {\n var tmp$;\n var legendArrangement = LegendArrangement$VERTICAL_getInstance();\n if (equals(legendArrangement, LegendArrangement$VERTICAL_getInstance()))\n tmp$ = this.verticalStack_0(infos);\n else\n tmp$ = this.horizontalStack_0(infos);\n var boxWithLocationList = tmp$;\n return new LegendsBlockInfo(boxWithLocationList);\n };\n LegendBoxesLayoutUtil.prototype.verticalStack_0 = function (boxInfos) {\n var tmp$;\n var result = ArrayList_init();\n var y = 0.0;\n tmp$ = boxInfos.iterator();\n while (tmp$.hasNext()) {\n var info = tmp$.next();\n result.add_11rb$(new LegendBoxesLayout$BoxWithLocation(info, new DoubleVector(0.0, y)));\n y += info.size_8be2vx$.y;\n }\n return result;\n };\n LegendBoxesLayoutUtil.prototype.horizontalStack_0 = function (boxInfos) {\n var tmp$;\n var result = ArrayList_init();\n var x = 0.0;\n tmp$ = boxInfos.iterator();\n while (tmp$.hasNext()) {\n var info = tmp$.next();\n result.add_11rb$(new LegendBoxesLayout$BoxWithLocation(info, new DoubleVector(x, 0.0)));\n x += info.size_8be2vx$.x;\n }\n return result;\n };\n LegendBoxesLayoutUtil.prototype.overlayLegendOrigin_tmgej$ = function (plotBounds, legendSize, legendPosition, legendJustification) {\n var plotSize = plotBounds.dimension;\n var absolutePosition = new DoubleVector(plotBounds.left + plotSize.x * legendPosition.x, plotBounds.bottom - plotSize.y * legendPosition.y);\n var originOffset = new DoubleVector(-legendSize.x * legendJustification.x, legendSize.y * legendJustification.y - legendSize.y);\n return absolutePosition.add_gpjtzr$(originOffset);\n };\n LegendBoxesLayoutUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'LegendBoxesLayoutUtil',\n interfaces: []\n };\n var LegendBoxesLayoutUtil_instance = null;\n function LegendBoxesLayoutUtil_getInstance() {\n if (LegendBoxesLayoutUtil_instance === null) {\n new LegendBoxesLayoutUtil();\n }\n return LegendBoxesLayoutUtil_instance;\n }\n function LegendsBlockInfo(boxWithLocationList) {\n this.boxWithLocationList = boxWithLocationList;\n }\n LegendsBlockInfo.prototype.size = function () {\n var tmp$, tmp$_0, tmp$_1;\n var bounds = null;\n tmp$ = this.boxWithLocationList.iterator();\n while (tmp$.hasNext()) {\n var boxWithLocation = tmp$.next();\n bounds = (tmp$_0 = bounds != null ? bounds.union_wthzt5$(boxWithLocation.bounds_8be2vx$()) : null) != null ? tmp$_0 : boxWithLocation.bounds_8be2vx$();\n }\n return (tmp$_1 = bounds != null ? bounds.dimension : null) != null ? tmp$_1 : DoubleVector.Companion.ZERO;\n };\n LegendsBlockInfo.prototype.moveAll_gpjtzr$ = function (delta) {\n var tmp$;\n var result = ArrayList_init();\n tmp$ = this.boxWithLocationList.iterator();\n while (tmp$.hasNext()) {\n var boxWithLocation = tmp$.next();\n result.add_11rb$(new LegendBoxesLayout$BoxWithLocation(boxWithLocation.legendBox, boxWithLocation.location.add_gpjtzr$(delta)));\n }\n var $receiver = this.boxWithLocationList;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$_0;\n tmp$_0 = $receiver.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n destination.add_11rb$(new LegendBoxesLayout$BoxWithLocation(item.legendBox, item.location.add_gpjtzr$(delta)));\n }\n var newList = destination;\n return new LegendsBlockInfo(newList);\n };\n LegendsBlockInfo.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendsBlockInfo',\n interfaces: []\n };\n function Margins(top, right, bottom, left) {\n if (top === void 0)\n top = 0.0;\n if (right === void 0)\n right = 0.0;\n if (bottom === void 0)\n bottom = 0.0;\n if (left === void 0)\n left = 0.0;\n this.top = top;\n this.right = right;\n this.bottom = bottom;\n this.left = left;\n }\n Margins.prototype.width = function () {\n return this.left + this.right;\n };\n Margins.prototype.height = function () {\n return this.top + this.bottom;\n };\n Margins.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'Margins',\n interfaces: []\n };\n function PlotAxisLayout(breaksProviderFactory, theme, orientation) {\n this.breaksProviderFactory_0 = breaksProviderFactory;\n this.theme_0 = theme;\n this.orientation_bjhusy$_0 = orientation;\n }\n Object.defineProperty(PlotAxisLayout.prototype, 'orientation', {\n get: function () {\n return this.orientation_bjhusy$_0;\n }\n });\n PlotAxisLayout.prototype.initialThickness = function () {\n return PlotAxisLayoutUtil_getInstance().initialThickness_chj3mn$(this.orientation, this.theme_0);\n };\n PlotAxisLayout.prototype.doLayout_5wdni1$ = function (axisDomain, axisLength, maxTickLabelsBoundsStretched) {\n var breaksProvider = this.breaksProviderFactory_0.createAxisBreaksProvider_3lmjpf$(axisDomain);\n var layouter = AxisLayouter$Companion_getInstance().create_ywgc3$(this.orientation, axisDomain, breaksProvider, this.theme_0);\n return layouter.doLayout_p1d3jc$(axisLength, maxTickLabelsBoundsStretched);\n };\n PlotAxisLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PlotAxisLayout',\n interfaces: [AxisLayout]\n };\n function PlotAxisLayoutUtil() {\n PlotAxisLayoutUtil_instance = this;\n this.INITIAL_TICK_LABEL_IN_CHARS_0 = '_';\n }\n PlotAxisLayoutUtil.prototype.initialThickness_chj3mn$ = function (orientation, theme) {\n var tmp$;\n if (theme.showTickMarks() || theme.showLabels()) {\n var v = theme.tickLabelDistance_6taknv$(orientation.isHorizontal);\n if (theme.showLabels()) {\n tmp$ = v + this.initialTickLabelSize_0(orientation, PlotLabelSpecFactory_getInstance().axisTick_9yvfuv$(theme));\n } else {\n tmp$ = v;\n }\n return tmp$;\n }\n return 0.0;\n };\n PlotAxisLayoutUtil.prototype.initialTickLabelSize_0 = function (orientation, tickLabelSpec) {\n return orientation.isHorizontal ? tickLabelSpec.height() : tickLabelSpec.width_61zpoe$(this.INITIAL_TICK_LABEL_IN_CHARS_0);\n };\n PlotAxisLayoutUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'PlotAxisLayoutUtil',\n interfaces: []\n };\n var PlotAxisLayoutUtil_instance = null;\n function PlotAxisLayoutUtil_getInstance() {\n if (PlotAxisLayoutUtil_instance === null) {\n new PlotAxisLayoutUtil();\n }\n return PlotAxisLayoutUtil_instance;\n }\n function PlotLabelSpecFactory() {\n PlotLabelSpecFactory_instance = this;\n this.DISTANCE_TO_LABEL_IN_CHARS = '_';\n }\n PlotLabelSpecFactory.prototype.plotTitle_5dhkxz$ = function (theme) {\n return this.plotLabelSpec_0(theme.titleStyle());\n };\n PlotLabelSpecFactory.prototype.plotSubtitle_5dhkxz$ = function (theme) {\n return this.plotLabelSpec_0(theme.subtitleStyle());\n };\n PlotLabelSpecFactory.prototype.plotCaption_5dhkxz$ = function (theme) {\n return this.plotLabelSpec_0(theme.captionStyle());\n };\n PlotLabelSpecFactory.prototype.legendTitle_730mk3$ = function (theme) {\n return this.plotLabelSpec_0(theme.titleStyle());\n };\n PlotLabelSpecFactory.prototype.legendItem_730mk3$ = function (theme) {\n return this.plotLabelSpec_0(theme.textStyle());\n };\n PlotLabelSpecFactory.prototype.axisTick_9yvfuv$ = function (theme) {\n return this.plotLabelSpec_0(theme.labelStyle());\n };\n PlotLabelSpecFactory.prototype.axisTitle_9yvfuv$ = function (theme) {\n return this.plotLabelSpec_0(theme.titleStyle());\n };\n PlotLabelSpecFactory.prototype.plotLabelSpec_0 = function (textStyle) {\n return new PlotLabelSpec(new Font(textStyle.family, numberToInt(textStyle.size), textStyle.face.bold, textStyle.face.italic));\n };\n PlotLabelSpecFactory.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'PlotLabelSpecFactory',\n interfaces: []\n };\n var PlotLabelSpecFactory_instance = null;\n function PlotLabelSpecFactory_getInstance() {\n if (PlotLabelSpecFactory_instance === null) {\n new PlotLabelSpecFactory();\n }\n return PlotLabelSpecFactory_instance;\n }\n function PlotLayout() {\n }\n PlotLayout.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'PlotLayout',\n interfaces: []\n };\n function PlotLayoutBase() {\n this.paddingTop_72hspu$_0 = 0.0;\n this.paddingRight_oc6xpz$_0 = 0.0;\n this.paddingBottom_phgrg6$_0 = 0.0;\n this.paddingLeft_66kgx2$_0 = 0.0;\n }\n Object.defineProperty(PlotLayoutBase.prototype, 'paddingTop_0', {\n configurable: true,\n get: function () {\n return this.paddingTop_72hspu$_0;\n },\n set: function (paddingTop) {\n this.paddingTop_72hspu$_0 = paddingTop;\n }\n });\n Object.defineProperty(PlotLayoutBase.prototype, 'paddingRight_0', {\n configurable: true,\n get: function () {\n return this.paddingRight_oc6xpz$_0;\n },\n set: function (paddingRight) {\n this.paddingRight_oc6xpz$_0 = paddingRight;\n }\n });\n Object.defineProperty(PlotLayoutBase.prototype, 'paddingBottom_0', {\n configurable: true,\n get: function () {\n return this.paddingBottom_phgrg6$_0;\n },\n set: function (paddingBottom) {\n this.paddingBottom_phgrg6$_0 = paddingBottom;\n }\n });\n Object.defineProperty(PlotLayoutBase.prototype, 'paddingLeft_0', {\n configurable: true,\n get: function () {\n return this.paddingLeft_66kgx2$_0;\n },\n set: function (paddingLeft) {\n this.paddingLeft_66kgx2$_0 = paddingLeft;\n }\n });\n PlotLayoutBase.prototype.setPadding_6y0v78$ = function (top, right, bottom, left) {\n this.paddingTop_0 = top;\n this.paddingRight_0 = right;\n this.paddingBottom_0 = bottom;\n this.paddingLeft_0 = left;\n };\n PlotLayoutBase.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PlotLayoutBase',\n interfaces: [PlotLayout]\n };\n function PlotLayoutInfo(tiles, size) {\n this.size = size;\n this.tiles = ArrayList_init_1(tiles);\n }\n PlotLayoutInfo.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PlotLayoutInfo',\n interfaces: []\n };\n function PlotLayoutUtil() {\n PlotLayoutUtil_instance = this;\n this.LIVE_MAP_PLOT_PADDING_0 = new DoubleVector(10.0, 0.0);\n this.LIVE_MAP_PLOT_MARGIN_0 = new DoubleVector(10.0, 10.0);\n }\n PlotLayoutUtil.prototype.labelDimensions_0 = function (text, labelSpec) {\n if (text.length === 0) {\n return new DoubleVector(0.0, labelSpec.height());\n }\n return new DoubleVector(labelSpec.width_61zpoe$(text), labelSpec.height());\n };\n PlotLayoutUtil.prototype.textLinesDimensions_0 = function (text, labelSpec) {\n var $receiver = MultilineLabel.Companion.splitLines_61zpoe$(text);\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n destination.add_11rb$(this.labelDimensions_0(item, labelSpec));\n }\n return destination;\n };\n function PlotLayoutUtil$textDimensions$union($receiver, p) {\n var a = $receiver.x;\n var b = p.x;\n return new DoubleVector(JsMath.max(a, b), $receiver.y + p.y);\n }\n PlotLayoutUtil.prototype.textDimensions_1al14g$ = function (text, labelSpec) {\n var union = PlotLayoutUtil$textDimensions$union;\n var $receiver = this.textLinesDimensions_0(text, labelSpec);\n var tmp$;\n var accumulator = DoubleVector.Companion.ZERO;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n accumulator = union(accumulator, element);\n }\n return accumulator;\n };\n PlotLayoutUtil.prototype.titleThickness_0 = function (title, labelSpec, margin) {\n if (title == null)\n return 0.0;\n return this.textDimensions_1al14g$(title, labelSpec).y + margin;\n };\n PlotLayoutUtil.prototype.titleThickness_kyoegs$ = function (title, labelSpec, margins) {\n return this.titleThickness_0(title, labelSpec, margins.height());\n };\n PlotLayoutUtil.prototype.overallGeomBounds_93w4c3$ = function (plotLayoutInfo) {\n if (!!plotLayoutInfo.tiles.isEmpty()) {\n var message = 'Plot is empty';\n throw IllegalArgumentException_init(message.toString());\n }\n var $receiver = plotLayoutInfo.tiles;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n destination.add_11rb$(item.getAbsoluteOuterGeomBounds_gpjtzr$(DoubleVector.Companion.ZERO));\n }\n var iterator = destination.iterator();\n if (!iterator.hasNext())\n throw UnsupportedOperationException_init(\"Empty collection can't be reduced.\");\n var accumulator = iterator.next();\n while (iterator.hasNext()) {\n accumulator = accumulator.union_wthzt5$(iterator.next());\n }\n return accumulator;\n };\n PlotLayoutUtil.prototype.overallTileBounds_93w4c3$ = function (plotLayoutInfo) {\n if (!!plotLayoutInfo.tiles.isEmpty()) {\n var message = 'Plot is empty';\n throw IllegalArgumentException_init(message.toString());\n }\n var $receiver = plotLayoutInfo.tiles;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n destination.add_11rb$(item.getAbsoluteBounds_gpjtzr$(DoubleVector.Companion.ZERO));\n }\n var iterator = destination.iterator();\n if (!iterator.hasNext())\n throw UnsupportedOperationException_init(\"Empty collection can't be reduced.\");\n var accumulator = iterator.next();\n while (iterator.hasNext()) {\n accumulator = accumulator.union_wthzt5$(iterator.next());\n }\n return accumulator;\n };\n PlotLayoutUtil.prototype.liveMapBounds_wthzt5$ = function (container) {\n return new DoubleRectangle(container.origin.add_gpjtzr$(this.LIVE_MAP_PLOT_PADDING_0), container.dimension.subtract_gpjtzr$(this.LIVE_MAP_PLOT_MARGIN_0));\n };\n PlotLayoutUtil.prototype.subtractTitlesAndLegends_krgcoj$ = function (baseSize, title, subtitle, caption, axisTitleLeft, axisTitleBottom, axisEnabled, legendsBlockInfo, theme, flippedAxis) {\n var delta = this.titlesAndLegendsSizeDelta_0(title, subtitle, caption, axisTitleLeft, axisTitleBottom, axisEnabled, legendsBlockInfo, theme, flippedAxis);\n var reduced = baseSize.subtract_gpjtzr$(delta);\n var a = reduced.x;\n var b = TileLayoutUtil_getInstance().GEOM_MIN_SIZE.x;\n var tmp$ = JsMath.max(a, b);\n var a_0 = reduced.y;\n var b_0 = TileLayoutUtil_getInstance().GEOM_MIN_SIZE.y;\n return new DoubleVector(tmp$, JsMath.max(a_0, b_0));\n };\n PlotLayoutUtil.prototype.addTitlesAndLegends_krgcoj$ = function (base, title, subtitle, caption, axisTitleLeft, axisTitleBottom, axisEnabled, legendsBlockInfo, theme, flippedAxis) {\n var delta = this.titlesAndLegendsSizeDelta_0(title, subtitle, caption, axisTitleLeft, axisTitleBottom, axisEnabled, legendsBlockInfo, theme, flippedAxis);\n return base.add_gpjtzr$(delta);\n };\n PlotLayoutUtil.prototype.titlesAndLegendsSizeDelta_0 = function (title, subtitle, caption, axisTitleLeft, axisTitleBottom, axisEnabled, legendsBlockInfo, theme, flippedAxis) {\n var titleDelta = this.titleSizeDelta_9qd63d$(title, subtitle, theme.plot());\n var axisTitlesDelta = this.axisTitleSizeDelta_5fzsug$(to(axisTitleLeft, PlotLabelSpecFactory_getInstance().axisTitle_9yvfuv$(theme.verticalAxis_6taknv$(flippedAxis))), to(axisTitleBottom, PlotLabelSpecFactory_getInstance().axisTitle_9yvfuv$(theme.horizontalAxis_6taknv$(flippedAxis))), axisEnabled, this.axisMarginDimensions_1crrl9$(theme, flippedAxis));\n var legendBlockDelta = this.legendBlockDelta_0(legendsBlockInfo, theme.legend());\n var captionDelta = this.captionSizeDelta_n8fzqq$(caption, theme.plot());\n return titleDelta.add_gpjtzr$(axisTitlesDelta).add_gpjtzr$(legendBlockDelta).add_gpjtzr$(captionDelta);\n };\n PlotLayoutUtil.prototype.titleSizeDelta_9qd63d$ = function (title, subtitle, theme) {\n return new DoubleVector(0.0, this.titleThickness_kyoegs$(title, PlotLabelSpecFactory_getInstance().plotTitle_5dhkxz$(theme), theme.titleMargins()) + this.titleThickness_kyoegs$(subtitle, PlotLabelSpecFactory_getInstance().plotSubtitle_5dhkxz$(theme), theme.subtitleMargins()));\n };\n PlotLayoutUtil.prototype.captionSizeDelta_n8fzqq$ = function (caption, theme) {\n return new DoubleVector(0.0, this.titleThickness_kyoegs$(caption, PlotLabelSpecFactory_getInstance().plotCaption_5dhkxz$(theme), theme.captionMargins()));\n };\n PlotLayoutUtil.prototype.axisMarginDimensions_1crrl9$ = function (theme, flippedAxis) {\n var width = theme.verticalAxis_6taknv$(flippedAxis).titleMargins().width();\n var height = theme.horizontalAxis_6taknv$(flippedAxis).titleMargins().height();\n return new DoubleVector(width, height);\n };\n PlotLayoutUtil.prototype.axisTitleSizeDelta_5fzsug$ = function (axisTitleLeft, axisTitleBottom, axisEnabled, marginDimensions) {\n if (!axisEnabled)\n return DoubleVector.Companion.ZERO;\n var axisTitleLeftDelta = new DoubleVector(this.titleThickness_0(axisTitleLeft.first, axisTitleLeft.second, marginDimensions.x), 0.0);\n var axisTitleBottomDelta = new DoubleVector(0.0, this.titleThickness_0(axisTitleBottom.first, axisTitleBottom.second, marginDimensions.y));\n return axisTitleLeftDelta.add_gpjtzr$(axisTitleBottomDelta);\n };\n PlotLayoutUtil.prototype.legendBlockDelta_0 = function (legendsBlockInfo, theme) {\n var tmp$, tmp$_0;\n if (!theme.position().isFixed)\n return DoubleVector.Companion.ZERO;\n var size = legendsBlockInfo.size();\n tmp$ = theme.position();\n if (equals(tmp$, LegendPosition$Companion_getInstance().LEFT) || equals(tmp$, LegendPosition$Companion_getInstance().RIGHT))\n tmp$_0 = new DoubleVector(size.x, 0.0);\n else\n tmp$_0 = new DoubleVector(0.0, size.y);\n return tmp$_0;\n };\n PlotLayoutUtil.prototype.legendBlockLeftTopDelta_284vw0$ = function (legendsBlockInfo, theme) {\n var tmp$, tmp$_0;\n if (!theme.position().isFixed)\n return DoubleVector.Companion.ZERO;\n var size = legendsBlockInfo.size();\n tmp$ = theme.position();\n if (equals(tmp$, LegendPosition$Companion_getInstance().LEFT))\n tmp$_0 = new DoubleVector(size.x, 0.0);\n else if (equals(tmp$, LegendPosition$Companion_getInstance().TOP))\n tmp$_0 = new DoubleVector(0.0, size.y);\n else\n tmp$_0 = DoubleVector.Companion.ZERO;\n return tmp$_0;\n };\n PlotLayoutUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'PlotLayoutUtil',\n interfaces: []\n };\n var PlotLayoutUtil_instance = null;\n function PlotLayoutUtil_getInstance() {\n if (PlotLayoutUtil_instance === null) {\n new PlotLayoutUtil();\n }\n return PlotLayoutUtil_instance;\n }\n function SingleTilePlotLayout(tileLayout, hAxisTheme, vAxisTheme) {\n SingleTilePlotLayout$Companion_getInstance();\n PlotLayoutBase.call(this);\n this.tileLayout_0 = tileLayout;\n var leftPadding = !vAxisTheme.showTitle() && !vAxisTheme.showLabels() ? SingleTilePlotLayout$Companion_getInstance().PADDING_0 : 0.0;\n var bottomPadding = !hAxisTheme.showTitle() && !hAxisTheme.showLabels() ? SingleTilePlotLayout$Companion_getInstance().PADDING_0 : 0.0;\n this.setPadding_6y0v78$(SingleTilePlotLayout$Companion_getInstance().PADDING_0, SingleTilePlotLayout$Companion_getInstance().PADDING_0, bottomPadding, leftPadding);\n }\n SingleTilePlotLayout.prototype.doLayout_3twog0$ = function (preferredSize, coordProvider) {\n var paddingLeftTop = new DoubleVector(this.paddingLeft_0, this.paddingTop_0);\n var paddingRightBottom = new DoubleVector(this.paddingRight_0, this.paddingBottom_0);\n var tilePreferredSize = preferredSize.subtract_gpjtzr$(paddingLeftTop).subtract_gpjtzr$(paddingRightBottom);\n var tileInfo = this.tileLayout_0.doLayout_3twog0$(tilePreferredSize, coordProvider).withOffset_gpjtzr$(paddingLeftTop);\n var plotSize = tileInfo.bounds.dimension.add_gpjtzr$(paddingLeftTop).add_gpjtzr$(paddingRightBottom);\n return new PlotLayoutInfo(listOf(tileInfo), plotSize);\n };\n function SingleTilePlotLayout$Companion() {\n SingleTilePlotLayout$Companion_instance = this;\n this.PADDING_0 = 10.0;\n }\n SingleTilePlotLayout$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var SingleTilePlotLayout$Companion_instance = null;\n function SingleTilePlotLayout$Companion_getInstance() {\n if (SingleTilePlotLayout$Companion_instance === null) {\n new SingleTilePlotLayout$Companion();\n }\n return SingleTilePlotLayout$Companion_instance;\n }\n SingleTilePlotLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'SingleTilePlotLayout',\n interfaces: [PlotLayoutBase]\n };\n function TextJustification(x, y) {\n TextJustification$Companion_getInstance();\n this.x = x;\n this.y = y;\n }\n function TextJustification$Companion() {\n TextJustification$Companion_instance = this;\n }\n function TextJustification$Companion$TextRotation(name, ordinal, angle) {\n Enum.call(this);\n this.angle = angle;\n this.name$ = name;\n this.ordinal$ = ordinal;\n }\n function TextJustification$Companion$TextRotation_initFields() {\n TextJustification$Companion$TextRotation_initFields = function () {\n };\n TextJustification$Companion$TextRotation$CLOCKWISE_instance = new TextJustification$Companion$TextRotation('CLOCKWISE', 0, 90.0);\n TextJustification$Companion$TextRotation$ANTICLOCKWISE_instance = new TextJustification$Companion$TextRotation('ANTICLOCKWISE', 1, -90.0);\n }\n var TextJustification$Companion$TextRotation$CLOCKWISE_instance;\n function TextJustification$Companion$TextRotation$CLOCKWISE_getInstance() {\n TextJustification$Companion$TextRotation_initFields();\n return TextJustification$Companion$TextRotation$CLOCKWISE_instance;\n }\n var TextJustification$Companion$TextRotation$ANTICLOCKWISE_instance;\n function TextJustification$Companion$TextRotation$ANTICLOCKWISE_getInstance() {\n TextJustification$Companion$TextRotation_initFields();\n return TextJustification$Companion$TextRotation$ANTICLOCKWISE_instance;\n }\n TextJustification$Companion$TextRotation.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TextRotation',\n interfaces: [Enum]\n };\n function TextJustification$Companion$TextRotation$values() {\n return [TextJustification$Companion$TextRotation$CLOCKWISE_getInstance(), TextJustification$Companion$TextRotation$ANTICLOCKWISE_getInstance()];\n }\n TextJustification$Companion$TextRotation.values = TextJustification$Companion$TextRotation$values;\n function TextJustification$Companion$TextRotation$valueOf(name) {\n switch (name) {\n case 'CLOCKWISE':\n return TextJustification$Companion$TextRotation$CLOCKWISE_getInstance();\n case 'ANTICLOCKWISE':\n return TextJustification$Companion$TextRotation$ANTICLOCKWISE_getInstance();\n default:\n throwISE('No enum constant jetbrains.datalore.plot.builder.layout.TextJustification.Companion.TextRotation.' + name);\n }\n }\n TextJustification$Companion$TextRotation.valueOf_61zpoe$ = TextJustification$Companion$TextRotation$valueOf;\n TextJustification$Companion.prototype.applyJustification_x3kzr8$ = function (boundRect, textSize, lineHeight, justification, rotation) {\n if (rotation === void 0)\n rotation = null;\n var tmp$;\n var rect = rotation != null ? boundRect.flip() : boundRect;\n var tmp$_0 = this.xPosition_0(rect, justification.x);\n var x = tmp$_0.component1()\n , hAnchor = tmp$_0.component2();\n var y = this.yPosition_0(rect, textSize, lineHeight, justification.y);\n if (rotation == null)\n tmp$ = new DoubleVector(x, y);\n else if (equals(rotation, TextJustification$Companion$TextRotation$CLOCKWISE_getInstance()))\n tmp$ = new DoubleVector(rect.top + rect.bottom - y, x);\n else if (equals(rotation, TextJustification$Companion$TextRotation$ANTICLOCKWISE_getInstance()))\n tmp$ = new DoubleVector(y, rect.left + rect.right - x);\n else\n tmp$ = Kotlin.noWhenBranchMatched();\n var position = tmp$;\n return to(position, hAnchor);\n };\n TextJustification$Companion.prototype.xPosition_0 = function (boundRect, hjust) {\n var tmp$;\n var textWidth = 0.0;\n if (hjust < 0.5)\n tmp$ = Text$HorizontalAnchor.LEFT;\n else if (hjust === 0.5)\n tmp$ = Text$HorizontalAnchor.MIDDLE;\n else\n tmp$ = Text$HorizontalAnchor.RIGHT;\n var anchor = tmp$;\n var x = boundRect.left + (boundRect.width - textWidth) * hjust;\n return to(x, anchor);\n };\n TextJustification$Companion.prototype.yPosition_0 = function (boundRect, textSize, lineHeight, vjust) {\n var y = boundRect.bottom - (boundRect.height - textSize.y) * vjust;\n return y - textSize.y + lineHeight * 0.7;\n };\n TextJustification$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var TextJustification$Companion_instance = null;\n function TextJustification$Companion_getInstance() {\n if (TextJustification$Companion_instance === null) {\n new TextJustification$Companion();\n }\n return TextJustification$Companion_instance;\n }\n TextJustification.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TextJustification',\n interfaces: []\n };\n function TileLayout() {\n }\n TileLayout.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'TileLayout',\n interfaces: []\n };\n function TileLayoutInfo(offset, bounds, geomOuterBounds, geomInnerBounds, hAxisInfo, vAxisInfo, hAxisShown, vAxisShown, facetXLabels, facetYLabel, trueIndex) {\n if (facetXLabels === void 0)\n facetXLabels = emptyList();\n if (facetYLabel === void 0)\n facetYLabel = null;\n this.offset = offset;\n this.bounds = bounds;\n this.geomOuterBounds = geomOuterBounds;\n this.geomInnerBounds = geomInnerBounds;\n this.hAxisInfo = hAxisInfo;\n this.vAxisInfo = vAxisInfo;\n this.facetXLabels = facetXLabels;\n this.facetYLabel = facetYLabel;\n this.trueIndex = trueIndex;\n this.hAxisShown = (this.hAxisInfo != null && hAxisShown);\n this.vAxisShown = (this.vAxisInfo != null && vAxisShown);\n }\n TileLayoutInfo.prototype.withOffset_gpjtzr$ = function (offset) {\n return new TileLayoutInfo(offset, this.bounds, this.geomOuterBounds, this.geomInnerBounds, this.hAxisInfo, this.vAxisInfo, this.hAxisShown, this.vAxisShown, this.facetXLabels, this.facetYLabel, this.trueIndex);\n };\n TileLayoutInfo.prototype.withFacetLabels_5hkr16$ = function (xLabels, yLabel) {\n return new TileLayoutInfo(this.offset, this.bounds, this.geomOuterBounds, this.geomInnerBounds, this.hAxisInfo, this.vAxisInfo, this.hAxisShown, this.vAxisShown, xLabels, yLabel, this.trueIndex);\n };\n TileLayoutInfo.prototype.withAxisShown_dqye30$ = function (hAxisShown, vAxisShown) {\n return new TileLayoutInfo(this.offset, this.bounds, this.geomOuterBounds, this.geomInnerBounds, this.hAxisInfo, this.vAxisInfo, hAxisShown, vAxisShown, this.facetXLabels, this.facetYLabel, this.trueIndex);\n };\n TileLayoutInfo.prototype.getAbsoluteBounds_gpjtzr$ = function (tilesOrigin) {\n var offset = tilesOrigin.add_gpjtzr$(this.offset);\n return this.bounds.add_gpjtzr$(offset);\n };\n TileLayoutInfo.prototype.getAbsoluteOuterGeomBounds_gpjtzr$ = function (tilesOrigin) {\n var offset = tilesOrigin.add_gpjtzr$(this.offset);\n return this.geomOuterBounds.add_gpjtzr$(offset);\n };\n TileLayoutInfo.prototype.axisThicknessX = function () {\n return this.bounds.bottom - this.geomOuterBounds.bottom;\n };\n TileLayoutInfo.prototype.axisThicknessY = function () {\n return this.geomOuterBounds.left - this.bounds.left;\n };\n TileLayoutInfo.prototype.geomOuterWidth = function () {\n return this.geomOuterBounds.width;\n };\n TileLayoutInfo.prototype.geomOuterHeight = function () {\n return this.geomOuterBounds.height;\n };\n TileLayoutInfo.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TileLayoutInfo',\n interfaces: []\n };\n function TileLayoutProvider() {\n }\n TileLayoutProvider.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'TileLayoutProvider',\n interfaces: []\n };\n function AdaptableAxisBreaksProvider(domainAfterTransform, breaksGenerator) {\n this.domainAfterTransform_0 = domainAfterTransform;\n this.breaksGenerator_0 = breaksGenerator;\n }\n Object.defineProperty(AdaptableAxisBreaksProvider.prototype, 'isFixedBreaks', {\n configurable: true,\n get: function () {\n return false;\n }\n });\n Object.defineProperty(AdaptableAxisBreaksProvider.prototype, 'fixedBreaks', {\n configurable: true,\n get: function () {\n throw IllegalStateException_init('Not a fixed breaks provider');\n }\n });\n AdaptableAxisBreaksProvider.prototype.getBreaks_5wr77w$ = function (targetCount, axisLength) {\n var scaleBreaks = this.breaksGenerator_0.generateBreaks_f140j5$(this.domainAfterTransform_0, targetCount);\n return scaleBreaks;\n };\n AdaptableAxisBreaksProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'AdaptableAxisBreaksProvider',\n interfaces: [AxisBreaksProvider]\n };\n function AxisBreaksProvider() {\n }\n AxisBreaksProvider.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'AxisBreaksProvider',\n interfaces: []\n };\n function AxisBreaksProviderFactory() {\n AxisBreaksProviderFactory$Companion_getInstance();\n }\n function AxisBreaksProviderFactory$Companion() {\n AxisBreaksProviderFactory$Companion_instance = this;\n }\n AxisBreaksProviderFactory$Companion.prototype.forScale_iu85h4$ = function (scale) {\n var tmp$;\n if (scale.hasBreaks()) {\n tmp$ = new AxisBreaksProviderFactory$FixedBreaksProviderFactory(new FixedAxisBreaksProvider(scale.getScaleBreaks()));\n } else {\n tmp$ = new AxisBreaksProviderFactory$AdaptableBreaksProviderFactory(scale.getBreaksGenerator());\n }\n return tmp$;\n };\n AxisBreaksProviderFactory$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var AxisBreaksProviderFactory$Companion_instance = null;\n function AxisBreaksProviderFactory$Companion_getInstance() {\n if (AxisBreaksProviderFactory$Companion_instance === null) {\n new AxisBreaksProviderFactory$Companion();\n }\n return AxisBreaksProviderFactory$Companion_instance;\n }\n function AxisBreaksProviderFactory$FixedBreaksProviderFactory(breaksBrovider) {\n AxisBreaksProviderFactory.call(this);\n this.breaksBrovider_0 = breaksBrovider;\n }\n AxisBreaksProviderFactory$FixedBreaksProviderFactory.prototype.createAxisBreaksProvider_3lmjpf$ = function (axisDomain) {\n return this.breaksBrovider_0;\n };\n AxisBreaksProviderFactory$FixedBreaksProviderFactory.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'FixedBreaksProviderFactory',\n interfaces: [AxisBreaksProviderFactory]\n };\n function AxisBreaksProviderFactory$AdaptableBreaksProviderFactory(breaksGenerator) {\n AxisBreaksProviderFactory.call(this);\n this.breaksGenerator_0 = breaksGenerator;\n }\n AxisBreaksProviderFactory$AdaptableBreaksProviderFactory.prototype.createAxisBreaksProvider_3lmjpf$ = function (axisDomain) {\n return new AdaptableAxisBreaksProvider(axisDomain, this.breaksGenerator_0);\n };\n AxisBreaksProviderFactory$AdaptableBreaksProviderFactory.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'AdaptableBreaksProviderFactory',\n interfaces: [AxisBreaksProviderFactory]\n };\n AxisBreaksProviderFactory.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'AxisBreaksProviderFactory',\n interfaces: []\n };\n function AxisLayouter(orientation, domainRange, labelsLayout) {\n AxisLayouter$Companion_getInstance();\n this.orientation = orientation;\n this.domainRange_jxchw$_0 = domainRange;\n this.labelsLayout_ft0nu6$_0 = labelsLayout;\n }\n AxisLayouter.prototype.doLayout_p1d3jc$ = function (axisLength, maxTickLabelsBounds) {\n var labelsInfo = this.labelsLayout_ft0nu6$_0.doLayout_s0wrr0$(axisLength, this.toAxisMapper_14dthe$(axisLength), maxTickLabelsBounds);\n var axisBreaks = ensureNotNull(labelsInfo.breaks);\n var labelsBounds = ensureNotNull(labelsInfo.bounds);\n return new AxisLayoutInfo(axisLength, this.domainRange_jxchw$_0, this.orientation, axisBreaks, labelsBounds, labelsInfo.labelRotationAngle, labelsInfo.labelHorizontalAnchor, labelsInfo.labelVerticalAnchor, labelsInfo.labelAdditionalOffsets, maxTickLabelsBounds, BreakLabelsLayoutUtil_getInstance().textBounds_14wjue$(labelsBounds, this.labelsLayout_ft0nu6$_0.theme.tickLabelMargins(), this.orientation));\n };\n AxisLayouter.prototype.toScaleMapper_14dthe$ = function (axisLength) {\n return scale.Mappers.mul_3mogjz$(this.domainRange_jxchw$_0, axisLength);\n };\n function AxisLayouter$Companion() {\n AxisLayouter$Companion_instance = this;\n }\n AxisLayouter$Companion.prototype.create_ywgc3$ = function (orientation, axisDomain, breaksProvider, theme) {\n var tmp$, tmp$_0;\n if (orientation.isHorizontal) {\n if (breaksProvider.isFixedBreaks) {\n tmp$ = AxisLabelsLayout$Companion_getInstance().horizontalFixedBreaks_du6rjs$(orientation, axisDomain, breaksProvider.fixedBreaks, theme);\n } else {\n tmp$ = AxisLabelsLayout$Companion_getInstance().horizontalFlexBreaks_ywgc3$(orientation, axisDomain, breaksProvider, theme);\n }\n var labelsLayout = tmp$;\n return new HorizontalAxisLayouter(orientation, axisDomain, labelsLayout);\n }\n if (breaksProvider.isFixedBreaks) {\n tmp$_0 = AxisLabelsLayout$Companion_getInstance().verticalFixedBreaks_du6rjs$(orientation, axisDomain, breaksProvider.fixedBreaks, theme);\n } else {\n tmp$_0 = AxisLabelsLayout$Companion_getInstance().verticalFlexBreaks_ywgc3$(orientation, axisDomain, breaksProvider, theme);\n }\n var labelsLayout_0 = tmp$_0;\n return new VerticalAxisLayouter(orientation, axisDomain, labelsLayout_0);\n };\n AxisLayouter$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var AxisLayouter$Companion_instance = null;\n function AxisLayouter$Companion_getInstance() {\n if (AxisLayouter$Companion_instance === null) {\n new AxisLayouter$Companion();\n }\n return AxisLayouter$Companion_instance;\n }\n AxisLayouter.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'AxisLayouter',\n interfaces: []\n };\n function FixedAxisBreaksProvider(fixedBreaks) {\n this.fixedBreaks_cixykn$_0 = fixedBreaks;\n }\n Object.defineProperty(FixedAxisBreaksProvider.prototype, 'fixedBreaks', {\n get: function () {\n return this.fixedBreaks_cixykn$_0;\n }\n });\n Object.defineProperty(FixedAxisBreaksProvider.prototype, 'isFixedBreaks', {\n configurable: true,\n get: function () {\n return true;\n }\n });\n FixedAxisBreaksProvider.prototype.getBreaks_5wr77w$ = function (targetCount, axisLength) {\n return this.fixedBreaks;\n };\n FixedAxisBreaksProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'FixedAxisBreaksProvider',\n interfaces: [AxisBreaksProvider]\n };\n function HorizontalAxisLayouter(orientation, domainRange, labelsLayout) {\n AxisLayouter.call(this, orientation, domainRange, labelsLayout);\n }\n function HorizontalAxisLayouter$toAxisMapper$lambda(closure$scaleMapper) {\n return function (v) {\n return closure$scaleMapper.invoke_yrwdxb$(v);\n };\n }\n HorizontalAxisLayouter.prototype.toAxisMapper_14dthe$ = function (axisLength) {\n var scaleMapper = this.toScaleMapper_14dthe$(axisLength);\n return HorizontalAxisLayouter$toAxisMapper$lambda(scaleMapper);\n };\n HorizontalAxisLayouter.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'HorizontalAxisLayouter',\n interfaces: [AxisLayouter]\n };\n function VerticalAxisLayouter(orientation, domainRange, labelsLayout) {\n AxisLayouter.call(this, orientation, domainRange, labelsLayout);\n }\n function VerticalAxisLayouter$toAxisMapper$lambda(closure$scaleMapper, closure$axisLength) {\n return function (v) {\n var mapped = closure$scaleMapper.invoke_yrwdxb$(v);\n if (mapped != null) {\n return closure$axisLength - mapped;\n } else {\n return null;\n }\n };\n }\n VerticalAxisLayouter.prototype.toAxisMapper_14dthe$ = function (axisLength) {\n var scaleMapper = this.toScaleMapper_14dthe$(axisLength);\n return VerticalAxisLayouter$toAxisMapper$lambda(scaleMapper, axisLength);\n };\n VerticalAxisLayouter.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'VerticalAxisLayouter',\n interfaces: [AxisLayouter]\n };\n function AbstractFixedBreaksLabelsLayout(orientation, axisDomain, labelSpec, breaks, theme) {\n AbstractFixedBreaksLabelsLayout$Companion_getInstance();\n AxisLabelsLayout.call(this, orientation, axisDomain, labelSpec, theme);\n this.breaks_0 = breaks;\n }\n AbstractFixedBreaksLabelsLayout.prototype.labelBounds_0 = function (labelLocation, labelText) {\n var dim = this.labelSpec.dimensions_61zpoe$(labelText);\n var labelBounds = this.labelBounds_gpjtzr$(dim);\n return labelBounds.add_gpjtzr$(labelLocation);\n };\n AbstractFixedBreaksLabelsLayout.prototype.labelsBounds_c3fefx$ = function (tickPositions, tickLabels, toTickLocation) {\n var tmp$;\n var boundsList = this.labelBoundsList_c3fefx$(tickPositions, this.breaks_0.labels, toTickLocation);\n var bounds = null;\n tmp$ = boundsList.iterator();\n while (tmp$.hasNext()) {\n var labelBounds = tmp$.next();\n bounds = GeometryUtil_getInstance().union_te9coj$(labelBounds, bounds);\n }\n return bounds;\n };\n AbstractFixedBreaksLabelsLayout.prototype.labelBoundsList_c3fefx$ = function (tickPositions, tickLabels, toTickLocation) {\n var tmp$;\n var result = ArrayList_init();\n var labels = tickLabels.iterator();\n tmp$ = tickPositions.iterator();\n while (tmp$.hasNext()) {\n var pos = tmp$.next();\n var label = labels.next();\n var bounds = this.labelBounds_0(toTickLocation(pos), label);\n result.add_11rb$(bounds);\n }\n return result;\n };\n AbstractFixedBreaksLabelsLayout.prototype.createAxisLabelsLayoutInfoBuilder_fd842m$ = function (bounds, overlap) {\n return (new AxisLabelsLayoutInfo$Builder()).breaks_d6t06k$(this.breaks_0).bounds_wthzt5$(this.applyLabelsMargins_w7e9pi$(bounds)).overlap_6taknv$(overlap);\n };\n AbstractFixedBreaksLabelsLayout.prototype.noLabelsLayoutInfo_c0p8fa$ = function (axisLength, orientation) {\n if (orientation.isHorizontal) {\n var bounds = DoubleRectangle_init(axisLength / 2, 0.0, 0.0, 0.0);\n bounds = this.applyLabelsMargins_w7e9pi$(bounds);\n return (new AxisLabelsLayoutInfo$Builder()).breaks_d6t06k$(this.breaks_0).bounds_wthzt5$(bounds).overlap_6taknv$(false).labelAdditionalOffsets_eajcfd$(null).labelHorizontalAnchor_mf4siq$(Text$HorizontalAnchor.MIDDLE).labelVerticalAnchor_yaylw0$(Text$VerticalAnchor.TOP).build();\n }\n throw IllegalStateException_init('Not implemented for ' + orientation);\n };\n function AbstractFixedBreaksLabelsLayout$Companion() {\n AbstractFixedBreaksLabelsLayout$Companion_instance = this;\n this.HORIZONTAL_TICK_LOCATION = AbstractFixedBreaksLabelsLayout$Companion$HORIZONTAL_TICK_LOCATION$lambda;\n }\n function AbstractFixedBreaksLabelsLayout$Companion$HORIZONTAL_TICK_LOCATION$lambda(x) {\n return new DoubleVector(x, 0.0);\n }\n AbstractFixedBreaksLabelsLayout$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var AbstractFixedBreaksLabelsLayout$Companion_instance = null;\n function AbstractFixedBreaksLabelsLayout$Companion_getInstance() {\n if (AbstractFixedBreaksLabelsLayout$Companion_instance === null) {\n new AbstractFixedBreaksLabelsLayout$Companion();\n }\n return AbstractFixedBreaksLabelsLayout$Companion_instance;\n }\n AbstractFixedBreaksLabelsLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'AbstractFixedBreaksLabelsLayout',\n interfaces: [AxisLabelsLayout]\n };\n function AxisLabelsLayout(orientation, axisDomain, labelSpec, theme) {\n AxisLabelsLayout$Companion_getInstance();\n this.orientation = orientation;\n this.axisDomain = axisDomain;\n this.labelSpec = labelSpec;\n this.theme = theme;\n }\n Object.defineProperty(AxisLabelsLayout.prototype, 'isHorizontal', {\n configurable: true,\n get: function () {\n return this.orientation.isHorizontal;\n }\n });\n AxisLabelsLayout.prototype.mapToAxis_d2cc22$ = function (breaks, axisMapper) {\n return BreakLabelsLayoutUtil_getInstance().mapToAxis_rtp2vs$(breaks, this.axisDomain, axisMapper);\n };\n AxisLabelsLayout.prototype.applyLabelsMargins_w7e9pi$ = function (labelsBounds) {\n return BreakLabelsLayoutUtil_getInstance().applyLabelsMargins_r0qkik$(labelsBounds, this.theme.showTickMarks() ? this.theme.tickMarkLength() : 0.0, this.theme.tickLabelMargins(), this.orientation);\n };\n function AxisLabelsLayout$Companion() {\n AxisLabelsLayout$Companion_instance = this;\n this.INITIAL_TICK_LABEL = '0000';\n this.MIN_TICK_LABEL_DISTANCE = 20.0;\n }\n AxisLabelsLayout$Companion.prototype.tickLabelSpec_0 = function (theme) {\n return PlotLabelSpecFactory_getInstance().axisTick_9yvfuv$(theme);\n };\n AxisLabelsLayout$Companion.prototype.horizontalFlexBreaks_ywgc3$ = function (orientation, axisDomain, breaksProvider, theme) {\n if (!orientation.isHorizontal) {\n var message = orientation.toString();\n throw IllegalArgumentException_init(message.toString());\n }\n if (!!breaksProvider.isFixedBreaks) {\n var message_0 = 'fixed breaks';\n throw IllegalArgumentException_init(message_0.toString());\n }\n return new HorizontalFlexBreaksLabelsLayout(orientation, axisDomain, this.tickLabelSpec_0(theme), breaksProvider, theme);\n };\n AxisLabelsLayout$Companion.prototype.horizontalFixedBreaks_du6rjs$ = function (orientation, axisDomain, breaks, theme) {\n if (!orientation.isHorizontal) {\n var message = orientation.toString();\n throw IllegalArgumentException_init(message.toString());\n }\n return new HorizontalFixedBreaksLabelsLayout(orientation, axisDomain, this.tickLabelSpec_0(theme), breaks, theme);\n };\n AxisLabelsLayout$Companion.prototype.verticalFlexBreaks_ywgc3$ = function (orientation, axisDomain, breaksProvider, theme) {\n if (!!orientation.isHorizontal) {\n var message = orientation.toString();\n throw IllegalArgumentException_init(message.toString());\n }\n if (!!breaksProvider.isFixedBreaks) {\n var message_0 = 'fixed breaks';\n throw IllegalArgumentException_init(message_0.toString());\n }\n return new VerticalFlexBreaksLabelsLayout(orientation, axisDomain, this.tickLabelSpec_0(theme), breaksProvider, theme);\n };\n AxisLabelsLayout$Companion.prototype.verticalFixedBreaks_du6rjs$ = function (orientation, axisDomain, breaks, theme) {\n if (!!orientation.isHorizontal) {\n var message = orientation.toString();\n throw IllegalArgumentException_init(message.toString());\n }\n return new VerticalFixedBreaksLabelsLayout(orientation, axisDomain, this.tickLabelSpec_0(theme), breaks, theme);\n };\n AxisLabelsLayout$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var AxisLabelsLayout$Companion_instance = null;\n function AxisLabelsLayout$Companion_getInstance() {\n if (AxisLabelsLayout$Companion_instance === null) {\n new AxisLabelsLayout$Companion();\n }\n return AxisLabelsLayout$Companion_instance;\n }\n AxisLabelsLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'AxisLabelsLayout',\n interfaces: []\n };\n function AxisLabelsLayoutInfo(b) {\n this.breaks = null;\n this.bounds = null;\n this.labelAdditionalOffsets = null;\n this.labelHorizontalAnchor = null;\n this.labelVerticalAnchor = null;\n this.labelRotationAngle = 0;\n this.isOverlap_8be2vx$ = false;\n this.breaks = b.myBreaks_8be2vx$;\n this.bounds = b.myBounds_8be2vx$;\n this.isOverlap_8be2vx$ = b.myOverlap_8be2vx$;\n this.labelAdditionalOffsets = b.myLabelAdditionalOffsets_8be2vx$ == null ? null : ArrayList_init_1(ensureNotNull(b.myLabelAdditionalOffsets_8be2vx$));\n this.labelHorizontalAnchor = b.myLabelHorizontalAnchor_8be2vx$;\n this.labelVerticalAnchor = b.myLabelVerticalAnchor_8be2vx$;\n this.labelRotationAngle = b.myLabelRotationAngle_8be2vx$;\n }\n function AxisLabelsLayoutInfo$Builder() {\n this.myBreaks_8be2vx$ = null;\n this.myBounds_8be2vx$ = null;\n this.myOverlap_8be2vx$ = false;\n this.myLabelAdditionalOffsets_8be2vx$ = null;\n this.myLabelHorizontalAnchor_8be2vx$ = null;\n this.myLabelVerticalAnchor_8be2vx$ = null;\n this.myLabelRotationAngle_8be2vx$ = 0.0;\n }\n AxisLabelsLayoutInfo$Builder.prototype.breaks_d6t06k$ = function (breaks) {\n this.myBreaks_8be2vx$ = breaks;\n return this;\n };\n AxisLabelsLayoutInfo$Builder.prototype.bounds_wthzt5$ = function (bounds) {\n this.myBounds_8be2vx$ = bounds;\n return this;\n };\n AxisLabelsLayoutInfo$Builder.prototype.overlap_6taknv$ = function (b) {\n this.myOverlap_8be2vx$ = b;\n return this;\n };\n AxisLabelsLayoutInfo$Builder.prototype.labelAdditionalOffsets_eajcfd$ = function (l) {\n this.myLabelAdditionalOffsets_8be2vx$ = l;\n return this;\n };\n AxisLabelsLayoutInfo$Builder.prototype.labelHorizontalAnchor_mf4siq$ = function (anchor) {\n this.myLabelHorizontalAnchor_8be2vx$ = anchor;\n return this;\n };\n AxisLabelsLayoutInfo$Builder.prototype.labelVerticalAnchor_yaylw0$ = function (anchor) {\n this.myLabelVerticalAnchor_8be2vx$ = anchor;\n return this;\n };\n AxisLabelsLayoutInfo$Builder.prototype.labelRotationAngle_14dthe$ = function (angle) {\n this.myLabelRotationAngle_8be2vx$ = angle;\n return this;\n };\n AxisLabelsLayoutInfo$Builder.prototype.build = function () {\n return new AxisLabelsLayoutInfo(this);\n };\n AxisLabelsLayoutInfo$Builder.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'Builder',\n interfaces: []\n };\n AxisLabelsLayoutInfo.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'AxisLabelsLayoutInfo',\n interfaces: []\n };\n function BreakLabelsLayoutUtil() {\n BreakLabelsLayoutUtil_instance = this;\n }\n BreakLabelsLayoutUtil.prototype.getFlexBreaks_73ga93$ = function (breaksProvider, maxCount, axisLength) {\n if (!!breaksProvider.isFixedBreaks) {\n var message = 'fixed breaks not expected';\n throw IllegalArgumentException_init(message.toString());\n }\n if (!(maxCount > 0)) {\n var message_0 = 'maxCount=' + maxCount;\n throw IllegalArgumentException_init(message_0.toString());\n }\n var breaks = breaksProvider.getBreaks_5wr77w$(maxCount, axisLength);\n if (maxCount === 1 && !breaks.isEmpty) {\n return new ScaleBreaks(breaks.domainValues.subList_vux9f0$(0, 1), breaks.transformedValues.subList_vux9f0$(0, 1), breaks.labels.subList_vux9f0$(0, 1));\n }\n var count = maxCount;\n while (breaks.size > maxCount) {\n var b = (breaks.size - maxCount | 0) / 2 | 0;\n var delta = JsMath.max(1, b);\n count = count - delta | 0;\n if (count <= 1) {\n breaks = breaksProvider.getBreaks_5wr77w$(1, axisLength);\n break;\n }\n breaks = breaksProvider.getBreaks_5wr77w$(count, axisLength);\n }\n return breaks;\n };\n function BreakLabelsLayoutUtil$longestLabelWidth$lambda(it) {\n return it.length;\n }\n BreakLabelsLayoutUtil.prototype.longestLabelWidth_d4huc9$ = function (labels, labelToWidth) {\n if (labelToWidth === void 0)\n labelToWidth = BreakLabelsLayoutUtil$longestLabelWidth$lambda;\n var maxByOrNull$result;\n maxByOrNull$break: do {\n var iterator = labels.iterator();\n if (!iterator.hasNext()) {\n maxByOrNull$result = null;\n break maxByOrNull$break;\n }\n var maxElem = iterator.next();\n if (!iterator.hasNext()) {\n maxByOrNull$result = maxElem;\n break maxByOrNull$break;\n }\n var maxValue = labelToWidth(maxElem);\n do {\n var e = iterator.next();\n var v = labelToWidth(e);\n if (Kotlin.compareTo(maxValue, v) < 0) {\n maxElem = e;\n maxValue = v;\n }\n }\n while (iterator.hasNext());\n maxByOrNull$result = maxElem;\n }\n while (false);\n var longestLabel = maxByOrNull$result;\n return longestLabel == null ? 0.0 : labelToWidth(longestLabel);\n };\n BreakLabelsLayoutUtil.prototype.horizontalCenteredLabelBounds_gpjtzr$ = function (labelSize) {\n return DoubleRectangle_init(-labelSize.x / 2.0, 0.0, labelSize.x, labelSize.y);\n };\n BreakLabelsLayoutUtil.prototype.doLayoutVerticalAxisLabels_rdueqq$ = function (orientation, breaks, axisDomain, axisMapper, theme) {\n var tmp$;\n if (theme.showLabels()) {\n var labelsBounds = this.verticalAxisLabelsBounds_0(breaks, axisDomain, axisMapper, PlotLabelSpecFactory_getInstance().axisTick_9yvfuv$(theme));\n tmp$ = this.applyLabelsMargins_r0qkik$(labelsBounds, theme.showTickMarks() ? theme.tickMarkLength() : 0.0, theme.tickLabelMargins(), orientation);\n } else if (theme.showTickMarks()) {\n var labelsBounds_0 = new DoubleRectangle(DoubleVector.Companion.ZERO, DoubleVector.Companion.ZERO);\n tmp$ = this.applyLabelsMargins_r0qkik$(labelsBounds_0, theme.showTickMarks() ? theme.tickMarkLength() : 0.0, theme.tickLabelMargins(), orientation);\n } else\n tmp$ = new DoubleRectangle(DoubleVector.Companion.ZERO, DoubleVector.Companion.ZERO);\n var axisBounds = tmp$;\n return (new AxisLabelsLayoutInfo$Builder()).breaks_d6t06k$(breaks).bounds_wthzt5$(axisBounds).build();\n };\n BreakLabelsLayoutUtil.prototype.mapToAxis_rtp2vs$ = function (breaks, axisDomain, axisMapper) {\n var tmp$;\n var axisMin = axisDomain.lowerEnd;\n var axisBreaks = ArrayList_init();\n tmp$ = breaks.iterator();\n while (tmp$.hasNext()) {\n var v = tmp$.next();\n var mapped = axisMapper(v - axisMin);\n axisBreaks.add_11rb$(ensureNotNull(mapped));\n }\n return axisBreaks;\n };\n BreakLabelsLayoutUtil.prototype.applyLabelsMargins_r0qkik$ = function (labelsBounds, tickLength, margins, orientation) {\n var tmp$, tmp$_0, tmp$_1, tmp$_2;\n switch (orientation.name) {\n case 'LEFT':\n tmp$ = margins.width() + labelsBounds.width;\n break;\n case 'TOP':\n tmp$ = margins.height() + labelsBounds.height;\n break;\n case 'RIGHT':\n case 'BOTTOM':\n tmp$ = 0.0;\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n var offset = tickLength + tmp$;\n switch (orientation.name) {\n case 'LEFT':\n tmp$_0 = new DoubleVector(-offset, 0.0);\n break;\n case 'RIGHT':\n tmp$_0 = new DoubleVector(offset, 0.0);\n break;\n case 'TOP':\n tmp$_0 = new DoubleVector(0.0, -offset);\n break;\n case 'BOTTOM':\n tmp$_0 = new DoubleVector(0.0, offset);\n break;\n default:\n tmp$_0 = Kotlin.noWhenBranchMatched();\n break;\n }\n var offsetVector = tmp$_0;\n tmp$_2 = labelsBounds.dimension;\n if (orientation.isHorizontal)\n tmp$_1 = new DoubleVector(0.0, margins.height());\n else\n tmp$_1 = new DoubleVector(margins.width(), 0.0);\n var dimension = tmp$_2.add_gpjtzr$(tmp$_1);\n return new DoubleRectangle(labelsBounds.origin.add_gpjtzr$(offsetVector), dimension);\n };\n BreakLabelsLayoutUtil.prototype.textBounds_14wjue$ = function (elementRect, margins, orientation) {\n var tmp$;\n if (orientation.isHorizontal)\n tmp$ = DoubleRectangle_init(elementRect.left, elementRect.top + margins.top, elementRect.width, elementRect.height - margins.height());\n else {\n tmp$ = DoubleRectangle_init(elementRect.left + margins.left, elementRect.top, elementRect.width - margins.width(), elementRect.height);\n }\n return tmp$;\n };\n function BreakLabelsLayoutUtil$verticalAxisLabelsBounds$lambda(closure$tickLabelSpec) {\n return function (it) {\n return closure$tickLabelSpec.width_61zpoe$(it);\n };\n }\n BreakLabelsLayoutUtil.prototype.verticalAxisLabelsBounds_0 = function (breaks, axisDomain, axisMapper, tickLabelSpec) {\n var maxLabelWidth = this.longestLabelWidth_d4huc9$(breaks.labels, BreakLabelsLayoutUtil$verticalAxisLabelsBounds$lambda(tickLabelSpec));\n var y1 = 0.0;\n var y2 = 0.0;\n if (!breaks.isEmpty) {\n var axisBreaks = this.mapToAxis_rtp2vs$(breaks.transformedValues, axisDomain, axisMapper);\n var a = axisBreaks.get_za3lpa$(0);\n var b = last(axisBreaks);\n y1 = JsMath.min(a, b);\n var a_0 = axisBreaks.get_za3lpa$(0);\n var b_0 = last(axisBreaks);\n y2 = JsMath.max(a_0, b_0);\n y1 -= tickLabelSpec.height() / 2;\n y2 += tickLabelSpec.height() / 2;\n }\n var origin = new DoubleVector(0.0, y1);\n var dimensions = new DoubleVector(maxLabelWidth, y2 - y1);\n return new DoubleRectangle(origin, dimensions);\n };\n BreakLabelsLayoutUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'BreakLabelsLayoutUtil',\n interfaces: []\n };\n var BreakLabelsLayoutUtil_instance = null;\n function BreakLabelsLayoutUtil_getInstance() {\n if (BreakLabelsLayoutUtil_instance === null) {\n new BreakLabelsLayoutUtil();\n }\n return BreakLabelsLayoutUtil_instance;\n }\n function HorizontalFixedBreaksLabelsLayout(orientation, axisDomain, labelSpec, breaks, theme) {\n AbstractFixedBreaksLabelsLayout.call(this, orientation, axisDomain, labelSpec, breaks, theme);\n if (!orientation.isHorizontal) {\n var message = orientation.toString();\n throw IllegalArgumentException_init(message.toString());\n }\n }\n HorizontalFixedBreaksLabelsLayout.prototype.overlap_0 = function (labelsInfo, maxTickLabelsBounds) {\n return labelsInfo.isOverlap_8be2vx$ || (maxTickLabelsBounds != null && !(maxTickLabelsBounds.xRange().encloses_3lmjpf$(ensureNotNull(labelsInfo.bounds).xRange()) && maxTickLabelsBounds.yRange().encloses_3lmjpf$(labelsInfo.bounds.yRange())));\n };\n HorizontalFixedBreaksLabelsLayout.prototype.doLayout_s0wrr0$ = function (axisLength, axisMapper, maxLabelsBounds) {\n if (!this.theme.showLabels()) {\n return this.noLabelsLayoutInfo_c0p8fa$(axisLength, this.orientation);\n }\n var labelsInfo = this.simpleLayout_0().doLayout_s0wrr0$(axisLength, axisMapper, maxLabelsBounds);\n if (this.overlap_0(labelsInfo, maxLabelsBounds)) {\n labelsInfo = this.multilineLayout_0().doLayout_s0wrr0$(axisLength, axisMapper, maxLabelsBounds);\n if (this.overlap_0(labelsInfo, maxLabelsBounds)) {\n labelsInfo = this.tiltedLayout_0().doLayout_s0wrr0$(axisLength, axisMapper, maxLabelsBounds);\n if (this.overlap_0(labelsInfo, maxLabelsBounds)) {\n labelsInfo = this.verticalLayout_0(this.labelSpec).doLayout_s0wrr0$(axisLength, axisMapper, maxLabelsBounds);\n }\n }\n }\n return labelsInfo;\n };\n HorizontalFixedBreaksLabelsLayout.prototype.simpleLayout_0 = function () {\n return new HorizontalSimpleLabelsLayout(this.orientation, this.axisDomain, this.labelSpec, this.breaks_0, this.theme);\n };\n HorizontalFixedBreaksLabelsLayout.prototype.multilineLayout_0 = function () {\n return new HorizontalMultilineLabelsLayout(this.orientation, this.axisDomain, this.labelSpec, this.breaks_0, this.theme, 2);\n };\n HorizontalFixedBreaksLabelsLayout.prototype.tiltedLayout_0 = function () {\n return new HorizontalTiltedLabelsLayout(this.orientation, this.axisDomain, this.labelSpec, this.breaks_0, this.theme);\n };\n HorizontalFixedBreaksLabelsLayout.prototype.verticalLayout_0 = function (labelSpec) {\n return new HorizontalVerticalLabelsLayout(this.orientation, this.axisDomain, labelSpec, this.breaks_0, this.theme);\n };\n HorizontalFixedBreaksLabelsLayout.prototype.labelBounds_gpjtzr$ = function (labelNormalSize) {\n throw IllegalStateException_init('Not implemented here');\n };\n HorizontalFixedBreaksLabelsLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'HorizontalFixedBreaksLabelsLayout',\n interfaces: [AbstractFixedBreaksLabelsLayout]\n };\n function HorizontalFlexBreaksLabelsLayout(orientation, axisDomain, labelSpec, myBreaksProvider, theme) {\n AxisLabelsLayout.call(this, orientation, axisDomain, labelSpec, theme);\n this.myBreaksProvider_0 = myBreaksProvider;\n if (!orientation.isHorizontal) {\n var message = orientation.toString();\n throw IllegalArgumentException_init(message.toString());\n }\n if (!!this.myBreaksProvider_0.isFixedBreaks) {\n var message_0 = 'fixed breaks';\n throw IllegalArgumentException_init(message_0.toString());\n }\n }\n HorizontalFlexBreaksLabelsLayout.prototype.doLayout_s0wrr0$ = function (axisLength, axisMapper, maxLabelsBounds) {\n var targetBreakCount = HorizontalSimpleLabelsLayout$Companion_getInstance().estimateBreakCountInitial_29uwtv$(axisLength, PlotLabelSpecFactory_getInstance().axisTick_9yvfuv$(this.theme));\n var breaks = this.getBreaks_0(targetBreakCount, axisLength);\n var labelsInfo = this.doLayoutLabels_0(breaks, axisLength, axisMapper, maxLabelsBounds);\n while (labelsInfo.isOverlap_8be2vx$) {\n var newTargetBreakCount = HorizontalSimpleLabelsLayout$Companion_getInstance().estimateBreakCount_rh2gss$(breaks.labels, axisLength, PlotLabelSpecFactory_getInstance().axisTick_9yvfuv$(this.theme));\n if (newTargetBreakCount >= targetBreakCount) {\n break;\n }\n targetBreakCount = newTargetBreakCount;\n breaks = this.getBreaks_0(targetBreakCount, axisLength);\n labelsInfo = this.doLayoutLabels_0(breaks, axisLength, axisMapper, maxLabelsBounds);\n }\n return labelsInfo;\n };\n HorizontalFlexBreaksLabelsLayout.prototype.doLayoutLabels_0 = function (breaks, axisLength, axisMapper, maxLabelsBounds) {\n var layout = new HorizontalSimpleLabelsLayout(this.orientation, this.axisDomain, this.labelSpec, breaks, this.theme);\n return layout.doLayout_s0wrr0$(axisLength, axisMapper, maxLabelsBounds);\n };\n HorizontalFlexBreaksLabelsLayout.prototype.getBreaks_0 = function (maxCount, axisLength) {\n return BreakLabelsLayoutUtil_getInstance().getFlexBreaks_73ga93$(this.myBreaksProvider_0, maxCount, axisLength);\n };\n HorizontalFlexBreaksLabelsLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'HorizontalFlexBreaksLabelsLayout',\n interfaces: [AxisLabelsLayout]\n };\n function HorizontalMultilineLabelsLayout(orientation, axisDomain, labelSpec, breaks, theme, myMaxLines) {\n HorizontalMultilineLabelsLayout$Companion_getInstance();\n AbstractFixedBreaksLabelsLayout.call(this, orientation, axisDomain, labelSpec, breaks, theme);\n this.myMaxLines_0 = myMaxLines;\n this.myShelfIndexForTickIndex_0 = ArrayList_init();\n }\n Object.defineProperty(HorizontalMultilineLabelsLayout.prototype, 'labelAdditionalOffsets_0', {\n configurable: true,\n get: function () {\n var tmp$;\n var h = this.labelSpec.height() * HorizontalMultilineLabelsLayout$Companion_getInstance().LINE_HEIGHT_0;\n var result = ArrayList_init();\n tmp$ = this.breaks_0.size;\n for (var i = 0; i < tmp$; i++) {\n result.add_11rb$(new DoubleVector(0.0, this.myShelfIndexForTickIndex_0.get_za3lpa$(i) * h));\n }\n return result;\n }\n });\n HorizontalMultilineLabelsLayout.prototype.doLayout_s0wrr0$ = function (axisLength, axisMapper, maxLabelsBounds) {\n var tmp$, tmp$_0;\n var boundsByShelfIndex = HashMap_init();\n var ticks = this.mapToAxis_d2cc22$(this.breaks_0.transformedValues, axisMapper);\n var boundsList = this.labelBoundsList_c3fefx$(ticks, this.breaks_0.labels, AbstractFixedBreaksLabelsLayout$Companion_getInstance().HORIZONTAL_TICK_LOCATION);\n tmp$ = boundsList.iterator();\n while (tmp$.hasNext()) {\n var labelBounds = tmp$.next();\n var shelfIndex = 0;\n while (true) {\n if (!boundsByShelfIndex.containsKey_11rb$(shelfIndex)) {\n var key = shelfIndex;\n boundsByShelfIndex.put_xwzc9p$(key, labelBounds);\n this.myShelfIndexForTickIndex_0.add_11rb$(shelfIndex);\n break;\n }\n var shelfBounds = ensureNotNull(boundsByShelfIndex.get_11rb$(shelfIndex));\n if (!shelfBounds.xRange().connected_3lmjpf$(new DoubleSpan(labelBounds.left - 60, labelBounds.right + 60))) {\n this.myShelfIndexForTickIndex_0.add_11rb$(shelfIndex);\n shelfBounds = shelfBounds.union_wthzt5$(labelBounds);\n var key_0 = shelfIndex;\n var value = shelfBounds;\n boundsByShelfIndex.put_xwzc9p$(key_0, value);\n break;\n }\n shelfIndex = shelfIndex + 1 | 0;\n }\n }\n var bounds = boundsByShelfIndex.isEmpty() ? new DoubleRectangle(DoubleVector.Companion.ZERO, DoubleVector.Companion.ZERO) : ensureNotNull(boundsByShelfIndex.get_11rb$(0));\n var h = this.labelSpec.height() * HorizontalMultilineLabelsLayout$Companion_getInstance().LINE_HEIGHT_0;\n tmp$_0 = boundsByShelfIndex.size;\n for (var i = 0; i < tmp$_0; i++) {\n var shelfBounds_0 = ensureNotNull(boundsByShelfIndex.get_11rb$(i));\n bounds = bounds.union_wthzt5$(shelfBounds_0.add_gpjtzr$(new DoubleVector(0.0, i * h)));\n }\n var linesCount = boundsByShelfIndex.size;\n return (new AxisLabelsLayoutInfo$Builder()).breaks_d6t06k$(this.breaks_0).bounds_wthzt5$(this.applyLabelsMargins_w7e9pi$(bounds)).overlap_6taknv$(linesCount > this.myMaxLines_0).labelAdditionalOffsets_eajcfd$(this.labelAdditionalOffsets_0).labelHorizontalAnchor_mf4siq$(Text$HorizontalAnchor.MIDDLE).labelVerticalAnchor_yaylw0$(Text$VerticalAnchor.TOP).build();\n };\n HorizontalMultilineLabelsLayout.prototype.labelBounds_gpjtzr$ = function (labelNormalSize) {\n return BreakLabelsLayoutUtil_getInstance().horizontalCenteredLabelBounds_gpjtzr$(labelNormalSize);\n };\n function HorizontalMultilineLabelsLayout$Companion() {\n HorizontalMultilineLabelsLayout$Companion_instance = this;\n this.LINE_HEIGHT_0 = 1.2;\n this.MIN_DISTANCE_0 = 60;\n }\n HorizontalMultilineLabelsLayout$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var HorizontalMultilineLabelsLayout$Companion_instance = null;\n function HorizontalMultilineLabelsLayout$Companion_getInstance() {\n if (HorizontalMultilineLabelsLayout$Companion_instance === null) {\n new HorizontalMultilineLabelsLayout$Companion();\n }\n return HorizontalMultilineLabelsLayout$Companion_instance;\n }\n HorizontalMultilineLabelsLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'HorizontalMultilineLabelsLayout',\n interfaces: [AbstractFixedBreaksLabelsLayout]\n };\n function HorizontalSimpleLabelsLayout(orientation, axisDomain, labelSpec, breaks, theme) {\n HorizontalSimpleLabelsLayout$Companion_getInstance();\n AbstractFixedBreaksLabelsLayout.call(this, orientation, axisDomain, labelSpec, breaks, theme);\n }\n HorizontalSimpleLabelsLayout.prototype.doLayout_s0wrr0$ = function (axisLength, axisMapper, maxLabelsBounds) {\n var tmp$;\n if (this.breaks_0.isEmpty) {\n return this.noLabelsLayoutInfo_c0p8fa$(axisLength, this.orientation);\n }\n if (!this.theme.showLabels()) {\n return this.noLabelsLayoutInfo_c0p8fa$(axisLength, this.orientation);\n }\n var bounds = null;\n var overlap = false;\n var ticks = this.mapToAxis_d2cc22$(this.breaks_0.transformedValues, axisMapper);\n var boundsList = this.labelBoundsList_c3fefx$(ticks, this.breaks_0.labels, AbstractFixedBreaksLabelsLayout$Companion_getInstance().HORIZONTAL_TICK_LOCATION);\n tmp$ = boundsList.iterator();\n while (tmp$.hasNext()) {\n var labelBounds = tmp$.next();\n overlap = overlap || (bounds != null && bounds.xRange().connected_3lmjpf$(data_0.SeriesUtil.expand_nrrs69$(labelBounds.xRange(), AxisLabelsLayout$Companion_getInstance().MIN_TICK_LABEL_DISTANCE / 2, AxisLabelsLayout$Companion_getInstance().MIN_TICK_LABEL_DISTANCE / 2.0)));\n bounds = GeometryUtil_getInstance().union_te9coj$(labelBounds, bounds);\n }\n return (new AxisLabelsLayoutInfo$Builder()).breaks_d6t06k$(this.breaks_0).bounds_wthzt5$(this.applyLabelsMargins_w7e9pi$(ensureNotNull(bounds))).overlap_6taknv$(overlap).labelAdditionalOffsets_eajcfd$(null).labelHorizontalAnchor_mf4siq$(Text$HorizontalAnchor.MIDDLE).labelVerticalAnchor_yaylw0$(Text$VerticalAnchor.TOP).build();\n };\n HorizontalSimpleLabelsLayout.prototype.labelBounds_gpjtzr$ = function (labelNormalSize) {\n return BreakLabelsLayoutUtil_getInstance().horizontalCenteredLabelBounds_gpjtzr$(labelNormalSize);\n };\n function HorizontalSimpleLabelsLayout$Companion() {\n HorizontalSimpleLabelsLayout$Companion_instance = this;\n }\n HorizontalSimpleLabelsLayout$Companion.prototype.estimateBreakCountInitial_29uwtv$ = function (axisLength, tickLabelSpec) {\n return this.estimateBreakCount_0(tickLabelSpec.width_61zpoe$(AxisLabelsLayout$Companion_getInstance().INITIAL_TICK_LABEL), axisLength);\n };\n function HorizontalSimpleLabelsLayout$Companion$estimateBreakCount$lambda(closure$tickLabelSpec) {\n return function (it) {\n return closure$tickLabelSpec.width_61zpoe$(it);\n };\n }\n HorizontalSimpleLabelsLayout$Companion.prototype.estimateBreakCount_rh2gss$ = function (labels, axisLength, tickLabelSpec) {\n var longestLabelWidth = BreakLabelsLayoutUtil_getInstance().longestLabelWidth_d4huc9$(labels, HorizontalSimpleLabelsLayout$Companion$estimateBreakCount$lambda(tickLabelSpec));\n return this.estimateBreakCount_0(longestLabelWidth, axisLength);\n };\n HorizontalSimpleLabelsLayout$Companion.prototype.estimateBreakCount_0 = function (width, axisLength) {\n var tickDistance = width + AxisLabelsLayout$Companion_getInstance().MIN_TICK_LABEL_DISTANCE;\n var b = axisLength / tickDistance;\n return numberToInt(JsMath.max(1.0, b));\n };\n HorizontalSimpleLabelsLayout$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var HorizontalSimpleLabelsLayout$Companion_instance = null;\n function HorizontalSimpleLabelsLayout$Companion_getInstance() {\n if (HorizontalSimpleLabelsLayout$Companion_instance === null) {\n new HorizontalSimpleLabelsLayout$Companion();\n }\n return HorizontalSimpleLabelsLayout$Companion_instance;\n }\n HorizontalSimpleLabelsLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'HorizontalSimpleLabelsLayout',\n interfaces: [AbstractFixedBreaksLabelsLayout]\n };\n function HorizontalTiltedLabelsLayout(orientation, axisDomain, labelSpec, breaks, theme) {\n HorizontalTiltedLabelsLayout$Companion_getInstance();\n AbstractFixedBreaksLabelsLayout.call(this, orientation, axisDomain, labelSpec, breaks, theme);\n }\n Object.defineProperty(HorizontalTiltedLabelsLayout.prototype, 'labelHorizontalAnchor_0', {\n configurable: true,\n get: function () {\n if (this.orientation === Orientation$BOTTOM_getInstance()) {\n return Text$HorizontalAnchor.RIGHT;\n }\n throw RuntimeException_init('Not implemented');\n }\n });\n Object.defineProperty(HorizontalTiltedLabelsLayout.prototype, 'labelVerticalAnchor_0', {\n configurable: true,\n get: function () {\n return Text$VerticalAnchor.TOP;\n }\n });\n HorizontalTiltedLabelsLayout.prototype.doLayout_s0wrr0$ = function (axisLength, axisMapper, maxLabelsBounds) {\n var height = this.labelSpec.height();\n var ticks = this.mapToAxis_d2cc22$(this.breaks_0.transformedValues, axisMapper);\n var overlap = false;\n if (this.breaks_0.size >= 2) {\n var x = (height + HorizontalTiltedLabelsLayout$Companion_getInstance().MIN_DISTANCE_0) / HorizontalTiltedLabelsLayout$Companion_getInstance().SIN_0;\n var minTickDistance = JsMath.abs(x);\n var x_0 = ticks.get_za3lpa$(0) - ticks.get_za3lpa$(1);\n var tickDistance = JsMath.abs(x_0);\n overlap = tickDistance < minTickDistance;\n }\n var bounds = this.labelsBounds_c3fefx$(ticks, this.breaks_0.labels, AbstractFixedBreaksLabelsLayout$Companion_getInstance().HORIZONTAL_TICK_LOCATION);\n return this.createAxisLabelsLayoutInfoBuilder_fd842m$(ensureNotNull(bounds), overlap).labelHorizontalAnchor_mf4siq$(this.labelHorizontalAnchor_0).labelVerticalAnchor_yaylw0$(this.labelVerticalAnchor_0).labelRotationAngle_14dthe$(HorizontalTiltedLabelsLayout$Companion_getInstance().ROTATION_DEGREE_0).build();\n };\n HorizontalTiltedLabelsLayout.prototype.labelBounds_gpjtzr$ = function (labelNormalSize) {\n if (!(HorizontalTiltedLabelsLayout$Companion_getInstance().ROTATION_DEGREE_0 >= -90 && HorizontalTiltedLabelsLayout$Companion_getInstance().ROTATION_DEGREE_0 <= 0 && this.labelHorizontalAnchor_0 === Text$HorizontalAnchor.RIGHT && this.labelVerticalAnchor_0 === Text$VerticalAnchor.TOP)) {\n throw RuntimeException_init('Not implemented');\n }\n var x = labelNormalSize.x * HorizontalTiltedLabelsLayout$Companion_getInstance().COS_0;\n var tmp$ = JsMath.abs(x);\n var x_0 = labelNormalSize.y * HorizontalTiltedLabelsLayout$Companion_getInstance().SIN_0;\n var w = tmp$ + 2 * JsMath.abs(x_0);\n var x_1 = labelNormalSize.x * HorizontalTiltedLabelsLayout$Companion_getInstance().SIN_0;\n var tmp$_0 = JsMath.abs(x_1);\n var x_2 = labelNormalSize.y * HorizontalTiltedLabelsLayout$Companion_getInstance().COS_0;\n var h = tmp$_0 + JsMath.abs(x_2);\n var x_3 = labelNormalSize.x * HorizontalTiltedLabelsLayout$Companion_getInstance().COS_0;\n var tmp$_1 = JsMath.abs(x_3);\n var x_4 = labelNormalSize.y * HorizontalTiltedLabelsLayout$Companion_getInstance().SIN_0;\n var x_5 = -(tmp$_1 + JsMath.abs(x_4));\n var y = 0.0;\n return DoubleRectangle_init(x_5, y, w, h);\n };\n function HorizontalTiltedLabelsLayout$Companion() {\n HorizontalTiltedLabelsLayout$Companion_instance = this;\n this.MIN_DISTANCE_0 = 5.0;\n this.ROTATION_DEGREE_0 = -30.0;\n var x = toRadians(this.ROTATION_DEGREE_0);\n this.SIN_0 = JsMath.sin(x);\n var x_0 = toRadians(this.ROTATION_DEGREE_0);\n this.COS_0 = JsMath.cos(x_0);\n }\n HorizontalTiltedLabelsLayout$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var HorizontalTiltedLabelsLayout$Companion_instance = null;\n function HorizontalTiltedLabelsLayout$Companion_getInstance() {\n if (HorizontalTiltedLabelsLayout$Companion_instance === null) {\n new HorizontalTiltedLabelsLayout$Companion();\n }\n return HorizontalTiltedLabelsLayout$Companion_instance;\n }\n HorizontalTiltedLabelsLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'HorizontalTiltedLabelsLayout',\n interfaces: [AbstractFixedBreaksLabelsLayout]\n };\n function HorizontalVerticalLabelsLayout(orientation, axisDomain, labelSpec, breaks, theme) {\n HorizontalVerticalLabelsLayout$Companion_getInstance();\n AbstractFixedBreaksLabelsLayout.call(this, orientation, axisDomain, labelSpec, breaks, theme);\n }\n Object.defineProperty(HorizontalVerticalLabelsLayout.prototype, 'labelHorizontalAnchor', {\n configurable: true,\n get: function () {\n if (this.orientation === Orientation$BOTTOM_getInstance()) {\n return Text$HorizontalAnchor.LEFT;\n }\n throw RuntimeException_init('Not implemented');\n }\n });\n Object.defineProperty(HorizontalVerticalLabelsLayout.prototype, 'labelVerticalAnchor', {\n configurable: true,\n get: function () {\n return Text$VerticalAnchor.CENTER;\n }\n });\n HorizontalVerticalLabelsLayout.prototype.doLayout_s0wrr0$ = function (axisLength, axisMapper, maxLabelsBounds) {\n var height = this.labelSpec.height();\n var ticks = this.mapToAxis_d2cc22$(this.breaks_0.transformedValues, axisMapper);\n var overlap = false;\n if (this.breaks_0.size >= 2) {\n var minTickDistance = height + HorizontalVerticalLabelsLayout$Companion_getInstance().MIN_DISTANCE_0;\n var x = ticks.get_za3lpa$(0) - ticks.get_za3lpa$(1);\n var tickDistance = JsMath.abs(x);\n overlap = tickDistance < minTickDistance;\n }\n var bounds = this.labelsBounds_c3fefx$(ticks, this.breaks_0.labels, AbstractFixedBreaksLabelsLayout$Companion_getInstance().HORIZONTAL_TICK_LOCATION);\n return this.createAxisLabelsLayoutInfoBuilder_fd842m$(ensureNotNull(bounds), overlap).labelHorizontalAnchor_mf4siq$(this.labelHorizontalAnchor).labelVerticalAnchor_yaylw0$(this.labelVerticalAnchor).labelRotationAngle_14dthe$(HorizontalVerticalLabelsLayout$Companion_getInstance().ROTATION_DEGREE_0).build();\n };\n HorizontalVerticalLabelsLayout.prototype.labelBounds_gpjtzr$ = function (labelNormalSize) {\n if (!(HorizontalVerticalLabelsLayout$Companion_getInstance().ROTATION_DEGREE_0 === 90.0 && this.labelHorizontalAnchor === Text$HorizontalAnchor.LEFT && this.labelVerticalAnchor === Text$VerticalAnchor.CENTER)) {\n throw RuntimeException_init('Not implemented');\n }\n var w = labelNormalSize.y;\n var h = labelNormalSize.x;\n var x = -w / 2;\n var y = 0.0;\n return DoubleRectangle_init(x, y, w, h);\n };\n function HorizontalVerticalLabelsLayout$Companion() {\n HorizontalVerticalLabelsLayout$Companion_instance = this;\n this.MIN_DISTANCE_0 = 5.0;\n this.ROTATION_DEGREE_0 = 90.0;\n }\n HorizontalVerticalLabelsLayout$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var HorizontalVerticalLabelsLayout$Companion_instance = null;\n function HorizontalVerticalLabelsLayout$Companion_getInstance() {\n if (HorizontalVerticalLabelsLayout$Companion_instance === null) {\n new HorizontalVerticalLabelsLayout$Companion();\n }\n return HorizontalVerticalLabelsLayout$Companion_instance;\n }\n HorizontalVerticalLabelsLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'HorizontalVerticalLabelsLayout',\n interfaces: [AbstractFixedBreaksLabelsLayout]\n };\n function VerticalFixedBreaksLabelsLayout(orientation, axisDomain, tickLabelSpec, breaks, theme) {\n AbstractFixedBreaksLabelsLayout.call(this, orientation, axisDomain, tickLabelSpec, breaks, theme);\n }\n VerticalFixedBreaksLabelsLayout.prototype.labelBounds_gpjtzr$ = function (labelNormalSize) {\n throw IllegalStateException_init('Not implemented here');\n };\n VerticalFixedBreaksLabelsLayout.prototype.doLayout_s0wrr0$ = function (axisLength, axisMapper, maxLabelsBounds) {\n return BreakLabelsLayoutUtil_getInstance().doLayoutVerticalAxisLabels_rdueqq$(this.orientation, this.breaks_0, this.axisDomain, axisMapper, this.theme);\n };\n VerticalFixedBreaksLabelsLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'VerticalFixedBreaksLabelsLayout',\n interfaces: [AbstractFixedBreaksLabelsLayout]\n };\n function VerticalFlexBreaksLabelsLayout(orientation, axisDomain, labelSpec, myBreaksProvider, theme) {\n AxisLabelsLayout.call(this, orientation, axisDomain, labelSpec, theme);\n this.myBreaksProvider_0 = myBreaksProvider;\n if (!!orientation.isHorizontal) {\n var message = orientation.toString();\n throw IllegalArgumentException_init(message.toString());\n }\n if (!!this.myBreaksProvider_0.isFixedBreaks) {\n var message_0 = 'fixed breaks';\n throw IllegalArgumentException_init(message_0.toString());\n }\n }\n VerticalFlexBreaksLabelsLayout.prototype.maxTickCount_0 = function (axisLength) {\n var x = axisLength / (PlotLabelSpecFactory_getInstance().axisTick_9yvfuv$(this.theme).height() + AxisLabelsLayout$Companion_getInstance().MIN_TICK_LABEL_DISTANCE);\n return numberToInt(JsMath.ceil(x));\n };\n VerticalFlexBreaksLabelsLayout.prototype.doLayout_s0wrr0$ = function (axisLength, axisMapper, maxLabelsBounds) {\n if (!(axisLength > 0)) {\n var message = 'axis length: ' + axisLength;\n throw IllegalArgumentException_init(message.toString());\n }\n var maxTickCount = this.maxTickCount_0(axisLength);\n var breaks = this.getBreaks_0(maxTickCount, axisLength);\n return BreakLabelsLayoutUtil_getInstance().doLayoutVerticalAxisLabels_rdueqq$(this.orientation, breaks, this.axisDomain, axisMapper, this.theme);\n };\n VerticalFlexBreaksLabelsLayout.prototype.getBreaks_0 = function (maxCount, axisLength) {\n return BreakLabelsLayoutUtil_getInstance().getFlexBreaks_73ga93$(this.myBreaksProvider_0, maxCount, axisLength);\n };\n VerticalFlexBreaksLabelsLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'VerticalFlexBreaksLabelsLayout',\n interfaces: [AxisLabelsLayout]\n };\n function FixedScalesTilesLayouter() {\n FixedScalesTilesLayouter_instance = this;\n }\n FixedScalesTilesLayouter.prototype.createTileLayoutInfos_m2eqzh$ = function (tilesAreaSize, facets, layoutProviderByTile, addedHSize, addedVSize, coordProvider, hAxisTheme, vAxisTheme) {\n var facetTiles = facets.tileInfos();\n var vAxisCount = FacetedPlotLayoutUtil_getInstance().countVAxisInFirstRow_75mdod$(facetTiles);\n var vAxisThickness = PlotAxisLayoutUtil_getInstance().initialThickness_chj3mn$(Orientation$LEFT_getInstance(), vAxisTheme);\n var geomWidth = (tilesAreaSize.x - addedHSize - vAxisCount * vAxisThickness) / facets.colCount;\n var tileWidth = geomWidth + vAxisThickness;\n var hAxisCount = FacetedPlotLayoutUtil_getInstance().countHAxisInFirstCol_75mdod$(facetTiles);\n var hAxisThickness = PlotAxisLayoutUtil_getInstance().initialThickness_chj3mn$(Orientation$BOTTOM_getInstance(), hAxisTheme);\n var geomHeight = (tilesAreaSize.y - addedVSize - hAxisCount * hAxisThickness) / facets.rowCount;\n var tileHeight = geomHeight + hAxisThickness;\n var tileLayout = layoutProviderByTile.get_za3lpa$(0).createTopDownTileLayout();\n var tileLayoutInfo = tileLayout.doLayout_3twog0$(new DoubleVector(tileWidth, tileHeight), coordProvider);\n var destination = ArrayList_init_0(collectionSizeOrDefault(facetTiles, 10));\n var tmp$;\n tmp$ = facetTiles.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n destination.add_11rb$(tileLayoutInfo.withAxisShown_dqye30$(item.hasHAxis, item.hasVAxis));\n }\n var tileLayoutInfos = destination;\n var tilesAreaSizeNew = FacetedPlotLayoutUtil_getInstance().tilesAreaSize_xxmnvs$(tileLayoutInfos, facets, addedHSize, addedVSize);\n var widthDiff = tilesAreaSize.x - tilesAreaSizeNew.x;\n var heightDiff = tilesAreaSize.y - tilesAreaSizeNew.y;\n var tmp$_0 = JsMath.abs(widthDiff) <= facets.colCount;\n if (tmp$_0) {\n tmp$_0 = JsMath.abs(heightDiff) <= facets.rowCount;\n }\n if (tmp$_0) {\n return tileLayoutInfos;\n }\n var geomWidthDelta = widthDiff / facets.colCount;\n var geomHeightDelta = heightDiff / facets.rowCount;\n var tileWidth2 = tileLayoutInfo.geomOuterWidth() + geomWidthDelta + tileLayoutInfo.axisThicknessY();\n var tileHeight2 = tileLayoutInfo.geomOuterHeight() + geomHeightDelta + tileLayoutInfo.axisThicknessX();\n var tileLayoutInfo2 = tileLayout.doLayout_3twog0$(new DoubleVector(tileWidth2, tileHeight2), coordProvider);\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(facetTiles, 10));\n var tmp$_1;\n tmp$_1 = facetTiles.iterator();\n while (tmp$_1.hasNext()) {\n var item_0 = tmp$_1.next();\n destination_0.add_11rb$(tileLayoutInfo2.withAxisShown_dqye30$(item_0.hasHAxis, item_0.hasVAxis));\n }\n return destination_0;\n };\n FixedScalesTilesLayouter.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'FixedScalesTilesLayouter',\n interfaces: []\n };\n var FixedScalesTilesLayouter_instance = null;\n function FixedScalesTilesLayouter_getInstance() {\n if (FixedScalesTilesLayouter_instance === null) {\n new FixedScalesTilesLayouter();\n }\n return FixedScalesTilesLayouter_instance;\n }\n function FreeScalesTilesLayouter() {\n FreeScalesTilesLayouter_instance = this;\n }\n FreeScalesTilesLayouter.prototype.createTileLayoutInfos_m2eqzh$ = function (tilesAreaSize, facets, layoutProviderByTile, addedHSize, addedVSize, coordProvider, hAxisTheme, vAxisTheme) {\n var facetTiles = facets.tileInfos();\n var vAxisCount = FacetedPlotLayoutUtil_getInstance().countVAxisInFirstRow_75mdod$(facetTiles);\n var vAxisThickness = PlotAxisLayoutUtil_getInstance().initialThickness_chj3mn$(Orientation$LEFT_getInstance(), vAxisTheme);\n var geomWidth = (tilesAreaSize.x - addedHSize - vAxisCount * vAxisThickness) / facets.colCount;\n var hAxisCount = FacetedPlotLayoutUtil_getInstance().countHAxisInFirstCol_75mdod$(facetTiles);\n var hAxisThickness = PlotAxisLayoutUtil_getInstance().initialThickness_chj3mn$(Orientation$BOTTOM_getInstance(), hAxisTheme);\n var geomHeight = (tilesAreaSize.y - addedVSize - hAxisCount * hAxisThickness) / facets.rowCount;\n var destination = ArrayList_init_0(collectionSizeOrDefault(layoutProviderByTile, 10));\n var tmp$;\n tmp$ = layoutProviderByTile.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n destination.add_11rb$(item.createInsideOutTileLayout());\n }\n var layoutByTile = destination;\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(facetTiles, 10));\n var tmp$_0;\n tmp$_0 = facetTiles.iterator();\n while (tmp$_0.hasNext()) {\n var item_0 = tmp$_0.next();\n destination_0.add_11rb$(new Pair(item_0, layoutByTile.get_za3lpa$(item_0.trueIndex)));\n }\n var facetTileAndLayout = destination_0;\n var destination_1 = ArrayList_init_0(collectionSizeOrDefault(facetTileAndLayout, 10));\n var tmp$_1;\n tmp$_1 = facetTileAndLayout.iterator();\n while (tmp$_1.hasNext()) {\n var item_1 = tmp$_1.next();\n var tmp$_2 = destination_1.add_11rb$;\n var facetTile = item_1.component1()\n , tileLayout = item_1.component2();\n tmp$_2.call(destination_1, tileLayout.doLayout_3twog0$(new DoubleVector(geomWidth, geomHeight), coordProvider).withAxisShown_dqye30$(facetTile.hasHAxis, facetTile.hasVAxis));\n }\n var layoutInfos = destination_1;\n var tilesAreaSizeNew = FacetedPlotLayoutUtil_getInstance().tilesAreaSize_xxmnvs$(layoutInfos, facets, addedHSize, addedVSize);\n var widthDiff = tilesAreaSize.x - tilesAreaSizeNew.x;\n var heightDiff = tilesAreaSize.y - tilesAreaSizeNew.y;\n var tmp$_3 = JsMath.abs(widthDiff) <= facets.colCount;\n if (tmp$_3) {\n tmp$_3 = JsMath.abs(heightDiff) <= facets.rowCount;\n }\n if (tmp$_3) {\n return layoutInfos;\n }\n var geomWidthDelta = widthDiff / facets.colCount;\n var geomHeightDelta = heightDiff / facets.rowCount;\n var geomWidth2 = geomWidth + geomWidthDelta;\n var geomHeight2 = geomHeight + geomHeightDelta;\n var destination_2 = ArrayList_init_0(collectionSizeOrDefault(facetTileAndLayout, 10));\n var tmp$_4;\n tmp$_4 = facetTileAndLayout.iterator();\n while (tmp$_4.hasNext()) {\n var item_2 = tmp$_4.next();\n var tmp$_5 = destination_2.add_11rb$;\n var facetTile_0 = item_2.component1()\n , tileLayout_0 = item_2.component2();\n tmp$_5.call(destination_2, tileLayout_0.doLayout_3twog0$(new DoubleVector(geomWidth2, geomHeight2), coordProvider).withAxisShown_dqye30$(facetTile_0.hasHAxis, facetTile_0.hasVAxis));\n }\n var layoutInfos2 = destination_2;\n return layoutInfos2;\n };\n FreeScalesTilesLayouter.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'FreeScalesTilesLayouter',\n interfaces: []\n };\n var FreeScalesTilesLayouter_instance = null;\n function FreeScalesTilesLayouter_getInstance() {\n if (FreeScalesTilesLayouter_instance === null) {\n new FreeScalesTilesLayouter();\n }\n return FreeScalesTilesLayouter_instance;\n }\n function InsideOutTileLayout(hAxisLayout, vAxisLayout, hDomain, vDomain, marginsLayout) {\n InsideOutTileLayout$Companion_getInstance();\n this.hAxisLayout_0 = hAxisLayout;\n this.vAxisLayout_0 = vAxisLayout;\n this.hDomain_0 = hDomain;\n this.vDomain_0 = vDomain;\n this.marginsLayout_0 = marginsLayout;\n }\n InsideOutTileLayout.prototype.doLayout_3twog0$ = function (geomSize, coordProvider) {\n var geomOuterBounds = new DoubleRectangle(DoubleVector.Companion.ZERO, geomSize);\n var geomInnerBounds = this.marginsLayout_0.toInnerBounds_wthzt5$(geomOuterBounds);\n var tmp$ = InsideOutTileLayout$Companion_getInstance().computeAxisInfos_0(this.hAxisLayout_0, this.vAxisLayout_0, geomInnerBounds.dimension, this.hDomain_0, this.vDomain_0);\n var hAxisInfo = tmp$.component1()\n , vAxisInfo = tmp$.component2();\n var geomWithAxisBounds = InsideOutTileLayout$Companion_getInstance().tileBounds_0(hAxisInfo.axisBounds(), vAxisInfo.axisBounds(), geomOuterBounds);\n return new TileLayoutInfo(DoubleVector.Companion.ZERO, geomWithAxisBounds, geomOuterBounds, geomInnerBounds, hAxisInfo, vAxisInfo, true, true, void 0, void 0, 0);\n };\n function InsideOutTileLayout$Companion() {\n InsideOutTileLayout$Companion_instance = this;\n this.AXIS_STRETCH_RATIO_0 = 0.1;\n }\n InsideOutTileLayout$Companion.prototype.tileBounds_0 = function (xAxisBounds, yAxisBounds, geomBounds) {\n var leftTop = new DoubleVector(geomBounds.left - yAxisBounds.width, geomBounds.top - TileLayoutUtil_getInstance().GEOM_MARGIN);\n var rightBottom = new DoubleVector(geomBounds.right + TileLayoutUtil_getInstance().GEOM_MARGIN, geomBounds.bottom + xAxisBounds.height);\n return new DoubleRectangle(leftTop, rightBottom.subtract_gpjtzr$(leftTop));\n };\n InsideOutTileLayout$Companion.prototype.computeAxisInfos_0 = function (hAxisLayout, vAxisLayout, geomSize, hDomain, vDomain) {\n var geomBounds = new DoubleRectangle(DoubleVector.Companion.ZERO, geomSize);\n var hAxisInfo = this.computeHAxisInfo_0(hAxisLayout, hDomain, geomBounds);\n var vAxisInfo = this.computeVAxisInfo_0(vAxisLayout, vDomain, geomBounds);\n return new Pair(hAxisInfo, vAxisInfo);\n };\n InsideOutTileLayout$Companion.prototype.computeHAxisInfo_0 = function (axisLayout, axisDomain, geomBounds) {\n var axisSpan = geomBounds.xRange();\n var axisLength = axisSpan.length;\n var stretch = axisLength * this.AXIS_STRETCH_RATIO_0;\n var maxTickLabelsBounds = TileLayoutUtil_getInstance().maxHAxisTickLabelsBounds_f1277s$(Orientation$BOTTOM_getInstance(), stretch, axisSpan, axisSpan);\n return axisLayout.doLayout_5wdni1$(axisDomain, axisLength, maxTickLabelsBounds);\n };\n InsideOutTileLayout$Companion.prototype.computeVAxisInfo_0 = function (axisLayout, axisDomain, geomBounds) {\n return axisLayout.doLayout_5wdni1$(axisDomain, geomBounds.dimension.y, null);\n };\n InsideOutTileLayout$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var InsideOutTileLayout$Companion_instance = null;\n function InsideOutTileLayout$Companion_getInstance() {\n if (InsideOutTileLayout$Companion_instance === null) {\n new InsideOutTileLayout$Companion();\n }\n return InsideOutTileLayout$Companion_instance;\n }\n InsideOutTileLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'InsideOutTileLayout',\n interfaces: [TileLayout]\n };\n function LiveMapAxisTheme() {\n }\n Object.defineProperty(LiveMapAxisTheme.prototype, 'axis', {\n configurable: true,\n get: function () {\n return UNSUPPORTED_0();\n }\n });\n LiveMapAxisTheme.prototype.showLine = function () {\n return false;\n };\n LiveMapAxisTheme.prototype.showTickMarks = function () {\n return false;\n };\n LiveMapAxisTheme.prototype.showLabels = function () {\n return false;\n };\n LiveMapAxisTheme.prototype.showTitle = function () {\n return false;\n };\n LiveMapAxisTheme.prototype.showTooltip = function () {\n return false;\n };\n LiveMapAxisTheme.prototype.titleStyle = function () {\n return new ThemeTextStyle(FontFamily.Companion.SERIF, FontFace.Companion.NORMAL, Defaults$Plot$Axis_getInstance().TITLE_FONT_SIZE, Defaults_getInstance().TEXT_COLOR);\n };\n LiveMapAxisTheme.prototype.titleJustification = function () {\n return new TextJustification(0.5, 1.0);\n };\n LiveMapAxisTheme.prototype.titleMargins = function () {\n return new Margins();\n };\n LiveMapAxisTheme.prototype.lineWidth = function () {\n return 1.0;\n };\n LiveMapAxisTheme.prototype.lineColor = function () {\n return Defaults$Plot$Axis_getInstance().LINE_COLOR;\n };\n LiveMapAxisTheme.prototype.tickMarkColor = function () {\n return Defaults$Plot$Axis_getInstance().LINE_COLOR;\n };\n LiveMapAxisTheme.prototype.labelStyle = function () {\n return new ThemeTextStyle(FontFamily.Companion.SERIF, FontFace.Companion.NORMAL, Defaults$Plot$Axis_getInstance().TICK_FONT_SIZE, Defaults_getInstance().TEXT_COLOR);\n };\n LiveMapAxisTheme.prototype.tickMarkWidth = function () {\n return 1.0;\n };\n LiveMapAxisTheme.prototype.tickMarkLength = function () {\n return 4.0;\n };\n LiveMapAxisTheme.prototype.tickLabelMargins = function () {\n return new Margins(3.0, 3.0, 0.0, 0.0);\n };\n LiveMapAxisTheme.prototype.tooltipFill = function () {\n return Defaults$Common$Tooltip_getInstance().AXIS_TOOLTIP_COLOR;\n };\n LiveMapAxisTheme.prototype.tooltipColor = function () {\n return Defaults$Common$Tooltip_getInstance().LIGHT_TEXT_COLOR;\n };\n LiveMapAxisTheme.prototype.tooltipStrokeWidth = function () {\n return 1.0;\n };\n LiveMapAxisTheme.prototype.tooltipTextStyle = function () {\n return new ThemeTextStyle(FontFamily.Companion.SERIF, FontFace.Companion.NORMAL, Defaults$Common$Tooltip_getInstance().AXIS_TOOLTIP_FONT_SIZE, Defaults$Common$Tooltip_getInstance().LIGHT_TEXT_COLOR);\n };\n LiveMapAxisTheme.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LiveMapAxisTheme',\n interfaces: [AxisTheme]\n };\n function LiveMapTileLayout() {\n }\n LiveMapTileLayout.prototype.doLayout_3twog0$ = function (preferredSize, coordProvider) {\n var geomBounds = TileLayoutUtil_getInstance().liveMapGeomBounds_gpjtzr$(preferredSize);\n return new TileLayoutInfo(DoubleVector.Companion.ZERO, geomBounds, geomBounds, geomBounds, null, null, false, false, void 0, void 0, 0);\n };\n LiveMapTileLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LiveMapTileLayout',\n interfaces: [TileLayout]\n };\n function LiveMapTileLayoutProvider() {\n LiveMapTileLayoutProvider$Companion_getInstance();\n }\n LiveMapTileLayoutProvider.prototype.createTopDownTileLayout = function () {\n return LiveMapTileLayoutProvider$Companion_getInstance().TILE_LAYOUT_0;\n };\n LiveMapTileLayoutProvider.prototype.createInsideOutTileLayout = function () {\n return LiveMapTileLayoutProvider$Companion_getInstance().TILE_LAYOUT_0;\n };\n function LiveMapTileLayoutProvider$Companion() {\n LiveMapTileLayoutProvider$Companion_instance = this;\n this.TILE_LAYOUT_0 = new LiveMapTileLayout();\n }\n LiveMapTileLayoutProvider$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var LiveMapTileLayoutProvider$Companion_instance = null;\n function LiveMapTileLayoutProvider$Companion_getInstance() {\n if (LiveMapTileLayoutProvider$Companion_instance === null) {\n new LiveMapTileLayoutProvider$Companion();\n }\n return LiveMapTileLayoutProvider$Companion_instance;\n }\n LiveMapTileLayoutProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LiveMapTileLayoutProvider',\n interfaces: [TileLayoutProvider]\n };\n function TileLayoutUtil() {\n TileLayoutUtil_instance = this;\n this.GEOM_MARGIN = 0.0;\n this.GEOM_MIN_SIZE = new DoubleVector(50.0, 50.0);\n }\n TileLayoutUtil.prototype.liveMapGeomBounds_gpjtzr$ = function (plotSize) {\n return this.subtractMargins_0(0.0, 0.0, plotSize);\n };\n TileLayoutUtil.prototype.subtractMargins_0 = function (hAxisThickness, vAxisThickness, plotSize) {\n var marginLeftTop = new DoubleVector(vAxisThickness, this.GEOM_MARGIN);\n var marginRightBottom = new DoubleVector(this.GEOM_MARGIN, hAxisThickness);\n var geomSize = plotSize.subtract_gpjtzr$(marginLeftTop).subtract_gpjtzr$(marginRightBottom);\n var a = geomSize.x;\n var b = this.GEOM_MIN_SIZE.x;\n var tmp$ = JsMath.max(a, b);\n var a_0 = geomSize.y;\n var b_0 = this.GEOM_MIN_SIZE.y;\n return new DoubleRectangle(marginLeftTop, new DoubleVector(tmp$, JsMath.max(a_0, b_0)));\n };\n TileLayoutUtil.prototype.geomOuterBounds_sy27u4$ = function (geomInsets, plotSize, hDomain, vDomain, marginsLayout, coordProvider) {\n var plottingArea = geomInsets.subtractFrom_wthzt5$(new DoubleRectangle(DoubleVector.Companion.ZERO, plotSize));\n var geomInnerSize = marginsLayout.toInnerSize_gpjtzr$(plottingArea.dimension);\n var geomOuterSizeAdjusted = marginsLayout.toOuterSize_gpjtzr$(coordProvider.adjustGeomSize_3y20zv$(hDomain, vDomain, geomInnerSize));\n return new DoubleRectangle(plottingArea.origin, geomOuterSizeAdjusted);\n };\n TileLayoutUtil.prototype.maxHAxisTickLabelsBounds_cvaznw$ = function (axisOrientation, stretch, axisSpan, plotSize) {\n var geomPadding = 10.0;\n var maxHorizontalSpan = new DoubleSpan(geomPadding, plotSize.x - 2 * geomPadding);\n return this.maxHAxisTickLabelsBounds_f1277s$(axisOrientation, stretch, axisSpan, maxHorizontalSpan);\n };\n TileLayoutUtil.prototype.maxHAxisTickLabelsBounds_f1277s$ = function (axisOrientation, stretch, axisSpan, maxHorizontalSpan) {\n var tmp$;\n switch (axisOrientation.name) {\n case 'TOP':\n case 'BOTTOM':\n var leftSpace = axisSpan.lowerEnd - maxHorizontalSpan.lowerEnd + stretch;\n var rightSpace = maxHorizontalSpan.upperEnd - axisSpan.upperEnd + stretch;\n var height = 1.0E42;\n if (equals(axisOrientation, Orientation$TOP_getInstance()))\n tmp$ = -height;\n else\n tmp$ = 0.0;\n var top = tmp$;\n var left = -leftSpace;\n var width = leftSpace + rightSpace + axisSpan.length;\n return DoubleRectangle_init(left, top, width, height);\n default:\n throw IllegalArgumentException_init('Orientation not supported: ' + axisOrientation);\n }\n };\n TileLayoutUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'TileLayoutUtil',\n interfaces: []\n };\n var TileLayoutUtil_instance = null;\n function TileLayoutUtil_getInstance() {\n if (TileLayoutUtil_instance === null) {\n new TileLayoutUtil();\n }\n return TileLayoutUtil_instance;\n }\n function TopDownTileLayout(hAxisLayout, vAxisLayout, hDomain, vDomain, marginsLayout) {\n TopDownTileLayout$Companion_getInstance();\n this.hAxisLayout_0 = hAxisLayout;\n this.vAxisLayout_0 = vAxisLayout;\n this.hDomain_0 = hDomain;\n this.vDomain_0 = vDomain;\n this.marginsLayout_0 = marginsLayout;\n }\n TopDownTileLayout.prototype.doLayout_3twog0$ = function (preferredSize, coordProvider) {\n var geomAreaInsets = TopDownTileLayout$Companion_getInstance().computeAxisInfos_0(this.hAxisLayout_0, this.vAxisLayout_0, preferredSize, this.hDomain_0, this.vDomain_0, this.marginsLayout_0, coordProvider);\n var geomBoundsAfterLayout = TileLayoutUtil_getInstance().geomOuterBounds_sy27u4$(geomAreaInsets, preferredSize, this.hDomain_0, this.vDomain_0, this.marginsLayout_0, coordProvider);\n var tmp$ = to(geomAreaInsets.hAxisInfo, geomAreaInsets.vAxisInfo);\n var hAxisInfo = tmp$.component1()\n , vAxisInfo = tmp$.component2();\n var block$result;\n var hAxisSpan = this.marginsLayout_0.toInnerBounds_wthzt5$(geomBoundsAfterLayout).xRange();\n var maxTickLabelsBounds = TileLayoutUtil_getInstance().maxHAxisTickLabelsBounds_cvaznw$(this.hAxisLayout_0.orientation, 0.0, hAxisSpan, preferredSize);\n var tickLabelsBounds = hAxisInfo.tickLabelsBounds;\n var leftOverflow = maxTickLabelsBounds.left - tickLabelsBounds.left;\n var rightOverflow = tickLabelsBounds.left + tickLabelsBounds.width - maxTickLabelsBounds.right;\n var newX = geomBoundsAfterLayout.left;\n var newW = geomBoundsAfterLayout.width;\n if (leftOverflow > 0) {\n newX = geomBoundsAfterLayout.left + leftOverflow;\n newW = geomBoundsAfterLayout.width - leftOverflow;\n }\n if (rightOverflow > 0) {\n newW = newW - rightOverflow;\n }\n var b = newW;\n newW = JsMath.max(0.0, b);\n var boundsNew = DoubleRectangle_init(newX, geomBoundsAfterLayout.top, newW, geomBoundsAfterLayout.height);\n if (!(boundsNew != null ? boundsNew.equals(geomBoundsAfterLayout) : null)) {\n var sizeNew = coordProvider.adjustGeomSize_3y20zv$(this.hDomain_0, this.vDomain_0, boundsNew.dimension);\n block$result = new DoubleRectangle(boundsNew.origin, sizeNew);\n } else {\n block$result = boundsNew;\n }\n var geomOuterBounds = block$result;\n var geomWithAxisBounds = TopDownTileLayout$Companion_getInstance().tileBounds_0(hAxisInfo.axisBounds(), vAxisInfo.axisBounds(), geomOuterBounds);\n var geomInnerBounds = this.marginsLayout_0.toInnerBounds_wthzt5$(geomOuterBounds);\n var hAxisInfoNew = hAxisInfo.withAxisLength_14dthe$(geomInnerBounds.width);\n var vAxisInfoNew = vAxisInfo.withAxisLength_14dthe$(geomInnerBounds.height);\n return new TileLayoutInfo(DoubleVector.Companion.ZERO, geomWithAxisBounds, geomOuterBounds, geomInnerBounds, hAxisInfoNew, vAxisInfoNew, true, true, void 0, void 0, 0);\n };\n function TopDownTileLayout$Companion() {\n TopDownTileLayout$Companion_instance = this;\n this.AXIS_STRETCH_RATIO_0 = 0.1;\n }\n TopDownTileLayout$Companion.prototype.tileBounds_0 = function (xAxisBounds, yAxisBounds, geomBounds) {\n var leftTop = new DoubleVector(geomBounds.left - yAxisBounds.width, geomBounds.top - TileLayoutUtil_getInstance().GEOM_MARGIN);\n var rightBottom = new DoubleVector(geomBounds.right + TileLayoutUtil_getInstance().GEOM_MARGIN, geomBounds.bottom + xAxisBounds.height);\n return new DoubleRectangle(leftTop, rightBottom.subtract_gpjtzr$(leftTop));\n };\n TopDownTileLayout$Companion.prototype.computeAxisInfos_0 = function (hAxisLayout, vAxisLayout, plotSize, hDomain, vDomain, marginsLayout, coordProvider) {\n var tmp$;\n var insetsInitial = GeomAreaInsets$Companion_getInstance().init_wmnv36$(hAxisLayout, vAxisLayout);\n var geomHeightEstim = marginsLayout.toInnerSize_gpjtzr$(TileLayoutUtil_getInstance().geomOuterBounds_sy27u4$(insetsInitial, plotSize, hDomain, vDomain, marginsLayout, coordProvider).dimension).y;\n var insetsVAxis = insetsInitial.layoutVAxis_3mogjz$(vDomain, geomHeightEstim);\n var plottingArea = TileLayoutUtil_getInstance().geomOuterBounds_sy27u4$(insetsVAxis, plotSize, hDomain, vDomain, marginsLayout, coordProvider);\n var hAxisSpan = marginsLayout.toInnerBounds_wthzt5$(plottingArea).xRange();\n var insetsHVAxis = insetsVAxis.layoutHAxis_g4u3p1$(hDomain, plotSize, hAxisSpan);\n if (insetsHVAxis.hAxisThickness > insetsInitial.hAxisThickness) {\n var geomHeight = marginsLayout.toInnerSize_gpjtzr$(TileLayoutUtil_getInstance().geomOuterBounds_sy27u4$(insetsHVAxis, plotSize, hDomain, vDomain, marginsLayout, coordProvider).dimension).y;\n tmp$ = insetsHVAxis.layoutVAxis_3mogjz$(vDomain, geomHeight);\n } else {\n tmp$ = insetsHVAxis;\n }\n var insetsFinal = tmp$;\n return insetsFinal;\n };\n TopDownTileLayout$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var TopDownTileLayout$Companion_instance = null;\n function TopDownTileLayout$Companion_getInstance() {\n if (TopDownTileLayout$Companion_instance === null) {\n new TopDownTileLayout$Companion();\n }\n return TopDownTileLayout$Companion_instance;\n }\n TopDownTileLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TopDownTileLayout',\n interfaces: [TileLayout]\n };\n function GeomAreaInsets(left, top, right, bottom, hAxisLayout, vAxisLayout, _hAxisInfo, _vAxisInfo) {\n GeomAreaInsets$Companion_getInstance();\n Insets.call(this, left, top, right, bottom);\n this.hAxisLayout_0 = hAxisLayout;\n this.vAxisLayout_0 = vAxisLayout;\n this._hAxisInfo_0 = _hAxisInfo;\n this._vAxisInfo_0 = _vAxisInfo;\n }\n Object.defineProperty(GeomAreaInsets.prototype, 'hAxisThickness', {\n configurable: true,\n get: function () {\n var tmp$;\n tmp$ = this.hAxisLayout_0.orientation === Orientation$TOP_getInstance();\n if (tmp$ === true)\n return this.top;\n else if (tmp$ === false)\n return this.bottom;\n else\n return Kotlin.noWhenBranchMatched();\n }\n });\n Object.defineProperty(GeomAreaInsets.prototype, 'vAxisThickness', {\n configurable: true,\n get: function () {\n var tmp$;\n tmp$ = this.vAxisLayout_0.orientation === Orientation$LEFT_getInstance();\n if (tmp$ === true)\n return this.left;\n else if (tmp$ === false)\n return this.right;\n else\n return Kotlin.noWhenBranchMatched();\n }\n });\n Object.defineProperty(GeomAreaInsets.prototype, 'hAxisInfo', {\n configurable: true,\n get: function () {\n var tmp$;\n tmp$ = this._hAxisInfo_0;\n if (tmp$ == null) {\n throw IllegalStateException_init('Horizontal axis is not layouted');\n }\n return tmp$;\n }\n });\n Object.defineProperty(GeomAreaInsets.prototype, 'vAxisInfo', {\n configurable: true,\n get: function () {\n var tmp$;\n tmp$ = this._vAxisInfo_0;\n if (tmp$ == null) {\n throw IllegalStateException_init('Vertical axis is not layouted');\n }\n return tmp$;\n }\n });\n GeomAreaInsets.prototype.subtractFrom_wthzt5$ = function (r) {\n var r_0 = Insets.prototype.subtractFrom_wthzt5$.call(this, r);\n var tmp$ = r_0.origin;\n var a = r_0.width;\n var b = TileLayoutUtil_getInstance().GEOM_MIN_SIZE.x;\n var tmp$_0 = JsMath.max(a, b);\n var a_0 = r_0.height;\n var b_0 = TileLayoutUtil_getInstance().GEOM_MIN_SIZE.y;\n return new DoubleRectangle(tmp$, new DoubleVector(tmp$_0, JsMath.max(a_0, b_0)));\n };\n GeomAreaInsets.prototype.layoutHAxis_g4u3p1$ = function (axisDomain, plotSize, axisSpan) {\n var axisLength = axisSpan.length;\n var stretch = axisLength * GeomAreaInsets$Companion_getInstance().AXIS_STRETCH_RATIO_0;\n var maxTickLabelsBounds = TileLayoutUtil_getInstance().maxHAxisTickLabelsBounds_cvaznw$(this.hAxisLayout_0.orientation, stretch, axisSpan, plotSize);\n var info = this.hAxisLayout_0.doLayout_5wdni1$(axisDomain, axisLength, maxTickLabelsBounds);\n return new GeomAreaInsets(this.left, this.hAxisLayout_0.orientation === Orientation$TOP_getInstance() ? info.axisBounds().height : this.top, this.right, this.hAxisLayout_0.orientation === Orientation$BOTTOM_getInstance() ? info.axisBounds().height : this.bottom, this.hAxisLayout_0, this.vAxisLayout_0, info, this._vAxisInfo_0);\n };\n GeomAreaInsets.prototype.layoutVAxis_3mogjz$ = function (axisDomain, axisLength) {\n var info = this.vAxisLayout_0.doLayout_5wdni1$(axisDomain, axisLength, null);\n return new GeomAreaInsets(this.vAxisLayout_0.orientation === Orientation$LEFT_getInstance() ? info.axisBounds().width : this.left, this.top, this.vAxisLayout_0.orientation === Orientation$RIGHT_getInstance() ? info.axisBounds().width : this.right, this.bottom, this.hAxisLayout_0, this.vAxisLayout_0, this._hAxisInfo_0, info);\n };\n function GeomAreaInsets$Companion() {\n GeomAreaInsets$Companion_instance = this;\n this.AXIS_STRETCH_RATIO_0 = 0.1;\n }\n GeomAreaInsets$Companion.prototype.init_wmnv36$ = function (hAxisLayout, vAxisLayout) {\n return new GeomAreaInsets(vAxisLayout.orientation === Orientation$LEFT_getInstance() ? vAxisLayout.initialThickness() : TileLayoutUtil_getInstance().GEOM_MARGIN, hAxisLayout.orientation === Orientation$TOP_getInstance() ? hAxisLayout.initialThickness() : TileLayoutUtil_getInstance().GEOM_MARGIN, vAxisLayout.orientation === Orientation$RIGHT_getInstance() ? vAxisLayout.initialThickness() : TileLayoutUtil_getInstance().GEOM_MARGIN, hAxisLayout.orientation === Orientation$BOTTOM_getInstance() ? hAxisLayout.initialThickness() : TileLayoutUtil_getInstance().GEOM_MARGIN, hAxisLayout, vAxisLayout, null, null);\n };\n GeomAreaInsets$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var GeomAreaInsets$Companion_instance = null;\n function GeomAreaInsets$Companion_getInstance() {\n if (GeomAreaInsets$Companion_instance === null) {\n new GeomAreaInsets$Companion();\n }\n return GeomAreaInsets$Companion_instance;\n }\n GeomAreaInsets.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GeomAreaInsets',\n interfaces: [Insets]\n };\n function Insets(left, top, right, bottom) {\n this.left = left;\n this.top = top;\n this.right = right;\n this.bottom = bottom;\n }\n Insets.prototype.subtractFrom_wthzt5$ = function (r) {\n var leftTop = new DoubleVector(this.left, this.top);\n var rightBottom = new DoubleVector(this.right, this.bottom);\n var size = r.dimension.subtract_gpjtzr$(leftTop).subtract_gpjtzr$(rightBottom);\n return new DoubleRectangle(r.origin.add_gpjtzr$(leftTop), size);\n };\n Insets.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'Insets',\n interfaces: []\n };\n function DefaultFontFamilyRegistry(defaultWidthFactor) {\n if (defaultWidthFactor === void 0)\n defaultWidthFactor = 1.0;\n this.defaultWidthFactor_0 = defaultWidthFactor;\n this.familyByName_0 = HashMap_init();\n this.put_h6gg2f$('monospace', true);\n this.put_h6gg2f$('Courier', true);\n this.put_h6gg2f$('Consolas', true);\n this.put_h6gg2f$('Fixed', true);\n this.put_h6gg2f$('Fixedsys', true);\n this.put_h6gg2f$('FreeMono', true);\n this.put_h6gg2f$('Lucida Console', true);\n this.put_h6gg2f$('Monaco', true);\n this.put_h6gg2f$('Monofur', true);\n this.put_h6gg2f$('OCR-A', true);\n this.put_h6gg2f$('OCR-B', true);\n this.put_h6gg2f$('Source Code Pro', true);\n }\n DefaultFontFamilyRegistry.prototype.get_61zpoe$ = function (name) {\n var tmp$;\n var key = trim(Kotlin.isCharSequence(tmp$ = name) ? tmp$ : throwCCE()).toString().toLowerCase();\n var $receiver = this.familyByName_0;\n var tmp$_0;\n var value = $receiver.get_11rb$(key);\n if (value == null) {\n var answer = this.guessFamily_0(name);\n $receiver.put_xwzc9p$(key, answer);\n tmp$_0 = answer;\n } else {\n tmp$_0 = value;\n }\n return tmp$_0;\n };\n DefaultFontFamilyRegistry.prototype.put_h6gg2f$ = function (name, isMonospased, widthFactor) {\n if (isMonospased === void 0)\n isMonospased = null;\n if (widthFactor === void 0)\n widthFactor = null;\n var tmp$, tmp$_0;\n var tmp$_1;\n var key = trim(Kotlin.isCharSequence(tmp$_1 = name) ? tmp$_1 : throwCCE()).toString().toLowerCase();\n var wasFamily = this.familyByName_0.get_11rb$(key);\n var nowMonospaced = (tmp$ = isMonospased != null ? isMonospased : wasFamily != null ? wasFamily.monospaced : null) != null ? tmp$ : false;\n var nowWidthFactor = (tmp$_0 = widthFactor != null ? widthFactor : wasFamily != null ? wasFamily.widthFactor : null) != null ? tmp$_0 : this.defaultWidthFactor_0;\n var $receiver = this.familyByName_0;\n var value = new FontFamily(name, nowMonospaced, nowWidthFactor);\n $receiver.put_xwzc9p$(key, value);\n };\n DefaultFontFamilyRegistry.prototype.guessFamily_0 = function (name) {\n var tmp$;\n var monospaced = endsWith(trim(Kotlin.isCharSequence(tmp$ = name) ? tmp$ : throwCCE()).toString().toLowerCase(), ' mono');\n return new FontFamily(name, monospaced, this.defaultWidthFactor_0);\n };\n DefaultFontFamilyRegistry.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'DefaultFontFamilyRegistry',\n interfaces: [FontFamilyRegistry]\n };\n function Defaults() {\n Defaults_instance = this;\n this.ASPECT_RATIO = 3.0 / 2.0;\n this.MIN_PLOT_WIDTH = 50.0;\n this.DEF_PLOT_WIDTH = 600.0;\n this.DEF_LIVE_MAP_WIDTH = 800.0;\n this.DEF_PLOT_SIZE = new DoubleVector(this.DEF_PLOT_WIDTH, this.DEF_PLOT_WIDTH / this.ASPECT_RATIO);\n this.DEF_LIVE_MAP_SIZE = new DoubleVector(this.DEF_LIVE_MAP_WIDTH, this.DEF_LIVE_MAP_WIDTH / this.ASPECT_RATIO);\n this.DARK_GRAY = '#3d3d3d';\n this.GRAY = Color.Companion.GRAY.toHexColor();\n this.LIGHT_GRAY = Color.Companion.LIGHT_GRAY.toHexColor();\n this.X_LIGHT_GRAY = Color.Companion.VERY_LIGHT_GRAY.toHexColor();\n this.XX_LIGHT_GRAY = '#e0e0e0';\n this.TEXT_COLOR = Color.Companion.parseHex_61zpoe$(this.DARK_GRAY);\n this.FONT_LARGE = 16.0;\n this.FONT_MEDIUM = 15.0;\n this.FONT_SMALL = 13.0;\n this.FONT_FAMILY_NORMAL = '\"Lucida Grande\", sans-serif';\n var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3, tmp$_4, tmp$_5, tmp$_6, tmp$_7, tmp$_8, tmp$_9, tmp$_10, tmp$_11;\n tmp$_0 = Style_getInstance().PLOT_TITLE;\n tmp$ = Defaults$Common$Title_getInstance().FONT_SIZE;\n tmp$_1 = to(tmp$_0, this.createTextStyle_0(FontFace.Companion.BOLD, tmp$));\n tmp$_2 = to(Style_getInstance().PLOT_SUBTITLE, this.createTextStyle_0(void 0, Defaults$Common$Subtitle_getInstance().FONT_SIZE));\n tmp$_3 = to(Style_getInstance().PLOT_CAPTION, this.createTextStyle_0(void 0, Defaults$Common$Caption_getInstance().FONT_SIZE));\n tmp$_4 = to(Style_getInstance().LEGEND_TITLE, this.createTextStyle_0(void 0, Defaults$Common$Legend_getInstance().TITLE_FONT_SIZE));\n tmp$_5 = to(Style_getInstance().LEGEND_ITEM, this.createTextStyle_0(void 0, Defaults$Common$Legend_getInstance().ITEM_FONT_SIZE));\n tmp$_6 = to(Style_getInstance().TOOLTIP_TEXT, this.createTextStyle_0(void 0, Defaults$Common$Tooltip_getInstance().DATA_TOOLTIP_FONT_SIZE));\n tmp$_8 = Style_getInstance().TOOLTIP_TITLE;\n tmp$_7 = Defaults$Common$Tooltip_getInstance().DATA_TOOLTIP_FONT_SIZE;\n tmp$_9 = to(tmp$_8, this.createTextStyle_0(FontFace.Companion.BOLD, tmp$_7));\n tmp$_11 = Style_getInstance().TOOLTIP_LABEL;\n tmp$_10 = Defaults$Common$Tooltip_getInstance().DATA_TOOLTIP_FONT_SIZE;\n this.DEFAULT_TEXT_STYLES_8be2vx$ = mapOf([tmp$_1, tmp$_2, tmp$_3, tmp$_4, tmp$_5, tmp$_6, tmp$_9, to(tmp$_11, this.createTextStyle_0(FontFace.Companion.BOLD, tmp$_10)), to('axis-title-x', this.createTextStyle_0(void 0, Defaults$Plot$Axis_getInstance().TITLE_FONT_SIZE)), to('axis-title-y', this.createTextStyle_0(void 0, Defaults$Plot$Axis_getInstance().TITLE_FONT_SIZE)), to('axis-text-x', this.createTextStyle_0(void 0, Defaults$Plot$Axis_getInstance().TICK_FONT_SIZE)), to('axis-text-y', this.createTextStyle_0(void 0, Defaults$Plot$Axis_getInstance().TICK_FONT_SIZE)), to('axis-tooltip-text-x', this.createTextStyle_0(void 0, Defaults$Common$Tooltip_getInstance().AXIS_TOOLTIP_FONT_SIZE, Color.Companion.WHITE)), to('axis-tooltip-text-y', this.createTextStyle_0(void 0, Defaults$Common$Tooltip_getInstance().AXIS_TOOLTIP_FONT_SIZE, Color.Companion.WHITE)), to('facet-strip-text-x', this.createTextStyle_0(void 0, this.FONT_MEDIUM)), to('facet-strip-text-y', this.createTextStyle_0(void 0, this.FONT_MEDIUM))]);\n }\n function Defaults$Common() {\n }\n function Defaults$Common$Title() {\n Defaults$Common$Title_instance = this;\n this.FONT_SIZE = Defaults_getInstance().FONT_LARGE;\n this.FONT_SIZE_CSS = '' + toString(this.FONT_SIZE) + 'px';\n }\n Defaults$Common$Title.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Title',\n interfaces: []\n };\n var Defaults$Common$Title_instance = null;\n function Defaults$Common$Title_getInstance() {\n if (Defaults$Common$Title_instance === null) {\n new Defaults$Common$Title();\n }\n return Defaults$Common$Title_instance;\n }\n function Defaults$Common$Subtitle() {\n Defaults$Common$Subtitle_instance = this;\n this.FONT_SIZE = Defaults_getInstance().FONT_MEDIUM;\n this.FONT_SIZE_CSS = '' + toString(this.FONT_SIZE) + 'px';\n }\n Defaults$Common$Subtitle.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Subtitle',\n interfaces: []\n };\n var Defaults$Common$Subtitle_instance = null;\n function Defaults$Common$Subtitle_getInstance() {\n if (Defaults$Common$Subtitle_instance === null) {\n new Defaults$Common$Subtitle();\n }\n return Defaults$Common$Subtitle_instance;\n }\n function Defaults$Common$Caption() {\n Defaults$Common$Caption_instance = this;\n this.FONT_SIZE = Defaults_getInstance().FONT_SMALL;\n this.FONT_SIZE_CSS = '' + toString(this.FONT_SIZE) + 'px';\n }\n Defaults$Common$Caption.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Caption',\n interfaces: []\n };\n var Defaults$Common$Caption_instance = null;\n function Defaults$Common$Caption_getInstance() {\n if (Defaults$Common$Caption_instance === null) {\n new Defaults$Common$Caption();\n }\n return Defaults$Common$Caption_instance;\n }\n function Defaults$Common$Legend() {\n Defaults$Common$Legend_instance = this;\n this.TITLE_FONT_SIZE = Defaults_getInstance().FONT_MEDIUM;\n this.ITEM_FONT_SIZE = Defaults_getInstance().FONT_SMALL;\n }\n Defaults$Common$Legend.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Legend',\n interfaces: []\n };\n var Defaults$Common$Legend_instance = null;\n function Defaults$Common$Legend_getInstance() {\n if (Defaults$Common$Legend_instance === null) {\n new Defaults$Common$Legend();\n }\n return Defaults$Common$Legend_instance;\n }\n function Defaults$Common$Tooltip() {\n Defaults$Common$Tooltip_instance = this;\n this.MAX_POINTER_FOOTING_LENGTH = 12.0;\n this.POINTER_FOOTING_TO_SIDE_LENGTH_RATIO = 0.4;\n this.MARGIN_BETWEEN_TOOLTIPS = 5.0;\n this.DATA_TOOLTIP_FONT_SIZE = Defaults_getInstance().FONT_SMALL;\n this.LINE_INTERVAL = 6.0;\n this.INTERVAL_BETWEEN_SUBSTRINGS = 3.0;\n this.H_CONTENT_PADDING = 6.0;\n this.V_CONTENT_PADDING = 6.0;\n this.CONTENT_EXTENDED_PADDING = 10.0;\n this.LABEL_VALUE_INTERVAL = 8.0;\n this.VALUE_LINE_MAX_LENGTH = 30;\n this.LINE_SEPARATOR_WIDTH = 0.7;\n this.BORDER_RADIUS = 4.0;\n this.COLOR_BAR_WIDTH = 4.0;\n this.COLOR_BAR_STROKE_WIDTH = 1.5;\n this.DARK_TEXT_COLOR = Color.Companion.BLACK;\n this.LIGHT_TEXT_COLOR = Color.Companion.WHITE;\n this.AXIS_TOOLTIP_FONT_SIZE = Defaults$Plot$Axis_getInstance().TICK_FONT_SIZE;\n this.AXIS_TOOLTIP_COLOR = Defaults$Plot$Axis_getInstance().LINE_COLOR;\n this.AXIS_RADIUS = 1.5;\n this.ROTATION_ANGLE = 15.0;\n }\n Defaults$Common$Tooltip.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Tooltip',\n interfaces: []\n };\n var Defaults$Common$Tooltip_instance = null;\n function Defaults$Common$Tooltip_getInstance() {\n if (Defaults$Common$Tooltip_instance === null) {\n new Defaults$Common$Tooltip();\n }\n return Defaults$Common$Tooltip_instance;\n }\n Defaults$Common.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'Common',\n interfaces: []\n };\n function Defaults$Plot() {\n }\n function Defaults$Plot$Axis() {\n Defaults$Plot$Axis_instance = this;\n this.TITLE_FONT_SIZE = Defaults_getInstance().FONT_MEDIUM;\n this.TICK_FONT_SIZE = Defaults_getInstance().FONT_SMALL;\n this.LINE_COLOR = Color.Companion.parseHex_61zpoe$(Defaults_getInstance().DARK_GRAY);\n }\n Defaults$Plot$Axis.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Axis',\n interfaces: []\n };\n var Defaults$Plot$Axis_instance = null;\n function Defaults$Plot$Axis_getInstance() {\n if (Defaults$Plot$Axis_instance === null) {\n new Defaults$Plot$Axis();\n }\n return Defaults$Plot$Axis_instance;\n }\n Defaults$Plot.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'Plot',\n interfaces: []\n };\n Defaults.prototype.createTextStyle_0 = function (face, size, color) {\n if (face === void 0)\n face = FontFace.Companion.NORMAL;\n if (size === void 0)\n size = this.FONT_MEDIUM;\n if (color === void 0)\n color = Color.Companion.BLACK;\n return new TextStyle(this.FONT_FAMILY_NORMAL, face, size, color);\n };\n Defaults.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Defaults',\n interfaces: []\n };\n var Defaults_instance = null;\n function Defaults_getInstance() {\n if (Defaults_instance === null) {\n new Defaults();\n }\n return Defaults_instance;\n }\n function FontFamilyRegistry() {\n }\n FontFamilyRegistry.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'FontFamilyRegistry',\n interfaces: []\n };\n function LabelSpec() {\n }\n LabelSpec.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'LabelSpec',\n interfaces: []\n };\n function PlotLabelSpec(font) {\n PlotLabelSpec$Companion_getInstance();\n this.font_dkwnk1$_0 = font;\n }\n Object.defineProperty(PlotLabelSpec.prototype, 'font', {\n get: function () {\n return this.font_dkwnk1$_0;\n }\n });\n PlotLabelSpec.prototype.dimensions_61zpoe$ = function (labelText) {\n return new DoubleVector(this.width_61zpoe$(labelText), this.height());\n };\n PlotLabelSpec.prototype.width_61zpoe$ = function (labelText) {\n var tmp$;\n if (this.font.isMonospased) {\n tmp$ = this.monospacedWidth_0(labelText.length);\n } else {\n tmp$ = PlotLabelSpec$Companion_getInstance().FONT_WIDTH_SCALE_FACTOR_0 * TextWidthEstimator_getInstance().textWidth_d91ba$(labelText, this.font);\n }\n return tmp$ * this.font.family.widthFactor;\n };\n PlotLabelSpec.prototype.monospacedWidth_0 = function (labelLength) {\n var tmp$;\n var ratio = PlotLabelSpec$Companion_getInstance().FONT_SIZE_TO_GLYPH_WIDTH_RATIO_MONOSPACED_0;\n var width = labelLength * this.font.size * ratio + 2 * PlotLabelSpec$Companion_getInstance().LABEL_PADDING_0;\n if (this.font.isBold) {\n tmp$ = width * PlotLabelSpec$Companion_getInstance().FONT_WEIGHT_BOLD_TO_NORMAL_WIDTH_RATIO_0;\n } else {\n tmp$ = width;\n }\n return tmp$;\n };\n PlotLabelSpec.prototype.height = function () {\n return this.font.size + 2 * PlotLabelSpec$Companion_getInstance().LABEL_PADDING_0;\n };\n function PlotLabelSpec$Companion() {\n PlotLabelSpec$Companion_instance = this;\n this.FONT_SIZE_TO_GLYPH_WIDTH_RATIO_0 = 0.67;\n this.FONT_SIZE_TO_GLYPH_WIDTH_RATIO_MONOSPACED_0 = 0.6;\n this.FONT_WEIGHT_BOLD_TO_NORMAL_WIDTH_RATIO_0 = 1.075;\n this.LABEL_PADDING_0 = 0.0;\n this.FONT_WIDTH_SCALE_FACTOR_0 = 0.85026;\n this.DUMMY = new PlotLabelSpec$Companion$DUMMY$ObjectLiteral();\n }\n function PlotLabelSpec$Companion$DUMMY$ObjectLiteral() {\n }\n Object.defineProperty(PlotLabelSpec$Companion$DUMMY$ObjectLiteral.prototype, 'font', {\n configurable: true,\n get: function () {\n return UNSUPPORTED('Dummy Label Spec');\n }\n });\n PlotLabelSpec$Companion$DUMMY$ObjectLiteral.prototype.dimensions_61zpoe$ = function (labelText) {\n UNSUPPORTED('Dummy Label Spec');\n };\n PlotLabelSpec$Companion$DUMMY$ObjectLiteral.prototype.width_61zpoe$ = function (labelText) {\n UNSUPPORTED('Dummy Label Spec');\n };\n PlotLabelSpec$Companion$DUMMY$ObjectLiteral.prototype.height = function () {\n UNSUPPORTED('Dummy Label Spec');\n };\n PlotLabelSpec$Companion$DUMMY$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [LabelSpec]\n };\n PlotLabelSpec$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var PlotLabelSpec$Companion_instance = null;\n function PlotLabelSpec$Companion_getInstance() {\n if (PlotLabelSpec$Companion_instance === null) {\n new PlotLabelSpec$Companion();\n }\n return PlotLabelSpec$Companion_instance;\n }\n PlotLabelSpec.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PlotLabelSpec',\n interfaces: [LabelSpec]\n };\n function Style() {\n Style_instance = this;\n this.PLOT_CONTAINER = 'plt-container';\n this.PLOT_TITLE = 'plot-title';\n this.PLOT_SUBTITLE = 'plot-subtitle';\n this.PLOT_CAPTION = 'plot-caption';\n this.AXIS_TITLE = 'axis-title';\n this.AXIS_TEXT = 'axis-text';\n this.LEGEND_TITLE = 'legend-title';\n this.LEGEND_ITEM = 'legend-item';\n this.TOOLTIP_TEXT = 'tooltip-text';\n this.TOOLTIP_TITLE = 'tooltip-title';\n this.TOOLTIP_LABEL = 'tooltip-label';\n this.AXIS_TOOLTIP_TEXT = 'axis-tooltip-text';\n this.FACET_STRIP_TEXT = 'facet-strip-text';\n this.CSS_0 = trimMargin('\\n' + ' |.' + this.PLOT_CONTAINER + ' {' + '\\n' + ' | font-family: ' + Defaults_getInstance().FONT_FAMILY_NORMAL + ';' + '\\n' + ' | user-select: none;' + '\\n' + ' | -webkit-user-select: none;' + '\\n' + ' | -moz-user-select: none;' + '\\n' + ' | -ms-user-select: none;' + '\\n' + ' |}' + '\\n' + ' |text {' + '\\n' + ' | fill: ' + StyleSheet.Companion.UNDEFINED_FONT_COLOR.toHexColor() + ';' + '\\n' + ' | ' + StyleSheet.Companion.toCSS_t8jpc2$(StyleSheet.Companion.UNDEFINED_FONT_FACE) + ' ' + '\\n' + ' |' + '\\n' + ' | text-rendering: optimizeLegibility;' + '\\n' + ' |}' + '\\n' + ' ');\n }\n Style.prototype.generateCSS_kgh34e$ = function (styleSheet, plotId, decorationLayerId) {\n var css = new StringBuilder(this.CSS_0);\n css.append_s8itvh$(10);\n var tmp$;\n tmp$ = styleSheet.getClasses().iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n var tmp$_0;\n switch (element) {\n case 'tooltip-text':\n case 'tooltip-title':\n case 'tooltip-label':\n case 'axis-tooltip-text-x':\n case 'axis-tooltip-text-y':\n tmp$_0 = decorationLayerId;\n break;\n default:\n tmp$_0 = plotId;\n break;\n }\n var id = tmp$_0;\n css.append_pdl1vj$(styleSheet.toCSS_jyasbz$(element, id));\n }\n return css.toString();\n };\n Style.prototype.default = function () {\n return new StyleSheet(Defaults_getInstance().DEFAULT_TEXT_STYLES_8be2vx$, Defaults_getInstance().FONT_FAMILY_NORMAL);\n };\n function Style$fromTheme$ts(themeStyle) {\n return new TextStyle(themeStyle.family.name, themeStyle.face, themeStyle.size, themeStyle.color);\n }\n Style.prototype.fromTheme_1crrl9$ = function (theme, flippedAxis) {\n var hAxisTheme = theme.horizontalAxis_6taknv$(flippedAxis);\n var hAxisName = flippedAxis ? 'y' : 'x';\n var vAxisTheme = theme.verticalAxis_6taknv$(flippedAxis);\n var vAxisName = flippedAxis ? 'x' : 'y';\n var ts = Style$fromTheme$ts;\n var textStyles = mapOf([to(this.PLOT_TITLE, ts(theme.plot().titleStyle())), to(this.PLOT_SUBTITLE, ts(theme.plot().subtitleStyle())), to(this.PLOT_CAPTION, ts(theme.plot().captionStyle())), to(this.LEGEND_TITLE, ts(theme.legend().titleStyle())), to(this.LEGEND_ITEM, ts(theme.legend().textStyle())), to(this.AXIS_TITLE + '-' + hAxisName, ts(hAxisTheme.titleStyle())), to(this.AXIS_TEXT + '-' + hAxisName, ts(hAxisTheme.labelStyle())), to(this.AXIS_TOOLTIP_TEXT + '-' + hAxisName, ts(hAxisTheme.tooltipTextStyle())), to(this.AXIS_TITLE + '-' + vAxisName, ts(vAxisTheme.titleStyle())), to(this.AXIS_TEXT + '-' + vAxisName, ts(vAxisTheme.labelStyle())), to(this.AXIS_TOOLTIP_TEXT + '-' + vAxisName, ts(vAxisTheme.tooltipTextStyle())), to('facet-strip-text-x', ts(theme.facets().stripTextStyle())), to('facet-strip-text-y', ts(theme.facets().stripTextStyle())), to(this.TOOLTIP_TEXT, ts(theme.tooltips().textStyle())), to(this.TOOLTIP_TITLE, ts(theme.tooltips().titleStyle())), to(this.TOOLTIP_LABEL, ts(theme.tooltips().labelStyle()))]);\n return new StyleSheet(textStyles, Defaults_getInstance().FONT_FAMILY_NORMAL);\n };\n Style.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Style',\n interfaces: []\n };\n var Style_instance = null;\n function Style_getInstance() {\n if (Style_instance === null) {\n new Style();\n }\n return Style_instance;\n }\n function TextWidthEstimator() {\n TextWidthEstimator_instance = this;\n this.DEFAULT_CHAR_WIDTH_0 = 12.327791262135923;\n this.DEFAULT_FAMILY_0 = 'Lucida Grande';\n this.DEFAULT_FONT_SIZE_0 = 14;\n this.MISCLASSIFIED_0 = listOf_0([toBoxedChar(45), toBoxedChar(47), toBoxedChar(92), toBoxedChar(124)]);\n this.CLUSTERS_0 = listOf_0([listOf_0([toBoxedChar(32), toBoxedChar(184), toBoxedChar(183), toBoxedChar(341), toBoxedChar(180), toBoxedChar(179), toBoxedChar(178), toBoxedChar(343), toBoxedChar(176), toBoxedChar(345), toBoxedChar(170), toBoxedChar(168), toBoxedChar(166), toBoxedChar(185), toBoxedChar(355), toBoxedChar(123), toBoxedChar(357), toBoxedChar(359), toBoxedChar(116), toBoxedChar(114), toBoxedChar(108), toBoxedChar(106), toBoxedChar(105), toBoxedChar(102), toBoxedChar(96), toBoxedChar(93), toBoxedChar(125), toBoxedChar(186), toBoxedChar(1110), toBoxedChar(239), toBoxedChar(238), toBoxedChar(237), toBoxedChar(236), toBoxedChar(296), toBoxedChar(297), toBoxedChar(298), toBoxedChar(299), toBoxedChar(300), toBoxedChar(301), toBoxedChar(302), toBoxedChar(303), toBoxedChar(1107), toBoxedChar(304), toBoxedChar(309), toBoxedChar(314), toBoxedChar(316), toBoxedChar(318), toBoxedChar(320), toBoxedChar(322), toBoxedChar(207), toBoxedChar(206), toBoxedChar(205), toBoxedChar(204), toBoxedChar(1112), toBoxedChar(1111), toBoxedChar(305), toBoxedChar(91), toBoxedChar(161), toBoxedChar(44), toBoxedChar(46), toBoxedChar(73), toBoxedChar(41), toBoxedChar(40), toBoxedChar(39), toBoxedChar(1031), toBoxedChar(1030), toBoxedChar(34), toBoxedChar(33), toBoxedChar(74), toBoxedChar(1075), toBoxedChar(539), toBoxedChar(58), toBoxedChar(567), toBoxedChar(383), toBoxedChar(59)]), plus(this.MISCLASSIFIED_0, listOf_0([toBoxedChar(463), toBoxedChar(328), toBoxedChar(311), toBoxedChar(326), toBoxedChar(312), toBoxedChar(1118), toBoxedChar(313), toBoxedChar(523), toBoxedChar(315), toBoxedChar(529), toBoxedChar(317), toBoxedChar(324), toBoxedChar(1119), toBoxedChar(449), toBoxedChar(451), toBoxedChar(319), toBoxedChar(464), toBoxedChar(321), toBoxedChar(537), toBoxedChar(531), toBoxedChar(1080), toBoxedChar(307), toBoxedChar(263), toBoxedChar(1171), toBoxedChar(265), toBoxedChar(267), toBoxedChar(1169), toBoxedChar(269), toBoxedChar(1168), toBoxedChar(273), toBoxedChar(275), toBoxedChar(277), toBoxedChar(279), toBoxedChar(1160), toBoxedChar(281), toBoxedChar(283), toBoxedChar(285), toBoxedChar(287), toBoxedChar(289), toBoxedChar(496), toBoxedChar(507), toBoxedChar(291), toBoxedChar(293), toBoxedChar(295), toBoxedChar(511), toBoxedChar(520), toBoxedChar(521), toBoxedChar(522), toBoxedChar(1116), toBoxedChar(308), toBoxedChar(1115), toBoxedChar(335), toBoxedChar(448), toBoxedChar(1094), toBoxedChar(1072), toBoxedChar(1093), toBoxedChar(361), toBoxedChar(1091), toBoxedChar(1073), toBoxedChar(363), toBoxedChar(1074), toBoxedChar(1090), toBoxedChar(365), toBoxedChar(1089), toBoxedChar(367), toBoxedChar(1088), toBoxedChar(369), toBoxedChar(1076), toBoxedChar(1077), toBoxedChar(1087), toBoxedChar(371), toBoxedChar(1079), toBoxedChar(1086), toBoxedChar(1085), toBoxedChar(375), toBoxedChar(1083), toBoxedChar(1082), toBoxedChar(378), toBoxedChar(1081), toBoxedChar(382), toBoxedChar(402), toBoxedChar(331), toBoxedChar(1047), toBoxedChar(407), toBoxedChar(333), toBoxedChar(380), toBoxedChar(337), toBoxedChar(1109), toBoxedChar(1108), toBoxedChar(564), toBoxedChar(566), toBoxedChar(585), toBoxedChar(429), toBoxedChar(427), toBoxedChar(1106), toBoxedChar(426), toBoxedChar(589), toBoxedChar(1027), toBoxedChar(1105), toBoxedChar(1032), toBoxedChar(347), toBoxedChar(1103), toBoxedChar(1043), toBoxedChar(349), toBoxedChar(1101), toBoxedChar(351), toBoxedChar(1100), toBoxedChar(353), toBoxedChar(410), toBoxedChar(261), toBoxedChar(1095), toBoxedChar(406), toBoxedChar(259), toBoxedChar(1161), toBoxedChar(57), toBoxedChar(163), toBoxedChar(164), toBoxedChar(165), toBoxedChar(167), toBoxedChar(171), toBoxedChar(175), toBoxedChar(177), toBoxedChar(181), toBoxedChar(182), toBoxedChar(162), toBoxedChar(187), toBoxedChar(191), toBoxedChar(56), toBoxedChar(1216), toBoxedChar(55), toBoxedChar(54), toBoxedChar(53), toBoxedChar(1197), toBoxedChar(52), toBoxedChar(51), toBoxedChar(1231), toBoxedChar(122), toBoxedChar(121), toBoxedChar(120), toBoxedChar(1271), toBoxedChar(1275), toBoxedChar(70), toBoxedChar(63), toBoxedChar(94), toBoxedChar(95), toBoxedChar(97), toBoxedChar(98), toBoxedChar(99), toBoxedChar(100), toBoxedChar(101), toBoxedChar(103), toBoxedChar(104), toBoxedChar(107), toBoxedChar(110), toBoxedChar(111), toBoxedChar(112), toBoxedChar(113), toBoxedChar(115), toBoxedChar(117), toBoxedChar(118), toBoxedChar(50), toBoxedChar(49), toBoxedChar(76), toBoxedChar(243), toBoxedChar(233), toBoxedChar(234), toBoxedChar(42), toBoxedChar(235), toBoxedChar(255), toBoxedChar(240), toBoxedChar(241), toBoxedChar(254), toBoxedChar(242), toBoxedChar(232), toBoxedChar(253), toBoxedChar(1181), toBoxedChar(251), toBoxedChar(244), toBoxedChar(245), toBoxedChar(246), toBoxedChar(250), toBoxedChar(247), toBoxedChar(36), toBoxedChar(248), toBoxedChar(252), toBoxedChar(231), toBoxedChar(249), toBoxedChar(223), toBoxedChar(257), toBoxedChar(48), toBoxedChar(229), toBoxedChar(227), toBoxedChar(228), toBoxedChar(1179), toBoxedChar(224), toBoxedChar(226), toBoxedChar(225)])), listOf_0([toBoxedChar(1325), toBoxedChar(1040), toBoxedChar(1041), toBoxedChar(1025), toBoxedChar(1042), toBoxedChar(1277), toBoxedChar(494), toBoxedChar(501), toBoxedChar(576), toBoxedChar(1038), toBoxedChar(577), toBoxedChar(1279), toBoxedChar(591), toBoxedChar(1287), toBoxedChar(1281), toBoxedChar(1293), toBoxedChar(505), toBoxedChar(587), toBoxedChar(1036), toBoxedChar(1028), toBoxedChar(1280), toBoxedChar(1297), toBoxedChar(495), toBoxedChar(584), toBoxedChar(583), toBoxedChar(578), toBoxedChar(1029), toBoxedChar(1296), toBoxedChar(527), toBoxedChar(575), toBoxedChar(553), toBoxedChar(551), toBoxedChar(549), toBoxedChar(548), toBoxedChar(547), toBoxedChar(546), toBoxedChar(1044), toBoxedChar(543), toBoxedChar(540), toBoxedChar(538), toBoxedChar(536), toBoxedChar(535), toBoxedChar(533), toBoxedChar(525), toBoxedChar(541), toBoxedChar(555), toBoxedChar(557), toBoxedChar(559), toBoxedChar(1321), toBoxedChar(574), toBoxedChar(513), toBoxedChar(515), toBoxedChar(573), toBoxedChar(572), toBoxedChar(517), toBoxedChar(519), toBoxedChar(1299), toBoxedChar(1319), toBoxedChar(1307), toBoxedChar(1311), toBoxedChar(563), toBoxedChar(1317), toBoxedChar(561), toBoxedChar(506), toBoxedChar(1176), toBoxedChar(1084), toBoxedChar(1274), toBoxedChar(1187), toBoxedChar(1193), toBoxedChar(1195), toBoxedChar(1196), toBoxedChar(1198), toBoxedChar(1199), toBoxedChar(1200), toBoxedChar(1185), toBoxedChar(1201), toBoxedChar(1205), toBoxedChar(1207), toBoxedChar(1209), toBoxedChar(1211), toBoxedChar(1117), toBoxedChar(1213), toBoxedChar(1215), toBoxedChar(1203), toBoxedChar(1183), toBoxedChar(1123), toBoxedChar(1182), toBoxedChar(1173), toBoxedChar(1178), toBoxedChar(1170), toBoxedChar(1167), toBoxedChar(1165), toBoxedChar(1164), toBoxedChar(1163), toBoxedChar(493), toBoxedChar(1154), toBoxedChar(1153), toBoxedChar(1143), toBoxedChar(1141), toBoxedChar(1139), toBoxedChar(1135), toBoxedChar(1134), toBoxedChar(1127), toBoxedChar(1180), toBoxedChar(1220), toBoxedChar(1045), toBoxedChar(1222), toBoxedChar(1226), toBoxedChar(1267), toBoxedChar(1269), toBoxedChar(1071), toBoxedChar(1069), toBoxedChar(1068), toBoxedChar(1063), toBoxedChar(1061), toBoxedChar(1265), toBoxedChar(1059), toBoxedChar(1057), toBoxedChar(1056), toBoxedChar(1055), toBoxedChar(1053), toBoxedChar(1270), toBoxedChar(1051), toBoxedChar(1050), toBoxedChar(1058), toBoxedChar(1263), toBoxedChar(1261), toBoxedChar(1259), toBoxedChar(1228), toBoxedChar(1233), toBoxedChar(1235), toBoxedChar(1239), toBoxedChar(1104), toBoxedChar(1241), toBoxedChar(1243), toBoxedChar(1098), toBoxedChar(1246), toBoxedChar(1247), toBoxedChar(1248), toBoxedChar(1177), toBoxedChar(1249), toBoxedChar(1251), toBoxedChar(1253), toBoxedChar(1255), toBoxedChar(1257), toBoxedChar(1224), toBoxedChar(491), toBoxedChar(1327), toBoxedChar(489), toBoxedChar(432), toBoxedChar(430), toBoxedChar(222), toBoxedChar(356), toBoxedChar(358), toBoxedChar(425), toBoxedChar(172), toBoxedChar(360), toBoxedChar(221), toBoxedChar(192), toBoxedChar(362), toBoxedChar(193), toBoxedChar(421), toBoxedChar(364), toBoxedChar(424), toBoxedChar(194), toBoxedChar(354), toBoxedChar(352), toBoxedChar(88), toBoxedChar(441), toBoxedChar(440), toBoxedChar(346), toBoxedChar(89), toBoxedChar(348), toBoxedChar(256), toBoxedChar(90), toBoxedChar(438), toBoxedChar(437), toBoxedChar(436), toBoxedChar(258), toBoxedChar(350), toBoxedChar(126), toBoxedChar(439), toBoxedChar(217), toBoxedChar(366), toBoxedChar(195), toBoxedChar(381), toBoxedChar(401), toBoxedChar(384), toBoxedChar(400), toBoxedChar(209), toBoxedChar(397), toBoxedChar(203), toBoxedChar(396), toBoxedChar(395), toBoxedChar(386), toBoxedChar(387), toBoxedChar(388), toBoxedChar(215), toBoxedChar(389), toBoxedChar(218), toBoxedChar(417), toBoxedChar(379), toBoxedChar(377), toBoxedChar(368), toBoxedChar(196), toBoxedChar(370), toBoxedChar(220), toBoxedChar(197), toBoxedChar(219), toBoxedChar(202), toBoxedChar(414), toBoxedChar(374), toBoxedChar(411), toBoxedChar(409), toBoxedChar(200), toBoxedChar(376), toBoxedChar(201), toBoxedChar(199), toBoxedChar(443), toBoxedChar(442), toBoxedChar(444), toBoxedChar(271), toBoxedChar(470), toBoxedChar(344), toBoxedChar(67), toBoxedChar(472), toBoxedChar(310), toBoxedChar(474), toBoxedChar(66), toBoxedChar(476), toBoxedChar(274), toBoxedChar(477), toBoxedChar(276), toBoxedChar(65), toBoxedChar(69), toBoxedChar(479), toBoxedChar(278), toBoxedChar(280), toBoxedChar(282), toBoxedChar(481), toBoxedChar(61), toBoxedChar(60), toBoxedChar(294), toBoxedChar(292), toBoxedChar(43), toBoxedChar(38), toBoxedChar(485), toBoxedChar(487), toBoxedChar(35), toBoxedChar(62), toBoxedChar(323), toBoxedChar(392), toBoxedChar(325), toBoxedChar(450), toBoxedChar(340), toBoxedChar(260), toBoxedChar(446), toBoxedChar(84), toBoxedChar(86), toBoxedChar(468), toBoxedChar(83), toBoxedChar(262), toBoxedChar(82), toBoxedChar(445), toBoxedChar(85), toBoxedChar(266), toBoxedChar(264), toBoxedChar(80), toBoxedChar(268), toBoxedChar(78), toBoxedChar(342), toBoxedChar(329), toBoxedChar(462), toBoxedChar(75), toBoxedChar(466), toBoxedChar(327), toBoxedChar(72), toBoxedChar(457), toBoxedChar(447)]), listOf_0([toBoxedChar(1146), toBoxedChar(286), toBoxedChar(1186), toBoxedChar(1147), toBoxedChar(1175), toBoxedChar(1149), toBoxedChar(1151), toBoxedChar(1152), toBoxedChar(284), toBoxedChar(1172), toBoxedChar(1162), toBoxedChar(230), toBoxedChar(270), toBoxedChar(1166), toBoxedChar(1184), toBoxedChar(272), toBoxedChar(1223), toBoxedChar(1192), toBoxedChar(1260), toBoxedChar(1262), toBoxedChar(1264), toBoxedChar(1266), toBoxedChar(81), toBoxedChar(1268), toBoxedChar(79), toBoxedChar(1273), toBoxedChar(77), toBoxedChar(1276), toBoxedChar(1278), toBoxedChar(71), toBoxedChar(68), toBoxedChar(1285), toBoxedChar(1286), toBoxedChar(1292), toBoxedChar(1294), toBoxedChar(1324), toBoxedChar(1320), toBoxedChar(1318), toBoxedChar(1316), toBoxedChar(1315), toBoxedChar(1310), toBoxedChar(1258), toBoxedChar(1309), toBoxedChar(1305), toBoxedChar(1303), toBoxedChar(1302), toBoxedChar(1301), toBoxedChar(1298), toBoxedChar(1295), toBoxedChar(1306), toBoxedChar(1256), toBoxedChar(1254), toBoxedChar(1252), toBoxedChar(1214), toBoxedChar(1212), toBoxedChar(1210), toBoxedChar(1208), toBoxedChar(1206), toBoxedChar(208), toBoxedChar(1218), toBoxedChar(1202), toBoxedChar(211), toBoxedChar(212), toBoxedChar(213), toBoxedChar(214), toBoxedChar(1194), toBoxedChar(216), toBoxedChar(210), toBoxedChar(1189), toBoxedChar(1219), toBoxedChar(1142), toBoxedChar(1250), toBoxedChar(109), toBoxedChar(119), toBoxedChar(1245), toBoxedChar(169), toBoxedChar(1242), toBoxedChar(1221), toBoxedChar(1240), toBoxedChar(1238), toBoxedChar(1234), toBoxedChar(1232), toBoxedChar(1230), toBoxedChar(1227), toBoxedChar(1225), toBoxedChar(174), toBoxedChar(288), toBoxedChar(1122), toBoxedChar(290), toBoxedChar(552), toBoxedChar(554), toBoxedChar(556), toBoxedChar(558), toBoxedChar(560), toBoxedChar(562), toBoxedChar(565), toBoxedChar(570), toBoxedChar(571), toBoxedChar(435), toBoxedChar(434), toBoxedChar(433), toBoxedChar(579), toBoxedChar(580), toBoxedChar(550), toBoxedChar(581), toBoxedChar(431), toBoxedChar(586), toBoxedChar(428), toBoxedChar(1140), toBoxedChar(588), toBoxedChar(590), toBoxedChar(1024), toBoxedChar(423), toBoxedChar(1026), toBoxedChar(422), toBoxedChar(420), toBoxedChar(419), toBoxedChar(1035), toBoxedChar(416), toBoxedChar(582), toBoxedChar(1037), toBoxedChar(456), toBoxedChar(544), toBoxedChar(492), toBoxedChar(488), toBoxedChar(486), toBoxedChar(500), toBoxedChar(484), toBoxedChar(503), toBoxedChar(504), toBoxedChar(509), toBoxedChar(510), toBoxedChar(480), toBoxedChar(512), toBoxedChar(514), toBoxedChar(1326), toBoxedChar(516), toBoxedChar(545), toBoxedChar(518), toBoxedChar(473), toBoxedChar(524), toBoxedChar(471), toBoxedChar(526), toBoxedChar(528), toBoxedChar(469), toBoxedChar(530), toBoxedChar(532), toBoxedChar(467), toBoxedChar(534), toBoxedChar(465), toBoxedChar(461), toBoxedChar(460), toBoxedChar(542), toBoxedChar(475), toBoxedChar(415), toBoxedChar(478), toBoxedChar(490), toBoxedChar(1062), toBoxedChar(394), toBoxedChar(1125), toBoxedChar(1126), toBoxedChar(1066), toBoxedChar(306), toBoxedChar(393), toBoxedChar(1039), toBoxedChar(1102), toBoxedChar(1130), toBoxedChar(1121), toBoxedChar(1097), toBoxedChar(391), toBoxedChar(1096), toBoxedChar(390), toBoxedChar(385), toBoxedChar(1078), toBoxedChar(373), toBoxedChar(1131), toBoxedChar(1092), toBoxedChar(1099), toBoxedChar(398), toBoxedChar(1060), toBoxedChar(336), toBoxedChar(413), toBoxedChar(1138), toBoxedChar(408), toBoxedChar(330), toBoxedChar(1114), toBoxedChar(1048), toBoxedChar(399), toBoxedChar(404), toBoxedChar(1049), toBoxedChar(1113), toBoxedChar(332), toBoxedChar(1137), toBoxedChar(1052), toBoxedChar(1136), toBoxedChar(1054), toBoxedChar(334), toBoxedChar(403), toBoxedChar(1129)]), listOf_0([toBoxedChar(1128), toBoxedChar(1291), toBoxedChar(1290), toBoxedChar(1289), toBoxedChar(1124), toBoxedChar(1288), toBoxedChar(64), toBoxedChar(198), toBoxedChar(1132), toBoxedChar(1144), toBoxedChar(1323), toBoxedChar(1322), toBoxedChar(37), toBoxedChar(1145), toBoxedChar(497), toBoxedChar(498), toBoxedChar(499), toBoxedChar(1314), toBoxedChar(1313), toBoxedChar(1312), toBoxedChar(502), toBoxedChar(1148), toBoxedChar(1133), toBoxedChar(1308), toBoxedChar(483), toBoxedChar(482), toBoxedChar(1304), toBoxedChar(1150), toBoxedChar(1300), toBoxedChar(508), toBoxedChar(459), toBoxedChar(1284), toBoxedChar(1244), toBoxedChar(1065), toBoxedChar(1064), toBoxedChar(1236), toBoxedChar(188), toBoxedChar(189), toBoxedChar(190), toBoxedChar(1067), toBoxedChar(1204), toBoxedChar(405), toBoxedChar(418), toBoxedChar(1033), toBoxedChar(1034), toBoxedChar(1046), toBoxedChar(412), toBoxedChar(1217), toBoxedChar(1229), toBoxedChar(1120), toBoxedChar(1191), toBoxedChar(1070), toBoxedChar(1283), toBoxedChar(1282), toBoxedChar(1174), toBoxedChar(338), toBoxedChar(339), toBoxedChar(1272), toBoxedChar(458), toBoxedChar(1190), toBoxedChar(455), toBoxedChar(453), toBoxedChar(452), toBoxedChar(372), toBoxedChar(87), toBoxedChar(1188), toBoxedChar(568), toBoxedChar(569), toBoxedChar(454), toBoxedChar(1237)])]);\n var $receiver = this.CLUSTERS_0;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$, tmp$_0;\n var index = 0;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n var tmp$_1 = destination.add_11rb$;\n var id = checkIndexOverflow((tmp$_0 = index, index = tmp$_0 + 1 | 0, tmp$_0));\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(item, 10));\n var tmp$_2;\n tmp$_2 = item.iterator();\n while (tmp$_2.hasNext()) {\n var item_0 = tmp$_2.next();\n destination_0.add_11rb$(new Pair(id, item_0));\n }\n tmp$_1.call(destination, destination_0);\n }\n var $receiver_0 = flatten(destination);\n var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault($receiver_0, 10)), 16);\n var destination_1 = LinkedHashMap_init_0(capacity);\n var tmp$_3;\n tmp$_3 = $receiver_0.iterator();\n while (tmp$_3.hasNext()) {\n var element = tmp$_3.next();\n var pair = to(element.second, element.first);\n destination_1.put_xwzc9p$(pair.first, pair.second);\n }\n this.CLUSTERING_0 = destination_1;\n this.CLUSTER_WIDTH_0 = listOf_0([6.440506329113925, 10.181218274111677, 12.583512544802868, 14.536683417085428, 17.714285714285715]);\n this.FAMILY_COEFFICIENT_0 = mapOf([to('Arial', 0.08777509389956582), to('Calibri', -0.7568924686338481), to('Garamond', -1.2341292120659895), to('Geneva', 0.08777509389956582), to('Georgia', 0.06628876951083008), to('Helvetica', 0.08777509389956582), to('Lucida Grande', 0.08777509389956582), to('Rockwell', 0.41710660522332965), to('Times New Roman', -1.2007569745330333), to('Verdana', 1.3042084025015728)]);\n this.SIZE_COEFFICIENT_0 = 0.9843304096547842;\n }\n TextWidthEstimator.prototype.getCharWidth_0 = function (char) {\n var $receiver = this.CLUSTERING_0;\n var key = toBoxedChar(char);\n var tmp$;\n var clusterId = (tmp$ = $receiver.get_11rb$(key)) != null ? tmp$ : -1;\n return clusterId !== -1 ? this.CLUSTER_WIDTH_0.get_za3lpa$(clusterId) : this.DEFAULT_CHAR_WIDTH_0;\n };\n TextWidthEstimator.prototype.getFamilyAdditive_0 = function (font) {\n var tmp$, tmp$_0;\n var fontFamily = font.family.toString();\n var defaultFamilyCoefficient = (tmp$ = this.FAMILY_COEFFICIENT_0.get_11rb$(this.DEFAULT_FAMILY_0)) != null ? tmp$ : 0.0;\n return (tmp$_0 = this.FAMILY_COEFFICIENT_0.get_11rb$(fontFamily)) != null ? tmp$_0 : defaultFamilyCoefficient;\n };\n TextWidthEstimator.prototype.getFaceAdditive_0 = function (font) {\n var tmp$;\n if (font.isBold && font.isItalic)\n tmp$ = 0.9172120995070999;\n else if (font.isBold && !font.isItalic)\n tmp$ = 0.6908238890181602;\n else if (!font.isBold && font.isItalic)\n tmp$ = 0.1783188620736738;\n else\n tmp$ = 0.0;\n return tmp$;\n };\n TextWidthEstimator.prototype.getSizeCoefficient_0 = function (font) {\n return this.SIZE_COEFFICIENT_0 * font.size / 14;\n };\n TextWidthEstimator.prototype.correctPrediction_0 = function (predictedWidth, textLength, font) {\n return (predictedWidth + textLength * (this.getFamilyAdditive_0(font) + this.getFaceAdditive_0(font))) * this.getSizeCoefficient_0(font);\n };\n TextWidthEstimator.prototype.textWidth_d91ba$ = function (text, font) {\n if (text.length === 0)\n return 0.0;\n var transform = getCallableRef('getCharWidth', function ($receiver, p1) {\n return $receiver.getCharWidth_0(unboxChar(p1));\n }.bind(null, this));\n var destination = ArrayList_init_0(text.length);\n var tmp$;\n tmp$ = iterator(text);\n while (tmp$.hasNext()) {\n var item = unboxChar(tmp$.next());\n destination.add_11rb$(transform(toBoxedChar(item)));\n }\n return this.correctPrediction_0(sum_0(destination), text.length, font);\n };\n TextWidthEstimator.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'TextWidthEstimator',\n interfaces: []\n };\n var TextWidthEstimator_instance = null;\n function TextWidthEstimator_getInstance() {\n if (TextWidthEstimator_instance === null) {\n new TextWidthEstimator();\n }\n return TextWidthEstimator_instance;\n }\n function GroupAwareSampling() {\n }\n GroupAwareSampling.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'GroupAwareSampling',\n interfaces: [Sampling]\n };\n function PointSampling() {\n }\n PointSampling.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'PointSampling',\n interfaces: [Sampling]\n };\n function Sampling() {\n }\n Sampling.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'Sampling',\n interfaces: []\n };\n function Samplings() {\n Samplings_instance = this;\n this.RANDOM = RandomSampling$Companion_getInstance().ALIAS;\n this.PICK = PickSampling$Companion_getInstance().ALIAS;\n this.SYSTEMATIC = SystematicSampling$Companion_getInstance().ALIAS;\n this.RANDOM_GROUP = GroupRandomSampling$Companion_getInstance().ALIAS;\n this.SYSTEMATIC_GROUP = GroupSystematicSampling$Companion_getInstance().ALIAS;\n this.RANDOM_STRATIFIED = RandomStratifiedSampling$Companion_getInstance().ALIAS_8be2vx$;\n this.VERTEX_VW = VertexSampling$VertexVwSampling$Companion_getInstance().ALIAS;\n this.VERTEX_DP = VertexSampling$VertexDpSampling$Companion_getInstance().ALIAS;\n this.NONE = new Samplings$NoneSampling();\n }\n Samplings.prototype.random_280ow0$ = function (sampleSize, seed) {\n return new RandomSampling(sampleSize, seed);\n };\n Samplings.prototype.pick_za3lpa$ = function (sampleSize) {\n return new PickSampling(sampleSize);\n };\n Samplings.prototype.vertexDp_za3lpa$ = function (sampleSize) {\n return new VertexSampling$VertexDpSampling(sampleSize);\n };\n Samplings.prototype.vertexVw_za3lpa$ = function (sampleSize) {\n return new VertexSampling$VertexVwSampling(sampleSize);\n };\n Samplings.prototype.systematic_za3lpa$ = function (sampleSize) {\n return new SystematicSampling(sampleSize);\n };\n Samplings.prototype.randomGroup_280ow0$ = function (sampleSize, seed) {\n return new GroupRandomSampling(sampleSize, seed);\n };\n Samplings.prototype.systematicGroup_za3lpa$ = function (sampleSize) {\n return new GroupSystematicSampling(sampleSize);\n };\n Samplings.prototype.randomStratified_vcwos1$ = function (sampleSize, seed, minSubSample) {\n return new RandomStratifiedSampling(sampleSize, seed, minSubSample);\n };\n function Samplings$NoneSampling() {\n }\n Object.defineProperty(Samplings$NoneSampling.prototype, 'expressionText', {\n configurable: true,\n get: function () {\n return 'none';\n }\n });\n Samplings$NoneSampling.prototype.isApplicable_dhhkv7$ = function (population) {\n return false;\n };\n Samplings$NoneSampling.prototype.apply_dhhkv7$ = function (population) {\n return population;\n };\n Samplings$NoneSampling.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'NoneSampling',\n interfaces: [PointSampling]\n };\n Samplings.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Samplings',\n interfaces: []\n };\n var Samplings_instance = null;\n function Samplings_getInstance() {\n if (Samplings_instance === null) {\n new Samplings();\n }\n return Samplings_instance;\n }\n function GroupRandomSampling(sampleSize, mySeed) {\n GroupRandomSampling$Companion_getInstance();\n GroupSamplingBase.call(this, sampleSize);\n this.mySeed_0 = mySeed;\n }\n Object.defineProperty(GroupRandomSampling.prototype, 'expressionText', {\n configurable: true,\n get: function () {\n return 'sampling_' + GroupRandomSampling$Companion_getInstance().ALIAS + '(' + 'n=' + toString(this.sampleSize) + (this.mySeed_0 != null ? ', seed=' + toString(this.mySeed_0) : '') + ')';\n }\n });\n GroupRandomSampling.prototype.apply_se5qvl$ = function (population, groupMapper) {\n if (!this.isApplicable_se5qvl$(population, groupMapper)) {\n var message = 'Failed requirement.';\n throw IllegalArgumentException_init(message.toString());\n }\n var distinctGroups = SamplingUtil_getInstance().distinctGroups_ejae6o$(groupMapper, population.rowCount());\n shuffle(distinctGroups, this.createRandom_0());\n var pickedGroups = toSet(take(distinctGroups, this.sampleSize));\n return this.doSelect_z69lec$(population, pickedGroups, groupMapper);\n };\n GroupRandomSampling.prototype.createRandom_0 = function () {\n var tmp$, tmp$_0;\n return (tmp$_0 = (tmp$ = this.mySeed_0) != null ? Random(tmp$) : null) != null ? tmp$_0 : Random_0.Default;\n };\n function GroupRandomSampling$Companion() {\n GroupRandomSampling$Companion_instance = this;\n this.ALIAS = 'group_random';\n }\n GroupRandomSampling$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var GroupRandomSampling$Companion_instance = null;\n function GroupRandomSampling$Companion_getInstance() {\n if (GroupRandomSampling$Companion_instance === null) {\n new GroupRandomSampling$Companion();\n }\n return GroupRandomSampling$Companion_instance;\n }\n GroupRandomSampling.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GroupRandomSampling',\n interfaces: [GroupSamplingBase]\n };\n function GroupSamplingBase(sampleSize) {\n SamplingBase.call(this, sampleSize);\n }\n GroupSamplingBase.prototype.isApplicable_se5qvl$ = function (population, groupMapper) {\n return this.isApplicable_ijg2gx$(population, groupMapper, SamplingUtil_getInstance().groupCount_ejae6o$(groupMapper, population.rowCount()));\n };\n GroupSamplingBase.prototype.isApplicable_ijg2gx$ = function (population, groupMapper, groupCount) {\n return groupCount > this.sampleSize;\n };\n GroupSamplingBase.prototype.doSelect_z69lec$ = function (population, pickedGroups, groupMapper) {\n var tmp$;\n var indicesByGroup = GroupUtil_getInstance().indicesByGroup_wc9gac$(population.rowCount(), groupMapper);\n var pickedIndices = ArrayList_init();\n tmp$ = pickedGroups.iterator();\n while (tmp$.hasNext()) {\n var group = tmp$.next();\n pickedIndices.addAll_brywnq$(ensureNotNull(indicesByGroup.get_11rb$(group)));\n }\n return population.selectIndices_pqoyrt$(pickedIndices);\n };\n GroupSamplingBase.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GroupSamplingBase',\n interfaces: [GroupAwareSampling, SamplingBase]\n };\n function GroupSystematicSampling(sampleSize) {\n GroupSystematicSampling$Companion_getInstance();\n GroupSamplingBase.call(this, sampleSize);\n }\n Object.defineProperty(GroupSystematicSampling.prototype, 'expressionText', {\n configurable: true,\n get: function () {\n return 'sampling_' + GroupSystematicSampling$Companion_getInstance().ALIAS + '(' + 'n=' + toString(this.sampleSize) + ')';\n }\n });\n GroupSystematicSampling.prototype.isApplicable_ijg2gx$ = function (population, groupMapper, groupCount) {\n return GroupSamplingBase.prototype.isApplicable_ijg2gx$.call(this, population, groupMapper, groupCount) && SystematicSampling$Companion_getInstance().computeStep_vux9f0$(groupCount, this.sampleSize) >= 2;\n };\n GroupSystematicSampling.prototype.apply_se5qvl$ = function (population, groupMapper) {\n if (!this.isApplicable_se5qvl$(population, groupMapper)) {\n var message = 'Failed requirement.';\n throw IllegalArgumentException_init(message.toString());\n }\n var distinctGroups = SamplingUtil_getInstance().distinctGroups_ejae6o$(groupMapper, population.rowCount());\n var step = SystematicSampling$Companion_getInstance().computeStep_vux9f0$(distinctGroups.size, this.sampleSize);\n var pickedGroups = HashSet_init_0();\n var i = 0;\n while (i < distinctGroups.size) {\n pickedGroups.add_11rb$(distinctGroups.get_za3lpa$(i));\n i = i + step | 0;\n }\n return this.doSelect_z69lec$(population, pickedGroups, groupMapper);\n };\n function GroupSystematicSampling$Companion() {\n GroupSystematicSampling$Companion_instance = this;\n this.ALIAS = 'group_systematic';\n }\n GroupSystematicSampling$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var GroupSystematicSampling$Companion_instance = null;\n function GroupSystematicSampling$Companion_getInstance() {\n if (GroupSystematicSampling$Companion_instance === null) {\n new GroupSystematicSampling$Companion();\n }\n return GroupSystematicSampling$Companion_instance;\n }\n GroupSystematicSampling.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GroupSystematicSampling',\n interfaces: [GroupSamplingBase]\n };\n function PickSampling(sampleSize) {\n PickSampling$Companion_getInstance();\n SamplingBase.call(this, sampleSize);\n }\n Object.defineProperty(PickSampling.prototype, 'expressionText', {\n configurable: true,\n get: function () {\n return 'sampling_' + PickSampling$Companion_getInstance().ALIAS + '(' + 'n=' + toString(this.sampleSize) + ')';\n }\n });\n PickSampling.prototype.apply_dhhkv7$ = function (population) {\n if (!this.isApplicable_dhhkv7$(population)) {\n var message = 'Failed requirement.';\n throw IllegalArgumentException_init(message.toString());\n }\n var xVar = SamplingUtil_getInstance().xVar_dhhkv7$(population);\n var xFactors = population.distinctValues_8xm3sj$(xVar);\n if (xFactors.size <= this.sampleSize) {\n return population;\n }\n var pickX = toSet(take(xFactors, this.sampleSize));\n var xValues = population.get_8xm3sj$(xVar);\n var pickedIndices = ArrayList_init();\n var index = 0;\n for (var tmp$ = xValues.iterator(); tmp$.hasNext(); ++index) {\n var v = tmp$.next();\n if (contains(pickX, v)) {\n pickedIndices.add_11rb$(index);\n }\n }\n return population.selectIndices_pqoyrt$(pickedIndices);\n };\n function PickSampling$Companion() {\n PickSampling$Companion_instance = this;\n this.ALIAS = 'pick';\n }\n PickSampling$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var PickSampling$Companion_instance = null;\n function PickSampling$Companion_getInstance() {\n if (PickSampling$Companion_instance === null) {\n new PickSampling$Companion();\n }\n return PickSampling$Companion_instance;\n }\n PickSampling.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PickSampling',\n interfaces: [PointSampling, SamplingBase]\n };\n function RandomSampling(sampleSize, mySeed) {\n RandomSampling$Companion_getInstance();\n SamplingBase.call(this, sampleSize);\n this.mySeed_0 = mySeed;\n }\n Object.defineProperty(RandomSampling.prototype, 'expressionText', {\n configurable: true,\n get: function () {\n return 'sampling_' + RandomSampling$Companion_getInstance().ALIAS + '(' + 'n=' + toString(this.sampleSize) + (this.mySeed_0 != null ? ', seed=' + toString(this.mySeed_0) : '') + ')';\n }\n });\n RandomSampling.prototype.apply_dhhkv7$ = function (population) {\n var tmp$, tmp$_0;\n if (!this.isApplicable_dhhkv7$(population)) {\n var message = 'Failed requirement.';\n throw IllegalArgumentException_init(message.toString());\n }\n var rand = (tmp$_0 = (tmp$ = this.mySeed_0) != null ? Random(tmp$) : null) != null ? tmp$_0 : Random_0.Default;\n return util.SamplingUtil.sampleWithoutReplacement_egh5ya$(this.sampleSize, rand, population);\n };\n function RandomSampling$Companion() {\n RandomSampling$Companion_instance = this;\n this.ALIAS = 'random';\n }\n RandomSampling$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var RandomSampling$Companion_instance = null;\n function RandomSampling$Companion_getInstance() {\n if (RandomSampling$Companion_instance === null) {\n new RandomSampling$Companion();\n }\n return RandomSampling$Companion_instance;\n }\n RandomSampling.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'RandomSampling',\n interfaces: [PointSampling, SamplingBase]\n };\n function RandomStratifiedSampling(sampleSize, mySeed, myMinSubsampleSize) {\n RandomStratifiedSampling$Companion_getInstance();\n SamplingBase.call(this, sampleSize);\n this.mySeed_0 = mySeed;\n this.myMinSubsampleSize_0 = myMinSubsampleSize;\n }\n Object.defineProperty(RandomStratifiedSampling.prototype, 'expressionText', {\n configurable: true,\n get: function () {\n return 'sampling_' + RandomStratifiedSampling$Companion_getInstance().ALIAS_8be2vx$ + '(' + 'n=' + toString(this.sampleSize) + (this.mySeed_0 != null ? ', seed=' + toString(this.mySeed_0) : '') + (this.myMinSubsampleSize_0 != null ? ', min_subsample=' + toString(this.myMinSubsampleSize_0) : '') + ')';\n }\n });\n RandomStratifiedSampling.prototype.isApplicable_se5qvl$ = function (population, groupMapper) {\n return population.rowCount() > this.sampleSize;\n };\n function RandomStratifiedSampling$apply$lambda(closure$groupIndices) {\n return function (indexSet) {\n var $receiver = until(0, closure$groupIndices.size);\n var destination = ArrayList_init();\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n if (indexSet.contains_11rb$(element))\n destination.add_11rb$(element);\n }\n return destination;\n };\n }\n function RandomStratifiedSampling$apply$lambda_0(closure$groupIndices) {\n return function (indexSet) {\n var $receiver = until(0, closure$groupIndices.size);\n var destination = ArrayList_init();\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n if (!indexSet.contains_11rb$(element))\n destination.add_11rb$(element);\n }\n return destination;\n };\n }\n RandomStratifiedSampling.prototype.apply_se5qvl$ = function (population, groupMapper) {\n var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3;\n if (!this.isApplicable_se5qvl$(population, groupMapper)) {\n var message = 'Failed requirement.';\n throw IllegalArgumentException_init(message.toString());\n }\n var indicesByGroup = GroupUtil_getInstance().indicesByGroup_wc9gac$(population.rowCount(), groupMapper);\n var minSubSampleSize = (tmp$ = this.myMinSubsampleSize_0) != null ? tmp$ : 2;\n var b = minSubSampleSize;\n minSubSampleSize = JsMath.max(0, b);\n var popSize = population.rowCount();\n var pickIndices = ArrayList_init();\n var rand = (tmp$_1 = (tmp$_0 = this.mySeed_0) != null ? Random(tmp$_0) : null) != null ? tmp$_1 : Random_0.Default;\n tmp$_2 = indicesByGroup.keys.iterator();\n while (tmp$_2.hasNext()) {\n var group = tmp$_2.next();\n var groupIndices = ensureNotNull(indicesByGroup.get_11rb$(group));\n var stratumSize = groupIndices.size;\n var ratio = stratumSize / popSize;\n var stratumSampleSize = numberToInt(round(this.sampleSize * ratio));\n var a = stratumSampleSize;\n var b_0 = minSubSampleSize;\n stratumSampleSize = JsMath.max(a, b_0);\n if (stratumSampleSize >= stratumSize) {\n pickIndices.addAll_brywnq$(groupIndices);\n } else {\n var sampleGroupIndices = util.SamplingUtil.sampleWithoutReplacement_o7ew15$(stratumSize, stratumSampleSize, rand, RandomStratifiedSampling$apply$lambda(groupIndices), RandomStratifiedSampling$apply$lambda_0(groupIndices));\n tmp$_3 = sampleGroupIndices.iterator();\n while (tmp$_3.hasNext()) {\n var i = tmp$_3.next();\n pickIndices.add_11rb$(groupIndices.get_za3lpa$(i));\n }\n }\n }\n return population.selectIndices_pqoyrt$(pickIndices);\n };\n function RandomStratifiedSampling$Companion() {\n RandomStratifiedSampling$Companion_instance = this;\n this.ALIAS_8be2vx$ = 'random_stratified';\n this.DEF_MIN_SUBSAMPLE_SIZE_0 = 2;\n }\n RandomStratifiedSampling$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var RandomStratifiedSampling$Companion_instance = null;\n function RandomStratifiedSampling$Companion_getInstance() {\n if (RandomStratifiedSampling$Companion_instance === null) {\n new RandomStratifiedSampling$Companion();\n }\n return RandomStratifiedSampling$Companion_instance;\n }\n RandomStratifiedSampling.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'RandomStratifiedSampling',\n interfaces: [GroupAwareSampling, SamplingBase]\n };\n function SamplingBase(sampleSize) {\n this.sampleSize = sampleSize;\n if (!(this.sampleSize > 0)) {\n var message = 'Sample size must be greater than zero, but was: ' + toString(this.sampleSize);\n throw IllegalStateException_init(message.toString());\n }\n }\n SamplingBase.prototype.isApplicable_dhhkv7$ = function (population) {\n return population.rowCount() > this.sampleSize;\n };\n SamplingBase.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'SamplingBase',\n interfaces: [Sampling]\n };\n var compareBy$lambda_1 = wrapFunction(function () {\n var compareValues = Kotlin.kotlin.comparisons.compareValues_s00gnj$;\n return function (closure$selector) {\n return function (a, b) {\n var selector = closure$selector;\n return compareValues(selector(a), selector(b));\n };\n };\n });\n function SamplingUtil() {\n SamplingUtil_instance = this;\n }\n SamplingUtil.prototype.groupCount_ejae6o$ = function (groupMapper, size) {\n var $receiver = until(0, size);\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n destination.add_11rb$(groupMapper(item));\n }\n return distinct(destination).size;\n };\n SamplingUtil.prototype.distinctGroups_ejae6o$ = function (groupMapper, size) {\n var $receiver = until(0, size);\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n destination.add_11rb$(groupMapper(item));\n }\n return toMutableList(distinct(destination));\n };\n SamplingUtil.prototype.xVar_bbyvt0$ = function (variables) {\n var tmp$;\n if (variables.contains_11rb$(stat.Stats.X))\n tmp$ = stat.Stats.X;\n else if (variables.contains_11rb$(data.TransformVar.X))\n tmp$ = data.TransformVar.X;\n else\n tmp$ = null;\n return tmp$;\n };\n SamplingUtil.prototype.xVar_dhhkv7$ = function (data) {\n var tmp$;\n tmp$ = this.xVar_bbyvt0$(data.variables());\n if (tmp$ == null) {\n throw IllegalStateException_init(\"Can't apply sampling: couldn't deduce the (X) variable.\");\n }\n return tmp$;\n };\n SamplingUtil.prototype.yVar_dhhkv7$ = function (data_0) {\n if (data_0.has_8xm3sj$(stat.Stats.Y)) {\n return stat.Stats.Y;\n } else if (data_0.has_8xm3sj$(data.TransformVar.Y)) {\n return data.TransformVar.Y;\n }\n throw IllegalStateException_init(\"Can't apply sampling: couldn't deduce the (Y) variable.\");\n };\n SamplingUtil.prototype.splitRings_dhhkv7$ = function (population) {\n var tmp$, tmp$_0;\n var rings = ArrayList_init();\n var lastPoint = null;\n var start = -1;\n var xValues = Kotlin.isType(tmp$ = population.get_8xm3sj$(this.xVar_dhhkv7$(population)), List) ? tmp$ : throwCCE();\n var yValues = Kotlin.isType(tmp$_0 = population.get_8xm3sj$(this.yVar_dhhkv7$(population)), List) ? tmp$_0 : throwCCE();\n var points = new VertexSampling$DoubleVectorComponentsList(xValues, yValues);\n for (var i = 0; i !== points.size; ++i) {\n var point = points.get_za3lpa$(i);\n if (start < 0) {\n start = i;\n lastPoint = point;\n } else if (equals(lastPoint, point)) {\n rings.add_11rb$(points.subList_vux9f0$(start, i + 1 | 0));\n start = -1;\n lastPoint = null;\n }\n }\n if (start >= 0) {\n rings.add_11rb$(points.subList_vux9f0$(start, points.size));\n }\n return rings;\n };\n function SamplingUtil$calculateRingLimits$lambda(closure$rings) {\n return function (it) {\n return new Pair(it, calculateArea(closure$rings.get_za3lpa$(it)));\n };\n }\n function SamplingUtil$calculateRingLimits$lambda_0(this$SamplingUtil) {\n return function (it) {\n return this$SamplingUtil.getRingArea_0(it);\n };\n }\n function SamplingUtil$calculateRingLimits$lambda_1(closure$totalArea, closure$areaProceed, closure$totalPointsLimit, closure$pointsProceed, closure$rings, this$SamplingUtil) {\n return function (p) {\n var a = roundToInt(p.second / (closure$totalArea - closure$areaProceed.get()) * (closure$totalPointsLimit - closure$pointsProceed.get() | 0));\n var b = closure$rings.get_za3lpa$(this$SamplingUtil.getRingIndex_6gxk4o$(p)).size;\n var limit = JsMath.min(a, b);\n if (limit >= 4) {\n closure$areaProceed.getAndAdd_14dthe$(this$SamplingUtil.getRingArea_0(p));\n closure$pointsProceed.getAndAdd_za3lpa$(limit);\n } else {\n limit = 0;\n }\n return new Pair(this$SamplingUtil.getRingIndex_6gxk4o$(p), limit);\n };\n }\n function SamplingUtil$calculateRingLimits$lambda_2(this$SamplingUtil) {\n return function (it) {\n return this$SamplingUtil.getRingIndex_6gxk4o$(it);\n };\n }\n function SamplingUtil$calculateRingLimits$lambda_3(this$SamplingUtil) {\n return function (it) {\n return this$SamplingUtil.getRingLimit_5q1b6w$(it);\n };\n }\n SamplingUtil.prototype.calculateRingLimits_rmr3bv$ = function (rings, totalPointsLimit) {\n var destination = ArrayList_init_0(collectionSizeOrDefault(rings, 10));\n var tmp$;\n tmp$ = rings.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n destination.add_11rb$(calculateArea(item));\n }\n var totalArea = sum_0(destination);\n var areaProceed = new MutableDouble(0.0);\n var pointsProceed = new MutableInteger(0);\n return toList_1(map(sortedWith_0(map(sortedWith_0(map(asSequence(get_indices(rings)), SamplingUtil$calculateRingLimits$lambda(rings)), reversed_0(new Comparator(compareBy$lambda_1(SamplingUtil$calculateRingLimits$lambda_0(this))))), SamplingUtil$calculateRingLimits$lambda_1(totalArea, areaProceed, totalPointsLimit, pointsProceed, rings, this)), new Comparator(compareBy$lambda_1(SamplingUtil$calculateRingLimits$lambda_2(this)))), SamplingUtil$calculateRingLimits$lambda_3(this)));\n };\n SamplingUtil.prototype.getRingIndex_6gxk4o$ = function (pair) {\n return pair.first;\n };\n SamplingUtil.prototype.getRingArea_0 = function (pair) {\n return pair.second;\n };\n SamplingUtil.prototype.getRingLimit_5q1b6w$ = function (pair) {\n return pair.second;\n };\n SamplingUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'SamplingUtil',\n interfaces: []\n };\n var SamplingUtil_instance = null;\n function SamplingUtil_getInstance() {\n if (SamplingUtil_instance === null) {\n new SamplingUtil();\n }\n return SamplingUtil_instance;\n }\n function SystematicSampling(sampleSize) {\n SystematicSampling$Companion_getInstance();\n SamplingBase.call(this, sampleSize);\n }\n Object.defineProperty(SystematicSampling.prototype, 'expressionText', {\n configurable: true,\n get: function () {\n return 'sampling_' + SystematicSampling$Companion_getInstance().ALIAS + '(' + 'n=' + toString(this.sampleSize) + ')';\n }\n });\n SystematicSampling.prototype.isApplicable_dhhkv7$ = function (population) {\n return SamplingBase.prototype.isApplicable_dhhkv7$.call(this, population) && this.computeStep_0(population.rowCount()) >= 2;\n };\n SystematicSampling.prototype.apply_dhhkv7$ = function (population) {\n if (!this.isApplicable_dhhkv7$(population)) {\n var message = 'Failed requirement.';\n throw IllegalArgumentException_init(message.toString());\n }\n var popSize = population.rowCount();\n var step = this.computeStep_0(popSize);\n var pickedIndices = ArrayList_init();\n var i = 0;\n while (i < popSize) {\n pickedIndices.add_11rb$(i);\n i = i + step | 0;\n }\n return population.selectIndices_pqoyrt$(pickedIndices);\n };\n SystematicSampling.prototype.computeStep_0 = function (popSize) {\n return numberToInt(round(popSize / (this.sampleSize - 1 | 0)));\n };\n function SystematicSampling$Companion() {\n SystematicSampling$Companion_instance = this;\n this.ALIAS = 'systematic';\n }\n SystematicSampling$Companion.prototype.computeStep_vux9f0$ = function (popSize, sampleSize) {\n return numberToInt(round((popSize - 1 | 0) / (sampleSize - 1 | 0)));\n };\n SystematicSampling$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var SystematicSampling$Companion_instance = null;\n function SystematicSampling$Companion_getInstance() {\n if (SystematicSampling$Companion_instance === null) {\n new SystematicSampling$Companion();\n }\n return SystematicSampling$Companion_instance;\n }\n SystematicSampling.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'SystematicSampling',\n interfaces: [PointSampling, SamplingBase]\n };\n function VertexSampling(sampleSize) {\n VertexSampling$Companion_getInstance();\n SamplingBase.call(this, sampleSize);\n }\n VertexSampling.prototype.simplify_0 = function (points, limit) {\n var tmp$;\n if (limit === 0) {\n tmp$ = emptyList();\n } else {\n tmp$ = this.simplifyInternal_11hmxm$(points, limit);\n }\n return tmp$;\n };\n VertexSampling.prototype.apply_dhhkv7$ = function (population) {\n if (!this.isApplicable_dhhkv7$(population)) {\n var message = 'Failed requirement.';\n throw IllegalArgumentException_init(message.toString());\n }\n var rings = SamplingUtil_getInstance().splitRings_dhhkv7$(population);\n var limits = rings.size === 1 && !isClosed(rings.get_za3lpa$(0)) ? listOf(this.sampleSize) : SamplingUtil_getInstance().calculateRingLimits_rmr3bv$(rings, this.sampleSize);\n var indices = ArrayList_init();\n var ringBase = new MutableInteger(0);\n var $receiver = until(0, limits.size);\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n destination.add_11rb$(new Pair(item, limits.get_za3lpa$(item)));\n }\n var tmp$_0;\n tmp$_0 = destination.iterator();\n while (tmp$_0.hasNext()) {\n var element = tmp$_0.next();\n var tmp$_1;\n tmp$_1 = this.simplify_0(rings.get_za3lpa$(SamplingUtil_getInstance().getRingIndex_6gxk4o$(element)), SamplingUtil_getInstance().getRingLimit_5q1b6w$(element)).iterator();\n while (tmp$_1.hasNext()) {\n var element_0 = tmp$_1.next();\n indices.add_11rb$(ringBase.get() + element_0 | 0);\n }\n ringBase.getAndAdd_za3lpa$(rings.get_za3lpa$(SamplingUtil_getInstance().getRingIndex_6gxk4o$(element)).size);\n }\n return population.selectIndices_pqoyrt$(indices);\n };\n function VertexSampling$VertexVwSampling(sampleSize) {\n VertexSampling$VertexVwSampling$Companion_getInstance();\n VertexSampling.call(this, sampleSize);\n }\n Object.defineProperty(VertexSampling$VertexVwSampling.prototype, 'expressionText', {\n configurable: true,\n get: function () {\n return 'sampling_' + VertexSampling$VertexVwSampling$Companion_getInstance().ALIAS + '(' + 'n=' + toString(this.sampleSize) + ')';\n }\n });\n VertexSampling$VertexVwSampling.prototype.simplifyInternal_11hmxm$ = function (points, limit) {\n return PolylineSimplifier.Companion.visvalingamWhyatt_ytws2g$(points).setCountLimit_za3lpa$(limit).indices;\n };\n function VertexSampling$VertexVwSampling$Companion() {\n VertexSampling$VertexVwSampling$Companion_instance = this;\n this.ALIAS = 'vertex_vw';\n }\n VertexSampling$VertexVwSampling$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var VertexSampling$VertexVwSampling$Companion_instance = null;\n function VertexSampling$VertexVwSampling$Companion_getInstance() {\n if (VertexSampling$VertexVwSampling$Companion_instance === null) {\n new VertexSampling$VertexVwSampling$Companion();\n }\n return VertexSampling$VertexVwSampling$Companion_instance;\n }\n VertexSampling$VertexVwSampling.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'VertexVwSampling',\n interfaces: [VertexSampling]\n };\n function VertexSampling$VertexDpSampling(sampleSize) {\n VertexSampling$VertexDpSampling$Companion_getInstance();\n VertexSampling.call(this, sampleSize);\n }\n Object.defineProperty(VertexSampling$VertexDpSampling.prototype, 'expressionText', {\n configurable: true,\n get: function () {\n return 'sampling_' + VertexSampling$VertexDpSampling$Companion_getInstance().ALIAS + '(' + 'n=' + toString(this.sampleSize) + ')';\n }\n });\n VertexSampling$VertexDpSampling.prototype.simplifyInternal_11hmxm$ = function (points, limit) {\n return PolylineSimplifier.Companion.douglasPeucker_ytws2g$(points).setCountLimit_za3lpa$(limit).indices;\n };\n function VertexSampling$VertexDpSampling$Companion() {\n VertexSampling$VertexDpSampling$Companion_instance = this;\n this.ALIAS = 'vertex_dp';\n }\n VertexSampling$VertexDpSampling$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var VertexSampling$VertexDpSampling$Companion_instance = null;\n function VertexSampling$VertexDpSampling$Companion_getInstance() {\n if (VertexSampling$VertexDpSampling$Companion_instance === null) {\n new VertexSampling$VertexDpSampling$Companion();\n }\n return VertexSampling$VertexDpSampling$Companion_instance;\n }\n VertexSampling$VertexDpSampling.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'VertexDpSampling',\n interfaces: [VertexSampling]\n };\n function VertexSampling$DoubleVectorComponentsList(myXValues, myYValues) {\n AbstractList.call(this);\n this.myXValues_0 = myXValues;\n this.myYValues_0 = myYValues;\n }\n Object.defineProperty(VertexSampling$DoubleVectorComponentsList.prototype, 'size', {\n configurable: true,\n get: function () {\n return this.myXValues_0.size;\n }\n });\n VertexSampling$DoubleVectorComponentsList.prototype.get_za3lpa$ = function (index) {\n return VertexSampling$Companion_getInstance().createPoint_0(this.myXValues_0.get_za3lpa$(index), this.myYValues_0.get_za3lpa$(index));\n };\n VertexSampling$DoubleVectorComponentsList.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'DoubleVectorComponentsList',\n interfaces: [AbstractList]\n };\n function VertexSampling$Companion() {\n VertexSampling$Companion_instance = this;\n }\n VertexSampling$Companion.prototype.createPoint_0 = function (x, y) {\n var tmp$, tmp$_0;\n if (!!(typeof x === 'string' || typeof y === 'string')) {\n var message = 'String coords are not supported yet';\n throw IllegalArgumentException_init(message.toString());\n }\n if (!data_0.SeriesUtil.allFinite_jma9l8$(typeof (tmp$ = x) === 'number' ? tmp$ : throwCCE(), typeof (tmp$_0 = y) === 'number' ? tmp$_0 : throwCCE())) {\n var message_0 = 'Invalid coord';\n throw IllegalArgumentException_init(message_0.toString());\n }\n return new DoubleVector(x, y);\n };\n VertexSampling$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var VertexSampling$Companion_instance = null;\n function VertexSampling$Companion_getInstance() {\n if (VertexSampling$Companion_instance === null) {\n new VertexSampling$Companion();\n }\n return VertexSampling$Companion_instance;\n }\n VertexSampling.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'VertexSampling',\n interfaces: [PointSampling, SamplingBase]\n };\n function ContinuousOnlyMapperProvider(naValue) {\n MapperProviderBase.call(this, naValue);\n }\n ContinuousOnlyMapperProvider.prototype.createDiscreteMapper_6i94r7$ = function (discreteTransform) {\n throw IllegalStateException_init('[' + toString(Kotlin.getKClassFromExpression(this).simpleName) + \"] Can't create mapper for discrete domain\");\n };\n ContinuousOnlyMapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ContinuousOnlyMapperProvider',\n interfaces: [MapperProviderBase]\n };\n function DefaultMapperProvider() {\n DefaultMapperProvider_instance = this;\n this.PROVIDER_MAP_0 = new DefaultMapperProvider$TypedMapperProviderMap();\n }\n DefaultMapperProvider.prototype.get_31786j$ = function (aes) {\n return this.PROVIDER_MAP_0.get_lkzxyg$(aes);\n };\n DefaultMapperProvider.prototype.hasDefault_5adj56$ = function (aes) {\n return this.PROVIDER_MAP_0.containsKey_5adj56$(aes);\n };\n function DefaultMapperProvider$TypedMapperProviderMap() {\n DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance();\n this.myMap_0 = HashMap_init();\n var tmp$;\n tmp$ = Aes.Companion.allPositional().iterator();\n while (tmp$.hasNext()) {\n var aes = tmp$.next();\n this.put_0(aes, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_UNDEFINED_0);\n }\n this.put_0(Aes.Companion.X, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.Y, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.Z, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.YMIN, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.YMAX, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.COLOR, DefaultMapperProviderUtil_getInstance().createColorMapperProvider_8be2vx$());\n this.put_0(Aes.Companion.FILL, DefaultMapperProviderUtil_getInstance().createColorMapperProvider_8be2vx$());\n this.put_0(Aes.Companion.ALPHA, AlphaMapperProvider$Companion_getInstance().DEFAULT);\n this.put_0(Aes.Companion.SHAPE, DefaultMapperProviderUtil_getInstance().createWithDiscreteOutput_rath1t$(ShapeMapper_getInstance().allShapes(), ShapeMapper_getInstance().NA_VALUE));\n this.put_0(Aes.Companion.LINETYPE, DefaultMapperProviderUtil_getInstance().createWithDiscreteOutput_rath1t$(LineTypeMapper_getInstance().allLineTypes(), LineTypeMapper_getInstance().NA_VALUE));\n this.put_0(Aes.Companion.SIZE, SizeMapperProvider$Companion_getInstance().DEFAULT);\n this.put_0(Aes.Companion.STACKSIZE, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.WIDTH, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.HEIGHT, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.WEIGHT, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.BINWIDTH, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.VIOLINWIDTH, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.INTERCEPT, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.SLOPE, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.XINTERCEPT, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.YINTERCEPT, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.LOWER, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.MIDDLE, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.UPPER, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.SAMPLE, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.QUANTILE, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.MAP_ID, DefaultMapperProviderUtil_getInstance().createObjectIdentity_8be2vx$());\n this.put_0(Aes.Companion.FRAME, DefaultMapperProviderUtil_getInstance().createStringIdentity_8be2vx$());\n this.put_0(Aes.Companion.SPEED, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.FLOW, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.XMIN, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.XMAX, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.XEND, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.YEND, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.LABEL, DefaultMapperProviderUtil_getInstance().createObjectIdentity_8be2vx$());\n this.put_0(Aes.Companion.FAMILY, DefaultMapperProviderUtil_getInstance().createStringIdentity_8be2vx$());\n this.put_0(Aes.Companion.FONTFACE, DefaultMapperProviderUtil_getInstance().createStringIdentity_8be2vx$());\n this.put_0(Aes.Companion.LINEHEIGHT, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.HJUST, DefaultMapperProviderUtil_getInstance().createObjectIdentity_8be2vx$());\n this.put_0(Aes.Companion.VJUST, DefaultMapperProviderUtil_getInstance().createObjectIdentity_8be2vx$());\n this.put_0(Aes.Companion.ANGLE, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.SLICE, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.EXPLODE, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n }\n DefaultMapperProvider$TypedMapperProviderMap.prototype.get_lkzxyg$ = function (aes) {\n var tmp$;\n return Kotlin.isType(tmp$ = this.myMap_0.get_11rb$(aes), MapperProvider) ? tmp$ : throwCCE();\n };\n DefaultMapperProvider$TypedMapperProviderMap.prototype.put_0 = function (aes, value) {\n this.myMap_0.put_xwzc9p$(aes, value);\n };\n DefaultMapperProvider$TypedMapperProviderMap.prototype.containsKey_5adj56$ = function (aes) {\n return this.myMap_0.containsKey_11rb$(aes);\n };\n function DefaultMapperProvider$TypedMapperProviderMap$Companion() {\n DefaultMapperProvider$TypedMapperProviderMap$Companion_instance = this;\n this.NUMERIC_UNDEFINED_0 = new DefaultMapperProvider$TypedMapperProviderMap$Companion$NUMERIC_UNDEFINED$ObjectLiteral();\n this.NUMERIC_IDENTITY_0 = new DefaultMapperProvider$TypedMapperProviderMap$Companion$NUMERIC_IDENTITY$ObjectLiteral();\n }\n function DefaultMapperProvider$TypedMapperProviderMap$Companion$NUMERIC_UNDEFINED$ObjectLiteral() {\n }\n DefaultMapperProvider$TypedMapperProviderMap$Companion$NUMERIC_UNDEFINED$ObjectLiteral.prototype.createDiscreteMapper_6i94r7$ = function (discreteTransform) {\n return scale.Mappers.NUMERIC_UNDEFINED;\n };\n DefaultMapperProvider$TypedMapperProviderMap$Companion$NUMERIC_UNDEFINED$ObjectLiteral.prototype.createContinuousMapper_j5tjae$ = function (domain, trans) {\n return GuideMappers_getInstance().NUMERIC_UNDEFINED;\n };\n DefaultMapperProvider$TypedMapperProviderMap$Companion$NUMERIC_UNDEFINED$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [MapperProvider]\n };\n function DefaultMapperProvider$TypedMapperProviderMap$Companion$NUMERIC_IDENTITY$ObjectLiteral() {\n }\n DefaultMapperProvider$TypedMapperProviderMap$Companion$NUMERIC_IDENTITY$ObjectLiteral.prototype.createDiscreteMapper_6i94r7$ = function (discreteTransform) {\n return scale.Mappers.IDENTITY;\n };\n DefaultMapperProvider$TypedMapperProviderMap$Companion$NUMERIC_IDENTITY$ObjectLiteral.prototype.createContinuousMapper_j5tjae$ = function (domain, trans) {\n return GuideMappers_getInstance().IDENTITY;\n };\n DefaultMapperProvider$TypedMapperProviderMap$Companion$NUMERIC_IDENTITY$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [MapperProvider]\n };\n DefaultMapperProvider$TypedMapperProviderMap$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var DefaultMapperProvider$TypedMapperProviderMap$Companion_instance = null;\n function DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance() {\n if (DefaultMapperProvider$TypedMapperProviderMap$Companion_instance === null) {\n new DefaultMapperProvider$TypedMapperProviderMap$Companion();\n }\n return DefaultMapperProvider$TypedMapperProviderMap$Companion_instance;\n }\n DefaultMapperProvider$TypedMapperProviderMap.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TypedMapperProviderMap',\n interfaces: []\n };\n DefaultMapperProvider.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'DefaultMapperProvider',\n interfaces: []\n };\n var DefaultMapperProvider_instance = null;\n function DefaultMapperProvider_getInstance() {\n if (DefaultMapperProvider_instance === null) {\n new DefaultMapperProvider();\n }\n return DefaultMapperProvider_instance;\n }\n function DefaultMapperProviderUtil() {\n DefaultMapperProviderUtil_instance = this;\n }\n function DefaultMapperProviderUtil$createColorMapperProvider$ObjectLiteral(closure$discrete, closure$continuous) {\n this.closure$discrete = closure$discrete;\n this.closure$continuous = closure$continuous;\n }\n DefaultMapperProviderUtil$createColorMapperProvider$ObjectLiteral.prototype.createDiscreteMapper_6i94r7$ = function (discreteTransform) {\n return this.closure$discrete.createDiscreteMapper_6i94r7$(discreteTransform);\n };\n DefaultMapperProviderUtil$createColorMapperProvider$ObjectLiteral.prototype.createContinuousMapper_j5tjae$ = function (domain, trans) {\n return this.closure$continuous.createContinuousMapper_j5tjae$(domain, trans);\n };\n DefaultMapperProviderUtil$createColorMapperProvider$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [MapperProvider]\n };\n DefaultMapperProviderUtil.prototype.createColorMapperProvider_8be2vx$ = function () {\n var discrete = new ColorBrewerMapperProvider(null, null, null, Color.Companion.GRAY);\n var continuous = ColorGradientMapperProvider$Companion_getInstance().DEFAULT;\n return new DefaultMapperProviderUtil$createColorMapperProvider$ObjectLiteral(discrete, continuous);\n };\n function DefaultMapperProviderUtil$createWithDiscreteOutput$ObjectLiteral(closure$outputValues, closure$naValue) {\n this.closure$outputValues = closure$outputValues;\n this.closure$naValue = closure$naValue;\n }\n DefaultMapperProviderUtil$createWithDiscreteOutput$ObjectLiteral.prototype.createDiscreteMapper_6i94r7$ = function (discreteTransform) {\n return GuideMappers_getInstance().discreteToDiscrete_qvw28g$(discreteTransform, this.closure$outputValues, this.closure$naValue);\n };\n DefaultMapperProviderUtil$createWithDiscreteOutput$ObjectLiteral.prototype.createContinuousMapper_j5tjae$ = function (domain, trans) {\n return GuideMappers_getInstance().continuousToDiscrete_3kbtej$(scale.MapperUtil.rangeWithLimitsAfterTransform_j5tjae$(domain, trans), this.closure$outputValues, this.closure$naValue);\n };\n DefaultMapperProviderUtil$createWithDiscreteOutput$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [MapperProvider]\n };\n DefaultMapperProviderUtil.prototype.createWithDiscreteOutput_rath1t$ = function (outputValues, naValue) {\n return new DefaultMapperProviderUtil$createWithDiscreteOutput$ObjectLiteral(outputValues, naValue);\n };\n function DefaultMapperProviderUtil$createObjectIdentity$lambda(it) {\n return it;\n }\n function DefaultMapperProviderUtil$createObjectIdentity$ObjectLiteral() {\n }\n DefaultMapperProviderUtil$createObjectIdentity$ObjectLiteral.prototype.invoke_yrwdxb$ = function (v) {\n return v;\n };\n DefaultMapperProviderUtil$createObjectIdentity$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [ScaleMapper]\n };\n DefaultMapperProviderUtil.prototype.createObjectIdentity_8be2vx$ = function () {\n var converter = DefaultMapperProviderUtil$createObjectIdentity$lambda;\n var discreteMapperProvider = new IdentityDiscreteMapperProvider(converter);\n var continuousMapper = new DefaultMapperProviderUtil$createObjectIdentity$ObjectLiteral();\n return new IdentityMapperProvider(discreteMapperProvider, continuousMapper);\n };\n function DefaultMapperProviderUtil$createStringIdentity$lambda(it) {\n return it != null ? it.toString() : null;\n }\n DefaultMapperProviderUtil.prototype.createStringIdentity_8be2vx$ = function () {\n var converter = DefaultMapperProviderUtil$createStringIdentity$lambda;\n return new IdentityDiscreteMapperProvider(converter);\n };\n DefaultMapperProviderUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'DefaultMapperProviderUtil',\n interfaces: []\n };\n var DefaultMapperProviderUtil_instance = null;\n function DefaultMapperProviderUtil_getInstance() {\n if (DefaultMapperProviderUtil_instance === null) {\n new DefaultMapperProviderUtil();\n }\n return DefaultMapperProviderUtil_instance;\n }\n function DefaultNaValue() {\n DefaultNaValue_instance = this;\n this.VALUE_MAP_0 = new TypedKeyHashMap();\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.X, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.Y, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.Z, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.YMIN, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.YMAX, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.COLOR, Color.Companion.GRAY);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.FILL, Color.Companion.GRAY);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.ALPHA, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.SHAPE, point.TinyPointShape);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.LINETYPE, NamedLineType.SOLID);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.SIZE, aes.AesScaling.sizeFromCircleDiameter_14dthe$(1.0));\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.STACKSIZE, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.WIDTH, 1.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.HEIGHT, 1.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.BINWIDTH, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.VIOLINWIDTH, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.WEIGHT, 1.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.INTERCEPT, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.SLOPE, 1.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.XINTERCEPT, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.YINTERCEPT, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.LOWER, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.MIDDLE, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.UPPER, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.SAMPLE, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.QUANTILE, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.MAP_ID, 'empty map_id');\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.FRAME, 'empty frame');\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.SPEED, 10.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.FLOW, 0.1);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.XMIN, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.XMAX, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.XEND, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.YEND, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.LABEL, '-');\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.FAMILY, 'sans-serif');\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.FONTFACE, 'plain');\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.LINEHEIGHT, 1.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.HJUST, 0.5);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.VJUST, 0.5);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.ANGLE, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.SLICE, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.EXPLODE, 0.0);\n }\n DefaultNaValue.prototype.has_896ixz$ = function (aes) {\n return this.VALUE_MAP_0.containsKey_ex36zt$(aes);\n };\n DefaultNaValue.prototype.get_31786j$ = function (aes) {\n return this.VALUE_MAP_0.get_ex36zt$(aes);\n };\n DefaultNaValue.prototype.get_ex36zt$ = function (aes) {\n return this.VALUE_MAP_0.get_ex36zt$(aes);\n };\n DefaultNaValue.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'DefaultNaValue',\n interfaces: []\n };\n var DefaultNaValue_instance = null;\n function DefaultNaValue_getInstance() {\n if (DefaultNaValue_instance === null) {\n new DefaultNaValue();\n }\n return DefaultNaValue_instance;\n }\n function DiscreteOnlyMapperProvider() {\n }\n DiscreteOnlyMapperProvider.prototype.createContinuousMapper_j5tjae$ = function (domain, trans) {\n throw IllegalStateException_init('[' + toString(Kotlin.getKClassFromExpression(this).simpleName) + \"] Can't create mapper for continuous domain \" + domain);\n };\n DiscreteOnlyMapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'DiscreteOnlyMapperProvider',\n interfaces: [MapperProvider]\n };\n function GuideMapper(mapper, isContinuous) {\n this.mapper_6lpy06$_0 = mapper;\n this.isContinuous = isContinuous;\n }\n GuideMapper.prototype.invoke_yrwdxb$ = function (v) {\n return this.mapper_6lpy06$_0.invoke_yrwdxb$(v);\n };\n GuideMapper.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GuideMapper',\n interfaces: [ScaleMapper]\n };\n function MapperProvider() {\n }\n MapperProvider.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'MapperProvider',\n interfaces: []\n };\n function ScaleProvider() {\n }\n ScaleProvider.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'ScaleProvider',\n interfaces: []\n };\n function ScaleProviderBuilder(aes) {\n this.aes_0 = aes;\n this._mapperProvider_0 = null;\n this.myName_0 = null;\n this.myBreaks_0 = null;\n this.myLabels_0 = null;\n this.myLabelFormat_0 = null;\n this.myMultiplicativeExpand_0 = null;\n this.myAdditiveExpand_0 = null;\n this.myLimits_0 = null;\n this.myContinuousTransform_0 = transform.Transforms.IDENTITY;\n this.myBreaksGenerator_0 = null;\n this.myDiscreteDomain_0 = false;\n this.myDiscreteDomainReverse_0 = false;\n var tmp$, tmp$_0;\n tmp$ = this.aes_0;\n if (equals(tmp$, Aes.Companion.X))\n tmp$_0 = Orientation$BOTTOM_getInstance();\n else if (equals(tmp$, Aes.Companion.Y))\n tmp$_0 = Orientation$LEFT_getInstance();\n else\n tmp$_0 = null;\n this.axisOrientation = tmp$_0;\n }\n ScaleProviderBuilder.prototype.name_61zpoe$ = function (name) {\n this.myName_0 = name;\n return this;\n };\n ScaleProviderBuilder.prototype.breaks_pqjuzw$ = function (breaks) {\n this.myBreaks_0 = breaks;\n return this;\n };\n ScaleProviderBuilder.prototype.minorBreaks_NI_d3e2cz$ = function (minorBreaks) {\n throw IllegalStateException_init('Not implemented');\n };\n ScaleProviderBuilder.prototype.labels_mhpeer$ = function (labels) {\n this.myLabels_0 = ArrayList_init_1(labels);\n return this;\n };\n ScaleProviderBuilder.prototype.labelFormat_pdl1vj$ = function (format) {\n this.myLabelFormat_0 = format;\n return this;\n };\n ScaleProviderBuilder.prototype.multiplicativeExpand_14dthe$ = function (v) {\n this.myMultiplicativeExpand_0 = v;\n return this;\n };\n ScaleProviderBuilder.prototype.additiveExpand_14dthe$ = function (v) {\n this.myAdditiveExpand_0 = v;\n return this;\n };\n ScaleProviderBuilder.prototype.limits_9ma18$ = function (v) {\n this.myLimits_0 = v;\n return this;\n };\n ScaleProviderBuilder.prototype.rescaler_NI_za3rmp$ = function (v) {\n throw IllegalStateException_init('Not implemented');\n };\n ScaleProviderBuilder.prototype.oob_NI_za3rmp$ = function (v) {\n throw IllegalStateException_init('Not implemented');\n };\n ScaleProviderBuilder.prototype.continuousTransform_gxz7zd$ = function (v) {\n this.myContinuousTransform_0 = v;\n return this;\n };\n ScaleProviderBuilder.prototype.breaksGenerator_6q5k0b$ = function (v) {\n this.myBreaksGenerator_0 = v;\n return this;\n };\n ScaleProviderBuilder.prototype.guide_NI_za3rmp$ = function (v) {\n throw IllegalStateException_init('Not implemented');\n };\n ScaleProviderBuilder.prototype.discreteDomain_6taknv$ = function (b) {\n this.myDiscreteDomain_0 = b;\n return this;\n };\n ScaleProviderBuilder.prototype.discreteDomainReverse_6taknv$ = function (b) {\n this.myDiscreteDomainReverse_0 = b;\n return this;\n };\n ScaleProviderBuilder.prototype.build = function () {\n return new ScaleProviderBuilder$MyScaleProvider(this);\n };\n function ScaleProviderBuilder$MyScaleProvider(b) {\n this.myName_0 = b.myName_0;\n var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3;\n this.myLabels_0 = (tmp$ = b.myLabels_0) != null ? ArrayList_init_1(tmp$) : null;\n this.myLabelFormat_0 = b.myLabelFormat_0;\n this.myMultiplicativeExpand_0 = b.myMultiplicativeExpand_0;\n this.myAdditiveExpand_0 = b.myAdditiveExpand_0;\n this.myBreaksGenerator_0 = b.myBreaksGenerator_0;\n this.myAes_0 = b.aes_0;\n this.discreteDomain_sylt8i$_0 = b.myDiscreteDomain_0;\n this.discreteDomainReverse_oil12s$_0 = b.myDiscreteDomainReverse_0;\n this.breaks_h22v6v$_0 = (tmp$_0 = b.myBreaks_0) != null ? ArrayList_init_1(tmp$_0) : null;\n this.limits_hmyn8j$_0 = (tmp$_1 = b.myLimits_0) != null ? ArrayList_init_1(tmp$_1) : null;\n this.continuousTransform_hc6st8$_0 = b.myContinuousTransform_0;\n tmp$_2 = b.aes_0;\n if (equals(tmp$_2, Aes.Companion.X)) {\n var orientation = ensureNotNull(b.axisOrientation);\n if (!orientation.isHorizontal) {\n var message = 'Illegal X-axis position: ' + orientation;\n throw IllegalArgumentException_init(message.toString());\n }\n tmp$_3 = orientation;\n } else if (equals(tmp$_2, Aes.Companion.Y)) {\n var orientation_0 = ensureNotNull(b.axisOrientation);\n if (!!orientation_0.isHorizontal) {\n var message_0 = 'Illegal Y-axis position: ' + orientation_0;\n throw IllegalArgumentException_init(message_0.toString());\n }\n tmp$_3 = orientation_0;\n } else\n tmp$_3 = null;\n this.axisOrientation_5l09u2$_0 = tmp$_3;\n }\n Object.defineProperty(ScaleProviderBuilder$MyScaleProvider.prototype, 'discreteDomain', {\n configurable: true,\n get: function () {\n return this.discreteDomain_sylt8i$_0;\n }\n });\n Object.defineProperty(ScaleProviderBuilder$MyScaleProvider.prototype, 'discreteDomainReverse', {\n configurable: true,\n get: function () {\n return this.discreteDomainReverse_oil12s$_0;\n }\n });\n Object.defineProperty(ScaleProviderBuilder$MyScaleProvider.prototype, 'breaks', {\n configurable: true,\n get: function () {\n return this.breaks_h22v6v$_0;\n }\n });\n Object.defineProperty(ScaleProviderBuilder$MyScaleProvider.prototype, 'limits', {\n configurable: true,\n get: function () {\n return this.limits_hmyn8j$_0;\n }\n });\n Object.defineProperty(ScaleProviderBuilder$MyScaleProvider.prototype, 'continuousTransform', {\n configurable: true,\n get: function () {\n return this.continuousTransform_hc6st8$_0;\n }\n });\n Object.defineProperty(ScaleProviderBuilder$MyScaleProvider.prototype, 'axisOrientation', {\n configurable: true,\n get: function () {\n return this.axisOrientation_5l09u2$_0;\n }\n });\n ScaleProviderBuilder$MyScaleProvider.prototype.scaleName_0 = function (variable) {\n var tmp$;\n return (tmp$ = this.myName_0) != null ? tmp$ : variable.label;\n };\n ScaleProviderBuilder$MyScaleProvider.prototype.createScale_nho0uz$ = function (defaultName, discreteTransform) {\n var tmp$;\n var scale_0 = scale.Scales.discreteDomain_l10k79$((tmp$ = this.myName_0) != null ? tmp$ : defaultName, discreteTransform);\n return this.completeScale_0(scale_0);\n };\n ScaleProviderBuilder$MyScaleProvider.prototype.createScale_z70nzq$ = function (defaultName, continuousTransform, continuousRange, guideBreaks) {\n var tmp$;\n var name = (tmp$ = this.myName_0) != null ? tmp$ : defaultName;\n var scale_0 = {v: null};\n scale_0.v = scale.Scales.continuousDomain_shloz7$(name, continuousRange || this.myAes_0.isNumeric);\n if (guideBreaks != null) {\n scale_0.v = scale_0.v.with().breaks_pqjuzw$(guideBreaks.breaks).labelFormatter_h0j1qz$(guideBreaks.formatter).build();\n }\n scale_0.v = scale_0.v.with().continuousTransform_gxz7zd$(continuousTransform).build();\n if (this.myBreaksGenerator_0 != null) {\n scale_0.v = scale_0.v.with().breaksGenerator_6q5k0b$(this.myBreaksGenerator_0).build();\n }\n return this.completeScale_0(scale_0.v);\n };\n ScaleProviderBuilder$MyScaleProvider.prototype.completeScale_0 = function (scale) {\n var with_0 = scale.with();\n if (this.breaks != null) {\n with_0.breaks_pqjuzw$(this.breaks);\n }\n if (this.myLabels_0 != null) {\n with_0.labels_mhpeer$(this.myLabels_0);\n }\n if (this.myLabelFormat_0 != null) {\n with_0.labelFormatter_h0j1qz$(getCallableRef('format', function ($receiver, p1) {\n return $receiver.format_za3rmp$(p1);\n }.bind(null, StringFormat.Companion.forOneArg_86f9bg$(this.myLabelFormat_0))));\n }\n if (this.myMultiplicativeExpand_0 != null) {\n with_0.multiplicativeExpand_14dthe$(this.myMultiplicativeExpand_0);\n }\n if (this.myAdditiveExpand_0 != null) {\n with_0.additiveExpand_14dthe$(this.myAdditiveExpand_0);\n }\n return with_0.build();\n };\n function ScaleProviderBuilder$MyScaleProvider$absentMapper$ObjectLiteral(closure$var) {\n this.closure$var = closure$var;\n }\n ScaleProviderBuilder$MyScaleProvider$absentMapper$ObjectLiteral.prototype.invoke_yrwdxb$ = function (v) {\n throw IllegalStateException_init(\"Mapper for empty data series '\" + this.closure$var.name + \"' was invoked with arg \" + toString(v));\n };\n ScaleProviderBuilder$MyScaleProvider$absentMapper$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [ScaleMapper]\n };\n ScaleProviderBuilder$MyScaleProvider.prototype.absentMapper_0 = function (var_0) {\n return new ScaleProviderBuilder$MyScaleProvider$absentMapper$ObjectLiteral(var_0);\n };\n ScaleProviderBuilder$MyScaleProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'MyScaleProvider',\n interfaces: [ScaleProvider]\n };\n ScaleProviderBuilder.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ScaleProviderBuilder',\n interfaces: []\n };\n function ScaleProviderHelper() {\n ScaleProviderHelper_instance = this;\n }\n ScaleProviderHelper.prototype.createDefault_31786j$ = function (aes) {\n return (new ScaleProviderBuilder(aes)).build();\n };\n ScaleProviderHelper.prototype.createDateTimeScaleProvider_1va84n$ = function (aes, name) {\n return (new ScaleProviderBuilder(aes)).name_61zpoe$(name).breaksGenerator_6q5k0b$(new DateTimeBreaksGen()).build();\n };\n ScaleProviderHelper.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'ScaleProviderHelper',\n interfaces: []\n };\n var ScaleProviderHelper_instance = null;\n function ScaleProviderHelper_getInstance() {\n if (ScaleProviderHelper_instance === null) {\n new ScaleProviderHelper();\n }\n return ScaleProviderHelper_instance;\n }\n function WithGuideBreaks() {\n }\n WithGuideBreaks.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'WithGuideBreaks',\n interfaces: []\n };\n function ColorMapper() {\n ColorMapper_instance = this;\n this.NA_VALUE = Color.Companion.GRAY;\n this.DEF_GRADIENT_LOW = Color.Companion.parseHex_61zpoe$('#132B43');\n this.DEF_GRADIENT_HIGH = Color.Companion.parseHex_61zpoe$('#56B1F7');\n }\n ColorMapper.prototype.gradientDefault_3lmjpf$ = function (domain) {\n return this.gradient_kuiuox$(domain, this.DEF_GRADIENT_LOW, this.DEF_GRADIENT_HIGH, this.NA_VALUE, 1.0);\n };\n ColorMapper.prototype.gradient_kuiuox$ = function (domain, low, high, naColor, alpha) {\n if (alpha === void 0)\n alpha = 1.0;\n return this.gradientHSV_37xr1q$(domain, values.Colors.hsvFromRgb_98b62m$(low), values.Colors.hsvFromRgb_98b62m$(high), true, naColor, alpha);\n };\n function ColorMapper$gradientHSV$lambda(closure$domain, closure$naColor, closure$mapperH, closure$mapperS, closure$mapperV, closure$alpha) {\n return function (input) {\n if (input == null || !closure$domain.contains_14dthe$(input)) {\n return closure$naColor;\n } else {\n var hue = ensureNotNull(closure$mapperH.invoke_yrwdxb$(input)) % 360;\n var H = hue >= 0 ? hue : 360 + hue;\n var S = ensureNotNull(closure$mapperS.invoke_yrwdxb$(input));\n var V = ensureNotNull(closure$mapperV.invoke_yrwdxb$(input));\n return values.Colors.rgbFromHsv_6y0v78$(H, S, V, closure$alpha);\n }\n };\n }\n ColorMapper.prototype.gradientHSV_37xr1q$ = function (domain, lowHSV, highHSV, autoHueDirection, naColor, alpha) {\n if (alpha === void 0)\n alpha = 1.0;\n var lowHue = lowHSV.h;\n var highHue = highHSV.h;\n var lowS = lowHSV.s;\n var highS = highHSV.s;\n if (lowS < 1.0E-4) {\n lowHue = highHue;\n }\n if (highS < 1.0E-4) {\n highHue = lowHue;\n }\n if (autoHueDirection) {\n var x = highHue - lowHue;\n var dH = JsMath.abs(x);\n if (dH > 180) {\n if (highHue >= lowHue) {\n lowHue += 360.0;\n } else {\n highHue += 360.0;\n }\n }\n }\n var mapperH = scale.Mappers.linear_nhuomk$(domain, lowHue, highHue, null);\n var mapperS = scale.Mappers.linear_nhuomk$(domain, lowS, highS, null);\n var mapperV = scale.Mappers.linear_nhuomk$(domain, lowHSV.v, highHSV.v, null);\n return ColorMapper$gradientHSV$lambda(domain, naColor, mapperH, mapperS, mapperV, alpha);\n };\n ColorMapper.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'ColorMapper',\n interfaces: []\n };\n var ColorMapper_instance = null;\n function ColorMapper_getInstance() {\n if (ColorMapper_instance === null) {\n new ColorMapper();\n }\n return ColorMapper_instance;\n }\n function GuideMapperWithGuideBreaks(mapper, breaks, formatter) {\n GuideMapper.call(this, mapper, false);\n this.breaks_3tqv0$_0 = breaks;\n this.formatter_dkp6z6$_0 = formatter;\n }\n Object.defineProperty(GuideMapperWithGuideBreaks.prototype, 'breaks', {\n get: function () {\n return this.breaks_3tqv0$_0;\n }\n });\n Object.defineProperty(GuideMapperWithGuideBreaks.prototype, 'formatter', {\n get: function () {\n return this.formatter_dkp6z6$_0;\n }\n });\n GuideMapperWithGuideBreaks.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GuideMapperWithGuideBreaks',\n interfaces: [GuideMapper, WithGuideBreaks]\n };\n function GuideMappers() {\n GuideMappers_instance = this;\n this.IDENTITY = new GuideMapper(scale.Mappers.IDENTITY, false);\n this.NUMERIC_UNDEFINED = new GuideMapper(scale.Mappers.NUMERIC_UNDEFINED, false);\n }\n function GuideMappers$discreteToDiscrete$lambda(v) {\n return v.toString();\n }\n GuideMappers.prototype.discreteToDiscrete_qvw28g$ = function (discreteTransform, outputValues, naValue) {\n return new GuideMapperWithGuideBreaks(scale.Mappers.discrete_qvw28g$(discreteTransform, outputValues, naValue), discreteTransform.effectiveDomain, GuideMappers$discreteToDiscrete$lambda);\n };\n GuideMappers.prototype.continuousToDiscrete_3kbtej$ = function (domain, outputValues, naValue) {\n var mapper = scale.Mappers.quantized_4lks63$(domain, outputValues, naValue);\n return this.asNotContinuous_6ljcop$(mapper);\n };\n function GuideMappers$discreteToContinuous$lambda(v) {\n return v.toString();\n }\n GuideMappers.prototype.discreteToContinuous_dj8ltc$ = function (discreteTransform, outputRange, naValue) {\n var mapper = scale.Mappers.discreteToContinuous_swidre$(discreteTransform.effectiveDomainTransformed, outputRange, naValue);\n return new GuideMapperWithGuideBreaks(mapper, discreteTransform.effectiveDomain, GuideMappers$discreteToContinuous$lambda);\n };\n GuideMappers.prototype.continuousToContinuous_gd6940$ = function (domain, range, naValue) {\n return this.asContinuous_6ljcop$(scale.Mappers.linear_gd6940$(domain, range, naValue));\n };\n GuideMappers.prototype.asNotContinuous_6ljcop$ = function (mapper) {\n return new GuideMapper(mapper, false);\n };\n GuideMappers.prototype.asContinuous_6ljcop$ = function (mapper) {\n return new GuideMapper(mapper, true);\n };\n GuideMappers.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'GuideMappers',\n interfaces: []\n };\n var GuideMappers_instance = null;\n function GuideMappers_getInstance() {\n if (GuideMappers_instance === null) {\n new GuideMappers();\n }\n return GuideMappers_instance;\n }\n function LineTypeMapper() {\n LineTypeMapper_instance = this;\n this.NA_VALUE = NamedLineType.SOLID;\n }\n LineTypeMapper.prototype.allLineTypes = function () {\n return listOf_0([NamedLineType.SOLID, NamedLineType.DASHED, NamedLineType.DOTTED, NamedLineType.DOTDASH, NamedLineType.LONGDASH, NamedLineType.TWODASH]);\n };\n LineTypeMapper.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'LineTypeMapper',\n interfaces: []\n };\n var LineTypeMapper_instance = null;\n function LineTypeMapper_getInstance() {\n if (LineTypeMapper_instance === null) {\n new LineTypeMapper();\n }\n return LineTypeMapper_instance;\n }\n function ShapeMapper() {\n ShapeMapper_instance = this;\n this.NA_VALUE = point.TinyPointShape;\n }\n ShapeMapper.prototype.allShapes = function () {\n var bestSix = listOf_0([NamedShape.SOLID_CIRCLE, NamedShape.SOLID_TRIANGLE_UP, NamedShape.SOLID_SQUARE, NamedShape.STICK_PLUS, NamedShape.STICK_SQUARE_CROSS, NamedShape.STICK_STAR]);\n var theRest = LinkedHashSet_init_0(listOf_0(NamedShape$values().slice()));\n theRest.removeAll_brywnq$(bestSix);\n var shapes = ArrayList_init_1(bestSix);\n shapes.addAll_brywnq$(theRest);\n return shapes;\n };\n ShapeMapper.prototype.hollowShapes = function () {\n var tmp$;\n var bestThreeHollow = listOf_0([NamedShape.STICK_CIRCLE, NamedShape.STICK_TRIANGLE_UP, NamedShape.STICK_SQUARE]);\n var theRest = LinkedHashSet_init_0(listOf_0(NamedShape$values().slice()));\n theRest.removeAll_brywnq$(bestThreeHollow);\n var shapes = ArrayList_init_1(bestThreeHollow);\n tmp$ = theRest.iterator();\n while (tmp$.hasNext()) {\n var shape = tmp$.next();\n if (shape.isHollow) {\n shapes.add_11rb$(shape);\n }\n }\n return shapes;\n };\n ShapeMapper.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'ShapeMapper',\n interfaces: []\n };\n var ShapeMapper_instance = null;\n function ShapeMapper_getInstance() {\n if (ShapeMapper_instance === null) {\n new ShapeMapper();\n }\n return ShapeMapper_instance;\n }\n function AlphaMapperProvider(range, naValue) {\n AlphaMapperProvider$Companion_getInstance();\n LinearNormalizingMapperProvider.call(this, range, naValue);\n }\n function AlphaMapperProvider$Companion() {\n AlphaMapperProvider$Companion_instance = this;\n this.DEF_RANGE_0 = new DoubleSpan(0.1, 1.0);\n this.DEFAULT = new AlphaMapperProvider(this.DEF_RANGE_0, DefaultNaValue_getInstance().get_31786j$(Aes.Companion.ALPHA));\n }\n AlphaMapperProvider$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var AlphaMapperProvider$Companion_instance = null;\n function AlphaMapperProvider$Companion_getInstance() {\n if (AlphaMapperProvider$Companion_instance === null) {\n new AlphaMapperProvider$Companion();\n }\n return AlphaMapperProvider$Companion_instance;\n }\n AlphaMapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'AlphaMapperProvider',\n interfaces: [LinearNormalizingMapperProvider]\n };\n function ColorBrewerMapperProvider(paletteTypeName, paletteNameOrIndex, direction, naValue) {\n ColorBrewerMapperProvider$Companion_getInstance();\n MapperProviderBase.call(this, naValue);\n this.paletteTypeName_0 = paletteTypeName;\n this.paletteNameOrIndex_0 = paletteNameOrIndex;\n this.direction_0 = direction;\n var tmp$;\n if (!((tmp$ = this.paletteNameOrIndex_0 != null ? typeof this.paletteNameOrIndex_0 === 'string' || Kotlin.isNumber(this.paletteNameOrIndex_0) : null) != null ? tmp$ : true)) {\n var message = ColorBrewerMapperProvider_init$lambda(this)();\n throw IllegalArgumentException_init(message.toString());\n }\n if (Kotlin.isNumber(this.paletteNameOrIndex_0)) {\n if (!(this.paletteTypeName_0 != null)) {\n var message_0 = \"brewer palette type required: 'seq', 'div' or 'qual'.\";\n throw IllegalArgumentException_init(message_0.toString());\n }\n }\n }\n ColorBrewerMapperProvider.prototype.createDiscreteMapper_6i94r7$ = function (discreteTransform) {\n var n = discreteTransform.effectiveDomain.size;\n var colorScheme = this.colorScheme_0(true, n);\n var colors = this.colors_0(colorScheme, n);\n return GuideMappers_getInstance().discreteToDiscrete_qvw28g$(discreteTransform, colors, this.naValue);\n };\n ColorBrewerMapperProvider.prototype.createContinuousMapper_j5tjae$ = function (domain, trans) {\n var colorScheme = this.colorScheme_0(false);\n var colors = this.colors_0(colorScheme, colorScheme.maxColors);\n var domain_0 = scale.MapperUtil.rangeWithLimitsAfterTransform_j5tjae$(domain, trans);\n return GuideMappers_getInstance().continuousToDiscrete_3kbtej$(domain_0, colors, this.naValue);\n };\n ColorBrewerMapperProvider.prototype.colors_0 = function (colorScheme, count) {\n var tmp$, tmp$_0, tmp$_1;\n var colors = color.PaletteUtil.schemeColors_7q5c77$(colorScheme, count);\n tmp$_0 = (tmp$ = this.direction_0 != null ? this.direction_0 < 0 : null) != null ? tmp$ : false;\n if (tmp$_0 === true)\n tmp$_1 = reversed(colors);\n else if (tmp$_0 === false)\n tmp$_1 = colors;\n else\n tmp$_1 = Kotlin.noWhenBranchMatched();\n return tmp$_1;\n };\n ColorBrewerMapperProvider.prototype.colorScheme_0 = function (discrete, colorCount) {\n if (colorCount === void 0)\n colorCount = null;\n var tmp$, tmp$_0;\n if (typeof this.paletteNameOrIndex_0 === 'string') {\n var palType = color.PaletteUtil.paletteTypeByPaletteName_61zpoe$(this.paletteNameOrIndex_0);\n if (!(palType != null)) {\n var message = ColorBrewerMapperProvider$Companion_getInstance().cantFindPaletteError_0(this.paletteNameOrIndex_0);\n throw IllegalArgumentException_init(message.toString());\n }\n tmp$ = palType;\n } else if (this.paletteTypeName_0 != null)\n tmp$ = ColorBrewerMapperProvider$Companion_getInstance().paletteType_0(this.paletteTypeName_0);\n else if (discrete)\n tmp$ = ColorPalette$Type.QUALITATIVE;\n else\n tmp$ = ColorPalette$Type.SEQUENTIAL;\n var paletteType = tmp$;\n if (Kotlin.isNumber(this.paletteNameOrIndex_0))\n tmp$_0 = color.PaletteUtil.colorSchemeByIndex_vfydh1$(paletteType, numberToInt(this.paletteNameOrIndex_0));\n else if (typeof this.paletteNameOrIndex_0 === 'string')\n tmp$_0 = ColorBrewerMapperProvider$Companion_getInstance().colorSchemeByName_0(paletteType, this.paletteNameOrIndex_0);\n else if (paletteType === ColorPalette$Type.QUALITATIVE)\n tmp$_0 = colorCount != null && colorCount <= ColorPalette$Qualitative.Set2.maxColors ? ColorPalette$Qualitative.Set2 : ColorPalette$Qualitative.Set3;\n else\n tmp$_0 = color.PaletteUtil.colorSchemeByIndex_vfydh1$(paletteType, 0);\n return tmp$_0;\n };\n function ColorBrewerMapperProvider$Companion() {\n ColorBrewerMapperProvider$Companion_instance = this;\n }\n ColorBrewerMapperProvider$Companion.prototype.paletteType_0 = function (name) {\n var tmp$;\n if (name == null) {\n return ColorPalette$Type.SEQUENTIAL;\n }\n switch (name) {\n case 'seq':\n tmp$ = ColorPalette$Type.SEQUENTIAL;\n break;\n case 'div':\n tmp$ = ColorPalette$Type.DIVERGING;\n break;\n case 'qual':\n tmp$ = ColorPalette$Type.QUALITATIVE;\n break;\n default:\n throw IllegalArgumentException_init(\"Palette type expected one of 'seq' (sequential), 'div' (diverging) or 'qual' (qualitative) but was: '\" + toString(name) + \"'\");\n }\n return tmp$;\n };\n ColorBrewerMapperProvider$Companion.prototype.colorSchemeByName_0 = function (paletteType, paletteName) {\n var tmp$;\n try {\n switch (paletteType.name) {\n case 'SEQUENTIAL':\n tmp$ = ColorPalette$Sequential$valueOf(paletteName);\n break;\n case 'DIVERGING':\n tmp$ = ColorPalette$Diverging$valueOf(paletteName);\n break;\n case 'QUALITATIVE':\n tmp$ = ColorPalette$Qualitative$valueOf(paletteName);\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n } catch (ignore) {\n if (Kotlin.isType(ignore, IllegalArgumentException)) {\n throw IllegalArgumentException_init(this.cantFindPaletteError_0(paletteName));\n } else\n throw ignore;\n }\n };\n ColorBrewerMapperProvider$Companion.prototype.cantFindPaletteError_0 = function (paletteName) {\n return trimMargin('\\n' + \" |Brewer palette '\" + paletteName + \"' was not found. \" + '\\n' + ' |Valid palette names are: ' + '\\n' + \" | Type 'seq' (sequential): \" + '\\n' + ' | ' + this.names_0(ColorPalette$Sequential$values()) + ' ' + '\\n' + \" | Type 'div' (diverging): \" + '\\n' + ' | ' + this.names_0(ColorPalette$Diverging$values()) + ' ' + '\\n' + \" | Type 'qual' (qualitative): \" + '\\n' + ' | ' + this.names_0(ColorPalette$Qualitative$values()) + ' ' + '\\n' + ' ');\n };\n function ColorBrewerMapperProvider$Companion$names$lambda(it) {\n return \"'\" + it.name + \"'\";\n }\n ColorBrewerMapperProvider$Companion.prototype.names_0 = function (enums) {\n return joinToString(enums, ', ', void 0, void 0, void 0, void 0, ColorBrewerMapperProvider$Companion$names$lambda);\n };\n ColorBrewerMapperProvider$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ColorBrewerMapperProvider$Companion_instance = null;\n function ColorBrewerMapperProvider$Companion_getInstance() {\n if (ColorBrewerMapperProvider$Companion_instance === null) {\n new ColorBrewerMapperProvider$Companion();\n }\n return ColorBrewerMapperProvider$Companion_instance;\n }\n function ColorBrewerMapperProvider_init$lambda(this$ColorBrewerMapperProvider) {\n return function () {\n return 'palette: expected a name or index but was: ' + toString(Kotlin.getKClassFromExpression(ensureNotNull(this$ColorBrewerMapperProvider.paletteNameOrIndex_0)).simpleName);\n };\n }\n ColorBrewerMapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ColorBrewerMapperProvider',\n interfaces: [MapperProviderBase]\n };\n function ColorGradient2MapperProvider(low, mid, high, midpoint, naValue) {\n ColorGradient2MapperProvider$Companion_getInstance();\n ContinuousOnlyMapperProvider.call(this, naValue);\n this.myLow_0 = null;\n this.myMid_0 = null;\n this.myHigh_0 = null;\n this.myMidpoint_0 = null;\n this.myLow_0 = low != null ? low : ColorGradient2MapperProvider$Companion_getInstance().DEF_GRADIENT_LOW_0;\n this.myMid_0 = mid != null ? mid : ColorGradient2MapperProvider$Companion_getInstance().DEF_GRADIENT_MID_0;\n this.myHigh_0 = high != null ? high : ColorGradient2MapperProvider$Companion_getInstance().DEF_GRADIENT_HIGH_0;\n this.myMidpoint_0 = midpoint != null ? midpoint : 0.0;\n }\n function ColorGradient2MapperProvider$createContinuousMapper$getMapper(closure$rangeMap) {\n return function (v) {\n var tmp$;\n var f = null;\n if (data_0.SeriesUtil.isFinite_yrwdxb$(v)) {\n var fSpan = kotlin_js_internal_DoubleCompanionObject.NaN;\n tmp$ = closure$rangeMap.keys.iterator();\n while (tmp$.hasNext()) {\n var range = tmp$.next();\n if (range.contains_14dthe$(ensureNotNull(v))) {\n var span = range.upperEnd - range.lowerEnd;\n if (f == null || fSpan === 0.0) {\n f = closure$rangeMap.get_11rb$(range);\n fSpan = span;\n } else if (span < fSpan && span > 0) {\n f = closure$rangeMap.get_11rb$(range);\n fSpan = span;\n }\n }\n }\n }\n return f;\n };\n }\n function ColorGradient2MapperProvider$createContinuousMapper$ObjectLiteral(closure$getMapper, this$ColorGradient2MapperProvider) {\n this.closure$getMapper = closure$getMapper;\n this.this$ColorGradient2MapperProvider = this$ColorGradient2MapperProvider;\n }\n ColorGradient2MapperProvider$createContinuousMapper$ObjectLiteral.prototype.invoke_yrwdxb$ = function (v) {\n var tmp$;\n var mapper = this.closure$getMapper(v);\n return (tmp$ = mapper != null ? mapper(v) : null) != null ? tmp$ : this.this$ColorGradient2MapperProvider.naValue;\n };\n ColorGradient2MapperProvider$createContinuousMapper$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [ScaleMapper]\n };\n ColorGradient2MapperProvider.prototype.createContinuousMapper_j5tjae$ = function (domain, trans) {\n var domain_0 = scale.MapperUtil.rangeWithLimitsAfterTransform_j5tjae$(domain, trans);\n var tmp$ = domain_0.lowerEnd;\n var a = ensureNotNull(this.myMidpoint_0);\n var b = domain_0.lowerEnd;\n var lowDomain = new DoubleSpan(tmp$, JsMath.max(a, b));\n var a_0 = this.myMidpoint_0;\n var b_0 = domain_0.upperEnd;\n var highDomain = new DoubleSpan(JsMath.min(a_0, b_0), domain_0.upperEnd);\n var lowMapper = ColorMapper_getInstance().gradient_kuiuox$(lowDomain, this.myLow_0, this.myMid_0, this.naValue);\n var highMapper = ColorMapper_getInstance().gradient_kuiuox$(highDomain, this.myMid_0, this.myHigh_0, this.naValue);\n var rangeMap = mapOf([to(lowDomain, lowMapper), to(highDomain, highMapper)]);\n var getMapper = ColorGradient2MapperProvider$createContinuousMapper$getMapper(rangeMap);\n var scaleMapper = new ColorGradient2MapperProvider$createContinuousMapper$ObjectLiteral(getMapper, this);\n return GuideMappers_getInstance().asContinuous_6ljcop$(scaleMapper);\n };\n function ColorGradient2MapperProvider$Companion() {\n ColorGradient2MapperProvider$Companion_instance = this;\n this.DEF_GRADIENT_LOW_0 = Color.Companion.parseHex_61zpoe$('#964540');\n this.DEF_GRADIENT_MID_0 = Color.Companion.WHITE;\n this.DEF_GRADIENT_HIGH_0 = Color.Companion.parseHex_61zpoe$('#3B3D96');\n }\n ColorGradient2MapperProvider$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ColorGradient2MapperProvider$Companion_instance = null;\n function ColorGradient2MapperProvider$Companion_getInstance() {\n if (ColorGradient2MapperProvider$Companion_instance === null) {\n new ColorGradient2MapperProvider$Companion();\n }\n return ColorGradient2MapperProvider$Companion_instance;\n }\n ColorGradient2MapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ColorGradient2MapperProvider',\n interfaces: [ContinuousOnlyMapperProvider]\n };\n function ColorGradientMapperProvider(low, high, naValue) {\n ColorGradientMapperProvider$Companion_getInstance();\n MapperProviderBase.call(this, naValue);\n this.low_0 = low != null ? low : ColorMapper_getInstance().DEF_GRADIENT_LOW;\n this.high_0 = high != null ? high : ColorMapper_getInstance().DEF_GRADIENT_HIGH;\n }\n ColorGradientMapperProvider.prototype.createDiscreteMapper_6i94r7$ = function (discreteTransform) {\n var transformedDomain = discreteTransform.effectiveDomainTransformed;\n var mapperDomain = ensureNotNull(data_0.SeriesUtil.range_l63ks6$(transformedDomain));\n var gradient = ColorMapper_getInstance().gradient_kuiuox$(mapperDomain, this.low_0, this.high_0, this.naValue);\n return GuideMappers_getInstance().asNotContinuous_6ljcop$(ScaleMapper.Companion.wrap_rjdepr$(gradient));\n };\n ColorGradientMapperProvider.prototype.createContinuousMapper_j5tjae$ = function (domain, trans) {\n var domain_0 = scale.MapperUtil.rangeWithLimitsAfterTransform_j5tjae$(domain, trans);\n var gradient = ColorMapper_getInstance().gradient_kuiuox$(domain_0, this.low_0, this.high_0, this.naValue);\n return GuideMappers_getInstance().asContinuous_6ljcop$(ScaleMapper.Companion.wrap_rjdepr$(gradient));\n };\n function ColorGradientMapperProvider$Companion() {\n ColorGradientMapperProvider$Companion_instance = this;\n this.DEFAULT = new ColorGradientMapperProvider(null, null, ColorMapper_getInstance().NA_VALUE);\n }\n ColorGradientMapperProvider$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ColorGradientMapperProvider$Companion_instance = null;\n function ColorGradientMapperProvider$Companion_getInstance() {\n if (ColorGradientMapperProvider$Companion_instance === null) {\n new ColorGradientMapperProvider$Companion();\n }\n return ColorGradientMapperProvider$Companion_instance;\n }\n ColorGradientMapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ColorGradientMapperProvider',\n interfaces: [MapperProviderBase]\n };\n function ColorGradientnMapperProvider(colors, naValue) {\n ColorGradientnMapperProvider$Companion_getInstance();\n MapperProviderBase.call(this, naValue);\n this.colors_0 = colors;\n if (!(this.colors_0.size > 1)) {\n var message = 'gradient requires colors list with two or more elements';\n throw IllegalArgumentException_init(message.toString());\n }\n }\n ColorGradientnMapperProvider.prototype.createDiscreteMapper_6i94r7$ = function (discreteTransform) {\n var transformedDomain = discreteTransform.effectiveDomainTransformed;\n var mapperDomain = ensureNotNull(data_0.SeriesUtil.range_l63ks6$(transformedDomain));\n var gradient = ColorGradientnMapperProvider$Companion_getInstance().createGradient_b0eetf$(mapperDomain, this.colors_0, this.naValue);\n return GuideMappers_getInstance().asNotContinuous_6ljcop$(ScaleMapper.Companion.wrap_rjdepr$(gradient));\n };\n ColorGradientnMapperProvider.prototype.createContinuousMapper_j5tjae$ = function (domain, trans) {\n var domain_0 = scale.MapperUtil.rangeWithLimitsAfterTransform_j5tjae$(domain, trans);\n var gradient = ColorGradientnMapperProvider$Companion_getInstance().createGradient_b0eetf$(domain_0, this.colors_0, this.naValue);\n return GuideMappers_getInstance().asContinuous_6ljcop$(ScaleMapper.Companion.wrap_rjdepr$(gradient));\n };\n function ColorGradientnMapperProvider$Companion() {\n ColorGradientnMapperProvider$Companion_instance = this;\n }\n function ColorGradientnMapperProvider$Companion$createGradient$lambda(closure$naColor, closure$subdomainEnds, closure$mappers) {\n return function (value) {\n var tmp$;\n if (value == null || !isFinite(value))\n return closure$naColor;\n else if (value < first(closure$subdomainEnds) || value > last(closure$subdomainEnds))\n return closure$naColor;\n else {\n var i = binarySearch(closure$subdomainEnds, value);\n if (i < 0)\n tmp$ = abs(i + 1 | 0) - 1 | 0;\n else {\n var b = get_lastIndex(closure$mappers);\n tmp$ = JsMath.min(i, b);\n }\n var subdomainIndex = tmp$;\n return closure$mappers.get_za3lpa$(subdomainIndex)(value);\n }\n };\n }\n ColorGradientnMapperProvider$Companion.prototype.createGradient_b0eetf$ = function (domain, colors, naColor, alpha) {\n if (alpha === void 0)\n alpha = 1.0;\n var subdomainsCount = colors.size - 1 | 0;\n var subdomainLength = domain.length / subdomainsCount;\n var $receiver = until(0, subdomainsCount);\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n destination.add_11rb$(domain.lowerEnd + subdomainLength * item);\n }\n var subdomainEnds = plus(destination, listOf(domain.upperEnd));\n var $receiver_0 = windowed(zip(subdomainEnds, colors), 2);\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault($receiver_0, 10));\n var tmp$_0;\n tmp$_0 = $receiver_0.iterator();\n while (tmp$_0.hasNext()) {\n var item_0 = tmp$_0.next();\n var tmp$_1 = destination_0.add_11rb$;\n var low = item_0.get_za3lpa$(0);\n var high = item_0.get_za3lpa$(1);\n var lowValue = low.component1()\n , lowColor = low.component2();\n var highValue = high.component1()\n , highColor = high.component2();\n var subdomain = new DoubleSpan(lowValue, highValue);\n tmp$_1.call(destination_0, ColorMapper_getInstance().gradient_kuiuox$(subdomain, lowColor, highColor, naColor, alpha));\n }\n var mappers = destination_0;\n return ColorGradientnMapperProvider$Companion$createGradient$lambda(naColor, subdomainEnds, mappers);\n };\n ColorGradientnMapperProvider$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ColorGradientnMapperProvider$Companion_instance = null;\n function ColorGradientnMapperProvider$Companion_getInstance() {\n if (ColorGradientnMapperProvider$Companion_instance === null) {\n new ColorGradientnMapperProvider$Companion();\n }\n return ColorGradientnMapperProvider$Companion_instance;\n }\n ColorGradientnMapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ColorGradientnMapperProvider',\n interfaces: [MapperProviderBase]\n };\n function ColorHueMapperProvider(hueRange, chroma, luminance, startHue, direction, naValue) {\n ColorHueMapperProvider$Companion_getInstance();\n HSVColorMapperProvider.call(this, naValue);\n this.myFromHSV_0 = null;\n this.myToHSV_0 = null;\n this.myHSVIntervals_0 = null;\n var tmp$;\n var hueRange_0 = ColorHueMapperProvider$Companion_getInstance().normalizeHueRange_0(hueRange);\n var clockwise = direction == null || direction !== -1.0;\n var fromHue = clockwise ? hueRange_0.lowerEnd : hueRange_0.upperEnd;\n var toHue = clockwise ? hueRange_0.upperEnd : hueRange_0.lowerEnd;\n var startHue_0 = startHue != null ? startHue : ColorHueMapperProvider$Companion_getInstance().DEF_START_HUE_0;\n if (hueRange_0.contains_14dthe$(startHue_0) && startHue_0 - hueRange_0.lowerEnd > 1 && hueRange_0.upperEnd - startHue_0 > 1) {\n tmp$ = listOf_0([to(startHue_0, toHue), to(fromHue, startHue_0)]);\n } else {\n tmp$ = listOf(to(fromHue, toHue));\n }\n var hueIntervals = tmp$;\n var saturation = (chroma != null ? chroma % 100 : ColorHueMapperProvider$Companion_getInstance().DEF_SATURATION_0) / 100;\n var value = (luminance != null ? luminance % 100 : ColorHueMapperProvider$Companion_getInstance().DEF_VALUE_0) / 100;\n var destination = ArrayList_init_0(collectionSizeOrDefault(hueIntervals, 10));\n var tmp$_0;\n tmp$_0 = hueIntervals.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n destination.add_11rb$(to(new HSV(item.first, saturation, value), new HSV(item.second, saturation, value)));\n }\n this.myHSVIntervals_0 = destination;\n this.myFromHSV_0 = new HSV(fromHue, saturation, value);\n this.myToHSV_0 = new HSV(toHue, saturation, value);\n }\n ColorHueMapperProvider.prototype.createDiscreteMapper_6i94r7$ = function (discreteTransform) {\n return this.createDiscreteMapper_wikmj1$(discreteTransform.effectiveDomainTransformed, this.myFromHSV_0, this.myToHSV_0);\n };\n ColorHueMapperProvider.prototype.createContinuousMapper_j5tjae$ = function (domain, trans) {\n var domain_0 = scale.MapperUtil.rangeWithLimitsAfterTransform_j5tjae$(domain, trans);\n return this.createContinuousMapper_8wifwj$(domain_0, this.myHSVIntervals_0);\n };\n function ColorHueMapperProvider$Companion() {\n ColorHueMapperProvider$Companion_instance = this;\n this.DEF_SATURATION_0 = 50.0;\n this.DEF_VALUE_0 = 90.0;\n this.DEF_START_HUE_0 = 0.0;\n this.DEF_HUE_RANGE_0 = new DoubleSpan(15.0, 375.0);\n this.DEFAULT = new ColorHueMapperProvider(null, null, null, null, null, Color.Companion.GRAY);\n }\n ColorHueMapperProvider$Companion.prototype.normalizeHueRange_0 = function (hueRange) {\n var tmp$;\n if (hueRange == null || hueRange.size !== 2) {\n tmp$ = this.DEF_HUE_RANGE_0;\n } else {\n var a = hueRange.get_za3lpa$(0);\n var b = hueRange.get_za3lpa$(1);\n var tmp$_0 = JsMath.min(a, b);\n var a_0 = hueRange.get_za3lpa$(0);\n var b_0 = hueRange.get_za3lpa$(1);\n tmp$ = new DoubleSpan(tmp$_0, JsMath.max(a_0, b_0));\n }\n return tmp$;\n };\n ColorHueMapperProvider$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ColorHueMapperProvider$Companion_instance = null;\n function ColorHueMapperProvider$Companion_getInstance() {\n if (ColorHueMapperProvider$Companion_instance === null) {\n new ColorHueMapperProvider$Companion();\n }\n return ColorHueMapperProvider$Companion_instance;\n }\n ColorHueMapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ColorHueMapperProvider',\n interfaces: [HSVColorMapperProvider]\n };\n function ColormapMapperProvider(cmapName, alpha, begin, end, direction, naValue) {\n MapperProviderBase.call(this, naValue);\n this.direction_0 = direction;\n this.cmapName_0 = cmapName != null ? cmapName : colormap.ColorMaps.VIRIDIS;\n this.alpha_0 = alpha != null ? alpha : 1.0;\n this.begin_0 = begin != null ? begin : 0.0;\n this.end_0 = end != null ? end : 1.0;\n var r01 = new DoubleSpan(0.0, 1.0);\n if (!r01.contains_14dthe$(this.alpha_0)) {\n var message = \"'alpha' should be in range [0..1]\";\n throw IllegalArgumentException_init(message.toString());\n }\n if (!r01.contains_14dthe$(this.begin_0)) {\n var message_0 = \"'begin' should be in range [0..1]\";\n throw IllegalArgumentException_init(message_0.toString());\n }\n if (!r01.contains_14dthe$(this.end_0)) {\n var message_1 = \"'end' should be in range [0..1]\";\n throw IllegalArgumentException_init(message_1.toString());\n }\n }\n ColormapMapperProvider.prototype.createDiscreteMapper_6i94r7$ = function (discreteTransform) {\n var n = discreteTransform.effectiveDomain.size;\n var colors = this.colors_0(n);\n return GuideMappers_getInstance().discreteToDiscrete_qvw28g$(discreteTransform, colors, this.naValue);\n };\n ColormapMapperProvider.prototype.createContinuousMapper_j5tjae$ = function (domain, trans) {\n var colors = this.colors_0(null);\n var domain_0 = scale.MapperUtil.rangeWithLimitsAfterTransform_j5tjae$(domain, trans);\n var gradient = ColorGradientnMapperProvider$Companion_getInstance().createGradient_b0eetf$(domain_0, colors, this.naValue, this.alpha_0);\n return GuideMappers_getInstance().asContinuous_6ljcop$(ScaleMapper.Companion.wrap_rjdepr$(gradient));\n };\n ColormapMapperProvider.prototype.colors_0 = function (n) {\n if (n === void 0)\n n = null;\n var tmp$, tmp$_0, tmp$_1;\n var colors = colormap.ColorMaps.getColors_kb58nm$(this.cmapName_0, this.alpha_0, new DoubleSpan(this.begin_0, this.end_0), n);\n tmp$_0 = (tmp$ = this.direction_0 != null ? this.direction_0 < 0 : null) != null ? tmp$ : false;\n if (tmp$_0 === true)\n tmp$_1 = reversed(colors);\n else if (tmp$_0 === false)\n tmp$_1 = colors;\n else\n tmp$_1 = Kotlin.noWhenBranchMatched();\n return tmp$_1;\n };\n ColormapMapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ColormapMapperProvider',\n interfaces: [MapperProviderBase]\n };\n function DirectlyProportionalMapperProvider(max, naValue) {\n ContinuousOnlyMapperProvider.call(this, naValue);\n this.max_ks8piw$_0 = max;\n }\n DirectlyProportionalMapperProvider.prototype.createContinuousMapper_j5tjae$ = function (domain, trans) {\n var dataMax = scale.MapperUtil.rangeWithLimitsAfterTransform_j5tjae$(domain, trans).upperEnd;\n return GuideMappers_getInstance().continuousToContinuous_gd6940$(new DoubleSpan(0.0, dataMax), new DoubleSpan(0.0, this.max_ks8piw$_0), this.naValue);\n };\n DirectlyProportionalMapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'DirectlyProportionalMapperProvider',\n interfaces: [ContinuousOnlyMapperProvider]\n };\n function GreyscaleLightnessMapperProvider(start, end, naValue) {\n GreyscaleLightnessMapperProvider$Companion_getInstance();\n HSVColorMapperProvider.call(this, naValue);\n this.myFromHSV_0 = null;\n this.myToHSV_0 = null;\n var value0 = start != null ? start : GreyscaleLightnessMapperProvider$Companion_getInstance().DEF_START_0;\n var value1 = end != null ? end : GreyscaleLightnessMapperProvider$Companion_getInstance().DEF_END_0;\n if (!rangeTo(0.0, 1.0).contains_mef7kx$(value0)) {\n var message = \"Value of 'start' must be in range: [0,1]: \" + toString(start);\n throw IllegalArgumentException_init(message.toString());\n }\n if (!rangeTo(0.0, 1.0).contains_mef7kx$(value1)) {\n var message_0 = \"Value of 'end' must be in range: [0,1]: \" + toString(end);\n throw IllegalArgumentException_init(message_0.toString());\n }\n this.myFromHSV_0 = new HSV(0.0, 0.0, value0);\n this.myToHSV_0 = new HSV(0.0, 0.0, value1);\n }\n GreyscaleLightnessMapperProvider.prototype.createDiscreteMapper_6i94r7$ = function (discreteTransform) {\n return this.createDiscreteMapper_wikmj1$(discreteTransform.effectiveDomainTransformed, this.myFromHSV_0, this.myToHSV_0);\n };\n GreyscaleLightnessMapperProvider.prototype.createContinuousMapper_j5tjae$ = function (domain, trans) {\n var domain_0 = scale.MapperUtil.rangeWithLimitsAfterTransform_j5tjae$(domain, trans);\n return this.createContinuousMapper_8wifwj$(domain_0, listOf(to(this.myFromHSV_0, this.myToHSV_0)));\n };\n function GreyscaleLightnessMapperProvider$Companion() {\n GreyscaleLightnessMapperProvider$Companion_instance = this;\n this.DEF_START_0 = 0.2;\n this.DEF_END_0 = 0.8;\n }\n GreyscaleLightnessMapperProvider$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var GreyscaleLightnessMapperProvider$Companion_instance = null;\n function GreyscaleLightnessMapperProvider$Companion_getInstance() {\n if (GreyscaleLightnessMapperProvider$Companion_instance === null) {\n new GreyscaleLightnessMapperProvider$Companion();\n }\n return GreyscaleLightnessMapperProvider$Companion_instance;\n }\n GreyscaleLightnessMapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GreyscaleLightnessMapperProvider',\n interfaces: [HSVColorMapperProvider]\n };\n function HSVColorMapperProvider(naValue) {\n HSVColorMapperProvider$Companion_getInstance();\n MapperProviderBase.call(this, naValue);\n }\n HSVColorMapperProvider.prototype.createDiscreteMapper_wikmj1$ = function (transformedDomain, fromHSV, toHSV) {\n var mapperDomain = data_0.SeriesUtil.ensureApplicableRange_w2blas$(data_0.SeriesUtil.range_l63ks6$(transformedDomain));\n var n = transformedDomain.size;\n var newFromHue = fromHSV.h;\n var newToHue = toHSV.h;\n if (n > 1) {\n var x = toHSV.h % 360 - fromHSV.h % 360;\n var hueDiff = JsMath.abs(x);\n var step = (toHSV.h - fromHSV.h) / n;\n if (hueDiff < JsMath.abs(step) / 2) {\n newFromHue = fromHSV.h + step / 2;\n newToHue = toHSV.h - step / 2;\n }\n }\n var gradient = ColorMapper_getInstance().gradientHSV_37xr1q$(mapperDomain, new HSV(newFromHue, fromHSV.s, fromHSV.v), new HSV(newToHue, toHSV.s, toHSV.v), false, this.naValue, 1.0);\n return GuideMappers_getInstance().asNotContinuous_6ljcop$(ScaleMapper.Companion.wrap_rjdepr$(gradient));\n };\n HSVColorMapperProvider.prototype.createContinuousMapper_8wifwj$ = function (domain, hsvIntervals) {\n var tmp$;\n switch (hsvIntervals.size) {\n case 0:\n throw IllegalArgumentException_init('Empty HSV intervals.');\n case 1:\n tmp$ = ColorMapper_getInstance().gradientHSV_37xr1q$(domain, hsvIntervals.get_za3lpa$(0).first, hsvIntervals.get_za3lpa$(0).second, false, this.naValue, 1.0);\n break;\n default:\n tmp$ = HSVColorMapperProvider$Companion_getInstance().createCompositeColorMapper_0(domain, hsvIntervals, false, this.naValue);\n break;\n }\n var gradientMapper = tmp$;\n return GuideMappers_getInstance().asContinuous_6ljcop$(ScaleMapper.Companion.wrap_rjdepr$(gradientMapper));\n };\n function HSVColorMapperProvider$Companion() {\n HSVColorMapperProvider$Companion_instance = this;\n }\n function HSVColorMapperProvider$Companion$createCompositeColorMapper$lambda(closure$naColor, closure$colorMappersPerSubDomain) {\n return function (v) {\n var tmp$, tmp$_0;\n if (v == null) {\n return closure$naColor;\n } else {\n var $receiver = closure$colorMappersPerSubDomain;\n var firstOrNull$result;\n firstOrNull$break: do {\n var tmp$_1;\n tmp$_1 = $receiver.iterator();\n while (tmp$_1.hasNext()) {\n var element = tmp$_1.next();\n if (element.first.contains_14dthe$(v)) {\n firstOrNull$result = element;\n break firstOrNull$break;\n }\n }\n firstOrNull$result = null;\n }\n while (false);\n var mapper = (tmp$ = firstOrNull$result) != null ? tmp$.second : null;\n return (tmp$_0 = mapper != null ? mapper(v) : null) != null ? tmp$_0 : closure$naColor;\n }\n };\n }\n HSVColorMapperProvider$Companion.prototype.createCompositeColorMapper_0 = function (domain, hsvIntervals, autoHueDirection, naColor) {\n var colorMappersPerSubDomain = this.createColorMappersPerSubDomain_0(domain, hsvIntervals, autoHueDirection, naColor);\n return HSVColorMapperProvider$Companion$createCompositeColorMapper$lambda(naColor, colorMappersPerSubDomain);\n };\n HSVColorMapperProvider$Companion.prototype.createColorMappersPerSubDomain_0 = function (domain, hsvIntervals, autoHueDirection, naColor) {\n var subDomains = this.splitContinuousDomain_0(domain, hsvIntervals);\n var $receiver = zip(subDomains, hsvIntervals);\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n var domain_0 = item.first;\n var hsvInterval = item.second;\n destination.add_11rb$(new Pair(domain_0, ColorMapper_getInstance().gradientHSV_37xr1q$(domain_0, hsvInterval.first, hsvInterval.second, autoHueDirection, naColor, 1.0)));\n }\n return destination;\n };\n HSVColorMapperProvider$Companion.prototype.splitContinuousDomain_0 = function (domain, hsvIntervals) {\n var tmp$;\n var domainSize = domain.upperEnd - domain.lowerEnd;\n var destination = ArrayList_init_0(collectionSizeOrDefault(hsvIntervals, 10));\n var tmp$_0;\n tmp$_0 = hsvIntervals.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n var tmp$_1 = destination.add_11rb$;\n var x = item.first.h - item.second.h;\n tmp$_1.call(destination, JsMath.abs(x));\n }\n var hueIntervalSizeList = destination;\n var hueIntervalsTotalSize = sum_0(hueIntervalSizeList);\n var domainToHueIntevalRatio = domainSize / hueIntervalsTotalSize;\n var subDomains = ArrayList_init();\n var lowerEnd = domain.lowerEnd;\n tmp$ = hueIntervalSizeList.iterator();\n while (tmp$.hasNext()) {\n var hueIntervalSize = tmp$.next();\n var upperEnd = lowerEnd + hueIntervalSize * domainToHueIntevalRatio;\n subDomains.add_11rb$(new DoubleSpan(lowerEnd, upperEnd));\n lowerEnd = upperEnd;\n }\n return subDomains;\n };\n HSVColorMapperProvider$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var HSVColorMapperProvider$Companion_instance = null;\n function HSVColorMapperProvider$Companion_getInstance() {\n if (HSVColorMapperProvider$Companion_instance === null) {\n new HSVColorMapperProvider$Companion();\n }\n return HSVColorMapperProvider$Companion_instance;\n }\n HSVColorMapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'HSVColorMapperProvider',\n interfaces: [MapperProviderBase]\n };\n function IdentityDiscreteMapperProvider(inputConverter) {\n DiscreteOnlyMapperProvider.call(this);\n this.inputConverter_lfub5e$_0 = inputConverter;\n }\n IdentityDiscreteMapperProvider.prototype.createDiscreteMapper_6i94r7$ = function (discreteTransform) {\n var $receiver = discreteTransform.effectiveDomain;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n var tmp$_0 = destination.add_11rb$;\n var tmp$_1;\n tmp$_1 = this.inputConverter_lfub5e$_0(item);\n if (tmp$_1 == null) {\n throw IllegalStateException_init(\"Can't map input value \" + item.toString() + ' to output type.');\n }\n tmp$_0.call(destination, tmp$_1);\n }\n var outputValues = destination;\n return GuideMappers_getInstance().discreteToDiscrete_qvw28g$(discreteTransform, outputValues, null);\n };\n IdentityDiscreteMapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'IdentityDiscreteMapperProvider',\n interfaces: [DiscreteOnlyMapperProvider]\n };\n function IdentityMapperProvider(discreteMapperProvider, continuousMapper) {\n this.discreteMapperProvider_0 = discreteMapperProvider;\n this.continuousMapper_0 = continuousMapper;\n }\n IdentityMapperProvider.prototype.createDiscreteMapper_6i94r7$ = function (discreteTransform) {\n return this.discreteMapperProvider_0.createDiscreteMapper_6i94r7$(discreteTransform);\n };\n IdentityMapperProvider.prototype.createContinuousMapper_j5tjae$ = function (domain, trans) {\n return GuideMappers_getInstance().asContinuous_6ljcop$(this.continuousMapper_0);\n };\n IdentityMapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'IdentityMapperProvider',\n interfaces: [MapperProvider]\n };\n function LinearNormalizingMapperProvider(outputRange, naValue) {\n MapperProviderBase.call(this, naValue);\n this.outputRange_73yg7w$_0 = outputRange;\n }\n LinearNormalizingMapperProvider.prototype.createDiscreteMapper_6i94r7$ = function (discreteTransform) {\n return GuideMappers_getInstance().discreteToContinuous_dj8ltc$(discreteTransform, this.outputRange_73yg7w$_0, this.naValue);\n };\n LinearNormalizingMapperProvider.prototype.createContinuousMapper_j5tjae$ = function (domain, trans) {\n var dataRange = scale.MapperUtil.rangeWithLimitsAfterTransform_j5tjae$(domain, trans);\n return GuideMappers_getInstance().continuousToContinuous_gd6940$(dataRange, this.outputRange_73yg7w$_0, this.naValue);\n };\n LinearNormalizingMapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LinearNormalizingMapperProvider',\n interfaces: [MapperProviderBase]\n };\n function MapperProviderBase(naValue) {\n this.naValue = naValue;\n }\n MapperProviderBase.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'MapperProviderBase',\n interfaces: [MapperProvider]\n };\n function SizeAreaMapperProvider(max, naValue) {\n SizeAreaMapperProvider$Companion_getInstance();\n DirectlyProportionalMapperProvider.call(this, max != null ? max : SizeAreaMapperProvider$Companion_getInstance().DEF_MAX, naValue);\n }\n function SizeAreaMapperProvider$Companion() {\n SizeAreaMapperProvider$Companion_instance = this;\n this.DEF_MAX = aes.AesScaling.sizeFromCircleDiameter_14dthe$(21.0);\n }\n SizeAreaMapperProvider$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var SizeAreaMapperProvider$Companion_instance = null;\n function SizeAreaMapperProvider$Companion_getInstance() {\n if (SizeAreaMapperProvider$Companion_instance === null) {\n new SizeAreaMapperProvider$Companion();\n }\n return SizeAreaMapperProvider$Companion_instance;\n }\n SizeAreaMapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'SizeAreaMapperProvider',\n interfaces: [DirectlyProportionalMapperProvider]\n };\n function SizeMapperProvider(range, naValue) {\n SizeMapperProvider$Companion_getInstance();\n LinearNormalizingMapperProvider.call(this, range, naValue);\n }\n function SizeMapperProvider$Companion() {\n SizeMapperProvider$Companion_instance = this;\n this.DEF_RANGE_0 = new DoubleSpan(aes.AesScaling.sizeFromCircleDiameter_14dthe$(3.0), aes.AesScaling.sizeFromCircleDiameter_14dthe$(21.0));\n this.DEFAULT = new SizeMapperProvider(this.DEF_RANGE_0, DefaultNaValue_getInstance().get_31786j$(Aes.Companion.SIZE));\n }\n SizeMapperProvider$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var SizeMapperProvider$Companion_instance = null;\n function SizeMapperProvider$Companion_getInstance() {\n if (SizeMapperProvider$Companion_instance === null) {\n new SizeMapperProvider$Companion();\n }\n return SizeMapperProvider$Companion_instance;\n }\n SizeMapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'SizeMapperProvider',\n interfaces: [LinearNormalizingMapperProvider]\n };\n function AxisTheme() {\n }\n AxisTheme.prototype.isOntop = function () {\n return false;\n };\n AxisTheme.prototype.tickLabelDistance_6taknv$ = function (isHorizontalOrientation) {\n var tmp$;\n if (isHorizontalOrientation)\n tmp$ = this.tickLabelMargins().height();\n else\n tmp$ = this.tickLabelMargins().width();\n var result = tmp$;\n if (this.showTickMarks()) {\n result += this.tickMarkLength();\n }\n return result;\n };\n AxisTheme.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'AxisTheme',\n interfaces: []\n };\n function FacetsTheme() {\n }\n FacetsTheme.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'FacetsTheme',\n interfaces: []\n };\n function LegendTheme() {\n }\n LegendTheme.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'LegendTheme',\n interfaces: []\n };\n function PanelGridTheme() {\n }\n PanelGridTheme.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'PanelGridTheme',\n interfaces: []\n };\n function PanelTheme() {\n }\n PanelTheme.prototype.gridX_6taknv$ = function (flipAxis, callback$default) {\n if (flipAxis === void 0)\n flipAxis = false;\n return callback$default ? callback$default(flipAxis) : this.gridX_6taknv$$default(flipAxis);\n };\n PanelTheme.prototype.gridY_6taknv$ = function (flipAxis, callback$default) {\n if (flipAxis === void 0)\n flipAxis = false;\n return callback$default ? callback$default(flipAxis) : this.gridY_6taknv$$default(flipAxis);\n };\n PanelTheme.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'PanelTheme',\n interfaces: []\n };\n function PlotTheme() {\n }\n PlotTheme.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'PlotTheme',\n interfaces: []\n };\n function Theme() {\n }\n Theme.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'Theme',\n interfaces: []\n };\n function ThemeTextStyle(family, face, size, color) {\n this.family = family;\n this.face = face;\n this.size = size;\n this.color = color;\n }\n ThemeTextStyle.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ThemeTextStyle',\n interfaces: []\n };\n ThemeTextStyle.prototype.component1 = function () {\n return this.family;\n };\n ThemeTextStyle.prototype.component2 = function () {\n return this.face;\n };\n ThemeTextStyle.prototype.component3 = function () {\n return this.size;\n };\n ThemeTextStyle.prototype.component4 = function () {\n return this.color;\n };\n ThemeTextStyle.prototype.copy_y7dxx7$ = function (family, face, size, color) {\n return new ThemeTextStyle(family === void 0 ? this.family : family, face === void 0 ? this.face : face, size === void 0 ? this.size : size, color === void 0 ? this.color : color);\n };\n ThemeTextStyle.prototype.toString = function () {\n return 'ThemeTextStyle(family=' + Kotlin.toString(this.family) + (', face=' + Kotlin.toString(this.face)) + (', size=' + Kotlin.toString(this.size)) + (', color=' + Kotlin.toString(this.color)) + ')';\n };\n ThemeTextStyle.prototype.hashCode = function () {\n var result = 0;\n result = result * 31 + Kotlin.hashCode(this.family) | 0;\n result = result * 31 + Kotlin.hashCode(this.face) | 0;\n result = result * 31 + Kotlin.hashCode(this.size) | 0;\n result = result * 31 + Kotlin.hashCode(this.color) | 0;\n return result;\n };\n ThemeTextStyle.prototype.equals = function (other) {\n return this === other || (other !== null && (typeof other === 'object' && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && (Kotlin.equals(this.family, other.family) && Kotlin.equals(this.face, other.face) && Kotlin.equals(this.size, other.size) && Kotlin.equals(this.color, other.color)))));\n };\n function TooltipsTheme() {\n }\n TooltipsTheme.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'TooltipsTheme',\n interfaces: []\n };\n function ConstantValue(aes, value, format) {\n if (format === void 0)\n format = null;\n this.aes_0 = aes;\n this.value_0 = value;\n this.format_0 = format;\n this.formattedValue_0 = null;\n this.isYOrientation_0 = null;\n this.isOutlier_efnf0i$_0 = false;\n this.isAxis_i12u4n$_0 = false;\n }\n Object.defineProperty(ConstantValue.prototype, 'isOutlier', {\n configurable: true,\n get: function () {\n return this.isOutlier_efnf0i$_0;\n }\n });\n Object.defineProperty(ConstantValue.prototype, 'isAxis', {\n configurable: true,\n get: function () {\n return this.isAxis_i12u4n$_0;\n }\n });\n ConstantValue.prototype.initDataContext_nqispu$ = function (data, mappedDataAccess) {\n this.isYOrientation_0 = mappedDataAccess.isYOrientation;\n };\n ConstantValue.prototype.getDataPoint_o6b7hq$ = function (index, ctx) {\n var tmp$;\n var presentation = (tmp$ = this.formattedValue_0) != null ? tmp$ : this.initFormattedValue_0(ctx);\n return new TooltipLineSpec$DataPoint('', presentation, null, false, false);\n };\n function ConstantValue$initFormattedValue$lambda$lambda(closure$tooltipAes, closure$ctx) {\n return function () {\n return TooltipFormatting_getInstance().createFormatter_d58xd9$(closure$tooltipAes, closure$ctx);\n };\n }\n ConstantValue.prototype.initFormattedValue_0 = function (ctx) {\n var tmp$;\n var tmp$_0;\n if ((tmp$ = this.format_0 != null ? StringFormat.Companion.forOneArg_86f9bg$(this.format_0).format_za3rmp$(this.value_0) : null) != null)\n tmp$_0 = tmp$;\n else {\n var block$result;\n var tmp$_1;\n if (Aes.Companion.isPositionalXY_896ixz$(this.aes_0))\n tmp$_1 = Aes.Companion.toAxisAes_pnj1mo$(this.aes_0, ensureNotNull(this.isYOrientation_0));\n else\n tmp$_1 = this.aes_0;\n var tooltipAes = tmp$_1;\n var scale = ctx.getScale_896ixz$(tooltipAes);\n if (scale.isContinuousDomain && Kotlin.isNumber(this.value_0)) {\n block$result = ctx.getTooltipFormatter_scwrln$(tooltipAes, ConstantValue$initFormattedValue$lambda$lambda(tooltipAes, ctx))(this.value_0);\n } else {\n block$result = this.value_0.toString();\n }\n tmp$_0 = block$result;\n }\n this.formattedValue_0 = tmp$_0;\n return ensureNotNull(this.formattedValue_0);\n };\n ConstantValue.prototype.copy = function () {\n return new ConstantValue(this.aes_0, this.value_0, this.format_0);\n };\n ConstantValue.prototype.getAnnotationText_za3lpa$ = function (index) {\n return this.formattedValue_0;\n };\n ConstantValue.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ConstantValue',\n interfaces: [ValueSource]\n };\n function DataFrameValue(name, format) {\n if (format === void 0)\n format = null;\n this.name_0 = name;\n this.format_0 = format;\n this.myDataFrame_v9hm26$_0 = this.myDataFrame_v9hm26$_0;\n this.myVariable_u4q8p$_0 = this.myVariable_u4q8p$_0;\n this.myFormatter_0 = this.format_0 != null ? StringFormat.Companion.forOneArg_86f9bg$(this.format_0, void 0, this.name_0) : null;\n this.isOutlier_h13ss7$_0 = false;\n this.isAxis_5xgnmk$_0 = false;\n }\n Object.defineProperty(DataFrameValue.prototype, 'myDataFrame_0', {\n configurable: true,\n get: function () {\n if (this.myDataFrame_v9hm26$_0 == null)\n return throwUPAE('myDataFrame');\n return this.myDataFrame_v9hm26$_0;\n },\n set: function (myDataFrame) {\n this.myDataFrame_v9hm26$_0 = myDataFrame;\n }\n });\n Object.defineProperty(DataFrameValue.prototype, 'myVariable_0', {\n configurable: true,\n get: function () {\n if (this.myVariable_u4q8p$_0 == null)\n return throwUPAE('myVariable');\n return this.myVariable_u4q8p$_0;\n },\n set: function (myVariable) {\n this.myVariable_u4q8p$_0 = myVariable;\n }\n });\n Object.defineProperty(DataFrameValue.prototype, 'isOutlier', {\n configurable: true,\n get: function () {\n return this.isOutlier_h13ss7$_0;\n }\n });\n Object.defineProperty(DataFrameValue.prototype, 'isAxis', {\n configurable: true,\n get: function () {\n return this.isAxis_5xgnmk$_0;\n }\n });\n DataFrameValue.prototype.initDataContext_nqispu$ = function (data_0, mappedDataAccess) {\n if (!(this.myDataFrame_v9hm26$_0 == null)) {\n var message = 'Data context can be initialized only once';\n throw IllegalArgumentException_init(message.toString());\n }\n this.myDataFrame_0 = data_0;\n this.myVariable_0 = data.DataFrameUtil.findVariableOrFail_vede35$(this.myDataFrame_0, this.name_0);\n };\n DataFrameValue.prototype.getDataPoint_o6b7hq$ = function (index, ctx) {\n var tmp$, tmp$_0, tmp$_1;\n tmp$ = this.myDataFrame_0.get_8xm3sj$(this.myVariable_0).get_za3lpa$(index);\n if (tmp$ == null) {\n return null;\n }\n var originalValue = tmp$;\n return new TooltipLineSpec$DataPoint(this.name_0, (tmp$_1 = (tmp$_0 = this.myFormatter_0) != null ? tmp$_0.format_za3rmp$(originalValue) : null) != null ? tmp$_1 : originalValue.toString(), null, false, false);\n };\n DataFrameValue.prototype.copy = function () {\n return new DataFrameValue(this.name_0, this.format_0);\n };\n DataFrameValue.prototype.getVariableName = function () {\n return this.name_0;\n };\n DataFrameValue.prototype.getAnnotationText_za3lpa$ = function (index) {\n var tmp$, tmp$_0, tmp$_1;\n tmp$ = this.myDataFrame_0.get_8xm3sj$(this.myVariable_0).get_za3lpa$(index);\n if (tmp$ == null) {\n return null;\n }\n var originalValue = tmp$;\n return (tmp$_1 = (tmp$_0 = this.myFormatter_0) != null ? tmp$_0.format_za3rmp$(originalValue) : null) != null ? tmp$_1 : originalValue.toString();\n };\n DataFrameValue.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'DataFrameValue',\n interfaces: [ValueSource]\n };\n function LinesContentSpecification(valueSources, linePatterns, titleLine) {\n LinesContentSpecification$Companion_getInstance();\n this.valueSources = valueSources;\n this.linePatterns = linePatterns;\n this.titleLine = titleLine;\n }\n function LinesContentSpecification$Companion() {\n LinesContentSpecification$Companion_instance = this;\n }\n function LinesContentSpecification$Companion$LineSpec(label, pattern, fields) {\n LinesContentSpecification$Companion$LineSpec$Companion_getInstance();\n this.label = label;\n this.pattern = pattern;\n this.fields = fields;\n }\n function LinesContentSpecification$Companion$LineSpec$Companion() {\n LinesContentSpecification$Companion$LineSpec$Companion_instance = this;\n this.DEFAULT_LABEL_SPECIFIER = '@';\n }\n LinesContentSpecification$Companion$LineSpec$Companion.prototype.defaultLineForValueSource_u47np3$ = function (valueSource) {\n return new LinesContentSpecification$Companion$LineSpec(this.DEFAULT_LABEL_SPECIFIER, StringFormat.Companion.valueInLinePattern(), listOf(valueSource));\n };\n LinesContentSpecification$Companion$LineSpec$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var LinesContentSpecification$Companion$LineSpec$Companion_instance = null;\n function LinesContentSpecification$Companion$LineSpec$Companion_getInstance() {\n if (LinesContentSpecification$Companion$LineSpec$Companion_instance === null) {\n new LinesContentSpecification$Companion$LineSpec$Companion();\n }\n return LinesContentSpecification$Companion$LineSpec$Companion_instance;\n }\n LinesContentSpecification$Companion$LineSpec.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LineSpec',\n interfaces: []\n };\n LinesContentSpecification$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var LinesContentSpecification$Companion_instance = null;\n function LinesContentSpecification$Companion_getInstance() {\n if (LinesContentSpecification$Companion_instance === null) {\n new LinesContentSpecification$Companion();\n }\n return LinesContentSpecification$Companion_instance;\n }\n LinesContentSpecification.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LinesContentSpecification',\n interfaces: []\n };\n LinesContentSpecification.prototype.component1 = function () {\n return this.valueSources;\n };\n LinesContentSpecification.prototype.component2 = function () {\n return this.linePatterns;\n };\n LinesContentSpecification.prototype.component3 = function () {\n return this.titleLine;\n };\n LinesContentSpecification.prototype.copy_v286ln$ = function (valueSources, linePatterns, titleLine) {\n return new LinesContentSpecification(valueSources === void 0 ? this.valueSources : valueSources, linePatterns === void 0 ? this.linePatterns : linePatterns, titleLine === void 0 ? this.titleLine : titleLine);\n };\n LinesContentSpecification.prototype.toString = function () {\n return 'LinesContentSpecification(valueSources=' + Kotlin.toString(this.valueSources) + (', linePatterns=' + Kotlin.toString(this.linePatterns)) + (', titleLine=' + Kotlin.toString(this.titleLine)) + ')';\n };\n LinesContentSpecification.prototype.hashCode = function () {\n var result = 0;\n result = result * 31 + Kotlin.hashCode(this.valueSources) | 0;\n result = result * 31 + Kotlin.hashCode(this.linePatterns) | 0;\n result = result * 31 + Kotlin.hashCode(this.titleLine) | 0;\n return result;\n };\n LinesContentSpecification.prototype.equals = function (other) {\n return this === other || (other !== null && (typeof other === 'object' && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && (Kotlin.equals(this.valueSources, other.valueSources) && Kotlin.equals(this.linePatterns, other.linePatterns) && Kotlin.equals(this.titleLine, other.titleLine)))));\n };\n function MappingValue(aes, isOutlier, isAxis, format) {\n if (isOutlier === void 0)\n isOutlier = false;\n if (isAxis === void 0)\n isAxis = false;\n if (format === void 0)\n format = null;\n this.aes = aes;\n this.isOutlier_cyn2n6$_0 = isOutlier;\n this.isAxis_ohfp7r$_0 = isAxis;\n this.format_0 = format;\n this.myDataAccess_biypgq$_0 = this.myDataAccess_biypgq$_0;\n this.myDataLabel_0 = null;\n this.myFormatter_0 = this.format_0 != null ? StringFormat.Companion.forOneArg_86f9bg$(this.format_0, void 0, this.aes.name) : null;\n }\n Object.defineProperty(MappingValue.prototype, 'isOutlier', {\n get: function () {\n return this.isOutlier_cyn2n6$_0;\n }\n });\n Object.defineProperty(MappingValue.prototype, 'isAxis', {\n get: function () {\n return this.isAxis_ohfp7r$_0;\n }\n });\n Object.defineProperty(MappingValue.prototype, 'myDataAccess_0', {\n configurable: true,\n get: function () {\n if (this.myDataAccess_biypgq$_0 == null)\n return throwUPAE('myDataAccess');\n return this.myDataAccess_biypgq$_0;\n },\n set: function (myDataAccess) {\n this.myDataAccess_biypgq$_0 = myDataAccess;\n }\n });\n MappingValue.prototype.initDataContext_nqispu$ = function (data, mappedDataAccess) {\n var tmp$;\n if (!(this.myDataAccess_biypgq$_0 == null)) {\n var message = 'Data context can be initialized only once';\n throw IllegalArgumentException_init(message.toString());\n }\n this.myDataAccess_0 = mappedDataAccess;\n if (!this.myDataAccess_0.isMapped_896ixz$(this.aes)) {\n var message_0 = this.aes.toString() + ' have to be mapped';\n throw IllegalArgumentException_init(message_0.toString());\n }\n var $receiver = listOf_0([Aes.Companion.X, Aes.Companion.Y]);\n var predicate = getCallableRef('isMapped', function ($receiver, p1) {\n return $receiver.isMapped_896ixz$(p1);\n }.bind(null, this.myDataAccess_0));\n var destination = ArrayList_init();\n var tmp$_0;\n tmp$_0 = $receiver.iterator();\n while (tmp$_0.hasNext()) {\n var element = tmp$_0.next();\n if (predicate(element))\n destination.add_11rb$(element);\n }\n var transform = getCallableRef('getMappedDataLabel', function ($receiver, p1) {\n return $receiver.getMappedDataLabel_896ixz$(p1);\n }.bind(null, this.myDataAccess_0));\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(destination, 10));\n var tmp$_1;\n tmp$_1 = destination.iterator();\n while (tmp$_1.hasNext()) {\n var item = tmp$_1.next();\n destination_0.add_11rb$(transform(item));\n }\n var axisLabels = destination_0;\n var dataLabel = this.myDataAccess_0.getMappedDataLabel_896ixz$(this.aes);\n if (this.isAxis)\n tmp$ = null;\n else if (this.isOutlier)\n tmp$ = null;\n else {\n if (dataLabel.length === 0)\n tmp$ = '';\n else if (axisLabels.contains_11rb$(dataLabel))\n tmp$ = '';\n else\n tmp$ = dataLabel;\n }\n this.myDataLabel_0 = tmp$;\n };\n function MappingValue$getDataPoint$lambda$lambda(closure$tooltipAes, closure$ctx) {\n return function () {\n return TooltipFormatting_getInstance().createFormatter_d58xd9$(closure$tooltipAes, closure$ctx);\n };\n }\n MappingValue.prototype.getDataPoint_o6b7hq$ = function (index, ctx) {\n var tmp$;\n var originalValue = this.myDataAccess_0.getOriginalValue_m6grlz$(this.aes, index);\n var tmp$_0;\n if (originalValue != null) {\n var tmp$_1;\n tmp$_0 = (tmp$_1 = this.myFormatter_0) != null ? tmp$_1.format_za3rmp$(originalValue) : null;\n } else\n tmp$_0 = null;\n var tmp$_2;\n if ((tmp$ = tmp$_0) != null)\n tmp$_2 = tmp$;\n else {\n var tmp$_3;\n if (Aes.Companion.isPositionalXY_896ixz$(this.aes))\n tmp$_3 = Aes.Companion.toAxisAes_pnj1mo$(this.aes, this.myDataAccess_0.isYOrientation);\n else\n tmp$_3 = this.aes;\n var tooltipAes = tmp$_3;\n tmp$_2 = ctx.getTooltipFormatter_scwrln$(tooltipAes, MappingValue$getDataPoint$lambda$lambda(tooltipAes, ctx))(originalValue);\n }\n var formattedValue = tmp$_2;\n return new TooltipLineSpec$DataPoint(this.myDataLabel_0, formattedValue, this.aes, this.isAxis, this.isOutlier);\n };\n MappingValue.prototype.copy = function () {\n return new MappingValue(this.aes, this.isOutlier, this.isAxis, this.format_0);\n };\n MappingValue.prototype.withFlags_dqye30$ = function (isOutlier, isAxis) {\n return new MappingValue(this.aes, isOutlier, isAxis, this.format_0);\n };\n MappingValue.prototype.getAnnotationText_za3lpa$ = function (index) {\n var tmp$, tmp$_0, tmp$_1;\n tmp$ = this.myDataAccess_0.getOriginalValue_m6grlz$(this.aes, index);\n if (tmp$ == null) {\n return null;\n }\n var originalValue = tmp$;\n return (tmp$_1 = (tmp$_0 = this.myFormatter_0) != null ? tmp$_0.format_za3rmp$(originalValue) : null) != null ? tmp$_1 : originalValue.toString();\n };\n MappingValue.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'MappingValue',\n interfaces: [ValueSource]\n };\n function TooltipFormatting() {\n TooltipFormatting_instance = this;\n }\n function TooltipFormatting$createFormatter$lambda(closure$formatter) {\n return function (value) {\n var tmp$;\n var tmp$_0;\n tmp$_0 = value != null ? closure$formatter(value) : null;\n return (tmp$ = tmp$_0) != null ? tmp$ : 'n/a';\n };\n }\n function TooltipFormatting$createFormatter$lambda_0(closure$labelsMap) {\n return function (value) {\n var tmp$;\n var tmp$_0;\n tmp$_0 = value != null ? closure$labelsMap.get_11rb$(value) : null;\n return (tmp$ = tmp$_0) != null ? tmp$ : 'n/a';\n };\n }\n TooltipFormatting.prototype.createFormatter_d58xd9$ = function (aes, ctx) {\n if (!(!Aes.Companion.isPositionalXY_896ixz$(aes) || equals(aes, Aes.Companion.X) || equals(aes, Aes.Companion.Y))) {\n var message = 'Positional aesthetic should be either X or Y but was ' + aes;\n throw IllegalStateException_init(message.toString());\n }\n var scale_0 = ctx.getScale_896ixz$(aes);\n if (scale_0.isContinuousDomain) {\n var domain = ctx.overallTransformedDomain_896ixz$(aes);\n var formatter = scale_0.getBreaksGenerator().defaultFormatter_f140j5$(domain, 100);\n return TooltipFormatting$createFormatter$lambda(formatter);\n } else {\n var labelsMap = scale.ScaleUtil.labelByBreak_x4zrm4$(scale_0);\n return TooltipFormatting$createFormatter$lambda_0(labelsMap);\n }\n };\n TooltipFormatting.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'TooltipFormatting',\n interfaces: []\n };\n var TooltipFormatting_instance = null;\n function TooltipFormatting_getInstance() {\n if (TooltipFormatting_instance === null) {\n new TooltipFormatting();\n }\n return TooltipFormatting_instance;\n }\n function TooltipLine(label, pattern, fields) {\n TooltipLine$Companion_getInstance();\n LinesContentSpecification$Companion$LineSpec.call(this, label, pattern, fields);\n this.myLineFormatter_0 = StringFormat.Companion.forNArgs_zeh6sj$(pattern, fields.size, 'fields');\n }\n TooltipLine.prototype.initDataContext_nqispu$ = function (data, mappedDataAccess) {\n var tmp$;\n tmp$ = this.fields.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n element.initDataContext_nqispu$(data, mappedDataAccess);\n }\n };\n function TooltipLine$getDataPoint$lambda(it) {\n var tmp$;\n return (tmp$ = it.label) != null ? tmp$ : '';\n }\n TooltipLine.prototype.getDataPoint_o6b7hq$ = function (index, ctx) {\n var tmp$;\n var $receiver = this.fields;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$_0;\n tmp$_0 = $receiver.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n var tmp$_1 = destination.add_11rb$;\n var tmp$_2;\n tmp$_2 = item.getDataPoint_o6b7hq$(index, ctx);\n if (tmp$_2 == null) {\n return null;\n }\n tmp$_1.call(destination, tmp$_2);\n }\n var dataValues = destination;\n if (dataValues.size === 1) {\n var dataValue = single(dataValues);\n tmp$ = new TooltipLineSpec$DataPoint(this.chooseLabel_0(dataValue.label), this.myLineFormatter_0.format_za3rmp$(dataValue.value), dataValue.aes, dataValue.isAxis, dataValue.isOutlier);\n } else {\n var tmp$_3 = this.chooseLabel_0(joinToString_0(dataValues, ', ', void 0, void 0, void 0, void 0, TooltipLine$getDataPoint$lambda));\n var tmp$_4 = this.myLineFormatter_0;\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(dataValues, 10));\n var tmp$_5;\n tmp$_5 = dataValues.iterator();\n while (tmp$_5.hasNext()) {\n var item_0 = tmp$_5.next();\n destination_0.add_11rb$(item_0.value);\n }\n tmp$ = new TooltipLineSpec$DataPoint(tmp$_3, tmp$_4.format_pqjuzw$(destination_0), null, false, false);\n }\n return tmp$;\n };\n TooltipLine.prototype.chooseLabel_0 = function (dataLabel) {\n var tmp$;\n if (equals(this.label, LinesContentSpecification$Companion$LineSpec$Companion_getInstance().DEFAULT_LABEL_SPECIFIER))\n tmp$ = dataLabel;\n else\n tmp$ = this.label;\n return tmp$;\n };\n function TooltipLine$Companion() {\n TooltipLine$Companion_instance = this;\n }\n TooltipLine$Companion.prototype.defaultLineForValueSource_u47np3$ = function (valueSource) {\n return TooltipLine_init(LinesContentSpecification$Companion$LineSpec$Companion_getInstance().defaultLineForValueSource_u47np3$(valueSource));\n };\n TooltipLine$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var TooltipLine$Companion_instance = null;\n function TooltipLine$Companion_getInstance() {\n if (TooltipLine$Companion_instance === null) {\n new TooltipLine$Companion();\n }\n return TooltipLine$Companion_instance;\n }\n TooltipLine.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TooltipLine',\n interfaces: [TooltipLineSpec, LinesContentSpecification$Companion$LineSpec]\n };\n function TooltipLine_init(other, $this) {\n $this = $this || Object.create(TooltipLine.prototype);\n var tmp$ = other.label;\n var tmp$_0 = other.pattern;\n var $receiver = other.fields;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$_1;\n tmp$_1 = $receiver.iterator();\n while (tmp$_1.hasNext()) {\n var item = tmp$_1.next();\n destination.add_11rb$(item.copy());\n }\n TooltipLine.call($this, tmp$, tmp$_0, destination);\n return $this;\n }\n function TooltipSpecification(valueSources, tooltipLinePatterns, tooltipProperties, tooltipTitle) {\n TooltipSpecification$Companion_getInstance();\n this.valueSources = valueSources;\n this.tooltipLinePatterns = tooltipLinePatterns;\n this.tooltipProperties = tooltipProperties;\n this.tooltipTitle = tooltipTitle;\n }\n function TooltipSpecification$TooltipProperties(anchor, minWidth) {\n TooltipSpecification$TooltipProperties$Companion_getInstance();\n this.anchor = anchor;\n this.minWidth = minWidth;\n }\n function TooltipSpecification$TooltipProperties$Companion() {\n TooltipSpecification$TooltipProperties$Companion_instance = this;\n this.NONE = new TooltipSpecification$TooltipProperties(null, null);\n }\n TooltipSpecification$TooltipProperties$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var TooltipSpecification$TooltipProperties$Companion_instance = null;\n function TooltipSpecification$TooltipProperties$Companion_getInstance() {\n if (TooltipSpecification$TooltipProperties$Companion_instance === null) {\n new TooltipSpecification$TooltipProperties$Companion();\n }\n return TooltipSpecification$TooltipProperties$Companion_instance;\n }\n TooltipSpecification$TooltipProperties.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TooltipProperties',\n interfaces: []\n };\n TooltipSpecification.prototype.useDefaultTooltips = function () {\n return this.tooltipLinePatterns == null;\n };\n TooltipSpecification.prototype.hideTooltips = function () {\n var tmp$, tmp$_0;\n return (tmp$_0 = (tmp$ = this.tooltipLinePatterns) != null ? tmp$.isEmpty() : null) != null ? tmp$_0 : false;\n };\n function TooltipSpecification$Companion() {\n TooltipSpecification$Companion_instance = this;\n }\n TooltipSpecification$Companion.prototype.withoutTooltip = function () {\n return new TooltipSpecification(emptyList(), emptyList(), TooltipSpecification$TooltipProperties$Companion_getInstance().NONE, null);\n };\n TooltipSpecification$Companion.prototype.defaultTooltip = function () {\n return new TooltipSpecification(emptyList(), null, TooltipSpecification$TooltipProperties$Companion_getInstance().NONE, null);\n };\n TooltipSpecification$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var TooltipSpecification$Companion_instance = null;\n function TooltipSpecification$Companion_getInstance() {\n if (TooltipSpecification$Companion_instance === null) {\n new TooltipSpecification$Companion();\n }\n return TooltipSpecification$Companion_instance;\n }\n TooltipSpecification.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TooltipSpecification',\n interfaces: []\n };\n function ValueSource() {\n }\n ValueSource.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'ValueSource',\n interfaces: []\n };\n var package$jetbrains = _.jetbrains || (_.jetbrains = {});\n var package$datalore = package$jetbrains.datalore || (package$jetbrains.datalore = {});\n var package$plot = package$datalore.plot || (package$datalore.plot = {});\n Object.defineProperty(package$plot, 'FeatureSwitch', {\n get: FeatureSwitch_getInstance\n });\n var package$builder = package$plot.builder || (package$plot.builder = {});\n Object.defineProperty(package$builder, 'AxisUtil', {\n get: AxisUtil_getInstance\n });\n package$builder.BogusScale = BogusScale;\n Object.defineProperty(package$builder, 'DemoAndTest', {\n get: DemoAndTest_getInstance\n });\n package$builder.FrameOfReference = FrameOfReference;\n package$builder.FrameOfReferenceProvider = FrameOfReferenceProvider;\n package$builder.GeomLayer = GeomLayer;\n Object.defineProperty(package$builder, 'GeomLayerListUtil', {\n get: GeomLayerListUtil_getInstance\n });\n LayerRendererUtil.prototype.LayerRendererData = LayerRendererUtil$LayerRendererData;\n Object.defineProperty(package$builder, 'LayerRendererUtil', {\n get: LayerRendererUtil_getInstance\n });\n Object.defineProperty(MarginSide, 'LEFT', {\n get: MarginSide$LEFT_getInstance\n });\n Object.defineProperty(MarginSide, 'RIGHT', {\n get: MarginSide$RIGHT_getInstance\n });\n Object.defineProperty(MarginSide, 'TOP', {\n get: MarginSide$TOP_getInstance\n });\n Object.defineProperty(MarginSide, 'BOTTOM', {\n get: MarginSide$BOTTOM_getInstance\n });\n package$builder.MarginSide = MarginSide;\n Object.defineProperty(package$builder, 'MarginalLayerUtil', {\n get: MarginalLayerUtil_getInstance\n });\n Object.defineProperty(PlotContainerPortable, 'Companion', {\n get: PlotContainerPortable$Companion_getInstance\n });\n package$builder.PlotContainerPortable = PlotContainerPortable;\n Object.defineProperty(PlotSvgComponent, 'Companion', {\n get: PlotSvgComponent$Companion_getInstance\n });\n package$builder.PlotSvgComponent = PlotSvgComponent;\n Object.defineProperty(PlotTile, 'Companion', {\n get: PlotTile$Companion_getInstance\n });\n package$builder.PlotTile = PlotTile;\n Object.defineProperty(PlotUtil.prototype, 'DemoAndTest', {\n get: PlotUtil$DemoAndTest_getInstance\n });\n Object.defineProperty(package$builder, 'PlotUtil', {\n get: PlotUtil_getInstance\n });\n package$builder.PosProviderContext = PosProviderContext;\n package$builder.SvgLayerRenderer = SvgLayerRenderer;\n package$builder.VarBinding = VarBinding;\n Object.defineProperty(AnnotationLine, 'Companion', {\n get: AnnotationLine$Companion_getInstance\n });\n var package$annotation = package$builder.annotation || (package$builder.annotation = {});\n package$annotation.AnnotationLine_init_cpanxn$ = AnnotationLine_init;\n package$annotation.AnnotationLine = AnnotationLine;\n Object.defineProperty(AnnotationSpecification, 'Companion', {\n get: AnnotationSpecification$Companion_getInstance\n });\n package$annotation.AnnotationSpecification = AnnotationSpecification;\n Object.defineProperty(ColorBarAssembler, 'Companion', {\n get: ColorBarAssembler$Companion_getInstance\n });\n var package$assemble = package$builder.assemble || (package$builder.assemble = {});\n package$assemble.ColorBarAssembler = ColorBarAssembler;\n package$assemble.ColorBarOptions = ColorBarOptions;\n package$assemble.GeomContextBuilder_init = GeomContextBuilder_init;\n package$assemble.GeomContextBuilder = GeomContextBuilder;\n Object.defineProperty(GeomLayerBuilder, 'Companion', {\n get: GeomLayerBuilder$Companion_getInstance\n });\n package$assemble.GeomLayerBuilder = GeomLayerBuilder;\n Object.defineProperty(GuideOptions, 'Companion', {\n get: GuideOptions$Companion_getInstance\n });\n package$assemble.GuideOptions = GuideOptions;\n ImmutableGeomContext.Builder = ImmutableGeomContext$Builder;\n package$assemble.ImmutableGeomContext = ImmutableGeomContext;\n Object.defineProperty(LegendAssembler, 'Companion', {\n get: LegendAssembler$Companion_getInstance\n });\n package$assemble.LegendAssembler = LegendAssembler;\n Object.defineProperty(package$assemble, 'LegendAssemblerUtil', {\n get: LegendAssemblerUtil_getInstance\n });\n Object.defineProperty(LegendOptions, 'Companion', {\n get: LegendOptions$Companion_getInstance\n });\n package$assemble.LegendOptions = LegendOptions;\n Object.defineProperty(PlotAssembler, 'Companion', {\n get: PlotAssembler$Companion_getInstance\n });\n package$assemble.PlotAssembler = PlotAssembler;\n package$assemble.PlotAssemblerPlotContext = PlotAssemblerPlotContext;\n Object.defineProperty(package$assemble, 'PlotAssemblerUtil', {\n get: PlotAssemblerUtil_getInstance\n });\n Object.defineProperty(PlotFacets, 'Companion', {\n get: PlotFacets$Companion_getInstance\n });\n PlotFacets.FacetTileInfo = PlotFacets$FacetTileInfo;\n package$assemble.PlotFacets = PlotFacets;\n Object.defineProperty(package$assemble, 'PlotGuidesAssemblerUtil', {\n get: PlotGuidesAssemblerUtil_getInstance\n });\n Object.defineProperty(PosProvider, 'Companion', {\n get: PosProvider$Companion_getInstance\n });\n package$assemble.PosProvider = PosProvider;\n Object.defineProperty(package$assemble, 'PositionalScalesUtil', {\n get: PositionalScalesUtil_getInstance\n });\n package$assemble.StitchedPlotLayer = StitchedPlotLayer;\n Object.defineProperty(package$assemble, 'TestingPlotContext', {\n get: TestingPlotContext_getInstance\n });\n Object.defineProperty(TypedScaleMap, 'Companion', {\n get: TypedScaleMap$Companion_getInstance\n });\n package$assemble.TypedScaleMap = TypedScaleMap;\n var package$facet = package$assemble.facet || (package$assemble.facet = {});\n package$facet.FacetGrid = FacetGrid;\n Object.defineProperty(FacetScales, 'FIXED', {\n get: FacetScales$FIXED_getInstance\n });\n Object.defineProperty(FacetScales, 'FREE', {\n get: FacetScales$FREE_getInstance\n });\n Object.defineProperty(FacetScales, 'FREE_X', {\n get: FacetScales$FREE_X_getInstance\n });\n Object.defineProperty(FacetScales, 'FREE_Y', {\n get: FacetScales$FREE_Y_getInstance\n });\n package$facet.FacetScales = FacetScales;\n Object.defineProperty(FacetWrap$Direction, 'H', {\n get: FacetWrap$Direction$H_getInstance\n });\n Object.defineProperty(FacetWrap$Direction, 'V', {\n get: FacetWrap$Direction$V_getInstance\n });\n FacetWrap.Direction = FacetWrap$Direction;\n Object.defineProperty(FacetWrap, 'Companion', {\n get: FacetWrap$Companion_getInstance\n });\n package$facet.FacetWrap = FacetWrap;\n var package$geom = package$assemble.geom || (package$assemble.geom = {});\n Object.defineProperty(package$geom, 'DefaultSampling', {\n get: DefaultSampling_getInstance\n });\n Object.defineProperty(GeomProvider, 'Companion', {\n get: GeomProvider$Companion_getInstance\n });\n package$geom.GeomProvider = GeomProvider;\n package$geom.PointDataAccess = PointDataAccess;\n var package$coord = package$builder.coord || (package$builder.coord = {});\n package$coord.CartesianCoordProvider = CartesianCoordProvider;\n package$coord.CoordProvider = CoordProvider;\n package$coord.CoordProviderBase = CoordProviderBase;\n Object.defineProperty(package$coord, 'CoordProviders', {\n get: CoordProviders_getInstance\n });\n Object.defineProperty(FixedRatioCoordProvider, 'Companion', {\n get: FixedRatioCoordProvider$Companion_getInstance\n });\n package$coord.FixedRatioCoordProvider = FixedRatioCoordProvider;\n package$coord.MarginalLayerCoordProvider = MarginalLayerCoordProvider;\n package$coord.ProjectionCoordProvider = ProjectionCoordProvider;\n DataProcessing.prototype.DataAndGroupingContext = DataProcessing$DataAndGroupingContext;\n var package$data = package$builder.data || (package$builder.data = {});\n Object.defineProperty(package$data, 'DataProcessing', {\n get: DataProcessing_getInstance\n });\n GroupMerger.Group = GroupMerger$Group;\n package$data.GroupMerger = GroupMerger;\n Object.defineProperty(package$data, 'GroupUtil', {\n get: GroupUtil_getInstance\n });\n Object.defineProperty(GroupingContext, 'Companion', {\n get: GroupingContext$Companion_getInstance\n });\n package$data.GroupingContext = GroupingContext;\n Object.defineProperty(OrderOptionUtil$OrderOption, 'Companion', {\n get: OrderOptionUtil$OrderOption$Companion_getInstance\n });\n OrderOptionUtil.prototype.OrderOption = OrderOptionUtil$OrderOption;\n Object.defineProperty(package$data, 'OrderOptionUtil', {\n get: OrderOptionUtil_getInstance\n });\n package$data.StatInput = StatInput;\n Object.defineProperty(package$data, 'YOrientationUtil', {\n get: YOrientationUtil_getInstance\n });\n var package$defaultTheme = package$builder.defaultTheme || (package$builder.defaultTheme = {});\n package$defaultTheme.DefaultAxisTheme = DefaultAxisTheme;\n package$defaultTheme.DefaultFacetsTheme = DefaultFacetsTheme;\n package$defaultTheme.DefaultLegendTheme = DefaultLegendTheme;\n package$defaultTheme.DefaultPanelGridTheme = DefaultPanelGridTheme;\n package$defaultTheme.DefaultPanelTheme = DefaultPanelTheme;\n package$defaultTheme.DefaultPlotTheme = DefaultPlotTheme;\n Object.defineProperty(DefaultTheme, 'Companion', {\n get: DefaultTheme$Companion_getInstance\n });\n package$defaultTheme.DefaultTheme = DefaultTheme;\n package$defaultTheme.DefaultTooltipsTheme = DefaultTooltipsTheme;\n Object.defineProperty(ThemeFlavor, 'Companion', {\n get: ThemeFlavor$Companion_getInstance\n });\n package$defaultTheme.ThemeFlavor = ThemeFlavor;\n package$defaultTheme.ThemeValuesAccess = ThemeValuesAccess;\n Object.defineProperty(ThemeOption$Elem.prototype, 'Margin', {\n get: ThemeOption$Elem$Margin_getInstance\n });\n Object.defineProperty(ThemeOption.prototype, 'Elem', {\n get: ThemeOption$Elem_getInstance\n });\n Object.defineProperty(ThemeOption.prototype, 'Name', {\n get: ThemeOption$Name_getInstance\n });\n Object.defineProperty(ThemeOption.prototype, 'Flavor', {\n get: ThemeOption$Flavor_getInstance\n });\n Object.defineProperty(ThemeOption.prototype, 'ForTest', {\n get: ThemeOption$ForTest_getInstance\n });\n var package$values = package$defaultTheme.values || (package$defaultTheme.values = {});\n Object.defineProperty(package$values, 'ThemeOption', {\n get: ThemeOption_getInstance\n });\n Object.defineProperty(ThemeValues, 'Companion', {\n get: ThemeValues$Companion_getInstance\n });\n package$values.ThemeValues = ThemeValues;\n Object.defineProperty(ThemeValuesBase, 'Companion', {\n get: ThemeValuesBase$Companion_getInstance\n });\n package$values.ThemeValuesBase = ThemeValuesBase;\n Object.defineProperty(ThemeValuesLPMinimal2, 'Companion', {\n get: ThemeValuesLPMinimal2$Companion_getInstance\n });\n package$values.ThemeValuesLPMinimal2 = ThemeValuesLPMinimal2;\n package$values.ThemeValuesLPNone = ThemeValuesLPNone;\n Object.defineProperty(ThemeValuesRBW, 'Companion', {\n get: ThemeValuesRBW$Companion_getInstance\n });\n package$values.ThemeValuesRBW = ThemeValuesRBW;\n Object.defineProperty(ThemeValuesRClassic, 'Companion', {\n get: ThemeValuesRClassic$Companion_getInstance\n });\n package$values.ThemeValuesRClassic = ThemeValuesRClassic;\n Object.defineProperty(ThemeValuesRGrey, 'Companion', {\n get: ThemeValuesRGrey$Companion_getInstance\n });\n package$values.ThemeValuesRGrey = ThemeValuesRGrey;\n Object.defineProperty(ThemeValuesRLight, 'Companion', {\n get: ThemeValuesRLight$Companion_getInstance\n });\n package$values.ThemeValuesRLight = ThemeValuesRLight;\n Object.defineProperty(ThemeValuesRMinimal, 'Companion', {\n get: ThemeValuesRMinimal$Companion_getInstance\n });\n package$values.ThemeValuesRMinimal = ThemeValuesRMinimal;\n var package$event = package$builder.event || (package$builder.event = {});\n package$event.MouseEventPeer = MouseEventPeer;\n var package$frame = package$builder.frame || (package$builder.frame = {});\n package$frame.BogusFrameOfReference = BogusFrameOfReference;\n package$frame.BogusFrameOfReferenceProvider = BogusFrameOfReferenceProvider;\n package$frame.MarginalFrameOfReference = MarginalFrameOfReference;\n Object.defineProperty(SquareFrameOfReference, 'Companion', {\n get: SquareFrameOfReference$Companion_getInstance\n });\n package$frame.SquareFrameOfReference = SquareFrameOfReference;\n package$frame.SquareFrameOfReferenceProvider = SquareFrameOfReferenceProvider;\n AxisComponent.BreaksData = AxisComponent$BreaksData;\n AxisComponent.TickLabelAdjustments = AxisComponent$TickLabelAdjustments;\n var package$guide = package$builder.guide || (package$builder.guide = {});\n package$guide.AxisComponent = AxisComponent;\n package$guide.ColorBarComponent = ColorBarComponent;\n ColorBarComponentLayout.BreakInfo = ColorBarComponentLayout$BreakInfo;\n Object.defineProperty(ColorBarComponentLayout, 'Companion', {\n get: ColorBarComponentLayout$Companion_getInstance\n });\n package$guide.ColorBarComponentLayout = ColorBarComponentLayout;\n Object.defineProperty(ColorBarComponentSpec, 'Companion', {\n get: ColorBarComponentSpec$Companion_getInstance\n });\n package$guide.ColorBarComponentSpec = ColorBarComponentSpec;\n Object.defineProperty(LegendArrangement, 'HORIZONTAL', {\n get: LegendArrangement$HORIZONTAL_getInstance\n });\n Object.defineProperty(LegendArrangement, 'VERTICAL', {\n get: LegendArrangement$VERTICAL_getInstance\n });\n package$guide.LegendArrangement = LegendArrangement;\n Object.defineProperty(LegendBox, 'Companion', {\n get: LegendBox$Companion_getInstance\n });\n package$guide.LegendBox = LegendBox;\n package$guide.LegendBoxLayout = LegendBoxLayout;\n package$guide.LegendBoxSpec = LegendBoxSpec;\n Object.defineProperty(LegendBreak, 'Companion', {\n get: LegendBreak$Companion_getInstance\n });\n package$guide.LegendBreak = LegendBreak;\n package$guide.LegendComponent = LegendComponent;\n Object.defineProperty(LegendComponentLayout, 'Companion', {\n get: LegendComponentLayout$Companion_getInstance\n });\n package$guide.LegendComponentLayout = LegendComponentLayout;\n package$guide.LegendComponentSpec = LegendComponentSpec;\n Object.defineProperty(LegendDirection, 'HORIZONTAL', {\n get: LegendDirection$HORIZONTAL_getInstance\n });\n Object.defineProperty(LegendDirection, 'VERTICAL', {\n get: LegendDirection$VERTICAL_getInstance\n });\n Object.defineProperty(LegendDirection, 'AUTO', {\n get: LegendDirection$AUTO_getInstance\n });\n package$guide.LegendDirection = LegendDirection;\n Object.defineProperty(LegendJustification, 'Companion', {\n get: LegendJustification$Companion_getInstance\n });\n package$guide.LegendJustification = LegendJustification;\n Object.defineProperty(LegendPosition, 'Companion', {\n get: LegendPosition$Companion_getInstance\n });\n package$guide.LegendPosition = LegendPosition;\n Object.defineProperty(Orientation, 'LEFT', {\n get: Orientation$LEFT_getInstance\n });\n Object.defineProperty(Orientation, 'RIGHT', {\n get: Orientation$RIGHT_getInstance\n });\n Object.defineProperty(Orientation, 'TOP', {\n get: Orientation$TOP_getInstance\n });\n Object.defineProperty(Orientation, 'BOTTOM', {\n get: Orientation$BOTTOM_getInstance\n });\n package$guide.Orientation = Orientation;\n Object.defineProperty(ContextualMappingProvider, 'Companion', {\n get: ContextualMappingProvider$Companion_getInstance\n });\n var package$interact = package$builder.interact || (package$builder.interact = {});\n package$interact.ContextualMappingProvider = ContextualMappingProvider;\n Object.defineProperty(GeomInteraction, 'Companion', {\n get: GeomInteraction$Companion_getInstance\n });\n package$interact.GeomInteraction = GeomInteraction;\n GeomInteractionBuilder.DemoAndTest = GeomInteractionBuilder$DemoAndTest;\n package$interact.GeomInteractionBuilder = GeomInteractionBuilder;\n Object.defineProperty(package$interact, 'GeomInteractionBuilderUtil', {\n get: GeomInteractionBuilderUtil_getInstance\n });\n Object.defineProperty(GeomTooltipSetup, 'Companion', {\n get: GeomTooltipSetup$Companion_getInstance\n });\n package$interact.GeomTooltipSetup = GeomTooltipSetup;\n Object.defineProperty(MathUtil$ClosestPointChecker$COMPARISON_RESULT, 'NEW_CLOSER', {\n get: MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_CLOSER_getInstance\n });\n Object.defineProperty(MathUtil$ClosestPointChecker$COMPARISON_RESULT, 'NEW_FARTHER', {\n get: MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_FARTHER_getInstance\n });\n Object.defineProperty(MathUtil$ClosestPointChecker$COMPARISON_RESULT, 'EQUAL', {\n get: MathUtil$ClosestPointChecker$COMPARISON_RESULT$EQUAL_getInstance\n });\n MathUtil$ClosestPointChecker.COMPARISON_RESULT = MathUtil$ClosestPointChecker$COMPARISON_RESULT;\n MathUtil.prototype.ClosestPointChecker_init_lu1900$ = MathUtil$MathUtil$ClosestPointChecker_init;\n MathUtil.prototype.ClosestPointChecker = MathUtil$ClosestPointChecker;\n Object.defineProperty(package$interact, 'MathUtil', {\n get: MathUtil_getInstance\n });\n package$interact.PlotInteractor = PlotInteractor;\n Object.defineProperty(TooltipSpec$Line, 'Companion', {\n get: TooltipSpec$Line$Companion_getInstance\n });\n TooltipSpec.Line = TooltipSpec$Line;\n package$interact.TooltipSpec = TooltipSpec;\n package$interact.TooltipSpecFactory = TooltipSpecFactory;\n var package$loc = package$interact.loc || (package$interact.loc = {});\n package$loc.FlippedTargetCollector = FlippedTargetCollector;\n package$loc.LayerTargetCollectorWithLocator = LayerTargetCollectorWithLocator;\n LayerTargetLocator.Target = LayerTargetLocator$Target;\n Object.defineProperty(LayerTargetLocator$Collector$CollectingStrategy, 'APPEND', {\n get: LayerTargetLocator$Collector$CollectingStrategy$APPEND_getInstance\n });\n Object.defineProperty(LayerTargetLocator$Collector$CollectingStrategy, 'REPLACE', {\n get: LayerTargetLocator$Collector$CollectingStrategy$REPLACE_getInstance\n });\n Object.defineProperty(LayerTargetLocator$Collector$CollectingStrategy, 'APPEND_IF_EQUAL', {\n get: LayerTargetLocator$Collector$CollectingStrategy$APPEND_IF_EQUAL_getInstance\n });\n Object.defineProperty(LayerTargetLocator$Collector$CollectingStrategy, 'IGNORE', {\n get: LayerTargetLocator$Collector$CollectingStrategy$IGNORE_getInstance\n });\n LayerTargetLocator$Collector.CollectingStrategy = LayerTargetLocator$Collector$CollectingStrategy;\n LayerTargetLocator.Collector = LayerTargetLocator$Collector;\n package$loc.LayerTargetLocator = LayerTargetLocator;\n Object.defineProperty(LocatedTargetsPicker, 'Companion', {\n get: LocatedTargetsPicker$Companion_getInstance\n });\n package$loc.LocatedTargetsPicker = LocatedTargetsPicker;\n Object.defineProperty(TargetDetector, 'Companion', {\n get: TargetDetector$Companion_getInstance\n });\n package$loc.TargetDetector = TargetDetector;\n package$loc.TargetProjection = TargetProjection;\n Object.defineProperty(PointTargetProjection, 'Companion', {\n get: PointTargetProjection$Companion_getInstance\n });\n package$loc.PointTargetProjection = PointTargetProjection;\n Object.defineProperty(RectTargetProjection, 'Companion', {\n get: RectTargetProjection$Companion_getInstance\n });\n package$loc.RectTargetProjection = RectTargetProjection;\n Object.defineProperty(PolygonTargetProjection, 'Companion', {\n get: PolygonTargetProjection$Companion_getInstance\n });\n PolygonTargetProjection.RingXY = PolygonTargetProjection$RingXY;\n package$loc.PolygonTargetProjection = PolygonTargetProjection;\n Object.defineProperty(PathTargetProjection$PathPoint, 'Companion', {\n get: PathTargetProjection$PathPoint$Companion_getInstance\n });\n PathTargetProjection.PathPoint = PathTargetProjection$PathPoint;\n Object.defineProperty(PathTargetProjection, 'Companion', {\n get: PathTargetProjection$Companion_getInstance\n });\n package$loc.PathTargetProjection = PathTargetProjection;\n Object.defineProperty(TargetPrototype, 'Companion', {\n get: TargetPrototype$Companion_getInstance\n });\n package$loc.TargetPrototype = TargetPrototype;\n package$loc.TransformedTargetLocator = TransformedTargetLocator;\n Object.defineProperty(YOrientationTargetCollector, 'Companion', {\n get: YOrientationTargetCollector$Companion_getInstance\n });\n package$loc.YOrientationTargetCollector = YOrientationTargetCollector;\n var package$tool = package$interact.tool || (package$interact.tool = {});\n package$tool.ToolFeedback = ToolFeedback;\n var package$layout = package$builder.layout || (package$builder.layout = {});\n package$layout.AxisLayout = AxisLayout;\n package$layout.AxisLayoutInfo = AxisLayoutInfo;\n Object.defineProperty(FacetedPlotLayout, 'Companion', {\n get: FacetedPlotLayout$Companion_getInstance\n });\n package$layout.FacetedPlotLayout = FacetedPlotLayout;\n Object.defineProperty(package$layout, 'FacetedPlotLayoutUtil', {\n get: FacetedPlotLayoutUtil_getInstance\n });\n Object.defineProperty(GeomMarginsLayout, 'Companion', {\n get: GeomMarginsLayout$Companion_getInstance\n });\n package$layout.GeomMarginsLayout = GeomMarginsLayout;\n Object.defineProperty(package$layout, 'GeometryUtil', {\n get: GeometryUtil_getInstance\n });\n Object.defineProperty(LegendBoxInfo, 'Companion', {\n get: LegendBoxInfo$Companion_getInstance\n });\n package$layout.LegendBoxInfo = LegendBoxInfo;\n LegendBoxesLayout.BoxWithLocation = LegendBoxesLayout$BoxWithLocation;\n package$layout.LegendBoxesLayout = LegendBoxesLayout;\n Object.defineProperty(package$layout, 'LegendBoxesLayoutUtil', {\n get: LegendBoxesLayoutUtil_getInstance\n });\n package$layout.LegendsBlockInfo = LegendsBlockInfo;\n package$layout.Margins = Margins;\n package$layout.PlotAxisLayout = PlotAxisLayout;\n Object.defineProperty(package$layout, 'PlotAxisLayoutUtil', {\n get: PlotAxisLayoutUtil_getInstance\n });\n Object.defineProperty(package$layout, 'PlotLabelSpecFactory', {\n get: PlotLabelSpecFactory_getInstance\n });\n package$layout.PlotLayout = PlotLayout;\n package$layout.PlotLayoutBase = PlotLayoutBase;\n package$layout.PlotLayoutInfo = PlotLayoutInfo;\n Object.defineProperty(package$layout, 'PlotLayoutUtil', {\n get: PlotLayoutUtil_getInstance\n });\n Object.defineProperty(SingleTilePlotLayout, 'Companion', {\n get: SingleTilePlotLayout$Companion_getInstance\n });\n package$layout.SingleTilePlotLayout = SingleTilePlotLayout;\n Object.defineProperty(TextJustification$Companion$TextRotation, 'CLOCKWISE', {\n get: TextJustification$Companion$TextRotation$CLOCKWISE_getInstance\n });\n Object.defineProperty(TextJustification$Companion$TextRotation, 'ANTICLOCKWISE', {\n get: TextJustification$Companion$TextRotation$ANTICLOCKWISE_getInstance\n });\n TextJustification$Companion.prototype.TextRotation = TextJustification$Companion$TextRotation;\n Object.defineProperty(TextJustification, 'Companion', {\n get: TextJustification$Companion_getInstance\n });\n package$layout.TextJustification = TextJustification;\n package$layout.TileLayout = TileLayout;\n package$layout.TileLayoutInfo = TileLayoutInfo;\n package$layout.TileLayoutProvider = TileLayoutProvider;\n var package$axis = package$layout.axis || (package$layout.axis = {});\n package$axis.AdaptableAxisBreaksProvider = AdaptableAxisBreaksProvider;\n package$axis.AxisBreaksProvider = AxisBreaksProvider;\n Object.defineProperty(AxisBreaksProviderFactory, 'Companion', {\n get: AxisBreaksProviderFactory$Companion_getInstance\n });\n AxisBreaksProviderFactory.FixedBreaksProviderFactory = AxisBreaksProviderFactory$FixedBreaksProviderFactory;\n AxisBreaksProviderFactory.AdaptableBreaksProviderFactory = AxisBreaksProviderFactory$AdaptableBreaksProviderFactory;\n package$axis.AxisBreaksProviderFactory = AxisBreaksProviderFactory;\n Object.defineProperty(AxisLayouter, 'Companion', {\n get: AxisLayouter$Companion_getInstance\n });\n package$axis.AxisLayouter = AxisLayouter;\n package$axis.FixedAxisBreaksProvider = FixedAxisBreaksProvider;\n package$axis.HorizontalAxisLayouter = HorizontalAxisLayouter;\n package$axis.VerticalAxisLayouter = VerticalAxisLayouter;\n Object.defineProperty(AbstractFixedBreaksLabelsLayout, 'Companion', {\n get: AbstractFixedBreaksLabelsLayout$Companion_getInstance\n });\n var package$label = package$axis.label || (package$axis.label = {});\n package$label.AbstractFixedBreaksLabelsLayout = AbstractFixedBreaksLabelsLayout;\n Object.defineProperty(AxisLabelsLayout, 'Companion', {\n get: AxisLabelsLayout$Companion_getInstance\n });\n package$label.AxisLabelsLayout = AxisLabelsLayout;\n AxisLabelsLayoutInfo.Builder = AxisLabelsLayoutInfo$Builder;\n package$label.AxisLabelsLayoutInfo = AxisLabelsLayoutInfo;\n Object.defineProperty(package$label, 'BreakLabelsLayoutUtil', {\n get: BreakLabelsLayoutUtil_getInstance\n });\n package$label.HorizontalFixedBreaksLabelsLayout = HorizontalFixedBreaksLabelsLayout;\n package$label.HorizontalFlexBreaksLabelsLayout = HorizontalFlexBreaksLabelsLayout;\n Object.defineProperty(HorizontalMultilineLabelsLayout, 'Companion', {\n get: HorizontalMultilineLabelsLayout$Companion_getInstance\n });\n package$label.HorizontalMultilineLabelsLayout = HorizontalMultilineLabelsLayout;\n Object.defineProperty(HorizontalSimpleLabelsLayout, 'Companion', {\n get: HorizontalSimpleLabelsLayout$Companion_getInstance\n });\n package$label.HorizontalSimpleLabelsLayout = HorizontalSimpleLabelsLayout;\n Object.defineProperty(HorizontalTiltedLabelsLayout, 'Companion', {\n get: HorizontalTiltedLabelsLayout$Companion_getInstance\n });\n package$label.HorizontalTiltedLabelsLayout = HorizontalTiltedLabelsLayout;\n Object.defineProperty(HorizontalVerticalLabelsLayout, 'Companion', {\n get: HorizontalVerticalLabelsLayout$Companion_getInstance\n });\n package$label.HorizontalVerticalLabelsLayout = HorizontalVerticalLabelsLayout;\n package$label.VerticalFixedBreaksLabelsLayout = VerticalFixedBreaksLabelsLayout;\n package$label.VerticalFlexBreaksLabelsLayout = VerticalFlexBreaksLabelsLayout;\n var package$facet_0 = package$layout.facet || (package$layout.facet = {});\n Object.defineProperty(package$facet_0, 'FixedScalesTilesLayouter', {\n get: FixedScalesTilesLayouter_getInstance\n });\n Object.defineProperty(package$facet_0, 'FreeScalesTilesLayouter', {\n get: FreeScalesTilesLayouter_getInstance\n });\n Object.defineProperty(InsideOutTileLayout, 'Companion', {\n get: InsideOutTileLayout$Companion_getInstance\n });\n var package$tile = package$layout.tile || (package$layout.tile = {});\n package$tile.InsideOutTileLayout = InsideOutTileLayout;\n package$tile.LiveMapAxisTheme = LiveMapAxisTheme;\n package$tile.LiveMapTileLayout = LiveMapTileLayout;\n Object.defineProperty(LiveMapTileLayoutProvider, 'Companion', {\n get: LiveMapTileLayoutProvider$Companion_getInstance\n });\n package$tile.LiveMapTileLayoutProvider = LiveMapTileLayoutProvider;\n Object.defineProperty(package$tile, 'TileLayoutUtil', {\n get: TileLayoutUtil_getInstance\n });\n Object.defineProperty(TopDownTileLayout, 'Companion', {\n get: TopDownTileLayout$Companion_getInstance\n });\n package$tile.TopDownTileLayout = TopDownTileLayout;\n Object.defineProperty(GeomAreaInsets, 'Companion', {\n get: GeomAreaInsets$Companion_getInstance\n });\n var package$util = package$layout.util || (package$layout.util = {});\n package$util.GeomAreaInsets = GeomAreaInsets;\n package$util.Insets = Insets;\n var package$presentation = package$builder.presentation || (package$builder.presentation = {});\n package$presentation.DefaultFontFamilyRegistry = DefaultFontFamilyRegistry;\n Object.defineProperty(Defaults$Common, 'Title', {\n get: Defaults$Common$Title_getInstance\n });\n Object.defineProperty(Defaults$Common, 'Subtitle', {\n get: Defaults$Common$Subtitle_getInstance\n });\n Object.defineProperty(Defaults$Common, 'Caption', {\n get: Defaults$Common$Caption_getInstance\n });\n Object.defineProperty(Defaults$Common, 'Legend', {\n get: Defaults$Common$Legend_getInstance\n });\n Object.defineProperty(Defaults$Common, 'Tooltip', {\n get: Defaults$Common$Tooltip_getInstance\n });\n Defaults.prototype.Common = Defaults$Common;\n Object.defineProperty(Defaults$Plot, 'Axis', {\n get: Defaults$Plot$Axis_getInstance\n });\n Defaults.prototype.Plot = Defaults$Plot;\n Object.defineProperty(package$presentation, 'Defaults', {\n get: Defaults_getInstance\n });\n package$presentation.FontFamilyRegistry = FontFamilyRegistry;\n package$presentation.LabelSpec = LabelSpec;\n Object.defineProperty(PlotLabelSpec, 'Companion', {\n get: PlotLabelSpec$Companion_getInstance\n });\n package$presentation.PlotLabelSpec = PlotLabelSpec;\n Object.defineProperty(package$presentation, 'Style', {\n get: Style_getInstance\n });\n Object.defineProperty(package$presentation, 'TextWidthEstimator', {\n get: TextWidthEstimator_getInstance\n });\n var package$sampling = package$builder.sampling || (package$builder.sampling = {});\n package$sampling.GroupAwareSampling = GroupAwareSampling;\n package$sampling.PointSampling = PointSampling;\n package$sampling.Sampling = Sampling;\n Object.defineProperty(package$sampling, 'Samplings', {\n get: Samplings_getInstance\n });\n Object.defineProperty(GroupRandomSampling, 'Companion', {\n get: GroupRandomSampling$Companion_getInstance\n });\n var package$method = package$sampling.method || (package$sampling.method = {});\n package$method.GroupRandomSampling = GroupRandomSampling;\n package$method.GroupSamplingBase = GroupSamplingBase;\n Object.defineProperty(GroupSystematicSampling, 'Companion', {\n get: GroupSystematicSampling$Companion_getInstance\n });\n package$method.GroupSystematicSampling = GroupSystematicSampling;\n Object.defineProperty(PickSampling, 'Companion', {\n get: PickSampling$Companion_getInstance\n });\n package$method.PickSampling = PickSampling;\n Object.defineProperty(RandomSampling, 'Companion', {\n get: RandomSampling$Companion_getInstance\n });\n package$method.RandomSampling = RandomSampling;\n Object.defineProperty(RandomStratifiedSampling, 'Companion', {\n get: RandomStratifiedSampling$Companion_getInstance\n });\n package$method.RandomStratifiedSampling = RandomStratifiedSampling;\n package$method.SamplingBase = SamplingBase;\n Object.defineProperty(package$method, 'SamplingUtil', {\n get: SamplingUtil_getInstance\n });\n Object.defineProperty(SystematicSampling, 'Companion', {\n get: SystematicSampling$Companion_getInstance\n });\n package$method.SystematicSampling = SystematicSampling;\n Object.defineProperty(VertexSampling$VertexVwSampling, 'Companion', {\n get: VertexSampling$VertexVwSampling$Companion_getInstance\n });\n VertexSampling.VertexVwSampling = VertexSampling$VertexVwSampling;\n Object.defineProperty(VertexSampling$VertexDpSampling, 'Companion', {\n get: VertexSampling$VertexDpSampling$Companion_getInstance\n });\n VertexSampling.VertexDpSampling = VertexSampling$VertexDpSampling;\n VertexSampling.DoubleVectorComponentsList = VertexSampling$DoubleVectorComponentsList;\n Object.defineProperty(VertexSampling, 'Companion', {\n get: VertexSampling$Companion_getInstance\n });\n package$method.VertexSampling = VertexSampling;\n var package$scale = package$builder.scale || (package$builder.scale = {});\n package$scale.ContinuousOnlyMapperProvider = ContinuousOnlyMapperProvider;\n Object.defineProperty(package$scale, 'DefaultMapperProvider', {\n get: DefaultMapperProvider_getInstance\n });\n Object.defineProperty(package$scale, 'DefaultMapperProviderUtil', {\n get: DefaultMapperProviderUtil_getInstance\n });\n Object.defineProperty(package$scale, 'DefaultNaValue', {\n get: DefaultNaValue_getInstance\n });\n package$scale.DiscreteOnlyMapperProvider = DiscreteOnlyMapperProvider;\n package$scale.GuideMapper = GuideMapper;\n package$scale.MapperProvider = MapperProvider;\n package$scale.ScaleProvider = ScaleProvider;\n package$scale.ScaleProviderBuilder = ScaleProviderBuilder;\n Object.defineProperty(package$scale, 'ScaleProviderHelper', {\n get: ScaleProviderHelper_getInstance\n });\n package$scale.WithGuideBreaks = WithGuideBreaks;\n var package$mapper = package$scale.mapper || (package$scale.mapper = {});\n Object.defineProperty(package$mapper, 'ColorMapper', {\n get: ColorMapper_getInstance\n });\n package$mapper.GuideMapperWithGuideBreaks = GuideMapperWithGuideBreaks;\n Object.defineProperty(package$mapper, 'GuideMappers', {\n get: GuideMappers_getInstance\n });\n Object.defineProperty(package$mapper, 'LineTypeMapper', {\n get: LineTypeMapper_getInstance\n });\n Object.defineProperty(package$mapper, 'ShapeMapper', {\n get: ShapeMapper_getInstance\n });\n Object.defineProperty(AlphaMapperProvider, 'Companion', {\n get: AlphaMapperProvider$Companion_getInstance\n });\n var package$provider = package$scale.provider || (package$scale.provider = {});\n package$provider.AlphaMapperProvider = AlphaMapperProvider;\n Object.defineProperty(ColorBrewerMapperProvider, 'Companion', {\n get: ColorBrewerMapperProvider$Companion_getInstance\n });\n package$provider.ColorBrewerMapperProvider = ColorBrewerMapperProvider;\n Object.defineProperty(ColorGradient2MapperProvider, 'Companion', {\n get: ColorGradient2MapperProvider$Companion_getInstance\n });\n package$provider.ColorGradient2MapperProvider = ColorGradient2MapperProvider;\n Object.defineProperty(ColorGradientMapperProvider, 'Companion', {\n get: ColorGradientMapperProvider$Companion_getInstance\n });\n package$provider.ColorGradientMapperProvider = ColorGradientMapperProvider;\n Object.defineProperty(ColorGradientnMapperProvider, 'Companion', {\n get: ColorGradientnMapperProvider$Companion_getInstance\n });\n package$provider.ColorGradientnMapperProvider = ColorGradientnMapperProvider;\n Object.defineProperty(ColorHueMapperProvider, 'Companion', {\n get: ColorHueMapperProvider$Companion_getInstance\n });\n package$provider.ColorHueMapperProvider = ColorHueMapperProvider;\n package$provider.ColormapMapperProvider = ColormapMapperProvider;\n package$provider.DirectlyProportionalMapperProvider = DirectlyProportionalMapperProvider;\n Object.defineProperty(GreyscaleLightnessMapperProvider, 'Companion', {\n get: GreyscaleLightnessMapperProvider$Companion_getInstance\n });\n package$provider.GreyscaleLightnessMapperProvider = GreyscaleLightnessMapperProvider;\n Object.defineProperty(HSVColorMapperProvider, 'Companion', {\n get: HSVColorMapperProvider$Companion_getInstance\n });\n package$provider.HSVColorMapperProvider = HSVColorMapperProvider;\n package$provider.IdentityDiscreteMapperProvider = IdentityDiscreteMapperProvider;\n package$provider.IdentityMapperProvider = IdentityMapperProvider;\n package$provider.LinearNormalizingMapperProvider = LinearNormalizingMapperProvider;\n package$provider.MapperProviderBase = MapperProviderBase;\n Object.defineProperty(SizeAreaMapperProvider, 'Companion', {\n get: SizeAreaMapperProvider$Companion_getInstance\n });\n package$provider.SizeAreaMapperProvider = SizeAreaMapperProvider;\n Object.defineProperty(SizeMapperProvider, 'Companion', {\n get: SizeMapperProvider$Companion_getInstance\n });\n package$provider.SizeMapperProvider = SizeMapperProvider;\n var package$theme = package$builder.theme || (package$builder.theme = {});\n package$theme.AxisTheme = AxisTheme;\n package$theme.FacetsTheme = FacetsTheme;\n package$theme.LegendTheme = LegendTheme;\n package$theme.PanelGridTheme = PanelGridTheme;\n package$theme.PanelTheme = PanelTheme;\n package$theme.PlotTheme = PlotTheme;\n package$theme.Theme = Theme;\n package$theme.ThemeTextStyle = ThemeTextStyle;\n package$theme.TooltipsTheme = TooltipsTheme;\n var package$tooltip = package$builder.tooltip || (package$builder.tooltip = {});\n package$tooltip.ConstantValue = ConstantValue;\n package$tooltip.DataFrameValue = DataFrameValue;\n Object.defineProperty(LinesContentSpecification$Companion$LineSpec, 'Companion', {\n get: LinesContentSpecification$Companion$LineSpec$Companion_getInstance\n });\n LinesContentSpecification$Companion.prototype.LineSpec = LinesContentSpecification$Companion$LineSpec;\n Object.defineProperty(LinesContentSpecification, 'Companion', {\n get: LinesContentSpecification$Companion_getInstance\n });\n package$tooltip.LinesContentSpecification = LinesContentSpecification;\n package$tooltip.MappingValue = MappingValue;\n Object.defineProperty(package$tooltip, 'TooltipFormatting', {\n get: TooltipFormatting_getInstance\n });\n Object.defineProperty(TooltipLine, 'Companion', {\n get: TooltipLine$Companion_getInstance\n });\n package$tooltip.TooltipLine_init_cpanxn$ = TooltipLine_init;\n package$tooltip.TooltipLine = TooltipLine;\n Object.defineProperty(TooltipSpecification$TooltipProperties, 'Companion', {\n get: TooltipSpecification$TooltipProperties$Companion_getInstance\n });\n TooltipSpecification.TooltipProperties = TooltipSpecification$TooltipProperties;\n Object.defineProperty(TooltipSpecification, 'Companion', {\n get: TooltipSpecification$Companion_getInstance\n });\n package$tooltip.TooltipSpecification = TooltipSpecification;\n package$tooltip.ValueSource = ValueSource;\n CoordProviderBase.prototype.createCoordinateSystem_26v79i$ = CoordProvider.prototype.createCoordinateSystem_26v79i$;\n DefaultAxisTheme.prototype.tickLabelDistance_6taknv$ = AxisTheme.prototype.tickLabelDistance_6taknv$;\n DefaultPanelTheme.prototype.gridX_6taknv$ = PanelTheme.prototype.gridX_6taknv$;\n DefaultPanelTheme.prototype.gridY_6taknv$ = PanelTheme.prototype.gridY_6taknv$;\n BogusFrameOfReferenceProvider.prototype.createTileFrame_sd8y8$ = FrameOfReferenceProvider.prototype.createTileFrame_sd8y8$;\n SquareFrameOfReferenceProvider.prototype.createTileFrame_sd8y8$ = FrameOfReferenceProvider.prototype.createTileFrame_sd8y8$;\n FlippedTargetCollector.prototype.addPoint_cnsimy$ = GeomTargetCollector.prototype.addPoint_cnsimy$;\n FlippedTargetCollector.prototype.addRectangle_bxzvr8$ = GeomTargetCollector.prototype.addRectangle_bxzvr8$;\n FlippedTargetCollector.prototype.addPath_sa5m83$ = GeomTargetCollector.prototype.addPath_sa5m83$;\n FlippedTargetCollector.prototype.addPolygon_sa5m83$ = GeomTargetCollector.prototype.addPolygon_sa5m83$;\n LayerTargetCollectorWithLocator.prototype.addPoint_cnsimy$ = GeomTargetCollector.prototype.addPoint_cnsimy$;\n LayerTargetCollectorWithLocator.prototype.addRectangle_bxzvr8$ = GeomTargetCollector.prototype.addRectangle_bxzvr8$;\n LayerTargetCollectorWithLocator.prototype.addPath_sa5m83$ = GeomTargetCollector.prototype.addPath_sa5m83$;\n LayerTargetCollectorWithLocator.prototype.addPolygon_sa5m83$ = GeomTargetCollector.prototype.addPolygon_sa5m83$;\n YOrientationTargetCollector.prototype.addPoint_cnsimy$ = GeomTargetCollector.prototype.addPoint_cnsimy$;\n YOrientationTargetCollector.prototype.addRectangle_bxzvr8$ = GeomTargetCollector.prototype.addRectangle_bxzvr8$;\n YOrientationTargetCollector.prototype.addPath_sa5m83$ = GeomTargetCollector.prototype.addPath_sa5m83$;\n YOrientationTargetCollector.prototype.addPolygon_sa5m83$ = GeomTargetCollector.prototype.addPolygon_sa5m83$;\n LiveMapAxisTheme.prototype.isOntop = AxisTheme.prototype.isOntop;\n LiveMapAxisTheme.prototype.tickLabelDistance_6taknv$ = AxisTheme.prototype.tickLabelDistance_6taknv$;\n Kotlin.defineModule('lets-plot-plot-builder-portable-js-legacy', _);\n return _;\n}));\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9rb3RsaW4tZGNlLWRldi9sZXRzLXBsb3QtcGxvdC1idWlsZGVyLXBvcnRhYmxlLWpzLWxlZ2FjeS5qcy5qcyIsIm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ZXN1bHRTaXplID09IDEpXG4gICAgICAgICAgICByZXR1cm4gbGlzdE9mKGxhc3QoKSlcbiAgICAgICAgbGlzdCA9IEFycmF5TGlzdDxUPihyZXN1bHRTaXplKVxuICAgICAgICBpZiAodGhpcyBpcyBMaXN0PFQ+KSB7XG4gICAgICAgICAgICBpZiAodGhpcyBpcyBSYW5kb21BY2Nlc3MpIHtcbiAgICAgICAgICAgICAgICBmb3IgKGluZGV4IGluIG4gdW50aWwgc2l6ZSlcbiAgICAgICAgICAgICAgICAgICAgbGlzdC5hZGQodGhpc1tpbmRleF0pXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGZvciAoaXRlbSBpbiBsaXN0SXRlcmF0b3IobikpXG4gICAgICAgICAgICAgICAgICAgIGxpc3QuYWRkKGl0ZW0pXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gbGlzdFxuICAgICAgICB9XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgICBsaXN0ID0gQXJyYXlMaXN0PFQ+KClcbiAgICB9XG4gICAgdmFyIGNvdW50ID0gMFxuICAgIGZvciAoaXRlbSBpbiB0aGlzKSB7XG4gICAgICAgIGlmIChjb3VudCA+PSBuKSBsaXN0LmFkZChpdGVtKSBlbHNlICsrY291bnRcbiAgICB9XG4gICAgcmV0dXJuIGxpc3Qub3B0aW1pemVSZWFkT25seUxpc3QoKVxufVxuXG4vKipcbiAqIFJldHVybnMgYSBsaXN0IGNvbnRhaW5pbmcgYWxsIGVsZW1lbnRzIGV4Y2VwdCBsYXN0IFtuXSBlbGVtZW50cy5cbiAqIFxuICogQHRocm93cyBJbGxlZ2FsQXJndW1lbnRFeGNlcHRpb24gaWYgW25dIGlzIG5lZ2F0aXZlLlxuICogXG4gKiBAc2FtcGxlIHNhbXBsZXMuY29sbGVjdGlvbnMuQ29sbGVjdGlvbnMuVHJhbnNmb3JtYXRpb25zLmRyb3BcbiAqL1xucHVibGljIGZ1biA8VD4gTGlz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y8gLTEgZm9yIHVua25vd24sIDAgZm9yIGRvbmUsIDEgZm9yIGNvbnRpbnVlXG4gICAgICAgIHZhciBjdXJyZW50U3RhcnRJbmRleDogSW50ID0gc3RhcnRJbmRleC5jb2VyY2VJbigwLCBpbnB1dC5sZW5ndGgpXG4gICAgICAgIHZhciBuZXh0U2VhcmNoSW5kZXg6IEludCA9IGN1cnJlbnRTdGFydEluZGV4XG4gICAgICAgIHZhciBuZXh0SXRlbTogSW50UmFuZ2U/ID0gbnVsbFxuICAgICAgICB2YXIgY291bnRlcjogSW50ID0gMFxuXG4gICAgICAgIHByaXZhdGUgZnVuIGNhbGNOZXh0KCkge1xuICAgICAgICAgICAgaWYgKG5leHRTZWFyY2hJbmRleCA8IDApIHtcbiAgICAgICAgICAgICAgICBuZXh0U3RhdGUgPSAwXG4gICAgICAgICAgICAgICAgbmV4dEl0ZW0gPSBudWxsXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmIChsaW1pdCA+IDAgJiYgKytjb3VudGVyID49IGxpbWl0IHx8IG5leHRTZWFyY2hJbmRleCA+IGlucHV0Lmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICBuZXh0SXRlbSA9IGN1cnJlbnRTdGFydEluZGV4Li5pbnB1dC5sYXN0SW5kZXhcbiAgICAgICAgICAgICAgICAgICAgbmV4dFNlYXJjaEluZGV4ID0gLTFcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB2YWwgbWF0Y2ggPSBpbnB1dC5nZXROZXh0TWF0Y2gobmV4dFNlYXJjaEluZGV4KVxuICAgICAgICAgICAgICAgICAgICBpZiAobWF0Y2ggPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbmV4dEl0ZW0gPSBjdXJyZW50U3RhcnRJbmRleC4uaW5wdXQubGFzdEluZGV4XG4gICAgICAgICAgICAgICAgICAgICAgICBuZXh0U2VhcmNoSW5kZXggPSAtMVxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFsIChpbmRleCwgbGVuZ3RoKSA9IG1hdGNoXG4gICAgICAgICAgICAgICAgICAgICAgICBuZXh0SXRlbSA9IGN1cnJlbnRTdGFydEluZGV4IHVudGlsIGluZGV4XG4gICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50U3RhcnRJbmRleCA9IGluZGV4ICsgbGVuZ3RoXG4gICAgICAgICAgICAgICAgICAgICAgICBuZXh0U2VhcmNoSW5kZXggPSBjdXJyZW50U3RhcnRJbmRleCArIGlmIChsZW5ndGggPT0gMCkgMSBlbHNlIDBcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBuZXh0U3RhdGUgPSAxXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBvdmVycmlkZSBmdW4gbmV4dCgpOiBJbnRSYW5nZSB7XG4gICAgICAgICAgICBpZiAobmV4dFN0YXRlID09IC0xKVxuICAgICAgICAgICAgICAgIGNhbGNOZXh0KClcbiAgICAgICAgICAgIGlmIChuZXh0U3RhdGUgPT0gMClcbiAgICAgICAgICAgICAgICB0aHJvdyBOb1N1Y2hFbGVtZW50RXhjZXB0aW9uKClcbiAgICAgICAgICAgIHZhbCByZXN1bHQgPSBuZXh0SXRlbSBhcyBJbnRSYW5nZVxuICAgICAgICAgICAgLy8gQ2xlYW4gbmV4dCB0byBhdm9pZCBrZWVwaW5nIHJlZmVyZW5jZSBvbiB5aWVsZGVkIGluc3RhbmNlXG4gICAgICAgICAgICBuZXh0SXRlbSA9IG51bGxcbiAgICAgICAgICAgIG5leHRTdGF0ZSA9IC0xXG4gICAgICAgICAgICByZXR1cm4gcmVzdWx0XG4gICAgICAgIH1cblxuICAgICAgICBvdmVycmlkZSBmdW4gaGFzTmV4dCgpOiBCb29sZWFuIHtcbiAgICAgICAgICAgIGlmIChuZXh0U3RhdGUgPT0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nvb3JkcyxcbiAgICAgICAgICAgIG1ham9yTGFiZWxzID0gYnJlYWtMYWJlbHNcbiAgICAgICAgKVxuICAgIH1cblxuICAgIHByaXZhdGUgZnVuIHRvQXhpc0Nvb3JkKFxuICAgICAgICBzY2FsZUJyZWFrczogU2NhbGVCcmVha3MsXG4gICAgICAgIGNvb3JkOiBDb29yZGluYXRlU3lzdGVtLFxuICAgICAgICBmbGlwQXhpczogQm9vbGVhbixcbiAgICAgICAgaG9yaXpvbnRhbDogQm9vbGVhblxuICAgICk6IFBhaXI8TGlzdDxEb3VibGU+LCBMaXN0PFN0cmluZz4+IHtcbiAgICAgICAgdmFsIGJyZWFrc0RhdGFBbmRMYWJlbDogTGlzdDxQYWlyPERvdWJsZSwgU3RyaW5nPj4gPSBzY2FsZUJyZWFrcy50cmFuc2Zvcm1lZFZhbHVlcy56aXAoc2NhbGVCcmVha3MubGFiZWxzKVxuXG4gICAgICAgIHZhbCBheGlzQnJlYWtzID0gQXJyYXlMaXN0PERvdWJsZT4oKVxuICAgICAgICB2YWwgYXhpc0xhYmVscyA9IEFycmF5TGlzdDxTdHJpbmc+KClcbiAgICAgICAgZm9yICgoYnIsIGxhYmVsKSBpbiBicmVha3NEYXRhQW5kTGFiZWwpIHtcbiAgICAgICAgICAgIC8vIFRvRG86IHRoZSBzZWNvbmQgY29vcmRpbmF0ZSBzaG91bGQgYmUgdGFrZW4gZnJvbSBcInZhbGlkIGRvbWFpblwiXG4gICAgICAgICAgICB2YWwgYnBDb29yZCA9IHdoZW4gKGhvcml6b250YWwpIHtcbiAgICAgICAgICAgICAgICB0cnVlIC0+IERvdWJsZVZlY3RvcihiciwgMC4wKVxuICAgICAgICAgICAgICAgIGZhbHNlIC0+IERvdWJsZVZlY3RvcigwLjAsIGJyKVxuICAgICAgICAgICAgfS5sZXQge1xuICAgICAgICAgICAgICAgIGlmIChmbGlwQXhpcykge1xuICAgICAgICAgICAgICAgICAgICBpdC5mbGlwKClcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBpdFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFsIGJwQ2xpZW50Q29vcmQgPSBjb29yZC50b0NsaWVudChicENvb3JkKVxuICAgICAgICAgICAgaWYgKCEoYnBDbGllbnRDb29yZCAhPSBudWxsICYmIGJwQ2xpZW50Q29vcmQuaXNGaW5pdGUpKSB7XG4gICAgICAgICAgICAgICAgLy8gc2tpcCB0aGlzIGJyZWFrLXBvaW50OiBpdCdzIG91dHNpZGUgdGhlIGNvb3JkaW5hdGUgc3lzdGVtJyBkb21haW4uXG4gICAgICAgICAgICAgICAgY29udGludWVcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFsIGJwT25BeGlzID0gaWYgKGhvcml6b250YWwpXG4gICAgICAgICAgICAgICAgYnBDbGllbnRDb29yZC54XG4gICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgYnBDbGllbnRDb29yZC55XG5cbiAgICAgICAgICAgIGF4aXNCcmVha3MuYWRkKGJwT25BeGlzKVxuICAgICAgICAgICAgYXhpc0xhYmVscy5hZGQobGFiZWwpXG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIFBhaXIoYXhpc0JyZWFrcywgYXhpc0xhYmVscylcbiAgICB9XG59XG4iLCIvKlxuICogQ29weXJpZ2h0IDIwMTAtMjAxOCBKZXRCcmFpbnMgcy5yLm8uIGFuZCBLb3RsaW4gUHJvZ3JhbW1pbmcgTGFuZ3VhZ2UgY29udHJpYnV0b3JzLlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgdGhlIEFwYWNoZSAyLjAgbGljZW5zZSB0aGF0IGNhbiBiZSBmb3VuZCBpbiB0aGUgbGljZW5zZS9MSUNFTlNFLnR4dCBmaWxlLlxuICovXG5cbkBmaWxlOmtvdGxpbi5qdm0uSnZtTXVsdGlmaWxlQ2xhc3NcbkBm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MuSURFTlRJVFksXG4gICAgICAgICAgICB5QWVzTWFwcGVyID0gTWFwcGVycy5JREVOVElUWVxuICAgICAgICApXG4gICAgICAgIHZhbCBhZXN0aGV0aWNzID0gUGxvdFV0aWwuY3JlYXRlTGF5ZXJBZXN0aGV0aWNzKFxuICAgICAgICAgICAgbGF5ZXIsXG4gICAgICAgICAgICBsYXllci5yZW5kZXJlZEFlcygpLFxuICAgICAgICAgICAgYWVzdGhldGljTWFwcGVycyxcbiAgICAgICAgKVxuXG4gICAgICAgIHZhbCBhZXN0aGV0aWNNYXBwZXJzQWZ0ZXJPcmllbnRhdGlvbiA9IGFlc3RoZXRpY01hcHBlcnMubGV0IHtcbiAgICAgICAgICAgIHdoZW4gKGxheWVyLmlzWU9yaWVudGF0aW9uKSB7XG4gICAgICAgICAgICAgICAgdHJ1ZSAtPiBZT3JpZW50YXRpb25CYXNlVXRpbC5mbGlwQWVzS2V5cyhpdClcbiAgICAgICAgICAgICAgICBmYWxzZSAtPiBpdFxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgdmFsIGFlc3RoZXRpY3NBZnRlck9yaWVudGF0aW9uID0gYWVzdGhldGljcy5sZXQge1xuICAgICAgICAgICAgd2hlbiAobGF5ZXIuaXNZT3JpZW50YXRpb24pIHtcbiAgICAgICAgICAgICAgICB0cnVlIC0+IFlPcmllbnRhdGlvbkFlc3RoZXRpY3MoaXQpXG4gICAgICAgICAgICAgICAgZmFsc2UgLT4gaXRcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHZhbCBtYXBwZWRBZXM6IFNldDxBZXM8Kj4+ID0gbGF5ZXIucmVuZGVyZWRBZXMoKS5maWx0ZXIobGF5ZXI6Omhhc0JpbmRpbmcpLnRvU2V0KClcbiAgICAgICAgdmFsIHBvcyA9IFBsb3RVdGlsLmNyZWF0ZVBvc2l0aW9uQWRqdXN0bWVudChsYXllci5wb3NQcm92aWRlciwgYWVzdGhldGljc0FmdGVyT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VGlsZVswXS5oQXhpc0xhYmVsXG5cbiAgICBwcml2YXRlIHZhbCBjb250YWluc0xpdmVNYXA6IEJvb2xlYW4gPSBjb3JlTGF5ZXJzQnlUaWxlLmZsYXR0ZW4oKS5hbnkoR2VvbUxheWVyOjppc0xpdmVNYXApXG5cbiAgICBvdmVycmlkZSBmdW4gYnVpbGRDb21wb25lbnQoKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgICBidWlsZFBsb3QoKVxuICAgICAgICB9IGNhdGNoIChlOiBSdW50aW1lRXhjZXB0aW9uKSB7XG4gICAgICAgICAgICBMT0cuZXJyb3IoZSkgeyBcImJ1aWxkUGxvdFwiIH1cblxuICAgICAgICAgICAgdmFsIHJvb3RDYXVzZSA9IFRocm93YWJsZXMuZ2V0Um9vdENhdXNlKGUpXG4gICAgICAgICAgICB2YWwgbWVzc2FnZXMgPSBhcnJheU9mKFxuICAgICAgICAgICAgICAgIFwiRXJyb3IgYnVpbGRpbmcgcGxvdDogXCIgKyByb290Q2F1c2U6OmNsYXNzLnNpbXBsZU5hbWUsIGlmIChyb290Q2F1c2UubWVzc2FnZSAhPSBudWxsKVxuICAgICAgICAgICAgICAgICAgICBcIidcIiArIHJvb3RDYXVzZS5tZXNzYWdlICsgXCInXCJcbiAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgIFwiPG5vIG1lc3NhZ2U+XCJcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIHZhciB5ID0gcGxvdFNpemUueSAvIDIgLSA4XG4gICAgICAgICAgICBmb3IgKHMgaW4gbWVzc2FnZXMpIHtcbiAgICAgICAgICAgICAgICB2YWwgZXJyb3JMYWJlbCA9IFRleHRMYWJlbChzKVxuICAgICAgICAgICAgICAgIHZhbCB0ZXh0Q29sb3IgPSB3aGVuIHtcbiAgICAgICAgICAgICAgICAgICAgdGhlbWUucGxvdCgpLnNob3dCYWNrZ3JvdW5kKCkgLT4gdGhlbWUucGxvdCgpLnRleHRDb2xvcigpXG4gICAgICAgICAgICAgICAgICAgIGVsc2UgLT4gRGVmYXVsdHMuVEVYVF9DT0xPUlxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlcnJvckxhYmVsLnRleHRDb2xvcigpLnNldCh0ZXh0Q29sb3IpXG4gICAgICAgICAgICAgICAgZXJyb3JMYWJlbC5zZXRGb250V2VpZ2h0KFwibm9ybWFsXCIpXG4gICAgICAgICAgICAgICAgZXJyb3JMYWJlbC5zZXRGb250U3R5bGUoXCJub3JtYWxcIilcbiAgICAgICAgICAgICAgICBlcnJvckxhYmVsLnNldEhvcml6b250YWxBbmNob3IoSG9yaXpvbnRhbEFuY2hvci5NSURETEUpXG4gICAgICAgICAgICAgICAgZXJyb3JMYWJlbC5zZXRWZXJ0aWNhbEFuY2hvcihWZXJ0aWNhbEFuY2hvci5DRU5URVIpXG4gICAgICAgICAgICAgICAgZXJyb3JMYWJlbC5tb3ZlVG8ocGxvdFNpemUueCAvIDIsIHkpXG4gICAgICAgICAgICAgICAgcm9vdEdyb3VwLmNoaWxkcmVuKCkuYWRkKGVycm9yTGFiZWwucm9vdEdyb3VwKVxuICAgICAgICAgICAgICAgIHkgKz0gMTYuMFxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgcHJpdmF0ZSBmdW4gYnVpbGRQbG90KCkge1xuICAgICAgICBidWlsZFBsb3RDb21wb25lbnRzKClcblxuICAgICAgICByZWcob2JqZWN0IDogUmVnaXN0cmF0aW9uKCkge1xuICAgICAgICAgICAgb3ZlcnJpZGUgZnVuIGRvUmVtb3ZlKCkge1xuICAgICAgICAgICAgICAgIGludGVyYWN0b3I/LmRpc3Bvc2UoKVxuICAgICAgICAgICAgICAgIGxpdmVNYXBGaWd1cmVzID0gZW1wdHlMaXN0KClcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSlcbiAgICB9XG5cbiAgICBmdW4gcmVzaXplKHBsb3RTaXplOiBEb3VibGVWZWN0b3IpIHtcbiAgICAgICAgaWYgKHBsb3RTaXplLnggPD0gMCB8fCBwbG90U2l6ZS55IDw9IDApIHJldHVyblxuICAgICAgICBpZiAocGxvdFNpemUgPT0gdGhpcy5wbG90U2l6ZSkgcmV0dXJuXG5cbiAgICAgICAgdGhpcy5wbG90U2l6ZSA9IHBsb3RTaXplXG5cbiAgICAgICAgLy8ganVzdCBpbnZhbGlkYXRlXG4gICAgICAgIGNsZWFyKClcbiAgICB9XG5cbiAgICBwcml2YXRlIGZ1biBidWlsZFBsb3RDb21wb25lbnRzKCkge1xuICAgICAgICB2YWwgb3ZlcmFsbFJlY3QgPSBEb3VibGVSZWN0YW5nbGUoRG91YmxlVmVjdG9yLlpFUk8sIHBsb3RTaXplKVxuXG4gICAgICAgIHZhbCBwbG90VGhlbWUgPSB0aGVtZS5wbG90KClcbiAgICAgICAgaWYgKHBsb3RUaGVtZS5zaG93QmFja2dyb3VuZCgpKSB7XG4gICAgICAgICAgICBhZGQoU3ZnUmVjdEVsZW1lbnQob3ZlcmFsbFJlY3QpLmFwcGx5IHtcbiAgICAgICAgICAgICAgICBzdHJva2VDb2xvcigpLnNldChwbG90VGhlbWUuYmFja2dyb3VuZENvbG9yKCkpXG4gICAgICAgICAgICAgICAgc3Ryb2tlV2lkdGgoKS5zZXQocGxvdFRoZW1lLmJhY2tncm91bmRTdHJva2VXaWR0aCgpKVxuICAgICAgICAgICAgICAgIGZpbGxDb2xvcigpLnNldChwbG90VGhlbWUuYmFja2dyb3VuZEZpbGwoKSlcbiAgICAgICAgICAgICAgICBpZiAoY29udGFpbnNMaXZlTWFwKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIERvbid0IGZpbGwgcmVjdCBvdmVyIGxpdmVtYXAgZmlndXJlLlxuICAgICAgICAgICAgICAgICAgICBmaWxsT3BhY2l0eSgpLnNldCgwLjApXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gUHJldmlvdXNseSB0aGVyZSB3Y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N1YnRyYWN0VGl0bGVzQW5kTGVnZW5kcyhcbiAgICAgICAgICAgIGJhc2VTaXplID0gZW50aXJlUGxvdC5kaW1lbnNpb24sXG4gICAgICAgICAgICB0aXRsZSxcbiAgICAgICAgICAgIHN1YnRpdGxlLFxuICAgICAgICAgICAgY2FwdGlvbixcbiAgICAgICAgICAgIGF4aXNUaXRsZUxlZnQsXG4gICAgICAgICAgICBheGlzVGl0bGVCb3R0b20sXG4gICAgICAgICAgICBheGlzRW5hYmxlZCxcbiAgICAgICAgICAgIGxlZ2VuZHNCbG9ja0luZm8sXG4gICAgICAgICAgICB0aGVtZSxcbiAgICAgICAgICAgIGZsaXBwZWRBeGlzXG4gICAgICAgIClcblxuICAgICAgICAvLyBMYXlvdXQgcGxvdCBpbm5lcnNcbiAgICAgICAgdmFsIHBsb3RJbmZvID0gcGxvdExheW91dC5kb0xheW91dChwbG90SW5uZXJTaXplQXZhaWxhYmxlLCBjb29yZFByb3ZpZGVyKVxuICAgICAgICBpZiAocGxvdEluZm8udGlsZXMuaXNFbXB0eSgpKSB7XG4gICAgICAgICAgICByZXR1cm5cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIElubmVyIHNpemUgaW5jbHVkZXMgZ2VvbXMsIGF4aXMgYW5kIGZhY2V0IGxhYmVscy5cbiAgICAgICAgdmFsIHBsb3RJbm5lclNpemUgPSBwbG90SW5mby5zaXplXG4gICAgICAgIHZhbCBwbG90T3V0ZXJTaXplID0gYWRkVGl0bGVzQW5kTGVnZW5kcyhcbiAgICAgICAgICAgIHBsb3RJbm5lclNpemUsXG4gICAgICAgICAgICB0aXRsZSxcbiAgICAgICAgICAgIHN1YnRpdGxlLFxuICAgICAgICAgICAgY2FwdGlvbixcbiAgICAgICAgICAgIGF4aXNUaXRsZUxlZnQsXG4gICAgICAgICAgICBheGlzVGl0bGVCb3R0b20sXG4gICAgICAgICAgICBheGlzRW5hYmxlZCxcbiAgICAgICAgICAgIGxlZ2VuZHNCbG9ja0luZm8sXG4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AgICAgIHZhbCBjYXB0aW9uU2l6ZURlbHRhID0gUGxvdExheW91dFV0aWwuY2FwdGlvblNpemVEZWx0YShjYXB0aW9uLCB0aGVtZS5wbG90KCkpXG4gICAgICAgICAgICBEb3VibGVSZWN0YW5nbGUoXG4gICAgICAgICAgICAgICAgcGxvdE91dGVyQm91bmRzLm9yaWdpbi5hZGQodGl0bGVTaXplRGVsdGEpLFxuICAgICAgICAgICAgICAgIHBsb3RPdXRlckJvdW5kcy5kaW1lbnNpb24uc3VidHJhY3QodGl0bGVTaXplRGVsdGEpLnN1YnRyYWN0KGNhcHRpb25TaXplRGVsdGEpXG4gICAgICAgICAgICApXG4gICAgICAgIH1cblxuICAgICAgICBpZiAoREVCVUdfRFJBV0lORykge1xuICAgICAgICAgICAgZHJhd0RlYnVnUmVjdChcbiAgICAgICAgICAgICAgICBwbG90T3V0ZXJCb3VuZHNXaXRob3V0VGl0bGVBbmRDYXB0aW9uLFxuICAgICAgICAgICAgICAgIENvbG9yLkJMVUUsXG4gICAgICAgICAgICAgICAgXCJCTFVFOiBwbG90T3V0ZXJCb3VuZHNXaXRob3V0VGl0bGVBbmRDYXB0aW9uXCJcbiAgICAgICAgICAgIClcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIElubmVyIGJvdW5kcyAtIGFsbCB3aXRob3V0IHRpdGxlcyBhbmQgbGVnZW5kcy5cbiAgICAgICAgdmFsIHBsb3RJbm5lck9yaWdpbiA9IHBsb3RPdXRlckJvdW5kc1dpdGhvdXRUaXRsZUFuZENhcHRpb24ub3JpZ2luXG4gICAgICAgICAgICAuYWRkKGxlZ2VuZEJsb2NrTGVmdFRvcERlbHRhKGxlZ2VuZHNCbG9ja0luZm8sIGxlZ2VuZFRoZW1lKSlcbiAgICAgICAgICAgIC5hZGQoXG4gICAgICAgICAgICAgICAgYXhpc1RpdGxlU2l6ZURlbHRhKFxuICAgICAgICAgICAgICAgICAgICBheGlzVGl0bGVMZWZ0ID0gYXhpc1RpdGxlTGVmdC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AgICAgY29vcmRQcm92aWRlcixcbiAgICAgICAgICAgICAgICBERUJVR19EUkFXSU5HXG4gICAgICAgICAgICApXG5cbiAgICAgICAgICAgIHZhbCBtYXJnaW5hbEZyYW1lQnlNYXJnaW46IE1hcDxNYXJnaW5TaWRlLCBGcmFtZU9mUmVmZXJlbmNlPiA9IHRpbGVGcmFtZVByb3ZpZGVyXG4gICAgICAgICAgICAgICAgLmNyZWF0ZU1hcmdpbmFsRnJhbWVzKFxuICAgICAgICAgICAgICAgICAgICB0aWxlTGF5b3V0SW5mbyxcbiAgICAgICAgICAgICAgICAgICAgY29vcmRQcm92aWRlcixcbiAgICAgICAgICAgICAgICAgICAgREVCVUdfRFJBV0lOR1xuICAgICAgICAgICAgICAgIClcblxuICAgICAgICAgICAgdmFsIHRpbGUgPSBQbG90VGlsZShcbiAgICAgICAgICAgICAgICBjb3JlTGF5ZXJzID0gY29yZUxheWVyc0J5VGlsZVt0aWxlSW5kZXhdLFxuICAgICAgICAgICAgICAgIG1hcmdpbmFsTGF5ZXJzID0gbWFyZ2luYWxMYXllcnNCeVRpbGVbdGlsZUluZGV4XSxcbiAgICAgICAgICAgICAgICB0aWxlc09yaWdpbiwgdGlsZUxheW91dEluZm8sIHRoZW1lLFxuICAgICAgICAgICAgICAgIHRpbGVGcmFtZSxcbiAgICAgICAgICAgICAgICBtYXJnaW5hbEZyYW1lQnlNYXJnaW5cbiAgICAgICAgICAgIClcblxuICAgICAgICAgICAgdmFsIHBsb3RPcmlnaW5BYnNvbHV0ZSA9IHRpbGVzT3JpZ2luLmFkZCh0aWxlTGF5b3V0SW5mby5vZmZzZXQpXG4gICAgICAgICAgICB0aWxlLm1vdmVUbyhwbG90T3JpZ2luQWJzb2x1dGUpXG5cbiAgICAgICAgICAgIGFkZCh0aWxlKVxuXG4gICAgICAgICAgICB0aWxlLmxpdmVNYXBGaWd1cmU/LnJ1biB7XG4gICAgICAgICAgICAgICAgbGl2ZU1hcEZpZ3VyZXMgPSBsaXZlTWF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wgXCJSRUQ6IGdlb21BcmVhQm91bmRzXCIpXG4gICAgICAgIH1cblxuICAgICAgICAvLyBwbG90IHRpdGxlLCBzdWJ0aXRsZSwgY2FwdGlvbiByZWN0YW5nbGVzOlxuICAgICAgICAvLyAgIHh4eEVsZW1lbnRSZWN0IC0gcmVjdGFuZ2xlIGZvciBlbGVtZW50LCBpbmNsdWRpbmcgbWFyZ2luc1xuICAgICAgICAvLyAgIHh4eFRleHRSZWN0IC0gZm9yIHRleHQgb25seVxuXG4gICAgICAgIGZ1biB0ZXh0UmVjdGFuZ2xlKGVsZW1lbnRSZWN0OiBEb3VibGVSZWN0YW5nbGUsIG1hcmdpbnM6IE1hcmdpbnMpID0gY3JlYXRlVGV4dFJlY3RhbmdsZShcbiAgICAgICAgICAgIGVsZW1lbnRSZWN0LFxuICAgICAgICAgICAgdG9wTWFyZ2luID0gbWFyZ2lucy50b3AsXG4gICAgICAgICAgICBib3R0b21NYXJnaW4gPSBtYXJnaW5zLmJvdHRvbVxuICAgICAgICApXG5cbiAgICAgICAgdmFsIHBsb3RUaXRsZUVsZW1lbnRSZWN0ID0gdGl0bGU/LmxldCB7XG4gICAgICAgICAgICBEb3VibGVSZWN0YW5nbGUoXG4gICAgICAgICAgICAgICAgZ2VvbUFyZWFCb3VuZHMubGVmdCxcbiAgICAgICAgICAgICAgICBwbG90T3V0ZXJCb3VuZHMudG9wLFxuICAgICAgICAgICAgICAgIGdlb21BcmVhQm91bmRzLndpZHRoLFxuICAgICAgICAgICAgICAgIFBsb3RMYXlvdXRVdGlsLnRpdGxlVGhpY2tuZXNzKFxuICAgICAgICAgICAgICAgICAgICB0aXRsZSxcbiAgICAgICAgICAgICAgICAgICAgUGxvdExhYmVsU3BlY0ZhY3RvcnkucGxvdFRpdGxlKHBsb3RUaGVtZSksXG4gICAgICAgICAgICAgICAgICAgIHRoZW1lLnBsb3QoKS50aXRsZU1hcmdpbnMoKVxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgIClcbiA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nRpdGxlVGhpY2tuZXNzKFxuICAgICAgICAgICAgICAgIGNhcHRpb24sXG4gICAgICAgICAgICAgICAgUGxvdExhYmVsU3BlY0ZhY3RvcnkucGxvdENhcHRpb24ocGxvdFRoZW1lKSxcbiAgICAgICAgICAgICAgICB0aGVtZS5wbG90KCkuY2FwdGlvbk1hcmdpbnMoKVxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgRG91YmxlUmVjdGFuZ2xlKFxuICAgICAgICAgICAgICAgIGdlb21BcmVhQm91bmRzLmxlZnQsXG4gICAgICAgICAgICAgICAgcGxvdE91dGVyQm91bmRzLmJvdHRvbSAtIGNhcHRpb25SZWN0SGVpZ2h0LFxuICAgICAgICAgICAgICAgIGdlb21BcmVhQm91bmRzLndpZHRoLFxuICAgICAgICAgICAgICAgIGNhcHRpb25SZWN0SGVpZ2h0XG4gICAgICAgICAgICApXG4gICAgICAgIH1cbiAgICAgICAgdmFsIGNhcHRpb25UZXh0UmVjdCA9IGNhcHRpb25FbGVtZW50UmVjdD8ubGV0IHsgdGV4dFJlY3RhbmdsZShpdCwgdGhlbWUucGxvdCgpLmNhcHRpb25NYXJnaW5zKCkpIH1cbiAgICAgICAgaWYgKERFQlVHX0RSQVdJTkcpIHtcbiAgICAgICAgICAgIGNhcHRpb25UZXh0UmVjdD8ubGV0IHsgZHJhd0RlYnVnUmVjdChpdCwgQ29sb3IuTElHSFRfQkxVRSkgfVxuICAgICAgICAgICAgY2FwdGlvbkVsZW1lbnRSZWN0Py5sZXQgeyBkcmF3RGVidWdSZWN0KGl0LCBDb2xvci5HUkFZKSB9XG4gICAgICAgICAgICBjYXB0aW9uVGV4dFJlY3Q/LmxldCB7XG4gICAgICAgICAgICAgICAgZHJhd0RlYnVnUmVjdChcbiAgICAgICAgICAgICAgICAgICAgdGV4dEJvdW5kaW5nQm94KGNhcHRpb24hISwgaXQsIFBsb3RMYWJlbFNwZWNGYWN0b3J5LnBsb3RUaXRsZShwbG90VGhlbWUpLCBhbGlnbiA9IDEpLFxuICAgICAgICAgICAgICAgICAgICBDb2xvci5EQVJLX0dSRUVOXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gYWRkIHBsb3QgdGl0bGVcbiAgICAgICAgcGxvdFRpdGxlVGV4dFJlY3Q/LmxldCB7XG4gICAgICAgICAgICBhZGRUaXRsZShcbiAgICAgICAgICAgICAgICB0aXRsZSxcbiAgICAgICAgICAgICAgICBsYWJlbFNwZWMgPSBQbG90TGFiZWxTcGVjRmFjdG9yeS5wbG90VGl0bGUocGxvdFRoZW1lKSxcbiAgICAgICAgICAgICAgICBqdXN0aWZpY2F0aW9uID0gcGxvdFRoZW1lLnRpdGxlSnVzdGlmaWNhdGlvbigpLFxuICAgICAgICAgICAgICAgIGJvdW5kUmVjdCA9IGl0LFxuICAgICAgICAgICAgICAgIGNsYXNzTmFtZSA9IFN0eWxlLlBMT1RfVElUTEVcbiAgICAgICAgICAgIClcbiAgICAgICAgfVxuICAgICAgICAvLyBhZGQgcGxvdCBzdWJ0aXRsZVxuICAgICAgICBzdWJ0aXRsZVRleHRSZWN0Py5sZXQge1xuICAgICAgICAgICAgYWRkVGl0bGUoXG4gICAgICAgICAgICAgICAgc3VidGl0bGUsXG4gICAgICAgICAgICAgICAgbGFiZWxTcGVjID0gUGxvdExhYmVsU3BlY0ZhY3RvcnkucGxvdFN1YnRpdGxlKHBsb3RUaGVtZSksXG4gICAgICAgICAgICAgICAganVzdGlmaWNhdGlvbiA9IHBsb3RUaGVtZS5zdWJ0aXRsZUp1c3RpZmljYXRpb24oKSxcbiAgICAgICAgICAgICAgICBib3VuZFJlY3QgPSBpdCxcbiAgICAgICAgICAgICAgICBjbGFzc05hbWUgPSBTdHlsZS5QTE9UX1NVQlRJVExFXG4gICAgICAgICAgICApXG4gICAgICAgIH1cblxuICAgICAgICB2YWwgb3ZlcmFsbFRpbGVCb3VuZHMgPSBQbG90TGF5b3V0VXRpbC5vdmVyYWxsVGlsZUJvdW5kcyhwbG90SW5mbylcbiAgICAgICAgICAgIC5hZGQocGxvdElubmVyT3JpZ2luKVxuXG4gICAgICAgIGlmIChERUJVR19EUkFXSU5HKSB7XG4gICAgICAgICAgICBkcmF3RGVidWdSZWN0KG92ZXJhbGxUaWxlQm91bmRzLCBDb2xvci5EQVJLX01BR0VOVEEsIFwiREFSS19NQUdFTlRBOiBvdmVyYWxsVGlsZUJvdW5kc1wiKVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gYWRkIGF4aXMgdGl0bGVzXG4gICAgICAgIGlmIChheGlzRW5hYmxlZCkge1xuICAgICAgICAgICAgaWYgKGF4aXNUaXRsZUxlZnQgIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIHZhbCB2QXhpc09yaWVudGF0aW9uID0gcGxvdEluZm8udGlsZXMuZmlyc3QoKS52QXhpc0luZm8hIS5vcmllbnRhdGlvblxuICAgICAgICAgICAgICAgIGFkZEF4aXNUaXRsZShcbiAgICAgICAgICAgICAgICAgICAgYXhpc1RpdGxlTGVmdCxcbi8vICAgICAgICAgICAgICAgICAgICBPcmllbnRhdGlvbi5MRUZULFxuICAgICAgICAgICAgICAgICAgICB2QXhpc09yaWVudGF0aW9uLFxuICAgICAgICAgICAgICAgICAgICBvdmVyYWxsVGlsZUJvdW5kcyxcbiAgICAgICAgICAgICAgICAgICAgZ2VvbUFyZWFCb3VuZHMsXG4gICAgICAgICAgICAgICAgICAgIGxhYmVsU3BlYyA9IFBsb3RMYWJlbFNwZWNGYWN0b3J5LmF4aXNUaXRsZSh0aGVtZS52ZXJ0aWNhbEF4aXMoZmxpcHBlZEF4aXMpKSxcbiAgICAgICAgICAgICAgICAgICAganVzdGlmaWNhdGlvbiA9IHRoZW1lLnZlcnRpY2FsQXhpcyhmbGlwcGVkQXhpcykudGl0bGVKdXN0aWZpY2F0aW9uKCksXG4gICAgICAgICAgICAgICAgICAgIG1hcmdpbnMgPSB0aGVtZS52ZXJ0aWNhbEF4aXMoZmxpcHBlZEF4aXMpLnRpdGxlTWFyZ2lucygpLFxuICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWUgPSBcIiR7U3R5bGUuQVhJU19USVRMRX0tJHt0aGVtZS52ZXJ0aWNhbEF4aXMoZmxpcHBlZEF4aXMpLmF4aXN9XCJcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoYXhpc1RpdGxlQm90dG9tICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICB2YWwgaEF4aXNPcmllbnRhdGlvbiA9IHBsb3RJbmZvLnRpbGVzLmZpcnN0KCkuaEF4aXNJbmZvISEub3JpZW50YXRpb25cbiAgICAgICAgICAgICAgICBhZGRBeGlzVGl0bGUoXG4gICAgICAgICAgICAgICAgICAgIGF4aXNUaXRsZUJvdHRvbSxcbi8vICAgICAgICAgICAgICAgICAgICBPcmllbnRhdGlvbi5CT1RUT00sXG4gICAgICAgICAgICAgICAgICAgIGhBeGlzT3JpZW50YXRpb24sXG4gICAgICAgICAgICAgICAgICAgIG92ZXJhbGxUaWxlQm91bmRzLFxuICAgICAgICAgICAgICAgICAgICBnZW9tQXJlYUJvdW5kcyxcbiAgICAgICAgICAgICAgICAgICAgbGFiZWxTcGVjID0gUGxvdExhYmVsU3BlY0ZhY3RvcnkuYXhpc1RpdGxlKHRoZW1lLmhvcml6b250YWxBeGlzKGZsaXBwZWRBeGlzKSksXG4gICAgICAgICAgICAgICAgICAgIGp1c3RpZmljYXRpb24gPSB0aGVtZS5ob3Jpem9udGFsQXhpcyhmbGlwcGVkQXhpcykudGl0bGVKdXN0aWZpY2F0aW9uKCksXG4gICAgICAgICAgICAgICAgICAgIG1hcmdpbnMgPSB0aGVtZS5ob3Jpem9udGFsQXhpcyhmbGlwcGVkQXhpcykudGl0bGVNYXJnaW5zKCksXG4gICAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZSA9IFwiJHtTdHlsZS5BWElTX1RJVExFfS0ke3RoZW1lLmhvcml6b250YWxBeGlzKGZsaXBwZWRBeGlzKS5heGlzfVwiXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gYWRkIGxlZ2VuZHNcbiAgICAgICAgaWYgKCFsZWdlbmRUaGVtZS5wb3NpdGlvbigpLmlzSGlkZGVuKSB7XG4gICAgICAgICAgICB2YWwgbGVnZW5kc0Jsb2NrSW5mb0xheW91dGVkID0gTGVnZW5kQm94ZXNMYXlvdXQoXG4gICAgICAgICAgICAgICAgb3V0ZXJCb3VuZHMgPSBwbG90T3V0ZXJCb3VuZHNXaXRob3V0VGl0bGVBbmRDYXB0aW9uLFxuICAgICAgICAgICAgICAgIGlubmVyQm91bmRzID0gZ2VvbUFyZWFCb3VuZHMsXG4gICAgICAgICAgICAgICAgbGVnZW5kVGhlbWVcbiAgICAgICAgICAgICkuZG9MYXlvdXQobGVnZW5kc0Jsb2NrSW5mbylcblxuICAgICAgICAgICAgZm9yIChib3hXaXRoTG9jYXRpb24gaW4gbGVnZW5kc0Jsb2NrSW5mb0xheW91dGVkLmJveFdpdGhMb2NhdGlvbkxpc3QpIHtcbiAgICAgICAgICAgICAgICB2YWwgbGVnZW5kQm94ID0gYm94V2l0aExvY2F0aW9uLmxlZ2VuZEJveC5jcmVhdGVMZWdlbmRCb3goKVxuICAgICAgICAgICAgICAgIGxlZ2VuZEJveC5tb3ZlVG8oYm94V2l0aExvY2F0aW9uLmxvY2F0aW9uKVxuICAgICAgICAgICAgICAgIGFkZChsZWdlbmRCb3gpXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBhZGQgY2FwdGlvblxuICAgICAgICBjYXB0aW9uVGV4dFJlY3Q/LmxldCB7XG4gICAgICAgICAgICBhZGRUaXRsZShcbiAgICAgICAgICAgICAgICB0aXRsZSA9IGNhcHRpb24sXG4gICAgICAgICAgICAgICAgbGFiZWxTcGVjID0gUGxvdExhYmVsU3BlY0ZhY3Rvcn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W5kczogRG91YmxlUmVjdGFuZ2xlLCAgLy8gZ2VvbSBib3VuZHMgdW5pb25cbiAgICAgICAgbGFiZWxTcGVjOiBMYWJlbFNwZWMsXG4gICAgICAgIGp1c3RpZmljYXRpb246IFRleHRKdXN0aWZpY2F0aW9uLFxuICAgICAgICBtYXJnaW5zOiBNYXJnaW5zLFxuICAgICAgICBjbGFzc05hbWU6IFN0cmluZ1xuICAgICkge1xuICAgICAgICB2YWwgcmVmZXJlbmNlUmVjdCA9IHdoZW4gKG9yaWVudGF0aW9uKSB7XG4gICAgICAgICAgICBPcmllbnRhdGlvbi5MRUZULFxuICAgICAgICAgICAgT3JpZW50YXRpb24uUklHSFQgLT5cbiAgICAgICAgICAgICAgICBEb3VibGVSZWN0YW5nbGUoXG4gICAgICAgICAgICAgICAgICAgIG92ZXJhbGxUaWxlQm91bmRzLmxlZnQsIG92ZXJhbGxHZW9tQm91bmRzLnRvcCxcbiAgICAgICAgICAgICAgICAgICAgb3ZlcmFsbFRpbGVCb3VuZHMud2lkdGgsIG92ZXJhbGxHZW9tQm91bmRzLmhlaWdodFxuICAgICAgICAgICAgICAgIClcblxuICAgICAgICAgICAgT3JpZW50YXRpb24uVE9QLFxuICAgICAgICAgICAgT3JpZW50YXRpb24uQk9UVE9NIC0+XG4gICAgICAgICAgICAgICAgRG91YmxlUmVjdGFuZ2xlKFxuICAgICAgICAgICAgICAgICAgICBvdmVyYWxsR2VvbUJvdW5kcy5sZWZ0LCBvdmVyYWxsVGlsZUJvdW5kcy50b3AsXG4gICAgICAgICAgICAgICAgICAgIG92ZXJhbGxHZW9tQm91bmRzLndpZHRoLCBvdmVyYWxsVGlsZUJvdW5kcy5oZWlnaHRcbiAgICAgICAgICAgICAgICApXG4gICAgICAgIH1cblxuICAgICAgICB2YWwgcm90YXRpb24gPSB3aGVuIChvcmllbnRhdGlvbikge1xuICAgICAgICAgICAgT3JpZW50YXRpb24uTEVGVCAtPiBUZXh0Um90YXRpb24uQU5USUNMT0NLV0lTRVxuICAgICAgICAgICAgT3JpZW50YXRpb24uUklHSFQgLT4gVGV4dFJvdGF0aW9uLkFOVElDTE9DS1dJU0VcbiAgICAgICAgICAgIGVsc2UgLT4gbnVsbFxuICAgICAgICB9XG5cbiAgICAgICAgdmFsIHRleHRIZWlnaHQgPSBQbG90TGF5b3V0VXRpbC50ZXh0RGltZW5zaW9ucyh0ZXh0LCBsYWJlbFNwZWMpLnlcblxuICAgICAgICAvLyByZWN0YW5nbGUgZm9yIGVsZW1lbnQsIGluY2x1ZGluZyBtYXJnaW5zXG4gICAgICAgIHZhbCBheGlzVGl0bGVFbGVtZW50UmVjdCA9IHdoZW4gKG9yaWVudGF0aW9uKSB7XG4gICAgICAgICAgICBPcmllbnRhdGlvbi5MRUZUIC0+XG4gICAgICAgICAgICAgICAgRG91YmxlUmVjdGFuZ2xlKFxuICAgICAgICAgICAgICAgICAgICByZWZlcmVuY2VSZWN0LmxlZnQgLSB0ZXh0SGVpZ2h0IC0gbWFyZ2lucy53aWR0aCgpLFxuICAgICAgICAgICAgICAgICAgICByZWZlcmVuY2VSZWN0LnRvcCxcbiAgICAgICAgICAgICAgICAgICAgdGV4dEhlaWdodCArIG1hcmdpbnMud2lkdGgoKSxcbiAgICAgICAgICAgICAgICAgICAgcmVmZXJlbmNlUmVjdC5oZWlnaHRcbiAgICAgICAgICAgICAgICApXG5cbiAgICAgICAgICAgIE9yaWVudGF0aW9uLlJJR0hUIC0+XG4gICAgICAgICAgICAgICAgRG91YmxlUmVjdGFuZ2xlKFxuICAgICAgICAgICAgICAgICAgICByZWZlcmVuY2VSZWN0LnJpZ2h0LFxuICAgICAgICAgICAgICAgICAgICByZWZlcmVuY2VSZWN0LnRvcCxcbiAgICAgICAgICAgICAgICAgICAgdGV4dEhlaWdodCArIG1hcmdpbnMud2lkdGgoKSxcbiAgICAgICAgICAgICAgICAgICAgcmVmZXJlbmNlUmVjdC5oZWlnaHRcbiAgICAgICAgICAgICAgICApXG5cbiAgICAgICAgICAgIE9yaWVudGF0aW9uLlRPUCAtPiBEb3VibGVSZWN0YW5nbGUoXG4gICAgICAgICAgICAgICAgcmVmZXJlbmNlUmVjdC5sZWZ0LFxuICAgICAgICAgICAgICAgIHJlZmVyZW5jZVJlY3QudG9wIC0gdGV4dEhlaWdodCAtIG1hcmdpbnMuaGVpZ2h0KCksXG4gICAgICAgICAgICAgICAgcmVmZXJlbmNlUmVjdC53aWR0aCxcbiAgICAgICAgICAgICAgICB0ZXh0SGVpZ2h0ICsgbWFyZ2lucy5oZWlnaHQoKVxuICAgICAgICAgICAgKVxuXG4gICAgICAgICAgICBPcmllbnRhdGlvbi5CT1RUT00gLT4gRG91YmxlUmVjdGFuZ2xlKFxuICAgICAgICAgICAgICAgIHJlZmVyZW5jZVJlY3QubGVmdCxcbiAgICAgICAgICAgICAgICByZWZlcmVuY2VSZWN0LmJvdHRvbSxcbiAgICAgICAgICAgICAgICByZWZlcmVuY2VSZWN0LndpZHRoLFxuICAgICAgICAgICAgICAgIHRleHRIZWlnaHQgKyBtYXJnaW5zLmhlaWdodCgpXG4gICAgICAgICAgICApXG4gICAgICAgIH1cblxuICAgICAgICAvLyByZWN0YW5nbGUgZm9yIHRleHQgKHdpdGhvdXQgbWFyZ2lucylcbiAgICAgICAgdmFsIGF4aXNUaXRsZVRleHRSZWN0ID0gd2hlbiB7XG4gICAgICAgICAgICBvcmllbnRhdGlvbi5pc0hvcml6b250YWwgLT4ge1xuICAgICAgICAgICAgICAgIGNyZWF0ZVRleHRSZWN0YW5nbGUoXG4gICAgICAgICAgICAgICAgICAgIGF4aXNUaXRsZUVsZW1lbnRSZWN0LFxuICAgICAgICAgICAgICAgICAgICB0b3BNYXJnaW4gPSBtYXJnaW5zLnRvcCxcbiAgICAgICAgICAgICAgICAgICAgYm90dG9tTWFyZ2luID0gbWFyZ2lucy5ib3R0b21cbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGVsc2UgLT4ge1xuICAgICAgICAgICAgICAgIGNyZWF0ZVRleHRSZWN0YW5nbGUoXG4gICAgICAgICAgICAgICAgICAgIGF4aXNUaXRsZUVsZW1lbnRSZWN0LFxuICAgICAgICAgICAgICAgICAgICByaWdodE1hcmdpbiA9IG1hcmdpbnMucmlnaHQsXG4gICAgICAgICAgICAgICAgICAgIGxlZnRNYXJnaW4gPSBtYXJnaW5zLmxlZnRcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBhZGRUaXRsZShcbiAgICAgICAgICAgIHRleHQsXG4gICAgICAgICAgICBsYWJlbFNwZWMsXG4gICAgICAgICAgICBqdXN0aWZpY2F0aW9uLFxuICAgICAgICAgICAgYXhpc1RpdGxlVGV4dFJlY3QsXG4gICAgICAgICAgICByb3RhdGlvbixcbiAgICAgICAgICAgIGNsYXNzTmFtZVxuICAgICAgICApXG5cbiAgICAgICAgaWYgKERFQlVHX0RSQVdJTkcpIHtcbiAgICAgICAgICAgIGRyYXdEZWJ1Z1JlY3QoYXhpc1RpdGxlVGV4dFJlY3QsIENvbG9yLkxJR0hUX0JMVUUpXG4gICAgICAgICAgICBkcmF3RGVidWdSZWN0KGF4aXNUaXRsZUVsZW1lbnRSZWN0LCBDb2xvci5HUkFZKVxuICAgICAgICAgICAgZHJhd0RlYnVnUmVjdCh0ZXh0Qm91bmRpbmdCb3godGV4dCwgYXhpc1RpdGxlVGV4dFJlY3QsIGxhYmVsU3BlYywgb3JpZW50YXRpb24pLCBDb2xvci5EQVJLX0dSRUVOKVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgcHJpdmF0ZSBmdW4gdGV4dEJvdW5kaW5nQm94KFxuICAgICAgICB0ZXh0OiBTdHJpbmcsXG4gICAgICAgIGJvdW5kUmVjdDogRG91YmxlUmVjdGFuZ2xlLFxuICAgICAgICBsYWJlbFNwZWM6IExhYmVsU3BlYyxcbiAgICAgICAgb3JpZW50YXRpb246IE9yaWVudGF0aW9uID0gT3JpZW50YXRpb24uVE9QLFxuICAgICAgICBhbGlnbjogSW50ID0gMCAvLyA8IDAgLSB0byBsZWZ0OyA+IDAgLSB0byByaWdodDsgMCAtIGNlbnRlcmVkXG4gICAgKTogRG91YmxlUmVjdGFuZ2xlIHtcbiAgICAgICAgdmFsIGQgPSBQbG90TGF5b3V0VXRpbC50ZXh0RGltZW5zaW9ucyh0ZXh0LCBsYWJlbFNwZWMpXG4gICAgICAgIHJldHVybiBpZiAob3JpZW50YXRpb24gaW4gbGlzdE9mKE9yaWVudGF0aW9uLlRPUCwgT3JpZW50YXRpb24uQk9UVE9NKSkge1xuICAgICAgICAgICAgdmFsIHggPSB3aGVuIHtcbiAgICAgICAgICAgICAgICBhbGlnbiA+IDAgLT4gYm91bmRSZWN0LnJpZ2h0IC0gZC54XG4gICAgICAgICAgICAgICAgYWxpZ24gPCAwIC0+IGJvdW5kUmVjdC5sZWZ0XG4gICAgICAgICAgICAgICAgZWxzZSAtPiBib3VuZFJlY3QuY2VudGVyLnggLSBkLnggLyAyXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBEb3VibGVSZWN0YW5nbGUoeCwgYm91bmRSZWN0LmNlbnRlci55IC0gZC55IC8gMiwgZC54LCBkLnkpXG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB2YWwgeSA9IHdoZW4ge1xuICAgICAgICAgICAgICAgIGFsaWduID4gMCAtPiBib3VuZFJlY3QuYm90dG9tIC0gZC54XG4gICAgICAgICAgICAgICAgYWxpZ24gPCAwIC0+IGJvdW5kUmVjdC50b3BcbiAgICAgICAgICAgICAgICBlbHNlIC0+IGJvdW5kUmVjdC5jZW50ZXIueSAtIGQueCAvIDJcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIERvdWJsZVJlY3RhbmdsZShib3VuZFJlY3QuY2VudGVyLnggLSBkLnkgLyAyLCB5LCBkLnksIGQueClcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHByaXZhdGUgZnVuIGFkZFRpdGxlKFxuICAgIC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lJlZmVyZW5jZS5idWlsZEdlb21Db21wb25lbnQobGF5ZXIsIGNvbGxlY3RvcldpdGhMb2NhdG9yKVxuICAgICAgICAgICAgICAgIGFkZChsYXllckNvbXBvbmVudClcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gTWFyZ2luYWwgbGF5ZXJzXG4gICAgICAgICAgICB2YWwgbWFyZ2luYWxMYXllcnNCeU1hcmdpbjogTWFwPE1hcmdpblNpZGUsIExpc3Q8R2VvbUxheWVyPj4gPSBtYXJnaW5hbExheWVyc0J5TWFyZ2luKG1hcmdpbmFsTGF5ZXJzKVxuXG4gICAgICAgICAgICBmb3IgKChtYXJnaW4sIGxheWVycykgaW4gbWFyZ2luYWxMYXllcnNCeU1hcmdpbikge1xuICAgICAgICAgICAgICAgIHZhbCBtYXJnaW5GcmFtZSA9IG1hcmdpbmFsRnJhbWVCeU1hcmdpbi5nZXRWYWx1ZShtYXJnaW4pXG4gICAgICAgICAgICAgICAgZm9yIChsYXllciBpbiBsYXllcnMpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFsIG1hcmdpbkNvbXBvbmVudCA9IG1hcmdpbkZyYW1lLmJ1aWxkR2VvbUNvbXBvbmVudChsYXllciwgTnVsbEdlb21UYXJnZXRDb2xsZWN0b3IoKSlcbiAgICAgICAgICAgICAgICAgICAgYWRkKG1hcmdpbkNvbXBvbmVudClcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGZyYW1lT2ZSZWZlcmVuY2UuZHJhd0FmdGVyR2VvbUxheWVyKHRoaXMpXG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBwcml2YXRlIGZ1biBhZGRGYWNldExhYmVscyhnZW9tQm91bmRzOiBEb3VibGVSZWN0YW5nbGUsIHRoZW1lOiBGYWNldHNUaGVtZSkge1xuLy8gICAgICAgIGlmICghdGhlbWUuc2hvd1N0cmlwKCkpIHJldHVyblxuXG4gICAgICAgIC8vIGZhY2V0IFggbGFiZWwgKG9uIHRvcCBvZiBnZW9tIGFyZWEpXG4gICAgICAgIHZhbCB4TGFiZWxzID0gdGlsZUxheW91dEluZm8uZmFjZXRYTGFiZWxzXG4gICAgICAgIGlmICh4TGFiZWxzLmlzTm90RW1wdHkoKSkge1xuICAgICAgICAgICAgdmFsIGxhYmVsU2l6ZSA9IGZhY2V0Q29sTGFiZWxTaXplKGdlb21Cb3VuZHMud2lkdGgpXG4gICAgICAgICAgICB2YWwgbGFiZWxPcmlnID0gRG91YmxlVmVjdG9yKFxuICAgICAgICAgICAgICAgIGdlb21Cb3VuZHMubGVmdCArIEZBQ0VUX0hfUEFERElORyxcbiAgICAgICAgICAgICAgICBnZW9tQm91bmRzLnRvcCAtIGZhY2V0Q29sSGVhZEhlaWdodCh4TGFiZWxzLnNpemUpICsgRkFDRVRfVl9QQURESU5HXG4gICAgICAgICAgICApXG4gICAgICAgICAgICB2YXIgbGFiZWxCb3VuZHMgPSBEb3VibGVSZWN0YW5nbGUoXG4gICAgICAgICAgICAgICAgbGFiZWxPcmlnLCBsYWJlbFNpemVcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGZvciAoeExhYmVsIGluIHhMYWJlbHMpIHtcbiAgICAgICAgICAgICAgICAvLyBUb0RvOiBVc2UgXCJmYWNldCBYXCIgdGhlbWUuXG4gICAgICAgICAgICAgICAgYWRkRmFjZXRMYWJCYWNrZ3JvdW5kKGxhYmVsQm91bmRzLCB0aGVtZSlcblxuICAgICAgICAgICAgICAgIHZhbCB4ID0gbGFiZWxCb3VuZHMuY2VudGVyLnhcbiAgICAgICAgICAgICAgICB2YWwgeSA9IGxhYmVsQm91bmRzLmNlbnRlci55XG4gICAgICAgICAgICAgICAgdmFsIGxhYiA9IFRleHRMYWJlbCh4TGFiZWwpXG4gICAgICAgICAgICAgICAgbGFiLmFkZENsYXNzTmFtZShcIiR7U3R5bGUuRkFDRVRfU1RSSVBfVEVYVH0teFwiKVxuICAgICAgICAgICAgICAgIGxhYi5tb3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ID0gbGFiZWxCb3VuZHMuY2VudGVyLnlcblxuICAgICAgICAgICAgdmFsIGxhYiA9IFRleHRMYWJlbCh0aWxlTGF5b3V0SW5mby5mYWNldFlMYWJlbClcbiAgICAgICAgICAgIGxhYi5hZGRDbGFzc05hbWUoXCIke1N0eWxlLkZBQ0VUX1NUUklQX1RFWFR9LXlcIilcbiAgICAgICAgICAgIGxhYi5tb3ZlVG8oeCwgeSlcbiAgICAgICAgICAgIGxhYi5zZXRIb3Jpem9udGFsQW5jaG9yKFRleHQuSG9yaXpvbnRhbEFuY2hvci5NSURETEUpXG4gICAgICAgICAgICBsYWIuc2V0VmVydGljYWxBbmNob3IoVGV4dC5WZXJ0aWNhbEFuY2hvci5DRU5URVIpXG4gICAgICAgICAgICBsYWIucm90YXRlKDkwLjApXG4gICAgICAgICAgICBhZGQobGFiKVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgcHJpdmF0ZSBmdW4gYWRkRmFjZXRMYWJCYWNrZ3JvdW5kKGxhYmVsQm91bmRzOiBEb3VibGVSZWN0YW5nbGUsIGZhY2V0VGhlbWU6IEZhY2V0c1RoZW1lKSB7XG4gICAgICAgIGlmIChmYWNldFRoZW1lLnNob3dTdHJpcEJhY2tncm91bmQoKSkge1xuICAgICAgICAgICAgdmFsIHJlY3QgPSBTdmdSZWN0RWxlbWVudChsYWJlbEJvdW5kcykuYXBwbHkge1xuICAgICAgICAgICAgICAgIHN0cm9rZVdpZHRoKCkuc2V0KGZhY2V0VGhlbWUuc3RyaXBTdHJva2VXaWR0aCgpKVxuICAgICAgICAgICAgICAgIGZpbGxDb2xvcigpLnNldChmYWNldFRoZW1lLnN0cmlwRmlsbCgpKVxuICAgICAgICAgICAgICAgIHN0cm9rZUNvbG9yKCkuc2V0KGZhY2V0VGhlbWUuc3RyaXBDb2xvcigpKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYWRkKHJlY3QpXG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBjb21wYW5pb24gb2J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dmFsIG51bWVyaWNWYWx1ZXMgPSBkYXRhLmdldE51bWVyaWModHJhbnNmb3JtVmFyKVxuXG4gICAgICAgICAgICAgICAgICAgIGlmIChkYXRhUG9pbnRDb3VudCA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhUG9pbnRDb3VudCA9IG51bWVyaWNWYWx1ZXMuc2l6ZVxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgY2hlY2soZGF0YVBvaW50Q291bnQgPT0gbnVtZXJpY1ZhbHVlcy5zaXplKVxuICAgICAgICAgICAgICAgICAgICAgICAgeyBcIlwiICsgYWVzICsgXCIgZXhwZWN0ZWQgZGF0YSBzaXplPVwiICsgZGF0YVBvaW50Q291bnQgKyBcIiB3YXMgc2l6ZT1cIiArIG51bWVyaWNWYWx1ZXMuc2l6ZSB9XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBpZiAoZGF0YVBvaW50Q291bnQgPT0gMCAmJiBoYXNQb3NpdGlvbmFsQ29uc3RhbnRzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBwdXQgY29uc3RhbnQgaW5zdGVhZCBvZiBlbXB0eSBsaXN0XG4gICAgICAgICAgICAgICAgICAgICAgICBhZXNCdWlsZGVyLmNvbnN0YW50QWVzKGFlcywgbGF5ZXIuYWVzdGhldGljc0RlZmF1bHRzLmRlZmF1bHRWYWx1ZShhZXMpKVxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFsIGludGVnZXJGdW5jdGlvbiA9IGxpc3RNYXBwZXIobnVtZXJpY1ZhbHVlcywgbWFwcGVyT3B0aW9uKVxuICAgICAgICAgICAgICAgICAgICAgICAgYWVzQnVpbGRlci5hZXMoYWVzLCBpbnRlZ2VyRnVuY3Rpb24pXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAvLyBhcHBseSBkZWZhdWx0XG4gICAgICAgICAgICAgICAgICAgIHZhbCB2ID0gbGF5ZXIuZ2V0RGVmYXVsdChhZXMpXG4gICAgICAgICAgICAgICAgICAgIHZhbCB0ID0gdHJhbnNmb3JtSWZDb250aW51b3VzKHNjYWxlKGFlcywgbGF5ZXIpKVxuICAgICAgICAgICAgICAgICAgICBhZXNCdWlsZGVyLmNvbnN0YW50QWVzKFxuICAgICAgICAgICAgICAgICAgICAgICAgYWVzLFxuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3RhbnRUb0Flc1ZhbHVlKGFlcywgdiwgdCwgbWFwcGVyT3B0aW9uKVxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGRhdGFQb2ludENvdW50ICE9IG51bGwgJiYgZGF0YVBvaW50Q291bnQgPiAwKSB7XG4gICAgICAgICAgICBhZXNCdWlsZGVyLmRhdGFQb2ludENvdW50KGRhdGFQb2ludENvdW50KVxuICAgICAgICB9IGVsc2UgaWYgKGhhc1Bvc2l0aW9uYWxDb25zdGFudHMpIHtcbiAgICAgICAgICAgIC8vIHNvbWUgZ2VvbXMgKHBvaW50LCBhYmxpbmUgZXRjLikgY2FuIGJlIHBsb3R0ZWQgd2l0aCBvbmx5IGNvbnN0YW50c1xuICAgICAgICAgICAgYWVzQnVpbGRlci5kYXRhUG9pbnRDb3VudCgxKVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGFlc0J1aWxkZXIuYnVpbGQoKVxuICAgIH1cblxuICAgIHByaXZhdGUgZnVuIGNvbnN0YW50VG9BZXNWYWx1ZShcbiAgICAgICAgYWVzOiBBZXM8Kj4sXG4gICAgICAgIHY6IEFueT8sXG4gICAgICAgIGNvbnRpbnVvdXNUcmFuc2Zvcm06IENvbnRpbnVvdXNUcmFuc2Zvcm0/LFxuICAgICAgICBtYXBwZXJPcHRpb246IFNjYWxlTWFwcGVyPCo+P1xuICAgICk6IEFueT8ge1xuXG4gICAgICAgIHJldHVybiBpZiAoYWVzLmlzTnVtZXJpYykge1xuICAgICAgICAgICAgLy8gQ29uc3RhbnRzIGZvciBudW1lcmluIEFlcyA6IHgsIHksIHNpemUgZXRjLlxuICAgICAgICAgICAgLy8gc2hvdWxkIGJlIHRyYW5zZm9ybWVkIGJlZm9yZSBmdXJ0aGVyIG1hcHBpbmcgaXMgYXBwbGllZC5cbiAgICAgICAgICAgIHZhbCB0cmFuc2Zvcm1lZCA9IGlmIChjb250aW51b3VzVHJhbnNmb3JtICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICB3aGVuIChjb250aW51b3VzVHJhbnNmb3JtLmlzSW5Eb21haW4odiBhcyBEb3VibGUpKSB7XG4gICAgICAgICAgICAgICAgICAgIHRydWUgLT4gY29udGludW91c1RyYW5zZm9ybS5hcHBseSh2KVxuICAgICAgICAgICAgICAgICAgICBmYWxzZSAtPiBudWxsXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB2IGFzPyBEb3VibGUgICAvLyBBZXMgbGlrZSAnd2lkdGgnLCAnaGVpZ2h0JyBub3QgZXhwZWN0ZWQgdG8gaGF2ZSBhIHRyYW5zZm9ybS5cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgbWFwcGVyT3B0aW9uPy5pbnZva2UodHJhbnNmb3JtZWQpID86IHRyYW5zZm9ybWVkXG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB2XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBFeHBhbmQgWC9ZLXJhbmdlIHRvIGVuc3VyZSB0aGF0IHRoZSBkYXRhIGlzIHBsYWNlZCBzb21lIGRpc3RhbmNlIGF3YXkgZnJvbSB0aGUgYXhlcy5cbiAgICAgKi9cbiAgICBpbnRlcm5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B1cHBlckVuZHBvaW50ID0gZG9tYWluLnVwcGVyRW5kXG5cbiAgICAgICAgdmFsIGxlbmd0aCA9IHVwcGVyRW5kcG9pbnQgLSBsb3dlckVuZHBvaW50XG4gICAgICAgIHZhciBsb3dlckV4cGFuZCA9IGFkZEV4cCArIGxlbmd0aCAqIG11bEV4cFxuICAgICAgICB2YXIgdXBwZXJFeHBhbmQgPSBsb3dlckV4cGFuZFxuICAgICAgICBpZiAoaW5jbHVkZVplcm8pIHtcbiAgICAgICAgICAgIC8vIHplcm8tYmFzZWQgcGxvdHMgKGxpa2UgYmFyKSAtIGRvIG5vdCAnZXhwYW5kJyBvbiB0aGUgemVyby1lbmRcbiAgICAgICAgICAgIGlmIChsb3dlckVuZHBvaW50ID09IDAuMCB8fFxuICAgICAgICAgICAgICAgIHVwcGVyRW5kcG9pbnQgPT0gMC4wIHx8XG4gICAgICAgICAgICAgICAgc2lnbihsb3dlckVuZHBvaW50KSA9PSBzaWduKHVwcGVyRW5kcG9pbnQpXG4gICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBpZiAobG93ZXJFbmRwb2ludCA+PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGxvd2VyRXhwYW5kID0gMC4wXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdXBwZXJFeHBhbmQgPSAwLjBcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICB2YWwgbG93ZXJFbmRXaXRoRXhwYW5kID0gKGxvd2VyRW5kcG9pbnQgLSBsb3dlckV4cGFuZCkubGV0IHtcbiAgICAgICAgICAgIHZhbCB0cmFuc2Zvcm1lZCA9IGNvbnRpbnVvdXNUcmFuc2Zvcm0/LmFwcGx5KGl0KSA/OiBpdFxuICAgICAgICAgICAgaWYgKHRyYW5zZm9ybWVkLmlzTmFOKCkpIHtcbiAgICAgICAgICAgICAgICByYW5nZS5sb3dlckVuZFxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB0cmFuc2Zvcm1lZFxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHZhbCB1cHBlckVuZFdpdGhFeHBhbmQgPSAodXBwZXJFbmRwb2ludCArIHVwcGVyRXhwYW5kKS5sZXQge1xuICAgICAgICAgICAgdmFsIHRyYW5zZm9ybWVkID0gY29udGludW91c1RyYW5zZm9ybT8uYXBwbHkoaXQpID86IGl0XG4gICAgICAgICAgICBpZiAodHJhbnNmb3JtZWQuaXNOYU4oKSkge1xuICAgICAgICAgICAgICAgIHJhbmdlLnVwcGVyRW5kXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRyYW5zZm9ybWVkXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIERvdWJsZVNwYW4obG93ZXJFbmRXaXRoRXhwYW5kLCB1cHBlckVuZFdpdGhFeHBhbmQpXG4gICAgfVxuXG4gICAgcHJpdmF0ZSBmdW4gdHJhbnNmb3JtSWZDb250aW51b3VzKHNjYWxlOiBTY2FsZTwqPj8pOiBDb250aW51b3VzVHJhbnNmb3JtPyB7XG4gICAgICAgIGlmIChzY2FsZSA9PSBudWxsKSByZXR1cm4gbnVsbFxuICAgICAgICByZXR1cm4gaWYgKHNjYWxlLmlzQ29udGludW91c0RvbWFpbikge1xuICAgICAgICAgICAgc2NhbGUudHJhbnNmb3JtIGFzIENvbnRpbnVvdXNUcmFuc2Zvcm1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIG51bGxcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHByaXZhdGUgZnVuIHNjYWxlKGFlczogQWVzPCo+LCBsYXllcjogR2VvbUxheWVyKTogU2NhbGU8Kj4/IHtcbiAgICAgICAgQFN1cHByZXNzKFwiTkFNRV9TSEFET1dJTkdcIilcbiAgICAgICAgdmFsIGFlcyA9IHdoZW4ge1xuICAgICAgICAgIC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tPlxuICAgICAgICAgICAgICAgIHZhbCBkYXRhQWVzTGlzdCA9IGxpbmUuZmllbGRzLmZpbHRlcklzSW5zdGFuY2U8TWFwcGluZ1ZhbHVlPigpXG4gICAgICAgICAgICAgICAgZGF0YUFlc0xpc3QuYWxsIHsgbWFwcGVkQWVzIC0+IGRhdGFBY2Nlc3MuaXNNYXBwZWQobWFwcGVkQWVzLmFlcykgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbWFwcGVkTGluZXMuZm9yRWFjaCB7IGl0LmluaXREYXRhQ29udGV4dChkYXRhRnJhbWUsIGRhdGFBY2Nlc3MpIH1cbiAgICAgICAgICAgIHJldHVybiBBbm5vdGF0aW9ucyhcbiAgICAgICAgICAgICAgICBtYXBwZWRMaW5lcyxcbiAgICAgICAgICAgICAgICB0ZXh0U3R5bGUgPSBUZXh0U3R5bGUoXG4gICAgICAgICAgICAgICAgICAgIHRoZW1lVGV4dFN0eWxlPy5mYW1pbHk/Lm5hbWUgPzogREVGQVVMVF9TVFlMRS5mYW1pbHkubmFtZSxcbiAgICAgICAgICAgICAgICAgICAgdGhlbWVUZXh0U3R5bGU/LmZhY2UgPzogREVGQVVMVF9TVFlMRS5mYWNlLFxuICAgICAgICAgICAgICAgICAgICBzcGVjLnRleHRTaXplID86IHRoZW1lVGV4dFN0eWxlPy5zaXplID86IERFRkFVTFRfU1RZTEUuc2l6ZSxcbiAgICAgICAgICAgICAgICAgICAgdGhlbWVUZXh0U3R5bGU/LmNvbG9yID86IERFRkFVTFRfU1RZTEUuY29sb3JcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICApXG4gICAgICAgIH1cbiAgICB9XG59IiwiLypcbiAqIENvcHlyaWdodCAoYykgMjAyMi4gSmV0QnJhaW5zIHMuci5vLlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgdGhlIE1JVCBsaWNlbnNlIHRoYXQgY2FuIGJlIGZvdW5kIGluIHRoZSBMSUN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b25zPyA9IG51bGxcblxuICAgIGZ1biBjcmVhdGVDb2xvckJhcigpOiBMZWdlbmRCb3hJbmZvIHtcbiAgICAgICAgdmFyIHNjYWxlID0gc2NhbGVcbiAgICAgICAgaWYgKCFzY2FsZS5oYXNCcmVha3MoKSkge1xuICAgICAgICAgICAgc2NhbGUgPSBTY2FsZUJyZWFrc1V0aWwud2l0aEJyZWFrcyhzY2FsZSwgdHJhbnNmb3JtZWREb21haW4sIDUpXG4gICAgICAgIH1cblxuICAgICAgICB2YWwgc2NhbGVCcmVha3MgPSBzY2FsZS5nZXRTY2FsZUJyZWFrcygpXG4gICAgICAgIGlmIChzY2FsZUJyZWFrcy5pc0VtcHR5KSB7XG4gICAgICAgICAgICByZXR1cm4gTGVnZW5kQm94SW5mby5FTVBUWVxuICAgICAgICB9XG5cbiAgICAgICAgdmFsIHNwZWMgPSBjcmVhdGVDb2xvckJhclNwZWMoXG4gICAgICAgICAgICBsZWdlbmRUaXRsZSxcbiAgICAgICAgICAgIHRyYW5zZm9ybWVkRG9tYWluLFxuICAgICAgICAgICAgc2NhbGVCcmVha3MsXG4gICAgICAgICAgICBzY2FsZU1hcHBlcixcbiAgICAgICAgICAgIHRoZW1lLFxuICAgICAgICAgICAgY29sb3JCYXJPcHRpb25zXG4gICAgICAgIClcblxuICAgICAgICByZXR1cm4gb2JqZWN0IDogTGVnZW5kQm94SW5mbyhzcGVjLnNpemUpIHtcbiAgICAgICAgICAgIG92ZXJyaWRlIGZ1biBjcmVhdGVMZWdlbmRCb3goKTogTGVnZW5kQm94IHtcbiAgICAgICAgICAgICAgICB2YWwgYyA9IENvbG9yQmFyQ29tcG9uZW50KHNwZWMpXG4gICAgICAgICAgICAgICAgYy5kZWJ1ZyA9IERFQlVHX0RSQVdJTkdcbiAgICAgICAgICAgICAgICByZXR1cm4gY1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgaW50ZXJuYWwgZnVuIHNldE9wdGlvbnMob3B0aW9uczogQ29sb3JCYXJPcHRpb25zPykge1xuICAgICAgICBjb2xvckJhck9wdGlvbnMgPSBvcHRpb25zXG4gICAgfVxuXG4gICAgY29tcGFuaW9uIG9iamVjdCB7XG4gICAgICAgIHByaXZhdGUgY29uc3QgdmFsIERFQlVHX0RSQVdJTkcgPSBqZXRicmFpbnMuZGF0YWxvcmUucGxvdC5GZWF0dXJlU3dpdGNoLkxFR0VORF9ERUJVR19EUkFXSU5HXG5cbiAgICAgICAgZnVuIGNyZWF0ZUNvbG9yQmFyU3BlYyhcbiAgICAgICAgICAgIHRpdGxlOiBTdHJpbmcsXG4gICAgICAgICAgICB0cmFuc2Zvcm1lZERvbWFpbjogRG91YmxlU3BhbixcbiAgICAgICAgICAgIGJyZWFrczogU2NhbGVCcmVha3MsXG4gICAgICAgICAgICBzY2FsZU1hcHBlcjogU2NhbGVNYXBwZXI8Q29sb3I+LFxuICAgICAgICAgICAgdGhlbWU6IExlZ2VuZFRoZW1lLFxuICAgICAgICAgICAgb3B0aW9uczogQ29sb3JCYXJPcHRpb25zPyA9IG51bGxcbiAgICAgICAgKTogQ29sb3JCYXJDb21wb25lbnRTcGVjIHtcblxuICAgICAgICAgICAgdmFsIGxlZ2VuZERpcmVjdGlvbiA9IExlZ2VuZEFzc2VtYmxlclV0aWwubGVnZW5kRGlyZWN0aW9uKHRoZW1lKVxuICAgICAgICAgICAgdmFsIGhvcml6b250YWw6IEJvb2xlYW4gPSBsZWdlbmREaXJlY3Rpb24gPT0gTGVnZW5kRGlyZWN0aW9uLkhPUklaT05UQUxcblxuICAgICAgICAgICAgdmFsIHdpZHRoID0gb3B0aW9ucz8ud2lkdGhcbiAgICAgICAgICAgIHZhbCBoZWlnaHQgPSBvcHRpb25zPy5oZWlnaHRcbiAgICAgICAgICAgIHZhciBiYXJTaXplID0gQ29sb3JCYXJDb21wb25lbnRTcGVjLmJhckFic29sdXRlU2l6ZShob3Jpem9udGFsLCB0aGVtZSlcbiAgICAgICAgICAgIGlmICh3aWR0aCAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgYmFyU2l6ZSA9IERvdWJsZVZlY3Rvcih3aWR0aCwgYmFyU2l6ZS55KVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGhlaWdodCAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgYmFyU2l6ZSA9IERvdWJsZVZlY3RvcihiYXJTaXplLngsIGhlaWdodClcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFsIHJldmVyc2UgPSAhaG9yaXpvbnRhbFxuXG4gICAgICAgICAgICB2YWwgbGF5b3V0ID0gd2hlbiB7XG4gICAgICAgICAgICAgICAgaG9yaXpvbnRhbCAtPiBDb2xvckJhckNvbXBvbmVudExheW91dC5ob3Jpem9udGFsKHRpdGxlLCB0cmFuc2Zvcm1lZERvbWFpbiwgYnJlYWtzLCBiYXJTaXplLCByZXZlcnNlLCB0aGVtZSlcbiAgICAgICAgICAgICAgICBlbHNlIC0+IENvbG9yQmFyQ29tcG9uZW50TGF5b3V0LnZlcnRpY2FsKHRpdGxlLCB0cmFuc2Zvcm1lZERvbWFpbiwgYnJlYWtzLCBiYXJTaXplLCByZXZlcnNlLCB0aGVtZSlcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIENvbG9yQmFyQ29tcG9uZW50U3BlYyhcbiAgICAgICAgICAgICAgICB0aXRsZSxcbiAgICAgICAgICAgICAgICB0cmFuc2Zvcm1lZERvbWFpbixcbiAgICAgICAgICAgICAgICBicmVha3MsXG4gICAgICAgICAgICAgICAgc2NhbGVNYXBwZXIsXG4gICAgICAgICAgICAgICAgYmluQ291bnQgPSBvcHRpb25zPy5iaW5Db3VudCA/OiBERUZfTlVNX0JJTixcbiAgICAgICAgICAgICAgICB0aGVtZSxcbiAgICAgICAgICAgICAgICBsYXlvdXQsXG4gICAgICAgICAgICAgICAgcmV2ZXJzZVxuICAgICAgICAgICAgKVxuICAgICAgICB9XG4gICAgfVxufVxuIiwiLyp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G5cbiAgICAgICAgICAgIHJldHVybiByZXNvbHV0aW9uXG4gICAgICAgIH1cblxuICAgICAgICBvdmVycmlkZSBmdW4gaXNNYXBwZWRBZXMoYWVzOiBBZXM8Kj4pOiBCb29sZWFuIHtcbiAgICAgICAgICAgIHJldHVybiBhZXN0aGV0aWNNYXBwZXJzPy5jb250YWluc0tleShhZXMpID86IGZhbHNlXG4gICAgICAgIH1cblxuICAgICAgICBvdmVycmlkZSBmdW4gZXN0aW1hdGVUZXh0U2l6ZShcbiAgICAgICAgICAgIHRleHQ6IFN0cmluZyxcbiAgICAgICAgICAgIGZhbWlseTogU3RyaW5nLFxuICAgICAgICAgICAgc2l6ZTogRG91YmxlLFxuICAgICAgICAgICAgaXNCb2xkOiBCb29sZWFuLFxuICAgICAgICAgICAgaXNJdGFsaWM6IEJvb2xlYW5cbiAgICAgICAgKTogRG91YmxlVmVjdG9yIHtcbiAgICAgICAgICAgIHZhbCByZWdpc3RyeSA9IGZvbnRGYW1pbHlSZWdpc3RyeVxuICAgICAgICAgICAgY2hlY2socmVnaXN0cnkgIT0gbnVsbCkgeyBcIkZvbnQtZmFtaWx5IHJlZ2lzdHJ5IGlzIG5vdCBzcGVjaWZpZWQuXCIgfVxuICAgICAgICAgICAgQFN1cHByZXNzKFwiTkFNRV9TSEFET1dJTkdcIilcbiAgICAgICAgICAgIHZhbCBmYW1pbHkgPSByZWdpc3RyeS5nZXQoZmFtaWx5KVxuICAgICAgICAgICAgcmV0dXJuIFBsb3RMYWJlbFNwZWMoXG4gICAgICAgICAgICAgICAgRm9udChcbiAgICAgICAgICAgICAgICAgICAgZmFtaWx5ID0gZmFtaWx5LFxuICAgICAgICAgICAgICAgICAgICBzaXplID0gc2l6ZS50b0ludCgpLFxuICAgICAgICAgICAgICAgICAgICBpc0JvbGQgPSBpc0JvbGQsXG4gICAgICAgICAgICAgICAgICAgIGlzSXRhbGljID0gaXNJdGFsaWNcbiAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgKS5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GEsIGdyb3VwaW5nVmFyaWFibGVzLCBteUdyb3VwaW5nVmFyTmFtZSwgaGFuZGxlc0dyb3VwcygpKVxuICAgICAgICByZXR1cm4gTXlHZW9tTGF5ZXIoXG4gICAgICAgICAgICBkYXRhLFxuICAgICAgICAgICAgZ2VvbVByb3ZpZGVyLFxuICAgICAgICAgICAgcG9zUHJvdmlkZXIsXG4gICAgICAgICAgICBnZW9tUHJvdmlkZXIucmVuZGVycygpLFxuICAgICAgICAgICAgZ3JvdXBpbmdDb250ZXh0Lmdyb3VwTWFwcGVyLFxuLy8gICAgICAgICAgICByZXBsYWNlbWVudEJpbmRpbmdzLnZhbHVlcyxcbiAgICAgICAgICAgIHJlcGxhY2VtZW50QmluZGluZ3MsXG4gICAgICAgICAgICBteUNvbnN0YW50QnlBZXMsXG4gICAgICAgICAgICBzY2FsZU1hcCxcbiAgICAgICAgICAgIHNjYWxlTWFwcHBlcnNOUCxcbiAgICAgICAgICAgIG15TG9jYXRvckxvb2t1cFNwZWMsXG4vLyAgICAgICAgICAgIG15Q29udGV4dHVhbE1hcHBpbmdQcm92aWRlci5jcmVhdGVDb250ZXh0dWFsTWFwcGluZyhkYXRhQWNjZXNzLCBkYXRhKSxcbiAgICAgICAgICAgIG15Q29udGV4dHVhbE1hcHBpbmdQcm92aWRlcixcbiAgICAgICAgICAgIG15SXNMZWdlbmREaXNhYmxlZCxcbiAgICAgICAgICAgIGlzWU9yaWVudGF0aW9uID0gaXNZT3JpZW50YXRpb24sXG4gICAgICAgICAgICBpc01hcmdpbmFsID0gaXNNYXJnaW5hbCxcbiAgICAgICAgICAgIG1hcmdpbmFsU2lkZSA9IG1hcmdpbmFsU2lkZSxcbiAgICAgICAgICAgIG1hcmdpbmFsU2l6ZSA9IG1hcmdpbmFsU2l6ZSxcbiAgICAgICAgICAgIGZvbnRGYW1pbHlSZWdpc3RyeSA9IGZvbnRGYW1pbHlSZWdpc3RyeSxcbiAgICAgICAgICAgIGFubm90YXRpb25zUHJvdmlk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MaXZlTWFwOiBCb29sZWFuXG4gICAgICAgICAgICBnZXQoKSA9IGdlb20gaXMgTGl2ZU1hcEdlb21cblxuICAgICAgICBpbml0IHtcbiAgICAgICAgICAgIG15UmVuZGVyZWRBZXMgPSBBcnJheUxpc3QocmVuZGVyZWRBZXMpXG5cbiAgICAgICAgICAgIC8vIGNvbnN0YW50IHZhbHVlIGJ5IGFlcyAoZGVmYXVsdCArIHNwZWNpZmllZClcbiAgICAgICAgICAgIG15Q29uc3RhbnRCeUFlcyA9IFR5cGVkS2V5SGFzaE1hcCgpXG4gICAgICAgICAgICBmb3IgKGtleSBpbiBjb25zdGFudEJ5QWVzLmtleXM8QW55PigpKSB7XG4gICAgICAgICAgICAgICAgbXlDb25zdGFudEJ5QWVzLnB1dChrZXksIGNvbnN0YW50QnlBZXNba2V5XSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIG92ZXJyaWRlIGZ1biByZW5kZXJlZEFlcygpOiBMaXN0PEFlczwqPj4ge1xuICAgICAgICAgICAgcmV0dXJuIG15UmVuZGVyZWRBZXNcbiAgICAgICAgfVxuXG4gICAgICAgIG92ZXJyaWRlIGZ1biBoYXNCaW5kaW5nKGFlczogQWVzPCo+KTogQm9vbGVhbiB7XG4gICAgICAgICAgICByZXR1cm4gdmFyQmluZGluZ3MuY29udGFpbnNLZXkoYWVzKVxuICAgICAgICB9XG5cbiAgICAgICAgb3ZlcnJpZGUgZnVuIDxUPiBnZXRCaW5kaW5nKGFlczogQWVzPFQ+KTogVmFyQmluZGluZyB7XG4gICAgICAgICAgICByZXR1cm4gdmFyQmluZGluZ3NbYWVzXSEhXG4gICAgICAgIH1cblxuICAgICAgICBvdmVycmlkZSBmdW4gaGFzQ29uc3RhbnQoYWVzOiBBZXM8Kj4pOiBCb29sZWFuIHtcbiAgICAgICAgICAgIHJldHVybiBteUNvbnN0YW50QnlBZXMuY29udGFpbnNLZXkoYWVzKVxuICAgICAgICB9XG5cbiAgICAgICAgb3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MoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBidWlsZGVyLm15QmluZGluZ3MsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnVpbGRlci5teVBhdGhJZFZhck5hbWVcbiAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbCBncm91cGluZ0N0eCA9IEdyb3VwaW5nQ29udGV4dChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmFuc2Zvcm1lZERhdGEsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZ3JvdXBpbmdWYXJpYWJsZXMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnVpbGRlci5teUdyb3VwaW5nVmFyTmFtZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHBlY3RNdWx0aXBsZSA9IHRydWUgIC8vID9cbiAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbCBzdGF0SW5wdXQgPSBTdGF0SW5wdXQoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNmb3JtZWREYXRhLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ1aWxkZXIubXlCaW5kaW5ncyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmFuc2Zvcm1CeUFlcyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0Q3R4LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZsaXBYWSA9IGZhbHNlXG4gICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICB2YWwgZGF0YUFuZEdyb3VwaW5nQ29udGV4dCA9IERhdGFQcm9jZXNzaW5nLmJ1aWxkU3RhdERhdGEoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdElucHV0LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ1aWxkZXIuc3RhdCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBncm91cGluZ0N0eCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmYWNldFZhcmlhYmxlcyA9IGVtcHR5TGlzdCgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhcnNXaXRob3V0QmluZGluZyA9IGVtcHR5TGlzdCgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9yZGVyT3B0aW9ucyA9IGVtcHR5TGlzdCgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFnZ3JlZ2F0ZU9wZXJhdGlvbiA9IG51bGwsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgOjpwcmludGxuXG4gICAgICAgICAgICAgICAgICAgICAgICApXG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFBbmRHcm91cGluZ0NvbnRleHQuZGF0YVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gYnVpbGRlclxuICAgICAgICB9XG4gICAgfVxufVxuIiwiLypcbiAqIENvcHlyaWdodCAoYykgMjAxOS4gSmV0QnJhaW5zIHMuci5vLlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgdGhlIE1JVCBsaWNlbnNlIHRoYXQgY2FuIGJlIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUuXG4gKi9cblxucGFja2FnZSBqZXRicmFpbnMuZGF0YWxvcmUucGxvdC5idWlsZGVyLmFzc2VtYmxlXG5cbmltcG9ydCBrb3RsaW4ubmF0aXZlLmNvbmN1cnJlbnQuVGhyZWFkTG9jYWxcblxuYWJzdHJhY3QgY2xhc3MgR3VpZGVPcHRpb25zIHtcblxuICAgIHZhciBpc1JldmVyc2U6IEJvb2xlYW4gPSBmYWxzZVxuXG4gICAgLy8gSW4gS290bGluIE5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WRkTGF5ZXIoXG4gICAgICAgIGtleUZhY3Rvcnk6IExlZ2VuZEtleUVsZW1lbnRGYWN0b3J5LFxuICAgICAgICBhZXNMaXN0OiBMaXN0PEFlczwqPj4sXG4gICAgICAgIGNvbnN0YW50QnlBZXM6IE1hcDxBZXM8Kj4sIEFueT4sXG4gICAgICAgIGFlc3RoZXRpY3NEZWZhdWx0czogQWVzdGhldGljc0RlZmF1bHRzLFxuLy8gICAgICAgIHNjYWxlQnlBZXM6IFR5cGVkU2NhbGVNYXAsXG4vLyAgICAgICAgdHJhbnNmb3JtZWREb21haW5CeUFlczogTWFwPEFlczwqPiwgRG91YmxlU3Bhbj5cbiAgICAgICAgY3R4OiBQbG90Q29udGV4dCxcbiAgICApIHtcblxuICAgICAgICBsZWdlbmRMYXllcnMuYWRkKFxuICAgICAgICAgICAgTGVnZW5kTGF5ZXIoXG4gICAgICAgICAgICAgICAga2V5RmFjdG9yeSxcbiAgICAgICAgICAgICAgICBhZXNMaXN0LFxuICAgICAgICAgICAgICAgIGNvbnN0YW50QnlBZXMsXG4gICAgICAgICAgICAgICAgYWVzdGhldGljc0RlZmF1bHRzLFxuLy8gICAgICAgICAgICAgICAgc2NhbGVCeUFlcyxcbiAgICAgICAgICAgICAgICBzY2FsZU1hcHBlcnMsXG4vLyAgICAgICAgICAgICAgICB0cmFuc2Zvcm1lZERvbWFpbkJ5QWVzXG4gICAgICAgICAgICAgICAgY3R4XG4gICAgICAgICAgICApXG4gICAgICAgIClcbiAgICB9XG5cbiAgICBmdW4gY3JlYXRlTGVnZW5kKCk6IExlZ2VuZEJveEluZm8ge1xuICAgICAgICB2YWwgbGVnZW5kQnJlYWtzQnlMYWJlbCA9IExpbmtlZEhhc2hNYXA8U3RyaW5nLCBMZWdlbmRCcmVhaz4oKVxuICAgICAgICBmb3IgKGxlZ2VuZExheWVyIGluIGxlZ2VuZExheWVycykge1xuICAgICAgICAgICAgdmFsIGtleUVsZW1lbnRGYWN0b3J5ID0gbGVnZW5kT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uYWVzTGlzdFxuICAgICAgICAgICAgZm9yIChhZXMgaW4gYWVzTGlzdCkge1xuICAgICAgICAgICAgICAgIGlmIChndWlkZU9wdGlvbnNNYXBbYWVzXSBpcyBMZWdlbmRPcHRpb25zKSB7XG4gICAgICAgICAgICAgICAgICAgIGxlZ2VuZE9wdGlvbnNMaXN0LmFkZChndWlkZU9wdGlvbnNNYXBbYWVzXSBhcyBMZWdlbmRPcHRpb25zKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHZhbCBzcGVjID1cbiAgICAgICAgICAgIGNyZWF0ZUxlZ2VuZFNwZWMoXG4gICAgICAgICAgICAgICAgbGVnZW5kVGl0bGUsIGxlZ2VuZEJyZWFrcywgdGhlbWUsXG4gICAgICAgICAgICAgICAgTGVnZW5kT3B0aW9ucy5jb21iaW5lKFxuICAgICAgICAgICAgICAgICAgICBsZWdlbmRPcHRpb25zTGlzdFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgIClcblxuICAgICAgICByZXR1cm4gb2JqZWN0IDogTGVnZW5kQm94SW5mbyhzcGVjLnNpemUpIHtcbiAgICAgICAgICAgIG92ZXJyaWRlIGZ1biBjcmVhdGVMZWdlbmRCb3goKTogTGVnZW5kQm94IHtcbiAgICAgICAgICAgICAgICB2YWwgYyA9IExlZ2VuZENvbXBvbmVudChzcGVjKVxuICAgICAgICAgICAgICAgIGMuZGVidWcgPSBERUJVR19EUkFXSU5HXG4gICAgICAgICAgICAgICAgcmV0dXJuIGNcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuXG4gICAgcHJpdmF0ZSBjbGFzcyBMZWdlbmRMYXllcihcbiAgICAgICAgaW50ZXJuYWwgdmFsIGtleUVsZW1lbnRGYWN0b3J5OiBMZWdlbmRLZXlFbGVtZW50RmFjdG9yeSxcbiAgICAgICAgaW50ZXJuYWwgdmFsIGFlc0xpc3Q6IExpc3Q8QWVzPCo+P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HtcbiAgICAgICAgcHJpdmF0ZSBjb25zdCB2YWwgREVCVUdfRFJBV0lORyA9IGpldGJyYWlucy5kYXRhbG9yZS5wbG90LkZlYXR1cmVTd2l0Y2guTEVHRU5EX0RFQlVHX0RSQVdJTkdcblxuICAgICAgICBmdW4gY3JlYXRlTGVnZW5kU3BlYyhcbiAgICAgICAgICAgIHRpdGxlOiBTdHJpbmcsXG4gICAgICAgICAgICBicmVha3M6IExpc3Q8TGVnZW5kQnJlYWs+LFxuICAgICAgICAgICAgdGhlbWU6IExlZ2VuZFRoZW1lLFxuICAgICAgICAgICAgb3B0aW9uczogTGVnZW5kT3B0aW9ucyA9IExlZ2VuZE9wdGlvbnMoKVxuICAgICAgICApOiBMZWdlbmRDb21wb25lbnRTcGVjIHtcblxuICAgICAgICAgICAgdmFsIGxlZ2VuZERpcmVjdGlvbiA9IExlZ2VuZEFzc2VtYmxlclV0aWwubGVnZW5kRGlyZWN0aW9uKHRoZW1lKVxuXG4gICAgICAgICAgICAvLyBrZXkgc2l6ZVxuICAgICAgICAgICAgZnVuIHByZXR0eSh2OiBEb3VibGVWZWN0b3IpOiBEb3VibGVWZWN0b3Ige1xuICAgICAgICAgICAgICAgIHZhbCBtYXJnaW4gPSAxLjBcbiAgICAgICAgICAgICAgICByZXR1cm4gRG91YmxlVmVjdG9yKFxuICAgICAgICAgICAgICAgICAgICBmbG9vcih2LnggLyAyKSAqIDIgKyAxLjAgKyBtYXJnaW4sXG4gICAgICAgICAgICAgICAgICAgIGZsb29yKHYueSAvIDIpICogMiArIDEuMCArIG1hcmdpblxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFsIHRoZW1lS2V5U2l6ZSA9IERvdWJsZVZlY3Rvcih0aGVtZS5rZXlTaXplKCksIHRoZW1lLmtleVNpemUoKSlcbiAgICAgICAgICAgIHZhbCBrZXlTaXplcyA9IGJyZWFrc1xuICAgICAgICAgICAgICAgIC5tYXAgeyBiciAtPiB0aGVtZUtleVNpemUubWF4KHByZXR0eShici5taW5pbXVtS2V5U2l6ZSkpIH1cbiAgICAgICAgICAgICAgICAubGV0IHsgc2l6ZXMgLT5cbiAgICAgICAgICAgICAgICAgICAgLy8gVXNlIG1heCBoZWlnaHQgZm9yIGhvcml6b250YWwgYW5kIG1heCB3aWR0aCBmb3IgdmVydGljYWwgbGVnZW5kIGZvciBiZXR0ZXIgKGNlbnRyYWwpIGFsaWdubWVudFxuICAgICAgICAgICAgICAgICAgICBpZiAobGVnZW5kRGlyZWN0aW9uID09IExlZ2VuZERpcmVjdGlvbi5IT1JJWk9OVEFMKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YWwgbWF4S2V5SGVpZ2h0ID0gc2l6ZXMubWF4T2YoRG91YmxlVmVjdG9yOjp5KVxuICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZXMubWFwIHsgRG91YmxlVmVjdG9yKGl0LngsIG1heEtleUhlaWdodCkgfVxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFsIG1heEtleVdpZHRoID0gc2l6ZXMubWF4T2YoRG91YmxlVmVjdG9yOjp4KVxuICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZXMubWFwIHsgRG91YmxlVmVjdG9yKG1heEtleVdpZHRoLCBpdC55KSB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIHJvdywgY29sIGNvdW50XG4gICAgICAgICAgICB2YWwgYnJlYWtDb3VudCA9IGJyZWFrcy5zaXplXG4gICAgICAgICAgICB2YWwgY29sQ291bnQ6IEludFxuICAgICAgICAgICAgdmFsIHJvd0NvdW50OiBJbnRcbiAgICAgICAgICAgIGlmIChvcHRpb25zLmlzQnlSb3cpIHtcbiAgICAgICAgICAgICAgICBjb2xDb3VudCA9IHdoZW4ge1xuICAgICAgICAgICAgICAgICAgICBvcHRpb25zLmhhc0NvbENvdW50KCkgLT4gbWluKG9wdGlvbnMuY29sQ291bnQsIGJyZWFrQ291bnQpXG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnMuaGFzUm93Q291bnQoKSAtPiBjZWlsKGJyZWFrQ291bnQgLyBvcHRpb25zLnJvd0NvdW50LnRvRG91YmxlKCkpLnRvSW50KClcbiAgICAgICAgICAgICAgICAgICAgbGVnZW5kRGlyZWN0aW9uID09PSBMZWdlbmREaXJlY3Rpb24uSE9SSVpPTlRBTCAtPiBicmVha0NvdW50XG4gICAgICAgICAgICAgICAgICAgIGVsc2UgLT4gMVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByb3dDb3VudCA9IGNlaWwoYnJlYWtDb3VudCAvIGNvbENvdW50LnRvRG91YmxlKCkpLnRvSW50KClcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgLy8gYnkgY29sdW1uXG4gICAgICAgICAgICAgICAgcm93Q291bnQgPSB3aGVuIHtcbiAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5oYXNSb3dDb3VudCgpIC0+IG1pbihvcHRpb25zLnJvd0NvdW50LCBicmVha0NvdW50KVxuICAgICAgICAgICAgICAgICAgICBvcHRpb25zLmhhc0NvbENvdW50KCkgLT4gY2VpbChicmVha0NvdW50IC8gb3B0aW9ucy5jb2xDb3VudC50b0RvdWJsZSgpKS50b0ludCgpXG4gICAgICAgICAgICAgICAgICAgIGxlZ2VuZERpcmVjdGlvbiAhPT0gTGVnZW5kRGlyZWN0aW9uLkhPUklaT05UQUwgLT4gYnJlYWtDb3VudFxuICAgICAgICAgICAgICAgICAgICBlbHNlIC0+IDFcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY29sQ291bnQgPSBjZWlsKGJyZWFrQ291bnQgLyByb3dDb3VudC50b0RvdWJsZSgpKS50b0ludCgpXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhbCBsYXlvdXQ6IExlZ2VuZENvbXBvbmVudExheW91dFxuICAgICAgICAgICAgQFN1cHByZXNzKFwiTGlmdFJldHVybk9yQXNzaWdubWVudFwiKVxuICAgICAgICAgICAgaWYgKGxlZ2VuZERpcmVjdGlvbiA9PT0gTGVnZW5kRGlyZWN0aW9uLkhPUklaT05UQUwpIHtcbiAgICAgICAgICAgICAgICBpZiAob3B0aW9ucy5oYXNSb3dDb3VudCgpIHx8IG9wdGlvbnMuaGFzQ29sQ291bnQoKSAmJiBvcHRpb25zLmNvbENvdW50IDwgYnJlYWtDb3VudCkge1xuICAgICAgICAgICAgICAgICAgICBsYXlvdXQgPSBMZWdlbmRDb21wb25lbnRMYXlvdXQuaG9yaXpvbnRhbE11bHRpUm93KFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGUsXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVha3MsXG4gICAgICAgICAgICAgICAgICAgICAgICBrZXlTaXplcyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoZW1lXG4gICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBsYXlvdXQgPSBMZWdlbmRDb21wb25lbnRMYXlvdXQuaG9yaXpvbnRhbCh0aXRsZSwgYnJlYWtzLCBrZXlTaXplcywgdGhlbWUpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBsYXlvdXQgPSBMZWdlbmRDb21wb25lbnRMYXlvdXQudmVydGljYWwodGl0bGUsIGJyZWFrcywga2V5U2l6ZXMsIHRoZW1lKVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBsYXlvdXQuY29sQ291bnQgPSBjb2xDb3VudFxuICAgICAgICAgICAgbGF5b3V0LnJvd0NvdW50ID0gcm93Q291bnRcbiAgICAgICAgICAgIGxheW91dC5pc0ZpbGxCeVJvdyA9IG9wdGlvbnMuaXNCeVJvd1xuXG4gICAgICAgICAgICByZXR1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vaW50ID0gSGFzaE1hcDxBZXM8Kj4sIEFueT4oKVxuICAgICAgICAgICAgZm9yIChhZXMgaW4gQWVzLnZhbHVlcygpKSB7XG4gICAgICAgICAgICAgICAgZGF0YVBvaW50W2Flc10gPSBhZXN0aGV0aWNzRGVmYXVsdHMuZGVmYXVsdFZhbHVlSW5MZWdlbmQoYWVzKSEhXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIERlcml2ZSBzb21lIGFlc3RoZXRpY3MgZnJvbSBjb25zdGFudHNcbiAgICAgICAgICAgIGZvciAoY29uc3RhbnRBZXMgaW4gY29uc3RhbnRCeUFlcy5rZXlzKSB7XG4gICAgICAgICAgICAgICAgd2hlbiAoY29uc3RhbnRBZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgQWVzLlNIQVBFLFxuICAgICAgICAgICAgICAgICAgICBBZXMuQ09MT1IsXG4gICAgICAgICAgICAgICAgICAgIEFlcy5GSUxMIC0+IGRhdGFQb2ludFtjb25zdGFudEFlc10gPSBjb25zdGFudEJ5QWVzW2NvbnN0YW50QWVzXSEhXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBmb3IgKGFlcyBpbiB2YWx1ZUJ5QWVzLmtleXMpIHtcbiAgICAgICAgICAgICAgICBkYXRhUG9pbnRbYWVzXSA9IHZhbHVlQnlBZXNbYWVzXSEhXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGRhdGFQb2ludHMuYWRkKGRhdGFQb2ludClcbiAgICAgICAgfVxuXG4gICAgICAgIHZhbCBidWlsZGVyID0gQWVzdGhldGljc0J1aWxkZXIoZGF0YVBvaW50cy5zaXplKVxuICAgICAgICBmb3IgKGFlcyBpbiBBZXMudmFsdWVzKCkpIHtcbiAgICAgICAgICAgIEBTdXBwcmVzcyhcIlVOQ0hFQ0tFRF9DQVNUXCIpXG4gICAgICAgICAgICBidWlsZGVyLmFlcyhhZXMgYXMgQWVzPEFueT4pIHsga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0IGtvdGxpbi5tYXRoLm1heFxuXG5jbGFzcyBMZWdlbmRPcHRpb25zIDogR3VpZGVPcHRpb25zKCkge1xuXG4gICAgcHJpdmF0ZSB2YXIgbXlDb2xDb3VudDogSW50PyA9IG51bGxcbiAgICBwcml2YXRlIHZhciBteVJvd0NvdW50OiBJbnQ/ID0gbnVsbFxuICAgIHZhciBpc0J5Um93OiBCb29sZWFuID0gZmFsc2VcblxuICAgIHZhciBjb2xDb3VudDogSW50XG4gICAgICAgIGdldCgpID0gbXlDb2xDb3VudCEhXG4gICAgICAgIHNldChjb2xDb3VudCkge1xuICAgICAgICAgICAgbXlDb2xDb3VudCA9IG1heCgxLCBjb2xDb3VudClcbiAgICAgICAgfVxuXG4gICAgdmFyIHJvd0NvdW50OiBJbnRcbiAgICAgICAgZ2V0KCkgPSBteVJvd0NvdW50ISFcbiAgICAgICAgc2V0KHJvd0NvdW50KSB7XG4gICAgICAgICAgICBteVJvd0NvdW50ID0gbWF4KDEsIHJvd0NvdW50KVxuICAgICAgICB9XG5cbiAgICBmdW4gaGFzQ29sQ291bnQoKTogQm9vbGVhbiB7XG4gICAgICAgIHJldHVybiBteUNvbENvdW50ICE9IG51bGxcbiAgICB9XG5cbiAgICBmdW4gaGFzUm93Q291bnQoKTogQm9vbGVhbiB7XG4gICAgICAgIHJldHVybiBteVJvd0NvdW50ICE9IG51bGxcbiAgICB9XG5cbiAgICBjb21wYW5pb24gb2JqZWN0IHtcbiAgICAgICAgZnVuIGNvbWJpbmUob3B0aW9uc0xpc3Q6IExpc3Q8TGVnZW5kT3B0aW9ucz4pOiBMZWdlbmRPcHRpb25zIHtcbiAgICAgICAgICAgIHZhbCByZXN1bHQgPSBMZWdlbmRPcHRpb25zKClcbiAgICAgICAgICAgIGZvciAob3B0aW9ucyBpbiBvcHRpb25zTGlzdCkge1xuICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLmlzQnlSb3cpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0LmlzQn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WxlU2hlZXQ6IFN0eWxlU2hlZXQgPSBTdHlsZS5mcm9tVGhlbWUodGhlbWUsIGNvb3JkUHJvdmlkZXIuZmxpcHBlZClcblxuICAgICAgICAvLyBUb0RvOiB0cmFuc2Zvcm1lZCByYW5nZXMgYnkgYWVzXG4gICAgICAgIHZhbCBwbG90Q29udGV4dDogUGxvdENvbnRleHQgPSBQbG90QXNzZW1ibGVyUGxvdENvbnRleHQobGF5ZXJzQnlUaWxlLCBzY2FsZU1hcClcblxuICAgICAgICB2YWwgbGVnZW5kc0JveEluZm9zID0gd2hlbiB7XG4gICAgICAgICAgICBsZWdlbmRzRW5hYmxlZCAtPiBQbG90QXNzZW1ibGVyVXRpbC5jcmVhdGVMZWdlbmRzKFxuICAgICAgICAgICAgICAgIHBsb3RDb250ZXh0LFxuICAgICAgICAgICAgICAgIHNjYWxlTWFwcGVyc05QLFxuICAgICAgICAgICAgICAgIGd1aWRlT3B0aW9uc01hcCxcbiAgICAgICAgICAgICAgICB0aGVtZS5sZWdlbmQoKVxuICAgICAgICAgICAgKVxuXG4gICAgICAgICAgICBlbHNlIC0+IGVtcHR5TGlzdCgpXG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gaWYgKGNvbnRhaW5zTGl2ZU1hcCkge1xuICAgICAgICAgICAgLy8gYnVpbGQgJ2xpdmUgbWFwJyBwbG90OlxuICAgICAgICAgICAgLy8gIC0gc2tpcCBYL1kgc2NhbGUgdHJhaW5pbmdcbiAgICAgICAgICAgIC8vICAtIGlnbm9yZSBjb29yZCBwcm92aWRlclxuICAgICAgICAgICAgLy8gIC0gcGxvdCBsYXlvdXQgd2l0aG91dCBheGVzXG4gICAgICAgICAgICB2YWwgbGF5b3V0UHJvdmlkZXJCeVRpbGUgPSBjb3JlTGF5ZXJzQnlUaWxlLm1hcCB7XG4gICAgICAgICAgICAgICAgTGl2ZU1hcFRpbGVMYXlvdXRQcm92aWRlcigpXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YWwgcGxvdExheW91dCA9IFBsb3RBc3NlbWJsZXJVdGlsLmNyZWF0ZVBsb3RMYXlvdXQoXG4gICAgICAgICAgICAgICAgbGF5b3V0UHJvdmlkZXJCeVRpbGUsXG4gICAgICAgICAgICAgICAgZmFjZXRzLFxuICAgICAgICAgICAgICAgIHRoZW1lLmZhY2V0cygpLFxuICAgICAgICAgICAgICAgIGhBeGlzVGhlbWUgPSBMaXZlTWFwQXhpc1RoZW1lKCksXG4gICAgICAgICAgICAgICAgdkF4aXNUaGVtZSA9IExpdmVNYXBBeGlzVGhlbWUoKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIHZhbCBmcmFtZVByb3ZpZGVyQnlUaWxlID0gY29yZUxheWVyc0J5VGlsZS5tYXAge1xuICAgICAgICAgICAgICAgIEJvZ3VzRnJhbWVPZlJlZmVyZW5jZVByb3ZpZGVyKClcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNyZWF0ZVBsb3QoZnJhbWVQcm92aWRlckJ5VGlsZSwgcGxvdExheW91dCwgbGVnZW5kc0JveEluZm9zLCBzdHlsZVNoZWV0LCBwbG90Q29udGV4dClcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHZhbCBmbGlwQXhpcyA9IGNvb3JkUHJvdmlkZXIuZmxpcHBlZFxuICAgICAgICAgICAgdmFsIGRvbWFpbnNYWUJ5VGlsZSA9IFBvc2l0aW9uYWxTY2FsZXNVdGlsLmNvbXB1dGVQbG90WFlUcmFuc2Zvcm1lZERvbWFpbnMoXG4gICAgICAgICAgICAgICAgY29yZUxheWVyc0J5VGlsZSxcbiAgICAgICAgICAgICAgICBzY2FsZVhQcm90byxcbiAgICAgICAgICAgICAgICBzY2FsZVlQcm90byxcbiAgICAgICAgICAgICAgICBmYWNldHNcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIHZhbCAoaFNjYWxlUHJvdG8sIHZTY2FsZVByb3RvKSA9IHdoZW4gKGZsaXBBeGlzKSB7XG4gICAgICA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lckJ5VGlsZTogTGlzdDxGcmFtZU9mUmVmZXJlbmNlUHJvdmlkZXI+ID1cbiAgICAgICAgICAgICAgICBkb21haW5zWFlCeVRpbGUubWFwIHsgKHhEb21haW4sIHlEb21haW4pIC0+XG4gICAgICAgICAgICAgICAgICAgIHZhbCBhZGp1c3RlZERvbWFpbiA9IGNvb3JkUHJvdmlkZXIuYWRqdXN0RG9tYWluKERvdWJsZVJlY3RhbmdsZSh4RG9tYWluLCB5RG9tYWluKSlcbiAgICAgICAgICAgICAgICAgICAgU3F1YXJlRnJhbWVPZlJlZmVyZW5jZVByb3ZpZGVyKFxuICAgICAgICAgICAgICAgICAgICAgICAgaFNjYWxlUHJvdG8sIHZTY2FsZVByb3RvLFxuICAgICAgICAgICAgICAgICAgICAgICAgYWRqdXN0ZWREb21haW4sXG4gICAgICAgICAgICAgICAgICAgICAgICBmbGlwQXhpcyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGhBeGlzT3JpZW50YXRpb24sIHZBeGlzT3JpZW50YXRpb24sXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGVtZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIG1hcmdpbnNMYXlvdXQsXG4gICAgICAgICAgICAgICAgICAgICAgICBkb21haW5CeU1hcmdpblxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YWwgbGF5b3V0UHJvdmlkZXJCeVRpbGU6IExpc3Q8VGlsZUxheW91dFByb3ZpZGVyPiA9IGZyYW1lUHJvdmlkZXJCeVRpbGUubWFwIHtcbiAgICAgICAgICAgICAgICBpdC5jcmVhdGVUaWxlTGF5b3V0UHJvdmlkZXIoKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFsIHBsb3RMYXlvdXQgPSBQbG90QXNzZW1ibGVyVXRpbC5jcmVhdGVQbG90TGF5b3V0KFxuICAgICAgICAgICAgICAgIGxheW91dFByb3ZpZGVyQnlUaWxlLFxuICAgICAgIC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yaWVudGF0aW9uID0gT3JpZW50YXRpb24uTEVGVCxcbiAgICAgICAgKTogUGxvdEFzc2VtYmxlciB7XG4gICAgICAgICAgICB2YWwgbGF5ZXJzQnlUaWxlID0gQXJyYXlMaXN0PExpc3Q8R2VvbUxheWVyPj4oKVxuICAgICAgICAgICAgbGF5ZXJzQnlUaWxlLmFkZChwbG90TGF5ZXJzKVxuICAgICAgICAgICAgcmV0dXJuIG11bHRpVGlsZShcbiAgICAgICAgICAgICAgICBsYXllcnNCeVRpbGUsXG4gICAgICAgICAgICAgICAgc2NhbGVNYXAsXG4gICAgICAgICAgICAgICAgc2NhbGVNYXBwZXJzTlAsXG4gICAgICAgICAgICAgICAgY29vcmRQcm92aWRlcixcbiAgICAgICAgICAgICAgICB4QXhpc09yaWVudGF0aW9uLFxuICAgICAgICAgICAgICAgIHlBeGlzT3JpZW50YXRpb24sXG4gICAgICAgICAgICAgICAgdGhlbWVcbiAgICAgICAgICAgIClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBtdWx0aVRpbGUoXG4gICAgICAgICAgICBsYXllcnNCeVRpbGU6IExpc3Q8TGlzdDxHZW9tTGF5ZXI+PixcbiAgICAgICAgICAgIHNjYWxlTWFwOiBUeXBlZFNjYWxlTWFwLFxuICAgICAgICAgICAgc2NhbGVNYXBwZXJzTlA6IE1hcDxBZXM8Kj4sIFNjYWxlTWFwcGVyPCo+PixcbiAgICAgICAgICAgIGNvb3JkUHJvdmlkZXI6IENvb3JkUHJvdmlkZXIsXG4gICAgICAgICAgICB4QXhpc09yaWVudGF0aW9uOiBPcmllbnRhdGlvbixcbiAgICAgICAgICAgIHlBeGlzT3JpZW50YXRpb246IE9yaWVudGF0aW9uLFxuICAgICAgICAgICAgdGhlbWU6IFRoZW1lXG4gICAgICAgICk6IFBsb3RBc3NlbWJsZXIge1xuICAgICAgICAgICAgcmV0dXJuIFBsb3RBc3NlbWJsZXIoXG4gICAgICAgICAgICAgICAgbGF5ZXJzQnlUaWxlLFxu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dDxHZW9tTGF5ZXI+KClcblxuICAgICAgICAgICAgICAgIC8vIENvbGxlY3QgbGF5ZXJbaV0gY2h1bmtzIGZyb20gYWxsIHBhbmVscy5cbiAgICAgICAgICAgICAgICBmb3IgKHBhbmVsTGF5ZXJzIGluIGxheWVyc0J5UGFuZWwpIHtcbiAgICAgICAgICAgICAgICAgICAgbGF5ZXJzT25QbGFuZS5hZGQocGFuZWxMYXllcnNbaV0pXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgc3RpdGNoZWRMYXllcnMuYWRkKFN0aXRjaGVkUGxvdExheWVyKGxheWVyc09uUGxhbmUpKVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gc3RpdGNoZWRMYXllcnNcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBjb21wdXRlT3ZlcmFsbFRyYW5zZm9ybWVkRG9tYWluKFxuICAgICAgICAgICAgYWVzOiBBZXM8Kj4sXG4gICAgICAgICAgICBzdGl0Y2hlZExheWVyczogTGlzdDxTdGl0Y2hlZFBsb3RMYXllcj4sXG4gICAgICAgICAgICBzY2FsZU1hcDogVHlwZWRTY2FsZU1hcFxuICAgICAgICApOiBEb3VibGVTcGFuIHtcbiAgICAgICAgICAgIGNoZWNrUG9zaXRpb25hbEFlcyhhZXMpXG5cbiAgICAgICAgICAgIGZ1biBpc01hdGNoaW5nKHY6IERhdGFGcmFtZS5WYXJpYWJsZSwgYWVzOiBBZXM8Kj4sIGlzWU9yaWVudGF0aW9uOiBCb29sZWFuKTogQm9vbGVhbiB7XG4gICAgICAgICAgICAgICAgdmFsIHZhckFlcyA9IFRyYW5zZm9ybVZhci50b0Flcyh2KVxuICAgICAgICAgICAgICAgIHJldHVybiB3aGVuIHtcbiAgICAgICAgICAgICAgICAgICAgQWVzLmlzUG9zaXRpb25hbFhZKHZhckFlcykgLT4gQWVzLnRvQXhpc0FlcyhcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhckFlcyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlzWU9yaWVudGF0aW9uXG4gICAgICAgICAgICAgICAgICAgICkgPT0gYWVzIC8vIGNvbGxlY3RpbmcgcG9zIHZhcmlhYmxlc1xuICAgICAgICAgICAgICAgICAgICBlbHNlIC0+IHZhckFlcyA9PSBhZXNcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhbCBkb21haW5zUmF3ID0gQXJyYXlMaXN0PERvdWJsZVNwYW4+KClcbiAgICAgICAgICAgIGZvciAobGF5ZXIgaW4gc3RpdGNoZWRMYXllcnMpIHtcbiAgICAgICAgICAgICAgICB2YWwgdmFyaWFibGVzID0gbGF5ZXIuZ2V0VmFyaWFibGVzKClcbiAgICAgICAgICAgICAgICAgICAgLmZpbHRlciB7IGl0LmlzVHJhbnNmb3JtIH1cbiAgICAgICAgICAgICAgICAgICAgLmZpbHRlciB7IGlzTWF0Y2hpbmcoaXQsIGFlcywgbGF5ZXIuaXNZT3JpZW50YXRpb24pIH1cblxuICAgICAgICAgICAgICAgIGZvciAodHJhbnNmb3JtVmFyIGluIHZhcmlhYmxlcykge1xuICAgICAgICAgICAgICAgICAgICB2YWwgZG9tYWluID0gbGF5ZXIuZ2V0RGF0YVJhbmdlKHRyYW5zZm9ybVZhcilcbiAgICAgICAgICAgICAgICAgICAgaWYgKGRvbWFpbiAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkb21haW5zUmF3LmFkZChkb21haW4pXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhbCBvdmVyYWxsVHJhbnNmb3JtZWREb21haW4gPSBkb21haW5zUmF3LnJlZHVjZU9yTnVsbCB7IGFjYywgdiAtPiBhY2MudW5pb24odikgfVxuXG4gICAgICAgICAgICB2YWwgc2NhbGUgPSBzY2FsZU1hcC5nZXQoYWVzKVxuICAgICAgICAgICAg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QoXG4vLyAgICAgICAgICAgICAgICBTdGl0Y2hlZFBsb3RMYXllcnMoXG4vLyAgICAgICAgICAgICAgICAgICAgbGF5ZXJzT25QbGFuZVxuLy8gICAgICAgICAgICAgICAgKVxuLy8gICAgICAgICAgICApXG4vLyAgICAgICAgfVxuLy9cbi8vICAgICAgICB2YWwgdHJhbnNmb3JtZWREb21haW5CeUFlcyA9IEhhc2hNYXA8QWVzPCo+LCBEb3VibGVTcGFuPigpXG4vLyAgICAgICAgZm9yIChzdGl0Y2hlZFBsb3RMYXllcnMgaW4gc3RpdGNoZWRMYXllcnNMaXN0KSB7XG4vLyAgICAgICAgICAgIHZhbCBsYXllclRyYW5zZm9ybWVkRG9tYWluQnlBZXMgPSBndWlkZVRyYW5zZm9ybWVkRG9tYWluQnlBZXMoXG4vLyAgICAgICAgICAgICAgICBzdGl0Y2hlZFBsb3RMYXllcnMsXG4vLyAgICAgICAgICAgICAgICBzY2FsZU1hcCxcbi8vICAgICAgICAgICAgICAgIGd1aWRlT3B0aW9uc01hcFxuLy8gICAgICAgICAgICApXG4vLyAgICAgICAgICAgIGZvciAoKGFlcywgdHJhbnNmb3JtZWREb21haW4pIGluIGxheWVyVHJhbnNmb3JtZWREb21haW5CeUFlcykge1xuLy8gICAgICAgICAgICAgICAgdXBkYXRlQWVzUmFuZ2VNYXAoXG4vLyAgICAgICAgICAgICAgICAgICAgYWVzLFxuLy8gICAgICAgICAgICAgICAgICAgIHRyYW5zZm9ybWVkRG9tYWluLFxuLy8gICAgICAgICAgICAgICAgICAgIHRyYW5zZm9ybWVkRG9tYWluQnlBZXNcbi8vICAgICAgICAgICAgICAgIClcbi8vICAgICAgICAgICAgfVxuLy8gICAgICAgIH1cbi8vXG4vLyAgICAgICAgcmV0dXJuIGNyZWF0ZUxlZ2VuZHMoXG4vLyAgICAgICAgICAgIHN0aXRjaGVkTGF5ZXJzTGlzdCxcbi8vICAgICAgICAgICAgdHJhbnNmb3JtZWREb21haW5CeUFlcyxcbi8vICA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W50QnlBZXMgPSBIYXNoTWFwPEFlczwqPiwgQW55PigpXG4gICAgICAgICAgICBmb3IgKGFlcyBpbiBjb250ZXh0TGF5ZXIucmVuZGVyZWRBZXMoKSkge1xuICAgICAgICAgICAgICAgIGlmIChjb250ZXh0TGF5ZXIuaGFzQ29uc3RhbnQoYWVzKSkge1xuICAgICAgICAgICAgICAgICAgICBsYXllckNvbnN0YW50QnlBZXNbYWVzXSA9IGNvbnRleHRMYXllci5nZXRDb25zdGFudChhZXMpISFcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbi8vICAgICAgICAgICAgdmFsIGxheWVyQmluZGluZ3NCeVNjYWxlTmFtZSA9IExpbmtlZEhhc2hNYXA8U3RyaW5nLCBNdXRhYmxlTGlzdDxWYXJCaW5kaW5nPj4oKVxuICAgICAgICAgICAgdmFsIGFlc0xpc3RCeVNjYWxlTmFtZSA9IExpbmtlZEhhc2hNYXA8U3RyaW5nLCBNdXRhYmxlTGlzdDxBZXM8Kj4+PigpXG4gICAgICAgICAgICB2YWwgYWVzTGlzdCA9IG1hcHBlZFJlbmRlcmVkQWVzVG9DcmVhdGVHdWlkZXMoY29udGV4dExheWVyLCBndWlkZU9wdGlvbnNNYXApXG4gICAgICAgICAgICBmb3IgKGFlcyBpbiBhZXNMaXN0KSB7XG4gICAgICAgICAgICAgICAgdmFyIGNvbG9yQmFyID0gZmFsc2Vcbi8vICAgICAgICAgICAgICAgIHZhbCBiaW5kaW5nID0gY29udGV4dExheWVyLmdldEJpbmRpbmcoYWVzKVxuICAgICAgICAgICAgICAgIHZhbCBzY2FsZSA9IGN0eC5nZXRTY2FsZShhZXMpXG4gICAgICAgICAgICAgICAgdmFsIHNjYWxlTmFtZSA9IHNjYWxlLm5hbWVcbiAgICAgICAgICAgICAgICBpZiAoZ3VpZGVPcHRpb25zTWFwLmNvbnRhaW5zS2V5KGFlcykpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFsIGd1aWRlT3B0aW9ucyA9IGd1aWRlT3B0aW9uc01hcFthZXNdXG4gICAgICAgICAgICAgICAgICAgIGlmIChndWlkZU9wdGlvbnMgaXMgQ29sb3JCYXJPcHRpb25zKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjaGVja0ZpdHNDb2xvckJhcihhZXMsIHNjYWxlKVxuICAgICAgICAgICAgICAgICAgICAgICAgY29sb3JCYXIgPSB0cnVlXG4gICAgICAgICAgICAgICAgICAgICAgICBAU3VwcHJlc3MoXCJVTkNIRUNLRURfQ0FTVFwiKVxuICAgICAgICAgICAgICAgICAgICAgICAgY29sb3JCYXJBc3NlbWJsZXJCeVRpdGxlW3NjYWxlTmFtZV0gPSBjcmVhdGVDb2xvckJhckFzc2VtYmxlcihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY2FsZU5hbWUsXG4vLyAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmFuc2Zvcm1lZERvbWFpbkJ5QWVzLmdldFZhbHVlKGFlcyksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY3R4Lm92ZXJhbGxUcmFuc2Zvcm1lZERvbWFpbihhZXMpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjYWxlIGFzIFNjYWxlPENvbG9yPixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY2FsZU1hcHBlcnNOUC5nZXRWYWx1ZShhZXMpIGFzIFNjYWxlTWFwcGVyPENvbG9yPixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBndWlkZU9wdGlvbnMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhlbWVcbiAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZml0c0NvbG9yQmFyKGFlcywgc2NhbGUpKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbG9yQmFyID0gdHJ1ZVxuICAgICAgICAgICAgICAgICAgICBAU3VwcHJlc3MoXCJVTkNIRUNLRURfQ0FTVFwiKVxuICAgICAgICAgICAgICAgICAgICBjb2xvckJhckFzc2VtYmxlckJ5VGl0bGVbc2NhbGVOYW1lXSA9IGNyZWF0ZUNvbG9yQmFyQXNzZW1ibGVyKFxuICAgICAgICAgICAgICAgICAgICAgICAgc2NhbGVOYW1lLFxuLy8gICAgICAgICAgICAgICAgICAgICAgICB0cmFuc2Zvcm1lZERvbWFpbkJ5QWVzLmdldFZhbHVlKGFlcyksXG4gICAgICAgICAgICAgICAgICAgICAgICBjdHgub3ZlcmFsbFRyYW5zZm9ybWVkRG9tYWluKGFlcyksXG4gICAgICAgICAgICAgICAgICAgICAgICBzY2FsZSBhcyBTY2FsZTxDb2xvcj4sXG4gICAgICAgICAgICAgICAgICAgICAgICBzY2FsZU1hcHBlcnNOUC5nZXRWYWx1ZShhZXMpIGFzIFNjYWxlTWFwcGVyPENvbG9yPixcbiAgICAgICAgICAgICAgICAgICAgICAgIG51bGwsXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGVtZVxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKCFjb2xvckJhcikge1xuLy8gICAgICAgICAgICAgICAgICAgIGxheWVyQmluZGluZ3NCeVNjYWxlTmFtZS5nZXRPclB1dChzY2FsZU5hbWUpIHsgQXJyYXlMaXN0KCkgfS5hZGQoYmluZGluZylcbiAgICAgICAgICAgICAgICAgICAgYWVzTGlzdEJ5U2NhbGVOYW1lLmdldE9yUHV0KHNjYWxlTmFtZSkgeyBBcnJheUxpc3QoKSB9LmFkZChhZXMpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBmb3IgKHNjYWxlTmFtZSBpbiBhZXNMaXN0QnlTY2FsZU5hbWUua2V5cykge1xuICAgICAgICAgICAgICAgIHZhbCBsZWdlbmRBc3NlbWJsZXIgPSBsZWdlbmRBc3NlbWJsZXJCeVRpdGxlLmdldE9yUHV0KHNjYWxlTmFtZSkge1xuICAgICAgICAgICAgICAgICAgICBMZWdlbmRBc3NlbWJsZXIoXG4gICAgICAgICAgICAgICAgICAgICAgICBzY2FsZU5hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICBndWlkZU9wdGlvbnNNYXAsXG4gICAgICAgICAgICAgICAgICAgICAgICBzY2FsZU1hcHBlcnNOUCxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoZW1lXG4gICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICB9XG5cbi8vICAgICAgICAgICAgICAgIHZhbCB2YXJCaW5kaW5ncyA9IGxheWVyQmluZGluZ3NCeVNjYWxlTmFtZVtzY2FsZU5hbWVdISFcbiAgICAgICAgICAgICAgICB2YWwgYWVzTGlzdEZvclNjYWxlTmFtZSA9IGFlc0xpc3RCeVNjYWxlTmFtZS5nZXRWYWx1ZShzY2FsZU5hbWUpXG4gICAgICAgICAgICAgICAgdmFsIGxlZ2VuZEtleUZhY3RvcnkgPSBjb250ZXh0TGF5ZXIubGVnZW5kS2V5RWxlbWVudEZhY3RvcnlcbiAgICAgICAgICAgICAgICB2YWwgYWVzdGhldGljc0RlZmF1bHRzID0gY29udGV4dExheWVyLmFlc3RoZXRpY3NEZWZhdWx0c1xuICAgICAgICAgICAgICAgIGxlZ2VuZEFzc2VtYmxlci5hZGRMYXllcihcbiAgICAgICAgICAgICAgICAgICAgbGVnZW5kS2V5RmFjdG9yeSxcbi8vICAgICAgICAgICAgICAgICAgICB2YXJCaW5kaW5ncy5tYXAgeyBpdC5hZXMgfSxcbiAgICAgICAgICAgICAgICAgICAgYWVzTGlzdEZvclNjYWxlTmFtZSxcbiAgICAgICAgICAgICAgICAgICAgbGF5ZXJDb25zdGFudEJ5QWVzLFxuICAgICAgICAgICAgICAgICAgICBhZXN0aGV0aWNzRGVmYXVsdHMsXG4vLyAgICAgICAgICAgICAgICAgICAgc2NhbGVNYXAsXG4vLyAgICAgICAgICAgICAgICAgICAgdHJhbnNmb3JtZWREb21haW5CeUFlc1xuICAgICAgICAgICAgICAgICAgICBjdHhcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICB2YWwgbGVnZW5kQm94SW5mb3MgPSBBcnJheUxpc3Q8TGVnZW5kQm94SW5mbz4oKVxuICAgICAgICBmb3IgKGxlZ2VuZFRpdGxlIGluIGNvbG9yQmFyQXNzZW1ibGVyQnlUaXRsZS5rZXlzKSB7XG4gICAgICAgICAgICB2YWwgYm94SW5mbyA9IGNvbG9yQmFyQXNzZW1ibGVyQnlUaXRsZVtsZWdlbmRUaXRsZV0hIS5jcmVhdGVDb2xvckJhcigpXG4gICAgICAgICAgICBpZiAoIWJveEluZm8uaXNFbXB0eSkge1xuICAgICAgICAgICAgICAgIGxlZ2VuZEJveEluZm9zLmFkZChib3hJbmZvKVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgZm9yIChsZWdlbmRUaXRsZSBpbiBsZWdlbmRBc3NlbWJsZXJCeVRpdGxlLmtleXMpIHtcbiAgICAgICAgICAgIHZhbCBib3hJbmZvID0gbGVnZW5kQXNzZW1ibGVyQnlUaXRsZVtsZWdlbmRUaXRsZV0hIS5jcmVhdGVMZWdlbmQoKVxuICAgICAgICAgICAgaWYgKCFib3hJbmZvLmlzRW1wdHkpIHtcbiAgICAgICAgICAgICAgICBsZWdlbmRCb3hJbmZvcy5hZGQoYm94SW5mbylcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbGVnZW5kQm94SW5mb3NcbiAgICB9XG5cbiAgICBmdW4gY3JlYXRlUGxvdExheW91dChcbiAgICAgICAgbGF5b3V0UHJvdmlkZXJCeVRpbGU6IExpc3Q8VGlsZUxheW91dFByb3ZpZGVyPixcbiAgICAgICAgZmFjZXRzOiBQbG90RmFjZXRzLFxuICAgICAgICBmYWNldHNUaGVtZTogRmFjZXRzVGhlbWUsXG4gICAgICA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2ZWxJbmRpY2VzID0gaW5kaWNlc0J5VmFyQnlMZXZlbC5nZXRWYWx1ZShuYW1lKS5nZXRWYWx1ZShsZXZlbClcbiAgICAgICAgICAgICAgICAgICAgaW5kaWNlcy5yZXRhaW5BbGwoSGFzaFNldChsZXZlbEluZGljZXMpKVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHZhbCBsZXZlbEtleSA9IG5hbWVMZXZlbFR1cGxlLm1hcCB7IGl0LnNlY29uZCB9XG5cbiAgICAgICAgICAgICAgICAvLyBidWlsZCB0aGUgZGF0YSBzdWJzZXRcbiAgICAgICAgICAgICAgICB2YWwgbGV2ZWxEYXRhID0gZGF0YS5zbGljZShpbmRpY2VzKVxuICAgICAgICAgICAgICAgIGRhdGFCeUxldmVsS2V5LmFkZChsZXZlbEtleSB0byBsZXZlbERhdGEpXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBkYXRhQnlMZXZlbEtleVxuICAgICAgICB9XG5cbiAgICAgICAgcHJpdmF0ZSBmdW4gZGF0YUluZGljZXNCeVZhckJ5TGV2ZWwoXG4gICAgICAgICAgICBkYXRhOiBEYXRhRnJhbWUsXG4gICAgICAgICAgICB2YXJOYW1lczogTGlzdDxTdHJpbmc+LFxuICAgICAgICAgICAgdmFyTGV2ZWxzOiBMaXN0PExpc3Q8QW55Pj5cbiAgICAgICAgKTogTWFwPFN0cmluZywgTWFwPEFueSwgTGlzdDxJbnQ+Pj4ge1xuXG4gICAgICAgICAgICB2YWwgaW5kaWNlc0J5VmFyQnlMZXZlbCA9IEhhc2hNYXA8U3RyaW5nLCBNYXA8QW55LCBMaXN0PEludD4+PigpXG4gICAgICAgICAgICBmb3IgKChpLCB2YXJOYW1lKSBpbiB2YXJOYW1lcy53aXRoSW5kZXgoKSkge1xuICAgICAgICAgICAgICAgIHZhbCBsZXZlbHMgPSB2YXJMZXZlbHNbaV1cblxuICAgICAgICAgICAgICAgIHZhbCBpbmRpY2VzQnlMZXZlbCA9IEhhc2hNYXA8QW55LCBMaXN0PEludD4+KClcbiAgICAgICAgICAgICAgICBmb3IgKGxldmVsIGluIGxldmVscykge1xuICAgICAgICAgICAgICAgICAgICB2YWwgaW5kaWNlcyA9IHdoZW4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gJ2VtcHR5JyBkYXRhIGluIGxheWVycyB3aXRoIG5vIGFlcyBtYXBwaW5nIChvbmx5IGNvbnN0YW50cylcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEuaXNFbXB0eSAtPiBlbXB0eUxpc3QoKVxuICAgICAgICAgICAgICAgICAgICAgICAgRGF0YUZyYW1lVXRpbC5oYXNWYXJpYWJsZShkYXRhLCB2YXJOYW1lKSAtPiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsIHZhcmlhYmxlID0gRGF0YUZyYW1lVXRpbC5maW5kVmFyaWFibGVPckZhaWwoZGF0YSwgdmFyTmFtZSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBTZXJpZXNVdGlsLm1hdGNoaW5nSW5kaWNlcyhkYXRhW3ZhcmlhYmxlXSwgbGV2ZWwpXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIC0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAnZGF0YScgaGFzIG5vIGNvbHVtbiAndmFyTmFtZScgLT4gdGhlIGVudGlyZSBkYXRhIHNob3VsZCBiZSBzaG93biBpbiBlYWNoIGZhY2V0LlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICgwIHVudGlsIGRhdGEucm93Q291bnQoKSkudG9MaXN0KClcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpbmRpY2VzQnlMZXZlbFtsZXZlbF0gPSBpbmRpY2VzXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAga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IHZhbCBsZXZlbHMgPSB2YXJMZXZlbHMuZmlyc3QoKVxuXG4gICAgICAgICAgICB2YWwgbGV2ZWxLZXlzID0gQXJyYXlMaXN0PExpc3Q8UGFpcjxTdHJpbmcsIEFueT4+PigpXG4gICAgICAgICAgICBmb3IgKGxldmVsIGluIGxldmVscykge1xuICAgICAgICAgICAgICAgIGlmICh2YXJOYW1lcy5zaXplID4gMSkge1xuICAgICAgICAgICAgICAgICAgICB2YWwgc3ViS2V5cyA9IGNyZWF0ZU5hbWVMZXZlbFR1cGxlcyhcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhck5hbWVzLnN1Ykxpc3QoMSwgdmFyTmFtZXMuc2l6ZSksXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXJMZXZlbHMuc3ViTGlzdCgxLCB2YXJMZXZlbHMuc2l6ZSlcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICBmb3IgKHN1YktleSBpbiBzdWJLZXlzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXZlbEtleXMuYWRkKGxpc3RPZihuYW1lIHRvIGxldmVsKSArIHN1YktleSlcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIGV4aXRcbiAgICAgICAgICAgICAgICAgICAgbGV2ZWxLZXlzLmFkZChsaXN0T2YobmFtZSB0byBsZXZlbCkpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gbGV2ZWxLZXlzXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gcmVvcmRlckxldmVscyhcbiAgICAgICAgICAgIHZhck5hbWVzOiBMaXN0PFN0cmluZz4sXG4gICAgICAgICAgICB2YXJMZXZlbHM6IExpc3Q8TGlzdDxBbnk+PixcbiAgICAgICAgICAgIG9yZGVyaW5nOiBMaXN0PEludD5cbiAgICAgICAgKTogTGlzdDxMaXN0PEFueT4+IHtcbiAgICAgICAgICAgIHZhbCBvcmRlcmluZ0J5RmFjZXQgPSB2YXJOYW1lcy56aXAob3JkZXJpbmcpLnRvTWFwKClcblxuICAgICAgICAgICAgdmFsIHJlc3VsdCA9IEFycmF5TGlzdDxMaXN0PEFueT4+KClcbiAgICAgICAgICAgIGZvciAoKGksIG5hbWUpIGluIHZhck5hbWVzLndpdGhJbmRleCgpKSB7XG4gICAgICAgICAgICAgICAgaWYgKGkgPj0gdmFyTGV2ZWxzLnNpemUpIGJyZWFrXG4gICAgICAgICAgICAgICAgcmVzdWx0LmFkZChyZW9yZGVyVmFyTGV2ZWxzKG5hbWUsIHZhckxldmVsc1tpXSwgb3JkZXJpbmdCeUZhY2V0LmdldFZhbHVlKG5hbWUpKSlcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIHJlc3VsdFxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIHJlb3JkZXJWYXJMZXZlbHMoXG4gICAgICAgICAgICBuYW1lOiBTdHJpbmc/LFxuICAgICAgICAgICAgbGV2ZWxzOiBMaXN0PEFueT4sXG4gICAgICAgICAgICBvcmRlcjogSW50XG4gICAgICAgICk6IExpc3Q8QW55PiB7XG4gICAgICAgICAgICBpZiAobmFtZSA9PSBudWxsKSByZXR1cm4gbGV2ZWxzXG5cbiAgICAgICAgICAgIC8vIFdlIGV4cGVjdCBlaXRoZXIgYSBsaXN0IG9mIERvdWJsZXMgb3IgYSBsaXN0IG9mIFN0cmluZ3MuXG4gICAgICAgICAgICBAU3VwcHJlc3MoXCJVTkNIRUNLRURfQ0FTVFwiLCBcIk5BTUVfU0hBRE9XSU5HXCIpXG4gICAgICAgICAgICBsZXZlbHMgYXMgTGlzdDxDb21wYXJhYmxlPEFueT4+XG5cbiAgICAgICAgICAgIHJldHVybiB3aGVuIHtcbiAgICAgICAgICAgICAgICBvcmRlciA8PSAtMSAtPiBsZXZlbHMuc29ydGVkRGVzY2VuZGluZygpXG4gIC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ZXN0aGV0aWNzIHRvIHNob3cgLi5dICAgICA6IHNob3cgc2VsZWN0ZWQgYWVzdGhldGljcyBpbiBsZWdlbmRcbiAgICAgICAgICAgIC8vIHNlZTogaHR0cHM6Ly9nZ3Bsb3QyLnRpZHl2ZXJzZS5vcmcvcmVmZXJlbmNlL2dlb21fcG9pbnQuaHRtbFxuICAgICAgICAgICAgcmV0dXJuIGVtcHR5TGlzdCgpXG4gICAgICAgIH1cblxuICAgICAgICB2YWwgcmVzdWx0ID0gQXJyYXlMaXN0PEFlczwqPj4oKVxuICAgICAgICBmb3IgKGFlcyBpbiBsYXllci5yZW5kZXJlZEFlcygpKSB7XG4gICAgICAgICAgICBpZiAoQWVzLm5vR3VpZGVOZWVkZWQoYWVzKSkge1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAobGF5ZXIuaGFzQ29uc3RhbnQoYWVzKSkge1xuICAgICAgICAgICAgICAgIC8vIGNvbnN0YW50cyBtYXNrIGFlcyBtYXBwaW5nc1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoIWxheWVyLmhhc0JpbmRpbmcoYWVzKSkge1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoZ3VpZGVPcHRpb25zTWFwLmNvbnRhaW5zS2V5KGFlcykpIHtcbiAgICAgICAgICAgICAgICBpZiAoZ3VpZGVPcHRpb25zTWFwW2Flc10gPT09IEd1aWRlT3B0aW9ucy5OT05FKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXN1bHQuYWRkKGFlcylcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiByZXN1bHRcbiAgICB9XG5cbi8vICAgIGZ1biBndWlkZVRyYW5zZm9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VhbiB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBwb3MuaGFuZGxlc0dyb3VwcygpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIGJhclN0YWNrKHZqdXN0OiBEb3VibGU/ID0gbnVsbCk6IFBvc1Byb3ZpZGVyIHtcbiAgICAgICAgICAgIHJldHVybiBvYmplY3QgOiBQb3NQcm92aWRlcigpIHtcbiAgICAgICAgICAgICAgICBvdmVycmlkZSBmdW4gY3JlYXRlUG9zKGN0eDogUG9zUHJvdmlkZXJDb250ZXh0KTogUG9zaXRpb25BZGp1c3RtZW50IHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFBvc2l0aW9uQWRqdXN0bWVudHMuc3RhY2soY3R4LmFlc3RoZXRpY3MsIHZqdXN0KVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIG92ZXJyaWRlIGZ1biBoYW5kbGVzR3JvdXBzKCk6IEJvb2xlYW4ge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gUG9zaXRpb25BZGp1c3RtZW50cy5NZXRhLlNUQUNLLmhhbmRsZXNHcm91cHMoKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIEBKdm1PdmVybG9hZHNcbiAgICAgICAgZnVuIGRvZGdlKHdpZHRoOiBEb3VibGU/ID0gbnVsbCk6IFBvc1Byb3ZpZGVyIHtcbiAgICAgICAgICAgIHJldHVybiBvYmplY3QgOiBQb3NQcm92aWRlcigpIHtcbiAgICAgICAgICAgICAgICBvdmVycmlkZSBmdW4gY3JlYXRlUG9zKGN0eDogUG9zUHJvdmlkZXJDb250ZXh0KTogUG9zaXRpb25BZGp1c3RtZW50IHtcbiAgICAgICAgICAgICAgICAgICAgdmFsIGFlc3RoZXRpY3MgPSBjdHguYWVzdGhldGljc1xuICAgICAgICAgICAgICAgICAgICB2YWwgZ3JvdXBDb3VudCA9IGN0eC5ncm91cENvdW50XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBQb3NpdGlvbkFkanVzdG1lbnRzLmRvZGdlKGFlc3RoZXRpY3MsIGdyb3VwQ291bnQsIHdpZHRoKVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIG92ZXJyaWRlIGZ1biBoYW5kbGVzR3JvdXBzKCk6IEJvb2xlYW4ge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gUG9zaXRpb25BZGp1c3RtZW50cy5NZXRhLkRPREdFLmhhbmRsZXNHcm91cHMoKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBmaWxsKHZqdXN0OiBEb3VibGU/ID0gbnVsbCk6IFBvc1Byb3ZpZGVyIHtcbiAgICAgICAgICAgIHJldHVybiBvYmplY3QgOiBQb3NQcm92aWRlcigpIHtcbiAgICAgICAgICAgICAgICBvdmVycmlkZSBmdW4gY3JlYXRlUG9zKGN0eDogUG9zUHJvdmlkZXJDb250ZXh0KTogUG9zaXRpb25BZGp1c3RtZW50IHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFBvc2l0aW9uQWRqdXN0bWVudHMuZmlsbChjdHguYWVzdGhldGljcywgdmp1c3QpXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgb3ZlcnJpZGUgZnVuIGhhbmRsZXNHcm91cHMoKTogQm9vbGVhbiB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBQb3NpdGlvbkFkanVzdG1lbnRzLk1ldGEuRklMTC5oYW5kbGVzR3JvdXBzKClcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBmdW4gaml0dGVyKHdpZHRoOiBEb3VibGU/LCBoZWlnaHQ6IERvdWJsZT8pOiBQb3NQcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gb2JqZWN0IDogUG9zUHJvdmlkZXIoKSB7XG4gICAgICAgICAgICAgICAgb3ZlcnJpZGUgZnVuIGNyZWF0ZVBvcyhjdHg6IFBvc1Byb3ZpZGVyQ29udGV4dCk6IFBvc2l0aW9uQWRqdXN0bWVudCB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBQb3NpdGlvbkFkanVzdG1lbnRzLmppdHRlcih3aWR0aCwgaGVpZ2h0KVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIG92ZXJyaWRlIGZ1biBoYW5kbGVzR3JvdXBzKCk6IEJvb2xlYW4ge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gUG9zaXRpb25BZGp1c3RtZW50cy5NZXRhLkpJVFRFUi5oYW5kbGVzR3JvdXBzKClcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBmdW4gbnVkZ2Uod2lkdGg6IERvdWJsZT8sIGhlaWdodDogRG91YmxlPyk6IFBvc1Byb3ZpZGVyIHtcbiAgICAgICAgICAgIHJldHVybiBvYmplY3QgOiBQb3NQcm92aWRlcigpIHtcbiAgICAgICAgICAgICAgICBvdmVycmlkZSBmdW4gY3JlYXRlUG9zKGN0eDogUG9zUHJvdmlkZXJDb250ZXh0KTogUG9zaXRpb25BZGp1c3RtZW50IHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFBvc2l0aW9uQWRqdXN0bWVudHMubnVkZ2Uod2lkdGgsIGhlaWdodClcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBvdmVycmlkZSBmdW4gaGFuZGxlc0dyb3VwcygpOiBCb29sZWFuIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFBvc2l0aW9uQWRqdXN0bWVudHMuTWV0YS5OVURHRS5oYW5kbGVzR3JvdXBzKClcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvKlxuICBwdWJsaWMgc3RhdGljIFBvc1Byb3ZpZGVyIGppdHRlckRvZGdlKERvdWJsZSBqaXR0ZXJXaWR0aCwgRG91YmxlIGppdHRlckhlaWdodCkge1xuICAgIHJldHVybiBqaXR0ZXJEb2RnZShudWxsLCBqaXR0ZXJXaWR0aCwgaml0dGVySGVpZ2h0KTtcbiAgfVxuICAqL1xuXG4gICAgICAgIGZ1biBqaXR0ZXJEb2RnZSh3aWR0aDogRG91YmxlPywgaml0dGVyV2lkdGg6IERvdWJsZT8sIGppdHRlckhlaWdodDogRG91YmxlPyk6IFBvc1Byb3ZpZGVyIHtcbiAgICAgICAgICAgIHJldHVybiBvYmplY3QgOiBQb3NQcm92aWRlcigpIHtcbiAgICAgICAgICAgICAgICBvdmVycmlkZSBmdW4gY3JlYXRlUG9zKGN0eDogUG9zUHJvdmlkZXJDb250ZXh0KTogUG9zaXRpb25BZGp1c3RtZW50IHtcbiAgICAgICAgICAgICAgICAgICAgdmFsIGFlc3RoZXRpY3MgPSBjdHguYWVzdGhldGljc1xuICAgICAgICAgICAgICAgICAgICB2YWwgZ3JvdXBDb3VudCA9IGN0eC5ncm91cENvdW50XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBQb3NpdGlvbkFkanVzdG1lbnRzLmppdHRlckRvZGdlKGFlc3RoZXRpY3MsIGdyb3VwQ291bnQsIHdpZHRoLCBqaXR0ZXJXaWR0aCwgaml0dGVySGVpZ2h0KVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIG92ZXJyaWRlIGZ1biBoYW5kbGVzR3JvdXBzKCk6IEJvb2xlYW4ge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gUG9zaXRpb25BZGp1c3RtZW50cy5NZXRhLkpJVFRFUl9ET0RHRS5oYW5kbGVzR3JvdXBzKClcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG59XG4iLCIvKlxuICogQ29weXJp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bWFpbnMgPSBBcnJheUxpc3Q8RG91YmxlU3Bhbj8+KClcbiAgICAgICAgZm9yICh0aWxlTGF5ZXJzIGluIGxheWVyc0J5VGlsZSkge1xuICAgICAgICAgICAgdmFsICh4RG9tYWluLCB5RG9tYWluKSA9IGNvbXB1dGVUaWxlWFlEb21haW5zKFxuICAgICAgICAgICAgICAgIHRpbGVMYXllcnMsXG4gICAgICAgICAgICAgICAgeEluaXRpYWxEb21haW4sXG4gICAgICAgICAgICAgICAgeUluaXRpYWxEb21haW5cbiAgICAgICAgICAgIClcblxuICAgICAgICAgICAgeERvbWFpbnMuYWRkKHhEb21haW4pXG4gICAgICAgICAgICB5RG9tYWlucy5hZGQoeURvbWFpbilcbiAgICAgICAgfVxuXG4gICAgICAgIHZhbCBhZGp1c3RlZFhEb21haW5zOiBMaXN0PERvdWJsZVNwYW4/PiA9IGZhY2V0cy5hZGp1c3RIRG9tYWlucyh4RG9tYWlucylcbiAgICAgICAgdmFsIGFkanVzdGVkWURvbWFpbnM6IExpc3Q8RG91YmxlU3Bhbj8+ID0gZmFjZXRzLmFkanVzdFZEb21haW5zKHlEb21haW5zKVxuXG4gICAgICAgIHZhbCBmaW5hbGl6ZWRYRG9tYWluczogTGlzdDxEb3VibGVTcGFuPiA9IGZpbmFsaXplRG9tYWlucyhcbiAgICAgICAgICAgIEFlcy5YLFxuICAgICAgICAgICAgeFNjYWxlUHJvdG8sXG4gICAgICAgICAgICBhZGp1c3RlZFhEb21haW5zLFxuICAgICAgICAgICAgbGF5ZXJzQnlUaWxlLFxuICAgICAgICAgICAgZmFjZXRzLmZyZWVIU2NhbGVcbiAgICAgICAgKVxuICAgICAgICB2YWwgZmluYWxpemVkWURvbWFpbnM6IExpc3Q8RG91YmxlU3Bhbj4gPSBmaW5hbGl6ZURvbWFpbnMoXG4gICAgICAgICAgICBBZXMuWSxcbiAgICAgICAgICAgIHlTY2FsZVByb3RvLFxuICAgICAgICAgICAgYWRqdXN0ZWRZRG9tYWlucyxcbiAgICAgICAgICAgIGxheWVyc0J5VGlsZSxcbiAgICAgICAgICAgIGZhY2V0cy5mcmVlVlNjYWxlXG4gICAgICAgIClcblxuICAgICAgICByZXR1cm4gZmluYWxpemVkWERvbWFpbnMuemlwKGZpbmFsaXplZFlEb21haW5zKVxuICAgIH1cblxuICAgIHByaXZhdGUgZnVuIGZpbmFsaXplRG9tYWlucyhcbiAgICAgICAgYWVzOiBBZXM8RG91YmxlPixcbiAgICAgICAgc2NhbGVQcm90bzogU2NhbGU8Kj4sXG4gICAgICAgIGRvbWFpbnM6IExpc3Q8RG91YmxlU3Bhbj8+LFxuICAgICAgICBsYXllcnNCeVRpbGU6IExpc3Q8TGlzdDxHZW9tTGF5ZXI+PixcbiAgICAgICAgZnJlZVNjYWxlOiBCb29sZWFuXG4gICAgKTogTGlzdDxEb3VibGVTcGFuPiB7XG5cbiAgICAgICAgcmV0dXJuIHdoZW4ge1xuICAgICAgICAgICAgZnJlZVNjYWxlIC0+IHtcbiAgICAgICAgICAgICAgICAvLyBFYWNoIHRpbGUgaGFzIGl0cyBvd24gZG9tYWluXG4gICAgICAgICAgICAgICAgZG9tYWlucy5tYXBJbmRleGVkIHsgaSwgdiAtPlxuICAgICAgICAgICAgICAgICAgICAvLyAnZXhwYW5kJyByYW5nZXMgYW5kIGluY2x1ZGUgJzAnIGlmIG5lY2Vzc2FyeVxuICAgICAgICAgICAgICAgICAgICB2YWwgZG9tYWluRXhwYW5kZWQgPSBSYW5nZVV0aWwuZXhwYW5kUmFuZ2UodiwgYWVzLCBzY2FsZVByb3RvLCBsYXllcnNCeVRpbGVbaV0pXG4gICAgICAgICAgICAgICAgICAgIFNlcmllc1V0aWwuZW5zdXJlQXBwbGljYWJsZVJhbmdlKGRvbWFpbkV4cGFuZGVkKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgZWxzZSAtPiB7XG4gICAgICAgICAgICAgICAgLy8gT25lIGRvbWFpbiBmb3IgYWxsIHRpbGVzLlxuICAgICAgICAgICAgICAgIHZhbCBkb21haW5PdmVyYWxsID0gZG9tYWlucy5maWx0ZXJOb3ROdWxsKCkucmVkdWNlT3JOdWxsIHsgcjAsIHIxIC0+XG4gICAgICAgICAgICAgICAgICAgIFJhbmdlVXRpbC51cGRhdGVSYW5nZShyMCwgcjEpISFcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdmFsIHByZWZlcmFibGVOdWxsRG9tYWluT3ZlcmFsbCA9IGxheWVyc0J5VGlsZVswXVxuICAgICAgICAgICAgICAgICAgICAubWFwIHsgaXQucHJlZmVyYWJsZU51bGxEb21haW4oYWVzKSB9XG4gICAgICAgICAgICAgICAgICAgIC5yZWR1Y2VPck51bGwgeyByMCwgcjEgLT4gUmFuZ2VVdGlsLnVwZGF0ZVJhbmdlKHIwLCByMSkhISB9XG5cbiAgICAgICAgICAgICAgICAvLyAnZXhwYW5kJyByYW5nZXMgYW5kIGluY2x1ZGUgJzAnIGlmIG5lY2Vzc2FyeVxuICAgICAgICAgICAgICAgIHZhbCBkb21haW5FeHBhbmRlZCA9IFJhbmdlVXRpbC5leHBhbmRSYW5nZShkb21haW5PdmVyYWxsLCBhZXMsIHNjYWxlUHJvdG8sIGxheWVyc0J5VGlsZVswXSlcbiAgICAgICAgICAgICAgICB2YWwgZG9tYWluID0gU2VyaWVzVXRpbC5lbnN1cmVBcHBsaWNhYmxlUmFuZ2UoZG9tYWluRXhwYW5kZWQsIHByZWZlcmFibGVOdWxsRG9tYWluT3ZlcmFsbClcblxuICAgICAgICAgICAgICAgIGxheWVyc0J5VGlsZS5tYXAgeyBkb21haW4gfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgcHJpdmF0ZSBmdW4gY29tcHV0ZVRpbGVYWURvbWFpbnMoXG4gICAgICAgIGxheWVyczogTGlzdDxHZW9tTGF5ZXI+LFxuICAgICAgICB4SW5pdGlhbERvbWFpbjogRG91YmxlU3Bhbj8sX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gaW4gcG9zQWVzWSkge1xuICAgICAgICAgICAgICAgICAgICB2YWwgdmFsWSA9IHAubnVtZXJpYyhhZXNZKVxuICAgICAgICAgICAgICAgICAgICBpKytcbiAgICAgICAgICAgICAgICAgICAgcHhbaV0gPSB2YWxYXG4gICAgICAgICAgICAgICAgICAgIHB5W2ldID0gdmFsWVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgd2hpbGUgKGkgPj0gMCkge1xuICAgICAgICAgICAgICAgIGlmIChweFtpXSAhPSBudWxsICYmIHB5W2ldICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFsIHggPSBweFtpXVxuICAgICAgICAgICAgICAgICAgICB2YWwgeSA9IHB5W2ldXG4gICAgICAgICAgICAgICAgICAgIGlmIChTZXJpZXNVdGlsLmlzRmluaXRlKHgpICYmIFNlcmllc1V0aWwuaXNGaW5pdGUoeSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbCBuZXdMb2MgPSBwb3MudHJhbnNsYXRlKERvdWJsZVZlY3Rvcih4ISEsIHkhISksIHAsIGdlb21DdHgpXG4gICAgICAgICAgICAgICAgICAgICAgICB2YWwgYWRqdXN0ZWRYID0gbmV3TG9jLnhcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbCBhZGp1c3RlZFkgPSBuZXdMb2MueVxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJhbmdlc0luaXRlZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkanVzdGVkTWluWCA9IG1pbihhZGp1c3RlZFgsIGFkanVzdGVkTWluWClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGp1c3RlZE1heFggPSBtYXgoYWRqdXN0ZWRYLCBhZGp1c3RlZE1heFgpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRqdXN0ZWRNaW5ZID0gbWluKGFkanVzdGVkWSwgYWRqdXN0ZWRNaW5ZKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkanVzdGVkTWF4WSA9IG1heChhZGp1c3RlZFksIGFkanVzdGVkTWF4WSlcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRqdXN0ZWRNYXhYID0gYWRqdXN0ZWRYXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRqdXN0ZWRNaW5YID0gYWRqdXN0ZWRNYXhYXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRqdXN0ZWRNYXhZID0gYWRqdXN0ZWRZXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRqdXN0ZWRNaW5ZID0gYWRqdXN0ZWRNYXhZXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmFuZ2VzSW5pdGVkID0gdHJ1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGktLVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gWCByYW5nZVxuICAgICAgICB2YWwgeFJhbmdlID0gaWYgKHJhbmdlc0luaXRlZClcbiAgICAgICAgICAgIERvdWJsZVNwYW4oYWRqdXN0ZWRNaW5YLCBhZGp1c3RlZE1heFgpXG4gICAgICAgIGVsc2VcbiAgICAgICAgICAgIG51bGxcblxuICAgICAgICB2YWwgeVJhbmdlID0gaWYgKHJhbmdlc0luaXRlZClcbiAgICAgICAgICAgIERvdWJsZVNwYW4oYWRqdXN0ZWRNaW5ZLCBhZGp1c3RlZE1heFkpXG4gICAgICAgIGVsc2VcbiAgICAgICAgICAgIG51bGxcbiAgICAgICAgcmV0dXJuIFBhaXIoeFJhbmdlLCB5UmFuZ2UpXG4gICAgfVxuXG4gICAgcHJpdmF0ZSBmdW4gY29tcHV0ZUxheWVyRHJ5UnVuWFlSYW5nZXNBZnRlclNpemVFeHBhbmQoXG4gICAgICAgIGxheWVyOiBHZW9tTGF5ZXIsXG4gICAgICAgIGFlc3RoZXRpY3M6IEFlc3RoZXRpY3MsXG4gICAgICAgIGdlb21DdHg6IEdlb21Db250ZXh0XG4gICAgKTogUGFpcjxEb3VibGVTcGFuPywgRG91YmxlU3Bhbj8+IHtcblxuICAgICAgICB2YWwgKHdpZHRoQXhpcywgaGVpZ2h0QXhpcykgPSB3aGVuIChsYXllci5pc1lPcmllbnRhdGlvbikge1xuICAgICAgICAgICAgdHJ1ZSAtPiBBZXMuWSB0byBBZXMuWFxuICAgICAgICAgICAgZmFsc2UgLT4gQWVzLlggdG8gQWVzLllcbiAgICAgICAgfVxuXG4gICAgICAgIHZhbCBnZW9tID0gbGF5ZXIuZ2VvbVxuICAgICAgICB2YWwgcmVuZGVyZWRBZXMgPSBsYXllci5yZW5kZXJlZEFlcygpXG5cbiAgICAgICAgdmFsIHh5ID0gbWFwT2YoXG4gICAgICAgICAgICB3aWR0aEF4aXMgdG8gd2hlbiB7XG4gICAgICAgICAgICAgICAgZ2VvbSBpcyBXaXRoV2lkdGggLT4ge1xuICAgICAgICAgICAgICAgICAgICB2YWwgcmVzb2x1dGlvbiA9IGdlb21DdHguZ2V0UmVzb2x1dGlvbih3aWR0aEF4aXMpXG4gICAgICAgICAgICAgICAgICAgIHZhbCBpc0Rpc2NyZXRlID0gIWxheWVyLnNjYWxlTWFwLmdldCh3aWR0aEF4aXMpLmlzQ29udGludW91c0RvbWFpblxuICAgICAgICAgICAgICAgICAgICBjb21wdXRlTGF5ZXJEcnlSdW5SYW5nZUFmdGVyU2l6ZUV4cGFuZChhZXN0aGV0aWNzKSB7IHAgLT5cbiAgICAgICAgICAgICAgICAgICAgICAgIGdlb20ud2lkdGhTcGFuKHAsIHdpZHRoQXhpcywgcmVzb2x1dGlvbiwgaXNEaXNjcmV0ZSlcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIEFlcy5XSURUSCBpbiByZW5kZXJlZEFlcyAtPiB7XG4gICAgICAgICAgICAgICAgICAgIHZhbCByZXNvbHV0aW9uID0gZ2VvbUN0eC5nZXRSZXNvbHV0aW9uKHdpZHRoQXhpcylcbiAgICAgICAgICAgICAgICAgICAgY29tcHV0ZUxheWVyRHJ5UnVuUmFuZ2VBZnRlclNpemVFeHBhbmQoYWVzdGhldGljcykgeyBwIC0+XG4gICAgICAgICAgICAgICAgICAgICAgICBQb2ludERpbWVuc2lvbnNVdGlsLmRpbWVuc2lvblNwYW4ocCwgd2lkdGhBeGlzLCBBZXMuV0lEVEgsIHJlc29sdXRpb24pXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBlbHNlIC0+IG51bGxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBoZWlnaHRBeGlzIHRvIHdoZW4ge1xuICAgICAgICAgICAgICAgIGdlb20gaXMgV2l0aEhlaWdodCAtPiB7XG4gICAgICAgICAgICAgICAgICAgIHZhbCByZXNvbHV0aW9uID0gZ2VvbUN0eC5nZXRSZXNvbHV0aW9uKGhlaWdodEF4aXMpXG4gICAgICAgICAgICAgICAgICAgIHZhbCBpc0Rpc2NyZXRlID0gIWxheWVyLnNjYWxlTWFwLmdldChoZWlnaHRBeGlzKS5pc0NvbnRpbnVvdXNEb21haW5cbiAgICAgICAgICAgICAgICAgICAgY29tcHV0ZUxheWVyRHJ5UnVuUmFuZ2VBZnRlclNpemVFeHBhbmQoYWVzdGhldGljcykgeyBwIC0+XG4gICAgICAgICAgICAgICAgICAgICAgICBnZW9tLmhlaWdodFNwYW4ocCwgaGVpZ2h0QXhpcywgcmVzb2x1dGlvbiwgaXNEaXNjcmV0ZSlcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIEFlcy5IRUlHSFQgaW4gcmVuZGVyZWRBZXMgLT4ge1xuICAgICAgICAgICAgICAgICAgICB2YWwgcmVzb2x1dGlvbiA9IGdlb21DdHguZ2V0UmVzb2x1dGlvbihoZWlnaHRBeGlzKVxuICAgICAgICAgICAgICAgICAgICBjb21wdXRlTGF5ZXJEcnlSdW5SYW5nZUFmdGVyU2l6ZUV4cGFuZChhZXN0aGV0aWNzKSB7IHAgLT5cbiAgICAgICAgICAgICAgICAgICAgICAgIFBvaW50RGltZW5zaW9uc1V0aWwuZGltZW5zaW9uU3BhbihwLCBoZWlnaHRBeGlzLCBBZXMuSEVJR0hULCByZXNvbHV0aW9uKVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgZWxzZSAtPiBudWxsXG4gICAgICAgICAgICB9XG4gICAgICAgIClcblxuICAgICAgICByZXR1cm4gUGFpcih4eS5nZXRWYWx1ZShBZXMuWCksIHh5LmdldFZhbHVlKEFlcy5ZKSlcbiAgICB9XG5cbiAgICBwcml2YXRlIGZ1biBjb21wdXRlTGF5ZXJEcnlSdW5SYW5nZUFmdGVyU2l6ZUV4cGFuZChcbiAgICAgICAgYWVzdGhldGljczogQWVzdGhldGljcyxcbiAgICAgICAgcG9pbnRTcGFuOiAocDogRGF0YVBvaW50QWVzdGhldGljcykgLT4gRG91YmxlU3Bhbj9cbiAgICApOiBEb3VibGVTcGFuPyB7XG4gICAgICAgIHZhciBtaW5NYXg6IERvdWJsZVNwYW4/ID0gbnVsbFxuXG4gICAgICAgIGZvciAocCBpbiBhZXN0aGV0aWNzLmRhdGFQb2ludHMoKSkge1xuICAgICAgICAgICAgdmFsIHNwYW4gPSBwb2ludFNwYW4ocClcbiAgICAgICAgICAgIG1pbk1heCA9IFNlcmllc1V0aWwuc3BhbihtaW5NYXgsIHNwYW4pXG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1pbk1heFxuICAgIH1cblxuICAgIHByaXZhdGUgb2JqZWN0IFJhbmdlVXRpbCB7XG4gICAgICAgIGZ1biBpbml0aWFsUmFuZ2UodHJhbnNmb3JtOiBUcmFuc2Zvcm0pOiBEb3VibGVTcGFuPyB7XG4gICAgICAgICAgICAvLyBJbml0IHdpdGggJ3NjYWxlIGxpbWl0cycuXG4gICAgICAgICAgICByZXR1cm4gd2hlbiAodHJhbnNmb3JtKSB7XG4gICAgICAgICAgICAgICAgaXMgQ29udGludW91c1RyYW5zZm9ybSAtPiB7XG4gICAgICAgICAgICAgICAgICAgIHZhbCBsaW1zID0gU2NhbGVVdGlsLnRyYW5zZm9ybWVkRGVmaW5lZExpbWl0cyh0cmFuc2Zvcm0pLnRvTGlzdCgpLmZpbHRlciB7IGl0LmlzRmluaXRlKCkgfVxuICAgICAgICAgICAgICAgICAgICBpZiAobGltcy5pc0VtcHR5KCkpIG51bGxcbiAgICAgICAgICAgICAgICAgICAgZWxzZSBEb3VibGVTcGFuLmVuY2xvc2VBbGwobGltcylcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpcyBEaXNjcmV0ZVRyYW5zZm9ybSAtPiB7XG4gICAgICAgICAgICAgICAgICAgIERvdWJsZVNwYW4uZW5jbG9zZUFsbCh0cmFuc2Zvcm0uZWZmZWN0aXZlRG9tYWluVHJhbnNmb3JtZWQpXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgZWxzZSAtPiB0aHJvdyBJbGxlZ2FsU3RhdGVFeGNlcHRpb24oXCJVbmV4cGVjdGVkIHRyYW5zZm9ybSB0eXBlOiAke3RyYW5zZm9ybTo6Y2xhc3Muc2ltcGxlTmFtZX1cIilcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGludGVybmFsIGZ1biBleHBhbmRSYW5nZShcbiAgICAgICAgICAgIHJhbmdlOiBEb3VibGVTcGFuPyxcbiAgICAgICAgICAgIGFlczogQWVzPERvdWJsZT4sXG4gICAgICAgICAgICBzY2FsZTogU2NhbGU8Kj4sXG4gICAgICAgICAgICBsYXllcnM6IExpc3Q8R2Vv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FET1dJTkdcIilcbiAgICAgICAgICAgIHZhciByYW5nZSA9IHJhbmdlXG4gICAgICAgICAgICBpZiAocmFuZ2UgIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIGlmICh3YXNSYW5nZSAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgIHJhbmdlID0gd2FzUmFuZ2UudW5pb24ocmFuZ2UpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiByYW5nZVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHdhc1JhbmdlXG4gICAgICAgIH1cblxuICAgICAgICBpbnRlcm5hbCBmdW4gY29tYmluZVJhbmdlcyhhZXNMaXN0OiBMaXN0PEFlczxEb3VibGU+PiwgYWVzdGhldGljczogQWVzdGhldGljcyk6IERvdWJsZVNwYW4/IHtcbiAgICAgICAgICAgIHZhciByZXN1bHQ6IERvdWJsZVNwYW4/ID0gbnVsbFxuICAgICAgICAgICAgZm9yIChhZXMgaW4gYWVzTGlzdCkge1xuICAgICAgICAgICAgICAgIHZhbCByYW5nZSA9IGFlc3RoZXRpY3MucmFuZ2UoYWVzKVxuICAgICAgICAgICAgICAgIGlmIChyYW5nZSAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdCA9IHJlc3VsdD8udW5pb24ocmFuZ2UpID86IHJhbmdlXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHJlc3VsdFxuICAgICAgICB9XG4gICAgfVxufSIsIi8qXG4gKiBDb3B5cmlnaHQgKGMpIDIwMTkuIEpldEJyYWlucyBzLnIuby5cbiAqIFVzZSBvZiB0aGlzIHNvdXJjZSBjb2RlIGlzIGdvdmVybmVkIGJ5IHRoZSBNSVQgbGljZW5zZSB0aGF0IGNhbiBiZSBmb3VuZCBpbiB0aGUgTElDRU5TRSBmaWxlLlxuICovXG5cbnBhY2thZ2UgamV0YnJhaW5zLmRhd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5lLjpcbiAgICAgKiAgICAgICAgICB0aGUgaW5kZXggaXMgY29tcHV0ZWQgbGlrZTogcm93ICogbkNvbHMgKyBjb2xcbiAgICAgKi9cbiAgICBvdmVycmlkZSBmdW4gZGF0YUJ5VGlsZShkYXRhOiBEYXRhRnJhbWUpOiBMaXN0PERhdGFGcmFtZT4ge1xuICAgICAgICByZXF1aXJlKGlzRGVmaW5lZCkgeyBcImRhdGFCeVRpbGUoKSBjYWxsZWQgb24gVW5kZWZpbmVkIHBsb3QgZmFjZXRzLlwiIH1cblxuICAgICAgICB2YWwgZGF0YUJ5TGV2ZWxUdXBsZUxpc3QgPSBkYXRhQnlMZXZlbFR1cGxlKFxuICAgICAgICAgICAgZGF0YSxcbiAgICAgICAgICAgIGxpc3RPZk5vdE51bGwoXG4gICAgICAgICAgICAgICAgeFZhcixcbiAgICAgICAgICAgICAgICB5VmFyLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICAgIGxpc3RPZk5vdE51bGwoXG4gICAgICAgICAgICAgICAgeFZhcj8ubGV0IHsgeExldmVscyB9LFxuICAgICAgICAgICAgICAgIHlWYXI/LmxldCB7IHlMZXZlbHMgfSxcbiAgICAgICAgICAgIClcbiAgICAgICAgKVxuICAgICAgICB2YWwgZGF0YUJ5TGV2ZWxUdXBsZSA9IGRhdGFCeUxldmVsVHVwbGVMaXN0LnRvTWFwKClcblxuICAgICAgICB2YWwgZGF0YUJ5VGlsZTogTXV0YWJsZUxpc3Q8RGF0YUZyYW1lPiA9IEFycmF5TGlzdCgpXG4gICAgICAgIC8vIEVudW1lcmF0ZSB0aWxlcyBieS1yb3cuXG4gICAgICAgIGZvciAocm93TGV2ZWwgaW4gcm93TGV2ZWxzKSB7XG4gICAgICAgICAgICBmb3IgKGNvbExldmVsIGluIGNvbExldmVscykge1xuICAgICAgICAgICAgICAgIHZhbCBsZXZlbFR1cGxlID0gbGlzdE9mTm90TnVsbChjb2xMZXZlbCwgcm93TGV2ZWwpXG4gICAgICAgICAgICAgICAgdmFsIHRpbGVEYXRhID0gZGF0YUJ5TGV2ZWxUdXBsZS5nZXRWYWx1ZShsZXZlbFR1cGxlKVxuICAgICAgICAgICAgICAgIGRhdGFCeVRpbGUuYWRkKHRpbGVEYXRhKVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGRhdGFCeVRpbGVcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBAcmV0dXJuIExpc3Qgb2YgRmFjZXRUaWxlSW5mby5cbiAgICAgKiAgICAgICAgICBUaWxlcyBhcmUgZW51bWVyYXRlZCBieSByb3dzLCBpLmUuOlxuICAgICAqICAgICAgICAgIHRoZSBpbmRleCBpcyBjb21wdXRlZCBsaWtlOiByb3cgKiBuQ29scyArIGNvbFxuICAgICAqL1xuICAgIG92ZXJyaWRlIGZ1biB0aWxlSW5mb3MoKTogTGlzdDxGYWNldFRpbGVJbmZvPiB7XG4gICAgICAgIHZhbCBjb2xMYWJlbHMgPSAoY29sTGV2ZWxzKS5tYXAge1xuICAgICAgICAgICAgaXQ/LmxldCB7IHhGb3JtYXR0ZXIoaXQpIH1cbiAgICAgICAgfVxuICAgICAgICB2YWwgcm93TGFiZWxzID0gKHJvd0xldmVscykubWFwIHtcbiAgICAgICAgICAgIGl0Py5sZXQgeyB5Rm9ybWF0dGVyKGl0KSB9XG4gICAgICAgIH1cblxuICAgICAgICB2YWwgaW5mb3MgPSBBcnJheUxpc3Q8RmFjZXRUaWxlSW5mbz4oKVxuICAgICAgICBmb3IgKHJvdyBpbiAwIHVudGlsIHJvd0NvdW50KSB7XG4gICAgICAgICAgICB2YWwgYWRkQ29sTGFiID0gcm93ID09IDBcbiAgICAgICAgICAgIHZhbCBoYXNIQXhpcyA9IHJvdyA9PSByb3dDb3VudCAtIDFcbiAgICAgICAgICAgIGZvciAoY29sIGluIDAgdW50aWwgY29sQ291bnQpIHtcbiAgICAgICAgICAgICAgICB2YWwgYWRkUm93TGFiID0gY29sID09IGNvbENvdW50IC0gMVxuICAgICAgICAgICAgICAgIHZhbCBoYXNWQXhpcyA9IGNvbCA9PSAwXG5cbiAgICAgICAgICAgICAgICB2YWwgY29sTGFicyA9IGlmIChhZGRDb2xMYWIpIHtcbiAgICAgICAgICAgICAgICAgICAgY29sTGFiZWxzW2NvbF0/LmxldCB7IGxpc3RPZihpdCkgfSA/OiBlbXB0eUxpc3QoKVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGVtcHR5TGlzdDxTdHJpbmc+KClcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpbmZvcy5hZGQoXG4gICAgICAgICAgICAgICAgICAgIEZhY2V0VGlsZUluZm8oXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2wsIHJvdyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbExhYnMsXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoYWRkUm93TGFiKSByb3dMYWJlbHNbcm93XSBlbHNlIG51bGwsXG4gICAgICAgICAgICAgICAgICAgICAgICBoYXNIQXhpcyA9IGhhc0hBeGlzLFxuICAgICAgICAgICAgICAgICAgICAgICAgaGFzVkF4aXMgPSBoYXNWQXhpcyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlzQm90dG9tID0gcm93ID09IHJvd0NvdW50IC0gMSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRydWVJbmRleCA9IGluZm9zLnNpemUgIC8vIG5vIHJlb3JkZXJpbmdcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBpbmZvc1xuICAgIH1cblxuICAgIG92ZXJyaWRlIGZ1biBhZGp1c3RIRG9tYWlucyhkb21haW5zOiBMaXN0PERvdWJsZVNwYW4/Pik6IExpc3Q8RG91YmxlU3Bhbj8+IHtcbiAgICAgICAgZnVuIGNvbEluZGljZXMoY29sOiBJbnQpOiBMaXN0PEludD4ge1xuICAgICAgICAgICAgcmV0dXJuIChyb3dMZXZlbHMuaW5kaWNlcykubWFwIHsgaXQgKiBjb2xMZXZlbHMuc2l6ZSArIGNvbCB9LnRvTGlzdCgpXG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gaWYgKGZyZWVIU2NhbGUpIHtcbiAgICAgICAgICAgIC8vIHNhbWUgZG9tYWluIGZvciBhbGwgdGlsZXMgaW4gYSBjb2x1bW4uXG4gICAgICAgICAgICB2YWwgYWRqdXN0ZWQgPSBNdXRhYmxlTGlzdDxEb3VibGVTcGFuPz4oZG9tYWlucy5zaXplKSB7IG51bGwgfVxuICAgICAgICAgICAgZm9yIChjb2wgaW4gY29sTGV2ZWxzLmluZGljZXMpIHtcbiAgICAgICAgICAgICAgICB2YWwgaW5kaWNlcyA9IGNvbEluZGljZXMoY29sKVxuICAgICAgICAgICAgICAgIHZhbCB1bmlvbiA9IGluZGljZXMubWFwIHsgZG9tYWluc1tpdF0gfS5yZWR1Y2UgeyBkMCwgZDEgLT4gU2VyaWVzVXRpbC5zcGFuKGQwLCBkMSkgfVxuICAgICAgICAgICAgICAgIGluZGljZXMuZm9yRWFjaCB7XG4gICAgICAgICAgICAgICAgICAgIGFkanVzdGVkW2l0XSA9IHVuaW9uXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYWRqdXN0ZWRcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGRvbWFpbnNcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG92ZXJyaWRlIGZ1biBhZGp1c3RWRG9tYWlucyhkb21haW5zOiBMaXN0PERvdWJsZVNwYW4/Pik6IExpc3Q8RG91YmxlU3Bhbj8+IHtcbiAgICAgICAgZnVuIHJvd0luZGljZXMocm93OiBJbnQpOiBMaXN0PEludD4ge1xuICAgICAgICAgICAgdmFsIHN0YXJ0ID0gcm93ICogY29sTGV2ZWxzLnNpemVcbiAgICAgICAgICAgIHJldHVybiAoc3RhcnQgdW50aWwgc3RhcnQgKyBjb2xMZXZlbHMuc2l6ZSkudG9MaXN0KClcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBpZiAoZnJlZVZTY2FsZSkge1xuICAgICAgICAgICAgLy8gc2FtZSBkb21haW4gZm9yIGFsbCB0aWxlcyBpbiBhIHJvdy5cbiAgICAgICAgICAgIHZhbCBhZGp1c3RlZCA9IE11dGFibGVMaXN0PERvdWJsZVNwYW4/Pihkb21haW5zLnNpemUpIHsgbnVsbCB9XG4gICAgICAgICAgICBmb3IgKHJvdyBpbiByb3dMZXZlbHMuaW5kaWNlcykge1xuICAgICAgICAgICAgICAgIHZhbCBpbmRpY2VzID0gcm93SW5kaWNlcyhyb3cpXG4gICAgICAgICAgICAgICAgdmFsIHVuaW9uID0gaW5kaWNlcy5tYXAgeyBkb21haW5zW2l0XSB9LnJlZHVjZSB7IGQwLCBkMSAtPiBTZXJpZXNVdGlsLnNwYW4oZDAsIGQxKSB9XG4gICAgICAgICAgICAgICAgaW5kaWNlcy5mb3JFYWNoIHtcbiAgICAgICAgICAgICAgICAgICAgYWRqdXN0ZWRbaXRdID0gdW5pb25cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBhZGp1c3RlZFxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgZG9tYWluc1xuICAgICAgICB9XG4gICAgfVxufVxuIiwiLypcbiAqIENvcHlyaWdodCAoYykgMjAyMi4gSmV0QnJhaW5zIHMuci5vLlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgdGhlIE1JVCBsaWNlbnNlIHRoYXQgY2FuIGJlIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUuXG4gKi9cblxucGFja2FnZSBqZXRicmFpbnMuZGF0YWxvcmUucGxvdC5idWlsZGVyLmFzc2VtYmxlLmZhY2V0XG5cbmVudW0gY2xhc3MgR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GV2ZWwgLT4gZmFjZXRGb3JtYXR0ZXJzW2ldKGxldmVsKSB9IH0gICAgICAgICAgICAgICAgLy8gdG8gc3RyaW5nIHR1cGxlc1xuXG4gICAgICAgIGZ1biB0b0NvbChpbmRleDogSW50KTogSW50IHtcbiAgICAgICAgICAgIHJldHVybiB3aGVuIChkaXJlY3Rpb24pIHtcbiAgICAgICAgICAgICAgICBEaXJlY3Rpb24uSCAtPiBpbmRleCAlIGNvbENvdW50XG4gICAgICAgICAgICAgICAgRGlyZWN0aW9uLlYgLT4gaW5kZXggLyByb3dDb3VudFxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIHRvUm93KGluZGV4OiBJbnQpOiBJbnQge1xuICAgICAgICAgICAgcmV0dXJuIHdoZW4gKGRpcmVjdGlvbikge1xuICAgICAgICAgICAgICAgIERpcmVjdGlvbi5IIC0+IGluZGV4IC8gY29sQ291bnRcbiAgICAgICAgICAgICAgICBEaXJlY3Rpb24uViAtPiBpbmRleCAlIHJvd0NvdW50XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBmdW4gdG9JbmRleChjb2w6IEludCwgcm93OiBJbnQpOiBJbnQge1xuICAgICAgICAgICAgcmV0dXJuIHdoZW4gKGRpcmVjdGlvbikge1xuICAgICAgICAgICAgICAgIERpcmVjdGlvbi5IIC0+IHJvdyAqIGNvbENvdW50ICsgY29sXG4gICAgICAgICAgICAgICAgRGlyZWN0aW9uLlYgLT4gY29sICogcm93Q291bnQgKyByb3dcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBpc0JvdHRvbShjb2w6IEludCwgcm93OiBJbnQpOiBCb29sZWFuIHtcbiAgICAgICAgICAgIHZhbCBuZXh0Um93SW5kZXggPSB0b0luZGV4KGNvbCwgcm93ICsgMSlcbiAgICAgICAgICAgIHJldHVybiAocm93ICsgMSkgJSByb3dDb3VudCA9PSAwIHx8IG5leHRSb3dJbmRleCA+PSBudW1UaWxlc1xuICAgICAgICB9XG5cbiAgICAgICAgdmFsIGluZm9zID0gQXJyYXlMaXN0PEZhY2V0VGlsZUluZm8+KClcbiAgICAgICAgZm9yICgoaSwgdGlsZUxhYmVsVHVwbGUpIGluIHRpbGVMYWJlbHMud2l0aEluZGV4KCkpIHtcbiAgICAgICAgICAgIHZhbCBjb2wgPSB0b0NvbChpKVxuICAgICAgICAgICAgdmFsIHJvdyA9IHRvUm93KGkpXG4gICAgICAgICAgICB2YWwgaGFzSEF4aXMgPSBpc0JvdHRvbShjb2wsIHJvdykgfHwgZnJlZUhTY2FsZVxuICAgICAgICAgICAgdmFsIGhhc1ZBeGlzID0gY29sID09IDAgfHwgZnJlZVZTY2FsZVxuXG4gICAgICAgICAgICBpbmZvcy5hZGQoXG4gICAgICAgICAgICAgICAgRmFjZXRUaWxlSW5mbyhcbiAgICAgICAgICAgICAgICAgICAgY29sLCByb3csXG4gICAgICAgICAgICAgICAgICAgIGNvbExhYnMgPSB0aWxlTGFiZWxUdXBsZSxcbiAgICAgICAgICAgICAgICAgICAgbnVsbCxcbiAgICAgICAgICAgICAgICAgICAgaGFzSEF4aXMgPSBoYXNIQXhpcyxcbiAgICAgICAgICAgICAgICAgICAgaGFzVkF4aXMgPSBoYXNWQXhpcyxcbiAgICAgICAgICAgICAgICAgICAgaXNCb3R0b20gPSBpc0JvdHRvbShjb2wsIHJvdyksXG4gICAgICAgICAgICAgICAgICAgIHRydWVJbmRleCA9IGlcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICApXG4gICAgICAgIH1cblxuICAgICAgICAvLyBFbnVtZXJhdGlvbiBpcyBhbHdheXMgJ2J5IHJvdycuXG4gICAgICAgIHJldHVybiBpbmZvcy5zb3J0ZWRXaXRoKGNvbXBhcmVCeTxGYWNldFRpbGVJbmZvPiB7IGl0LnJvdyB9LnRoZW5CeSB7IGl0LmNvbCB9KVxuICAgIH1cblxuICAgIGVudW0gY2xhc3MgRGlyZWN0aW9uIHtcbi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gLT4ge1xuICAgICAgICAgICAgICAgICAgICB2YWwgbmNvbEFjdHVhbCA9IG1pbihuY29sLCB0aWxlc0NvdW50KVxuICAgICAgICAgICAgICAgICAgICB2YWwgbnJvd0FjdHVhbCA9IGNlaWwodGlsZXNDb3VudC50b0RvdWJsZSgpIC8gbmNvbEFjdHVhbCkudG9JbnQoKVxuICAgICAgICAgICAgICAgICAgICBuY29sQWN0dWFsIHRvIG1heCgxLCBucm93QWN0dWFsKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBucm93ICE9IG51bGwgLT4ge1xuICAgICAgICAgICAgICAgICAgICB2YWwgbnJvd0FjdHVhbCA9IG1pbihucm93LCB0aWxlc0NvdW50KVxuICAgICAgICAgICAgICAgICAgICB2YWwgbmNvbEFjdHVhbCA9IGNlaWwodGlsZXNDb3VudC50b0RvdWJsZSgpIC8gbnJvd0FjdHVhbCkudG9JbnQoKVxuICAgICAgICAgICAgICAgICAgICBuY29sQWN0dWFsIHRvIG1heCgxLCBucm93QWN0dWFsKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIC0+IHtcbiAgICAgICAgICAgICAgICAgICAgdmFsIHcgPSBtaW4oNCwgbWF4KDEsIHRpbGVzQ291bnQgLyAyKSlcbiAgICAgICAgICAgICAgICAgICAgdmFsIGggPSBtYXgoMSwgY2VpbCh0aWxlc0NvdW50LnRvRG91YmxlKCkgLyB3KS50b0ludCgpKVxuICAgICAgICAgICAgICAgICAgICB3IHRvIGhcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhbCAodywgaCkgPSBzaGFwZVxuICAgICAgICAgICAgcmV0dXJuIHdoZW4gKGRpcikge1xuICAgICAgICAgICAgICAgIERpcmVjdGlvbi5IIC0+IHtcbiAgICAgICAgICAgICAgICAgICAgLy8gZmlsbGluZyBieSByb3dzXG4gICAgICAgICAgICAgICAgICAgIFBhaXIoXG4gICAgICAgICAgICAgICAgICAgICAgICB3LFxuICAgICAgICAgICAgICAgICAgICAgICAgY2VpbCh0aWxlc0NvdW50LnRvRG91YmxlKCkgLyB3KS50b0ludCgpXG4gICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgRGlyZWN0aW9uLlYgLT4ge1xuICAgICAgICAgICAgICAgICAgICAvLyBmaWxsaW5nIGJ5IGNvbHNcbiAgICAgICAgICAgICAgICAgICAgUGFpcihcbiAgICAgICAgICAgICAgICAgICAgICAgIGNlaWwodGlsZXNDb3VudC50b0RvdWJsZSgpIC8gaCkudG9JbnQoKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGhcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbn1cbiIsIi8qXG4gKiBDb3B5cmlnaHQgKGMpIDIwMjAuIEpldEJyYWlucyBzLnIuby5cbiAqIFVzZSBvZiB0aGlzIHNvdXJjZSBjb2RlIGlzIGdvdmVybmVkIGJ5IHRoZSBNSVQgbGljZW5zZSB0aGF0IGNhbiBiZSBmb3VuZCBpbiB0aGUgTElDRU5TRSBmaWxlLlxuICovXG5cbnBhY2thZ2UgamV0YnJhaW5zLmRhdGFsb3JlLnBsb3QuYnVpbGRlci5hc3NlbWJsZS5nZW9tXG5cbmltcG9ydCBqZXRicmFpbnMuZGF0YWxvcmUucGxvdC5iYXNlLkFlc1xuaW1wb3J0IGpldGJyYWlucy5kYXRhbG9yZS5wbG90LmJhc2UuR2VvbVxuaW1wb3J0IGpldGJyYWlucy5kYXRhbG9yZS5wbG90LmJhc2UuR2VvbUtpbmRcbmltcG9ydCBqZXRicmFpbnMuZGF0YWxvcmUucGxvdC5iYXNlLkdlb21NZXRhXG5pbXBvcnQgamV0YnJhaW5zLmRhdGFsb3JlLnBsb3QuYmFzZS5hZXMuQWVzdGhldGljc0RlZmF1bHRzXG5pbXBvcnQ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YW4sXG4gICAgICAgIHByaXZhdGUgdmFsIG15R2VvbVN1cHBsaWVyOiAoKSAtPiBHZW9tXG4gICAgKSB7XG4gICAgICAgIGludGVybmFsIGZ1biBidWlsZCgpOiBHZW9tUHJvdmlkZXIge1xuICAgICAgICAgICAgcmV0dXJuIG9iamVjdCA6IEdlb21Qcm92aWRlcihteUtpbmQpIHtcblxuICAgICAgICAgICAgICAgIG92ZXJyaWRlIGZ1biBjcmVhdGVHZW9tKCk6IEdlb20ge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbXlHZW9tU3VwcGxpZXIoKVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIG92ZXJyaWRlIGZ1biBhZXN0aGV0aWNzRGVmYXVsdHMoKTogQWVzdGhldGljc0RlZmF1bHRzIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG15QWVzdGhldGljc0RlZmF1bHRzXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgb3ZlcnJpZGUgZnVuIGhhbmRsZXNHcm91cHMoKTogQm9vbGVhbiB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBteUhhbmRsZXNHcm91cHNcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBjb21wYW5pb24gb2JqZWN0IHtcblxuICAgICAgICBmdW4gcG9pbnQoKTogR2VvbVByb3ZpZGVyIHtcbiAgICAgICAgICAgIHJldHVybiBwb2ludCB7IFBvaW50R2VvbSgpIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBwb2ludChzdXBwbGllcjogKCkgLT4gR2VvbSk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5QT0lOVCxcbiAgICAgICAgICAgICAgICBBZXN0aGV0aWNzRGVmYXVsdHMucG9pbnQoKSxcbiAgICAgICAgICAgICAgICBQb2ludEdlb20uSEFORExFU19HUk9VUFMsXG4gICAgICAgICAgICAgICAgc3VwcGxpZXJcbiAgICAgICAgICAgICkuYnVpbGQoKVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIHBhdGgoKTogR2VvbVByb3ZpZGVyIHtcbiAgICAgICAgICAgIHJldHVybiBwYXRoIHsgUGF0aEdlb20oKSB9XG4gICAgICAgIH1cblxuICAgICAgICBmdW4gcGF0aChzdXBwbGllcjogKCkgLT4gR2VvbSk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5QQVRILFxuICAgICAgICAgICAgICAgIEFlc3RoZXRpY3NEZWZhdWx0cy5wYXRoKCksXG4gICAgICAgICAgICAgICAgUGF0aEdlb20uSEFORExFU19HUk9VUFMsXG4gICAgICAgICAgICAgICAgc3VwcGxpZXJcbiAgICAgICAgICAgICkuYnVpbGQoKVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIGxpbmUoKTogR2VvbVByb3ZpZGVyIHtcbiAgICAgICAgICAgIHJldHVybiBHZW9tUHJvdmlkZXJCdWlsZGVyKFxuICAgICAgICAgICAgICAgIEdlb21LaW5kLkxJTkUsXG4gICAgICAgICAgICAgICAgQWVzdGhldGljc0RlZmF1bHRzLmxpbmUoKSxcbiAgICAgICAgICAgICAgICBMaW5lR2VvbS5IQU5ETEVTX0dST1VQU1xuICAgICAgICAgICAgKSB7IExpbmVHZW9tKCkgfS5idWlsZCgpXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gc21vb3RoKCk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5TTU9PVEgsXG4gICAgICAgICAgICAgICAgQWVzdGhldGljc0RlZmF1bHRzLnNtb290aCgpLFxuICAgICAgICAgICAgICAgIFNtb290aEdlb20uSEFORExFU19HUk9VUFNcbiAgICAgICAgICAgICkgeyBTbW9vdGhHZW9tKCkgfS5idWlsZCgpXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gYmFyKCk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5CQVIsXG4gICAgICAgICAgICAgICAgQWVzdGhldGljc0RlZmF1bHRzLmJhcigpLFxuICAgICAgICAgICAgICAgIEJhckdlb20uSEFORExFU19HUk9VUFNcbiAgICAgICAgICAgICkgeyBCYXJHZW9tKCkgfS5idWlsZCgpXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gaGlzdG9ncmFtKCk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5ISVNUT0dSQU0sXG4gICAgICAgICAgICAgICAgQWVzdGhldGljc0RlZmF1bHRzLmhpc3RvZ3JhbSgpLFxuICAgICAgICAgICAgICAgIEhpc3RvZ3JhbUdlb20uSEFORExFU19HUk9VUFNcbiAgICAgICAgICAgICkgeyBIaXN0b2dyYW1HZW9tKCkgfS5idWlsZCgpXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gZG90cGxvdChzdXBwbGllcjogKCkgLT4gR2VvbSk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5ET1RfUExPVCxcbiAgICAgICAgICAgICAgICBBZXN0aGV0aWNzRGVmYXVsdHMuZG90cGxvdCgpLFxuICAgICAgICAgICAgICAgIERvdHBsb3RHZW9tLkhBTkRMRVNfR1JPVVBTLFxuICAgICAgICAgICAgICAgIHN1cHBsaWVyXG4gICAgICAgICAgICApLmJ1aWxkKClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biB0aWxlKCk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5USUxFLFxuICAgICAgICAgICAgICAgIEFlc3RoZXRpY3NEZWZhdWx0cy50aWxlKCksXG4gICAgICAgICAgICAgICAgVGlsZUdlb20uSEFORExFU19HUk9VUFNcbiAgICAgICAgICAgICkgeyBUaWxlR2VvbSgpIH0uYnVpbGQoKVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIGJpbjJkKCk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5CSU5fMkQsXG4gICAgICAgICAgICAgICAgQWVzdGhldGljc0RlZmF1bHRzLmJpbjJkKCksXG4gICAgICAgICAgICAgICAgQmluMmRHZW9tLkhBTkRMRVNfR1JPVVBTXG4gICAgICAgICAgICApIHsgQmluMmRHZW9tKCkgfS5idWlsZCgpXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gZXJyb3JCYXIoKTogR2VvbVByb3ZpZGVyIHtcbiAgICAgICAgICAgIHJldHVybiBHZW9tUHJvdmlkZXJCdWlsZGVyKFxuICAgICAgICAgICAgICAgIEdlb21LaW5kLkVSUk9SX0JBUixcbiAgICAgICAgICAgICAgICBBZXN0aGV0aWNzRGVmYXVsdHMuZXJyb3JCYXIoKSxcbiAgICAgICAgICAgICAgICBFcnJvckJhckdlb20uSEFORExFU19HUk9VUFNcbiAgICAgICAgICAgICkgeyBFcnJvckJhckdlb20oKSB9LmJ1aWxkKClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBjcm9zc0JhcihzdXBwbGllcjogKCkgLT4gR2VvbSk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5DUk9TU19CQVIsXG4gICAgICAgICAgICAgICAgQWVzdGhldGljc0RlZmF1bHRzLmNyb3NzQmFyKCksXG4gICAgICAgICAgICAgICAgQ3Jvc3NCYXJHZW9tLkhBTkRMRVNfR1JPVVBTLFxuICAgICAgICAgICAgICAgIHN1cHBsaWVyXG4gICAgICAgICAgICApLmJ1aWxkKClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBsaW5lUmFuZ2UoKTogR2VvbVByb3ZpZGVyIHtcbiAgICAgICAgICAgIHJldHVybiBHZW9tUHJvdmlkZXJCdWlsZGVyKFxuICAgICAgICAgICAgICAgIEdlb21LaW5kLkxJTkVfUkFOR0UsXG4gICAgICAgICAgICAgICAgQWVzdGhldGljc0RlZmF1bHRzLmxpbmVSYW5nZSgpLFxuICAgICAgICAgICAgICAgIExpbmVSYW5nZUdlb20uSEFORExFU19HUk9VUFNcbiAgICAgICAgICAgICkgeyBMaW5lUmFuZ2VHZW9tKCkgfS5idWlsZCgpXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gcG9pbnRSYW5nZShzdXBwbGllcjogKCkgLT4gR2VvbSk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5QT0lOVF9SQU5HRSxcbiAgICAgICAgICAgICAgICBBZXN0aGV0aWNzRGVmYXVsdHMucG9pbnRSYW5nZSgpLFxuICAgICAgICAgICAgICAgIFBvaW50UmFuZ2VHZW9tLkhBTkRMRVNfR1JPVVBTLFxuICAgICAgICAgICAgICAgIHN1cHBsaWVyXG4gICAgICAgICAgICApLmJ1aWxkKClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBjb250b3VyKCk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5DT05UT1VSLFxuICAgICAgICAgICAgICAgIEFlc3RoZXRpY3NEZWZhdWx0cy5jb250b3VyKCksXG4gICAgICAgICAgICAgICAgQ29udG91ckdlb20uSEFORExFU19HUk9VUFNcbiAgICAgICAgICAgICkgeyBDb250b3VyR2VvbSgpIH0uYnVpbGQoKVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIGNvbnRvdXJmKCk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5DT05UT1VSRixcbiAgICAgICAgICAgICAgICBBZXN0aGV0aWNzRGVmYXVsdHMuY29udG91cmYoKSxcbiAgICAgICAgICAgICAgICBDb250b3VyZkdlb20uSEFORExFU19HUk9VUFNcbiAgICAgICAgICAgICkgeyBDb250b3VyZkdlb20oKSB9LmJ1aWxkKClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBwb2x5Z29uKCk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5QT0xZR09OLFxuICAgICAgICAgICAgICAgIEFlc3RoZXRpY3NEZWZhdWx0cy5wb2x5Z29uKCksXG4gICAgICAgICAgICAgICAgUG9seWdvbkdlb20uSEFORExFU19HUk9VUFNcbiAgICAgICAgICAgICkgeyBQb2x5Z29uR2VvbSgpIH0uYnVpbGQoKVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIG1hcCgpOiBHZW9tUHJvdmlkZXIge1xuICAgICAgICAgICAgcmV0dXJuIEdlb21Qcm92aWRlckJ1aWxkZXIoXG4gICAgICAgICAgICAgICAgR2VvbUtpbmQuTUFQLFxuICAgICAgICAgICAgICAgIEFlc3RoZXRpY3NEZWZhdWx0cy5tYXAoKSxcbiAgICAgICAgICAgICAgICBNYXBHZW9tLkhBTkRMRVNfR1JPVVBTXG4gICAgICAgICAgICApIHsgTWFwR2VvbSgpIH0uYnVpbGQoKVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIGFibGluZSgpOiBHZW9tUHJvdmlkZXIge1xuICAgICAgICAgICAgcmV0dXJuIEdlb21Qcm92aWRlckJ1aWxkZXIoXG4gICAgICAgICAgICAgICAgR2VvbUtpbmQuQUJfTElORSxcbiAgICAgICAgICAgICAgICBBZXN0aGV0aWNzRGVmYXVsdHMuYWJsaW5lKCksXG4gICAgICAgICAgICAgICAgQUJMaW5lR2VvbS5IQU5ETEVTX0dST1VQU1xuICAgICAgICAgICAgKSB7IEFCTGluZUdlb20oKSB9LmJ1aWxkKClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBobGluZSgpOiBHZW9tUHJvdmlkZXIge1xuICAgICAgICAgICAgcmV0dXJuIEdlb21Qcm92aWRlckJ1aWxkZXIoXG4gICAgICAgICAgICAgICAgR2VvbUtpbmQuSF9MSU5FLFxuICAgICAgICAgICAgICAgIEFlc3RoZXRpY3NEZWZhdWx0cy5obGluZSgpLFxuICAgICAgICAgICAgICAgIEhMaW5lR2VvbS5IQU5ETEVTX0dST1VQU1xuICAgICAgICAgICAgKSB7IEhMaW5lR2VvbSgpIH0uYnVpbGQoKVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIHZsaW5lKCk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5WX0xJTkUsXG4gICAgICAgICAgICAgICAgQWVzdGhldGljc0RlZmF1bHRzLnZsaW5lKCksXG4gICAgICAgICAgICAgICAgVkxpbmVHZW9tLkhBTkRMRVNfR1JPVVBTXG4gICAgICAgICAgICApIHsgVkxpbmVHZW9tKCkgfS5idWlsZCgpXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gYm94cGxvdChzdXBwbGllcjogKCkgLT4gR2VvbSk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5CT1hfUExPVCxcbiAgICAgICAgICAgICAgICBBZXN0aGV0aWNzRGVmYXVsdHMuYm94cGxvdCgpLFxuICAgICAgICAgICAgICAgIEJveHBsb3RHZW9tLkhBTkRMRVNfR1JPVVBTLFxuICAgICAgICAgICAgICAgIHN1cHBsaWVyXG4gICAgICAgICAgICApLmJ1aWxkKClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBhcmVhcmlkZ2VzKHN1cHBsaWVyOiAoKSAtPiBHZW9tKTogR2VvbVByb3ZpZGVyIHtcbiAgICAgICAgICAgIHJldHVybiBHZW9tUHJvdmlkZXJCdWlsZGVyKFxuICAgICAgICAgICAgICAgIEdlb21LaW5kLkFSRUFfUklER0VTLFxuICAgICAgICAgICAgICAgIEFlc3RoZXRpY3NEZWZhdWx0cy5hcmVhUmlkZ2VzKCksXG4gICAgICAgICAgICAgICAgQXJlYVJpZGdlc0dlb20uSEFORExFU19HUk9VUFMsXG4gICAgICAgICAgICAgICAgc3VwcGxpZXJcbiAgICAgICAgICAgICkuYnVpbGQoKVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIHZpb2xpbihzdXBwbGllcjogKCkgLT4gR2VvbSk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5WSU9MSU4sXG4gICAgICAgICAgICAgICAgQWVzdGhldGljc0RlZmF1bHRzLnZpb2xpbigpLFxuICAgICAgICAgICAgICAgIFZpb2xpbkdlb20uSEFORExFU19HUk9VUFMsXG4gICAgICAgICAgICAgICAgc3VwcGxpZXJcbiAgICAgICAgICAgICkuYnVpbGQoKVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIHlkb3RwbG90KHN1cHBsaWVyOiAoKSAtPiBHZW9tKTogR2VvbVByb3ZpZGVyIHtcbiAgICAgICAgICAgIHJldHVybiBHZW9tUHJvdmlkZXJCdWlsZGVyKFxuICAgICAgICAgICAgICAgIEdlb21LaW5kLllfRE9UX1BMT1QsXG4gICAgICAgICAgICAgICAgQWVzdGhldGljc0RlZmF1bHRzLnlkb3RwbG90KCksXG4gICAgICAgICAgICAgICAgWURvdHBsb3RHZW9tLkhBTkRMRVNfR1JPVVBTLFxuICAgICAgICAgICAgICAgIHN1cHBsaWVyXG4gICAgICAgICAgICApLmJ1aWxkKClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBsaXZlbWFwKCk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5MSVZFX01BUCxcbiAgICAgICAgICAgICAgICBBZXN0aGV0aWNzRGVmYXVsdHMubGl2ZW1hcCgpLFxuICAgICAgICAgICAgICAgIExpdmVNYXBHZW9tLkhBTkRMRVNfR1JPVVBTLFxuICAgICAgICAgICAgKSB7IExpdmVNYXBHZW9tKCkgfS5idWlsZCgpXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gcmliYm9uKCk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5SSUJCT04sXG4gICAgICAgICAgICAgICAgQWVzdGhldGljc0RlZmF1bHRzLnJpYmJvbigpLFxuICAgICAgICAgICAgICAgIFJpYmJvbkdlb20uSEFORExFU19HUk9VUFNcbiAgICAgICAgICAgICkgeyBSaWJib25HZW9tKCkgfS5idWlsZCgpXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gYXJlYSgpOiBHZW9tUHJvdmlkZXIge1xuICAgICAgICAgICAgcmV0dXJuIEdlb21Qcm92aWRlckJ1aWxkZXIoXG4gICAgICAgICAgICAgICAgR2VvbUtpbmQuQVJFQSxcbiAgICAgICAgICAgICAgICBBZXN0aGV0aWNzRGVmYXVsdHMuYXJlYSgpLFxuICAgICAgICAgICAgICAgIEFyZWFHZW9tLkhBTkRMRVNfR1JPVVBTXG4gICAgICAgICAgICApIHsgQXJlYUdlb20oKSB9LmJ1aWxkKClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBkZW5zaXR5KCk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5ERU5TSVRZLFxuICAgICAgICAgICAgICAgIEFlc3RoZXRpY3NEZWZhdWx0cy5kZW5zaXR5KCksXG4gICAgICAgICAgICAgICAgRGVuc2l0eUdlb20uSEFORExFU19HUk9VUFNcbiAgICAgICAgICAgICkgeyBEZW5zaXR5R2VvbSgpIH0uYnVpbGQoKVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIGRlbnNpdHkyZCgpOiBHZW9tUHJvdmlkZXIge1xuICAgICAgICAgICAgcmV0dXJuIEdlb21Qcm92aWRlckJ1aWxkZXIoXG4gICAgICAgICAgICAgICAgR2VvbUtpbmQuREVOU0lUWTJELFxuICAgICAgICAgICAgICAgIEFlc3RoZXRpY3NEZWZhdWx0cy5kZW5zaXR5MmQoKSxcbiAgICAgICAgICAgICAgICBEZW5zaXR5MmRHZW9tLkhBTkRMRVNfR1JPVVBTXG4gICAgICAgICAgICApIHsgRGVuc2l0eTJkR2VvbSgpIH0uYnVpbGQoKVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIGRlbnNpdHkyZGYoKTogR2VvbVByb3ZpZGVyIHtcbiAgICAgICAgICAgIHJldHVybiBHZW9tUHJvdmlkZXJCdWlsZGVyKFxuICAgICAgICAgICAgICAgIEdlb21LaW5kLkRFTlNJVFkyREYsXG4gICAgICAgICAgICAgICAgQWVzdGhldGljc0RlZmF1bHRzLmRlbnNpdHkyZGYoKSxcbiAgICAgICAgICAgICAgICBEZW5zaXR5MmRmR2VvbS5IQU5ETEVTX0dST1VQU1xuICAgICAgICAgICAgKSB7IERlbnNpdHkyZGZHZW9tKCkgfS5idWlsZCgpXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gaml0dGVyKCk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5KSVRURVIsXG4gICAgICAgICAgICAgICAgQWVzdGhldGljc0RlZmF1bHRzLmppdHRlcigpLFxuICAgICAgICAgICAgICAgIEppdHRlckdlb20uSEFORExFU19HUk9VUFNcbiAgICAgICAgICAgICkgeyBKaXR0ZXJHZW9tKCkgfS5idWlsZCgpXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gcXEoKTogR2VvbVByb3ZpZGVyIHtcbiAgICAgICAgICAgIHJldHVybiBHZW9tUHJvdmlkZXJCdWlsZGVyKFxuICAgICAgICAgICAgICAgIEdlb21LaW5kLlFfUSxcbiAgICAgICAgICAgICAgICBBZXN0aGV0aWNzRGVmYXVsdHMucXEoKSxcbiAgICAgICAgICAgICAgICBRUUdlb20uSEFORExFU19HUk9VUFNcbiAgICAgICAgICAgICkgeyBRUUdlb20oKSB9LmJ1aWxkKClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBxcTIoKTogR2VvbVByb3ZpZGVyIHtcbiAgICAgICAgICAgIHJldHVybiBHZW9tUHJvdmlkZXJCdWlsZGVyKFxuICAgICAgICAgICAgICAgIEdlb21LaW5kLlFfUV8yLFxuICAgICAgICAgICAgICAgIEFlc3RoZXRpY3NEZWZhdWx0cy5xcTIoKSxcbiAgICAgICAgICAgICAgICBRUTJHZW9tLkhBTkRMRVNfR1JPVVBTXG4gICAgICAgICAgICApIHsgUVEyR2VvbSgpIH0uYnVpbGQoKVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIHFxbGluZSgpOiBHZW9tUHJvdmlkZXIge1xuICAgICAgICAgICAgcmV0dXJuIEdlb21Qcm92aWRlckJ1aWxkZXIoXG4gICAgICAgICAgICAgICAgR2VvbUtpbmQuUV9RX0xJTkUsXG4gICAgICAgICAgICAgICAgQWVzdGhldGljc0RlZmF1bHRzLnFxX2xpbmUoKSxcbiAgICAgICAgICAgICAgICBRUUxpbmVHZW9tLkhBTkRMRVNfR1JPVVBTXG4gICAgICAgICAgICApIHsgUVFMaW5lR2VvbSgpIH0uYnVpbGQoKVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIHFxMmxpbmUoKTogR2VvbVByb3ZpZGVyIHtcbiAgICAgICAgICAgIHJldHVybiBHZW9tUHJvdmlkZXJCdWlsZGVyKFxuICAgICAgICAgICAgICAgIEdlb21LaW5kLlFfUV8yX0xJTkUsXG4gICAgICAgICAgICAgICAgQWVzdGhldGljc0RlZmF1bHRzLnFxMl9saW5lKCksXG4gICAgICAgICAgICAgICAgUVEyTGluZUdlb20uSEFORExFU19HUk9VUFNcbiAgICAgICAgICAgICkgeyBRUTJMaW5lR2VvbSgpIH0uYnVpbGQoKVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIGZyZXFwb2x5KCk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5GUkVRUE9MWSxcbiAgICAgICAgICAgICAgICBBZXN0aGV0aWNzRGVmYXVsdHMuZnJlcXBvbHkoKSxcbiAgICAgICAgICAgICAgICBGcmVxcG9seUdlb20uSEFORExFU19HUk9VUFNcbiAgICAgICAgICAgICkgeyBGcmVxcG9seUdlb20oKSB9LmJ1aWxkKClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBzdGVwKHN1cHBsaWVyOiAoKSAtPiBHZW9tKTogR2VvbVByb3ZpZGVyIHtcbiAgICAgICAgICAgIHJldHVybiBHZW9tUHJvdmlkZXJCdWlsZGVyKFxuICAgICAgICAgICAgICAgIEdlb21LaW5kLlNURVAsXG4gICAgICAgICAgICAgICAgQWVzdGhldGljc0RlZmF1bHRzLnN0ZXAoKSxcbiAgICAgICAgICAgICAgICBTdGVwR2VvbS5IQU5ETEVTX0dST1VQUyxcbiAgICAgICAgICAgICAgICBzdXBwbGllclxuICAgICAgICAgICAgKS5idWlsZCgpXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gcmVjdCgpOiBHZW9tUHJvdmlkZXIge1xuICAgICAgICAgICAgcmV0dXJuIEdlb21Qcm92aWRlckJ1aWxkZXIoXG4gICAgICAgICAgICAgICAgR2VvbUtpbmQuUkVDVCxcbiAgICAgICAgICAgICAgICBBZXN0aGV0aWNzRGVmYXVsdHMucmVjdCgpLFxuICAgICAgICAgICAgICAgIFJlY3RHZW9tLkhBTkRMRVNfR1JPVVBTXG4gICAgICAgICAgICApIHsgUmVjdEdlb20oKSB9LmJ1aWxkKClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBzZWdtZW50KHN1cHBsaWVyOiAoKSAtPiBHZW9tKTogR2VvbVByb3ZpZGVyIHtcbiAgICAgICAgICAgIHJldHVybiBHZW9tUHJvdmlkZXJCdWlsZGVyKFxuICAgICAgICAgICAgICAgIEdlb21LaW5kLlNFR01FTlQsXG4gICAgICAgICAgICAgICAgQWVzdGhldGljc0RlZmF1bHRzLnNlZ21lbnQoKSxcbiAgICAgICAgICAgICAgICBTZWdtZW50R2VvbS5IQU5ETEVTX0dST1VQUyxcbiAgICAgICAgICAgICAgICBzdXBwbGllclxuICAgICAgICAgICAgKS5idWlsZCgpXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gdGV4dChzdXBwbGllcjogKCkgLT4gR2VvbSk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5URVhULFxuICAgICAgICAgICAgICAgIEFlc3RoZXRpY3NEZWZhdWx0cy50ZXh0KCksXG4gICAgICAgICAgICAgICAgVGV4dEdlb20uSEFORExFU19HUk9VUFMsXG4gICAgICAgICAgICAgICAgc3VwcGxpZXJcbiAgICAgICAgICAgICkuYnVpbGQoKVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIGxhYmVsKHN1cHBsaWVyOiAoKSAtPiBHZW9tKTogR2VvbVByb3ZpZGVyIHtcbiAgICAgICAgICAgIHJldHVybiBHZW9tUHJvdmlkZXJCdWlsZGVyKFxuICAgICAgICAgICAgICAgIEdlb21LaW5kLkxBQkVMLFxuICAgICAgICAgICAgICAgIEFlc3RoZXRpY3NEZWZhdWx0cy5sYWJlbCgpLFxuICAgICAgICAgICAgICAgIFRleHRHZW9tLkhBTkRMRVNfR1JPVVBTLFxuICAgICAgICAgICAgICAgIHN1cHBsaWVyXG4gICAgICAgICAgICApLmJ1aWxkKClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biByYXN0ZXIoKTogR2VvbVByb3ZpZGVyIHtcbiAgICAgICAgICAgIHJldHVybiBHZW9tUHJvdmlkZXJCdWlsZGVyKFxuICAgICAgICAgICAgICAgIEdlb21LaW5kLlJBU1RFUixcbiAgICAgICAgICAgICAgICBBZXN0aGV0aWNzRGVmYXVsdHMucmFzdGVyKCksXG4gICAgICAgICAgICAgICAgUmFzdGVyR2VvbS5IQU5ETEVTX0dST1VQU1xuICAgICAgICAgICAgKSB7IFJhc3Rlckdlb20oKSB9LmJ1aWxkKClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBpbWFnZShzdXBwbGllcjogKCkgLT4gR2VvbSk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5JTUFHRSxcbiAgICAgICAgICAgICAgICBBZXN0aGV0aWNzRGVmYXVsdHMuaW1hZ2UoKSxcbiAgICAgICAgICAgICAgICBJbWFnZU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vbWFpblJhdGlvID0gZG9tYWluUmF0aW8gLyByYXRpb1xuICAgICAgICByZXR1cm4gcmVzaGFwZUdlb20oZ2VvbVNpemUsIGVmZmVjdGl2ZURvbWFpblJhdGlvKVxuICAgIH1cblxuXG4gICAgY29tcGFuaW9uIG9iamVjdCB7XG5cbiAgICAgICAgZnVuIHJlc2hhcGVHZW9tKFxuICAgICAgICAgICAgZ2VvbVNpemU6IERvdWJsZVZlY3RvcixcbiAgICAgICAgICAgIHRhcmdldFdpZHRoVG9IZWlnaHRSYXRpbzogRG91YmxlXG4gICAgICAgICk6IERvdWJsZVZlY3RvciB7XG4gICAgICAgICAgICB2YWwgZ2VvbVJhdGlvID0gZ2VvbVNpemUueCAvIGdlb21TaXplLnlcbiAgICAgICAgICAgIHZhbCBuZXdTaXplID0gaWYgKHRhcmdldFdpZHRoVG9IZWlnaHRSYXRpbyA+IGdlb21SYXRpbykge1xuICAgICAgICAgICAgICAgIC8vIGFkanVzdCBnZW9tIGhlaWdodFxuICAgICAgICAgICAgICAgIHZhbCBoID0gZ2VvbVNpemUueCAvIHRhcmdldFdpZHRoVG9IZWlnaHRSYXRpb1xuICAgICAgICAgICAgICAgIERvdWJsZVZlY3RvcihnZW9tU2l6ZS54LCBoKVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAvLyBhZGp1c3QgZ2VvbSB3aWR0aFxuICAgICAgICAgICAgICAgIHZhbCB3ID0gZ2VvbVNpemUueSAqIHRhcmdldFdpZHRoVG9IZWlnaHRSYXRpb1xuLy8gICAgICAgICAgICAgICAgdmFsIGhEZWx0YSA9IGdlb21TaXplLnggLSB3XG4gICAgICAgICAgICAgICAgRG91YmxlVmVjdG9yKHcsIGdlb21TaXplLnkpXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBuZXdTaXplXG4gICAgICAgIH1cbiAgICB9XG59XG4iLCIvKlxuICogQ29weXJpZ2h0IChjKSAyMDIwLiBKZXRCcmFpbnM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4gICAgb3ZlcnJpZGUgZnVuIGFkanVzdEdlb21TaXplKFxuICAgICAgICBoRG9tYWluOiBEb3VibGVTcGFuLFxuICAgICAgICB2RG9tYWluOiBEb3VibGVTcGFuLFxuICAgICAgICBnZW9tU2l6ZTogRG91YmxlVmVjdG9yXG4gICAgKTogRG91YmxlVmVjdG9yIHtcbiAgICAgICAgLy8gQWRqdXN0IGdlb20gZGltZW5zaW9ucyByYXRpby5cbiAgICAgICAgdmFsIGJib3ggPSBib3VuZGluZ0JveChcbiAgICAgICAgICAgIGxpc3RPZihcbiAgICAgICAgICAgICAgICBEb3VibGVWZWN0b3IoaERvbWFpbi5sb3dlckVuZCwgdkRvbWFpbi5sb3dlckVuZCksXG4gICAgICAgICAgICAgICAgRG91YmxlVmVjdG9yKGhEb21haW4ubG93ZXJFbmQsIHZEb21haW4udXBwZXJFbmQpLFxuICAgICAgICAgICAgICAgIERvdWJsZVZlY3RvcihoRG9tYWluLnVwcGVyRW5kLCB2RG9tYWluLmxvd2VyRW5kKSxcbiAgICAgICAgICAgICAgICBEb3VibGVWZWN0b3IoaERvbWFpbi51cHBlckVuZCwgdkRvbWFpbi51cHBlckVuZClcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAubWFwIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGZsaXBwZWQpIGl0LmZsaXAoKSBlbHNlIGl0XG4gICAgICAgICAgICAgICAgfS5tYXBOb3ROdWxsKHByb2plY3Rpb246OnByb2plY3QpXG4gICAgICAgICAgICAgICAgLm1hcCB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChmbGlwcGVkKSBpdC5mbGlwKCkgZWxzZSBpdFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgKSA/OiBlcnJvcihcImFkanVzdEdlb21TaXplKCkgLSBjYW4ndCBjb21wdXRlIGJib3hcIilcblxuICAgICAgICB2YWwgZG9tYWluUmF0aW8gPSBiYm94LndpZHRoIC8gYmJveC5oZWlnaHRcbiAgICAgICA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hdGEuU2VyaWVzVXRpbC5waWNrQXRJbmRpY2VzXG5cbm9iamVjdCBEYXRhUHJvY2Vzc2luZyB7XG5cbiAgICBmdW4gdHJhbnNmb3JtT3JpZ2luYWxzKFxuICAgICAgICBkYXRhOiBEYXRhRnJhbWUsXG4gICAgICAgIGJpbmRpbmdzOiBMaXN0PFZhckJpbmRpbmc+LFxuICAgICAgICB0cmFuc2Zvcm1CeUFlczogTWFwPEFlczwqPiwgVHJhbnNmb3JtPlxuICAgICk6IERhdGFGcmFtZSB7XG4gICAgICAgIEBTdXBwcmVzcyhcIk5BTUVfU0hBRE9XSU5HXCIpXG4gICAgICAgIHZhciBkYXRhID0gZGF0YVxuICAgICAgICBmb3IgKGJpbmRpbmcgaW4gYmluZGluZ3MpIHtcbiAgICAgICAgICAgIHZhbCB2YXJpYWJsZSA9IGJpbmRpbmcudmFyaWFibGVcbiAgICAgICAgICAgIGlmICh2YXJpYWJsZS5pc09yaWdpbikge1xuICAgICAgICAgICAgICAgIGRhdGEuYXNzZXJ0RGVmaW5lZCh2YXJpYWJsZSlcbiAgICAgICAgICAgICAgICBkYXRhID0gRGF0YUZyYW1lVXRpbC5hcHBseVRyYW5zZm9ybShcbiAgICAgICAgICAgICAgICAgICAgZGF0YSxcbiAgICAgICAgICAgICAgICAgICAgdmFyaWFibGUsXG4gICAgICAgICAgICAgICAgICAgIGJpbmRpbmcuYWVzLFxuICAgICAgICAgICAgICAgICAgICB0cmFuc2Zvcm1CeUFlcy5nZXRWYWx1ZShiaW5kaW5nLmFlcylcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gZGF0YVxuICAgIH1cblxuICAgIC8qKlxuICAgICAqIEJhY2tlbmQtc2lkZSBvbmx5XG4gICAgICovXG4gICAgZnVuIGJ1aWxkU3RhdERhdGEoXG4gICAgICAgIHN0YXRJbnB1dDogU3RhdElucHV0LFxuICAgICAgICBzdGF0OiBTdGF0LFxuICAgICAgICBncm91cGluZ0NvbnRleHQ6IEdyb3VwaW5nQ29udGV4dCxcbiAgICAgICAgZmFjZXRWYXJpYWJsZXM6IExpc3Q8VmFyaWFibGU+LFxuICAgICAgICB2YXJzV2l0aG91dEJpbmRpbmc6IExpc3Q8U3RyaW5nPixcbiAgICAgICAgb3JkZXJPcHRpb25zOiBMaXN0PE9yZGVyT3B0aW9uVXRpbC5PcmRlck9wdGlvbj4sXG4gICAgICAgIGFnZ3JlZ2F0ZU9wZXJhdGlvbjogKChMaXN0PERvdWJsZT8+KSAtPiBEb3VibGU/KT8sXG4gICAgICAgIG1lc3NhZ2VDb25zdW1lcjogQ29uc3VtZXI8U3RyaW5nPlxuICAgICk6IERhdGFBbmRHcm91cGluZ0NvbnRleHQge1xuICAgICAgICBjaGVjayhzdGF0ICE9IFN0YXRzLklERU5USVRZKVxuXG4gICAgICAgIHZhbCBncm91cHMgPSBncm91cGluZ0NvbnRleHQuZ3JvdXBNYXBwZXJcblxuICAgICAgICB2YWwgcmVzdWx0U2VyaWVzOiBNYXA8VmFyaWFibGUsIExpc3Q8QW55Pz4+XG4gICAgICAgIHZhbCBncm91cFNpemVMaXN0QWZ0ZXJTdGF0OiBMaXN0PEludD5cblxuICAgICAgICAvLyBpZiBvbmx5IG9uZSBncm91cCBubyBuZWVkIHRvIG1vZGlmeVxuICAgICAgICBpZiAoZ3JvdXBzID09PSBHcm91cFV0aWwuU0lOR0xFX0dST1VQKSB7XG4gICAgICAgICAgICB2YWwgc3RhdERhdGEgPSBhcHBseVN0YXQoXG4gICAgICAgICAgICAgICAgc3RhdElucHV0LmRhdGEsXG4gICAgICAgICAgICAgICAgc3RhdCxcbiAgICAgICAgICAgICAgICBzdGF0SW5wdXQuYmluZGluZ3MsXG4gICAgICAgICAgICAgICAgc3RhdElucHV0LnRyYW5zZm9ybUJ5QWVzLFxuICAgICAgICAgICAgICAgIGZhY2V0VmFyaWFibGVzLFxuICAgICAgICAgICAgICAgIHN0YXRJbnB1dC5zdGF0Q3R4LFxuICAgICAgICAgICAgICAgIHZhcnNXaXRob3V0QmluZGluZyxcbiAgICAgICAgICAgICAgICBtZXNzYWdlQ29uc3VtZXJcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGdyb3VwU2l6ZUxpc3RBZnRlclN0YXQgPSBsaXN0T2Yoc3RhdERhdGEucm93Q291bnQoKSlcbiAgICAgICAgICAgIHJlc3VsdFNlcmllcyA9IHN0YXREYXRhLnZhcmlhYmxlcygpLmFzc29jaWF0ZVdpdGggeyB2YXJpYWJsZSAtPiBzdGF0RGF0YVt2YXJpYWJsZV0gfVxuICAgICAgICB9IGVsc2UgeyAvLyBhZGQgb2Zmc2V0IHRvIGVhY2ggZ3JvdXBcbiAgICAgICAgICAgIHZhbCBncm91cE1lcmdlciA9IEdyb3VwTWVyZ2VyKClcbiAgICAgICAgICAgIHZhciBsYXN0U3RhdEdyb3VwRW5kID0gLTFcbiAgICAgICAgICAgIGZvciAoZCBpbiBzcGxpdEJ5R3JvdXAoc3RhdElucHV0LmRhdGEsIGdyb3VwcykpIHtcbiAgICAgICAgICAgICAgICB2YXIgc3RhdERhdGEgPSBhcHBseVN0YXQoXG4gICAgICAgICAgICAgICAgICAgIGQsXG4gICAgICAgICAgICAgICAgICAgIHN0YXQsXG4gICAgICAgICAgICAgICAgICAgIHN0YXRJbnB1dC5iaW5kaW5ncyxcbiAgICAgICAgICAgICAgICAgICAgc3RhdElucHV0LnRyYW5zZm9ybUJ5QWVzLFxuICAgICAgICAgICAgICAgICAgICBmYWNldFZhcmlhYmxlcyxcbiAgICAgICAgICAgICAgICAgICAgc3RhdElucHV0LnN0YXRDdHgsXG4gICAgICAgICAgICAgICAgICAgIHZhcnNXaXRob3V0QmluZGluZyxcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZUNvbnN1bWVyXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIGlmIChzdGF0RGF0YS5pc0VtcHR5KSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGdyb3VwTWVyZ2VyLmluaXRPcmRlclNwZWNzKG9yZGVyT3B0aW9ucywgc3RhdERhdGEudmFyaWFibGVzKCksIHN0YXRJbnB1dC5iaW5kaW5ncywgYWdncmVnYXRlT3BlcmF0aW9uKVxuXG4gICAgICAgICAgICAgICAgdmFsIGN1ckdyb3VwU2l6ZUFmdGVyU3RhdCA9IHN0YXREYXRhLnJvd0NvdW50KClcblxuICAgICAgICAgICAgICAgIC8vIHVwZGF0ZSAnc3RhdCBncm91cCcgdG8gYXZvaWQgY29sbGlzaW9ucyBhcyBzdGF0IGlzIGFwcGxpZWQgaW5kZXBlbmRlbnRseSB0byBlYWNoIG9yaWdpbmFsIGRhdGEgZ3JvdXBcbiAgICAgICAgICAgICAgICBpZiAoc3RhdERhdGEuaGFzKFN0YXRzLkdST1VQKSkge1xuICAgICAgICAgICAgICAgICAgICB2YWwgcmFuZ2UgPSBzdGF0RGF0YS5yYW5nZShTdGF0cy5HUk9VUClcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJhbmdlICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbCBzdGFydCA9IGxhc3RTdGF0R3JvdXBFbmQgKyAxXG4gICAgICAgICAgICAgICAgICAgICAgICB2YWwgb2Zmc2V0ID0gc3RhcnQgLSByYW5nZS5sb3dlckVuZC50b0ludCgpXG4gICAgICAgICAgICAgICAgICAgICAgICBsYXN0U3RhdEdyb3VwRW5kID0gcmFuZ2UudXBwZXJFbmQudG9JbnQoKSArIG9mZnNldFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG9mZnNldCAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsIG5ld0cgPSBBcnJheUxpc3Q8RG91YmxlPigpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChnIGluIHN0YXREYXRhLmdldE51bWVyaWMoU3RhdHMuR1JPVVApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0cuYWRkKGchISArIG9mZnNldClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdERhdGEgPSBzdGF0RGF0YS5idWlsZGVyKCkucHV0TnVtZXJpYyhTdGF0cy5HUk9VUCwgbmV3RykuYnVpbGQoKVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gSWYgc3RhdCBoYXMgLi5ncm91cC4uIHRoZW4gZ3JvdXBpbmdWYXIgd29uJ3QgYmUgY2hlY2tlZCwgc28gbm8gbmVlZCB0byB1cGRhdGUuXG4gICAgICAgICAgICAgICAgICAgIHZhbCBncm91cGluZ1ZhciA9IGdyb3VwaW5nQ29udGV4dC5vcHRpb25hbEdyb3VwaW5nVmFyXG4gICAgICAgICAgICAgICAgICAgIGlmIChncm91cGluZ1ZhciAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YWwgc2l6ZSA9IHN0YXREYXRhW3N0YXREYXRhLnZhcmlhYmxlcygpLmZpcnN0KCldLnNpemVcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbCB2ID0gZFtncm91cGluZ1Zhcl1bMF1cbiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXREYXRhID0gc3RhdERhdGEuYnVpbGRlcigpLnB1dChncm91cGluZ1ZhciwgTGlzdChzaXplKSB7IHYgfSkuYnVpbGQoKVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gQWRkIGdyb3VwJ3MgZGF0YVxuICAgICAgICAgICAgICAgIGdyb3VwTWVyZ2VyLmFkZEdyb3VwKHN0YXREYXRhLCBjdXJHcm91cFNpemVBZnRl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ICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIExpc3Qoc3RhdERhdGFTaXplKSB7IHZhbHVlIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHZhbCBuZXdJbnB1dFNlcmllcyA9IEhhc2hNYXA8VmFyaWFibGUsIExpc3Q8QW55Pz4+KClcbiAgICAgICAgZm9yIChiaW5kaW5nIGluIGJpbmRpbmdzKSB7XG4gICAgICAgICAgICB2YWwgdmFyaWFibGUgPSBiaW5kaW5nLnZhcmlhYmxlXG4gICAgICAgICAgICBpZiAodmFyaWFibGUuaXNTdGF0IHx8IGZhY2V0VmFyaWFibGVzLmNvbnRhaW5zKHZhcmlhYmxlKSkge1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhbCBhZXMgPSBiaW5kaW5nLmFlc1xuICAgICAgICAgICAgaWYgKHN0YXQuaGFzRGVmYXVsdE1hcHBpbmcoYWVzKSkge1xuICAgICAgICAgICAgICAgIHZhbCBkZWZhdWx0U3RhdFZhciA9IHN0YXQuZ2V0RGVmYXVsdE1hcHBpbmcoYWVzKVxuICAgICAgICAgICAgICAgIG5ld0lucHV0U2VyaWVzW3ZhcmlhYmxlXSA9IHN0YXREYXRhLmdldChkZWZhdWx0U3RhdFZhcilcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgLy8gRG8gbm90IG92ZXJyaWRlIHNlcmllcyBvYnRhaW5lZCB2aWEgJ2RlZmF1bHQgc3RhdCB2YXInXG4gICAgICAgICAgICAgICAgaWYgKCFuZXdJbnB1dFNlcmllcy5jb250YWluc0tleSh2YXJpYWJsZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgbmV3SW5wdXRTZXJpZXNbdmFyaWFibGVdID0gbmV3U2VyaWVGb3JWYXJpYWJsZSh2YXJpYWJsZSlcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICA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9PSBncm91cHMuc2l6ZSkge1xuICAgICAgICAgICAgICAgIFwiRGF0YSBzZXJpZXMgdXNlZCB0byBjb21wdXRlIGdyb3VwcyBtdXN0IGJlIGVxdWFsIGluIHNpemUgKGVuY291bnRlcmVkIHNpemVzOiBcIiArXG4gICAgICAgICAgICAgICAgICAgICAgICBcIiR7Y3VycmVudEdyb3Vwcz8uc2l6ZX0sICR7Z3JvdXBzLnNpemV9IClcIlxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFsIGR1bW1pZXMgPSBjb21wdXRlRHVtbXlWYWx1ZXMoY3VycmVudEdyb3VwcywgZ3JvdXBzKVxuICAgICAgICAgICAgY3VycmVudEdyb3VwcyA9IGNvbXB1dGVHcm91cHMoZHVtbWllcylcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBpZiAoY3VycmVudEdyb3VwcyAhPSBudWxsKSB7XG4gICAgICAgICAgICBHcm91cFV0aWwud3JhcChjdXJyZW50R3JvdXBzKVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgR3JvdXBVdGlsLlNJTkdMRV9HUk9VUFxuICAgICAgICB9XG4gICAgfVxuXG4gICAgcHJpdmF0ZSBmdW4gY29tcHV0ZUdyb3Vwcyh2YWx1ZXM6IExpc3Q8Kj4pOiBMaXN0PEludD4ge1xuICAgICAgICB2YWwgZ3JvdXBzID0gQXJyYXlMaXN0PEludD4oKVxuICAgICAgICB2YWwgZ3JvdXBCeVZhbCA9IEhhc2hNYXA8QW55PywgSW50PigpXG4gICAgICAgIHZhciBjb3VudCA9IDBcbiAgICAgICAgZm9yICh2IGluIHZhbHVlcykge1xuICAgICAgICAgICAgaWYgKCFncm91cEJ5VmFsLmNvbnRhaW5zS2V5KHYpKSB7XG4gICAgICAgICAgICAgICAgZ3JvdXBCeVZhbFt2XSA9IGNvdW50KytcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGdyb3Vwcy5hZGQoZ3JvdXBCeVZhbC5nZXQodikhISlcbiAg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mxlTGlzdDxBbnk/Pj4oKVxuICAgICAgICBteU9yZGVyZWRHcm91cHMuZm9yRWFjaCB7IGdyb3VwIC0+XG4gICAgICAgICAgICBncm91cC5kZi52YXJpYWJsZXMoKS5mb3JFYWNoIHsgdmFyaWFibGUgLT5cbiAgICAgICAgICAgICAgICByZXN1bHRTZXJpZXMuZ2V0T3JQdXQodmFyaWFibGUsIDo6QXJyYXlMaXN0KS5hZGRBbGwoZ3JvdXAuZGZbdmFyaWFibGVdKVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiByZXN1bHRTZXJpZXNcbiAgICB9XG5cbiAgICBmdW4gZ2V0R3JvdXBTaXplcygpOiBMaXN0PEludD4ge1xuICAgICAgICByZXR1cm4gbXlPcmRlcmVkR3JvdXBzLm1hcChHcm91cDo6Z3JvdXBTaXplKVxuICAgIH1cblxuICAgIGlubmVyIGNsYXNzIEdyb3VwKFxuICAgICAgICB2YWwgZGY6IERhdGFGcmFtZSxcbiAgICAgICAgdmFsIGdyb3VwU2l6ZTogSW50XG4gICAgKSA6IENvbXBhcmFibGU8R3JvdXA+IHtcbiAgICAgICAgb3ZlcnJpZGUgZnVuIGNvbXBhcmVUbyhvdGhlcjogR3JvdXApOiBJbnQge1xuICAgICAgICAgICAgZnVuIGNvbXBhcmVHcm91cFZhbHVlKHYxOiBBbnk/LCB2MjogQW55PywgZGlyOiBJbnQpOiBJbnQge1xuICAgICAgICAgICAgICAgIC8vIG51bGwgdmFsdWUgaXMgYWx3YXlzIGdyZWF0ZXIgLSB3aWxsIGJlIGF0IHRoZSBlbmQgb2YgdGhlIHJlc3VsdFxuICAgICAgICAgICAgICAgIGlmICh2MSA9PSBudWxsICYmIHYyID09IG51bGwgKSByZXR1cm4gMFxuICAgICAgICAgICAgICAgIGlmICh2MSA9PSBudWxsKSByZXR1cm4gMVxuICAgICAgICAgICAgICAgIGlmICh2MiA9PSBudWxsKSByZXR1cm4gLTFcbiAgICAgICAgICAgICAgICByZXR1cm4gY29tcGFyZVZhbHVlcyh2MSBhcyBDb21wYXJhYmxlPCo+LCB2MiBhcyBDb21wYXJhYmxlPCo+KSAqIGRpclxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuIGdldFZhbHVlKFxuICAgICAgICAgICAgICAgIGRmOiBEYXRhRnJhbWUsXG4gICAgICAgICAgICAgICAgdmFyaWFibGU6IERhdGFGcmFtZS5WYXJpYWJsZSxcbiAgICAgICAgICAgICAgICBhZ2dyZWdhdGVPcGVyYXRpb246ICgoTGlzdDxEb3VibGU/PikgLT4gRG91YmxlPyk/ID0gbnVsbFxuICAgICAgICAgICAgKTogQW55PyB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGlmIChhZ2dyZWdhdGVPcGVyYXRpb24gIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICByZXF1aXJlKGRmLmlzTnVtZXJpYyh2YXJpYWJsZSkpIHsgXCJDYW4ndCBhcHBseSBhZ2dyZWdhdGUgb3BlcmF0aW9uIHRvIG5vbi1udW1lcmljIHZhbHVlc1wiIH1cbiAgICAgICAgICAgICAgICAgICAgYWdncmVnYXRlT3BlcmF0aW9uLmludm9rZShkZi5nZXROdW1lcmljKHZhcmlhYmxlKS5yZXF1aXJlTm9OdWxscygpKVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIGdyb3VwIGhhcyBubyBtb3JlIHRoYW4gb25lIHVuaXF1ZSBlbGVtZW50XG4gICAgICAgICAgICAgICAgICAgIGRmW3ZhcmlhYmxlXS5maXJzdE9yTnVsbCgpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBteU9yZGVyU3BlY3M/LmZvckVhY2ggeyBzcGVjIC0+XG4gICAgICAgICAgICAgICAgdmFyIGNtcCA9IGNvbXBhcmVHcm91cFZhbHVlKFxuICAgICAgICAgICAgICAgICAgICBnZXRWYWx1ZShkZiwgc3BlYy5vcmRlckJ5LCBzcGVjLmFnZ3JlZ2F0ZU9wZXJhdGlvbiksXG4gICAgICAgICAgICAgICAgICAgIGdldFZhbHVlKG90aGVyLmRmLCBzcGVjLm9yZGVyQnksIHNwZWMuYWdncmVnYXRlT3BlcmF0aW9uKSxcbiAgICAgICAgICAgICAgICAgICAgc3BlYy5kaXJlY3Rpb25cbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgaWYgKGNtcCA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIGVuc3VyZSB0aGUgb3JkZXIgYXMgaW4gdGhlIGxlZ2VuZFxuICAgICAgICAgICAgICAgICAgICBjbXAgPSBjb21wYXJlR3JvdXBWYWx1ZShcbiAgICAgICAgICAgICAgICAgICAgICAgIGdldFZhbHVlKGRmLCBzcGVjLnZhcmlhYmxlKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGdldFZhbHVlKG90aGVyLmRmLCBzcGVjLnZhcmlhYmxlKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHNwZWMuZGlyZWN0aW9uXG4gICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGNtcCAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBjbXBcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gMFxuICAgICAgICB9XG4gICAgfVxuXG4gICAgZnVuIGFkZEdyb3VwKGQ6IERhdGFGcmFtZSwgZ3JvdXBTaXplOiBJbnQpIHtcbiAgICAgICAgdmFsIGdyb3VwID0gR3JvdXAoZCwgZ3JvdXBTaXplKVxuICAgICAgICB2YWwgaW5kZXhUb0luc2VydCA9IGZpbmRJbmRleFRvSW5zZXJ0KGdyb3VwKVxuICAgICAgICBteU9yZGVyZWRHcm91cHMuYWRkKGluZGV4VG9JbnNlcnQsIGdyb3VwKVxuICAgIH1cblxuICAgIHByaXZhdGUgZnV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uYWxHcm91cGluZ1ZhcikgKyBkZWZhdWx0R3JvdXBpbmdWYXJpYWJsZXMpLnRvTGlzdCgpXG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBwcml2YXRlIHZhciBfZ3JvdXBNYXBwZXI6ICgoSW50KSAtPiBJbnQpPyA9IG51bGxcblxuICAgIHZhbCBncm91cE1hcHBlcjogKEludCkgLT4gSW50XG4gICAgICAgIGdldCgpIHtcbiAgICAgICAgICAgIGlmIChfZ3JvdXBNYXBwZXIgPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIF9ncm91cE1hcHBlciA9IGNvbXB1dGVHcm91cHMoKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIF9ncm91cE1hcHBlciEhXG4gICAgICAgIH1cblxuICAgIHByaXZhdGUgZnVuIGNvbXB1dGVHcm91cHMoKTogKEludCkgLT4gSW50IHtcbiAgICAgICAgaWYgKGRhdGEucm93Q291bnQoKSA9PSAwKSByZXR1cm4gR3JvdXBVdGlsLlNJTkdMRV9HUk9VUFxuICAgICAgICBpZiAoZGF0YS5oYXMoU3RhdHMuR1JPVVApKSB7XG4gICAgICAgICAgICB2YWwgbGlzdCA9IGRhdGEuZ2V0TnVtZXJpYyhTdGF0cy5HUk9VUClcbiAgICAgICAgICAgIHJldHVybiBHcm91cFV0aWwud3JhcChsaXN0KVxuICAgICAgICB9IGVsc2UgaWYgKGdyb3VwU2l6ZUxpc3QgIT0gbnVsbCkge1xuICAgICAgICAgICAgaWYgKGdyb3VwU2l6ZUxpc3Quc2l6ZSA9PSBkYXRhLnJvd0NvdW50KCkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gR3JvdXBVdGlsLlNJTkdMRV9HUk9VUFxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB2YWwgZ3JvdXBCeVBvaW50SW5kZXggPVxuICAgICAgICAgICAgICAgICAgICB0b0luZGV4TWFwKGdyb3VwU2l6ZUxpc3QpXG4gICAgICAgICAgICAgICAgcmV0dXJuIEdyb3VwVXRpbC53cmFwKGdyb3VwQnlQb2ludEluZGV4KVxuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKGV4cGVjdE11bHRpcGxlKSB7XG4gICAgICAgICAgICByZXR1cm4gRGF0YVByb2Nlc3NpbmcuY29tcHV0ZUdyb3VwcyhcbiAgICAgICAgICAgICAgICBkYXRhLFxuICAgICAgICAgICAgICAgIGdyb3VwaW5nVmFyaWFibGVzXG4gICAgICAgICAgICApXG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIEdyb3VwVXRpbC5TSU5HTEVfR1JPVVBcbiAgICB9XG5cbiAgICBjb21wYW5pb24gb2JqZWN0IHtcbiAgICAgICAgaW50ZXJuYWwgZnVuIHdpdGhPcmRlcmVkR3JvdXBzKGRhdGE6IERhdGFGcmFtZSwgZ3JvdXBTaXplTGlzdDogTGlzdDxJbnQ+KTogR3JvdXBpbmdDb250ZXh0IHtcbiAgICAgICAgICAgIHZhbCBncm91cGluZ1ZhcmlhYmxlcyA9IERhdGFQcm9jZXNzaW5nLmRlZmF1bHRHcm91cGluZ1ZhcmlhYmxlcyhcbiAgICAgICAgICAgICAgICBkYXRhLFxuICAgICAgICAgICAgICAgIGJpbmRpbmdzID0gZW1wdHlMaXN0KCksXG4gICAgICAgICAgICAgICAgcGF0aElkVmFyTmFtZSA9IG51bGxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIHJldHVybiBHcm91cGluZ0NvbnRleHQoXG4gICAgICAgICAgICAgICAgZGF0YSxcbiAgICAgICAgICAgICAgICBncm91cGluZ1ZhcmlhYmxlcyxcbiAgICAgICAgICAgICAgICBleHBsaWNpdEdyb3VwaW5nVmFyTmFtZSA9IG51bGwsXG4gICAgICAgICAgICAgICAgZXhwZWN0TXVsdGlwbGUgPSBmYWxzZSxcbiAgICAgICAgICAgICAgICBncm91cFNpemVMaXN0ID0gQXJyYXlMaXN0KGdyb3VwU2l6ZUxpc3QpXG4gICAgICAgICAgICApXG4gICAgICAgIH1cblxuICAgICAgICBwcml2YXRlIGZ1biB0b0luZGV4TWFwKGdyb3VwU2l6ZUxpc3Q6IExpc3Q8SW50Pik6IE1hcDxJbnQsIEludD4ge1xuICAgICAgICAgICAgdmFsIHJlc3VsdCA9IEhhc2hNYXA8SW50LCBJbnQ+KClcbiAgICAgICAgICAgIHZhciBjdXJyZW50R3JvdXAgPSAwXG4gICAgICAgICAgICB2YXIgY3VycmVudEdyb3VwSW5kZXhPZmZzZXQgPSAwXG4gICAgICAgICAgICBmb3IgKGdyb3VwU2l6ZSBpbiBncm91cFNpemVMaXN0KSB7XG4gICAgICAgICAgICAgICAgZm9yIChpIGluIDAgdW50aWwgZ3JvdXBTaXplKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdFtjdXJyZW50R3JvdXBJbmRleE9mZnNldCArIGldID0gY3VycmVudEdyb3VwXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGN1cnJlbnRHcm91cCsrXG4gICAgICAgICAgICAgICAgY3VycmVudEdyb3VwSW5kZXhPZmZzZXQgKz0gZ3JvdXBTaXplXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gcmVzdWx0XG4gICAgICAgIH1cblxuICAgICAgICBwcml2YXRlIGZ1biBnZXRHcm91cGluZ1ZhcmlhYmxlcyhcbiAgICAgICAgICAgIGRhdGE6IERhdGFGcmFtZSxcbiAgICAgICAgICAgIGJpbmRpbmdzOiBMaXN0PFZhckJpbmRpbmc+LFxuICAgICAgICAgICAgZXhwbGljaXRHcm91cGluZ1ZhcjogVmFyaWFibGU/XG4gICAgICAgICk6IEl0ZXJhYmxlPFZhcmlhYmxlPiB7XG5cbiAgICAgICAgICAgIC8vIGFsbCAnb3JpZ2luJyBkaXNjcmV0ZSB2YXJzIChidXQgbm90IHBvc2l0aW9uYWwpICsgZXhwbGljaXRHcm91cGluZ1ZhclxuICAgICAgICAgICAgdmFsIHJlc3VsdCA9IExpbmtlZEhhc2hTZXQ8VmFyaWFibGU+KClcbiAgICAgICAgICAgIGZvciAoYmluZGluZyBpbiBiaW5kaW5ncykge1xuICAgICAgICAgICAgICAgIHZhbCB2YXJpYWJsZSA9IGJpbmRpbmcudmFyaWFibGVcbiAgICAgICAgICAgICAgICBpZiAoIXJlc3VsdC5jb250YWlucyh2YXJpYWJsZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHZhcmlhYmxlLmlzT3JpZ2luKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodmFyaWFibGUgPT0gZXhwbGljaXRHcm91cGluZ1ZhciB8fCBpc0RlZmF1bHRHcm91cGluZ1ZhcmlhYmxlKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaW5kaW5nLmFlcyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyaWFibGVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQuYWRkKHZhcmlhYmxlKVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHJlc3VsdFxuICAgICAgICB9XG5cbiAgICAgICAgcHJpdmF0ZSBmdW4gaXNEZWZhdWx0R3JvdXBpbmdWYXJpYWJsZShcbiAgICAgICAgICAgIGRhdGE6IERhdGFGcmFtZSxcbiAgICAgICAgICAgIGFlczogQWVzPCo+LFxuICAgICAgICAgICAgdmFyaWFibGU6IFZhcmlhYmxlXG4gICAgICAgICkgPSAhKEFlcy5pc1Bvc2l0aW9uYWwoYWVzKSB8fCBkYXRhLmlzTnVtZXJpYyh2YXJpYWJsZSkpXG4gICAgfVxufVxuIiwiLypcbi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R1cm4gZmFsc2VcblxuICAgICAgICAgICAgb3RoZXIgYXMgT3JkZXJPcHRpb25cblxuICAgICAgICAgICAgaWYgKHZhcmlhYmxlTmFtZSAhPSBvdGhlci52YXJpYWJsZU5hbWUpIHJldHVybiBmYWxzZVxuICAgICAgICAgICAgaWYgKGJ5VmFyaWFibGUgIT0gb3RoZXIuYnlWYXJpYWJsZSkgcmV0dXJuIGZhbHNlXG4gICAgICAgICAgICBpZiAob3JkZXJEaXIgIT0gb3RoZXIub3JkZXJEaXIpIHJldHVybiBmYWxzZVxuXG4gICAgICAgICAgICByZXR1cm4gdHJ1ZVxuICAgICAgICB9XG5cbiAgICAgICAgb3ZlcnJpZGUgZnVuIGhhc2hDb2RlKCk6IEludCB7XG4gICAgICAgICAgICB2YXIgcmVzdWx0ID0gdmFyaWFibGVOYW1lLmhhc2hDb2RlKClcbiAgICAgICAgICAgIHJlc3VsdCA9IDMxICogcmVzdWx0ICsgKGJ5VmFyaWFibGU/Lmhhc2hDb2RlKCkgPzogMClcbiAgICAgICAgICAgIHJlc3VsdCA9IDMxICogcmVzdWx0ICsgKG9yZGVyRGlyID86IDApXG4gICAgICAgICAgICByZXR1cm4gcmVzdWx0XG4gICAgICAgIH1cblxuICAgICAgICBvdmVycmlkZSBmdW4gdG9TdHJpbmcoKTogU3RyaW5nIHtcbiAgICAgICAgICAgIHJldHVybiBcIk9yZGVyT3B0aW9uKHZhcmlhYmxlTmFtZT0nJHZhcmlhYmxlTmFtZScsIGJ5VmFyaWFibGU9JGJ5VmFyaWFibGUsIG9yZGVyRGlyPSRvcmRlckRpcilcIlxuICAgICAgICB9XG5cblxuICAgICAgICBjb21wYW5pb24gb2JqZWN0IHtcbiAgICAgICAgICAgIGZ1biBjcmVhdGUoXG4gICAgICAgICAgICAgICAgdmFyaWFibGVOYW1lOiBTdHJpbmcsXG4gICAgICAgICAgICAgICAgb3JkZXJCeTogU3RyaW5nPyxcbiAgICAgICAgICAgICAgICBvcmRlcjogQW55P1xuICAgICAgICAgICAgKTogT3JkZXJPcHRpb24/IHtcbiAgICAgICAgICAgICAgICBpZiAob3JkZXJCeSA9PSBudWxsICYmIG9yZGVyID09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGxcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmVxdWlyZShvcmRlciA9PSBudWxsIHx8IChvcmRlciBpcyBOdW1iZXIgJiYgb3JkZXIudG9JbnQoKSBpbiBsaXN0T2YoLTEsIDEpKSkge1xuICAgICAgICAgICAgICAgICAgICBcIlVuc3VwcG9ydGVkIGBvcmRlcmAgdmFsdWU6ICRvcmRlci4gVXNlIDEgKGFzY2VuZGluZykgb3IgLTEgKGRlc2NlbmRpbmcpLlwiXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgcmV0dXJuIE9yZGVyT3B0aW9uKHZhcmlhYmxlTmFtZSwgb3JkZXJCeSwgKG9yZGVyIGFzPyBOdW1iZXIpPy50b0ludCgpKVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBmdW4gT3JkZXJPcHRpb24ubWVyZ2VXaXRoKG90aGVyOiBPcmRlck9wdGlvbik6IE9yZGVyT3B0aW9uIHtcbiAgICAgICAgICAgICAgICByZXF1aXJlKHZhcmlhYmxlTmFtZSA9PSBvdGhlci52YXJpYWJsZU5hbWUpIHtcbiAgICAgICAgICAgICAgICAgICAgXCJDYW4ndCBtZXJnZSBvcmRlciBvcHRpb25zIGZvciBkaWZmZXJlbnQgdmFyaWFibGVzOiAnJHZhcmlhYmxlTmFtZScgYW5kICcke290aGVyLnZhcmlhYmxlTmFtZX0nXCJcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmVxdWlyZShieVZhcmlhYmxlID09IG51bGwgfHwgb3RoZXIuYnlWYXJpYWJsZSA9PSBudWxsIHx8IG90aGVyLmJ5VmFyaWFibGUgPT0gYnlWYXJpYWJsZSkge1xuICAgICAgICAgICAgICAgICAgICBcIk11bHRpcGxlIG9yZGVyaW5nIG9wdGlvbnMgZm9yIHRoZSB2YXJpYWJsZSAnJHZhcmlhYmxlTmFtZScgd2l0aCBkaWZmZXJlbnQgbm9uLWVtcHR5ICdvcmRlcl9ieScgZmllbGRzOiAnJGJ5VmFyaWFibGUnIGFuZCAnJHtvdGhlci5ieVZhcmlhYmxlfSdcIlxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXF1aXJlKG9yZGVyRGlyID09IG51bGwgfHwgb3RoZXIub3JkZXJEaXIgPT0gbnVsbCB8fCBvdGhlci5vcmRlckRpciA9PSBvcmRlckRpcikge1xuICAgICAgICAgICAgICAgICAgICBcIk11bHRpcGxlIG9yZGVyaW5nIG9wdGlvbnMgZm9yIHRoZSB2YXJpYWJsZSAnJHZhcmlhYmxlTmFtZScgd2l0aCBkaWZmZXJlbnQgb3JkZXIgZGlyZWN0aW9uOiAnJG9yZGVyRGlyJyBhbmQgJyR7b3RoZXIub3JkZXJEaXJ9J1wiXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBPcmRlck9wdGlvbihcbiAgICAgICAgICAgICAgICAgICAgdmFyaWFibGVOYW1lLFxuICAgICAgICAgICAgICAgICAgICBieVZhcmlhYmxlID86IG90aGVyLmJ5VmFyaWFibGUsXG4gICAgICAgICAgICAgICAgICAgIG9yZGVyRGlyID86IG90aGVyLm9yZGVyRGlyXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgZnVuIGNyZWF0ZU9yZGVyU3BlYyhcbiAgICAgICAgdmFyaWFibGVzOiBTZXQ8RGF0YUZyYW1lLlZhcmlhYmxlPixcbiAgICAgICAgdmFyQmluZGluZ3M6IExpc3Q8VmFyQmluZGluZz4sXG4gICAgICAgIG9yZGVyT3B0aW9uOiBPcmRlck9wdGlvbixcbiAgICAgICAgYWdncmVnYXRlT3BlcmF0aW9uOiAo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AgICBpZiAodmFsdWUgaXMgTWFwPCosICo+KSB7XG4gICAgICAgICAgICAgICAgdmFsIHVwZGF0ZWQgPSB2YWx1ZS50b011dGFibGVNYXAoKVxuICAgICAgICAgICAgICAgIGlmIChrZXkgaW4gRUxFTV9UT19VUERBVEVfQ09MT1IpIHtcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlZFtFbGVtLkNPTE9SXSA9IGNob29zZU5ld0NvbG9yKGtleSwgdmFsdWVbRWxlbS5DT0xPUl0sIGlzRmlsbENvbG9yID0gZmFsc2UpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChrZXkgaW4gRUxFTV9UT19VUERBVEVfRklMTCkge1xuICAgICAgICAgICAgICAgICAgICB1cGRhdGVkW0VsZW0uRklMTF0gPSBjaG9vc2VOZXdDb2xvcihrZXksIHZhbHVlW0VsZW0uRklMTF0sIGlzRmlsbENvbG9yID0gdHJ1ZSlcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGtleSA9PSBUaGVtZU9wdGlvbi5UT09MVElQX1JFQ1QpIHtcbiAgICAgICAgICAgICAgICAgICAgc3BlY2lhbENvbG9yc1trZXldPy5nZXQoRWxlbS5GSUxMKT8ubGV0IHsgdXBkYXRlZFtFbGVtLkZJTExdID0gaXQgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB1cGRhdGVkXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHZhbHVlXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBjb21wYW5pb24gb2JqZWN0IHtcbiAgICAgICAgcHJpdmF0ZSB2YWwgRUxFTV9UT19VUERBVEVfQ09MT1IgPSBsaXN0T2YoXG4gICAgICAgICAgICBUaGVtZU9wdGlvbi5MSU5FLFxuICAgICAgICAgICAgVGhlbWVPcHRpb24uUkVDVCxcblxuICAgICAgICAgICAgVGhlbWVPcHRpb24uUEFOR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gICAgICAgICAgICAgICAgICBmaWxsID0gcGFyc2VIZXgoXCIjMzAzMDMwXCIpLFxuICAgICAgICAgICAgICAgICAgICBjb2xvciA9IHBhcnNlSGV4KFwiI0JCQkJCQlwiKSxcbiAgICAgICAgICAgICAgICAgICAgc3BlY2lhbENvbG9ycyA9IG1hcE9mKFxuICAgICAgICAgICAgICAgICAgICAgICAgVGhlbWVPcHRpb24uUEFORUxfQktHUl9SRUNUIHRvIG1hcE9mKEVsZW0uRklMTCB0byBwYXJzZUhleChcIiMzQjNCM0JcIikpLFxuICAgICAgICAgICAgICAgICAgICAgICAgVGhlbWVPcHRpb24uRkFDRVRfU1RSSVBfQkdSX1JFQ1QgdG8gbWFwT2YoRWxlbS5GSUxMIHRvIHBhcnNlSGV4KFwiIzM2MzYzNlwiKSksXG4gICAgICAgICAgICAgICAgICAgICAgICBUaGVtZU9wdGlvbi5QQU5FTF9HUklEIHRvIG1hcE9mKEVsZW0uQ09MT1IgdG8gcGFyc2VIZXgoXCIjNDc0NzQ3XCIpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIFRoZW1lT3B0aW9uLlRPT0xUSVBfUkVDVCB0byBtYXBPZihFbGVtLkZJTEwgdG8gcGFyc2VIZXgoXCIjMTQxNDE0XCIpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIFRoZW1lT3B0aW9uLkFYSVNfVE9PTFRJUCB0byBtYXBPZihFbGVtLkZJTEwgdG8gcGFyc2VIZXgoXCIjQkJCQkJCXCIpKSxcbiAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgVGhlbWVPcHRpb24uRmxhdm9yLlNPTEFSSVpFRF9MSUdIVCAtPiBUaGVtZUZsYXZvcihcbiAgICAgICAgICAgICAgICAgICAgZmlsbCA9IHBhcnNlSGV4KFwiI0ZERjZFM1wiKSxcbiAgICAgICAgICAgICAgICAgICAgY29sb3IgPSBwYXJzZUhleChcIiMyRTRFNThcIiksXG4gICAgICAgICAgICAgICAgICAgIHNwZWNpYWxDb2xvcnMgPSBtYXBPZihcbiAgICAgICAgICAgICAgICAgICAgICAgIFRoZW1lT3B0aW9uLlBBTkVMX0JLR1JfUkVDVCB0byBtYXBPZihFbGVtLkZJTEwgdG8gcGFyc2VIZXgoXCIjRUVFOEQ1XCIpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIFRoZW1lT3B0aW9uLkZBQ0VUX1NUUklQX0JHUl9SRUNUIHRvIG1hcE9mKEVsZW0uRklMTCB0byBwYXJzZUhleChcIiNFNkRGQ0FcIikpLFxuICAgICAgICAgICAgICAgICAgICAgICAgVGhlbWVPcHRpb24uUEFORUxfR1JJRCB0byBtYXBPZihFbGVtLkNPTE9SIHRvIHBhcnNlSGV4KFwiI0Q3RDRDQlwiKSksXG4gICAgICAgICAgICAgICAgICAgICAgICBUaGVtZU9wdGlvbi5UT09MVElQX1JFQ1QgdG8gbWFwT2YoRWxlbS5GSUxMIHRvIHBhcnNlSGV4KFwiI0ZFRkJGM1wiKSksXG4gICAgICAgICAgICAgICAgICAgICAgICBUaGVtZU9wdGlvbi5BWElTX1RPT0xUSVAgdG8gbWFwT2YoRWxlbS5GSUxMIHRvIHBhcnNlSGV4KFwiIzJFNEU1OFwiKSksXG4gICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIFRoZW1lT3B0aW9uLkZsYXZvci5TT0xBUklaRURfREFSSyAtPiBUaGVtZUZsYXZvcihcbiAgICAgICAgICAgICAgICAgICAgZmlsbCA9IHBhcnNlSGV4KFwiIzBFM0M0QVwiKSxcbiAgICAgICAgICAgICAgICAgICAgY29sb3IgPSBwYXJzZUhleChcIiNBN0I2QkFcIiksXG4gICAgICAgICAgICAgICAgICAgIHNwZWNpYWxDb2xvcnMgPSBtYXBPZihcbiAgICAgICAgICAgICAgICAgICAgICAgIFRoZW1lT3B0aW9uLlBBTkVMX0JLR1JfUkVDVCB0byBtYXBPZihF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MTCB0byBwYXJzZUhleChcIiNEOUQ5RDlcIikpLFxuICAgICAgICAgICAgICAgICAgICAgICAgVGhlbWVPcHRpb24uUEFORUxfR1JJRCB0byBtYXBPZihFbGVtLkNPTE9SIHRvIHBhcnNlSGV4KFwiI0U5RTlFOVwiKSksXG4gICAgICAgICAgICAgICAgICAgICAgICBUaGVtZU9wdGlvbi5UT09MVElQX1JFQ1QgdG8gbWFwT2YoRWxlbS5GSUxMIHRvIENvbG9yLldISVRFKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIFRoZW1lT3B0aW9uLkFYSVNfVE9PTFRJUCB0byBtYXBPZihFbGVtLkZJTEwgdG8gQ29sb3IuQkxBQ0spLFxuICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICBUaGVtZU9wdGlvbi5GbGF2b3IuSElHSF9DT05UUkFTVF9EQVJLIC0+IFRoZW1lRmxhdm9yKFxuICAgICAgICAgICAgICAgICAgICBmaWxsID0gQ29sb3IuQkxBQ0ssXG4gICAgICAgICAgICAgICAgICAgIGNvbG9yID0gQ29sb3IuV0hJVEUsXG4gICAgICAgICAgICAgICAgICAgIHNwZWNpYWxDb2xvcnMgPSBtYXBPZihcbiAgICAgICAgICAgICAgICAgICAgICAgIFRoZW1lT3B0aW9uLlBBTkVMX0JLR1JfUkVDVCB0byBtYXBPZihFbGVtLkZJTEwgdG8gcGFyc2VIZXgoXCIjM0IzQjNCXCIpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIFRoZW1lT3B0aW9uLkZBQ0VUX1NUUklQX0JHUl9SRUNUIHRvIG1hcE9mKEVsZW0uRklMTCB0byBwYXJzZUhleChcIiMzNjM2MzZcIikpLFxuICAgICAgICAgICAgICAgICAgICAgICAgVGhlbWVPcHRpb24uUEFORUxfR1JJRCB0byBtYXBPZihFbGVtLkNPTE9SIHRvIHBhcnNlSGV4KFwiIzQ3NDc0N1wiKSksXG4gICAgICAgICAgICAgICAgICAgIC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2YWwgc3BlY2lmaWNPcHRpb24gPSBrZXkuZmlyc3QoKVxuICAgICAgICBAU3VwcHJlc3MoXCJVTkNIRUNLRURfQ0FTVFwiKVxuICAgICAgICByZXR1cm4gbWVtLmdldE9yUHV0KHNwZWNpZmljT3B0aW9uKSB7XG4gICAgICAgICAgICByZXR1cm4ga2V5LmFzUmV2ZXJzZWQoKS5tYXAgeyB2YWx1ZXNbaXRdIH1cbiAgICAgICAgICAgICAgICAuZm9sZChIYXNoTWFwPFN0cmluZywgQW55PigpKSB7IGFjYywgdiAtPlxuICAgICAgICAgICAgICAgICAgICBpZiAodiAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhY2MucHV0QWxsKHYgYXMgTWFwPFN0cmluZywgQW55PilcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBhY2NcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgIH0gYXMgTWFwPFN0cmluZywgQW55PlxuICAgIH1cblxuICAgIHByb3RlY3RlZCBmdW4gaXNFbGVtQmxhbmsoa2V5OiBMaXN0PFN0cmluZz4pOiBCb29sZWFuIHtcbiAgICAgICAgdmFsIGJsYW5rVmFsdWUgPSBnZXRFbGVtVmFsdWUoa2V5KVtFbGVtLkJMQU5LXVxuICAgICAgICByZXR1cm4gYmxhbmtWYWx1ZSAhPSBudWxsICYmIGJsYW5rVmFsdWUgYXMgQm9vbGVhblxuICAgIH1cblxuICAgIHByb3RlY3RlZCBmdW4gZ2V0TnVtYmVyKGVsZW06IE1hcDxTdHJpbmcsIEFueT4sIGtleTogU3RyaW5nKTogRG91YmxlIHtcbiAgICAgICAgcmV0dXJuIChlbGVtLmdldFZhbHVlKGtleSkgYXMgTnVtYmVyKS50b0RvdWJsZSgpXG4gICAgfVxuXG4gICAgcHJvdGVjdGVkIGZ1biBnZXRDb2xvcihlbGVtOiBNYXA8U3RyaW5nLCBBbnk+LCBrZXk6IFN0cmluZyk6IENvbG9yIHtcbiAgICA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RPT0xUSVBfWCxcbiAgICAgICAgICAgIEFYSVNfVE9PTFRJUF9ZLFxuICAgICAgICAgICAgUEFORUxfQktHUl9SRUNULFxuICAgICAgICAgICAgUEFORUxfQk9SREVSX1JFQ1QsXG4gICAgICAgICAgICBQQU5FTF9HUklEX01BSk9SX1gsXG4gICAgICAgICAgICBQQU5FTF9HUklEX01JTk9SX1gsXG4gICAgICAgICAgICBQQU5FTF9HUklEX01BSk9SX1ksXG4gICAgICAgICAgICBQQU5FTF9HUklEX01JTk9SX1ksXG4gICAgICAgICAgICBGQUNFVF9TVFJJUF9CR1JfUkVDVCxcbiAgICAgICAgICAgIFRPT0xUSVBfUkVDVFxuICAgICAgICApXG5cbiAgICAgICAgLy8gQWN0dWFsbHksIHRleHQgc2l6ZXMgYXJlIGRlZmluZWQgaW4gXCJ0aGVtZSB2YWx1ZXNcIi5cbiAgICAgICAgdmFsIGVsZW1XaXRoQ29sb3JPbmx5ID0gbGlzdE9mKFxuICAgICAgICAgICAgUExPVF9USVRMRSxcbiAgICAgICAgICAgIFBMT1RfU1VCVElUTEUsXG4gICAgICAgICAgICBQTE9UX0NBUFRJT04sXG4gICAgICAgICAgICBBWElTX1RJVExFX1gsXG4gICAgICAgICAgICBBWElTX1RJVExFX1ksXG4gICAgICAgICAgICBBWElTX1RFWFRfWCxcbiAgICAgICAgICAgIEFYSVNfVEVYVF9ZLFxuICAgICAgICAgICAgQVhJU19UT09MVElQX1RFWFRfWCxcbiAgICAgICAgICAgIEFYSVNfVE9PTFRJUF9URVhUX1ksXG4gICAgICAgICAgICBGQUNFVF9TVFJJUF9URVhULFxuICAgICAgICAgICAgTEVHRU5EX1RFWFQsXG4gICAgICAgICAgICBMRUdFTkRfVElUTEUsXG4gICAgICAgICAgICBUT09MVElQX1RFWFQsXG4gICAgICAgICAgICBUT09MVElQX1RJVExFX1RFWFQsXG4gICAgICAgIClcbiAgICAgICAgdmFsIGVsZW1XaXRoRmlsbCA9IGxpc3RPZihcbiAgICAgICAgICAgIFBMT1RfQktHUl9SRUNULFxuICAgICAgICAgICAgTEVHRU5EX0JLR1JfUkVDVCxcbiAgICAgICAgICAgIEFYSVNfVE9PTFRJUF9YLFxuICAgICAgICAgICAgQVhJU19UT09MVElQX1ksXG4gICAgICAgICAgICBQQU5FTF9CS0dSX1JFQ1QsXG4gICAgICAgICAgICBGQUNFVF9TVFJJUF9CR1JfUkVDVCxcbiAgICAgICAgICAgIFRPT0xUSVBfUkVDVFxuICAgICAgICApXG4gICAgICAgIHZhbCBudW1lcmljT3B0aW9ucyA9IGxpc3RPZihcbiAgICAgICAgICAgIEFYSVNfVElDS1NfTEVOR1RIX1gsXG4gICAgICAgICAgICBBWElTX1RJQ0tTX0xFTkdUSF9ZLFxuICAgICAgICApXG5cbiAgICAgICAgLy8gIGZvbnRfZmFjZVxuICAgICAgICB2YWwgZWxlbVdpdGhGb250T3B0aW9ucyA9IGxpc3RPZihcbiAgICAgICAgICAgIFBMT1RfVElUTEUsXG4gICAgICAgICAgICBQTE9UX1NVQlRJVExFLFxuICAgICAgICAgICAgUExPVF9DQVBUSU9OLFxuICAgICAgICAgICAgQVhJU19USVRMRV9YLFxuICAgICAgICAgICAgQVhJU19USVRMRV9ZLFxuICAgICAgICAgICAgQVhJU19URVhUX1gsXG4gICAgICAgICAgICBBWElTX1RFWFRfWSxcbiAgICAgICAgICAgIEFYSVNfVE9PTFRJUF9URVhUX1gsXG4gICAgICAgICAgICBBWElTX1RPT0xUSVBfVEVYVF9ZLFxuICAgICAgICAgICAgRkFDRVRfU1RSSVBfVEVYVCxcbiAgICAgICAgICAgIExFR0VORF9URVhULFxuICAgICAgICAgICAgTEVHRU5EX1RJVExFLFxuICAgICAgICAgICAgVE9PTFRJUF9URVhULFxuICAgICAgICAgICAgVE9PTFRJUF9USVRMRV9URVhULFxuICAgICAgICApXG4gICAgfVxufSIsIi8qXG4gKiBDb3B5cmlnaHQgKGMpIDIwMjEuIEpldEJyYWlucyBzLnIuby5cbiAqIFVzZSBvZ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UgdmFsIFZBTFVFUzogTWFwPFN0cmluZywgQW55PiA9IG1hcE9mKFxuICAgICAgICAgICAgTElORSB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkNPTE9SIHRvIENvbG9yLkJMVUUsXG4gICAgICAgICAgICAgICAgRWxlbS5TSVpFIHRvIDEuMCxcbiAgICAgICAgICAgICksXG4gICAgICAgICAgICBSRUNUIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uQ09MT1IgdG8gQ29sb3IuQkxVRSxcbiAgICAgICAgICAgICAgICBFbGVtLkZJTEwgdG8gQ29sb3IuTElHSFRfQkxVRSxcbiAgICAgICAgICAgICAgICBFbGVtLlNJWkUgdG8gMS4wLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICAgIFRFWFQgdG8gbWFwT2YoXG4gICAgICAgICAgICAgICAgRWxlbS5DT0xPUiB0byBDb2xvci5CTFVFLFxuICAgICAgICAgICAgICAgIEVsZW0uU0laRSB0byBEZWZhdWx0cy5GT05UX1NNQUxMLFxuICAgICAgICAgICAgICAgIEVsZW0uRk9OVF9GQUNFIHRvIEZvbnRGYWNlLk5PUk1BTCxcbiAgICAgICAgICAgICAgICBFbGVtLkZPTlRfRkFNSUxZIHRvIERlZmF1bHRzLkZPTlRfRkFNSUxZX05PUk1BTCxcbi8vICAgICAgICAgICAgICAgIEVsZW0uRk9OVF9NT05PU1BBQ0VEIHRvIERlZmF1bHRzLkZPTlRfRkFNSUxZX05PUk1BTC5tb25vc3BhY2VkLFxuICAgICAgICAgICAgICAgIEVsZW0uSEpVU1QgdG8gMC4wLFxuICAgICAgICAgICAgICAgIEVsZW0uVkpVU1QgdG8gMC41LFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICAgIFRJVExFIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uU0laRSB0byBEZWZhdWx0cy5GT05UX01FRElVTSxcbiAgICAgICAgICAgICAgICBFbGVtLk1hcmdpbi5UT1AgdG8gNC4wLFxuICAgICAgICAgICAgICAgIEVsZW0uTWFyZ2luLlJJR0hUIHRvIDAuMCxcbiAgICAgICAgICAgICAgICBFbGVtLk1hcmdpbi5CT1RUT00gdG8gNC4wLFxuICAgICAgICAgICAgICAgIEVsZW0uTWFyZ2luLkxFRlQgdG8gMC4wXG4gICAgICAgICAgICApLFxuICAgICAgICAgICAgUExPVF9USVRMRSB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLlNJWkUgdG8gRGVmYXVsdHMuRk9OVF9MQVJHRVxuICAgICAgICAgICAgKSxcbiAgICAgICAgICAgIFBMT1RfU1VCVElUTEUgdG8gbWFwT2YoXG4gICAgICAgICAgICAgICAgRWxlbS5TSVpFIHRvIERlZmF1bHRzLkZPTlRfTUVESVVNXG4gICAgICAgICAgICApLFxuICAgICAgICAgICAgUExPVF9DQVBUSU9OIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uSEpVU1QgdG8gMS4wLFxuICAgICAgICAgICAgICAgIEVsZW0uU0laRSB0byBEZWZhdWx0cy5GT05UX1NNQUxMXG4gICAgICAgICAgICApLFxuLy8gICAgICAgICAgICBURVhUX1dJRFRIX0ZBQ1RPUiB0byAxLjAsXG4gICAgICAgICAgICBQQU5FTF9CT1JERVJfUkVDVCB0byBFTEVNRU5UX0JMQU5LLFxuXG4gICAgICAgICAgICBQTE9UX0JLR1JfUkVDVCB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkZJTEwgdG8gQ29sb3IuV0hJVEUsXG4gICAgICAgICAgICAgICAgRWxlbS5TSVpFIHRvIDAuMCxcbiAgICAgICAgICAgICksXG5cbiAgICAgICAgICAgIExFR0VORF9CS0dSX1JFQ1QgdG8gbWFwT2YoXG4gICAgICAgICAgICAgICAgRWxlbS5GSUxMIHRvIENvbG9yLldISVRFLFxuICAgICAgICAgICAgICAgIEVsZW0uU0laRSB0byAwLjAsXG4gICAgICAgICAgICApLFxuXG4gICAgICAgICAgICBBWElTX09OVE9QIHRvIGZhbHNlLFxuICAgICAgICAgICAgQVhJU19USUNLU19MRU5HVEggdG8gNC4wLFxuXG4gICAgICAgICAgICBBWElTX1RFWFQgdG8gbWFwT2YoXG4gICAgICAgICAgICAgICAgRWxlbS5NYXJnaW4uVE9QIHRvIDMuMCxcbiAgICAgICAgICAgICAgICBFbGVtLk1hcmdpbi5SSUdIVCB0byAzLjAsXG4gICAgICAgICAgICAgICAgRWxlbS5NYXJnaW4uQk9UVE9NIHRvIDAuMCxcbiAgICAgICAgICAgICAgICBFbGVtLk1hcmdpbi5MRUZUIHRvIDAuMFxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgQVhJU19USVRMRSB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLlNJWkUgdG8gRGVmYXVsdHMuRk9OVF9NRURJVU0sXG4gICAgICAgICAgICAgICAgRWxlbS5ISlVTVCB0byAwLjUsXG4gICAgICAgICAgICAgICAgRWxlbS5NYXJnaW4uVE9QIHRvIDQuMCxcbiAgICAgICAgICAgICAgICBFbGVtLk1hcmdpbi5SSUdIVCB0byA0LjAsXG4gICAgICAgICAgICAgICAgRWxlbS5NYXJnaW4uQk9UVE9NIHRvIDQuMCxcbiAgICAgICAgICAgICAgICBFbGVtLk1hcmdpbi5MRUZUIHRvIDQuMFxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgUEFORUxfR1JJRF9NSU5PUiB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLlNJWkUgdG8gMC41LFxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgLy8gTGVnZW5kXG4gICAgICAgICAgICBMRUdFTkRfVElUTEUgdG8gbWFwT2YoXG4gICAgICAgICAgICAgICAgRWxlbS5TSVpFIHRvIERlZmF1bHRzLkZPTlRfTUVESVVNXG4gICAgICAgICAgICApLFxuICAgICAgICAgICAgTEVHRU5EX1BPU0lUSU9OIHRvIExlZ2VuZFBvc2l0aW9uLlJJR0hULFxuICAgICAgICAg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ICAgICBSRUNUIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uQ09MT1IgdG8gREFSS19HUkVZLFxuICAgICAgICAgICAgICAgIEVsZW0uRklMTCB0byBMSUdIVF9HUkVZXG4gICAgICAgICAgICApLFxuXG4gICAgICAgICAgICBURVhUIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uQ09MT1IgdG8gREFSS19HUkVZXG4gICAgICAgICAgICApLFxuXG4gICAgICAgICAgICBQQU5FTF9CS0dSX1JFQ1QgdG8gRUxFTUVOVF9CTEFOSyxcbiAgICAgICAgICAgIFBBTkVMX0dSSURfTUlOT1IgdG8gRUxFTUVOVF9CTEFOSyxcbiAgICAgICAgICAgIFBBTkVMX0dSSUQgdG8gbWFwT2YoXG4gICAgICAgICAgICAgICAgRWxlbS5DT0xPUiB0byBMSUdIVF9HUkVZXG4gICAgICAgICAgICApLFxuXG4gICAgICAgICAgICBBWElTX0xJTkVfWSB0byBFTEVNRU5UX0JMQU5LLFxuICAgICAgICAgICAgQVhJU19USUNLU19ZIHRvIEVMRU1FTlRfQkxBTkssXG4gICAgICAgICAgICBBWElTIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uQ09MT1IgdG8gREFSS19HUkVZXG4gICAgICAgICAgICApLFxuXG4gICAgICAgICAgICBBWElTX1RPT0xUSVAgdG8gbWFwT2YoXG4gICAgICAgICAgICAgICAgRWxlbS5DT0xPUiB0byBQTE9UX0JBQ0tHUk9VTkQsXG4gICAgICAgICAgICAgICAgRWxlbS5GSUxMIHRvIERBUktfR1JFWSxcbiAgICAgICAgICAgICksXG5cbiAgICAgICAgICAgIEZBQ0VUX1NUUklQX0JHUl9SRUNUIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uQkxBTksgdG8gdHJ1ZSxcbiAgICAgICAgICAgICksXG4gICAgICAgIClcbiAgICB9XG59IiwiLypcbiAqIENvcHlyaWdodCAoYykgMjAyMS4gSmV0QnJh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ICAgcHJpdmF0ZSB2YWwgU1RSSVBfQkFDS0dST1VORDogQ29sb3IgPSBDb2xvci5wYXJzZUhleChcIiNEOUQ5RDlcIilcblxuICAgICAgICBwcml2YXRlIHZhbCBEQVJLX0dSRVk6IENvbG9yID0gQ29sb3IucGFyc2VIZXgoXCIjNDc0NzQ3XCIpXG4gICAgICAgIHByaXZhdGUgdmFsIExJR0hUX0dSRVk6IENvbG9yID0gQ29sb3IucGFyc2VIZXgoXCIjRTlFOUU5XCIpXG5cbiAgICAgICAgcHJpdmF0ZSB2YWwgVkFMVUVTOiBNYXA8U3RyaW5nLCBBbnk+ID0gVGhlbWVWYWx1ZXNCYXNlKCkgKyBtYXBPZihcblxuICAgICAgICAgICAgTElORSB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkNPTE9SIHRvIERBUktfR1JFWVxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgUkVDVCB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkNPTE9SIHRvIERBUktfR1JFWSxcbiAgICAgICAgICAgICAgICBFbGVtLkZJTEwgdG8gTElHSFRfR1JFWVxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgVEVYVCB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkNPTE9SIHRvIERBUktfR1JFWVxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgUEFORUxfQktHUl9SRUNUIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uRklMTCB0byBQTE9UX0JBQ0tHUk9VTkQsXG4gICAgICAgICAgICAgICAgRWxlbS5DT0xPUiB0byBQQU5FTF9CT1JERVJcbiAgICAgICAgICAgICksXG4gICAgICAgICAgICBQQU5FTF9HUklEIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uQ09MT1IgdG8gTElHSFRfR1JFWVxuICAgICAgICAgICAgKSxcbiAgICAgICAgICAgIFRoZW1lT3B0aW9uLlBBTkVMX0dSSURfTUFKT1IgdG8gbWFwT2YoXG4gICAgICAgICAgICAgICAgRWxlbS5TSVpFIHRvIDEuNCxcbiAgICAgICAgICAgICksXG4gICAgICAgICAgICBUaGVtZU9wdGlvbi5QQU5FTF9HUklEX01JTk9SIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uU0laRSB0byAwLjUsXG4gICAgICAgICAgICApLFxuXG4gICAgICAgICAgICBBWElTX0xJTkUgdG8gRUxFTUVOVF9CTEFOSyxcbiAgICAgICAgICAgIEFYSVMgdG8gbWFwT2YoXG4gICAgICAgICAgICAgICAgRWxlbS5DT0xPUiB0byBQQU5FTF9CT1JERVJcbiAgICAgICAgICAgICksXG5cbiAgICAgICAgICAgIEFYSVNfVE9PTFRJUCB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkNPTE9SIHRvIFBMT1RfQkFDS0dST1VORCxcbiAgICAgICAgICAgICAgICBFbGVtLkZJTEwgdG8gREFSS19HUkVZLFxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgLy8gRmFjZXRzXG4gICAgICAgICAgICBGQUNFVF9TVFJJUF9CR1JfUkVDVCB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkZJTEwgdG8gU1RSSVBfQkFDS0dST1VORCxcbiAgICAgICAgICAgICAgICBFbGVtLkNPTE9SIHRvIFBBTkVMX0JPUkRFUixcbiAgICAgICAgICAgICksXG4gICAgICAgIClcbiAgICB9XG59IiwiLypcbiAqIENvcHlyaWdodCAoYykgMjAyMS4gSmV0QnJhaW5zIHMuci5vLlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgdGhlIE1JVCBsaWNlbnNlIHRoYXQgY2FuIGJlIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUuXG4gKi9cblxucGFja2FnZSBqZXRicmFpbnMuZGF0YWxvcmUucGxvdC5idWlsZGVyLmRlZmF1bHRUaGVtZS52YWx1ZXNcblxua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URVhUIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uQ09MT1IgdG8gREFSS19HUkVZXG4gICAgICAgICAgICApLFxuXG4gICAgICAgICAgICBQQU5FTF9CS0dSX1JFQ1QgdG8gRUxFTUVOVF9CTEFOSyxcbiAgICAgICAgICAgIFBBTkVMX0dSSUQgdG8gbWFwT2YoXG4gICAgICAgICAgICAgICAgRWxlbS5CTEFOSyB0byB0cnVlLFxuICAgICAgICAgICAgICAgIEVsZW0uQ09MT1IgdG8gTElHSFRfR1JFWVxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgQVhJUyB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkNPTE9SIHRvIERBUktfR1JFWVxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgQVhJU19UT09MVElQIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uQ09MT1IgdG8gUExPVF9CQUNLR1JPVU5ELFxuICAgICAgICAgICAgICAgIEVsZW0uRklMTCB0byBEQVJLX0dSRVksXG4gICAgICAgICAgICApLFxuXG4gICAgICAgICAgICBGQUNFVF9TVFJJUF9CR1JfUkVDVCB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkZJTEwgdG8gUExPVF9CQUNLR1JPVU5ELFxuICAgICAgICAgICAgKSxcbiAgICAgICAgKVxuICAgIH1cbn0iLCIvKlxuICogQ29weXJpZ2h0IChjKSAyMDIxLiBKZXRCcmFpbnMgcy5yLm8uXG4gKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSB0aGUgTUlUIGxpY2Vuc2UgdGhhdCBjYW4gYmUgZm91bmQgaW4gdGhlIExJQ0VOU0UgZmlsZS5cbiAqL1xuXG5wYWNrYWdlIGpldGJyYWlucy5kYXRhbG9yZS5wbG90LmJ1aWxkZXIuZGVmYXVsdFRoZW1lLnZhbHVlc1xuXG5pbXBvcnQgamV0YnJhaW5zLmRhdGFs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ICAgICAgIHByaXZhdGUgdmFsIExJR0hUX0dSRVk6IENvbG9yID0gQ29sb3IucGFyc2VIZXgoXCIjRTlFOUU5XCIpXG5cbi8vICAgICAgICBwcml2YXRlIHZhbCBCTEFDSzogQ29sb3IgPSBDb2xvci5HUkVFTlxuLy8gICAgICAgIHByaXZhdGUgdmFsIERBUktfR1JFWTogQ29sb3IgPSBDb2xvci5SRURcbi8vICAgICAgICBwcml2YXRlIHZhbCBMSUdIVF9HUkVZOiBDb2xvciA9IENvbG9yLk9SQU5HRVxuXG4gICAgICAgIHByaXZhdGUgdmFsIFZBTFVFUzogTWFwPFN0cmluZywgQW55PiA9IFRoZW1lVmFsdWVzQmFzZSgpICsgbWFwT2YoXG4gICAgICAgICAgICBMSU5FIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uQ09MT1IgdG8gREFSS19HUkVZXG4gICAgICAgICAgICApLFxuXG4gICAgICAgICAgICBSRUNUIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uQ09MT1IgdG8gREFSS19HUkVZXG4gICAgICAgICAgICApLFxuXG4gICAgICAgICAgICBURVhUIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uQ09MT1IgdG8gREFSS19HUkVZXG4gICAgICAgICAgICApLFxuXG4gICAgICAgICAgICAvLyBQYW5lbCAobm8gYm9yZGVyKVxuICAgICAgICAgICAgUEFORUxfQktHUl9SRUNUIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uRklMTCB0byBQQU5FTF9CQUNLR1JPVU5ELFxuICAgICAgICAgICAgICAgIEVsZW0uU0laRSB0byAwLjAsXG4gICAgICAgICAgICApLFxuXG4gICAgICAgICAgICAvLyBHcmlkXG4gICAgICAgICAgICBQQU5FTF9HUklEIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uQ09MT1IgdG8gUExPVF9CQUNLR1JPVU5ELFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICAgIFBBTkVMX0dSSURfTUFKT1IgdG8gbWFwT2YoXG4gICAgICAgICAgICAgICAgRWxlbS5TSVpFIHRvIDEuNCxcbiAgICAgICAgICAgICksXG4gICAgICAgICAgICBQQU5FTF9HUklEX01JTk9SIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uU0laRSB0byAwLjUsXG4gICAgICAgICAgICApLFxuXG4gICAgICAgICAgICAvLyBBeGlzXG4gICAgICAgICAgICBBWElTIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uQ09MT1IgdG8gREFSS19HUkVZXG4gICAgICAgICAgICApLFxuICAgICAgICAgICAgQVhJU19MSU5FIHRvIEVMRU1FTlRfQkxBTkssXG4gICAgICAgICAgICBBWElTX1RJQ0tTIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uU0laRSB0byAxLjRcbiAgICAgICAgICAgICksXG5cbiAgICAgICAgICAgIEFYSVNfVE9PTFRJUCB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkNPTE9SIHRvIFBMT1RfQkFDS0dST1VORCxcbiAgICAgICAgICAgICAgICBFbGVtLkZJTEwgdG8gREFSS19HUkVZLFxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgLy8gRmFjZXRzXG4gICAgICAgICAgICBGQUNFVF9TVFJJUF9CR1JfUkVDVCB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkZJTEwgdG8gU1RSSVBfQkFDS0dST1VORCxcbiAgICAgICAgICAgICAgICBFbGVtLlNJWkUgdG8gMC4wLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgKVxuICAgIH1cbn0iLCIvKlxuICogQ29weXJpZ2h0IChjKSAyMDIxLiBKZXRCcmFpbnMgcy5yLm8uXG4gKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSB0aGUgTUlUIGxpY2Vuc2UgdGhhdCBjYW4gYmUgZm91bmQgaW4gdGhl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gIHByaXZhdGUgdmFsIEJMQUNLOiBDb2xvciA9IENvbG9yLkdSRUVOXG4vLyAgICAgICAgcHJpdmF0ZSB2YWwgREFSS19HUkVZOiBDb2xvciA9IENvbG9yLlJFRFxuLy8gICAgICAgIHByaXZhdGUgdmFsIExJR0hUX0dSRVk6IENvbG9yID0gQ29sb3IuT1JBTkdFXG5cbiAgICAgICAgcHJpdmF0ZSB2YWwgVkFMVUVTOiBNYXA8U3RyaW5nLCBBbnk+ID0gVGhlbWVWYWx1ZXNCYXNlKCkgKyBtYXBPZihcblxuICAgICAgICAgICAgTElORSB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkNPTE9SIHRvIERBUktfR1JFWVxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgUkVDVCB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkNPTE9SIHRvIERBUktfR1JFWSxcbiAgICAgICAgICAgICAgICBFbGVtLkZJTEwgdG8gTElHSFRfR1JFWVxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgVEVYVCB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkNPTE9SIHRvIERBUktfR1JFWVxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgUEFORUxfQktHUl9SRUNUIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uRklMTCB0byBQTE9UX0JBQ0tHUk9VTkQsXG4gICAgICAgICAgICAgICAgRWxlbS5DT0xPUiB0byBQQU5FTF9CT1JERVJcbiAgICAgICAgICAgICksXG4gICAgICAgICAgICBQQU5FTF9HUklEIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uQ09MT1IgdG8gTElHSFRfR1JFWVxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgQVhJU19MSU5FIHRvIEVMRU1FTlRfQkxBTkssXG4gICAgICAgICAgICBBWElTIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uQ09MT1Igd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yhWQUxVRVMpIHtcblxuICAgIGNvbXBhbmlvbiBvYmplY3Qge1xuXG4gICAgICAgIHByaXZhdGUgdmFsIFBMT1RfQkFDS0dST1VORCA9IENvbG9yLldISVRFXG5cbiAgICAgICAgcHJpdmF0ZSB2YWwgQkxBQ0s6IENvbG9yID0gQ29sb3IucGFyc2VIZXgoXCIjMTcxNzE3XCIpXG4gICAgICAgIHByaXZhdGUgdmFsIERBUktfR1JFWTogQ29sb3IgPSBDb2xvci5wYXJzZUhleChcIiM0NzQ3NDdcIilcbiAgICAgICAgcHJpdmF0ZSB2YWwgTElHSFRfR1JFWTogQ29sb3IgPSBDb2xvci5wYXJzZUhleChcIiNFOUU5RTlcIilcblxuLy8gICAgICAgIHByaXZhdGUgdmFsIEJMQUNLOiBDb2xvciA9IENvbG9yLkdSRUVOXG4vLyAgICAgICAgcHJpdmF0ZSB2YWwgREFSS19HUkVZOiBDb2xvciA9IENvbG9yLlJFRFxuLy8gICAgICAgIHByaXZhdGUgdmFsIExJR0hUX0dSRVk6IENvbG9yID0gQ29sb3IuT1JBTkdFXG5cbiAgICAgICAgcHJpdmF0ZSB2YWwgVkFMVUVTOiBNYXA8U3RyaW5nLCBBbnk+ID0gVGhlbWVWYWx1ZXNCYXNlKCkgKyBtYXBPZihcblxuICAgICAgICAgICAgTElORSB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkNPTE9SIHRvIERBUktfR1JFWVxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgUkVDVCB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkNPTE9SIHRvIERBUktfR1JFWSxcbiAgICAgICAgICAgICAgICBFbGVtLkZJTEwgdG8gTElHSFRfR1JFWVxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgVEVYVCB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkNPTE9SIHRvIERBUktfR1JFWVxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgUEFORUxfQktHUl9SRUNUIHRvIEVMRU1FTlRfQkxBTkssXG4gICAgICAgICAgICBQQU5FTF9HUklEIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uQ09MT1IgdG8gTElHSFRfR1JFWVxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgQVhJU19MSU5FIHRvIEVMRU1FTlRfQkxBTkssXG4gICAgICAgICAgICBBWElTX1RJQ0tTIHRvIEVMRU1FTlRfQkxBTkssXG4gICAgICAgICAgICBBWElTIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uQ09MT1IgdG8gREFSS19HUkVZXG4gICAgICAgICAgICApLFxuXG4gICAgICAgICAgICBBWElTX1RPT0xUSVAgdG8gbWFwT2YoXG4gICAgICAgICAgICAgICAgRWxlbS5DT0xPUiB0byBQTE9UX0JBQ0tHUk9VTkQsXG4gICAgICAgICAgICAgICAgRWxlbS5GSUxMIHRvIERBUktfR1JFWSxcbiAgICAgICAgICAgICksXG5cbiAgICAgICAgICAgIEZBQ0VUX1NUUklQX0JHUl9SRUNUIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uQkxBTksgdG8gdHJ1ZSxcbiAgICAgICAgICAgICksXG4gICAgICAgIClcbiAgICB9XG59IiwiLypcbiAqIENvcHlyaWdodCAoYykgMjAxOS4gSmV0QnJhaW5zIHMuci5vLlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgdGhlIE1JVCBsaWNlbnNlIHRoYXQgY2FuIGJlIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUuXG4gKi9cblxucGFja2FnZSBqZXRicmFpbnMuZGF0YWxvcmUucGxvdC5idWlsZGVyLmV2ZW50XG5cbmltcG9ydCBqZXRicmFpbnMuZGF0YWxvcmUuYmFzZS5ldmVudC5Nb3VzZUV2ZW50XG5pbXBvcnQgamV0YnJhaW5zLmRhdGFsb3JlLmJhc2UuZXZlbnQuTW91c2VFdm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gIGlmICghbXlFdmVudEhhbmRsZXJzLmNvbnRhaW5zS2V5KGV2ZW50U3BlYykpIHtcbiAgICAgICAgICAgIG15RXZlbnRIYW5kbGVyc1tldmVudFNwZWNdID0gTGlzdGVuZXJzKClcbiAgICAgICAgICAgIG9uQWRkU3BlYyhldmVudFNwZWMpXG4gICAgICAgIH1cblxuICAgICAgICB2YWwgYWRkUmVnID0gbXlFdmVudEhhbmRsZXJzW2V2ZW50U3BlY10/LmFkZChldmVudEhhbmRsZXIpXG4gICAgICAgIHJldHVybiBvYmplY3QgOiBSZWdpc3RyYXRpb24oKSB7XG4gICAgICAgICAgICBvdmVycmlkZSBmdW4gZG9SZW1vdmUoKSB7XG4gICAgICAgICAgICAgICAgYWRkUmVnPy5yZW1vdmUoKVxuICAgICAgICAgICAgICAgIGlmIChteUV2ZW50SGFuZGxlcnNbZXZlbnRTcGVjXSEhLmlzRW1wdHkpIHtcbiAgICAgICAgICAgICAgICAgICAgbXlFdmVudEhhbmRsZXJzLnJlbW92ZShldmVudFNwZWMpXG4gICAgICAgICAgICAgICAgICAgIG9uUmVtb3ZlU3BlYyhldmVudFNwZWMpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgZnVuIGRpc3BhdGNoKGV2ZW50U3BlYzogTW91c2VFdmVudFNwZWMsIG1vdXNlRXZlbnQ6IE1vdXNlRXZlbnQpIHtcbiAgICAgICAgaWYgKG15RXZlbnRIYW5kbGVycy5jb250YWluc0tleShldmVudFNwZWMpKSB7XG4gICAgICAgICAgICBteUV2ZW50SGFuZGxlcnNbZXZlbnRTcGVjXT8uZmlyZShvYmplY3QgOiBMaXN0ZW5lckNhbGxlcjxFdmVudEhhbmRsZXI8TW91c2VFdmVudD4+IHtcbiAgICAgICAgICAgICAgICBvdmVycmlkZSBmdW4gY2FsbChsOiBFdmVudEhhbmRsZXI8TW91c2VFdmVudD4pIHtcbiAgICAgICAgICAgICAgICAgICAgb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lvdXRJbmZvLmhBeGlzSW5mbyEhXG4gICAgICAgICAgICB2YWwgaEF4aXMgPSBidWlsZEF4aXMoXG4gICAgICAgICAgICAgICAgaFNjYWxlQnJlYWtzLFxuICAgICAgICAgICAgICAgIGF4aXNJbmZvLFxuICAgICAgICAgICAgICAgIGhpZGVBeGlzID0gIWRyYXdIQXhpcyxcbiAgICAgICAgICAgICAgICBoaWRlQXhpc0JyZWFrcyA9ICFsYXlvdXRJbmZvLmhBeGlzU2hvd24sXG4gICAgICAgICAgICAgICAgaGlkZUdyaWRsaW5lcyA9ICFkcmF3R3JpZGxpbmVzLFxuICAgICAgICAgICAgICAgIGNvb3JkLFxuICAgICAgICAgICAgICAgIGZsaXBBeGlzLFxuICAgICAgICAgICAgICAgIGhBeGlzVGhlbWUsXG4gICAgICAgICAgICAgICAgaEdyaWRUaGVtZSxcbiAgICAgICAgICAgICAgICBncmlkTGluZUxlbmd0aCA9IGdlb21Cb3VuZHMuaGVpZ2h0LFxuICAgICAgICAgICAgICAgIGdyaWRMaW5lRGlzdGFuY2UgPSBncmlkTGluZURpc3RhbmNlKGdlb21Cb3VuZHMsIGdlb21PdXRlckJvdW5kcywgYXhpc0luZm8ub3JpZW50YXRpb24pLFxuICAgICAgICAgICAgICAgIGlzRGVidWdEcmF3aW5nXG4gICAgICAgICAgICApXG5cbiAgICAgICAgICAgIHZhbCBheGlzT3JpZ2luID0gbWFyZ2luc0xheW91dC50b0F4aXNPcmlnaW4oZ2VvbUJvdW5kcywgYXhpc0luZm8ub3JpZW50YXRpb24pXG4gICAgICAgICAgICBoQXhpcy5tb3ZlVG8oYXhpc09yaWdpbilcbiAgICAgICAgICAgIHBhcmVudC5hZGQoaEF4aXMpXG4gICAgICAgIH1cblxuXG4gICAgICAgIGlmIChkcmF3VkF4aXMgfHwgZHJhd0dyaWRsaW5lcykge1xuICAgICAgICAgICAgLy8gWS1heGlzXG4gICAgICAgICAgICB2YWwgYXhpc0luZm8gPSBsYXlvdXRJbmZvLnZBeGlzSW5mbyEhXG4gICAgICAgICAgICB2YWwgdkF4aXMgPSBidWlsZEF4aXMoXG4gICAgICAgICAgICAgICAgdlNjYWxlQnJlYWtzLFxuICAgICAgICAgICAgICAgIGF4aXNJbmZvLFxuICAgICAgICAgICAgICAgIGhpZGVBeGlzID0gIWRyYXdWQXhpcyxcbiAgICAgICAgICAgICAgICBoaWRlQXhpc0JyZWFrcyA9ICFsYXlvdXRJbmZvLnZBeGlzU2hvd24sXG4gICAgICAgICAgICAgICAgaGlkZUdyaWRsaW5lcyA9ICFkcmF3R3JpZGxpbmVzLFxuICAgICAgICAgICAgICAgIGNvb3JkLFxuICAgICAgICAgICAgICAgIGZsaXBBeGlzLFxuICAgICAgICAgICAgICAgIHZBeGlzVGhlbWUsXG4gICAgICAgICAgICAgICAgdkdyaWRUaGVtZSxcbiAgICAgICAgICAgICAgICBncmlkTGluZUxlbmd0aCA9IGdlb21Cb3VuZHMud2lkdGgsXG4gICAgICAgICAgICAgICAgZ3JpZExpbmVEaXN0YW5jZSA9IGdyaWRMaW5lRGlzdGFuY2UoZ2VvbUJvdW5kcywgZ2VvbU91dGVyQm91bmRzLCBheGlzSW5mby5vcmllbnRhdGlvbiksXG4gICAgICAgICAgICAgICAgaXNEZWJ1Z0RyYXdpbmdcbiAgICAgICAgICAgIClcblxuICAgICAgICAgICAgdmFsIGF4aXNPcmlnaW4gPSBtYXJnaW5zTGF5b3V0LnRvQXhpc09yaWdpbihnZW9tQm91bmRzLCBheGlzSW5mby5vcmllbnRhdGlvbilcbiAgICAgICAgICAgIHZBeGlzLm1vdmVUbyhheGlzT3JpZ2luKVxuICAgICAgICAgICAgcGFyZW50LmFkZCh2QXhpcylcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChkcmF3UGFuZWxCb3JkZXIpIHtcbiAgICAgICAgICAgIHZhbCBwYW5lbEJvcmRlciA9IGJ1aWxkUGFuZWxCb3JkZXJDb21wb25lbnQoZ2VvbUJvdW5kcywgcGFuZWxUaGVt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uZW50XG4gICAgfVxuXG5cbiAgICBjb21wYW5pb24gb2JqZWN0IHtcbiAgICAgICAgcHJpdmF0ZSBmdW4gYnVpbGRBeGlzKFxuICAgICAgICAgICAgc2NhbGVCcmVha3M6IFNjYWxlQnJlYWtzLFxuICAgICAgICAgICAgaW5mbzogQXhpc0xheW91dEluZm8sXG4gICAgICAgICAgICBoaWRlQXhpczogQm9vbGVhbixcbiAgICAgICAgICAgIGhpZGVBeGlzQnJlYWtzOiBCb29sZWFuLFxuICAgICAgICAgICAgaGlkZUdyaWRsaW5lczogQm9vbGVhbixcbiAgICAgICAgICAgIGNvb3JkOiBDb29yZGluYXRlU3lzdGVtLFxuICAgICAgICAgICAgZmxpcEF4aXM6IEJvb2xlYW4sXG4gICAgICAgICAgICBheGlzVGhlbWU6IEF4aXNUaGVtZSxcbiAgICAgICAgICAgIGdyaWRUaGVtZTogUGFuZWxHcmlkVGhlbWUsXG4gICAgICAgICAgICBncmlkTGluZUxlbmd0aDogRG91YmxlLFxuICAgICAgICAgICAgZ3JpZExpbmVEaXN0YW5jZTogRG91YmxlLFxuICAgICAgICAgICAgaXNEZWJ1Z0RyYXdpbmc6IEJvb2xlYW5cbiAgICAgICAgKTogQXhpc0NvbXBvbmVudCB7XG4gICAgICAgICAgICBjaGVjayghKGhpZGVBeGlzICYmIGhpZGVHcmlkbGluZXMpKSB7IFwiVHJ5aW5nIHRvIGJ1aWxkIGFuIGVtcHR5IGF4aXMgY29tcG9uZW50XCIgfVxuICAgICAgICAgICAgdmFsIG9yaWVudGF0aW9uID0gaW5mby5vcmllbnRhdGlvblxuICAgICAgICAgICAgdmFsIGxhYmVsQWRqdXN0bWVudHMgPSBBeGlzQ29tcG9uZW50LlRpY2tMYWJlbEFkanVzdG1lbnRzKFxuICAgICAgICAgICAgICAgIG9yaWVudGF0aW9uID0gb3JpZW50YXRpb24sXG4gICAgICAgICAgICAgICAgaG9yaXpvbnRhbEFuY2hvciA9IGluZm8udGlja0xhYmVsSG9yaXpvbnRhbEFuY2hvcixcbiAgICAgICAgICAgICAgICB2ZXJ0aWNhbEFuY2hvciA9IGluZm8udGlja0xhYmVsVmVydGljYWxBbmNob3IsXG4gICAgICAgICAgICAgICAgcm90YXRpb25EZWdyZWUgPSBpbmZvLnRpY2tMYWJlbFJvdGF0aW9uQW5nbGUsXG4gICAgICAgICAgICAgICAgYWRkaXRpb25hbE9mZnNldHMgPSBpbmZvLnRpY2tMYWJlbEFkZGl0aW9uYWxPZmZzZXRzXG4gICAgICAgICAgICApXG5cbiAgICAgICAgICAgIHZhbCBicmVha3NEYXRhID0gQXhpc1V0aWwuYnJlYWtzRGF0YShcbiAgICAgICAgICAgICAgICBzY2FsZUJyZWFrcyxcbiAgICAgICAgICAgICAgICBjb29yZCxcbiAgICAgICAgICAgICAgICBmbGlwQXhpcyxcbiAgICAgICAgICAgICAgICBvcmllbnRhdGlvbi5pc0hvcml6b250YWxcbiAgICAgICAgICAgIClcblxuICAgICAgICAgICAgdmFsIGF4aXMgPSBBeGlzQ29tcG9uZW50KFxuICAgICAgICAgICAgICAgIGxlbmd0aCA9IGluZm8uYXhpc0xlbmd0aCxcbiAgICAgICAgICAgICAgICBvcmllbnRhdGlvbiA9IG9yaWVudGF0aW9uLFxuICAgICAgICAgICAgICAgIGJyZWFrc0RhdGEgPSBicmVha3NEYXRhLFxuICAgICAgICAgICAgICAgIGxhYmVsQWRqdXN0bWVudHMgPSBsYWJlbEFkanVzdG1lbnRzLFxuICAgICAgICAgICAgICAgIGdyaWRMaW5lTGVuZ3RoID0gZ3JpZExpbmVMZW5ndGgsXG4gICAgICAgICAgICAgICAgZ3JpZExpbmVEaXN0YW5jZSA9IGdyaWRMaW5lRGlzdGFuY2UsXG4gICAgICAgICAgICAgICAgYXhpc1RoZW1lID0gYXhpc1RoZW1lLFxuICAgICAgICAgICAgICAgIGdyaWRUaGVtZSA9IGdyaWRUaGVtZSxcbiAgICAgICAgICAgICAgICBoaWRlQXhpcyA9IGhpZGVBeGlzLFxuICAgICAgICAgICAgICAgIGhpZGVBeGlzQnJlYWtzID0gaGlkZUF4aXNCcmVha3MsXG4gICAgICAgICAgICAgICAgaGlkZUdyaWRsaW5lcyA9IGhpZGVHcmlkbGluZXNcbiAgICAgICAgICAgIClcblxuICAgICAgICAgICAgaWYgKGlzRGVidWdEcmF3aW5nKSB7XG4gICAgICAgICAgICAgICAgZnVuIGRyYXdEZWJ1Z1JlY3QocjogRG91YmxlUmVjdGFuZ2xlLCBjb2xvcjogQ29sb3IpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFsIHJlY3QgPSBTdmdSZWN0RWxlbWVudChyKVxuICAgICAgICAgICAgICAgICAgICByZWN0LnN0cm9rZUNvbG9yKCkuc2V0KGNvbG9yKVxuICAgICAgICAgICAgICAgICAgICByZWN0LnN0cm9rZVdpZHRoKCkuc2V0KDEuMClcbiAgICAgICAgICAgICAgICAgICAgcmVjdC5maWxsT3BhY2l0eSgpLnNldCgwLjApXG4gICAgICAgICAgICAgICAgICAgIGF4aXMuYWRkKHJlY3QpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGRyYXdEZWJ1Z1JlY3QoaW5mby50aWNrTGFiZWxzQm91bmRzLCBDb2xvci5HUkVFTilcbiAgICAgICAgICAgICAgICBpbmZvLnRpY2tMYWJlbHNUZXh0Qm91bmRzPy5sZXQgeyBkcmF3RGVidWdSZWN0KGl0LCBDb2xvci5MSUdIVF9CTFVFKSB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gYXhpc1xuICAgICAgICB9XG5cbiAgICAgICAgcHJpdmF0ZSBmdW4gYnVpbGRQYW5lbENvbXBvbmVudChib3VuZHM6IERvdWJsZVJlY3RhbmdsZSwgdGhlbWU6IFBhbmVsVGhlbWUpOiBTdmdSZWN0RWxlbWVudCB7XG4gICAgICAgICAgICByZXR1cm4gU3ZnUmVjdEVsZW1lbnQoYm91bmRzKS5hcHBseSB7XG4gICAgICAgICAgICAgICAgc3Ryb2tlQ29sb3IoKS5zZXQodGhlbWUucmVjdENvbG9yKCkpXG4gICAgICAgICAgICAgICAgc3Ryb2tlV2lkdGgoKS5zZXQodGhlbWUucmVjdFN0cm9rZVdpZHRoKCkpXG4gICAgICAgICAgICAgICAgZmlsbENvbG9yKCkuc2V0KHRoZW1lLnJlY3RGaWxsKCkpXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBwcml2YXRlIGZ1biBidWlsZFBhbmVsQm9yZGVyQ29tcG9uZW50KGJvdW5kczogRG91YmxlUmVjdGFuZ2xlLCB0aGVtZTogUGFuZWxUaGVtZSk6IFN2Z1JlY3RFbGVtZW50IHtcbiAgICAgICAgICAgIHJldHVybiBTdmdSZWN0RWxlbWVudChib3VuZHMpLmFwcGx5IHtcbiAgICAgICAgICAgICAgICBzdHJva2VDb2xvcigpLnNldCh0aGVtZS5ib3JkZXJDb2xvcigpKVxuICAgICAgICAgICAgICAgIHN0cm9rZVdpZHRoKCkuc2V0KHRoZW1lLmJvcmRlcldpZHRoKCkpXG4gICAgICAgICAgICAgICAgZmlsbE9wYWNpdHkoKS5zZXQoMC4wKVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqICdpbnRlcm5hbCcgYWNjZXNzIGZvciB0ZXN0cy5cbiAgICAgICAgICovXG4gICAgICAgIGludGVybmFsIGZ1biBidWlsZEdlb20oXG4gICAgICAgICAgICBsYXllcjogR2VvbUxheWVyLFxuICAgICAgICAgICAgeHlBZXNCb3VuZHM6IERvdWJsZVJlY3RhbmdsZSxcbiAgICAgICAgICAgIGNvb3JkOiBDb29yZGluYXRlU3lzdGVtLFxuICAgICAgICAgICAgZmxpcHBlZEF4aXM6IEJvb2xlYW4sXG4gICAgICAgICAgICB0YXJnZXRDb2xsZWN0b3I6IEdlb21UYXJnZXRDb2xsZWN0b3JcbiAgICAgICAgKTogU3ZnQ29tcG9uZW50IHtcbiAgICAgICAgICAgIHZhbCByZW5kZXJlckRhdGEgPSBMYXllclJlbmRlcmVyVXRpbC5jcmVhdGVMYXllclJlbmRlcmVyRGF0YShsYXllcilcblxuICAgICAgICAgICAgQFN1cHByZXNzKFwiTkFNRV9TSEFET1dJTkdcIilcbiAgICAgICAgICAgIC8vIHZhbCBmbGlwcGVkQXhpcyA9IGxheWVyLmlzWU9yaWVudGF0aW9uIHhvciBmbGlwcGVkQXhpc1xuICAgICAgICAgICAgLy8gKFhPUiBpc3N1ZTogaHR0cHM6Ly95b3V0cmFjay5qZXRicmFpbnMuY29tL2lzc3VlL0tULTUyMjk2L0tvdGxpbi1KUy10aGUteG9yLW9wZXJhdGlvbi1zb21ldGltZXMtZXZhbHVhdGVzLXRvLWludC12YWx1ZS1pbnMpXG4gICAgICAgICAgICB2YWwgZmxpcHBlZEF4aXMgPSBpZiAobGF5ZXIuaXNZT3JpZW50YXRpb24pICFmbGlwcGVkQXhpcyBlbHNlIGZsaXBwZWRBeGlzXG5cbiAgICAgICAgICAgIHZhbCBhZXN0aGV0aWNNYXBwZXJzID0gcmVuZGVyZXJEYXRhLmFlc3RoZXRpY01hcHBlcnNcbiAgICAgICAgICAgIHZhbCBhZXN0aGV0aWNzID0gcmVuZGVyZXJEYXRhLmFlc3RoZXRpY3NcblxuICAgICAgICAgICAgQFN1cHByZXNzKFwiTkFNRV9TSEFET1dJTkdcIilcbiAgICAgICAgICAgIHZhbCBjb29yZCA9IHdoZW4gKGxheWVyLmlzWU9yaWVudGF0aW9uKSB7XG4gICAgICAgICAgICAgICAgdHJ1ZSAtPiBjb29yZC5mbGlwKClcbiAgICAgICAgICAgICAgICBmYWxzZSAtPiBjb29yZFxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBAU3VwcHJlc3MoXCJOQU1FX1NIQURPV0lOR1wiKVxuICAgICAgICAgICAgdmFsIHRhcmdldENvbGxlY3RvciA9IHRhcmdldENvbGxlY3Rvci5sZXQge1xuICAgICAgICAgICAgICAgIHdoZW4ge1xuICAgICAgICAgICAgICAgICAgICBmbGlwcGVkQXhpcyAtPiBpdC53aXRoRmxpcHBlZEF4aXMoKVxuICAgICAgICAgICAgICAgICAgICBlbHNlIC0+IGl0XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfS5sZXQge1xuICAgICAgICAgICAgICAgIHdoZW4ge1xuICAgICAgICAgICAgICAgICAgICBsYXllci5pc1lPcmllbnRhdGlvbiAtPiBpdC53aXRoWU9yaWVudGF0aW9uKClcbiAgICAgICAgICAgICAgICAgICAgZWxzZSAtPiBpdFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFsIGN0eCA9IEdlb21Db250ZXh0QnVpbGRlcigpXG4gICAgICAgICAgICAgICAgLmZsaXBwZWQoZmxpcHBlZEF4aXMpXG4gICAgICAgICAgICAgICAgLmFlc3RoZXRpY3MoYWVzdGhldGljcylcbiAgICAgICAgICAgICAgICAuYWVzdGhldGljTWFwcGVycyhhZXN0aGV0aWNNYXBwZXJzKVxuICAgICAgICAgICAgICAgIC5hZXNCb3VuZHMoeHlBZXNCb3VuZHMpXG4gICAgICAgICAgICAgICAgLmdlb21UYXJnZXRDb2xsZWN0b3IodGFyZ2V0Q29sbGVjdG9yKVxuICAgICAgICAgICAgICAgIC5mb250RmFtaWx5UmVnaXN0cnkobGF5ZXIuZm9udEZhbWlseVJlZ2lzdHJ5KVxuICAgICAgICAgICAgICAgIC5hbm5vdGF0aW9ucyhyZW5kZXJlckRhdGEuYW5ub3RhdGlvbnMpXG4gICAgICAgICAgICAgICAgLmJ1aWxkKClcblxuICAgICAgICAgICAgdmFsIHBvcyA9IHJlbmRlcmVyRGF0YS5wb3NcbiAgICAgICAgICAgIHZhbCBnZW9tID0gbGF5ZXIuZ2VvbVxuXG4gICAgICAgICAgICByZXR1cm4gU3ZnTGF5ZXJSZW5kZXJlcihhZXN0aGV0aWNzLCBnZW9tLCBwb3MsIGNvb3JkLCBjdHgpXG4gICAgICAgIH1cblxuIC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gICAgICAgICAgdmFsIHZEb21haW4gPSB3aGVuIChzaWRlKSB7XG4gICAgICAgICAgICAgICAgTWFyZ2luU2lkZS5MRUZULCBNYXJnaW5TaWRlLlJJR0hUIC0+IHZBeGlzTGF5b3V0SW5mby5heGlzRG9tYWluXG4gICAgICAgICAgICAgICAgTWFyZ2luU2lkZS5UT1AsIE1hcmdpblNpZGUuQk9UVE9NIC0+IGRvbWFpblxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YWwgbWFyZ2luQ29vcmRQcm92aWRlciA9IE1hcmdpbmFsTGF5ZXJDb29yZFByb3ZpZGVyKClcbiAgICAgICAgICAgIHZhbCBjbGllbnRTaXplID0gc2l6ZXMuZ2V0VmFsdWUoc2lkZSlcbiAgICAgICAgICAgIHZhbCBhZGp1c3RlZERvbWFpbiA9IERvdWJsZVJlY3RhbmdsZShoRG9tYWluLCB2RG9tYWluKVxuICAgICAgICAgICAgdmFsIGNvb3JkID0gbWFyZ2luQ29vcmRQcm92aWRlci5jcmVhdGVDb29yZGluYXRlU3lzdGVtKFxuICAgICAgICAgICAgICAgIGFkanVzdGVkRG9tYWluID0gYWRqdXN0ZWREb21haW4sXG4gICAgICAgICAgICAgICAgY2xpZW50U2l6ZSA9IGNsaWVudFNpemUsXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBNYXJnaW5hbEZyYW1lT2ZSZWZlcmVuY2UoXG4gICAgICAgICAgICAgICAgYm91bmRzQnlNYXJnaW4uZ2V0VmFsdWUoc2lkZSksXG4gICAgICAgICAgICAgICAgYWRqdXN0ZWREb21haW4gPSBhZGp1c3RlZERvbWFpbixcbiAgICAgICAgICAgICAgICBjb29yZCxcbiAgICAgICAgICAgICAgICBkZWJ1Z0RyYXdpbmcsXG4gICAgICAgICAgICApXG4gICAgICAgIH1cbiAgICB9XG5cblxuICAgIHByaXZhdGUgY2xhc3MgQXhpc1NwZWMoXG4gICAgICAgIHZhbCBicmVha3NQcm92aWRlckZhY3Rvcnk6IEF4aXNCcmVha3NQcm92aWRlckZhY3RvcnksXG4gICAgICAgIHZhbCBsYWJlbDogU3RyaW5nPyxcbiAgICAgICAgdmFsIHRoZW1lOiBBeGlzVGhlbWVcbiAgICApXG5cbiAgICBwcml2YXRlIGNsYXNzIE15VGlsZUxheW91dFByb3ZpZGVyKFxuICAgICAgICBwcml2YXRlIHZhbCBoQXhpc0xheW91dDogQXhpc0xheW91dCxcbiAgICAgICAgcHJpdmF0ZSB2YWwgdkF4aXNMYXlvdXQ6IEF4aXNMYXlvdXQsXG4gICAgICAgIHByaXZhdGUgdmFsIGFkanVzdGVkRG9tYWluOiBEb3VibGVSZWN0YW5nbGUsXG4gICAgICAgIHByaXZhdGUgdmFsIG1hcmdpbnNMYXlvdXQ6IEdlb21NYXJnaW5zTGF5b3V0LFxuICAgICkgOiBUaWxlTGF5b3V0UHJvdmlkZXIge1xuICAgICAgICBvdmVycmlkZSBmdW4gY3JlYXRlVG9wRG93blRpbGVMYXlvdXQoKTogVGlsZUxheW91dCB7XG4gICAgICAgICAgICByZXR1cm4gVG9wRG93blRpbGVMYXlvdXQoXG4gICAgICAgICAgICAgICAgaEF4aXNMYXlvdXQsIHZBeGlzTGF5b3V0LFxuICAgICAgICAgICAgICAgIGhEb21haW4gPSBhZGp1c3RlZERvbWFpbi54UmFuZ2UoKSxcbiAgICAgICAgICAgICAgICB2RG9tYWluID0gYWRqdXN0ZWREb21haW4ueVJhbmdlKCksXG4gICAgICAgICAgICAgICAgbWFyZ2luc0xheW91dFxuICAgICAgICAgICAgKVxuICAgICAgICB9XG5cbiAgICAgICAgb3ZlcnJpZGUgZnVuIGNyZWF0ZUluc2lkZU91dFRpbGVMYXlvdXQoKTogVGlsZUxheW91dCB7XG4gICAgICAgICAgICByZXR1cm4gSW5zaWRlT3V0VGlsZUxheW91dChcbiAgICAgICAgICAgICAgICBoQXhpc0xheW91dCwgdkF4aXNMYXlvdXQsXG4gICAgICAgICAgICAgICAgaERvbWFpbiA9IGFkanVzdGVkRG9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aGlkZUF4aXM6IEJvb2xlYW4gPSBmYWxzZSxcbiAgICBwcml2YXRlIHZhbCBoaWRlQXhpc0JyZWFrczogQm9vbGVhbiA9IGZhbHNlLFxuICAgIHByaXZhdGUgdmFsIGhpZGVHcmlkbGluZXM6IEJvb2xlYW4gPSBmYWxzZVxuKSA6IFN2Z0NvbXBvbmVudCgpIHtcblxuICAgIG92ZXJyaWRlIGZ1biBidWlsZENvbXBvbmVudCgpIHtcbiAgICAgICAgYnVpbGRBeGlzKClcbiAgICB9XG5cbiAgICBwcml2YXRlIGZ1biBidWlsZEF4aXMoKSB7XG4gICAgICAgIHZhbCByb290RWxlbWVudCA9IHJvb3RHcm91cFxuXG4gICAgICAgIHZhbCB4MTogRG91YmxlXG4gICAgICAgIHZhbCB5MTogRG91YmxlXG4gICAgICAgIHZhbCB4MjogRG91YmxlXG4gICAgICAgIHZhbCB5MjogRG91YmxlXG4gICAgICAgIHZhbCBzdGFydCA9IDAuMFxuICAgICAgICB2YWwgZW5kOiBEb3VibGUgPSBsZW5ndGhcbiAgICAgICAgd2hlbiAob3JpZW50YXRpb24pIHtcbiAgICAgICAgICAgIE9yaWVudGF0aW9uLkxFRlQsIE9yaWVudGF0aW9uLlJJR0hUIC0+IHtcbiAgICAgICAgICAgICAgICB4MSA9IDAuMFxuICAgICAgICAgICAgICAgIHgyID0gMC4wXG4gICAgICAgICAgICAgICAgeTEgPSBzdGFydFxuICAgICAgICAgICAgICAgIHkyID0gZW5kXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBPcmllbnRhdGlvbi5UT1AsIE9yaWVudGF0aW9uLkJPVFRPTSAtPiB7XG4gICAgICAgICAgICAgICAgeDEgPSBzdGFydFxuICAgICAgICAgICAgICAgIHgyID0gZW5kXG4gICAgICAgICAgICAgICAgeTEgPSAwLjBcbiAgICAgICAgICAgICAgICB5MiA9IDAuMFxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gR3JpZCBsaW5lcy5cbiAgICAgICAgaWYgKCFoaWRlR3JpZGxpbmVzKSB7XG4gICAgICAgICAgICAvLyBNaW5vciBncmlkLlxuICAgICAgICAgICAgLy8gZG8gbm90IGRyYXcgZ3JpZCBsaW5lcyB0aGVuIGl0J3MgdG9vIGNsb3NlIHRvIGF4aXMgZW5kcy5cbiAgICAgICAgICAgIHZhbCBncmlkTGluZU1pblBvcyA9IHN0YXJ0ICsgNlxuICAgICAgICAgICAgdmFsIGdyaWRMaW5lTWF4UG9zID0gZW5kIC0gNlxuXG4gICAgICAgICAgICBpZiAoZ3JpZFRoZW1lLnNob3dNaW5vcigpKSB7XG4gICAgICAgICAgICAgICAgZm9yIChiciBpbiBicmVha3NEYXRhLm1pbm9yQnJlYWtzKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChiciA+PSBncmlkTGluZU1pblBvcyAmJiBiciA8PSBncmlkTGluZU1heFBvcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFsIGVsZW0gPSBidWlsZEdyaWRMaW5lKGJyLCBncmlkVGhlbWUubWlub3JMaW5lV2lkdGgoKSwgZ3JpZFRoZW1lLm1pbm9yTGluZUNvbG9yKCkpXG4gICAgICAgICAgICAgICAgICAgICAgICByb290RWxlbWVudC5jaGlsZHJlbigpLmFkZChlbGVtKVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBNYWpvciBncmlkLlxuICAgICAgICAgICAgaWYgKGdyaWRUaGVtZS5zaG93TWFqb3IoKSkge1xuICAgICAgICAgICAgICAgIGZvciAoYnIgaW4gYnJlYWtzRGF0YS5tYWpvckJyZWFrcykge1xuICAgICAgICAgICAgICAgICAgICBpZiAoYnIgPj0gZ3JpZExpbmVNaW5Qb3MgJiYgYnIgPD0gZ3JpZExpbmVNYXhQb3MpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbCBlbGVtID0gYnVpbGRHcmlkTGluZShiciwgZ3JpZFRoZW1lLm1ham9yTGluZVdpZHRoKCksIGdyaWRUaGVtZS5tYWpvckxpbmVDb2xvcigpKVxuICAgICAgICAgICAgICAgICAgICAgICAgcm9vdEVsZW1lbnQuY2hpbGRyZW4oKS5hZGQoZWxlbSlcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIEF4aXNcbiAgICAgICAgaWYgKCFoaWRlQXhpcykge1xuICAgICAgICAgICAgLy8gVGlja3MgYW5kIGxhYmVsc1xuICAgICAgICAgICAgaWYgKCFoaWRlQXhpc0JyZWFrcyAmJiAoYXhpc1RoZW1lLnNob3dMYWJlbHMoKSB8fCBheGlzVGhlbWUuc2hvd1RpY2tNYXJrcygpKSkge1xuICAgICAgICAgICAgICAgIHZhbCBsYWJlbHNDbGVhbmVyID0gVGlja0xhYmVsc0NsZWFuZXIob3JpZW50YXRpb24uaXNIb3Jpem9udGFsKVxuXG4gICAgICAgICAgICAgICAgZm9yICgoaSwgYnIpIGluIGJyZWFrc0RhdGEubWFqb3JCcmVha3Mud2l0aEluZGV4KCkpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGJyID49IHN0YXJ0ICYmIGJyIDw9IGVuZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFsIGxhYmVsID0gYnJlYWtzRGF0YS5tYWpvckxhYmVsc1tpICUgYnJlYWtzRGF0YS5tYWpvckxhYmVscy5zaXplXVxuICAgICAgICAgICAgICAgICAgICAgICAgdmFsIGxhYmVsT2Zmc2V0ID0gdGlja0xhYmVsQmFzZU9mZnNldCgpLmFkZChsYWJlbEFkanVzdG1lbnRzLmFkZGl0aW9uYWxPZmZzZXQoaSkpXG4gICAgICAgICAgICAgICAgICAgICAgICB2YWwgZ3JvdXAgPSBidWlsZFRpY2soXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWwsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWxPZmZzZXQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2tpcExhYmVsID0gIWxhYmVsc0NsZWFuZXIuYmVmb3JlQWRkTGFiZWwoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYWJlbEFkanVzdG1lbnRzLnJvdGF0aW9uRGVncmVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQbG90TGFiZWxTcGVjRmFjdG9yeS5heGlzVGljayhheGlzVGhlbWUpLmhlaWdodCgpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBheGlzVGhlbWVcbiAgICAgICAgICAgICAgICAgICAgICAgIClcblxuICAgICAgICAgICAgICAgICAgICAgICAgd2hlbiAob3JpZW50YXRpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBPcmllbnRhdGlvbi5MRUZULCBPcmllbnRhdGlvbi5SSUdIVCAtPiB0cmFuc2Zvcm1UcmFuc2xhdGUoZ3JvdXAsIDAuMCwgYnIpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgT3JpZW50YXRpb24uVE9QLCBPcmllbnRhdGlvbi5CT1RUT00gLT4gdHJhbnNmb3JtVHJhbnNsYXRlKGdyb3VwLCBiciwgMC4wKVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICByb290RWxlbWVudC5jaGlsZHJlbigpLmFkZChncm91cClcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gQXhpcyBsaW5lXG4gICAgICAgICAgICBpZiAoIWhpZGVBeGlzQnJlYWtzICYmIGF4aXNUaGVtZS5zaG93TGluZSgpKSB7XG4gICAgICAgICAgICAgICAgdmFsIGF4aXNMaW5lID0gU3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HRoKCkuc2V0KHdpZHRoKVxuXG4gICAgICAgIHdoZW4gKG9yaWVudGF0aW9uKSB7XG4gICAgICAgICAgICBPcmllbnRhdGlvbi5MRUZULCBPcmllbnRhdGlvbi5SSUdIVCAtPiB7XG4gICAgICAgICAgICAgICAgZWxlbS55MSgpLnNldChicilcbiAgICAgICAgICAgICAgICBlbGVtLnkyKCkuc2V0KGJyKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgT3JpZW50YXRpb24uVE9QLCBPcmllbnRhdGlvbi5CT1RUT00gLT4ge1xuICAgICAgICAgICAgICAgIGVsZW0ueDEoKS5zZXQoYnIpXG4gICAgICAgICAgICAgICAgZWxlbS54MigpLnNldChicilcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZWxlbVxuICAgIH1cblxuICAgIHByaXZhdGUgZnVuIGJ1aWxkVGljayhcbiAgICAgICAgbGFiZWw6IFN0cmluZyxcbiAgICAgICAgbGFiZWxPZmZzZXQ6IERvdWJsZVZlY3RvcixcbiAgICAgICAgc2tpcExhYmVsOiBCb29sZWFuLFxuICAgICAgICBheGlzVGhlbWU6IEF4aXNUaGVtZVxuICAgICk6IFN2Z0dFbGVtZW50IHtcblxuICAgICAgICB2YXIgdGlja01hcms6IFN2Z0xpbmVFbGVtZW50PyA9IG51bGxcbiAgICAgICAgaWYgKGF4aXNUaGVtZS5zaG93VGlja01hcmtzKCkpIHtcbiAgICAgICAgICAgIHRpY2tNYXJrID0gU3ZnTGluZUVsZW1lbnQoKVxuICAgICAgICAgICAgdGlja01hcmsuc3Ryb2tlV2lkdGgoKS5zZXQoYXhpc1RoZW1lLnRpY2tNYXJrV2lkdGgoKSlcbiAgICAgICAgICAgIHRpY2tNYXJrLnN0cm9rZUNvbG9yKCkuc2V0KGF4aXNUaGVtZS50aWNrTWFya0NvbG9yKCkpXG4gICAgICAgIH1cblxuICAgICAgICB2YXIgdGlja0xhYmVsOiBUZXh0TGFiZWw/ID0gbnVsbFxuICAgICAgICBpZiAoIXNraXBMYWJlbCAmJiBheGlzVGhlbWUuc2hvd0xhYmVscygpKSB7XG4gICAgICAgICAgICB0aWNrTGFiZWwgPSBUZXh0TGFiZWwobGFiZWwpXG4gICAgICAgICAgICB0aWNrTGFiZWwuYWRkQ2xhc3NOYW1lKFwiJHtTdHlsZS5BWElTX1RFWFR9LSR7YXhpc1RoZW1lLmF4aXN9XCIpXG4gICAgICAgIH1cblxuICAgICAgICB2YWwgbWFya0xlbmd0aCA9IGF4aXNUaGVtZS50aWNrTWFya0xlbmd0aCgpXG4gICAgICAgIHdoZW4gKG9yaWVudGF0aW9uKSB7XG4gICAgICAgICAgICBPcmllbnRhdGlvbi5MRUZUIC0+IHtcbiAgICAgICAgICAgICAgICBpZiAodGlja01hcmsgIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICB0aWNrTWFyay54MigpLnNldCgtbWFya0xlbmd0aClcbiAgICAgICAgICAgICAgICAgICAgdGlja01hcmsueTIoKS5zZXQoMC4wKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIE9yaWVudGF0aW9uLlJJR0hUIC0+IHtcbiAgICAgICAgICAgICAgICBpZiAodGlja01hcmsgIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICB0aWNrTWFyay54MigpLnNldChtYXJrTGVuZ3RoKVxuICAgICAgICAgICAgICAgICAgICB0aWNrTWFyay55MigpLnNldCgwLjApXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgT3JpZW50YXRpb24uVE9QIC0+IHtcbiAgICAgICAgICAgICAgICBpZiAodGlja01hcmsgIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICB0aWNrTWFyay54MigpLnNldCgwLjApXG4gICAgICAgICAgICAgICAgICAgIHRpY2tNYXJrLnkyKCkuc2V0KC1tYXJrTGVuZ3RoKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIE9yaWVudGF0aW9uLkJPVFRPTSAtPiB7XG4gICAgICAgICAgICAgICAgaWYgKHRpY2tNYXJrICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgdGlja01hcmsueDIoKS5zZXQoMC4wKVxuICAgICAgICAgICAgICAgICAgICB0aWNrTWFyay55MigpLnNldChtYXJrTGVuZ3RoKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHZhbCBnID0gU3ZnR0VsZW1lbnQoKVxuICAgICAgICBpZiAodGlja01hcmsgIT0gbnVsbCkge1xuICAgICAgICAgICAgZy5jaGlsZHJlbigpLmFkZCh0aWNrTWFyaylcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh0aWNrTGFiZWwgIT0gbnVsbCkge1xuICAgICAgICAgICAgdGlja0xhYmVsLm1vdmVUbyhsYWJlbE9mZnNldC54LCBsYWJlbE9mZnNldC55KVxuICAgICAgICAgICAgdGlja0xhYmVsLnNldEhvcml6b250YWxBbmNob3IobGFiZWxBZGp1c3RtZW50cy5ob3Jpem9udGFsQW5jaG9yKVxuICAgICAgICAgICAgdGlja0xhYmVsLnNldFZlcnRpY2FsQW5jaG9yKGxhYmVsQWRqdXN0bWVudHMudmVydGljYWxBbmNob3IpXG4gICAgICAgICAgICB0aWNrTGFiZWwucm90YXRlKGxhYmVsQWRqdXN0bWVudHMucm90YXRpb25EZWdyZWUpXG4gICAgICAgICAgICBnLmNoaWxkcmVuKCkuYWRkKHRpY2tMYWJlbC5yb290R3JvdXApXG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGdcbiAgICB9XG5cbiAgICBwcml2YXRlIGZ1biB0aWNrTGFiZWxCYXNlT2Zmc2V0KCk6IERvdWJsZVZlY3RvciB7XG4gICAgICAgIHZhbCBkaXN0YW5jZSA9IGF4aXNUaGVtZS50aWNrTGFiZWxEaXN0YW5jZShvcmllbnRhdGlvbi5pc0hvcml6b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3JpZDogYSBtaW5vciBsaW5lIGluIHRoZSBtaWRkbGUgYmV0d2VlbiBlYWNoIHBhaXIgb2YgbWFqb3IgbGluZXMuXG4gICAgICAgICAgICAgICAgQFN1cHByZXNzKFwiTkFNRV9TSEFET1dJTkdcIilcbiAgICAgICAgICAgICAgICB2YWwgbWlub3JCcmVha3M6IE11dGFibGVMaXN0PERvdWJsZT4gPSBtYWpvckJyZWFrcy5zdWJMaXN0KDAsIG1ham9yQnJlYWtzLnNpemUgLSAxKVxuICAgICAgICAgICAgICAgICAgICAuemlwKG1ham9yQnJlYWtzLnN1Ykxpc3QoMSwgbWFqb3JCcmVha3Muc2l6ZSkpXG4gICAgICAgICAgICAgICAgICAgIC5mb2xkKEFycmF5TGlzdCgpKSB7IGwsIHBhaXIgLT5cbiAgICAgICAgICAgICAgICAgICAgICAgIGwuYWRkKChwYWlyLnNlY29uZCAtIHBhaXIuZmlyc3QpIC8gMiArIHBhaXIuZmlyc3QpXG4gICAgICAgICAgICAgICAgICAgICAgICBsXG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIEFkZCBvbmUgaW4gdGhlIGZyb250XG4gICAgICAgICAgICAgICAgbWFqb3JCcmVha3MudGFrZSgyKS5yZWR1Y2UgeyBmaXJzdCwgc2Vjb25kIC0+IHNlY29uZCAtIGZpcnN0IH0ucnVuIHtcbiAgICAgICAgICAgICAgICAgICAgbWlub3JCcmVha3MuYWRkKDAsIG1pbm9yQnJlYWtzLmZpcnN0KCkgLSB0aGlzKVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIEFkZCBvbmUgaW4gdGhlIGJhY2suXG4gICAgICAgICAgICAgICAgbWFqb3JCcmVha3MudGFrZUxhc3QoMikucmVkdWNlIHsgZmlyc3QsIHNlY29uZCAtPiBzZWNvbmQgLSBmaXJzdCB9LnJ1biB7XG4gICAgICAgICAgICAgICAgICAgIG1pbm9yQnJlYWtzLmFkZCgwLCBtaW5vckJyZWFrcy5sYXN0KCkgKyB0aGlzKVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIG1pbm9yQnJlYWtzXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBjbGFzcyBUaWNrTGFiZWxBZGp1c3RtZW50cyhcbiAgICAgICAgb3JpZW50YXRpb246IE9yaWVudGF0aW9uLFxuICAgICAgICBob3Jpem9udGFsQW5jaG9yOiBUZXh0Lkhvcml6b250YWxBbmNob3I/ID0gbnVsbCxcbiAgICAgICAgdmVydGljYWxBbmNob3I6IFRleHQuVmVydGljYWxBbmNob3I/ID0gbnVsbCxcbiAgICAgICAgdmFsIHJvdGF0aW9uRGVncmVlOiBEb3VibGUgPSAwLjAsXG4gICAgICAgIHByaXZhdGUgdmFsIGFkZGl0aW9uYWxPZmZzZXRzOiBMaXN0PERvdWJsZVZlY3Rvcj4/ID0gbnVsbFxuICAgICkge1xuICAgICAgICB2YWwgaG9yaXpvbnRhbEFuY2hvcjogVGV4dC5Ib3Jpem9udGFsQW5jaG9yID0gaG9yaXpvbnRhbEFuY2hvciA/OiB3aGVuIChvcmllbnRhdGlvbikge1xuICAgICAgICAgICAgT3JpZW50YXRpb24uTEVGVCAtPiBSSUdIVFxuICAgICAgICAgICAgT3JpZW50YXRpb24uUklHSFQgLT4gTEVGVFxuICAgICAgICAgICAgT3JpZW50YXRpb24uVE9QLCBPcmllbnRhdGlvbi5CT1RUT00gLT4gTUlERExFXG4gICAgICAgIH1cbiAgICAgICAgdmFsIHZlcnRpY2FsQW5jaG9yOiBUZXh0LlZlcnRpY2FsQW5jaG9yID0gdmVydGljYWxBbmNob3IgPzogd2hlbiAob3JpZW50YXRpb24pIHtcbiAgICAgICAgICAgIE9yaWVudGF0aW9uLkxFRlQsIE9yaWVudGF0aW9uLlJJR0hUIC0+IENFTlRFUlxuICAgICAgICAgICAgT3JpZW50YXRpb24uVE9QIC0+IEJPVFRPTVxuICAgICAgICAgICAgT3J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hbFxuICAgICAgICBhZGRDb2xvckJhcihcbiAgICAgICAgICAgIGd1aWRlQmFyR3JvdXAsXG4gICAgICAgICAgICBzcGVjLmRvbWFpbiwgc3BlYy5zY2FsZU1hcHBlciwgc3BlYy5iaW5Db3VudCwgYmFyQm91bmRzLFxuICAgICAgICAgICAgbGF5b3V0LmJhckxlbmd0aEV4cGFuZCxcbiAgICAgICAgICAgIGhvcml6b250YWwsIHNwZWMucmV2ZXJzZVxuICAgICAgICApXG5cbiAgICAgICAgLy8gVGlja3MgYW5kIGxhYmVsc1xuICAgICAgICB2YWwgYmFyVGhpY2tuZXNzID0gd2hlbiB7XG4gICAgICAgICAgICBob3Jpem9udGFsIC0+IGJhckJvdW5kcy5oZWlnaHRcbiAgICAgICAgICAgIGVsc2UgLT4gYmFyQm91bmRzLndpZHRoXG4gICAgICAgIH1cbiAgICAgICAgdmFsIHRpY2tMZW5ndGggPSBiYXJUaGlja25lc3MgLyA1XG5cbiAgICAgICAgdmFsIGJyZWFrSW5mb3MgPSBsYXlvdXQuYnJlYWtJbmZvcy5pdGVyYXRvcigpXG4gICAgICAgIGZvciAoYnJMYWJlbCBpbiBzcGVjLmJyZWFrcy5sYWJlbHMpIHtcbiAgICAgICAgICAgIHZhbCBickluZm8gPSBicmVha0luZm9zLm5leHQoKVxuXG4gICAgICAgICAgICB2YWwgdGlja0xvY2F0aW9uID0gYnJJbmZvLnRpY2tMb2NhdGlvblxuICAgICAgICAgICAgdmFsIHRpY2tNYXJrUG9pbnRzID0gQXJyYXlMaXN0PERvdWJsZVZlY3Rvcj4oKVxuICAgICAgICAgICAgaWYgKGhvcml6b250YWwpIHtcbiAgICAgICAgICAgICAgICB2YWwgdGlja1ggPSBiYXJCb3VuZHMubGVmdCArIHRpY2tMb2NhdGlvblxuICAgICAgICAgICAgICAgIHRpY2tNYXJrUG9pbnRzLmFkZChEb3VibGVWZWN0b3IodGlja1gsIGJhckJvdW5kcy50b3ApKVxuICAgICAgICAgICAgICAgIHRpY2tNYXJrUG9pbnRzLmFkZChEb3VibGVWZWN0b3IodGlja1gsIGJhckJvdW5kcy50b3AgKyB0aWNrTGVuZ3RoKSlcbiAgICAgICAgICAgICAgICB0aWNrTWFya1BvaW50cy5hZGQoRG91YmxlVmVjdG9yKHRpY2tYLCBiYXJCb3VuZHMuYm90dG9tIC0gdGlja0xlbmd0aCkpXG4gICAgICAgICAgICAgICAgdGlja01hcmtQb2ludHMuYWRkKERvdWJsZVZlY3Rvcih0aWNrWCwgYmFyQm91bmRzLmJvdHRvbSkpXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHZhbCB0aWNrWSA9IGJhckJvdW5kcy50b3AgKyB0aWNrTG9jYXRpb25cbiAgICAgICAgICAgICAgICB0aWNrTWFya1BvaW50cy5hZGQoRG91YmxlVmVjdG9yKGJhckJvdW5kcy5sZWZ0LCB0aWNrWSkpXG4gICAgICAgICAgICAgICAgdGlja01hcmtQb2ludHMuYWRkKERvdWJsZVZlY3RvcihiYXJCb3VuZHMubGVmdCArIHRpY2tMZW5ndGgsIHRpY2tZKSlcbiAgICAgICAgICAgICAgICB0aWNrTWFya1BvaW50cy5hZGQoRG91YmxlVmVjdG9yKGJhckJvdW5kcy5yaWdodCAtIHRpY2tMZW5ndGgsIHRpY2tZKSlcbiAgICAgICAgICAgICAgICB0aWNrTWFya1BvaW50cy5hZGQoRG91YmxlVmVjdG9yKGJhckJvdW5kcy5yaWdodCwgdGlja1kpKVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBhZGRUaWNrTWFyayhndWlkZUJhckdyb3VwLCB0aWNrTWFya1BvaW50c1swXSwgdGlja01hcmtQb2ludHNbMV0pXG4gICAgICAgICAgICBhZGRUaWNrTWFyayhndWlkZUJhckdyb3VwLCB0aWNrTWFya1BvaW50c1syXSwgdGlja01hcmtQb2ludHNbM10pXG5cbiAgICAgICAgICAgIHZhbCBsYWJlbCA9IFRleHRMYWJlbChickxhYmVsKVxuICAgICAgICAgICAgbGFiZWwuYWRkQ2xhc3NOYW1lKFN0eWxlLkxFR0VORF9JVEVNKVxuICAgICAgICAgICAgbGFiZWwuc2V0SG9yaXpvbnRhbEFuY2hvcihickluZm8ubGFiZWxIb3Jpem9udGFsQW5jaG9yKVxuICAgICAgICAgICAgbGFiZWwuc2V0VmVydGljYWxBbmNob3IoYnJJbmZvLmxhYmVsVmVydGljYWxBbmNob3IpXG4gICAgICAgICAgICBsYWJlbC5tb3ZlVG8oYnJJbmZvLmxhYmVsTG9jYXRpb24ueCwgYnJJbmZvLmxhYmVsTG9jYXRpb24ueSArIGJhckJvdW5kcy50b3ApXG4gICAgICAgICAgICBndWlkZUJhckdyb3VwLmNoaWxkcmVuKCkuYWRkKGxhYmVsLnJvb3RHcm91cClcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChkZWJ1Zykge1xuICAgICAgICAgICAgLy8gZnJhbWUgYmFyIGFuZCBsYWJlbHNcbiAgICAgICAgICAgIHZhbCBncmFwaEJvdW5kcyA9IERvdWJsZVJlY3RhbmdsZShEb3VibGVWZWN0b3IuWkVSTywgbGF5b3V0LmdyYXBoU2l6ZSlcbiAgICAgICAgICAgIGd1aWRlQmFyR3JvdXAuY2hpbGRyZW4oKS5hZGQoXG4gICAgICAgICAgICAgICAgY3JlYXRlVHJhbnNwYXJlbnRSZWN0KFxuICAgICAgICAgICAgICAgICAgICBncmFwaEJvdW5kcyxcbiAgICAgICAgICAgICAgICAgICAgQ29sb3IuREFSS19CTFVFLFxuICAgICAgICAgICAgICAgICAgICAxLjBcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICApXG4gICAgICAgIH1cblxuICAgICAgICBjb250ZW50Um9vdC5jaGlsZHJlbigpLmFkZChndWlkZUJhckdyb3VwKVxuICAgICAgICByZXR1cm4gbGF5b3V0LnNpemVcbiAgICB9XG5cbiAgICBwcml2YXRlIGZ1biBhZGRDb2xvckJhcihcbiAgICAgICAgZzogU3ZnR0VsZW1lbnQsXG4gICAgICAgIGRvbWFpbjogRG91YmxlU3BhbixcbiAgICAgICAgbWFwcGVyOiBTY2FsZU1hcHBlcjxDb2xvcj4sXG4gICAgICAgIG51bUJpbnM6IEludCxcbiAgICAgICAgYmFyQm91bmRzOiBEb3VibGVSZWN0YW5nbGUsXG4gICAgICAgIGJhckxlbmd0aEV4cGFuZDogRG91YmxlLFxuICAgICAgICBob3Jpem9udGFsOiBCb29sZWFuLFxuICAgICAgICByZXZlcnNlOiBCb29sZWFuXG4gICAgKSB7XG5cbiAgICAgICAgdmFsIGRvbWFpblNwYW4gPSBkb21haW4ubGVuZ3RoXG4gICAgICAgIHZhbCBzdGVwQ291bnQgPSBtYXgoMiwgbnVtQmlucylcbiAgICAgICAgdmFsIHN0ZXAgPSBkb21haW5TcGFuIC8gc3RlcENvdW50XG4gICAgICAgIHZhbCB2ID0gZG9tYWluLmxvd2VyRW5kICsgc3RlcCAvIDJcbiAgICAgICAgdmFsIGRvbWFpblZhbHVlcyA9IEFycmF5TGlzdDxEb3VibGU+KClcbiAgICAgICAgZm9yIChpIGluIDAgdW50aWwgc3RlcENvdW50KSB7XG4gICAgICAgICAgICBkb21haW5WYWx1ZXMuYWRkKHYgKyBzdGVwICogaSlcbiAgICAgICAgfVxuICAgICAgICBpZiAocmV2ZXJzZSkge1xuICAgICAgICAgICAgZG9tYWluVmFsdWVzLnJldmVyc2UoKVxuICAgICAgICB9XG5cbiAgICAgICAgdmFsIGNvbG9ycyA9IGRvbWFpblZhbHVlcy5tYXAgeyBtYXBwZXIoaXQpIH1cbiAgICAgICAgdmFsIGJhckxlbmd0aCA9IHdoZW4ge1xuICAgICAgICAgICAgaG9yaXpvbnRhbCAtPiBiYXJCb3VuZHMud2lkdGhcbiAgICAgICAgICAgIGVsc2UgLT4gYmFyQm91bmRzLmhlaWdodFxuICAgICAgICB9XG4gICAgICAgIHZhbCBlZmZlY3RpdmVCYXJMZW5ndGggPSBiYXJMZW5ndGggLSBiYXJMZW5ndGhFeHBhbmQgKiAyXG4gICAgICAgIHZhbCBzZWdtZW50U3RlcCA9IGVmZmVjdGl2ZUJhckxlbmd0aCAvIHN0ZXBDb3VudFxuXG4gICAgICAgIHZhciBzZWdtZW50TGVmdCA9IGJhckJvdW5kcy5sZWZ0XG4gICAgICAgIHZhbCBzZWdtZW50UmlnaHQgPSBiYXJCb3VuZHMucmlnaHRcbiAgICAgICAgdmFsIHNlZ21lbnRCb3R0b20gPSBiYXJCb3VuZHMuYm90dG9tXG4gICAgICAgIHZhciBzZWdtZW50VG9wID0gYmFyQm91bmRzLnRvcFxuXG4gICAgICAgIGZvciAoKGksIGNvbG9yKSBpbiBjb2xvcnMud2l0aEluZGV4KCkpIHtcbiAgICAgICAgICAgIHZhbCByID0gU3ZnUmVjdEVsZW1lbnQoXG4gICAgICAgICAgICAgICAgc2VnbWVudExlZnQsXG4gICAgICAgICAgICAgICAgc2VnbWVudFRvcCxcbiAgICAgICAgICAgICAgICBzZWdtZW50UmlnaHQgLSBzZWdtZW50TGVmdCxcbiAgICAgICAgICAgICAgICBzZWdtZW50Qm90dG9tIC0gc2VnbWVudFRvcFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgci5zdHJva2VXaWR0aCgpLnNldCgwLjApXG4gICAgICAgICAgICByLmZpbGxDb2xvcigpLnNldChjb2xvcilcbiAgICAgICAgICAgIGcuY2hpbGRyZW4oKS5hZGQocilcblxuICAgICAgICAgICAgaWYgKGhvcml6b250YWwpIHtcbiAgICAgICAgICAgICAgICBzZWdtZW50TGVmdCArPSBzZWdtZW50U3RlcFxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBzZWdtZW50VG9wICs9IHNlZ21lbnRTdGVwXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoaSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgLy8gZmlyc3Qgc2VnbWVudCBpcyBhIGJpdCBsb25nZXIuXG4gICAgICAgICAgICAgICAgaWYgKGhvcml6b250YWwpIHtcbiAgICAgICAg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AgICAgICBUZXh0LlZlcnRpY2FsQW5jaG9yLkNFTlRFUlxuICAgICAgICAgICAgKVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgY29tcGFuaW9uIG9iamVjdCB7XG4gICAgICAgIGZ1biBob3Jpem9udGFsKFxuICAgICAgICAgICAgdGl0bGU6IFN0cmluZyxcbiAgICAgICAgICAgIGRvbWFpbjogRG91YmxlU3BhbixcbiAgICAgICAgICAgIGJyZWFrczogU2NhbGVCcmVha3MsXG4gICAgICAgICAgICBiYXJTaXplOiBEb3VibGVWZWN0b3IsXG4gICAgICAgICAgICByZXZlcnNlOiBCb29sZWFuLFxuICAgICAgICAgICAgdGhlbWU6IExlZ2VuZFRoZW1lXG4gICAgICAgICk6IENvbG9yQmFyQ29tcG9uZW50TGF5b3V0IHtcbiAgICAgICAgICAgIHJldHVybiBIb3Jpem9udGFsTGF5b3V0KFxuICAgICAgICAgICAgICAgIHRpdGxlLFxuICAgICAgICAgICAgICAgIGRvbWFpbixcbiAgICAgICAgICAgICAgICBicmVha3MsXG4gICAgICAgICAgICAgICAgYmFyU2l6ZSxcbiAgICAgICAgICAgICAgICByZXZlcnNlLFxuICAgICAgICAgICAgICAgIHRoZW1lXG4gICAgICAgICAgICApXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gdmVydGljYWwoXG4gICAgICAgICAgICB0aXRsZTogU3RyaW5nLFxuICAgICAgICAgICAgZG9tYWluOiBEb3VibGVTcGFuLFxuICAgICAgICAgICAgYnJlYWtzOiBTY2FsZUJyZWFrcyxcbiAgICAgICAgICAgIGJhclNpemU6IERvdWJsZVZlY3RvcixcbiAgICAgICAgICAgIHJldmVyc2U6IEJvb2xlYW4sXG4gICAgICAgICAgICB0aGVtZTogTGVnZW5kVGhlbWVcbiAgICAgICAgKTogQ29sb3JCYXJDb21wb25lbnRMYXlvdXQge1xuICAgICAgICAgICAgcmV0dXJuIFZlcnRpY2FsTGF5b3V0KFxuICAgICAgICAgICAgICAgIHRpdGxlLFxuICAg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bG9yPixcbiAgICB2YWwgYmluQ291bnQ6IEludCxcbiAgICB0aGVtZTogTGVnZW5kVGhlbWUsXG4gICAgb3ZlcnJpZGUgdmFsIGxheW91dDogQ29sb3JCYXJDb21wb25lbnRMYXlvdXQsXG4gICAgcmV2ZXJzZTogQm9vbGVhblxuKSA6IExlZ2VuZEJveFNwZWModGl0bGUsIHRoZW1lLCByZXZlcnNlKSB7XG5cbiAgICBjb21wYW5pb24gb2JqZWN0IHtcbiAgICAgICAgY29uc3QgdmFsIERFRl9OVU1fQklOID0gMjBcblxuICAgICAgICBwcml2YXRlIGNvbnN0IHZhbCBERUZfQkFSX1RISUNLTkVTUyA9IDEuMCAgLy8gaW4gJ2tleS1zaXplJyBtdWx0aXBsZXNcbiAgICAgICAgcHJpdmF0ZSBjb25zdCB2YWwgREVGX0JBUl9MRU5HVEggPSA1LjAgICAvLyBpbiAna2V5LXNpemUnIG11bHRpcGxlc1xuXG4gICAgICAgIGludGVybmFsIGZ1biBiYXJBYnNvbHV0ZVNpemUoaG9yaXpvbnRhbDogQm9vbGVhbiwgdGhlbWU6IExlZ2VuZFRoZW1lKTogRG91YmxlVmVjdG9yIHtcbiAgICAgICAgICAgIHJldHVybiB3aGVuIHtcbiAgICAgICAgICAgICAgICBob3Jpem9udGFsIC0+IERvdWJsZVZlY3RvcihcbiAgICAgICAgICAgICAgICAgICAgREVGX0JBUl9MRU5HVEggKiB0aGVtZS5rZXlTaXplKCksXG4gICAgICAgICAgICAgICAgICAgIERFRl9CQVJfVEhJQ0tORVNTICogdGhlbWUua2V5U2l6ZSgpXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIGVsc2UgLT4gRG91YmxlVmVjdG9yKFxuICAgICAgICAgICAgICAgICAgICBERUZfQkFSX1RISUNLTkVTUyAqIHRoZW1lLmtleVNpemUoKSxcbiAgICAgICAgICAgICAgICAgICAgREVGX0JBUl9MRU5HVEggKiB0aGVtZS5rZXlTaXplKClcbiAgICAgICAgICAgICAg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9yLlpFUk8pXG5cbiAgICAgICAgICAgIHZhbCB0aXRsZVJlY3RTaXplID0gd2hlbiB7XG4gICAgICAgICAgICAgICAgbC5pc0hvcml6b250YWwgLT4ge1xuICAgICAgICAgICAgICAgICAgICBzcGVjLmNvbnRlbnRCb3VuZHMuZGltZW5zaW9uLnN1YnRyYWN0KERvdWJsZVZlY3RvcihsLmdyYXBoU2l6ZS54LCAwLjApKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIC0+IHtcbiAgICAgICAgICAgICAgICAgICAgRG91YmxlVmVjdG9yKHNwZWMuY29udGVudEJvdW5kcy53aWR0aCwgbC50aXRsZVNpemUueSlcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBEb3VibGVSZWN0YW5nbGUoRG91YmxlVmVjdG9yLlpFUk8sIHRpdGxlUmVjdFNpemUpXG4gICAgICAgIH1cblxuICAgICAgICBpZiAoaGFzVGl0bGUoKSkge1xuICAgICAgICAgICAgdmFsIGxhYmVsID0gY3JlYXRlVGl0bGVMYWJlbChcbiAgICAgICAgICAgICAgICB0aXRsZUJvdW5kaW5nUmVjdCxcbiAgICAgICAgICAgICAgICBsLnRpdGxlU2l6ZSxcbiAgICAgICAgICAgICAgICB0aGVtZS50aXRsZUp1c3RpZmljYXRpb24oKVxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgaW5uZXJHcm91cC5jaGlsZHJlbigpLmFkZChsYWJlbC5yb290R3JvdXApXG4gICAgICAgIH1cblxuICAgICAgICB2YWwgZ3JhcGhHcm91cCA9IFN2Z0dFbGVtZW50KClcbiAgICAgICAgZ3JhcGhHcm91cC50cmFuc2Zvcm0oKS5zZXQoYnVpbGRUcmFuc2Zvcm0obC5ncmFwaE9yaWdpbiwgMC4wKSlcbiAgICAgICAgYXBwZW5kR3VpZGVDb250ZW50KGdyYXBoR3JvdXApXG4gICAgICAgIGlubmVyR3JvdXAuY2hpbGRyZW4oKS5hZGQoZ3JhcGhHcm91cClcblxuICAgICAgICBpZiAoZGVidWcpIHtcbiAgICAgICAgICAgIC8vIG91dGVyIGJvdW5kc1xuICAgICAgICAgICAgdmFsIG91dGVyQm91bmRzID0gRG91YmxlUmVjdGFuZ2xlKERvdWJsZVZlY3Rvci5aRVJPLCBzcGVjLnNpemUpXG4gICAgICAgICAgICBhZGQoY3JlYXRlVHJhbnNwYXJlbnRSZWN0KG91dGVyQm91bmRzLCBDb2xvci5DWUFOLCAxLjApKVxuICAgICAgICAgICAgcnVuIHtcbiAgICAgICAgICAgICAgICAvLyBpbm5lciBib3VuZHNcbiAgICAgICAgICAgICAgICB2YWwgcmVjdCA9IFN2Z1JlY3RFbGVtZW50KHNwZWMuaW5uZXJCb3VuZHMpXG4gICAgICAgICAgICAgICAgcmVjdC5maWxsQ29sb3IoKS5zZXQoQ29sb3IuQkxBQ0spXG4gICAgICAgICAgICAgICAgcmVjdC5zdHJva2VXaWR0aCgpLnNldCgwLjApXG4gICAgICAgICAgICAgICAgcmVjdC5maWxsT3BhY2l0eSgpLnNldCgwLjEpXG4gICAgICAgICAgICAgICAgYWRkKHJlY3QpXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyBjb250ZW50IGJvdW5kc1xuICAgICAgICAgICAgYWRkKGNyZWF0ZVRyYW5zcGFyZW50UmVjdChzcGVjLmNvbnRlbnRCb3VuZHMsIENvbG9yLkRBUktfTUFHRU5UQSwgMS4wKSlcbiAgICAgICAgICAgIC8vIHRpdGxlIGJvdW5kc1xuICAgICAgICAgICAgdmFsIHJlY3QgPSB0aXRsZUJvdW5kaW5nUmVjdC5hZGQoc3BlYy5jb250ZW50T3JpZ2luKVxuICAgICAgICAgICAgYWRkKGNyZWF0ZVRyYW5zcGFyZW50UmVjdChyZWN0LCBDb2xvci5NQUdFTlRBLCAxLjApKVxuICAgICAgICAgICAgLy8gdGl0bGUgYm91bmRpbmcgYm94XG4gICAgICAgICAgICB2YWwgdGV4dERpbWVuc2lvbnMg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G4gICAgICAgICAgICBsaW5lSGVpZ2h0LFxuICAgICAgICAgICAganVzdGlmaWNhdGlvblxuICAgICAgICApXG4gICAgICAgIGxhYmVsLmFkZENsYXNzTmFtZShTdHlsZS5MRUdFTkRfVElUTEUpXG4gICAgICAgIGxhYmVsLnNldEhvcml6b250YWxBbmNob3IoaEFuY2hvcilcbiAgICAgICAgbGFiZWwuc2V0TGluZUhlaWdodChsaW5lSGVpZ2h0KVxuICAgICAgICBsYWJlbC5tb3ZlVG8ocG9zKVxuICAgICAgICByZXR1cm4gbGFiZWxcbiAgICB9XG5cbiAgICBjb21wYW5pb24gb2JqZWN0IHtcbiAgICAgICAgZnVuIGNyZWF0ZVRyYW5zcGFyZW50UmVjdChcbiAgICAgICAgICAgIGJvdW5kczogRG91YmxlUmVjdGFuZ2xlLFxuICAgICAgICAgICAgc3Ryb2tlQ29sb3I6IENvbG9yLFxuICAgICAgICAgICAgc3Ryb2tlV2lkdGg6IERvdWJsZVxuICAgICAgICApOiBTdmdSZWN0RWxlbWVudCB7XG4gICAgICAgICAgICB2YWwgcmVjdCA9IFN2Z1JlY3RFbGVtZW50KGJvdW5kcylcbiAgICAgICAgICAgIHJlY3Quc3Ryb2tlQ29sb3IoKS5zZXQoc3Ryb2tlQ29sb3IpXG4gICAgICAgICAgICByZWN0LnN0cm9rZVdpZHRoKCkuc2V0KHN0cm9rZVdpZHRoKVxuICAgICAgICAgICAgcmVjdC5maWxsT3BhY2l0eSgpLnNldCgwLjApXG4gICAgICAgICAgICByZXR1cm4gcmVjdFxuICAgICAgICB9XG4gICAgfVxufVxuIiwiLypcbiAqIENvcHlyaWdodCAoYykgMjAyMC4gSmV0QnJhaW5zIHMuci5vLlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgdGhlIE1JVCBsaWNlbnNlIHRoYXQgY2FuIGJlIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUuXG4gKi9cblxucGFja2FnZSBqZXRic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aE9yaWdpbjogRG91YmxlVmVjdG9yXG4gICAgICAgIGdldCgpID0gd2hlbiB7XG4gICAgICAgICAgICBpc0hvcml6b250YWwgLT4gd2l0aCh0aXRsZVNpemUpIHtcbiAgICAgICAgICAgICAgICBEb3VibGVWZWN0b3IoXG4gICAgICAgICAgICAgICAgICAgIHgsXG4gICAgICAgICAgICAgICAgICAgIGlmICh5ID4gZ3JhcGhTaXplLnkpICh5IC0gZ3JhcGhTaXplLnkpIC8gMiBlbHNlIDAuMFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgLT4gRG91YmxlVmVjdG9yKFxuICAgICAgICAgICAgICAgIDAuMCxcbiAgICAgICAgICAgICAgICAvLyBtYWtlIHNvbWUgc3BhY2UgYmV0d2VlbiB0aXRsZSBhbmQgdGhlIHJlc3Qgb2YgdGhlIGNvbnRlbnQuXG4gICAgICAgICAgICAgICAgdGl0bGVTaXplLnkgKyBQbG90TGFiZWxTcGVjRmFjdG9yeS5sZWdlbmRUaXRsZSh0aGVtZSkuaGVpZ2h0KCkgLyAyXG4gICAgICAgICAgICApXG4gICAgICAgIH1cblxuICAgIHZhbCBzaXplOiBEb3VibGVWZWN0b3JcbiAgICAgICAgZ2V0KCkge1xuICAgICAgICAgICAgdmFsIGdyYXBoQm91bmRzID0gRG91YmxlUmVjdGFuZ2xlKGdyYXBoT3JpZ2luLCBncmFwaFNpemUpXG4gICAgICAgICAgICB2YWwgdGl0bGVBbmRDb250ZW50ID0gRG91YmxlUmVjdGFuZ2xlKERvdWJsZVZlY3Rvci5aRVJPLCBEb3VibGVWZWN0b3IuWkVSTylcbiAgICAgICAgICAgICAgICAudW5pb24odGl0bGVCb3VuZHMpXG4gICAgICAgICAgICAgICAgLnVuaW9uKGdyYXBoQm91bmRzKVxuICAgICAgICAgICAgcmV0dXJuIHRpdGxlQW5kQ29udGVudC5kaW1lbnNpb25cbiAgICAgICAgfVxuXG4gICAgaW50ZXJuYWwg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gZm9yIChsYXllciBpbiBteUxheWVycykge1xuICAgICAgICAgICAgICAgIHZhbCBsYXllck1pbktleVNpemUgPSBsYXllci5rZXlFbGVtZW50RmFjdG9yeS5taW5pbXVtS2V5U2l6ZShsYXllci5kYXRhUG9pbnQpXG4gICAgICAgICAgICAgICAgbWluU2l6ZSA9IG1pblNpemUubWF4KGxheWVyTWluS2V5U2l6ZSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBtaW5TaXplXG4gICAgICAgIH1cblxuICAgIHZhbCBpc0VtcHR5OiBCb29sZWFuXG4gICAgICAgIGdldCgpID0gbXlMYXllcnMuaXNFbXB0eSgpXG5cbiAgICBmdW4gYWRkTGF5ZXIoZGF0YVBvaW50OiBEYXRhUG9pbnRBZXN0aGV0aWNzLCBrZXlFbGVtZW50RmFjdG9yeTogTGVnZW5kS2V5RWxlbWVudEZhY3RvcnkpIHtcbiAgICAgICAgbXlMYXllcnMuYWRkKFxuICAgICAgICAgICAgTGVnZW5kQnJlYWtMYXllcihcbiAgICAgICAgICAgICAgICBkYXRhUG9pbnQsXG4gICAgICAgICAgICAgICAga2V5RWxlbWVudEZhY3RvcnlcbiAgICAgICAgICAgIClcbiAgICAgICAgKVxuICAgIH1cblxuICAgIGZ1biBjcmVhdGVLZXlFbGVtZW50KHNpemU6IERvdWJsZVZlY3Rvcik6IFN2Z0dFbGVtZW50IHtcbiAgICAgICAgdmFsIGcgPSBTdmdHRWxlbWVudCgpXG5cbiAgICAgICAgZm9yIChsYXllciBpbiBteUxheWVycykge1xuICAgICAgICAgICAgdmFsIGtleUVsZW1lbnQgPSBsYXllci5rZXlFbGVtZW50RmFjdG9yeS5jcmVhdGVLZXlFbGVtZW50KGxheWVyLmRhdGFQb2ludCwgc2l6ZSlcbiAgICAgICAgICAgIGcuY2hpbGRyZW4oKS5hZGQoa2V5RWxlbWVudClcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBnXG4gICAgfVxuXG4gICAgcHJpdmF0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Zm9yIChiciBpbiBzcGVjLmJyZWFrcykge1xuICAgICAgICAgICAgdmFsIGtleUxhYmVsQm94ID0ga2V5TGFiZWxCb3hlcy5uZXh0KClcbiAgICAgICAgICAgIHZhbCBsYWJlbEJveCA9IGxhYmVsQm94ZXMubmV4dCgpXG4gICAgICAgICAgICB2YWwga2V5U2l6ZSA9IGtleVNpemVzLm5leHQoKVxuICAgICAgICAgICAgdmFsIGJyZWFrRWxlbWVudCA9IGNyZWF0ZUJyZWFrRWxlbWVudChiciwga2V5U2l6ZSwga2V5TGFiZWxCb3gsIGxhYmVsQm94KVxuICAgICAgICAgICAgY29udGVudFJvb3QuY2hpbGRyZW4oKS5hZGQoYnJlYWtFbGVtZW50KVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGRlYnVnKSB7XG4gICAgICAgICAgICB2YWwgZ3JhcGhCb3VuZHMgPSBEb3VibGVSZWN0YW5nbGUoRG91YmxlVmVjdG9yLlpFUk8sIGxheW91dC5ncmFwaFNpemUpXG4gICAgICAgICAgICBjb250ZW50Um9vdC5jaGlsZHJlbigpLmFkZChcbiAgICAgICAgICAgICAgICBjcmVhdGVUcmFuc3BhcmVudFJlY3QoXG4gICAgICAgICAgICAgICAgICAgIGdyYXBoQm91bmRzLFxuICAgICAgICAgICAgICAgICAgICBDb2xvci5EQVJLX0JMVUUsXG4gICAgICAgICAgICAgICAgICAgIDEuMFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgIClcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbGF5b3V0LnNpemVcbiAgICB9XG5cbiAgICBwcml2YXRlIGZ1biBjcmVhdGVCcmVha0VsZW1lbnQoXG4gICAgICAgIGJyOiBMZWdlbmRCcmVhayxcbiAgICAgICAga2V5U2l6ZTogRG91YmxlVmVjdG9yLFxuICAgICAgICBrZXlMYWJlbEJveDogRG91YmxlUmVjdGFuZ2xlLFxuICAgICAgICBsYWJlbEJveDogRG91YmxlUmVjdGFuZ2xlXG4gICAgKTog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VjdG9yPyA9IG51bGxcbiAgICBwcml2YXRlIHZhbCBteUtleUxhYmVsQm94ZXMgPSBBcnJheUxpc3Q8RG91YmxlUmVjdGFuZ2xlPigpXG4gICAgcHJpdmF0ZSB2YWwgbXlMYWJlbEJveGVzID0gQXJyYXlMaXN0PERvdWJsZVJlY3RhbmdsZT4oKVxuXG4gICAgdmFyIGlzRmlsbEJ5Um93ID0gZmFsc2VcbiAgICB2YXIgcm93Q291bnQgPSAwXG4gICAgICAgIHNldChyb3dDb3VudCkge1xuICAgICAgICAgICAgY2hlY2socm93Q291bnQgPiAwKSB7IFwiUm93IGNvdW50IG11c3QgYmUgZ3JlYXRlciB0aGFuIDAsIHdhcyAkcm93Q291bnRcIiB9XG4gICAgICAgICAgICBmaWVsZCA9IHJvd0NvdW50XG4gICAgICAgIH1cbiAgICB2YXIgY29sQ291bnQgPSAwXG4gICAgICAgIHNldChjb2xDb3VudCkge1xuICAgICAgICAgICAgY2hlY2soY29sQ291bnQgPiAwKSB7IFwiQ29sIGNvdW50IG11c3QgYmUgZ3JlYXRlciB0aGFuIDAsIHdhcyAkY29sQ291bnRcIiB9XG4gICAgICAgICAgICBmaWVsZCA9IGNvbENvdW50XG4gICAgICAgIH1cblxuICAgIG92ZXJyaWRlIHZhbCBncmFwaFNpemU6IERvdWJsZVZlY3RvclxuICAgICAgICBnZXQoKSB7XG4gICAgICAgICAgICBlbnN1cmVJbml0ZWQoKVxuICAgICAgICAgICAgcmV0dXJuIG15Q29udGVudFNpemUhIVxuICAgICAgICB9XG5cbiAgICB2YWwga2V5TGFiZWxCb3hlczogTGlzdDxEb3VibGVSZWN0YW5nbGU+XG4gICAgICAgIGdldCgpIHtcbiAgICAgICAgICAgIGVuc3VyZUluaXRlZCgpXG4gICAgICAgICAgICByZXR1cm4gbXlLZXlMYWJlbEJveGVzXG4gICAgICAgIH1cblxuICAgIHZhbCBsYWJlbEJveGVzOiBMaXN0PERvdWJsZVJlY3RhbmdsZT5cbiAgICAgICAgZ2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WxTaXplLngsIGtleVNpemUueSlcbiAgICAgICAgICAgIGJyZWFrQm94Qm91bmRzID0gRG91YmxlUmVjdGFuZ2xlKFxuICAgICAgICAgICAgICAgIGJyZWFrQm94Qm91bmRzPy5sZXQgeyBicmVha0JveE9yaWdpbihpLCBpdCkgfSA/OiBjb250ZW50T3JpZ2luLFxuICAgICAgICAgICAgICAgIGJyZWFrQm94U2l6ZVxuICAgICAgICAgICAgKVxuXG4gICAgICAgICAgICBteUtleUxhYmVsQm94ZXMuYWRkKGJyZWFrQm94Qm91bmRzKVxuICAgICAgICAgICAgbXlMYWJlbEJveGVzLmFkZChcbiAgICAgICAgICAgICAgICBEb3VibGVSZWN0YW5nbGUoXG4gICAgICAgICAgICAgICAgICAgIGxhYmVsSE9mZnNldCwgbGFiZWxWT2Zmc2V0LFxuICAgICAgICAgICAgICAgICAgICBsYWJlbFNpemUueCwgbGFiZWxTaXplLnlcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICApXG4gICAgICAgIH1cblxuICAgICAgICBteUNvbnRlbnRTaXplID0gR2VvbWV0cnlVdGlsLnVuaW9uKERvdWJsZVJlY3RhbmdsZShjb250ZW50T3JpZ2luLCBEb3VibGVWZWN0b3IuWkVSTyksIG15S2V5TGFiZWxCb3hlcykuZGltZW5zaW9uXG4gICAgfVxuXG4gICAgcHJvdGVjdGVkIGFic3RyYWN0IGZ1biBicmVha0JveE9yaWdpbihpbmRleDogSW50LCBwcmV2QnJlYWtCb3hCb3VuZHM6IERvdWJsZVJlY3RhbmdsZSk6IERvdWJsZVZlY3RvclxuXG4gICAgcHJvdGVjdGVkIGFic3RyYWN0IGZ1biBsYWJlbFNpemUoaW5kZXg6IEludCk6IERvdWJsZVZlY3RvclxuXG4gICAgcHJpdmF0ZSBjbGFzcyBNeUhvcml6b250YWwgaW50ZXJuYWwgY29uc3RydWN0b3IoXG4gICAgICAgIHRpdGxlOiBTdHJpbmcsXG4gICAgICAgIGJyZWFrczogTGlzdDxMZWdlbmR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lbmRCcmVhaz4sXG4gICAgICAgIGtleVNpemVzOiBMaXN0PERvdWJsZVZlY3Rvcj4sXG4gICAgICAgIHRoZW1lOiBMZWdlbmRUaGVtZVxuICAgICkgOiBNeU11bHRpUm93KFxuICAgICAgICB0aXRsZSwgYnJlYWtzLCBrZXlTaXplcyxcbiAgICAgICAgTGVnZW5kRGlyZWN0aW9uLkhPUklaT05UQUwsXG4gICAgICAgIHRoZW1lXG4gICAgKSB7XG4gICAgICAgIGluaXQge1xuICAgICAgICAgICAgY29sQ291bnQgPSBicmVha3Muc2l6ZVxuICAgICAgICAgICAgcm93Q291bnQgPSAxXG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBwcml2YXRlIGNsYXNzIE15VmVydGljYWwgaW50ZXJuYWwgY29uc3RydWN0b3IoXG4gICAgICAgIHRpdGxlOiBTdHJpbmcsXG4gICAgICAgIGJyZWFrczogTGlzdDxMZWdlbmRCcmVhaz4sXG4gICAgICAgIGtleVNpemVzOiBMaXN0PERvdWJsZVZlY3Rvcj4sXG4gICAgICAgIHRoZW1lOiBMZWdlbmRUaGVtZVxuICAgICkgOiBNeU11bHRpUm93KFxuICAgICAgICB0aXRsZSwgYnJlYWtzLCBrZXlTaXplcyxcbiAgICAgICAgTGVnZW5kRGlyZWN0aW9uLlZFUlRJQ0FMLFxuICAgICAgICB0aGVtZVxuICAgICkge1xuICAgICAgICBpbml0IHtcbiAgICAgICAgICAgIGNvbENvdW50ID0gMVxuICAgICAgICAgICAgcm93Q291bnQgPSBicmVha3Muc2l6ZVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgcHJpdmF0ZSBhYnN0cmFjdCBjbGFzcyBNeU11bHRpUm93IGludGVybmFsIGNvbnN0cnVjdG9yKFxuICAgICAgICB0aXRsZTogU3RyaW5nLFxuICAgICAgICBicmVha3M6IExpc3Q8TGVnZW5kQnJlYWs+LFxuICAgICAgICBrZXlTaXplczogTGlzdDxEb3VibGVWZWN0b3I+LFxuICAgICAgICBsZWdlbmREaXJlY3Rpb246IExlZ2VuZERpcmVjdGlvbixcbiAgICAgICAgdGhlbWU6IExlZ2VuZFRoZW1lXG4gICAgKSA6IExlZ2VuZENvbXBvbmVudExheW91dCh0aXRsZSwgYnJlYWtzLCBrZXlTaXplcywgbGVnZW5kRGlyZWN0aW9uLCB0aGVtZSkge1xuICAgICAgICBwcml2YXRlIHZhciBteU1heExhYmVsV2lkdGggPSAwLjBcblxuICAgICAgICBpbml0IHtcbiAgICAgICAgICAgIGZvciAoYnIgaW4gYnJlYWtzKSB7XG4gICAgICAgICAgICAgICAgbXlNYXhMYWJlbFdpZHRoID0gbWF4KG15TWF4TGFiZWxXaWR0aCwgUGxvdExhYmVsU3BlY0ZhY3RvcnkubGVnZW5kSXRlbSh0aGVtZSkud2lkdGgoYnIubGFiZWwpKVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgb3ZlcnJpZGUgZnVuIGJyZWFrQm94T3JpZ2luKGluZGV4OiBJbnQsIHByZXZCcmVha0JveEJvdW5kczogRG91YmxlUmVjdGFuZ2xlKTogRG91YmxlVmVjdG9yIHtcbiAgICAgICAgICAgIGlmIChpc0ZpbGxCeVJvdykge1xuICAgICAgICAgICAgICAgIHJldHVybiBpZiAoaW5kZXggJSBjb2xDb3VudCA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIERvdWJsZVZlY3RvcigwLjAsIHByZXZCcmVha0JveEJvdW5kcy5ib3R0b20pXG4gICAgICAgICAgICAgICAgfSBlbHNlIERvdWJsZVZlY3RvcihwcmV2QnJlYWtCb3hCb3VuZHMucmlnaHQsIHByZXZCcmVha0JveEJvdW5kcy50b3ApXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIGZpbGwgYnkgY29sdW1uXG4gICAgICAgICAgICByZXR1cm4gaWYgKGluZGV4ICUgcm93Q291bnQgPT0gMCkge1xuICAgICAgICAgICAgICAgIERvdWJsZVZlY3RvcihwcmV2QnJlYWtCb3hCb3VuZHMucmlnaHQsIDAuMClcbiAgICAgICAgICAgIH0gZWxzZSBEb3VibGVWZWN0b3IocHJldkJyZWFrQm94Qm91bmRzLmxlZnQsIHByZXZCcmVha0JveEJvdW5kcy5ib3R0b20pXG5cbiAgICAgICAgfVxuXG4gICAgICAgIG92ZXJyaWRlIGZ1biBsYWJlbFNpemUoaW5kZXg6IEludCk6IERvdWJsZVZlY3RvciB7XG4gICAgICAgICAgICByZXR1cm4gRG91YmxlVmVjdG9yKG15TWF4TGFiZWxXaWR0aCwgUGxvdExhYmVsU3BlY0ZhY3RvcnkubGVnZW5kSXRlbSh0aGVtZSkuaGVpZ2h0KCkpXG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBjb21wYW5pb24gb2JqZWN0IHtcbiAgICAgICAgZnVuIGhvcml6b250YWwodGl0bGU6IFN0cmluZywgYnJlYWtzOiBMaXN0PExlZ2VuZEJyZWFrPiwga2V5U2l6ZXM6IExpc3Q8RG91YmxlVmVjdG9yPiwgdGhlbWU6IExlZ2VuZFRoZW1lKTogTGVnZW5kQ29tcG9uZW50TGF5b3V0IHtcbiAgICAgICAgICAgIHJldHVybiBNeUhvcml6b250YWwoXG4gICAgICAgICAgICAgICAgdGl0bGUsXG4gICAgICAgICAgICAgICAgYnJlYWtzLFxuICAgICAgICAgICAgICAgIGtleVNpemVzLFxuICAgICAgICAgICAgICAgIHRoZW1lXG4gICAgICAgICAgICApXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gaG9yaXpvbnRhbE11bHRpUm93KHRpdGxlOiBTdHJpbmcsIGJyZWFrczogTGlzdDxMZWdlbmRCcmVhaz4sIGtleVNpemVzOiBMaXN0PERvdWJsZVZlY3Rvcj4sIHRoZW1lOiBMZWdlbmRUaGVtZSk6IExlZ2VuZENvbXBvbmVudExheW91dCB7XG4gICAgICAgICAgICByZXR1cm4gTXlIb3Jpem9udGFsTXVsdGlSb3coXG4gICAgICAgICAgICAgICAgdGl0bGUsXG4gICAgICAgICAgICAgICAgYnJlYWt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ICAgICAgICAgICAgdG9vbHRpcExpbmVzID0gZW1wdHlMaXN0KCksXG4gICAgICAgICAgICAgICAgICAgIHRvb2x0aXBBbmNob3IgPSBudWxsLFxuICAgICAgICAgICAgICAgICAgICB0b29sdGlwTWluV2lkdGggPSBudWxsLFxuICAgICAgICAgICAgICAgICAgICBpZ25vcmVJbnZpc2libGVUYXJnZXRzID0gZmFsc2UsXG4gICAgICAgICAgICAgICAgICAgIGhhc0dlbmVyYWxUb29sdGlwID0gZmFsc2UsXG4gICAgICAgICAgICAgICAgICAgIGhhc0F4aXNUb29sdGlwID0gZmFsc2UsXG4gICAgICAgICAgICAgICAgICAgIGlzQ3Jvc3NoYWlyRW5hYmxlZCA9IGZhbHNlLFxuICAgICAgICAgICAgICAgICAgICB0b29sdGlwVGl0bGUgPSBudWxsXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxufVxuIiwiLypcbiAqIENvcHlyaWdodCAoYykgMjAxOS4gSmV0QnJhaW5zIHMuci5vLlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgdGhlIE1JVCBsaWNlbnNlIHRoYXQgY2FuIGJlIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUuXG4gKi9cblxucGFja2FnZSBqZXRicmFpbnMuZGF0YWxvcmUucGxvdC5idWlsZGVyLmludGVyYWN0XG5cbmltcG9ydCBqZXRicmFpbnMuZGF0YWxvcmUucGxvdC5iYXNlLkFlc1xuaW1wb3J0IGpldGJyYWlucy5kYXRhbG9yZS5wbG90LmJhc2UuRGF0YUZyYW1lXG5pbXBvcnQgamV0YnJhaW5zLmRhdGFsb3JlLnBsb3QuYmFzZS5pbnRlcmFjdC5Db250ZXh0dWFsTWFwcGluZ1xuaW1wb3J0IGpldGJyYWlucy5kYXRhbG9yZS5wbG90LmJhc2UuaW50ZXJhY3QuR2VvbVRhcmdldExvY2F0b3IuKlxuaW1wb3J0IG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Dcm9zc2hhaXJFbmFibGVkLFxuICAgICAgICAgICAgbXlUb29sdGlwVGl0bGU/LmxldCg6OlRvb2x0aXBMaW5lKVxuICAgICAgICApXG4gICAgfVxuXG4gICAgY29tcGFuaW9uIG9iamVjdCB7XG4gICAgICAgIC8vIEZvciB0ZXN0c1xuICAgICAgICBmdW4gY3JlYXRlVGVzdENvbnRleHR1YWxNYXBwaW5nKFxuICAgICAgICAgICAgYWVzTGlzdEZvclRvb2x0aXA6IExpc3Q8QWVzPCo+PixcbiAgICAgICAgICAgIGF4aXNBZXM6IExpc3Q8QWVzPCo+PixcbiAgICAgICAgICAgIG91dGxpZXJzOiBMaXN0PEFlczwqPj4sXG4gICAgICAgICAgICBkYXRhQWNjZXNzOiBNYXBwZWREYXRhQWNjZXNzLFxuICAgICAgICAgICAgZGF0YUZyYW1lOiBEYXRhRnJhbWUsXG4gICAgICAgICAgICB1c2VyRGVmaW5lZFZhbHVlU291cmNlczogTGlzdDxWYWx1ZVNvdXJjZT4/ID0gbnVsbFxuICAgICAgICApOiBDb250ZXh0dWFsTWFwcGluZyB7XG4gICAgICAgICAgICB2YWwgZGVmYXVsdFRvb2x0aXBMaW5lcyA9IEdlb21JbnRlcmFjdGlvbkJ1aWxkZXJVdGlsLmRlZmF1bHRWYWx1ZVNvdXJjZVRvb2x0aXBMaW5lcyhcbiAgICAgICAgICAgICAgICBhZXNMaXN0Rm9yVG9vbHRpcCxcbiAgICAgICAgICAgICAgICBheGlzQWVzLFxuICAgICAgICAgICAgICAgIG91dGxpZXJzLFxuICAgICAgICAgICAgICAgIHVzZXJEZWZpbmVkVmFsdWVTb3VyY2VzXG4gICAgICAgICAgICApXG4gICAgICAgICAgICByZXR1cm4gY3JlYXRlQ29udGV4dHVhbE1hcHBpbmcoXG4gICAgICAgICAgICAgICAgZGVmYXVsdFRvb2x0aXBMaW5lcyxcbiAgICAgICAgICAgICAgICBkYXRhQWNjZXNzLFxuICAgICAgICAgICAgICAgIGRhdGFGcmFtZSxcbiAgICAgICAgICAgICAgICBUb29sdGlwUHJvcGVydGllcy5OT05FLFxuICAgICAgICAgICAgICAgIGlnbm9yZUludmlzaWJsZVRhcmdldHMgPSBmYWxzZSxcbiAgICAgICAgICAgICAgICBpc0Nyb3NzaGFpckVuYWJsZWQgPSBmYWxzZSxcbiAgICAgICAgICAgICAgICB0b29sdGlwVGl0bGUgPSBudWxsXG4gICAgICAgICAgICApXG4gICAgICAgIH1cblxuICAgICAgICBwcml2YXRlIGZ1biBjcmVhdGVDb250ZXh0dWFsTWFwcGluZyhcbiAgICAgICAgICAgIHRvb2x0aXBMaW5lczogTGlzdDxUb29sdGlwTGluZT4sXG4gICAgICAgICAgICBkYXRhQWNjZXNzOiBNYXBwZWREYXRhQWNjZXNzLFxuICAgICAgICAgICAgZGF0YUZyYW1lOiBEYXRhRnJhbWUsXG4gICAgICAgICAgICB0b29sdGlwUHJvcGVydGllczogVG9vbHRpcFByb3BlcnRpZXMsXG4gICAgICAgICAgICBpZ25vcmVJbnZpc2libGVUYXJnZXRzOiBCb29sZWFuLFxuICAgICAgICAgICAgaXNDcm9zc2hhaXJFbmFibGVkOiBCb29sZWFuLFxuICAgICAgICAgICAgdG9vbHRpcFRpdGxlOiBUb29sdGlwTGluZT9cbiAgICAgICAgKTogQ29udGV4dHVhbE1hcHBpbmcge1xuICAgICAgICAgICAgdmFsIG1hcHBlZFRvb2x0aXBMaW5lcyA9IHRvb2x0aXBMaW5lcy5maWx0ZXIgeyBsaW5lIC0+XG4gICAgICAgICAgICAgICAgdmFsIGRhdGFBZXNMaXN0ID0gbGluZS5maWVsZHMuZmlsdGVySXNJbnN0YW5jZTxNYXBwaW5nVmFsdWU+KClcbiAgICAgICAgICAgICAgICBkYXRhQWVzTGlzdC5hbGwgeyBtYXBwZWRBZXMgLT4gZGF0YUFjY2Vzcy5pc01hcHBlZChtYXBwZWRBZXMuYWVzKSB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBtYXBwZWRUb29sdGlwTGluZXMuZm9yRWFjaCB7IGl0LmluaXREYXRhQ29udGV4dChkYXRhRnJhbWUsIGRhdGFBY2Nlc3MpIH1cblxuICAgICAgICAgICAgdmFsIGhhc0dlbmVyYWxUb29sdGlwID0gbWFwcGVkVG9vbHRpcExpbmVzLmFueSB7IGxpbmUgLT5cbiAgICAgICAgICAgICAgICBsaW5lLmZpZWxkcy5ub25lKFZhbHVlU291cmNlOjppc091dGxpZXIpXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YWwgaGFzQXhpc1Rvb2x0aXAgPSBtYXBwZWRUb29sdGlwTGluZXMuYW55IHsgbGluZSAtPlxuICAgICAgICAgICAgICAgIGxpbmUuZmllbGRzLmFueShWYWx1ZVNvdXJjZTo6aXNBeGlzKVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB0b29sdGlwVGl0bGU/LmluaXREYXRhQ29udGV4dChkYXRhRnJhbWUsIGRhdGFBY2Nlc3MpXG5cbiAgICAgICAgICAgIHJldHVybiBDb250ZXh0dWFsTWFwcGluZyhcbiAgICAgICAgICAgICAgICBtYXBwZWRUb29sdGlwTGluZXMsXG4gICAgICAgICAgICAgICAgdG9vbHRpcFByb3BlcnRpZXMuYW5jaG9yLFxuICAgICAgICAgICAgICAgIHRvb2x0aXBQcm9wZXJ0aWVzLm1pbldpZHRoLFxuICAgICAgICAgICAgICAgIGlnbm9yZUludmlzaWJsZVRhcmdldHMsXG4gICAgICAgICAgICAgICAgaGFzR2VuZXJhbFRvb2x0aXAsXG4gICAgICAgICAgICAgICAgaGFzQXhpc1Rvb2x0aXAsXG4gICAgICAgICAgICAgICAgaXNDcm9zc2hhaXJFbmFibGVkLFxuICAgICAgICAgICAgICAgIHRvb2x0aXBUaXRsZVxuICAgICAgICAgICAgKVxuICAgICAgICB9XG4gICAgfVxufVxuIiwiLypcbiAqIENvcHlyaWdodCAoYykgMjAxOS4gSmV0QnJhaW5zIHMuci5vLlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaX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GwgLT4ge1xuICAgICAgICAgICAgICAgIC8vIE5vIHVzZXIgdG9vbHRpcCBzcGVjaWZpY2F0aW9uID0+IHVzZSBkZWZhdWx0IHRvb2x0aXBzXG4gICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlU291cmNlVG9vbHRpcExpbmVzKFxuICAgICAgICAgICAgICAgICAgICB0b29sdGlwQWVzLFxuICAgICAgICAgICAgICAgICAgICB0b29sdGlwQXhpc0FlcyxcbiAgICAgICAgICAgICAgICAgICAgc2lkZVRvb2x0aXBBZXMsXG4gICAgICAgICAgICAgICAgICAgIHVzZXJEZWZpbmVkVmFsdWVTb3VyY2VzID0gbnVsbCxcbiAgICAgICAgICAgICAgICAgICAgY29uc3RhbnRzTWFwID0gdG9vbHRpcENvbnN0YW50QWVzXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdXNlclRvb2x0aXBTcGVjLnVzZURlZmF1bHRUb29sdGlwcygpIC0+IHtcbiAgICAgICAgICAgICAgICAvLyBObyB1c2VyIGxpbmUgcGF0dGVybnMgPT4gdXNlIGRlZmF1bHQgdG9vbHRpcHMgd2l0aCB0aGUgZ2l2ZW4gZm9ybWF0dGVkIHZhbHVlU291cmNlc1xuICAgICAgICAgICAgICAgIGRlZmF1bHRWYWx1ZVNvdXJjZVRvb2x0aXBMaW5lcyhcbiAgICAgICAgICAgICAgICAgICAgdG9vbHRpcEFlcyxcbiAgICAgICAgICAgICAgICAgICAgdG9vbHRpcEF4aXNBZXMsXG4gICAgICAgICAgICAgICAgICAgIHNpZGVUb29sdGlwQWVzLFxuICAgICAgICAgICAgICAgICAgICB1c2VyVG9vbHRpcFNwZWMudmFsdWVTb3VyY2VzLFxuICAgICAgICAgICAgICAgICAgICB0b29sdGlwQ29uc3RhbnRBZXNcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB1c2VyVG9vbHRpcFNwZWMuaGlkZVRvb2x0aXBzKCkgLT4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saWVyVmFsdWVTb3VyY2VzID0gZ2VvbU91dGxpZXJzLm1hcCB7IGFlcyAtPlxuICAgICAgICAgICAgICAgICAgICBnZXRNYXBwaW5nVmFsdWVTb3VyY2UoYWVzLCBpc091dGxpZXIgPSB0cnVlLCBpc0F4aXMgPSBmYWxzZSwgdXNlclRvb2x0aXBTcGVjLnZhbHVlU291cmNlcylcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB1c2VyVG9vbHRpcFNwZWMudG9vbHRpcExpbmVQYXR0ZXJucyArXG4gICAgICAgICAgICAgICAgICAgICAgICAoYXhpc1ZhbHVlU291cmNlcyArIGdlb21PdXRsaWVyVmFsdWVTb3VyY2VzKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5tYXAoVG9vbHRpcExpbmUuQ29tcGFuaW9uOjpkZWZhdWx0TGluZUZvclZhbHVlU291cmNlKVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG5cbiAgICBwcml2YXRlIGZ1biBnZXRNYXBwaW5nVmFsdWVTb3VyY2UoXG4gICAgICAgIGFlczogQWVzPCo+LFxuICAgICAgICBpc091dGxpZXI6IEJvb2xlYW4sXG4gICAgICAgIGlzQXhpczogQm9vbGVhbixcbiAgICAgICAgdXNlckRlZmluZWRWYWx1ZVNvdXJjZXM6IExpc3Q8VmFsdWVTb3VyY2U+P1xuICAgICk6IFZhbHVlU291cmNlIHtcbiAgICAgICAgdmFsIHVzZXJEZWZpbmVkID0gdXNlckRlZmluZWRWYWx1ZVNvdXJjZXM/LmZpbHRlcklzSW5zdGFuY2U8TWFwcGluZ1ZhbHVlPigpPy5maW5kIHsgaXQuYWVzID09IGFlcyB9XG4gICAgICAgIHJldHVybiB1c2VyRGVmaW5lZD8ud2l0aEZsYWdzKGlzT3V0bGllciwgaXNBeGlzKSA/OiBNYXBwaW5nVmFsdWUoXG4gICAgICAgICAgICBhZXMsXG4gICAgICAgICAgICBpc091dGxpZXIgPSBpc091dGxp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cmVhOiBCb29sZWFuLFxuICAgICAgICAgICAgYXhpc1Rvb2x0aXBWaXNpYmlsaXR5RnJvbUNvbmZpZzogQm9vbGVhbj8gPSBudWxsXG4gICAgICAgICk6IEdlb21Ub29sdGlwU2V0dXAge1xuICAgICAgICAgICAgdmFsIGF4aXNUb29sdGlwVmlzaWJpbGl0eUZyb21GdW5jdGlvbktpbmQgPSAhYXJlYVxuICAgICAgICAgICAgdmFsIGxvY2F0b3JMb29rdXBTdHJhdGVneSA9IGlmIChhcmVhKSB7XG4gICAgICAgICAgICAgICAgR2VvbVRhcmdldExvY2F0b3IuTG9va3VwU3RyYXRlZ3kuSE9WRVJcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgR2VvbVRhcmdldExvY2F0b3IuTG9va3VwU3RyYXRlZ3kuTkVBUkVTVFxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gR2VvbVRvb2x0aXBTZXR1cChcbiAgICAgICAgICAgICAgICBsb2NhdG9yTG9va3VwU3RyYXRlZ3kgPSBsb2NhdG9yTG9va3VwU3RyYXRlZ3ksXG4gICAgICAgICAgICAgICAgbG9jYXRvckxvb2t1cFNwYWNlID0gR2VvbVRhcmdldExvY2F0b3IuTG9va3VwU3BhY2UuWFksXG4gICAgICAgICAgICAgICAgYXhpc0Flc0Zyb21GdW5jdGlvbktpbmQgPSBBRVNfWFksXG4gICAgICAgICAgICAgICAgYXhpc1Rvb2x0aXBWaXNpYmlsaXR5RnJvbUZ1bmN0aW9uS2luZCA9IGF4aXNUb29sdGlwVmlzaWJpbGl0eUZyb21GdW5jdGlvbktpbmQsXG4gICAgICAgICAgICAgICAgYXhpc1Rvb2x0aXBFbmFibGVkID0gaXNBeGlzVG9vbHRpcEVuYWJsZWQoXG4gICAgICAgICAgICAgICAgICAgIGF4aXNUb29sdGlwVmlzaWJpbGl0eUZyb21Db25maWcsXG4gICAgICAgICAgICAgICAgICAgIGF4aXNUb29sdGlwVmlzaWJpbGl0eUZyb21GdW5jdGlvbktpbmRcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICApXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gbm9uZSgpOiBHZW9tVG9vbHRpcFNldHVwIHtcbiAgICAgICAgICAgIHZhbCBheGlzVG9vbHRpcFZpc2liaWxpdHlGcm9tRnVuY3Rpb25LaW5kID0gdHJ1ZVxuICAgICAgICAgICAgcmV0dXJuIEdlb21Ub29sdGlwU2V0dXAoXG4gICAgICAgICAgICAgICAgbG9jYXRvckxvb2t1cFN0cmF0ZWd5ID0gR2VvbVRhcmdldExvY2F0b3IuTG9va3VwU3RyYXRlZ3kuTk9ORSxcbiAgICAgICAgICAgICAgICBsb2NhdG9yTG9va3VwU3BhY2UgPSBHZW9tVGFyZ2V0TG9jYXRvci5Mb29rdXBTcGFjZS5OT05FLFxuICAgICAgICAgICAgICAgIGF4aXNBZXNGcm9tRnVuY3Rpb25LaW5kID0gZW1wdHlMaXN0KCksXG4gICAgICAgICAgICAgICAgYXhpc1Rvb2x0aXBWaXNpYmlsaXR5RnJvbUZ1bmN0aW9uS2luZCA9IGF4aXNUb29sdGlwVmlzaWJpbGl0eUZyb21GdW5jdGlvbktpbmQsXG4gICAgICAgICAgICAgICAgYXhpc1Rvb2x0aXBFbmFibGVkID0gaXNBeGlzVG9vbHRpcEVuYWJsZWQoXG4gICAgICAgICAgICAgICAgICAgIGF4aXNUb29sdGlwVmlzaWJpbGl0eUZyb21Db25maWcgPSBudWxsLFxuICAgICAgICAgICAgICAgICAgICBheGlzVG9vbHRpcFZpc2liaWxpdHlGcm9tRnVuY3Rpb25LaW5kXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgKVxuICAgICAgICB9XG5cbiAgICAgICAgcHJpdmF0ZSBmdW4gaXNBeGlzVG9vbHRpcEVuYWJsZWQoXG4gICAgICAgICAgICBheGlzVG9vbHRpcFZpc2liaWxpdHlGcm9tQ29uZmlnOiBCb29sZWFuPyxcbiAg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vaW50c1tpIC0gMV1cbiAgICAgICAgICAgIHZhbCBlbmQgPSBwb2ludHNbaV1cblxuICAgICAgICAgICAgaWYgKHN0YXJ0LnkgPj0gY29vcmQueSAmJiBlbmQueSA+PSBjb29yZC55IHx8IHN0YXJ0LnkgPCBjb29yZC55ICYmIGVuZC55IDwgY29vcmQueSkge1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhbCB4ID0gc3RhcnQueCArIChjb29yZC55IC0gc3RhcnQueSkgKiAoZW5kLnggLSBzdGFydC54KSAvIChlbmQueSAtIHN0YXJ0LnkpXG5cbiAgICAgICAgICAgIGlmICh4IDw9IGNvb3JkLngpIHtcbiAgICAgICAgICAgICAgICBpbnRlcnNlY3Rpb25Db3VudCsrXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gaW50ZXJzZWN0aW9uQ291bnQgJSAyICE9IDBcbiAgICB9XG5cbiAgICBmdW4gbGllc09uU2VnbWVudChwMTogRG91YmxlVmVjdG9yLCBwMjogRG91YmxlVmVjdG9yLCBjOiBEb3VibGVWZWN0b3IsIGVwc2lsb246IERvdWJsZSk6IEJvb2xlYW4ge1xuICAgICAgICByZXR1cm4gRG91YmxlU2VnbWVudChwMSwgcDIpLmRpc3RhbmNlKGMpIDwgZXBzaWxvblxuICAgIH1cblxuICAgIGludGVybmFsIGZ1biBhcmVFcXVhbChwMTogRG91YmxlVmVjdG9yLCBwMjogRG91YmxlVmVjdG9yLCBlcHNpbG9uOiBEb3VibGUpOiBCb29sZWFuIHtcbiAgICAgICAgcmV0dXJuIHAxLnN1YnRyYWN0KHAyKS5sZW5ndGgoKSA8IGVwc2lsb25cbiAgICB9XG5cbiAgICBpbnRlcm5hbCBmdW4gYXJlRXF1YWwoYTogRG91YmxlLCBiOiBEb3VibGUsIGVwc2lsb246IERvdWJsZSk6IEJvb2xlYW4ge1xuICAgICAgICByZXR1cm4gYWJzKG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Wx0ID09IENPTVBBUklTT05fUkVTVUxULkVRVUFMXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gY29tcGFyZShjb29yZDogRG91YmxlVmVjdG9yKTogQ09NUEFSSVNPTl9SRVNVTFQge1xuICAgICAgICAgICAgdmFsIG5ld0Rpc3RhbmNlID0gZGlzdGFuY2UodGFyZ2V0LCBjb29yZClcbiAgICAgICAgICAgIGlmIChkaXN0YW5jZSA8IDApIHtcbiAgICAgICAgICAgICAgICBzZXROZXdDbG9zZXN0Q29vcmQoY29vcmQsIG5ld0Rpc3RhbmNlKVxuICAgICAgICAgICAgICAgIHJldHVybiBDT01QQVJJU09OX1JFU1VMVC5ORVdfQ0xPU0VSXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChkaXN0YW5jZSA8IG5ld0Rpc3RhbmNlKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIENPTVBBUklTT05fUkVTVUxULk5FV19GQVJUSEVSXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChkaXN0YW5jZSA9PSBuZXdEaXN0YW5jZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBDT01QQVJJU09OX1JFU1VMVC5FUVVBTFxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBzZXROZXdDbG9zZXN0Q29vcmQoY29vcmQsIG5ld0Rpc3RhbmNlKVxuICAgICAgICAgICAgcmV0dXJuIENPTVBBUklTT05fUkVTVUxULk5FV19DTE9TRVJcbiAgICAgICAgfVxuXG4gICAgICAgIHByaXZhdGUgZnVuIHNldE5ld0Nsb3Nlc3RDb29yZChjb29yZDogRG91YmxlVmVjdG9yLCBkaXN0YW5jZTogRG91YmxlKSB7XG4gICAgICAgICAgICB0aGlzLmRpc3RhbmNlID0gZGlzdGFuY2VcbiAgICAgICAgICAgIHRoaXMuY29vcmQgPSBjb29yZFxuICAgICAgICB9XG5cbiAgICAgICAgZW51bSBjbGFzcyBDT01QQVJJU09OX1JFU1VMVCB7XG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MoKVxuICAgICAgICAgICAgdG9vbHRpcFNwZWNzICs9IG91dGxpZXJUb29sdGlwU3BlYygpXG4gICAgICAgICAgICB0b29sdGlwU3BlY3MgKz0gZ2VuZXJhbFRvb2x0aXBTcGVjKClcbiAgICAgICAgICAgIHJldHVybiB0b29sdGlwU3BlY3NcbiAgICAgICAgfVxuXG4gICAgICAgIHByaXZhdGUgZnVuIGhpdEluZGV4KCkgPSBteUdlb21UYXJnZXQuaGl0SW5kZXhcbiAgICAgICAgcHJpdmF0ZSBmdW4gdGlwTGF5b3V0SGludCgpID0gbXlHZW9tVGFyZ2V0LnRpcExheW91dEhpbnRcbiAgICAgICAgcHJpdmF0ZSBmdW4gb3V0bGllckhpbnRzKCkgPSBteUdlb21UYXJnZXQuYWVzVGlwTGF5b3V0SGludHNcblxuICAgICAgICBwcml2YXRlIGZ1biBvdXRsaWVyVG9vbHRpcFNwZWMoKTogTGlzdDxUb29sdGlwU3BlYz4ge1xuICAgICAgICAgICAgdmFsIHRvb2x0aXBTcGVjcyA9IEFycmF5TGlzdDxUb29sdGlwU3BlYz4oKVxuICAgICAgICAgICAgdmFsIG91dGxpZXJEYXRhUG9pbnRzID0gb3V0bGllckRhdGFQb2ludHMoKVxuICAgICAgICAgICAgb3V0bGllckhpbnRzKCkuZm9yRWFjaCB7IChhZXMsIGhpbnQpIC0+XG4gICAgICAgICAgICAgICAgdmFsIGxpbmVzRm9yQWVzID0gb3V0bGllckRhdGFQb2ludHNcbiAgICAgICAgICAgICAgICAgICAgLmZpbHRlciB7IGFlcyA9PSBpdC5hZXMgfVxuICAgICAgICAgICAgICAgICAgICAubWFwKERhdGFQb2ludDo6dmFsdWUpXG4gICAgICAgICAgICAgICAgICAgIC5tYXAoVG9vbHRpcFNwZWMuTGluZS5Db21wYW5pb246OndpdGhWYWx1ZSlcbiAgICAgICAgICAgICAgICBpZiAobGluZXNGb3JBZXMuaXNOb3RFbXB0eSgpKSB7XG4gICAgICAgICAgICAgICAgICAgIHRvb2x0aXBTcGVjcy5hZGQoXG4gICAgICAgICAgICAgICAgICAgICAgICBUb29sdGlwU3BlYyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXlvdXRIaW50ID0gaGludCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZSA9IG51bGwsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZXMgPSBsaW5lc0ZvckFlcyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWxsID0gaGludC5maWxsQ29sb3IgPzogdGlwTGF5b3V0SGludCgpLmZpbGxDb2xvclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgID86IHRpcExheW91dEhpbnQoKS5tYXJrZXJDb2xvcnMuZmlyc3RPck51bGwoKSA/OiBXSElURSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXJrZXJDb2xvcnMgPSBlbXB0eUxpc3QoKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpc091dGxpZXIgPSB0cnVlXG4gICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdG9vbHRpcFNwZWNzXG4gICAgICAgIH1cblxuXG4gICAgICAgIHByaXZhdGUgZnVuIGF4aXNUb29sdGlwU3BlYygpOiBMaXN0PFRvb2x0aXBTcGVjPiB7XG4gICAgICAgICAgICB2YWwgdG9vbHRpcFNwZWNzID0gQXJyYXlMaXN0PFRvb2x0aXBTcGVjPigpXG4gICAgICAgICAgICB2YWwgYXhpcyA9IG1hcE9mKFxuICAgICAgICAgICAgICAgIEFlcy5YIHRvIGF4aXNEYXRhUG9pbnRzKCkuZmlsdGVyIHsgQWVzLlggPT0gaXQuYWVzIH0ubWFwKERhdGFQb2ludDo6dmFsdWUpXG4gICAgICAgICAgICAgICAgICAgIC5tYXAoVG9vbHRpcFNwZWMuTGluZS5Db21wYW5pb246OndpdGhWYWx1ZSksXG4gICAgICAgICAgICAgICAgQWVzLlkgdG8gYXhpc0RhdGFQb2ludHMoKS5maWx0ZXIgeyBBZXMuWSA9PSBpdC5hZXMgfS5tYXAoRGF0YVBvaW50Ojp2YWx1ZSlcbiAgICAgICAgICAgICAgICAgICAgLm1hcChUb29sdGlwU3BlYy5MaW5lLkNvbXBhbmlvbjo6d2l0aFZhbHVlKVxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgYXhpcy5mb3JFYWNoIHsgKGFlcywgbGluZXMpIC0+XG4gICAgICAgICAgICAgICAgaWYgKGxpbmVzLmlzTm90RW1wdHkoKSkge1xuICAgICAgICAgICAgICAgICAgICB2YWwgbGF5b3V0SGludCA9IGNyZWF0ZUhpbnRGb3JBeGlzKGFlcywgZmxpcHBlZEF4aXMpXG4gICAgICAgICAgICAgICAgICAgIHRvb2x0aXBTcGVjcy5hZGQoXG4gICAgICAgICAgICAgICAgICAgICAgICBUb29sdGlwU3BlYyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXlvdXRIaW50ID0gbGF5b3V0SGludCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZSA9IG51bGwsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZXMgPSBsaW5lcyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWxsID0gbGF5b3V0SGludC5maWxsQ29sb3IhISxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXJrZXJDb2xvcnMgPSBlbXB0eUxpc3QoKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpc091dGxpZXIgPSB0cnVlXG4gICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdG9vbHRpcFNwZWNzXG4gICAgICAgIH1cblxuICAgICAgICBwcml2YXRlIGZ1biBnZW5lcmFsVG9vbHRpcFNwZWMoKTogTGlzdDxUb29sdGlwU3BlYz4ge1xuICAgICAgICAgICAgdmFsIGdlbmVyYWxEYXRhUG9pbnRzID0gZ2VuZXJhbERhdGFQb2ludHMoKVxuICAgICAgICAgICAgdmFsIGdlbmVyYWxMaW5lcyA9IGdlbmVyYWxEYXRhUG9pbnRzLm1hcCB7IFRvb2x0aXBTcGVjLkxpbmUud2l0aExhYmVsQW5kVmFsdWUoaXQubGFiZWwsIGl0LnZhbHVlKSB9XG5cbiAgICAgICAgICAgIHJldHVybiBpZiAoZ2VuZXJhbExpbmVzLmlzTm90RW1wdHkoKSkge1xuICAgICAgICAgICAgICAgIGxpc3RPZihcbiAgICAgICAgICAgICAgICAgICAgVG9vbHRpcFNwZWMoXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXBMYXlvdXRIaW50KCksXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZSA9IG15VG9vbHRpcFRpdGxlLFxuICAgICAgICAgICAgICAgICAgICAgICAgbGluZXMgPSBnZW5lcmFsTGluZXMsXG4gICAgICAgICAgICAgICAgICAgICAgICBmaWxsID0gbnVsbCxcbiAgICAgICAgICAgICAgICAgICAgICAgIG1hcmtlckNvbG9ycyA9IHRpcExheW91dEhpbnQoKS5tYXJrZXJDb2xvcnMsXG4gICAgICAgICAgICAgICAgICAgICAgICBpc091dGxpZXIgPSBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGFuY2hvciA9IG15VG9vbHRpcEFuY2hvcixcbiAgICAgICAgICAgICAgICAgICAgICAgIG1pbldpZHRoID0gbXlUb29sdGlwTWluV2lkdGgsXG4gICAgICAgICAgICAgICAgICAgICAgICBpc0Nyb3NzaGFpckVuYWJsZWQgPSBteUlzQ3Jvc3NoYWlyRW5hYmxlZFxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBlbXB0eUxpc3QoKVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcHJpdmF0ZSBmdW4gb3V0bGllckRhdGFQb2ludHMoKSA9IG15RGF0YVBvaW50cy5maWx0ZXIgeyBpdC5pc091dGxpZXIgJiYgIWl0LmlzQXhpcyB9XG4gICAgICAgIHByaXZhdGUgZnVuIGF4aXNEYXRhUG9pbnRzKCkgPSBteURhdGFQb2ludHMuZmlsdGVyKERhdGFQb2ludDo6aXNBeGlzKVxuXG4gICAgICAgIHByaXZhdGUgZnVuIGdlbmVyYWxEYXRhUG9pbnRzKCk6IExpc3Q8RGF0YVBvaW50PiB7XG4gICAgICAgICAgICB2YWwgbm9uT3V0bGllckRhdGFQb2ludHMgPSBteURhdGFQb2ludHMuZmlsdGVyTm90KERhdGFQb2ludDo6aXNPdXRsaWVyKVxuICAgICAgICAgICAgdmFsIG91dGxpZXJzID0gb3V0bGllckRhdGFQb2ludHMoKS5tYXBOb3ROdWxsKERhdGFQb2ludDo6YWVzKVxuICAgICAgICAgICAgdmFsIGdlbmVyYWxBZXNMaXN0ID0gbm9uT3V0bGllckRhdGFQb2ludHMubWFwTm90TnVsbChEYXRhUG9pbnQ6OmFlcykgLSBvdXRsaWVyc1xuICAgICAgICAgICAgcmV0dXJuIG5vbk91dGxpZXJEYXRhUG9pbnRzLmZpbHRlciB7IGRhdGFQb2ludCAtPlxuICAgICAgICAgICAgICAgIHdoZW4gKGRhdGFQb2ludC5hZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgbnVsbCAtPiB0cnVlICAgICAgICAgICAgICAgIC8vIGdldCBhbGwgbm90IGFlcyAodmFyaWFibGVzLCB0ZXh0KVxuICAgICAgICAgICAgICAgICAgICBpbiBnZW5lcmFsQWVzTGlzdCAtPiB0cnVlICAgLy8gZ2V0IGFsbCBleGlzdGVkIGluIHByZXBhcmVkIGFlcyBsaXN0IChtYXBwZWQgYWVzKVxuICAgICAgICAgICAgICAgICAgICBlbHNlIC0+IGZhbHNlICAgICAgICAgICAgICAgLy8gc2tpcCBvdGhlcnMgKGF4aXMpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcHJpdmF0ZSBmdW4gY3JlYXRlSGludEZvckF4aXMoYWVzOiBBZXM8Kj4sIGZsaXBwZWRBeGlzOiBCb29sZWFuKTogVGlwTGF5b3V0SGludCB7XG4gICAgICAgICAgICB2YWwgYXhpcyA9IGFlcy5sZXQge1xuICAgICAgICAgICAgICAgIHdoZW4ge1xuICAgICAgICAgICAgICAgICAgICBmbGlwcGVkQXhpcyAmJiBpdCA9PSBBZXMuWCAtPiBBZXMuWVxuICAgICAgICAgICAgICAgICAgICBmbGlwcGVkQXhpcyAmJiBpdCA9PSBBZXMuWSAtPiBBZXMuWFxuICAgICAgICAgICAgICAgICAgICBlbHNlIC0+IGl0XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHdoZW4gKGF4aXMpIHtcbiAgICAgICAgICAgICAgICBBZXMuWCAtPiB7XG4gICAgICAgICAgICAgICAgICAgIFRpcExheW91dEhpbnQueEF4aXNUb29sdGlwKFxuICAgICAgICAgICAgICAgICAgICAgICAgY29vcmQgPSBEb3VibGVWZWN0b3IodGlwTGF5b3V0SGludCgpLmNvb3JkISEueCwgYXhpc09yaWdpbi55KSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGF4aXNSYWRpdXMgPSBBWElTX1JBRElVUyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpbGxDb2xvciA9IHhBeGlzVGhlbWUudG9vbHRpcEZpbGwoKVxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgQWVzLlkgLT4ge1xuICAgICAgICAgICAgICAgICAgICBUaXBMYXlvdXRIaW50LnlBeGlzVG9vbHRpcChcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvb3JkID0gRG91YmxlVmVjdG9yKGF4aXNP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2VvbVRhcmdldENvbGxlY3RvciB7XG5cbiAgICBvdmVycmlkZSBmdW4gYWRkUG9pbnQoXG4gICAgICAgIGluZGV4OiBJbnQsXG4gICAgICAgIHBvaW50OiBEb3VibGVWZWN0b3IsXG4gICAgICAgIHJhZGl1czogRG91YmxlLFxuICAgICAgICB0b29sdGlwUGFyYW1zOiBHZW9tVGFyZ2V0Q29sbGVjdG9yLlRvb2x0aXBQYXJhbXMsXG4gICAgICAgIHRvb2x0aXBLaW5kOiBUaXBMYXlvdXRIaW50LktpbmRcbiAgICApIHtcbiAgICAgICAgdGFyZ2V0Q29sbGVjdG9yLmFkZFBvaW50KFxuICAgICAgICAgICAgaW5kZXgsXG4gICAgICAgICAgICBwb2ludC5mbGlwKCksXG4gICAgICAgICAgICByYWRpdXMsXG4gICAgICAgICAgICB0b29sdGlwUGFyYW1zLFxuICAgICAgICAgICAgdG9vbHRpcEtpbmRcbiAgICAgICAgKVxuICAgIH1cblxuICAgIG92ZXJyaWRlIGZ1biBhZGRSZWN0YW5nbGUoXG4gICAgICAgIGluZGV4OiBJbnQsXG4gICAgICAgIHJlY3RhbmdsZTogRG91YmxlUmVjdGFuZ2xlLFxuICAgICAgICB0b29sdGlwUGFyYW1zOiBHZW9tVGFyZ2V0Q29sbGVjdG9yLlRvb2x0aXBQYXJhbXMsXG4gICAgICAgIHRvb2x0aXBLaW5kOiBUaXBMYXlvdXRIaW50LktpbmRcbiAgICApIHtcbiAgICAgICAgdGFyZ2V0Q29sbGVjdG9yLmFkZFJlY3RhbmdsZShcbiAgICAgICAgICAgIGluZGV4LFxuICAgICAgICAgICAgcmVjdGFuZ2xlLmZsaXAoKSxcbiAgICAgICAgICAgIHRvb2x0aXBQYXJhbXMsXG4gICAgICAgICAgICB0b29sdGlwS2luZFxuICAgICAgICApXG4gICAgfVxuXG4gICAgb3ZlcnJpZGUgZnVuIGFkZFBhdGgoXG4gICAgICAgIHBvaW50czogTGlzdDxEb3VibGVWZWN0b3I+LFxuICAgICAg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7IGl0LmFscGhhID09IDAgfSkge1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBhZGRUYXJnZXQoXG4gICAgICAgICAgICBUYXJnZXRQcm90b3R5cGUoXG4gICAgICAgICAgICAgICAgSGl0U2hhcGUucG9pbnQocG9pbnQsIHJhZGl1cyksXG4gICAgICAgICAgICAgICAgeyBpbmRleCB9LFxuICAgICAgICAgICAgICAgIHRvb2x0aXBQYXJhbXMsXG4gICAgICAgICAgICAgICAgdG9vbHRpcEtpbmRcbiAgICAgICAgICAgIClcbiAgICAgICAgKVxuICAgIH1cblxuICAgIG92ZXJyaWRlIGZ1biBhZGRSZWN0YW5nbGUoXG4gICAgICAgIGluZGV4OiBJbnQsXG4gICAgICAgIHJlY3RhbmdsZTogRG91YmxlUmVjdGFuZ2xlLFxuICAgICAgICB0b29sdGlwUGFyYW1zOiBHZW9tVGFyZ2V0Q29sbGVjdG9yLlRvb2x0aXBQYXJhbXMsXG4gICAgICAgIHRvb2x0aXBLaW5kOiBUaXBMYXlvdXRIaW50LktpbmRcbiAgICApIHtcbiAgICAgICAgaWYgKGNvbnRleHR1YWxNYXBwaW5nLmlnbm9yZUludmlzaWJsZVRhcmdldHMpIHtcbiAgICAgICAgICAgIGlmIChyZWN0YW5nbGUud2lkdGggPT0gMC4wIHx8IHJlY3RhbmdsZS5oZWlnaHQgPT0gMC4wIHx8IHRvb2x0aXBQYXJhbXMubWFya2VyQ29sb3JzLmFsbCB7IGl0LmFscGhhID09IDAgfSkge1xuICAgICAgICAgICAgICAgIHJldHVyblxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGFkZFRhcmdldChcbiAgICAgICAgICAgIFRhcmdldFByb3RvdHlwZShcbiAgICAgICAgICAgICAgICBIaXRTaGFwZS5yZWN0KHJlY3RhbmdsZSksXG4gICAgICAgICAgICAgICAgeyBpbmRleCB9LFxuICAgICAgICAgICAgICAgIHRvb2x0aXBQYXJhbXMsXG4gICAgICAgICAgICAgICAgdG9vbHRpcEtpbmRcbiAgICAgICAgICAgIClcbiAgICAgICAgKVxuICAgIH1cblxuICAgIG92ZXJyaWRlIGZ1biBhZGRQYXRoKFxuICAgICAgICBwb2ludHM6IExpc3Q8RG91YmxlVmVjdG9yPixcbiAgICAgICAgbG9jYWxUb0dsb2JhbEluZGV4OiAoSW50KSAtPiBJbnQsXG4gICAgICAgIHRvb2x0aXBQYXJhbXM6IEdlb21UYXJnZXRDb2xsZWN0b3IuVG9vbHRpcFBhcmFtcyxcbiAgICAgICAgdG9vbHRpcEtpbmQ6IFRpcExheW91dEhpbnQuS2luZFxuICAgICkge1xuICAgICAgICBhZGRUYXJnZXQoXG4gICAgICAgICAgICBUYXJnZXRQcm90b3R5cGUoXG4gICAgICAgICAgICAgICAgSGl0U2hhcGUucGF0aChwb2ludHMpLFxuICAgICAgICAgICAgICAgIGxvY2FsVG9HbG9iYWxJbmRleCxcbiAgICAgICAgICAgICAgICB0b29sdGlwUGFyYW1zLFxuICAgICAgICAgICAgICAgIHRvb2x0aXBLaW5kXG4gICAgICAgICAgICApXG4gICAgICAgIClcbiAgICB9XG5cbiAgICBvdmVycmlkZSBmdW4gYWRkUG9seWdvbihcbiAgICAgICAgcG9pbnRzOiBMaXN0PERvdWJsZVZlY3Rvcj4sXG4gICAgICAgIGxvY2FsVG9HbG9iYWxJbmRleDogKEludCkgLT4gSW50LFxuICAgICAgICB0b29sdGlwUGFyYW1zOiBHZW9tVGFyZ2V0Q29sbGVjdG9yLlRvb2x0aXBQYXJhbXMsXG4gICAgICAgIHRvb2x0aXBLaW5kOiBUaXBMYXlvdXRIaW50LktpbmRcbiAgICApIHtcbiAgICAgICAgYWRkVGFyZ2V0KFxuICAgICAgICAgICAgVGFyZ2V0UHJvdG90eXBlKFxuICAgICAgICAgICAgICAgIEhpdFNoYXBlLnBvbHlnb24ocG9pbnRzKSxcbiAgICAgICAgICAgICAgICBsb2NhbFRvR2xvYmFsSW5kZXgsXG4gICAgICAgICAgICAgICAgdG9vbHRpcFBhcmFtcyxcbiAgICAgICAgICAgICAgICB0b29sdGlwS2luZFxuICAgICAgICAgICAgKVxuICAgICAgICApXG4gICAgfVxuXG4gICAgb3ZlcnJpZGUgZnVuIHdpdGhGbGlwcGVkQXhpcygpOiBHZW9tVGFyZ2V0Q29sbGVjdG9yIHtcbiAgICAgICAgcmV0dXJuIEZsaXBwZWRUYXJnZXRDb2xsZWN0b3IodGhpcylcbiAgICB9XG5cbiAgICBvdmVycmlkZSBmdW4gd2l0aFlPcmllbnRhdGlvbigpOiBHZW9tVGFyZ2V0Q29sbGVjdG9yIHtcbiAgICAgICAgcmV0dXJuIFlPcmllbnRhdGlvblRhcmdldENvbGxlY3Rvcih0aGlzKVxuICAgIH1cblxuICAgIHByaXZhdGUgZnVuIGFkZFRhcmdldCh0YXJnZXRQcm90b3R5cGU6IFRhcmdldFByb3RvdHlwZSkge1xuICAgICAgICBteVRhcmdldHMuYWRkKHRhcmdldFByb3RvdHlwZSlcbiAgICAgICAgbXlMb2NhdG9yID0gbnVsbFxuICAgIH1cblxuICAgIG92ZXJyaWRlIGZ1biBzZWFyY2goY29vcmQ6IERvdWJsZVZlY3Rvcik6IEdlb21UYXJnZXRMb2NhdG9yLkxvb2t1cFJlc3VsdD8ge1xuICAgICAgICBpZiAobXlMb2NhdG9yID09IG51bGwpIHtcbiAgICAgICAgICAgIG15TG9jYXRvciA9IExheWVyVGFyZ2V0TG9jYXRvcihcbiAgICAgICAgICAgICAgICBnZW9tS2luZCxcbiAgICAgICAgICAgICAgICBsb29rdXBTcGVjLFxuICAgICAgICAgICAgICAgIGNvbnRleHR1YWxNYXBwaW5nLFxuICAgICAgICAgICAgICAgIG15VGFyZ2V0c1xuICAgICAgICAgICAgKVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBteUxvY2F0b3IhIS5zZWFyY2goY29vcmQpXG4gICAgfVxufVxuIiwiLypcbiAqIENvcHlyaWdodCAoYykgMj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Z2V0UHJvdG90eXBlKTogVGFyZ2V0UHJvamVjdGlvbiB7XG4gICAgICAgICAgICByZXR1cm4gd2hlbiAocHJvdG90eXBlLmhpdFNoYXBlLmtpbmQpIHtcbiAgICAgICAgICAgICAgICBQT0lOVCAtPiBQb2ludFRhcmdldFByb2plY3Rpb24uY3JlYXRlKFxuICAgICAgICAgICAgICAgICAgICBwcm90b3R5cGUuaGl0U2hhcGUucG9pbnQuY2VudGVyLFxuICAgICAgICAgICAgICAgICAgICBsb29rdXBTcGVjLmxvb2t1cFNwYWNlXG4gICAgICAgICAgICAgICAgKVxuXG4gICAgICAgICAgICAgICAgUkVDVCAtPiBSZWN0VGFyZ2V0UHJvamVjdGlvbi5jcmVhdGUoXG4gICAgICAgICAgICAgICAgICAgIHByb3RvdHlwZS5oaXRTaGFwZS5yZWN0LFxuICAgICAgICAgICAgICAgICAgICBsb29rdXBTcGVjLmxvb2t1cFNwYWNlXG4gICAgICAgICAgICAgICAgKVxuXG4gICAgICAgICAgICAgICAgUE9MWUdPTiAtPiBQb2x5Z29uVGFyZ2V0UHJvamVjdGlvbi5jcmVhdGUoXG4gICAgICAgICAgICAgICAgICAgIHByb3RvdHlwZS5oaXRTaGFwZS5wb2ludHMsXG4gICAgICAgICAgICAgICAgICAgIGxvb2t1cFNwZWMubG9va3VwU3BhY2VcbiAgICAgICAgICAgICAgICApXG5cbiAgICAgICAgICAgICAgICBQQVRIIC0+IFBhdGhUYXJnZXRQcm9qZWN0aW9uLmNyZWF0ZShcbiAgICAgICAgICAgICAgICAgICAgcHJvdG90eXBlLmhpdFNoYXBlLnBvaW50cyxcbiAgICAgICAgICAgICAgICAgICAgcHJvdG90eXBlLmluZGV4TWFwcGVyLFxuICAgICAgICAgICAgICAgICAgICBsb29rdXBTcGVjLmxvb2t1cFNwYWNlXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgZm9yIChwcm90b3R5cGUgaW4gdGFyZ2V0UHJvdG90eXBlcykge1xuICAgICAgICAgICAgbXlUYXJnZXRzLmFkZChcbiAgICAgICAgICAgICAgICBUYXJnZXQoXG4gICAgICAgICAgICAgICAgICAgIHRvUHJvamVjdGlvbihwcm90b3R5cGUpLFxuICAgICAgICAgICAgICAgICAgICBwcm90b3R5cGVcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICApXG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBwcml2YXRlIGZ1biBhZGRMb29rdXBSZXN1bHRzKFxuICAgICAgICBjb2xsZWN0b3I6IENvbGxlY3RvcjxHZW9tVGFyZ2V0PixcbiAgICAgICAgdGFyZ2V0czogTXV0YWJsZUxpc3Q8R2VvbVRhcmdldExvY2F0b3IuTG9va3VwUmVzdWx0PlxuICAgICkge1xuICAgICAgICBpZiAoY29sbGVjdG9yLnNpemUoKSA9PSAwKSB7XG4gICAgICAgICAgICByZXR1cm5cbiAgICAgICAgfVxuXG4gICAgICAgIHRhcmdldHMuYWRkKFxuICAgICAgICAgICAgR2VvbVRhcmdldExvY2F0b3IuTG9va3VwUmVzdWx0KFxuICAgICAgICAgICAgICAgIGNvbGxlY3Rvci5jb2xsZWN0aW9uKCksXG4gICAgICAgICAgICAgICAgLy8gRGlzdGFuY2UgY2FuIGJlIG5lZ2F0aXZlIHdoZW4gbG9va3VwIHNwYWNlIGlzIFhcbiAgICAgICAgICAgICAgICAvLyBJbiB0aGlzIGNhc2UgdXNlIDAuMCBhcyBhIGRpc3RhbmNlIC0gd2UgaGF2ZSBhIGRpcmVjdCBoaXQuXG4gICAgICAgICAgICAgICAgbWF4KDAuMCwgY29sbGVjdG9yLmNsb3Nlc3RQb2ludENoZWNrZXIuZGlzdGFuY2UpLFxuICAgICAgICAgICAgICAgIGdlb21LaW5kLFxuICAgICAgICAgICAgICAgIGNvbnRleHR1YWxNYXBwaW5nLFxuICAgICAgICAgICAgICAgIGNvbnRleHR1YWxNYXBwaW5nLmlzQ3Jvc3NoYWlyRW5hYmxlZFxuICAgICAgICAgICAgKVxuICAgICAgICApXG4gICAgfVxuXG4gICAgb3ZlcnJpZGUgZnVuIHNlYXJjaChjb29yZDogRG91YmxlVmVjdG9yKTogR2VvbVRhcmdldExvY2F0b3IuTG9va3VwUmVzdWx0PyB7XG4gICAgICAgIGlmIChteVRhcmdldHMuaXNFbXB0eSgpKSB7XG4gICAgICAgICAgICByZXR1cm4gbnVsbFxuICAgICAgICB9XG5cbiAgICAgICAgdmFsIHJlY3RDb2xsZWN0b3IgPSBDb2xsZWN0b3I8R2VvbVRhcmdldD4oXG4gICAgICAgICAgICBjb29yZCxcbiAgICAgICAgICAgIG15Q29sbGVjdGluZ1N0cmF0ZWd5LFxuICAgICAgICAgICAgbG9va3VwU3BlYy5sb29rdXBTcGFjZVxuICAgICAgICApXG4gICAgICAgIHZhbCBwb2ludENvbGxlY3RvciA9IENvbGxlY3RvcjxHZW9tVGFyZ2V0PihcbiAgICAgICAgICAgIGNvb3JkLFxuICAgICAgICAgICAgbXlDb2xsZWN0aW5nU3RyYXRlZ3ksXG4gICAgICAgICAgICBsb29rdXBTcGVjLmxvb2t1cFNwYWNlXG4gICAgICAgIClcbiAgICAgICAgdmFsIHBhdGhDb2xsZWN0b3IgPSBDb2xsZWN0b3I8R2VvbVRhcmdldD4oXG4gICAgICAgICAgICBjb29yZCxcbiAgICAgICAgICAgIG15Q29sbGVjdGluZ1N0cmF0ZWd5LFxuICAgICAgICAgICAgbG9va3VwU3BlYy5sb29rdXBTcGFjZVxuICAgICAgICApXG5cbiAgICAgICAgLy8gU2hvdWxkIGFsd2F5cyByZXBsYWNlIGJlY2F1c2Ugb2YgcG9seWdvbiB3aXRoIGhvbGVzIC0gb25seSB0b3Agc2hvdWxkIGhhdmUgdG9vbHRpcC5cbiAgICAgICAgdmFsIHBvbHlnb25Db2xsZWN0b3IgPSBDb2xsZWN0b3I8R2VvbVRhcmdldD4oXG4gICAgICAgICAgICBjb29yZCxcbiAgICAgICAgICAgIENvbGxlY3Rvci5Db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hcGUucmVjdFxuICAgICAgICAgICAgdmFsIHlPZmZzZXQgPSB3aGVuICh0YXJnZXQucHJvdG90eXBlLnRvb2x0aXBLaW5kKSB7XG4gICAgICAgICAgICAgICAgQ1VSU09SX1RPT0xUSVAgLT4gcmVjdC5oZWlnaHQgLyAyLjBcbiAgICAgICAgICAgICAgICBlbHNlIC0+IDAuMFxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXN1bHRDb2xsZWN0b3IuY29sbGVjdChcbiAgICAgICAgICAgICAgICB0YXJnZXQucHJvdG90eXBlLmNyZWF0ZUdlb21UYXJnZXQoXG4gICAgICAgICAgICAgICAgICAgIHJlY3Qub3JpZ2luLmFkZChEb3VibGVWZWN0b3IocmVjdC53aWR0aCAvIDIsIHlPZmZzZXQpKSxcbiAgICAgICAgICAgICAgICAgICAgZ2V0S2V5Rm9yU2luZ2xlT2JqZWN0R2VvbWV0cnkodGFyZ2V0LnByb3RvdHlwZSlcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICApXG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBwcml2YXRlIGZ1biBwcm9jZXNzUG9seWdvbihjb29yZDogRG91YmxlVmVjdG9yLCB0YXJnZXQ6IFRhcmdldCwgcmVzdWx0Q29sbGVjdG9yOiBDb2xsZWN0b3I8R2VvbVRhcmdldD4pIHtcbiAgICAgICAgaWYgKG15VGFyZ2V0RGV0ZWN0b3IuY2hlY2tQb2x5Z29uKGNvb3JkLCB0YXJnZXQucG9seWdvblByb2plY3Rpb24sIHJlc3VsdENvbGxlY3Rvci5jbG9zZXN0UG9pbnRDaGVja2VyKSkge1xuXG4gICAgICAgICAgICByZXN1bHRDb2xsZWN0b3IuY29sbGVjdChcbiAgICAgICAgICAgICAgICB0YXJnZXQucHJvdG90eXBlLmNyZWF0ZUdlb21UYXJnZXQoXG4gICAgICAgICAgICAgICAgICAgIGNvb3JkLFxuICAgICAgICAgICAgICAgICAgICBnZXRLZXlGb3JTaW5nbGVPYmplY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5Mb29rdXBTcGFjZS5YKSB7XG4gICAgICAgICAgICBDbG9zZXN0UG9pbnRDaGVja2VyKERvdWJsZVZlY3RvcihjdXJzb3IueCwgMC4wKSlcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIENsb3Nlc3RQb2ludENoZWNrZXIoY3Vyc29yKVxuICAgICAgICB9XG4gICAgICAgIHByaXZhdGUgdmFyIG15TGFzdEFkZGVkRGlzdGFuY2U6IERvdWJsZSA9IC0xLjBcblxuICAgICAgICBmdW4gY29sbGVjdChkYXRhOiBUKSB7XG4gICAgICAgICAgICB3aGVuIChteVN0cmF0ZWd5KSB7XG4gICAgICAgICAgICAgICAgQ29sbGVjdGluZ1N0cmF0ZWd5LkFQUEVORCAtPiBhZGQoZGF0YSlcbiAgICAgICAgICAgICAgICBDb2xsZWN0aW5nU3RyYXRlZ3kuUkVQTEFDRSAtPiByZXBsYWNlKGRhdGEpXG4gICAgICAgICAgICAgICAgQ29sbGVjdGluZ1N0cmF0ZWd5LkFQUEVORF9JRl9FUVVBTCAtPiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChteUxhc3RBZGRlZERpc3RhbmNlID09IGNsb3Nlc3RQb2ludENoZWNrZXIuZGlzdGFuY2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFkZChkYXRhKVxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVwbGFjZShkYXRhKVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIENvbGxlY3RpbmdTdHJhdGVneS5JR05PUkUgLT4gcmV0dXJuXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBmdW4gY29sbGVjdGlvbigpOiBMaXN0PFQ+IHtcbiAgICAgICAgICAgIHJldHVybiByZXN1bHRcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBzaXplKCk6IEludCB7XG4gICAgICAgIC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4gZGlzdGFuY2UgPT0gbWluRGlzdGFuY2UgfVxuICAgICAgICAgICAgLm1hcCB7IChsb29rdXBSZXN1bHQsIF8pIC0+IGxvb2t1cFJlc3VsdCB9XG4gICAgICAgICAgICAuZm9yRWFjaCB7IGxvb2t1cFJlc3VsdCAtPlxuICAgICAgICAgICAgICAgIHBpY2tlZCA9IHdoZW4ge1xuICAgICAgICAgICAgICAgICAgICBwaWNrZWQuaXNOb3RFbXB0eSgpICYmIGxvb2t1cFJlc3VsdC5nZW9tS2luZCBpbiBsaXN0T2YoVEVYVCwgTEFCRUwpIC0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFRFWFQgdG9vbHRpcHMgYXJlIGNvbnNpZGVyZWQgb25seSB3aGVuIG5vIG90aGVyIHRvb2x0aXBzIGFyZSBwcmVzZW50LlxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gT3RoZXJ3aXNlLCBURVhUIGxheWVyIGlzIHVzZWQgYXMgZGVjb3JhdGlvbiwgZS5nLiB2YWx1ZXMgb2YgYmFycywgaGlzdG9ncmFtcywgY29ycnBsb3QsXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBhbmQgd2UgYWN0dWFsbHkgd2FudCB0byBzZWUgYW5jZXN0b3JzIGdlb20gdG9vbHRpcC5cbiAgICAgICAgICAgICAgICAgICAgICAgIHBpY2tlZFxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHBpY2tlZC5pc05vdEVtcHR5KCkgJiYgc3RhY2thYmxlUmVzdWx0cyhwaWNrZWRbMF0sIGxvb2t1cFJlc3VsdCkgLT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgcGlja2VkICsgbG9va3VwUmVzdWx0XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSAtPiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsaXN0T2YobG9va3VwUmVzdWx0KVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgIHZhbCBhbGxDb25zaWRlcmVkUmVzdWx0cyA9IHdpdGhEaXN0YW5jZXMubWFwIHsgKGxvb2t1cFJlc3VsdCwgXykgLT4gbG9va3VwUmVzdWx0IH1cblxuICAgICAgICByZXR1cm4gd2hlbiB7XG4gICAgICAgICAgICBwaWNrZWQuYW55IHsgaGFzR2VuZXJhbFRvb2x0aXAoaXQpICYmIGhhc0F4aXNUb29sdGlwKGl0KSB9IC0+IHBpY2tlZFxuICAgICAgICAgICAgYWxsQ29uc2lkZXJlZFJlc3VsdHMubm9uZSg6Omhhc0dlbmVyYWxUb29sdGlwKSAtPiBwaWNrZWRcbiAgICAgICAgICAgIGFsbENvbnNpZGVyZWRSZXN1bHRzLmFueSB7IGhhc0dlbmVyYWxUb29sdGlwKGl0KSAmJiBoYXNBeGlzVG9vbHRpcChpdCkgfSAtPiB7XG4gICAgICAgICAgICAgICAgbGlzdE9mKFxuICAgICAgICAgICAgICAgICAgICB3aXRoRGlzdGFuY2VzXG4gICAgICAgICAgICAgICAgICAgICAgICAuc29ydGVkQnlEZXNjZW5kaW5nIHsgKF8sIGRpc3RhbmNlKSAtPiBkaXN0YW5jZSB9XG4gICAgICAgICAgICAgICAgICAgICAgICAubWFwIHsgKGxvb2t1cFJlc3VsdCwgXykgLT4gbG9va3VwUmVzdWx0IH1cbiAgICAgICAgICAgICAgICAgICAgICAgIC5sYXN0IHsgaGFzR2VuZXJhbFRvb2x0aXAoaXQpICYmIGhhc0F4aXNUb29sdGlwKGl0KSB9XG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSAtPiB7XG4gICAgICAgICAgICAgICAgd2l0aChcbiAgICAgICAgICAgICAgICAgICAgd2l0aERpc3RhbmNlc1xuICAgICAgICAgICAgICAgICAgICAgICAgLnNvcnRlZEJ5RGVzY2VuZGluZyB7IChfLCBkaXN0YW5jZSkgLT4gZGlzdGFuY2UgfVxuICAgICAgICAgICAgICAgICAgICAgICAgLm1hcCB7IChsb29rdXBSZXN1bHQsIF8pIC0+IGxvb2t1cFJlc3VsdCB9XG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIGxpc3RPZk5vdE51bGwoXG4gICAgICAgICAgICAgICAgICAgICAgICBsYXN0T3JOdWxsKDo6aGFzR2VuZXJhbFRvb2x0aXApLFxuICAgICAgICAgICAgICAgICAgICAgICAgbGFzdE9yTnVsbCg6Omhhc0F4aXNUb29sdGlwKVxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgY29tcGFuaW9uIG9iamVjdCB7XG4gICAgICAgIGludGVybmFsIGNvbnN0IHZhbCBDVVRPRkZfRElTVEFOQ0UgPSAzMC4wXG4gICAgICAgIGludGVybmFsIGNvbnN0IHZhbCBGQUtFX0RJU1RBTkNFID0gMTUuMFxuXG4gICAgICAgIC8vIENvbnNpZGVyIGxheWVycyB3aXRoIHRoZSBzYW1lIGdlb20gYXMgYSBzaW5nbGUgbGF5ZXIgdG8gam9pbiB0aGVpciB0b29sdGlwc1xuICAgICAgICBwcml2YXRlIHZhbCBTVEFDS0FCTEVfR0VPTVMgPSBzZXRPZihcbiAgICAgICAgICAgIERFTlNJVFksXG4gICAgICAgICAgICBGUkVRUE9MWSxcbiAgICAgICAgICAgIEJPWF9QTE9ULFxuICAgICAgICAgICAgSElTVE9HUkFNLFxuICAgICAgICAgICAgTElORSxcbiAgICAgICAgICAgIEFSRUEsXG4gICAgICAgICAgICBCQVIsXG4gICAgICAgICAgICBFUlJPUl9CQVIsXG4gICAgICAgICAgICBDUk9TU19CQVIsXG4gICAgICAgICAgICBMSU5FX1JBTkdFLFxuICAgICAgICAgICAgUE9JTlRfUkFOR0VcbiAgICAgICAgKVxuXG4gICAgICAgIHByaXZhdGUgZnVuIGRpc3R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pcExheW91dEhpbnQuY29vcmQhISkgfVxuICAgICAgICAgICAgICAgICAgICAgICAgLm1pbk9yTnVsbCgpXG4gICAgICAgICAgICAgICAgICAgICAgICA/OiBGQUtFX0RJU1RBTkNFXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBkaXN0YW5jZVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcHJpdmF0ZSBmdW4gc3RhY2thYmxlUmVzdWx0cyhsZnQ6IExvb2t1cFJlc3VsdCwgcmd0OiBMb29rdXBSZXN1bHQpOiBCb29sZWFuIHtcbiAgICAgICAgICAgIHJldHVybiBsZnQuZ2VvbUtpbmQgPT09IHJndC5nZW9tS2luZCAmJiBTVEFDS0FCTEVfR0VPTVMuY29udGFpbnMocmd0Lmdlb21LaW5kKVxuICAgICAgICB9XG5cbiAgICAgICAgcHJpdmF0ZSBmdW4gZmlsdGVyUmVzdWx0cyhsb29rdXBSZXN1bHQ6IExvb2t1cFJlc3VsdCwgY29vcmQ6IERvdWJsZVZlY3Rvcj8sIGZsaXBwZWRBeGlzOiBCb29sZWFuKTogTG9va3VwUmVzdWx0IHtcbiAgICAgICAgICAgIGlmIChjb29yZCA9PSBudWxsIHx8IGxvb2t1cFJlc3VsdC5nZW9tS2luZCAhaW4gc2V0T2YoREVOU0lUWSwgSElTVE9HUkFNLCBGUkVRUE9MWSwgTElORSwgQVJFQSwgU0VHTUVOVCkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gbG9va3VwUmVzdWx0XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGZ1biB4RGlzdGFuY2VUb0Nvb3JkKHRhcmdldDogR2VvbVRhcmdldCk6IERvdWJsZSB7XG4gICAgICAgICAgICAgICAgdmFsIGRpc3RhbmNlID0gdGFyZ2V0LnRpcExheW91dEhpbnQuY29vcmQhIS5zdWJ0cmFjdChjb29yZClcbiAgICAgICAgICAgICAgICByZXR1cm4gd2hlbiAoZmxpcHBlZEF4aXMpIHtcbiAgICAgICAgICAgICAgICAgICAgdHJ1ZSAtPiBkaXN0YW5jZS55XG4gICAgICAgICAgICAgICAgICAgIGZhbHNlIC0+IGRpc3RhbmNlLnhcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIEdldCBjbG9zZXN0IHRhcmdldHMgYW5kIHJlbW92ZSBkdXBsaWNhdGVzXG4gICAgICAgICAgICB2YWwgZ2VvbVRhcmdldHMgPSBsb29rdXBSZXN1bHQudGFyZ2V0cy5maWx0ZXIgeyBpdC50aXBMYXlvdXRIaW50LmNvb3JkICE9IG51bGwgfVxuXG4gICAgICAgICAgICB2YWwgbWluWERpc3RhbmNlVG9UYXJnZXQgPSBnZW9tVGFyZ2V0c1xuICAgICAgICAgICAgICAgIC5tYXAoOjp4RGlzdGFuY2VUb0Nvb3JkKVxuICAgICAgICAgICAgICAgIC5taW5CeU9yTnVsbCg6OmFicylcblxuICAgICAgICAgICAgdmFsIG5ld1RhcmdldHMgPSBnZW9tVGFyZ2V0c1xuICAgICAgICAgICAgICAgIC5maWx0ZXIgeyB0YXJnZXQgLT4geERpc3RhbmNlVG9Db29yZCh0YXJnZXQpID09IG1pblhEaXN0YW5jZVRvVGFyZ2V0IH1cbiAgICAgICAgICAgICAgICAuZGlzdGluY3RCeShHZW9tVGFyZ2V0OjpoaXRJbmRleClcblxuICAgICAgICAgICAgcmV0dXJuIExvb2t1cFJlc3VsdChcbiAgICAgICAgICAgICAgICB0YXJnZXRzID0gbmV3VGFyZ2V0cyxcbiAgICAgICAgICAgICAgICBkaXN0YW5jZSA9IGxvb2t1cFJlc3VsdC5kaXN0YW5jZSxcbiAgICAgICAgICAgICAgICBnZW9tS2luZCA9IGxvb2t1cFJlc3VsdC5nZW9tS2luZCxcbiAgICAgICAgICAgICAgICBjb250ZXh0dWFsTWFwcGluZyA9IGxvb2t1cFJlc3VsdC5jb250ZXh0dWFsTW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lZ3kuSE9WRVIgLT5cbiAgICAgICAgICAgICAgICAgICAgaWYgKGN1cnNvckNvb3JkLnggPCBwYXRoUHJvamVjdGlvbi5wb2ludHMuZmlyc3QoKS5wcm9qZWN0aW9uKCkueCgpIHx8IGN1cnNvckNvb3JkLnggPiBwYXRoUHJvamVjdGlvbi5wb2ludHMubGFzdCgpLnByb2plY3Rpb24oKS54KCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG51bGxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlYXJjaE5lYXJlc3QoY3Vyc29yQ29vcmQueCwgcGF0aFByb2plY3Rpb24ucG9pbnRzKSB7IGl0LnByb2plY3Rpb24oKS54KCkgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIExvb2t1cFNwYWNlLlhZIC0+IHdoZW4gKGxvY2F0b3JMb29rdXBTdHJhdGVneSkge1xuICAgICAgICAgICAgICAgIExvb2t1cFN0cmF0ZWd5Lk5PTkUgLT4gcmV0dXJuIG51bGxcbiAgICAgICAgICAgICAgICBMb29rdXBTdHJhdGVneS5IT1ZFUiAtPiB7XG4gICAgICAgICAgICAgICAgICAgIGZvciAocGF0aFBvaW50IGluIHBhdGhQcm9qZWN0aW9uLnBvaW50cykge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFsIHRhcmdldFBvaW50Q29vcmQgPSBwYXRoUG9pbnQucHJvamVjdGlvbigpLnh5KClcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChNYXRoVXRpbC5hcmVFcXVhbCh0YXJnZXRQb2ludENvb3JkLCBjdXJzb3JDb29yZCwgUE9JTlRfQVJFQV9FUFNJTE9OKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwYXRoUG9pbnRcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBMb29rdXBTdHJhdGVneS5ORUFSRVNUIC0+IHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIG5lYXJlc3RQb2ludDogUGF0aFBvaW50PyA9IG51bGxcbiAgICAgICAgICAgICAgICAgICAgZm9yIChwYXRoUG9pbnQgaW4gcGF0aFByb2plY3Rpb24ucG9pbnRzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YWwgdGFyZ2V0UG9pbnRDb29yZCA9IHBhdGhQb2ludC5wcm9qZWN0aW9uKCkueHkoKVxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNsb3Nlc3RQb2ludENoZWNrZXIuY2hlY2sodGFyZ2V0UG9pbnRDb29yZCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZWFyZXN0UG9pbnQgPSBwYXRoUG9pbnRcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmVhcmVzdFBvaW50XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgZnVuIGNoZWNrUG9pbnQoXG4gICAgICAgIGN1cnNvckNvb3JkOiBEb3VibGVWZWN0b3IsXG4gICAgICAgIHBvaW50UHJvamVjdGlvbjogUG9pbnRUYXJnZXRQcm9qZWN0aW9uLFxuICAgICAgICBjbG9zZXN0UG9pbnRDaGVja2VyOiBDbG9zZXN0UG9pbnRDaGVja2VyXG4gICAgKTogQm9vbGVhbiB7XG4gICAgICAgIHJldHVybiB3aGVuIChsb2NhdG9yTG9va3VwU3BhY2UpIHtcbiAgICAgICAgICAgIExvb2t1cFNwYWNlLk5PTkUgLT4gZmFsc2VcbiAgICAgICAgICAgIExvb2t1cFNwYWNlLlggLT4gd2hlbiAobG9jYXRvckxvb2t1cFN0c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b3JMb29rdXBTcGFjZSkge1xuICAgICAgICAgICAgTG9va3VwU3BhY2UuTk9ORSAtPiBmYWxzZVxuICAgICAgICAgICAgTG9va3VwU3BhY2UuWCAtPiByYW5nZUJhc2VkTG9va3VwKGN1cnNvckNvb3JkLCBjbG9zZXN0UG9pbnRDaGVja2VyLCByZWN0UHJvamVjdGlvbi54KCkpXG4gICAgICAgICAgICBMb29rdXBTcGFjZS5YWSAtPiB7XG4gICAgICAgICAgICAgICAgdmFsIHJlY3QgPSByZWN0UHJvamVjdGlvbi54eSgpXG4gICAgICAgICAgICAgICAgd2hlbiAobG9jYXRvckxvb2t1cFN0cmF0ZWd5KSB7XG4gICAgICAgICAgICAgICAgICAgIExvb2t1cFN0cmF0ZWd5Lk5PTkUgLT4gZmFsc2VcbiAgICAgICAgICAgICAgICAgICAgTG9va3VwU3RyYXRlZ3kuSE9WRVIgLT4gY3Vyc29yQ29vcmQgaW4gcmVjdFxuICAgICAgICAgICAgICAgICAgICBMb29rdXBTdHJhdGVneS5ORUFSRVNUIC0+IGlmIChjdXJzb3JDb29yZCBpbiByZWN0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbG9zZXN0UG9pbnRDaGVja2VyLmNoZWNrKGN1cnNvckNvb3JkKVxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHggPSBpZiAoY3Vyc29yQ29vcmQueCA8IHJlY3QubGVmdCkgcmVjdC5sZWZ0IGVsc2UgcmVjdC5yaWdodFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHkgPSBpZiAoY3Vyc29yQ29vcmQueSA8IHJlY3QudG9wKSByZWN0LnRvcCBlbHNlIHJlY3QuYm90dG9tXG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHggPSBpZiAocmVjdC54UmFuZ2UoKS5jb250YWlucyhjdXJzb3JDb29yZC54KSkgY3Vyc29yQ29vcmQueCBlbHNlIHhcbiAgICAgICAgICAgICAgICAgICAgICAgIHkgPSBpZiAocmVjdC55UmFuZ2UoKS5jb250YWlucyhjdXJzb3JDb29yZC55KSkgY3Vyc29yQ29vcmQueSBlbHNlIHlcblxuICAgICAgICAgICAgICAgICAgICAgICAgY2xvc2VzdFBvaW50Q2hlY2tlci5jaGVjayhEb3VibGVWZWN0b3IoeCwgeSkpXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBmdW4gY2hlY2tQb2x5Z29uKFxuICAgICAgICBjdXJzb3JDb29yZDogRG91YmxlVmVjdG9yLFxuICAgICAgICBwb2x5Z29uUHJvamVjdGlvbjogUG9seWdvblRhcmdldFByb2plY3Rpb24sXG4gICAgICAgIGNsb3Nlc3RQb2ludENoZWNrZXI6IENsb3Nlc3RQb2ludENoZWNrZXJcbiAgICApOiBCb29sZWFuIHtcbiAgICAgICAgcmV0dXJuIHdoZW4gKGxvY2F0b3JMb29rdXBTcGFjZSkge1xuICAgICAgICAgICAgTG9va3VwU3BhY2UuTk9ORSAtPiBmYWxzZVxuICAgICAgICAgICAgTG9va3VwU3BhY2UuWCAtPiByYW5nZUJhc2VkTG9va3VwKGN1cnNvckNvb3JkLCBjbG9zZXN0UG9pbnRDaGVja2VyLCBwb2x5Z29uUHJvamVjdGlvbi54KCkpXG4gICAgICAgICAgICBMb29rdXBTcGFjZS5YWSAtPiB3aGVuIChsb2NhdG9yTG9va3VwU3RyYXRlZ3kpIHtcbiAgICAgICAgICAgICAgICBMb29rdXBTdHJhdGVneS5OT05FIC0+IGZhbHNlXG4gICAgICAgICAgICAgICAgTG9va3VwU3RyYXRlZ3kuTkVBUkVTVCwgLy8gRG9lc24ndCBzdXBwb3J0IG5lYXJlc3Qgc3RyYXRlZ3kuIFRhcmdldCBjYW4gYmUgZm91bmQgb25seSBieSBob3ZlcmluZyBhIGN1cnNvciBhYm92ZSB0aGUgcG9seWdvbi5cbiAgICAg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gICAgZmFsc2VcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBjb21wYW5pb24gb2JqZWN0IHtcbiAgICAgICAgcHJpdmF0ZSBjb25zdCB2YWwgUE9JTlRfQVJFQV9FUFNJTE9OID0gMC4xXG4gICAgICAgIHByaXZhdGUgY29uc3QgdmFsIFJFQ1RfWF9ORUFSRVNUX0VQU0lMT04gPSAyLjBcblxuICAgICAgICBwcml2YXRlIGZ1biA8VD4gc2VhcmNoTmVhcmVzdCh2YWx1ZTogRG91YmxlLCBpdGVtczogTGlzdDxUPiwgbWFwcGVyOiAoVCkgLT4gRG91YmxlKTogVCB7XG4gICAgICAgICAgICBpZiAodmFsdWUgPCBtYXBwZXIoaXRlbXMuZmlyc3QoKSkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gaXRlbXMuZmlyc3QoKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHZhbHVlID4gbWFwcGVyKGl0ZW1zLmxhc3QoKSkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gaXRlbXMubGFzdCgpXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhciBsbyA9IDBcbiAgICAgICAgICAgIHZhciBoaSA9IGl0ZW1zLmxhc3RJbmRleFxuXG4gICAgICAgICAgICB3aGlsZSAobG8gPD0gaGkpIHtcbiAgICAgICAgICAgICAgICB2YWwgbWlkID0gKGhpICsgbG8pIC8gMlxuICAgICAgICAgICAgICAgIHZhbCBtaWRWYWx1ZSA9IG1hcHBlcihpdGVtc1ttaWRdKVxuXG4gICAgICAgICAgICAgICAgd2hlbiB7XG4gICAgICAgICAgICAgICAgICAgIHZhbHVlIDwgbWlkVmFsdWUgLT4gaGkgPSBtaWQgLSAxXG4gICAgICAgICAgICAgICAgICAgIHZhbHVlID4gbWlkVmFsdWUgLT4gbG8gPSBtaWQgKyAxXG4gICAgICAgICAgICAgICAgICAgIGVsc2UgLT4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hIGFzIExpc3Q8UmluZ1hZPlxuICAgIH1cblxuICAgIGNvbXBhbmlvbiBvYmplY3Qge1xuICAgICAgICBwcml2YXRlIGNvbnN0IHZhbCBQT0lOVFNfQ09VTlRfVE9fU0tJUF9TSU1QTElGSUNBVElPTiA9IDIwLjBcbiAgICAgICAgcHJpdmF0ZSBjb25zdCB2YWwgQVJFQV9UT0xFUkFOQ0VfUkFUSU8gPSAwLjFcbiAgICAgICAgcHJpdmF0ZSBjb25zdCB2YWwgTUFYX1RPTEVSQU5DRSA9IDQwLjBcblxuICAgICAgICBmdW4gY3JlYXRlKHBvaW50czogTGlzdDxEb3VibGVWZWN0b3I+LCBsb29rdXBTcGFjZTogTG9va3VwU3BhY2UpOiBQb2x5Z29uVGFyZ2V0UHJvamVjdGlvbiB7XG4gICAgICAgICAgICB2YWwgcmluZ3MgPSBzcGxpdFJpbmdzKHBvaW50cylcblxuICAgICAgICAgICAgcmV0dXJuIHdoZW4gKGxvb2t1cFNwYWNlKSB7XG4gICAgICAgICAgICAgICAgWCAtPiBQb2x5Z29uVGFyZ2V0UHJvamVjdGlvbihtYXBUb1gocmluZ3MpKVxuICAgICAgICAgICAgICAgIFhZIC0+IFBvbHlnb25UYXJnZXRQcm9qZWN0aW9uKG1hcFRvWFkocmluZ3MpKVxuICAgICAgICAgICAgICAgIE5PTkUgLT4gdW5kZWZpbmVkTG9va3VwU3BhY2VFcnJvcigpXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBwcml2YXRlIGZ1biBtYXBUb1gocmluZ3M6IExpc3Q8TGlzdDxEb3VibGVWZWN0b3I+Pik6IERvdWJsZVNwYW4ge1xuICAgICAgICAgICAgdmFyIG1pbiA9IHJpbmdzWzBdWzBdLnhcbiAgICAgICAgICAgIHZhciBtYXggPSBtaW5cbiAgICAgICAgICAgIGZvciAocmluZyBpbiByaW5ncykge1xuICAgICAgICAgICAgICAgIGZvciAocG9pbnQgaW4gcmluZykge1xuICAgICAgICAgICAgICAgICAgICBtaW4gPSBtaW4obWluLCBwb2ludC54KVxuICAgICAgICAgICAgICAgICAgICBtYXggPSBtYXgobWF4LCBwb2ludC54KVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBEb3VibGVTcGFuKG1pbiwgbWF4KVxuICAgICAgICB9XG5cbiAgICAgICAgcHJpdmF0ZSBmdW4gbWFwVG9YWShyaW5nczogTGlzdDxMaXN0PERvdWJsZVZlY3Rvcj4+KTogTGlzdDxSaW5nWFk+IHtcbiAgICAgICAgICAgIHZhbCBwb2x5Z29uID0gQXJyYXlMaXN0PFJpbmdYWT4oKVxuXG4gICAgICAgICAgICBmb3IgKHJpbmcgaW4gcmluZ3MpIHtcbiAgICAgICAgICAgICAgICBpZiAocmluZy5zaXplIDwgNCkge1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHZhbCBiYm94ID0gYm91bmRpbmdCb3gocmluZykgPzogZXJyb3IoXCJiYm94IHNob3VsZCBiZSBub3QgbnVsbCAtIHJpbmcgaXMgbm90IGVtcHR5XCIpXG4gICAgICAgICAgICAgICAgdmFsIGFyZWEgPSBjYWxjdWxhdGVBcmVhKHJpbmcpXG5cbiAgICAgICAgICAgICAgICB2YWwgc2ltcGxpZmllZFJpbmc6IExpc3Q8RG91YmxlVmVjdG9yPlxuXG4gICAgICAgICAgICAgICAgaWYgKHJpbmcuc2l6ZSA+IFBPSU5UU19DT1VOVF9UT19TS0lQX1NJTVBMSUZJQ0FUSU9OKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhbCB0b2xlcmFuY2UgPSBtaW4oYXJlYSAqIEFSRUFfVE9MRVJBTkNFX1JBVElPLCBNQVhfVE9MRVJBTkNFKVxuICAgICAgICAgICAgICAgICAgICBzaW1wbGlmaWVkUmluZyA9IFBvbHlsaW5lU2ltcGxpZmllci52aXN2YWxpbmdhbVdoeWF0dChyaW5nKS5zZXRXZWlnaHRMaW1pdCh0b2xlcmFuY2UpLnBvaW50c1xuXG4gICAgICAgICAgICAgICAgICAgIGlmIChpc0xvZ0VuYWJsZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIlNpbXA6IFwiICsgcmluZy5zaXplICsgXCIgLT4gXCIgKyBzaW1wbGlmaWVkUmluZy5zaXplICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiLCB0b2xlcmFuY2U9XCIgKyB0b2xlcmFuY2UgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCIsIGJib3g9XCIgKyBiYm94ICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiLCBhcmVhPVwiICsgYXJlYVxuICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGlzTG9nRW5hYmxlZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbG9nKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiS2VlcDogc2l6ZTogXCIgKyByaW5nLnNpemUgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCIsIGJib3g9XCIgKyBiYm94ICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiLCBhcmVhPVwiICsgYXJlYVxuICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHNpbXBsaWZpZWRSaW5nID0gcmluZ1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChzaW1wbGlmaWVkUmluZy5zaXplIDwgNCkge1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHBvbHlnb24uYWRkKFJpbmdYWShzaW1wbGlmaWVkUmluZywgYmJveCkpXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBwb2x5Z29uXG4gICAgICAgIH1cblxuICAgICAgICBwcml2YXRlIGZ1biBsb2coc3RyOiBTdHJpbmcpIHtcbiAgICAgICAgICAgIHByaW50bG4oc3RyKVxuICAgICAgICB9XG5cbiAgICAgICAgcHJpdmF0ZSBjb25zdCB2YWwgaXNMb2dFbmFibGVkID0gZmFsc2VcbiAgICB9XG5cbiAgICBpbnRlcm5hbCBjbGFzcyBSaW5nWFkoXG4gICAgICAgIHByaXZhdGUgdmFsIGVkZ2VzOiBMaXN0PERvdWJsZVZlY3Rvcj4sXG4gICAgICAgIHByaXZhdGUgdmFsIGJib3g6IERvdWJsZVJlY3RhbmdsZVxuICAgICkge1xuICAgICAgICBvcGVyYXRvciBmdW4gY29udGFpbnMocDogRG91YmxlVmVjdG9yKSA9IHAgaW4gYmJveCAmJiBwb2x5Z29uQ29udGFpbnNDb29yZGluYXRlKGVkZ2VzLCBwKVxuICAgIH1cbn1cblxuaW50ZXJuYWwgY2xhc3MgUGF0aFRhcmdldFByb2plY3Rpb24odmFsIGRhdGE6IExpc3Q8UGF0aFBvaW50PikgOiBUYXJnZXRQcm9qZWN0aW9uKCkge1xuICAgIHZhbCBwb2ludHM6IExpc3Q8UGF0aFBvaW50PiA9IGRhdGFcblxuICAgIGludGVybmFsIGNsYXNzIFBhdGhQb2ludCBwcml2YXRlIGNvbnN0cnVjdG9yKFxuICAgICAgICBwcml2YXRlIHZhbCBteVBvaW50VGFyZ2V0UHJvamVjdGlvbjogUG9pbnRUYXJnZXRQcm9qZWN0aW9uLFxuICAgICAgICB2YWwgb3JpZ2luYWxDb29yZDogRG91YmxlVmVjdG9yLFxuICAgICAgICB2YWwgaW5kZXg6IEludFxuICAgICkge1xuICAgICAgICBmdW4gcHJvamVjdGlvbigpID0gbXlQb2ludFRhcmdldFByb2plY3Rpb25cblxuICAgICAgICBjb21wYW5pb24gb2JqZWN0IHtcbiAgICAgICAgICAgIGludGVybmFsIGZ1biBjcmVhdGUocDogRG91YmxlVmVjdG9yLCBpbmRleDogSW50LCBsb29rdXBTcGFjZTogTG9va3VwU3BhY2UpOiBQYXRoUG9pbnQge1xuICAgICAgICAgICAgICAgIHJldHVybiB3aGVuIChsb29rdXBTcGFjZSkge1xuICAgICAgICAgICAgICAgICAgICBYIC0+IFBhdGhQb2ludChQb2ludFRhcmdldFByb2plY3Rpb24uY3JlYXRlKHAsIGxvb2t1cFNwYWNlKSwgcCwgaW5kZXgpXG4gICAgICAgICAgICAgICAgICAgIFhZIC0+IFBhdGhQb2ludChQb2ludFRhcmdldFByb2plY3Rpb24uY3JlYXRlKHAsIGxvb2t1cFNwYWNlKSwgcCwgaW5kZXgpXG4gICAgICAgICAgICAgICAgICAgIE5PTkUgLT4gdW5kZWZpbmVkTG9va3VwU3BhY2VFcnJvcigpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgY29tcGFuaW9uIG9iamVjdCB7XG4gICAgICAgIGZ1biBjcmVhdGUoXG4gICAgICAgICAgICBwb2ludHM6IExpc3Q8RG91YmxlVmVjdG9yPixcbiAgICAgICAgICAgIGluZGV4TWFwcGVyOiAoSW50KSAtPiBJbnQsXG4gICAgICAgICAgICBsb29rdXBTcGFjZTogTG9va3VwU3BhY2VcbiAgICAgICAgKTogUGF0aFRhcmdldFByb2plY3Rpb24ge1xuICAgICAgICAgICAgdmFsIHBvaW50c0xvY2F0aW9uID0gQXJyYXlMaXN0PFBhdGhQb2ludD4oKVxuICAgICAgICAgICAgZm9yICgoaSwgcG9pbnQpIGluIHBvaW50cy53aXRoSW5kZXgoKSkge1xuICAgICAgICAgICAgICAgIHBvaW50c0xvY2F0aW9uLmFkZChQYXRoUG9pbnQuY3JlYXRlKHBvaW50LCBpbmRleE1hcH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gIGludGVybmFsIGZ1biBjcmVhdGVHZW9tVGFyZ2V0KGhpdENvb3JkOiBEb3VibGVWZWN0b3IsIGhpdEluZGV4OiBJbnQpOiBHZW9tVGFyZ2V0IHtcbiAgICAgICAgcmV0dXJuIEdlb21UYXJnZXQoXG4gICAgICAgICAgICBoaXRJbmRleCxcbiAgICAgICAgICAgIGNyZWF0ZVRpcExheW91dEhpbnQoXG4gICAgICAgICAgICAgICAgaGl0Q29vcmQgPSBoaXRDb29yZCxcbiAgICAgICAgICAgICAgICBoaXRTaGFwZSA9IGhpdFNoYXBlLFxuICAgICAgICAgICAgICAgIHRvb2x0aXBLaW5kID0gdG9vbHRpcEtpbmQsXG4gICAgICAgICAgICAgICAgc3RlbUxlbmd0aCA9IHRvb2x0aXBQYXJhbXMuc3RlbUxlbmd0aCxcbiAgICAgICAgICAgICAgICBmaWxsQ29sb3IgPSB0b29sdGlwUGFyYW1zLmZpbGxDb2xvcixcbiAgICAgICAgICAgICAgICBtYXJrZXJDb2xvcnMgPSB0b29sdGlwUGFyYW1zLm1hcmtlckNvbG9ycyxcbiAgICAgICAgICAgICksXG4gICAgICAgICAgICB0b29sdGlwUGFyYW1zLnRpcExheW91dEhpbnRzXG4gICAgICAgIClcbiAgICB9XG5cbiAgICBjb21wYW5pb24gb2JqZWN0IHtcbiAgICAgICAgZnVuIGNyZWF0ZVRpcExheW91dEhpbnQoXG4gICAgICAgICAgICBoaXRDb29yZDogRG91YmxlVmVjdG9yLFxuICAgICAgICAgICAgaGl0U2hhcGU6IEhpdFNoYXBlLFxuICAgICAgICAgICAgdG9vbHRpcEtpbmQ6IFRpcExheW91dEhpbnQuS2luZCxcbiAgICAgICAgICAgIHN0ZW1MZW5ndGg6IFRpcExheW91dEhpbnQuU3RlbUxlbmd0aCxcbiAgICAgICAgICAgIGZpbGxDb2xvcjogQ29sb3I/LFxuICAgICAgICAgICAgbWFya2VyQ29sb3JzOiBMaXN0PENvbG9yPlxuICAgICAgICApOiBUaXBMYXlvdXRIaW50IHtcblxuICAgICAgICAgICAgcmV0dXJuIHdoZW4gKGhpdFNoYXBlLmtpbmQpIHtcbiAgICAgICAgICAgICAgICBQT0lOVCAtPiB3aGVuICh0b29sdGlwS2luZCkge1xuICAgICAgICAgICAgICAgICAgICBWRVJUSUNBTF9UT09MVElQIC0+XG4gICAgICAgICAgICAgICAgICAgICAgICB2ZXJ0aWNhbFRvb2x0aXAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGl0Q29vcmQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGl0U2hhcGUucG9pbnQucmFkaXVzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ZW1MZW5ndGgsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsbENvbG9yLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcmtlckNvbG9yc1xuICAgICAgICAgICAgICAgICAgICAgICAgKVxuXG4gICAgICAgICAgICAgICAgICAgIENVUlNPUl9UT09MVElQIC0+IGN1cnNvclRvb2x0aXAoaGl0Q29vcmQsIHN0ZW1MZW5ndGgsIGZpbGxDb2xvciwgbWFya2VyQ29sb3JzKVxuICAgICAgICAgICAgICAgICAgICBlbHNlIC0+IGVycm9yKFwiV3JvbmcgVGlwTGF5b3V0SGludC5raW5kID0gJHRvb2x0aXBLaW5kIGZvciBQT0lOVFwiKVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIFJFQ1QgLT4gd2hlbiAodG9vbHRpcEtpbmQpIHtcbiAgICAgICAgICAgICAgICAgICAgVkVSVElDQUxfVE9PTFRJUCAtPiB2ZXJ0aWNhbFRvb2x0aXAoaGl0Q29vcmQsIGhpdFNoYXBlLnJlY3Qud2lkdGggLyAyLCBzdGVtTGVuZ3RoLCBmaWxsQ29sb3IsIG1hcmtlckNvbG9ycylcbiAgICAgICAgICAgICAgICAgICAgSE9SSVpPTlRBTF9UT09MVElQIC0+IGhvcml6b250YWxUb29sdGlwKGhpdENvb3JkLCBoaXRTaGFwZS5yZWN0LndpZHRoIC8gMiwgc3RlbUxlbmd0aCwgZmlsbENvbG9yLCBtYXJrZXJDb2xvcnMpXG4gICAgICAgICAgICAgICAgICAgIENVUlNPUl9UT09MVElQIC0+IGN1cnNvclRvb2x0aXAoaGl0Q29vcmQsIHN0ZW1MZW5ndGgsIGZpbGxDb2xvciwgbWFya2VyQ29sb3JzKVxuICAgICAgICAgICAgICAgICAgICBST1RBVEVEX1RPT0xUSVAgLT4gcm90YXRlZFRvb2x0aXAoaGl0Q29vcmQsIDAuMCwgbnVsbCwgc3RlbUxlbmd0aClcbiAgICAgICAgICAgICAgICAgICAgZWxzZSAtPiBlcnJvcihcIldyb25nIFRpcExheW91dEhpbnQua2luZCA9ICR0b29sdGlwS2luZCBmb3IgUkVDVFwiKVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIFBBVEggLT4gd2hlbiAodG9vbHRpcEtpbmQpIHtcbiAgICAgICAgICAgICAgICAgICAgSE9SSVpPTlRBTF9UT09MVElQIC0+IGhvcml6b250YWxUb29sdGlwKGhpdENvb3JkLCAwLjAsIHN0ZW1MZW5ndGgsIGZpbGxDb2xvciwgbWFya2VyQ29sb3JzKVxuICAgICAgICAgICAgICAgICAgICBWRVJUSUNBTF9UT09MVElQIC0+IHZlcnRpY2FsVG9vbHRpcChoaXRDb29yZCwgMC4wLCBzdGVtTGVuZ3RoLCBmaWxsQ29sb3IsIG1hcmtlckNvbG9ycylcbiAgICAgICAgICAgICAgICAgICAgZWxzZSAtPiBlcnJvcihcIldyb25nIFRpcExheW91dEhpbnQua2luZCA9ICR0b29sdGlwS2luZCBmb3IgUEFUSFwiKVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIFBPTFlHT04gLT4gd2hlbiAodG9vbHRpcEtpbmQpIHtcbiAgICAgICAgICAgICAgICAgICAgQ1VSU09SX1RPT0xUSVAgLT4gY3Vyc29yVG9vbHRpcChoaXRD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R2VvbVRhcmdldChcbiAgICAgICAgICAgICAgICBnZW9tVGFyZ2V0LmhpdEluZGV4LFxuICAgICAgICAgICAgICAgIGNvbnZlcnRUaXBMYXlvdXRIaW50KGdlb21UYXJnZXQudGlwTGF5b3V0SGludCksXG4gICAgICAgICAgICAgICAgY29udmVydFRpcExheW91dEhpbnRzKGdlb21UYXJnZXQuYWVzVGlwTGF5b3V0SGludHMpXG4gICAgICAgICAgICApXG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBwcml2YXRlIGZ1biBjb252ZXJ0VGlwTGF5b3V0SGludChoaW50OiBUaXBMYXlvdXRIaW50KTogVGlwTGF5b3V0SGludCB7XG4gICAgICAgIHJldHVybiBUaXBMYXlvdXRIaW50KFxuICAgICAgICAgICAgaGludC5raW5kLFxuICAgICAgICAgICAgc2FmZUNvbnZlcnRUb1Bsb3RDb29yZChoaW50LmNvb3JkKSEhLFxuICAgICAgICAgICAgY29udmVydFRvUGxvdERpc3RhbmNlKGhpbnQub2JqZWN0UmFkaXVzKSxcbiAgICAgICAgICAgIGhpbnQuc3RlbUxlbmd0aCxcbiAgICAgICAgICAgIGhpbnQuZmlsbENvbG9yLFxuICAgICAgICAgICAgaGludC5tYXJrZXJDb2xvcnNcbiAgICAgICAgKVxuICAgIH1cblxuICAgIHByaXZhdGUgZnVuIGNvbnZlcnRUaXBMYXlvdXRIaW50cyh0aXBMYXlvdXRIaW50czogTWFwPEFlczwqPiwgVGlwTGF5b3V0SGludD4pOiBNYXA8QWVzPCo+LCBUaXBMYXlvdXRIaW50PiB7XG4gICAgICAgIHZhbCByZXN1bHQgPSBIYXNoTWFwPEFlczwqPiwgVGlwTGF5b3V0SGludD4oKVxuICAgICAgICB0aXBMYXlvdXRIaW50cy5mb3JFYWNoIHsgKGFlcywgaGludCkgLT4gcmVzdWx0W2Flc10gPSBjb252ZXJ0VGlwTGF5b3V0SGludChoaW50KSB9XG4gICAgICAgIHJldHVybiByZXN1bHRcbiAgICB9XG5cbiAgICBwc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5wbG90LmJhc2UuaW50ZXJhY3QuVGlwTGF5b3V0SGludFxuaW1wb3J0IGpldGJyYWlucy5kYXRhbG9yZS5wbG90LmJhc2UudXRpbC5ZT3JpZW50YXRpb25CYXNlVXRpbC5mbGlwQWVzS2V5c1xuXG5pbnRlcm5hbCBjbGFzcyBZT3JpZW50YXRpb25UYXJnZXRDb2xsZWN0b3IocHJpdmF0ZSB2YWwgdGFyZ2V0Q29sbGVjdG9yOiBHZW9tVGFyZ2V0Q29sbGVjdG9yKSA6IEdlb21UYXJnZXRDb2xsZWN0b3Ige1xuXG4gICAgb3ZlcnJpZGUgZnVuIGFkZFBvaW50KFxuICAgICAgICBpbmRleDogSW50LFxuICAgICAgICBwb2ludDogRG91YmxlVmVjdG9yLFxuICAgICAgICByYWRpdXM6IERvdWJsZSxcbiAgICAgICAgdG9vbHRpcFBhcmFtczogR2VvbVRhcmdldENvbGxlY3Rvci5Ub29sdGlwUGFyYW1zLFxuICAgICAgICB0b29sdGlwS2luZDogVGlwTGF5b3V0SGludC5LaW5kXG4gICAgKSB7XG4gICAgICAgIHRhcmdldENvbGxlY3Rvci5hZGRQb2ludChcbiAgICAgICAgICAgIGluZGV4LFxuICAgICAgICAgICAgcG9pbnQsXG4gICAgICAgICAgICByYWRpdXMsXG4gICAgICAgICAgICBhZnRlcllPcmllbnRhdGlvbih0b29sdGlwUGFyYW1zKSxcbiAgICAgICAgICAgIHRvb2x0aXBLaW5kXG4gICAgICAgIClcbiAgICB9XG5cbiAgICBvdmVycmlkZSBmdW4gYWRkUmVjdGFuZ2xlKFxuICAgICAgICBpbmRleDogSW50LFxuICAgICAgICByZWN0YW5nbGU6IERvdWJsZVJlY3RhbmdsZSxcbiAgICAgICAgdG9vbHRpcFBhcmFtczogR2VvbVRhcmdldENvbGxlY3Rvci5Ub29sdGlwUGFyYW1zLFxuICAgICAgICB0b29sdGlwS2luZDogVGlwTGF5b3V0SGludC5LaW5kXG4gICAgKSB7XG4gICAgICAgIHRhcmdldENvb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RzLmZyZWVWU2NhbGUpIHtcbiAgICAgICAgICAgIEZyZWVTY2FsZXNUaWxlc0xheW91dGVyLmNyZWF0ZVRpbGVMYXlvdXRJbmZvcyhcbiAgICAgICAgICAgICAgICB0aWxlc0FyZWFTaXplLFxuICAgICAgICAgICAgICAgIGZhY2V0cyxcbiAgICAgICAgICAgICAgICBsYXlvdXRQcm92aWRlckJ5VGlsZSxcbiAgICAgICAgICAgICAgICB0b3RhbEFkZGVkSFNpemUsXG4gICAgICAgICAgICAgICAgdG90YWxBZGRlZFZTaXplLFxuICAgICAgICAgICAgICAgIGNvb3JkUHJvdmlkZXIsXG4gICAgICAgICAgICAgICAgaEF4aXNUaGVtZSA9IGhBeGlzVGhlbWUsXG4gICAgICAgICAgICAgICAgdkF4aXNUaGVtZSA9IHZBeGlzVGhlbWUsXG4gICAgICAgICAgICApXG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBGaXhlZFNjYWxlc1RpbGVzTGF5b3V0ZXIuY3JlYXRlVGlsZUxheW91dEluZm9zKFxuICAgICAgICAgICAgICAgIHRpbGVzQXJlYVNpemUsXG4gICAgICAgICAgICAgICAgZmFjZXRzLFxuICAgICAgICAgICAgICAgIGxheW91dFByb3ZpZGVyQnlUaWxlLFxuICAgICAgICAgICAgICAgIHRvdGFsQWRkZWRIU2l6ZSxcbiAgICAgICAgICAgICAgICB0b3RhbEFkZGVkVlNpemUsXG4gICAgICAgICAgICAgICAgY29vcmRQcm92aWRlcixcbiAgICAgICAgICAgICAgICBoQXhpc1RoZW1lID0gaEF4aXNUaGVtZSxcbiAgICAgICAgICAgICAgICB2QXhpc1RoZW1lID0gdkF4aXNUaGVtZSxcbiAgICAgICAgICAgIClcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIENyZWF0ZSBmaW5hbCBwbG90IHRpbGVzIGxheW91dCBpbmZvcy5cblxuXG4gICAgICAgIC8vIEFsaWduIGdlb20gYXJlYXMgb2YgdGlsZXMuXG5cbiAgICAgICAgLy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dGggPSBpZiAoZmFjZXRUaWxlLnJvd0xhYiAhPSBudWxsICYmIHNob3dGYWNldFN0cmlwKSB7XG4gICAgICAgICAgICAgICAgRkFDRVRfVEFCX0hFSUdIVCAgLy8gb25lIGxhYmVsIG9uIHRoZSBsZWZ0IHNpZGUuXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIDAuMFxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YWwgYXhpc1dpZHRoID0gaWYgKGZhY2V0VGlsZS5oYXNWQXhpcykge1xuICAgICAgICAgICAgICAgIGxheW91dEluZm8uYXhpc1RoaWNrbmVzc1koKVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAwLjBcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFsIHRpbGVYID0gZ2VvbVggLSBheGlzV2lkdGhcbiAgICAgICAgICAgIHZhbCB0aWxlV2lkdGggPSBvdXRlckdlb21TaXplLnggKyBheGlzV2lkdGggKyB0aWxlTGFiZWxXaWR0aFxuXG4gICAgICAgICAgICAvLyBUaWxlIGhlaWdodFxuICAgICAgICAgICAgdmFsIHRpbGVMYWJlbEhlaWdodCA9IGlmIChzaG93RmFjZXRTdHJpcCkge1xuICAgICAgICAgICAgICAgIGZhY2V0Q29sSGVhZEhlaWdodChmYWNldFRpbGUuY29sTGFicy5zaXplKVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAwLjBcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFsIGF4aXNIZWlnaHQgPSBpZiAoZmFjZXRUaWxlLmhhc0hBeGlzKSB7XG4gICAgICAgICAgICAgICAgbGF5b3V0SW5mby5heGlzVGhpY2tuZXNzWCgpXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIDAuMFxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YWwgdGlsZVkgPSBnZW9tWSAtIHRpbGVMYWJlbEhlaWdodFxuICAgICAgICAgICAgdmFsIHRpbGVIZWlnaHQgPSBvdXRlckdlb21TaXplLnkgKyB0aWxlTGFiZWxIZWlnaHQgKyBheGlzSGVpZ2h0XG5cbi8vICAgICAgICAgICAgaWYgKGNvbCA9PSAwKSB7XG4vLyAgICAgICAgICAgICAgICBwcmludGxuKFwiWyRyb3ddWyR0aWxlWV0gJHRpbGVIZWlnaHQgPSAke2dlb21TaXplLnl9ICsgJHRpbGVMYWJlbEhlaWdodCArICRheGlzSGVpZ2h0XCIpXG4vLyAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gQWJzb2x1dGUgYm91bmRzLi4uXG4gICAgICAgICAgICB2YWwgdGlsZUJvdW5kcyA9IERvdWJsZVJlY3RhbmdsZShcbiAgICAgICAgICAgICAgICBEb3VibGVWZWN0b3IodGlsZVgsIHRpbGVZKSxcbiAgICAgICAgICAgICAgICBEb3VibGVWZWN0b3IodGlsZVdpZHRoLCB0aWxlSGVpZ2h0KVxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgdmFsIGdlb21PdXRlckJvdW5kcyA9IERvdWJsZVJlY3RhbmdsZShcbiAgICAgICAgICAgICAgICBEb3VibGVWZWN0b3IoZ2VvbVgsIGdlb21ZKSxcbiAgICAgICAgICAgICAgICBvdXRlckdlb21TaXplXG4gICAgICAgICAgICApXG5cbiAgICAgICAgICAgIHRpbGVCb3VuZHNMaXN0LmFkZCh0aWxlQm91bmRzKVxuICAgICAgICAgICAgZ2VvbU91dGVyQm91bmRzTGlzdC5hZGQoZ2VvbU91dGVyQm91bmRzKVxuICAgICAgICB9XG5cbiAgICAgICAgdmFsIHRpbGVzQXJlYU9yaWdpbiA9IHRpbGVCb3VuZHNMaXN0XG4gICAgICAgICAgICAucmVkdWNlIHsgYjAsIGIxIC0+IGIwLnVuaW9uKGIxKSB9XG4gICAgICAgICAgICAub3JpZ2luXG5cbiAgICAgICAgLy8gTm9ybWFsaXplIG9yaWdpbiBvZiB0aWxlc0Fy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EluZm8+LFxuICAgICAgICBmYWNldHM6IFBsb3RGYWNldHMsXG4gICAgICAgIGFkZGVkSFNpemU6IERvdWJsZSxcbiAgICAgICAgYWRkZWRWU2l6ZTogRG91YmxlLFxuICAgICk6IERvdWJsZVZlY3RvciB7XG4gICAgICAgIC8vIFRpbGVzIGFyZSBlbnVtZXJhdGVkIGJ5IHJvd3MsIGkuZS5cbiAgICAgICAgLy8gdGhlIGluZGV4IGlzIGNvbXB1dGVkIGxpa2U6IHJvdyAqIG5Db2xzICsgY29sXG5cbiAgICAgICAgdmFsIGZhY2V0VGlsZXMgPSBmYWNldHMudGlsZUluZm9zKClcblxuICAgICAgICB2YWwgYWRkZWRWQXhpc1dpZHRoID0gKDAgdW50aWwgZmFjZXRzLmNvbENvdW50KS5zdW1PZiB7IGNvbCAtPlxuICAgICAgICAgICAgbWF4VkF4aXNUaGlja25lc3MobGF5b3V0SW5mb3MsIGZhY2V0VGlsZXMsIGNvbClcbiAgICAgICAgfVxuICAgICAgICB2YWwgYWRkZWRIQXhpc0hlaWdodCA9ICgwIHVudGlsIGZhY2V0cy5yb3dDb3VudCkuc3VtT2YgeyByb3cgLT5cbiAgICAgICAgICAgIG1heEhBeGlzVGhpY2tuZXNzKGxheW91dEluZm9zLCBmYWNldFRpbGVzLCByb3csIGZhY2V0cy5yb3dDb3VudClcbiAgICAgICAgfVxuXG4gICAgICAgIHZhbCBtYXhSb3dXaWR0aEdlb21Pbmx5ID0gKDAgdW50aWwgZmFjZXRzLnJvd0NvdW50KS5tYXAgeyByb3cgLT5cbiAgICAgICAgICAgIHJvd0luZGljZXMoZmFjZXRUaWxlcywgcm93KS5zdW1PZiB7IGluZCAtPlxuICAgICAgICAgICAgICAgIGxheW91dEluZm9zW2luZF0uZ2VvbU91dGVyV2lkdGgoKVxuICAgICAgICAgICAgfVxuICAgICAgICB9Lm1heE9yTnVsbCgpID86IDAuMFxuXG4gICAgICAgIHZhbCBtYXhDb2xIZWlnaHRHZW9tT25seSA9ICgwIHVudGlsIGZhY2V0cy5jb2xDb3VudCkubWFwIHsgY29sIC0+XG4gICAgICAgICAgICBjb2xJbmRpY2VzKGZhY2V0VGlsZXMsIGNvbCkuc3VtT2YgeyBpbmQgLT5cbiAgICAgICAgICAgICAgICBsYXlvdXRJbmZvc1tpbmRdLmdlb21PdXRlckhlaWdodCgpXG4gICAgICAgICAgICB9XG4gICAgICAgIH0ubWF4T3JOdWxsKCkgPzogMC4wXG5cbiAgICAgICAgdmFsIHcgPSBhZGRlZFZBeGlzV2lkdGggKyBtYXhSb3dXaWR0aEdlb21Pbmx5ICsgYWRkZWRIU2l6ZVxuICAgICAgICB2YWwgaCA9IGFkZGVkSEF4aXNIZWlnaHQgKyBtYXhDb2xIZWlnaHRHZW9tT25seSArIGFkZGVkVlNpemVcbiAgICAgICAgcmV0dXJuIERvdWJsZVZlY3Rvcih3LCBoKVxuICAgIH1cblxuICAgIHByaXZhdGUgZnVuIG1heFZBeGlzVGhpY2tuZXNzKFxuICAgICAgICBsYXlvdXRJbmZvczogTGlzdDxUaWxlTGF5b3V0SW5mbz4sXG4gICAgICAgIGZhY2V0VGlsZXM6IExpc3Q8UGxvdEZhY2V0cy5GYWNldFRpbGVJbmZvPixcbiAgICAgICAgY29sOiBJbnRcbiAgICApOiBEb3VibGUge1xuICAgICAgICB2YWwgbWF4VGhpY2tuZXNzID0gY29sSW5kaWNlcyhmYWNldFRpbGVzLCBjb2wpLm1heE9mT3JOdWxsIHsgaW5kIC0+XG4gICAgICAgICAgICBsYXlvdXRJbmZvc1tpbmRdLmxldCB7XG4gICAgICAgICAgICAgICAgaWYgKGl0LnZBeGlzU2hvd24pIHtcbiAgICAgICAgICAgICAgICAgICAgaXQuYXhpc1RoaWNrbmVzc1koKVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIDAuMFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWF4VGhpY2tuZXNzID86IDAuMFxuICAgIH1cblxuICAgIHByaXZhdGUgZnVuIG1heEhBeGlzVGhpY2tuZXNzKFxuICAgICAgICBsYXlvdXRJbmZvczogTGlzdDxUaWxlTGF5b3V0SW5mbz4sXG4gICAgICAgIGZhY2V0VGlsZXM6IExpc3Q8UGxvdEZhY2V0cy5GYWNldFRpbGVJbmZvPixcbiAgICAgICAgcm93OiBJbnQsXG4gICAgICAgIG51bVJvd3M6IEludFxuICAgICk6IERvdWJsZSB7XG4gICAgICAgIHZhbCBtYXhUaGlja25lc3MgPSByb3dJbmRpY2VzKGZhY2V0VGlsZXMsIHJvdykubWF4T2ZPck51bGwgeyBpbmQgLT5cbiAgICAgICAgICAgIGlmIChmYWNldFRpbGVzW2luZF0uaXNCb3R0b20gJiYgcm93IDwgbnVtUm93cyAtIDEpIHtcbiAgICAgICAgICAgICAgICAvLyBleGNsdWRlIGJvdHRvbSB0aWxlIGluIGluZmluaXNoZWQgY29sdW1uIChpLmUuIHJpZ2h0bW9zdCBjb2x1bW4pLlxuICAgICAgICAgICAgICAgIDAuMFxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBsYXlvdXRJbmZvc1tpbmRdLmxldCB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChpdC5oQXhpc1Nob3duKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpdC5heGlzVGhpY2tuZXNzWCgpXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAwLjBcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBtYXhUaGlja25lc3MgPzogMC4wXG4gICAgfVxuXG4gICAgcHJpdmF0ZSBmdW4gY29sSW5kaWNlcyhmYWNldFRpbGVzOiBMaXN0PFBsb3RGYWNldHMuRmFjZXRUaWxlSW5mbz4sIGNvbDogSW50KTogTGlzdDxJbnQ+IHtcbiAgICAgICAgcmV0dXJuIGZhY2V0VGlsZXMud2l0aEluZGV4KClcbiAgICAgICAgICAgIC5maWx0ZXIgeyAoXywgdGlsZSkgLT5cbiAgICAgICAgICAgICAgICB0aWxlLmNvbCA9PSBjb2xcbiAgICAgICAgICAgIH0ubWFwIHsgKGluZGV4LCBfKSAtPlxuICAgICAgICAgICAgICAgIGluZGV4XG4gICAgICAgICAgICB9XG4gICAgfVxuXG4gICAgcHJpdmF0ZSBmdW4gcm93SW5kaWNlcyhmYWNldFRpbGVzOiBMaXN0PFBsb3RGYWNldHMuRmFjZXRUaWxlSW5mbz4sIHJvdzogSW50KTogTGlzdDxJbnQ+IHtcbiAgICAgICAgcmV0dXJuIGZhY2V0VGlsZXMud2l0aEluZGV4KClcbiAgICAgICAgICAgIC5maWx0ZXIgeyAoXywgdGlsZSkgLT5cbiAgICAgICAgICAgICAgICB0aWxlLnJvdyA9PSByb3dcbiAgICAgICAgICAgIH0ubWFwIHsgKGluZGV4LCBfKSAtPlxuICAgICAgICAgICAgICAgIGluZGV4XG4gICAgICAgICAgICB9XG4gICAgfVxuXG4gICAgZnVuIGdlb21PZmZzZXRzQnlDb2woXG4gICAgICAgIGxheW91dEluZm9zOiBMaXN0PFRpbGVMYXlvdXRJbmZvPixcbiAgICAgICAgZmFjZXRUaWxlczogTGlzdDxQbG90RmFjZXRzLkZhY2V0VGlsZUluZm8+LFxuICAgICAgICBjb2xTcGFjZTogRG91YmxlLFxuICAgICAgICBudW1Db2xzOiBJbnRcbiAgICApOiBMaXN0PERvdWJsZT4ge1xuICAgICAgICB2YWwgYXhpc1dpZHRocyA9IExpc3Q8RG91YmxlPihudW1Db2xzKSB7IGNvbCAtPlxuICAgICAgICAgICAgbWF4VkF4aXNUaGlja25lc3MobGF5b3V0SW5mb3MsIGZhY2V0VGlsZXMsIGNvbClcbiAgICAgICAgfVxuICAgICAgICB2YWwgc3BhY2VzQmVmb3JlID0gTGl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AgIHZhbCBsdCA9IERvdWJsZVZlY3RvcihcbiAgICAgICAgICAgIG91dGVyLnggKiBsZWZ0LFxuICAgICAgICAgICAgb3V0ZXIueSAqIHRvcFxuICAgICAgICApXG4gICAgICAgIHZhbCByYiA9IERvdWJsZVZlY3RvcihcbiAgICAgICAgICAgIG91dGVyLnggKiByaWdodCxcbiAgICAgICAgICAgIG91dGVyLnkgKiBib3R0b21cbiAgICAgICAgKVxuICAgICAgICByZXR1cm4gb3V0ZXIuc3VidHJhY3QobHQpLnN1YnRyYWN0KHJiKVxuICAgIH1cblxuICAgIGZ1biB0b0lubmVyQm91bmRzKG91dGVyOiBEb3VibGVSZWN0YW5nbGUpOiBEb3VibGVSZWN0YW5nbGUge1xuICAgICAgICB2YWwgbHQgPSBEb3VibGVWZWN0b3IoXG4gICAgICAgICAgICBvdXRlci53aWR0aCAqIGxlZnQsXG4gICAgICAgICAgICBvdXRlci5oZWlnaHQgKiB0b3BcbiAgICAgICAgKVxuICAgICAgICByZXR1cm4gRG91YmxlUmVjdGFuZ2xlKFxuICAgICAgICAgICAgb3V0ZXIub3JpZ2luLmFkZChsdCksXG4gICAgICAgICAgICB0b0lubmVyU2l6ZShvdXRlci5kaW1lbnNpb24pXG4gICAgICAgIClcbiAgICB9XG5cbiAgICBmdW4gdG9PdXRlclNpemUoaW5uZXI6IERvdWJsZVZlY3Rvcik6IERvdWJsZVZlY3RvciB7XG4gICAgICAgIHZhbCBvdXRlcldpZHRoID0gaW5uZXIueCAvICgxIC0gKGxlZnQgKyByaWdodCkpXG4gICAgICAgIHZhbCBvdXRlckhlaWdodCA9IGlubmVyLnkgLyAoMSAtICh0b3AgKyBib3R0b20pKVxuICAgICAgICByZXR1cm4gRG91YmxlVmVjdG9yKG91dGVyV2lkdGgsIG91dGVySGVpZ2h0KVxuICAgIH1cblxuICAgIGZ1biB0b091dGVyQm91bmRzKGlubmVyOiBEb3VibGVSZWN0YW5nbGUpOiBEb3VibGVSZWN0YW5nbGUge1xuICAgICAgICB2YWwgb3V0ZXJTaXplID0gdG9PdXRlclNpemUoaW5uZXIuZGltZW5zaW9uKVxuICAgICAgICB2YWwgbHQgPSBEb3VibGVWZWN0b3IoXG4gICAgICAgICAgICBvdXRlclNpemUueCAqIGxlZnQsXG4gICAgICAgICAgICBvdXRlclNpemUueSAqIHRvcFxuICAgICAgICApXG5cbiAgICAgICAgcmV0dXJuIERvdWJsZVJlY3RhbmdsZShcbiAgICAgICAgICAgIGlubmVyLm9yaWdpbi5zdWJ0cmFjdChsdCksXG4gICAgICAgICAgICBvdXRlclNpemVcbiAgICAgICAgKVxuICAgIH1cblxuXG4gICAgZnVuIHRvQXhpc09yaWdpbihnZW9tSW5uZXJCb3VuZHM6IERvdWJsZVJlY3RhbmdsZSwgYXhpc09yaWVudGF0aW9uOiBPcmllbnRhdGlvbik6IERvdWJsZVZlY3RvciB7XG4gICAgICAgIHZhbCBvdXRlckJvdW5kcyA9IHRvT3V0ZXJCb3VuZHMoZ2VvbUlubmVyQm91bmRzKVxuICAgICAgICByZXR1cm4gd2hlbiAoYXhpc09yaWVudGF0aW9uKSB7XG4gICAgICAgICAgICBPcmllbnRhdGlvbi5MRUZUIC0+IERvdWJsZVZlY3RvcihvdXRlckJvdW5kcy5sZWZ0LCBnZW9tSW5uZXJCb3VuZHMudG9wKVxuICAgICAgICAgICAgT3JpZW50YXRpb24uVE9QIC0+IGdlb21Jbm5lckJvdW5kcy5vcmlnaW5cbiAgICAgICAgICAgIE9yaWVudGF0aW9uLlJJR0hUIC0+IERvdWJsZVZlY3RvcihnZW9tSW5uZXJCb3VuZHMucmlnaHQsIGdlb21Jbm5lckJvdW5kcy50b3ApXG4gICAgICAgICAgICBPcmllbnRhdGlvbi5CT1RUT00gLT4gRG91YmxlVmVjdG9yKGdlb21Jbm5lckJvdW5kcy5sZWZ0LCBvdXRlckJvdW5kcy5ib3R0b20pXG4gICAgICAgIH1cbiAgICB9XG5cblxuICAgIGNvbXBhbmlvbiBvYmplY3Qge1xuIC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JuIERvdWJsZVJlY3RhbmdsZShcbiAgICAgICAgICAgIHIub3JpZ2luLngsXG4gICAgICAgICAgICByLm9yaWdpbi55LFxuICAgICAgICAgICAgd2lkdGgsXG4gICAgICAgICAgICByLmRpbWVuc2lvbi55XG4gICAgICAgIClcbiAgICB9XG5cbiAgICBmdW4gY2hhbmdlV2lkdGhLZWVwUmlnaHQocjogRG91YmxlUmVjdGFuZ2xlLCB3aWR0aDogRG91YmxlKTogRG91YmxlUmVjdGFuZ2xlIHtcbiAgICAgICAgcmV0dXJuIERvdWJsZVJlY3RhbmdsZShcbiAgICAgICAgICAgIHIucmlnaHQgLSB3aWR0aCxcbiAgICAgICAgICAgIHIub3JpZ2luLnksXG4gICAgICAgICAgICB3aWR0aCxcbiAgICAgICAgICAgIHIuZGltZW5zaW9uLnlcbiAgICAgICAgKVxuICAgIH1cblxuICAgIGZ1biBjaGFuZ2VIZWlnaHQocjogRG91YmxlUmVjdGFuZ2xlLCBoZWlnaHQ6IERvdWJsZSk6IERvdWJsZVJlY3RhbmdsZSB7XG4gICAgICAgIHJldHVybiBEb3VibGVSZWN0YW5nbGUoXG4gICAgICAgICAgICByLm9yaWdpbi54LFxuICAgICAgICAgICAgci5vcmlnaW4ueSxcbiAgICAgICAgICAgIHIuZGltZW5zaW9uLngsXG4gICAgICAgICAgICBoZWlnaHRcbiAgICAgICAgKVxuICAgIH1cblxuICAgIGZ1biBjaGFuZ2VIZWlnaHRLZWVwQm90dG9tKHI6IERvdWJsZVJlY3RhbmdsZSwgaGVpZ2h0OiBEb3VibGUpOiBEb3VibGVSZWN0YW5nbGUge1xuICAgICAgICByZXR1cm4gRG91YmxlUmVjdGFuZ2xlKFxuICAgICAgICAgICAgci5vcmlnaW4ueCxcbiAgICAgICAgICAgIHIuYm90dG9tIC0gaGVpZ2h0LFxuICAgICAgICAgICAgci5kaW1lbnNpb24ueCxcbiAgICAgICAgICAgIGhlaWdodFxuICAgICAgICApXG4gICAgfVxufVxuIiwiLypcbiAqI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AgICAgIGZvciAoaW5mbyBpbiBib3hJbmZvcykge1xuICAgICAgICAgICAgcmVzdWx0LmFkZChcbiAgICAgICAgICAgICAgICBMZWdlbmRCb3hlc0xheW91dC5Cb3hXaXRoTG9jYXRpb24oXG4gICAgICAgICAgICAgICAgICAgIGluZm8sXG4gICAgICAgICAgICAgICAgICAgIERvdWJsZVZlY3RvcigwLjAsIHkpXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgeSArPSBpbmZvLnNpemUueVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiByZXN1bHRcbiAgICB9XG5cbiAgICBwcml2YXRlIGZ1biBob3Jpem9udGFsU3RhY2soYm94SW5mb3M6IExpc3Q8TGVnZW5kQm94SW5mbz4pOiBMaXN0PExlZ2VuZEJveGVzTGF5b3V0LkJveFdpdGhMb2NhdGlvbj4ge1xuICAgICAgICB2YWwgcmVzdWx0ID0gQXJyYXlMaXN0PExlZ2VuZEJveGVzTGF5b3V0LkJveFdpdGhMb2NhdGlvbj4oKVxuICAgICAgICB2YXIgeCA9IDAuMFxuICAgICAgICBmb3IgKGluZm8gaW4gYm94SW5mb3MpIHtcbiAgICAgICAgICAgIHJlc3VsdC5hZGQoXG4gICAgICAgICAgICAgICAgTGVnZW5kQm94ZXNMYXlvdXQuQm94V2l0aExvY2F0aW9uKFxuICAgICAgICAgICAgICAgICAgICBpbmZvLFxuICAgICAgICAgICAgICAgICAgICBEb3VibGVWZWN0b3IoeCwgMC4wKVxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIHggKz0gaW5mby5zaXplLnhcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gcmVzdWx0XG4gICAgfVxuXG4gICAgZnVuIG92ZXJsYXlMZWdlbmRPcmlnaW4oXG4gICAgICAgIHBsb3RCb3VuZHM6IERvdWJsZVJlY3RhbmdsZSxcbiAgICAgICAgbGVnZW5kU2l6ZTogRG91YmxlVmVjdG9y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mV0dXJuIERvdWJsZVJlY3RhbmdsZShcbiAgICAgICAgICAgIGNvbnRhaW5lci5vcmlnaW4uYWRkKExJVkVfTUFQX1BMT1RfUEFERElORyksXG4gICAgICAgICAgICBjb250YWluZXIuZGltZW5zaW9uLnN1YnRyYWN0KExJVkVfTUFQX1BMT1RfTUFSR0lOKVxuICAgICAgICApXG4gICAgfVxuXG4gICAgZnVuIHN1YnRyYWN0VGl0bGVzQW5kTGVnZW5kcyhcbiAgICAgICAgYmFzZVNpemU6IERvdWJsZVZlY3RvcixcbiAgICAgICAgdGl0bGU6IFN0cmluZz8sXG4gICAgICAgIHN1YnRpdGxlOiBTdHJpbmc/LFxuICAgICAgICBjYXB0aW9uOiBTdHJpbmc/LFxuICAgICAgICBheGlzVGl0bGVMZWZ0OiBTdHJpbmc/LFxuICAgICAgICBheGlzVGl0bGVCb3R0b206IFN0cmluZz8sXG4gICAgICAgIGF4aXNFbmFibGVkOiBCb29sZWFuLFxuICAgICAgICBsZWdlbmRzQmxvY2tJbmZvOiBMZWdlbmRzQmxvY2tJbmZvLFxuICAgICAgICB0aGVtZTogVGhlbWUsXG4gICAgICAgIGZsaXBwZWRBeGlzOiBCb29sZWFuXG4gICAgKTogRG91YmxlVmVjdG9yIHtcbiAgICAgICAgdmFsIGRlbHRhID0gdGl0bGVzQW5kTGVnZW5kc1NpemVEZWx0YShcbiAgICAgICAgICAgIHRpdGxlLFxuICAgICAgICAgICAgc3VidGl0bGUsXG4gICAgICAgICAgICBjYXB0aW9uLFxuICAgICAgICAgICAgYXhpc1RpdGxlTGVmdCxcbiAgICAgICAgICAgIGF4aXNUaXRsZUJvdHRvbSxcbiAgICAgICAgICAgIGF4aXNFbmFibGVkLFxuICAgICAgICAgICAgbGVnZW5kc0Jsb2NrSW5mbyxcbiAgICAgICAgICAgIHRoZW1lLFxuICAgICAgICAgICAgZmxpcHBlZEF4aXNcbiAgICAgICAgKVxuICAgICAgICB2YWwgcmVkdWNlZCA9IGJhc2VTaXplLnN1YnRyYWN0KGRlbHRhKVxuICAgICAgICByZXR1cm4gRG91YmxlVmVjdG9yKFxuICAgICAgICAgICAgbWF4KHJlZHVjZWQueCwgVGlsZUxheW91dFV0aWwuR0VPTV9NSU5fU0laRS54KSxcbiAgICAgICAgICAgIG1heChyZWR1Y2VkLnksIFRpbGVMYXlvdXRVdGlsLkdFT01fTUlOX1NJWkUueSlcbiAgICAgICAgKVxuICAgIH1cblxuICAgIGZ1biBhZGRUaXRsZXNBbmRMZWdlbmRzKFxuICAgICAgICBiYXNlOiBEb3VibGVWZWN0b3IsXG4gICAgICAgIHRpdGxlOiBTdHJpbmc/LFxuICAgICAgICBzdWJ0aXRsZTogU3RyaW5nPyxcbiAgICAgICAgY2FwdGlvbjogU3RyaW5nPyxcbiAgICAgICAgYXhpc1RpdGxlTGVmdDogU3RyaW5nPyxcbiAgICAgICAgYXhpc1RpdGxlQm90dG9tOiBTdHJpbmc/LFxuICAgICAgICBheGlzRW5hYmxlZDogQm9vbGVhbixcbiAgICAgICAgbGVnZW5kc0Jsb2NrSW5mbzogTGVnZW5kc0Jsb2NrSW5mbyxcbiAgICAgICAgdGhlbWU6IFRoZW1lLFxuICAgICAgICBmbGlwcGVkQXhpczogQm9vbGVhblxuICAgICk6IERvdWJsZVZlY3RvciB7XG4gICAgICAgIHZhbCBkZWx0YSA9IHRpdGxlc0FuZExlZ2VuZHNTaXplRGVsdGEoXG4gICAgICAgICAgICB0aXRsZSxcbiAgICAgICAgICAgIHN1YnRpdGxlLFxuICAgICAgICAgICAgY2FwdGlvbixcbiAgICAgICAgICAgIGF4aXNUaXRsZUxlZnQsXG4gICAgICAgICAgICBheGlzVGl0bGVCb3R0b20sXG4gICAgICAgICAgICBheGlzRW5hYmxlZCxcbiAgICAgICAgICAgIGxlZ2VuZHNCbG9ja0luZm8sXG4gICAgICAgICAgICB0aGVtZSxcbiAgICAgICAgICAgIGZsaXBwZWRBeGlzXG4gICAgICAgIClcbiAgICAgICAgcmV0dXJuIGJhc2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9uIG9iamVjdCB7XG4gICAgICAgIGVudW0gY2xhc3MgVGV4dFJvdGF0aW9uKHZhbCBhbmdsZTogRG91YmxlKSB7XG4gICAgICAgICAgICBDTE9DS1dJU0UoOTAuMCksXG4gICAgICAgICAgICBBTlRJQ0xPQ0tXSVNFKC05MC4wKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBhcHBseUp1c3RpZmljYXRpb24oXG4gICAgICAgICAgICBib3VuZFJlY3Q6IERvdWJsZVJlY3RhbmdsZSxcbiAgICAgICAgICAgIHRleHRTaXplOiBEb3VibGVWZWN0b3IsXG4gICAgICAgICAgICBsaW5lSGVpZ2h0OiBEb3VibGUsXG4gICAgICAgICAgICBqdXN0aWZpY2F0aW9uOiBUZXh0SnVzdGlmaWNhdGlvbixcbiAgICAgICAgICAgIHJvdGF0aW9uOiBUZXh0Um90YXRpb24/ID0gbnVsbFxuICAgICAgICApOiBQYWlyPERvdWJsZVZlY3RvciwgVGV4dC5Ib3Jpem9udGFsQW5jaG9yPiB7XG4gICAgICAgICAgICB2YWwgcmVjdCA9IGlmIChyb3RhdGlvbiAhPSBudWxsKSBib3VuZFJlY3QuZmxpcCgpIGVsc2UgYm91bmRSZWN0XG5cbiAgICAgICAgICAgIHZhbCAoeCwgaEFuY2hvcikgPSB4UG9zaXRpb24ocmVjdCwganVzdGlmaWNhdGlvbi54KVxuICAgICAgICAgICAgdmFsIHkgPSB5UG9zaXRpb24ocmVjdCwgdGV4dFNpemUsIGxpbmVIZWlnaHQsIGp1c3RpZmljYXRpb24ueSlcblxuICAgICAgICAgICAgdmFsIHBvc2l0aW9uID0gd2hlbiAocm90YXRpb24pIHtcbiAgICAgICAgICAgICAgICBudWxsIC0+IERvdWJsZVZlY3Rvcih4LCB5KVxuICAgICAgICAgICAgICAgIFRleHRSb3RhdGlvbi5DTE9DS1dJU0UgLT4gRG91YmxlVmVjdG9yKHJlY3QudG9wICsgcmVjdC5ib3R0b20gLSB5LCB4KVxuICAgICAgICAgICAgICAgIFRleHRSb3RhdGlvbi5BTlRJQ0xPQ0tXSVNFIC0+IERvdWJsZVZlY3Rvcih5LCByZWN0LmxlZnQgKyByZWN0LnJpZ2h0IC0geClcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBwb3NpdGlvbiB0byBoQW5jaG9yXG4gICAgICAgIH1cblxuICAgICAgICBwcml2YXRlIGZ1biB4UG9zaXRpb24oXG4gICAgICAgICAgICBib3VuZFJlY3Q6IERvdWJsZVJlY3RhbmdsZSxcbiAgICAgICAgICAgIGhqdXN0OiBEb3VibGUsXG4gICAgICAgICk6IFBhaXI8RG91YmxlLCBUZXh0Lkhvcml6b250YWxBbmNob3I+IHtcbiAgICAgICAgICAgIC8vIHRvZG86XG4gICAgICAgICAgICAvLyAgdmFsIHRleHRXaWR0aCA9IHRleHRTaXplLnhcbiAgICAgICAgICAgIC8vICB2YWwgYW5jaG9yID0gVGV4dC5Ib3Jpem9udGFsQW5jaG9yLkxFRlRcbiAgICAgICAgICAgIHZhbCB0ZXh0V2lkdGggPSAwLjBcbiAgICAgICAgICAgIHZhbCBhbmNob3IgPSB3aGVuIHtcbiAgICAgICAgICAgICAgICBoanVzdCA8IDAuNSAtPiBUZXh0Lkhvcml6b250YWxBbmNob3IuTEVGVFxuICAgICAgICAgICAgICAgIGhqdXN0ID09IDAuNSAtPiBUZXh0Lkhvcml6b250YWxBbmNob3IuTUlERExFXG4gICAgICAgICAgICAgICAgZWxzZSAtPiBUZXh0Lkhvcml6b250YWxBbmNob3IuUklHSFRcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhbCB4ID0gYm91bmRSZWN0LmxlZnQgKyAoYm91bmRSZWN0LndpZHRoIC0gdGV4dFdpZHRoKSAqIGhqdXN0XG4gICAgICAgICAgICByZXR1cm4geCB0byBhbmNob3JcbiAgICAgICAgfVxuXG4gICAgICAgIHByaXZhdGUgZnVuIHlQb3NpdGlvbihcbiAgICAgICAgICAgIGJvdW5kUmVjdDogRG91Y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B2QXhpc0luZm8gIT0gbnVsbCAmJiB2QXhpc1Nob3duXG5cbiAgICBmdW4gd2l0aE9mZnNldChvZmZzZXQ6IERvdWJsZVZlY3Rvcik6IFRpbGVMYXlvdXRJbmZvIHtcbiAgICAgICAgcmV0dXJuIFRpbGVMYXlvdXRJbmZvKFxuICAgICAgICAgICAgb2Zmc2V0ID0gb2Zmc2V0LFxuICAgICAgICAgICAgdGhpcy5ib3VuZHMsXG4gICAgICAgICAgICB0aGlzLmdlb21PdXRlckJvdW5kcyxcbiAgICAgICAgICAgIHRoaXMuZ2VvbUlubmVyQm91bmRzLFxuICAgICAgICAgICAgdGhpcy5oQXhpc0luZm8sIHRoaXMudkF4aXNJbmZvLFxuICAgICAgICAgICAgdGhpcy5oQXhpc1Nob3duLCB0aGlzLnZBeGlzU2hvd24sXG4gICAgICAgICAgICB0aGlzLmZhY2V0WExhYmVscywgdGhpcy5mYWNldFlMYWJlbCxcbiAgICAgICAgICAgIHRoaXMudHJ1ZUluZGV4XG4gICAgICAgIClcbiAgICB9XG5cbiAgICBmdW4gd2l0aEZhY2V0TGFiZWxzKHhMYWJlbHM6IExpc3Q8U3RyaW5nPiwgeUxhYmVsOiBTdHJpbmc/KTogVGlsZUxheW91dEluZm8ge1xuICAgICAgICByZXR1cm4gVGlsZUxheW91dEluZm8oXG4gICAgICAgICAgICB0aGlzLm9mZnNldCxcbiAgICAgICAgICAgIHRoaXMuYm91bmRzLFxuICAgICAgICAgICAgdGhpcy5nZW9tT3V0ZXJCb3VuZHMsXG4gICAgICAgICAgICB0aGlzLmdlb21Jbm5lckJvdW5kcyxcbiAgICAgICAgICAgIHRoaXMuaEF4aXNJbmZvLCB0aGlzLnZBeGlzSW5mbyxcbiAgICAgICAgICAgIHRoaXMuaEF4aXNTaG93biwgdGhpcy52QXhpc1Nob3duLFxuICAgICAgICAgICAgeExhYmVscywgeUxhYmVsLFxuICAgICAgICAgICAgdGhpcy50cnVlSW5kZXhcbiAgICAgICAgKVxuICAgIH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SwgYXhpc0xlbmd0aClcbiAgICB9XG5cbiAgICBjb21wYW5pb24gb2JqZWN0IHtcbiAgICAgICAgZnVuIGNyZWF0ZShcbiAgICAgICAgICAgIG9yaWVudGF0aW9uOiBPcmllbnRhdGlvbixcbiAgICAgICAgICAgIGF4aXNEb21haW46IERvdWJsZVNwYW4sIGJyZWFrc1Byb3ZpZGVyOiBBeGlzQnJlYWtzUHJvdmlkZXIsIHRoZW1lOiBBeGlzVGhlbWVcbiAgICAgICAgKTogQXhpc0xheW91dGVyIHtcblxuICAgICAgICAgICAgaWYgKG9yaWVudGF0aW9uLmlzSG9yaXpvbnRhbCkge1xuICAgICAgICAgICAgICAgIHZhbCBsYWJlbHNMYXlvdXQ6IEF4aXNMYWJlbHNMYXlvdXQgPSBpZiAoYnJlYWtzUHJvdmlkZXIuaXNGaXhlZEJyZWFrcykge1xuICAgICAgICAgICAgICAgICAgICBBeGlzTGFiZWxzTGF5b3V0Lmhvcml6b250YWxGaXhlZEJyZWFrcyhcbiAgICAgICAgICAgICAgICAgICAgICAgIG9yaWVudGF0aW9uLFxuICAgICAgICAgICAgICAgICAgICAgICAgYXhpc0RvbWFpbixcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrc1Byb3ZpZGVyLmZpeGVkQnJlYWtzLFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhlbWVcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIEF4aXNMYWJlbHNMYXlvdXQuaG9yaXpvbnRhbEZsZXhCcmVha3Mob3JpZW50YXRpb24sIGF4aXNEb21haW4sIGJyZWFrc1Byb3ZpZGVyLCB0aGVtZSlcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIEhvcml6b250YWxBeGlzTGF5b3V0ZXIoXG4gICAgICAgICAgICAgICAgICAgIG9yaWVudGF0aW9uLFxuICAgICAgICAgICAgICAgICAgICBheGlzRG9tYWluLFxuICAgICAgICAgICAgICAgICAgICBsYWJlbHNMYXlvdXRcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIHZlcnRpY2FsXG4gICAgICAgICAgICB2YWwgbGFiZWxzTGF5b3V0OiBBeGlzTGFiZWxzTGF5b3V0ID0gaWYgKGJyZWFrc1Byb3ZpZGVyLmlzRml4ZWRCcmVha3MpIHtcbiAgICAgICAgICAgICAgICBBeGlzTGFiZWxzTGF5b3V0LnZlcnRpY2FsRml4ZWRCcmVha3Mob3JpZW50YXRpb24sIGF4aXNEb21haW4sIGJyZWFrc1Byb3ZpZGVyLmZpeGVkQnJlYWtzLCB0aGVtZSlcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgQXhpc0xhYmVsc0xheW91dC52ZXJ0aWNhbEZsZXhCcmVha3Mob3JpZW50YXRpb24sIGF4aXNEb21haW4sIGJyZWFrc1Byb3ZpZGVyLCB0aGVtZSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBWZXJ0aWNhbEF4aXNMYXlvdXRlcihcbiAgICAgICAgICAgICAgICBvcmllbnRhdGlvbixcbiAgICAgICAgICAgICAgICBheGlzRG9tYWluLFxuICAgICAgICAgICAgICAgIGxhYmVsc0xheW91dFxuICAgICAgICAgICAgKVxuICAgICAgICB9XG4gICAgfVxufVxuIiwiLypcbiAqIENvcHlyaWdodCAoYykgMjAyMC4gSmV0QnJhaW5zIHMuci5vLlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgdGhlIE1JVCBsaWNlbnNlIHRoYXQgY2FuIGJlIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUuXG4gKi9cblxucGFja2FnZSBqZXRicmFpbnMuZGF0YWxvcmUucGxvdC5idWlsZGVyLmxheW91dC5heGlzXG5cbmltcG9ydCBqZXRicmFpbnMuZGF0YWxvcmUucGxvd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lwaWNhbCB0aWNrIGxhYmVsIHRvIGVzdGltYXRlIG51bWJlciBvZiBicmVha3MgKGNob3NlbiBieSBleWUpXG4gICAgICAgIGNvbnN0IHZhbCBNSU5fVElDS19MQUJFTF9ESVNUQU5DRSA9IDIwLjAgIC8vIHB4XG5cbiAgICAgICAgcHJpdmF0ZSBmdW4gdGlja0xhYmVsU3BlYyh0aGVtZTogQXhpc1RoZW1lKSA9IFBsb3RMYWJlbFNwZWNGYWN0b3J5LmF4aXNUaWNrKHRoZW1lKVxuXG4gICAgICAgIGZ1biBob3Jpem9udGFsRmxleEJyZWFrcyhcbiAgICAgICAgICAgIG9yaWVudGF0aW9uOiBPcmllbnRhdGlvbixcbiAgICAgICAgICAgIGF4aXNEb21haW46IERvdWJsZVNwYW4sIGJyZWFrc1Byb3ZpZGVyOiBBeGlzQnJlYWtzUHJvdmlkZXIsIHRoZW1lOiBBeGlzVGhlbWVcbiAgICAgICAgKTogQXhpc0xhYmVsc0xheW91dCB7XG5cbiAgICAgICAgICAgIHJlcXVpcmUob3JpZW50YXRpb24uaXNIb3Jpem9udGFsKSB7IG9yaWVudGF0aW9uLnRvU3RyaW5nKCkgfVxuICAgICAgICAgICAgcmVxdWlyZSghYnJlYWtzUHJvdmlkZXIuaXNGaXhlZEJyZWFrcykgeyBcImZpeGVkIGJyZWFrc1wiIH1cbiAgICAgICAgICAgIHJldHVybiBIb3Jpem9udGFsRmxleEJyZWFrc0xhYmVsc0xheW91dChcbiAgICAgICAgICAgICAgICBvcmllbnRhdGlvbixcbiAgICAgICAgICAgICAgICBheGlzRG9tYWluLFxuICAgICAgICAgICAgICAgIHRpY2tMYWJlbFNwZWModGhlbWUpLFxuICAgICAgICAgICAgICAgIGJyZWFrc1Byb3ZpZGVyLFxuICAgICAgICAgICAgICAgIHRoZW1lXG4gICAgICAgICAgICApXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gaG9yaXpvbnRhbEZpeGVkQnJlYWtzKFxuICAgICAgICAgICAgb3JpZW50YXRpb246IE9yaWVudGF0aW9uLFxuICAgICAgICAgICAgYXhpc0RvbWFpbjogRG91YmxlU3BhbiwgYnJlYWtzOiBTY2FsZUJyZWFrcywgdGhlbWU6IEF4aXNUaGVtZVxuICAgICAgICApOiBBeGlzTGFiZWxzTGF5b3V0IHtcblxuICAgICAgICAgICAgcmVxdWlyZShvcmllbnRhdGlvbi5pc0hvcml6b250YWwpIHsgb3JpZW50YXRpb24udG9TdHJpbmcoKSB9XG4gICAgICAgICAgICByZXR1cm4gSG9yaXpvbnRhbEZpeGVkQnJlYWtzTGFiZWxzTGF5b3V0KFxuICAgICAgICAgICAgICAgIG9yaWVudGF0aW9uLFxuICAgICAgICAgICAgICAgIGF4aXNEb21haW4sXG4gICAgICAgICAgICAgICAgdGlja0xhYmVsU3BlYyh0aGVtZSksXG4gICAgICAgICAgICAgICAgYnJlYWtzLFxuICAgICAgICAgICAgICAgIHRoZW1lXG4gICAgICAgICAgICApXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gdmVydGljYWxGbGV4QnJlYWtzKFxuICAgICAgICAgICAgb3JpZW50YXRpb246IE9yaWVudGF0aW9uLFxuICAgICAgICAgICAgYXhpc0RvbWFpbjogRG91YmxlU3BhbiwgYnJlYWtzUHJvdmlkZXI6IEF4aXNCcmVha3NQcm92aWRlciwgdGhlbWU6IEF4aXNUaGVtZVxuICAgICAgICApOiBBeGlzTGFiZWxzTGF5b3V0IHtcblxuICAgICAgICAgICAgcmVxdWlyZSghb3JpZW50YXRpb24uaXNIb3Jpem9udGFsKSB7IG9yaWVudGF0aW9uLnRvU3RyaW5nKCkgfVxuICAgICAgICAgICAgcmVxdWlyZSghYnJlYWtzUHJvdmlkZXIuaXNGaXhlZEJyZWFrcykgeyBcImZpeGVkIGJyZWFrc1wiIH1cbiAgICAgICAgICAgIHJldHVybiBWZXJ0aWNhbEZsZXhCcmVha3NMYWJlbHNMYXlvdXQoXG4gICAgICAgICAgICAgICAgb3JpZW50YXRpb24sXG4gICAgICAgICAgICAgICAgYXhpc0RvbWFpbixcbiAgICAgICAgICAgICAgICB0aWNrTGFiZWxTcGVjKHRoZW1lKSxcbiAgICAgICAgICAgICAgICBicmVha3NQcm92aWRlcixcbiAgICAgICAgICAgICAgICB0aGVtZVxuICAgICAgICAgICAgKVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIHZlcnRpY2FsRml4ZWRCcmVha3MoXG4gICAgICAgICAgICBvcmllbnRhdGlvbjogT3JpZW50YXRpb24sXG4gICAgICAgICAgICBheGlzRG9tYWluOiBEb3VibGVTcGFuLFxuICAgICAgICAgICAgYnJlYWtzOiBTY2FsZUJyZWFrcyxcbiAgICAgICAgICAgIHRoZW1lOiBBeGlzVGhlbWVcbiAgICAgICAgKTogQXhpc0xhYmVsc0xheW91dCB7XG4gICAgICAgICAgICByZXF1aXJlKCFvcmllbnRhdGlvbi5pc0hvcml6b250YWwpIHsgb3JpZW50YXRpb24udG9TdHJpbmcoKSB9XG4gICAgICAgICAgICByZXR1cm4gVmVydGljYWxGaXhlZEJyZWFrc0xhYmVsc0xheW91dChcbiAgICAgICAgICAgICAgICBvcmllbnRhdGlvbixcbiAgICAgICAgICAgICAgICBheGlzRG9tYWluLFxuICAgICAgICAgICAgICAgIHRpY2tMYWJlbFNwZWModGhlbWUpLFxuICAgICAgICAgICAgICAgIGJyZWFrcyxcbiAgICAgICAgICAgICAgICB0aGVtZVxuICAgICAgICAgICAgKVxuICAgICAgICB9XG4gICAgfVxufVxuIiwiLypcbiAqIENvcHlyaWdodCAoYykgMjAyMC4gSmV0QnJhaW5zIHMuci5vLlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgdGhlIE1JVCBsaWNlbnNlIHRoYXQgY2FuIGJlIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUuXG4gKi9cblxucGFja2FnZSBqZXRicmFpbnMuZGF0YWxvcmUucGxvdC5idWlsZGVyLmxheW91dC5heGlzLmxhYmVsXG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5kczogRG91YmxlUmVjdGFuZ2xlKTogQnVpbGRlciB7XG4gICAgICAgICAgICBteUJvdW5kcyA9IGJvdW5kc1xuICAgICAgICAgICAgcmV0dXJuIHRoaXNcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBvdmVybGFwKGI6IEJvb2xlYW4pOiBCdWlsZGVyIHtcbiAgICAgICAgICAgIG15T3ZlcmxhcCA9IGJcbiAgICAgICAgICAgIHJldHVybiB0aGlzXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gbGFiZWxBZGRpdGlvbmFsT2Zmc2V0cyhsOiBMaXN0PERvdWJsZVZlY3Rvcj4/KTogQnVpbGRlciB7XG4gICAgICAgICAgICBteUxhYmVsQWRkaXRpb25hbE9mZnNldHMgPSBsXG4gICAgICAgICAgICByZXR1cm4gdGhpc1xuICAgICAgICB9XG5cbiAgICAgICAgZnVuIGxhYmVsSG9yaXpvbnRhbEFuY2hvcihhbmNob3I6IFRleHQuSG9yaXpvbnRhbEFuY2hvcik6IEJ1aWxkZXIge1xuICAgICAgICAgICAgbXlMYWJlbEhvcml6b250YWxBbmNob3IgPSBhbmNob3JcbiAgICAgICAgICAgIHJldHVybiB0aGlzXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gbGFiZWxWZXJ0aWNhbEFuY2hvcihhbmNob3I6IFRleHQuVmVydGljYWxBbmNob3IpOiBCdWlsZGVyIHtcbiAgICAgICAgICAgIG15TGFiZWxWZXJ0aWNhbEFuY2hvciA9IGFuY2hvclxuICAgICAgICAgICAgcmV0dXJuIHRoaXNcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBsYWJlbFJvdGF0aW9uQW5nbGUoYW5nbGU6IERvdWJsZSk6IEJ1aWxkZXIge1xuICAgICAgICAgICAgbXlMYWJlbFJvdGF0aW9uQW5nbGUgPSBhbmdsZVxuICAgICAgICAgICAgcmV0dXJuIHRoaXNcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBidWlsZCgpOiBBeGlzTGFiZWxz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ICB2YXIgY291bnQgPSBtYXhDb3VudFxuICAgICAgICB3aGlsZSAoYnJlYWtzLnNpemUgPiBtYXhDb3VudCkge1xuICAgICAgICAgICAgdmFsIGRlbHRhID0gbWF4KDEsIChicmVha3Muc2l6ZSAtIG1heENvdW50KSAvIDIpXG4gICAgICAgICAgICBjb3VudCAtPSBkZWx0YVxuICAgICAgICAgICAgaWYgKGNvdW50IDw9IDEpIHtcbiAgICAgICAgICAgICAgICBicmVha3MgPSBicmVha3NQcm92aWRlci5nZXRCcmVha3MoMSwgYXhpc0xlbmd0aClcbiAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWtzID0gYnJlYWtzUHJvdmlkZXIuZ2V0QnJlYWtzKGNvdW50LCBheGlzTGVuZ3RoKVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBicmVha3NcbiAgICB9XG5cbiAgICBmdW4gbG9uZ2VzdExhYmVsV2lkdGgoXG4gICAgICAgIGxhYmVsczogTGlzdDxTdHJpbmc+LFxuICAgICAgICBsYWJlbFRvV2lkdGg6IChTdHJpbmcpIC0+IERvdWJsZSA9IHsgaXQubGVuZ3RoLnRvRG91YmxlKCkgfVxuICAgICk6IERvdWJsZSB7XG4gICAgICAgIHZhbCBsb25nZXN0TGFiZWwgPSBsYWJlbHMubWF4QnlPck51bGwobGFiZWxUb1dpZHRoKVxuICAgICAgICByZXR1cm4gaWYgKGxvbmdlc3RMYWJlbCA9PSBudWxsKVxuICAgICAgICAgICAgMC4wXG4gICAgICAgIGVsc2VcbiAgICAgICAgICAgIGxhYmVsVG9XaWR0aChsb25nZXN0TGFiZWwpXG4gICAgfVxuXG4gICAgZnVuIGhvcml6b250YWxDZW50ZXJlZExhYmVsQm91bmRzKGxhYmVsU2l6ZTogRG91YmxlVmVjdG9yKTogRG91YmxlUmVjdGFuZ2xlIHtcbiAgICAgICAgcmV0dXJuIERvdWJsZVJlY3RhbmdsZSgtbGFiZWxTaXplLnggLyAyLjAsIDAuMCwgbGFiZWxTaXplLngsIGxhYmVsU2l6ZS55KVxuICAgIH1cblxuICAgIGZ1biBkb0xheW91dFZlcnRpY2FsQXhpc0xhYmVscyhcbiAgICAgICAgb3JpZW50YXRpb246IE9yaWVudGF0aW9uLFxuICAgICAgICBicmVha3M6IFNjYWxlQnJlYWtzLFxuICAgICAgICBheGlzRG9tYWluOiBEb3VibGVTcGFuLFxuICAgICAgICBheGlzTWFwcGVyOiAoRG91YmxlPykgLT4gRG91YmxlPyxcbiAgICAgICAgdGhlbWU6IEF4aXNUaGVtZVxuICAgICk6IEF4aXNMYWJlbHNMYXlvdXRJbmZvIHtcblxuICAgICAgICB2YWwgYXhpc0JvdW5kcyA9IHdoZW4ge1xuICAgICAgICAgICAgdGhlbWUuc2hvd0xhYmVscygpIC0+IHtcbiAgICAgICAgICAgICAgICB2YWwgbGFiZWxzQm91bmRzID0gdmVydGljYWxBeGlzTGFiZWxzQm91bmRzKFxuICAgICAgICAgICAgICAgICAgICBicmVha3MsXG4gICAgICAgICAgICAgICAgICAgIGF4aXNEb21haW4sXG4gICAgICAgICAgICAgICAgICAgIGF4aXNNYXBwZXIsXG4gICAgICAgICAgICAgICAgICAgIFBsb3RMYWJlbFNwZWNGYWN0b3J5LmF4aXNUaWNrKHRoZW1lKVxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICBhcHBseUxhYmVsc01hcmdpbnMoXG4gICAgICAgICAgICAgICAgICAgIGxhYmVsc0JvdW5kcyxcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoZW1lLnNob3dUaWNrTWFya3MoKSkgdGhlbWUudGlja01hcmtMZW5ndGgoKSBlbHNlIDAuMCxcbiAgICAgICAgICAgICAgICAgICAgdGhlbWUudGlja0xhYmVsTWFyZ2lucygpLFxuICAgICAgICAgICAgICAgICAgICBvcmllbnRhdGlvblxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoZW1lLnNob3dUaWNrTWFya3MoKSAtPiB7XG4gICAgICAgICAgICAgICAgdmFsIGxhYmVsc0JvdW5kcyA9IERvdWJsZVJlY3RhbmdsZShEb3VibGVWZWN0b3IuWkVSTywgRG91YmxlVmVjdG9yLlpFUk8pXG4gICAgICAgICAgICAgICAgYXBwbHlMYWJlbHNNYXJnaW5zKFxuICAgICAgICAgICAgICAgICAgICBsYWJlbHNCb3VuZHMsXG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGVtZS5zaG93VGlja01hcmtzKCkpIHRoZW1lLnRpY2tNYXJrTGVuZ3RoKCkgZWxzZSAwLjAsXG4gICAgICAgICAgICAgICAgICAgIHRoZW1lLnRpY2tMYWJlbE1hcmdpbnMoKSxcbiAgICAgICAgICAgICAgICAgICAgb3JpZW50YXRpb25cbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIC0+IERvdWJsZVJlY3RhbmdsZShEb3VibGVWZWN0b3IuWkVSTywgRG91YmxlVmVjdG9yLlpFUk8pXG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gQXhpc0xhYmVsc0xheW91dEluZm8uQnVpbGRlcigpXG4gICAgICAgICAgICAuYnJlYWtzKGJyZWFrcylcbiAgICAgICAgICAgIC5ib3VuZHMoYXhpc0JvdW5kcykgICAgIC8vIGxhYmVsIGJvdW5kcyBhY3R1YWxseVxuICAgICAgICAgICAgLmJ1aWxkKClcbiAgICB9XG5cbiAgICBmdW4gbWFwVG9BeGlzKFxuICAgICAgICBicmVha3M6IExpc3Q8RG91YmxlPixcbiAgICAgICAgYXhpc0RvbWFpbjogRG91YmxlU3BhbixcbiAgICAgICAgYXhpc01hcHBlcjogKERvdWJsZT8pIC0+IERvdWJsZT9cbiAgICApOiBMaXN0PERvdWJsZT4ge1xuICAgICAgICB2YWwgYXhpc01pbiA9IGF4aXNEb21haW4ubG93ZXJFbmRcbiAgICAgICAgdmFsIGF4aXNCcmVha3MgPSBBcnJheUxpc3Q8RG91YmxlPigpXG4gICAgICAgIGZvciAodiBpbiBicmVha3MpIHtcbiAgICAgICAgICAgIHZhbCBtYXBwZWQgPSBheGlzTWFwcGVyKHYgLSBheGlzTWluKVxuICAgICAgICAgICAgYXhpc0JyZWFrcy5hZGQobWFwcGVkISEpXG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGF4aXNCcmVha3NcbiAgICB9XG5cbiAgICBmdW4gYXBwbHlMYWJlbHNNYXJnaW5zKFxuICAgICAgICBsYWJlbHNCb3VuZHM6IERvdWJsZVJlY3RhbmdsZSxcbiAgICAgICAgdGlja0xlbmd0aDogRG91YmxlLFxuICAgICAgICBtYXJnaW5zOiBNYXJnaW5zLFxuICAgICAgICBvcmllbnRhdGlvbjogT3JpZW50YXRpb25cbiAgICApOiBEb3VibGVSZWN0YW5nbGUge1xuICAgICAgICB2YWwgb2Zmc2V0ID0gdGlja0xlbmd0aCArIHdoZW4gKG9yaWVudGF0aW9uKSB7XG4gICAgICAgICAgICBMRUZUIC0+IG1hcmdpbnMud2lkdGgoKSArIGxhYmVsc0JvdW5kcy53aWR0aFxuICAgICAgICAgICAgVE9QIC0+IG1hcmdpbnMuaGVpZ2h0KCkgKyBsYWJlbHNCb3VuZHMuaGVpZ2h0XG4gICAgICAgICAgICBSSUdIVCwgQk9UVE9NIC0+IDAuMFxuICAgICAgICB9XG4gICAgICAgIHZhbCBvZmZzZXRWZWN0b3IgPSB3aGVuIChvcmllbnRhdGlvbikge1xuICAgICAgICAgICAgTEVGVCAtPiBEb3VibGVWZWN0b3IoLW9mZnNldCwgMC4wKVxuICAgICAgICAgICAgUklHSFQgLT4gRG91YmxlVmVjdG9yKG9mZnNldCwgMC4wKVxuICAgICAgICAgICAgVE9QIC0+IERvdWJsZVZlY3RvcigwLjAsIC1vZmZzZXQpXG4gICAgICAgICAgICBCT1RUT00gLT4gRG91YmxlVmVjdG9yKDAuMCwgb2Zmc2V0KVxuICAgICAgICB9XG4gICAgICAgIHZhbCBkaW1lbnNpb24gPSBsYWJlbHNCb3VuZHMuZGltZW5zaW9uLmFkZChcbiAgICAgICAgICAgIHdoZW4ge1xuICAgICAgICAgICAgICAgIG9yaWVudGF0aW9uLmlzSG9yaXpvbnRhbCAtPiBEb3VibGVWZWN0b3IoMC4wLCBtYXJnaW5zLmhlaWdodCgpKVxuICAgICAgICAgICAgICAgIGVsc2UgLT4gRG91YmxlVmVjdG9yKG1hcmdpbnMud2lkdGgoKSwgMC4wKVxuICAgICAgICAgICAgfVxuICAgICAgICApXG4gICAgICAgIHJldHVybiBEb3VibGVSZWN0YW5nbGUoXG4gICAgICAgICAgICBsYWJlbHNCb3VuZHMub3JpZ2luLmFkZChvZmZzZXRWZWN0b3IpLFxuICAgICAgICAgICAgZGltZW5zaW9uXG4gICAgICAgIClcbiAgICB9XG5cbiAgICBmdW4gdGV4dEJvdW5kcyhlbGVtZW50UmVjdDogRG91YmxlUmVjdGFuZ2xlLCBtYXJnaW5zOiBNYXJnaW5zLCBvcmllbnRhdGlvbjogT3JpZW50YXRpb24pOiBEb3VibGVSZWN0YW5nbGUge1xuICAgICAgICByZXR1cm4gd2hlbiB7XG4gICAgICAgICAgICBvcmllbnRhdGlvbi5pc0hvcml6b250YWwgLT4ge1xuICAgICAgICAgICAgICAgIERvdWJsZVJlY3RhbmdsZShcbiAgICAgICAgICAgICAgICAgICAgZWxlbWVudFJlY3QubGVmdCxcbiAgICAgICAgICAgICAgICAgICAgZWxlbWVudFJlY3QudG9wICsgbWFyZ2lucy50b3AsXG4gICAgICAgICAgICAgICAgICAgIGVsZW1lbnRSZWN0LndpZHRoLFxuICAgICAgICAgICAgICAgICAgICBlbGVtZW50UmVjdC5oZWlnaHQgLSBtYXJnaW5zLmhlaWdodCgpXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSAtPiB7XG4gICAgICAgICAgICAgICAgRG91YmxlUmVjdGFuZ2xlKFxuICAgICAgICAgICAgICAgICAgICBlbGVtZW50UmVjdC5sZWZ0ICsgbWFyZ2lucy5sZWZ0LFxuICAgICAgICAgICAgICAgICAgICBlbGVtZW50UmVjdC50b3AsXG4gICAgICAgICAgICAgICAgICAgIGVsZW1lbnRSZWN0LndpZHRoIC0gbWFyZ2lucy53aWR0aCgpLFxuICAgICAgICAgICAgICAgICAgICBlbGVtZW50UmVjdC5oZWlnaHRcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBwcml2YXRlIGZ1biB2ZXJ0aWNhbEF4aXNMYWJlbHNCb3VuZHMoXG4gICAgICAgIGJyZWFrczogU2NhbGVCcmVha3MsXG4gICAgICAgIGF4aXNEb21haW46IERvdWJsZVNwYW4sXG4gICAgICAgIGF4aXNNYXBwZXI6IChEb3VibGU/KSAtPiBEb3VibGU/LFxuICAgICAgICB0aWNrTGFiZWxTcGVjOiBMYWJlbFNwZWNcbiAgICApOiBEb3VibGVSZWN0YW5nbGUge1xuICAgICAgICB2YWwgbWF4TGFiZWxXaWR0aCA9IGxvbmdlc3RMYWJlbFdpZHRoKGJyZWFrcy5sYWJlbHMpIHsgdGlja0xhYmVsU3BlYy53aWR0aChpdCkgfVxuICAgICAgICB2YXIgeTEgPSAwLjBcbiAgICAgICAgdmFyIHkyID0gMC4wXG4gICAgICAgIGlmICghYnJlYWtzLmlzRW1wdHkpIHtcbiAgICAgICAgICAgIHZhbCBheGlzQnJlYWtzID0gbWFwVG9BeGlzKFxuICAgICAgICAgICAgICAgIGJyZWFrcy50cmFuc2Zvcm1lZFZhbHVlcyxcbiAgICAgICAgICAgICAgICBheGlzRG9tYWluLFxuICAgICAgICAgICAgICAgIGF4aXNNYXBwZXJcbiAgICAgICAgICAgIClcblxuICAgICAgICAgICAgeTEgPSBtaW4oYXhpc0JyZWFrc1swXSwgYXhpc0JyZWFrcy5sYXN0KCkpXG4gICAgICAgICAgICB5MiA9IG1heChheGlzQnJlYWtzWzBdLCBheGlzQnJlYWtzLmxhc3Q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bHNCb3VuZHMpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBsYWJlbHNJbmZvXG4gICAgfVxuXG4gICAgcHJpdmF0ZSBmdW4gc2ltcGxlTGF5b3V0KCk6IEF4aXNMYWJlbHNMYXlvdXQge1xuICAgICAgICByZXR1cm4gSG9yaXpvbnRhbFNpbXBsZUxhYmVsc0xheW91dChcbiAgICAgICAgICAgIG9yaWVudGF0aW9uLFxuICAgICAgICAgICAgYXhpc0RvbWFpbixcbiAgICAgICAgICAgIGxhYmVsU3BlYyxcbiAgICAgICAgICAgIGJyZWFrcyxcbiAgICAgICAgICAgIHRoZW1lXG4gICAgICAgIClcbiAgICB9XG5cbiAgICBwcml2YXRlIGZ1biBtdWx0aWxpbmVMYXlvdXQoKTogQXhpc0xhYmVsc0xheW91dCB7XG4gICAgICAgIHJldHVybiBIb3Jpem9udGFsTXVsdGlsaW5lTGFiZWxzTGF5b3V0KFxuICAgICAgICAgICAgb3JpZW50YXRpb24sXG4gICAgICAgICAgICBheGlzRG9tYWluLFxuICAgICAgICAgICAgbGFiZWxTcGVjLFxuICAgICAgICAgICAgYnJlYWtzLFxuICAgICAgICAgICAgdGhlbWUsXG4gICAgICAgICAgICAyXG4gICAgICAgIClcbiAgICB9XG5cbiAgICBwcml2YXRlIGZ1biB0aWx0ZWRMYXlvdXQoKTogQXhpc0xhYmVsc0xheW91dCB7XG4gICAgICAgIHJldHVybiBIb3Jpem9udGFsVGlsdGVkTGFiZWxzTGF5b3V0KFxuICAgICAgICAgICAgb3JpZW50YXRpb24sXG4gICAgICAgICAgICBheGlzRG9tYWluLFxuICAgICAgICAgICAgbGFiZWxTcGVjLFxuICAgICAgICAgICAgYnJlYWtzLFxuICAgICAgICAgICAgdGhlbWVcbiAgICAgICAgKVxuICAgIH1cblxuICAgIHByaXZhdGUgZnVuIHZlcnRpY2FsTGF5b3V0KGxhYmVsU3BlYzogTGFiZWxTcGVjK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dsZT9cbiAgICApOiBBeGlzTGFiZWxzTGF5b3V0SW5mbyB7XG5cbiAgICAgICAgdmFyIHRhcmdldEJyZWFrQ291bnQgPVxuICAgICAgICAgICAgSG9yaXpvbnRhbFNpbXBsZUxhYmVsc0xheW91dC5lc3RpbWF0ZUJyZWFrQ291bnRJbml0aWFsKFxuICAgICAgICAgICAgICAgIGF4aXNMZW5ndGgsXG4gICAgICAgICAgICAgICAgUGxvdExhYmVsU3BlY0ZhY3RvcnkuYXhpc1RpY2sodGhlbWUpXG4gICAgICAgICAgICApXG4gICAgICAgIHZhciBicmVha3MgPSBnZXRCcmVha3ModGFyZ2V0QnJlYWtDb3VudCwgYXhpc0xlbmd0aClcbiAgICAgICAgdmFyIGxhYmVsc0luZm8gPSBkb0xheW91dExhYmVscyhicmVha3MsIGF4aXNMZW5ndGgsIGF4aXNNYXBwZXIsIG1heExhYmVsc0JvdW5kcylcblxuICAgICAgICB3aGlsZSAobGFiZWxzSW5mby5pc092ZXJsYXApIHtcbiAgICAgICAgICAgIC8vIHJlZHVjZSB0aWNrIGNvdW50XG4gICAgICAgICAgICB2YWwgbmV3VGFyZ2V0QnJlYWtDb3VudCA9XG4gICAgICAgICAgICAgICAgSG9yaXpvbnRhbFNpbXBsZUxhYmVsc0xheW91dC5lc3RpbWF0ZUJyZWFrQ291bnQoXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrcy5sYWJlbHMsXG4gICAgICAgICAgICAgICAgICAgIGF4aXNMZW5ndGgsXG4gICAgICAgICAgICAgICAgICAgIFBsb3RMYWJlbFNwZWNGYWN0b3J5LmF4aXNUaWNrKHRoZW1lKVxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgIGlmIChuZXdUYXJnZXRCcmVha0NvdW50ID49IHRhcmdldEJyZWFrQ291bnQpIHtcbiAgICAgICAgICAgICAgICAvLyBwYXJhbm9pZCAtIGhpZ2hseSBpbXBvc3NpYmxlLlxuICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0YXJnZXRCcmVha0NvdW50ID0gbmV3VGFyZ2V0QnJlYWtDb3VudFxuICAgICAgICAgICAgYnJlYWtzID0gZ2V0QnJlYWtzKHRhcmdldEJyZWFrQ291bnQsIGF4aXNMZW5ndGgpXG4gICAgICAgICAgICBsYWJlbHNJbmZvID0gZG9MYXlvdXRMYWJlbHMoYnJlYWtzLCBheGlzTGVuZ3RoLCBheGlzTWFwcGVyLCBtYXhMYWJlbHNCb3VuZHMpXG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gbGFiZWxzSW5mb1xuICAgIH1cblxuICAgIHByaXZhdGUgZnVuIGRvTGF5b3V0TGFiZWxzKFxuICAgICAgICBicmVha3M6IFNjYWxlQnJlYWtzLFxuICAgICAgICBheGlzTGVuZ3RoOiBEb3VibGUsXG4gICAgICAgIGF4aXNNYXBwZXI6IChEb3VibGU/KSAtPiBEb3VibGU/LFxuICAgICAgICBtYXhMYWJlbHNCb3VuZHM6IERvdWJsZVJlY3RhbmdsZT9cbiAgICApOiBBeGlzTGFiZWxzTGF5b3V0SW5mbyB7XG5cbiAgICAgICAgdmFsIGxheW91dCA9IEhvcml6b250YWxTaW1wbGVMYWJlbHNMYXlvdXQoXG4gICAgICAgICAgICBvcmllbnRhdGlvbixcbiAgICAgICAgICAgIGF4aXNEb21haW4sXG4gICAgICAgICAgICBsYWJlbFNwZWMsXG4gICAgICAgICAgICBicmVha3MsXG4gICAgICAgICAgICB0aGVtZVxuICAgICAgICApXG4gICAgICAgIHJldHVybiBsYXlvdXQuZG9MYXlvdXQoYXhpc0xlbmd0aCwgYXhpc01hcHBlciwgbWF4TGFiZWxzQm91bmRzKVxuICAgIH1cblxuICAgIHByaXZhdGUgZnVuIGdldEJyZWFrcyhtYXhDb3VudDogSW50LCBheGlzTGVuZ3RoOiBEb3VibGUpOiBTY2FsZUJyZWFrcyB7XG4gICAgICAgIHJldHVybiBCcmVha0xhYmVsc0xheW91dFV0aWwuZ2V0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mVjdGFuZ2xlP1xuICAgICk6IEF4aXNMYWJlbHNMYXlvdXRJbmZvIHtcblxuICAgICAgICB2YWwgYm91bmRzQnlTaGVsZkluZGV4ID0gSGFzaE1hcDxJbnQsIERvdWJsZVJlY3RhbmdsZT4oKVxuICAgICAgICB2YWwgdGlja3MgPSBtYXBUb0F4aXMoYnJlYWtzLnRyYW5zZm9ybWVkVmFsdWVzLCBheGlzTWFwcGVyKVxuICAgICAgICB2YWwgYm91bmRzTGlzdCA9IGxhYmVsQm91bmRzTGlzdChcbiAgICAgICAgICAgIHRpY2tzLCBicmVha3MubGFiZWxzLFxuICAgICAgICAgICAgSE9SSVpPTlRBTF9USUNLX0xPQ0FUSU9OXG4gICAgICAgIClcblxuICAgICAgICBmb3IgKGxhYmVsQm91bmRzIGluIGJvdW5kc0xpc3QpIHtcbiAgICAgICAgICAgIC8vIGZpbmQgc2hlbGYgd2l0aCBubyBvdmVybGFwXG4gICAgICAgICAgICB2YXIgc2hlbGZJbmRleCA9IDBcbiAgICAgICAgICAgIHdoaWxlICh0cnVlKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFib3VuZHNCeVNoZWxmSW5kZXguY29udGFpbnNLZXkoc2hlbGZJbmRleCkpIHtcbiAgICAgICAgICAgICAgICAgICAgYm91bmRzQnlTaGVsZkluZGV4W3NoZWxmSW5kZXhdID0gbGFiZWxCb3VuZHNcbiAgICAgICAgICAgICAgICAgICAgbXlTaGVsZkluZGV4Rm9yVGlja0luZGV4LmFkZChzaGVsZkluZGV4KVxuICAgICAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHZhciBzaGVsZkJvdW5kcyA9IGJvdW5kc0J5U2hlbGZJbmRleFtzaGVsZkluZGV4XSEhXG4gICAgICAgICAgICAgICAgLy8gbm90IG92ZXJsYXBwZWQ/XG4gICAgICAgICAgICAgICAgaWYgKCFzaGVsZkJvdW5kcy54UmFuZ2UoKVxuICAgICAgICAgICAgICAgICAgICAgICAgLmNvbm5lY3RlZChEb3VibGVTcGFuKGxhYmVsQm91bmRzLmxlZnQgLSBNSU5fRElTVEFOQ0UsIGxhYmVsQm91bmRzLnJpZ2h0ICsgTUlOX0RJU1RBTkNFKSlcbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgbXlTaGVsZkluZGV4Rm9yVGlja0luZGV4LmFkZChzaGVsZkluZGV4KVxuICAgICAgICAgICAgICAgICAgICBzaGVsZkJvdW5kcyA9IHNoZWxmQm91bmRzLnVuaW9uKGxhYmVsQm91bmRzKVxuICAgICAgICAgICAgICAgICAgICBib3VuZHNCeVNoZWxmSW5kZXhbc2hlbGZJbmRleF0gPSBzaGVsZkJvdW5kc1xuICAgICAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHNoZWxmSW5kZXgrK1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgdmFyIGJvdW5kcyA9IGlmIChib3VuZHNCeVNoZWxmSW5kZXguaXNFbXB0eSgpKVxuICAgICAgICAgICAgRG91YmxlUmVjdGFuZ2xlKERvdWJsZVZlY3Rvci5aRVJPLCBEb3VibGVWZWN0b3IuWkVSTylcbiAgICAgICAgZWxzZVxuICAgICAgICAgICAgYm91bmRzQnlTaGVsZkluZGV4WzBdISFcbiAgICAgICAgdmFsIGggPSBsYWJlbFNwZWMuaGVpZ2h0KCkgKiBMSU5FX0hFSUdIVFxuICAgICAgICBmb3IgKGkgaW4gMCB1bnRpbCBib3VuZHNCeVNoZWxmSW5kZXguc2l6ZSkge1xuICAgICAgICAgICAgdmFsIHNoZWxmQm91bmRzID0gYm91bmRzQnlTaGVsZkluZGV4W2ldISFcbiAgICAgICAgICAgIGJvdW5kcyA9IGJvdW5kcy51bmlvbihzaGVsZkJvdW5kcy5hZGQoRG91YmxlVmVjdG9yKDAuMCwgaSAqIGgpKSlcbiAgICAgICAgfVxuXG4gICAgIC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2xlIDAuLi4tOTBcbiAgICAgICAgaWYgKCEoUk9UQVRJT05fREVHUkVFID49IC05MCAmJiBST1RBVElPTl9ERUdSRUUgPD0gMFxuICAgICAgICAgICAgICAgICAgICAmJiBsYWJlbEhvcml6b250YWxBbmNob3IgPT09IFRleHQuSG9yaXpvbnRhbEFuY2hvci5SSUdIVFxuICAgICAgICAgICAgICAgICAgICAmJiBsYWJlbFZlcnRpY2FsQW5jaG9yID09PSBUZXh0LlZlcnRpY2FsQW5jaG9yLlRPUClcbiAgICAgICAgKSB7XG4gICAgICAgICAgICB0aHJvdyBSdW50aW1lRXhjZXB0aW9uKFwiTm90IGltcGxlbWVudGVkXCIpXG4gICAgICAgIH1cblxuXG4gICAgICAgIHZhbCB3ID0gYWJzKGxhYmVsTm9ybWFsU2l6ZS54ICogQ09TKSArIDIgKiBhYnMobGFiZWxOb3JtYWxTaXplLnkgKiBTSU4pXG4gICAgICAgIHZhbCBoID0gYWJzKGxhYmVsTm9ybWFsU2l6ZS54ICogU0lOKSArIGFicyhsYWJlbE5vcm1hbFNpemUueSAqIENPUylcbiAgICAgICAgdmFsIHggPSAtKGFicyhsYWJlbE5vcm1hbFNpemUueCAqIENPUykgKyBhYnMobGFiZWxOb3JtYWxTaXplLnkgKiBTSU4pKVxuICAgICAgICB2YWwgeSA9IDAuMFxuXG4gICAgICAgIHJldHVybiBEb3VibGVSZWN0YW5nbGUoeCwgeSwgdywgaClcbiAgICB9XG5cbiAgICBjb21wYW5pb24gb2JqZWN0IHtcbiAgICAgICAgcHJpdmF0ZSBjb25zdCB2YWwgTUlOX0RJU1RBTkNFID0gNS4wXG4gICAgICAgIHByaXZhdGUgY29uc3QgdmFsIFJPVEFUSU9OX0RFR1JFRSA9IC0zMC4wXG5cbiAgICAgICAgcHJpdmF0ZSB2YWwgU0lOID0gc2luKHRvUmFkaWFucyhST1RBVElPTl9ERUdSRUUpKVxuICAgICAgICBwcml2YXRlIHZhbCBDT1MgPSBjb3ModG9SYWRpYW5zK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ICAgICB9XG5cbiAgICAgICAgdmFsIGxheW91dEluZm9zID0gZmFjZXRUaWxlQW5kTGF5b3V0Lm1hcCB7IChmYWNldFRpbGUsIHRpbGVMYXlvdXQpIC0+XG4gICAgICAgICAgICB0aWxlTGF5b3V0LmRvTGF5b3V0KFxuICAgICAgICAgICAgICAgIERvdWJsZVZlY3RvcihnZW9tV2lkdGgsIGdlb21IZWlnaHQpLFxuICAgICAgICAgICAgICAgIGNvb3JkUHJvdmlkZXJcbiAgICAgICAgICAgICkud2l0aEF4aXNTaG93bihcbiAgICAgICAgICAgICAgICBmYWNldFRpbGUuaGFzSEF4aXMsXG4gICAgICAgICAgICAgICAgZmFjZXRUaWxlLmhhc1ZBeGlzXG4gICAgICAgICAgICApXG4gICAgICAgIH1cblxuICAgICAgICAvLyBhZGp1c3QgZ2VvbSBzaXplXG4gICAgICAgIHZhbCB0aWxlc0FyZWFTaXplTmV3ID0gRmFjZXRlZFBsb3RMYXlvdXRVdGlsLnRpbGVzQXJlYVNpemUoXG4gICAgICAgICAgICBsYXlvdXRJbmZvcyxcbiAgICAgICAgICAgIGZhY2V0cyxcbiAgICAgICAgICAgIGFkZGVkSFNpemUsXG4gICAgICAgICAgICBhZGRlZFZTaXplXG4gICAgICAgIClcblxuICAgICAgICB2YWwgd2lkdGhEaWZmID0gdGlsZXNBcmVhU2l6ZS54IC0gdGlsZXNBcmVhU2l6ZU5ldy54XG4gICAgICAgIHZhbCBoZWlnaHREaWZmID0gdGlsZXNBcmVhU2l6ZS55IC0gdGlsZXNBcmVhU2l6ZU5ldy55XG5cbiAgICAgICAgLy8gRXJyb3IgMSBweCBwZXIgdGlsZSBpcyBvay5cbiAgICAgICAgaWYgKGFicyh3aWR0aERpZmYpIDw9IGZhY2V0cy5jb2xDb3VudCAmJiBhYnMoaGVpZ2h0RGlmZikgPD0gZmFjZXRzLnJvd0NvdW50KSB7XG4gICAgICAgICAgICByZXR1cm4gbGF5b3V0SW5mb3NcbiAgICAgICAgfVxuXG4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91dGVyQm91bmRzID0gRG91YmxlUmVjdGFuZ2xlKERvdWJsZVZlY3Rvci5aRVJPLCBnZW9tU2l6ZSlcbiAgICAgICAgdmFsIGdlb21Jbm5lckJvdW5kcyA9IG1hcmdpbnNMYXlvdXQudG9Jbm5lckJvdW5kcyhnZW9tT3V0ZXJCb3VuZHMpXG5cbiAgICAgICAgdmFyIChoQXhpc0luZm8sIHZBeGlzSW5mbykgPSBjb21wdXRlQXhpc0luZm9zKFxuICAgICAgICAgICAgaEF4aXNMYXlvdXQsXG4gICAgICAgICAgICB2QXhpc0xheW91dCxcbiAgICAgICAgICAgIGdlb21TaXplID0gZ2VvbUlubmVyQm91bmRzLmRpbWVuc2lvbixcbiAgICAgICAgICAgIGhEb21haW4sIHZEb21haW4sXG4gICAgICAgIClcblxuICAgICAgICAvLyBDb21iaW5lIGdlb20gYXJlYSBhbmQgeC95LWF4aXNcbiAgICAgICAgdmFsIGdlb21XaXRoQXhpc0JvdW5kcyA9IHRpbGVCb3VuZHMoXG4gICAgICAgICAgICBoQXhpc0luZm8uYXhpc0JvdW5kcygpLFxuICAgICAgICAgICAgdkF4aXNJbmZvLmF4aXNCb3VuZHMoKSxcbiAgICAgICAgICAgIGdlb21PdXRlckJvdW5kc1xuICAgICAgICApXG5cblxuICAgICAgICByZXR1cm4gVGlsZUxheW91dEluZm8oXG4gICAgICAgICAgICBvZmZzZXQgPSBEb3VibGVWZWN0b3IuWkVSTyxcbiAgICAgICAgICAgIGJvdW5kcyA9IGdlb21XaXRoQXhpc0JvdW5kcyxcbiAgICAgICAgICAgIGdlb21PdXRlckJvdW5kcyA9IGdlb21PdXRlckJvdW5kcyxcbiAgICAgICAgICAgIGdlb21Jbm5lckJvdW5kcyA9IGdlb21Jbm5lckJvdW5kcyxcbiAgICAgICAgICAgIGhBeGlzSW5mbyxcbiAgICAgICAgICAgIHZBeGlzSW5mbyxcbiAgICAgICAgICAgIGhBeGlzU2hvd24gPSB0cnVlLFxuICAgICAgICAgICAgdkF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uICAgICAgICAgICAgKVxuICAgICAgICAgICAgcmV0dXJuIERvdWJsZVJlY3RhbmdsZShsZWZ0VG9wLCByaWdodEJvdHRvbS5zdWJ0cmFjdChsZWZ0VG9wKSlcbiAgICAgICAgfVxuXG4gICAgICAgIHByaXZhdGUgZnVuIGNvbXB1dGVBeGlzSW5mb3MoXG4gICAgICAgICAgICBoQXhpc0xheW91dDogQXhpc0xheW91dCxcbiAgICAgICAgICAgIHZBeGlzTGF5b3V0OiBBeGlzTGF5b3V0LFxuICAgICAgICAgICAgZ2VvbVNpemU6IERvdWJsZVZlY3RvcixcbiAgICAgICAgICAgIGhEb21haW46IERvdWJsZVNwYW4sXG4gICAgICAgICAgICB2RG9tYWluOiBEb3VibGVTcGFuLFxuICAgICAgICApOiBQYWlyPEF4aXNMYXlvdXRJbmZvLCBBeGlzTGF5b3V0SW5mbz4ge1xuICAgICAgICAgICAgdmFsIGdlb21Cb3VuZHMgPSBEb3VibGVSZWN0YW5nbGUoRG91YmxlVmVjdG9yLlpFUk8sIGdlb21TaXplKVxuICAgICAgICAgICAgdmFyIGhBeGlzSW5mbyA9IGNvbXB1dGVIQXhpc0luZm8oXG4gICAgICAgICAgICAgICAgaEF4aXNMYXlvdXQsXG4gICAgICAgICAgICAgICAgaERvbWFpbixcbiAgICAgICAgICAgICAgICBnZW9tQm91bmRzLFxuICAgICAgICAgICAgKVxuXG4gICAgICAgICAgICB2YXIgdkF4aXNJbmZvID0gY29tcHV0ZVZBeGlzSW5mbyhcbiAgICAgICAgICAgICAgICB2QXhpc0xheW91dCxcbiAgICAgICAgICAgICAgICB2RG9tYWluLFxuICAgICAgICAgICAgICAgIGdlb21Cb3VuZHNcbiAgICAgICAgICAgIClcblxuICAgICAgICAgICAgcmV0dXJuIFBhaXIoaEF4aXNJbmZvLCB2QXhpc0luZm8pXG4gICAgICAgIH1cblxuICAgICAgICBwcml2YXRlIGZ1biBjb21wdXRlSEF4aXNJbmZvKFxuICAgICAgICAgICAgYXhpc0xheW91dDogQXhpc0xheW91dCxcbiAgICAgICAgICAgIGF4aXNEb21haW46IERvdWJsZVNwYW4sXG4gICAgICAgICAgICBnZW9tQm91bmRzOiBEb3VibGVSZWN0YW5nbGVcbiAgICAgICAgKTogQXhpc0xheW91dEluZm8ge1xuICAgICAgICAgICAgdmFsIGF4aXNTcGFuID0gZ2VvbUJvdW5kcy54UmFuZ2UoKVxuICAgICAgICAgICAgdmFsIGF4aXNMZW5ndGggPSBheGlzU3Bhbi5sZW5ndGhcbiAgICAgICAgICAgIHZhbCBzdHJldGNoID0gYXhpc0xlbmd0aCAqIEFYSVNfU1RSRVRDSF9SQVRJT1xuICAgICAgICAgICAgdmFsIG1heFRpY2tMYWJlbHNCb3VuZHMgPSBUaWxlTGF5b3V0VXRpbC5tYXhIQXhpc1RpY2tMYWJlbHNCb3VuZHMoXG4gICAgICAgICAgICAgICAgT3JpZW50YXRpb24uQk9UVE9NLFxuICAgICAgICAgICAgICAgIHN0cmV0Y2gsXG4gICAgICAgICAgICAgICAgYXhpc1NwYW4gPSBheGlzU3BhbixcbiAgICAgICAgICAgICAgICBtYXhIb3Jpem9udGFsU3BhbiA9IGF4aXNTcGFuXG4gICAgICAgICAgICApXG4gICAgICAgICAgICByZXR1cm4gYXhpc0xheW91dC5kb0xheW91dChheGlzRG9tYWluLCBheGlzTGVuZ3RoLCBtYXhUaWNrTGFiZWxzQm91bmRzKVxuICAgICAgICB9XG5cbiAgICAgICAgcHJpdmF0ZSBmdW4gY29tcHV0ZVZBeGlzSW5mbyhcbiAgICAgICAgICAgIGF4aXNMYXlvdXQ6IEF4aXNMYXlvdXQsXG4gICAgICAgICAgICBheGlzRG9tYWluOiBEb3VibGVTcGFuLFxuICAgICAgICAgICAgZ2VvbUJvdW5kczogRG91YmxlUmVjdGFuZ2xlXG4gICAgICAgICk6IEF4aXNMYXlvdXRJbmZvIHtcbiAgICAgICAgICAgIHJldHVybiBheGlzTGF5b3V0LmRvTGF5b3V0KGF4aXNEb21haW4sIGd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0dXJuIERvdWJsZVJlY3RhbmdsZShcbiAgICAgICAgICAgIG1hcmdpbkxlZnRUb3AsXG4gICAgICAgICAgICBEb3VibGVWZWN0b3IoXG4gICAgICAgICAgICAgICAgbWF4KGdlb21TaXplLngsIEdFT01fTUlOX1NJWkUueCksXG4gICAgICAgICAgICAgICAgbWF4KGdlb21TaXplLnksIEdFT01fTUlOX1NJWkUueSlcbiAgICAgICAgICAgIClcbiAgICAgICAgKVxuICAgIH1cblxuICAgIGZ1biBnZW9tT3V0ZXJCb3VuZHMoXG4gICAgICAgIGdlb21JbnNldHM6IEdlb21BcmVhSW5zZXRzLFxuICAgICAgICBwbG90U2l6ZTogRG91YmxlVmVjdG9yLFxuICAgICAgICBoRG9tYWluOiBEb3VibGVTcGFuLFxuICAgICAgICB2RG9tYWluOiBEb3VibGVTcGFuLFxuICAgICAgICBtYXJnaW5zTGF5b3V0OiBHZW9tTWFyZ2luc0xheW91dCxcbiAgICAgICAgY29vcmRQcm92aWRlcjogQ29vcmRQcm92aWRlclxuICAgICk6IERvdWJsZVJlY3RhbmdsZSB7XG4gICAgICAgIHZhbCBwbG90dGluZ0FyZWEgPSBnZW9tSW5zZXRzLnN1YnRyYWN0RnJvbShEb3VibGVSZWN0YW5nbGUoWkVSTywgcGxvdFNpemUpKVxuICAgICAgICB2YWwgZ2VvbUlubmVyU2l6ZSA9IG1hcmdpbnNMYXlvdXQudG9Jbm5lclNpemUocGxvdHRpbmdBcmVhLmRpbWVuc2lvbilcblxuICAgICAgICB2YWwgZ2VvbU91dGVyU2l6ZUFkanVzdGVkID0gY29vcmRQcm92aWRlci5hZGp1c3RHZW9tU2l6ZShoRG9tYWluLCB2RG9tYWluLCBnZW9tSW5uZXJTaXplKS5sZXQge1xuICAgICAgICAgICAgbWFyZ2luc0xheW91dC50b091dGVyU2l6ZShpdClcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gRG91YmxlUmVjdGFuZ2xlKHBsb3R0aW5nQXJlYS5vcmlnaW4sIG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xvdC5idWlsZGVyLmxheW91dC51dGlsLkdlb21BcmVhSW5zZXRzXG5pbXBvcnQga290bGluLm1hdGgubWF4XG5cbmludGVybmFsIGNsYXNzIFRvcERvd25UaWxlTGF5b3V0KFxuICAgIHByaXZhdGUgdmFsIGhBeGlzTGF5b3V0OiBBeGlzTGF5b3V0LFxuICAgIHByaXZhdGUgdmFsIHZBeGlzTGF5b3V0OiBBeGlzTGF5b3V0LFxuICAgIHByaXZhdGUgdmFsIGhEb21haW46IERvdWJsZVNwYW4sIC8vIHRyYW5zZm9ybWVkIGRhdGEgcmFuZ2VzLlxuICAgIHByaXZhdGUgdmFsIHZEb21haW46IERvdWJsZVNwYW4sXG4gICAgcHJpdmF0ZSB2YWwgbWFyZ2luc0xheW91dDogR2VvbU1hcmdpbnNMYXlvdXQsXG4pIDogVGlsZUxheW91dCB7XG5cbiAgICBvdmVycmlkZSBmdW4gZG9MYXlvdXQocHJlZmVycmVkU2l6ZTogRG91YmxlVmVjdG9yLCBjb29yZFByb3ZpZGVyOiBDb29yZFByb3ZpZGVyKTogVGlsZUxheW91dEluZm8ge1xuXG4gICAgICAgIHZhciBnZW9tQXJlYUluc2V0cyA9IGNvbXB1dGVBeGlzSW5mb3MoXG4gICAgICAgICAgICBoQXhpc0xheW91dCxcbiAgICAgICAgICAgIHZBeGlzTGF5b3V0LFxuICAgICAgICAgICAgcHJlZmVycmVkU2l6ZSxcbiAgICAgICAgICAgIGhEb21haW4sIHZEb21haW4sXG4gICAgICAgICAgICBtYXJnaW5zTGF5b3V0LFxuICAgICAgICAgICAgY29vcmRQcm92aWRlclxuICAgICAgICApXG5cbiAgICAgICAgdmFsIGdlb21Cb3VuZHNBZnRlckxheW91dCA9IGdlb21PdXRlckJvdW5kcyhcbiAgICAgICAgICAgIGdlb21BcmVhSW5zZXRzLFxuICAgICAgICAgICAgcHJlZmVycmVkU2l6ZSxcbiAgICAgICAgICAgIGhEb21haW4sXG4gICAgICAgICAgICB2RG9tYWluLFxuICAgICA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gICAgICAgICAgIHZhciBuZXdXID0gaXQud2lkdGhcbiAgICAgICAgICAgIGlmIChsZWZ0T3ZlcmZsb3cgPiAwKSB7XG4gICAgICAgICAgICAgICAgbmV3WCA9IGl0LmxlZnQgKyBsZWZ0T3ZlcmZsb3dcbiAgICAgICAgICAgICAgICBuZXdXID0gaXQud2lkdGggLSBsZWZ0T3ZlcmZsb3dcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHJpZ2h0T3ZlcmZsb3cgPiAwKSB7XG4gICAgICAgICAgICAgICAgbmV3VyA9IG5ld1cgLSByaWdodE92ZXJmbG93XG4gICAgICAgICAgICB9XG5cblxuICAgICAgICAgICAgLy8gRml4IGZvciAoQmF0aWspXG4gICAgICAgICAgICAvLyAgICAgICAgICAgIG9yZy5hcGFjaGUuYmF0aWsuYnJpZGdlLkJyaWRnZUV4Y2VwdGlvbjogbnVsbDotMVxuICAgICAgICAgICAgLy8gICAgICAgICAgICBUaGUgYXR0cmlidXRlIFwid2lkdGhcIiBvZiB0aGUgZWxlbWVudCA8cmVjdD4gY2Fubm90IGJlIG5lZ2F0aXZlXG4gICAgICAgICAgICBuZXdXID0gbWF4KDAuMCwgbmV3VylcblxuICAgICAgICAgICAgdmFsIGJvdW5kc05ldyA9IERvdWJsZVJlY3RhbmdsZShcbiAgICAgICAgICAgICAgICBuZXdYLCBpdC50b3AsXG4gICAgICAgICAgICAgICAgbmV3VywgaXQuaGVpZ2h0XG4gICAgICAgICAgICApXG5cbiAgICAgICAgICAgIGlmIChib3VuZHNOZXcgIT0gZ2VvbUJvdW5kc0FmdGVyTGF5b3V0KSB7XG4gICAgICAgICAgICAgICAgdmFsIHNpemVOZXcgPSBjb29yZFByb3ZpZGVyLmFkanVzdEdlb21TaXplKGhEb21haW4sIHZEb21haW4sIGJvdW5kc05ldy5kaW1lbnNpb24pXG4gICAgICAgICAgICAgICAgRG91YmxlUmVjdGFuZ2xlKGJvdW5kc05ldy5vcmlnaW4sIHNpemVOZX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AgICAgICAgICAgIGhBeGlzU2hvd24gPSB0cnVlLFxuICAgICAgICAgICAgdkF4aXNTaG93biA9IHRydWUsXG4gICAgICAgICAgICB0cnVlSW5kZXggPSAwXG4gICAgICAgIClcbiAgICB9XG5cbiAgICBjb21wYW5pb24gb2JqZWN0IHtcbiAgICAgICAgcHJpdmF0ZSBjb25zdCB2YWwgQVhJU19TVFJFVENIX1JBVElPID0gMC4xICAvLyBhbGxvdyAxMCUgYXhpcyBmbGV4aWJpbGl0eSAob24gZWFjaCBlbmQpXG5cbiAgICAgICAgcHJpdmF0ZSBmdW4gdGlsZUJvdW5kcyhcbiAgICAgICAgICAgIHhBeGlzQm91bmRzOiBEb3VibGVSZWN0YW5nbGUsXG4gICAgICAgICAgICB5QXhpc0JvdW5kczogRG91YmxlUmVjdGFuZ2xlLFxuICAgICAgICAgICAgZ2VvbUJvdW5kczogRG91YmxlUmVjdGFuZ2xlXG4gICAgICAgICk6IERvdWJsZVJlY3RhbmdsZSB7XG4gICAgICAgICAgICAvLyBDYW4ndCBqdXN0IHVuaW9uIGJvdW5kcyBiZWNhdXNlXG4gICAgICAgICAgICAvLyB4LWF4aXMgaGFzIHplcm8gb3JpZ2luXG4gICAgICAgICAgICAvLyB5LWF4aXMgaGFzIG5lZ2F0aXZlIG9yaWdpblxuICAgICAgICAgICAgdmFsIGxlZnRUb3AgPSBEb3VibGVWZWN0b3IoXG4gICAgICAgICAgICAgICAgZ2VvbUJvdW5kcy5sZWZ0IC0geUF4aXNCb3VuZHMud2lkdGgsXG4gICAgICAgICAgICAgICAgZ2VvbUJvdW5kcy50b3AgLSBHRU9NX01BUkdJTlxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgdmFsIHJpZ2h0Qm90dG9tID0gRG91YmxlVmVjdG9yKFxuICAgICAgICAgICAgICAgIGdlb21Cb3VuZHMucmlnaHQgKyBHRU9NX01BUkdJTixcbiAgICAgICAgICAgICAgICBnZW9tQm91bmRzLmJvdHRvbSArIHhBeGlzQm91bmRzLmhlaWdodFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgcmV0dXJuIERvdWJsZVJlY3RhbmdsZShsZWZ0VG9wLCByaWdodEJvdHRvbS5zdWJ0cmFjdChsZWZ0VG9wKSlcbiAgICAgICAgfVxuXG4gICAgICAgIHByaXZhdGUgZnVuIGNvbXB1dGVBeGlzSW5mb3MoXG4gICAgICAgICAgICBoQXhpc0xheW91dDogQXhpc0xheW91dCxcbiAgICAgICAgICAgIHZBeGlzTGF5b3V0OiBBeGlzTGF5b3V0LFxuICAgICAgICAgICAgcGxvdFNpemU6IERvdWJsZVZlY3RvcixcbiAgICAgICAgICAgIGhEb21haW46IERvdWJsZVNwYW4sXG4gICAgICAgICAgICB2RG9tYWluOiBEb3VibGVTcGFuLFxuICAgICAgICAgICAgbWFyZ2luc0xheW91dDogR2VvbU1hcmdpbnNMYXlvdXQsXG4gICAgICAgICAgICBjb29yZFByb3ZpZGVyOiBDb29yZFByb3ZpZGVyXG4gICAgICAgICk6IEdlb21BcmVhSW5zZXRzIHtcbiAgICAgICAgICAgIHZhbCBpbnNldHNJbml0aWFsID0gR2VvbUFyZWFJbnNldHMuaW5pdChoQXhpc0xheW91dCwgdkF4aXNMYXlvdXQpXG4gICAgICAgICAgICB2YWwgZ2VvbUhlaWdodEVzdGltID0gZ2VvbU91dGVyQm91bmRzKFxuICAgICAgICAgICAgICAgIGluc2V0c0luaXRpYWwsXG4gICAgICAgICAgICAgICAgcGxvdFNpemUsXG4gICAgICAgICAgICAgICAgaERvbWFpbixcbiAgICAgICAgICAgICAgICB2RG9tYWluLFxuICAgICAgICAgICAgICAgIG1hcmdpbnNMYXlvdXQsXG4gICAgICAgICAgICAgICAgY29vcmRQcm92aWRlclxuICAgICAgICAgICAgKS5kaW1lbnNpb24ubGV0IHtcbiAgICAgICAgICAgICAgICBtYXJnaW5zTGF5b3V0LnRvSW5uZXJTaXplKGl0KS55XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhbCBpbnNldHNWQXhpcyA9IGluc2V0c0luaXRpYWwubGF5b3V0VkF4aXModkRvbWFpbiwgZ2VvbUhlaWdodEVzdGltKVxuICAgICAgICAgICAgdmFsIHBsb3R0aW5nQXJlYSA9IGdlb21PdXRlckJvdW5kcyhcbiAgICAgICAgICAgICAgICBpbnNldHNWQXhpcyxcbiAgICAgICAgICAgICAgICBwbG90U2l6ZSxcbiAgICAgICAgICAgICAgICBoRG9tYWluLFxuICAgICAgICAgICAgICAgIHZEb21haW4sXG4gICAgICAgICAgICAgICAgbWFyZ2luc0xheW91dCxcbiAgICAgICAgICAgICAgICBjb29yZFByb3ZpZGVyXG4gICAgICAgICAgICApXG4gICAgICAgICAgICB2YWwgaEF4aXNTcGFuID0gbWFyZ2luc0xheW91dC50b0lubmVyQm91bmRzKHBsb3R0aW5nQXJlYSkueFJhbmdlKClcbiAgICAgICAgICAgIHZhbCBpbnNldHNIVkF4aXMgPSBpbnNldHNWQXhpcy5sYXlvdXRIQXhpcyhcbiAgICAgICAgICAgICAgICBoRG9tYWluLFxuICAgICAgICAgICAgICAgIHBsb3RTaXplLFxuICAgICAgICAgICAgICAgIGhBeGlzU3BhblxuICAgICAgICAgICAgKVxuXG4gICAgICAgICAgICAvLyBSZS1sYXlvdXQgeS1heGlzIGlmIHgtYXhpcyBiZWNhbWUgdGhpY2tlciB0aGFuIGl0cyAnb3JpZ2luYWwgdGhpY2tuZXNzJy5cbiAgICAgICAgICAgIHZhbCBpbnNldHNGaW5hbCA9IGlmIChpbnNldHNIVkF4aXMuaEF4aXNUaGlja25lc3MgPiBpbnNldHNJbml0aWFsLmhBeGlzVGhpY2tuZXNzKSB7XG4gICAgICAgICAgICAgICAgdmFsIGdlb21IZWlnaHQgPSBnZW9tT3V0ZXJCb3VuZHMoXG4gICAgICAgICAgICAgICAgICAgIGluc2V0c0hWQXhpcyxcbiAgICAgICAgICAgICAgICAgICAgcGxvdFNpemUsXG4gICAgICAgICAgICAgICAgICAgIGhEb21haW4sXG4gICA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IH1cblxuICAgIHZhbCB2QXhpc1RoaWNrbmVzczogRG91YmxlXG4gICAgICAgIGdldCgpID0gd2hlbiAodkF4aXNMYXlvdXQub3JpZW50YXRpb24gPT0gTEVGVCkge1xuICAgICAgICAgICAgdHJ1ZSAtPiBsZWZ0XG4gICAgICAgICAgICBmYWxzZSAtPiByaWdodFxuICAgICAgICB9XG5cbiAgICB2YWwgaEF4aXNJbmZvOiBBeGlzTGF5b3V0SW5mb1xuICAgICAgICBnZXQoKSB7XG4gICAgICAgICAgICByZXR1cm4gX2hBeGlzSW5mbyA/OiB0aHJvdyBJbGxlZ2FsU3RhdGVFeGNlcHRpb24oXCJIb3Jpem9udGFsIGF4aXMgaXMgbm90IGxheW91dGVkXCIpXG4gICAgICAgIH1cblxuICAgIHZhbCB2QXhpc0luZm86IEF4aXNMYXlvdXRJbmZvXG4gICAgICAgIGdldCgpIHtcbiAgICAgICAgICAgIHJldHVybiBfdkF4aXNJbmZvID86IHRocm93IElsbGVnYWxTdGF0ZUV4Y2VwdGlvbihcIlZlcnRpY2FsIGF4aXMgaXMgbm90IGxheW91dGVkXCIpXG4gICAgICAgIH1cblxuICAgIG92ZXJyaWRlIGZ1biBzdWJ0cmFjdEZyb20ocjogRG91YmxlUmVjdGFuZ2xlKTogRG91YmxlUmVjdGFuZ2xlIHtcbiAgICAgICAgQFN1cHByZXNzKFwiTkFNRV9TSEFET1dJTkdcIilcbiAgICAgICAgdmFsIHIgPSBzdXBlci5zdWJ0cmFjdEZyb20ocilcbiAgICAgICAgcmV0dXJuIERvdWJsZVJlY3RhbmdsZShcbiAgICAgICAgICAgIHIub3JpZ2luLFxuICAgICAgICAgICAgRG91YmxlVmVjdG9yKFxuICAgICAgICAgICAgICAgIG1heChyLndpZHRoLCBUaWxlTGF5b3V0VXRpbC5HRU9NX01JTl9TSVpFLngpLFxuICAgICAgICAgICAgICAgIG1heChyLmhlaWdodCwgVGlsZUxheW91dFV0aWwuR0VPTV9NSU5fU0laRS55KVxuICAgIC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ICAgdGhpc0NoYXIgPSB0aGlzQ2hhci51cHBlcmNhc2VDaGFyKClcbiAgICAgICAgICAgICAgICBvdGhlckNoYXIgPSBvdGhlckNoYXIudXBwZXJjYXNlQ2hhcigpXG5cbiAgICAgICAgICAgICAgICBpZiAodGhpc0NoYXIgIT0gb3RoZXJDaGFyKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXNDaGFyID0gdGhpc0NoYXIubG93ZXJjYXNlQ2hhcigpXG4gICAgICAgICAgICAgICAgICAgIG90aGVyQ2hhciA9IG90aGVyQ2hhci5sb3dlcmNhc2VDaGFyKClcblxuICAgICAgICAgICAgICAgICAgICBpZiAodGhpc0NoYXIgIT0gb3RoZXJDaGFyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpc0NoYXIuY29tcGFyZVRvKG90aGVyQ2hhcilcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbjEgLSBuMlxuICAgIH0gZWxzZSB7XG4gICAgICAgIHJldHVybiBjb21wYXJlVG8ob3RoZXIpXG4gICAgfVxufVxuXG4vKipcbiAqIFJldHVybnMgYHRydWVgIGlmIHRoZSBjb250ZW50cyBvZiB0aGlzIGNoYXIgc2VxdWVuY2UgYXJlIGVxdWFsIHRvIHRoZSBjb250ZW50cyBvZiB0aGUgc3BlY2lmaWVkIFtvdGhlcl0sXG4gKiBpLmUuIGJvdGggY2hhciBzZXF1ZW5jZXMgY29udGFpbiB0aGUgc2FtZSBudW1iZXIgb2YgdGhlIHNhbWUgY2hhcmFjdGVycyBpbiB0aGUgc2FtZSBvcmRlci5cbiAqXG4gKiBAc2FtcGxlIHNhbXBsZXMudGV4dC5TdHJpbmdzLmNvbnRlbnRFcXVhbHNcbiAqL1xuQFNpbmNlS290bGluKFwiMS41XCIpXG5wdWJsaWMgYWN0dWFsIGluZml4IGZ1biBDaGFyU2VxdWV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dpdGhvdXQgcXVvdGVzLlxuICAgIGNvbnN0IHZhbCBGT05UX0ZBTUlMWV9OT1JNQUwgPSBcIlxcXCJMdWNpZGEgR3JhbmRlXFxcIiwgc2Fucy1zZXJpZlwiXG5cbiAgICBjbGFzcyBDb21tb24ge1xuICAgICAgICBvYmplY3QgVGl0bGUge1xuICAgICAgICAgICAgY29uc3QgdmFsIEZPTlRfU0laRSA9IEZPTlRfTEFSR0VcbiAgICAgICAgICAgIGNvbnN0IHZhbCBGT05UX1NJWkVfQ1NTID0gXCJcIiArIEZPTlRfU0laRSArIFwicHhcIlxuICAgICAgICB9XG5cbiAgICAgICAgb2JqZWN0IFN1YnRpdGxlIHtcbiAgICAgICAgICAgIGNvbnN0IHZhbCBGT05UX1NJWkUgPSBGT05UX01FRElVTVxuICAgICAgICAgICAgY29uc3QgdmFsIEZPTlRfU0laRV9DU1MgPSBcIlwiICsgRk9OVF9TSVpFICsgXCJweFwiXG4gICAgICAgIH1cblxuICAgICAgICBvYmplY3QgQ2FwdGlvbiB7XG4gICAgICAgICAgICBjb25zdCB2YWwgRk9OVF9TSVpFID0gRk9OVF9TTUFMTFxuICAgICAgICAgICAgY29uc3QgdmFsIEZPTlRfU0laRV9DU1MgPSBcIlwiICsgRk9OVF9TSVpFICsgXCJweFwiXG4gICAgICAgIH1cblxuICAgICAgICBvYmplY3QgTGVnZW5kIHtcbiAgICAgICAgICAgIGNvbnN0IHZhbCBUSVRMRV9GT05UX1NJWkUgPSBGT05UX01FRElVTVxuICAgICAgICAgICAgY29uc3QgdmFsIElURU1fRk9OVF9TSVpFID0gRk9OVF9TTUFMTFxuICAgICAgICB9XG5cbiAgICAgICAgb2JqZWN0IFRvb2x0aXAge1xuICAgICAgICAgICAgY29uc3QgdmFsIE1BWF9QT0lOVEVSX0ZPT1RJTkdfTEVOR1RIID0gMTIuMFxuICAgICAgICAgICAgY29uc3QgdmFsIFBPSU5URVJfRk9PVElOR19UT19TSURFX0xFTkdUSF9SQVRJTyA9IDAuNFxuXG4gICAgICAgICAgICBjb25zdCB2YWwgTUFSR0lOX0JFVFdFRU5fVE9PTFRJUFMgPSA1LjBcbiAgICAgICAgICAgIGNvbnN0IHZhbCBEQVRBX1RPT0xUSVBfRk9OVF9TSVpFID0gRk9OVF9TTUFMTFxuICAgICAgICAgICAgY29uc3QgdmFsIExJTkVfSU5URVJWQUwgPSA2LjBcbiAgICAgICAgICAgIGNvbnN0IHZhbCBJTlRFUlZBTF9CRVRXRUVOX1NVQlNUUklOR1MgPSAzLjBcbiAgICAgICAgICAgIGNvbnN0IHZhbCBIX0NPTlRFTlRfUEFERElORyA9IDYuMFxuICAgICAgICAgICAgY29uc3QgdmFsIFZfQ09OVEVOVF9QQURESU5HID0gNi4wXG4gICAgICAgICAgICBjb25zdCB2YWwgQ09OVEVOVF9FWFRFTkRFRF9QQURESU5HID0gMTAuMFxuXG4gICAgICAgICAgICBjb25zdCB2YWwgTEFCRUxfVkFMVUVfSU5URVJWQUwgPSA4LjBcbiAgICAgICAgICAgIGNvbnN0IHZhbCBWQUxVRV9MSU5FX01BWF9MRU5HVEggPSAzMFxuXG4gICAgICAgICAgICBjb25zdCB2YWwgTElORV9TRVBBUkFUT1JfV0lEVEggPSAwLjdcblxuICAgICAgICAgICAgY29uc3QgdmFsIEJPUkRFUl9SQURJVVMgPSA0LjBcbiAgICAgICAgICAgIGNvbnN0IHZhbCBDT0xPUl9CQVJfV0lEVEggPSA0LjBcbiAgICAgICAgICAgIGNvbnN0IHZhbCBDT0xPUl9CQVJfU1RST0tFX1dJRFRIID0gMS41XG5cbiAgICAgICAgICAgIHZhbCBEQVJLX1RFWFRfQ09MT1IgPSBDb2xvci5CTEFDS1xuICAgICAgICAgICAgdmFsIExJR0hUX1RFWFRfQ09MT1IgPSBDb2xvci5XSElURVxuXG4gICAgICAgICAgICBjb25zdCB2YWwgQVhJU19UT09MVElQX0ZPTlRfU0laRSA9IEF4aXMuVElDS19GT05UX1NJWkVcbiAgICAgICAgICAgIHZhbC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cklkOiBTdHJpbmc/KTogU3RyaW5nIHtcbiAgICAgICAgdmFsIGNzcyA9IFN0cmluZ0J1aWxkZXIoQ1NTKVxuICAgICAgICBjc3MuYXBwZW5kKCdcXG4nKVxuICAgICAgICBzdHlsZVNoZWV0LmdldENsYXNzZXMoKS5mb3JFYWNoIHsgY2xhc3NOYW1lIC0+XG4gICAgICAgICAgICB2YWwgaWQgPSB3aGVuIChjbGFzc05hbWUpIHtcbiAgICAgICAgICAgICAgICBUT09MVElQX1RFWFQsXG4gICAgICAgICAgICAgICAgVE9PTFRJUF9USVRMRSxcbiAgICAgICAgICAgICAgICBUT09MVElQX0xBQkVMLFxuICAgICAgICAgICAgICAgIFwiJEFYSVNfVE9PTFRJUF9URVhULXhcIixcbiAgICAgICAgICAgICAgICBcIiRBWElTX1RPT0xUSVBfVEVYVC15XCIgLT4gZGVjb3JhdGlvbkxheWVySWRcbiAgICAgICAgICAgICAgICBlbHNlIC0+IHBsb3RJZFxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY3NzLmFwcGVuZChzdHlsZVNoZWV0LnRvQ1NTKGNsYXNzTmFtZSwgaWQpKVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBjc3MudG9TdHJpbmcoKVxuICAgIH1cblxuICAgIGZ1biBkZWZhdWx0KCk6IFN0eWxlU2hlZXQge1xuICAgICAgICByZXR1cm4gU3R5bGVTaGVldChcbiAgICAgICAgICAgIERlZmF1bHRzLkRFRkFVTFRfVEVYVF9TVFlMRVMsXG4gICAgICAgICAgICBkZWZhdWx0RmFtaWx5ID0gRk9OVF9GQU1JTFlfTk9STUFMXG4gICAgICAgIClcbiAgICB9XG5cbiAgICBmdW4gZnJvbVRoZW1lKHRoZW1lOiBUaGVtZSwgZmxpcHBlZEF4aXM6IEJvb2xlYW4pOiBTdHlsZVNoZWV0IHtcbiAgICAgICAgdmFsIGhBeGlzVGhlbWUgPSB0aGVtZS5ob3Jpem9udGFsQXhpcyhmbGlwcGVkQXhpcylcbiA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nLCAnxZgnLCAnQycsICfHmCcsICfEticsICfHmicsICdCJywgJ8ecJywgJ8SSJywgJ8edJywgJ8SUJywgJ0EnLCAnRScsICfHnycsICfElicsICfEmCcsICfEmicsICfHoScsICc9JywgJzwnLCAnxKYnLCAnxKQnLCAnKycsICcmJywgJ8elJywgJ8enJywgJyMnLCAnPicsICfFgycsICfGiCcsICfFhScsICfHgicsICfFlCcsICfEhCcsICfGvicsICdUJywgJ1YnLCAnx5QnLCAnUycsICfEhicsICdSJywgJ8a9JywgJ1UnLCAnxIonLCAnxIgnLCAnUCcsICfEjCcsICdOJywgJ8WWJywgJ8WJJywgJ8eOJywgJ0snLCAnx5InLCAnxYcnLCAnSCcsICfHiScsICfGvycpLFxuICAgICAgICBsaXN0T2YoJ9G6JywgJ8SeJywgJ9KiJywgJ9G7JywgJ9KXJywgJ9G9JywgJ9G/JywgJ9KAJywgJ8ScJywgJ9KUJywgJ9KKJywgJ8OmJywgJ8SOJywgJ9KOJywgJ9KgJywgJ8SQJywgJ9OHJywgJ9KoJywgJ9OsJywgJ9OuJywgJ9OwJywgJ9OyJywgJ1EnLCAn07QnLCAnTycsICfTuScsICdNJywgJ9O8JywgJ9O+JywgJ0cnLCAnRCcsICfUhScsICfUhicsICfUjCcsICfUjicsICfUrCcsICfUqCcsICfUpicsICfUpCcsICfUoycsICfUnicsICfTqicsICfUnScsICfUmScsICfUlycsICfUlicsICfUlScsICfUkicsICfUjycsICfUmicsICfTqCcsICfTpicsICfTpCcsICfSvicsICfSvCcsICfSuicsICfSuCcsICfSticsICfDkCcsICfTgicsICfSsicsICfDkycsICfDlCcsICfDlScsICfDlicsICfSqicsICfDmCcsICfDkicsICfSpScsICfTgycsICfRticsICfToicsICdtJywgJ3cnLCAn050nLCAnwqknLCAn05onLCAn04UnLCAn05gnLCAn05YnLCAn05InLCAn05AnLCAn044nLCAn04snLCAn04knLCAnwq4nLCAnxKAnLCAn0aInLCAnxKInLCAnyKgnLCAnyKonLCAnyKwnLCAnyK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A/OiAwLjBcbiAgICAgICAgcmV0dXJuIEZBTUlMWV9DT0VGRklDSUVOVFtmb250RmFtaWx5XSA/OiBkZWZhdWx0RmFtaWx5Q29lZmZpY2llbnRcbiAgICB9XG5cbiAgICBwcml2YXRlIGZ1biBnZXRGYWNlQWRkaXRpdmUoZm9udDogRm9udCk6IERvdWJsZSB7XG4gICAgICAgIHJldHVybiB3aGVuIHtcbiAgICAgICAgICAgIGZvbnQuaXNCb2xkICYmIGZvbnQuaXNJdGFsaWMgLT4gMC45MTcyMTIwOTk1MDcwOTk5XG4gICAgICAgICAgICBmb250LmlzQm9sZCAmJiAhZm9udC5pc0l0YWxpYyAtPiAwLjY5MDgyMzg4OTAxODE2MDJcbiAgICAgICAgICAgICFmb250LmlzQm9sZCAmJiBmb250LmlzSXRhbGljIC0+IDAuMTc4MzE4ODYyMDczNjczOFxuICAgICAgICAgICAgZWxzZSAtPiAwLjBcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHByaXZhdGUgZnVuIGdldFNpemVDb2VmZmljaWVudChmb250OiBGb250KTogRG91YmxlIHtcbiAgICAgICAgcmV0dXJuIFNJWkVfQ09FRkZJQ0lFTlQgKiBmb250LnNpemUgLyBERUZBVUxUX0ZPTlRfU0laRVxuICAgIH1cblxuICAgIHByaXZhdGUgZnVuIGNvcnJlY3RQcmVkaWN0aW9uKHByZWRpY3RlZFdpZHRoOiBEb3VibGUsIHRleHRMZW5ndGg6IEludCwgZm9udDogRm9udCk6IERvdWJsZSB7XG4gICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICBwcmVkaWN0ZWRXaWR0aCArIHRleHRMZW5ndGggKiAoZ2V0RmFtaWx5QWRkaXRpdmUoZm9udCkgKyBnZXRGYWNlQWRkaXRpdmUoZm9udCkpXG4gICAgICAgICkgKiBnZXRTaXplQ29lZmZpY2llbnQoZm9udClcbiAgICB9XG5cbiAgICBmdW4gdGV4dFdpZHRoKHRleHQ6IFN0cmluZywgZm9udDogRm9udCk6IERvdWJs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luZGljZXMgPVxuICAgICAgICAgICAgICAgICAgICBTYW1wbGluZ1V0aWwuc2FtcGxlV2l0aG91dFJlcGxhY2VtZW50KHN0cmF0dW1TaXplLFxuICAgICAgICAgICAgICAgICAgICAgICAgc3RyYXR1bVNhbXBsZVNpemUsXG4gICAgICAgICAgICAgICAgICAgICAgICByYW5kLFxuICAgICAgICAgICAgICAgICAgICAgICAgeyBpbmRleFNldCAtPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICgwIHVudGlsIGdyb3VwSW5kaWNlcy5zaXplKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZmlsdGVyIHsgaW5kZXhTZXQuY29udGFpbnMoaXQpIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICB7IGluZGV4U2V0IC0+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKDAgdW50aWwgZ3JvdXBJbmRpY2VzLnNpemUpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5maWx0ZXIgeyBpIC0+ICFpbmRleFNldC5jb250YWlucyhpKSB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxuXG4gICAgICAgICAgICAgICAgZm9yIChpIGluIHNhbXBsZUdyb3VwSW5kaWNlcykge1xuICAgICAgICAgICAgICAgICAgICBwaWNrSW5kaWNlcy5hZGQoZ3JvdXBJbmRpY2VzW2ldKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBwb3B1bGF0aW9uLnNlbGVjdEluZGljZXMocGlja0luZGljZXMpXG4gICAgfVxuXG4gICAgY29tcGFuaW9uIG9iamVjdCB7XG4gICAgICAgIGludGVybmFsIGNvbnN0IHZhbCBBTElBUyA9IFwicmFuZG9tX3N0cmF0aWZpZWRcIlxuICAgICAgICBwcml2YXRlIGNvbnN0IHZhbCBERUZfTUlOX1NVQlNBTVBMRV9TSVpFID0g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cnQsIGkgKyAxKSlcbiAgICAgICAgICAgICAgICBzdGFydCA9IC0xXG4gICAgICAgICAgICAgICAgbGFzdFBvaW50ID0gbnVsbFxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChzdGFydCA+PSAwKSB7XG4gICAgICAgICAgICAvLyBub3QgY2xvc2VkXG4gICAgICAgICAgICByaW5ncy5hZGQocG9pbnRzLnN1Ykxpc3Qoc3RhcnQsIHBvaW50cy5zaXplKSlcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gcmluZ3NcbiAgICB9XG5cbiAgICBmdW4gY2FsY3VsYXRlUmluZ0xpbWl0cyhyaW5nczogTGlzdDxMaXN0PERvdWJsZVZlY3Rvcj4+LCB0b3RhbFBvaW50c0xpbWl0OiBJbnQpOiBMaXN0PEludD4ge1xuICAgICAgICB2YWwgdG90YWxBcmVhID0gcmluZ3MubWFwIHsgY2FsY3VsYXRlQXJlYShpdCkgfS5zdW0oKVxuXG4gICAgICAgIHZhbCBhcmVhUHJvY2VlZCA9IE11dGFibGVEb3VibGUoMC4wKVxuICAgICAgICB2YWwgcG9pbnRzUHJvY2VlZCA9IE11dGFibGVJbnRlZ2VyKDApXG5cbiAgICAgICAgcmV0dXJuIHJpbmdzLmluZGljZXNcbiAgICAgICAgICAgIC5hc1NlcXVlbmNlKClcbiAgICAgICAgICAgIC5tYXAgeyBQYWlyKGl0LCBjYWxjdWxhdGVBcmVhKHJpbmdzW2l0XSkpIH1cbiAgICAgICAgICAgIC5zb3J0ZWRXaXRoKGNvbXBhcmVCeTxQYWlyPCosIERvdWJsZT4+IHtcbiAgICAgICAgICAgICAgICBnZXRSaW5nQXJlYShcbiAgICAgICAgICAgICAgICAgICAgaXRcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICB9LnJldmVyc2VkKCkpXG4gICAgICAgICAgICAubWFwIHsgcCAtPlxuICAgICAgICAgICAgICAgIHZhciBsaW1pdCA9IG1pbihcbiAgICAgICAgICAgICAgICAgICAgKHAuc2Vjb25kIC8gKHRvdGFsQXJlYSAtIGFyZWFQcm9jZWVkLmdldCgpKSAqICh0b3RhbFBvaW50c0xpbWl0IC0gcG9pbnRzUHJvY2VlZC5nZXQoKSkpLnJvdW5kVG9JbnQoKSxcbiAgICAgICAgICAgICAgICAgICAgcmluZ3NbZ2V0UmluZ0luZGV4KHApXS5zaXplXG4gICAgICAgICAgICAgICAgKVxuXG4gICAgICAgICAgICAgICAgaWYgKGxpbWl0ID49IDQpIHtcbiAgICAgICAgICAgICAgICAgICAgYXJlYVByb2NlZWQuZ2V0QW5kQWRkKGdldFJpbmdBcmVhKHApKVxuICAgICAgICAgICAgICAgICAgICBwb2ludHNQcm9jZWVkLmdldEFuZEFkZChsaW1pdClcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBsaW1pdCA9IDBcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBQYWlyKGdldFJpbmdJbmRleChwKSwgbGltaXQpXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAuc29ydGVkV2l0aChjb21wYXJlQnkgeyBnZXRSaW5nSW5kZXgoaXQpIH0pXG4gICAgICAgICAgICAubWFwIHsgZ2V0UmluZ0xpbWl0KGl0KSB9XG4gICAgICAgICAgICAudG9MaXN0KClcbiAgICB9XG5cbiAgICBmdW4gZ2V0UmluZ0luZGV4KHBhaXI6IFBhaXI8SW50LCAqPik6IEludCB7XG4gICAgICAgIHJldHVybiBwYWlyLmZpcnN0XG4gICAgfVxuXG4gICAgcHJpdmF0ZSBmdW4gZ2V0UmluZ0FyZWEocGFpcjogUGFpcjwqLCBEb3VibGU+KTogRG91YmxlIHtcbiAgICAgICAgcmV0dXJuIHBhaXIuc2Vjb25kXG4gICAgfVxuXG4gICAgZnVuIGdldFJpbmdMaW1pdChwYWlyOiBQYWlyPCosIEludD4pOiBJbnQge1xuICAgICAgICByZXR1cm4gcGFpci5zZWNvbmRcbiAgICB9XG59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ICAgICBjYWxjdWxhdGVSaW5nTGltaXRzKHJpbmdzLCBzYW1wbGVTaXplKVxuXG4gICAgICAgIHZhbCBpbmRpY2VzID0gQXJyYXlMaXN0PEludD4oKVxuICAgICAgICB2YWwgcmluZ0Jhc2UgPSBNdXRhYmxlSW50ZWdlcigwKVxuXG4gICAgICAgICgwIHVudGlsIGxpbWl0cy5zaXplKVxuICAgICAgICAgICAgICAgIC5tYXAgeyBQYWlyKGl0LCBsaW1pdHNbaXRdKSB9XG4gICAgICAgICAgICAgICAgLmZvckVhY2ggeyBwIC0+XG4gICAgICAgICAgICAgICAgICAgIHNpbXBsaWZ5KHJpbmdzW2dldFJpbmdJbmRleChwKV0sIGdldFJpbmdMaW1pdChwKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZm9yRWFjaCB7IGluZGV4IC0+IGluZGljZXMuYWRkKHJpbmdCYXNlLmdldCgpICsgaW5kZXgpIH1cbiAgICAgICAgICAgICAgICAgICAgcmluZ0Jhc2UuZ2V0QW5kQWRkKHJpbmdzW2dldFJpbmdJbmRleChwKV0uc2l6ZSlcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHBvcHVsYXRpb24uc2VsZWN0SW5kaWNlcyhpbmRpY2VzKVxuICAgIH1cblxuICAgIGludGVybmFsIGNsYXNzIFZlcnRleFZ3U2FtcGxpbmcoc2FtcGxlU2l6ZTogSW50KSA6IFZlcnRleFNhbXBsaW5nKHNhbXBsZVNpemUpIHtcblxuICAgICAgICBvdmVycmlkZSB2YWwgZXhwcmVzc2lvblRleHQ6IFN0cmluZ1xuICAgICAgICAgICAgZ2V0KCkgPSBcInNhbXBsaW5nX1wiICsgQUxJQVMgKyBcIihcIiArXG4gICAgICAgICAgICAgICAgICAgIFwibj1cIiArIHNhbXBsZVNpemUgKyBcIilcIlxuXG4gICAgICAgIG92ZXJyaWRlIGZ1biBzaW1wbGlmeUludGVybmFsKHBvaW50czogTGlzdDxEb3VibGVWZWN0b3I+LCBsaW1pdDogSW50KTogTGlzdDxJbnQ+IHtcbiAgICAgICAgICAgIHJldHVybiBQb2x5bGluZVNpbXBsaWZpZXIudmlzdmFsaW5nYW1XaHlhdHQocG9pbnRzKS5zZXRDb3VudExpbWl0KGxpbWl0KS5pbmRpY2VzXG4gICAgICAgIH1cblxuICAgICAgICBjb21wYW5pb24gb2JqZWN0IHtcbiAgICAgICAgICAgIGNvbnN0IHZhbCBBTElBUyA9IFwidmVydGV4X3Z3XCJcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGludGVybmFsIGNsYXNzIFZlcnRleERwU2FtcGxpbmcoc2FtcGxlU2l6ZTogSW50KSA6IFZlcnRleFNhbXBsaW5nKHNhbXBsZVNpemUpIHtcblxuICAgICAgICBvdmVycmlkZSB2YWwgZXhwcmVzc2lvblRleHQ6IFN0cmluZ1xuICAgICAgICAgICAgZ2V0KCkgPSBcInNhbXBsaW5nX1wiICsgQUxJQVMgKyBcIihcIiArXG4gICAgICAgICAgICAgICAgICAgIFwibj1cIiArIHNhbXBsZVNpemUgKyBcIilcIlxuXG4gICAgICAgIG92ZXJyaWRlIGZ1biBzaW1wbGlmeUludGVybmFsKHBvaW50czogTGlzdDxEb3VibGVWZWN0b3I+LCBsaW1pdDogSW50KTogTGlzdDxJbnQ+IHtcbiAgICAgICAgICAgIHJldHVybiBQb2x5bGluZVNpbXBsaWZpZXIuZG91Z2xhc1BldWNrZXIocG9pbnRzKS5zZXRDb3VudExpbWl0KGxpbWl0KS5pbmRpY2VzXG4gICAgICAgIH1cblxuICAgICAgICBjb21wYW5pb24gb2JqZWN0IHtcbiAgICAgICAgICAgIGNvbnN0IHZhbCBBTElBUyA9IFwidmVydGV4X2RwXCJcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGludGVybmFsIGNsYXNzIERvdWJsZVZlY3RvckNvbXBvbmVudHNMaXN0KHByaXZhdGUgdmFsIG15WFZhbHVlczogTGlzdDxBbnk+LCBwcml2YXRlIHZhbCBteVlWYWx1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UlHSFQsIE5VTUVSSUNfSURFTlRJVFkpXG4gICAgICAgICAgICB0aGlzLnB1dChCSU5XSURUSCwgTlVNRVJJQ19JREVOVElUWSlcbiAgICAgICAgICAgIHRoaXMucHV0KFZJT0xJTldJRFRILCBOVU1FUklDX0lERU5USVRZKVxuICAgICAgICAgICAgdGhpcy5wdXQoSU5URVJDRVBULCBOVU1FUklDX0lERU5USVRZKVxuICAgICAgICAgICAgdGhpcy5wdXQoU0xPUEUsIE5VTUVSSUNfSURFTlRJVFkpXG4gICAgICAgICAgICB0aGlzLnB1dChYSU5URVJDRVBULCBOVU1FUklDX0lERU5USVRZKVxuICAgICAgICAgICAgdGhpcy5wdXQoWUlOVEVSQ0VQVCwgTlVNRVJJQ19JREVOVElUWSlcbiAgICAgICAgICAgIHRoaXMucHV0KExPV0VSLCBOVU1FUklDX0lERU5USVRZKVxuICAgICAgICAgICAgdGhpcy5wdXQoTUlERExFLCBOVU1FUklDX0lERU5USVRZKVxuICAgICAgICAgICAgdGhpcy5wdXQoVVBQRVIsIE5VTUVSSUNfSURFTlRJVFkpXG4gICAgICAgICAgICB0aGlzLnB1dChTQU1QTEUsIE5VTUVSSUNfSURFTlRJVFkpXG4gICAgICAgICAgICB0aGlzLnB1dChRVUFOVElMRSwgTlVNRVJJQ19JREVOVElUWSlcblxuICAgICAgICAgICAgdGhpcy5wdXQoTUFQX0lELCBjcmVhdGVPYmplY3RJZGVudGl0eSgpKVxuICAgICAgICAgICAgdGhpcy5wdXQoRlJBTUUsIGNyZWF0ZVN0cmluZ0lkZW50aXR5KCkpXG5cbiAgICAgICAgICAgIHRoaXMucHV0KFNQRUVELCBOVU1FUklDX0lERU5USVRZKVxuICAgICAgICAgICAgdGhpcy5wdXQoRkxPVywgTlVNRVJJQ19JREVOVElUWSlcblxuICAgICAgICAgICAgdGhpcy5wdXQoWE1JTiwgTlVNRVJJQ19JREVOVElUWSlcbiAgICAgICAgICAgIHRoaXMucHV0KFhNQVgsIE5VTUVSSUNfSUR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gICAgICAgICAgICBvdmVycmlkZSBmdW4gY3JlYXRlQ29udGludW91c01hcHBlcihcbiAgICAgICAgICAgICAgICAgICAgZG9tYWluOiBEb3VibGVTcGFuLFxuICAgICAgICAgICAgICAgICAgICB0cmFuczogQ29udGludW91c1RyYW5zZm9ybVxuICAgICAgICAgICAgICAgICk6IEd1aWRlTWFwcGVyPERvdWJsZT4ge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gR3VpZGVNYXBwZXJzLk5VTUVSSUNfVU5ERUZJTkVEXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBwcml2YXRlIHZhbCBOVU1FUklDX0lERU5USVRZOiBNYXBwZXJQcm92aWRlcjxEb3VibGU+ID0gb2JqZWN0IDogTWFwcGVyUHJvdmlkZXI8RG91YmxlPiB7XG4gICAgICAgICAgICAgICAgb3ZlcnJpZGUgZnVuIGNyZWF0ZURpc2NyZXRlTWFwcGVyKGRpc2NyZXRlVHJhbnNmb3JtOiBEaXNjcmV0ZVRyYW5zZm9ybSk6IFNjYWxlTWFwcGVyPERvdWJsZT4ge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gTWFwcGVycy5JREVOVElUWVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIG92ZXJyaWRlIGZ1biBjcmVhdGVDb250aW51b3VzTWFwcGVyKFxuICAgICAgICAgICAgICAgICAgICBkb21haW46IERvdWJsZVNwYW4sXG4gICAgICAgICAgICAgICAgICAgIHRyYW5zOiBDb250aW51b3VzVHJhbnNmb3JtXG4gICAgICAgICAgICAgICAgKTogR3VpZGVNYXBwZXI8RG91YmxlPiB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBHdWlkZU1hcHBlcnMuSURFTlRJVFlcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG59XG4iLCIvKlxuICogQ29weXJpZ2h0IChjKSAyMDE5LiBKZXRC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SBiLm15RGlzY3JldGVEb21haW5SZXZlcnNlXG5cbiAgICAgICAgb3ZlcnJpZGUgdmFsIGJyZWFrczogTGlzdDxBbnk+PyA9IGIubXlCcmVha3M/LmxldCB7IEFycmF5TGlzdChpdCkgfVxuICAgICAgICBvdmVycmlkZSB2YWwgbGltaXRzOiBMaXN0PEFueT8+PyA9IGIubXlMaW1pdHM/LmxldCB7IEFycmF5TGlzdChpdCkgfVxuXG4gICAgICAgIG92ZXJyaWRlIHZhbCBjb250aW51b3VzVHJhbnNmb3JtOiBDb250aW51b3VzVHJhbnNmb3JtID0gYi5teUNvbnRpbnVvdXNUcmFuc2Zvcm1cbiAgICAgICAgb3ZlcnJpZGUgdmFsIGF4aXNPcmllbnRhdGlvbjogT3JpZW50YXRpb24/ID0gd2hlbiAoYi5hZXMpIHtcbiAgICAgICAgICAgIEFlcy5YIC0+IHtcbiAgICAgICAgICAgICAgICB2YWwgb3JpZW50YXRpb24gPSBiLmF4aXNPcmllbnRhdGlvbiEhXG4gICAgICAgICAgICAgICAgcmVxdWlyZShvcmllbnRhdGlvbi5pc0hvcml6b250YWwpIHsgXCJJbGxlZ2FsIFgtYXhpcyBwb3NpdGlvbjogJG9yaWVudGF0aW9uXCIgfVxuICAgICAgICAgICAgICAgIG9yaWVudGF0aW9uXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIEFlcy5ZIC0+IHtcbiAgICAgICAgICAgICAgICB2YWwgb3JpZW50YXRpb24gPSBiLmF4aXNPcmllbnRhdGlvbiEhXG4gICAgICAgICAgICAgICAgcmVxdWlyZSghb3JpZW50YXRpb24uaXNIb3Jpem9udGFsKSB7IFwiSWxsZWdhbCBZLWF4aXMgcG9zaXRpb246ICRvcmllbnRhdGlvblwiIH1cbiAgICAgICAgICAgICAgICBvcmllbnRhdGlvblxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBlbHNlIC0+IG51bGxcbiAgICAgICAgfVxuXG5cbiAgICAgICAgcHJpdmF0ZSBmdW4gc2NhbGVOYW1lKHZhcmlhYmxlOiBEYXRhRnJhbWUuVmFyaWFibGUpOiBTdHJpbmcge1xuICAgICAgICAgICAgcmV0dXJuIG15TmFtZSA/OiB2YXJpYWJsZS5sYWJlbFxuICAgICAgICB9XG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIERpc2NyZXRlIGRvbWFpbi5cbiAgICAgICAgICovXG4gICAgICAgIG92ZXJyaWRlIGZ1biBjcmVhdGVTY2FsZShkZWZhdWx0TmFtZTogU3RyaW5nLCBkaXNjcmV0ZVRyYW5zZm9ybTogRGlzY3JldGVUcmFuc2Zvcm0pOiBTY2FsZTxUPiB7XG4gICAgICAgICAgICB2YXIgc2NhbGU6IFNjYWxlPFQ+ID0gU2NhbGVzLmRpc2NyZXRlRG9tYWluKFxuICAgICAgICAgICAgICAgIG15TmFtZSA/OiBkZWZhdWx0TmFtZSxcbiAgICAgICAgICAgICAgICBkaXNjcmV0ZVRyYW5zZm9ybSxcbiAgICAgICAgICAgIClcblxuICAgICAgICAgICAgcmV0dXJuIGNvbXBsZXRlU2NhbGUoc2NhbGUpXG4gICAgICAgIH1cblxuICAgICAgICBvdmVycmlkZSBmdW4gY3JlYXRlU2NhbGUoXG4gICAgICAgICAgICBkZWZhdWx0TmFtZTogU3RyaW5nLFxuICAgICAgICAgICAgY29udGludW91c1RyYW5zZm9ybTogQ29udGludW91c1RyYW5zZm9ybSxcbiAgICAgICAgICAgIGNvbnRpbnVvdXNSYW5nZTogQm9vbGVhbixcbiAgICAgICAgICAgIGd1aWRlQnJlYWtzOiBXaXRoR3VpZGVCcmVha3M8QW55Pj9cbiAgICAgICAgKTogU2NhbGU8VD4ge1xuICAgICAgICAgICAgdmFsIG5hbWUgPSBteU5hbWUgPzogZGVmYXVsdE5hbWVcbiAgICAgICAgICAgIHZhciBzY2FsZTogU2NhbGU8VD5cblxuICAgICAgICAgICAgLy8gY29udGludW91cyAobnVtZXJpYykgZG9tYWluXG4gICAgICAgICAgICBzY2FsZSA9IFNjYWxlcy5jb250aW51b3VzRG9tYWluKFxuICAgICAgICAgICAgICAgIG5hbWUsXG4gICAgICAgICAgICAgICAgY29udGludW91c1JhbmdlID0gY29udGludW91c1JhbmdlIHx8IG15QWVzLmlzTnVtZXJpY1xuICAgICAgICAgICAgKVxuXG4gICAgICAgICAgICBndWlkZUJyZWFrcz8ubGV0IHtcbiAgICAgICAgICAgICAgICBzY2FsZSA9IHNjYWxlLndpdGgoKVxuICAgICAgICAgICAgICAgICAgICAuYnJlYWtzKGl0LmJyZWFrcylcbiAgICAgICAgICAgICAgICAgICAgLmxhYmVsRm9ybWF0dGVyKGl0LmZvcm1hdHRlcilcbiAgICAgICAgICAgICAgICAgICAgLmJ1aWxkKClcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgc2NhbGUgPSBzY2FsZS53aXRoKClcbiAgICAgICAgICAgICAgICAuY29udGludW91c1RyYW5zZm9ybShjb250aW51b3VzVHJhbnNmb3JtKVxuICAgICAgICAgICAgICAgIC5idWlsZCgpXG5cbiAgICAgICAgICAgIGlmIChteUJyZWFrc0dlbmVyYXRvciAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgc2NhbGUgPSBzY2FsZS53aXRoKClcbiAgICAgICAgICAgICAgICAgICAgLmJyZWFrc0dlbmVyYXRvcihteUJyZWFrc0dlbmVyYXRvcilcbiAgICAgICAgICAgICAgICAgICAgLmJ1aWxkKClcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIGNvbXBsZXRlU2NhbGUoc2NhbGUpXG4gICAgICAgIH1cblxuICAgICAgICBwcml2YXRlIGZ1biBjb21wbGV0ZVNjYWxlKHNjYWxlOiBTY2FsZTxUPik6IFNjYWxlPFQ+IHtcbiAgICAgICAgICAgIHZhbCB3aXRoID0gc2NhbGUud2l0aCgpXG4gICAgICAgICAgICBpZiAoYnJlYWtzICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICB3aXRoLmJyZWFrcyhicmVha3MpXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAobXlMYWJlbHMgIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIHdpdGgubGFiZWxzKG15TGFiZWxzKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKG15TGFiZWxGb3JtYXQgIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIHdpdGgubGFiZWxGb3JtYXR0ZXIoU3RyaW5nRm9ybWF0LmZvck9uZUFyZyhteUxhYmVsRm9ybWF0KTo6Zm9ybWF0KVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKG15TXVsdGlwbGljYXRpdmVFeHBhbmQgIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIHdpdGgubXVsdGlwbGljYXRpdmVFeHBhbmQobXlNdWx0aXBsaWNhdGl2ZUV4cGFuZClcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChteUFkZGl0aXZlRXhwYW5kICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICB3aXRoLmFkZGl0aXZlRXhwYW5kKG15QWRkaXRpdmVFeHBhbmQpXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gd2l0aC5idWlsZCgpXG4gICAgICAgIH1cblxuICAgICAgICBwcml2YXRlIGZ1biBhYnNlbnRNYXBwZXIoYHZhcmA6IERhdGFGcmFtZS5WYXJpYWJsZSk6IFNjYWxlTWFwcGVyPFQ+IHtcbiAgICAgICAgICAgIC8vIG1hcHBlciBmb3IgZW1wdHkgZGF0YSBpcyBhIHNwZWNpYWwgY2FzZSAtIHNob3VsZCBuZXZlciBiZSB1c2VkXG4gICAgICAgICAgICByZXR1cm4gb2JqZWN0IDogU2NhbGVNYXBwZXI8VD4ge1xuICAgICAgICAgICAgICAgIG92ZXJyaWRlIGZ1biBpbnZva2UodjogRG91YmxlPyk6IFQ/IHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgSWxsZWdhbFN0YXRlRXhjZXB0aW9uKFwiTWFwc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xuICAgICAgICAgICAgZG9tYWluLFxuICAgICAgICAgICAgREVGX0dSQURJRU5UX0xPVyxcbiAgICAgICAgICAgIERFRl9HUkFESUVOVF9ISUdILFxuICAgICAgICAgICAgTkFfVkFMVUUsXG4gICAgICAgICAgICBhbHBoYSA9IDEuMFxuICAgICAgICApXG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQWxwaGEgY2hhbm5lbCBbMC4uMV0gKDAgLSB0cmFuc3BhcmVudCBhbmQgMSAtIG9wYXF1ZSkuXG4gICAgICovXG4gICAgZnVuIGdyYWRpZW50KFxuICAgICAgICBkb21haW46IERvdWJsZVNwYW4sXG4gICAgICAgIGxvdzogQ29sb3IsXG4gICAgICAgIGhpZ2g6IENvbG9yLFxuICAgICAgICBuYUNvbG9yOiBDb2xvcixcbiAgICAgICAgYWxwaGE6IERvdWJsZSA9IDEuMFxuICAgICk6IChEb3VibGU/KSAtPiBDb2xvciB7XG4gICAgICAgIHJldHVybiBncmFkaWVudEhTVihcbiAgICAgICAgICAgIGRvbWFpbixcbiAgICAgICAgICAgIENvbG9ycy5oc3ZGcm9tUmdiKGxvdyksXG4gICAgICAgICAgICBDb2xvcnMuaHN2RnJvbVJnYihoaWdoKSxcbiAgICAgICAgICAgIHRydWUsXG4gICAgICAgICAgICBuYUNvbG9yLCBhbHBoYVxuICAgICAgICApXG4gICAgfVxuXG4gICAgZnVuIGdyYWRpZW50SFNWKFxuICAgICAgICBkb21haW46IERvdWJsZVNwYW4sXG4gICAgICAgIGxvd0hTVjogSFNWLFxuICAgICAgICBoaWdoSFNWOiBIU1YsXG4gICAgICAgIGF1dG9IdWVEaXJlY3Rpb246IEJvb2xlYW4sXG4gICAgICAgIG5hQ29sb3I6IENvbG9yLFxuICAgICAgICBhbHBoYTogRG91YmxlID0gMS4wXG4gICAgKTogKERvdWJsZT8pIC0+IENvbG9yIHtcblxuICAgICAgICB2YXIgbG93SHVlID0gbG93SFNWLmhcbiAgICAgICAgdmFyIGhpZ2hIdWUgPSBoaWdoSFNWLmhcblxuICAgICAgICB2YWwgbG93UyA9IGxvd0hTVi5zXG4gICAgICAgIHZhbCBoaWdoUyA9IGhpZ2hIU1Yuc1xuXG4gICAgICAgIC8vIE5vIGh1ZSBpZiBzYXR1cmF0aW9uIGlzIG5lYXIgemVyb1xuICAgICAgICBpZiAobG93UyA8IDAuMDAwMSkge1xuICAgICAgICAgICAgbG93SHVlID0gaGlnaEh1ZVxuICAgICAgICB9XG4gICAgICAgIGlmIChoaWdoUyA8IDAuMDAwMSkge1xuICAgICAgICAgICAgaGlnaEh1ZSA9IGxvd0h1ZVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGF1dG9IdWVEaXJlY3Rpb24pIHtcbiAgICAgICAgICAgIHZhbCBkSCA9IGFicyhoaWdoSHVlIC0gbG93SHVlKVxuICAgICAgICAgICAgaWYgKGRIID4gMTgwKSB7XG4gICAgICAgICAgICAgICAgaWYgKGhpZ2hIdWUgPj0gbG93SHVlKSB7XG4gICAgICAgICAgICAgICAgICAgIGxvd0h1ZSArPSAzNjAuMFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGhpZ2hIdWUgKz0gMzYwLjBcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICB2YWwgbWFwcGVySCA9IE1hcHBlcnMubGluZWFyKGRvbWFpbiwgbG93SHVlLCBoaWdoSHVlLCBudWxsKVxuICAgICAgICB2YWwgbWFwcGVyUyA9IE1hcHBlcnMubGluZWFyKGRvbWFpbiwgbG93UywgaGlnaFMsIG51bGwpXG4gICAgICAgIHZhbCBtYXBwZXJWID0gTWFwcGVycy5saW5lYXIoZG9tYWluLCBsb3dIU1YudiwgaGlnaEhTVi52LCBudWxsKVxuXG4gICAgICAgIHJldHVybiB7IGlucHV0IC0+XG4gICAgICAgICAgICBpZiAoaW5wdXQgPT0gbnVsbCB8fCAhZG9tYWluLmNvbnRhaW5zKGl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FxuICAgICAgICBkaXNjcmV0ZVRyYW5zZm9ybTogRGlzY3JldGVUcmFuc2Zvcm0sXG4gICAgICAgIG91dHB1dFJhbmdlOiBEb3VibGVTcGFuLFxuICAgICAgICBuYVZhbHVlOiBEb3VibGVcbiAgICApOiBTY2FsZU1hcHBlcjxEb3VibGU+IHtcblxuICAgICAgICB2YWwgbWFwcGVyID0gTWFwcGVycy5kaXNjcmV0ZVRvQ29udGludW91cyhkaXNjcmV0ZVRyYW5zZm9ybS5lZmZlY3RpdmVEb21haW5UcmFuc2Zvcm1lZCwgb3V0cHV0UmFuZ2UsIG5hVmFsdWUpXG4gICAgICAgIHJldHVybiBHdWlkZU1hcHBlcldpdGhHdWlkZUJyZWFrcyhcbiAgICAgICAgICAgIG1hcHBlcixcbiAgICAgICAgICAgIGRpc2NyZXRlVHJhbnNmb3JtLmVmZmVjdGl2ZURvbWFpbixcbiAgICAgICAgICAgIGZvcm1hdHRlciA9IHsgdjogQW55IC0+IHYudG9TdHJpbmcoKSB9XG4gICAgICAgIClcbiAgICB9XG5cbiAgICBmdW4gY29udGludW91c1RvQ29udGludW91cyhcbiAgICAgICAgZG9tYWluOiBEb3VibGVTcGFuLFxuICAgICAgICByYW5nZTogRG91YmxlU3BhbixcbiAgICAgICAgbmFWYWx1ZTogRG91YmxlXG4gICAgKTogR3VpZGVNYXBwZXI8RG91YmxlPiB7XG4gICAgICAgIHJldHVybiBhc0NvbnRpbnVvdXMoXG4gICAgICAgICAgICBNYXBwZXJzLmxpbmVhcihcbiAgICAgICAgICAgICAgICBkb21haW4sXG4gICAgICAgICAgICAgICAgcmFuZ2UsXG4gICAgICAgICAgICAgICAgbmFWYWx1ZVxuICAgICAgICAgICAgKVxuICAgICAgICApXG4gICAgfVxuXG4gICAgZnVuIDxUPiBhc05vdENvbnRpbnVvdXMobWFwcGVyOiBTY2FsZU1hcHBlcjxUPik6IEd1aWRlTWFwcGVyPFQ+IHtcbiAgICAgICAgcmV0dXJuIEd1aWRlTWFwc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nVsbCAmJiBjb2xvckNvdW50IDw9IFNldDIubWF4Q29sb3JzKSBTZXQyXG4gICAgICAgICAgICAgICAgZWxzZSBTZXQzXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIC0+IGNvbG9yU2NoZW1lQnlJbmRleChwYWxldHRlVHlwZSwgMClcbiAgICAgICAgfVxuICAgIH1cblxuXG4gICAgY29tcGFuaW9uIG9iamVjdCB7XG4gICAgICAgIHByaXZhdGUgZnVuIHBhbGV0dGVUeXBlKG5hbWU6IFN0cmluZz8pOiBDb2xvclBhbGV0dGUuVHlwZSB7XG4gICAgICAgICAgICBpZiAobmFtZSA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIFNFUVVFTlRJQUxcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiB3aGVuIChuYW1lKSB7XG4gICAgICAgICAgICAgICAgXCJzZXFcIiAtPiBTRVFVRU5USUFMXG4gICAgICAgICAgICAgICAgXCJkaXZcIiAtPiBESVZFUkdJTkdcbiAgICAgICAgICAgICAgICBcInF1YWxcIiAtPiBRVUFMSVRBVElWRVxuICAgICAgICAgICAgICAgIGVsc2UgLT4gdGhyb3cgSWxsZWdhbEFyZ3VtZW50RXhjZXB0aW9uKFxuICAgICAgICAgICAgICAgICAgICBcIlBhbGV0dGUgdHlwZSBleHBlY3RlZCBvbmUgb2YgJ3NlcScgKHNlcXVlbnRpYWwpLCAnZGl2JyAoZGl2ZXJnaW5nKSBvciAncXVhbCcgKHF1YWxpdGF0aXZlKSBidXQgd2FzOiAnJG5hbWUnXCJcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBwcml2YXRlIGZ1biBjb2xvclNjaGVtZUJ5TmFtZShwYWxldHRlVHlwZTogQ29sb3JQYWxldHRlLlR5cGUsIHBhbGV0dGVOYW1lOiBTdHJpbmcpOiBDb2xvclNjaGVtZSB7XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHJldHVybiB3aGVuIChwYWxldHRlVHlwZSkge1xuICAgICAgICAgICAgICAgICAgICBTRVFVRU5USUFMIC0+IENvbG9yUGFsZXR0ZS5TZXF1ZW50aWFsLnZhbHVlT2YocGFsZXR0ZU5hbWUpXG4gICAgICAgICAgICAgICAgICAgIERJVkVSR0lORyAtPiBDb2xvclBhbGV0dGUuRGl2ZXJnaW5nLnZhbHVlT2YocGFsZXR0ZU5hbWUpXG4gICAgICAgICAgICAgICAgICAgIFFVQUxJVEFUSVZFIC0+IENvbG9yUGFsZXR0ZS5RdWFsaXRhdGl2ZS52YWx1ZU9mKHBhbGV0dGVOYW1lKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gY2F0Y2ggKGlnbm9yZTogSWxsZWdhbEFyZ3VtZW50RXhjZXB0aW9uKSB7XG4gICAgICAgICAgICAgICAgLy8gRW51bSB0eXBlIGhhcyBubyBjb25zdGFudCB3aXRoIHRoZSBzcGVjaWZpZWQgbmFtZSBlcnJvci5cbiAgICAgICAgICAgICAgICAvLyBSZXBsYWNlIGdlbmVyaWMgZXJyb3IgbWFzc2FnZSB3aXRoIHNwZWNpZmljIG9uZVxuICAgICAgICAgICAgICAgIHRocm93IElsbGVnYWxBcmd1bWVudEV4Y2VwdGlvbihjYW50RmluZFBhbGV0dGVFcnJvcihwYWxldHRlTmFtZSkpXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBwcml2YXRlIGZ1biBjYW50RmluZFBhbGV0dGVFcnJvcihwYWxldHRlTmFtZTogU3RyaW5nKTogU3RyaW5nIHtcbiAgICAgICAgICAgIHJldHVybiBcIlwiXCJcbiAgICAgICAgICAgICAgICB8QnJld2VyIHBhbGV0dGUgJyRwYWxldHRlTmFtZScgd2FzIG5vdCBmb3VuZC4gXG4gICAgICAgICAgICAgICAgfFZhbGlkIHBhbGV0dGUgbmFtZXMgYXJlOiBcbiAgICAgICAgICAgICAgICB8ICAgVHl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AgICAgICAgbG93RG9tYWluIHRvIGxvd01hcHBlcixcbiAgICAgICAgICAgIGhpZ2hEb21haW4gdG8gaGlnaE1hcHBlclxuICAgICAgICApXG5cbiAgICAgICAgZnVuIGdldE1hcHBlcih2OiBEb3VibGU/KTogKChEb3VibGU/KSAtPiBDb2xvcik/IHtcbiAgICAgICAgICAgIHZhciBmOiAoKERvdWJsZT8pIC0+IENvbG9yKT8gPSBudWxsXG4gICAgICAgICAgICBpZiAoU2VyaWVzVXRpbC5pc0Zpbml0ZSh2KSkge1xuICAgICAgICAgICAgICAgIHZhciBmU3BhbiA9IERvdWJsZS5OYU5cbiAgICAgICAgICAgICAgICBmb3IgKHJhbmdlIGluIHJhbmdlTWFwLmtleXMpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJhbmdlLmNvbnRhaW5zKHYhISkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbCBzcGFuID0gcmFuZ2UudXBwZXJFbmQgLSByYW5nZS5sb3dlckVuZFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gdHJ5IHRvIGF2b2lkIDAtbGVuZ3RoIHJhbmdlc1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gYnV0IHByZWZlciBzaG9ydGVyIHJhbmdlc1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGYgPT0gbnVsbCB8fCBmU3BhbiA9PSAwLjApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmID0gcmFuZ2VNYXAuZ2V0KHJhbmdlKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZTcGFuID0gc3BhblxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChzcGFuIDwgZlNwYW4gJiYgc3BhbiA+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmID0gcmFuZ2VNYXAuZ2V0KHJhbmdlKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZTcGFuID0gc3BhblxuICAgICAgICAgICAgIC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HVudGlsIHN1YmRvbWFpbnNDb3VudClcbiAgICAgICAgICAgICAgICAubWFwIHsgZG9tYWluLmxvd2VyRW5kICsgc3ViZG9tYWluTGVuZ3RoICogaXQgfSArXG4gICAgICAgICAgICAgICAgICAgIGxpc3RPZihkb21haW4udXBwZXJFbmQpIC8vIFRoZSBsYXN0IFwiZW5kXCIgc2hvdWxkIGJlIGV4YWN0LlxuICAgICAgICAgICAgdmFsIG1hcHBlcnMgPSBzdWJkb21haW5FbmRzLnppcChjb2xvcnMpXG4gICAgICAgICAgICAgICAgLndpbmRvd2VkKDIpXG4gICAgICAgICAgICAgICAgLm1hcCB7IChsb3csIGhpZ2gpIC0+XG4gICAgICAgICAgICAgICAgICAgIHZhbCAobG93VmFsdWUsIGxvd0NvbG9yKSA9IGxvd1xuICAgICAgICAgICAgICAgICAgICB2YWwgKGhpZ2hWYWx1ZSwgaGlnaENvbG9yKSA9IGhpZ2hcbiAgICAgICAgICAgICAgICAgICAgdmFsIHN1YmRvbWFpbiA9IERvdWJsZVNwYW4obG93VmFsdWUsIGhpZ2hWYWx1ZSlcbiAgICAgICAgICAgICAgICAgICAgQ29sb3JNYXBwZXIuZ3JhZGllbnQoc3ViZG9tYWluLCBsb3dDb2xvciwgaGlnaENvbG9yLCBuYUNvbG9yLCBhbHBoYSlcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiB7IHZhbHVlIC0+XG4gICAgICAgICAgICAgICAgd2hlbiB7XG4gICAgICAgICAgICAgICAgICAgIHZhbHVlID09IG51bGwgfHwgIXZhbHVlLmlzRmluaXRlKCkgLT4gbmFDb2xvclxuICAgICAgICAgICAgICAgICAgICB2YWx1ZSA8IHN1YmRvbWFpbkVuZHMuZmlyc3QoKSB8fCB2YWx1ZSA+IHN1YmRvbWFpbkVuZHMubGFzdCgpIC0+IG5hQ29sb3JcbiAgICAgICAgICAgICAgICAgICAgZWxzZSAtPiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YWwg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BcbiAgICAgICAgcHJpdmF0ZSBjb25zdCB2YWwgREVGX1NUQVJUX0hVRSA9IDAuMFxuICAgICAgICBwcml2YXRlIHZhbCBERUZfSFVFX1JBTkdFID0gRG91YmxlU3BhbigxNS4wLCAzNzUuMCkgLy8gZ2dwbG90MiAoUik6IGMoMCwgMzYwKSArIDE1XG5cbiAgICAgICAgdmFsIERFRkFVTFQgPSBDb2xvckh1ZU1hcHBlclByb3ZpZGVyKFxuICAgICAgICAgICAgbnVsbCxcbiAgICAgICAgICAgIG51bGwsXG4gICAgICAgICAgICBudWxsLFxuICAgICAgICAgICAgbnVsbCxcbiAgICAgICAgICAgIG51bGwsXG4gICAgICAgICAgICBDb2xvci5HUkFZXG4gICAgICAgIClcblxuICAgICAgICBwcml2YXRlIGZ1biBub3JtYWxpemVIdWVSYW5nZShodWVSYW5nZTogTGlzdDxEb3VibGU+Pyk6IERvdWJsZVNwYW4ge1xuICAgICAgICAgICAgcmV0dXJuIGlmIChodWVSYW5nZSA9PSBudWxsIHx8IGh1ZVJhbmdlLnNpemUgIT0gMikge1xuICAgICAgICAgICAgICAgIERFRl9IVUVfUkFOR0VcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgRG91YmxlU3BhbihcbiAgICAgICAgICAgICAgICAgICAgbWluKGh1ZVJhbmdlWzBdLCBodWVSYW5nZVsxXSksXG4gICAgICAgICAgICAgICAgICAgIG1heChodWVSYW5nZVswXSwgaHVlUmFuZ2VbMV0pXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxufVxuIiwiLypcbiAqIENvcHlyaWdodCAoYykgMjAxOS4gSmV0QnJhaW5zIHMuci5vLlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgdGhlIE1JVCBsaWNlbnNlIHRoYXQgY2FuIGJlIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUuXG4gKi9cblxucGF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HN2SW50ZXJ2YWxzLCBhdXRvSHVlRGlyZWN0aW9uLCBuYUNvbG9yKVxuXG4gICAgICAgICAgICByZXR1cm4geyB2OiBEb3VibGU/IC0+XG4gICAgICAgICAgICAgICAgaWYgKHYgPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICBuYUNvbG9yXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdmFsIG1hcHBlciA9IGNvbG9yTWFwcGVyc1BlclN1YkRvbWFpbi5maW5kIHsgaXQuZmlyc3QuY29udGFpbnModikgfT8uc2Vjb25kXG4gICAgICAgICAgICAgICAgICAgIG1hcHBlcj8uaW52b2tlKHYpID86IG5hQ29sb3JcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBwcml2YXRlIGZ1biBjcmVhdGVDb2xvck1hcHBlcnNQZXJTdWJEb21haW4oXG4gICAgICAgICAgICBkb21haW46IERvdWJsZVNwYW4sXG4gICAgICAgICAgICBoc3ZJbnRlcnZhbHM6IExpc3Q8UGFpcjxIU1YsIEhTVj4+LFxuICAgICAgICAgICAgYXV0b0h1ZURpcmVjdGlvbjogQm9vbGVhbixcbiAgICAgICAgICAgIG5hQ29sb3I6IENvbG9yXG4gICAgICAgICk6IExpc3Q8UGFpcjxEb3VibGVTcGFuLCAoRG91YmxlPykgLT4gQ29sb3I+PiB7XG4gICAgICAgICAgICB2YWwgc3ViRG9tYWlucyA9IHNwbGl0Q29udGludW91c0RvbWFpbihkb21haW4sIGhzdkludGVydmFscylcblxuICAgICAgICAgICAgcmV0dXJuIHN1YkRvbWFpbnMuemlwKGhzdkludGVydmFscykubWFwIHtcbiAgICAgICAgICAgICAgICBAU3VwcHJlc3MoXCJOQU1FX1NIQURPV0lOR1wiKVxuICAgICAgICAgICAgICAgIHZhbCBkb21haW4gPSBpdC5maXJzdFxuICAgICAgICAgICAgICAgIHZhbCBoc3ZJbnRlcnZhbCA9IGl0LnNlY29uZFxuICAgICAgICAgICAgICAgIFBhaXIoXG4gICAgICAgICAgICAgICAgICAgIGRvbWFpbixcbiAgICAgICAgICAgICAgICAgICAgQ29sb3JNYXBwZXIuZ3JhZGllbnRIU1YoXG4gICAgICAgICAgICAgICAgICAgICAgICBkb21haW4sXG4gICAgICAgICAgICAgICAgICAgICAgICBoc3ZJbnRlcnZhbC5maXJzdCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGhzdkludGVydmFsLnNlY29uZCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGF1dG9IdWVEaXJlY3Rpb24sXG4gICAgICAgICAgICAgICAgICAgICAgICBuYUNvbG9yLFxuICAgICAgICAgICAgICAgICAgICAgICAgYWxwaGEgPSAxLjBcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHByaXZhdGUgZnVuIHNwbGl0Q29udGludW91c0RvbWFpbihcbiAgICAgICAgICAgIGRvbWFpbjogRG91YmxlU3BhbixcbiAgICAgICAgICAgIGhzdkludGVydmFsczogTGlzdDxQYWlyPEhTViwgSFNWPj5cbiAgICAgICAgKTogTGlzdDxEb3VibGVTcGFuPiB7XG4gICAgICAgICAgICB2YWwgZG9tYWluU2l6ZSA9IGRvbWFpbi51cHBlckVuZCAtIGRvbWFpbi5sb3dlckVuZFxuICAgICAgICAgICAgdmFsIGh1ZUludGVydmFsU2l6ZUxpc3QgPSBoc3ZJbnRlcnZhbHMubWFwIHtcbiAgICAgICAgICAgICAgICBhYnMoaXQuZmlyc3QuaCAtIGl0LnNlY29uZC5oKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFsIGh1ZUludGVydmFsc1RvdGFsU2l6ZSA9IGh1ZUludGVydmFsU2l6ZUxpc3Quc3VtKClcblxuICAgICAgICAgICAgdmFsIGRvbWFpblRvSHVlSW50ZXZhbFJhdGlvID0gZG9tYWluU2l6ZSAvIGh1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b3NpdGlvbmFsWFkoYWVzKSAtPiBBZXMudG9BeGlzQWVzKGFlcywgaXNZT3JpZW50YXRpb24hISlcbiAgICAgICAgICAgICAgICBlbHNlIC0+IGFlc1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFsIHNjYWxlID0gY3R4LmdldFNjYWxlKHRvb2x0aXBBZXMpXG4gICAgICAgICAgICBpZiAoc2NhbGUuaXNDb250aW51b3VzRG9tYWluICYmIHZhbHVlIGlzIE51bWJlcikge1xuICAgICAgICAgICAgICAgIGN0eC5nZXRUb29sdGlwRm9ybWF0dGVyKHRvb2x0aXBBZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgVG9vbHRpcEZvcm1hdHRpbmcuY3JlYXRlRm9ybWF0dGVyKHRvb2x0aXBBZXMsIGN0eClcbiAgICAgICAgICAgICAgICB9Lmludm9rZSh2YWx1ZSlcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdmFsdWUudG9TdHJpbmcoKVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGZvcm1hdHRlZFZhbHVlISFcbiAgICB9XG5cbiAgICBvdmVycmlkZSBmdW4gY29weSgpOiBDb25zdGFudFZhbHVlIHtcbiAgICAgICAgcmV0dXJuIENvbnN0YW50VmFsdWUoXG4gICAgICAgICAgICBhZXMsXG4gICAgICAgICAgICB2YWx1ZSxcbiAgICAgICAgICAgIGZvcm1hdFxuICAgICAgICApXG4gICAgfVxuXG4gICAgb3ZlcnJpZGUgZnVuIGdldEFubm90YXRpb25UZXh0KGluZGV4OiBJbnQpOiBTdHJpbmc/IHtcbiAgICAgICAgcmV0dXJuIGZvcm1hdHRlZFZhbHVlXG4gICAgfVxufSIsIi8qXG4gKiBDb3B5cmlnaHQgKGMpIDIwMjAuIEpldEJyYWlucyBzLnIuby5cbiAqIFVzZSBvZiB0aGlzIHNvdXJjZSBjb2RlIGlzIGdvdmVybmVkIGJ5IHRoZSBNSVQ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ICAgIHZhbCB0b29sdGlwQWVzID0gd2hlbiB7XG4gICAgICAgICAgICAgICAgICAgIEFlcy5pc1Bvc2l0aW9uYWxYWShhZXMpIC0+IEFlcy50b0F4aXNBZXMoYWVzLCBteURhdGFBY2Nlc3MuaXNZT3JpZW50YXRpb24pXG4gICAgICAgICAgICAgICAgICAgIGVsc2UgLT4gYWVzXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGN0eC5nZXRUb29sdGlwRm9ybWF0dGVyKHRvb2x0aXBBZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgVG9vbHRpcEZvcm1hdHRpbmcuY3JlYXRlRm9ybWF0dGVyKHRvb2x0aXBBZXMsIGN0eClcbiAgICAgICAgICAgICAgICB9Lmludm9rZShvcmlnaW5hbFZhbHVlKVxuICAgICAgICAgICAgfVxuICAgICAgICByZXR1cm4gRGF0YVBvaW50KFxuICAgICAgICAgICAgbGFiZWwgPSBteURhdGFMYWJlbCxcbiAgICAgICAgICAgIHZhbHVlID0gZm9ybWF0dGVkVmFsdWUsXG4gICAgICAgICAgICBhZXMgPSBhZXMsXG4gICAgICAgICAgICBpc0F4aXMgPSBpc0F4aXMsXG4gICAgICAgICAgICBpc091dGxpZXIgPSBpc091dGxpZXJcbiAgICAgICAgKVxuICAgIH1cblxuICAgIG92ZXJyaWRlIGZ1biBjb3B5KCk6IE1hcHBpbmdWYWx1ZSB7XG4gICAgICAgIHJldHVybiBNYXBwaW5nVmFsdWUoXG4gICAgICAgICAgICBhZXMgPSBhZXMsXG4gICAgICAgICAgICBpc091dGxpZXIgPSBpc091dGxpZXIsXG4gICAgICAgICAgICBpc0F4aXMgPSBpc0F4aXMsXG4gICAgICAgICAgICBmb3JtYXQgPSBmb3JtYXRcbiAgICAgICAgKVxuICAgIH1cblxuICAgIGZ1biB3aXRoRmxhZ3MoaXNPdXRsaWVyOiBCb29sZWFuLCBpc0F4aXM6IEJvb2xlYW4pOiBNYXBwaW5nVmFsdWUge1xuICAgICA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AgICAgIClcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIERhdGFQb2ludChcbiAgICAgICAgICAgICAgICBsYWJlbCA9IGNob29zZUxhYmVsKGRhdGFWYWx1ZXMuam9pblRvU3RyaW5nKFwiLCBcIikgeyBpdC5sYWJlbCA/OiBcIlwiIH0pLFxuICAgICAgICAgICAgICAgIHZhbHVlID0gbXlMaW5lRm9ybWF0dGVyLmZvcm1hdChkYXRhVmFsdWVzLm1hcCB7IGl0LnZhbHVlIH0pLFxuICAgICAgICAgICAgICAgIGFlcyA9IG51bGwsXG4gICAgICAgICAgICAgICAgaXNBeGlzID0gZmFsc2UsXG4gICAgICAgICAgICAgICAgaXNPdXRsaWVyID0gZmFsc2VcbiAgICAgICAgICAgIClcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHByaXZhdGUgZnVuIGNob29zZUxhYmVsKGRhdGFMYWJlbDogU3RyaW5nPyk6IFN0cmluZz8ge1xuICAgICAgICByZXR1cm4gd2hlbiAobGFiZWwpIHtcbiAgICAgICAgICAgIERFRkFVTFRfTEFCRUxfU1BFQ0lGSUVSIC0+IGRhdGFMYWJlbCAgICAvLyB1c2UgZGVmYXVsdCBsYWJlbCAoZnJvbSBkYXRhKVxuICAgICAgICAgICAgZWxzZSAtPiBsYWJlbCAgICAgICAgICAgICAgICAgICAgIC8vIHVzZSB0aGUgZ2l2ZW4gbGFiZWwgKGNhbiBiZSBudWxsKVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgY29tcGFuaW9uIG9iamVjdCB7XG4gICAgICAgIGZ1biBkZWZhdWx0TGluZUZvclZhbHVlU291cmNlKHZhbHVlU291cmNlOiBWYWx1ZVNvdXJjZSk6IFRvb2x0aXBMaW5lID0gVG9vbHRpcExpbmUoXG4gICAgICAgICAgICBMaW5lU3BlYy5kZWZhdWx0TGluZUZvclZhbHVlU291cmNlKHZhbHVlU291cmNlKVxuICAgICAgICApXG4gICAgfVxufSIsIi8qXG4gKiBDb3B5cmlnaH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MaW5lUGF0dGVybnM/LmlzRW1wdHkoKSA/OiBmYWxzZVxuXG4gICAgY29tcGFuaW9uIG9iamVjdCB7XG4gICAgICAgIGZ1biB3aXRob3V0VG9vbHRpcCgpID0gVG9vbHRpcFNwZWNpZmljYXRpb24oXG4gICAgICAgICAgICB2YWx1ZVNvdXJjZXMgPSBlbXB0eUxpc3QoKSxcbiAgICAgICAgICAgIHRvb2x0aXBMaW5lUGF0dGVybnMgPSBlbXB0eUxpc3QoKSxcbiAgICAgICAgICAgIHRvb2x0aXBQcm9wZXJ0aWVzID0gVG9vbHRpcFByb3BlcnRpZXMuTk9ORSxcbiAgICAgICAgICAgIHRvb2x0aXBUaXRsZSA9IG51bGxcbiAgICAgICAgKVxuXG4gICAgICAgIGZ1biBkZWZhdWx0VG9vbHRpcCgpID0gVG9vbHRpcFNwZWNpZmljYXRpb24oXG4gICAgICAgICAgICB2YWx1ZVNvdXJjZXMgPSBlbXB0eUxpc3QoKSxcbiAgICAgICAgICAgIHRvb2x0aXBMaW5lUGF0dGVybnMgPSBudWxsLFxuICAgICAgICAgICAgdG9vbHRpcFByb3BlcnRpZXMgPSBUb29sdGlwUHJvcGVydGllcy5OT05FLFxuICAgICAgICAgICAgdG9vbHRpcFRpdGxlID0gbnVsbFxuICAgICAgICApXG4gICAgfVxufSJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./kotlin-dce-dev/lets-plot-plot-builder-portable-js-legacy.js\n"); +eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (root, factory) {\n if (true)\n !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! kotlin */ \"./kotlin-dce-dev/kotlin.js\"), __webpack_require__(/*! lets-plot-base-portable-js-legacy */ \"./kotlin-dce-dev/lets-plot-base-portable-js-legacy.js\"), __webpack_require__(/*! lets-plot-plot-base-portable-js-legacy */ \"./kotlin-dce-dev/lets-plot-plot-base-portable-js-legacy.js\"), __webpack_require__(/*! lets-plot-vis-svg-portable-js-legacy */ \"./kotlin-dce-dev/lets-plot-vis-svg-portable-js-legacy.js\"), __webpack_require__(/*! lets-plot-plot-common-portable-js-legacy */ \"./kotlin-dce-dev/lets-plot-plot-common-portable-js-legacy.js\")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n else {}\n}(this, function (_, Kotlin, $module$lets_plot_base_portable_js_legacy, $module$lets_plot_plot_base_portable_js_legacy, $module$lets_plot_vis_svg_portable_js_legacy, $module$lets_plot_plot_common_portable_js_legacy) {\n 'use strict';\n var Kind_OBJECT = Kotlin.Kind.OBJECT;\n var zip = Kotlin.kotlin.collections.zip_45mdf7$;\n var ArrayList_init = Kotlin.kotlin.collections.ArrayList_init_287e2$;\n var DoubleVector = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.geometry.DoubleVector;\n var Pair = Kotlin.kotlin.Pair;\n var IllegalStateException_init = Kotlin.kotlin.IllegalStateException_init_pdl1vj$;\n var Kind_CLASS = Kotlin.Kind.CLASS;\n var Scale = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.Scale;\n var Kind_INTERFACE = Kotlin.Kind.INTERFACE;\n var scale = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.scale;\n var util = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.util;\n var YOrientationAesthetics = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.util.YOrientationAesthetics;\n var getCallableRef = Kotlin.getCallableRef;\n var toSet = Kotlin.kotlin.collections.toSet_7wnvza$;\n var Enum = Kotlin.kotlin.Enum;\n var throwISE = Kotlin.throwISE;\n var LinkedHashMap_init = Kotlin.kotlin.collections.LinkedHashMap_init_q3lmfv$;\n var getValue = Kotlin.kotlin.collections.getValue_t9ocha$;\n var listOf = Kotlin.kotlin.collections.listOf_mh5how$;\n var first = Kotlin.kotlin.collections.first_2p1efm$;\n var to = Kotlin.kotlin.to_ujzrz7$;\n var mapOf = Kotlin.kotlin.collections.mapOf_qfcya0$;\n var Aes = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.Aes;\n var transform = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.scale.transform;\n var mapCapacity = Kotlin.kotlin.collections.mapCapacity_za3lpa$;\n var LinkedHashMap_init_0 = Kotlin.kotlin.collections.LinkedHashMap_init_bwtc7$;\n var svg = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.render.svg;\n var SvgCssResource = $module$lets_plot_vis_svg_portable_js_legacy.jetbrains.datalore.vis.svg.SvgCssResource;\n var CompositeRegistration = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.registration.CompositeRegistration;\n var SvgSvgElement = $module$lets_plot_vis_svg_portable_js_legacy.jetbrains.datalore.vis.svg.SvgSvgElement;\n var base = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.gcommon.base;\n var TextLabel = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.render.svg.TextLabel;\n var Text$HorizontalAnchor = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.render.svg.Text.HorizontalAnchor;\n var Text$VerticalAnchor = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.render.svg.Text.VerticalAnchor;\n var RuntimeException = Kotlin.kotlin.RuntimeException;\n var Unit = Kotlin.kotlin.Unit;\n var emptyList = Kotlin.kotlin.collections.emptyList_287e2$;\n var Registration = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.registration.Registration;\n var DoubleRectangle = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.geometry.DoubleRectangle;\n var SvgRectElement_init = $module$lets_plot_vis_svg_portable_js_legacy.jetbrains.datalore.vis.svg.SvgRectElement_init_wthzt5$;\n var Color = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.values.Color;\n var plus = Kotlin.kotlin.collections.plus_mydzjv$;\n var DoubleRectangle_init = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.geometry.DoubleRectangle_init_6y0v78$;\n var ensureNotNull = Kotlin.ensureNotNull;\n var listOf_0 = Kotlin.kotlin.collections.listOf_i5x0yv$;\n var MultilineLabel = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.render.svg.MultilineLabel;\n var toString = Kotlin.toString;\n var SvgEventSpec = $module$lets_plot_vis_svg_portable_js_legacy.jetbrains.datalore.vis.svg.event.SvgEventSpec;\n var println = Kotlin.kotlin.io.println_s8jyv4$;\n var SvgEventHandler = $module$lets_plot_vis_svg_portable_js_legacy.jetbrains.datalore.vis.svg.event.SvgEventHandler;\n var logging = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.logging;\n var getKClass = Kotlin.getKClass;\n var SvgComponent = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.render.svg.SvgComponent;\n var flatten = Kotlin.kotlin.collections.flatten_u0ad8z$;\n var getPropertyCallableRef = Kotlin.getPropertyCallableRef;\n var Collection = Kotlin.kotlin.collections.Collection;\n var JsMath = Math;\n var NullGeomTargetCollector = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.NullGeomTargetCollector;\n var LiveMapGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.LiveMapGeom;\n var throwCCE = Kotlin.throwCCE;\n var collectionSizeOrDefault = Kotlin.kotlin.collections.collectionSizeOrDefault_ba2ldo$;\n var ArrayList_init_0 = Kotlin.kotlin.collections.ArrayList_init_ww73n8$;\n var lazy = Kotlin.kotlin.lazy_klfg04$;\n var HashMap_init = Kotlin.kotlin.collections.HashMap_init_q3lmfv$;\n var equals = Kotlin.equals;\n var AestheticsBuilder = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.aes.AestheticsBuilder;\n var data = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.data;\n var DoubleSpan = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.interval.DoubleSpan;\n var isNaN_0 = Kotlin.kotlin.isNaN_yrwdxr$;\n var ContinuousTransform = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.ContinuousTransform;\n var nativeSign = Math.sign;\n var SvgRoot = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.render.SvgRoot;\n var hashCode = Kotlin.hashCode;\n var TextStyle = $module$lets_plot_vis_svg_portable_js_legacy.jetbrains.datalore.vis.TextStyle;\n var Annotations = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.annotations.Annotations;\n var FontFamily = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.values.FontFamily;\n var FontFace = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.values.FontFace;\n var StringFormat = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.stringFormat.StringFormat;\n var AnnotationLineSpec = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.annotations.AnnotationLineSpec;\n var breaks = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.scale.breaks;\n var data_0 = $module$lets_plot_plot_common_portable_js_legacy.jetbrains.datalore.plot.common.data;\n var numberToInt = Kotlin.numberToInt;\n var Font = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.values.Font;\n var HashMap_init_0 = Kotlin.kotlin.collections.HashMap_init_73mtqc$;\n var afterOrientation = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.util.afterOrientation_aa6a3t$;\n var GeomBase = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.GeomBase;\n var ArrayList_init_1 = Kotlin.kotlin.collections.ArrayList_init_mqih57$;\n var TypedKeyHashMap = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.typedKey.TypedKeyHashMap;\n var pos = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.pos;\n var stat = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.stat;\n var SimpleStatContext = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.stat.SimpleStatContext;\n var GeomTargetLocator$LookupSpec = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.GeomTargetLocator.LookupSpec;\n var kotlin_js_internal_DoubleCompanionObject = Kotlin.kotlin.js.internal.DoubleCompanionObject;\n var coerceAtLeast = Kotlin.kotlin.ranges.coerceAtLeast_dqglrj$;\n var IllegalArgumentException_init = Kotlin.kotlin.IllegalArgumentException_init_pdl1vj$;\n var GeomContext = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.GeomContext;\n var Any = Object;\n var NoSuchElementException_init = Kotlin.kotlin.NoSuchElementException_init;\n var DoubleRectangle_init_0 = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.geometry.DoubleRectangle_init_7e97im$;\n var isFinite = Kotlin.kotlin.isFinite_yrwdxr$;\n var PlotContext$Layer = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.PlotContext.Layer;\n var PlotContext = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.PlotContext;\n var ScaleMapper = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.ScaleMapper;\n var HashSet_init = Kotlin.kotlin.collections.HashSet_init_mqih57$;\n var until = Kotlin.kotlin.ranges.until_dqglrj$;\n var toList = Kotlin.kotlin.collections.toList_7wnvza$;\n var distinct = Kotlin.kotlin.collections.distinct_7wnvza$;\n var toMap = Kotlin.kotlin.collections.toMap_6hr0sd$;\n var List = Kotlin.kotlin.collections.List;\n var sortedDescending = Kotlin.kotlin.collections.sortedDescending_exjks8$;\n var sorted = Kotlin.kotlin.collections.sorted_exjks8$;\n var PositionAdjustments$Meta = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.pos.PositionAdjustments.Meta;\n var filterNotNull = Kotlin.kotlin.collections.filterNotNull_m3lr2h$;\n var WithWidth = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.WithWidth;\n var geom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom;\n var WithHeight = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.WithHeight;\n var toList_0 = Kotlin.kotlin.toList_tt9upe$;\n var DiscreteTransform = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.DiscreteTransform;\n var checkIndexOverflow = Kotlin.kotlin.collections.checkIndexOverflow_za3lpa$;\n var listOfNotNull = Kotlin.kotlin.collections.listOfNotNull_jurz7g$;\n var get_indices = Kotlin.kotlin.collections.get_indices_gzk92b$;\n var UnsupportedOperationException_init = Kotlin.kotlin.UnsupportedOperationException_init_pdl1vj$;\n var sortedWith = Kotlin.kotlin.collections.sortedWith_eknfly$;\n var wrapFunction = Kotlin.wrapFunction;\n var Comparator = Kotlin.kotlin.Comparator;\n var L37 = Kotlin.Long.fromInt(37);\n var base_0 = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base;\n var PointGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.PointGeom;\n var GeomKind = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.GeomKind;\n var AestheticsDefaults = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.aes.AestheticsDefaults;\n var PathGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.PathGeom;\n var LineGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.LineGeom;\n var SmoothGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.SmoothGeom;\n var BarGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.BarGeom;\n var HistogramGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.HistogramGeom;\n var DotplotGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.DotplotGeom;\n var TileGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.TileGeom;\n var Bin2dGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.Bin2dGeom;\n var ErrorBarGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.ErrorBarGeom;\n var CrossBarGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.CrossBarGeom;\n var LineRangeGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.LineRangeGeom;\n var PointRangeGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.PointRangeGeom;\n var ContourGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.ContourGeom;\n var ContourfGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.ContourfGeom;\n var PolygonGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.PolygonGeom;\n var MapGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.MapGeom;\n var ABLineGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.ABLineGeom;\n var HLineGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.HLineGeom;\n var VLineGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.VLineGeom;\n var BoxplotGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.BoxplotGeom;\n var AreaRidgesGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.AreaRidgesGeom;\n var ViolinGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.ViolinGeom;\n var YDotplotGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.YDotplotGeom;\n var RibbonGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.RibbonGeom;\n var AreaGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.AreaGeom;\n var DensityGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.DensityGeom;\n var Density2dGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.Density2dGeom;\n var Density2dfGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.Density2dfGeom;\n var JitterGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.JitterGeom;\n var QQGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.QQGeom;\n var QQ2Geom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.QQ2Geom;\n var QQLineGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.QQLineGeom;\n var QQ2LineGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.QQ2LineGeom;\n var FreqpolyGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.FreqpolyGeom;\n var StepGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.StepGeom;\n var RectGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.RectGeom;\n var SegmentGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.SegmentGeom;\n var TextGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.TextGeom;\n var RasterGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.RasterGeom;\n var ImageGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.ImageGeom;\n var PieGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.PieGeom;\n var MappedDataAccess = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.MappedDataAccess;\n var coord = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.coord;\n var trimMargin = Kotlin.kotlin.text.trimMargin_rjktp$;\n var CoordinatesMapper = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.coord.CoordinatesMapper;\n var identity = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.spatial.projections.identity;\n var mercator = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.spatial.projections.mercator;\n var UNSUPPORTED = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.unsupported.UNSUPPORTED_61zpoe$;\n var geometry = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.geometry;\n var first_0 = Kotlin.kotlin.collections.first_7wnvza$;\n var DataFrame$DataFrame$Builder_init = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.DataFrame.Builder_init;\n var plus_0 = Kotlin.kotlin.collections.plus_iwxh38$;\n var maxOrNull = Kotlin.kotlin.collections.maxOrNull_exjks8$;\n var listOfNotNull_0 = Kotlin.kotlin.collections.listOfNotNull_issdgt$;\n var plus_1 = Kotlin.kotlin.collections.plus_q4559j$;\n var compareValues = Kotlin.kotlin.comparisons.compareValues_s00gnj$;\n var requireNoNulls = Kotlin.kotlin.collections.requireNoNulls_whsx6z$;\n var firstOrNull = Kotlin.kotlin.collections.firstOrNull_2p1efm$;\n var Comparable = Kotlin.kotlin.Comparable;\n var binarySearch = Kotlin.kotlin.collections.binarySearch_jhx6be$;\n var LinkedHashSet_init = Kotlin.kotlin.collections.LinkedHashSet_init_287e2$;\n var linkedSetOf = Kotlin.kotlin.collections.linkedSetOf_i5x0yv$;\n var plus_2 = Kotlin.kotlin.collections.plus_khz7k3$;\n var DataFrame$OrderSpec = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.DataFrame.OrderSpec;\n var minus = Kotlin.kotlin.collections.minus_2ws7j4$;\n var Map = Kotlin.kotlin.collections.Map;\n var toMutableMap = Kotlin.kotlin.collections.toMutableMap_abgq59$;\n var mapOf_0 = Kotlin.kotlin.collections.mapOf_x2b85n$;\n var emptyMap = Kotlin.kotlin.collections.emptyMap_q3lmfv$;\n var numberToDouble = Kotlin.numberToDouble;\n var asReversed = Kotlin.kotlin.collections.asReversed_2p1efm$;\n var values = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.values;\n var Listeners = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.observable.event.Listeners;\n var ListenerCaller = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.observable.event.ListenerCaller;\n var EventHandler = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.observable.event.EventHandler;\n var MouseEventSource = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.event.MouseEventSource;\n var svg_0 = $module$lets_plot_vis_svg_portable_js_legacy.jetbrains.datalore.vis.svg;\n var SvgLineElement_init = $module$lets_plot_vis_svg_portable_js_legacy.jetbrains.datalore.vis.svg.SvgLineElement_init_6y0v78$;\n var SvgLineElement = $module$lets_plot_vis_svg_portable_js_legacy.jetbrains.datalore.vis.svg.SvgLineElement;\n var SvgGElement = $module$lets_plot_vis_svg_portable_js_legacy.jetbrains.datalore.vis.svg.SvgGElement;\n var take = Kotlin.kotlin.collections.take_ba2ldo$;\n var takeLast = Kotlin.kotlin.collections.takeLast_yzln2o$;\n var last = Kotlin.kotlin.collections.last_2p1efm$;\n var reverse = Kotlin.kotlin.collections.reverse_vvxzk3$;\n var SvgRectElement_init_0 = $module$lets_plot_vis_svg_portable_js_legacy.jetbrains.datalore.vis.svg.SvgRectElement_init_6y0v78$;\n var isBlank = Kotlin.kotlin.text.isBlank_gw00vp$;\n var GroupComponent = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.render.svg.GroupComponent;\n var ContextualMapping = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.ContextualMapping;\n var minus_0 = Kotlin.kotlin.collections.minus_q4559j$;\n var toMutableList = Kotlin.kotlin.collections.toMutableList_4c7yge$;\n var GeomTargetLocator$LookupStrategy = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.GeomTargetLocator.LookupStrategy;\n var GeomTargetLocator$LookupSpace = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.GeomTargetLocator.LookupSpace;\n var DoubleSegment = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.geometry.DoubleSegment;\n var Disposable = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.registration.Disposable;\n var contains = Kotlin.kotlin.collections.contains_2ws7j4$;\n var TipLayoutHint = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.TipLayoutHint;\n var addAll = Kotlin.kotlin.collections.addAll_ipc267$;\n var withIndex = Kotlin.kotlin.collections.withIndex_7wnvza$;\n var reversed = Kotlin.kotlin.collections.reversed_7wnvza$;\n var GeomTargetCollector = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.GeomTargetCollector;\n var HitShape = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.HitShape;\n var GeomTargetLocator = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.GeomTargetLocator;\n var GeomTargetLocator$LookupResult = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.GeomTargetLocator.LookupResult;\n var TipLayoutHint$Kind = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.TipLayoutHint.Kind;\n var setOf = Kotlin.kotlin.collections.setOf_i5x0yv$;\n var plus_3 = Kotlin.kotlin.collections.plus_qloxvw$;\n var minOrNull = Kotlin.kotlin.collections.minOrNull_l63kqw$;\n var NoSuchElementException_init_0 = Kotlin.kotlin.NoSuchElementException;\n var HashSet_init_0 = Kotlin.kotlin.collections.HashSet_init_287e2$;\n var get_lastIndex = Kotlin.kotlin.collections.get_lastIndex_55thoc$;\n var checkCountOverflow = Kotlin.kotlin.collections.checkCountOverflow_za3lpa$;\n var splitRings = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.algorithms.splitRings_bemo1h$;\n var calculateArea = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.algorithms.calculateArea_ytws2g$;\n var PolylineSimplifier = $module$lets_plot_plot_common_portable_js_legacy.jetbrains.datalore.plot.common.geometry.PolylineSimplifier;\n var sortWith = Kotlin.kotlin.collections.sortWith_nqfjgj$;\n var GeomTarget = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.GeomTarget;\n var GeomTargetCollector$TooltipParams = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.GeomTargetCollector.TooltipParams;\n var sum = Kotlin.kotlin.collections.sum_plj8ka$;\n var maxOrNull_0 = Kotlin.kotlin.collections.maxOrNull_l63kqw$;\n var ScaleBreaks = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.scale.ScaleBreaks;\n var RuntimeException_init = Kotlin.kotlin.RuntimeException_init_pdl1vj$;\n var toRadians = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.math.toRadians_14dthe$;\n var UNSUPPORTED_0 = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.unsupported.UNSUPPORTED;\n var endsWith = Kotlin.kotlin.text.endsWith_7epoxm$;\n var trim = Kotlin.kotlin.text.trim_gw00vp$;\n var StringBuilder = Kotlin.kotlin.text.StringBuilder;\n var StyleSheet = $module$lets_plot_vis_svg_portable_js_legacy.jetbrains.datalore.vis.StyleSheet;\n var toBoxedChar = Kotlin.toBoxedChar;\n var unboxChar = Kotlin.unboxChar;\n var sum_0 = Kotlin.kotlin.collections.sum_l63kqw$;\n var iterator = Kotlin.kotlin.text.iterator_gw00vp$;\n var shuffle = Kotlin.kotlin.collections.shuffle_9jeydg$;\n var Random = Kotlin.kotlin.random.Random_s8cxhz$;\n var Random_0 = Kotlin.kotlin.random.Random;\n var round = Kotlin.kotlin.math.round_14dthe$;\n var MutableDouble = $module$lets_plot_plot_common_portable_js_legacy.jetbrains.datalore.plot.common.util.MutableDouble;\n var MutableInteger = $module$lets_plot_plot_common_portable_js_legacy.jetbrains.datalore.plot.common.util.MutableInteger;\n var asSequence = Kotlin.kotlin.collections.asSequence_7wnvza$;\n var map = Kotlin.kotlin.sequences.map_z5avom$;\n var reversed_0 = Kotlin.kotlin.comparisons.reversed_2avth4$;\n var sortedWith_0 = Kotlin.kotlin.sequences.sortedWith_vjgqpk$;\n var roundToInt = Kotlin.kotlin.math.roundToInt_yrwdxr$;\n var toList_1 = Kotlin.kotlin.sequences.toList_veqyi0$;\n var isClosed = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.algorithms.isClosed_2p1efm$;\n var AbstractList = Kotlin.kotlin.collections.AbstractList;\n var point = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.render.point;\n var NamedLineType = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.render.linetype.NamedLineType;\n var aes = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.aes;\n var DateTimeBreaksGen = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.scale.transform.DateTimeBreaksGen;\n var NamedShape = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.render.point.NamedShape;\n var NamedShape$values = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.render.point.NamedShape.values;\n var LinkedHashSet_init_0 = Kotlin.kotlin.collections.LinkedHashSet_init_mqih57$;\n var color = $module$lets_plot_plot_common_portable_js_legacy.jetbrains.datalore.plot.common.color;\n var ColorPalette$Type = $module$lets_plot_plot_common_portable_js_legacy.jetbrains.datalore.plot.common.color.ColorPalette.Type;\n var ColorPalette$Qualitative = $module$lets_plot_plot_common_portable_js_legacy.jetbrains.datalore.plot.common.color.ColorPalette.Qualitative;\n var ColorPalette$Sequential$valueOf = $module$lets_plot_plot_common_portable_js_legacy.jetbrains.datalore.plot.common.color.ColorPalette.Sequential.valueOf_61zpoe$;\n var ColorPalette$Diverging$valueOf = $module$lets_plot_plot_common_portable_js_legacy.jetbrains.datalore.plot.common.color.ColorPalette.Diverging.valueOf_61zpoe$;\n var ColorPalette$Qualitative$valueOf = $module$lets_plot_plot_common_portable_js_legacy.jetbrains.datalore.plot.common.color.ColorPalette.Qualitative.valueOf_61zpoe$;\n var IllegalArgumentException = Kotlin.kotlin.IllegalArgumentException;\n var ColorPalette$Sequential$values = $module$lets_plot_plot_common_portable_js_legacy.jetbrains.datalore.plot.common.color.ColorPalette.Sequential.values;\n var ColorPalette$Diverging$values = $module$lets_plot_plot_common_portable_js_legacy.jetbrains.datalore.plot.common.color.ColorPalette.Diverging.values;\n var ColorPalette$Qualitative$values = $module$lets_plot_plot_common_portable_js_legacy.jetbrains.datalore.plot.common.color.ColorPalette.Qualitative.values;\n var joinToString = Kotlin.kotlin.collections.joinToString_cgipc5$;\n var windowed = Kotlin.kotlin.collections.windowed_vo9c23$;\n var abs = Kotlin.kotlin.math.abs_za3lpa$;\n var HSV = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.values.HSV;\n var colormap = $module$lets_plot_plot_common_portable_js_legacy.jetbrains.datalore.plot.common.colormap;\n var rangeTo = Kotlin.kotlin.ranges.rangeTo_38ydlf$;\n var TooltipLineSpec$DataPoint = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.TooltipLineSpec.DataPoint;\n var throwUPAE = Kotlin.throwUPAE;\n var single = Kotlin.kotlin.collections.single_2p1efm$;\n var joinToString_0 = Kotlin.kotlin.collections.joinToString_fmv235$;\n var TooltipLineSpec = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.TooltipLineSpec;\n MarginSide.prototype = Object.create(Enum.prototype);\n MarginSide.prototype.constructor = MarginSide;\n PlotSvgComponent$buildPlot$ObjectLiteral.prototype = Object.create(Registration.prototype);\n PlotSvgComponent$buildPlot$ObjectLiteral.prototype.constructor = PlotSvgComponent$buildPlot$ObjectLiteral;\n PlotSvgComponent.prototype = Object.create(SvgComponent.prototype);\n PlotSvgComponent.prototype.constructor = PlotSvgComponent;\n PlotTile.prototype = Object.create(SvgComponent.prototype);\n PlotTile.prototype.constructor = PlotTile;\n SvgLayerRenderer.prototype = Object.create(SvgComponent.prototype);\n SvgLayerRenderer.prototype.constructor = SvgLayerRenderer;\n AnnotationLine.prototype = Object.create(LinesContentSpecification$Companion$LineSpec.prototype);\n AnnotationLine.prototype.constructor = AnnotationLine;\n ColorBarAssembler$createColorBar$ObjectLiteral.prototype = Object.create(LegendBoxInfo.prototype);\n ColorBarAssembler$createColorBar$ObjectLiteral.prototype.constructor = ColorBarAssembler$createColorBar$ObjectLiteral;\n ColorBarOptions.prototype = Object.create(GuideOptions.prototype);\n ColorBarOptions.prototype.constructor = ColorBarOptions;\n GuideOptions$Companion$NONE$ObjectLiteral.prototype = Object.create(GuideOptions.prototype);\n GuideOptions$Companion$NONE$ObjectLiteral.prototype.constructor = GuideOptions$Companion$NONE$ObjectLiteral;\n LegendAssembler$createLegend$ObjectLiteral.prototype = Object.create(LegendBoxInfo.prototype);\n LegendAssembler$createLegend$ObjectLiteral.prototype.constructor = LegendAssembler$createLegend$ObjectLiteral;\n LegendOptions.prototype = Object.create(GuideOptions.prototype);\n LegendOptions.prototype.constructor = LegendOptions;\n PosProvider$Companion$wrap$ObjectLiteral.prototype = Object.create(PosProvider.prototype);\n PosProvider$Companion$wrap$ObjectLiteral.prototype.constructor = PosProvider$Companion$wrap$ObjectLiteral;\n PosProvider$Companion$barStack$ObjectLiteral.prototype = Object.create(PosProvider.prototype);\n PosProvider$Companion$barStack$ObjectLiteral.prototype.constructor = PosProvider$Companion$barStack$ObjectLiteral;\n PosProvider$Companion$dodge$ObjectLiteral.prototype = Object.create(PosProvider.prototype);\n PosProvider$Companion$dodge$ObjectLiteral.prototype.constructor = PosProvider$Companion$dodge$ObjectLiteral;\n PosProvider$Companion$fill$ObjectLiteral.prototype = Object.create(PosProvider.prototype);\n PosProvider$Companion$fill$ObjectLiteral.prototype.constructor = PosProvider$Companion$fill$ObjectLiteral;\n PosProvider$Companion$jitter$ObjectLiteral.prototype = Object.create(PosProvider.prototype);\n PosProvider$Companion$jitter$ObjectLiteral.prototype.constructor = PosProvider$Companion$jitter$ObjectLiteral;\n PosProvider$Companion$nudge$ObjectLiteral.prototype = Object.create(PosProvider.prototype);\n PosProvider$Companion$nudge$ObjectLiteral.prototype.constructor = PosProvider$Companion$nudge$ObjectLiteral;\n PosProvider$Companion$jitterDodge$ObjectLiteral.prototype = Object.create(PosProvider.prototype);\n PosProvider$Companion$jitterDodge$ObjectLiteral.prototype.constructor = PosProvider$Companion$jitterDodge$ObjectLiteral;\n FacetGrid.prototype = Object.create(PlotFacets.prototype);\n FacetGrid.prototype.constructor = FacetGrid;\n FacetScales.prototype = Object.create(Enum.prototype);\n FacetScales.prototype.constructor = FacetScales;\n FacetWrap$Direction.prototype = Object.create(Enum.prototype);\n FacetWrap$Direction.prototype.constructor = FacetWrap$Direction;\n FacetWrap.prototype = Object.create(PlotFacets.prototype);\n FacetWrap.prototype.constructor = FacetWrap;\n GeomProvider$GeomProviderBuilder$build$ObjectLiteral.prototype = Object.create(GeomProvider.prototype);\n GeomProvider$GeomProviderBuilder$build$ObjectLiteral.prototype.constructor = GeomProvider$GeomProviderBuilder$build$ObjectLiteral;\n CartesianCoordProvider.prototype = Object.create(CoordProviderBase.prototype);\n CartesianCoordProvider.prototype.constructor = CartesianCoordProvider;\n FixedRatioCoordProvider.prototype = Object.create(CoordProviderBase.prototype);\n FixedRatioCoordProvider.prototype.constructor = FixedRatioCoordProvider;\n MarginalLayerCoordProvider.prototype = Object.create(CoordProviderBase.prototype);\n MarginalLayerCoordProvider.prototype.constructor = MarginalLayerCoordProvider;\n ProjectionCoordProvider.prototype = Object.create(CoordProviderBase.prototype);\n ProjectionCoordProvider.prototype.constructor = ProjectionCoordProvider;\n DefaultAxisTheme.prototype = Object.create(ThemeValuesAccess.prototype);\n DefaultAxisTheme.prototype.constructor = DefaultAxisTheme;\n DefaultFacetsTheme.prototype = Object.create(ThemeValuesAccess.prototype);\n DefaultFacetsTheme.prototype.constructor = DefaultFacetsTheme;\n DefaultLegendTheme.prototype = Object.create(ThemeValuesAccess.prototype);\n DefaultLegendTheme.prototype.constructor = DefaultLegendTheme;\n DefaultPanelGridTheme.prototype = Object.create(ThemeValuesAccess.prototype);\n DefaultPanelGridTheme.prototype.constructor = DefaultPanelGridTheme;\n DefaultPanelTheme.prototype = Object.create(ThemeValuesAccess.prototype);\n DefaultPanelTheme.prototype.constructor = DefaultPanelTheme;\n DefaultPlotTheme.prototype = Object.create(ThemeValuesAccess.prototype);\n DefaultPlotTheme.prototype.constructor = DefaultPlotTheme;\n DefaultTooltipsTheme.prototype = Object.create(ThemeValuesAccess.prototype);\n DefaultTooltipsTheme.prototype.constructor = DefaultTooltipsTheme;\n ThemeValuesBase.prototype = Object.create(ThemeValues.prototype);\n ThemeValuesBase.prototype.constructor = ThemeValuesBase;\n ThemeValuesLPMinimal2.prototype = Object.create(ThemeValues.prototype);\n ThemeValuesLPMinimal2.prototype.constructor = ThemeValuesLPMinimal2;\n ThemeValuesLPNone.prototype = Object.create(ThemeValuesBase.prototype);\n ThemeValuesLPNone.prototype.constructor = ThemeValuesLPNone;\n ThemeValuesRBW.prototype = Object.create(ThemeValues.prototype);\n ThemeValuesRBW.prototype.constructor = ThemeValuesRBW;\n ThemeValuesRClassic.prototype = Object.create(ThemeValues.prototype);\n ThemeValuesRClassic.prototype.constructor = ThemeValuesRClassic;\n ThemeValuesRGrey.prototype = Object.create(ThemeValues.prototype);\n ThemeValuesRGrey.prototype.constructor = ThemeValuesRGrey;\n ThemeValuesRLight.prototype = Object.create(ThemeValues.prototype);\n ThemeValuesRLight.prototype.constructor = ThemeValuesRLight;\n ThemeValuesRMinimal.prototype = Object.create(ThemeValues.prototype);\n ThemeValuesRMinimal.prototype.constructor = ThemeValuesRMinimal;\n MouseEventPeer$addEventHandler$ObjectLiteral.prototype = Object.create(Registration.prototype);\n MouseEventPeer$addEventHandler$ObjectLiteral.prototype.constructor = MouseEventPeer$addEventHandler$ObjectLiteral;\n AxisComponent.prototype = Object.create(SvgComponent.prototype);\n AxisComponent.prototype.constructor = AxisComponent;\n LegendBox.prototype = Object.create(SvgComponent.prototype);\n LegendBox.prototype.constructor = LegendBox;\n ColorBarComponent.prototype = Object.create(LegendBox.prototype);\n ColorBarComponent.prototype.constructor = ColorBarComponent;\n ColorBarComponentLayout.prototype = Object.create(LegendBoxLayout.prototype);\n ColorBarComponentLayout.prototype.constructor = ColorBarComponentLayout;\n ColorBarComponentLayout$HorizontalLayout.prototype = Object.create(ColorBarComponentLayout.prototype);\n ColorBarComponentLayout$HorizontalLayout.prototype.constructor = ColorBarComponentLayout$HorizontalLayout;\n ColorBarComponentLayout$VerticalLayout.prototype = Object.create(ColorBarComponentLayout.prototype);\n ColorBarComponentLayout$VerticalLayout.prototype.constructor = ColorBarComponentLayout$VerticalLayout;\n ColorBarComponentSpec.prototype = Object.create(LegendBoxSpec.prototype);\n ColorBarComponentSpec.prototype.constructor = ColorBarComponentSpec;\n LegendArrangement.prototype = Object.create(Enum.prototype);\n LegendArrangement.prototype.constructor = LegendArrangement;\n LegendComponent.prototype = Object.create(LegendBox.prototype);\n LegendComponent.prototype.constructor = LegendComponent;\n LegendComponentLayout.prototype = Object.create(LegendBoxLayout.prototype);\n LegendComponentLayout.prototype.constructor = LegendComponentLayout;\n LegendComponentLayout$MyHorizontal.prototype = Object.create(LegendComponentLayout.prototype);\n LegendComponentLayout$MyHorizontal.prototype.constructor = LegendComponentLayout$MyHorizontal;\n LegendComponentLayout$MyMultiRow.prototype = Object.create(LegendComponentLayout.prototype);\n LegendComponentLayout$MyMultiRow.prototype.constructor = LegendComponentLayout$MyMultiRow;\n LegendComponentLayout$MyHorizontalMultiRow.prototype = Object.create(LegendComponentLayout$MyMultiRow.prototype);\n LegendComponentLayout$MyHorizontalMultiRow.prototype.constructor = LegendComponentLayout$MyHorizontalMultiRow;\n LegendComponentLayout$MyVertical.prototype = Object.create(LegendComponentLayout$MyMultiRow.prototype);\n LegendComponentLayout$MyVertical.prototype.constructor = LegendComponentLayout$MyVertical;\n LegendComponentSpec.prototype = Object.create(LegendBoxSpec.prototype);\n LegendComponentSpec.prototype.constructor = LegendComponentSpec;\n LegendDirection.prototype = Object.create(Enum.prototype);\n LegendDirection.prototype.constructor = LegendDirection;\n Orientation.prototype = Object.create(Enum.prototype);\n Orientation.prototype.constructor = Orientation;\n MathUtil$ClosestPointChecker$COMPARISON_RESULT.prototype = Object.create(Enum.prototype);\n MathUtil$ClosestPointChecker$COMPARISON_RESULT.prototype.constructor = MathUtil$ClosestPointChecker$COMPARISON_RESULT;\n LayerTargetLocator$Collector$CollectingStrategy.prototype = Object.create(Enum.prototype);\n LayerTargetLocator$Collector$CollectingStrategy.prototype.constructor = LayerTargetLocator$Collector$CollectingStrategy;\n PointTargetProjection.prototype = Object.create(TargetProjection.prototype);\n PointTargetProjection.prototype.constructor = PointTargetProjection;\n RectTargetProjection.prototype = Object.create(TargetProjection.prototype);\n RectTargetProjection.prototype.constructor = RectTargetProjection;\n PolygonTargetProjection.prototype = Object.create(TargetProjection.prototype);\n PolygonTargetProjection.prototype.constructor = PolygonTargetProjection;\n PathTargetProjection.prototype = Object.create(TargetProjection.prototype);\n PathTargetProjection.prototype.constructor = PathTargetProjection;\n FacetedPlotLayout.prototype = Object.create(PlotLayoutBase.prototype);\n FacetedPlotLayout.prototype.constructor = FacetedPlotLayout;\n LegendBoxInfo$Companion$EMPTY$ObjectLiteral.prototype = Object.create(LegendBoxInfo.prototype);\n LegendBoxInfo$Companion$EMPTY$ObjectLiteral.prototype.constructor = LegendBoxInfo$Companion$EMPTY$ObjectLiteral;\n SingleTilePlotLayout.prototype = Object.create(PlotLayoutBase.prototype);\n SingleTilePlotLayout.prototype.constructor = SingleTilePlotLayout;\n TextJustification$Companion$TextRotation.prototype = Object.create(Enum.prototype);\n TextJustification$Companion$TextRotation.prototype.constructor = TextJustification$Companion$TextRotation;\n AxisBreaksProviderFactory$FixedBreaksProviderFactory.prototype = Object.create(AxisBreaksProviderFactory.prototype);\n AxisBreaksProviderFactory$FixedBreaksProviderFactory.prototype.constructor = AxisBreaksProviderFactory$FixedBreaksProviderFactory;\n AxisBreaksProviderFactory$AdaptableBreaksProviderFactory.prototype = Object.create(AxisBreaksProviderFactory.prototype);\n AxisBreaksProviderFactory$AdaptableBreaksProviderFactory.prototype.constructor = AxisBreaksProviderFactory$AdaptableBreaksProviderFactory;\n HorizontalAxisLayouter.prototype = Object.create(AxisLayouter.prototype);\n HorizontalAxisLayouter.prototype.constructor = HorizontalAxisLayouter;\n VerticalAxisLayouter.prototype = Object.create(AxisLayouter.prototype);\n VerticalAxisLayouter.prototype.constructor = VerticalAxisLayouter;\n AbstractFixedBreaksLabelsLayout.prototype = Object.create(AxisLabelsLayout.prototype);\n AbstractFixedBreaksLabelsLayout.prototype.constructor = AbstractFixedBreaksLabelsLayout;\n HorizontalFixedBreaksLabelsLayout.prototype = Object.create(AbstractFixedBreaksLabelsLayout.prototype);\n HorizontalFixedBreaksLabelsLayout.prototype.constructor = HorizontalFixedBreaksLabelsLayout;\n HorizontalFlexBreaksLabelsLayout.prototype = Object.create(AxisLabelsLayout.prototype);\n HorizontalFlexBreaksLabelsLayout.prototype.constructor = HorizontalFlexBreaksLabelsLayout;\n HorizontalMultilineLabelsLayout.prototype = Object.create(AbstractFixedBreaksLabelsLayout.prototype);\n HorizontalMultilineLabelsLayout.prototype.constructor = HorizontalMultilineLabelsLayout;\n HorizontalSimpleLabelsLayout.prototype = Object.create(AbstractFixedBreaksLabelsLayout.prototype);\n HorizontalSimpleLabelsLayout.prototype.constructor = HorizontalSimpleLabelsLayout;\n HorizontalTiltedLabelsLayout.prototype = Object.create(AbstractFixedBreaksLabelsLayout.prototype);\n HorizontalTiltedLabelsLayout.prototype.constructor = HorizontalTiltedLabelsLayout;\n HorizontalVerticalLabelsLayout.prototype = Object.create(AbstractFixedBreaksLabelsLayout.prototype);\n HorizontalVerticalLabelsLayout.prototype.constructor = HorizontalVerticalLabelsLayout;\n VerticalFixedBreaksLabelsLayout.prototype = Object.create(AbstractFixedBreaksLabelsLayout.prototype);\n VerticalFixedBreaksLabelsLayout.prototype.constructor = VerticalFixedBreaksLabelsLayout;\n VerticalFlexBreaksLabelsLayout.prototype = Object.create(AxisLabelsLayout.prototype);\n VerticalFlexBreaksLabelsLayout.prototype.constructor = VerticalFlexBreaksLabelsLayout;\n GeomAreaInsets.prototype = Object.create(Insets.prototype);\n GeomAreaInsets.prototype.constructor = GeomAreaInsets;\n GroupSamplingBase.prototype = Object.create(SamplingBase.prototype);\n GroupSamplingBase.prototype.constructor = GroupSamplingBase;\n GroupRandomSampling.prototype = Object.create(GroupSamplingBase.prototype);\n GroupRandomSampling.prototype.constructor = GroupRandomSampling;\n GroupSystematicSampling.prototype = Object.create(GroupSamplingBase.prototype);\n GroupSystematicSampling.prototype.constructor = GroupSystematicSampling;\n PickSampling.prototype = Object.create(SamplingBase.prototype);\n PickSampling.prototype.constructor = PickSampling;\n RandomSampling.prototype = Object.create(SamplingBase.prototype);\n RandomSampling.prototype.constructor = RandomSampling;\n RandomStratifiedSampling.prototype = Object.create(SamplingBase.prototype);\n RandomStratifiedSampling.prototype.constructor = RandomStratifiedSampling;\n SystematicSampling.prototype = Object.create(SamplingBase.prototype);\n SystematicSampling.prototype.constructor = SystematicSampling;\n VertexSampling.prototype = Object.create(SamplingBase.prototype);\n VertexSampling.prototype.constructor = VertexSampling;\n VertexSampling$VertexVwSampling.prototype = Object.create(VertexSampling.prototype);\n VertexSampling$VertexVwSampling.prototype.constructor = VertexSampling$VertexVwSampling;\n VertexSampling$VertexDpSampling.prototype = Object.create(VertexSampling.prototype);\n VertexSampling$VertexDpSampling.prototype.constructor = VertexSampling$VertexDpSampling;\n VertexSampling$DoubleVectorComponentsList.prototype = Object.create(AbstractList.prototype);\n VertexSampling$DoubleVectorComponentsList.prototype.constructor = VertexSampling$DoubleVectorComponentsList;\n ContinuousOnlyMapperProvider.prototype = Object.create(MapperProviderBase.prototype);\n ContinuousOnlyMapperProvider.prototype.constructor = ContinuousOnlyMapperProvider;\n GuideMapperWithGuideBreaks.prototype = Object.create(GuideMapper.prototype);\n GuideMapperWithGuideBreaks.prototype.constructor = GuideMapperWithGuideBreaks;\n LinearNormalizingMapperProvider.prototype = Object.create(MapperProviderBase.prototype);\n LinearNormalizingMapperProvider.prototype.constructor = LinearNormalizingMapperProvider;\n AlphaMapperProvider.prototype = Object.create(LinearNormalizingMapperProvider.prototype);\n AlphaMapperProvider.prototype.constructor = AlphaMapperProvider;\n ColorBrewerMapperProvider.prototype = Object.create(MapperProviderBase.prototype);\n ColorBrewerMapperProvider.prototype.constructor = ColorBrewerMapperProvider;\n ColorGradient2MapperProvider.prototype = Object.create(ContinuousOnlyMapperProvider.prototype);\n ColorGradient2MapperProvider.prototype.constructor = ColorGradient2MapperProvider;\n ColorGradientMapperProvider.prototype = Object.create(MapperProviderBase.prototype);\n ColorGradientMapperProvider.prototype.constructor = ColorGradientMapperProvider;\n ColorGradientnMapperProvider.prototype = Object.create(MapperProviderBase.prototype);\n ColorGradientnMapperProvider.prototype.constructor = ColorGradientnMapperProvider;\n HSVColorMapperProvider.prototype = Object.create(MapperProviderBase.prototype);\n HSVColorMapperProvider.prototype.constructor = HSVColorMapperProvider;\n ColorHueMapperProvider.prototype = Object.create(HSVColorMapperProvider.prototype);\n ColorHueMapperProvider.prototype.constructor = ColorHueMapperProvider;\n ColormapMapperProvider.prototype = Object.create(MapperProviderBase.prototype);\n ColormapMapperProvider.prototype.constructor = ColormapMapperProvider;\n DirectlyProportionalMapperProvider.prototype = Object.create(ContinuousOnlyMapperProvider.prototype);\n DirectlyProportionalMapperProvider.prototype.constructor = DirectlyProportionalMapperProvider;\n GreyscaleLightnessMapperProvider.prototype = Object.create(HSVColorMapperProvider.prototype);\n GreyscaleLightnessMapperProvider.prototype.constructor = GreyscaleLightnessMapperProvider;\n IdentityDiscreteMapperProvider.prototype = Object.create(DiscreteOnlyMapperProvider.prototype);\n IdentityDiscreteMapperProvider.prototype.constructor = IdentityDiscreteMapperProvider;\n SizeAreaMapperProvider.prototype = Object.create(DirectlyProportionalMapperProvider.prototype);\n SizeAreaMapperProvider.prototype.constructor = SizeAreaMapperProvider;\n SizeMapperProvider.prototype = Object.create(LinearNormalizingMapperProvider.prototype);\n SizeMapperProvider.prototype.constructor = SizeMapperProvider;\n TooltipLine.prototype = Object.create(LinesContentSpecification$Companion$LineSpec.prototype);\n TooltipLine.prototype.constructor = TooltipLine;\n function FeatureSwitch() {\n FeatureSwitch_instance = this;\n this.PLOT_VIEW_TOOLBOX = false;\n this.PLOT_DEBUG_DRAWING = false;\n this.LEGEND_DEBUG_DRAWING = false;\n }\n FeatureSwitch.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'FeatureSwitch',\n interfaces: []\n };\n var FeatureSwitch_instance = null;\n function FeatureSwitch_getInstance() {\n if (FeatureSwitch_instance === null) {\n new FeatureSwitch();\n }\n return FeatureSwitch_instance;\n }\n function AxisUtil() {\n AxisUtil_instance = this;\n }\n AxisUtil.prototype.breaksData_zh7dbf$ = function (scaleBreaks, coord, flipAxis, horizontal) {\n var tmp$ = this.toAxisCoord_0(scaleBreaks, coord, flipAxis, horizontal);\n var breakCoords = tmp$.component1()\n , breakLabels = tmp$.component2();\n return new AxisComponent$BreaksData(breakCoords, breakLabels);\n };\n AxisUtil.prototype.toAxisCoord_0 = function (scaleBreaks, coord, flipAxis, horizontal) {\n var tmp$, tmp$_0;\n var breaksDataAndLabel = zip(scaleBreaks.transformedValues, scaleBreaks.labels);\n var axisBreaks = ArrayList_init();\n var axisLabels = ArrayList_init();\n tmp$ = breaksDataAndLabel.iterator();\n while (tmp$.hasNext()) {\n var tmp$_1 = tmp$.next();\n var br = tmp$_1.component1()\n , label = tmp$_1.component2();\n if (horizontal === true)\n tmp$_0 = new DoubleVector(br, 0.0);\n else if (horizontal === false)\n tmp$_0 = new DoubleVector(0.0, br);\n else\n tmp$_0 = Kotlin.noWhenBranchMatched();\n var it = tmp$_0;\n var block$result;\n if (flipAxis) {\n block$result = it.flip();\n } else {\n block$result = it;\n }\n var bpCoord = block$result;\n var bpClientCoord = coord.toClient_gpjtzr$(bpCoord);\n if (!(bpClientCoord != null && bpClientCoord.isFinite)) {\n continue;\n }\n var bpOnAxis = horizontal ? bpClientCoord.x : bpClientCoord.y;\n axisBreaks.add_11rb$(bpOnAxis);\n axisLabels.add_11rb$(label);\n }\n return new Pair(axisBreaks, axisLabels);\n };\n AxisUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'AxisUtil',\n interfaces: []\n };\n var AxisUtil_instance = null;\n function AxisUtil_getInstance() {\n if (AxisUtil_instance === null) {\n new AxisUtil();\n }\n return AxisUtil_instance;\n }\n function BogusScale() {\n }\n Object.defineProperty(BogusScale.prototype, 'name', {\n configurable: true,\n get: function () {\n throw IllegalStateException_init('Bogus scale is not supposed to be used.');\n }\n });\n Object.defineProperty(BogusScale.prototype, 'labelFormatter', {\n configurable: true,\n get: function () {\n throw IllegalStateException_init('Bogus scale is not supposed to be used.');\n }\n });\n Object.defineProperty(BogusScale.prototype, 'isContinuous', {\n configurable: true,\n get: function () {\n throw IllegalStateException_init('Bogus scale is not supposed to be used.');\n }\n });\n Object.defineProperty(BogusScale.prototype, 'isContinuousDomain', {\n configurable: true,\n get: function () {\n throw IllegalStateException_init('Bogus scale is not supposed to be used.');\n }\n });\n Object.defineProperty(BogusScale.prototype, 'multiplicativeExpand', {\n configurable: true,\n get: function () {\n throw IllegalStateException_init('Bogus scale is not supposed to be used.');\n }\n });\n Object.defineProperty(BogusScale.prototype, 'additiveExpand', {\n configurable: true,\n get: function () {\n throw IllegalStateException_init('Bogus scale is not supposed to be used.');\n }\n });\n Object.defineProperty(BogusScale.prototype, 'transform', {\n configurable: true,\n get: function () {\n throw IllegalStateException_init('Bogus scale is not supposed to be used.');\n }\n });\n BogusScale.prototype.hasBreaks = function () {\n throw IllegalStateException_init('Bogus scale is not supposed to be used.');\n };\n BogusScale.prototype.getScaleBreaks = function () {\n throw IllegalStateException_init('Bogus scale is not supposed to be used.');\n };\n BogusScale.prototype.getBreaksGenerator = function () {\n throw IllegalStateException_init('Bogus scale is not supposed to be used.');\n };\n BogusScale.prototype.with = function () {\n throw IllegalStateException_init('Bogus scale is not supposed to be used.');\n };\n BogusScale.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'BogusScale',\n interfaces: [Scale]\n };\n function DemoAndTest() {\n DemoAndTest_instance = this;\n }\n DemoAndTest.prototype.buildGeom_21esde$ = function (layer, xyAesBounds, coord, flippedAxis, targetCollector) {\n return SquareFrameOfReference$Companion_getInstance().buildGeom_y8ndk1$(layer, xyAesBounds, coord, flippedAxis, targetCollector);\n };\n DemoAndTest.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'DemoAndTest',\n interfaces: []\n };\n var DemoAndTest_instance = null;\n function DemoAndTest_getInstance() {\n if (DemoAndTest_instance === null) {\n new DemoAndTest();\n }\n return DemoAndTest_instance;\n }\n function FrameOfReference() {\n }\n FrameOfReference.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'FrameOfReference',\n interfaces: []\n };\n function FrameOfReferenceProvider() {\n }\n FrameOfReferenceProvider.prototype.createTileFrame_sd8y8$ = function (layoutInfo, coordProvider, debugDrawing, callback$default) {\n if (debugDrawing === void 0)\n debugDrawing = false;\n return callback$default ? callback$default(layoutInfo, coordProvider, debugDrawing) : this.createTileFrame_sd8y8$$default(layoutInfo, coordProvider, debugDrawing);\n };\n FrameOfReferenceProvider.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'FrameOfReferenceProvider',\n interfaces: []\n };\n function GeomLayer() {\n }\n GeomLayer.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'GeomLayer',\n interfaces: []\n };\n function GeomLayerListUtil() {\n GeomLayerListUtil_instance = this;\n }\n GeomLayerListUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'GeomLayerListUtil',\n interfaces: []\n };\n var GeomLayerListUtil_instance = null;\n function GeomLayerListUtil_getInstance() {\n if (GeomLayerListUtil_instance === null) {\n new GeomLayerListUtil();\n }\n return GeomLayerListUtil_instance;\n }\n function LayerRendererUtil() {\n LayerRendererUtil_instance = this;\n }\n LayerRendererUtil.prototype.createLayerRendererData_sqg2xh$ = function (layer) {\n var aestheticMappers = PlotUtil_getInstance().prepareLayerAestheticMappers_evxbuk$(layer, scale.Mappers.IDENTITY, scale.Mappers.IDENTITY);\n var aesthetics = PlotUtil_getInstance().createLayerAesthetics_6wb5xp$(layer, layer.renderedAes(), aestheticMappers);\n var block$result;\n var tmp$;\n tmp$ = layer.isYOrientation;\n if (tmp$ === true) {\n block$result = util.YOrientationBaseUtil.flipAesKeys_fzsz32$(aestheticMappers);\n } else if (tmp$ === false) {\n block$result = aestheticMappers;\n } else {\n block$result = Kotlin.noWhenBranchMatched();\n }\n var aestheticMappersAfterOrientation = block$result;\n var block$result_0;\n var tmp$_0;\n tmp$_0 = layer.isYOrientation;\n if (tmp$_0 === true) {\n block$result_0 = new YOrientationAesthetics(aesthetics);\n } else if (tmp$_0 === false) {\n block$result_0 = aesthetics;\n } else {\n block$result_0 = Kotlin.noWhenBranchMatched();\n }\n var aestheticsAfterOrientation = block$result_0;\n var $receiver = layer.renderedAes();\n var predicate = getCallableRef('hasBinding', function ($receiver, p1) {\n return $receiver.hasBinding_896ixz$(p1);\n }.bind(null, layer));\n var destination = ArrayList_init();\n var tmp$_1;\n tmp$_1 = $receiver.iterator();\n while (tmp$_1.hasNext()) {\n var element = tmp$_1.next();\n if (predicate(element))\n destination.add_11rb$(element);\n }\n var mappedAes = toSet(destination);\n var pos = PlotUtil_getInstance().createPositionAdjustment_h0u0lr$(layer.posProvider, aestheticsAfterOrientation);\n return new LayerRendererUtil$LayerRendererData(layer.geom, layer.geomKind, aestheticsAfterOrientation, aestheticMappersAfterOrientation, pos, layer.createContextualMapping(), mappedAes, layer.createAnnotations());\n };\n function LayerRendererUtil$LayerRendererData(geom, geomKind, aesthetics, aestheticMappers, pos, contextualMapping, mappedAes, annotations) {\n this.geom = geom;\n this.geomKind = geomKind;\n this.aesthetics = aesthetics;\n this.aestheticMappers = aestheticMappers;\n this.pos = pos;\n this.contextualMapping = contextualMapping;\n this.mappedAes = mappedAes;\n this.annotations = annotations;\n }\n LayerRendererUtil$LayerRendererData.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LayerRendererData',\n interfaces: []\n };\n LayerRendererUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'LayerRendererUtil',\n interfaces: []\n };\n var LayerRendererUtil_instance = null;\n function LayerRendererUtil_getInstance() {\n if (LayerRendererUtil_instance === null) {\n new LayerRendererUtil();\n }\n return LayerRendererUtil_instance;\n }\n function MarginSide(name, ordinal, id) {\n Enum.call(this);\n this.id_zg94u8$_0 = id;\n this.name$ = name;\n this.ordinal$ = ordinal;\n }\n function MarginSide_initFields() {\n MarginSide_initFields = function () {\n };\n MarginSide$LEFT_instance = new MarginSide('LEFT', 0, 'LEFT');\n MarginSide$RIGHT_instance = new MarginSide('RIGHT', 1, 'RIGHT');\n MarginSide$TOP_instance = new MarginSide('TOP', 2, 'TOP');\n MarginSide$BOTTOM_instance = new MarginSide('BOTTOM', 3, 'BOTTOM');\n }\n var MarginSide$LEFT_instance;\n function MarginSide$LEFT_getInstance() {\n MarginSide_initFields();\n return MarginSide$LEFT_instance;\n }\n var MarginSide$RIGHT_instance;\n function MarginSide$RIGHT_getInstance() {\n MarginSide_initFields();\n return MarginSide$RIGHT_instance;\n }\n var MarginSide$TOP_instance;\n function MarginSide$TOP_getInstance() {\n MarginSide_initFields();\n return MarginSide$TOP_instance;\n }\n var MarginSide$BOTTOM_instance;\n function MarginSide$BOTTOM_getInstance() {\n MarginSide_initFields();\n return MarginSide$BOTTOM_instance;\n }\n MarginSide.prototype.toString = function () {\n return 'MarginSide ' + this.id_zg94u8$_0;\n };\n MarginSide.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'MarginSide',\n interfaces: [Enum]\n };\n function MarginSide$values() {\n return [MarginSide$LEFT_getInstance(), MarginSide$RIGHT_getInstance(), MarginSide$TOP_getInstance(), MarginSide$BOTTOM_getInstance()];\n }\n MarginSide.values = MarginSide$values;\n function MarginSide$valueOf(name) {\n switch (name) {\n case 'LEFT':\n return MarginSide$LEFT_getInstance();\n case 'RIGHT':\n return MarginSide$RIGHT_getInstance();\n case 'TOP':\n return MarginSide$TOP_getInstance();\n case 'BOTTOM':\n return MarginSide$BOTTOM_getInstance();\n default:\n throwISE('No enum constant jetbrains.datalore.plot.builder.MarginSide.' + name);\n }\n }\n MarginSide.valueOf_61zpoe$ = MarginSide$valueOf;\n function MarginalLayerUtil() {\n MarginalLayerUtil_instance = this;\n this.MARGINAL_SCALE_0 = scale.Scales.continuousDomain_shloz7$('marginal', true);\n this.MARGINAL_SCALE_REVERSED_0 = this.MARGINAL_SCALE_0.with().continuousTransform_gxz7zd$(transform.Transforms.REVERSE).build();\n this.MARGINAL_SCALES_0 = mapOf([to(MarginSide$LEFT_getInstance(), this.MARGINAL_SCALE_REVERSED_0), to(MarginSide$TOP_getInstance(), this.MARGINAL_SCALE_0), to(MarginSide$RIGHT_getInstance(), this.MARGINAL_SCALE_0), to(MarginSide$BOTTOM_getInstance(), this.MARGINAL_SCALE_REVERSED_0)]);\n }\n MarginalLayerUtil.prototype.marginalLayersByMargin_relqli$ = function (marginalLayers) {\n var tmp$;\n var accumulator = LinkedHashMap_init();\n tmp$ = marginalLayers.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n var map = accumulator;\n var key = element.marginalSide;\n var tmp$_0;\n var value = map.get_11rb$(key);\n if (value == null) {\n var answer = ArrayList_init();\n map.put_xwzc9p$(key, answer);\n tmp$_0 = answer;\n } else {\n tmp$_0 = value;\n }\n tmp$_0.add_11rb$(element);\n accumulator = map;\n }\n return accumulator;\n };\n MarginalLayerUtil.prototype.marginalDomainByMargin_2z8kva$ = function (marginalLayers, scaleXProto, scaleYProto) {\n var scaleXYByMargin = this.scaleXYByMargin_0(scaleXProto, scaleYProto);\n var layersByMargin = this.marginalLayersByMargin_relqli$(marginalLayers);\n var destination = LinkedHashMap_init_0(mapCapacity(layersByMargin.size));\n var tmp$;\n tmp$ = layersByMargin.entries.iterator();\n loop_label: while (tmp$.hasNext()) {\n var element = tmp$.next();\n var tmp$_0 = destination.put_xwzc9p$;\n var tmp$_1 = element.key;\n var transform$result;\n transform$break: do {\n var side = element.key;\n var layers = element.value;\n var tmp$_2 = getValue(scaleXYByMargin, side);\n var marginScaleXProto = tmp$_2.component1()\n , marginScaleYProto = tmp$_2.component2();\n var layersByTile = listOf(layers);\n var domainXYByTile = PositionalScalesUtil_getInstance().computePlotXYTransformedDomains_6ppuq6$(layersByTile, marginScaleXProto, marginScaleYProto, PlotFacets$Companion_getInstance().undefined());\n var tmp$_3 = first(domainXYByTile);\n var xDomain = tmp$_3.component1()\n , yDomain = tmp$_3.component2();\n switch (side.name) {\n case 'LEFT':\n case 'RIGHT':\n transform$result = xDomain;\n break transform$break;\n case 'TOP':\n case 'BOTTOM':\n transform$result = yDomain;\n break transform$break;\n default:\n transform$result = Kotlin.noWhenBranchMatched();\n break transform$break;\n }\n }\n while (false);\n tmp$_0.call(destination, tmp$_1, transform$result);\n }\n return destination;\n };\n MarginalLayerUtil.prototype.scaleXYByMargin_0 = function (scaleXProto, scaleYProto) {\n return mapOf([to(MarginSide$LEFT_getInstance(), new Pair(this.MARGINAL_SCALE_REVERSED_0, scaleYProto)), to(MarginSide$RIGHT_getInstance(), new Pair(this.MARGINAL_SCALE_0, scaleYProto)), to(MarginSide$TOP_getInstance(), new Pair(scaleXProto, this.MARGINAL_SCALE_0)), to(MarginSide$BOTTOM_getInstance(), new Pair(scaleXProto, this.MARGINAL_SCALE_REVERSED_0))]);\n };\n function MarginalLayerUtil$toMarginalScaleMap$isXAxis(closure$flipOrientation) {\n return function (aes) {\n var tmp$, tmp$_0;\n tmp$ = closure$flipOrientation;\n if (tmp$ === true)\n tmp$_0 = Aes.Companion.isPositionalY_896ixz$(aes);\n else if (tmp$ === false)\n tmp$_0 = Aes.Companion.isPositionalX_896ixz$(aes);\n else\n tmp$_0 = Kotlin.noWhenBranchMatched();\n return tmp$_0;\n };\n }\n function MarginalLayerUtil$toMarginalScaleMap$isYAxis(closure$flipOrientation) {\n return function (aes) {\n var tmp$, tmp$_0;\n tmp$ = closure$flipOrientation;\n if (tmp$ === true)\n tmp$_0 = Aes.Companion.isPositionalX_896ixz$(aes);\n else if (tmp$ === false)\n tmp$_0 = Aes.Companion.isPositionalY_896ixz$(aes);\n else\n tmp$_0 = Kotlin.noWhenBranchMatched();\n return tmp$_0;\n };\n }\n MarginalLayerUtil.prototype.toMarginalScaleMap_2q3kgy$ = function (scaleMap, margin, flipOrientation) {\n var isXAxis = MarginalLayerUtil$toMarginalScaleMap$isXAxis(flipOrientation);\n var isYAxis = MarginalLayerUtil$toMarginalScaleMap$isYAxis(flipOrientation);\n var destination = LinkedHashMap_init_0(mapCapacity(scaleMap.size));\n var tmp$;\n tmp$ = scaleMap.entries.iterator();\n loop_label: while (tmp$.hasNext()) {\n var element = tmp$.next();\n var tmp$_0 = destination.put_xwzc9p$;\n var tmp$_1 = element.key;\n var transform$result;\n transform$break: do {\n var aes = element.key;\n var scale = element.value;\n switch (margin.name) {\n case 'LEFT':\n case 'RIGHT':\n transform$result = isXAxis(aes) ? getValue(this.MARGINAL_SCALES_0, margin) : scale;\n break transform$break;\n case 'TOP':\n case 'BOTTOM':\n transform$result = isYAxis(aes) ? getValue(this.MARGINAL_SCALES_0, margin) : scale;\n break transform$break;\n default:\n transform$result = Kotlin.noWhenBranchMatched();\n break transform$break;\n }\n }\n while (false);\n tmp$_0.call(destination, tmp$_1, transform$result);\n }\n return destination;\n };\n MarginalLayerUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'MarginalLayerUtil',\n interfaces: []\n };\n var MarginalLayerUtil_instance = null;\n function MarginalLayerUtil_getInstance() {\n if (MarginalLayerUtil_instance === null) {\n new MarginalLayerUtil();\n }\n return MarginalLayerUtil_instance;\n }\n function PlotContainerPortable(plot, plotSize) {\n PlotContainerPortable$Companion_getInstance();\n this.plot = plot;\n this.svg = new SvgSvgElement();\n this.myContentBuilt_l8hvkk$_0 = false;\n this.myRegistrations_wwtuqx$_0 = new CompositeRegistration([]);\n this.svg.addClass_61zpoe$(Style_getInstance().PLOT_CONTAINER);\n this.setSvgSize_2l8z8v$_0(plotSize);\n this.plot.resize_gpjtzr$(plotSize);\n this.decorationLayerId = svg.SvgUID.get_61zpoe$(PlotContainerPortable$Companion_getInstance().DECORATION_LAYER_ID_PREFIX);\n }\n Object.defineProperty(PlotContainerPortable.prototype, 'liveMapFigures', {\n configurable: true,\n get: function () {\n return this.plot.liveMapFigures_8be2vx$;\n }\n });\n Object.defineProperty(PlotContainerPortable.prototype, 'isLiveMap', {\n configurable: true,\n get: function () {\n return !this.plot.liveMapFigures_8be2vx$.isEmpty();\n }\n });\n PlotContainerPortable.prototype.ensureContentBuilt = function () {\n if (!this.myContentBuilt_l8hvkk$_0) {\n this.buildContent();\n }\n };\n PlotContainerPortable.prototype.resize_gpjtzr$ = function (plotSize) {\n if (plotSize.x <= 0 || plotSize.y <= 0)\n return;\n if (plotSize != null ? plotSize.equals(this.plot.plotSize) : null)\n return;\n this.clearContent();\n this.setSvgSize_2l8z8v$_0(plotSize);\n this.plot.resize_gpjtzr$(plotSize);\n };\n function PlotContainerPortable$buildContent$ObjectLiteral(this$PlotContainerPortable, closure$id) {\n this.this$PlotContainerPortable = this$PlotContainerPortable;\n this.closure$id = closure$id;\n }\n PlotContainerPortable$buildContent$ObjectLiteral.prototype.css = function () {\n return Style_getInstance().generateCSS_kgh34e$(this.this$PlotContainerPortable.plot.styleSheet, this.closure$id, this.this$PlotContainerPortable.decorationLayerId);\n };\n PlotContainerPortable$buildContent$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [SvgCssResource]\n };\n PlotContainerPortable.prototype.buildContent = function () {\n if (!!this.myContentBuilt_l8hvkk$_0) {\n var message = 'Check failed.';\n throw IllegalStateException_init(message.toString());\n }\n this.myContentBuilt_l8hvkk$_0 = true;\n var id = svg.SvgUID.get_61zpoe$(PlotContainerPortable$Companion_getInstance().PLOT_ID_PREFIX);\n this.svg.setStyle_i8z0m3$(new PlotContainerPortable$buildContent$ObjectLiteral(this, id));\n this.plot.rootGroup.id().set_11rb$(id);\n this.svg.children().add_11rb$(this.plot.rootGroup);\n };\n PlotContainerPortable.prototype.clearContent = function () {\n if (this.myContentBuilt_l8hvkk$_0) {\n this.myContentBuilt_l8hvkk$_0 = false;\n this.svg.children().clear();\n this.plot.clear();\n this.myRegistrations_wwtuqx$_0.remove();\n this.myRegistrations_wwtuqx$_0 = new CompositeRegistration([]);\n }\n };\n PlotContainerPortable.prototype.reg_3xv6fb$ = function (registration) {\n this.myRegistrations_wwtuqx$_0.add_3xv6fb$(registration);\n };\n PlotContainerPortable.prototype.setSvgSize_2l8z8v$_0 = function (size) {\n this.svg.width().set_11rb$(size.x);\n this.svg.height().set_11rb$(size.y);\n };\n function PlotContainerPortable$Companion() {\n PlotContainerPortable$Companion_instance = this;\n this.PLOT_ID_PREFIX = 'p';\n this.DECORATION_LAYER_ID_PREFIX = 'd';\n }\n PlotContainerPortable$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var PlotContainerPortable$Companion_instance = null;\n function PlotContainerPortable$Companion_getInstance() {\n if (PlotContainerPortable$Companion_instance === null) {\n new PlotContainerPortable$Companion();\n }\n return PlotContainerPortable$Companion_instance;\n }\n PlotContainerPortable.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PlotContainerPortable',\n interfaces: []\n };\n function PlotSvgComponent(title, subtitle, caption, coreLayersByTile, marginalLayersByTile, plotLayout, frameProviderByTile, coordProvider, legendBoxInfos, interactionsEnabled, theme, styleSheet, plotContext) {\n PlotSvgComponent$Companion_getInstance();\n SvgComponent.call(this);\n this.title_0 = title;\n this.subtitle_0 = subtitle;\n this.caption_0 = caption;\n this.coreLayersByTile_0 = coreLayersByTile;\n this.marginalLayersByTile_0 = marginalLayersByTile;\n this.plotLayout_0 = plotLayout;\n this.frameProviderByTile_0 = frameProviderByTile;\n this.coordProvider_0 = coordProvider;\n this.legendBoxInfos_0 = legendBoxInfos;\n this.interactionsEnabled = interactionsEnabled;\n this.theme = theme;\n this.styleSheet = styleSheet;\n this.plotContext = plotContext;\n this.flippedAxis = this.frameProviderByTile_0.get_za3lpa$(0).flipAxis;\n this.mouseEventPeer = new MouseEventPeer();\n this.interactor_6ntbrr$_0 = null;\n this.liveMapFigures_8be2vx$_v4aopx$_0 = emptyList();\n this.plotSize_jypdvy$_0 = Defaults_getInstance().DEF_PLOT_SIZE;\n this.axisTitleLeft_0 = this.frameProviderByTile_0.get_za3lpa$(0).vAxisLabel;\n this.axisTitleBottom_0 = this.frameProviderByTile_0.get_za3lpa$(0).hAxisLabel;\n var $receiver = flatten(this.coreLayersByTile_0);\n var predicate = getPropertyCallableRef('isLiveMap', 1, function ($receiver) {\n return $receiver.isLiveMap;\n });\n var any$result;\n any$break: do {\n var tmp$;\n if (Kotlin.isType($receiver, Collection) && $receiver.isEmpty()) {\n any$result = false;\n break any$break;\n }\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n if (predicate(element)) {\n any$result = true;\n break any$break;\n }\n }\n any$result = false;\n }\n while (false);\n this.containsLiveMap_0 = any$result;\n }\n Object.defineProperty(PlotSvgComponent.prototype, 'interactor', {\n configurable: true,\n get: function () {\n return this.interactor_6ntbrr$_0;\n },\n set: function (value) {\n if (!(this.interactor_6ntbrr$_0 == null)) {\n var message = 'Can be initialize only once.';\n throw IllegalStateException_init(message.toString());\n }\n this.interactor_6ntbrr$_0 = value;\n }\n });\n Object.defineProperty(PlotSvgComponent.prototype, 'liveMapFigures_8be2vx$', {\n configurable: true,\n get: function () {\n return this.liveMapFigures_8be2vx$_v4aopx$_0;\n },\n set: function (liveMapFigures) {\n this.liveMapFigures_8be2vx$_v4aopx$_0 = liveMapFigures;\n }\n });\n Object.defineProperty(PlotSvgComponent.prototype, 'plotSize', {\n configurable: true,\n get: function () {\n return this.plotSize_jypdvy$_0;\n },\n set: function (plotSize) {\n this.plotSize_jypdvy$_0 = plotSize;\n }\n });\n function PlotSvgComponent$buildComponent$lambda() {\n return 'buildPlot';\n }\n PlotSvgComponent.prototype.buildComponent = function () {\n var tmp$, tmp$_0;\n try {\n this.buildPlot_0();\n } catch (e) {\n if (Kotlin.isType(e, RuntimeException)) {\n PlotSvgComponent$Companion_getInstance().LOG_0.error_l35kib$(e, PlotSvgComponent$buildComponent$lambda);\n var rootCause = base.Throwables.getRootCause_tcv7n7$(e);\n var messages = ['Error building plot: ' + Kotlin.getKClassFromExpression(rootCause).simpleName, rootCause.message != null ? \"'\" + rootCause.message + \"'\" : ''];\n var y = this.plotSize.y / 2 - 8;\n for (tmp$ = 0; tmp$ !== messages.length; ++tmp$) {\n var s = messages[tmp$];\n var errorLabel = new TextLabel(s);\n if (this.theme.plot().showBackground())\n tmp$_0 = this.theme.plot().textColor();\n else\n tmp$_0 = Defaults_getInstance().TEXT_COLOR;\n var textColor = tmp$_0;\n errorLabel.textColor().set_11rb$(textColor);\n errorLabel.setFontWeight_pdl1vj$('normal');\n errorLabel.setFontStyle_pdl1vj$('normal');\n errorLabel.setHorizontalAnchor_mf4siq$(Text$HorizontalAnchor.MIDDLE);\n errorLabel.setVerticalAnchor_yaylw0$(Text$VerticalAnchor.CENTER);\n errorLabel.moveTo_lu1900$(this.plotSize.x / 2, y);\n this.rootGroup.children().add_11rb$(errorLabel.rootGroup);\n y += 16.0;\n }\n } else\n throw e;\n }\n };\n function PlotSvgComponent$buildPlot$ObjectLiteral(this$PlotSvgComponent) {\n this.this$PlotSvgComponent = this$PlotSvgComponent;\n Registration.call(this);\n }\n PlotSvgComponent$buildPlot$ObjectLiteral.prototype.doRemove = function () {\n var tmp$;\n (tmp$ = this.this$PlotSvgComponent.interactor) != null ? (tmp$.dispose(), Unit) : null;\n this.this$PlotSvgComponent.liveMapFigures_8be2vx$ = emptyList();\n };\n PlotSvgComponent$buildPlot$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [Registration]\n };\n PlotSvgComponent.prototype.buildPlot_0 = function () {\n this.buildPlotComponents_0();\n this.reg_3xv6fb$(new PlotSvgComponent$buildPlot$ObjectLiteral(this));\n };\n PlotSvgComponent.prototype.resize_gpjtzr$ = function (plotSize) {\n if (plotSize.x <= 0 || plotSize.y <= 0)\n return;\n if (plotSize != null ? plotSize.equals(this.plotSize) : null)\n return;\n this.plotSize = plotSize;\n this.clear();\n };\n function PlotSvgComponent$buildPlotComponents$textRectangle(this$PlotSvgComponent) {\n return function (elementRect, margins) {\n return this$PlotSvgComponent.createTextRectangle_0(elementRect, margins.top, void 0, margins.bottom);\n };\n }\n PlotSvgComponent.prototype.buildPlotComponents_0 = function () {\n var tmp$, tmp$_0, tmp$_1, tmp$_2;\n var tmp$_3;\n var overallRect = new DoubleRectangle(DoubleVector.Companion.ZERO, this.plotSize);\n var plotTheme = this.theme.plot();\n if (plotTheme.showBackground()) {\n var $receiver = SvgRectElement_init(overallRect);\n $receiver.strokeColor().set_11rb$(plotTheme.backgroundColor());\n $receiver.strokeWidth().set_11rb$(plotTheme.backgroundStrokeWidth());\n $receiver.fillColor().set_11rb$(plotTheme.backgroundFill());\n if (this.containsLiveMap_0) {\n $receiver.fillOpacity().set_11rb$(0.0);\n }\n this.add_26jijc$($receiver);\n }\n if (PlotSvgComponent$Companion_getInstance().DEBUG_DRAWING_0) {\n this.drawDebugRect_0(overallRect, Color.Companion.MAGENTA, 'MAGENTA: overallRect');\n }\n if (this.containsLiveMap_0) {\n tmp$ = PlotLayoutUtil_getInstance().liveMapBounds_wthzt5$(overallRect);\n } else {\n tmp$ = overallRect;\n }\n var entirePlot = tmp$;\n var legendTheme = this.theme.legend();\n var legendsBlockInfo = LegendBoxesLayoutUtil_getInstance().arrangeLegendBoxes_wcxvwm$(this.legendBoxInfos_0, legendTheme);\n var axisEnabled = !this.containsLiveMap_0;\n var plotInnerSizeAvailable = PlotLayoutUtil_getInstance().subtractTitlesAndLegends_krgcoj$(entirePlot.dimension, this.title_0, this.subtitle_0, this.caption_0, this.axisTitleLeft_0, this.axisTitleBottom_0, axisEnabled, legendsBlockInfo, this.theme, this.flippedAxis);\n var plotInfo = this.plotLayout_0.doLayout_3twog0$(plotInnerSizeAvailable, this.coordProvider_0);\n if (plotInfo.tiles.isEmpty()) {\n return;\n }\n var plotInnerSize = plotInfo.size;\n var plotOuterSize = PlotLayoutUtil_getInstance().addTitlesAndLegends_krgcoj$(plotInnerSize, this.title_0, this.subtitle_0, this.caption_0, this.axisTitleLeft_0, this.axisTitleBottom_0, axisEnabled, legendsBlockInfo, this.theme, this.flippedAxis);\n var delta = overallRect.center.subtract_gpjtzr$((new DoubleRectangle(overallRect.origin, plotOuterSize)).center);\n var b = delta.x;\n var tmp$_4 = JsMath.max(0.0, b);\n var b_0 = delta.y;\n var deltaApplied = new DoubleVector(tmp$_4, JsMath.max(0.0, b_0));\n var plotOuterOrigin = overallRect.origin.add_gpjtzr$(deltaApplied);\n var plotOuterBounds = new DoubleRectangle(plotOuterOrigin, plotOuterSize);\n if (PlotSvgComponent$Companion_getInstance().DEBUG_DRAWING_0) {\n this.drawDebugRect_0(plotOuterBounds, Color.Companion.BLUE, 'BLUE: plotOuterBounds');\n }\n var titleSizeDelta = PlotLayoutUtil_getInstance().titleSizeDelta_9qd63d$(this.title_0, this.subtitle_0, this.theme.plot());\n var captionSizeDelta = PlotLayoutUtil_getInstance().captionSizeDelta_n8fzqq$(this.caption_0, this.theme.plot());\n var plotOuterBoundsWithoutTitleAndCaption = new DoubleRectangle(plotOuterBounds.origin.add_gpjtzr$(titleSizeDelta), plotOuterBounds.dimension.subtract_gpjtzr$(titleSizeDelta).subtract_gpjtzr$(captionSizeDelta));\n if (PlotSvgComponent$Companion_getInstance().DEBUG_DRAWING_0) {\n this.drawDebugRect_0(plotOuterBoundsWithoutTitleAndCaption, Color.Companion.BLUE, 'BLUE: plotOuterBoundsWithoutTitleAndCaption');\n }\n var plotInnerOrigin = plotOuterBoundsWithoutTitleAndCaption.origin.add_gpjtzr$(PlotLayoutUtil_getInstance().legendBlockLeftTopDelta_284vw0$(legendsBlockInfo, legendTheme)).add_gpjtzr$(PlotLayoutUtil_getInstance().axisTitleSizeDelta_5fzsug$(to(this.axisTitleLeft_0, PlotLabelSpecFactory_getInstance().axisTitle_9yvfuv$(this.theme.verticalAxis_6taknv$(this.flippedAxis))), to(null, PlotLabelSpec$Companion_getInstance().DUMMY), axisEnabled, PlotLayoutUtil_getInstance().axisMarginDimensions_1crrl9$(this.theme, this.flippedAxis)));\n var geomAreaBounds = PlotLayoutUtil_getInstance().overallGeomBounds_93w4c3$(plotInfo).add_gpjtzr$(plotInnerOrigin);\n var tilesOrigin = plotInnerOrigin;\n tmp$_0 = plotInfo.tiles.iterator();\n while (tmp$_0.hasNext()) {\n var tileLayoutInfo = tmp$_0.next();\n var tileIndex = tileLayoutInfo.trueIndex;\n var tileFrameProvider = this.frameProviderByTile_0.get_za3lpa$(tileIndex);\n var tileFrame = tileFrameProvider.createTileFrame_sd8y8$(tileLayoutInfo, this.coordProvider_0, PlotSvgComponent$Companion_getInstance().DEBUG_DRAWING_0);\n var marginalFrameByMargin = tileFrameProvider.createMarginalFrames_sd8y8$(tileLayoutInfo, this.coordProvider_0, PlotSvgComponent$Companion_getInstance().DEBUG_DRAWING_0);\n var tile = new PlotTile(this.coreLayersByTile_0.get_za3lpa$(tileIndex), this.marginalLayersByTile_0.get_za3lpa$(tileIndex), tilesOrigin, tileLayoutInfo, this.theme, tileFrame, marginalFrameByMargin);\n var plotOriginAbsolute = tilesOrigin.add_gpjtzr$(tileLayoutInfo.offset);\n tile.moveTo_gpjtzr$(plotOriginAbsolute);\n this.add_8icvvv$(tile);\n if ((tmp$_1 = tile.liveMapFigure) != null) {\n this.liveMapFigures_8be2vx$ = plus(this.liveMapFigures_8be2vx$, listOf(tmp$_1));\n }\n var geomOuterBoundsAbsolute = tileLayoutInfo.geomOuterBounds.add_gpjtzr$(plotOriginAbsolute);\n var geomInnerBoundsAbsolute = tileLayoutInfo.geomInnerBounds.add_gpjtzr$(plotOriginAbsolute);\n (tmp$_2 = this.interactor) != null ? (tmp$_2.onTileAdded_3frgn6$(geomInnerBoundsAbsolute, tile.targetLocators, tile.layerYOrientations, new DoubleVector(geomOuterBoundsAbsolute.left, geomOuterBoundsAbsolute.bottom)), Unit) : null;\n if (PlotSvgComponent$Companion_getInstance().DEBUG_DRAWING_0) {\n this.drawDebugRect_0(geomInnerBoundsAbsolute, Color.Companion.ORANGE, 'ORANGE: geomInnerBoundsAbsolute');\n }\n }\n if (PlotSvgComponent$Companion_getInstance().DEBUG_DRAWING_0) {\n this.drawDebugRect_0(geomAreaBounds, Color.Companion.RED, 'RED: geomAreaBounds');\n }\n var textRectangle = PlotSvgComponent$buildPlotComponents$textRectangle(this);\n var plotTitleElementRect = this.title_0 != null ? DoubleRectangle_init(geomAreaBounds.left, plotOuterBounds.top, geomAreaBounds.width, PlotLayoutUtil_getInstance().titleThickness_kyoegs$(this.title_0, PlotLabelSpecFactory_getInstance().plotTitle_5dhkxz$(plotTheme), this.theme.plot().titleMargins())) : null;\n var plotTitleTextRect = plotTitleElementRect != null ? textRectangle(plotTitleElementRect, this.theme.plot().titleMargins()) : null;\n if (PlotSvgComponent$Companion_getInstance().DEBUG_DRAWING_0) {\n if (plotTitleTextRect != null) {\n this.drawDebugRect_0(plotTitleTextRect, Color.Companion.LIGHT_BLUE);\n }\n if (plotTitleElementRect != null) {\n this.drawDebugRect_0(plotTitleElementRect, Color.Companion.GRAY);\n }\n if (plotTitleTextRect != null) {\n this.drawDebugRect_0(this.textBoundingBox_0(ensureNotNull(this.title_0), plotTitleTextRect, PlotLabelSpecFactory_getInstance().plotTitle_5dhkxz$(plotTheme), void 0, -1), Color.Companion.DARK_GREEN);\n }\n }\n var tmp$_5;\n if (this.subtitle_0 != null) {\n var tmp$_6;\n tmp$_5 = DoubleRectangle_init(geomAreaBounds.left, (tmp$_6 = plotTitleElementRect != null ? plotTitleElementRect.bottom : null) != null ? tmp$_6 : plotOuterBounds.top, geomAreaBounds.width, PlotLayoutUtil_getInstance().titleThickness_kyoegs$(this.subtitle_0, PlotLabelSpecFactory_getInstance().plotSubtitle_5dhkxz$(plotTheme), this.theme.plot().subtitleMargins()));\n } else\n tmp$_5 = null;\n var subtitleElementRect = tmp$_5;\n var subtitleTextRect = subtitleElementRect != null ? textRectangle(subtitleElementRect, this.theme.plot().subtitleMargins()) : null;\n if (PlotSvgComponent$Companion_getInstance().DEBUG_DRAWING_0) {\n if (subtitleTextRect != null) {\n this.drawDebugRect_0(subtitleTextRect, Color.Companion.LIGHT_BLUE);\n }\n if (subtitleElementRect != null) {\n this.drawDebugRect_0(subtitleElementRect, Color.Companion.GRAY);\n }\n if (subtitleTextRect != null) {\n this.drawDebugRect_0(this.textBoundingBox_0(ensureNotNull(this.subtitle_0), subtitleTextRect, PlotLabelSpecFactory_getInstance().plotTitle_5dhkxz$(plotTheme), void 0, -1), Color.Companion.DARK_GREEN);\n }\n }\n var tmp$_7;\n if (this.caption_0 != null) {\n var captionRectHeight = PlotLayoutUtil_getInstance().titleThickness_kyoegs$(this.caption_0, PlotLabelSpecFactory_getInstance().plotCaption_5dhkxz$(plotTheme), this.theme.plot().captionMargins());\n tmp$_7 = DoubleRectangle_init(geomAreaBounds.left, plotOuterBounds.bottom - captionRectHeight, geomAreaBounds.width, captionRectHeight);\n } else\n tmp$_7 = null;\n var captionElementRect = tmp$_7;\n var captionTextRect = captionElementRect != null ? textRectangle(captionElementRect, this.theme.plot().captionMargins()) : null;\n if (PlotSvgComponent$Companion_getInstance().DEBUG_DRAWING_0) {\n if (captionTextRect != null) {\n this.drawDebugRect_0(captionTextRect, Color.Companion.LIGHT_BLUE);\n }\n if (captionElementRect != null) {\n this.drawDebugRect_0(captionElementRect, Color.Companion.GRAY);\n }\n if (captionTextRect != null) {\n this.drawDebugRect_0(this.textBoundingBox_0(ensureNotNull(this.caption_0), captionTextRect, PlotLabelSpecFactory_getInstance().plotTitle_5dhkxz$(plotTheme), void 0, 1), Color.Companion.DARK_GREEN);\n }\n }\n if (plotTitleTextRect != null) {\n this.addTitle_0(this.title_0, PlotLabelSpecFactory_getInstance().plotTitle_5dhkxz$(plotTheme), plotTheme.titleJustification(), plotTitleTextRect, void 0, Style_getInstance().PLOT_TITLE);\n }\n if (subtitleTextRect != null) {\n this.addTitle_0(this.subtitle_0, PlotLabelSpecFactory_getInstance().plotSubtitle_5dhkxz$(plotTheme), plotTheme.subtitleJustification(), subtitleTextRect, void 0, Style_getInstance().PLOT_SUBTITLE);\n }\n var overallTileBounds = PlotLayoutUtil_getInstance().overallTileBounds_93w4c3$(plotInfo).add_gpjtzr$(plotInnerOrigin);\n if (PlotSvgComponent$Companion_getInstance().DEBUG_DRAWING_0) {\n this.drawDebugRect_0(overallTileBounds, Color.Companion.DARK_MAGENTA, 'DARK_MAGENTA: overallTileBounds');\n }\n if (axisEnabled) {\n if (this.axisTitleLeft_0 != null) {\n var vAxisOrientation = ensureNotNull(first(plotInfo.tiles).vAxisInfo).orientation;\n this.addAxisTitle_0(this.axisTitleLeft_0, vAxisOrientation, overallTileBounds, geomAreaBounds, PlotLabelSpecFactory_getInstance().axisTitle_9yvfuv$(this.theme.verticalAxis_6taknv$(this.flippedAxis)), this.theme.verticalAxis_6taknv$(this.flippedAxis).titleJustification(), this.theme.verticalAxis_6taknv$(this.flippedAxis).titleMargins(), Style_getInstance().AXIS_TITLE + '-' + this.theme.verticalAxis_6taknv$(this.flippedAxis).axis);\n }\n if (this.axisTitleBottom_0 != null) {\n var hAxisOrientation = ensureNotNull(first(plotInfo.tiles).hAxisInfo).orientation;\n this.addAxisTitle_0(this.axisTitleBottom_0, hAxisOrientation, overallTileBounds, geomAreaBounds, PlotLabelSpecFactory_getInstance().axisTitle_9yvfuv$(this.theme.horizontalAxis_6taknv$(this.flippedAxis)), this.theme.horizontalAxis_6taknv$(this.flippedAxis).titleJustification(), this.theme.horizontalAxis_6taknv$(this.flippedAxis).titleMargins(), Style_getInstance().AXIS_TITLE + '-' + this.theme.horizontalAxis_6taknv$(this.flippedAxis).axis);\n }\n }\n if (!legendTheme.position().isHidden) {\n var legendsBlockInfoLayouted = (new LegendBoxesLayout(plotOuterBoundsWithoutTitleAndCaption, geomAreaBounds, legendTheme)).doLayout_mx3cup$(legendsBlockInfo);\n tmp$_3 = legendsBlockInfoLayouted.boxWithLocationList.iterator();\n while (tmp$_3.hasNext()) {\n var boxWithLocation = tmp$_3.next();\n var legendBox = boxWithLocation.legendBox.createLegendBox();\n legendBox.moveTo_gpjtzr$(boxWithLocation.location);\n this.add_8icvvv$(legendBox);\n }\n }\n if (captionTextRect != null) {\n this.addTitle_0(this.caption_0, PlotLabelSpecFactory_getInstance().plotCaption_5dhkxz$(plotTheme), plotTheme.captionJustification(), captionTextRect, void 0, Style_getInstance().PLOT_CAPTION);\n }\n };\n PlotSvgComponent.prototype.createTextRectangle_0 = function (elementRect, topMargin, rightMargin, bottomMargin, leftMargin) {\n if (topMargin === void 0)\n topMargin = 0.0;\n if (rightMargin === void 0)\n rightMargin = 0.0;\n if (bottomMargin === void 0)\n bottomMargin = 0.0;\n if (leftMargin === void 0)\n leftMargin = 0.0;\n return DoubleRectangle_init(elementRect.left + leftMargin, elementRect.top + topMargin, elementRect.width - (rightMargin + leftMargin), elementRect.height - (topMargin + bottomMargin));\n };\n PlotSvgComponent.prototype.addAxisTitle_0 = function (text, orientation, overallTileBounds, overallGeomBounds, labelSpec, justification, margins, className) {\n var tmp$, tmp$_0, tmp$_1, tmp$_2;\n switch (orientation.name) {\n case 'LEFT':\n case 'RIGHT':\n tmp$ = DoubleRectangle_init(overallTileBounds.left, overallGeomBounds.top, overallTileBounds.width, overallGeomBounds.height);\n break;\n case 'TOP':\n case 'BOTTOM':\n tmp$ = DoubleRectangle_init(overallGeomBounds.left, overallTileBounds.top, overallGeomBounds.width, overallTileBounds.height);\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n var referenceRect = tmp$;\n switch (orientation.name) {\n case 'LEFT':\n tmp$_0 = TextJustification$Companion$TextRotation$ANTICLOCKWISE_getInstance();\n break;\n case 'RIGHT':\n tmp$_0 = TextJustification$Companion$TextRotation$ANTICLOCKWISE_getInstance();\n break;\n default:\n tmp$_0 = null;\n break;\n }\n var rotation = tmp$_0;\n var textHeight = PlotLayoutUtil_getInstance().textDimensions_1al14g$(text, labelSpec).y;\n switch (orientation.name) {\n case 'LEFT':\n tmp$_1 = DoubleRectangle_init(referenceRect.left - textHeight - margins.width(), referenceRect.top, textHeight + margins.width(), referenceRect.height);\n break;\n case 'RIGHT':\n tmp$_1 = DoubleRectangle_init(referenceRect.right, referenceRect.top, textHeight + margins.width(), referenceRect.height);\n break;\n case 'TOP':\n tmp$_1 = DoubleRectangle_init(referenceRect.left, referenceRect.top - textHeight - margins.height(), referenceRect.width, textHeight + margins.height());\n break;\n case 'BOTTOM':\n tmp$_1 = DoubleRectangle_init(referenceRect.left, referenceRect.bottom, referenceRect.width, textHeight + margins.height());\n break;\n default:\n tmp$_1 = Kotlin.noWhenBranchMatched();\n break;\n }\n var axisTitleElementRect = tmp$_1;\n if (orientation.isHorizontal)\n tmp$_2 = this.createTextRectangle_0(axisTitleElementRect, margins.top, void 0, margins.bottom);\n else {\n tmp$_2 = this.createTextRectangle_0(axisTitleElementRect, void 0, margins.right, void 0, margins.left);\n }\n var axisTitleTextRect = tmp$_2;\n this.addTitle_0(text, labelSpec, justification, axisTitleTextRect, rotation, className);\n if (PlotSvgComponent$Companion_getInstance().DEBUG_DRAWING_0) {\n this.drawDebugRect_0(axisTitleTextRect, Color.Companion.LIGHT_BLUE);\n this.drawDebugRect_0(axisTitleElementRect, Color.Companion.GRAY);\n this.drawDebugRect_0(this.textBoundingBox_0(text, axisTitleTextRect, labelSpec, orientation), Color.Companion.DARK_GREEN);\n }\n };\n PlotSvgComponent.prototype.textBoundingBox_0 = function (text, boundRect, labelSpec, orientation, align) {\n if (orientation === void 0)\n orientation = Orientation$TOP_getInstance();\n if (align === void 0)\n align = 0;\n var tmp$, tmp$_0, tmp$_1;\n var d = PlotLayoutUtil_getInstance().textDimensions_1al14g$(text, labelSpec);\n if (listOf_0([Orientation$TOP_getInstance(), Orientation$BOTTOM_getInstance()]).contains_11rb$(orientation)) {\n if (align > 0)\n tmp$ = boundRect.right - d.x;\n else if (align < 0)\n tmp$ = boundRect.left;\n else\n tmp$ = boundRect.center.x - d.x / 2;\n var x = tmp$;\n tmp$_1 = DoubleRectangle_init(x, boundRect.center.y - d.y / 2, d.x, d.y);\n } else {\n if (align > 0)\n tmp$_0 = boundRect.bottom - d.x;\n else if (align < 0)\n tmp$_0 = boundRect.top;\n else\n tmp$_0 = boundRect.center.y - d.x / 2;\n var y = tmp$_0;\n tmp$_1 = DoubleRectangle_init(boundRect.center.x - d.y / 2, y, d.y, d.x);\n }\n return tmp$_1;\n };\n PlotSvgComponent.prototype.addTitle_0 = function (title, labelSpec, justification, boundRect, rotation, className) {\n if (rotation === void 0)\n rotation = null;\n var tmp$;\n if (title == null)\n return;\n var lineHeight = labelSpec.height();\n var titleLabel = new MultilineLabel(title);\n titleLabel.addClassName_61zpoe$(className);\n var tmp$_0 = TextJustification$Companion_getInstance().applyJustification_x3kzr8$(boundRect, PlotLayoutUtil_getInstance().textDimensions_1al14g$(title, labelSpec), lineHeight, justification, rotation);\n var position = tmp$_0.component1()\n , hAnchor = tmp$_0.component2();\n titleLabel.setLineHeight_14dthe$(lineHeight);\n titleLabel.setHorizontalAnchor_mf4siq$(hAnchor);\n titleLabel.moveTo_gpjtzr$(position);\n if ((tmp$ = rotation != null ? rotation.angle : null) != null) {\n getCallableRef('rotate', function ($receiver, p1) {\n return $receiver.rotate_14dthe$(p1), Unit;\n }.bind(null, titleLabel))(tmp$);\n }\n this.add_8icvvv$(titleLabel);\n };\n PlotSvgComponent.prototype.drawDebugRect_0 = function (r, color, message) {\n if (message === void 0)\n message = null;\n var rect = SvgRectElement_init(r);\n rect.strokeColor().set_11rb$(color);\n rect.strokeWidth().set_11rb$(1.0);\n rect.fillOpacity().set_11rb$(0.0);\n if (message != null) {\n this.onMouseMove_0(rect, toString(message) + ': ' + r);\n }\n this.add_26jijc$(rect);\n };\n function PlotSvgComponent$onMouseMove$ObjectLiteral(closure$message) {\n this.closure$message = closure$message;\n }\n PlotSvgComponent$onMouseMove$ObjectLiteral.prototype.handle_42da0z$ = function (node, e) {\n println(this.closure$message);\n };\n PlotSvgComponent$onMouseMove$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [SvgEventHandler]\n };\n PlotSvgComponent.prototype.onMouseMove_0 = function (e, message) {\n e.addEventHandler_mm8kk2$(SvgEventSpec.MOUSE_MOVE, new PlotSvgComponent$onMouseMove$ObjectLiteral(message));\n };\n function PlotSvgComponent$Companion() {\n PlotSvgComponent$Companion_instance = this;\n this.LOG_0 = logging.PortableLogging.logger_xo1ogr$(getKClass(PlotSvgComponent));\n this.DEBUG_DRAWING_0 = FeatureSwitch_getInstance().PLOT_DEBUG_DRAWING;\n }\n PlotSvgComponent$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var PlotSvgComponent$Companion_instance = null;\n function PlotSvgComponent$Companion_getInstance() {\n if (PlotSvgComponent$Companion_instance === null) {\n new PlotSvgComponent$Companion();\n }\n return PlotSvgComponent$Companion_instance;\n }\n PlotSvgComponent.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PlotSvgComponent',\n interfaces: [SvgComponent]\n };\n function PlotTile(coreLayers, marginalLayers, tilesOrigin, tileLayoutInfo, theme, frameOfReference, marginalFrameByMargin) {\n PlotTile$Companion_getInstance();\n SvgComponent.call(this);\n this.coreLayers_0 = coreLayers;\n this.marginalLayers_0 = marginalLayers;\n this.tilesOrigin_0 = tilesOrigin;\n this.tileLayoutInfo_0 = tileLayoutInfo;\n this.theme_0 = theme;\n this.frameOfReference_0 = frameOfReference;\n this.marginalFrameByMargin_0 = marginalFrameByMargin;\n this._targetLocators_0 = ArrayList_init();\n this.liveMapFigure_y5x745$_0 = null;\n var $receiver = this.coreLayers_0;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n destination.add_11rb$(item.isYOrientation);\n }\n this.layerYOrientations = destination;\n this.moveTo_gpjtzr$(this.tileLayoutInfo_0.getAbsoluteBounds_gpjtzr$(this.tilesOrigin_0).origin);\n }\n Object.defineProperty(PlotTile.prototype, 'liveMapFigure', {\n configurable: true,\n get: function () {\n return this.liveMapFigure_y5x745$_0;\n },\n set: function (liveMapFigure) {\n this.liveMapFigure_y5x745$_0 = liveMapFigure;\n }\n });\n Object.defineProperty(PlotTile.prototype, 'targetLocators', {\n configurable: true,\n get: function () {\n return this._targetLocators_0;\n }\n });\n PlotTile.prototype.buildComponent = function () {\n var tmp$, tmp$_0, tmp$_1;\n var geomOuterBounds = this.tileLayoutInfo_0.geomOuterBounds;\n this.addFacetLabels_0(geomOuterBounds, this.theme_0.facets());\n var $receiver = this.coreLayers_0;\n var firstOrNull$result;\n firstOrNull$break: do {\n var tmp$_2;\n tmp$_2 = $receiver.iterator();\n while (tmp$_2.hasNext()) {\n var element = tmp$_2.next();\n if (element.isLiveMap) {\n firstOrNull$result = element;\n break firstOrNull$break;\n }\n }\n firstOrNull$result = null;\n }\n while (false);\n var liveMapGeomLayer = firstOrNull$result;\n if (liveMapGeomLayer != null) {\n var realBounds = this.tileLayoutInfo_0.getAbsoluteOuterGeomBounds_gpjtzr$(this.tilesOrigin_0);\n var liveMapData = PlotTile$Companion_getInstance().createCanvasFigure_0(liveMapGeomLayer, realBounds);\n this.liveMapFigure = liveMapData.canvasFigure;\n this._targetLocators_0.add_11rb$(liveMapData.targetLocator);\n } else {\n this.frameOfReference_0.drawBeforeGeomLayer_8icvvv$(this);\n tmp$ = this.coreLayers_0.iterator();\n while (tmp$.hasNext()) {\n var layer = tmp$.next();\n var collectorWithLocator = new LayerTargetCollectorWithLocator(layer.geomKind, layer.locatorLookupSpec, layer.createContextualMapping());\n this._targetLocators_0.add_11rb$(collectorWithLocator);\n var layerComponent = this.frameOfReference_0.buildGeomComponent_ge0scz$(layer, collectorWithLocator);\n this.add_8icvvv$(layerComponent);\n }\n var marginalLayersByMargin = MarginalLayerUtil_getInstance().marginalLayersByMargin_relqli$(this.marginalLayers_0);\n tmp$_0 = marginalLayersByMargin.entries.iterator();\n while (tmp$_0.hasNext()) {\n var tmp$_3 = tmp$_0.next();\n var margin = tmp$_3.key;\n var layers = tmp$_3.value;\n var marginFrame = getValue(this.marginalFrameByMargin_0, margin);\n tmp$_1 = layers.iterator();\n while (tmp$_1.hasNext()) {\n var layer_0 = tmp$_1.next();\n var marginComponent = marginFrame.buildGeomComponent_ge0scz$(layer_0, new NullGeomTargetCollector());\n this.add_8icvvv$(marginComponent);\n }\n }\n this.frameOfReference_0.drawAfterGeomLayer_8icvvv$(this);\n }\n };\n PlotTile.prototype.addFacetLabels_0 = function (geomBounds, theme) {\n var tmp$;\n var xLabels = this.tileLayoutInfo_0.facetXLabels;\n if (!xLabels.isEmpty()) {\n var labelSize = FacetedPlotLayout$Companion_getInstance().facetColLabelSize_14dthe$(geomBounds.width);\n var labelOrig = new DoubleVector(geomBounds.left + 0, geomBounds.top - FacetedPlotLayout$Companion_getInstance().facetColHeadHeight_za3lpa$(xLabels.size) + 6);\n var labelBounds = new DoubleRectangle(labelOrig, labelSize);\n tmp$ = xLabels.iterator();\n while (tmp$.hasNext()) {\n var xLabel = tmp$.next();\n this.addFacetLabBackground_0(labelBounds, theme);\n var x = labelBounds.center.x;\n var y = labelBounds.center.y;\n var lab = new TextLabel(xLabel);\n lab.addClassName_61zpoe$('facet-strip-text-x');\n lab.moveTo_lu1900$(x, y);\n lab.setHorizontalAnchor_mf4siq$(Text$HorizontalAnchor.MIDDLE);\n lab.setVerticalAnchor_yaylw0$(Text$VerticalAnchor.CENTER);\n this.add_8icvvv$(lab);\n labelBounds = labelBounds.add_gpjtzr$(new DoubleVector(0.0, labelSize.y));\n }\n }\n if (this.tileLayoutInfo_0.facetYLabel != null) {\n var hPad = 6;\n var vPad = 0;\n var labelBounds_0 = DoubleRectangle_init(geomBounds.right + hPad, geomBounds.top - vPad, FacetedPlotLayout$Companion_getInstance().FACET_TAB_HEIGHT - (hPad * 2 | 0), geomBounds.height - (vPad * 2 | 0));\n this.addFacetLabBackground_0(labelBounds_0, theme);\n var x_0 = labelBounds_0.center.x;\n var y_0 = labelBounds_0.center.y;\n var lab_0 = new TextLabel(this.tileLayoutInfo_0.facetYLabel);\n lab_0.addClassName_61zpoe$('facet-strip-text-y');\n lab_0.moveTo_lu1900$(x_0, y_0);\n lab_0.setHorizontalAnchor_mf4siq$(Text$HorizontalAnchor.MIDDLE);\n lab_0.setVerticalAnchor_yaylw0$(Text$VerticalAnchor.CENTER);\n lab_0.rotate_14dthe$(90.0);\n this.add_8icvvv$(lab_0);\n }\n };\n PlotTile.prototype.addFacetLabBackground_0 = function (labelBounds, facetTheme) {\n if (facetTheme.showStripBackground()) {\n var $receiver = SvgRectElement_init(labelBounds);\n $receiver.strokeWidth().set_11rb$(facetTheme.stripStrokeWidth());\n $receiver.fillColor().set_11rb$(facetTheme.stripFill());\n $receiver.strokeColor().set_11rb$(facetTheme.stripColor());\n var rect = $receiver;\n this.add_26jijc$(rect);\n }\n };\n function PlotTile$Companion() {\n PlotTile$Companion_instance = this;\n }\n PlotTile$Companion.prototype.createCanvasFigure_0 = function (layer, bounds) {\n var tmp$;\n return (Kotlin.isType(tmp$ = layer.geom, LiveMapGeom) ? tmp$ : throwCCE()).createCanvasFigure_wthzt5$(bounds);\n };\n PlotTile$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var PlotTile$Companion_instance = null;\n function PlotTile$Companion_getInstance() {\n if (PlotTile$Companion_instance === null) {\n new PlotTile$Companion();\n }\n return PlotTile$Companion_instance;\n }\n PlotTile.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PlotTile',\n interfaces: [SvgComponent]\n };\n function PlotUtil() {\n PlotUtil_instance = this;\n }\n function PlotUtil$createPositionAdjustment$ObjectLiteral(closure$aes) {\n this.closure$aes = closure$aes;\n this.groupCount_n24wkg$_0 = lazy(PlotUtil$createPositionAdjustment$ObjectLiteral$groupCount$lambda(closure$aes));\n }\n Object.defineProperty(PlotUtil$createPositionAdjustment$ObjectLiteral.prototype, 'aesthetics', {\n configurable: true,\n get: function () {\n return this.closure$aes;\n }\n });\n Object.defineProperty(PlotUtil$createPositionAdjustment$ObjectLiteral.prototype, 'groupCount', {\n configurable: true,\n get: function () {\n return this.groupCount_n24wkg$_0.value;\n }\n });\n function PlotUtil$createPositionAdjustment$ObjectLiteral$groupCount$lambda(closure$aes) {\n return function () {\n var set = toSet(closure$aes.groups());\n return set.size;\n };\n }\n PlotUtil$createPositionAdjustment$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [PosProviderContext]\n };\n PlotUtil.prototype.createPositionAdjustment_h0u0lr$ = function (posProvider, aes) {\n return posProvider.createPos_q7kk9g$(new PlotUtil$createPositionAdjustment$ObjectLiteral(aes));\n };\n PlotUtil.prototype.prepareLayerAestheticMappers_evxbuk$ = function (layer, xAesMapper, yAesMapper) {\n var tmp$, tmp$_0;\n var yOrientation = layer.isYOrientation;\n var mappers = HashMap_init();\n var renderedAes = plus(layer.renderedAes(), listOf_0([Aes.Companion.X, Aes.Companion.Y]));\n tmp$ = renderedAes.iterator();\n while (tmp$.hasNext()) {\n var aes = tmp$.next();\n if (equals(aes, Aes.Companion.SLOPE))\n tmp$_0 = scale.Mappers.mul_14dthe$(ensureNotNull(yAesMapper.invoke_yrwdxb$(1.0)) / ensureNotNull(xAesMapper.invoke_yrwdxb$(1.0)));\n else if (equals(aes, Aes.Companion.X))\n tmp$_0 = xAesMapper;\n else if (equals(aes, Aes.Companion.Y))\n tmp$_0 = yAesMapper;\n else if (Aes.Companion.isPositionalX_896ixz$(aes))\n tmp$_0 = yOrientation ? yAesMapper : xAesMapper;\n else if (Aes.Companion.isPositionalY_896ixz$(aes))\n tmp$_0 = yOrientation ? xAesMapper : yAesMapper;\n else if (layer.hasBinding_896ixz$(aes))\n tmp$_0 = getValue(layer.scaleMapppersNP, aes);\n else\n tmp$_0 = null;\n var mapper = tmp$_0;\n if (mapper != null) {\n mappers.put_xwzc9p$(aes, mapper);\n }\n }\n return mappers;\n };\n PlotUtil.prototype.createLayerAesthetics_6wb5xp$ = function (layer, aesList, mapperByAes) {\n var tmp$, tmp$_0, tmp$_1, tmp$_2;\n var aesBuilder = new AestheticsBuilder();\n aesBuilder.group_ddsh32$(layer.group);\n var hasPositionalConstants = false;\n tmp$ = aesList.iterator();\n while (tmp$.hasNext()) {\n var aes = tmp$.next();\n if (Aes.Companion.isPositional_896ixz$(aes) && layer.hasConstant_896ixz$(aes)) {\n hasPositionalConstants = true;\n break;\n }\n }\n var data_0 = layer.dataFrame;\n var dataPointCount = {v: null};\n tmp$_0 = aesList.iterator();\n while (tmp$_0.hasNext()) {\n var aes_0 = tmp$_0.next();\n var aes_1 = Kotlin.isType(tmp$_1 = aes_0, Aes) ? tmp$_1 : throwCCE();\n if (Aes.Companion.isPositional_896ixz$(aes_1))\n tmp$_2 = scale.Mappers.IDENTITY;\n else\n tmp$_2 = mapperByAes.get_11rb$(aes_1);\n var mapperOption = tmp$_2;\n if (layer.hasConstant_896ixz$(aes_1)) {\n var v = layer.getConstant_31786j$(aes_1);\n var t = this.transformIfContinuous_0(this.scale_0(aes_1, layer));\n aesBuilder.constantAes_bbdhip$(aes_1, this.constantToAesValue_0(aes_1, v, t, mapperOption));\n } else {\n if (layer.hasBinding_896ixz$(aes_1)) {\n if (!(mapperOption != null)) {\n var message = 'No scale mapper defined for aesthetic ' + aes_1;\n throw IllegalStateException_init(message.toString());\n }\n var transformVar = data.DataFrameUtil.transformVarFor_896ixz$(aes_1);\n if (!data_0.has_8xm3sj$(transformVar)) {\n var message_0 = 'Undefined var ' + transformVar + ' for aesthetic ' + aes_1;\n throw IllegalStateException_init(message_0.toString());\n }\n var numericValues = data_0.getNumeric_8xm3sj$(transformVar);\n if (dataPointCount.v == null) {\n dataPointCount.v = numericValues.size;\n } else {\n if (!(dataPointCount.v === numericValues.size)) {\n var message_1 = '' + toString(aes_1) + ' expected data size=' + toString(dataPointCount.v) + ' was size=' + toString(numericValues.size);\n throw IllegalStateException_init(message_1.toString());\n }\n }\n if (dataPointCount.v === 0 && hasPositionalConstants) {\n aesBuilder.constantAes_bbdhip$(aes_1, layer.aestheticsDefaults.defaultValue_31786j$(aes_1));\n } else {\n var integerFunction = AestheticsBuilder.Companion.listMapper_ci44bt$(numericValues, mapperOption);\n aesBuilder.aes_u42xfl$(aes_1, integerFunction);\n }\n } else {\n var v_0 = layer.getDefault_31786j$(aes_1);\n var t_0 = this.transformIfContinuous_0(this.scale_0(aes_1, layer));\n aesBuilder.constantAes_bbdhip$(aes_1, this.constantToAesValue_0(aes_1, v_0, t_0, mapperOption));\n }\n }\n }\n if (dataPointCount.v != null && dataPointCount.v > 0) {\n aesBuilder.dataPointCount_za3lpa$(dataPointCount.v);\n } else if (hasPositionalConstants) {\n aesBuilder.dataPointCount_za3lpa$(1);\n }\n return aesBuilder.build();\n };\n PlotUtil.prototype.constantToAesValue_0 = function (aes, v, continuousTransform, mapperOption) {\n var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3, tmp$_4;\n if (aes.isNumeric) {\n if (continuousTransform != null) {\n tmp$_0 = continuousTransform.isInDomain_yrwdxb$(typeof (tmp$ = v) === 'number' ? tmp$ : throwCCE());\n if (tmp$_0 === true)\n tmp$_2 = continuousTransform.apply_yrwdxb$(v);\n else if (tmp$_0 === false)\n tmp$_2 = null;\n else\n tmp$_2 = Kotlin.noWhenBranchMatched();\n } else {\n tmp$_2 = typeof (tmp$_1 = v) === 'number' ? tmp$_1 : null;\n }\n var transformed = tmp$_2;\n tmp$_4 = (tmp$_3 = mapperOption != null ? mapperOption.invoke_yrwdxb$(transformed) : null) != null ? tmp$_3 : transformed;\n } else {\n tmp$_4 = v;\n }\n return tmp$_4;\n };\n PlotUtil.prototype.rangeWithExpand_wxtkag$ = function (range, scale, includeZero) {\n var tmp$, tmp$_0;\n if (range == null)\n return null;\n var mulExp = scale.multiplicativeExpand;\n var addExp = scale.additiveExpand;\n var continuousTransform = this.transformIfContinuous_0(scale);\n var domain = new DoubleSpan((tmp$ = continuousTransform != null ? continuousTransform.applyInverse_yrwdxb$(range.lowerEnd) : null) != null ? tmp$ : range.lowerEnd, (tmp$_0 = continuousTransform != null ? continuousTransform.applyInverse_yrwdxb$(range.upperEnd) : null) != null ? tmp$_0 : range.upperEnd);\n var lowerEndpoint = domain.lowerEnd;\n var upperEndpoint = domain.upperEnd;\n var length = upperEndpoint - lowerEndpoint;\n var lowerExpand = addExp + length * mulExp;\n var upperExpand = lowerExpand;\n if (includeZero) {\n var tmp$_1 = lowerEndpoint === 0.0 || upperEndpoint === 0.0;\n if (!tmp$_1) {\n tmp$_1 = nativeSign(lowerEndpoint) === nativeSign(upperEndpoint);\n }\n if (tmp$_1) {\n if (lowerEndpoint >= 0) {\n lowerExpand = 0.0;\n } else {\n upperExpand = 0.0;\n }\n }\n }\n var it = lowerEndpoint - lowerExpand;\n var block$result;\n var tmp$_2;\n var transformed = (tmp$_2 = continuousTransform != null ? continuousTransform.apply_yrwdxb$(it) : null) != null ? tmp$_2 : it;\n if (isNaN_0(transformed)) {\n block$result = range.lowerEnd;\n } else {\n block$result = transformed;\n }\n var lowerEndWithExpand = block$result;\n var it_0 = upperEndpoint + upperExpand;\n var block$result_0;\n var tmp$_3;\n var transformed_0 = (tmp$_3 = continuousTransform != null ? continuousTransform.apply_yrwdxb$(it_0) : null) != null ? tmp$_3 : it_0;\n if (isNaN_0(transformed_0)) {\n block$result_0 = range.upperEnd;\n } else {\n block$result_0 = transformed_0;\n }\n var upperEndWithExpand = block$result_0;\n return new DoubleSpan(lowerEndWithExpand, upperEndWithExpand);\n };\n PlotUtil.prototype.transformIfContinuous_0 = function (scale) {\n var tmp$, tmp$_0;\n if (scale == null)\n return null;\n if (scale.isContinuousDomain) {\n tmp$_0 = Kotlin.isType(tmp$ = scale.transform, ContinuousTransform) ? tmp$ : throwCCE();\n } else {\n tmp$_0 = null;\n }\n return tmp$_0;\n };\n PlotUtil.prototype.scale_0 = function (aes, layer) {\n var tmp$, tmp$_0;\n if (Aes.Companion.isPositionalXY_896ixz$(aes))\n tmp$ = Aes.Companion.toAxisAes_pnj1mo$(aes, layer.isYOrientation);\n else\n tmp$ = aes;\n var aes_0 = tmp$;\n if (layer.scaleMap.containsKey_896ixz$(aes_0)) {\n tmp$_0 = layer.scaleMap.get_31786j$(aes_0);\n } else {\n tmp$_0 = null;\n }\n return tmp$_0;\n };\n function PlotUtil$DemoAndTest() {\n PlotUtil$DemoAndTest_instance = this;\n }\n PlotUtil$DemoAndTest.prototype.layerAestheticsWithoutLayout_sqg2xh$ = function (layer) {\n var mappers = PlotUtil_getInstance().prepareLayerAestheticMappers_evxbuk$(layer, scale.Mappers.IDENTITY, scale.Mappers.IDENTITY);\n return PlotUtil_getInstance().createLayerAesthetics_6wb5xp$(layer, layer.renderedAes(), mappers);\n };\n PlotUtil$DemoAndTest.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'DemoAndTest',\n interfaces: []\n };\n var PlotUtil$DemoAndTest_instance = null;\n function PlotUtil$DemoAndTest_getInstance() {\n if (PlotUtil$DemoAndTest_instance === null) {\n new PlotUtil$DemoAndTest();\n }\n return PlotUtil$DemoAndTest_instance;\n }\n PlotUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'PlotUtil',\n interfaces: []\n };\n var PlotUtil_instance = null;\n function PlotUtil_getInstance() {\n if (PlotUtil_instance === null) {\n new PlotUtil();\n }\n return PlotUtil_instance;\n }\n function PosProviderContext() {\n }\n PosProviderContext.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'PosProviderContext',\n interfaces: []\n };\n function SvgLayerRenderer(aesthetics, geom, pos, coord, geomContext) {\n SvgComponent.call(this);\n this.aesthetics_0 = aesthetics;\n this.geom_0 = geom;\n this.pos_0 = pos;\n this.coord_0 = coord;\n this.geomContext_0 = geomContext;\n }\n SvgLayerRenderer.prototype.buildComponent = function () {\n this.buildLayer_0();\n };\n SvgLayerRenderer.prototype.buildLayer_0 = function () {\n this.geom_0.build_uzv8ab$(this, this.aesthetics_0, this.pos_0, this.coord_0, this.geomContext_0);\n };\n SvgLayerRenderer.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'SvgLayerRenderer',\n interfaces: [SvgRoot, SvgComponent]\n };\n function VarBinding(variable, aes) {\n this.variable = variable;\n this.aes = aes;\n }\n VarBinding.prototype.toString = function () {\n return 'VarBinding{variable=' + this.variable + ', aes=' + this.aes;\n };\n VarBinding.prototype.equals = function (other) {\n var tmp$, tmp$_0;\n if (this === other)\n return true;\n if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null))\n return false;\n Kotlin.isType(tmp$_0 = other, VarBinding) ? tmp$_0 : throwCCE();\n if (!equals(this.variable, other.variable))\n return false;\n if (!equals(this.aes, other.aes))\n return false;\n return true;\n };\n VarBinding.prototype.hashCode = function () {\n var result = hashCode(this.variable);\n result = (31 * result | 0) + hashCode(this.aes) | 0;\n return result;\n };\n VarBinding.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'VarBinding',\n interfaces: []\n };\n function AnnotationLine(pattern, fields) {\n AnnotationLine$Companion_getInstance();\n LinesContentSpecification$Companion$LineSpec.call(this, null, pattern, fields);\n this.myLineFormatter_0 = StringFormat.Companion.forNArgs_zeh6sj$(pattern, fields.size, 'fields');\n }\n AnnotationLine.prototype.initDataContext_nqispu$ = function (data, mappedDataAccess) {\n var tmp$;\n tmp$ = this.fields.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n element.initDataContext_nqispu$(data, mappedDataAccess);\n }\n };\n AnnotationLine.prototype.getAnnotationText_za3lpa$ = function (index) {\n var $receiver = this.fields;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n var tmp$_0 = destination.add_11rb$;\n var tmp$_1;\n tmp$_1 = item.getAnnotationText_za3lpa$(index);\n if (tmp$_1 == null) {\n return null;\n }\n tmp$_0.call(destination, tmp$_1);\n }\n var dataValues = destination;\n var tmp$_2 = this.myLineFormatter_0;\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(dataValues, 10));\n var tmp$_3;\n tmp$_3 = dataValues.iterator();\n while (tmp$_3.hasNext()) {\n var item_0 = tmp$_3.next();\n destination_0.add_11rb$(item_0);\n }\n return tmp$_2.format_pqjuzw$(destination_0);\n };\n function AnnotationLine$Companion() {\n AnnotationLine$Companion_instance = this;\n this.DEFAULT_STYLE_0 = new ThemeTextStyle(FontFamily.Companion.SERIF, FontFace.Companion.NORMAL, 10.0, Color.Companion.BLACK);\n }\n AnnotationLine$Companion.prototype.createAnnotations_6mw9qm$ = function (spec, dataAccess, dataFrame, themeTextStyle) {\n var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3, tmp$_4;\n if (spec.linePatterns.isEmpty()) {\n return null;\n }\n var $receiver = spec.linePatterns;\n var destination = ArrayList_init();\n var tmp$_5;\n tmp$_5 = $receiver.iterator();\n loop_label: while (tmp$_5.hasNext()) {\n var element = tmp$_5.next();\n var $receiver_0 = element.fields;\n var destination_0 = ArrayList_init();\n var tmp$_6;\n tmp$_6 = $receiver_0.iterator();\n while (tmp$_6.hasNext()) {\n var element_0 = tmp$_6.next();\n if (Kotlin.isType(element_0, MappingValue))\n destination_0.add_11rb$(element_0);\n }\n var dataAesList = destination_0;\n var all$result;\n all$break: do {\n var tmp$_7;\n if (Kotlin.isType(dataAesList, Collection) && dataAesList.isEmpty()) {\n all$result = true;\n break all$break;\n }\n tmp$_7 = dataAesList.iterator();\n while (tmp$_7.hasNext()) {\n var element_1 = tmp$_7.next();\n if (!dataAccess.isMapped_896ixz$(element_1.aes)) {\n all$result = false;\n break all$break;\n }\n }\n all$result = true;\n }\n while (false);\n if (all$result)\n destination.add_11rb$(element);\n }\n var mappedLines = destination;\n var tmp$_8;\n tmp$_8 = mappedLines.iterator();\n while (tmp$_8.hasNext()) {\n var element_2 = tmp$_8.next();\n element_2.initDataContext_nqispu$(dataFrame, dataAccess);\n }\n return new Annotations(mappedLines, new TextStyle((tmp$_0 = (tmp$ = themeTextStyle != null ? themeTextStyle.family : null) != null ? tmp$.name : null) != null ? tmp$_0 : this.DEFAULT_STYLE_0.family.name, (tmp$_1 = themeTextStyle != null ? themeTextStyle.face : null) != null ? tmp$_1 : this.DEFAULT_STYLE_0.face, (tmp$_3 = (tmp$_2 = spec.textSize) != null ? tmp$_2 : themeTextStyle != null ? themeTextStyle.size : null) != null ? tmp$_3 : this.DEFAULT_STYLE_0.size, (tmp$_4 = themeTextStyle != null ? themeTextStyle.color : null) != null ? tmp$_4 : this.DEFAULT_STYLE_0.color));\n };\n AnnotationLine$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var AnnotationLine$Companion_instance = null;\n function AnnotationLine$Companion_getInstance() {\n if (AnnotationLine$Companion_instance === null) {\n new AnnotationLine$Companion();\n }\n return AnnotationLine$Companion_instance;\n }\n AnnotationLine.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'AnnotationLine',\n interfaces: [AnnotationLineSpec, LinesContentSpecification$Companion$LineSpec]\n };\n function AnnotationLine_init(other, $this) {\n $this = $this || Object.create(AnnotationLine.prototype);\n var tmp$ = other.pattern;\n var $receiver = other.fields;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$_0;\n tmp$_0 = $receiver.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n destination.add_11rb$(item.copy());\n }\n AnnotationLine.call($this, tmp$, destination);\n return $this;\n }\n function AnnotationSpecification(valueSources, linePatterns, textSize) {\n AnnotationSpecification$Companion_getInstance();\n this.valueSources = valueSources;\n this.linePatterns = linePatterns;\n this.textSize = textSize;\n }\n function AnnotationSpecification$Companion() {\n AnnotationSpecification$Companion_instance = this;\n this.NONE = new AnnotationSpecification(emptyList(), emptyList(), null);\n }\n AnnotationSpecification$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var AnnotationSpecification$Companion_instance = null;\n function AnnotationSpecification$Companion_getInstance() {\n if (AnnotationSpecification$Companion_instance === null) {\n new AnnotationSpecification$Companion();\n }\n return AnnotationSpecification$Companion_instance;\n }\n AnnotationSpecification.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'AnnotationSpecification',\n interfaces: []\n };\n function ColorBarAssembler(legendTitle, transformedDomain, scale, scaleMapper, theme) {\n ColorBarAssembler$Companion_getInstance();\n this.legendTitle_0 = legendTitle;\n this.transformedDomain_0 = transformedDomain;\n this.scale_0 = scale;\n this.scaleMapper_0 = scaleMapper;\n this.theme_0 = theme;\n this.colorBarOptions_0 = null;\n }\n function ColorBarAssembler$createColorBar$ObjectLiteral(closure$spec, size) {\n this.closure$spec = closure$spec;\n LegendBoxInfo.call(this, size);\n }\n ColorBarAssembler$createColorBar$ObjectLiteral.prototype.createLegendBox = function () {\n var c = new ColorBarComponent(this.closure$spec);\n c.debug = ColorBarAssembler$Companion_getInstance().DEBUG_DRAWING_0;\n return c;\n };\n ColorBarAssembler$createColorBar$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [LegendBoxInfo]\n };\n ColorBarAssembler.prototype.createColorBar = function () {\n var scale = this.scale_0;\n if (!scale.hasBreaks()) {\n scale = breaks.ScaleBreaksUtil.withBreaks_ssmbt$(scale, this.transformedDomain_0, 5);\n }\n var scaleBreaks = scale.getScaleBreaks();\n if (scaleBreaks.isEmpty) {\n return LegendBoxInfo$Companion_getInstance().EMPTY;\n }\n var spec = ColorBarAssembler$Companion_getInstance().createColorBarSpec_9whx24$(this.legendTitle_0, this.transformedDomain_0, scaleBreaks, this.scaleMapper_0, this.theme_0, this.colorBarOptions_0);\n return new ColorBarAssembler$createColorBar$ObjectLiteral(spec, spec.size);\n };\n ColorBarAssembler.prototype.setOptions_p8ufd2$ = function (options) {\n this.colorBarOptions_0 = options;\n };\n function ColorBarAssembler$Companion() {\n ColorBarAssembler$Companion_instance = this;\n this.DEBUG_DRAWING_0 = FeatureSwitch_getInstance().LEGEND_DEBUG_DRAWING;\n }\n ColorBarAssembler$Companion.prototype.createColorBarSpec_9whx24$ = function (title, transformedDomain, breaks, scaleMapper, theme, options) {\n if (options === void 0)\n options = null;\n var tmp$, tmp$_0;\n var legendDirection = LegendAssemblerUtil_getInstance().legendDirection_730mk3$(theme);\n var horizontal = legendDirection === LegendDirection$HORIZONTAL_getInstance();\n var width = options != null ? options.width : null;\n var height = options != null ? options.height : null;\n var barSize = ColorBarComponentSpec$Companion_getInstance().barAbsoluteSize_kkcal5$(horizontal, theme);\n if (width != null) {\n barSize = new DoubleVector(width, barSize.y);\n }\n if (height != null) {\n barSize = new DoubleVector(barSize.x, height);\n }\n var reverse = !horizontal;\n if (horizontal)\n tmp$ = ColorBarComponentLayout$Companion_getInstance().horizontal_6u4c86$(title, transformedDomain, breaks, barSize, reverse, theme);\n else\n tmp$ = ColorBarComponentLayout$Companion_getInstance().vertical_6u4c86$(title, transformedDomain, breaks, barSize, reverse, theme);\n var layout = tmp$;\n return new ColorBarComponentSpec(title, transformedDomain, breaks, scaleMapper, (tmp$_0 = options != null ? options.binCount : null) != null ? tmp$_0 : 20, theme, layout, reverse);\n };\n ColorBarAssembler$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ColorBarAssembler$Companion_instance = null;\n function ColorBarAssembler$Companion_getInstance() {\n if (ColorBarAssembler$Companion_instance === null) {\n new ColorBarAssembler$Companion();\n }\n return ColorBarAssembler$Companion_instance;\n }\n ColorBarAssembler.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ColorBarAssembler',\n interfaces: []\n };\n function ColorBarOptions() {\n GuideOptions.call(this);\n this.width = null;\n this.height = null;\n this.binCount = null;\n }\n ColorBarOptions.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ColorBarOptions',\n interfaces: [GuideOptions]\n };\n function GeomContextBuilder() {\n this.flipped_0 = false;\n this.aesthetics_0 = null;\n this.aestheticMappers_0 = null;\n this.aesBounds_0 = null;\n this.geomTargetCollector_0 = new NullGeomTargetCollector();\n this.fontFamilyRegistry_0 = null;\n this.annotations_0 = null;\n }\n GeomContextBuilder.prototype.flipped_6taknv$ = function (flipped) {\n this.flipped_0 = flipped;\n return this;\n };\n GeomContextBuilder.prototype.aesthetics_m7huy5$ = function (aesthetics) {\n this.aesthetics_0 = aesthetics;\n return this;\n };\n GeomContextBuilder.prototype.aestheticMappers_yu359v$ = function (aestheticMappers) {\n this.aestheticMappers_0 = aestheticMappers;\n return this;\n };\n GeomContextBuilder.prototype.aesBounds_wthzt5$ = function (aesBounds) {\n this.aesBounds_0 = aesBounds;\n return this;\n };\n GeomContextBuilder.prototype.geomTargetCollector_xrq6q$ = function (geomTargetCollector) {\n this.geomTargetCollector_0 = geomTargetCollector;\n return this;\n };\n GeomContextBuilder.prototype.fontFamilyRegistry_exm2t6$ = function (v) {\n this.fontFamilyRegistry_0 = v;\n return this;\n };\n GeomContextBuilder.prototype.annotations_dq13fv$ = function (annotations) {\n this.annotations_0 = annotations;\n return this;\n };\n GeomContextBuilder.prototype.build = function () {\n return new GeomContextBuilder$MyGeomContext(this);\n };\n function GeomContextBuilder$MyGeomContext(b) {\n this.aesthetics = b.aesthetics_0;\n this.aestheticMappers = b.aestheticMappers_0;\n this._aesBounds = b.aesBounds_0;\n this.flipped_nf6vrh$_0 = b.flipped_0;\n this.targetCollector_2hnek9$_0 = b.geomTargetCollector_0;\n this.annotations_7kjnwx$_0 = b.annotations_0;\n this.fontFamilyRegistry_0 = b.fontFamilyRegistry_0;\n }\n Object.defineProperty(GeomContextBuilder$MyGeomContext.prototype, 'flipped', {\n configurable: true,\n get: function () {\n return this.flipped_nf6vrh$_0;\n }\n });\n Object.defineProperty(GeomContextBuilder$MyGeomContext.prototype, 'targetCollector', {\n configurable: true,\n get: function () {\n return this.targetCollector_2hnek9$_0;\n }\n });\n Object.defineProperty(GeomContextBuilder$MyGeomContext.prototype, 'annotations', {\n configurable: true,\n get: function () {\n return this.annotations_7kjnwx$_0;\n }\n });\n GeomContextBuilder$MyGeomContext.prototype.getResolution_vktour$ = function (aes) {\n var resolution = 0.0;\n if (this.aesthetics != null) {\n resolution = this.aesthetics.resolution_594811$(aes, 0.0);\n }\n if (resolution <= data_0.SeriesUtil.TINY) {\n resolution = 1.0;\n }\n return resolution;\n };\n GeomContextBuilder$MyGeomContext.prototype.isMappedAes_896ixz$ = function (aes) {\n var tmp$, tmp$_0;\n return (tmp$_0 = (tmp$ = this.aestheticMappers) != null ? tmp$.containsKey_11rb$(aes) : null) != null ? tmp$_0 : false;\n };\n GeomContextBuilder$MyGeomContext.prototype.estimateTextSize_9wnxdu$ = function (text, family, size, isBold, isItalic) {\n var registry = this.fontFamilyRegistry_0;\n if (!(registry != null)) {\n var message = 'Font-family registry is not specified.';\n throw IllegalStateException_init(message.toString());\n }\n var family_0 = registry.get_61zpoe$(family);\n return (new PlotLabelSpec(new Font(family_0, numberToInt(size), isBold, isItalic))).dimensions_61zpoe$(text);\n };\n GeomContextBuilder$MyGeomContext.prototype.getAesBounds = function () {\n if (!(this._aesBounds != null)) {\n var message = 'GeomContext: aesthetics bounds are not defined.';\n throw IllegalStateException_init(message.toString());\n }\n return this._aesBounds;\n };\n GeomContextBuilder$MyGeomContext.prototype.withTargetCollector_xrq6q$ = function (targetCollector) {\n return this.with().geomTargetCollector_xrq6q$(targetCollector).build();\n };\n GeomContextBuilder$MyGeomContext.prototype.with = function () {\n return GeomContextBuilder_init_0(this);\n };\n GeomContextBuilder$MyGeomContext.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'MyGeomContext',\n interfaces: [ImmutableGeomContext]\n };\n GeomContextBuilder.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GeomContextBuilder',\n interfaces: [ImmutableGeomContext$Builder]\n };\n function GeomContextBuilder_init($this) {\n $this = $this || Object.create(GeomContextBuilder.prototype);\n GeomContextBuilder.call($this);\n return $this;\n }\n function GeomContextBuilder_init_0(ctx, $this) {\n $this = $this || Object.create(GeomContextBuilder.prototype);\n GeomContextBuilder.call($this);\n $this.flipped_0 = ctx.flipped;\n $this.aesthetics_0 = ctx.aesthetics;\n $this.aestheticMappers_0 = ctx.aestheticMappers;\n $this.aesBounds_0 = ctx._aesBounds;\n $this.geomTargetCollector_0 = ctx.targetCollector;\n $this.annotations_0 = ctx.annotations;\n return $this;\n }\n function GeomLayerBuilder(geomProvider, stat, posProvider, fontFamilyRegistry) {\n GeomLayerBuilder$Companion_getInstance();\n this.geomProvider_0 = geomProvider;\n this.stat_0 = stat;\n this.posProvider_0 = posProvider;\n this.fontFamilyRegistry_0 = fontFamilyRegistry;\n this.myBindings_0 = ArrayList_init();\n this.myConstantByAes_0 = new TypedKeyHashMap();\n this.myGroupingVarName_0 = null;\n this.myPathIdVarName_0 = null;\n this.myScaleProviderByAes_0 = HashMap_init();\n this.myDataPreprocessor_0 = null;\n this.myLocatorLookupSpec_0 = GeomTargetLocator$LookupSpec.Companion.NONE;\n this.myContextualMappingProvider_0 = ContextualMappingProvider$Companion_getInstance().NONE;\n this.myIsLegendDisabled_0 = false;\n this.isYOrientation_0 = false;\n this.isMarginal_0 = false;\n this.marginalSide_0 = MarginSide$LEFT_getInstance();\n this.marginalSize_0 = kotlin_js_internal_DoubleCompanionObject.NaN;\n this.myAnnotationsProvider_0 = null;\n }\n GeomLayerBuilder.prototype.addBinding_14cn14$ = function (v) {\n this.myBindings_0.add_11rb$(v);\n return this;\n };\n GeomLayerBuilder.prototype.groupingVar_8xm3sj$ = function (v) {\n this.myGroupingVarName_0 = v.name;\n return this;\n };\n GeomLayerBuilder.prototype.groupingVarName_61zpoe$ = function (v) {\n this.myGroupingVarName_0 = v;\n return this;\n };\n GeomLayerBuilder.prototype.pathIdVarName_61zpoe$ = function (v) {\n this.myPathIdVarName_0 = v;\n return this;\n };\n GeomLayerBuilder.prototype.addConstantAes_bbdhip$ = function (aes, v) {\n this.myConstantByAes_0.put_ev6mlr$(aes, v);\n return this;\n };\n GeomLayerBuilder.prototype.addScaleProvider_jv3qxe$ = function (aes, scaleProvider) {\n this.myScaleProviderByAes_0.put_xwzc9p$(aes, scaleProvider);\n return this;\n };\n GeomLayerBuilder.prototype.locatorLookupSpec_271kgc$ = function (v) {\n this.myLocatorLookupSpec_0 = v;\n return this;\n };\n GeomLayerBuilder.prototype.contextualMappingProvider_td8fxc$ = function (v) {\n this.myContextualMappingProvider_0 = v;\n return this;\n };\n GeomLayerBuilder.prototype.disableLegend_6taknv$ = function (v) {\n this.myIsLegendDisabled_0 = v;\n return this;\n };\n GeomLayerBuilder.prototype.yOrientation_6taknv$ = function (v) {\n this.isYOrientation_0 = v;\n return this;\n };\n GeomLayerBuilder.prototype.marginal_fbs2by$ = function (isMarginal, marginalSide, marginalSize) {\n this.isMarginal_0 = isMarginal;\n this.marginalSide_0 = marginalSide;\n this.marginalSize_0 = marginalSize;\n return this;\n };\n function GeomLayerBuilder$annotationSpecification$lambda(closure$annotationSpec, closure$themeTextStyle) {\n return function (dataAccess, dataFrame) {\n return AnnotationLine$Companion_getInstance().createAnnotations_6mw9qm$(closure$annotationSpec, dataAccess, dataFrame, closure$themeTextStyle);\n };\n }\n GeomLayerBuilder.prototype.annotationSpecification_vimm4p$ = function (annotationSpec, themeTextStyle) {\n this.myAnnotationsProvider_0 = GeomLayerBuilder$annotationSpecification$lambda(annotationSpec, themeTextStyle);\n return this;\n };\n GeomLayerBuilder.prototype.build_e3vjvq$ = function (data_0, scaleMap, scaleMapppersNP) {\n var tmp$, tmp$_0;\n var $receiver = scaleMap.keySet();\n var result = LinkedHashMap_init_0(coerceAtLeast(mapCapacity(collectionSizeOrDefault($receiver, 10)), 16));\n var tmp$_1;\n tmp$_1 = $receiver.iterator();\n while (tmp$_1.hasNext()) {\n var element = tmp$_1.next();\n result.put_xwzc9p$(element, scaleMap.get_31786j$(element).transform);\n }\n var transformByAes = result;\n var data_1 = data_0;\n if (this.myDataPreprocessor_0 != null) {\n data_1 = ensureNotNull(this.myDataPreprocessor_0)(data_1, transformByAes);\n }\n data_1 = DataProcessing_getInstance().transformOriginals_9nntby$(data_1, this.myBindings_0, transformByAes);\n var $receiver_0 = this.myBindings_0;\n var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault($receiver_0, 10)), 16);\n var destination = LinkedHashMap_init_0(capacity);\n var tmp$_2;\n tmp$_2 = $receiver_0.iterator();\n while (tmp$_2.hasNext()) {\n var element_0 = tmp$_2.next();\n var tmp$_3, tmp$_4;\n tmp$_4 = element_0.aes;\n if (element_0.variable.isOrigin) {\n var transformVar = data.DataFrameUtil.transformVarFor_896ixz$(element_0.aes);\n tmp$_3 = new VarBinding(transformVar, element_0.aes);\n } else {\n tmp$_3 = element_0;\n }\n var pair = to(tmp$_4, tmp$_3);\n destination.put_xwzc9p$(pair.first, pair.second);\n }\n var replacementBindings = HashMap_init_0(destination);\n var bindingsToPut = ArrayList_init();\n tmp$ = replacementBindings.values.iterator();\n while (tmp$.hasNext()) {\n var binding = tmp$.next();\n var variable = binding.variable;\n if (variable.isStat) {\n var aes = binding.aes;\n var transform = getValue(transformByAes, aes);\n var transformVar_0 = data.TransformVar.forAes_896ixz$(aes);\n data_1 = data.DataFrameUtil.applyTransform_3268a5$(data_1, variable, transformVar_0, transform);\n bindingsToPut.add_11rb$(new VarBinding(transformVar_0, aes));\n }\n }\n tmp$_0 = bindingsToPut.iterator();\n while (tmp$_0.hasNext()) {\n var binding_0 = tmp$_0.next();\n var key = binding_0.aes;\n replacementBindings.put_xwzc9p$(key, binding_0);\n }\n var groupingVariables = DataProcessing_getInstance().defaultGroupingVariables_39xr23$(data_1, this.myBindings_0, this.myPathIdVarName_0);\n var groupingContext = new GroupingContext(data_1, groupingVariables, this.myGroupingVarName_0, this.handlesGroups_0());\n return new GeomLayerBuilder$MyGeomLayer(data_1, this.geomProvider_0, this.posProvider_0, this.geomProvider_0.renders(), groupingContext.groupMapper, replacementBindings, this.myConstantByAes_0, scaleMap, scaleMapppersNP, this.myLocatorLookupSpec_0, this.myContextualMappingProvider_0, this.myIsLegendDisabled_0, this.isYOrientation_0, this.isMarginal_0, this.marginalSide_0, this.marginalSize_0, this.fontFamilyRegistry_0, this.myAnnotationsProvider_0);\n };\n GeomLayerBuilder.prototype.handlesGroups_0 = function () {\n return this.geomProvider_0.handlesGroups() || this.posProvider_0.handlesGroups();\n };\n function GeomLayerBuilder$MyGeomLayer(dataFrame, geomProvider, posProvider, renderedAes, group, varBindings, constantByAes, scaleMap, scaleMapppersNP, locatorLookupSpec, contextualMappingProvider, isLegendDisabled, isYOrientation, isMarginal, marginalSide, marginalSize, fontFamilyRegistry, annotationsProvider) {\n this.dataFrame_uc8k26$_0 = dataFrame;\n this.posProvider_sk8uxc$_0 = posProvider;\n this.group_btwr86$_0 = group;\n this.varBindings_0 = varBindings;\n this.scaleMap_9lvzv7$_0 = scaleMap;\n this.scaleMapppersNP_xaevk1$_0 = scaleMapppersNP;\n this.locatorLookupSpec_65qeye$_0 = locatorLookupSpec;\n this.contextualMappingProvider_0 = contextualMappingProvider;\n this.isLegendDisabled_1bnyfg$_0 = isLegendDisabled;\n this.isYOrientation_gj59r2$_0 = isYOrientation;\n this.isMarginal_jm2roc$_0 = isMarginal;\n this.marginalSide_i85i29$_0 = marginalSide;\n this.marginalSize_i851qz$_0 = marginalSize;\n this.fontFamilyRegistry_xk06j5$_0 = fontFamilyRegistry;\n this.annotationsProvider_0 = annotationsProvider;\n this.geom_ipep5v$_0 = geomProvider.createGeom();\n this.geomKind_qyi6z5$_0 = geomProvider.geomKind;\n this.aestheticsDefaults_4lnusm$_0 = geomProvider.aestheticsDefaults();\n this.myRenderedAes_0 = null;\n this.myConstantByAes_0 = null;\n var tmp$;\n this.myRenderedAes_0 = ArrayList_init_1(renderedAes);\n this.myConstantByAes_0 = new TypedKeyHashMap();\n tmp$ = constantByAes.keys_287e2$().iterator();\n while (tmp$.hasNext()) {\n var key = tmp$.next();\n this.myConstantByAes_0.put_ev6mlr$(key, constantByAes.get_ex36zt$(key));\n }\n }\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'dataFrame', {\n get: function () {\n return this.dataFrame_uc8k26$_0;\n }\n });\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'posProvider', {\n get: function () {\n return this.posProvider_sk8uxc$_0;\n }\n });\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'group', {\n get: function () {\n return this.group_btwr86$_0;\n }\n });\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'scaleMap', {\n get: function () {\n return this.scaleMap_9lvzv7$_0;\n }\n });\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'scaleMapppersNP', {\n get: function () {\n return this.scaleMapppersNP_xaevk1$_0;\n }\n });\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'locatorLookupSpec', {\n get: function () {\n return this.locatorLookupSpec_65qeye$_0;\n }\n });\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'isLegendDisabled', {\n get: function () {\n return this.isLegendDisabled_1bnyfg$_0;\n }\n });\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'isYOrientation', {\n get: function () {\n return this.isYOrientation_gj59r2$_0;\n }\n });\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'isMarginal', {\n get: function () {\n return this.isMarginal_jm2roc$_0;\n }\n });\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'marginalSide', {\n get: function () {\n return this.marginalSide_i85i29$_0;\n }\n });\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'marginalSize', {\n get: function () {\n return this.marginalSize_i851qz$_0;\n }\n });\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'fontFamilyRegistry', {\n get: function () {\n return this.fontFamilyRegistry_xk06j5$_0;\n }\n });\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'geom', {\n configurable: true,\n get: function () {\n return this.geom_ipep5v$_0;\n }\n });\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'geomKind', {\n configurable: true,\n get: function () {\n return this.geomKind_qyi6z5$_0;\n }\n });\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'aestheticsDefaults', {\n configurable: true,\n get: function () {\n return this.aestheticsDefaults_4lnusm$_0;\n }\n });\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'legendKeyElementFactory', {\n configurable: true,\n get: function () {\n return this.geom.legendKeyElementFactory;\n }\n });\n Object.defineProperty(GeomLayerBuilder$MyGeomLayer.prototype, 'isLiveMap', {\n configurable: true,\n get: function () {\n return Kotlin.isType(this.geom, LiveMapGeom);\n }\n });\n GeomLayerBuilder$MyGeomLayer.prototype.renderedAes = function () {\n return this.myRenderedAes_0;\n };\n GeomLayerBuilder$MyGeomLayer.prototype.hasBinding_896ixz$ = function (aes) {\n return this.varBindings_0.containsKey_11rb$(aes);\n };\n GeomLayerBuilder$MyGeomLayer.prototype.getBinding_31786j$ = function (aes) {\n return ensureNotNull(this.varBindings_0.get_11rb$(aes));\n };\n GeomLayerBuilder$MyGeomLayer.prototype.hasConstant_896ixz$ = function (aes) {\n return this.myConstantByAes_0.containsKey_ex36zt$(aes);\n };\n GeomLayerBuilder$MyGeomLayer.prototype.getConstant_31786j$ = function (aes) {\n if (!this.hasConstant_896ixz$(aes)) {\n var message = 'Constant value is not defined for aes ' + aes;\n throw IllegalArgumentException_init(message.toString());\n }\n return this.myConstantByAes_0.get_ex36zt$(aes);\n };\n GeomLayerBuilder$MyGeomLayer.prototype.getDefault_31786j$ = function (aes) {\n return this.aestheticsDefaults.defaultValue_31786j$(aes);\n };\n GeomLayerBuilder$MyGeomLayer.prototype.preferableNullDomain_896ixz$ = function (aes) {\n var tmp$;\n var aes_0 = afterOrientation(aes, this.isYOrientation);\n return (Kotlin.isType(tmp$ = this.geom, GeomBase) ? tmp$ : throwCCE()).preferableNullDomain_896ixz$(aes_0);\n };\n GeomLayerBuilder$MyGeomLayer.prototype.rangeIncludesZero_896ixz$ = function (aes) {\n var aes_0 = afterOrientation(aes, this.isYOrientation);\n return this.aestheticsDefaults.rangeIncludesZero_896ixz$(aes_0);\n };\n GeomLayerBuilder$MyGeomLayer.prototype.setLiveMapProvider_kld0fp$ = function (liveMapProvider) {\n if (Kotlin.isType(this.geom, LiveMapGeom)) {\n this.geom.setLiveMapProvider_kld0fp$(liveMapProvider);\n } else {\n throw IllegalStateException_init('Not Livemap: ' + Kotlin.getKClassFromExpression(this.geom).simpleName);\n }\n };\n GeomLayerBuilder$MyGeomLayer.prototype.createContextualMapping = function () {\n var dataAccess = new PointDataAccess(this.dataFrame, this.varBindings_0, this.scaleMap, this.isYOrientation);\n return this.contextualMappingProvider_0.createContextualMapping_8fr62e$(dataAccess, this.dataFrame);\n };\n GeomLayerBuilder$MyGeomLayer.prototype.createAnnotations = function () {\n var tmp$;\n var tmp$_0;\n if ((tmp$ = this.annotationsProvider_0) != null) {\n var dataAccess = new PointDataAccess(this.dataFrame, this.varBindings_0, this.scaleMap, this.isYOrientation);\n tmp$_0 = tmp$(dataAccess, this.dataFrame);\n } else\n tmp$_0 = null;\n return tmp$_0;\n };\n GeomLayerBuilder$MyGeomLayer.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'MyGeomLayer',\n interfaces: [GeomLayer]\n };\n function GeomLayerBuilder$Companion() {\n GeomLayerBuilder$Companion_instance = this;\n }\n function GeomLayerBuilder$Companion$demoAndTest$lambda(closure$builder) {\n return function (data, transformByAes) {\n var transformedData = DataProcessing_getInstance().transformOriginals_9nntby$(data, closure$builder.myBindings_0, transformByAes);\n if (equals(closure$builder.stat_0, stat.Stats.IDENTITY))\n return transformedData;\n else {\n var statCtx = new SimpleStatContext(transformedData);\n var groupingVariables = DataProcessing_getInstance().defaultGroupingVariables_39xr23$(data, closure$builder.myBindings_0, closure$builder.myPathIdVarName_0);\n var groupingCtx = new GroupingContext(transformedData, groupingVariables, closure$builder.myGroupingVarName_0, true);\n var statInput = new StatInput(transformedData, closure$builder.myBindings_0, transformByAes, statCtx, false);\n var dataAndGroupingContext = DataProcessing_getInstance().buildStatData_ardmvj$(statInput, closure$builder.stat_0, groupingCtx, emptyList(), emptyList(), emptyList(), null, getCallableRef('println', function (p1) {\n return println(p1), Unit;\n }));\n return dataAndGroupingContext.data;\n }\n };\n }\n GeomLayerBuilder$Companion.prototype.demoAndTest_ij5gxo$ = function (geomProvider, stat, posProvider) {\n if (posProvider === void 0)\n posProvider = PosProvider$Companion_getInstance().wrap_dkjclg$(pos.PositionAdjustments.identity());\n var builder = new GeomLayerBuilder(geomProvider, stat, posProvider, new DefaultFontFamilyRegistry());\n builder.myDataPreprocessor_0 = GeomLayerBuilder$Companion$demoAndTest$lambda(builder);\n return builder;\n };\n GeomLayerBuilder$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var GeomLayerBuilder$Companion_instance = null;\n function GeomLayerBuilder$Companion_getInstance() {\n if (GeomLayerBuilder$Companion_instance === null) {\n new GeomLayerBuilder$Companion();\n }\n return GeomLayerBuilder$Companion_instance;\n }\n GeomLayerBuilder.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GeomLayerBuilder',\n interfaces: []\n };\n function GuideOptions() {\n GuideOptions$Companion_getInstance();\n this.isReverse = false;\n }\n function GuideOptions$Companion() {\n GuideOptions$Companion_instance = this;\n this.NONE = new GuideOptions$Companion$NONE$ObjectLiteral();\n }\n function GuideOptions$Companion$NONE$ObjectLiteral() {\n GuideOptions.call(this);\n }\n GuideOptions$Companion$NONE$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [GuideOptions]\n };\n GuideOptions$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var GuideOptions$Companion_instance = null;\n function GuideOptions$Companion_getInstance() {\n if (GuideOptions$Companion_instance === null) {\n new GuideOptions$Companion();\n }\n return GuideOptions$Companion_instance;\n }\n GuideOptions.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GuideOptions',\n interfaces: []\n };\n function ImmutableGeomContext() {\n }\n function ImmutableGeomContext$Builder() {\n }\n ImmutableGeomContext$Builder.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'Builder',\n interfaces: []\n };\n ImmutableGeomContext.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'ImmutableGeomContext',\n interfaces: [GeomContext]\n };\n function LegendAssembler(legendTitle, guideOptionsMap, scaleMappers, theme) {\n LegendAssembler$Companion_getInstance();\n this.legendTitle_0 = legendTitle;\n this.guideOptionsMap_0 = guideOptionsMap;\n this.scaleMappers_0 = scaleMappers;\n this.theme_0 = theme;\n this.legendLayers_0 = ArrayList_init();\n }\n LegendAssembler.prototype.addLayer_ut0rz1$ = function (keyFactory, aesList, constantByAes, aestheticsDefaults, ctx) {\n this.legendLayers_0.add_11rb$(new LegendAssembler$LegendLayer(keyFactory, aesList, constantByAes, aestheticsDefaults, this.scaleMappers_0, ctx));\n };\n function LegendAssembler$createLegend$ObjectLiteral(closure$spec, size) {\n this.closure$spec = closure$spec;\n LegendBoxInfo.call(this, size);\n }\n LegendAssembler$createLegend$ObjectLiteral.prototype.createLegendBox = function () {\n var c = new LegendComponent(this.closure$spec);\n c.debug = LegendAssembler$Companion_getInstance().DEBUG_DRAWING_0;\n return c;\n };\n LegendAssembler$createLegend$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [LegendBoxInfo]\n };\n LegendAssembler.prototype.createLegend = function () {\n var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3, tmp$_4;\n var legendBreaksByLabel = LinkedHashMap_init();\n tmp$ = this.legendLayers_0.iterator();\n while (tmp$.hasNext()) {\n var legendLayer = tmp$.next();\n var keyElementFactory = legendLayer.keyElementFactory_8be2vx$;\n var dataPoints = legendLayer.keyAesthetics_8be2vx$.dataPoints().iterator();\n tmp$_0 = legendLayer.keyLabels_8be2vx$.iterator();\n while (tmp$_0.hasNext()) {\n var label = tmp$_0.next();\n var tmp$_5;\n var value = legendBreaksByLabel.get_11rb$(label);\n if (value == null) {\n var answer = new LegendBreak(label);\n legendBreaksByLabel.put_xwzc9p$(label, answer);\n tmp$_5 = answer;\n } else {\n tmp$_5 = value;\n }\n tmp$_5.addLayer_w0u015$(dataPoints.next(), keyElementFactory);\n }\n }\n var legendBreaks = ArrayList_init();\n tmp$_1 = legendBreaksByLabel.values.iterator();\n while (tmp$_1.hasNext()) {\n var legendBreak = tmp$_1.next();\n if (legendBreak.isEmpty) {\n continue;\n }\n legendBreaks.add_11rb$(legendBreak);\n }\n if (legendBreaks.isEmpty()) {\n return LegendBoxInfo$Companion_getInstance().EMPTY;\n }\n var legendOptionsList = ArrayList_init();\n tmp$_2 = this.legendLayers_0.iterator();\n while (tmp$_2.hasNext()) {\n var legendLayer_0 = tmp$_2.next();\n var aesList = legendLayer_0.aesList_8be2vx$;\n tmp$_3 = aesList.iterator();\n while (tmp$_3.hasNext()) {\n var aes = tmp$_3.next();\n if (Kotlin.isType(this.guideOptionsMap_0.get_11rb$(aes), LegendOptions)) {\n legendOptionsList.add_11rb$(Kotlin.isType(tmp$_4 = this.guideOptionsMap_0.get_11rb$(aes), LegendOptions) ? tmp$_4 : throwCCE());\n }\n }\n }\n var spec = LegendAssembler$Companion_getInstance().createLegendSpec_esqxbx$(this.legendTitle_0, legendBreaks, this.theme_0, LegendOptions$Companion_getInstance().combine_pmdc6s$(legendOptionsList));\n return new LegendAssembler$createLegend$ObjectLiteral(spec, spec.size);\n };\n function LegendAssembler$LegendLayer(keyElementFactory, aesList, constantByAes, aestheticsDefaults, scaleMappers, ctx) {\n this.keyElementFactory_8be2vx$ = keyElementFactory;\n this.aesList_8be2vx$ = aesList;\n this.keyAesthetics_8be2vx$ = null;\n this.keyLabels_8be2vx$ = null;\n var tmp$, tmp$_0;\n var aesValuesByLabel = LinkedHashMap_init();\n tmp$ = this.aesList_8be2vx$.iterator();\n while (tmp$.hasNext()) {\n var aes = tmp$.next();\n var scale = ctx.getScale_896ixz$(aes);\n if (!scale.hasBreaks()) {\n scale = breaks.ScaleBreaksUtil.withBreaks_ssmbt$(scale, ctx.overallTransformedDomain_896ixz$(aes), 5);\n }\n if (!scale.hasBreaks()) {\n var message = 'No breaks were defined for scale ' + aes;\n throw IllegalStateException_init(message.toString());\n }\n var scaleBreaks = scale.getScaleBreaks();\n var $receiver = scaleBreaks.transformedValues;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$_1;\n tmp$_1 = $receiver.iterator();\n while (tmp$_1.hasNext()) {\n var item = tmp$_1.next();\n var tmp$_2;\n destination.add_11rb$(Kotlin.isType(tmp$_2 = getValue(scaleMappers, aes).invoke_yrwdxb$(item), Any) ? tmp$_2 : throwCCE());\n }\n var aesValues = destination;\n var labels = scaleBreaks.labels;\n tmp$_0 = zip(labels, aesValues).iterator();\n while (tmp$_0.hasNext()) {\n var tmp$_3 = tmp$_0.next();\n var label = tmp$_3.component1()\n , aesValue = tmp$_3.component2();\n var tmp$_4;\n var value = aesValuesByLabel.get_11rb$(label);\n if (value == null) {\n var answer = HashMap_init();\n aesValuesByLabel.put_xwzc9p$(label, answer);\n tmp$_4 = answer;\n } else {\n tmp$_4 = value;\n }\n tmp$_4.put_xwzc9p$(aes, aesValue);\n }\n }\n this.keyAesthetics_8be2vx$ = LegendAssemblerUtil_getInstance().mapToAesthetics_8kbmqf$(aesValuesByLabel.values, constantByAes, aestheticsDefaults);\n this.keyLabels_8be2vx$ = ArrayList_init_1(aesValuesByLabel.keys);\n }\n LegendAssembler$LegendLayer.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendLayer',\n interfaces: []\n };\n function LegendAssembler$Companion() {\n LegendAssembler$Companion_instance = this;\n this.DEBUG_DRAWING_0 = FeatureSwitch_getInstance().LEGEND_DEBUG_DRAWING;\n }\n function LegendAssembler$Companion$createLegendSpec$pretty(v) {\n var margin = 1.0;\n var x = v.x / 2;\n var tmp$ = JsMath.floor(x) * 2 + 1.0 + margin;\n var x_0 = v.y / 2;\n return new DoubleVector(tmp$, JsMath.floor(x_0) * 2 + 1.0 + margin);\n }\n LegendAssembler$Companion.prototype.createLegendSpec_esqxbx$ = function (title, breaks, theme, options) {\n if (options === void 0)\n options = new LegendOptions();\n var tmp$, tmp$_0;\n var legendDirection = LegendAssemblerUtil_getInstance().legendDirection_730mk3$(theme);\n var pretty = LegendAssembler$Companion$createLegendSpec$pretty;\n var themeKeySize = new DoubleVector(theme.keySize(), theme.keySize());\n var destination = ArrayList_init_0(collectionSizeOrDefault(breaks, 10));\n var tmp$_1;\n tmp$_1 = breaks.iterator();\n while (tmp$_1.hasNext()) {\n var item = tmp$_1.next();\n destination.add_11rb$(themeKeySize.max_gpjtzr$(pretty(item.minimumKeySize)));\n }\n var block$result;\n if (legendDirection === LegendDirection$HORIZONTAL_getInstance()) {\n var selector = getPropertyCallableRef('y', 1, function ($receiver) {\n return $receiver.y;\n });\n var iterator = destination.iterator();\n if (!iterator.hasNext())\n throw NoSuchElementException_init();\n var maxValue = selector(iterator.next());\n while (iterator.hasNext()) {\n var v = selector(iterator.next());\n maxValue = JsMath.max(maxValue, v);\n }\n var maxKeyHeight = maxValue;\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(destination, 10));\n var tmp$_2;\n tmp$_2 = destination.iterator();\n while (tmp$_2.hasNext()) {\n var item_0 = tmp$_2.next();\n destination_0.add_11rb$(new DoubleVector(item_0.x, maxKeyHeight));\n }\n block$result = destination_0;\n } else {\n var selector_0 = getPropertyCallableRef('x', 1, function ($receiver) {\n return $receiver.x;\n });\n var iterator_0 = destination.iterator();\n if (!iterator_0.hasNext())\n throw NoSuchElementException_init();\n var maxValue_0 = selector_0(iterator_0.next());\n while (iterator_0.hasNext()) {\n var v_0 = selector_0(iterator_0.next());\n maxValue_0 = JsMath.max(maxValue_0, v_0);\n }\n var maxKeyWidth = maxValue_0;\n var destination_1 = ArrayList_init_0(collectionSizeOrDefault(destination, 10));\n var tmp$_3;\n tmp$_3 = destination.iterator();\n while (tmp$_3.hasNext()) {\n var item_1 = tmp$_3.next();\n destination_1.add_11rb$(new DoubleVector(maxKeyWidth, item_1.y));\n }\n block$result = destination_1;\n }\n var keySizes = block$result;\n var breakCount = breaks.size;\n var colCount;\n var rowCount;\n if (options.isByRow) {\n if (options.hasColCount()) {\n var a = options.colCount;\n tmp$ = JsMath.min(a, breakCount);\n } else if (options.hasRowCount()) {\n var x = breakCount / options.rowCount;\n tmp$ = numberToInt(JsMath.ceil(x));\n } else if (legendDirection === LegendDirection$HORIZONTAL_getInstance())\n tmp$ = breakCount;\n else\n tmp$ = 1;\n colCount = tmp$;\n var x_0 = breakCount / colCount;\n rowCount = numberToInt(JsMath.ceil(x_0));\n } else {\n if (options.hasRowCount()) {\n var a_0 = options.rowCount;\n tmp$_0 = JsMath.min(a_0, breakCount);\n } else if (options.hasColCount()) {\n var x_1 = breakCount / options.colCount;\n tmp$_0 = numberToInt(JsMath.ceil(x_1));\n } else if (legendDirection !== LegendDirection$HORIZONTAL_getInstance())\n tmp$_0 = breakCount;\n else\n tmp$_0 = 1;\n rowCount = tmp$_0;\n var x_2 = breakCount / rowCount;\n colCount = numberToInt(JsMath.ceil(x_2));\n }\n var layout;\n if (legendDirection === LegendDirection$HORIZONTAL_getInstance()) {\n if (options.hasRowCount() || (options.hasColCount() && options.colCount < breakCount)) {\n layout = LegendComponentLayout$Companion_getInstance().horizontalMultiRow_d02gve$(title, breaks, keySizes, theme);\n } else {\n layout = LegendComponentLayout$Companion_getInstance().horizontal_d02gve$(title, breaks, keySizes, theme);\n }\n } else {\n layout = LegendComponentLayout$Companion_getInstance().vertical_d02gve$(title, breaks, keySizes, theme);\n }\n layout.colCount = colCount;\n layout.rowCount = rowCount;\n layout.isFillByRow = options.isByRow;\n return new LegendComponentSpec(title, breaks, theme, layout, false);\n };\n LegendAssembler$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var LegendAssembler$Companion_instance = null;\n function LegendAssembler$Companion_getInstance() {\n if (LegendAssembler$Companion_instance === null) {\n new LegendAssembler$Companion();\n }\n return LegendAssembler$Companion_instance;\n }\n LegendAssembler.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendAssembler',\n interfaces: []\n };\n function LegendAssemblerUtil() {\n LegendAssemblerUtil_instance = this;\n }\n LegendAssemblerUtil.prototype.mapToAesthetics_ml5orx$ = function (valuesByAes, constantByAes, aestheticsDefaults) {\n var tmp$, tmp$_0, tmp$_1, tmp$_2;\n var builder = new AestheticsBuilder(0);\n tmp$ = Aes.Companion.values().iterator();\n while (tmp$.hasNext()) {\n var aes = tmp$.next();\n builder.constantAes_bbdhip$(Kotlin.isType(tmp$_0 = aes, Aes) ? tmp$_0 : throwCCE(), aestheticsDefaults.defaultValue_31786j$(aes));\n }\n tmp$_1 = valuesByAes.keys.iterator();\n while (tmp$_1.hasNext()) {\n var aes_0 = tmp$_1.next();\n var values = getValue(valuesByAes, aes_0);\n builder.aes_u42xfl$(aes_0, AestheticsBuilder.Companion.list_bemo1h$(values));\n builder.dataPointCount_za3lpa$(values.size);\n }\n tmp$_2 = constantByAes.keys.iterator();\n while (tmp$_2.hasNext()) {\n var aes_1 = tmp$_2.next();\n builder.constantAes_bbdhip$(aes_1, ensureNotNull(constantByAes.get_11rb$(aes_1)));\n }\n return builder.build();\n };\n function LegendAssemblerUtil$mapToAesthetics$lambda(closure$dataPoints, closure$aes) {\n return function (index) {\n return ensureNotNull(closure$dataPoints.get_za3lpa$(index).get_11rb$(closure$aes));\n };\n }\n LegendAssemblerUtil.prototype.mapToAesthetics_8kbmqf$ = function (valueByAesIterable, constantByAes, aestheticsDefaults) {\n var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3, tmp$_4;\n var dataPoints = ArrayList_init();\n tmp$ = valueByAesIterable.iterator();\n while (tmp$.hasNext()) {\n var valueByAes = tmp$.next();\n var dataPoint = HashMap_init();\n tmp$_0 = Aes.Companion.values().iterator();\n while (tmp$_0.hasNext()) {\n var aes = tmp$_0.next();\n var value = ensureNotNull(aestheticsDefaults.defaultValueInLegend_31786j$(aes));\n dataPoint.put_xwzc9p$(aes, value);\n }\n tmp$_1 = constantByAes.keys.iterator();\n while (tmp$_1.hasNext()) {\n var constantAes = tmp$_1.next();\n if (equals(constantAes, Aes.Companion.SHAPE) || equals(constantAes, Aes.Companion.COLOR) || equals(constantAes, Aes.Companion.FILL)) {\n var value_0 = ensureNotNull(constantByAes.get_11rb$(constantAes));\n dataPoint.put_xwzc9p$(constantAes, value_0);\n }\n }\n tmp$_2 = valueByAes.keys.iterator();\n while (tmp$_2.hasNext()) {\n var aes_0 = tmp$_2.next();\n var value_1 = ensureNotNull(valueByAes.get_11rb$(aes_0));\n dataPoint.put_xwzc9p$(aes_0, value_1);\n }\n dataPoints.add_11rb$(dataPoint);\n }\n var builder = new AestheticsBuilder(dataPoints.size);\n tmp$_3 = Aes.Companion.values().iterator();\n while (tmp$_3.hasNext()) {\n var aes_1 = tmp$_3.next();\n builder.aes_u42xfl$(Kotlin.isType(tmp$_4 = aes_1, Aes) ? tmp$_4 : throwCCE(), LegendAssemblerUtil$mapToAesthetics$lambda(dataPoints, aes_1));\n }\n return builder.build();\n };\n LegendAssemblerUtil.prototype.legendDirection_730mk3$ = function (theme) {\n var legendDirection = theme.direction();\n if (legendDirection === LegendDirection$AUTO_getInstance()) {\n var legendPosition = theme.position();\n legendDirection = legendPosition === LegendPosition$Companion_getInstance().TOP || legendPosition === LegendPosition$Companion_getInstance().BOTTOM ? LegendDirection$HORIZONTAL_getInstance() : LegendDirection$VERTICAL_getInstance();\n }\n return legendDirection;\n };\n LegendAssemblerUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'LegendAssemblerUtil',\n interfaces: []\n };\n var LegendAssemblerUtil_instance = null;\n function LegendAssemblerUtil_getInstance() {\n if (LegendAssemblerUtil_instance === null) {\n new LegendAssemblerUtil();\n }\n return LegendAssemblerUtil_instance;\n }\n function LegendOptions() {\n LegendOptions$Companion_getInstance();\n GuideOptions.call(this);\n this.myColCount_0 = null;\n this.myRowCount_0 = null;\n this.isByRow = false;\n }\n Object.defineProperty(LegendOptions.prototype, 'colCount', {\n configurable: true,\n get: function () {\n return ensureNotNull(this.myColCount_0);\n },\n set: function (colCount) {\n this.myColCount_0 = JsMath.max(1, colCount);\n }\n });\n Object.defineProperty(LegendOptions.prototype, 'rowCount', {\n configurable: true,\n get: function () {\n return ensureNotNull(this.myRowCount_0);\n },\n set: function (rowCount) {\n this.myRowCount_0 = JsMath.max(1, rowCount);\n }\n });\n LegendOptions.prototype.hasColCount = function () {\n return this.myColCount_0 != null;\n };\n LegendOptions.prototype.hasRowCount = function () {\n return this.myRowCount_0 != null;\n };\n function LegendOptions$Companion() {\n LegendOptions$Companion_instance = this;\n }\n LegendOptions$Companion.prototype.combine_pmdc6s$ = function (optionsList) {\n var tmp$;\n var result = new LegendOptions();\n tmp$ = optionsList.iterator();\n while (tmp$.hasNext()) {\n var options = tmp$.next();\n if (options.isByRow) {\n result.isByRow = true;\n }\n if (options.hasColCount()) {\n result.colCount = options.colCount;\n }\n if (options.hasRowCount()) {\n result.rowCount = options.rowCount;\n }\n }\n return result;\n };\n LegendOptions$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var LegendOptions$Companion_instance = null;\n function LegendOptions$Companion_getInstance() {\n if (LegendOptions$Companion_instance === null) {\n new LegendOptions$Companion();\n }\n return LegendOptions$Companion_instance;\n }\n LegendOptions.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendOptions',\n interfaces: [GuideOptions]\n };\n function PlotAssembler(layersByTile, scaleMap, scaleMappersNP, coordProvider, xAxisOrientation, yAxisOrientation, theme) {\n PlotAssembler$Companion_getInstance();\n this.layersByTile_0 = layersByTile;\n this.scaleMap_0 = scaleMap;\n this.scaleMappersNP_0 = scaleMappersNP;\n this.coordProvider_0 = coordProvider;\n this.xAxisOrientation_0 = xAxisOrientation;\n this.yAxisOrientation_0 = yAxisOrientation;\n this.theme_0 = theme;\n this.scaleXProto_0 = this.scaleMap_0.get_31786j$(Aes.Companion.X);\n this.scaleYProto_0 = this.scaleMap_0.get_31786j$(Aes.Companion.Y);\n var $receiver = this.layersByTile_0;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n var tmp$_0 = destination.add_11rb$;\n var destination_0 = ArrayList_init();\n var tmp$_1;\n tmp$_1 = item.iterator();\n while (tmp$_1.hasNext()) {\n var element = tmp$_1.next();\n if (!element.isMarginal)\n destination_0.add_11rb$(element);\n }\n tmp$_0.call(destination, destination_0);\n }\n this.coreLayersByTile = destination;\n var $receiver_0 = this.layersByTile_0;\n var destination_1 = ArrayList_init_0(collectionSizeOrDefault($receiver_0, 10));\n var tmp$_2;\n tmp$_2 = $receiver_0.iterator();\n while (tmp$_2.hasNext()) {\n var item_0 = tmp$_2.next();\n var tmp$_3 = destination_1.add_11rb$;\n var destination_2 = ArrayList_init();\n var tmp$_4;\n tmp$_4 = item_0.iterator();\n while (tmp$_4.hasNext()) {\n var element_0 = tmp$_4.next();\n if (element_0.isMarginal)\n destination_2.add_11rb$(element_0);\n }\n var destination_3 = ArrayList_init();\n var tmp$_5;\n tmp$_5 = destination_2.iterator();\n while (tmp$_5.hasNext()) {\n var element_1 = tmp$_5.next();\n if (!element_1.isLiveMap)\n destination_3.add_11rb$(element_1);\n }\n tmp$_3.call(destination_1, destination_3);\n }\n this.marginalLayersByTile_0 = destination_1;\n var $receiver_1 = flatten(this.coreLayersByTile);\n var predicate = getPropertyCallableRef('isLiveMap', 1, function ($receiver) {\n return $receiver.isLiveMap;\n });\n var any$result;\n any$break: do {\n var tmp$_6;\n if (Kotlin.isType($receiver_1, Collection) && $receiver_1.isEmpty()) {\n any$result = false;\n break any$break;\n }\n tmp$_6 = $receiver_1.iterator();\n while (tmp$_6.hasNext()) {\n var element_2 = tmp$_6.next();\n if (predicate(element_2)) {\n any$result = true;\n break any$break;\n }\n }\n any$result = false;\n }\n while (false);\n this.containsLiveMap = any$result;\n this.facets = PlotFacets$Companion_getInstance().undefined();\n this.title = null;\n this.subtitle = null;\n this.caption = null;\n this.guideOptionsMap = HashMap_init();\n this.legendsEnabled_0 = true;\n this.interactionsEnabled_0 = true;\n }\n PlotAssembler.prototype.hasLayers_0 = function () {\n var $receiver = this.coreLayersByTile;\n var any$result;\n any$break: do {\n var tmp$;\n if (Kotlin.isType($receiver, Collection) && $receiver.isEmpty()) {\n any$result = false;\n break any$break;\n }\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n if (!element.isEmpty()) {\n any$result = true;\n break any$break;\n }\n }\n any$result = false;\n }\n while (false);\n return any$result;\n };\n PlotAssembler.prototype.createPlot = function () {\n var tmp$, tmp$_0, tmp$_1, tmp$_2;\n if (!this.hasLayers_0()) {\n var message = 'No layers in plot';\n throw IllegalArgumentException_init(message.toString());\n }\n var styleSheet = Style_getInstance().fromTheme_1crrl9$(this.theme_0, this.coordProvider_0.flipped);\n var plotContext = new PlotAssemblerPlotContext(this.layersByTile_0, this.scaleMap_0);\n if (this.legendsEnabled_0)\n tmp$ = PlotAssemblerUtil_getInstance().createLegends_enmjz4$(plotContext, this.scaleMappersNP_0, this.guideOptionsMap, this.theme_0.legend());\n else\n tmp$ = emptyList();\n var legendsBoxInfos = tmp$;\n if (this.containsLiveMap) {\n var $receiver = this.coreLayersByTile;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$_3;\n tmp$_3 = $receiver.iterator();\n while (tmp$_3.hasNext()) {\n var item = tmp$_3.next();\n destination.add_11rb$(new LiveMapTileLayoutProvider());\n }\n var layoutProviderByTile = destination;\n var plotLayout = PlotAssemblerUtil_getInstance().createPlotLayout_4j7bvh$(layoutProviderByTile, this.facets, this.theme_0.facets(), new LiveMapAxisTheme(), new LiveMapAxisTheme());\n var $receiver_0 = this.coreLayersByTile;\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault($receiver_0, 10));\n var tmp$_4;\n tmp$_4 = $receiver_0.iterator();\n while (tmp$_4.hasNext()) {\n var item_0 = tmp$_4.next();\n destination_0.add_11rb$(new BogusFrameOfReferenceProvider());\n }\n var frameProviderByTile = destination_0;\n tmp$_2 = this.createPlot_0(frameProviderByTile, plotLayout, legendsBoxInfos, styleSheet, plotContext);\n } else {\n var flipAxis = this.coordProvider_0.flipped;\n var domainsXYByTile = PositionalScalesUtil_getInstance().computePlotXYTransformedDomains_6ppuq6$(this.coreLayersByTile, this.scaleXProto_0, this.scaleYProto_0, this.facets);\n if (flipAxis === true)\n tmp$_0 = to(this.scaleYProto_0, this.scaleXProto_0);\n else\n tmp$_0 = to(this.scaleXProto_0, this.scaleYProto_0);\n var tmp$_5 = tmp$_0;\n var hScaleProto = tmp$_5.component1()\n , vScaleProto = tmp$_5.component2();\n if (flipAxis === true)\n tmp$_1 = to(this.yAxisOrientation_0.flip(), this.xAxisOrientation_0.flip());\n else\n tmp$_1 = to(this.xAxisOrientation_0, this.yAxisOrientation_0);\n var tmp$_6 = tmp$_1;\n var hAxisOrientation = tmp$_6.component1()\n , vAxisOrientation = tmp$_6.component2();\n var marginalLayers = flatten(this.marginalLayersByTile_0);\n var domainByMargin = MarginalLayerUtil_getInstance().marginalDomainByMargin_2z8kva$(marginalLayers, this.scaleXProto_0, this.scaleYProto_0);\n var marginsLayout = GeomMarginsLayout$Companion_getInstance().create_relqli$(marginalLayers);\n var destination_1 = ArrayList_init_0(collectionSizeOrDefault(domainsXYByTile, 10));\n var tmp$_7;\n tmp$_7 = domainsXYByTile.iterator();\n while (tmp$_7.hasNext()) {\n var item_1 = tmp$_7.next();\n var tmp$_8 = destination_1.add_11rb$;\n var xDomain = item_1.component1()\n , yDomain = item_1.component2();\n var adjustedDomain = this.coordProvider_0.adjustDomain_wthzt5$(DoubleRectangle_init_0(xDomain, yDomain));\n tmp$_8.call(destination_1, new SquareFrameOfReferenceProvider(hScaleProto, vScaleProto, adjustedDomain, flipAxis, hAxisOrientation, vAxisOrientation, this.theme_0, marginsLayout, domainByMargin));\n }\n var frameProviderByTile_0 = destination_1;\n var destination_2 = ArrayList_init_0(collectionSizeOrDefault(frameProviderByTile_0, 10));\n var tmp$_9;\n tmp$_9 = frameProviderByTile_0.iterator();\n while (tmp$_9.hasNext()) {\n var item_2 = tmp$_9.next();\n destination_2.add_11rb$(item_2.createTileLayoutProvider());\n }\n var layoutProviderByTile_0 = destination_2;\n var plotLayout_0 = PlotAssemblerUtil_getInstance().createPlotLayout_4j7bvh$(layoutProviderByTile_0, this.facets, this.theme_0.facets(), this.theme_0.horizontalAxis_6taknv$(flipAxis), this.theme_0.verticalAxis_6taknv$(flipAxis));\n tmp$_2 = this.createPlot_0(frameProviderByTile_0, plotLayout_0, legendsBoxInfos, styleSheet, plotContext);\n }\n return tmp$_2;\n };\n PlotAssembler.prototype.createPlot_0 = function (frameProviderByTile, plotLayout, legendBoxInfos, styleSheet, plotContext) {\n return new PlotSvgComponent(this.title, this.subtitle, this.caption, this.coreLayersByTile, this.marginalLayersByTile_0, plotLayout, frameProviderByTile, this.coordProvider_0, legendBoxInfos, this.interactionsEnabled_0, this.theme_0, styleSheet, plotContext);\n };\n PlotAssembler.prototype.disableLegends = function () {\n this.legendsEnabled_0 = false;\n };\n PlotAssembler.prototype.disableInteractions = function () {\n this.interactionsEnabled_0 = false;\n };\n function PlotAssembler$Companion() {\n PlotAssembler$Companion_instance = this;\n }\n PlotAssembler$Companion.prototype.demoAndTest_bl9f0c$ = function (plotLayers, scaleMap, scaleMappersNP, coordProvider, theme, xAxisOrientation, yAxisOrientation) {\n if (xAxisOrientation === void 0)\n xAxisOrientation = Orientation$BOTTOM_getInstance();\n if (yAxisOrientation === void 0)\n yAxisOrientation = Orientation$LEFT_getInstance();\n var layersByTile = ArrayList_init();\n layersByTile.add_11rb$(plotLayers);\n return this.multiTile_s59xp3$(layersByTile, scaleMap, scaleMappersNP, coordProvider, xAxisOrientation, yAxisOrientation, theme);\n };\n PlotAssembler$Companion.prototype.multiTile_s59xp3$ = function (layersByTile, scaleMap, scaleMappersNP, coordProvider, xAxisOrientation, yAxisOrientation, theme) {\n return new PlotAssembler(layersByTile, scaleMap, scaleMappersNP, coordProvider, xAxisOrientation, yAxisOrientation, theme);\n };\n PlotAssembler$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var PlotAssembler$Companion_instance = null;\n function PlotAssembler$Companion_getInstance() {\n if (PlotAssembler$Companion_instance === null) {\n new PlotAssembler$Companion();\n }\n return PlotAssembler$Companion_instance;\n }\n PlotAssembler.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PlotAssembler',\n interfaces: []\n };\n function PlotAssemblerPlotContext(layersByTile, scaleMap) {\n PlotAssemblerPlotContext$Companion_getInstance();\n this.scaleMap_0 = scaleMap;\n this.stitchedPlotLayers_0 = PlotAssemblerPlotContext$Companion_getInstance().createStitchedLayers_7yawgb$(layersByTile);\n this.transformedDomainByAes_0 = HashMap_init();\n this.tooltipFormatters_0 = HashMap_init();\n var $receiver = this.stitchedPlotLayers_0;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n destination.add_11rb$(new PlotAssemblerPlotContext$ContextPlotLayer(item));\n }\n this.layers_nhmcyd$_0 = destination;\n }\n Object.defineProperty(PlotAssemblerPlotContext.prototype, 'layers', {\n configurable: true,\n get: function () {\n return this.layers_nhmcyd$_0;\n }\n });\n PlotAssemblerPlotContext.prototype.getScale_896ixz$ = function (aes) {\n PlotAssemblerPlotContext$Companion_getInstance().checkPositionalAes_896ixz$(aes);\n return this.scaleMap_0.get_31786j$(aes);\n };\n PlotAssemblerPlotContext.prototype.overallTransformedDomain_896ixz$ = function (aes) {\n PlotAssemblerPlotContext$Companion_getInstance().checkPositionalAes_896ixz$(aes);\n var $receiver = this.transformedDomainByAes_0;\n var tmp$;\n var value = $receiver.get_11rb$(aes);\n if (value == null) {\n var answer = PlotAssemblerPlotContext$Companion_getInstance().computeOverallTransformedDomain_dcdl1o$(aes, this.stitchedPlotLayers_0, this.scaleMap_0);\n $receiver.put_xwzc9p$(aes, answer);\n tmp$ = answer;\n } else {\n tmp$ = value;\n }\n return tmp$;\n };\n PlotAssemblerPlotContext.prototype.getTooltipFormatter_scwrln$ = function (aes, defaultValue) {\n PlotAssemblerPlotContext$Companion_getInstance().checkPositionalAes_896ixz$(aes);\n var $receiver = this.tooltipFormatters_0;\n var tmp$;\n var value = $receiver.get_11rb$(aes);\n if (value == null) {\n var answer = defaultValue();\n $receiver.put_xwzc9p$(aes, answer);\n tmp$ = answer;\n } else {\n tmp$ = value;\n }\n return tmp$;\n };\n function PlotAssemblerPlotContext$Companion() {\n PlotAssemblerPlotContext$Companion_instance = this;\n }\n PlotAssemblerPlotContext$Companion.prototype.createStitchedLayers_7yawgb$ = function (layersByPanel) {\n var tmp$;\n if (layersByPanel.isEmpty())\n return emptyList();\n var layerCount = layersByPanel.get_za3lpa$(0).size;\n var stitchedLayers = ArrayList_init();\n for (var i = 0; i < layerCount; i++) {\n var layersOnPlane = ArrayList_init();\n tmp$ = layersByPanel.iterator();\n while (tmp$.hasNext()) {\n var panelLayers = tmp$.next();\n layersOnPlane.add_11rb$(panelLayers.get_za3lpa$(i));\n }\n stitchedLayers.add_11rb$(new StitchedPlotLayer(layersOnPlane));\n }\n return stitchedLayers;\n };\n function PlotAssemblerPlotContext$Companion$computeOverallTransformedDomain$isMatching(v, aes, isYOrientation) {\n var tmp$;\n var varAes = data.TransformVar.toAes_8xm3sj$(v);\n if (Aes.Companion.isPositionalXY_896ixz$(varAes))\n tmp$ = equals(Aes.Companion.toAxisAes_pnj1mo$(varAes, isYOrientation), aes);\n else\n tmp$ = equals(varAes, aes);\n return tmp$;\n }\n PlotAssemblerPlotContext$Companion.prototype.computeOverallTransformedDomain_dcdl1o$ = function (aes, stitchedLayers, scaleMap) {\n var tmp$, tmp$_0, tmp$_1, tmp$_2;\n this.checkPositionalAes_896ixz$(aes);\n var isMatching = PlotAssemblerPlotContext$Companion$computeOverallTransformedDomain$isMatching;\n var domainsRaw = ArrayList_init();\n tmp$ = stitchedLayers.iterator();\n while (tmp$.hasNext()) {\n var layer = tmp$.next();\n var $receiver = layer.getVariables_8be2vx$();\n var destination = ArrayList_init();\n var tmp$_3;\n tmp$_3 = $receiver.iterator();\n while (tmp$_3.hasNext()) {\n var element = tmp$_3.next();\n if (element.isTransform)\n destination.add_11rb$(element);\n }\n var destination_0 = ArrayList_init();\n var tmp$_4;\n tmp$_4 = destination.iterator();\n while (tmp$_4.hasNext()) {\n var element_0 = tmp$_4.next();\n if (isMatching(element_0, aes, layer.isYOrientation))\n destination_0.add_11rb$(element_0);\n }\n var variables = destination_0;\n tmp$_0 = variables.iterator();\n while (tmp$_0.hasNext()) {\n var transformVar = tmp$_0.next();\n var domain = layer.getDataRange_8xm3sj$(transformVar);\n if (domain != null) {\n domainsRaw.add_11rb$(domain);\n }\n }\n }\n var reduceOrNull$result;\n reduceOrNull$break: do {\n var iterator = domainsRaw.iterator();\n if (!iterator.hasNext()) {\n reduceOrNull$result = null;\n break reduceOrNull$break;\n }\n var accumulator = iterator.next();\n while (iterator.hasNext()) {\n accumulator = accumulator.union_3lmjpf$(iterator.next());\n }\n reduceOrNull$result = accumulator;\n }\n while (false);\n var overallTransformedDomain = reduceOrNull$result;\n var scale = scaleMap.get_31786j$(aes);\n if (scale.isContinuousDomain) {\n tmp$_2 = this.finalizeOverallTransformedDomain_0(overallTransformedDomain, Kotlin.isType(tmp$_1 = scale.transform, ContinuousTransform) ? tmp$_1 : throwCCE());\n } else {\n tmp$_2 = overallTransformedDomain != null ? overallTransformedDomain : DoubleSpan.Companion.singleton_14dthe$(0.0);\n }\n return tmp$_2;\n };\n PlotAssemblerPlotContext$Companion.prototype.finalizeOverallTransformedDomain_0 = function (transformedDomain, transform) {\n var tmp$, tmp$_0;\n if (transformedDomain == null)\n tmp$ = new Pair(kotlin_js_internal_DoubleCompanionObject.NaN, kotlin_js_internal_DoubleCompanionObject.NaN);\n else\n tmp$ = new Pair(transformedDomain.lowerEnd, transformedDomain.upperEnd);\n var tmp$_1 = tmp$;\n var dataLower = tmp$_1.component1()\n , dataUpper = tmp$_1.component2();\n var tmp$_2 = scale.ScaleUtil.transformedDefinedLimits_gxz7zd$(transform);\n var scaleLower = tmp$_2.component1()\n , scaleUpper = tmp$_2.component2();\n var lowerEnd = isFinite(scaleLower) ? scaleLower : dataLower;\n var upperEnd = isFinite(scaleUpper) ? scaleUpper : dataUpper;\n if (isFinite(lowerEnd) && isFinite(upperEnd))\n tmp$_0 = new DoubleSpan(lowerEnd, upperEnd);\n else if (isFinite(lowerEnd))\n tmp$_0 = new DoubleSpan(lowerEnd, lowerEnd);\n else if (isFinite(upperEnd))\n tmp$_0 = new DoubleSpan(upperEnd, upperEnd);\n else\n tmp$_0 = null;\n var newRange = tmp$_0;\n return data_0.SeriesUtil.ensureApplicableRange_w2blas$(newRange);\n };\n PlotAssemblerPlotContext$Companion.prototype.checkPositionalAes_896ixz$ = function (aes) {\n if (!(!Aes.Companion.isPositionalXY_896ixz$(aes) || equals(aes, Aes.Companion.X) || equals(aes, Aes.Companion.Y))) {\n var message = 'Positional aesthetic should be either X or Y but was ' + aes;\n throw IllegalStateException_init(message.toString());\n }\n };\n PlotAssemblerPlotContext$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var PlotAssemblerPlotContext$Companion_instance = null;\n function PlotAssemblerPlotContext$Companion_getInstance() {\n if (PlotAssemblerPlotContext$Companion_instance === null) {\n new PlotAssemblerPlotContext$Companion();\n }\n return PlotAssemblerPlotContext$Companion_instance;\n }\n function PlotAssemblerPlotContext$ContextPlotLayer(stitchedPlotLayer) {\n this.stitchedPlotLayer_0 = stitchedPlotLayer;\n }\n Object.defineProperty(PlotAssemblerPlotContext$ContextPlotLayer.prototype, 'isLegendDisabled', {\n configurable: true,\n get: function () {\n return this.stitchedPlotLayer_0.isLegendDisabled;\n }\n });\n Object.defineProperty(PlotAssemblerPlotContext$ContextPlotLayer.prototype, 'aestheticsDefaults', {\n configurable: true,\n get: function () {\n return this.stitchedPlotLayer_0.aestheticsDefaults;\n }\n });\n Object.defineProperty(PlotAssemblerPlotContext$ContextPlotLayer.prototype, 'legendKeyElementFactory', {\n configurable: true,\n get: function () {\n return this.stitchedPlotLayer_0.legendKeyElementFactory;\n }\n });\n PlotAssemblerPlotContext$ContextPlotLayer.prototype.renderedAes = function () {\n return this.stitchedPlotLayer_0.renderedAes();\n };\n PlotAssemblerPlotContext$ContextPlotLayer.prototype.hasBinding_896ixz$ = function (aes) {\n return this.stitchedPlotLayer_0.hasBinding_896ixz$(aes);\n };\n PlotAssemblerPlotContext$ContextPlotLayer.prototype.hasConstant_896ixz$ = function (aes) {\n return this.stitchedPlotLayer_0.hasConstant_896ixz$(aes);\n };\n PlotAssemblerPlotContext$ContextPlotLayer.prototype.getConstant_31786j$ = function (aes) {\n return this.stitchedPlotLayer_0.getConstant_31786j$(aes);\n };\n PlotAssemblerPlotContext$ContextPlotLayer.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ContextPlotLayer',\n interfaces: [PlotContext$Layer]\n };\n PlotAssemblerPlotContext.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PlotAssemblerPlotContext',\n interfaces: [PlotContext]\n };\n function PlotAssemblerUtil() {\n PlotAssemblerUtil_instance = this;\n }\n PlotAssemblerUtil.prototype.updateAesRangeMap_0 = function (aes, range, rangeByAes) {\n var range_0 = range;\n if (range_0 != null) {\n var wasRange = rangeByAes.get_11rb$(aes);\n if (wasRange != null) {\n range_0 = wasRange.union_3lmjpf$(range_0);\n }\n var value = range_0;\n rangeByAes.put_xwzc9p$(aes, value);\n }\n };\n PlotAssemblerUtil.prototype.createLegends_enmjz4$ = function (ctx, scaleMappersNP, guideOptionsMap, theme) {\n var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3, tmp$_4, tmp$_5, tmp$_6, tmp$_7, tmp$_8, tmp$_9, tmp$_10, tmp$_11, tmp$_12, tmp$_13, tmp$_14;\n var legendAssemblerByTitle = LinkedHashMap_init();\n var colorBarAssemblerByTitle = LinkedHashMap_init();\n tmp$ = ctx.layers.iterator();\n while (tmp$.hasNext()) {\n var contextLayer = tmp$.next();\n var layerConstantByAes = HashMap_init();\n tmp$_0 = contextLayer.renderedAes().iterator();\n while (tmp$_0.hasNext()) {\n var aes = tmp$_0.next();\n if (contextLayer.hasConstant_896ixz$(aes)) {\n var value = ensureNotNull(contextLayer.getConstant_31786j$(aes));\n layerConstantByAes.put_xwzc9p$(aes, value);\n }\n }\n var aesListByScaleName = LinkedHashMap_init();\n var aesList = PlotGuidesAssemblerUtil_getInstance().mappedRenderedAesToCreateGuides_afs8c5$(contextLayer, guideOptionsMap);\n tmp$_1 = aesList.iterator();\n while (tmp$_1.hasNext()) {\n var aes_0 = tmp$_1.next();\n var colorBar = false;\n var scale = ctx.getScale_896ixz$(aes_0);\n var scaleName = scale.name;\n if (guideOptionsMap.containsKey_11rb$(aes_0)) {\n var guideOptions = guideOptionsMap.get_11rb$(aes_0);\n if (Kotlin.isType(guideOptions, ColorBarOptions)) {\n PlotGuidesAssemblerUtil_getInstance().checkFitsColorBar_k9b7d3$(aes_0, scale);\n colorBar = true;\n tmp$_2 = ctx.overallTransformedDomain_896ixz$(aes_0);\n tmp$_4 = Kotlin.isType(tmp$_3 = scale, Scale) ? tmp$_3 : throwCCE();\n tmp$_6 = Kotlin.isType(tmp$_5 = getValue(scaleMappersNP, aes_0), ScaleMapper) ? tmp$_5 : throwCCE();\n var value_0 = PlotGuidesAssemblerUtil_getInstance().createColorBarAssembler_q2gm1k$(scaleName, tmp$_2, tmp$_4, tmp$_6, guideOptions, theme);\n colorBarAssemblerByTitle.put_xwzc9p$(scaleName, value_0);\n }\n } else if (PlotGuidesAssemblerUtil_getInstance().fitsColorBar_k9b7d3$(aes_0, scale)) {\n colorBar = true;\n tmp$_7 = ctx.overallTransformedDomain_896ixz$(aes_0);\n tmp$_9 = Kotlin.isType(tmp$_8 = scale, Scale) ? tmp$_8 : throwCCE();\n tmp$_11 = Kotlin.isType(tmp$_10 = getValue(scaleMappersNP, aes_0), ScaleMapper) ? tmp$_10 : throwCCE();\n var value_1 = PlotGuidesAssemblerUtil_getInstance().createColorBarAssembler_q2gm1k$(scaleName, tmp$_7, tmp$_9, tmp$_11, null, theme);\n colorBarAssemblerByTitle.put_xwzc9p$(scaleName, value_1);\n }\n if (!colorBar) {\n var tmp$_15;\n var value_2 = aesListByScaleName.get_11rb$(scaleName);\n if (value_2 == null) {\n var answer = ArrayList_init();\n aesListByScaleName.put_xwzc9p$(scaleName, answer);\n tmp$_15 = answer;\n } else {\n tmp$_15 = value_2;\n }\n tmp$_15.add_11rb$(aes_0);\n }\n }\n tmp$_12 = aesListByScaleName.keys.iterator();\n while (tmp$_12.hasNext()) {\n var scaleName_0 = tmp$_12.next();\n var tmp$_16;\n var value_3 = legendAssemblerByTitle.get_11rb$(scaleName_0);\n if (value_3 == null) {\n var answer_0 = new LegendAssembler(scaleName_0, guideOptionsMap, scaleMappersNP, theme);\n legendAssemblerByTitle.put_xwzc9p$(scaleName_0, answer_0);\n tmp$_16 = answer_0;\n } else {\n tmp$_16 = value_3;\n }\n var legendAssembler = tmp$_16;\n var aesListForScaleName = getValue(aesListByScaleName, scaleName_0);\n var legendKeyFactory = contextLayer.legendKeyElementFactory;\n var aestheticsDefaults = contextLayer.aestheticsDefaults;\n legendAssembler.addLayer_ut0rz1$(legendKeyFactory, aesListForScaleName, layerConstantByAes, aestheticsDefaults, ctx);\n }\n }\n var legendBoxInfos = ArrayList_init();\n tmp$_13 = colorBarAssemblerByTitle.keys.iterator();\n while (tmp$_13.hasNext()) {\n var legendTitle = tmp$_13.next();\n var boxInfo = ensureNotNull(colorBarAssemblerByTitle.get_11rb$(legendTitle)).createColorBar();\n if (!boxInfo.isEmpty) {\n legendBoxInfos.add_11rb$(boxInfo);\n }\n }\n tmp$_14 = legendAssemblerByTitle.keys.iterator();\n while (tmp$_14.hasNext()) {\n var legendTitle_0 = tmp$_14.next();\n var boxInfo_0 = ensureNotNull(legendAssemblerByTitle.get_11rb$(legendTitle_0)).createLegend();\n if (!boxInfo_0.isEmpty) {\n legendBoxInfos.add_11rb$(boxInfo_0);\n }\n }\n return legendBoxInfos;\n };\n PlotAssemblerUtil.prototype.createPlotLayout_4j7bvh$ = function (layoutProviderByTile, facets, facetsTheme, hAxisTheme, vAxisTheme) {\n if (!facets.isDefined) {\n var topDownLayout = layoutProviderByTile.get_za3lpa$(0).createTopDownTileLayout();\n return new SingleTilePlotLayout(topDownLayout, hAxisTheme, vAxisTheme);\n }\n return new FacetedPlotLayout(facets, layoutProviderByTile, facetsTheme.showStrip(), hAxisTheme, vAxisTheme);\n };\n PlotAssemblerUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'PlotAssemblerUtil',\n interfaces: []\n };\n var PlotAssemblerUtil_instance = null;\n function PlotAssemblerUtil_getInstance() {\n if (PlotAssemblerUtil_instance === null) {\n new PlotAssemblerUtil();\n }\n return PlotAssemblerUtil_instance;\n }\n function PlotFacets() {\n PlotFacets$Companion_getInstance();\n }\n PlotFacets.prototype.adjustHDomains_7qj307$ = function (domains) {\n return domains;\n };\n PlotFacets.prototype.adjustVDomains_7qj307$ = function (domains) {\n return domains;\n };\n function PlotFacets$Companion() {\n PlotFacets$Companion_instance = this;\n this.DEF_ORDER_DIR = 0;\n this.DEF_FORMATTER = PlotFacets$Companion$DEF_FORMATTER$lambda;\n }\n PlotFacets$Companion.prototype.undefined = function () {\n return new FacetGrid(null, null, emptyList(), emptyList(), 1, 1);\n };\n PlotFacets$Companion.prototype.dataByLevelTuple_w4sfrb$ = function (data, varNames, varLevels) {\n var tmp$, tmp$_0;\n var nameLevelTuples = this.createNameLevelTuples_5cxrh4$(varNames, varLevels);\n var indicesByVarByLevel = this.dataIndicesByVarByLevel_0(data, varNames, varLevels);\n var dataByLevelKey = ArrayList_init();\n tmp$ = nameLevelTuples.iterator();\n while (tmp$.hasNext()) {\n var nameLevelTuple = tmp$.next();\n var topName = first(nameLevelTuple).first;\n var topLevel = first(nameLevelTuple).second;\n var indices = ArrayList_init_1(getValue(getValue(indicesByVarByLevel, topName), topLevel));\n tmp$_0 = nameLevelTuple.size;\n for (var i = 1; i < tmp$_0; i++) {\n var name = nameLevelTuple.get_za3lpa$(i).first;\n var level = nameLevelTuple.get_za3lpa$(i).second;\n var levelIndices = getValue(getValue(indicesByVarByLevel, name), level);\n indices.retainAll_brywnq$(HashSet_init(levelIndices));\n }\n var destination = ArrayList_init_0(collectionSizeOrDefault(nameLevelTuple, 10));\n var tmp$_1;\n tmp$_1 = nameLevelTuple.iterator();\n while (tmp$_1.hasNext()) {\n var item = tmp$_1.next();\n destination.add_11rb$(item.second);\n }\n var levelKey = destination;\n var levelData = data.slice_ampky3$(indices);\n dataByLevelKey.add_11rb$(to(levelKey, levelData));\n }\n return dataByLevelKey;\n };\n PlotFacets$Companion.prototype.dataIndicesByVarByLevel_0 = function (data_1, varNames, varLevels) {\n var indicesByVarByLevel = HashMap_init();\n var i = 0;\n for (var tmp$ = varNames.iterator(); tmp$.hasNext(); ++i) {\n var varName = tmp$.next();\n var tmp$_0, tmp$_1;\n var levels = varLevels.get_za3lpa$(i);\n var indicesByLevel = HashMap_init();\n tmp$_0 = levels.iterator();\n while (tmp$_0.hasNext()) {\n var level = tmp$_0.next();\n if (data_1.isEmpty)\n tmp$_1 = emptyList();\n else if (data.DataFrameUtil.hasVariable_vede35$(data_1, varName)) {\n var variable = data.DataFrameUtil.findVariableOrFail_vede35$(data_1, varName);\n tmp$_1 = data_0.SeriesUtil.matchingIndices_3vukww$(data_1.get_8xm3sj$(variable), level);\n } else {\n tmp$_1 = toList(until(0, data_1.rowCount()));\n }\n var indices = tmp$_1;\n indicesByLevel.put_xwzc9p$(level, indices);\n }\n indicesByVarByLevel.put_xwzc9p$(varName, indicesByLevel);\n }\n return indicesByVarByLevel;\n };\n PlotFacets$Companion.prototype.createNameLevelTuples_5cxrh4$ = function (varNames, varLevels) {\n if (!!varNames.isEmpty()) {\n var message = 'Empty list of facet variables.';\n throw IllegalArgumentException_init(message.toString());\n }\n if (!(varNames.size === distinct(varNames).size)) {\n var message_0 = 'Facet variables must be distinct, were: ' + varNames + '.';\n throw IllegalArgumentException_init(message_0.toString());\n }\n if (!(varNames.size === varLevels.size)) {\n var message_1 = 'Check failed.';\n throw IllegalStateException_init(message_1.toString());\n }\n return this.createNameLevelTuplesIntern_0(varNames, varLevels);\n };\n PlotFacets$Companion.prototype.createNameLevelTuplesIntern_0 = function (varNames, varLevels) {\n var tmp$, tmp$_0;\n var name = first(varNames);\n var levels = first(varLevels);\n var levelKeys = ArrayList_init();\n tmp$ = levels.iterator();\n while (tmp$.hasNext()) {\n var level = tmp$.next();\n if (varNames.size > 1) {\n var subKeys = this.createNameLevelTuples_5cxrh4$(varNames.subList_vux9f0$(1, varNames.size), varLevels.subList_vux9f0$(1, varLevels.size));\n tmp$_0 = subKeys.iterator();\n while (tmp$_0.hasNext()) {\n var subKey = tmp$_0.next();\n levelKeys.add_11rb$(plus(listOf(to(name, level)), subKey));\n }\n } else {\n levelKeys.add_11rb$(listOf(to(name, level)));\n }\n }\n return levelKeys;\n };\n PlotFacets$Companion.prototype.reorderLevels_dyo1lv$ = function (varNames, varLevels, ordering) {\n var orderingByFacet = toMap(zip(varNames, ordering));\n var result = ArrayList_init();\n var i = 0;\n for (var tmp$ = varNames.iterator(); tmp$.hasNext(); ++i) {\n var name = tmp$.next();\n if (i >= varLevels.size)\n break;\n result.add_11rb$(this.reorderVarLevels_pbdvt$(name, varLevels.get_za3lpa$(i), getValue(orderingByFacet, name)));\n }\n return result;\n };\n PlotFacets$Companion.prototype.reorderVarLevels_pbdvt$ = function (name, levels, order) {\n var tmp$, tmp$_0;\n if (name == null)\n return levels;\n Kotlin.isType(tmp$ = levels, List) ? tmp$ : throwCCE();\n if (order <= -1)\n tmp$_0 = sortedDescending(levels);\n else if (order >= 1)\n tmp$_0 = sorted(levels);\n else\n tmp$_0 = levels;\n return tmp$_0;\n };\n function PlotFacets$Companion$DEF_FORMATTER$lambda(it) {\n return it.toString();\n }\n PlotFacets$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var PlotFacets$Companion_instance = null;\n function PlotFacets$Companion_getInstance() {\n if (PlotFacets$Companion_instance === null) {\n new PlotFacets$Companion();\n }\n return PlotFacets$Companion_instance;\n }\n function PlotFacets$FacetTileInfo(col, row, colLabs, rowLab, hasHAxis, hasVAxis, isBottom, trueIndex) {\n this.col = col;\n this.row = row;\n this.colLabs = colLabs;\n this.rowLab = rowLab;\n this.hasHAxis = hasHAxis;\n this.hasVAxis = hasVAxis;\n this.isBottom = isBottom;\n this.trueIndex = trueIndex;\n }\n PlotFacets$FacetTileInfo.prototype.toString = function () {\n return 'FacetTileInfo(col=' + this.col + ', row=' + this.row + ', colLabs=' + this.colLabs + ', rowLab=' + toString(this.rowLab) + ')';\n };\n PlotFacets$FacetTileInfo.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'FacetTileInfo',\n interfaces: []\n };\n PlotFacets.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PlotFacets',\n interfaces: []\n };\n function PlotGuidesAssemblerUtil() {\n PlotGuidesAssemblerUtil_instance = this;\n }\n PlotGuidesAssemblerUtil.prototype.mappedRenderedAesToCreateGuides_afs8c5$ = function (layer, guideOptionsMap) {\n var tmp$;\n if (layer.isLegendDisabled) {\n return emptyList();\n }\n var result = ArrayList_init();\n tmp$ = layer.renderedAes().iterator();\n while (tmp$.hasNext()) {\n var aes = tmp$.next();\n if (Aes.Companion.noGuideNeeded_896ixz$(aes)) {\n continue;\n }\n if (layer.hasConstant_896ixz$(aes)) {\n continue;\n }\n if (!layer.hasBinding_896ixz$(aes)) {\n continue;\n }\n if (guideOptionsMap.containsKey_11rb$(aes)) {\n if (guideOptionsMap.get_11rb$(aes) === GuideOptions$Companion_getInstance().NONE) {\n continue;\n }\n }\n result.add_11rb$(aes);\n }\n return result;\n };\n PlotGuidesAssemblerUtil.prototype.createColorBarAssembler_q2gm1k$ = function (scaleName, transformedDomain, scale, scaleMapper, options, theme) {\n var result = new ColorBarAssembler(scaleName, transformedDomain, scale, scaleMapper, theme);\n result.setOptions_p8ufd2$(options);\n return result;\n };\n PlotGuidesAssemblerUtil.prototype.fitsColorBar_k9b7d3$ = function (aes, scale) {\n return aes.isColor && scale.isContinuous;\n };\n PlotGuidesAssemblerUtil.prototype.checkFitsColorBar_k9b7d3$ = function (aes, scale) {\n if (!aes.isColor) {\n var message = 'Color-bar is not applicable to ' + aes + ' aesthetic';\n throw IllegalStateException_init(message.toString());\n }\n if (!scale.isContinuous) {\n var message_0 = 'Color-bar is only applicable when both domain and color palette are continuous';\n throw IllegalStateException_init(message_0.toString());\n }\n };\n PlotGuidesAssemblerUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'PlotGuidesAssemblerUtil',\n interfaces: []\n };\n var PlotGuidesAssemblerUtil_instance = null;\n function PlotGuidesAssemblerUtil_getInstance() {\n if (PlotGuidesAssemblerUtil_instance === null) {\n new PlotGuidesAssemblerUtil();\n }\n return PlotGuidesAssemblerUtil_instance;\n }\n function PosProvider() {\n PosProvider$Companion_getInstance();\n }\n function PosProvider$Companion() {\n PosProvider$Companion_instance = this;\n }\n function PosProvider$Companion$wrap$ObjectLiteral(closure$pos) {\n this.closure$pos = closure$pos;\n PosProvider.call(this);\n }\n PosProvider$Companion$wrap$ObjectLiteral.prototype.createPos_q7kk9g$ = function (ctx) {\n return this.closure$pos;\n };\n PosProvider$Companion$wrap$ObjectLiteral.prototype.handlesGroups = function () {\n return this.closure$pos.handlesGroups();\n };\n PosProvider$Companion$wrap$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [PosProvider]\n };\n PosProvider$Companion.prototype.wrap_dkjclg$ = function (pos) {\n return new PosProvider$Companion$wrap$ObjectLiteral(pos);\n };\n function PosProvider$Companion$barStack$ObjectLiteral(closure$vjust) {\n this.closure$vjust = closure$vjust;\n PosProvider.call(this);\n }\n PosProvider$Companion$barStack$ObjectLiteral.prototype.createPos_q7kk9g$ = function (ctx) {\n return pos.PositionAdjustments.stack_nvozds$(ctx.aesthetics, this.closure$vjust);\n };\n PosProvider$Companion$barStack$ObjectLiteral.prototype.handlesGroups = function () {\n return PositionAdjustments$Meta.STACK.handlesGroups();\n };\n PosProvider$Companion$barStack$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [PosProvider]\n };\n PosProvider$Companion.prototype.barStack_yrwdxb$ = function (vjust) {\n if (vjust === void 0)\n vjust = null;\n return new PosProvider$Companion$barStack$ObjectLiteral(vjust);\n };\n function PosProvider$Companion$dodge$ObjectLiteral(closure$width) {\n this.closure$width = closure$width;\n PosProvider.call(this);\n }\n PosProvider$Companion$dodge$ObjectLiteral.prototype.createPos_q7kk9g$ = function (ctx) {\n var aesthetics = ctx.aesthetics;\n var groupCount = ctx.groupCount;\n return pos.PositionAdjustments.dodge_vvhcz8$(aesthetics, groupCount, this.closure$width);\n };\n PosProvider$Companion$dodge$ObjectLiteral.prototype.handlesGroups = function () {\n return PositionAdjustments$Meta.DODGE.handlesGroups();\n };\n PosProvider$Companion$dodge$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [PosProvider]\n };\n PosProvider$Companion.prototype.dodge_yrwdxb$ = function (width) {\n if (width === void 0)\n width = null;\n return new PosProvider$Companion$dodge$ObjectLiteral(width);\n };\n function PosProvider$Companion$fill$ObjectLiteral(closure$vjust) {\n this.closure$vjust = closure$vjust;\n PosProvider.call(this);\n }\n PosProvider$Companion$fill$ObjectLiteral.prototype.createPos_q7kk9g$ = function (ctx) {\n return pos.PositionAdjustments.fill_nvozds$(ctx.aesthetics, this.closure$vjust);\n };\n PosProvider$Companion$fill$ObjectLiteral.prototype.handlesGroups = function () {\n return PositionAdjustments$Meta.FILL.handlesGroups();\n };\n PosProvider$Companion$fill$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [PosProvider]\n };\n PosProvider$Companion.prototype.fill_yrwdxb$ = function (vjust) {\n if (vjust === void 0)\n vjust = null;\n return new PosProvider$Companion$fill$ObjectLiteral(vjust);\n };\n function PosProvider$Companion$jitter$ObjectLiteral(closure$width, closure$height) {\n this.closure$width = closure$width;\n this.closure$height = closure$height;\n PosProvider.call(this);\n }\n PosProvider$Companion$jitter$ObjectLiteral.prototype.createPos_q7kk9g$ = function (ctx) {\n return pos.PositionAdjustments.jitter_jma9l8$(this.closure$width, this.closure$height);\n };\n PosProvider$Companion$jitter$ObjectLiteral.prototype.handlesGroups = function () {\n return PositionAdjustments$Meta.JITTER.handlesGroups();\n };\n PosProvider$Companion$jitter$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [PosProvider]\n };\n PosProvider$Companion.prototype.jitter_jma9l8$ = function (width, height) {\n return new PosProvider$Companion$jitter$ObjectLiteral(width, height);\n };\n function PosProvider$Companion$nudge$ObjectLiteral(closure$width, closure$height) {\n this.closure$width = closure$width;\n this.closure$height = closure$height;\n PosProvider.call(this);\n }\n PosProvider$Companion$nudge$ObjectLiteral.prototype.createPos_q7kk9g$ = function (ctx) {\n return pos.PositionAdjustments.nudge_jma9l8$(this.closure$width, this.closure$height);\n };\n PosProvider$Companion$nudge$ObjectLiteral.prototype.handlesGroups = function () {\n return PositionAdjustments$Meta.NUDGE.handlesGroups();\n };\n PosProvider$Companion$nudge$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [PosProvider]\n };\n PosProvider$Companion.prototype.nudge_jma9l8$ = function (width, height) {\n return new PosProvider$Companion$nudge$ObjectLiteral(width, height);\n };\n function PosProvider$Companion$jitterDodge$ObjectLiteral(closure$width, closure$jitterWidth, closure$jitterHeight) {\n this.closure$width = closure$width;\n this.closure$jitterWidth = closure$jitterWidth;\n this.closure$jitterHeight = closure$jitterHeight;\n PosProvider.call(this);\n }\n PosProvider$Companion$jitterDodge$ObjectLiteral.prototype.createPos_q7kk9g$ = function (ctx) {\n var aesthetics = ctx.aesthetics;\n var groupCount = ctx.groupCount;\n return pos.PositionAdjustments.jitterDodge_e2pc44$(aesthetics, groupCount, this.closure$width, this.closure$jitterWidth, this.closure$jitterHeight);\n };\n PosProvider$Companion$jitterDodge$ObjectLiteral.prototype.handlesGroups = function () {\n return PositionAdjustments$Meta.JITTER_DODGE.handlesGroups();\n };\n PosProvider$Companion$jitterDodge$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [PosProvider]\n };\n PosProvider$Companion.prototype.jitterDodge_xjrefz$ = function (width, jitterWidth, jitterHeight) {\n return new PosProvider$Companion$jitterDodge$ObjectLiteral(width, jitterWidth, jitterHeight);\n };\n PosProvider$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var PosProvider$Companion_instance = null;\n function PosProvider$Companion_getInstance() {\n if (PosProvider$Companion_instance === null) {\n new PosProvider$Companion();\n }\n return PosProvider$Companion_instance;\n }\n PosProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PosProvider',\n interfaces: []\n };\n function PositionalScalesUtil() {\n PositionalScalesUtil_instance = this;\n }\n PositionalScalesUtil.prototype.computePlotXYTransformedDomains_6ppuq6$ = function (layersByTile, xScaleProto, yScaleProto, facets) {\n var tmp$;\n var xInitialDomain = PositionalScalesUtil$RangeUtil_getInstance().initialRange_abdep2$(xScaleProto.transform);\n var yInitialDomain = PositionalScalesUtil$RangeUtil_getInstance().initialRange_abdep2$(yScaleProto.transform);\n var xDomains = ArrayList_init();\n var yDomains = ArrayList_init();\n tmp$ = layersByTile.iterator();\n while (tmp$.hasNext()) {\n var tileLayers = tmp$.next();\n var tmp$_0 = this.computeTileXYDomains_0(tileLayers, xInitialDomain, yInitialDomain);\n var xDomain = tmp$_0.component1()\n , yDomain = tmp$_0.component2();\n xDomains.add_11rb$(xDomain);\n yDomains.add_11rb$(yDomain);\n }\n var adjustedXDomains = facets.adjustHDomains_7qj307$(xDomains);\n var adjustedYDomains = facets.adjustVDomains_7qj307$(yDomains);\n var finalizedXDomains = this.finalizeDomains_0(Aes.Companion.X, xScaleProto, adjustedXDomains, layersByTile, facets.freeHScale);\n var finalizedYDomains = this.finalizeDomains_0(Aes.Companion.Y, yScaleProto, adjustedYDomains, layersByTile, facets.freeVScale);\n return zip(finalizedXDomains, finalizedYDomains);\n };\n PositionalScalesUtil.prototype.finalizeDomains_0 = function (aes, scaleProto, domains, layersByTile, freeScale) {\n var tmp$;\n if (freeScale) {\n var destination = ArrayList_init_0(collectionSizeOrDefault(domains, 10));\n var tmp$_0, tmp$_0_0;\n var index = 0;\n tmp$_0 = domains.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n var tmp$_1 = destination.add_11rb$;\n var i = checkIndexOverflow((tmp$_0_0 = index, index = tmp$_0_0 + 1 | 0, tmp$_0_0));\n var domainExpanded = PositionalScalesUtil$RangeUtil_getInstance().expandRange_902xfk$(item, aes, scaleProto, layersByTile.get_za3lpa$(i));\n tmp$_1.call(destination, data_0.SeriesUtil.ensureApplicableRange_w2blas$(domainExpanded));\n }\n tmp$ = destination;\n } else {\n var $receiver = filterNotNull(domains);\n var reduceOrNull$result;\n reduceOrNull$break: do {\n var iterator = $receiver.iterator();\n if (!iterator.hasNext()) {\n reduceOrNull$result = null;\n break reduceOrNull$break;\n }\n var accumulator = iterator.next();\n while (iterator.hasNext()) {\n var r0 = accumulator;\n var r1 = iterator.next();\n accumulator = ensureNotNull(PositionalScalesUtil$RangeUtil_getInstance().updateRange_y0d4pd$(r0, r1));\n }\n reduceOrNull$result = accumulator;\n }\n while (false);\n var domainOverall = reduceOrNull$result;\n var $receiver_0 = layersByTile.get_za3lpa$(0);\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault($receiver_0, 10));\n var tmp$_2;\n tmp$_2 = $receiver_0.iterator();\n while (tmp$_2.hasNext()) {\n var item_0 = tmp$_2.next();\n destination_0.add_11rb$(item_0.preferableNullDomain_896ixz$(aes));\n }\n var reduceOrNull$result_0;\n reduceOrNull$break: do {\n var iterator_0 = destination_0.iterator();\n if (!iterator_0.hasNext()) {\n reduceOrNull$result_0 = null;\n break reduceOrNull$break;\n }\n var accumulator_0 = iterator_0.next();\n while (iterator_0.hasNext()) {\n var r0_0 = accumulator_0;\n var r1_0 = iterator_0.next();\n accumulator_0 = ensureNotNull(PositionalScalesUtil$RangeUtil_getInstance().updateRange_y0d4pd$(r0_0, r1_0));\n }\n reduceOrNull$result_0 = accumulator_0;\n }\n while (false);\n var preferableNullDomainOverall = reduceOrNull$result_0;\n var domainExpanded_0 = PositionalScalesUtil$RangeUtil_getInstance().expandRange_902xfk$(domainOverall, aes, scaleProto, layersByTile.get_za3lpa$(0));\n var domain = data_0.SeriesUtil.ensureApplicableRange_w2blas$(domainExpanded_0, preferableNullDomainOverall);\n var destination_1 = ArrayList_init_0(collectionSizeOrDefault(layersByTile, 10));\n var tmp$_3;\n tmp$_3 = layersByTile.iterator();\n while (tmp$_3.hasNext()) {\n var item_1 = tmp$_3.next();\n destination_1.add_11rb$(domain);\n }\n tmp$ = destination_1;\n }\n return tmp$;\n };\n PositionalScalesUtil.prototype.computeTileXYDomains_0 = function (layers, xInitialDomain, yInitialDomain) {\n var tmp$;\n var result = LinkedHashMap_init_0(coerceAtLeast(mapCapacity(collectionSizeOrDefault(layers, 10)), 16));\n var tmp$_0;\n tmp$_0 = layers.iterator();\n while (tmp$_0.hasNext()) {\n var element = tmp$_0.next();\n result.put_xwzc9p$(element, this.positionalDryRunAesthetics_0(element));\n }\n var positionaDryRunAestheticsByLayer = result;\n var xDomainOverall = null;\n var yDomainOverall = null;\n tmp$ = positionaDryRunAestheticsByLayer.entries.iterator();\n while (tmp$.hasNext()) {\n var tmp$_1 = tmp$.next();\n var layer = tmp$_1.key;\n var aesthetics = tmp$_1.value;\n var xyRanges = this.computeLayerDryRunXYRanges_0(layer, aesthetics);\n var xRangeLayer = PositionalScalesUtil$RangeUtil_getInstance().updateRange_y0d4pd$(xInitialDomain, xyRanges.first);\n var yRangeLayer = PositionalScalesUtil$RangeUtil_getInstance().updateRange_y0d4pd$(yInitialDomain, xyRanges.second);\n xDomainOverall = PositionalScalesUtil$RangeUtil_getInstance().updateRange_y0d4pd$(xRangeLayer, xDomainOverall);\n yDomainOverall = PositionalScalesUtil$RangeUtil_getInstance().updateRange_y0d4pd$(yRangeLayer, yDomainOverall);\n }\n return new Pair(xDomainOverall, yDomainOverall);\n };\n PositionalScalesUtil.prototype.positionalDryRunAesthetics_0 = function (layer) {\n var $receiver = layer.renderedAes();\n var destination = ArrayList_init();\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n if (Aes.Companion.affectingScaleX_896ixz$(element) || Aes.Companion.affectingScaleY_896ixz$(element) || equals(element, Aes.Companion.HEIGHT) || equals(element, Aes.Companion.WIDTH))\n destination.add_11rb$(element);\n }\n var aesList = destination;\n var result = LinkedHashMap_init_0(coerceAtLeast(mapCapacity(collectionSizeOrDefault(aesList, 10)), 16));\n var tmp$_0;\n tmp$_0 = aesList.iterator();\n while (tmp$_0.hasNext()) {\n var element_0 = tmp$_0.next();\n result.put_xwzc9p$(element_0, scale.Mappers.IDENTITY);\n }\n var mappers = result;\n return PlotUtil_getInstance().createLayerAesthetics_6wb5xp$(layer, aesList, mappers);\n };\n PositionalScalesUtil.prototype.computeLayerDryRunXYRanges_0 = function (layer, aesthetics) {\n var tmp$, tmp$_0;\n tmp$ = layer.isYOrientation;\n if (tmp$ === true)\n tmp$_0 = new YOrientationAesthetics(aesthetics);\n else if (tmp$ === false)\n tmp$_0 = aesthetics;\n else\n tmp$_0 = Kotlin.noWhenBranchMatched();\n var aesthetics_0 = tmp$_0;\n var block$result;\n var tmp$_1;\n var geomCtx = GeomContextBuilder_init().aesthetics_m7huy5$(aesthetics_0).build();\n var rangesXY = this.computeLayerDryRunXYRangesAfterPosAdjustment_0(layer, aesthetics_0, geomCtx);\n tmp$_1 = layer.isYOrientation;\n if (tmp$_1 === true) {\n block$result = new Pair(rangesXY.second, rangesXY.first);\n } else if (tmp$_1 === false) {\n block$result = rangesXY;\n } else {\n block$result = Kotlin.noWhenBranchMatched();\n }\n var rangesAfterPosAdjustment = block$result;\n var geomCtx_0 = GeomContextBuilder_init().aesthetics_m7huy5$(aesthetics).build();\n var tmp$_2 = this.computeLayerDryRunXYRangesAfterSizeExpand_0(layer, aesthetics, geomCtx_0);\n var xRangeAfterSizeExpand = tmp$_2.component1()\n , yRangeAfterSizeExpand = tmp$_2.component2();\n var rangeX = rangesAfterPosAdjustment.first;\n if (rangeX == null) {\n rangeX = xRangeAfterSizeExpand;\n } else if (xRangeAfterSizeExpand != null) {\n rangeX = rangeX.union_3lmjpf$(xRangeAfterSizeExpand);\n }\n var rangeY = rangesAfterPosAdjustment.second;\n if (rangeY == null) {\n rangeY = yRangeAfterSizeExpand;\n } else if (yRangeAfterSizeExpand != null) {\n rangeY = rangeY.union_3lmjpf$(yRangeAfterSizeExpand);\n }\n return new Pair(rangeX, rangeY);\n };\n PositionalScalesUtil.prototype.computeLayerDryRunXYRangesAfterPosAdjustment_0 = function (layer, aes, geomCtx) {\n var tmp$, tmp$_0, tmp$_1;\n var posAesX = Aes.Companion.affectingScaleX_shhb9a$(layer.renderedAes());\n var posAesY = Aes.Companion.affectingScaleY_shhb9a$(layer.renderedAes());\n var pos = PlotUtil_getInstance().createPositionAdjustment_h0u0lr$(layer.posProvider, aes);\n if (pos.isIdentity) {\n var rangeX = PositionalScalesUtil$RangeUtil_getInstance().combineRanges_73x37m$(posAesX, aes);\n var rangeY = PositionalScalesUtil$RangeUtil_getInstance().combineRanges_73x37m$(posAesY, aes);\n return new Pair(rangeX, rangeY);\n }\n var adjustedMinX = 0.0;\n var adjustedMaxX = 0.0;\n var adjustedMinY = 0.0;\n var adjustedMaxY = 0.0;\n var rangesInited = false;\n var cardinality = Kotlin.imul(posAesX.size, posAesY.size);\n var px = Kotlin.newArray(cardinality, null);\n var py = Kotlin.newArray(cardinality, null);\n tmp$ = aes.dataPoints().iterator();\n while (tmp$.hasNext()) {\n var p = tmp$.next();\n var i = -1;\n tmp$_0 = posAesX.iterator();\n while (tmp$_0.hasNext()) {\n var aesX = tmp$_0.next();\n var valX = p.numeric_vktour$(aesX);\n tmp$_1 = posAesY.iterator();\n while (tmp$_1.hasNext()) {\n var aesY = tmp$_1.next();\n var valY = p.numeric_vktour$(aesY);\n i = i + 1 | 0;\n px[i] = valX;\n py[i] = valY;\n }\n }\n while (i >= 0) {\n if (px[i] != null && py[i] != null) {\n var x = px[i];\n var y = py[i];\n if (data_0.SeriesUtil.isFinite_yrwdxb$(x) && data_0.SeriesUtil.isFinite_yrwdxb$(y)) {\n var newLoc = pos.translate_tshsjz$(new DoubleVector(ensureNotNull(x), ensureNotNull(y)), p, geomCtx);\n var adjustedX = newLoc.x;\n var adjustedY = newLoc.y;\n if (rangesInited) {\n var b = adjustedMinX;\n adjustedMinX = JsMath.min(adjustedX, b);\n var b_0 = adjustedMaxX;\n adjustedMaxX = JsMath.max(adjustedX, b_0);\n var b_1 = adjustedMinY;\n adjustedMinY = JsMath.min(adjustedY, b_1);\n var b_2 = adjustedMaxY;\n adjustedMaxY = JsMath.max(adjustedY, b_2);\n } else {\n adjustedMaxX = adjustedX;\n adjustedMinX = adjustedMaxX;\n adjustedMaxY = adjustedY;\n adjustedMinY = adjustedMaxY;\n rangesInited = true;\n }\n }\n }\n i = i - 1 | 0;\n }\n }\n var xRange = rangesInited ? new DoubleSpan(adjustedMinX, adjustedMaxX) : null;\n var yRange = rangesInited ? new DoubleSpan(adjustedMinY, adjustedMaxY) : null;\n return new Pair(xRange, yRange);\n };\n function PositionalScalesUtil$computeLayerDryRunXYRangesAfterSizeExpand$lambda(closure$geom, closure$widthAxis, closure$resolution, closure$isDiscrete) {\n return function (p) {\n return closure$geom.widthSpan_rxtiyv$(p, closure$widthAxis, closure$resolution, closure$isDiscrete);\n };\n }\n function PositionalScalesUtil$computeLayerDryRunXYRangesAfterSizeExpand$lambda_0(closure$widthAxis, closure$resolution) {\n return function (p) {\n return geom.PointDimensionsUtil.dimensionSpan_qdql09$(p, closure$widthAxis, Aes.Companion.WIDTH, closure$resolution);\n };\n }\n function PositionalScalesUtil$computeLayerDryRunXYRangesAfterSizeExpand$lambda_1(closure$geom, closure$heightAxis, closure$resolution, closure$isDiscrete) {\n return function (p) {\n return closure$geom.heightSpan_rxtiyv$(p, closure$heightAxis, closure$resolution, closure$isDiscrete);\n };\n }\n function PositionalScalesUtil$computeLayerDryRunXYRangesAfterSizeExpand$lambda_2(closure$heightAxis, closure$resolution) {\n return function (p) {\n return geom.PointDimensionsUtil.dimensionSpan_qdql09$(p, closure$heightAxis, Aes.Companion.HEIGHT, closure$resolution);\n };\n }\n PositionalScalesUtil.prototype.computeLayerDryRunXYRangesAfterSizeExpand_0 = function (layer, aesthetics, geomCtx) {\n var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3;\n tmp$ = layer.isYOrientation;\n if (tmp$ === true)\n tmp$_0 = to(Aes.Companion.Y, Aes.Companion.X);\n else if (tmp$ === false)\n tmp$_0 = to(Aes.Companion.X, Aes.Companion.Y);\n else\n tmp$_0 = Kotlin.noWhenBranchMatched();\n var tmp$_4 = tmp$_0;\n var widthAxis = tmp$_4.component1()\n , heightAxis = tmp$_4.component2();\n var geom = layer.geom;\n var renderedAes = layer.renderedAes();\n if (Kotlin.isType(geom, WithWidth)) {\n var resolution = geomCtx.getResolution_vktour$(widthAxis);\n var isDiscrete = !layer.scaleMap.get_31786j$(widthAxis).isContinuousDomain;\n tmp$_1 = this.computeLayerDryRunRangeAfterSizeExpand_0(aesthetics, PositionalScalesUtil$computeLayerDryRunXYRangesAfterSizeExpand$lambda(geom, widthAxis, resolution, isDiscrete));\n } else if (renderedAes.contains_11rb$(Aes.Companion.WIDTH)) {\n var resolution_0 = geomCtx.getResolution_vktour$(widthAxis);\n tmp$_1 = this.computeLayerDryRunRangeAfterSizeExpand_0(aesthetics, PositionalScalesUtil$computeLayerDryRunXYRangesAfterSizeExpand$lambda_0(widthAxis, resolution_0));\n } else\n tmp$_1 = null;\n tmp$_2 = to(widthAxis, tmp$_1);\n if (Kotlin.isType(geom, WithHeight)) {\n var resolution_1 = geomCtx.getResolution_vktour$(heightAxis);\n var isDiscrete_0 = !layer.scaleMap.get_31786j$(heightAxis).isContinuousDomain;\n tmp$_3 = this.computeLayerDryRunRangeAfterSizeExpand_0(aesthetics, PositionalScalesUtil$computeLayerDryRunXYRangesAfterSizeExpand$lambda_1(geom, heightAxis, resolution_1, isDiscrete_0));\n } else if (renderedAes.contains_11rb$(Aes.Companion.HEIGHT)) {\n var resolution_2 = geomCtx.getResolution_vktour$(heightAxis);\n tmp$_3 = this.computeLayerDryRunRangeAfterSizeExpand_0(aesthetics, PositionalScalesUtil$computeLayerDryRunXYRangesAfterSizeExpand$lambda_2(heightAxis, resolution_2));\n } else\n tmp$_3 = null;\n var xy = mapOf([tmp$_2, to(heightAxis, tmp$_3)]);\n return new Pair(getValue(xy, Aes.Companion.X), getValue(xy, Aes.Companion.Y));\n };\n PositionalScalesUtil.prototype.computeLayerDryRunRangeAfterSizeExpand_0 = function (aesthetics, pointSpan) {\n var tmp$;\n var minMax = null;\n tmp$ = aesthetics.dataPoints().iterator();\n while (tmp$.hasNext()) {\n var p = tmp$.next();\n var span = pointSpan(p);\n minMax = data_0.SeriesUtil.span_w2blas$(minMax, span);\n }\n return minMax;\n };\n function PositionalScalesUtil$RangeUtil() {\n PositionalScalesUtil$RangeUtil_instance = this;\n }\n PositionalScalesUtil$RangeUtil.prototype.initialRange_abdep2$ = function (transform) {\n var tmp$;\n if (Kotlin.isType(transform, ContinuousTransform)) {\n var $receiver = toList_0(scale.ScaleUtil.transformedDefinedLimits_gxz7zd$(transform));\n var destination = ArrayList_init();\n var tmp$_0;\n tmp$_0 = $receiver.iterator();\n while (tmp$_0.hasNext()) {\n var element = tmp$_0.next();\n if (isFinite(element))\n destination.add_11rb$(element);\n }\n var lims = destination;\n tmp$ = lims.isEmpty() ? null : DoubleSpan.Companion.encloseAll_l63ks6$(lims);\n } else if (Kotlin.isType(transform, DiscreteTransform))\n tmp$ = DoubleSpan.Companion.encloseAll_l63ks6$(transform.effectiveDomainTransformed);\n else\n throw IllegalStateException_init('Unexpected transform type: ' + toString(Kotlin.getKClassFromExpression(transform).simpleName));\n return tmp$;\n };\n PositionalScalesUtil$RangeUtil.prototype.expandRange_902xfk$ = function (range, aes, scale, layers) {\n var tmp$;\n var any$result;\n any$break: do {\n var tmp$_0;\n if (Kotlin.isType(layers, Collection) && layers.isEmpty()) {\n any$result = false;\n break any$break;\n }\n tmp$_0 = layers.iterator();\n while (tmp$_0.hasNext()) {\n var element = tmp$_0.next();\n if (element.rangeIncludesZero_896ixz$(aes)) {\n any$result = true;\n break any$break;\n }\n }\n any$result = false;\n }\n while (false);\n var includeZero = any$result;\n if (includeZero === true)\n tmp$ = this.updateRange_y0d4pd$(DoubleSpan.Companion.singleton_14dthe$(0.0), range);\n else if (includeZero === false)\n tmp$ = range;\n else\n tmp$ = Kotlin.noWhenBranchMatched();\n var range_0 = tmp$;\n return PlotUtil_getInstance().rangeWithExpand_wxtkag$(range_0, scale, includeZero);\n };\n PositionalScalesUtil$RangeUtil.prototype.updateRange_0 = function (values, wasRange) {\n var tmp$;\n var newRange = DoubleSpan.Companion.encloseAll_l63ks6$(values);\n if (wasRange == null)\n tmp$ = newRange;\n else\n tmp$ = wasRange.union_3lmjpf$(newRange);\n return tmp$;\n };\n PositionalScalesUtil$RangeUtil.prototype.updateRange_y0d4pd$ = function (range, wasRange) {\n var range_0 = range;\n if (range_0 != null) {\n if (wasRange != null) {\n range_0 = wasRange.union_3lmjpf$(range_0);\n }\n return range_0;\n }\n return wasRange;\n };\n PositionalScalesUtil$RangeUtil.prototype.combineRanges_73x37m$ = function (aesList, aesthetics) {\n var tmp$, tmp$_0;\n var result = null;\n tmp$ = aesList.iterator();\n while (tmp$.hasNext()) {\n var aes = tmp$.next();\n var range = aesthetics.range_vktour$(aes);\n if (range != null) {\n result = (tmp$_0 = result != null ? result.union_3lmjpf$(range) : null) != null ? tmp$_0 : range;\n }\n }\n return result;\n };\n PositionalScalesUtil$RangeUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'RangeUtil',\n interfaces: []\n };\n var PositionalScalesUtil$RangeUtil_instance = null;\n function PositionalScalesUtil$RangeUtil_getInstance() {\n if (PositionalScalesUtil$RangeUtil_instance === null) {\n new PositionalScalesUtil$RangeUtil();\n }\n return PositionalScalesUtil$RangeUtil_instance;\n }\n PositionalScalesUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'PositionalScalesUtil',\n interfaces: []\n };\n var PositionalScalesUtil_instance = null;\n function PositionalScalesUtil_getInstance() {\n if (PositionalScalesUtil_instance === null) {\n new PositionalScalesUtil();\n }\n return PositionalScalesUtil_instance;\n }\n function StitchedPlotLayer(geomLayers) {\n this.geomLayers_0 = geomLayers;\n }\n Object.defineProperty(StitchedPlotLayer.prototype, 'isYOrientation', {\n configurable: true,\n get: function () {\n if (!!this.geomLayers_0.isEmpty()) {\n var message = 'Check failed.';\n throw IllegalStateException_init(message.toString());\n }\n return this.geomLayers_0.get_za3lpa$(0).isYOrientation;\n }\n });\n Object.defineProperty(StitchedPlotLayer.prototype, 'legendKeyElementFactory', {\n configurable: true,\n get: function () {\n if (!!this.geomLayers_0.isEmpty()) {\n var message = 'Check failed.';\n throw IllegalStateException_init(message.toString());\n }\n return this.geomLayers_0.get_za3lpa$(0).legendKeyElementFactory;\n }\n });\n Object.defineProperty(StitchedPlotLayer.prototype, 'aestheticsDefaults', {\n configurable: true,\n get: function () {\n if (!!this.geomLayers_0.isEmpty()) {\n var message = 'Check failed.';\n throw IllegalStateException_init(message.toString());\n }\n return this.geomLayers_0.get_za3lpa$(0).aestheticsDefaults;\n }\n });\n Object.defineProperty(StitchedPlotLayer.prototype, 'isLegendDisabled', {\n configurable: true,\n get: function () {\n if (!!this.geomLayers_0.isEmpty()) {\n var message = 'Check failed.';\n throw IllegalStateException_init(message.toString());\n }\n return this.geomLayers_0.get_za3lpa$(0).isLegendDisabled;\n }\n });\n StitchedPlotLayer.prototype.renderedAes = function () {\n var tmp$;\n if (this.geomLayers_0.isEmpty()) {\n tmp$ = emptyList();\n } else\n tmp$ = this.geomLayers_0.get_za3lpa$(0).renderedAes();\n return tmp$;\n };\n StitchedPlotLayer.prototype.hasBinding_896ixz$ = function (aes) {\n return !this.geomLayers_0.isEmpty() && this.geomLayers_0.get_za3lpa$(0).hasBinding_896ixz$(aes);\n };\n StitchedPlotLayer.prototype.hasConstant_896ixz$ = function (aes) {\n return !this.geomLayers_0.isEmpty() && this.geomLayers_0.get_za3lpa$(0).hasConstant_896ixz$(aes);\n };\n StitchedPlotLayer.prototype.getConstant_31786j$ = function (aes) {\n if (!!this.geomLayers_0.isEmpty()) {\n var message = 'Check failed.';\n throw IllegalStateException_init(message.toString());\n }\n return this.geomLayers_0.get_za3lpa$(0).getConstant_31786j$(aes);\n };\n StitchedPlotLayer.prototype.getDataRange_8xm3sj$ = function (variable) {\n var tmp$;\n if (!this.isNumericData_0(variable)) {\n var message = 'Not numeric data [' + variable + ']';\n throw IllegalStateException_init(message.toString());\n }\n var result = null;\n tmp$ = this.geomLayers_0.iterator();\n while (tmp$.hasNext()) {\n var layer = tmp$.next();\n var range = layer.dataFrame.range_8xm3sj$(variable);\n result = data_0.SeriesUtil.span_w2blas$(result, range);\n }\n return result;\n };\n StitchedPlotLayer.prototype.isNumericData_0 = function (variable) {\n var tmp$;\n if (!!this.geomLayers_0.isEmpty()) {\n var message = 'Check failed.';\n throw IllegalStateException_init(message.toString());\n }\n tmp$ = this.geomLayers_0.iterator();\n while (tmp$.hasNext()) {\n var layer = tmp$.next();\n if (!layer.dataFrame.isNumeric_8xm3sj$(variable)) {\n return false;\n }\n }\n return true;\n };\n StitchedPlotLayer.prototype.getVariables_8be2vx$ = function () {\n if (!!this.geomLayers_0.isEmpty()) {\n var message = 'Check failed.';\n throw IllegalStateException_init(message.toString());\n }\n return this.geomLayers_0.get_za3lpa$(0).dataFrame.variables();\n };\n StitchedPlotLayer.prototype.hasVariable_tkpq40$ = function (v) {\n if (!!this.geomLayers_0.isEmpty()) {\n var message = 'Check failed.';\n throw IllegalStateException_init(message.toString());\n }\n return this.geomLayers_0.get_za3lpa$(0).dataFrame.has_8xm3sj$(v);\n };\n StitchedPlotLayer.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'StitchedPlotLayer',\n interfaces: []\n };\n function TestingPlotContext() {\n TestingPlotContext_instance = this;\n }\n TestingPlotContext.prototype.create_sqg2xh$ = function (layer) {\n return new PlotAssemblerPlotContext(listOf(listOf(layer)), layer.scaleMap);\n };\n TestingPlotContext.prototype.create_11vaeo$ = function (layers, scaleMap) {\n var layersByTile = listOf(layers);\n return new PlotAssemblerPlotContext(layersByTile, scaleMap);\n };\n TestingPlotContext.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'TestingPlotContext',\n interfaces: []\n };\n var TestingPlotContext_instance = null;\n function TestingPlotContext_getInstance() {\n if (TestingPlotContext_instance === null) {\n new TestingPlotContext();\n }\n return TestingPlotContext_instance;\n }\n function TypedScaleMap(map) {\n TypedScaleMap$Companion_getInstance();\n this.map = map;\n }\n function TypedScaleMap$get$lambda$lambda(closure$message) {\n return function () {\n return closure$message;\n };\n }\n TypedScaleMap.prototype.get_31786j$ = function (aes) {\n var tmp$, tmp$_0;\n var tmp$_1;\n if ((tmp$_0 = Kotlin.isType(tmp$ = this.map.get_11rb$(aes), Scale) ? tmp$ : null) != null)\n tmp$_1 = tmp$_0;\n else {\n var message = 'No scale found for aes: ' + aes;\n TypedScaleMap$Companion_getInstance().LOG_0.error_l35kib$(IllegalStateException_init(message), TypedScaleMap$get$lambda$lambda(message));\n throw IllegalStateException_init(message.toString());\n }\n return tmp$_1;\n };\n TypedScaleMap.prototype.containsKey_896ixz$ = function (aes) {\n return this.map.containsKey_11rb$(aes);\n };\n TypedScaleMap.prototype.keySet = function () {\n return this.map.keys;\n };\n function TypedScaleMap$Companion() {\n TypedScaleMap$Companion_instance = this;\n this.LOG_0 = logging.PortableLogging.logger_xo1ogr$(getKClass(TypedScaleMap));\n }\n TypedScaleMap$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var TypedScaleMap$Companion_instance = null;\n function TypedScaleMap$Companion_getInstance() {\n if (TypedScaleMap$Companion_instance === null) {\n new TypedScaleMap$Companion();\n }\n return TypedScaleMap$Companion_instance;\n }\n TypedScaleMap.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TypedScaleMap',\n interfaces: []\n };\n function FacetGrid(xVar, yVar, xLevels, yLevels, xOrder, yOrder, xFormatter, yFormatter, scales) {\n if (xFormatter === void 0)\n xFormatter = PlotFacets$Companion_getInstance().DEF_FORMATTER;\n if (yFormatter === void 0)\n yFormatter = PlotFacets$Companion_getInstance().DEF_FORMATTER;\n if (scales === void 0)\n scales = FacetScales$FIXED_getInstance();\n PlotFacets.call(this);\n this.xVar_0 = xVar;\n this.yVar_0 = yVar;\n this.xFormatter_0 = xFormatter;\n this.yFormatter_0 = yFormatter;\n this.isDefined_f95yff$_0 = this.xVar_0 != null || this.yVar_0 != null;\n var b = xLevels.size;\n this.colCount_bhcvpt$_0 = JsMath.max(1, b);\n var b_0 = yLevels.size;\n this.rowCount_8ohw8b$_0 = JsMath.max(1, b_0);\n this.numTiles_kasr4x$_0 = Kotlin.imul(this.colCount, this.rowCount);\n this.freeHScale_syofma$_0 = ((scales === FacetScales$FREE_getInstance() || scales === FacetScales$FREE_X_getInstance()) && this.xVar_0 != null);\n this.freeVScale_lcw8tc$_0 = ((scales === FacetScales$FREE_getInstance() || scales === FacetScales$FREE_Y_getInstance()) && this.yVar_0 != null);\n this.xLevels_0 = PlotFacets$Companion_getInstance().reorderVarLevels_pbdvt$(this.xVar_0, xLevels, xOrder);\n this.yLevels_0 = PlotFacets$Companion_getInstance().reorderVarLevels_pbdvt$(this.yVar_0, yLevels, yOrder);\n }\n Object.defineProperty(FacetGrid.prototype, 'isDefined', {\n configurable: true,\n get: function () {\n return this.isDefined_f95yff$_0;\n }\n });\n Object.defineProperty(FacetGrid.prototype, 'colCount', {\n configurable: true,\n get: function () {\n return this.colCount_bhcvpt$_0;\n }\n });\n Object.defineProperty(FacetGrid.prototype, 'rowCount', {\n configurable: true,\n get: function () {\n return this.rowCount_8ohw8b$_0;\n }\n });\n Object.defineProperty(FacetGrid.prototype, 'numTiles', {\n configurable: true,\n get: function () {\n return this.numTiles_kasr4x$_0;\n }\n });\n Object.defineProperty(FacetGrid.prototype, 'variables', {\n configurable: true,\n get: function () {\n return listOfNotNull([this.xVar_0, this.yVar_0]);\n }\n });\n Object.defineProperty(FacetGrid.prototype, 'freeHScale', {\n configurable: true,\n get: function () {\n return this.freeHScale_syofma$_0;\n }\n });\n Object.defineProperty(FacetGrid.prototype, 'freeVScale', {\n configurable: true,\n get: function () {\n return this.freeVScale_lcw8tc$_0;\n }\n });\n Object.defineProperty(FacetGrid.prototype, 'colLevels_0', {\n configurable: true,\n get: function () {\n var $receiver = this.xLevels_0;\n return $receiver.isEmpty() ? listOf(null) : $receiver;\n }\n });\n Object.defineProperty(FacetGrid.prototype, 'rowLevels_0', {\n configurable: true,\n get: function () {\n var $receiver = this.yLevels_0;\n return $receiver.isEmpty() ? listOf(null) : $receiver;\n }\n });\n FacetGrid.prototype.dataByTile_dhhkv7$ = function (data) {\n var tmp$;\n var tmp$_0, tmp$_1, tmp$_2;\n if (!this.isDefined) {\n var message = 'dataByTile() called on Undefined plot facets.';\n throw IllegalArgumentException_init(message.toString());\n }\n tmp$ = listOfNotNull([this.xVar_0, this.yVar_0]);\n tmp$_0 = listOfNotNull([this.xVar_0 != null ? this.xLevels_0 : null, this.yVar_0 != null ? this.yLevels_0 : null]);\n var dataByLevelTupleList = PlotFacets$Companion_getInstance().dataByLevelTuple_w4sfrb$(data, tmp$, tmp$_0);\n var dataByLevelTuple = toMap(dataByLevelTupleList);\n var dataByTile = ArrayList_init();\n tmp$_1 = this.rowLevels_0.iterator();\n while (tmp$_1.hasNext()) {\n var rowLevel = tmp$_1.next();\n tmp$_2 = this.colLevels_0.iterator();\n while (tmp$_2.hasNext()) {\n var colLevel = tmp$_2.next();\n var levelTuple = listOfNotNull([colLevel, rowLevel]);\n var tileData = getValue(dataByLevelTuple, levelTuple);\n dataByTile.add_11rb$(tileData);\n }\n }\n return dataByTile;\n };\n FacetGrid.prototype.tileInfos = function () {\n var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3;\n var $receiver = this.colLevels_0;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$_4;\n tmp$_4 = $receiver.iterator();\n while (tmp$_4.hasNext()) {\n var item = tmp$_4.next();\n destination.add_11rb$(item != null ? this.xFormatter_0(item) : null);\n }\n var colLabels = destination;\n var $receiver_0 = this.rowLevels_0;\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault($receiver_0, 10));\n var tmp$_5;\n tmp$_5 = $receiver_0.iterator();\n while (tmp$_5.hasNext()) {\n var item_0 = tmp$_5.next();\n destination_0.add_11rb$(item_0 != null ? this.yFormatter_0(item_0) : null);\n }\n var rowLabels = destination_0;\n var infos = ArrayList_init();\n tmp$ = this.rowCount;\n for (var row = 0; row < tmp$; row++) {\n var addColLab = row === 0;\n var hasHAxis = row === (this.rowCount - 1 | 0);\n tmp$_0 = this.colCount;\n for (var col = 0; col < tmp$_0; col++) {\n var addRowLab = col === (this.colCount - 1 | 0);\n var hasVAxis = col === 0;\n if (addColLab) {\n tmp$_3 = (tmp$_2 = (tmp$_1 = colLabels.get_za3lpa$(col)) != null ? listOf(tmp$_1) : null) != null ? tmp$_2 : emptyList();\n } else {\n tmp$_3 = emptyList();\n }\n var colLabs = tmp$_3;\n infos.add_11rb$(new PlotFacets$FacetTileInfo(col, row, colLabs, addRowLab ? rowLabels.get_za3lpa$(row) : null, hasHAxis, hasVAxis, row === (this.rowCount - 1 | 0), infos.size));\n }\n }\n return infos;\n };\n function FacetGrid$adjustHDomains$colIndices(this$FacetGrid) {\n return function (col) {\n var $receiver = get_indices(this$FacetGrid.rowLevels_0);\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n destination.add_11rb$(Kotlin.imul(item, this$FacetGrid.colLevels_0.size) + col | 0);\n }\n return toList(destination);\n };\n }\n FacetGrid.prototype.adjustHDomains_7qj307$ = function (domains) {\n var tmp$, tmp$_0;\n var colIndices = FacetGrid$adjustHDomains$colIndices(this);\n if (this.freeHScale) {\n var size = domains.size;\n var list = ArrayList_init_0(size);\n for (var index = 0; index < size; index++) {\n list.add_11rb$(null);\n }\n var adjusted = list;\n tmp$ = this.colLevels_0;\n for (var col = 0; col !== tmp$.size; ++col) {\n var indices = colIndices(col);\n var destination = ArrayList_init_0(collectionSizeOrDefault(indices, 10));\n var tmp$_1;\n tmp$_1 = indices.iterator();\n while (tmp$_1.hasNext()) {\n var item = tmp$_1.next();\n destination.add_11rb$(domains.get_za3lpa$(item));\n }\n var iterator = destination.iterator();\n if (!iterator.hasNext())\n throw UnsupportedOperationException_init(\"Empty collection can't be reduced.\");\n var accumulator = iterator.next();\n while (iterator.hasNext()) {\n var d0 = accumulator;\n var d1 = iterator.next();\n accumulator = data_0.SeriesUtil.span_w2blas$(d0, d1);\n }\n var union = accumulator;\n var tmp$_2;\n tmp$_2 = indices.iterator();\n while (tmp$_2.hasNext()) {\n var element = tmp$_2.next();\n adjusted.set_wxm5ur$(element, union);\n }\n }\n tmp$_0 = adjusted;\n } else {\n tmp$_0 = domains;\n }\n return tmp$_0;\n };\n function FacetGrid$adjustVDomains$rowIndices(this$FacetGrid) {\n return function (row) {\n var start = Kotlin.imul(row, this$FacetGrid.colLevels_0.size);\n return toList(until(start, start + this$FacetGrid.colLevels_0.size | 0));\n };\n }\n FacetGrid.prototype.adjustVDomains_7qj307$ = function (domains) {\n var tmp$, tmp$_0;\n var rowIndices = FacetGrid$adjustVDomains$rowIndices(this);\n if (this.freeVScale) {\n var size = domains.size;\n var list = ArrayList_init_0(size);\n for (var index = 0; index < size; index++) {\n list.add_11rb$(null);\n }\n var adjusted = list;\n tmp$ = this.rowLevels_0;\n for (var row = 0; row !== tmp$.size; ++row) {\n var indices = rowIndices(row);\n var destination = ArrayList_init_0(collectionSizeOrDefault(indices, 10));\n var tmp$_1;\n tmp$_1 = indices.iterator();\n while (tmp$_1.hasNext()) {\n var item = tmp$_1.next();\n destination.add_11rb$(domains.get_za3lpa$(item));\n }\n var iterator = destination.iterator();\n if (!iterator.hasNext())\n throw UnsupportedOperationException_init(\"Empty collection can't be reduced.\");\n var accumulator = iterator.next();\n while (iterator.hasNext()) {\n var d0 = accumulator;\n var d1 = iterator.next();\n accumulator = data_0.SeriesUtil.span_w2blas$(d0, d1);\n }\n var union = accumulator;\n var tmp$_2;\n tmp$_2 = indices.iterator();\n while (tmp$_2.hasNext()) {\n var element = tmp$_2.next();\n adjusted.set_wxm5ur$(element, union);\n }\n }\n tmp$_0 = adjusted;\n } else {\n tmp$_0 = domains;\n }\n return tmp$_0;\n };\n FacetGrid.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'FacetGrid',\n interfaces: [PlotFacets]\n };\n function FacetScales(name, ordinal) {\n Enum.call(this);\n this.name$ = name;\n this.ordinal$ = ordinal;\n }\n function FacetScales_initFields() {\n FacetScales_initFields = function () {\n };\n FacetScales$FIXED_instance = new FacetScales('FIXED', 0);\n FacetScales$FREE_instance = new FacetScales('FREE', 1);\n FacetScales$FREE_X_instance = new FacetScales('FREE_X', 2);\n FacetScales$FREE_Y_instance = new FacetScales('FREE_Y', 3);\n }\n var FacetScales$FIXED_instance;\n function FacetScales$FIXED_getInstance() {\n FacetScales_initFields();\n return FacetScales$FIXED_instance;\n }\n var FacetScales$FREE_instance;\n function FacetScales$FREE_getInstance() {\n FacetScales_initFields();\n return FacetScales$FREE_instance;\n }\n var FacetScales$FREE_X_instance;\n function FacetScales$FREE_X_getInstance() {\n FacetScales_initFields();\n return FacetScales$FREE_X_instance;\n }\n var FacetScales$FREE_Y_instance;\n function FacetScales$FREE_Y_getInstance() {\n FacetScales_initFields();\n return FacetScales$FREE_Y_instance;\n }\n FacetScales.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'FacetScales',\n interfaces: [Enum]\n };\n function FacetScales$values() {\n return [FacetScales$FIXED_getInstance(), FacetScales$FREE_getInstance(), FacetScales$FREE_X_getInstance(), FacetScales$FREE_Y_getInstance()];\n }\n FacetScales.values = FacetScales$values;\n function FacetScales$valueOf(name) {\n switch (name) {\n case 'FIXED':\n return FacetScales$FIXED_getInstance();\n case 'FREE':\n return FacetScales$FREE_getInstance();\n case 'FREE_X':\n return FacetScales$FREE_X_getInstance();\n case 'FREE_Y':\n return FacetScales$FREE_Y_getInstance();\n default:\n throwISE('No enum constant jetbrains.datalore.plot.builder.assemble.facet.FacetScales.' + name);\n }\n }\n FacetScales.valueOf_61zpoe$ = FacetScales$valueOf;\n var compareBy$lambda = wrapFunction(function () {\n var compareValues = Kotlin.kotlin.comparisons.compareValues_s00gnj$;\n return function (closure$selector) {\n return function (a, b) {\n var selector = closure$selector;\n return compareValues(selector(a), selector(b));\n };\n };\n });\n var thenBy$lambda = wrapFunction(function () {\n var compareValues = Kotlin.kotlin.comparisons.compareValues_s00gnj$;\n return function (this$thenBy, closure$selector) {\n return function (a, b) {\n var previousCompare = this$thenBy.compare(a, b);\n var tmp$;\n if (previousCompare !== 0)\n tmp$ = previousCompare;\n else {\n var selector = closure$selector;\n tmp$ = compareValues(selector(a), selector(b));\n }\n return tmp$;\n };\n };\n });\n function FacetWrap(facets, levels, nrow, ncol, direction, facetOrdering, facetFormatters, scales) {\n FacetWrap$Companion_getInstance();\n if (scales === void 0)\n scales = FacetScales$FIXED_getInstance();\n PlotFacets.call(this);\n this.facets_0 = facets;\n this.nrow_0 = nrow;\n this.ncol_0 = ncol;\n this.direction_0 = direction;\n this.facetFormatters_0 = facetFormatters;\n this.isDefined_lws8hd$_0 = true;\n this.levels_0 = PlotFacets$Companion_getInstance().reorderLevels_dyo1lv$(this.facets_0, levels, facetOrdering);\n this.numTiles_a1ir1h$_0 = FacetWrap$Companion_getInstance().numTiles_0(this.facets_0, levels);\n this.shape_0 = FacetWrap$Companion_getInstance().shape_0(this.numTiles, this.ncol_0, this.nrow_0, this.direction_0);\n this.colCount_182vmd$_0 = this.shape_0.first;\n this.rowCount_1ks3v5$_0 = this.shape_0.second;\n this.variables_i11eyv$_0 = this.facets_0;\n this.freeHScale_qfsjqi$_0 = scales === FacetScales$FREE_getInstance() || scales === FacetScales$FREE_X_getInstance();\n this.freeVScale_y1kqjg$_0 = scales === FacetScales$FREE_getInstance() || scales === FacetScales$FREE_Y_getInstance();\n }\n Object.defineProperty(FacetWrap.prototype, 'isDefined', {\n configurable: true,\n get: function () {\n return this.isDefined_lws8hd$_0;\n }\n });\n Object.defineProperty(FacetWrap.prototype, 'numTiles', {\n configurable: true,\n get: function () {\n return this.numTiles_a1ir1h$_0;\n }\n });\n Object.defineProperty(FacetWrap.prototype, 'colCount', {\n configurable: true,\n get: function () {\n return this.colCount_182vmd$_0;\n }\n });\n Object.defineProperty(FacetWrap.prototype, 'rowCount', {\n configurable: true,\n get: function () {\n return this.rowCount_1ks3v5$_0;\n }\n });\n Object.defineProperty(FacetWrap.prototype, 'variables', {\n configurable: true,\n get: function () {\n return this.variables_i11eyv$_0;\n }\n });\n Object.defineProperty(FacetWrap.prototype, 'freeHScale', {\n configurable: true,\n get: function () {\n return this.freeHScale_qfsjqi$_0;\n }\n });\n Object.defineProperty(FacetWrap.prototype, 'freeVScale', {\n configurable: true,\n get: function () {\n return this.freeVScale_y1kqjg$_0;\n }\n });\n FacetWrap.prototype.dataByTile_dhhkv7$ = function (data) {\n var tmp$;\n var dataByLevelTuple = PlotFacets$Companion_getInstance().dataByLevelTuple_w4sfrb$(data, this.variables, this.levels_0);\n var dataByTile = ArrayList_init();\n tmp$ = dataByLevelTuple.iterator();\n while (tmp$.hasNext()) {\n var tmp$_0 = tmp$.next();\n var tileData = tmp$_0.component2();\n dataByTile.add_11rb$(tileData);\n }\n return dataByTile;\n };\n function FacetWrap$tileInfos$toCol(this$FacetWrap) {\n return function (index) {\n var tmp$;\n switch (this$FacetWrap.direction_0.name) {\n case 'H':\n tmp$ = index % this$FacetWrap.colCount | 0;\n break;\n case 'V':\n tmp$ = index / this$FacetWrap.rowCount | 0;\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n }\n function FacetWrap$tileInfos$toRow(this$FacetWrap) {\n return function (index) {\n var tmp$;\n switch (this$FacetWrap.direction_0.name) {\n case 'H':\n tmp$ = index / this$FacetWrap.colCount | 0;\n break;\n case 'V':\n tmp$ = index % this$FacetWrap.rowCount | 0;\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n }\n function FacetWrap$tileInfos$toIndex(this$FacetWrap) {\n return function (col, row) {\n var tmp$;\n switch (this$FacetWrap.direction_0.name) {\n case 'H':\n tmp$ = Kotlin.imul(row, this$FacetWrap.colCount) + col | 0;\n break;\n case 'V':\n tmp$ = Kotlin.imul(col, this$FacetWrap.rowCount) + row | 0;\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n }\n function FacetWrap$tileInfos$isBottom(closure$toIndex, this$FacetWrap) {\n return function (col, row) {\n var nextRowIndex = closure$toIndex(col, row + 1 | 0);\n return ((row + 1 | 0) % this$FacetWrap.rowCount | 0) === 0 || nextRowIndex >= this$FacetWrap.numTiles;\n };\n }\n function FacetWrap$tileInfos$lambda(it) {\n return it.row;\n }\n function FacetWrap$tileInfos$lambda_0(it) {\n return it.col;\n }\n FacetWrap.prototype.tileInfos = function () {\n var levelTuples = PlotFacets$Companion_getInstance().createNameLevelTuples_5cxrh4$(this.facets_0, this.levels_0);\n var destination = ArrayList_init_0(collectionSizeOrDefault(levelTuples, 10));\n var tmp$;\n tmp$ = levelTuples.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n var tmp$_0 = destination.add_11rb$;\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(item, 10));\n var tmp$_1;\n tmp$_1 = item.iterator();\n while (tmp$_1.hasNext()) {\n var item_0 = tmp$_1.next();\n destination_0.add_11rb$(item_0.second);\n }\n tmp$_0.call(destination, destination_0);\n }\n var destination_1 = ArrayList_init_0(collectionSizeOrDefault(destination, 10));\n var tmp$_2;\n tmp$_2 = destination.iterator();\n while (tmp$_2.hasNext()) {\n var item_1 = tmp$_2.next();\n var tmp$_3 = destination_1.add_11rb$;\n var destination_2 = ArrayList_init_0(collectionSizeOrDefault(item_1, 10));\n var tmp$_4, tmp$_0_0;\n var index = 0;\n tmp$_4 = item_1.iterator();\n while (tmp$_4.hasNext()) {\n var item_2 = tmp$_4.next();\n destination_2.add_11rb$(this.facetFormatters_0.get_za3lpa$(checkIndexOverflow((tmp$_0_0 = index, index = tmp$_0_0 + 1 | 0, tmp$_0_0)))(item_2));\n }\n tmp$_3.call(destination_1, destination_2);\n }\n var tileLabels = destination_1;\n var toCol = FacetWrap$tileInfos$toCol(this);\n var toRow = FacetWrap$tileInfos$toRow(this);\n var toIndex = FacetWrap$tileInfos$toIndex(this);\n var isBottom = FacetWrap$tileInfos$isBottom(toIndex, this);\n var infos = ArrayList_init();\n var i = 0;\n for (var tmp$_5 = tileLabels.iterator(); tmp$_5.hasNext(); ++i) {\n var tileLabelTuple = tmp$_5.next();\n var col = toCol(i);\n var row = toRow(i);\n var hasHAxis = isBottom(col, row) || this.freeHScale;\n var hasVAxis = col === 0 || this.freeVScale;\n infos.add_11rb$(new PlotFacets$FacetTileInfo(col, row, tileLabelTuple, null, hasHAxis, hasVAxis, isBottom(col, row), i));\n }\n return sortedWith(infos, new Comparator(thenBy$lambda(new Comparator(compareBy$lambda(FacetWrap$tileInfos$lambda)), FacetWrap$tileInfos$lambda_0)));\n };\n function FacetWrap$Direction(name, ordinal) {\n Enum.call(this);\n this.name$ = name;\n this.ordinal$ = ordinal;\n }\n function FacetWrap$Direction_initFields() {\n FacetWrap$Direction_initFields = function () {\n };\n FacetWrap$Direction$H_instance = new FacetWrap$Direction('H', 0);\n FacetWrap$Direction$V_instance = new FacetWrap$Direction('V', 1);\n }\n var FacetWrap$Direction$H_instance;\n function FacetWrap$Direction$H_getInstance() {\n FacetWrap$Direction_initFields();\n return FacetWrap$Direction$H_instance;\n }\n var FacetWrap$Direction$V_instance;\n function FacetWrap$Direction$V_getInstance() {\n FacetWrap$Direction_initFields();\n return FacetWrap$Direction$V_instance;\n }\n FacetWrap$Direction.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'Direction',\n interfaces: [Enum]\n };\n function FacetWrap$Direction$values() {\n return [FacetWrap$Direction$H_getInstance(), FacetWrap$Direction$V_getInstance()];\n }\n FacetWrap$Direction.values = FacetWrap$Direction$values;\n function FacetWrap$Direction$valueOf(name) {\n switch (name) {\n case 'H':\n return FacetWrap$Direction$H_getInstance();\n case 'V':\n return FacetWrap$Direction$V_getInstance();\n default:\n throwISE('No enum constant jetbrains.datalore.plot.builder.assemble.facet.FacetWrap.Direction.' + name);\n }\n }\n FacetWrap$Direction.valueOf_61zpoe$ = FacetWrap$Direction$valueOf;\n function FacetWrap$Companion() {\n FacetWrap$Companion_instance = this;\n }\n FacetWrap$Companion.prototype.numTiles_0 = function (facets, levels) {\n if (!!facets.isEmpty()) {\n var message = 'List of facets is empty.';\n throw IllegalArgumentException_init(message.toString());\n }\n if (!(distinct(facets).size === facets.size)) {\n var message_0 = 'Duplicated values in the facets list: ' + facets;\n throw IllegalArgumentException_init(message_0.toString());\n }\n if (!(facets.size === levels.size)) {\n var message_1 = 'Check failed.';\n throw IllegalStateException_init(message_1.toString());\n }\n return PlotFacets$Companion_getInstance().createNameLevelTuples_5cxrh4$(facets, levels).size;\n };\n function FacetWrap$Companion$shape$lambda(closure$ncol) {\n return function () {\n return \"'ncol' must be positive, was \" + toString(closure$ncol);\n };\n }\n function FacetWrap$Companion$shape$lambda_0(closure$nrow) {\n return function () {\n return \"'nrow' must be positive, was \" + toString(closure$nrow);\n };\n }\n FacetWrap$Companion.prototype.shape_0 = function (tilesCount, ncol, nrow, dir) {\n var tmp$, tmp$_0, tmp$_1, tmp$_2;\n if (!((tmp$ = ncol != null ? ncol > 0 : null) != null ? tmp$ : true)) {\n var message = FacetWrap$Companion$shape$lambda(ncol)();\n throw IllegalArgumentException_init(message.toString());\n }\n if (!((tmp$_0 = nrow != null ? nrow > 0 : null) != null ? tmp$_0 : true)) {\n var message_0 = FacetWrap$Companion$shape$lambda_0(nrow)();\n throw IllegalArgumentException_init(message_0.toString());\n }\n if (ncol != null) {\n var ncolActual = JsMath.min(ncol, tilesCount);\n var x = tilesCount / ncolActual;\n var nrowActual = numberToInt(JsMath.ceil(x));\n tmp$_1 = to(ncolActual, JsMath.max(1, nrowActual));\n } else if (nrow != null) {\n var nrowActual_0 = JsMath.min(nrow, tilesCount);\n var x_0 = tilesCount / nrowActual_0;\n var ncolActual_0 = numberToInt(JsMath.ceil(x_0));\n tmp$_1 = to(ncolActual_0, JsMath.max(1, nrowActual_0));\n } else {\n var b = tilesCount / 2 | 0;\n var b_0 = JsMath.max(1, b);\n var w = JsMath.min(4, b_0);\n var x_1 = tilesCount / w;\n var b_1 = numberToInt(JsMath.ceil(x_1));\n var h = JsMath.max(1, b_1);\n tmp$_1 = to(w, h);\n }\n var shape = tmp$_1;\n var w_0 = shape.component1()\n , h_0 = shape.component2();\n switch (dir.name) {\n case 'H':\n var x_2 = tilesCount / w_0;\n tmp$_2 = new Pair(w_0, numberToInt(JsMath.ceil(x_2)));\n break;\n case 'V':\n var x_3 = tilesCount / h_0;\n tmp$_2 = new Pair(numberToInt(JsMath.ceil(x_3)), h_0);\n break;\n default:\n tmp$_2 = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$_2;\n };\n FacetWrap$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var FacetWrap$Companion_instance = null;\n function FacetWrap$Companion_getInstance() {\n if (FacetWrap$Companion_instance === null) {\n new FacetWrap$Companion();\n }\n return FacetWrap$Companion_instance;\n }\n FacetWrap.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'FacetWrap',\n interfaces: [PlotFacets]\n };\n function DefaultSampling() {\n DefaultSampling_instance = this;\n this.SEED_0 = L37;\n this.SAFETY_SAMPLING = Samplings_getInstance().random_280ow0$(200000, this.SEED_0);\n this.POINT = Samplings_getInstance().random_280ow0$(50000, this.SEED_0);\n this.TILE = Samplings_getInstance().random_280ow0$(50000, this.SEED_0);\n this.BIN_2D = this.TILE;\n this.AB_LINE = Samplings_getInstance().random_280ow0$(5000, this.SEED_0);\n this.H_LINE = Samplings_getInstance().random_280ow0$(5000, this.SEED_0);\n this.V_LINE = Samplings_getInstance().random_280ow0$(5000, this.SEED_0);\n this.JITTER = Samplings_getInstance().random_280ow0$(5000, this.SEED_0);\n this.Q_Q = Samplings_getInstance().random_280ow0$(5000, this.SEED_0);\n this.Q_Q_LINE = Samplings_getInstance().random_280ow0$(5000, this.SEED_0);\n this.RECT = Samplings_getInstance().random_280ow0$(5000, this.SEED_0);\n this.SEGMENT = Samplings_getInstance().random_280ow0$(5000, this.SEED_0);\n this.TEXT = Samplings_getInstance().random_280ow0$(500, this.SEED_0);\n this.ERROR_BAR = Samplings_getInstance().random_280ow0$(500, this.SEED_0);\n this.CROSS_BAR = Samplings_getInstance().random_280ow0$(500, this.SEED_0);\n this.LINE_RANGE = Samplings_getInstance().random_280ow0$(500, this.SEED_0);\n this.POINT_RANGE = Samplings_getInstance().random_280ow0$(500, this.SEED_0);\n this.BAR = Samplings_getInstance().pick_za3lpa$(50);\n this.HISTOGRAM = Samplings_getInstance().systematic_za3lpa$(500);\n this.DOT_PLOT = Samplings_getInstance().systematic_za3lpa$(500);\n this.Y_DOT_PLOT = Samplings_getInstance().systematic_za3lpa$(500);\n this.PIE = Samplings_getInstance().systematic_za3lpa$(500);\n this.LINE = Samplings_getInstance().systematic_za3lpa$(5000);\n this.RIBBON = Samplings_getInstance().systematic_za3lpa$(5000);\n this.AREA = Samplings_getInstance().systematic_za3lpa$(5000);\n this.DENSITY = Samplings_getInstance().systematic_za3lpa$(5000);\n this.AREA_RIDGES = Samplings_getInstance().systematic_za3lpa$(5000);\n this.VIOLIN = Samplings_getInstance().pick_za3lpa$(50);\n this.FREQPOLY = Samplings_getInstance().systematic_za3lpa$(5000);\n this.STEP = Samplings_getInstance().systematic_za3lpa$(5000);\n this.PATH = Samplings_getInstance().vertexDp_za3lpa$(20000);\n this.POLYGON = Samplings_getInstance().vertexDp_za3lpa$(20000);\n this.MAP = Samplings_getInstance().vertexDp_za3lpa$(20000);\n this.SMOOTH = Samplings_getInstance().systematicGroup_za3lpa$(200);\n this.CONTOUR = Samplings_getInstance().systematicGroup_za3lpa$(200);\n this.CONTOURF = Samplings_getInstance().systematicGroup_za3lpa$(200);\n this.DENSITY2D = Samplings_getInstance().systematicGroup_za3lpa$(200);\n this.DENSITY2DF = Samplings_getInstance().systematicGroup_za3lpa$(200);\n }\n DefaultSampling.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'DefaultSampling',\n interfaces: []\n };\n var DefaultSampling_instance = null;\n function DefaultSampling_getInstance() {\n if (DefaultSampling_instance === null) {\n new DefaultSampling();\n }\n return DefaultSampling_instance;\n }\n function GeomProvider(geomKind) {\n GeomProvider$Companion_getInstance();\n this.geomKind = geomKind;\n }\n Object.defineProperty(GeomProvider.prototype, 'preferredCoordinateSystem', {\n configurable: true,\n get: function () {\n throw IllegalStateException_init('No preferred coordinate system');\n }\n });\n GeomProvider.prototype.renders = function () {\n return base_0.GeomMeta.renders_7dhqpi$(this.geomKind);\n };\n function GeomProvider$GeomProviderBuilder(myKind, myAestheticsDefaults, myHandlesGroups, myGeomSupplier) {\n this.myKind_0 = myKind;\n this.myAestheticsDefaults_0 = myAestheticsDefaults;\n this.myHandlesGroups_0 = myHandlesGroups;\n this.myGeomSupplier_0 = myGeomSupplier;\n }\n function GeomProvider$GeomProviderBuilder$build$ObjectLiteral(this$GeomProviderBuilder, geomKind) {\n this.this$GeomProviderBuilder = this$GeomProviderBuilder;\n GeomProvider.call(this, geomKind);\n }\n GeomProvider$GeomProviderBuilder$build$ObjectLiteral.prototype.createGeom = function () {\n return this.this$GeomProviderBuilder.myGeomSupplier_0();\n };\n GeomProvider$GeomProviderBuilder$build$ObjectLiteral.prototype.aestheticsDefaults = function () {\n return this.this$GeomProviderBuilder.myAestheticsDefaults_0;\n };\n GeomProvider$GeomProviderBuilder$build$ObjectLiteral.prototype.handlesGroups = function () {\n return this.this$GeomProviderBuilder.myHandlesGroups_0;\n };\n GeomProvider$GeomProviderBuilder$build$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [GeomProvider]\n };\n GeomProvider$GeomProviderBuilder.prototype.build_8be2vx$ = function () {\n return new GeomProvider$GeomProviderBuilder$build$ObjectLiteral(this, this.myKind_0);\n };\n GeomProvider$GeomProviderBuilder.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GeomProviderBuilder',\n interfaces: []\n };\n function GeomProvider$Companion() {\n GeomProvider$Companion_instance = this;\n }\n function GeomProvider$Companion$point$lambda() {\n return new PointGeom();\n }\n GeomProvider$Companion.prototype.point = function () {\n return this.point_8j1y0m$(GeomProvider$Companion$point$lambda);\n };\n GeomProvider$Companion.prototype.point_8j1y0m$ = function (supplier) {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.POINT, AestheticsDefaults.Companion.point(), PointGeom.Companion.HANDLES_GROUPS, supplier)).build_8be2vx$();\n };\n function GeomProvider$Companion$path$lambda() {\n return new PathGeom();\n }\n GeomProvider$Companion.prototype.path = function () {\n return this.path_8j1y0m$(GeomProvider$Companion$path$lambda);\n };\n GeomProvider$Companion.prototype.path_8j1y0m$ = function (supplier) {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.PATH, AestheticsDefaults.Companion.path(), PathGeom.Companion.HANDLES_GROUPS, supplier)).build_8be2vx$();\n };\n function GeomProvider$Companion$line$lambda() {\n return new LineGeom();\n }\n GeomProvider$Companion.prototype.line = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.LINE, AestheticsDefaults.Companion.line(), LineGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$line$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$smooth$lambda() {\n return new SmoothGeom();\n }\n GeomProvider$Companion.prototype.smooth = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.SMOOTH, AestheticsDefaults.Companion.smooth(), SmoothGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$smooth$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$bar$lambda() {\n return new BarGeom();\n }\n GeomProvider$Companion.prototype.bar = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.BAR, AestheticsDefaults.Companion.bar(), BarGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$bar$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$histogram$lambda() {\n return new HistogramGeom();\n }\n GeomProvider$Companion.prototype.histogram = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.HISTOGRAM, AestheticsDefaults.Companion.histogram(), HistogramGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$histogram$lambda)).build_8be2vx$();\n };\n GeomProvider$Companion.prototype.dotplot_8j1y0m$ = function (supplier) {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.DOT_PLOT, AestheticsDefaults.Companion.dotplot(), DotplotGeom.Companion.HANDLES_GROUPS, supplier)).build_8be2vx$();\n };\n function GeomProvider$Companion$tile$lambda() {\n return new TileGeom();\n }\n GeomProvider$Companion.prototype.tile = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.TILE, AestheticsDefaults.Companion.tile(), TileGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$tile$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$bin2d$lambda() {\n return new Bin2dGeom();\n }\n GeomProvider$Companion.prototype.bin2d = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.BIN_2D, AestheticsDefaults.Companion.bin2d(), Bin2dGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$bin2d$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$errorBar$lambda() {\n return new ErrorBarGeom();\n }\n GeomProvider$Companion.prototype.errorBar = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.ERROR_BAR, AestheticsDefaults.Companion.errorBar(), ErrorBarGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$errorBar$lambda)).build_8be2vx$();\n };\n GeomProvider$Companion.prototype.crossBar_8j1y0m$ = function (supplier) {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.CROSS_BAR, AestheticsDefaults.Companion.crossBar(), CrossBarGeom.Companion.HANDLES_GROUPS, supplier)).build_8be2vx$();\n };\n function GeomProvider$Companion$lineRange$lambda() {\n return new LineRangeGeom();\n }\n GeomProvider$Companion.prototype.lineRange = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.LINE_RANGE, AestheticsDefaults.Companion.lineRange(), LineRangeGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$lineRange$lambda)).build_8be2vx$();\n };\n GeomProvider$Companion.prototype.pointRange_8j1y0m$ = function (supplier) {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.POINT_RANGE, AestheticsDefaults.Companion.pointRange(), PointRangeGeom.Companion.HANDLES_GROUPS, supplier)).build_8be2vx$();\n };\n function GeomProvider$Companion$contour$lambda() {\n return new ContourGeom();\n }\n GeomProvider$Companion.prototype.contour = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.CONTOUR, AestheticsDefaults.Companion.contour(), ContourGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$contour$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$contourf$lambda() {\n return new ContourfGeom();\n }\n GeomProvider$Companion.prototype.contourf = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.CONTOURF, AestheticsDefaults.Companion.contourf(), ContourfGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$contourf$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$polygon$lambda() {\n return new PolygonGeom();\n }\n GeomProvider$Companion.prototype.polygon = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.POLYGON, AestheticsDefaults.Companion.polygon(), PolygonGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$polygon$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$map$lambda() {\n return new MapGeom();\n }\n GeomProvider$Companion.prototype.map = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.MAP, AestheticsDefaults.Companion.map(), MapGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$map$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$abline$lambda() {\n return new ABLineGeom();\n }\n GeomProvider$Companion.prototype.abline = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.AB_LINE, AestheticsDefaults.Companion.abline(), ABLineGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$abline$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$hline$lambda() {\n return new HLineGeom();\n }\n GeomProvider$Companion.prototype.hline = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.H_LINE, AestheticsDefaults.Companion.hline(), HLineGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$hline$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$vline$lambda() {\n return new VLineGeom();\n }\n GeomProvider$Companion.prototype.vline = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.V_LINE, AestheticsDefaults.Companion.vline(), VLineGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$vline$lambda)).build_8be2vx$();\n };\n GeomProvider$Companion.prototype.boxplot_8j1y0m$ = function (supplier) {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.BOX_PLOT, AestheticsDefaults.Companion.boxplot(), BoxplotGeom.Companion.HANDLES_GROUPS, supplier)).build_8be2vx$();\n };\n GeomProvider$Companion.prototype.arearidges_8j1y0m$ = function (supplier) {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.AREA_RIDGES, AestheticsDefaults.Companion.areaRidges(), AreaRidgesGeom.Companion.HANDLES_GROUPS, supplier)).build_8be2vx$();\n };\n GeomProvider$Companion.prototype.violin_8j1y0m$ = function (supplier) {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.VIOLIN, AestheticsDefaults.Companion.violin(), ViolinGeom.Companion.HANDLES_GROUPS, supplier)).build_8be2vx$();\n };\n GeomProvider$Companion.prototype.ydotplot_8j1y0m$ = function (supplier) {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.Y_DOT_PLOT, AestheticsDefaults.Companion.ydotplot(), YDotplotGeom.Companion.HANDLES_GROUPS, supplier)).build_8be2vx$();\n };\n function GeomProvider$Companion$livemap$lambda() {\n return new LiveMapGeom();\n }\n GeomProvider$Companion.prototype.livemap = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.LIVE_MAP, AestheticsDefaults.Companion.livemap(), LiveMapGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$livemap$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$ribbon$lambda() {\n return new RibbonGeom();\n }\n GeomProvider$Companion.prototype.ribbon = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.RIBBON, AestheticsDefaults.Companion.ribbon(), RibbonGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$ribbon$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$area$lambda() {\n return new AreaGeom();\n }\n GeomProvider$Companion.prototype.area = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.AREA, AestheticsDefaults.Companion.area(), AreaGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$area$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$density$lambda() {\n return new DensityGeom();\n }\n GeomProvider$Companion.prototype.density = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.DENSITY, AestheticsDefaults.Companion.density(), DensityGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$density$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$density2d$lambda() {\n return new Density2dGeom();\n }\n GeomProvider$Companion.prototype.density2d = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.DENSITY2D, AestheticsDefaults.Companion.density2d(), Density2dGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$density2d$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$density2df$lambda() {\n return new Density2dfGeom();\n }\n GeomProvider$Companion.prototype.density2df = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.DENSITY2DF, AestheticsDefaults.Companion.density2df(), Density2dfGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$density2df$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$jitter$lambda() {\n return new JitterGeom();\n }\n GeomProvider$Companion.prototype.jitter = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.JITTER, AestheticsDefaults.Companion.jitter(), JitterGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$jitter$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$qq$lambda() {\n return new QQGeom();\n }\n GeomProvider$Companion.prototype.qq = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.Q_Q, AestheticsDefaults.Companion.qq(), QQGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$qq$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$qq2$lambda() {\n return new QQ2Geom();\n }\n GeomProvider$Companion.prototype.qq2 = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.Q_Q_2, AestheticsDefaults.Companion.qq2(), QQ2Geom.Companion.HANDLES_GROUPS, GeomProvider$Companion$qq2$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$qqline$lambda() {\n return new QQLineGeom();\n }\n GeomProvider$Companion.prototype.qqline = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.Q_Q_LINE, AestheticsDefaults.Companion.qq_line(), QQLineGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$qqline$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$qq2line$lambda() {\n return new QQ2LineGeom();\n }\n GeomProvider$Companion.prototype.qq2line = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.Q_Q_2_LINE, AestheticsDefaults.Companion.qq2_line(), QQ2LineGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$qq2line$lambda)).build_8be2vx$();\n };\n function GeomProvider$Companion$freqpoly$lambda() {\n return new FreqpolyGeom();\n }\n GeomProvider$Companion.prototype.freqpoly = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.FREQPOLY, AestheticsDefaults.Companion.freqpoly(), FreqpolyGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$freqpoly$lambda)).build_8be2vx$();\n };\n GeomProvider$Companion.prototype.step_8j1y0m$ = function (supplier) {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.STEP, AestheticsDefaults.Companion.step(), StepGeom.Companion.HANDLES_GROUPS, supplier)).build_8be2vx$();\n };\n function GeomProvider$Companion$rect$lambda() {\n return new RectGeom();\n }\n GeomProvider$Companion.prototype.rect = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.RECT, AestheticsDefaults.Companion.rect(), RectGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$rect$lambda)).build_8be2vx$();\n };\n GeomProvider$Companion.prototype.segment_8j1y0m$ = function (supplier) {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.SEGMENT, AestheticsDefaults.Companion.segment(), SegmentGeom.Companion.HANDLES_GROUPS, supplier)).build_8be2vx$();\n };\n GeomProvider$Companion.prototype.text_8j1y0m$ = function (supplier) {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.TEXT, AestheticsDefaults.Companion.text(), TextGeom.Companion.HANDLES_GROUPS, supplier)).build_8be2vx$();\n };\n GeomProvider$Companion.prototype.label_8j1y0m$ = function (supplier) {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.LABEL, AestheticsDefaults.Companion.label(), TextGeom.Companion.HANDLES_GROUPS, supplier)).build_8be2vx$();\n };\n function GeomProvider$Companion$raster$lambda() {\n return new RasterGeom();\n }\n GeomProvider$Companion.prototype.raster = function () {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.RASTER, AestheticsDefaults.Companion.raster(), RasterGeom.Companion.HANDLES_GROUPS, GeomProvider$Companion$raster$lambda)).build_8be2vx$();\n };\n GeomProvider$Companion.prototype.image_8j1y0m$ = function (supplier) {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.IMAGE, AestheticsDefaults.Companion.image(), ImageGeom.Companion.HANDLES_GROUPS, supplier)).build_8be2vx$();\n };\n GeomProvider$Companion.prototype.pie_8j1y0m$ = function (supplier) {\n return (new GeomProvider$GeomProviderBuilder(GeomKind.PIE, AestheticsDefaults.Companion.pie(), PieGeom.Companion.HANDLES_GROUPS, supplier)).build_8be2vx$();\n };\n GeomProvider$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var GeomProvider$Companion_instance = null;\n function GeomProvider$Companion_getInstance() {\n if (GeomProvider$Companion_instance === null) {\n new GeomProvider$Companion();\n }\n return GeomProvider$Companion_instance;\n }\n GeomProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GeomProvider',\n interfaces: []\n };\n function PointDataAccess(data, bindings, scaleMap, isYOrientation) {\n this.data_0 = data;\n this.bindings_0 = bindings;\n this.scaleMap_0 = scaleMap;\n this.isYOrientation_daywl3$_0 = isYOrientation;\n this.myFormatters_0 = HashMap_init();\n }\n Object.defineProperty(PointDataAccess.prototype, 'isYOrientation', {\n get: function () {\n return this.isYOrientation_daywl3$_0;\n }\n });\n PointDataAccess.prototype.isMapped_896ixz$ = function (aes) {\n return this.bindings_0.containsKey_11rb$(aes);\n };\n PointDataAccess.prototype.getOriginalValue_m6grlz$ = function (aes, index) {\n if (!this.isMapped_896ixz$(aes)) {\n var message = 'Not mapped: ' + aes;\n throw IllegalArgumentException_init(message.toString());\n }\n var binding = getValue(this.bindings_0, aes);\n var scale = this.scaleMap_0.get_31786j$(aes);\n var value = this.data_0.getNumeric_8xm3sj$(binding.variable).get_za3lpa$(index);\n return scale.transform.applyInverse_yrwdxb$(value);\n };\n PointDataAccess.prototype.getMappedDataLabel_896ixz$ = function (aes) {\n return this.scaleMap_0.get_31786j$(aes).name;\n };\n PointDataAccess.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PointDataAccess',\n interfaces: [MappedDataAccess]\n };\n function CartesianCoordProvider(xLim, yLim, flipped) {\n if (flipped === void 0)\n flipped = false;\n CoordProviderBase.call(this, xLim, yLim, flipped);\n }\n CartesianCoordProvider.prototype.with_11nazf$ = function (xLim, yLim, flipped) {\n return new CartesianCoordProvider(xLim, yLim, flipped);\n };\n CartesianCoordProvider.prototype.adjustGeomSize_3y20zv$ = function (hDomain, vDomain, geomSize) {\n return geomSize;\n };\n CartesianCoordProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'CartesianCoordProvider',\n interfaces: [CoordProviderBase]\n };\n function CoordProvider() {\n }\n CoordProvider.prototype.createCoordinateSystem_26v79i$ = function (adjustedDomain, clientSize) {\n var coordMapper = this.createCoordinateMapper_26v79i$(adjustedDomain, clientSize);\n return coord.Coords.create_i06iub$(coordMapper);\n };\n CoordProvider.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'CoordProvider',\n interfaces: []\n };\n function CoordProviderBase(xLim, yLim, flipped, projection) {\n if (projection === void 0)\n projection = identity();\n this.xLim_0 = xLim;\n this.yLim_0 = yLim;\n this.flipped_u4pwwe$_0 = flipped;\n this.projection_0 = projection;\n if (!(this.xLim_0 == null || this.xLim_0.length > 0.0)) {\n var message = 'Coord x-limits range should be > 0.0';\n throw IllegalArgumentException_init(message.toString());\n }\n if (!(this.yLim_0 == null || this.yLim_0.length > 0.0)) {\n var message_0 = 'Coord y-limits range should be > 0.0';\n throw IllegalArgumentException_init(message_0.toString());\n }\n }\n Object.defineProperty(CoordProviderBase.prototype, 'flipped', {\n get: function () {\n return this.flipped_u4pwwe$_0;\n }\n });\n CoordProviderBase.prototype.adjustDomain_wthzt5$ = function (domain) {\n var tmp$;\n var tmp$_0, tmp$_1;\n var withLims = DoubleRectangle_init_0((tmp$_0 = this.xLim_0) != null ? tmp$_0 : domain.xRange(), (tmp$_1 = this.yLim_0) != null ? tmp$_1 : domain.yRange());\n var validDomain = this.projection_0.validDomain().intersect_wthzt5$(withLims);\n if (validDomain != null && validDomain.height > 0.0 && validDomain.width > 0.0) {\n tmp$ = this.flipped ? validDomain.flip() : validDomain;\n } else {\n throw IllegalArgumentException_init(trimMargin(\"Can't create a valid domain.\" + '\\n' + ' | data bbox: ' + domain + '\\n' + ' | x-lim: ' + toString(this.xLim_0) + '\\n' + ' | y-lim: ' + toString(this.yLim_0) + '\\n' + ' '));\n }\n return tmp$;\n };\n CoordProviderBase.prototype.createCoordinateMapper_26v79i$ = function (adjustedDomain, clientSize) {\n return CoordinatesMapper.Companion.create_u2nuxj$(adjustedDomain, clientSize, this.projection_0, this.flipped);\n };\n CoordProviderBase.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'CoordProviderBase',\n interfaces: [CoordProvider]\n };\n function CoordProviders() {\n CoordProviders_instance = this;\n }\n CoordProviders.prototype.cartesian_11nazf$ = function (xLim, yLim, flipped) {\n if (xLim === void 0)\n xLim = null;\n if (yLim === void 0)\n yLim = null;\n if (flipped === void 0)\n flipped = false;\n return new CartesianCoordProvider(xLim, yLim, flipped);\n };\n CoordProviders.prototype.fixed_kt8gy1$ = function (ratio, xLim, yLim, flipped) {\n if (xLim === void 0)\n xLim = null;\n if (yLim === void 0)\n yLim = null;\n if (flipped === void 0)\n flipped = false;\n return new FixedRatioCoordProvider(ratio, xLim, yLim, flipped);\n };\n CoordProviders.prototype.map_bjve6d$ = function (xLim, yLim, flipped, projection) {\n if (xLim === void 0)\n xLim = null;\n if (yLim === void 0)\n yLim = null;\n if (flipped === void 0)\n flipped = false;\n if (projection === void 0)\n projection = mercator();\n return new ProjectionCoordProvider(projection, xLim, yLim, flipped);\n };\n CoordProviders.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'CoordProviders',\n interfaces: []\n };\n var CoordProviders_instance = null;\n function CoordProviders_getInstance() {\n if (CoordProviders_instance === null) {\n new CoordProviders();\n }\n return CoordProviders_instance;\n }\n function FixedRatioCoordProvider(ratio, xLim, yLim, flipped) {\n FixedRatioCoordProvider$Companion_getInstance();\n CoordProviderBase.call(this, xLim, yLim, flipped);\n this.ratio_0 = ratio;\n }\n FixedRatioCoordProvider.prototype.with_11nazf$ = function (xLim, yLim, flipped) {\n return new FixedRatioCoordProvider(this.ratio_0, xLim, yLim, flipped);\n };\n FixedRatioCoordProvider.prototype.adjustGeomSize_3y20zv$ = function (hDomain, vDomain, geomSize) {\n var domainRatio = hDomain.length / vDomain.length;\n var effectiveDomainRatio = domainRatio / this.ratio_0;\n return FixedRatioCoordProvider$Companion_getInstance().reshapeGeom_e1sv3v$(geomSize, effectiveDomainRatio);\n };\n function FixedRatioCoordProvider$Companion() {\n FixedRatioCoordProvider$Companion_instance = this;\n }\n FixedRatioCoordProvider$Companion.prototype.reshapeGeom_e1sv3v$ = function (geomSize, targetWidthToHeightRatio) {\n var tmp$;\n var geomRatio = geomSize.x / geomSize.y;\n if (targetWidthToHeightRatio > geomRatio) {\n var h = geomSize.x / targetWidthToHeightRatio;\n tmp$ = new DoubleVector(geomSize.x, h);\n } else {\n var w = geomSize.y * targetWidthToHeightRatio;\n tmp$ = new DoubleVector(w, geomSize.y);\n }\n var newSize = tmp$;\n return newSize;\n };\n FixedRatioCoordProvider$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var FixedRatioCoordProvider$Companion_instance = null;\n function FixedRatioCoordProvider$Companion_getInstance() {\n if (FixedRatioCoordProvider$Companion_instance === null) {\n new FixedRatioCoordProvider$Companion();\n }\n return FixedRatioCoordProvider$Companion_instance;\n }\n FixedRatioCoordProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'FixedRatioCoordProvider',\n interfaces: [CoordProviderBase]\n };\n function MarginalLayerCoordProvider() {\n CoordProviderBase.call(this, null, null, false);\n }\n MarginalLayerCoordProvider.prototype.with_11nazf$ = function (xLim, yLim, flipped) {\n UNSUPPORTED('MarginalLayerCoordProvider.with()');\n };\n MarginalLayerCoordProvider.prototype.adjustGeomSize_3y20zv$ = function (hDomain, vDomain, geomSize) {\n return geomSize;\n };\n MarginalLayerCoordProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'MarginalLayerCoordProvider',\n interfaces: [CoordProviderBase]\n };\n function ProjectionCoordProvider(projection, xLim, yLim, flipped) {\n CoordProviderBase.call(this, xLim, yLim, flipped, projection);\n }\n ProjectionCoordProvider.prototype.with_11nazf$ = function (xLim, yLim, flipped) {\n return new ProjectionCoordProvider(this.projection_0, xLim, yLim, flipped);\n };\n ProjectionCoordProvider.prototype.adjustGeomSize_3y20zv$ = function (hDomain, vDomain, geomSize) {\n var tmp$;\n var tmp$_0 = geometry.DoubleRectangles;\n var tmp$_1;\n var $receiver = listOf_0([new DoubleVector(hDomain.lowerEnd, vDomain.lowerEnd), new DoubleVector(hDomain.lowerEnd, vDomain.upperEnd), new DoubleVector(hDomain.upperEnd, vDomain.lowerEnd), new DoubleVector(hDomain.upperEnd, vDomain.upperEnd)]);\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$_2;\n tmp$_2 = $receiver.iterator();\n while (tmp$_2.hasNext()) {\n var item = tmp$_2.next();\n destination.add_11rb$(this.flipped ? item.flip() : item);\n }\n var transform = getCallableRef('project', function ($receiver, p1) {\n return $receiver.project_gpjtzr$(p1);\n }.bind(null, this.projection_0));\n var destination_0 = ArrayList_init();\n var tmp$_3;\n tmp$_3 = destination.iterator();\n while (tmp$_3.hasNext()) {\n var element = tmp$_3.next();\n var tmp$_0_0;\n if ((tmp$_0_0 = transform(element)) != null) {\n destination_0.add_11rb$(tmp$_0_0);\n }\n }\n var destination_1 = ArrayList_init_0(collectionSizeOrDefault(destination_0, 10));\n var tmp$_4;\n tmp$_4 = destination_0.iterator();\n while (tmp$_4.hasNext()) {\n var item_0 = tmp$_4.next();\n destination_1.add_11rb$(this.flipped ? item_0.flip() : item_0);\n }\n if ((tmp$ = tmp$_0.boundingBox_qdtdbw$(destination_1)) != null)\n tmp$_1 = tmp$;\n else {\n throw IllegalStateException_init(\"adjustGeomSize() - can't compute bbox\".toString());\n }\n var bbox = tmp$_1;\n var domainRatio = bbox.width / bbox.height;\n return FixedRatioCoordProvider$Companion_getInstance().reshapeGeom_e1sv3v$(geomSize, domainRatio);\n };\n ProjectionCoordProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ProjectionCoordProvider',\n interfaces: [CoordProviderBase]\n };\n function DataProcessing() {\n DataProcessing_instance = this;\n }\n DataProcessing.prototype.transformOriginals_9nntby$ = function (data_0, bindings, transformByAes) {\n var tmp$;\n var data_1 = data_0;\n tmp$ = bindings.iterator();\n while (tmp$.hasNext()) {\n var binding = tmp$.next();\n var variable = binding.variable;\n if (variable.isOrigin) {\n data_1.assertDefined_8xm3sj$(variable);\n data_1 = data.DataFrameUtil.applyTransform_f2tird$(data_1, variable, binding.aes, getValue(transformByAes, binding.aes));\n }\n }\n return data_1;\n };\n DataProcessing.prototype.buildStatData_ardmvj$ = function (statInput, stat_0, groupingContext, facetVariables, varsWithoutBinding, orderOptions, aggregateOperation, messageConsumer) {\n var tmp$, tmp$_0;\n if (!!equals(stat_0, stat.Stats.IDENTITY)) {\n var message = 'Check failed.';\n throw IllegalStateException_init(message.toString());\n }\n var groups = groupingContext.groupMapper;\n var resultSeries;\n var groupSizeListAfterStat;\n if (groups === GroupUtil_getInstance().SINGLE_GROUP_8be2vx$) {\n var statData = this.applyStat_0(statInput.data, stat_0, statInput.bindings, statInput.transformByAes, facetVariables, statInput.statCtx, varsWithoutBinding, messageConsumer);\n groupSizeListAfterStat = listOf(statData.rowCount());\n var $receiver = statData.variables();\n var result = LinkedHashMap_init_0(coerceAtLeast(mapCapacity(collectionSizeOrDefault($receiver, 10)), 16));\n var tmp$_1;\n tmp$_1 = $receiver.iterator();\n while (tmp$_1.hasNext()) {\n var element = tmp$_1.next();\n result.put_xwzc9p$(element, statData.get_8xm3sj$(element));\n }\n resultSeries = result;\n } else {\n var groupMerger = new GroupMerger();\n var lastStatGroupEnd = -1;\n tmp$ = this.splitByGroup_0(statInput.data, groups).iterator();\n while (tmp$.hasNext()) {\n var d = tmp$.next();\n var statData_0 = this.applyStat_0(d, stat_0, statInput.bindings, statInput.transformByAes, facetVariables, statInput.statCtx, varsWithoutBinding, messageConsumer);\n if (statData_0.isEmpty) {\n continue;\n }\n groupMerger.initOrderSpecs_37be8y$(orderOptions, statData_0.variables(), statInput.bindings, aggregateOperation);\n var curGroupSizeAfterStat = statData_0.rowCount();\n if (statData_0.has_8xm3sj$(stat.Stats.GROUP)) {\n var range = statData_0.range_8xm3sj$(stat.Stats.GROUP);\n if (range != null) {\n var start = lastStatGroupEnd + 1 | 0;\n var offset = start - numberToInt(range.lowerEnd) | 0;\n lastStatGroupEnd = numberToInt(range.upperEnd) + offset | 0;\n if (offset !== 0) {\n var newG = ArrayList_init();\n tmp$_0 = statData_0.getNumeric_8xm3sj$(stat.Stats.GROUP).iterator();\n while (tmp$_0.hasNext()) {\n var g = tmp$_0.next();\n newG.add_11rb$(ensureNotNull(g) + offset);\n }\n statData_0 = statData_0.builder().putNumeric_s1rqo9$(stat.Stats.GROUP, newG).build();\n }\n }\n } else {\n var groupingVar = groupingContext.optionalGroupingVar_8be2vx$;\n if (groupingVar != null) {\n var size = statData_0.get_8xm3sj$(first_0(statData_0.variables())).size;\n var v = d.get_8xm3sj$(groupingVar).get_za3lpa$(0);\n var tmp$_2 = statData_0.builder();\n var list = ArrayList_init_0(size);\n for (var index = 0; index < size; index++) {\n list.add_11rb$(v);\n }\n statData_0 = tmp$_2.put_2l962d$(groupingVar, list).build();\n }\n }\n groupMerger.addGroup_s4jycv$(statData_0, curGroupSizeAfterStat);\n }\n resultSeries = groupMerger.getResultSeries();\n groupSizeListAfterStat = groupMerger.getGroupSizes();\n }\n var closure$resultSeries = resultSeries;\n var $receiver_0 = DataFrame$DataFrame$Builder_init();\n var tmp$_3;\n tmp$_3 = closure$resultSeries.keys.iterator();\n while (tmp$_3.hasNext()) {\n var variable = tmp$_3.next();\n $receiver_0.put_2l962d$(variable, ensureNotNull(closure$resultSeries.get_11rb$(variable)));\n }\n var destination = ArrayList_init_0(collectionSizeOrDefault(orderOptions, 10));\n var tmp$_4;\n tmp$_4 = orderOptions.iterator();\n while (tmp$_4.hasNext()) {\n var item = tmp$_4.next();\n destination.add_11rb$(OrderOptionUtil_getInstance().createOrderSpec_e64h97$(closure$resultSeries.keys, statInput.bindings, item, aggregateOperation));\n }\n var orderSpecs = destination;\n $receiver_0.addOrderSpecs_l2t0xf$(orderSpecs);\n var dataAfterStat = $receiver_0.build();\n var normalizedData = stat_0.normalize_dhhkv7$(dataAfterStat);\n var groupingContextAfterStat = GroupingContext$Companion_getInstance().withOrderedGroups_vi90cb$(normalizedData, groupSizeListAfterStat);\n return new DataProcessing$DataAndGroupingContext(normalizedData, groupingContextAfterStat);\n };\n DataProcessing.prototype.findOptionalVariable_hrxl0z$ = function (data_0, name) {\n return name == null || name.length === 0 ? null : data.DataFrameUtil.findVariableOrFail_vede35$(data_0, name);\n };\n DataProcessing.prototype.splitByGroup_0 = function (data, groups) {\n var $receiver = GroupUtil_getInstance().indicesByGroup_wc9gac$(data.rowCount(), groups).values;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n var tmp$_0 = destination.add_11rb$;\n var $receiver_0 = data.variables();\n var tmp$_1;\n var accumulator = DataFrame$DataFrame$Builder_init();\n tmp$_1 = $receiver_0.iterator();\n while (tmp$_1.hasNext()) {\n var element = tmp$_1.next();\n var b = accumulator;\n var operation$result;\n var tmp$_2;\n tmp$_2 = data.isNumeric_8xm3sj$(element);\n if (tmp$_2 === true) {\n operation$result = b.putNumeric_s1rqo9$(element, data_0.SeriesUtil.pickAtIndices_ge51dg$(data.getNumeric_8xm3sj$(element), item));\n } else if (tmp$_2 === false) {\n operation$result = b.putDiscrete_2l962d$(element, data_0.SeriesUtil.pickAtIndices_ge51dg$(data.get_8xm3sj$(element), item));\n } else {\n operation$result = Kotlin.noWhenBranchMatched();\n }\n accumulator = operation$result;\n }\n tmp$_0.call(destination, accumulator);\n }\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(destination, 10));\n var tmp$_3;\n tmp$_3 = destination.iterator();\n while (tmp$_3.hasNext()) {\n var item_0 = tmp$_3.next();\n destination_0.add_11rb$(item_0.build());\n }\n return destination_0;\n };\n function DataProcessing$applyStat$newSerieForVariable(closure$data, closure$statDataSize) {\n return function (variable) {\n var tmp$, tmp$_0;\n tmp$ = closure$data.isNumeric_8xm3sj$(variable);\n if (tmp$ === true)\n tmp$_0 = data_0.SeriesUtil.mean_l4tjj7$(closure$data.getNumeric_8xm3sj$(variable), null);\n else if (tmp$ === false)\n tmp$_0 = data_0.SeriesUtil.firstNotNull_rath1t$(closure$data.get_8xm3sj$(variable), null);\n else\n tmp$_0 = Kotlin.noWhenBranchMatched();\n var value = tmp$_0;\n var size = closure$statDataSize;\n var list = ArrayList_init_0(size);\n for (var index = 0; index < size; index++) {\n list.add_11rb$(value);\n }\n return list;\n };\n }\n DataProcessing.prototype.applyStat_0 = function (data_0, stat_0, bindings, transformByAes, facetVariables, statCtx, varsWithoutBinding, compMessageConsumer) {\n var tmp$, tmp$_0;\n var statData = stat_0.apply_kdy6bf$(data_0, statCtx, compMessageConsumer);\n var statVariables = statData.variables();\n if (statVariables.isEmpty()) {\n return statData;\n }\n statData = this.inverseTransformStatData_0(statData, stat_0, bindings, transformByAes);\n var statDataSize = statData.rowCount();\n var result = LinkedHashMap_init_0(coerceAtLeast(mapCapacity(collectionSizeOrDefault(facetVariables, 10)), 16));\n var tmp$_1;\n tmp$_1 = facetVariables.iterator();\n while (tmp$_1.hasNext()) {\n var element = tmp$_1.next();\n result.put_xwzc9p$(element, data_0.get_8xm3sj$(element).get_za3lpa$(0));\n }\n var facetLevelByFacetVar = result;\n var destination = LinkedHashMap_init_0(mapCapacity(facetLevelByFacetVar.size));\n var tmp$_2;\n tmp$_2 = facetLevelByFacetVar.entries.iterator();\n while (tmp$_2.hasNext()) {\n var element_0 = tmp$_2.next();\n var tmp$_3 = destination.put_xwzc9p$;\n var tmp$_4 = element_0.key;\n var facetLevel = element_0.value;\n var list = ArrayList_init_0(statDataSize);\n for (var index = 0; index < statDataSize; index++) {\n list.add_11rb$(facetLevel);\n }\n tmp$_3.call(destination, tmp$_4, list);\n }\n var inputSeriesForFacetVars = destination;\n var newSerieForVariable = DataProcessing$applyStat$newSerieForVariable(data_0, statDataSize);\n var newInputSeries = HashMap_init();\n tmp$ = bindings.iterator();\n while (tmp$.hasNext()) {\n var binding = tmp$.next();\n var variable = binding.variable;\n if (variable.isStat || facetVariables.contains_11rb$(variable)) {\n continue;\n }\n var aes = binding.aes;\n if (stat_0.hasDefaultMapping_896ixz$(aes)) {\n var defaultStatVar = stat_0.getDefaultMapping_896ixz$(aes);\n var value = statData.get_8xm3sj$(defaultStatVar);\n newInputSeries.put_xwzc9p$(variable, value);\n } else {\n if (!newInputSeries.containsKey_11rb$(variable)) {\n var value_0 = newSerieForVariable(variable);\n newInputSeries.put_xwzc9p$(variable, value_0);\n }\n }\n }\n var predicate = getCallableRef('isStatVar', function ($receiver, p1) {\n return $receiver.isStatVar_61zpoe$(p1);\n }.bind(null, stat.Stats));\n var destination_0 = ArrayList_init();\n var tmp$_5;\n tmp$_5 = varsWithoutBinding.iterator();\n while (tmp$_5.hasNext()) {\n var element_1 = tmp$_5.next();\n if (!predicate(element_1))\n destination_0.add_11rb$(element_1);\n }\n tmp$_0 = destination_0.iterator();\n while (tmp$_0.hasNext()) {\n var varName = tmp$_0.next();\n var variable_0 = data.DataFrameUtil.findVariableOrFail_vede35$(data_0, varName);\n if (!newInputSeries.containsKey_11rb$(variable_0)) {\n var value_1 = newSerieForVariable(variable_0);\n newInputSeries.put_xwzc9p$(variable_0, value_1);\n }\n }\n var b = statData.builder();\n var tmp$_6;\n tmp$_6 = plus_0(newInputSeries, inputSeriesForFacetVars).entries.iterator();\n while (tmp$_6.hasNext()) {\n var element_2 = tmp$_6.next();\n var variable_1 = element_2.key;\n var serie = element_2.value;\n b.put_2l962d$(variable_1, serie);\n }\n return b.build();\n };\n function DataProcessing$inverseTransformStatData$transformForAes(closure$transformByAes) {\n return function (aes) {\n var tmp$;\n if (Aes.Companion.isPositionalX_896ixz$(aes))\n tmp$ = getValue(closure$transformByAes, Aes.Companion.X);\n else if (Aes.Companion.isPositionalY_896ixz$(aes))\n tmp$ = getValue(closure$transformByAes, Aes.Companion.Y);\n else\n throw IllegalStateException_init('Positional aes expected but was ' + aes + '.');\n return tmp$;\n };\n }\n function DataProcessing$inverseTransformStatData$needInverseTransform(closure$needTransformX, closure$needTransformY) {\n return function (aes) {\n if (Aes.Companion.isPositionalX_896ixz$(aes))\n return closure$needTransformX;\n if (Aes.Companion.isPositionalY_896ixz$(aes))\n return closure$needTransformY;\n return false;\n };\n }\n DataProcessing.prototype.inverseTransformStatData_0 = function (statData, stat, bindings, transformByAes) {\n if (!transformByAes.containsKey_11rb$(Aes.Companion.X)) {\n var message = 'Check failed.';\n throw IllegalStateException_init(message.toString());\n }\n if (!transformByAes.containsKey_11rb$(Aes.Companion.Y)) {\n var message_0 = 'Check failed.';\n throw IllegalStateException_init(message_0.toString());\n }\n var transformForAes = DataProcessing$inverseTransformStatData$transformForAes(transformByAes);\n var $receiver = stat.consumes();\n var any$result;\n any$break: do {\n var tmp$;\n if (Kotlin.isType($receiver, Collection) && $receiver.isEmpty()) {\n any$result = false;\n break any$break;\n }\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n if (Aes.Companion.isPositionalX_896ixz$(element)) {\n any$result = true;\n break any$break;\n }\n }\n any$result = false;\n }\n while (false);\n var needTransformX = any$result;\n var $receiver_0 = stat.consumes();\n var any$result_0;\n any$break: do {\n var tmp$_0;\n if (Kotlin.isType($receiver_0, Collection) && $receiver_0.isEmpty()) {\n any$result_0 = false;\n break any$break;\n }\n tmp$_0 = $receiver_0.iterator();\n while (tmp$_0.hasNext()) {\n var element_0 = tmp$_0.next();\n if (Aes.Companion.isPositionalY_896ixz$(element_0)) {\n any$result_0 = true;\n break any$break;\n }\n }\n any$result_0 = false;\n }\n while (false);\n var needTransformY = any$result_0;\n var needInverseTransform = DataProcessing$inverseTransformStatData$needInverseTransform(needTransformX, needTransformY);\n var $receiver_1 = Aes.Companion.values();\n var destination = ArrayList_init();\n var tmp$_1;\n tmp$_1 = $receiver_1.iterator();\n while (tmp$_1.hasNext()) {\n var element_1 = tmp$_1.next();\n if (stat.hasDefaultMapping_896ixz$(element_1))\n destination.add_11rb$(element_1);\n }\n var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(destination, 10)), 16);\n var destination_0 = LinkedHashMap_init_0(capacity);\n var tmp$_2;\n tmp$_2 = destination.iterator();\n while (tmp$_2.hasNext()) {\n var element_2 = tmp$_2.next();\n destination_0.put_xwzc9p$(stat.getDefaultMapping_896ixz$(element_2), element_2);\n }\n var aesByStatVarDefault = destination_0;\n var destination_1 = ArrayList_init();\n var tmp$_3;\n tmp$_3 = bindings.iterator();\n while (tmp$_3.hasNext()) {\n var element_3 = tmp$_3.next();\n if (!element_3.variable.isStat)\n destination_1.add_11rb$(element_3);\n }\n var capacity_0 = coerceAtLeast(mapCapacity(collectionSizeOrDefault(destination_1, 10)), 16);\n var destination_2 = LinkedHashMap_init_0(capacity_0);\n var tmp$_4;\n tmp$_4 = destination_1.iterator();\n while (tmp$_4.hasNext()) {\n var element_4 = tmp$_4.next();\n var pair = to(element_4.variable, element_4.aes);\n destination_2.put_xwzc9p$(pair.first, pair.second);\n }\n var aesByStatVarMapped = destination_2;\n var aesByStatVar = plus_0(aesByStatVarDefault, aesByStatVarMapped);\n var $receiver_2 = statData.variables();\n var destination_3 = ArrayList_init();\n var tmp$_5;\n tmp$_5 = $receiver_2.iterator();\n while (tmp$_5.hasNext()) {\n var element_5 = tmp$_5.next();\n if (aesByStatVar.containsKey_11rb$(element_5))\n destination_3.add_11rb$(element_5);\n }\n var destination_4 = ArrayList_init();\n var tmp$_6;\n tmp$_6 = destination_3.iterator();\n while (tmp$_6.hasNext()) {\n var element_6 = tmp$_6.next();\n var aes = getValue(aesByStatVar, element_6);\n if (needInverseTransform(aes))\n destination_4.add_11rb$(element_6);\n }\n var result = LinkedHashMap_init_0(coerceAtLeast(mapCapacity(collectionSizeOrDefault(destination_4, 10)), 16));\n var tmp$_7;\n tmp$_7 = destination_4.iterator();\n while (tmp$_7.hasNext()) {\n var element_7 = tmp$_7.next();\n var tmp$_8 = result.put_xwzc9p$;\n var aes_0 = getValue(aesByStatVar, element_7);\n var transform = transformForAes(aes_0);\n var statSerie = statData.getNumeric_8xm3sj$(element_7);\n tmp$_8.call(result, element_7, transform.applyInverse_k9kaly$(statSerie));\n }\n var inverseTransformedSeries = result;\n var builder = statData.builder();\n var tmp$_9;\n tmp$_9 = inverseTransformedSeries.entries.iterator();\n while (tmp$_9.hasNext()) {\n var element_8 = tmp$_9.next();\n var variable = element_8.key;\n var serie = element_8.value;\n builder.put_2l962d$(variable, serie);\n }\n return builder.build();\n };\n DataProcessing.prototype.computeGroups_ps74eq$ = function (data, groupingVariables) {\n var tmp$, tmp$_0;\n var currentGroups = {v: null};\n tmp$ = groupingVariables.iterator();\n while (tmp$.hasNext()) {\n var groupingVariable = tmp$.next();\n var values = data.get_8xm3sj$(groupingVariable);\n var groups = this.computeGroups_0(values);\n if (currentGroups.v == null) {\n currentGroups.v = groups;\n continue;\n }\n if (!(currentGroups.v.size === groups.size)) {\n var tmp$_1;\n var message = 'Data series used to compute groups must be equal in size (encountered sizes: ' + (toString((tmp$_1 = currentGroups.v) != null ? tmp$_1.size : null) + ', ' + groups.size + ' )');\n throw IllegalStateException_init(message.toString());\n }\n var dummies = this.computeDummyValues_0(currentGroups.v, groups);\n currentGroups.v = this.computeGroups_0(dummies);\n }\n if (currentGroups.v != null) {\n tmp$_0 = GroupUtil_getInstance().wrap_2wzaym$(currentGroups.v);\n } else {\n tmp$_0 = GroupUtil_getInstance().SINGLE_GROUP_8be2vx$;\n }\n return tmp$_0;\n };\n DataProcessing.prototype.computeGroups_0 = function (values) {\n var tmp$, tmp$_0;\n var groups = ArrayList_init();\n var groupByVal = HashMap_init();\n var count = 0;\n tmp$ = values.iterator();\n while (tmp$.hasNext()) {\n var v = tmp$.next();\n if (!groupByVal.containsKey_11rb$(v)) {\n var value = (tmp$_0 = count, count = tmp$_0 + 1 | 0, tmp$_0);\n groupByVal.put_xwzc9p$(v, value);\n }\n groups.add_11rb$(ensureNotNull(groupByVal.get_11rb$(v)));\n }\n return groups;\n };\n DataProcessing.prototype.computeDummyValues_0 = function (list1, list2) {\n if (list1.isEmpty())\n return emptyList();\n var limit = 1000;\n var max = ensureNotNull(maxOrNull(plus(list1, list2)));\n if (!(max < limit)) {\n var message = 'Too many groups: ' + max;\n throw IllegalStateException_init(message.toString());\n }\n var dummies = ArrayList_init();\n var it1 = list1.iterator();\n var it2 = list2.iterator();\n while (it1.hasNext()) {\n var v1 = it1.next();\n var v2 = it2.next();\n var dummy = Kotlin.imul(v1, limit) + v2 | 0;\n dummies.add_11rb$(dummy);\n }\n return dummies;\n };\n DataProcessing.prototype.defaultGroupingVariables_39xr23$ = function (data, bindings, pathIdVarName) {\n var pathIdVar = this.findOptionalVariable_hrxl0z$(data, pathIdVarName);\n return plus_1(this.defaultGroupingVariables_0(data, bindings), listOfNotNull_0(pathIdVar));\n };\n DataProcessing.prototype.defaultGroupingVariables_0 = function (data, bindings) {\n var destination = ArrayList_init();\n var tmp$;\n tmp$ = bindings.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n if (this.isDefaultGroupingVariable_0(data, element.aes, element.variable))\n destination.add_11rb$(element);\n }\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(destination, 10));\n var tmp$_0;\n tmp$_0 = destination.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n destination_0.add_11rb$(item.variable);\n }\n return distinct(destination_0);\n };\n DataProcessing.prototype.isDefaultGroupingVariable_0 = function (data, aes, variable) {\n return variable.isOrigin && !(Aes.Companion.isPositional_896ixz$(aes) || data.isNumeric_8xm3sj$(variable));\n };\n function DataProcessing$DataAndGroupingContext(data, groupingContext) {\n this.data = data;\n this.groupingContext = groupingContext;\n }\n DataProcessing$DataAndGroupingContext.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'DataAndGroupingContext',\n interfaces: []\n };\n DataProcessing.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'DataProcessing',\n interfaces: []\n };\n var DataProcessing_instance = null;\n function DataProcessing_getInstance() {\n if (DataProcessing_instance === null) {\n new DataProcessing();\n }\n return DataProcessing_instance;\n }\n function GroupMerger() {\n this.myOrderSpecs_0 = null;\n this.myOrderedGroups_0 = ArrayList_init();\n }\n GroupMerger.prototype.initOrderSpecs_37be8y$ = function (orderOptions, variables, bindings, aggregateOperation) {\n if (this.myOrderSpecs_0 != null)\n return;\n var destination = ArrayList_init();\n var tmp$;\n tmp$ = orderOptions.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n var firstOrNull$result;\n firstOrNull$break: do {\n var tmp$_0;\n tmp$_0 = bindings.iterator();\n while (tmp$_0.hasNext()) {\n var element_0 = tmp$_0.next();\n if (equals(element_0.variable.name, element.variableName) && equals(element_0.aes, Aes.Companion.X)) {\n firstOrNull$result = element_0;\n break firstOrNull$break;\n }\n }\n firstOrNull$result = null;\n }\n while (false);\n if (firstOrNull$result == null)\n destination.add_11rb$(element);\n }\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(destination, 10));\n var tmp$_1;\n tmp$_1 = destination.iterator();\n while (tmp$_1.hasNext()) {\n var item = tmp$_1.next();\n destination_0.add_11rb$(OrderOptionUtil_getInstance().createOrderSpec_e64h97$(variables, bindings, item, aggregateOperation));\n }\n this.myOrderSpecs_0 = destination_0;\n };\n GroupMerger.prototype.getResultSeries = function () {\n var resultSeries = HashMap_init();\n var tmp$;\n tmp$ = this.myOrderedGroups_0.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n var tmp$_0;\n tmp$_0 = element.df.variables().iterator();\n while (tmp$_0.hasNext()) {\n var element_0 = tmp$_0.next();\n var tmp$_1;\n var value = resultSeries.get_11rb$(element_0);\n if (value == null) {\n var answer = ArrayList_init();\n resultSeries.put_xwzc9p$(element_0, answer);\n tmp$_1 = answer;\n } else {\n tmp$_1 = value;\n }\n tmp$_1.addAll_brywnq$(element.df.get_8xm3sj$(element_0));\n }\n }\n return resultSeries;\n };\n GroupMerger.prototype.getGroupSizes = function () {\n var $receiver = this.myOrderedGroups_0;\n var transform = getPropertyCallableRef('groupSize', 1, function ($receiver) {\n return $receiver.groupSize;\n });\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n destination.add_11rb$(transform(item));\n }\n return destination;\n };\n function GroupMerger$Group($outer, df, groupSize) {\n this.$outer = $outer;\n this.df = df;\n this.groupSize = groupSize;\n }\n function GroupMerger$Group$compareTo$compareGroupValue(v1, v2, dir) {\n var tmp$, tmp$_0;\n if (v1 == null && v2 == null)\n return 0;\n if (v1 == null)\n return 1;\n if (v2 == null)\n return -1;\n return Kotlin.imul(compareValues(Kotlin.isComparable(tmp$ = v1) ? tmp$ : throwCCE(), Kotlin.isComparable(tmp$_0 = v2) ? tmp$_0 : throwCCE()), dir);\n }\n function GroupMerger$Group$compareTo$getValue(df, variable, aggregateOperation) {\n if (aggregateOperation === void 0)\n aggregateOperation = null;\n var tmp$;\n if (aggregateOperation != null) {\n if (!df.isNumeric_8xm3sj$(variable)) {\n var message = \"Can't apply aggregate operation to non-numeric values\";\n throw IllegalArgumentException_init(message.toString());\n }\n tmp$ = aggregateOperation(requireNoNulls(df.getNumeric_8xm3sj$(variable)));\n } else {\n tmp$ = firstOrNull(df.get_8xm3sj$(variable));\n }\n return tmp$;\n }\n GroupMerger$Group.prototype.compareTo_11rb$ = function (other) {\n var tmp$;\n var compareGroupValue = GroupMerger$Group$compareTo$compareGroupValue;\n var getValue = GroupMerger$Group$compareTo$getValue;\n if ((tmp$ = this.$outer.myOrderSpecs_0) != null) {\n var tmp$_0;\n tmp$_0 = tmp$.iterator();\n while (tmp$_0.hasNext()) {\n var element = tmp$_0.next();\n var cmp = compareGroupValue(getValue(this.df, element.orderBy, element.aggregateOperation), getValue(other.df, element.orderBy, element.aggregateOperation), element.direction);\n if (cmp === 0) {\n cmp = compareGroupValue(getValue(this.df, element.variable), getValue(other.df, element.variable), element.direction);\n }\n if (cmp !== 0) {\n return cmp;\n }\n }\n }\n return 0;\n };\n GroupMerger$Group.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'Group',\n interfaces: [Comparable]\n };\n GroupMerger.prototype.addGroup_s4jycv$ = function (d, groupSize) {\n var group = new GroupMerger$Group(this, d, groupSize);\n var indexToInsert = this.findIndexToInsert_0(group);\n this.myOrderedGroups_0.add_wxm5ur$(indexToInsert, group);\n };\n GroupMerger.prototype.findIndexToInsert_0 = function (group) {\n var $receiver = this.myOrderSpecs_0;\n if ($receiver == null || $receiver.isEmpty()) {\n return this.myOrderedGroups_0.size;\n }\n var index = binarySearch(this.myOrderedGroups_0, group);\n if (index < 0)\n index = ~index;\n return index;\n };\n GroupMerger.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GroupMerger',\n interfaces: []\n };\n function GroupUtil() {\n GroupUtil_instance = this;\n this.SINGLE_GROUP_8be2vx$ = GroupUtil$SINGLE_GROUP$lambda;\n }\n function GroupUtil$wrap$lambda(closure$l) {\n return function (index) {\n return index > 0 && index < closure$l.size ? numberToInt(ensureNotNull(closure$l.get_za3lpa$(index))) : 0;\n };\n }\n GroupUtil.prototype.wrap_2wzaym$ = function (l) {\n return GroupUtil$wrap$lambda(l);\n };\n function GroupUtil$wrap$lambda_0(closure$groupByPointIndex) {\n return function (it) {\n return ensureNotNull(closure$groupByPointIndex.get_11rb$(it));\n };\n }\n GroupUtil.prototype.wrap_orwq1h$ = function (groupByPointIndex) {\n return GroupUtil$wrap$lambda_0(groupByPointIndex);\n };\n GroupUtil.prototype.indicesByGroup_wc9gac$ = function (dataLength, groups) {\n var indicesByGroup = LinkedHashMap_init();\n for (var i = 0; i < dataLength; i++) {\n var group = groups(i);\n if (!indicesByGroup.containsKey_11rb$(group)) {\n var value = ArrayList_init();\n indicesByGroup.put_xwzc9p$(group, value);\n }\n ensureNotNull(indicesByGroup.get_11rb$(group)).add_11rb$(i);\n }\n return indicesByGroup;\n };\n function GroupUtil$SINGLE_GROUP$lambda(f) {\n return 0;\n }\n GroupUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'GroupUtil',\n interfaces: []\n };\n var GroupUtil_instance = null;\n function GroupUtil_getInstance() {\n if (GroupUtil_instance === null) {\n new GroupUtil();\n }\n return GroupUtil_instance;\n }\n function GroupingContext(data, defaultGroupingVariables, explicitGroupingVarName, expectMultiple, groupSizeList) {\n GroupingContext$Companion_getInstance();\n if (groupSizeList === void 0)\n groupSizeList = null;\n this.data_0 = data;\n this.expectMultiple_0 = expectMultiple;\n this.groupSizeList_0 = groupSizeList;\n this.optionalGroupingVar_8be2vx$ = DataProcessing_getInstance().findOptionalVariable_hrxl0z$(this.data_0, explicitGroupingVarName);\n var tmp$;\n if (this.optionalGroupingVar_8be2vx$ == null)\n tmp$ = defaultGroupingVariables;\n else {\n tmp$ = toList(plus_2(linkedSetOf([this.optionalGroupingVar_8be2vx$]), defaultGroupingVariables));\n }\n this.groupingVariables_0 = tmp$;\n this._groupMapper_0 = null;\n }\n Object.defineProperty(GroupingContext.prototype, 'groupMapper', {\n configurable: true,\n get: function () {\n if (this._groupMapper_0 == null) {\n this._groupMapper_0 = this.computeGroups_0();\n }\n return ensureNotNull(this._groupMapper_0);\n }\n });\n GroupingContext.prototype.computeGroups_0 = function () {\n if (this.data_0.rowCount() === 0)\n return GroupUtil_getInstance().SINGLE_GROUP_8be2vx$;\n if (this.data_0.has_8xm3sj$(stat.Stats.GROUP)) {\n var list = this.data_0.getNumeric_8xm3sj$(stat.Stats.GROUP);\n return GroupUtil_getInstance().wrap_2wzaym$(list);\n } else if (this.groupSizeList_0 != null) {\n if (this.groupSizeList_0.size === this.data_0.rowCount()) {\n return GroupUtil_getInstance().SINGLE_GROUP_8be2vx$;\n } else {\n var groupByPointIndex = GroupingContext$Companion_getInstance().toIndexMap_0(this.groupSizeList_0);\n return GroupUtil_getInstance().wrap_orwq1h$(groupByPointIndex);\n }\n } else if (this.expectMultiple_0) {\n return DataProcessing_getInstance().computeGroups_ps74eq$(this.data_0, this.groupingVariables_0);\n }\n return GroupUtil_getInstance().SINGLE_GROUP_8be2vx$;\n };\n function GroupingContext$Companion() {\n GroupingContext$Companion_instance = this;\n }\n GroupingContext$Companion.prototype.withOrderedGroups_vi90cb$ = function (data, groupSizeList) {\n var groupingVariables = DataProcessing_getInstance().defaultGroupingVariables_39xr23$(data, emptyList(), null);\n return new GroupingContext(data, groupingVariables, null, false, ArrayList_init_1(groupSizeList));\n };\n GroupingContext$Companion.prototype.toIndexMap_0 = function (groupSizeList) {\n var tmp$;\n var result = HashMap_init();\n var currentGroup = 0;\n var currentGroupIndexOffset = 0;\n tmp$ = groupSizeList.iterator();\n while (tmp$.hasNext()) {\n var groupSize = tmp$.next();\n for (var i = 0; i < groupSize; i++) {\n var key = currentGroupIndexOffset + i | 0;\n var value = currentGroup;\n result.put_xwzc9p$(key, value);\n }\n currentGroup = currentGroup + 1 | 0;\n currentGroupIndexOffset = currentGroupIndexOffset + groupSize | 0;\n }\n return result;\n };\n GroupingContext$Companion.prototype.getGroupingVariables_0 = function (data, bindings, explicitGroupingVar) {\n var tmp$;\n var result = LinkedHashSet_init();\n tmp$ = bindings.iterator();\n while (tmp$.hasNext()) {\n var binding = tmp$.next();\n var variable = binding.variable;\n if (!result.contains_11rb$(variable)) {\n if (variable.isOrigin) {\n if (equals(variable, explicitGroupingVar) || this.isDefaultGroupingVariable_0(data, binding.aes, variable)) {\n result.add_11rb$(variable);\n }\n }\n }\n }\n return result;\n };\n GroupingContext$Companion.prototype.isDefaultGroupingVariable_0 = function (data, aes, variable) {\n return !(Aes.Companion.isPositional_896ixz$(aes) || data.isNumeric_8xm3sj$(variable));\n };\n GroupingContext$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var GroupingContext$Companion_instance = null;\n function GroupingContext$Companion_getInstance() {\n if (GroupingContext$Companion_instance === null) {\n new GroupingContext$Companion();\n }\n return GroupingContext$Companion_instance;\n }\n GroupingContext.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GroupingContext',\n interfaces: []\n };\n function OrderOptionUtil() {\n OrderOptionUtil_instance = this;\n }\n function OrderOptionUtil$OrderOption(variableName, byVariable, orderDir) {\n OrderOptionUtil$OrderOption$Companion_getInstance();\n this.variableName = variableName;\n this.byVariable = byVariable;\n this.orderDir_0 = orderDir;\n }\n OrderOptionUtil$OrderOption.prototype.getOrderDir = function () {\n var tmp$;\n return (tmp$ = this.orderDir_0) != null ? tmp$ : -1;\n };\n OrderOptionUtil$OrderOption.prototype.equals = function (other) {\n var tmp$, tmp$_0;\n if (this === other)\n return true;\n if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null))\n return false;\n Kotlin.isType(tmp$_0 = other, OrderOptionUtil$OrderOption) ? tmp$_0 : throwCCE();\n if (!equals(this.variableName, other.variableName))\n return false;\n if (!equals(this.byVariable, other.byVariable))\n return false;\n if (this.orderDir_0 != other.orderDir_0)\n return false;\n return true;\n };\n OrderOptionUtil$OrderOption.prototype.hashCode = function () {\n var tmp$, tmp$_0, tmp$_1;\n var result = hashCode(this.variableName);\n result = (31 * result | 0) + ((tmp$_0 = (tmp$ = this.byVariable) != null ? hashCode(tmp$) : null) != null ? tmp$_0 : 0) | 0;\n result = (31 * result | 0) + ((tmp$_1 = this.orderDir_0) != null ? tmp$_1 : 0) | 0;\n return result;\n };\n OrderOptionUtil$OrderOption.prototype.toString = function () {\n return \"OrderOption(variableName='\" + this.variableName + \"', byVariable=\" + toString(this.byVariable) + ', orderDir=' + toString(this.orderDir_0) + ')';\n };\n function OrderOptionUtil$OrderOption$Companion() {\n OrderOptionUtil$OrderOption$Companion_instance = this;\n }\n OrderOptionUtil$OrderOption$Companion.prototype.create_yyjhqb$ = function (variableName, orderBy, order) {\n var tmp$, tmp$_0;\n if (orderBy == null && order == null) {\n return null;\n }\n if (!(order == null || (Kotlin.isNumber(order) && listOf_0([-1, 1]).contains_11rb$(numberToInt(order))))) {\n var message = 'Unsupported `order` value: ' + toString(order) + '. Use 1 (ascending) or -1 (descending).';\n throw IllegalArgumentException_init(message.toString());\n }\n return new OrderOptionUtil$OrderOption(variableName, orderBy, (tmp$_0 = Kotlin.isNumber(tmp$ = order) ? tmp$ : null) != null ? numberToInt(tmp$_0) : null);\n };\n OrderOptionUtil$OrderOption$Companion.prototype.mergeWith_me9ya9$ = function ($receiver, other) {\n var tmp$, tmp$_0;\n if (!equals($receiver.variableName, other.variableName)) {\n var message = \"Can't merge order options for different variables: '\" + $receiver.variableName + \"' and '\" + other.variableName + \"'\";\n throw IllegalArgumentException_init(message.toString());\n }\n if (!($receiver.byVariable == null || other.byVariable == null || equals(other.byVariable, $receiver.byVariable))) {\n var message_0 = \"Multiple ordering options for the variable '\" + $receiver.variableName + \"' with different non-empty 'order_by' fields: '\" + toString($receiver.byVariable) + \"' and '\" + toString(other.byVariable) + \"'\";\n throw IllegalArgumentException_init(message_0.toString());\n }\n if (!($receiver.orderDir_0 == null || other.orderDir_0 == null || other.orderDir_0 == $receiver.orderDir_0)) {\n var message_1 = \"Multiple ordering options for the variable '\" + $receiver.variableName + \"' with different order direction: '\" + toString($receiver.orderDir_0) + \"' and '\" + toString(other.orderDir_0) + \"'\";\n throw IllegalArgumentException_init(message_1.toString());\n }\n return new OrderOptionUtil$OrderOption($receiver.variableName, (tmp$ = $receiver.byVariable) != null ? tmp$ : other.byVariable, (tmp$_0 = $receiver.orderDir_0) != null ? tmp$_0 : other.orderDir_0);\n };\n OrderOptionUtil$OrderOption$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var OrderOptionUtil$OrderOption$Companion_instance = null;\n function OrderOptionUtil$OrderOption$Companion_getInstance() {\n if (OrderOptionUtil$OrderOption$Companion_instance === null) {\n new OrderOptionUtil$OrderOption$Companion();\n }\n return OrderOptionUtil$OrderOption$Companion_instance;\n }\n OrderOptionUtil$OrderOption.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'OrderOption',\n interfaces: []\n };\n function OrderOptionUtil$createOrderSpec$getVariableByName(closure$variables) {\n return function (varName) {\n var tmp$;\n var tmp$_0;\n var $receiver = closure$variables;\n var firstOrNull$result;\n firstOrNull$break: do {\n var tmp$_1;\n tmp$_1 = $receiver.iterator();\n while (tmp$_1.hasNext()) {\n var element = tmp$_1.next();\n if (equals(element.name, varName)) {\n firstOrNull$result = element;\n break firstOrNull$break;\n }\n }\n firstOrNull$result = null;\n }\n while (false);\n if ((tmp$ = firstOrNull$result) != null)\n tmp$_0 = tmp$;\n else {\n var tmp$_2 = \"Undefined variable '\" + varName + \"' in order options. Full variable list: \";\n var $receiver_0 = closure$variables;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver_0, 10));\n var tmp$_3;\n tmp$_3 = $receiver_0.iterator();\n while (tmp$_3.hasNext()) {\n var item = tmp$_3.next();\n destination.add_11rb$(\"'\" + item.name + \"'\");\n }\n throw IllegalStateException_init((tmp$_2 + destination).toString());\n }\n return tmp$_0;\n };\n }\n OrderOptionUtil.prototype.createOrderSpec_e64h97$ = function (variables, varBindings, orderOption, aggregateOperation) {\n var tmp$, tmp$_0, tmp$_1;\n var getVariableByName = OrderOptionUtil$createOrderSpec$getVariableByName(variables);\n var firstOrNull$result;\n firstOrNull$break: do {\n var tmp$_2;\n tmp$_2 = varBindings.iterator();\n while (tmp$_2.hasNext()) {\n var element = tmp$_2.next();\n if (equals(element.variable.name, orderOption.variableName) && equals(element.aes, Aes.Companion.X)) {\n firstOrNull$result = element;\n break firstOrNull$break;\n }\n }\n firstOrNull$result = null;\n }\n while (false);\n if (firstOrNull$result != null && SamplingUtil_getInstance().xVar_bbyvt0$(variables) != null) {\n tmp$ = ensureNotNull(SamplingUtil_getInstance().xVar_bbyvt0$(variables));\n } else {\n tmp$ = getVariableByName(orderOption.variableName);\n }\n var variable = tmp$;\n return new DataFrame$OrderSpec(variable, (tmp$_1 = (tmp$_0 = orderOption.byVariable) != null ? getVariableByName(tmp$_0) : null) != null ? tmp$_1 : getVariableByName(orderOption.variableName), orderOption.getOrderDir(), orderOption.byVariable != null && !equals(orderOption.byVariable, orderOption.variableName) ? aggregateOperation : null);\n };\n OrderOptionUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'OrderOptionUtil',\n interfaces: []\n };\n var OrderOptionUtil_instance = null;\n function OrderOptionUtil_getInstance() {\n if (OrderOptionUtil_instance === null) {\n new OrderOptionUtil();\n }\n return OrderOptionUtil_instance;\n }\n function StatInput(data, bindings, transformByAes, statCtx, flipXY) {\n this.data = flipXY ? YOrientationUtil_getInstance().flipDataFrame_dhhkv7$(data) : data;\n this.bindings = flipXY ? YOrientationUtil_getInstance().flipVarBinding_gg2air$(bindings) : bindings;\n this.transformByAes = flipXY ? util.YOrientationBaseUtil.flipAesKeys_fzsz32$(transformByAes) : transformByAes;\n this.statCtx = flipXY ? statCtx.getFlipped() : statCtx;\n }\n StatInput.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'StatInput',\n interfaces: []\n };\n function YOrientationUtil() {\n YOrientationUtil_instance = this;\n }\n YOrientationUtil.prototype.flipDataFrame_dhhkv7$ = function (data_0) {\n var tmp$, tmp$_0;\n var $receiver = data_0.variables();\n var destination = ArrayList_init();\n var tmp$_1;\n tmp$_1 = $receiver.iterator();\n while (tmp$_1.hasNext()) {\n var element = tmp$_1.next();\n if (element.isTransform)\n destination.add_11rb$(element);\n }\n var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(destination, 10)), 16);\n var destination_0 = LinkedHashMap_init_0(capacity);\n var tmp$_2;\n tmp$_2 = destination.iterator();\n while (tmp$_2.hasNext()) {\n var element_0 = tmp$_2.next();\n destination_0.put_xwzc9p$(data.TransformVar.toAes_8xm3sj$(element_0), element_0);\n }\n var tmp$_3;\n var result = LinkedHashMap_init();\n tmp$_3 = destination_0.entries.iterator();\n while (tmp$_3.hasNext()) {\n var entry = tmp$_3.next();\n var it = entry.key;\n if (Aes.Companion.isPositionalXY_896ixz$(it)) {\n result.put_xwzc9p$(entry.key, entry.value);\n }\n }\n var positionalTransformVars = result.values;\n var toDataBuilder = data_0.builder();\n tmp$ = positionalTransformVars.iterator();\n while (tmp$.hasNext()) {\n var transformVar = tmp$.next();\n toDataBuilder.remove_8xm3sj$(transformVar);\n }\n tmp$_0 = positionalTransformVars.iterator();\n while (tmp$_0.hasNext()) {\n var transformVar_0 = tmp$_0.next();\n var aes = data.TransformVar.toAes_8xm3sj$(transformVar_0);\n var flippedAes = util.YOrientationBaseUtil.flipAes_31786j$(aes);\n var toVar = data.TransformVar.forAes_896ixz$(flippedAes);\n var serie = data_0.getNumeric_8xm3sj$(transformVar_0);\n toDataBuilder.putNumeric_s1rqo9$(toVar, serie);\n }\n return toDataBuilder.build();\n };\n YOrientationUtil.prototype.flipVarBinding_gg2air$ = function (bindings) {\n var destination = ArrayList_init_0(collectionSizeOrDefault(bindings, 10));\n var tmp$;\n tmp$ = bindings.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n var tmp$_0 = destination.add_11rb$;\n var transform$result;\n if (Aes.Companion.isPositionalXY_896ixz$(item.aes)) {\n var flippedAes = util.YOrientationBaseUtil.flipAes_31786j$(item.aes);\n transform$result = new VarBinding(item.variable, flippedAes);\n } else {\n transform$result = item;\n }\n tmp$_0.call(destination, transform$result);\n }\n return destination;\n };\n YOrientationUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'YOrientationUtil',\n interfaces: []\n };\n var YOrientationUtil_instance = null;\n function YOrientationUtil_getInstance() {\n if (YOrientationUtil_instance === null) {\n new YOrientationUtil();\n }\n return YOrientationUtil_instance;\n }\n function DefaultAxisTheme(axis, options, fontFamilyRegistry) {\n ThemeValuesAccess.call(this, options, fontFamilyRegistry);\n this.axis_k6gqr6$_0 = axis;\n this.suffix_0 = '_' + this.axis;\n this.ontopKey_8be2vx$ = listOf_0([ThemeOption_getInstance().AXIS_ONTOP + this.suffix_0, ThemeOption_getInstance().AXIS_ONTOP]);\n this.lineKey_8be2vx$ = listOf_0([ThemeOption_getInstance().AXIS_LINE + this.suffix_0, ThemeOption_getInstance().AXIS_LINE, ThemeOption_getInstance().AXIS + this.suffix_0, ThemeOption_getInstance().AXIS, ThemeOption_getInstance().LINE]);\n this.textKey_8be2vx$ = listOf_0([ThemeOption_getInstance().AXIS_TEXT + this.suffix_0, ThemeOption_getInstance().AXIS_TEXT, ThemeOption_getInstance().TEXT, ThemeOption_getInstance().AXIS + this.suffix_0, ThemeOption_getInstance().AXIS]);\n this.titleKey_8be2vx$ = listOf_0([ThemeOption_getInstance().AXIS_TITLE + this.suffix_0, ThemeOption_getInstance().AXIS_TITLE, ThemeOption_getInstance().TITLE, ThemeOption_getInstance().TEXT, ThemeOption_getInstance().AXIS + this.suffix_0, ThemeOption_getInstance().AXIS]);\n this.tickKey_8be2vx$ = listOf_0([ThemeOption_getInstance().AXIS_TICKS + this.suffix_0, ThemeOption_getInstance().AXIS_TICKS, ThemeOption_getInstance().AXIS + this.suffix_0, ThemeOption_getInstance().AXIS, ThemeOption_getInstance().LINE]);\n this.tickLengthKey_8be2vx$ = listOf_0([ThemeOption_getInstance().AXIS_TICKS_LENGTH + this.suffix_0, ThemeOption_getInstance().AXIS_TICKS_LENGTH]);\n this.tooltipKey_8be2vx$ = listOf_0([ThemeOption_getInstance().AXIS_TOOLTIP + this.suffix_0, ThemeOption_getInstance().AXIS_TOOLTIP, ThemeOption_getInstance().RECT]);\n this.tooltipFillKey_8be2vx$ = plus(this.tooltipKey_8be2vx$, this.lineKey_8be2vx$);\n this.tooltipTextKey_8be2vx$ = listOf_0([ThemeOption_getInstance().AXIS_TOOLTIP_TEXT + this.suffix_0, ThemeOption_getInstance().AXIS_TOOLTIP_TEXT, ThemeOption_getInstance().TOOLTIP_TEXT, ThemeOption_getInstance().TEXT]);\n this.tooltipTextColorKey_8be2vx$ = plus(minus(this.tooltipTextKey_8be2vx$, ThemeOption_getInstance().TEXT), this.tooltipKey_8be2vx$);\n }\n Object.defineProperty(DefaultAxisTheme.prototype, 'axis', {\n get: function () {\n return this.axis_k6gqr6$_0;\n }\n });\n DefaultAxisTheme.prototype.isOntop = function () {\n return this.getBoolean_0(this.ontopKey_8be2vx$);\n };\n DefaultAxisTheme.prototype.showLine = function () {\n return !this.isElemBlank_0(this.lineKey_8be2vx$);\n };\n DefaultAxisTheme.prototype.showTickMarks = function () {\n return !this.isElemBlank_0(this.tickKey_8be2vx$);\n };\n DefaultAxisTheme.prototype.showLabels = function () {\n return !this.isElemBlank_0(this.textKey_8be2vx$);\n };\n DefaultAxisTheme.prototype.showTitle = function () {\n return !this.isElemBlank_0(this.titleKey_8be2vx$);\n };\n DefaultAxisTheme.prototype.showTooltip = function () {\n return !this.isElemBlank_0(this.tooltipKey_8be2vx$);\n };\n DefaultAxisTheme.prototype.titleStyle = function () {\n return this.getTextStyle_0(this.getElemValue_0(this.titleKey_8be2vx$));\n };\n DefaultAxisTheme.prototype.titleJustification = function () {\n return this.getTextJustification_0(this.getElemValue_0(this.titleKey_8be2vx$));\n };\n DefaultAxisTheme.prototype.titleMargins = function () {\n return this.getMargins_0(this.getElemValue_0(this.titleKey_8be2vx$));\n };\n DefaultAxisTheme.prototype.lineWidth = function () {\n return this.getNumber_0(this.getElemValue_0(this.lineKey_8be2vx$), ThemeOption$Elem_getInstance().SIZE);\n };\n DefaultAxisTheme.prototype.lineColor = function () {\n return this.getColor_0(this.getElemValue_0(this.lineKey_8be2vx$), ThemeOption$Elem_getInstance().COLOR);\n };\n DefaultAxisTheme.prototype.tickMarkWidth = function () {\n return this.getNumber_0(this.getElemValue_0(this.tickKey_8be2vx$), ThemeOption$Elem_getInstance().SIZE);\n };\n DefaultAxisTheme.prototype.tickMarkLength = function () {\n return this.getNumber_1(this.tickLengthKey_8be2vx$);\n };\n DefaultAxisTheme.prototype.tickMarkColor = function () {\n return this.getColor_0(this.getElemValue_0(this.tickKey_8be2vx$), ThemeOption$Elem_getInstance().COLOR);\n };\n DefaultAxisTheme.prototype.tickLabelMargins = function () {\n return this.getMargins_0(this.getElemValue_0(this.textKey_8be2vx$));\n };\n DefaultAxisTheme.prototype.labelStyle = function () {\n return this.getTextStyle_0(this.getElemValue_0(this.textKey_8be2vx$));\n };\n DefaultAxisTheme.prototype.tooltipFill = function () {\n return this.getColor_0(this.getElemValue_0(this.tooltipFillKey_8be2vx$), ThemeOption$Elem_getInstance().FILL);\n };\n DefaultAxisTheme.prototype.tooltipColor = function () {\n return this.getColor_0(this.getElemValue_0(this.tooltipKey_8be2vx$), ThemeOption$Elem_getInstance().COLOR);\n };\n DefaultAxisTheme.prototype.tooltipStrokeWidth = function () {\n return this.getNumber_0(this.getElemValue_0(this.tooltipKey_8be2vx$), ThemeOption$Elem_getInstance().SIZE);\n };\n DefaultAxisTheme.prototype.tooltipTextStyle = function () {\n var tooltipTextColor = this.getColor_0(this.getElemValue_0(this.tooltipTextColorKey_8be2vx$), ThemeOption$Elem_getInstance().COLOR);\n var textStyle = this.getTextStyle_0(this.getElemValue_0(this.tooltipTextKey_8be2vx$));\n return textStyle.copy_y7dxx7$(void 0, void 0, void 0, tooltipTextColor);\n };\n DefaultAxisTheme.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'DefaultAxisTheme',\n interfaces: [AxisTheme, ThemeValuesAccess]\n };\n function DefaultFacetsTheme(options, fontFamilyRegistry) {\n ThemeValuesAccess.call(this, options, fontFamilyRegistry);\n this.rectKey_8be2vx$ = listOf_0([ThemeOption_getInstance().FACET_STRIP_BGR_RECT, ThemeOption_getInstance().RECT]);\n this.textKey_8be2vx$ = listOf_0([ThemeOption_getInstance().FACET_STRIP_TEXT, ThemeOption_getInstance().TEXT]);\n }\n DefaultFacetsTheme.prototype.showStrip = function () {\n return !this.isElemBlank_0(this.textKey_8be2vx$);\n };\n DefaultFacetsTheme.prototype.showStripBackground = function () {\n return this.showStrip() && !this.isElemBlank_0(this.rectKey_8be2vx$);\n };\n DefaultFacetsTheme.prototype.stripFill = function () {\n return this.getColor_0(this.getElemValue_0(this.rectKey_8be2vx$), ThemeOption$Elem_getInstance().FILL);\n };\n DefaultFacetsTheme.prototype.stripColor = function () {\n return this.getColor_0(this.getElemValue_0(this.rectKey_8be2vx$), ThemeOption$Elem_getInstance().COLOR);\n };\n DefaultFacetsTheme.prototype.stripStrokeWidth = function () {\n return this.getNumber_0(this.getElemValue_0(this.rectKey_8be2vx$), ThemeOption$Elem_getInstance().SIZE);\n };\n DefaultFacetsTheme.prototype.stripTextStyle = function () {\n return this.getTextStyle_0(this.getElemValue_0(this.textKey_8be2vx$));\n };\n DefaultFacetsTheme.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'DefaultFacetsTheme',\n interfaces: [FacetsTheme, ThemeValuesAccess]\n };\n function DefaultLegendTheme(options, fontFamilyRegistry) {\n ThemeValuesAccess.call(this, options, fontFamilyRegistry);\n this.backgroundKey_8be2vx$ = listOf_0([ThemeOption_getInstance().LEGEND_BKGR_RECT, ThemeOption_getInstance().RECT]);\n this.titleKey_8be2vx$ = listOf_0([ThemeOption_getInstance().LEGEND_TITLE, ThemeOption_getInstance().TITLE, ThemeOption_getInstance().TEXT]);\n this.textKey_8be2vx$ = listOf_0([ThemeOption_getInstance().LEGEND_TEXT, ThemeOption_getInstance().TEXT]);\n }\n DefaultLegendTheme.prototype.keySize = function () {\n return 23.0;\n };\n DefaultLegendTheme.prototype.margin = function () {\n return 5.0;\n };\n DefaultLegendTheme.prototype.padding = function () {\n return 5.0;\n };\n DefaultLegendTheme.prototype.position = function () {\n var tmp$;\n return Kotlin.isType(tmp$ = this.getValue_0(ThemeOption_getInstance().LEGEND_POSITION), LegendPosition) ? tmp$ : throwCCE();\n };\n DefaultLegendTheme.prototype.justification = function () {\n var tmp$;\n return Kotlin.isType(tmp$ = this.getValue_0(ThemeOption_getInstance().LEGEND_JUSTIFICATION), LegendJustification) ? tmp$ : throwCCE();\n };\n DefaultLegendTheme.prototype.direction = function () {\n var tmp$;\n return Kotlin.isType(tmp$ = this.getValue_0(ThemeOption_getInstance().LEGEND_DIRECTION), LegendDirection) ? tmp$ : throwCCE();\n };\n DefaultLegendTheme.prototype.showTitle = function () {\n return !this.isElemBlank_0(this.titleKey_8be2vx$);\n };\n DefaultLegendTheme.prototype.titleStyle = function () {\n return this.getTextStyle_0(this.getElemValue_0(this.titleKey_8be2vx$));\n };\n DefaultLegendTheme.prototype.titleJustification = function () {\n return this.getTextJustification_0(this.getElemValue_0(this.titleKey_8be2vx$));\n };\n DefaultLegendTheme.prototype.textStyle = function () {\n return this.getTextStyle_0(this.getElemValue_0(this.textKey_8be2vx$));\n };\n DefaultLegendTheme.prototype.showBackground = function () {\n return !this.isElemBlank_0(this.backgroundKey_8be2vx$);\n };\n DefaultLegendTheme.prototype.backgroundColor = function () {\n return this.getColor_0(this.getElemValue_0(this.backgroundKey_8be2vx$), ThemeOption$Elem_getInstance().COLOR);\n };\n DefaultLegendTheme.prototype.backgroundFill = function () {\n return this.getColor_0(this.getElemValue_0(this.backgroundKey_8be2vx$), ThemeOption$Elem_getInstance().FILL);\n };\n DefaultLegendTheme.prototype.backgroundStrokeWidth = function () {\n return this.getNumber_0(this.getElemValue_0(this.backgroundKey_8be2vx$), ThemeOption$Elem_getInstance().SIZE);\n };\n DefaultLegendTheme.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'DefaultLegendTheme',\n interfaces: [LegendTheme, ThemeValuesAccess]\n };\n function DefaultPanelGridTheme(axis, options, fontFamilyRegistry) {\n ThemeValuesAccess.call(this, options, fontFamilyRegistry);\n this.suffix_0 = '_' + axis;\n this.majorLineKey_8be2vx$ = listOf_0([ThemeOption_getInstance().PANEL_GRID_MAJOR + this.suffix_0, ThemeOption_getInstance().PANEL_GRID_MAJOR, ThemeOption_getInstance().PANEL_GRID + this.suffix_0, ThemeOption_getInstance().PANEL_GRID, ThemeOption_getInstance().LINE]);\n this.minorLineKey_8be2vx$ = listOf_0([ThemeOption_getInstance().PANEL_GRID_MINOR + this.suffix_0, ThemeOption_getInstance().PANEL_GRID_MINOR, ThemeOption_getInstance().PANEL_GRID + this.suffix_0, ThemeOption_getInstance().PANEL_GRID, ThemeOption_getInstance().LINE]);\n }\n DefaultPanelGridTheme.prototype.showMajor = function () {\n return !this.isElemBlank_0(this.majorLineKey_8be2vx$);\n };\n DefaultPanelGridTheme.prototype.showMinor = function () {\n return !this.isElemBlank_0(this.minorLineKey_8be2vx$);\n };\n DefaultPanelGridTheme.prototype.majorLineWidth = function () {\n return this.getNumber_0(this.getElemValue_0(this.majorLineKey_8be2vx$), ThemeOption$Elem_getInstance().SIZE);\n };\n DefaultPanelGridTheme.prototype.minorLineWidth = function () {\n return this.getNumber_0(this.getElemValue_0(this.minorLineKey_8be2vx$), ThemeOption$Elem_getInstance().SIZE);\n };\n DefaultPanelGridTheme.prototype.majorLineColor = function () {\n return this.getColor_0(this.getElemValue_0(this.majorLineKey_8be2vx$), ThemeOption$Elem_getInstance().COLOR);\n };\n DefaultPanelGridTheme.prototype.minorLineColor = function () {\n return this.getColor_0(this.getElemValue_0(this.minorLineKey_8be2vx$), ThemeOption$Elem_getInstance().COLOR);\n };\n DefaultPanelGridTheme.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'DefaultPanelGridTheme',\n interfaces: [PanelGridTheme, ThemeValuesAccess]\n };\n function DefaultPanelTheme(options, fontFamilyRegistry) {\n ThemeValuesAccess.call(this, options, fontFamilyRegistry);\n this.gridX_0 = new DefaultPanelGridTheme('x', options, fontFamilyRegistry);\n this.gridY_0 = new DefaultPanelGridTheme('y', options, fontFamilyRegistry);\n this.rectKey_8be2vx$ = listOf_0([ThemeOption_getInstance().PANEL_BKGR_RECT, ThemeOption_getInstance().RECT]);\n this.borderKey_8be2vx$ = listOf_0([ThemeOption_getInstance().PANEL_BORDER_RECT, ThemeOption_getInstance().RECT]);\n }\n DefaultPanelTheme.prototype.showRect = function () {\n return !this.isElemBlank_0(this.rectKey_8be2vx$);\n };\n DefaultPanelTheme.prototype.rectColor = function () {\n return this.getColor_0(this.getElemValue_0(this.rectKey_8be2vx$), ThemeOption$Elem_getInstance().COLOR);\n };\n DefaultPanelTheme.prototype.rectFill = function () {\n return this.getColor_0(this.getElemValue_0(this.rectKey_8be2vx$), ThemeOption$Elem_getInstance().FILL);\n };\n DefaultPanelTheme.prototype.rectStrokeWidth = function () {\n return this.getNumber_0(this.getElemValue_0(this.rectKey_8be2vx$), ThemeOption$Elem_getInstance().SIZE);\n };\n DefaultPanelTheme.prototype.showBorder = function () {\n return !this.isElemBlank_0(this.borderKey_8be2vx$);\n };\n DefaultPanelTheme.prototype.borderColor = function () {\n return this.getColor_0(this.getElemValue_0(this.borderKey_8be2vx$), ThemeOption$Elem_getInstance().COLOR);\n };\n DefaultPanelTheme.prototype.borderWidth = function () {\n return this.getNumber_0(this.getElemValue_0(this.borderKey_8be2vx$), ThemeOption$Elem_getInstance().SIZE);\n };\n DefaultPanelTheme.prototype.gridX_6taknv$$default = function (flipAxis) {\n return flipAxis ? this.gridY_0 : this.gridX_0;\n };\n DefaultPanelTheme.prototype.gridY_6taknv$$default = function (flipAxis) {\n return flipAxis ? this.gridX_0 : this.gridY_0;\n };\n DefaultPanelTheme.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'DefaultPanelTheme',\n interfaces: [PanelTheme, ThemeValuesAccess]\n };\n function DefaultPlotTheme(options, fontFamilyRegistry) {\n ThemeValuesAccess.call(this, options, fontFamilyRegistry);\n this.backgroundKey_8be2vx$ = listOf_0([ThemeOption_getInstance().PLOT_BKGR_RECT, ThemeOption_getInstance().RECT]);\n this.titleKey_8be2vx$ = listOf_0([ThemeOption_getInstance().PLOT_TITLE, ThemeOption_getInstance().TITLE, ThemeOption_getInstance().TEXT]);\n this.subtitleKey_8be2vx$ = listOf_0([ThemeOption_getInstance().PLOT_SUBTITLE, ThemeOption_getInstance().TITLE, ThemeOption_getInstance().TEXT]);\n this.captionKey_8be2vx$ = listOf_0([ThemeOption_getInstance().PLOT_CAPTION, ThemeOption_getInstance().TITLE, ThemeOption_getInstance().TEXT]);\n }\n DefaultPlotTheme.prototype.showBackground = function () {\n return !this.isElemBlank_0(this.backgroundKey_8be2vx$);\n };\n DefaultPlotTheme.prototype.backgroundColor = function () {\n return this.getColor_0(this.getElemValue_0(this.backgroundKey_8be2vx$), ThemeOption$Elem_getInstance().COLOR);\n };\n DefaultPlotTheme.prototype.backgroundFill = function () {\n return this.getColor_0(this.getElemValue_0(this.backgroundKey_8be2vx$), ThemeOption$Elem_getInstance().FILL);\n };\n DefaultPlotTheme.prototype.backgroundStrokeWidth = function () {\n return this.getNumber_0(this.getElemValue_0(this.backgroundKey_8be2vx$), ThemeOption$Elem_getInstance().SIZE);\n };\n DefaultPlotTheme.prototype.titleStyle = function () {\n return this.getTextStyle_0(this.getElemValue_0(this.titleKey_8be2vx$));\n };\n DefaultPlotTheme.prototype.subtitleStyle = function () {\n return this.getTextStyle_0(this.getElemValue_0(this.subtitleKey_8be2vx$));\n };\n DefaultPlotTheme.prototype.captionStyle = function () {\n return this.getTextStyle_0(this.getElemValue_0(this.captionKey_8be2vx$));\n };\n DefaultPlotTheme.prototype.textColor = function () {\n return this.getColor_0(this.getElemValue_0(listOf(ThemeOption_getInstance().TEXT)), ThemeOption$Elem_getInstance().COLOR);\n };\n DefaultPlotTheme.prototype.textStyle = function () {\n return this.getTextStyle_0(this.getElemValue_0(listOf(ThemeOption_getInstance().TEXT)));\n };\n DefaultPlotTheme.prototype.titleJustification = function () {\n return this.getTextJustification_0(this.getElemValue_0(this.titleKey_8be2vx$));\n };\n DefaultPlotTheme.prototype.subtitleJustification = function () {\n return this.getTextJustification_0(this.getElemValue_0(this.subtitleKey_8be2vx$));\n };\n DefaultPlotTheme.prototype.captionJustification = function () {\n return this.getTextJustification_0(this.getElemValue_0(this.captionKey_8be2vx$));\n };\n DefaultPlotTheme.prototype.titleMargins = function () {\n return this.getMargins_0(this.getElemValue_0(this.titleKey_8be2vx$));\n };\n DefaultPlotTheme.prototype.subtitleMargins = function () {\n return this.getMargins_0(this.getElemValue_0(this.subtitleKey_8be2vx$));\n };\n DefaultPlotTheme.prototype.captionMargins = function () {\n return this.getMargins_0(this.getElemValue_0(this.captionKey_8be2vx$));\n };\n DefaultPlotTheme.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'DefaultPlotTheme',\n interfaces: [PlotTheme, ThemeValuesAccess]\n };\n function DefaultTheme(options, fontFamilyRegistry) {\n DefaultTheme$Companion_getInstance();\n if (fontFamilyRegistry === void 0)\n fontFamilyRegistry = new DefaultFontFamilyRegistry();\n this.options_0 = options;\n this.axisX_0 = new DefaultAxisTheme('x', this.options_0, fontFamilyRegistry);\n this.axisY_0 = new DefaultAxisTheme('y', this.options_0, fontFamilyRegistry);\n this.legend_0 = new DefaultLegendTheme(this.options_0, fontFamilyRegistry);\n this.panel_0 = new DefaultPanelTheme(this.options_0, fontFamilyRegistry);\n this.facets_0 = new DefaultFacetsTheme(this.options_0, fontFamilyRegistry);\n this.plot_0 = new DefaultPlotTheme(this.options_0, fontFamilyRegistry);\n this.tooltips_0 = new DefaultTooltipsTheme(this.options_0, fontFamilyRegistry);\n }\n DefaultTheme.prototype.horizontalAxis_6taknv$ = function (flipAxis) {\n return flipAxis ? this.axisY_0 : this.axisX_0;\n };\n DefaultTheme.prototype.verticalAxis_6taknv$ = function (flipAxis) {\n return flipAxis ? this.axisX_0 : this.axisY_0;\n };\n DefaultTheme.prototype.legend = function () {\n return this.legend_0;\n };\n DefaultTheme.prototype.panel = function () {\n return this.panel_0;\n };\n DefaultTheme.prototype.facets = function () {\n return this.facets_0;\n };\n DefaultTheme.prototype.plot = function () {\n return this.plot_0;\n };\n DefaultTheme.prototype.tooltips = function () {\n return this.tooltips_0;\n };\n function DefaultTheme$Companion() {\n DefaultTheme$Companion_instance = this;\n }\n DefaultTheme$Companion.prototype.minimal2 = function () {\n return new DefaultTheme((new ThemeValuesLPMinimal2()).values);\n };\n DefaultTheme$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var DefaultTheme$Companion_instance = null;\n function DefaultTheme$Companion_getInstance() {\n if (DefaultTheme$Companion_instance === null) {\n new DefaultTheme$Companion();\n }\n return DefaultTheme$Companion_instance;\n }\n DefaultTheme.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'DefaultTheme',\n interfaces: [Theme]\n };\n function DefaultTooltipsTheme(options, fontFamilyRegistry) {\n ThemeValuesAccess.call(this, options, fontFamilyRegistry);\n this.tooltipKey_8be2vx$ = listOf_0([ThemeOption_getInstance().TOOLTIP_RECT, ThemeOption_getInstance().RECT]);\n this.textKey_8be2vx$ = listOf_0([ThemeOption_getInstance().TOOLTIP_TEXT, ThemeOption_getInstance().TEXT]);\n this.titleTextKey_8be2vx$ = listOf_0([ThemeOption_getInstance().TOOLTIP_TITLE_TEXT, ThemeOption_getInstance().TOOLTIP_TEXT, ThemeOption_getInstance().TEXT]);\n }\n DefaultTooltipsTheme.prototype.tooltipColor = function () {\n return this.getColor_0(this.getElemValue_0(this.tooltipKey_8be2vx$), ThemeOption$Elem_getInstance().COLOR);\n };\n DefaultTooltipsTheme.prototype.tooltipFill = function () {\n return this.getColor_0(this.getElemValue_0(this.tooltipKey_8be2vx$), ThemeOption$Elem_getInstance().FILL);\n };\n DefaultTooltipsTheme.prototype.tooltipStrokeWidth = function () {\n return this.getNumber_0(this.getElemValue_0(this.tooltipKey_8be2vx$), ThemeOption$Elem_getInstance().SIZE);\n };\n DefaultTooltipsTheme.prototype.textStyle = function () {\n return this.getTextStyle_0(this.getElemValue_0(this.textKey_8be2vx$));\n };\n DefaultTooltipsTheme.prototype.titleStyle = function () {\n var titleStyle = this.getTextStyle_0(this.getElemValue_0(this.titleTextKey_8be2vx$));\n var textFontFace = this.getFontFace_0(this.getElemValue_0(this.textKey_8be2vx$));\n return titleStyle.copy_y7dxx7$(void 0, titleStyle.face.plus_j9uppr$(textFontFace));\n };\n DefaultTooltipsTheme.prototype.labelStyle = function () {\n var $receiver = this.textStyle();\n return new ThemeTextStyle($receiver.family, FontFace.Companion.BOLD.plus_j9uppr$($receiver.face), $receiver.size, $receiver.color);\n };\n DefaultTooltipsTheme.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'DefaultTooltipsTheme',\n interfaces: [TooltipsTheme, ThemeValuesAccess]\n };\n function ThemeFlavor(fill, color, specialColors) {\n ThemeFlavor$Companion_getInstance();\n if (specialColors === void 0)\n specialColors = emptyMap();\n this.fill_0 = fill;\n this.color_0 = color;\n this.specialColors_0 = specialColors;\n }\n function ThemeFlavor$updateColors$chooseNewColor(closure$plotBackgroundColor, this$ThemeFlavor) {\n return function (elementName, elementColor, isFillColor) {\n var tmp$, tmp$_0;\n if (equals(elementColor, closure$plotBackgroundColor)) {\n return this$ThemeFlavor.fill_0;\n }\n return (tmp$_0 = (tmp$ = this$ThemeFlavor.specialColors_0.get_11rb$(elementName)) != null ? tmp$.get_11rb$(isFillColor ? ThemeOption$Elem_getInstance().FILL : ThemeOption$Elem_getInstance().COLOR) : null) != null ? tmp$_0 : isFillColor ? this$ThemeFlavor.fill_0 : this$ThemeFlavor.color_0;\n };\n }\n ThemeFlavor.prototype.updateColors_x7u0o8$ = function (options) {\n var tmp$;\n var tmp$_0;\n if ((tmp$ = options.get_11rb$(ThemeOption_getInstance().PLOT_BKGR_RECT)) != null) {\n var tmp$_1;\n if (Kotlin.isType(tmp$, Map)) {\n var key = ThemeOption$Elem_getInstance().FILL;\n var tmp$_2;\n tmp$_1 = (Kotlin.isType(tmp$_2 = tmp$, Map) ? tmp$_2 : throwCCE()).get_11rb$(key);\n } else\n tmp$_1 = null;\n tmp$_0 = tmp$_1;\n } else\n tmp$_0 = null;\n var plotBackgroundColor = tmp$_0;\n var chooseNewColor = ThemeFlavor$updateColors$chooseNewColor(plotBackgroundColor, this);\n var destination = LinkedHashMap_init_0(mapCapacity(options.size));\n var tmp$_3;\n tmp$_3 = options.entries.iterator();\n while (tmp$_3.hasNext()) {\n var element = tmp$_3.next();\n var tmp$_4 = destination.put_xwzc9p$;\n var tmp$_5 = element.key;\n var transform$result;\n var key_0 = element.key;\n var value = element.value;\n var tmp$_6, tmp$_7;\n if (Kotlin.isType(value, Map)) {\n var updated = toMutableMap(value);\n if (ThemeFlavor$Companion_getInstance().ELEM_TO_UPDATE_COLOR_0.contains_11rb$(key_0)) {\n var tmp$_8 = ThemeOption$Elem_getInstance().COLOR;\n var key_1 = ThemeOption$Elem_getInstance().COLOR;\n var tmp$_9;\n var value_0 = chooseNewColor(key_0, (Kotlin.isType(tmp$_9 = value, Map) ? tmp$_9 : throwCCE()).get_11rb$(key_1), false);\n updated.put_xwzc9p$(tmp$_8, value_0);\n }\n if (ThemeFlavor$Companion_getInstance().ELEM_TO_UPDATE_FILL_0.contains_11rb$(key_0)) {\n var tmp$_10 = ThemeOption$Elem_getInstance().FILL;\n var key_2 = ThemeOption$Elem_getInstance().FILL;\n var tmp$_11;\n var value_1 = chooseNewColor(key_0, (Kotlin.isType(tmp$_11 = value, Map) ? tmp$_11 : throwCCE()).get_11rb$(key_2), true);\n updated.put_xwzc9p$(tmp$_10, value_1);\n }\n if (equals(key_0, ThemeOption_getInstance().TOOLTIP_RECT)) {\n if ((tmp$_7 = (tmp$_6 = this.specialColors_0.get_11rb$(key_0)) != null ? tmp$_6.get_11rb$(ThemeOption$Elem_getInstance().FILL) : null) != null) {\n var key_3 = ThemeOption$Elem_getInstance().FILL;\n updated.put_xwzc9p$(key_3, tmp$_7);\n }\n }\n transform$result = updated;\n } else {\n transform$result = value;\n }\n tmp$_4.call(destination, tmp$_5, transform$result);\n }\n return destination;\n };\n function ThemeFlavor$Companion() {\n ThemeFlavor$Companion_instance = this;\n this.ELEM_TO_UPDATE_COLOR_0 = listOf_0([ThemeOption_getInstance().LINE, ThemeOption_getInstance().RECT, ThemeOption_getInstance().PANEL_GRID, ThemeOption_getInstance().PANEL_BKGR_RECT, ThemeOption_getInstance().PANEL_BORDER_RECT, ThemeOption_getInstance().FACET_STRIP_BGR_RECT, ThemeOption_getInstance().AXIS, ThemeOption_getInstance().AXIS_TOOLTIP, ThemeOption_getInstance().TOOLTIP_RECT, ThemeOption_getInstance().TEXT, ThemeOption_getInstance().TITLE]);\n this.ELEM_TO_UPDATE_FILL_0 = listOf_0([ThemeOption_getInstance().RECT, ThemeOption_getInstance().PLOT_BKGR_RECT, ThemeOption_getInstance().PANEL_BKGR_RECT, ThemeOption_getInstance().FACET_STRIP_BGR_RECT, ThemeOption_getInstance().LEGEND_BKGR_RECT, ThemeOption_getInstance().AXIS_TOOLTIP, ThemeOption_getInstance().TOOLTIP_RECT]);\n }\n ThemeFlavor$Companion.prototype.forName_61zpoe$ = function (flavor) {\n var tmp$;\n switch (flavor) {\n case 'darcula':\n tmp$ = new ThemeFlavor(Color.Companion.parseHex_61zpoe$('#303030'), Color.Companion.parseHex_61zpoe$('#BBBBBB'), mapOf([to(ThemeOption_getInstance().PANEL_BKGR_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#3B3B3B')))), to(ThemeOption_getInstance().FACET_STRIP_BGR_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#363636')))), to(ThemeOption_getInstance().PANEL_GRID, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, Color.Companion.parseHex_61zpoe$('#474747')))), to(ThemeOption_getInstance().TOOLTIP_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#141414')))), to(ThemeOption_getInstance().AXIS_TOOLTIP, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#BBBBBB'))))]));\n break;\n case 'solarized_light':\n tmp$ = new ThemeFlavor(Color.Companion.parseHex_61zpoe$('#FDF6E3'), Color.Companion.parseHex_61zpoe$('#2E4E58'), mapOf([to(ThemeOption_getInstance().PANEL_BKGR_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#EEE8D5')))), to(ThemeOption_getInstance().FACET_STRIP_BGR_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#E6DFCA')))), to(ThemeOption_getInstance().PANEL_GRID, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, Color.Companion.parseHex_61zpoe$('#D7D4CB')))), to(ThemeOption_getInstance().TOOLTIP_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#FEFBF3')))), to(ThemeOption_getInstance().AXIS_TOOLTIP, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#2E4E58'))))]));\n break;\n case 'solarized_dark':\n tmp$ = new ThemeFlavor(Color.Companion.parseHex_61zpoe$('#0E3C4A'), Color.Companion.parseHex_61zpoe$('#A7B6BA'), mapOf([to(ThemeOption_getInstance().PANEL_BKGR_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#1B4854')))), to(ThemeOption_getInstance().FACET_STRIP_BGR_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#1F4650')))), to(ThemeOption_getInstance().PANEL_GRID, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, Color.Companion.parseHex_61zpoe$('#455458')))), to(ThemeOption_getInstance().TOOLTIP_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#0B2F3A')))), to(ThemeOption_getInstance().AXIS_TOOLTIP, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#A7B6BA'))))]));\n break;\n case 'high_contrast_light':\n tmp$ = new ThemeFlavor(Color.Companion.WHITE, Color.Companion.BLACK, mapOf([to(ThemeOption_getInstance().PANEL_BKGR_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#EBEBEB')))), to(ThemeOption_getInstance().FACET_STRIP_BGR_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#D9D9D9')))), to(ThemeOption_getInstance().PANEL_GRID, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, Color.Companion.parseHex_61zpoe$('#E9E9E9')))), to(ThemeOption_getInstance().TOOLTIP_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.WHITE))), to(ThemeOption_getInstance().AXIS_TOOLTIP, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.BLACK)))]));\n break;\n case 'high_contrast_dark':\n tmp$ = new ThemeFlavor(Color.Companion.BLACK, Color.Companion.WHITE, mapOf([to(ThemeOption_getInstance().PANEL_BKGR_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#3B3B3B')))), to(ThemeOption_getInstance().FACET_STRIP_BGR_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#363636')))), to(ThemeOption_getInstance().PANEL_GRID, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, Color.Companion.parseHex_61zpoe$('#474747')))), to(ThemeOption_getInstance().TOOLTIP_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.parseHex_61zpoe$('#460073')))), to(ThemeOption_getInstance().AXIS_TOOLTIP, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, Color.Companion.WHITE)))]));\n break;\n default:\n throw IllegalArgumentException_init(\"Unsupported theme flavor: '\" + flavor + \"'\");\n }\n return tmp$;\n };\n ThemeFlavor$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ThemeFlavor$Companion_instance = null;\n function ThemeFlavor$Companion_getInstance() {\n if (ThemeFlavor$Companion_instance === null) {\n new ThemeFlavor$Companion();\n }\n return ThemeFlavor$Companion_instance;\n }\n ThemeFlavor.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ThemeFlavor',\n interfaces: []\n };\n function ThemeValuesAccess(values, fontFamilyRegistry) {\n this.values_0 = values;\n this.fontFamilyRegistry_0 = fontFamilyRegistry;\n this.mem_0 = HashMap_init();\n }\n ThemeValuesAccess.prototype.get_0 = function (key) {\n return this.values_0.get_11rb$(key);\n };\n ThemeValuesAccess.prototype.getValue_0 = function (key) {\n return getValue(this.values_0, key);\n };\n ThemeValuesAccess.prototype.getValue_1 = function (key) {\n var specificOption = first(key);\n var tmp$;\n var value = this.mem_0.get_11rb$(specificOption);\n if (value == null) {\n var tmp$_0;\n var firstNotNullOfOrNull$result;\n firstNotNullOfOrNull$break: do {\n var tmp$_1;\n tmp$_1 = key.iterator();\n while (tmp$_1.hasNext()) {\n var element = tmp$_1.next();\n var result = this.values_0.get_11rb$(element);\n if (result != null) {\n firstNotNullOfOrNull$result = result;\n break firstNotNullOfOrNull$break;\n }\n }\n firstNotNullOfOrNull$result = null;\n }\n while (false);\n tmp$_0 = firstNotNullOfOrNull$result;\n if (tmp$_0 == null) {\n throw IllegalStateException_init('No theme value found. Key : ' + key + '.');\n }\n return tmp$_0;\n } else {\n tmp$ = value;\n }\n return tmp$;\n };\n ThemeValuesAccess.prototype.getNumber_1 = function (key) {\n var tmp$, tmp$_0, tmp$_1;\n var value = this.getValue_1(key);\n tmp$_1 = (tmp$_0 = Kotlin.isNumber(tmp$ = value) ? tmp$ : null) != null ? numberToDouble(tmp$_0) : null;\n if (tmp$_1 == null) {\n throw IllegalStateException_init('Theme value is not a number: ' + value.toString() + '. Key : ' + key + '.');\n }\n return tmp$_1;\n };\n ThemeValuesAccess.prototype.getBoolean_0 = function (key) {\n var tmp$, tmp$_0;\n var value = this.getValue_1(key);\n tmp$_0 = typeof (tmp$ = value) === 'boolean' ? tmp$ : null;\n if (tmp$_0 == null) {\n throw IllegalStateException_init('Theme value is not boolean: ' + value.toString() + '. Key : ' + key + '.');\n }\n return tmp$_0;\n };\n ThemeValuesAccess.prototype.getElemValue_0 = function (key) {\n var tmp$;\n var specificOption = first(key);\n var tmp$_0;\n var value = this.mem_0.get_11rb$(specificOption);\n if (value == null) {\n var $receiver = asReversed(key);\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$_1;\n tmp$_1 = $receiver.iterator();\n while (tmp$_1.hasNext()) {\n var item = tmp$_1.next();\n destination.add_11rb$(this.values_0.get_11rb$(item));\n }\n var tmp$_2;\n var accumulator = HashMap_init();\n tmp$_2 = destination.iterator();\n while (tmp$_2.hasNext()) {\n var element = tmp$_2.next();\n var acc = accumulator;\n var tmp$_3;\n if (element != null) {\n acc.putAll_a2k3zr$(Kotlin.isType(tmp$_3 = element, Map) ? tmp$_3 : throwCCE());\n }\n accumulator = acc;\n }\n return accumulator;\n } else {\n tmp$_0 = value;\n }\n return Kotlin.isType(tmp$ = tmp$_0, Map) ? tmp$ : throwCCE();\n };\n ThemeValuesAccess.prototype.isElemBlank_0 = function (key) {\n var tmp$;\n var blankValue = this.getElemValue_0(key).get_11rb$(ThemeOption$Elem_getInstance().BLANK);\n return blankValue != null && (typeof (tmp$ = blankValue) === 'boolean' ? tmp$ : throwCCE());\n };\n ThemeValuesAccess.prototype.getNumber_0 = function (elem, key) {\n var tmp$;\n return numberToDouble(Kotlin.isNumber(tmp$ = getValue(elem, key)) ? tmp$ : throwCCE());\n };\n ThemeValuesAccess.prototype.getColor_0 = function (elem, key) {\n var tmp$, tmp$_0;\n var value = getValue(elem, key);\n if (Kotlin.isType(value, Color))\n tmp$_0 = value;\n else {\n tmp$_0 = values.Colors.parseColor_61zpoe$(typeof (tmp$ = value) === 'string' ? tmp$ : throwCCE());\n }\n return tmp$_0;\n };\n ThemeValuesAccess.prototype.getFontFace_0 = function (elem) {\n var tmp$;\n var value = getValue(elem, ThemeOption$Elem_getInstance().FONT_FACE);\n if (Kotlin.isType(value, FontFace))\n tmp$ = value;\n else if (typeof value === 'string')\n tmp$ = FontFace.Companion.fromString_61zpoe$(value);\n else\n tmp$ = FontFace.Companion.NORMAL;\n return tmp$;\n };\n ThemeValuesAccess.prototype.getFontFamily_0 = function (elem) {\n var tmp$, tmp$_0;\n var value = typeof (tmp$ = getValue(elem, ThemeOption$Elem_getInstance().FONT_FAMILY)) === 'string' ? tmp$ : null;\n tmp$_0 = value != null ? this.fontFamilyRegistry_0.get_61zpoe$(value) : null;\n if (tmp$_0 == null) {\n throw IllegalStateException_init(\"Theme value '\" + ThemeOption$Elem_getInstance().FONT_FAMILY + \"' is not a string. Elem : \" + elem + '.');\n }\n return tmp$_0;\n };\n ThemeValuesAccess.prototype.getTextStyle_0 = function (elem) {\n return new ThemeTextStyle(this.getFontFamily_0(elem), this.getFontFace_0(elem), this.getNumber_0(elem, ThemeOption$Elem_getInstance().SIZE), this.getColor_0(elem, ThemeOption$Elem_getInstance().COLOR));\n };\n ThemeValuesAccess.prototype.getTextJustification_0 = function (elem) {\n var hjust = this.getNumber_0(elem, ThemeOption$Elem_getInstance().HJUST);\n var vjust = this.getNumber_0(elem, ThemeOption$Elem_getInstance().VJUST);\n return new TextJustification(hjust, vjust);\n };\n ThemeValuesAccess.prototype.getMargins_0 = function (elem) {\n return new Margins(this.getNumber_0(elem, ThemeOption$Elem$Margin_getInstance().TOP), this.getNumber_0(elem, ThemeOption$Elem$Margin_getInstance().RIGHT), this.getNumber_0(elem, ThemeOption$Elem$Margin_getInstance().BOTTOM), this.getNumber_0(elem, ThemeOption$Elem$Margin_getInstance().LEFT));\n };\n ThemeValuesAccess.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ThemeValuesAccess',\n interfaces: []\n };\n function ThemeOption() {\n ThemeOption_instance = this;\n this.TITLE = 'title';\n this.TEXT = 'text';\n this.LINE = 'line';\n this.RECT = 'rect';\n this.PLOT_BKGR_RECT = 'plot_background';\n this.PLOT_TITLE = 'plot_title';\n this.PLOT_SUBTITLE = 'plot_subtitle';\n this.PLOT_CAPTION = 'plot_caption';\n this.AXIS = 'axis';\n this.AXIS_X = 'axis_x';\n this.AXIS_Y = 'axis_y';\n this.AXIS_ONTOP = 'axis_ontop';\n this.AXIS_ONTOP_X = 'axis_ontop_x';\n this.AXIS_ONTOP_Y = 'axis_ontop_y';\n this.AXIS_TITLE = 'axis_title';\n this.AXIS_TEXT = 'axis_text';\n this.AXIS_TICKS = 'axis_ticks';\n this.AXIS_TICKS_LENGTH = 'axis_ticks_length';\n this.AXIS_LINE = 'axis_line';\n this.AXIS_TOOLTIP = 'axis_tooltip';\n this.AXIS_TOOLTIP_TEXT = 'axis_tooltip_text';\n this.AXIS_TITLE_X = 'axis_title_x';\n this.AXIS_TITLE_Y = 'axis_title_y';\n this.AXIS_TEXT_X = 'axis_text_x';\n this.AXIS_TEXT_Y = 'axis_text_y';\n this.AXIS_TICKS_X = 'axis_ticks_x';\n this.AXIS_TICKS_Y = 'axis_ticks_y';\n this.AXIS_TICKS_LENGTH_X = 'axis_ticks_length_x';\n this.AXIS_TICKS_LENGTH_Y = 'axis_ticks_length_y';\n this.AXIS_LINE_X = 'axis_line_x';\n this.AXIS_LINE_Y = 'axis_line_y';\n this.AXIS_TOOLTIP_X = 'axis_tooltip_x';\n this.AXIS_TOOLTIP_Y = 'axis_tooltip_y';\n this.AXIS_TOOLTIP_TEXT_X = 'axis_tooltip_text_x';\n this.AXIS_TOOLTIP_TEXT_Y = 'axis_tooltip_text_y';\n this.PANEL_BKGR_RECT = 'panel_background';\n this.PANEL_BORDER_RECT = 'panel_border';\n this.PANEL_GRID = 'panel_grid';\n this.PANEL_GRID_MAJOR = 'panel_grid_major';\n this.PANEL_GRID_MINOR = 'panel_grid_minor';\n this.PANEL_GRID_MAJOR_X = 'panel_grid_major_x';\n this.PANEL_GRID_MINOR_X = 'panel_grid_minor_x';\n this.PANEL_GRID_MAJOR_Y = 'panel_grid_major_y';\n this.PANEL_GRID_MINOR_Y = 'panel_grid_minor_y';\n this.FACET_STRIP_BGR_RECT = 'strip_background';\n this.FACET_STRIP_TEXT = 'strip_text';\n this.LEGEND_BKGR_RECT = 'legend_background';\n this.LEGEND_TEXT = 'legend_text';\n this.LEGEND_TITLE = 'legend_title';\n this.LEGEND_POSITION = 'legend_position';\n this.LEGEND_JUSTIFICATION = 'legend_justification';\n this.LEGEND_DIRECTION = 'legend_direction';\n this.TOOLTIP_RECT = 'tooltip';\n this.TOOLTIP_TEXT = 'tooltip_text';\n this.TOOLTIP_TITLE_TEXT = 'tooltip_title_text';\n this.ELEMENT_BLANK = mapOf_0(to(ThemeOption$Elem_getInstance().BLANK, true));\n this.ELEMENT_BLANK_SHORTHAND = 'blank';\n }\n function ThemeOption$Elem() {\n ThemeOption$Elem_instance = this;\n this.BLANK = 'blank';\n this.FILL = 'fill';\n this.COLOR = 'color';\n this.SIZE = 'size';\n this.LINETYPE = 'linetype';\n this.ARROW = 'arrow';\n this.FONT_FAMILY = 'family';\n this.FONT_FACE = 'face';\n this.HJUST = 'hjust';\n this.VJUST = 'vjust';\n this.ANGLE = 'angle';\n this.LINEHEIGHT = 'lineheight';\n this.MARGIN = 'margin';\n }\n function ThemeOption$Elem$Margin() {\n ThemeOption$Elem$Margin_instance = this;\n this.TOP = 'margin_t';\n this.RIGHT = 'margin_r';\n this.BOTTOM = 'margin_b';\n this.LEFT = 'margin_l';\n }\n ThemeOption$Elem$Margin.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Margin',\n interfaces: []\n };\n var ThemeOption$Elem$Margin_instance = null;\n function ThemeOption$Elem$Margin_getInstance() {\n if (ThemeOption$Elem$Margin_instance === null) {\n new ThemeOption$Elem$Margin();\n }\n return ThemeOption$Elem$Margin_instance;\n }\n ThemeOption$Elem.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Elem',\n interfaces: []\n };\n var ThemeOption$Elem_instance = null;\n function ThemeOption$Elem_getInstance() {\n if (ThemeOption$Elem_instance === null) {\n new ThemeOption$Elem();\n }\n return ThemeOption$Elem_instance;\n }\n function ThemeOption$Name() {\n ThemeOption$Name_instance = this;\n this.R_GREY = 'grey';\n this.R_LIGHT = 'light';\n this.R_CLASSIC = 'classic';\n this.R_MINIMAL = 'minimal';\n this.R_BW = 'bw';\n this.LP_MINIMAL = 'minimal2';\n this.LP_NONE = 'none';\n }\n ThemeOption$Name.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Name',\n interfaces: []\n };\n var ThemeOption$Name_instance = null;\n function ThemeOption$Name_getInstance() {\n if (ThemeOption$Name_instance === null) {\n new ThemeOption$Name();\n }\n return ThemeOption$Name_instance;\n }\n function ThemeOption$Flavor() {\n ThemeOption$Flavor_instance = this;\n this.DARCULA = 'darcula';\n this.SOLARIZED_LIGHT = 'solarized_light';\n this.SOLARIZED_DARK = 'solarized_dark';\n this.HIGH_CONTRAST_LIGHT = 'high_contrast_light';\n this.HIGH_CONTRAST_DARK = 'high_contrast_dark';\n }\n ThemeOption$Flavor.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Flavor',\n interfaces: []\n };\n var ThemeOption$Flavor_instance = null;\n function ThemeOption$Flavor_getInstance() {\n if (ThemeOption$Flavor_instance === null) {\n new ThemeOption$Flavor();\n }\n return ThemeOption$Flavor_instance;\n }\n function ThemeOption$ForTest() {\n ThemeOption$ForTest_instance = this;\n this.themeNames = listOf_0([ThemeOption$Name_getInstance().R_GREY, ThemeOption$Name_getInstance().R_LIGHT, ThemeOption$Name_getInstance().R_CLASSIC, ThemeOption$Name_getInstance().R_MINIMAL, ThemeOption$Name_getInstance().R_BW, ThemeOption$Name_getInstance().LP_MINIMAL, ThemeOption$Name_getInstance().LP_NONE]);\n this.elemWithColorAndSize = listOf_0([ThemeOption_getInstance().PLOT_BKGR_RECT, ThemeOption_getInstance().LEGEND_BKGR_RECT, ThemeOption_getInstance().AXIS_TICKS_X, ThemeOption_getInstance().AXIS_TICKS_Y, ThemeOption_getInstance().AXIS_LINE_X, ThemeOption_getInstance().AXIS_LINE_Y, ThemeOption_getInstance().AXIS_TOOLTIP_X, ThemeOption_getInstance().AXIS_TOOLTIP_Y, ThemeOption_getInstance().PANEL_BKGR_RECT, ThemeOption_getInstance().PANEL_BORDER_RECT, ThemeOption_getInstance().PANEL_GRID_MAJOR_X, ThemeOption_getInstance().PANEL_GRID_MINOR_X, ThemeOption_getInstance().PANEL_GRID_MAJOR_Y, ThemeOption_getInstance().PANEL_GRID_MINOR_Y, ThemeOption_getInstance().FACET_STRIP_BGR_RECT, ThemeOption_getInstance().TOOLTIP_RECT]);\n this.elemWithColorOnly = listOf_0([ThemeOption_getInstance().PLOT_TITLE, ThemeOption_getInstance().PLOT_SUBTITLE, ThemeOption_getInstance().PLOT_CAPTION, ThemeOption_getInstance().AXIS_TITLE_X, ThemeOption_getInstance().AXIS_TITLE_Y, ThemeOption_getInstance().AXIS_TEXT_X, ThemeOption_getInstance().AXIS_TEXT_Y, ThemeOption_getInstance().AXIS_TOOLTIP_TEXT_X, ThemeOption_getInstance().AXIS_TOOLTIP_TEXT_Y, ThemeOption_getInstance().FACET_STRIP_TEXT, ThemeOption_getInstance().LEGEND_TEXT, ThemeOption_getInstance().LEGEND_TITLE, ThemeOption_getInstance().TOOLTIP_TEXT, ThemeOption_getInstance().TOOLTIP_TITLE_TEXT]);\n this.elemWithFill = listOf_0([ThemeOption_getInstance().PLOT_BKGR_RECT, ThemeOption_getInstance().LEGEND_BKGR_RECT, ThemeOption_getInstance().AXIS_TOOLTIP_X, ThemeOption_getInstance().AXIS_TOOLTIP_Y, ThemeOption_getInstance().PANEL_BKGR_RECT, ThemeOption_getInstance().FACET_STRIP_BGR_RECT, ThemeOption_getInstance().TOOLTIP_RECT]);\n this.numericOptions = listOf_0([ThemeOption_getInstance().AXIS_TICKS_LENGTH_X, ThemeOption_getInstance().AXIS_TICKS_LENGTH_Y]);\n this.elemWithFontOptions = listOf_0([ThemeOption_getInstance().PLOT_TITLE, ThemeOption_getInstance().PLOT_SUBTITLE, ThemeOption_getInstance().PLOT_CAPTION, ThemeOption_getInstance().AXIS_TITLE_X, ThemeOption_getInstance().AXIS_TITLE_Y, ThemeOption_getInstance().AXIS_TEXT_X, ThemeOption_getInstance().AXIS_TEXT_Y, ThemeOption_getInstance().AXIS_TOOLTIP_TEXT_X, ThemeOption_getInstance().AXIS_TOOLTIP_TEXT_Y, ThemeOption_getInstance().FACET_STRIP_TEXT, ThemeOption_getInstance().LEGEND_TEXT, ThemeOption_getInstance().LEGEND_TITLE, ThemeOption_getInstance().TOOLTIP_TEXT, ThemeOption_getInstance().TOOLTIP_TITLE_TEXT]);\n }\n ThemeOption$ForTest.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'ForTest',\n interfaces: []\n };\n var ThemeOption$ForTest_instance = null;\n function ThemeOption$ForTest_getInstance() {\n if (ThemeOption$ForTest_instance === null) {\n new ThemeOption$ForTest();\n }\n return ThemeOption$ForTest_instance;\n }\n ThemeOption.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'ThemeOption',\n interfaces: []\n };\n var ThemeOption_instance = null;\n function ThemeOption_getInstance() {\n if (ThemeOption_instance === null) {\n new ThemeOption();\n }\n return ThemeOption_instance;\n }\n function ThemeValues(values) {\n ThemeValues$Companion_getInstance();\n this.values = values;\n }\n ThemeValues.prototype.plus_x7u0o8$ = function (other) {\n return ThemeValues$Companion_getInstance().mergeWith_oz50u7$(this.values, other);\n };\n function ThemeValues$Companion() {\n ThemeValues$Companion_instance = this;\n }\n ThemeValues$Companion.prototype.mergeWith_oz50u7$ = function ($receiver, other) {\n var tmp$, tmp$_0;\n var result = HashMap_init_0($receiver);\n tmp$ = other.entries.iterator();\n while (tmp$.hasNext()) {\n var tmp$_1 = tmp$.next();\n var k = tmp$_1.key;\n var v = tmp$_1.value;\n var wasVal = result.put_xwzc9p$(k, v);\n if (Kotlin.isType(wasVal, Map)) {\n result.put_xwzc9p$(k, plus_0(wasVal, Kotlin.isType(tmp$_0 = v, Map) ? tmp$_0 : throwCCE()));\n }\n }\n return result;\n };\n ThemeValues$Companion.prototype.forName_61zpoe$ = function (theme) {\n var tmp$;\n switch (theme) {\n case 'grey':\n tmp$ = new ThemeValuesRGrey();\n break;\n case 'light':\n tmp$ = new ThemeValuesRLight();\n break;\n case 'classic':\n tmp$ = new ThemeValuesRClassic();\n break;\n case 'minimal':\n tmp$ = new ThemeValuesRMinimal();\n break;\n case 'bw':\n tmp$ = new ThemeValuesRBW();\n break;\n case 'minimal2':\n tmp$ = new ThemeValuesLPMinimal2();\n break;\n case 'none':\n tmp$ = new ThemeValuesLPNone();\n break;\n default:\n throw IllegalArgumentException_init(\"Unsupported theme: '\" + theme + \"'\");\n }\n return tmp$;\n };\n ThemeValues$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ThemeValues$Companion_instance = null;\n function ThemeValues$Companion_getInstance() {\n if (ThemeValues$Companion_instance === null) {\n new ThemeValues$Companion();\n }\n return ThemeValues$Companion_instance;\n }\n ThemeValues.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ThemeValues',\n interfaces: []\n };\n function ThemeValuesBase() {\n ThemeValuesBase$Companion_getInstance();\n ThemeValues.call(this, ThemeValuesBase$Companion_getInstance().VALUES_0);\n }\n function ThemeValuesBase$Companion() {\n ThemeValuesBase$Companion_instance = this;\n this.VALUES_0 = mapOf([to(ThemeOption_getInstance().LINE, mapOf([to(ThemeOption$Elem_getInstance().COLOR, Color.Companion.BLUE), to(ThemeOption$Elem_getInstance().SIZE, 1.0)])), to(ThemeOption_getInstance().RECT, mapOf([to(ThemeOption$Elem_getInstance().COLOR, Color.Companion.BLUE), to(ThemeOption$Elem_getInstance().FILL, Color.Companion.LIGHT_BLUE), to(ThemeOption$Elem_getInstance().SIZE, 1.0)])), to(ThemeOption_getInstance().TEXT, mapOf([to(ThemeOption$Elem_getInstance().COLOR, Color.Companion.BLUE), to(ThemeOption$Elem_getInstance().SIZE, Defaults_getInstance().FONT_SMALL), to(ThemeOption$Elem_getInstance().FONT_FACE, FontFace.Companion.NORMAL), to(ThemeOption$Elem_getInstance().FONT_FAMILY, Defaults_getInstance().FONT_FAMILY_NORMAL), to(ThemeOption$Elem_getInstance().HJUST, 0.0), to(ThemeOption$Elem_getInstance().VJUST, 0.5)])), to(ThemeOption_getInstance().TITLE, mapOf([to(ThemeOption$Elem_getInstance().SIZE, Defaults_getInstance().FONT_MEDIUM), to(ThemeOption$Elem$Margin_getInstance().TOP, 4.0), to(ThemeOption$Elem$Margin_getInstance().RIGHT, 0.0), to(ThemeOption$Elem$Margin_getInstance().BOTTOM, 4.0), to(ThemeOption$Elem$Margin_getInstance().LEFT, 0.0)])), to(ThemeOption_getInstance().PLOT_TITLE, mapOf_0(to(ThemeOption$Elem_getInstance().SIZE, Defaults_getInstance().FONT_LARGE))), to(ThemeOption_getInstance().PLOT_SUBTITLE, mapOf_0(to(ThemeOption$Elem_getInstance().SIZE, Defaults_getInstance().FONT_MEDIUM))), to(ThemeOption_getInstance().PLOT_CAPTION, mapOf([to(ThemeOption$Elem_getInstance().HJUST, 1.0), to(ThemeOption$Elem_getInstance().SIZE, Defaults_getInstance().FONT_SMALL)])), to(ThemeOption_getInstance().PANEL_BORDER_RECT, ThemeOption_getInstance().ELEMENT_BLANK), to(ThemeOption_getInstance().PLOT_BKGR_RECT, mapOf([to(ThemeOption$Elem_getInstance().FILL, Color.Companion.WHITE), to(ThemeOption$Elem_getInstance().SIZE, 0.0)])), to(ThemeOption_getInstance().LEGEND_BKGR_RECT, mapOf([to(ThemeOption$Elem_getInstance().FILL, Color.Companion.WHITE), to(ThemeOption$Elem_getInstance().SIZE, 0.0)])), to(ThemeOption_getInstance().AXIS_ONTOP, false), to(ThemeOption_getInstance().AXIS_TICKS_LENGTH, 4.0), to(ThemeOption_getInstance().AXIS_TEXT, mapOf([to(ThemeOption$Elem$Margin_getInstance().TOP, 3.0), to(ThemeOption$Elem$Margin_getInstance().RIGHT, 3.0), to(ThemeOption$Elem$Margin_getInstance().BOTTOM, 0.0), to(ThemeOption$Elem$Margin_getInstance().LEFT, 0.0)])), to(ThemeOption_getInstance().AXIS_TITLE, mapOf([to(ThemeOption$Elem_getInstance().SIZE, Defaults_getInstance().FONT_MEDIUM), to(ThemeOption$Elem_getInstance().HJUST, 0.5), to(ThemeOption$Elem$Margin_getInstance().TOP, 4.0), to(ThemeOption$Elem$Margin_getInstance().RIGHT, 4.0), to(ThemeOption$Elem$Margin_getInstance().BOTTOM, 4.0), to(ThemeOption$Elem$Margin_getInstance().LEFT, 4.0)])), to(ThemeOption_getInstance().PANEL_GRID_MINOR, mapOf_0(to(ThemeOption$Elem_getInstance().SIZE, 0.5))), to(ThemeOption_getInstance().LEGEND_TITLE, mapOf_0(to(ThemeOption$Elem_getInstance().SIZE, Defaults_getInstance().FONT_MEDIUM))), to(ThemeOption_getInstance().LEGEND_POSITION, LegendPosition$Companion_getInstance().RIGHT), to(ThemeOption_getInstance().LEGEND_JUSTIFICATION, LegendJustification$Companion_getInstance().CENTER), to(ThemeOption_getInstance().LEGEND_DIRECTION, LegendDirection$AUTO_getInstance()), to(ThemeOption_getInstance().TOOLTIP_RECT, mapOf([to(ThemeOption$Elem_getInstance().FILL, Color.Companion.WHITE), to(ThemeOption$Elem_getInstance().COLOR, Color.Companion.BLACK), to(ThemeOption$Elem_getInstance().SIZE, 1.0)])), to(ThemeOption_getInstance().TOOLTIP_TITLE_TEXT, mapOf_0(to(ThemeOption$Elem_getInstance().FONT_FACE, FontFace.Companion.BOLD)))]);\n }\n ThemeValuesBase$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ThemeValuesBase$Companion_instance = null;\n function ThemeValuesBase$Companion_getInstance() {\n if (ThemeValuesBase$Companion_instance === null) {\n new ThemeValuesBase$Companion();\n }\n return ThemeValuesBase$Companion_instance;\n }\n ThemeValuesBase.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ThemeValuesBase',\n interfaces: [ThemeValues]\n };\n function ThemeValuesLPMinimal2() {\n ThemeValuesLPMinimal2$Companion_getInstance();\n ThemeValues.call(this, ThemeValuesLPMinimal2$Companion_getInstance().VALUES_0);\n }\n function ThemeValuesLPMinimal2$Companion() {\n ThemeValuesLPMinimal2$Companion_instance = this;\n this.PLOT_BACKGROUND_0 = Color.Companion.WHITE;\n this.BLACK_0 = Color.Companion.parseHex_61zpoe$('#171717');\n this.DARK_GREY_0 = Color.Companion.parseHex_61zpoe$('#474747');\n this.LIGHT_GREY_0 = Color.Companion.parseHex_61zpoe$('#E9E9E9');\n this.VALUES_0 = (new ThemeValuesBase()).plus_x7u0o8$(mapOf([to(ThemeOption_getInstance().LINE, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().RECT, mapOf([to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0), to(ThemeOption$Elem_getInstance().FILL, this.LIGHT_GREY_0)])), to(ThemeOption_getInstance().TEXT, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().PANEL_BKGR_RECT, ThemeOption_getInstance().ELEMENT_BLANK), to(ThemeOption_getInstance().PANEL_GRID_MINOR, ThemeOption_getInstance().ELEMENT_BLANK), to(ThemeOption_getInstance().PANEL_GRID, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.LIGHT_GREY_0))), to(ThemeOption_getInstance().AXIS_LINE_Y, ThemeOption_getInstance().ELEMENT_BLANK), to(ThemeOption_getInstance().AXIS_TICKS_Y, ThemeOption_getInstance().ELEMENT_BLANK), to(ThemeOption_getInstance().AXIS, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().AXIS_TOOLTIP, mapOf([to(ThemeOption$Elem_getInstance().COLOR, this.PLOT_BACKGROUND_0), to(ThemeOption$Elem_getInstance().FILL, this.DARK_GREY_0)])), to(ThemeOption_getInstance().FACET_STRIP_BGR_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().BLANK, true)))]));\n }\n ThemeValuesLPMinimal2$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ThemeValuesLPMinimal2$Companion_instance = null;\n function ThemeValuesLPMinimal2$Companion_getInstance() {\n if (ThemeValuesLPMinimal2$Companion_instance === null) {\n new ThemeValuesLPMinimal2$Companion();\n }\n return ThemeValuesLPMinimal2$Companion_instance;\n }\n ThemeValuesLPMinimal2.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ThemeValuesLPMinimal2',\n interfaces: [ThemeValues]\n };\n function ThemeValuesLPNone() {\n ThemeValuesBase.call(this);\n }\n ThemeValuesLPNone.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ThemeValuesLPNone',\n interfaces: [ThemeValuesBase]\n };\n function ThemeValuesRBW() {\n ThemeValuesRBW$Companion_getInstance();\n ThemeValues.call(this, ThemeValuesRBW$Companion_getInstance().VALUES_0);\n }\n function ThemeValuesRBW$Companion() {\n ThemeValuesRBW$Companion_instance = this;\n this.PLOT_BACKGROUND_0 = Color.Companion.WHITE;\n this.PANEL_BORDER_0 = Color.Companion.parseHex_61zpoe$('#333333');\n this.STRIP_BACKGROUND_0 = Color.Companion.parseHex_61zpoe$('#D9D9D9');\n this.DARK_GREY_0 = Color.Companion.parseHex_61zpoe$('#474747');\n this.LIGHT_GREY_0 = Color.Companion.parseHex_61zpoe$('#E9E9E9');\n this.VALUES_0 = (new ThemeValuesBase()).plus_x7u0o8$(mapOf([to(ThemeOption_getInstance().LINE, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().RECT, mapOf([to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0), to(ThemeOption$Elem_getInstance().FILL, this.LIGHT_GREY_0)])), to(ThemeOption_getInstance().TEXT, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().PANEL_BKGR_RECT, mapOf([to(ThemeOption$Elem_getInstance().FILL, this.PLOT_BACKGROUND_0), to(ThemeOption$Elem_getInstance().COLOR, this.PANEL_BORDER_0)])), to(ThemeOption_getInstance().PANEL_GRID, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.LIGHT_GREY_0))), to(ThemeOption_getInstance().PANEL_GRID_MAJOR, mapOf_0(to(ThemeOption$Elem_getInstance().SIZE, 1.4))), to(ThemeOption_getInstance().PANEL_GRID_MINOR, mapOf_0(to(ThemeOption$Elem_getInstance().SIZE, 0.5))), to(ThemeOption_getInstance().AXIS_LINE, ThemeOption_getInstance().ELEMENT_BLANK), to(ThemeOption_getInstance().AXIS, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.PANEL_BORDER_0))), to(ThemeOption_getInstance().AXIS_TOOLTIP, mapOf([to(ThemeOption$Elem_getInstance().COLOR, this.PLOT_BACKGROUND_0), to(ThemeOption$Elem_getInstance().FILL, this.DARK_GREY_0)])), to(ThemeOption_getInstance().FACET_STRIP_BGR_RECT, mapOf([to(ThemeOption$Elem_getInstance().FILL, this.STRIP_BACKGROUND_0), to(ThemeOption$Elem_getInstance().COLOR, this.PANEL_BORDER_0)]))]));\n }\n ThemeValuesRBW$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ThemeValuesRBW$Companion_instance = null;\n function ThemeValuesRBW$Companion_getInstance() {\n if (ThemeValuesRBW$Companion_instance === null) {\n new ThemeValuesRBW$Companion();\n }\n return ThemeValuesRBW$Companion_instance;\n }\n ThemeValuesRBW.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ThemeValuesRBW',\n interfaces: [ThemeValues]\n };\n function ThemeValuesRClassic() {\n ThemeValuesRClassic$Companion_getInstance();\n ThemeValues.call(this, ThemeValuesRClassic$Companion_getInstance().VALUES_0);\n }\n function ThemeValuesRClassic$Companion() {\n ThemeValuesRClassic$Companion_instance = this;\n this.PLOT_BACKGROUND_0 = Color.Companion.WHITE;\n this.BLACK_0 = Color.Companion.parseHex_61zpoe$('#171717');\n this.DARK_GREY_0 = Color.Companion.parseHex_61zpoe$('#474747');\n this.LIGHT_GREY_0 = Color.Companion.parseHex_61zpoe$('#E9E9E9');\n this.VALUES_0 = (new ThemeValuesBase()).plus_x7u0o8$(mapOf([to(ThemeOption_getInstance().LINE, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().RECT, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().TEXT, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().PANEL_BKGR_RECT, ThemeOption_getInstance().ELEMENT_BLANK), to(ThemeOption_getInstance().PANEL_GRID, mapOf([to(ThemeOption$Elem_getInstance().BLANK, true), to(ThemeOption$Elem_getInstance().COLOR, this.LIGHT_GREY_0)])), to(ThemeOption_getInstance().AXIS, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().AXIS_TOOLTIP, mapOf([to(ThemeOption$Elem_getInstance().COLOR, this.PLOT_BACKGROUND_0), to(ThemeOption$Elem_getInstance().FILL, this.DARK_GREY_0)])), to(ThemeOption_getInstance().FACET_STRIP_BGR_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().FILL, this.PLOT_BACKGROUND_0)))]));\n }\n ThemeValuesRClassic$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ThemeValuesRClassic$Companion_instance = null;\n function ThemeValuesRClassic$Companion_getInstance() {\n if (ThemeValuesRClassic$Companion_instance === null) {\n new ThemeValuesRClassic$Companion();\n }\n return ThemeValuesRClassic$Companion_instance;\n }\n ThemeValuesRClassic.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ThemeValuesRClassic',\n interfaces: [ThemeValues]\n };\n function ThemeValuesRGrey() {\n ThemeValuesRGrey$Companion_getInstance();\n ThemeValues.call(this, ThemeValuesRGrey$Companion_getInstance().VALUES_0);\n }\n function ThemeValuesRGrey$Companion() {\n ThemeValuesRGrey$Companion_instance = this;\n this.PLOT_BACKGROUND_0 = Color.Companion.WHITE;\n this.PANEL_BACKGROUND_0 = Color.Companion.parseHex_61zpoe$('#EBEBEB');\n this.STRIP_BACKGROUND_0 = Color.Companion.parseHex_61zpoe$('#D9D9D9');\n this.BLACK_0 = Color.Companion.parseHex_61zpoe$('#171717');\n this.DARK_GREY_0 = Color.Companion.parseHex_61zpoe$('#474747');\n this.LIGHT_GREY_0 = Color.Companion.parseHex_61zpoe$('#E9E9E9');\n this.VALUES_0 = (new ThemeValuesBase()).plus_x7u0o8$(mapOf([to(ThemeOption_getInstance().LINE, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().RECT, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().TEXT, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().PANEL_BKGR_RECT, mapOf([to(ThemeOption$Elem_getInstance().FILL, this.PANEL_BACKGROUND_0), to(ThemeOption$Elem_getInstance().SIZE, 0.0)])), to(ThemeOption_getInstance().PANEL_GRID, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.PLOT_BACKGROUND_0))), to(ThemeOption_getInstance().PANEL_GRID_MAJOR, mapOf_0(to(ThemeOption$Elem_getInstance().SIZE, 1.4))), to(ThemeOption_getInstance().PANEL_GRID_MINOR, mapOf_0(to(ThemeOption$Elem_getInstance().SIZE, 0.5))), to(ThemeOption_getInstance().AXIS, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().AXIS_LINE, ThemeOption_getInstance().ELEMENT_BLANK), to(ThemeOption_getInstance().AXIS_TICKS, mapOf_0(to(ThemeOption$Elem_getInstance().SIZE, 1.4))), to(ThemeOption_getInstance().AXIS_TOOLTIP, mapOf([to(ThemeOption$Elem_getInstance().COLOR, this.PLOT_BACKGROUND_0), to(ThemeOption$Elem_getInstance().FILL, this.DARK_GREY_0)])), to(ThemeOption_getInstance().FACET_STRIP_BGR_RECT, mapOf([to(ThemeOption$Elem_getInstance().FILL, this.STRIP_BACKGROUND_0), to(ThemeOption$Elem_getInstance().SIZE, 0.0)]))]));\n }\n ThemeValuesRGrey$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ThemeValuesRGrey$Companion_instance = null;\n function ThemeValuesRGrey$Companion_getInstance() {\n if (ThemeValuesRGrey$Companion_instance === null) {\n new ThemeValuesRGrey$Companion();\n }\n return ThemeValuesRGrey$Companion_instance;\n }\n ThemeValuesRGrey.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ThemeValuesRGrey',\n interfaces: [ThemeValues]\n };\n function ThemeValuesRLight() {\n ThemeValuesRLight$Companion_getInstance();\n ThemeValues.call(this, ThemeValuesRLight$Companion_getInstance().VALUES_0);\n }\n function ThemeValuesRLight$Companion() {\n ThemeValuesRLight$Companion_instance = this;\n this.PLOT_BACKGROUND_0 = Color.Companion.WHITE;\n this.PANEL_BORDER_0 = Color.Companion.parseHex_61zpoe$('#C9C9C9');\n this.STRIP_BACKGROUND_0 = Color.Companion.parseHex_61zpoe$('#D9D9D9');\n this.BLACK_0 = Color.Companion.parseHex_61zpoe$('#171717');\n this.DARK_GREY_0 = Color.Companion.parseHex_61zpoe$('#474747');\n this.LIGHT_GREY_0 = Color.Companion.parseHex_61zpoe$('#E9E9E9');\n this.VALUES_0 = (new ThemeValuesBase()).plus_x7u0o8$(mapOf([to(ThemeOption_getInstance().LINE, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().RECT, mapOf([to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0), to(ThemeOption$Elem_getInstance().FILL, this.LIGHT_GREY_0)])), to(ThemeOption_getInstance().TEXT, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().PANEL_BKGR_RECT, mapOf([to(ThemeOption$Elem_getInstance().FILL, this.PLOT_BACKGROUND_0), to(ThemeOption$Elem_getInstance().COLOR, this.PANEL_BORDER_0)])), to(ThemeOption_getInstance().PANEL_GRID, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.LIGHT_GREY_0))), to(ThemeOption_getInstance().AXIS_LINE, ThemeOption_getInstance().ELEMENT_BLANK), to(ThemeOption_getInstance().AXIS, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.PANEL_BORDER_0))), to(ThemeOption_getInstance().AXIS_TOOLTIP, mapOf([to(ThemeOption$Elem_getInstance().COLOR, this.PLOT_BACKGROUND_0), to(ThemeOption$Elem_getInstance().FILL, this.DARK_GREY_0)])), to(ThemeOption_getInstance().FACET_STRIP_BGR_RECT, mapOf([to(ThemeOption$Elem_getInstance().FILL, this.STRIP_BACKGROUND_0), to(ThemeOption$Elem_getInstance().SIZE, 0.0)]))]));\n }\n ThemeValuesRLight$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ThemeValuesRLight$Companion_instance = null;\n function ThemeValuesRLight$Companion_getInstance() {\n if (ThemeValuesRLight$Companion_instance === null) {\n new ThemeValuesRLight$Companion();\n }\n return ThemeValuesRLight$Companion_instance;\n }\n ThemeValuesRLight.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ThemeValuesRLight',\n interfaces: [ThemeValues]\n };\n function ThemeValuesRMinimal() {\n ThemeValuesRMinimal$Companion_getInstance();\n ThemeValues.call(this, ThemeValuesRMinimal$Companion_getInstance().VALUES_0);\n }\n function ThemeValuesRMinimal$Companion() {\n ThemeValuesRMinimal$Companion_instance = this;\n this.PLOT_BACKGROUND_0 = Color.Companion.WHITE;\n this.BLACK_0 = Color.Companion.parseHex_61zpoe$('#171717');\n this.DARK_GREY_0 = Color.Companion.parseHex_61zpoe$('#474747');\n this.LIGHT_GREY_0 = Color.Companion.parseHex_61zpoe$('#E9E9E9');\n this.VALUES_0 = (new ThemeValuesBase()).plus_x7u0o8$(mapOf([to(ThemeOption_getInstance().LINE, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().RECT, mapOf([to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0), to(ThemeOption$Elem_getInstance().FILL, this.LIGHT_GREY_0)])), to(ThemeOption_getInstance().TEXT, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().PANEL_BKGR_RECT, ThemeOption_getInstance().ELEMENT_BLANK), to(ThemeOption_getInstance().PANEL_GRID, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.LIGHT_GREY_0))), to(ThemeOption_getInstance().AXIS_LINE, ThemeOption_getInstance().ELEMENT_BLANK), to(ThemeOption_getInstance().AXIS_TICKS, ThemeOption_getInstance().ELEMENT_BLANK), to(ThemeOption_getInstance().AXIS, mapOf_0(to(ThemeOption$Elem_getInstance().COLOR, this.DARK_GREY_0))), to(ThemeOption_getInstance().AXIS_TOOLTIP, mapOf([to(ThemeOption$Elem_getInstance().COLOR, this.PLOT_BACKGROUND_0), to(ThemeOption$Elem_getInstance().FILL, this.DARK_GREY_0)])), to(ThemeOption_getInstance().FACET_STRIP_BGR_RECT, mapOf_0(to(ThemeOption$Elem_getInstance().BLANK, true)))]));\n }\n ThemeValuesRMinimal$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ThemeValuesRMinimal$Companion_instance = null;\n function ThemeValuesRMinimal$Companion_getInstance() {\n if (ThemeValuesRMinimal$Companion_instance === null) {\n new ThemeValuesRMinimal$Companion();\n }\n return ThemeValuesRMinimal$Companion_instance;\n }\n ThemeValuesRMinimal.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ThemeValuesRMinimal',\n interfaces: [ThemeValues]\n };\n function MouseEventPeer() {\n this.myEventHandlers_0 = HashMap_init();\n this.myEventSources_0 = ArrayList_init();\n this.mySourceRegistrations_0 = HashMap_init();\n }\n function MouseEventPeer$addEventHandler$ObjectLiteral(closure$addReg, this$MouseEventPeer, closure$eventSpec) {\n this.closure$addReg = closure$addReg;\n this.this$MouseEventPeer = this$MouseEventPeer;\n this.closure$eventSpec = closure$eventSpec;\n Registration.call(this);\n }\n MouseEventPeer$addEventHandler$ObjectLiteral.prototype.doRemove = function () {\n var tmp$;\n (tmp$ = this.closure$addReg) != null ? (tmp$.remove(), Unit) : null;\n if (ensureNotNull(this.this$MouseEventPeer.myEventHandlers_0.get_11rb$(this.closure$eventSpec)).isEmpty) {\n this.this$MouseEventPeer.myEventHandlers_0.remove_11rb$(this.closure$eventSpec);\n this.this$MouseEventPeer.onRemoveSpec_0(this.closure$eventSpec);\n }\n };\n MouseEventPeer$addEventHandler$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [Registration]\n };\n MouseEventPeer.prototype.addEventHandler_mfdhbe$ = function (eventSpec, eventHandler) {\n var tmp$;\n if (!this.myEventHandlers_0.containsKey_11rb$(eventSpec)) {\n var $receiver = this.myEventHandlers_0;\n var value = new Listeners();\n $receiver.put_xwzc9p$(eventSpec, value);\n this.onAddSpec_0(eventSpec);\n }\n var addReg = (tmp$ = this.myEventHandlers_0.get_11rb$(eventSpec)) != null ? tmp$.add_11rb$(eventHandler) : null;\n return new MouseEventPeer$addEventHandler$ObjectLiteral(addReg, this, eventSpec);\n };\n function MouseEventPeer$dispatch$ObjectLiteral(closure$mouseEvent) {\n this.closure$mouseEvent = closure$mouseEvent;\n }\n MouseEventPeer$dispatch$ObjectLiteral.prototype.call_11rb$ = function (l) {\n l.onEvent_11rb$(this.closure$mouseEvent);\n };\n MouseEventPeer$dispatch$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [ListenerCaller]\n };\n MouseEventPeer.prototype.dispatch_w7zfbj$ = function (eventSpec, mouseEvent) {\n var tmp$;\n if (this.myEventHandlers_0.containsKey_11rb$(eventSpec)) {\n (tmp$ = this.myEventHandlers_0.get_11rb$(eventSpec)) != null ? (tmp$.fire_kucmxw$(new MouseEventPeer$dispatch$ObjectLiteral(mouseEvent)), Unit) : null;\n }\n };\n MouseEventPeer.prototype.addEventSource_u4bej9$ = function (eventSource) {\n var tmp$;\n tmp$ = this.myEventHandlers_0.keys.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n this.startHandleSpecInSource_0(eventSource, element);\n }\n this.myEventSources_0.add_11rb$(eventSource);\n };\n MouseEventPeer.prototype.onAddSpec_0 = function (eventSpec) {\n var tmp$;\n tmp$ = this.myEventSources_0.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n this.startHandleSpecInSource_0(element, eventSpec);\n }\n };\n function MouseEventPeer$startHandleSpecInSource$ObjectLiteral(closure$eventSpec, this$MouseEventPeer) {\n this.closure$eventSpec = closure$eventSpec;\n this.this$MouseEventPeer = this$MouseEventPeer;\n }\n MouseEventPeer$startHandleSpecInSource$ObjectLiteral.prototype.onEvent_11rb$ = function (event) {\n this.this$MouseEventPeer.dispatch_w7zfbj$(this.closure$eventSpec, event);\n };\n MouseEventPeer$startHandleSpecInSource$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [EventHandler]\n };\n MouseEventPeer.prototype.startHandleSpecInSource_0 = function (eventSource, eventSpec) {\n var tmp$;\n var registration = eventSource.addEventHandler_mfdhbe$(eventSpec, new MouseEventPeer$startHandleSpecInSource$ObjectLiteral(eventSpec, this));\n if (!this.mySourceRegistrations_0.containsKey_11rb$(eventSpec)) {\n var $receiver = this.mySourceRegistrations_0;\n var value = new CompositeRegistration([]);\n $receiver.put_xwzc9p$(eventSpec, value);\n }\n (tmp$ = this.mySourceRegistrations_0.get_11rb$(eventSpec)) != null ? tmp$.add_3xv6fb$(registration) : null;\n };\n MouseEventPeer.prototype.onRemoveSpec_0 = function (eventSpec) {\n var tmp$;\n if (this.mySourceRegistrations_0.containsKey_11rb$(eventSpec)) {\n (tmp$ = this.mySourceRegistrations_0.remove_11rb$(eventSpec)) != null ? (tmp$.dispose(), Unit) : null;\n }\n };\n MouseEventPeer.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'MouseEventPeer',\n interfaces: [MouseEventSource]\n };\n function BogusFrameOfReference() {\n }\n BogusFrameOfReference.prototype.drawBeforeGeomLayer_8icvvv$ = function (parent) {\n throw IllegalStateException_init('Bogus frame of reference is not supposed to be used.');\n };\n BogusFrameOfReference.prototype.drawAfterGeomLayer_8icvvv$ = function (parent) {\n throw IllegalStateException_init('Bogus frame of reference is not supposed to be used.');\n };\n BogusFrameOfReference.prototype.buildGeomComponent_ge0scz$ = function (layer, targetCollector) {\n throw IllegalStateException_init('Bogus frame of reference is not supposed to be used.');\n };\n BogusFrameOfReference.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'BogusFrameOfReference',\n interfaces: [FrameOfReference]\n };\n function BogusFrameOfReferenceProvider() {\n this.hAxisLabel_8fd9ly$_0 = null;\n this.vAxisLabel_ik0xv8$_0 = null;\n this.flipAxis_wnu2cd$_0 = false;\n }\n Object.defineProperty(BogusFrameOfReferenceProvider.prototype, 'hAxisLabel', {\n configurable: true,\n get: function () {\n return this.hAxisLabel_8fd9ly$_0;\n }\n });\n Object.defineProperty(BogusFrameOfReferenceProvider.prototype, 'vAxisLabel', {\n configurable: true,\n get: function () {\n return this.vAxisLabel_ik0xv8$_0;\n }\n });\n Object.defineProperty(BogusFrameOfReferenceProvider.prototype, 'flipAxis', {\n configurable: true,\n get: function () {\n return this.flipAxis_wnu2cd$_0;\n }\n });\n BogusFrameOfReferenceProvider.prototype.createTileLayoutProvider = function () {\n throw IllegalStateException_init('Bogus frame of reference provider is not supposed to be used.');\n };\n BogusFrameOfReferenceProvider.prototype.createTileFrame_sd8y8$$default = function (layoutInfo, coordProvider, debugDrawing) {\n return new BogusFrameOfReference();\n };\n BogusFrameOfReferenceProvider.prototype.createMarginalFrames_sd8y8$ = function (tileLayoutInfo, coordProvider, debugDrawing) {\n return emptyMap();\n };\n BogusFrameOfReferenceProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'BogusFrameOfReferenceProvider',\n interfaces: [FrameOfReferenceProvider]\n };\n function MarginalFrameOfReference(geomBounds, adjustedDomain, coord, isDebugDrawing) {\n this.geomBounds_0 = geomBounds;\n this.adjustedDomain_0 = adjustedDomain;\n this.coord_0 = coord;\n this.isDebugDrawing_0 = isDebugDrawing;\n }\n MarginalFrameOfReference.prototype.drawBeforeGeomLayer_8icvvv$ = function (parent) {\n };\n MarginalFrameOfReference.prototype.drawAfterGeomLayer_8icvvv$ = function (parent) {\n if (this.isDebugDrawing_0) {\n var $receiver = SvgRectElement_init(this.geomBounds_0);\n $receiver.strokeColor().set_11rb$(Color.Companion.ORANGE);\n $receiver.fillColor().set_11rb$(Color.Companion.ORANGE);\n $receiver.strokeWidth().set_11rb$(0.0);\n $receiver.fillOpacity().set_11rb$(0.5);\n parent.add_26jijc$($receiver);\n }\n };\n MarginalFrameOfReference.prototype.buildGeomComponent_ge0scz$ = function (layer, targetCollector) {\n var layerComponent = SquareFrameOfReference$Companion_getInstance().buildGeom_y8ndk1$(layer, this.adjustedDomain_0, this.coord_0, false, targetCollector);\n layerComponent.moveTo_gpjtzr$(this.geomBounds_0.origin);\n layerComponent.clipBounds_wthzt5$(new DoubleRectangle(DoubleVector.Companion.ZERO, this.geomBounds_0.dimension));\n return layerComponent;\n };\n MarginalFrameOfReference.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'MarginalFrameOfReference',\n interfaces: [FrameOfReference]\n };\n function SquareFrameOfReference(hScaleBreaks, vScaleBreaks, adjustedDomain, coord, layoutInfo, marginsLayout, theme, flipAxis) {\n SquareFrameOfReference$Companion_getInstance();\n this.hScaleBreaks_0 = hScaleBreaks;\n this.vScaleBreaks_0 = vScaleBreaks;\n this.adjustedDomain_0 = adjustedDomain;\n this.coord_0 = coord;\n this.layoutInfo_0 = layoutInfo;\n this.marginsLayout_0 = marginsLayout;\n this.theme_0 = theme;\n this.flipAxis_0 = flipAxis;\n this.isDebugDrawing = false;\n }\n SquareFrameOfReference.prototype.drawBeforeGeomLayer_8icvvv$ = function (parent) {\n this.drawPanelAndAxis_0(parent, true);\n };\n SquareFrameOfReference.prototype.drawAfterGeomLayer_8icvvv$ = function (parent) {\n this.drawPanelAndAxis_0(parent, false);\n };\n SquareFrameOfReference.prototype.drawPanelAndAxis_0 = function (parent, beforeGeomLayer) {\n var tmp$, tmp$_0;\n var geomBounds = this.layoutInfo_0.geomInnerBounds;\n var geomOuterBounds = this.layoutInfo_0.geomOuterBounds;\n var panelTheme = this.theme_0.panel();\n var hAxisTheme = this.theme_0.horizontalAxis_6taknv$(this.flipAxis_0);\n var vAxisTheme = this.theme_0.verticalAxis_6taknv$(this.flipAxis_0);\n var hGridTheme = panelTheme.gridX_6taknv$(this.flipAxis_0);\n var vGridTheme = panelTheme.gridY_6taknv$(this.flipAxis_0);\n var drawPanel = panelTheme.showRect() && beforeGeomLayer;\n var drawPanelBorder = panelTheme.showBorder() && !beforeGeomLayer;\n var drawGridlines = beforeGeomLayer;\n if (beforeGeomLayer)\n tmp$ = !hAxisTheme.isOntop();\n else\n tmp$ = hAxisTheme.isOntop();\n var drawHAxis = tmp$;\n if (beforeGeomLayer)\n tmp$_0 = !vAxisTheme.isOntop();\n else\n tmp$_0 = vAxisTheme.isOntop();\n var drawVAxis = tmp$_0;\n if (drawPanel) {\n var panel = SquareFrameOfReference$Companion_getInstance().buildPanelComponent_0(geomBounds, panelTheme);\n parent.add_26jijc$(panel);\n }\n if (drawHAxis || drawGridlines) {\n var axisInfo = ensureNotNull(this.layoutInfo_0.hAxisInfo);\n var hAxis = SquareFrameOfReference$Companion_getInstance().buildAxis_0(this.hScaleBreaks_0, axisInfo, !drawHAxis, !this.layoutInfo_0.hAxisShown, !drawGridlines, this.coord_0, this.flipAxis_0, hAxisTheme, hGridTheme, geomBounds.height, SquareFrameOfReference$Companion_getInstance().gridLineDistance_0(geomBounds, geomOuterBounds, axisInfo.orientation), this.isDebugDrawing);\n var axisOrigin = this.marginsLayout_0.toAxisOrigin_gdlhkh$(geomBounds, axisInfo.orientation);\n hAxis.moveTo_gpjtzr$(axisOrigin);\n parent.add_8icvvv$(hAxis);\n }\n if (drawVAxis || drawGridlines) {\n var axisInfo_0 = ensureNotNull(this.layoutInfo_0.vAxisInfo);\n var vAxis = SquareFrameOfReference$Companion_getInstance().buildAxis_0(this.vScaleBreaks_0, axisInfo_0, !drawVAxis, !this.layoutInfo_0.vAxisShown, !drawGridlines, this.coord_0, this.flipAxis_0, vAxisTheme, vGridTheme, geomBounds.width, SquareFrameOfReference$Companion_getInstance().gridLineDistance_0(geomBounds, geomOuterBounds, axisInfo_0.orientation), this.isDebugDrawing);\n var axisOrigin_0 = this.marginsLayout_0.toAxisOrigin_gdlhkh$(geomBounds, axisInfo_0.orientation);\n vAxis.moveTo_gpjtzr$(axisOrigin_0);\n parent.add_8icvvv$(vAxis);\n }\n if (drawPanelBorder) {\n var panelBorder = SquareFrameOfReference$Companion_getInstance().buildPanelBorderComponent_0(geomBounds, panelTheme);\n parent.add_26jijc$(panelBorder);\n }\n if (this.isDebugDrawing && !beforeGeomLayer) {\n this.drawDebugShapes_0(parent, geomBounds);\n }\n };\n SquareFrameOfReference.prototype.drawDebugShapes_0 = function (parent, geomBounds) {\n var tileBounds = this.layoutInfo_0.bounds;\n var rect = SvgRectElement_init(tileBounds);\n rect.fillColor().set_11rb$(Color.Companion.BLACK);\n rect.strokeWidth().set_11rb$(0.0);\n rect.fillOpacity().set_11rb$(0.1);\n parent.add_26jijc$(rect);\n var rect_0 = SvgRectElement_init(geomBounds);\n rect_0.fillColor().set_11rb$(Color.Companion.PINK);\n rect_0.strokeWidth().set_11rb$(1.0);\n rect_0.fillOpacity().set_11rb$(0.5);\n parent.add_26jijc$(rect_0);\n };\n SquareFrameOfReference.prototype.buildGeomComponent_ge0scz$ = function (layer, targetCollector) {\n var layerComponent = SquareFrameOfReference$Companion_getInstance().buildGeom_y8ndk1$(layer, this.adjustedDomain_0, this.coord_0, this.flipAxis_0, targetCollector);\n var geomBounds = this.layoutInfo_0.geomInnerBounds;\n layerComponent.moveTo_gpjtzr$(geomBounds.origin);\n layerComponent.clipBounds_wthzt5$(new DoubleRectangle(DoubleVector.Companion.ZERO, geomBounds.dimension));\n return layerComponent;\n };\n function SquareFrameOfReference$Companion() {\n SquareFrameOfReference$Companion_instance = this;\n }\n function SquareFrameOfReference$Companion$buildAxis$drawDebugRect(closure$axis) {\n return function (r, color) {\n var rect = SvgRectElement_init(r);\n rect.strokeColor().set_11rb$(color);\n rect.strokeWidth().set_11rb$(1.0);\n rect.fillOpacity().set_11rb$(0.0);\n closure$axis.add_26jijc$(rect);\n };\n }\n SquareFrameOfReference$Companion.prototype.buildAxis_0 = function (scaleBreaks, info, hideAxis, hideAxisBreaks, hideGridlines, coord, flipAxis, axisTheme, gridTheme, gridLineLength, gridLineDistance, isDebugDrawing) {\n var tmp$;\n if (!!(hideAxis && hideGridlines)) {\n var message = 'Trying to build an empty axis component';\n throw IllegalStateException_init(message.toString());\n }\n var orientation = info.orientation;\n var labelAdjustments = new AxisComponent$TickLabelAdjustments(orientation, info.tickLabelHorizontalAnchor, info.tickLabelVerticalAnchor, info.tickLabelRotationAngle, info.tickLabelAdditionalOffsets);\n var breaksData = AxisUtil_getInstance().breaksData_zh7dbf$(scaleBreaks, coord, flipAxis, orientation.isHorizontal);\n var axis = new AxisComponent(info.axisLength, orientation, breaksData, labelAdjustments, gridLineLength, gridLineDistance, axisTheme, gridTheme, hideAxis, hideAxisBreaks, hideGridlines);\n if (isDebugDrawing) {\n var drawDebugRect = SquareFrameOfReference$Companion$buildAxis$drawDebugRect(axis);\n drawDebugRect(info.tickLabelsBounds, Color.Companion.GREEN);\n if ((tmp$ = info.tickLabelsTextBounds_8be2vx$) != null) {\n drawDebugRect(tmp$, Color.Companion.LIGHT_BLUE);\n }\n }\n return axis;\n };\n SquareFrameOfReference$Companion.prototype.buildPanelComponent_0 = function (bounds, theme) {\n var $receiver = SvgRectElement_init(bounds);\n $receiver.strokeColor().set_11rb$(theme.rectColor());\n $receiver.strokeWidth().set_11rb$(theme.rectStrokeWidth());\n $receiver.fillColor().set_11rb$(theme.rectFill());\n return $receiver;\n };\n SquareFrameOfReference$Companion.prototype.buildPanelBorderComponent_0 = function (bounds, theme) {\n var $receiver = SvgRectElement_init(bounds);\n $receiver.strokeColor().set_11rb$(theme.borderColor());\n $receiver.strokeWidth().set_11rb$(theme.borderWidth());\n $receiver.fillOpacity().set_11rb$(0.0);\n return $receiver;\n };\n SquareFrameOfReference$Companion.prototype.buildGeom_y8ndk1$ = function (layer, xyAesBounds, coord, flippedAxis, targetCollector) {\n var tmp$, tmp$_0;\n var rendererData = LayerRendererUtil_getInstance().createLayerRendererData_sqg2xh$(layer);\n var flippedAxis_0 = layer.isYOrientation ? !flippedAxis : flippedAxis;\n var aestheticMappers = rendererData.aestheticMappers;\n var aesthetics = rendererData.aesthetics;\n tmp$ = layer.isYOrientation;\n if (tmp$ === true)\n tmp$_0 = coord.flip();\n else if (tmp$ === false)\n tmp$_0 = coord;\n else\n tmp$_0 = Kotlin.noWhenBranchMatched();\n var coord_0 = tmp$_0;\n var block$result;\n if (flippedAxis_0) {\n block$result = targetCollector.withFlippedAxis();\n } else {\n block$result = targetCollector;\n }\n var it = block$result;\n var block$result_0;\n if (layer.isYOrientation) {\n block$result_0 = it.withYOrientation();\n } else {\n block$result_0 = it;\n }\n var targetCollector_0 = block$result_0;\n var ctx = GeomContextBuilder_init().flipped_6taknv$(flippedAxis_0).aesthetics_m7huy5$(aesthetics).aestheticMappers_yu359v$(aestheticMappers).aesBounds_wthzt5$(xyAesBounds).geomTargetCollector_xrq6q$(targetCollector_0).fontFamilyRegistry_exm2t6$(layer.fontFamilyRegistry).annotations_dq13fv$(rendererData.annotations).build();\n var pos = rendererData.pos;\n var geom = layer.geom;\n return new SvgLayerRenderer(aesthetics, geom, pos, coord_0, ctx);\n };\n SquareFrameOfReference$Companion.prototype.gridLineDistance_0 = function (geomInnerBounds, geomOuterBounds, orientation) {\n var tmp$;\n switch (orientation.name) {\n case 'LEFT':\n tmp$ = geomInnerBounds.left - geomOuterBounds.left;\n break;\n case 'RIGHT':\n tmp$ = geomOuterBounds.right - geomInnerBounds.right;\n break;\n case 'TOP':\n tmp$ = geomInnerBounds.top - geomOuterBounds.top;\n break;\n case 'BOTTOM':\n tmp$ = geomOuterBounds.bottom - geomInnerBounds.bottom;\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n SquareFrameOfReference$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var SquareFrameOfReference$Companion_instance = null;\n function SquareFrameOfReference$Companion_getInstance() {\n if (SquareFrameOfReference$Companion_instance === null) {\n new SquareFrameOfReference$Companion();\n }\n return SquareFrameOfReference$Companion_instance;\n }\n SquareFrameOfReference.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'SquareFrameOfReference',\n interfaces: [FrameOfReference]\n };\n function SquareFrameOfReferenceProvider(hScaleProto, vScaleProto, adjustedDomain, flipAxis, hAxisOrientation, vAxisOrientation, theme, marginsLayout, domainByMargin) {\n this.hScaleProto_0 = hScaleProto;\n this.vScaleProto_0 = vScaleProto;\n this.adjustedDomain_0 = adjustedDomain;\n this.flipAxis_l96n6m$_0 = flipAxis;\n this.hAxisOrientation_0 = hAxisOrientation;\n this.vAxisOrientation_0 = vAxisOrientation;\n this.theme_0 = theme;\n this.marginsLayout_0 = marginsLayout;\n this.domainByMargin_0 = domainByMargin;\n this.hAxisSpec_0 = null;\n this.vAxisSpec_0 = null;\n this.hAxisSpec_0 = new SquareFrameOfReferenceProvider$AxisSpec(AxisBreaksProviderFactory$Companion_getInstance().forScale_iu85h4$(this.hScaleProto_0), this.hScaleProto_0.name, this.theme_0.horizontalAxis_6taknv$(this.flipAxis));\n this.vAxisSpec_0 = new SquareFrameOfReferenceProvider$AxisSpec(AxisBreaksProviderFactory$Companion_getInstance().forScale_iu85h4$(this.vScaleProto_0), this.vScaleProto_0.name, this.theme_0.verticalAxis_6taknv$(this.flipAxis));\n this.hAxisLabel_toxcwv$_0 = this.hAxisSpec_0.theme.showTitle() ? this.hAxisSpec_0.label : null;\n this.vAxisLabel_jk9onl$_0 = this.vAxisSpec_0.theme.showTitle() ? this.vAxisSpec_0.label : null;\n }\n Object.defineProperty(SquareFrameOfReferenceProvider.prototype, 'flipAxis', {\n get: function () {\n return this.flipAxis_l96n6m$_0;\n }\n });\n Object.defineProperty(SquareFrameOfReferenceProvider.prototype, 'hAxisLabel', {\n configurable: true,\n get: function () {\n return this.hAxisLabel_toxcwv$_0;\n }\n });\n Object.defineProperty(SquareFrameOfReferenceProvider.prototype, 'vAxisLabel', {\n configurable: true,\n get: function () {\n return this.vAxisLabel_jk9onl$_0;\n }\n });\n SquareFrameOfReferenceProvider.prototype.createTileLayoutProvider = function () {\n var hAxisLayout = new PlotAxisLayout(this.hAxisSpec_0.breaksProviderFactory, this.hAxisSpec_0.theme, this.hAxisOrientation_0);\n var vAxisLayout = new PlotAxisLayout(this.vAxisSpec_0.breaksProviderFactory, this.vAxisSpec_0.theme, this.vAxisOrientation_0);\n return new SquareFrameOfReferenceProvider$MyTileLayoutProvider(hAxisLayout, vAxisLayout, this.adjustedDomain_0, this.marginsLayout_0);\n };\n SquareFrameOfReferenceProvider.prototype.createTileFrame_sd8y8$$default = function (layoutInfo, coordProvider, debugDrawing) {\n var hAxisLayoutInfo = ensureNotNull(layoutInfo.hAxisInfo);\n var vAxisLayoutInfo = ensureNotNull(layoutInfo.vAxisInfo);\n var client = new DoubleVector(hAxisLayoutInfo.axisLength, vAxisLayoutInfo.axisLength);\n var coord = coordProvider.createCoordinateSystem_26v79i$(this.adjustedDomain_0, client);\n var hScale = this.hScaleProto_0.with().breaks_pqjuzw$(hAxisLayoutInfo.axisBreaks.domainValues).labels_mhpeer$(hAxisLayoutInfo.axisBreaks.labels).build();\n var vScale = this.vScaleProto_0.with().breaks_pqjuzw$(vAxisLayoutInfo.axisBreaks.domainValues).labels_mhpeer$(vAxisLayoutInfo.axisBreaks.labels).build();\n var tileFrameOfReference = new SquareFrameOfReference(hScale.getScaleBreaks(), vScale.getScaleBreaks(), this.adjustedDomain_0, coord, layoutInfo, this.marginsLayout_0, this.theme_0, this.flipAxis);\n tileFrameOfReference.isDebugDrawing = debugDrawing;\n return tileFrameOfReference;\n };\n SquareFrameOfReferenceProvider.prototype.createMarginalFrames_sd8y8$ = function (tileLayoutInfo, coordProvider, debugDrawing) {\n if (this.domainByMargin_0.isEmpty()) {\n return emptyMap();\n }\n if (!!coordProvider.flipped) {\n var message = '`flipped` corrdinate system is not supported on plots with marginal layers.';\n throw IllegalStateException_init(message.toString());\n }\n var inner = tileLayoutInfo.geomInnerBounds;\n var outer = tileLayoutInfo.geomOuterBounds;\n var origins = mapOf([to(MarginSide$LEFT_getInstance(), new DoubleVector(outer.left, inner.top)), to(MarginSide$TOP_getInstance(), new DoubleVector(inner.left, outer.top)), to(MarginSide$RIGHT_getInstance(), new DoubleVector(inner.right, inner.top)), to(MarginSide$BOTTOM_getInstance(), new DoubleVector(inner.left, inner.bottom))]);\n var tmp$ = MarginSide$LEFT_getInstance();\n var b = inner.left - outer.left;\n var tmp$_0 = to(tmp$, new DoubleVector(JsMath.max(0.0, b), inner.height));\n var tmp$_1 = MarginSide$TOP_getInstance();\n var tmp$_2 = inner.width;\n var b_0 = inner.top - outer.top;\n var tmp$_3 = to(tmp$_1, new DoubleVector(tmp$_2, JsMath.max(0.0, b_0)));\n var tmp$_4 = MarginSide$RIGHT_getInstance();\n var b_1 = outer.right - inner.right;\n var tmp$_5 = to(tmp$_4, new DoubleVector(JsMath.max(0.0, b_1), inner.height));\n var tmp$_6 = MarginSide$BOTTOM_getInstance();\n var tmp$_7 = inner.width;\n var b_2 = outer.bottom - inner.bottom;\n var sizes = mapOf([tmp$_0, tmp$_3, tmp$_5, to(tmp$_6, new DoubleVector(tmp$_7, JsMath.max(0.0, b_2)))]);\n var destination = LinkedHashMap_init_0(mapCapacity(origins.size));\n var tmp$_8;\n tmp$_8 = origins.entries.iterator();\n while (tmp$_8.hasNext()) {\n var element = tmp$_8.next();\n var tmp$_9 = destination.put_xwzc9p$;\n var tmp$_10 = element.key;\n var margin = element.key;\n var origin = element.value;\n tmp$_9.call(destination, tmp$_10, new DoubleRectangle(origin, getValue(sizes, margin)));\n }\n var boundsByMargin = destination;\n var hAxisLayoutInfo = ensureNotNull(tileLayoutInfo.hAxisInfo);\n var vAxisLayoutInfo = ensureNotNull(tileLayoutInfo.vAxisInfo);\n var $receiver = this.domainByMargin_0;\n var destination_0 = LinkedHashMap_init_0(mapCapacity($receiver.size));\n var tmp$_11;\n tmp$_11 = $receiver.entries.iterator();\n while (tmp$_11.hasNext()) {\n var element_0 = tmp$_11.next();\n var tmp$_12 = destination_0.put_xwzc9p$;\n var tmp$_13 = element_0.key;\n var side = element_0.key;\n var domain = element_0.value;\n var tmp$_14, tmp$_15;\n switch (side.name) {\n case 'LEFT':\n case 'RIGHT':\n tmp$_14 = domain;\n break;\n case 'TOP':\n case 'BOTTOM':\n tmp$_14 = hAxisLayoutInfo.axisDomain;\n break;\n default:\n tmp$_14 = Kotlin.noWhenBranchMatched();\n break;\n }\n var hDomain = tmp$_14;\n switch (side.name) {\n case 'LEFT':\n case 'RIGHT':\n tmp$_15 = vAxisLayoutInfo.axisDomain;\n break;\n case 'TOP':\n case 'BOTTOM':\n tmp$_15 = domain;\n break;\n default:\n tmp$_15 = Kotlin.noWhenBranchMatched();\n break;\n }\n var vDomain = tmp$_15;\n var marginCoordProvider = new MarginalLayerCoordProvider();\n var clientSize = getValue(sizes, side);\n var adjustedDomain = DoubleRectangle_init_0(hDomain, vDomain);\n var coord = marginCoordProvider.createCoordinateSystem_26v79i$(adjustedDomain, clientSize);\n tmp$_12.call(destination_0, tmp$_13, new MarginalFrameOfReference(getValue(boundsByMargin, side), adjustedDomain, coord, debugDrawing));\n }\n return destination_0;\n };\n function SquareFrameOfReferenceProvider$AxisSpec(breaksProviderFactory, label, theme) {\n this.breaksProviderFactory = breaksProviderFactory;\n this.label = label;\n this.theme = theme;\n }\n SquareFrameOfReferenceProvider$AxisSpec.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'AxisSpec',\n interfaces: []\n };\n function SquareFrameOfReferenceProvider$MyTileLayoutProvider(hAxisLayout, vAxisLayout, adjustedDomain, marginsLayout) {\n this.hAxisLayout_0 = hAxisLayout;\n this.vAxisLayout_0 = vAxisLayout;\n this.adjustedDomain_0 = adjustedDomain;\n this.marginsLayout_0 = marginsLayout;\n }\n SquareFrameOfReferenceProvider$MyTileLayoutProvider.prototype.createTopDownTileLayout = function () {\n return new TopDownTileLayout(this.hAxisLayout_0, this.vAxisLayout_0, this.adjustedDomain_0.xRange(), this.adjustedDomain_0.yRange(), this.marginsLayout_0);\n };\n SquareFrameOfReferenceProvider$MyTileLayoutProvider.prototype.createInsideOutTileLayout = function () {\n return new InsideOutTileLayout(this.hAxisLayout_0, this.vAxisLayout_0, this.adjustedDomain_0.xRange(), this.adjustedDomain_0.yRange(), this.marginsLayout_0);\n };\n SquareFrameOfReferenceProvider$MyTileLayoutProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'MyTileLayoutProvider',\n interfaces: [TileLayoutProvider]\n };\n SquareFrameOfReferenceProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'SquareFrameOfReferenceProvider',\n interfaces: [FrameOfReferenceProvider]\n };\n function AxisComponent(length, orientation, breaksData, labelAdjustments, gridLineLength, gridLineDistance, axisTheme, gridTheme, hideAxis, hideAxisBreaks, hideGridlines) {\n if (labelAdjustments === void 0)\n labelAdjustments = new AxisComponent$TickLabelAdjustments(orientation);\n if (hideAxis === void 0)\n hideAxis = false;\n if (hideAxisBreaks === void 0)\n hideAxisBreaks = false;\n if (hideGridlines === void 0)\n hideGridlines = false;\n SvgComponent.call(this);\n this.length_0 = length;\n this.orientation_0 = orientation;\n this.breaksData_0 = breaksData;\n this.labelAdjustments_0 = labelAdjustments;\n this.gridLineLength_0 = gridLineLength;\n this.gridLineDistance_0 = gridLineDistance;\n this.axisTheme_0 = axisTheme;\n this.gridTheme_0 = gridTheme;\n this.hideAxis_0 = hideAxis;\n this.hideAxisBreaks_0 = hideAxisBreaks;\n this.hideGridlines_0 = hideGridlines;\n }\n AxisComponent.prototype.buildComponent = function () {\n this.buildAxis_0();\n };\n AxisComponent.prototype.buildAxis_0 = function () {\n var tmp$, tmp$_0;\n var rootElement = this.rootGroup;\n var x1;\n var y1;\n var x2;\n var y2;\n var start = 0.0;\n var end = this.length_0;\n switch (this.orientation_0.name) {\n case 'LEFT':\n case 'RIGHT':\n x1 = 0.0;\n x2 = 0.0;\n y1 = start;\n y2 = end;\n break;\n case 'TOP':\n case 'BOTTOM':\n x1 = start;\n x2 = end;\n y1 = 0.0;\n y2 = 0.0;\n break;\n default:\n Kotlin.noWhenBranchMatched();\n break;\n }\n if (!this.hideGridlines_0) {\n var gridLineMinPos = start + 6;\n var gridLineMaxPos = end - 6;\n if (this.gridTheme_0.showMinor()) {\n tmp$ = this.breaksData_0.minorBreaks.iterator();\n while (tmp$.hasNext()) {\n var br = tmp$.next();\n if (br >= gridLineMinPos && br <= gridLineMaxPos) {\n var elem = this.buildGridLine_0(br, this.gridTheme_0.minorLineWidth(), this.gridTheme_0.minorLineColor());\n rootElement.children().add_11rb$(elem);\n }\n }\n }\n if (this.gridTheme_0.showMajor()) {\n tmp$_0 = this.breaksData_0.majorBreaks.iterator();\n while (tmp$_0.hasNext()) {\n var br_0 = tmp$_0.next();\n if (br_0 >= gridLineMinPos && br_0 <= gridLineMaxPos) {\n var elem_0 = this.buildGridLine_0(br_0, this.gridTheme_0.majorLineWidth(), this.gridTheme_0.majorLineColor());\n rootElement.children().add_11rb$(elem_0);\n }\n }\n }\n }\n if (!this.hideAxis_0) {\n if (!this.hideAxisBreaks_0 && (this.axisTheme_0.showLabels() || this.axisTheme_0.showTickMarks())) {\n var labelsCleaner = new AxisComponent$TickLabelsCleaner(this.orientation_0.isHorizontal);\n var i = 0;\n for (var tmp$_1 = this.breaksData_0.majorBreaks.iterator(); tmp$_1.hasNext(); ++i) {\n var br_1 = tmp$_1.next();\n if (br_1 >= start && br_1 <= end) {\n var label = this.breaksData_0.majorLabels.get_za3lpa$(i % this.breaksData_0.majorLabels.size | 0);\n var labelOffset = this.tickLabelBaseOffset_0().add_gpjtzr$(this.labelAdjustments_0.additionalOffset_za3lpa$(i));\n var group = this.buildTick_0(label, labelOffset, !labelsCleaner.beforeAddLabel_yvo9jy$(br_1, this.labelAdjustments_0.rotationDegree, PlotLabelSpecFactory_getInstance().axisTick_9yvfuv$(this.axisTheme_0).height()), this.axisTheme_0);\n switch (this.orientation_0.name) {\n case 'LEFT':\n case 'RIGHT':\n svg_0.SvgUtils.transformTranslate_pw34rw$(group, 0.0, br_1);\n break;\n case 'TOP':\n case 'BOTTOM':\n svg_0.SvgUtils.transformTranslate_pw34rw$(group, br_1, 0.0);\n break;\n }\n rootElement.children().add_11rb$(group);\n }\n }\n }\n if (!this.hideAxisBreaks_0 && this.axisTheme_0.showLine()) {\n var $receiver = SvgLineElement_init(x1, y1, x2, y2);\n $receiver.strokeWidth().set_11rb$(this.axisTheme_0.lineWidth());\n $receiver.strokeColor().set_11rb$(this.axisTheme_0.lineColor());\n var axisLine = $receiver;\n rootElement.children().add_11rb$(axisLine);\n }\n }\n };\n AxisComponent.prototype.buildGridLine_0 = function (br, width, color) {\n var tmp$;\n var start = this.gridLineDistance_0;\n var end = start + this.gridLineLength_0;\n switch (this.orientation_0.name) {\n case 'LEFT':\n tmp$ = SvgLineElement_init(start, 0.0, end, 0.0);\n break;\n case 'RIGHT':\n tmp$ = SvgLineElement_init(-start, 0.0, -end, 0.0);\n break;\n case 'TOP':\n tmp$ = SvgLineElement_init(0.0, start, 0.0, end);\n break;\n case 'BOTTOM':\n tmp$ = SvgLineElement_init(0.0, -start, 0.0, -end);\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n var elem = tmp$;\n elem.strokeColor().set_11rb$(color);\n elem.strokeWidth().set_11rb$(width);\n switch (this.orientation_0.name) {\n case 'LEFT':\n case 'RIGHT':\n elem.y1().set_11rb$(br);\n elem.y2().set_11rb$(br);\n break;\n case 'TOP':\n case 'BOTTOM':\n elem.x1().set_11rb$(br);\n elem.x2().set_11rb$(br);\n break;\n }\n return elem;\n };\n AxisComponent.prototype.buildTick_0 = function (label, labelOffset, skipLabel, axisTheme) {\n var tickMark = null;\n if (axisTheme.showTickMarks()) {\n tickMark = new SvgLineElement();\n tickMark.strokeWidth().set_11rb$(axisTheme.tickMarkWidth());\n tickMark.strokeColor().set_11rb$(axisTheme.tickMarkColor());\n }\n var tickLabel = null;\n if (!skipLabel && axisTheme.showLabels()) {\n tickLabel = new TextLabel(label);\n tickLabel.addClassName_61zpoe$(Style_getInstance().AXIS_TEXT + '-' + axisTheme.axis);\n }\n var markLength = axisTheme.tickMarkLength();\n switch (this.orientation_0.name) {\n case 'LEFT':\n if (tickMark != null) {\n tickMark.x2().set_11rb$(-markLength);\n tickMark.y2().set_11rb$(0.0);\n }\n\n break;\n case 'RIGHT':\n if (tickMark != null) {\n tickMark.x2().set_11rb$(markLength);\n tickMark.y2().set_11rb$(0.0);\n }\n\n break;\n case 'TOP':\n if (tickMark != null) {\n tickMark.x2().set_11rb$(0.0);\n tickMark.y2().set_11rb$(-markLength);\n }\n\n break;\n case 'BOTTOM':\n if (tickMark != null) {\n tickMark.x2().set_11rb$(0.0);\n tickMark.y2().set_11rb$(markLength);\n }\n\n break;\n }\n var g = new SvgGElement();\n if (tickMark != null) {\n g.children().add_11rb$(tickMark);\n }\n if (tickLabel != null) {\n tickLabel.moveTo_lu1900$(labelOffset.x, labelOffset.y);\n tickLabel.setHorizontalAnchor_mf4siq$(this.labelAdjustments_0.horizontalAnchor);\n tickLabel.setVerticalAnchor_yaylw0$(this.labelAdjustments_0.verticalAnchor);\n tickLabel.rotate_14dthe$(this.labelAdjustments_0.rotationDegree);\n g.children().add_11rb$(tickLabel.rootGroup);\n }\n return g;\n };\n AxisComponent.prototype.tickLabelBaseOffset_0 = function () {\n var tmp$;\n var distance = this.axisTheme_0.tickLabelDistance_6taknv$(this.orientation_0.isHorizontal);\n switch (this.orientation_0.name) {\n case 'LEFT':\n tmp$ = new DoubleVector(this.axisTheme_0.tickLabelMargins().left - distance, 0.0);\n break;\n case 'RIGHT':\n tmp$ = new DoubleVector(distance - this.axisTheme_0.tickLabelMargins().right, 0.0);\n break;\n case 'TOP':\n tmp$ = new DoubleVector(0.0, this.axisTheme_0.tickLabelMargins().top - distance);\n break;\n case 'BOTTOM':\n tmp$ = new DoubleVector(0.0, distance - this.axisTheme_0.tickLabelMargins().bottom);\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n function AxisComponent$BreaksData(majorBreaks, majorLabels, minorBreaks) {\n if (minorBreaks === void 0)\n minorBreaks = null;\n this.majorBreaks = majorBreaks;\n this.majorLabels = majorLabels;\n var tmp$;\n if (minorBreaks != null)\n tmp$ = minorBreaks;\n else {\n var block$result;\n if (this.majorBreaks.size <= 1) {\n block$result = emptyList();\n } else {\n var $receiver = zip(this.majorBreaks.subList_vux9f0$(0, this.majorBreaks.size - 1 | 0), this.majorBreaks.subList_vux9f0$(1, this.majorBreaks.size));\n var tmp$_0;\n var accumulator = ArrayList_init();\n tmp$_0 = $receiver.iterator();\n while (tmp$_0.hasNext()) {\n var element = tmp$_0.next();\n var l = accumulator;\n l.add_11rb$((element.second - element.first) / 2 + element.first);\n accumulator = l;\n }\n var minorBreaks_0 = accumulator;\n var iterator = take(this.majorBreaks, 2).iterator();\n if (!iterator.hasNext())\n throw UnsupportedOperationException_init(\"Empty collection can't be reduced.\");\n var accumulator_0 = iterator.next();\n while (iterator.hasNext()) {\n var first_0 = accumulator_0;\n accumulator_0 = iterator.next() - first_0;\n }\n var $receiver_0 = accumulator_0;\n minorBreaks_0.add_wxm5ur$(0, first(minorBreaks_0) - $receiver_0);\n var iterator_0 = takeLast(this.majorBreaks, 2).iterator();\n if (!iterator_0.hasNext())\n throw UnsupportedOperationException_init(\"Empty collection can't be reduced.\");\n var accumulator_1 = iterator_0.next();\n while (iterator_0.hasNext()) {\n var first_1 = accumulator_1;\n accumulator_1 = iterator_0.next() - first_1;\n }\n var $receiver_1 = accumulator_1;\n minorBreaks_0.add_wxm5ur$(0, last(minorBreaks_0) + $receiver_1);\n block$result = minorBreaks_0;\n }\n tmp$ = block$result;\n }\n this.minorBreaks = tmp$;\n }\n AxisComponent$BreaksData.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'BreaksData',\n interfaces: []\n };\n function AxisComponent$TickLabelAdjustments(orientation, horizontalAnchor, verticalAnchor, rotationDegree, additionalOffsets) {\n if (horizontalAnchor === void 0)\n horizontalAnchor = null;\n if (verticalAnchor === void 0)\n verticalAnchor = null;\n if (rotationDegree === void 0)\n rotationDegree = 0.0;\n if (additionalOffsets === void 0)\n additionalOffsets = null;\n this.rotationDegree = rotationDegree;\n this.additionalOffsets_0 = additionalOffsets;\n var tmp$, tmp$_0;\n if (horizontalAnchor == null) {\n switch (orientation.name) {\n case 'LEFT':\n tmp$ = Text$HorizontalAnchor.RIGHT;\n break;\n case 'RIGHT':\n tmp$ = Text$HorizontalAnchor.LEFT;\n break;\n case 'TOP':\n case 'BOTTOM':\n tmp$ = Text$HorizontalAnchor.MIDDLE;\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n horizontalAnchor = tmp$;\n }\n this.horizontalAnchor = horizontalAnchor;\n if (verticalAnchor == null) {\n switch (orientation.name) {\n case 'LEFT':\n case 'RIGHT':\n tmp$_0 = Text$VerticalAnchor.CENTER;\n break;\n case 'TOP':\n tmp$_0 = Text$VerticalAnchor.BOTTOM;\n break;\n case 'BOTTOM':\n tmp$_0 = Text$VerticalAnchor.TOP;\n break;\n default:\n tmp$_0 = Kotlin.noWhenBranchMatched();\n break;\n }\n verticalAnchor = tmp$_0;\n }\n this.verticalAnchor = verticalAnchor;\n }\n AxisComponent$TickLabelAdjustments.prototype.additionalOffset_za3lpa$ = function (tickIndex) {\n var tmp$, tmp$_0;\n return (tmp$_0 = (tmp$ = this.additionalOffsets_0) != null ? tmp$.get_za3lpa$(tickIndex) : null) != null ? tmp$_0 : DoubleVector.Companion.ZERO;\n };\n AxisComponent$TickLabelAdjustments.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TickLabelAdjustments',\n interfaces: []\n };\n function AxisComponent$TickLabelsCleaner(horizontalAxis) {\n this.horizontalAxis = horizontalAxis;\n this.filledRanges_0 = ArrayList_init();\n }\n AxisComponent$TickLabelsCleaner.prototype.beforeAddLabel_yvo9jy$ = function (loc, rotationDegree, axisTickHeight) {\n if (!this.isRelevant_0(rotationDegree))\n return true;\n var $receiver = this.filledRanges_0;\n var any$result;\n any$break: do {\n var tmp$;\n if (Kotlin.isType($receiver, Collection) && $receiver.isEmpty()) {\n any$result = false;\n break any$break;\n }\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n if (element.contains_14dthe$(loc) || element.contains_14dthe$(loc + axisTickHeight)) {\n any$result = true;\n break any$break;\n }\n }\n any$result = false;\n }\n while (false);\n if (any$result) {\n return false;\n }\n this.filledRanges_0.add_11rb$(new DoubleSpan(loc, loc + axisTickHeight));\n return true;\n };\n AxisComponent$TickLabelsCleaner.prototype.isRelevant_0 = function (rotationDegree) {\n var tmp$;\n if (this.horizontalAxis)\n tmp$ = this.isVertical_0(rotationDegree);\n else\n tmp$ = this.isHorizontal_0(rotationDegree);\n return tmp$;\n };\n AxisComponent$TickLabelsCleaner.prototype.isHorizontal_0 = function (rotationDegree) {\n return rotationDegree % 180 === 0.0;\n };\n AxisComponent$TickLabelsCleaner.prototype.isVertical_0 = function (rotationDegree) {\n return rotationDegree / 90 % 2 === 1.0;\n };\n AxisComponent$TickLabelsCleaner.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TickLabelsCleaner',\n interfaces: []\n };\n AxisComponent.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'AxisComponent',\n interfaces: [SvgComponent]\n };\n function ColorBarComponent(spec) {\n LegendBox.call(this);\n this.spec_xr0de$_0 = spec;\n }\n Object.defineProperty(ColorBarComponent.prototype, 'spec', {\n get: function () {\n return this.spec_xr0de$_0;\n }\n });\n ColorBarComponent.prototype.appendGuideContent_26jijc$ = function (contentRoot) {\n var tmp$, tmp$_0;\n var layout = this.spec.layout;\n var guideBarGroup = new SvgGElement();\n var barBounds = layout.barBounds;\n var horizontal = layout.isHorizontal;\n this.addColorBar_0(guideBarGroup, this.spec.domain, this.spec.scaleMapper, this.spec.binCount, barBounds, layout.barLengthExpand, horizontal, this.spec.reverse);\n if (horizontal)\n tmp$ = barBounds.height;\n else\n tmp$ = barBounds.width;\n var barThickness = tmp$;\n var tickLength = barThickness / 5;\n var breakInfos = layout.breakInfos_8be2vx$.iterator();\n tmp$_0 = this.spec.breaks.labels.iterator();\n while (tmp$_0.hasNext()) {\n var brLabel = tmp$_0.next();\n var brInfo = breakInfos.next();\n var tickLocation = brInfo.tickLocation;\n var tickMarkPoints = ArrayList_init();\n if (horizontal) {\n var tickX = barBounds.left + tickLocation;\n tickMarkPoints.add_11rb$(new DoubleVector(tickX, barBounds.top));\n tickMarkPoints.add_11rb$(new DoubleVector(tickX, barBounds.top + tickLength));\n tickMarkPoints.add_11rb$(new DoubleVector(tickX, barBounds.bottom - tickLength));\n tickMarkPoints.add_11rb$(new DoubleVector(tickX, barBounds.bottom));\n } else {\n var tickY = barBounds.top + tickLocation;\n tickMarkPoints.add_11rb$(new DoubleVector(barBounds.left, tickY));\n tickMarkPoints.add_11rb$(new DoubleVector(barBounds.left + tickLength, tickY));\n tickMarkPoints.add_11rb$(new DoubleVector(barBounds.right - tickLength, tickY));\n tickMarkPoints.add_11rb$(new DoubleVector(barBounds.right, tickY));\n }\n this.addTickMark_0(guideBarGroup, tickMarkPoints.get_za3lpa$(0), tickMarkPoints.get_za3lpa$(1));\n this.addTickMark_0(guideBarGroup, tickMarkPoints.get_za3lpa$(2), tickMarkPoints.get_za3lpa$(3));\n var label = new TextLabel(brLabel);\n label.addClassName_61zpoe$(Style_getInstance().LEGEND_ITEM);\n label.setHorizontalAnchor_mf4siq$(brInfo.labelHorizontalAnchor);\n label.setVerticalAnchor_yaylw0$(brInfo.labelVerticalAnchor);\n label.moveTo_lu1900$(brInfo.labelLocation.x, brInfo.labelLocation.y + barBounds.top);\n guideBarGroup.children().add_11rb$(label.rootGroup);\n }\n if (this.debug) {\n var graphBounds = new DoubleRectangle(DoubleVector.Companion.ZERO, layout.graphSize);\n guideBarGroup.children().add_11rb$(LegendBox$Companion_getInstance().createTransparentRect_a5dgib$(graphBounds, Color.Companion.DARK_BLUE, 1.0));\n }\n contentRoot.children().add_11rb$(guideBarGroup);\n return layout.size;\n };\n ColorBarComponent.prototype.addColorBar_0 = function (g, domain, mapper, numBins, barBounds, barLengthExpand, horizontal, reverse_0) {\n var tmp$;\n var domainSpan = domain.length;\n var stepCount = JsMath.max(2, numBins);\n var step = domainSpan / stepCount;\n var v = domain.lowerEnd + step / 2;\n var domainValues = ArrayList_init();\n for (var i = 0; i < stepCount; i++) {\n domainValues.add_11rb$(v + step * i);\n }\n if (reverse_0) {\n reverse(domainValues);\n }\n var destination = ArrayList_init_0(collectionSizeOrDefault(domainValues, 10));\n var tmp$_0;\n tmp$_0 = domainValues.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n destination.add_11rb$(mapper.invoke_yrwdxb$(item));\n }\n var colors = destination;\n if (horizontal)\n tmp$ = barBounds.width;\n else\n tmp$ = barBounds.height;\n var barLength = tmp$;\n var effectiveBarLength = barLength - barLengthExpand * 2;\n var segmentStep = effectiveBarLength / stepCount;\n var segmentLeft = barBounds.left;\n var segmentRight = barBounds.right;\n var segmentBottom = barBounds.bottom;\n var segmentTop = barBounds.top;\n var i_0 = 0;\n for (var tmp$_1 = colors.iterator(); tmp$_1.hasNext(); ++i_0) {\n var color = tmp$_1.next();\n var r = SvgRectElement_init_0(segmentLeft, segmentTop, segmentRight - segmentLeft, segmentBottom - segmentTop);\n r.strokeWidth().set_11rb$(0.0);\n r.fillColor().set_11rb$(color);\n g.children().add_11rb$(r);\n if (horizontal) {\n segmentLeft += segmentStep;\n } else {\n segmentTop += segmentStep;\n }\n if (i_0 === 0) {\n if (horizontal) {\n segmentLeft += barLengthExpand;\n } else {\n segmentTop += barLengthExpand;\n }\n }\n }\n };\n ColorBarComponent.prototype.addTickMark_0 = function (g, p0, p1) {\n var line = SvgLineElement_init(p0.x, p0.y, p1.x, p1.y);\n line.strokeWidth().set_11rb$(1.0);\n line.strokeColor().set_11rb$(this.theme.backgroundFill());\n g.children().add_11rb$(line);\n };\n ColorBarComponent.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ColorBarComponent',\n interfaces: [LegendBox]\n };\n function ColorBarComponentLayout(title, domain, breaks, guideBarSize, legendDirection, reverse, theme) {\n ColorBarComponentLayout$Companion_getInstance();\n LegendBoxLayout.call(this, title, legendDirection, theme);\n this.guideBarSize = guideBarSize;\n this.barBounds_qhvd9h$_0 = null;\n this.barLengthExpand = 2.0;\n this.breakInfos_8be2vx$ = null;\n var guideBarLength = this.guideBarLength;\n var targetRange = new DoubleSpan(0.0 + this.barLengthExpand, guideBarLength - this.barLengthExpand);\n var mapper = scale.Mappers.linear_jbbmpz$(domain, targetRange, reverse);\n var $receiver = breaks.transformedValues;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n var tmp$_0 = destination.add_11rb$;\n var tickLocation = ensureNotNull(mapper.invoke_yrwdxb$(item));\n tmp$_0.call(destination, this.createBreakInfo_14dthe$(tickLocation));\n }\n this.breakInfos_8be2vx$ = destination;\n this.barBounds = new DoubleRectangle(DoubleVector.Companion.ZERO, this.guideBarSize);\n }\n Object.defineProperty(ColorBarComponentLayout.prototype, 'barBounds', {\n configurable: true,\n get: function () {\n return this.barBounds_qhvd9h$_0;\n },\n set: function (barBounds) {\n this.barBounds_qhvd9h$_0 = barBounds;\n }\n });\n function ColorBarComponentLayout$BreakInfo(tickLocation, labelLocation, labelHorizontalAnchor, labelVerticalAnchor) {\n this.tickLocation = tickLocation;\n this.labelLocation = labelLocation;\n this.labelHorizontalAnchor = labelHorizontalAnchor;\n this.labelVerticalAnchor = labelVerticalAnchor;\n }\n ColorBarComponentLayout$BreakInfo.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'BreakInfo',\n interfaces: []\n };\n function ColorBarComponentLayout$HorizontalLayout(title, domain, breaks, barSize, reverse, theme) {\n ColorBarComponentLayout.call(this, title, domain, breaks, barSize, LegendDirection$HORIZONTAL_getInstance(), reverse, theme);\n this.graphSize_4lks14$_0 = null;\n this.graphSize_4lks14$_0 = new DoubleVector(this.guideBarSize.x, this.guideBarSize.y + this.labelDistance_0 + PlotLabelSpecFactory_getInstance().legendItem_730mk3$(theme).height());\n }\n Object.defineProperty(ColorBarComponentLayout$HorizontalLayout.prototype, 'graphSize', {\n configurable: true,\n get: function () {\n return this.graphSize_4lks14$_0;\n }\n });\n Object.defineProperty(ColorBarComponentLayout$HorizontalLayout.prototype, 'labelDistance_0', {\n configurable: true,\n get: function () {\n return PlotLabelSpecFactory_getInstance().legendItem_730mk3$(this.theme).height() / 3;\n }\n });\n Object.defineProperty(ColorBarComponentLayout$HorizontalLayout.prototype, 'guideBarLength', {\n configurable: true,\n get: function () {\n return this.guideBarSize.x;\n }\n });\n ColorBarComponentLayout$HorizontalLayout.prototype.createBreakInfo_14dthe$ = function (tickLocation) {\n var labelLocation = new DoubleVector(tickLocation, this.guideBarSize.y + this.labelDistance_0);\n return new ColorBarComponentLayout$BreakInfo(tickLocation, labelLocation, Text$HorizontalAnchor.MIDDLE, Text$VerticalAnchor.TOP);\n };\n ColorBarComponentLayout$HorizontalLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'HorizontalLayout',\n interfaces: [ColorBarComponentLayout]\n };\n function ColorBarComponentLayout$VerticalLayout(title, domain, breaks, barSize, reverse, theme) {\n ColorBarComponentLayout.call(this, title, domain, breaks, barSize, LegendDirection$VERTICAL_getInstance(), reverse, theme);\n this.graphSize_ld8mnu$_0 = null;\n if (!!breaks.isEmpty) {\n var message = 'Colorbar VerticalLayout received empty breaks list.';\n throw IllegalStateException_init(message.toString());\n }\n var iterator = breaks.labels.iterator();\n if (!iterator.hasNext())\n throw NoSuchElementException_init();\n var it = iterator.next();\n var maxValue = PlotLabelSpecFactory_getInstance().legendItem_730mk3$(theme).width_61zpoe$(it);\n while (iterator.hasNext()) {\n var it_0 = iterator.next();\n var v = PlotLabelSpecFactory_getInstance().legendItem_730mk3$(theme).width_61zpoe$(it_0);\n maxValue = JsMath.max(maxValue, v);\n }\n var maxLabelWidth = maxValue;\n this.graphSize_ld8mnu$_0 = new DoubleVector(this.guideBarSize.x + this.labelDistance_0 + maxLabelWidth, this.guideBarSize.y);\n }\n Object.defineProperty(ColorBarComponentLayout$VerticalLayout.prototype, 'graphSize', {\n configurable: true,\n get: function () {\n return this.graphSize_ld8mnu$_0;\n }\n });\n Object.defineProperty(ColorBarComponentLayout$VerticalLayout.prototype, 'labelDistance_0', {\n configurable: true,\n get: function () {\n return PlotLabelSpecFactory_getInstance().legendItem_730mk3$(this.theme).width_61zpoe$(PlotLabelSpecFactory_getInstance().DISTANCE_TO_LABEL_IN_CHARS) / 2;\n }\n });\n Object.defineProperty(ColorBarComponentLayout$VerticalLayout.prototype, 'guideBarLength', {\n configurable: true,\n get: function () {\n return this.guideBarSize.y;\n }\n });\n ColorBarComponentLayout$VerticalLayout.prototype.createBreakInfo_14dthe$ = function (tickLocation) {\n var labelLocation = new DoubleVector(this.guideBarSize.x + this.labelDistance_0, tickLocation);\n return new ColorBarComponentLayout$BreakInfo(tickLocation, labelLocation, Text$HorizontalAnchor.LEFT, Text$VerticalAnchor.CENTER);\n };\n ColorBarComponentLayout$VerticalLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'VerticalLayout',\n interfaces: [ColorBarComponentLayout]\n };\n function ColorBarComponentLayout$Companion() {\n ColorBarComponentLayout$Companion_instance = this;\n }\n ColorBarComponentLayout$Companion.prototype.horizontal_6u4c86$ = function (title, domain, breaks, barSize, reverse, theme) {\n return new ColorBarComponentLayout$HorizontalLayout(title, domain, breaks, barSize, reverse, theme);\n };\n ColorBarComponentLayout$Companion.prototype.vertical_6u4c86$ = function (title, domain, breaks, barSize, reverse, theme) {\n return new ColorBarComponentLayout$VerticalLayout(title, domain, breaks, barSize, reverse, theme);\n };\n ColorBarComponentLayout$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ColorBarComponentLayout$Companion_instance = null;\n function ColorBarComponentLayout$Companion_getInstance() {\n if (ColorBarComponentLayout$Companion_instance === null) {\n new ColorBarComponentLayout$Companion();\n }\n return ColorBarComponentLayout$Companion_instance;\n }\n ColorBarComponentLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ColorBarComponentLayout',\n interfaces: [LegendBoxLayout]\n };\n function ColorBarComponentSpec(title, domain, breaks, scaleMapper, binCount, theme, layout, reverse) {\n ColorBarComponentSpec$Companion_getInstance();\n LegendBoxSpec.call(this, title, theme, reverse);\n this.domain = domain;\n this.breaks = breaks;\n this.scaleMapper = scaleMapper;\n this.binCount = binCount;\n this.layout_smwmum$_0 = layout;\n }\n Object.defineProperty(ColorBarComponentSpec.prototype, 'layout', {\n get: function () {\n return this.layout_smwmum$_0;\n }\n });\n function ColorBarComponentSpec$Companion() {\n ColorBarComponentSpec$Companion_instance = this;\n this.DEF_NUM_BIN = 20;\n this.DEF_BAR_THICKNESS_0 = 1.0;\n this.DEF_BAR_LENGTH_0 = 5.0;\n }\n ColorBarComponentSpec$Companion.prototype.barAbsoluteSize_kkcal5$ = function (horizontal, theme) {\n var tmp$;\n if (horizontal)\n tmp$ = new DoubleVector(this.DEF_BAR_LENGTH_0 * theme.keySize(), this.DEF_BAR_THICKNESS_0 * theme.keySize());\n else\n tmp$ = new DoubleVector(this.DEF_BAR_THICKNESS_0 * theme.keySize(), this.DEF_BAR_LENGTH_0 * theme.keySize());\n return tmp$;\n };\n ColorBarComponentSpec$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ColorBarComponentSpec$Companion_instance = null;\n function ColorBarComponentSpec$Companion_getInstance() {\n if (ColorBarComponentSpec$Companion_instance === null) {\n new ColorBarComponentSpec$Companion();\n }\n return ColorBarComponentSpec$Companion_instance;\n }\n ColorBarComponentSpec.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ColorBarComponentSpec',\n interfaces: [LegendBoxSpec]\n };\n function LegendArrangement(name, ordinal) {\n Enum.call(this);\n this.name$ = name;\n this.ordinal$ = ordinal;\n }\n function LegendArrangement_initFields() {\n LegendArrangement_initFields = function () {\n };\n LegendArrangement$HORIZONTAL_instance = new LegendArrangement('HORIZONTAL', 0);\n LegendArrangement$VERTICAL_instance = new LegendArrangement('VERTICAL', 1);\n }\n var LegendArrangement$HORIZONTAL_instance;\n function LegendArrangement$HORIZONTAL_getInstance() {\n LegendArrangement_initFields();\n return LegendArrangement$HORIZONTAL_instance;\n }\n var LegendArrangement$VERTICAL_instance;\n function LegendArrangement$VERTICAL_getInstance() {\n LegendArrangement_initFields();\n return LegendArrangement$VERTICAL_instance;\n }\n LegendArrangement.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendArrangement',\n interfaces: [Enum]\n };\n function LegendArrangement$values() {\n return [LegendArrangement$HORIZONTAL_getInstance(), LegendArrangement$VERTICAL_getInstance()];\n }\n LegendArrangement.values = LegendArrangement$values;\n function LegendArrangement$valueOf(name) {\n switch (name) {\n case 'HORIZONTAL':\n return LegendArrangement$HORIZONTAL_getInstance();\n case 'VERTICAL':\n return LegendArrangement$VERTICAL_getInstance();\n default:\n throwISE('No enum constant jetbrains.datalore.plot.builder.guide.LegendArrangement.' + name);\n }\n }\n LegendArrangement.valueOf_61zpoe$ = LegendArrangement$valueOf;\n function LegendBox() {\n LegendBox$Companion_getInstance();\n SvgComponent.call(this);\n this.debug = false;\n }\n Object.defineProperty(LegendBox.prototype, 'theme', {\n configurable: true,\n get: function () {\n return this.spec.theme;\n }\n });\n Object.defineProperty(LegendBox.prototype, 'title_aaysjy$_0', {\n configurable: true,\n get: function () {\n return this.spec.title;\n }\n });\n Object.defineProperty(LegendBox.prototype, 'size', {\n configurable: true,\n get: function () {\n return this.spec.size;\n }\n });\n LegendBox.prototype.hasTitle_kmjss0$_0 = function () {\n return this.spec.hasTitle();\n };\n LegendBox.prototype.buildComponent = function () {\n if (this.theme.showBackground()) {\n var $receiver = SvgRectElement_init(this.spec.innerBounds);\n $receiver.strokeColor().set_11rb$(this.theme.backgroundColor());\n $receiver.strokeWidth().set_11rb$(this.theme.backgroundStrokeWidth());\n $receiver.fillColor().set_11rb$(this.theme.backgroundFill());\n this.add_26jijc$($receiver);\n }\n var innerGroup = new SvgGElement();\n innerGroup.transform().set_11rb$(SvgComponent.Companion.buildTransform_e1sv3v$(this.spec.contentOrigin, 0.0));\n var l = this.spec.layout;\n var block$result;\n block$break: do {\n var tmp$;\n if (!this.hasTitle_kmjss0$_0()) {\n block$result = new DoubleRectangle(DoubleVector.Companion.ZERO, DoubleVector.Companion.ZERO);\n break block$break;\n }\n if (l.isHorizontal)\n tmp$ = this.spec.contentBounds.dimension.subtract_gpjtzr$(new DoubleVector(l.graphSize.x, 0.0));\n else {\n tmp$ = new DoubleVector(this.spec.contentBounds.width, l.titleSize_8be2vx$.y);\n }\n var titleRectSize = tmp$;\n block$result = new DoubleRectangle(DoubleVector.Companion.ZERO, titleRectSize);\n }\n while (false);\n var titleBoundingRect = block$result;\n if (this.hasTitle_kmjss0$_0()) {\n var label = this.createTitleLabel_mqkgsb$_0(titleBoundingRect, l.titleSize_8be2vx$, this.theme.titleJustification());\n innerGroup.children().add_11rb$(label.rootGroup);\n }\n var graphGroup = new SvgGElement();\n graphGroup.transform().set_11rb$(SvgComponent.Companion.buildTransform_e1sv3v$(l.graphOrigin, 0.0));\n this.appendGuideContent_26jijc$(graphGroup);\n innerGroup.children().add_11rb$(graphGroup);\n if (this.debug) {\n var outerBounds = new DoubleRectangle(DoubleVector.Companion.ZERO, this.spec.size);\n this.add_26jijc$(LegendBox$Companion_getInstance().createTransparentRect_a5dgib$(outerBounds, Color.Companion.CYAN, 1.0));\n var rect = SvgRectElement_init(this.spec.innerBounds);\n rect.fillColor().set_11rb$(Color.Companion.BLACK);\n rect.strokeWidth().set_11rb$(0.0);\n rect.fillOpacity().set_11rb$(0.1);\n this.add_26jijc$(rect);\n this.add_26jijc$(LegendBox$Companion_getInstance().createTransparentRect_a5dgib$(this.spec.contentBounds, Color.Companion.DARK_MAGENTA, 1.0));\n var rect_0 = titleBoundingRect.add_gpjtzr$(this.spec.contentOrigin);\n this.add_26jijc$(LegendBox$Companion_getInstance().createTransparentRect_a5dgib$(rect_0, Color.Companion.MAGENTA, 1.0));\n var textDimensions = PlotLayoutUtil_getInstance().textDimensions_1al14g$(this.title_aaysjy$_0, PlotLabelSpecFactory_getInstance().legendTitle_730mk3$(this.theme));\n var titleBoundingBox = DoubleRectangle_init(this.spec.contentBounds.left, this.spec.contentBounds.top, textDimensions.x, textDimensions.y);\n this.add_26jijc$(LegendBox$Companion_getInstance().createTransparentRect_a5dgib$(titleBoundingBox, Color.Companion.DARK_GREEN, 1.0));\n }\n this.add_26jijc$(innerGroup);\n };\n LegendBox.prototype.createTitleLabel_mqkgsb$_0 = function (boundRect, titleSize, justification) {\n var lineHeight = PlotLabelSpecFactory_getInstance().legendTitle_730mk3$(this.theme).height();\n var label = new MultilineLabel(this.title_aaysjy$_0);\n var tmp$ = TextJustification$Companion_getInstance().applyJustification_x3kzr8$(boundRect, titleSize, lineHeight, justification);\n var pos = tmp$.component1()\n , hAnchor = tmp$.component2();\n label.addClassName_61zpoe$(Style_getInstance().LEGEND_TITLE);\n label.setHorizontalAnchor_mf4siq$(hAnchor);\n label.setLineHeight_14dthe$(lineHeight);\n label.moveTo_gpjtzr$(pos);\n return label;\n };\n function LegendBox$Companion() {\n LegendBox$Companion_instance = this;\n }\n LegendBox$Companion.prototype.createTransparentRect_a5dgib$ = function (bounds, strokeColor, strokeWidth) {\n var rect = SvgRectElement_init(bounds);\n rect.strokeColor().set_11rb$(strokeColor);\n rect.strokeWidth().set_11rb$(strokeWidth);\n rect.fillOpacity().set_11rb$(0.0);\n return rect;\n };\n LegendBox$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var LegendBox$Companion_instance = null;\n function LegendBox$Companion_getInstance() {\n if (LegendBox$Companion_instance === null) {\n new LegendBox$Companion();\n }\n return LegendBox$Companion_instance;\n }\n LegendBox.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendBox',\n interfaces: [SvgComponent]\n };\n function LegendBoxLayout(title, legendDirection, theme) {\n this.title_47v7cs$_0 = title;\n this.theme = theme;\n this.isHorizontal = legendDirection === LegendDirection$HORIZONTAL_getInstance();\n }\n Object.defineProperty(LegendBoxLayout.prototype, 'titleBounds_27vr67$_0', {\n configurable: true,\n get: function () {\n return new DoubleRectangle(DoubleVector.Companion.ZERO, this.titleSize_8be2vx$);\n }\n });\n Object.defineProperty(LegendBoxLayout.prototype, 'graphOrigin', {\n configurable: true,\n get: function () {\n if (this.isHorizontal) {\n var $receiver = this.titleSize_8be2vx$;\n return new DoubleVector($receiver.x, $receiver.y > this.graphSize.y ? ($receiver.y - this.graphSize.y) / 2 : 0.0);\n } else\n return new DoubleVector(0.0, this.titleSize_8be2vx$.y + PlotLabelSpecFactory_getInstance().legendTitle_730mk3$(this.theme).height() / 2);\n }\n });\n Object.defineProperty(LegendBoxLayout.prototype, 'size', {\n configurable: true,\n get: function () {\n var graphBounds = new DoubleRectangle(this.graphOrigin, this.graphSize);\n var titleAndContent = (new DoubleRectangle(DoubleVector.Companion.ZERO, DoubleVector.Companion.ZERO)).union_wthzt5$(this.titleBounds_27vr67$_0).union_wthzt5$(graphBounds);\n return titleAndContent.dimension;\n }\n });\n Object.defineProperty(LegendBoxLayout.prototype, 'titleSize_8be2vx$', {\n configurable: true,\n get: function () {\n var tmp$;\n if (isBlank(this.title_47v7cs$_0) || !this.theme.showTitle())\n tmp$ = DoubleVector.Companion.ZERO;\n else\n tmp$ = PlotLayoutUtil_getInstance().textDimensions_1al14g$(this.title_47v7cs$_0, PlotLabelSpecFactory_getInstance().legendTitle_730mk3$(this.theme));\n return tmp$;\n }\n });\n LegendBoxLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendBoxLayout',\n interfaces: []\n };\n function LegendBoxSpec(title, theme, reverse) {\n this.title = title;\n this.theme = theme;\n this.reverse = reverse;\n this.contentOrigin = null;\n this.fullContentExtend_5hau13$_0 = null;\n this.innerOrigin_3w1y5t$_0 = null;\n this.innerContentExtend_wllzuc$_0 = null;\n var contentExpand = this.theme.margin() + this.theme.padding();\n this.contentOrigin = new DoubleVector(contentExpand, contentExpand);\n this.fullContentExtend_5hau13$_0 = new DoubleVector(contentExpand * 2, contentExpand * 2);\n this.innerOrigin_3w1y5t$_0 = new DoubleVector(this.theme.margin(), this.theme.margin());\n this.innerContentExtend_wllzuc$_0 = new DoubleVector(this.theme.padding() * 2, this.theme.padding() * 2);\n }\n Object.defineProperty(LegendBoxSpec.prototype, 'contentSize_cb71ch$_0', {\n configurable: true,\n get: function () {\n return this.layout.size;\n }\n });\n Object.defineProperty(LegendBoxSpec.prototype, 'size', {\n configurable: true,\n get: function () {\n return this.contentSize_cb71ch$_0.add_gpjtzr$(this.fullContentExtend_5hau13$_0);\n }\n });\n Object.defineProperty(LegendBoxSpec.prototype, 'innerBounds', {\n configurable: true,\n get: function () {\n return new DoubleRectangle(this.innerOrigin_3w1y5t$_0, this.contentSize_cb71ch$_0.add_gpjtzr$(this.innerContentExtend_wllzuc$_0));\n }\n });\n Object.defineProperty(LegendBoxSpec.prototype, 'contentBounds', {\n configurable: true,\n get: function () {\n return new DoubleRectangle(this.contentOrigin, this.contentSize_cb71ch$_0);\n }\n });\n LegendBoxSpec.prototype.hasTitle = function () {\n return !isBlank(this.title) && this.theme.showTitle();\n };\n LegendBoxSpec.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendBoxSpec',\n interfaces: []\n };\n function LegendBreak(label) {\n LegendBreak$Companion_getInstance();\n this.label = label;\n this.myLayers_0 = ArrayList_init();\n }\n Object.defineProperty(LegendBreak.prototype, 'minimumKeySize', {\n configurable: true,\n get: function () {\n var tmp$;\n var minSize = DoubleVector.Companion.ZERO;\n tmp$ = this.myLayers_0.iterator();\n while (tmp$.hasNext()) {\n var layer = tmp$.next();\n var layerMinKeySize = layer.keyElementFactory.minimumKeySize_l6g9mh$(layer.dataPoint);\n minSize = minSize.max_gpjtzr$(layerMinKeySize);\n }\n return minSize;\n }\n });\n Object.defineProperty(LegendBreak.prototype, 'isEmpty', {\n configurable: true,\n get: function () {\n return this.myLayers_0.isEmpty();\n }\n });\n LegendBreak.prototype.addLayer_w0u015$ = function (dataPoint, keyElementFactory) {\n this.myLayers_0.add_11rb$(new LegendBreak$LegendBreakLayer(dataPoint, keyElementFactory));\n };\n LegendBreak.prototype.createKeyElement_gpjtzr$ = function (size) {\n var tmp$;\n var g = new SvgGElement();\n tmp$ = this.myLayers_0.iterator();\n while (tmp$.hasNext()) {\n var layer = tmp$.next();\n var keyElement = layer.keyElementFactory.createKeyElement_s1fn0c$(layer.dataPoint, size);\n g.children().add_11rb$(keyElement);\n }\n return g;\n };\n function LegendBreak$LegendBreakLayer(dataPoint, keyElementFactory) {\n this.dataPoint = dataPoint;\n this.keyElementFactory = keyElementFactory;\n }\n LegendBreak$LegendBreakLayer.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendBreakLayer',\n interfaces: []\n };\n function LegendBreak$Companion() {\n LegendBreak$Companion_instance = this;\n }\n LegendBreak$Companion.prototype.simple_998ysp$ = function (label, dataPoint, keyElementFactory) {\n var br = new LegendBreak(label);\n br.addLayer_w0u015$(dataPoint, keyElementFactory);\n return br;\n };\n LegendBreak$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var LegendBreak$Companion_instance = null;\n function LegendBreak$Companion_getInstance() {\n if (LegendBreak$Companion_instance === null) {\n new LegendBreak$Companion();\n }\n return LegendBreak$Companion_instance;\n }\n LegendBreak.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendBreak',\n interfaces: []\n };\n function LegendComponent(spec) {\n LegendBox.call(this);\n this.spec_8zhhsr$_0 = spec;\n }\n Object.defineProperty(LegendComponent.prototype, 'spec', {\n get: function () {\n return this.spec_8zhhsr$_0;\n }\n });\n LegendComponent.prototype.appendGuideContent_26jijc$ = function (contentRoot) {\n var tmp$;\n var layout = this.spec.layout;\n var keyLabelBoxes = layout.keyLabelBoxes.iterator();\n var labelBoxes = layout.labelBoxes.iterator();\n var keySizes = layout.keySizes.iterator();\n tmp$ = this.spec.breaks_8be2vx$.iterator();\n while (tmp$.hasNext()) {\n var br = tmp$.next();\n var keyLabelBox = keyLabelBoxes.next();\n var labelBox = labelBoxes.next();\n var keySize = keySizes.next();\n var breakElement = this.createBreakElement_0(br, keySize, keyLabelBox, labelBox);\n contentRoot.children().add_11rb$(breakElement);\n }\n if (this.debug) {\n var graphBounds = new DoubleRectangle(DoubleVector.Companion.ZERO, layout.graphSize);\n contentRoot.children().add_11rb$(LegendBox$Companion_getInstance().createTransparentRect_a5dgib$(graphBounds, Color.Companion.DARK_BLUE, 1.0));\n }\n return layout.size;\n };\n LegendComponent.prototype.createBreakElement_0 = function (br, keySize, keyLabelBox, labelBox) {\n var breakComponent = new GroupComponent();\n breakComponent.add_26jijc$(this.createKeyElement_0(br, keySize));\n var label = new TextLabel(br.label);\n label.addClassName_61zpoe$(Style_getInstance().LEGEND_ITEM);\n label.setHorizontalAnchor_mf4siq$(Text$HorizontalAnchor.LEFT);\n label.setVerticalAnchor_yaylw0$(Text$VerticalAnchor.CENTER);\n label.moveTo_gpjtzr$(labelBox.origin.add_gpjtzr$(new DoubleVector(0.0, labelBox.height / 2)));\n breakComponent.add_8icvvv$(label);\n breakComponent.moveTo_gpjtzr$(keyLabelBox.origin);\n return breakComponent.rootGroup;\n };\n LegendComponent.prototype.createKeyElement_0 = function (legendBreak, size) {\n var g = new SvgGElement();\n var keyBounds = new DoubleRectangle(DoubleVector.Companion.ZERO, size);\n var backgroundRect = SvgRectElement_init(keyBounds);\n backgroundRect.strokeWidth().set_11rb$(0.0);\n backgroundRect.fillColor().set_11rb$(this.theme.backgroundFill());\n g.children().add_11rb$(backgroundRect);\n var innerSize = new DoubleVector(size.x - 2, size.y - 2);\n var keyElement = legendBreak.createKeyElement_gpjtzr$(innerSize);\n var keyElementTransform = SvgComponent.Companion.buildTransform_e1sv3v$(new DoubleVector(1.0, 1.0), 0.0);\n keyElement.transform().set_11rb$(keyElementTransform);\n g.children().add_11rb$(keyElement);\n var frame = LegendBox$Companion_getInstance().createTransparentRect_a5dgib$(keyBounds, this.theme.backgroundFill(), 1.0);\n g.children().add_11rb$(frame);\n return g;\n };\n LegendComponent.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendComponent',\n interfaces: [LegendBox]\n };\n function LegendComponentLayout(title, breaks, keySizes, legendDirection, theme) {\n LegendComponentLayout$Companion_getInstance();\n LegendBoxLayout.call(this, title, legendDirection, theme);\n this.breaks = breaks;\n this.keySizes = keySizes;\n this.myContentSize_8rvo9o$_0 = null;\n this.myKeyLabelBoxes_uk7fn2$_0 = ArrayList_init();\n this.myLabelBoxes_9jhh53$_0 = ArrayList_init();\n this.isFillByRow = false;\n this.rowCount_kvp0d1$_0 = 0;\n this.colCount_nojzuj$_0 = 0;\n }\n Object.defineProperty(LegendComponentLayout.prototype, 'rowCount', {\n configurable: true,\n get: function () {\n return this.rowCount_kvp0d1$_0;\n },\n set: function (rowCount) {\n if (!(rowCount > 0)) {\n var message = 'Row count must be greater than 0, was ' + rowCount;\n throw IllegalStateException_init(message.toString());\n }\n this.rowCount_kvp0d1$_0 = rowCount;\n }\n });\n Object.defineProperty(LegendComponentLayout.prototype, 'colCount', {\n configurable: true,\n get: function () {\n return this.colCount_nojzuj$_0;\n },\n set: function (colCount) {\n if (!(colCount > 0)) {\n var message = 'Col count must be greater than 0, was ' + colCount;\n throw IllegalStateException_init(message.toString());\n }\n this.colCount_nojzuj$_0 = colCount;\n }\n });\n Object.defineProperty(LegendComponentLayout.prototype, 'graphSize', {\n configurable: true,\n get: function () {\n this.ensureInited_chkycd$_0();\n return ensureNotNull(this.myContentSize_8rvo9o$_0);\n }\n });\n Object.defineProperty(LegendComponentLayout.prototype, 'keyLabelBoxes', {\n configurable: true,\n get: function () {\n this.ensureInited_chkycd$_0();\n return this.myKeyLabelBoxes_uk7fn2$_0;\n }\n });\n Object.defineProperty(LegendComponentLayout.prototype, 'labelBoxes', {\n configurable: true,\n get: function () {\n this.ensureInited_chkycd$_0();\n return this.myLabelBoxes_9jhh53$_0;\n }\n });\n LegendComponentLayout.prototype.ensureInited_chkycd$_0 = function () {\n if (this.myContentSize_8rvo9o$_0 == null) {\n this.doLayout_zctv6z$_0();\n }\n };\n LegendComponentLayout.prototype.doLayout_zctv6z$_0 = function () {\n var tmp$;\n var labelHeight = PlotLabelSpecFactory_getInstance().legendItem_730mk3$(this.theme).height();\n var labelLeftMargin = PlotLabelSpecFactory_getInstance().legendItem_730mk3$(this.theme).width_61zpoe$(PlotLabelSpecFactory_getInstance().DISTANCE_TO_LABEL_IN_CHARS) / 2;\n var contentOrigin = DoubleVector.Companion.ZERO;\n var breakBoxBounds = null;\n tmp$ = this.breaks;\n for (var i = 0; i !== tmp$.size; ++i) {\n var tmp$_0;\n var labelSize = this.labelSize_za3lpa$(i);\n var keySize = this.keySizes.get_za3lpa$(i);\n var labelVOffset = (keySize.y - labelHeight) / 2;\n var labelHOffset = keySize.x + labelLeftMargin;\n var breakBoxSize = new DoubleVector(labelHOffset + labelSize.x, keySize.y);\n breakBoxBounds = new DoubleRectangle((tmp$_0 = breakBoxBounds != null ? this.breakBoxOrigin_b4d9xv$(i, breakBoxBounds) : null) != null ? tmp$_0 : contentOrigin, breakBoxSize);\n this.myKeyLabelBoxes_uk7fn2$_0.add_11rb$(breakBoxBounds);\n this.myLabelBoxes_9jhh53$_0.add_11rb$(DoubleRectangle_init(labelHOffset, labelVOffset, labelSize.x, labelSize.y));\n }\n this.myContentSize_8rvo9o$_0 = GeometryUtil_getInstance().union_a7nkjf$(new DoubleRectangle(contentOrigin, DoubleVector.Companion.ZERO), this.myKeyLabelBoxes_uk7fn2$_0).dimension;\n };\n function LegendComponentLayout$MyHorizontal(title, breaks, keySizes, theme) {\n LegendComponentLayout.call(this, title, breaks, keySizes, LegendDirection$HORIZONTAL_getInstance(), theme);\n this.colCount = breaks.size;\n this.rowCount = 1;\n }\n LegendComponentLayout$MyHorizontal.prototype.breakBoxOrigin_b4d9xv$ = function (index, prevBreakBoxBounds) {\n return new DoubleVector(prevBreakBoxBounds.right, 0.0);\n };\n LegendComponentLayout$MyHorizontal.prototype.labelSize_za3lpa$ = function (index) {\n var label = this.breaks.get_za3lpa$(index).label;\n return new DoubleVector(PlotLabelSpecFactory_getInstance().legendItem_730mk3$(this.theme).width_61zpoe$(label), PlotLabelSpecFactory_getInstance().legendItem_730mk3$(this.theme).height());\n };\n LegendComponentLayout$MyHorizontal.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'MyHorizontal',\n interfaces: [LegendComponentLayout]\n };\n function LegendComponentLayout$MyHorizontalMultiRow(title, breaks, keySizes, theme) {\n LegendComponentLayout$MyMultiRow.call(this, title, breaks, keySizes, LegendDirection$HORIZONTAL_getInstance(), theme);\n this.colCount = breaks.size;\n this.rowCount = 1;\n }\n LegendComponentLayout$MyHorizontalMultiRow.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'MyHorizontalMultiRow',\n interfaces: [LegendComponentLayout$MyMultiRow]\n };\n function LegendComponentLayout$MyVertical(title, breaks, keySizes, theme) {\n LegendComponentLayout$MyMultiRow.call(this, title, breaks, keySizes, LegendDirection$VERTICAL_getInstance(), theme);\n this.colCount = 1;\n this.rowCount = breaks.size;\n }\n LegendComponentLayout$MyVertical.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'MyVertical',\n interfaces: [LegendComponentLayout$MyMultiRow]\n };\n function LegendComponentLayout$MyMultiRow(title, breaks, keySizes, legendDirection, theme) {\n LegendComponentLayout.call(this, title, breaks, keySizes, legendDirection, theme);\n this.myMaxLabelWidth_0 = 0.0;\n var tmp$;\n tmp$ = breaks.iterator();\n while (tmp$.hasNext()) {\n var br = tmp$.next();\n var a = this.myMaxLabelWidth_0;\n var b = PlotLabelSpecFactory_getInstance().legendItem_730mk3$(theme).width_61zpoe$(br.label);\n this.myMaxLabelWidth_0 = JsMath.max(a, b);\n }\n }\n LegendComponentLayout$MyMultiRow.prototype.breakBoxOrigin_b4d9xv$ = function (index, prevBreakBoxBounds) {\n var tmp$, tmp$_0;\n if (this.isFillByRow) {\n if ((index % this.colCount | 0) === 0) {\n tmp$ = new DoubleVector(0.0, prevBreakBoxBounds.bottom);\n } else\n tmp$ = new DoubleVector(prevBreakBoxBounds.right, prevBreakBoxBounds.top);\n return tmp$;\n }\n if ((index % this.rowCount | 0) === 0) {\n tmp$_0 = new DoubleVector(prevBreakBoxBounds.right, 0.0);\n } else\n tmp$_0 = new DoubleVector(prevBreakBoxBounds.left, prevBreakBoxBounds.bottom);\n return tmp$_0;\n };\n LegendComponentLayout$MyMultiRow.prototype.labelSize_za3lpa$ = function (index) {\n return new DoubleVector(this.myMaxLabelWidth_0, PlotLabelSpecFactory_getInstance().legendItem_730mk3$(this.theme).height());\n };\n LegendComponentLayout$MyMultiRow.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'MyMultiRow',\n interfaces: [LegendComponentLayout]\n };\n function LegendComponentLayout$Companion() {\n LegendComponentLayout$Companion_instance = this;\n }\n LegendComponentLayout$Companion.prototype.horizontal_d02gve$ = function (title, breaks, keySizes, theme) {\n return new LegendComponentLayout$MyHorizontal(title, breaks, keySizes, theme);\n };\n LegendComponentLayout$Companion.prototype.horizontalMultiRow_d02gve$ = function (title, breaks, keySizes, theme) {\n return new LegendComponentLayout$MyHorizontalMultiRow(title, breaks, keySizes, theme);\n };\n LegendComponentLayout$Companion.prototype.vertical_d02gve$ = function (title, breaks, keySizes, theme) {\n return new LegendComponentLayout$MyVertical(title, breaks, keySizes, theme);\n };\n LegendComponentLayout$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var LegendComponentLayout$Companion_instance = null;\n function LegendComponentLayout$Companion_getInstance() {\n if (LegendComponentLayout$Companion_instance === null) {\n new LegendComponentLayout$Companion();\n }\n return LegendComponentLayout$Companion_instance;\n }\n LegendComponentLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendComponentLayout',\n interfaces: [LegendBoxLayout]\n };\n function LegendComponentSpec(title, breaks, theme, layout, reverse) {\n LegendBoxSpec.call(this, title, theme, reverse);\n this.breaks_8be2vx$ = breaks;\n this.layout_ebqbgv$_0 = layout;\n }\n Object.defineProperty(LegendComponentSpec.prototype, 'layout', {\n get: function () {\n return this.layout_ebqbgv$_0;\n }\n });\n LegendComponentSpec.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendComponentSpec',\n interfaces: [LegendBoxSpec]\n };\n function LegendDirection(name, ordinal) {\n Enum.call(this);\n this.name$ = name;\n this.ordinal$ = ordinal;\n }\n function LegendDirection_initFields() {\n LegendDirection_initFields = function () {\n };\n LegendDirection$HORIZONTAL_instance = new LegendDirection('HORIZONTAL', 0);\n LegendDirection$VERTICAL_instance = new LegendDirection('VERTICAL', 1);\n LegendDirection$AUTO_instance = new LegendDirection('AUTO', 2);\n }\n var LegendDirection$HORIZONTAL_instance;\n function LegendDirection$HORIZONTAL_getInstance() {\n LegendDirection_initFields();\n return LegendDirection$HORIZONTAL_instance;\n }\n var LegendDirection$VERTICAL_instance;\n function LegendDirection$VERTICAL_getInstance() {\n LegendDirection_initFields();\n return LegendDirection$VERTICAL_instance;\n }\n var LegendDirection$AUTO_instance;\n function LegendDirection$AUTO_getInstance() {\n LegendDirection_initFields();\n return LegendDirection$AUTO_instance;\n }\n LegendDirection.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendDirection',\n interfaces: [Enum]\n };\n function LegendDirection$values() {\n return [LegendDirection$HORIZONTAL_getInstance(), LegendDirection$VERTICAL_getInstance(), LegendDirection$AUTO_getInstance()];\n }\n LegendDirection.values = LegendDirection$values;\n function LegendDirection$valueOf(name) {\n switch (name) {\n case 'HORIZONTAL':\n return LegendDirection$HORIZONTAL_getInstance();\n case 'VERTICAL':\n return LegendDirection$VERTICAL_getInstance();\n case 'AUTO':\n return LegendDirection$AUTO_getInstance();\n default:\n throwISE('No enum constant jetbrains.datalore.plot.builder.guide.LegendDirection.' + name);\n }\n }\n LegendDirection.valueOf_61zpoe$ = LegendDirection$valueOf;\n function LegendJustification(x, y) {\n LegendJustification$Companion_getInstance();\n this.x = x;\n this.y = y;\n }\n function LegendJustification$Companion() {\n LegendJustification$Companion_instance = this;\n this.CENTER = new LegendJustification(0.5, 0.5);\n }\n LegendJustification$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var LegendJustification$Companion_instance = null;\n function LegendJustification$Companion_getInstance() {\n if (LegendJustification$Companion_instance === null) {\n new LegendJustification$Companion();\n }\n return LegendJustification$Companion_instance;\n }\n LegendJustification.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendJustification',\n interfaces: []\n };\n function LegendPosition(x, y) {\n LegendPosition$Companion_getInstance();\n this.x = x;\n this.y = y;\n }\n Object.defineProperty(LegendPosition.prototype, 'isFixed', {\n configurable: true,\n get: function () {\n return this === LegendPosition$Companion_getInstance().LEFT || this === LegendPosition$Companion_getInstance().RIGHT || this === LegendPosition$Companion_getInstance().TOP || this === LegendPosition$Companion_getInstance().BOTTOM;\n }\n });\n Object.defineProperty(LegendPosition.prototype, 'isHidden', {\n configurable: true,\n get: function () {\n return this === LegendPosition$Companion_getInstance().NONE;\n }\n });\n Object.defineProperty(LegendPosition.prototype, 'isOverlay', {\n configurable: true,\n get: function () {\n return !(this.isFixed || this.isHidden);\n }\n });\n function LegendPosition$Companion() {\n LegendPosition$Companion_instance = this;\n this.RIGHT = new LegendPosition(1.0, 0.5);\n this.LEFT = new LegendPosition(0.0, 0.5);\n this.TOP = new LegendPosition(0.5, 1.0);\n this.BOTTOM = new LegendPosition(0.5, 1.0);\n this.NONE = new LegendPosition(kotlin_js_internal_DoubleCompanionObject.NaN, kotlin_js_internal_DoubleCompanionObject.NaN);\n }\n LegendPosition$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var LegendPosition$Companion_instance = null;\n function LegendPosition$Companion_getInstance() {\n if (LegendPosition$Companion_instance === null) {\n new LegendPosition$Companion();\n }\n return LegendPosition$Companion_instance;\n }\n LegendPosition.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendPosition',\n interfaces: []\n };\n function Orientation(name, ordinal, id) {\n Enum.call(this);\n this.id_db4vdn$_0 = id;\n this.name$ = name;\n this.ordinal$ = ordinal;\n }\n function Orientation_initFields() {\n Orientation_initFields = function () {\n };\n Orientation$LEFT_instance = new Orientation('LEFT', 0, 'LEFT');\n Orientation$RIGHT_instance = new Orientation('RIGHT', 1, 'RIGHT');\n Orientation$TOP_instance = new Orientation('TOP', 2, 'TOP');\n Orientation$BOTTOM_instance = new Orientation('BOTTOM', 3, 'BOTTOM');\n }\n var Orientation$LEFT_instance;\n function Orientation$LEFT_getInstance() {\n Orientation_initFields();\n return Orientation$LEFT_instance;\n }\n var Orientation$RIGHT_instance;\n function Orientation$RIGHT_getInstance() {\n Orientation_initFields();\n return Orientation$RIGHT_instance;\n }\n var Orientation$TOP_instance;\n function Orientation$TOP_getInstance() {\n Orientation_initFields();\n return Orientation$TOP_instance;\n }\n var Orientation$BOTTOM_instance;\n function Orientation$BOTTOM_getInstance() {\n Orientation_initFields();\n return Orientation$BOTTOM_instance;\n }\n Object.defineProperty(Orientation.prototype, 'isHorizontal', {\n configurable: true,\n get: function () {\n return this === Orientation$TOP_getInstance() || this === Orientation$BOTTOM_getInstance();\n }\n });\n Orientation.prototype.flip = function () {\n var tmp$;\n switch (this.name) {\n case 'LEFT':\n tmp$ = Orientation$BOTTOM_getInstance();\n break;\n case 'RIGHT':\n tmp$ = Orientation$TOP_getInstance();\n break;\n case 'TOP':\n tmp$ = Orientation$RIGHT_getInstance();\n break;\n case 'BOTTOM':\n tmp$ = Orientation$LEFT_getInstance();\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n Orientation.prototype.toString = function () {\n return 'Orientation ' + this.id_db4vdn$_0;\n };\n Orientation.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'Orientation',\n interfaces: [Enum]\n };\n function Orientation$values() {\n return [Orientation$LEFT_getInstance(), Orientation$RIGHT_getInstance(), Orientation$TOP_getInstance(), Orientation$BOTTOM_getInstance()];\n }\n Orientation.values = Orientation$values;\n function Orientation$valueOf(name) {\n switch (name) {\n case 'LEFT':\n return Orientation$LEFT_getInstance();\n case 'RIGHT':\n return Orientation$RIGHT_getInstance();\n case 'TOP':\n return Orientation$TOP_getInstance();\n case 'BOTTOM':\n return Orientation$BOTTOM_getInstance();\n default:\n throwISE('No enum constant jetbrains.datalore.plot.builder.guide.Orientation.' + name);\n }\n }\n Orientation.valueOf_61zpoe$ = Orientation$valueOf;\n function ContextualMappingProvider() {\n ContextualMappingProvider$Companion_getInstance();\n }\n function ContextualMappingProvider$Companion() {\n ContextualMappingProvider$Companion_instance = this;\n this.NONE = new ContextualMappingProvider$Companion$NONE$ObjectLiteral();\n }\n function ContextualMappingProvider$Companion$NONE$ObjectLiteral() {\n }\n ContextualMappingProvider$Companion$NONE$ObjectLiteral.prototype.createContextualMapping_8fr62e$ = function (dataAccess, dataFrame) {\n return new ContextualMapping(emptyList(), null, null, false, false, false, false, null);\n };\n ContextualMappingProvider$Companion$NONE$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [ContextualMappingProvider]\n };\n ContextualMappingProvider$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ContextualMappingProvider$Companion_instance = null;\n function ContextualMappingProvider$Companion_getInstance() {\n if (ContextualMappingProvider$Companion_instance === null) {\n new ContextualMappingProvider$Companion();\n }\n return ContextualMappingProvider$Companion_instance;\n }\n ContextualMappingProvider.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'ContextualMappingProvider',\n interfaces: []\n };\n function GeomInteraction(builder) {\n GeomInteraction$Companion_getInstance();\n this.myLocatorLookupSpace_0 = builder.locatorLookupSpace;\n this.myLocatorLookupStrategy_0 = builder.locatorLookupStrategy;\n this.myTooltipLines_0 = builder.tooltipLines;\n this.myTooltipProperties_0 = builder.tooltipProperties;\n this.myIgnoreInvisibleTargets_0 = builder.ignoreInvisibleTargets;\n this.myIsCrosshairEnabled_0 = builder.isCrosshairEnabled;\n this.myTooltipTitle_0 = builder.tooltipTitle;\n }\n GeomInteraction.prototype.createLookupSpec = function () {\n return new GeomTargetLocator$LookupSpec(this.myLocatorLookupSpace_0, this.myLocatorLookupStrategy_0);\n };\n GeomInteraction.prototype.createContextualMapping_8fr62e$ = function (dataAccess, dataFrame) {\n var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3;\n var $receiver = this.myTooltipLines_0;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$_4;\n tmp$_4 = $receiver.iterator();\n while (tmp$_4.hasNext()) {\n var item = tmp$_4.next();\n destination.add_11rb$(TooltipLine_init(item));\n }\n tmp$ = this.myTooltipProperties_0;\n tmp$_0 = this.myIgnoreInvisibleTargets_0;\n tmp$_1 = this.myIsCrosshairEnabled_0;\n tmp$_3 = (tmp$_2 = this.myTooltipTitle_0) != null ? TooltipLine_init(tmp$_2) : null;\n return GeomInteraction$Companion_getInstance().createContextualMapping_0(destination, dataAccess, dataFrame, tmp$, tmp$_0, tmp$_1, tmp$_3);\n };\n function GeomInteraction$Companion() {\n GeomInteraction$Companion_instance = this;\n }\n GeomInteraction$Companion.prototype.createTestContextualMapping_fdc7hd$ = function (aesListForTooltip, axisAes, outliers, dataAccess, dataFrame, userDefinedValueSources) {\n if (userDefinedValueSources === void 0)\n userDefinedValueSources = null;\n var defaultTooltipLines = GeomInteractionBuilderUtil_getInstance().defaultValueSourceTooltipLines_l73v50$(aesListForTooltip, axisAes, outliers, userDefinedValueSources);\n return this.createContextualMapping_0(defaultTooltipLines, dataAccess, dataFrame, TooltipSpecification$TooltipProperties$Companion_getInstance().NONE, false, false, null);\n };\n GeomInteraction$Companion.prototype.createContextualMapping_0 = function (tooltipLines, dataAccess, dataFrame, tooltipProperties, ignoreInvisibleTargets, isCrosshairEnabled, tooltipTitle) {\n var destination = ArrayList_init();\n var tmp$;\n tmp$ = tooltipLines.iterator();\n loop_label: while (tmp$.hasNext()) {\n var element = tmp$.next();\n var $receiver = element.fields;\n var destination_0 = ArrayList_init();\n var tmp$_0;\n tmp$_0 = $receiver.iterator();\n while (tmp$_0.hasNext()) {\n var element_0 = tmp$_0.next();\n if (Kotlin.isType(element_0, MappingValue))\n destination_0.add_11rb$(element_0);\n }\n var dataAesList = destination_0;\n var all$result;\n all$break: do {\n var tmp$_1;\n if (Kotlin.isType(dataAesList, Collection) && dataAesList.isEmpty()) {\n all$result = true;\n break all$break;\n }\n tmp$_1 = dataAesList.iterator();\n while (tmp$_1.hasNext()) {\n var element_1 = tmp$_1.next();\n if (!dataAccess.isMapped_896ixz$(element_1.aes)) {\n all$result = false;\n break all$break;\n }\n }\n all$result = true;\n }\n while (false);\n if (all$result)\n destination.add_11rb$(element);\n }\n var mappedTooltipLines = destination;\n var tmp$_2;\n tmp$_2 = mappedTooltipLines.iterator();\n while (tmp$_2.hasNext()) {\n var element_2 = tmp$_2.next();\n element_2.initDataContext_nqispu$(dataFrame, dataAccess);\n }\n var any$result;\n any$break: do {\n var tmp$_3;\n if (Kotlin.isType(mappedTooltipLines, Collection) && mappedTooltipLines.isEmpty()) {\n any$result = false;\n break any$break;\n }\n tmp$_3 = mappedTooltipLines.iterator();\n loop_label: while (tmp$_3.hasNext()) {\n var element_3 = tmp$_3.next();\n var $receiver_0 = element_3.fields;\n var predicate = getPropertyCallableRef('isOutlier', 1, function ($receiver) {\n return $receiver.isOutlier;\n });\n var none$result;\n none$break: do {\n var tmp$_4;\n if (Kotlin.isType($receiver_0, Collection) && $receiver_0.isEmpty()) {\n none$result = true;\n break none$break;\n }\n tmp$_4 = $receiver_0.iterator();\n while (tmp$_4.hasNext()) {\n var element_4 = tmp$_4.next();\n if (predicate(element_4)) {\n none$result = false;\n break none$break;\n }\n }\n none$result = true;\n }\n while (false);\n if (none$result) {\n any$result = true;\n break any$break;\n }\n }\n any$result = false;\n }\n while (false);\n var hasGeneralTooltip = any$result;\n var any$result_0;\n any$break: do {\n var tmp$_5;\n if (Kotlin.isType(mappedTooltipLines, Collection) && mappedTooltipLines.isEmpty()) {\n any$result_0 = false;\n break any$break;\n }\n tmp$_5 = mappedTooltipLines.iterator();\n loop_label: while (tmp$_5.hasNext()) {\n var element_5 = tmp$_5.next();\n var $receiver_1 = element_5.fields;\n var predicate_0 = getPropertyCallableRef('isAxis', 1, function ($receiver) {\n return $receiver.isAxis;\n });\n var any$result_1;\n any$break_0: do {\n var tmp$_6;\n if (Kotlin.isType($receiver_1, Collection) && $receiver_1.isEmpty()) {\n any$result_1 = false;\n break any$break_0;\n }\n tmp$_6 = $receiver_1.iterator();\n while (tmp$_6.hasNext()) {\n var element_6 = tmp$_6.next();\n if (predicate_0(element_6)) {\n any$result_1 = true;\n break any$break_0;\n }\n }\n any$result_1 = false;\n }\n while (false);\n if (any$result_1) {\n any$result_0 = true;\n break any$break;\n }\n }\n any$result_0 = false;\n }\n while (false);\n var hasAxisTooltip = any$result_0;\n tooltipTitle != null ? (tooltipTitle.initDataContext_nqispu$(dataFrame, dataAccess), Unit) : null;\n return new ContextualMapping(mappedTooltipLines, tooltipProperties.anchor, tooltipProperties.minWidth, ignoreInvisibleTargets, hasGeneralTooltip, hasAxisTooltip, isCrosshairEnabled, tooltipTitle);\n };\n GeomInteraction$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var GeomInteraction$Companion_instance = null;\n function GeomInteraction$Companion_getInstance() {\n if (GeomInteraction$Companion_instance === null) {\n new GeomInteraction$Companion();\n }\n return GeomInteraction$Companion_instance;\n }\n GeomInteraction.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GeomInteraction',\n interfaces: [ContextualMappingProvider]\n };\n function GeomInteractionBuilder(locatorLookupSpace, locatorLookupStrategy, tooltipAes, tooltipAxisAes, tooltipOutlierAes) {\n this.locatorLookupSpace = locatorLookupSpace;\n this.locatorLookupStrategy = locatorLookupStrategy;\n this.tooltipAes_0 = tooltipAes;\n this.tooltipAxisAes_0 = tooltipAxisAes;\n this.tooltipOutlierAes_0 = tooltipOutlierAes;\n this.myUserTooltipSpec_0 = null;\n this.ignoreInvisibleTargets_ddo194$_0 = false;\n this.tooltipConstants_xwrflf$_0 = null;\n this.isCrosshairEnabled_vgz91y$_0 = false;\n }\n Object.defineProperty(GeomInteractionBuilder.prototype, 'ignoreInvisibleTargets', {\n configurable: true,\n get: function () {\n return this.ignoreInvisibleTargets_ddo194$_0;\n },\n set: function (ignoreInvisibleTargets) {\n this.ignoreInvisibleTargets_ddo194$_0 = ignoreInvisibleTargets;\n }\n });\n Object.defineProperty(GeomInteractionBuilder.prototype, 'tooltipConstants', {\n configurable: true,\n get: function () {\n return this.tooltipConstants_xwrflf$_0;\n },\n set: function (tooltipConstants) {\n this.tooltipConstants_xwrflf$_0 = tooltipConstants;\n }\n });\n Object.defineProperty(GeomInteractionBuilder.prototype, 'isCrosshairEnabled', {\n configurable: true,\n get: function () {\n return this.isCrosshairEnabled_vgz91y$_0;\n },\n set: function (isCrosshairEnabled) {\n this.isCrosshairEnabled_vgz91y$_0 = isCrosshairEnabled;\n }\n });\n Object.defineProperty(GeomInteractionBuilder.prototype, 'tooltipLines', {\n configurable: true,\n get: function () {\n return GeomInteractionBuilderUtil_getInstance().createTooltipLines_ntnr8o$(this.myUserTooltipSpec_0, this.tooltipAes_0, this.tooltipAxisAes_0, this.tooltipOutlierAes_0, this.tooltipConstants);\n }\n });\n Object.defineProperty(GeomInteractionBuilder.prototype, 'tooltipProperties', {\n configurable: true,\n get: function () {\n var tmp$, tmp$_0;\n return (tmp$_0 = (tmp$ = this.myUserTooltipSpec_0) != null ? tmp$.tooltipProperties : null) != null ? tmp$_0 : TooltipSpecification$TooltipProperties$Companion_getInstance().NONE;\n }\n });\n Object.defineProperty(GeomInteractionBuilder.prototype, 'tooltipTitle', {\n configurable: true,\n get: function () {\n var tmp$;\n return (tmp$ = this.myUserTooltipSpec_0) != null ? tmp$.tooltipTitle : null;\n }\n });\n GeomInteractionBuilder.prototype.tooltipConstants_ayg7dr$ = function (v) {\n this.tooltipConstants = v;\n return this;\n };\n GeomInteractionBuilder.prototype.tooltipLinesSpec_uvmyj9$ = function (v) {\n this.myUserTooltipSpec_0 = v;\n return this;\n };\n GeomInteractionBuilder.prototype.enableCrosshair_6taknv$ = function (v) {\n this.isCrosshairEnabled = v;\n return this;\n };\n GeomInteractionBuilder.prototype.ignoreInvisibleTargets_6taknv$ = function (v) {\n this.ignoreInvisibleTargets = v;\n return this;\n };\n GeomInteractionBuilder.prototype.build = function () {\n return new GeomInteraction(this);\n };\n function GeomInteractionBuilder$DemoAndTest(supportedAes, axisAes) {\n if (axisAes === void 0)\n axisAes = null;\n this.supportedAes_0 = supportedAes;\n this.axisAes_0 = axisAes;\n }\n GeomInteractionBuilder$DemoAndTest.prototype.univariateFunction_7k7ojo$ = function (lookupStrategy) {\n return this.createBuilder_0(GeomTooltipSetup$Companion_getInstance().univariateFunction_ahqhwk$(lookupStrategy));\n };\n GeomInteractionBuilder$DemoAndTest.prototype.bivariateFunction_6taknv$ = function (area) {\n return this.createBuilder_0(GeomTooltipSetup$Companion_getInstance().bivariateFunction_xss3$(area));\n };\n GeomInteractionBuilder$DemoAndTest.prototype.createBuilder_0 = function (geomTooltipSetup) {\n var tmp$;\n return new GeomInteractionBuilder(geomTooltipSetup.locatorLookupSpace, geomTooltipSetup.locatorLookupStrategy, minus_0(this.supportedAes_0, geomTooltipSetup.axisAesFromFunctionKind), (tmp$ = this.axisAes_0) != null ? tmp$ : !geomTooltipSetup.axisTooltipEnabled ? emptyList() : geomTooltipSetup.axisAesFromFunctionKind, emptyList());\n };\n GeomInteractionBuilder$DemoAndTest.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'DemoAndTest',\n interfaces: []\n };\n GeomInteractionBuilder.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GeomInteractionBuilder',\n interfaces: []\n };\n function GeomInteractionBuilderUtil() {\n GeomInteractionBuilderUtil_instance = this;\n }\n GeomInteractionBuilderUtil.prototype.createTooltipLines_ntnr8o$ = function (userTooltipSpec, tooltipAes, tooltipAxisAes, sideTooltipAes, tooltipConstantAes) {\n var tmp$;\n if (userTooltipSpec == null)\n tmp$ = this.defaultValueSourceTooltipLines_l73v50$(tooltipAes, tooltipAxisAes, sideTooltipAes, null, tooltipConstantAes);\n else if (userTooltipSpec.useDefaultTooltips())\n tmp$ = this.defaultValueSourceTooltipLines_l73v50$(tooltipAes, tooltipAxisAes, sideTooltipAes, userTooltipSpec.valueSources, tooltipConstantAes);\n else if (userTooltipSpec.hideTooltips())\n tmp$ = emptyList();\n else {\n var geomOutliers = toMutableList(sideTooltipAes);\n var tmp$_0;\n tmp$_0 = ensureNotNull(userTooltipSpec.tooltipLinePatterns).iterator();\n while (tmp$_0.hasNext()) {\n var element = tmp$_0.next();\n var $receiver = element.fields;\n var destination = ArrayList_init();\n var tmp$_1;\n tmp$_1 = $receiver.iterator();\n while (tmp$_1.hasNext()) {\n var element_0 = tmp$_1.next();\n if (Kotlin.isType(element_0, MappingValue))\n destination.add_11rb$(element_0);\n }\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(destination, 10));\n var tmp$_2;\n tmp$_2 = destination.iterator();\n while (tmp$_2.hasNext()) {\n var item = tmp$_2.next();\n destination_0.add_11rb$(item.aes);\n }\n var userDataAesList = destination_0;\n geomOutliers.removeAll_brywnq$(userDataAesList);\n }\n var destination_1 = ArrayList_init_0(collectionSizeOrDefault(tooltipAxisAes, 10));\n var tmp$_3;\n tmp$_3 = tooltipAxisAes.iterator();\n while (tmp$_3.hasNext()) {\n var item_0 = tmp$_3.next();\n destination_1.add_11rb$(this.getMappingValueSource_0(item_0, true, true, userTooltipSpec.valueSources));\n }\n var axisValueSources = destination_1;\n var destination_2 = ArrayList_init_0(collectionSizeOrDefault(geomOutliers, 10));\n var tmp$_4;\n tmp$_4 = geomOutliers.iterator();\n while (tmp$_4.hasNext()) {\n var item_1 = tmp$_4.next();\n destination_2.add_11rb$(this.getMappingValueSource_0(item_1, true, false, userTooltipSpec.valueSources));\n }\n var geomOutlierValueSources = destination_2;\n var tmp$_5 = userTooltipSpec.tooltipLinePatterns;\n var $receiver_0 = plus(axisValueSources, geomOutlierValueSources);\n var transform = getCallableRef('defaultLineForValueSource', function ($receiver, p1) {\n return $receiver.defaultLineForValueSource_u47np3$(p1);\n }.bind(null, TooltipLine$Companion_getInstance()));\n var destination_3 = ArrayList_init_0(collectionSizeOrDefault($receiver_0, 10));\n var tmp$_6;\n tmp$_6 = $receiver_0.iterator();\n while (tmp$_6.hasNext()) {\n var item_2 = tmp$_6.next();\n destination_3.add_11rb$(transform(item_2));\n }\n tmp$ = plus(tmp$_5, destination_3);\n }\n return tmp$;\n };\n GeomInteractionBuilderUtil.prototype.getMappingValueSource_0 = function (aes, isOutlier, isAxis, userDefinedValueSources) {\n var tmp$, tmp$_0;\n var tmp$_1;\n if (userDefinedValueSources != null) {\n var destination = ArrayList_init();\n var tmp$_2;\n tmp$_2 = userDefinedValueSources.iterator();\n while (tmp$_2.hasNext()) {\n var element = tmp$_2.next();\n if (Kotlin.isType(element, MappingValue))\n destination.add_11rb$(element);\n }\n tmp$_1 = destination;\n } else\n tmp$_1 = null;\n var tmp$_3;\n if ((tmp$ = tmp$_1) != null) {\n var firstOrNull$result;\n firstOrNull$break: do {\n var tmp$_4;\n tmp$_4 = tmp$.iterator();\n while (tmp$_4.hasNext()) {\n var element_0 = tmp$_4.next();\n if (equals(element_0.aes, aes)) {\n firstOrNull$result = element_0;\n break firstOrNull$break;\n }\n }\n firstOrNull$result = null;\n }\n while (false);\n tmp$_3 = firstOrNull$result;\n } else\n tmp$_3 = null;\n var userDefined = tmp$_3;\n return (tmp$_0 = userDefined != null ? userDefined.withFlags_dqye30$(isOutlier, isAxis) : null) != null ? tmp$_0 : new MappingValue(aes, isOutlier, isAxis);\n };\n GeomInteractionBuilderUtil.prototype.defaultValueSourceTooltipLines_l73v50$ = function (aesListForTooltip, axisAes, outliers, userDefinedValueSources, constantsMap) {\n if (userDefinedValueSources === void 0)\n userDefinedValueSources = null;\n if (constantsMap === void 0)\n constantsMap = null;\n var tmp$;\n var destination = ArrayList_init_0(collectionSizeOrDefault(axisAes, 10));\n var tmp$_0;\n tmp$_0 = axisAes.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n destination.add_11rb$(this.getMappingValueSource_0(item, true, true, userDefinedValueSources));\n }\n var axisValueSources = destination;\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(outliers, 10));\n var tmp$_1;\n tmp$_1 = outliers.iterator();\n while (tmp$_1.hasNext()) {\n var item_0 = tmp$_1.next();\n destination_0.add_11rb$(this.getMappingValueSource_0(item_0, true, false, userDefinedValueSources));\n }\n var outlierValueSources = destination_0;\n var destination_1 = ArrayList_init_0(collectionSizeOrDefault(aesListForTooltip, 10));\n var tmp$_2;\n tmp$_2 = aesListForTooltip.iterator();\n while (tmp$_2.hasNext()) {\n var item_1 = tmp$_2.next();\n destination_1.add_11rb$(this.getMappingValueSource_0(item_1, false, false, userDefinedValueSources));\n }\n var aesValueSources = destination_1;\n var tmp$_3;\n if (constantsMap != null) {\n var destination_2 = ArrayList_init_0(constantsMap.size);\n var tmp$_4;\n tmp$_4 = constantsMap.entries.iterator();\n while (tmp$_4.hasNext()) {\n var item_2 = tmp$_4.next();\n var tmp$_5 = destination_2.add_11rb$;\n var aes = item_2.key;\n var value = item_2.value;\n tmp$_5.call(destination_2, new ConstantValue(aes, value, null));\n }\n tmp$_3 = destination_2;\n } else\n tmp$_3 = null;\n var constantValues = (tmp$ = tmp$_3) != null ? tmp$ : emptyList();\n var $receiver = plus(plus(plus(aesValueSources, axisValueSources), outlierValueSources), constantValues);\n var transform = getCallableRef('defaultLineForValueSource', function ($receiver, p1) {\n return $receiver.defaultLineForValueSource_u47np3$(p1);\n }.bind(null, TooltipLine$Companion_getInstance()));\n var destination_3 = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$_6;\n tmp$_6 = $receiver.iterator();\n while (tmp$_6.hasNext()) {\n var item_3 = tmp$_6.next();\n destination_3.add_11rb$(transform(item_3));\n }\n return destination_3;\n };\n GeomInteractionBuilderUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'GeomInteractionBuilderUtil',\n interfaces: []\n };\n var GeomInteractionBuilderUtil_instance = null;\n function GeomInteractionBuilderUtil_getInstance() {\n if (GeomInteractionBuilderUtil_instance === null) {\n new GeomInteractionBuilderUtil();\n }\n return GeomInteractionBuilderUtil_instance;\n }\n function GeomTooltipSetup(locatorLookupSpace, locatorLookupStrategy, axisAesFromFunctionKind, axisTooltipVisibilityFromFunctionKind, axisTooltipEnabled) {\n GeomTooltipSetup$Companion_getInstance();\n this.locatorLookupSpace = locatorLookupSpace;\n this.locatorLookupStrategy = locatorLookupStrategy;\n this.axisAesFromFunctionKind = axisAesFromFunctionKind;\n this.axisTooltipVisibilityFromFunctionKind = axisTooltipVisibilityFromFunctionKind;\n this.axisTooltipEnabled = axisTooltipEnabled;\n }\n GeomTooltipSetup.prototype.toMultilayerLookupStrategy = function () {\n var tmp$;\n tmp$ = GeomTargetLocator$LookupStrategy.NEAREST;\n return new GeomTooltipSetup(GeomTargetLocator$LookupSpace.XY, tmp$, this.axisAesFromFunctionKind, this.axisTooltipVisibilityFromFunctionKind, this.axisTooltipEnabled);\n };\n function GeomTooltipSetup$Companion() {\n GeomTooltipSetup$Companion_instance = this;\n this.AREA_GEOM = true;\n this.NON_AREA_GEOM = false;\n this.AES_X_0 = listOf(Aes.Companion.X);\n this.AES_XY_0 = listOf_0([Aes.Companion.X, Aes.Companion.Y]);\n }\n GeomTooltipSetup$Companion.prototype.univariateFunction_ahqhwk$ = function (lookupStrategy, axisTooltipVisibilityFromConfig) {\n if (axisTooltipVisibilityFromConfig === void 0)\n axisTooltipVisibilityFromConfig = null;\n var axisTooltipVisibilityFromFunctionKind = true;\n return new GeomTooltipSetup(GeomTargetLocator$LookupSpace.X, lookupStrategy, this.AES_X_0, axisTooltipVisibilityFromFunctionKind, this.isAxisTooltipEnabled_0(axisTooltipVisibilityFromConfig, axisTooltipVisibilityFromFunctionKind));\n };\n GeomTooltipSetup$Companion.prototype.bivariateFunction_xss3$ = function (area, axisTooltipVisibilityFromConfig) {\n if (axisTooltipVisibilityFromConfig === void 0)\n axisTooltipVisibilityFromConfig = null;\n var tmp$;\n var axisTooltipVisibilityFromFunctionKind = !area;\n if (area) {\n tmp$ = GeomTargetLocator$LookupStrategy.HOVER;\n } else {\n tmp$ = GeomTargetLocator$LookupStrategy.NEAREST;\n }\n var locatorLookupStrategy = tmp$;\n return new GeomTooltipSetup(GeomTargetLocator$LookupSpace.XY, locatorLookupStrategy, this.AES_XY_0, axisTooltipVisibilityFromFunctionKind, this.isAxisTooltipEnabled_0(axisTooltipVisibilityFromConfig, axisTooltipVisibilityFromFunctionKind));\n };\n GeomTooltipSetup$Companion.prototype.none = function () {\n var tmp$;\n var axisTooltipVisibilityFromFunctionKind = true;\n tmp$ = GeomTargetLocator$LookupStrategy.NONE;\n return new GeomTooltipSetup(GeomTargetLocator$LookupSpace.NONE, tmp$, emptyList(), axisTooltipVisibilityFromFunctionKind, this.isAxisTooltipEnabled_0(null, axisTooltipVisibilityFromFunctionKind));\n };\n GeomTooltipSetup$Companion.prototype.isAxisTooltipEnabled_0 = function (axisTooltipVisibilityFromConfig, axisTooltipVisibilityFromFunctionKind) {\n return axisTooltipVisibilityFromConfig != null ? axisTooltipVisibilityFromConfig : axisTooltipVisibilityFromFunctionKind;\n };\n GeomTooltipSetup$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var GeomTooltipSetup$Companion_instance = null;\n function GeomTooltipSetup$Companion_getInstance() {\n if (GeomTooltipSetup$Companion_instance === null) {\n new GeomTooltipSetup$Companion();\n }\n return GeomTooltipSetup$Companion_instance;\n }\n GeomTooltipSetup.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GeomTooltipSetup',\n interfaces: []\n };\n function MathUtil() {\n MathUtil_instance = this;\n }\n MathUtil.prototype.polygonContainsCoordinate_sz9prc$ = function (points, coord) {\n var tmp$;\n var intersectionCount = 0;\n tmp$ = points.size;\n for (var i = 1; i < tmp$; i++) {\n var start = points.get_za3lpa$(i - 1 | 0);\n var end = points.get_za3lpa$(i);\n if (start.y >= coord.y && end.y >= coord.y || (start.y < coord.y && end.y < coord.y)) {\n continue;\n }\n var x = start.x + (coord.y - start.y) * (end.x - start.x) / (end.y - start.y);\n if (x <= coord.x) {\n intersectionCount = intersectionCount + 1 | 0;\n }\n }\n return (intersectionCount % 2 | 0) !== 0;\n };\n MathUtil.prototype.liesOnSegment_e9v9yt$ = function (p1, p2, c, epsilon) {\n return (new DoubleSegment(p1, p2)).distance_gpjtzr$(c) < epsilon;\n };\n MathUtil.prototype.areEqual_f1g2it$ = function (p1, p2, epsilon) {\n return p1.subtract_gpjtzr$(p2).length() < epsilon;\n };\n MathUtil.prototype.areEqual_hln2n9$ = function (a, b, epsilon) {\n var x = a - b;\n return JsMath.abs(x) < epsilon;\n };\n MathUtil.prototype.distance_l9poh5$ = function (p1, p2) {\n return (new DoubleSegment(p1, p2)).length();\n };\n MathUtil.prototype.subtractX_l3ea4i$ = function (v, x) {\n return new DoubleVector(v.x - x, v.y);\n };\n MathUtil.prototype.addX_l3ea4i$ = function (v, x) {\n return new DoubleVector(v.x + x, v.y);\n };\n MathUtil.prototype.leftEdgeOf_wthzt5$ = function (rect) {\n return new DoubleSegment(new DoubleVector(rect.left, rect.top), new DoubleVector(rect.left, rect.bottom));\n };\n MathUtil.prototype.topEdgeOf_wthzt5$ = function (rect) {\n return new DoubleSegment(new DoubleVector(rect.left, rect.top), new DoubleVector(rect.right, rect.top));\n };\n MathUtil.prototype.rightEdgeOf_wthzt5$ = function (rect) {\n return new DoubleSegment(new DoubleVector(rect.right, rect.top), new DoubleVector(rect.right, rect.bottom));\n };\n MathUtil.prototype.bottomEdgeOf_wthzt5$ = function (rect) {\n return new DoubleSegment(new DoubleVector(rect.left, rect.bottom), new DoubleVector(rect.right, rect.bottom));\n };\n function MathUtil$ClosestPointChecker(target) {\n this.target = target;\n this.distance_pberzz$_0 = -1.0;\n this.coord_ovwx85$_0 = null;\n }\n Object.defineProperty(MathUtil$ClosestPointChecker.prototype, 'distance', {\n configurable: true,\n get: function () {\n return this.distance_pberzz$_0;\n },\n set: function (distance) {\n this.distance_pberzz$_0 = distance;\n }\n });\n Object.defineProperty(MathUtil$ClosestPointChecker.prototype, 'coord', {\n configurable: true,\n get: function () {\n return this.coord_ovwx85$_0;\n },\n set: function (coord) {\n this.coord_ovwx85$_0 = coord;\n }\n });\n MathUtil$ClosestPointChecker.prototype.check_gpjtzr$ = function (coord) {\n var cmpResult = this.compare_gpjtzr$(coord);\n return cmpResult === MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_CLOSER_getInstance() || cmpResult === MathUtil$ClosestPointChecker$COMPARISON_RESULT$EQUAL_getInstance();\n };\n MathUtil$ClosestPointChecker.prototype.compare_gpjtzr$ = function (coord) {\n var newDistance = MathUtil_getInstance().distance_l9poh5$(this.target, coord);\n if (this.distance < 0) {\n this.setNewClosestCoord_0(coord, newDistance);\n return MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_CLOSER_getInstance();\n }\n if (this.distance < newDistance) {\n return MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_FARTHER_getInstance();\n }\n if (this.distance === newDistance) {\n return MathUtil$ClosestPointChecker$COMPARISON_RESULT$EQUAL_getInstance();\n }\n this.setNewClosestCoord_0(coord, newDistance);\n return MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_CLOSER_getInstance();\n };\n MathUtil$ClosestPointChecker.prototype.setNewClosestCoord_0 = function (coord, distance) {\n this.distance = distance;\n this.coord = coord;\n };\n function MathUtil$ClosestPointChecker$COMPARISON_RESULT(name, ordinal) {\n Enum.call(this);\n this.name$ = name;\n this.ordinal$ = ordinal;\n }\n function MathUtil$ClosestPointChecker$COMPARISON_RESULT_initFields() {\n MathUtil$ClosestPointChecker$COMPARISON_RESULT_initFields = function () {\n };\n MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_CLOSER_instance = new MathUtil$ClosestPointChecker$COMPARISON_RESULT('NEW_CLOSER', 0);\n MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_FARTHER_instance = new MathUtil$ClosestPointChecker$COMPARISON_RESULT('NEW_FARTHER', 1);\n MathUtil$ClosestPointChecker$COMPARISON_RESULT$EQUAL_instance = new MathUtil$ClosestPointChecker$COMPARISON_RESULT('EQUAL', 2);\n }\n var MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_CLOSER_instance;\n function MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_CLOSER_getInstance() {\n MathUtil$ClosestPointChecker$COMPARISON_RESULT_initFields();\n return MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_CLOSER_instance;\n }\n var MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_FARTHER_instance;\n function MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_FARTHER_getInstance() {\n MathUtil$ClosestPointChecker$COMPARISON_RESULT_initFields();\n return MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_FARTHER_instance;\n }\n var MathUtil$ClosestPointChecker$COMPARISON_RESULT$EQUAL_instance;\n function MathUtil$ClosestPointChecker$COMPARISON_RESULT$EQUAL_getInstance() {\n MathUtil$ClosestPointChecker$COMPARISON_RESULT_initFields();\n return MathUtil$ClosestPointChecker$COMPARISON_RESULT$EQUAL_instance;\n }\n MathUtil$ClosestPointChecker$COMPARISON_RESULT.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'COMPARISON_RESULT',\n interfaces: [Enum]\n };\n function MathUtil$ClosestPointChecker$COMPARISON_RESULT$values() {\n return [MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_CLOSER_getInstance(), MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_FARTHER_getInstance(), MathUtil$ClosestPointChecker$COMPARISON_RESULT$EQUAL_getInstance()];\n }\n MathUtil$ClosestPointChecker$COMPARISON_RESULT.values = MathUtil$ClosestPointChecker$COMPARISON_RESULT$values;\n function MathUtil$ClosestPointChecker$COMPARISON_RESULT$valueOf(name) {\n switch (name) {\n case 'NEW_CLOSER':\n return MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_CLOSER_getInstance();\n case 'NEW_FARTHER':\n return MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_FARTHER_getInstance();\n case 'EQUAL':\n return MathUtil$ClosestPointChecker$COMPARISON_RESULT$EQUAL_getInstance();\n default:\n throwISE('No enum constant jetbrains.datalore.plot.builder.interact.MathUtil.ClosestPointChecker.COMPARISON_RESULT.' + name);\n }\n }\n MathUtil$ClosestPointChecker$COMPARISON_RESULT.valueOf_61zpoe$ = MathUtil$ClosestPointChecker$COMPARISON_RESULT$valueOf;\n MathUtil$ClosestPointChecker.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ClosestPointChecker',\n interfaces: []\n };\n function MathUtil$MathUtil$ClosestPointChecker_init(x, y, $this) {\n $this = $this || Object.create(MathUtil$ClosestPointChecker.prototype);\n MathUtil$ClosestPointChecker.call($this, new DoubleVector(x, y));\n return $this;\n }\n MathUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'MathUtil',\n interfaces: []\n };\n var MathUtil_instance = null;\n function MathUtil_getInstance() {\n if (MathUtil_instance === null) {\n new MathUtil();\n }\n return MathUtil_instance;\n }\n function PlotInteractor() {\n }\n PlotInteractor.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'PlotInteractor',\n interfaces: [Disposable]\n };\n function TooltipSpec(layoutHint, title, lines, fill, markerColors, isOutlier, anchor, minWidth, isCrosshairEnabled) {\n if (anchor === void 0)\n anchor = null;\n if (minWidth === void 0)\n minWidth = null;\n if (isCrosshairEnabled === void 0)\n isCrosshairEnabled = false;\n this.layoutHint = layoutHint;\n this.title = title;\n this.lines = lines;\n this.fill = fill;\n this.markerColors = markerColors;\n this.isOutlier = isOutlier;\n this.anchor = anchor;\n this.minWidth = minWidth;\n this.isCrosshairEnabled = isCrosshairEnabled;\n }\n TooltipSpec.prototype.toString = function () {\n var tmp$ = 'TooltipSpec(' + this.layoutHint + ', lines=';\n var $receiver = this.lines;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$_0;\n tmp$_0 = $receiver.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n destination.add_11rb$(item.toString());\n }\n return tmp$ + destination + ')';\n };\n function TooltipSpec$Line(label, value) {\n TooltipSpec$Line$Companion_getInstance();\n this.label = label;\n this.value = value;\n }\n TooltipSpec$Line.prototype.toString = function () {\n var $receiver = this.label;\n return $receiver == null || $receiver.length === 0 ? this.value : toString(this.label) + ': ' + this.value;\n };\n function TooltipSpec$Line$Companion() {\n TooltipSpec$Line$Companion_instance = this;\n }\n TooltipSpec$Line$Companion.prototype.withValue_61zpoe$ = function (value) {\n return new TooltipSpec$Line(null, value);\n };\n TooltipSpec$Line$Companion.prototype.withLabelAndValue_f5e6j7$ = function (label, value) {\n return new TooltipSpec$Line(label, value);\n };\n TooltipSpec$Line$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var TooltipSpec$Line$Companion_instance = null;\n function TooltipSpec$Line$Companion_getInstance() {\n if (TooltipSpec$Line$Companion_instance === null) {\n new TooltipSpec$Line$Companion();\n }\n return TooltipSpec$Line$Companion_instance;\n }\n TooltipSpec$Line.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'Line',\n interfaces: []\n };\n TooltipSpec.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TooltipSpec',\n interfaces: []\n };\n function TooltipSpecFactory(contextualMapping, axisOrigin, flippedAxis, xAxisTheme, yAxisTheme) {\n this.contextualMapping_0 = contextualMapping;\n this.axisOrigin_0 = axisOrigin;\n this.flippedAxis_0 = flippedAxis;\n this.xAxisTheme_0 = xAxisTheme;\n this.yAxisTheme_0 = yAxisTheme;\n }\n TooltipSpecFactory.prototype.create_obwj3p$ = function (geomTarget, ctx) {\n return ArrayList_init_1((new TooltipSpecFactory$Helper(this, geomTarget, this.flippedAxis_0, ctx)).createTooltipSpecs_8be2vx$());\n };\n function TooltipSpecFactory$Helper($outer, myGeomTarget, flippedAxis, ctx) {\n this.$outer = $outer;\n this.myGeomTarget_0 = myGeomTarget;\n this.flippedAxis_0 = flippedAxis;\n this.myDataPoints_0 = this.$outer.contextualMapping_0.getDataPoints_o6b7hq$(this.hitIndex_0(), ctx);\n this.myTooltipAnchor_0 = this.$outer.contextualMapping_0.tooltipAnchor;\n this.myTooltipMinWidth_0 = this.$outer.contextualMapping_0.tooltipMinWidth;\n this.myIsCrosshairEnabled_0 = this.$outer.contextualMapping_0.isCrosshairEnabled;\n this.myTooltipTitle_0 = this.$outer.contextualMapping_0.getTitle_o6b7hq$(this.hitIndex_0(), ctx);\n }\n TooltipSpecFactory$Helper.prototype.createTooltipSpecs_8be2vx$ = function () {\n var tooltipSpecs = ArrayList_init();\n addAll(tooltipSpecs, this.axisTooltipSpec_0());\n addAll(tooltipSpecs, this.outlierTooltipSpec_0());\n addAll(tooltipSpecs, this.generalTooltipSpec_0());\n return tooltipSpecs;\n };\n TooltipSpecFactory$Helper.prototype.hitIndex_0 = function () {\n return this.myGeomTarget_0.hitIndex;\n };\n TooltipSpecFactory$Helper.prototype.tipLayoutHint_0 = function () {\n return this.myGeomTarget_0.tipLayoutHint;\n };\n TooltipSpecFactory$Helper.prototype.outlierHints_0 = function () {\n return this.myGeomTarget_0.aesTipLayoutHints;\n };\n TooltipSpecFactory$Helper.prototype.outlierTooltipSpec_0 = function () {\n var tooltipSpecs = ArrayList_init();\n var outlierDataPoints = this.outlierDataPoints_0();\n var tmp$;\n tmp$ = this.outlierHints_0().entries.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n var aes = element.key;\n var hint = element.value;\n var tmp$_0, tmp$_1, tmp$_2;\n var destination = ArrayList_init();\n var tmp$_3;\n tmp$_3 = outlierDataPoints.iterator();\n while (tmp$_3.hasNext()) {\n var element_0 = tmp$_3.next();\n if (equals(aes, element_0.aes))\n destination.add_11rb$(element_0);\n }\n var transform = getPropertyCallableRef('value', 1, function ($receiver) {\n return $receiver.value;\n });\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(destination, 10));\n var tmp$_4;\n tmp$_4 = destination.iterator();\n while (tmp$_4.hasNext()) {\n var item = tmp$_4.next();\n destination_0.add_11rb$(transform(item));\n }\n var transform_0 = getCallableRef('withValue', function ($receiver, p1) {\n return $receiver.withValue_61zpoe$(p1);\n }.bind(null, TooltipSpec$Line$Companion_getInstance()));\n var destination_1 = ArrayList_init_0(collectionSizeOrDefault(destination_0, 10));\n var tmp$_5;\n tmp$_5 = destination_0.iterator();\n while (tmp$_5.hasNext()) {\n var item_0 = tmp$_5.next();\n destination_1.add_11rb$(transform_0(item_0));\n }\n var linesForAes = destination_1;\n if (!linesForAes.isEmpty()) {\n tooltipSpecs.add_11rb$(new TooltipSpec(hint, null, linesForAes, (tmp$_2 = (tmp$_1 = (tmp$_0 = hint.fillColor) != null ? tmp$_0 : this.tipLayoutHint_0().fillColor) != null ? tmp$_1 : firstOrNull(this.tipLayoutHint_0().markerColors)) != null ? tmp$_2 : Color.Companion.WHITE, emptyList(), true));\n }\n }\n return tooltipSpecs;\n };\n TooltipSpecFactory$Helper.prototype.axisTooltipSpec_0 = function () {\n var tooltipSpecs = ArrayList_init();\n var tmp$ = Aes.Companion.X;\n var $receiver = this.axisDataPoints_0();\n var destination = ArrayList_init();\n var tmp$_0;\n tmp$_0 = $receiver.iterator();\n while (tmp$_0.hasNext()) {\n var element = tmp$_0.next();\n if (equals(Aes.Companion.X, element.aes))\n destination.add_11rb$(element);\n }\n var transform = getPropertyCallableRef('value', 1, function ($receiver) {\n return $receiver.value;\n });\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(destination, 10));\n var tmp$_1;\n tmp$_1 = destination.iterator();\n while (tmp$_1.hasNext()) {\n var item = tmp$_1.next();\n destination_0.add_11rb$(transform(item));\n }\n var transform_0 = getCallableRef('withValue', function ($receiver, p1) {\n return $receiver.withValue_61zpoe$(p1);\n }.bind(null, TooltipSpec$Line$Companion_getInstance()));\n var destination_1 = ArrayList_init_0(collectionSizeOrDefault(destination_0, 10));\n var tmp$_2;\n tmp$_2 = destination_0.iterator();\n while (tmp$_2.hasNext()) {\n var item_0 = tmp$_2.next();\n destination_1.add_11rb$(transform_0(item_0));\n }\n var tmp$_3 = to(tmp$, destination_1);\n var tmp$_4 = Aes.Companion.Y;\n var $receiver_0 = this.axisDataPoints_0();\n var destination_2 = ArrayList_init();\n var tmp$_5;\n tmp$_5 = $receiver_0.iterator();\n while (tmp$_5.hasNext()) {\n var element_0 = tmp$_5.next();\n if (equals(Aes.Companion.Y, element_0.aes))\n destination_2.add_11rb$(element_0);\n }\n var transform_1 = getPropertyCallableRef('value', 1, function ($receiver) {\n return $receiver.value;\n });\n var destination_3 = ArrayList_init_0(collectionSizeOrDefault(destination_2, 10));\n var tmp$_6;\n tmp$_6 = destination_2.iterator();\n while (tmp$_6.hasNext()) {\n var item_1 = tmp$_6.next();\n destination_3.add_11rb$(transform_1(item_1));\n }\n var transform_2 = getCallableRef('withValue', function ($receiver, p1) {\n return $receiver.withValue_61zpoe$(p1);\n }.bind(null, TooltipSpec$Line$Companion_getInstance()));\n var destination_4 = ArrayList_init_0(collectionSizeOrDefault(destination_3, 10));\n var tmp$_7;\n tmp$_7 = destination_3.iterator();\n while (tmp$_7.hasNext()) {\n var item_2 = tmp$_7.next();\n destination_4.add_11rb$(transform_2(item_2));\n }\n var axis = mapOf([tmp$_3, to(tmp$_4, destination_4)]);\n var tmp$_8;\n tmp$_8 = axis.entries.iterator();\n while (tmp$_8.hasNext()) {\n var element_1 = tmp$_8.next();\n var aes = element_1.key;\n var lines = element_1.value;\n if (!lines.isEmpty()) {\n var layoutHint = this.createHintForAxis_0(aes, this.flippedAxis_0);\n tooltipSpecs.add_11rb$(new TooltipSpec(layoutHint, null, lines, ensureNotNull(layoutHint.fillColor), emptyList(), true));\n }\n }\n return tooltipSpecs;\n };\n TooltipSpecFactory$Helper.prototype.generalTooltipSpec_0 = function () {\n var tmp$;\n var generalDataPoints = this.generalDataPoints_0();\n var destination = ArrayList_init_0(collectionSizeOrDefault(generalDataPoints, 10));\n var tmp$_0;\n tmp$_0 = generalDataPoints.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n destination.add_11rb$(TooltipSpec$Line$Companion_getInstance().withLabelAndValue_f5e6j7$(item.label, item.value));\n }\n var generalLines = destination;\n if (!generalLines.isEmpty()) {\n tmp$ = listOf(new TooltipSpec(this.tipLayoutHint_0(), this.myTooltipTitle_0, generalLines, null, this.tipLayoutHint_0().markerColors, false, this.myTooltipAnchor_0, this.myTooltipMinWidth_0, this.myIsCrosshairEnabled_0));\n } else {\n tmp$ = emptyList();\n }\n return tmp$;\n };\n TooltipSpecFactory$Helper.prototype.outlierDataPoints_0 = function () {\n var $receiver = this.myDataPoints_0;\n var destination = ArrayList_init();\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n if (element.isOutlier && !element.isAxis)\n destination.add_11rb$(element);\n }\n return destination;\n };\n TooltipSpecFactory$Helper.prototype.axisDataPoints_0 = function () {\n var $receiver = this.myDataPoints_0;\n var predicate = getPropertyCallableRef('isAxis', 1, function ($receiver) {\n return $receiver.isAxis;\n });\n var destination = ArrayList_init();\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n if (predicate(element))\n destination.add_11rb$(element);\n }\n return destination;\n };\n TooltipSpecFactory$Helper.prototype.generalDataPoints_0 = function () {\n var $receiver = this.myDataPoints_0;\n var predicate = getPropertyCallableRef('isOutlier', 1, function ($receiver) {\n return $receiver.isOutlier;\n });\n var destination = ArrayList_init();\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n if (!predicate(element))\n destination.add_11rb$(element);\n }\n var nonOutlierDataPoints = destination;\n var $receiver_0 = this.outlierDataPoints_0();\n var transform = getPropertyCallableRef('aes', 1, function ($receiver) {\n return $receiver.aes;\n });\n var destination_0 = ArrayList_init();\n var tmp$_0;\n tmp$_0 = $receiver_0.iterator();\n while (tmp$_0.hasNext()) {\n var element_0 = tmp$_0.next();\n var tmp$_0_0;\n if ((tmp$_0_0 = transform(element_0)) != null) {\n destination_0.add_11rb$(tmp$_0_0);\n }\n }\n var outliers = destination_0;\n var transform_0 = getPropertyCallableRef('aes', 1, function ($receiver) {\n return $receiver.aes;\n });\n var destination_1 = ArrayList_init();\n var tmp$_1;\n tmp$_1 = nonOutlierDataPoints.iterator();\n while (tmp$_1.hasNext()) {\n var element_1 = tmp$_1.next();\n var tmp$_0_1;\n if ((tmp$_0_1 = transform_0(element_1)) != null) {\n destination_1.add_11rb$(tmp$_0_1);\n }\n }\n var generalAesList = minus_0(destination_1, outliers);\n var destination_2 = ArrayList_init();\n var tmp$_2;\n tmp$_2 = nonOutlierDataPoints.iterator();\n while (tmp$_2.hasNext()) {\n var element_2 = tmp$_2.next();\n var predicate$result;\n var tmp$_3;\n tmp$_3 = element_2.aes;\n if (tmp$_3 == null) {\n predicate$result = true;\n } else if (contains(generalAesList, tmp$_3)) {\n predicate$result = true;\n } else {\n predicate$result = false;\n }\n if (predicate$result)\n destination_2.add_11rb$(element_2);\n }\n return destination_2;\n };\n TooltipSpecFactory$Helper.prototype.createHintForAxis_0 = function (aes, flippedAxis) {\n var tmp$;\n var block$result;\n if (flippedAxis && equals(aes, Aes.Companion.X)) {\n block$result = Aes.Companion.Y;\n } else if (flippedAxis && equals(aes, Aes.Companion.Y)) {\n block$result = Aes.Companion.X;\n } else {\n block$result = aes;\n }\n var axis = block$result;\n if (equals(axis, Aes.Companion.X))\n tmp$ = TipLayoutHint.Companion.xAxisTooltip_yyg4p0$(new DoubleVector(ensureNotNull(this.tipLayoutHint_0().coord).x, this.$outer.axisOrigin_0.y), Defaults$Common$Tooltip_getInstance().AXIS_RADIUS, void 0, this.$outer.xAxisTheme_0.tooltipFill());\n else if (equals(axis, Aes.Companion.Y))\n tmp$ = TipLayoutHint.Companion.yAxisTooltip_yyg4p0$(new DoubleVector(this.$outer.axisOrigin_0.x, ensureNotNull(this.tipLayoutHint_0().coord).y), Defaults$Common$Tooltip_getInstance().AXIS_RADIUS, void 0, this.$outer.yAxisTheme_0.tooltipFill());\n else {\n throw IllegalStateException_init(('Not an axis aes: ' + axis).toString());\n }\n return tmp$;\n };\n TooltipSpecFactory$Helper.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'Helper',\n interfaces: []\n };\n TooltipSpecFactory.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TooltipSpecFactory',\n interfaces: []\n };\n function FlippedTargetCollector(targetCollector) {\n this.targetCollector_0 = targetCollector;\n }\n FlippedTargetCollector.prototype.addPoint_cnsimy$$default = function (index, point, radius, tooltipParams, tooltipKind) {\n this.targetCollector_0.addPoint_cnsimy$(index, point.flip(), radius, tooltipParams, tooltipKind);\n };\n FlippedTargetCollector.prototype.addRectangle_bxzvr8$$default = function (index, rectangle, tooltipParams, tooltipKind) {\n this.targetCollector_0.addRectangle_bxzvr8$(index, rectangle.flip(), tooltipParams, tooltipKind);\n };\n function FlippedTargetCollector$addPath$lambda(closure$indices) {\n return function (it) {\n return closure$indices.get_za3lpa$(it);\n };\n }\n FlippedTargetCollector.prototype.addPath_sa5m83$$default = function (points, localToGlobalIndex, tooltipParams, tooltipKind) {\n var destination = ArrayList_init_0(collectionSizeOrDefault(points, 10));\n var tmp$;\n tmp$ = points.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n destination.add_11rb$(item.flip());\n }\n var pointsWithIndex = reversed(withIndex(destination));\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(pointsWithIndex, 10));\n var tmp$_0;\n tmp$_0 = pointsWithIndex.iterator();\n while (tmp$_0.hasNext()) {\n var item_0 = tmp$_0.next();\n destination_0.add_11rb$(localToGlobalIndex(item_0.index));\n }\n var indices = destination_0;\n var tmp$_1 = this.targetCollector_0;\n var transform = getPropertyCallableRef('value', 1, function ($receiver) {\n return $receiver.value;\n });\n var destination_1 = ArrayList_init_0(collectionSizeOrDefault(pointsWithIndex, 10));\n var tmp$_2;\n tmp$_2 = pointsWithIndex.iterator();\n while (tmp$_2.hasNext()) {\n var item_1 = tmp$_2.next();\n destination_1.add_11rb$(transform(item_1));\n }\n tmp$_1.addPath_sa5m83$(destination_1, FlippedTargetCollector$addPath$lambda(indices), tooltipParams, tooltipKind);\n };\n FlippedTargetCollector.prototype.addPolygon_sa5m83$$default = function (points, localToGlobalIndex, tooltipParams, tooltipKind) {\n var tmp$ = this.targetCollector_0;\n var destination = ArrayList_init_0(collectionSizeOrDefault(points, 10));\n var tmp$_0;\n tmp$_0 = points.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n destination.add_11rb$(item.flip());\n }\n tmp$.addPolygon_sa5m83$(destination, localToGlobalIndex, tooltipParams, tooltipKind);\n };\n FlippedTargetCollector.prototype.withFlippedAxis = function () {\n throw IllegalStateException_init(\"'withFlippedAxis()' is not applicable to FlippedTargetCollector\");\n };\n FlippedTargetCollector.prototype.withYOrientation = function () {\n if (!!Kotlin.isType(this.targetCollector_0, YOrientationTargetCollector)) {\n var message = \"'withYOrientation()' is not applicable to YOrientationTargetCollector\";\n throw IllegalStateException_init(message.toString());\n }\n return new YOrientationTargetCollector(this);\n };\n FlippedTargetCollector.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'FlippedTargetCollector',\n interfaces: [GeomTargetCollector]\n };\n function LayerTargetCollectorWithLocator(geomKind, lookupSpec, contextualMapping) {\n this.geomKind_0 = geomKind;\n this.lookupSpec_0 = lookupSpec;\n this.contextualMapping_0 = contextualMapping;\n this.myTargets_0 = ArrayList_init();\n this.myLocator_0 = null;\n }\n function LayerTargetCollectorWithLocator$addPoint$lambda(closure$index) {\n return function (it) {\n return closure$index;\n };\n }\n LayerTargetCollectorWithLocator.prototype.addPoint_cnsimy$$default = function (index, point, radius, tooltipParams, tooltipKind) {\n if (this.contextualMapping_0.ignoreInvisibleTargets) {\n var tmp$ = radius === 0.0;\n if (!tmp$) {\n var $receiver = tooltipParams.markerColors;\n var all$result;\n all$break: do {\n var tmp$_0;\n if (Kotlin.isType($receiver, Collection) && $receiver.isEmpty()) {\n all$result = true;\n break all$break;\n }\n tmp$_0 = $receiver.iterator();\n while (tmp$_0.hasNext()) {\n var element = tmp$_0.next();\n if (!(element.alpha === 0)) {\n all$result = false;\n break all$break;\n }\n }\n all$result = true;\n }\n while (false);\n tmp$ = all$result;\n }\n if (tmp$) {\n return;\n }\n }\n this.addTarget_0(new TargetPrototype(HitShape.Companion.point_e1sv3v$(point, radius), LayerTargetCollectorWithLocator$addPoint$lambda(index), tooltipParams, tooltipKind));\n };\n function LayerTargetCollectorWithLocator$addRectangle$lambda(closure$index) {\n return function (it) {\n return closure$index;\n };\n }\n LayerTargetCollectorWithLocator.prototype.addRectangle_bxzvr8$$default = function (index, rectangle, tooltipParams, tooltipKind) {\n if (this.contextualMapping_0.ignoreInvisibleTargets) {\n var tmp$ = rectangle.width === 0.0 || rectangle.height === 0.0;\n if (!tmp$) {\n var $receiver = tooltipParams.markerColors;\n var all$result;\n all$break: do {\n var tmp$_0;\n if (Kotlin.isType($receiver, Collection) && $receiver.isEmpty()) {\n all$result = true;\n break all$break;\n }\n tmp$_0 = $receiver.iterator();\n while (tmp$_0.hasNext()) {\n var element = tmp$_0.next();\n if (!(element.alpha === 0)) {\n all$result = false;\n break all$break;\n }\n }\n all$result = true;\n }\n while (false);\n tmp$ = all$result;\n }\n if (tmp$) {\n return;\n }\n }\n this.addTarget_0(new TargetPrototype(HitShape.Companion.rect_wthzt5$(rectangle), LayerTargetCollectorWithLocator$addRectangle$lambda(index), tooltipParams, tooltipKind));\n };\n LayerTargetCollectorWithLocator.prototype.addPath_sa5m83$$default = function (points, localToGlobalIndex, tooltipParams, tooltipKind) {\n this.addTarget_0(new TargetPrototype(HitShape.Companion.path_ytws2g$(points), localToGlobalIndex, tooltipParams, tooltipKind));\n };\n LayerTargetCollectorWithLocator.prototype.addPolygon_sa5m83$$default = function (points, localToGlobalIndex, tooltipParams, tooltipKind) {\n this.addTarget_0(new TargetPrototype(HitShape.Companion.polygon_ytws2g$(points), localToGlobalIndex, tooltipParams, tooltipKind));\n };\n LayerTargetCollectorWithLocator.prototype.withFlippedAxis = function () {\n return new FlippedTargetCollector(this);\n };\n LayerTargetCollectorWithLocator.prototype.withYOrientation = function () {\n return new YOrientationTargetCollector(this);\n };\n LayerTargetCollectorWithLocator.prototype.addTarget_0 = function (targetPrototype) {\n this.myTargets_0.add_11rb$(targetPrototype);\n this.myLocator_0 = null;\n };\n LayerTargetCollectorWithLocator.prototype.search_gpjtzr$ = function (coord) {\n if (this.myLocator_0 == null) {\n this.myLocator_0 = new LayerTargetLocator(this.geomKind_0, this.lookupSpec_0, this.contextualMapping_0, this.myTargets_0);\n }\n return ensureNotNull(this.myLocator_0).search_gpjtzr$(coord);\n };\n LayerTargetCollectorWithLocator.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LayerTargetCollectorWithLocator',\n interfaces: [GeomTargetLocator, GeomTargetCollector]\n };\n function LayerTargetLocator(geomKind, lookupSpec, contextualMapping, targetPrototypes) {\n this.geomKind_0 = geomKind;\n this.lookupSpec_0 = lookupSpec;\n this.contextualMapping_0 = contextualMapping;\n this.myTargets_0 = ArrayList_init();\n this.myTargetDetector_0 = new TargetDetector(this.lookupSpec_0.lookupSpace, this.lookupSpec_0.lookupStrategy);\n this.mySimpleGeometry_0 = setOf([GeomKind.RECT, GeomKind.POLYGON]);\n var tmp$, tmp$_0;\n if (this.mySimpleGeometry_0.contains_11rb$(this.geomKind_0))\n tmp$ = LayerTargetLocator$Collector$CollectingStrategy$REPLACE_getInstance();\n else if (this.lookupSpec_0.lookupSpace === GeomTargetLocator$LookupSpace.X && this.lookupSpec_0.lookupStrategy === GeomTargetLocator$LookupStrategy.NEAREST)\n tmp$ = LayerTargetLocator$Collector$CollectingStrategy$APPEND_IF_EQUAL_getInstance();\n else if (this.lookupSpec_0.lookupSpace === GeomTargetLocator$LookupSpace.X)\n tmp$ = LayerTargetLocator$Collector$CollectingStrategy$APPEND_getInstance();\n else if (this.lookupSpec_0.lookupStrategy === GeomTargetLocator$LookupStrategy.HOVER)\n tmp$ = LayerTargetLocator$Collector$CollectingStrategy$APPEND_getInstance();\n else if (this.lookupSpec_0.lookupStrategy === GeomTargetLocator$LookupStrategy.NONE || this.lookupSpec_0.lookupSpace === GeomTargetLocator$LookupSpace.NONE)\n tmp$ = LayerTargetLocator$Collector$CollectingStrategy$IGNORE_getInstance();\n else {\n tmp$ = LayerTargetLocator$Collector$CollectingStrategy$REPLACE_getInstance();\n }\n this.myCollectingStrategy_0 = tmp$;\n var toProjection = LayerTargetLocator_init$toProjection(this);\n tmp$_0 = targetPrototypes.iterator();\n while (tmp$_0.hasNext()) {\n var prototype = tmp$_0.next();\n this.myTargets_0.add_11rb$(new LayerTargetLocator$Target(toProjection(prototype), prototype));\n }\n }\n LayerTargetLocator.prototype.addLookupResults_0 = function (collector, targets) {\n if (collector.size() === 0) {\n return;\n }\n var tmp$ = collector.collection();\n var b = collector.closestPointChecker.distance;\n targets.add_11rb$(new GeomTargetLocator$LookupResult(tmp$, JsMath.max(0.0, b), this.geomKind_0, this.contextualMapping_0, this.contextualMapping_0.isCrosshairEnabled));\n };\n LayerTargetLocator.prototype.search_gpjtzr$ = function (coord) {\n var tmp$;\n if (this.myTargets_0.isEmpty()) {\n return null;\n }\n var rectCollector = new LayerTargetLocator$Collector(coord, this.myCollectingStrategy_0, this.lookupSpec_0.lookupSpace);\n var pointCollector = new LayerTargetLocator$Collector(coord, this.myCollectingStrategy_0, this.lookupSpec_0.lookupSpace);\n var pathCollector = new LayerTargetLocator$Collector(coord, this.myCollectingStrategy_0, this.lookupSpec_0.lookupSpace);\n var polygonCollector = new LayerTargetLocator$Collector(coord, LayerTargetLocator$Collector$CollectingStrategy$REPLACE_getInstance(), this.lookupSpec_0.lookupSpace);\n tmp$ = this.myTargets_0.iterator();\n while (tmp$.hasNext()) {\n var target = tmp$.next();\n switch (target.prototype.hitShape_8be2vx$.kind.name) {\n case 'RECT':\n this.processRect_0(coord, target, rectCollector);\n break;\n case 'POINT':\n this.processPoint_0(coord, target, pointCollector);\n break;\n case 'PATH':\n this.processPath_0(coord, target, pathCollector);\n break;\n case 'POLYGON':\n this.processPolygon_0(coord, target, polygonCollector);\n break;\n }\n }\n var lookupResults = ArrayList_init();\n this.addLookupResults_0(pathCollector, lookupResults);\n this.addLookupResults_0(rectCollector, lookupResults);\n this.addLookupResults_0(pointCollector, lookupResults);\n this.addLookupResults_0(polygonCollector, lookupResults);\n return this.getClosestTarget_0(lookupResults);\n };\n LayerTargetLocator.prototype.getClosestTarget_0 = function (lookupResults) {\n var tmp$;\n if (lookupResults.isEmpty()) {\n return null;\n }\n var closestTargets = lookupResults.get_za3lpa$(0);\n if (!(closestTargets.distance >= 0)) {\n var message = 'Failed requirement.';\n throw IllegalArgumentException_init(message.toString());\n }\n tmp$ = lookupResults.iterator();\n while (tmp$.hasNext()) {\n var lookupResult = tmp$.next();\n if (lookupResult.distance < closestTargets.distance) {\n closestTargets = lookupResult;\n }\n }\n return closestTargets;\n };\n LayerTargetLocator.prototype.processRect_0 = function (coord, target, resultCollector) {\n var tmp$;\n if (this.myTargetDetector_0.checkRect_fqo6rd$(coord, target.rectProjection, resultCollector.closestPointChecker)) {\n var rect = target.prototype.hitShape_8be2vx$.rect;\n if (equals(target.prototype.tooltipKind_8be2vx$, TipLayoutHint$Kind.CURSOR_TOOLTIP))\n tmp$ = rect.height / 2.0;\n else\n tmp$ = 0.0;\n var yOffset = tmp$;\n resultCollector.collect_11rb$(target.prototype.createGeomTarget_x7nr8i$(rect.origin.add_gpjtzr$(new DoubleVector(rect.width / 2, yOffset)), this.getKeyForSingleObjectGeometry_0(target.prototype)));\n }\n };\n LayerTargetLocator.prototype.processPolygon_0 = function (coord, target, resultCollector) {\n if (this.myTargetDetector_0.checkPolygon_q60eo3$(coord, target.polygonProjection, resultCollector.closestPointChecker)) {\n resultCollector.collect_11rb$(target.prototype.createGeomTarget_x7nr8i$(coord, this.getKeyForSingleObjectGeometry_0(target.prototype)));\n }\n };\n LayerTargetLocator.prototype.processPoint_0 = function (coord, target, resultCollector) {\n if (this.myTargetDetector_0.checkPoint_w0b42b$(coord, target.pointProjection, resultCollector.closestPointChecker)) {\n resultCollector.collect_11rb$(target.prototype.createGeomTarget_x7nr8i$(target.prototype.hitShape_8be2vx$.point.center, this.getKeyForSingleObjectGeometry_0(target.prototype)));\n }\n };\n LayerTargetLocator.prototype.processPath_0 = function (coord, target, resultCollector) {\n var pointChecker = this.myCollectingStrategy_0 === LayerTargetLocator$Collector$CollectingStrategy$APPEND_getInstance() ? new MathUtil$ClosestPointChecker(coord) : resultCollector.closestPointChecker;\n var hitPoint = this.myTargetDetector_0.checkPath_z3141m$(coord, target.pathProjection, pointChecker);\n if (hitPoint != null) {\n resultCollector.collect_11rb$(target.prototype.createGeomTarget_x7nr8i$(hitPoint.originalCoord, hitPoint.index));\n }\n };\n LayerTargetLocator.prototype.getKeyForSingleObjectGeometry_0 = function (prototype) {\n return prototype.indexMapper_8be2vx$(0);\n };\n function LayerTargetLocator$Target(targetProjection, prototype) {\n this.targetProjection_0 = targetProjection;\n this.prototype = prototype;\n }\n Object.defineProperty(LayerTargetLocator$Target.prototype, 'pointProjection', {\n configurable: true,\n get: function () {\n var tmp$;\n return Kotlin.isType(tmp$ = this.targetProjection_0, PointTargetProjection) ? tmp$ : throwCCE();\n }\n });\n Object.defineProperty(LayerTargetLocator$Target.prototype, 'rectProjection', {\n configurable: true,\n get: function () {\n var tmp$;\n return Kotlin.isType(tmp$ = this.targetProjection_0, RectTargetProjection) ? tmp$ : throwCCE();\n }\n });\n Object.defineProperty(LayerTargetLocator$Target.prototype, 'polygonProjection', {\n configurable: true,\n get: function () {\n var tmp$;\n return Kotlin.isType(tmp$ = this.targetProjection_0, PolygonTargetProjection) ? tmp$ : throwCCE();\n }\n });\n Object.defineProperty(LayerTargetLocator$Target.prototype, 'pathProjection', {\n configurable: true,\n get: function () {\n var tmp$;\n return Kotlin.isType(tmp$ = this.targetProjection_0, PathTargetProjection) ? tmp$ : throwCCE();\n }\n });\n LayerTargetLocator$Target.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'Target',\n interfaces: []\n };\n function LayerTargetLocator$Collector(cursor, myStrategy, lookupSpace) {\n this.myStrategy_0 = myStrategy;\n this.result_0 = ArrayList_init();\n var tmp$;\n if (lookupSpace === GeomTargetLocator$LookupSpace.X) {\n tmp$ = new MathUtil$ClosestPointChecker(new DoubleVector(cursor.x, 0.0));\n } else {\n tmp$ = new MathUtil$ClosestPointChecker(cursor);\n }\n this.closestPointChecker = tmp$;\n this.myLastAddedDistance_0 = -1.0;\n }\n LayerTargetLocator$Collector.prototype.collect_11rb$ = function (data) {\n switch (this.myStrategy_0.name) {\n case 'APPEND':\n this.add_0(data);\n break;\n case 'REPLACE':\n this.replace_0(data);\n break;\n case 'APPEND_IF_EQUAL':\n if (this.myLastAddedDistance_0 === this.closestPointChecker.distance) {\n this.add_0(data);\n } else {\n this.replace_0(data);\n }\n\n break;\n case 'IGNORE':\n return;\n }\n };\n LayerTargetLocator$Collector.prototype.collection = function () {\n return this.result_0;\n };\n LayerTargetLocator$Collector.prototype.size = function () {\n return this.result_0.size;\n };\n LayerTargetLocator$Collector.prototype.add_0 = function (data) {\n this.result_0.add_11rb$(data);\n this.myLastAddedDistance_0 = this.closestPointChecker.distance;\n };\n LayerTargetLocator$Collector.prototype.replace_0 = function (locationData) {\n this.result_0.clear();\n this.result_0.add_11rb$(locationData);\n this.myLastAddedDistance_0 = this.closestPointChecker.distance;\n };\n function LayerTargetLocator$Collector$CollectingStrategy(name, ordinal) {\n Enum.call(this);\n this.name$ = name;\n this.ordinal$ = ordinal;\n }\n function LayerTargetLocator$Collector$CollectingStrategy_initFields() {\n LayerTargetLocator$Collector$CollectingStrategy_initFields = function () {\n };\n LayerTargetLocator$Collector$CollectingStrategy$APPEND_instance = new LayerTargetLocator$Collector$CollectingStrategy('APPEND', 0);\n LayerTargetLocator$Collector$CollectingStrategy$REPLACE_instance = new LayerTargetLocator$Collector$CollectingStrategy('REPLACE', 1);\n LayerTargetLocator$Collector$CollectingStrategy$APPEND_IF_EQUAL_instance = new LayerTargetLocator$Collector$CollectingStrategy('APPEND_IF_EQUAL', 2);\n LayerTargetLocator$Collector$CollectingStrategy$IGNORE_instance = new LayerTargetLocator$Collector$CollectingStrategy('IGNORE', 3);\n }\n var LayerTargetLocator$Collector$CollectingStrategy$APPEND_instance;\n function LayerTargetLocator$Collector$CollectingStrategy$APPEND_getInstance() {\n LayerTargetLocator$Collector$CollectingStrategy_initFields();\n return LayerTargetLocator$Collector$CollectingStrategy$APPEND_instance;\n }\n var LayerTargetLocator$Collector$CollectingStrategy$REPLACE_instance;\n function LayerTargetLocator$Collector$CollectingStrategy$REPLACE_getInstance() {\n LayerTargetLocator$Collector$CollectingStrategy_initFields();\n return LayerTargetLocator$Collector$CollectingStrategy$REPLACE_instance;\n }\n var LayerTargetLocator$Collector$CollectingStrategy$APPEND_IF_EQUAL_instance;\n function LayerTargetLocator$Collector$CollectingStrategy$APPEND_IF_EQUAL_getInstance() {\n LayerTargetLocator$Collector$CollectingStrategy_initFields();\n return LayerTargetLocator$Collector$CollectingStrategy$APPEND_IF_EQUAL_instance;\n }\n var LayerTargetLocator$Collector$CollectingStrategy$IGNORE_instance;\n function LayerTargetLocator$Collector$CollectingStrategy$IGNORE_getInstance() {\n LayerTargetLocator$Collector$CollectingStrategy_initFields();\n return LayerTargetLocator$Collector$CollectingStrategy$IGNORE_instance;\n }\n LayerTargetLocator$Collector$CollectingStrategy.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'CollectingStrategy',\n interfaces: [Enum]\n };\n function LayerTargetLocator$Collector$CollectingStrategy$values() {\n return [LayerTargetLocator$Collector$CollectingStrategy$APPEND_getInstance(), LayerTargetLocator$Collector$CollectingStrategy$REPLACE_getInstance(), LayerTargetLocator$Collector$CollectingStrategy$APPEND_IF_EQUAL_getInstance(), LayerTargetLocator$Collector$CollectingStrategy$IGNORE_getInstance()];\n }\n LayerTargetLocator$Collector$CollectingStrategy.values = LayerTargetLocator$Collector$CollectingStrategy$values;\n function LayerTargetLocator$Collector$CollectingStrategy$valueOf(name) {\n switch (name) {\n case 'APPEND':\n return LayerTargetLocator$Collector$CollectingStrategy$APPEND_getInstance();\n case 'REPLACE':\n return LayerTargetLocator$Collector$CollectingStrategy$REPLACE_getInstance();\n case 'APPEND_IF_EQUAL':\n return LayerTargetLocator$Collector$CollectingStrategy$APPEND_IF_EQUAL_getInstance();\n case 'IGNORE':\n return LayerTargetLocator$Collector$CollectingStrategy$IGNORE_getInstance();\n default:\n throwISE('No enum constant jetbrains.datalore.plot.builder.interact.loc.LayerTargetLocator.Collector.CollectingStrategy.' + name);\n }\n }\n LayerTargetLocator$Collector$CollectingStrategy.valueOf_61zpoe$ = LayerTargetLocator$Collector$CollectingStrategy$valueOf;\n LayerTargetLocator$Collector.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'Collector',\n interfaces: []\n };\n function LayerTargetLocator_init$toProjection(this$LayerTargetLocator) {\n return function (prototype) {\n var tmp$;\n switch (prototype.hitShape_8be2vx$.kind.name) {\n case 'POINT':\n tmp$ = PointTargetProjection$Companion_getInstance().create_p1yge$(prototype.hitShape_8be2vx$.point.center, this$LayerTargetLocator.lookupSpec_0.lookupSpace);\n break;\n case 'RECT':\n tmp$ = RectTargetProjection$Companion_getInstance().create_tb1cvm$(prototype.hitShape_8be2vx$.rect, this$LayerTargetLocator.lookupSpec_0.lookupSpace);\n break;\n case 'POLYGON':\n tmp$ = PolygonTargetProjection$Companion_getInstance().create_a95qp$(prototype.hitShape_8be2vx$.points, this$LayerTargetLocator.lookupSpec_0.lookupSpace);\n break;\n case 'PATH':\n tmp$ = PathTargetProjection$Companion_getInstance().create_zb7j6l$(prototype.hitShape_8be2vx$.points, prototype.indexMapper_8be2vx$, this$LayerTargetLocator.lookupSpec_0.lookupSpace);\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n }\n LayerTargetLocator.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LayerTargetLocator',\n interfaces: [GeomTargetLocator]\n };\n var compareByDescending$lambda = wrapFunction(function () {\n var compareValues = Kotlin.kotlin.comparisons.compareValues_s00gnj$;\n return function (closure$selector) {\n return function (a, b) {\n var selector = closure$selector;\n return compareValues(selector(b), selector(a));\n };\n };\n });\n function LocatedTargetsPicker(flippedAxis, myCursorCoord) {\n LocatedTargetsPicker$Companion_getInstance();\n if (myCursorCoord === void 0)\n myCursorCoord = null;\n this.flippedAxis = flippedAxis;\n this.myCursorCoord_0 = myCursorCoord;\n this.myAllLookupResults_0 = ArrayList_init();\n }\n Object.defineProperty(LocatedTargetsPicker.prototype, 'picked', {\n configurable: true,\n get: function () {\n return this.chooseBestResult_0();\n }\n });\n LocatedTargetsPicker.prototype.addLookupResult_ljcmc2$ = function (result) {\n var lookupResult = LocatedTargetsPicker$Companion_getInstance().filterResults_0(result, this.myCursorCoord_0, this.flippedAxis);\n this.myAllLookupResults_0.add_11rb$(lookupResult);\n };\n function LocatedTargetsPicker$chooseBestResult$hasGeneralTooltip(lookupResult) {\n return lookupResult.contextualMapping.hasGeneralTooltip;\n }\n function LocatedTargetsPicker$chooseBestResult$hasAxisTooltip(lookupResult) {\n return lookupResult.contextualMapping.hasAxisTooltip || listOf_0([GeomKind.V_LINE, GeomKind.H_LINE]).contains_11rb$(lookupResult.geomKind);\n }\n function LocatedTargetsPicker$chooseBestResult$lambda(f) {\n var distance = f.component2();\n return distance;\n }\n function LocatedTargetsPicker$chooseBestResult$lambda_0(f) {\n var distance = f.component2();\n return distance;\n }\n LocatedTargetsPicker.prototype.chooseBestResult_0 = function () {\n var tmp$, tmp$_0, tmp$_1;\n var hasGeneralTooltip = LocatedTargetsPicker$chooseBestResult$hasGeneralTooltip;\n var hasAxisTooltip = LocatedTargetsPicker$chooseBestResult$hasAxisTooltip;\n var $receiver = this.myAllLookupResults_0;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$_2;\n tmp$_2 = $receiver.iterator();\n while (tmp$_2.hasNext()) {\n var item = tmp$_2.next();\n destination.add_11rb$(to(item, LocatedTargetsPicker$Companion_getInstance().distance_0(item, this.myCursorCoord_0)));\n }\n var destination_0 = ArrayList_init();\n var tmp$_3;\n tmp$_3 = destination.iterator();\n while (tmp$_3.hasNext()) {\n var element = tmp$_3.next();\n var lookupResult = element.component1()\n , distance = element.component2();\n if (lookupResult.isCrosshairEnabled || distance <= LocatedTargetsPicker$Companion_getInstance().CUTOFF_DISTANCE_8be2vx$)\n destination_0.add_11rb$(element);\n }\n var withDistances = destination_0;\n var minByOrNull$result;\n minByOrNull$break: do {\n var iterator = withDistances.iterator();\n if (!iterator.hasNext()) {\n minByOrNull$result = null;\n break minByOrNull$break;\n }\n var minElem = iterator.next();\n if (!iterator.hasNext()) {\n minByOrNull$result = minElem;\n break minByOrNull$break;\n }\n var distance_0 = minElem.component2();\n var minValue = distance_0;\n do {\n var e = iterator.next();\n var distance_1 = e.component2();\n var v = distance_1;\n if (Kotlin.compareTo(minValue, v) > 0) {\n minElem = e;\n minValue = v;\n }\n }\n while (iterator.hasNext());\n minByOrNull$result = minElem;\n }\n while (false);\n var minDistance = (tmp$_0 = (tmp$ = minByOrNull$result) != null ? tmp$.second : null) != null ? tmp$_0 : 0.0;\n var picked = {v: emptyList()};\n var destination_1 = ArrayList_init();\n var tmp$_4;\n tmp$_4 = withDistances.iterator();\n while (tmp$_4.hasNext()) {\n var element_0 = tmp$_4.next();\n var distance_2 = element_0.component2();\n if (distance_2 === minDistance)\n destination_1.add_11rb$(element_0);\n }\n var destination_2 = ArrayList_init_0(collectionSizeOrDefault(destination_1, 10));\n var tmp$_5;\n tmp$_5 = destination_1.iterator();\n while (tmp$_5.hasNext()) {\n var item_0 = tmp$_5.next();\n var tmp$_6 = destination_2.add_11rb$;\n var lookupResult_0 = item_0.component1();\n tmp$_6.call(destination_2, lookupResult_0);\n }\n var tmp$_7;\n tmp$_7 = destination_2.iterator();\n while (tmp$_7.hasNext()) {\n var element_1 = tmp$_7.next();\n var tmp$_8;\n if (!picked.v.isEmpty() && listOf_0([GeomKind.TEXT, GeomKind.LABEL]).contains_11rb$(element_1.geomKind))\n tmp$_8 = picked.v;\n else {\n if (!picked.v.isEmpty() && LocatedTargetsPicker$Companion_getInstance().stackableResults_0(picked.v.get_za3lpa$(0), element_1))\n tmp$_8 = plus_3(picked.v, element_1);\n else {\n tmp$_8 = listOf(element_1);\n }\n }\n picked.v = tmp$_8;\n }\n var destination_3 = ArrayList_init_0(collectionSizeOrDefault(withDistances, 10));\n var tmp$_9;\n tmp$_9 = withDistances.iterator();\n while (tmp$_9.hasNext()) {\n var item_1 = tmp$_9.next();\n var tmp$_10 = destination_3.add_11rb$;\n var lookupResult_1 = item_1.component1();\n tmp$_10.call(destination_3, lookupResult_1);\n }\n var allConsideredResults = destination_3;\n var $receiver_0 = picked.v;\n var any$result;\n any$break: do {\n var tmp$_11;\n if (Kotlin.isType($receiver_0, Collection) && $receiver_0.isEmpty()) {\n any$result = false;\n break any$break;\n }\n tmp$_11 = $receiver_0.iterator();\n while (tmp$_11.hasNext()) {\n var element_2 = tmp$_11.next();\n if (hasGeneralTooltip(element_2) && hasAxisTooltip(element_2)) {\n any$result = true;\n break any$break;\n }\n }\n any$result = false;\n }\n while (false);\n if (any$result)\n tmp$_1 = picked.v;\n else {\n var none$result;\n none$break: do {\n var tmp$_12;\n if (Kotlin.isType(allConsideredResults, Collection) && allConsideredResults.isEmpty()) {\n none$result = true;\n break none$break;\n }\n tmp$_12 = allConsideredResults.iterator();\n while (tmp$_12.hasNext()) {\n var element_3 = tmp$_12.next();\n if (hasGeneralTooltip(element_3)) {\n none$result = false;\n break none$break;\n }\n }\n none$result = true;\n }\n while (false);\n if (none$result)\n tmp$_1 = picked.v;\n else {\n var any$result_0;\n any$break: do {\n var tmp$_13;\n if (Kotlin.isType(allConsideredResults, Collection) && allConsideredResults.isEmpty()) {\n any$result_0 = false;\n break any$break;\n }\n tmp$_13 = allConsideredResults.iterator();\n while (tmp$_13.hasNext()) {\n var element_4 = tmp$_13.next();\n if (hasGeneralTooltip(element_4) && hasAxisTooltip(element_4)) {\n any$result_0 = true;\n break any$break;\n }\n }\n any$result_0 = false;\n }\n while (false);\n if (any$result_0) {\n var $receiver_1 = sortedWith(withDistances, new Comparator(compareByDescending$lambda(LocatedTargetsPicker$chooseBestResult$lambda)));\n var destination_4 = ArrayList_init_0(collectionSizeOrDefault($receiver_1, 10));\n var tmp$_14;\n tmp$_14 = $receiver_1.iterator();\n while (tmp$_14.hasNext()) {\n var item_2 = tmp$_14.next();\n var tmp$_15 = destination_4.add_11rb$;\n var lookupResult_2 = item_2.component1();\n tmp$_15.call(destination_4, lookupResult_2);\n }\n var last$result;\n last$break: do {\n var iterator_0 = destination_4.listIterator_za3lpa$(destination_4.size);\n while (iterator_0.hasPrevious()) {\n var element_5 = iterator_0.previous();\n if (hasGeneralTooltip(element_5) && hasAxisTooltip(element_5)) {\n last$result = element_5;\n break last$break;\n }\n }\n throw new NoSuchElementException_init_0('List contains no element matching the predicate.');\n }\n while (false);\n tmp$_1 = listOf(last$result);\n } else {\n var $receiver_2 = sortedWith(withDistances, new Comparator(compareByDescending$lambda(LocatedTargetsPicker$chooseBestResult$lambda_0)));\n var destination_5 = ArrayList_init_0(collectionSizeOrDefault($receiver_2, 10));\n var tmp$_16;\n tmp$_16 = $receiver_2.iterator();\n while (tmp$_16.hasNext()) {\n var item_3 = tmp$_16.next();\n var tmp$_17 = destination_5.add_11rb$;\n var lookupResult_3 = item_3.component1();\n tmp$_17.call(destination_5, lookupResult_3);\n }\n var lastOrNull$result;\n lastOrNull$break: do {\n var iterator_1 = destination_5.listIterator_za3lpa$(destination_5.size);\n while (iterator_1.hasPrevious()) {\n var element_6 = iterator_1.previous();\n if (hasGeneralTooltip(element_6)) {\n lastOrNull$result = element_6;\n break lastOrNull$break;\n }\n }\n lastOrNull$result = null;\n }\n while (false);\n var tmp$_18 = lastOrNull$result;\n var lastOrNull$result_0;\n lastOrNull$break: do {\n var iterator_2 = destination_5.listIterator_za3lpa$(destination_5.size);\n while (iterator_2.hasPrevious()) {\n var element_7 = iterator_2.previous();\n if (hasAxisTooltip(element_7)) {\n lastOrNull$result_0 = element_7;\n break lastOrNull$break;\n }\n }\n lastOrNull$result_0 = null;\n }\n while (false);\n tmp$_1 = listOfNotNull([tmp$_18, lastOrNull$result_0]);\n }\n }\n }\n return tmp$_1;\n };\n function LocatedTargetsPicker$Companion() {\n LocatedTargetsPicker$Companion_instance = this;\n this.CUTOFF_DISTANCE_8be2vx$ = 30.0;\n this.FAKE_DISTANCE_8be2vx$ = 15.0;\n this.STACKABLE_GEOMS_0 = setOf([GeomKind.DENSITY, GeomKind.FREQPOLY, GeomKind.BOX_PLOT, GeomKind.HISTOGRAM, GeomKind.LINE, GeomKind.AREA, GeomKind.BAR, GeomKind.ERROR_BAR, GeomKind.CROSS_BAR, GeomKind.LINE_RANGE, GeomKind.POINT_RANGE]);\n }\n LocatedTargetsPicker$Companion.prototype.distance_0 = function (locatedTargetList, coord) {\n var tmp$, tmp$_0;\n var distance = locatedTargetList.distance;\n if (distance === 0.0) {\n if (!locatedTargetList.isCrosshairEnabled || coord == null) {\n tmp$_0 = this.FAKE_DISTANCE_8be2vx$;\n } else {\n var $receiver = locatedTargetList.targets;\n var destination = ArrayList_init();\n var tmp$_1;\n tmp$_1 = $receiver.iterator();\n while (tmp$_1.hasNext()) {\n var element = tmp$_1.next();\n if (element.tipLayoutHint.coord != null)\n destination.add_11rb$(element);\n }\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(destination, 10));\n var tmp$_2;\n tmp$_2 = destination.iterator();\n while (tmp$_2.hasNext()) {\n var item = tmp$_2.next();\n destination_0.add_11rb$(MathUtil_getInstance().distance_l9poh5$(coord, ensureNotNull(item.tipLayoutHint.coord)));\n }\n tmp$_0 = (tmp$ = minOrNull(destination_0)) != null ? tmp$ : this.FAKE_DISTANCE_8be2vx$;\n }\n } else {\n tmp$_0 = distance;\n }\n return tmp$_0;\n };\n LocatedTargetsPicker$Companion.prototype.stackableResults_0 = function (lft, rgt) {\n return lft.geomKind === rgt.geomKind && this.STACKABLE_GEOMS_0.contains_11rb$(rgt.geomKind);\n };\n function LocatedTargetsPicker$Companion$filterResults$xDistanceToCoord(closure$coord, closure$flippedAxis) {\n return function (target) {\n var tmp$, tmp$_0;\n var distance = ensureNotNull(target.tipLayoutHint.coord).subtract_gpjtzr$(closure$coord);\n tmp$ = closure$flippedAxis;\n if (tmp$ === true)\n tmp$_0 = distance.y;\n else if (tmp$ === false)\n tmp$_0 = distance.x;\n else\n tmp$_0 = Kotlin.noWhenBranchMatched();\n return tmp$_0;\n };\n }\n LocatedTargetsPicker$Companion.prototype.filterResults_0 = function (lookupResult, coord, flippedAxis) {\n if (coord == null || !setOf([GeomKind.DENSITY, GeomKind.HISTOGRAM, GeomKind.FREQPOLY, GeomKind.LINE, GeomKind.AREA, GeomKind.SEGMENT]).contains_11rb$(lookupResult.geomKind)) {\n return lookupResult;\n }\n var xDistanceToCoord = LocatedTargetsPicker$Companion$filterResults$xDistanceToCoord(coord, flippedAxis);\n var $receiver = lookupResult.targets;\n var destination = ArrayList_init();\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n if (element.tipLayoutHint.coord != null)\n destination.add_11rb$(element);\n }\n var geomTargets = destination;\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(geomTargets, 10));\n var tmp$_0;\n tmp$_0 = geomTargets.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n destination_0.add_11rb$(xDistanceToCoord(item));\n }\n var minByOrNull$result;\n minByOrNull$break: do {\n var iterator = destination_0.iterator();\n if (!iterator.hasNext()) {\n minByOrNull$result = null;\n break minByOrNull$break;\n }\n var minElem = iterator.next();\n if (!iterator.hasNext()) {\n minByOrNull$result = minElem;\n break minByOrNull$break;\n }\n var p1 = minElem;\n var minValue = JsMath.abs(p1);\n do {\n var e = iterator.next();\n var v = JsMath.abs(e);\n if (Kotlin.compareTo(minValue, v) > 0) {\n minElem = e;\n minValue = v;\n }\n }\n while (iterator.hasNext());\n minByOrNull$result = minElem;\n }\n while (false);\n var minXDistanceToTarget = minByOrNull$result;\n var destination_1 = ArrayList_init();\n var tmp$_1;\n tmp$_1 = geomTargets.iterator();\n while (tmp$_1.hasNext()) {\n var element_0 = tmp$_1.next();\n if (xDistanceToCoord(element_0) === minXDistanceToTarget)\n destination_1.add_11rb$(element_0);\n }\n var selector = getPropertyCallableRef('hitIndex', 1, function ($receiver) {\n return $receiver.hitIndex;\n });\n var tmp$_2;\n var set = HashSet_init_0();\n var list = ArrayList_init();\n tmp$_2 = destination_1.iterator();\n while (tmp$_2.hasNext()) {\n var e_0 = tmp$_2.next();\n var key = selector(e_0);\n if (set.add_11rb$(key))\n list.add_11rb$(e_0);\n }\n var newTargets = list;\n return new GeomTargetLocator$LookupResult(newTargets, lookupResult.distance, lookupResult.geomKind, lookupResult.contextualMapping, lookupResult.isCrosshairEnabled);\n };\n LocatedTargetsPicker$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var LocatedTargetsPicker$Companion_instance = null;\n function LocatedTargetsPicker$Companion_getInstance() {\n if (LocatedTargetsPicker$Companion_instance === null) {\n new LocatedTargetsPicker$Companion();\n }\n return LocatedTargetsPicker$Companion_instance;\n }\n LocatedTargetsPicker.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LocatedTargetsPicker',\n interfaces: []\n };\n function TargetDetector(locatorLookupSpace, locatorLookupStrategy) {\n TargetDetector$Companion_getInstance();\n this.locatorLookupSpace_0 = locatorLookupSpace;\n this.locatorLookupStrategy_0 = locatorLookupStrategy;\n }\n function TargetDetector$checkPath$lambda(it) {\n return it.projection().x();\n }\n function TargetDetector$checkPath$lambda_0(it) {\n return it.projection().x();\n }\n TargetDetector.prototype.checkPath_z3141m$ = function (cursorCoord, pathProjection, closestPointChecker) {\n var tmp$, tmp$_0, tmp$_1;\n if (pathProjection.points.isEmpty()) {\n return null;\n }\n switch (this.locatorLookupSpace_0.name) {\n case 'NONE':\n tmp$_1 = null;\n break;\n case 'X':\n switch (this.locatorLookupStrategy_0.name) {\n case 'NONE':\n tmp$_1 = null;\n break;\n case 'NEAREST':\n tmp$_1 = TargetDetector$Companion_getInstance().searchNearest_0(cursorCoord.x, pathProjection.points, TargetDetector$checkPath$lambda);\n break;\n case 'HOVER':\n if (cursorCoord.x < first(pathProjection.points).projection().x() || cursorCoord.x > last(pathProjection.points).projection().x()) {\n tmp$_1 = null;\n } else {\n tmp$_1 = TargetDetector$Companion_getInstance().searchNearest_0(cursorCoord.x, pathProjection.points, TargetDetector$checkPath$lambda_0);\n }\n\n break;\n default:\n tmp$_1 = Kotlin.noWhenBranchMatched();\n break;\n }\n\n break;\n case 'XY':\n switch (this.locatorLookupStrategy_0.name) {\n case 'NONE':\n return null;\n case 'HOVER':\n tmp$ = pathProjection.points.iterator();\n while (tmp$.hasNext()) {\n var pathPoint = tmp$.next();\n var targetPointCoord = pathPoint.projection().xy();\n if (MathUtil_getInstance().areEqual_f1g2it$(targetPointCoord, cursorCoord, TargetDetector$Companion_getInstance().POINT_AREA_EPSILON_0)) {\n return pathPoint;\n }\n }\n\n return null;\n case 'NEAREST':\n var nearestPoint = null;\n tmp$_0 = pathProjection.points.iterator();\n while (tmp$_0.hasNext()) {\n var pathPoint_0 = tmp$_0.next();\n var targetPointCoord_0 = pathPoint_0.projection().xy();\n if (closestPointChecker.check_gpjtzr$(targetPointCoord_0)) {\n nearestPoint = pathPoint_0;\n }\n }\n\n return nearestPoint;\n default:\n tmp$_1 = Kotlin.noWhenBranchMatched();\n break;\n }\n\n break;\n default:\n tmp$_1 = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$_1;\n };\n TargetDetector.prototype.checkPoint_w0b42b$ = function (cursorCoord, pointProjection, closestPointChecker) {\n var tmp$;\n switch (this.locatorLookupSpace_0.name) {\n case 'NONE':\n tmp$ = false;\n break;\n case 'X':\n switch (this.locatorLookupStrategy_0.name) {\n case 'NONE':\n tmp$ = false;\n break;\n case 'HOVER':\n tmp$ = MathUtil_getInstance().areEqual_hln2n9$(pointProjection.x(), cursorCoord.x, TargetDetector$Companion_getInstance().POINT_AREA_EPSILON_0);\n break;\n case 'NEAREST':\n tmp$ = closestPointChecker.check_gpjtzr$(new DoubleVector(pointProjection.x(), 0.0));\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n\n break;\n case 'XY':\n switch (this.locatorLookupStrategy_0.name) {\n case 'NONE':\n tmp$ = false;\n break;\n case 'HOVER':\n tmp$ = MathUtil_getInstance().areEqual_f1g2it$(pointProjection.xy(), cursorCoord, TargetDetector$Companion_getInstance().POINT_AREA_EPSILON_0);\n break;\n case 'NEAREST':\n tmp$ = closestPointChecker.check_gpjtzr$(pointProjection.xy());\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n TargetDetector.prototype.checkRect_fqo6rd$ = function (cursorCoord, rectProjection, closestPointChecker) {\n var tmp$;\n switch (this.locatorLookupSpace_0.name) {\n case 'NONE':\n tmp$ = false;\n break;\n case 'X':\n tmp$ = this.rangeBasedLookup_0(cursorCoord, closestPointChecker, rectProjection.x());\n break;\n case 'XY':\n var rect = rectProjection.xy();\n switch (this.locatorLookupStrategy_0.name) {\n case 'NONE':\n tmp$ = false;\n break;\n case 'HOVER':\n tmp$ = rect.contains_gpjtzr$(cursorCoord);\n break;\n case 'NEAREST':\n if (rect.contains_gpjtzr$(cursorCoord)) {\n tmp$ = closestPointChecker.check_gpjtzr$(cursorCoord);\n } else {\n var x = cursorCoord.x < rect.left ? rect.left : rect.right;\n var y = cursorCoord.y < rect.top ? rect.top : rect.bottom;\n x = rect.xRange().contains_14dthe$(cursorCoord.x) ? cursorCoord.x : x;\n y = rect.yRange().contains_14dthe$(cursorCoord.y) ? cursorCoord.y : y;\n tmp$ = closestPointChecker.check_gpjtzr$(new DoubleVector(x, y));\n }\n\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n TargetDetector.prototype.checkPolygon_q60eo3$ = function (cursorCoord, polygonProjection, closestPointChecker) {\n var tmp$;\n switch (this.locatorLookupSpace_0.name) {\n case 'NONE':\n tmp$ = false;\n break;\n case 'X':\n tmp$ = this.rangeBasedLookup_0(cursorCoord, closestPointChecker, polygonProjection.x());\n break;\n case 'XY':\n loop_label: switch (this.locatorLookupStrategy_0.name) {\n case 'NONE':\n tmp$ = false;\n break loop_label;\n case 'NEAREST':\n case 'HOVER':\n var $receiver = polygonProjection.xy();\n var count$result;\n count$break: do {\n var tmp$_0;\n if (Kotlin.isType($receiver, Collection) && $receiver.isEmpty()) {\n count$result = 0;\n break count$break;\n }\n var count = 0;\n tmp$_0 = $receiver.iterator();\n while (tmp$_0.hasNext()) {\n var element = tmp$_0.next();\n if (element.contains_gpjtzr$(cursorCoord))\n checkCountOverflow((count = count + 1 | 0, count));\n }\n count$result = count;\n }\n while (false);\n tmp$ = (count$result % 2 | 0) !== 0;\n break loop_label;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break loop_label;\n }\n\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n TargetDetector.prototype.rangeBasedLookup_0 = function (cursorCoord, closestPointChecker, range) {\n var tmp$;\n switch (this.locatorLookupStrategy_0.name) {\n case 'NONE':\n tmp$ = false;\n break;\n case 'HOVER':\n tmp$ = range.contains_14dthe$(cursorCoord.x);\n break;\n case 'NEAREST':\n if (range.contains_14dthe$(cursorCoord.x - TargetDetector$Companion_getInstance().RECT_X_NEAREST_EPSILON_0) || range.contains_14dthe$(cursorCoord.x + TargetDetector$Companion_getInstance().RECT_X_NEAREST_EPSILON_0))\n tmp$ = closestPointChecker.compare_gpjtzr$(new DoubleVector(range.lowerEnd + range.length / 2, cursorCoord.y)) !== MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_FARTHER_getInstance();\n else {\n tmp$ = false;\n }\n\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n function TargetDetector$Companion() {\n TargetDetector$Companion_instance = this;\n this.POINT_AREA_EPSILON_0 = 0.1;\n this.RECT_X_NEAREST_EPSILON_0 = 2.0;\n }\n TargetDetector$Companion.prototype.searchNearest_0 = function (value, items, mapper) {\n var tmp$;\n if (value < mapper(first(items))) {\n return first(items);\n }\n if (value > mapper(last(items))) {\n return last(items);\n }\n var lo = 0;\n var hi = get_lastIndex(items);\n while (lo <= hi) {\n var mid = (hi + lo | 0) / 2 | 0;\n var midValue = mapper(items.get_za3lpa$(mid));\n if (value < midValue)\n hi = mid - 1 | 0;\n else if (value > midValue)\n lo = mid + 1 | 0;\n else\n return items.get_za3lpa$(mid);\n }\n if (mapper(items.get_za3lpa$(lo)) - value < value - mapper(items.get_za3lpa$(hi))) {\n tmp$ = items.get_za3lpa$(lo);\n } else {\n tmp$ = items.get_za3lpa$(hi);\n }\n return tmp$;\n };\n TargetDetector$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var TargetDetector$Companion_instance = null;\n function TargetDetector$Companion_getInstance() {\n if (TargetDetector$Companion_instance === null) {\n new TargetDetector$Companion();\n }\n return TargetDetector$Companion_instance;\n }\n TargetDetector.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TargetDetector',\n interfaces: []\n };\n var compareBy$lambda_0 = wrapFunction(function () {\n var compareValues = Kotlin.kotlin.comparisons.compareValues_s00gnj$;\n return function (closure$selector) {\n return function (a, b) {\n var selector = closure$selector;\n return compareValues(selector(a), selector(b));\n };\n };\n });\n function TargetProjection() {\n }\n TargetProjection.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TargetProjection',\n interfaces: []\n };\n function PointTargetProjection(data) {\n PointTargetProjection$Companion_getInstance();\n TargetProjection.call(this);\n this.data = data;\n }\n PointTargetProjection.prototype.x = function () {\n var tmp$;\n return typeof (tmp$ = this.data) === 'number' ? tmp$ : throwCCE();\n };\n PointTargetProjection.prototype.xy = function () {\n var tmp$;\n return Kotlin.isType(tmp$ = this.data, DoubleVector) ? tmp$ : throwCCE();\n };\n function PointTargetProjection$Companion() {\n PointTargetProjection$Companion_instance = this;\n }\n PointTargetProjection$Companion.prototype.create_p1yge$ = function (p, lookupSpace) {\n var tmp$;\n switch (lookupSpace.name) {\n case 'X':\n tmp$ = new PointTargetProjection(p.x);\n break;\n case 'XY':\n tmp$ = new PointTargetProjection(p);\n break;\n case 'NONE':\n tmp$ = undefinedLookupSpaceError();\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n PointTargetProjection$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var PointTargetProjection$Companion_instance = null;\n function PointTargetProjection$Companion_getInstance() {\n if (PointTargetProjection$Companion_instance === null) {\n new PointTargetProjection$Companion();\n }\n return PointTargetProjection$Companion_instance;\n }\n PointTargetProjection.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PointTargetProjection',\n interfaces: [TargetProjection]\n };\n function RectTargetProjection(data) {\n RectTargetProjection$Companion_getInstance();\n TargetProjection.call(this);\n this.data = data;\n }\n RectTargetProjection.prototype.x = function () {\n var tmp$;\n return Kotlin.isType(tmp$ = this.data, DoubleSpan) ? tmp$ : throwCCE();\n };\n RectTargetProjection.prototype.xy = function () {\n var tmp$;\n return Kotlin.isType(tmp$ = this.data, DoubleRectangle) ? tmp$ : throwCCE();\n };\n function RectTargetProjection$Companion() {\n RectTargetProjection$Companion_instance = this;\n }\n RectTargetProjection$Companion.prototype.create_tb1cvm$ = function (rect, lookupSpace) {\n var tmp$;\n switch (lookupSpace.name) {\n case 'X':\n tmp$ = new RectTargetProjection(new DoubleSpan(rect.left, rect.right));\n break;\n case 'XY':\n tmp$ = new RectTargetProjection(rect);\n break;\n case 'NONE':\n tmp$ = undefinedLookupSpaceError();\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n RectTargetProjection$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var RectTargetProjection$Companion_instance = null;\n function RectTargetProjection$Companion_getInstance() {\n if (RectTargetProjection$Companion_instance === null) {\n new RectTargetProjection$Companion();\n }\n return RectTargetProjection$Companion_instance;\n }\n RectTargetProjection.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'RectTargetProjection',\n interfaces: [TargetProjection]\n };\n function PolygonTargetProjection(data) {\n PolygonTargetProjection$Companion_getInstance();\n TargetProjection.call(this);\n this.data = data;\n }\n PolygonTargetProjection.prototype.x = function () {\n var tmp$;\n return Kotlin.isType(tmp$ = this.data, DoubleSpan) ? tmp$ : throwCCE();\n };\n PolygonTargetProjection.prototype.xy = function () {\n var tmp$;\n return Kotlin.isType(tmp$ = this.data, List) ? tmp$ : throwCCE();\n };\n function PolygonTargetProjection$Companion() {\n PolygonTargetProjection$Companion_instance = this;\n this.POINTS_COUNT_TO_SKIP_SIMPLIFICATION_0 = 20.0;\n this.AREA_TOLERANCE_RATIO_0 = 0.1;\n this.MAX_TOLERANCE_0 = 40.0;\n this.isLogEnabled_0 = false;\n }\n PolygonTargetProjection$Companion.prototype.create_a95qp$ = function (points, lookupSpace) {\n var tmp$;\n var rings = splitRings(points);\n switch (lookupSpace.name) {\n case 'X':\n tmp$ = new PolygonTargetProjection(this.mapToX_0(rings));\n break;\n case 'XY':\n tmp$ = new PolygonTargetProjection(this.mapToXY_0(rings));\n break;\n case 'NONE':\n tmp$ = undefinedLookupSpaceError();\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n PolygonTargetProjection$Companion.prototype.mapToX_0 = function (rings) {\n var tmp$, tmp$_0;\n var min = rings.get_za3lpa$(0).get_za3lpa$(0).x;\n var max = min;\n tmp$ = rings.iterator();\n while (tmp$.hasNext()) {\n var ring = tmp$.next();\n tmp$_0 = ring.iterator();\n while (tmp$_0.hasNext()) {\n var point = tmp$_0.next();\n var a = min;\n var b = point.x;\n min = JsMath.min(a, b);\n var a_0 = max;\n var b_0 = point.x;\n max = JsMath.max(a_0, b_0);\n }\n }\n return new DoubleSpan(min, max);\n };\n PolygonTargetProjection$Companion.prototype.mapToXY_0 = function (rings) {\n var tmp$, tmp$_0;\n var polygon = ArrayList_init();\n tmp$ = rings.iterator();\n while (tmp$.hasNext()) {\n var ring = tmp$.next();\n if (ring.size < 4) {\n continue;\n }\n var tmp$_1;\n if ((tmp$_0 = geometry.DoubleRectangles.boundingBox_qdtdbw$(ring)) != null)\n tmp$_1 = tmp$_0;\n else {\n throw IllegalStateException_init('bbox should be not null - ring is not empty'.toString());\n }\n var bbox = tmp$_1;\n var area = calculateArea(ring);\n var simplifiedRing;\n if (ring.size > this.POINTS_COUNT_TO_SKIP_SIMPLIFICATION_0) {\n var a = area * this.AREA_TOLERANCE_RATIO_0;\n var b = this.MAX_TOLERANCE_0;\n var tolerance = JsMath.min(a, b);\n simplifiedRing = PolylineSimplifier.Companion.visvalingamWhyatt_ytws2g$(ring).setWeightLimit_14dthe$(tolerance).points;\n if (this.isLogEnabled_0) {\n this.log_0('Simp: ' + toString(ring.size) + ' -> ' + toString(simplifiedRing.size) + ', tolerance=' + toString(tolerance) + ', bbox=' + toString(bbox) + ', area=' + toString(area));\n }\n } else {\n if (this.isLogEnabled_0) {\n this.log_0('Keep: size: ' + toString(ring.size) + ', bbox=' + toString(bbox) + ', area=' + toString(area));\n }\n simplifiedRing = ring;\n }\n if (simplifiedRing.size < 4) {\n continue;\n }\n polygon.add_11rb$(new PolygonTargetProjection$RingXY(simplifiedRing, bbox));\n }\n return polygon;\n };\n PolygonTargetProjection$Companion.prototype.log_0 = function (str) {\n println(str);\n };\n PolygonTargetProjection$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var PolygonTargetProjection$Companion_instance = null;\n function PolygonTargetProjection$Companion_getInstance() {\n if (PolygonTargetProjection$Companion_instance === null) {\n new PolygonTargetProjection$Companion();\n }\n return PolygonTargetProjection$Companion_instance;\n }\n function PolygonTargetProjection$RingXY(edges, bbox) {\n this.edges_0 = edges;\n this.bbox_0 = bbox;\n }\n PolygonTargetProjection$RingXY.prototype.contains_gpjtzr$ = function (p) {\n return this.bbox_0.contains_gpjtzr$(p) && MathUtil_getInstance().polygonContainsCoordinate_sz9prc$(this.edges_0, p);\n };\n PolygonTargetProjection$RingXY.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'RingXY',\n interfaces: []\n };\n PolygonTargetProjection.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PolygonTargetProjection',\n interfaces: [TargetProjection]\n };\n function PathTargetProjection(data) {\n PathTargetProjection$Companion_getInstance();\n TargetProjection.call(this);\n this.data = data;\n this.points = this.data;\n }\n function PathTargetProjection$PathPoint(myPointTargetProjection, originalCoord, index) {\n PathTargetProjection$PathPoint$Companion_getInstance();\n this.myPointTargetProjection_0 = myPointTargetProjection;\n this.originalCoord = originalCoord;\n this.index = index;\n }\n PathTargetProjection$PathPoint.prototype.projection = function () {\n return this.myPointTargetProjection_0;\n };\n function PathTargetProjection$PathPoint$Companion() {\n PathTargetProjection$PathPoint$Companion_instance = this;\n }\n PathTargetProjection$PathPoint$Companion.prototype.create_d0y48l$ = function (p, index, lookupSpace) {\n var tmp$;\n switch (lookupSpace.name) {\n case 'X':\n tmp$ = new PathTargetProjection$PathPoint(PointTargetProjection$Companion_getInstance().create_p1yge$(p, lookupSpace), p, index);\n break;\n case 'XY':\n tmp$ = new PathTargetProjection$PathPoint(PointTargetProjection$Companion_getInstance().create_p1yge$(p, lookupSpace), p, index);\n break;\n case 'NONE':\n tmp$ = undefinedLookupSpaceError();\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n PathTargetProjection$PathPoint$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var PathTargetProjection$PathPoint$Companion_instance = null;\n function PathTargetProjection$PathPoint$Companion_getInstance() {\n if (PathTargetProjection$PathPoint$Companion_instance === null) {\n new PathTargetProjection$PathPoint$Companion();\n }\n return PathTargetProjection$PathPoint$Companion_instance;\n }\n PathTargetProjection$PathPoint.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PathPoint',\n interfaces: []\n };\n function PathTargetProjection$Companion() {\n PathTargetProjection$Companion_instance = this;\n }\n function PathTargetProjection$Companion$create$lambda(it) {\n return it.projection().x();\n }\n PathTargetProjection$Companion.prototype.create_zb7j6l$ = function (points, indexMapper, lookupSpace) {\n var pointsLocation = ArrayList_init();\n var i = 0;\n for (var tmp$ = points.iterator(); tmp$.hasNext(); ++i) {\n var point = tmp$.next();\n pointsLocation.add_11rb$(PathTargetProjection$PathPoint$Companion_getInstance().create_d0y48l$(point, indexMapper(i), lookupSpace));\n }\n if (lookupSpace === GeomTargetLocator$LookupSpace.X) {\n if (pointsLocation.size > 1) {\n sortWith(pointsLocation, new Comparator(compareBy$lambda_0(PathTargetProjection$Companion$create$lambda)));\n }\n }\n return new PathTargetProjection(pointsLocation);\n };\n PathTargetProjection$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var PathTargetProjection$Companion_instance = null;\n function PathTargetProjection$Companion_getInstance() {\n if (PathTargetProjection$Companion_instance === null) {\n new PathTargetProjection$Companion();\n }\n return PathTargetProjection$Companion_instance;\n }\n PathTargetProjection.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PathTargetProjection',\n interfaces: [TargetProjection]\n };\n function undefinedLookupSpaceError() {\n throw IllegalStateException_init('Undefined geom lookup space');\n }\n function TargetPrototype(hitShape, indexMapper, tooltipParams, tooltipKind) {\n TargetPrototype$Companion_getInstance();\n this.hitShape_8be2vx$ = hitShape;\n this.indexMapper_8be2vx$ = indexMapper;\n this.tooltipParams_0 = tooltipParams;\n this.tooltipKind_8be2vx$ = tooltipKind;\n }\n TargetPrototype.prototype.createGeomTarget_x7nr8i$ = function (hitCoord, hitIndex) {\n return new GeomTarget(hitIndex, TargetPrototype$Companion_getInstance().createTipLayoutHint_po16gq$(hitCoord, this.hitShape_8be2vx$, this.tooltipKind_8be2vx$, this.tooltipParams_0.stemLength, this.tooltipParams_0.fillColor, this.tooltipParams_0.markerColors), this.tooltipParams_0.tipLayoutHints);\n };\n function TargetPrototype$Companion() {\n TargetPrototype$Companion_instance = this;\n }\n TargetPrototype$Companion.prototype.createTipLayoutHint_po16gq$ = function (hitCoord, hitShape, tooltipKind, stemLength, fillColor, markerColors) {\n var tmp$;\n switch (hitShape.kind.name) {\n case 'POINT':\n switch (tooltipKind.name) {\n case 'VERTICAL_TOOLTIP':\n tmp$ = TipLayoutHint.Companion.verticalTooltip_eox10j$(hitCoord, hitShape.point.radius, stemLength, fillColor, markerColors);\n break;\n case 'CURSOR_TOOLTIP':\n tmp$ = TipLayoutHint.Companion.cursorTooltip_un7elx$(hitCoord, stemLength, fillColor, markerColors);\n break;\n default:\n throw IllegalStateException_init(('Wrong TipLayoutHint.kind = ' + tooltipKind + ' for POINT').toString());\n }\n\n break;\n case 'RECT':\n switch (tooltipKind.name) {\n case 'VERTICAL_TOOLTIP':\n tmp$ = TipLayoutHint.Companion.verticalTooltip_eox10j$(hitCoord, hitShape.rect.width / 2, stemLength, fillColor, markerColors);\n break;\n case 'HORIZONTAL_TOOLTIP':\n tmp$ = TipLayoutHint.Companion.horizontalTooltip_eox10j$(hitCoord, hitShape.rect.width / 2, stemLength, fillColor, markerColors);\n break;\n case 'CURSOR_TOOLTIP':\n tmp$ = TipLayoutHint.Companion.cursorTooltip_un7elx$(hitCoord, stemLength, fillColor, markerColors);\n break;\n case 'ROTATED_TOOLTIP':\n tmp$ = TipLayoutHint.Companion.rotatedTooltip_6lq1u6$(hitCoord, 0.0, null, stemLength);\n break;\n default:\n throw IllegalStateException_init(('Wrong TipLayoutHint.kind = ' + tooltipKind + ' for RECT').toString());\n }\n\n break;\n case 'PATH':\n switch (tooltipKind.name) {\n case 'HORIZONTAL_TOOLTIP':\n tmp$ = TipLayoutHint.Companion.horizontalTooltip_eox10j$(hitCoord, 0.0, stemLength, fillColor, markerColors);\n break;\n case 'VERTICAL_TOOLTIP':\n tmp$ = TipLayoutHint.Companion.verticalTooltip_eox10j$(hitCoord, 0.0, stemLength, fillColor, markerColors);\n break;\n default:\n throw IllegalStateException_init(('Wrong TipLayoutHint.kind = ' + tooltipKind + ' for PATH').toString());\n }\n\n break;\n case 'POLYGON':\n if (equals(tooltipKind, TipLayoutHint$Kind.CURSOR_TOOLTIP))\n tmp$ = TipLayoutHint.Companion.cursorTooltip_un7elx$(hitCoord, stemLength, fillColor, markerColors);\n else {\n throw IllegalStateException_init(('Wrong TipLayoutHint.kind = ' + tooltipKind + ' for POLYGON').toString());\n }\n\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n TargetPrototype$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var TargetPrototype$Companion_instance = null;\n function TargetPrototype$Companion_getInstance() {\n if (TargetPrototype$Companion_instance === null) {\n new TargetPrototype$Companion();\n }\n return TargetPrototype$Companion_instance;\n }\n TargetPrototype.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TargetPrototype',\n interfaces: []\n };\n function TransformedTargetLocator(targetLocator) {\n this.targetLocator_q7bze5$_0 = targetLocator;\n }\n TransformedTargetLocator.prototype.search_gpjtzr$ = function (coord) {\n var tmp$;\n var targetCoord = this.convertToTargetCoord_gpjtzr$(coord);\n tmp$ = this.targetLocator_q7bze5$_0.search_gpjtzr$(targetCoord);\n if (tmp$ == null) {\n return null;\n }\n var result = tmp$;\n return this.convertLookupResult_rz45e2$_0(result);\n };\n TransformedTargetLocator.prototype.convertLookupResult_rz45e2$_0 = function (lookupResult) {\n return new GeomTargetLocator$LookupResult(this.convertGeomTargets_cu5hhh$_0(lookupResult.targets), this.convertToPlotDistance_14dthe$(lookupResult.distance), lookupResult.geomKind, lookupResult.contextualMapping, lookupResult.contextualMapping.isCrosshairEnabled);\n };\n TransformedTargetLocator.prototype.convertGeomTargets_cu5hhh$_0 = function (geomTargets) {\n var destination = ArrayList_init_0(collectionSizeOrDefault(geomTargets, 10));\n var tmp$;\n tmp$ = geomTargets.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n destination.add_11rb$(new GeomTarget(item.hitIndex, this.convertTipLayoutHint_jnrdzl$_0(item.tipLayoutHint), this.convertTipLayoutHints_dshtp8$_0(item.aesTipLayoutHints)));\n }\n return destination;\n };\n TransformedTargetLocator.prototype.convertTipLayoutHint_jnrdzl$_0 = function (hint) {\n return new TipLayoutHint(hint.kind, ensureNotNull(this.safeConvertToPlotCoord_eoxeor$_0(hint.coord)), this.convertToPlotDistance_14dthe$(hint.objectRadius), hint.stemLength, hint.fillColor, hint.markerColors);\n };\n TransformedTargetLocator.prototype.convertTipLayoutHints_dshtp8$_0 = function (tipLayoutHints) {\n var result = HashMap_init();\n var tmp$;\n tmp$ = tipLayoutHints.entries.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n var aes = element.key;\n var hint = element.value;\n var value = this.convertTipLayoutHint_jnrdzl$_0(hint);\n result.put_xwzc9p$(aes, value);\n }\n return result;\n };\n TransformedTargetLocator.prototype.safeConvertToPlotCoord_eoxeor$_0 = function (coord) {\n return coord == null ? null : this.convertToPlotCoord_gpjtzr$(coord);\n };\n TransformedTargetLocator.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TransformedTargetLocator',\n interfaces: [GeomTargetLocator]\n };\n function YOrientationTargetCollector(targetCollector) {\n YOrientationTargetCollector$Companion_getInstance();\n this.targetCollector_0 = targetCollector;\n }\n YOrientationTargetCollector.prototype.addPoint_cnsimy$$default = function (index, point, radius, tooltipParams, tooltipKind) {\n this.targetCollector_0.addPoint_cnsimy$(index, point, radius, YOrientationTargetCollector$Companion_getInstance().afterYOrientation_0(tooltipParams), tooltipKind);\n };\n YOrientationTargetCollector.prototype.addRectangle_bxzvr8$$default = function (index, rectangle, tooltipParams, tooltipKind) {\n this.targetCollector_0.addRectangle_bxzvr8$(index, rectangle, YOrientationTargetCollector$Companion_getInstance().afterYOrientation_0(tooltipParams), tooltipKind);\n };\n YOrientationTargetCollector.prototype.addPath_sa5m83$$default = function (points, localToGlobalIndex, tooltipParams, tooltipKind) {\n this.targetCollector_0.addPath_sa5m83$(points, localToGlobalIndex, YOrientationTargetCollector$Companion_getInstance().afterYOrientation_0(tooltipParams), tooltipKind);\n };\n YOrientationTargetCollector.prototype.addPolygon_sa5m83$$default = function (points, localToGlobalIndex, tooltipParams, tooltipKind) {\n this.targetCollector_0.addPolygon_sa5m83$(points, localToGlobalIndex, YOrientationTargetCollector$Companion_getInstance().afterYOrientation_0(tooltipParams), tooltipKind);\n };\n YOrientationTargetCollector.prototype.withFlippedAxis = function () {\n if (!!Kotlin.isType(this.targetCollector_0, FlippedTargetCollector)) {\n var message = \"'withFlippedAxis()' is not applicable to FlippedTargetCollector\";\n throw IllegalStateException_init(message.toString());\n }\n return new FlippedTargetCollector(this);\n };\n YOrientationTargetCollector.prototype.withYOrientation = function () {\n throw IllegalStateException_init(\"'withYOrientation()' is not applicable to YOrientationTargetCollector\");\n };\n function YOrientationTargetCollector$Companion() {\n YOrientationTargetCollector$Companion_instance = this;\n }\n YOrientationTargetCollector$Companion.prototype.afterYOrientation_0 = function (tooltipParams) {\n return new GeomTargetCollector$TooltipParams(util.YOrientationBaseUtil.flipAesKeys_fzsz32$(tooltipParams.tipLayoutHints), tooltipParams.stemLength, tooltipParams.fillColor, tooltipParams.markerColors);\n };\n YOrientationTargetCollector$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var YOrientationTargetCollector$Companion_instance = null;\n function YOrientationTargetCollector$Companion_getInstance() {\n if (YOrientationTargetCollector$Companion_instance === null) {\n new YOrientationTargetCollector$Companion();\n }\n return YOrientationTargetCollector$Companion_instance;\n }\n YOrientationTargetCollector.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'YOrientationTargetCollector',\n interfaces: [GeomTargetCollector]\n };\n function ToolFeedback() {\n }\n ToolFeedback.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'ToolFeedback',\n interfaces: []\n };\n function AxisLayout() {\n }\n AxisLayout.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'AxisLayout',\n interfaces: []\n };\n function AxisLayoutInfo(axisLength, axisDomain, orientation, axisBreaks, tickLabelsBounds, tickLabelRotationAngle, tickLabelHorizontalAnchor, tickLabelVerticalAnchor, tickLabelAdditionalOffsets, tickLabelsBoundsMax, tickLabelsTextBounds) {\n if (tickLabelHorizontalAnchor === void 0)\n tickLabelHorizontalAnchor = null;\n if (tickLabelVerticalAnchor === void 0)\n tickLabelVerticalAnchor = null;\n if (tickLabelAdditionalOffsets === void 0)\n tickLabelAdditionalOffsets = null;\n if (tickLabelsBoundsMax === void 0)\n tickLabelsBoundsMax = null;\n if (tickLabelsTextBounds === void 0)\n tickLabelsTextBounds = null;\n this.axisLength = axisLength;\n this.axisDomain = axisDomain;\n this.orientation = orientation;\n this.axisBreaks = axisBreaks;\n this.tickLabelsBounds = tickLabelsBounds;\n this.tickLabelRotationAngle = tickLabelRotationAngle;\n this.tickLabelHorizontalAnchor = tickLabelHorizontalAnchor;\n this.tickLabelVerticalAnchor = tickLabelVerticalAnchor;\n this.tickLabelAdditionalOffsets = tickLabelAdditionalOffsets;\n this.tickLabelsBoundsMax_0 = tickLabelsBoundsMax;\n this.tickLabelsTextBounds_8be2vx$ = tickLabelsTextBounds;\n }\n AxisLayoutInfo.prototype.withAxisLength_14dthe$ = function (axisLength) {\n return new AxisLayoutInfo(axisLength, this.axisDomain, this.orientation, this.axisBreaks, this.tickLabelsBounds, this.tickLabelRotationAngle, this.tickLabelHorizontalAnchor, this.tickLabelVerticalAnchor, this.tickLabelAdditionalOffsets, this.tickLabelsBoundsMax_0, this.tickLabelsTextBounds_8be2vx$);\n };\n AxisLayoutInfo.prototype.axisBounds = function () {\n return this.tickLabelsBounds.union_wthzt5$(DoubleRectangle_init(0.0, 0.0, 0.0, 0.0));\n };\n AxisLayoutInfo.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'AxisLayoutInfo',\n interfaces: []\n };\n function FacetedPlotLayout(facets, layoutProviderByTile, showFacetStrip, hAxisTheme, vAxisTheme) {\n FacetedPlotLayout$Companion_getInstance();\n PlotLayoutBase.call(this);\n this.facets_0 = facets;\n this.layoutProviderByTile_0 = layoutProviderByTile;\n this.showFacetStrip_0 = showFacetStrip;\n this.hAxisTheme_0 = hAxisTheme;\n this.vAxisTheme_0 = vAxisTheme;\n this.totalAddedHSize_0 = FacetedPlotLayout$Companion_getInstance().PANEL_PADDING_0 * (this.facets_0.colCount - 1 | 0);\n this.totalAddedVSize_0 = FacetedPlotLayout$Companion_getInstance().PANEL_PADDING_0 * (this.facets_0.rowCount - 1 | 0);\n var padding = 10.0;\n var leftPadding = !this.vAxisTheme_0.showTitle() && !this.vAxisTheme_0.showLabels() ? padding : 0.0;\n var bottomPadding = !this.hAxisTheme_0.showTitle() && !this.hAxisTheme_0.showLabels() ? padding : 0.0;\n this.setPadding_6y0v78$(padding, padding, bottomPadding, leftPadding);\n if (!this.facets_0.isDefined) {\n var message = 'Undefined facets.';\n throw IllegalArgumentException_init(message.toString());\n }\n }\n FacetedPlotLayout.prototype.doLayout_3twog0$ = function (preferredSize, coordProvider) {\n var tmp$, tmp$_0, tmp$_1, tmp$_2;\n var tilesAreaSize = new DoubleVector(preferredSize.x - (this.paddingLeft_0 + this.paddingRight_0), preferredSize.y - (this.paddingTop_0 + this.paddingBottom_0));\n var facetTiles = this.facets_0.tileInfos();\n if (this.showFacetStrip_0) {\n var firstOrNull$result;\n firstOrNull$break: do {\n var tmp$_3;\n tmp$_3 = facetTiles.iterator();\n while (tmp$_3.hasNext()) {\n var element = tmp$_3.next();\n if (!element.colLabs.isEmpty()) {\n firstOrNull$result = element;\n break firstOrNull$break;\n }\n }\n firstOrNull$result = null;\n }\n while (false);\n var tileColLabCounts = (tmp$_1 = (tmp$_0 = (tmp$ = firstOrNull$result) != null ? tmp$.colLabs : null) != null ? tmp$_0.size : null) != null ? tmp$_1 : 0;\n var destination = ArrayList_init();\n var tmp$_4;\n tmp$_4 = facetTiles.iterator();\n while (tmp$_4.hasNext()) {\n var element_0 = tmp$_4.next();\n if (!element_0.colLabs.isEmpty())\n destination.add_11rb$(element_0);\n }\n var tmp$_5;\n var set = HashSet_init_0();\n var list = ArrayList_init();\n tmp$_5 = destination.iterator();\n while (tmp$_5.hasNext()) {\n var e = tmp$_5.next();\n var key = e.row;\n if (set.add_11rb$(key))\n list.add_11rb$(e);\n }\n var tileWithColLabInRowCount = list.size;\n var totalAddedHeight = FacetedPlotLayout$Companion_getInstance().facetColHeadHeight_za3lpa$(tileColLabCounts) * tileWithColLabInRowCount;\n var any$result;\n any$break: do {\n var tmp$_6;\n if (Kotlin.isType(facetTiles, Collection) && facetTiles.isEmpty()) {\n any$result = false;\n break any$break;\n }\n tmp$_6 = facetTiles.iterator();\n while (tmp$_6.hasNext()) {\n var element_1 = tmp$_6.next();\n if (element_1.rowLab != null) {\n any$result = true;\n break any$break;\n }\n }\n any$result = false;\n }\n while (false);\n var labsInRow = any$result ? 1 : 0;\n var labsTotalDim = new DoubleVector(labsInRow * FacetedPlotLayout$Companion_getInstance().FACET_TAB_HEIGHT, totalAddedHeight);\n tilesAreaSize = tilesAreaSize.subtract_gpjtzr$(labsTotalDim);\n }\n if (this.facets_0.freeHScale || this.facets_0.freeVScale) {\n tmp$_2 = FreeScalesTilesLayouter_getInstance().createTileLayoutInfos_m2eqzh$(tilesAreaSize, this.facets_0, this.layoutProviderByTile_0, this.totalAddedHSize_0, this.totalAddedVSize_0, coordProvider, this.hAxisTheme_0, this.vAxisTheme_0);\n } else {\n tmp$_2 = FixedScalesTilesLayouter_getInstance().createTileLayoutInfos_m2eqzh$(tilesAreaSize, this.facets_0, this.layoutProviderByTile_0, this.totalAddedHSize_0, this.totalAddedVSize_0, coordProvider, this.hAxisTheme_0, this.vAxisTheme_0);\n }\n var layoutInfos = tmp$_2;\n var geomOffsetByCol = FacetedPlotLayoutUtil_getInstance().geomOffsetsByCol_53l30a$(layoutInfos, facetTiles, FacetedPlotLayout$Companion_getInstance().PANEL_PADDING_0, this.facets_0.colCount);\n var geomOffsetByRow = FacetedPlotLayoutUtil_getInstance().geomOffsetsByRow_igosif$(layoutInfos, facetTiles, this.showFacetStrip_0, FacetedPlotLayout$Companion_getInstance().PANEL_PADDING_0, this.facets_0.rowCount);\n var tileBoundsList = ArrayList_init();\n var geomOuterBoundsList = ArrayList_init();\n var index = 0;\n for (var tmp$_7 = facetTiles.iterator(); tmp$_7.hasNext(); ++index) {\n var facetTile = tmp$_7.next();\n var tmp$_8, tmp$_9, tmp$_10, tmp$_11;\n var layoutInfo = layoutInfos.get_za3lpa$(index);\n var col = facetTile.col;\n var row = facetTile.row;\n var geomX = geomOffsetByCol.get_za3lpa$(col);\n var geomY = geomOffsetByRow.get_za3lpa$(row);\n var outerGeomSize = layoutInfo.geomOuterBounds.dimension;\n if (facetTile.rowLab != null && this.showFacetStrip_0) {\n tmp$_8 = FacetedPlotLayout$Companion_getInstance().FACET_TAB_HEIGHT;\n } else {\n tmp$_8 = 0.0;\n }\n var tileLabelWidth = tmp$_8;\n if (facetTile.hasVAxis) {\n tmp$_9 = layoutInfo.axisThicknessY();\n } else {\n tmp$_9 = 0.0;\n }\n var axisWidth = tmp$_9;\n var tileX = geomX - axisWidth;\n var tileWidth = outerGeomSize.x + axisWidth + tileLabelWidth;\n if (this.showFacetStrip_0) {\n tmp$_10 = FacetedPlotLayout$Companion_getInstance().facetColHeadHeight_za3lpa$(facetTile.colLabs.size);\n } else {\n tmp$_10 = 0.0;\n }\n var tileLabelHeight = tmp$_10;\n if (facetTile.hasHAxis) {\n tmp$_11 = layoutInfo.axisThicknessX();\n } else {\n tmp$_11 = 0.0;\n }\n var axisHeight = tmp$_11;\n var tileY = geomY - tileLabelHeight;\n var tileHeight = outerGeomSize.y + tileLabelHeight + axisHeight;\n var tileBounds = new DoubleRectangle(new DoubleVector(tileX, tileY), new DoubleVector(tileWidth, tileHeight));\n var geomOuterBounds = new DoubleRectangle(new DoubleVector(geomX, geomY), outerGeomSize);\n tileBoundsList.add_11rb$(tileBounds);\n geomOuterBoundsList.add_11rb$(geomOuterBounds);\n }\n var iterator = tileBoundsList.iterator();\n if (!iterator.hasNext())\n throw UnsupportedOperationException_init(\"Empty collection can't be reduced.\");\n var accumulator = iterator.next();\n while (iterator.hasNext()) {\n accumulator = accumulator.union_wthzt5$(iterator.next());\n }\n var tilesAreaOrigin = accumulator.origin;\n var originDelta = tilesAreaOrigin.negate();\n var tilesPaddingLeftTop = new DoubleVector(this.paddingLeft_0, this.paddingTop_0);\n var finalLayoutInfos = ArrayList_init();\n var index_0 = 0;\n for (var tmp$_12 = facetTiles.iterator(); tmp$_12.hasNext(); ++index_0) {\n var facetTile_0 = tmp$_12.next();\n var tmp$_13;\n var layoutInfo_0 = layoutInfos.get_za3lpa$(index_0);\n var geomInnerBoundsOffset = layoutInfo_0.geomInnerBounds.origin.subtract_gpjtzr$(layoutInfo_0.geomOuterBounds.origin);\n var tileBounds_0 = tileBoundsList.get_za3lpa$(index_0);\n var geomOuterBounds_0 = geomOuterBoundsList.get_za3lpa$(index_0);\n var geomInnerBounds = new DoubleRectangle(geomOuterBounds_0.origin.add_gpjtzr$(geomInnerBoundsOffset), layoutInfo_0.geomInnerBounds.dimension);\n var newLayoutInfo = new TileLayoutInfo(tilesPaddingLeftTop, tileBounds_0.add_gpjtzr$(originDelta), geomOuterBounds_0.add_gpjtzr$(originDelta), geomInnerBounds.add_gpjtzr$(originDelta), layoutInfo_0.hAxisInfo, layoutInfo_0.vAxisInfo, facetTile_0.hasHAxis, facetTile_0.hasVAxis, void 0, void 0, facetTile_0.trueIndex);\n if (this.showFacetStrip_0) {\n tmp$_13 = newLayoutInfo.withFacetLabels_5hkr16$(facetTile_0.colLabs, facetTile_0.rowLab);\n } else {\n tmp$_13 = newLayoutInfo;\n }\n finalLayoutInfos.add_11rb$(tmp$_13);\n }\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(finalLayoutInfos, 10));\n var tmp$_14;\n tmp$_14 = finalLayoutInfos.iterator();\n while (tmp$_14.hasNext()) {\n var item = tmp$_14.next();\n destination_0.add_11rb$(item.bounds);\n }\n var iterator_0 = destination_0.iterator();\n if (!iterator_0.hasNext())\n throw UnsupportedOperationException_init(\"Empty collection can't be reduced.\");\n var accumulator_0 = iterator_0.next();\n while (iterator_0.hasNext()) {\n accumulator_0 = accumulator_0.union_wthzt5$(iterator_0.next());\n }\n var combinedTilesSize = accumulator_0.dimension;\n var plotSize = combinedTilesSize.add_gpjtzr$(tilesPaddingLeftTop).add_gpjtzr$(new DoubleVector(this.paddingRight_0, this.paddingBottom_0));\n return new PlotLayoutInfo(finalLayoutInfos, plotSize);\n };\n function FacetedPlotLayout$Companion() {\n FacetedPlotLayout$Companion_instance = this;\n this.FACET_TAB_HEIGHT = 30.0;\n this.FACET_H_PADDING = 0;\n this.FACET_V_PADDING = 6;\n this.PANEL_PADDING_0 = 10.0;\n }\n FacetedPlotLayout$Companion.prototype.facetColLabelSize_14dthe$ = function (colWidth) {\n return new DoubleVector(colWidth - 0, this.FACET_TAB_HEIGHT - 6 * 2.0);\n };\n FacetedPlotLayout$Companion.prototype.facetColHeadHeight_za3lpa$ = function (labCount) {\n var tmp$;\n if (labCount > 0) {\n tmp$ = this.facetColLabelSize_14dthe$(0.0).y * labCount + 12;\n } else {\n tmp$ = 0.0;\n }\n return tmp$;\n };\n FacetedPlotLayout$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var FacetedPlotLayout$Companion_instance = null;\n function FacetedPlotLayout$Companion_getInstance() {\n if (FacetedPlotLayout$Companion_instance === null) {\n new FacetedPlotLayout$Companion();\n }\n return FacetedPlotLayout$Companion_instance;\n }\n FacetedPlotLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'FacetedPlotLayout',\n interfaces: [PlotLayoutBase]\n };\n function FacetedPlotLayoutUtil() {\n FacetedPlotLayoutUtil_instance = this;\n }\n FacetedPlotLayoutUtil.prototype.countVAxisInFirstRow_75mdod$ = function (facetTiles) {\n var destination = ArrayList_init();\n var tmp$;\n tmp$ = facetTiles.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n if (element.row === 0)\n destination.add_11rb$(element);\n }\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(destination, 10));\n var tmp$_0;\n tmp$_0 = destination.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n destination_0.add_11rb$(item.hasVAxis ? 1 : 0);\n }\n return sum(destination_0);\n };\n FacetedPlotLayoutUtil.prototype.countHAxisInFirstCol_75mdod$ = function (facetTiles) {\n var destination = ArrayList_init();\n var tmp$;\n tmp$ = facetTiles.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n if (element.col === 0)\n destination.add_11rb$(element);\n }\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(destination, 10));\n var tmp$_0;\n tmp$_0 = destination.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n destination_0.add_11rb$(item.hasHAxis ? 1 : 0);\n }\n return sum(destination_0);\n };\n FacetedPlotLayoutUtil.prototype.tilesAreaSize_xxmnvs$ = function (layoutInfos, facets, addedHSize, addedVSize) {\n var tmp$, tmp$_0;\n var facetTiles = facets.tileInfos();\n var tmp$_1;\n var sum = 0;\n tmp$_1 = until(0, facets.colCount).iterator();\n while (tmp$_1.hasNext()) {\n var element = tmp$_1.next();\n sum += this.maxVAxisThickness_0(layoutInfos, facetTiles, element);\n }\n var addedVAxisWidth = sum;\n var tmp$_2;\n var sum_0 = 0;\n tmp$_2 = until(0, facets.rowCount).iterator();\n while (tmp$_2.hasNext()) {\n var element_0 = tmp$_2.next();\n sum_0 += this.maxHAxisThickness_0(layoutInfos, facetTiles, element_0, facets.rowCount);\n }\n var addedHAxisHeight = sum_0;\n var $receiver = until(0, facets.rowCount);\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$_3;\n tmp$_3 = $receiver.iterator();\n while (tmp$_3.hasNext()) {\n var item = tmp$_3.next();\n var tmp$_4 = destination.add_11rb$;\n var tmp$_5;\n var sum_1 = 0;\n tmp$_5 = this.rowIndices_0(facetTiles, item).iterator();\n while (tmp$_5.hasNext()) {\n var element_1 = tmp$_5.next();\n sum_1 += layoutInfos.get_za3lpa$(element_1).geomOuterWidth();\n }\n tmp$_4.call(destination, sum_1);\n }\n var maxRowWidthGeomOnly = (tmp$ = maxOrNull_0(destination)) != null ? tmp$ : 0.0;\n var $receiver_0 = until(0, facets.colCount);\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault($receiver_0, 10));\n var tmp$_6;\n tmp$_6 = $receiver_0.iterator();\n while (tmp$_6.hasNext()) {\n var item_0 = tmp$_6.next();\n var tmp$_7 = destination_0.add_11rb$;\n var tmp$_8;\n var sum_2 = 0;\n tmp$_8 = this.colIndices_0(facetTiles, item_0).iterator();\n while (tmp$_8.hasNext()) {\n var element_2 = tmp$_8.next();\n sum_2 += layoutInfos.get_za3lpa$(element_2).geomOuterHeight();\n }\n tmp$_7.call(destination_0, sum_2);\n }\n var maxColHeightGeomOnly = (tmp$_0 = maxOrNull_0(destination_0)) != null ? tmp$_0 : 0.0;\n var w = addedVAxisWidth + maxRowWidthGeomOnly + addedHSize;\n var h = addedHAxisHeight + maxColHeightGeomOnly + addedVSize;\n return new DoubleVector(w, h);\n };\n FacetedPlotLayoutUtil.prototype.maxVAxisThickness_0 = function (layoutInfos, facetTiles, col) {\n var $receiver = this.colIndices_0(facetTiles, col);\n var maxOfOrNull$result;\n maxOfOrNull$break: do {\n var iterator = $receiver.iterator();\n if (!iterator.hasNext()) {\n maxOfOrNull$result = null;\n break maxOfOrNull$break;\n }\n var it = layoutInfos.get_za3lpa$(iterator.next());\n var block$result;\n if (it.vAxisShown) {\n block$result = it.axisThicknessY();\n } else {\n block$result = 0.0;\n }\n var maxValue = block$result;\n while (iterator.hasNext()) {\n var it_0 = layoutInfos.get_za3lpa$(iterator.next());\n var block$result_0;\n if (it_0.vAxisShown) {\n block$result_0 = it_0.axisThicknessY();\n } else {\n block$result_0 = 0.0;\n }\n var v = block$result_0;\n maxValue = JsMath.max(maxValue, v);\n }\n maxOfOrNull$result = maxValue;\n }\n while (false);\n var maxThickness = maxOfOrNull$result;\n return maxThickness != null ? maxThickness : 0.0;\n };\n FacetedPlotLayoutUtil.prototype.maxHAxisThickness_0 = function (layoutInfos, facetTiles, row, numRows) {\n var $receiver = this.rowIndices_0(facetTiles, row);\n var maxOfOrNull$result;\n maxOfOrNull$break: do {\n var iterator = $receiver.iterator();\n if (!iterator.hasNext()) {\n maxOfOrNull$result = null;\n break maxOfOrNull$break;\n }\n var ind = iterator.next();\n var selector$result;\n if (facetTiles.get_za3lpa$(ind).isBottom && row < (numRows - 1 | 0)) {\n selector$result = 0.0;\n } else {\n var it = layoutInfos.get_za3lpa$(ind);\n var block$result;\n if (it.hAxisShown) {\n block$result = it.axisThicknessX();\n } else {\n block$result = 0.0;\n }\n selector$result = block$result;\n }\n var maxValue = selector$result;\n while (iterator.hasNext()) {\n var ind_0 = iterator.next();\n var selector$result_0;\n if (facetTiles.get_za3lpa$(ind_0).isBottom && row < (numRows - 1 | 0)) {\n selector$result_0 = 0.0;\n } else {\n var it_0 = layoutInfos.get_za3lpa$(ind_0);\n var block$result_0;\n if (it_0.hAxisShown) {\n block$result_0 = it_0.axisThicknessX();\n } else {\n block$result_0 = 0.0;\n }\n selector$result_0 = block$result_0;\n }\n var v = selector$result_0;\n maxValue = JsMath.max(maxValue, v);\n }\n maxOfOrNull$result = maxValue;\n }\n while (false);\n var maxThickness = maxOfOrNull$result;\n return maxThickness != null ? maxThickness : 0.0;\n };\n FacetedPlotLayoutUtil.prototype.colIndices_0 = function (facetTiles, col) {\n var $receiver = withIndex(facetTiles);\n var destination = ArrayList_init();\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n var tile = element.component2();\n if (tile.col === col)\n destination.add_11rb$(element);\n }\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(destination, 10));\n var tmp$_0;\n tmp$_0 = destination.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n var tmp$_1 = destination_0.add_11rb$;\n var index = item.component1();\n tmp$_1.call(destination_0, index);\n }\n return destination_0;\n };\n FacetedPlotLayoutUtil.prototype.rowIndices_0 = function (facetTiles, row) {\n var $receiver = withIndex(facetTiles);\n var destination = ArrayList_init();\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n var tile = element.component2();\n if (tile.row === row)\n destination.add_11rb$(element);\n }\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(destination, 10));\n var tmp$_0;\n tmp$_0 = destination.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n var tmp$_1 = destination_0.add_11rb$;\n var index = item.component1();\n tmp$_1.call(destination_0, index);\n }\n return destination_0;\n };\n FacetedPlotLayoutUtil.prototype.geomOffsetsByCol_53l30a$ = function (layoutInfos, facetTiles, colSpace, numCols) {\n var list = ArrayList_init_0(numCols);\n for (var index = 0; index < numCols; index++) {\n list.add_11rb$(this.maxVAxisThickness_0(layoutInfos, facetTiles, index));\n }\n var axisWidths = list;\n var list_0 = ArrayList_init_0(numCols);\n for (var index_0 = 0; index_0 < numCols; index_0++) {\n list_0.add_11rb$(index_0 === 0 ? 0.0 : colSpace);\n }\n var spacesBefore = list_0;\n var baseOffset = 0.0;\n var offsets = ArrayList_init();\n for (var i = 0; i < numCols; i++) {\n var currOffset = baseOffset + spacesBefore.get_za3lpa$(i) + axisWidths.get_za3lpa$(i);\n offsets.add_11rb$(currOffset);\n baseOffset = currOffset + layoutInfos.get_za3lpa$(i).geomOuterWidth();\n }\n return offsets;\n };\n FacetedPlotLayoutUtil.prototype.geomOffsetsByRow_igosif$ = function (layoutInfos, facetTiles, showFacetStrip, rowSpace, numRows) {\n var list = ArrayList_init_0(numRows);\n for (var index = 0; index < numRows; index++) {\n list.add_11rb$(this.maxHAxisThickness_0(layoutInfos, facetTiles, index, numRows));\n }\n var axisHeights = list;\n var list_0 = ArrayList_init_0(numRows);\n for (var index_0 = 0; index_0 < numRows; index_0++) {\n list_0.add_11rb$(index_0 === 0 ? 0.0 : rowSpace);\n }\n var spacesBefore = list_0;\n var $receiver = this.colIndices_0(facetTiles, 0);\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n var tmp$_0 = destination.add_11rb$;\n var transform$result;\n if (item === 0) {\n transform$result = 0.0;\n } else if (showFacetStrip) {\n transform$result = FacetedPlotLayout$Companion_getInstance().facetColHeadHeight_za3lpa$(facetTiles.get_za3lpa$(item).colLabs.size);\n } else {\n transform$result = 0.0;\n }\n tmp$_0.call(destination, transform$result);\n }\n var tileLabelHights = destination;\n var baseOffset = 0.0;\n var offsets = ArrayList_init();\n for (var i = 0; i < numRows; i++) {\n var currOffset = baseOffset + spacesBefore.get_za3lpa$(i) + tileLabelHights.get_za3lpa$(i);\n offsets.add_11rb$(currOffset);\n baseOffset = currOffset + layoutInfos.get_za3lpa$(i).geomOuterHeight() + axisHeights.get_za3lpa$(i);\n }\n return offsets;\n };\n FacetedPlotLayoutUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'FacetedPlotLayoutUtil',\n interfaces: []\n };\n var FacetedPlotLayoutUtil_instance = null;\n function FacetedPlotLayoutUtil_getInstance() {\n if (FacetedPlotLayoutUtil_instance === null) {\n new FacetedPlotLayoutUtil();\n }\n return FacetedPlotLayoutUtil_instance;\n }\n function GeomMarginsLayout(left, top, right, bottom) {\n GeomMarginsLayout$Companion_getInstance();\n this.left_0 = left;\n this.top_0 = top;\n this.right_0 = right;\n this.bottom_0 = bottom;\n }\n GeomMarginsLayout.prototype.toInnerSize_gpjtzr$ = function (outer) {\n var lt = new DoubleVector(outer.x * this.left_0, outer.y * this.top_0);\n var rb = new DoubleVector(outer.x * this.right_0, outer.y * this.bottom_0);\n return outer.subtract_gpjtzr$(lt).subtract_gpjtzr$(rb);\n };\n GeomMarginsLayout.prototype.toInnerBounds_wthzt5$ = function (outer) {\n var lt = new DoubleVector(outer.width * this.left_0, outer.height * this.top_0);\n return new DoubleRectangle(outer.origin.add_gpjtzr$(lt), this.toInnerSize_gpjtzr$(outer.dimension));\n };\n GeomMarginsLayout.prototype.toOuterSize_gpjtzr$ = function (inner) {\n var outerWidth = inner.x / (1 - (this.left_0 + this.right_0));\n var outerHeight = inner.y / (1 - (this.top_0 + this.bottom_0));\n return new DoubleVector(outerWidth, outerHeight);\n };\n GeomMarginsLayout.prototype.toOuterBounds_wthzt5$ = function (inner) {\n var outerSize = this.toOuterSize_gpjtzr$(inner.dimension);\n var lt = new DoubleVector(outerSize.x * this.left_0, outerSize.y * this.top_0);\n return new DoubleRectangle(inner.origin.subtract_gpjtzr$(lt), outerSize);\n };\n GeomMarginsLayout.prototype.toAxisOrigin_gdlhkh$ = function (geomInnerBounds, axisOrientation) {\n var tmp$;\n var outerBounds = this.toOuterBounds_wthzt5$(geomInnerBounds);\n switch (axisOrientation.name) {\n case 'LEFT':\n tmp$ = new DoubleVector(outerBounds.left, geomInnerBounds.top);\n break;\n case 'TOP':\n tmp$ = geomInnerBounds.origin;\n break;\n case 'RIGHT':\n tmp$ = new DoubleVector(geomInnerBounds.right, geomInnerBounds.top);\n break;\n case 'BOTTOM':\n tmp$ = new DoubleVector(geomInnerBounds.left, outerBounds.bottom);\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n };\n function GeomMarginsLayout$Companion() {\n GeomMarginsLayout$Companion_instance = this;\n }\n GeomMarginsLayout$Companion.prototype.create_relqli$ = function (marginalLayers) {\n var tmp$, tmp$_0, tmp$_1, tmp$_2;\n var marginalLayersByMargin = MarginalLayerUtil_getInstance().marginalLayersByMargin_relqli$(marginalLayers);\n var tmp$_3;\n if ((tmp$ = marginalLayersByMargin.get_11rb$(MarginSide$LEFT_getInstance())) != null) {\n var maxOfOrNull$result;\n maxOfOrNull$break: do {\n var iterator = tmp$.iterator();\n if (!iterator.hasNext()) {\n maxOfOrNull$result = null;\n break maxOfOrNull$break;\n }\n var maxValue = iterator.next().marginalSize;\n while (iterator.hasNext()) {\n var v = iterator.next().marginalSize;\n maxValue = JsMath.max(maxValue, v);\n }\n maxOfOrNull$result = maxValue;\n }\n while (false);\n tmp$_3 = maxOfOrNull$result;\n } else\n tmp$_3 = null;\n var left = tmp$_3;\n var tmp$_4;\n if ((tmp$_0 = marginalLayersByMargin.get_11rb$(MarginSide$TOP_getInstance())) != null) {\n var maxOfOrNull$result_0;\n maxOfOrNull$break: do {\n var iterator_0 = tmp$_0.iterator();\n if (!iterator_0.hasNext()) {\n maxOfOrNull$result_0 = null;\n break maxOfOrNull$break;\n }\n var maxValue_0 = iterator_0.next().marginalSize;\n while (iterator_0.hasNext()) {\n var v_0 = iterator_0.next().marginalSize;\n maxValue_0 = JsMath.max(maxValue_0, v_0);\n }\n maxOfOrNull$result_0 = maxValue_0;\n }\n while (false);\n tmp$_4 = maxOfOrNull$result_0;\n } else\n tmp$_4 = null;\n var top = tmp$_4;\n var tmp$_5;\n if ((tmp$_1 = marginalLayersByMargin.get_11rb$(MarginSide$RIGHT_getInstance())) != null) {\n var maxOfOrNull$result_1;\n maxOfOrNull$break: do {\n var iterator_1 = tmp$_1.iterator();\n if (!iterator_1.hasNext()) {\n maxOfOrNull$result_1 = null;\n break maxOfOrNull$break;\n }\n var maxValue_1 = iterator_1.next().marginalSize;\n while (iterator_1.hasNext()) {\n var v_1 = iterator_1.next().marginalSize;\n maxValue_1 = JsMath.max(maxValue_1, v_1);\n }\n maxOfOrNull$result_1 = maxValue_1;\n }\n while (false);\n tmp$_5 = maxOfOrNull$result_1;\n } else\n tmp$_5 = null;\n var right = tmp$_5;\n var tmp$_6;\n if ((tmp$_2 = marginalLayersByMargin.get_11rb$(MarginSide$BOTTOM_getInstance())) != null) {\n var maxOfOrNull$result_2;\n maxOfOrNull$break: do {\n var iterator_2 = tmp$_2.iterator();\n if (!iterator_2.hasNext()) {\n maxOfOrNull$result_2 = null;\n break maxOfOrNull$break;\n }\n var maxValue_2 = iterator_2.next().marginalSize;\n while (iterator_2.hasNext()) {\n var v_2 = iterator_2.next().marginalSize;\n maxValue_2 = JsMath.max(maxValue_2, v_2);\n }\n maxOfOrNull$result_2 = maxValue_2;\n }\n while (false);\n tmp$_6 = maxOfOrNull$result_2;\n } else\n tmp$_6 = null;\n var bottom = tmp$_6;\n return new GeomMarginsLayout(left != null ? left : 0.0, top != null ? top : 0.0, right != null ? right : 0.0, bottom != null ? bottom : 0.0);\n };\n GeomMarginsLayout$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var GeomMarginsLayout$Companion_instance = null;\n function GeomMarginsLayout$Companion_getInstance() {\n if (GeomMarginsLayout$Companion_instance === null) {\n new GeomMarginsLayout$Companion();\n }\n return GeomMarginsLayout$Companion_instance;\n }\n GeomMarginsLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GeomMarginsLayout',\n interfaces: []\n };\n function GeometryUtil() {\n GeometryUtil_instance = this;\n }\n GeometryUtil.prototype.union_te9coj$ = function (first, optionalSecond) {\n var tmp$;\n if (optionalSecond == null) {\n tmp$ = first;\n } else\n tmp$ = first.union_wthzt5$(optionalSecond);\n return tmp$;\n };\n GeometryUtil.prototype.union_a7nkjf$ = function (head, c) {\n var tmp$;\n var result = head;\n tmp$ = c.iterator();\n while (tmp$.hasNext()) {\n var r = tmp$.next();\n result = result.union_wthzt5$(r);\n }\n return result;\n };\n GeometryUtil.prototype.changeWidth_j6cmed$ = function (r, width) {\n return DoubleRectangle_init(r.origin.x, r.origin.y, width, r.dimension.y);\n };\n GeometryUtil.prototype.changeWidthKeepRight_j6cmed$ = function (r, width) {\n return DoubleRectangle_init(r.right - width, r.origin.y, width, r.dimension.y);\n };\n GeometryUtil.prototype.changeHeight_j6cmed$ = function (r, height) {\n return DoubleRectangle_init(r.origin.x, r.origin.y, r.dimension.x, height);\n };\n GeometryUtil.prototype.changeHeightKeepBottom_j6cmed$ = function (r, height) {\n return DoubleRectangle_init(r.origin.x, r.bottom - height, r.dimension.x, height);\n };\n GeometryUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'GeometryUtil',\n interfaces: []\n };\n var GeometryUtil_instance = null;\n function GeometryUtil_getInstance() {\n if (GeometryUtil_instance === null) {\n new GeometryUtil();\n }\n return GeometryUtil_instance;\n }\n function LegendBoxInfo(size) {\n LegendBoxInfo$Companion_getInstance();\n this.size_8be2vx$ = size;\n }\n Object.defineProperty(LegendBoxInfo.prototype, 'isEmpty', {\n configurable: true,\n get: function () {\n return false;\n }\n });\n function LegendBoxInfo$Companion() {\n LegendBoxInfo$Companion_instance = this;\n this.EMPTY = new LegendBoxInfo$Companion$EMPTY$ObjectLiteral(DoubleVector.Companion.ZERO);\n }\n function LegendBoxInfo$Companion$EMPTY$ObjectLiteral(size) {\n LegendBoxInfo.call(this, size);\n }\n Object.defineProperty(LegendBoxInfo$Companion$EMPTY$ObjectLiteral.prototype, 'isEmpty', {\n configurable: true,\n get: function () {\n return true;\n }\n });\n LegendBoxInfo$Companion$EMPTY$ObjectLiteral.prototype.createLegendBox = function () {\n throw IllegalStateException_init('Empty legend box info');\n };\n LegendBoxInfo$Companion$EMPTY$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [LegendBoxInfo]\n };\n LegendBoxInfo$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var LegendBoxInfo$Companion_instance = null;\n function LegendBoxInfo$Companion_getInstance() {\n if (LegendBoxInfo$Companion_instance === null) {\n new LegendBoxInfo$Companion();\n }\n return LegendBoxInfo$Companion_instance;\n }\n LegendBoxInfo.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendBoxInfo',\n interfaces: []\n };\n function LegendBoxesLayout(outerBounds, innerBounds, theme) {\n this.outerBounds_0 = outerBounds;\n this.innerBounds_0 = innerBounds;\n this.theme_0 = theme;\n }\n LegendBoxesLayout.prototype.doLayout_mx3cup$ = function (legendsBlockInfo) {\n var tmp$;\n var legendPosition = this.theme_0.position();\n var legendJustification = this.theme_0.justification();\n var blockSize = legendsBlockInfo.size();\n var innerCenter = this.innerBounds_0.center;\n var a = this.outerBounds_0.top;\n var b = innerCenter.y - blockSize.y / 2;\n var sideLegendTop = JsMath.max(a, b);\n if (equals(legendPosition, LegendPosition$Companion_getInstance().LEFT))\n tmp$ = new DoubleVector(this.outerBounds_0.left, sideLegendTop);\n else if (equals(legendPosition, LegendPosition$Companion_getInstance().RIGHT))\n tmp$ = new DoubleVector(this.outerBounds_0.right - blockSize.x, sideLegendTop);\n else if (equals(legendPosition, LegendPosition$Companion_getInstance().TOP))\n tmp$ = new DoubleVector(innerCenter.x - blockSize.x / 2, this.outerBounds_0.top);\n else if (equals(legendPosition, LegendPosition$Companion_getInstance().BOTTOM))\n tmp$ = new DoubleVector(innerCenter.x - blockSize.x / 2, this.outerBounds_0.bottom - blockSize.y);\n else\n tmp$ = LegendBoxesLayoutUtil_getInstance().overlayLegendOrigin_tmgej$(this.innerBounds_0, blockSize, legendPosition, legendJustification);\n var legendOrigin = tmp$;\n return legendsBlockInfo.moveAll_gpjtzr$(legendOrigin);\n };\n function LegendBoxesLayout$BoxWithLocation(legendBox, location) {\n this.legendBox = legendBox;\n this.location = location;\n }\n LegendBoxesLayout$BoxWithLocation.prototype.size_8be2vx$ = function () {\n return this.legendBox.size_8be2vx$;\n };\n LegendBoxesLayout$BoxWithLocation.prototype.bounds_8be2vx$ = function () {\n return new DoubleRectangle(this.location, this.legendBox.size_8be2vx$);\n };\n LegendBoxesLayout$BoxWithLocation.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'BoxWithLocation',\n interfaces: []\n };\n LegendBoxesLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendBoxesLayout',\n interfaces: []\n };\n function LegendBoxesLayoutUtil() {\n LegendBoxesLayoutUtil_instance = this;\n }\n LegendBoxesLayoutUtil.prototype.arrangeLegendBoxes_wcxvwm$ = function (infos, theme) {\n var tmp$;\n var legendArrangement = LegendArrangement$VERTICAL_getInstance();\n if (equals(legendArrangement, LegendArrangement$VERTICAL_getInstance()))\n tmp$ = this.verticalStack_0(infos);\n else\n tmp$ = this.horizontalStack_0(infos);\n var boxWithLocationList = tmp$;\n return new LegendsBlockInfo(boxWithLocationList);\n };\n LegendBoxesLayoutUtil.prototype.verticalStack_0 = function (boxInfos) {\n var tmp$;\n var result = ArrayList_init();\n var y = 0.0;\n tmp$ = boxInfos.iterator();\n while (tmp$.hasNext()) {\n var info = tmp$.next();\n result.add_11rb$(new LegendBoxesLayout$BoxWithLocation(info, new DoubleVector(0.0, y)));\n y += info.size_8be2vx$.y;\n }\n return result;\n };\n LegendBoxesLayoutUtil.prototype.horizontalStack_0 = function (boxInfos) {\n var tmp$;\n var result = ArrayList_init();\n var x = 0.0;\n tmp$ = boxInfos.iterator();\n while (tmp$.hasNext()) {\n var info = tmp$.next();\n result.add_11rb$(new LegendBoxesLayout$BoxWithLocation(info, new DoubleVector(x, 0.0)));\n x += info.size_8be2vx$.x;\n }\n return result;\n };\n LegendBoxesLayoutUtil.prototype.overlayLegendOrigin_tmgej$ = function (plotBounds, legendSize, legendPosition, legendJustification) {\n var plotSize = plotBounds.dimension;\n var absolutePosition = new DoubleVector(plotBounds.left + plotSize.x * legendPosition.x, plotBounds.bottom - plotSize.y * legendPosition.y);\n var originOffset = new DoubleVector(-legendSize.x * legendJustification.x, legendSize.y * legendJustification.y - legendSize.y);\n return absolutePosition.add_gpjtzr$(originOffset);\n };\n LegendBoxesLayoutUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'LegendBoxesLayoutUtil',\n interfaces: []\n };\n var LegendBoxesLayoutUtil_instance = null;\n function LegendBoxesLayoutUtil_getInstance() {\n if (LegendBoxesLayoutUtil_instance === null) {\n new LegendBoxesLayoutUtil();\n }\n return LegendBoxesLayoutUtil_instance;\n }\n function LegendsBlockInfo(boxWithLocationList) {\n this.boxWithLocationList = boxWithLocationList;\n }\n LegendsBlockInfo.prototype.size = function () {\n var tmp$, tmp$_0, tmp$_1;\n var bounds = null;\n tmp$ = this.boxWithLocationList.iterator();\n while (tmp$.hasNext()) {\n var boxWithLocation = tmp$.next();\n bounds = (tmp$_0 = bounds != null ? bounds.union_wthzt5$(boxWithLocation.bounds_8be2vx$()) : null) != null ? tmp$_0 : boxWithLocation.bounds_8be2vx$();\n }\n return (tmp$_1 = bounds != null ? bounds.dimension : null) != null ? tmp$_1 : DoubleVector.Companion.ZERO;\n };\n LegendsBlockInfo.prototype.moveAll_gpjtzr$ = function (delta) {\n var tmp$;\n var result = ArrayList_init();\n tmp$ = this.boxWithLocationList.iterator();\n while (tmp$.hasNext()) {\n var boxWithLocation = tmp$.next();\n result.add_11rb$(new LegendBoxesLayout$BoxWithLocation(boxWithLocation.legendBox, boxWithLocation.location.add_gpjtzr$(delta)));\n }\n var $receiver = this.boxWithLocationList;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$_0;\n tmp$_0 = $receiver.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n destination.add_11rb$(new LegendBoxesLayout$BoxWithLocation(item.legendBox, item.location.add_gpjtzr$(delta)));\n }\n var newList = destination;\n return new LegendsBlockInfo(newList);\n };\n LegendsBlockInfo.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LegendsBlockInfo',\n interfaces: []\n };\n function Margins(top, right, bottom, left) {\n if (top === void 0)\n top = 0.0;\n if (right === void 0)\n right = 0.0;\n if (bottom === void 0)\n bottom = 0.0;\n if (left === void 0)\n left = 0.0;\n this.top = top;\n this.right = right;\n this.bottom = bottom;\n this.left = left;\n }\n Margins.prototype.width = function () {\n return this.left + this.right;\n };\n Margins.prototype.height = function () {\n return this.top + this.bottom;\n };\n Margins.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'Margins',\n interfaces: []\n };\n function PlotAxisLayout(breaksProviderFactory, theme, orientation) {\n this.breaksProviderFactory_0 = breaksProviderFactory;\n this.theme_0 = theme;\n this.orientation_bjhusy$_0 = orientation;\n }\n Object.defineProperty(PlotAxisLayout.prototype, 'orientation', {\n get: function () {\n return this.orientation_bjhusy$_0;\n }\n });\n PlotAxisLayout.prototype.initialThickness = function () {\n return PlotAxisLayoutUtil_getInstance().initialThickness_chj3mn$(this.orientation, this.theme_0);\n };\n PlotAxisLayout.prototype.doLayout_5wdni1$ = function (axisDomain, axisLength, maxTickLabelsBoundsStretched) {\n var breaksProvider = this.breaksProviderFactory_0.createAxisBreaksProvider_3lmjpf$(axisDomain);\n var layouter = AxisLayouter$Companion_getInstance().create_ywgc3$(this.orientation, axisDomain, breaksProvider, this.theme_0);\n return layouter.doLayout_p1d3jc$(axisLength, maxTickLabelsBoundsStretched);\n };\n PlotAxisLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PlotAxisLayout',\n interfaces: [AxisLayout]\n };\n function PlotAxisLayoutUtil() {\n PlotAxisLayoutUtil_instance = this;\n this.INITIAL_TICK_LABEL_IN_CHARS_0 = '_';\n }\n PlotAxisLayoutUtil.prototype.initialThickness_chj3mn$ = function (orientation, theme) {\n var tmp$;\n if (theme.showTickMarks() || theme.showLabels()) {\n var v = theme.tickLabelDistance_6taknv$(orientation.isHorizontal);\n if (theme.showLabels()) {\n tmp$ = v + this.initialTickLabelSize_0(orientation, PlotLabelSpecFactory_getInstance().axisTick_9yvfuv$(theme));\n } else {\n tmp$ = v;\n }\n return tmp$;\n }\n return 0.0;\n };\n PlotAxisLayoutUtil.prototype.initialTickLabelSize_0 = function (orientation, tickLabelSpec) {\n return orientation.isHorizontal ? tickLabelSpec.height() : tickLabelSpec.width_61zpoe$(this.INITIAL_TICK_LABEL_IN_CHARS_0);\n };\n PlotAxisLayoutUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'PlotAxisLayoutUtil',\n interfaces: []\n };\n var PlotAxisLayoutUtil_instance = null;\n function PlotAxisLayoutUtil_getInstance() {\n if (PlotAxisLayoutUtil_instance === null) {\n new PlotAxisLayoutUtil();\n }\n return PlotAxisLayoutUtil_instance;\n }\n function PlotLabelSpecFactory() {\n PlotLabelSpecFactory_instance = this;\n this.DISTANCE_TO_LABEL_IN_CHARS = '_';\n }\n PlotLabelSpecFactory.prototype.plotTitle_5dhkxz$ = function (theme) {\n return this.plotLabelSpec_0(theme.titleStyle());\n };\n PlotLabelSpecFactory.prototype.plotSubtitle_5dhkxz$ = function (theme) {\n return this.plotLabelSpec_0(theme.subtitleStyle());\n };\n PlotLabelSpecFactory.prototype.plotCaption_5dhkxz$ = function (theme) {\n return this.plotLabelSpec_0(theme.captionStyle());\n };\n PlotLabelSpecFactory.prototype.legendTitle_730mk3$ = function (theme) {\n return this.plotLabelSpec_0(theme.titleStyle());\n };\n PlotLabelSpecFactory.prototype.legendItem_730mk3$ = function (theme) {\n return this.plotLabelSpec_0(theme.textStyle());\n };\n PlotLabelSpecFactory.prototype.axisTick_9yvfuv$ = function (theme) {\n return this.plotLabelSpec_0(theme.labelStyle());\n };\n PlotLabelSpecFactory.prototype.axisTitle_9yvfuv$ = function (theme) {\n return this.plotLabelSpec_0(theme.titleStyle());\n };\n PlotLabelSpecFactory.prototype.plotLabelSpec_0 = function (textStyle) {\n return new PlotLabelSpec(new Font(textStyle.family, numberToInt(textStyle.size), textStyle.face.bold, textStyle.face.italic));\n };\n PlotLabelSpecFactory.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'PlotLabelSpecFactory',\n interfaces: []\n };\n var PlotLabelSpecFactory_instance = null;\n function PlotLabelSpecFactory_getInstance() {\n if (PlotLabelSpecFactory_instance === null) {\n new PlotLabelSpecFactory();\n }\n return PlotLabelSpecFactory_instance;\n }\n function PlotLayout() {\n }\n PlotLayout.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'PlotLayout',\n interfaces: []\n };\n function PlotLayoutBase() {\n this.paddingTop_72hspu$_0 = 0.0;\n this.paddingRight_oc6xpz$_0 = 0.0;\n this.paddingBottom_phgrg6$_0 = 0.0;\n this.paddingLeft_66kgx2$_0 = 0.0;\n }\n Object.defineProperty(PlotLayoutBase.prototype, 'paddingTop_0', {\n configurable: true,\n get: function () {\n return this.paddingTop_72hspu$_0;\n },\n set: function (paddingTop) {\n this.paddingTop_72hspu$_0 = paddingTop;\n }\n });\n Object.defineProperty(PlotLayoutBase.prototype, 'paddingRight_0', {\n configurable: true,\n get: function () {\n return this.paddingRight_oc6xpz$_0;\n },\n set: function (paddingRight) {\n this.paddingRight_oc6xpz$_0 = paddingRight;\n }\n });\n Object.defineProperty(PlotLayoutBase.prototype, 'paddingBottom_0', {\n configurable: true,\n get: function () {\n return this.paddingBottom_phgrg6$_0;\n },\n set: function (paddingBottom) {\n this.paddingBottom_phgrg6$_0 = paddingBottom;\n }\n });\n Object.defineProperty(PlotLayoutBase.prototype, 'paddingLeft_0', {\n configurable: true,\n get: function () {\n return this.paddingLeft_66kgx2$_0;\n },\n set: function (paddingLeft) {\n this.paddingLeft_66kgx2$_0 = paddingLeft;\n }\n });\n PlotLayoutBase.prototype.setPadding_6y0v78$ = function (top, right, bottom, left) {\n this.paddingTop_0 = top;\n this.paddingRight_0 = right;\n this.paddingBottom_0 = bottom;\n this.paddingLeft_0 = left;\n };\n PlotLayoutBase.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PlotLayoutBase',\n interfaces: [PlotLayout]\n };\n function PlotLayoutInfo(tiles, size) {\n this.size = size;\n this.tiles = ArrayList_init_1(tiles);\n }\n PlotLayoutInfo.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PlotLayoutInfo',\n interfaces: []\n };\n function PlotLayoutUtil() {\n PlotLayoutUtil_instance = this;\n this.LIVE_MAP_PLOT_PADDING_0 = new DoubleVector(10.0, 0.0);\n this.LIVE_MAP_PLOT_MARGIN_0 = new DoubleVector(10.0, 10.0);\n }\n PlotLayoutUtil.prototype.labelDimensions_0 = function (text, labelSpec) {\n if (text.length === 0) {\n return new DoubleVector(0.0, labelSpec.height());\n }\n return new DoubleVector(labelSpec.width_61zpoe$(text), labelSpec.height());\n };\n PlotLayoutUtil.prototype.textLinesDimensions_0 = function (text, labelSpec) {\n var $receiver = MultilineLabel.Companion.splitLines_61zpoe$(text);\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n destination.add_11rb$(this.labelDimensions_0(item, labelSpec));\n }\n return destination;\n };\n function PlotLayoutUtil$textDimensions$union($receiver, p) {\n var a = $receiver.x;\n var b = p.x;\n return new DoubleVector(JsMath.max(a, b), $receiver.y + p.y);\n }\n PlotLayoutUtil.prototype.textDimensions_1al14g$ = function (text, labelSpec) {\n var union = PlotLayoutUtil$textDimensions$union;\n var $receiver = this.textLinesDimensions_0(text, labelSpec);\n var tmp$;\n var accumulator = DoubleVector.Companion.ZERO;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n accumulator = union(accumulator, element);\n }\n return accumulator;\n };\n PlotLayoutUtil.prototype.titleThickness_0 = function (title, labelSpec, margin) {\n if (title == null)\n return 0.0;\n return this.textDimensions_1al14g$(title, labelSpec).y + margin;\n };\n PlotLayoutUtil.prototype.titleThickness_kyoegs$ = function (title, labelSpec, margins) {\n return this.titleThickness_0(title, labelSpec, margins.height());\n };\n PlotLayoutUtil.prototype.overallGeomBounds_93w4c3$ = function (plotLayoutInfo) {\n if (!!plotLayoutInfo.tiles.isEmpty()) {\n var message = 'Plot is empty';\n throw IllegalArgumentException_init(message.toString());\n }\n var $receiver = plotLayoutInfo.tiles;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n destination.add_11rb$(item.getAbsoluteOuterGeomBounds_gpjtzr$(DoubleVector.Companion.ZERO));\n }\n var iterator = destination.iterator();\n if (!iterator.hasNext())\n throw UnsupportedOperationException_init(\"Empty collection can't be reduced.\");\n var accumulator = iterator.next();\n while (iterator.hasNext()) {\n accumulator = accumulator.union_wthzt5$(iterator.next());\n }\n return accumulator;\n };\n PlotLayoutUtil.prototype.overallTileBounds_93w4c3$ = function (plotLayoutInfo) {\n if (!!plotLayoutInfo.tiles.isEmpty()) {\n var message = 'Plot is empty';\n throw IllegalArgumentException_init(message.toString());\n }\n var $receiver = plotLayoutInfo.tiles;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n destination.add_11rb$(item.getAbsoluteBounds_gpjtzr$(DoubleVector.Companion.ZERO));\n }\n var iterator = destination.iterator();\n if (!iterator.hasNext())\n throw UnsupportedOperationException_init(\"Empty collection can't be reduced.\");\n var accumulator = iterator.next();\n while (iterator.hasNext()) {\n accumulator = accumulator.union_wthzt5$(iterator.next());\n }\n return accumulator;\n };\n PlotLayoutUtil.prototype.liveMapBounds_wthzt5$ = function (container) {\n return new DoubleRectangle(container.origin.add_gpjtzr$(this.LIVE_MAP_PLOT_PADDING_0), container.dimension.subtract_gpjtzr$(this.LIVE_MAP_PLOT_MARGIN_0));\n };\n PlotLayoutUtil.prototype.subtractTitlesAndLegends_krgcoj$ = function (baseSize, title, subtitle, caption, axisTitleLeft, axisTitleBottom, axisEnabled, legendsBlockInfo, theme, flippedAxis) {\n var delta = this.titlesAndLegendsSizeDelta_0(title, subtitle, caption, axisTitleLeft, axisTitleBottom, axisEnabled, legendsBlockInfo, theme, flippedAxis);\n var reduced = baseSize.subtract_gpjtzr$(delta);\n var a = reduced.x;\n var b = TileLayoutUtil_getInstance().GEOM_MIN_SIZE.x;\n var tmp$ = JsMath.max(a, b);\n var a_0 = reduced.y;\n var b_0 = TileLayoutUtil_getInstance().GEOM_MIN_SIZE.y;\n return new DoubleVector(tmp$, JsMath.max(a_0, b_0));\n };\n PlotLayoutUtil.prototype.addTitlesAndLegends_krgcoj$ = function (base, title, subtitle, caption, axisTitleLeft, axisTitleBottom, axisEnabled, legendsBlockInfo, theme, flippedAxis) {\n var delta = this.titlesAndLegendsSizeDelta_0(title, subtitle, caption, axisTitleLeft, axisTitleBottom, axisEnabled, legendsBlockInfo, theme, flippedAxis);\n return base.add_gpjtzr$(delta);\n };\n PlotLayoutUtil.prototype.titlesAndLegendsSizeDelta_0 = function (title, subtitle, caption, axisTitleLeft, axisTitleBottom, axisEnabled, legendsBlockInfo, theme, flippedAxis) {\n var titleDelta = this.titleSizeDelta_9qd63d$(title, subtitle, theme.plot());\n var axisTitlesDelta = this.axisTitleSizeDelta_5fzsug$(to(axisTitleLeft, PlotLabelSpecFactory_getInstance().axisTitle_9yvfuv$(theme.verticalAxis_6taknv$(flippedAxis))), to(axisTitleBottom, PlotLabelSpecFactory_getInstance().axisTitle_9yvfuv$(theme.horizontalAxis_6taknv$(flippedAxis))), axisEnabled, this.axisMarginDimensions_1crrl9$(theme, flippedAxis));\n var legendBlockDelta = this.legendBlockDelta_0(legendsBlockInfo, theme.legend());\n var captionDelta = this.captionSizeDelta_n8fzqq$(caption, theme.plot());\n return titleDelta.add_gpjtzr$(axisTitlesDelta).add_gpjtzr$(legendBlockDelta).add_gpjtzr$(captionDelta);\n };\n PlotLayoutUtil.prototype.titleSizeDelta_9qd63d$ = function (title, subtitle, theme) {\n return new DoubleVector(0.0, this.titleThickness_kyoegs$(title, PlotLabelSpecFactory_getInstance().plotTitle_5dhkxz$(theme), theme.titleMargins()) + this.titleThickness_kyoegs$(subtitle, PlotLabelSpecFactory_getInstance().plotSubtitle_5dhkxz$(theme), theme.subtitleMargins()));\n };\n PlotLayoutUtil.prototype.captionSizeDelta_n8fzqq$ = function (caption, theme) {\n return new DoubleVector(0.0, this.titleThickness_kyoegs$(caption, PlotLabelSpecFactory_getInstance().plotCaption_5dhkxz$(theme), theme.captionMargins()));\n };\n PlotLayoutUtil.prototype.axisMarginDimensions_1crrl9$ = function (theme, flippedAxis) {\n var width = theme.verticalAxis_6taknv$(flippedAxis).titleMargins().width();\n var height = theme.horizontalAxis_6taknv$(flippedAxis).titleMargins().height();\n return new DoubleVector(width, height);\n };\n PlotLayoutUtil.prototype.axisTitleSizeDelta_5fzsug$ = function (axisTitleLeft, axisTitleBottom, axisEnabled, marginDimensions) {\n if (!axisEnabled)\n return DoubleVector.Companion.ZERO;\n var axisTitleLeftDelta = new DoubleVector(this.titleThickness_0(axisTitleLeft.first, axisTitleLeft.second, marginDimensions.x), 0.0);\n var axisTitleBottomDelta = new DoubleVector(0.0, this.titleThickness_0(axisTitleBottom.first, axisTitleBottom.second, marginDimensions.y));\n return axisTitleLeftDelta.add_gpjtzr$(axisTitleBottomDelta);\n };\n PlotLayoutUtil.prototype.legendBlockDelta_0 = function (legendsBlockInfo, theme) {\n var tmp$, tmp$_0;\n if (!theme.position().isFixed)\n return DoubleVector.Companion.ZERO;\n var size = legendsBlockInfo.size();\n tmp$ = theme.position();\n if (equals(tmp$, LegendPosition$Companion_getInstance().LEFT) || equals(tmp$, LegendPosition$Companion_getInstance().RIGHT))\n tmp$_0 = new DoubleVector(size.x, 0.0);\n else\n tmp$_0 = new DoubleVector(0.0, size.y);\n return tmp$_0;\n };\n PlotLayoutUtil.prototype.legendBlockLeftTopDelta_284vw0$ = function (legendsBlockInfo, theme) {\n var tmp$, tmp$_0;\n if (!theme.position().isFixed)\n return DoubleVector.Companion.ZERO;\n var size = legendsBlockInfo.size();\n tmp$ = theme.position();\n if (equals(tmp$, LegendPosition$Companion_getInstance().LEFT))\n tmp$_0 = new DoubleVector(size.x, 0.0);\n else if (equals(tmp$, LegendPosition$Companion_getInstance().TOP))\n tmp$_0 = new DoubleVector(0.0, size.y);\n else\n tmp$_0 = DoubleVector.Companion.ZERO;\n return tmp$_0;\n };\n PlotLayoutUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'PlotLayoutUtil',\n interfaces: []\n };\n var PlotLayoutUtil_instance = null;\n function PlotLayoutUtil_getInstance() {\n if (PlotLayoutUtil_instance === null) {\n new PlotLayoutUtil();\n }\n return PlotLayoutUtil_instance;\n }\n function SingleTilePlotLayout(tileLayout, hAxisTheme, vAxisTheme) {\n SingleTilePlotLayout$Companion_getInstance();\n PlotLayoutBase.call(this);\n this.tileLayout_0 = tileLayout;\n var leftPadding = !vAxisTheme.showTitle() && !vAxisTheme.showLabels() ? SingleTilePlotLayout$Companion_getInstance().PADDING_0 : 0.0;\n var bottomPadding = !hAxisTheme.showTitle() && !hAxisTheme.showLabels() ? SingleTilePlotLayout$Companion_getInstance().PADDING_0 : 0.0;\n this.setPadding_6y0v78$(SingleTilePlotLayout$Companion_getInstance().PADDING_0, SingleTilePlotLayout$Companion_getInstance().PADDING_0, bottomPadding, leftPadding);\n }\n SingleTilePlotLayout.prototype.doLayout_3twog0$ = function (preferredSize, coordProvider) {\n var paddingLeftTop = new DoubleVector(this.paddingLeft_0, this.paddingTop_0);\n var paddingRightBottom = new DoubleVector(this.paddingRight_0, this.paddingBottom_0);\n var tilePreferredSize = preferredSize.subtract_gpjtzr$(paddingLeftTop).subtract_gpjtzr$(paddingRightBottom);\n var tileInfo = this.tileLayout_0.doLayout_3twog0$(tilePreferredSize, coordProvider).withOffset_gpjtzr$(paddingLeftTop);\n var plotSize = tileInfo.bounds.dimension.add_gpjtzr$(paddingLeftTop).add_gpjtzr$(paddingRightBottom);\n return new PlotLayoutInfo(listOf(tileInfo), plotSize);\n };\n function SingleTilePlotLayout$Companion() {\n SingleTilePlotLayout$Companion_instance = this;\n this.PADDING_0 = 10.0;\n }\n SingleTilePlotLayout$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var SingleTilePlotLayout$Companion_instance = null;\n function SingleTilePlotLayout$Companion_getInstance() {\n if (SingleTilePlotLayout$Companion_instance === null) {\n new SingleTilePlotLayout$Companion();\n }\n return SingleTilePlotLayout$Companion_instance;\n }\n SingleTilePlotLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'SingleTilePlotLayout',\n interfaces: [PlotLayoutBase]\n };\n function TextJustification(x, y) {\n TextJustification$Companion_getInstance();\n this.x = x;\n this.y = y;\n }\n function TextJustification$Companion() {\n TextJustification$Companion_instance = this;\n }\n function TextJustification$Companion$TextRotation(name, ordinal, angle) {\n Enum.call(this);\n this.angle = angle;\n this.name$ = name;\n this.ordinal$ = ordinal;\n }\n function TextJustification$Companion$TextRotation_initFields() {\n TextJustification$Companion$TextRotation_initFields = function () {\n };\n TextJustification$Companion$TextRotation$CLOCKWISE_instance = new TextJustification$Companion$TextRotation('CLOCKWISE', 0, 90.0);\n TextJustification$Companion$TextRotation$ANTICLOCKWISE_instance = new TextJustification$Companion$TextRotation('ANTICLOCKWISE', 1, -90.0);\n }\n var TextJustification$Companion$TextRotation$CLOCKWISE_instance;\n function TextJustification$Companion$TextRotation$CLOCKWISE_getInstance() {\n TextJustification$Companion$TextRotation_initFields();\n return TextJustification$Companion$TextRotation$CLOCKWISE_instance;\n }\n var TextJustification$Companion$TextRotation$ANTICLOCKWISE_instance;\n function TextJustification$Companion$TextRotation$ANTICLOCKWISE_getInstance() {\n TextJustification$Companion$TextRotation_initFields();\n return TextJustification$Companion$TextRotation$ANTICLOCKWISE_instance;\n }\n TextJustification$Companion$TextRotation.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TextRotation',\n interfaces: [Enum]\n };\n function TextJustification$Companion$TextRotation$values() {\n return [TextJustification$Companion$TextRotation$CLOCKWISE_getInstance(), TextJustification$Companion$TextRotation$ANTICLOCKWISE_getInstance()];\n }\n TextJustification$Companion$TextRotation.values = TextJustification$Companion$TextRotation$values;\n function TextJustification$Companion$TextRotation$valueOf(name) {\n switch (name) {\n case 'CLOCKWISE':\n return TextJustification$Companion$TextRotation$CLOCKWISE_getInstance();\n case 'ANTICLOCKWISE':\n return TextJustification$Companion$TextRotation$ANTICLOCKWISE_getInstance();\n default:\n throwISE('No enum constant jetbrains.datalore.plot.builder.layout.TextJustification.Companion.TextRotation.' + name);\n }\n }\n TextJustification$Companion$TextRotation.valueOf_61zpoe$ = TextJustification$Companion$TextRotation$valueOf;\n TextJustification$Companion.prototype.applyJustification_x3kzr8$ = function (boundRect, textSize, lineHeight, justification, rotation) {\n if (rotation === void 0)\n rotation = null;\n var tmp$;\n var rect = rotation != null ? boundRect.flip() : boundRect;\n var tmp$_0 = this.xPosition_0(rect, justification.x);\n var x = tmp$_0.component1()\n , hAnchor = tmp$_0.component2();\n var y = this.yPosition_0(rect, textSize, lineHeight, justification.y);\n if (rotation == null)\n tmp$ = new DoubleVector(x, y);\n else if (equals(rotation, TextJustification$Companion$TextRotation$CLOCKWISE_getInstance()))\n tmp$ = new DoubleVector(rect.top + rect.bottom - y, x);\n else if (equals(rotation, TextJustification$Companion$TextRotation$ANTICLOCKWISE_getInstance()))\n tmp$ = new DoubleVector(y, rect.left + rect.right - x);\n else\n tmp$ = Kotlin.noWhenBranchMatched();\n var position = tmp$;\n return to(position, hAnchor);\n };\n TextJustification$Companion.prototype.xPosition_0 = function (boundRect, hjust) {\n var tmp$;\n var textWidth = 0.0;\n if (hjust < 0.5)\n tmp$ = Text$HorizontalAnchor.LEFT;\n else if (hjust === 0.5)\n tmp$ = Text$HorizontalAnchor.MIDDLE;\n else\n tmp$ = Text$HorizontalAnchor.RIGHT;\n var anchor = tmp$;\n var x = boundRect.left + (boundRect.width - textWidth) * hjust;\n return to(x, anchor);\n };\n TextJustification$Companion.prototype.yPosition_0 = function (boundRect, textSize, lineHeight, vjust) {\n var y = boundRect.bottom - (boundRect.height - textSize.y) * vjust;\n return y - textSize.y + lineHeight * 0.7;\n };\n TextJustification$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var TextJustification$Companion_instance = null;\n function TextJustification$Companion_getInstance() {\n if (TextJustification$Companion_instance === null) {\n new TextJustification$Companion();\n }\n return TextJustification$Companion_instance;\n }\n TextJustification.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TextJustification',\n interfaces: []\n };\n function TileLayout() {\n }\n TileLayout.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'TileLayout',\n interfaces: []\n };\n function TileLayoutInfo(offset, bounds, geomOuterBounds, geomInnerBounds, hAxisInfo, vAxisInfo, hAxisShown, vAxisShown, facetXLabels, facetYLabel, trueIndex) {\n if (facetXLabels === void 0)\n facetXLabels = emptyList();\n if (facetYLabel === void 0)\n facetYLabel = null;\n this.offset = offset;\n this.bounds = bounds;\n this.geomOuterBounds = geomOuterBounds;\n this.geomInnerBounds = geomInnerBounds;\n this.hAxisInfo = hAxisInfo;\n this.vAxisInfo = vAxisInfo;\n this.facetXLabels = facetXLabels;\n this.facetYLabel = facetYLabel;\n this.trueIndex = trueIndex;\n this.hAxisShown = (this.hAxisInfo != null && hAxisShown);\n this.vAxisShown = (this.vAxisInfo != null && vAxisShown);\n }\n TileLayoutInfo.prototype.withOffset_gpjtzr$ = function (offset) {\n return new TileLayoutInfo(offset, this.bounds, this.geomOuterBounds, this.geomInnerBounds, this.hAxisInfo, this.vAxisInfo, this.hAxisShown, this.vAxisShown, this.facetXLabels, this.facetYLabel, this.trueIndex);\n };\n TileLayoutInfo.prototype.withFacetLabels_5hkr16$ = function (xLabels, yLabel) {\n return new TileLayoutInfo(this.offset, this.bounds, this.geomOuterBounds, this.geomInnerBounds, this.hAxisInfo, this.vAxisInfo, this.hAxisShown, this.vAxisShown, xLabels, yLabel, this.trueIndex);\n };\n TileLayoutInfo.prototype.withAxisShown_dqye30$ = function (hAxisShown, vAxisShown) {\n return new TileLayoutInfo(this.offset, this.bounds, this.geomOuterBounds, this.geomInnerBounds, this.hAxisInfo, this.vAxisInfo, hAxisShown, vAxisShown, this.facetXLabels, this.facetYLabel, this.trueIndex);\n };\n TileLayoutInfo.prototype.getAbsoluteBounds_gpjtzr$ = function (tilesOrigin) {\n var offset = tilesOrigin.add_gpjtzr$(this.offset);\n return this.bounds.add_gpjtzr$(offset);\n };\n TileLayoutInfo.prototype.getAbsoluteOuterGeomBounds_gpjtzr$ = function (tilesOrigin) {\n var offset = tilesOrigin.add_gpjtzr$(this.offset);\n return this.geomOuterBounds.add_gpjtzr$(offset);\n };\n TileLayoutInfo.prototype.axisThicknessX = function () {\n return this.bounds.bottom - this.geomOuterBounds.bottom;\n };\n TileLayoutInfo.prototype.axisThicknessY = function () {\n return this.geomOuterBounds.left - this.bounds.left;\n };\n TileLayoutInfo.prototype.geomOuterWidth = function () {\n return this.geomOuterBounds.width;\n };\n TileLayoutInfo.prototype.geomOuterHeight = function () {\n return this.geomOuterBounds.height;\n };\n TileLayoutInfo.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TileLayoutInfo',\n interfaces: []\n };\n function TileLayoutProvider() {\n }\n TileLayoutProvider.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'TileLayoutProvider',\n interfaces: []\n };\n function AdaptableAxisBreaksProvider(domainAfterTransform, breaksGenerator) {\n this.domainAfterTransform_0 = domainAfterTransform;\n this.breaksGenerator_0 = breaksGenerator;\n }\n Object.defineProperty(AdaptableAxisBreaksProvider.prototype, 'isFixedBreaks', {\n configurable: true,\n get: function () {\n return false;\n }\n });\n Object.defineProperty(AdaptableAxisBreaksProvider.prototype, 'fixedBreaks', {\n configurable: true,\n get: function () {\n throw IllegalStateException_init('Not a fixed breaks provider');\n }\n });\n AdaptableAxisBreaksProvider.prototype.getBreaks_5wr77w$ = function (targetCount, axisLength) {\n var scaleBreaks = this.breaksGenerator_0.generateBreaks_f140j5$(this.domainAfterTransform_0, targetCount);\n return scaleBreaks;\n };\n AdaptableAxisBreaksProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'AdaptableAxisBreaksProvider',\n interfaces: [AxisBreaksProvider]\n };\n function AxisBreaksProvider() {\n }\n AxisBreaksProvider.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'AxisBreaksProvider',\n interfaces: []\n };\n function AxisBreaksProviderFactory() {\n AxisBreaksProviderFactory$Companion_getInstance();\n }\n function AxisBreaksProviderFactory$Companion() {\n AxisBreaksProviderFactory$Companion_instance = this;\n }\n AxisBreaksProviderFactory$Companion.prototype.forScale_iu85h4$ = function (scale) {\n var tmp$;\n if (scale.hasBreaks()) {\n tmp$ = new AxisBreaksProviderFactory$FixedBreaksProviderFactory(new FixedAxisBreaksProvider(scale.getScaleBreaks()));\n } else {\n tmp$ = new AxisBreaksProviderFactory$AdaptableBreaksProviderFactory(scale.getBreaksGenerator());\n }\n return tmp$;\n };\n AxisBreaksProviderFactory$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var AxisBreaksProviderFactory$Companion_instance = null;\n function AxisBreaksProviderFactory$Companion_getInstance() {\n if (AxisBreaksProviderFactory$Companion_instance === null) {\n new AxisBreaksProviderFactory$Companion();\n }\n return AxisBreaksProviderFactory$Companion_instance;\n }\n function AxisBreaksProviderFactory$FixedBreaksProviderFactory(breaksBrovider) {\n AxisBreaksProviderFactory.call(this);\n this.breaksBrovider_0 = breaksBrovider;\n }\n AxisBreaksProviderFactory$FixedBreaksProviderFactory.prototype.createAxisBreaksProvider_3lmjpf$ = function (axisDomain) {\n return this.breaksBrovider_0;\n };\n AxisBreaksProviderFactory$FixedBreaksProviderFactory.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'FixedBreaksProviderFactory',\n interfaces: [AxisBreaksProviderFactory]\n };\n function AxisBreaksProviderFactory$AdaptableBreaksProviderFactory(breaksGenerator) {\n AxisBreaksProviderFactory.call(this);\n this.breaksGenerator_0 = breaksGenerator;\n }\n AxisBreaksProviderFactory$AdaptableBreaksProviderFactory.prototype.createAxisBreaksProvider_3lmjpf$ = function (axisDomain) {\n return new AdaptableAxisBreaksProvider(axisDomain, this.breaksGenerator_0);\n };\n AxisBreaksProviderFactory$AdaptableBreaksProviderFactory.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'AdaptableBreaksProviderFactory',\n interfaces: [AxisBreaksProviderFactory]\n };\n AxisBreaksProviderFactory.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'AxisBreaksProviderFactory',\n interfaces: []\n };\n function AxisLayouter(orientation, domainRange, labelsLayout) {\n AxisLayouter$Companion_getInstance();\n this.orientation = orientation;\n this.domainRange_jxchw$_0 = domainRange;\n this.labelsLayout_ft0nu6$_0 = labelsLayout;\n }\n AxisLayouter.prototype.doLayout_p1d3jc$ = function (axisLength, maxTickLabelsBounds) {\n var labelsInfo = this.labelsLayout_ft0nu6$_0.doLayout_s0wrr0$(axisLength, this.toAxisMapper_14dthe$(axisLength), maxTickLabelsBounds);\n var axisBreaks = ensureNotNull(labelsInfo.breaks);\n var labelsBounds = ensureNotNull(labelsInfo.bounds);\n return new AxisLayoutInfo(axisLength, this.domainRange_jxchw$_0, this.orientation, axisBreaks, labelsBounds, labelsInfo.labelRotationAngle, labelsInfo.labelHorizontalAnchor, labelsInfo.labelVerticalAnchor, labelsInfo.labelAdditionalOffsets, maxTickLabelsBounds, BreakLabelsLayoutUtil_getInstance().textBounds_14wjue$(labelsBounds, this.labelsLayout_ft0nu6$_0.theme.tickLabelMargins(), this.orientation));\n };\n AxisLayouter.prototype.toScaleMapper_14dthe$ = function (axisLength) {\n return scale.Mappers.mul_3mogjz$(this.domainRange_jxchw$_0, axisLength);\n };\n function AxisLayouter$Companion() {\n AxisLayouter$Companion_instance = this;\n }\n AxisLayouter$Companion.prototype.create_ywgc3$ = function (orientation, axisDomain, breaksProvider, theme) {\n var tmp$, tmp$_0;\n if (orientation.isHorizontal) {\n if (breaksProvider.isFixedBreaks) {\n tmp$ = AxisLabelsLayout$Companion_getInstance().horizontalFixedBreaks_du6rjs$(orientation, axisDomain, breaksProvider.fixedBreaks, theme);\n } else {\n tmp$ = AxisLabelsLayout$Companion_getInstance().horizontalFlexBreaks_ywgc3$(orientation, axisDomain, breaksProvider, theme);\n }\n var labelsLayout = tmp$;\n return new HorizontalAxisLayouter(orientation, axisDomain, labelsLayout);\n }\n if (breaksProvider.isFixedBreaks) {\n tmp$_0 = AxisLabelsLayout$Companion_getInstance().verticalFixedBreaks_du6rjs$(orientation, axisDomain, breaksProvider.fixedBreaks, theme);\n } else {\n tmp$_0 = AxisLabelsLayout$Companion_getInstance().verticalFlexBreaks_ywgc3$(orientation, axisDomain, breaksProvider, theme);\n }\n var labelsLayout_0 = tmp$_0;\n return new VerticalAxisLayouter(orientation, axisDomain, labelsLayout_0);\n };\n AxisLayouter$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var AxisLayouter$Companion_instance = null;\n function AxisLayouter$Companion_getInstance() {\n if (AxisLayouter$Companion_instance === null) {\n new AxisLayouter$Companion();\n }\n return AxisLayouter$Companion_instance;\n }\n AxisLayouter.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'AxisLayouter',\n interfaces: []\n };\n function FixedAxisBreaksProvider(fixedBreaks) {\n this.fixedBreaks_cixykn$_0 = fixedBreaks;\n }\n Object.defineProperty(FixedAxisBreaksProvider.prototype, 'fixedBreaks', {\n get: function () {\n return this.fixedBreaks_cixykn$_0;\n }\n });\n Object.defineProperty(FixedAxisBreaksProvider.prototype, 'isFixedBreaks', {\n configurable: true,\n get: function () {\n return true;\n }\n });\n FixedAxisBreaksProvider.prototype.getBreaks_5wr77w$ = function (targetCount, axisLength) {\n return this.fixedBreaks;\n };\n FixedAxisBreaksProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'FixedAxisBreaksProvider',\n interfaces: [AxisBreaksProvider]\n };\n function HorizontalAxisLayouter(orientation, domainRange, labelsLayout) {\n AxisLayouter.call(this, orientation, domainRange, labelsLayout);\n }\n function HorizontalAxisLayouter$toAxisMapper$lambda(closure$scaleMapper) {\n return function (v) {\n return closure$scaleMapper.invoke_yrwdxb$(v);\n };\n }\n HorizontalAxisLayouter.prototype.toAxisMapper_14dthe$ = function (axisLength) {\n var scaleMapper = this.toScaleMapper_14dthe$(axisLength);\n return HorizontalAxisLayouter$toAxisMapper$lambda(scaleMapper);\n };\n HorizontalAxisLayouter.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'HorizontalAxisLayouter',\n interfaces: [AxisLayouter]\n };\n function VerticalAxisLayouter(orientation, domainRange, labelsLayout) {\n AxisLayouter.call(this, orientation, domainRange, labelsLayout);\n }\n function VerticalAxisLayouter$toAxisMapper$lambda(closure$scaleMapper, closure$axisLength) {\n return function (v) {\n var mapped = closure$scaleMapper.invoke_yrwdxb$(v);\n if (mapped != null) {\n return closure$axisLength - mapped;\n } else {\n return null;\n }\n };\n }\n VerticalAxisLayouter.prototype.toAxisMapper_14dthe$ = function (axisLength) {\n var scaleMapper = this.toScaleMapper_14dthe$(axisLength);\n return VerticalAxisLayouter$toAxisMapper$lambda(scaleMapper, axisLength);\n };\n VerticalAxisLayouter.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'VerticalAxisLayouter',\n interfaces: [AxisLayouter]\n };\n function AbstractFixedBreaksLabelsLayout(orientation, axisDomain, labelSpec, breaks, theme) {\n AbstractFixedBreaksLabelsLayout$Companion_getInstance();\n AxisLabelsLayout.call(this, orientation, axisDomain, labelSpec, theme);\n this.breaks_0 = breaks;\n }\n AbstractFixedBreaksLabelsLayout.prototype.labelBounds_0 = function (labelLocation, labelText) {\n var dim = this.labelSpec.dimensions_61zpoe$(labelText);\n var labelBounds = this.labelBounds_gpjtzr$(dim);\n return labelBounds.add_gpjtzr$(labelLocation);\n };\n AbstractFixedBreaksLabelsLayout.prototype.labelsBounds_c3fefx$ = function (tickPositions, tickLabels, toTickLocation) {\n var tmp$;\n var boundsList = this.labelBoundsList_c3fefx$(tickPositions, this.breaks_0.labels, toTickLocation);\n var bounds = null;\n tmp$ = boundsList.iterator();\n while (tmp$.hasNext()) {\n var labelBounds = tmp$.next();\n bounds = GeometryUtil_getInstance().union_te9coj$(labelBounds, bounds);\n }\n return bounds;\n };\n AbstractFixedBreaksLabelsLayout.prototype.labelBoundsList_c3fefx$ = function (tickPositions, tickLabels, toTickLocation) {\n var tmp$;\n var result = ArrayList_init();\n var labels = tickLabels.iterator();\n tmp$ = tickPositions.iterator();\n while (tmp$.hasNext()) {\n var pos = tmp$.next();\n var label = labels.next();\n var bounds = this.labelBounds_0(toTickLocation(pos), label);\n result.add_11rb$(bounds);\n }\n return result;\n };\n AbstractFixedBreaksLabelsLayout.prototype.createAxisLabelsLayoutInfoBuilder_fd842m$ = function (bounds, overlap) {\n return (new AxisLabelsLayoutInfo$Builder()).breaks_d6t06k$(this.breaks_0).bounds_wthzt5$(this.applyLabelsMargins_w7e9pi$(bounds)).overlap_6taknv$(overlap);\n };\n AbstractFixedBreaksLabelsLayout.prototype.noLabelsLayoutInfo_c0p8fa$ = function (axisLength, orientation) {\n if (orientation.isHorizontal) {\n var bounds = DoubleRectangle_init(axisLength / 2, 0.0, 0.0, 0.0);\n bounds = this.applyLabelsMargins_w7e9pi$(bounds);\n return (new AxisLabelsLayoutInfo$Builder()).breaks_d6t06k$(this.breaks_0).bounds_wthzt5$(bounds).overlap_6taknv$(false).labelAdditionalOffsets_eajcfd$(null).labelHorizontalAnchor_mf4siq$(Text$HorizontalAnchor.MIDDLE).labelVerticalAnchor_yaylw0$(Text$VerticalAnchor.TOP).build();\n }\n throw IllegalStateException_init('Not implemented for ' + orientation);\n };\n function AbstractFixedBreaksLabelsLayout$Companion() {\n AbstractFixedBreaksLabelsLayout$Companion_instance = this;\n this.HORIZONTAL_TICK_LOCATION = AbstractFixedBreaksLabelsLayout$Companion$HORIZONTAL_TICK_LOCATION$lambda;\n }\n function AbstractFixedBreaksLabelsLayout$Companion$HORIZONTAL_TICK_LOCATION$lambda(x) {\n return new DoubleVector(x, 0.0);\n }\n AbstractFixedBreaksLabelsLayout$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var AbstractFixedBreaksLabelsLayout$Companion_instance = null;\n function AbstractFixedBreaksLabelsLayout$Companion_getInstance() {\n if (AbstractFixedBreaksLabelsLayout$Companion_instance === null) {\n new AbstractFixedBreaksLabelsLayout$Companion();\n }\n return AbstractFixedBreaksLabelsLayout$Companion_instance;\n }\n AbstractFixedBreaksLabelsLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'AbstractFixedBreaksLabelsLayout',\n interfaces: [AxisLabelsLayout]\n };\n function AxisLabelsLayout(orientation, axisDomain, labelSpec, theme) {\n AxisLabelsLayout$Companion_getInstance();\n this.orientation = orientation;\n this.axisDomain = axisDomain;\n this.labelSpec = labelSpec;\n this.theme = theme;\n }\n Object.defineProperty(AxisLabelsLayout.prototype, 'isHorizontal', {\n configurable: true,\n get: function () {\n return this.orientation.isHorizontal;\n }\n });\n AxisLabelsLayout.prototype.mapToAxis_d2cc22$ = function (breaks, axisMapper) {\n return BreakLabelsLayoutUtil_getInstance().mapToAxis_rtp2vs$(breaks, this.axisDomain, axisMapper);\n };\n AxisLabelsLayout.prototype.applyLabelsMargins_w7e9pi$ = function (labelsBounds) {\n return BreakLabelsLayoutUtil_getInstance().applyLabelsMargins_r0qkik$(labelsBounds, this.theme.showTickMarks() ? this.theme.tickMarkLength() : 0.0, this.theme.tickLabelMargins(), this.orientation);\n };\n function AxisLabelsLayout$Companion() {\n AxisLabelsLayout$Companion_instance = this;\n this.INITIAL_TICK_LABEL = '0000';\n this.MIN_TICK_LABEL_DISTANCE = 20.0;\n }\n AxisLabelsLayout$Companion.prototype.tickLabelSpec_0 = function (theme) {\n return PlotLabelSpecFactory_getInstance().axisTick_9yvfuv$(theme);\n };\n AxisLabelsLayout$Companion.prototype.horizontalFlexBreaks_ywgc3$ = function (orientation, axisDomain, breaksProvider, theme) {\n if (!orientation.isHorizontal) {\n var message = orientation.toString();\n throw IllegalArgumentException_init(message.toString());\n }\n if (!!breaksProvider.isFixedBreaks) {\n var message_0 = 'fixed breaks';\n throw IllegalArgumentException_init(message_0.toString());\n }\n return new HorizontalFlexBreaksLabelsLayout(orientation, axisDomain, this.tickLabelSpec_0(theme), breaksProvider, theme);\n };\n AxisLabelsLayout$Companion.prototype.horizontalFixedBreaks_du6rjs$ = function (orientation, axisDomain, breaks, theme) {\n if (!orientation.isHorizontal) {\n var message = orientation.toString();\n throw IllegalArgumentException_init(message.toString());\n }\n return new HorizontalFixedBreaksLabelsLayout(orientation, axisDomain, this.tickLabelSpec_0(theme), breaks, theme);\n };\n AxisLabelsLayout$Companion.prototype.verticalFlexBreaks_ywgc3$ = function (orientation, axisDomain, breaksProvider, theme) {\n if (!!orientation.isHorizontal) {\n var message = orientation.toString();\n throw IllegalArgumentException_init(message.toString());\n }\n if (!!breaksProvider.isFixedBreaks) {\n var message_0 = 'fixed breaks';\n throw IllegalArgumentException_init(message_0.toString());\n }\n return new VerticalFlexBreaksLabelsLayout(orientation, axisDomain, this.tickLabelSpec_0(theme), breaksProvider, theme);\n };\n AxisLabelsLayout$Companion.prototype.verticalFixedBreaks_du6rjs$ = function (orientation, axisDomain, breaks, theme) {\n if (!!orientation.isHorizontal) {\n var message = orientation.toString();\n throw IllegalArgumentException_init(message.toString());\n }\n return new VerticalFixedBreaksLabelsLayout(orientation, axisDomain, this.tickLabelSpec_0(theme), breaks, theme);\n };\n AxisLabelsLayout$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var AxisLabelsLayout$Companion_instance = null;\n function AxisLabelsLayout$Companion_getInstance() {\n if (AxisLabelsLayout$Companion_instance === null) {\n new AxisLabelsLayout$Companion();\n }\n return AxisLabelsLayout$Companion_instance;\n }\n AxisLabelsLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'AxisLabelsLayout',\n interfaces: []\n };\n function AxisLabelsLayoutInfo(b) {\n this.breaks = null;\n this.bounds = null;\n this.labelAdditionalOffsets = null;\n this.labelHorizontalAnchor = null;\n this.labelVerticalAnchor = null;\n this.labelRotationAngle = 0;\n this.isOverlap_8be2vx$ = false;\n this.breaks = b.myBreaks_8be2vx$;\n this.bounds = b.myBounds_8be2vx$;\n this.isOverlap_8be2vx$ = b.myOverlap_8be2vx$;\n this.labelAdditionalOffsets = b.myLabelAdditionalOffsets_8be2vx$ == null ? null : ArrayList_init_1(ensureNotNull(b.myLabelAdditionalOffsets_8be2vx$));\n this.labelHorizontalAnchor = b.myLabelHorizontalAnchor_8be2vx$;\n this.labelVerticalAnchor = b.myLabelVerticalAnchor_8be2vx$;\n this.labelRotationAngle = b.myLabelRotationAngle_8be2vx$;\n }\n function AxisLabelsLayoutInfo$Builder() {\n this.myBreaks_8be2vx$ = null;\n this.myBounds_8be2vx$ = null;\n this.myOverlap_8be2vx$ = false;\n this.myLabelAdditionalOffsets_8be2vx$ = null;\n this.myLabelHorizontalAnchor_8be2vx$ = null;\n this.myLabelVerticalAnchor_8be2vx$ = null;\n this.myLabelRotationAngle_8be2vx$ = 0.0;\n }\n AxisLabelsLayoutInfo$Builder.prototype.breaks_d6t06k$ = function (breaks) {\n this.myBreaks_8be2vx$ = breaks;\n return this;\n };\n AxisLabelsLayoutInfo$Builder.prototype.bounds_wthzt5$ = function (bounds) {\n this.myBounds_8be2vx$ = bounds;\n return this;\n };\n AxisLabelsLayoutInfo$Builder.prototype.overlap_6taknv$ = function (b) {\n this.myOverlap_8be2vx$ = b;\n return this;\n };\n AxisLabelsLayoutInfo$Builder.prototype.labelAdditionalOffsets_eajcfd$ = function (l) {\n this.myLabelAdditionalOffsets_8be2vx$ = l;\n return this;\n };\n AxisLabelsLayoutInfo$Builder.prototype.labelHorizontalAnchor_mf4siq$ = function (anchor) {\n this.myLabelHorizontalAnchor_8be2vx$ = anchor;\n return this;\n };\n AxisLabelsLayoutInfo$Builder.prototype.labelVerticalAnchor_yaylw0$ = function (anchor) {\n this.myLabelVerticalAnchor_8be2vx$ = anchor;\n return this;\n };\n AxisLabelsLayoutInfo$Builder.prototype.labelRotationAngle_14dthe$ = function (angle) {\n this.myLabelRotationAngle_8be2vx$ = angle;\n return this;\n };\n AxisLabelsLayoutInfo$Builder.prototype.build = function () {\n return new AxisLabelsLayoutInfo(this);\n };\n AxisLabelsLayoutInfo$Builder.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'Builder',\n interfaces: []\n };\n AxisLabelsLayoutInfo.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'AxisLabelsLayoutInfo',\n interfaces: []\n };\n function BreakLabelsLayoutUtil() {\n BreakLabelsLayoutUtil_instance = this;\n }\n BreakLabelsLayoutUtil.prototype.getFlexBreaks_73ga93$ = function (breaksProvider, maxCount, axisLength) {\n if (!!breaksProvider.isFixedBreaks) {\n var message = 'fixed breaks not expected';\n throw IllegalArgumentException_init(message.toString());\n }\n if (!(maxCount > 0)) {\n var message_0 = 'maxCount=' + maxCount;\n throw IllegalArgumentException_init(message_0.toString());\n }\n var breaks = breaksProvider.getBreaks_5wr77w$(maxCount, axisLength);\n if (maxCount === 1 && !breaks.isEmpty) {\n return new ScaleBreaks(breaks.domainValues.subList_vux9f0$(0, 1), breaks.transformedValues.subList_vux9f0$(0, 1), breaks.labels.subList_vux9f0$(0, 1));\n }\n var count = maxCount;\n while (breaks.size > maxCount) {\n var b = (breaks.size - maxCount | 0) / 2 | 0;\n var delta = JsMath.max(1, b);\n count = count - delta | 0;\n if (count <= 1) {\n breaks = breaksProvider.getBreaks_5wr77w$(1, axisLength);\n break;\n }\n breaks = breaksProvider.getBreaks_5wr77w$(count, axisLength);\n }\n return breaks;\n };\n function BreakLabelsLayoutUtil$longestLabelWidth$lambda(it) {\n return it.length;\n }\n BreakLabelsLayoutUtil.prototype.longestLabelWidth_d4huc9$ = function (labels, labelToWidth) {\n if (labelToWidth === void 0)\n labelToWidth = BreakLabelsLayoutUtil$longestLabelWidth$lambda;\n var maxByOrNull$result;\n maxByOrNull$break: do {\n var iterator = labels.iterator();\n if (!iterator.hasNext()) {\n maxByOrNull$result = null;\n break maxByOrNull$break;\n }\n var maxElem = iterator.next();\n if (!iterator.hasNext()) {\n maxByOrNull$result = maxElem;\n break maxByOrNull$break;\n }\n var maxValue = labelToWidth(maxElem);\n do {\n var e = iterator.next();\n var v = labelToWidth(e);\n if (Kotlin.compareTo(maxValue, v) < 0) {\n maxElem = e;\n maxValue = v;\n }\n }\n while (iterator.hasNext());\n maxByOrNull$result = maxElem;\n }\n while (false);\n var longestLabel = maxByOrNull$result;\n return longestLabel == null ? 0.0 : labelToWidth(longestLabel);\n };\n BreakLabelsLayoutUtil.prototype.horizontalCenteredLabelBounds_gpjtzr$ = function (labelSize) {\n return DoubleRectangle_init(-labelSize.x / 2.0, 0.0, labelSize.x, labelSize.y);\n };\n BreakLabelsLayoutUtil.prototype.doLayoutVerticalAxisLabels_rdueqq$ = function (orientation, breaks, axisDomain, axisMapper, theme) {\n var tmp$;\n if (theme.showLabels()) {\n var labelsBounds = this.verticalAxisLabelsBounds_0(breaks, axisDomain, axisMapper, PlotLabelSpecFactory_getInstance().axisTick_9yvfuv$(theme));\n tmp$ = this.applyLabelsMargins_r0qkik$(labelsBounds, theme.showTickMarks() ? theme.tickMarkLength() : 0.0, theme.tickLabelMargins(), orientation);\n } else if (theme.showTickMarks()) {\n var labelsBounds_0 = new DoubleRectangle(DoubleVector.Companion.ZERO, DoubleVector.Companion.ZERO);\n tmp$ = this.applyLabelsMargins_r0qkik$(labelsBounds_0, theme.showTickMarks() ? theme.tickMarkLength() : 0.0, theme.tickLabelMargins(), orientation);\n } else\n tmp$ = new DoubleRectangle(DoubleVector.Companion.ZERO, DoubleVector.Companion.ZERO);\n var axisBounds = tmp$;\n return (new AxisLabelsLayoutInfo$Builder()).breaks_d6t06k$(breaks).bounds_wthzt5$(axisBounds).build();\n };\n BreakLabelsLayoutUtil.prototype.mapToAxis_rtp2vs$ = function (breaks, axisDomain, axisMapper) {\n var tmp$;\n var axisMin = axisDomain.lowerEnd;\n var axisBreaks = ArrayList_init();\n tmp$ = breaks.iterator();\n while (tmp$.hasNext()) {\n var v = tmp$.next();\n var mapped = axisMapper(v - axisMin);\n axisBreaks.add_11rb$(ensureNotNull(mapped));\n }\n return axisBreaks;\n };\n BreakLabelsLayoutUtil.prototype.applyLabelsMargins_r0qkik$ = function (labelsBounds, tickLength, margins, orientation) {\n var tmp$, tmp$_0, tmp$_1, tmp$_2;\n switch (orientation.name) {\n case 'LEFT':\n tmp$ = margins.width() + labelsBounds.width;\n break;\n case 'TOP':\n tmp$ = margins.height() + labelsBounds.height;\n break;\n case 'RIGHT':\n case 'BOTTOM':\n tmp$ = 0.0;\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n var offset = tickLength + tmp$;\n switch (orientation.name) {\n case 'LEFT':\n tmp$_0 = new DoubleVector(-offset, 0.0);\n break;\n case 'RIGHT':\n tmp$_0 = new DoubleVector(offset, 0.0);\n break;\n case 'TOP':\n tmp$_0 = new DoubleVector(0.0, -offset);\n break;\n case 'BOTTOM':\n tmp$_0 = new DoubleVector(0.0, offset);\n break;\n default:\n tmp$_0 = Kotlin.noWhenBranchMatched();\n break;\n }\n var offsetVector = tmp$_0;\n tmp$_2 = labelsBounds.dimension;\n if (orientation.isHorizontal)\n tmp$_1 = new DoubleVector(0.0, margins.height());\n else\n tmp$_1 = new DoubleVector(margins.width(), 0.0);\n var dimension = tmp$_2.add_gpjtzr$(tmp$_1);\n return new DoubleRectangle(labelsBounds.origin.add_gpjtzr$(offsetVector), dimension);\n };\n BreakLabelsLayoutUtil.prototype.textBounds_14wjue$ = function (elementRect, margins, orientation) {\n var tmp$;\n if (orientation.isHorizontal)\n tmp$ = DoubleRectangle_init(elementRect.left, elementRect.top + margins.top, elementRect.width, elementRect.height - margins.height());\n else {\n tmp$ = DoubleRectangle_init(elementRect.left + margins.left, elementRect.top, elementRect.width - margins.width(), elementRect.height);\n }\n return tmp$;\n };\n function BreakLabelsLayoutUtil$verticalAxisLabelsBounds$lambda(closure$tickLabelSpec) {\n return function (it) {\n return closure$tickLabelSpec.width_61zpoe$(it);\n };\n }\n BreakLabelsLayoutUtil.prototype.verticalAxisLabelsBounds_0 = function (breaks, axisDomain, axisMapper, tickLabelSpec) {\n var maxLabelWidth = this.longestLabelWidth_d4huc9$(breaks.labels, BreakLabelsLayoutUtil$verticalAxisLabelsBounds$lambda(tickLabelSpec));\n var y1 = 0.0;\n var y2 = 0.0;\n if (!breaks.isEmpty) {\n var axisBreaks = this.mapToAxis_rtp2vs$(breaks.transformedValues, axisDomain, axisMapper);\n var a = axisBreaks.get_za3lpa$(0);\n var b = last(axisBreaks);\n y1 = JsMath.min(a, b);\n var a_0 = axisBreaks.get_za3lpa$(0);\n var b_0 = last(axisBreaks);\n y2 = JsMath.max(a_0, b_0);\n y1 -= tickLabelSpec.height() / 2;\n y2 += tickLabelSpec.height() / 2;\n }\n var origin = new DoubleVector(0.0, y1);\n var dimensions = new DoubleVector(maxLabelWidth, y2 - y1);\n return new DoubleRectangle(origin, dimensions);\n };\n BreakLabelsLayoutUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'BreakLabelsLayoutUtil',\n interfaces: []\n };\n var BreakLabelsLayoutUtil_instance = null;\n function BreakLabelsLayoutUtil_getInstance() {\n if (BreakLabelsLayoutUtil_instance === null) {\n new BreakLabelsLayoutUtil();\n }\n return BreakLabelsLayoutUtil_instance;\n }\n function HorizontalFixedBreaksLabelsLayout(orientation, axisDomain, labelSpec, breaks, theme) {\n AbstractFixedBreaksLabelsLayout.call(this, orientation, axisDomain, labelSpec, breaks, theme);\n if (!orientation.isHorizontal) {\n var message = orientation.toString();\n throw IllegalArgumentException_init(message.toString());\n }\n }\n HorizontalFixedBreaksLabelsLayout.prototype.overlap_0 = function (labelsInfo, maxTickLabelsBounds) {\n return labelsInfo.isOverlap_8be2vx$ || (maxTickLabelsBounds != null && !(maxTickLabelsBounds.xRange().encloses_3lmjpf$(ensureNotNull(labelsInfo.bounds).xRange()) && maxTickLabelsBounds.yRange().encloses_3lmjpf$(labelsInfo.bounds.yRange())));\n };\n HorizontalFixedBreaksLabelsLayout.prototype.doLayout_s0wrr0$ = function (axisLength, axisMapper, maxLabelsBounds) {\n if (!this.theme.showLabels()) {\n return this.noLabelsLayoutInfo_c0p8fa$(axisLength, this.orientation);\n }\n var labelsInfo = this.simpleLayout_0().doLayout_s0wrr0$(axisLength, axisMapper, maxLabelsBounds);\n if (this.overlap_0(labelsInfo, maxLabelsBounds)) {\n labelsInfo = this.multilineLayout_0().doLayout_s0wrr0$(axisLength, axisMapper, maxLabelsBounds);\n if (this.overlap_0(labelsInfo, maxLabelsBounds)) {\n labelsInfo = this.tiltedLayout_0().doLayout_s0wrr0$(axisLength, axisMapper, maxLabelsBounds);\n if (this.overlap_0(labelsInfo, maxLabelsBounds)) {\n labelsInfo = this.verticalLayout_0(this.labelSpec).doLayout_s0wrr0$(axisLength, axisMapper, maxLabelsBounds);\n }\n }\n }\n return labelsInfo;\n };\n HorizontalFixedBreaksLabelsLayout.prototype.simpleLayout_0 = function () {\n return new HorizontalSimpleLabelsLayout(this.orientation, this.axisDomain, this.labelSpec, this.breaks_0, this.theme);\n };\n HorizontalFixedBreaksLabelsLayout.prototype.multilineLayout_0 = function () {\n return new HorizontalMultilineLabelsLayout(this.orientation, this.axisDomain, this.labelSpec, this.breaks_0, this.theme, 2);\n };\n HorizontalFixedBreaksLabelsLayout.prototype.tiltedLayout_0 = function () {\n return new HorizontalTiltedLabelsLayout(this.orientation, this.axisDomain, this.labelSpec, this.breaks_0, this.theme);\n };\n HorizontalFixedBreaksLabelsLayout.prototype.verticalLayout_0 = function (labelSpec) {\n return new HorizontalVerticalLabelsLayout(this.orientation, this.axisDomain, labelSpec, this.breaks_0, this.theme);\n };\n HorizontalFixedBreaksLabelsLayout.prototype.labelBounds_gpjtzr$ = function (labelNormalSize) {\n throw IllegalStateException_init('Not implemented here');\n };\n HorizontalFixedBreaksLabelsLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'HorizontalFixedBreaksLabelsLayout',\n interfaces: [AbstractFixedBreaksLabelsLayout]\n };\n function HorizontalFlexBreaksLabelsLayout(orientation, axisDomain, labelSpec, myBreaksProvider, theme) {\n AxisLabelsLayout.call(this, orientation, axisDomain, labelSpec, theme);\n this.myBreaksProvider_0 = myBreaksProvider;\n if (!orientation.isHorizontal) {\n var message = orientation.toString();\n throw IllegalArgumentException_init(message.toString());\n }\n if (!!this.myBreaksProvider_0.isFixedBreaks) {\n var message_0 = 'fixed breaks';\n throw IllegalArgumentException_init(message_0.toString());\n }\n }\n HorizontalFlexBreaksLabelsLayout.prototype.doLayout_s0wrr0$ = function (axisLength, axisMapper, maxLabelsBounds) {\n var targetBreakCount = HorizontalSimpleLabelsLayout$Companion_getInstance().estimateBreakCountInitial_29uwtv$(axisLength, PlotLabelSpecFactory_getInstance().axisTick_9yvfuv$(this.theme));\n var breaks = this.getBreaks_0(targetBreakCount, axisLength);\n var labelsInfo = this.doLayoutLabels_0(breaks, axisLength, axisMapper, maxLabelsBounds);\n while (labelsInfo.isOverlap_8be2vx$) {\n var newTargetBreakCount = HorizontalSimpleLabelsLayout$Companion_getInstance().estimateBreakCount_rh2gss$(breaks.labels, axisLength, PlotLabelSpecFactory_getInstance().axisTick_9yvfuv$(this.theme));\n if (newTargetBreakCount >= targetBreakCount) {\n break;\n }\n targetBreakCount = newTargetBreakCount;\n breaks = this.getBreaks_0(targetBreakCount, axisLength);\n labelsInfo = this.doLayoutLabels_0(breaks, axisLength, axisMapper, maxLabelsBounds);\n }\n return labelsInfo;\n };\n HorizontalFlexBreaksLabelsLayout.prototype.doLayoutLabels_0 = function (breaks, axisLength, axisMapper, maxLabelsBounds) {\n var layout = new HorizontalSimpleLabelsLayout(this.orientation, this.axisDomain, this.labelSpec, breaks, this.theme);\n return layout.doLayout_s0wrr0$(axisLength, axisMapper, maxLabelsBounds);\n };\n HorizontalFlexBreaksLabelsLayout.prototype.getBreaks_0 = function (maxCount, axisLength) {\n return BreakLabelsLayoutUtil_getInstance().getFlexBreaks_73ga93$(this.myBreaksProvider_0, maxCount, axisLength);\n };\n HorizontalFlexBreaksLabelsLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'HorizontalFlexBreaksLabelsLayout',\n interfaces: [AxisLabelsLayout]\n };\n function HorizontalMultilineLabelsLayout(orientation, axisDomain, labelSpec, breaks, theme, myMaxLines) {\n HorizontalMultilineLabelsLayout$Companion_getInstance();\n AbstractFixedBreaksLabelsLayout.call(this, orientation, axisDomain, labelSpec, breaks, theme);\n this.myMaxLines_0 = myMaxLines;\n this.myShelfIndexForTickIndex_0 = ArrayList_init();\n }\n Object.defineProperty(HorizontalMultilineLabelsLayout.prototype, 'labelAdditionalOffsets_0', {\n configurable: true,\n get: function () {\n var tmp$;\n var h = this.labelSpec.height() * HorizontalMultilineLabelsLayout$Companion_getInstance().LINE_HEIGHT_0;\n var result = ArrayList_init();\n tmp$ = this.breaks_0.size;\n for (var i = 0; i < tmp$; i++) {\n result.add_11rb$(new DoubleVector(0.0, this.myShelfIndexForTickIndex_0.get_za3lpa$(i) * h));\n }\n return result;\n }\n });\n HorizontalMultilineLabelsLayout.prototype.doLayout_s0wrr0$ = function (axisLength, axisMapper, maxLabelsBounds) {\n var tmp$, tmp$_0;\n var boundsByShelfIndex = HashMap_init();\n var ticks = this.mapToAxis_d2cc22$(this.breaks_0.transformedValues, axisMapper);\n var boundsList = this.labelBoundsList_c3fefx$(ticks, this.breaks_0.labels, AbstractFixedBreaksLabelsLayout$Companion_getInstance().HORIZONTAL_TICK_LOCATION);\n tmp$ = boundsList.iterator();\n while (tmp$.hasNext()) {\n var labelBounds = tmp$.next();\n var shelfIndex = 0;\n while (true) {\n if (!boundsByShelfIndex.containsKey_11rb$(shelfIndex)) {\n var key = shelfIndex;\n boundsByShelfIndex.put_xwzc9p$(key, labelBounds);\n this.myShelfIndexForTickIndex_0.add_11rb$(shelfIndex);\n break;\n }\n var shelfBounds = ensureNotNull(boundsByShelfIndex.get_11rb$(shelfIndex));\n if (!shelfBounds.xRange().connected_3lmjpf$(new DoubleSpan(labelBounds.left - 60, labelBounds.right + 60))) {\n this.myShelfIndexForTickIndex_0.add_11rb$(shelfIndex);\n shelfBounds = shelfBounds.union_wthzt5$(labelBounds);\n var key_0 = shelfIndex;\n var value = shelfBounds;\n boundsByShelfIndex.put_xwzc9p$(key_0, value);\n break;\n }\n shelfIndex = shelfIndex + 1 | 0;\n }\n }\n var bounds = boundsByShelfIndex.isEmpty() ? new DoubleRectangle(DoubleVector.Companion.ZERO, DoubleVector.Companion.ZERO) : ensureNotNull(boundsByShelfIndex.get_11rb$(0));\n var h = this.labelSpec.height() * HorizontalMultilineLabelsLayout$Companion_getInstance().LINE_HEIGHT_0;\n tmp$_0 = boundsByShelfIndex.size;\n for (var i = 0; i < tmp$_0; i++) {\n var shelfBounds_0 = ensureNotNull(boundsByShelfIndex.get_11rb$(i));\n bounds = bounds.union_wthzt5$(shelfBounds_0.add_gpjtzr$(new DoubleVector(0.0, i * h)));\n }\n var linesCount = boundsByShelfIndex.size;\n return (new AxisLabelsLayoutInfo$Builder()).breaks_d6t06k$(this.breaks_0).bounds_wthzt5$(this.applyLabelsMargins_w7e9pi$(bounds)).overlap_6taknv$(linesCount > this.myMaxLines_0).labelAdditionalOffsets_eajcfd$(this.labelAdditionalOffsets_0).labelHorizontalAnchor_mf4siq$(Text$HorizontalAnchor.MIDDLE).labelVerticalAnchor_yaylw0$(Text$VerticalAnchor.TOP).build();\n };\n HorizontalMultilineLabelsLayout.prototype.labelBounds_gpjtzr$ = function (labelNormalSize) {\n return BreakLabelsLayoutUtil_getInstance().horizontalCenteredLabelBounds_gpjtzr$(labelNormalSize);\n };\n function HorizontalMultilineLabelsLayout$Companion() {\n HorizontalMultilineLabelsLayout$Companion_instance = this;\n this.LINE_HEIGHT_0 = 1.2;\n this.MIN_DISTANCE_0 = 60;\n }\n HorizontalMultilineLabelsLayout$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var HorizontalMultilineLabelsLayout$Companion_instance = null;\n function HorizontalMultilineLabelsLayout$Companion_getInstance() {\n if (HorizontalMultilineLabelsLayout$Companion_instance === null) {\n new HorizontalMultilineLabelsLayout$Companion();\n }\n return HorizontalMultilineLabelsLayout$Companion_instance;\n }\n HorizontalMultilineLabelsLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'HorizontalMultilineLabelsLayout',\n interfaces: [AbstractFixedBreaksLabelsLayout]\n };\n function HorizontalSimpleLabelsLayout(orientation, axisDomain, labelSpec, breaks, theme) {\n HorizontalSimpleLabelsLayout$Companion_getInstance();\n AbstractFixedBreaksLabelsLayout.call(this, orientation, axisDomain, labelSpec, breaks, theme);\n }\n HorizontalSimpleLabelsLayout.prototype.doLayout_s0wrr0$ = function (axisLength, axisMapper, maxLabelsBounds) {\n var tmp$;\n if (this.breaks_0.isEmpty) {\n return this.noLabelsLayoutInfo_c0p8fa$(axisLength, this.orientation);\n }\n if (!this.theme.showLabels()) {\n return this.noLabelsLayoutInfo_c0p8fa$(axisLength, this.orientation);\n }\n var bounds = null;\n var overlap = false;\n var ticks = this.mapToAxis_d2cc22$(this.breaks_0.transformedValues, axisMapper);\n var boundsList = this.labelBoundsList_c3fefx$(ticks, this.breaks_0.labels, AbstractFixedBreaksLabelsLayout$Companion_getInstance().HORIZONTAL_TICK_LOCATION);\n tmp$ = boundsList.iterator();\n while (tmp$.hasNext()) {\n var labelBounds = tmp$.next();\n overlap = overlap || (bounds != null && bounds.xRange().connected_3lmjpf$(data_0.SeriesUtil.expand_nrrs69$(labelBounds.xRange(), AxisLabelsLayout$Companion_getInstance().MIN_TICK_LABEL_DISTANCE / 2, AxisLabelsLayout$Companion_getInstance().MIN_TICK_LABEL_DISTANCE / 2.0)));\n bounds = GeometryUtil_getInstance().union_te9coj$(labelBounds, bounds);\n }\n return (new AxisLabelsLayoutInfo$Builder()).breaks_d6t06k$(this.breaks_0).bounds_wthzt5$(this.applyLabelsMargins_w7e9pi$(ensureNotNull(bounds))).overlap_6taknv$(overlap).labelAdditionalOffsets_eajcfd$(null).labelHorizontalAnchor_mf4siq$(Text$HorizontalAnchor.MIDDLE).labelVerticalAnchor_yaylw0$(Text$VerticalAnchor.TOP).build();\n };\n HorizontalSimpleLabelsLayout.prototype.labelBounds_gpjtzr$ = function (labelNormalSize) {\n return BreakLabelsLayoutUtil_getInstance().horizontalCenteredLabelBounds_gpjtzr$(labelNormalSize);\n };\n function HorizontalSimpleLabelsLayout$Companion() {\n HorizontalSimpleLabelsLayout$Companion_instance = this;\n }\n HorizontalSimpleLabelsLayout$Companion.prototype.estimateBreakCountInitial_29uwtv$ = function (axisLength, tickLabelSpec) {\n return this.estimateBreakCount_0(tickLabelSpec.width_61zpoe$(AxisLabelsLayout$Companion_getInstance().INITIAL_TICK_LABEL), axisLength);\n };\n function HorizontalSimpleLabelsLayout$Companion$estimateBreakCount$lambda(closure$tickLabelSpec) {\n return function (it) {\n return closure$tickLabelSpec.width_61zpoe$(it);\n };\n }\n HorizontalSimpleLabelsLayout$Companion.prototype.estimateBreakCount_rh2gss$ = function (labels, axisLength, tickLabelSpec) {\n var longestLabelWidth = BreakLabelsLayoutUtil_getInstance().longestLabelWidth_d4huc9$(labels, HorizontalSimpleLabelsLayout$Companion$estimateBreakCount$lambda(tickLabelSpec));\n return this.estimateBreakCount_0(longestLabelWidth, axisLength);\n };\n HorizontalSimpleLabelsLayout$Companion.prototype.estimateBreakCount_0 = function (width, axisLength) {\n var tickDistance = width + AxisLabelsLayout$Companion_getInstance().MIN_TICK_LABEL_DISTANCE;\n var b = axisLength / tickDistance;\n return numberToInt(JsMath.max(1.0, b));\n };\n HorizontalSimpleLabelsLayout$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var HorizontalSimpleLabelsLayout$Companion_instance = null;\n function HorizontalSimpleLabelsLayout$Companion_getInstance() {\n if (HorizontalSimpleLabelsLayout$Companion_instance === null) {\n new HorizontalSimpleLabelsLayout$Companion();\n }\n return HorizontalSimpleLabelsLayout$Companion_instance;\n }\n HorizontalSimpleLabelsLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'HorizontalSimpleLabelsLayout',\n interfaces: [AbstractFixedBreaksLabelsLayout]\n };\n function HorizontalTiltedLabelsLayout(orientation, axisDomain, labelSpec, breaks, theme) {\n HorizontalTiltedLabelsLayout$Companion_getInstance();\n AbstractFixedBreaksLabelsLayout.call(this, orientation, axisDomain, labelSpec, breaks, theme);\n }\n Object.defineProperty(HorizontalTiltedLabelsLayout.prototype, 'labelHorizontalAnchor_0', {\n configurable: true,\n get: function () {\n if (this.orientation === Orientation$BOTTOM_getInstance()) {\n return Text$HorizontalAnchor.RIGHT;\n }\n throw RuntimeException_init('Not implemented');\n }\n });\n Object.defineProperty(HorizontalTiltedLabelsLayout.prototype, 'labelVerticalAnchor_0', {\n configurable: true,\n get: function () {\n return Text$VerticalAnchor.TOP;\n }\n });\n HorizontalTiltedLabelsLayout.prototype.doLayout_s0wrr0$ = function (axisLength, axisMapper, maxLabelsBounds) {\n var height = this.labelSpec.height();\n var ticks = this.mapToAxis_d2cc22$(this.breaks_0.transformedValues, axisMapper);\n var overlap = false;\n if (this.breaks_0.size >= 2) {\n var x = (height + HorizontalTiltedLabelsLayout$Companion_getInstance().MIN_DISTANCE_0) / HorizontalTiltedLabelsLayout$Companion_getInstance().SIN_0;\n var minTickDistance = JsMath.abs(x);\n var x_0 = ticks.get_za3lpa$(0) - ticks.get_za3lpa$(1);\n var tickDistance = JsMath.abs(x_0);\n overlap = tickDistance < minTickDistance;\n }\n var bounds = this.labelsBounds_c3fefx$(ticks, this.breaks_0.labels, AbstractFixedBreaksLabelsLayout$Companion_getInstance().HORIZONTAL_TICK_LOCATION);\n return this.createAxisLabelsLayoutInfoBuilder_fd842m$(ensureNotNull(bounds), overlap).labelHorizontalAnchor_mf4siq$(this.labelHorizontalAnchor_0).labelVerticalAnchor_yaylw0$(this.labelVerticalAnchor_0).labelRotationAngle_14dthe$(HorizontalTiltedLabelsLayout$Companion_getInstance().ROTATION_DEGREE_0).build();\n };\n HorizontalTiltedLabelsLayout.prototype.labelBounds_gpjtzr$ = function (labelNormalSize) {\n if (!(HorizontalTiltedLabelsLayout$Companion_getInstance().ROTATION_DEGREE_0 >= -90 && HorizontalTiltedLabelsLayout$Companion_getInstance().ROTATION_DEGREE_0 <= 0 && this.labelHorizontalAnchor_0 === Text$HorizontalAnchor.RIGHT && this.labelVerticalAnchor_0 === Text$VerticalAnchor.TOP)) {\n throw RuntimeException_init('Not implemented');\n }\n var x = labelNormalSize.x * HorizontalTiltedLabelsLayout$Companion_getInstance().COS_0;\n var tmp$ = JsMath.abs(x);\n var x_0 = labelNormalSize.y * HorizontalTiltedLabelsLayout$Companion_getInstance().SIN_0;\n var w = tmp$ + 2 * JsMath.abs(x_0);\n var x_1 = labelNormalSize.x * HorizontalTiltedLabelsLayout$Companion_getInstance().SIN_0;\n var tmp$_0 = JsMath.abs(x_1);\n var x_2 = labelNormalSize.y * HorizontalTiltedLabelsLayout$Companion_getInstance().COS_0;\n var h = tmp$_0 + JsMath.abs(x_2);\n var x_3 = labelNormalSize.x * HorizontalTiltedLabelsLayout$Companion_getInstance().COS_0;\n var tmp$_1 = JsMath.abs(x_3);\n var x_4 = labelNormalSize.y * HorizontalTiltedLabelsLayout$Companion_getInstance().SIN_0;\n var x_5 = -(tmp$_1 + JsMath.abs(x_4));\n var y = 0.0;\n return DoubleRectangle_init(x_5, y, w, h);\n };\n function HorizontalTiltedLabelsLayout$Companion() {\n HorizontalTiltedLabelsLayout$Companion_instance = this;\n this.MIN_DISTANCE_0 = 5.0;\n this.ROTATION_DEGREE_0 = -30.0;\n var x = toRadians(this.ROTATION_DEGREE_0);\n this.SIN_0 = JsMath.sin(x);\n var x_0 = toRadians(this.ROTATION_DEGREE_0);\n this.COS_0 = JsMath.cos(x_0);\n }\n HorizontalTiltedLabelsLayout$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var HorizontalTiltedLabelsLayout$Companion_instance = null;\n function HorizontalTiltedLabelsLayout$Companion_getInstance() {\n if (HorizontalTiltedLabelsLayout$Companion_instance === null) {\n new HorizontalTiltedLabelsLayout$Companion();\n }\n return HorizontalTiltedLabelsLayout$Companion_instance;\n }\n HorizontalTiltedLabelsLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'HorizontalTiltedLabelsLayout',\n interfaces: [AbstractFixedBreaksLabelsLayout]\n };\n function HorizontalVerticalLabelsLayout(orientation, axisDomain, labelSpec, breaks, theme) {\n HorizontalVerticalLabelsLayout$Companion_getInstance();\n AbstractFixedBreaksLabelsLayout.call(this, orientation, axisDomain, labelSpec, breaks, theme);\n }\n Object.defineProperty(HorizontalVerticalLabelsLayout.prototype, 'labelHorizontalAnchor', {\n configurable: true,\n get: function () {\n if (this.orientation === Orientation$BOTTOM_getInstance()) {\n return Text$HorizontalAnchor.LEFT;\n }\n throw RuntimeException_init('Not implemented');\n }\n });\n Object.defineProperty(HorizontalVerticalLabelsLayout.prototype, 'labelVerticalAnchor', {\n configurable: true,\n get: function () {\n return Text$VerticalAnchor.CENTER;\n }\n });\n HorizontalVerticalLabelsLayout.prototype.doLayout_s0wrr0$ = function (axisLength, axisMapper, maxLabelsBounds) {\n var height = this.labelSpec.height();\n var ticks = this.mapToAxis_d2cc22$(this.breaks_0.transformedValues, axisMapper);\n var overlap = false;\n if (this.breaks_0.size >= 2) {\n var minTickDistance = height + HorizontalVerticalLabelsLayout$Companion_getInstance().MIN_DISTANCE_0;\n var x = ticks.get_za3lpa$(0) - ticks.get_za3lpa$(1);\n var tickDistance = JsMath.abs(x);\n overlap = tickDistance < minTickDistance;\n }\n var bounds = this.labelsBounds_c3fefx$(ticks, this.breaks_0.labels, AbstractFixedBreaksLabelsLayout$Companion_getInstance().HORIZONTAL_TICK_LOCATION);\n return this.createAxisLabelsLayoutInfoBuilder_fd842m$(ensureNotNull(bounds), overlap).labelHorizontalAnchor_mf4siq$(this.labelHorizontalAnchor).labelVerticalAnchor_yaylw0$(this.labelVerticalAnchor).labelRotationAngle_14dthe$(HorizontalVerticalLabelsLayout$Companion_getInstance().ROTATION_DEGREE_0).build();\n };\n HorizontalVerticalLabelsLayout.prototype.labelBounds_gpjtzr$ = function (labelNormalSize) {\n if (!(HorizontalVerticalLabelsLayout$Companion_getInstance().ROTATION_DEGREE_0 === 90.0 && this.labelHorizontalAnchor === Text$HorizontalAnchor.LEFT && this.labelVerticalAnchor === Text$VerticalAnchor.CENTER)) {\n throw RuntimeException_init('Not implemented');\n }\n var w = labelNormalSize.y;\n var h = labelNormalSize.x;\n var x = -w / 2;\n var y = 0.0;\n return DoubleRectangle_init(x, y, w, h);\n };\n function HorizontalVerticalLabelsLayout$Companion() {\n HorizontalVerticalLabelsLayout$Companion_instance = this;\n this.MIN_DISTANCE_0 = 5.0;\n this.ROTATION_DEGREE_0 = 90.0;\n }\n HorizontalVerticalLabelsLayout$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var HorizontalVerticalLabelsLayout$Companion_instance = null;\n function HorizontalVerticalLabelsLayout$Companion_getInstance() {\n if (HorizontalVerticalLabelsLayout$Companion_instance === null) {\n new HorizontalVerticalLabelsLayout$Companion();\n }\n return HorizontalVerticalLabelsLayout$Companion_instance;\n }\n HorizontalVerticalLabelsLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'HorizontalVerticalLabelsLayout',\n interfaces: [AbstractFixedBreaksLabelsLayout]\n };\n function VerticalFixedBreaksLabelsLayout(orientation, axisDomain, tickLabelSpec, breaks, theme) {\n AbstractFixedBreaksLabelsLayout.call(this, orientation, axisDomain, tickLabelSpec, breaks, theme);\n }\n VerticalFixedBreaksLabelsLayout.prototype.labelBounds_gpjtzr$ = function (labelNormalSize) {\n throw IllegalStateException_init('Not implemented here');\n };\n VerticalFixedBreaksLabelsLayout.prototype.doLayout_s0wrr0$ = function (axisLength, axisMapper, maxLabelsBounds) {\n return BreakLabelsLayoutUtil_getInstance().doLayoutVerticalAxisLabels_rdueqq$(this.orientation, this.breaks_0, this.axisDomain, axisMapper, this.theme);\n };\n VerticalFixedBreaksLabelsLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'VerticalFixedBreaksLabelsLayout',\n interfaces: [AbstractFixedBreaksLabelsLayout]\n };\n function VerticalFlexBreaksLabelsLayout(orientation, axisDomain, labelSpec, myBreaksProvider, theme) {\n AxisLabelsLayout.call(this, orientation, axisDomain, labelSpec, theme);\n this.myBreaksProvider_0 = myBreaksProvider;\n if (!!orientation.isHorizontal) {\n var message = orientation.toString();\n throw IllegalArgumentException_init(message.toString());\n }\n if (!!this.myBreaksProvider_0.isFixedBreaks) {\n var message_0 = 'fixed breaks';\n throw IllegalArgumentException_init(message_0.toString());\n }\n }\n VerticalFlexBreaksLabelsLayout.prototype.maxTickCount_0 = function (axisLength) {\n var x = axisLength / (PlotLabelSpecFactory_getInstance().axisTick_9yvfuv$(this.theme).height() + AxisLabelsLayout$Companion_getInstance().MIN_TICK_LABEL_DISTANCE);\n return numberToInt(JsMath.ceil(x));\n };\n VerticalFlexBreaksLabelsLayout.prototype.doLayout_s0wrr0$ = function (axisLength, axisMapper, maxLabelsBounds) {\n if (!(axisLength > 0)) {\n var message = 'axis length: ' + axisLength;\n throw IllegalArgumentException_init(message.toString());\n }\n var maxTickCount = this.maxTickCount_0(axisLength);\n var breaks = this.getBreaks_0(maxTickCount, axisLength);\n return BreakLabelsLayoutUtil_getInstance().doLayoutVerticalAxisLabels_rdueqq$(this.orientation, breaks, this.axisDomain, axisMapper, this.theme);\n };\n VerticalFlexBreaksLabelsLayout.prototype.getBreaks_0 = function (maxCount, axisLength) {\n return BreakLabelsLayoutUtil_getInstance().getFlexBreaks_73ga93$(this.myBreaksProvider_0, maxCount, axisLength);\n };\n VerticalFlexBreaksLabelsLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'VerticalFlexBreaksLabelsLayout',\n interfaces: [AxisLabelsLayout]\n };\n function FixedScalesTilesLayouter() {\n FixedScalesTilesLayouter_instance = this;\n }\n FixedScalesTilesLayouter.prototype.createTileLayoutInfos_m2eqzh$ = function (tilesAreaSize, facets, layoutProviderByTile, addedHSize, addedVSize, coordProvider, hAxisTheme, vAxisTheme) {\n var facetTiles = facets.tileInfos();\n var vAxisCount = FacetedPlotLayoutUtil_getInstance().countVAxisInFirstRow_75mdod$(facetTiles);\n var vAxisThickness = PlotAxisLayoutUtil_getInstance().initialThickness_chj3mn$(Orientation$LEFT_getInstance(), vAxisTheme);\n var geomWidth = (tilesAreaSize.x - addedHSize - vAxisCount * vAxisThickness) / facets.colCount;\n var tileWidth = geomWidth + vAxisThickness;\n var hAxisCount = FacetedPlotLayoutUtil_getInstance().countHAxisInFirstCol_75mdod$(facetTiles);\n var hAxisThickness = PlotAxisLayoutUtil_getInstance().initialThickness_chj3mn$(Orientation$BOTTOM_getInstance(), hAxisTheme);\n var geomHeight = (tilesAreaSize.y - addedVSize - hAxisCount * hAxisThickness) / facets.rowCount;\n var tileHeight = geomHeight + hAxisThickness;\n var tileLayout = layoutProviderByTile.get_za3lpa$(0).createTopDownTileLayout();\n var tileLayoutInfo = tileLayout.doLayout_3twog0$(new DoubleVector(tileWidth, tileHeight), coordProvider);\n var destination = ArrayList_init_0(collectionSizeOrDefault(facetTiles, 10));\n var tmp$;\n tmp$ = facetTiles.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n destination.add_11rb$(tileLayoutInfo.withAxisShown_dqye30$(item.hasHAxis, item.hasVAxis));\n }\n var tileLayoutInfos = destination;\n var tilesAreaSizeNew = FacetedPlotLayoutUtil_getInstance().tilesAreaSize_xxmnvs$(tileLayoutInfos, facets, addedHSize, addedVSize);\n var widthDiff = tilesAreaSize.x - tilesAreaSizeNew.x;\n var heightDiff = tilesAreaSize.y - tilesAreaSizeNew.y;\n var tmp$_0 = JsMath.abs(widthDiff) <= facets.colCount;\n if (tmp$_0) {\n tmp$_0 = JsMath.abs(heightDiff) <= facets.rowCount;\n }\n if (tmp$_0) {\n return tileLayoutInfos;\n }\n var geomWidthDelta = widthDiff / facets.colCount;\n var geomHeightDelta = heightDiff / facets.rowCount;\n var tileWidth2 = tileLayoutInfo.geomOuterWidth() + geomWidthDelta + tileLayoutInfo.axisThicknessY();\n var tileHeight2 = tileLayoutInfo.geomOuterHeight() + geomHeightDelta + tileLayoutInfo.axisThicknessX();\n var tileLayoutInfo2 = tileLayout.doLayout_3twog0$(new DoubleVector(tileWidth2, tileHeight2), coordProvider);\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(facetTiles, 10));\n var tmp$_1;\n tmp$_1 = facetTiles.iterator();\n while (tmp$_1.hasNext()) {\n var item_0 = tmp$_1.next();\n destination_0.add_11rb$(tileLayoutInfo2.withAxisShown_dqye30$(item_0.hasHAxis, item_0.hasVAxis));\n }\n return destination_0;\n };\n FixedScalesTilesLayouter.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'FixedScalesTilesLayouter',\n interfaces: []\n };\n var FixedScalesTilesLayouter_instance = null;\n function FixedScalesTilesLayouter_getInstance() {\n if (FixedScalesTilesLayouter_instance === null) {\n new FixedScalesTilesLayouter();\n }\n return FixedScalesTilesLayouter_instance;\n }\n function FreeScalesTilesLayouter() {\n FreeScalesTilesLayouter_instance = this;\n }\n FreeScalesTilesLayouter.prototype.createTileLayoutInfos_m2eqzh$ = function (tilesAreaSize, facets, layoutProviderByTile, addedHSize, addedVSize, coordProvider, hAxisTheme, vAxisTheme) {\n var facetTiles = facets.tileInfos();\n var vAxisCount = FacetedPlotLayoutUtil_getInstance().countVAxisInFirstRow_75mdod$(facetTiles);\n var vAxisThickness = PlotAxisLayoutUtil_getInstance().initialThickness_chj3mn$(Orientation$LEFT_getInstance(), vAxisTheme);\n var geomWidth = (tilesAreaSize.x - addedHSize - vAxisCount * vAxisThickness) / facets.colCount;\n var hAxisCount = FacetedPlotLayoutUtil_getInstance().countHAxisInFirstCol_75mdod$(facetTiles);\n var hAxisThickness = PlotAxisLayoutUtil_getInstance().initialThickness_chj3mn$(Orientation$BOTTOM_getInstance(), hAxisTheme);\n var geomHeight = (tilesAreaSize.y - addedVSize - hAxisCount * hAxisThickness) / facets.rowCount;\n var destination = ArrayList_init_0(collectionSizeOrDefault(layoutProviderByTile, 10));\n var tmp$;\n tmp$ = layoutProviderByTile.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n destination.add_11rb$(item.createInsideOutTileLayout());\n }\n var layoutByTile = destination;\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(facetTiles, 10));\n var tmp$_0;\n tmp$_0 = facetTiles.iterator();\n while (tmp$_0.hasNext()) {\n var item_0 = tmp$_0.next();\n destination_0.add_11rb$(new Pair(item_0, layoutByTile.get_za3lpa$(item_0.trueIndex)));\n }\n var facetTileAndLayout = destination_0;\n var destination_1 = ArrayList_init_0(collectionSizeOrDefault(facetTileAndLayout, 10));\n var tmp$_1;\n tmp$_1 = facetTileAndLayout.iterator();\n while (tmp$_1.hasNext()) {\n var item_1 = tmp$_1.next();\n var tmp$_2 = destination_1.add_11rb$;\n var facetTile = item_1.component1()\n , tileLayout = item_1.component2();\n tmp$_2.call(destination_1, tileLayout.doLayout_3twog0$(new DoubleVector(geomWidth, geomHeight), coordProvider).withAxisShown_dqye30$(facetTile.hasHAxis, facetTile.hasVAxis));\n }\n var layoutInfos = destination_1;\n var tilesAreaSizeNew = FacetedPlotLayoutUtil_getInstance().tilesAreaSize_xxmnvs$(layoutInfos, facets, addedHSize, addedVSize);\n var widthDiff = tilesAreaSize.x - tilesAreaSizeNew.x;\n var heightDiff = tilesAreaSize.y - tilesAreaSizeNew.y;\n var tmp$_3 = JsMath.abs(widthDiff) <= facets.colCount;\n if (tmp$_3) {\n tmp$_3 = JsMath.abs(heightDiff) <= facets.rowCount;\n }\n if (tmp$_3) {\n return layoutInfos;\n }\n var geomWidthDelta = widthDiff / facets.colCount;\n var geomHeightDelta = heightDiff / facets.rowCount;\n var geomWidth2 = geomWidth + geomWidthDelta;\n var geomHeight2 = geomHeight + geomHeightDelta;\n var destination_2 = ArrayList_init_0(collectionSizeOrDefault(facetTileAndLayout, 10));\n var tmp$_4;\n tmp$_4 = facetTileAndLayout.iterator();\n while (tmp$_4.hasNext()) {\n var item_2 = tmp$_4.next();\n var tmp$_5 = destination_2.add_11rb$;\n var facetTile_0 = item_2.component1()\n , tileLayout_0 = item_2.component2();\n tmp$_5.call(destination_2, tileLayout_0.doLayout_3twog0$(new DoubleVector(geomWidth2, geomHeight2), coordProvider).withAxisShown_dqye30$(facetTile_0.hasHAxis, facetTile_0.hasVAxis));\n }\n var layoutInfos2 = destination_2;\n return layoutInfos2;\n };\n FreeScalesTilesLayouter.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'FreeScalesTilesLayouter',\n interfaces: []\n };\n var FreeScalesTilesLayouter_instance = null;\n function FreeScalesTilesLayouter_getInstance() {\n if (FreeScalesTilesLayouter_instance === null) {\n new FreeScalesTilesLayouter();\n }\n return FreeScalesTilesLayouter_instance;\n }\n function InsideOutTileLayout(hAxisLayout, vAxisLayout, hDomain, vDomain, marginsLayout) {\n InsideOutTileLayout$Companion_getInstance();\n this.hAxisLayout_0 = hAxisLayout;\n this.vAxisLayout_0 = vAxisLayout;\n this.hDomain_0 = hDomain;\n this.vDomain_0 = vDomain;\n this.marginsLayout_0 = marginsLayout;\n }\n InsideOutTileLayout.prototype.doLayout_3twog0$ = function (geomSize, coordProvider) {\n var geomOuterBounds = new DoubleRectangle(DoubleVector.Companion.ZERO, geomSize);\n var geomInnerBounds = this.marginsLayout_0.toInnerBounds_wthzt5$(geomOuterBounds);\n var tmp$ = InsideOutTileLayout$Companion_getInstance().computeAxisInfos_0(this.hAxisLayout_0, this.vAxisLayout_0, geomInnerBounds.dimension, this.hDomain_0, this.vDomain_0);\n var hAxisInfo = tmp$.component1()\n , vAxisInfo = tmp$.component2();\n var geomWithAxisBounds = InsideOutTileLayout$Companion_getInstance().tileBounds_0(hAxisInfo.axisBounds(), vAxisInfo.axisBounds(), geomOuterBounds);\n return new TileLayoutInfo(DoubleVector.Companion.ZERO, geomWithAxisBounds, geomOuterBounds, geomInnerBounds, hAxisInfo, vAxisInfo, true, true, void 0, void 0, 0);\n };\n function InsideOutTileLayout$Companion() {\n InsideOutTileLayout$Companion_instance = this;\n this.AXIS_STRETCH_RATIO_0 = 0.1;\n }\n InsideOutTileLayout$Companion.prototype.tileBounds_0 = function (xAxisBounds, yAxisBounds, geomBounds) {\n var leftTop = new DoubleVector(geomBounds.left - yAxisBounds.width, geomBounds.top - TileLayoutUtil_getInstance().GEOM_MARGIN);\n var rightBottom = new DoubleVector(geomBounds.right + TileLayoutUtil_getInstance().GEOM_MARGIN, geomBounds.bottom + xAxisBounds.height);\n return new DoubleRectangle(leftTop, rightBottom.subtract_gpjtzr$(leftTop));\n };\n InsideOutTileLayout$Companion.prototype.computeAxisInfos_0 = function (hAxisLayout, vAxisLayout, geomSize, hDomain, vDomain) {\n var geomBounds = new DoubleRectangle(DoubleVector.Companion.ZERO, geomSize);\n var hAxisInfo = this.computeHAxisInfo_0(hAxisLayout, hDomain, geomBounds);\n var vAxisInfo = this.computeVAxisInfo_0(vAxisLayout, vDomain, geomBounds);\n return new Pair(hAxisInfo, vAxisInfo);\n };\n InsideOutTileLayout$Companion.prototype.computeHAxisInfo_0 = function (axisLayout, axisDomain, geomBounds) {\n var axisSpan = geomBounds.xRange();\n var axisLength = axisSpan.length;\n var stretch = axisLength * this.AXIS_STRETCH_RATIO_0;\n var maxTickLabelsBounds = TileLayoutUtil_getInstance().maxHAxisTickLabelsBounds_f1277s$(Orientation$BOTTOM_getInstance(), stretch, axisSpan, axisSpan);\n return axisLayout.doLayout_5wdni1$(axisDomain, axisLength, maxTickLabelsBounds);\n };\n InsideOutTileLayout$Companion.prototype.computeVAxisInfo_0 = function (axisLayout, axisDomain, geomBounds) {\n return axisLayout.doLayout_5wdni1$(axisDomain, geomBounds.dimension.y, null);\n };\n InsideOutTileLayout$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var InsideOutTileLayout$Companion_instance = null;\n function InsideOutTileLayout$Companion_getInstance() {\n if (InsideOutTileLayout$Companion_instance === null) {\n new InsideOutTileLayout$Companion();\n }\n return InsideOutTileLayout$Companion_instance;\n }\n InsideOutTileLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'InsideOutTileLayout',\n interfaces: [TileLayout]\n };\n function LiveMapAxisTheme() {\n }\n Object.defineProperty(LiveMapAxisTheme.prototype, 'axis', {\n configurable: true,\n get: function () {\n return UNSUPPORTED_0();\n }\n });\n LiveMapAxisTheme.prototype.showLine = function () {\n return false;\n };\n LiveMapAxisTheme.prototype.showTickMarks = function () {\n return false;\n };\n LiveMapAxisTheme.prototype.showLabels = function () {\n return false;\n };\n LiveMapAxisTheme.prototype.showTitle = function () {\n return false;\n };\n LiveMapAxisTheme.prototype.showTooltip = function () {\n return false;\n };\n LiveMapAxisTheme.prototype.titleStyle = function () {\n return new ThemeTextStyle(FontFamily.Companion.SERIF, FontFace.Companion.NORMAL, Defaults$Plot$Axis_getInstance().TITLE_FONT_SIZE, Defaults_getInstance().TEXT_COLOR);\n };\n LiveMapAxisTheme.prototype.titleJustification = function () {\n return new TextJustification(0.5, 1.0);\n };\n LiveMapAxisTheme.prototype.titleMargins = function () {\n return new Margins();\n };\n LiveMapAxisTheme.prototype.lineWidth = function () {\n return 1.0;\n };\n LiveMapAxisTheme.prototype.lineColor = function () {\n return Defaults$Plot$Axis_getInstance().LINE_COLOR;\n };\n LiveMapAxisTheme.prototype.tickMarkColor = function () {\n return Defaults$Plot$Axis_getInstance().LINE_COLOR;\n };\n LiveMapAxisTheme.prototype.labelStyle = function () {\n return new ThemeTextStyle(FontFamily.Companion.SERIF, FontFace.Companion.NORMAL, Defaults$Plot$Axis_getInstance().TICK_FONT_SIZE, Defaults_getInstance().TEXT_COLOR);\n };\n LiveMapAxisTheme.prototype.tickMarkWidth = function () {\n return 1.0;\n };\n LiveMapAxisTheme.prototype.tickMarkLength = function () {\n return 4.0;\n };\n LiveMapAxisTheme.prototype.tickLabelMargins = function () {\n return new Margins(3.0, 3.0, 0.0, 0.0);\n };\n LiveMapAxisTheme.prototype.tooltipFill = function () {\n return Defaults$Common$Tooltip_getInstance().AXIS_TOOLTIP_COLOR;\n };\n LiveMapAxisTheme.prototype.tooltipColor = function () {\n return Defaults$Common$Tooltip_getInstance().LIGHT_TEXT_COLOR;\n };\n LiveMapAxisTheme.prototype.tooltipStrokeWidth = function () {\n return 1.0;\n };\n LiveMapAxisTheme.prototype.tooltipTextStyle = function () {\n return new ThemeTextStyle(FontFamily.Companion.SERIF, FontFace.Companion.NORMAL, Defaults$Common$Tooltip_getInstance().AXIS_TOOLTIP_FONT_SIZE, Defaults$Common$Tooltip_getInstance().LIGHT_TEXT_COLOR);\n };\n LiveMapAxisTheme.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LiveMapAxisTheme',\n interfaces: [AxisTheme]\n };\n function LiveMapTileLayout() {\n }\n LiveMapTileLayout.prototype.doLayout_3twog0$ = function (preferredSize, coordProvider) {\n var geomBounds = TileLayoutUtil_getInstance().liveMapGeomBounds_gpjtzr$(preferredSize);\n return new TileLayoutInfo(DoubleVector.Companion.ZERO, geomBounds, geomBounds, geomBounds, null, null, false, false, void 0, void 0, 0);\n };\n LiveMapTileLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LiveMapTileLayout',\n interfaces: [TileLayout]\n };\n function LiveMapTileLayoutProvider() {\n LiveMapTileLayoutProvider$Companion_getInstance();\n }\n LiveMapTileLayoutProvider.prototype.createTopDownTileLayout = function () {\n return LiveMapTileLayoutProvider$Companion_getInstance().TILE_LAYOUT_0;\n };\n LiveMapTileLayoutProvider.prototype.createInsideOutTileLayout = function () {\n return LiveMapTileLayoutProvider$Companion_getInstance().TILE_LAYOUT_0;\n };\n function LiveMapTileLayoutProvider$Companion() {\n LiveMapTileLayoutProvider$Companion_instance = this;\n this.TILE_LAYOUT_0 = new LiveMapTileLayout();\n }\n LiveMapTileLayoutProvider$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var LiveMapTileLayoutProvider$Companion_instance = null;\n function LiveMapTileLayoutProvider$Companion_getInstance() {\n if (LiveMapTileLayoutProvider$Companion_instance === null) {\n new LiveMapTileLayoutProvider$Companion();\n }\n return LiveMapTileLayoutProvider$Companion_instance;\n }\n LiveMapTileLayoutProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LiveMapTileLayoutProvider',\n interfaces: [TileLayoutProvider]\n };\n function TileLayoutUtil() {\n TileLayoutUtil_instance = this;\n this.GEOM_MARGIN = 0.0;\n this.GEOM_MIN_SIZE = new DoubleVector(50.0, 50.0);\n }\n TileLayoutUtil.prototype.liveMapGeomBounds_gpjtzr$ = function (plotSize) {\n return this.subtractMargins_0(0.0, 0.0, plotSize);\n };\n TileLayoutUtil.prototype.subtractMargins_0 = function (hAxisThickness, vAxisThickness, plotSize) {\n var marginLeftTop = new DoubleVector(vAxisThickness, this.GEOM_MARGIN);\n var marginRightBottom = new DoubleVector(this.GEOM_MARGIN, hAxisThickness);\n var geomSize = plotSize.subtract_gpjtzr$(marginLeftTop).subtract_gpjtzr$(marginRightBottom);\n var a = geomSize.x;\n var b = this.GEOM_MIN_SIZE.x;\n var tmp$ = JsMath.max(a, b);\n var a_0 = geomSize.y;\n var b_0 = this.GEOM_MIN_SIZE.y;\n return new DoubleRectangle(marginLeftTop, new DoubleVector(tmp$, JsMath.max(a_0, b_0)));\n };\n TileLayoutUtil.prototype.geomOuterBounds_sy27u4$ = function (geomInsets, plotSize, hDomain, vDomain, marginsLayout, coordProvider) {\n var plottingArea = geomInsets.subtractFrom_wthzt5$(new DoubleRectangle(DoubleVector.Companion.ZERO, plotSize));\n var geomInnerSize = marginsLayout.toInnerSize_gpjtzr$(plottingArea.dimension);\n var geomOuterSizeAdjusted = marginsLayout.toOuterSize_gpjtzr$(coordProvider.adjustGeomSize_3y20zv$(hDomain, vDomain, geomInnerSize));\n return new DoubleRectangle(plottingArea.origin, geomOuterSizeAdjusted);\n };\n TileLayoutUtil.prototype.maxHAxisTickLabelsBounds_cvaznw$ = function (axisOrientation, stretch, axisSpan, plotSize) {\n var geomPadding = 10.0;\n var maxHorizontalSpan = new DoubleSpan(geomPadding, plotSize.x - 2 * geomPadding);\n return this.maxHAxisTickLabelsBounds_f1277s$(axisOrientation, stretch, axisSpan, maxHorizontalSpan);\n };\n TileLayoutUtil.prototype.maxHAxisTickLabelsBounds_f1277s$ = function (axisOrientation, stretch, axisSpan, maxHorizontalSpan) {\n var tmp$;\n switch (axisOrientation.name) {\n case 'TOP':\n case 'BOTTOM':\n var leftSpace = axisSpan.lowerEnd - maxHorizontalSpan.lowerEnd + stretch;\n var rightSpace = maxHorizontalSpan.upperEnd - axisSpan.upperEnd + stretch;\n var height = 1.0E42;\n if (equals(axisOrientation, Orientation$TOP_getInstance()))\n tmp$ = -height;\n else\n tmp$ = 0.0;\n var top = tmp$;\n var left = -leftSpace;\n var width = leftSpace + rightSpace + axisSpan.length;\n return DoubleRectangle_init(left, top, width, height);\n default:\n throw IllegalArgumentException_init('Orientation not supported: ' + axisOrientation);\n }\n };\n TileLayoutUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'TileLayoutUtil',\n interfaces: []\n };\n var TileLayoutUtil_instance = null;\n function TileLayoutUtil_getInstance() {\n if (TileLayoutUtil_instance === null) {\n new TileLayoutUtil();\n }\n return TileLayoutUtil_instance;\n }\n function TopDownTileLayout(hAxisLayout, vAxisLayout, hDomain, vDomain, marginsLayout) {\n TopDownTileLayout$Companion_getInstance();\n this.hAxisLayout_0 = hAxisLayout;\n this.vAxisLayout_0 = vAxisLayout;\n this.hDomain_0 = hDomain;\n this.vDomain_0 = vDomain;\n this.marginsLayout_0 = marginsLayout;\n }\n TopDownTileLayout.prototype.doLayout_3twog0$ = function (preferredSize, coordProvider) {\n var geomAreaInsets = TopDownTileLayout$Companion_getInstance().computeAxisInfos_0(this.hAxisLayout_0, this.vAxisLayout_0, preferredSize, this.hDomain_0, this.vDomain_0, this.marginsLayout_0, coordProvider);\n var geomBoundsAfterLayout = TileLayoutUtil_getInstance().geomOuterBounds_sy27u4$(geomAreaInsets, preferredSize, this.hDomain_0, this.vDomain_0, this.marginsLayout_0, coordProvider);\n var tmp$ = to(geomAreaInsets.hAxisInfo, geomAreaInsets.vAxisInfo);\n var hAxisInfo = tmp$.component1()\n , vAxisInfo = tmp$.component2();\n var block$result;\n var hAxisSpan = this.marginsLayout_0.toInnerBounds_wthzt5$(geomBoundsAfterLayout).xRange();\n var maxTickLabelsBounds = TileLayoutUtil_getInstance().maxHAxisTickLabelsBounds_cvaznw$(this.hAxisLayout_0.orientation, 0.0, hAxisSpan, preferredSize);\n var tickLabelsBounds = hAxisInfo.tickLabelsBounds;\n var leftOverflow = maxTickLabelsBounds.left - tickLabelsBounds.left;\n var rightOverflow = tickLabelsBounds.left + tickLabelsBounds.width - maxTickLabelsBounds.right;\n var newX = geomBoundsAfterLayout.left;\n var newW = geomBoundsAfterLayout.width;\n if (leftOverflow > 0) {\n newX = geomBoundsAfterLayout.left + leftOverflow;\n newW = geomBoundsAfterLayout.width - leftOverflow;\n }\n if (rightOverflow > 0) {\n newW = newW - rightOverflow;\n }\n var b = newW;\n newW = JsMath.max(0.0, b);\n var boundsNew = DoubleRectangle_init(newX, geomBoundsAfterLayout.top, newW, geomBoundsAfterLayout.height);\n if (!(boundsNew != null ? boundsNew.equals(geomBoundsAfterLayout) : null)) {\n var sizeNew = coordProvider.adjustGeomSize_3y20zv$(this.hDomain_0, this.vDomain_0, boundsNew.dimension);\n block$result = new DoubleRectangle(boundsNew.origin, sizeNew);\n } else {\n block$result = boundsNew;\n }\n var geomOuterBounds = block$result;\n var geomWithAxisBounds = TopDownTileLayout$Companion_getInstance().tileBounds_0(hAxisInfo.axisBounds(), vAxisInfo.axisBounds(), geomOuterBounds);\n var geomInnerBounds = this.marginsLayout_0.toInnerBounds_wthzt5$(geomOuterBounds);\n var hAxisInfoNew = hAxisInfo.withAxisLength_14dthe$(geomInnerBounds.width);\n var vAxisInfoNew = vAxisInfo.withAxisLength_14dthe$(geomInnerBounds.height);\n return new TileLayoutInfo(DoubleVector.Companion.ZERO, geomWithAxisBounds, geomOuterBounds, geomInnerBounds, hAxisInfoNew, vAxisInfoNew, true, true, void 0, void 0, 0);\n };\n function TopDownTileLayout$Companion() {\n TopDownTileLayout$Companion_instance = this;\n this.AXIS_STRETCH_RATIO_0 = 0.1;\n }\n TopDownTileLayout$Companion.prototype.tileBounds_0 = function (xAxisBounds, yAxisBounds, geomBounds) {\n var leftTop = new DoubleVector(geomBounds.left - yAxisBounds.width, geomBounds.top - TileLayoutUtil_getInstance().GEOM_MARGIN);\n var rightBottom = new DoubleVector(geomBounds.right + TileLayoutUtil_getInstance().GEOM_MARGIN, geomBounds.bottom + xAxisBounds.height);\n return new DoubleRectangle(leftTop, rightBottom.subtract_gpjtzr$(leftTop));\n };\n TopDownTileLayout$Companion.prototype.computeAxisInfos_0 = function (hAxisLayout, vAxisLayout, plotSize, hDomain, vDomain, marginsLayout, coordProvider) {\n var tmp$;\n var insetsInitial = GeomAreaInsets$Companion_getInstance().init_wmnv36$(hAxisLayout, vAxisLayout);\n var geomHeightEstim = marginsLayout.toInnerSize_gpjtzr$(TileLayoutUtil_getInstance().geomOuterBounds_sy27u4$(insetsInitial, plotSize, hDomain, vDomain, marginsLayout, coordProvider).dimension).y;\n var insetsVAxis = insetsInitial.layoutVAxis_3mogjz$(vDomain, geomHeightEstim);\n var plottingArea = TileLayoutUtil_getInstance().geomOuterBounds_sy27u4$(insetsVAxis, plotSize, hDomain, vDomain, marginsLayout, coordProvider);\n var hAxisSpan = marginsLayout.toInnerBounds_wthzt5$(plottingArea).xRange();\n var insetsHVAxis = insetsVAxis.layoutHAxis_g4u3p1$(hDomain, plotSize, hAxisSpan);\n if (insetsHVAxis.hAxisThickness > insetsInitial.hAxisThickness) {\n var geomHeight = marginsLayout.toInnerSize_gpjtzr$(TileLayoutUtil_getInstance().geomOuterBounds_sy27u4$(insetsHVAxis, plotSize, hDomain, vDomain, marginsLayout, coordProvider).dimension).y;\n tmp$ = insetsHVAxis.layoutVAxis_3mogjz$(vDomain, geomHeight);\n } else {\n tmp$ = insetsHVAxis;\n }\n var insetsFinal = tmp$;\n return insetsFinal;\n };\n TopDownTileLayout$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var TopDownTileLayout$Companion_instance = null;\n function TopDownTileLayout$Companion_getInstance() {\n if (TopDownTileLayout$Companion_instance === null) {\n new TopDownTileLayout$Companion();\n }\n return TopDownTileLayout$Companion_instance;\n }\n TopDownTileLayout.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TopDownTileLayout',\n interfaces: [TileLayout]\n };\n function GeomAreaInsets(left, top, right, bottom, hAxisLayout, vAxisLayout, _hAxisInfo, _vAxisInfo) {\n GeomAreaInsets$Companion_getInstance();\n Insets.call(this, left, top, right, bottom);\n this.hAxisLayout_0 = hAxisLayout;\n this.vAxisLayout_0 = vAxisLayout;\n this._hAxisInfo_0 = _hAxisInfo;\n this._vAxisInfo_0 = _vAxisInfo;\n }\n Object.defineProperty(GeomAreaInsets.prototype, 'hAxisThickness', {\n configurable: true,\n get: function () {\n var tmp$;\n tmp$ = this.hAxisLayout_0.orientation === Orientation$TOP_getInstance();\n if (tmp$ === true)\n return this.top;\n else if (tmp$ === false)\n return this.bottom;\n else\n return Kotlin.noWhenBranchMatched();\n }\n });\n Object.defineProperty(GeomAreaInsets.prototype, 'vAxisThickness', {\n configurable: true,\n get: function () {\n var tmp$;\n tmp$ = this.vAxisLayout_0.orientation === Orientation$LEFT_getInstance();\n if (tmp$ === true)\n return this.left;\n else if (tmp$ === false)\n return this.right;\n else\n return Kotlin.noWhenBranchMatched();\n }\n });\n Object.defineProperty(GeomAreaInsets.prototype, 'hAxisInfo', {\n configurable: true,\n get: function () {\n var tmp$;\n tmp$ = this._hAxisInfo_0;\n if (tmp$ == null) {\n throw IllegalStateException_init('Horizontal axis is not layouted');\n }\n return tmp$;\n }\n });\n Object.defineProperty(GeomAreaInsets.prototype, 'vAxisInfo', {\n configurable: true,\n get: function () {\n var tmp$;\n tmp$ = this._vAxisInfo_0;\n if (tmp$ == null) {\n throw IllegalStateException_init('Vertical axis is not layouted');\n }\n return tmp$;\n }\n });\n GeomAreaInsets.prototype.subtractFrom_wthzt5$ = function (r) {\n var r_0 = Insets.prototype.subtractFrom_wthzt5$.call(this, r);\n var tmp$ = r_0.origin;\n var a = r_0.width;\n var b = TileLayoutUtil_getInstance().GEOM_MIN_SIZE.x;\n var tmp$_0 = JsMath.max(a, b);\n var a_0 = r_0.height;\n var b_0 = TileLayoutUtil_getInstance().GEOM_MIN_SIZE.y;\n return new DoubleRectangle(tmp$, new DoubleVector(tmp$_0, JsMath.max(a_0, b_0)));\n };\n GeomAreaInsets.prototype.layoutHAxis_g4u3p1$ = function (axisDomain, plotSize, axisSpan) {\n var axisLength = axisSpan.length;\n var stretch = axisLength * GeomAreaInsets$Companion_getInstance().AXIS_STRETCH_RATIO_0;\n var maxTickLabelsBounds = TileLayoutUtil_getInstance().maxHAxisTickLabelsBounds_cvaznw$(this.hAxisLayout_0.orientation, stretch, axisSpan, plotSize);\n var info = this.hAxisLayout_0.doLayout_5wdni1$(axisDomain, axisLength, maxTickLabelsBounds);\n return new GeomAreaInsets(this.left, this.hAxisLayout_0.orientation === Orientation$TOP_getInstance() ? info.axisBounds().height : this.top, this.right, this.hAxisLayout_0.orientation === Orientation$BOTTOM_getInstance() ? info.axisBounds().height : this.bottom, this.hAxisLayout_0, this.vAxisLayout_0, info, this._vAxisInfo_0);\n };\n GeomAreaInsets.prototype.layoutVAxis_3mogjz$ = function (axisDomain, axisLength) {\n var info = this.vAxisLayout_0.doLayout_5wdni1$(axisDomain, axisLength, null);\n return new GeomAreaInsets(this.vAxisLayout_0.orientation === Orientation$LEFT_getInstance() ? info.axisBounds().width : this.left, this.top, this.vAxisLayout_0.orientation === Orientation$RIGHT_getInstance() ? info.axisBounds().width : this.right, this.bottom, this.hAxisLayout_0, this.vAxisLayout_0, this._hAxisInfo_0, info);\n };\n function GeomAreaInsets$Companion() {\n GeomAreaInsets$Companion_instance = this;\n this.AXIS_STRETCH_RATIO_0 = 0.1;\n }\n GeomAreaInsets$Companion.prototype.init_wmnv36$ = function (hAxisLayout, vAxisLayout) {\n return new GeomAreaInsets(vAxisLayout.orientation === Orientation$LEFT_getInstance() ? vAxisLayout.initialThickness() : TileLayoutUtil_getInstance().GEOM_MARGIN, hAxisLayout.orientation === Orientation$TOP_getInstance() ? hAxisLayout.initialThickness() : TileLayoutUtil_getInstance().GEOM_MARGIN, vAxisLayout.orientation === Orientation$RIGHT_getInstance() ? vAxisLayout.initialThickness() : TileLayoutUtil_getInstance().GEOM_MARGIN, hAxisLayout.orientation === Orientation$BOTTOM_getInstance() ? hAxisLayout.initialThickness() : TileLayoutUtil_getInstance().GEOM_MARGIN, hAxisLayout, vAxisLayout, null, null);\n };\n GeomAreaInsets$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var GeomAreaInsets$Companion_instance = null;\n function GeomAreaInsets$Companion_getInstance() {\n if (GeomAreaInsets$Companion_instance === null) {\n new GeomAreaInsets$Companion();\n }\n return GeomAreaInsets$Companion_instance;\n }\n GeomAreaInsets.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GeomAreaInsets',\n interfaces: [Insets]\n };\n function Insets(left, top, right, bottom) {\n this.left = left;\n this.top = top;\n this.right = right;\n this.bottom = bottom;\n }\n Insets.prototype.subtractFrom_wthzt5$ = function (r) {\n var leftTop = new DoubleVector(this.left, this.top);\n var rightBottom = new DoubleVector(this.right, this.bottom);\n var size = r.dimension.subtract_gpjtzr$(leftTop).subtract_gpjtzr$(rightBottom);\n return new DoubleRectangle(r.origin.add_gpjtzr$(leftTop), size);\n };\n Insets.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'Insets',\n interfaces: []\n };\n function DefaultFontFamilyRegistry(defaultWidthFactor) {\n if (defaultWidthFactor === void 0)\n defaultWidthFactor = 1.0;\n this.defaultWidthFactor_0 = defaultWidthFactor;\n this.familyByName_0 = HashMap_init();\n this.put_h6gg2f$('monospace', true);\n this.put_h6gg2f$('Courier', true);\n this.put_h6gg2f$('Consolas', true);\n this.put_h6gg2f$('Fixed', true);\n this.put_h6gg2f$('Fixedsys', true);\n this.put_h6gg2f$('FreeMono', true);\n this.put_h6gg2f$('Lucida Console', true);\n this.put_h6gg2f$('Monaco', true);\n this.put_h6gg2f$('Monofur', true);\n this.put_h6gg2f$('OCR-A', true);\n this.put_h6gg2f$('OCR-B', true);\n this.put_h6gg2f$('Source Code Pro', true);\n }\n DefaultFontFamilyRegistry.prototype.get_61zpoe$ = function (name) {\n var tmp$;\n var key = trim(Kotlin.isCharSequence(tmp$ = name) ? tmp$ : throwCCE()).toString().toLowerCase();\n var $receiver = this.familyByName_0;\n var tmp$_0;\n var value = $receiver.get_11rb$(key);\n if (value == null) {\n var answer = this.guessFamily_0(name);\n $receiver.put_xwzc9p$(key, answer);\n tmp$_0 = answer;\n } else {\n tmp$_0 = value;\n }\n return tmp$_0;\n };\n DefaultFontFamilyRegistry.prototype.put_h6gg2f$ = function (name, isMonospased, widthFactor) {\n if (isMonospased === void 0)\n isMonospased = null;\n if (widthFactor === void 0)\n widthFactor = null;\n var tmp$, tmp$_0;\n var tmp$_1;\n var key = trim(Kotlin.isCharSequence(tmp$_1 = name) ? tmp$_1 : throwCCE()).toString().toLowerCase();\n var wasFamily = this.familyByName_0.get_11rb$(key);\n var nowMonospaced = (tmp$ = isMonospased != null ? isMonospased : wasFamily != null ? wasFamily.monospaced : null) != null ? tmp$ : false;\n var nowWidthFactor = (tmp$_0 = widthFactor != null ? widthFactor : wasFamily != null ? wasFamily.widthFactor : null) != null ? tmp$_0 : this.defaultWidthFactor_0;\n var $receiver = this.familyByName_0;\n var value = new FontFamily(name, nowMonospaced, nowWidthFactor);\n $receiver.put_xwzc9p$(key, value);\n };\n DefaultFontFamilyRegistry.prototype.guessFamily_0 = function (name) {\n var tmp$;\n var monospaced = endsWith(trim(Kotlin.isCharSequence(tmp$ = name) ? tmp$ : throwCCE()).toString().toLowerCase(), ' mono');\n return new FontFamily(name, monospaced, this.defaultWidthFactor_0);\n };\n DefaultFontFamilyRegistry.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'DefaultFontFamilyRegistry',\n interfaces: [FontFamilyRegistry]\n };\n function Defaults() {\n Defaults_instance = this;\n this.ASPECT_RATIO = 3.0 / 2.0;\n this.MIN_PLOT_WIDTH = 50.0;\n this.DEF_PLOT_WIDTH = 600.0;\n this.DEF_LIVE_MAP_WIDTH = 800.0;\n this.DEF_PLOT_SIZE = new DoubleVector(this.DEF_PLOT_WIDTH, this.DEF_PLOT_WIDTH / this.ASPECT_RATIO);\n this.DEF_LIVE_MAP_SIZE = new DoubleVector(this.DEF_LIVE_MAP_WIDTH, this.DEF_LIVE_MAP_WIDTH / this.ASPECT_RATIO);\n this.DARK_GRAY = '#3d3d3d';\n this.GRAY = Color.Companion.GRAY.toHexColor();\n this.LIGHT_GRAY = Color.Companion.LIGHT_GRAY.toHexColor();\n this.X_LIGHT_GRAY = Color.Companion.VERY_LIGHT_GRAY.toHexColor();\n this.XX_LIGHT_GRAY = '#e0e0e0';\n this.TEXT_COLOR = Color.Companion.parseHex_61zpoe$(this.DARK_GRAY);\n this.FONT_LARGE = 16.0;\n this.FONT_MEDIUM = 15.0;\n this.FONT_SMALL = 13.0;\n this.FONT_FAMILY_NORMAL = '\"Lucida Grande\", sans-serif';\n var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3, tmp$_4, tmp$_5, tmp$_6, tmp$_7, tmp$_8, tmp$_9, tmp$_10, tmp$_11;\n tmp$_0 = Style_getInstance().PLOT_TITLE;\n tmp$ = Defaults$Common$Title_getInstance().FONT_SIZE;\n tmp$_1 = to(tmp$_0, this.createTextStyle_0(FontFace.Companion.BOLD, tmp$));\n tmp$_2 = to(Style_getInstance().PLOT_SUBTITLE, this.createTextStyle_0(void 0, Defaults$Common$Subtitle_getInstance().FONT_SIZE));\n tmp$_3 = to(Style_getInstance().PLOT_CAPTION, this.createTextStyle_0(void 0, Defaults$Common$Caption_getInstance().FONT_SIZE));\n tmp$_4 = to(Style_getInstance().LEGEND_TITLE, this.createTextStyle_0(void 0, Defaults$Common$Legend_getInstance().TITLE_FONT_SIZE));\n tmp$_5 = to(Style_getInstance().LEGEND_ITEM, this.createTextStyle_0(void 0, Defaults$Common$Legend_getInstance().ITEM_FONT_SIZE));\n tmp$_6 = to(Style_getInstance().TOOLTIP_TEXT, this.createTextStyle_0(void 0, Defaults$Common$Tooltip_getInstance().DATA_TOOLTIP_FONT_SIZE));\n tmp$_8 = Style_getInstance().TOOLTIP_TITLE;\n tmp$_7 = Defaults$Common$Tooltip_getInstance().DATA_TOOLTIP_FONT_SIZE;\n tmp$_9 = to(tmp$_8, this.createTextStyle_0(FontFace.Companion.BOLD, tmp$_7));\n tmp$_11 = Style_getInstance().TOOLTIP_LABEL;\n tmp$_10 = Defaults$Common$Tooltip_getInstance().DATA_TOOLTIP_FONT_SIZE;\n this.DEFAULT_TEXT_STYLES_8be2vx$ = mapOf([tmp$_1, tmp$_2, tmp$_3, tmp$_4, tmp$_5, tmp$_6, tmp$_9, to(tmp$_11, this.createTextStyle_0(FontFace.Companion.BOLD, tmp$_10)), to('axis-title-x', this.createTextStyle_0(void 0, Defaults$Plot$Axis_getInstance().TITLE_FONT_SIZE)), to('axis-title-y', this.createTextStyle_0(void 0, Defaults$Plot$Axis_getInstance().TITLE_FONT_SIZE)), to('axis-text-x', this.createTextStyle_0(void 0, Defaults$Plot$Axis_getInstance().TICK_FONT_SIZE)), to('axis-text-y', this.createTextStyle_0(void 0, Defaults$Plot$Axis_getInstance().TICK_FONT_SIZE)), to('axis-tooltip-text-x', this.createTextStyle_0(void 0, Defaults$Common$Tooltip_getInstance().AXIS_TOOLTIP_FONT_SIZE, Color.Companion.WHITE)), to('axis-tooltip-text-y', this.createTextStyle_0(void 0, Defaults$Common$Tooltip_getInstance().AXIS_TOOLTIP_FONT_SIZE, Color.Companion.WHITE)), to('facet-strip-text-x', this.createTextStyle_0(void 0, this.FONT_MEDIUM)), to('facet-strip-text-y', this.createTextStyle_0(void 0, this.FONT_MEDIUM))]);\n }\n function Defaults$Common() {\n }\n function Defaults$Common$Title() {\n Defaults$Common$Title_instance = this;\n this.FONT_SIZE = Defaults_getInstance().FONT_LARGE;\n this.FONT_SIZE_CSS = '' + toString(this.FONT_SIZE) + 'px';\n }\n Defaults$Common$Title.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Title',\n interfaces: []\n };\n var Defaults$Common$Title_instance = null;\n function Defaults$Common$Title_getInstance() {\n if (Defaults$Common$Title_instance === null) {\n new Defaults$Common$Title();\n }\n return Defaults$Common$Title_instance;\n }\n function Defaults$Common$Subtitle() {\n Defaults$Common$Subtitle_instance = this;\n this.FONT_SIZE = Defaults_getInstance().FONT_MEDIUM;\n this.FONT_SIZE_CSS = '' + toString(this.FONT_SIZE) + 'px';\n }\n Defaults$Common$Subtitle.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Subtitle',\n interfaces: []\n };\n var Defaults$Common$Subtitle_instance = null;\n function Defaults$Common$Subtitle_getInstance() {\n if (Defaults$Common$Subtitle_instance === null) {\n new Defaults$Common$Subtitle();\n }\n return Defaults$Common$Subtitle_instance;\n }\n function Defaults$Common$Caption() {\n Defaults$Common$Caption_instance = this;\n this.FONT_SIZE = Defaults_getInstance().FONT_SMALL;\n this.FONT_SIZE_CSS = '' + toString(this.FONT_SIZE) + 'px';\n }\n Defaults$Common$Caption.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Caption',\n interfaces: []\n };\n var Defaults$Common$Caption_instance = null;\n function Defaults$Common$Caption_getInstance() {\n if (Defaults$Common$Caption_instance === null) {\n new Defaults$Common$Caption();\n }\n return Defaults$Common$Caption_instance;\n }\n function Defaults$Common$Legend() {\n Defaults$Common$Legend_instance = this;\n this.TITLE_FONT_SIZE = Defaults_getInstance().FONT_MEDIUM;\n this.ITEM_FONT_SIZE = Defaults_getInstance().FONT_SMALL;\n }\n Defaults$Common$Legend.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Legend',\n interfaces: []\n };\n var Defaults$Common$Legend_instance = null;\n function Defaults$Common$Legend_getInstance() {\n if (Defaults$Common$Legend_instance === null) {\n new Defaults$Common$Legend();\n }\n return Defaults$Common$Legend_instance;\n }\n function Defaults$Common$Tooltip() {\n Defaults$Common$Tooltip_instance = this;\n this.MAX_POINTER_FOOTING_LENGTH = 12.0;\n this.POINTER_FOOTING_TO_SIDE_LENGTH_RATIO = 0.4;\n this.MARGIN_BETWEEN_TOOLTIPS = 5.0;\n this.DATA_TOOLTIP_FONT_SIZE = Defaults_getInstance().FONT_SMALL;\n this.LINE_INTERVAL = 6.0;\n this.INTERVAL_BETWEEN_SUBSTRINGS = 3.0;\n this.H_CONTENT_PADDING = 6.0;\n this.V_CONTENT_PADDING = 6.0;\n this.CONTENT_EXTENDED_PADDING = 10.0;\n this.LABEL_VALUE_INTERVAL = 8.0;\n this.VALUE_LINE_MAX_LENGTH = 30;\n this.LINE_SEPARATOR_WIDTH = 0.7;\n this.BORDER_RADIUS = 4.0;\n this.COLOR_BAR_WIDTH = 4.0;\n this.COLOR_BAR_STROKE_WIDTH = 1.5;\n this.DARK_TEXT_COLOR = Color.Companion.BLACK;\n this.LIGHT_TEXT_COLOR = Color.Companion.WHITE;\n this.AXIS_TOOLTIP_FONT_SIZE = Defaults$Plot$Axis_getInstance().TICK_FONT_SIZE;\n this.AXIS_TOOLTIP_COLOR = Defaults$Plot$Axis_getInstance().LINE_COLOR;\n this.AXIS_RADIUS = 1.5;\n this.ROTATION_ANGLE = 15.0;\n }\n Defaults$Common$Tooltip.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Tooltip',\n interfaces: []\n };\n var Defaults$Common$Tooltip_instance = null;\n function Defaults$Common$Tooltip_getInstance() {\n if (Defaults$Common$Tooltip_instance === null) {\n new Defaults$Common$Tooltip();\n }\n return Defaults$Common$Tooltip_instance;\n }\n Defaults$Common.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'Common',\n interfaces: []\n };\n function Defaults$Plot() {\n }\n function Defaults$Plot$Axis() {\n Defaults$Plot$Axis_instance = this;\n this.TITLE_FONT_SIZE = Defaults_getInstance().FONT_MEDIUM;\n this.TICK_FONT_SIZE = Defaults_getInstance().FONT_SMALL;\n this.LINE_COLOR = Color.Companion.parseHex_61zpoe$(Defaults_getInstance().DARK_GRAY);\n }\n Defaults$Plot$Axis.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Axis',\n interfaces: []\n };\n var Defaults$Plot$Axis_instance = null;\n function Defaults$Plot$Axis_getInstance() {\n if (Defaults$Plot$Axis_instance === null) {\n new Defaults$Plot$Axis();\n }\n return Defaults$Plot$Axis_instance;\n }\n Defaults$Plot.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'Plot',\n interfaces: []\n };\n Defaults.prototype.createTextStyle_0 = function (face, size, color) {\n if (face === void 0)\n face = FontFace.Companion.NORMAL;\n if (size === void 0)\n size = this.FONT_MEDIUM;\n if (color === void 0)\n color = Color.Companion.BLACK;\n return new TextStyle(this.FONT_FAMILY_NORMAL, face, size, color);\n };\n Defaults.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Defaults',\n interfaces: []\n };\n var Defaults_instance = null;\n function Defaults_getInstance() {\n if (Defaults_instance === null) {\n new Defaults();\n }\n return Defaults_instance;\n }\n function FontFamilyRegistry() {\n }\n FontFamilyRegistry.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'FontFamilyRegistry',\n interfaces: []\n };\n function LabelSpec() {\n }\n LabelSpec.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'LabelSpec',\n interfaces: []\n };\n function PlotLabelSpec(font) {\n PlotLabelSpec$Companion_getInstance();\n this.font_dkwnk1$_0 = font;\n }\n Object.defineProperty(PlotLabelSpec.prototype, 'font', {\n get: function () {\n return this.font_dkwnk1$_0;\n }\n });\n PlotLabelSpec.prototype.dimensions_61zpoe$ = function (labelText) {\n return new DoubleVector(this.width_61zpoe$(labelText), this.height());\n };\n PlotLabelSpec.prototype.width_61zpoe$ = function (labelText) {\n var tmp$;\n if (this.font.isMonospased) {\n tmp$ = this.monospacedWidth_0(labelText.length);\n } else {\n tmp$ = PlotLabelSpec$Companion_getInstance().FONT_WIDTH_SCALE_FACTOR_0 * TextWidthEstimator_getInstance().textWidth_d91ba$(labelText, this.font);\n }\n return tmp$ * this.font.family.widthFactor;\n };\n PlotLabelSpec.prototype.monospacedWidth_0 = function (labelLength) {\n var tmp$;\n var ratio = PlotLabelSpec$Companion_getInstance().FONT_SIZE_TO_GLYPH_WIDTH_RATIO_MONOSPACED_0;\n var width = labelLength * this.font.size * ratio + 2 * PlotLabelSpec$Companion_getInstance().LABEL_PADDING_0;\n if (this.font.isBold) {\n tmp$ = width * PlotLabelSpec$Companion_getInstance().FONT_WEIGHT_BOLD_TO_NORMAL_WIDTH_RATIO_0;\n } else {\n tmp$ = width;\n }\n return tmp$;\n };\n PlotLabelSpec.prototype.height = function () {\n return this.font.size + 2 * PlotLabelSpec$Companion_getInstance().LABEL_PADDING_0;\n };\n function PlotLabelSpec$Companion() {\n PlotLabelSpec$Companion_instance = this;\n this.FONT_SIZE_TO_GLYPH_WIDTH_RATIO_0 = 0.67;\n this.FONT_SIZE_TO_GLYPH_WIDTH_RATIO_MONOSPACED_0 = 0.6;\n this.FONT_WEIGHT_BOLD_TO_NORMAL_WIDTH_RATIO_0 = 1.075;\n this.LABEL_PADDING_0 = 0.0;\n this.FONT_WIDTH_SCALE_FACTOR_0 = 0.85026;\n this.DUMMY = new PlotLabelSpec$Companion$DUMMY$ObjectLiteral();\n }\n function PlotLabelSpec$Companion$DUMMY$ObjectLiteral() {\n }\n Object.defineProperty(PlotLabelSpec$Companion$DUMMY$ObjectLiteral.prototype, 'font', {\n configurable: true,\n get: function () {\n return UNSUPPORTED('Dummy Label Spec');\n }\n });\n PlotLabelSpec$Companion$DUMMY$ObjectLiteral.prototype.dimensions_61zpoe$ = function (labelText) {\n UNSUPPORTED('Dummy Label Spec');\n };\n PlotLabelSpec$Companion$DUMMY$ObjectLiteral.prototype.width_61zpoe$ = function (labelText) {\n UNSUPPORTED('Dummy Label Spec');\n };\n PlotLabelSpec$Companion$DUMMY$ObjectLiteral.prototype.height = function () {\n UNSUPPORTED('Dummy Label Spec');\n };\n PlotLabelSpec$Companion$DUMMY$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [LabelSpec]\n };\n PlotLabelSpec$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var PlotLabelSpec$Companion_instance = null;\n function PlotLabelSpec$Companion_getInstance() {\n if (PlotLabelSpec$Companion_instance === null) {\n new PlotLabelSpec$Companion();\n }\n return PlotLabelSpec$Companion_instance;\n }\n PlotLabelSpec.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PlotLabelSpec',\n interfaces: [LabelSpec]\n };\n function Style() {\n Style_instance = this;\n this.PLOT_CONTAINER = 'plt-container';\n this.PLOT_TITLE = 'plot-title';\n this.PLOT_SUBTITLE = 'plot-subtitle';\n this.PLOT_CAPTION = 'plot-caption';\n this.AXIS_TITLE = 'axis-title';\n this.AXIS_TEXT = 'axis-text';\n this.LEGEND_TITLE = 'legend-title';\n this.LEGEND_ITEM = 'legend-item';\n this.TOOLTIP_TEXT = 'tooltip-text';\n this.TOOLTIP_TITLE = 'tooltip-title';\n this.TOOLTIP_LABEL = 'tooltip-label';\n this.AXIS_TOOLTIP_TEXT = 'axis-tooltip-text';\n this.FACET_STRIP_TEXT = 'facet-strip-text';\n this.CSS_0 = trimMargin('\\n' + ' |.' + this.PLOT_CONTAINER + ' {' + '\\n' + ' | font-family: ' + Defaults_getInstance().FONT_FAMILY_NORMAL + ';' + '\\n' + ' | user-select: none;' + '\\n' + ' | -webkit-user-select: none;' + '\\n' + ' | -moz-user-select: none;' + '\\n' + ' | -ms-user-select: none;' + '\\n' + ' |}' + '\\n' + ' |text {' + '\\n' + ' | fill: ' + StyleSheet.Companion.UNDEFINED_FONT_COLOR.toHexColor() + ';' + '\\n' + ' | ' + StyleSheet.Companion.toCSS_t8jpc2$(StyleSheet.Companion.UNDEFINED_FONT_FACE) + ' ' + '\\n' + ' |' + '\\n' + ' | text-rendering: optimizeLegibility;' + '\\n' + ' |}' + '\\n' + ' ');\n }\n Style.prototype.generateCSS_kgh34e$ = function (styleSheet, plotId, decorationLayerId) {\n var css = new StringBuilder(this.CSS_0);\n css.append_s8itvh$(10);\n var tmp$;\n tmp$ = styleSheet.getClasses().iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n var tmp$_0;\n switch (element) {\n case 'tooltip-text':\n case 'tooltip-title':\n case 'tooltip-label':\n case 'axis-tooltip-text-x':\n case 'axis-tooltip-text-y':\n tmp$_0 = decorationLayerId;\n break;\n default:\n tmp$_0 = plotId;\n break;\n }\n var id = tmp$_0;\n css.append_pdl1vj$(styleSheet.toCSS_jyasbz$(element, id));\n }\n return css.toString();\n };\n Style.prototype.default = function () {\n return new StyleSheet(Defaults_getInstance().DEFAULT_TEXT_STYLES_8be2vx$, Defaults_getInstance().FONT_FAMILY_NORMAL);\n };\n function Style$fromTheme$ts(themeStyle) {\n return new TextStyle(themeStyle.family.name, themeStyle.face, themeStyle.size, themeStyle.color);\n }\n Style.prototype.fromTheme_1crrl9$ = function (theme, flippedAxis) {\n var hAxisTheme = theme.horizontalAxis_6taknv$(flippedAxis);\n var hAxisName = flippedAxis ? 'y' : 'x';\n var vAxisTheme = theme.verticalAxis_6taknv$(flippedAxis);\n var vAxisName = flippedAxis ? 'x' : 'y';\n var ts = Style$fromTheme$ts;\n var textStyles = mapOf([to(this.PLOT_TITLE, ts(theme.plot().titleStyle())), to(this.PLOT_SUBTITLE, ts(theme.plot().subtitleStyle())), to(this.PLOT_CAPTION, ts(theme.plot().captionStyle())), to(this.LEGEND_TITLE, ts(theme.legend().titleStyle())), to(this.LEGEND_ITEM, ts(theme.legend().textStyle())), to(this.AXIS_TITLE + '-' + hAxisName, ts(hAxisTheme.titleStyle())), to(this.AXIS_TEXT + '-' + hAxisName, ts(hAxisTheme.labelStyle())), to(this.AXIS_TOOLTIP_TEXT + '-' + hAxisName, ts(hAxisTheme.tooltipTextStyle())), to(this.AXIS_TITLE + '-' + vAxisName, ts(vAxisTheme.titleStyle())), to(this.AXIS_TEXT + '-' + vAxisName, ts(vAxisTheme.labelStyle())), to(this.AXIS_TOOLTIP_TEXT + '-' + vAxisName, ts(vAxisTheme.tooltipTextStyle())), to('facet-strip-text-x', ts(theme.facets().stripTextStyle())), to('facet-strip-text-y', ts(theme.facets().stripTextStyle())), to(this.TOOLTIP_TEXT, ts(theme.tooltips().textStyle())), to(this.TOOLTIP_TITLE, ts(theme.tooltips().titleStyle())), to(this.TOOLTIP_LABEL, ts(theme.tooltips().labelStyle()))]);\n return new StyleSheet(textStyles, Defaults_getInstance().FONT_FAMILY_NORMAL);\n };\n Style.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Style',\n interfaces: []\n };\n var Style_instance = null;\n function Style_getInstance() {\n if (Style_instance === null) {\n new Style();\n }\n return Style_instance;\n }\n function TextWidthEstimator() {\n TextWidthEstimator_instance = this;\n this.DEFAULT_CHAR_WIDTH_0 = 12.327791262135923;\n this.DEFAULT_FAMILY_0 = 'Lucida Grande';\n this.DEFAULT_FONT_SIZE_0 = 14;\n this.MISCLASSIFIED_0 = listOf_0([toBoxedChar(45), toBoxedChar(47), toBoxedChar(92), toBoxedChar(124)]);\n this.CLUSTERS_0 = listOf_0([listOf_0([toBoxedChar(32), toBoxedChar(184), toBoxedChar(183), toBoxedChar(341), toBoxedChar(180), toBoxedChar(179), toBoxedChar(178), toBoxedChar(343), toBoxedChar(176), toBoxedChar(345), toBoxedChar(170), toBoxedChar(168), toBoxedChar(166), toBoxedChar(185), toBoxedChar(355), toBoxedChar(123), toBoxedChar(357), toBoxedChar(359), toBoxedChar(116), toBoxedChar(114), toBoxedChar(108), toBoxedChar(106), toBoxedChar(105), toBoxedChar(102), toBoxedChar(96), toBoxedChar(93), toBoxedChar(125), toBoxedChar(186), toBoxedChar(1110), toBoxedChar(239), toBoxedChar(238), toBoxedChar(237), toBoxedChar(236), toBoxedChar(296), toBoxedChar(297), toBoxedChar(298), toBoxedChar(299), toBoxedChar(300), toBoxedChar(301), toBoxedChar(302), toBoxedChar(303), toBoxedChar(1107), toBoxedChar(304), toBoxedChar(309), toBoxedChar(314), toBoxedChar(316), toBoxedChar(318), toBoxedChar(320), toBoxedChar(322), toBoxedChar(207), toBoxedChar(206), toBoxedChar(205), toBoxedChar(204), toBoxedChar(1112), toBoxedChar(1111), toBoxedChar(305), toBoxedChar(91), toBoxedChar(161), toBoxedChar(44), toBoxedChar(46), toBoxedChar(73), toBoxedChar(41), toBoxedChar(40), toBoxedChar(39), toBoxedChar(1031), toBoxedChar(1030), toBoxedChar(34), toBoxedChar(33), toBoxedChar(74), toBoxedChar(1075), toBoxedChar(539), toBoxedChar(58), toBoxedChar(567), toBoxedChar(383), toBoxedChar(59)]), plus(this.MISCLASSIFIED_0, listOf_0([toBoxedChar(463), toBoxedChar(328), toBoxedChar(311), toBoxedChar(326), toBoxedChar(312), toBoxedChar(1118), toBoxedChar(313), toBoxedChar(523), toBoxedChar(315), toBoxedChar(529), toBoxedChar(317), toBoxedChar(324), toBoxedChar(1119), toBoxedChar(449), toBoxedChar(451), toBoxedChar(319), toBoxedChar(464), toBoxedChar(321), toBoxedChar(537), toBoxedChar(531), toBoxedChar(1080), toBoxedChar(307), toBoxedChar(263), toBoxedChar(1171), toBoxedChar(265), toBoxedChar(267), toBoxedChar(1169), toBoxedChar(269), toBoxedChar(1168), toBoxedChar(273), toBoxedChar(275), toBoxedChar(277), toBoxedChar(279), toBoxedChar(1160), toBoxedChar(281), toBoxedChar(283), toBoxedChar(285), toBoxedChar(287), toBoxedChar(289), toBoxedChar(496), toBoxedChar(507), toBoxedChar(291), toBoxedChar(293), toBoxedChar(295), toBoxedChar(511), toBoxedChar(520), toBoxedChar(521), toBoxedChar(522), toBoxedChar(1116), toBoxedChar(308), toBoxedChar(1115), toBoxedChar(335), toBoxedChar(448), toBoxedChar(1094), toBoxedChar(1072), toBoxedChar(1093), toBoxedChar(361), toBoxedChar(1091), toBoxedChar(1073), toBoxedChar(363), toBoxedChar(1074), toBoxedChar(1090), toBoxedChar(365), toBoxedChar(1089), toBoxedChar(367), toBoxedChar(1088), toBoxedChar(369), toBoxedChar(1076), toBoxedChar(1077), toBoxedChar(1087), toBoxedChar(371), toBoxedChar(1079), toBoxedChar(1086), toBoxedChar(1085), toBoxedChar(375), toBoxedChar(1083), toBoxedChar(1082), toBoxedChar(378), toBoxedChar(1081), toBoxedChar(382), toBoxedChar(402), toBoxedChar(331), toBoxedChar(1047), toBoxedChar(407), toBoxedChar(333), toBoxedChar(380), toBoxedChar(337), toBoxedChar(1109), toBoxedChar(1108), toBoxedChar(564), toBoxedChar(566), toBoxedChar(585), toBoxedChar(429), toBoxedChar(427), toBoxedChar(1106), toBoxedChar(426), toBoxedChar(589), toBoxedChar(1027), toBoxedChar(1105), toBoxedChar(1032), toBoxedChar(347), toBoxedChar(1103), toBoxedChar(1043), toBoxedChar(349), toBoxedChar(1101), toBoxedChar(351), toBoxedChar(1100), toBoxedChar(353), toBoxedChar(410), toBoxedChar(261), toBoxedChar(1095), toBoxedChar(406), toBoxedChar(259), toBoxedChar(1161), toBoxedChar(57), toBoxedChar(163), toBoxedChar(164), toBoxedChar(165), toBoxedChar(167), toBoxedChar(171), toBoxedChar(175), toBoxedChar(177), toBoxedChar(181), toBoxedChar(182), toBoxedChar(162), toBoxedChar(187), toBoxedChar(191), toBoxedChar(56), toBoxedChar(1216), toBoxedChar(55), toBoxedChar(54), toBoxedChar(53), toBoxedChar(1197), toBoxedChar(52), toBoxedChar(51), toBoxedChar(1231), toBoxedChar(122), toBoxedChar(121), toBoxedChar(120), toBoxedChar(1271), toBoxedChar(1275), toBoxedChar(70), toBoxedChar(63), toBoxedChar(94), toBoxedChar(95), toBoxedChar(97), toBoxedChar(98), toBoxedChar(99), toBoxedChar(100), toBoxedChar(101), toBoxedChar(103), toBoxedChar(104), toBoxedChar(107), toBoxedChar(110), toBoxedChar(111), toBoxedChar(112), toBoxedChar(113), toBoxedChar(115), toBoxedChar(117), toBoxedChar(118), toBoxedChar(50), toBoxedChar(49), toBoxedChar(76), toBoxedChar(243), toBoxedChar(233), toBoxedChar(234), toBoxedChar(42), toBoxedChar(235), toBoxedChar(255), toBoxedChar(240), toBoxedChar(241), toBoxedChar(254), toBoxedChar(242), toBoxedChar(232), toBoxedChar(253), toBoxedChar(1181), toBoxedChar(251), toBoxedChar(244), toBoxedChar(245), toBoxedChar(246), toBoxedChar(250), toBoxedChar(247), toBoxedChar(36), toBoxedChar(248), toBoxedChar(252), toBoxedChar(231), toBoxedChar(249), toBoxedChar(223), toBoxedChar(257), toBoxedChar(48), toBoxedChar(229), toBoxedChar(227), toBoxedChar(228), toBoxedChar(1179), toBoxedChar(224), toBoxedChar(226), toBoxedChar(225)])), listOf_0([toBoxedChar(1325), toBoxedChar(1040), toBoxedChar(1041), toBoxedChar(1025), toBoxedChar(1042), toBoxedChar(1277), toBoxedChar(494), toBoxedChar(501), toBoxedChar(576), toBoxedChar(1038), toBoxedChar(577), toBoxedChar(1279), toBoxedChar(591), toBoxedChar(1287), toBoxedChar(1281), toBoxedChar(1293), toBoxedChar(505), toBoxedChar(587), toBoxedChar(1036), toBoxedChar(1028), toBoxedChar(1280), toBoxedChar(1297), toBoxedChar(495), toBoxedChar(584), toBoxedChar(583), toBoxedChar(578), toBoxedChar(1029), toBoxedChar(1296), toBoxedChar(527), toBoxedChar(575), toBoxedChar(553), toBoxedChar(551), toBoxedChar(549), toBoxedChar(548), toBoxedChar(547), toBoxedChar(546), toBoxedChar(1044), toBoxedChar(543), toBoxedChar(540), toBoxedChar(538), toBoxedChar(536), toBoxedChar(535), toBoxedChar(533), toBoxedChar(525), toBoxedChar(541), toBoxedChar(555), toBoxedChar(557), toBoxedChar(559), toBoxedChar(1321), toBoxedChar(574), toBoxedChar(513), toBoxedChar(515), toBoxedChar(573), toBoxedChar(572), toBoxedChar(517), toBoxedChar(519), toBoxedChar(1299), toBoxedChar(1319), toBoxedChar(1307), toBoxedChar(1311), toBoxedChar(563), toBoxedChar(1317), toBoxedChar(561), toBoxedChar(506), toBoxedChar(1176), toBoxedChar(1084), toBoxedChar(1274), toBoxedChar(1187), toBoxedChar(1193), toBoxedChar(1195), toBoxedChar(1196), toBoxedChar(1198), toBoxedChar(1199), toBoxedChar(1200), toBoxedChar(1185), toBoxedChar(1201), toBoxedChar(1205), toBoxedChar(1207), toBoxedChar(1209), toBoxedChar(1211), toBoxedChar(1117), toBoxedChar(1213), toBoxedChar(1215), toBoxedChar(1203), toBoxedChar(1183), toBoxedChar(1123), toBoxedChar(1182), toBoxedChar(1173), toBoxedChar(1178), toBoxedChar(1170), toBoxedChar(1167), toBoxedChar(1165), toBoxedChar(1164), toBoxedChar(1163), toBoxedChar(493), toBoxedChar(1154), toBoxedChar(1153), toBoxedChar(1143), toBoxedChar(1141), toBoxedChar(1139), toBoxedChar(1135), toBoxedChar(1134), toBoxedChar(1127), toBoxedChar(1180), toBoxedChar(1220), toBoxedChar(1045), toBoxedChar(1222), toBoxedChar(1226), toBoxedChar(1267), toBoxedChar(1269), toBoxedChar(1071), toBoxedChar(1069), toBoxedChar(1068), toBoxedChar(1063), toBoxedChar(1061), toBoxedChar(1265), toBoxedChar(1059), toBoxedChar(1057), toBoxedChar(1056), toBoxedChar(1055), toBoxedChar(1053), toBoxedChar(1270), toBoxedChar(1051), toBoxedChar(1050), toBoxedChar(1058), toBoxedChar(1263), toBoxedChar(1261), toBoxedChar(1259), toBoxedChar(1228), toBoxedChar(1233), toBoxedChar(1235), toBoxedChar(1239), toBoxedChar(1104), toBoxedChar(1241), toBoxedChar(1243), toBoxedChar(1098), toBoxedChar(1246), toBoxedChar(1247), toBoxedChar(1248), toBoxedChar(1177), toBoxedChar(1249), toBoxedChar(1251), toBoxedChar(1253), toBoxedChar(1255), toBoxedChar(1257), toBoxedChar(1224), toBoxedChar(491), toBoxedChar(1327), toBoxedChar(489), toBoxedChar(432), toBoxedChar(430), toBoxedChar(222), toBoxedChar(356), toBoxedChar(358), toBoxedChar(425), toBoxedChar(172), toBoxedChar(360), toBoxedChar(221), toBoxedChar(192), toBoxedChar(362), toBoxedChar(193), toBoxedChar(421), toBoxedChar(364), toBoxedChar(424), toBoxedChar(194), toBoxedChar(354), toBoxedChar(352), toBoxedChar(88), toBoxedChar(441), toBoxedChar(440), toBoxedChar(346), toBoxedChar(89), toBoxedChar(348), toBoxedChar(256), toBoxedChar(90), toBoxedChar(438), toBoxedChar(437), toBoxedChar(436), toBoxedChar(258), toBoxedChar(350), toBoxedChar(126), toBoxedChar(439), toBoxedChar(217), toBoxedChar(366), toBoxedChar(195), toBoxedChar(381), toBoxedChar(401), toBoxedChar(384), toBoxedChar(400), toBoxedChar(209), toBoxedChar(397), toBoxedChar(203), toBoxedChar(396), toBoxedChar(395), toBoxedChar(386), toBoxedChar(387), toBoxedChar(388), toBoxedChar(215), toBoxedChar(389), toBoxedChar(218), toBoxedChar(417), toBoxedChar(379), toBoxedChar(377), toBoxedChar(368), toBoxedChar(196), toBoxedChar(370), toBoxedChar(220), toBoxedChar(197), toBoxedChar(219), toBoxedChar(202), toBoxedChar(414), toBoxedChar(374), toBoxedChar(411), toBoxedChar(409), toBoxedChar(200), toBoxedChar(376), toBoxedChar(201), toBoxedChar(199), toBoxedChar(443), toBoxedChar(442), toBoxedChar(444), toBoxedChar(271), toBoxedChar(470), toBoxedChar(344), toBoxedChar(67), toBoxedChar(472), toBoxedChar(310), toBoxedChar(474), toBoxedChar(66), toBoxedChar(476), toBoxedChar(274), toBoxedChar(477), toBoxedChar(276), toBoxedChar(65), toBoxedChar(69), toBoxedChar(479), toBoxedChar(278), toBoxedChar(280), toBoxedChar(282), toBoxedChar(481), toBoxedChar(61), toBoxedChar(60), toBoxedChar(294), toBoxedChar(292), toBoxedChar(43), toBoxedChar(38), toBoxedChar(485), toBoxedChar(487), toBoxedChar(35), toBoxedChar(62), toBoxedChar(323), toBoxedChar(392), toBoxedChar(325), toBoxedChar(450), toBoxedChar(340), toBoxedChar(260), toBoxedChar(446), toBoxedChar(84), toBoxedChar(86), toBoxedChar(468), toBoxedChar(83), toBoxedChar(262), toBoxedChar(82), toBoxedChar(445), toBoxedChar(85), toBoxedChar(266), toBoxedChar(264), toBoxedChar(80), toBoxedChar(268), toBoxedChar(78), toBoxedChar(342), toBoxedChar(329), toBoxedChar(462), toBoxedChar(75), toBoxedChar(466), toBoxedChar(327), toBoxedChar(72), toBoxedChar(457), toBoxedChar(447)]), listOf_0([toBoxedChar(1146), toBoxedChar(286), toBoxedChar(1186), toBoxedChar(1147), toBoxedChar(1175), toBoxedChar(1149), toBoxedChar(1151), toBoxedChar(1152), toBoxedChar(284), toBoxedChar(1172), toBoxedChar(1162), toBoxedChar(230), toBoxedChar(270), toBoxedChar(1166), toBoxedChar(1184), toBoxedChar(272), toBoxedChar(1223), toBoxedChar(1192), toBoxedChar(1260), toBoxedChar(1262), toBoxedChar(1264), toBoxedChar(1266), toBoxedChar(81), toBoxedChar(1268), toBoxedChar(79), toBoxedChar(1273), toBoxedChar(77), toBoxedChar(1276), toBoxedChar(1278), toBoxedChar(71), toBoxedChar(68), toBoxedChar(1285), toBoxedChar(1286), toBoxedChar(1292), toBoxedChar(1294), toBoxedChar(1324), toBoxedChar(1320), toBoxedChar(1318), toBoxedChar(1316), toBoxedChar(1315), toBoxedChar(1310), toBoxedChar(1258), toBoxedChar(1309), toBoxedChar(1305), toBoxedChar(1303), toBoxedChar(1302), toBoxedChar(1301), toBoxedChar(1298), toBoxedChar(1295), toBoxedChar(1306), toBoxedChar(1256), toBoxedChar(1254), toBoxedChar(1252), toBoxedChar(1214), toBoxedChar(1212), toBoxedChar(1210), toBoxedChar(1208), toBoxedChar(1206), toBoxedChar(208), toBoxedChar(1218), toBoxedChar(1202), toBoxedChar(211), toBoxedChar(212), toBoxedChar(213), toBoxedChar(214), toBoxedChar(1194), toBoxedChar(216), toBoxedChar(210), toBoxedChar(1189), toBoxedChar(1219), toBoxedChar(1142), toBoxedChar(1250), toBoxedChar(109), toBoxedChar(119), toBoxedChar(1245), toBoxedChar(169), toBoxedChar(1242), toBoxedChar(1221), toBoxedChar(1240), toBoxedChar(1238), toBoxedChar(1234), toBoxedChar(1232), toBoxedChar(1230), toBoxedChar(1227), toBoxedChar(1225), toBoxedChar(174), toBoxedChar(288), toBoxedChar(1122), toBoxedChar(290), toBoxedChar(552), toBoxedChar(554), toBoxedChar(556), toBoxedChar(558), toBoxedChar(560), toBoxedChar(562), toBoxedChar(565), toBoxedChar(570), toBoxedChar(571), toBoxedChar(435), toBoxedChar(434), toBoxedChar(433), toBoxedChar(579), toBoxedChar(580), toBoxedChar(550), toBoxedChar(581), toBoxedChar(431), toBoxedChar(586), toBoxedChar(428), toBoxedChar(1140), toBoxedChar(588), toBoxedChar(590), toBoxedChar(1024), toBoxedChar(423), toBoxedChar(1026), toBoxedChar(422), toBoxedChar(420), toBoxedChar(419), toBoxedChar(1035), toBoxedChar(416), toBoxedChar(582), toBoxedChar(1037), toBoxedChar(456), toBoxedChar(544), toBoxedChar(492), toBoxedChar(488), toBoxedChar(486), toBoxedChar(500), toBoxedChar(484), toBoxedChar(503), toBoxedChar(504), toBoxedChar(509), toBoxedChar(510), toBoxedChar(480), toBoxedChar(512), toBoxedChar(514), toBoxedChar(1326), toBoxedChar(516), toBoxedChar(545), toBoxedChar(518), toBoxedChar(473), toBoxedChar(524), toBoxedChar(471), toBoxedChar(526), toBoxedChar(528), toBoxedChar(469), toBoxedChar(530), toBoxedChar(532), toBoxedChar(467), toBoxedChar(534), toBoxedChar(465), toBoxedChar(461), toBoxedChar(460), toBoxedChar(542), toBoxedChar(475), toBoxedChar(415), toBoxedChar(478), toBoxedChar(490), toBoxedChar(1062), toBoxedChar(394), toBoxedChar(1125), toBoxedChar(1126), toBoxedChar(1066), toBoxedChar(306), toBoxedChar(393), toBoxedChar(1039), toBoxedChar(1102), toBoxedChar(1130), toBoxedChar(1121), toBoxedChar(1097), toBoxedChar(391), toBoxedChar(1096), toBoxedChar(390), toBoxedChar(385), toBoxedChar(1078), toBoxedChar(373), toBoxedChar(1131), toBoxedChar(1092), toBoxedChar(1099), toBoxedChar(398), toBoxedChar(1060), toBoxedChar(336), toBoxedChar(413), toBoxedChar(1138), toBoxedChar(408), toBoxedChar(330), toBoxedChar(1114), toBoxedChar(1048), toBoxedChar(399), toBoxedChar(404), toBoxedChar(1049), toBoxedChar(1113), toBoxedChar(332), toBoxedChar(1137), toBoxedChar(1052), toBoxedChar(1136), toBoxedChar(1054), toBoxedChar(334), toBoxedChar(403), toBoxedChar(1129)]), listOf_0([toBoxedChar(1128), toBoxedChar(1291), toBoxedChar(1290), toBoxedChar(1289), toBoxedChar(1124), toBoxedChar(1288), toBoxedChar(64), toBoxedChar(198), toBoxedChar(1132), toBoxedChar(1144), toBoxedChar(1323), toBoxedChar(1322), toBoxedChar(37), toBoxedChar(1145), toBoxedChar(497), toBoxedChar(498), toBoxedChar(499), toBoxedChar(1314), toBoxedChar(1313), toBoxedChar(1312), toBoxedChar(502), toBoxedChar(1148), toBoxedChar(1133), toBoxedChar(1308), toBoxedChar(483), toBoxedChar(482), toBoxedChar(1304), toBoxedChar(1150), toBoxedChar(1300), toBoxedChar(508), toBoxedChar(459), toBoxedChar(1284), toBoxedChar(1244), toBoxedChar(1065), toBoxedChar(1064), toBoxedChar(1236), toBoxedChar(188), toBoxedChar(189), toBoxedChar(190), toBoxedChar(1067), toBoxedChar(1204), toBoxedChar(405), toBoxedChar(418), toBoxedChar(1033), toBoxedChar(1034), toBoxedChar(1046), toBoxedChar(412), toBoxedChar(1217), toBoxedChar(1229), toBoxedChar(1120), toBoxedChar(1191), toBoxedChar(1070), toBoxedChar(1283), toBoxedChar(1282), toBoxedChar(1174), toBoxedChar(338), toBoxedChar(339), toBoxedChar(1272), toBoxedChar(458), toBoxedChar(1190), toBoxedChar(455), toBoxedChar(453), toBoxedChar(452), toBoxedChar(372), toBoxedChar(87), toBoxedChar(1188), toBoxedChar(568), toBoxedChar(569), toBoxedChar(454), toBoxedChar(1237)])]);\n var $receiver = this.CLUSTERS_0;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$, tmp$_0;\n var index = 0;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n var tmp$_1 = destination.add_11rb$;\n var id = checkIndexOverflow((tmp$_0 = index, index = tmp$_0 + 1 | 0, tmp$_0));\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(item, 10));\n var tmp$_2;\n tmp$_2 = item.iterator();\n while (tmp$_2.hasNext()) {\n var item_0 = tmp$_2.next();\n destination_0.add_11rb$(new Pair(id, item_0));\n }\n tmp$_1.call(destination, destination_0);\n }\n var $receiver_0 = flatten(destination);\n var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault($receiver_0, 10)), 16);\n var destination_1 = LinkedHashMap_init_0(capacity);\n var tmp$_3;\n tmp$_3 = $receiver_0.iterator();\n while (tmp$_3.hasNext()) {\n var element = tmp$_3.next();\n var pair = to(element.second, element.first);\n destination_1.put_xwzc9p$(pair.first, pair.second);\n }\n this.CLUSTERING_0 = destination_1;\n this.CLUSTER_WIDTH_0 = listOf_0([6.440506329113925, 10.181218274111677, 12.583512544802868, 14.536683417085428, 17.714285714285715]);\n this.FAMILY_COEFFICIENT_0 = mapOf([to('Arial', 0.08777509389956582), to('Calibri', -0.7568924686338481), to('Garamond', -1.2341292120659895), to('Geneva', 0.08777509389956582), to('Georgia', 0.06628876951083008), to('Helvetica', 0.08777509389956582), to('Lucida Grande', 0.08777509389956582), to('Rockwell', 0.41710660522332965), to('Times New Roman', -1.2007569745330333), to('Verdana', 1.3042084025015728)]);\n this.SIZE_COEFFICIENT_0 = 0.9843304096547842;\n }\n TextWidthEstimator.prototype.getCharWidth_0 = function (char) {\n var $receiver = this.CLUSTERING_0;\n var key = toBoxedChar(char);\n var tmp$;\n var clusterId = (tmp$ = $receiver.get_11rb$(key)) != null ? tmp$ : -1;\n return clusterId !== -1 ? this.CLUSTER_WIDTH_0.get_za3lpa$(clusterId) : this.DEFAULT_CHAR_WIDTH_0;\n };\n TextWidthEstimator.prototype.getFamilyAdditive_0 = function (font) {\n var tmp$, tmp$_0;\n var fontFamily = font.family.toString();\n var defaultFamilyCoefficient = (tmp$ = this.FAMILY_COEFFICIENT_0.get_11rb$(this.DEFAULT_FAMILY_0)) != null ? tmp$ : 0.0;\n return (tmp$_0 = this.FAMILY_COEFFICIENT_0.get_11rb$(fontFamily)) != null ? tmp$_0 : defaultFamilyCoefficient;\n };\n TextWidthEstimator.prototype.getFaceAdditive_0 = function (font) {\n var tmp$;\n if (font.isBold && font.isItalic)\n tmp$ = 0.9172120995070999;\n else if (font.isBold && !font.isItalic)\n tmp$ = 0.6908238890181602;\n else if (!font.isBold && font.isItalic)\n tmp$ = 0.1783188620736738;\n else\n tmp$ = 0.0;\n return tmp$;\n };\n TextWidthEstimator.prototype.getSizeCoefficient_0 = function (font) {\n return this.SIZE_COEFFICIENT_0 * font.size / 14;\n };\n TextWidthEstimator.prototype.correctPrediction_0 = function (predictedWidth, textLength, font) {\n return (predictedWidth + textLength * (this.getFamilyAdditive_0(font) + this.getFaceAdditive_0(font))) * this.getSizeCoefficient_0(font);\n };\n TextWidthEstimator.prototype.textWidth_d91ba$ = function (text, font) {\n if (text.length === 0)\n return 0.0;\n var transform = getCallableRef('getCharWidth', function ($receiver, p1) {\n return $receiver.getCharWidth_0(unboxChar(p1));\n }.bind(null, this));\n var destination = ArrayList_init_0(text.length);\n var tmp$;\n tmp$ = iterator(text);\n while (tmp$.hasNext()) {\n var item = unboxChar(tmp$.next());\n destination.add_11rb$(transform(toBoxedChar(item)));\n }\n return this.correctPrediction_0(sum_0(destination), text.length, font);\n };\n TextWidthEstimator.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'TextWidthEstimator',\n interfaces: []\n };\n var TextWidthEstimator_instance = null;\n function TextWidthEstimator_getInstance() {\n if (TextWidthEstimator_instance === null) {\n new TextWidthEstimator();\n }\n return TextWidthEstimator_instance;\n }\n function GroupAwareSampling() {\n }\n GroupAwareSampling.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'GroupAwareSampling',\n interfaces: [Sampling]\n };\n function PointSampling() {\n }\n PointSampling.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'PointSampling',\n interfaces: [Sampling]\n };\n function Sampling() {\n }\n Sampling.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'Sampling',\n interfaces: []\n };\n function Samplings() {\n Samplings_instance = this;\n this.RANDOM = RandomSampling$Companion_getInstance().ALIAS;\n this.PICK = PickSampling$Companion_getInstance().ALIAS;\n this.SYSTEMATIC = SystematicSampling$Companion_getInstance().ALIAS;\n this.RANDOM_GROUP = GroupRandomSampling$Companion_getInstance().ALIAS;\n this.SYSTEMATIC_GROUP = GroupSystematicSampling$Companion_getInstance().ALIAS;\n this.RANDOM_STRATIFIED = RandomStratifiedSampling$Companion_getInstance().ALIAS_8be2vx$;\n this.VERTEX_VW = VertexSampling$VertexVwSampling$Companion_getInstance().ALIAS;\n this.VERTEX_DP = VertexSampling$VertexDpSampling$Companion_getInstance().ALIAS;\n this.NONE = new Samplings$NoneSampling();\n }\n Samplings.prototype.random_280ow0$ = function (sampleSize, seed) {\n return new RandomSampling(sampleSize, seed);\n };\n Samplings.prototype.pick_za3lpa$ = function (sampleSize) {\n return new PickSampling(sampleSize);\n };\n Samplings.prototype.vertexDp_za3lpa$ = function (sampleSize) {\n return new VertexSampling$VertexDpSampling(sampleSize);\n };\n Samplings.prototype.vertexVw_za3lpa$ = function (sampleSize) {\n return new VertexSampling$VertexVwSampling(sampleSize);\n };\n Samplings.prototype.systematic_za3lpa$ = function (sampleSize) {\n return new SystematicSampling(sampleSize);\n };\n Samplings.prototype.randomGroup_280ow0$ = function (sampleSize, seed) {\n return new GroupRandomSampling(sampleSize, seed);\n };\n Samplings.prototype.systematicGroup_za3lpa$ = function (sampleSize) {\n return new GroupSystematicSampling(sampleSize);\n };\n Samplings.prototype.randomStratified_vcwos1$ = function (sampleSize, seed, minSubSample) {\n return new RandomStratifiedSampling(sampleSize, seed, minSubSample);\n };\n function Samplings$NoneSampling() {\n }\n Object.defineProperty(Samplings$NoneSampling.prototype, 'expressionText', {\n configurable: true,\n get: function () {\n return 'none';\n }\n });\n Samplings$NoneSampling.prototype.isApplicable_dhhkv7$ = function (population) {\n return false;\n };\n Samplings$NoneSampling.prototype.apply_dhhkv7$ = function (population) {\n return population;\n };\n Samplings$NoneSampling.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'NoneSampling',\n interfaces: [PointSampling]\n };\n Samplings.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Samplings',\n interfaces: []\n };\n var Samplings_instance = null;\n function Samplings_getInstance() {\n if (Samplings_instance === null) {\n new Samplings();\n }\n return Samplings_instance;\n }\n function GroupRandomSampling(sampleSize, mySeed) {\n GroupRandomSampling$Companion_getInstance();\n GroupSamplingBase.call(this, sampleSize);\n this.mySeed_0 = mySeed;\n }\n Object.defineProperty(GroupRandomSampling.prototype, 'expressionText', {\n configurable: true,\n get: function () {\n return 'sampling_' + GroupRandomSampling$Companion_getInstance().ALIAS + '(' + 'n=' + toString(this.sampleSize) + (this.mySeed_0 != null ? ', seed=' + toString(this.mySeed_0) : '') + ')';\n }\n });\n GroupRandomSampling.prototype.apply_se5qvl$ = function (population, groupMapper) {\n if (!this.isApplicable_se5qvl$(population, groupMapper)) {\n var message = 'Failed requirement.';\n throw IllegalArgumentException_init(message.toString());\n }\n var distinctGroups = SamplingUtil_getInstance().distinctGroups_ejae6o$(groupMapper, population.rowCount());\n shuffle(distinctGroups, this.createRandom_0());\n var pickedGroups = toSet(take(distinctGroups, this.sampleSize));\n return this.doSelect_z69lec$(population, pickedGroups, groupMapper);\n };\n GroupRandomSampling.prototype.createRandom_0 = function () {\n var tmp$, tmp$_0;\n return (tmp$_0 = (tmp$ = this.mySeed_0) != null ? Random(tmp$) : null) != null ? tmp$_0 : Random_0.Default;\n };\n function GroupRandomSampling$Companion() {\n GroupRandomSampling$Companion_instance = this;\n this.ALIAS = 'group_random';\n }\n GroupRandomSampling$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var GroupRandomSampling$Companion_instance = null;\n function GroupRandomSampling$Companion_getInstance() {\n if (GroupRandomSampling$Companion_instance === null) {\n new GroupRandomSampling$Companion();\n }\n return GroupRandomSampling$Companion_instance;\n }\n GroupRandomSampling.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GroupRandomSampling',\n interfaces: [GroupSamplingBase]\n };\n function GroupSamplingBase(sampleSize) {\n SamplingBase.call(this, sampleSize);\n }\n GroupSamplingBase.prototype.isApplicable_se5qvl$ = function (population, groupMapper) {\n return this.isApplicable_ijg2gx$(population, groupMapper, SamplingUtil_getInstance().groupCount_ejae6o$(groupMapper, population.rowCount()));\n };\n GroupSamplingBase.prototype.isApplicable_ijg2gx$ = function (population, groupMapper, groupCount) {\n return groupCount > this.sampleSize;\n };\n GroupSamplingBase.prototype.doSelect_z69lec$ = function (population, pickedGroups, groupMapper) {\n var tmp$;\n var indicesByGroup = GroupUtil_getInstance().indicesByGroup_wc9gac$(population.rowCount(), groupMapper);\n var pickedIndices = ArrayList_init();\n tmp$ = pickedGroups.iterator();\n while (tmp$.hasNext()) {\n var group = tmp$.next();\n pickedIndices.addAll_brywnq$(ensureNotNull(indicesByGroup.get_11rb$(group)));\n }\n return population.selectIndices_pqoyrt$(pickedIndices);\n };\n GroupSamplingBase.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GroupSamplingBase',\n interfaces: [GroupAwareSampling, SamplingBase]\n };\n function GroupSystematicSampling(sampleSize) {\n GroupSystematicSampling$Companion_getInstance();\n GroupSamplingBase.call(this, sampleSize);\n }\n Object.defineProperty(GroupSystematicSampling.prototype, 'expressionText', {\n configurable: true,\n get: function () {\n return 'sampling_' + GroupSystematicSampling$Companion_getInstance().ALIAS + '(' + 'n=' + toString(this.sampleSize) + ')';\n }\n });\n GroupSystematicSampling.prototype.isApplicable_ijg2gx$ = function (population, groupMapper, groupCount) {\n return GroupSamplingBase.prototype.isApplicable_ijg2gx$.call(this, population, groupMapper, groupCount) && SystematicSampling$Companion_getInstance().computeStep_vux9f0$(groupCount, this.sampleSize) >= 2;\n };\n GroupSystematicSampling.prototype.apply_se5qvl$ = function (population, groupMapper) {\n if (!this.isApplicable_se5qvl$(population, groupMapper)) {\n var message = 'Failed requirement.';\n throw IllegalArgumentException_init(message.toString());\n }\n var distinctGroups = SamplingUtil_getInstance().distinctGroups_ejae6o$(groupMapper, population.rowCount());\n var step = SystematicSampling$Companion_getInstance().computeStep_vux9f0$(distinctGroups.size, this.sampleSize);\n var pickedGroups = HashSet_init_0();\n var i = 0;\n while (i < distinctGroups.size) {\n pickedGroups.add_11rb$(distinctGroups.get_za3lpa$(i));\n i = i + step | 0;\n }\n return this.doSelect_z69lec$(population, pickedGroups, groupMapper);\n };\n function GroupSystematicSampling$Companion() {\n GroupSystematicSampling$Companion_instance = this;\n this.ALIAS = 'group_systematic';\n }\n GroupSystematicSampling$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var GroupSystematicSampling$Companion_instance = null;\n function GroupSystematicSampling$Companion_getInstance() {\n if (GroupSystematicSampling$Companion_instance === null) {\n new GroupSystematicSampling$Companion();\n }\n return GroupSystematicSampling$Companion_instance;\n }\n GroupSystematicSampling.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GroupSystematicSampling',\n interfaces: [GroupSamplingBase]\n };\n function PickSampling(sampleSize) {\n PickSampling$Companion_getInstance();\n SamplingBase.call(this, sampleSize);\n }\n Object.defineProperty(PickSampling.prototype, 'expressionText', {\n configurable: true,\n get: function () {\n return 'sampling_' + PickSampling$Companion_getInstance().ALIAS + '(' + 'n=' + toString(this.sampleSize) + ')';\n }\n });\n PickSampling.prototype.apply_dhhkv7$ = function (population) {\n if (!this.isApplicable_dhhkv7$(population)) {\n var message = 'Failed requirement.';\n throw IllegalArgumentException_init(message.toString());\n }\n var xVar = SamplingUtil_getInstance().xVar_dhhkv7$(population);\n var xFactors = population.distinctValues_8xm3sj$(xVar);\n if (xFactors.size <= this.sampleSize) {\n return population;\n }\n var pickX = toSet(take(xFactors, this.sampleSize));\n var xValues = population.get_8xm3sj$(xVar);\n var pickedIndices = ArrayList_init();\n var index = 0;\n for (var tmp$ = xValues.iterator(); tmp$.hasNext(); ++index) {\n var v = tmp$.next();\n if (contains(pickX, v)) {\n pickedIndices.add_11rb$(index);\n }\n }\n return population.selectIndices_pqoyrt$(pickedIndices);\n };\n function PickSampling$Companion() {\n PickSampling$Companion_instance = this;\n this.ALIAS = 'pick';\n }\n PickSampling$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var PickSampling$Companion_instance = null;\n function PickSampling$Companion_getInstance() {\n if (PickSampling$Companion_instance === null) {\n new PickSampling$Companion();\n }\n return PickSampling$Companion_instance;\n }\n PickSampling.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PickSampling',\n interfaces: [PointSampling, SamplingBase]\n };\n function RandomSampling(sampleSize, mySeed) {\n RandomSampling$Companion_getInstance();\n SamplingBase.call(this, sampleSize);\n this.mySeed_0 = mySeed;\n }\n Object.defineProperty(RandomSampling.prototype, 'expressionText', {\n configurable: true,\n get: function () {\n return 'sampling_' + RandomSampling$Companion_getInstance().ALIAS + '(' + 'n=' + toString(this.sampleSize) + (this.mySeed_0 != null ? ', seed=' + toString(this.mySeed_0) : '') + ')';\n }\n });\n RandomSampling.prototype.apply_dhhkv7$ = function (population) {\n var tmp$, tmp$_0;\n if (!this.isApplicable_dhhkv7$(population)) {\n var message = 'Failed requirement.';\n throw IllegalArgumentException_init(message.toString());\n }\n var rand = (tmp$_0 = (tmp$ = this.mySeed_0) != null ? Random(tmp$) : null) != null ? tmp$_0 : Random_0.Default;\n return util.SamplingUtil.sampleWithoutReplacement_egh5ya$(this.sampleSize, rand, population);\n };\n function RandomSampling$Companion() {\n RandomSampling$Companion_instance = this;\n this.ALIAS = 'random';\n }\n RandomSampling$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var RandomSampling$Companion_instance = null;\n function RandomSampling$Companion_getInstance() {\n if (RandomSampling$Companion_instance === null) {\n new RandomSampling$Companion();\n }\n return RandomSampling$Companion_instance;\n }\n RandomSampling.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'RandomSampling',\n interfaces: [PointSampling, SamplingBase]\n };\n function RandomStratifiedSampling(sampleSize, mySeed, myMinSubsampleSize) {\n RandomStratifiedSampling$Companion_getInstance();\n SamplingBase.call(this, sampleSize);\n this.mySeed_0 = mySeed;\n this.myMinSubsampleSize_0 = myMinSubsampleSize;\n }\n Object.defineProperty(RandomStratifiedSampling.prototype, 'expressionText', {\n configurable: true,\n get: function () {\n return 'sampling_' + RandomStratifiedSampling$Companion_getInstance().ALIAS_8be2vx$ + '(' + 'n=' + toString(this.sampleSize) + (this.mySeed_0 != null ? ', seed=' + toString(this.mySeed_0) : '') + (this.myMinSubsampleSize_0 != null ? ', min_subsample=' + toString(this.myMinSubsampleSize_0) : '') + ')';\n }\n });\n RandomStratifiedSampling.prototype.isApplicable_se5qvl$ = function (population, groupMapper) {\n return population.rowCount() > this.sampleSize;\n };\n function RandomStratifiedSampling$apply$lambda(closure$groupIndices) {\n return function (indexSet) {\n var $receiver = until(0, closure$groupIndices.size);\n var destination = ArrayList_init();\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n if (indexSet.contains_11rb$(element))\n destination.add_11rb$(element);\n }\n return destination;\n };\n }\n function RandomStratifiedSampling$apply$lambda_0(closure$groupIndices) {\n return function (indexSet) {\n var $receiver = until(0, closure$groupIndices.size);\n var destination = ArrayList_init();\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n if (!indexSet.contains_11rb$(element))\n destination.add_11rb$(element);\n }\n return destination;\n };\n }\n RandomStratifiedSampling.prototype.apply_se5qvl$ = function (population, groupMapper) {\n var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3;\n if (!this.isApplicable_se5qvl$(population, groupMapper)) {\n var message = 'Failed requirement.';\n throw IllegalArgumentException_init(message.toString());\n }\n var indicesByGroup = GroupUtil_getInstance().indicesByGroup_wc9gac$(population.rowCount(), groupMapper);\n var minSubSampleSize = (tmp$ = this.myMinSubsampleSize_0) != null ? tmp$ : 2;\n var b = minSubSampleSize;\n minSubSampleSize = JsMath.max(0, b);\n var popSize = population.rowCount();\n var pickIndices = ArrayList_init();\n var rand = (tmp$_1 = (tmp$_0 = this.mySeed_0) != null ? Random(tmp$_0) : null) != null ? tmp$_1 : Random_0.Default;\n tmp$_2 = indicesByGroup.keys.iterator();\n while (tmp$_2.hasNext()) {\n var group = tmp$_2.next();\n var groupIndices = ensureNotNull(indicesByGroup.get_11rb$(group));\n var stratumSize = groupIndices.size;\n var ratio = stratumSize / popSize;\n var stratumSampleSize = numberToInt(round(this.sampleSize * ratio));\n var a = stratumSampleSize;\n var b_0 = minSubSampleSize;\n stratumSampleSize = JsMath.max(a, b_0);\n if (stratumSampleSize >= stratumSize) {\n pickIndices.addAll_brywnq$(groupIndices);\n } else {\n var sampleGroupIndices = util.SamplingUtil.sampleWithoutReplacement_o7ew15$(stratumSize, stratumSampleSize, rand, RandomStratifiedSampling$apply$lambda(groupIndices), RandomStratifiedSampling$apply$lambda_0(groupIndices));\n tmp$_3 = sampleGroupIndices.iterator();\n while (tmp$_3.hasNext()) {\n var i = tmp$_3.next();\n pickIndices.add_11rb$(groupIndices.get_za3lpa$(i));\n }\n }\n }\n return population.selectIndices_pqoyrt$(pickIndices);\n };\n function RandomStratifiedSampling$Companion() {\n RandomStratifiedSampling$Companion_instance = this;\n this.ALIAS_8be2vx$ = 'random_stratified';\n this.DEF_MIN_SUBSAMPLE_SIZE_0 = 2;\n }\n RandomStratifiedSampling$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var RandomStratifiedSampling$Companion_instance = null;\n function RandomStratifiedSampling$Companion_getInstance() {\n if (RandomStratifiedSampling$Companion_instance === null) {\n new RandomStratifiedSampling$Companion();\n }\n return RandomStratifiedSampling$Companion_instance;\n }\n RandomStratifiedSampling.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'RandomStratifiedSampling',\n interfaces: [GroupAwareSampling, SamplingBase]\n };\n function SamplingBase(sampleSize) {\n this.sampleSize = sampleSize;\n if (!(this.sampleSize > 0)) {\n var message = 'Sample size must be greater than zero, but was: ' + toString(this.sampleSize);\n throw IllegalStateException_init(message.toString());\n }\n }\n SamplingBase.prototype.isApplicable_dhhkv7$ = function (population) {\n return population.rowCount() > this.sampleSize;\n };\n SamplingBase.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'SamplingBase',\n interfaces: [Sampling]\n };\n var compareBy$lambda_1 = wrapFunction(function () {\n var compareValues = Kotlin.kotlin.comparisons.compareValues_s00gnj$;\n return function (closure$selector) {\n return function (a, b) {\n var selector = closure$selector;\n return compareValues(selector(a), selector(b));\n };\n };\n });\n function SamplingUtil() {\n SamplingUtil_instance = this;\n }\n SamplingUtil.prototype.groupCount_ejae6o$ = function (groupMapper, size) {\n var $receiver = until(0, size);\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n destination.add_11rb$(groupMapper(item));\n }\n return distinct(destination).size;\n };\n SamplingUtil.prototype.distinctGroups_ejae6o$ = function (groupMapper, size) {\n var $receiver = until(0, size);\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n destination.add_11rb$(groupMapper(item));\n }\n return toMutableList(distinct(destination));\n };\n SamplingUtil.prototype.xVar_bbyvt0$ = function (variables) {\n var tmp$;\n if (variables.contains_11rb$(stat.Stats.X))\n tmp$ = stat.Stats.X;\n else if (variables.contains_11rb$(data.TransformVar.X))\n tmp$ = data.TransformVar.X;\n else\n tmp$ = null;\n return tmp$;\n };\n SamplingUtil.prototype.xVar_dhhkv7$ = function (data) {\n var tmp$;\n tmp$ = this.xVar_bbyvt0$(data.variables());\n if (tmp$ == null) {\n throw IllegalStateException_init(\"Can't apply sampling: couldn't deduce the (X) variable.\");\n }\n return tmp$;\n };\n SamplingUtil.prototype.yVar_dhhkv7$ = function (data_0) {\n if (data_0.has_8xm3sj$(stat.Stats.Y)) {\n return stat.Stats.Y;\n } else if (data_0.has_8xm3sj$(data.TransformVar.Y)) {\n return data.TransformVar.Y;\n }\n throw IllegalStateException_init(\"Can't apply sampling: couldn't deduce the (Y) variable.\");\n };\n SamplingUtil.prototype.splitRings_dhhkv7$ = function (population) {\n var tmp$, tmp$_0;\n var rings = ArrayList_init();\n var lastPoint = null;\n var start = -1;\n var xValues = Kotlin.isType(tmp$ = population.get_8xm3sj$(this.xVar_dhhkv7$(population)), List) ? tmp$ : throwCCE();\n var yValues = Kotlin.isType(tmp$_0 = population.get_8xm3sj$(this.yVar_dhhkv7$(population)), List) ? tmp$_0 : throwCCE();\n var points = new VertexSampling$DoubleVectorComponentsList(xValues, yValues);\n for (var i = 0; i !== points.size; ++i) {\n var point = points.get_za3lpa$(i);\n if (start < 0) {\n start = i;\n lastPoint = point;\n } else if (equals(lastPoint, point)) {\n rings.add_11rb$(points.subList_vux9f0$(start, i + 1 | 0));\n start = -1;\n lastPoint = null;\n }\n }\n if (start >= 0) {\n rings.add_11rb$(points.subList_vux9f0$(start, points.size));\n }\n return rings;\n };\n function SamplingUtil$calculateRingLimits$lambda(closure$rings) {\n return function (it) {\n return new Pair(it, calculateArea(closure$rings.get_za3lpa$(it)));\n };\n }\n function SamplingUtil$calculateRingLimits$lambda_0(this$SamplingUtil) {\n return function (it) {\n return this$SamplingUtil.getRingArea_0(it);\n };\n }\n function SamplingUtil$calculateRingLimits$lambda_1(closure$totalArea, closure$areaProceed, closure$totalPointsLimit, closure$pointsProceed, closure$rings, this$SamplingUtil) {\n return function (p) {\n var a = roundToInt(p.second / (closure$totalArea - closure$areaProceed.get()) * (closure$totalPointsLimit - closure$pointsProceed.get() | 0));\n var b = closure$rings.get_za3lpa$(this$SamplingUtil.getRingIndex_6gxk4o$(p)).size;\n var limit = JsMath.min(a, b);\n if (limit >= 4) {\n closure$areaProceed.getAndAdd_14dthe$(this$SamplingUtil.getRingArea_0(p));\n closure$pointsProceed.getAndAdd_za3lpa$(limit);\n } else {\n limit = 0;\n }\n return new Pair(this$SamplingUtil.getRingIndex_6gxk4o$(p), limit);\n };\n }\n function SamplingUtil$calculateRingLimits$lambda_2(this$SamplingUtil) {\n return function (it) {\n return this$SamplingUtil.getRingIndex_6gxk4o$(it);\n };\n }\n function SamplingUtil$calculateRingLimits$lambda_3(this$SamplingUtil) {\n return function (it) {\n return this$SamplingUtil.getRingLimit_5q1b6w$(it);\n };\n }\n SamplingUtil.prototype.calculateRingLimits_rmr3bv$ = function (rings, totalPointsLimit) {\n var destination = ArrayList_init_0(collectionSizeOrDefault(rings, 10));\n var tmp$;\n tmp$ = rings.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n destination.add_11rb$(calculateArea(item));\n }\n var totalArea = sum_0(destination);\n var areaProceed = new MutableDouble(0.0);\n var pointsProceed = new MutableInteger(0);\n return toList_1(map(sortedWith_0(map(sortedWith_0(map(asSequence(get_indices(rings)), SamplingUtil$calculateRingLimits$lambda(rings)), reversed_0(new Comparator(compareBy$lambda_1(SamplingUtil$calculateRingLimits$lambda_0(this))))), SamplingUtil$calculateRingLimits$lambda_1(totalArea, areaProceed, totalPointsLimit, pointsProceed, rings, this)), new Comparator(compareBy$lambda_1(SamplingUtil$calculateRingLimits$lambda_2(this)))), SamplingUtil$calculateRingLimits$lambda_3(this)));\n };\n SamplingUtil.prototype.getRingIndex_6gxk4o$ = function (pair) {\n return pair.first;\n };\n SamplingUtil.prototype.getRingArea_0 = function (pair) {\n return pair.second;\n };\n SamplingUtil.prototype.getRingLimit_5q1b6w$ = function (pair) {\n return pair.second;\n };\n SamplingUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'SamplingUtil',\n interfaces: []\n };\n var SamplingUtil_instance = null;\n function SamplingUtil_getInstance() {\n if (SamplingUtil_instance === null) {\n new SamplingUtil();\n }\n return SamplingUtil_instance;\n }\n function SystematicSampling(sampleSize) {\n SystematicSampling$Companion_getInstance();\n SamplingBase.call(this, sampleSize);\n }\n Object.defineProperty(SystematicSampling.prototype, 'expressionText', {\n configurable: true,\n get: function () {\n return 'sampling_' + SystematicSampling$Companion_getInstance().ALIAS + '(' + 'n=' + toString(this.sampleSize) + ')';\n }\n });\n SystematicSampling.prototype.isApplicable_dhhkv7$ = function (population) {\n return SamplingBase.prototype.isApplicable_dhhkv7$.call(this, population) && this.computeStep_0(population.rowCount()) >= 2;\n };\n SystematicSampling.prototype.apply_dhhkv7$ = function (population) {\n if (!this.isApplicable_dhhkv7$(population)) {\n var message = 'Failed requirement.';\n throw IllegalArgumentException_init(message.toString());\n }\n var popSize = population.rowCount();\n var step = this.computeStep_0(popSize);\n var pickedIndices = ArrayList_init();\n var i = 0;\n while (i < popSize) {\n pickedIndices.add_11rb$(i);\n i = i + step | 0;\n }\n return population.selectIndices_pqoyrt$(pickedIndices);\n };\n SystematicSampling.prototype.computeStep_0 = function (popSize) {\n return numberToInt(round(popSize / (this.sampleSize - 1 | 0)));\n };\n function SystematicSampling$Companion() {\n SystematicSampling$Companion_instance = this;\n this.ALIAS = 'systematic';\n }\n SystematicSampling$Companion.prototype.computeStep_vux9f0$ = function (popSize, sampleSize) {\n return numberToInt(round((popSize - 1 | 0) / (sampleSize - 1 | 0)));\n };\n SystematicSampling$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var SystematicSampling$Companion_instance = null;\n function SystematicSampling$Companion_getInstance() {\n if (SystematicSampling$Companion_instance === null) {\n new SystematicSampling$Companion();\n }\n return SystematicSampling$Companion_instance;\n }\n SystematicSampling.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'SystematicSampling',\n interfaces: [PointSampling, SamplingBase]\n };\n function VertexSampling(sampleSize) {\n VertexSampling$Companion_getInstance();\n SamplingBase.call(this, sampleSize);\n }\n VertexSampling.prototype.simplify_0 = function (points, limit) {\n var tmp$;\n if (limit === 0) {\n tmp$ = emptyList();\n } else {\n tmp$ = this.simplifyInternal_11hmxm$(points, limit);\n }\n return tmp$;\n };\n VertexSampling.prototype.apply_dhhkv7$ = function (population) {\n if (!this.isApplicable_dhhkv7$(population)) {\n var message = 'Failed requirement.';\n throw IllegalArgumentException_init(message.toString());\n }\n var rings = SamplingUtil_getInstance().splitRings_dhhkv7$(population);\n var limits = rings.size === 1 && !isClosed(rings.get_za3lpa$(0)) ? listOf(this.sampleSize) : SamplingUtil_getInstance().calculateRingLimits_rmr3bv$(rings, this.sampleSize);\n var indices = ArrayList_init();\n var ringBase = new MutableInteger(0);\n var $receiver = until(0, limits.size);\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n destination.add_11rb$(new Pair(item, limits.get_za3lpa$(item)));\n }\n var tmp$_0;\n tmp$_0 = destination.iterator();\n while (tmp$_0.hasNext()) {\n var element = tmp$_0.next();\n var tmp$_1;\n tmp$_1 = this.simplify_0(rings.get_za3lpa$(SamplingUtil_getInstance().getRingIndex_6gxk4o$(element)), SamplingUtil_getInstance().getRingLimit_5q1b6w$(element)).iterator();\n while (tmp$_1.hasNext()) {\n var element_0 = tmp$_1.next();\n indices.add_11rb$(ringBase.get() + element_0 | 0);\n }\n ringBase.getAndAdd_za3lpa$(rings.get_za3lpa$(SamplingUtil_getInstance().getRingIndex_6gxk4o$(element)).size);\n }\n return population.selectIndices_pqoyrt$(indices);\n };\n function VertexSampling$VertexVwSampling(sampleSize) {\n VertexSampling$VertexVwSampling$Companion_getInstance();\n VertexSampling.call(this, sampleSize);\n }\n Object.defineProperty(VertexSampling$VertexVwSampling.prototype, 'expressionText', {\n configurable: true,\n get: function () {\n return 'sampling_' + VertexSampling$VertexVwSampling$Companion_getInstance().ALIAS + '(' + 'n=' + toString(this.sampleSize) + ')';\n }\n });\n VertexSampling$VertexVwSampling.prototype.simplifyInternal_11hmxm$ = function (points, limit) {\n return PolylineSimplifier.Companion.visvalingamWhyatt_ytws2g$(points).setCountLimit_za3lpa$(limit).indices;\n };\n function VertexSampling$VertexVwSampling$Companion() {\n VertexSampling$VertexVwSampling$Companion_instance = this;\n this.ALIAS = 'vertex_vw';\n }\n VertexSampling$VertexVwSampling$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var VertexSampling$VertexVwSampling$Companion_instance = null;\n function VertexSampling$VertexVwSampling$Companion_getInstance() {\n if (VertexSampling$VertexVwSampling$Companion_instance === null) {\n new VertexSampling$VertexVwSampling$Companion();\n }\n return VertexSampling$VertexVwSampling$Companion_instance;\n }\n VertexSampling$VertexVwSampling.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'VertexVwSampling',\n interfaces: [VertexSampling]\n };\n function VertexSampling$VertexDpSampling(sampleSize) {\n VertexSampling$VertexDpSampling$Companion_getInstance();\n VertexSampling.call(this, sampleSize);\n }\n Object.defineProperty(VertexSampling$VertexDpSampling.prototype, 'expressionText', {\n configurable: true,\n get: function () {\n return 'sampling_' + VertexSampling$VertexDpSampling$Companion_getInstance().ALIAS + '(' + 'n=' + toString(this.sampleSize) + ')';\n }\n });\n VertexSampling$VertexDpSampling.prototype.simplifyInternal_11hmxm$ = function (points, limit) {\n return PolylineSimplifier.Companion.douglasPeucker_ytws2g$(points).setCountLimit_za3lpa$(limit).indices;\n };\n function VertexSampling$VertexDpSampling$Companion() {\n VertexSampling$VertexDpSampling$Companion_instance = this;\n this.ALIAS = 'vertex_dp';\n }\n VertexSampling$VertexDpSampling$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var VertexSampling$VertexDpSampling$Companion_instance = null;\n function VertexSampling$VertexDpSampling$Companion_getInstance() {\n if (VertexSampling$VertexDpSampling$Companion_instance === null) {\n new VertexSampling$VertexDpSampling$Companion();\n }\n return VertexSampling$VertexDpSampling$Companion_instance;\n }\n VertexSampling$VertexDpSampling.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'VertexDpSampling',\n interfaces: [VertexSampling]\n };\n function VertexSampling$DoubleVectorComponentsList(myXValues, myYValues) {\n AbstractList.call(this);\n this.myXValues_0 = myXValues;\n this.myYValues_0 = myYValues;\n }\n Object.defineProperty(VertexSampling$DoubleVectorComponentsList.prototype, 'size', {\n configurable: true,\n get: function () {\n return this.myXValues_0.size;\n }\n });\n VertexSampling$DoubleVectorComponentsList.prototype.get_za3lpa$ = function (index) {\n return VertexSampling$Companion_getInstance().createPoint_0(this.myXValues_0.get_za3lpa$(index), this.myYValues_0.get_za3lpa$(index));\n };\n VertexSampling$DoubleVectorComponentsList.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'DoubleVectorComponentsList',\n interfaces: [AbstractList]\n };\n function VertexSampling$Companion() {\n VertexSampling$Companion_instance = this;\n }\n VertexSampling$Companion.prototype.createPoint_0 = function (x, y) {\n var tmp$, tmp$_0;\n if (!!(typeof x === 'string' || typeof y === 'string')) {\n var message = 'String coords are not supported yet';\n throw IllegalArgumentException_init(message.toString());\n }\n if (!data_0.SeriesUtil.allFinite_jma9l8$(typeof (tmp$ = x) === 'number' ? tmp$ : throwCCE(), typeof (tmp$_0 = y) === 'number' ? tmp$_0 : throwCCE())) {\n var message_0 = 'Invalid coord';\n throw IllegalArgumentException_init(message_0.toString());\n }\n return new DoubleVector(x, y);\n };\n VertexSampling$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var VertexSampling$Companion_instance = null;\n function VertexSampling$Companion_getInstance() {\n if (VertexSampling$Companion_instance === null) {\n new VertexSampling$Companion();\n }\n return VertexSampling$Companion_instance;\n }\n VertexSampling.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'VertexSampling',\n interfaces: [PointSampling, SamplingBase]\n };\n function ContinuousOnlyMapperProvider(naValue) {\n MapperProviderBase.call(this, naValue);\n }\n ContinuousOnlyMapperProvider.prototype.createDiscreteMapper_6i94r7$ = function (discreteTransform) {\n throw IllegalStateException_init('[' + toString(Kotlin.getKClassFromExpression(this).simpleName) + \"] Can't create mapper for discrete domain\");\n };\n ContinuousOnlyMapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ContinuousOnlyMapperProvider',\n interfaces: [MapperProviderBase]\n };\n function DefaultMapperProvider() {\n DefaultMapperProvider_instance = this;\n this.PROVIDER_MAP_0 = new DefaultMapperProvider$TypedMapperProviderMap();\n }\n DefaultMapperProvider.prototype.get_31786j$ = function (aes) {\n return this.PROVIDER_MAP_0.get_lkzxyg$(aes);\n };\n DefaultMapperProvider.prototype.hasDefault_5adj56$ = function (aes) {\n return this.PROVIDER_MAP_0.containsKey_5adj56$(aes);\n };\n function DefaultMapperProvider$TypedMapperProviderMap() {\n DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance();\n this.myMap_0 = HashMap_init();\n var tmp$;\n tmp$ = Aes.Companion.allPositional().iterator();\n while (tmp$.hasNext()) {\n var aes = tmp$.next();\n this.put_0(aes, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_UNDEFINED_0);\n }\n this.put_0(Aes.Companion.X, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.Y, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.Z, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.YMIN, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.YMAX, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.COLOR, DefaultMapperProviderUtil_getInstance().createColorMapperProvider_8be2vx$());\n this.put_0(Aes.Companion.FILL, DefaultMapperProviderUtil_getInstance().createColorMapperProvider_8be2vx$());\n this.put_0(Aes.Companion.ALPHA, AlphaMapperProvider$Companion_getInstance().DEFAULT);\n this.put_0(Aes.Companion.SHAPE, DefaultMapperProviderUtil_getInstance().createWithDiscreteOutput_rath1t$(ShapeMapper_getInstance().allShapes(), ShapeMapper_getInstance().NA_VALUE));\n this.put_0(Aes.Companion.LINETYPE, DefaultMapperProviderUtil_getInstance().createWithDiscreteOutput_rath1t$(LineTypeMapper_getInstance().allLineTypes(), LineTypeMapper_getInstance().NA_VALUE));\n this.put_0(Aes.Companion.SIZE, SizeMapperProvider$Companion_getInstance().DEFAULT);\n this.put_0(Aes.Companion.STACKSIZE, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.WIDTH, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.HEIGHT, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.WEIGHT, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.BINWIDTH, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.VIOLINWIDTH, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.INTERCEPT, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.SLOPE, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.XINTERCEPT, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.YINTERCEPT, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.LOWER, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.MIDDLE, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.UPPER, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.SAMPLE, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.QUANTILE, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.MAP_ID, DefaultMapperProviderUtil_getInstance().createObjectIdentity_8be2vx$());\n this.put_0(Aes.Companion.FRAME, DefaultMapperProviderUtil_getInstance().createStringIdentity_8be2vx$());\n this.put_0(Aes.Companion.SPEED, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.FLOW, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.XMIN, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.XMAX, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.XEND, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.YEND, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.LABEL, DefaultMapperProviderUtil_getInstance().createObjectIdentity_8be2vx$());\n this.put_0(Aes.Companion.FAMILY, DefaultMapperProviderUtil_getInstance().createStringIdentity_8be2vx$());\n this.put_0(Aes.Companion.FONTFACE, DefaultMapperProviderUtil_getInstance().createStringIdentity_8be2vx$());\n this.put_0(Aes.Companion.LINEHEIGHT, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.HJUST, DefaultMapperProviderUtil_getInstance().createObjectIdentity_8be2vx$());\n this.put_0(Aes.Companion.VJUST, DefaultMapperProviderUtil_getInstance().createObjectIdentity_8be2vx$());\n this.put_0(Aes.Companion.ANGLE, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.SLICE, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n this.put_0(Aes.Companion.EXPLODE, DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance().NUMERIC_IDENTITY_0);\n }\n DefaultMapperProvider$TypedMapperProviderMap.prototype.get_lkzxyg$ = function (aes) {\n var tmp$;\n return Kotlin.isType(tmp$ = this.myMap_0.get_11rb$(aes), MapperProvider) ? tmp$ : throwCCE();\n };\n DefaultMapperProvider$TypedMapperProviderMap.prototype.put_0 = function (aes, value) {\n this.myMap_0.put_xwzc9p$(aes, value);\n };\n DefaultMapperProvider$TypedMapperProviderMap.prototype.containsKey_5adj56$ = function (aes) {\n return this.myMap_0.containsKey_11rb$(aes);\n };\n function DefaultMapperProvider$TypedMapperProviderMap$Companion() {\n DefaultMapperProvider$TypedMapperProviderMap$Companion_instance = this;\n this.NUMERIC_UNDEFINED_0 = new DefaultMapperProvider$TypedMapperProviderMap$Companion$NUMERIC_UNDEFINED$ObjectLiteral();\n this.NUMERIC_IDENTITY_0 = new DefaultMapperProvider$TypedMapperProviderMap$Companion$NUMERIC_IDENTITY$ObjectLiteral();\n }\n function DefaultMapperProvider$TypedMapperProviderMap$Companion$NUMERIC_UNDEFINED$ObjectLiteral() {\n }\n DefaultMapperProvider$TypedMapperProviderMap$Companion$NUMERIC_UNDEFINED$ObjectLiteral.prototype.createDiscreteMapper_6i94r7$ = function (discreteTransform) {\n return scale.Mappers.NUMERIC_UNDEFINED;\n };\n DefaultMapperProvider$TypedMapperProviderMap$Companion$NUMERIC_UNDEFINED$ObjectLiteral.prototype.createContinuousMapper_j5tjae$ = function (domain, trans) {\n return GuideMappers_getInstance().NUMERIC_UNDEFINED;\n };\n DefaultMapperProvider$TypedMapperProviderMap$Companion$NUMERIC_UNDEFINED$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [MapperProvider]\n };\n function DefaultMapperProvider$TypedMapperProviderMap$Companion$NUMERIC_IDENTITY$ObjectLiteral() {\n }\n DefaultMapperProvider$TypedMapperProviderMap$Companion$NUMERIC_IDENTITY$ObjectLiteral.prototype.createDiscreteMapper_6i94r7$ = function (discreteTransform) {\n return scale.Mappers.IDENTITY;\n };\n DefaultMapperProvider$TypedMapperProviderMap$Companion$NUMERIC_IDENTITY$ObjectLiteral.prototype.createContinuousMapper_j5tjae$ = function (domain, trans) {\n return GuideMappers_getInstance().IDENTITY;\n };\n DefaultMapperProvider$TypedMapperProviderMap$Companion$NUMERIC_IDENTITY$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [MapperProvider]\n };\n DefaultMapperProvider$TypedMapperProviderMap$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var DefaultMapperProvider$TypedMapperProviderMap$Companion_instance = null;\n function DefaultMapperProvider$TypedMapperProviderMap$Companion_getInstance() {\n if (DefaultMapperProvider$TypedMapperProviderMap$Companion_instance === null) {\n new DefaultMapperProvider$TypedMapperProviderMap$Companion();\n }\n return DefaultMapperProvider$TypedMapperProviderMap$Companion_instance;\n }\n DefaultMapperProvider$TypedMapperProviderMap.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TypedMapperProviderMap',\n interfaces: []\n };\n DefaultMapperProvider.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'DefaultMapperProvider',\n interfaces: []\n };\n var DefaultMapperProvider_instance = null;\n function DefaultMapperProvider_getInstance() {\n if (DefaultMapperProvider_instance === null) {\n new DefaultMapperProvider();\n }\n return DefaultMapperProvider_instance;\n }\n function DefaultMapperProviderUtil() {\n DefaultMapperProviderUtil_instance = this;\n }\n function DefaultMapperProviderUtil$createColorMapperProvider$ObjectLiteral(closure$discrete, closure$continuous) {\n this.closure$discrete = closure$discrete;\n this.closure$continuous = closure$continuous;\n }\n DefaultMapperProviderUtil$createColorMapperProvider$ObjectLiteral.prototype.createDiscreteMapper_6i94r7$ = function (discreteTransform) {\n return this.closure$discrete.createDiscreteMapper_6i94r7$(discreteTransform);\n };\n DefaultMapperProviderUtil$createColorMapperProvider$ObjectLiteral.prototype.createContinuousMapper_j5tjae$ = function (domain, trans) {\n return this.closure$continuous.createContinuousMapper_j5tjae$(domain, trans);\n };\n DefaultMapperProviderUtil$createColorMapperProvider$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [MapperProvider]\n };\n DefaultMapperProviderUtil.prototype.createColorMapperProvider_8be2vx$ = function () {\n var discrete = new ColorBrewerMapperProvider(null, null, null, Color.Companion.GRAY);\n var continuous = ColorGradientMapperProvider$Companion_getInstance().DEFAULT;\n return new DefaultMapperProviderUtil$createColorMapperProvider$ObjectLiteral(discrete, continuous);\n };\n function DefaultMapperProviderUtil$createWithDiscreteOutput$ObjectLiteral(closure$outputValues, closure$naValue) {\n this.closure$outputValues = closure$outputValues;\n this.closure$naValue = closure$naValue;\n }\n DefaultMapperProviderUtil$createWithDiscreteOutput$ObjectLiteral.prototype.createDiscreteMapper_6i94r7$ = function (discreteTransform) {\n return GuideMappers_getInstance().discreteToDiscrete_qvw28g$(discreteTransform, this.closure$outputValues, this.closure$naValue);\n };\n DefaultMapperProviderUtil$createWithDiscreteOutput$ObjectLiteral.prototype.createContinuousMapper_j5tjae$ = function (domain, trans) {\n return GuideMappers_getInstance().continuousToDiscrete_3kbtej$(scale.MapperUtil.rangeWithLimitsAfterTransform_j5tjae$(domain, trans), this.closure$outputValues, this.closure$naValue);\n };\n DefaultMapperProviderUtil$createWithDiscreteOutput$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [MapperProvider]\n };\n DefaultMapperProviderUtil.prototype.createWithDiscreteOutput_rath1t$ = function (outputValues, naValue) {\n return new DefaultMapperProviderUtil$createWithDiscreteOutput$ObjectLiteral(outputValues, naValue);\n };\n function DefaultMapperProviderUtil$createObjectIdentity$lambda(it) {\n return it;\n }\n function DefaultMapperProviderUtil$createObjectIdentity$ObjectLiteral() {\n }\n DefaultMapperProviderUtil$createObjectIdentity$ObjectLiteral.prototype.invoke_yrwdxb$ = function (v) {\n return v;\n };\n DefaultMapperProviderUtil$createObjectIdentity$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [ScaleMapper]\n };\n DefaultMapperProviderUtil.prototype.createObjectIdentity_8be2vx$ = function () {\n var converter = DefaultMapperProviderUtil$createObjectIdentity$lambda;\n var discreteMapperProvider = new IdentityDiscreteMapperProvider(converter);\n var continuousMapper = new DefaultMapperProviderUtil$createObjectIdentity$ObjectLiteral();\n return new IdentityMapperProvider(discreteMapperProvider, continuousMapper);\n };\n function DefaultMapperProviderUtil$createStringIdentity$lambda(it) {\n return it != null ? it.toString() : null;\n }\n DefaultMapperProviderUtil.prototype.createStringIdentity_8be2vx$ = function () {\n var converter = DefaultMapperProviderUtil$createStringIdentity$lambda;\n return new IdentityDiscreteMapperProvider(converter);\n };\n DefaultMapperProviderUtil.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'DefaultMapperProviderUtil',\n interfaces: []\n };\n var DefaultMapperProviderUtil_instance = null;\n function DefaultMapperProviderUtil_getInstance() {\n if (DefaultMapperProviderUtil_instance === null) {\n new DefaultMapperProviderUtil();\n }\n return DefaultMapperProviderUtil_instance;\n }\n function DefaultNaValue() {\n DefaultNaValue_instance = this;\n this.VALUE_MAP_0 = new TypedKeyHashMap();\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.X, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.Y, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.Z, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.YMIN, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.YMAX, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.COLOR, Color.Companion.GRAY);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.FILL, Color.Companion.GRAY);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.ALPHA, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.SHAPE, point.TinyPointShape);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.LINETYPE, NamedLineType.SOLID);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.SIZE, aes.AesScaling.sizeFromCircleDiameter_14dthe$(1.0));\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.STACKSIZE, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.WIDTH, 1.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.HEIGHT, 1.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.BINWIDTH, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.VIOLINWIDTH, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.WEIGHT, 1.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.INTERCEPT, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.SLOPE, 1.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.XINTERCEPT, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.YINTERCEPT, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.LOWER, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.MIDDLE, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.UPPER, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.SAMPLE, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.QUANTILE, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.MAP_ID, 'empty map_id');\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.FRAME, 'empty frame');\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.SPEED, 10.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.FLOW, 0.1);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.XMIN, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.XMAX, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.XEND, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.YEND, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.LABEL, '-');\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.FAMILY, 'sans-serif');\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.FONTFACE, 'plain');\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.LINEHEIGHT, 1.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.HJUST, 0.5);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.VJUST, 0.5);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.ANGLE, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.SLICE, 0.0);\n this.VALUE_MAP_0.put_ev6mlr$(Aes.Companion.EXPLODE, 0.0);\n }\n DefaultNaValue.prototype.has_896ixz$ = function (aes) {\n return this.VALUE_MAP_0.containsKey_ex36zt$(aes);\n };\n DefaultNaValue.prototype.get_31786j$ = function (aes) {\n return this.VALUE_MAP_0.get_ex36zt$(aes);\n };\n DefaultNaValue.prototype.get_ex36zt$ = function (aes) {\n return this.VALUE_MAP_0.get_ex36zt$(aes);\n };\n DefaultNaValue.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'DefaultNaValue',\n interfaces: []\n };\n var DefaultNaValue_instance = null;\n function DefaultNaValue_getInstance() {\n if (DefaultNaValue_instance === null) {\n new DefaultNaValue();\n }\n return DefaultNaValue_instance;\n }\n function DiscreteOnlyMapperProvider() {\n }\n DiscreteOnlyMapperProvider.prototype.createContinuousMapper_j5tjae$ = function (domain, trans) {\n throw IllegalStateException_init('[' + toString(Kotlin.getKClassFromExpression(this).simpleName) + \"] Can't create mapper for continuous domain \" + domain);\n };\n DiscreteOnlyMapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'DiscreteOnlyMapperProvider',\n interfaces: [MapperProvider]\n };\n function GuideMapper(mapper, isContinuous) {\n this.mapper_6lpy06$_0 = mapper;\n this.isContinuous = isContinuous;\n }\n GuideMapper.prototype.invoke_yrwdxb$ = function (v) {\n return this.mapper_6lpy06$_0.invoke_yrwdxb$(v);\n };\n GuideMapper.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GuideMapper',\n interfaces: [ScaleMapper]\n };\n function MapperProvider() {\n }\n MapperProvider.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'MapperProvider',\n interfaces: []\n };\n function ScaleProvider() {\n }\n ScaleProvider.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'ScaleProvider',\n interfaces: []\n };\n function ScaleProviderBuilder(aes) {\n this.aes_0 = aes;\n this._mapperProvider_0 = null;\n this.myName_0 = null;\n this.myBreaks_0 = null;\n this.myLabels_0 = null;\n this.myLabelFormat_0 = null;\n this.myMultiplicativeExpand_0 = null;\n this.myAdditiveExpand_0 = null;\n this.myLimits_0 = null;\n this.myContinuousTransform_0 = transform.Transforms.IDENTITY;\n this.myBreaksGenerator_0 = null;\n this.myDiscreteDomain_0 = false;\n this.myDiscreteDomainReverse_0 = false;\n var tmp$, tmp$_0;\n tmp$ = this.aes_0;\n if (equals(tmp$, Aes.Companion.X))\n tmp$_0 = Orientation$BOTTOM_getInstance();\n else if (equals(tmp$, Aes.Companion.Y))\n tmp$_0 = Orientation$LEFT_getInstance();\n else\n tmp$_0 = null;\n this.axisOrientation = tmp$_0;\n }\n ScaleProviderBuilder.prototype.name_61zpoe$ = function (name) {\n this.myName_0 = name;\n return this;\n };\n ScaleProviderBuilder.prototype.breaks_pqjuzw$ = function (breaks) {\n this.myBreaks_0 = breaks;\n return this;\n };\n ScaleProviderBuilder.prototype.minorBreaks_NI_d3e2cz$ = function (minorBreaks) {\n throw IllegalStateException_init('Not implemented');\n };\n ScaleProviderBuilder.prototype.labels_mhpeer$ = function (labels) {\n this.myLabels_0 = ArrayList_init_1(labels);\n return this;\n };\n ScaleProviderBuilder.prototype.labelFormat_pdl1vj$ = function (format) {\n this.myLabelFormat_0 = format;\n return this;\n };\n ScaleProviderBuilder.prototype.multiplicativeExpand_14dthe$ = function (v) {\n this.myMultiplicativeExpand_0 = v;\n return this;\n };\n ScaleProviderBuilder.prototype.additiveExpand_14dthe$ = function (v) {\n this.myAdditiveExpand_0 = v;\n return this;\n };\n ScaleProviderBuilder.prototype.limits_9ma18$ = function (v) {\n this.myLimits_0 = v;\n return this;\n };\n ScaleProviderBuilder.prototype.rescaler_NI_za3rmp$ = function (v) {\n throw IllegalStateException_init('Not implemented');\n };\n ScaleProviderBuilder.prototype.oob_NI_za3rmp$ = function (v) {\n throw IllegalStateException_init('Not implemented');\n };\n ScaleProviderBuilder.prototype.continuousTransform_gxz7zd$ = function (v) {\n this.myContinuousTransform_0 = v;\n return this;\n };\n ScaleProviderBuilder.prototype.breaksGenerator_6q5k0b$ = function (v) {\n this.myBreaksGenerator_0 = v;\n return this;\n };\n ScaleProviderBuilder.prototype.guide_NI_za3rmp$ = function (v) {\n throw IllegalStateException_init('Not implemented');\n };\n ScaleProviderBuilder.prototype.discreteDomain_6taknv$ = function (b) {\n this.myDiscreteDomain_0 = b;\n return this;\n };\n ScaleProviderBuilder.prototype.discreteDomainReverse_6taknv$ = function (b) {\n this.myDiscreteDomainReverse_0 = b;\n return this;\n };\n ScaleProviderBuilder.prototype.build = function () {\n return new ScaleProviderBuilder$MyScaleProvider(this);\n };\n function ScaleProviderBuilder$MyScaleProvider(b) {\n this.myName_0 = b.myName_0;\n var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3;\n this.myLabels_0 = (tmp$ = b.myLabels_0) != null ? ArrayList_init_1(tmp$) : null;\n this.myLabelFormat_0 = b.myLabelFormat_0;\n this.myMultiplicativeExpand_0 = b.myMultiplicativeExpand_0;\n this.myAdditiveExpand_0 = b.myAdditiveExpand_0;\n this.myBreaksGenerator_0 = b.myBreaksGenerator_0;\n this.myAes_0 = b.aes_0;\n this.discreteDomain_sylt8i$_0 = b.myDiscreteDomain_0;\n this.discreteDomainReverse_oil12s$_0 = b.myDiscreteDomainReverse_0;\n this.breaks_h22v6v$_0 = (tmp$_0 = b.myBreaks_0) != null ? ArrayList_init_1(tmp$_0) : null;\n this.limits_hmyn8j$_0 = (tmp$_1 = b.myLimits_0) != null ? ArrayList_init_1(tmp$_1) : null;\n this.continuousTransform_hc6st8$_0 = b.myContinuousTransform_0;\n tmp$_2 = b.aes_0;\n if (equals(tmp$_2, Aes.Companion.X)) {\n var orientation = ensureNotNull(b.axisOrientation);\n if (!orientation.isHorizontal) {\n var message = 'Illegal X-axis position: ' + orientation;\n throw IllegalArgumentException_init(message.toString());\n }\n tmp$_3 = orientation;\n } else if (equals(tmp$_2, Aes.Companion.Y)) {\n var orientation_0 = ensureNotNull(b.axisOrientation);\n if (!!orientation_0.isHorizontal) {\n var message_0 = 'Illegal Y-axis position: ' + orientation_0;\n throw IllegalArgumentException_init(message_0.toString());\n }\n tmp$_3 = orientation_0;\n } else\n tmp$_3 = null;\n this.axisOrientation_5l09u2$_0 = tmp$_3;\n }\n Object.defineProperty(ScaleProviderBuilder$MyScaleProvider.prototype, 'discreteDomain', {\n configurable: true,\n get: function () {\n return this.discreteDomain_sylt8i$_0;\n }\n });\n Object.defineProperty(ScaleProviderBuilder$MyScaleProvider.prototype, 'discreteDomainReverse', {\n configurable: true,\n get: function () {\n return this.discreteDomainReverse_oil12s$_0;\n }\n });\n Object.defineProperty(ScaleProviderBuilder$MyScaleProvider.prototype, 'breaks', {\n configurable: true,\n get: function () {\n return this.breaks_h22v6v$_0;\n }\n });\n Object.defineProperty(ScaleProviderBuilder$MyScaleProvider.prototype, 'limits', {\n configurable: true,\n get: function () {\n return this.limits_hmyn8j$_0;\n }\n });\n Object.defineProperty(ScaleProviderBuilder$MyScaleProvider.prototype, 'continuousTransform', {\n configurable: true,\n get: function () {\n return this.continuousTransform_hc6st8$_0;\n }\n });\n Object.defineProperty(ScaleProviderBuilder$MyScaleProvider.prototype, 'axisOrientation', {\n configurable: true,\n get: function () {\n return this.axisOrientation_5l09u2$_0;\n }\n });\n ScaleProviderBuilder$MyScaleProvider.prototype.scaleName_0 = function (variable) {\n var tmp$;\n return (tmp$ = this.myName_0) != null ? tmp$ : variable.label;\n };\n ScaleProviderBuilder$MyScaleProvider.prototype.createScale_nho0uz$ = function (defaultName, discreteTransform) {\n var tmp$;\n var scale_0 = scale.Scales.discreteDomain_l10k79$((tmp$ = this.myName_0) != null ? tmp$ : defaultName, discreteTransform);\n return this.completeScale_0(scale_0);\n };\n ScaleProviderBuilder$MyScaleProvider.prototype.createScale_z70nzq$ = function (defaultName, continuousTransform, continuousRange, guideBreaks) {\n var tmp$;\n var name = (tmp$ = this.myName_0) != null ? tmp$ : defaultName;\n var scale_0 = {v: null};\n scale_0.v = scale.Scales.continuousDomain_shloz7$(name, continuousRange || this.myAes_0.isNumeric);\n if (guideBreaks != null) {\n scale_0.v = scale_0.v.with().breaks_pqjuzw$(guideBreaks.breaks).labelFormatter_h0j1qz$(guideBreaks.formatter).build();\n }\n scale_0.v = scale_0.v.with().continuousTransform_gxz7zd$(continuousTransform).build();\n if (this.myBreaksGenerator_0 != null) {\n scale_0.v = scale_0.v.with().breaksGenerator_6q5k0b$(this.myBreaksGenerator_0).build();\n }\n return this.completeScale_0(scale_0.v);\n };\n ScaleProviderBuilder$MyScaleProvider.prototype.completeScale_0 = function (scale) {\n var with_0 = scale.with();\n if (this.breaks != null) {\n with_0.breaks_pqjuzw$(this.breaks);\n }\n if (this.myLabels_0 != null) {\n with_0.labels_mhpeer$(this.myLabels_0);\n }\n if (this.myLabelFormat_0 != null) {\n with_0.labelFormatter_h0j1qz$(getCallableRef('format', function ($receiver, p1) {\n return $receiver.format_za3rmp$(p1);\n }.bind(null, StringFormat.Companion.forOneArg_86f9bg$(this.myLabelFormat_0))));\n }\n if (this.myMultiplicativeExpand_0 != null) {\n with_0.multiplicativeExpand_14dthe$(this.myMultiplicativeExpand_0);\n }\n if (this.myAdditiveExpand_0 != null) {\n with_0.additiveExpand_14dthe$(this.myAdditiveExpand_0);\n }\n return with_0.build();\n };\n function ScaleProviderBuilder$MyScaleProvider$absentMapper$ObjectLiteral(closure$var) {\n this.closure$var = closure$var;\n }\n ScaleProviderBuilder$MyScaleProvider$absentMapper$ObjectLiteral.prototype.invoke_yrwdxb$ = function (v) {\n throw IllegalStateException_init(\"Mapper for empty data series '\" + this.closure$var.name + \"' was invoked with arg \" + toString(v));\n };\n ScaleProviderBuilder$MyScaleProvider$absentMapper$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [ScaleMapper]\n };\n ScaleProviderBuilder$MyScaleProvider.prototype.absentMapper_0 = function (var_0) {\n return new ScaleProviderBuilder$MyScaleProvider$absentMapper$ObjectLiteral(var_0);\n };\n ScaleProviderBuilder$MyScaleProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'MyScaleProvider',\n interfaces: [ScaleProvider]\n };\n ScaleProviderBuilder.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ScaleProviderBuilder',\n interfaces: []\n };\n function ScaleProviderHelper() {\n ScaleProviderHelper_instance = this;\n }\n ScaleProviderHelper.prototype.createDefault_31786j$ = function (aes) {\n return (new ScaleProviderBuilder(aes)).build();\n };\n ScaleProviderHelper.prototype.createDateTimeScaleProvider_1va84n$ = function (aes, name) {\n return (new ScaleProviderBuilder(aes)).name_61zpoe$(name).breaksGenerator_6q5k0b$(new DateTimeBreaksGen()).build();\n };\n ScaleProviderHelper.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'ScaleProviderHelper',\n interfaces: []\n };\n var ScaleProviderHelper_instance = null;\n function ScaleProviderHelper_getInstance() {\n if (ScaleProviderHelper_instance === null) {\n new ScaleProviderHelper();\n }\n return ScaleProviderHelper_instance;\n }\n function WithGuideBreaks() {\n }\n WithGuideBreaks.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'WithGuideBreaks',\n interfaces: []\n };\n function ColorMapper() {\n ColorMapper_instance = this;\n this.NA_VALUE = Color.Companion.GRAY;\n this.DEF_GRADIENT_LOW = Color.Companion.parseHex_61zpoe$('#132B43');\n this.DEF_GRADIENT_HIGH = Color.Companion.parseHex_61zpoe$('#56B1F7');\n }\n ColorMapper.prototype.gradientDefault_3lmjpf$ = function (domain) {\n return this.gradient_kuiuox$(domain, this.DEF_GRADIENT_LOW, this.DEF_GRADIENT_HIGH, this.NA_VALUE, 1.0);\n };\n ColorMapper.prototype.gradient_kuiuox$ = function (domain, low, high, naColor, alpha) {\n if (alpha === void 0)\n alpha = 1.0;\n return this.gradientHSV_37xr1q$(domain, values.Colors.hsvFromRgb_98b62m$(low), values.Colors.hsvFromRgb_98b62m$(high), true, naColor, alpha);\n };\n function ColorMapper$gradientHSV$lambda(closure$domain, closure$naColor, closure$mapperH, closure$mapperS, closure$mapperV, closure$alpha) {\n return function (input) {\n if (input == null || !closure$domain.contains_14dthe$(input)) {\n return closure$naColor;\n } else {\n var hue = ensureNotNull(closure$mapperH.invoke_yrwdxb$(input)) % 360;\n var H = hue >= 0 ? hue : 360 + hue;\n var S = ensureNotNull(closure$mapperS.invoke_yrwdxb$(input));\n var V = ensureNotNull(closure$mapperV.invoke_yrwdxb$(input));\n return values.Colors.rgbFromHsv_6y0v78$(H, S, V, closure$alpha);\n }\n };\n }\n ColorMapper.prototype.gradientHSV_37xr1q$ = function (domain, lowHSV, highHSV, autoHueDirection, naColor, alpha) {\n if (alpha === void 0)\n alpha = 1.0;\n var lowHue = lowHSV.h;\n var highHue = highHSV.h;\n var lowS = lowHSV.s;\n var highS = highHSV.s;\n if (lowS < 1.0E-4) {\n lowHue = highHue;\n }\n if (highS < 1.0E-4) {\n highHue = lowHue;\n }\n if (autoHueDirection) {\n var x = highHue - lowHue;\n var dH = JsMath.abs(x);\n if (dH > 180) {\n if (highHue >= lowHue) {\n lowHue += 360.0;\n } else {\n highHue += 360.0;\n }\n }\n }\n var mapperH = scale.Mappers.linear_nhuomk$(domain, lowHue, highHue, null);\n var mapperS = scale.Mappers.linear_nhuomk$(domain, lowS, highS, null);\n var mapperV = scale.Mappers.linear_nhuomk$(domain, lowHSV.v, highHSV.v, null);\n return ColorMapper$gradientHSV$lambda(domain, naColor, mapperH, mapperS, mapperV, alpha);\n };\n ColorMapper.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'ColorMapper',\n interfaces: []\n };\n var ColorMapper_instance = null;\n function ColorMapper_getInstance() {\n if (ColorMapper_instance === null) {\n new ColorMapper();\n }\n return ColorMapper_instance;\n }\n function GuideMapperWithGuideBreaks(mapper, breaks, formatter) {\n GuideMapper.call(this, mapper, false);\n this.breaks_3tqv0$_0 = breaks;\n this.formatter_dkp6z6$_0 = formatter;\n }\n Object.defineProperty(GuideMapperWithGuideBreaks.prototype, 'breaks', {\n get: function () {\n return this.breaks_3tqv0$_0;\n }\n });\n Object.defineProperty(GuideMapperWithGuideBreaks.prototype, 'formatter', {\n get: function () {\n return this.formatter_dkp6z6$_0;\n }\n });\n GuideMapperWithGuideBreaks.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GuideMapperWithGuideBreaks',\n interfaces: [GuideMapper, WithGuideBreaks]\n };\n function GuideMappers() {\n GuideMappers_instance = this;\n this.IDENTITY = new GuideMapper(scale.Mappers.IDENTITY, false);\n this.NUMERIC_UNDEFINED = new GuideMapper(scale.Mappers.NUMERIC_UNDEFINED, false);\n }\n function GuideMappers$discreteToDiscrete$lambda(v) {\n return v.toString();\n }\n GuideMappers.prototype.discreteToDiscrete_qvw28g$ = function (discreteTransform, outputValues, naValue) {\n return new GuideMapperWithGuideBreaks(scale.Mappers.discrete_qvw28g$(discreteTransform, outputValues, naValue), discreteTransform.effectiveDomain, GuideMappers$discreteToDiscrete$lambda);\n };\n GuideMappers.prototype.continuousToDiscrete_3kbtej$ = function (domain, outputValues, naValue) {\n var mapper = scale.Mappers.quantized_4lks63$(domain, outputValues, naValue);\n return this.asNotContinuous_6ljcop$(mapper);\n };\n function GuideMappers$discreteToContinuous$lambda(v) {\n return v.toString();\n }\n GuideMappers.prototype.discreteToContinuous_dj8ltc$ = function (discreteTransform, outputRange, naValue) {\n var mapper = scale.Mappers.discreteToContinuous_swidre$(discreteTransform.effectiveDomainTransformed, outputRange, naValue);\n return new GuideMapperWithGuideBreaks(mapper, discreteTransform.effectiveDomain, GuideMappers$discreteToContinuous$lambda);\n };\n GuideMappers.prototype.continuousToContinuous_gd6940$ = function (domain, range, naValue) {\n return this.asContinuous_6ljcop$(scale.Mappers.linear_gd6940$(domain, range, naValue));\n };\n GuideMappers.prototype.asNotContinuous_6ljcop$ = function (mapper) {\n return new GuideMapper(mapper, false);\n };\n GuideMappers.prototype.asContinuous_6ljcop$ = function (mapper) {\n return new GuideMapper(mapper, true);\n };\n GuideMappers.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'GuideMappers',\n interfaces: []\n };\n var GuideMappers_instance = null;\n function GuideMappers_getInstance() {\n if (GuideMappers_instance === null) {\n new GuideMappers();\n }\n return GuideMappers_instance;\n }\n function LineTypeMapper() {\n LineTypeMapper_instance = this;\n this.NA_VALUE = NamedLineType.SOLID;\n }\n LineTypeMapper.prototype.allLineTypes = function () {\n return listOf_0([NamedLineType.SOLID, NamedLineType.DASHED, NamedLineType.DOTTED, NamedLineType.DOTDASH, NamedLineType.LONGDASH, NamedLineType.TWODASH]);\n };\n LineTypeMapper.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'LineTypeMapper',\n interfaces: []\n };\n var LineTypeMapper_instance = null;\n function LineTypeMapper_getInstance() {\n if (LineTypeMapper_instance === null) {\n new LineTypeMapper();\n }\n return LineTypeMapper_instance;\n }\n function ShapeMapper() {\n ShapeMapper_instance = this;\n this.NA_VALUE = point.TinyPointShape;\n }\n ShapeMapper.prototype.allShapes = function () {\n var bestSix = listOf_0([NamedShape.SOLID_CIRCLE, NamedShape.SOLID_TRIANGLE_UP, NamedShape.SOLID_SQUARE, NamedShape.STICK_PLUS, NamedShape.STICK_SQUARE_CROSS, NamedShape.STICK_STAR]);\n var theRest = LinkedHashSet_init_0(listOf_0(NamedShape$values().slice()));\n theRest.removeAll_brywnq$(bestSix);\n var shapes = ArrayList_init_1(bestSix);\n shapes.addAll_brywnq$(theRest);\n return shapes;\n };\n ShapeMapper.prototype.hollowShapes = function () {\n var tmp$;\n var bestThreeHollow = listOf_0([NamedShape.STICK_CIRCLE, NamedShape.STICK_TRIANGLE_UP, NamedShape.STICK_SQUARE]);\n var theRest = LinkedHashSet_init_0(listOf_0(NamedShape$values().slice()));\n theRest.removeAll_brywnq$(bestThreeHollow);\n var shapes = ArrayList_init_1(bestThreeHollow);\n tmp$ = theRest.iterator();\n while (tmp$.hasNext()) {\n var shape = tmp$.next();\n if (shape.isHollow) {\n shapes.add_11rb$(shape);\n }\n }\n return shapes;\n };\n ShapeMapper.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'ShapeMapper',\n interfaces: []\n };\n var ShapeMapper_instance = null;\n function ShapeMapper_getInstance() {\n if (ShapeMapper_instance === null) {\n new ShapeMapper();\n }\n return ShapeMapper_instance;\n }\n function AlphaMapperProvider(range, naValue) {\n AlphaMapperProvider$Companion_getInstance();\n LinearNormalizingMapperProvider.call(this, range, naValue);\n }\n function AlphaMapperProvider$Companion() {\n AlphaMapperProvider$Companion_instance = this;\n this.DEF_RANGE_0 = new DoubleSpan(0.1, 1.0);\n this.DEFAULT = new AlphaMapperProvider(this.DEF_RANGE_0, DefaultNaValue_getInstance().get_31786j$(Aes.Companion.ALPHA));\n }\n AlphaMapperProvider$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var AlphaMapperProvider$Companion_instance = null;\n function AlphaMapperProvider$Companion_getInstance() {\n if (AlphaMapperProvider$Companion_instance === null) {\n new AlphaMapperProvider$Companion();\n }\n return AlphaMapperProvider$Companion_instance;\n }\n AlphaMapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'AlphaMapperProvider',\n interfaces: [LinearNormalizingMapperProvider]\n };\n function ColorBrewerMapperProvider(paletteTypeName, paletteNameOrIndex, direction, naValue) {\n ColorBrewerMapperProvider$Companion_getInstance();\n MapperProviderBase.call(this, naValue);\n this.paletteTypeName_0 = paletteTypeName;\n this.paletteNameOrIndex_0 = paletteNameOrIndex;\n this.direction_0 = direction;\n var tmp$;\n if (!((tmp$ = this.paletteNameOrIndex_0 != null ? typeof this.paletteNameOrIndex_0 === 'string' || Kotlin.isNumber(this.paletteNameOrIndex_0) : null) != null ? tmp$ : true)) {\n var message = ColorBrewerMapperProvider_init$lambda(this)();\n throw IllegalArgumentException_init(message.toString());\n }\n if (Kotlin.isNumber(this.paletteNameOrIndex_0)) {\n if (!(this.paletteTypeName_0 != null)) {\n var message_0 = \"brewer palette type required: 'seq', 'div' or 'qual'.\";\n throw IllegalArgumentException_init(message_0.toString());\n }\n }\n }\n ColorBrewerMapperProvider.prototype.createDiscreteMapper_6i94r7$ = function (discreteTransform) {\n var n = discreteTransform.effectiveDomain.size;\n var colorScheme = this.colorScheme_0(true, n);\n var colors = this.colors_0(colorScheme, n);\n return GuideMappers_getInstance().discreteToDiscrete_qvw28g$(discreteTransform, colors, this.naValue);\n };\n ColorBrewerMapperProvider.prototype.createContinuousMapper_j5tjae$ = function (domain, trans) {\n var colorScheme = this.colorScheme_0(false);\n var colors = this.colors_0(colorScheme, colorScheme.maxColors);\n var domain_0 = scale.MapperUtil.rangeWithLimitsAfterTransform_j5tjae$(domain, trans);\n return GuideMappers_getInstance().continuousToDiscrete_3kbtej$(domain_0, colors, this.naValue);\n };\n ColorBrewerMapperProvider.prototype.colors_0 = function (colorScheme, count) {\n var tmp$, tmp$_0, tmp$_1;\n var colors = color.PaletteUtil.schemeColors_7q5c77$(colorScheme, count);\n tmp$_0 = (tmp$ = this.direction_0 != null ? this.direction_0 < 0 : null) != null ? tmp$ : false;\n if (tmp$_0 === true)\n tmp$_1 = reversed(colors);\n else if (tmp$_0 === false)\n tmp$_1 = colors;\n else\n tmp$_1 = Kotlin.noWhenBranchMatched();\n return tmp$_1;\n };\n ColorBrewerMapperProvider.prototype.colorScheme_0 = function (discrete, colorCount) {\n if (colorCount === void 0)\n colorCount = null;\n var tmp$, tmp$_0;\n if (typeof this.paletteNameOrIndex_0 === 'string') {\n var palType = color.PaletteUtil.paletteTypeByPaletteName_61zpoe$(this.paletteNameOrIndex_0);\n if (!(palType != null)) {\n var message = ColorBrewerMapperProvider$Companion_getInstance().cantFindPaletteError_0(this.paletteNameOrIndex_0);\n throw IllegalArgumentException_init(message.toString());\n }\n tmp$ = palType;\n } else if (this.paletteTypeName_0 != null)\n tmp$ = ColorBrewerMapperProvider$Companion_getInstance().paletteType_0(this.paletteTypeName_0);\n else if (discrete)\n tmp$ = ColorPalette$Type.QUALITATIVE;\n else\n tmp$ = ColorPalette$Type.SEQUENTIAL;\n var paletteType = tmp$;\n if (Kotlin.isNumber(this.paletteNameOrIndex_0))\n tmp$_0 = color.PaletteUtil.colorSchemeByIndex_vfydh1$(paletteType, numberToInt(this.paletteNameOrIndex_0));\n else if (typeof this.paletteNameOrIndex_0 === 'string')\n tmp$_0 = ColorBrewerMapperProvider$Companion_getInstance().colorSchemeByName_0(paletteType, this.paletteNameOrIndex_0);\n else if (paletteType === ColorPalette$Type.QUALITATIVE)\n tmp$_0 = colorCount != null && colorCount <= ColorPalette$Qualitative.Set2.maxColors ? ColorPalette$Qualitative.Set2 : ColorPalette$Qualitative.Set3;\n else\n tmp$_0 = color.PaletteUtil.colorSchemeByIndex_vfydh1$(paletteType, 0);\n return tmp$_0;\n };\n function ColorBrewerMapperProvider$Companion() {\n ColorBrewerMapperProvider$Companion_instance = this;\n }\n ColorBrewerMapperProvider$Companion.prototype.paletteType_0 = function (name) {\n var tmp$;\n if (name == null) {\n return ColorPalette$Type.SEQUENTIAL;\n }\n switch (name) {\n case 'seq':\n tmp$ = ColorPalette$Type.SEQUENTIAL;\n break;\n case 'div':\n tmp$ = ColorPalette$Type.DIVERGING;\n break;\n case 'qual':\n tmp$ = ColorPalette$Type.QUALITATIVE;\n break;\n default:\n throw IllegalArgumentException_init(\"Palette type expected one of 'seq' (sequential), 'div' (diverging) or 'qual' (qualitative) but was: '\" + toString(name) + \"'\");\n }\n return tmp$;\n };\n ColorBrewerMapperProvider$Companion.prototype.colorSchemeByName_0 = function (paletteType, paletteName) {\n var tmp$;\n try {\n switch (paletteType.name) {\n case 'SEQUENTIAL':\n tmp$ = ColorPalette$Sequential$valueOf(paletteName);\n break;\n case 'DIVERGING':\n tmp$ = ColorPalette$Diverging$valueOf(paletteName);\n break;\n case 'QUALITATIVE':\n tmp$ = ColorPalette$Qualitative$valueOf(paletteName);\n break;\n default:\n tmp$ = Kotlin.noWhenBranchMatched();\n break;\n }\n return tmp$;\n } catch (ignore) {\n if (Kotlin.isType(ignore, IllegalArgumentException)) {\n throw IllegalArgumentException_init(this.cantFindPaletteError_0(paletteName));\n } else\n throw ignore;\n }\n };\n ColorBrewerMapperProvider$Companion.prototype.cantFindPaletteError_0 = function (paletteName) {\n return trimMargin('\\n' + \" |Brewer palette '\" + paletteName + \"' was not found. \" + '\\n' + ' |Valid palette names are: ' + '\\n' + \" | Type 'seq' (sequential): \" + '\\n' + ' | ' + this.names_0(ColorPalette$Sequential$values()) + ' ' + '\\n' + \" | Type 'div' (diverging): \" + '\\n' + ' | ' + this.names_0(ColorPalette$Diverging$values()) + ' ' + '\\n' + \" | Type 'qual' (qualitative): \" + '\\n' + ' | ' + this.names_0(ColorPalette$Qualitative$values()) + ' ' + '\\n' + ' ');\n };\n function ColorBrewerMapperProvider$Companion$names$lambda(it) {\n return \"'\" + it.name + \"'\";\n }\n ColorBrewerMapperProvider$Companion.prototype.names_0 = function (enums) {\n return joinToString(enums, ', ', void 0, void 0, void 0, void 0, ColorBrewerMapperProvider$Companion$names$lambda);\n };\n ColorBrewerMapperProvider$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ColorBrewerMapperProvider$Companion_instance = null;\n function ColorBrewerMapperProvider$Companion_getInstance() {\n if (ColorBrewerMapperProvider$Companion_instance === null) {\n new ColorBrewerMapperProvider$Companion();\n }\n return ColorBrewerMapperProvider$Companion_instance;\n }\n function ColorBrewerMapperProvider_init$lambda(this$ColorBrewerMapperProvider) {\n return function () {\n return 'palette: expected a name or index but was: ' + toString(Kotlin.getKClassFromExpression(ensureNotNull(this$ColorBrewerMapperProvider.paletteNameOrIndex_0)).simpleName);\n };\n }\n ColorBrewerMapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ColorBrewerMapperProvider',\n interfaces: [MapperProviderBase]\n };\n function ColorGradient2MapperProvider(low, mid, high, midpoint, naValue) {\n ColorGradient2MapperProvider$Companion_getInstance();\n ContinuousOnlyMapperProvider.call(this, naValue);\n this.myLow_0 = null;\n this.myMid_0 = null;\n this.myHigh_0 = null;\n this.myMidpoint_0 = null;\n this.myLow_0 = low != null ? low : ColorGradient2MapperProvider$Companion_getInstance().DEF_GRADIENT_LOW_0;\n this.myMid_0 = mid != null ? mid : ColorGradient2MapperProvider$Companion_getInstance().DEF_GRADIENT_MID_0;\n this.myHigh_0 = high != null ? high : ColorGradient2MapperProvider$Companion_getInstance().DEF_GRADIENT_HIGH_0;\n this.myMidpoint_0 = midpoint != null ? midpoint : 0.0;\n }\n function ColorGradient2MapperProvider$createContinuousMapper$getMapper(closure$rangeMap) {\n return function (v) {\n var tmp$;\n var f = null;\n if (data_0.SeriesUtil.isFinite_yrwdxb$(v)) {\n var fSpan = kotlin_js_internal_DoubleCompanionObject.NaN;\n tmp$ = closure$rangeMap.keys.iterator();\n while (tmp$.hasNext()) {\n var range = tmp$.next();\n if (range.contains_14dthe$(ensureNotNull(v))) {\n var span = range.upperEnd - range.lowerEnd;\n if (f == null || fSpan === 0.0) {\n f = closure$rangeMap.get_11rb$(range);\n fSpan = span;\n } else if (span < fSpan && span > 0) {\n f = closure$rangeMap.get_11rb$(range);\n fSpan = span;\n }\n }\n }\n }\n return f;\n };\n }\n function ColorGradient2MapperProvider$createContinuousMapper$ObjectLiteral(closure$getMapper, this$ColorGradient2MapperProvider) {\n this.closure$getMapper = closure$getMapper;\n this.this$ColorGradient2MapperProvider = this$ColorGradient2MapperProvider;\n }\n ColorGradient2MapperProvider$createContinuousMapper$ObjectLiteral.prototype.invoke_yrwdxb$ = function (v) {\n var tmp$;\n var mapper = this.closure$getMapper(v);\n return (tmp$ = mapper != null ? mapper(v) : null) != null ? tmp$ : this.this$ColorGradient2MapperProvider.naValue;\n };\n ColorGradient2MapperProvider$createContinuousMapper$ObjectLiteral.$metadata$ = {\n kind: Kind_CLASS,\n interfaces: [ScaleMapper]\n };\n ColorGradient2MapperProvider.prototype.createContinuousMapper_j5tjae$ = function (domain, trans) {\n var domain_0 = scale.MapperUtil.rangeWithLimitsAfterTransform_j5tjae$(domain, trans);\n var tmp$ = domain_0.lowerEnd;\n var a = ensureNotNull(this.myMidpoint_0);\n var b = domain_0.lowerEnd;\n var lowDomain = new DoubleSpan(tmp$, JsMath.max(a, b));\n var a_0 = this.myMidpoint_0;\n var b_0 = domain_0.upperEnd;\n var highDomain = new DoubleSpan(JsMath.min(a_0, b_0), domain_0.upperEnd);\n var lowMapper = ColorMapper_getInstance().gradient_kuiuox$(lowDomain, this.myLow_0, this.myMid_0, this.naValue);\n var highMapper = ColorMapper_getInstance().gradient_kuiuox$(highDomain, this.myMid_0, this.myHigh_0, this.naValue);\n var rangeMap = mapOf([to(lowDomain, lowMapper), to(highDomain, highMapper)]);\n var getMapper = ColorGradient2MapperProvider$createContinuousMapper$getMapper(rangeMap);\n var scaleMapper = new ColorGradient2MapperProvider$createContinuousMapper$ObjectLiteral(getMapper, this);\n return GuideMappers_getInstance().asContinuous_6ljcop$(scaleMapper);\n };\n function ColorGradient2MapperProvider$Companion() {\n ColorGradient2MapperProvider$Companion_instance = this;\n this.DEF_GRADIENT_LOW_0 = Color.Companion.parseHex_61zpoe$('#964540');\n this.DEF_GRADIENT_MID_0 = Color.Companion.WHITE;\n this.DEF_GRADIENT_HIGH_0 = Color.Companion.parseHex_61zpoe$('#3B3D96');\n }\n ColorGradient2MapperProvider$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ColorGradient2MapperProvider$Companion_instance = null;\n function ColorGradient2MapperProvider$Companion_getInstance() {\n if (ColorGradient2MapperProvider$Companion_instance === null) {\n new ColorGradient2MapperProvider$Companion();\n }\n return ColorGradient2MapperProvider$Companion_instance;\n }\n ColorGradient2MapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ColorGradient2MapperProvider',\n interfaces: [ContinuousOnlyMapperProvider]\n };\n function ColorGradientMapperProvider(low, high, naValue) {\n ColorGradientMapperProvider$Companion_getInstance();\n MapperProviderBase.call(this, naValue);\n this.low_0 = low != null ? low : ColorMapper_getInstance().DEF_GRADIENT_LOW;\n this.high_0 = high != null ? high : ColorMapper_getInstance().DEF_GRADIENT_HIGH;\n }\n ColorGradientMapperProvider.prototype.createDiscreteMapper_6i94r7$ = function (discreteTransform) {\n var transformedDomain = discreteTransform.effectiveDomainTransformed;\n var mapperDomain = ensureNotNull(data_0.SeriesUtil.range_l63ks6$(transformedDomain));\n var gradient = ColorMapper_getInstance().gradient_kuiuox$(mapperDomain, this.low_0, this.high_0, this.naValue);\n return GuideMappers_getInstance().asNotContinuous_6ljcop$(ScaleMapper.Companion.wrap_rjdepr$(gradient));\n };\n ColorGradientMapperProvider.prototype.createContinuousMapper_j5tjae$ = function (domain, trans) {\n var domain_0 = scale.MapperUtil.rangeWithLimitsAfterTransform_j5tjae$(domain, trans);\n var gradient = ColorMapper_getInstance().gradient_kuiuox$(domain_0, this.low_0, this.high_0, this.naValue);\n return GuideMappers_getInstance().asContinuous_6ljcop$(ScaleMapper.Companion.wrap_rjdepr$(gradient));\n };\n function ColorGradientMapperProvider$Companion() {\n ColorGradientMapperProvider$Companion_instance = this;\n this.DEFAULT = new ColorGradientMapperProvider(null, null, ColorMapper_getInstance().NA_VALUE);\n }\n ColorGradientMapperProvider$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ColorGradientMapperProvider$Companion_instance = null;\n function ColorGradientMapperProvider$Companion_getInstance() {\n if (ColorGradientMapperProvider$Companion_instance === null) {\n new ColorGradientMapperProvider$Companion();\n }\n return ColorGradientMapperProvider$Companion_instance;\n }\n ColorGradientMapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ColorGradientMapperProvider',\n interfaces: [MapperProviderBase]\n };\n function ColorGradientnMapperProvider(colors, naValue) {\n ColorGradientnMapperProvider$Companion_getInstance();\n MapperProviderBase.call(this, naValue);\n this.colors_0 = colors;\n if (!(this.colors_0.size > 1)) {\n var message = 'gradient requires colors list with two or more elements';\n throw IllegalArgumentException_init(message.toString());\n }\n }\n ColorGradientnMapperProvider.prototype.createDiscreteMapper_6i94r7$ = function (discreteTransform) {\n var transformedDomain = discreteTransform.effectiveDomainTransformed;\n var mapperDomain = ensureNotNull(data_0.SeriesUtil.range_l63ks6$(transformedDomain));\n var gradient = ColorGradientnMapperProvider$Companion_getInstance().createGradient_b0eetf$(mapperDomain, this.colors_0, this.naValue);\n return GuideMappers_getInstance().asNotContinuous_6ljcop$(ScaleMapper.Companion.wrap_rjdepr$(gradient));\n };\n ColorGradientnMapperProvider.prototype.createContinuousMapper_j5tjae$ = function (domain, trans) {\n var domain_0 = scale.MapperUtil.rangeWithLimitsAfterTransform_j5tjae$(domain, trans);\n var gradient = ColorGradientnMapperProvider$Companion_getInstance().createGradient_b0eetf$(domain_0, this.colors_0, this.naValue);\n return GuideMappers_getInstance().asContinuous_6ljcop$(ScaleMapper.Companion.wrap_rjdepr$(gradient));\n };\n function ColorGradientnMapperProvider$Companion() {\n ColorGradientnMapperProvider$Companion_instance = this;\n }\n function ColorGradientnMapperProvider$Companion$createGradient$lambda(closure$naColor, closure$subdomainEnds, closure$mappers) {\n return function (value) {\n var tmp$;\n if (value == null || !isFinite(value))\n return closure$naColor;\n else if (value < first(closure$subdomainEnds) || value > last(closure$subdomainEnds))\n return closure$naColor;\n else {\n var i = binarySearch(closure$subdomainEnds, value);\n if (i < 0)\n tmp$ = abs(i + 1 | 0) - 1 | 0;\n else {\n var b = get_lastIndex(closure$mappers);\n tmp$ = JsMath.min(i, b);\n }\n var subdomainIndex = tmp$;\n return closure$mappers.get_za3lpa$(subdomainIndex)(value);\n }\n };\n }\n ColorGradientnMapperProvider$Companion.prototype.createGradient_b0eetf$ = function (domain, colors, naColor, alpha) {\n if (alpha === void 0)\n alpha = 1.0;\n var subdomainsCount = colors.size - 1 | 0;\n var subdomainLength = domain.length / subdomainsCount;\n var $receiver = until(0, subdomainsCount);\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n destination.add_11rb$(domain.lowerEnd + subdomainLength * item);\n }\n var subdomainEnds = plus(destination, listOf(domain.upperEnd));\n var $receiver_0 = windowed(zip(subdomainEnds, colors), 2);\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault($receiver_0, 10));\n var tmp$_0;\n tmp$_0 = $receiver_0.iterator();\n while (tmp$_0.hasNext()) {\n var item_0 = tmp$_0.next();\n var tmp$_1 = destination_0.add_11rb$;\n var low = item_0.get_za3lpa$(0);\n var high = item_0.get_za3lpa$(1);\n var lowValue = low.component1()\n , lowColor = low.component2();\n var highValue = high.component1()\n , highColor = high.component2();\n var subdomain = new DoubleSpan(lowValue, highValue);\n tmp$_1.call(destination_0, ColorMapper_getInstance().gradient_kuiuox$(subdomain, lowColor, highColor, naColor, alpha));\n }\n var mappers = destination_0;\n return ColorGradientnMapperProvider$Companion$createGradient$lambda(naColor, subdomainEnds, mappers);\n };\n ColorGradientnMapperProvider$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ColorGradientnMapperProvider$Companion_instance = null;\n function ColorGradientnMapperProvider$Companion_getInstance() {\n if (ColorGradientnMapperProvider$Companion_instance === null) {\n new ColorGradientnMapperProvider$Companion();\n }\n return ColorGradientnMapperProvider$Companion_instance;\n }\n ColorGradientnMapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ColorGradientnMapperProvider',\n interfaces: [MapperProviderBase]\n };\n function ColorHueMapperProvider(hueRange, chroma, luminance, startHue, direction, naValue) {\n ColorHueMapperProvider$Companion_getInstance();\n HSVColorMapperProvider.call(this, naValue);\n this.myFromHSV_0 = null;\n this.myToHSV_0 = null;\n this.myHSVIntervals_0 = null;\n var tmp$;\n var hueRange_0 = ColorHueMapperProvider$Companion_getInstance().normalizeHueRange_0(hueRange);\n var clockwise = direction == null || direction !== -1.0;\n var fromHue = clockwise ? hueRange_0.lowerEnd : hueRange_0.upperEnd;\n var toHue = clockwise ? hueRange_0.upperEnd : hueRange_0.lowerEnd;\n var startHue_0 = startHue != null ? startHue : ColorHueMapperProvider$Companion_getInstance().DEF_START_HUE_0;\n if (hueRange_0.contains_14dthe$(startHue_0) && startHue_0 - hueRange_0.lowerEnd > 1 && hueRange_0.upperEnd - startHue_0 > 1) {\n tmp$ = listOf_0([to(startHue_0, toHue), to(fromHue, startHue_0)]);\n } else {\n tmp$ = listOf(to(fromHue, toHue));\n }\n var hueIntervals = tmp$;\n var saturation = (chroma != null ? chroma % 100 : ColorHueMapperProvider$Companion_getInstance().DEF_SATURATION_0) / 100;\n var value = (luminance != null ? luminance % 100 : ColorHueMapperProvider$Companion_getInstance().DEF_VALUE_0) / 100;\n var destination = ArrayList_init_0(collectionSizeOrDefault(hueIntervals, 10));\n var tmp$_0;\n tmp$_0 = hueIntervals.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n destination.add_11rb$(to(new HSV(item.first, saturation, value), new HSV(item.second, saturation, value)));\n }\n this.myHSVIntervals_0 = destination;\n this.myFromHSV_0 = new HSV(fromHue, saturation, value);\n this.myToHSV_0 = new HSV(toHue, saturation, value);\n }\n ColorHueMapperProvider.prototype.createDiscreteMapper_6i94r7$ = function (discreteTransform) {\n return this.createDiscreteMapper_wikmj1$(discreteTransform.effectiveDomainTransformed, this.myFromHSV_0, this.myToHSV_0);\n };\n ColorHueMapperProvider.prototype.createContinuousMapper_j5tjae$ = function (domain, trans) {\n var domain_0 = scale.MapperUtil.rangeWithLimitsAfterTransform_j5tjae$(domain, trans);\n return this.createContinuousMapper_8wifwj$(domain_0, this.myHSVIntervals_0);\n };\n function ColorHueMapperProvider$Companion() {\n ColorHueMapperProvider$Companion_instance = this;\n this.DEF_SATURATION_0 = 50.0;\n this.DEF_VALUE_0 = 90.0;\n this.DEF_START_HUE_0 = 0.0;\n this.DEF_HUE_RANGE_0 = new DoubleSpan(15.0, 375.0);\n this.DEFAULT = new ColorHueMapperProvider(null, null, null, null, null, Color.Companion.GRAY);\n }\n ColorHueMapperProvider$Companion.prototype.normalizeHueRange_0 = function (hueRange) {\n var tmp$;\n if (hueRange == null || hueRange.size !== 2) {\n tmp$ = this.DEF_HUE_RANGE_0;\n } else {\n var a = hueRange.get_za3lpa$(0);\n var b = hueRange.get_za3lpa$(1);\n var tmp$_0 = JsMath.min(a, b);\n var a_0 = hueRange.get_za3lpa$(0);\n var b_0 = hueRange.get_za3lpa$(1);\n tmp$ = new DoubleSpan(tmp$_0, JsMath.max(a_0, b_0));\n }\n return tmp$;\n };\n ColorHueMapperProvider$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var ColorHueMapperProvider$Companion_instance = null;\n function ColorHueMapperProvider$Companion_getInstance() {\n if (ColorHueMapperProvider$Companion_instance === null) {\n new ColorHueMapperProvider$Companion();\n }\n return ColorHueMapperProvider$Companion_instance;\n }\n ColorHueMapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ColorHueMapperProvider',\n interfaces: [HSVColorMapperProvider]\n };\n function ColormapMapperProvider(cmapName, alpha, begin, end, direction, naValue) {\n MapperProviderBase.call(this, naValue);\n this.direction_0 = direction;\n this.cmapName_0 = cmapName != null ? cmapName : colormap.ColorMaps.VIRIDIS;\n this.alpha_0 = alpha != null ? alpha : 1.0;\n this.begin_0 = begin != null ? begin : 0.0;\n this.end_0 = end != null ? end : 1.0;\n var r01 = new DoubleSpan(0.0, 1.0);\n if (!r01.contains_14dthe$(this.alpha_0)) {\n var message = \"'alpha' should be in range [0..1]\";\n throw IllegalArgumentException_init(message.toString());\n }\n if (!r01.contains_14dthe$(this.begin_0)) {\n var message_0 = \"'begin' should be in range [0..1]\";\n throw IllegalArgumentException_init(message_0.toString());\n }\n if (!r01.contains_14dthe$(this.end_0)) {\n var message_1 = \"'end' should be in range [0..1]\";\n throw IllegalArgumentException_init(message_1.toString());\n }\n }\n ColormapMapperProvider.prototype.createDiscreteMapper_6i94r7$ = function (discreteTransform) {\n var n = discreteTransform.effectiveDomain.size;\n var colors = this.colors_0(n);\n return GuideMappers_getInstance().discreteToDiscrete_qvw28g$(discreteTransform, colors, this.naValue);\n };\n ColormapMapperProvider.prototype.createContinuousMapper_j5tjae$ = function (domain, trans) {\n var colors = this.colors_0(null);\n var domain_0 = scale.MapperUtil.rangeWithLimitsAfterTransform_j5tjae$(domain, trans);\n var gradient = ColorGradientnMapperProvider$Companion_getInstance().createGradient_b0eetf$(domain_0, colors, this.naValue, this.alpha_0);\n return GuideMappers_getInstance().asContinuous_6ljcop$(ScaleMapper.Companion.wrap_rjdepr$(gradient));\n };\n ColormapMapperProvider.prototype.colors_0 = function (n) {\n if (n === void 0)\n n = null;\n var tmp$, tmp$_0, tmp$_1;\n var colors = colormap.ColorMaps.getColors_kb58nm$(this.cmapName_0, this.alpha_0, new DoubleSpan(this.begin_0, this.end_0), n);\n tmp$_0 = (tmp$ = this.direction_0 != null ? this.direction_0 < 0 : null) != null ? tmp$ : false;\n if (tmp$_0 === true)\n tmp$_1 = reversed(colors);\n else if (tmp$_0 === false)\n tmp$_1 = colors;\n else\n tmp$_1 = Kotlin.noWhenBranchMatched();\n return tmp$_1;\n };\n ColormapMapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ColormapMapperProvider',\n interfaces: [MapperProviderBase]\n };\n function DirectlyProportionalMapperProvider(max, naValue) {\n ContinuousOnlyMapperProvider.call(this, naValue);\n this.max_ks8piw$_0 = max;\n }\n DirectlyProportionalMapperProvider.prototype.createContinuousMapper_j5tjae$ = function (domain, trans) {\n var dataMax = scale.MapperUtil.rangeWithLimitsAfterTransform_j5tjae$(domain, trans).upperEnd;\n return GuideMappers_getInstance().continuousToContinuous_gd6940$(new DoubleSpan(0.0, dataMax), new DoubleSpan(0.0, this.max_ks8piw$_0), this.naValue);\n };\n DirectlyProportionalMapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'DirectlyProportionalMapperProvider',\n interfaces: [ContinuousOnlyMapperProvider]\n };\n function GreyscaleLightnessMapperProvider(start, end, naValue) {\n GreyscaleLightnessMapperProvider$Companion_getInstance();\n HSVColorMapperProvider.call(this, naValue);\n this.myFromHSV_0 = null;\n this.myToHSV_0 = null;\n var value0 = start != null ? start : GreyscaleLightnessMapperProvider$Companion_getInstance().DEF_START_0;\n var value1 = end != null ? end : GreyscaleLightnessMapperProvider$Companion_getInstance().DEF_END_0;\n if (!rangeTo(0.0, 1.0).contains_mef7kx$(value0)) {\n var message = \"Value of 'start' must be in range: [0,1]: \" + toString(start);\n throw IllegalArgumentException_init(message.toString());\n }\n if (!rangeTo(0.0, 1.0).contains_mef7kx$(value1)) {\n var message_0 = \"Value of 'end' must be in range: [0,1]: \" + toString(end);\n throw IllegalArgumentException_init(message_0.toString());\n }\n this.myFromHSV_0 = new HSV(0.0, 0.0, value0);\n this.myToHSV_0 = new HSV(0.0, 0.0, value1);\n }\n GreyscaleLightnessMapperProvider.prototype.createDiscreteMapper_6i94r7$ = function (discreteTransform) {\n return this.createDiscreteMapper_wikmj1$(discreteTransform.effectiveDomainTransformed, this.myFromHSV_0, this.myToHSV_0);\n };\n GreyscaleLightnessMapperProvider.prototype.createContinuousMapper_j5tjae$ = function (domain, trans) {\n var domain_0 = scale.MapperUtil.rangeWithLimitsAfterTransform_j5tjae$(domain, trans);\n return this.createContinuousMapper_8wifwj$(domain_0, listOf(to(this.myFromHSV_0, this.myToHSV_0)));\n };\n function GreyscaleLightnessMapperProvider$Companion() {\n GreyscaleLightnessMapperProvider$Companion_instance = this;\n this.DEF_START_0 = 0.2;\n this.DEF_END_0 = 0.8;\n }\n GreyscaleLightnessMapperProvider$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var GreyscaleLightnessMapperProvider$Companion_instance = null;\n function GreyscaleLightnessMapperProvider$Companion_getInstance() {\n if (GreyscaleLightnessMapperProvider$Companion_instance === null) {\n new GreyscaleLightnessMapperProvider$Companion();\n }\n return GreyscaleLightnessMapperProvider$Companion_instance;\n }\n GreyscaleLightnessMapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'GreyscaleLightnessMapperProvider',\n interfaces: [HSVColorMapperProvider]\n };\n function HSVColorMapperProvider(naValue) {\n HSVColorMapperProvider$Companion_getInstance();\n MapperProviderBase.call(this, naValue);\n }\n HSVColorMapperProvider.prototype.createDiscreteMapper_wikmj1$ = function (transformedDomain, fromHSV, toHSV) {\n var mapperDomain = data_0.SeriesUtil.ensureApplicableRange_w2blas$(data_0.SeriesUtil.range_l63ks6$(transformedDomain));\n var n = transformedDomain.size;\n var newFromHue = fromHSV.h;\n var newToHue = toHSV.h;\n if (n > 1) {\n var x = toHSV.h % 360 - fromHSV.h % 360;\n var hueDiff = JsMath.abs(x);\n var step = (toHSV.h - fromHSV.h) / n;\n if (hueDiff < JsMath.abs(step) / 2) {\n newFromHue = fromHSV.h + step / 2;\n newToHue = toHSV.h - step / 2;\n }\n }\n var gradient = ColorMapper_getInstance().gradientHSV_37xr1q$(mapperDomain, new HSV(newFromHue, fromHSV.s, fromHSV.v), new HSV(newToHue, toHSV.s, toHSV.v), false, this.naValue, 1.0);\n return GuideMappers_getInstance().asNotContinuous_6ljcop$(ScaleMapper.Companion.wrap_rjdepr$(gradient));\n };\n HSVColorMapperProvider.prototype.createContinuousMapper_8wifwj$ = function (domain, hsvIntervals) {\n var tmp$;\n switch (hsvIntervals.size) {\n case 0:\n throw IllegalArgumentException_init('Empty HSV intervals.');\n case 1:\n tmp$ = ColorMapper_getInstance().gradientHSV_37xr1q$(domain, hsvIntervals.get_za3lpa$(0).first, hsvIntervals.get_za3lpa$(0).second, false, this.naValue, 1.0);\n break;\n default:\n tmp$ = HSVColorMapperProvider$Companion_getInstance().createCompositeColorMapper_0(domain, hsvIntervals, false, this.naValue);\n break;\n }\n var gradientMapper = tmp$;\n return GuideMappers_getInstance().asContinuous_6ljcop$(ScaleMapper.Companion.wrap_rjdepr$(gradientMapper));\n };\n function HSVColorMapperProvider$Companion() {\n HSVColorMapperProvider$Companion_instance = this;\n }\n function HSVColorMapperProvider$Companion$createCompositeColorMapper$lambda(closure$naColor, closure$colorMappersPerSubDomain) {\n return function (v) {\n var tmp$, tmp$_0;\n if (v == null) {\n return closure$naColor;\n } else {\n var $receiver = closure$colorMappersPerSubDomain;\n var firstOrNull$result;\n firstOrNull$break: do {\n var tmp$_1;\n tmp$_1 = $receiver.iterator();\n while (tmp$_1.hasNext()) {\n var element = tmp$_1.next();\n if (element.first.contains_14dthe$(v)) {\n firstOrNull$result = element;\n break firstOrNull$break;\n }\n }\n firstOrNull$result = null;\n }\n while (false);\n var mapper = (tmp$ = firstOrNull$result) != null ? tmp$.second : null;\n return (tmp$_0 = mapper != null ? mapper(v) : null) != null ? tmp$_0 : closure$naColor;\n }\n };\n }\n HSVColorMapperProvider$Companion.prototype.createCompositeColorMapper_0 = function (domain, hsvIntervals, autoHueDirection, naColor) {\n var colorMappersPerSubDomain = this.createColorMappersPerSubDomain_0(domain, hsvIntervals, autoHueDirection, naColor);\n return HSVColorMapperProvider$Companion$createCompositeColorMapper$lambda(naColor, colorMappersPerSubDomain);\n };\n HSVColorMapperProvider$Companion.prototype.createColorMappersPerSubDomain_0 = function (domain, hsvIntervals, autoHueDirection, naColor) {\n var subDomains = this.splitContinuousDomain_0(domain, hsvIntervals);\n var $receiver = zip(subDomains, hsvIntervals);\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n var domain_0 = item.first;\n var hsvInterval = item.second;\n destination.add_11rb$(new Pair(domain_0, ColorMapper_getInstance().gradientHSV_37xr1q$(domain_0, hsvInterval.first, hsvInterval.second, autoHueDirection, naColor, 1.0)));\n }\n return destination;\n };\n HSVColorMapperProvider$Companion.prototype.splitContinuousDomain_0 = function (domain, hsvIntervals) {\n var tmp$;\n var domainSize = domain.upperEnd - domain.lowerEnd;\n var destination = ArrayList_init_0(collectionSizeOrDefault(hsvIntervals, 10));\n var tmp$_0;\n tmp$_0 = hsvIntervals.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n var tmp$_1 = destination.add_11rb$;\n var x = item.first.h - item.second.h;\n tmp$_1.call(destination, JsMath.abs(x));\n }\n var hueIntervalSizeList = destination;\n var hueIntervalsTotalSize = sum_0(hueIntervalSizeList);\n var domainToHueIntevalRatio = domainSize / hueIntervalsTotalSize;\n var subDomains = ArrayList_init();\n var lowerEnd = domain.lowerEnd;\n tmp$ = hueIntervalSizeList.iterator();\n while (tmp$.hasNext()) {\n var hueIntervalSize = tmp$.next();\n var upperEnd = lowerEnd + hueIntervalSize * domainToHueIntevalRatio;\n subDomains.add_11rb$(new DoubleSpan(lowerEnd, upperEnd));\n lowerEnd = upperEnd;\n }\n return subDomains;\n };\n HSVColorMapperProvider$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var HSVColorMapperProvider$Companion_instance = null;\n function HSVColorMapperProvider$Companion_getInstance() {\n if (HSVColorMapperProvider$Companion_instance === null) {\n new HSVColorMapperProvider$Companion();\n }\n return HSVColorMapperProvider$Companion_instance;\n }\n HSVColorMapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'HSVColorMapperProvider',\n interfaces: [MapperProviderBase]\n };\n function IdentityDiscreteMapperProvider(inputConverter) {\n DiscreteOnlyMapperProvider.call(this);\n this.inputConverter_lfub5e$_0 = inputConverter;\n }\n IdentityDiscreteMapperProvider.prototype.createDiscreteMapper_6i94r7$ = function (discreteTransform) {\n var $receiver = discreteTransform.effectiveDomain;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$;\n tmp$ = $receiver.iterator();\n while (tmp$.hasNext()) {\n var item = tmp$.next();\n var tmp$_0 = destination.add_11rb$;\n var tmp$_1;\n tmp$_1 = this.inputConverter_lfub5e$_0(item);\n if (tmp$_1 == null) {\n throw IllegalStateException_init(\"Can't map input value \" + item.toString() + ' to output type.');\n }\n tmp$_0.call(destination, tmp$_1);\n }\n var outputValues = destination;\n return GuideMappers_getInstance().discreteToDiscrete_qvw28g$(discreteTransform, outputValues, null);\n };\n IdentityDiscreteMapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'IdentityDiscreteMapperProvider',\n interfaces: [DiscreteOnlyMapperProvider]\n };\n function IdentityMapperProvider(discreteMapperProvider, continuousMapper) {\n this.discreteMapperProvider_0 = discreteMapperProvider;\n this.continuousMapper_0 = continuousMapper;\n }\n IdentityMapperProvider.prototype.createDiscreteMapper_6i94r7$ = function (discreteTransform) {\n return this.discreteMapperProvider_0.createDiscreteMapper_6i94r7$(discreteTransform);\n };\n IdentityMapperProvider.prototype.createContinuousMapper_j5tjae$ = function (domain, trans) {\n return GuideMappers_getInstance().asContinuous_6ljcop$(this.continuousMapper_0);\n };\n IdentityMapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'IdentityMapperProvider',\n interfaces: [MapperProvider]\n };\n function LinearNormalizingMapperProvider(outputRange, naValue) {\n MapperProviderBase.call(this, naValue);\n this.outputRange_73yg7w$_0 = outputRange;\n }\n LinearNormalizingMapperProvider.prototype.createDiscreteMapper_6i94r7$ = function (discreteTransform) {\n return GuideMappers_getInstance().discreteToContinuous_dj8ltc$(discreteTransform, this.outputRange_73yg7w$_0, this.naValue);\n };\n LinearNormalizingMapperProvider.prototype.createContinuousMapper_j5tjae$ = function (domain, trans) {\n var dataRange = scale.MapperUtil.rangeWithLimitsAfterTransform_j5tjae$(domain, trans);\n return GuideMappers_getInstance().continuousToContinuous_gd6940$(dataRange, this.outputRange_73yg7w$_0, this.naValue);\n };\n LinearNormalizingMapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LinearNormalizingMapperProvider',\n interfaces: [MapperProviderBase]\n };\n function MapperProviderBase(naValue) {\n this.naValue = naValue;\n }\n MapperProviderBase.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'MapperProviderBase',\n interfaces: [MapperProvider]\n };\n function SizeAreaMapperProvider(max, naValue) {\n SizeAreaMapperProvider$Companion_getInstance();\n DirectlyProportionalMapperProvider.call(this, max != null ? max : SizeAreaMapperProvider$Companion_getInstance().DEF_MAX, naValue);\n }\n function SizeAreaMapperProvider$Companion() {\n SizeAreaMapperProvider$Companion_instance = this;\n this.DEF_MAX = aes.AesScaling.sizeFromCircleDiameter_14dthe$(21.0);\n }\n SizeAreaMapperProvider$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var SizeAreaMapperProvider$Companion_instance = null;\n function SizeAreaMapperProvider$Companion_getInstance() {\n if (SizeAreaMapperProvider$Companion_instance === null) {\n new SizeAreaMapperProvider$Companion();\n }\n return SizeAreaMapperProvider$Companion_instance;\n }\n SizeAreaMapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'SizeAreaMapperProvider',\n interfaces: [DirectlyProportionalMapperProvider]\n };\n function SizeMapperProvider(range, naValue) {\n SizeMapperProvider$Companion_getInstance();\n LinearNormalizingMapperProvider.call(this, range, naValue);\n }\n function SizeMapperProvider$Companion() {\n SizeMapperProvider$Companion_instance = this;\n this.DEF_RANGE_0 = new DoubleSpan(aes.AesScaling.sizeFromCircleDiameter_14dthe$(3.0), aes.AesScaling.sizeFromCircleDiameter_14dthe$(21.0));\n this.DEFAULT = new SizeMapperProvider(this.DEF_RANGE_0, DefaultNaValue_getInstance().get_31786j$(Aes.Companion.SIZE));\n }\n SizeMapperProvider$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var SizeMapperProvider$Companion_instance = null;\n function SizeMapperProvider$Companion_getInstance() {\n if (SizeMapperProvider$Companion_instance === null) {\n new SizeMapperProvider$Companion();\n }\n return SizeMapperProvider$Companion_instance;\n }\n SizeMapperProvider.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'SizeMapperProvider',\n interfaces: [LinearNormalizingMapperProvider]\n };\n function AxisTheme() {\n }\n AxisTheme.prototype.isOntop = function () {\n return false;\n };\n AxisTheme.prototype.tickLabelDistance_6taknv$ = function (isHorizontalOrientation) {\n var tmp$;\n if (isHorizontalOrientation)\n tmp$ = this.tickLabelMargins().height();\n else\n tmp$ = this.tickLabelMargins().width();\n var result = tmp$;\n if (this.showTickMarks()) {\n result += this.tickMarkLength();\n }\n return result;\n };\n AxisTheme.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'AxisTheme',\n interfaces: []\n };\n function FacetsTheme() {\n }\n FacetsTheme.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'FacetsTheme',\n interfaces: []\n };\n function LegendTheme() {\n }\n LegendTheme.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'LegendTheme',\n interfaces: []\n };\n function PanelGridTheme() {\n }\n PanelGridTheme.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'PanelGridTheme',\n interfaces: []\n };\n function PanelTheme() {\n }\n PanelTheme.prototype.gridX_6taknv$ = function (flipAxis, callback$default) {\n if (flipAxis === void 0)\n flipAxis = false;\n return callback$default ? callback$default(flipAxis) : this.gridX_6taknv$$default(flipAxis);\n };\n PanelTheme.prototype.gridY_6taknv$ = function (flipAxis, callback$default) {\n if (flipAxis === void 0)\n flipAxis = false;\n return callback$default ? callback$default(flipAxis) : this.gridY_6taknv$$default(flipAxis);\n };\n PanelTheme.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'PanelTheme',\n interfaces: []\n };\n function PlotTheme() {\n }\n PlotTheme.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'PlotTheme',\n interfaces: []\n };\n function Theme() {\n }\n Theme.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'Theme',\n interfaces: []\n };\n function ThemeTextStyle(family, face, size, color) {\n this.family = family;\n this.face = face;\n this.size = size;\n this.color = color;\n }\n ThemeTextStyle.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ThemeTextStyle',\n interfaces: []\n };\n ThemeTextStyle.prototype.component1 = function () {\n return this.family;\n };\n ThemeTextStyle.prototype.component2 = function () {\n return this.face;\n };\n ThemeTextStyle.prototype.component3 = function () {\n return this.size;\n };\n ThemeTextStyle.prototype.component4 = function () {\n return this.color;\n };\n ThemeTextStyle.prototype.copy_y7dxx7$ = function (family, face, size, color) {\n return new ThemeTextStyle(family === void 0 ? this.family : family, face === void 0 ? this.face : face, size === void 0 ? this.size : size, color === void 0 ? this.color : color);\n };\n ThemeTextStyle.prototype.toString = function () {\n return 'ThemeTextStyle(family=' + Kotlin.toString(this.family) + (', face=' + Kotlin.toString(this.face)) + (', size=' + Kotlin.toString(this.size)) + (', color=' + Kotlin.toString(this.color)) + ')';\n };\n ThemeTextStyle.prototype.hashCode = function () {\n var result = 0;\n result = result * 31 + Kotlin.hashCode(this.family) | 0;\n result = result * 31 + Kotlin.hashCode(this.face) | 0;\n result = result * 31 + Kotlin.hashCode(this.size) | 0;\n result = result * 31 + Kotlin.hashCode(this.color) | 0;\n return result;\n };\n ThemeTextStyle.prototype.equals = function (other) {\n return this === other || (other !== null && (typeof other === 'object' && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && (Kotlin.equals(this.family, other.family) && Kotlin.equals(this.face, other.face) && Kotlin.equals(this.size, other.size) && Kotlin.equals(this.color, other.color)))));\n };\n function TooltipsTheme() {\n }\n TooltipsTheme.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'TooltipsTheme',\n interfaces: []\n };\n function ConstantValue(aes, value, format) {\n if (format === void 0)\n format = null;\n this.aes_0 = aes;\n this.value_0 = value;\n this.format_0 = format;\n this.formattedValue_0 = null;\n this.isYOrientation_0 = null;\n this.isOutlier_efnf0i$_0 = false;\n this.isAxis_i12u4n$_0 = false;\n }\n Object.defineProperty(ConstantValue.prototype, 'isOutlier', {\n configurable: true,\n get: function () {\n return this.isOutlier_efnf0i$_0;\n }\n });\n Object.defineProperty(ConstantValue.prototype, 'isAxis', {\n configurable: true,\n get: function () {\n return this.isAxis_i12u4n$_0;\n }\n });\n ConstantValue.prototype.initDataContext_nqispu$ = function (data, mappedDataAccess) {\n this.isYOrientation_0 = mappedDataAccess.isYOrientation;\n };\n ConstantValue.prototype.getDataPoint_o6b7hq$ = function (index, ctx) {\n var tmp$;\n var presentation = (tmp$ = this.formattedValue_0) != null ? tmp$ : this.initFormattedValue_0(ctx);\n return new TooltipLineSpec$DataPoint('', presentation, null, false, false);\n };\n function ConstantValue$initFormattedValue$lambda$lambda(closure$tooltipAes, closure$ctx) {\n return function () {\n return TooltipFormatting_getInstance().createFormatter_d58xd9$(closure$tooltipAes, closure$ctx);\n };\n }\n ConstantValue.prototype.initFormattedValue_0 = function (ctx) {\n var tmp$;\n var tmp$_0;\n if ((tmp$ = this.format_0 != null ? StringFormat.Companion.forOneArg_86f9bg$(this.format_0).format_za3rmp$(this.value_0) : null) != null)\n tmp$_0 = tmp$;\n else {\n var block$result;\n var tmp$_1;\n if (Aes.Companion.isPositionalXY_896ixz$(this.aes_0))\n tmp$_1 = Aes.Companion.toAxisAes_pnj1mo$(this.aes_0, ensureNotNull(this.isYOrientation_0));\n else\n tmp$_1 = this.aes_0;\n var tooltipAes = tmp$_1;\n var scale = ctx.getScale_896ixz$(tooltipAes);\n if (scale.isContinuousDomain && Kotlin.isNumber(this.value_0)) {\n block$result = ctx.getTooltipFormatter_scwrln$(tooltipAes, ConstantValue$initFormattedValue$lambda$lambda(tooltipAes, ctx))(this.value_0);\n } else {\n block$result = this.value_0.toString();\n }\n tmp$_0 = block$result;\n }\n this.formattedValue_0 = tmp$_0;\n return ensureNotNull(this.formattedValue_0);\n };\n ConstantValue.prototype.copy = function () {\n return new ConstantValue(this.aes_0, this.value_0, this.format_0);\n };\n ConstantValue.prototype.getAnnotationText_za3lpa$ = function (index) {\n return this.formattedValue_0;\n };\n ConstantValue.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'ConstantValue',\n interfaces: [ValueSource]\n };\n function DataFrameValue(name, format) {\n if (format === void 0)\n format = null;\n this.name_0 = name;\n this.format_0 = format;\n this.myDataFrame_v9hm26$_0 = this.myDataFrame_v9hm26$_0;\n this.myVariable_u4q8p$_0 = this.myVariable_u4q8p$_0;\n this.myFormatter_0 = this.format_0 != null ? StringFormat.Companion.forOneArg_86f9bg$(this.format_0, void 0, this.name_0) : null;\n this.isOutlier_h13ss7$_0 = false;\n this.isAxis_5xgnmk$_0 = false;\n }\n Object.defineProperty(DataFrameValue.prototype, 'myDataFrame_0', {\n configurable: true,\n get: function () {\n if (this.myDataFrame_v9hm26$_0 == null)\n return throwUPAE('myDataFrame');\n return this.myDataFrame_v9hm26$_0;\n },\n set: function (myDataFrame) {\n this.myDataFrame_v9hm26$_0 = myDataFrame;\n }\n });\n Object.defineProperty(DataFrameValue.prototype, 'myVariable_0', {\n configurable: true,\n get: function () {\n if (this.myVariable_u4q8p$_0 == null)\n return throwUPAE('myVariable');\n return this.myVariable_u4q8p$_0;\n },\n set: function (myVariable) {\n this.myVariable_u4q8p$_0 = myVariable;\n }\n });\n Object.defineProperty(DataFrameValue.prototype, 'isOutlier', {\n configurable: true,\n get: function () {\n return this.isOutlier_h13ss7$_0;\n }\n });\n Object.defineProperty(DataFrameValue.prototype, 'isAxis', {\n configurable: true,\n get: function () {\n return this.isAxis_5xgnmk$_0;\n }\n });\n DataFrameValue.prototype.initDataContext_nqispu$ = function (data_0, mappedDataAccess) {\n if (!(this.myDataFrame_v9hm26$_0 == null)) {\n var message = 'Data context can be initialized only once';\n throw IllegalArgumentException_init(message.toString());\n }\n this.myDataFrame_0 = data_0;\n this.myVariable_0 = data.DataFrameUtil.findVariableOrFail_vede35$(this.myDataFrame_0, this.name_0);\n };\n DataFrameValue.prototype.getDataPoint_o6b7hq$ = function (index, ctx) {\n var tmp$, tmp$_0, tmp$_1;\n tmp$ = this.myDataFrame_0.get_8xm3sj$(this.myVariable_0).get_za3lpa$(index);\n if (tmp$ == null) {\n return null;\n }\n var originalValue = tmp$;\n return new TooltipLineSpec$DataPoint(this.name_0, (tmp$_1 = (tmp$_0 = this.myFormatter_0) != null ? tmp$_0.format_za3rmp$(originalValue) : null) != null ? tmp$_1 : originalValue.toString(), null, false, false);\n };\n DataFrameValue.prototype.copy = function () {\n return new DataFrameValue(this.name_0, this.format_0);\n };\n DataFrameValue.prototype.getVariableName = function () {\n return this.name_0;\n };\n DataFrameValue.prototype.getAnnotationText_za3lpa$ = function (index) {\n var tmp$, tmp$_0, tmp$_1;\n tmp$ = this.myDataFrame_0.get_8xm3sj$(this.myVariable_0).get_za3lpa$(index);\n if (tmp$ == null) {\n return null;\n }\n var originalValue = tmp$;\n return (tmp$_1 = (tmp$_0 = this.myFormatter_0) != null ? tmp$_0.format_za3rmp$(originalValue) : null) != null ? tmp$_1 : originalValue.toString();\n };\n DataFrameValue.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'DataFrameValue',\n interfaces: [ValueSource]\n };\n function LinesContentSpecification(valueSources, linePatterns, titleLine) {\n LinesContentSpecification$Companion_getInstance();\n this.valueSources = valueSources;\n this.linePatterns = linePatterns;\n this.titleLine = titleLine;\n }\n function LinesContentSpecification$Companion() {\n LinesContentSpecification$Companion_instance = this;\n }\n function LinesContentSpecification$Companion$LineSpec(label, pattern, fields) {\n LinesContentSpecification$Companion$LineSpec$Companion_getInstance();\n this.label = label;\n this.pattern = pattern;\n this.fields = fields;\n }\n function LinesContentSpecification$Companion$LineSpec$Companion() {\n LinesContentSpecification$Companion$LineSpec$Companion_instance = this;\n this.DEFAULT_LABEL_SPECIFIER = '@';\n }\n LinesContentSpecification$Companion$LineSpec$Companion.prototype.defaultLineForValueSource_u47np3$ = function (valueSource) {\n return new LinesContentSpecification$Companion$LineSpec(this.DEFAULT_LABEL_SPECIFIER, StringFormat.Companion.valueInLinePattern(), listOf(valueSource));\n };\n LinesContentSpecification$Companion$LineSpec$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var LinesContentSpecification$Companion$LineSpec$Companion_instance = null;\n function LinesContentSpecification$Companion$LineSpec$Companion_getInstance() {\n if (LinesContentSpecification$Companion$LineSpec$Companion_instance === null) {\n new LinesContentSpecification$Companion$LineSpec$Companion();\n }\n return LinesContentSpecification$Companion$LineSpec$Companion_instance;\n }\n LinesContentSpecification$Companion$LineSpec.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LineSpec',\n interfaces: []\n };\n LinesContentSpecification$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var LinesContentSpecification$Companion_instance = null;\n function LinesContentSpecification$Companion_getInstance() {\n if (LinesContentSpecification$Companion_instance === null) {\n new LinesContentSpecification$Companion();\n }\n return LinesContentSpecification$Companion_instance;\n }\n LinesContentSpecification.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'LinesContentSpecification',\n interfaces: []\n };\n LinesContentSpecification.prototype.component1 = function () {\n return this.valueSources;\n };\n LinesContentSpecification.prototype.component2 = function () {\n return this.linePatterns;\n };\n LinesContentSpecification.prototype.component3 = function () {\n return this.titleLine;\n };\n LinesContentSpecification.prototype.copy_v286ln$ = function (valueSources, linePatterns, titleLine) {\n return new LinesContentSpecification(valueSources === void 0 ? this.valueSources : valueSources, linePatterns === void 0 ? this.linePatterns : linePatterns, titleLine === void 0 ? this.titleLine : titleLine);\n };\n LinesContentSpecification.prototype.toString = function () {\n return 'LinesContentSpecification(valueSources=' + Kotlin.toString(this.valueSources) + (', linePatterns=' + Kotlin.toString(this.linePatterns)) + (', titleLine=' + Kotlin.toString(this.titleLine)) + ')';\n };\n LinesContentSpecification.prototype.hashCode = function () {\n var result = 0;\n result = result * 31 + Kotlin.hashCode(this.valueSources) | 0;\n result = result * 31 + Kotlin.hashCode(this.linePatterns) | 0;\n result = result * 31 + Kotlin.hashCode(this.titleLine) | 0;\n return result;\n };\n LinesContentSpecification.prototype.equals = function (other) {\n return this === other || (other !== null && (typeof other === 'object' && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && (Kotlin.equals(this.valueSources, other.valueSources) && Kotlin.equals(this.linePatterns, other.linePatterns) && Kotlin.equals(this.titleLine, other.titleLine)))));\n };\n function MappingValue(aes, isOutlier, isAxis, format) {\n if (isOutlier === void 0)\n isOutlier = false;\n if (isAxis === void 0)\n isAxis = false;\n if (format === void 0)\n format = null;\n this.aes = aes;\n this.isOutlier_cyn2n6$_0 = isOutlier;\n this.isAxis_ohfp7r$_0 = isAxis;\n this.format_0 = format;\n this.myDataAccess_biypgq$_0 = this.myDataAccess_biypgq$_0;\n this.myDataLabel_0 = null;\n this.myFormatter_0 = this.format_0 != null ? StringFormat.Companion.forOneArg_86f9bg$(this.format_0, void 0, this.aes.name) : null;\n }\n Object.defineProperty(MappingValue.prototype, 'isOutlier', {\n get: function () {\n return this.isOutlier_cyn2n6$_0;\n }\n });\n Object.defineProperty(MappingValue.prototype, 'isAxis', {\n get: function () {\n return this.isAxis_ohfp7r$_0;\n }\n });\n Object.defineProperty(MappingValue.prototype, 'myDataAccess_0', {\n configurable: true,\n get: function () {\n if (this.myDataAccess_biypgq$_0 == null)\n return throwUPAE('myDataAccess');\n return this.myDataAccess_biypgq$_0;\n },\n set: function (myDataAccess) {\n this.myDataAccess_biypgq$_0 = myDataAccess;\n }\n });\n MappingValue.prototype.initDataContext_nqispu$ = function (data, mappedDataAccess) {\n var tmp$;\n if (!(this.myDataAccess_biypgq$_0 == null)) {\n var message = 'Data context can be initialized only once';\n throw IllegalArgumentException_init(message.toString());\n }\n this.myDataAccess_0 = mappedDataAccess;\n if (!this.myDataAccess_0.isMapped_896ixz$(this.aes)) {\n var message_0 = this.aes.toString() + ' have to be mapped';\n throw IllegalArgumentException_init(message_0.toString());\n }\n var $receiver = listOf_0([Aes.Companion.X, Aes.Companion.Y]);\n var predicate = getCallableRef('isMapped', function ($receiver, p1) {\n return $receiver.isMapped_896ixz$(p1);\n }.bind(null, this.myDataAccess_0));\n var destination = ArrayList_init();\n var tmp$_0;\n tmp$_0 = $receiver.iterator();\n while (tmp$_0.hasNext()) {\n var element = tmp$_0.next();\n if (predicate(element))\n destination.add_11rb$(element);\n }\n var transform = getCallableRef('getMappedDataLabel', function ($receiver, p1) {\n return $receiver.getMappedDataLabel_896ixz$(p1);\n }.bind(null, this.myDataAccess_0));\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(destination, 10));\n var tmp$_1;\n tmp$_1 = destination.iterator();\n while (tmp$_1.hasNext()) {\n var item = tmp$_1.next();\n destination_0.add_11rb$(transform(item));\n }\n var axisLabels = destination_0;\n var dataLabel = this.myDataAccess_0.getMappedDataLabel_896ixz$(this.aes);\n if (this.isAxis)\n tmp$ = null;\n else if (this.isOutlier)\n tmp$ = null;\n else {\n if (dataLabel.length === 0)\n tmp$ = '';\n else if (axisLabels.contains_11rb$(dataLabel))\n tmp$ = '';\n else\n tmp$ = dataLabel;\n }\n this.myDataLabel_0 = tmp$;\n };\n function MappingValue$getDataPoint$lambda$lambda(closure$tooltipAes, closure$ctx) {\n return function () {\n return TooltipFormatting_getInstance().createFormatter_d58xd9$(closure$tooltipAes, closure$ctx);\n };\n }\n MappingValue.prototype.getDataPoint_o6b7hq$ = function (index, ctx) {\n var tmp$;\n var originalValue = this.myDataAccess_0.getOriginalValue_m6grlz$(this.aes, index);\n var tmp$_0;\n if (originalValue != null) {\n var tmp$_1;\n tmp$_0 = (tmp$_1 = this.myFormatter_0) != null ? tmp$_1.format_za3rmp$(originalValue) : null;\n } else\n tmp$_0 = null;\n var tmp$_2;\n if ((tmp$ = tmp$_0) != null)\n tmp$_2 = tmp$;\n else {\n var tmp$_3;\n if (Aes.Companion.isPositionalXY_896ixz$(this.aes))\n tmp$_3 = Aes.Companion.toAxisAes_pnj1mo$(this.aes, this.myDataAccess_0.isYOrientation);\n else\n tmp$_3 = this.aes;\n var tooltipAes = tmp$_3;\n tmp$_2 = ctx.getTooltipFormatter_scwrln$(tooltipAes, MappingValue$getDataPoint$lambda$lambda(tooltipAes, ctx))(originalValue);\n }\n var formattedValue = tmp$_2;\n return new TooltipLineSpec$DataPoint(this.myDataLabel_0, formattedValue, this.aes, this.isAxis, this.isOutlier);\n };\n MappingValue.prototype.copy = function () {\n return new MappingValue(this.aes, this.isOutlier, this.isAxis, this.format_0);\n };\n MappingValue.prototype.withFlags_dqye30$ = function (isOutlier, isAxis) {\n return new MappingValue(this.aes, isOutlier, isAxis, this.format_0);\n };\n MappingValue.prototype.getAnnotationText_za3lpa$ = function (index) {\n var tmp$, tmp$_0, tmp$_1;\n tmp$ = this.myDataAccess_0.getOriginalValue_m6grlz$(this.aes, index);\n if (tmp$ == null) {\n return null;\n }\n var originalValue = tmp$;\n return (tmp$_1 = (tmp$_0 = this.myFormatter_0) != null ? tmp$_0.format_za3rmp$(originalValue) : null) != null ? tmp$_1 : originalValue.toString();\n };\n MappingValue.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'MappingValue',\n interfaces: [ValueSource]\n };\n function TooltipFormatting() {\n TooltipFormatting_instance = this;\n }\n function TooltipFormatting$createFormatter$lambda(closure$formatter) {\n return function (value) {\n var tmp$;\n var tmp$_0;\n tmp$_0 = value != null ? closure$formatter(value) : null;\n return (tmp$ = tmp$_0) != null ? tmp$ : 'n/a';\n };\n }\n function TooltipFormatting$createFormatter$lambda_0(closure$labelsMap) {\n return function (value) {\n var tmp$;\n var tmp$_0;\n tmp$_0 = value != null ? closure$labelsMap.get_11rb$(value) : null;\n return (tmp$ = tmp$_0) != null ? tmp$ : 'n/a';\n };\n }\n TooltipFormatting.prototype.createFormatter_d58xd9$ = function (aes, ctx) {\n if (!(!Aes.Companion.isPositionalXY_896ixz$(aes) || equals(aes, Aes.Companion.X) || equals(aes, Aes.Companion.Y))) {\n var message = 'Positional aesthetic should be either X or Y but was ' + aes;\n throw IllegalStateException_init(message.toString());\n }\n var scale_0 = ctx.getScale_896ixz$(aes);\n if (scale_0.isContinuousDomain) {\n var domain = ctx.overallTransformedDomain_896ixz$(aes);\n var formatter = scale_0.getBreaksGenerator().defaultFormatter_f140j5$(domain, 100);\n return TooltipFormatting$createFormatter$lambda(formatter);\n } else {\n var labelsMap = scale.ScaleUtil.labelByBreak_x4zrm4$(scale_0);\n return TooltipFormatting$createFormatter$lambda_0(labelsMap);\n }\n };\n TooltipFormatting.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'TooltipFormatting',\n interfaces: []\n };\n var TooltipFormatting_instance = null;\n function TooltipFormatting_getInstance() {\n if (TooltipFormatting_instance === null) {\n new TooltipFormatting();\n }\n return TooltipFormatting_instance;\n }\n function TooltipLine(label, pattern, fields) {\n TooltipLine$Companion_getInstance();\n LinesContentSpecification$Companion$LineSpec.call(this, label, pattern, fields);\n this.myLineFormatter_0 = StringFormat.Companion.forNArgs_zeh6sj$(pattern, fields.size, 'fields');\n }\n TooltipLine.prototype.initDataContext_nqispu$ = function (data, mappedDataAccess) {\n var tmp$;\n tmp$ = this.fields.iterator();\n while (tmp$.hasNext()) {\n var element = tmp$.next();\n element.initDataContext_nqispu$(data, mappedDataAccess);\n }\n };\n function TooltipLine$getDataPoint$lambda(it) {\n var tmp$;\n return (tmp$ = it.label) != null ? tmp$ : '';\n }\n TooltipLine.prototype.getDataPoint_o6b7hq$ = function (index, ctx) {\n var tmp$;\n var $receiver = this.fields;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$_0;\n tmp$_0 = $receiver.iterator();\n while (tmp$_0.hasNext()) {\n var item = tmp$_0.next();\n var tmp$_1 = destination.add_11rb$;\n var tmp$_2;\n tmp$_2 = item.getDataPoint_o6b7hq$(index, ctx);\n if (tmp$_2 == null) {\n return null;\n }\n tmp$_1.call(destination, tmp$_2);\n }\n var dataValues = destination;\n if (dataValues.size === 1) {\n var dataValue = single(dataValues);\n tmp$ = new TooltipLineSpec$DataPoint(this.chooseLabel_0(dataValue.label), this.myLineFormatter_0.format_za3rmp$(dataValue.value), dataValue.aes, dataValue.isAxis, dataValue.isOutlier);\n } else {\n var tmp$_3 = this.chooseLabel_0(joinToString_0(dataValues, ', ', void 0, void 0, void 0, void 0, TooltipLine$getDataPoint$lambda));\n var tmp$_4 = this.myLineFormatter_0;\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault(dataValues, 10));\n var tmp$_5;\n tmp$_5 = dataValues.iterator();\n while (tmp$_5.hasNext()) {\n var item_0 = tmp$_5.next();\n destination_0.add_11rb$(item_0.value);\n }\n tmp$ = new TooltipLineSpec$DataPoint(tmp$_3, tmp$_4.format_pqjuzw$(destination_0), null, false, false);\n }\n return tmp$;\n };\n TooltipLine.prototype.chooseLabel_0 = function (dataLabel) {\n var tmp$;\n if (equals(this.label, LinesContentSpecification$Companion$LineSpec$Companion_getInstance().DEFAULT_LABEL_SPECIFIER))\n tmp$ = dataLabel;\n else\n tmp$ = this.label;\n return tmp$;\n };\n function TooltipLine$Companion() {\n TooltipLine$Companion_instance = this;\n }\n TooltipLine$Companion.prototype.defaultLineForValueSource_u47np3$ = function (valueSource) {\n return TooltipLine_init(LinesContentSpecification$Companion$LineSpec$Companion_getInstance().defaultLineForValueSource_u47np3$(valueSource));\n };\n TooltipLine$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var TooltipLine$Companion_instance = null;\n function TooltipLine$Companion_getInstance() {\n if (TooltipLine$Companion_instance === null) {\n new TooltipLine$Companion();\n }\n return TooltipLine$Companion_instance;\n }\n TooltipLine.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TooltipLine',\n interfaces: [TooltipLineSpec, LinesContentSpecification$Companion$LineSpec]\n };\n function TooltipLine_init(other, $this) {\n $this = $this || Object.create(TooltipLine.prototype);\n var tmp$ = other.label;\n var tmp$_0 = other.pattern;\n var $receiver = other.fields;\n var destination = ArrayList_init_0(collectionSizeOrDefault($receiver, 10));\n var tmp$_1;\n tmp$_1 = $receiver.iterator();\n while (tmp$_1.hasNext()) {\n var item = tmp$_1.next();\n destination.add_11rb$(item.copy());\n }\n TooltipLine.call($this, tmp$, tmp$_0, destination);\n return $this;\n }\n function TooltipSpecification(valueSources, tooltipLinePatterns, tooltipProperties, tooltipTitle) {\n TooltipSpecification$Companion_getInstance();\n this.valueSources = valueSources;\n this.tooltipLinePatterns = tooltipLinePatterns;\n this.tooltipProperties = tooltipProperties;\n this.tooltipTitle = tooltipTitle;\n }\n function TooltipSpecification$TooltipProperties(anchor, minWidth) {\n TooltipSpecification$TooltipProperties$Companion_getInstance();\n this.anchor = anchor;\n this.minWidth = minWidth;\n }\n function TooltipSpecification$TooltipProperties$Companion() {\n TooltipSpecification$TooltipProperties$Companion_instance = this;\n this.NONE = new TooltipSpecification$TooltipProperties(null, null);\n }\n TooltipSpecification$TooltipProperties$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var TooltipSpecification$TooltipProperties$Companion_instance = null;\n function TooltipSpecification$TooltipProperties$Companion_getInstance() {\n if (TooltipSpecification$TooltipProperties$Companion_instance === null) {\n new TooltipSpecification$TooltipProperties$Companion();\n }\n return TooltipSpecification$TooltipProperties$Companion_instance;\n }\n TooltipSpecification$TooltipProperties.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TooltipProperties',\n interfaces: []\n };\n TooltipSpecification.prototype.useDefaultTooltips = function () {\n return this.tooltipLinePatterns == null;\n };\n TooltipSpecification.prototype.hideTooltips = function () {\n var tmp$, tmp$_0;\n return (tmp$_0 = (tmp$ = this.tooltipLinePatterns) != null ? tmp$.isEmpty() : null) != null ? tmp$_0 : false;\n };\n function TooltipSpecification$Companion() {\n TooltipSpecification$Companion_instance = this;\n }\n TooltipSpecification$Companion.prototype.withoutTooltip = function () {\n return new TooltipSpecification(emptyList(), emptyList(), TooltipSpecification$TooltipProperties$Companion_getInstance().NONE, null);\n };\n TooltipSpecification$Companion.prototype.defaultTooltip = function () {\n return new TooltipSpecification(emptyList(), null, TooltipSpecification$TooltipProperties$Companion_getInstance().NONE, null);\n };\n TooltipSpecification$Companion.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'Companion',\n interfaces: []\n };\n var TooltipSpecification$Companion_instance = null;\n function TooltipSpecification$Companion_getInstance() {\n if (TooltipSpecification$Companion_instance === null) {\n new TooltipSpecification$Companion();\n }\n return TooltipSpecification$Companion_instance;\n }\n TooltipSpecification.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'TooltipSpecification',\n interfaces: []\n };\n function ValueSource() {\n }\n ValueSource.$metadata$ = {\n kind: Kind_INTERFACE,\n simpleName: 'ValueSource',\n interfaces: []\n };\n var package$jetbrains = _.jetbrains || (_.jetbrains = {});\n var package$datalore = package$jetbrains.datalore || (package$jetbrains.datalore = {});\n var package$plot = package$datalore.plot || (package$datalore.plot = {});\n Object.defineProperty(package$plot, 'FeatureSwitch', {\n get: FeatureSwitch_getInstance\n });\n var package$builder = package$plot.builder || (package$plot.builder = {});\n Object.defineProperty(package$builder, 'AxisUtil', {\n get: AxisUtil_getInstance\n });\n package$builder.BogusScale = BogusScale;\n Object.defineProperty(package$builder, 'DemoAndTest', {\n get: DemoAndTest_getInstance\n });\n package$builder.FrameOfReference = FrameOfReference;\n package$builder.FrameOfReferenceProvider = FrameOfReferenceProvider;\n package$builder.GeomLayer = GeomLayer;\n Object.defineProperty(package$builder, 'GeomLayerListUtil', {\n get: GeomLayerListUtil_getInstance\n });\n LayerRendererUtil.prototype.LayerRendererData = LayerRendererUtil$LayerRendererData;\n Object.defineProperty(package$builder, 'LayerRendererUtil', {\n get: LayerRendererUtil_getInstance\n });\n Object.defineProperty(MarginSide, 'LEFT', {\n get: MarginSide$LEFT_getInstance\n });\n Object.defineProperty(MarginSide, 'RIGHT', {\n get: MarginSide$RIGHT_getInstance\n });\n Object.defineProperty(MarginSide, 'TOP', {\n get: MarginSide$TOP_getInstance\n });\n Object.defineProperty(MarginSide, 'BOTTOM', {\n get: MarginSide$BOTTOM_getInstance\n });\n package$builder.MarginSide = MarginSide;\n Object.defineProperty(package$builder, 'MarginalLayerUtil', {\n get: MarginalLayerUtil_getInstance\n });\n Object.defineProperty(PlotContainerPortable, 'Companion', {\n get: PlotContainerPortable$Companion_getInstance\n });\n package$builder.PlotContainerPortable = PlotContainerPortable;\n Object.defineProperty(PlotSvgComponent, 'Companion', {\n get: PlotSvgComponent$Companion_getInstance\n });\n package$builder.PlotSvgComponent = PlotSvgComponent;\n Object.defineProperty(PlotTile, 'Companion', {\n get: PlotTile$Companion_getInstance\n });\n package$builder.PlotTile = PlotTile;\n Object.defineProperty(PlotUtil.prototype, 'DemoAndTest', {\n get: PlotUtil$DemoAndTest_getInstance\n });\n Object.defineProperty(package$builder, 'PlotUtil', {\n get: PlotUtil_getInstance\n });\n package$builder.PosProviderContext = PosProviderContext;\n package$builder.SvgLayerRenderer = SvgLayerRenderer;\n package$builder.VarBinding = VarBinding;\n Object.defineProperty(AnnotationLine, 'Companion', {\n get: AnnotationLine$Companion_getInstance\n });\n var package$annotation = package$builder.annotation || (package$builder.annotation = {});\n package$annotation.AnnotationLine_init_cpanxn$ = AnnotationLine_init;\n package$annotation.AnnotationLine = AnnotationLine;\n Object.defineProperty(AnnotationSpecification, 'Companion', {\n get: AnnotationSpecification$Companion_getInstance\n });\n package$annotation.AnnotationSpecification = AnnotationSpecification;\n Object.defineProperty(ColorBarAssembler, 'Companion', {\n get: ColorBarAssembler$Companion_getInstance\n });\n var package$assemble = package$builder.assemble || (package$builder.assemble = {});\n package$assemble.ColorBarAssembler = ColorBarAssembler;\n package$assemble.ColorBarOptions = ColorBarOptions;\n package$assemble.GeomContextBuilder_init = GeomContextBuilder_init;\n package$assemble.GeomContextBuilder = GeomContextBuilder;\n Object.defineProperty(GeomLayerBuilder, 'Companion', {\n get: GeomLayerBuilder$Companion_getInstance\n });\n package$assemble.GeomLayerBuilder = GeomLayerBuilder;\n Object.defineProperty(GuideOptions, 'Companion', {\n get: GuideOptions$Companion_getInstance\n });\n package$assemble.GuideOptions = GuideOptions;\n ImmutableGeomContext.Builder = ImmutableGeomContext$Builder;\n package$assemble.ImmutableGeomContext = ImmutableGeomContext;\n Object.defineProperty(LegendAssembler, 'Companion', {\n get: LegendAssembler$Companion_getInstance\n });\n package$assemble.LegendAssembler = LegendAssembler;\n Object.defineProperty(package$assemble, 'LegendAssemblerUtil', {\n get: LegendAssemblerUtil_getInstance\n });\n Object.defineProperty(LegendOptions, 'Companion', {\n get: LegendOptions$Companion_getInstance\n });\n package$assemble.LegendOptions = LegendOptions;\n Object.defineProperty(PlotAssembler, 'Companion', {\n get: PlotAssembler$Companion_getInstance\n });\n package$assemble.PlotAssembler = PlotAssembler;\n package$assemble.PlotAssemblerPlotContext = PlotAssemblerPlotContext;\n Object.defineProperty(package$assemble, 'PlotAssemblerUtil', {\n get: PlotAssemblerUtil_getInstance\n });\n Object.defineProperty(PlotFacets, 'Companion', {\n get: PlotFacets$Companion_getInstance\n });\n PlotFacets.FacetTileInfo = PlotFacets$FacetTileInfo;\n package$assemble.PlotFacets = PlotFacets;\n Object.defineProperty(package$assemble, 'PlotGuidesAssemblerUtil', {\n get: PlotGuidesAssemblerUtil_getInstance\n });\n Object.defineProperty(PosProvider, 'Companion', {\n get: PosProvider$Companion_getInstance\n });\n package$assemble.PosProvider = PosProvider;\n Object.defineProperty(package$assemble, 'PositionalScalesUtil', {\n get: PositionalScalesUtil_getInstance\n });\n package$assemble.StitchedPlotLayer = StitchedPlotLayer;\n Object.defineProperty(package$assemble, 'TestingPlotContext', {\n get: TestingPlotContext_getInstance\n });\n Object.defineProperty(TypedScaleMap, 'Companion', {\n get: TypedScaleMap$Companion_getInstance\n });\n package$assemble.TypedScaleMap = TypedScaleMap;\n var package$facet = package$assemble.facet || (package$assemble.facet = {});\n package$facet.FacetGrid = FacetGrid;\n Object.defineProperty(FacetScales, 'FIXED', {\n get: FacetScales$FIXED_getInstance\n });\n Object.defineProperty(FacetScales, 'FREE', {\n get: FacetScales$FREE_getInstance\n });\n Object.defineProperty(FacetScales, 'FREE_X', {\n get: FacetScales$FREE_X_getInstance\n });\n Object.defineProperty(FacetScales, 'FREE_Y', {\n get: FacetScales$FREE_Y_getInstance\n });\n package$facet.FacetScales = FacetScales;\n Object.defineProperty(FacetWrap$Direction, 'H', {\n get: FacetWrap$Direction$H_getInstance\n });\n Object.defineProperty(FacetWrap$Direction, 'V', {\n get: FacetWrap$Direction$V_getInstance\n });\n FacetWrap.Direction = FacetWrap$Direction;\n Object.defineProperty(FacetWrap, 'Companion', {\n get: FacetWrap$Companion_getInstance\n });\n package$facet.FacetWrap = FacetWrap;\n var package$geom = package$assemble.geom || (package$assemble.geom = {});\n Object.defineProperty(package$geom, 'DefaultSampling', {\n get: DefaultSampling_getInstance\n });\n Object.defineProperty(GeomProvider, 'Companion', {\n get: GeomProvider$Companion_getInstance\n });\n package$geom.GeomProvider = GeomProvider;\n package$geom.PointDataAccess = PointDataAccess;\n var package$coord = package$builder.coord || (package$builder.coord = {});\n package$coord.CartesianCoordProvider = CartesianCoordProvider;\n package$coord.CoordProvider = CoordProvider;\n package$coord.CoordProviderBase = CoordProviderBase;\n Object.defineProperty(package$coord, 'CoordProviders', {\n get: CoordProviders_getInstance\n });\n Object.defineProperty(FixedRatioCoordProvider, 'Companion', {\n get: FixedRatioCoordProvider$Companion_getInstance\n });\n package$coord.FixedRatioCoordProvider = FixedRatioCoordProvider;\n package$coord.MarginalLayerCoordProvider = MarginalLayerCoordProvider;\n package$coord.ProjectionCoordProvider = ProjectionCoordProvider;\n DataProcessing.prototype.DataAndGroupingContext = DataProcessing$DataAndGroupingContext;\n var package$data = package$builder.data || (package$builder.data = {});\n Object.defineProperty(package$data, 'DataProcessing', {\n get: DataProcessing_getInstance\n });\n GroupMerger.Group = GroupMerger$Group;\n package$data.GroupMerger = GroupMerger;\n Object.defineProperty(package$data, 'GroupUtil', {\n get: GroupUtil_getInstance\n });\n Object.defineProperty(GroupingContext, 'Companion', {\n get: GroupingContext$Companion_getInstance\n });\n package$data.GroupingContext = GroupingContext;\n Object.defineProperty(OrderOptionUtil$OrderOption, 'Companion', {\n get: OrderOptionUtil$OrderOption$Companion_getInstance\n });\n OrderOptionUtil.prototype.OrderOption = OrderOptionUtil$OrderOption;\n Object.defineProperty(package$data, 'OrderOptionUtil', {\n get: OrderOptionUtil_getInstance\n });\n package$data.StatInput = StatInput;\n Object.defineProperty(package$data, 'YOrientationUtil', {\n get: YOrientationUtil_getInstance\n });\n var package$defaultTheme = package$builder.defaultTheme || (package$builder.defaultTheme = {});\n package$defaultTheme.DefaultAxisTheme = DefaultAxisTheme;\n package$defaultTheme.DefaultFacetsTheme = DefaultFacetsTheme;\n package$defaultTheme.DefaultLegendTheme = DefaultLegendTheme;\n package$defaultTheme.DefaultPanelGridTheme = DefaultPanelGridTheme;\n package$defaultTheme.DefaultPanelTheme = DefaultPanelTheme;\n package$defaultTheme.DefaultPlotTheme = DefaultPlotTheme;\n Object.defineProperty(DefaultTheme, 'Companion', {\n get: DefaultTheme$Companion_getInstance\n });\n package$defaultTheme.DefaultTheme = DefaultTheme;\n package$defaultTheme.DefaultTooltipsTheme = DefaultTooltipsTheme;\n Object.defineProperty(ThemeFlavor, 'Companion', {\n get: ThemeFlavor$Companion_getInstance\n });\n package$defaultTheme.ThemeFlavor = ThemeFlavor;\n package$defaultTheme.ThemeValuesAccess = ThemeValuesAccess;\n Object.defineProperty(ThemeOption$Elem.prototype, 'Margin', {\n get: ThemeOption$Elem$Margin_getInstance\n });\n Object.defineProperty(ThemeOption.prototype, 'Elem', {\n get: ThemeOption$Elem_getInstance\n });\n Object.defineProperty(ThemeOption.prototype, 'Name', {\n get: ThemeOption$Name_getInstance\n });\n Object.defineProperty(ThemeOption.prototype, 'Flavor', {\n get: ThemeOption$Flavor_getInstance\n });\n Object.defineProperty(ThemeOption.prototype, 'ForTest', {\n get: ThemeOption$ForTest_getInstance\n });\n var package$values = package$defaultTheme.values || (package$defaultTheme.values = {});\n Object.defineProperty(package$values, 'ThemeOption', {\n get: ThemeOption_getInstance\n });\n Object.defineProperty(ThemeValues, 'Companion', {\n get: ThemeValues$Companion_getInstance\n });\n package$values.ThemeValues = ThemeValues;\n Object.defineProperty(ThemeValuesBase, 'Companion', {\n get: ThemeValuesBase$Companion_getInstance\n });\n package$values.ThemeValuesBase = ThemeValuesBase;\n Object.defineProperty(ThemeValuesLPMinimal2, 'Companion', {\n get: ThemeValuesLPMinimal2$Companion_getInstance\n });\n package$values.ThemeValuesLPMinimal2 = ThemeValuesLPMinimal2;\n package$values.ThemeValuesLPNone = ThemeValuesLPNone;\n Object.defineProperty(ThemeValuesRBW, 'Companion', {\n get: ThemeValuesRBW$Companion_getInstance\n });\n package$values.ThemeValuesRBW = ThemeValuesRBW;\n Object.defineProperty(ThemeValuesRClassic, 'Companion', {\n get: ThemeValuesRClassic$Companion_getInstance\n });\n package$values.ThemeValuesRClassic = ThemeValuesRClassic;\n Object.defineProperty(ThemeValuesRGrey, 'Companion', {\n get: ThemeValuesRGrey$Companion_getInstance\n });\n package$values.ThemeValuesRGrey = ThemeValuesRGrey;\n Object.defineProperty(ThemeValuesRLight, 'Companion', {\n get: ThemeValuesRLight$Companion_getInstance\n });\n package$values.ThemeValuesRLight = ThemeValuesRLight;\n Object.defineProperty(ThemeValuesRMinimal, 'Companion', {\n get: ThemeValuesRMinimal$Companion_getInstance\n });\n package$values.ThemeValuesRMinimal = ThemeValuesRMinimal;\n var package$event = package$builder.event || (package$builder.event = {});\n package$event.MouseEventPeer = MouseEventPeer;\n var package$frame = package$builder.frame || (package$builder.frame = {});\n package$frame.BogusFrameOfReference = BogusFrameOfReference;\n package$frame.BogusFrameOfReferenceProvider = BogusFrameOfReferenceProvider;\n package$frame.MarginalFrameOfReference = MarginalFrameOfReference;\n Object.defineProperty(SquareFrameOfReference, 'Companion', {\n get: SquareFrameOfReference$Companion_getInstance\n });\n package$frame.SquareFrameOfReference = SquareFrameOfReference;\n package$frame.SquareFrameOfReferenceProvider = SquareFrameOfReferenceProvider;\n AxisComponent.BreaksData = AxisComponent$BreaksData;\n AxisComponent.TickLabelAdjustments = AxisComponent$TickLabelAdjustments;\n var package$guide = package$builder.guide || (package$builder.guide = {});\n package$guide.AxisComponent = AxisComponent;\n package$guide.ColorBarComponent = ColorBarComponent;\n ColorBarComponentLayout.BreakInfo = ColorBarComponentLayout$BreakInfo;\n Object.defineProperty(ColorBarComponentLayout, 'Companion', {\n get: ColorBarComponentLayout$Companion_getInstance\n });\n package$guide.ColorBarComponentLayout = ColorBarComponentLayout;\n Object.defineProperty(ColorBarComponentSpec, 'Companion', {\n get: ColorBarComponentSpec$Companion_getInstance\n });\n package$guide.ColorBarComponentSpec = ColorBarComponentSpec;\n Object.defineProperty(LegendArrangement, 'HORIZONTAL', {\n get: LegendArrangement$HORIZONTAL_getInstance\n });\n Object.defineProperty(LegendArrangement, 'VERTICAL', {\n get: LegendArrangement$VERTICAL_getInstance\n });\n package$guide.LegendArrangement = LegendArrangement;\n Object.defineProperty(LegendBox, 'Companion', {\n get: LegendBox$Companion_getInstance\n });\n package$guide.LegendBox = LegendBox;\n package$guide.LegendBoxLayout = LegendBoxLayout;\n package$guide.LegendBoxSpec = LegendBoxSpec;\n Object.defineProperty(LegendBreak, 'Companion', {\n get: LegendBreak$Companion_getInstance\n });\n package$guide.LegendBreak = LegendBreak;\n package$guide.LegendComponent = LegendComponent;\n Object.defineProperty(LegendComponentLayout, 'Companion', {\n get: LegendComponentLayout$Companion_getInstance\n });\n package$guide.LegendComponentLayout = LegendComponentLayout;\n package$guide.LegendComponentSpec = LegendComponentSpec;\n Object.defineProperty(LegendDirection, 'HORIZONTAL', {\n get: LegendDirection$HORIZONTAL_getInstance\n });\n Object.defineProperty(LegendDirection, 'VERTICAL', {\n get: LegendDirection$VERTICAL_getInstance\n });\n Object.defineProperty(LegendDirection, 'AUTO', {\n get: LegendDirection$AUTO_getInstance\n });\n package$guide.LegendDirection = LegendDirection;\n Object.defineProperty(LegendJustification, 'Companion', {\n get: LegendJustification$Companion_getInstance\n });\n package$guide.LegendJustification = LegendJustification;\n Object.defineProperty(LegendPosition, 'Companion', {\n get: LegendPosition$Companion_getInstance\n });\n package$guide.LegendPosition = LegendPosition;\n Object.defineProperty(Orientation, 'LEFT', {\n get: Orientation$LEFT_getInstance\n });\n Object.defineProperty(Orientation, 'RIGHT', {\n get: Orientation$RIGHT_getInstance\n });\n Object.defineProperty(Orientation, 'TOP', {\n get: Orientation$TOP_getInstance\n });\n Object.defineProperty(Orientation, 'BOTTOM', {\n get: Orientation$BOTTOM_getInstance\n });\n package$guide.Orientation = Orientation;\n Object.defineProperty(ContextualMappingProvider, 'Companion', {\n get: ContextualMappingProvider$Companion_getInstance\n });\n var package$interact = package$builder.interact || (package$builder.interact = {});\n package$interact.ContextualMappingProvider = ContextualMappingProvider;\n Object.defineProperty(GeomInteraction, 'Companion', {\n get: GeomInteraction$Companion_getInstance\n });\n package$interact.GeomInteraction = GeomInteraction;\n GeomInteractionBuilder.DemoAndTest = GeomInteractionBuilder$DemoAndTest;\n package$interact.GeomInteractionBuilder = GeomInteractionBuilder;\n Object.defineProperty(package$interact, 'GeomInteractionBuilderUtil', {\n get: GeomInteractionBuilderUtil_getInstance\n });\n Object.defineProperty(GeomTooltipSetup, 'Companion', {\n get: GeomTooltipSetup$Companion_getInstance\n });\n package$interact.GeomTooltipSetup = GeomTooltipSetup;\n Object.defineProperty(MathUtil$ClosestPointChecker$COMPARISON_RESULT, 'NEW_CLOSER', {\n get: MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_CLOSER_getInstance\n });\n Object.defineProperty(MathUtil$ClosestPointChecker$COMPARISON_RESULT, 'NEW_FARTHER', {\n get: MathUtil$ClosestPointChecker$COMPARISON_RESULT$NEW_FARTHER_getInstance\n });\n Object.defineProperty(MathUtil$ClosestPointChecker$COMPARISON_RESULT, 'EQUAL', {\n get: MathUtil$ClosestPointChecker$COMPARISON_RESULT$EQUAL_getInstance\n });\n MathUtil$ClosestPointChecker.COMPARISON_RESULT = MathUtil$ClosestPointChecker$COMPARISON_RESULT;\n MathUtil.prototype.ClosestPointChecker_init_lu1900$ = MathUtil$MathUtil$ClosestPointChecker_init;\n MathUtil.prototype.ClosestPointChecker = MathUtil$ClosestPointChecker;\n Object.defineProperty(package$interact, 'MathUtil', {\n get: MathUtil_getInstance\n });\n package$interact.PlotInteractor = PlotInteractor;\n Object.defineProperty(TooltipSpec$Line, 'Companion', {\n get: TooltipSpec$Line$Companion_getInstance\n });\n TooltipSpec.Line = TooltipSpec$Line;\n package$interact.TooltipSpec = TooltipSpec;\n package$interact.TooltipSpecFactory = TooltipSpecFactory;\n var package$loc = package$interact.loc || (package$interact.loc = {});\n package$loc.FlippedTargetCollector = FlippedTargetCollector;\n package$loc.LayerTargetCollectorWithLocator = LayerTargetCollectorWithLocator;\n LayerTargetLocator.Target = LayerTargetLocator$Target;\n Object.defineProperty(LayerTargetLocator$Collector$CollectingStrategy, 'APPEND', {\n get: LayerTargetLocator$Collector$CollectingStrategy$APPEND_getInstance\n });\n Object.defineProperty(LayerTargetLocator$Collector$CollectingStrategy, 'REPLACE', {\n get: LayerTargetLocator$Collector$CollectingStrategy$REPLACE_getInstance\n });\n Object.defineProperty(LayerTargetLocator$Collector$CollectingStrategy, 'APPEND_IF_EQUAL', {\n get: LayerTargetLocator$Collector$CollectingStrategy$APPEND_IF_EQUAL_getInstance\n });\n Object.defineProperty(LayerTargetLocator$Collector$CollectingStrategy, 'IGNORE', {\n get: LayerTargetLocator$Collector$CollectingStrategy$IGNORE_getInstance\n });\n LayerTargetLocator$Collector.CollectingStrategy = LayerTargetLocator$Collector$CollectingStrategy;\n LayerTargetLocator.Collector = LayerTargetLocator$Collector;\n package$loc.LayerTargetLocator = LayerTargetLocator;\n Object.defineProperty(LocatedTargetsPicker, 'Companion', {\n get: LocatedTargetsPicker$Companion_getInstance\n });\n package$loc.LocatedTargetsPicker = LocatedTargetsPicker;\n Object.defineProperty(TargetDetector, 'Companion', {\n get: TargetDetector$Companion_getInstance\n });\n package$loc.TargetDetector = TargetDetector;\n package$loc.TargetProjection = TargetProjection;\n Object.defineProperty(PointTargetProjection, 'Companion', {\n get: PointTargetProjection$Companion_getInstance\n });\n package$loc.PointTargetProjection = PointTargetProjection;\n Object.defineProperty(RectTargetProjection, 'Companion', {\n get: RectTargetProjection$Companion_getInstance\n });\n package$loc.RectTargetProjection = RectTargetProjection;\n Object.defineProperty(PolygonTargetProjection, 'Companion', {\n get: PolygonTargetProjection$Companion_getInstance\n });\n PolygonTargetProjection.RingXY = PolygonTargetProjection$RingXY;\n package$loc.PolygonTargetProjection = PolygonTargetProjection;\n Object.defineProperty(PathTargetProjection$PathPoint, 'Companion', {\n get: PathTargetProjection$PathPoint$Companion_getInstance\n });\n PathTargetProjection.PathPoint = PathTargetProjection$PathPoint;\n Object.defineProperty(PathTargetProjection, 'Companion', {\n get: PathTargetProjection$Companion_getInstance\n });\n package$loc.PathTargetProjection = PathTargetProjection;\n Object.defineProperty(TargetPrototype, 'Companion', {\n get: TargetPrototype$Companion_getInstance\n });\n package$loc.TargetPrototype = TargetPrototype;\n package$loc.TransformedTargetLocator = TransformedTargetLocator;\n Object.defineProperty(YOrientationTargetCollector, 'Companion', {\n get: YOrientationTargetCollector$Companion_getInstance\n });\n package$loc.YOrientationTargetCollector = YOrientationTargetCollector;\n var package$tool = package$interact.tool || (package$interact.tool = {});\n package$tool.ToolFeedback = ToolFeedback;\n var package$layout = package$builder.layout || (package$builder.layout = {});\n package$layout.AxisLayout = AxisLayout;\n package$layout.AxisLayoutInfo = AxisLayoutInfo;\n Object.defineProperty(FacetedPlotLayout, 'Companion', {\n get: FacetedPlotLayout$Companion_getInstance\n });\n package$layout.FacetedPlotLayout = FacetedPlotLayout;\n Object.defineProperty(package$layout, 'FacetedPlotLayoutUtil', {\n get: FacetedPlotLayoutUtil_getInstance\n });\n Object.defineProperty(GeomMarginsLayout, 'Companion', {\n get: GeomMarginsLayout$Companion_getInstance\n });\n package$layout.GeomMarginsLayout = GeomMarginsLayout;\n Object.defineProperty(package$layout, 'GeometryUtil', {\n get: GeometryUtil_getInstance\n });\n Object.defineProperty(LegendBoxInfo, 'Companion', {\n get: LegendBoxInfo$Companion_getInstance\n });\n package$layout.LegendBoxInfo = LegendBoxInfo;\n LegendBoxesLayout.BoxWithLocation = LegendBoxesLayout$BoxWithLocation;\n package$layout.LegendBoxesLayout = LegendBoxesLayout;\n Object.defineProperty(package$layout, 'LegendBoxesLayoutUtil', {\n get: LegendBoxesLayoutUtil_getInstance\n });\n package$layout.LegendsBlockInfo = LegendsBlockInfo;\n package$layout.Margins = Margins;\n package$layout.PlotAxisLayout = PlotAxisLayout;\n Object.defineProperty(package$layout, 'PlotAxisLayoutUtil', {\n get: PlotAxisLayoutUtil_getInstance\n });\n Object.defineProperty(package$layout, 'PlotLabelSpecFactory', {\n get: PlotLabelSpecFactory_getInstance\n });\n package$layout.PlotLayout = PlotLayout;\n package$layout.PlotLayoutBase = PlotLayoutBase;\n package$layout.PlotLayoutInfo = PlotLayoutInfo;\n Object.defineProperty(package$layout, 'PlotLayoutUtil', {\n get: PlotLayoutUtil_getInstance\n });\n Object.defineProperty(SingleTilePlotLayout, 'Companion', {\n get: SingleTilePlotLayout$Companion_getInstance\n });\n package$layout.SingleTilePlotLayout = SingleTilePlotLayout;\n Object.defineProperty(TextJustification$Companion$TextRotation, 'CLOCKWISE', {\n get: TextJustification$Companion$TextRotation$CLOCKWISE_getInstance\n });\n Object.defineProperty(TextJustification$Companion$TextRotation, 'ANTICLOCKWISE', {\n get: TextJustification$Companion$TextRotation$ANTICLOCKWISE_getInstance\n });\n TextJustification$Companion.prototype.TextRotation = TextJustification$Companion$TextRotation;\n Object.defineProperty(TextJustification, 'Companion', {\n get: TextJustification$Companion_getInstance\n });\n package$layout.TextJustification = TextJustification;\n package$layout.TileLayout = TileLayout;\n package$layout.TileLayoutInfo = TileLayoutInfo;\n package$layout.TileLayoutProvider = TileLayoutProvider;\n var package$axis = package$layout.axis || (package$layout.axis = {});\n package$axis.AdaptableAxisBreaksProvider = AdaptableAxisBreaksProvider;\n package$axis.AxisBreaksProvider = AxisBreaksProvider;\n Object.defineProperty(AxisBreaksProviderFactory, 'Companion', {\n get: AxisBreaksProviderFactory$Companion_getInstance\n });\n AxisBreaksProviderFactory.FixedBreaksProviderFactory = AxisBreaksProviderFactory$FixedBreaksProviderFactory;\n AxisBreaksProviderFactory.AdaptableBreaksProviderFactory = AxisBreaksProviderFactory$AdaptableBreaksProviderFactory;\n package$axis.AxisBreaksProviderFactory = AxisBreaksProviderFactory;\n Object.defineProperty(AxisLayouter, 'Companion', {\n get: AxisLayouter$Companion_getInstance\n });\n package$axis.AxisLayouter = AxisLayouter;\n package$axis.FixedAxisBreaksProvider = FixedAxisBreaksProvider;\n package$axis.HorizontalAxisLayouter = HorizontalAxisLayouter;\n package$axis.VerticalAxisLayouter = VerticalAxisLayouter;\n Object.defineProperty(AbstractFixedBreaksLabelsLayout, 'Companion', {\n get: AbstractFixedBreaksLabelsLayout$Companion_getInstance\n });\n var package$label = package$axis.label || (package$axis.label = {});\n package$label.AbstractFixedBreaksLabelsLayout = AbstractFixedBreaksLabelsLayout;\n Object.defineProperty(AxisLabelsLayout, 'Companion', {\n get: AxisLabelsLayout$Companion_getInstance\n });\n package$label.AxisLabelsLayout = AxisLabelsLayout;\n AxisLabelsLayoutInfo.Builder = AxisLabelsLayoutInfo$Builder;\n package$label.AxisLabelsLayoutInfo = AxisLabelsLayoutInfo;\n Object.defineProperty(package$label, 'BreakLabelsLayoutUtil', {\n get: BreakLabelsLayoutUtil_getInstance\n });\n package$label.HorizontalFixedBreaksLabelsLayout = HorizontalFixedBreaksLabelsLayout;\n package$label.HorizontalFlexBreaksLabelsLayout = HorizontalFlexBreaksLabelsLayout;\n Object.defineProperty(HorizontalMultilineLabelsLayout, 'Companion', {\n get: HorizontalMultilineLabelsLayout$Companion_getInstance\n });\n package$label.HorizontalMultilineLabelsLayout = HorizontalMultilineLabelsLayout;\n Object.defineProperty(HorizontalSimpleLabelsLayout, 'Companion', {\n get: HorizontalSimpleLabelsLayout$Companion_getInstance\n });\n package$label.HorizontalSimpleLabelsLayout = HorizontalSimpleLabelsLayout;\n Object.defineProperty(HorizontalTiltedLabelsLayout, 'Companion', {\n get: HorizontalTiltedLabelsLayout$Companion_getInstance\n });\n package$label.HorizontalTiltedLabelsLayout = HorizontalTiltedLabelsLayout;\n Object.defineProperty(HorizontalVerticalLabelsLayout, 'Companion', {\n get: HorizontalVerticalLabelsLayout$Companion_getInstance\n });\n package$label.HorizontalVerticalLabelsLayout = HorizontalVerticalLabelsLayout;\n package$label.VerticalFixedBreaksLabelsLayout = VerticalFixedBreaksLabelsLayout;\n package$label.VerticalFlexBreaksLabelsLayout = VerticalFlexBreaksLabelsLayout;\n var package$facet_0 = package$layout.facet || (package$layout.facet = {});\n Object.defineProperty(package$facet_0, 'FixedScalesTilesLayouter', {\n get: FixedScalesTilesLayouter_getInstance\n });\n Object.defineProperty(package$facet_0, 'FreeScalesTilesLayouter', {\n get: FreeScalesTilesLayouter_getInstance\n });\n Object.defineProperty(InsideOutTileLayout, 'Companion', {\n get: InsideOutTileLayout$Companion_getInstance\n });\n var package$tile = package$layout.tile || (package$layout.tile = {});\n package$tile.InsideOutTileLayout = InsideOutTileLayout;\n package$tile.LiveMapAxisTheme = LiveMapAxisTheme;\n package$tile.LiveMapTileLayout = LiveMapTileLayout;\n Object.defineProperty(LiveMapTileLayoutProvider, 'Companion', {\n get: LiveMapTileLayoutProvider$Companion_getInstance\n });\n package$tile.LiveMapTileLayoutProvider = LiveMapTileLayoutProvider;\n Object.defineProperty(package$tile, 'TileLayoutUtil', {\n get: TileLayoutUtil_getInstance\n });\n Object.defineProperty(TopDownTileLayout, 'Companion', {\n get: TopDownTileLayout$Companion_getInstance\n });\n package$tile.TopDownTileLayout = TopDownTileLayout;\n Object.defineProperty(GeomAreaInsets, 'Companion', {\n get: GeomAreaInsets$Companion_getInstance\n });\n var package$util = package$layout.util || (package$layout.util = {});\n package$util.GeomAreaInsets = GeomAreaInsets;\n package$util.Insets = Insets;\n var package$presentation = package$builder.presentation || (package$builder.presentation = {});\n package$presentation.DefaultFontFamilyRegistry = DefaultFontFamilyRegistry;\n Object.defineProperty(Defaults$Common, 'Title', {\n get: Defaults$Common$Title_getInstance\n });\n Object.defineProperty(Defaults$Common, 'Subtitle', {\n get: Defaults$Common$Subtitle_getInstance\n });\n Object.defineProperty(Defaults$Common, 'Caption', {\n get: Defaults$Common$Caption_getInstance\n });\n Object.defineProperty(Defaults$Common, 'Legend', {\n get: Defaults$Common$Legend_getInstance\n });\n Object.defineProperty(Defaults$Common, 'Tooltip', {\n get: Defaults$Common$Tooltip_getInstance\n });\n Defaults.prototype.Common = Defaults$Common;\n Object.defineProperty(Defaults$Plot, 'Axis', {\n get: Defaults$Plot$Axis_getInstance\n });\n Defaults.prototype.Plot = Defaults$Plot;\n Object.defineProperty(package$presentation, 'Defaults', {\n get: Defaults_getInstance\n });\n package$presentation.FontFamilyRegistry = FontFamilyRegistry;\n package$presentation.LabelSpec = LabelSpec;\n Object.defineProperty(PlotLabelSpec, 'Companion', {\n get: PlotLabelSpec$Companion_getInstance\n });\n package$presentation.PlotLabelSpec = PlotLabelSpec;\n Object.defineProperty(package$presentation, 'Style', {\n get: Style_getInstance\n });\n Object.defineProperty(package$presentation, 'TextWidthEstimator', {\n get: TextWidthEstimator_getInstance\n });\n var package$sampling = package$builder.sampling || (package$builder.sampling = {});\n package$sampling.GroupAwareSampling = GroupAwareSampling;\n package$sampling.PointSampling = PointSampling;\n package$sampling.Sampling = Sampling;\n Object.defineProperty(package$sampling, 'Samplings', {\n get: Samplings_getInstance\n });\n Object.defineProperty(GroupRandomSampling, 'Companion', {\n get: GroupRandomSampling$Companion_getInstance\n });\n var package$method = package$sampling.method || (package$sampling.method = {});\n package$method.GroupRandomSampling = GroupRandomSampling;\n package$method.GroupSamplingBase = GroupSamplingBase;\n Object.defineProperty(GroupSystematicSampling, 'Companion', {\n get: GroupSystematicSampling$Companion_getInstance\n });\n package$method.GroupSystematicSampling = GroupSystematicSampling;\n Object.defineProperty(PickSampling, 'Companion', {\n get: PickSampling$Companion_getInstance\n });\n package$method.PickSampling = PickSampling;\n Object.defineProperty(RandomSampling, 'Companion', {\n get: RandomSampling$Companion_getInstance\n });\n package$method.RandomSampling = RandomSampling;\n Object.defineProperty(RandomStratifiedSampling, 'Companion', {\n get: RandomStratifiedSampling$Companion_getInstance\n });\n package$method.RandomStratifiedSampling = RandomStratifiedSampling;\n package$method.SamplingBase = SamplingBase;\n Object.defineProperty(package$method, 'SamplingUtil', {\n get: SamplingUtil_getInstance\n });\n Object.defineProperty(SystematicSampling, 'Companion', {\n get: SystematicSampling$Companion_getInstance\n });\n package$method.SystematicSampling = SystematicSampling;\n Object.defineProperty(VertexSampling$VertexVwSampling, 'Companion', {\n get: VertexSampling$VertexVwSampling$Companion_getInstance\n });\n VertexSampling.VertexVwSampling = VertexSampling$VertexVwSampling;\n Object.defineProperty(VertexSampling$VertexDpSampling, 'Companion', {\n get: VertexSampling$VertexDpSampling$Companion_getInstance\n });\n VertexSampling.VertexDpSampling = VertexSampling$VertexDpSampling;\n VertexSampling.DoubleVectorComponentsList = VertexSampling$DoubleVectorComponentsList;\n Object.defineProperty(VertexSampling, 'Companion', {\n get: VertexSampling$Companion_getInstance\n });\n package$method.VertexSampling = VertexSampling;\n var package$scale = package$builder.scale || (package$builder.scale = {});\n package$scale.ContinuousOnlyMapperProvider = ContinuousOnlyMapperProvider;\n Object.defineProperty(package$scale, 'DefaultMapperProvider', {\n get: DefaultMapperProvider_getInstance\n });\n Object.defineProperty(package$scale, 'DefaultMapperProviderUtil', {\n get: DefaultMapperProviderUtil_getInstance\n });\n Object.defineProperty(package$scale, 'DefaultNaValue', {\n get: DefaultNaValue_getInstance\n });\n package$scale.DiscreteOnlyMapperProvider = DiscreteOnlyMapperProvider;\n package$scale.GuideMapper = GuideMapper;\n package$scale.MapperProvider = MapperProvider;\n package$scale.ScaleProvider = ScaleProvider;\n package$scale.ScaleProviderBuilder = ScaleProviderBuilder;\n Object.defineProperty(package$scale, 'ScaleProviderHelper', {\n get: ScaleProviderHelper_getInstance\n });\n package$scale.WithGuideBreaks = WithGuideBreaks;\n var package$mapper = package$scale.mapper || (package$scale.mapper = {});\n Object.defineProperty(package$mapper, 'ColorMapper', {\n get: ColorMapper_getInstance\n });\n package$mapper.GuideMapperWithGuideBreaks = GuideMapperWithGuideBreaks;\n Object.defineProperty(package$mapper, 'GuideMappers', {\n get: GuideMappers_getInstance\n });\n Object.defineProperty(package$mapper, 'LineTypeMapper', {\n get: LineTypeMapper_getInstance\n });\n Object.defineProperty(package$mapper, 'ShapeMapper', {\n get: ShapeMapper_getInstance\n });\n Object.defineProperty(AlphaMapperProvider, 'Companion', {\n get: AlphaMapperProvider$Companion_getInstance\n });\n var package$provider = package$scale.provider || (package$scale.provider = {});\n package$provider.AlphaMapperProvider = AlphaMapperProvider;\n Object.defineProperty(ColorBrewerMapperProvider, 'Companion', {\n get: ColorBrewerMapperProvider$Companion_getInstance\n });\n package$provider.ColorBrewerMapperProvider = ColorBrewerMapperProvider;\n Object.defineProperty(ColorGradient2MapperProvider, 'Companion', {\n get: ColorGradient2MapperProvider$Companion_getInstance\n });\n package$provider.ColorGradient2MapperProvider = ColorGradient2MapperProvider;\n Object.defineProperty(ColorGradientMapperProvider, 'Companion', {\n get: ColorGradientMapperProvider$Companion_getInstance\n });\n package$provider.ColorGradientMapperProvider = ColorGradientMapperProvider;\n Object.defineProperty(ColorGradientnMapperProvider, 'Companion', {\n get: ColorGradientnMapperProvider$Companion_getInstance\n });\n package$provider.ColorGradientnMapperProvider = ColorGradientnMapperProvider;\n Object.defineProperty(ColorHueMapperProvider, 'Companion', {\n get: ColorHueMapperProvider$Companion_getInstance\n });\n package$provider.ColorHueMapperProvider = ColorHueMapperProvider;\n package$provider.ColormapMapperProvider = ColormapMapperProvider;\n package$provider.DirectlyProportionalMapperProvider = DirectlyProportionalMapperProvider;\n Object.defineProperty(GreyscaleLightnessMapperProvider, 'Companion', {\n get: GreyscaleLightnessMapperProvider$Companion_getInstance\n });\n package$provider.GreyscaleLightnessMapperProvider = GreyscaleLightnessMapperProvider;\n Object.defineProperty(HSVColorMapperProvider, 'Companion', {\n get: HSVColorMapperProvider$Companion_getInstance\n });\n package$provider.HSVColorMapperProvider = HSVColorMapperProvider;\n package$provider.IdentityDiscreteMapperProvider = IdentityDiscreteMapperProvider;\n package$provider.IdentityMapperProvider = IdentityMapperProvider;\n package$provider.LinearNormalizingMapperProvider = LinearNormalizingMapperProvider;\n package$provider.MapperProviderBase = MapperProviderBase;\n Object.defineProperty(SizeAreaMapperProvider, 'Companion', {\n get: SizeAreaMapperProvider$Companion_getInstance\n });\n package$provider.SizeAreaMapperProvider = SizeAreaMapperProvider;\n Object.defineProperty(SizeMapperProvider, 'Companion', {\n get: SizeMapperProvider$Companion_getInstance\n });\n package$provider.SizeMapperProvider = SizeMapperProvider;\n var package$theme = package$builder.theme || (package$builder.theme = {});\n package$theme.AxisTheme = AxisTheme;\n package$theme.FacetsTheme = FacetsTheme;\n package$theme.LegendTheme = LegendTheme;\n package$theme.PanelGridTheme = PanelGridTheme;\n package$theme.PanelTheme = PanelTheme;\n package$theme.PlotTheme = PlotTheme;\n package$theme.Theme = Theme;\n package$theme.ThemeTextStyle = ThemeTextStyle;\n package$theme.TooltipsTheme = TooltipsTheme;\n var package$tooltip = package$builder.tooltip || (package$builder.tooltip = {});\n package$tooltip.ConstantValue = ConstantValue;\n package$tooltip.DataFrameValue = DataFrameValue;\n Object.defineProperty(LinesContentSpecification$Companion$LineSpec, 'Companion', {\n get: LinesContentSpecification$Companion$LineSpec$Companion_getInstance\n });\n LinesContentSpecification$Companion.prototype.LineSpec = LinesContentSpecification$Companion$LineSpec;\n Object.defineProperty(LinesContentSpecification, 'Companion', {\n get: LinesContentSpecification$Companion_getInstance\n });\n package$tooltip.LinesContentSpecification = LinesContentSpecification;\n package$tooltip.MappingValue = MappingValue;\n Object.defineProperty(package$tooltip, 'TooltipFormatting', {\n get: TooltipFormatting_getInstance\n });\n Object.defineProperty(TooltipLine, 'Companion', {\n get: TooltipLine$Companion_getInstance\n });\n package$tooltip.TooltipLine_init_cpanxn$ = TooltipLine_init;\n package$tooltip.TooltipLine = TooltipLine;\n Object.defineProperty(TooltipSpecification$TooltipProperties, 'Companion', {\n get: TooltipSpecification$TooltipProperties$Companion_getInstance\n });\n TooltipSpecification.TooltipProperties = TooltipSpecification$TooltipProperties;\n Object.defineProperty(TooltipSpecification, 'Companion', {\n get: TooltipSpecification$Companion_getInstance\n });\n package$tooltip.TooltipSpecification = TooltipSpecification;\n package$tooltip.ValueSource = ValueSource;\n CoordProviderBase.prototype.createCoordinateSystem_26v79i$ = CoordProvider.prototype.createCoordinateSystem_26v79i$;\n DefaultAxisTheme.prototype.tickLabelDistance_6taknv$ = AxisTheme.prototype.tickLabelDistance_6taknv$;\n DefaultPanelTheme.prototype.gridX_6taknv$ = PanelTheme.prototype.gridX_6taknv$;\n DefaultPanelTheme.prototype.gridY_6taknv$ = PanelTheme.prototype.gridY_6taknv$;\n BogusFrameOfReferenceProvider.prototype.createTileFrame_sd8y8$ = FrameOfReferenceProvider.prototype.createTileFrame_sd8y8$;\n SquareFrameOfReferenceProvider.prototype.createTileFrame_sd8y8$ = FrameOfReferenceProvider.prototype.createTileFrame_sd8y8$;\n FlippedTargetCollector.prototype.addPoint_cnsimy$ = GeomTargetCollector.prototype.addPoint_cnsimy$;\n FlippedTargetCollector.prototype.addRectangle_bxzvr8$ = GeomTargetCollector.prototype.addRectangle_bxzvr8$;\n FlippedTargetCollector.prototype.addPath_sa5m83$ = GeomTargetCollector.prototype.addPath_sa5m83$;\n FlippedTargetCollector.prototype.addPolygon_sa5m83$ = GeomTargetCollector.prototype.addPolygon_sa5m83$;\n LayerTargetCollectorWithLocator.prototype.addPoint_cnsimy$ = GeomTargetCollector.prototype.addPoint_cnsimy$;\n LayerTargetCollectorWithLocator.prototype.addRectangle_bxzvr8$ = GeomTargetCollector.prototype.addRectangle_bxzvr8$;\n LayerTargetCollectorWithLocator.prototype.addPath_sa5m83$ = GeomTargetCollector.prototype.addPath_sa5m83$;\n LayerTargetCollectorWithLocator.prototype.addPolygon_sa5m83$ = GeomTargetCollector.prototype.addPolygon_sa5m83$;\n YOrientationTargetCollector.prototype.addPoint_cnsimy$ = GeomTargetCollector.prototype.addPoint_cnsimy$;\n YOrientationTargetCollector.prototype.addRectangle_bxzvr8$ = GeomTargetCollector.prototype.addRectangle_bxzvr8$;\n YOrientationTargetCollector.prototype.addPath_sa5m83$ = GeomTargetCollector.prototype.addPath_sa5m83$;\n YOrientationTargetCollector.prototype.addPolygon_sa5m83$ = GeomTargetCollector.prototype.addPolygon_sa5m83$;\n LiveMapAxisTheme.prototype.isOntop = AxisTheme.prototype.isOntop;\n LiveMapAxisTheme.prototype.tickLabelDistance_6taknv$ = AxisTheme.prototype.tickLabelDistance_6taknv$;\n Kotlin.defineModule('lets-plot-plot-builder-portable-js-legacy', _);\n return _;\n}));\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9rb3RsaW4tZGNlLWRldi9sZXRzLXBsb3QtcGxvdC1idWlsZGVyLXBvcnRhYmxlLWpzLWxlZ2FjeS5qcy5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7b0JBOGFBLDZDOzZCQUFBLG1EOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7bUJDMHhDQSxvQztlQ24xQ0EsSTs7OztnQ0RncENBLHlEO3lCQUFBLGdEOz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ApIHJldHVybiB0b0xpc3QoKVxuICAgIHZhbCBsaXN0OiBBcnJheUxpc3Q8VD5cbiAgICBpZiAodGhpcyBpcyBDb2xsZWN0aW9uPCo+KSB7XG4gICAgICAgIHZhbCByZXN1bHRTaXplID0gc2l6ZSAtIG5cbiAgICAgICAgaWYgKHJlc3VsdFNpemUgPD0gMClcbiAgICAgICAgICAgIHJldHVybiBlbXB0eUxpc3QoKVxuICAgICAgICBpZiAocmVzdWx0U2l6ZSA9PSAxKVxuICAgICAgICAgICAgcmV0dXJuIGxpc3RPZihsYXN0KCkpXG4gICAgICAgIGxpc3QgPSBBcnJheUxpc3Q8VD4ocmVzdWx0U2l6ZSlcbiAgICAgICAgaWYgKHRoaXMgaXMgTGlzdDxUPikge1xuICAgICAgICAgICAgaWYgKHRoaXMgaXMgUmFuZG9tQWNjZXNzKSB7XG4gICAgICAgICAgICAgICAgZm9yIChpbmRleCBpbiBuIHVudGlsIHNpemUpXG4gICAgICAgICAgICAgICAgICAgIGxpc3QuYWRkKHRoaXNbaW5kZXhdKVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBmb3IgKGl0ZW0gaW4gbGlzdEl0ZXJhdG9yKG4pKVxuICAgICAgICAgICAgICAgICAgICBsaXN0LmFkZChpdGVtKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGxpc3RcbiAgICAgICAgfVxuICAgIH1cbiAgICBlbHNlIHtcbiAgICAgICAgbGlzdCA9IEFycmF5TGlzdDxUPigpXG4gICAgfVxuICAgIHZhciBjb3VudCA9IDBcbiAgICBmb3IgKGl0ZW0gaW4gdGhpcykge1xuICAgICAgICBpZiAoY291bnQgPj0gbikgbGlzdC5hZGQoaXRlbSkgZWxzZSArK2NvdW50XG4gICAgfVxuICAgIHJldHVybiBsaXN0Lm9wdGltaXplUmVhZE9ubHlMaXN0KClcbn1cblxuLyoqXG4gKiBSZXR1cm5zIGEgbGlzdCBjb250YWluaW5nIGFsbCBl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lLCAxIGZvciBjb250aW51ZVxuICAgICAgICB2YXIgY3VycmVudFN0YXJ0SW5kZXg6IEludCA9IHN0YXJ0SW5kZXguY29lcmNlSW4oMCwgaW5wdXQubGVuZ3RoKVxuICAgICAgICB2YXIgbmV4dFNlYXJjaEluZGV4OiBJbnQgPSBjdXJyZW50U3RhcnRJbmRleFxuICAgICAgICB2YXIgbmV4dEl0ZW06IEludFJhbmdlPyA9IG51bGxcbiAgICAgICAgdmFyIGNvdW50ZXI6IEludCA9IDBcblxuICAgICAgICBwcml2YXRlIGZ1biBjYWxjTmV4dCgpIHtcbiAgICAgICAgICAgIGlmIChuZXh0U2VhcmNoSW5kZXggPCAwKSB7XG4gICAgICAgICAgICAgICAgbmV4dFN0YXRlID0gMFxuICAgICAgICAgICAgICAgIG5leHRJdGVtID0gbnVsbFxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAobGltaXQgPiAwICYmICsrY291bnRlciA+PSBsaW1pdCB8fCBuZXh0U2VhcmNoSW5kZXggPiBpbnB1dC5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgbmV4dEl0ZW0gPSBjdXJyZW50U3RhcnRJbmRleC4uaW5wdXQubGFzdEluZGV4XG4gICAgICAgICAgICAgICAgICAgIG5leHRTZWFyY2hJbmRleCA9IC0xXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdmFsIG1hdGNoID0gaW5wdXQuZ2V0TmV4dE1hdGNoKG5leHRTZWFyY2hJbmRleClcbiAgICAgICAgICAgICAgICAgICAgaWYgKG1hdGNoID09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG5leHRJdGVtID0gY3VycmVudFN0YXJ0SW5kZXguLmlucHV0Lmxhc3RJbmRleFxuICAgICAgICAgICAgICAgICAgICAgICAgbmV4dFNlYXJjaEluZGV4ID0gLTFcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbCAoaW5kZXgsIGxlbmd0aCkgPSBtYXRjaFxuICAgICAgICAgICAgICAgICAgICAgICAgbmV4dEl0ZW0gPSBjdXJyZW50U3RhcnRJbmRleCB1bnRpbCBpbmRleFxuICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudFN0YXJ0SW5kZXggPSBpbmRleCArIGxlbmd0aFxuICAgICAgICAgICAgICAgICAgICAgICAgbmV4dFNlYXJjaEluZGV4ID0gY3VycmVudFN0YXJ0SW5kZXggKyBpZiAobGVuZ3RoID09IDApIDEgZWxzZSAwXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbmV4dFN0YXRlID0gMVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgb3ZlcnJpZGUgZnVuIG5leHQoKTogSW50UmFuZ2Uge1xuICAgICAgICAgICAgaWYgKG5leHRTdGF0ZSA9PSAtMSlcbiAgICAgICAgICAgICAgICBjYWxjTmV4dCgpXG4gICAgICAgICAgICBpZiAobmV4dFN0YXRlID09IDApXG4gICAgICAgICAgICAgICAgdGhyb3cgTm9TdWNoRWxlbWVudEV4Y2VwdGlvbigpXG4gICAgICAgICAgICB2YWwgcmVzdWx0ID0gbmV4dEl0ZW0gYXMgSW50UmFuZ2VcbiAgICAgICAgICAgIC8vIENsZWFuIG5leHQgdG8gYXZvaWQga2VlcGluZyByZWZlcmVuY2Ugb24geWllbGRlZCBpbnN0YW5jZVxuICAgICAgICAgICAgbmV4dEl0ZW0gPSBudWxsXG4gICAgICAgICAgICBuZXh0U3RhdGUgPSAtMVxuICAgICAgICAgICAgcmV0dXJuIHJlc3VsdFxuICAgICAgICB9XG5cbiAgICAgICAgb3ZlcnJpZGUgZnVuIGhhc05leHQoKTogQm9vbGVhbiB7XG4gICAgICAgICAgICBpZiAobmV4dFN0YXRlID09IC0xKVxuICAgICAgICAgICAgICAgIGNhbGNOZXh0KClcbi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gICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhbCBicENsaWVudENvb3JkID0gY29vcmQudG9DbGllbnQoYnBDb29yZClcbiAgICAgICAgICAgIGlmICghKGJwQ2xpZW50Q29vcmQgIT0gbnVsbCAmJiBicENsaWVudENvb3JkLmlzRmluaXRlKSkge1xuICAgICAgICAgICAgICAgIC8vIHNraXAgdGhpcyBicmVhay1wb2ludDogaXQncyBvdXRzaWRlIHRoZSBjb29yZGluYXRlIHN5c3RlbScgZG9tYWluLlxuICAgICAgICAgICAgICAgIGNvbnRpbnVlXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhbCBicE9uQXhpcyA9IGlmIChob3Jpem9udGFsKVxuICAgICAgICAgICAgICAgIGJwQ2xpZW50Q29vcmQueFxuICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgIGJwQ2xpZW50Q29vcmQueVxuXG4gICAgICAgICAgICBheGlzQnJlYWtzLmFkZChicE9uQXhpcylcbiAgICAgICAgICAgIGF4aXNMYWJlbHMuYWRkKGxhYmVsKVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBQYWlyKGF4aXNCcmVha3MsIGF4aXNMYWJlbHMpXG4gICAgfVxufVxuIiwiLypcbiAqIENvcHlyaWdodCAyMDEwLTIwMTggSmV0QnJhaW5zIHMuci5vLiBhbmQgS290bGluIFByb2dyYW1taW5nIExhbmd1YWdlIGNvbnRyaWJ1dG9ycy5cbiAqIFVzZSBvZiB0aGlzIHNvdXJjZSBjb2RlIGlzIGdvdmVybmVkIGJ5IHRoZSBBcGFjaGUgMi4wIGxpY2Vuc2UgdGhhdCBjYW4gYmUgZm91bmQgaW4gdGhlIGxpY2Vuc2UvTElDRU5TRS50eHQgZmlsZS5cbiAqL1xuXG5AZmlsZTprb3RsaW4uanZtLkp2bU11bHRpZmlsZUNsYXNzXG5AZmlsZTprb3RsaW4uanZtLkp2bU5hbWUoXCJTdGFuZGFyZEt0XCIp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SURFTlRJVFlcbiAgICAgICAgKVxuICAgICAgICB2YWwgYWVzdGhldGljcyA9IFBsb3RVdGlsLmNyZWF0ZUxheWVyQWVzdGhldGljcyhcbiAgICAgICAgICAgIGxheWVyLFxuICAgICAgICAgICAgbGF5ZXIucmVuZGVyZWRBZXMoKSxcbiAgICAgICAgICAgIGFlc3RoZXRpY01hcHBlcnMsXG4gICAgICAgIClcblxuICAgICAgICB2YWwgYWVzdGhldGljTWFwcGVyc0FmdGVyT3JpZW50YXRpb24gPSBhZXN0aGV0aWNNYXBwZXJzLmxldCB7XG4gICAgICAgICAgICB3aGVuIChsYXllci5pc1lPcmllbnRhdGlvbikge1xuICAgICAgICAgICAgICAgIHRydWUgLT4gWU9yaWVudGF0aW9uQmFzZVV0aWwuZmxpcEFlc0tleXMoaXQpXG4gICAgICAgICAgICAgICAgZmFsc2UgLT4gaXRcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHZhbCBhZXN0aGV0aWNzQWZ0ZXJPcmllbnRhdGlvbiA9IGFlc3RoZXRpY3MubGV0IHtcbiAgICAgICAgICAgIHdoZW4gKGxheWVyLmlzWU9yaWVudGF0aW9uKSB7XG4gICAgICAgICAgICAgICAgdHJ1ZSAtPiBZT3JpZW50YXRpb25BZXN0aGV0aWNzKGl0KVxuICAgICAgICAgICAgICAgIGZhbHNlIC0+IGl0XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICB2YWwgbWFwcGVkQWVzOiBTZXQ8QWVzPCo+PiA9IGxheWVyLnJlbmRlcmVkQWVzKCkuZmlsdGVyKGxheWVyOjpoYXNCaW5kaW5nKS50b1NldCgpXG4gICAgICAgIHZhbCBwb3MgPSBQbG90VXRpbC5jcmVhdGVQb3NpdGlvbkFkanVzdG1lbnQobGF5ZXIucG9zUHJvdmlkZXIsIGFlc3RoZXRpY3NBZnRlck9yaWVudGF0aW9uKVxuICAgICAgICByZXR1cm4gTGF5ZXJSZW5kZXJlckRhdGE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lkZXJCeVRpbGVbMF0uaEF4aXNMYWJlbFxuXG4gICAgcHJpdmF0ZSB2YWwgY29udGFpbnNMaXZlTWFwOiBCb29sZWFuID0gY29yZUxheWVyc0J5VGlsZS5mbGF0dGVuKCkuYW55KEdlb21MYXllcjo6aXNMaXZlTWFwKVxuXG4gICAgb3ZlcnJpZGUgZnVuIGJ1aWxkQ29tcG9uZW50KCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgICAgYnVpbGRQbG90KClcbiAgICAgICAgfSBjYXRjaCAoZTogUnVudGltZUV4Y2VwdGlvbikge1xuICAgICAgICAgICAgTE9HLmVycm9yKGUpIHsgXCJidWlsZFBsb3RcIiB9XG5cbiAgICAgICAgICAgIHZhbCByb290Q2F1c2UgPSBUaHJvd2FibGVzLmdldFJvb3RDYXVzZShlKVxuICAgICAgICAgICAgdmFsIG1lc3NhZ2VzID0gYXJyYXlPZihcbiAgICAgICAgICAgICAgICBcIkVycm9yIGJ1aWxkaW5nIHBsb3Q6IFwiICsgcm9vdENhdXNlOjpjbGFzcy5zaW1wbGVOYW1lLCBpZiAocm9vdENhdXNlLm1lc3NhZ2UgIT0gbnVsbClcbiAgICAgICAgICAgICAgICAgICAgXCInXCIgKyByb290Q2F1c2UubWVzc2FnZSArIFwiJ1wiXG4gICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICBcIjxubyBtZXNzYWdlPlwiXG4gICAgICAgICAgICApXG4gICAgICAgICAgICB2YXIgeSA9IHBsb3RTaXplLnkgLyAyIC0gOFxuICAgICAgICAgICAgZm9yIChzIGluIG1lc3NhZ2VzKSB7XG4gICAgICAgICAgICAgICAgdmFsIGVycm9yTGFiZWwgPSBUZXh0TGFiZWwocylcbiAgICAgICAgICAgICAgICB2YWwgdGV4dENvbG9yID0gd2hlbiB7XG4gICAgICAgICAgICAgICAgICAgIHRoZW1lLnBsb3QoKS5zaG93QmFja2dyb3VuZCgpIC0+IHRoZW1lLnBsb3QoKS50ZXh0Q29sb3IoKVxuICAgICAgICAgICAgICAgICAgICBlbHNlIC0+IERlZmF1bHRzLlRFWFRfQ09MT1JcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZXJyb3JMYWJlbC50ZXh0Q29sb3IoKS5zZXQodGV4dENvbG9yKVxuICAgICAgICAgICAgICAgIGVycm9yTGFiZWwuc2V0Rm9udFdlaWdodChcIm5vcm1hbFwiKVxuICAgICAgICAgICAgICAgIGVycm9yTGFiZWwuc2V0Rm9udFN0eWxlKFwibm9ybWFsXCIpXG4gICAgICAgICAgICAgICAgZXJyb3JMYWJlbC5zZXRIb3Jpem9udGFsQW5jaG9yKEhvcml6b250YWxBbmNob3IuTUlERExFKVxuICAgICAgICAgICAgICAgIGVycm9yTGFiZWwuc2V0VmVydGljYWxBbmNob3IoVmVydGljYWxBbmNob3IuQ0VOVEVSKVxuICAgICAgICAgICAgICAgIGVycm9yTGFiZWwubW92ZVRvKHBsb3RTaXplLnggLyAyLCB5KVxuICAgICAgICAgICAgICAgIHJvb3RHcm91cC5jaGlsZHJlbigpLmFkZChlcnJvckxhYmVsLnJvb3RHcm91cClcbiAgICAgICAgICAgICAgICB5ICs9IDE2LjBcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIHByaXZhdGUgZnVuIGJ1aWxkUGxvdCgpIHtcbiAgICAgICAgYnVpbGRQbG90Q29tcG9uZW50cygpXG5cbiAgICAgICAgcmVnKG9iamVjdCA6IFJlZ2lzdHJhdGlvbigpIHtcbiAgICAgICAgICAgIG92ZXJyaWRlIGZ1biBkb1JlbW92ZSgpIHtcbiAgICAgICAgICAgICAgICBpbnRlcmFjdG9yPy5kaXNwb3NlKClcbiAgICAgICAgICAgICAgICBsaXZlTWFwRmlndXJlcyA9IGVtcHR5TGlzdCgpXG4gICAgICAgICAgICB9XG4gICAgICAgIH0pXG4gICAgfVxuXG4gICAgZnVuIHJlc2l6ZShwbG90U2l6ZTogRG91YmxlVmVjdG9yKSB7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WJ0cmFjdFRpdGxlc0FuZExlZ2VuZHMoXG4gICAgICAgICAgICBiYXNlU2l6ZSA9IGVudGlyZVBsb3QuZGltZW5zaW9uLFxuICAgICAgICAgICAgdGl0bGUsXG4gICAgICAgICAgICBzdWJ0aXRsZSxcbiAgICAgICAgICAgIGNhcHRpb24sXG4gICAgICAgICAgICBheGlzVGl0bGVMZWZ0LFxuICAgICAgICAgICAgYXhpc1RpdGxlQm90dG9tLFxuICAgICAgICAgICAgYXhpc0VuYWJsZWQsXG4gICAgICAgICAgICBsZWdlbmRzQmxvY2tJbmZvLFxuICAgICAgICAgICAgdGhlbWUsXG4gICAgICAgICAgICBmbGlwcGVkQXhpc1xuICAgICAgICApXG5cbiAgICAgICAgLy8gTGF5b3V0IHBsb3QgaW5uZXJzXG4gICAgICAgIHZhbCBwbG90SW5mbyA9IHBsb3RMYXlvdXQuZG9MYXlvdXQocGxvdElubmVyU2l6ZUF2YWlsYWJsZSwgY29vcmRQcm92aWRlcilcbiAgICAgICAgaWYgKHBsb3RJbmZvLnRpbGVzLmlzRW1wdHkoKSkge1xuICAgICAgICAgICAgcmV0dXJuXG4gICAgICAgIH1cblxuICAgICAgICAvLyBJbm5lciBzaXplIGluY2x1ZGVzIGdlb21zLCBheGlzIGFuZCBmYWNldCBsYWJlbHMuXG4gICAgICAgIHZhbCBwbG90SW5uZXJTaXplID0gcGxvdEluZm8uc2l6ZVxuICAgICAgICB2YWwgcGxvdE91dGVyU2l6ZSA9IGFkZFRpdGxlc0FuZExlZ2VuZHMoXG4gICAgICAgICAgICBwbG90SW5uZXJTaXplLFxuICAgICAgICAgICAgdGl0bGUsXG4gICAgICAgICAgICBzdWJ0aXRsZSxcbiAgICAgICAgICAgIGNhcHRpb24sXG4gICAgICAgICAgICBheGlzVGl0bGVMZWZ0LFxuICAgICAgICAgICAgYXhpc1RpdGxlQm90dG9tLFxuICAgICAgICAgICAgYXhpc0VuYWJsZWQsXG4gICAgICAgICAgICBsZWdlbmRzQmxvY2t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ICAgICAgICAgICAgICAgIGNvb3JkUHJvdmlkZXIsXG4gICAgICAgICAgICAgICAgREVCVUdfRFJBV0lOR1xuICAgICAgICAgICAgKVxuXG4gICAgICAgICAgICB2YWwgbWFyZ2luYWxGcmFtZUJ5TWFyZ2luOiBNYXA8TWFyZ2luU2lkZSwgRnJhbWVPZlJlZmVyZW5jZT4gPSB0aWxlRnJhbWVQcm92aWRlclxuICAgICAgICAgICAgICAgIC5jcmVhdGVNYXJnaW5hbEZyYW1lcyhcbiAgICAgICAgICAgICAgICAgICAgdGlsZUxheW91dEluZm8sXG4gICAgICAgICAgICAgICAgICAgIGNvb3JkUHJvdmlkZXIsXG4gICAgICAgICAgICAgICAgICAgIERFQlVHX0RSQVdJTkdcbiAgICAgICAgICAgICAgICApXG5cbiAgICAgICAgICAgIHZhbCB0aWxlID0gUGxvdFRpbGUoXG4gICAgICAgICAgICAgICAgY29yZUxheWVycyA9IGNvcmVMYXllcnNCeVRpbGVbdGlsZUluZGV4XSxcbiAgICAgICAgICAgICAgICBtYXJnaW5hbExheWVycyA9IG1hcmdpbmFsTGF5ZXJzQnlUaWxlW3RpbGVJbmRleF0sXG4gICAgICAgICAgICAgICAgdGlsZXNPcmlnaW4sIHRpbGVMYXlvdXRJbmZvLCB0aGVtZSxcbiAgICAgICAgICAgICAgICB0aWxlRnJhbWUsXG4gICAgICAgICAgICAgICAgbWFyZ2luYWxGcmFtZUJ5TWFyZ2luXG4gICAgICAgICAgICApXG5cbiAgICAgICAgICAgIHZhbCBwbG90T3JpZ2luQWJzb2x1dGUgPSB0aWxlc09yaWdpbi5hZGQodGlsZUxheW91dEluZm8ub2Zmc2V0KVxuICAgICAgICAgICAgdGlsZS5tb3ZlVG8ocGxvdE9yaWdpbkFic29sdXRlKVxuXG4gICAgICAgICAgICBhZGQodGlsZSlcblxuICAgICAgICAgICAgdGlsZS5saXZlTWFwRmlndXJlPy5ydW4ge1xuICAgICAgICAgICAgICAgIGxpdmVNYXBGaWd1cmVzID0gb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sIFwiUkVEOiBnZW9tQXJlYUJvdW5kc1wiKVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gcGxvdCB0aXRsZSwgc3VidGl0bGUsIGNhcHRpb24gcmVjdGFuZ2xlczpcbiAgICAgICAgLy8gICB4eHhFbGVtZW50UmVjdCAtIHJlY3RhbmdsZSBmb3IgZWxlbWVudCwgaW5jbHVkaW5nIG1hcmdpbnNcbiAgICAgICAgLy8gICB4eHhUZXh0UmVjdCAtIGZvciB0ZXh0IG9ubHlcblxuICAgICAgICBmdW4gdGV4dFJlY3RhbmdsZShlbGVtZW50UmVjdDogRG91YmxlUmVjdGFuZ2xlLCBtYXJnaW5zOiBNYXJnaW5zKSA9IGNyZWF0ZVRleHRSZWN0YW5nbGUoXG4gICAgICAgICAgICBlbGVtZW50UmVjdCxcbiAgICAgICAgICAgIHRvcE1hcmdpbiA9IG1hcmdpbnMudG9wLFxuICAgICAgICAgICAgYm90dG9tTWFyZ2luID0gbWFyZ2lucy5ib3R0b21cbiAgICAgICAgKVxuXG4gICAgICAgIHZhbCBwbG90VGl0bGVFbGVtZW50UmVjdCA9IHRpdGxlPy5sZXQge1xuICAgICAgICAgICAgRG91YmxlUmVjdGFuZ2xlKFxuICAgICAgICAgICAgICAgIGdlb21BcmVhQm91bmRzLmxlZnQsXG4gICAgICAgICAgICAgICAgcGxvdE91dGVyQm91bmRzLnRvcCxcbiAgICAgICAgICAgICAgICBnZW9tQXJlYUJvdW5kcy53aWR0aCxcbiAgICAgICAgICAgICAgICBQbG90TGF5b3V0VXRpbC50aXRsZVRoaWNrbmVzcyhcbiAgICAgICAgICAgICAgICAgICAgdGl0bGUsXG4gICAgICAgICAgICAgICAgICAgIFBsb3RMYWJlbFNwZWNGYWN0b3J5LnBsb3RUaXRsZShwbG90VGhlbWUpLFxuICAgICAgICAgICAgICAgICAgICB0aGVtZS5wbG90KCkudGl0bGVNYXJnaW5zKClcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICApXG4gICAgICAgIH1cbiAgICAgICAgdmFsIHBsb3RUaXRsZVRleHRSZWN0ID0gcGxvdFRpdGxlRWxlbWVudFJlY3Q/LmxldCB7IHRleHRSZWN0YW5nbGUoaXQsIHRoZW1lLnBsb3QoKS50aXRsZU1hcmdpbnMoKSkgfVxuICAgICAgICBpZiAoREVCVUdfRFJBV0lORykge1xuICAgICAgICAgICAgcGxvdFRpdGxlVGV4dFJlY3Q/LmxldCB7IGRyYXdEZWJ1Z1JlY3QoaXQsIENvbG9yLkxJR0hUX0JMVUUpIH1cbiAgICAgICAgICAgIHBsb3RUaXRsZUVsZW1lbnRSZWN0Py5sZXQgeyBkcmF3RGVidWdSZWN0KGl0LCBDb2xvci5HUkFZKSB9XG4gICAgICAgICAgICBwbG90VGl0bGVUZXh0UmVjdD8ubGV0IHtcbiAgICAgICAgICAgICAgICBkcmF3RGVidWdSZWN0KFxuICAgICAgICAgICAgICAgICAgICB0ZXh0Qm91bmRpbmdCb3godGl0bGUhISwgaXQsIFBsb3RMYWJlbFNwZWNGYWN0b3J5LnBsb3RUaXRsZShwbG90VGhlbWUpLCBhbGlnbiA9IC0xKSxcbiAgICAgICAgICAgICAgICAgICAgQ29sb3IuREFSS19HUkVFTlxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHZhbCBzdWJ0aXRsZUVsZW1lbnRSZWN0ID0gc3VidGl0bGU/LmxldCB7XG4gICAgICAgICAgICBEb3VibGVSZWN0YW5nbGUoXG4gICAgICAgICAgICAgICAgZ2VvbUFyZWFCb3VuZHMubGVmdCxcbiAgICAgICAgICAgICAgICBwbG90VGl0bGVFbGVtZW50UmVjdD8uYm90dG9tID86IHBsb3RPdXRlckJvdW5kcy50b3AsXG4gICAgICAgICAgICAgICAgZ2VvbUFyZWFCb3VuZHMud2lkdGgsXG4gICAgICAgICAgICAgICAgUGxvdExheW91dFV0aWwudGl0bGVUaGlja25lc3MoXG4gICAgICAgICAgICAgICAgICAgIHN1YnRpdGxlLFxuICAgICAgICAgICAgICAgICAgICBQbG90TGFiZWxTcGVjRmFjdG9yeS5wbG90U3VidGl0bGUocGxvdFRoZW1lKSxcbiAgICAgICAgICAgICAgICAgICAgdGhlbWUucGxvdCgpLnN1YnRpdGxlTWFyZ2lucygpXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgKVxuICAgICAgICB9XG4gICAgICAgIHZhbCBzdWJ0aXRsZVRleHRSZWN0ID0gc3VidGl0bGVFbGVtZW50UmVjdD8ubGV0IHsgdGV4dFJlY3RhbmdsZShpdCwgdGhlbWUucGxvdCgpLnN1YnRpdGxlTWFyZ2lucygpKSB9XG4gICAgICAgIGlmIChERUJVR19EUkFXSU5HKSB7XG4gICAgICAgICAgICBzdWJ0aXRsZVRleHRSZWN0Py5sZXQgeyBkcmF3RGVidWdSZWN0KGl0LCBDb2xvci5MSUdIVF9CTFVFKSB9XG4gICAgICAgICAgICBzdWJ0aXRsZUVsZW1lbnRSZWN0Py5sZXQgeyBkcmF3RGVidWdSZWN0KGl0LCBDb2xvci5HUkFZKSB9XG4gICAgICAgICAgICBzdWJ0aXRsZVRleHRSZWN0Py5sZXQge1xuICAgICAgICAgICAgICAgIGRyYXdEZWJ1Z1JlY3QoXG4gICAgICAgICAgICAgICAgICAgIHRleHRCb3VuZGluZ0JveChzdWJ0aXRsZSEhLCBpdCwgUGxvdExhYmVsU3BlY0ZhY3RvcnkucGxvdFRpdGxlKHBsb3RUaGVtZSksIGFsaWduID0gLTEpLFxuICAgICAgICAgICAgICAgICAgICBDb2xvci5EQVJLX0dSRUVOXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgdmFsIGNhcHRpb25FbGVtZW50UmVjdCA9IGNhcHRpb24/LmxldCB7XG4gICAgICAgICAgICB2YWwgY2FwdGlvblJlY3RIZWlnaHQgPSBQbG90TGF5b3V0VXRpbC50aXRsZVRoaWNrbmVzcyhcbiAgICAgICAgICAgICAgICBjYXB0aW9uLFxuICAgICAgICAgICAgICAgIFBsb3RMYWJlbFNwZWNGYWN0b3J5LnBsb3RDYXB0aW9uKHBsb3RUaGVtZSksXG4gICAgICAgICAgICAgICAgdGhlbWUucGxvdCgpLmNhcHRpb25NYXJnaW5zKClcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIERvdWJsZVJlY3RhbmdsZShcbiAgICAgICAgICAgICAgICBnZW9tQXJlYUJvdW5kcy5sZWZ0LFxuICAgICAgICAgICAgICAgIHBsb3RPdXRlckJvdW5kcy5ib3R0b20gLSBjYXB0aW9uUmVjdEhlaWdodCxcbiAgICAgICAgICAgICAgICBnZW9tQXJlYUJvdW5kcy53aWR0aCxcbiAgICAgICAgICAgICAgICBjYXB0aW9uUmVjdEhlaWdodFxuICAgICAgICAgICAgKVxuICAgICAgICB9XG4gICAgICAgIHZhbCBjYXB0aW9uVGV4dFJlY3QgPSBjYXB0aW9uRWxlbWVudFJlY3Q/LmxldCB7IHRleHRSZWN0YW5nbGUoaXQsIHRoZW1lLnBsb3QoKS5jYXB0aW9uTWFyZ2lucygpKSB9XG4gICAgICAgIGlmIChERUJVR19EUkFXSU5HKSB7XG4gICAgICAgICAgICBjYXB0aW9uVGV4dFJlY3Q/LmxldCB7IGRyYXdEZWJ1Z1JlY3QoaXQsIENvbG9yLkxJR0hUX0JMVUUpIH1cbiAgICAgICAgICAgIGNhcHRpb25FbGVtZW50UmVjdD8ubGV0IHsgZHJhd0RlYnVnUmVjdChpdCwgQ29sb3IuR1JBWSkgfVxuICAgICAgICAgICAgY2FwdGlvblRleHRSZWN0Py5sZXQge1xuICAgICAgICAgICAgICAgIGRyYXdEZWJ1Z1JlY3QoXG4gICAgICAgICAgICAgICAgICAgIHRleHRCb3VuZGluZ0JveChjYXB0aW9uISEsIGl0LCBQbG90TGFiZWxTcGVjRmFjdG9yeS5wbG90VGl0bGUocGxvdFRoZW1lKSwgYWxpZ24gPSAxKSxcbiAgICAgICAgICAgICAgICAgICAgQ29sb3IuREFSS19HUkVFTlxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIGFkZCBwbG90IHRpdGxlXG4gICAgICAgIHBsb3RUaXRsZVRleHRSZWN0Py5sZXQge1xuICAgICAgICAgICAgYWRkVGl0bGUoXG4gICAgICAgICAgICAgICAgdGl0bGUsXG4gICAgICAgICAgICAgICAgbGFiZWxTcGVjID0gUGxvdExhYmVsU3BlY0ZhY3RvcnkucGxvdFRpdGxlKHBsb3RUaGVtZSksXG4gICAgICAgICAgICAgICAganVzdGlmaWNhdGlvbiA9IHBsb3RUaGVtZS50aXRsZUp1c3RpZmljYXRpb24oKSxcbiAgICAgICAgICAgICAgICBib3VuZFJlY3QgPSBpdCxcbiAgICAgICAgICAgICAgICBjbGFzc05hbWUgPSBTdHlsZS5QTE9UX1RJVExFXG4gICAgICAgICAgICApXG4gICAgICAgIH1cbiAgICAgICAgLy8gYWRkIHBsb3Qgc3VidGl0bGVcbiAgICAgICAgc3VidGl0bGVUZXh0UmVjdD8ubGV0IHtcbiAgICAgICAgICAgIGFkZFRpdGxlKFxuICAgICAgICAgICAgICAgIHN1YnRpdGxlLFxuICAgICAgICAgICAgICAgIGxhYmVsU3BlYyA9IFBsb3RMYWJlbFNwZWNGYWN0b3J5LnBsb3RTdWJ0aXRsZShwbG90VGhlbWUpLFxuICAgICAgICAgICAgICAgIGp1c3RpZmljYXRpb24gPSBwbG90VGhlbWUuc3VidGl0bGVKdXN0aWZpY2F0aW9uKCksXG4gICAgICAgICAgICAgICAgYm91bmRSZWN0ID0gaXQsXG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lID0gU3R5bGUuUExPVF9TVUJUSVRMRVxuICAgICAgICAgICAgKVxuICAgICAgICB9XG5cbiAgICAgICAgdmFsIG92ZXJhbGxUaWxlQm91bmRzID0gUGxvdExheW91dFV0aWwub3ZlcmFsbFRpbGVCb3VuZHMocGxvdEluZm8pXG4gICAgICAgICAgICAuYWRkKHBsb3RJbm5lck9yaWdpbilcblxuICAgICAgICBpZiAoREVCVUdfRFJBV0lORykge1xuICAgICAgICAgICAgZHJhd0RlYnVnUmVjdChvdmVyYWxsVGlsZUJvdW5kcywgQ29sb3IuREFSS19NQUdFTlRBLCBcIkRBUktfTUFHRU5UQTogb3ZlcmFsbFRpbGVCb3VuZHNcIilcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIGFkZCBheGlzIHRpdGxlc1xuICAgICAgICBpZiAoYXhpc0VuYWJsZWQpIHtcbiAgICAgICAgICAgIGlmIChheGlzVGl0bGVMZWZ0ICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICB2YWwgdkF4aXNPcmllbnRhdGlvbiA9IHBsb3RJbmZvLnRpbGVzLmZpcnN0KCkudkF4aXNJbmZvISEub3JpZW50YXRpb25cbiAgICAgICAgICAgICAgICBhZGRBeGlzVGl0bGUoXG4gICAgICAgICAgICAgICAgICAgIGF4aXNUaXRsZUxlZnQsXG4vLyAgICAgICAgICAgICAgICAgICAgT3JpZW50YXRpb24uTEVGVCxcbiAgICAgICAgICAgICAgICAgICAgdkF4aXNPcmllbnRhdGlvbixcbiAgICAgICAgICAgICAgICAgICAgb3ZlcmFsbFRpbGVCb3VuZHMsXG4gICAgICAgICAgICAgICAgICAgIGdlb21BcmVhQm91bmRzLFxuICAgICAgICAgICAgICAgICAgICBsYWJlbFNwZWMgPSBQbG90TGFiZWxTcGVjRmFjdG9yeS5heGlzVGl0bGUodGhlbWUudmVydGljYWxBeGlzKGZsaXBwZWRBeGlzKSksXG4gICAgICAgICAgICAgICAgICAgIGp1c3RpZmljYXRpb24gPSB0aGVtZS52ZXJ0aWNhbEF4aXMoZmxpcHBlZEF4aXMpLnRpdGxlSnVzdGlmaWNhdGlvbigpLFxuICAgICAgICAgICAgICAgICAgICBtYXJnaW5zID0gdGhlbWUudmVydGljYWxBeGlzKGZsaXBwZWRBeGlzKS50aXRsZU1hcmdpbnMoKSxcbiAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lID0gXCIke1N0eWxlLkFYSVNfVElUTEV9LSR7dGhlbWUudmVydGljYWxBeGlzKGZsaXBwZWRBeGlzKS5heGlzfVwiXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGF4aXNUaXRsZUJvdHRvbSAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgdmFsIGhBeGlzT3JpZW50YXRpb24gPSBwbG90SW5mby50aWxlcy5maXJzdCgpLmhBeGlzSW5mbyEhLm9yaWVudGF0aW9uXG4gICAgICAgICAgICAgICAgYWRkQXhpc1RpdGxlKFxuICAgICAgICAgICAgICAgICAgICBheGlzVGl0bGVCb3R0b20sXG4vLyAgICAgICAgICAgICAgICAgICAgT3JpZW50YXRpb24uQk9UVE9NLFxuICAgICAgICAgICAgICAgICAgICBoQXhpc09yaWVudGF0aW9uLFxuICAgICAgICAgICAgICAgICAgICBvdmVyYWxsVGlsZUJvdW5kcyxcbiAgICAgICAgICAgICAgICAgICAgZ2VvbUFyZWFCb3VuZHMsXG4gICAgICAgICAgICAgICAgICAgIGxhYmVsU3BlYyA9IFBsb3RMYWJlbFNwZWNGYWN0b3J5LmF4aXNUaXRsZSh0aGVtZS5ob3Jpem9udGFsQXhpcyhmbGlwcGVkQXhpcykpLFxuICAgICAgICAgICAgICAgICAgICBqdXN0aWZpY2F0aW9uID0gdGhlbWUuaG9yaXpvbnRhbEF4aXMoZmxpcHBlZEF4aXMpLnRpdGxlSnVzdGlmaWNhdGlvbigpLFxuICAgICAgICAgICAgICAgICAgICBtYXJnaW5zID0gdGhlbWUuaG9yaXpvbnRhbEF4aXMoZmxpcHBlZEF4aXMpLnRpdGxlTWFyZ2lucygpLFxuICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWUgPSBcIiR7U3R5bGUuQVhJU19USVRMRX0tJHt0aGVtZS5ob3Jpem9udGFsQXhpcyhmbGlwcGVkQXhpcykuYXhpc31cIlxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIGFkZCBsZWdlbmRzXG4gICAgICAgIGlmICghbGVnZW5kVGhlbWUucG9zaXRpb24oKS5pc0hpZGRlbikge1xuICAgICAgICAgICAgdmFsIGxlZ2VuZHNCbG9ja0luZm9MYXlvdXRlZCA9IExlZ2VuZEJveGVzTGF5b3V0KFxuICAgICAgICAgICAgICAgIG91dGVyQm91bmRzID0gcGxvdE91dGVyQm91bmRzV2l0aG91dFRpdGxlQW5kQ2FwdGlvbixcbiAgICAgICAgICAgICAgICBpbm5lckJvdW5kcyA9IGdlb21BcmVhQm91bmRzLFxuICAgICAgICAgICAgICAgIGxlZ2VuZFRoZW1lXG4gICAgICAgICAgICApLmRvTGF5b3V0KGxlZ2VuZHNCbG9ja0luZm8pXG5cbiAgICAgICAgICAgIGZvciAoYm94V2l0aExvY2F0aW9uIGluIGxlZ2VuZHNCbG9ja0luZm9MYXlvdXRlZC5ib3hXaXRoTG9jYXRpb25MaXN0KSB7XG4gICAgICAgICAgICAgICAgdmFsIGxlZ2VuZEJveCA9IGJveFdpdGhMb2NhdGlvbi5sZWdlbmRCb3guY3JlYXRlTGVnZW5kQm94KClcbiAgICAgICAgICAgICAgICBsZWdlbmRCb3gubW92ZVRvKGJveFdpdGhMb2NhdGlvbi5sb2NhdGlvbilcbiAgICAgICAgICAgICAgICBhZGQobGVnZW5kQm94KVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gYWRkIGNhcHRpb25cbiAgICAgICAgY2FwdGlvblRleHRSZWN0Py5sZXQge1xuICAgICAgICAgICAgYWRkVGl0bGUoXG4gICAgICAgICAgICAgICAgdGl0bGUgPSBjYXB0aW9uLFxuICAgICAgICAgICAgICAgIGxhYmVsU3BlYyA9IFBsb3RMYWJlbFNwZWNGYWN0b3J5LnBsb3RDYXB0aW9uKHBsb3RUaGVtZSksXG4gICAgICAgICAgICA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uXG4gICAgICAgIGxhYmVsU3BlYzogTGFiZWxTcGVjLFxuICAgICAgICBqdXN0aWZpY2F0aW9uOiBUZXh0SnVzdGlmaWNhdGlvbixcbiAgICAgICAgbWFyZ2luczogTWFyZ2lucyxcbiAgICAgICAgY2xhc3NOYW1lOiBTdHJpbmdcbiAgICApIHtcbiAgICAgICAgdmFsIHJlZmVyZW5jZVJlY3QgPSB3aGVuIChvcmllbnRhdGlvbikge1xuICAgICAgICAgICAgT3JpZW50YXRpb24uTEVGVCxcbiAgICAgICAgICAgIE9yaWVudGF0aW9uLlJJR0hUIC0+XG4gICAgICAgICAgICAgICAgRG91YmxlUmVjdGFuZ2xlKFxuICAgICAgICAgICAgICAgICAgICBvdmVyYWxsVGlsZUJvdW5kcy5sZWZ0LCBvdmVyYWxsR2VvbUJvdW5kcy50b3AsXG4gICAgICAgICAgICAgICAgICAgIG92ZXJhbGxUaWxlQm91bmRzLndpZHRoLCBvdmVyYWxsR2VvbUJvdW5kcy5oZWlnaHRcbiAgICAgICAgICAgICAgICApXG5cbiAgICAgICAgICAgIE9yaWVudGF0aW9uLlRPUCxcbiAgICAgICAgICAgIE9yaWVudGF0aW9uLkJPVFRPTSAtPlxuICAgICAgICAgICAgICAgIERvdWJsZVJlY3RhbmdsZShcbiAgICAgICAgICAgICAgICAgICAgb3ZlcmFsbEdlb21Cb3VuZHMubGVmdCwgb3ZlcmFsbFRpbGVCb3VuZHMudG9wLFxuICAgICAgICAgICAgICAgICAgICBvdmVyYWxsR2VvbUJvdW5kcy53aWR0aCwgb3ZlcmFsbFRpbGVCb3VuZHMuaGVpZ2h0XG4gICAgICAgICAgICAgICAgKVxuICAgICAgICB9XG5cbiAgICAgICAgdmFsIHJvdGF0aW9uID0gd2hlbiAob3JpZW50YXRpb24pIHtcbiAgICAgICAgICAgIE9yaWVudGF0aW9uLkxFRlQgLT4gVGV4dFJvdGF0aW9uLkFOVElDTE9DS1dJU0VcbiAgICAgICAgICAgIE9yaWVudGF0aW9uLlJJR0hUIC0+IFRleHRSb3RhdGlvbi5BTlRJQ0xPQ0tXSVNFXG4gICAgICAgICAgICBlbHNlIC0+IG51bGxcbiAgICAgICAgfVxuXG4gICAgICAgIHZhbCB0ZXh0SGVpZ2h0ID0gUGxvdExheW91dFV0aWwudGV4dERpbWVuc2lvbnModGV4dCwgbGFiZWxTcGVjKS55XG5cbiAgICAgICAgLy8gcmVjdGFuZ2xlIGZvciBlbGVtZW50LCBpbmNsdWRpbmcgbWFyZ2luc1xuICAgICAgICB2YWwgYXhpc1RpdGxlRWxlbWVudFJlY3QgPSB3aGVuIChvcmllbnRhdGlvbikge1xuICAgICAgICAgICAgT3JpZW50YXRpb24uTEVGVCAtPlxuICAgICAgICAgICAgICAgIERvdWJsZVJlY3RhbmdsZShcbiAgICAgICAgICAgICAgICAgICAgcmVmZXJlbmNlUmVjdC5sZWZ0IC0gdGV4dEhlaWdodCAtIG1hcmdpbnMud2lkdGgoKSxcbiAgICAgICAgICAgICAgICAgICAgcmVmZXJlbmNlUmVjdC50b3AsXG4gICAgICAgICAgICAgICAgICAgIHRleHRIZWlnaHQgKyBtYXJnaW5zLndpZHRoKCksXG4gICAgICAgICAgICAgICAgICAgIHJlZmVyZW5jZVJlY3QuaGVpZ2h0XG4gICAgICAgICAgICAgICAgKVxuXG4gICAgICAgICAgICBPcmllbnRhdGlvbi5SSUdIVCAtPlxuICAgICAgICAgICAgICAgIERvdWJsZVJlY3RhbmdsZShcbiAgICAgICAgICAgICAgICAgICAgcmVmZXJlbmNlUmVjdC5yaWdodCxcbiAgICAgICAgICAgICAgICAgICAgcmVmZXJlbmNlUmVjdC50b3AsXG4gICAgICAgICAgICAgICAgICAgIHRleHRIZWlnaHQgKyBtYXJnaW5zLndpZHRoKCksXG4gICAgICAgICAgICAgICAgICAgIHJlZmVyZW5jZVJlY3QuaGVpZ2h0XG4gICAgICAgICAgICAgICAgKVxuXG4gICAgICAgICAgICBPcmllbnRhdGlvbi5UT1AgLT4gRG91YmxlUmVjdGFuZ2xlKFxuICAgICAgICAgICAgICAgIHJlZmVyZW5jZVJlY3QubGVmdCxcbiAgICAgICAgICAgICAgICByZWZlcmVuY2VSZWN0LnRvcCAtIHRleHRIZWlnaHQgLSBtYXJnaW5zLmhlaWdodCgpLFxuICAgICAgICAgICAgICAgIHJlZmVyZW5jZVJlY3Qud2lkdGgsXG4gICAgICAgICAgICAgICAgdGV4dEhlaWdodCArIG1hcmdpbnMuaGVpZ2h0KClcbiAgICAgICAgICAgIClcblxuICAgICAgICAgICAgT3JpZW50YXRpb24uQk9UVE9NIC0+IERvdWJsZVJlY3RhbmdsZShcbiAgICAgICAgICAgICAgICByZWZlcmVuY2VSZWN0LmxlZnQsXG4gICAgICAgICAgICAgICAgcmVmZXJlbmNlUmVjdC5ib3R0b20sXG4gICAgICAgICAgICAgICAgcmVmZXJlbmNlUmVjdC53aWR0aCxcbiAgICAgICAgICAgICAgICB0ZXh0SGVpZ2h0ICsgbWFyZ2lucy5oZWlnaHQoKVxuICAgICAgICAgICAgKVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gcmVjdGFuZ2xlIGZvciB0ZXh0ICh3aXRob3V0IG1hcmdpbnMpXG4gICAgICAgIHZhbCBheGlzVGl0bGVUZXh0UmVjdCA9IHdoZW4ge1xuICAgICAgICAgICAgb3JpZW50YXRpb24uaXNIb3Jpem9udGFsIC0+IHtcbiAgICAgICAgICAgICAgICBjcmVhdGVUZXh0UmVjdGFuZ2xlKFxuICAgICAgICAgICAgICAgICAgICBheGlzVGl0bGVFbGVtZW50UmVjdCxcbiAgICAgICAgICAgICAgICAgICAgdG9wTWFyZ2luID0gbWFyZ2lucy50b3AsXG4gICAgICAgICAgICAgICAgICAgIGJvdHRvbU1hcmdpbiA9IG1hcmdpbnMuYm90dG9tXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBlbHNlIC0+IHtcbiAgICAgICAgICAgICAgICBjcmVhdGVUZXh0UmVjdGFuZ2xlKFxuICAgICAgICAgICAgICAgICAgICBheGlzVGl0bGVFbGVtZW50UmVjdCxcbiAgICAgICAgICAgICAgICAgICAgcmlnaHRNYXJnaW4gPSBtYXJnaW5zLnJpZ2h0LFxuICAgICAgICAgICAgICAgICAgICBsZWZ0TWFyZ2luID0gbWFyZ2lucy5sZWZ0XG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgYWRkVGl0bGUoXG4gICAgICAgICAgICB0ZXh0LFxuICAgICAgICAgICAgbGFiZWxTcGVjLFxuICAgICAgICAgICAganVzdGlmaWNhdGlvbixcbiAgICAgICAgICAgIGF4aXNUaXRsZVRleHRSZWN0LFxuICAgICAgICAgICAgcm90YXRpb24sXG4gICAgICAgICAgICBjbGFzc05hbWVcbiAgICAgICAgKVxuXG4gICAgICAgIGlmIChERUJVR19EUkFXSU5HKSB7XG4gICAgICAgICAgICBkcmF3RGVidWdSZWN0KGF4aXNUaXRsZVRleHRSZWN0LCBDb2xvci5MSUdIVF9CTFVFKVxuICAgICAgICAgICAgZHJhd0RlYnVnUmVjdChheGlzVGl0bGVFbGVtZW50UmVjdCwgQ29sb3IuR1JBWSlcbiAgICAgICAgICAgIGRyYXdEZWJ1Z1JlY3QodGV4dEJvdW5kaW5nQm94KHRleHQsIGF4aXNUaXRsZVRleHRSZWN0LCBsYWJlbFNwZWMsIG9yaWVudGF0aW9uKSwgQ29sb3IuREFSS19HUkVFTilcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHByaXZhdGUgZnVuIHRleHRCb3VuZGluZ0JveChcbiAgICAgICAgdGV4dDogU3RyaW5nLFxuICAgICAgICBib3VuZFJlY3Q6IERvdWJsZVJlY3RhbmdsZSxcbiAgICAgICAgbGFiZWxTcGVjOiBMYWJlbFNwZWMsXG4gICAgICAgIG9yaWVudGF0aW9uOiBPcmllbnRhdGlvbiA9IE9yaWVudGF0aW9uLlRPUCxcbiAgICAgICAgYWxpZ246IEludCA9IDAgLy8gPCAwIC0gdG8gbGVmdDsgPiAwIC0gdG8gcmlnaHQ7IDAgLSBjZW50ZXJlZFxuICAgICk6IERvdWJsZVJlY3RhbmdsZSB7XG4gICAgICAgIHZhbCBkID0gUGxvdExheW91dFV0aWwudGV4dERpbWVuc2lvbnModGV4dCwgbGFiZWxTcGVjKVxuICAgICAgICByZXR1cm4gaWYgKG9yaWVudGF0aW9uIGluIGxpc3RPZihPcmllbnRhdGlvbi5UT1AsIE9yaWVudGF0aW9uLkJPVFRPTSkpIHtcbiAgICAgICAgICAgIHZhbCB4ID0gd2hlbiB7XG4gICAgICAgICAgICAgICAgYWxpZ24gPiAwIC0+IGJvdW5kUmVjdC5yaWdodCAtIGQueFxuICAgICAgICAgICAgICAgIGFsaWduIDwgMCAtPiBib3VuZFJlY3QubGVmdFxuICAgICAgICAgICAgICAgIGVsc2UgLT4gYm91bmRSZWN0LmNlbnRlci54IC0gZC54IC8gMlxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgRG91YmxlUmVjdGFuZ2xlKHgsIGJvdW5kUmVjdC5jZW50ZXIueSAtIGQueSAvIDIsIGQueCwgZC55KVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFsIHkgPSB3aGVuIHtcbiAgICAgICAgICAgICAgICBhbGlnbiA+IDAgLT4gYm91bmRSZWN0LmJvdHRvbSAtIGQueFxuICAgICAgICAgICAgICAgIGFsaWduIDwgMCAtPiBib3VuZFJlY3QudG9wXG4gICAgICAgICAgICAgICAgZWxzZSAtPiBib3VuZFJlY3QuY2VudGVyLnkgLSBkLnggLyAyXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBEb3VibGVSZWN0YW5nbGUoYm91bmRSZWN0LmNlbnRlci54IC0gZC55IC8gMiwgeSwgZC55LCBkLngpXG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBwcml2YXRlIGZ1biBhZGRUaXRsZShcbiAgICAgICAgdGl0bGU6IFN0cmluZz8sXG4gICAgICAgIGxhYmVs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wR2VvbUxheWVyICE9IG51bGwpIHtcbiAgICAgICAgICAgIHZhbCByZWFsQm91bmRzID0gdGlsZUxheW91dEluZm8uZ2V0QWJzb2x1dGVPdXRlckdlb21Cb3VuZHModGlsZXNPcmlnaW4pXG4gICAgICAgICAgICB2YWwgbGl2ZU1hcERhdGEgPSBjcmVhdGVDYW52YXNGaWd1cmUobGl2ZU1hcEdlb21MYXllciwgcmVhbEJvdW5kcylcblxuICAgICAgICAgICAgbGl2ZU1hcEZpZ3VyZSA9IGxpdmVNYXBEYXRhLmNhbnZhc0ZpZ3VyZVxuICAgICAgICAgICAgX3RhcmdldExvY2F0b3JzLmFkZChsaXZlTWFwRGF0YS50YXJnZXRMb2NhdG9yKVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgLy8gTm9ybWFsIHBsb3QgdGlsZXNcblxuICAgICAgICAgICAgZnJhbWVPZlJlZmVyZW5jZS5kcmF3QmVmb3JlR2VvbUxheWVyKHRoaXMpXG5cbiAgICAgICAgICAgIGZvciAobGF5ZXIgaW4gY29yZUxheWVycykge1xuICAgICAgICAgICAgICAgIHZhbCBjb2xsZWN0b3JXaXRoTG9jYXRvciA9IExheWVyVGFyZ2V0Q29sbGVjdG9yV2l0aExvY2F0b3IoXG4gICAgICAgICAgICAgICAgICAgIGxheWVyLmdlb21LaW5kLFxuICAgICAgICAgICAgICAgICAgICBsYXllci5sb2NhdG9yTG9va3VwU3BlYyxcbiAgICAgICAgICAgICAgICAgICAgbGF5ZXIuY3JlYXRlQ29udGV4dHVhbE1hcHBpbmcoKSxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgX3RhcmdldExvY2F0b3JzLmFkZChjb2xsZWN0b3JXaXRoTG9jYXRvcilcblxuICAgICAgICAgICAgICAgIHZhbCBsYXllckNvbXBvbmVudCA9IGZyYW1lT2ZSZWZlcmVuY2UuYnVpbGRHZW9tQ29tcG9uZW50KGxheWVyLCBjb2xsZWN0b3JXaXRoTG9jYXRvcilcbiAgICAgICAgICAgICAgICBhZGQobGF5ZXJDb21wb25lbnQpXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIE1hcmdpbmFsIGxheWVyc1xuICAgICAgICAgICAgdmFsIG1hcmdpbmFsTGF5ZXJzQnlNYXJnaW46IE1hcDxNYXJnaW5TaWRlLCBMaXN0PEdlb21MYXllcj4+ID0gbWFyZ2luYWxMYXllcnNCeU1hcmdpbihtYXJnaW5hbExheWVycylcblxuICAgICAgICAgICAgZm9yICgobWFyZ2luLCBsYXllcnMpIGluIG1hcmdpbmFsTGF5ZXJzQnlNYXJnaW4pIHtcbiAgICAgICAgICAgICAgICB2YWwgbWFyZ2luRnJhbWUgPSBtYXJnaW5hbEZyYW1lQnlNYXJnaW4uZ2V0VmFsdWUobWFyZ2luKVxuICAgICAgICAgICAgICAgIGZvciAobGF5ZXIgaW4gbGF5ZXJzKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhbCBtYXJnaW5Db21wb25lbnQgPSBtYXJnaW5GcmFtZS5idWlsZEdlb21Db21wb25lbnQobGF5ZXIsIE51bGxHZW9tVGFyZ2V0Q29sbGVjdG9yKCkpXG4gICAgICAgICAgICAgICAgICAgIGFkZChtYXJnaW5Db21wb25lbnQpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBmcmFtZU9mUmVmZXJlbmNlLmRyYXdBZnRlckdlb21MYXllcih0aGlzKVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgcHJpdmF0ZSBmdW4gYWRkRmFjZXRMYWJlbHMoZ2VvbUJvdW5kczogRG91YmxlUmVjdGFuZ2xlLCB0aGVtZTogRmFjZXRzVGhlbWUpIHtcbi8vICAgICAgICBpZiAoIXRoZW1lLnNob3dTdHJpcCgpKSByZXR1cm5cblxuICAgICAgICAvLyBmYWNldCBYIGxhYmVsIChvbiB0b3Agb2YgZ2VvbSBhcmVhKVxuICAgICAgICB2YWwgeExhYmVscyA9IHRpbGVMYXlvdXRJbmZvLmZhY2V0WExhYmVsc1xuICAgICAgICBpZiAoeExhYmVscy5pc05vdEVtcHR5KCkpIHtcbiAgICAgICAgICAgIHZhbCBsYWJlbFNpemUgPSBmYWNldENvbExhYmVsU2l6ZShnZW9tQm91bmRzLndpZHRoKVxuICAgICAgICAgICAgdmFsIGxhYmVsT3JpZyA9IERvdWJsZVZlY3RvcihcbiAgICAgICAgICAgICAgICBnZW9tQm91bmRzLmxlZnQgKyBGQUNFVF9IX1BBRERJTkcsXG4gICAgICAgICAgICAgICAgZ2VvbUJvdW5kcy50b3AgLSBmYWNldENvbEhlYWRIZWlnaHQoeExhYmVscy5zaXplKSArIEZBQ0VUX1ZfUEFERElOR1xuICAgICAgICAgICAgKVxuICAgICAgICAgICAgdmFyIGxhYmVsQm91bmRzID0gRG91YmxlUmVjdGFuZ2xlKFxuICAgICAgICAgICAgICAgIGxhYmVsT3JpZywgbGFiZWxTaXplXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBmb3IgKHhMYWJlbCBpbiB4TGFiZWxzKSB7XG4gICAgICAgICAgICAgICAgLy8gVG9EbzogVXNlIFwiZmFjZXQgWFwiIHRoZW1lLlxuICAgICAgICAgICAgICAgIGFkZEZhY2V0TGFiQmFja2dyb3VuZChsYWJlbEJvdW5kcywgdGhlbWUpXG5cbiAgICAgICAgICAgICAgICB2YWwgeCA9IGxhYmVsQm91bmRzLmNlbnRlci54XG4gICAgICAgICAgICAgICAgdmFsIHkgPSBsYWJlbEJvdW5kcy5jZW50ZXIueVxuICAgICAgICAgICAgICAgIHZhbCBsYWIgPSBUZXh0TGFiZWwoeExhYmVsKVxuICAgICAgICAgICAgICAgIGxhYi5hZGRDbGFzc05hbWUoXCIke1N0eWxlLkZBQ0VUX1NUUklQX1RFWFR9LXhcIilcbiAgICAgICAgICAgICAgICBsYWIubW92ZVRvKHgsIHkpXG4gICAgICAgICAgICAgICAgbGFiLnNldEhvcml6b250YWxBbmNob3IoVGV4dC5Ib3Jpem9udGFsQW5jaG9yLk1JRERMRSlcbiAgICAgICAgICAgICAgICBsYWIuc2V0VmVydGljYWxBbmNob3IoVGV4dC5WZXJ0aWNhbEFuY2hvci5DRU5URVIpXG4gICAgICAgICAgICAgICAgYWRkKGxhYilcblxuICAgICAgICAgICAgICAgIGxhYmVsQm91bmRzID0gbGFiZWxCb3VuZHMuYWRkKERvdWJsZVZlY3RvcigwLjAsIGxhYmVsU2l6ZS55KSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIGZhY2V0IFkgbGFiZWwgKHRvIHRoZSByaWdodCBmcm9tIGdlb20gYXJlYSlcbiAgICAgICAgaWYgKHRpbGVMYXlvdXRJbmZvLmZhY2V0WUxhYmVsICE9IG51bGwpIHtcblxuICAgICAgICAgICAgdmFsIGhQYWQgPSBGQUNFVF9WX1BBRERJTkdcbiAgICAgICAgICAgIHZhbCB2UGFkID0gRkFDRVRfSF9QQURESU5HXG5cbiAgICAgICAgICAgIHZhbCBsYWJlbEJvdW5kcyA9IERvdWJsZVJlY3RhbmdsZShcbiAgICAgICAgICAgICAgICBnZW9tQm91bmRzLnJpZ2h0ICsgaFBhZCwgZ2VvbUJvdW5kcy50b3AgLSB2UGFkLFxuICAgICAgICAgICAgICAgIEZBQ0VUX1RBQl9IRUlHSFQgLSBoUGFkICogMiwgZ2VvbUJvdW5kcy5oZWlnaHQgLSB2UGFkICogMlxuICAgICAgICAgICAgKVxuXG4gICAgICAgICAgICAvLyBUb0RvOiBVc2UgXCJmYWNldCBZXCIgdGhlbWUuXG4gICAgICAgICAgICBhZGRGYWNldExhYkJhY2tncm91bmQobGFiZWxCb3VuZHMsIHRoZW1lKVxuXG4gICAgICAgICAgICB2YWwgeCA9IGxhYmVsQm91bmRzLmNlbnRlci54XG4gICAgICAgICAgICB2YWwgeSA9IGxhYmVsQm91bmRzLmNlbnRlci55XG5cbiAgICAgICAgICAgIHZhbCBsYWIgPSBUZXh0TGFiZWwodGlsZUxheW91dE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mVhdGVQb3NpdGlvbkFkanVzdG1lbnQocG9zUHJvdmlkZXI6IFBvc1Byb3ZpZGVyLCBhZXM6IEFlc3RoZXRpY3MpOiBQb3NpdGlvbkFkanVzdG1lbnQge1xuICAgICAgICByZXR1cm4gcG9zUHJvdmlkZXIuY3JlYXRlUG9zKG9iamVjdCA6IFBvc1Byb3ZpZGVyQ29udGV4dCB7XG4gICAgICAgICAgICBvdmVycmlkZSB2YWwgYWVzdGhldGljczogQWVzdGhldGljc1xuICAgICAgICAgICAgICAgIGdldCgpID0gYWVzXG5cbiAgICAgICAgICAgIG92ZXJyaWRlIHZhbCBncm91cENvdW50OiBJbnRcbiAgICAgICAgICAgICAgICAgICAgYnkgbGF6eSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YWwgc2V0ID0gYWVzLmdyb3VwcygpLnRvU2V0KClcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldC5zaXplXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgfSlcbiAgICB9XG5cbiAgICBpbnRlcm5hbCBmdW4gcHJlcGFyZUxheWVyQWVzdGhldGljTWFwcGVycyhcbiAgICAgICAgbGF5ZXI6IEdlb21MYXllcixcbiAgICAgICAgeEFlc01hcHBlcjogU2NhbGVNYXBwZXI8RG91YmxlPixcbiAgICAgICAgeUFlc01hcHBlcjogU2NhbGVNYXBwZXI8RG91YmxlPixcbiAgICApOiBNYXA8QWVzPCo+LCBTY2FsZU1hcHBlcjwqPj4ge1xuXG4gICAgICAgIHZhbCB5T3JpZW50YXRpb24gPSBsYXllci5pc1lPcmllbnRhdGlvblxuICAgICAgICB2YWwgbWFwcGVycyA9IEhhc2hNYXA8QWVzPCo+LCBTY2FsZU1hcHBlcjwqPj4oKVxuICAgICAgICB2YWwgcmVuZGVyZWRBZXMgPSBsYXllci5yZW5kZXJlZEFlcygpICsgbGlzdE9mKEFlcy5YLCBBZXMuWSlcbiAgICAgICAgZm9yIChhZXMgaW4gcmVuZGVyZWRBZXMpI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29uc3RhbnQgb3ZlcnJpZGVzIGJpbmRpbmdcbiAgICAgICAgICAgICAgICB2YWwgdiA9IGxheWVyLmdldENvbnN0YW50KGFlcylcbiAgICAgICAgICAgICAgICB2YWwgdCA9IHRyYW5zZm9ybUlmQ29udGludW91cyhzY2FsZShhZXMsIGxheWVyKSlcbiAgICAgICAgICAgICAgICBhZXNCdWlsZGVyLmNvbnN0YW50QWVzKGFlcywgY29uc3RhbnRUb0Flc1ZhbHVlKGFlcywgdiwgdCwgbWFwcGVyT3B0aW9uKSlcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgLy8gTm8gY29uc3RhbnQgLSBsb29rLXVwIGFlcyBtYXBwaW5nXG4gICAgICAgICAgICAgICAgaWYgKGxheWVyLmhhc0JpbmRpbmcoYWVzKSkge1xuICAgICAgICAgICAgICAgICAgICBjaGVjayhtYXBwZXJPcHRpb24gIT0gbnVsbCkgeyBcIk5vIHNjYWxlIG1hcHBlciBkZWZpbmVkIGZvciBhZXN0aGV0aWMgJGFlc1wiIH1cblxuICAgICAgICAgICAgICAgICAgICAvLyB2YXJpYWJsZSBhdCB0aGlzIHBvaW50IG11c3QgYmUgZWl0aGVyIFNUQVQgb3IgVFJBTlNGT1JNIChidXQgbm90IE9SSUdJTilcbiAgICAgICAgICAgICAgICAgICAgdmFsIHRyYW5zZm9ybVZhciA9IERhdGFGcmFtZVV0aWwudHJhbnNmb3JtVmFyRm9yKGFlcylcbiAgICAgICAgICAgICAgICAgICAgY2hlY2soZGF0YS5oYXModHJhbnNmb3JtVmFyKSkgeyBcIlVuZGVmaW5lZCB2YXIgJHRyYW5zZm9ybVZhciBmb3IgYWVzdGhldGljICRhZXNcIiB9XG4gICAgICAgICAgICAgICAgICAgIHZhbCBudW1lcmljVmFsdWVzID0gZGF0YS5nZXROdW1lcmljKHRyYW5zZm9ybVZhcilcblxuICAgICAgICAgICAgICAgICAgICBpZiAoZGF0YVBvaW50Q291bnQgPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YVBvaW50Q291bnQgPSBudW1lcmljVmFsdWVzLnNpemVcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrKGRhdGFQb2ludENvdW50ID09IG51bWVyaWNWYWx1ZXMuc2l6ZSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHsgXCJcIiArIGFlcyArIFwiIGV4cGVjdGVkIGRhdGEgc2l6ZT1cIiArIGRhdGFQb2ludENvdW50ICsgXCIgd2FzIHNpemU9XCIgKyBudW1lcmljVmFsdWVzLnNpemUgfVxuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKGRhdGFQb2ludENvdW50ID09IDAgJiYgaGFzUG9zaXRpb25hbENvbnN0YW50cykge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gcHV0IGNvbnN0YW50IGluc3RlYWQgb2YgZW1wdHkgbGlzdFxuICAgICAgICAgICAgICAgICAgICAgICAgYWVzQnVpbGRlci5jb25zdGFudEFlcyhhZXMsIGxheWVyLmFlc3RoZXRpY3NEZWZhdWx0cy5kZWZhdWx0VmFsdWUoYWVzKSlcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbCBpbnRlZ2VyRnVuY3Rpb24gPSBsaXN0TWFwcGVyKG51bWVyaWNWYWx1ZXMsIG1hcHBlck9wdGlvbilcbiAgICAgICAgICAgICAgICAgICAgICAgIGFlc0J1aWxkZXIuYWVzKGFlcywgaW50ZWdlckZ1bmN0aW9uKVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gYXBwbHkgZGVmYXVsdFxuICAgICAgICAgICAgICAgICAgICB2YWwgdiA9IGxheWVyLmdldERlZmF1bHQoYWVzKVxuICAgICAgICAgICAgICAgICAgICB2YWwgdCA9IHRyYW5zZm9ybUlmQ29udGludW91cyhzY2FsZShhZXMsIGxheWVyKSlcbiAgICAgICAgICAgICAgICAgICAgYWVzQnVpbGRlci5jb25zdGFudEFlcyhcbiAgICAgICAgICAgICAgICAgICAgICAgIGFlcyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0YW50VG9BZXNWYWx1ZShhZXMsIHYsIHQsIG1hcHBlck9wdGlvbilcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChkYXRhUG9pbnRDb3VudCAhPSBudWxsICYmIGRhdGFQb2ludENvdW50ID4gMCkge1xuICAgICAgICAgICAgYWVzQnVpbGRlci5kYXRhUG9pbnRDb3VudChkYXRhUG9pbnRDb3VudClcbiAgICAgICAgfSBlbHNlIGlmIChoYXNQb3NpdGlvbmFsQ29uc3RhbnRzKSB7XG4gICAgICAgICAgICAvLyBzb21lIGdlb21zIChwb2ludCwgYWJsaW5lIGV0Yy4pIGNhbiBiZSBwbG90dGVkIHdpdGggb25seSBjb25zdGFudHNcbiAgICAgICAgICAgIGFlc0J1aWxkZXIuZGF0YVBvaW50Q291bnQoMSlcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBhZXNCdWlsZGVyLmJ1aWxkKClcbiAgICB9XG5cbiAgICBwcml2YXRlIGZ1biBjb25zdGFudFRvQWVzVmFsdWUoXG4gICAgICAgIGFlczogQWVzPCo+LFxuICAgICAgICB2OiBBbnk/LFxuICAgICAgICBjb250aW51b3VzVHJhbnNmb3JtOiBDb250aW51b3VzVHJhbnNmb3JtPyxcbiAgICAgICAgbWFwcGVyT3B0aW9uOiBTY2FsZU1hcHBlcjwqPj9cbiAgICApOiBBbnk/IHtcblxuICAgICAgICByZXR1cm4gaWYgKGFlcy5pc051bWVyaWMpIHtcbiAgICAgICAgICAgIC8vIENvbnN0YW50cyBmb3IgbnVtZX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W5ndGggKiBtdWxFeHBcbiAgICAgICAgdmFyIHVwcGVyRXhwYW5kID0gbG93ZXJFeHBhbmRcbiAgICAgICAgaWYgKGluY2x1ZGVaZXJvKSB7XG4gICAgICAgICAgICAvLyB6ZXJvLWJhc2VkIHBsb3RzIChsaWtlIGJhcikgLSBkbyBub3QgJ2V4cGFuZCcgb24gdGhlIHplcm8tZW5kXG4gICAgICAgICAgICBpZiAobG93ZXJFbmRwb2ludCA9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICB1cHBlckVuZHBvaW50ID09IDAuMCB8fFxuICAgICAgICAgICAgICAgIHNpZ24obG93ZXJFbmRwb2ludCkgPT0gc2lnbih1cHBlckVuZHBvaW50KVxuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaWYgKGxvd2VyRW5kcG9pbnQgPj0gMCkge1xuICAgICAgICAgICAgICAgICAgICBsb3dlckV4cGFuZCA9IDAuMFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHVwcGVyRXhwYW5kID0gMC4wXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgdmFsIGxvd2VyRW5kV2l0aEV4cGFuZCA9IChsb3dlckVuZHBvaW50IC0gbG93ZXJFeHBhbmQpLmxldCB7XG4gICAgICAgICAgICB2YWwgdHJhbnNmb3JtZWQgPSBjb250aW51b3VzVHJhbnNmb3JtPy5hcHBseShpdCkgPzogaXRcbiAgICAgICAgICAgIGlmICh0cmFuc2Zvcm1lZC5pc05hTigpKSB7XG4gICAgICAgICAgICAgICAgcmFuZ2UubG93ZXJFbmRcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdHJhbnNmb3JtZWRcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICB2YWwgdXBwZXJFbmRXaXRoRXhwYW5kID0gKHVwcGVyRW5kcG9pbnQgKyB1cHBlckV4cGFu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pID86IHJldHVybiBudWxsXG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG15TGluZUZvcm1hdHRlci5mb3JtYXQoZGF0YVZhbHVlcy5tYXAgeyBpdCB9KVxuICAgIH1cblxuICAgIGNvbXBhbmlvbiBvYmplY3Qge1xuICAgICAgICBwcml2YXRlIHZhbCBERUZBVUxUX1NUWUxFID0gVGhlbWVUZXh0U3R5bGUoXG4gICAgICAgICAgICBmYW1pbHkgPSBGb250RmFtaWx5LlNFUklGLFxuICAgICAgICAgICAgZmFjZSA9IEZvbnRGYWNlLk5PUk1BTCxcbiAgICAgICAgICAgIHNpemUgPSAxMC4wLFxuICAgICAgICAgICAgY29sb3IgPSBDb2xvci5CTEFDS1xuICAgICAgICApXG5cbiAgICAgICAgZnVuIGNyZWF0ZUFubm90YXRpb25zKFxuICAgICAgICAgICAgc3BlYzogQW5ub3RhdGlvblNwZWNpZmljYXRpb24sXG4gICAgICAgICAgICBkYXRhQWNjZXNzOiBNYXBwZWREYXRhQWNjZXNzLFxuICAgICAgICAgICAgZGF0YUZyYW1lOiBEYXRhRnJhbWUsXG4gICAgICAgICAgICB0aGVtZVRleHRTdHlsZTogVGhlbWVUZXh0U3R5bGU/XG4gICAgICAgICk6IEFubm90YXRpb25zPyB7XG4gICAgICAgICAgICBpZiAoc3BlYy5saW5lUGF0dGVybnMuaXNFbXB0eSgpKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG51bGxcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhbCBtYXBwZWRMaW5lcyA9IHNwZWMubGluZVBhdHRlcm5zLmZpbHRlciB7IGxpbmUgLT5cbiAgICAgICAgICAgICAgICB2YWwgZGF0YUFlc0xpc3QgPSBsaW5lLmZpZWxkcy5maWx0ZXJJc0luc3RhbmNlPE1hcHBpbmdWYWx1ZT4oKVxuICAgICAgICAgICAgICAgIGRhdGFBZXNMaXN0LmFsbCB7IG1hcHBlZEFlcyAtPiBkYXRhQWNjZXNzLmlzTW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jYWxlID0gU2NhbGVCcmVha3NVdGlsLndpdGhCcmVha3Moc2NhbGUsIHRyYW5zZm9ybWVkRG9tYWluLCA1KVxuICAgICAgICB9XG5cbiAgICAgICAgdmFsIHNjYWxlQnJlYWtzID0gc2NhbGUuZ2V0U2NhbGVCcmVha3MoKVxuICAgICAgICBpZiAoc2NhbGVCcmVha3MuaXNFbXB0eSkge1xuICAgICAgICAgICAgcmV0dXJuIExlZ2VuZEJveEluZm8uRU1QVFlcbiAgICAgICAgfVxuXG4gICAgICAgIHZhbCBzcGVjID0gY3JlYXRlQ29sb3JCYXJTcGVjKFxuICAgICAgICAgICAgbGVnZW5kVGl0bGUsXG4gICAgICAgICAgICB0cmFuc2Zvcm1lZERvbWFpbixcbiAgICAgICAgICAgIHNjYWxlQnJlYWtzLFxuICAgICAgICAgICAgc2NhbGVNYXBwZXIsXG4gICAgICAgICAgICB0aGVtZSxcbiAgICAgICAgICAgIGNvbG9yQmFyT3B0aW9uc1xuICAgICAgICApXG5cbiAgICAgICAgcmV0dXJuIG9iamVjdCA6IExlZ2VuZEJveEluZm8oc3BlYy5zaXplKSB7XG4gICAgICAgICAgICBvdmVycmlkZSBmdW4gY3JlYXRlTGVnZW5kQm94KCk6IExlZ2VuZEJveCB7XG4gICAgICAgICAgICAgICAgdmFsIGMgPSBDb2xvckJhckNvbXBvbmVudChzcGVjKVxuICAgICAgICAgICAgICAgIGMuZGVidWcgPSBERUJVR19EUkFXSU5HXG4gICAgICAgICAgICAgICAgcmV0dXJuIGNcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGludGVybmFsIGZ1biBzZXRPcHRpb25zKG9wdGlvbnM6IENvbG9yQmFyT3B0aW9ucz8pIHtcbiAgICAgICAgY29sb3JCYXJPcHRpb25zID0gb3B0aW9uc1xuICAgIH1cblxuICAgIGNvbXBhbmlvbiBvYmplY3Qge1xuICAgICAgICBwcml2YXRlIGNvbnN0IHZhbCBERUJVR19EUkFXSU5HID0gam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ICAgICAgICAgIGJhclNpemUgPSBEb3VibGVWZWN0b3IoYmFyU2l6ZS54LCBoZWlnaHQpXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhbCByZXZlcnNlID0gIWhvcml6b250YWxcblxuICAgICAgICAgICAgdmFsIGxheW91dCA9IHdoZW4ge1xuICAgICAgICAgICAgICAgIGhvcml6b250YWwgLT4gQ29sb3JCYXJDb21wb25lbnRMYXlvdXQuaG9yaXpvbnRhbCh0aXRsZSwgdHJhbnNmb3JtZWREb21haW4sIGJyZWFrcywgYmFyU2l6ZSwgcmV2ZXJzZSwgdGhlbWUpXG4gICAgICAgICAgICAgICAgZWxzZSAtPiBDb2xvckJhckNvbXBvbmVudExheW91dC52ZXJ0aWNhbCh0aXRsZSwgdHJhbnNmb3JtZWREb21haW4sIGJyZWFrcywgYmFyU2l6ZSwgcmV2ZXJzZSwgdGhlbWUpXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBDb2xvckJhckNvbXBvbmVudFNwZWMoXG4gICAgICAgICAgICAgICAgdGl0bGUsXG4gICAgICAgICAgICAgICAgdHJhbnNmb3JtZWREb21haW4sXG4gICAgICAgICAgICAgICAgYnJlYWtzLFxuICAgICAgICAgICAgICAgIHNjYWxlTWFwcGVyLFxuICAgICAgICAgICAgICAgIGJpbkNvdW50ID0gb3B0aW9ucz8uYmluQ291bnQgPzogREVGX05VTV9CSU4sXG4gICAgICAgICAgICAgICAgdGhlbWUsXG4gICAgICAgICAgICAgICAgbGF5b3V0LFxuICAgICAgICAgICAgICAgIHJldmVyc2VcbiAgICAgICAgICAgIClcbiAgICAgICAgfVxuICAgIH1cbn1cbiIsIi8qXG4gKiBDb3B5cmlnaHQgKGMpIDIwMTkuIEpldEJyYWlucyBzLnIuby5cbiAqIFVzZSBvZiB0aGlzIHNvdXJjZSBjb2RlIGlzIGdvdmVybmVkIGJ5IHRoZSBNSVQgbGljZW5zZSB0aGF0IGNhbiBiZSBmb3VuZCBpbi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B7XG4gICAgICAgICAgICByZXR1cm4gYWVzdGhldGljTWFwcGVycz8uY29udGFpbnNLZXkoYWVzKSA/OiBmYWxzZVxuICAgICAgICB9XG5cbiAgICAgICAgb3ZlcnJpZGUgZnVuIGVzdGltYXRlVGV4dFNpemUoXG4gICAgICAgICAgICB0ZXh0OiBTdHJpbmcsXG4gICAgICAgICAgICBmYW1pbHk6IFN0cmluZyxcbiAgICAgICAgICAgIHNpemU6IERvdWJsZSxcbiAgICAgICAgICAgIGlzQm9sZDogQm9vbGVhbixcbiAgICAgICAgICAgIGlzSXRhbGljOiBCb29sZWFuXG4gICAgICAgICk6IERvdWJsZVZlY3RvciB7XG4gICAgICAgICAgICB2YWwgcmVnaXN0cnkgPSBmb250RmFtaWx5UmVnaXN0cnlcbiAgICAgICAgICAgIGNoZWNrKHJlZ2lzdHJ5ICE9IG51bGwpIHsgXCJGb250LWZhbWlseSByZWdpc3RyeSBpcyBub3Qgc3BlY2lmaWVkLlwiIH1cbiAgICAgICAgICAgIEBTdXBwcmVzcyhcIk5BTUVfU0hBRE9XSU5HXCIpXG4gICAgICAgICAgICB2YWwgZmFtaWx5ID0gcmVnaXN0cnkuZ2V0KGZhbWlseSlcbiAgICAgICAgICAgIHJldHVybiBQbG90TGFiZWxTcGVjKFxuICAgICAgICAgICAgICAgIEZvbnQoXG4gICAgICAgICAgICAgICAgICAgIGZhbWlseSA9IGZhbWlseSxcbiAgICAgICAgICAgICAgICAgICAgc2l6ZSA9IHNpemUudG9JbnQoKSxcbiAgICAgICAgICAgICAgICAgICAgaXNCb2xkID0gaXNCb2xkLFxuICAgICAgICAgICAgICAgICAgICBpc0l0YWxpYyA9IGlzSXRhbGljXG4gICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICkuZGltZW5zaW9ucyh0ZXh0KVxuICAgICAgICB9XG5cbiAgICAgICAgb3ZlcnJpZGUgZnVuIGdldEFlc0JvdW5kcygpOiBEb3VibGVSZWN0YW5nbGUge1xuICAgICAgICAgICA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heWVyKFxuICAgICAgICAgICAgZGF0YSxcbiAgICAgICAgICAgIGdlb21Qcm92aWRlcixcbiAgICAgICAgICAgIHBvc1Byb3ZpZGVyLFxuICAgICAgICAgICAgZ2VvbVByb3ZpZGVyLnJlbmRlcnMoKSxcbiAgICAgICAgICAgIGdyb3VwaW5nQ29udGV4dC5ncm91cE1hcHBlcixcbi8vICAgICAgICAgICAgcmVwbGFjZW1lbnRCaW5kaW5ncy52YWx1ZXMsXG4gICAgICAgICAgICByZXBsYWNlbWVudEJpbmRpbmdzLFxuICAgICAgICAgICAgbXlDb25zdGFudEJ5QWVzLFxuICAgICAgICAgICAgc2NhbGVNYXAsXG4gICAgICAgICAgICBzY2FsZU1hcHBwZXJzTlAsXG4gICAgICAgICAgICBteUxvY2F0b3JMb29rdXBTcGVjLFxuLy8gICAgICAgICAgICBteUNvbnRleHR1YWxNYXBwaW5nUHJvdmlkZXIuY3JlYXRlQ29udGV4dHVhbE1hcHBpbmcoZGF0YUFjY2VzcywgZGF0YSksXG4gICAgICAgICAgICBteUNvbnRleHR1YWxNYXBwaW5nUHJvdmlkZXIsXG4gICAgICAgICAgICBteUlzTGVnZW5kRGlzYWJsZWQsXG4gICAgICAgICAgICBpc1lPcmllbnRhdGlvbiA9IGlzWU9yaWVudGF0aW9uLFxuICAgICAgICAgICAgaXNNYXJnaW5hbCA9IGlzTWFyZ2luYWwsXG4gICAgICAgICAgICBtYXJnaW5hbFNpZGUgPSBtYXJnaW5hbFNpZGUsXG4gICAgICAgICAgICBtYXJnaW5hbFNpemUgPSBtYXJnaW5hbFNpemUsXG4gICAgICAgICAgICBmb250RmFtaWx5UmVnaXN0cnkgPSBmb250RmFtaWx5UmVnaXN0cnksXG4gICAgICAgICAgICBhbm5vdGF0aW9uc1Byb3ZpZGVyID0gbXlBbm5vdGF0aW9uc1Byb3ZpZGVyXG4gICAgICAgIClcbiAgICB9XG5cbiAgICBwcml2YXRlIGZ1biBoYW5kbGVzR3JvdXBzKCk6IEJvb2x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ICAgaW5pdCB7XG4gICAgICAgICAgICBteVJlbmRlcmVkQWVzID0gQXJyYXlMaXN0KHJlbmRlcmVkQWVzKVxuXG4gICAgICAgICAgICAvLyBjb25zdGFudCB2YWx1ZSBieSBhZXMgKGRlZmF1bHQgKyBzcGVjaWZpZWQpXG4gICAgICAgICAgICBteUNvbnN0YW50QnlBZXMgPSBUeXBlZEtleUhhc2hNYXAoKVxuICAgICAgICAgICAgZm9yIChrZXkgaW4gY29uc3RhbnRCeUFlcy5rZXlzPEFueT4oKSkge1xuICAgICAgICAgICAgICAgIG15Q29uc3RhbnRCeUFlcy5wdXQoa2V5LCBjb25zdGFudEJ5QWVzW2tleV0pXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBvdmVycmlkZSBmdW4gcmVuZGVyZWRBZXMoKTogTGlzdDxBZXM8Kj4+IHtcbiAgICAgICAgICAgIHJldHVybiBteVJlbmRlcmVkQWVzXG4gICAgICAgIH1cblxuICAgICAgICBvdmVycmlkZSBmdW4gaGFzQmluZGluZyhhZXM6IEFlczwqPik6IEJvb2xlYW4ge1xuICAgICAgICAgICAgcmV0dXJuIHZhckJpbmRpbmdzLmNvbnRhaW5zS2V5KGFlcylcbiAgICAgICAgfVxuXG4gICAgICAgIG92ZXJyaWRlIGZ1biA8VD4gZ2V0QmluZGluZyhhZXM6IEFlczxUPik6IFZhckJpbmRpbmcge1xuICAgICAgICAgICAgcmV0dXJuIHZhckJpbmRpbmdzW2Flc10hIVxuICAgICAgICB9XG5cbiAgICAgICAgb3ZlcnJpZGUgZnVuIGhhc0NvbnN0YW50KGFlczogQWVzPCo+KTogQm9vbGVhbiB7XG4gICAgICAgICAgICByZXR1cm4gbXlDb25zdGFudEJ5QWVzLmNvbnRhaW5zS2V5KGFlcylcbiAgICAgICAgfVxuXG4gICAgICAgIG92ZXJyaWRlIGZ1biA8VD4gZ2V0Q29uc3RhbnQoYWVzOiBBZXM8VD4pOiBUIHtcbiAgICAgICAgICAgIHJlcX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N0KFxuICAgICAgICAgICAgZ2VvbVByb3ZpZGVyOiBHZW9tUHJvdmlkZXIsXG4gICAgICAgICAgICBzdGF0OiBTdGF0LFxuICAgICAgICAgICAgcG9zUHJvdmlkZXI6IFBvc1Byb3ZpZGVyID0gUG9zUHJvdmlkZXIud3JhcChQb3NpdGlvbkFkanVzdG1lbnRzLmlkZW50aXR5KCkpLFxuICAgICAgICApOiBHZW9tTGF5ZXJCdWlsZGVyIHtcbiAgICAgICAgICAgIHZhbCBidWlsZGVyID0gR2VvbUxheWVyQnVpbGRlcihnZW9tUHJvdmlkZXIsIHN0YXQsIHBvc1Byb3ZpZGVyLCBEZWZhdWx0Rm9udEZhbWlseVJlZ2lzdHJ5KCkpXG4gICAgICAgICAgICBidWlsZGVyLm15RGF0YVByZXByb2Nlc3NvciA9IHsgZGF0YSwgdHJhbnNmb3JtQnlBZXMgLT5cbiAgICAgICAgICAgICAgICB2YWwgdHJhbnNmb3JtZWREYXRhID0gRGF0YVByb2Nlc3NpbmcudHJhbnNmb3JtT3JpZ2luYWxzKGRhdGEsIGJ1aWxkZXIubXlCaW5kaW5ncywgdHJhbnNmb3JtQnlBZXMpXG4gICAgICAgICAgICAgICAgd2hlbiAoYnVpbGRlci5zdGF0KSB7XG4gICAgICAgICAgICAgICAgICAgIFN0YXRzLklERU5USVRZIC0+IHRyYW5zZm9ybWVkRGF0YVxuICAgICAgICAgICAgICAgICAgICBlbHNlIC0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbCBzdGF0Q3R4ID0gU2ltcGxlU3RhdENvbnRleHQodHJhbnNmb3JtZWREYXRhKVxuICAgICAgICAgICAgICAgICAgICAgICAgdmFsIGdyb3VwaW5nVmFyaWFibGVzID0gRGF0YVByb2Nlc3NpbmcuZGVmYXVsdEdyb3VwaW5nVmFyaWFibGVzKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnVpbGRlci5teUJpbmRpbmdzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ1aWxkZXIubXlQYXRoSWRWYXJOYW1lXG4gICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICB2YWwgZ3JvdXBpbmdDdHggPSBHcm91cGluZ0NvbnRleHQoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNmb3JtZWREYXRhLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdyb3VwaW5nVmFyaWFibGVzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ1aWxkZXIubXlHcm91cGluZ1Zhck5hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXhwZWN0TXVsdGlwbGUgPSB0cnVlICAvLyA/XG4gICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICB2YWwgc3RhdElucHV0ID0gU3RhdElucHV0KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zZm9ybWVkRGF0YSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBidWlsZGVyLm15QmluZGluZ3MsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNmb3JtQnlBZXMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdEN0eCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbGlwWFkgPSBmYWxzZVxuICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgdmFsIGRhdGFBbmRHcm91cGluZ0NvbnRleHQgPSBEYXRhUHJvY2Vzc2luZy5idWlsZFN0YXREYXRhKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRJbnB1dCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBidWlsZGVyLnN0YXQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZ3JvdXBpbmdDdHgsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmFjZXRWYXJpYWJsZXMgPSBlbXB0eUxpc3QoKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXJzV2l0aG91dEJpbmRpbmcgPSBlbXB0eUxpc3QoKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcmRlck9wdGlvbnMgPSBlbXB0eUxpc3QoKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZ2dyZWdhdGVPcGVyYXRpb24gPSBudWxsLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDo6cHJpbnRsblxuICAgICAgICAgICAgICAgICAgICAgICAgKVxuXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhQW5kR3JvdXBpbmdDb250ZXh0LmRhdGFcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIGJ1aWxkZXJcbiAgICAgICAgfVxuICAgIH1cbn1cbiIsIi8qXG4gKiBDb3B5cmlnaHQgKGMpIDIwMTkuIEpldEJyYWlucyBzLnIuby5cbiAqIFVzZSBvZiB0aGlzIHNvdXJjZSBjb2RlIGlzIGdvdmVybmVkIGJ5IHRoZSBNSVQgbGljZW5zZSB0aGF0IGNhbiBiZSBmb3VuZCBpbiB0aGUgTElDRU5TRSBmaWxlLlxuICovXG5cbnBhY2thZ2UgamV0YnJhaW5zLmRhdGFsb3JlLnBsb3QuYnVpbGRlci5hc3NlbWJsZVxuXG5pbXBvcnQga290bGluLm5hdGl2ZS5jb25jdXJyZW50LlRocmVhZExvY2FsXG5cbmFic3RyYWN0IGNsYXNzIEd1aWRlT3B0aW9ucyB7XG5cbiAgICB2YXIgaXNSZXZlcnNlOiBCb29sZWFuID0gZmFsc2VcblxuICAgIC8vIEluIEtvdGxpbiBOYXRpdmUgb2JqZWN0cyBhIGZyb3plbiBieSBkZWZhdWx0LiBBbm5vdGF0ZSB3aXRoIGBUaHJlYWRMb2Nh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QpIHtcbiAgICAgICAgICAgICAgICBpZiAoZ3VpZGVPcHRpb25zTWFwW2Flc10gaXMgTGVnZW5kT3B0aW9ucykge1xuICAgICAgICAgICAgICAgICAgICBsZWdlbmRPcHRpb25zTGlzdC5hZGQoZ3VpZGVPcHRpb25zTWFwW2Flc10gYXMgTGVnZW5kT3B0aW9ucylcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICB2YWwgc3BlYyA9XG4gICAgICAgICAgICBjcmVhdGVMZWdlbmRTcGVjKFxuICAgICAgICAgICAgICAgIGxlZ2VuZFRpdGxlLCBsZWdlbmRCcmVha3MsIHRoZW1lLFxuICAgICAgICAgICAgICAgIExlZ2VuZE9wdGlvbnMuY29tYmluZShcbiAgICAgICAgICAgICAgICAgICAgbGVnZW5kT3B0aW9uc0xpc3RcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICApXG5cbiAgICAgICAgcmV0dXJuIG9iamVjdCA6IExlZ2VuZEJveEluZm8oc3BlYy5zaXplKSB7XG4gICAgICAgICAgICBvdmVycmlkZSBmdW4gY3JlYXRlTGVnZW5kQm94KCk6IExlZ2VuZEJveCB7XG4gICAgICAgICAgICAgICAgdmFsIGMgPSBMZWdlbmRDb21wb25lbnQoc3BlYylcbiAgICAgICAgICAgICAgICBjLmRlYnVnID0gREVCVUdfRFJBV0lOR1xuICAgICAgICAgICAgICAgIHJldHVybiBjXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cblxuICAgIHByaXZhdGUgY2xhc3MgTGVnZW5kTGF5ZXIoXG4gICAgICAgIGludGVybmFsIHZhbCBrZXlFbGVtZW50RmFjdG9yeTogTGVnZW5kS2V5RWxlbWVudEZhY3RvcnksXG4gICAgICAgIGludGVybmFsIHZhbCBhZXNMaXN0OiBMaXN0PEFlczwqPj4sXG4gICAgICAgIGNvbnN0YW50QnlBZXM6IE1hcDxBZXM8Kj4sIEFueT4sXG4gICAgICAgI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MuZGF0YWxvcmUucGxvdC5GZWF0dXJlU3dpdGNoLkxFR0VORF9ERUJVR19EUkFXSU5HXG5cbiAgICAgICAgZnVuIGNyZWF0ZUxlZ2VuZFNwZWMoXG4gICAgICAgICAgICB0aXRsZTogU3RyaW5nLFxuICAgICAgICAgICAgYnJlYWtzOiBMaXN0PExlZ2VuZEJyZWFrPixcbiAgICAgICAgICAgIHRoZW1lOiBMZWdlbmRUaGVtZSxcbiAgICAgICAgICAgIG9wdGlvbnM6IExlZ2VuZE9wdGlvbnMgPSBMZWdlbmRPcHRpb25zKClcbiAgICAgICAgKTogTGVnZW5kQ29tcG9uZW50U3BlYyB7XG5cbiAgICAgICAgICAgIHZhbCBsZWdlbmREaXJlY3Rpb24gPSBMZWdlbmRBc3NlbWJsZXJVdGlsLmxlZ2VuZERpcmVjdGlvbih0aGVtZSlcblxuICAgICAgICAgICAgLy8ga2V5IHNpemVcbiAgICAgICAgICAgIGZ1biBwcmV0dHkodjogRG91YmxlVmVjdG9yKTogRG91YmxlVmVjdG9yIHtcbiAgICAgICAgICAgICAgICB2YWwgbWFyZ2luID0gMS4wXG4gICAgICAgICAgICAgICAgcmV0dXJuIERvdWJsZVZlY3RvcihcbiAgICAgICAgICAgICAgICAgICAgZmxvb3Iodi54IC8gMikgKiAyICsgMS4wICsgbWFyZ2luLFxuICAgICAgICAgICAgICAgICAgICBmbG9vcih2LnkgLyAyKSAqIDIgKyAxLjAgKyBtYXJnaW5cbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhbCB0aGVtZUtleVNpemUgPSBEb3VibGVWZWN0b3IodGhlbWUua2V5U2l6ZSgpLCB0aGVtZS5rZXlTaXplKCkpXG4gICAgICAgICAgICB2YWwga2V5U2l6ZXMgPSBicmVha3NcbiAgICAgICAgICAgICAgICAubWFwIHsgYnIgLT4gdGhlbWVLZXlTaXplLm1heChwcmV0dHkoYnIubWluaW11bUtleVNpemUpKSB9XG4gICAgICAgICAgICAgICAgLmxldCB7IHNpemVzIC0+XG4gICAgICAgICAgICAgICAgICAgIC8vIFVzZSBtYXggaGVpZ2h0IGZvciBob3Jpem9udGFsIGFuZCBtYXggd2lkdGggZm9yIHZlcnRpY2FsIGxlZ2VuZCBmb3IgYmV0dGVyIChjZW50cmFsKSBhbGlnbm1lbnRcbiAgICAgICAgICAgICAgICAgICAgaWYgKGxlZ2VuZERpcmVjdGlvbiA9PSBMZWdlbmREaXJlY3Rpb24uSE9SSVpPTlRBTCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFsIG1heEtleUhlaWdodCA9IHNpemVzLm1heE9mKERvdWJsZVZlY3Rvcjo6eSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHNpemVzLm1hcCB7IERvdWJsZVZlY3RvcihpdC54LCBtYXhLZXlIZWlnaHQpIH1cbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbCBtYXhLZXlXaWR0aCA9IHNpemVzLm1heE9mKERvdWJsZVZlY3Rvcjo6eClcbiAgICAgICAgICAgICAgICAgICAgICAgIHNpemVzLm1hcCB7IERvdWJsZVZlY3RvcihtYXhLZXlXaWR0aCwgaXQueSkgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyByb3csIGNvbCBjb3VudFxuICAgICAgICAgICAgdmFsIGJyZWFrQ291bnQgPSBicmVha3Muc2l6ZVxuICAgICAgICAgICAgdmFsIGNvbENvdW50OiBJbnRcbiAgICAgICAgICAgIHZhbCByb3dDb3VudDogSW50XG4gICAgICAgICAgICBpZiAob3B0aW9ucy5pc0J5Um93KSB7XG4gICAgICAgICAgICAgICAgY29sQ291bnQgPSB3aGVuIHtcbiAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5oYXNDb2xDb3VudCgpIC0+IG1pbihvcHRpb25zLmNvbENvdW50LCBicmVha0NvdW50KVxuICAgICAgICAgICAgICAgICAgICBvcHRpb25zLmhhc1Jvd0NvdW50KCkgLT4gY2VpbChicmVha0NvdW50IC8gb3B0aW9ucy5yb3dDb3VudC50b0RvdWJsZSgpKS50b0ludCgpXG4gICAgICAgICAgICAgICAgICAgIGxlZ2VuZERpcmVjdGlvbiA9PT0gTGVnZW5kRGlyZWN0aW9uLkhPUklaT05UQUwgLT4gYnJlYWtDb3VudFxuICAgICAgICAgICAgICAgICAgICBlbHNlIC0+IDFcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcm93Q291bnQgPSBjZWlsKGJyZWFrQ291bnQgLyBjb2xDb3VudC50b0RvdWJsZSgpKS50b0ludCgpXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIGJ5IGNvbHVtblxuICAgICAgICAgICAgICAgIHJvd0NvdW50ID0gd2hlbiB7XG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnMuaGFzUm93Q291bnQoKSAtPiBtaW4ob3B0aW9ucy5yb3dDb3VudCwgYnJlYWtDb3VudClcbiAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5oYXNDb2xDb3VudCgpIC0+IGNlaWwoYnJlYWtDb3VudCAvIG9wdGlvbnMuY29sQ291bnQudG9Eb3VibGUoKSkudG9JbnQoKVxuICAgICAgICAgICAgICAgICAgICBsZWdlbmREaXJlY3Rpb24gIT09IExlZ2VuZERpcmVjdGlvbi5IT1JJWk9OVEFMIC0+IGJyZWFrQ291bnRcbiAgICAgICAgICAgICAgICAgICAgZWxzZSAtPiAxXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNvbENvdW50ID0gY2VpbChicmVha0NvdW50IC8gcm93Q291bnQudG9Eb3VibGUoKSkudG9JbnQoKVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YWwgbGF5b3V0OiBMZWdlbmRDb21wb25lbnRMYXlvdXRcbiAgICAgICAgICAgIEBTdXBwcmVzcyhcIkxpZnRSZXR1cm5PckFzc2lnbm1lbnRcIilcbiAgICAgICAgICAgIGlmIChsZWdlbmREaXJlY3Rpb24gPT09IExlZ2VuZERpcmVjdGlvbi5IT1JJWk9OVEFMKSB7XG4gICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMuaGFzUm93Q291bnQoKSB8fCBvcHRpb25zLmhhc0NvbENvdW50KCkgJiYgb3B0aW9ucy5jb2xDb3VudCA8IGJyZWFrQ291bnQpIHtcbiAgICAgICAgICAgICAgICAgICAgbGF5b3V0ID0gTGVnZW5kQ29tcG9uZW50TGF5b3V0Lmhvcml6b250YWxNdWx0aVJvdyhcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlLFxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWtzLFxuICAgICAgICAgICAgICAgICAgICAgICAga2V5U2l6ZXMsXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGVtZVxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgbGF5b3V0ID0gTGVnZW5kQ29tcG9uZW50TGF5b3V0Lmhvcml6b250YWwodGl0bGUsIGJyZWFrcywga2V5U2l6ZXMsIHRoZW1lKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgbGF5b3V0ID0gTGVnZW5kQ29tcG9uZW50TGF5b3V0LnZlcnRpY2FsKHRpdGxlLCBicmVha3MsIGtleVNpemVzLCB0aGVtZSlcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgbGF5b3V0LmNvbENvdW50ID0gY29sQ291bnRcbiAgICAgICAgICAgIGxheW91dC5yb3dDb3VudCA9IHJvd0NvdW50XG4gICAgICAgICAgICBsYXlvdXQuaXNGaWxsQnlSb3cgPSBvcHRpb25zLmlzQnlSb3dcblxuICAgICAgICAgICAgcmV0dXJuIExlZ2VuZENvbXBvbmVudFNwZWMoXG4gICAgICAgICAgICAgIC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EFlcy52YWx1ZXMoKSkge1xuICAgICAgICAgICAgICAgIGRhdGFQb2ludFthZXNdID0gYWVzdGhldGljc0RlZmF1bHRzLmRlZmF1bHRWYWx1ZUluTGVnZW5kKGFlcykhIVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBEZXJpdmUgc29tZSBhZXN0aGV0aWNzIGZyb20gY29uc3RhbnRzXG4gICAgICAgICAgICBmb3IgKGNvbnN0YW50QWVzIGluIGNvbnN0YW50QnlBZXMua2V5cykge1xuICAgICAgICAgICAgICAgIHdoZW4gKGNvbnN0YW50QWVzKSB7XG4gICAgICAgICAgICAgICAgICAgIEFlcy5TSEFQRSxcbiAgICAgICAgICAgICAgICAgICAgQWVzLkNPTE9SLFxuICAgICAgICAgICAgICAgICAgICBBZXMuRklMTCAtPiBkYXRhUG9pbnRbY29uc3RhbnRBZXNdID0gY29uc3RhbnRCeUFlc1tjb25zdGFudEFlc10hIVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgZm9yIChhZXMgaW4gdmFsdWVCeUFlcy5rZXlzKSB7XG4gICAgICAgICAgICAgICAgZGF0YVBvaW50W2Flc10gPSB2YWx1ZUJ5QWVzW2Flc10hIVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBkYXRhUG9pbnRzLmFkZChkYXRhUG9pbnQpXG4gICAgICAgIH1cblxuICAgICAgICB2YWwgYnVpbGRlciA9IEFlc3RoZXRpY3NCdWlsZGVyKGRhdGFQb2ludHMuc2l6ZSlcbiAgICAgICAgZm9yIChhZXMgaW4gQWVzLnZhbHVlcygpKSB7XG4gICAgICAgICAgICBAU3VwcHJlc3MoXCJVTkNIRUNLRURfQ0FTVFwiKVxuICAgICAgICAgICAgYnVpbGRlci5hZXMoYWVzIGFzIEFlczxBbnk+KSB7IGluZGV4IC0+IGRhdGFQb2ludHNbaW5kZXhdW2Flc10hISB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGJ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GUgdmFyIG15Q29sQ291bnQ6IEludD8gPSBudWxsXG4gICAgcHJpdmF0ZSB2YXIgbXlSb3dDb3VudDogSW50PyA9IG51bGxcbiAgICB2YXIgaXNCeVJvdzogQm9vbGVhbiA9IGZhbHNlXG5cbiAgICB2YXIgY29sQ291bnQ6IEludFxuICAgICAgICBnZXQoKSA9IG15Q29sQ291bnQhIVxuICAgICAgICBzZXQoY29sQ291bnQpIHtcbiAgICAgICAgICAgIG15Q29sQ291bnQgPSBtYXgoMSwgY29sQ291bnQpXG4gICAgICAgIH1cblxuICAgIHZhciByb3dDb3VudDogSW50XG4gICAgICAgIGdldCgpID0gbXlSb3dDb3VudCEhXG4gICAgICAgIHNldChyb3dDb3VudCkge1xuICAgICAgICAgICAgbXlSb3dDb3VudCA9IG1heCgxLCByb3dDb3VudClcbiAgICAgICAgfVxuXG4gICAgZnVuIGhhc0NvbENvdW50KCk6IEJvb2xlYW4ge1xuICAgICAgICByZXR1cm4gbXlDb2xDb3VudCAhPSBudWxsXG4gICAgfVxuXG4gICAgZnVuIGhhc1Jvd0NvdW50KCk6IEJvb2xlYW4ge1xuICAgICAgICByZXR1cm4gbXlSb3dDb3VudCAhPSBudWxsXG4gICAgfVxuXG4gICAgY29tcGFuaW9uIG9iamVjdCB7XG4gICAgICAgIGZ1biBjb21iaW5lKG9wdGlvbnNMaXN0OiBMaXN0PExlZ2VuZE9wdGlvbnM+KTogTGVnZW5kT3B0aW9ucyB7XG4gICAgICAgICAgICB2YWwgcmVzdWx0ID0gTGVnZW5kT3B0aW9ucygpXG4gICAgICAgICAgICBmb3IgKG9wdGlvbnMgaW4gb3B0aW9uc0xpc3QpIHtcbiAgICAgICAgICAgICAgICBpZiAob3B0aW9ucy5pc0J5Um93KSB7XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdC5pc0J5Um93ID0gdHJ1ZVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAob3B0aW9ucy5oYXNDb2xDb3VudCgpK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y8gVG9EbzogdHJhbnNmb3JtZWQgcmFuZ2VzIGJ5IGFlc1xuICAgICAgICB2YWwgcGxvdENvbnRleHQ6IFBsb3RDb250ZXh0ID0gUGxvdEFzc2VtYmxlclBsb3RDb250ZXh0KGxheWVyc0J5VGlsZSwgc2NhbGVNYXApXG5cbiAgICAgICAgdmFsIGxlZ2VuZHNCb3hJbmZvcyA9IHdoZW4ge1xuICAgICAgICAgICAgbGVnZW5kc0VuYWJsZWQgLT4gUGxvdEFzc2VtYmxlclV0aWwuY3JlYXRlTGVnZW5kcyhcbiAgICAgICAgICAgICAgICBwbG90Q29udGV4dCxcbiAgICAgICAgICAgICAgICBzY2FsZU1hcHBlcnNOUCxcbiAgICAgICAgICAgICAgICBndWlkZU9wdGlvbnNNYXAsXG4gICAgICAgICAgICAgICAgdGhlbWUubGVnZW5kKClcbiAgICAgICAgICAgIClcblxuICAgICAgICAgICAgZWxzZSAtPiBlbXB0eUxpc3QoKVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGlmIChjb250YWluc0xpdmVNYXApIHtcbiAgICAgICAgICAgIC8vIGJ1aWxkICdsaXZlIG1hcCcgcGxvdDpcbiAgICAgICAgICAgIC8vICAtIHNraXAgWC9ZIHNjYWxlIHRyYWluaW5nXG4gICAgICAgICAgICAvLyAgLSBpZ25vcmUgY29vcmQgcHJvdmlkZXJcbiAgICAgICAgICAgIC8vICAtIHBsb3QgbGF5b3V0IHdpdGhvdXQgYXhlc1xuICAgICAgICAgICAgdmFsIGxheW91dFByb3ZpZGVyQnlUaWxlID0gY29yZUxheWVyc0J5VGlsZS5tYXAge1xuICAgICAgICAgICAgICAgIExpdmVNYXBUaWxlTGF5b3V0UHJvdmlkZXIoKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFsIHBsb3RMYXlvdXQgPSBQbG90QXNzZW1ibGVyVXRpbC5jcmVhdGVQbG90TGF5b3V0KFxuICAgICAgICAgICAgICAgIGxheW91dFByb3ZpZGVyQnlUaWxlLFxuICAgICAgICAgICAgICAgIGZhY2V0cyxcbiAgICAgICAgICAgICAgICB0aGVtZS5mYWNldHMoKSxcbiAgICAgICAgICAgICAgICBoQXhpc1RoZW1lID0gTGl2ZU1hcEF4aXNUaGVtZSgpLFxuICAgICAgICAgICAgICAgIHZBeGlzVGhlbWUgPSBMaXZlTWFwQXhpc1RoZW1lKCksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICB2YWwgZnJhbWVQcm92aWRlckJ5VGlsZSA9IGNvcmVMYXllcnNCeVRpbGUubWFwIHtcbiAgICAgICAgICAgICAgICBCb2d1c0ZyYW1lT2ZSZWZlcmVuY2VQcm92aWRlcigpXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjcmVhdGVQbG90KGZyYW1lUHJvdmlkZXJCeVRpbGUsIHBsb3RMYXlvdXQsIGxlZ2VuZHNCb3hJbmZvcywgc3R5bGVTaGVldCwgcGxvdENvbnRleHQpXG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB2YWwgZmxpcEF4aXMgPSBjb29yZFByb3ZpZGVyLmZsaXBwZWRcbiAgICAgICAgICAgIHZhbCBkb21haW5zWFlCeVRpbGUgPSBQb3NpdGlvbmFsU2NhbGVzVXRpbC5jb21wdXRlUGxvdFhZVHJhbnNmb3JtZWREb21haW5zKFxuICAgICAgICAgICAgICAgIGNvcmVMYXllcnNCeVRpbGUsXG4gICAgICAgICAgICAgICAgc2NhbGVYUHJvdG8sXG4gICAgICAgICAgICAgICAgc2NhbGVZUHJvdG8sXG4gICAgICAgICAgICAgICAgZmFjZXRzXG4gICAgICAgICAgICApXG4gICAgICAgICAgICB2YWwgKGhTY2FsZVByb3RvLCB2U2NhbGVQcm90bykgPSB3aGVuIChmbGlwQXhpcykge1xuICAgICAgICAgICAgICAgIHRydWUgLT4gc2NhbGVZUHJvdG8gdG8gc2NhbGVYUHJvdG9cbiAgICAgICAgICAgICAgICBlbHNlIC0+IHNjYWxlWFByb3RvIHRvIHNjYWxl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YWluKSAtPlxuICAgICAgICAgICAgICAgICAgICB2YWwgYWRqdXN0ZWREb21haW4gPSBjb29yZFByb3ZpZGVyLmFkanVzdERvbWFpbihEb3VibGVSZWN0YW5nbGUoeERvbWFpbiwgeURvbWFpbikpXG4gICAgICAgICAgICAgICAgICAgIFNxdWFyZUZyYW1lT2ZSZWZlcmVuY2VQcm92aWRlcihcbiAgICAgICAgICAgICAgICAgICAgICAgIGhTY2FsZVByb3RvLCB2U2NhbGVQcm90byxcbiAgICAgICAgICAgICAgICAgICAgICAgIGFkanVzdGVkRG9tYWluLFxuICAgICAgICAgICAgICAgICAgICAgICAgZmxpcEF4aXMsXG4gICAgICAgICAgICAgICAgICAgICAgICBoQXhpc09yaWVudGF0aW9uLCB2QXhpc09yaWVudGF0aW9uLFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhlbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICBtYXJnaW5zTGF5b3V0LFxuICAgICAgICAgICAgICAgICAgICAgICAgZG9tYWluQnlNYXJnaW5cbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFsIGxheW91dFByb3ZpZGVyQnlUaWxlOiBMaXN0PFRpbGVMYXlvdXRQcm92aWRlcj4gPSBmcmFtZVByb3ZpZGVyQnlUaWxlLm1hcCB7XG4gICAgICAgICAgICAgICAgaXQuY3JlYXRlVGlsZUxheW91dFByb3ZpZGVyKClcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhbCBwbG90TGF5b3V0ID0gUGxvdEFzc2VtYmxlclV0aWwuY3JlYXRlUGxvdExheW91dChcbiAgICAgICAgICAgICAgICBsYXlvdXRQcm92aWRlckJ5VGlsZSxcbiAgICAgICAgICAgICAgICBmYWNldHMsXG4gICAgICAgICAgICAgICAgdGhlbWUuZmFjZXRzKCksXG4gICAgICAgICAgICAgICAgaEF4aXNUaGVtZSA9IHRoZW1lLmhvcml6b250YWxBeGlzKGZsaXBBeG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ICAgICAgICAgICAgbGVnZW5kQm94SW5mb3MgPSBsZWdlbmRCb3hJbmZvcyxcbiAgICAgICAgICAgIGludGVyYWN0aW9uc0VuYWJsZWQgPSBpbnRlcmFjdGlvbnNFbmFibGVkLFxuICAgICAgICAgICAgdGhlbWUgPSB0aGVtZSxcbiAgICAgICAgICAgIHN0eWxlU2hlZXQgPSBzdHlsZVNoZWV0LFxuICAgICAgICAgICAgcGxvdENvbnRleHQgPSBwbG90Q29udGV4dFxuICAgICAgICApXG4gICAgfVxuXG4gICAgZnVuIGRpc2FibGVMZWdlbmRzKCkge1xuICAgICAgICBsZWdlbmRzRW5hYmxlZCA9IGZhbHNlXG4gICAgfVxuXG4gICAgZnVuIGRpc2FibGVJbnRlcmFjdGlvbnMoKSB7XG4gICAgICAgIGludGVyYWN0aW9uc0VuYWJsZWQgPSBmYWxzZVxuICAgIH1cblxuICAgIGNvbXBhbmlvbiBvYmplY3Qge1xuICAgICAgICBmdW4gZGVtb0FuZFRlc3QoXG4gICAgICAgICAgICBwbG90TGF5ZXJzOiBMaXN0PEdlb21MYXllcj4sXG4gICAgICAgICAgICBzY2FsZU1hcDogVHlwZWRTY2FsZU1hcCxcbiAgICAgICAgICAgIHNjYWxlTWFwcGVyc05QOiBNYXA8QWVzPCo+LCBTY2FsZU1hcHBlcjwqPj4sXG4gICAgICAgICAgICBjb29yZFByb3ZpZGVyOiBDb29yZFByb3ZpZGVyLFxuICAgICAgICAgICAgdGhlbWU6IFRoZW1lLFxuICAgICAgICAgICAgeEF4aXNPcmllbnRhdGlvbjogT3JpZW50YXRpb24gPSBPcmllbnRhdGlvbi5CT1RUT00sXG4gICAgICAgICAgICB5QXhpc09yaWVudGF0aW9uOiBPcmllbnRhdGlvbiA9IE9yaWVudGF0aW9uLkxFRlQsXG4gICAgICAgICk6IFBsb3RBc3NlbWJsZXIge1xuICAgICAgICAgICAgdmFsIGxheWVyc0J5VGlsZSA9IEFycmF5TGlzdDxMaXN0PEdlb21MYXllcj4+KClcbiAgICAgICAgICAgIGxheWVyc0J5VGlsZS5hZGQocGxvdExheWVycylcbiAgICAgICAgICAgIHJldHVybiBtdWx0aVRpbGUoXG4gICAgICAgICAgICAgICAgbGF5ZXJzQnlUaWxlLFxuICAgICAgICAgICAgICAgIHNjYWxlTWFwLFxuICAgICAgICAgICAgICAgIHNjYWxlTWFwcGVyc05QLFxuICAgICAgICAgICAgICAgIGNvb3JkUHJvdmlkZXIsXG4gICAgICAgICAgICAgICAgeEF4aXNPcmllbnRhdGlvbixcbiAgICAgICAgICAgICAgICB5QXhpc09yaWVudGF0aW9uLFxuICAgICAgICAgICAgICAgIHRoZW1lXG4gICAgICAgICAgICApXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gbXVsdGlUaWxlKFxuICAgICAgICAgICAgbGF5ZXJzQnlUaWxlOiBMaXN0PExpc3Q8R2VvbUxheWVyPj4sXG4gICAgICAgICAgICBzY2FsZU1hcDogVHlwZWRTY2FsZU1hcCxcbiAgICAgICAgICAgIHNjYWxlTWFwcGVyc05QOiBNYXA8QWVzPCo+LCBTY2FsZU1hcHBlcjwqPj4sXG4gICAgICAgICAgICBjb29yZFByb3ZpZGVyOiBDb29yZFByb3ZpZGVyLFxuICAgICAgICAgICAgeEF4aXNPcmllbnRhdGlvbjogT3JpZW50YXRpb24sXG4gICAgICAgICAgICB5QXhpc09yaWVudGF0aW9uOiBPcmllbnRhdGlvbixcbiAgICAgICAgICAgIHRoZW1lOiBUaGVtZVxuICAgICAgICApOiBQbG90QXNzZW1ibGVyIHtcbiAgICAgICAgICAgIHJldHVybiBQbG90QXNzZW1ibGVyKFxuICAgICAgICAgICAgICAgIGxheWVyc0J5VGlsZSxcbiAgICAgICAgICAgICAgICBzY2FsZU1hcCxcbiAgICAgICAgICAgICAgICBzY2FsZU1hcHBlcnNOUCxcbiAgICAgICAgICAgICAgICBjb29yZFByb3ZpZGVyLFxuICAgICAgICAgICAgICAgIHhBeGlzT3JpZW50YXRpb24sXG4gICAgICAgICAg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gIGxheWVyc09uUGxhbmUuYWRkKHBhbmVsTGF5ZXJzW2ldKVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHN0aXRjaGVkTGF5ZXJzLmFkZChTdGl0Y2hlZFBsb3RMYXllcihsYXllcnNPblBsYW5lKSlcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIHN0aXRjaGVkTGF5ZXJzXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gY29tcHV0ZU92ZXJhbGxUcmFuc2Zvcm1lZERvbWFpbihcbiAgICAgICAgICAgIGFlczogQWVzPCo+LFxuICAgICAgICAgICAgc3RpdGNoZWRMYXllcnM6IExpc3Q8U3RpdGNoZWRQbG90TGF5ZXI+LFxuICAgICAgICAgICAgc2NhbGVNYXA6IFR5cGVkU2NhbGVNYXBcbiAgICAgICAgKTogRG91YmxlU3BhbiB7XG4gICAgICAgICAgICBjaGVja1Bvc2l0aW9uYWxBZXMoYWVzKVxuXG4gICAgICAgICAgICBmdW4gaXNNYXRjaGluZyh2OiBEYXRhRnJhbWUuVmFyaWFibGUsIGFlczogQWVzPCo+LCBpc1lPcmllbnRhdGlvbjogQm9vbGVhbik6IEJvb2xlYW4ge1xuICAgICAgICAgICAgICAgIHZhbCB2YXJBZXMgPSBUcmFuc2Zvcm1WYXIudG9BZXModilcbiAgICAgICAgICAgICAgICByZXR1cm4gd2hlbiB7XG4gICAgICAgICAgICAgICAgICAgIEFlcy5pc1Bvc2l0aW9uYWxYWSh2YXJBZXMpIC0+IEFlcy50b0F4aXNBZXMoXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXJBZXMsXG4gICAgICAgICAgICAgICAgICAgICAgICBpc1lPcmllbnRhdGlvblxuICAgICAgICAgICAgICAgICAgICApID09IGFlcyAvLyBjb2xsZWN0aW5nIHBvcyB2YXJpYWJsZXNcbiAgICAgICAgICAgICAgICAgICAgZWxzZSAtPiB2YXJBZXMgPT0gYWVzXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YWwgZG9tYWluc1JhdyA9IEFycmF5TGlzdDxEb3VibGVTcGFuPigpXG4gICAgICAgICAgICBmb3IgKGxheWVyIGluIHN0aXRjaGVkTGF5ZXJzKSB7XG4gICAgICAgICAgICAgICAgdmFsIHZhcmlhYmxlcyA9IGxheWVyLmdldFZhcmlhYmxlcygpXG4gICAgICAgICAgICAgICAgICAgIC5maWx0ZXIgeyBpdC5pc1RyYW5zZm9ybSB9XG4gICAgICAgICAgICAgICAgICAgIC5maWx0ZXIgeyBpc01hdGNoaW5nKGl0LCBhZXMsIGxheWVyLmlzWU9yaWVudGF0aW9uKSB9XG5cbiAgICAgICAgICAgICAgICBmb3IgKHRyYW5zZm9ybVZhciBpbiB2YXJpYWJsZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFsIGRvbWFpbiA9IGxheWVyLmdldERhdGFSYW5nZSh0cmFuc2Zvcm1WYXIpXG4gICAgICAgICAgICAgICAgICAgIGlmIChkb21haW4gIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZG9tYWluc1Jhdy5hZGQoZG9tYWluKVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YWwgb3ZlcmFsbFRyYW5zZm9ybWVkRG9tYWluID0gZG9tYWluc1Jhdy5yZWR1Y2VPck51bGwgeyBhY2MsIHYgLT4gYWNjLnVuaW9uKHYpIH1cblxuICAgICAgICAgICAgdmFsIHNjYWxlID0gc2NhbGVNYXAuZ2V0KGFlcylcbiAgICAgICAgICAgIHJldHVybiBpZiAoc2NhbGUuaXNDb250aW51b3VzRG9tYWluKSB7XG4gICAgICAgICAgICAgICAgZmluYWxpemVPdmVyYWxsVHJhbnNmb3JtZWREb21haW4ob3ZlcmFsbFRyYW5zZm9ybWVkRG9tYWluLCBzY2FsZS50cmFuc2Zvcm0gYXMgQ29udGludW91c1RyYW5zZm9ybSlcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgLy8gRGlzY3JldGUgZG9tYWluXG4gICAgICAgICAgICAgICAgb3ZlcmFsbFRyYW5zZm9ybWVkRG9tYWluID86IERvdWJsZVNwYW4uc2luZ2xldG9uKDAuMClcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHByaXZhdGUgZnVuIGZpbmFsaXplT3ZlcmFsbFRyYW5zZm9ybWVkRG9tYWluKFxuICAgICAgICAgICAgdHJhbnNmb3JtZWREb21haW46IERvdWJsZVNwYW4/LFxuICAgICAgICAgICAgdHJhbnNmb3JtOiBDb250aW51b3VzVHJhbnNmb3JtXG4gICAgICAgICk6IERvdWJsZVNwYW4ge1xuICAgICAgICAgICAgdmFsIChkYXRhTG93ZXIsIGRhdGFVcHBlcikgPSB3aGVuICh0cmFuc2Zvcm1lZERvbWFpbikge1xuICAgICAgICAgICAgICAgIG51bGwgLT4gUGFpcihEb3VibGUuTmFOLCBEb3VibGUuTmFOKVxuICAgICAgICAgICAgICAgIGVsc2UgLT4gUGFpcih0cmFuc2Zvcm1lZERvbWFpbi5sb3dlckVuZCwgdHJhbnNmb3JtZWREb21haW4udXBwZXJFbmQpXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YWwgKHNjYWxlTG93ZXIsIHNjYWxlVXBwZXIpID0gU2NhbGVVdGlsLnRyYW5zZm9ybWVkRGVmaW5lZExpbWl0cyh0cmFuc2Zvcm0pXG5cbiAgICAgICAgICAgIHZhbCBsb3dlckVuZCA9IGlmIChzY2FsZUxvd2VyLmlzRmluaXRlKCkpIHNjYWxlTG93ZXIgZWxzZSBkYXRhTG93ZXJcbiAgICAgICAgICAgIHZhbCB1cHBlckVuZCA9IGlmIChzY2FsZVVwcGVyLmlzRmluaXRlKCkpIHNjYWxlVXBwZXIgZWxzZSBkYXRhVXBwZXJcblxuICAgICAgICAgICAgdmFsIG5ld1JhbmdlID0gd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AgdmFsIHRyYW5zZm9ybWVkRG9tYWluQnlBZXMgPSBIYXNoTWFwPEFlczwqPiwgRG91YmxlU3Bhbj4oKVxuLy8gICAgICAgIGZvciAoc3RpdGNoZWRQbG90TGF5ZXJzIGluIHN0aXRjaGVkTGF5ZXJzTGlzdCkge1xuLy8gICAgICAgICAgICB2YWwgbGF5ZXJUcmFuc2Zvcm1lZERvbWFpbkJ5QWVzID0gZ3VpZGVUcmFuc2Zvcm1lZERvbWFpbkJ5QWVzKFxuLy8gICAgICAgICAgICAgICAgc3RpdGNoZWRQbG90TGF5ZXJzLFxuLy8gICAgICAgICAgICAgICAgc2NhbGVNYXAsXG4vLyAgICAgICAgICAgICAgICBndWlkZU9wdGlvbnNNYXBcbi8vICAgICAgICAgICAgKVxuLy8gICAgICAgICAgICBmb3IgKChhZXMsIHRyYW5zZm9ybWVkRG9tYWluKSBpbiBsYXllclRyYW5zZm9ybWVkRG9tYWluQnlBZXMpIHtcbi8vICAgICAgICAgICAgICAgIHVwZGF0ZUFlc1JhbmdlTWFwKFxuLy8gICAgICAgICAgICAgICAgICAgIGFlcyxcbi8vICAgICAgICAgICAgICAgICAgICB0cmFuc2Zvcm1lZERvbWFpbixcbi8vICAgICAgICAgICAgICAgICAgICB0cmFuc2Zvcm1lZERvbWFpbkJ5QWVzXG4vLyAgICAgICAgICAgICAgICApXG4vLyAgICAgICAgICAgIH1cbi8vICAgICAgICB9XG4vL1xuLy8gICAgICAgIHJldHVybiBjcmVhdGVMZWdlbmRzKFxuLy8gICAgICAgICAgICBzdGl0Y2hlZExheWVyc0xpc3QsXG4vLyAgICAgICAgICAgIHRyYW5zZm9ybWVkRG9tYWluQnlBZXMsXG4vLyAgICAgICAgICAgIHNjYWxlTWFwLFxuLy9cbi8vICAgICAgICAgICAgc2NhbGVNYXBwZXJzTlAsXG4vLyAgICAgICAgICAgIGd1aWRlT3B0aW9uc01hcCxcbi8vICAgICAgICAgICAgdGhlbWVcbi8vICAgICAgICApXG4vLyAgICB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dExheWVyLmhhc0NvbnN0YW50KGFlcykpIHtcbiAgICAgICAgICAgICAgICAgICAgbGF5ZXJDb25zdGFudEJ5QWVzW2Flc10gPSBjb250ZXh0TGF5ZXIuZ2V0Q29uc3RhbnQoYWVzKSEhXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4vLyAgICAgICAgICAgIHZhbCBsYXllckJpbmRpbmdzQnlTY2FsZU5hbWUgPSBMaW5rZWRIYXNoTWFwPFN0cmluZywgTXV0YWJsZUxpc3Q8VmFyQmluZGluZz4+KClcbiAgICAgICAgICAgIHZhbCBhZXNMaXN0QnlTY2FsZU5hbWUgPSBMaW5rZWRIYXNoTWFwPFN0cmluZywgTXV0YWJsZUxpc3Q8QWVzPCo+Pj4oKVxuICAgICAgICAgICAgdmFsIGFlc0xpc3QgPSBtYXBwZWRSZW5kZXJlZEFlc1RvQ3JlYXRlR3VpZGVzKGNvbnRleHRMYXllciwgZ3VpZGVPcHRpb25zTWFwKVxuICAgICAgICAgICAgZm9yIChhZXMgaW4gYWVzTGlzdCkge1xuICAgICAgICAgICAgICAgIHZhciBjb2xvckJhciA9IGZhbHNlXG4vLyAgICAgICAgICAgICAgICB2YWwgYmluZGluZyA9IGNvbnRleHRMYXllci5nZXRCaW5kaW5nKGFlcylcbiAgICAgICAgICAgICAgICB2YWwgc2NhbGUgPSBjdHguZ2V0U2NhbGUoYWVzKVxuICAgICAgICAgICAgICAgIHZhbCBzY2FsZU5hbWUgPSBzY2FsZS5uYW1lXG4gICAgICAgICAgICAgICAgaWYgKGd1aWRlT3B0aW9uc01hcC5jb250YWluc0tleShhZXMpKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhbCBndWlkZU9wdGlvbnMgPSBndWlkZU9wdGlvbnNNYXBbYWVzXVxuICAgICAgICAgICAgICAgICAgICBpZiAoZ3VpZGVPcHRpb25zIGlzIENvbG9yQmFyT3B0aW9ucykge1xuICAgICAgICAgICAgICAgICAgICAgICAgY2hlY2tGaXRzQ29sb3JCYXIoYWVzLCBzY2FsZSlcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yQmFyID0gdHJ1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgQFN1cHByZXNzKFwiVU5DSEVDS0VEX0NBU1RcIilcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yQmFyQXNzZW1ibGVyQnlUaXRsZVtzY2FsZU5hbWVdID0gY3JlYXRlQ29sb3JCYXJBc3NlbWJsZXIoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NhbGVOYW1lLFxuLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNmb3JtZWREb21haW5CeUFlcy5nZXRWYWx1ZShhZXMpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN0eC5vdmVyYWxsVHJhbnNmb3JtZWREb21haW4oYWVzKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY2FsZSBhcyBTY2FsZTxDb2xvcj4sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NhbGVNYXBwZXJzTlAuZ2V0VmFsdWUoYWVzKSBhcyBTY2FsZU1hcHBlcjxDb2xvcj4sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZ3VpZGVPcHRpb25zLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoZW1lXG4gICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGZpdHNDb2xvckJhcihhZXMsIHNjYWxlKSkge1xuICAgICAgICAgICAgICAgICAgICBjb2xvckJhciA9IHRydWVcbiAgICAgICAgICAgICAgICAgICAgQFN1cHByZXNzKFwiVU5DSEVDS0VEX0NBU1RcIilcbiAgICAgICAgICAgICAgICAgICAgY29sb3JCYXJBc3NlbWJsZXJCeVRpdGxlW3NjYWxlTmFtZV0gPSBjcmVhdGVDb2xvckJhckFzc2VtYmxlcihcbiAgICAgICAgICAgICAgICAgICAgICAgIHNjYWxlTmFtZSxcbi8vICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNmb3JtZWREb21haW5CeUFlcy5nZXRWYWx1ZShhZXMpLFxuICAgICAgICAgICAgICAgICAgICAgICAgY3R4Lm92ZXJhbGxUcmFuc2Zvcm1lZERvbWFpbihhZXMpLFxuICAgICAgICAgICAgICAgICAgICAgICAgc2NhbGUgYXMgU2NhbGU8Q29sb3I+LFxuICAgICAgICAgICAgICAgICAgICAgICAgc2NhbGVNYXBwZXJzTlAuZ2V0VmFsdWUoYWVzKSBhcyBTY2FsZU1hcHBlcjxDb2xvcj4sXG4gICAgICAgICAgICAgICAgICAgICAgICBudWxsLFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhlbWVcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmICghY29sb3JCYXIpIHtcbi8vICAgICAgICAgICAgICAgICAgICBsYXllckJpbmRpbmdzQnlTY2FsZU5hbWUuZ2V0T3JQdXQoc2NhbGVOYW1lKSB7IEFycmF5TGlzdCgpIH0uYWRkKGJpbmRpbmcpXG4gICAgICAgICAgICAgICAgICAgIGFlc0xpc3RCeVNjYWxlTmFtZS5nZXRPclB1dChzY2FsZU5hbWUpIHsgQXJyYXlMaXN0KCkgfS5hZGQoYWVzKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgZm9yIChzY2FsZU5hbWUgaW4gYWVzTGlzdEJ5U2NhbGVOYW1lLmtleXMpIHtcbiAgICAgICAgICAgICAgICB2YWwgbGVnZW5kQXNzZW1ibGVyID0gbGVnZW5kQXNzZW1ibGVyQnlUaXRsZS5nZXRPclB1dChzY2FsZU5hbWUpIHtcbiAgICAgICAgICAgICAgICAgICAgTGVnZW5kQXNzZW1ibGVyKFxuICAgICAgICAgICAgICAgICAgICAgICAgc2NhbGVOYW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgZ3VpZGVPcHRpb25zTWFwLFxuICAgICAgICAgICAgICAgICAgICAgICAgc2NhbGVNYXBwZXJzTlAsXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGVtZVxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgfVxuXG4vLyAgICAgICAgICAgICAgICB2YWwgdmFyQmluZGluZ3MgPSBsYXllckJpbmRpbmdzQnlTY2FsZU5hbWVbc2NhbGVOYW1lXSEhXG4gICAgICAgICAgICAgICAgdmFsIGFlc0xpc3RGb3JTY2FsZU5hbWUgPSBhZXNMaXN0QnlTY2FsZU5hbWUuZ2V0VmFsdWUoc2NhbGVOYW1lKVxuICAgICAgICAgICAgICAgIHZhbCBsZWdlbmRLZXlGYWN0b3J5ID0gY29udGV4dExheWVyLmxlZ2VuZEtleUVsZW1lbnRGYWN0b3J5XG4gICAgICAgICAgICAgICAgdmFsIGFlc3RoZXRpY3NEZWZhdWx0cyA9IGNvbnRleHRMYXllci5hZXN0aGV0aWNzRGVmYXVsdHNcbiAgICAgICAgICAgICAgICBsZWdlbmRBc3NlbWJsZXIuYWRkTGF5ZXIoXG4gICAgICAgICAgICAgICAgICAgIGxlZ2VuZEtleUZhY3RvcnksXG4vLyAgICAgICAgICAgICAgICAgICAgdmFyQmluZGluZ3MubWFwIHsgaXQuYWVzIH0sXG4gICAgICAgICAgICAgICAgICAgIGFlc0xpc3RGb3JTY2FsZU5hbWUsXG4gICAgICAgICAgICAgICAgICAgIGxheWVyQ29uc3RhbnRCeUFlcyxcbiAgICAgICAgICAgICAgICAgICAgYWVzdGhldGljc0RlZmF1bHRzLFxuLy8gICAgICAgICAgICAgICAgICAgIHNjYWxlTWFwLFxuLy8gICAgICAgICAgICAgICAgICAgIHRyYW5zZm9ybWVkRG9tYWluQnlBZXNcbiAgICAgICAgICAgICAgICAgICAgY3R4XG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgdmFsIG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gICAgICAgICAgICAgdmFsIGluZGljZXMgPSB3aGVuIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vICdlbXB0eScgZGF0YSBpbiBsYXllcnMgd2l0aCBubyBhZXMgbWFwcGluZyAob25seSBjb25zdGFudHMpXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhLmlzRW1wdHkgLT4gZW1wdHlMaXN0KClcbiAgICAgICAgICAgICAgICAgICAgICAgIERhdGFGcmFtZVV0aWwuaGFzVmFyaWFibGUoZGF0YSwgdmFyTmFtZSkgLT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbCB2YXJpYWJsZSA9IERhdGFGcmFtZVV0aWwuZmluZFZhcmlhYmxlT3JGYWlsKGRhdGEsIHZhck5hbWUpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgU2VyaWVzVXRpbC5tYXRjaGluZ0luZGljZXMoZGF0YVt2YXJpYWJsZV0sIGxldmVsKVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSAtPiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gJ2RhdGEnIGhhcyBubyBjb2x1bW4gJ3Zhck5hbWUnIC0+IHRoZSBlbnRpcmUgZGF0YSBzaG91bGQgYmUgc2hvd24gaW4gZWFjaCBmYWNldC5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMCB1bnRpbCBkYXRhLnJvd0NvdW50KCkpLnRvTGlzdCgpXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaW5kaWNlc0J5TGV2ZWxbbGV2ZWxdID0gaW5kaWNlc1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGluZGljZXNCeVZhckJ5TGV2ZWxbdmFyTmFtZV0gPSBpbmRpY2VzQnlMZXZlbFxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZ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F5TGlzdDxMaXN0PFBhaXI8U3RyaW5nLCBBbnk+Pj4oKVxuICAgICAgICAgICAgZm9yIChsZXZlbCBpbiBsZXZlbHMpIHtcbiAgICAgICAgICAgICAgICBpZiAodmFyTmFtZXMuc2l6ZSA+IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFsIHN1YktleXMgPSBjcmVhdGVOYW1lTGV2ZWxUdXBsZXMoXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXJOYW1lcy5zdWJMaXN0KDEsIHZhck5hbWVzLnNpemUpLFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyTGV2ZWxzLnN1Ykxpc3QoMSwgdmFyTGV2ZWxzLnNpemUpXG4gICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgZm9yIChzdWJLZXkgaW4gc3ViS2V5cykge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV2ZWxLZXlzLmFkZChsaXN0T2YobmFtZSB0byBsZXZlbCkgKyBzdWJLZXkpXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAvLyBleGl0XG4gICAgICAgICAgICAgICAgICAgIGxldmVsS2V5cy5hZGQobGlzdE9mKG5hbWUgdG8gbGV2ZWwpKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIGxldmVsS2V5c1xuICAgICAgICB9XG5cbiAgICAgICAgZnVuIHJlb3JkZXJMZXZlbHMoXG4gICAgICAgICAgICB2YXJOYW1lczogTGlzdDxTdHJpbmc+LFxuICAgICAgICAgICAgdmFyTGV2ZWxzOiBMaXN0PExpc3Q8QW55Pj4sXG4gICAgICAgICAgICBvcmRlcmluZzogTGlzdDxJbnQ+XG4gICAgICAgICk6IExpc3Q8TGlzdDxBbnk+PiB7XG4gICAgICAgICAgICB2YWwgb3JkZXJpbmdCeUZhY2V0ID0gdmFyTmFtZXMuemlwKG9yZGVyaW5nKS50b01hcCgpXG5cbiAgICAgICAgICAgIHZhbCByZXN1bHQgPSBBcnJheUxpc3Q8TGlzdDxBbnk+PigpXG4gICAgICAgICAgICBmb3IgKChpLCBuYW1lKSBpbiB2YXJOYW1lcy53aXRoSW5kZXgoKSkge1xuICAgICAgICAgICAgICAgIGlmIChpID49IHZhckxldmVscy5zaXplKSBicmVha1xuICAgICAgICAgICAgICAgIHJlc3VsdC5hZGQocmVvcmRlclZhckxldmVscyhuYW1lLCB2YXJMZXZlbHNbaV0sIG9yZGVyaW5nQnlGYWNldC5nZXRWYWx1ZShuYW1lKSkpXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiByZXN1bHRcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biByZW9yZGVyVmFyTGV2ZWxzKFxuICAgICAgICAgICAgbmFtZTogU3RyaW5nPyxcbiAgICAgICAgICAgIGxldmVsczogTGlzdDxBbnk+LFxuICAgICAgICAgICAgb3JkZXI6IEludFxuICAgICAgICApOiBMaXN0PEFueT4ge1xuICAgICAgICAgICAgaWYgKG5hbWUgPT0gbnVsbCkgcmV0dXJuIGxldmVsc1xuXG4gICAgICAgICAgICAvLyBXZSBleHBlY3QgZWl0aGVyIGEgbGlzdCBvZiBEb3VibGVzIG9yIGEgbGlzdCBvZiBTdHJpbmdzLlxuICAgICAgICAgICAgQFN1cHByZXNzKFwiVU5DSEVDS0VEX0NBU1RcIiwgXCJOQU1FX1NIQURPV0lOR1wiKVxuICAgICAgICAgICAgbGV2ZWxzIGFzIExpc3Q8Q29tcGFyYWJsZTxBbnk+PlxuXG4gICAgICAgICAgICByZXR1cm4gd2hlbiB7XG4gICAgICAgICAgICAgICAgb3JkZXIgPD0gLTEgLT4gbGV2ZWxzLnNvcnRlZERlc2NlbmRpbmcoKVxuICAgICAgICAgICAgICAgIG9yZGVyID49IDEgLT4gbGV2ZWxzLnNvcnRlZCgpXG4gICAgICAgICAgICAgICAgZWxzZSA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bGVnZW5kXG4gICAgICAgICAgICAvLyBzZWU6IGh0dHBzOi8vZ2dwbG90Mi50aWR5dmVyc2Uub3JnL3JlZmVyZW5jZS9nZW9tX3BvaW50Lmh0bWxcbiAgICAgICAgICAgIHJldHVybiBlbXB0eUxpc3QoKVxuICAgICAgICB9XG5cbiAgICAgICAgdmFsIHJlc3VsdCA9IEFycmF5TGlzdDxBZXM8Kj4+KClcbiAgICAgICAgZm9yIChhZXMgaW4gbGF5ZXIucmVuZGVyZWRBZXMoKSkge1xuICAgICAgICAgICAgaWYgKEFlcy5ub0d1aWRlTmVlZGVkKGFlcykpIHtcbiAgICAgICAgICAgICAgICBjb250aW51ZVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGxheWVyLmhhc0NvbnN0YW50KGFlcykpIHtcbiAgICAgICAgICAgICAgICAvLyBjb25zdGFudHMgbWFzayBhZXMgbWFwcGluZ3NcbiAgICAgICAgICAgICAgICBjb250aW51ZVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCFsYXllci5oYXNCaW5kaW5nKGFlcykpIHtcbiAgICAgICAgICAgICAgICBjb250aW51ZVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGd1aWRlT3B0aW9uc01hcC5jb250YWluc0tleShhZXMpKSB7XG4gICAgICAgICAgICAgICAgaWYgKGd1aWRlT3B0aW9uc01hcFthZXNdID09PSBHdWlkZU9wdGlvbnMuTk9ORSkge1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmVzdWx0LmFkZChhZXMpXG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gcmVzdWx0XG4gICAgfVxuXG4vLyAgICBmdW4gZ3VpZGVUcmFuc2Zvcm1lZERvbWFpbkJ5QWVzKFxuLy8gICAgICAgIHN0aXRjaGVkTGF5ZXJzOiBTdGl0Y2hlZFBsb3RMYXllcnMsXG4vLy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HMoKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBiYXJTdGFjayh2anVzdDogRG91YmxlPyA9IG51bGwpOiBQb3NQcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gb2JqZWN0IDogUG9zUHJvdmlkZXIoKSB7XG4gICAgICAgICAgICAgICAgb3ZlcnJpZGUgZnVuIGNyZWF0ZVBvcyhjdHg6IFBvc1Byb3ZpZGVyQ29udGV4dCk6IFBvc2l0aW9uQWRqdXN0bWVudCB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBQb3NpdGlvbkFkanVzdG1lbnRzLnN0YWNrKGN0eC5hZXN0aGV0aWNzLCB2anVzdClcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBvdmVycmlkZSBmdW4gaGFuZGxlc0dyb3VwcygpOiBCb29sZWFuIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFBvc2l0aW9uQWRqdXN0bWVudHMuTWV0YS5TVEFDSy5oYW5kbGVzR3JvdXBzKClcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBASnZtT3ZlcmxvYWRzXG4gICAgICAgIGZ1biBkb2RnZSh3aWR0aDogRG91YmxlPyA9IG51bGwpOiBQb3NQcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gb2JqZWN0IDogUG9zUHJvdmlkZXIoKSB7XG4gICAgICAgICAgICAgICAgb3ZlcnJpZGUgZnVuIGNyZWF0ZVBvcyhjdHg6IFBvc1Byb3ZpZGVyQ29udGV4dCk6IFBvc2l0aW9uQWRqdXN0bWVudCB7XG4gICAgICAgICAgICAgICAgICAgIHZhbCBhZXN0aGV0aWNzID0gY3R4LmFlc3RoZXRpY3NcbiAgICAgICAgICAgICAgICAgICAgdmFsIGdyb3VwQ291bnQgPSBjdHguZ3JvdXBDb3VudFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gUG9zaXRpb25BZGp1c3RtZW50cy5kb2RnZShhZXN0aGV0aWNzLCBncm91cENvdW50LCB3aWR0aClcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBvdmVycmlkZSBmdW4gaGFuZGxlc0dyb3VwcygpOiBCb29sZWFuIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFBvc2l0aW9uQWRqdXN0bWVudHMuTWV0YS5ET0RHRS5oYW5kbGVzR3JvdXBzKClcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBmdW4gZmlsbCh2anVzdDogRG91YmxlPyA9IG51bGwpOiBQb3NQcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gb2JqZWN0IDogUG9zUHJvdmlkZXIoKSB7XG4gICAgICAgICAgICAgICAgb3ZlcnJpZGUgZnVuIGNyZWF0ZVBvcyhjdHg6IFBvc1Byb3ZpZGVyQ29udGV4dCk6IFBvc2l0aW9uQWRqdXN0bWVudCB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBQb3NpdGlvbkFkanVzdG1lbnRzLmZpbGwoY3R4LmFlc3RoZXRpY3MsIHZqdXN0KVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIG92ZXJyaWRlIGZ1biBoYW5kbGVzR3JvdXBzKCk6IEJvb2xlYW4ge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gUG9zaXRpb25BZGp1c3RtZW50cy5NZXRhLkZJTEwuaGFuZGxlc0dyb3VwcygpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIGppdHRlcih3aWR0aDogRG91YmxlPywgaGVpZ2h0OiBEb3VibGU/KTogUG9zUHJvdmlkZXIge1xuICAgICAgICAgICAgcmV0dXJuIG9iamVjdCA6IFBvc1Byb3ZpZGVyKCkge1xuICAgICAgICAgICAgICAgIG92ZXJyaWRlIGZ1biBjcmVhdGVQb3MoY3R4OiBQb3NQcm92aWRlckNvbnRleHQpOiBQb3NpdGlvbkFkanVzdG1lbnQge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gUG9zaXRpb25BZGp1c3RtZW50cy5qaXR0ZXIod2lkdGgsIGhlaWdodClcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBvdmVycmlkZSBmdW4gaGFuZGxlc0dyb3VwcygpOiBCb29sZWFuIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFBvc2l0aW9uQWRqdXN0bWVudHMuTWV0YS5KSVRURVIuaGFuZGxlc0dyb3VwcygpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIG51ZGdlKHdpZHRoOiBEb3VibGU/LCBoZWlnaHQ6IERvdWJsZT8pOiBQb3NQcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gb2JqZWN0IDogUG9zUHJvdmlkZXIoKSB7XG4gICAgICAgICAgICAgICAgb3ZlcnJpZGUgZnVuIGNyZWF0ZVBvcyhjdHg6IFBvc1Byb3ZpZGVyQ29udGV4dCk6IFBvc2l0aW9uQWRqdXN0bWVudCB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBQb3NpdGlvbkFkanVzdG1lbnRzLm51ZGdlKHdpZHRoLCBoZWlnaHQpXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgb3ZlcnJpZGUgZnVuIGhhbmRsZXNHcm91cHMoKTogQm9vbGVhbiB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBQb3NpdGlvbkFkanVzdG1lbnRzLk1ldGEuTlVER0UuaGFuZGxlc0dyb3VwcygpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLypcbiAgcHVibGljIHN0YXRpYyBQb3NQcm92aWRlciBqaXR0ZXJEb2RnZShEb3VibGUgaml0dGVyV2lkdGgsIERvdWJsZSBqaXR0ZXJIZWlnaHQpIHtcbiAgICByZXR1cm4gaml0dGVyRG9kZ2UobnVsbCwgaml0dGVyV2lkdGgsIGppdHRlckhlaWdodCk7XG4gIH1cbiAgKi9cblxuICAgICAgICBmdW4gaml0dGVyRG9kZ2Uod2lkdGg6IERvdWJsZT8sIGppdHRlcldpZHRoOiBEb3VibGU/LCBqaXR0ZXJIZWlnaHQ6IERvdWJsZT8pOiBQb3NQcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gb2JqZWN0IDogUG9zUHJvdmlkZXIoKSB7XG4gICAgICAgICAgICAgICAgb3ZlcnJpZGUgZnVuIGNyZWF0ZVBvcyhjdHg6IFBvc1Byb3ZpZGVyQ29udGV4dCk6IFBvc2l0aW9uQWRqdXN0bWVudCB7XG4gICAgICAgICAgICAgICAgICAgIHZhbCBhZXN0aGV0aWNzID0gY3R4LmFlc3RoZXRpY3NcbiAgICAgICAgICAgICAgICAgICAgdmFsIGdyb3VwQ291bnQgPSBjdHguZ3JvdXBDb3VudFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gUG9zaXRpb25BZGp1c3RtZW50cy5qaXR0ZXJEb2RnZShhZXN0aGV0aWNzLCBncm91cENvdW50LCB3aWR0aCwgaml0dGVyV2lkdGgsIGppdHRlckhlaWdodClcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBvdmVycmlkZSBmdW4gaGFuZGxlc0dyb3VwcygpOiBCb29sZWFuIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFBvc2l0aW9uQWRqdXN0bWVudHMuTWV0YS5KSVRURVJfRE9ER0UuaGFuZGxlc0dyb3VwcygpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxufVxuIiwiLypcbiAqIENvcHlyaWdodCAoYykgMjAyMi4gSmV0QnJhaW5zIHMuci5vLlxuICog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pbiBsYXllcnNCeVRpbGUpIHtcbiAgICAgICAgICAgIHZhbCAoeERvbWFpbiwgeURvbWFpbikgPSBjb21wdXRlVGlsZVhZRG9tYWlucyhcbiAgICAgICAgICAgICAgICB0aWxlTGF5ZXJzLFxuICAgICAgICAgICAgICAgIHhJbml0aWFsRG9tYWluLFxuICAgICAgICAgICAgICAgIHlJbml0aWFsRG9tYWluXG4gICAgICAgICAgICApXG5cbiAgICAgICAgICAgIHhEb21haW5zLmFkZCh4RG9tYWluKVxuICAgICAgICAgICAgeURvbWFpbnMuYWRkKHlEb21haW4pXG4gICAgICAgIH1cblxuICAgICAgICB2YWwgYWRqdXN0ZWRYRG9tYWluczogTGlzdDxEb3VibGVTcGFuPz4gPSBmYWNldHMuYWRqdXN0SERvbWFpbnMoeERvbWFpbnMpXG4gICAgICAgIHZhbCBhZGp1c3RlZFlEb21haW5zOiBMaXN0PERvdWJsZVNwYW4/PiA9IGZhY2V0cy5hZGp1c3RWRG9tYWlucyh5RG9tYWlucylcblxuICAgICAgICB2YWwgZmluYWxpemVkWERvbWFpbnM6IExpc3Q8RG91YmxlU3Bhbj4gPSBmaW5hbGl6ZURvbWFpbnMoXG4gICAgICAgICAgICBBZXMuWCxcbiAgICAgICAgICAgIHhTY2FsZVByb3RvLFxuICAgICAgICAgICAgYWRqdXN0ZWRYRG9tYWlucyxcbiAgICAgICAgICAgIGxheWVyc0J5VGlsZSxcbiAgICAgICAgICAgIGZhY2V0cy5mcmVlSFNjYWxlXG4gICAgICAgIClcbiAgICAgICAgdmFsIGZpbmFsaXplZFlEb21haW5zOiBMaXN0PERvdWJsZVNwYW4+ID0gZmluYWxpemVEb21haW5zKFxuICAgICAgICAgICAgQWVzLlksXG4gICAgICAgICAgICB5U2NhbGVQcm90byxcbiAgICAgICAgICAgIGFkanVzdGVkWURvbWFpbnMsXG4gICAgICAgICAgICBsYXllcnNCeVRpbGUsXG4gICAgICAgICAgICBmYWNldHMuZnJlZVZTY2FsZVxuICAgICAgICApXG5cbiAgICAgICAgcmV0dXJuIGZpbmFsaXplZFhEb21haW5zLnppcChmaW5hbGl6ZWRZRG9tYWlucylcbiAgICB9XG5cbiAgICBwcml2YXRlIGZ1biBmaW5hbGl6ZURvbWFpbnMoXG4gICAgICAgIGFlczogQWVzPERvdWJsZT4sXG4gICAgICAgIHNjYWxlUHJvdG86IFNjYWxlPCo+LFxuICAgICAgICBkb21haW5zOiBMaXN0PERvdWJsZVNwYW4/PixcbiAgICAgICAgbGF5ZXJzQnlUaWxlOiBMaXN0PExpc3Q8R2VvbUxheWVyPj4sXG4gICAgICAgIGZyZWVTY2FsZTogQm9vbGVhblxuICAgICk6IExpc3Q8RG91YmxlU3Bhbj4ge1xuXG4gICAgICAgIHJldHVybiB3aGVuIHtcbiAgICAgICAgICAgIGZyZWVTY2FsZSAtPiB7XG4gICAgICAgICAgICAgICAgLy8gRWFjaCB0aWxlIGhhcyBpdHMgb3duIGRvbWFpblxuICAgICAgICAgICAgICAgIGRvbWFpbnMubWFwSW5kZXhlZCB7IGksIHYgLT5cbiAgICAgICAgICAgICAgICAgICAgLy8gJ2V4cGFuZCcgcmFuZ2VzIGFuZCBpbmNsdWRlICcwJyBpZiBuZWNlc3NhcnlcbiAgICAgICAgICAgICAgICAgICAgdmFsIGRvbWFpbkV4cGFuZGVkID0gUmFuZ2VVdGlsLmV4cGFuZFJhbmdlKHYsIGFlcywgc2NhbGVQcm90bywgbGF5ZXJzQnlUaWxlW2ldKVxuICAgICAgICAgICAgICAgICAgICBTZXJpZXNVdGlsLmVuc3VyZUFwcGxpY2FibGVSYW5nZShkb21haW5FeHBhbmRlZClcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGVsc2UgLT4ge1xuICAgICAgICAgICAgICAgIC8vIE9uZSBkb21haW4gZm9yIGFsbCB0aWxlcy5cbiAgICAgICAgICAgICAgICB2YWwgZG9tYWluT3ZlcmFsbCA9IGRvbWFpbnMuZmlsdGVyTm90Tn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iAgICAgICAgICAgICAgICAgICAgaSsrXG4gICAgICAgICAgICAgICAgICAgIHB4W2ldID0gdmFsWFxuICAgICAgICAgICAgICAgICAgICBweVtpXSA9IHZhbFlcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHdoaWxlIChpID49IDApIHtcbiAgICAgICAgICAgICAgICBpZiAocHhbaV0gIT0gbnVsbCAmJiBweVtpXSAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhbCB4ID0gcHhbaV1cbiAgICAgICAgICAgICAgICAgICAgdmFsIHkgPSBweVtpXVxuICAgICAgICAgICAgICAgICAgICBpZiAoU2VyaWVzVXRpbC5pc0Zpbml0ZSh4KSAmJiBTZXJpZXNVdGlsLmlzRmluaXRlKHkpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YWwgbmV3TG9jID0gcG9zLnRyYW5zbGF0ZShEb3VibGVWZWN0b3IoeCEhLCB5ISEpLCBwLCBnZW9tQ3R4KVxuICAgICAgICAgICAgICAgICAgICAgICAgdmFsIGFkanVzdGVkWCA9IG5ld0xvYy54XG4gICAgICAgICAgICAgICAgICAgICAgICB2YWwgYWRqdXN0ZWRZID0gbmV3TG9jLnlcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyYW5nZXNJbml0ZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGp1c3RlZE1pblggPSBtaW4oYWRqdXN0ZWRYLCBhZGp1c3RlZE1pblgpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRqdXN0ZWRNYXhYID0gbWF4KGFkanVzdGVkWCwgYWRqdXN0ZWRNYXhYKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkanVzdGVkTWluWSA9IG1pbihhZGp1c3RlZFksIGFkanVzdGVkTWluWSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGp1c3RlZE1heFkgPSBtYXgoYWRqdXN0ZWRZLCBhZGp1c3RlZE1heFkpXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkanVzdGVkTWF4WCA9IGFkanVzdGVkWFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkanVzdGVkTWluWCA9IGFkanVzdGVkTWF4WFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkanVzdGVkTWF4WSA9IGFkanVzdGVkWVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkanVzdGVkTWluWSA9IGFkanVzdGVkTWF4WVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJhbmdlc0luaXRlZCA9IHRydWVcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpLS1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIFggcmFuZ2VcbiAgICAgICAgdmFsIHhSYW5nZSA9IGlmIChyYW5nZXNJbml0ZWQpXG4gICAgICAgICAgICBEb3VibGVTcGFuKGFkanVzdGVkTWluWCwgYWRqdXN0ZWRNYXhYKVxuICAgICAgICBlbHNlXG4gICAgICAgICAgICBudWxsXG5cbiAgICAgICAgdmFsIHlSYW5nZSA9IGlmIChyYW5nZXNJbml0ZWQpXG4gICAgICAgICAgICBEb3VibGVTcGFuKGFkanVzdGVkTWluWSwgYWRqdXN0ZWRNYXhZKVxuICAgICAgICBlbHNlXG4gICAgICAgICAgICBudWxsXG4gICAgICAgIHJldHVybiBQYWlyKHhSYW5nZSwgeVJhbmdlKVxuICAgIH1cblxuICAgIHByaXZhdGUgZnVuIGNvbXB1dGVMYXllckRyeVJ1blhZUmFuZ2VzQWZ0ZXJTaXplRXhwYW5kKFxuICAgICAgICBsYXllcjogR2VvbUxheWVyLFxuICAgICAgICBhZXN0aGV0aWNzOiBBZXN0aGV0aWNzLFxuICAgICAgICBnZW9tQ3R4OiBHZW9tQ29udGV4dFxuICAgICk6IFBhaXI8RG91YmxlU3Bhbj8sIERvdWJsZVNwYW4/PiB7XG5cbiAgICAgICAgdmFsICh3aWR0aEF4aXMsIGhlaWdodEF4aXMpID0gd2hlbiAobGF5ZXIuaXNZT3JpZW50YXRpb24pIHtcbiAgICAgICAgICAgIHRydWUgLT4gQWVzLlkgdG8gQWVzLlhcbiAgICAgICAgICAgIGZhbHNlIC0+IEFlcy5YIHRvIEFlcy5ZXG4gICAgICAgIH1cblxuICAgICAgICB2YWwgZ2VvbSA9IGxheWVyLmdlb21cbiAgICAgICAgdmFsIHJlbmRlcmVkQWVzID0gbGF5ZXIucmVuZGVyZWRBZXMoKVxuXG4gICAgICAgIHZhbCB4eSA9IG1hcE9mKFxuICAgICAgICAgICAgd2lkdGhBeGlzIHRvIHdoZW4ge1xuICAgICAgICAgICAgICAgIGdlb20gaXMgV2l0aFdpZHRoIC0+IHtcbiAgICAgICAgICAgICAgICAgICAgdmFsIHJlc29sdXRpb24gPSBnZW9tQ3R4LmdldFJlc29sdXRpb24od2lkdGhBeGlzKVxuICAgICAgICAgICAgICAgICAgICB2YWwgaXNEaXNjcmV0ZSA9ICFsYXllci5zY2FsZU1hcC5nZXQod2lkdGhBeGlzKS5pc0NvbnRpbnVvdXNEb21haW5cbiAgICAgICAgICAgICAgICAgICAgY29tcHV0ZUxheWVyRHJ5UnVuUmFuZ2VBZnRlclNpemVFeHBhbmQoYWVzdGhldGljcykgeyBwIC0+XG4gICAgICAgICAgICAgICAgICAgICAgICBnZW9tLndpZHRoU3BhbihwLCB3aWR0aEF4aXMsIHJlc29sdXRpb24sIGlzRGlzY3JldGUpXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBBZXMuV0lEVEggaW4gcmVuZGVyZWRBZXMgLT4ge1xuICAgICAgICAgICAgICAgICAgICB2YWwgcmVzb2x1dGlvbiA9IGdlb21DdHguZ2V0UmVzb2x1dGlvbih3aWR0aEF4aXMpXG4gICAgICAgICAgICAgICAgICAgIGNvbXB1dGVMYXllckRyeVJ1blJhbmdlQWZ0ZXJTaXplRXhwYW5kKGFlc3RoZXRpY3MpIHsgcCAtPlxuICAgICAgICAgICAgICAgICAgICAgICAgUG9pbnREaW1lbnNpb25zVXRpbC5kaW1lbnNpb25TcGFuKHAsIHdpZHRoQXhpcywgQWVzLldJRFRILCByZXNvbHV0aW9uKVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgZWxzZSAtPiBudWxsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgaGVpZ2h0QXhpcyB0byB3aGVuIHtcbiAgICAgICAgICAgICAgICBnZW9tIGlzIFdpdGhIZWlnaHQgLT4ge1xuICAgICAgICAgICAgICAgICAgICB2YWwgcmVzb2x1dGlvbiA9IGdlb21DdHguZ2V0UmVzb2x1dGlvbihoZWlnaHRBeGlzKVxuICAgICAgICAgICAgICAgICAgICB2YWwgaXNEaXNjcmV0ZSA9ICFsYXllci5zY2FsZU1hcC5nZXQoaGVpZ2h0QXhpcykuaXNDb250aW51b3VzRG9tYWluXG4gICAgICAgICAgICAgICAgICAgIGNvbXB1dGVMYXllckRyeVJ1blJhbmdlQWZ0ZXJTaXplRXhwYW5kKGFlc3RoZXRpY3MpIHsgcCAtPlxuICAgICAgICAgICAgICAgICAgICAgICAgZ2VvbS5oZWlnaHRTcGFuKHAsIGhlaWdodEF4aXMsIHJlc29sdXRpb24sIGlzRGlzY3JldGUpXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBBZXMuSEVJR0hUIGluIHJlbmRlcmVkQWVzIC0+IHtcbiAgICAgICAgICAgICAgICAgICAgdmFsIHJlc29sdXRpb24gPSBnZW9tQ3R4LmdldFJlc29sdXRpb24oaGVpZ2h0QXhpcylcbiAgICAgICAgICAgICA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XRoICdzY2FsZSBsaW1pdHMnLlxuICAgICAgICAgICAgcmV0dXJuIHdoZW4gKHRyYW5zZm9ybSkge1xuICAgICAgICAgICAgICAgIGlzIENvbnRpbnVvdXNUcmFuc2Zvcm0gLT4ge1xuICAgICAgICAgICAgICAgICAgICB2YWwgbGltcyA9IFNjYWxlVXRpbC50cmFuc2Zvcm1lZERlZmluZWRMaW1pdHModHJhbnNmb3JtKS50b0xpc3QoKS5maWx0ZXIgeyBpdC5pc0Zpbml0ZSgpIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKGxpbXMuaXNFbXB0eSgpKSBudWxsXG4gICAgICAgICAgICAgICAgICAgIGVsc2UgRG91YmxlU3Bhbi5lbmNsb3NlQWxsKGxpbXMpXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaXMgRGlzY3JldGVUcmFuc2Zvcm0gLT4ge1xuICAgICAgICAgICAgICAgICAgICBEb3VibGVTcGFuLmVuY2xvc2VBbGwodHJhbnNmb3JtLmVmZmVjdGl2ZURvbWFpblRyYW5zZm9ybWVkKVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGVsc2UgLT4gdGhyb3cgSWxsZWdhbFN0YXRlRXhjZXB0aW9uKFwiVW5leHBlY3RlZCB0cmFuc2Zvcm0gdHlwZTogJHt0cmFuc2Zvcm06OmNsYXNzLnNpbXBsZU5hbWV9XCIpXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpbnRlcm5hbCBmdW4gZXhwYW5kUmFuZ2UoXG4gICAgICAgICAgICByYW5nZTogRG91YmxlU3Bhbj8sXG4gICAgICAgICAgICBhZXM6IEFlczxEb3VibGU+LFxuICAgICAgICAgICAgc2NhbGU6IFNjYWxlPCo+LFxuICAgICAgICAgICAgbGF5ZXJzOiBMaXN0PEdlb21MYXllcj5cbiAgICAgICAgKTogRG91YmxlU3Bhbj8ge1xuICAgICAgICAgICAgdmFsIGluY2x1ZGVaZXJvID0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GUuZ2V0VmFsdWUobGV2ZWxUdXBsZSlcbiAgICAgICAgICAgICAgICBkYXRhQnlUaWxlLmFkZCh0aWxlRGF0YSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBkYXRhQnlUaWxlXG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQHJldHVybiBMaXN0IG9mIEZhY2V0VGlsZUluZm8uXG4gICAgICogICAgICAgICAgVGlsZXMgYXJlIGVudW1lcmF0ZWQgYnkgcm93cywgaS5lLjpcbiAgICAgKiAgICAgICAgICB0aGUgaW5kZXggaXMgY29tcHV0ZWQgbGlrZTogcm93ICogbkNvbHMgKyBjb2xcbiAgICAgKi9cbiAgICBvdmVycmlkZSBmdW4gdGlsZUluZm9zKCk6IExpc3Q8RmFjZXRUaWxlSW5mbz4ge1xuICAgICAgICB2YWwgY29sTGFiZWxzID0gKGNvbExldmVscykubWFwIHtcbiAgICAgICAgICAgIGl0Py5sZXQgeyB4Rm9ybWF0dGVyKGl0KSB9XG4gICAgICAgIH1cbiAgICAgICAgdmFsIHJvd0xhYmVscyA9IChyb3dMZXZlbHMpLm1hcCB7XG4gICAgICAgICAgICBpdD8ubGV0IHsgeUZvcm1hdHRlcihpdCkgfVxuICAgICAgICB9XG5cbiAgICAgICAgdmFsIGluZm9zID0gQXJyYXlMaXN0PEZhY2V0VGlsZUluZm8+KClcbiAgICAgICAgZm9yIChyb3cgaW4gMCB1bnRpbCByb3dDb3VudCkge1xuICAgICAgICAgICAgdmFsIGFkZENvbExhYiA9IHJvdyA9PSAwXG4gICAgICAgICAgICB2YWwgaGFzSEF4aXMgPSByb3cgPT0gcm93Q291bnQgLSAxXG4gICAgICAgICAgICBmb3IgKGNvbCBpbiAwIHVudGlsIGNvbENvdW50KSB7XG4gICAgICAgICAgICAgICAgdmFsIGFkZFJvd0xhYiA9IGNvbCA9PSBjb2xDb3VudCAtIDFcbiAgICAgICAgICAgICAgICB2YWwgaGFzVkF4aXMgPSBjb2wgPT0gMFxuXG4gICAgICAgICAgICAgICAgdmFsIGNvbExhYnMgPSBpZiAoYWRkQ29sTGFiKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbExhYmVsc1tjb2xdPy5sZXQgeyBsaXN0T2YoaXQpIH0gPzogZW1wdHlMaXN0KClcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBlbXB0eUxpc3Q8U3RyaW5nPigpXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaW5mb3MuYWRkKFxuICAgICAgICAgICAgICAgICAgICBGYWNldFRpbGVJbmZvKFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sLCByb3csXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xMYWJzLFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGFkZFJvd0xhYikgcm93TGFiZWxzW3Jvd10gZWxzZSBudWxsLFxuICAgICAgICAgICAgICAgICAgICAgICAgaGFzSEF4aXMgPSBoYXNIQXhpcyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGhhc1ZBeGlzID0gaGFzVkF4aXMsXG4gICAgICAgICAgICAgICAgICAgICAgICBpc0JvdHRvbSA9IHJvdyA9PSByb3dDb3VudCAtIDEsXG4gICAgICAgICAgICAgICAgICAgICAgICB0cnVlSW5kZXggPSBpbmZvcy5zaXplICAvLyBubyByZW9yZGVyaW5nXG4gICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gaW5mb3NcbiAgICB9XG5cbiAgICBvdmVycmlkZSBmdW4gYWRqdXN0SERvbWFpbnMoZG9tYWluczogTGlzdDxEb3VibGVTcGFuPz4pOiBMaXN0PERvdWJsZVNwYW4/PiB7XG4gICAgICAgIGZ1biBjb2xJbmRpY2VzKGNvbDogSW50KTogTGlzdDxJbnQ+IHtcbiAgICAgICAgICAgIHJldHVybiAocm93TGV2ZWxzLmluZGljZXMpLm1hcCB7IGl0ICogY29sTGV2ZWxzLnNpemUgKyBjb2wgfS50b0xpc3QoKVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGlmIChmcmVlSFNjYWxlKSB7XG4gICAgICAgICAgICAvLyBzYW1lIGRvbWFpbiBmb3IgYWxsIHRpbGVzIGluIGEgY29sdW1uLlxuICAgICAgICAgICAgdmFsIGFkanVzdGVkID0gTXV0YWJsZUxpc3Q8RG91YmxlU3Bhbj8+KGRvbWFpbnMuc2l6ZSkgeyBudWxsIH1cbiAgICAgICAgICAgIGZvciAoY29sIGluIGNvbExldmVscy5pbmRpY2VzKSB7XG4gICAgICAgICAgICAgICAgdmFsIGluZGljZXMgPSBjb2xJbmRpY2VzKGNvbClcbiAgICAgICAgICAgICAgICB2YWwgdW5pb24gPSBpbmRpY2VzLm1hcCB7IGRvbWFpbnNbaXRdIH0ucmVkdWNlIHsgZDAsIGQxIC0+IFNlcmllc1V0aWwuc3BhbihkMCwgZDEpIH1cbiAgICAgICAgICAgICAgICBpbmRpY2VzLmZvckVhY2gge1xuICAgICAgICAgICAgICAgICAgICBhZGp1c3RlZFtpdF0gPSB1bmlvblxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGFkanVzdGVkXG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBkb21haW5zXG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBvdmVycmlkZSBmdW4gYWRqdXN0VkRvbWFpbnMoZG9tYWluczogTGlzdDxEb3VibGVTcGFuPz4pOiBMaXN0PERvdWJsZVNwYW4/PiB7XG4gICAgICAgIGZ1biByb3dJbmRpY2VzKHJvdzogSW50KTogTGlzdDxJbnQ+IHtcbiAgICAgICAgICAgIHZhbCBzdGFydCA9IHJvdyAqIGNvbExldmVscy5zaXplXG4gICAgICAgICAgICByZXR1cm4gKHN0YXJ0IHVudGlsIHN0YXJ0ICsgY29sTGV2ZWxz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F0dGVyc1tpXShsZXZlbCkgfSB9ICAgICAgICAgICAgICAgIC8vIHRvIHN0cmluZyB0dXBsZXNcblxuICAgICAgICBmdW4gdG9Db2woaW5kZXg6IEludCk6IEludCB7XG4gICAgICAgICAgICByZXR1cm4gd2hlbiAoZGlyZWN0aW9uKSB7XG4gICAgICAgICAgICAgICAgRGlyZWN0aW9uLkggLT4gaW5kZXggJSBjb2xDb3VudFxuICAgICAgICAgICAgICAgIERpcmVjdGlvbi5WIC0+IGluZGV4IC8gcm93Q291bnRcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biB0b1JvdyhpbmRleDogSW50KTogSW50IHtcbiAgICAgICAgICAgIHJldHVybiB3aGVuIChkaXJlY3Rpb24pIHtcbiAgICAgICAgICAgICAgICBEaXJlY3Rpb24uSCAtPiBpbmRleCAvIGNvbENvdW50XG4gICAgICAgICAgICAgICAgRGlyZWN0aW9uLlYgLT4gaW5kZXggJSByb3dDb3VudFxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIHRvSW5kZXgoY29sOiBJbnQsIHJvdzogSW50KTogSW50IHtcbiAgICAgICAgICAgIHJldHVybiB3aGVuIChkaXJlY3Rpb24pIHtcbiAgICAgICAgICAgICAgICBEaXJlY3Rpb24uSCAtPiByb3cgKiBjb2xDb3VudCArIGNvbFxuICAgICAgICAgICAgICAgIERpcmVjdGlvbi5WIC0+IGNvbCAqIHJvd0NvdW50ICsgcm93XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBmdW4gaXNCb3R0b20oY29sOiBJbnQsIHJvdzogSW50KTogQm9vbGVhbiB7XG4gICAgICAgICAgICB2YWwgbmV4dFJvd0luZGV4ID0gdG9JbmRleChjb2wsIHJvdyArIDEpXG4gICAgICAgICAgICByZXR1cm4gKHJvdyArIDEpICUgcm93Q291bnQgPT0gMCB8fCBuZXh0Um93SW5kZXggPj0gbnVtVGlsZXNcbiAgICAgICAgfVxuXG4gICAgICAgIHZhbCBpbmZvcyA9IEFycmF5TGlzdDxGYWNldFRpbGVJbmZvPigpXG4gICAgICAgIGZvciAoKGksIHRpbGVMYWJlbFR1cGxlKSBpbiB0aWxlTGFiZWxzLndpdGhJbmRleCgpKSB7XG4gICAgICAgICAgICB2YWwgY29sID0gdG9Db2woaSlcbiAgICAgICAgICAgIHZhbCByb3cgPSB0b1JvdyhpKVxuICAgICAgICAgICAgdmFsIGhhc0hBeGlzID0gaXNCb3R0b20oY29sLCByb3cpIHx8IGZyZWVIU2NhbGVcbiAgICAgICAgICAgIHZhbCBoYXNWQXhpcyA9IGNvbCA9PSAwIHx8IGZyZWVWU2NhbGVcblxuICAgICAgICAgICAgaW5mb3MuYWRkKFxuICAgICAgICAgICAgICAgIEZhY2V0VGlsZUluZm8oXG4gICAgICAgICAgICAgICAgICAgIGNvbCwgcm93LFxuICAgICAgICAgICAgICAgICAgICBjb2xMYWJzID0gdGlsZUxhYmVsVHVwbGUsXG4gICAgICAgICAgICAgICAgICAgIG51bGwsXG4gICAgICAgICAgICAgICAgICAgIGhhc0hBeGlzID0gaGFzSEF4aXMsXG4gICAgICAgICAgICAgICAgICAgIGhhc1ZBeGlzID0gaGFzVkF4aXMsXG4gICAgICAgICAgICAgICAgICAgIGlzQm90dG9tID0gaXNCb3R0b20oY29sLCByb3cpLFxuICAgICAgICAgICAgICAgICAgICB0cnVlSW5kZXggPSBpXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgKVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gRW51bWVyYXRpb24gaXMgYWx3YXlzICdieSByb3cnLlxuICAgICAgICByZXR1cm4gaW5mb3Muc29ydGVkV2l0aChjb21wYXJlQnk8RmFjZXRUaWxlSW5mbz4geyBpdC5yb3cgfS50aGVuQnkgeyBpdC5jb2wgfSlcbiAgICB9XG5cbiAgICBlbnVtIGNsYXNzIERpcmVjdGlvbiB7XG4gICAgICAgIEgsIFZcbiAgICB9XG5cbiAgICBjb21wYW5pb24gb2JqZWN0IHtcbiAgICAgICAgcHJpdmF0ZSBmdW4gbnVtVGlsZXMoXG4gICAgICAgICAgICBmYWNldHM6IExpc3Q8U3RyaW5nPixcbiAgICAgICAgICAgIGxldmVsczogTGlzdDxMaXN0PEFueT4+LFxuICAgICAgICApOiBJbnQge1xuICAgICAgICAgICAgcmVxdWlyZShmYWNldHMuaXNOb3RFbXB0eSgpKSB7IFwiTGlzdCBvZiBmYWNldHMgaXMgZW1wdHkuXCIgfVxuICAgICAgICAgICAgcmVxdWlyZShmYWNldHMuZGlzdGluY3QoKS5zaXplID09IGZhY2V0cy5zaXplKSB7IFwiRHVwbGljYXRlZCB2YWx1ZXMgaW4gdGhlIGZhY2V0cyBsaXN0OiAkZmFjZXRzXCIgfVxuICAgICAgICAgICAgY2hlY2soZmFjZXRzLnNpemUgPT0gbGV2ZWxzLnNpemUpXG4gICAgICAgICAgICByZXR1cm4gY3JlYXRlTmFtZUxldmVsVHVwbGVzKGZhY2V0cywgbGV2ZWxzKS5zaXplXG4gICAgICAgIH1cblxuICAgICAgICBwcml2YXRlIGZ1biBzaGFwZSh0aWxlc0NvdW50OiBJbnQsIG5jb2w6IEludD8sIG5yb3c6IEludD8sIGRpcjogRGlyZWN0aW9uKTogUGFpcjxJbnQsIEludD4ge1xuICAgICAgICAgICAgcmVxdWlyZShuY29sPy5sZXQgeyBuY29sID4gMCB9ID86IHRydWUpIHsgXCInbmNvbCcgbXVzdCBiZSBwb3NpdGl2ZSwgd2FzICRuY29sXCIgfVxuICAgICAgICAgICAgcmVxdWlyZShucm93Py5sZXQgeyBucm93ID4gMCB9ID86IHRydWUpIHsgXCInbnJvdycgbXVzdCBiZSBwb3NpdGl2ZSwgd2FzICRucm93XCIgfVxuICAgICAgICAgICAgdmFsIHNoYXBlID0gd2hlbiB7XG4gICAgICAgICAgICAgICAgbmNvbCAhPSBudWxsIC0+IHtcbiAgICAgICAgICAgICAgICAgICAgdmFsIG5jb2xBY3R1YWwgPSBtaW4obmNvbCwgdGlsZXNDb3VudClcbiAgICAgICAgICAgICAgICAgICAgdmFsIG5yb3dBY3R1YWwgPSBjZWlsKHRpbGVzQ291bnQudG9Eb3VibGUoKSAvIG5jb2xBY3R1YWwpLnRvSW50KClcbiAgICAgICAgICAgICAgICAgICAgbmNvbEFjdHVhbCB0byBtYXgoMSwgbnJvd0FjdHVhbClcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbnJvdyAhPSBudWxsIC0+IHtcbiAgICAgICAgICAgICAgICAgICAgdmFsIG5yb3dBY3R1YWwgPSBtaW4obnJvdywgdGlsZXNDb3VudClcbiAgICAgICAgICAgICAgICAgICAgdmFsIG5jb2xBY3R1YWwgPSBjZWlsKHRpbGVzQ291bnQudG9Eb3VibGUoKSAvIG5yb3dBY3R1YWwpLnRvSW50KClcbiAgICAgICAgICAgICAgICAgICAgbmNvbEFjdHVhbCB0byBtYXgoMSwgbnJvd0FjdHVhbClcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSAtPiB7XG4gICAgICAgICAgICAgICAgICAgIHZhbCB3ID0gbWluKDQsIG1heCgxLCB0aWxlc0NvdW50IC8gMikpXG4gICAgICAgICAgICAgICAgICAgIHZhbCBoID0gbWF4KDEsIGNlaWwodGlsZXNDb3VudC50b0RvdWJsZSgpIC8gdykudG9JbnQoKSlcbiAgICAgICAgICAgICAgICAgICAgdyB0byBoXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YWwgKHcsIGgpID0gc2hhcGVcbiAgICAgICAgICAgIHJldHVybiB3aGVuIChkaXIpIHtcbiAgICAgICAgICAgICAgICBEaXJlY3Rpb24uSCAtPiB7XG4gICAgICAgICAgICAgICAgICAgIC8vIGZpbGxpbmcgYnkgcm93c1xuICAgICAgICAgICAgICAgICAgICBQYWlyKFxuICAgICAgICAgICAgICAgICAgICAgICAgdyxcbiAgICAgICAgICAgICAgICAgICAgICA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Udlb21TdXBwbGllcjogKCkgLT4gR2VvbVxuICAgICkge1xuICAgICAgICBpbnRlcm5hbCBmdW4gYnVpbGQoKTogR2VvbVByb3ZpZGVyIHtcbiAgICAgICAgICAgIHJldHVybiBvYmplY3QgOiBHZW9tUHJvdmlkZXIobXlLaW5kKSB7XG5cbiAgICAgICAgICAgICAgICBvdmVycmlkZSBmdW4gY3JlYXRlR2VvbSgpOiBHZW9tIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG15R2VvbVN1cHBsaWVyKClcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBvdmVycmlkZSBmdW4gYWVzdGhldGljc0RlZmF1bHRzKCk6IEFlc3RoZXRpY3NEZWZhdWx0cyB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBteUFlc3RoZXRpY3NEZWZhdWx0c1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIG92ZXJyaWRlIGZ1biBoYW5kbGVzR3JvdXBzKCk6IEJvb2xlYW4ge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbXlIYW5kbGVzR3JvdXBzXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgY29tcGFuaW9uIG9iamVjdCB7XG5cbiAgICAgICAgZnVuIHBvaW50KCk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gcG9pbnQgeyBQb2ludEdlb20oKSB9XG4gICAgICAgIH1cblxuICAgICAgICBmdW4gcG9pbnQoc3VwcGxpZXI6ICgpIC0+IEdlb20pOiBHZW9tUHJvdmlkZXIge1xuICAgICAgICAgICAgcmV0dXJuIEdlb21Qcm92aWRlckJ1aWxkZXIoXG4gICAgICAgICAgICAgICAgR2VvbUtpbmQuUE9JTlQsXG4gICAgICAgICAgICAgICAgQWVzdGhldGljc0RlZmF1bHRzLnBvaW50KCksXG4gICAgICAgICAgICAgICAgUG9pbnRHZW9tLkhBTkRMRVNfR1JPVVBTLFxuICAgICAgICAgICAgICAgIHN1cHBsaWVyXG4gICAgICAgICAgICApLmJ1aWxkKClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBwYXRoKCk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gcGF0aCB7IFBhdGhHZW9tKCkgfVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIHBhdGgoc3VwcGxpZXI6ICgpIC0+IEdlb20pOiBHZW9tUHJvdmlkZXIge1xuICAgICAgICAgICAgcmV0dXJuIEdlb21Qcm92aWRlckJ1aWxkZXIoXG4gICAgICAgICAgICAgICAgR2VvbUtpbmQuUEFUSCxcbiAgICAgICAgICAgICAgICBBZXN0aGV0aWNzRGVmYXVsdHMucGF0aCgpLFxuICAgICAgICAgICAgICAgIFBhdGhHZW9tLkhBTkRMRVNfR1JPVVBTLFxuICAgICAgICAgICAgICAgIHN1cHBsaWVyXG4gICAgICAgICAgICApLmJ1aWxkKClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBsaW5lKCk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5MSU5FLFxuICAgICAgICAgICAgICAgIEFlc3RoZXRpY3NEZWZhdWx0cy5saW5lKCksXG4gICAgICAgICAgICAgICAgTGluZUdlb20uSEFORExFU19HUk9VUFNcbiAgICAgICAgICAgICkgeyBMaW5lR2VvbSgpIH0uYnVpbGQoKVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIHNtb290aCgpOiBHZW9tUHJvdmlkZXIge1xuICAgICAgICAgICAgcmV0dXJuIEdlb21Qcm92aWRlckJ1aWxkZXIoXG4gICAgICAgICAgICAgICAgR2VvbUtpbmQuU01PT1RILFxuICAgICAgICAgICAgICAgIEFlc3RoZXRpY3NEZWZhdWx0cy5zbW9vdGgoKSxcbiAgICAgICAgICAgICAgICBTbW9vdGhHZW9tLkhBTkRMRVNfR1JPVVBTXG4gICAgICAgICAgICApIHsgU21vb3RoR2VvbSgpIH0uYnVpbGQoKVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIGJhcigpOiBHZW9tUHJvdmlkZXIge1xuICAgICAgICAgICAgcmV0dXJuIEdlb21Qcm92aWRlckJ1aWxkZXIoXG4gICAgICAgICAgICAgICAgR2VvbUtpbmQuQkFSLFxuICAgICAgICAgICAgICAgIEFlc3RoZXRpY3NEZWZhdWx0cy5iYXIoKSxcbiAgICAgICAgICAgICAgICBCYXJHZW9tLkhBTkRMRVNfR1JPVVBTXG4gICAgICAgICAgICApIHsgQmFyR2VvbSgpIH0uYnVpbGQoKVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIGhpc3RvZ3JhbSgpOiBHZW9tUHJvdmlkZXIge1xuICAgICAgICAgICAgcmV0dXJuIEdlb21Qcm92aWRlckJ1aWxkZXIoXG4gICAgICAgICAgICAgICAgR2VvbUtpbmQuSElTVE9HUkFNLFxuICAgICAgICAgICAgICAgIEFlc3RoZXRpY3NEZWZhdWx0cy5oaXN0b2dyYW0oKSxcbiAgICAgICAgICAgICAgICBIaXN0b2dyYW1HZW9tLkhBTkRMRVNfR1JPVVBTXG4gICAgICAgICAgICApIHsgSGlzdG9ncmFtR2VvbSgpIH0uYnVpbGQoKVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIGRvdHBsb3Qoc3VwcGxpZXI6ICgpIC0+IEdlb20pOiBHZW9tUHJvdmlkZXIge1xuICAgICAgICAgICAgcmV0dXJuIEdlb21Qcm92aWRlckJ1aWxkZXIoXG4gICAgICAgICAgICAgICAgR2VvbUtpbmQuRE9UX1BMT1QsXG4gICAgICAgICAgICAgICAgQWVzdGhldGljc0RlZmF1bHRzLmRvdHBsb3QoKSxcbiAgICAgICAgICAgICAgICBEb3RwbG90R2VvbS5IQU5ETEVTX0dST1VQUyxcbiAgICAgICAgICAgICAgICBzdXBwbGllclxuICAgICAgICAgICAgKS5idWlsZCgpXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gdGlsZSgpOiBHZW9tUHJvdmlkZXIge1xuICAgICAgICAgICAgcmV0dXJuIEdlb21Qcm92aWRlckJ1aWxkZXIoXG4gICAgICAgICAgICAgICAgR2VvbUtpbmQuVElMRSxcbiAgICAgICAgICAgICAgICBBZXN0aGV0aWNzRGVmYXVsdHMudGlsZSgpLFxuICAgICAgICAgICAgICAgIFRpbGVHZW9tLkhBTkRMRVNfR1JPVVBTXG4gICAgICAgICAgICApIHsgVGlsZUdlb20oKSB9LmJ1aWxkKClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBiaW4yZCgpOiBHZW9tUHJvdmlkZXIge1xuICAgICAgICAgICAgcmV0dXJuIEdlb21Qcm92aWRlckJ1aWxkZXIoXG4gICAgICAgICAgICAgICAgR2VvbUtpbmQuQklOXzJELFxuICAgICAgICAgICAgICAgIEFlc3RoZXRpY3NEZWZhdWx0cy5iaW4yZCgpLFxuICAgICAgICAgICAgICAgIEJpbjJkR2VvbS5IQU5ETEVTX0dST1VQU1xuICAgICAgICAgICAgKSB7IEJpbjJkR2VvbSgpIH0uYnVpbGQoKVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIGVycm9yQmFyKCk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5FUlJPUl9CQVIsXG4gICAgICAgICAgICAgICAgQWVzdGhldGljc0RlZmF1bHRzLmVycm9yQmFyKCksXG4gICAgICAgICAgICAgICAgRXJyb3JCYXJHZW9tLkhBTkRMRVNfR1JPVVBTXG4gICAgICAgICAgICApIHsgRXJyb3JCYXJHZW9tKCkgfS5idWlsZCgpXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gY3Jvc3NCYXIoc3VwcGxpZXI6ICgpIC0+IEdlb20pOiBHZW9tUHJvdmlkZXIge1xuICAgICAgICAgICAgcmV0dXJuIEdlb21Qcm92aWRlckJ1aWxkZXIoXG4gICAgICAgICAgICAgICAgR2VvbUtpbmQuQ1JPU1NfQkFSLFxuICAgICAgICAgICAgICAgIEFlc3RoZXRpY3NEZWZhdWx0cy5jcm9zc0JhcigpLFxuICAgICAgICAgICAgICAgIENyb3NzQmFyR2VvbS5IQU5ETEVTX0dST1VQUyxcbiAgICAgICAgICAgICAgICBzdXBwbGllclxuICAgICAgICAgICAgKS5idWlsZCgpXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gbGluZVJhbmdlKCk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5MSU5FX1JBTkdFLFxuICAgICAgICAgICAgICAgIEFlc3RoZXRpY3NEZWZhdWx0cy5saW5lUmFuZ2UoKSxcbiAgICAgICAgICAgICAgICBMaW5lUmFuZ2VHZW9tLkhBTkRMRVNfR1JPVVBTXG4gICAgICAgICAgICApIHsgTGluZVJhbmdlR2VvbSgpIH0uYnVpbGQoKVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIHBvaW50UmFuZ2Uoc3VwcGxpZXI6ICgpIC0+IEdlb20pOiBHZW9tUHJvdmlkZXIge1xuICAgICAgICAgICAgcmV0dXJuIEdlb21Qcm92aWRlckJ1aWxkZXIoXG4gICAgICAgICAgICAgICAgR2VvbUtpbmQuUE9JTlRfUkFOR0UsXG4gICAgICAgICAgICAgICAgQWVzdGhldGljc0RlZmF1bHRzLnBvaW50UmFuZ2UoKSxcbiAgICAgICAgICAgICAgICBQb2ludFJhbmdlR2VvbS5IQU5ETEVTX0dST1VQUyxcbiAgICAgICAgICAgICAgICBzdXBwbGllclxuICAgICAgICAgICAgKS5idWlsZCgpXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gY29udG91cigpOiBHZW9tUHJvdmlkZXIge1xuICAgICAgICAgICAgcmV0dXJuIEdlb21Qcm92aWRlckJ1aWxkZXIoXG4gICAgICAgICAgICAgICAgR2VvbUtpbmQuQ09OVE9VUixcbiAgICAgICAgICAgICAgICBBZXN0aGV0aWNzRGVmYXVsdHMuY29udG91cigpLFxuICAgICAgICAgICAgICAgIENvbnRvdXJHZW9tLkhBTkRMRVNfR1JPVVBTXG4gICAgICAgICAgICApIHsgQ29udG91ckdlb20oKSB9LmJ1aWxkKClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBjb250b3VyZigpOiBHZW9tUHJvdmlkZXIge1xuICAgICAgICAgICAgcmV0dXJuIEdlb21Qcm92aWRlckJ1aWxkZXIoXG4gICAgICAgICAgICAgICAgR2VvbUtpbmQuQ09OVE9VUkYsXG4gICAgICAgICAgICAgICAgQWVzdGhldGljc0RlZmF1bHRzLmNvbnRvdXJmKCksXG4gICAgICAgICAgICAgICAgQ29udG91cmZHZW9tLkhBTkRMRVNfR1JPVVBTXG4gICAgICAgICAgICApIHsgQ29udG91cmZHZW9tKCkgfS5idWlsZCgpXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gcG9seWdvbigpOiBHZW9tUHJvdmlkZXIge1xuICAgICAgICAgICAgcmV0dXJuIEdlb21Qcm92aWRlckJ1aWxkZXIoXG4gICAgICAgICAgICAgICAgR2VvbUtpbmQuUE9MWUdPTixcbiAgICAgICAgICAgICAgICBBZXN0aGV0aWNzRGVmYXVsdHMucG9seWdvbigpLFxuICAgICAgICAgICAgICAgIFBvbHlnb25HZW9tLkhBTkRMRVNfR1JPVVBTXG4gICAgICAgICAgICApIHsgUG9seWdvbkdlb20oKSB9LmJ1aWxkKClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBtYXAoKTogR2VvbVByb3ZpZGVyIHtcbiAgICAgICAgICAgIHJldHVybiBHZW9tUHJvdmlkZXJCdWlsZGVyKFxuICAgICAgICAgICAgICAgIEdlb21LaW5kLk1BUCxcbiAgICAgICAgICAgICAgICBBZXN0aGV0aWNzRGVmYXVsdHMubWFwKCksXG4gICAgICAgICAgICAgICAgTWFwR2VvbS5IQU5ETEVTX0dST1VQU1xuICAgICAgICAgICAgKSB7IE1hcEdlb20oKSB9LmJ1aWxkKClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBhYmxpbmUoKTogR2VvbVByb3ZpZGVyIHtcbiAgICAgICAgICAgIHJldHVybiBHZW9tUHJvdmlkZXJCdWlsZGVyKFxuICAgICAgICAgICAgICAgIEdlb21LaW5kLkFCX0xJTkUsXG4gICAgICAgICAgICAgICAgQWVzdGhldGljc0RlZmF1bHRzLmFibGluZSgpLFxuICAgICAgICAgICAgICAgIEFCTGluZUdlb20uSEFORExFU19HUk9VUFNcbiAgICAgICAgICAgICkgeyBBQkxpbmVHZW9tKCkgfS5idWlsZCgpXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gaGxpbmUoKTogR2VvbVByb3ZpZGVyIHtcbiAgICAgICAgICAgIHJldHVybiBHZW9tUHJvdmlkZXJCdWlsZGVyKFxuICAgICAgICAgICAgICAgIEdlb21LaW5kLkhfTElORSxcbiAgICAgICAgICAgICAgICBBZXN0aGV0aWNzRGVmYXVsdHMuaGxpbmUoKSxcbiAgICAgICAgICAgICAgICBITGluZUdlb20uSEFORExFU19HUk9VUFNcbiAgICAgICAgICAgICkgeyBITGluZUdlb20oKSB9LmJ1aWxkKClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biB2bGluZSgpOiBHZW9tUHJvdmlkZXIge1xuICAgICAgICAgICAgcmV0dXJuIEdlb21Qcm92aWRlckJ1aWxkZXIoXG4gICAgICAgICAgICAgICAgR2VvbUtpbmQuVl9MSU5FLFxuICAgICAgICAgICAgICAgIEFlc3RoZXRpY3NEZWZhdWx0cy52bGluZSgpLFxuICAgICAgICAgICAgICAgIFZMaW5lR2VvbS5IQU5ETEVTX0dST1VQU1xuICAgICAgICAgICAgKSB7IFZMaW5lR2VvbSgpIH0uYnVpbGQoKVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIGJveHBsb3Qoc3VwcGxpZXI6ICgpIC0+IEdlb20pOiBHZW9tUHJvdmlkZXIge1xuICAgICAgICAgICAgcmV0dXJuIEdlb21Qcm92aWRlckJ1aWxkZXIoXG4gICAgICAgICAgICAgICAgR2VvbUtpbmQuQk9YX1BMT1QsXG4gICAgICAgICAgICAgICAgQWVzdGhldGljc0RlZmF1bHRzLmJveHBsb3QoKSxcbiAgICAgICAgICAgICAgICBCb3hwbG90R2VvbS5IQU5ETEVTX0dST1VQUyxcbiAgICAgICAgICAgICAgICBzdXBwbGllclxuICAgICAgICAgICAgKS5idWlsZCgpXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gYXJlYXJpZGdlcyhzdXBwbGllcjogKCkgLT4gR2VvbSk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5BUkVBX1JJREdFUyxcbiAgICAgICAgICAgICAgICBBZXN0aGV0aWNzRGVmYXVsdHMuYXJlYVJpZGdlcygpLFxuICAgICAgICAgICAgICAgIEFyZWFSaWRnZXNHZW9tLkhBTkRMRVNfR1JPVVBTLFxuICAgICAgICAgICAgICAgIHN1cHBsaWVyXG4gICAgICAgICAgICApLmJ1aWxkKClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biB2aW9saW4oc3VwcGxpZXI6ICgpIC0+IEdlb20pOiBHZW9tUHJvdmlkZXIge1xuICAgICAgICAgICAgcmV0dXJuIEdlb21Qcm92aWRlckJ1aWxkZXIoXG4gICAgICAgICAgICAgICAgR2VvbUtpbmQuVklPTElOLFxuICAgICAgICAgICAgICAgIEFlc3RoZXRpY3NEZWZhdWx0cy52aW9saW4oKSxcbiAgICAgICAgICAgICAgICBWaW9saW5HZW9tLkhBTkRMRVNfR1JPVVBTLFxuICAgICAgICAgICAgICAgIHN1cHBsaWVyXG4gICAgICAgICAgICApLmJ1aWxkKClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biB5ZG90cGxvdChzdXBwbGllcjogKCkgLT4gR2VvbSk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5ZX0RPVF9QTE9ULFxuICAgICAgICAgICAgICAgIEFlc3RoZXRpY3NEZWZhdWx0cy55ZG90cGxvdCgpLFxuICAgICAgICAgICAgICAgIFlEb3RwbG90R2VvbS5IQU5ETEVTX0dST1VQUyxcbiAgICAgICAgICAgICAgICBzdXBwbGllclxuICAgICAgICAgICAgKS5idWlsZCgpXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gbGl2ZW1hcCgpOiBHZW9tUHJvdmlkZXIge1xuICAgICAgICAgICAgcmV0dXJuIEdlb21Qcm92aWRlckJ1aWxkZXIoXG4gICAgICAgICAgICAgICAgR2VvbUtpbmQuTElWRV9NQVAsXG4gICAgICAgICAgICAgICAgQWVzdGhldGljc0RlZmF1bHRzLmxpdmVtYXAoKSxcbiAgICAgICAgICAgICAgICBMaXZlTWFwR2VvbS5IQU5ETEVTX0dST1VQUyxcbiAgICAgICAgICAgICkgeyBMaXZlTWFwR2VvbSgpIH0uYnVpbGQoKVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIHJpYmJvbigpOiBHZW9tUHJvdmlkZXIge1xuICAgICAgICAgICAgcmV0dXJuIEdlb21Qcm92aWRlckJ1aWxkZXIoXG4gICAgICAgICAgICAgICAgR2VvbUtpbmQuUklCQk9OLFxuICAgICAgICAgICAgICAgIEFlc3RoZXRpY3NEZWZhdWx0cy5yaWJib24oKSxcbiAgICAgICAgICAgICAgICBSaWJib25HZW9tLkhBTkRMRVNfR1JPVVBTXG4gICAgICAgICAgICApIHsgUmliYm9uR2VvbSgpIH0uYnVpbGQoKVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIGFyZWEoKTogR2VvbVByb3ZpZGVyIHtcbiAgICAgICAgICAgIHJldHVybiBHZW9tUHJvdmlkZXJCdWlsZGVyKFxuICAgICAgICAgICAgICAgIEdlb21LaW5kLkFSRUEsXG4gICAgICAgICAgICAgICAgQWVzdGhldGljc0RlZmF1bHRzLmFyZWEoKSxcbiAgICAgICAgICAgICAgICBBcmVhR2VvbS5IQU5ETEVTX0dST1VQU1xuICAgICAgICAgICAgKSB7IEFyZWFHZW9tKCkgfS5idWlsZCgpXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gZGVuc2l0eSgpOiBHZW9tUHJvdmlkZXIge1xuICAgICAgICAgICAgcmV0dXJuIEdlb21Qcm92aWRlckJ1aWxkZXIoXG4gICAgICAgICAgICAgICAgR2VvbUtpbmQuREVOU0lUWSxcbiAgICAgICAgICAgICAgICBBZXN0aGV0aWNzRGVmYXVsdHMuZGVuc2l0eSgpLFxuICAgICAgICAgICAgICAgIERlbnNpdHlHZW9tLkhBTkRMRVNfR1JPVVBTXG4gICAgICAgICAgICApIHsgRGVuc2l0eUdlb20oKSB9LmJ1aWxkKClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBkZW5zaXR5MmQoKTogR2VvbVByb3ZpZGVyIHtcbiAgICAgICAgICAgIHJldHVybiBHZW9tUHJvdmlkZXJCdWlsZGVyKFxuICAgICAgICAgICAgICAgIEdlb21LaW5kLkRFTlNJVFkyRCxcbiAgICAgICAgICAgICAgICBBZXN0aGV0aWNzRGVmYXVsdHMuZGVuc2l0eTJkKCksXG4gICAgICAgICAgICAgICAgRGVuc2l0eTJkR2VvbS5IQU5ETEVTX0dST1VQU1xuICAgICAgICAgICAgKSB7IERlbnNpdHkyZEdlb20oKSB9LmJ1aWxkKClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBkZW5zaXR5MmRmKCk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5ERU5TSVRZMkRGLFxuICAgICAgICAgICAgICAgIEFlc3RoZXRpY3NEZWZhdWx0cy5kZW5zaXR5MmRmKCksXG4gICAgICAgICAgICAgICAgRGVuc2l0eTJkZkdlb20uSEFORExFU19HUk9VUFNcbiAgICAgICAgICAgICkgeyBEZW5zaXR5MmRmR2VvbSgpIH0uYnVpbGQoKVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIGppdHRlcigpOiBHZW9tUHJvdmlkZXIge1xuICAgICAgICAgICAgcmV0dXJuIEdlb21Qcm92aWRlckJ1aWxkZXIoXG4gICAgICAgICAgICAgICAgR2VvbUtpbmQuSklUVEVSLFxuICAgICAgICAgICAgICAgIEFlc3RoZXRpY3NEZWZhdWx0cy5qaXR0ZXIoKSxcbiAgICAgICAgICAgICAgICBKaXR0ZXJHZW9tLkhBTkRMRVNfR1JPVVBTXG4gICAgICAgICAgICApIHsgSml0dGVyR2VvbSgpIH0uYnVpbGQoKVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIHFxKCk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5RX1EsXG4gICAgICAgICAgICAgICAgQWVzdGhldGljc0RlZmF1bHRzLnFxKCksXG4gICAgICAgICAgICAgICAgUVFHZW9tLkhBTkRMRVNfR1JPVVBTXG4gICAgICAgICAgICApIHsgUVFHZW9tKCkgfS5idWlsZCgpXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gcXEyKCk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5RX1FfMixcbiAgICAgICAgICAgICAgICBBZXN0aGV0aWNzRGVmYXVsdHMucXEyKCksXG4gICAgICAgICAgICAgICAgUVEyR2VvbS5IQU5ETEVTX0dST1VQU1xuICAgICAgICAgICAgKSB7IFFRMkdlb20oKSB9LmJ1aWxkKClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBxcWxpbmUoKTogR2VvbVByb3ZpZGVyIHtcbiAgICAgICAgICAgIHJldHVybiBHZW9tUHJvdmlkZXJCdWlsZGVyKFxuICAgICAgICAgICAgICAgIEdlb21LaW5kLlFfUV9MSU5FLFxuICAgICAgICAgICAgICAgIEFlc3RoZXRpY3NEZWZhdWx0cy5xcV9saW5lKCksXG4gICAgICAgICAgICAgICAgUVFMaW5lR2VvbS5IQU5ETEVTX0dST1VQU1xuICAgICAgICAgICAgKSB7IFFRTGluZUdlb20oKSB9LmJ1aWxkKClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBxcTJsaW5lKCk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5RX1FfMl9MSU5FLFxuICAgICAgICAgICAgICAgIEFlc3RoZXRpY3NEZWZhdWx0cy5xcTJfbGluZSgpLFxuICAgICAgICAgICAgICAgIFFRMkxpbmVHZW9tLkhBTkRMRVNfR1JPVVBTXG4gICAgICAgICAgICApIHsgUVEyTGluZUdlb20oKSB9LmJ1aWxkKClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBmcmVxcG9seSgpOiBHZW9tUHJvdmlkZXIge1xuICAgICAgICAgICAgcmV0dXJuIEdlb21Qcm92aWRlckJ1aWxkZXIoXG4gICAgICAgICAgICAgICAgR2VvbUtpbmQuRlJFUVBPTFksXG4gICAgICAgICAgICAgICAgQWVzdGhldGljc0RlZmF1bHRzLmZyZXFwb2x5KCksXG4gICAgICAgICAgICAgICAgRnJlcXBvbHlHZW9tLkhBTkRMRVNfR1JPVVBTXG4gICAgICAgICAgICApIHsgRnJlcXBvbHlHZW9tKCkgfS5idWlsZCgpXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gc3RlcChzdXBwbGllcjogKCkgLT4gR2VvbSk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5TVEVQLFxuICAgICAgICAgICAgICAgIEFlc3RoZXRpY3NEZWZhdWx0cy5zdGVwKCksXG4gICAgICAgICAgICAgICAgU3RlcEdlb20uSEFORExFU19HUk9VUFMsXG4gICAgICAgICAgICAgICAgc3VwcGxpZXJcbiAgICAgICAgICAgICkuYnVpbGQoKVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIHJlY3QoKTogR2VvbVByb3ZpZGVyIHtcbiAgICAgICAgICAgIHJldHVybiBHZW9tUHJvdmlkZXJCdWlsZGVyKFxuICAgICAgICAgICAgICAgIEdlb21LaW5kLlJFQ1QsXG4gICAgICAgICAgICAgICAgQWVzdGhldGljc0RlZmF1bHRzLnJlY3QoKSxcbiAgICAgICAgICAgICAgICBSZWN0R2VvbS5IQU5ETEVTX0dST1VQU1xuICAgICAgICAgICAgKSB7IFJlY3RHZW9tKCkgfS5idWlsZCgpXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gc2VnbWVudChzdXBwbGllcjogKCkgLT4gR2VvbSk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5TRUdNRU5ULFxuICAgICAgICAgICAgICAgIEFlc3RoZXRpY3NEZWZhdWx0cy5zZWdtZW50KCksXG4gICAgICAgICAgICAgICAgU2VnbWVudEdlb20uSEFORExFU19HUk9VUFMsXG4gICAgICAgICAgICAgICAgc3VwcGxpZXJcbiAgICAgICAgICAgICkuYnVpbGQoKVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIHRleHQoc3VwcGxpZXI6ICgpIC0+IEdlb20pOiBHZW9tUHJvdmlkZXIge1xuICAgICAgICAgICAgcmV0dXJuIEdlb21Qcm92aWRlckJ1aWxkZXIoXG4gICAgICAgICAgICAgICAgR2VvbUtpbmQuVEVYVCxcbiAgICAgICAgICAgICAgICBBZXN0aGV0aWNzRGVmYXVsdHMudGV4dCgpLFxuICAgICAgICAgICAgICAgIFRleHRHZW9tLkhBTkRMRVNfR1JPVVBTLFxuICAgICAgICAgICAgICAgIHN1cHBsaWVyXG4gICAgICAgICAgICApLmJ1aWxkKClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBsYWJlbChzdXBwbGllcjogKCkgLT4gR2VvbSk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5MQUJFTCxcbiAgICAgICAgICAgICAgICBBZXN0aGV0aWNzRGVmYXVsdHMubGFiZWwoKSxcbiAgICAgICAgICAgICAgICBUZXh0R2VvbS5IQU5ETEVTX0dST1VQUyxcbiAgICAgICAgICAgICAgICBzdXBwbGllclxuICAgICAgICAgICAgKS5idWlsZCgpXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gcmFzdGVyKCk6IEdlb21Qcm92aWRlciB7XG4gICAgICAgICAgICByZXR1cm4gR2VvbVByb3ZpZGVyQnVpbGRlcihcbiAgICAgICAgICAgICAgICBHZW9tS2luZC5SQVNURVIsXG4gICAgICAgICAgICAgICAgQWVzdGhldGljc0RlZmF1bHRzLnJhc3RlcigpLFxuICAgICAgICAgICAgICAgIFJhc3Rlckdlb20uSEFORExFU19HUk9VUFNcbiAgICAgICAgICAgICkgeyBSYXN0ZXJHZW9tKCkgfS5idWlsZCgpXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gaW1hZ2Uoc3VwcGxpZXI6ICgpIC0+IEdlb20pOiBHZW9tUHJvdmlkZXIge1xuICAgICAgICAgICAgcmV0dXJuIEdlb21Qcm92aWRlckJ1aWxkZXIoXG4gICAgICAgICAgICAgICAgR2VvbUtpbmQuSU1BR0UsXG4gICAgICAgICAgICAgICAgQWVzdGhldGljc0RlZmF1b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ZGVyIHtcbiAgICB2YWwgZmxpcHBlZDogQm9vbGVhblxuXG4gICAgZnVuIHdpdGgoXG4gICAgICAgIHhMaW06IERvdWJsZVNwYW4/LFxuICAgICAgICB5TGltOiBEb3VibGVTcGFuPyxcbiAgICAgICAgZmxpcHBlZDogQm9vbGVhblxuICAgICk6IENvb3JkUHJvdmlkZXJcblxuICAgIC8qKlxuICAgICAqIFJlc2hhcGUgYW5kIGZsaXAgdGhlIGRvbWFpbiBpZiBuZWNlc3NhcnkuXG4gICAgICovXG4gICAgZnVuIGFkanVzdERvbWFpbihkb21haW46IERvdWJsZVJlY3RhbmdsZSk6IERvdWJsZVJlY3RhbmdsZVxuXG4gICAgZnVuIGFkanVzdEdlb21TaXplKFxuICAgICAgICBoRG9tYWluOiBEb3VibGVTcGFuLFxuICAgICAgICB2RG9tYWluOiBEb3VibGVTcGFuLFxuICAgICAgICBnZW9tU2l6ZTogRG91YmxlVmVjdG9yXG4gICAgKTogRG91YmxlVmVjdG9yXG5cbiAgICBmdW4gY3JlYXRlQ29vcmRpbmF0ZU1hcHBlcihcbiAgICAgICAgYWRqdXN0ZWREb21haW46IERvdWJsZVJlY3RhbmdsZSxcbiAgICAgICAgY2xpZW50U2l6ZTogRG91YmxlVmVjdG9yLFxuICAgICk6IENvb3JkaW5hdGVzTWFwcGVyXG5cbiAgICBmdW4gY3JlYXRlQ29vcmRpbmF0ZVN5c3RlbShcbiAgICAgICAgYWRqdXN0ZWREb21haW46IERvdWJsZVJlY3RhbmdsZSxcbiAgICAgICAgY2xpZW50U2l6ZTogRG91YmxlVmVjdG9yLFxuICAgICk6IENvb3JkaW5hdGVTeXN0ZW0ge1xuICAgICAgICB2YWwgY29vcmRNYXBwZXIgPSBjcmVhdGVDb29yZGluYXRlTWFwcGVyKGFkanVzdGVkRG9tYWluLCBjbGllbnRTaXplKVxuICAgICAgICByZXR1cm4gQ29vcmRzLmNyZWF0ZShjb29yZE1hcHBlcilcbiAgICB9XG59XG4iLCIvKlxuICog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sIHx8IHhMaW0ubGVuZ3RoID4gMC4wKSB7IFwiQ29vcmQgeC1saW1pdHMgcmFuZ2Ugc2hvdWxkIGJlID4gMC4wXCIgfVxuICAgICAgICByZXF1aXJlKHlMaW0gPT0gbnVsbCB8fCB5TGltLmxlbmd0aCA+IDAuMCkgeyBcIkNvb3JkIHktbGltaXRzIHJhbmdlIHNob3VsZCBiZSA+IDAuMFwiIH1cbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBSZXNoYXBlIGFuZCBmbGlwIHRoZSBkb21haW4gaWYgbmVjZXNzYXJ5LlxuICAgICAqL1xuICAgIGZpbmFsIG92ZXJyaWRlIGZ1biBhZGp1c3REb21haW4oZG9tYWluOiBEb3VibGVSZWN0YW5nbGUpOiBEb3VibGVSZWN0YW5nbGUge1xuICAgICAgICB2YWwgdmFsaWREb21haW4gPSBkb21haW4ubGV0IHtcbiAgICAgICAgICAgIHZhbCB3aXRoTGltcyA9IERvdWJsZVJlY3RhbmdsZShcbiAgICAgICAgICAgICAgICB4TGltID86IGRvbWFpbi54UmFuZ2UoKSxcbiAgICAgICAgICAgICAgICB5TGltID86IGRvbWFpbi55UmFuZ2UoKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIHByb2plY3Rpb24udmFsaWREb21haW4oKS5pbnRlcnNlY3Qod2l0aExpbXMpXG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gaWYgKHZhbGlkRG9tYWluICE9IG51bGwgJiYgdmFsaWREb21haW4uaGVpZ2h0ID4gMC4wICYmIHZhbGlkRG9tYWluLndpZHRoID4gMC4wKSB7XG4gICAgICAgICAgICBpZiAoZmxpcHBlZCkgdmFsaWREb21haW4uZmxpcCgpIGVsc2UgdmFsaWREb21haW5cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRocm93IElsbGVnYWxBcmd1bWVudEV4Y2VwdGlvbihcbiAgICAgICAgICAgICAgICBcIlwiXCJDYW4ndCBjcmVhdGUgYSB2YWxpZCBkb21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CBlZmZlY3RpdmVEb21haW5SYXRpbyA9IGRvbWFpblJhdGlvIC8gcmF0aW9cbiAgICAgICAgcmV0dXJuIHJlc2hhcGVHZW9tKGdlb21TaXplLCBlZmZlY3RpdmVEb21haW5SYXRpbylcbiAgICB9XG5cblxuICAgIGNvbXBhbmlvbiBvYmplY3Qge1xuXG4gICAgICAgIGZ1biByZXNoYXBlR2VvbShcbiAgICAgICAgICAgIGdlb21TaXplOiBEb3VibGVWZWN0b3IsXG4gICAgICAgICAgICB0YXJnZXRXaWR0aFRvSGVpZ2h0UmF0aW86IERvdWJsZVxuICAgICAgICApOiBEb3VibGVWZWN0b3Ige1xuICAgICAgICAgICAgdmFsIGdlb21SYXRpbyA9IGdlb21TaXplLnggLyBnZW9tU2l6ZS55XG4gICAgICAgICAgICB2YWwgbmV3U2l6ZSA9IGlmICh0YXJnZXRXaWR0aFRvSGVpZ2h0UmF0aW8gPiBnZW9tUmF0aW8pIHtcbiAgICAgICAgICAgICAgICAvLyBhZGp1c3QgZ2VvbSBoZWlnaHRcbiAgICAgICAgICAgICAgICB2YWwgaCA9IGdlb21TaXplLnggLyB0YXJnZXRXaWR0aFRvSGVpZ2h0UmF0aW9cbiAgICAgICAgICAgICAgICBEb3VibGVWZWN0b3IoZ2VvbVNpemUueCwgaClcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgLy8gYWRqdXN0IGdlb20gd2lkdGhcbiAgICAgICAgICAgICAgICB2YWwgdyA9IGdlb21TaXplLnkgKiB0YXJnZXRXaWR0aFRvSGVpZ2h0UmF0aW9cbi8vICAgICAgICAgICAgICAgIHZhbCBoRGVsdGEgPSBnZW9tU2l6ZS54IC0gd1xuICAgICAgICAgICAgICAgIERvdWJsZVZlY3Rvcih3LCBnZW9tU2l6ZS55KVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gbmV3U2l6ZVxuICAgICAgICB9XG4gICAgfVxufVxuIiwiLypcbiAqIENvcHlyaW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H1cblxuICAgIG92ZXJyaWRlIGZ1biBhZGp1c3RHZW9tU2l6ZShcbiAgICAgICAgaERvbWFpbjogRG91YmxlU3BhbixcbiAgICAgICAgdkRvbWFpbjogRG91YmxlU3BhbixcbiAgICAgICAgZ2VvbVNpemU6IERvdWJsZVZlY3RvclxuICAgICk6IERvdWJsZVZlY3RvciB7XG4gICAgICAgIC8vIEFkanVzdCBnZW9tIGRpbWVuc2lvbnMgcmF0aW8uXG4gICAgICAgIHZhbCBiYm94ID0gYm91bmRpbmdCb3goXG4gICAgICAgICAgICBsaXN0T2YoXG4gICAgICAgICAgICAgICAgRG91YmxlVmVjdG9yKGhEb21haW4ubG93ZXJFbmQsIHZEb21haW4ubG93ZXJFbmQpLFxuICAgICAgICAgICAgICAgIERvdWJsZVZlY3RvcihoRG9tYWluLmxvd2VyRW5kLCB2RG9tYWluLnVwcGVyRW5kKSxcbiAgICAgICAgICAgICAgICBEb3VibGVWZWN0b3IoaERvbWFpbi51cHBlckVuZCwgdkRvbWFpbi5sb3dlckVuZCksXG4gICAgICAgICAgICAgICAgRG91YmxlVmVjdG9yKGhEb21haW4udXBwZXJFbmQsIHZEb21haW4udXBwZXJFbmQpXG4gICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgLm1hcCB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChmbGlwcGVkKSBpdC5mbGlwKCkgZWxzZSBpdFxuICAgICAgICAgICAgICAgIH0ubWFwTm90TnVsbChwcm9qZWN0aW9uOjpwcm9qZWN0KVxuICAgICAgICAgICAgICAgIC5tYXAge1xuICAgICAgICAgICAgICAgICAgICBpZiAoZmxpcHBlZCkgaXQuZmxpcCgpIGVsc2UgaXRcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICkgPzogZXJyb3IoXCJhZGp1c3RHZW9tU2l6ZSgpIC0gY2FuJ3QgY29tcHV0ZSBiYm94XCIpXG5cbiAgICAgICAgdmFsIGRvbWFpblJhdGlvID0gYmJveC53aWR0aCAvIGJib3gua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W1vbi5kYXRhLlNlcmllc1V0aWwucGlja0F0SW5kaWNlc1xuXG5vYmplY3QgRGF0YVByb2Nlc3Npbmcge1xuXG4gICAgZnVuIHRyYW5zZm9ybU9yaWdpbmFscyhcbiAgICAgICAgZGF0YTogRGF0YUZyYW1lLFxuICAgICAgICBiaW5kaW5nczogTGlzdDxWYXJCaW5kaW5nPixcbiAgICAgICAgdHJhbnNmb3JtQnlBZXM6IE1hcDxBZXM8Kj4sIFRyYW5zZm9ybT5cbiAgICApOiBEYXRhRnJhbWUge1xuICAgICAgICBAU3VwcHJlc3MoXCJOQU1FX1NIQURPV0lOR1wiKVxuICAgICAgICB2YXIgZGF0YSA9IGRhdGFcbiAgICAgICAgZm9yIChiaW5kaW5nIGluIGJpbmRpbmdzKSB7XG4gICAgICAgICAgICB2YWwgdmFyaWFibGUgPSBiaW5kaW5nLnZhcmlhYmxlXG4gICAgICAgICAgICBpZiAodmFyaWFibGUuaXNPcmlnaW4pIHtcbiAgICAgICAgICAgICAgICBkYXRhLmFzc2VydERlZmluZWQodmFyaWFibGUpXG4gICAgICAgICAgICAgICAgZGF0YSA9IERhdGFGcmFtZVV0aWwuYXBwbHlUcmFuc2Zvcm0oXG4gICAgICAgICAgICAgICAgICAgIGRhdGEsXG4gICAgICAgICAgICAgICAgICAgIHZhcmlhYmxlLFxuICAgICAgICAgICAgICAgICAgICBiaW5kaW5nLmFlcyxcbiAgICAgICAgICAgICAgICAgICAgdHJhbnNmb3JtQnlBZXMuZ2V0VmFsdWUoYmluZGluZy5hZXMpXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGRhdGFcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBCYWNrZW5kLXNpZGUgb25seVxuICAgICAqL1xuICAgIGZ1biBidWlsZFN0YXREYXRhKFxuICAgICAgICBzdGF0SW5wdXQ6IFN0YXRJbnB1dCxcbiAgICAgICAgc3RhdDogU3RhdC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BzdGF0SW5wdXQuc3RhdEN0eCxcbiAgICAgICAgICAgICAgICB2YXJzV2l0aG91dEJpbmRpbmcsXG4gICAgICAgICAgICAgICAgbWVzc2FnZUNvbnN1bWVyXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBncm91cFNpemVMaXN0QWZ0ZXJTdGF0ID0gbGlzdE9mKHN0YXREYXRhLnJvd0NvdW50KCkpXG4gICAgICAgICAgICByZXN1bHRTZXJpZXMgPSBzdGF0RGF0YS52YXJpYWJsZXMoKS5hc3NvY2lhdGVXaXRoIHsgdmFyaWFibGUgLT4gc3RhdERhdGFbdmFyaWFibGVdIH1cbiAgICAgICAgfSBlbHNlIHsgLy8gYWRkIG9mZnNldCB0byBlYWNoIGdyb3VwXG4gICAgICAgICAgICB2YWwgZ3JvdXBNZXJnZXIgPSBHcm91cE1lcmdlcigpXG4gICAgICAgICAgICB2YXIgbGFzdFN0YXRHcm91cEVuZCA9IC0xXG4gICAgICAgICAgICBmb3IgKGQgaW4gc3BsaXRCeUdyb3VwKHN0YXRJbnB1dC5kYXRhLCBncm91cHMpKSB7XG4gICAgICAgICAgICAgICAgdmFyIHN0YXREYXRhID0gYXBwbHlTdGF0KFxuICAgICAgICAgICAgICAgICAgICBkLFxuICAgICAgICAgICAgICAgICAgICBzdGF0LFxuICAgICAgICAgICAgICAgICAgICBzdGF0SW5wdXQuYmluZGluZ3MsXG4gICAgICAgICAgICAgICAgICAgIHN0YXRJbnB1dC50cmFuc2Zvcm1CeUFlcyxcbiAgICAgICAgICAgICAgICAgICAgZmFjZXRWYXJpYWJsZXMsXG4gICAgICAgICAgICAgICAgICAgIHN0YXRJbnB1dC5zdGF0Q3R4LFxuICAgICAgICAgICAgICAgICAgICB2YXJzV2l0aG91dEJpbmRpbmcsXG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2VDb25zdW1lclxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICBpZiAoc3RhdERhdGEuaXNFbXB0eSkge1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBncm91cE1lcmdlci5pbml0T3JkZXJTcGVjcyhvcmRlck9wdGlvbnMsIHN0YXREYXRhLnZhcmlhYmxlcygpLCBzdGF0SW5wdXQuYmluZGluZ3MsIGFnZ3JlZ2F0ZU9wZXJhdGlvbilcblxuICAgICAgICAgICAgICAgIHZhbCBjdXJHcm91cFNpemVBZnRlclN0YXQgPSBzdGF0RGF0YS5yb3dDb3VudCgpXG5cbiAgICAgICAgICAgICAgICAvLyB1cGRhdGUgJ3N0YXQgZ3JvdXAnIHRvIGF2b2lkIGNvbGxpc2lvbnMgYXMgc3RhdCBpcyBhcHBsaWVkIGluZGVwZW5kZW50bHkgdG8gZWFjaCBvcmlnaW5hbCBkYXRhIGdyb3VwXG4gICAgICAgICAgICAgICAgaWYgKHN0YXREYXRhLmhhcyhTdGF0cy5HUk9VUCkpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFsIHJhbmdlID0gc3RhdERhdGEucmFuZ2UoU3RhdHMuR1JPVVApXG4gICAgICAgICAgICAgICAgICAgIGlmIChyYW5nZSAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YWwgc3RhcnQgPSBsYXN0U3RhdEdyb3VwRW5kICsgMVxuICAgICAgICAgICAgICAgICAgICAgICAgdmFsIG9mZnNldCA9IHN0YXJ0IC0gcmFuZ2UubG93ZXJFbmQudG9JbnQoKVxuICAgICAgICAgICAgICAgICAgICAgICAgbGFzdFN0YXRHcm91cEVuZCA9IHJhbmdlLnVwcGVyRW5kLnRvSW50KCkgKyBvZmZzZXRcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChvZmZzZXQgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbCBuZXdHID0gQXJyYXlMaXN0PERvdWJsZT4oKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoZyBpbiBzdGF0RGF0YS5nZXROdW1lcmljKFN0YXRzLkdST1VQKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdHLmFkZChnISEgKyBvZmZzZXQpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXREYXRhID0gc3RhdERhdGEuYnVpbGRlcigpLnB1dE51bWVyaWMoU3RhdHMuR1JPVVAsIG5ld0cpLmJ1aWxkKClcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIElmIHN0YXQgaGFzIC4uZ3JvdXAuLiB0aGVuIGdyb3VwaW5nVmFyIHdvbid0IGJlIGNoZWNrZWQsIHNvIG5vIG5lZWQgdG8gdXBkYXRlLlxuICAgICAgICAgICAgICAgICAgICB2YWwgZ3JvdXBpbmdWYXIgPSBncm91cGluZ0NvbnRleHQub3B0aW9uYWxHcm91cGluZ1ZhclxuICAgICAgICAgICAgICAgICAgICBpZiAoZ3JvdXBpbmdWYXIgIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFsIHNpemUgPSBzdGF0RGF0YVtzdGF0RGF0YS52YXJpYWJsZXMoKS5maXJzdCgpXS5zaXplXG4gICAgICAgICAgICAgICAgICAgICAgICB2YWwgdiA9IGRbZ3JvdXBpbmdWYXJdWzBdXG4gICAgICAgICAgICAgICAgICAgICAgICBzdGF0RGF0YSA9IHN0YXREYXRhLmJ1aWxkZXIoKS5wdXQoZ3JvdXBpbmdWYXIsIExpc3Qoc2l6ZSkgeyB2IH0pLmJ1aWxkKClcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIEFkZCBncm91cCdzIGRhdGFcbiAgICAgICAgICAgICAgICBncm91cE1lcmdlci5hZGRHcm91cChzdGF0RG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bCBncm91cGluZ0NvbnRleHRBZnRlclN0YXQgPSBHcm91cGluZ0NvbnRleHQud2l0aE9yZGVyZWRHcm91cHMoXG4gICAgICAgICAgICBub3JtYWxpemVkRGF0YSxcbiAgICAgICAgICAgIGdyb3VwU2l6ZUxpc3RBZnRlclN0YXRcbiAgICAgICAgKVxuXG4gICAgICAgIHJldHVybiBEYXRhQW5kR3JvdXBpbmdDb250ZXh0KFxuICAgICAgICAgICAgbm9ybWFsaXplZERhdGEsXG4gICAgICAgICAgICBncm91cGluZ0NvbnRleHRBZnRlclN0YXRcbiAgICAgICAgKVxuICAgIH1cblxuICAgIGludGVybmFsIGZ1biBmaW5kT3B0aW9uYWxWYXJpYWJsZShkYXRhOiBEYXRhRnJhbWUsIG5hbWU6IFN0cmluZz8pOiBWYXJpYWJsZT8ge1xuICAgICAgICByZXR1cm4gaWYgKG5hbWUuaXNOdWxsT3JFbXB0eSgpKVxuICAgICAgICAgICAgbnVsbFxuICAgICAgICBlbHNlXG4gICAgICAgICAgICBEYXRhRnJhbWVVdGlsLmZpbmRWYXJpYWJsZU9yRmFpbChkYXRhLCBuYW1lKVxuICAgIH1cblxuICAgIHByaXZhdGUgZnVuIHNwbGl0QnlHcm91cChkYXRhOiBEYXRhRnJhbWUsIGdyb3VwczogKEludCkgLT4gSW50KTogTGlzdDxEYXRhRnJhbWU+IHtcbiAgICAgICAgcmV0dXJuIGluZGljZXNCeUdyb3VwKGRhdGEucm93Q291bnQoKSwgZ3JvdXBzKS52YWx1ZXMubWFwIHsgaW5kaWNlcyAtPlxuICAgICAgICAgICAgZGF0YS52YXJpYWJsZXMoKS5mb2xkKEJ1aWxkZXIoKSkgeyBiLCB2YXJpYWJsZSAtPlxuICAgICAgICAgICAgICAgIHdoZW4gKGRhdGEuaXNOdW1lcmljKHZhcmlhYmxlKSkge1xuICAgICAgICAgICAgICAgICAgICB0cnVlIC0+IGIucHV0TnVtZXJpYyh2YXJpYWJsZSwgcGlja0F0SW5kaWNlcyhkYXR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lID0gbnVsbClcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBMaXN0KHN0YXREYXRhU2l6ZSkgeyB2YWx1ZSB9XG4gICAgICAgIH1cblxuICAgICAgICB2YWwgbmV3SW5wdXRTZXJpZXMgPSBIYXNoTWFwPFZhcmlhYmxlLCBMaXN0PEFueT8+PigpXG4gICAgICAgIGZvciAoYmluZGluZyBpbiBiaW5kaW5ncykge1xuICAgICAgICAgICAgdmFsIHZhcmlhYmxlID0gYmluZGluZy52YXJpYWJsZVxuICAgICAgICAgICAgaWYgKHZhcmlhYmxlLmlzU3RhdCB8fCBmYWNldFZhcmlhYmxlcy5jb250YWlucyh2YXJpYWJsZSkpIHtcbiAgICAgICAgICAgICAgICBjb250aW51ZVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YWwgYWVzID0gYmluZGluZy5hZXNcbiAgICAgICAgICAgIGlmIChzdGF0Lmhhc0RlZmF1bHRNYXBwaW5nKGFlcykpIHtcbiAgICAgICAgICAgICAgICB2YWwgZGVmYXVsdFN0YXRWYXIgPSBzdGF0LmdldERlZmF1bHRNYXBwaW5nKGFlcylcbiAgICAgICAgICAgICAgICBuZXdJbnB1dFNlcmllc1t2YXJpYWJsZV0gPSBzdGF0RGF0YS5nZXQoZGVmYXVsdFN0YXRWYXIpXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIERvIG5vdCBvdmVycmlkZSBzZXJpZXMgb2J0YWluZWQgdmlhICdkZWZhdWx0IHN0YXQgdmFyJ1xuICAgICAgICAgICAgICAgIGlmICghbmV3SW5wdXRTZXJpZXMuY29udGFpbnNLZXkodmFyaWFibGUpKSB7XG4gICAgICAgICAgICAgICAgICAgIG5ld0lucHV0U2VyaWVzW3ZhcmlhYmxlXSA9IG5ld1NlcmllRm9yVmFyaWFibGUodmFyaWFibGUpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgIC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pZSA9IHN0YXREYXRhLmdldE51bWVyaWMoaXQpXG4gICAgICAgICAgICAgICAgdHJhbnNmb3JtLmFwcGx5SW52ZXJzZShzdGF0U2VyaWUpXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgLy8gUmVwbGFjZSBzZXJpZXMgaW4gdGhlIHN0YXQgZGF0YS5cbiAgICAgICAgdmFsIGJ1aWxkZXIgPSBzdGF0RGF0YS5idWlsZGVyKClcbiAgICAgICAgaW52ZXJzZVRyYW5zZm9ybWVkU2VyaWVzLmZvckVhY2ggeyAodmFyaWFibGUsIHNlcmllKSAtPlxuICAgICAgICAgICAgYnVpbGRlci5wdXQodmFyaWFibGUsIHNlcmllKVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBidWlsZGVyLmJ1aWxkKClcbiAgICB9XG5cbiAgICBpbnRlcm5hbCBmdW4gY29tcHV0ZUdyb3VwcyhcbiAgICAgICAgZGF0YTogRGF0YUZyYW1lLFxuICAgICAgICBncm91cGluZ1ZhcmlhYmxlczogTGlzdDxWYXJpYWJsZT4sXG4gICAgKTogKEludCkgLT4gSW50IHtcblxuICAgICAgICB2YXIgY3VycmVudEdyb3VwczogTGlzdDxJbnQ+PyA9IG51bGxcbiAgICAgICAgZm9yIChncm91cGluZ1ZhcmlhYmxlIGluIGdyb3VwaW5nVmFyaWFibGVzKSB7XG4gICAgICAgICAgICB2YWwgdmFsdWVzID0gZGF0YVtncm91cGluZ1ZhcmlhYmxlXVxuICAgICAgICAgICAgdmFsIGdyb3VwcyA9IGNvbXB1dGVHcm91cHModmFsdWVzKVxuICAgICAgICAgICAgaWYgKGN1cnJlbnRHcm91cHMgPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIGN1cnJlbnRHcm91cHMgPSBncm91cHNcbiAgICAgICAgICAgICAgICBjb250aW51ZVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjaGVjayhjdXJyZW50R3JvdXBzLnNpemUgPT0gZ3JvdXBzLnNpemUpIHtcbiAgICAgICAgICAgICAgICBcIkRhdGEgc2VyaWVzIHVzZWQgdG8gY29tcHV0ZSBncm91cHMgbXVzdCBiZSBlcXVhbCBpbiBzaXplIChlbmNvdW50ZXJlZCBzaXplczogXCIgK1xuICAgICAgICAgICAgICAgICAgICAgICAgXCIke2N1cnJlbnRHcm91cHM/LnNpemV9LCAke2dyb3Vwcy5zaXplfSApXCJcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhbCBkdW1taWVzID0gY29tcHV0ZUR1bW15VmFsdWVzKGN1cnJlbnRHcm91cHMsIGdyb3VwcylcbiAgICAgICAgICAgIGN1cnJlbnRHcm91cHMgPSBjb21wdXRlR3JvdXBzKGR1bW1pZXMpXG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gaWYgKGN1cnJlbnRHcm91cHMgIT0gbnVsbCkge1xuICAgICAgICAgICAgR3JvdXBVdGlsLndyYXAoY3VycmVudEdyb3VwcylcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIEdyb3VwVXRpbC5TSU5HTEVfR1JPVVBcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHByaXZhdGUgZnVuIGNvbXB1dGVHcm91cHModmFsdWVzOiBMaXN0PCo+KTogTGlzdDxJbnQ+IHtcbiAgICAgICAgdmFsIGdyb3VwcyA9IEFycmF5TGlzdDxJbnQ+KClcbiAgICAgICAgdmFsIGdyb3VwQnlWYWwgPSBIYXNoTWFwPEFueT8sIEludD4oKVxuICAgICAgICB2YXIgY291bnQgPSAwXG4gICAgICAgIGZvciAodiBpbiB2YWx1ZXMpIHtcbiAgICAgICAgICAgIGlmICghZ3JvdXBCeVZhbC5jb250YWluc0tleSh2KSkge1xuICAgICAgICAgICAgICAgIGdyb3VwQnlWYWxbdl0gPSBjb3VudCsrXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBncm91cHMuYWRkKGdyb3VwQnlWYWwuZ2V0KHYpISEpXG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGdyb3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AgICAgICAgcmV0dXJuIGNvbXBhcmVWYWx1ZXModjEgYXMgQ29tcGFyYWJsZTwqPiwgdjIgYXMgQ29tcGFyYWJsZTwqPikgKiBkaXJcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1biBnZXRWYWx1ZShcbiAgICAgICAgICAgICAgICBkZjogRGF0YUZyYW1lLFxuICAgICAgICAgICAgICAgIHZhcmlhYmxlOiBEYXRhRnJhbWUuVmFyaWFibGUsXG4gICAgICAgICAgICAgICAgYWdncmVnYXRlT3BlcmF0aW9uOiAoKExpc3Q8RG91YmxlPz4pIC0+IERvdWJsZT8pPyA9IG51bGxcbiAgICAgICAgICAgICk6IEFueT8ge1xuICAgICAgICAgICAgICAgIHJldHVybiBpZiAoYWdncmVnYXRlT3BlcmF0aW9uICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVxdWlyZShkZi5pc051bWVyaWModmFyaWFibGUpKSB7IFwiQ2FuJ3QgYXBwbHkgYWdncmVnYXRlIG9wZXJhdGlvbiB0byBub24tbnVtZXJpYyB2YWx1ZXNcIiB9XG4gICAgICAgICAgICAgICAgICAgIGFnZ3JlZ2F0ZU9wZXJhdGlvbi5pbnZva2UoZGYuZ2V0TnVtZXJpYyh2YXJpYWJsZSkucmVxdWlyZU5vTnVsbHMoKSlcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAvLyBncm91cCBoYXMgbm8gbW9yZSB0aGFuIG9uZSB1bmlxdWUgZWxlbWVudFxuICAgICAgICAgICAgICAgICAgICBkZlt2YXJpYWJsZV0uZmlyc3RPck51bGwoKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgbXlPcmRlclNwZWNzPy5mb3JFYWNoIHsgc3BlYyAtPlxuICAgICAgICAgICAgICAgIHZhciBjbXAgPSBjb21wYXJlR3JvdXBWYWx1ZShcbiAgICAgICAgICAgICAgICAgICAgZ2V0VmFsdWUoZGYsIHNwZWMub3JkZXJCeSwgc3BlYy5hZ2dyZWdhdGVPcGVyYXRpb24pLFxuICAgICAgICAgICAgICAgICAgICBnZXRWYWx1ZShvdGhlci5kZiwgc3BlYy5vcmRlckJ5LCBzcGVjLmFnZ3JlZ2F0ZU9wZXJhdGlvbiksXG4gICAgICAgICAgICAgICAgICAgIHNwZWMuZGlyZWN0aW9uXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIGlmIChjbXAgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAvLyBlbnN1cmUgdGhlIG9yZGVyIGFzIGluIHRoZSBsZWdlbmRcbiAgICAgICAgICAgICAgICAgICAgY21wID0gY29tcGFyZUdyb3VwVmFsdWUoXG4gICAgICAgICAgICAgICAgICAgICAgICBnZXRWYWx1ZShkZiwgc3BlYy52YXJpYWJsZSksXG4gICAgICAgICAgICAgICAgICAgICAgICBnZXRWYWx1ZShvdGhlci5kZiwgc3BlYy52YXJpYWJsZSksXG4gICAgICAgICAgICAgICAgICAgICAgICBzcGVjLmRpcmVjdGlvblxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChjbXAgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gY21wXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIDBcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGZ1biBhZGRHcm91cChkOiBEYXRhRnJhbWUsIGdyb3VwU2l6ZTogSW50KSB7XG4gICAgICAgIHZhbCBncm91cCA9IEdyb3VwKGQsIGdyb3VwU2l6ZSlcbiAgICAgICAgdmFsIGluZGV4VG9JbnNlcnQgPSBmaW5kSW5kZXhUb0luc2VydChncm91cClcbiAgICAgICAgbXlPcmRlcmVkR3JvdXBzLmFkZChpbmRleFRvSW5zZXJ0LCBncm91cClcbiAgICB9XG5cbiAgICBwcml2YXRlIGZ1biBmaW5kSW5kZXhUb0luc2VydChncm91cDogR3JvdXApOiBJbnQge1xuICAgICAgICBpZiAobXlPcmRlclNwZWNzLmlzTnVsbE9yRW1wdHkoKSkge1xuICAgICAgICAgICAgcmV0dXJuIG15T3JkZXJlZEdyb3Vwcy5zaXplXG4gICAgICAgIH1cbiAgICAgICAgdmFyIGluZGV4ID0gbXlPcmRlcmVkR3JvdXBzLmJpbmFyeVNlYXJjaChncm91cClcbiAgICAgICAgaWYgKGluZGV4IDwgMCkgaW5kZXggPSBpbmRleC5pbnYoKVxuICAgICAgICByZXR1cm4gaW5kZXhcbiAgICB9XG59IiwiLypcbiAqIENvcHlyaWdodCAoYykgMjAxOS4gSmV0QnJhaW5zIHMuci5vLlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgdGhlIE1JVCBsaWNlbnNlIHRoYXQgY2FuIGJlIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUuXG4gKi9cblxucGFja2FnZSBqZXRicmFpbnMuZGF0YWxvcmUucGxvdC5idWlsZGVyLmRhdGFcblxub2JqZWN0IEdyb3VwVXRpbCB7XG4gICAgaW50ZXJuYWwgdmFsIFNJTkdMRV9HUk9VUCA9IHsgXzogSW50IC0+IDAgfVxuXG4gICAgZnVuIHdyYXAobDogTGlzdDxOdW1iZXI/Pik6IChJbnQpIC0+IEludCB7XG4gICAgICAgIHJldHVybiB7IGluZGV4IC0+XG4gICAgICAgICAgICBpZiAoaW5kZXggPiAwICYmIGluZGV4IDwgbC5zaXplKVxuICAgICAgICAgICAgICAgIGxbaW5kZXhdISEudG9JbnQoKVxuICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgIDBcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGZ1biB3cmFwKGdyb3VwQnlQb2ludEluZGV4OiBNYXA8SW50LCBJbnQ+KTogKEludCkgLT4gSW50IHtcbiAgICAgICAgcmV0dXJuIHsgZ3JvdXBCeVBvaW50SW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pbmdWYXIpICsgZGVmYXVsdEdyb3VwaW5nVmFyaWFibGVzKS50b0xpc3QoKVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgcHJpdmF0ZSB2YXIgX2dyb3VwTWFwcGVyOiAoKEludCkgLT4gSW50KT8gPSBudWxsXG5cbiAgICB2YWwgZ3JvdXBNYXBwZXI6IChJbnQpIC0+IEludFxuICAgICAgICBnZXQoKSB7XG4gICAgICAgICAgICBpZiAoX2dyb3VwTWFwcGVyID09IG51bGwpIHtcbiAgICAgICAgICAgICAgICBfZ3JvdXBNYXBwZXIgPSBjb21wdXRlR3JvdXBzKClcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBfZ3JvdXBNYXBwZXIhIVxuICAgICAgICB9XG5cbiAgICBwcml2YXRlIGZ1biBjb21wdXRlR3JvdXBzKCk6IChJbnQpIC0+IEludCB7XG4gICAgICAgIGlmIChkYXRhLnJvd0NvdW50KCkgPT0gMCkgcmV0dXJuIEdyb3VwVXRpbC5TSU5HTEVfR1JPVVBcbiAgICAgICAgaWYgKGRhdGEuaGFzKFN0YXRzLkdST1VQKSkge1xuICAgICAgICAgICAgdmFsIGxpc3QgPSBkYXRhLmdldE51bWVyaWMoU3RhdHMuR1JPVVApXG4gICAgICAgICAgICByZXR1cm4gR3JvdXBVdGlsLndyYXAobGlzdClcbiAgICAgICAgfSBlbHNlIGlmIChncm91cFNpemVMaXN0ICE9IG51bGwpIHtcbiAgICAgICAgICAgIGlmIChncm91cFNpemVMaXN0LnNpemUgPT0gZGF0YS5yb3dDb3VudCgpKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIEdyb3VwVXRpbC5TSU5HTEVfR1JPVVBcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdmFsIGdyb3VwQnlQb2ludEluZGV4ID1cbiAgICAgICAgICAgICAgICAgICAgdG9JbmRleE1hcChncm91cFNpemVMaXN0KVxuICAgICAgICAgICAgICAgIHJldHVybiBHcm91cFV0aWwud3JhcChncm91cEJ5UG9pbnRJbmRleClcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmIChleHBlY3RNdWx0aXBsZSkge1xuICAgICAgICAgICAgcmV0dXJuIERhdGFQcm9jZXNzaW5nLmNvbXB1dGVHcm91cHMoXG4gICAgICAgICAgICAgICAgZGF0YSxcbiAgICAgICAgICAgICAgICBncm91cGluZ1ZhcmlhYmxlc1xuICAgICAgICAgICAgKVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBHcm91cFV0aWwuU0lOR0xFX0dST1VQXG4gICAgfVxuXG4gICAgY29tcGFuaW9uIG9iamVjdCB7XG4gICAgICAgIGludGVybmFsIGZ1biB3aXRoT3JkZXJlZEdyb3VwcyhkYXRhOiBEYXRhRnJhbWUsIGdyb3VwU2l6ZUxpc3Q6IExpc3Q8SW50Pik6IEdyb3VwaW5nQ29udGV4dCB7XG4gICAgICAgICAgICB2YWwgZ3JvdXBpbmdWYXJpYWJsZXMgPSBEYXRhUHJvY2Vzc2luZy5kZWZhdWx0R3JvdXBpbmdWYXJpYWJsZXMoXG4gICAgICAgICAgICAgICAgZGF0YSxcbiAgICAgICAgICAgICAgICBiaW5kaW5ncyA9IGVtcHR5TGlzdCgpLFxuICAgICAgICAgICAgICAgIHBhdGhJZFZhck5hbWUgPSBudWxsXG4gICAgICAgICAgICApXG4gICAgICAgICAgICByZXR1cm4gR3JvdXBpbmdDb250ZXh0KFxuICAgICAgICAgICAgICAgIGRhdGEsXG4gICAgICAgICAgICAgICAgZ3JvdXBpbmdWYXJpYWJsZXMsXG4gICAgICAgICAgICAgICAgZXhwbGljaXRHcm91cGluZ1Zhck5hbWUgPSBudWxsLFxuICAgICAgICAgICAgICAgIGV4cGVjdE11bHRpcGxlID0gZmFsc2UsXG4gICAgICAgICAgICAgICAgZ3JvdXBTaXplTGlzdCA9IEFycmF5TGlzdChncm91cFNpemVMaXN0KVxuICAgICAgICAgICAgKVxuICAgICAgICB9XG5cbiAgICAgICAgcHJpdmF0ZSBmdW4gdG9JbmRleE1hcChncm91cFNpemVMaXN0OiBMaXN0PEludD4pOiBNYXA8SW50LCBJbnQ+IHtcbiAgICAgICAgICAgIHZhbCByZXN1bHQgPSBIYXNoTWFwPEludCwgSW50PigpXG4gICAgICAgICAgICB2YXIgY3VycmVudEdyb3VwID0gMFxuICAgICAgICAgICAgdmFyIGN1cnJlbnRHcm91cEluZGV4T2Zmc2V0ID0gMFxuICAgICAgICAgICAgZm9yIChncm91cFNpemUgaW4gZ3JvdXBTaXplTGlzdCkge1xuICAgICAgICAgICAgICAgIGZvciAoaSBpbiAwIHVudGlsIGdyb3VwU2l6ZSkge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHRbY3VycmVudEdyb3VwSW5kZXhPZmZzZXQgKyBpXSA9IGN1cnJlbnRHcm91cFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjdXJyZW50R3JvdXArK1xuICAgICAgICAgICAgICAgIGN1cnJlbnRHcm91cEluZGV4T2Zmc2V0ICs9IGdyb3VwU2l6ZVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHJlc3VsdFxuICAgICAgICB9XG5cbiAgICAgICAgcHJpdmF0ZSBmdW4gZ2V0R3JvdXBpbmdWYXJpYWJsZXMoXG4gICAgICAgICAgICBkYXRhOiBEYXRhRnJhbWUsXG4gICAgICAgICAgICBiaW5kaW5nczogTGlzdDxWYXJCaW5kaW5nPixcbiAgICAgICAgICAgIGV4cGxpY2l0R3JvdXBpbmdWYXI6IFZhcmlhYmxlP1xuICAgICAgICApOiBJdGVyYWJsZTxWYXJpYWJsZT4ge1xuXG4gICAgICAgICAgICAvLyBhbGwgJ29yaWdpbicgZGlzY3JldGUgdmFycyAoYnV0IG5vdCBwb3NpdGlvbmFsKSArIGV4cGxpY2l0R3JvdXBpbmdWYXJcbiAgICAgICAgICAgIHZhbCByZXN1bHQgPSBMaW5rZWRIYXNoU2V0PFZhcmlhYmxlPigpXG4gICAgICAgICAgICBmb3IgKGJpbmRpbmcgaW4gYmluZGluZ3MpIHtcbiAgICAgICAgICAgICAgICB2YWwgdmFyaWFibGUgPSBiaW5kaW5nLnZhcmlhYmxlXG4gICAgICAgICAgICAgICAgaWYgKCFyZXN1bHQuY29udGFpbnModmFyaWFibGUpKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh2YXJpYWJsZS5pc09yaWdpbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHZhcmlhYmxlID09IGV4cGxpY2l0R3JvdXBpbmdWYXIgfHwgaXNEZWZhdWx0R3JvdXBpbmdWYXJpYWJsZShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmluZGluZy5hZXMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhcmlhYmxlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0LmFkZCh2YXJpYWJsZSlcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiByZXN1bHRcbiAgICAgICAgfVxuXG4gICAgICAgIHByaXZhdGUgZnVuIGlzRGVmYXVsdEdyb3VwaW5nVmFyaWFibGUoXG4gICAgICAgICAgICBkYXRhOiBEYXRhRnJhbWUsXG4gICAgICAgICAgICBhZXM6IEFlczwqPixcbiAgICAgICAgICAgIHZhcmlhYmxlOiBWYXJpYWJsZVxuICAgICAgICApID0gIShBZXMuaXNQb3NpdGlvbmFsKGFlcykgfHwgZGF0YS5pc051bWVyaWModmFyaWFibGUpKVxuICAgIH1cbn1cbiIsIi8qXG4gKiBDb3B5cmlnaHQgKGMpIDIwMjEuIEp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gICAgICAgICAgIG90aGVyIGFzIE9yZGVyT3B0aW9uXG5cbiAgICAgICAgICAgIGlmICh2YXJpYWJsZU5hbWUgIT0gb3RoZXIudmFyaWFibGVOYW1lKSByZXR1cm4gZmFsc2VcbiAgICAgICAgICAgIGlmIChieVZhcmlhYmxlICE9IG90aGVyLmJ5VmFyaWFibGUpIHJldHVybiBmYWxzZVxuICAgICAgICAgICAgaWYgKG9yZGVyRGlyICE9IG90aGVyLm9yZGVyRGlyKSByZXR1cm4gZmFsc2VcblxuICAgICAgICAgICAgcmV0dXJuIHRydWVcbiAgICAgICAgfVxuXG4gICAgICAgIG92ZXJyaWRlIGZ1biBoYXNoQ29kZSgpOiBJbnQge1xuICAgICAgICAgICAgdmFyIHJlc3VsdCA9IHZhcmlhYmxlTmFtZS5oYXNoQ29kZSgpXG4gICAgICAgICAgICByZXN1bHQgPSAzMSAqIHJlc3VsdCArIChieVZhcmlhYmxlPy5oYXNoQ29kZSgpID86IDApXG4gICAgICAgICAgICByZXN1bHQgPSAzMSAqIHJlc3VsdCArIChvcmRlckRpciA/OiAwKVxuICAgICAgICAgICAgcmV0dXJuIHJlc3VsdFxuICAgICAgICB9XG5cbiAgICAgICAgb3ZlcnJpZGUgZnVuIHRvU3RyaW5nKCk6IFN0cmluZyB7XG4gICAgICAgICAgICByZXR1cm4gXCJPcmRlck9wdGlvbih2YXJpYWJsZU5hbWU9JyR2YXJpYWJsZU5hbWUnLCBieVZhcmlhYmxlPSRieVZhcmlhYmxlLCBvcmRlckRpcj0kb3JkZXJEaXIpXCJcbiAgICAgICAgfVxuXG5cbiAgICAgICAgY29tcGFuaW9uIG9iamVjdCB7XG4gICAgICAgICAgICBmdW4gY3JlYXRlKFxuICAgICAgICAgICAgICAgIHZhcmlhYmxlTmFtZTogU3RyaW5nLFxuICAgICAgICAgICAgICAgIG9yZGVyQnk6IFN0cmluZz8sXG4gICAgICAgICAgICAgICAgb3JkZXI6IEFueT9cbiAgICAgICAgICAgICk6IE9yZGVyT3B0aW9uPyB7XG4gICAgICAgICAgICAgICAgaWYgKG9yZGVyQnkgPT0gbnVsbCAmJiBvcmRlciA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJlcXVpcmUob3JkZXIgPT0gbnVsbCB8fCAob3JkZXIgaXMgTnVtYmVyICYmIG9yZGVyLnRvSW50KCkgaW4gbGlzdE9mKC0xLCAxKSkpIHtcbiAgICAgICAgICAgICAgICAgICAgXCJVbnN1cHBvcnRlZCBgb3JkZXJgIHZhbHVlOiAkb3JkZXIuIFVzZSAxIChhc2NlbmRpbmcpIG9yIC0xIChkZXNjZW5kaW5nKS5cIlxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHJldHVybiBPcmRlck9wdGlvbih2YXJpYWJsZU5hbWUsIG9yZGVyQnksIChvcmRlciBhcz8gTnVtYmVyKT8udG9JbnQoKSlcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgZnVuIE9yZGVyT3B0aW9uLm1lcmdlV2l0aChvdGhlcjogT3JkZXJPcHRpb24pOiBPcmRlck9wdGlvbiB7XG4gICAgICAgICAgICAgICAgcmVxdWlyZSh2YXJpYWJsZU5hbWUgPT0gb3RoZXIudmFyaWFibGVOYW1lKSB7XG4gICAgICAgICAgICAgICAgICAgIFwiQ2FuJ3QgbWVyZ2Ugb3JkZXIgb3B0aW9ucyBmb3IgZGlmZmVyZW50IHZhcmlhYmxlczogJyR2YXJpYWJsZU5hbWUnIGFuZCAnJHtvdGhlci52YXJpYWJsZU5hbWV9J1wiXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJlcXVpcmUoYnlWYXJpYWJsZSA9PSBudWxsIHx8IG90aGVyLmJ5VmFyaWFibGUgPT0gbnVsbCB8fCBvdGhlci5ieVZhcmlhYmxlID09IGJ5VmFyaWFibGUpIHtcbiAgICAgICAgICAgICAgICAgICAgXCJNdWx0aXBsZSBvcmRlcmluZyBvcHRpb25zIGZvciB0aGUgdmFyaWFibGUgJyR2YXJpYWJsZU5hbWUnIHdpdGggZGlmZmVyZW50IG5vbi1lbXB0eSAnb3JkZXJfYnknIGZpZWxkczogJyRieVZhcmlhYmxlJyBhbmQgJyR7b3RoZXIuYnlWYXJpYWJsZX0nXCJcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmVxdWlyZShvcmRlckRpciA9PSBudWxsIHx8IG90aGVyLm9yZGVyRGlyID09IG51bGwgfHwgb3RoZXIub3JkZXJEaXIgPT0gb3JkZXJEaXIpIHtcbiAgICAgICAgICAgICAgICAgICAgXCJNdWx0aXBsZSBvcmRlcmluZyBvcHRpb25zIGZvciB0aGUgdmFyaWFibGUgJyR2YXJpYWJsZU5hbWUnIHdpdGggZGlmZmVyZW50IG9yZGVyIGRpcmVjdGlvbjogJyRvcmRlckRpcicgYW5kICcke290aGVyLm9yZGVyRGlyfSdcIlxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gT3JkZXJPcHRpb24oXG4gICAgICAgICAgICAgICAgICAgIHZhcmlhYmxlTmFtZSxcbiAgICAgICAgICAgICAgICAgICAgYnlWYXJpYWJsZSA/OiBvdGhlci5ieVZhcmlhYmxlLFxuICAgICAgICAgICAgICAgICAgICBvcmRlckRpciA/OiBvdGhlci5vcmRlckRpclxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGZ1biBjcmVhdGVPcmRlclNwZWMoXG4gICAgICAgIHZhcmlhYmxlczogU2V0PERhdGFGcmFtZS5WYXJpYWJsZT4sXG4gICAgICAgIHZhckJpbmRpbmdzOiBMaXN0PFZhckJpbmRpbmc+LFxuICAgICAgICBvcmRlck9wdGlvbjogT3JkZXJPcHRpb24sXG4gICAgICAgIGFnZ3JlZ2F0ZU9wZXJhdGlvbjogKChMaXN0PERvdWJsZT8+KSAtPiBEb3VibGU/KT9cbiAgICApOiBEYXRhRnJhbWUuT3JkZXJTcGVjIHtcbiAgICAgICAgZnVuIGdldFZhcmlhYmxlQnlOYW1lKHZhck5hbWU6IFN0cmluZyk6IERhdGFGcmFtZS5WYXJpYWJsZSB7XG4gICAgICAgICAgICByZXR1cm4gdmFyaWFibGVzLmZpbmQgeyBpdC5uYW1lID09IHZhck5hbWUgfVxuICAgICAgICAgICAgICAgID86IGVycm9yKFwiVW5kZWZpbmVkIHZhcmlhYmxlICckdmFyTmFtZScgaW4gb3JkZXIgb3B0aW9ucy4gRnVsbCB2YXJpYWJsZSBsaXN0OiAke3ZhcmlhYmxlcy5tYXAgeyBcIicke2l0Lm5hbWV9J1wiIH19XCIpXG4gICAgICAgIH1cblxuICAgICAgICB2YWwgdmFyaWFibGUgPVxuICAgICAgICAgICAgaWYgKHZhckJpbmRpbmdzLmZpbmQgeyBpdC52YXJpYWJsZS5uYW1lID09IG9yZGVyT3B0aW9uLnZhcmlhYmxlTmFtZSAmJiBpdC5hZXMgPT0gQWVzLlggfSAhPSBudWxsICYmXG4gICAgICAgICAgICAgICAgU2FtcGxpbmdVdGlsLnhWYXIodmFyaWFibGVzKSAhPSBudWxsXG4gICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAvLyBBcHBseSBvcmRlcmluZyB0byB0aGUgWCB2YXJpYWJsZSB3aGljaCBpcyB1c2VkIGZvciBzYW1wbGluZ1xuICAgICAgICAgICAgICAgIFNhbXBsaW5nVXRpbC54VmFyKHZhcmlhYmxlcykhIVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBnZXRWYXJpYWJsZUJ5TmFtZShvcmRlck9wdGlvbi52YXJpYWJsZU5hbWUpXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIERhdGFGcmFtZS5PcmRlclNwZWMoXG4gICAgICAgICAgICB2YXJpYWJsZSxcbiAgICAgICAgICAgIG9yZGVyT3B0aW9uLmJ5V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ZnVuIHVwZGF0ZUNvbG9ycyhvcHRpb25zOiBNYXA8U3RyaW5nLCBBbnk+KTogTWFwPFN0cmluZywgQW55PiB7XG4gICAgICAgIHZhbCBwbG90QmFja2dyb3VuZENvbG9yID0gb3B0aW9uc1tUaGVtZU9wdGlvbi5QTE9UX0JLR1JfUkVDVF0/LmxldCB7XG4gICAgICAgICAgICBpZiAoaXQgaXMgTWFwPCosICo+KSBpdFtFbGVtLkZJTExdIGVsc2UgbnVsbFxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIGNob29zZU5ld0NvbG9yKFxuICAgICAgICAgICAgZWxlbWVudE5hbWU6IFN0cmluZyxcbiAgICAgICAgICAgIGVsZW1lbnRDb2xvcjogQW55PyxcbiAgICAgICAgICAgIGlzRmlsbENvbG9yOiBCb29sZWFuLFxuICAgICAgICApOiBDb2xvciB7XG4gICAgICAgICAgICAvLyBJZiB0aGUgZWxlbWVudCBoYXMgdGhlIHNhbWUgY29sb3IgYXMgdGhlIHBsb3QgYmFja2dyb3VuZCwgdXNlIHRoZSAnZmlsbCcgY29sb3IgZm9yIGJvdGguXG4gICAgICAgICAgICAvLyBPdGhlcndpc2UgLSB1c2UgdGhlIG93biBzcGVjaWFsIGVsZW1lbnQncyBjb2xvci5cbiAgICAgICAgICAgIGlmIChlbGVtZW50Q29sb3IgPT0gcGxvdEJhY2tncm91bmRDb2xvcikge1xuICAgICAgICAgICAgICAgIHJldHVybiBmaWxsXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gc3BlY2lhbENvbG9yc1tlbGVtZW50TmFtZV0/LmdldChpZiAoaXNGaWxsQ29sb3IpIEVsZW0uRklMTCBlbHNlIEVsZW0uQ09MT1IpXG4gICAgICAgICAgICAgICAgPzogaWYgKGlzRmlsbENvbG9yKSBmaWxsIGVsc2UgY29sb3JcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBvcHRpb25zLm1hcFZhbHVlcyB7IChrZXksIHZhbHVlKSAtPlxuICAgICAgICAgICAgaWYgKHZhbHVlIGlzIE1hcDwqLCAqPikge1xuICAgICAgICAgICAgICAgIHZhbCB1cGRhdGVkID0gdmFsdWUudG9NdXRhYmxlTWFwKClcbiAgICAgICAgICAgICAgICBpZiAoa2V5IGluIEVMRU1fVE9fVVBEQVRFX0NPTE9SKSB7XG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZWRbRWxlbS5DT0xPUl0gPSBjaG9vc2VOZXdDb2xvcihrZXksIHZhbHVlW0VsZW0uQ09MT1JdLCBpc0ZpbGxDb2xvciA9IGZhbHNlKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoa2V5IGluIEVMRU1fVE9fVVBEQVRFX0ZJTEwpIHtcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlZFtFbGVtLkZJTExdID0gY2hvb3NlTmV3Q29sb3Ioa2V5LCB2YWx1ZVtFbGVtLkZJTExdLCBpc0ZpbGxDb2xvciA9IHRydWUpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChrZXkgPT0gVGhlbWVPcHRpb24uVE9PTFRJUF9SRUNUKSB7XG4gICAgICAgICAgICAgICAgICAgIHNwZWNpYWxDb2xvcnNba2V5XT8uZ2V0KEVsZW0uRklMTCk/LmxldCB7IHVwZGF0ZWRbRWxlbS5GSUxMXSA9IGl0IH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdXBkYXRlZFxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB2YWx1ZVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgY29tcGFuaW9uIG9iamVjdCB7XG4gICAgICAgIHByaXZhdGUgdmFsIEVMRU1fVE9fVVBEQVRFX0NPTE9SID0gbGlzdE9mKFxuICAgICAgICAgICAgVGhlbWVPcHRpb24uTElORSxcbiAgICAgICAgICAgIFRoZW1lT3B0aW9uLlJFQ1QsXG5cbiAgICAgICA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GVtZUZsYXZvcihcbiAgICAgICAgICAgICAgICAgICAgZmlsbCA9IHBhcnNlSGV4KFwiIzMwMzAzMFwiKSxcbiAgICAgICAgICAgICAgICAgICAgY29sb3IgPSBwYXJzZUhleChcIiNCQkJCQkJcIiksXG4gICAgICAgICAgICAgICAgICAgIHNwZWNpYWxDb2xvcnMgPSBtYXBPZihcbiAgICAgICAgICAgICAgICAgICAgICAgIFRoZW1lT3B0aW9uLlBBTkVMX0JLR1JfUkVDVCB0byBtYXBPZihFbGVtLkZJTEwgdG8gcGFyc2VIZXgoXCIjM0IzQjNCXCIpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIFRoZW1lT3B0aW9uLkZBQ0VUX1NUUklQX0JHUl9SRUNUIHRvIG1hcE9mKEVsZW0uRklMTCB0byBwYXJzZUhleChcIiMzNjM2MzZcIikpLFxuICAgICAgICAgICAgICAgICAgICAgICAgVGhlbWVPcHRpb24uUEFORUxfR1JJRCB0byBtYXBPZihFbGVtLkNPTE9SIHRvIHBhcnNlSGV4KFwiIzQ3NDc0N1wiKSksXG4gICAgICAgICAgICAgICAgICAgICAgICBUaGVtZU9wdGlvbi5UT09MVElQX1JFQ1QgdG8gbWFwT2YoRWxlbS5GSUxMIHRvIHBhcnNlSGV4KFwiIzE0MTQxNFwiKSksXG4gICAgICAgICAgICAgICAgICAgICAgICBUaGVtZU9wdGlvbi5BWElTX1RPT0xUSVAgdG8gbWFwT2YoRWxlbS5GSUxMIHRvIHBhcnNlSGV4KFwiI0JCQkJCQlwiKSksXG4gICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIFRoZW1lT3B0aW9uLkZsYXZvci5TT0xBUklaRURfTElHSFQgLT4gVGhlbWVGbGF2b3IoXG4gICAgICAgICAgICAgICAgICAgIGZpbGwgPSBwYXJzZUhleChcIiNGREY2RTNcIiksXG4gICAgICAgICAgICAgICAgICAgIGNvbG9yID0gcGFyc2VIZXgoXCIjMkU0RTU4XCIpLFxuICAgICAgICAgICAgICAgICAgICBzcGVjaWFsQ29sb3JzID0gbWFwT2YoXG4gICAgICAgICAgICAgICAgICAgICAgICBUaGVtZU9wdGlvbi5QQU5FTF9CS0dSX1JFQ1QgdG8gbWFwT2YoRWxlbS5GSUxMIHRvIHBhcnNlSGV4KFwiI0VFRThENVwiKSksXG4gICAgICAgICAgICAgICAgICAgICAgICBUaGVtZU9wdGlvbi5GQUNFVF9TVFJJUF9CR1JfUkVDVCB0byBtYXBPZihFbGVtLkZJTEwgdG8gcGFyc2VIZXgoXCIjRTZERkNBXCIpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIFRoZW1lT3B0aW9uLlBBTkVMX0dSSUQgdG8gbWFwT2YoRWxlbS5DT0xPUiB0byBwYXJzZUhleChcIiNEN0Q0Q0JcIikpLFxuICAgICAgICAgICAgICAgICAgICAgICAgVGhlbWVPcHRpb24uVE9PTFRJUF9SRUNUIHRvIG1hcE9mKEVsZW0uRklMTCB0byBwYXJzZUhleChcIiNGRUZCRjNcIikpLFxuICAgICAgICAgICAgICAgICAgICAgICAgVGhlbWVPcHRpb24uQVhJU19UT09MVElQIHRvIG1hcE9mKEVsZW0uRklMTCB0byBwYXJzZUhleChcIiMyRTRFNThcIikpLFxuICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICBUaGVtZU9wdGlvbi5GbGF2b3IuU09MQVJJWkVEX0RBUksgLT4gVGhlbWVGbGF2b3IoXG4gICAgICAgICAgICAgICAgICAgIGZpbGwgPSBwYXJzZUhleChcIiMwRTNDNEFcIiksXG4gICAgICAgICAgICAgICAgICAgIGNvbG9yID0gcGFyc2VIZXgoXCIjQTdCNkJBXCIpLFxuICAgICAgICAgICAgICAgICAgICBzcGVjaWFsQ29sb3JzID0gbWFwT2YoXG4gICAgICAgICAgICAgICAgICAgICAgICBUaGVtZU9wdGlvbi5QQU5FTF9CS0dSX1JFQ1QgdG8gbWFwT2YoRWxlbS5GSUxMIHRvIHBhcnNlSGV4KFwiIzFCNDg1NFwiKSksXG4gICAgICAgICAgICAgICAgICAgICAgICBUaGVtZU9wdGlvbi5GQUNFVF9TVFJJUF9CR1JfUkVDVCB0byBtYXBPZihFbGVtLkZJTEwgdG8gcGFyc2VIZXgoXCIjMUY0NjUwXCIpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIFRoZW1lT3B0aW9uLlBBTkVMX0dSSUQgdG8gbWFwT2YoRWxlbS5DT0xPUiB0byBwYXJzZUhleChcIiM0NTU0NThcIikpLFxuICAgICAgICAgICAgICAgICAgICAgICAgVGhlbWVPcHRpb24uVE9PTFRJUF9SRUNUIHRvIG1hcE9mKEVsZW0uRklMTCB0byBwYXJzZUhleChcIiMwQjJGM0FcIikpLFxuICAgICAgICAgICAgICAgICAgICAgICAgVGhlbWVPcHRpb24uQVhJU19UT09MVElQIHRvIG1hcE9mKEVsZW0uRklMTCB0byBwYXJzZUhleChcIiNBN0I2QkFcIikpLFxuICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICBUaGVtZU9wdGlvbi5GbGF2b3IuSElHSF9DT05UUkFTVF9MSUdIVCAtPiBUaGVtZUZsYXZvcihcbiAgICAgICAgICAgICAgICAgICAgZmlsbCA9IENvbG9yLldISVRFLFxuICAgICAgICAgICAgICAgICAgICBjb2xvciA9IENvbG9yLkJMQUNLLFxuICAgICAgICAgICAgICAgICAgICBzcGVjaWFsQ29sb3JzID0gbWFwT2YoXG4gICAgICAgICAgICAgICAgICAgICAgICBUaGVtZU9wdGlvbi5QQU5FTF9CS0dSX1JFQ1QgdG8gbWFwT2YoRWxlbS5GSUxMIHRvIHBhcnNlSGV4KFwiI0VCRUJFQlwiKSksXG4gICAgICAgICAgICAgICAgICAgICAgICBUaGVtZU9wdGlvbi5GQUNFVF9TVFJJUF9CR1JfUkVDVCB0byBtYXBPZihFbGVtLkZJTEwgdG8gcGFyc2VIZXgoXCIjRDlEOUQ5XCIpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIFRoZW1lT3B0aW9uLlBBTkVMX0dSSUQgdG8gbWFwT2YoRWxlbS5DT0xPUiB0byBwYXJzZUhleChcIiNFOUU5RTlcIikpLFxuICAgICAgICAgICAgICAgICAgICAgICAgVGhlbWVPcHRpb24uVE9PTFRJUF9SRUNUIHRvIG1hcE9mKEVsZW0uRklMTCB0byBDb2xvci5XSElURSksXG4gICAgICAgICAgICAgICAgICAgICAgICBUaGVtZU9wdGlvbi5BWElTX1RPT0xUSVAgdG8gbWFwT2YoRWxlbS5GSUxMIHRvIENvbG9yLkJMQUNLKSxcbiAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgVGhlbWVPcHRpb24uRmxhdm9yLkhJR0hfQ09OVFJBU1RfREFSSyAtPiBUaGVtZUZsYXZvcihcbiAgICAgICAgICAgICAgICAgICAgZmlsbCA9IENvbG9yLkJMQUNLLFxuICAgICAgICAgICAgICAgICAgICBjb2xvciA9IENvbG9yLldISVRFLFxuICAgICAgICAgICAgICAgICAgICBzcGVjaWFsQ29sb3JzID0gbWFwT2YoXG4gICAgICAgICAgICAgICAgICAgICAgICBUaGVtZU9wdGlvbi5QQU5FTF9CS0dSX1JFQ1QgdG8gbWFwT2YoRWxlbS5GSUxMIHRvIHBhcnNlSGV4KFwiIzNCM0IzQlwiKSksXG4gICAgICAgICAgICAgICAgICAgICAgICBUaGVtZU9wdGlvbi5GQUNFVF9TVFJJUF9CR1JfUkVDVCB0byBtYXBPZihFbGVtLkZJTEwgdG8gcGFyc2VIZXgoXCIjMzYzNjM2XCIpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIFRoZW1lT3B0aW9uLlBBTkVMX0dSSUQgdG8gbWFwT2YoRWxlbS5DT0xPUiB0byBwYXJzZUhleChcIiM0NzQ3NDdcIikpLFxuICAgICAgICAgICAgICAgICAgICAgICAgVGhlbWVPcHRp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dCBGbGF2b3Ige1xuICAgICAgICBjb25zdCB2YWwgREFSQ1VMQSA9IFwiZGFyY3VsYVwiXG4gICAgICAgIGNvbnN0IHZhbCBTT0xBUklaRURfTElHSFQgPSBcInNvbGFyaXplZF9saWdodFwiXG4gICAgICAgIGNvbnN0IHZhbCBTT0xBUklaRURfREFSSyA9IFwic29sYXJpemVkX2RhcmtcIlxuICAgICAgICBjb25zdCB2YWwgSElHSF9DT05UUkFTVF9MSUdIVCA9IFwiaGlnaF9jb250cmFzdF9saWdodFwiXG4gICAgICAgIGNvbnN0IHZhbCBISUdIX0NPTlRSQVNUX0RBUksgPSBcImhpZ2hfY29udHJhc3RfZGFya1wiXG4gICAgfVxuXG4gICAgaW50ZXJuYWwgb2JqZWN0IEZvclRlc3Qge1xuICAgICAgICB2YWwgdGhlbWVOYW1lcyA9IGxpc3RPZihcbiAgICAgICAgICAgIE5hbWUuUl9HUkVZLFxuICAgICAgICAgICAgTmFtZS5SX0xJR0hULFxuICAgICAgICAgICAgTmFtZS5SX0NMQVNTSUMsXG4gICAgICAgICAgICBOYW1lLlJfTUlOSU1BTCxcbiAgICAgICAgICAgIE5hbWUuUl9CVyxcbiAgICAgICAgICAgIE5hbWUuTFBfTUlOSU1BTCxcbiAgICAgICAgICAgIE5hbWUuTFBfTk9ORSxcbiAgICAgICAgKVxuICAgICAgICB2YWwgZWxlbVdpdGhDb2xvckFuZFNpemUgPSBsaXN0T2YoXG4gICAgICAgICAgICBQTE9UX0JLR1JfUkVDVCxcbiAgICAgICAgICAgIExFR0VORF9CS0dSX1JFQ1QsXG4gICAgICAgICAgICBBWElTX1RJQ0tTX1gsXG4gICAgICAgICAgICBBWElTX1RJQ0tTX1ksXG4gICAgICAgICAgICBBWElTX0xJTkVfWCxcbiAgICAgICAgICAgIEFYSVNfTElORV9ZLFxuICAgICAgICAgICAgQVhJU19UT09MVElQX1gsXG4gICAgICAgICAgICBBWElTX1RPT0xUSVBfWSxcbiAgICAgICAgICAgIFBBTkVMX0JLR1JfUkVDVCxcbiAgICAgICAgICAgIFBBTkVMX0JPUkRFUl9SRUNULFxuICAgICAgICAgICAgUEFORUxfR1JJRF9NQUpPUl9YLFxuICAgICAgICAgICAgUEFORUxfR1JJRF9NSU5PUl9YLFxuICAgICAgICAgICAgUEFORUxfR1JJRF9NQUpPUl9ZLFxuICAgICAgICAgICAgUEFORUxfR1JJRF9NSU5PUl9ZLFxuICAgICAgICAgICAgRkFDRVRfU1RSSVBfQkdSX1JFQ1QsXG4gICAgICAgICAgICBUT09MVElQX1JFQ1RcbiAgICAgICAgKVxuXG4gICAgICAgIC8vIEFjdHVhbGx5LCB0ZXh0IHNpemVzIGFyZSBkZWZpbmVkIGluIFwidGhlbWUgdmFsdWVzXCIuXG4gICAgICAgIHZhbCBlbGVtV2l0aENvbG9yT25seSA9IGxpc3RPZihcbiAgICAgICAgICAgIFBMT1RfVElUTEUsXG4gICAgICAgICAgICBQTE9UX1NVQlRJVExFLFxuICAgICAgICAgICAgUExPVF9DQVBUSU9OLFxuICAgICAgICAgICAgQVhJU19USVRMRV9YLFxuICAgICAgICAgICAgQVhJU19USVRMRV9ZLFxuICAgICAgICAgICAgQVhJU19URVhUX1gsXG4gICAgICAgICAgICBBWElTX1RFWFRfWSxcbiAgICAgICAgICAgIEFYSVNfVE9PTFRJUF9URVhUX1gsXG4gICAgICAgICAgICBBWElTX1RPT0xUSVBfVEVYVF9ZLFxuICAgICAgICAgICAgRkFDRVRfU1RSSVBfVEVYVCxcbiAgICAgICAgICAgIExFR0VORF9URVhULFxuICAgICAgICAgICAgTEVHRU5EX1RJVExFLFxuICAgICAgICAgICAgVE9PTFRJUF9URVhULFxuICAgICAgICAgICAgVE9PTFRJUF9USVRMRV9URVhULFxuICAgICAgICApXG4gICAgICAgIHZhbCBlbGVtV2l0aEZpbGwgPSBsaXN0T2YoXG4gICAgICAgICAgICBQTE9UX0JLR1JfUkVDVCxcbiAgICAgICAgICAgIExFR0VORF9CS0dSX1JFQ1QsXG4gICAgICAgICAgICBBWElTX1RPT0xUSVBfWCxcbiAgICAgICAgICAgIEFYSVNfVE9PTFRJUF9ZLFxuICAgICAgICAgICAgUEFORUxfQktHUl9SRUNULFxuICAgICAgICAgICAgRkFDRVRfU1RSSVBfQkdSX1JFQ1QsXG4gICAgICAgICAgICBUT09MVElQX1JFQ1RcbiAgICAgICAgKVxuICAgICAgICB2YWwgbnVtZXJpY09wdGlvbnMgPSBsaXN0T2YoXG4gICAgICAgICAgICBBWElTX1RJQ0tTX0xFTkdUSF9YLFxuICAgICAgICAgICAgQVhJU19USUNLU19MRU5HVEhfWSxcbiAgICAgICAgKVxuXG4gICAgICAgIC8vICBmb250X2ZhY2VcbiAgICAgICAgdmFsIGVsZW1XaXRoRm9udE9wdGlvbnMgPSBsaXN0T2YoXG4gICAgICAgICAgICBQTE9UX1RJVExFLFxuICAgICAgICAgICAgUExPVF9TVUJUSVRMRSxcbiAgICAgICAgICAgIFBMT1RfQ0FQVElPTixcbiAgICAgICAgICAgIEFYSVNfVElUTEVfWCxcbiAgICAgICAgICAgIEFYSVNfVElUTEVfWSxcbiAgICAgICAgICAgIEFYSVNfVEVYVF9YLFxuICAgICAgICAgICAgQVhJU19URVhUX1ksXG4gICAgICAgICAgICBBWElTX1RPT0xUSVBfVEVYVF9YLFxuICAgICAgICAgICAgQVhJU19UT09MVElQX1RFWFRfWSxcbiAgICAgICAgICAgIEZBQ0VUX1NUUklQX1RFWFQsXG4gICAgICAgICAgICBMRUdFTkRfVEVYVCxcbiAgICAgICAgICAgIExFR0VORF9USVRMRSxcbiAgICAgICAgICAgIFRPT0xUSVBfVEVYVCxcbiAgICAgICAgICAgIFRPT0xUSVBfVElUTEVfVEVYVCxcbiAgICAgICAgKVxuICAgIH1cbn0iLCIvKlxuICogQ29weXJpZ2h0IChjKSAyMDIxLiBKZXRCcmFpbnMgcy5yLm8uXG4gKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSB0aGUgTUl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ExJTkUgdG8gbWFwT2YoXG4gICAgICAgICAgICAgICAgRWxlbS5DT0xPUiB0byBDb2xvci5CTFVFLFxuICAgICAgICAgICAgICAgIEVsZW0uU0laRSB0byAxLjAsXG4gICAgICAgICAgICApLFxuICAgICAgICAgICAgUkVDVCB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkNPTE9SIHRvIENvbG9yLkJMVUUsXG4gICAgICAgICAgICAgICAgRWxlbS5GSUxMIHRvIENvbG9yLkxJR0hUX0JMVUUsXG4gICAgICAgICAgICAgICAgRWxlbS5TSVpFIHRvIDEuMCxcbiAgICAgICAgICAgICksXG4gICAgICAgICAgICBURVhUIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uQ09MT1IgdG8gQ29sb3IuQkxVRSxcbiAgICAgICAgICAgICAgICBFbGVtLlNJWkUgdG8gRGVmYXVsdHMuRk9OVF9TTUFMTCxcbiAgICAgICAgICAgICAgICBFbGVtLkZPTlRfRkFDRSB0byBGb250RmFjZS5OT1JNQUwsXG4gICAgICAgICAgICAgICAgRWxlbS5GT05UX0ZBTUlMWSB0byBEZWZhdWx0cy5GT05UX0ZBTUlMWV9OT1JNQUwsXG4vLyAgICAgICAgICAgICAgICBFbGVtLkZPTlRfTU9OT1NQQUNFRCB0byBEZWZhdWx0cy5GT05UX0ZBTUlMWV9OT1JNQUwubW9ub3NwYWNlZCxcbiAgICAgICAgICAgICAgICBFbGVtLkhKVVNUIHRvIDAuMCxcbiAgICAgICAgICAgICAgICBFbGVtLlZKVVNUIHRvIDAuNSxcbiAgICAgICAgICAgICksXG4gICAgICAgICAgICBUSVRMRSB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLlNJWkUgdG8gRGVmYXVsdHMuRk9OVF9NRURJVU0sXG4gICAgICAgICAgICAgICAgRWxlbS5NYXJnaW4uVE9QIHRvIDQuMCxcbiAgICAgICAgICAgICAgICBFbGVtLk1hcmdpbi5SSUdIVCB0byAwLjAsXG4gICAgICAgICAgICAgICAgRWxlbS5NYXJnaW4uQk9UVE9NIHRvIDQuMCxcbiAgICAgICAgICAgICAgICBFbGVtLk1hcmdpbi5MRUZUIHRvIDAuMFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICAgIFBMT1RfVElUTEUgdG8gbWFwT2YoXG4gICAgICAgICAgICAgICAgRWxlbS5TSVpFIHRvIERlZmF1bHRzLkZPTlRfTEFSR0VcbiAgICAgICAgICAgICksXG4gICAgICAgICAgICBQTE9UX1NVQlRJVExFIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uU0laRSB0byBEZWZhdWx0cy5GT05UX01FRElVTVxuICAgICAgICAgICAgKSxcbiAgICAgICAgICAgIFBMT1RfQ0FQVElPTiB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkhKVVNUIHRvIDEuMCxcbiAgICAgICAgICAgICAgICBFbGVtLlNJWkUgdG8gRGVmYXVsdHMuRk9OVF9TTUFMTFxuICAgICAgICAgICAgKSxcbi8vICAgICAgICAgICAgVEVYVF9XSURUSF9GQUNUT1IgdG8gMS4wLFxuICAgICAgICAgICAgUEFORUxfQk9SREVSX1JFQ1QgdG8gRUxFTUVOVF9CTEFOSyxcblxuICAgICAgICAgICAgUExPVF9CS0dSX1JFQ1QgdG8gbWFwT2YoXG4gICAgICAgICAgICAgICAgRWxlbS5GSUxMIHRvIENvbG9yLldISVRFLFxuICAgICAgICAgICAgICAgIEVsZW0uU0laRSB0byAwLjAsXG4gICAgICAgICAgICApLFxuXG4gICAgICAgICAgICBMRUdFTkRfQktHUl9SRUNUIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uRklMTCB0byBDb2xvci5XSElURSxcbiAgICAgICAgICAgICAgICBFbGVtLlNJWkUgdG8gMC4wLFxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgQVhJU19PTlRPUCB0byBmYWxzZSxcbiAgICAgICAgICAgIEFYSVNfVElDS1NfTEVOR1RIIHRvIDQuMCxcblxuICAgICAgICAgICAgQVhJU19URVhUIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uTWFyZ2luLlRPUCB0byAzLjAsXG4gICAgICAgICAgICAgICAgRWxlbS5NYXJnaW4uUklHSFQgdG8gMy4wLFxuICAgICAgICAgICAgICAgIEVsZW0uTWFyZ2luLkJPVFRPTSB0byAwLjAsXG4gICAgICAgICAgICAgICAgRWxlbS5NYXJnaW4uTEVGVCB0byAwLjBcbiAgICAgICAgICAgICksXG5cbiAgICAgICAgICAgIEFYSVNfVElUTEUgdG8gbWFwT2YoXG4gICAgICAgICAgICAgICAgRWxlbS5TSVpFIHRvIERlZmF1bHRzLkZPTlRfTUVESVVNLFxuICAgICAgICAgICAgICAgIEVsZW0uSEpVU1QgdG8gMC41LFxuICAgICAgICAgICAgICAgIEVsZW0uTWFyZ2luLlRPUCB0byA0LjAsXG4gICAgICAgICAgICAgICAgRWxlbS5NYXJnaW4uUklHSFQgdG8gNC4wLFxuICAgICAgICAgICAgICAgIEVsZW0uTWFyZ2luLkJPVFRPTSB0byA0LjAsXG4gICAgICAgICAgICAgICAgRWxlbS5NYXJnaW4uTEVGVCB0byA0LjBcbiAgICAgICAgICAgICksXG5cbiAgICAgICAgICAgIFBBTkVMX0dSSURfTUlOT1IgdG8gbWFwT2YoXG4gICAgICAgICAgICAgICAgRWxlbS5TSVpFIHRvIDAuNSxcbiAgICAgICAgICAgICksXG5cbiAgICAgICAgICAgIC8vIExlZ2VuZFxuICAgICAgICAgICAgTEVHRU5EX1RJVExFIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uU0laRSB0byBEZWZhdWx0cy5GT05UX01FRElVTVxuICAgICAgICAgICAgKSxcbiAgICAgICAgICAgIExFR0VORF9QT1NJVElPTiB0byBMZWdlbmRQb3NpdGlvbi5SSUdIVCxcbiAgICAgICAgICAgIExFR0VORF9KVVNUSUZJQ0FUSU9OIHRvIExlZ2VuZEp1c3RpZmljYXRpb24uQ0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WSxcbiAgICAgICAgICAgICAgICBFbGVtLkZJTEwgdG8gTElHSFRfR1JFWVxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgVEVYVCB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkNPTE9SIHRvIERBUktfR1JFWVxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgUEFORUxfQktHUl9SRUNUIHRvIEVMRU1FTlRfQkxBTkssXG4gICAgICAgICAgICBQQU5FTF9HUklEX01JTk9SIHRvIEVMRU1FTlRfQkxBTkssXG4gICAgICAgICAgICBQQU5FTF9HUklEIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uQ09MT1IgdG8gTElHSFRfR1JFWVxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgQVhJU19MSU5FX1kgdG8gRUxFTUVOVF9CTEFOSyxcbiAgICAgICAgICAgIEFYSVNfVElDS1NfWSB0byBFTEVNRU5UX0JMQU5LLFxuICAgICAgICAgICAgQVhJUyB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkNPTE9SIHRvIERBUktfR1JFWVxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgQVhJU19UT09MVElQIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uQ09MT1IgdG8gUExPVF9CQUNLR1JPVU5ELFxuICAgICAgICAgICAgICAgIEVsZW0uRklMTCB0byBEQVJLX0dSRVksXG4gICAgICAgICAgICApLFxuXG4gICAgICAgICAgICBGQUNFVF9TVFJJUF9CR1JfUkVDVCB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkJMQU5LIHRvIHRydWUsXG4gICAgICAgICAgICApLFxuICAgICAgICApXG4gICAgfVxufSIsIi8qXG4gKiBDb3B5cmlnaHQgKGMpIDIwMjEuIEpldEJyYWlucyBzLnIuby5cbiAqIFVzZSBvZiB0aGlzIHNvdXJjZSBjb2RlIGlzIGdvdmVybmVkIGJ5IHRoZSBNSVQgbGlj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ICAgcHJpdmF0ZSB2YWwgREFSS19HUkVZOiBDb2xvciA9IENvbG9yLnBhcnNlSGV4KFwiIzQ3NDc0N1wiKVxuICAgICAgICBwcml2YXRlIHZhbCBMSUdIVF9HUkVZOiBDb2xvciA9IENvbG9yLnBhcnNlSGV4KFwiI0U5RTlFOVwiKVxuXG4gICAgICAgIHByaXZhdGUgdmFsIFZBTFVFUzogTWFwPFN0cmluZywgQW55PiA9IFRoZW1lVmFsdWVzQmFzZSgpICsgbWFwT2YoXG5cbiAgICAgICAgICAgIExJTkUgdG8gbWFwT2YoXG4gICAgICAgICAgICAgICAgRWxlbS5DT0xPUiB0byBEQVJLX0dSRVlcbiAgICAgICAgICAgICksXG5cbiAgICAgICAgICAgIFJFQ1QgdG8gbWFwT2YoXG4gICAgICAgICAgICAgICAgRWxlbS5DT0xPUiB0byBEQVJLX0dSRVksXG4gICAgICAgICAgICAgICAgRWxlbS5GSUxMIHRvIExJR0hUX0dSRVlcbiAgICAgICAgICAgICksXG5cbiAgICAgICAgICAgIFRFWFQgdG8gbWFwT2YoXG4gICAgICAgICAgICAgICAgRWxlbS5DT0xPUiB0byBEQVJLX0dSRVlcbiAgICAgICAgICAgICksXG5cbiAgICAgICAgICAgIFBBTkVMX0JLR1JfUkVDVCB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkZJTEwgdG8gUExPVF9CQUNLR1JPVU5ELFxuICAgICAgICAgICAgICAgIEVsZW0uQ09MT1IgdG8gUEFORUxfQk9SREVSXG4gICAgICAgICAgICApLFxuICAgICAgICAgICAgUEFORUxfR1JJRCB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkNPTE9SIHRvIExJR0hUX0dSRVlcbiAgICAgICAgICAgICksXG4gICAgICAgICAgICBUaGVtZU9wdGlvbi5QQU5FTF9HUklEX01BSk9SIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uU0laRSB0byAxLjQsXG4gICAgICAgICAgICApLFxuICAgICAgICAgICAgVGhlbWVPcHRpb24uUEFORUxfR1JJRF9NSU5PUiB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLlNJWkUgdG8gMC41LFxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgQVhJU19MSU5FIHRvIEVMRU1FTlRfQkxBTkssXG4gICAgICAgICAgICBBWElTIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uQ09MT1IgdG8gUEFORUxfQk9SREVSXG4gICAgICAgICAgICApLFxuXG4gICAgICAgICAgICBBWElTX1RPT0xUSVAgdG8gbWFwT2YoXG4gICAgICAgICAgICAgICAgRWxlbS5DT0xPUiB0byBQTE9UX0JBQ0tHUk9VTkQsXG4gICAgICAgICAgICAgICAgRWxlbS5GSUxMIHRvIERBUktfR1JFWSxcbiAgICAgICAgICAgICksXG5cbiAgICAgICAgICAgIC8vIEZhY2V0c1xuICAgICAgICAgICAgRkFDRVRfU1RSSVBfQkdSX1JFQ1QgdG8gbWFwT2YoXG4gICAgICAgICAgICAgICAgRWxlbS5GSUxMIHRvIFNUUklQX0JBQ0tHUk9VTkQsXG4gICAgICAgICAgICAgICAgRWxlbS5DT0xPUiB0byBQQU5FTF9CT1JERVIsXG4gICAgICAgICAgICApLFxuICAgICAgICApXG4gICAgfVxufSIsIi8qXG4gKiBDb3B5cmlnaHQgKGMpIDIwMjEuIEpldEJyYWlucyBzLnIuby5cbiAqIFVzZSBvZiB0aGlzIHNvdXJjZSBjb2RlIGlzIGdvdmVybmVkIGJ5IHRoZSBNSVQgbGljZW5zZSB0aGF0IGNhbiBiZSBmb3VuZCBpbiB0aGUgTElDRU5TRSBmaWxlLlxuICovXG5cbnBhY2thZ2UgamV0YnJhaW5zLmRhdGFsb3JlLnBsb3QuYnVpbGRlci5kZWZhdWx0VGhlbWUudmFsdWVzXG5cbmltcG9ydCBqZXRicmFpbnMuZGF0YWxvcmUuYmFzZS52YWx1ZXMuQ29sb3JcbmltcG9ydCBqZXRicmFpbnMuZGF0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hUXG5cbmNsYXNzIFRoZW1lVmFsdWVzUkNsYXNzaWMgOiBUaGVtZVZhbHVlcyhWQUxVRVMpIHtcblxuICAgIGNvbXBhbmlvbiBvYmplY3Qge1xuXG4gICAgICAgIHByaXZhdGUgdmFsIFBMT1RfQkFDS0dST1VORCA9IENvbG9yLldISVRFXG5cbiAgICAgICAgcHJpdmF0ZSB2YWwgQkxBQ0s6IENvbG9yID0gQ29sb3IucGFyc2VIZXgoXCIjMTcxNzE3XCIpXG4gICAgICAgIHByaXZhdGUgdmFsIERBUktfR1JFWTogQ29sb3IgPSBDb2xvci5wYXJzZUhleChcIiM0NzQ3NDdcIilcbiAgICAgICAgcHJpdmF0ZSB2YWwgTElHSFRfR1JFWTogQ29sb3IgPSBDb2xvci5wYXJzZUhleChcIiNFOUU5RTlcIilcblxuLy8gICAgICAgIHByaXZhdGUgdmFsIEJMQUNLOiBDb2xvciA9IENvbG9yLkdSRUVOXG4vLyAgICAgICAgcHJpdmF0ZSB2YWwgREFSS19HUkVZOiBDb2xvciA9IENvbG9yLlJFRFxuLy8gICAgICAgIHByaXZhdGUgdmFsIExJR0hUX0dSRVk6IENvbG9yID0gQ29sb3IuT1JBTkdFXG5cbiAgICAgICAgcHJpdmF0ZSB2YWwgVkFMVUVTOiBNYXA8U3RyaW5nLCBBbnk+ID0gVGhlbWVWYWx1ZXNCYXNlKCkgKyBtYXBPZihcblxuICAgICAgICAgICAgTElORSB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkNPTE9SIHRvIERBUktfR1JFWVxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgUkVDVCB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkNPTE9SIHRvIERBUktfR1JFWVxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgVEVYVCB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkNPTE9SIHRvIERBUktfR1JFWVxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgUEFORUxfQktHUl9SRUNUIHRvIEVMRU1FTlRfQkxBTkssXG4gICAgICAgICAgICBQQU5FTF9HUklEIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uQkxBTksgdG8gdHJ1ZSxcbiAgICAgICAgICAgICAgICBFbGVtLkNPTE9SIHRvIExJR0hUX0dSRVlcbiAgICAgICAgICAgICksXG5cbiAgICAgICAgICAgIEFYSVMgdG8gbWFwT2YoXG4gICAgICAgICAgICAgICAgRWxlbS5DT0xPUiB0byBEQVJLX0dSRVlcbiAgICAgICAgICAgICksXG5cbiAgICAgICAgICAgIEFYSVNfVE9PTFRJUCB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkNPTE9SIHRvIFBMT1RfQkFDS0dST1VORCxcbiAgICAgICAgICAgICAgICBFbGVtLkZJTEwgdG8gREFSS19HUkVZLFxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgRkFDRVRfU1RSSVBfQkdSX1JFQ1QgdG8gbWFwT2YoXG4gICAgICAgICAgICAgICAgRWxlbS5GSUxMIHRvIFBMT1RfQkFDS0dST1VORCxcbiAgICAgICAgICAgICksXG4gICAgICAgIClcbiAgICB9XG59IiwiLypcbiAqIENvcHlyaWdodCAoYykgMjAyMS4gSmV0QnJhaW5zIHMuci5vLlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgdGhlIE1JVCBsaWNlbnNlIHRoYXQgY2FuIGJlIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUuXG4gKi9cblxucGFja2FnZSBqZXRicmFpbnMuZGF0YWxvcmUucGxvdC5idWlsZGVyLmRlZmF1bHRUaGVtZS52YWx1ZXNcblxuaW1wb3J0IGpldGJyYWlucy5kYXRhbG9yZS5iYXNlLnZhbHVlcy5Db2xvclxuaW1wb3J0IGpldGJyYWlucy5kYXRhbG9yZS5wbG90LmJ1aWxkZXIuZGVmYXVsdFRoZW1lLnZhbHVlcy5UaG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QkxBQ0s6IENvbG9yID0gQ29sb3IuR1JFRU5cbi8vICAgICAgICBwcml2YXRlIHZhbCBEQVJLX0dSRVk6IENvbG9yID0gQ29sb3IuUkVEXG4vLyAgICAgICAgcHJpdmF0ZSB2YWwgTElHSFRfR1JFWTogQ29sb3IgPSBDb2xvci5PUkFOR0VcblxuICAgICAgICBwcml2YXRlIHZhbCBWQUxVRVM6IE1hcDxTdHJpbmcsIEFueT4gPSBUaGVtZVZhbHVlc0Jhc2UoKSArIG1hcE9mKFxuICAgICAgICAgICAgTElORSB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkNPTE9SIHRvIERBUktfR1JFWVxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgUkVDVCB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkNPTE9SIHRvIERBUktfR1JFWVxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgVEVYVCB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkNPTE9SIHRvIERBUktfR1JFWVxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgLy8gUGFuZWwgKG5vIGJvcmRlcilcbiAgICAgICAgICAgIFBBTkVMX0JLR1JfUkVDVCB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkZJTEwgdG8gUEFORUxfQkFDS0dST1VORCxcbiAgICAgICAgICAgICAgICBFbGVtLlNJWkUgdG8gMC4wLFxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgLy8gR3JpZFxuICAgICAgICAgICAgUEFORUxfR1JJRCB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkNPTE9SIHRvIFBMT1RfQkFDS0dST1VORCxcbiAgICAgICAgICAgICksXG4gICAgICAgICAgICBQQU5FTF9HUklEX01BSk9SIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uU0laRSB0byAxLjQsXG4gICAgICAgICAgICApLFxuICAgICAgICAgICAgUEFORUxfR1JJRF9NSU5PUiB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLlNJWkUgdG8gMC41LFxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgLy8gQXhpc1xuICAgICAgICAgICAgQVhJUyB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkNPTE9SIHRvIERBUktfR1JFWVxuICAgICAgICAgICAgKSxcbiAgICAgICAgICAgIEFYSVNfTElORSB0byBFTEVNRU5UX0JMQU5LLFxuICAgICAgICAgICAgQVhJU19USUNLUyB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLlNJWkUgdG8gMS40XG4gICAgICAgICAgICApLFxuXG4gICAgICAgICAgICBBWElTX1RPT0xUSVAgdG8gbWFwT2YoXG4gICAgICAgICAgICAgICAgRWxlbS5DT0xPUiB0byBQTE9UX0JBQ0tHUk9VTkQsXG4gICAgICAgICAgICAgICAgRWxlbS5GSUxMIHRvIERBUktfR1JFWSxcbiAgICAgICAgICAgICksXG5cbiAgICAgICAgICAgIC8vIEZhY2V0c1xuICAgICAgICAgICAgRkFDRVRfU1RSSVBfQkdSX1JFQ1QgdG8gbWFwT2YoXG4gICAgICAgICAgICAgICAgRWxlbS5GSUxMIHRvIFNUUklQX0JBQ0tHUk9VTkQsXG4gICAgICAgICAgICAgICAgRWxlbS5TSVpFIHRvIDAuMCxcbiAgICAgICAgICAgICksXG4gICAgICAgIClcbiAgICB9XG59IiwiLypcbiAqIENvcHlyaWdodCAoYykgMjAyMS4gSmV0QnJhaW5zIHMuci5vLlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgdGhlIE1JVCBsaWNlbnNlIHRoYXQgY2FuIGJlIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUuXG4gKi9cblxucGFja2FnZSBqZXRicmFpbnMuZGF0YWxvcmUucGxvdC5idWlsZGVyLmRlZmF1bHRUaGVtZS52YWx1ZXNcblxuaW1wb3J0IGpldGJy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AgICBwcml2YXRlIHZhbCBMSUdIVF9HUkVZOiBDb2xvciA9IENvbG9yLk9SQU5HRVxuXG4gICAgICAgIHByaXZhdGUgdmFsIFZBTFVFUzogTWFwPFN0cmluZywgQW55PiA9IFRoZW1lVmFsdWVzQmFzZSgpICsgbWFwT2YoXG5cbiAgICAgICAgICAgIExJTkUgdG8gbWFwT2YoXG4gICAgICAgICAgICAgICAgRWxlbS5DT0xPUiB0byBEQVJLX0dSRVlcbiAgICAgICAgICAgICksXG5cbiAgICAgICAgICAgIFJFQ1QgdG8gbWFwT2YoXG4gICAgICAgICAgICAgICAgRWxlbS5DT0xPUiB0byBEQVJLX0dSRVksXG4gICAgICAgICAgICAgICAgRWxlbS5GSUxMIHRvIExJR0hUX0dSRVlcbiAgICAgICAgICAgICksXG5cbiAgICAgICAgICAgIFRFWFQgdG8gbWFwT2YoXG4gICAgICAgICAgICAgICAgRWxlbS5DT0xPUiB0byBEQVJLX0dSRVlcbiAgICAgICAgICAgICksXG5cbiAgICAgICAgICAgIFBBTkVMX0JLR1JfUkVDVCB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkZJTEwgdG8gUExPVF9CQUNLR1JPVU5ELFxuICAgICAgICAgICAgICAgIEVsZW0uQ09MT1IgdG8gUEFORUxfQk9SREVSXG4gICAgICAgICAgICApLFxuICAgICAgICAgICAgUEFORUxfR1JJRCB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkNPTE9SIHRvIExJR0hUX0dSRVlcbiAgICAgICAgICAgICksXG5cbiAgICAgICAgICAgIEFYSVNfTElORSB0byBFTEVNRU5UX0JMQU5LLFxuICAgICAgICAgICAgQVhJUyB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkNPTE9SIHRvIFBBTkVMX0JPUkRFUlxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgQVhJU19UT09MVElQIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uQ09MT1IgdG8gUEx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VxuXG4gICAgICAgIHByaXZhdGUgdmFsIEJMQUNLOiBDb2xvciA9IENvbG9yLnBhcnNlSGV4KFwiIzE3MTcxN1wiKVxuICAgICAgICBwcml2YXRlIHZhbCBEQVJLX0dSRVk6IENvbG9yID0gQ29sb3IucGFyc2VIZXgoXCIjNDc0NzQ3XCIpXG4gICAgICAgIHByaXZhdGUgdmFsIExJR0hUX0dSRVk6IENvbG9yID0gQ29sb3IucGFyc2VIZXgoXCIjRTlFOUU5XCIpXG5cbi8vICAgICAgICBwcml2YXRlIHZhbCBCTEFDSzogQ29sb3IgPSBDb2xvci5HUkVFTlxuLy8gICAgICAgIHByaXZhdGUgdmFsIERBUktfR1JFWTogQ29sb3IgPSBDb2xvci5SRURcbi8vICAgICAgICBwcml2YXRlIHZhbCBMSUdIVF9HUkVZOiBDb2xvciA9IENvbG9yLk9SQU5HRVxuXG4gICAgICAgIHByaXZhdGUgdmFsIFZBTFVFUzogTWFwPFN0cmluZywgQW55PiA9IFRoZW1lVmFsdWVzQmFzZSgpICsgbWFwT2YoXG5cbiAgICAgICAgICAgIExJTkUgdG8gbWFwT2YoXG4gICAgICAgICAgICAgICAgRWxlbS5DT0xPUiB0byBEQVJLX0dSRVlcbiAgICAgICAgICAgICksXG5cbiAgICAgICAgICAgIFJFQ1QgdG8gbWFwT2YoXG4gICAgICAgICAgICAgICAgRWxlbS5DT0xPUiB0byBEQVJLX0dSRVksXG4gICAgICAgICAgICAgICAgRWxlbS5GSUxMIHRvIExJR0hUX0dSRVlcbiAgICAgICAgICAgICksXG5cbiAgICAgICAgICAgIFRFWFQgdG8gbWFwT2YoXG4gICAgICAgICAgICAgICAgRWxlbS5DT0xPUiB0byBEQVJLX0dSRVlcbiAgICAgICAgICAgICksXG5cbiAgICAgICAgICAgIFBBTkVMX0JLR1JfUkVDVCB0byBFTEVNRU5UX0JMQU5LLFxuICAgICAgICAgICAgUEFORUxfR1JJRCB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkNPTE9SIHRvIExJR0hUX0dSRVlcbiAgICAgICAgICAgICksXG5cbiAgICAgICAgICAgIEFYSVNfTElORSB0byBFTEVNRU5UX0JMQU5LLFxuICAgICAgICAgICAgQVhJU19USUNLUyB0byBFTEVNRU5UX0JMQU5LLFxuICAgICAgICAgICAgQVhJUyB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkNPTE9SIHRvIERBUktfR1JFWVxuICAgICAgICAgICAgKSxcblxuICAgICAgICAgICAgQVhJU19UT09MVElQIHRvIG1hcE9mKFxuICAgICAgICAgICAgICAgIEVsZW0uQ09MT1IgdG8gUExPVF9CQUNLR1JPVU5ELFxuICAgICAgICAgICAgICAgIEVsZW0uRklMTCB0byBEQVJLX0dSRVksXG4gICAgICAgICAgICApLFxuXG4gICAgICAgICAgICBGQUNFVF9TVFJJUF9CR1JfUkVDVCB0byBtYXBPZihcbiAgICAgICAgICAgICAgICBFbGVtLkJMQU5LIHRvIHRydWUsXG4gICAgICAgICAgICApLFxuICAgICAgICApXG4gICAgfVxufSIsIi8qXG4gKiBDb3B5cmlnaHQgKGMpIDIwMTkuIEpldEJyYWlucyBzLnIuby5cbiAqIFVzZSBvZiB0aGlzIHNvdXJjZSBjb2RlIGlzIGdvdmVybmVkIGJ5IHRoZSBNSVQgbGljZW5zZSB0aGF0IGNhbiBiZSBmb3VuZCBpbiB0aGUgTElDRU5TRSBmaWxlLlxuICovXG5cbnBhY2thZ2UgamV0YnJhaW5zLmRhdGFsb3JlLnBsb3QuYnVpbGRlci5ldmVudFxuXG5pbXBvcnQgamV0YnJhaW5zLmRhdGFsb3JlLmJhc2UuZXZlbnQuTW91c2VFdmVudFxuaW1wb3J0IGpldGJyYWlucy5kYXRhbG9yZS5iYXNlLmV2ZW50Lk1vdXNlRXZlbnRTb3VyY2VcbmltcG9ydCBqZXRicmFpbnMuZGF0YWxvcmUuYmFzZS5ldmVudC5Nb3VzZUV2ZW50U3BlY1xuaW1wb3J0IGpldGJyYWlucy5kYXRh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bmVycygpXG4gICAgICAgICAgICBvbkFkZFNwZWMoZXZlbnRTcGVjKVxuICAgICAgICB9XG5cbiAgICAgICAgdmFsIGFkZFJlZyA9IG15RXZlbnRIYW5kbGVyc1tldmVudFNwZWNdPy5hZGQoZXZlbnRIYW5kbGVyKVxuICAgICAgICByZXR1cm4gb2JqZWN0IDogUmVnaXN0cmF0aW9uKCkge1xuICAgICAgICAgICAgb3ZlcnJpZGUgZnVuIGRvUmVtb3ZlKCkge1xuICAgICAgICAgICAgICAgIGFkZFJlZz8ucmVtb3ZlKClcbiAgICAgICAgICAgICAgICBpZiAobXlFdmVudEhhbmRsZXJzW2V2ZW50U3BlY10hIS5pc0VtcHR5KSB7XG4gICAgICAgICAgICAgICAgICAgIG15RXZlbnRIYW5kbGVycy5yZW1vdmUoZXZlbnRTcGVjKVxuICAgICAgICAgICAgICAgICAgICBvblJlbW92ZVNwZWMoZXZlbnRTcGVjKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGZ1biBkaXNwYXRjaChldmVudFNwZWM6IE1vdXNlRXZlbnRTcGVjLCBtb3VzZUV2ZW50OiBNb3VzZUV2ZW50KSB7XG4gICAgICAgIGlmIChteUV2ZW50SGFuZGxlcnMuY29udGFpbnNLZXkoZXZlbnRTcGVjKSkge1xuICAgICAgICAgICAgbXlFdmVudEhhbmRsZXJzW2V2ZW50U3BlY10/LmZpcmUob2JqZWN0IDogTGlzdGVuZXJDYWxsZXI8RXZlbnRIYW5kbGVyPE1vdXNlRXZlbnQ+PiB7XG4gICAgICAgICAgICAgICAgb3ZlcnJpZGUgZnVuIGNhbGwobDogRXZlbnRIYW5kbGVyPE1vdXNlRXZlbnQ+KSB7XG4gICAgICAgICAgICAgICAgICAgIGwub25FdmVudChtb3VzZUV2ZW50KVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBmdW4gY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mbyxcbiAgICAgICAgICAgICAgICBoaWRlQXhpcyA9ICFkcmF3SEF4aXMsXG4gICAgICAgICAgICAgICAgaGlkZUF4aXNCcmVha3MgPSAhbGF5b3V0SW5mby5oQXhpc1Nob3duLFxuICAgICAgICAgICAgICAgIGhpZGVHcmlkbGluZXMgPSAhZHJhd0dyaWRsaW5lcyxcbiAgICAgICAgICAgICAgICBjb29yZCxcbiAgICAgICAgICAgICAgICBmbGlwQXhpcyxcbiAgICAgICAgICAgICAgICBoQXhpc1RoZW1lLFxuICAgICAgICAgICAgICAgIGhHcmlkVGhlbWUsXG4gICAgICAgICAgICAgICAgZ3JpZExpbmVMZW5ndGggPSBnZW9tQm91bmRzLmhlaWdodCxcbiAgICAgICAgICAgICAgICBncmlkTGluZURpc3RhbmNlID0gZ3JpZExpbmVEaXN0YW5jZShnZW9tQm91bmRzLCBnZW9tT3V0ZXJCb3VuZHMsIGF4aXNJbmZvLm9yaWVudGF0aW9uKSxcbiAgICAgICAgICAgICAgICBpc0RlYnVnRHJhd2luZ1xuICAgICAgICAgICAgKVxuXG4gICAgICAgICAgICB2YWwgYXhpc09yaWdpbiA9IG1hcmdpbnNMYXlvdXQudG9BeGlzT3JpZ2luKGdlb21Cb3VuZHMsIGF4aXNJbmZvLm9yaWVudGF0aW9uKVxuICAgICAgICAgICAgaEF4aXMubW92ZVRvKGF4aXNPcmlnaW4pXG4gICAgICAgICAgICBwYXJlbnQuYWRkKGhBeGlzKVxuICAgICAgICB9XG5cblxuICAgICAgICBpZiAoZHJhd1ZBeGlzIHx8IGRyYXdHcmlkbGluZXMpIHtcbiAgICAgICAgICAgIC8vIFktYXhpc1xuICAgICAgICAgICAgdmFsIGF4aXNJbmZvID0gbGF5b3V0SW5mby52QXhpc0luZm8hIVxuICAgICAgICAgICAgdmFsIHZBeGlzID0gYnVpbGRBeGlzKFxuICAgICAgICAgICAgICAgIHZTY2FsZUJyZWFrcyxcbiAgICAgICAgICAgICAgICBheGlzSW5mbyxcbiAgICAgICAgICAgICAgICBoaWRlQXhpcyA9ICFkcmF3VkF4aXMsXG4gICAgICAgICAgICAgICAgaGlkZUF4aXNCcmVha3MgPSAhbGF5b3V0SW5mby52QXhpc1Nob3duLFxuICAgICAgICAgICAgICAgIGhpZGVHcmlkbGluZXMgPSAhZHJhd0dyaWRsaW5lcyxcbiAgICAgICAgICAgICAgICBjb29yZCxcbiAgICAgICAgICAgICAgICBmbGlwQXhpcyxcbiAgICAgICAgICAgICAgICB2QXhpc1RoZW1lLFxuICAgICAgICAgICAgICAgIHZHcmlkVGhlbWUsXG4gICAgICAgICAgICAgICAgZ3JpZExpbmVMZW5ndGggPSBnZW9tQm91bmRzLndpZHRoLFxuICAgICAgICAgICAgICAgIGdyaWRMaW5lRGlzdGFuY2UgPSBncmlkTGluZURpc3RhbmNlKGdlb21Cb3VuZHMsIGdlb21PdXRlckJvdW5kcywgYXhpc0luZm8ub3JpZW50YXRpb24pLFxuICAgICAgICAgICAgICAgIGlzRGVidWdEcmF3aW5nXG4gICAgICAgICAgICApXG5cbiAgICAgICAgICAgIHZhbCBheGlzT3JpZ2luID0gbWFyZ2luc0xheW91dC50b0F4aXNPcmlnaW4oZ2VvbUJvdW5kcywgYXhpc0luZm8ub3JpZW50YXRpb24pXG4gICAgICAgICAgICB2QXhpcy5tb3ZlVG8oYXhpc09yaWdpbilcbiAgICAgICAgICAgIHBhcmVudC5hZGQodkF4aXMpXG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZHJhd1BhbmVsQm9yZGVyKSB7XG4gICAgICAgICAgICB2YWwgcGFuZWxCb3JkZXIgPSBidWlsZFBhbmVsQm9yZGVyQ29tcG9uZW50KGdlb21Cb3VuZHMsIHBhbmVsVGhlbWUpXG4gICAgICAgICAgICBwYXJlbnQuYWRkKHBhbmVsQm9yZGVyKVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGlzRGVidWdEcmF3aW5nICYmICFiZWZvcmVHZW9tTGF5ZXIpIHtcbiAgICAgICAgICAgIGR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gIGluZm86IEF4aXNMYXlvdXRJbmZvLFxuICAgICAgICAgICAgaGlkZUF4aXM6IEJvb2xlYW4sXG4gICAgICAgICAgICBoaWRlQXhpc0JyZWFrczogQm9vbGVhbixcbiAgICAgICAgICAgIGhpZGVHcmlkbGluZXM6IEJvb2xlYW4sXG4gICAgICAgICAgICBjb29yZDogQ29vcmRpbmF0ZVN5c3RlbSxcbiAgICAgICAgICAgIGZsaXBBeGlzOiBCb29sZWFuLFxuICAgICAgICAgICAgYXhpc1RoZW1lOiBBeGlzVGhlbWUsXG4gICAgICAgICAgICBncmlkVGhlbWU6IFBhbmVsR3JpZFRoZW1lLFxuICAgICAgICAgICAgZ3JpZExpbmVMZW5ndGg6IERvdWJsZSxcbiAgICAgICAgICAgIGdyaWRMaW5lRGlzdGFuY2U6IERvdWJsZSxcbiAgICAgICAgICAgIGlzRGVidWdEcmF3aW5nOiBCb29sZWFuXG4gICAgICAgICk6IEF4aXNDb21wb25lbnQge1xuICAgICAgICAgICAgY2hlY2soIShoaWRlQXhpcyAmJiBoaWRlR3JpZGxpbmVzKSkgeyBcIlRyeWluZyB0byBidWlsZCBhbiBlbXB0eSBheGlzIGNvbXBvbmVudFwiIH1cbiAgICAgICAgICAgIHZhbCBvcmllbnRhdGlvbiA9IGluZm8ub3JpZW50YXRpb25cbiAgICAgICAgICAgIHZhbCBsYWJlbEFkanVzdG1lbnRzID0gQXhpc0NvbXBvbmVudC5UaWNrTGFiZWxBZGp1c3RtZW50cyhcbiAgICAgICAgICAgICAgICBvcmllbnRhdGlvbiA9IG9yaWVudGF0aW9uLFxuICAgICAgICAgICAgICAgIGhvcml6b250YWxBbmNob3IgPSBpbmZvLnRpY2tMYWJlbEhvcml6b250YWxBbmNob3IsXG4gICAgICAgICAgICAgICAgdmVydGljYWxBbmNob3IgPSBpbmZvLnRpY2tMYWJlbFZlcnRpY2FsQW5jaG9yLFxuICAgICAgICAgICAgICAgIHJvdGF0aW9uRGVncmVlID0gaW5mby50aWNrTGFiZWxSb3RhdGlvbkFuZ2xlLFxuICAgICAgICAgICAgICAgIGFkZGl0aW9uYWxPZmZzZXRzID0gaW5mby50aWNrTGFiZWxBZGRpdGlvbmFsT2Zmc2V0c1xuICAgICAgICAgICAgKVxuXG4gICAgICAgICAgICB2YWwgYnJlYWtzRGF0YSA9IEF4aXNVdGlsLmJyZWFrc0RhdGEoXG4gICAgICAgICAgICAgICAgc2NhbGVCcmVha3MsXG4gICAgICAgICAgICAgICAgY29vcmQsXG4gICAgICAgICAgICAgICAgZmxpcEF4aXMsXG4gICAgICAgICAgICAgICAgb3JpZW50YXRpb24uaXNIb3Jpem9udGFsXG4gICAgICAgICAgICApXG5cbiAgICAgICAgICAgIHZhbCBheGlzID0gQXhpc0NvbXBvbmVudChcbiAgICAgICAgICAgICAgICBsZW5ndGggPSBpbmZvLmF4aXNMZW5ndGgsXG4gICAgICAgICAgICAgICAgb3JpZW50YXRpb24gPSBvcmllbnRhdGlvbixcbiAgICAgICAgICAgICAgICBicmVha3NEYXRhID0gYnJlYWtzRGF0YSxcbiAgICAgICAgICAgICAgICBsYWJlbEFkanVzdG1lbnRzID0gbGFiZWxBZGp1c3RtZW50cyxcbiAgICAgICAgICAgICAgICBncmlkTGluZUxlbmd0aCA9IGdyaWRMaW5lTGVuZ3RoLFxuICAgICAgICAgICAgICAgIGdyaWRMaW5lRGlzdGFuY2UgPSBncmlkTGluZURpc3RhbmNlLFxuICAgICAgICAgICAgICAgIGF4aXNUaGVtZSA9IGF4aXNUaGVtZSxcbiAgICAgICAgICAgICAgICBncmlkVGhlbWUgPSBncmlkVGhlbWUsXG4gICAgICAgICAgICAgICAgaGlkZUF4aXMgPSBoaWRlQXhpcyxcbiAgICAgICAgICAgICAgICBoaWRlQXhpc0JyZWFrcyA9IGhpZGVBeGlzQnJlYWtzLFxuICAgICAgICAgICAgICAgIGhpZGVHcmlkbGluZXMgPSBoaWRlR3JpZGxpbmVzXG4gICAgICAgICAgICApXG5cbiAgICAgICAgICAgIGlmIChpc0RlYnVnRHJhd2luZykge1xuICAgICAgICAgICAgICAgIGZ1biBkcmF3RGVidWdSZWN0KHI6IERvdWJsZVJlY3RhbmdsZSwgY29sb3I6IENvbG9yKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhbCByZWN0ID0gU3ZnUmVjdEVsZW1lbnQocilcbiAgICAgICAgICAgICAgICAgICAgcmVjdC5zdHJva2VDb2xvcigpLnNldChjb2xvcilcbiAgICAgICAgICAgICAgICAgICAgcmVjdC5zdHJva2VXaWR0aCgpLnNldCgxLjApXG4gICAgICAgICAgICAgICAgICAgIHJlY3QuZmlsbE9wYWNpdHkoKS5zZXQoMC4wKVxuICAgICAgICAgICAgICAgICAgICBheGlzLmFkZChyZWN0KVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBkcmF3RGVidWdSZWN0KGluZm8udGlja0xhYmVsc0JvdW5kcywgQ29sb3IuR1JFRU4pXG4gICAgICAgICAgICAgICAgaW5mby50aWNrTGFiZWxzVGV4dEJvdW5kcz8ubGV0IHsgZHJhd0RlYnVnUmVjdChpdCwgQ29sb3IuTElHSFRfQkxVRSkgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGF4aXNcbiAgICAgICAgfVxuXG4gICAgICAgIHByaXZhdGUgZnVuIGJ1aWxkUGFuZWxDb21wb25lbnQoYm91bmRzOiBEb3VibGVSZWN0YW5nbGUsIHRoZW1lOiBQYW5lbFRoZW1lKTogU3ZnUmVjdEVsZW1lbnQge1xuICAgICAgICAgICAgcmV0dXJuIFN2Z1JlY3RFbGVtZW50KGJvdW5kcykuYXBwbHkge1xuICAgICAgICAgICAgICAgIHN0cm9rZUNvbG9yKCkuc2V0KHRoZW1lLnJlY3RDb2xvcigpKVxuICAgICAgICAgICAgICAgIHN0cm9rZVdpZHRoKCkuc2V0KHRoZW1lLnJlY3RTdHJva2VXaWR0aCgpKVxuICAgICAgICAgICAgICAgIGZpbGxDb2xvcigpLnNldCh0aGVtZS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AgICAgICAgICAvLyB2YWwgZmxpcHBlZEF4aXMgPSBsYXllci5pc1lPcmllbnRhdGlvbiB4b3IgZmxpcHBlZEF4aXNcbiAgICAgICAgICAgIC8vIChYT1IgaXNzdWU6IGh0dHBzOi8veW91dHJhY2suamV0YnJhaW5zLmNvbS9pc3N1ZS9LVC01MjI5Ni9Lb3RsaW4tSlMtdGhlLXhvci1vcGVyYXRpb24tc29tZXRpbWVzLWV2YWx1YXRlcy10by1pbnQtdmFsdWUtaW5zKVxuICAgICAgICAgICAgdmFsIGZsaXBwZWRBeGlzID0gaWYgKGxheWVyLmlzWU9yaWVudGF0aW9uKSAhZmxpcHBlZEF4aXMgZWxzZSBmbGlwcGVkQXhpc1xuXG4gICAgICAgICAgICB2YWwgYWVzdGhldGljTWFwcGVycyA9IHJlbmRlcmVyRGF0YS5hZXN0aGV0aWNNYXBwZXJzXG4gICAgICAgICAgICB2YWwgYWVzdGhldGljcyA9IHJlbmRlcmVyRGF0YS5hZXN0aGV0aWNzXG5cbiAgICAgICAgICAgIEBTdXBwcmVzcyhcIk5BTUVfU0hBRE9XSU5HXCIpXG4gICAgICAgICAgICB2YWwgY29vcmQgPSB3aGVuIChsYXllci5pc1lPcmllbnRhdGlvbikge1xuICAgICAgICAgICAgICAgIHRydWUgLT4gY29vcmQuZmxpcCgpXG4gICAgICAgICAgICAgICAgZmFsc2UgLT4gY29vcmRcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgQFN1cHByZXNzKFwiTkFNRV9TSEFET1dJTkdcIilcbiAgICAgICAgICAgIHZhbCB0YXJnZXRDb2xsZWN0b3IgPSB0YXJnZXRDb2xsZWN0b3IubGV0IHtcbiAgICAgICAgICAgICAgICB3aGVuIHtcbiAgICAgICAgICAgICAgICAgICAgZmxpcHBlZEF4aXMgLT4gaXQud2l0aEZsaXBwZWRBeGlzKClcbiAgICAgICAgICAgICAgICAgICAgZWxzZSAtPiBpdFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0ubGV0IHtcbiAgICAgICAgICAgICAgICB3aGVuIHtcbiAgICAgICAgICAgICAgICAgICAgbGF5ZXIuaXNZT3JpZW50YXRpb24gLT4gaXQud2l0aFlPcmllbnRhdGlvbigpXG4gICAgICAgICAgICAgICAgICAgIGVsc2UgLT4gaXRcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhbCBjdHggPSBHZW9tQ29udGV4dEJ1aWxkZXIoKVxuICAgICAgICAgICAgICAgIC5mbGlwcGVkKGZsaXBwZWRBeGlzKVxuICAgICAgICAgICAgICAgIC5hZXN0aGV0aWNzKGFlc3RoZXRpY3MpXG4gICAgICAgICAgICAgICAgLmFlc3RoZXRpY01hcHBlcnMoYWVzdGhldGljTWFwcGVycylcbiAgICAgICAgICAgICAgICAuYWVzQm91bmRzKHh5QWVzQm91bmRzKVxuICAgICAgICAgICAgICAgIC5nZW9tVGFyZ2V0Q29sbGVjdG9yKHRhcmdldENvbGxlY3RvcilcbiAgICAgICAgICAgICAgICAuZm9udEZhbWlseVJlZ2lzdHJ5KGxheWVyLmZvbnRGYW1pbHlSZWdpc3RyeSlcbiAgICAgICAgICAgICAgICAuYW5ub3RhdGlvbnMocmVuZGVyZXJEYXRhLmFubm90YXRpb25zKVxuICAgICAgICAgICAgICAgIC5idWlsZCgpXG5cbiAgICAgICAgICAgIHZhbCBwb3MgPSByZW5kZXJlckRhdGEucG9zXG4gICAgICAgICAgICB2YWwgZ2VvbSA9IGxheWVyLmdlb21cblxuICAgICAgICAgICAgcmV0dXJuIFN2Z0xheWVyUmVuZGVyZXIoYWVzdGhldGljcywgZ2VvbSwgcG9zLCBjb29yZCwgY3R4KVxuICAgICAgICB9XG5cbiAgICAgICAgcHJpdmF0ZSBmdW4gZ3JpZExpbmVEaXN0YW5jZShcbiAgICAgICAgICAgIGdlb21Jbm5lckJvdW5kczogRG91YmxlUmVjdGFuZ2xlLFxuICAgICAgICAgICAgZ2VvbU91dGVyQm91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FpblxuICAgICAgICAgICAgICAgIE1hcmdpblNpZGUuVE9QLCBNYXJnaW5TaWRlLkJPVFRPTSAtPiBkb21haW5cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFsIG1hcmdpbkNvb3JkUHJvdmlkZXIgPSBNYXJnaW5hbExheWVyQ29vcmRQcm92aWRlcigpXG4gICAgICAgICAgICB2YWwgY2xpZW50U2l6ZSA9IHNpemVzLmdldFZhbHVlKHNpZGUpXG4gICAgICAgICAgICB2YWwgYWRqdXN0ZWREb21haW4gPSBEb3VibGVSZWN0YW5nbGUoaERvbWFpbiwgdkRvbWFpbilcbiAgICAgICAgICAgIHZhbCBjb29yZCA9IG1hcmdpbkNvb3JkUHJvdmlkZXIuY3JlYXRlQ29vcmRpbmF0ZVN5c3RlbShcbiAgICAgICAgICAgICAgICBhZGp1c3RlZERvbWFpbiA9IGFkanVzdGVkRG9tYWluLFxuICAgICAgICAgICAgICAgIGNsaWVudFNpemUgPSBjbGllbnRTaXplLFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgTWFyZ2luYWxGcmFtZU9mUmVmZXJlbmNlKFxuICAgICAgICAgICAgICAgIGJvdW5kc0J5TWFyZ2luLmdldFZhbHVlKHNpZGUpLFxuICAgICAgICAgICAgICAgIGFkanVzdGVkRG9tYWluID0gYWRqdXN0ZWREb21haW4sXG4gICAgICAgICAgICAgICAgY29vcmQsXG4gICAgICAgICAgICAgICAgZGVidWdEcmF3aW5nLFxuICAgICAgICAgICAgKVxuICAgICAgICB9XG4gICAgfVxuXG5cbiAgICBwcml2YXRlIGNsYXNzIEF4aXNTcGVjKFxuICAgICAgICB2YWwgYnJlYWtzUHJvdmlkZXJGYWN0b3J5OiBBeGlzQnJlYWtzUHJvdmlkZXJGYWN0b3J5LFxuICAgICAgICB2YWwgbGFiZWw6IFN0cmluZz8sXG4gICAgICAgIHZhbCB0aGVtZTogQXhpc1RoZW1lXG4gICAgKVxuXG4gICAgcHJpdmF0ZSBjbGFzcyBNeVRpbGVMYXlvdXRQcm92aWRlcihcbiAgICAgICAgcHJpdmF0ZSB2YWwgaEF4aXNMYXlvdXQ6IEF4aXNMYXlvdXQsXG4gICAgICAgIHByaXZhdGUgdmFsIHZBeGlzTGF5b3V0OiBBeGlzTGF5b3V0LFxuICAgICAgICBwcml2YXRlIHZhbCBhZGp1c3RlZERvbWFpbjogRG91YmxlUmVjdGFuZ2xlLFxuICAgICAgICBwcml2YXRlIHZhbCBtYXJnaW5zTGF5b3V0OiBHZW9tTWFyZ2luc0xheW91dCxcbiAgICApIDogVGlsZUxheW91dFByb3ZpZGVyIHtcbiAgICAgICAgb3ZlcnJpZGUgZnVuIGNyZWF0ZVRvcERvd25UaWxlTGF5b3V0KCk6IFRpbGVMYXlvdXQge1xuICAgICAgICAgICAgcmV0dXJuIFRvcERvd25UaWxlTGF5b3V0KFxuICAgICAgICAgICAgICAgIGhBeGlzTGF5b3V0LCB2QXhpc0xheW91dCxcbiAgICAgICAgICAgICAgICBoRG9tYWluID0gYWRqdXN0ZWREb21haW4ueFJhbmdlKCksXG4gICAgICAgICAgICAgICAgdkRvbWFpbiA9IGFkanVzdGVkRG9tYWluLnlSYW5nZSgpLFxuICAgICAgICAgICAgICAgIG1hcmdpbnNMYXlvdXRcbiAgICAgICAgICAgIClcbiAgICAgICAgfVxuXG4gICAgICAgIG92ZXJyaWRlIGZ1biBjcmVhdGVJbnNpZGVPdXRUaWxlTGF5b3V0KCk6IFRpbGVMYXlvdXQge1xuICAgICAgICAgICAgcmV0dXJuIEluc2lkZU91dFRpbGVMYXlvdXQoXG4gICAgICAgICAgICAgICAgaEF4aXNMYXlvdXQsIHZBeGlzTGF5b3V0LFxuICAgICAgICAgICAgICAgIGhEb21haW4gPSBhZGp1c3RlZERvbWFpbi54UmFuZ2UoKSxcbiAgICAgICAgICAgICAgICB2RG9tYWluID0gYWRqdXN0ZWREb21haW4ueVJhbmdlKCksXG4gICAgICAgICAgICAgICAgbWFyZ2luc0xheW91dFxuICAgICA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3JpZGxpbmVzOiBCb29sZWFuID0gZmFsc2VcbikgOiBTdmdDb21wb25lbnQoKSB7XG5cbiAgICBvdmVycmlkZSBmdW4gYnVpbGRDb21wb25lbnQoKSB7XG4gICAgICAgIGJ1aWxkQXhpcygpXG4gICAgfVxuXG4gICAgcHJpdmF0ZSBmdW4gYnVpbGRBeGlzKCkge1xuICAgICAgICB2YWwgcm9vdEVsZW1lbnQgPSByb290R3JvdXBcblxuICAgICAgICB2YWwgeDE6IERvdWJsZVxuICAgICAgICB2YWwgeTE6IERvdWJsZVxuICAgICAgICB2YWwgeDI6IERvdWJsZVxuICAgICAgICB2YWwgeTI6IERvdWJsZVxuICAgICAgICB2YWwgc3RhcnQgPSAwLjBcbiAgICAgICAgdmFsIGVuZDogRG91YmxlID0gbGVuZ3RoXG4gICAgICAgIHdoZW4gKG9yaWVudGF0aW9uKSB7XG4gICAgICAgICAgICBPcmllbnRhdGlvbi5MRUZULCBPcmllbnRhdGlvbi5SSUdIVCAtPiB7XG4gICAgICAgICAgICAgICAgeDEgPSAwLjBcbiAgICAgICAgICAgICAgICB4MiA9IDAuMFxuICAgICAgICAgICAgICAgIHkxID0gc3RhcnRcbiAgICAgICAgICAgICAgICB5MiA9IGVuZFxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgT3JpZW50YXRpb24uVE9QLCBPcmllbnRhdGlvbi5CT1RUT00gLT4ge1xuICAgICAgICAgICAgICAgIHgxID0gc3RhcnRcbiAgICAgICAgICAgICAgICB4MiA9IGVuZFxuICAgICAgICAgICAgICAgIHkxID0gMC4wXG4gICAgICAgICAgICAgICAgeTIgPSAwLjBcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIEdyaWQgbGluZXMuXG4gICAgICAgIGlmICghaGlkZUdyaWRsaW5lcykge1xuICAgICAgICAgICAgLy8gTWlub3IgZ3JpZC5cbiAgICAgICAgICAgIC8vIGRvIG5vdCBkcmF3IGdyaWQgbGluZXMgdGhlbiBpdCdzIHRvbyBjbG9zZSB0byBheGlzIGVuZHMuXG4gICAgICAgICAgICB2YWwgZ3JpZExpbmVNaW5Qb3MgPSBzdGFydCArIDZcbiAgICAgICAgICAgIHZhbCBncmlkTGluZU1heFBvcyA9IGVuZCAtIDZcblxuICAgICAgICAgICAgaWYgKGdyaWRUaGVtZS5zaG93TWlub3IoKSkge1xuICAgICAgICAgICAgICAgIGZvciAoYnIgaW4gYnJlYWtzRGF0YS5taW5vckJyZWFrcykge1xuICAgICAgICAgICAgICAgICAgICBpZiAoYnIgPj0gZ3JpZExpbmVNaW5Qb3MgJiYgYnIgPD0gZ3JpZExpbmVNYXhQb3MpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbCBlbGVtID0gYnVpbGRHcmlkTGluZShiciwgZ3JpZFRoZW1lLm1pbm9yTGluZVdpZHRoKCksIGdyaWRUaGVtZS5taW5vckxpbmVDb2xvcigpKVxuICAgICAgICAgICAgICAgICAgICAgICAgcm9vdEVsZW1lbnQuY2hpbGRyZW4oKS5hZGQoZWxlbSlcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gTWFqb3IgZ3JpZC5cbiAgICAgICAgICAgIGlmIChncmlkVGhlbWUuc2hvd01ham9yKCkpIHtcbiAgICAgICAgICAgICAgICBmb3IgKGJyIGluIGJyZWFrc0RhdGEubWFqb3JCcmVha3MpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGJyID49IGdyaWRMaW5lTWluUG9zICYmIGJyIDw9IGdyaWRMaW5lTWF4UG9zKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YWwgZWxlbSA9IGJ1aWxkR3JpZExpbmUoYnIsIGdyaWRUaGVtZS5tYWpvckxpbmVXaWR0aCgpLCBncmlkVGhlbWUubWFqb3JMaW5lQ29sb3IoKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHJvb3RFbGVtZW50LmNoaWxkcmVuKCkuYWRkKGVsZW0pXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBBeGlzXG4gICAgICAgIGlmICghaGlkZUF4aXMpIHtcbiAgICAgICAgICAgIC8vIFRpY2tzIGFuZCBsYWJlbHNcbiAgICAgICAgICAgIGlmICghaGlkZUF4aXNCcmVha3MgJiYgKGF4aXNUaGVtZS5zaG93TGFiZWxzKCkgfHwgYXhpc1RoZW1lLnNob3dUaWNrTWFya3MoKSkpIHtcbiAgICAgICAgICAgICAgICB2YWwgbGFiZWxzQ2xlYW5lciA9IFRpY2tMYWJlbHNDbGVhbmVyKG9yaWVudGF0aW9uLmlzSG9yaXpvbnRhbClcblxuICAgICAgICAgICAgICAgIGZvciAoKGksIGJyKSBpbiBicmVha3NEYXRhLm1ham9yQnJlYWtzLndpdGhJbmRleCgpKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChiciA+PSBzdGFydCAmJiBiciA8PSBlbmQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbCBsYWJlbCA9IGJyZWFrc0RhdGEubWFqb3JMYWJlbHNbaSAlIGJyZWFrc0RhdGEubWFqb3JMYWJlbHMuc2l6ZV1cbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbCBsYWJlbE9mZnNldCA9IHRpY2tMYWJlbEJhc2VPZmZzZXQoKS5hZGQobGFiZWxBZGp1c3RtZW50cy5hZGRpdGlvbmFsT2Zmc2V0KGkpKVxuICAgICAgICAgICAgICAgICAgICAgICAgdmFsIGdyb3VwID0gYnVpbGRUaWNrKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsT2Zmc2V0LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNraXBMYWJlbCA9ICFsYWJlbHNDbGVhbmVyLmJlZm9yZUFkZExhYmVsKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWxBZGp1c3RtZW50cy5yb3RhdGlvbkRlZ3JlZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUGxvdExhYmVsU3BlY0ZhY3RvcnkuYXhpc1RpY2soYXhpc1RoZW1lKS5oZWlnaHQoKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXhpc1RoZW1lXG4gICAgICAgICAgICAgICAgICAgICAgICApXG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHdoZW4gKG9yaWVudGF0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgT3JpZW50YXRpb24uTEVGVCwgT3JpZW50YXRpb24uUklHSFQgLT4gdHJhbnNmb3JtVHJhbnNsYXRlKGdyb3VwLCAwLjAsIGJyKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE9yaWVudGF0aW9uLlRPUCwgT3JpZW50YXRpb24uQk9UVE9NIC0+IHRyYW5zZm9ybVRyYW5zbGF0ZShncm91cCwgYnIsIDAuMClcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgcm9vdEVsZW1lbnQuY2hpbGRyZW4oKS5hZGQoZ3JvdXApXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIEF4aXMgbGluZVxuICAgICAgICAgICAgaWYgKCFoaWRlQXhpc0JyZWFrcyAmJiBheGlzVGhlbWUuc2hvd0xpbmUoKSkge1xuICAgICAgICAgICAgICAgIHZhbCBheGlzTGluZSA9IFN2Z0xpbmVFbGVtZW50KHgxLCB5MSwgeDIsIHkyKS5hcHBseSB7XG4gICAgICAgICAgICAgICAgICAgIHN0cm9rZVdpZHRoKCkuc2V0KGF4aXNUaGVtZS5saW5lV2lkdGgoKSlcbiAgICAgICAgICAgICAgICAgICAgc3Ryb2tlQ29sb3IoKS5zZXQoYXhpc1RoZW1lLmxpbmVDb2xvcigpKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByb290RWxlbWVudC5jaGlsZHJlbigpLmFkZChheGlzTGluZSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIHByaXZhdGUgZnVuIGJ1aWxkR3JpZExpbmUoYnI6IERvdWJsZSwgd2lkdGg6IERvdWJsZSwgY29sb3I6IENvbG9yKTogU3ZnTGluZUVsZW1lbnQge1xuICAgICAgICB2YWwgc3RhcnQgPSBncmlkTGluZURpc3RhbmNlXG4gICAgICAgIHZhbCBlbmQgPSBzdGFydCArIGdyaWRMaW5lTGVuZ3RoXG4gICAgICAgIHZhbCBlbGVtID0gd2hlbiAob3JpZW50YXRpb24pIHtcbiAgICAgICAgICAgIE9yaWVudGF0aW9uLkxFRlQgLT4gU3ZnTGluZUVsZW1lbnQoc3RhcnQsIDAuMCwgZW5kLCAwLjApXG4gICAgICAgICAgICBPcmllbnRhdGlvbi5SSUdIVCAtPiBTdmdMaW5lRWxlbWVudCgtc3RhcnQsIDAuMCwgLWVuZCwgMC4wKVxuICAgICAgICAgICAgT3JpZW50YXRpb24uVE9QIC0+IFN2Z0xpbmVFbGVtZW50KDAuMCwgc3RhcnQsIDAuMCwgZW5kKVxuICAgICAgICAgICAgT3JpZW50YXRpb24uQk9UVE9NIC0+IFN2Z0xpbmVFbGVtZW50KDAuMCwgLXN0YXJ0LCAwLjAsIC1lbmQpXG4gICAgICAgIH1cbiAgICAgICAgZWxlbS5zdHJva2VDb2xvcigpLnNldChjb2xvcilcbiAgICAgICAgZWxlbS5zdHJva2VXaWR0aCgpLnNldCh3aWR0aClcblxuICAgICAgICB3aGVuIChvcmllbnRhdGlvbikge1xuICAgICAgICAgICAgT3JpZW50YXRpb24uTEVGVCwgT3JpZW50YXRpb24uUklHSFQgLT4ge1xuICAgICAgICAgICAgICAgIGVsZW0ueTEoKS5zZXQoYnIpXG4gICAgICAgICAgICAgICAgZWxlbS55MigpLnNldChicilcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIE9yaWVudGF0aW9uLlRPUCwgT3JpZW50YXRpb24uQk9UVE9NIC0+IHtcbiAgICAgICAgICAgICAgICBlbGVtLngxKCkuc2V0KGJyKVxuICAgICAgICAgICAgICAgIGVsZW0ueDIoKS5zZXQoYnIpXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGVsZW1cbiAgICB9XG5cbiAgICBwcml2YXRlIGZ1biBidWlsZFRpY2soXG4gICAgICAgIGxhYmVsOiBTdHJpbmcsXG4gICAgICAgIGxhYmVsT2Zmc2V0OiBEb3VibGVWZWN0b3IsXG4gICAgICAgIHNraXBMYWJlbDogQm9vbGVhbixcbiAgICAgICAgYXhpc1RoZW1lOiBBeGlzVGhlbWVcbiAgICApOiBTdmdHRWxlbWVudCB7XG5cbiAgICAgICAgdmFyIHRpY2tNYXJrOiBTdmdMaW5lRWxlbWVudD8gPSBudWxsXG4gICAgICAgIGlmIChheGlzVGhlbWUuc2hvd1RpY2tNYXJrcygpKSB7XG4gICAgICAgICAgICB0aWNrTWFyayA9IFN2Z0xpbmVFbGVtZW50KClcbiAgICAgICAgICAgIHRpY2tNYXJrLnN0cm9rZVdpZHRoKCkuc2V0KGF4aXNUaGVtZS50aWNrTWFya1dpZHRoKCkpXG4gICAgICAgICAgICB0aWNrTWFyay5zdHJva2VDb2xvcigpLnNldChheGlzVGhlbWUudGlja01hcmtDb2xvcigpKVxuICAgICAgICB9XG5cbiAgICAgICAgdmFyIHRpY2tMYWJlbDogVGV4dExhYmVsPyA9IG51bGxcbiAgICAgICAgaWYgKCFza2lwTGFiZWwgJiYgYXhpc1RoZW1lLnNob3dMYWJlbHMoKSkge1xuICAgICAgICAgICAgdGlja0xhYmVsID0gVGV4dExhYmVsKGxhYmVsKVxuICAgICAgICAgICAgdGlja0xhYmVsLmFkZENsYXNzTmFtZShcIiR7U3R5bGUuQVhJU19URVhUfS0ke2F4aXNUaGVtZS5heGlzfVwiKVxuICAgICAgICB9XG5cbiAgICAgICAgdmFsIG1hcmtMZW5ndGggPSBheGlzVGhlbWUudGlja01hcmtMZW5ndGgoKVxuICAgICAgICB3aGVuIChvcmllbnRhdGlvbikge1xuICAgICAgICAgICAgT3JpZW50YXRpb24uTEVGVCAtPiB7XG4gICAgICAgICAgICAgICAgaWYgKHRpY2tNYXJrICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgdGlja01hcmsueDIoKS5zZXQoLW1hcmtMZW5ndGgpXG4gICAgICAgICAgICAgICAgICAgIHRpY2tNYXJrLnkyKCkuc2V0KDAuMClcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBPcmllbnRhdGlvbi5SSUdIVCAtPiB7XG4gICAgICAgICAgICAgICAgaWYgKHRpY2tNYXJrICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgdGlja01hcmsueDIoKS5zZXQobWFya0xlbmd0aClcbiAgICAgICAgICAgICAgICAgICAgdGlja01hcmsueTIoKS5zZXQoMC4wKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIE9yaWVudGF0aW9uLlRPUCAtPiB7XG4gICAgICAgICAgICAgICAgaWYgKHRpY2tNYXJrICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgdGlja01hcmsueDIoKS5zZXQoMC4wKVxuICAgICAgICAgICAgICAgICAgICB0aWNrTWFyay55MigpLnNldCgtbWFya0xlbmd0aClcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBPcmllbnRhdGlvbi5CT1RUT00gLT4ge1xuICAgICAgICAgICAgICAgIGlmICh0aWNrTWFyayAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgIHRpY2tNYXJrLngyKCkuc2V0KDAuMClcbiAgICAgICAgICAgICAgICAgICAgdGlja01hcmsueTIoKS5zZXQobWFya0xlbmd0aClcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICB2YWwgZyA9IFN2Z0dFbGVtZW50KClcbiAgICAgICAgaWYgKHRpY2tNYXJrICE9IG51bGwpIHtcbiAgICAgICAgICAgIGcuY2hpbGRyZW4oKS5hZGQodGlja01hcmspXG4gICAgICAgIH1cblxuICAgICAgICBpZiAodGlja0xhYmVsICE9IG51bGwpIHtcbiAgICAgICAgICAgIHRpY2tMYWJlbC5tb3ZlVG8obGFiZWxPZmZzZXQueCwgbGFiZWxPZmZzZXQueSlcbiAgICAgICAgICAgIHRpY2tMYWJlbC5zZXRIb3Jpem9udGFsQW5jaG9yKGxhYmVsQWRqdXN0bWVudHMuaG9yaXpvbnRhbEFuY2hvcilcbiAgICAgICAgICAgIHRpY2tMYWJlbC5zZXRWZXJ0aWNhbEFuY2hvcihsYWJlbEFkanVzdG1lbnRzLnZlcnRpY2FsQW5jaG9yKVxuICAgICAgICAgICAgdGlja0xhYmVsLnJvdGF0ZShsYWJlbEFkanVzdG1lbnRzLnJvdGF0aW9uRGVncmVlKVxuICAgICAgICAgICAgZy5jaGlsZHJlbigpLmFkZCh0aWNrTGFiZWwucm9vdEdyb3VwKVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBnXG4gICAgfVxuXG4gICAgcHJpdmF0ZSBmdW4gdGlja0xhYmVsQmFzZU9mZnNldCgpOiBEb3VibGVWZWN0b3Ige1xuICAgICAgICB2YWwgZGlzdGFuY2UgPSBheGlzVGhlbWUudGlja0xhYmVsRGlzdGFuY2Uob3JpZW50YXRpb24uaXNIb3Jpem9udGFsKVxuICAgICAgICByZXR1cm4gd2hlbiAob3JpZW50YXRpb24pIHtcbiAgICAgICAgICAgIE9yaWVudGF0aW9uLkxFRlQgLT4gRG91YmxlVmVjd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EBTdXBwcmVzcyhcIk5BTUVfU0hBRE9XSU5HXCIpXG4gICAgICAgICAgICAgICAgdmFsIG1pbm9yQnJlYWtzOiBNdXRhYmxlTGlzdDxEb3VibGU+ID0gbWFqb3JCcmVha3Muc3ViTGlzdCgwLCBtYWpvckJyZWFrcy5zaXplIC0gMSlcbiAgICAgICAgICAgICAgICAgICAgLnppcChtYWpvckJyZWFrcy5zdWJMaXN0KDEsIG1ham9yQnJlYWtzLnNpemUpKVxuICAgICAgICAgICAgICAgICAgICAuZm9sZChBcnJheUxpc3QoKSkgeyBsLCBwYWlyIC0+XG4gICAgICAgICAgICAgICAgICAgICAgICBsLmFkZCgocGFpci5zZWNvbmQgLSBwYWlyLmZpcnN0KSAvIDIgKyBwYWlyLmZpcnN0KVxuICAgICAgICAgICAgICAgICAgICAgICAgbFxuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBBZGQgb25lIGluIHRoZSBmcm9udFxuICAgICAgICAgICAgICAgIG1ham9yQnJlYWtzLnRha2UoMikucmVkdWNlIHsgZmlyc3QsIHNlY29uZCAtPiBzZWNvbmQgLSBmaXJzdCB9LnJ1biB7XG4gICAgICAgICAgICAgICAgICAgIG1pbm9yQnJlYWtzLmFkZCgwLCBtaW5vckJyZWFrcy5maXJzdCgpIC0gdGhpcylcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBBZGQgb25lIGluIHRoZSBiYWNrLlxuICAgICAgICAgICAgICAgIG1ham9yQnJlYWtzLnRha2VMYXN0KDIpLnJlZHVjZSB7IGZpcnN0LCBzZWNvbmQgLT4gc2Vjb25kIC0gZmlyc3QgfS5ydW4ge1xuICAgICAgICAgICAgICAgICAgICBtaW5vckJyZWFrcy5hZGQoMCwgbWlub3JCcmVha3MubGFzdCgpICsgdGhpcylcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBtaW5vckJyZWFrc1xuICAgICAgICAgICAgfVxuICAgICA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SW50KTogRG91YmxlVmVjdG9yIHtcbiAgICAgICAgICAgIHJldHVybiBhZGRpdGlvbmFsT2Zmc2V0cz8uZ2V0KHRpY2tJbmRleCkgPzogRG91YmxlVmVjdG9yLlpFUk9cbiAgICAgICAgfVxuICAgIH1cblxuICAgIHByaXZhdGUgY2xhc3MgVGlja0xhYmVsc0NsZWFuZXIodmFsIGhvcml6b250YWxBeGlzOiBCb29sZWFuKSB7XG4gICAgICAgIHByaXZhdGUgdmFsIGZpbGxlZFJhbmdlcyA9IEFycmF5TGlzdDxEb3VibGVTcGFuPigpXG5cbiAgICAgICAgZnVuIGJlZm9yZUFkZExhYmVsKGxvYzogRG91YmxlLCByb3RhdGlvbkRlZ3JlZTogRG91YmxlLCBheGlzVGlja0hlaWdodDogRG91YmxlKTogQm9vbGVhbiB7XG4gICAgICAgICAgICBpZiAoIWlzUmVsZXZhbnQocm90YXRpb25EZWdyZWUpKSByZXR1cm4gdHJ1ZVxuXG4gICAgICAgICAgICAvLyBmaW5kIG92ZXJsYXBcbiAgICAgICAgICAgIGlmIChmaWxsZWRSYW5nZXMuYW55IHsgaXQuY29udGFpbnMobG9jKSB8fCBpdC5jb250YWlucyhsb2MgKyBheGlzVGlja0hlaWdodCkgfSkge1xuICAgICAgICAgICAgICAgIC8vIG92ZXJsYXAgLSBkb24ndCBhZGQgdGhpcyBsYWJlbFxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBmaWxsZWRSYW5nZXMuYWRkKERvdWJsZVNwYW4obG9jLCBsb2MgKyBheGlzVGlja0hlaWdodCkpXG4gICAgICAgICAgICByZXR1cm4gdHJ1ZVxuICAgICAgICB9XG5cbiAgICAgICAgcHJpdmF0ZSBmdW4gaXNSZWxldmFudChyb3RhdGlvbkRlZ3JlZTogRG91YmxlKTogQm9vbGVhbiB7XG4gICAgICAgICAgICByZXR1cm4gd2hlbiB7XG4gICAgICAgICAgICAgICAgaG9yaXpvb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291bnQsIGJhckJvdW5kcyxcbiAgICAgICAgICAgIGxheW91dC5iYXJMZW5ndGhFeHBhbmQsXG4gICAgICAgICAgICBob3Jpem9udGFsLCBzcGVjLnJldmVyc2VcbiAgICAgICAgKVxuXG4gICAgICAgIC8vIFRpY2tzIGFuZCBsYWJlbHNcbiAgICAgICAgdmFsIGJhclRoaWNrbmVzcyA9IHdoZW4ge1xuICAgICAgICAgICAgaG9yaXpvbnRhbCAtPiBiYXJCb3VuZHMuaGVpZ2h0XG4gICAgICAgICAgICBlbHNlIC0+IGJhckJvdW5kcy53aWR0aFxuICAgICAgICB9XG4gICAgICAgIHZhbCB0aWNrTGVuZ3RoID0gYmFyVGhpY2tuZXNzIC8gNVxuXG4gICAgICAgIHZhbCBicmVha0luZm9zID0gbGF5b3V0LmJyZWFrSW5mb3MuaXRlcmF0b3IoKVxuICAgICAgICBmb3IgKGJyTGFiZWwgaW4gc3BlYy5icmVha3MubGFiZWxzKSB7XG4gICAgICAgICAgICB2YWwgYnJJbmZvID0gYnJlYWtJbmZvcy5uZXh0KClcblxuICAgICAgICAgICAgdmFsIHRpY2tMb2NhdGlvbiA9IGJySW5mby50aWNrTG9jYXRpb25cbiAgICAgICAgICAgIHZhbCB0aWNrTWFya1BvaW50cyA9IEFycmF5TGlzdDxEb3VibGVWZWN0b3I+KClcbiAgICAgICAgICAgIGlmIChob3Jpem9udGFsKSB7XG4gICAgICAgICAgICAgICAgdmFsIHRpY2tYID0gYmFyQm91bmRzLmxlZnQgKyB0aWNrTG9jYXRpb25cbiAgICAgICAgICAgICAgICB0aWNrTWFya1BvaW50cy5hZGQoRG91YmxlVmVjdG9yKHRpY2tYLCBiYXJCb3VuZHMudG9wKSlcbiAgICAgICAgICAgICAgICB0aWNrTWFya1BvaW50cy5hZGQoRG91YmxlVmVjdG9yKHRpY2tYLCBiYXJCb3VuZHMudG9wICsgdGlja0xlbmd0aCkpXG4gICAgICAgICAgICAgICAgdGlja01hcmtQb2ludHMuYWRkKERvdWJsZVZlY3Rvcih0aWNrWCwgYmFyQm91bmRzLmJvdHRvbSAtIHRpY2tMZW5ndGgpKVxuICAgICAgICAgICAgICAgIHRpY2tNYXJrUG9pbnRzLmFkZChEb3VibGVWZWN0b3IodGlja1gsIGJhckJvdW5kcy5ib3R0b20pKVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB2YWwgdGlja1kgPSBiYXJCb3VuZHMudG9wICsgdGlja0xvY2F0aW9uXG4gICAgICAgICAgICAgICAgdGlja01hcmtQb2ludHMuYWRkKERvdWJsZVZlY3RvcihiYXJCb3VuZHMubGVmdCwgdGlja1kpKVxuICAgICAgICAgICAgICAgIHRpY2tNYXJrUG9pbnRzLmFkZChEb3VibGVWZWN0b3IoYmFyQm91bmRzLmxlZnQgKyB0aWNrTGVuZ3RoLCB0aWNrWSkpXG4gICAgICAgICAgICAgICAgdGlja01hcmtQb2ludHMuYWRkKERvdWJsZVZlY3RvcihiYXJCb3VuZHMucmlnaHQgLSB0aWNrTGVuZ3RoLCB0aWNrWSkpXG4gICAgICAgICAgICAgICAgdGlja01hcmtQb2ludHMuYWRkKERvdWJsZVZlY3RvcihiYXJCb3VuZHMucmlnaHQsIHRpY2tZKSlcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYWRkVGlja01hcmsoZ3VpZGVCYXJHcm91cCwgdGlja01hcmtQb2ludHNbMF0sIHRpY2tNYXJrUG9pbnRzWzFdKVxuICAgICAgICAgICAgYWRkVGlja01hcmsoZ3VpZGVCYXJHcm91cCwgdGlja01hcmtQb2ludHNbMl0sIHRpY2tNYXJrUG9pbnRzWzNdKVxuXG4gICAgICAgICAgICB2YWwgbGFiZWwgPSBUZXh0TGFiZWwoYnJMYWJlbClcbiAgICAgICAgICAgIGxhYmVsLmFkZENsYXNzTmFtZShTdHlsZS5MRUdFTkRfSVRFTSlcbiAgICAgICAgICAgIGxhYmVsLnNldEhvcml6b250YWxBbmNob3IoYnJJbmZvLmxhYmVsSG9yaXpvbnRhbEFuY2hvcilcbiAgICAgICAgICAgIGxhYmVsLnNldFZlcnRpY2FsQW5jaG9yKGJySW5mby5sYWJlbFZlcnRpY2FsQW5jaG9yKVxuICAgICAgICAgICAgbGFiZWwubW92ZVRvKGJySW5mby5sYWJlbExvY2F0aW9uLngsIGJySW5mby5sYWJlbExvY2F0aW9uLnkgKyBiYXJCb3VuZHMudG9wKVxuICAgICAgICAgICAgZ3VpZGVCYXJHcm91cC5jaGlsZHJlbigpLmFkZChsYWJlbC5yb290R3JvdXApXG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZGVidWcpIHtcbiAgICAgICAgICAgIC8vIGZyYW1lIGJhciBhbmQgbGFiZWxzXG4gICAgICAgICAgICB2YWwgZ3JhcGhCb3VuZHMgPSBEb3VibGVSZWN0YW5nbGUoRG91YmxlVmVjdG9yLlpFUk8sIGxheW91dC5ncmFwaFNpemUpXG4gICAgICAgICAgICBndWlkZUJhckdyb3VwLmNoaWxkcmVuKCkuYWRkKFxuICAgICAgICAgICAgICAgIGNyZWF0ZVRyYW5zcGFyZW50UmVjdChcbiAgICAgICAgICAgICAgICAgICAgZ3JhcGhCb3VuZHMsXG4gICAgICAgICAgICAgICAgICAgIENvbG9yLkRBUktfQkxVRSxcbiAgICAgICAgICAgICAgICAgICAgMS4wXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgKVxuICAgICAgICB9XG5cbiAgICAgICAgY29udGVudFJvb3QuY2hpbGRyZW4oKS5hZGQoZ3VpZGVCYXJHcm91cClcbiAgICAgICAgcmV0dXJuIGxheW91dC5zaXplXG4gICAgfVxuXG4gICAgcHJpdmF0ZSBmdW4gYWRkQ29sb3JCYXIoXG4gICAgICAgIGc6IFN2Z0dFbGVtZW50LFxuICAgICAgICBkb21haW46IERvdWJsZVNwYW4sXG4gICAgICAgIG1hcHBlcjogU2NhbGVNYXBwZXI8Q29sb3I+LFxuICAgICAgICBudW1CaW5zOiBJbnQsXG4gICAgICAgIGJhckJvd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Cb3VuZHMubGVmdFxuICAgICAgICB2YWwgc2VnbWVudFJpZ2h0ID0gYmFyQm91bmRzLnJpZ2h0XG4gICAgICAgIHZhbCBzZWdtZW50Qm90dG9tID0gYmFyQm91bmRzLmJvdHRvbVxuICAgICAgICB2YXIgc2VnbWVudFRvcCA9IGJhckJvdW5kcy50b3BcblxuICAgICAgICBmb3IgKChpLCBjb2xvcikgaW4gY29sb3JzLndpdGhJbmRleCgpKSB7XG4gICAgICAgICAgICB2YWwgciA9IFN2Z1JlY3RFbGVtZW50KFxuICAgICAgICAgICAgICAgIHNlZ21lbnRMZWZ0LFxuICAgICAgICAgICAgICAgIHNlZ21lbnRUb3AsXG4gICAgICAgICAgICAgICAgc2VnbWVudFJpZ2h0IC0gc2VnbWVudExlZnQsXG4gICAgICAgICAgICAgICAgc2VnbWVudEJvdHRvbSAtIHNlZ21lbnRUb3BcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIHIuc3Ryb2tlV2lkdGgoKS5zZXQoMC4wKVxuICAgICAgICAgICAgci5maWxsQ29sb3IoKS5zZXQoY29sb3IpXG4gICAgICAgICAgICBnLmNoaWxkcmVuKCkuYWRkKHIpXG5cbiAgICAgICAgICAgIGlmIChob3Jpem9udGFsKSB7XG4gICAgICAgICAgICAgICAgc2VnbWVudExlZnQgKz0gc2VnbWVudFN0ZXBcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgc2VnbWVudFRvcCArPSBzZWdtZW50U3RlcFxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGkgPT0gMCkge1xuICAgICAgICAgICAgICAgIC8vIGZpcnN0IHNlZ21lbnQgaXMgYSBiaXQgbG9uZ2VyLlxuICAgICAgICAgICAgICAgIGlmIChob3Jpem9udGFsKSB7XG4gICAgICAgICAgICAgICAgICAgIHNlZ21lbnRMZWZ0ICs9IGJhckxlbmd0aEV4cGFuZFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICA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hclNpemUueSArIGxhYmVsRGlzdGFuY2UpXG4gICAgICAgICAgICByZXR1cm4gQnJlYWtJbmZvKFxuICAgICAgICAgICAgICAgIHRpY2tMb2NhdGlvbixcbiAgICAgICAgICAgICAgICBsYWJlbExvY2F0aW9uLFxuICAgICAgICAgICAgICAgIFRleHQuSG9yaXpvbnRhbEFuY2hvci5NSURETEUsXG4gICAgICAgICAgICAgICAgVGV4dC5WZXJ0aWNhbEFuY2hvci5UT1BcbiAgICAgICAgICAgIClcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHByaXZhdGUgY2xhc3MgVmVydGljYWxMYXlvdXQoXG4gICAgICAgIHRpdGxlOiBTdHJpbmcsXG4gICAgICAgIGRvbWFpbjogRG91YmxlU3BhbixcbiAgICAgICAgYnJlYWtzOiBTY2FsZUJyZWFrcyxcbiAgICAgICAgYmFyU2l6ZTogRG91YmxlVmVjdG9yLFxuICAgICAgICByZXZlcnNlOiBCb29sZWFuLFxuICAgICAgICB0aGVtZTogTGVnZW5kVGhlbWVcbiAgICApIDogQ29sb3JCYXJDb21wb25lbnRMYXlvdXQoXG4gICAgICAgIHRpdGxlLCBkb21haW4sIGJyZWFrcywgYmFyU2l6ZSxcbiAgICAgICAgTGVnZW5kRGlyZWN0aW9uLlZFUlRJQ0FMLFxuICAgICAgICByZXZlcnNlLFxuICAgICAgICB0aGVtZVxuICAgICkge1xuXG4gICAgICAgIG92ZXJyaWRlIHZhbCBncmFwaFNpemU6IERvdWJsZVZlY3RvclxuICAgICAgICBwcml2YXRlIHZhbCBsYWJlbERpc3RhbmNlOiBEb3VibGUgZ2V0KCkgPSBQbG90TGFiZWxTcGVjRmFjdG9yeS5sZWdlbmRJdGVtKHRoZW1lKS53aWR0aChQbG90TGFiZWxTcGVjRmFjdG9yeS5ESVNUQU5DRV9UT19MQUJFTF9JTl9DSEFSUykgLyAyXG4gICAgICAgIG92ZXJyaWRlIHZhbCBndWlkZUJhckxlbmd0aDogRG91YmxlIGdldCgpID0gZ3VpZGVCYXJTaXplLnlcblxuICAgICAgICBpbml0IHtcbiAgICAgICAgICAgIGNoZWNrKCFicmVha3MuaXNFbXB0eSkgeyBcIkNvbG9yYmFyIFZlcnRpY2FsTGF5b3V0IHJlY2VpdmVkIGVtcHR5IGJyZWFrcyBsaXN0LlwiIH1cbiAgICAgICAgICAgIHZhbCBtYXhMYWJlbFdpZHRoOiBEb3VibGUgPSBicmVha3MubGFiZWxzXG4gICAgICAgICAgICAgICAgLm1heE9mIHsgUGxvdExhYmVsU3BlY0ZhY3RvcnkubGVnZW5kSXRlbSh0aGVtZSkud2lkdGgoaXQpIH1cblxuICAgICAgICAgICAgLy8gQmFyICsgbGFiZWxzIGJvdW5kc1xuICAgICAgICAgICAgZ3JhcGhTaXplID0gRG91YmxlVmVjdG9yKGd1aWRlQmFyU2l6ZS54ICsgbGFiZWxEaXN0YW5jZSArIG1heExhYmVsV2lkdGgsIGd1aWRlQmFyU2l6ZS55KVxuICAgICAgICB9XG5cbiAgICAgICAgb3ZlcnJpZGUgZnVuIGNyZWF0ZUJyZWFrSW5mbyh0aWNrTG9jYXRpb246IERvdWJsZSk6IEJyZWFrSW5mbyB7XG4gICAgICAgICAgICB2YWwgbGFiZWxMb2NhdGlvbiA9IERvdWJsZVZlY3RvcihndWlkZUJhclNpemUueCArIGxhYmVsRGlzdGFuY2UsIHRpY2tMb2NhdGlvbilcbiAgICAgICAgICAgIHJldHVybiBCcmVha0luZm8oXG4gICAgICAgICAgICAgICAgdGlja0xvY2F0aW9uLFxuICAgICAgICAgICAgICAgIGxhYmVsTG9jYXRpb24sXG4gICAgICAgICAgICAgICAgVGV4dC5Ib3Jpem9udGFsQW5jaG9yLkxFRlQsXG4gICAgICAgICAgICAgICAgVGV4dC5WZXJ0aWNhbEFuY2hvci5DRU5URVJcbiAgICAgICAgICAgIClcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGNvbXBhbmlvbiBvYmplY3Qge1xuICAgICAgICBmdW4gaG9yaXpvbnRhbChcbiAgICAgICAgICAgIHRpdGxlOiBTdHJpbmcsXG4gICAgICAgICAgICBkb21haW46IERvdWJsZVNwYW4sXG4gICAgICAgICAgICBicmVha3M6IFNjYWxlQnJlYWtzLFxuICAgICAgICAgICAgYmFyU2l6ZTogRG91YmxlVmVjdG9yLFxuICAgICAgICAgICAgcmV2ZXJzZTogQm9vbGVhbixcbiAgICAgICAgICAgIHRoZW1lOiBMZWdlbmRUaGVtZVxuICAgICAgICApOiBDb2xvckJhckNvbXBvbmVudExheW91dCB7XG4gICAgICAgICAgICByZXR1cm4gSG9yaXpvbnRhbExheW91dChcbiAgICAgICAgICAgICAgICB0aXRsZSxcbiAgICAgICAgICAgICAgICBkb21haW4sXG4gICAgICAgICAgICAgICAgYnJlYWtzLFxuICAgICAgICAgICAgICAgIGJhclNpemUsXG4gICAgICAgICAgICAgICAgcmV2ZXJzZSxcbiAgICAgICAgICAgICAgICB0aGVtZVxuICAgICAgICAgICAgKVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuIHZlcnRpY2FsKFxuICAgICAgICAgICAgdGl0bGU6IFN0cmluZyxcbiAgICAgICAgICAgIGRvbWFpbjogRG91YmxlU3BhbixcbiAgICAgICAgICAgIGJyZWFrczogU2NhbGVCcmVha3MsXG4gICAgICAgICAgICBiYXJTaXplOiBEb3VibGVWZWN0b3IsXG4gICAgICAgICAgICByZXZlcnNlOiBCb29sZWFuLFxuICAgICAgICAgICAgdGhlbWU6IExlZ2VuZFRoZW1lXG4gICAgICAgICk6IENvbG9yQmFyQ29tcG9uZW50TGF5b3V0IHtcbiAgICAgICAgICAgIHJldHVybiBWZXJ0aWNhbExheW91dChcbiAgICAgICAgICAgICAgICB0aXRsZSxcbiAgICAgICAgICAgICAgICBkb21haW4sXG4gICAgICAgICAgICAgICAgYnJlYWtzLFxuICAgICAgICAgICAgICAgIGJhclNpemUsXG4gICAgICAgICAgICAgICAgcmV2ZXJzZSxcbiAgICAgICAgICAgICAgICB0aGVtZVxuICAgICAgICAgICAg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lYW5cbikgOiBMZWdlbmRCb3hTcGVjKHRpdGxlLCB0aGVtZSwgcmV2ZXJzZSkge1xuXG4gICAgY29tcGFuaW9uIG9iamVjdCB7XG4gICAgICAgIGNvbnN0IHZhbCBERUZfTlVNX0JJTiA9IDIwXG5cbiAgICAgICAgcHJpdmF0ZSBjb25zdCB2YWwgREVGX0JBUl9USElDS05FU1MgPSAxLjAgIC8vIGluICdrZXktc2l6ZScgbXVsdGlwbGVzXG4gICAgICAgIHByaXZhdGUgY29uc3QgdmFsIERFRl9CQVJfTEVOR1RIID0gNS4wICAgLy8gaW4gJ2tleS1zaXplJyBtdWx0aXBsZXNcblxuICAgICAgICBpbnRlcm5hbCBmdW4gYmFyQWJzb2x1dGVTaXplKGhvcml6b250YWw6IEJvb2xlYW4sIHRoZW1lOiBMZWdlbmRUaGVtZSk6IERvdWJsZVZlY3RvciB7XG4gICAgICAgICAgICByZXR1cm4gd2hlbiB7XG4gICAgICAgICAgICAgICAgaG9yaXpvbnRhbCAtPiBEb3VibGVWZWN0b3IoXG4gICAgICAgICAgICAgICAgICAgIERFRl9CQVJfTEVOR1RIICogdGhlbWUua2V5U2l6ZSgpLFxuICAgICAgICAgICAgICAgICAgICBERUZfQkFSX1RISUNLTkVTUyAqIHRoZW1lLmtleVNpemUoKVxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICBlbHNlIC0+IERvdWJsZVZlY3RvcihcbiAgICAgICAgICAgICAgICAgICAgREVGX0JBUl9USElDS05FU1MgKiB0aGVtZS5rZXlTaXplKCksXG4gICAgICAgICAgICAgICAgICAgIERFRl9CQVJfTEVOR1RIICogdGhlbWUua2V5U2l6ZSgpXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxufVxuIiwiLypcbiAqIENvcHlyaWdodCAoYykgMjAxOS4gSmV0QnJhaW5zIHMuci5vLlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZ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WVuc2lvbi5zdWJ0cmFjdChEb3VibGVWZWN0b3IobC5ncmFwaFNpemUueCwgMC4wKSlcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSAtPiB7XG4gICAgICAgICAgICAgICAgICAgIERvdWJsZVZlY3RvcihzcGVjLmNvbnRlbnRCb3VuZHMud2lkdGgsIGwudGl0bGVTaXplLnkpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgRG91YmxlUmVjdGFuZ2xlKERvdWJsZVZlY3Rvci5aRVJPLCB0aXRsZVJlY3RTaXplKVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGhhc1RpdGxlKCkpIHtcbiAgICAgICAgICAgIHZhbCBsYWJlbCA9IGNyZWF0ZVRpdGxlTGFiZWwoXG4gICAgICAgICAgICAgICAgdGl0bGVCb3VuZGluZ1JlY3QsXG4gICAgICAgICAgICAgICAgbC50aXRsZVNpemUsXG4gICAgICAgICAgICAgICAgdGhlbWUudGl0bGVKdXN0aWZpY2F0aW9uKClcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGlubmVyR3JvdXAuY2hpbGRyZW4oKS5hZGQobGFiZWwucm9vdEdyb3VwKVxuICAgICAgICB9XG5cbiAgICAgICAgdmFsIGdyYXBoR3JvdXAgPSBTdmdHRWxlbWVudCgpXG4gICAgICAgIGdyYXBoR3JvdXAudHJhbnNmb3JtKCkuc2V0KGJ1aWxkVHJhbnNmb3JtKGwuZ3JhcGhPcmlnaW4sIDAuMCkpXG4gICAgICAgIGFwcGVuZEd1aWRlQ29udGVudChncmFwaEdyb3VwKVxuICAgICAgICBpbm5lckdyb3VwLmNoaWxkcmVuKCkuYWRkKGdyYXBoR3JvdXApXG5cbiAgICAgICAgaWYgKGRlYnVnKSB7XG4gICAgICAgICAgICAvLyBvdXRlciBib3VuZHNcbiAgICAgICAgICAgIHZhbCBvdXRlckJvdW5kcyA9IERvdWJsZVJlY3RhbmdsZShEb3VibGVWZWN0b3IuWkVSTywgc3BlYy5zaXplKVxuICAgICAgICAgICAgYWRkKGNyZWF0ZVRyYW5zcGFyZW50UmVjdChvdXRlckJvdW5kcywgQ29sb3IuQ1lBTiwgMS4wKSlcbiAgICAgICAgICAgIHJ1biB7XG4gICAgICAgICAgICAgICAgLy8gaW5uZXIgYm91bmRzXG4gICAgICAgICAgICAgICAgdmFsIHJlY3QgPSBTdmdSZWN0RWxlbWVudChzcGVjLmlubmVyQm91bmRzKVxuICAgICAgICAgICAgICAgIHJlY3QuZmlsbENvbG9yKCkuc2V0KENvbG9yLkJMQUNLKVxuICAgICAgICAgICAgICAgIHJlY3Quc3Ryb2tlV2lkdGgoKS5zZXQoMC4wKVxuICAgICAgICAgICAgICAgIHJlY3QuZmlsbE9wYWNpdHkoKS5zZXQoMC4xKVxuICAgICAgICAgICAgICAgIGFkZChyZWN0KVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gY29udGVudCBib3VuZHNcbiAgICAgICAgICAgIGFkZChjcmVhdGVUcmFuc3BhcmVudFJlY3Qoc3BlYy5jb250ZW50Qm91bmRzLCBDb2xvci5EQVJLX01BR0VOVEEsIDEuMCkpXG4gICAgICAgICAgICAvLyB0aXRsZSBib3VuZHNcbiAgICAgICAgICAgIHZhbCByZWN0ID0gdGl0bGVCb3VuZGluZ1JlY3QuYWRkKHNwZWMuY29udGVudE9yaWdpbilcbiAgICAgICAgICAgIGFkZChjcmVhdGVUcmFuc3BhcmVudFJlY3QocmVjdCwgQ29sb3IuTUFHRU5UQSwgMS4wKSlcbiAgICAgICAgICAgIC8vIHRpdGxlIGJvdW5kaW5nIGJveFxuICAgICAgICAgICAgdmFsIHRleHREaW1lbnNpb25zID0gUGxvdExheW91dFV0aWwudGV4dERpbWVuc2lvbnModGl0bGUsIFBsb3RMYWJlbFNwZWNGYWN0b3J5LmxlZ2VuZFRpdGxlKHRoZW1lKSlcbiAgICAgICAgICAgIHZhbCB0aXRsZUJvdW5kaW5nQm94ID0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91YmxlVmVjdG9yKFxuICAgICAgICAgICAgICAgICAgICB4LFxuICAgICAgICAgICAgICAgICAgICBpZiAoeSA+IGdyYXBoU2l6ZS55KSAoeSAtIGdyYXBoU2l6ZS55KSAvIDIgZWxzZSAwLjBcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIC0+IERvdWJsZVZlY3RvcihcbiAgICAgICAgICAgICAgICAwLjAsXG4gICAgICAgICAgICAgICAgLy8gbWFrZSBzb21lIHNwYWNlIGJldHdlZW4gdGl0bGUgYW5kIHRoZSByZXN0IG9mIHRoZSBjb250ZW50LlxuICAgICAgICAgICAgICAgIHRpdGxlU2l6ZS55ICsgUGxvdExhYmVsU3BlY0ZhY3RvcnkubGVnZW5kVGl0bGUodGhlbWUpLmhlaWdodCgpIC8gMlxuICAgICAgICAgICAgKVxuICAgICAgICB9XG5cbiAgICB2YWwgc2l6ZTogRG91YmxlVmVjdG9yXG4gICAgICAgIGdldCgpIHtcbiAgICAgICAgICAgIHZhbCBncmFwaEJvdW5kcyA9IERvdWJsZVJlY3RhbmdsZShncmFwaE9yaWdpbiwgZ3JhcGhTaXplKVxuICAgICAgICAgICAgdmFsIHRpdGxlQW5kQ29udGVudCA9IERvdWJsZVJlY3RhbmdsZShEb3VibGVWZWN0b3IuWkVSTywgRG91YmxlVmVjdG9yLlpFUk8pXG4gICAgICAgICAgICAgICAgLnVuaW9uKHRpdGxlQm91bmRzKVxuICAgICAgICAgICAgICAgIC51bmlvbihncmFwaEJvdW5kcylcbiAgICAgICAgICAgIHJldHVybiB0aXRsZUFuZENvbnRlbnQuZGltZW5zaW9uXG4gICAgICAgIH1cblxuICAgIGludGVybmFsIHZhbCB0aXRsZVNpemU6IERvdWJsZVZlY3RvclxuICAgICAgICBnZXQoKSB7XG4gICAgICAgICAgICByZXR1cm4gd2hlbiB7XG4gICAgICAgICAgICAgICAgdGl0bGUuaXNCbGFuaygpIHx8ICF0aGVtZS5zaG93VGl0b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hdGUgdmFsIGlubmVyQ29udGVudEV4dGVuZDogRG91YmxlVmVjdG9yXG5cbiAgICBwcml2YXRlIHZhbCBjb250ZW50U2l6ZTogRG91YmxlVmVjdG9yXG4gICAgICAgIGdldCgpID0gbGF5b3V0LnNpemVcblxuICAgIHZhbCBzaXplOiBEb3VibGVWZWN0b3JcbiAgICAgICAgZ2V0KCkgPSBjb250ZW50U2l6ZS5hZGQoZnVsbENvbnRlbnRFeHRlbmQpXG5cbiAgICB2YWwgaW5uZXJCb3VuZHM6IERvdWJsZVJlY3RhbmdsZVxuICAgICAgICBnZXQoKSA9IERvdWJsZVJlY3RhbmdsZShpbm5lck9yaWdpbiwgY29udGVudFNpemUuYWRkKGlubmVyQ29udGVudEV4dGVuZCkpXG5cbiAgICB2YWwgY29udGVudEJvdW5kczogRG91YmxlUmVjdGFuZ2xlXG4gICAgICAgIGdldCgpID0gRG91YmxlUmVjdGFuZ2xlKGNvbnRlbnRPcmlnaW4sIGNvbnRlbnRTaXplKVxuXG4gICAgaW5pdCB7XG4gICAgICAgIHZhbCBjb250ZW50RXhwYW5kID0gdGhlbWUubWFyZ2luKCkgKyB0aGVtZS5wYWRkaW5nKClcbiAgICAgICAgY29udGVudE9yaWdpbiA9IERvdWJsZVZlY3Rvcihjb250ZW50RXhwYW5kLCBjb250ZW50RXhwYW5kKVxuICAgICAgICBmdWxsQ29udGVudEV4dGVuZCA9IERvdWJsZVZlY3Rvcihjb250ZW50RXhwYW5kICogMiwgY29udGVudEV4cGFuZCAqIDIpXG5cbiAgICAgICAgaW5uZXJPcmlnaW4gPSBEb3VibGVWZWN0b3IodGhlbWUubWFyZ2luKCksIHRoZW1lLm1hcmdpbigpKVxuICAgICAgICBpbm5lckNvbnRlbnRFeHRlbmQgPSBEb3VibGVWZWN0b3IodGhlbWUucGFkZGluZygpICogMiwgdGhlbWUucGFkZGluZygpICogMilcbiAgICB9XG5cbiAgICBmdW4gaGFzVGl0bGUoKTogQm9vbGVhbiB7XG4gICAgICA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2ludClcbiAgICAgICAgICAgICAgICBtaW5TaXplID0gbWluU2l6ZS5tYXgobGF5ZXJNaW5LZXlTaXplKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG1pblNpemVcbiAgICAgICAgfVxuXG4gICAgdmFsIGlzRW1wdHk6IEJvb2xlYW5cbiAgICAgICAgZ2V0KCkgPSBteUxheWVycy5pc0VtcHR5KClcblxuICAgIGZ1biBhZGRMYXllcihkYXRhUG9pbnQ6IERhdGFQb2ludEFlc3RoZXRpY3MsIGtleUVsZW1lbnRGYWN0b3J5OiBMZWdlbmRLZXlFbGVtZW50RmFjdG9yeSkge1xuICAgICAgICBteUxheWVycy5hZGQoXG4gICAgICAgICAgICBMZWdlbmRCcmVha0xheWVyKFxuICAgICAgICAgICAgICAgIGRhdGFQb2ludCxcbiAgICAgICAgICAgICAgICBrZXlFbGVtZW50RmFjdG9yeVxuICAgICAgICAgICAgKVxuICAgICAgICApXG4gICAgfVxuXG4gICAgZnVuIGNyZWF0ZUtleUVsZW1lbnQoc2l6ZTogRG91YmxlVmVjdG9yKTogU3ZnR0VsZW1lbnQge1xuICAgICAgICB2YWwgZyA9IFN2Z0dFbGVtZW50KClcblxuICAgICAgICBmb3IgKGxheWVyIGluIG15TGF5ZXJzKSB7XG4gICAgICAgICAgICB2YWwga2V5RWxlbWVudCA9IGxheWVyLmtleUVsZW1lbnRGYWN0b3J5LmNyZWF0ZUtleUVsZW1lbnQobGF5ZXIuZGF0YVBvaW50LCBzaXplKVxuICAgICAgICAgICAgZy5jaGlsZHJlbigpLmFkZChrZXlFbGVtZW50KVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGdcbiAgICB9XG5cbiAgICBwcml2YXRlIGNsYXNzIExlZ2VuZEJyZWFrTGF5ZXIoXG4gICAgICAgIHZhbCBkYXRhUG9pbnQ6IERhdGFQb2ludEFlc3RoZXRpY3MsXG4gICAgICAgIHZhbCBrZXlFbGVtZW50RmFjdG9yeTogTGVnZW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AgICAgICAgICAgIHZhbCBrZXlTaXplID0ga2V5U2l6ZXMubmV4dCgpXG4gICAgICAgICAgICB2YWwgYnJlYWtFbGVtZW50ID0gY3JlYXRlQnJlYWtFbGVtZW50KGJyLCBrZXlTaXplLCBrZXlMYWJlbEJveCwgbGFiZWxCb3gpXG4gICAgICAgICAgICBjb250ZW50Um9vdC5jaGlsZHJlbigpLmFkZChicmVha0VsZW1lbnQpXG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZGVidWcpIHtcbiAgICAgICAgICAgIHZhbCBncmFwaEJvdW5kcyA9IERvdWJsZVJlY3RhbmdsZShEb3VibGVWZWN0b3IuWkVSTywgbGF5b3V0LmdyYXBoU2l6ZSlcbiAgICAgICAgICAgIGNvbnRlbnRSb290LmNoaWxkcmVuKCkuYWRkKFxuICAgICAgICAgICAgICAgIGNyZWF0ZVRyYW5zcGFyZW50UmVjdChcbiAgICAgICAgICAgICAgICAgICAgZ3JhcGhCb3VuZHMsXG4gICAgICAgICAgICAgICAgICAgIENvbG9yLkRBUktfQkxVRSxcbiAgICAgICAgICAgICAgICAgICAgMS4wXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgKVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBsYXlvdXQuc2l6ZVxuICAgIH1cblxuICAgIHByaXZhdGUgZnVuIGNyZWF0ZUJyZWFrRWxlbWVudChcbiAgICAgICAgYnI6IExlZ2VuZEJyZWFrLFxuICAgICAgICBrZXlTaXplOiBEb3VibGVWZWN0b3IsXG4gICAgICAgIGtleUxhYmVsQm94OiBEb3VibGVSZWN0YW5nbGUsXG4gICAgICAgIGxhYmVsQm94OiBEb3VibGVSZWN0YW5nbGVcbiAgICApOiBTdmdFbGVtZW50IHtcbiAgICAgICAgdmFsIGJyZWFrQ29tcG9uZW50ID0gR3JvdXBDb21wb25lbnQoKVxuXG4gICAgICAgIC8vIGtleSBlbGVtZW50XG4gICAgICAgIGJyZWFrQ29tcG9uZW50LmFkZChjcmVhd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SBBcnJheUxpc3Q8RG91YmxlUmVjdGFuZ2xlPigpXG5cbiAgICB2YXIgaXNGaWxsQnlSb3cgPSBmYWxzZVxuICAgIHZhciByb3dDb3VudCA9IDBcbiAgICAgICAgc2V0KHJvd0NvdW50KSB7XG4gICAgICAgICAgICBjaGVjayhyb3dDb3VudCA+IDApIHsgXCJSb3cgY291bnQgbXVzdCBiZSBncmVhdGVyIHRoYW4gMCwgd2FzICRyb3dDb3VudFwiIH1cbiAgICAgICAgICAgIGZpZWxkID0gcm93Q291bnRcbiAgICAgICAgfVxuICAgIHZhciBjb2xDb3VudCA9IDBcbiAgICAgICAgc2V0KGNvbENvdW50KSB7XG4gICAgICAgICAgICBjaGVjayhjb2xDb3VudCA+IDApIHsgXCJDb2wgY291bnQgbXVzdCBiZSBncmVhdGVyIHRoYW4gMCwgd2FzICRjb2xDb3VudFwiIH1cbiAgICAgICAgICAgIGZpZWxkID0gY29sQ291bnRcbiAgICAgICAgfVxuXG4gICAgb3ZlcnJpZGUgdmFsIGdyYXBoU2l6ZTogRG91YmxlVmVjdG9yXG4gICAgICAgIGdldCgpIHtcbiAgICAgICAgICAgIGVuc3VyZUluaXRlZCgpXG4gICAgICAgICAgICByZXR1cm4gbXlDb250ZW50U2l6ZSEhXG4gICAgICAgIH1cblxuICAgIHZhbCBrZXlMYWJlbEJveGVzOiBMaXN0PERvdWJsZVJlY3RhbmdsZT5cbiAgICAgICAgZ2V0KCkge1xuICAgICAgICAgICAgZW5zdXJlSW5pdGVkKClcbiAgICAgICAgICAgIHJldHVybiBteUtleUxhYmVsQm94ZXNcbiAgICAgICAgfVxuXG4gICAgdmFsIGxhYmVsQm94ZXM6IExpc3Q8RG91YmxlUmVjdGFuZ2xlPlxuICAgICAgICBnZXQoKSB7XG4gICAgICAgICAgICBlbnN1cmVJbml0ZWQoKVxuICAgICAgICAgICAgcmV0dXJuIG15TGFiZWxCb3hlc1xuICAgICAgICB9XG5cbiAgICBwcml2YXRlIGZ1biBlbnN1cmV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lXG4gICAgKSA6IE15TXVsdGlSb3coXG4gICAgICAgIHRpdGxlLCBicmVha3MsIGtleVNpemVzLFxuICAgICAgICBMZWdlbmREaXJlY3Rpb24uSE9SSVpPTlRBTCxcbiAgICAgICAgdGhlbWVcbiAgICApIHtcbiAgICAgICAgaW5pdCB7XG4gICAgICAgICAgICBjb2xDb3VudCA9IGJyZWFrcy5zaXplXG4gICAgICAgICAgICByb3dDb3VudCA9IDFcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHByaXZhdGUgY2xhc3MgTXlWZXJ0aWNhbCBpbnRlcm5hbCBjb25zdHJ1Y3RvcihcbiAgICAgICAgdGl0bGU6IFN0cmluZyxcbiAgICAgICAgYnJlYWtzOiBMaXN0PExlZ2VuZEJyZWFrPixcbiAgICAgICAga2V5U2l6ZXM6IExpc3Q8RG91YmxlVmVjdG9yPixcbiAgICAgICAgdGhlbWU6IExlZ2VuZFRoZW1lXG4gICAgKSA6IE15TXVsdGlSb3coXG4gICAgICAgIHRpdGxlLCBicmVha3MsIGtleVNpemVzLFxuICAgICAgICBMZWdlbmREaXJlY3Rpb24uVkVSVElDQUwsXG4gICAgICAgIHRoZW1lXG4gICAgKSB7XG4gICAgICAgIGluaXQge1xuICAgICAgICAgICAgY29sQ291bnQgPSAxXG4gICAgICAgICAgICByb3dDb3VudCA9IGJyZWFrcy5zaXplXG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBwcml2YXRlIGFic3RyYWN0IGNsYXNzIE15TXVsdGlSb3cgaW50ZXJuYWwgY29uc3RydWN0b3IoXG4gICAgICAgIHRpdGxlOiBTdHJpbmcsXG4gICAgICAgIGJyZWFrczogTGlzdDxMZWdlbmRCcmVhaz4sXG4gICAgICAgIGtleVNpemVzOiBMaXN0PERvdWJsZVZlY3Rvcj4sXG4gICAgICAgIGxlZ2VuZERpcmVjdGlvbjogTGVnZW5kRGlyZWN0aW9uLFxuICAgICAgICB0aGVtZTogTGVnZW5kVGhlbWVcbiAgICApIDogTGVnZW5kQ29tcG9uZW50TGF5b3V0KHRpdGxlLCBicmVha3MsIGtleVNpemVzLCBsZWdlbmREaXJlY3Rpb24sIHRoZW1lKSB7XG4gICAgICAgIHByaXZhdGUgdmFyIG15TWF4TGFiZWxXaWR0aCA9IDAuMFxuXG4gICAgICAgIGluaXQge1xuICAgICAgICAgICAgZm9yIChiciBpbiBicmVha3MpIHtcbiAgICAgICAgICAgICAgICBteU1heExhYmVsV2lkdGggPSBtYXgobXlNYXhMYWJlbFdpZHRoLCBQbG90TGFiZWxTcGVjRmFjdG9yeS5sZWdlbmRJdGVtKHRoZW1lKS53aWR0aChici5sYWJlbCkpXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBvdmVycmlkZSBmdW4gYnJlYWtCb3hPcmlnaW4oaW5kZXg6IEludCwgcHJldkJyZWFrQm94Qm91bmRzOiBEb3VibGVSZWN0YW5nbGUpOiBEb3VibGVWZWN0b3Ige1xuICAgICAgICAgICAgaWYgKGlzRmlsbEJ5Um93KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGlmIChpbmRleCAlIGNvbENvdW50ID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgRG91YmxlVmVjdG9yKDAuMCwgcHJldkJyZWFrQm94Qm91bmRzLmJvdHRvbSlcbiAgICAgICAgICAgICAgICB9IGVsc2UgRG91YmxlVmVjdG9yKHByZXZCcmVha0JveEJvdW5kcy5yaWdodCwgcHJldkJyZWFrQm94Qm91bmRzLnRvcClcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gZmlsbCBieSBjb2x1bW5cbiAgICAgICAgICAgIHJldHVybiBpZiAoaW5kZXggJSByb3dDb3VudCA9PSAwKSB7XG4gICAgICAgICAgICAgICAgRG91YmxlVmVjdG9yKHByZXZCcmVha0JveEJvdW5kcy5yaWdodCwgMC4wKVxuICAgICAgICAgICAgfSBlbHNlIERvdWJsZVZlY3RvcihwcmV2QnJlYWtCb3hCb3VuZHMubGVmdCwgcHJldkJyZWFrQm94Qm91bmRzLmJvdHRvbSlcblxuICAgICAgICB9XG5cbiAgICAgICAgb3ZlcnJpZGUgZnVuIGxhYmVsU2l6ZShpbmRleDogSW50KTogRG91YmxlVmVjdG9yIHtcbiAgICAgICAgICAgIHJldHVybiBEb3VibGVWZWN0b3IobXlNYXhMYWJlbFdpZHRoLCBQbG90TGFiZWxTcGVjRmFjdG9yeS5sZWdlbmRJdGVtKHRoZW1lKS5oZWlnaHQoKSlcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGNvbXBhbmlvbiBvYmplY3Qge1xuICAgICAgICBmdW4gaG9yaXpvbnRhbCh0aXRsZTogU3RyaW5nLCBicmVha3M6IExpc3Q8TGVnZW5kQnJlYWs+LCBrZXlTaXplczogTGlzdDxEb3VibGVWZWN0b3I+LCB0aGVtZTogTGVnZW5kVGhlbWUpOiBMZWdlbmRDb21wb25lbnRMYXlvdXQge1xuICAgICAgICAgICAgcmV0dXJuIE15SG9yaXpvbnRhbChcbiAgICAgICAgICAgICAgICB0aXRsZSxcbiAgICAgICAgICAgICAgICBicmVha3MsXG4gICAgICAgICAgICAgICAga2V5U2l6ZXMsXG4gICAgICAgICAgICAgICAgdGhlbWVcbiAgICAgICAgICAgIClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBob3Jpem9udGFsTXVsdGlSb3codGl0bGU6IFN0cmluZywgYnJlYWtzOiBMaXN0PExlZ2VuZEJyZWFrPiwga2V5U2l6ZXM6IExpc3Q8RG91YmxlVmVjdG9yPiwgdGhlbWU6IExlZ2VuZFRoZW1lKTogTGVnZW5kQ29tcG9uZW50TGF5b3V0IHtcbiAgICAgICAgICAgIHJldHVybiBNeUhvcml6b250YWxNdWx0aVJvdyhcbiAgICAgICAgICAgICAgICB0aXRsZSxcbiAgICAgICAgICAgICAgICBicmVha3MsXG4gICAgICAgICAgICAgICAga2V5U2l6ZXMsXG4gICAgICAgICAgICAgICAgdGhlbWVcbiAgICAgICAgICAgIClcbiAgICAgICAg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HRpcExpbmUpXG4gICAgICAgIClcbiAgICB9XG5cbiAgICBjb21wYW5pb24gb2JqZWN0IHtcbiAgICAgICAgLy8gRm9yIHRlc3RzXG4gICAgICAgIGZ1biBjcmVhdGVUZXN0Q29udGV4dHVhbE1hcHBpbmcoXG4gICAgICAgICAgICBhZXNMaXN0Rm9yVG9vbHRpcDogTGlzdDxBZXM8Kj4+LFxuICAgICAgICAgICAgYXhpc0FlczogTGlzdDxBZXM8Kj4+LFxuICAgICAgICAgICAgb3V0bGllcnM6IExpc3Q8QWVzPCo+PixcbiAgICAgICAgICAgIGRhdGFBY2Nlc3M6IE1hcHBlZERhdGFBY2Nlc3MsXG4gICAgICAgICAgICBkYXRhRnJhbWU6IERhdGFGcmFtZSxcbiAgICAgICAgICAgIHVzZXJEZWZpbmVkVmFsdWVTb3VyY2VzOiBMaXN0PFZhbHVlU291cmNlPj8gPSBudWxsXG4gICAgICAgICk6IENvbnRleHR1YWxNYXBwaW5nIHtcbiAgICAgICAgICAgIHZhbCBkZWZhdWx0VG9vbHRpcExpbmVzID0gR2VvbUludGVyYWN0aW9uQnVpbGRlclV0aWwuZGVmYXVsdFZhbHVlU291cmNlVG9vbHRpcExpbmVzKFxuICAgICAgICAgICAgICAgIGFlc0xpc3RGb3JUb29sdGlwLFxuICAgICAgICAgICAgICAgIGF4aXNBZXMsXG4gICAgICAgICAgICAgICAgb3V0bGllcnMsXG4gICAgICAgICAgICAgICAgdXNlckRlZmluZWRWYWx1ZVNvdXJjZXNcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIHJldHVybiBjcmVhdGVDb250ZXh0dWFsTWFwcGluZyhcbiAgICAgICAgICAgICAgICBkZWZhdWx0VG9vbHRpcExpbmVzLFxuICAgICAgICAgICAgICAgIGRhdGFBY2Nlc3MsXG4gICAgICAgICAgICAgICAgZGF0YUZyYW1lLFxuICAgICAgICAgICAgICAgIFRvb2x0aXBQcm9wZXJ0aWVzLk5PTkUsXG4gICAgICAgICAgICAgICAgaWd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RhdGFGcmFtZSwgZGF0YUFjY2VzcykgfVxuXG4gICAgICAgICAgICB2YWwgaGFzR2VuZXJhbFRvb2x0aXAgPSBtYXBwZWRUb29sdGlwTGluZXMuYW55IHsgbGluZSAtPlxuICAgICAgICAgICAgICAgIGxpbmUuZmllbGRzLm5vbmUoVmFsdWVTb3VyY2U6OmlzT3V0bGllcilcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhbCBoYXNBeGlzVG9vbHRpcCA9IG1hcHBlZFRvb2x0aXBMaW5lcy5hbnkgeyBsaW5lIC0+XG4gICAgICAgICAgICAgICAgbGluZS5maWVsZHMuYW55KFZhbHVlU291cmNlOjppc0F4aXMpXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRvb2x0aXBUaXRsZT8uaW5pdERhdGFDb250ZXh0KGRhdGFGcmFtZSwgZGF0YUFjY2VzcylcblxuICAgICAgICAgICAgcmV0dXJuIENvbnRleHR1YWxNYXBwaW5nKFxuICAgICAgICAgICAgICAgIG1hcHBlZFRvb2x0aXBMaW5lcyxcbiAgICAgICAgICAgICAgICB0b29sdGlwUHJvcGVydGllcy5hbmNob3IsXG4gICAgICAgICAgICAgICAgdG9vbHRpcFByb3BlcnRpZXMubWluV2lkdGgsXG4gICAgICAgICAgICAgICAgaWdub3JlSW52aXNpYmxlVGFyZ2V0cyxcbiAgICAgICAgICAgICAgICBoYXNHZW5lcmFsVG9vbHRpcCxcbiAgICAgICAgICAgICAgICBoYXNBeGlzVG9vbHRpcCxcbiAgICAgICAgICAgICAgICBpc0Nyb3NzaGFpckVuYWJsZWQsXG4gICAgICAgICAgICAgICAgdG9vbHRpcFRpdGxlXG4gICAgICAgICAgICApXG4gICAgICAgIH1cbiAgICB9XG59XG4iLCIvKlxuICogQ29weXJpZ2h0IChjKSAyMDE5LiBKZXRCcmFpbnMgcy5yLm8uXG4gKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSB0aGUgTUlUI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B0b29sdGlwIHNwZWNpZmljYXRpb24gPT4gdXNlIGRlZmF1bHQgdG9vbHRpcHNcbiAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWVTb3VyY2VUb29sdGlwTGluZXMoXG4gICAgICAgICAgICAgICAgICAgIHRvb2x0aXBBZXMsXG4gICAgICAgICAgICAgICAgICAgIHRvb2x0aXBBeGlzQWVzLFxuICAgICAgICAgICAgICAgICAgICBzaWRlVG9vbHRpcEFlcyxcbiAgICAgICAgICAgICAgICAgICAgdXNlckRlZmluZWRWYWx1ZVNvdXJjZXMgPSBudWxsLFxuICAgICAgICAgICAgICAgICAgICBjb25zdGFudHNNYXAgPSB0b29sdGlwQ29uc3RhbnRBZXNcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB1c2VyVG9vbHRpcFNwZWMudXNlRGVmYXVsdFRvb2x0aXBzKCkgLT4ge1xuICAgICAgICAgICAgICAgIC8vIE5vIHVzZXIgbGluZSBwYXR0ZXJucyA9PiB1c2UgZGVmYXVsdCB0b29sdGlwcyB3aXRoIHRoZSBnaXZlbiBmb3JtYXR0ZWQgdmFsdWVTb3VyY2VzXG4gICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlU291cmNlVG9vbHRpcExpbmVzKFxuICAgICAgICAgICAgICAgICAgICB0b29sdGlwQWVzLFxuICAgICAgICAgICAgICAgICAgICB0b29sdGlwQXhpc0FlcyxcbiAgICAgICAgICAgICAgICAgICAgc2lkZVRvb2x0aXBBZXMsXG4gICAgICAgICAgICAgICAgICAgIHVzZXJUb29sdGlwU3BlYy52YWx1ZVNvdXJjZXMsXG4gICAgICAgICAgICAgICAgICAgIHRvb2x0aXBDb25zdGFudEFlc1xuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHVzZXJUb29sdGlwU3BlYy5oaWRlVG9vbHRpcHMoKSAtPiB7XG4gICAgICAgICAgICAgICAgLy8gVXNlciBsaXN0IGlzIG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YWVzIC0+XG4gICAgICAgICAgICAgICAgICAgIGdldE1hcHBpbmdWYWx1ZVNvdXJjZShhZXMsIGlzT3V0bGllciA9IHRydWUsIGlzQXhpcyA9IGZhbHNlLCB1c2VyVG9vbHRpcFNwZWMudmFsdWVTb3VyY2VzKVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHVzZXJUb29sdGlwU3BlYy50b29sdGlwTGluZVBhdHRlcm5zICtcbiAgICAgICAgICAgICAgICAgICAgICAgIChheGlzVmFsdWVTb3VyY2VzICsgZ2VvbU91dGxpZXJWYWx1ZVNvdXJjZXMpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLm1hcChUb29sdGlwTGluZS5Db21wYW5pb246OmRlZmF1bHRMaW5lRm9yVmFsdWVTb3VyY2UpXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cblxuICAgIHByaXZhdGUgZnVuIGdldE1hcHBpbmdWYWx1ZVNvdXJjZShcbiAgICAgICAgYWVzOiBBZXM8Kj4sXG4gICAgICAgIGlzT3V0bGllcjogQm9vbGVhbixcbiAgICAgICAgaXNBeGlzOiBCb29sZWFuLFxuICAgICAgICB1c2VyRGVmaW5lZFZhbHVlU291cmNlczogTGlzdDxWYWx1ZVNvdXJjZT4/XG4gICAgKTogVmFsdWVTb3VyY2Uge1xuICAgICAgICB2YWwgdXNlckRlZmluZWQgPSB1c2VyRGVmaW5lZFZhbHVlU291cmNlcz8uZmlsdGVySXNJbnN0YW5jZTxNYXBwaW5nVmFsdWU+KCk/LmZpbmQgeyBpdC5hZXMgPT0gYWVzIH1cbiAgICAgICAgcmV0dXJuIHVzZXJEZWZpbmVkPy53aXRoRmxhZ3MoaXNPdXRsaWVyLCBpc0F4aXMpID86IE1hcHBpbmdWYWx1ZShcbiAgICAgICAgICAgIGFlcyxcbiAgICAgICAgICAgIGlzT3V0bGllciA9IGlzT3V0bGllcixcbiAgICAgICAgICAgIGlzQXhpcyA9IGlzQXhpc1xu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bmN0aW9uS2luZFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgIClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBub25lKCk6IEdlb21Ub29sdGlwU2V0dXAge1xuICAgICAgICAgICAgdmFsIGF4aXNUb29sdGlwVmlzaWJpbGl0eUZyb21GdW5jdGlvbktpbmQgPSB0cnVlXG4gICAgICAgICAgICByZXR1cm4gR2VvbVRvb2x0aXBTZXR1cChcbiAgICAgICAgICAgICAgICBsb2NhdG9yTG9va3VwU3RyYXRlZ3kgPSBHZW9tVGFyZ2V0TG9jYXRvci5Mb29rdXBTdHJhdGVneS5OT05FLFxuICAgICAgICAgICAgICAgIGxvY2F0b3JMb29rdXBTcGFjZSA9IEdlb21UYXJnZXRMb2NhdG9yLkxvb2t1cFNwYWNlLk5PTkUsXG4gICAgICAgICAgICAgICAgYXhpc0Flc0Zyb21GdW5jdGlvbktpbmQgPSBlbXB0eUxpc3QoKSxcbiAgICAgICAgICAgICAgICBheGlzVG9vbHRpcFZpc2liaWxpdHlGcm9tRnVuY3Rpb25LaW5kID0gYXhpc1Rvb2x0aXBWaXNpYmlsaXR5RnJvbUZ1bmN0aW9uS2luZCxcbiAgICAgICAgICAgICAgICBheGlzVG9vbHRpcEVuYWJsZWQgPSBpc0F4aXNUb29sdGlwRW5hYmxlZChcbiAgICAgICAgICAgICAgICAgICAgYXhpc1Rvb2x0aXBWaXNpYmlsaXR5RnJvbUNvbmZpZyA9IG51bGwsXG4gICAgICAgICAgICAgICAgICAgIGF4aXNUb29sdGlwVmlzaWJpbGl0eUZyb21GdW5jdGlvbktpbmRcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICApXG4gICAgICAgIH1cblxuICAgICAgICBwcml2YXRlIGZ1biBpc0F4aXNUb29sdGlwRW5hYmxlZChcbiAgICAgICAgICAgIGF4aXNUb29sdGlwVmlzaWJpbGl0eUZyb21Db25maWc6IEJvb2xlYW4/LFxuICAgICAgICAgICAgYXhpc1Rvb2x0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gICAgICAgdmFsIGVuZCA9IHBvaW50c1tpXVxuXG4gICAgICAgICAgICBpZiAoc3RhcnQueSA+PSBjb29yZC55ICYmIGVuZC55ID49IGNvb3JkLnkgfHwgc3RhcnQueSA8IGNvb3JkLnkgJiYgZW5kLnkgPCBjb29yZC55KSB7XG4gICAgICAgICAgICAgICAgY29udGludWVcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFsIHggPSBzdGFydC54ICsgKGNvb3JkLnkgLSBzdGFydC55KSAqIChlbmQueCAtIHN0YXJ0LngpIC8gKGVuZC55IC0gc3RhcnQueSlcblxuICAgICAgICAgICAgaWYgKHggPD0gY29vcmQueCkge1xuICAgICAgICAgICAgICAgIGludGVyc2VjdGlvbkNvdW50KytcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBpbnRlcnNlY3Rpb25Db3VudCAlIDIgIT0gMFxuICAgIH1cblxuICAgIGZ1biBsaWVzT25TZWdtZW50KHAxOiBEb3VibGVWZWN0b3IsIHAyOiBEb3VibGVWZWN0b3IsIGM6IERvdWJsZVZlY3RvciwgZXBzaWxvbjogRG91YmxlKTogQm9vbGVhbiB7XG4gICAgICAgIHJldHVybiBEb3VibGVTZWdtZW50KHAxLCBwMikuZGlzdGFuY2UoYykgPCBlcHNpbG9uXG4gICAgfVxuXG4gICAgaW50ZXJuYWwgZnVuIGFyZUVxdWFsKHAxOiBEb3VibGVWZWN0b3IsIHAyOiBEb3VibGVWZWN0b3IsIGVwc2lsb246IERvdWJsZSk6IEJvb2xlYW4ge1xuICAgICAgICByZXR1cm4gcDEuc3VidHJhY3QocDIpLmxlbmd0aCgpIDwgZXBzaWxvblxuICAgIH1cblxuICAgIGludGVybmFsIGZ1biBhcmVFcXVhbChhOiBEb3VibGUsIGI6IERvdWJsZSwgZXBzaWxvbjogRG91YmxlKTogQm9vbGVhbiB7XG4gICAgICAgIHJldHVybiBhYnMoYSAtIGIpIDwgZXBzaWxvblxuICAgIH1cblxuICAgIGludGVybmFsIGZ1biBkaXN0YW5jZShwMTogRG91YmxlVmVjdG9yLCBwMjogRG91YmxlVmVjdG9yKTogRG91YmxlIHtcbiAgICAgICAgcmV0dXJuIERvdWJsZVNlZ21lbnQocDEsIHAyKS5sZW5ndGgoKVxuICAgIH1cblxuICAgIGludGVybmFsIGZ1biBzdWJ0cmFjdFgodjogRG91YmxlVmVjdG9yLCB4OiBEb3VibGUpOiBEb3VibGVWZWN0b3Ige1xuICAgICAgICByZXR1cm4gRG91YmxlVmVjdG9yKHYueCAtIHgsIHYueSlcbiAgICB9XG5cbiAgICBpbnRlcm5hbCBmdW4gYWRkWCh2OiBEb3VibGVWZWN0b3IsIHg6IERvdWJsZSk6IERvdWJsZVZlY3RvciB7XG4gICAgICAgIHJldHVybiBEb3VibGVWZWN0b3Iodi54ICsgeCwgdi55KVxuICAgIH1cblxuICAgIGZ1biBsZWZ0RWRnZU9mKHJlY3Q6IERvdWJsZVJlY3RhbmdsZSk6IERvdWJsZVNlZ21lbnQge1xuICAgICAgICByZXR1cm4gRG91YmxlU2VnbWVudChcbiAgICAgICAgICAgIERvdWJsZVZlY3RvcihyZWN0LmxlZnQsIHJlY3QudG9wKSxcbiAgICAgICAgICAgIERvdWJsZVZlY3RvcihyZWN0LmxlZnQsIHJlY3QuYm90dG9tKVxuICAgICAgICApXG4gICAgfVxuXG4gICAgZnVuIHRvcEVkZ2VPZihyZWN0OiBEb3VibGVSZWN0YW5nbGUpOiBEb3VibGVTZWdtZW50IHtcbiAgICAgICAgcmV0dXJuIERvdWJsZVNlZ21lbnQoXG4gICAgICAgICAgICBEb3VibGVWZWN0b3IocmVjdC5sZWZ0LCByZWN0LnRvcCksXG4gICAgICAgICAgICBEb3VibGVWZWN0b3IocmVjdC5yaWdodCwgcmVjdC50b3ApXG4gICAgICAgIClcbiAgICB9XG5cbiAgICBmdW4gcmlnaHRFZGdlT2YocmVjdDogRG91YmxlUmVjdGFuZ2xlKTogRG91YmxlU2VnbWVudCB7XG4gICAgICAgIHJldHVybiBEb3VibGVTZWdtZW50KFxuICAgICAgICAgICAgRG91YmxlVmVjdG9yKHJlY3QucmlnaHQsIHJlY3QudG9wKSxcbiAgICAgICAgICAgIERvdWJsZVZlY3RvcihyZWN0LnJpZ2h0LCByZWN0LmJvdHRvbSlcbiAgICAgICAgKVxuICAgIH1cblxuICAgIGZ1biBib3R0b21FZGdlT2YocmVjdDogRG91YmxlUmVjdGFuZ2xlKTogRG91YmxlU2VnbWVudCB7XG4gICAgICAgIHJldHVybiBEb3VibGVTZWdtZW50KFxuICAgICAgICAgICAgRG91YmxlVmVjdG9yKHJlY3QubGVmdCwgcmVjdC5ib3R0b20pLFxuICAgICAgICAgICAgRG91YmxlVmVjdG9yKHJlY3QucmlnaHQsIHJlY3QuYm90dG9tKVxuICAgICAgICApXG4gICAgfVxuXG5cbiAgICBjbGFzcyBDbG9zZXN0UG9pbnRDaGVja2VyIGludGVybmFsIGNvbnN0cnVjdG9yKHZhbCB0YXJnZXQ6IERvdWJsZVZlY3Rvcikge1xuICAgICAgICB2YXIgZGlzdGFuY2UgPSAtMS4wXG4gICAgICAgICAgICBwcml2YXRlIHNldFxuICAgICAgICB2YXIgY29vcmQ6IERvdWJsZVZlY3Rvcj8gPSBudWxsXG4gICAgICAgICAgICBwcml2YXRlIHNldFxuXG4gICAgICAgIGNvbnN0cnVjdG9yKHg6IERvdWJsZSwgeTogRG91YmxlKSA6IHRoaXMoRG91YmxlVmVjdG9yKHgsIHkpKVxuXG4gICAgICAgIGZ1biBjaGVjayhjb29yZDogRG91YmxlVmVjdG9yKTogQm9vbGVhbiB7XG4gICAgICAgICAgICB2YWwgY21wUmVzdWx0ID0gY29tcGFyZShjb29yZClcbiAgICAgICAgICAgIHJldHVybiBjbXBSZXN1bHQgPT0gQ09NUEFSSVNPTl9SRVNVTFQuTkVXX0NMT1NFUiB8fCBjbXBSZXN1bHQgPT0gQ09NUEFSSVNPTl9SRVNVTFQuRVFVQUxcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBjb21wYXJlKGNvb3JkOiBEb3VibGVWZWN0b3IpOiBDT01QQVJJU09OX1JFU1VMVCB7XG4gICAgICAgICAgICB2YWwgbmV3RGlzdGFuY2UgPSBkaXN0YW5jZSh0YXJnZXQsIGNvb3JkKVxuICAgICAgICAgICAgaWYgKGRpc3RhbmNlIDwgMCkge1xuICAgICAgICAgICAgICAgIHNldE5ld0Nsb3Nlc3RDb29yZChjb29yZCwgbmV3RGlzdGFuY2UpXG4gICAgICAgICAgICAgICAgcmV0dXJuIENPTVBBUklTT05fUkVTVUxULk5FV19DTE9TRVJcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGRpc3RhbmNlIDwgbmV3RGlzdGFuY2UpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gQ09NUEFSSVNPTl9SRVNVTFQuTkVXX0ZBUlRIRVJcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGRpc3RhbmNlID09IG5ld0Rpc3RhbmNlKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIENPTVBBUklTT05fUkVTVUxULkVRVUFMXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHNldE5ld0Nsb3Nlc3RDb29yZChjb29yZCwgbmV3RGlzdGFuY2UpXG4gICAgICAgICAgICByZXR1cm4gQ09NUEFSSVNPTl9SRVNVTFQuTkVXX0NMT1NFUlxuICAgICAgICB9XG5cbiAgICAgICAgcHJpdmF0ZSBmdW4gc2V0TmV3Q2xvc2VzdENvb3JkKGNvb3JkOiBEb3VibGVWZWN0b3IsIGRpc3RhbmNlOiBEb3VibGUpIHtcbiAgICAgICAgICAgIHRoaXMuZGlzdGFuY2UgPSBkaXN0YW5jZVxuICAgICAgICAgICAgdGhpcy5jb29yZCA9IGNvb3JkXG4gICAgICAgIH1cblxuICAgICAgICBlbnVtIGNsYXNzIENPTVBBUklTT05fUkVTVUxUIHtcbiAgICAgICAgICAgIE5FV19DTE9TRVI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lwU3BlY3MgKz0gb3V0bGllclRvb2x0aXBTcGVjKClcbiAgICAgICAgICAgIHRvb2x0aXBTcGVjcyArPSBnZW5lcmFsVG9vbHRpcFNwZWMoKVxuICAgICAgICAgICAgcmV0dXJuIHRvb2x0aXBTcGVjc1xuICAgICAgICB9XG5cbiAgICAgICAgcHJpdmF0ZSBmdW4gaGl0SW5kZXgoKSA9IG15R2VvbVRhcmdldC5oaXRJbmRleFxuICAgICAgICBwcml2YXRlIGZ1biB0aXBMYXlvdXRIaW50KCkgPSBteUdlb21UYXJnZXQudGlwTGF5b3V0SGludFxuICAgICAgICBwcml2YXRlIGZ1biBvdXRsaWVySGludHMoKSA9IG15R2VvbVRhcmdldC5hZXNUaXBMYXlvdXRIaW50c1xuXG4gICAgICAgIHByaXZhdGUgZnVuIG91dGxpZXJUb29sdGlwU3BlYygpOiBMaXN0PFRvb2x0aXBTcGVjPiB7XG4gICAgICAgICAgICB2YWwgdG9vbHRpcFNwZWNzID0gQXJyYXlMaXN0PFRvb2x0aXBTcGVjPigpXG4gICAgICAgICAgICB2YWwgb3V0bGllckRhdGFQb2ludHMgPSBvdXRsaWVyRGF0YVBvaW50cygpXG4gICAgICAgICAgICBvdXRsaWVySGludHMoKS5mb3JFYWNoIHsgKGFlcywgaGludCkgLT5cbiAgICAgICAgICAgICAgICB2YWwgbGluZXNGb3JBZXMgPSBvdXRsaWVyRGF0YVBvaW50c1xuICAgICAgICAgICAgICAgICAgICAuZmlsdGVyIHsgYWVzID09IGl0LmFlcyB9XG4gICAgICAgICAgICAgICAgICAgIC5tYXAoRGF0YVBvaW50Ojp2YWx1ZSlcbiAgICAgICAgICAgICAgICAgICAgLm1hcChUb29sdGlwU3BlYy5MaW5lLkNvbXBhbmlvbjo6d2l0aFZhbHVlKVxuICAgICAgICAgICAgICAgIGlmIChsaW5lc0ZvckFlcy5pc05vdEVtcHR5KCkpIHtcbiAgICAgICAgICAgICAgICAgICAgdG9vbHRpcFNwZWNzLmFkZChcbiAgICAgICAgICAgICAgICAgICAgICAgIFRvb2x0aXBTcGVjKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxheW91dEhpbnQgPSBoaW50LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlID0gbnVsbCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lcyA9IGxpbmVzRm9yQWVzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbGwgPSBoaW50LmZpbGxDb2xvciA/OiB0aXBMYXlvdXRIaW50KCkuZmlsbENvbG9yXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPzogdGlwTGF5b3V0SGludCgpLm1hcmtlckNvbG9ycy5maXJzdE9yTnVsbCgpID86IFdISVRFLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcmtlckNvbG9ycyA9IGVtcHR5TGlzdCgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzT3V0bGllciA9IHRydWVcbiAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiB0b29sdGlwU3BlY3NcbiAgICAgICAgfVxuXG5cbiAgICAgICAgcHJpdmF0ZSBmdW4gYXhpc1Rvb2x0aXBTcGVjKCk6IExpc3Q8VG9vbHRpcFNwZWM+IHtcbiAgICAgICAgICAgIHZhbCB0b29sdGlwU3BlY3MgPSBBcnJheUxpc3Q8VG9vbHRpcFNwZWM+KClcbiAgICAgICAgICAgIHZhbCBheGlzID0gbWFwT2YoXG4gICAgICAgICAgICAgICAgQWVzLlggdG8gYXhpc0RhdGFQb2ludHMoKS5maWx0ZXIgeyBBZXMuWCA9PSBpdC5hZXMgfS5tYXAoRGF0YVBvaW50Ojp2YWx1ZSlcbiAgICAgICAgICAgICAgICAgICAgLm1hcChUb29sdGlwU3BlYy5MaW5lLkNvbXBhbmlvbjo6d2l0aFZhbHVlKSxcbiAgICAgICAgICAgICAgICBBZXMuWSB0byBheGlzRGF0YVBvaW50cygpLmZpbHRlciB7IEFlcy5ZID09IGl0LmFlcyB9Lm1hcChEYXRhUG9pbnQ6OnZhbHVlKVxuICAgICAgICAgICAgICAgICAgICAubWFwKFRvb2x0aXBTcGVjLkxpbmUuQ29tcGFuaW9uOjp3aXRoVmFsdWUpXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBheGlzLmZvckVhY2ggeyAoYWVzLCBsaW5lcykgLT5cbiAgICAgICAgICAgICAgICBpZiAobGluZXMuaXNOb3RFbXB0eSgpKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhbCBsYXlvdXRIaW50ID0gY3JlYXRlSGludEZvckF4aXMoYWVzLCBmbGlwcGVkQXhpcylcbiAgICAgICAgICAgICAgICAgICAgdG9vbHRpcFNwZWNzLmFkZChcbiAgICAgICAgICAgICAgICAgICAgICAgIFRvb2x0aXBTcGVjKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxheW91dEhpbnQgPSBsYXlvdXRIaW50LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlID0gbnVsbCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lcyA9IGxpbmVzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbGwgPSBsYXlvdXRIaW50LmZpbGxDb2xvciEhLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcmtlckNvbG9ycyA9IGVtcHR5TGlzdCgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzT3V0bGllciA9IHRydWVcbiAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiB0b29sdGlwU3BlY3NcbiAgICAgICAgfVxuXG4gICAgICAgIHByaXZhdGUgZnVuIGdlbmVyYWxUb29sdGlwU3BlYygpOiBMaXN0PFRvb2x0aXBTcGVjPiB7XG4gICAgICAgICAgICB2YWwgZ2VuZXJhbERhdGFQb2ludHMgPSBnZW5lcmFsRGF0YVBvaW50cygpXG4gICAgICAgICAgICB2YWwgZ2VuZXJhbExpbmVzID0gZ2VuZXJhbERhdGFQb2ludHMubWFwIHsgVG9vbHRpcFNwZWMuTGluZS53aXRoTGFiZWxBbmRWYWx1ZShpdC5sYWJlbCwgaXQudmFsdWUpIH1cblxuICAgICAgICAgICAgcmV0dXJuIGlmIChnZW5lcmFsTGluZXMuaXNOb3RFbXB0eSgpKSB7XG4gICAgICAgICAgICAgICAgbGlzdE9mKFxuICAgICAgICAgICAgICAgICAgICBUb29sdGlwU3BlYyhcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpcExheW91dEhpbnQoKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlID0gbXlUb29sdGlwVGl0bGUsXG4gICAgICAgICAgICAgICAgICAgICAgICBsaW5lcyA9IGdlbmVyYWxMaW5lcyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpbGwgPSBudWxsLFxuICAgICAgICAgICAgICAgICAgICAgICAgbWFya2VyQ29sb3JzID0gdGlwTGF5b3V0SGludCgpLm1hcmtlckNvbG9ycyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlzT3V0bGllciA9IGZhbHNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgYW5jaG9yID0gbXlUb29sdGlwQW5jaG9yLFxuICAgICAgICAgICAgICAgICAgICAgICAgbWluV2lkdGggPSBteVRvb2x0aXBNaW5XaWR0aCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlzQ3Jvc3NoYWlyRW5hYmxlZCA9IG15SXNDcm9zc2hhaXJFbmFibGVkXG4gICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGVtcHR5TGlzdCgpXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBwcml2YXRlIGZ1biBvdXRsaWVyRGF0YVBvaW50cygpID0gbXlEYXRhUG9pbnRzLmZpbHRlciB7IGl0LmlzT3V0bGllciAmJiAhaXQuaXNBeGlzIH1cbiAgICAgICAgcHJpdmF0ZSBmdW4gYXhpc0RhdGFQb2ludHMoKSA9IG15RGF0YVBvaW50cy5maWx0ZXIoRGF0YVBvaW50Ojppc0F4aXMpXG5cbiAgICAgICAgcHJpdmF0ZSBmdW4gZ2VuZXJhbERhdGFQb2ludHMoKTogTGlzdDxEYXRhUG9pbnQ+IHtcbiAgICAgICAgICAgIHZhbCBub25PdXRsaWVyRGF0YVBvaW50cyA9IG15RGF0YVBvaW50cy5maWx0ZXJOb3QoRGF0YVBvaW50Ojppc091dGxpZXIpXG4gICAgICAgICAgICB2YWwgb3V0bGllcnMgPSBvdXRsaWVyRGF0YVBvaW50cygpLm1hcE5vdE51bGwoRGF0YVBvaW50OjphZXMpXG4gICAgICAgICAgICB2YWwgZ2VuZXJhbEFlc0xpc3QgPSBub25PdXRsaWVyRGF0YVBvaW50cy5tYXBOb3ROdWxsKERhdGFQb2ludDo6YWVzKSAtIG91dGxpZXJzXG4gICAgICAgICAgICByZXR1cm4gbm9uT3V0bGllckRhdGFQb2ludHMuZmlsdGVyIHsgZGF0YVBvaW50IC0+XG4gICAgICAgICAgICAgICAgd2hlbiAoZGF0YVBvaW50LmFlcykge1xuICAgICAgICAgICAgICAgICAgICBudWxsIC0+IHRydWUgICAgICAgICAgICAgICAgLy8gZ2V0IGFsbCBub3QgYWVzICh2YXJpYWJsZXMsIHRleHQpXG4gICAgICAgICAgICAgICAgICAgIGluIGdlbmVyYWxBZXNMaXN0IC0+IHRydWUgICAvLyBnZXQgYWxsIGV4aXN0ZWQgaW4gcHJlcGFyZWQgYWVzIGxpc3QgKG1hcHBlZCBhZXMpXG4gICAgICAgICAgICAgICAgICAgIGVsc2UgLT4gZmFsc2UgICAgICAgICAgICAgICAvLyBza2lwIG90aGVycyAoYXhpcylcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBwcml2YXRlIGZ1biBjcmVhdGVIaW50Rm9yQXhpcyhhZXM6IEFlczwqPiwgZmxpcHBlZEF4aXM6IEJvb2xlYW4pOiBUaXBMYXlvdXRIaW50IHtcbiAgICAgICAgICAgIHZhbCBheGlzID0gYWVzLmxldCB7XG4gICAgICAgICAgICAgICAgd2hlbiB7XG4gICAgICAgICAgICAgICAgICAgIGZsaXBwZWRBeGlzICYmIGl0ID09IEFlcy5YIC0+IEFlcy5ZXG4gICAgICAgICAgICAgICAgICAgIGZsaXBwZWRBeGlzICYmIGl0ID09IEFlcy5ZIC0+IEFlcy5YXG4gICAgICAgICAgICAgICAgICAgIGVsc2UgLT4gaXRcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gd2hlbiAoYXhpcykge1xuICAgICAgICAgICAgICAgIEFlcy5YIC0+IHtcbiAgICAgICAgICAgICAgICAgICAgVGlwTGF5b3V0SGludC54QXhpc1Rvb2x0aXAoXG4gICAgICAgICAgICAgICAgICAgICAgICBjb29yZCA9IERvdWJsZVZlY3Rvcih0aXBMYXlvdXRIaW50KCkuY29vcmQhIS54LCBheGlzT3JpZ2luLnkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgYXhpc1JhZGl1cyA9IEFYSVNfUkFESVVTLFxuICAgICAgICAgICAgICAgICAgICAgICAgZmlsbENvbG9yID0geEF4aXNUaGVtZS50b29sdGlwRmlsbCgpXG4gICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBBZXMuWSAtPiB7XG4gICAgICAgICAgICAgICAgICAgIFRpcExheW91dEhpbnQueUF4aXNUb29sdGlwKFxuICAgICAgICAgICAgICAgICAgICAgICAgY29vcmQgPSBEb3VibGVWZWN0b3IoYXhpc09yaWdpbi54LCB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WxwaGEgPT0gMCB9KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGFkZFRhcmdldChcbiAgICAgICAgICAgIFRhcmdldFByb3RvdHlwZShcbiAgICAgICAgICAgICAgICBIaXRTaGFwZS5wb2ludChwb2ludCwgcmFkaXVzKSxcbiAgICAgICAgICAgICAgICB7IGluZGV4IH0sXG4gICAgICAgICAgICAgICAgdG9vbHRpcFBhcmFtcyxcbiAgICAgICAgICAgICAgICB0b29sdGlwS2luZFxuICAgICAgICAgICAgKVxuICAgICAgICApXG4gICAgfVxuXG4gICAgb3ZlcnJpZGUgZnVuIGFkZFJlY3RhbmdsZShcbiAgICAgICAgaW5kZXg6IEludCxcbiAgICAgICAgcmVjdGFuZ2xlOiBEb3VibGVSZWN0YW5nbGUsXG4gICAgICAgIHRvb2x0aXBQYXJhbXM6IEdlb21UYXJnZXRDb2xsZWN0b3IuVG9vbHRpcFBhcmFtcyxcbiAgICAgICAgdG9vbHRpcEtpbmQ6IFRpcExheW91dEhpbnQuS2luZFxuICAgICkge1xuICAgICAgICBpZiAoY29udGV4dHVhbE1hcHBpbmcuaWdub3JlSW52aXNpYmxlVGFyZ2V0cykge1xuICAgICAgICAgICAgaWYgKHJlY3RhbmdsZS53aWR0aCA9PSAwLjAgfHwgcmVjdGFuZ2xlLmhlaWdodCA9PSAwLjAgfHwgdG9vbHRpcFBhcmFtcy5tYXJrZXJDb2xvcnMuYWxsIHsgaXQuYWxwaGEgPT0gMCB9KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgYWRkVGFyZ2V0KFxuICAgICAgICAgICAgVGFyZ2V0UHJvdG90eXBlKFxuICAgICAgICAgICAgICAgIEhpdFNoYXBlLnJlY3QocmVjdGFuZ2xlKSxcbiAgICAgICAgICAgICAgICB7IGluZGV4IH0sXG4gICAgICAgICAgICAgICAgdG9vbHRpcFBhcmFtcyxcbiAgICAgICAgICAgICAgICB0b29sdGlwS2luZFxuICAgICAgICAgICAgKVxuICAgICAgICApXG4gICAgfVxuXG4gICAgb3ZlcnJpZGUgZnVuIGFkZFBhdGgoXG4gICAgICAgIHBvaW50czogTGlzdDxEb3VibGVWZWN0b3I+LFxuICAgICAgICBsb2NhbFRvR2xvYmFsSW5kZXg6IChJbnQpIC0+IEludCxcbiAgICAgICAgdG9vbHRpcFBhcmFtczogR2VvbVRhcmdldENvbGxlY3Rvci5Ub29sdGlwUGFyYW1zLFxuICAgICAgICB0b29sdGlwS2luZDogVGlwTGF5b3V0SGludC5LaW5kXG4gICAgKSB7XG4gICAgICAgIGFkZFRhcmdldChcbiAgICAgICAgICAgIFRhcmdldFByb3RvdHlwZShcbiAgICAgICAgICAgICAgICBIaXRTaGFwZS5wYXRoKHBvaW50cyksXG4gICAgICAgICAgICAgICAgbG9jYWxUb0dsb2JhbEluZGV4LFxuICAgICAgICAgICAgICAgIHRvb2x0aXBQYXJhbXMsXG4gICAgICAgICAgICAgICAgdG9vbHRpcEtpbmRcbiAgICAgICAgICAgIClcbiAgICAgICAgKVxuICAgIH1cblxuICAgIG92ZXJyaWRlIGZ1biBhZGRQb2x5Z29uKFxuICAgICAgICBwb2ludHM6IExpc3Q8RG91YmxlVmVjdG9yPixcbiAgICAgICAgbG9jYWxUb0dsb2JhbEluZGV4OiAoSW50KSAtPiBJbnQsXG4gICAgICAgIHRvb2x0aXBQYXJhbXM6IEdlb21UYXJnZXRDb2xsZWN0b3IuVG9vbHRpcFBhcmFtcyxcbiAgICAgICAgdG9vbHRpcEtpbmQ6IFRpcExheW91dEhpbnQuS2luZFxuICAgICkge1xuICAgICAgICBhZGRUYXJnZXQoXG4gICAgICAgICAgICBUYXJnZXRQcm90b3R5cGUoXG4gICAgICAgICAgICAgICAgSGl0U2hhcGUucG9seWdvbihwb2ludHMpLFxuICAgICAgICAgICAgICAgIGxvY2FsVG9HbG9iYWxJbmRleCxcbiAgICAgICAgICAgICAgICB0b29sdGlwUGFyYW1zLFxuICAgICAgICAgICAgICAgIHRvb2x0aXBLaW5kXG4gICAgICAgICAgICApXG4gICAgICAgIClcbiAgICB9XG5cbiAgICBvdmVycmlkZSBmdW4gd2l0aEZsaXBwZWRBeGlzKCk6IEdlb21UYXJnZXRDb2xsZWN0b3Ige1xuICAgICAgICByZXR1cm4gRmxpcHBlZFRhcmdldENvbGxlY3Rvcih0aGlzKVxuICAgIH1cblxuICAgIG92ZXJyaWRlIGZ1biB3aXRoWU9yaWVudGF0aW9uKCk6IEdlb21UYXJnZXRDb2xsZWN0b3Ige1xuICAgICAgICByZXR1cm4gWU9yaWVudGF0aW9uVGFyZ2V0Q29sbGVjdG9yKHRoaXMpXG4gICAgfVxuXG4gICAgcHJpdmF0ZSBmdW4gYWRkVGFyZ2V0KHRhcmdldFByb3RvdHlwZTogVGFyZ2V0UHJvdG90eXBlKSB7XG4gICAgICAgIG15VGFyZ2V0cy5hZGQodGFyZ2V0UHJvdG90eXBlKVxuICAgICAgICBteUxvY2F0b3IgPSBudWxsXG4gICAgfVxuXG4gICAgb3ZlcnJpZGUgZnVuIHNlYXJjaChjb29yZDogRG91YmxlVmVjdG9yKTogR2VvbVRhcmdldExvY2F0b3IuTG9va3VwUmVzdWx0PyB7XG4gICAgICAgIGlmIChteUxvY2F0b3IgPT0gbnVsbCkge1xuICAgICAgICAgICAgbXlMb2NhdG9yID0gTGF5ZXJUYXJnZXRMb2NhdG9yKFxuICAgICAgICAgICAgICAgIGdlb21LaW5kLFxuICAgICAgICAgICAgICAgIGxvb2t1cFNwZWMsXG4gICAgICAgICAgICAgICAgY29udGV4dHVhbE1hcHBpbmcsXG4gICAgICAgICAgICAgICAgbXlUYXJnZXRzXG4gICAgICAgICAgICApXG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG15TG9jYXRvciEhLnNlYXJjaChjb29yZClcbiAgICB9XG59XG4iLCIvKlxuICogQ29weXJpZ2h0IChjKSAyMDE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OiBUYXJnZXRQcm90b3R5cGUpOiBUYXJnZXRQcm9qZWN0aW9uIHtcbiAgICAgICAgICAgIHJldHVybiB3aGVuIChwcm90b3R5cGUuaGl0U2hhcGUua2luZCkge1xuICAgICAgICAgICAgICAgIFBPSU5UIC0+IFBvaW50VGFyZ2V0UHJvamVjdGlvbi5jcmVhdGUoXG4gICAgICAgICAgICAgICAgICAgIHByb3RvdHlwZS5oaXRTaGFwZS5wb2ludC5jZW50ZXIsXG4gICAgICAgICAgICAgICAgICAgIGxvb2t1cFNwZWMubG9va3VwU3BhY2VcbiAgICAgICAgICAgICAgICApXG5cbiAgICAgICAgICAgICAgICBSRUNUIC0+IFJlY3RUYXJnZXRQcm9qZWN0aW9uLmNyZWF0ZShcbiAgICAgICAgICAgICAgICAgICAgcHJvdG90eXBlLmhpdFNoYXBlLnJlY3QsXG4gICAgICAgICAgICAgICAgICAgIGxvb2t1cFNwZWMubG9va3VwU3BhY2VcbiAgICAgICAgICAgICAgICApXG5cbiAgICAgICAgICAgICAgICBQT0xZR09OIC0+IFBvbHlnb25UYXJnZXRQcm9qZWN0aW9uLmNyZWF0ZShcbiAgICAgICAgICAgICAgICAgICAgcHJvdG90eXBlLmhpdFNoYXBlLnBvaW50cyxcbiAgICAgICAgICAgICAgICAgICAgbG9va3VwU3BlYy5sb29rdXBTcGFjZVxuICAgICAgICAgICAgICAgIClcblxuICAgICAgICAgICAgICAgIFBBVEggLT4gUGF0aFRhcmdldFByb2plY3Rpb24uY3JlYXRlKFxuICAgICAgICAgICAgICAgICAgICBwcm90b3R5cGUuaGl0U2hhcGUucG9pbnRzLFxuICAgICAgICAgICAgICAgICAgICBwcm90b3R5cGUuaW5kZXhNYXBwZXIsXG4gICAgICAgICAgICAgICAgICAgIGxvb2t1cFNwZWMubG9va3VwU3BhY2VcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBmb3IgKHByb3RvdHlwZSBpbiB0YXJnZXRQcm90b3R5cGVzKSB7XG4gICAgICAgICAgICBteVRhcmdldHMuYWRkKFxuICAgICAgICAgICAgICAgIFRhcmdldChcbiAgICAgICAgICAgICAgICAgICAgdG9Qcm9qZWN0aW9uKHByb3RvdHlwZSksXG4gICAgICAgICAgICAgICAgICAgIHByb3RvdHlwZVxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgIClcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHByaXZhdGUgZnVuIGFkZExvb2t1cFJlc3VsdHMoXG4gICAgICAgIGNvbGxlY3RvcjogQ29sbGVjdG9yPEdlb21UYXJnZXQ+LFxuICAgICAgICB0YXJnZXRzOiBNdXRhYmxlTGlzdDxHZW9tVGFyZ2V0TG9jYXRvci5Mb29rdXBSZXN1bHQ+XG4gICAgKSB7XG4gICAgICAgIGlmIChjb2xsZWN0b3Iuc2l6ZSgpID09IDApIHtcbiAgICAgICAgICAgIHJldHVyblxuICAgICAgICB9XG5cbiAgICAgICAgdGFyZ2V0cy5hZGQoXG4gICAgICAgICAgICBHZW9tVGFyZ2V0TG9jYXRvci5Mb29rdXBSZXN1bHQoXG4gICAgICAgICAgICAgICAgY29sbGVjdG9yLmNvbGxlY3Rpb24oKSxcbiAgICAgICAgICAgICAgICAvLyBEaXN0YW5jZSBjYW4gYmUgbmVnYXRpdmUgd2hlbiBsb29rdXAgc3BhY2UgaXMgWFxuICAgICAgICAgICAgICAgIC8vIEluIHRoaXMgY2FzZSB1c2UgMC4wIGFzIGEgZGlzdGFuY2UgLSB3ZSBoYXZlIGEgZGlyZWN0IGhpdC5cbiAgICAgICAgICAgICAgICBtYXgoMC4wLCBjb2xsZWN0b3IuY2xvc2VzdFBvaW50Q2hlY2tlci5kaXN0YW5jZSksXG4gICAgICAgICAgICAgICAgZ2VvbUtpbmQsXG4gICAgICAgICAgICAgICAgY29udGV4dHVhbE1hcHBpbmcsXG4gICAgICAgICAgICAgICAgY29udGV4dHVhbE1hcHBpbmcuaXNDcm9zc2hhaXJFbmFibGVkXG4gICAgICAgICAgICApXG4gICAgICAgIClcbiAgICB9XG5cbiAgICBvdmVycmlkZSBmdW4gc2VhcmNoKGNvb3JkOiBEb3VibGVWZWN0b3IpOiBHZW9tVGFyZ2V0TG9jYXRvci5Mb29rdXBSZXN1bHQ/IHtcbiAgICAgICAgaWYgKG15VGFyZ2V0cy5pc0VtcHR5KCkpIHtcbiAgICAgICAgICAgIHJldHVybiBudWxsXG4gICAgICAgIH1cblxuICAgICAgICB2YWwgcmVjdENvbGxlY3RvciA9IENvbGxlY3RvcjxHZW9tVGFyZ2V0PihcbiAgICAgICAgICAgIGNvb3JkLFxuICAgICAgICAgICAgbXlDb2xsZWN0aW5nU3RyYXRlZ3ksXG4gICAgICAgICAgICBsb29rdXBTcGVjLmxvb2t1cFNwYWNlXG4gICAgICAgIClcbiAgICAgICAgdmFsIHBvaW50Q29sbGVjdG9yID0gQ29sbGVjdG9yPEdlb21UYXJnZXQ+KFxuICAgICAgICAgICAgY29vcmQsXG4gICAgICAgICAgICBteUNvbGxlY3RpbmdTdHJhdGVneSxcbiAgICAgICAgICAgIGxvb2t1cFNwZWMubG9va3VwU3BhY2VcbiAgICAgICAgKVxuICAgICAgICB2YWwgcGF0aENvbGxlY3RvciA9IENvbGxlY3RvcjxHZW9tVGFyZ2V0PihcbiAgICAgICAgICAgIGNvb3JkLFxuICAgICAgICAgICAgbXlDb2xsZWN0aW5nU3RyYXRlZ3ksXG4gICAgICAgICAgICBsb29rdXBTcGVjLmxvb2t1cFNwYWNlXG4gICAgICAgIClcblxuICAgICAgICAvLyBTaG91bGQgYWx3YXlzIHJlcGxhY2UgYmVjYXVzZSBvZiBwb2x5Z29uIHdpdGggaG9sZXMgLSBvbmx5IHRvcCBzaG91bGQgaGF2ZSB0b29sdGlwLlxuICAgICAgICB2YWwgcG9seWdvbkNvbGxlY3RvciA9IENvbGxlY3RvcjxHZW9tVGFyZ2V0PihcbiAgICAgICAgICAgIGNvb3JkLFxuICAgICAgICAgICAgQ29sb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dGFyZ2V0LnByb3RvdHlwZS5oaXRTaGFwZS5yZWN0XG4gICAgICAgICAgICB2YWwgeU9mZnNldCA9IHdoZW4gKHRhcmdldC5wcm90b3R5cGUudG9vbHRpcEtpbmQpIHtcbiAgICAgICAgICAgICAgICBDVVJTT1JfVE9PTFRJUCAtPiByZWN0LmhlaWdodCAvIDIuMFxuICAgICAgICAgICAgICAgIGVsc2UgLT4gMC4wXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJlc3VsdENvbGxlY3Rvci5jb2xsZWN0KFxuICAgICAgICAgICAgICAgIHRhcmdldC5wcm90b3R5cGUuY3JlYXRlR2VvbVRhcmdldChcbiAgICAgICAgICAgICAgICAgICAgcmVjdC5vcmlnaW4uYWRkKERvdWJsZVZlY3RvcihyZWN0LndpZHRoIC8gMiwgeU9mZnNldCkpLFxuICAgICAgICAgICAgICAgICAgICBnZXRLZXlGb3JTaW5nbGVPYmplY3RHZW9tZXRyeSh0YXJnZXQucHJvdG90eXBlKVxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgIClcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHByaXZhdGUgZnVuIHByb2Nlc3NQb2x5Z29uKGNvb3JkOiBEb3VibGVWZWN0b3IsIHRhcmdldDogVGFyZ2V0LCByZXN1bHRDb2xsZWN0b3I6IENvbGxlY3RvcjxHZW9tVGFyZ2V0Pikge1xuICAgICAgICBpZiAobXlUYXJnZXREZXRlY3Rvci5jaGVja1BvbHlnb24oY29vcmQsIHRhcmdldC5wb2x5Z29uUHJvamVjdGlvbiwgcmVzdWx0Q29sbGVjdG9yLmNsb3Nlc3RQb2ludENoZWNrZXIpKSB7XG5cbiAgICAgICAgICAgIHJlc3VsdENvbGxlY3Rvci5jb2xsZWN0KFxuICAgICAgICAgICAgICAgIHRhcmdldC5wcm90b3R5cGUuY3JlYXRlR2VvbVRhcmdldChcbiAgICAgICAgICAgICAgICAgICAgY29vcmQsXG4gICAgICAgICAgICAgICAgICAgIG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NwYWNlID09IEdlb21UYXJnZXRMb2NhdG9yLkxvb2t1cFNwYWNlLlgpIHtcbiAgICAgICAgICAgIENsb3Nlc3RQb2ludENoZWNrZXIoRG91YmxlVmVjdG9yKGN1cnNvci54LCAwLjApKVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgQ2xvc2VzdFBvaW50Q2hlY2tlcihjdXJzb3IpXG4gICAgICAgIH1cbiAgICAgICAgcHJpdmF0ZSB2YXIgbXlMYXN0QWRkZWREaXN0YW5jZTogRG91YmxlID0gLTEuMFxuXG4gICAgICAgIGZ1biBjb2xsZWN0KGRhdGE6IFQpIHtcbiAgICAgICAgICAgIHdoZW4gKG15U3RyYXRlZ3kpIHtcbiAgICAgICAgICAgICAgICBDb2xsZWN0aW5nU3RyYXRlZ3kuQVBQRU5EIC0+IGFkZChkYXRhKVxuICAgICAgICAgICAgICAgIENvbGxlY3RpbmdTdHJhdGVneS5SRVBMQUNFIC0+IHJlcGxhY2UoZGF0YSlcbiAgICAgICAgICAgICAgICBDb2xsZWN0aW5nU3RyYXRlZ3kuQVBQRU5EX0lGX0VRVUFMIC0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG15TGFzdEFkZGVkRGlzdGFuY2UgPT0gY2xvc2VzdFBvaW50Q2hlY2tlci5kaXN0YW5jZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYWRkKGRhdGEpXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXBsYWNlKGRhdGEpXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgQ29sbGVjdGluZ1N0cmF0ZWd5LklHTk9SRSAtPiByZXR1cm5cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBjb2xsZWN0aW9uKCk6IExpc3Q8VD4ge1xuICAgICAgICAgICAgcmV0dXJuIHJlc3VsdFxuICAgICA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gICAgICAuZmlsdGVyIHsgKF8sIGRpc3RhbmNlKSAtPiBkaXN0YW5jZSA9PSBtaW5EaXN0YW5jZSB9XG4gICAgICAgICAgICAubWFwIHsgKGxvb2t1cFJlc3VsdCwgXykgLT4gbG9va3VwUmVzdWx0IH1cbiAgICAgICAgICAgIC5mb3JFYWNoIHsgbG9va3VwUmVzdWx0IC0+XG4gICAgICAgICAgICAgICAgcGlja2VkID0gd2hlbiB7XG4gICAgICAgICAgICAgICAgICAgIHBpY2tlZC5pc05vdEVtcHR5KCkgJiYgbG9va3VwUmVzdWx0Lmdlb21LaW5kIGluIGxpc3RPZihURVhULCBMQUJFTCkgLT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gVEVYVCB0b29sdGlwcyBhcmUgY29uc2lkZXJlZCBvbmx5IHdoZW4gbm8gb3RoZXIgdG9vbHRpcHMgYXJlIHByZXNlbnQuXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBPdGhlcndpc2UsIFRFWFQgbGF5ZXIgaXMgdXNlZCBhcyBkZWNvcmF0aW9uLCBlLmcuIHZhbHVlcyBvZiBiYXJzLCBoaXN0b2dyYW1zLCBjb3JycGxvdCxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGFuZCB3ZSBhY3R1YWxseSB3YW50IHRvIHNlZSBhbmNlc3RvcnMgZ2VvbSB0b29sdGlwLlxuICAgICAgICAgICAgICAgICAgICAgICAgcGlja2VkXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcGlja2VkLmlzTm90RW1wdHkoKSAmJiBzdGFja2FibGVSZXN1bHRzKHBpY2tlZFswXSwgbG9va3VwUmVzdWx0KSAtPiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBwaWNrZWQgKyBsb29rdXBSZXN1bHRcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIC0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpc3RPZihsb29rdXBSZXN1bHQpXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgdmFsIGFsbENvbnNpZGVyZWRSZXN1bHRzID0gd2l0aERpc3RhbmNlcy5tYXAgeyAobG9va3VwUmVzdWx0LCBfKSAtPiBsb29rdXBSZXN1bHQgfVxuXG4gICAgICAgIHJldHVybiB3aGVuIHtcbiAgICAgICAgICAgIHBpY2tlZC5hbnkgeyBoYXNHZW5lcmFsVG9vbHRpcChpdCkgJiYgaGFzQXhpc1Rvb2x0aXAoaXQpIH0gLT4gcGlja2VkXG4gICAgICAgICAgICBhbGxDb25zaWRlcmVkUmVzdWx0cy5ub25lKDo6aGFzR2VuZXJhbFRvb2x0aXApIC0+IHBpY2tlZFxuICAgICAgICAgICAgYWxsQ29uc2lkZXJlZFJlc3VsdHMuYW55IHsgaGFzR2VuZXJhbFRvb2x0aXAoaXQpICYmIGhhc0F4aXNUb29sdGlwKGl0KSB9IC0+IHtcbiAgICAgICAgICAgICAgICBsaXN0T2YoXG4gICAgICAgICAgICAgICAgICAgIHdpdGhEaXN0YW5jZXNcbiAgICAgICAgICAgICAgICAgICAgICAgIC5zb3J0ZWRCeURlc2NlbmRpbmcgeyAoXywgZGlzdGFuY2UpIC0+IGRpc3RhbmNlIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIC5tYXAgeyAobG9va3VwUmVzdWx0LCBfKSAtPiBsb29rdXBSZXN1bHQgfVxuICAgICAgICAgICAgICAgICAgICAgICAgLmxhc3QgeyBoYXNHZW5lcmFsVG9vbHRpcChpdCkgJiYgaGFzQXhpc1Rvb2x0aXAoaXQpIH1cbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIC0+IHtcbiAgICAgICAgICAgICAgICB3aXRoKFxuICAgICAgICAgICAgICAgICAgICB3aXRoRGlzdGFuY2VzXG4gICAgICAgICAgICAgICAgICAgICAgICAuc29ydGVkQnlEZXNjZW5kaW5nIHsgKF8sIGRpc3RhbmNlKSAtPiBkaXN0YW5jZSB9XG4gICAgICAgICAgICAgICAgICAgICAgICAubWFwIHsgKGxvb2t1cFJlc3VsdCwgXykgLT4gbG9va3VwUmVzdWx0IH1cbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgbGlzdE9mTm90TnVsbChcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RPck51bGwoOjpoYXNHZW5lcmFsVG9vbHRpcCksXG4gICAgICAgICAgICAgICAgICAgICAgICBsYXN0T3JOdWxsKDo6aGFzQXhpc1Rvb2x0aXApXG4gICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBjb21wYW5pb24gb2JqZWN0IHtcbiAgICAgICAgaW50ZXJuYWwgY29uc3QgdmFsIENVVE9GRl9ESVNUQU5DRSA9IDMwLjBcbiAgICAgICAgaW50ZXJuYWwgY29uc3QgdmFsIEZBS0VfRElTVEFOQ0UgPSAxNS4wXG5cbiAgICAgICAgLy8gQ29uc2lkZXIgbGF5ZXJzIHdpdGggdGhlIHNhbWUgZ2VvbSBhcyBhIHNpbmdsZSBsYXllciB0byBqb2luIHRoZWlyIHRvb2x0aXBzXG4gICAgICAgIHByaXZhdGUgdmFsIFNUQUNLQUJMRV9HRU9NUyA9IHNldE9mKFxuICAgICAgICAgICAgREVOU0lUWSxcbiAgICAgICAgICAgIEZSRVFQT0xZLFxuICAgICAgICAgICAgQk9YX1BMT1QsXG4gICAgICAgICAgICBISVNUT0dSQU0sXG4gICAgICAgICAgICBMSU5FLFxuICAgICAgICAgICAgQVJFQSxcbiAgICAgICAgICAgIEJBUixcbiAgICAgICAgICAgIEVSUk9SX0JBUixcbiAgICAgICAgICAgIENST1NTX0JBUixcbiAgICAgICAgICAgIExJTkVfUkFOR0UsXG4gICAgICAgICAgICBQT0lOVF9SQU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hdGhVdGlsLmRpc3RhbmNlKGNvb3JkLCB0YXJnZXQudGlwTGF5b3V0SGludC5jb29yZCEhKSB9XG4gICAgICAgICAgICAgICAgICAgICAgICAubWluT3JOdWxsKClcbiAgICAgICAgICAgICAgICAgICAgICAgID86IEZBS0VfRElTVEFOQ0VcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGRpc3RhbmNlXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBwcml2YXRlIGZ1biBzdGFja2FibGVSZXN1bHRzKGxmdDogTG9va3VwUmVzdWx0LCByZ3Q6IExvb2t1cFJlc3VsdCk6IEJvb2xlYW4ge1xuICAgICAgICAgICAgcmV0dXJuIGxmdC5nZW9tS2luZCA9PT0gcmd0Lmdlb21LaW5kICYmIFNUQUNLQUJMRV9HRU9NUy5jb250YWlucyhyZ3QuZ2VvbUtpbmQpXG4gICAgICAgIH1cblxuICAgICAgICBwcml2YXRlIGZ1biBmaWx0ZXJSZXN1bHRzKGxvb2t1cFJlc3VsdDogTG9va3VwUmVzdWx0LCBjb29yZDogRG91YmxlVmVjdG9yPywgZmxpcHBlZEF4aXM6IEJvb2xlYW4pOiBMb29rdXBSZXN1bHQge1xuICAgICAgICAgICAgaWYgKGNvb3JkID09IG51bGwgfHwgbG9va3VwUmVzdWx0Lmdlb21LaW5kICFpbiBzZXRPZihERU5TSVRZLCBISVNUT0dSQU0sIEZSRVFQT0xZLCBMSU5FLCBBUkVBLCBTRUdNRU5UKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBsb29rdXBSZXN1bHRcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgZnVuIHhEaXN0YW5jZVRvQ29vcmQodGFyZ2V0OiBHZW9tVGFyZ2V0KTogRG91YmxlIHtcbiAgICAgICAgICAgICAgICB2YWwgZGlzdGFuY2UgPSB0YXJnZXQudGlwTGF5b3V0SGludC5jb29yZCEhLnN1YnRyYWN0KGNvb3JkKVxuICAgICAgICAgICAgICAgIHJldHVybiB3aGVuIChmbGlwcGVkQXhpcykge1xuICAgICAgICAgICAgICAgICAgICB0cnVlIC0+IGRpc3RhbmNlLnlcbiAgICAgICAgICAgICAgICAgICAgZmFsc2UgLT4gZGlzdGFuY2UueFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gR2V0IGNsb3Nlc3QgdGFyZ2V0cyBhbmQgcmVtb3ZlIGR1cGxpY2F0ZXNcbiAgICAgICAgICAgIHZhbCBnZW9tVGFyZ2V0cyA9IGxvb2t1cFJlc3VsdC50YXJnZXRzLmZpbHRlciB7IGl0LnRpcExheW91dEhpbnQuY29vcmQgIT0gbnVsbCB9XG5cbiAgICAgICAgICAgIHZhbCBtaW5YRGlzdGFuY2VUb1RhcmdldCA9IGdlb21UYXJnZXRzXG4gICAgICAgICAgICAgICAgLm1hcCg6OnhEaXN0YW5jZVRvQ29vcmQpXG4gICAgICAgICAgICAgICAgLm1pbkJ5T3JOdWxsKDo6YWJzKVxuXG4gICAgICAgICAgICB2YWwgbmV3VGFyZ2V0cyA9IGdlb21UYXJnZXRzXG4gICAgICAgICAgICAgICAgLmZpbHRlciB7IHRhcmdldCAtPiB4RGlzdGFuY2VUb0Nvb3JkKHRhcmdldCkgPT0gbWluWERpc3RhbmNlVG9UYXJnZXQgfVxuICAgICAgICAgICAgICAgIC5kaXN0aW5jdEJ5KEdlb21UYXJnZXQ6OmhpdEluZGV4KVxuXG4gICAgICAgICAgICByZXR1cm4gTG9va3VwUmVzdWx0KFxuICAgICAgICAgICAgICAgIHRhcmdldHMgPSBuZXdUYXJnZXRzLFxuICAgICAgICAgICAgICAgIGRpc3RhbmNlID0gbG9va3VwUmVzdWx0LmRpc3RhbmNlLFxuICAgICAgICAgICAgICAgIGdlb21LaW5kID0gbG9va3VwUmVzdWx0Lmdlb21LaW5kLFxuICAgICAgICAgICAgICAgIGNvbnRleHR1YWxNYXBwaW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kueCgpIH1cbiAgICAgICAgICAgICAgICBMb29rdXBTdHJhdGVneS5IT1ZFUiAtPlxuICAgICAgICAgICAgICAgICAgICBpZiAoY3Vyc29yQ29vcmQueCA8IHBhdGhQcm9qZWN0aW9uLnBvaW50cy5maXJzdCgpLnByb2plY3Rpb24oKS54KCkgfHwgY3Vyc29yQ29vcmQueCA+IHBhdGhQcm9qZWN0aW9uLnBvaW50cy5sYXN0KCkucHJvamVjdGlvbigpLngoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbnVsbFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2VhcmNoTmVhcmVzdChjdXJzb3JDb29yZC54LCBwYXRoUHJvamVjdGlvbi5wb2ludHMpIHsgaXQucHJvamVjdGlvbigpLngoKSB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgTG9va3VwU3BhY2UuWFkgLT4gd2hlbiAobG9jYXRvckxvb2t1cFN0cmF0ZWd5KSB7XG4gICAgICAgICAgICAgICAgTG9va3VwU3RyYXRlZ3kuTk9ORSAtPiByZXR1cm4gbnVsbFxuICAgICAgICAgICAgICAgIExvb2t1cFN0cmF0ZWd5LkhPVkVSIC0+IHtcbiAgICAgICAgICAgICAgICAgICAgZm9yIChwYXRoUG9pbnQgaW4gcGF0aFByb2plY3Rpb24ucG9pbnRzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YWwgdGFyZ2V0UG9pbnRDb29yZCA9IHBhdGhQb2ludC5wcm9qZWN0aW9uKCkueHkoKVxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKE1hdGhVdGlsLmFyZUVxdWFsKHRhcmdldFBvaW50Q29vcmQsIGN1cnNvckNvb3JkLCBQT0lOVF9BUkVBX0VQU0lMT04pKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHBhdGhQb2ludFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIExvb2t1cFN0cmF0ZWd5Lk5FQVJFU1QgLT4ge1xuICAgICAgICAgICAgICAgICAgICB2YXIgbmVhcmVzdFBvaW50OiBQYXRoUG9pbnQ/ID0gbnVsbFxuICAgICAgICAgICAgICAgICAgICBmb3IgKHBhdGhQb2ludCBpbiBwYXRoUHJvamVjdGlvbi5wb2ludHMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbCB0YXJnZXRQb2ludENvb3JkID0gcGF0aFBvaW50LnByb2plY3Rpb24oKS54eSgpXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoY2xvc2VzdFBvaW50Q2hlY2tlci5jaGVjayh0YXJnZXRQb2ludENvb3JkKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5lYXJlc3RQb2ludCA9IHBhdGhQb2ludFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBuZWFyZXN0UG9pbnRcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBmdW4gY2hlY2tQb2ludChcbiAgICAgICAgY3Vyc29yQ29vcmQ6IERvdWJsZVZlY3RvcixcbiAgICAgICAgcG9pbnRQcm9qZWN0aW9uOiBQb2ludFRhcmdldFByb2plY3Rpb24sXG4gICAgICAgIGNsb3Nlc3RQb2ludENoZWNrZXI6IENsb3Nlc3RQb2ludENoZWNrZXJcbiAgICApOiBCb29sZWFuIHtcbiAgICAgICAgcmV0dXJuIHdoZW4gKGxvY2F0b3JMb29rdXBTcGFjZSkge1xuICAgICAgICAgICAgTG9va3VwU3BhY2UuTk9ORSAtPiBmYWxzZVxuICAgICAgICAgICAgTG9va3VwU3BhY2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ICAgICk6IEJvb2xlYW4ge1xuICAgICAgICByZXR1cm4gd2hlbiAobG9jYXRvckxvb2t1cFNwYWNlKSB7XG4gICAgICAgICAgICBMb29rdXBTcGFjZS5OT05FIC0+IGZhbHNlXG4gICAgICAgICAgICBMb29rdXBTcGFjZS5YIC0+IHJhbmdlQmFzZWRMb29rdXAoY3Vyc29yQ29vcmQsIGNsb3Nlc3RQb2ludENoZWNrZXIsIHJlY3RQcm9qZWN0aW9uLngoKSlcbiAgICAgICAgICAgIExvb2t1cFNwYWNlLlhZIC0+IHtcbiAgICAgICAgICAgICAgICB2YWwgcmVjdCA9IHJlY3RQcm9qZWN0aW9uLnh5KClcbiAgICAgICAgICAgICAgICB3aGVuIChsb2NhdG9yTG9va3VwU3RyYXRlZ3kpIHtcbiAgICAgICAgICAgICAgICAgICAgTG9va3VwU3RyYXRlZ3kuTk9ORSAtPiBmYWxzZVxuICAgICAgICAgICAgICAgICAgICBMb29rdXBTdHJhdGVneS5IT1ZFUiAtPiBjdXJzb3JDb29yZCBpbiByZWN0XG4gICAgICAgICAgICAgICAgICAgIExvb2t1cFN0cmF0ZWd5Lk5FQVJFU1QgLT4gaWYgKGN1cnNvckNvb3JkIGluIHJlY3QpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsb3Nlc3RQb2ludENoZWNrZXIuY2hlY2soY3Vyc29yQ29vcmQpXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgeCA9IGlmIChjdXJzb3JDb29yZC54IDwgcmVjdC5sZWZ0KSByZWN0LmxlZnQgZWxzZSByZWN0LnJpZ2h0XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgeSA9IGlmIChjdXJzb3JDb29yZC55IDwgcmVjdC50b3ApIHJlY3QudG9wIGVsc2UgcmVjdC5ib3R0b21cblxuICAgICAgICAgICAgICAgICAgICAgICAgeCA9IGlmIChyZWN0LnhSYW5nZSgpLmNvbnRhaW5zKGN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FU1VMVC5ORVdfRkFSVEhFUlxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBmYWxzZVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGNvbXBhbmlvbiBvYmplY3Qge1xuICAgICAgICBwcml2YXRlIGNvbnN0IHZhbCBQT0lOVF9BUkVBX0VQU0lMT04gPSAwLjFcbiAgICAgICAgcHJpdmF0ZSBjb25zdCB2YWwgUkVDVF9YX05FQVJFU1RfRVBTSUxPTiA9IDIuMFxuXG4gICAgICAgIHByaXZhdGUgZnVuIDxUPiBzZWFyY2hOZWFyZXN0KHZhbHVlOiBEb3VibGUsIGl0ZW1zOiBMaXN0PFQ+LCBtYXBwZXI6IChUKSAtPiBEb3VibGUpOiBUIHtcbiAgICAgICAgICAgIGlmICh2YWx1ZSA8IG1hcHBlcihpdGVtcy5maXJzdCgpKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBpdGVtcy5maXJzdCgpXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodmFsdWUgPiBtYXBwZXIoaXRlbXMubGFzdCgpKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBpdGVtcy5sYXN0KClcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFyIGxvID0gMFxuICAgICAgICAgICAgdmFyIGhpID0gaXRlbXMubGFzdEluZGV4XG5cbiAgICAgICAgICAgIHdoaWxlIChsbyA8PSBoaSkge1xuICAgICAgICAgICAgICAgIHZhbCBtaWQgPSAoaGkgKyBsbykgLyAyXG4gICAgICAgICAgICAgICAgdmFsIG1pZFZhbHVlID0gbWFwcGVyKGl0ZW1zW21pZF0pXG5cbiAgICAgICAgICAgICAgICB3aGVuIHtcbiAgICAgICAgICAgICAgICAgICAgdmFsdWUgPCBtaWRWYWx1ZSAtPiBoaSA9IG1pZCAtIDFcbiAgICAgICAgICAgICAgICAgICAgdmFsdWUgPiB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gICAgICAgQFN1cHByZXNzKFwiVU5DSEVDS0VEX0NBU1RcIilcbiAgICAgICAgcmV0dXJuIGRhdGEgYXMgTGlzdDxSaW5nWFk+XG4gICAgfVxuXG4gICAgY29tcGFuaW9uIG9iamVjdCB7XG4gICAgICAgIHByaXZhdGUgY29uc3QgdmFsIFBPSU5UU19DT1VOVF9UT19TS0lQX1NJTVBMSUZJQ0FUSU9OID0gMjAuMFxuICAgICAgICBwcml2YXRlIGNvbnN0IHZhbCBBUkVBX1RPTEVSQU5DRV9SQVRJTyA9IDAuMVxuICAgICAgICBwcml2YXRlIGNvbnN0IHZhbCBNQVhfVE9MRVJBTkNFID0gNDAuMFxuXG4gICAgICAgIGZ1biBjcmVhdGUocG9pbnRzOiBMaXN0PERvdWJsZVZlY3Rvcj4sIGxvb2t1cFNwYWNlOiBMb29rdXBTcGFjZSk6IFBvbHlnb25UYXJnZXRQcm9qZWN0aW9uIHtcbiAgICAgICAgICAgIHZhbCByaW5ncyA9IHNwbGl0UmluZ3MocG9pbnRzKVxuXG4gICAgICAgICAgICByZXR1cm4gd2hlbiAobG9va3VwU3BhY2UpIHtcbiAgICAgICAgICAgICAgICBYIC0+IFBvbHlnb25UYXJnZXRQcm9qZWN0aW9uKG1hcFRvWChyaW5ncykpXG4gICAgICAgICAgICAgICAgWFkgLT4gUG9seWdvblRhcmdldFByb2plY3Rpb24obWFwVG9YWShyaW5ncykpXG4gICAgICAgICAgICAgICAgTk9ORSAtPiB1bmRlZmluZWRMb29rdXBTcGFjZUVycm9yKClcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHByaXZhdGUgZnVuIG1hcFRvWChyaW5nczogTGlzdDxMaXN0PERvdWJsZVZlY3Rvcj4+KTogRG91YmxlU3BhbiB7XG4gICAgICAgICAgICB2YXIgbWluID0gcmluZ3NbMF1bMF0ueFxuICAgICAgICAgICAgdmFyIG1heCA9IG1pblxuICAgICAgICAgICAgZm9yIChyaW5nIGluIHJpbmdzKSB7XG4gICAgICAgICAgICAgICAgZm9yIChwb2ludCBpbiByaW5nKSB7XG4gICAgICAgICAgICAgICAgICAgIG1pbiA9IG1pbihtaW4sIHBvaW50LngpXG4gICAgICAgICAgICAgICAgICAgIG1heCA9IG1heChtYXgsIHBvaW50LngpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIERvdWJsZVNwYW4obWluLCBtYXgpXG4gICAgICAgIH1cblxuICAgICAgICBwcml2YXRlIGZ1biBtYXBUb1hZKHJpbmdzOiBMaXN0PExpc3Q8RG91YmxlVmVjdG9yPj4pOiBMaXN0PFJpbmdYWT4ge1xuICAgICAgICAgICAgdmFsIHBvbHlnb24gPSBBcnJheUxpc3Q8UmluZ1hZPigpXG5cbiAgICAgICAgICAgIGZvciAocmluZyBpbiByaW5ncykge1xuICAgICAgICAgICAgICAgIGlmIChyaW5nLnNpemUgPCA0KSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdmFsIGJib3ggPSBib3VuZGluZ0JveChyaW5nKSA/OiBlcnJvcihcImJib3ggc2hvdWxkIGJlIG5vdCBudWxsIC0gcmluZyBpcyBub3QgZW1wdHlcIilcbiAgICAgICAgICAgICAgICB2YWwgYXJlYSA9IGNhbGN1bGF0ZUFyZWEocmluZylcblxuICAgICAgICAgICAgICAgIHZhbCBzaW1wbGlmaWVkUmluZzogTGlzdDxEb3VibGVWZWN0b3I+XG5cbiAgICAgICAgICAgICAgICBpZiAocmluZy5zaXplID4gUE9JTlRTX0NPVU5UX1RPX1NLSVBfU0lNUExJRklDQVRJT04pIHtcbiAgICAgICAgICAgICAgICAgICAgdmFsIHRvbGVyYW5jZSA9IG1pbihhcmVhICogQVJFQV9UT0xFUkFOQ0VfUkFUSU8sIE1BWF9UT0xFUkFOQ0UpXG4gICAgICAgICAgICAgICAgICAgIHNpbXBsaWZpZWRSaW5nID0gUG9seWxpbmVTaW1wbGlmaWVyLnZpc3ZhbGluZ2FtV2h5YXR0KHJpbmcpLnNldFdlaWdodExpbWl0KHRvbGVyYW5jZSkucG9pbnRzXG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKGlzTG9nRW5hYmxlZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbG9nKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiU2ltcDogXCIgKyByaW5nLnNpemUgKyBcIiAtPiBcIiArIHNpbXBsaWZpZWRSaW5nLnNpemUgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCIsIHRvbGVyYW5jZT1cIiArIHRvbGVyYW5jZSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIiwgYmJveD1cIiArIGJib3ggK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCIsIGFyZWE9XCIgKyBhcmVhXG4gICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBpZiAoaXNMb2dFbmFibGVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsb2coXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJLZWVwOiBzaXplOiBcIiArIHJpbmcuc2l6ZSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIiwgYmJveD1cIiArIGJib3ggK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCIsIGFyZWE9XCIgKyBhcmVhXG4gICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgc2ltcGxpZmllZFJpbmcgPSByaW5nXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKHNpbXBsaWZpZWRSaW5nLnNpemUgPCA0KSB7XG4g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bCBpbmRleDogSW50XG4gICAgKSB7XG4gICAgICAgIGZ1biBwcm9qZWN0aW9uKCkgPSBteVBvaW50VGFyZ2V0UHJvamVjdGlvblxuXG4gICAgICAgIGNvbXBhbmlvbiBvYmplY3Qge1xuICAgICAgICAgICAgaW50ZXJuYWwgZnVuIGNyZWF0ZShwOiBEb3VibGVWZWN0b3IsIGluZGV4OiBJbnQsIGxvb2t1cFNwYWNlOiBMb29rdXBTcGFjZSk6IFBhdGhQb2ludCB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHdoZW4gKGxvb2t1cFNwYWNlKSB7XG4gICAgICAgICAgICAgICAgICAgIFggLT4gUGF0aFBvaW50KFBvaW50VGFyZ2V0UHJvamVjdGlvbi5jcmVhdGUocCwgbG9va3VwU3BhY2UpLCBwLCBpbmRleClcbiAgICAgICAgICAgICAgICAgICAgWFkgLT4gUGF0aFBvaW50KFBvaW50VGFyZ2V0UHJvamVjdGlvbi5jcmVhdGUocCwgbG9va3VwU3BhY2UpLCBwLCBpbmRleClcbiAgICAgICAgICAgICAgICAgICAgTk9ORSAtPiB1bmRlZmluZWRMb29rdXBTcGFjZUVycm9yKClcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBjb21wYW5pb24gb2JqZWN0IHtcbiAgICAgICAgZnVuIGNyZWF0ZShcbiAgICAgICAgICAgIHBvaW50czogTGlzdDxEb3VibGVWZWN0b3I+LFxuICAgICAgICAgICAgaW5kZXhNYXBwZXI6IChJbnQpIC0+IEludCxcbiAgICAgICAgICAgIGxvb2t1cFNwYWNlOiBMb29rdXBTcGFjZVxuICAgICAgICApOiBQYXRoVGFyZ2V0UHJvamVjdGlvbiB7XG4gICAgICAgICAgICB2YWwgcG9pbnRzTG9jYXRpb24gPSBBcnJheUxpc3Q8UGF0aFBvaW50PigpXG4gICAgICAgICAgICBmb3IgKChpLCBwb2ludCkgaW4gcG9pbnRzLndpdGhJbmRleCgpKS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2x0aXBQYXJhbXMsXG4gICAgaW50ZXJuYWwgdmFsIHRvb2x0aXBLaW5kOiBUaXBMYXlvdXRIaW50LktpbmRcbikge1xuXG4gICAgaW50ZXJuYWwgZnVuIGNyZWF0ZUdlb21UYXJnZXQoaGl0Q29vcmQ6IERvdWJsZVZlY3RvciwgaGl0SW5kZXg6IEludCk6IEdlb21UYXJnZXQge1xuICAgICAgICByZXR1cm4gR2VvbVRhcmdldChcbiAgICAgICAgICAgIGhpdEluZGV4LFxuICAgICAgICAgICAgY3JlYXRlVGlwTGF5b3V0SGludChcbiAgICAgICAgICAgICAgICBoaXRDb29yZCA9IGhpdENvb3JkLFxuICAgICAgICAgICAgICAgIGhpdFNoYXBlID0gaGl0U2hhcGUsXG4gICAgICAgICAgICAgICAgdG9vbHRpcEtpbmQgPSB0b29sdGlwS2luZCxcbiAgICAgICAgICAgICAgICBzdGVtTGVuZ3RoID0gdG9vbHRpcFBhcmFtcy5zdGVtTGVuZ3RoLFxuICAgICAgICAgICAgICAgIGZpbGxDb2xvciA9IHRvb2x0aXBQYXJhbXMuZmlsbENvbG9yLFxuICAgICAgICAgICAgICAgIG1hcmtlckNvbG9ycyA9IHRvb2x0aXBQYXJhbXMubWFya2VyQ29sb3JzLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICAgIHRvb2x0aXBQYXJhbXMudGlwTGF5b3V0SGludHNcbiAgICAgICAgKVxuICAgIH1cblxuICAgIGNvbXBhbmlvbiBvYmplY3Qge1xuICAgICAgICBmdW4gY3JlYXRlVGlwTGF5b3V0SGludChcbiAgICAgICAgICAgIGhpdENvb3JkOiBEb3VibGVWZWN0b3IsXG4gICAgICAgICAgICBoaXRTaGFwZTogSGl0U2hhcGUsXG4gICAgICAgICAgICB0b29sdGlwS2luZDogVGlwTGF5b3V0SGludC5LaW5kLFxuICAgICAgICAgICAgc3RlbUxlbmd0aDogVGlwTGF5b3V0SGludC5TdGVtTGVuZ3RoLFxuICAgICAgICAgICAgZmlsbENvbG9yOiBDb2xvcj8sXG4gICAgICAgICAgICBtYXJrZXJDb2xvcnM6IExpc3Q8Q29sb3I+XG4gICAgICAgICk6IFRpcExheW91dEhpbnQge1xuXG4gICAgICAgICAgICByZXR1cm4gd2hlbiAoaGl0U2hhcGUua2luZCkge1xuICAgICAgICAgICAgICAgIFBPSU5UIC0+IHdoZW4gKHRvb2x0aXBLaW5kKSB7XG4gICAgICAgICAgICAgICAgICAgIFZFUlRJQ0FMX1RPT0xUSVAgLT5cbiAgICAgICAgICAgICAgICAgICAgICAgIHZlcnRpY2FsVG9vbHRpcChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoaXRDb29yZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoaXRTaGFwZS5wb2ludC5yYWRpdXMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RlbUxlbmd0aCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWxsQ29sb3IsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFya2VyQ29sb3JzXG4gICAgICAgICAgICAgICAgICAgICAgICApXG5cbiAgICAgICAgICAgICAgICAgICAgQ1VSU09SX1RPT0xUSVAgLT4gY3Vyc29yVG9vbHRpcChoaXRDb29yZCwgc3RlbUxlbmd0aCwgZmlsbENvbG9yLCBtYXJrZXJDb2xvcnMpXG4gICAgICAgICAgICAgICAgICAgIGVsc2UgLT4gZXJyb3IoXCJXcm9uZyBUaXBMYXlvdXRIaW50LmtpbmQgPSAkdG9vbHRpcEtpbmQgZm9yIFBPSU5UXCIpXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgUkVDVCAtPiB3aGVuICh0b29sdGlwS2luZCkge1xuICAgICAgICAgICAgICAgICAgICBWRVJUSUNBTF9UT09MVElQIC0+IHZlcnRpY2FsVG9vbHRpcChoaXRDb29yZCwgaGl0U2hhcGUucmVjdC53aWR0aCAvIDIsIHN0ZW1MZW5ndGgsIGZpbGxDb2xvciwgbWFya2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XQ+KTogTGlzdDxHZW9tVGFyZ2V0PiB7XG4gICAgICAgIHJldHVybiBnZW9tVGFyZ2V0cy5tYXAgeyBnZW9tVGFyZ2V0IC0+XG4gICAgICAgICAgICBHZW9tVGFyZ2V0KFxuICAgICAgICAgICAgICAgIGdlb21UYXJnZXQuaGl0SW5kZXgsXG4gICAgICAgICAgICAgICAgY29udmVydFRpcExheW91dEhpbnQoZ2VvbVRhcmdldC50aXBMYXlvdXRIaW50KSxcbiAgICAgICAgICAgICAgICBjb252ZXJ0VGlwTGF5b3V0SGludHMoZ2VvbVRhcmdldC5hZXNUaXBMYXlvdXRIaW50cylcbiAgICAgICAgICAgIClcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHByaXZhdGUgZnVuIGNvbnZlcnRUaXBMYXlvdXRIaW50KGhpbnQ6IFRpcExheW91dEhpbnQpOiBUaXBMYXlvdXRIaW50IHtcbiAgICAgICAgcmV0dXJuIFRpcExheW91dEhpbnQoXG4gICAgICAgICAgICBoaW50LmtpbmQsXG4gICAgICAgICAgICBzYWZlQ29udmVydFRvUGxvdENvb3JkKGhpbnQuY29vcmQpISEsXG4gICAgICAgICAgICBjb252ZXJ0VG9QbG90RGlzdGFuY2UoaGludC5vYmplY3RSYWRpdXMpLFxuICAgICAgICAgICAgaGludC5zdGVtTGVuZ3RoLFxuICAgICAgICAgICAgaGludC5maWxsQ29sb3IsXG4gICAgICAgICAgICBoaW50Lm1hcmtlckNvbG9yc1xuICAgICAgICApXG4gICAgfVxuXG4gICAgcHJpdmF0ZSBmdW4gY29udmVydFRpcExheW91dEhpbnRzKHRpcExheW91dEhpbnRzOiBNYXA8QWVzPCo+LCBUaXBMYXlvdXRIaW50Pik6IE1hcDxBZXM8Kj4sIFRpcExheW91dEhpbnQ+IHtcbiAgICAgICAgdmFsIHJlc3VsdCA9IEhhc2hNYXA8QWVzPCo+LCBUaXBMYXlvdXRIaW50PigpXG4gICAgICAgIHRpcExheW91dEhpbnRzLmZvckVhY2ggeyAoY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b29sdGlwUGFyYW1zOiBHZW9tVGFyZ2V0Q29sbGVjdG9yLlRvb2x0aXBQYXJhbXMsXG4gICAgICAgIHRvb2x0aXBLaW5kOiBUaXBMYXlvdXRIaW50LktpbmRcbiAgICApIHtcbiAgICAgICAgdGFyZ2V0Q29sbGVjdG9yLmFkZFJlY3RhbmdsZShcbiAgICAgICAgICAgIGluZGV4LFxuICAgICAgICAgICAgcmVjdGFuZ2xlLFxuICAgICAgICAgICAgYWZ0ZXJZT3JpZW50YXRpb24odG9vbHRpcFBhcmFtcyksXG4gICAgICAgICAgICB0b29sdGlwS2luZFxuICAgICAgICApXG4gICAgfVxuXG4gICAgb3ZlcnJpZGUgZnVuIGFkZFBhdGgoXG4gICAgICAgIHBvaW50czogTGlzdDxEb3VibGVWZWN0b3I+LFxuICAgICAgICBsb2NhbFRvR2xvYmFsSW5kZXg6IChJbnQpIC0+IEludCxcbiAgICAgICAgdG9vbHRpcFBhcmFtczogR2VvbVRhcmdldENvbGxlY3Rvci5Ub29sdGlwUGFyYW1zLFxuICAgICAgICB0b29sdGlwS2luZDogVGlwTGF5b3V0SGludC5LaW5kXG4gICAgKSB7XG4gICAgICAgIHRhcmdldENvbGxlY3Rvci5hZGRQYXRoKFxuICAgICAgICAgICAgcG9pbnRzLFxuICAgICAgICAgICAgbG9jYWxUb0dsb2JhbEluZGV4LFxuICAgICAgICAgICAgYWZ0ZXJZT3JpZW50YXRpb24odG9vbHRpcFBhcmFtcyksXG4gICAgICAgICAgICB0b29sdGlwS2luZFxuICAgICAgICApXG4gICAgfVxuXG4gICAgb3ZlcnJpZGUgZnVuIGFkZFBvbHlnb24oXG4gICAgICAgIHBvaW50czogTGlzdDxEb3VibGVWZWN0b3I+LFxuICAgICAgICBsb2NhbFRvR2xvYmFsSW5kZXg6IChJbnQpIC0+IEludCxcbiAgICAgICAgdG9vbHRpcFBhcmFtczogR2VvbVRhcmdldENvbGxlY3Rvci5Ub29sdGlwUGFyYW1zLFxuICAgICAgICB0b29s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A9IHRpbGVzQXJlYVNpemUuc3VidHJhY3QobGFic1RvdGFsRGltKVxuICAgICAgICB9XG5cbiAgICAgICAgdmFsIGxheW91dEluZm9zOiBMaXN0PFRpbGVMYXlvdXRJbmZvPiA9IGlmIChmYWNldHMuZnJlZUhTY2FsZSB8fCBmYWNldHMuZnJlZVZTY2FsZSkge1xuICAgICAgICAgICAgRnJlZVNjYWxlc1RpbGVzTGF5b3V0ZXIuY3JlYXRlVGlsZUxheW91dEluZm9zKFxuICAgICAgICAgICAgICAgIHRpbGVzQXJlYVNpemUsXG4gICAgICAgICAgICAgICAgZmFjZXRzLFxuICAgICAgICAgICAgICAgIGxheW91dFByb3ZpZGVyQnlUaWxlLFxuICAgICAgICAgICAgICAgIHRvdGFsQWRkZWRIU2l6ZSxcbiAgICAgICAgICAgICAgICB0b3RhbEFkZGVkVlNpemUsXG4gICAgICAgICAgICAgICAgY29vcmRQcm92aWRlcixcbiAgICAgICAgICAgICAgICBoQXhpc1RoZW1lID0gaEF4aXNUaGVtZSxcbiAgICAgICAgICAgICAgICB2QXhpc1RoZW1lID0gdkF4aXNUaGVtZSxcbiAgICAgICAgICAgIClcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIEZpeGVkU2NhbGVzVGlsZXNMYXlvdXRlci5jcmVhdGVUaWxlTGF5b3V0SW5mb3MoXG4gICAgICAgICAgICAgICAgdGlsZXNBcmVhU2l6ZSxcbiAgICAgICAgICAgICAgICBmYWNldHMsXG4gICAgICAgICAgICAgICAgbGF5b3V0UHJvdmlkZXJCeVRpbGUsXG4gICAgICAgICAgICAgICAgdG90YWxBZGRlZEhTaXplLFxuICAgICAgICAgICAgICAgIHRvdGFsQWRkZWRWU2l6ZSxcbiAgICAgICAgICAgICAgICBjb29yZFByb3ZpZGVyLFxuICAgICAgICAgICAgICAgIGhBeGlzVGhlbWUgPSBoQXhpc1RoZW1lLFxuICAgICAgICAgICAgICAgIHZBeGlzVGhlbWUgPSB2QXhpc1RoZW1lL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jvd11cbiAgICAgICAgICAgIHZhbCBvdXRlckdlb21TaXplID0gbGF5b3V0SW5mby5nZW9tT3V0ZXJCb3VuZHMuZGltZW5zaW9uXG5cbiAgICAgICAgICAgIC8vIFRpbGUgd2lkdGhcbiAgICAgICAgICAgIHZhbCB0aWxlTGFiZWxXaWR0aCA9IGlmIChmYWNldFRpbGUucm93TGFiICE9IG51bGwgJiYgc2hvd0ZhY2V0U3RyaXApIHtcbiAgICAgICAgICAgICAgICBGQUNFVF9UQUJfSEVJR0hUICAvLyBvbmUgbGFiZWwgb24gdGhlIGxlZnQgc2lkZS5cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgMC4wXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhbCBheGlzV2lkdGggPSBpZiAoZmFjZXRUaWxlLmhhc1ZBeGlzKSB7XG4gICAgICAgICAgICAgICAgbGF5b3V0SW5mby5heGlzVGhpY2tuZXNzWSgpXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIDAuMFxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YWwgdGlsZVggPSBnZW9tWCAtIGF4aXNXaWR0aFxuICAgICAgICAgICAgdmFsIHRpbGVXaWR0aCA9IG91dGVyR2VvbVNpemUueCArIGF4aXNXaWR0aCArIHRpbGVMYWJlbFdpZHRoXG5cbiAgICAgICAgICAgIC8vIFRpbGUgaGVpZ2h0XG4gICAgICAgICAgICB2YWwgdGlsZUxhYmVsSGVpZ2h0ID0gaWYgKHNob3dGYWNldFN0cmlwKSB7XG4gICAgICAgICAgICAgICAgZmFjZXRDb2xIZWFkSGVpZ2h0KGZhY2V0VGlsZS5jb2xMYWJzLnNpemUpXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIDAuMFxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YWwgYXhpc0hlaWdodCA9IGlmIChmYWNldFRpbGUuaGFzSEF4aXMpIHtcbiAgICAgICAgICAgICAgICBsYXlvdXRJbmZvLmF4aXNUaGlja25lc3NYKClcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgMC4wXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhbCB0aWxlWSA9IGdlb21ZIC0gdGlsZUxhYmVsSGVpZ2h0XG4gICAgICAgICAgICB2YWwgdGlsZUhlaWdodCA9IG91dGVyR2VvbVNpemUueSArIHRpbGVMYWJlbEhlaWdodCArIGF4aXNIZWlnaHRcblxuLy8gICAgICAgICAgICBpZiAoY29sID09IDApIHtcbi8vICAgICAgICAgICAgICAgIHByaW50bG4oXCJbJHJvd11bJHRpbGVZXSAkdGlsZUhlaWdodCA9ICR7Z2VvbVNpemUueX0gKyAkdGlsZUxhYmVsSGVpZ2h0ICsgJGF4aXNIZWlnaHRcIilcbi8vICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBBYnNvbHV0ZSBib3VuZHMuLi5cbiAgICAgICAgICAgIHZhbCB0aWxlQm91bmRzID0gRG91YmxlUmVjdGFuZ2xlKFxuICAgICAgICAgICAgICAgIERvdWJsZVZlY3Rvcih0aWxlWCwgdGlsZVkpLFxuICAgICAgICAgICAgICAgIERvdWJsZVZlY3Rvcih0aWxlV2lkdGgsIHRpbGVIZWlnaHQpXG4gICAgICAgICAgICApXG4gICAgICAgICAgICB2YWwgZ2VvbU91dGVyQm91bmRzID0gRG91YmxlUmVjdGFuZ2xlKFxuICAgICAgICAgICAgICAgIERvdWJsZVZlY3RvcihnZW9tWCwgZ2VvbVkpLFxuICAgICAgICAgICAgICAgIG91dGVyR2VvbVNpemVcbiAgICAgICAgICAgIClcblxuICAgICAgICAgICAgdGlsZUJvdW5kc0xpc3QuYWRkKHRpbGVCb3VuZHMpXG4gICAgICAgICAgICBnZW9tT3V0ZXJCb3VuZHNMaXN0LmFkZChnZW9tT3V0ZXJCb3VuZHMpXG4gICAgICAgIH1cblxuICAgICAgICB2YWw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FxuICAgICAgICAgICAgICAgIGxheW91dEluZm8uZ2VvbUlubmVyQm91bmRzLmRpbWVuc2lvblxuICAgICAgICAgICAgKVxuXG4gICAgICAgICAgICB2YWwgbmV3TGF5b3V0SW5mbyA9IFRpbGVMYXlvdXRJbmZvKFxuICAgICAgICAgICAgICAgIHRpbGVzUGFkZGluZ0xlZnRUb3AsXG4gICAgICAgICAgICAgICAgYm91bmRzID0gdGlsZUJvdW5kcy5hZGQob3JpZ2luRGVsdGEpLFxuICAgICAgICAgICAgICAgIGdlb21PdXRlckJvdW5kcyA9IGdlb21PdXRlckJvdW5kcy5hZGQob3JpZ2luRGVsdGEpLFxuICAgICAgICAgICAgICAgIGdlb21Jbm5lckJvdW5kcyA9IGdlb21Jbm5lckJvdW5kcy5hZGQob3JpZ2luRGVsdGEpLFxuICAgICAgICAgICAgICAgIGxheW91dEluZm8uaEF4aXNJbmZvLFxuICAgICAgICAgICAgICAgIGxheW91dEluZm8udkF4aXNJbmZvLFxuICAgICAgICAgICAgICAgIGhBeGlzU2hvd24gPSBmYWNldFRpbGUuaGFzSEF4aXMsXG4gICAgICAgICAgICAgICAgdkF4aXNTaG93biA9IGZhY2V0VGlsZS5oYXNWQXhpcyxcbiAgICAgICAgICAgICAgICB0cnVlSW5kZXggPSBmYWNldFRpbGUudHJ1ZUluZGV4XG4gICAgICAgICAgICApXG5cbiAgICAgICAgICAgIGZpbmFsTGF5b3V0SW5mb3MuYWRkKFxuICAgICAgICAgICAgICAgIGlmIChzaG93RmFjZXRTdHJpcCkge1xuICAgICAgICAgICAgICAgICAgICBuZXdMYXlvdXRJbmZvLndpdGhGYWNldExhYmVscyhmYWNldFRpbGUuY29sTGFicywgZmFjZXRUaWxlLnJvd0xhYilcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBuZXdMYXlvdXRJbmZvXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgKVxuICAgICAgICB9XG5cbiAgICAgICAgdm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bGF5b3V0SW5mb3NbaW5kXS5nZW9tT3V0ZXJXaWR0aCgpXG4gICAgICAgICAgICB9XG4gICAgICAgIH0ubWF4T3JOdWxsKCkgPzogMC4wXG5cbiAgICAgICAgdmFsIG1heENvbEhlaWdodEdlb21Pbmx5ID0gKDAgdW50aWwgZmFjZXRzLmNvbENvdW50KS5tYXAgeyBjb2wgLT5cbiAgICAgICAgICAgIGNvbEluZGljZXMoZmFjZXRUaWxlcywgY29sKS5zdW1PZiB7IGluZCAtPlxuICAgICAgICAgICAgICAgIGxheW91dEluZm9zW2luZF0uZ2VvbU91dGVySGVpZ2h0KClcbiAgICAgICAgICAgIH1cbiAgICAgICAgfS5tYXhPck51bGwoKSA/OiAwLjBcblxuICAgICAgICB2YWwgdyA9IGFkZGVkVkF4aXNXaWR0aCArIG1heFJvd1dpZHRoR2VvbU9ubHkgKyBhZGRlZEhTaXplXG4gICAgICAgIHZhbCBoID0gYWRkZWRIQXhpc0hlaWdodCArIG1heENvbEhlaWdodEdlb21Pbmx5ICsgYWRkZWRWU2l6ZVxuICAgICAgICByZXR1cm4gRG91YmxlVmVjdG9yKHcsIGgpXG4gICAgfVxuXG4gICAgcHJpdmF0ZSBmdW4gbWF4VkF4aXNUaGlja25lc3MoXG4gICAgICAgIGxheW91dEluZm9zOiBMaXN0PFRpbGVMYXlvdXRJbmZvPixcbiAgICAgICAgZmFjZXRUaWxlczogTGlzdDxQbG90RmFjZXRzLkZhY2V0VGlsZUluZm8+LFxuICAgICAgICBjb2w6IEludFxuICAgICk6IERvdWJsZSB7XG4gICAgICAgIHZhbCBtYXhUaGlja25lc3MgPSBjb2xJbmRpY2VzKGZhY2V0VGlsZXMsIGNvbCkubWF4T2ZPck51bGwgeyBpbmQgLT5cbiAgICAgICAgICAgIGxheW91dEluZm9zW2luZF0ubGV0IHtcbiAgICAgICAgICAgICAgICBpZiAoaXQudkF4aXNTaG93bikge1xuICAgICAgICAgICAgICAgICAgICBpdC5heGlzVGhpY2tuZXNzWSgpXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgMC4wXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtYXhUaGlja25lc3MgPzogMC4wXG4gICAgfVxuXG4gICAgcHJpdmF0ZSBmdW4gbWF4SEF4aXNUaGlja25lc3MoXG4gICAgICAgIGxheW91dEluZm9zOiBMaXN0PFRpbGVMYXlvdXRJbmZvPixcbiAgICAgICAgZmFjZXRUaWxlczogTGlzdDxQbG90RmFjZXRzLkZhY2V0VGlsZUluZm8+LFxuICAgICAgICByb3c6IEludCxcbiAgICAgICAgbnVtUm93czogSW50XG4gICAgKTogRG91YmxlIHtcbiAgICAgICAgdmFsIG1heFRoaWNrbmVzcyA9IHJvd0luZGljZXMoZmFjZXRUaWxlcywgcm93KS5tYXhPZk9yTnVsbCB7IGluZCAtPlxuICAgICAgICAgICAgaWYgKGZhY2V0VGlsZXNbaW5kXS5pc0JvdHRvbSAmJiByb3cgPCBudW1Sb3dzIC0gMSkge1xuICAgICAgICAgICAgICAgIC8vIGV4Y2x1ZGUgYm90dG9tIHRpbGUgaW4gaW5maW5pc2hlZCBjb2x1bW4gKGkuZS4gcmlnaHRtb3N0IGNvbHVtbikuXG4gICAgICAgICAgICAgICAgMC4wXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGxheW91dEluZm9zW2luZF0ubGV0IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGl0LmhBeGlzU2hvd24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGl0LmF4aXNUaGlja25lc3NYKClcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIDAuMFxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIG1heFRoaWNrbmVzcyA/OiAwLjBcbiAgICB9XG5cbiAgICBwcml2YXRlIGZ1biBjb2xJbmRpY2VzKGZhY2V0VGlsZXM6IExpc3Q8UGxvdEZhY2V0cy5GYWNldFRpbGVJbmZvPiwgY29sOiBJbnQpOiBMaXN0PEludD4ge1xuICAgICAgICByZXR1cm4gZmFjZXRUaWxlcy53aXRoSW5kZXgoKVxuICAgICAgICAgICAgLmZpbHRlciB7IChfLCB0aWxlKSAtPlxuICAgICAgICAgICAgICAgIHRpbGUuY29sID09IGNvbFxuICAgICAgICAgICAgfS5tYXAgeyAoaW5kZXgsIF8pIC0+XG4gICAgICAgICAgICAgICAgaW5kZXhcbiAgICAgICAgICAgIH1cbiAgICB9XG5cbiAgICBwcml2YXRlIGZ1biByb3dJbmRpY2VzKGZhY2V0VGlsZXM6IExpc3Q8UGxvdEZhY2V0cy5GYWNldFRpbGVJbmZvPiwgcm93OiBJbnQpOiBMaXN0PEludD4ge1xuICAgICAgICByZXR1cm4gZmFjZXRUaWxlcy53aXRoSW5kZXgoKVxuICAgICAgICAgICAgLmZpbHRlciB7IChfLCB0aWxlKSAtPlxuICAgICAgICAgICAgICAgIHRpbGUucm93ID09IHJvd1xuICAgICAgICAgICAgfS5tYXAgeyAoaW5kZXgsIF8pIC0+XG4gICAgICAgICAgICAgICAgaW5kZXhcbiAgICAgICAgICAgIH1cbiAgICB9XG5cbiAgICBmdW4gZ2VvbU9mZnNldHNCeUNvbChcbiAgICAgICAgbGF5b3V0SW5mb3M6IExpc3Q8VGlsZUxheW91dEluZm8+LFxuICAgICAgICBmYWNldFRpbGVzOiBMaXN0PFBsb3RGYWNldHMuRmFjZXRUaWxlSW5mbz4sXG4gICAgICAgIGNvbFNwYWNlOiBEb3VibGUsXG4gICAgICAgIG51bUNvbHM6IEludFxuICAgICk6IExpc3Q8RG91YmxlPiB7XG4gICAgICAgIHZhbCBheGlzV2lkdGhzID0gTGlzdDxEb3VibGU+KG51bUNvbHMpIHsgY29sIC0+XG4gICAgICAgICAgICBtYXhWQXhpc1RoaWNrbmVzcyhsYXlvdXRJbmZvcywgZmFjZXRUaWxlcywgY29sKVxuICAgICAgICB9XG4gICAgICAgIHZhbCBzcGFjZXNCZWZvcmUgPSBMaXN0PERvdWJsZT4obnVtQ29scykgeyBjb2wgLT5cbiAgICAgICAgICAgIGlmIChjb2wgPT0gMCkgMC4wXG4gICAgICAgICAgICBlbHNlIGNvbFNwYWNlXG4gICAgICAgIH1cblxuICAgICAgICB2YXIgYmFzZU9mZnNldCA9IDAuMFxuICAgICAgICB2YWwgb2Zmc2V0cyA9IEFycmF5TGlzdDxEb3VibGU+KClcbiAgICAgICAgZm9yIChpIGluICgwIHVudGlsIG51bUNvbHMpKSB7XG4gICAgICAgICAgICB2YWwgY3Vyck9mZnNldCA9IGJhc2VPZmZzZXQgKyBzcGFjZXNCZWZvcmVbaV0gKyBheGlzV2lkdGhzW2ldXG4gICAgICAgICAgICBvZmZzZXRzLmFkZChjdXJyT2Zmc2V0KVxuICAgICAgICAgICAgYmFzZU9mZnNldCA9IGN1cnJPZmZzZXQgKyBsYXlvdXRJbmZvc1tpXS5nZW9tT3V0ZXJXaWR0aCgpXG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG9mZnNldHNcbiAgICB9XG5cbiAgICBmdW4gZ2VvbU9mZnNldHNCeVJvdyhcbiAgICAgICAgbGF5b3V0SW5mb3M6IExpc3Q8VGlsZUxheW91dEluZm8+LFxuICAgICAgICBmYWNldFRpbGVzOiBMaXN0PFBsb3RGYWNldHMuRmFjZXRUaWxlSW5mbz4sXG4gICAgICAgIHNob3dGYWNldFN0cmlwOiBCb29sZWFuLFxuICAgICAgICByb3dTcGFjZTogRG91YmxlLFxuICAgICAgICBudW1Sb3dzOiBJbnRcbiAgICApOiBMaXN0PERvdWJsZT4ge1xuICAgICAgICB2YWwgYXhpc0hlaWdodHMgPSBMaXN0PERvdWJsZT4obnVtUm93cykgeyByb3cgLT5cbiAgICAgICAgICAgIG1he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B2YWwgYm90dG9tOiBEb3VibGUsXG4pIHtcblxuICAgIGZ1biB0b0lubmVyU2l6ZShvdXRlcjogRG91YmxlVmVjdG9yKTogRG91YmxlVmVjdG9yIHtcbiAgICAgICAgdmFsIGx0ID0gRG91YmxlVmVjdG9yKFxuICAgICAgICAgICAgb3V0ZXIueCAqIGxlZnQsXG4gICAgICAgICAgICBvdXRlci55ICogdG9wXG4gICAgICAgIClcbiAgICAgICAgdmFsIHJiID0gRG91YmxlVmVjdG9yKFxuICAgICAgICAgICAgb3V0ZXIueCAqIHJpZ2h0LFxuICAgICAgICAgICAgb3V0ZXIueSAqIGJvdHRvbVxuICAgICAgICApXG4gICAgICAgIHJldHVybiBvdXRlci5zdWJ0cmFjdChsdCkuc3VidHJhY3QocmIpXG4gICAgfVxuXG4gICAgZnVuIHRvSW5uZXJCb3VuZHMob3V0ZXI6IERvdWJsZVJlY3RhbmdsZSk6IERvdWJsZVJlY3RhbmdsZSB7XG4gICAgICAgIHZhbCBsdCA9IERvdWJsZVZlY3RvcihcbiAgICAgICAgICAgIG91dGVyLndpZHRoICogbGVmdCxcbiAgICAgICAgICAgIG91dGVyLmhlaWdodCAqIHRvcFxuICAgICAgICApXG4gICAgICAgIHJldHVybiBEb3VibGVSZWN0YW5nbGUoXG4gICAgICAgICAgICBvdXRlci5vcmlnaW4uYWRkKGx0KSxcbiAgICAgICAgICAgIHRvSW5uZXJTaXplKG91dGVyLmRpbWVuc2lvbilcbiAgICAgICAgKVxuICAgIH1cblxuICAgIGZ1biB0b091dGVyU2l6ZShpbm5lcjogRG91YmxlVmVjdG9yKTogRG91YmxlVmVjdG9yIHtcbiAgICAgICAgdmFsIG91dGVyV2lkdGggPSBpbm5lci54IC8gKDEgLSAobGVmdCArIHJpZ2h0KSlcbiAgICAgICAgdmFsIG91dGVySGVpZ2h0ID0gaW5uZXIueSAvICgxIC0gKHRvcCArIGJvdHRvbSkpXG4gICAgICAgIHJldHVybiBEb3VibGVWZWN0b3Iob3V0ZX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gIGZ1biBjaGFuZ2VXaWR0aChyOiBEb3VibGVSZWN0YW5nbGUsIHdpZHRoOiBEb3VibGUpOiBEb3VibGVSZWN0YW5nbGUge1xuICAgICAgICByZXR1cm4gRG91YmxlUmVjdGFuZ2xlKFxuICAgICAgICAgICAgci5vcmlnaW4ueCxcbiAgICAgICAgICAgIHIub3JpZ2luLnksXG4gICAgICAgICAgICB3aWR0aCxcbiAgICAgICAgICAgIHIuZGltZW5zaW9uLnlcbiAgICAgICAgKVxuICAgIH1cblxuICAgIGZ1biBjaGFuZ2VXaWR0aEtlZXBSaWdodChyOiBEb3VibGVSZWN0YW5nbGUsIHdpZHRoOiBEb3VibGUpOiBEb3VibGVSZWN0YW5nbGUge1xuICAgICAgICByZXR1cm4gRG91YmxlUmVjdGFuZ2xlKFxuICAgICAgICAgICAgci5yaWdodCAtIHdpZHRoLFxuICAgICAgICAgICAgci5vcmlnaW4ueSxcbiAgICAgICAgICAgIHdpZHRoLFxuICAgICAgICAgICAgci5kaW1lbnNpb24ueVxuICAgICAgICApXG4gICAgfVxuXG4gICAgZnVuIGNoYW5nZUhlaWdodChyOiBEb3VibGVSZWN0YW5nbGUsIGhlaWdodDogRG91YmxlKTogRG91YmxlUmVjdGFuZ2xlIHtcbiAgICAgICAgcmV0dXJuIERvdWJsZVJlY3RhbmdsZShcbiAgICAgICAgICAgIHIub3JpZ2luLngsXG4gICAgICAgICAgICByLm9yaWdpbi55LFxuICAgICAgICAgICAgci5kaW1lbnNpb24ueCxcbiAgICAgICAgICAgIGhlaWdodFxuICAgICAgICApXG4gICAgfVxuXG4gICAgZnVuIGNoYW5nZUhlaWdodEtlZXBCb3R0b20ocjogRG91YmxlUmVjdGFuZ2xlLCBoZWlnaHQ6IERvdWJsZSk6IERvdWJsZVJlY3RhbmdsZSB7XG4gICAgICAgIHJldHVybiBEb3VibGVSZWN0YW5nbGUoXG4gICAgICAgICAgICByLm9yaWdpbi54LFxuICAgICAgICAgICAgci5ib3R0b20gLSBoZWln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9IEFycmF5TGlzdDxMZWdlbmRCb3hlc0xheW91dC5Cb3hXaXRoTG9jYXRpb24+KClcbiAgICAgICAgdmFyIHkgPSAwLjBcbiAgICAgICAgZm9yIChpbmZvIGluIGJveEluZm9zKSB7XG4gICAgICAgICAgICByZXN1bHQuYWRkKFxuICAgICAgICAgICAgICAgIExlZ2VuZEJveGVzTGF5b3V0LkJveFdpdGhMb2NhdGlvbihcbiAgICAgICAgICAgICAgICAgICAgaW5mbyxcbiAgICAgICAgICAgICAgICAgICAgRG91YmxlVmVjdG9yKDAuMCwgeSlcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICApXG4gICAgICAgICAgICB5ICs9IGluZm8uc2l6ZS55XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHJlc3VsdFxuICAgIH1cblxuICAgIHByaXZhdGUgZnVuIGhvcml6b250YWxTdGFjayhib3hJbmZvczogTGlzdDxMZWdlbmRCb3hJbmZvPik6IExpc3Q8TGVnZW5kQm94ZXNMYXlvdXQuQm94V2l0aExvY2F0aW9uPiB7XG4gICAgICAgIHZhbCByZXN1bHQgPSBBcnJheUxpc3Q8TGVnZW5kQm94ZXNMYXlvdXQuQm94V2l0aExvY2F0aW9uPigpXG4gICAgICAgIHZhciB4ID0gMC4wXG4gICAgICAgIGZvciAoaW5mbyBpbiBib3hJbmZvcykge1xuICAgICAgICAgICAgcmVzdWx0LmFkZChcbiAgICAgICAgICAgICAgICBMZWdlbmRCb3hlc0xheW91dC5Cb3hXaXRoTG9jYXRpb24oXG4gICAgICAgICAgICAgICAgICAgIGluZm8sXG4gICAgICAgICAgICAgICAgICAgIERvdWJsZVZlY3Rvcih4LCAwLjApXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgeCArPSBpbmZvLnNpemUueFxuICAgICAgICB9XG4gICAgICAgIHJldHVybiByZXN1bHRcbiAgICB9XG5cbiAgICBmdW4gb3ZlcmxheUxlZ2VuZE9yaWdpbihcbiA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ICAgYXhpc1RpdGxlQm90dG9tLFxuICAgICAgICAgICAgYXhpc0VuYWJsZWQsXG4gICAgICAgICAgICBsZWdlbmRzQmxvY2tJbmZvLFxuICAgICAgICAgICAgdGhlbWUsXG4gICAgICAgICAgICBmbGlwcGVkQXhpc1xuICAgICAgICApXG4gICAgICAgIHZhbCByZWR1Y2VkID0gYmFzZVNpemUuc3VidHJhY3QoZGVsdGEpXG4gICAgICAgIHJldHVybiBEb3VibGVWZWN0b3IoXG4gICAgICAgICAgICBtYXgocmVkdWNlZC54LCBUaWxlTGF5b3V0VXRpbC5HRU9NX01JTl9TSVpFLngpLFxuICAgICAgICAgICAgbWF4KHJlZHVjZWQueSwgVGlsZUxheW91dFV0aWwuR0VPTV9NSU5fU0laRS55KVxuICAgICAgICApXG4gICAgfVxuXG4gICAgZnVuIGFkZFRpdGxlc0FuZExlZ2VuZHMoXG4gICAgICAgIGJhc2U6IERvdWJsZVZlY3RvcixcbiAgICAgICAgdGl0bGU6IFN0cmluZz8sXG4gICAgICAgIHN1YnRpdGxlOiBTdHJpbmc/LFxuICAgICAgICBjYXB0aW9uOiBTdHJpbmc/LFxuICAgICAgICBheGlzVGl0bGVMZWZ0OiBTdHJpbmc/LFxuICAgICAgICBheGlzVGl0bGVCb3R0b206IFN0cmluZz8sXG4gICAgICAgIGF4aXNFbmFibGVkOiBCb29sZWFuLFxuICAgICAgICBsZWdlbmRzQmxvY2tJbmZvOiBMZWdlbmRzQmxvY2tJbmZvLFxuICAgICAgICB0aGVtZTogVGhlbWUsXG4gICAgICAgIGZsaXBwZWRBeGlzOiBCb29sZWFuXG4gICAgKTogRG91YmxlVmVjdG9yIHtcbiAgICAgICAgdmFsIGRlbHRhID0gdGl0bGVzQW5kTGVnZW5kc1NpemVEZWx0YShcbiAgICAgICAgICAgIHRpdGxlLFxuICAgICAgICAgICAgc3VidGl0bGUsXG4gICAgICAgICAgICBjYXB0aW9uLFxuICAgICAgICAgICAgYXhpc1RpdGxlTGVmdCxcbiA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IChyb3RhdGlvbikge1xuICAgICAgICAgICAgICAgIG51bGwgLT4gRG91YmxlVmVjdG9yKHgsIHkpXG4gICAgICAgICAgICAgICAgVGV4dFJvdGF0aW9uLkNMT0NLV0lTRSAtPiBEb3VibGVWZWN0b3IocmVjdC50b3AgKyByZWN0LmJvdHRvbSAtIHksIHgpXG4gICAgICAgICAgICAgICAgVGV4dFJvdGF0aW9uLkFOVElDTE9DS1dJU0UgLT4gRG91YmxlVmVjdG9yKHksIHJlY3QubGVmdCArIHJlY3QucmlnaHQgLSB4KVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHBvc2l0aW9uIHRvIGhBbmNob3JcbiAgICAgICAgfVxuXG4gICAgICAgIHByaXZhdGUgZnVuIHhQb3NpdGlvbihcbiAgICAgICAgICAgIGJvdW5kUmVjdDogRG91YmxlUmVjdGFuZ2xlLFxuICAgICAgICAgICAgaGp1c3Q6IERvdWJsZSxcbiAgICAgICAgKTogUGFpcjxEb3VibGUsIFRleHQuSG9yaXpvbnRhbEFuY2hvcj4ge1xuICAgICAgICAgICAgLy8gdG9kbzpcbiAgICAgICAgICAgIC8vICB2YWwgdGV4dFdpZHRoID0gdGV4dFNpemUueFxuICAgICAgICAgICAgLy8gIHZhbCBhbmNob3IgPSBUZXh0Lkhvcml6b250YWxBbmNob3IuTEVGVFxuICAgICAgICAgICAgdmFsIHRleHRXaWR0aCA9IDAuMFxuICAgICAgICAgICAgdmFsIGFuY2hvciA9IHdoZW4ge1xuICAgICAgICAgICAgICAgIGhqdXN0IDwgMC41IC0+IFRleHQuSG9yaXpvbnRhbEFuY2hvci5MRUZUXG4gICAgICAgICAgICAgICAgaGp1c3QgPT0gMC41IC0+IFRleHQuSG9yaXpvbnRhbEFuY2hvci5NSURETEVcbiAgICAgICAgICAgICAgICBlbHNlIC0+IFRleHQuSG9yaXpvbnRhbEFuY2hvci5SSUdIVFxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFsIHggPSBib3VuZFJ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AgLy8gdGlsZSBpbmRleCBiZWZvcmUgcmUtb3JkZXJpbmcgKGluIGZhY2V0IHdyYXApXG4pIHtcbiAgICB2YWwgaEF4aXNTaG93bjogQm9vbGVhbiA9IGhBeGlzSW5mbyAhPSBudWxsICYmIGhBeGlzU2hvd25cbiAgICB2YWwgdkF4aXNTaG93bjogQm9vbGVhbiA9IHZBeGlzSW5mbyAhPSBudWxsICYmIHZBeGlzU2hvd25cblxuICAgIGZ1biB3aXRoT2Zmc2V0KG9mZnNldDogRG91YmxlVmVjdG9yKTogVGlsZUxheW91dEluZm8ge1xuICAgICAgICByZXR1cm4gVGlsZUxheW91dEluZm8oXG4gICAgICAgICAgICBvZmZzZXQgPSBvZmZzZXQsXG4gICAgICAgICAgICB0aGlzLmJvdW5kcyxcbiAgICAgICAgICAgIHRoaXMuZ2VvbU91dGVyQm91bmRzLFxuICAgICAgICAgICAgdGhpcy5nZW9tSW5uZXJCb3VuZHMsXG4gICAgICAgICAgICB0aGlzLmhBeGlzSW5mbywgdGhpcy52QXhpc0luZm8sXG4gICAgICAgICAgICB0aGlzLmhBeGlzU2hvd24sIHRoaXMudkF4aXNTaG93bixcbiAgICAgICAgICAgIHRoaXMuZmFjZXRYTGFiZWxzLCB0aGlzLmZhY2V0WUxhYmVsLFxuICAgICAgICAgICAgdGhpcy50cnVlSW5kZXhcbiAgICAgICAgKVxuICAgIH1cblxuICAgIGZ1biB3aXRoRmFjZXRMYWJlbHMoeExhYmVsczogTGlzdDxTdHJpbmc+LCB5TGFiZWw6IFN0cmluZz8pOiBUaWxlTGF5b3V0SW5mbyB7XG4gICAgICAgIHJldHVybiBUaWxlTGF5b3V0SW5mbyhcbiAgICAgICAgICAgIHRoaXMub2Zmc2V0LFxuICAgICAgICAgICAgdGhpcy5ib3VuZHMsXG4gICAgICAgICAgICB0aGlzLmdlb21PdXRlckJvdW5kcyxcbiAgICAgICAgICAgIHRoaXMuZ2VvbUlubmVyQm91bmRzLFxuICAgICAgICAgICAgdGhpcy5oQXhpc0luZm8sIHRoaXMudkF4aXNJbmZvLFxuICAgICAgICAgICAgdGhpcy5oQXhpc1Nob3duLCB0aGlzLnZBeGlzU2hvd24sXG4gICAgICAgICAgICB4TGFiZWxzLCB5TGFiZWwsXG4gICAgICAgICAgICB0aGlzLnRydWVJbmRleFxuICAgICAgICApXG4gICAgfVxuXG4gICAgZnVuIHdpdGhBeGlzU2hvd24oaEF4aXNTaG93bjogQm9vbGVhbiwgdkF4aXNTaG93bjogQm9vbGVhbik6IFRpbGVMYXlvdXRJbmZvIHtcbiAgICAgICAgcmV0dXJuIFRpbGVMYXlvdXRJbmZvKFxuICAgICAgICAgICAgdGhpcy5vZmZzZXQsXG4gICAgICAgICAgICB0aGlzLmJvdW5kcyxcbiAgICAgICAgICAgIHRoaXMuZ2VvbU91dGVyQm91bmRzLFxuICAgICAgICAgICAgdGhpcy5nZW9tSW5uZXJCb3VuZHMsXG4gICAgICAgICAgICB0aGlzLmhBeGlzSW5mbywgdGhpcy52QXhpc0luZm8sXG4gICAgICAgICAgICBoQXhpc1Nob3duLCB2QXhpc1Nob3duLFxuICAgICAgICAgICAgdGhpcy5mYWNldFhMYWJlbHMsIHRoaXMuZmFjZXRZTGFiZWwsXG4gICAgICAgICAgICB0aGlzLnRydWVJbmRleFxuICAgICAgICApXG4gICAgfVxuXG4gICAgZnVuIGdldEFic29sdXRlQm91bmRzKHRpbGVzT3JpZ2luOiBEb3VibGVWZWN0b3IpOiBEb3VibGVSZWN0YW5nbGUge1xuICAgICAgICB2YWwgb2Zmc2V0ID0gdGlsZXNPcmlnaW4uYWRkKHRoaXMub2Zmc2V0KVxuICAgICAgICByZXR1cm4gYm91bmRzLmFkZChvZmZzZXQpXG4gICAgfVxuXG4gICAgZnVuIGdldEFic29sdXRlT3V0ZXJHZW9tQm91bmRzKHRpbGVzT3JpZ2luOiBEb3VibGVWZWN0b3IpOiBEb3VibGVSZWN0YW5nbGUge1xuICAgICAgICB2YWwgb2Zmc2V0ID0gdGls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KTogKERvdWJsZT8pIC0+IERvdWJsZT9cblxuICAgIHByb3RlY3RlZCBmdW4gdG9TY2FsZU1hcHBlcihheGlzTGVuZ3RoOiBEb3VibGUpOiBTY2FsZU1hcHBlcjxEb3VibGU+IHtcbiAgICAgICAgcmV0dXJuIE1hcHBlcnMubXVsKGRvbWFpblJhbmdlLCBheGlzTGVuZ3RoKVxuICAgIH1cblxuICAgIGNvbXBhbmlvbiBvYmplY3Qge1xuICAgICAgICBmdW4gY3JlYXRlKFxuICAgICAgICAgICAgb3JpZW50YXRpb246IE9yaWVudGF0aW9uLFxuICAgICAgICAgICAgYXhpc0RvbWFpbjogRG91YmxlU3BhbiwgYnJlYWtzUHJvdmlkZXI6IEF4aXNCcmVha3NQcm92aWRlciwgdGhlbWU6IEF4aXNUaGVtZVxuICAgICAgICApOiBBeGlzTGF5b3V0ZXIge1xuXG4gICAgICAgICAgICBpZiAob3JpZW50YXRpb24uaXNIb3Jpem9udGFsKSB7XG4gICAgICAgICAgICAgICAgdmFsIGxhYmVsc0xheW91dDogQXhpc0xhYmVsc0xheW91dCA9IGlmIChicmVha3NQcm92aWRlci5pc0ZpeGVkQnJlYWtzKSB7XG4gICAgICAgICAgICAgICAgICAgIEF4aXNMYWJlbHNMYXlvdXQuaG9yaXpvbnRhbEZpeGVkQnJlYWtzKFxuICAgICAgICAgICAgICAgICAgICAgICAgb3JpZW50YXRpb24sXG4gICAgICAgICAgICAgICAgICAgICAgICBheGlzRG9tYWluLFxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWtzUHJvdmlkZXIuZml4ZWRCcmVha3MsXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGVtZVxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgQXhpc0xhYmVsc0xheW91dC5ob3Jpem9udGFsRmxleEJyZWFrcyhvcmllbnRhdGlvbiwgYXhpc0RvbWFpbiwgYnJlYWtzUHJvdmlkZXIsIHRoZW1lKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gSG9yaXpvbnRhbEF4aXNMYXlvdXRlcihcbiAgICAgICAgICAgICAgICAgICAgb3JpZW50YXRpb24sXG4gICAgICAgICAgICAgICAgICAgIGF4aXNEb21haW4sXG4gICAgICAgICAgICAgICAgICAgIGxhYmVsc0xheW91dFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gdmVydGljYWxcbiAgICAgICAgICAgIHZhbCBsYWJlbHNMYXlvdXQ6IEF4aXNMYWJlbHNMYXlvdXQgPSBpZiAoYnJlYWtzUHJvdmlkZXIuaXNGaXhlZEJyZWFrcykge1xuICAgICAgICAgICAgICAgIEF4aXNMYWJlbHNMYXlvdXQudmVydGljYWxGaXhlZEJyZWFrcyhvcmllbnRhdGlvbiwgYXhpc0RvbWFpbiwgYnJlYWtzUHJvdmlkZXIuZml4ZWRCcmVha3MsIHRoZW1lKVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBBeGlzTGFiZWxzTGF5b3V0LnZlcnRpY2FsRmxleEJyZWFrcyhvcmllbnRhdGlvbiwgYXhpc0RvbWFpbiwgYnJlYWtzUHJvdmlkZXIsIHRoZW1lKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIFZlcnRpY2FsQXhpc0xheW91dGVyKFxuICAgICAgICAgICAgICAgIG9yaWVudGF0aW9uLFxuICAgICAgICAgICAgICAgIGF4aXNEb21haW4sXG4gICAgICAgICAgICAgICAgbGFiZWxzTGF5b3V0XG4gICAgICAgICAgICApXG4gICAgICAgIH1cbiAgICB9XG59XG4iLCIvKlxuICogQ29weXJpZ2h0IChjKSAyMDIwLiBKZXRCcmFpbnMgcy5yLm8uXG4gKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSB0aGUgTUlUIGxpY2Vuc2UgdG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AgIHRpY2tQb3NpdGlvbnM6IExpc3Q8RG91YmxlPixcbiAgICAgICAgdGlja0xhYmVsczogTGlzdDxTdHJpbmc+LFxuICAgICAgICB0b1RpY2tMb2NhdGlvbjogKERvdWJsZSkgLT4gRG91YmxlVmVjdG9yXG4gICAgKTogTGlzdDxEb3VibGVSZWN0YW5nbGU+IHtcbiAgICAgICAgdmFsIHJlc3VsdCA9IEFycmF5TGlzdDxEb3VibGVSZWN0YW5nbGU+KClcbiAgICAgICAgdmFsIGxhYmVscyA9IHRpY2tMYWJlbHMuaXRlcmF0b3IoKVxuICAgICAgICBmb3IgKHBvcyBpbiB0aWNrUG9zaXRpb25zKSB7XG4gICAgICAgICAgICB2YWwgbGFiZWwgPSBsYWJlbHMubmV4dCgpXG4gICAgICAgICAgICB2YWwgYm91bmRzID0gbGFiZWxCb3VuZHModG9UaWNrTG9jYXRpb24ocG9zKSwgbGFiZWwpXG4gICAgICAgICAgICByZXN1bHQuYWRkKGJvdW5kcylcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gcmVzdWx0XG4gICAgfVxuXG5cbiAgICBmdW4gY3JlYXRlQXhpc0xhYmVsc0xheW91dEluZm9CdWlsZGVyKGJvdW5kczogRG91YmxlUmVjdGFuZ2xlLCBvdmVybGFwOiBCb29sZWFuKTogQXhpc0xhYmVsc0xheW91dEluZm8uQnVpbGRlciB7XG4gICAgICAgIHJldHVybiBBeGlzTGFiZWxzTGF5b3V0SW5mby5CdWlsZGVyKClcbiAgICAgICAgICAgIC5icmVha3MoYnJlYWtzKVxuICAgICAgICAgICAgLmJvdW5kcyhhcHBseUxhYmVsc01hcmdpbnMoYm91bmRzKSlcbiAgICAgICAgICAgIC5vdmVybGFwKG92ZXJsYXApXG4gICAgfVxuXG4gICAgZnVuIG5vTGFiZWxzTGF5b3V0SW5mbyhcbiAgICAgICAgYXhpc0xlbmd0aDogRG91YmxlLFxuICAgICAgICBvcmllbnRhdGlvbjogT3JpZW50YXRpb25cbiAgICApOiBBeGlzTGFiZWxzTGF5b3V0SW5mbyB7XG4gICAgICAgIGlmIChvcmllbnRhdGlvbi5pc0hvcml6b250YWwpIHtcbiAgICAgICAgICAgIHZhciBib3VuZHMgPSBEb3VibGVSZWN0YW5nbGUoYXhpc0xlbmd0aCAvIDIsIDAuMCwgMC4wLCAwLjApIC8vIGVtcHR5IGJvdW5kcyBpbiB0aGUgbWlkZGxlIG9mIHRoZSBheGlzO1xuICAgICAgICAgICAgYm91bmRzID0gYXBwbHlMYWJlbHNNYXJnaW5zKGJvdW5kcylcbiAgICAgICAgICAgIHJldHVybiBBeGlzTGFiZWxzTGF5b3V0SW5mby5CdWlsZGVyKClcbiAgICAgICAgICAgICAgICAuYnJlYWtzKGJyZWFrcylcbiAgICAgICAgICAgICAgICAuYm91bmRzKGJvdW5kcylcbiAgICAgICAgICAgICAgICAub3ZlcmxhcChmYWxzZSlcbiAgICAgICAgICAgICAgICAubGFiZWxBZGRpdGlvbmFsT2Zmc2V0cyhudWxsKVxuICAgICAgICAgICAgICAgIC5sYWJlbEhvcml6b250YWxBbmNob3IoVGV4dC5Ib3Jpem9udGFsQW5jaG9yLk1JRERMRSlcbiAgICAgICAgICAgICAgICAubGFiZWxWZXJ0aWNhbEFuY2hvcihUZXh0LlZlcnRpY2FsQW5jaG9yLlRPUClcbiAgICAgICAgICAgICAgICAuYnVpbGQoKVxuICAgICAgICB9XG5cbiAgICAgICAgdGhyb3cgSWxsZWdhbFN0YXRlRXhjZXB0aW9uKFwiTm90IGltcGxlbWVudGVkIGZvciAkb3JpZW50YXRpb25cIilcbiAgICB9XG5cbiAgICBjb21wYW5pb24gb2JqZWN0IHtcbiAgICAgICAgdmFsIEhPUklaT05UQUxfVElDS19MT0NBVElPTiA9IHsgeDogRG91YmxlIC0+IERvdWJsZVZlY3Rvcih4LCAwLjApIH1cbiAgICB9XG5cbn1cbiIsIi8qXG4gKiBDb3B5cmlnaHQgKGMpIDIwMjAuIEpldEJyYWlucyBzLnIuby5cbiAqIFV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bCB0aGVtZTogQXhpc1RoZW1lXG4pIHtcblxuICAgIHByb3RlY3RlZCB2YWwgaXNIb3Jpem9udGFsOiBCb29sZWFuXG4gICAgICAgIGdldCgpID0gb3JpZW50YXRpb24uaXNIb3Jpem9udGFsXG5cbiAgICBhYnN0cmFjdCBmdW4gZG9MYXlvdXQoXG4gICAgICAgIGF4aXNMZW5ndGg6IERvdWJsZSxcbiAgICAgICAgYXhpc01hcHBlcjogKERvdWJsZT8pIC0+IERvdWJsZT8sXG4gICAgICAgIG1heExhYmVsc0JvdW5kczogRG91YmxlUmVjdGFuZ2xlP1xuICAgICk6IEF4aXNMYWJlbHNMYXlvdXRJbmZvXG5cbiAgICBpbnRlcm5hbCBmdW4gbWFwVG9BeGlzKFxuICAgICAgICBicmVha3M6IExpc3Q8RG91YmxlPixcbiAgICAgICAgYXhpc01hcHBlcjogKERvdWJsZT8pIC0+IERvdWJsZT9cbiAgICApOiBMaXN0PERvdWJsZT4ge1xuXG4gICAgICAgIHJldHVybiBCcmVha0xhYmVsc0xheW91dFV0aWwubWFwVG9BeGlzKFxuICAgICAgICAgICAgYnJlYWtzLFxuICAgICAgICAgICAgYXhpc0RvbWFpbixcbiAgICAgICAgICAgIGF4aXNNYXBwZXJcbiAgICAgICAgKVxuICAgIH1cblxuICAgIGludGVybmFsIGZ1biBhcHBseUxhYmVsc01hcmdpbnMobGFiZWxzQm91bmRzOiBEb3VibGVSZWN0YW5nbGUpOiBEb3VibGVSZWN0YW5nbGUge1xuICAgICAgICByZXR1cm4gQnJlYWtMYWJlbHNMYXlvdXRVdGlsLmFwcGx5TGFiZWxzTWFyZ2lucyhcbiAgICAgICAgICAgIGxhYmVsc0JvdW5kcyxcbiAgICAgICAgICAgIGlmICh0aGVtZS5zaG93VGlja01hcmtzKCkpIHRoZW1lLnRpY2tNYXJrTGVuZ3RoKCkgZWxzZSAwLjAsXG4gICAgICAgICAgICB0aGVtZS50aWNrTGFiZWxNYXJnaW5zKCksXG4gICAgICAgICAgIC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zUHJvdmlkZXIsXG4gICAgICAgICAgICAgICAgdGhlbWVcbiAgICAgICAgICAgIClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBob3Jpem9udGFsRml4ZWRCcmVha3MoXG4gICAgICAgICAgICBvcmllbnRhdGlvbjogT3JpZW50YXRpb24sXG4gICAgICAgICAgICBheGlzRG9tYWluOiBEb3VibGVTcGFuLCBicmVha3M6IFNjYWxlQnJlYWtzLCB0aGVtZTogQXhpc1RoZW1lXG4gICAgICAgICk6IEF4aXNMYWJlbHNMYXlvdXQge1xuXG4gICAgICAgICAgICByZXF1aXJlKG9yaWVudGF0aW9uLmlzSG9yaXpvbnRhbCkgeyBvcmllbnRhdGlvbi50b1N0cmluZygpIH1cbiAgICAgICAgICAgIHJldHVybiBIb3Jpem9udGFsRml4ZWRCcmVha3NMYWJlbHNMYXlvdXQoXG4gICAgICAgICAgICAgICAgb3JpZW50YXRpb24sXG4gICAgICAgICAgICAgICAgYXhpc0RvbWFpbixcbiAgICAgICAgICAgICAgICB0aWNrTGFiZWxTcGVjKHRoZW1lKSxcbiAgICAgICAgICAgICAgICBicmVha3MsXG4gICAgICAgICAgICAgICAgdGhlbWVcbiAgICAgICAgICAgIClcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biB2ZXJ0aWNhbEZsZXhCcmVha3MoXG4gICAgICAgICAgICBvcmllbnRhdGlvbjogT3JpZW50YXRpb24sXG4gICAgICAgICAgICBheGlzRG9tYWluOiBEb3VibGVTcGFuLCBicmVha3NQcm92aWRlcjogQXhpc0JyZWFrc1Byb3ZpZGVyLCB0aGVtZTogQXhpc1RoZW1lXG4gICAgICAgICk6IEF4aXNMYWJlbHNMYXlvdXQge1xuXG4gICAgICAgICAgICByZXF1aXJlKCFvcmllbnRhdGlvbi5pc0hvcml6b250YWwpIHsgb3JpZW50YXRpb24udG9TdHJpbmcoKSB9XG4gICAgICAgICAgICByZXF1aXJlKCFicmVha3NQcm92aWRlci5pc0ZpeGVkQnJlYWtzKSB7IFwiZml4ZWQgYnJlYWtzXCIgfVxuICAgICAgICAgICAgcmV0dXJuIFZlcnRpY2FsRmxleEJyZWFrc0xhYmVsc0xheW91dChcbiAgICAgICAgICAgICAgICBvcmllbnRhdGlvbixcbiAgICAgICAgICAgICAgICBheGlzRG9tYWluLFxuICAgICAgICAgICAgICAgIHRpY2tMYWJlbFNwZWModGhlbWUpLFxuICAgICAgICAgICAgICAgIGJyZWFrc1Byb3ZpZGVyLFxuICAgICAgICAgICAgICAgIHRoZW1lXG4gICAgICAgICAgICApXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gdmVydGljYWxGaXhlZEJyZWFrcyhcbiAgICAgICAgICAgIG9yaWVudGF0aW9uOiBPcmllbnRhdGlvbixcbiAgICAgICAgICAgIGF4aXNEb21haW46IERvdWJsZVNwYW4sXG4gICAgICAgICAgICBicmVha3M6IFNjYWxlQnJlYWtzLFxuICAgICAgICAgICAgdGhlbWU6IEF4aXNUaGVtZVxuICAgICAgICApOiBBeGlzTGFiZWxzTGF5b3V0IHtcbiAgICAgICAgICAgIHJlcXVpcmUoIW9yaWVudGF0aW9uLmlzSG9yaXpvbnRhbCkgeyBvcmllbnRhdGlvbi50b1N0cmluZygpIH1cbiAgICAgICAgICAgIHJldHVybiBWZXJ0aWNhbEZpeGVkQnJlYWtzTGFiZWxzTGF5b3V0KFxuICAgICAgICAgICAgICAgIG9yaWVudGF0aW9uLFxuICAgICAgICAgICAgICAgIGF4aXNEb21haW4sXG4gICAgICAgICAgICAgICAgdGlja0xhYmVsU3BlYyh0aGVtZSksXG4gICAgICAgICAgICAgICAgYnJlYWtzLFxuICAgICAgICAgICAgICAgIHRoZW1lXG4gICAgICAgICAgICApXG4gICAgICAgIH1cbiAgICB9XG59XG4iLCIvKlxuICogQ29weXJpZ2h0IChjKSAyMDIwLiBKZXRCcmFpbnMgcy5yLm8uXG4gKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSB0aGUgTU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VuIGJyZWFrcyhicmVha3M6IFNjYWxlQnJlYWtzKTogQnVpbGRlciB7XG4gICAgICAgICAgICBteUJyZWFrcyA9IGJyZWFrc1xuICAgICAgICAgICAgcmV0dXJuIHRoaXNcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBib3VuZHMoYm91bmRzOiBEb3VibGVSZWN0YW5nbGUpOiBCdWlsZGVyIHtcbiAgICAgICAgICAgIG15Qm91bmRzID0gYm91bmRzXG4gICAgICAgICAgICByZXR1cm4gdGhpc1xuICAgICAgICB9XG5cbiAgICAgICAgZnVuIG92ZXJsYXAoYjogQm9vbGVhbik6IEJ1aWxkZXIge1xuICAgICAgICAgICAgbXlPdmVybGFwID0gYlxuICAgICAgICAgICAgcmV0dXJuIHRoaXNcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBsYWJlbEFkZGl0aW9uYWxPZmZzZXRzKGw6IExpc3Q8RG91YmxlVmVjdG9yPj8pOiBCdWlsZGVyIHtcbiAgICAgICAgICAgIG15TGFiZWxBZGRpdGlvbmFsT2Zmc2V0cyA9IGxcbiAgICAgICAgICAgIHJldHVybiB0aGlzXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gbGFiZWxIb3Jpem9udGFsQW5jaG9yKGFuY2hvcjogVGV4dC5Ib3Jpem9udGFsQW5jaG9yKTogQnVpbGRlciB7XG4gICAgICAgICAgICBteUxhYmVsSG9yaXpvbnRhbEFuY2hvciA9IGFuY2hvclxuICAgICAgICAgICAgcmV0dXJuIHRoaXNcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1biBsYWJlbFZlcnRpY2FsQW5jaG9yKGFuY2hvcjogVGV4dC5WZXJ0aWNhbEFuY2hvcik6IEJ1aWxkZXIge1xuICAgICAgICAgICAgbXlMYWJlbFZlcnRpY2FsQW5jaG9yID0gYW5jaG9yXG4gICAgICAgICAgICByZXR1cm4gdGhpc1xuICAgICAgICB9XG5cbiAgICAgICAgZnVuIGxhYmVsUm90YXRpb25BbmdsZShhbmd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HVlcy5zdWJMaXN0KDAsIDEpLFxuICAgICAgICAgICAgICAgIGJyZWFrcy5sYWJlbHMuc3ViTGlzdCgwLCAxKVxuICAgICAgICAgICAgKVxuICAgICAgICB9XG4gICAgICAgIHZhciBjb3VudCA9IG1heENvdW50XG4gICAgICAgIHdoaWxlIChicmVha3Muc2l6ZSA+IG1heENvdW50KSB7XG4gICAgICAgICAgICB2YWwgZGVsdGEgPSBtYXgoMSwgKGJyZWFrcy5zaXplIC0gbWF4Q291bnQpIC8gMilcbiAgICAgICAgICAgIGNvdW50IC09IGRlbHRhXG4gICAgICAgICAgICBpZiAoY291bnQgPD0gMSkge1xuICAgICAgICAgICAgICAgIGJyZWFrcyA9IGJyZWFrc1Byb3ZpZGVyLmdldEJyZWFrcygxLCBheGlzTGVuZ3RoKVxuICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVha3MgPSBicmVha3NQcm92aWRlci5nZXRCcmVha3MoY291bnQsIGF4aXNMZW5ndGgpXG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGJyZWFrc1xuICAgIH1cblxuICAgIGZ1biBsb25nZXN0TGFiZWxXaWR0aChcbiAgICAgICAgbGFiZWxzOiBMaXN0PFN0cmluZz4sXG4gICAgICAgIGxhYmVsVG9XaWR0aDogKFN0cmluZykgLT4gRG91YmxlID0geyBpdC5sZW5ndGgudG9Eb3VibGUoKSB9XG4gICAgKTogRG91YmxlIHtcbiAgICAgICAgdmFsIGxvbmdlc3RMYWJlbCA9IGxhYmVscy5tYXhCeU9yTnVsbChsYWJlbFRvV2lkdGgpXG4gICAgICAgIHJldHVybiBpZiAobG9uZ2VzdExhYmVsID09IG51bGwpXG4gICAgICAgICAgICAwLjBcbiAgICAgICAgZWxzZVxuICAgICAgICAgICAgbGFiZWxUb1dpZHRoKGxvbmdlc3RMYWJlbClcbiAgICB9XG5cbiAgICBmdW4gaG9yaXpvbnRhbENlbnRlcmVkTGFiZWxCb3VuZHMobGFiZWxTaXplOiBEb3VibGVWZWN0b3IpOiBEb3VibGVSZWN0YW5nbGUge1xuICAgICAgICByZXR1cm4gRG91YmxlUmVjdGFuZ2xlKC1sYWJlbFNpemUueCAvIDIuMCwgMC4wLCBsYWJlbFNpemUueCwgbGFiZWxTaXplLnkpXG4gICAgfVxuXG4gICAgZnVuIGRvTGF5b3V0VmVydGljYWxBeGlzTGFiZWxzKFxuICAgICAgICBvcmllbnRhdGlvbjogT3JpZW50YXRpb24sXG4gICAgICAgIGJyZWFrczogU2NhbGVCcmVha3MsXG4gICAgICAgIGF4aXNEb21haW46IERvdWJsZVNwYW4sXG4gICAgICAgIGF4aXNNYXBwZXI6IChEb3VibGU/KSAtPiBEb3VibGU/LFxuICAgICAgICB0aGVtZTogQXhpc1RoZW1lXG4gICAgKTogQXhpc0xhYmVsc0xheW91dEluZm8ge1xuXG4gICAgICAgIHZhbCBheGlzQm91bmRzID0gd2hlbiB7XG4gICAgICAgICAgICB0aGVtZS5zaG93TGFiZWxzKCkgLT4ge1xuICAgICAgICAgICAgICAgIHZhbCBsYWJlbHNCb3VuZHMgPSB2ZXJ0aWNhbEF4aXNMYWJlbHNCb3VuZHMoXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrcyxcbiAgICAgICAgICAgICAgICAgICAgYXhpc0RvbWFpbixcbiAgICAgICAgICAgICAgICAgICAgYXhpc01hcHBlcixcbiAgICAgICAgICAgICAgICAgICAgUGxvdExhYmVsU3BlY0ZhY3RvcnkuYXhpc1RpY2sodGhlbWUpXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIGFwcGx5TGFiZWxzTWFyZ2lucyhcbiAgICAgICAgICAgICAgICAgICAgbGFiZWxzQm91bmRzLFxuICAgICAgICAgICAgICAgICAgICBpZiAodGhlbWUuc2hvd1RpY2tNYXJrcygpKSB0aGVtZS50aWNrTWFya0xlbmd0aCgpIGVsc2UgMC4wLFxuICAgICAgICAgICAgICAgICAgICB0aGVtZS50aWNrTGFiZWxNYXJnaW5zKCksXG4gICAgICAgICAgICAgICAgICAgIG9yaWVudGF0aW9uXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhlbWUuc2hvd1RpY2tNYXJrcygpIC0+IHtcbiAgICAgICAgICAgICAgICB2YWwgbGFiZWxzQm91bmRzID0gRG91YmxlUmVjdGFuZ2xlKERvdWJsZVZlY3Rvci5aRVJPLCBEb3VibGVWZWN0b3IuWkVSTylcbiAgICAgICAgICAgICAgICBhcHBseUxhYmVsc01hcmdpbnMoXG4gICAgICAgICAgICAgICAgICAgIGxhYmVsc0JvdW5kcyxcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoZW1lLnNob3dUaWNrTWFya3MoKSkgdGhlbWUudGlja01hcmtMZW5ndGgoKSBlbHNlIDAuMCxcbiAgICAgICAgICAgICAgICAgICAgdGhlbWUudGlja0xhYmVsTWFyZ2lucygpLFxuICAgICAgICAgICAgICAgICAgICBvcmllbnRhdGlvblxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgLT4gRG91YmxlUmVjdGFuZ2xlKERvdWJsZVZlY3Rvci5aRVJPLCBEb3VibGVWZWN0b3IuWkVSTylcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBBeGlzTGFiZWxzTGF5b3V0SW5mby5CdWlsZGVyKClcbiAgICAgICAgICAgIC5icmVha3MoYnJlYWtzKVxuICAgICAgICAgICAgLmJvdW5kcyhheGlzQm91bmRzKSAgICAgLy8gbGFiZWwgYm91bmRzIGFjdHVhbGx5XG4gICAgICAgICAgICAuYnVpbGQoKVxuICAgIH1cblxuICAgIGZ1biBtYXBUb0F4aXMoXG4gICAgICAgIGJyZWFrczogTGlzdDxEb3VibGU+LFxuICAgICAgICBheGlzRG9tYWluOiBEb3VibGVTcGFuLFxuICAgICAgICBheGlzTWFwcGVyOiAoRG91YmxlPykgLT4gRG91YmxlP1xuICAgICk6IExpc3Q8RG91YmxlPiB7XG4gICAgICAgIHZhbCBheGlzTWluID0gYXhpc0RvbWFpbi5sb3dlckVuZFxuICAgICAgICB2YWwgYXhpc0JyZWFrcyA9IEFycmF5TGlzdDxEb3VibGU+KClcbiAgICAgICAgZm9yICh2IGluIGJyZWFrcykge1xuICAgICAgICAgICAgdmFsIG1hcHBlZCA9IGF4aXNNYXBwZXIodiAtIGF4aXNNaW4pXG4gICAgICAgICAgICBheGlzQnJlYWtzLmFkZChtYXBwZWQhISlcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gYXhpc0JyZWFrc1xuICAgIH1cblxuICAgIGZ1biBhcHBseUxhYmVsc01hcmdpbnMoXG4gICAgICAgIGxhYmVsc0JvdW5kczogRG91YmxlUmVjdGFuZ2xlLFxuICAgICAgICB0aWNrTGVuZ3RoOiBEb3VibGUsXG4gICAgICAgIG1hcmdpbnM6IE1hcmdpbnMsXG4gICAgICAgIG9yaWVudGF0aW9uOiBPcmllbnRhdGlvblxuICAgICk6IERvdWJsZVJlY3RhbmdsZSB7XG4gICAgICAgIHZhbCBvZmZzZXQgPSB0aWNrTGVuZ3RoICsgd2hlbiAob3JpZW50YXRpb24pIHtcbiAgICAgICAgICAgIExFRlQgLT4gbWFyZ2lucy53aWR0aCgpICsgbGFiZWxzQm91bmRzLndpZHRoXG4gICAgICAgICAgICBUT1AgLT4gbWFyZ2lucy5oZWlnaHQoKSArIGxhYmVsc0JvdW5kcy5oZWlnaHRcbiAgICAgICAgICAgIFJJR0hULCBCT1RUT00gLT4gMC4wXG4gICAgICAgIH1cbiAgICAgICAgdmFsIG9mZnNldFZlY3RvciA9IHdoZW4gKG9yaWVudGF0aW9uKSB7XG4gICAgICAgICAgICBMRUZUIC0+IERvdWJsZVZlY3Rvcigtb2Zmc2V0LCAwLjApXG4gICAgICAgICAgICBSSUdIVCAtPiBEb3VibGVWZWN0b3Iob2Zmc2V0LCAwLjApXG4gICAgICAgICAgICBUT1AgLT4gRG91YmxlVmVjdG9yKDAuMCwgLW9mZnNldClcbiAgICAgICAgICAgIEJPVFRPTSAtPiBEb3VibGVWZWN0b3IoMC4wLCBvZmZzZXQpXG4gICAgICAgIH1cbiAgICAgICAgdmFsIGRpbWVuc2lvbiA9IGxhYmVsc0JvdW5kcy5kaW1lbnNpb24uYWRkKFxuICAgICAgICAgICAgd2hlbiB7XG4gICAgICAgICAgICAgICAgb3JpZW50YXRpb24uaXNIb3Jpem9udGFsIC0+IERvdWJsZVZlY3RvcigwLjAsIG1hcmdpbnMuaGVpZ2h0KCkpXG4gICAgICAgICAgICAgICAgZWxzZSAtPiBEb3VibGVWZWN0b3IobWFyZ2lucy53aWR0aCgpLCAwLjApXG4gICAgICAgICAgICB9XG4gICAgICAgIClcbiAgICAgICAgcmV0dXJuIERvdWJsZVJlY3RhbmdsZShcbiAgICAgICAgICAgIGxhYmVsc0JvdW5kcy5vcmlnaW4uYWRkKG9mZnNldFZlY3RvciksXG4gICAgICAgICAgICBkaW1lbnNpb25cbiAgICAgICAgKVxuICAgIH1cblxuICAgIGZ1biB0ZXh0Qm91bmRzKGVsZW1lbnRSZWN0OiBEb3VibGVSZWN0YW5nbGUsIG1hcmdpbnM6IE1hcmdpbnMsIG9yaWVudGF0aW9uOiBPcmllbnRhdGlvbik6IERvdWJsZVJlY3RhbmdsZSB7XG4gICAgICAgIHJldHVybiB3aGVuIHtcbiAgICAgICAgICAgIG9yaWVudGF0aW9uLmlzSG9yaXpvbnRhbCAtPiB7XG4gICAgICAgICAgICAgICAgRG91YmxlUmVjdGFuZ2xlKFxuICAgICAgICAgICAgICAgICAgICBlbGVtZW50UmVjdC5sZWZ0LFxuICAgICAgICAgICAgICAgICAgICBlbGVtZW50UmVjdC50b3AgKyBtYXJnaW5zLnRvcCxcbiAgICAgICAgICAgICAgICAgICAgZWxlbWVudFJlY3Qud2lkdGgsXG4gICAgICAgICAgICAgICAgICAgIGVsZW1lbnRSZWN0LmhlaWdodCAtIG1hcmdpbnMuaGVpZ2h0KClcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIC0+IHtcbiAgICAgICAgICAgICAgICBEb3VibGVSZWN0YW5nbGUoXG4gICAgICAgICAgICAgICAgICAgIGVsZW1lbnRSZWN0LmxlZnQgKyBtYXJnaW5zLmxlZnQsXG4gICAgICAgICAgICAgICAgICAgIGVsZW1lbnRSZWN0LnRvcCxcbiAgICAgICAgICAgICAgICAgICAgZWxlbWVudFJlY3Qud2lkdGggLSBtYXJnaW5zLndpZHRoKCksXG4gICAgICAgICAgICAgICAgICAgIGVsZW1lbnRSZWN0LmhlaWdodFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIHByaXZhdGUgZnVuIHZlcnRpY2FsQXhpc0xhYmVsc0JvdW5kcyhcbiAgICAgICAgYnJlYWtzOiBTY2FsZUJyZWFrcyxcbiAgICAgICAgYXhpc0RvbWFpbjogRG91YmxlU3BhbixcbiAgICAgICAgYXhpc01hcHBlcjogKERvdWJsZT8pIC0+IERvdWJsZT8sXG4gICAgICAgIHRpY2tMYWJlbFNwZWM6IExhYmVsU3BlY1xuICAgICk6IERvdWJsZVJlY3RhbmdsZSB7XG4gICAgICAgIHZhbCBtYXhMYWJlbFdpZHRoID0gbG9uZ2VzdExhYmVsV2lkdGgoYnJlYWtzLmxhYmVscykgeyB0aWNrTGFiZWxTcGVjLndpZHRoKGl0KSB9XG4gICAgICAgIHZhciB5MSA9IDAuMFxuICAgICAgICB2YXIgeTIgPSAwLjBcbiAgICAgICAgaWYgKCFicmVha3MuaXNFbXB0eSkge1xuICAgICAgICAgICAgdmFsIGF4aXNCcmVha3MgPSBtYXBUb0F4aXMoXG4gICAgICAgICAgICAgICAgYnJlYWtzLnRyYW5zZm9ybWVkVmFsdWVzLFxuICAgICAgICAgICAgICAgIGF4aXNEb21haW4sXG4gICAgICAgICAgICAgICAgYXhpc01hcHBlclxuICAgICAgICAgICA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mZvLCBtYXhMYWJlbHNCb3VuZHMpKSB7XG4gICAgICAgICAgICAgICAgICAgIGxhYmVsc0luZm8gPSB2ZXJ0aWNhbExheW91dChsYWJlbFNwZWMpLmRvTGF5b3V0KGF4aXNMZW5ndGgsIGF4aXNNYXBwZXIsIG1heExhYmVsc0JvdW5kcylcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGxhYmVsc0luZm9cbiAgICB9XG5cbiAgICBwcml2YXRlIGZ1biBzaW1wbGVMYXlvdXQoKTogQXhpc0xhYmVsc0xheW91dCB7XG4gICAgICAgIHJldHVybiBIb3Jpem9udGFsU2ltcGxlTGFiZWxzTGF5b3V0KFxuICAgICAgICAgICAgb3JpZW50YXRpb24sXG4gICAgICAgICAgICBheGlzRG9tYWluLFxuICAgICAgICAgICAgbGFiZWxTcGVjLFxuICAgICAgICAgICAgYnJlYWtzLFxuICAgICAgICAgICAgdGhlbWVcbiAgICAgICAgKVxuICAgIH1cblxuICAgIHByaXZhdGUgZnVuIG11bHRpbGluZUxheW91dCgpOiBBeGlzTGFiZWxzTGF5b3V0IHtcbiAgICAgICAgcmV0dXJuIEhvcml6b250YWxNdWx0aWxpbmVMYWJlbHNMYXlvdXQoXG4gICAgICAgICAgICBvcmllbnRhdGlvbixcbiAgICAgICAgICAgIGF4aXNEb21haW4sXG4gICAgICAgICAgICBsYWJlbFNwZWMsXG4gICAgICAgICAgICBicmVha3MsXG4gICAgICAgICAgICB0aGVtZSxcbiAgICAgICAgICAgIDJcbiAgICAgICAgKVxuICAgIH1cblxuICAgIHByaXZhdGUgZnVuIHRpbHRlZExheW91dCgpOiBBeGlzTGFiZWxzTGF5b3V0IHtcbiAgICAgICAgcmV0dXJuIEhvcml6b250YWxUaWx0ZWRMYWJlbHNMYXlvdXQoXG4gICAgICAgICAgICBvcmllbnRhdGlvbixcbiAgICAgICAgICAgIGF4aXNEb21haW4sXG4gICAgICAgICAgICBsY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9MYXlvdXQoXG4gICAgICAgIGF4aXNMZW5ndGg6IERvdWJsZSxcbiAgICAgICAgYXhpc01hcHBlcjogKERvdWJsZT8pIC0+IERvdWJsZT8sXG4gICAgICAgIG1heExhYmVsc0JvdW5kczogRG91YmxlUmVjdGFuZ2xlP1xuICAgICk6IEF4aXNMYWJlbHNMYXlvdXRJbmZvIHtcblxuICAgICAgICB2YXIgdGFyZ2V0QnJlYWtDb3VudCA9XG4gICAgICAgICAgICBIb3Jpem9udGFsU2ltcGxlTGFiZWxzTGF5b3V0LmVzdGltYXRlQnJlYWtDb3VudEluaXRpYWwoXG4gICAgICAgICAgICAgICAgYXhpc0xlbmd0aCxcbiAgICAgICAgICAgICAgICBQbG90TGFiZWxTcGVjRmFjdG9yeS5heGlzVGljayh0aGVtZSlcbiAgICAgICAgICAgIClcbiAgICAgICAgdmFyIGJyZWFrcyA9IGdldEJyZWFrcyh0YXJnZXRCcmVha0NvdW50LCBheGlzTGVuZ3RoKVxuICAgICAgICB2YXIgbGFiZWxzSW5mbyA9IGRvTGF5b3V0TGFiZWxzKGJyZWFrcywgYXhpc0xlbmd0aCwgYXhpc01hcHBlciwgbWF4TGFiZWxzQm91bmRzKVxuXG4gICAgICAgIHdoaWxlIChsYWJlbHNJbmZvLmlzT3ZlcmxhcCkge1xuICAgICAgICAgICAgLy8gcmVkdWNlIHRpY2sgY291bnRcbiAgICAgICAgICAgIHZhbCBuZXdUYXJnZXRCcmVha0NvdW50ID1cbiAgICAgICAgICAgICAgICBIb3Jpem9udGFsU2ltcGxlTGFiZWxzTGF5b3V0LmVzdGltYXRlQnJlYWtDb3VudChcbiAgICAgICAgICAgICAgICAgICAgYnJlYWtzLmxhYmVscyxcbiAgICAgICAgICAgICAgICAgICAgYXhpc0xlbmd0aCxcbiAgICAgICAgICAgICAgICAgICAgUGxvdExhYmVsU3BlY0ZhY3RvcnkuYXhpc1RpY2sodGhlbWUpXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgaWYgKG5ld1RhcmdldEJyZWFrQ291bnQgPj0gdGFyZ2V0QnJlYWtDb3VudCkge1xuICAgICAgICAgICAgICAgIC8vIHBhcmFub2lkIC0gaGlnaGx5IGltcG9zc2libGUuXG4gICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRhcmdldEJyZWFrQ291bnQgPSBuZXdUYXJnZXRCcmVha0NvdW50XG4gICAgICAgICAgICBicmVha3MgPSBnZXRCcmVha3ModGFyZ2V0QnJlYWtDb3VudCwgYXhpc0xlbmd0aClcbiAgICAgICAgICAgIGxhYmVsc0luZm8gPSBkb0xheW91dExhYmVscyhicmVha3MsIGF4aXNMZW5ndGgsIGF4aXNNYXBwZXIsIG1heExhYmVsc0JvdW5kcylcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBsYWJlbHNJbmZvXG4gICAgfVxuXG4gICAgcHJpdmF0ZSBmdW4gZG9MYXlvdXRMYWJlbHMoXG4gICAgICAgIGJyZWFrczogU2NhbGVCcmVha3MsXG4gICAgICAgIGF4aXNMZW5ndGg6IERvdWJsZSxcbiAgICAgICAgYXhpc01hcHBlcjogKERvdWJsZT8pIC0+IERvdWJsZT8sXG4gICAgICAgIG1heExhYmVsc0JvdW5kczogRG91YmxlUmVjdGFuZ2xlP1xuICAgICk6IEF4aXNMYWJlbHNMYXlvdXRJbmZvIHtcblxuICAgICAgICB2YWwgbGF5b3V0ID0gSG9yaXpvbnRhbFNpbXBsZUxhYmVsc0xheW91dChcbiAgICAgICAgICAgIG9yaWVudGF0aW9uLFxuICAgICAgICAgICAgYXhpc0RvbWFpbixcbiAgICAgICAgICAgIGxhYmVsU3BlYyxcbiAgICAgICAgICAgIGJyZWFrcyxcbiAgICAgICAgICAgIHRoZW1lXG4gICAgICAgIClcbiAgICAgICAgcmV0dXJuIGxheW91dC5kb0xheW91dChheGlzTGVuZ3RoLCBheGlzTWFwcGVyLCBtYXhMYWJlbHNCb3VuZHMpXG4gICAgfVxu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heW91dChcbiAgICAgICAgYXhpc0xlbmd0aDogRG91YmxlLFxuICAgICAgICBheGlzTWFwcGVyOiAoRG91YmxlPykgLT4gRG91YmxlPyxcbiAgICAgICAgbWF4TGFiZWxzQm91bmRzOiBEb3VibGVSZWN0YW5nbGU/XG4gICAgKTogQXhpc0xhYmVsc0xheW91dEluZm8ge1xuXG4gICAgICAgIHZhbCBib3VuZHNCeVNoZWxmSW5kZXggPSBIYXNoTWFwPEludCwgRG91YmxlUmVjdGFuZ2xlPigpXG4gICAgICAgIHZhbCB0aWNrcyA9IG1hcFRvQXhpcyhicmVha3MudHJhbnNmb3JtZWRWYWx1ZXMsIGF4aXNNYXBwZXIpXG4gICAgICAgIHZhbCBib3VuZHNMaXN0ID0gbGFiZWxCb3VuZHNMaXN0KFxuICAgICAgICAgICAgdGlja3MsIGJyZWFrcy5sYWJlbHMsXG4gICAgICAgICAgICBIT1JJWk9OVEFMX1RJQ0tfTE9DQVRJT05cbiAgICAgICAgKVxuXG4gICAgICAgIGZvciAobGFiZWxCb3VuZHMgaW4gYm91bmRzTGlzdCkge1xuICAgICAgICAgICAgLy8gZmluZCBzaGVsZiB3aXRoIG5vIG92ZXJsYXBcbiAgICAgICAgICAgIHZhciBzaGVsZkluZGV4ID0gMFxuICAgICAgICAgICAgd2hpbGUgKHRydWUpIHtcbiAgICAgICAgICAgICAgICBpZiAoIWJvdW5kc0J5U2hlbGZJbmRleC5jb250YWluc0tleShzaGVsZkluZGV4KSkge1xuICAgICAgICAgICAgICAgICAgICBib3VuZHNCeVNoZWxmSW5kZXhbc2hlbGZJbmRleF0gPSBsYWJlbEJvdW5kc1xuICAgICAgICAgICAgICAgICAgICBteVNoZWxmSW5kZXhGb3JUaWNrSW5kZXguYWRkKHNoZWxmSW5kZXgpXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdmFyIHNoZWxmQm91bmRzID0gYm91bmRzQnlTaGVsZkluZGV4W3NoZWxmSW5kZXhdISFcbiAgICAgICAgICAgICAgICAvLyBub3Qgb3ZlcmxhcHBlZD9cbiAgICAgICAgICAgICAgICBpZiAoIXNoZWxmQm91bmRzLnhSYW5nZSgpXG4gICAgICAgICAgICAgICAgICAgICAgICAuY29ubmVjdGVkKERvdWJsZVNwYW4obGFiZWxCb3VuZHMubGVmdCAtIE1JTl9ESVNUQU5DRSwgbGFiZWxCb3VuZHMucmlnaHQgKyBNSU5fRElTVEFOQ0UpKVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICBteVNoZWxmSW5kZXhGb3JUaWNrSW5kZXguYWRkKHNoZWxmSW5kZXgpXG4gICAgICAgICAgICAgICAgICAgIHNoZWxmQm91bmRzID0gc2hlbGZCb3VuZHMudW5pb24obGFiZWxCb3VuZHMpXG4gICAgICAgICAgICAgICAgICAgIGJvdW5kc0J5U2hlbGZJbmRleFtzaGVsZkluZGV4XSA9IHNoZWxmQm91bmRzXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgc2hlbGZJbmRleCsrXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgYm91bmRzID0gaWYgKGJvdW5kc0J5U2hlbGZJbmRleC5pc0VtcHR5KCkpXG4gICAgICAgICAgICBEb3VibGVSZWN0YW5nbGUoRG91YmxlVmVjdG9yLlpFUk8sIERvdWJsZVZlY3Rvci5aRVJPKVxuICAgICAgICBlbHNlXG4gICAgICAgICAgICBib3VuZHNCeVNoZWxmSW5kZXhbMF0hIVxuICAgICAgICB2YWwgaCA9IGxhYmVsU3BlYy5oZWlnaHQoKSAqIExJTkVfSEVJR0hUXG4gICAgICAgIGZvciAoaSBpbiAwIHVudGlsIGJvdW5kc0J5U2hlbGZJbmRleC5zaXplKSB7XG4gICAgICAgICAgICB2YWwgc2hlbGZCb3VuZHMgPSBib3VuZHNCeVNoZWxmSW5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NYXBwZXIpXG5cbiAgICAgICAgdmFsIGJvdW5kc0xpc3QgPSBsYWJlbEJvdW5kc0xpc3QoXG4gICAgICAgICAgICB0aWNrcywgYnJlYWtzLmxhYmVscyxcbiAgICAgICAgICAgIEhPUklaT05UQUxfVElDS19MT0NBVElPTlxuICAgICAgICApXG4gICAgICAgIGZvciAobGFiZWxCb3VuZHMgaW4gYm91bmRzTGlzdCkge1xuICAgICAgICAgICAgb3ZlcmxhcCA9IG92ZXJsYXAgfHwgYm91bmRzICE9IG51bGwgJiYgYm91bmRzLnhSYW5nZSgpLmNvbm5lY3RlZChcbiAgICAgICAgICAgICAgICBTZXJpZXNVdGlsLmV4cGFuZChsYWJlbEJvdW5kcy54UmFuZ2UoKSwgTUlOX1RJQ0tfTEFCRUxfRElTVEFOQ0UgLyAyLCBNSU5fVElDS19MQUJFTF9ESVNUQU5DRSAvIDIuMClcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGJvdW5kcyA9IEdlb21ldHJ5VXRpbC51bmlvbihsYWJlbEJvdW5kcywgYm91bmRzKVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIEF4aXNMYWJlbHNMYXlvdXRJbmZvLkJ1aWxkZXIoKVxuICAgICAgICAgICAgLmJyZWFrcyhicmVha3MpXG4gICAgICAgICAgICAuYm91bmRzKGFwcGx5TGFiZWxzTWFyZ2lucyhib3VuZHMhISkpXG4gICAgICAgICAgICAub3ZlcmxhcChvdmVybGFwKVxuICAgICAgICAgICAgLmxhYmVsQWRkaXRpb25hbE9mZnNldHMobnVsbClcbiAgICAgICAgICAgIC5sYWJlbEhvcml6b250YWxBbmNob3IoVGV4dC5Ib3Jpem9udGFsQW5jaG9yLk1JRERMRSlcbiAgICAgICAgICAgIC5sYWJlbFZlcnRpY2FsQW5jaG9yKFRleHQuVmVydGljYWxBbmNob3IuVE9QKVxuICAgICAgICAgICAgLmJ1aWxkKClcbiAgICB9XG5cbiAgICAvKlxuICBwcml2YXRlIEF4aXNMYW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VkTGFiZWxCb3VuZHMoXG4gICAgICAgICAgICBsYWJlbE5vcm1hbFNpemVcbiAgICAgICAgKVxuICAgIH1cblxuICAgIGNvbXBhbmlvbiBvYmplY3Qge1xuICAgICAgICBmdW4gZXN0aW1hdGVCcmVha0NvdW50SW5pdGlhbChheGlzTGVuZ3RoOiBEb3VibGUsIHRpY2tMYWJlbFNwZWM6IExhYmVsU3BlYyk6IEludCB7XG4gICAgICAgICAgICByZXR1cm4gZXN0aW1hdGVCcmVha0NvdW50KFxuICAgICAgICAgICAgICAgIHRpY2tMYWJlbFNwZWMud2lkdGgoSU5JVElBTF9USUNLX0xBQkVMKSxcbiAgICAgICAgICAgICAgICBheGlzTGVuZ3RoXG4gICAgICAgICAgICApXG4gICAgICAgIH1cblxuICAgICAgICBmdW4gZXN0aW1hdGVCcmVha0NvdW50KGxhYmVsczogTGlzdDxTdHJpbmc+LCBheGlzTGVuZ3RoOiBEb3VibGUsIHRpY2tMYWJlbFNwZWM6IExhYmVsU3BlYyk6IEludCB7XG4gICAgICAgICAgICB2YWwgbG9uZ2VzdExhYmVsV2lkdGggPSBCcmVha0xhYmVsc0xheW91dFV0aWwubG9uZ2VzdExhYmVsV2lkdGgobGFiZWxzKSB7IHRpY2tMYWJlbFNwZWMud2lkdGgoaXQpIH1cbiAgICAgICAgICAgIHJldHVybiBlc3RpbWF0ZUJyZWFrQ291bnQoXG4gICAgICAgICAgICAgICAgbG9uZ2VzdExhYmVsV2lkdGgsXG4gICAgICAgICAgICAgICAgYXhpc0xlbmd0aFxuICAgICAgICAgICAgKVxuICAgICAgICB9XG5cbiAgICAgICAgcHJpdmF0ZSBmdW4gZXN0aW1hdGVCcmVha0NvdW50KHdpZHRoOiBEb3VibGUsIGF4aXNMZW5ndGg6IERvdWJsZSk6IEludCB7XG4gICAgICAgICAgICB2YWwgdGlja0Rpc3RhbmNlID0gd2lkdGggKyBNSU5fVElDS19MQUJFTF9ESVNUQU5DRVxuICAgICAgICAgICAgcmV0dXJuIG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WFwIHtcbiAgICAgICAgICAgIGl0LmNyZWF0ZUluc2lkZU91dFRpbGVMYXlvdXQoKVxuICAgICAgICB9XG5cblxuICAgICAgICB2YWwgZmFjZXRUaWxlQW5kTGF5b3V0ID0gZmFjZXRUaWxlcy5tYXAge1xuICAgICAgICAgICAgUGFpcihpdCwgbGF5b3V0QnlUaWxlW2l0LnRydWVJbmRleF0pXG4gICAgICAgIH1cblxuICAgICAgICB2YWwgbGF5b3V0SW5mb3MgPSBmYWNldFRpbGVBbmRMYXlvdXQubWFwIHsgKGZhY2V0VGlsZSwgdGlsZUxheW91dCkgLT5cbiAgICAgICAgICAgIHRpbGVMYXlvdXQuZG9MYXlvdXQoXG4gICAgICAgICAgICAgICAgRG91YmxlVmVjdG9yKGdlb21XaWR0aCwgZ2VvbUhlaWdodCksXG4gICAgICAgICAgICAgICAgY29vcmRQcm92aWRlclxuICAgICAgICAgICAgKS53aXRoQXhpc1Nob3duKFxuICAgICAgICAgICAgICAgIGZhY2V0VGlsZS5oYXNIQXhpcyxcbiAgICAgICAgICAgICAgICBmYWNldFRpbGUuaGFzVkF4aXNcbiAgICAgICAgICAgIClcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIGFkanVzdCBnZW9tIHNpemVcbiAgICAgICAgdmFsIHRpbGVzQXJlYVNpemVOZXcgPSBGYWNldGVkUGxvdExheW91dFV0aWwudGlsZXNBcmVhU2l6ZShcbiAgICAgICAgICAgIGxheW91dEluZm9zLFxuICAgICAgICAgICAgZmFjZXRzLFxuICAgICAgICAgICAgYWRkZWRIU2l6ZSxcbiAgICAgICAgICAgIGFkZGVkVlNpemVcbiAgICAgICAgKVxuXG4gICAgICAgIHZhbCB3aWR0aERpZmYgPSB0aWxlc0FyZWFTaXplLnggLSB0aWxlc0FyZWFTaXplTmV3LnhcbiAgICAgICAgdmFsIGhlaWdodERpZmYgPSB0aWxlc0FyZWFTaXplLnkgLSB0aWxlc0FyZWFTaXplTmV3LnlcblxuICAgICAgICAvLyBFcnJ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X05BTUVfQ0hBTkdFRF9PTl9PVkVSUklERVwiKVxuICAgIG92ZXJyaWRlIGZ1biBkb0xheW91dChnZW9tU2l6ZTogRG91YmxlVmVjdG9yLCBjb29yZFByb3ZpZGVyOiBDb29yZFByb3ZpZGVyKTogVGlsZUxheW91dEluZm8ge1xuXG4gICAgICAgIHZhbCBnZW9tT3V0ZXJCb3VuZHMgPSBEb3VibGVSZWN0YW5nbGUoRG91YmxlVmVjdG9yLlpFUk8sIGdlb21TaXplKVxuICAgICAgICB2YWwgZ2VvbUlubmVyQm91bmRzID0gbWFyZ2luc0xheW91dC50b0lubmVyQm91bmRzKGdlb21PdXRlckJvdW5kcylcblxuICAgICAgICB2YXIgKGhBeGlzSW5mbywgdkF4aXNJbmZvKSA9IGNvbXB1dGVBeGlzSW5mb3MoXG4gICAgICAgICAgICBoQXhpc0xheW91dCxcbiAgICAgICAgICAgIHZBeGlzTGF5b3V0LFxuICAgICAgICAgICAgZ2VvbVNpemUgPSBnZW9tSW5uZXJCb3VuZHMuZGltZW5zaW9uLFxuICAgICAgICAgICAgaERvbWFpbiwgdkRvbWFpbixcbiAgICAgICAgKVxuXG4gICAgICAgIC8vIENvbWJpbmUgZ2VvbSBhcmVhIGFuZCB4L3ktYXhpc1xuICAgICAgICB2YWwgZ2VvbVdpdGhBeGlzQm91bmRzID0gdGlsZUJvdW5kcyhcbiAgICAgICAgICAgIGhBeGlzSW5mby5heGlzQm91bmRzKCksXG4gICAgICAgICAgICB2QXhpc0luZm8uYXhpc0JvdW5kcygpLFxuICAgICAgICAgICAgZ2VvbU91dGVyQm91bmRzXG4gICAgICAgIClcblxuXG4gICAgICAgIHJldHVybiBUaWxlTGF5b3V0SW5mbyhcbiAgICAgICAgICAgIG9mZnNldCA9IERvdWJsZVZlY3Rvci5aRVJPLFxuICAgICAgICAgICAgYm91bmRzID0gZ2VvbVdpdGhBeGlzQm91bmRzLFxuICAgICAgICAgICAgZ2VvbU91dGVyQm91bmRzID0gZ2VvbU91dGVyQm91bmRzLFxuICAgICAgICAgICAgZ2VvbUlubmVyQm91bmRzID0gZ2VvbUlubmVyQm91bmRzLFxuICAgICAgICAgICAgaEF4aXNJbmZvLFxuICAgICAgICAgICAgdkF4aXNJbmZvLFxuICAgICAgICAgICAgaEF4aXNTaG93biA9IHRydWUsXG4gICAgICAgICAgICB2QXhpc1Nob3duID0gdHJ1ZSxcbiAgICAgICAgICAgIHRydWVJbmRleCA9IDBcbiAgICAgICAgKVxuICAgIH1cblxuICAgIGNvbXBhbmlvbiBvYmplY3Qge1xuICAgICAgICBwcml2YXRlIGNvbnN0IHZhbCBBWElTX1NUUkVUQ0hfUkFUSU8gPSAwLjEgIC8vIGFsbG93IDEwJSBheGlzIGZsZXhpYmlsaXR5IChvbiBlYWNoIGVuZClcblxuICAgICAgICBwcml2YXRlIGZ1biB0aWxlQm91bmRzKFxuICAgICAgICAgICAgeEF4aXNCb3VuZHM6IERvdWJsZVJlY3RhbmdsZSxcbiAgICAgICAgICAgIHlBeGlzQm91bmRzOiBEb3VibGVSZWN0YW5nbGUsXG4gICAgICAgICAgICBnZW9tQm91bmRzOiBEb3VibGVSZWN0YW5nbGVcbiAgICAgICAgKTogRG91YmxlUmVjdGFuZ2xlIHtcbiAgICAgICAgICAgIC8vIENhbid0IGp1c3QgdW5pb24gYm91bmRzIGJlY2F1c2VcbiAgICAgICAgICAgIC8vIHgtYXhpcyBoYXMgemVybyBvcmlnaW5cbiAgICAgICAgICAgIC8vIHktYXhpcyBoYXMgbmVnYXRpdmUgb3JpZ2luXG4gICAgICAgICAgICB2YWwgbGVmdFRvcCA9IERvdWJsZVZlY3RvcihcbiAgICAgICAgICAgICAgICBnZW9tQm91bmRzLmxlZnQgLSB5QXhpc0JvdW5kcy53aWR0aCxcbiAgICAgICAgICAgICAgICBnZW9tQm91bmRzLnRvcCAtIFRpbGVMYXlvdXRVdGlsLkdFT01fTUFSR0lOXG4gICAgICAgICAgICApXG4gICAgICAgICAgICB2YWwgcmlnaHRCb3R0b20gPSBEb3VibGVWZWN0b3IoXG4gICAgICAgICAgICAgICAgZ2VvbUJvdW5kcy5yaWdodCArIFRpbGVMYXlvdXRVdGlsLkdFT01fTUFSR0lOLFxuICAgICAgICAgICAgICAgIGdlb21Cb3VuZHMuYm90dG9tICsgeEF4aXNCb3VuZHMuaGVpZ2h0XG4gICAgICAgICAgICApXG4gICAgICAgICAgICByZXR1cm4gRG91YmxlUmVjdGFuZ2xlKGxlZnRUb3AsIHJpZ2h0Qm90dG9tLnN1YnRyYWN0KGxlZnRUb3ApKVxuICAgICAgICB9XG5cbiAgICAgICAgcHJpdmF0ZSBmdW4gY29tcHV0ZUF4aXNJbmZvcyhcbiAgICAgICAgICAgIGhBeGlzTGF5b3V0OiBBeGlzTGF5b3V0LFxuICAgICAgICAgICAgdkF4aXNMYXlvdXQ6IEF4aXNMYXlvdXQsXG4gICAgICAgICAgICBnZW9tU2l6ZTogRG91YmxlVmVjdG9yLFxuICAgICAgICAgICAgaERvbWFpbjogRG91YmxlU3BhbixcbiAgICAgICAgICAgIHZEb21haW46IERvdWJsZVNwYW4sXG4gICAgICAgICk6IFBhaXI8QXhpc0xheW91dEluZm8sIEF4aXNMYXlvdXRJbmZvPiB7XG4gICAgICAgICAgICB2YWwgZ2VvbUJvdW5kcyA9IERvdWJsZVJlY3RhbmdsZShEb3VibGVWZWN0b3IuWkVSTywgZ2VvbVNpemUpXG4gICAgICAgICAgICB2YXIgaEF4aXNJbmZvID0gY29tcHV0ZUhBeGlzSW5mbyhcbiAgICAgICAgICAgICAgICBoQXhpc0xheW91dCxcbiAgICAgICAgICAgICAgICBoRG9tYWluLFxuICAgICAgICAgICAgICAgIGdlb21Cb3VuZHMsXG4gICAgICAgICAgICApXG5cbiAgICAgICAgICAgIHZhciB2QXhpc0luZm8gPSBjb21wdXRlVkF4aXNJbmZvKFxuICAgICAgICAgICAgICAgIHZBeGlzTGF5b3V0LFxuICAgICAgICAgICAgICAgIHZEb21haW4sXG4gICAgICAgICAgICAgICAgZ2VvbUJvdW5kc1xuICAgICAgICAgICAgKVxuXG4gICAgICAgICAgICByZXR1cm4gUGFpcihoQXhpc0luZm8sIHZBeGlzSW5mbylcbiAgICAgICAgfVxuXG4gICAgICAgIHByaXZhdGUgZnVuIGNvbXB1dGVIQXhpc0luZm8oXG4gICAgICAgICAgICBheGlzTGF5b3V0OiBBeGlzTGF5b3V0LFxuICAgICAgICAgICAgYXhpc0RvbWFpbjogRG91YmxlU3BhbixcbiAgICAgICAgICAgIGdlb21Cb3VuZHM6IERvdWJsZVJlY3RhbmdsZVxuICAgICAgICApOiBBeGlzTGF5b3V0SW5mbyB7XG4gICAgICAgICAgICB2YWwgYXhpc1NwYW4gPSBnZW9tQm91bmRzLnhSYW5nZSgpXG4gICAgICAgICAgICB2YWwgYXhpc0xlbmd0aCA9IGF4aXNTcGFuLmxlbmd0aFxuICAgICAgICAgICAgdmFsIHN0cmV0Y2ggPSBheGlzTGVuZ3RoICogQVhJU19TVFJFVENIX1JBVElPXG4gICAgICAgICAgICB2YWwgbWF4VGlja0xhYmVsc0JvdW5kcyA9IFRpbGVMYXlvdXRVdGlsLm1heEhBeGlzVGlja0xhYmVsc0JvdW5kcyhcbiAgICAgICAgICAgICAgICBPcmllbnRhdGlvbi5CT1RUT00sXG4gICAgICAgICAgICAgICAgc3RyZXRjaCxcbiAgICAgICAgICAgICAgICBheGlzU3BhbiA9IGF4aXNTcGFuLFxuICAgICAgICAgICAgICAgIG1heEhvcml6b250YWxTcGFuID0gYXhpc1NwYW5cbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIHJldHVybiBheGlzTGF5b3V0LmRvTGF5b3V0KGF4aXNEb21haW4sIGF4aXNMZW5ndGgsIG1heFRpY2tMYWJlbHNCb3VuZHMpXG4gICAgICAgIH1cblxuICAgICAgICBwcml2YXRlIGZ1biBjb21wdXRlVkF4aXNJbmZvKFxuICAgICAgICAgICAgYXhpc0xheW91dDogQXhpc0xheW91dCxcbiAgICAgICAgICAgIGF4aXN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0VPTV9NQVJHSU4sIGhBeGlzVGhpY2tuZXNzKVxuXG4gICAgICAgIHZhbCBnZW9tU2l6ZSA9IHBsb3RTaXplXG4gICAgICAgICAgICAuc3VidHJhY3QobWFyZ2luTGVmdFRvcClcbiAgICAgICAgICAgIC5zdWJ0cmFjdChtYXJnaW5SaWdodEJvdHRvbSlcblxuICAgICAgICByZXR1cm4gRG91YmxlUmVjdGFuZ2xlKFxuICAgICAgICAgICAgbWFyZ2luTGVmdFRvcCxcbiAgICAgICAgICAgIERvdWJsZVZlY3RvcihcbiAgICAgICAgICAgICAgICBtYXgoZ2VvbVNpemUueCwgR0VPTV9NSU5fU0laRS54KSxcbiAgICAgICAgICAgICAgICBtYXgoZ2VvbVNpemUueSwgR0VPTV9NSU5fU0laRS55KVxuICAgICAgICAgICAgKVxuICAgICAgICApXG4gICAgfVxuXG4gICAgZnVuIGdlb21PdXRlckJvdW5kcyhcbiAgICAgICAgZ2VvbUluc2V0czogR2VvbUFyZWFJbnNldHMsXG4gICAgICAgIHBsb3RTaXplOiBEb3VibGVWZWN0b3IsXG4gICAgICAgIGhEb21haW46IERvdWJsZVNwYW4sXG4gICAgICAgIHZEb21haW46IERvdWJsZVNwYW4sXG4gICAgICAgIG1hcmdpbnNMYXlvdXQ6IEdlb21NYXJnaW5zTGF5b3V0LFxuICAgICAgICBjb29yZFByb3ZpZGVyOiBDb29yZFByb3ZpZGVyXG4gICAgKTogRG91YmxlUmVjdGFuZ2xlIHtcbiAgICAgICAgdmFsIHBsb3R0aW5nQXJlYSA9IGdlb21JbnNldHMuc3VidHJhY3RGcm9tKERvdWJsZVJlY3RhbmdsZShaRVJPLCBwbG90U2l6ZSkpXG4gICAgICAgIHZhbCBnZW9tSW5uZXJTaXplID0gbWFyZ2luc0xheW91dC50b0lubmVyU2l6ZShwbG90dGluZ0FyZWEuZGltZW5zaW9uKVxuXG4gICAgICAgIHZhbCBnZW9tT3V0ZXJTaXplQWRqdXN0ZWQgPSBjb29yZFByb3ZpZ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MYXlvdXQsXG4gICAgICAgICAgICBjb29yZFByb3ZpZGVyXG4gICAgICAgIClcblxuICAgICAgICB2YWwgZ2VvbUJvdW5kc0FmdGVyTGF5b3V0ID0gZ2VvbU91dGVyQm91bmRzKFxuICAgICAgICAgICAgZ2VvbUFyZWFJbnNldHMsXG4gICAgICAgICAgICBwcmVmZXJyZWRTaXplLFxuICAgICAgICAgICAgaERvbWFpbixcbiAgICAgICAgICAgIHZEb21haW4sXG4gICAgICAgICAgICBtYXJnaW5zTGF5b3V0LFxuICAgICAgICAgICAgY29vcmRQcm92aWRlclxuICAgICAgICApXG5cbiAgICAgICAgdmFsIChoQXhpc0luZm8sIHZBeGlzSW5mbykgPSBnZW9tQXJlYUluc2V0cy5oQXhpc0luZm8gdG8gZ2VvbUFyZWFJbnNldHMudkF4aXNJbmZvXG5cbiAgICAgICAgLy8gWC1heGlzIGxhYmVscyBib3VuZHMgbWF5IGV4Y2VlZCBheGlzIGxlbmd0aCAtIGFkanVzdFxuICAgICAgICB2YWwgZ2VvbU91dGVyQm91bmRzID0gZ2VvbUJvdW5kc0FmdGVyTGF5b3V0LmxldCB7XG4gICAgICAgICAgICB2YWwgaEF4aXNTcGFuID0gbWFyZ2luc0xheW91dC50b0lubmVyQm91bmRzKGl0KS54UmFuZ2UoKVxuXG4gICAgICAgICAgICB2YWwgbWF4VGlja0xhYmVsc0JvdW5kcyA9IG1heEhBeGlzVGlja0xhYmVsc0JvdW5kcyhcbiAgICAgICAgICAgICAgICBoQXhpc0xheW91dC5vcmllbnRhdGlvbixcbiAgICAgICAgICAgICAgICAwLjAsXG4gICAgICAgICAgICAgICAgaEF4aXNTcGFuLFxuICAgICAgICAgICAgICAgIHByZWZlcnJlZFNpemVcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIHZhbCB0aWNrTGFiZWxzQm91bmRzID0gaEF4aXNJbmZvLnRpY2tMYWJlbHNCb3VuZHNcbiAgICAgICAgICAgIHZhbCBsZWZ0T3ZlcmZsb3cgPSBtYXhUaWNrTGFiZWxzQm91bmRzLmxlZnQgLSB0aWNrTGFiZWxzQm91bmRzLmxlZnRcbiAgICAgICAgICAgIHZhbCByaWdodE92ZXJmbG93ID0gdGlja0xhYmVsc0JvdW5kcy5sZWZ0ICsgdGlja0xhYmVsc0JvdW5kcy53aWR0aCAtIG1heFRpY2tMYWJlbHNCb3VuZHMucmlnaHRcbiAgICAgICAgICAgIHZhciBuZXdYID0gaXQubGVmdFxuICAgICAgICAgICAgdmFyIG5ld1cgPSBpdC53aWR0aFxuICAgICAgICAgICAgaWYgKGxlZnRPdmVyZmxvdyA+IDApIHtcbiAgICAgICAgICAgICAgICBuZXdYID0gaXQubGVmdCArIGxlZnRPdmVyZmxvd1xuICAgICAgICAgICAgICAgIG5ld1cgPSBpdC53aWR0aCAtIGxlZnRPdmVyZmxvd1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAocmlnaHRPdmVyZmxvdyA+IDApIHtcbiAgICAgICAgICAgICAgICBuZXdXID0gbmV3VyAtIHJpZ2h0T3ZlcmZsb3dcbiAgICAgICAgICAgIH1cblxuXG4gICAgICAgICAgICAvLyBGaXggZm9yIChCYXRpaylcbiAgICAgICAgICAgIC8vICAgICAgICAgICAgb3JnLmFwYWNoZS5iYXRpay5icmlkZ2UuQnJpZGdlRXhjZXB0aW9uOiBudWxsOi0xXG4gICAgICAgICAgICAvLyAgICAgICAgICAgIFRoZSBhdHRyaWJ1dGUgXCJ3aWR0aFwiIG9mIHRoZSBlbGVtZW50IDxyZWN0PiBjYW5ub3QgYmUgbmVnYXRpdmVcbiAgICAgICAgICAgIG5ld1cgPSBtYXgoMC4wLCBuZXdXKVxuXG4gICAgICAgICAgICB2YWwgYm91bmRzTmV3ID0gRG91YmxlUmVjdGFuZ2xlKFxuICAgICAgICAgICAgICAgIG5ld1gsIGl0LnRvcCxcbiAgICAgICAgICAgICAgICBuZXdXLCBpdC5oZWlnaHRcbiAgICAgICAgICAgIClcblxuICAgICAgICAgICA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WJsZVZlY3Rvci5aRVJPLFxuICAgICAgICAgICAgYm91bmRzID0gZ2VvbVdpdGhBeGlzQm91bmRzLFxuICAgICAgICAgICAgZ2VvbU91dGVyQm91bmRzID0gZ2VvbU91dGVyQm91bmRzLFxuICAgICAgICAgICAgZ2VvbUlubmVyQm91bmRzID0gZ2VvbUlubmVyQm91bmRzLFxuICAgICAgICAgICAgaEF4aXNJbmZvTmV3LFxuICAgICAgICAgICAgdkF4aXNJbmZvTmV3LFxuICAgICAgICAgICAgaEF4aXNTaG93biA9IHRydWUsXG4gICAgICAgICAgICB2QXhpc1Nob3duID0gdHJ1ZSxcbiAgICAgICAgICAgIHRydWVJbmRleCA9IDBcbiAgICAgICAgKVxuICAgIH1cblxuICAgIGNvbXBhbmlvbiBvYmplY3Qge1xuICAgICAgICBwcml2YXRlIGNvbnN0IHZhbCBBWElTX1NUUkVUQ0hfUkFUSU8gPSAwLjEgIC8vIGFsbG93IDEwJSBheGlzIGZsZXhpYmlsaXR5IChvbiBlYWNoIGVuZClcblxuICAgICAgICBwcml2YXRlIGZ1biB0aWxlQm91bmRzKFxuICAgICAgICAgICAgeEF4aXNCb3VuZHM6IERvdWJsZVJlY3RhbmdsZSxcbiAgICAgICAgICAgIHlBeGlzQm91bmRzOiBEb3VibGVSZWN0YW5nbGUsXG4gICAgICAgICAgICBnZW9tQm91bmRzOiBEb3VibGVSZWN0YW5nbGVcbiAgICAgICAgKTogRG91YmxlUmVjdGFuZ2xlIHtcbiAgICAgICAgICAgIC8vIENhbid0IGp1c3QgdW5pb24gYm91bmRzIGJlY2F1c2VcbiAgICAgICAgICAgIC8vIHgtYXhpcyBoYXMgemVybyBvcmlnaW5cbiAgICAgICAgICAgIC8vIHktYXhpcyBoYXMgbmVnYXRpdmUgb3JpZ2luXG4gICAgICAgICAgICB2YWwgbGVmdFRvcCA9IERvdWJsZVZlY3RvcihcbiAgICAgICAgICAgICAgICBnZW9tQm91bmRzLmxlZnQgLSB5QXhpc0JvdW5kcy53aWR0aCxcbiAgICAgICAgICAgICAgICBnZW9tQm91bmRzLnRvcCAtIEdFT01fTUFSR0lOXG4gICAgICAgICAgICApXG4gICAgICAgICAgICB2YWwgcmlnaHRCb3R0b20gPSBEb3VibGVWZWN0b3IoXG4gICAgICAgICAgICAgICAgZ2VvbUJvdW5kcy5yaWdodCArIEdFT01fTUFSR0lOLFxuICAgICAgICAgICAgICAgIGdlb21Cb3VuZHMuYm90dG9tICsgeEF4aXNCb3VuZHMuaGVpZ2h0XG4gICAgICAgICAgICApXG4gICAgICAgICAgICByZXR1cm4gRG91YmxlUmVjdGFuZ2xlKGxlZnRUb3AsIHJpZ2h0Qm90dG9tLnN1YnRyYWN0KGxlZnRUb3ApKVxuICAgICAgICB9XG5cbiAgICAgICAgcHJpdmF0ZSBmdW4gY29tcHV0ZUF4aXNJbmZvcyhcbiAgICAgICAgICAgIGhBeGlzTGF5b3V0OiBBeGlzTGF5b3V0LFxuICAgICAgICAgICAgdkF4aXNMYXlvdXQ6IEF4aXNMYXlvdXQsXG4gICAgICAgICAgICBwbG90U2l6ZTogRG91YmxlVmVjdG9yLFxuICAgICAgICAgICAgaERvbWFpbjogRG91YmxlU3BhbixcbiAgICAgICAgICAgIHZEb21haW46IERvdWJsZVNwYW4sXG4gICAgICAgICAgICBtYXJnaW5zTGF5b3V0OiBHZW9tTWFyZ2luc0xheW91dCxcbiAgICAgICAgICAgIGNvb3JkUHJvdmlkZXI6IENvb3JkUHJvdmlkZXJcbiAgICAgICAgKTogR2VvbUFyZWFJbnNldHMge1xuICAgICAgICAgICAgdmFsIGluc2V0c0luaXRpYWwgPSBHZW9tQXJlYUluc2V0cy5pbml0KGhBeGlzTGF5b3V0LCB2QXhpc0xheW91dClcbiAgICAgICAgICAgIHZhbCBnZW9tSGVpZ2h0RXN0aW0gPSBnZW9tT3V0ZXJCb3VuZHMoXG4gICAgICAgICAgICAgICAgaW5zZXRzSW5pdGlhbCxcbiAgICAgICAgICAgICAgICBwbG90U2l6ZSxcbiAgICAgICAgICAgICAgICBoRG9tYWluLFxuICAgICAgICAgICAgICAgIHZEb21haW4sXG4gICAgICAgICAgICAgICAgbWFyZ2luc0xheW91dCxcbiAgICAgICAgICAgICAgICBjb29yZFByb3ZpZGVyXG4gICAgICAgICAgICApLmRpbWVuc2lvbi5sZXQge1xuICAgICAgICAgICAgICAgIG1hcmdpbnNMYXlvdXQudG9Jbm5lclNpemUoaXQpLnlcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFsIGluc2V0c1ZBeGlzID0gaW5zZXRzSW5pdGlhbC5sYXlvdXRWQXhpcyh2RG9tYWluLCBnZW9tSGVpZ2h0RXN0aW0pXG4gICAgICAgICAgICB2YWwgcGxvdHRpbmdBcmVhID0gZ2VvbU91dGVyQm91bmRzKFxuICAgICAgICAgICAgICAgIGluc2V0c1ZBeGlzLFxuICAgICAgICAgICAgICAgIHBsb3RTaXplLFxuICAgICAgICAgICAgICAgIGhEb21haW4sXG4gICAgICAgICAgICAgICAgdkRvbWFpbixcbiAgICAgICAgICAgICAgICBtYXJnaW5zTGF5b3V0LFxuICAgICAgICAgICAgICAgIGNvb3JkUHJvdmlkZXJcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIHZhbCBoQXhpc1NwYW4gPSBtYXJnaW5zTGF5b3V0LnRvSW5uZXJCb3VuZHMocGxvdHRpbmdBcmVhKS54UmFuZ2UoKVxuICAgICAgICAgICAgdmFsIGluc2V0c0hWQXhpcyA9IGluc2V0c1ZBeGlzLmxheW91dEhBeGlzKFxuICAgICAgICAgICAgICAgIGhEb21haW4sXG4gICAgICAgICAgICAgICAgcGxvdFNpemUsXG4gICAgICAgICAgICAgICAgaEF4aXNTcGFuXG4gICAgICAgICAgICApXG5cbiAgICAgICAgICAgIC8vIFJlLWxheW91dCB5LWF4aXMgaWYgeC1heGlzIGJlY2FtZSB0aGlja2VyIHRoYW4gaXRzICdvcmlnaW5hbCB0aGlja25lc3MnLlxuICAgICAgICAgICAgdmFsIGluc2V0c0ZpbmFsID0gaWYgKGluc2V0c0hWQXhpcy5oQXhpc1RoaWNrbmVzcyA+IGluc2V0c0luaXRpYWwuaEF4aXNUaGlja25lc3MpIHtcbiAgICAgICAgICAgICAgICB2YWwgZ2VvbUhlaWdodCA9IGdlb21PdXRlckJvdW5kcyhcbiAgICAgICAgICAgICAgICAgICAgaW5zZXRzSFZBeGlzLFxuICAgICAgICAgICAgICAgICAgICBwbG90U2l6ZSxcbiAgICAgICAgICAgICAgICAgICAgaERvbWFpbixcbiAgICAgICAgICAgICAgICAgICAgdkRvbWFpbixcbiAgICAgICAgICAgICAgICAgICAgbWFyZ2luc0xheW91dCxcbiAgICAgICAgICAgICAgICAgICAgY29vcmRQcm92aWRlclxuICAgICAgICAgICAgICAgICkuZGltZW5zaW9uLmxldCB7XG4gICAgICAgICAgICAgICAgICAgIG1hcmdpbnNMYXlvdXQudG9Jbm5lclNpemUoaXQpLnlcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpbnNldHNIVkF4aXMubGF5b3V0VkF4aXModkRvbWFpbiwgZ2VvbUhlaWdodClcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgaW5zZXRzSFZBeGlzXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBpbnNldHNGaW5hbFxuICAgICAgICB9XG4gICAgfVxufVxuIiwiLypcbiAqIENvcHlyaWdodCAoYykgMjAyMi4gSmV0QnJhaW5zIHMuci5vLlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgdGhlIE1JVCBsaWNlbnNlIHRoYXQgY2FuIGJlIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUuXG4gKi9cblxucGFja2FnZSBqZXRicmFpbnMuZGF0YWxvcmUucGxvdC5idWlsZGVyLmxheW91dC51dGlsXG5cbmltcG9ydCBqZXRicmFpbnMuZGF0YWxvcmUuYmFzZS5nZW9tZXRyeS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gbWluT2YobjEsIG4yKVxuICAgICAgICBpZiAobWluID09IDApIHJldHVybiBuMSAtIG4yXG4gICAgICAgIGZvciAoaW5kZXggaW4gMCB1bnRpbCBtaW4pIHtcbiAgICAgICAgICAgIHZhciB0aGlzQ2hhciA9IHRoaXNbaW5kZXhdXG4gICAgICAgICAgICB2YXIgb3RoZXJDaGFyID0gb3RoZXJbaW5kZXhdXG5cbiAgICAgICAgICAgIGlmICh0aGlzQ2hhciAhPSBvdGhlckNoYXIpIHtcbiAgICAgICAgICAgICAgICB0aGlzQ2hhciA9IHRoaXNDaGFyLnVwcGVyY2FzZUNoYXIoKVxuICAgICAgICAgICAgICAgIG90aGVyQ2hhciA9IG90aGVyQ2hhci51cHBlcmNhc2VDaGFyKClcblxuICAgICAgICAgICAgICAgIGlmICh0aGlzQ2hhciAhPSBvdGhlckNoYXIpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpc0NoYXIgPSB0aGlzQ2hhci5sb3dlcmNhc2VDaGFyKClcbiAgICAgICAgICAgICAgICAgICAgb3RoZXJDaGFyID0gb3RoZXJDaGFyLmxvd2VyY2FzZUNoYXIoKVxuXG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzQ2hhciAhPSBvdGhlckNoYXIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzQ2hhci5jb21wYXJlVG8ob3RoZXJDaGFyKVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBuMSAtIG4yXG4gICAgfSBlbHNlIHtcbiAgICAgICAgcmV0dXJuIGNvbXBhcmVUbyhvdGhlcilcbiAgICB9XG59XG5cbi8qKlxuICogUmV0dXJucyBgdHJ1ZWAgaWYgdGhlIGNvbnRlbnRzIG9mIHRoaXMgY2hhciBzZXF1ZW5jZSBhcmUgZXF1YWwgdG8gdGhlIGNvbnRlbnRzIG9mIHRoZSBzcGVja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TUVESVVNXG4gICAgICAgICAgICBjb25zdCB2YWwgSVRFTV9GT05UX1NJWkUgPSBGT05UX1NNQUxMXG4gICAgICAgIH1cblxuICAgICAgICBvYmplY3QgVG9vbHRpcCB7XG4gICAgICAgICAgICBjb25zdCB2YWwgTUFYX1BPSU5URVJfRk9PVElOR19MRU5HVEggPSAxMi4wXG4gICAgICAgICAgICBjb25zdCB2YWwgUE9JTlRFUl9GT09USU5HX1RPX1NJREVfTEVOR1RIX1JBVElPID0gMC40XG5cbiAgICAgICAgICAgIGNvbnN0IHZhbCBNQVJHSU5fQkVUV0VFTl9UT09MVElQUyA9IDUuMFxuICAgICAgICAgICAgY29uc3QgdmFsIERBVEFfVE9PTFRJUF9GT05UX1NJWkUgPSBGT05UX1NNQUxMXG4gICAgICAgICAgICBjb25zdCB2YWwgTElORV9JTlRFUlZBTCA9IDYuMFxuICAgICAgICAgICAgY29uc3QgdmFsIElOVEVSVkFMX0JFVFdFRU5fU1VCU1RSSU5HUyA9IDMuMFxuICAgICAgICAgICAgY29uc3QgdmFsIEhfQ09OVEVOVF9QQURESU5HID0gNi4wXG4gICAgICAgICAgICBjb25zdCB2YWwgVl9DT05URU5UX1BBRERJTkcgPSA2LjBcbiAgICAgICAgICAgIGNvbnN0IHZhbCBDT05URU5UX0VYVEVOREVEX1BBRERJTkcgPSAxMC4wXG5cbiAgICAgICAgICAgIGNvbnN0IHZhbCBMQUJFTF9WQUxVRV9JTlRFUlZBTCA9IDguMFxuICAgICAgICAgICAgY29uc3QgdmFsIFZBTFVFX0xJTkVfTUFYX0xFTkdUSCA9IDMwXG5cbiAgICAgICAgICAgIGNvbnN0IHZhbCBMSU5FX1NFUEFSQVRPUl9XSURUSCA9IDAuN1xuXG4gICAgICAgICAgICBjb25zdCB2YWwgQk9SREVSX1JBRElVUyA9IDQuMFxuICAgICAgICAgICAgY29uc3QgdmFsIENPTE9SX0JBUl9XSURUSCA9IDQuMFxuICAgICAgICAgICAgY29uc3QgdmFsIENPTE9SX0JBUl9TVFJPS0VfV0lEVEggPSAxLjVcblxuICAgICAgICAgICAgdmFsIERBUktfVEVYVF9DT0xPUiA9IENvbG9yLkJMQUNLXG4gICAgICAgICAgICB2YWwgTElHSFRfVEVYVF9DT0xPUiA9IENvbG9yLldISVRFXG5cbiAgICAgICAgICAgIGNvbnN0IHZhbCBBWElTX1RPT0xUSVBfRk9OVF9TSVpFID0gQXhpcy5USUNLX0ZPTlRfU0laRVxuICAgICAgICAgICAgdmFsIEFYSVNfVE9PTFRJUF9DT0xPUiA9IEF4aXMuTElORV9DT0xPUlxuICAgICAgICAgICAgY29uc3QgdmFsIEFYSVNfUkFESVVTID0gMS41IC8vIGZpeCBhIHRvb2x0aXAgYm9yZGVyIG92ZXJsYXBwaW5nIGFuIGF4aXNcblxuICAgICAgICAgICAgY29uc3QgdmFsIFJPVEFUSU9OX0FOR0xFID0gMTUuMFxuICAgICAgICB9XG4gICAgfVxuXG4gICAgY2xhc3MgUGxvdCB7XG4gICAgICAgIG9iamVjdCBBeGlzIHtcbiAgICAgICAgICAgIGNvbnN0IHZhbCBUSVRMRV9GT05UX1NJWkUgPSBGT05UX01FRElVTVxuICAgICAgICAgICAgY29uc3QgdmFsIFRJQ0tfRk9OVF9TSVpFID0gRk9OVF9TTUFMTFxuXG4gICAgICAgICAgICB2YWwgTElORV9DT0xPUiA9IENvbG9yLnBhcnNlSGV4KERBUktfR1JBWSlcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHByaXZhdGUgZnVuIGNyZWF0ZVRleHRTdHlsZShcbiAgICAgICAgZmFjZTogRm9udEZhY2UgPSBGb250RmFjZS5OT1JNQUwsXG4gICAgICAgIHNpemU6IERvdWJsZSA9IEZPTlRfTUVESVVNLFxuICAgICAgICBjb2xvcjogQ29sb3IgPSBDb2xvci5CTEFDS1xuICAgICkgPSBUZXh0U3R5bGUoZmFtaWx5ID0gRk9OVF9GQU1JTFlfTk9STUFMLCBmYWNlLCBzaXplLCBjb2xvcilcblxuICAgIGludG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ByaXZhdGUgY29uc3QgdmFsIEZPTlRfU0laRV9UT19HTFlQSF9XSURUSF9SQVRJT19NT05PU1BBQ0VEID0gMC42XG4gICAgICAgIHByaXZhdGUgY29uc3QgdmFsIEZPTlRfV0VJR0hUX0JPTERfVE9fTk9STUFMX1dJRFRIX1JBVElPID0gMS4wNzVcbiAgICAgICAgcHJpdmF0ZSBjb25zdCB2YWwgTEFCRUxfUEFERElORyA9IDAuMCAvLzI7XG4gICAgICAgIHByaXZhdGUgY29uc3QgdmFsIEZPTlRfV0lEVEhfU0NBTEVfRkFDVE9SID0gMC44NTAyNiAvLyBTZWUgZXhwbGFuYXRpb24gaGVyZTogZm9udF93aWR0aF9zY2FsZV9mYWN0b3IubWRcblxuICAgICAgICB2YWwgRFVNTVk6IExhYmVsU3BlYyA9IG9iamVjdCA6IExhYmVsU3BlYyB7XG4gICAgICAgICAgICBvdmVycmlkZSB2YWwgZm9udDogRm9udFxuICAgICAgICAgICAgICAgIGdldCgpID0gVU5TVVBQT1JURUQoXCJEdW1teSBMYWJlbCBTcGVjXCIpXG5cbiAgICAgICAgICAgIG92ZXJyaWRlIGZ1biBkaW1lbnNpb25zKGxhYmVsVGV4dDogU3RyaW5nKTogRG91YmxlVmVjdG9yIHtcbiAgICAgICAgICAgICAgICBVTlNVUFBPUlRFRChcIkR1bW15IExhYmVsIFNwZWNcIilcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgb3ZlcnJpZGUgZnVuIHdpZHRoKGxhYmVsVGV4dDogU3RyaW5nKTogRG91YmxlIHtcbiAgICAgICAgICAgICAgICBVTlNVUFBPUlRFRChcIkR1bW15IExhYmVsIFNwZWNcIilcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgb3ZlcnJpZGUgZnVuIGhlaWdodCgpOiBEb3VibGUge1xuICAgICAgICAgICAgICAgIFVOU1VQUE9SVEVEKFwiRHVtbXkgTGFiZWwgU3BlY1wiKVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAg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CAn0qknLCAn0qsnLCAn0qwnLCAn0q4nLCAn0q8nLCAn0rAnLCAn0qEnLCAn0rEnLCAn0rUnLCAn0rcnLCAn0rknLCAn0rsnLCAn0Z0nLCAn0r0nLCAn0r8nLCAn0rMnLCAn0p8nLCAn0aMnLCAn0p4nLCAn0pUnLCAn0ponLCAn0pInLCAn0o8nLCAn0o0nLCAn0ownLCAn0osnLCAnx60nLCAn0oInLCAn0oEnLCAn0bcnLCAn0bUnLCAn0bMnLCAn0a8nLCAn0a4nLCAn0acnLCAn0pwnLCAn04QnLCAn0JUnLCAn04YnLCAn04onLCAn07MnLCAn07UnLCAn0K8nLCAn0K0nLCAn0KwnLCAn0KcnLCAn0KUnLCAn07EnLCAn0KMnLCAn0KEnLCAn0KAnLCAn0J8nLCAn0J0nLCAn07YnLCAn0JsnLCAn0JonLCAn0KInLCAn068nLCAn060nLCAn06snLCAn04wnLCAn05EnLCAn05MnLCAn05cnLCAn0ZAnLCAn05knLCAn05snLCAn0YonLCAn054nLCAn058nLCAn06AnLCAn0pknLCAn06EnLCAn06MnLCAn06UnLCAn06cnLCAn06knLCAn04gnLCAnx6snLCAn1K8nLCAnx6knLCAnxrAnLCAnxq4nLCAnw54nLCAnxaQnLCAnxaYnLCAnxqknLCAnwqwnLCAnxagnLCAnw50nLCAnw4AnLCAnxaonLCAnw4EnLCAnxqUnLCAnxawnLCAnxqgnLCAnw4InLCAnxaInLCAnxaAnLCAnWCcsICfGuScsICfGuCcsICfFmicsICdZJywgJ8WcJywgJ8SAJywgJ1onLCAnxrYnLCAnxrUnLCAnxrQnLCAnxIInLCAnxZ4nLCAnficsICfGtycsICfDmScsICfFricsICfDgycsICfFvScsICfGkScsICfGgCcsICfGkCcsICfDkScsICfGjScsICfDiycsICfGjCcsICfGiycsICfGgicsICfGgycsICfGhCcsICfDlycsICfGhScsICfDmicsICfGoScsICfFuycsICfFuScsICfFsCcsICfDhCcsICfFsicsICfDnCcsICfDhScsICfDmycsICfDiicsICfGnicsICfF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OiJywgJ20nLCAndycsICfTnScsICfCqScsICfTmicsICfThScsICfTmCcsICfTlicsICfTkicsICfTkCcsICfTjicsICfTiycsICfTiScsICfCricsICfEoCcsICfRoicsICfEoicsICfIqCcsICfIqicsICfIrCcsICfIricsICfIsCcsICfIsicsICfItScsICfIuicsICfIuycsICfGsycsICfGsicsICfGsScsICfJgycsICfJhCcsICfIpicsICfJhScsICfGrycsICfJiicsICfGrCcsICfRtCcsICfJjCcsICfJjicsICfQgCcsICfGpycsICfQgicsICfGpicsICfGpCcsICfGoycsICfQiycsICfGoCcsICfJhicsICfQjScsICfHiCcsICfIoCcsICfHrCcsICfHqCcsICfHpicsICfHtCcsICfHpCcsICfHtycsICfHuCcsICfHvScsICfHvicsICfHoCcsICfIgCcsICfIgicsICfUricsICfIhCcsICfIoScsICfIhicsICfHmScsICfIjCcsICfHlycsICfIjicsICfIkCcsICfHlScsICfIkicsICfIlCcsICfHkycsICfIlicsICfHkScsICfHjScsICfHjCcsICfInicsICfHmycsICfGnycsICfHnicsICfHqicsICfQpicsICfGiicsICfRpScsICfRpicsICfQqicsICfEsicsICfGiScsICfQjycsICfRjicsICfRqicsICfRoScsICfRiScsICfGhycsICfRiCcsICfGhicsICfGgScsICfQticsICfFtScsICfRqycsICfRhCcsICfRiycsICfGjicsICfQpCcsICfFkCcsICfGnScsICfRsicsICfGmCcsICfFiicsICfRmicsICfQmCcsICfGjycsICfGlCcsICfQmScsICfRmScsICfFjCcsICfRsScsICfQnCcsICfRsCcsICfQnicsICfFjicsICfGkycsICfRqScpLFxuICAgICAgICBsaXN0T2YoJ9GoJywgJ9SLJywgJ9SKJywgJ9SJJywgJ9GkJywgJ9SIJywgJ0AnLCAnw4YnLCAn0awnLCAn0bgnLCAn1KsnLCAn1KonLCAnJScsICfRuScsICfHsScsICfHsicsICfHsycsICfUoicsICfUoScsICfUoCcsICfHticsICfRvCcsICfRrScsICfUnCcsICfHoycsICfHoicsICfUmCcsICfRvicsICfUlCcsICfHvCcsICfHiycsICfUhCcsICfTnCcsICfQqScsICfQqCcsICfTlCcsICfCvCcsICfCvScsICfCvicsICfQqycsICfStCcsICfGlScsICfGoicsICfQiScsICfQiicsICfQlicsICfGnCcsICfTgScsICfTjScsICfRoCcsICfSpycsICfQricsICfUgycsICfUgicsICfSlicsICfFkicsICfFkycsICfTuCcsICfHiicsICfSpicsICfHhycsICfHhScsICfHhCcsICfFtCcsICdXJywgJ9KkJywgJ8i4JywgJ8i5JywgJ8eGJywgJ9OVJylcbiAgICApXG5cbiAgICBwcml2YXRlIHZhbCBDTFVTVEVSSU5HOiBNYXA8Q2hhciwgSW50PiA9IENMVVNURVJTLm1hcEluZGV4ZWQgeyBpZCwgY2x1c3RlciAtPiBjbHVzdGVyLm1hcCB7IFBhaXIoaWQsIGl0KSB9IH1cbiAgICAgICAgLmZsYXR0ZW4oKVxuICAgICAgICAuYXNzb2NpYXRlIHsgaXQuc2Vjb25kIHRvIGl0LmZpcnN0IH1cblxuICAgIHByaXZhdGUgdmFsIENMVVNURVJfV0lEVEggPSBsaXN0T2YoXG4gICAgICAgIDYuNDQwNTA2MzI5MTEzOTI1LFxuICAgICAgICAxMC4xODEyMTgyNzQxMTE2NzcsXG4gICAgICAgIDEyLjU4MzUxMjU0NDgwMjg2OCxcbiAgICAgICAgMTQuNTM2NjgzNDE3MDg1NDI4LFxuICAgICAgICAxNy43MTQyODU3MTQyODU3MTVcbiAgICApXG5cbiAgICBwcml2YXRlIHZhbCBGQU1JTFlfQ09FRkZJQ0lFTlQgPSBtYXBPZihcbiAgICAgICAgXCJBcmlhbFwiIHRvIDAuMDg3Nzc1MDkzODk5NTY1ODIsXG4gICAgICAgIFwiQ2FsaWJyaVwiIHRvIC0wLjc1Njg5MjQ2ODYzMzg0ODEsXG4gICAgICAgIFwiR2FyYW1vbmRcIiB0byAtMS4yMzQxMjkyMTIwNjU5ODk1LFxuICAgICAgICBcIkdlbmV2YVwiIHRvIDAuMDg3Nzc1MDkzODk5NTY1ODIsXG4gICA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ljaWVudFxuICAgIH1cblxuICAgIHByaXZhdGUgZnVuIGdldEZhY2VBZGRpdGl2ZShmb250OiBGb250KTogRG91YmxlIHtcbiAgICAgICAgcmV0dXJuIHdoZW4ge1xuICAgICAgICAgICAgZm9udC5pc0JvbGQgJiYgZm9udC5pc0l0YWxpYyAtPiAwLjkxNzIxMjA5OTUwNzA5OTlcbiAgICAgICAgICAgIGZvbnQuaXNCb2xkICYmICFmb250LmlzSXRhbGljIC0+IDAuNjkwODIzODg5MDE4MTYwMlxuICAgICAgICAgICAgIWZvbnQuaXNCb2xkICYmIGZvbnQuaXNJdGFsaWMgLT4gMC4xNzgzMTg4NjIwNzM2NzM4XG4gICAgICAgICAgICBlbHNlIC0+IDAuMFxuICAgICAgICB9XG4gICAgfVxuXG4gICAgcHJpdmF0ZSBmdW4gZ2V0U2l6ZUNvZWZmaWNpZW50KGZvbnQ6IEZvbnQpOiBEb3VibGUge1xuICAgICAgICByZXR1cm4gU0laRV9DT0VGRklDSUVOVCAqIGZvbnQuc2l6ZSAvIERFRkFVTFRfRk9OVF9TSVpFXG4gICAgfVxuXG4gICAgcHJpdmF0ZSBmdW4gY29ycmVjdFByZWRpY3Rpb24ocHJlZGljdGVkV2lkdGg6IERvdWJsZSwgdGV4dExlbmd0aDogSW50LCBmb250OiBGb250KTogRG91YmxlIHtcbiAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgIHByZWRpY3RlZFdpZHRoICsgdGV4dExlbmd0aCAqIChnZXRGYW1pbHlBZGRpdGl2ZShmb250KSArIGdldEZhY2VBZGRpdGl2ZShmb250KSlcbiAgICAgICAgKSAqIGdldFNpemVDb2VmZmljaWVudChmb250KVxuICAgIH1cblxuICAgIGZ1biB0ZXh0V2lkdGgodGV4dDogU3RyaW5nLCBmb250OiBGb250KTogRG91YmxlIHtcbiAgICAgICAgaWYgKHRleHQuaXNFbXB0eSgpKSByZXR1cm4gMC4wXG4gICAgICAgIHJldHVybiBjb3JyZWN0UHJlZGljdGlvbih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1bVNpemUsXG4gICAgICAgICAgICAgICAgICAgICAgICBzdHJhdHVtU2FtcGxlU2l6ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJhbmQsXG4gICAgICAgICAgICAgICAgICAgICAgICB7IGluZGV4U2V0IC0+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKDAgdW50aWwgZ3JvdXBJbmRpY2VzLnNpemUpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5maWx0ZXIgeyBpbmRleFNldC5jb250YWlucyhpdCkgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHsgaW5kZXhTZXQgLT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMCB1bnRpbCBncm91cEluZGljZXMuc2l6ZSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmZpbHRlciB7IGkgLT4gIWluZGV4U2V0LmNvbnRhaW5zKGkpIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXG5cbiAgICAgICAgICAgICAgICBmb3IgKGkgaW4gc2FtcGxlR3JvdXBJbmRpY2VzKSB7XG4gICAgICAgICAgICAgICAgICAgIHBpY2tJbmRpY2VzLmFkZChncm91cEluZGljZXNbaV0pXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHBvcHVsYXRpb24uc2VsZWN0SW5kaWNlcyhwaWNrSW5kaWNlcylcbiAgICB9XG5cbiAgICBjb21wYW5pb24gb2JqZWN0IHtcbiAgICAgICAgaW50ZXJuYWwgY29uc3QgdmFsIEFMSUFTID0gXCJyYW5kb21fc3RyYXRpZmllZFwiXG4gICAgICAgIHByaXZhdGUgY29uc3QgdmFsIERFRl9NSU5fU1VCU0FNUExFX1NJWkUgPSAyIC8vIG1pbiBuZWVkZWQgdG8gZHJhdyBhIGxpbmVcbiAgICB9XG59XG4iLCIvKlxuICogQ29weXJpZ2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0ID0gLTFcbiAgICAgICAgICAgICAgICBsYXN0UG9pbnQgPSBudWxsXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHN0YXJ0ID49IDApIHtcbiAgICAgICAgICAgIC8vIG5vdCBjbG9zZWRcbiAgICAgICAgICAgIHJpbmdzLmFkZChwb2ludHMuc3ViTGlzdChzdGFydCwgcG9pbnRzLnNpemUpKVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiByaW5nc1xuICAgIH1cblxuICAgIGZ1biBjYWxjdWxhdGVSaW5nTGltaXRzKHJpbmdzOiBMaXN0PExpc3Q8RG91YmxlVmVjdG9yPj4sIHRvdGFsUG9pbnRzTGltaXQ6IEludCk6IExpc3Q8SW50PiB7XG4gICAgICAgIHZhbCB0b3RhbEFyZWEgPSByaW5ncy5tYXAgeyBjYWxjdWxhdGVBcmVhKGl0KSB9LnN1bSgpXG5cbiAgICAgICAgdmFsIGFyZWFQcm9jZWVkID0gTXV0YWJsZURvdWJsZSgwLjApXG4gICAgICAgIHZhbCBwb2ludHNQcm9jZWVkID0gTXV0YWJsZUludGVnZXIoMClcblxuICAgICAgICByZXR1cm4gcmluZ3MuaW5kaWNlc1xuICAgICAgICAgICAgLmFzU2VxdWVuY2UoKVxuICAgICAgICAgICAgLm1hcCB7IFBhaXIoaXQsIGNhbGN1bGF0ZUFyZWEocmluZ3NbaXRdKSkgfVxuICAgICAgICAgICAgLnNvcnRlZFdpdGgoY29tcGFyZUJ5PFBhaXI8KiwgRG91YmxlPj4ge1xuICAgICAgICAgICAgICAgIGdldFJpbmdBcmVhKFxuICAgICAgICAgICAgICAgICAgICBpdFxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgIH0ucmV2ZXJzZWQoKSlcbiAgICAgICAgICAgIC5tYXAgeyBwIC0+XG4gICAgICAgICAgICAgICAgdmFyIGxpbWl0ID0gbWluKFxuICAgICAgICAgICAgICAgICAgICAocC5zZWNvbmQgLyAodG90YWxBcmVhIC0gYXJlYVByb2NlZWQuZ2V0KCkpICogKHRvdGFsUG9pbnRzTGltaXQgLSBwb2ludHNQcm9jZWVkLmdldCgpKSkucm91bmRUb0ludCgpLFxuICAgICAgICAgICAgICAgICAgICByaW5nc1tnZXRSaW5nSW5kZXgocCldLnNpemVcbiAgICAgICAgICAgICAgICApXG5cbiAgICAgICAgICAgICAgICBpZiAobGltaXQgPj0gNCkge1xuICAgICAgICAgICAgICAgICAgICBhcmVhUHJvY2VlZC5nZXRBbmRBZGQoZ2V0UmluZ0FyZWEocCkpXG4gICAgICAgICAgICAgICAgICAgIHBvaW50c1Byb2NlZWQuZ2V0QW5kQWRkKGxpbWl0KVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGxpbWl0ID0gMFxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIFBhaXIoZ2V0UmluZ0luZGV4KHApLCBsaW1pdClcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC5zb3J0ZWRXaXRoKGNvbXBhcmVCeSB7IGdldFJpbmdJbmRleChpdCkgfSlcbiAgICAgICAgICAgIC5tYXAgeyBnZXRSaW5nTGltaXQoaXQpIH1cbiAgICAgICAgICAgIC50b0xpc3QoKVxuICAgIH1cblxuICAgIGZ1biBnZXRSaW5nSW5kZXgocGFpcjogUGFpcjxJbnQsICo+KTogSW50IHtcbiAgICAgICAgcmV0dXJuIHBhaXIuZmlyc3RcbiAgICB9XG5cbiAgICBwcml2YXRlIGZ1biBnZXRSaW5nQXJlYShwYWlyOiBQYWlyPCosIERvdWJsZT4pOiBEb3VibGUge1xuICAgICAgICByZXR1cm4gcGFpci5zZWNvbmRcbiAgICB9XG5cbiAgICBmdW4gZ2V0UmluZ0xpbWl0KHBhaXI6IFBhaXI8KiwgSW50Pik6IEludCB7XG4gICAgICAgIHJldHVybiBwYWlyLnNlY29uZFxuICAgIH1cbn1cbiIsIi8qXG4gKiBDb3B5cmlnaHQgKGMpIDIwM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AgIHRoaXMucHV0KFdFSUdIVCwgTlVNRVJJQ19JREVOVElUWSlcbiAgICAgICAgICAgIHRoaXMucHV0KEJJTldJRFRILCBOVU1FUklDX0lERU5USVRZKVxuICAgICAgICAgICAgdGhpcy5wdXQoVklPTElOV0lEVEgsIE5VTUVSSUNfSURFTlRJVFkpXG4gICAgICAgICAgICB0aGlzLnB1dChJTlRFUkNFUFQsIE5VTUVSSUNfSURFTlRJVFkpXG4gICAgICAgICAgICB0aGlzLnB1dChTTE9QRSwgTlVNRVJJQ19JREVOVElUWSlcbiAgICAgICAgICAgIHRoaXMucHV0KFhJTlRFUkNFUFQsIE5VTUVSSUNfSURFTlRJVFkpXG4gICAgICAgICAgICB0aGlzLnB1dChZSU5URVJDRVBULCBOVU1FUklDX0lERU5USVRZKVxuICAgICAgICAgICAgdGhpcy5wdXQoTE9XRVIsIE5VTUVSSUNfSURFTlRJVFkpXG4gICAgICAgICAgICB0aGlzLnB1dChNSURETEUsIE5VTUVSSUNfSURFTlRJVFkpXG4gICAgICAgICAgICB0aGlzLnB1dChVUFBFUiwgTlVNRVJJQ19JREVOVElUWSlcbiAgICAgICAgICAgIHRoaXMucHV0KFNBTVBMRSwgTlVNRVJJQ19JREVOVElUWSlcbiAgICAgICAgICAgIHRoaXMucHV0KFFVQU5USUxFLCBOVU1FUklDX0lERU5USVRZKVxuXG4gICAgICAgICAgICB0aGlzLnB1dChNQVBfSUQsIGNyZWF0ZU9iamVjdElkZW50aXR5KCkpXG4gICAgICAgICAgICB0aGlzLnB1dChGUkFNRSwgY3JlYXRlU3RyaW5nSWRlbnRpdHkoKSlcblxuICAgICAgICAgICAgdGhpcy5wdXQoU1BFRUQsIE5VTUVSSUNfSURFTlRJVFkpXG4gICAgICAgICAgICB0aGlzLnB1dChGTE9XLCBOVU1FUklDX0lERU5USVRZKVxuXG4gICAgICAgICAgICB0aGlzLnB1dChYTUlOLCBOVU1FUklDX0lERU5USVRZKVxuICAgICAgICAgICAgdGhpcy5wdXQoW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5FRFxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIG92ZXJyaWRlIGZ1biBjcmVhdGVDb250aW51b3VzTWFwcGVyKFxuICAgICAgICAgICAgICAgICAgICBkb21haW46IERvdWJsZVNwYW4sXG4gICAgICAgICAgICAgICAgICAgIHRyYW5zOiBDb250aW51b3VzVHJhbnNmb3JtXG4gICAgICAgICAgICAgICAgKTogR3VpZGVNYXBwZXI8RG91YmxlPiB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBHdWlkZU1hcHBlcnMuTlVNRVJJQ19VTkRFRklORURcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHByaXZhdGUgdmFsIE5VTUVSSUNfSURFTlRJVFk6IE1hcHBlclByb3ZpZGVyPERvdWJsZT4gPSBvYmplY3QgOiBNYXBwZXJQcm92aWRlcjxEb3VibGU+IHtcbiAgICAgICAgICAgICAgICBvdmVycmlkZSBmdW4gY3JlYXRlRGlzY3JldGVNYXBwZXIoZGlzY3JldGVUcmFuc2Zvcm06IERpc2NyZXRlVHJhbnNmb3JtKTogU2NhbGVNYXBwZXI8RG91YmxlPiB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBNYXBwZXJzLklERU5USVRZXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgb3ZlcnJpZGUgZnVuIGNyZWF0ZUNvbnRpbnVvdXNNYXBwZXIoXG4gICAgICAgICAgICAgICAgICAgIGRvbWFpbjogRG91YmxlU3BhbixcbiAgICAgICAgICAgICAgICAgICAgdHJhbnM6IENvbnRpbnVvdXNUcmFuc2Zvcm1cbiAgICAgICAgICAgICAgICApOiBHdWlkZU1hcHBlcjxEb3VibGU+IHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEd1aWRlTWFwcGVycy5JREVOVElUWVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbn1cb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R5RGlzY3JldGVNYXBwZXJQcm92aWRlclxuaW1wb3J0IGpldGJyYWlucy5kYXRhbG9yZS5wbG90LmJ1aWxkZXIuc2NhbGUucHJvdmlkZXIuSWRlbnRpdHlNYXBwZXJQcm92aWRlclxuXG5vYmplY3QgRGVmYXVsdE1hcHBlclByb3ZpZGVyVXRpbCB7XG5cbiAgICBpbnRlcm5hbCBmdW4gY3JlYXRlQ29sb3JNYXBwZXJQcm92aWRlcigpOiBNYXBwZXJQcm92aWRlcjxDb2xvcj4ge1xuICAgICAgICB2YWwgZGlzY3JldGUgPSBDb2xvckJyZXdlck1hcHBlclByb3ZpZGVyKG51bGwsIG51bGwsIG51bGwsIENvbG9yLkdSQVkpXG4gICAgICAgIHZhbCBjb250aW51b3VzID0gQ29sb3JHcmFkaWVudE1hcHBlclByb3ZpZGVyLkRFRkFVTFRcbiAgICAgICAgcmV0dXJuIG9iamVjdCA6IE1hcHBlclByb3ZpZGVyPENvbG9yPiB7XG4gICAgICAgICAgICBvdmVycmlkZSBmdW4gY3JlYXRlRGlzY3JldGVNYXBwZXIoZGlzY3JldGVUcmFuc2Zvcm06IERpc2NyZXRlVHJhbnNmb3JtKTogU2NhbGVNYXBwZXI8Q29sb3I+IHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZGlzY3JldGUuY3JlYXRlRGlzY3JldGVNYXBwZXIoZGlzY3JldGVUcmFuc2Zvcm0pXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIG92ZXJyaWRlIGZ1biBjcmVhdGVDb250aW51b3VzTWFwcGVyKFxuICAgICAgICAgICAgICAgIGRvbWFpbjogRG91YmxlU3BhbixcbiAgICAgICAgICAgICAgICB0cmFuczogQ29udGludW91c1RyYW5zZm9ybVxuICAgICAgICAgICAgKTogR3VpZGVNYXBwZXI8Q29sb3I+IHtcbiAgICAgICAgICAgICAgICByZXR1cm4gY29udGludW91cy5jcmVhdGVDb250aW51b3VzTWFwcGVyKGRvbWFpbiwgdHJhbnMpXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBmdW4gPFQ+IGNyZWF0ZVdpdGhEaXNjcmV0ZU91dHB1dChvdXRwdXRWYWx1ZXM6IExpc3Q8VD4sIG5hVmFsdWU6IFQpOiBNYXBwZXJQcm92aWRlcjxUPiB7XG4gICAgICAgIHJldHVybiBvYmplY3QgOiBNYXBwZXJQcm92aWRlcjxUPiB7XG4gICAgICAgICAgICBvdmVycmlkZSBmdW4gY3JlYXRlRGlzY3JldGVNYXBwZXIoZGlzY3JldGVUcmFuc2Zvcm06IERpc2NyZXRlVHJhbnNmb3JtKTogU2NhbGVNYXBwZXI8VD4ge1xuICAgICAgICAgICAgICAgIHJldHVybiBHdWlkZU1hcHBlcnMuZGlzY3JldGVUb0Rpc2NyZXRlKGRpc2NyZXRlVHJhbnNmb3JtLCBvdXRwdXRWYWx1ZXMsIG5hVmFsdWUpXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIG92ZXJyaWRlIGZ1biBjcmVhdGVDb250aW51b3VzTWFwcGVyKFxuICAgICAgICAgICAgICAgIGRvbWFpbjogRG91YmxlU3BhbixcbiAgICAgICAgICAgICAgICB0cmFuczogQ29udGludW91c1RyYW5zZm9ybVxuICAgICAgICAgICAgKTogR3VpZGVNYXBwZXI8VD4ge1xuICAgICAgICAgICAgICAgIHJldHVybiBHdWlkZU1hcHBlcnMuY29udGludW91c1RvRGlzY3JldGUoXG4gICAgICAgICAgICAgICAgICAgIE1hcHBlclV0aWwucmFuZ2VXaXRoTGltaXRzQWZ0ZXJUcmFuc2Zvcm0oZG9tYWluLCB0cmFucyksXG4gICAgICAgICAgICAgICAgICAgIG91dHB1dFZhbHVlcywgbmFWYWx1ZVxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGludGVybmFsIGZ1biBjcmVhdGVPYmplY3RJZGVudGl0eSgpOiBNYXBwZXJQcm92aWRlcjxBbnk+IHt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URvbWFpblJldmVyc2VcblxuICAgICAgICBvdmVycmlkZSB2YWwgYnJlYWtzOiBMaXN0PEFueT4/ID0gYi5teUJyZWFrcz8ubGV0IHsgQXJyYXlMaXN0KGl0KSB9XG4gICAgICAgIG92ZXJyaWRlIHZhbCBsaW1pdHM6IExpc3Q8QW55Pz4/ID0gYi5teUxpbWl0cz8ubGV0IHsgQXJyYXlMaXN0KGl0KSB9XG5cbiAgICAgICAgb3ZlcnJpZGUgdmFsIGNvbnRpbnVvdXNUcmFuc2Zvcm06IENvbnRpbnVvdXNUcmFuc2Zvcm0gPSBiLm15Q29udGludW91c1RyYW5zZm9ybVxuICAgICAgICBvdmVycmlkZSB2YWwgYXhpc09yaWVudGF0aW9uOiBPcmllbnRhdGlvbj8gPSB3aGVuIChiLmFlcykge1xuICAgICAgICAgICAgQWVzLlggLT4ge1xuICAgICAgICAgICAgICAgIHZhbCBvcmllbnRhdGlvbiA9IGIuYXhpc09yaWVudGF0aW9uISFcbiAgICAgICAgICAgICAgICByZXF1aXJlKG9yaWVudGF0aW9uLmlzSG9yaXpvbnRhbCkgeyBcIklsbGVnYWwgWC1heGlzIHBvc2l0aW9uOiAkb3JpZW50YXRpb25cIiB9XG4gICAgICAgICAgICAgICAgb3JpZW50YXRpb25cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgQWVzLlkgLT4ge1xuICAgICAgICAgICAgICAgIHZhbCBvcmllbnRhdGlvbiA9IGIuYXhpc09yaWVudGF0aW9uISFcbiAgICAgICAgICAgICAgICByZXF1aXJlKCFvcmllbnRhdGlvbi5pc0hvcml6b250YWwpIHsgXCJJbGxlZ2FsIFktYXhpcyBwb3NpdGlvbjogJG9yaWVudGF0aW9uXCIgfVxuICAgICAgICAgICAgICAgIG9yaWVudGF0aW9uXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGVsc2UgLT4gbnVsbFxuICAgICAgICB9XG5cblxuICAgICAgICBwcml2YXRlIGZ1biBzY2FsZU5hbWUodmFyaWFibGU6IERhdGFGcmFtZS5WYXJpYWJsZSk6IFN0cmluZyB7XG4gICAgICAgICAgICByZXR1cm4gbXlOYW1lID86IHZhcmlhYmxlLmxhYmVsXG4gICAgICAgIH1cblxuICAgICAgICAvKipcbiAgICAgICAgICogRGlzY3JldGUgZG9tYWluLlxuICAgICAgICAgKi9cbiAgICAgICAgb3ZlcnJpZGUgZnVuIGNyZWF0ZVNjYWxlKGRlZmF1bHROYW1lOiBTdHJpbmcsIGRpc2NyZXRlVHJhbnNmb3JtOiBEaXNjcmV0ZVRyYW5zZm9ybSk6IFNjYWxlPFQ+IHtcbiAgICAgICAgICAgIHZhciBzY2FsZTogU2NhbGU8VD4gPSBTY2FsZXMuZGlzY3JldGVEb21haW4oXG4gICAgICAgICAgICAgICAgbXlOYW1lID86IGRlZmF1bHROYW1lLFxuICAgICAgICAgICAgICAgIGRpc2NyZXRlVHJhbnNmb3JtLFxuICAgICAgICAgICAgKVxuXG4gICAgICAgICAgICByZXR1cm4gY29tcGxldGVTY2FsZShzY2FsZSlcbiAgICAgICAgfVxuXG4gICAgICAgIG92ZXJyaWRlIGZ1biBjcmVhdGVTY2FsZShcbiAgICAgICAgICAgIGRlZmF1bHROYW1lOiBTdHJpbmcsXG4gICAgICAgICAgICBjb250aW51b3VzVHJhbnNmb3JtOiBDb250aW51b3VzVHJhbnNmb3JtLFxuICAgICAgICAgICAgY29udGludW91c1JhbmdlOiBCb29sZWFuLFxuICAgICAgICAgICAgZ3VpZGVCcmVha3M6IFdpdGhHdWlkZUJyZWFrczxBbnk+P1xuICAgICAgICApOiBTY2FsZTxUPiB7XG4gICAgICAgICAgICB2YWwgbmFtZSA9IG15TmFtZSA/OiBkZWZhdWx0TmFtZVxuICAgICAgICAgICAgdmFyIHNjYWxlOiBTY2FsZTxUPlxuXG4gICAgICAgICAgICAvLyBjb250aW51b3VzIChudW1lcmljKSBkb21haW5cbiAgICAgICAgICAgIHNjYWxlID0gU2NhbGVzLmNvbnRpbnVvdXNEb21haW4oXG4gICAgICAgICAgICAgICAgbmFtZSxcbiAgICAgICAgICAgICAgICBjb250aW51b3VzUmFuZ2UgPSBjb250aW51b3VzUmFuZ2UgfHwgbXlBZXMuaXNOdW1lcmljXG4gICAgICAgICAgICApXG5cbiAgICAgICAgICAgIGd1aWRlQnJlYWtzPy5sZXQge1xuICAgICAgICAgICAgICAgIHNjYWxlID0gc2NhbGUud2l0aCgpXG4gICAgICAgICAgICAgICAgICAgIC5icmVha3MoaXQuYnJlYWtzKVxuICAgICAgICAgICAgICAgICAgICAubGFiZWxGb3JtYXR0ZXIoaXQuZm9ybWF0dGVyKVxuICAgICAgICAgICAgICAgICAgICAuYnVpbGQoKVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBzY2FsZSA9IHNjYWxlLndpdGgoKVxuICAgICAgICAgICAgICAgIC5jb250aW51b3VzVHJhbnNmb3JtKGNvbnRpbnVvdXNUcmFuc2Zvcm0pXG4gICAgICAgICAgICAgICAgLmJ1aWxkKClcblxuICAgICAgICAgICAgaWYgKG15QnJlYWtzR2VuZXJhdG9yICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICBzY2FsZSA9IHNjYWxlLndpdGgoKVxuICAgICAgICAgICAgICAgICAgICAuYnJlYWtzR2VuZXJhdG9yKG15QnJlYWtzR2VuZXJhdG9yKVxuICAgICAgICAgICAgICAgICAgICAuYnVpbGQoKVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gY29tcGxldGVTY2FsZShzY2FsZSlcbiAgICAgICAgfVxuXG4gICAgICAgIHByaXZhdGUgZnVuIGNvbXBsZXRlU2NhbGUoc2NhbGU6IFNjYWxlPFQ+KTogU2NhbGU8VD4ge1xuICAgICAgICAgICAgdmFsIHdpdGggPSBzY2FsZS53aXRoKClcbiAgICAgICAgICAgIGlmIChicmVha3MgIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIHdpdGguYnJlYWtzKGJyZWFrcylcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChteUxhYmVscyAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgd2l0aC5sYWJlbHMobXlMYWJlbHMpXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAobXlMYWJlbEZvcm1hdCAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgd2l0aC5sYWJlbEZvcm1hdHRlcihTdHJpbmdGb3JtYXQuZm9yT25lQXJnKG15TGFiZWxGb3JtYXQpOjpmb3JtYXQpXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAobXlNdWx0aXBsaWNhdGl2ZUV4cGFuZCAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgd2l0aC5tdWx0aXBsaWNhdGl2ZUV4cGFuZChteU11bHRpcGxpY2F0aXZlRXhwYW5kKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKG15QWRkaXRpdmVFeHBhbmQgIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIHdpdGguYWRkaXRpdmVFeHBhbmQobXlBZGRpdGl2ZUV4cGFuZClcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiB3aXRoLmJ1aWxkKClcbiAgICAgICAgfVxuXG4gICAgICAgIHByaXZhdGUgZnVuIGFic2VudE1hcHBlcihgdmFyYDogRGF0YUZyYW1lLlZhcmlhYmxlKTogU2NhbGVNYXBwZXI8VD4ge1xuICAgICAgICAgICAgLy8gbWFwcGVyIGZvciBlbXB0eSBkYXRhIGlzIGEgc3BlY2lhbCBjYXNlIC0gc2hvdWxkIG5ldmVyIGJlIHVzZWRcbiAgICAgICAgICAgIHJldHVybiBvYmplY3QgOiBTY2FsZU1hcHBlcjxUPiB7XG4gICAgICAgICAgICAgICAgb3ZlcnJpZGUgZnVuIGludm9rZSh2OiBEb3VibGU/KTogVD8ge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBJbGxlZ2FsU3RhdGVFeGNlcHRpb24oXCJNYXBwZXIgZm9yIGVtcHR5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ICAgICBkb21haW4sXG4gICAgICAgICAgICBERUZfR1JBRElFTlRfTE9XLFxuICAgICAgICAgICAgREVGX0dSQURJRU5UX0hJR0gsXG4gICAgICAgICAgICBOQV9WQUxVRSxcbiAgICAgICAgICAgIGFscGhhID0gMS4wXG4gICAgICAgIClcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBBbHBoYSBjaGFubmVsIFswLi4xXSAoMCAtIHRyYW5zcGFyZW50IGFuZCAxIC0gb3BhcXVlKS5cbiAgICAgKi9cbiAgICBmdW4gZ3JhZGllbnQoXG4gICAgICAgIGRvbWFpbjogRG91YmxlU3BhbixcbiAgICAgICAgbG93OiBDb2xvcixcbiAgICAgICAgaGlnaDogQ29sb3IsXG4gICAgICAgIG5hQ29sb3I6IENvbG9yLFxuICAgICAgICBhbHBoYTogRG91YmxlID0gMS4wXG4gICAgKTogKERvdWJsZT8pIC0+IENvbG9yIHtcbiAgICAgICAgcmV0dXJuIGdyYWRpZW50SFNWKFxuICAgICAgICAgICAgZG9tYWluLFxuICAgICAgICAgICAgQ29sb3JzLmhzdkZyb21SZ2IobG93KSxcbiAgICAgICAgICAgIENvbG9ycy5oc3ZGcm9tUmdiKGhpZ2gpLFxuICAgICAgICAgICAgdHJ1ZSxcbiAgICAgICAgICAgIG5hQ29sb3IsIGFscGhhXG4gICAgICAgIClcbiAgICB9XG5cbiAgICBmdW4gZ3JhZGllbnRIU1YoXG4gICAgICAgIGRvbWFpbjogRG91YmxlU3BhbixcbiAgICAgICAgbG93SFNWOiBIU1YsXG4gICAgICAgIGhpZ2hIU1Y6IEhTVixcbiAgICAgICAgYXV0b0h1ZURpcmVjdGlvbjogQm9vbGVhbixcbiAgICAgICAgbmFDb2xvcjogQ29sb3IsXG4gICAgICAgIGFscGhhOiBEb3VibGUgPSAxLjBcbiAgICApOiAoRG91YmxlPykgLT4gQ29sb3Ige1xuXG4gICAgICAgIHZhciBsb3dIdWUgPSBsb3dIU1YuaFxuICAgICAgICB2YXIgaGlnaEh1ZSA9IGhpZ2hIU1YuaFxuXG4gICAgICAgIHZhbCBsb3dTID0gbG93SFNWLnNcbiAgICAgICAgdmFsIGhpZ2hTID0gaGlnaEhTVi5zXG5cbiAgICAgICAgLy8gTm8gaHVlIGlmIHNhdHVyYXRpb24gaXMgbmVhciB6ZXJvXG4gICAgICAgIGlmIChsb3dTIDwgMC4wMDAxKSB7XG4gICAgICAgICAgICBsb3dIdWUgPSBoaWdoSHVlXG4gICAgICAgIH1cbiAgICAgICAgaWYgKGhpZ2hTIDwgMC4wMDAxKSB7XG4gICAgICAgICAgICBoaWdoSHVlID0gbG93SHVlXG4gICAgICAgIH1cblxuICAgICAgICBpZiAoYXV0b0h1ZURpcmVjdGlvbikge1xuICAgICAgICAgICAgdmFsIGRIID0gYWJzKGhpZ2hIdWUgLSBsb3dIdWUpXG4gICAgICAgICAgICBpZiAoZEggPiAxODApIHtcbiAgICAgICAgICAgICAgICBpZiAoaGlnaEh1ZSA+PSBsb3dIdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgbG93SHVlICs9IDM2MC4wXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgaGlnaEh1ZSArPSAzNjAuMFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHZhbCBtYXBwZXJIID0gTWFwcGVycy5saW5lYXIoZG9tYWluLCBsb3dIdWUsIGhpZ2hIdWUsIG51bGwpXG4gICAgICAgIHZhbCBtYXBwZXJTID0gTWFwcGVycy5saW5lYXIoZG9tYWluLCBsb3dTLCBoaWdoUywgbnVsbClcbiAgICAgICAgdmFsIG1hcHBlclYgPSBNYXBwZXJzLmxpbmVhcihkb21haW4sIGxvd0hTVi52LCBoaWdoSFNWLnYsIG51bGwpXG5cbiAgICAgICAgcmV0dXJuIHsgaW5wdXQgLT5cbiAgICAgICAgICAgIGlmIChpbnB1dCA9PSBudWxsIHx8ICFkb21haW4uY29udGF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XMoXG4gICAgICAgIGRpc2NyZXRlVHJhbnNmb3JtOiBEaXNjcmV0ZVRyYW5zZm9ybSxcbiAgICAgICAgb3V0cHV0UmFuZ2U6IERvdWJsZVNwYW4sXG4gICAgICAgIG5hVmFsdWU6IERvdWJsZVxuICAgICk6IFNjYWxlTWFwcGVyPERvdWJsZT4ge1xuXG4gICAgICAgIHZhbCBtYXBwZXIgPSBNYXBwZXJzLmRpc2NyZXRlVG9Db250aW51b3VzKGRpc2NyZXRlVHJhbnNmb3JtLmVmZmVjdGl2ZURvbWFpblRyYW5zZm9ybWVkLCBvdXRwdXRSYW5nZSwgbmFWYWx1ZSlcbiAgICAgICAgcmV0dXJuIEd1aWRlTWFwcGVyV2l0aEd1aWRlQnJlYWtzKFxuICAgICAgICAgICAgbWFwcGVyLFxuICAgICAgICAgICAgZGlzY3JldGVUcmFuc2Zvcm0uZWZmZWN0aXZlRG9tYWluLFxuICAgICAgICAgICAgZm9ybWF0dGVyID0geyB2OiBBbnkgLT4gdi50b1N0cmluZygpIH1cbiAgICAgICAgKVxuICAgIH1cblxuICAgIGZ1biBjb250aW51b3VzVG9Db250aW51b3VzKFxuICAgICAgICBkb21haW46IERvdWJsZVNwYW4sXG4gICAgICAgIHJhbmdlOiBEb3VibGVTcGFuLFxuICAgICAgICBuYVZhbHVlOiBEb3VibGVcbiAgICApOiBHdWlkZU1hcHBlcjxEb3VibGU+IHtcbiAgICAgICAgcmV0dXJuIGFzQ29udGludW91cyhcbiAgICAgICAgICAgIE1hcHBlcnMubGluZWFyKFxuICAgICAgICAgICAgICAgIGRvbWFpbixcbiAgICAgICAgICAgICAgICByYW5nZSxcbiAgICAgICAgICAgICAgICBuYVZhbHVlXG4gICAgICAgICAgICApXG4gICAgICAgIClcbiAgICB9XG5cbiAgICBmdW4gPFQ+IGFzTm90Q29udGludW91cyhtYXBwZXI6IFNjYWxlTWFwcGVyPFQ+KTogR3VpZGVNYXBwZXI8VD4ge1xuICAgICAgICByZXR1cm4gR3VpZ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udWxsICYmIGNvbG9yQ291bnQgPD0gU2V0Mi5tYXhDb2xvcnMpIFNldDJcbiAgICAgICAgICAgICAgICBlbHNlIFNldDNcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgLT4gY29sb3JTY2hlbWVCeUluZGV4KHBhbGV0dGVUeXBlLCAwKVxuICAgICAgICB9XG4gICAgfVxuXG5cbiAgICBjb21wYW5pb24gb2JqZWN0IHtcbiAgICAgICAgcHJpdmF0ZSBmdW4gcGFsZXR0ZVR5cGUobmFtZTogU3RyaW5nPyk6IENvbG9yUGFsZXR0ZS5UeXBlIHtcbiAgICAgICAgICAgIGlmIChuYW1lID09IG51bGwpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gU0VRVUVOVElBTFxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHdoZW4gKG5hbWUpIHtcbiAgICAgICAgICAgICAgICBcInNlcVwiIC0+IFNFUVVFTlRJQUxcbiAgICAgICAgICAgICAgICBcImRpdlwiIC0+IERJVkVSR0lOR1xuICAgICAgICAgICAgICAgIFwicXVhbFwiIC0+IFFVQUxJVEFUSVZFXG4gICAgICAgICAgICAgICAgZWxzZSAtPiB0aHJvdyBJbGxlZ2FsQXJndW1lbnRFeGNlcHRpb24oXG4gICAgICAgICAgICAgICAgICAgIFwiUGFsZXR0ZSB0eXBlIGV4cGVjdGVkIG9uZSBvZiAnc2VxJyAoc2VxdWVudGlhbCksICdkaXYnIChkaXZlcmdpbmcpIG9yICdxdWFsJyAocXVhbGl0YXRpdmUpIGJ1dCB3YXM6ICckbmFtZSdcIlxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHByaXZhdGUgZnVuIGNvbG9yU2NoZW1lQnlOYW1lKHBhbGV0dGVUeXBlOiBDb2xvclBhbGV0dGUuVHlwZSwgcGFsZXR0ZU5hbWU6IFN0cmluZyk6IENvbG9yU2NoZW1lIHtcbiAgICAgICAgIC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pXG5cbiAgICAgICAgdmFsIHJhbmdlTWFwID0gbWFwT2YoXG4gICAgICAgICAgICBsb3dEb21haW4gdG8gbG93TWFwcGVyLFxuICAgICAgICAgICAgaGlnaERvbWFpbiB0byBoaWdoTWFwcGVyXG4gICAgICAgIClcblxuICAgICAgICBmdW4gZ2V0TWFwcGVyKHY6IERvdWJsZT8pOiAoKERvdWJsZT8pIC0+IENvbG9yKT8ge1xuICAgICAgICAgICAgdmFyIGY6ICgoRG91YmxlPykgLT4gQ29sb3IpPyA9IG51bGxcbiAgICAgICAgICAgIGlmIChTZXJpZXNVdGlsLmlzRmluaXRlKHYpKSB7XG4gICAgICAgICAgICAgICAgdmFyIGZTcGFuID0gRG91YmxlLk5hTlxuICAgICAgICAgICAgICAgIGZvciAocmFuZ2UgaW4gcmFuZ2VNYXAua2V5cykge1xuICAgICAgICAgICAgICAgICAgICBpZiAocmFuZ2UuY29udGFpbnModiEhKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFsIHNwYW4gPSByYW5nZS51cHBlckVuZCAtIHJhbmdlLmxvd2VyRW5kXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyB0cnkgdG8gYXZvaWQgMC1sZW5ndGggcmFuZ2VzXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBidXQgcHJlZmVyIHNob3J0ZXIgcmFuZ2VzXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZiA9PSBudWxsIHx8IGZTcGFuID09IDAuMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGYgPSByYW5nZU1hcC5nZXQocmFuZ2UpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZlNwYW4gPSBzcGFuXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHNwYW4gPCBmU3BhbiAmJiBzcGFuID4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGYgPSByYW5nZU1hcC5nZXQocmFuZ2UpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZlNwYW4gPSBzcGFuXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gZlxuICAgICAgICB9XG5cbiAgICAgICAgdmFsIHNjYWxlTWFwcGVyID0gb2JqZWN0IDogU2NhbGVNYXBwZXI8Q29sb3I+IHtcbiAgICAgICAgICAgIG92ZXJyaWRlIGZ1biBpbnZva2UodjogRG91YmxlPyk6IENvbG9yIHtcbiAgICAgICAgICAgICAgICB2YWwgbWFwcGVyID0gZ2V0TWFwcGVyKHYpXG4gICAgICAgICAgICAgICAgcmV0dXJuIG1hcHBlcj8uaW52b2tlKHYpID86IG5hVmFsdWVcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gR3VpZGVNYXBwZXJzLmFzQ29udGludW91cyhzY2FsZU1hcHBlcilcbiAgICB9XG5cbiAgICBjb21wYW5pb24gb2JqZWN0IHtcbiAgICAgICAgLy8gaHR0cHM6Ly9nZ3Bsb3QyLnRpZHl2ZXJzZS5vcmcvY3VycmVudC9zY2FsZV9ncmFkaWVudC5odG1sXG4gICAgICAgIHByaXZhdGUgdmFsIERFRl9HUkFESUVOVF9MT1cgPSBDb2xvci5wYXJzZUhleChcIiM5NjQ1NDBcIikgLy8gbXV0ZWQoXCJyZWRcIilcbiAgICAgICAgcHJpdmF0ZSB2YWwgREVGX0dSQURJRU5UX01JRCA9IENvbG9yLldISVRFXG4gICAgICAgIHByaXZhdGUgdmFsIERFRl9HUkFESUVOVF9ISUdIID0gQ29sb3IucGFyc2VIZXgoXCIjM0IzRDk2XCIpIC8vIG11dGVkKFwiYmx1ZVwiKVxuICAgIH1cbn1cbiIsIi8qXG4gKiBDb3B5cmlnaHQgKGMpIDIwMTkuIEpldEJyYWlucyBzLnIuby5cbiAqIFVzZSBvZiB0aGlzIHNvdXJjZSBjb2RlIGlz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0ZUdyYWRpZW50KG1hcHBlckRvbWFpbiwgY29sb3JzLCBuYVZhbHVlKVxuICAgICAgICByZXR1cm4gR3VpZGVNYXBwZXJzLmFzTm90Q29udGludW91cyhTY2FsZU1hcHBlci53cmFwKGdyYWRpZW50KSlcbiAgICB9XG5cbiAgICBvdmVycmlkZSBmdW4gY3JlYXRlQ29udGludW91c01hcHBlcihkb21haW46IERvdWJsZVNwYW4sIHRyYW5zOiBDb250aW51b3VzVHJhbnNmb3JtKTogR3VpZGVNYXBwZXI8Q29sb3I+IHtcbiAgICAgICAgQFN1cHByZXNzKFwiTkFNRV9TSEFET1dJTkdcIilcbiAgICAgICAgdmFsIGRvbWFpbiA9IE1hcHBlclV0aWwucmFuZ2VXaXRoTGltaXRzQWZ0ZXJUcmFuc2Zvcm0oZG9tYWluLCB0cmFucylcbiAgICAgICAgdmFsIGdyYWRpZW50ID0gY3JlYXRlR3JhZGllbnQoZG9tYWluLCBjb2xvcnMsIG5hVmFsdWUpXG4gICAgICAgIHJldHVybiBHdWlkZU1hcHBlcnMuYXNDb250aW51b3VzKFNjYWxlTWFwcGVyLndyYXAoZ3JhZGllbnQpKVxuICAgIH1cblxuXG4gICAgY29tcGFuaW9uIG9iamVjdCB7XG4gICAgICAgIGludGVybmFsIGZ1biBjcmVhdGVHcmFkaWVudChcbiAgICAgICAgICAgIGRvbWFpbjogRG91YmxlU3BhbixcbiAgICAgICAgICAgIGNvbG9yczogTGlzdDxDb2xvcj4sXG4gICAgICAgICAgICBuYUNvbG9yOiBDb2xvcixcbiAgICAgICAgICAgIGFscGhhOiBEb3VibGUgPSAxLjBcbiAgICAgICAgKTogKERvdWJsZT8pIC0+IENvbG9yIHtcbiAgICAgICAgICAgIHZhbCBzdWJkb21haW5zQ291bnQgPSBjb2xvcnMuc2l6ZSAtIDFcbiAgICAgICAgICAgIHZhbCBzdWJkb21haW5MZW5ndGggPSBkb21haW4ubGVuZ3RoIC8gc3ViZG9tYWluc0NvdW50XG5cbiAgICAgICAgICAgIHZhbCBzdWJkb21haW5FbmRzID0gKDAgdW50aWwgc3ViZG9tYWluc0NvdW50KVxuICAgICAgICAgICAgICAgIC5tYXAgeyBkb21haW4ubG93ZXJFbmQgKyBzdWJkb21haW5MZW5ndGggKiBpdCB9ICtcbiAgICAgICAgICAgICAgICAgICAgbGlzdE9mKGRvbWFpbi51cHBlckVuZCkgLy8gVGhlIGxhc3QgXCJlbmRcIiBzaG91bGQgYmUgZXhhY3QuXG4gICAgICAgICAgICB2YWwgbWFwcGVycyA9IHN1YmRvbWFpbkVuZHMuemlwKGNvbG9ycylcbiAgICAgICAgICAgICAgICAud2luZG93ZWQoMilcbiAgICAgICAgICAgICAgICAubWFwIHsgKGxvdywgaGlnaCkgLT5cbiAgICAgICAgICAgICAgICAgICAgdmFsIChsb3dWYWx1ZSwgbG93Q29sb3IpID0gbG93XG4gICAgICAgICAgICAgICAgICAgIHZhbCAoaGlnaFZhbHVlLCBoaWdoQ29sb3IpID0gaGlnaFxuICAgICAgICAgICAgICAgICAgICB2YWwgc3ViZG9tYWluID0gRG91YmxlU3Bhbihsb3dWYWx1ZSwgaGlnaFZhbHVlKVxuICAgICAgICAgICAgICAgICAgICBDb2xvck1hcHBlci5ncmFkaWVudChzdWJkb21haW4sIGxvd0NvbG9yLCBoaWdoQ29sb3IsIG5hQ29sb3IsIGFscGhhKVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIHsgdmFsdWUgLT5cbiAgICAgICAgICAgICAgICB3aGVuIHtcbiAgICAgICAgICAgICAgICAgICAgdmFsdWUgPT0gbnVsbCB8fCAhdmFsdWUuaXNGaW5pdGUoKSAtPiBuYUNvbG9yXG4gICAgICAgICAgICAgICAgICAgIHZhbHVlIDwgc3ViZG9tYWluRW5kcy5maXJzdCgpIHx8IHZhbHVlID4gc3ViZG9tYWluRW5kcy5sYXN0KCkgLT4gbmFDb2xvclxuICAgICAgICAgICAgICAgICAgICBlbHNlIC0+IHtcbiAgICAgIC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nNpemUpIHtcbiAgICAgICAgICAgIDAgLT4gdGhyb3cgSWxsZWdhbEFyZ3VtZW50RXhjZXB0aW9uKFwiRW1wdHkgSFNWIGludGVydmFscy5cIilcbiAgICAgICAgICAgIDEgLT4gQ29sb3JNYXBwZXIuZ3JhZGllbnRIU1YoXG4gICAgICAgICAgICAgICAgZG9tYWluLFxuICAgICAgICAgICAgICAgIGhzdkludGVydmFsc1swXS5maXJzdCxcbiAgICAgICAgICAgICAgICBoc3ZJbnRlcnZhbHNbMF0uc2Vjb25kLFxuICAgICAgICAgICAgICAgIGZhbHNlLFxuICAgICAgICAgICAgICAgIG5hVmFsdWUsXG4gICAgICAgICAgICAgICAgYWxwaGEgPSAxLjBcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGVsc2UgLT4gY3JlYXRlQ29tcG9zaXRlQ29sb3JNYXBwZXIoZG9tYWluLCBoc3ZJbnRlcnZhbHMsIGZhbHNlLCBuYVZhbHVlKVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIEd1aWRlTWFwcGVycy5hc0NvbnRpbnVvdXMoU2NhbGVNYXBwZXIud3JhcChncmFkaWVudE1hcHBlcikpXG4gICAgfVxuXG5cbiAgICBjb21wYW5pb24gb2JqZWN0IHtcbiAgICAgICAgcHJpdmF0ZSBmdW4gY3JlYXRlQ29tcG9zaXRlQ29sb3JNYXBwZXIoXG4gICAgICAgICAgICBkb21haW46IERvdWJsZVNwYW4sXG4gICAgICAgICAgICBoc3ZJbnRlcnZhbHM6IExpc3Q8UGFpcjxIU1YsIEhTVj4+LFxuICAgICAgICAgICAgYXV0b0h1ZURpcmVjdGlvbjogQm9vbGVhbixcbiAgICAgICAgICAgIG5hQ29sb3I6IENvbG9yXG4gICAgICAgICk6IChEb3VibGU/KSAtPiBDb2xvciB7XG4gICAgICAgICAgICB2YWwgY29sb3JNYXBwZXJzUGVyU3ViRG9tYWluID1cbiAgICAgICAgICAgICAgICBjcmVhdGVDb2xvck1hcHBlcnNQZXJTdWJEb21haW4oZG9tYWluLCBoc3ZJbnRlcnZhbHMsIGF1dG9IdWVEaXJlY3Rpb24sIG5hQ29sb3IpXG5cbiAgICAgICAgICAgIHJldHVybiB7IHY6IERvdWJsZT8gLT5cbiAgICAgICAgICAgICAgICBpZiAodiA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgIG5hQ29sb3JcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB2YWwgbWFwcGVyID0gY29sb3JNYXBwZXJzUGVyU3ViRG9tYWluLmZpbmQgeyBpdC5maXJzdC5jb250YWlucyh2KSB9Py5zZWNvbmRcbiAgICAgICAgICAgICAgICAgICAgbWFwcGVyPy5pbnZva2UodikgPzogbmFDb2xvclxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHByaXZhdGUgZnVuIGNyZWF0ZUNvbG9yTWFwcGVyc1BlclN1YkRvbWFpbihcbiAgICAgICAgICAgIGRvbWFpbjogRG91YmxlU3BhbixcbiAgICAgICAgICAgIGhzdkludGVydmFsczogTGlzdDxQYWlyPEhTViwgSFNWPj4sXG4gICAgICAgICAgICBhdXRvSHVlRGlyZWN0aW9uOiBCb29sZWFuLFxuICAgICAgICAgICAgbmFDb2xvcjogQ29sb3JcbiAgICAgICAgKTogTGlzdDxQYWlyPERvdWJsZVNwYW4sIChEb3VibGU/KSAtPiBDb2xvcj4+IHtcbiAgICAgICAgICAgIHZhbCBzdWJEb21haW5zID0gc3BsaXRDb250aW51b3VzRG9tYWluKGRvbWFpbiwgaHN2SW50ZXJ2YWxzKVxuXG4gICAgICAgICAgICByZXR1cm4gc3ViRG9tYWlucy56aXAoaHN2SW50ZXJ2YWxzKS5tYXAge1xuICAgICAgICAgICAgICAgIEBTdXBwcmVzcyhcIk5BTUVfU0hBRE9XSU5HXCIpXG4gICAgICAgICAgICAgICAgdmFsIGRvbWFpbiA9IGl0LmZpcnN0XG4gICAgICAgICAgICAgICAgdmFsIGhzdkludGVydmFsID0gaXQuc2Vjb25kXG4gICAgICAgICAgICAgICAgUGFpcihcbiAgICAgICAgICAgICAgICAgICAgZG9tYWluLFxuICAgICAgICAgICAgICAgICAgICBDb2xvck1hcHBlci5ncmFkaWVudEhTVihcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvbWFpbixcbiAgICAgICAgICAgICAgICAgICAgICAgIGhzdkludGVydmFsLmZpcnN0LFxuICAgICAgICAgICAgICAgICAgICAgICAgaHN2SW50ZXJ2YWwuc2Vjb25kLFxuICAgICAgICAgICAgICAgICAgICAgICAgYXV0b0h1ZURpcmVjdGlvbixcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hQ29sb3IsXG4gICAgICAgICAgICAgICAgICAgICAgICBhbHBoYSA9IDEuMFxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcHJpdmF0ZSBmdW4gc3BsaXRDb250aW51b3VzRG9tYWluKFxuICAgICAgICAgICAgZG9tYWluOiBEb3VibGVTcGFuLFxuICAgICAgICAgICAgaHN2SW50ZXJ2YWxzOiBMaXN0PFBhaXI8SFNWLCBIU1Y+PlxuICAgICAgICApOiBMaXN0PERvdWJsZVNwYW4+IHtcbiAgICAgICAgICAgIHZhbCBkb21haW5TaXplID0gZG9tYWluLnVwcGVyRW5kIC0gZG9tYWluLmxvd2VyRW5kXG4gICAgICAgICAgICB2YWwgaHVlSW50ZXJ2YWxTaXplTGlzdCA9IGhzdkludGVydmFscy5tYXAge1xuICAgICAgICAgICAgICAgIGFicyhpdC5maXJzdC5oIC0gaXQuc2Vjb25kLmgpXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YWwgaHVlSW50ZXJ2YWxzVG90YWxTaXplID0gaHVlSW50ZXJ2YWxTaXplTGlzdC5zdW0oKVxuXG4gICAgICAgICAgICB2YWwgZG9tYWluVG9IdWVJbnRldm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lcyA9IHdoZW4ge1xuICAgICAgICAgICAgICAgIEFlcy5pc1Bvc2l0aW9uYWxYWShhZXMpIC0+IEFlcy50b0F4aXNBZXMoYWVzLCBpc1lPcmllbnRhdGlvbiEhKVxuICAgICAgICAgICAgICAgIGVsc2UgLT4gYWVzXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YWwgc2NhbGUgPSBjdHguZ2V0U2NhbGUodG9vbHRpcEFlcylcbiAgICAgICAgICAgIGlmIChzY2FsZS5pc0NvbnRpbnVvdXNEb21haW4gJiYgdmFsdWUgaXMgTnVtYmVyKSB7XG4gICAgICAgICAgICAgICAgY3R4LmdldFRvb2x0aXBGb3JtYXR0ZXIodG9vbHRpcEFlcykge1xuICAgICAgICAgICAgICAgICAgICBUb29sdGlwRm9ybWF0dGluZy5jcmVhdGVGb3JtYXR0ZXIodG9vbHRpcEFlcywgY3R4KVxuICAgICAgICAgICAgICAgIH0uaW52b2tlKHZhbHVlKVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB2YWx1ZS50b1N0cmluZygpXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gZm9ybWF0dGVkVmFsdWUhIVxuICAgIH1cblxuICAgIG92ZXJyaWRlIGZ1biBjb3B5KCk6IENvbnN0YW50VmFsdWUge1xuICAgICAgICByZXR1cm4gQ29uc3RhbnRWYWx1ZShcbiAgICAgICAgICAgIGFlcyxcbiAgICAgICAgICAgIHZhbHVlLFxuICAgICAgICAgICAgZm9ybWF0XG4gICAgICAgIClcbiAgICB9XG5cbiAgICBvdmVycmlkZSBmdW4gZ2V0QW5ub3RhdGlvblRleHQoaW5kZXg6IEludCk6IFN0cmluZz8ge1xuICAgICAgICByZXR1cm4gZm9ybWF0dGVkVmFsdWVcbiAgICB9XG59IiwiLypcbiAqIENvcHlyaWdodCAoYykgMjAyMC4gSmV0QnJhaW5zIHMuci5vLlxuICogVXNlIG9mIHRoaXMgc291cmNlIG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ICAgICAgICAgICB9ID86IHJ1biB7XG4gICAgICAgICAgICAgICAgdmFsIHRvb2x0aXBBZXMgPSB3aGVuIHtcbiAgICAgICAgICAgICAgICAgICAgQWVzLmlzUG9zaXRpb25hbFhZKGFlcykgLT4gQWVzLnRvQXhpc0FlcyhhZXMsIG15RGF0YUFjY2Vzcy5pc1lPcmllbnRhdGlvbilcbiAgICAgICAgICAgICAgICAgICAgZWxzZSAtPiBhZXNcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY3R4LmdldFRvb2x0aXBGb3JtYXR0ZXIodG9vbHRpcEFlcykge1xuICAgICAgICAgICAgICAgICAgICBUb29sdGlwRm9ybWF0dGluZy5jcmVhdGVGb3JtYXR0ZXIodG9vbHRpcEFlcywgY3R4KVxuICAgICAgICAgICAgICAgIH0uaW52b2tlKG9yaWdpbmFsVmFsdWUpXG4gICAgICAgICAgICB9XG4gICAgICAgIHJldHVybiBEYXRhUG9pbnQoXG4gICAgICAgICAgICBsYWJlbCA9IG15RGF0YUxhYmVsLFxuICAgICAgICAgICAgdmFsdWUgPSBmb3JtYXR0ZWRWYWx1ZSxcbiAgICAgICAgICAgIGFlcyA9IGFlcyxcbiAgICAgICAgICAgIGlzQXhpcyA9IGlzQXhpcyxcbiAgICAgICAgICAgIGlzT3V0bGllciA9IGlzT3V0bGllclxuICAgICAgICApXG4gICAgfVxuXG4gICAgb3ZlcnJpZGUgZnVuIGNvcHkoKTogTWFwcGluZ1ZhbHVlIHtcbiAgICAgICAgcmV0dXJuIE1hcHBpbmdWYWx1ZShcbiAgICAgICAgICAgIGFlcyA9IGFlcyxcbiAgICAgICAgICAgIGlzT3V0bGllciA9IGlzT3V0bGllcixcbiAgICAgICAgICAgIGlzQXhpcyA9IGlzQXhpcyxcbiAgICAgICAgICAgIGZvcm1hdCA9IGZvcm1hdFxuICAgICAgICApXG4gICAgfVxuXG4gICAgZnVuIHdpdGhGbGFncyhpc091dGxpZXI6IEJvb2xlYW4sIGlzQXh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saWVyID0gZGF0YVZhbHVlLmlzT3V0bGllclxuICAgICAgICAgICAgKVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgRGF0YVBvaW50KFxuICAgICAgICAgICAgICAgIGxhYmVsID0gY2hvb3NlTGFiZWwoZGF0YVZhbHVlcy5qb2luVG9TdHJpbmcoXCIsIFwiKSB7IGl0LmxhYmVsID86IFwiXCIgfSksXG4gICAgICAgICAgICAgICAgdmFsdWUgPSBteUxpbmVGb3JtYXR0ZXIuZm9ybWF0KGRhdGFWYWx1ZXMubWFwIHsgaXQudmFsdWUgfSksXG4gICAgICAgICAgICAgICAgYWVzID0gbnVsbCxcbiAgICAgICAgICAgICAgICBpc0F4aXMgPSBmYWxzZSxcbiAgICAgICAgICAgICAgICBpc091dGxpZXIgPSBmYWxzZVxuICAgICAgICAgICAgKVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgcHJpdmF0ZSBmdW4gY2hvb3NlTGFiZWwoZGF0YUxhYmVsOiBTdHJpbmc/KTogU3RyaW5nPyB7XG4gICAgICAgIHJldHVybiB3aGVuIChsYWJlbCkge1xuICAgICAgICAgICAgREVGQVVMVF9MQUJFTF9TUEVDSUZJRVIgLT4gZGF0YUxhYmVsICAgIC8vIHVzZSBkZWZhdWx0IGxhYmVsIChmcm9tIGRhdGEpXG4gICAgICAgICAgICBlbHNlIC0+IGxhYmVsICAgICAgICAgICAgICAgICAgICAgLy8gdXNlIHRoZSBnaXZlbiBsYWJlbCAoY2FuIGJlIG51bGwpXG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBjb21wYW5pb24gb2JqZWN0IHtcbiAgICAgICAgZnVuIGRlZmF1bHRMaW5lRm9yVmFsdWVTb3VyY2UodmFsdWVTb3VyY2U6IFZhbHVlU291cmNlKTogVG9vbHRpcExpbmUgPSBUb29sdGlwTGluZShcbiAgICAgICAgICAgIExpbmVTcGVjLmRlZmF1bHRMaW5lRm9yVmFsdWVTb3VyY2UodmFsdWVTb3VyY2UpXG4g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uIGhpZGVUb29sdGlwcygpID0gdG9vbHRpcExpbmVQYXR0ZXJucz8uaXNFbXB0eSgpID86IGZhbHNlXG5cbiAgICBjb21wYW5pb24gb2JqZWN0IHtcbiAgICAgICAgZnVuIHdpdGhvdXRUb29sdGlwKCkgPSBUb29sdGlwU3BlY2lmaWNhdGlvbihcbiAgICAgICAgICAgIHZhbHVlU291cmNlcyA9IGVtcHR5TGlzdCgpLFxuICAgICAgICAgICAgdG9vbHRpcExpbmVQYXR0ZXJucyA9IGVtcHR5TGlzdCgpLFxuICAgICAgICAgICAgdG9vbHRpcFByb3BlcnRpZXMgPSBUb29sdGlwUHJvcGVydGllcy5OT05FLFxuICAgICAgICAgICAgdG9vbHRpcFRpdGxlID0gbnVsbFxuICAgICAgICApXG5cbiAgICAgICAgZnVuIGRlZmF1bHRUb29sdGlwKCkgPSBUb29sdGlwU3BlY2lmaWNhdGlvbihcbiAgICAgICAgICAgIHZhbHVlU291cmNlcyA9IGVtcHR5TGlzdCgpLFxuICAgICAgICAgICAgdG9vbHRpcExpbmVQYXR0ZXJucyA9IG51bGwsXG4gICAgICAgICAgICB0b29sdGlwUHJvcGVydGllcyA9IFRvb2x0aXBQcm9wZXJ0aWVzLk5PTkUsXG4gICAgICAgICAgICB0b29sdGlwVGl0bGUgPSBudWxsXG4gICAgICAgIClcbiAgICB9XG59Il0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./kotlin-dce-dev/lets-plot-plot-builder-portable-js-legacy.js\n"); /***/ }), @@ -235,7 +235,7 @@ eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPAC \********************************************************************/ /***/ (function(module, exports, __webpack_require__) { -eval("var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (root, factory) {\n if (true)\n !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! kotlin */ \"./kotlin-dce-dev/kotlin.js\"), __webpack_require__(/*! lets-plot-base-portable-js-legacy */ \"./kotlin-dce-dev/lets-plot-base-portable-js-legacy.js\"), __webpack_require__(/*! lets-plot-plot-builder-portable-js-legacy */ \"./kotlin-dce-dev/lets-plot-plot-builder-portable-js-legacy.js\"), __webpack_require__(/*! lets-plot-vis-svg-portable-js-legacy */ \"./kotlin-dce-dev/lets-plot-vis-svg-portable-js-legacy.js\"), __webpack_require__(/*! lets-plot-plot-base-portable-js-legacy */ \"./kotlin-dce-dev/lets-plot-plot-base-portable-js-legacy.js\"), __webpack_require__(/*! lets-plot-plot-common-portable-js-legacy */ \"./kotlin-dce-dev/lets-plot-plot-common-portable-js-legacy.js\")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n else {}\n}(this, function (_, Kotlin, $module$lets_plot_base_portable_js_legacy, $module$lets_plot_plot_builder_portable_js_legacy, $module$lets_plot_vis_svg_portable_js_legacy, $module$lets_plot_plot_base_portable_js_legacy, $module$lets_plot_plot_common_portable_js_legacy) {\n 'use strict';\n var $$importsForInline$$ = _.$$importsForInline$$ || (_.$$importsForInline$$ = {});\n var println = Kotlin.kotlin.io.println_s8jyv4$;\n var Unit = Kotlin.kotlin.Unit;\n var IllegalArgumentException_init = Kotlin.kotlin.IllegalArgumentException_init_pdl1vj$;\n var DoubleVector = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.geometry.DoubleVector;\n var ArrayList_init = Kotlin.kotlin.collections.ArrayList_init_287e2$;\n var HashMap_init = Kotlin.kotlin.collections.HashMap_init_q3lmfv$;\n var Map = Kotlin.kotlin.collections.Map;\n var emptyMap = Kotlin.kotlin.collections.emptyMap_q3lmfv$;\n var Kind_OBJECT = Kotlin.Kind.OBJECT;\n var replace = Kotlin.kotlin.text.replace_680rmw$;\n var json = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.json;\n var MutableMap = Kotlin.kotlin.collections.MutableMap;\n var throwCCE = Kotlin.throwCCE;\n var RuntimeException_init = Kotlin.kotlin.RuntimeException_init_pdl1vj$;\n var PlotContainerPortable = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.PlotContainerPortable;\n var listOf = Kotlin.kotlin.collections.listOf_mh5how$;\n var toString = Kotlin.toString;\n var presentation = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.presentation;\n var DoubleRectangle = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.geometry.DoubleRectangle;\n var Kind_CLASS = Kotlin.Kind.CLASS;\n var addAll = Kotlin.kotlin.collections.addAll_ipc267$;\n var collectionSizeOrDefault = Kotlin.kotlin.collections.collectionSizeOrDefault_ba2ldo$;\n var ArrayList_init_0 = Kotlin.kotlin.collections.ArrayList_init_ww73n8$;\n var JsMath = Math;\n var trimMargin = Kotlin.kotlin.text.trimMargin_rjktp$;\n var round = Kotlin.kotlin.math.round_14dthe$;\n var numberToInt = Kotlin.numberToInt;\n var joinToString = Kotlin.kotlin.collections.joinToString_fmv235$;\n var trimIndent = Kotlin.kotlin.text.trimIndent_pdl1vz$;\n var RuntimeException = Kotlin.kotlin.RuntimeException;\n var contains = Kotlin.kotlin.text.contains_li3zpu$;\n var random = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.random;\n var jsObject = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.jsObject;\n var Pair = Kotlin.kotlin.Pair;\n var PlotFacets = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.assemble.PlotFacets;\n var IllegalStateException_init = Kotlin.kotlin.IllegalStateException_init_pdl1vj$;\n var zip = Kotlin.kotlin.collections.zip_45mdf7$;\n var DoubleRectangle_init = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.geometry.DoubleRectangle_init_6y0v78$;\n var getCallableRef = Kotlin.getCallableRef;\n var split = Kotlin.kotlin.text.split_ip8yn$;\n var indexOf = Kotlin.kotlin.text.indexOf_l5u8uk$;\n var logging = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.logging;\n var getKClass = Kotlin.getKClass;\n var SvgToString = $module$lets_plot_vis_svg_portable_js_legacy.jetbrains.datalore.vis.svgToString.SvgToString;\n var Regex_init = Kotlin.kotlin.text.Regex_init_61zpoe$;\n var ensureNotNull = Kotlin.ensureNotNull;\n var toDouble = Kotlin.kotlin.text.toDouble_pdl1vz$;\n var AnnotationLine_init = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.annotation.AnnotationLine_init_cpanxn$;\n var emptyList = Kotlin.kotlin.collections.emptyList_287e2$;\n var AnnotationSpecification = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.annotation.AnnotationSpecification;\n var ArrowSpec$End = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.util.ArrowSpec.End;\n var ArrowSpec$Type = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.util.ArrowSpec.Type;\n var toRadians = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.math.toRadians_14dthe$;\n var ArrowSpec = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.util.ArrowSpec;\n var equals = Kotlin.equals;\n var DataFrame$Builder = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.DataFrame.Builder;\n var data = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.data;\n var until = Kotlin.kotlin.ranges.until_dqglrj$;\n var toSet = Kotlin.kotlin.collections.toSet_7wnvza$;\n var filterNotNull = Kotlin.kotlin.collections.filterNotNull_m3lr2h$;\n var toMutableSet = Kotlin.kotlin.collections.toMutableSet_7wnvza$;\n var DataFrame$DataFrame$Builder_init = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.DataFrame.Builder_init;\n var List = Kotlin.kotlin.collections.List;\n var numberToDouble = Kotlin.numberToDouble;\n var Iterable = Kotlin.kotlin.collections.Iterable;\n var NumberFormatException = Kotlin.kotlin.NumberFormatException;\n var checkIndexOverflow = Kotlin.kotlin.collections.checkIndexOverflow_za3lpa$;\n var DoubleSpan = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.interval.DoubleSpan;\n var ContinuousTransform = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.ContinuousTransform;\n var coord = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.coord;\n var mercator = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.spatial.projections.mercator;\n var identity = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.spatial.projections.identity;\n var conicEqualArea = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.spatial.projections.conicEqualArea_lu1900$;\n var azimuthalEqualArea = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.spatial.projections.azimuthalEqualArea;\n var startsWith = Kotlin.kotlin.text.startsWith_7epoxm$;\n var removePrefix = Kotlin.kotlin.text.removePrefix_gsj5wt$;\n var to = Kotlin.kotlin.to_ujzrz7$;\n var emptySet = Kotlin.kotlin.collections.emptySet_287e2$;\n var flatten = Kotlin.kotlin.collections.flatten_u0ad8z$;\n var plus = Kotlin.kotlin.collections.plus_mydzjv$;\n var mutableMapOf = Kotlin.kotlin.collections.mutableMapOf_qfcya0$;\n var DataFrame$DataFrame$Builder_init_0 = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.DataFrame.Builder_init_dhhkv7$;\n var contains_0 = Kotlin.kotlin.collections.contains_2ws7j4$;\n var minus = Kotlin.kotlin.collections.minus_khz7k3$;\n var plus_0 = Kotlin.kotlin.collections.plus_khz7k3$;\n var plus_1 = Kotlin.kotlin.collections.plus_iwxh38$;\n var OrderOptionUtil$OrderOption = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.data.OrderOptionUtil.OrderOption;\n var mapCapacity = Kotlin.kotlin.collections.mapCapacity_za3lpa$;\n var coerceAtLeast = Kotlin.kotlin.ranges.coerceAtLeast_dqglrj$;\n var LinkedHashMap_init = Kotlin.kotlin.collections.LinkedHashMap_init_bwtc7$;\n var LinkedHashMap_init_0 = Kotlin.kotlin.collections.LinkedHashMap_init_q3lmfv$;\n var LinkedHashSet_init = Kotlin.kotlin.collections.LinkedHashSet_init_287e2$;\n var ArrayList_init_1 = Kotlin.kotlin.collections.ArrayList_init_mqih57$;\n var FacetGrid = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.assemble.facet.FacetGrid;\n var HashSet_init = Kotlin.kotlin.collections.HashSet_init_287e2$;\n var toList = Kotlin.kotlin.collections.toList_7wnvza$;\n var take = Kotlin.kotlin.collections.take_ba2ldo$;\n var FacetWrap = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.assemble.facet.FacetWrap;\n var FacetWrap$Direction = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.assemble.facet.FacetWrap.Direction;\n var StringFormat = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.stringFormat.StringFormat;\n var FacetScales = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.assemble.facet.FacetScales;\n var base = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.gcommon.base;\n var IllegalArgumentException = Kotlin.kotlin.IllegalArgumentException;\n var isBlank = Kotlin.kotlin.text.isBlank_gw00vp$;\n var DefaultFontFamilyRegistry = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.presentation.DefaultFontFamilyRegistry;\n var Aes = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.Aes;\n var IllegalStateException_init_0 = Kotlin.kotlin.IllegalStateException_init;\n var get_lastIndex = Kotlin.kotlin.collections.get_lastIndex_55thoc$;\n var IntRange = Kotlin.kotlin.ranges.IntRange;\n var mapOf = Kotlin.kotlin.collections.mapOf_qfcya0$;\n var mapOf_0 = Kotlin.kotlin.collections.mapOf_x2b85n$;\n var spatial = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.spatial;\n var DataFrame$Variable = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.DataFrame.Variable;\n var SimpleFeature$Consumer = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.spatial.SimpleFeature.Consumer;\n var firstOrNull = Kotlin.kotlin.collections.firstOrNull_7wnvza$;\n var asSequence = Kotlin.kotlin.collections.asSequence_7wnvza$;\n var flatten_0 = Kotlin.kotlin.sequences.flatten_d9bjs1$;\n var union = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.spatial.union_86o20w$;\n var convertToGeoRectangle = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.spatial.convertToGeoRectangle_i3vl8m$;\n var boundingBox = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.typedGeometry.boundingBox_gyuce3$;\n var limit = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.typedGeometry.limit_106pae$;\n var limit_0 = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.typedGeometry.limit_lddjmn$;\n var get_left = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.typedGeometry.get_left_h9e6jg$;\n var get_right = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.typedGeometry.get_right_h9e6jg$;\n var get_top = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.typedGeometry.get_top_h9e6jg$;\n var get_bottom = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.typedGeometry.get_bottom_h9e6jg$;\n var Result = Kotlin.kotlin.Result;\n var Throwable = Error;\n var createFailure = Kotlin.kotlin.createFailure_tcv7n7$;\n var Any = Object;\n var Collection = Kotlin.kotlin.collections.Collection;\n var afterOrientation = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.util.afterOrientation_1o7jhc$;\n var minus_0 = Kotlin.kotlin.collections.minus_q4559j$;\n var GeomInteractionBuilder = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.interact.GeomInteractionBuilder;\n var GeomKind = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.GeomKind;\n var listOf_0 = Kotlin.kotlin.collections.listOf_i5x0yv$;\n var GeomTooltipSetup = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.interact.GeomTooltipSetup;\n var GeomTargetLocator$LookupStrategy = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.GeomTargetLocator.LookupStrategy;\n var base_0 = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base;\n var removeAll = Kotlin.kotlin.collections.removeAll_qafx1e$;\n var retainAll = Kotlin.kotlin.collections.retainAll_qafx1e$;\n var getValue = Kotlin.kotlin.collections.getValue_t9ocha$;\n var geom = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.assemble.geom;\n var sampling = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.sampling;\n var GeomKind$values = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.GeomKind.values;\n var GeomProvider = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.assemble.geom.GeomProvider;\n var DotplotGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.DotplotGeom;\n var DotplotGeom$Stackdir = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.DotplotGeom.Stackdir;\n var DotplotStat$Method = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.stat.DotplotStat.Method;\n var CrossBarGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.CrossBarGeom;\n var PointRangeGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.PointRangeGeom;\n var BoxplotGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.BoxplotGeom;\n var AreaRidgesGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.AreaRidgesGeom;\n var ViolinGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.ViolinGeom;\n var YDotplotGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.YDotplotGeom;\n var YDotplotGeom$YStackdir = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.YDotplotGeom.YStackdir;\n var StepGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.StepGeom;\n var SegmentGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.SegmentGeom;\n var PathGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.PathGeom;\n var PointGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.PointGeom;\n var TextGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.TextGeom;\n var LabelGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.LabelGeom;\n var ImageGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.ImageGeom;\n var PieGeom = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.geom.PieGeom;\n var GuideOptions = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.assemble.GuideOptions;\n var LegendOptions = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.assemble.LegendOptions;\n var Runnable = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.function.Runnable;\n var ColorBarOptions = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.assemble.ColorBarOptions;\n var data_0 = $module$lets_plot_plot_common_portable_js_legacy.jetbrains.datalore.plot.common.data;\n var MarginSide = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.MarginSide;\n var afterOrientation_0 = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.util.afterOrientation_iip4k8$;\n var stat = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.stat;\n var util = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.util;\n var minus_1 = Kotlin.kotlin.collections.minus_uk696c$;\n var TooltipSpecification = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.tooltip.TooltipSpecification;\n var getPropertyCallableRef = Kotlin.getPropertyCallableRef;\n var data_1 = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.data;\n var Grouping = Kotlin.kotlin.collections.Grouping;\n var HashSet_init_0 = Kotlin.kotlin.collections.HashSet_init_mqih57$;\n var VarBinding = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.VarBinding;\n var LinesContentSpecification = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.tooltip.LinesContentSpecification;\n var substringAfter = Kotlin.kotlin.text.substringAfter_j4ogox$;\n var LinesContentSpecification$Companion$LineSpec = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.tooltip.LinesContentSpecification.Companion.LineSpec;\n var DataFrameValue = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.tooltip.DataFrameValue;\n var MappingValue = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.tooltip.MappingValue;\n var ConstantValue = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.tooltip.ConstantValue;\n var toList_0 = Kotlin.kotlin.collections.toList_abgq59$;\n var removeSurrounding = Kotlin.kotlin.text.removeSurrounding_90ijwr$;\n var substringBefore = Kotlin.kotlin.text.substringBefore_j4ogox$;\n var toMutableMap = Kotlin.kotlin.collections.toMutableMap_abgq59$;\n var trim = Kotlin.kotlin.text.trim_gw00vp$;\n var first = Kotlin.kotlin.collections.first_2p1efm$;\n var checkCountOverflow = Kotlin.kotlin.collections.checkCountOverflow_za3lpa$;\n var values = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.defaultTheme.values;\n var rangeTo = Kotlin.kotlin.ranges.rangeTo_38ydlf$;\n var last = Kotlin.kotlin.collections.last_2p1efm$;\n var numberToLong = Kotlin.numberToLong;\n var firstOrNull_0 = Kotlin.kotlin.collections.firstOrNull_2p1efm$;\n var dropLast = Kotlin.kotlin.collections.dropLast_8ujjk8$;\n var last_0 = Kotlin.kotlin.collections.last_us0mfu$;\n var defineInlineFunction = Kotlin.defineInlineFunction;\n var wrapFunction = Kotlin.wrapFunction;\n var toList_1 = Kotlin.kotlin.collections.toList_us0mfu$;\n var MutableList = Kotlin.kotlin.collections.MutableList;\n var PlotAssembler = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.assemble.PlotAssembler;\n var builder = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder;\n var TypedScaleMap = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.assemble.TypedScaleMap;\n var toMap = Kotlin.kotlin.collections.toMap_6hr0sd$;\n var GeomLayerBuilder = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.assemble.GeomLayerBuilder;\n var setOf = Kotlin.kotlin.collections.setOf_i5x0yv$;\n var scale = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.scale;\n var transform = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.scale.transform;\n var scale_0 = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.scale;\n var DiscreteTransform = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.DiscreteTransform;\n var GuideMapper = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.scale.GuideMapper;\n var WithGuideBreaks = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.scale.WithGuideBreaks;\n var distinct = Kotlin.kotlin.collections.distinct_7wnvza$;\n var reversed = Kotlin.kotlin.collections.reversed_7wnvza$;\n var DiscreteOnlyMapperProvider = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.scale.DiscreteOnlyMapperProvider;\n var ContinuousOnlyMapperProvider = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.scale.ContinuousOnlyMapperProvider;\n var isFinite = Kotlin.kotlin.isFinite_yrwdxr$;\n var sorted = Kotlin.kotlin.collections.sorted_exjks8$;\n var PosProvider = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.assemble.PosProvider;\n var pos = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.pos;\n var mapper = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.scale.mapper;\n var AlphaMapperProvider = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.scale.provider.AlphaMapperProvider;\n var SizeMapperProvider = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.scale.provider.SizeMapperProvider;\n var Color = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.values.Color;\n var ColorGradientMapperProvider = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.scale.provider.ColorGradientMapperProvider;\n var ColorGradient2MapperProvider = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.scale.provider.ColorGradient2MapperProvider;\n var values_0 = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.values;\n var ColorGradientnMapperProvider = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.scale.provider.ColorGradientnMapperProvider;\n var ColorHueMapperProvider = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.scale.provider.ColorHueMapperProvider;\n var GreyscaleLightnessMapperProvider = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.scale.provider.GreyscaleLightnessMapperProvider;\n var ColorBrewerMapperProvider = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.scale.provider.ColorBrewerMapperProvider;\n var ColormapMapperProvider = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.scale.provider.ColormapMapperProvider;\n var SizeAreaMapperProvider = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.scale.provider.SizeAreaMapperProvider;\n var MapperProvider = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.scale.MapperProvider;\n var ScaleProviderBuilder = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.scale.ScaleProviderBuilder;\n var StringFormat$FormatType = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.stringFormat.StringFormat.FormatType;\n var DateTimeBreaksGen = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.scale.transform.DateTimeBreaksGen;\n var TimeBreaksGen = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.scale.transform.TimeBreaksGen;\n var Orientation = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.guide.Orientation;\n var IdentityDiscreteMapperProvider = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.scale.provider.IdentityDiscreteMapperProvider;\n var ScaleMapper = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.ScaleMapper;\n var IdentityMapperProvider = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.scale.provider.IdentityMapperProvider;\n var Enum = Kotlin.kotlin.Enum;\n var throwISE = Kotlin.throwISE;\n var EnumInfoImpl_init = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.enums.EnumInfoImpl;\n var Bin2dStat = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.stat.Bin2dStat;\n var ContourStat = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.stat.ContourStat;\n var ContourfStat = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.stat.ContourfStat;\n var BoxplotStat = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.stat.BoxplotStat;\n var DotplotStat = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.stat.DotplotStat;\n var SmoothStat$Method = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.stat.SmoothStat.Method;\n var SmoothStat = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.stat.SmoothStat;\n var SmoothStat$Companion$DEF_SAMPLING_SEED = Kotlin.Long.fromInt(37);\n var DensityStat = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.stat.DensityStat;\n var DensityRidgesStat = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.stat.DensityRidgesStat;\n var YDensityStat$Scale = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.stat.YDensityStat.Scale;\n var YDensityStat = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.stat.YDensityStat;\n var AbstractDensity2dStat = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.stat.AbstractDensity2dStat;\n var Density2dfStat = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.stat.Density2dfStat;\n var Density2dStat = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.stat.Density2dStat;\n var QQStat$Distribution = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.stat.QQStat.Distribution;\n var QQStat = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.stat.QQStat;\n var QQLineStat = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.stat.QQLineStat;\n var TooltipLine_init = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.tooltip.TooltipLine_init_cpanxn$;\n var TooltipSpecification$TooltipProperties = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.tooltip.TooltipSpecification.TooltipProperties;\n var TooltipAnchor$VerticalAnchor = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.TooltipAnchor.VerticalAnchor;\n var TooltipAnchor$HorizontalAnchor = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.TooltipAnchor.HorizontalAnchor;\n var TooltipAnchor = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.interact.TooltipAnchor;\n var Function = $module$lets_plot_base_portable_js_legacy.jetbrains.datalore.base.function.Function;\n var NamedLineType = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.render.linetype.NamedLineType;\n var LineType = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.render.linetype.LineType;\n var NamedLineType$values = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.render.linetype.NamedLineType.values;\n var PointShape = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.render.point.PointShape;\n var point = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.render.point;\n var NamedShape = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.render.point.NamedShape;\n var NamedShape$values = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.render.point.NamedShape.values;\n var roundToInt = Kotlin.kotlin.math.roundToInt_yrwdxr$;\n var abs = Kotlin.kotlin.math.abs_za3lpa$;\n var LegendPosition = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.guide.LegendPosition;\n var LegendJustification = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.guide.LegendJustification;\n var LegendDirection = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.guide.LegendDirection;\n var ThemeOption = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.defaultTheme.values.ThemeOption;\n var minus_2 = Kotlin.kotlin.collections.minus_4pa84t$;\n var plus_2 = Kotlin.kotlin.collections.plus_cm8adq$;\n var ThemeValues = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.defaultTheme.values.ThemeValues;\n var ThemeFlavor = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.defaultTheme.ThemeFlavor;\n var DefaultTheme = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.defaultTheme.DefaultTheme;\n var Kind_INTERFACE = Kotlin.Kind.INTERFACE;\n var hashCode = Kotlin.hashCode;\n var copyToArray = Kotlin.kotlin.collections.copyToArray;\n var GroupingContext = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.data.GroupingContext;\n var StatInput = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.data.StatInput;\n var HashMap_init_0 = Kotlin.kotlin.collections.HashMap_init_73mtqc$;\n var kotlin_js_internal_DoubleCompanionObject = Kotlin.kotlin.js.internal.DoubleCompanionObject;\n var StatContext = $module$lets_plot_plot_base_portable_js_legacy.jetbrains.datalore.plot.base.StatContext;\n var plus_3 = Kotlin.kotlin.collections.plus_xfiyik$;\n var listOfNotNull = Kotlin.kotlin.collections.listOfNotNull_issdgt$;\n var PointSampling = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.sampling.PointSampling;\n var GroupAwareSampling = $module$lets_plot_plot_builder_portable_js_legacy.jetbrains.datalore.plot.builder.sampling.GroupAwareSampling;\n var Set = Kotlin.kotlin.collections.Set;\n var toMutableList = Kotlin.kotlin.collections.toMutableList_4c7yge$;\n var asReversed = Kotlin.kotlin.collections.asReversed_2p1efm$;\n var asIterable = Kotlin.kotlin.sequences.asIterable_veqyi0$;\n var Sequence = Kotlin.kotlin.sequences.Sequence;\n var asList = Kotlin.kotlin.collections.asList_us0mfu$;\n var asList_0 = Kotlin.kotlin.collections.asList_355ntz$;\n var toList_2 = Kotlin.kotlin.toList_tt9upe$;\n var isFinite_0 = Kotlin.kotlin.isFinite_81szk$;\n var unboxChar = Kotlin.unboxChar;\n var average = Kotlin.kotlin.collections.average_l63kqw$;\n var hashMapOf = Kotlin.kotlin.collections.hashMapOf_qfcya0$;\n var PropertyMetadata = Kotlin.PropertyMetadata;\n var String_0 = String;\n var Double = Number;\n var ReadWriteProperty = Kotlin.kotlin.properties.ReadWriteProperty;\n var Boolean_0 = Boolean;\n MonolithicCommon$PlotsBuildResult$Error.prototype = Object.create(MonolithicCommon$PlotsBuildResult.prototype);\n MonolithicCommon$PlotsBuildResult$Error.prototype.constructor = MonolithicCommon$PlotsBuildResult$Error;\n MonolithicCommon$PlotsBuildResult$Success.prototype = Object.create(MonolithicCommon$PlotsBuildResult.prototype);\n MonolithicCommon$PlotsBuildResult$Success.prototype.constructor = MonolithicCommon$PlotsBuildResult$Success;\n LineSpecConfigParser.prototype = Object.create(OptionsAccessor.prototype);\n LineSpecConfigParser.prototype.constructor = LineSpecConfigParser;\n AnnotationConfig.prototype = Object.create(LineSpecConfigParser.prototype);\n AnnotationConfig.prototype.constructor = AnnotationConfig;\n ArrowSpecConfig.prototype = Object.create(OptionsAccessor.prototype);\n ArrowSpecConfig.prototype.constructor = ArrowSpecConfig;\n BunchConfig.prototype = Object.create(OptionsAccessor.prototype);\n BunchConfig.prototype.constructor = BunchConfig;\n CoordConfig.prototype = Object.create(OptionsAccessor.prototype);\n CoordConfig.prototype.constructor = CoordConfig;\n FacetConfig.prototype = Object.create(OptionsAccessor.prototype);\n FacetConfig.prototype.constructor = FacetConfig;\n CoordinatesCollector$PointCoordinatesCollector.prototype = Object.create(CoordinatesCollector.prototype);\n CoordinatesCollector$PointCoordinatesCollector.prototype.constructor = CoordinatesCollector$PointCoordinatesCollector;\n CoordinatesCollector$PathCoordinatesCollector.prototype = Object.create(CoordinatesCollector.prototype);\n CoordinatesCollector$PathCoordinatesCollector.prototype.constructor = CoordinatesCollector$PathCoordinatesCollector;\n CoordinatesCollector$BoundaryCoordinatesCollector.prototype = Object.create(CoordinatesCollector.prototype);\n CoordinatesCollector$BoundaryCoordinatesCollector.prototype.constructor = CoordinatesCollector$BoundaryCoordinatesCollector;\n CoordinatesCollector$BboxCoordinatesCollector.prototype = Object.create(CoordinatesCollector.prototype);\n CoordinatesCollector$BboxCoordinatesCollector.prototype.constructor = CoordinatesCollector$BboxCoordinatesCollector;\n GeomProtoClientSide.prototype = Object.create(GeomProto.prototype);\n GeomProtoClientSide.prototype.constructor = GeomProtoClientSide;\n GuideConfig.prototype = Object.create(OptionsAccessor.prototype);\n GuideConfig.prototype.constructor = GuideConfig;\n GuideConfig$GuideNoneConfig.prototype = Object.create(GuideConfig.prototype);\n GuideConfig$GuideNoneConfig.prototype.constructor = GuideConfig$GuideNoneConfig;\n GuideConfig$LegendConfig.prototype = Object.create(GuideConfig.prototype);\n GuideConfig$LegendConfig.prototype.constructor = GuideConfig$LegendConfig;\n GuideConfig$ColorBarConfig.prototype = Object.create(GuideConfig.prototype);\n GuideConfig$ColorBarConfig.prototype.constructor = GuideConfig$ColorBarConfig;\n LayerConfig.prototype = Object.create(OptionsAccessor.prototype);\n LayerConfig.prototype.constructor = LayerConfig;\n PlotConfig.prototype = Object.create(OptionsAccessor.prototype);\n PlotConfig.prototype.constructor = PlotConfig;\n PlotConfigClientSide.prototype = Object.create(PlotConfig.prototype);\n PlotConfigClientSide.prototype.constructor = PlotConfigClientSide;\n ScaleConfig.prototype = Object.create(OptionsAccessor.prototype);\n ScaleConfig.prototype.constructor = ScaleConfig;\n StatKind.prototype = Object.create(Enum.prototype);\n StatKind.prototype.constructor = StatKind;\n TooltipConfig.prototype = Object.create(LineSpecConfigParser.prototype);\n TooltipConfig.prototype.constructor = TooltipConfig;\n PlotSpecTransformUtil$TargetSpec.prototype = Object.create(Enum.prototype);\n PlotSpecTransformUtil$TargetSpec.prototype.constructor = PlotSpecTransformUtil$TargetSpec;\n PlotConfigServerSide.prototype = Object.create(PlotConfig.prototype);\n PlotConfigServerSide.prototype.constructor = PlotConfigServerSide;\n CoordOptions.prototype = Object.create(Options.prototype);\n CoordOptions.prototype.constructor = CoordOptions;\n LayerOptions.prototype = Object.create(Options.prototype);\n LayerOptions.prototype.constructor = LayerOptions;\n PlotOptions$Size.prototype = Object.create(Options.prototype);\n PlotOptions$Size.prototype.constructor = PlotOptions$Size;\n PlotOptions.prototype = Object.create(Options.prototype);\n PlotOptions.prototype.constructor = PlotOptions;\n SamplingOptions.prototype = Object.create(Options.prototype);\n SamplingOptions.prototype.constructor = SamplingOptions;\n ScaleOptions.prototype = Object.create(Options.prototype);\n ScaleOptions.prototype.constructor = ScaleOptions;\n ThemeOptions$Element.prototype = Object.create(Options.prototype);\n ThemeOptions$Element.prototype.constructor = ThemeOptions$Element;\n ThemeOptions.prototype = Object.create(Options.prototype);\n ThemeOptions.prototype.constructor = ThemeOptions;\n TooltipsOptions$Format.prototype = Object.create(Options.prototype);\n TooltipsOptions$Format.prototype.constructor = TooltipsOptions$Format;\n TooltipsOptions.prototype = Object.create(Options.prototype);\n TooltipsOptions.prototype.constructor = TooltipsOptions;\n function DemoAndTest() {\n DemoAndTest_instance = this;\n }\n function DemoAndTest$createPlot$lambda(it) {\n var tmp$;\n tmp$ = it.iterator();\n while (tmp$.hasNext()) {\n var s = tmp$.next();\n println('PLOT MESSAGE: ' + s);\n }\n return Unit;\n }\n DemoAndTest.prototype.createPlot_lqxyja$ = function (plotSpec, andBuildComponent) {\n if (andBuildComponent === void 0)\n andBuildComponent = true;\n var plot = this.createPlot_0(plotSpec, DemoAndTest$createPlot$lambda);\n if (andBuildComponent) {\n plot.ensureBuilt();\n }\n return plot;\n };\n function DemoAndTest$createPlot$lambda_0(closure$computationMessagesHandler) {\n return function (messages) {\n var tmp$ = closure$computationMessagesHandler != null;\n if (tmp$) {\n tmp$ = !messages.isEmpty();\n }\n if (tmp$) {\n closure$computationMessagesHandler(messages);\n }\n return Unit;\n };\n }\n DemoAndTest.prototype.createPlot_0 = function (plotSpec, computationMessagesHandler) {\n PlotConfig$Companion_getInstance().assertPlotSpecOrErrorMessage_x7u0o8$(plotSpec);\n var plotSpec_0 = this.transformPlotSpec_0(plotSpec);\n if (PlotConfig$Companion_getInstance().isFailure_x7u0o8$(plotSpec_0)) {\n var errorMessage = PlotConfig$Companion_getInstance().getErrorMessage_x7u0o8$(plotSpec_0);\n throw IllegalArgumentException_init(errorMessage);\n }\n var config = PlotConfigClientSide$Companion_getInstance().create_vb0rb2$(plotSpec_0, DemoAndTest$createPlot$lambda_0(computationMessagesHandler));\n var assembler = PlotConfigClientSideUtil_getInstance().createPlotAssembler_6u1zvq$(config);\n return assembler.createPlot();\n };\n DemoAndTest.prototype.transformPlotSpec_0 = function (plotSpec) {\n var plotSpec_0 = plotSpec;\n plotSpec_0 = BackendSpecTransformUtil_getInstance().processTransform_2wxo1b$(plotSpec_0);\n return PlotConfigClientSide$Companion_getInstance().processTransform_2wxo1b$(plotSpec_0);\n };\n DemoAndTest.prototype.contourDemoData = function () {\n var countX = 20;\n var countY = 20;\n var mean = new DoubleVector(5.0, 5.0);\n var height = 1.0;\n var radius = 10.0;\n var slop = height / radius;\n var x = ArrayList_init();\n var y = ArrayList_init();\n var z = ArrayList_init();\n for (var row = 0; row < countY; row++) {\n for (var col = 0; col < countX; col++) {\n var dist = (new DoubleVector(col, row)).subtract_gpjtzr$(mean).length();\n var v = dist >= radius ? 0.0 : height - dist * slop;\n x.add_11rb$(col);\n y.add_11rb$(row);\n z.add_11rb$(v);\n }\n }\n var map = HashMap_init();\n map.put_xwzc9p$('x', x);\n map.put_xwzc9p$('y', y);\n map.put_xwzc9p$('z', z);\n return map;\n };\n DemoAndTest.prototype.getMap_ez016i$ = function (opts, key) {\n var tmp$;\n var map = Kotlin.isType(tmp$ = opts.get_11rb$(key), Map) ? tmp$ : null;\n return map != null ? map : emptyMap();\n };\n DemoAndTest.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'DemoAndTest',\n interfaces: []\n };\n var DemoAndTest_instance = null;\n function DemoAndTest_getInstance() {\n if (DemoAndTest_instance === null) {\n new DemoAndTest();\n }\n return DemoAndTest_instance;\n }\n function parsePlotSpec(spec) {\n var it = replace(spec, \"'\", '\"');\n var tmp$;\n return Kotlin.isType(tmp$ = json.JsonSupport.parseJson_61zpoe$(it), MutableMap) ? tmp$ : throwCCE();\n }\n function MonolithicCommon() {\n MonolithicCommon_instance = this;\n }\n MonolithicCommon.prototype.buildSvgImagesFromRawSpecs_k2v8cf$ = function (plotSpec, plotSize, svgToString, computationMessagesHandler) {\n var tmp$, tmp$_0;\n var plotSpec_0 = this.processRawSpecs_lqxyja$(plotSpec, false);\n var buildResult = this.buildPlotsFromProcessedSpecs_ovpcwh$(plotSpec_0, plotSize);\n if (buildResult.isError) {\n var errorMessage = (Kotlin.isType(tmp$ = buildResult, MonolithicCommon$PlotsBuildResult$Error) ? tmp$ : throwCCE()).error;\n throw RuntimeException_init(errorMessage);\n }\n var success = Kotlin.isType(tmp$_0 = buildResult, MonolithicCommon$PlotsBuildResult$Success) ? tmp$_0 : throwCCE();\n var $receiver = success.buildInfos;\n var destination = ArrayList_init();\n var tmp$_1;\n tmp$_1 = $receiver.iterator();\n while (tmp$_1.hasNext()) {\n var element = tmp$_1.next();\n var list = element.computationMessages;\n addAll(destination, list);\n }\n var computationMessages = destination;\n if (!computationMessages.isEmpty()) {\n computationMessagesHandler(computationMessages);\n }\n var $receiver_0 = success.buildInfos;\n var destination_0 = ArrayList_init_0(collectionSizeOrDefault($receiver_0, 10));\n var tmp$_2;\n tmp$_2 = $receiver_0.iterator();\n while (tmp$_2.hasNext()) {\n var item = tmp$_2.next();\n var tmp$_3 = destination_0.add_11rb$;\n var assembler = item.plotAssembler;\n var plot = assembler.createPlot();\n var plotContainer = new PlotContainerPortable(plot, item.size);\n plotContainer.ensureContentBuilt();\n tmp$_3.call(destination_0, plotContainer.svg);\n }\n var destination_1 = ArrayList_init_0(collectionSizeOrDefault(destination_0, 10));\n var tmp$_4;\n tmp$_4 = destination_0.iterator();\n while (tmp$_4.hasNext()) {\n var item_0 = tmp$_4.next();\n destination_1.add_11rb$(svgToString.render_5lup6a$(item_0));\n }\n return destination_1;\n };\n MonolithicCommon.prototype.buildPlotsFromProcessedSpecs_ovpcwh$ = function (plotSpec, plotSize, plotMaxWidth, plotPreferredWidth) {\n if (plotMaxWidth === void 0)\n plotMaxWidth = null;\n if (plotPreferredWidth === void 0)\n plotPreferredWidth = null;\n var tmp$;\n this.throwTestingErrors_0();\n var tmp$_0;\n if (plotSize != null) {\n var b = plotSize.x;\n var tmp$_1 = JsMath.max(0.0, b);\n var b_0 = plotSize.y;\n tmp$_0 = new DoubleVector(tmp$_1, JsMath.max(0.0, b_0));\n } else\n tmp$_0 = null;\n var plotSize_0 = tmp$_0;\n PlotConfig$Companion_getInstance().assertPlotSpecOrErrorMessage_x7u0o8$(plotSpec);\n if (PlotConfig$Companion_getInstance().isFailure_x7u0o8$(plotSpec)) {\n var errorMessage = PlotConfig$Companion_getInstance().getErrorMessage_x7u0o8$(plotSpec);\n return new MonolithicCommon$PlotsBuildResult$Error(errorMessage);\n }\n if (PlotConfig$Companion_getInstance().isPlotSpec_bkhwtg$(plotSpec))\n tmp$ = new MonolithicCommon$PlotsBuildResult$Success(listOf(this.buildSinglePlotFromProcessedSpecs_0(plotSpec, plotSize_0, plotMaxWidth, plotPreferredWidth)));\n else if (PlotConfig$Companion_getInstance().isGGBunchSpec_bkhwtg$(plotSpec))\n tmp$ = this.buildGGBunchFromProcessedSpecs_0(plotSpec, plotMaxWidth, plotPreferredWidth);\n else\n throw RuntimeException_init('Unexpected plot spec kind: ' + toString(PlotConfig$Companion_getInstance().specKind_bkhwtg$(plotSpec)));\n return tmp$;\n };\n MonolithicCommon.prototype.buildGGBunchFromProcessedSpecs_0 = function (bunchSpec, maxWidth, preferredWidth) {\n var tmp$, tmp$_0, tmp$_1, tmp$_2;\n var naturalSize = PlotSizeHelper_getInstance().plotBunchSize_x7u0o8$(bunchSpec);\n var tmp$_3;\n if (preferredWidth != null) {\n var a = presentation.Defaults.MIN_PLOT_WIDTH;\n tmp$_3 = naturalSize.mul_14dthe$(JsMath.max(a, preferredWidth) / naturalSize.x);\n } else\n tmp$_3 = null;\n var scaledSize = (tmp$ = tmp$_3) != null ? tmp$ : naturalSize;\n if (maxWidth != null && maxWidth < scaledSize.x) {\n var a_0 = presentation.Defaults.MIN_PLOT_WIDTH;\n tmp$_0 = scaledSize.mul_14dthe$(JsMath.max(a_0, maxWidth) / scaledSize.x);\n } else {\n tmp$_0 = scaledSize;\n }\n var neededSize = tmp$_0;\n var scalingCoef = neededSize.x / naturalSize.x;\n var bunchConfig = new BunchConfig(bunchSpec);\n if (bunchConfig.bunchItems.isEmpty())\n return new MonolithicCommon$PlotsBuildResult$Error('No plots in the bunch');\n var buildInfos = ArrayList_init();\n tmp$_1 = bunchConfig.bunchItems.iterator();\n while (tmp$_1.hasNext()) {\n var bunchItem = tmp$_1.next();\n var plotSpec = Kotlin.isType(tmp$_2 = bunchItem.featureSpec, MutableMap) ? tmp$_2 : throwCCE();\n var itemBuildInfoRaw = this.buildSinglePlotFromProcessedSpecs_0(plotSpec, PlotSizeHelper_getInstance().bunchItemSize_6ixfn5$(bunchItem), null, null);\n var itemBounds = new DoubleRectangle((new DoubleVector(bunchItem.x, bunchItem.y)).mul_14dthe$(scalingCoef), itemBuildInfoRaw.size.mul_14dthe$(scalingCoef));\n var itemBuildInfo = new MonolithicCommon$PlotBuildInfo(itemBuildInfoRaw.plotAssembler, itemBuildInfoRaw.processedPlotSpec, itemBounds.origin, itemBounds.dimension, itemBuildInfoRaw.computationMessages);\n buildInfos.add_11rb$(itemBuildInfo);\n }\n return new MonolithicCommon$PlotsBuildResult$Success(buildInfos);\n };\n function MonolithicCommon$buildSinglePlotFromProcessedSpecs$lambda(closure$computationMessages) {\n return function (it) {\n closure$computationMessages.addAll_brywnq$(it);\n return Unit;\n };\n }\n MonolithicCommon.prototype.buildSinglePlotFromProcessedSpecs_0 = function (plotSpec, plotSize, plotMaxWidth, plotPreferredWidth) {\n var computationMessages = ArrayList_init();\n var config = PlotConfigClientSide$Companion_getInstance().create_vb0rb2$(plotSpec, MonolithicCommon$buildSinglePlotFromProcessedSpecs$lambda(computationMessages));\n var preferredSize = PlotSizeHelper_getInstance().singlePlotSize_zbg9oi$(plotSpec, plotSize, plotMaxWidth, plotPreferredWidth, config.facets, config.containsLiveMap);\n var assembler = this.createPlotAssembler_0(config);\n return new MonolithicCommon$PlotBuildInfo(assembler, plotSpec, DoubleVector.Companion.ZERO, preferredSize, computationMessages);\n };\n MonolithicCommon.prototype.createPlotAssembler_0 = function (config) {\n return PlotConfigClientSideUtil_getInstance().createPlotAssembler_6u1zvq$(config);\n };\n MonolithicCommon.prototype.throwTestingErrors_0 = function () {\n };\n MonolithicCommon.prototype.processRawSpecs_lqxyja$ = function (plotSpec, frontendOnly) {\n var tmp$;\n PlotConfig$Companion_getInstance().assertPlotSpecOrErrorMessage_x7u0o8$(plotSpec);\n if (PlotConfig$Companion_getInstance().isFailure_x7u0o8$(plotSpec)) {\n return plotSpec;\n }\n if (frontendOnly) {\n tmp$ = plotSpec;\n } else {\n tmp$ = BackendSpecTransformUtil_getInstance().processTransform_2wxo1b$(plotSpec);\n }\n var plotSpec_0 = tmp$;\n if (PlotConfig$Companion_getInstance().isFailure_x7u0o8$(plotSpec_0)) {\n return plotSpec_0;\n }\n return PlotConfigClientSide$Companion_getInstance().processTransform_2wxo1b$(plotSpec_0);\n };\n function MonolithicCommon$PlotsBuildResult() {\n this.isError = Kotlin.isType(this, MonolithicCommon$PlotsBuildResult$Error);\n }\n function MonolithicCommon$PlotsBuildResult$Error(error) {\n MonolithicCommon$PlotsBuildResult.call(this);\n this.error = error;\n }\n MonolithicCommon$PlotsBuildResult$Error.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'Error',\n interfaces: [MonolithicCommon$PlotsBuildResult]\n };\n function MonolithicCommon$PlotsBuildResult$Success(buildInfos) {\n MonolithicCommon$PlotsBuildResult.call(this);\n this.buildInfos = buildInfos;\n }\n MonolithicCommon$PlotsBuildResult$Success.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'Success',\n interfaces: [MonolithicCommon$PlotsBuildResult]\n };\n MonolithicCommon$PlotsBuildResult.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PlotsBuildResult',\n interfaces: []\n };\n function MonolithicCommon$PlotBuildInfo(plotAssembler, processedPlotSpec, origin, size, computationMessages) {\n this.plotAssembler = plotAssembler;\n this.processedPlotSpec = processedPlotSpec;\n this.origin = origin;\n this.size = size;\n this.computationMessages = computationMessages;\n }\n MonolithicCommon$PlotBuildInfo.prototype.bounds = function () {\n return new DoubleRectangle(this.origin, this.size);\n };\n MonolithicCommon$PlotBuildInfo.$metadata$ = {\n kind: Kind_CLASS,\n simpleName: 'PlotBuildInfo',\n interfaces: []\n };\n MonolithicCommon.$metadata$ = {\n kind: Kind_OBJECT,\n simpleName: 'MonolithicCommon',\n interfaces: []\n };\n var MonolithicCommon_instance = null;\n function MonolithicCommon_getInstance() {\n if (MonolithicCommon_instance === null) {\n new MonolithicCommon();\n }\n return MonolithicCommon_instance;\n }\n function PlotHtmlExport() {\n PlotHtmlExport_instance = this;\n }\n PlotHtmlExport.prototype.buildHtmlFromRawSpecs_dmb0ma$ = function (plotSpec, scriptUrl, iFrame, plotSize) {\n if (iFrame === void 0)\n iFrame = false;\n if (plotSize === void 0)\n plotSize = null;\n var tmp$, tmp$_0;\n var configureHtml = PlotHtmlHelper_getInstance().getStaticConfigureHtml_61zpoe$(scriptUrl);\n var displayHtml = PlotHtmlHelper_getInstance().getStaticDisplayHtmlForRawSpec_xfa7ld$(plotSpec, plotSize);\n if (iFrame) {\n tmp$ = '\\n \n '),I('\n |\n |'+qy+'\n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | Lunch\n | \n | \n | \n | \n | \n | \n | \n | \n | Dinner\n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | 0.0\n | \n | \n | \n | \n | \n | \n | \n | \n | 0.5\n | \n | \n | \n | \n | \n | \n | \n | \n | 1.0\n | \n | \n | \n | \n | \n | \n | \n | \n | 1.5\n | \n | \n | \n | \n | \n | \n | \n | \n | 2.0\n | \n | \n | \n | \n | \n | \n | \n | \n | 2.5\n | \n | \n | \n | \n | \n | \n | \n | \n | 3.0\n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | count\n | \n | \n | \n | \n | \n | \n | time\n | \n | \n | \n | \n |\n '),I('\n |\n |\n |\n | \n | \n | \n | \n | \n | \n | \n | 1\n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | 0\n | \n | \n | \n | \n | \n | \n | \n | \n | 2\n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | b\n | \n | \n | \n | \n | \n | \n | a\n | \n | \n | \n | \n |\n |\n | \n | \n | \n | \n | \n | \n | \n | 1\n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | 0\n | \n | \n | \n | \n | \n | \n | \n | \n | 2\n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | b\n | \n | \n | \n | \n | \n | \n | a\n | \n | \n | \n | \n |\n |\n '),t})?i.apply(e,o):i)||(t.exports=r)},860:function(t,e,n){var i,o,r;o=[e,n(421),n(204),n(486),n(246),n(746),n(832),n(806),n(479),n(705)],void 0===(r="function"==typeof(i=function(t,e,n,i,o,r,a,s,l,u){"use strict";var c=t.$$importsForInline$$||(t.$$importsForInline$$={}),p=e.kotlin.collections.emptyList_287e2$,h=e.kotlin.collections.List,_=e.throwCCE,d=n.jetbrains.gis.geoprotocol.MapRegion,f=i.jetbrains.datalore.base.spatial.convertToGeoRectangle_i3vl8m$,m=o.jetbrains.datalore.plot.config.GeoConfig,$=e.kotlin.IllegalArgumentException_init_pdl1vj$,y=e.kotlin.collections.HashMap_init_q3lmfv$,g=e.kotlin.collections.Map,v=r.jetbrains.livemap.api.MapLocation,b=e.equals,w=i.jetbrains.datalore.base.spatial,x=i.jetbrains.datalore.base.spatial.pointsBBox_2r9fhj$,k=e.getCallableRef,C=i.jetbrains.datalore.base.spatial.makeSegments_8o5yvy$,E=e.Kind.OBJECT,S=e.kotlin.collections.Collection,T=e.kotlin.IllegalStateException_init_pdl1vj$,O=r.jetbrains.livemap.ui.CursorService,N=e.Kind.CLASS,P=e.ensureNotNull,I=a.jetbrains.datalore.plot.base.aes,A=a.jetbrains.datalore.plot.base.geom.util,R=a.jetbrains.datalore.plot.base.Aes,j=s.jetbrains.datalore.plot.builder.scale,L=i.jetbrains.datalore.base.typedGeometry.explicitVec_y7b45i$,z=i.jetbrains.datalore.base.spatial.GeoRectangle,D=i.jetbrains.datalore.base.json,M=r.jetbrains.livemap.api.GeoObject,B=i.jetbrains.datalore.base.values.Color,F=e.numberToInt,U=i.jetbrains.datalore.base.spatial.normalizeLon_14dthe$,q=i.jetbrains.datalore.base.spatial.limitLat_14dthe$,H=i.jetbrains.datalore.base.typedGeometry.Vec,G=e.kotlin.collections.collectionSizeOrDefault_ba2ldo$,K=e.kotlin.collections.ArrayList_init_ww73n8$,V=Math,Y=a.jetbrains.datalore.plot.base.geom.PieGeom,W=e.kotlin.Unit,X=e.toString,Z=a.jetbrains.datalore.plot.base.geom.PathGeom,J=e.kotlin.collections.ArrayList_init_287e2$,Q=l.jetbrains.datalore.plot.common.data,tt=a.jetbrains.datalore.plot.base.geom.SegmentGeom,et=i.jetbrains.datalore.base.geometry.DoubleVector,nt=e.kotlin.collections.listOf_i5x0yv$,it=e.kotlin.collections.toList_7wnvza$,ot=a.jetbrains.datalore.plot.base.geom.PointGeom,rt=a.jetbrains.datalore.plot.base.geom.LabelGeom,at=e.kotlin.to_ujzrz7$,st=e.kotlin.ranges.IntRange,lt=r.jetbrains.livemap.api.point_4sq48w$,ut=r.jetbrains.livemap.api.points_5t73na$,ct=i.jetbrains.datalore.base.typedGeometry.createMultiPolygon_hv912c$,pt=r.jetbrains.livemap.api.polygon_z7sk6d$,ht=r.jetbrains.livemap.api.polygons_6q4rqs$,_t=r.jetbrains.livemap.api.path_noshw0$,dt=r.jetbrains.livemap.api.paths_dvul77$,ft=r.jetbrains.livemap.api.line_us2cr2$,mt=r.jetbrains.livemap.api.vLines_t2cee4$,$t=r.jetbrains.livemap.api.hLines_t2cee4$,yt=a.jetbrains.datalore.plot.base.GeomKind,gt=r.jetbrains.livemap.api.text_od6cu8$,vt=r.jetbrains.livemap.api.texts_mbu85n$,bt=r.jetbrains.livemap.api.pie_m00jb4$,wt=r.jetbrains.livemap.api.pies_vquu0q$,xt=e.kotlin.collections.checkIndexOverflow_za3lpa$,kt=e.getPropertyCallableRef,Ct=e.kotlin.collections.first_2p1efm$,Et=s.jetbrains.datalore.plot.builder,St=e.kotlin.collections.drop_ba2ldo$,Tt=r.jetbrains.livemap.api.LiveMapBuilder,Ot=o.jetbrains.datalore.plot.config.Option.Geom,Nt=a.jetbrains.datalore.plot.base.livemap.LivemapConstants.Projection,Pt=r.jetbrains.livemap.core.projections,It=o.jetbrains.datalore.plot.config.read_wpa7aq$,At=r.jetbrains.livemap.core,Rt=r.jetbrains.livemap.LiveMapLocation,jt=o.jetbrains.datalore.plot.config.getMap_wpa7aq$,Lt=e.kotlin.collections.emptyMap_q3lmfv$,zt=r.jetbrains.livemap.config.DevParams,Dt=o.jetbrains.datalore.plot.config.Option.Geom.LiveMap,Mt=o.jetbrains.datalore.plot.config.getString_wpa7aq$,Bt=o.jetbrains.datalore.plot.config.getInt_wpa7aq$,Ft=o.jetbrains.datalore.plot.config.getBool_wpa7aq$,Ut=r.jetbrains.livemap.api.liveMapGeocoding_leryx0$,qt=r.jetbrains.livemap.api,Ht=u.jetbrains.datalore.base.async,Gt=r.jetbrains.livemap.config.LiveMapCanvasFigure,Kt=i.jetbrains.datalore.base.geometry.Rectangle_init_tjonv8$,Vt=a.jetbrains.datalore.plot.base.geom.LiveMapProvider.LiveMapData,Yt=a.jetbrains.datalore.plot.base.geom.LiveMapProvider,Wt=r.jetbrains.livemap.mapengine.basemap,Xt=e.unboxChar,Zt=e.kotlin.collections.listOf_mh5how$,Jt=e.kotlin.ranges.CharRange,Qt=n.jetbrains.gis.tileprotocol.TileService.Theme.valueOf_61zpoe$,te=r.jetbrains.livemap.api.liveMapVectorTiles_jo61jr$,ee=e.kotlin.collections.checkCountOverflow_za3lpa$,ne=e.kotlin.collections.dropLast_8ujjk8$,ie=e.kotlin.collections.last_us0mfu$,oe=o.jetbrains.datalore.plot.config.getString_euunde$,re=e.kotlin.collections.joinToString_fmv235$,ae=o.$$importsForInline$$["lets-plot-base-portable-js-legacy"].jetbrains.datalore.base.enums.EnumInfoImpl,se=(e.wrapFunction,e.kotlin.text.get_indices_gw00vp$),le=e.toBoxedChar,ue=e.kotlin.ranges.reversed_zf1xzc$,ce=e.kotlin.text.iterator_gw00vp$,pe=a.jetbrains.datalore.plot.base.interact.GeomTargetLocator,he=a.jetbrains.datalore.plot.base.interact.TipLayoutHint,_e=a.jetbrains.datalore.plot.base.interact.GeomTarget,de=a.jetbrains.datalore.plot.base.interact.GeomTargetLocator.LookupResult,fe=e.kotlin.Enum,me=e.throwISE;function $e(){ve=this,this.REGION_TYPE_0="type",this.REGION_DATA_0="data",this.REGION_TYPE_NAME_0="region_name",this.REGION_TYPE_IDS_0="region_ids",this.REGION_TYPE_COORDINATES_0="coordinates",this.REGION_TYPE_DATAFRAME_0="data_frame"}function ye(t){var e;return d.Companion.withName_61zpoe$("string"==typeof(e=t)?e:_())}function ge(t){var e;return v.Companion.create_4x05nu$(d.Companion.withName_61zpoe$("string"==typeof(e=t)?e:_()))}Pe.prototype=Object.create(Ne.prototype),Pe.prototype.constructor=Pe,Ie.prototype=Object.create(Ne.prototype),Ie.prototype.constructor=Ie,vn.prototype=Object.create(fe.prototype),vn.prototype.constructor=vn,$e.prototype.toDoubleList_0=function(t){var n,i;if(t.isEmpty())return p();t:do{var o;if(e.isType(t,S)&&t.isEmpty()){i=!0;break t}for(o=t.iterator();o.hasNext();)if("number"!=typeof o.next()){i=!1;break t}i=!0}while(0);if(i)return e.isType(n=t,h)?n:_();throw T("Can't cast to collection of numbers".toString())},$e.prototype.getWithIdList_0=function(t){var n,i=e.isType(n=t,h)?n:_();return d.Companion.withIdList_mhpeer$(i)},$e.prototype.calculateGeoRectangle_0=function(t){if(!t.isEmpty()&&0!=(t.size%2|0))throw $("Expected: location = [double lon1, double lat1, double lon2, double lat2, ... , double lonN, double latN]".toString());return f(this.calculateBoundingBox_0(this.toDoubleList_0(t)))},$e.prototype.calculateGeoRectangle_1=function(t){var n,i,o,r,a,s,l,u,c,p,d,y=m.Companion.POINT_X,v=(e.isType(d=t,g)?d:_()).containsKey_11rb$(y);if(v){var b,w=m.Companion.POINT_Y;v=(e.isType(b=t,g)?b:_()).containsKey_11rb$(w)}if(v){var x,k=m.Companion.POINT_X;i=this.toDoubleList_0(e.isType(n=(e.isType(x=t,g)?x:_()).get_11rb$(k),h)?n:_());var C,E=m.Companion.POINT_Y;return f(this.calculateBoundingBox_1(i,this.toDoubleList_0(e.isType(o=(e.isType(C=t,g)?C:_()).get_11rb$(E),h)?o:_())))}var S,T=m.Companion.RECT_XMIN,O=(e.isType(S=t,g)?S:_()).containsKey_11rb$(T);if(O){var N,P=m.Companion.RECT_YMIN;O=(e.isType(N=t,g)?N:_()).containsKey_11rb$(P)}var I=O;if(I){var A,R=m.Companion.RECT_XMAX;I=(e.isType(A=t,g)?A:_()).containsKey_11rb$(R)}var j=I;if(j){var L,z=m.Companion.RECT_YMAX;j=(e.isType(L=t,g)?L:_()).containsKey_11rb$(z)}if(j){var D,M=m.Companion.RECT_XMIN;a=this.toDoubleList_0(e.isType(r=(e.isType(D=t,g)?D:_()).get_11rb$(M),h)?r:_());var B,F=m.Companion.RECT_YMIN;l=this.toDoubleList_0(e.isType(s=(e.isType(B=t,g)?B:_()).get_11rb$(F),h)?s:_());var U,q=m.Companion.RECT_XMAX;c=this.toDoubleList_0(e.isType(u=(e.isType(U=t,g)?U:_()).get_11rb$(q),h)?u:_());var H,G=m.Companion.RECT_YMAX;return f(this.calculateBoundingBox_2(a,l,c,this.toDoubleList_0(e.isType(p=(e.isType(H=t,g)?H:_()).get_11rb$(G),h)?p:_())))}throw $("Expected: location = DataFrame with ['lon', 'lat'] or ['lonmin', 'latmin', 'lonmax', 'latmax'] columns")},$e.prototype.createMapRegion_0=function(t){var n,i;if(null==t)n=null;else{if(!e.isType(t,g))throw $("Expected: parent = [String]");var o=y(),r=this.REGION_TYPE_NAME_0;o.put_xwzc9p$(r,ye);var a=this.REGION_TYPE_IDS_0;o.put_xwzc9p$(a,(i=this,function(t){return i.getWithIdList_0(t)})),n=this.handleRegionObject_0(t,o)}return n},$e.prototype.createMapLocation_s8jyv4$=function(t){var n,i;if(null==t)n=null;else{if(!e.isType(t,g))throw $("Expected: location = [String|Array|DataFrame]");var o=y(),r=this.REGION_TYPE_NAME_0;o.put_xwzc9p$(r,ge);var a=this.REGION_TYPE_IDS_0;o.put_xwzc9p$(a,(i=this,function(t){return v.Companion.create_4x05nu$(i.getWithIdList_0(t))}));var s=this.REGION_TYPE_COORDINATES_0;o.put_xwzc9p$(s,function(t){return function(n){var i,o,r;return r=v.Companion,o=e.isType(i=n,h)?i:_(),r.create_emtjl$(t.calculateGeoRectangle_0(o))}}(this));var l=this.REGION_TYPE_DATAFRAME_0;o.put_xwzc9p$(l,function(t){return function(n){var i,o,r;return r=v.Companion,o=e.isType(i=n,g)?i:_(),r.create_emtjl$(t.calculateGeoRectangle_1(o))}}(this)),n=this.handleRegionObject_0(t,o)}return n},$e.prototype.handleRegionObject_0=function(t,n){var i,o,r,a,s=this.REGION_TYPE_0;if(null==(i=(e.isType(a=t,g)?a:_()).get_11rb$(s)))throw $("Invalid map region object");var l,u=i,c=this.REGION_DATA_0;if(null==(o=(e.isType(l=t,g)?l:_()).get_11rb$(c)))throw $("Invalid map region object");var p=o;for(r=n.entries.iterator();r.hasNext();){var h=r.next(),d=h.key,f=h.value;if(b(u,d))return f(p)}throw $("Invalid map region type: "+u.toString())},$e.prototype.calculateBoundingBox_0=function(t){return x(w.BBOX_CALCULATOR,t)},$e.prototype.calculateBoundingBox_1=function(t,e){if(t.size!==e.size)throw $("Longitude list count is not equal Latitude list count.".toString());return w.BBOX_CALCULATOR.calculateBoundingBox_qpfwx8$(C(k("get",function(t,e){return t.get_za3lpa$(e)}.bind(null,t)),k("get",function(t,e){return t.get_za3lpa$(e)}.bind(null,t)),t.size),C(k("get",function(t,e){return t.get_za3lpa$(e)}.bind(null,e)),k("get",function(t,e){return t.get_za3lpa$(e)}.bind(null,e)),t.size))},$e.prototype.calculateBoundingBox_2=function(t,e,n,i){var o=t.size;if(e.size!==o||n.size!==o||i.size!==o)throw $("Counts of 'minLongitudes', 'minLatitudes', 'maxLongitudes', 'maxLatitudes' lists are not equal.".toString());return w.BBOX_CALCULATOR.calculateBoundingBox_qpfwx8$(C(k("get",function(t,e){return t.get_za3lpa$(e)}.bind(null,t)),k("get",function(t,e){return t.get_za3lpa$(e)}.bind(null,n)),o),C(k("get",function(t,e){return t.get_za3lpa$(e)}.bind(null,e)),k("get",function(t,e){return t.get_za3lpa$(e)}.bind(null,i)),o))},$e.$metadata$={kind:E,simpleName:"ConfigUtil",interfaces:[]};var ve=null;function be(){return null===ve&&new $e,ve}function we(){this.cursorService=new O}function xe(){this.myP=null,this.myColorArray_0=p(),this.indices=null,this.valueArray=null,this.explodeArray=null,this.myLayerKind=null,this.geometry_mc6yw0$_0=null,this.point_9u0ihe$_0=null,this.flat=!1,this.animation=0,this.myArrowSpec_0=null,this.myLabelOptions_0=null,this.myPieOptions_0=null}function ke(t){var e,n;return L("number"==typeof(e=t.get_za3lpa$(0))?e:_(),"number"==typeof(n=t.get_za3lpa$(1))?n:_())}function Ce(t){var e,n,i,o;return new z("number"==typeof(e=t.get_za3lpa$(0))?e:_(),"number"==typeof(n=t.get_za3lpa$(1))?n:_(),"number"==typeof(i=t.get_za3lpa$(2))?i:_(),"number"==typeof(o=t.get_za3lpa$(3))?o:_())}function Ee(t,e,n){return n=n||Object.create(xe.prototype),xe.call(n),n.myLayerKind=e,n.myP=t,n.indices=p(),n.valueArray=p(),n.explodeArray=p(),n}function Se(t,e,n){return n=n||Object.create(xe.prototype),xe.call(n),n.myLayerKind=e,n.myP=t.aes,n.indices=t.indices,n.valueArray=t.values,n.myColorArray_0=t.colors,n.explodeArray=t.explodeValues,n}function Te(t,e){this.layerIndex_0=t,this.aesthetics_0=e}function Oe(t,e,n){this.strokeColor=t,this.strokeWidth=e,this.holeSize=n}function Ne(t){this.aesthetics=t,this.myArrowSpec_0=null,this.myAnimation_0=null,this.myFlat_0=!1}function Pe(t,e){this.$outer=t,Ne.call(this,e)}function Ie(t,e){this.$outer=t,Ne.call(this,e)}function Ae(t){return Q.SeriesUtil.allFinite_rd1tgs$(t.x(),t.y(),t.xend(),t.yend())?nt([new et(P(t.x()),P(t.y())),new et(P(t.xend()),P(t.yend()))]):p()}function Re(t,e,n){this.padding=t,this.radius=e,this.size=n}function je(t){this.myAesthetics_0=t,this.myAnimation_0=null,this.myLabelOptions_0=null}function Le(t){return L(P(t.x()),P(t.y()))}function ze(t){return Q.SeriesUtil.isFinite_yrwdxb$(t.interceptY())?L(0,P(t.interceptY())):null}function De(t){return Q.SeriesUtil.isFinite_yrwdxb$(t.interceptX())?L(P(t.interceptX()),0):null}function Me(t){return L(P(t.x()),P(t.y()))}function Be(){qe()}function Fe(){Ue=this}we.prototype.defaultSetter_o14v8n$=function(t){this.cursorService.default=t},we.prototype.pointerSetter_o14v8n$=function(t){this.cursorService.pointer=t},we.$metadata$={kind:N,simpleName:"CursorServiceConfig",interfaces:[]},Object.defineProperty(xe.prototype,"geometry",{configurable:!0,get:function(){return this.geometry_mc6yw0$_0},set:function(t){var e;if(null!=t){var n,i=k("trimLonLat",function(t,e){return t.trimLonLat_0(e)}.bind(null,this)),o=K(G(t,10));for(n=t.iterator();n.hasNext();){var r=n.next();o.add_11rb$(i(r))}e=o}else e=null;this.geometry_mc6yw0$_0=e}}),Object.defineProperty(xe.prototype,"point",{configurable:!0,get:function(){return this.point_9u0ihe$_0},set:function(t){this.point_9u0ihe$_0=null!=t?k("trimLonLat",function(t,e){return t.trimLonLat_0(e)}.bind(null,this))(t):null}}),Object.defineProperty(xe.prototype,"arrowAngle",{configurable:!0,get:function(){var t;return null!=(t=this.myArrowSpec_0)?t.angle:null}}),Object.defineProperty(xe.prototype,"arrowLength",{configurable:!0,get:function(){var t;return null!=(t=this.myArrowSpec_0)?t.length:null}}),Object.defineProperty(xe.prototype,"arrowAtEnds",{configurable:!0,get:function(){var t,e,n;return null!=(n=null!=(e=null!=(t=this.myArrowSpec_0)?t.end:null)?e.name:null)?n.toLowerCase():null}}),Object.defineProperty(xe.prototype,"arrowType",{configurable:!0,get:function(){var t,e,n;return null!=(n=null!=(e=null!=(t=this.myArrowSpec_0)?t.type:null)?e.name:null)?n.toLowerCase():null}}),Object.defineProperty(xe.prototype,"index",{configurable:!0,get:function(){return this.myP.index()}}),Object.defineProperty(xe.prototype,"flow",{configurable:!0,get:function(){return P(this.myP.flow())}}),Object.defineProperty(xe.prototype,"speed",{configurable:!0,get:function(){return P(this.myP.speed())}}),Object.defineProperty(xe.prototype,"family",{configurable:!0,get:function(){return this.myP.family()}}),Object.defineProperty(xe.prototype,"angle",{configurable:!0,get:function(){return P(this.myP.angle())}}),Object.defineProperty(xe.prototype,"shape",{configurable:!0,get:function(){return P(this.myP.shape()).code}}),Object.defineProperty(xe.prototype,"size",{configurable:!0,get:function(){return I.AestheticsUtil.textSize_l6g9mh$(this.myP)}}),Object.defineProperty(xe.prototype,"fillColor",{configurable:!0,get:function(){return this.colorWithAlpha_0(P(this.myP.fill()))}}),Object.defineProperty(xe.prototype,"label",{configurable:!0,get:function(){var t,e;return null!=(e=null!=(t=this.myP.label())?t.toString():null)?e:"n/a"}}),Object.defineProperty(xe.prototype,"lineheight",{configurable:!0,get:function(){return P(this.myP.lineheight())}}),Object.defineProperty(xe.prototype,"hjust",{configurable:!0,get:function(){switch(A.TextUtil.hAnchor_za3rmp$(this.myP.hjust()).name){case"LEFT":return 0;case"RIGHT":return 1;case"MIDDLE":return.5;default:return e.noWhenBranchMatched()}}}),Object.defineProperty(xe.prototype,"vjust",{configurable:!0,get:function(){switch(A.TextUtil.vAnchor_za3rmp$(this.myP.vjust()).name){case"TOP":return 0;case"BOTTOM":return 1;case"CENTER":return.5;default:return e.noWhenBranchMatched()}}}),Object.defineProperty(xe.prototype,"fontface",{configurable:!0,get:function(){var t=this.myP.fontface();return b(t,I.AesInitValue.get_31786j$(R.Companion.FONTFACE))?"":t}}),Object.defineProperty(xe.prototype,"lineDash",{configurable:!0,get:function(){var t=this.myP.lineType();if(t.isSolid||t.isBlank)return p();var e,n=I.AestheticsUtil.strokeWidth_l6g9mh$(this.myP),i=t.dashArray,o=K(G(i,10));for(e=i.iterator();e.hasNext();){var r=e.next();o.add_11rb$(r*n)}return o}}),Object.defineProperty(xe.prototype,"geoObject",{configurable:!0,get:function(){var t,n,i,o,r,a,s,l,u,c;if(!b(this.myP.mapId(),j.DefaultNaValue.get_31786j$(R.Companion.MAP_ID))){var p=ke,d=Ce,f=D.JsonSupport.parseJson_61zpoe$(this.myP.mapId().toString()),m="string"==typeof(t=f.get_11rb$("id"))?t:_();if(null==(o=null!=(i=e.isType(n=f.get_11rb$("lim"),h)?n:null)?d(i):null))throw T("Limit have to be provided".toString());var $=o;if(null==(s=null!=(a=e.isType(r=f.get_11rb$("pos"),h)?r:null)?d(a):null))throw T("Position have to be provided".toString());var y=s;if(null==(c=null!=(u=e.isType(l=f.get_11rb$("cen"),h)?l:null)?p(u):null))throw T("Centroid have to be provided".toString());return new M(m,c,$,y)}return null}}),Object.defineProperty(xe.prototype,"strokeColor",{configurable:!0,get:function(){var t,e;switch(this.myLayerKind.name){case"POLYGON":return P(this.myP.color());case"PIE":return null!=(e=null!=(t=this.myPieOptions_0)?t.strokeColor:null)?e:B.Companion.WHITE;default:return this.colorWithAlpha_0(P(this.myP.color()))}}}),Object.defineProperty(xe.prototype,"radius",{configurable:!0,get:function(){switch(this.myLayerKind.name){case"POLYGON":case"PATH":case"H_LINE":case"V_LINE":case"POINT":var t=P(this.myP.shape()).size_l6g9mh$(this.myP)/2;return V.ceil(t);case"PIE":return I.AesScaling.pieDiameter_l6g9mh$(this.myP)/2;case"TEXT":return 0;default:return e.noWhenBranchMatched()}}}),Object.defineProperty(xe.prototype,"strokeWidth",{configurable:!0,get:function(){var t,n;switch(this.myLayerKind.name){case"POLYGON":case"PATH":case"H_LINE":case"V_LINE":return I.AestheticsUtil.strokeWidth_l6g9mh$(this.myP);case"POINT":return 1;case"TEXT":return 0;case"PIE":return null!=(n=null!=(t=this.myPieOptions_0)?t.strokeWidth:null)?n:0;default:return e.noWhenBranchMatched()}}}),Object.defineProperty(xe.prototype,"colorArray",{configurable:!0,get:function(){var t=this.myLayerKind===Tn();if(t){var n,i=this.valueArray,o=k("equals",function(t,e){return b(t,e)}.bind(null,0));t:do{var r;if(e.isType(i,S)&&i.isEmpty()){n=!0;break t}for(r=i.iterator();r.hasNext();)if(!o(r.next())){n=!1;break t}n=!0}while(0);t=n}if(t){for(var a=this.valueArray.size,s=K(a),l=0;lp)throw $("Error parsing subdomains: wrong brackets order");var h,_=l+1|0,d=t.substring(_,p);if(0===d.length)throw $("Empty subdomains list");t:do{var f;for(f=ce(d);f.hasNext();){var m=Xt(f.next()),y=le(m),g=new Jt(97,122),v=Xt(y);if(!g.contains_mef7kx$(String.fromCharCode(v).toLowerCase().charCodeAt(0))){h=!0;break t}}h=!1}while(0);if(h)throw $("subdomain list contains non-letter symbols");var b,w=t.substring(0,l),x=p+1|0,k=t.length,C=t.substring(x,k),E=K(d.length);for(b=ce(d);b.hasNext();){var S=Xt(b.next()),T=E.add_11rb$,O=le(S);T.call(E,w+String.fromCharCode(O)+C)}return E}rn.prototype.injectLiveMapProvider_p2x1s5$=function(t,n,i){var o;for(o=t.iterator();o.hasNext();){var r,a=o.next(),s=kt("isLiveMap",1,(function(t){return t.isLiveMap}));t:do{var l;if(e.isType(a,S)&&a.isEmpty()){r=!1;break t}for(l=a.iterator();l.hasNext();)if(s(l.next())){r=!0;break t}r=!1}while(0);if(r){var u,c=kt("isLiveMap",1,(function(t){return t.isLiveMap}));t:do{var p;if(e.isType(a,S)&&a.isEmpty()){u=0;break t}var h=0;for(p=a.iterator();p.hasNext();)c(p.next())&&ee(h=h+1|0);u=h}while(0);if(1!==u)throw $("Failed requirement.".toString());if(!Ct(a).isLiveMap)throw $("Failed requirement.".toString());var _,d=Ct(a),f=K(G(a,10));for(_=a.iterator();_.hasNext();){var m=_.next();f.add_11rb$(Et.LayerRendererUtil.createLayerRendererData_sqg2xh$(m))}d.setLiveMapProvider_kld0fp$(new an(f,n,i.cursorService))}}},an.prototype.createLiveMap_wthzt5$=function(t){var n,i,o,r,a,s,l,u,c,p,h,_,d,f,m,g=St(this.letsPlotLayers_0,1),v=new Tt;v.size=t.dimension;var b,w,x=this.myLiveMapOptions_0,C=[Ot.LiveMap.PROJECTION],E=ne(C,1),S=ie(C);t:do{var O;if(null==(O=oe(x,E,S))){b=null;break t}var N=O,P=new ae(Nt.values()),I=P.safeValueOf_pdl1vj$(N);if(null==I){var j="Unknown value '"+N+"'. Expected: "+re(P.originalNames,"|"," [","]",void 0,void 0,on);throw $(j.toString())}b=I}while(0);switch((null!=(n=b)?n:Nt.EPSG3857).name){case"EPSG3857":i=Pt.Projections.mercator();break;case"EPSG4326":i=Pt.Projections.geographic();break;case"AZIMUTHAL":i=Pt.Projections.azimuthalEqualArea();break;case"CONIC":i=Pt.Projections.conicEqualArea();break;default:i=e.noWhenBranchMatched()}if(v.projection=i,v.mapLocation=be().createMapLocation_s8jyv4$(It(this.myLiveMapOptions_0,[Ot.LiveMap.LOCATION])),v.mapLocationConsumer=sn,v.devParams=new zt(null!=(o=jt(this.myLiveMapOptions_0,[Ot.LiveMap.DEV_PARAMS]))?o:Lt()),v.cursorService=this.cursor_0,v.attribution=Mt(this.myLiveMapOptions_0,[Ot.LiveMap.TILES,Dt.Tile.ATTRIBUTION]),v.minZoom=null!=(r=Bt(this.myLiveMapOptions_0,[Ot.LiveMap.TILES,Dt.Tile.MIN_ZOOM]))?r:v.minZoom,v.maxZoom=null!=(a=Bt(this.myLiveMapOptions_0,[Ot.LiveMap.TILES,Dt.Tile.MAX_ZOOM]))?a:v.maxZoom,v.zoom=Bt(this.myLiveMapOptions_0,[Ot.LiveMap.ZOOM]),v.showCoordPickTools=null!=(s=Ft(this.myLiveMapOptions_0,[Ot.LiveMap.SHOW_COORD_PICK_TOOLS]))&&s,v.geocodingService=null!=(c=null!=(u=null!=(l=jt(this.myLiveMapOptions_0,[Ot.LiveMap.GEOCODING]))?Mt(l,["url"]):null)?Ut((w=u,function(t){return t.url=w,W})):null)?c:qt.Services.bogusGeocodingService(),null==(p=jt(this.myLiveMapOptions_0,[Ot.LiveMap.TILES])))throw T("Tiles must be condigured".toString());h=p,_=v.devParams.isSet_1a54na$(zt.Companion.DEBUG_TILES),d=v.devParams.read_zgynif$(zt.Companion.COMPUTATION_PROJECTION_QUANT),v.tileSystemProvider=yn().createTileSystemProvider_0(h,_,d),v.layers=nn().convert_6enlh1$(g,null!=(f=Bt(this.myLiveMapOptions_0,[Ot.LiveMap.DATA_SIZE_ZOOMIN]))?f:0,null!=(m=Bt(this.myLiveMapOptions_0,[Ot.LiveMap.CONST_SIZE_ZOOMIN]))?m:-1);var L,z,D=v,M=y(),B=y(),U=0;for(L=g.iterator();L.hasNext();){var q,H=L.next(),G=xt((U=(z=U)+1|0,z)),K=A.HintColorUtil.createColorMarkerMapper_hpvnyv$(H.geomKind,H.mappedAes.contains_11rb$(R.Companion.FILL),H.mappedAes.contains_11rb$(R.Companion.COLOR));for(B.put_xwzc9p$(G,ln(K,H)),q=H.aesthetics.dataPoints().iterator();q.hasNext();){var V=q.next(),Y=at(G,V.index()),X=H.contextualMapping;M.put_xwzc9p$(Y,X)}}var Z=D.build(),J=k("constant",function(t,e){return t.constant_mh5how$(e)}.bind(null,Ht.Asyncs))(Z),Q=new Gt(J);return Q.setBounds_vfns7u$(Kt(F(t.origin.x),F(t.origin.y),F(t.dimension.x),F(t.dimension.y))),new Vt(Q,new gn(J,M,B))},an.$metadata$={kind:N,simpleName:"MyLiveMapProvider",interfaces:[Yt]},rn.prototype.createTileSystemProvider_0=function(t,n,i){var o;if(n)return Wt.Tilesets.chessboard_a87jzg$();var r,a,s=un,l=Dt.Tile.KIND;switch((e.isType(r=t,g)?r:_()).get_11rb$(l)){case"chessboard":o=Wt.Tilesets.chessboard_a87jzg$();break;case"solid":o=Wt.Tilesets.solid_98b62m$(B.Companion.parseHex_61zpoe$(P(Mt(t,[Dt.Tile.FILL_COLOR]))));break;case"raster_zxy":var u=s(P(Mt(t,[Dt.Tile.URL])));o=k("raster",function(t,e){return t.raster_mhpeer$(e)}.bind(null,Wt.Tilesets))(u);break;case"vector_lets_plot":o=Wt.Tilesets.letsPlot_e94j16$(te((a=t,function(t){var e,n;return null!=(e=Mt(a,[Dt.Tile.URL]))&&(t.url=e),null!=(n=Mt(a,[Dt.Tile.THEME]))&&(t.theme=Qt(n.toUpperCase())),W})),i);break;default:throw $("Tile provider is not set.")}return o},rn.$metadata$={kind:E,simpleName:"LiveMapProvider",interfaces:[]};var cn,pn,hn,_n,dn,fn,mn,$n=null;function yn(){return null===$n&&new rn,$n}function gn(t,e,n){var i;this.myTargetSource_0=e,this.colorsMap_0=n,this.myLiveMap_0=null,t.map_2o04qz$((i=this,function(t){return i.myLiveMap_0=t,W}))}function vn(t,e){fe.call(this),this.name$=t,this.ordinal$=e}function bn(){bn=function(){},cn=new vn("POINT",0),pn=new vn("POLYGON",1),hn=new vn("PATH",2),_n=new vn("H_LINE",3),dn=new vn("V_LINE",4),fn=new vn("TEXT",5),mn=new vn("PIE",6)}function wn(){return bn(),cn}function xn(){return bn(),pn}function kn(){return bn(),hn}function Cn(){return bn(),_n}function En(){return bn(),dn}function Sn(){return bn(),fn}function Tn(){return bn(),mn}gn.prototype.search_gpjtzr$=function(t){var e,n,i;if(null!=(n=null!=(e=this.myLiveMap_0)?e.searchResult():null)){var o,r,a,s,l,u,c;if(o=n.index,s=null!=(a=null!=(r=this.colorsMap_0.get_11rb$(n.layerIndex))?r(n.index):null)?a:p(),l=Zt(new _e(o,he.Companion.cursorTooltip_un7elx$(t,void 0,void 0,s),Lt())),u=yt.LIVE_MAP,null==(c=this.myTargetSource_0.get_11rb$(at(n.layerIndex,n.index))))throw T("Can't find target.".toString());i=new de(l,0,u,c,!1)}else i=null;return i},gn.$metadata$={kind:N,simpleName:"LiveMapTargetLocator",interfaces:[pe]},vn.$metadata$={kind:N,simpleName:"MapLayerKind",interfaces:[fe]},vn.values=function(){return[wn(),xn(),kn(),Cn(),En(),Sn(),Tn()]},vn.valueOf_61zpoe$=function(t){switch(t){case"POINT":return wn();case"POLYGON":return xn();case"PATH":return kn();case"H_LINE":return Cn();case"V_LINE":return En();case"TEXT":return Sn();case"PIE":return Tn();default:me("No enum constant jetbrains.datalore.plot.livemap.MapLayerKind."+t)}};var On=t.jetbrains||(t.jetbrains={}),Nn=On.datalore||(On.datalore={}),Pn=Nn.plot||(Nn.plot={}),In=Pn.livemap||(Pn.livemap={});return Object.defineProperty(In,"ConfigUtil",{get:be}),In.CursorServiceConfig=we,In.DataPointLiveMapAesthetics_init_76osgz$=Ee,In.DataPointLiveMapAesthetics_init_4iukp2$=Se,In.DataPointLiveMapAesthetics=xe,Te.PieOptions=Oe,Te.LabelOptions=Re,Object.defineProperty(Be,"Companion",{get:qe}),Be.MultiDataPoint=Ge,Te.MultiDataPointHelper=Be,In.DataPointsConverter=Te,Object.defineProperty(In,"LayerConverter",{get:nn}),c["lets-plot-plot-config-portable-js-legacy"]=o,Object.defineProperty(In,"LiveMapProvider",{get:yn}),In.LiveMapTargetLocator=gn,Object.defineProperty(vn,"POINT",{get:wn}),Object.defineProperty(vn,"POLYGON",{get:xn}),Object.defineProperty(vn,"PATH",{get:kn}),Object.defineProperty(vn,"H_LINE",{get:Cn}),Object.defineProperty(vn,"V_LINE",{get:En}),Object.defineProperty(vn,"TEXT",{get:Sn}),Object.defineProperty(vn,"PIE",{get:Tn}),In.MapLayerKind=vn,t})?i.apply(e,o):i)||(t.exports=r)},96:function(t,e,n){var i,o,r;o=[e,n(421),n(486),n(705),n(322)],void 0===(r="function"==typeof(i=function(t,e,n,i,o){"use strict";var r=e.Kind.INTERFACE,a=e.Kind.CLASS,s=e.Kind.OBJECT,l=n.jetbrains.datalore.base.event.MouseEventSource,u=e.ensureNotNull,c=n.jetbrains.datalore.base.registration.Registration,p=n.jetbrains.datalore.base.registration.Disposable,h=e.kotlin.Enum,_=e.throwISE,d=e.kotlin.text.toDouble_pdl1vz$,f=e.kotlin.text.Regex_init_61zpoe$,m=e.kotlin.text.RegexOption,$=e.kotlin.text.Regex_init_sb3q2$,y=e.throwCCE,g=e.kotlin.text.trim_gw00vp$,v=e.Long.ZERO,b=i.jetbrains.datalore.base.async.ThreadSafeAsync,w=e.kotlin.Unit,x=n.jetbrains.datalore.base.observable.event.Listeners,k=n.jetbrains.datalore.base.observable.event.ListenerCaller,C=e.kotlin.collections.HashMap_init_q3lmfv$,E=n.jetbrains.datalore.base.geometry.DoubleRectangle_init_6y0v78$,S=n.jetbrains.datalore.base.values.SomeFig,T=(e.kotlin.collections.ArrayList_init_287e2$,e.equals),O=(e.unboxChar,e.kotlin.text.StringBuilder,e.kotlin.IndexOutOfBoundsException,n.jetbrains.datalore.base.geometry.DoubleVector,e.kotlin.collections.ArrayList_init_ww73n8$,o.jetbrains.datalore.vis.svg.SvgTransform,o.jetbrains.datalore.vis.svg.SvgPathData.Action.values,e.kotlin.collections.emptyList_287e2$,e.kotlin.math,i.jetbrains.datalore.base.async),N=i.jetbrains.datalore.base.js.dom.get_context2d_ng27xv$,P=i.jetbrains.datalore.base.js.css.setWidth_o105z1$,I=i.jetbrains.datalore.base.js.css.setHeight_o105z1$,A=e.numberToInt,R=Math,j=n.jetbrains.datalore.base.observable.event.handler_7qq44f$,L=i.jetbrains.datalore.base.js.css.enumerables.CssPosition,z=i.jetbrains.datalore.base.js.css.setPosition_h2yxxn$,D=i.jetbrains.datalore.base.async.SimpleAsync,M=e.getCallableRef,B=n.jetbrains.datalore.base.geometry.Vector,F=i.jetbrains.datalore.base.js.dom.DomEventType,U=i.jetbrains.datalore.base.js.dom.DomEventListener,q=i.jetbrains.datalore.base.event.dom,H=n.jetbrains.datalore.base.event.MouseEvent,G=e.getKClass,K=n.jetbrains.datalore.base.event.MouseEventSpec,V=e.kotlin.IllegalStateException_init_pdl1vj$,Y=e.kotlin.collections.toTypedArray_bvy38s$;function W(){}function X(){}function Z(){et()}function J(){tt=this}function Q(t){this.closure$predicate=t}Tt.prototype=Object.create(h.prototype),Tt.prototype.constructor=Tt,At.prototype=Object.create(h.prototype),At.prototype.constructor=At,Dt.prototype=Object.create(h.prototype),Dt.prototype.constructor=Dt,Ht.prototype=Object.create(h.prototype),Ht.prototype.constructor=Ht,Xt.prototype=Object.create(h.prototype),Xt.prototype.constructor=Xt,te.prototype=Object.create(h.prototype),te.prototype.constructor=te,Ce.prototype=Object.create(ve.prototype),Ce.prototype.constructor=Ce,Pe.prototype=Object.create(ke.prototype),Pe.prototype.constructor=Pe,Ae.prototype=Object.create($e.prototype),Ae.prototype.constructor=Ae,X.$metadata$={kind:r,simpleName:"AnimationTimer",interfaces:[]},Q.prototype.onEvent_s8cxhz$=function(t){return this.closure$predicate(t)},Q.$metadata$={kind:a,interfaces:[Z]},J.prototype.toHandler_qm21m0$=function(t){return new Q(t)},J.$metadata$={kind:s,simpleName:"Companion",interfaces:[]};var tt=null;function et(){return null===tt&&new J,tt}function nt(){}function it(){}function ot(){}function rt(){Ct=this}function at(t,e){this.closure$renderer=t,this.closure$reg=e}function st(t){this.closure$animationTimer=t}Z.$metadata$={kind:r,simpleName:"AnimationEventHandler",interfaces:[]},W.$metadata$={kind:r,simpleName:"AnimationProvider",interfaces:[]},it.$metadata$={kind:r,simpleName:"Snapshot",interfaces:[]},nt.$metadata$={kind:r,simpleName:"Canvas",interfaces:[]},ot.$metadata$={kind:r,simpleName:"CanvasControl",interfaces:[de,l,Et,W]},at.prototype.onEvent_s8cxhz$=function(t){return this.closure$renderer(),u(this.closure$reg[0]).dispose(),!0},at.$metadata$={kind:a,interfaces:[Z]},rt.prototype.drawLater_pfyfsw$=function(t,e){var n=[null];n[0]=this.setAnimationHandler_1ixrg0$(t,new at(e,n))},st.prototype.dispose=function(){this.closure$animationTimer.stop()},st.$metadata$={kind:a,interfaces:[p]},rt.prototype.setAnimationHandler_1ixrg0$=function(t,e){var n=t.createAnimationTimer_ckdfex$(e);return n.start(),c.Companion.from_gg3y3y$(new st(n))},rt.$metadata$={kind:s,simpleName:"CanvasControlUtil",interfaces:[]};var lt,ut,ct,pt,ht,_t,dt,ft,mt,$t,yt,gt,vt,bt,wt,xt,kt,Ct=null;function Et(){}function St(){}function Tt(t,e){h.call(this),this.name$=t,this.ordinal$=e}function Ot(){Ot=function(){},lt=new Tt("BEVEL",0),ut=new Tt("MITER",1),ct=new Tt("ROUND",2)}function Nt(){return Ot(),lt}function Pt(){return Ot(),ut}function It(){return Ot(),ct}function At(t,e){h.call(this),this.name$=t,this.ordinal$=e}function Rt(){Rt=function(){},pt=new At("BUTT",0),ht=new At("ROUND",1),_t=new At("SQUARE",2)}function jt(){return Rt(),pt}function Lt(){return Rt(),ht}function zt(){return Rt(),_t}function Dt(t,e){h.call(this),this.name$=t,this.ordinal$=e}function Mt(){Mt=function(){},dt=new Dt("ALPHABETIC",0),ft=new Dt("BOTTOM",1),mt=new Dt("MIDDLE",2),$t=new Dt("TOP",3)}function Bt(){return Mt(),dt}function Ft(){return Mt(),ft}function Ut(){return Mt(),mt}function qt(){return Mt(),$t}function Ht(t,e){h.call(this),this.name$=t,this.ordinal$=e}function Gt(){Gt=function(){},yt=new Ht("CENTER",0),gt=new Ht("END",1),vt=new Ht("START",2)}function Kt(){return Gt(),yt}function Vt(){return Gt(),gt}function Yt(){return Gt(),vt}function Wt(t,e,n,i){ae(),void 0===t&&(t=Jt()),void 0===e&&(e=ne()),void 0===n&&(n=ae().DEFAULT_SIZE),void 0===i&&(i=ae().DEFAULT_FAMILY),this.fontStyle=t,this.fontWeight=e,this.fontSize=n,this.fontFamily=i}function Xt(t,e){h.call(this),this.name$=t,this.ordinal$=e}function Zt(){Zt=function(){},bt=new Xt("NORMAL",0),wt=new Xt("ITALIC",1)}function Jt(){return Zt(),bt}function Qt(){return Zt(),wt}function te(t,e){h.call(this),this.name$=t,this.ordinal$=e}function ee(){ee=function(){},xt=new te("NORMAL",0),kt=new te("BOLD",1)}function ne(){return ee(),xt}function ie(){return ee(),kt}function oe(){re=this,this.DEFAULT_SIZE=10,this.DEFAULT_FAMILY="serif"}Et.$metadata$={kind:r,simpleName:"CanvasProvider",interfaces:[]},St.prototype.arc_6p3vsx$=function(t,e,n,i,o,r,a){void 0===r&&(r=!1),a?a(t,e,n,i,o,r):this.arc_6p3vsx$$default(t,e,n,i,o,r)},Tt.$metadata$={kind:a,simpleName:"LineJoin",interfaces:[h]},Tt.values=function(){return[Nt(),Pt(),It()]},Tt.valueOf_61zpoe$=function(t){switch(t){case"BEVEL":return Nt();case"MITER":return Pt();case"ROUND":return It();default:_("No enum constant jetbrains.datalore.vis.canvas.Context2d.LineJoin."+t)}},At.$metadata$={kind:a,simpleName:"LineCap",interfaces:[h]},At.values=function(){return[jt(),Lt(),zt()]},At.valueOf_61zpoe$=function(t){switch(t){case"BUTT":return jt();case"ROUND":return Lt();case"SQUARE":return zt();default:_("No enum constant jetbrains.datalore.vis.canvas.Context2d.LineCap."+t)}},Dt.$metadata$={kind:a,simpleName:"TextBaseline",interfaces:[h]},Dt.values=function(){return[Bt(),Ft(),Ut(),qt()]},Dt.valueOf_61zpoe$=function(t){switch(t){case"ALPHABETIC":return Bt();case"BOTTOM":return Ft();case"MIDDLE":return Ut();case"TOP":return qt();default:_("No enum constant jetbrains.datalore.vis.canvas.Context2d.TextBaseline."+t)}},Ht.$metadata$={kind:a,simpleName:"TextAlign",interfaces:[h]},Ht.values=function(){return[Kt(),Vt(),Yt()]},Ht.valueOf_61zpoe$=function(t){switch(t){case"CENTER":return Kt();case"END":return Vt();case"START":return Yt();default:_("No enum constant jetbrains.datalore.vis.canvas.Context2d.TextAlign."+t)}},Xt.$metadata$={kind:a,simpleName:"FontStyle",interfaces:[h]},Xt.values=function(){return[Jt(),Qt()]},Xt.valueOf_61zpoe$=function(t){switch(t){case"NORMAL":return Jt();case"ITALIC":return Qt();default:_("No enum constant jetbrains.datalore.vis.canvas.Context2d.Font.FontStyle."+t)}},te.$metadata$={kind:a,simpleName:"FontWeight",interfaces:[h]},te.values=function(){return[ne(),ie()]},te.valueOf_61zpoe$=function(t){switch(t){case"NORMAL":return ne();case"BOLD":return ie();default:_("No enum constant jetbrains.datalore.vis.canvas.Context2d.Font.FontWeight."+t)}},oe.$metadata$={kind:s,simpleName:"Companion",interfaces:[]};var re=null;function ae(){return null===re&&new oe,re}function se(t){ce(),this.myMatchResult_0=t}function le(){ue=this,this.FONT_SCALABLE_VALUES_0=f("((\\d+\\.?\\d*)px(?:/(\\d+\\.?\\d*)px)?) ?([a-zA-Z -]+)?"),this.SIZE_STRING_0=1,this.FONT_SIZE_0=2,this.LINE_HEIGHT_0=3,this.FONT_FAMILY_0=4}Wt.$metadata$={kind:a,simpleName:"Font",interfaces:[]},Wt.prototype.component1=function(){return this.fontStyle},Wt.prototype.component2=function(){return this.fontWeight},Wt.prototype.component3=function(){return this.fontSize},Wt.prototype.component4=function(){return this.fontFamily},Wt.prototype.copy_edneyn$=function(t,e,n,i){return new Wt(void 0===t?this.fontStyle:t,void 0===e?this.fontWeight:e,void 0===n?this.fontSize:n,void 0===i?this.fontFamily:i)},Wt.prototype.toString=function(){return"Font(fontStyle="+e.toString(this.fontStyle)+", fontWeight="+e.toString(this.fontWeight)+", fontSize="+e.toString(this.fontSize)+", fontFamily="+e.toString(this.fontFamily)+")"},Wt.prototype.hashCode=function(){var t=0;return 31*(t=31*(t=31*(t=31*t+e.hashCode(this.fontStyle)|0)+e.hashCode(this.fontWeight)|0)+e.hashCode(this.fontSize)|0)+e.hashCode(this.fontFamily)|0},Wt.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.fontStyle,t.fontStyle)&&e.equals(this.fontWeight,t.fontWeight)&&e.equals(this.fontSize,t.fontSize)&&e.equals(this.fontFamily,t.fontFamily)},St.$metadata$={kind:r,simpleName:"Context2d",interfaces:[]},Object.defineProperty(se.prototype,"fontFamily",{configurable:!0,get:function(){return this.getString_0(4)}}),Object.defineProperty(se.prototype,"sizeString",{configurable:!0,get:function(){return this.getString_0(1)}}),Object.defineProperty(se.prototype,"fontSize",{configurable:!0,get:function(){return this.getDouble_0(2)}}),Object.defineProperty(se.prototype,"lineHeight",{configurable:!0,get:function(){return this.getDouble_0(3)}}),se.prototype.getString_0=function(t){return this.myMatchResult_0.groupValues.get_za3lpa$(t)},se.prototype.getDouble_0=function(t){var e=this.getString_0(t);return 0===e.length?null:d(e)},le.prototype.create_61zpoe$=function(t){var e=this.FONT_SCALABLE_VALUES_0.find_905azu$(t);return null==e?null:new se(e)},le.$metadata$={kind:s,simpleName:"Companion",interfaces:[]};var ue=null;function ce(){return null===ue&&new le,ue}function pe(){he=this,this.FONT_ATTRIBUTE_0=f("font:(.+);"),this.FONT_0=1}se.$metadata$={kind:a,simpleName:"CssFontParser",interfaces:[]},pe.prototype.extractFontStyle_pdl1vz$=function(t){return $("italic",m.IGNORE_CASE).containsMatchIn_6bul2c$(t)?Qt():Jt()},pe.prototype.extractFontWeight_pdl1vz$=function(t){return $("600|700|800|900|bold",m.IGNORE_CASE).containsMatchIn_6bul2c$(t)?ie():ne()},pe.prototype.extractStyleFont_pdl1vj$=function(t){var n,i;if(null==t)return null;var o,r=this.FONT_ATTRIBUTE_0.find_905azu$(t);return null!=(i=null!=(n=null!=r?r.groupValues:null)?n.get_za3lpa$(1):null)?g(e.isCharSequence(o=i)?o:y()).toString():null},pe.prototype.scaleFont_p7lm8j$=function(t,e){var n,i;if(null==(n=ce().create_61zpoe$(t)))return t;var o=n;if(null==(i=o.sizeString))return t;var r=i,a=this.scaleFontValue_0(o.fontSize,e),s=o.lineHeight,l=this.scaleFontValue_0(s,e);l.length>0&&(a=a+"/"+l);var u=a;return f(r).replaceFirst_x2uqeu$(t,u)},pe.prototype.scaleFontValue_0=function(t,e){return null==t?"":(t*e).toString()+"px"},pe.$metadata$={kind:s,simpleName:"CssStyleUtil",interfaces:[]};var he=null;function _e(){this.myLastTick_0=v,this.myDt_0=v}function de(){}function fe(t,e){return function(n){return e.schedule_klfg04$(function(t,e){return function(){return t.success_11rb$(e),w}}(t,n)),w}}function me(t,e){return function(n){return e.schedule_klfg04$(function(t,e){return function(){return t.failure_tcv7n7$(e),w}}(t,n)),w}}function $e(t){this.myEventHandlers_51nth5$_0=C()}function ye(t,e,n){this.closure$addReg=t,this.this$EventPeer=e,this.closure$eventSpec=n}function ge(t){this.closure$event=t}function ve(t,e,n){this.size_mf5u5r$_0=e,this.context2d_imt5ib$_0=1===n?t:new be(t,n)}function be(t,e){this.ctx_0=t,this.myScale_0=e}function we(t){this.myCanvasControl_0=t,this.canvas=null,this.canvas=this.myCanvasControl_0.createCanvas_119tl4$(this.myCanvasControl_0.size),this.myCanvasControl_0.addChild_eqkm0m$(this.canvas)}function xe(){}function ke(){this.myHandle_0=null,this.myIsStarted_0=!1,this.myIsStarted_0=!1}function Ce(t,n,i){var o;Oe(),ve.call(this,new Re(e.isType(o=t.getContext("2d"),CanvasRenderingContext2D)?o:y()),n,i),this.canvasElement=t,this.pixelRatio_0=i}function Ee(t,e,n){this.canvasElement=t,this.size_0=e,this.pixelRatio_0=n}function Se(){Te=this,this.DEVICE_PIXEL_RATIO=window.devicePixelRatio}_e.prototype.tick_s8cxhz$=function(t){return this.myLastTick_0.toNumber()>0&&(this.myDt_0=t.subtract(this.myLastTick_0)),this.myLastTick_0=t,this.myDt_0},_e.prototype.dt=function(){return this.myDt_0},_e.$metadata$={kind:a,simpleName:"DeltaTime",interfaces:[]},de.$metadata$={kind:r,simpleName:"Dispatcher",interfaces:[]},ye.prototype.dispose=function(){this.closure$addReg.remove(),u(this.this$EventPeer.myEventHandlers_51nth5$_0.get_11rb$(this.closure$eventSpec)).isEmpty&&(this.this$EventPeer.myEventHandlers_51nth5$_0.remove_11rb$(this.closure$eventSpec),this.this$EventPeer.onSpecRemoved_1gkqfp$(this.closure$eventSpec))},ye.$metadata$={kind:a,interfaces:[p]},$e.prototype.addEventHandler_b14a3c$=function(t,e){if(!this.myEventHandlers_51nth5$_0.containsKey_11rb$(t)){var n=this.myEventHandlers_51nth5$_0,i=new x;n.put_xwzc9p$(t,i),this.onSpecAdded_1gkqfp$(t)}var o=u(this.myEventHandlers_51nth5$_0.get_11rb$(t)).add_11rb$(e);return c.Companion.from_gg3y3y$(new ye(o,this,t))},ge.prototype.call_11rb$=function(t){t.onEvent_11rb$(this.closure$event)},ge.$metadata$={kind:a,interfaces:[k]},$e.prototype.dispatch_b6y3vz$=function(t,e){var n;null!=(n=this.myEventHandlers_51nth5$_0.get_11rb$(t))&&n.fire_kucmxw$(new ge(e))},$e.$metadata$={kind:a,simpleName:"EventPeer",interfaces:[]},Object.defineProperty(ve.prototype,"size",{get:function(){return this.size_mf5u5r$_0}}),Object.defineProperty(ve.prototype,"context2d",{configurable:!0,get:function(){return this.context2d_imt5ib$_0}}),ve.$metadata$={kind:a,simpleName:"ScaledCanvas",interfaces:[nt]},be.prototype.scaled_0=function(t){return this.myScale_0*t},be.prototype.descaled_0=function(t){return t/this.myScale_0},be.prototype.scaled_1=function(t){if(1===this.myScale_0)return t;for(var e=new Float64Array(t.length),n=0;n!==t.length;++n)e[n]=this.scaled_0(t[n]);return e},be.prototype.scaled_2=function(t){return t.copy_edneyn$(void 0,void 0,this.scaled_0(t.fontSize))},be.prototype.drawImage_1j7zd4$=function(t){this.drawImage_xo47pw$(t,0,0)},be.prototype.drawImage_xo47pw$=function(t,e,n){this.ctx_0.drawImage_xo47pw$(t,this.scaled_0(e),this.scaled_0(n))},be.prototype.drawImage_nks7bk$=function(t,e,n,i,o){this.ctx_0.drawImage_nks7bk$(t,this.scaled_0(e),this.scaled_0(n),this.scaled_0(i),this.scaled_0(o))},be.prototype.drawImage_urnjjc$=function(t,e,n,i,o,r,a,s,l){this.ctx_0.drawImage_urnjjc$(t,this.scaled_0(e),this.scaled_0(n),this.scaled_0(i),this.scaled_0(o),this.scaled_0(r),this.scaled_0(a),this.scaled_0(s),this.scaled_0(l))},be.prototype.beginPath=function(){this.ctx_0.beginPath()},be.prototype.closePath=function(){this.ctx_0.closePath()},be.prototype.stroke=function(){this.ctx_0.stroke()},be.prototype.fill=function(){this.ctx_0.fill()},be.prototype.fillRect_6y0v78$=function(t,e,n,i){this.ctx_0.fillRect_6y0v78$(this.scaled_0(t),this.scaled_0(e),this.scaled_0(n),this.scaled_0(i))},be.prototype.moveTo_lu1900$=function(t,e){this.ctx_0.moveTo_lu1900$(this.scaled_0(t),this.scaled_0(e))},be.prototype.lineTo_lu1900$=function(t,e){this.ctx_0.lineTo_lu1900$(this.scaled_0(t),this.scaled_0(e))},be.prototype.arc_6p3vsx$$default=function(t,e,n,i,o,r){this.ctx_0.arc_6p3vsx$(this.scaled_0(t),this.scaled_0(e),this.scaled_0(n),i,o,r)},be.prototype.save=function(){this.ctx_0.save()},be.prototype.restore=function(){this.ctx_0.restore()},be.prototype.setFillStyle_2160e9$=function(t){this.ctx_0.setFillStyle_2160e9$(t)},be.prototype.setStrokeStyle_2160e9$=function(t){this.ctx_0.setStrokeStyle_2160e9$(t)},be.prototype.setGlobalAlpha_14dthe$=function(t){this.ctx_0.setGlobalAlpha_14dthe$(t)},be.prototype.setFont_ov8mpe$=function(t){this.ctx_0.setFont_ov8mpe$(this.scaled_2(t))},be.prototype.setLineWidth_14dthe$=function(t){this.ctx_0.setLineWidth_14dthe$(this.scaled_0(t))},be.prototype.strokeRect_6y0v78$=function(t,e,n,i){this.ctx_0.strokeRect_6y0v78$(this.scaled_0(t),this.scaled_0(e),this.scaled_0(n),this.scaled_0(i))},be.prototype.strokeText_ai6r6m$=function(t,e,n){this.ctx_0.strokeText_ai6r6m$(t,this.scaled_0(e),this.scaled_0(n))},be.prototype.fillText_ai6r6m$=function(t,e,n){this.ctx_0.fillText_ai6r6m$(t,this.scaled_0(e),this.scaled_0(n))},be.prototype.scale_lu1900$=function(t,e){this.ctx_0.scale_lu1900$(t,e)},be.prototype.scale_14dthe$=function(t){this.scale_lu1900$(t,t)},be.prototype.rotate_14dthe$=function(t){this.ctx_0.rotate_14dthe$(t)},be.prototype.translate_lu1900$=function(t,e){this.ctx_0.translate_lu1900$(this.scaled_0(t),this.scaled_0(e))},be.prototype.transform_15yvbs$=function(t,e,n,i,o,r){this.ctx_0.transform_15yvbs$(t,e,n,i,this.scaled_0(o),this.scaled_0(r))},be.prototype.bezierCurveTo_15yvbs$=function(t,e,n,i,o,r){this.ctx_0.bezierCurveTo_15yvbs$(this.scaled_0(t),this.scaled_0(e),this.scaled_0(n),this.scaled_0(i),this.scaled_0(o),this.scaled_0(r))},be.prototype.setLineJoin_v2gigt$=function(t){this.ctx_0.setLineJoin_v2gigt$(t)},be.prototype.setLineCap_useuqn$=function(t){this.ctx_0.setLineCap_useuqn$(t)},be.prototype.setTextBaseline_5cz80h$=function(t){this.ctx_0.setTextBaseline_5cz80h$(t)},be.prototype.setTextAlign_iwro1z$=function(t){this.ctx_0.setTextAlign_iwro1z$(t)},be.prototype.setTransform_15yvbs$=function(t,e,n,i,o,r){this.ctx_0.setTransform_15yvbs$(t,e,n,i,this.scaled_0(o),this.scaled_0(r))},be.prototype.fillEvenOdd=function(){this.ctx_0.fillEvenOdd()},be.prototype.setLineDash_gf7tl1$=function(t){this.ctx_0.setLineDash_gf7tl1$(this.scaled_1(t))},be.prototype.measureText_61zpoe$=function(t){return this.descaled_0(this.ctx_0.measureText_61zpoe$(t))},be.prototype.clearRect_wthzt5$=function(t){this.ctx_0.clearRect_wthzt5$(E(this.scaled_0(t.left),this.scaled_0(t.top),this.scaled_0(t.width),this.scaled_0(t.height)))},be.$metadata$={kind:a,simpleName:"ScaledContext2d",interfaces:[St]},Object.defineProperty(we.prototype,"context",{configurable:!0,get:function(){return this.canvas.context2d}}),Object.defineProperty(we.prototype,"size",{configurable:!0,get:function(){return this.myCanvasControl_0.size}}),we.prototype.createCanvas=function(){return this.myCanvasControl_0.createCanvas_119tl4$(this.myCanvasControl_0.size)},we.prototype.dispose=function(){this.myCanvasControl_0.removeChild_eqkm0m$(this.canvas)},we.$metadata$={kind:a,simpleName:"SingleCanvasControl",interfaces:[]},xe.$metadata$={kind:r,simpleName:"CanvasFigure",interfaces:[S]},ke.prototype.start=function(){this.myIsStarted_0||(this.myIsStarted_0=!0,this.requestNextFrame_0())},ke.prototype.stop=function(){this.myIsStarted_0&&(this.myIsStarted_0=!1,window.cancelAnimationFrame(u(this.myHandle_0)))},ke.prototype.execute_0=function(t){this.myIsStarted_0&&(this.handle_s8cxhz$(e.Long.fromNumber(t)),this.requestNextFrame_0())},ke.prototype.requestNextFrame_0=function(){var t;this.myHandle_0=window.requestAnimationFrame((t=this,function(e){return t.execute_0(e),w}))},ke.$metadata$={kind:a,simpleName:"DomAnimationTimer",interfaces:[X]},Ce.prototype.takeSnapshot=function(){return O.Asyncs.constant_mh5how$(new Ee(this.canvasElement,this.size,this.pixelRatio_0))},Ce.prototype.immidiateSnapshot=function(){return new Ee(this.canvasElement,this.size,this.pixelRatio_0)},Ee.prototype.copy=function(){var t=Oe().createNativeCanvas_0(this.size_0,this.pixelRatio_0);return N(t).drawImage(this.canvasElement,0,0),new Ee(t,this.size_0,this.pixelRatio_0)},Ee.$metadata$={kind:a,simpleName:"DomSnapshot",interfaces:[it]},Se.prototype.create_duqvgq$=function(t,e){return new Ce(this.createNativeCanvas_0(t,e),t,e)},Se.prototype.createNativeCanvas_0=function(t,n){var i,o=e.isType(i=document.createElement("canvas"),HTMLCanvasElement)?i:y();P(o.style,t.x),I(o.style,t.y);var r=t.x*n;o.width=A(R.ceil(r));var a=t.y*n;return o.height=A(R.ceil(a)),o},Se.$metadata$={kind:s,simpleName:"Companion",interfaces:[]};var Te=null;function Oe(){return null===Te&&new Se,Te}function Ne(t,e,n){this.myRootElement_0=t,this.size_malc5o$_0=e,this.myEventPeer_0=n}function Pe(t){this.closure$eventHandler=t,ke.call(this)}function Ie(t,n,i,o){return function(r){var a,s,l;if(null!=t){var u,c=t;l=e.isType(u=n.createCanvas_119tl4$(c),Ce)?u:y()}else l=null;var p=null!=(a=l)?a:Oe().create_duqvgq$(new B(i.width,i.height),1);return(e.isType(s=p.canvasElement.getContext("2d"),CanvasRenderingContext2D)?s:y()).drawImage(i,0,0,p.canvasElement.width,p.canvasElement.height),p.takeSnapshot().onSuccess_qlkmfe$(function(t){return function(e){return t(e),w}}(o))}}function Ae(t,e){var n;$e.call(this,G(K)),this.myEventTarget_0=t,this.myTargetBounds_0=e,this.myButtonPressed_0=!1,this.myLastDragEndEventTimestamp_0=0,this.myWasDragged_0=!1,this.myButtonPressCoord_0=null,this.myDragToleranceDistance_0=3,this.handle_0(F.Companion.MOUSE_ENTER,(n=this,function(t){if(n.isHitOnTarget_0(t))return n.dispatch_b6y3vz$(K.MOUSE_ENTERED,n.translate_0(t)),w})),this.handle_0(F.Companion.MOUSE_LEAVE,function(t){return function(e){if(t.isHitOnTarget_0(e))return t.dispatch_b6y3vz$(K.MOUSE_LEFT,t.translate_0(e)),w}}(this)),this.handle_0(F.Companion.CLICK,function(t){return function(e){if(!T(t.myLastDragEndEventTimestamp_0,e.timeStamp)&&t.isHitOnTarget_0(e))return t.dispatch_b6y3vz$(K.MOUSE_CLICKED,t.translate_0(e)),t.myWasDragged_0=!1,w}}(this)),this.handle_0(F.Companion.DOUBLE_CLICK,function(t){return function(e){if(!T(t.myLastDragEndEventTimestamp_0,e.timeStamp)&&t.isHitOnTarget_0(e))return t.dispatch_b6y3vz$(K.MOUSE_DOUBLE_CLICKED,t.translate_0(e)),w}}(this)),this.handle_0(F.Companion.MOUSE_DOWN,function(t){return function(e){if(t.isHitOnTarget_0(e))return e.preventDefault(),t.myButtonPressed_0=!0,t.myButtonPressCoord_0=new B(A(e.x),A(e.y)),t.dispatch_b6y3vz$(K.MOUSE_PRESSED,t.translate_0(e)),w}}(this)),this.handle_0(F.Companion.MOUSE_UP,function(t){return function(e){return t.myWasDragged_0&&(t.myLastDragEndEventTimestamp_0=e.timeStamp),t.myWasDragged_0=!1,t.myButtonPressed_0=!1,t.myButtonPressCoord_0=null,t.dispatch_b6y3vz$(K.MOUSE_RELEASED,t.translate_0(e)),w}}(this)),this.handle_0(F.Companion.MOUSE_MOVE,function(t){return function(e){var n,i,o;if(t.myWasDragged_0)e.preventDefault(),t.dispatch_b6y3vz$(K.MOUSE_DRAGGED,t.translate_0(e));else if(t.myButtonPressed_0&&!t.myWasDragged_0)(null!=(o=null!=(i=null!=(n=t.myButtonPressCoord_0)?n.sub_119tl4$(new B(A(e.x),A(e.y))):null)?i.length():null)?o:0)>t.myDragToleranceDistance_0&&(t.myWasDragged_0=!0,e.preventDefault(),t.dispatch_b6y3vz$(K.MOUSE_DRAGGED,t.translate_0(e)));else{if(t.myButtonPressed_0||t.myWasDragged_0)throw V("MOUSE_MOVE: unknown internal state".toString());if(!t.isHitOnTarget_0(e))return;t.dispatch_b6y3vz$(K.MOUSE_MOVED,t.translate_0(e))}return w}}(this))}function Re(t){this.ctx_0=t}Ce.$metadata$={kind:a,simpleName:"DomCanvas",interfaces:[ve]},Object.defineProperty(Ne.prototype,"size",{get:function(){return this.size_malc5o$_0}}),Pe.prototype.handle_s8cxhz$=function(t){this.closure$eventHandler.onEvent_s8cxhz$(t)},Pe.$metadata$={kind:a,interfaces:[ke]},Ne.prototype.createAnimationTimer_ckdfex$=function(t){return new Pe(t)},Ne.prototype.addEventHandler_mfdhbe$=function(t,e){return this.myEventPeer_0.addEventHandler_b14a3c$(t,j((n=e,function(t){return n.onEvent_11rb$(t),w})));var n},Ne.prototype.createCanvas_119tl4$=function(t){var e=Oe().create_duqvgq$(t,Oe().DEVICE_PIXEL_RATIO);return z(e.canvasElement.style,L.ABSOLUTE),e},Ne.prototype.createSnapshot_61zpoe$=function(t){return this.createSnapshotAsync_0(t,null)},Ne.prototype.createSnapshot_50eegg$=function(t,e){var n={type:"image/png"};return this.createSnapshotAsync_0(URL.createObjectURL(new Blob([t],n)),e)},Ne.prototype.createSnapshotAsync_0=function(t,e){void 0===e&&(e=null);var n=new D,i=new Image;return i.onload=this.onLoad_0(i,e,M("success",function(t,e){return t.success_11rb$(e),w}.bind(null,n))),i.src=t,n},Ne.prototype.onLoad_0=function(t,e,n){return Ie(e,this,t,n)},Ne.prototype.addChild_eqkm0m$=function(t){var n;this.myRootElement_0.appendChild((e.isType(n=t,Ce)?n:y()).canvasElement)},Ne.prototype.addChild_fwfip8$=function(t,n){var i;this.myRootElement_0.insertBefore((e.isType(i=n,Ce)?i:y()).canvasElement,this.myRootElement_0.childNodes[t])},Ne.prototype.removeChild_eqkm0m$=function(t){var n;this.myRootElement_0.removeChild((e.isType(n=t,Ce)?n:y()).canvasElement)},Ne.prototype.schedule_klfg04$=function(t){t()},Ae.prototype.handle_0=function(t,e){var n;(T(t,F.Companion.MOUSE_MOVE)||T(t,F.Companion.MOUSE_UP)?document:this.myEventTarget_0).addEventListener(t.name,new U((n=e,function(t){return n(t),!1})))},Ae.prototype.onSpecAdded_1gkqfp$=function(t){},Ae.prototype.onSpecRemoved_1gkqfp$=function(t){},Ae.prototype.isHitOnTarget_0=function(t){var e=new B(A(t.offsetX),A(t.offsetY));return this.myTargetBounds_0.contains_119tl4$(e)},Ae.prototype.translate_0=function(t){var e=this.myEventTarget_0.getBoundingClientRect();return new H(t.clientX-A(e.x)-this.myTargetBounds_0.origin.x|0,t.clientY-A(e.y)-this.myTargetBounds_0.origin.y|0,q.DomEventUtil.getButton_tfvzir$(t),q.DomEventUtil.getModifiers_tfvzir$(t))},Ae.$metadata$={kind:a,simpleName:"DomEventPeer",interfaces:[$e]},Ne.$metadata$={kind:a,simpleName:"DomCanvasControl",interfaces:[ot]},Re.prototype.convertLineJoin_0=function(t){var n;switch(t.name){case"BEVEL":n="bevel";break;case"MITER":n="miter";break;case"ROUND":n="round";break;default:n=e.noWhenBranchMatched()}return n},Re.prototype.convertLineCap_0=function(t){var n;switch(t.name){case"BUTT":n="butt";break;case"ROUND":n="round";break;case"SQUARE":n="square";break;default:n=e.noWhenBranchMatched()}return n},Re.prototype.convertTextBaseline_0=function(t){var n;switch(t.name){case"ALPHABETIC":n="alphabetic";break;case"BOTTOM":n="bottom";break;case"MIDDLE":n="middle";break;case"TOP":n="top";break;default:n=e.noWhenBranchMatched()}return n},Re.prototype.convertTextAlign_0=function(t){var n;switch(t.name){case"CENTER":n="center";break;case"END":n="end";break;case"START":n="start";break;default:n=e.noWhenBranchMatched()}return n},Re.prototype.drawImage_1j7zd4$=function(t){this.drawImage_xo47pw$(t,0,0)},Re.prototype.drawImage_xo47pw$=function(t,n,i){var o,r=e.isType(o=t,Ee)?o:y();this.ctx_0.drawImage(r.canvasElement,n,i)},Re.prototype.drawImage_nks7bk$=function(t,n,i,o,r){var a,s=e.isType(a=t,Ee)?a:y();this.ctx_0.drawImage(s.canvasElement,n,i,o,r)},Re.prototype.drawImage_urnjjc$=function(t,n,i,o,r,a,s,l,u){var c,p=e.isType(c=t,Ee)?c:y();this.ctx_0.drawImage(p.canvasElement,n,i,o,r,a,s,l,u)},Re.prototype.beginPath=function(){this.ctx_0.beginPath()},Re.prototype.scale_14dthe$=function(t){this.scale_lu1900$(t,t)},Re.prototype.closePath=function(){this.ctx_0.closePath()},Re.prototype.stroke=function(){this.ctx_0.stroke()},Re.prototype.fill=function(){this.ctx_0.fill("nonzero")},Re.prototype.fillEvenOdd=function(){this.ctx_0.fill("evenodd")},Re.prototype.fillRect_6y0v78$=function(t,e,n,i){this.ctx_0.fillRect(t,e,n,i)},Re.prototype.moveTo_lu1900$=function(t,e){this.ctx_0.moveTo(t,e)},Re.prototype.lineTo_lu1900$=function(t,e){this.ctx_0.lineTo(t,e)},Re.prototype.arc_6p3vsx$$default=function(t,e,n,i,o,r){this.ctx_0.arc(t,e,n,i,o,r)},Re.prototype.save=function(){this.ctx_0.save()},Re.prototype.restore=function(){this.ctx_0.restore()},Re.prototype.setFillStyle_2160e9$=function(t){this.ctx_0.fillStyle=null!=t?t.toCssColor():null},Re.prototype.setStrokeStyle_2160e9$=function(t){this.ctx_0.strokeStyle=null!=t?t.toCssColor():null},Re.prototype.setGlobalAlpha_14dthe$=function(t){this.ctx_0.globalAlpha=t},Re.prototype.toCssString_0=function(t){var n,i;switch(t.fontWeight.name){case"NORMAL":n="normal";break;case"BOLD":n="bold";break;default:n=e.noWhenBranchMatched()}var o=n;switch(t.fontStyle.name){case"NORMAL":i="normal";break;case"ITALIC":i="italic";break;default:i=e.noWhenBranchMatched()}return i+" "+o+" "+t.fontSize+"px "+t.fontFamily},Re.prototype.setFont_ov8mpe$=function(t){this.ctx_0.font=this.toCssString_0(t)},Re.prototype.setLineWidth_14dthe$=function(t){this.ctx_0.lineWidth=t},Re.prototype.strokeRect_6y0v78$=function(t,e,n,i){this.ctx_0.strokeRect(t,e,n,i)},Re.prototype.strokeText_ai6r6m$=function(t,e,n){this.ctx_0.strokeText(t,e,n)},Re.prototype.fillText_ai6r6m$=function(t,e,n){this.ctx_0.fillText(t,e,n)},Re.prototype.scale_lu1900$=function(t,e){this.ctx_0.scale(t,e)},Re.prototype.rotate_14dthe$=function(t){this.ctx_0.rotate(t)},Re.prototype.translate_lu1900$=function(t,e){this.ctx_0.translate(t,e)},Re.prototype.transform_15yvbs$=function(t,e,n,i,o,r){this.ctx_0.transform(t,e,n,i,o,r)},Re.prototype.bezierCurveTo_15yvbs$=function(t,e,n,i,o,r){this.ctx_0.bezierCurveTo(t,e,n,i,o,r)},Re.prototype.setLineJoin_v2gigt$=function(t){this.ctx_0.lineJoin=this.convertLineJoin_0(t)},Re.prototype.setLineCap_useuqn$=function(t){this.ctx_0.lineCap=this.convertLineCap_0(t)},Re.prototype.setTextBaseline_5cz80h$=function(t){this.ctx_0.textBaseline=this.convertTextBaseline_0(t)},Re.prototype.setTextAlign_iwro1z$=function(t){this.ctx_0.textAlign=this.convertTextAlign_0(t)},Re.prototype.setTransform_15yvbs$=function(t,e,n,i,o,r){this.ctx_0.setTransform(t,e,n,i,o,r)},Re.prototype.setLineDash_gf7tl1$=function(t){this.ctx_0.setLineDash(Y(t))},Re.prototype.measureText_61zpoe$=function(t){return this.ctx_0.measureText(t).width},Re.prototype.clearRect_wthzt5$=function(t){this.ctx_0.clearRect(t.left,t.top,t.width,t.height)},Re.$metadata$={kind:a,simpleName:"DomContext2d",interfaces:[St]},W.AnimationTimer=X,Object.defineProperty(Z,"Companion",{get:et}),W.AnimationEventHandler=Z;var je=t.jetbrains||(t.jetbrains={}),Le=je.datalore||(je.datalore={}),ze=Le.vis||(Le.vis={}),De=ze.canvas||(ze.canvas={});De.AnimationProvider=W,nt.Snapshot=it,De.Canvas=nt,De.CanvasControl=ot,Object.defineProperty(De,"CanvasControlUtil",{get:function(){return null===Ct&&new rt,Ct}}),De.CanvasProvider=Et,Object.defineProperty(Tt,"BEVEL",{get:Nt}),Object.defineProperty(Tt,"MITER",{get:Pt}),Object.defineProperty(Tt,"ROUND",{get:It}),St.LineJoin=Tt,Object.defineProperty(At,"BUTT",{get:jt}),Object.defineProperty(At,"ROUND",{get:Lt}),Object.defineProperty(At,"SQUARE",{get:zt}),St.LineCap=At,Object.defineProperty(Dt,"ALPHABETIC",{get:Bt}),Object.defineProperty(Dt,"BOTTOM",{get:Ft}),Object.defineProperty(Dt,"MIDDLE",{get:Ut}),Object.defineProperty(Dt,"TOP",{get:qt}),St.TextBaseline=Dt,Object.defineProperty(Ht,"CENTER",{get:Kt}),Object.defineProperty(Ht,"END",{get:Vt}),Object.defineProperty(Ht,"START",{get:Yt}),St.TextAlign=Ht,Object.defineProperty(Xt,"NORMAL",{get:Jt}),Object.defineProperty(Xt,"ITALIC",{get:Qt}),Wt.FontStyle=Xt,Object.defineProperty(te,"NORMAL",{get:ne}),Object.defineProperty(te,"BOLD",{get:ie}),Wt.FontWeight=te,Object.defineProperty(Wt,"Companion",{get:ae}),St.Font_init_1nsek9$=function(t,e,n,i,o){return o=o||Object.create(Wt.prototype),Wt.call(o,null!=t?t:Jt(),null!=e?e:ne(),null!=n?n:ae().DEFAULT_SIZE,null!=i?i:ae().DEFAULT_FAMILY),o},St.Font=Wt,De.Context2d=St,De.drawImage_m9lis9$=function(t,e,n){t.drawImage_xo47pw$(e,n.x,n.y)},Object.defineProperty(se,"Companion",{get:ce}),De.CssFontParser=se,Object.defineProperty(De,"CssStyleUtil",{get:function(){return null===he&&new pe,he}}),De.DeltaTime=_e,De.Dispatcher=de,De.scheduleAsync_ebnxch$=function(t,e){var n=new b;return e.onResult_m8e4a6$(fe(n,t),me(n,t)),n},De.EventPeer=$e,De.ScaledCanvas=ve,De.ScaledContext2d=be,De.SingleCanvasControl=we,(ze.canvasFigure||(ze.canvasFigure={})).CanvasFigure=xe;var Me=De.dom||(De.dom={});return Me.DomAnimationTimer=ke,Ce.DomSnapshot=Ee,Object.defineProperty(Ce,"Companion",{get:Oe}),Me.DomCanvas=Ce,Ne.DomEventPeer=Ae,Me.DomCanvasControl=Ne,Me.DomContext2d=Re,be.prototype.arc_6p3vsx$=St.prototype.arc_6p3vsx$,Re.prototype.arc_6p3vsx$=St.prototype.arc_6p3vsx$,t})?i.apply(e,o):i)||(t.exports=r)},856:function(t,e,n){var i,o,r;o=[e,n(421),n(322),n(284),n(486),n(705)],void 0===(r="function"==typeof(i=function(t,e,n,i,o,r){"use strict";var a=e.kotlin.collections.ArrayList_init_287e2$,s=n.jetbrains.datalore.vis.svg.slim.SvgSlimNode,l=e.toString,u=e.ensureNotNull,c=n.jetbrains.datalore.vis.svg.SvgElement,p=n.jetbrains.datalore.vis.svg.SvgTextNode,h=e.kotlin.IllegalStateException_init_pdl1vj$,_=n.jetbrains.datalore.vis.svg.slim,d=e.equals,f=e.Kind.CLASS,m=i.jetbrains.datalore.mapper.core.Synchronizer,$=e.kotlin.IllegalArgumentException_init_pdl1vj$,y=e.Kind.INTERFACE,g=(n.jetbrains.datalore.vis.svg.SvgNodeContainer,e.Kind.OBJECT),v=e.throwCCE,b=o.jetbrains.datalore.base.registration.CompositeRegistration,w=r.jetbrains.datalore.base.js.dom.DomEventType,x=r.jetbrains.datalore.base.event.dom,k=o.jetbrains.datalore.base.event.MouseEvent,C=o.jetbrains.datalore.base.registration.Registration,E=n.jetbrains.datalore.vis.svg.SvgImageElementEx.RGBEncoder,S=n.jetbrains.datalore.vis.svg.SvgNode,T=o.jetbrains.datalore.base.geometry.DoubleVector,O=o.jetbrains.datalore.base.geometry.DoubleRectangle_init_6y0v78$,N=e.kotlin.collections.HashMap_init_q3lmfv$,P=n.jetbrains.datalore.vis.svg.SvgPlatformPeer,I=n.jetbrains.datalore.vis.svg.SvgElementListener,A=i.jetbrains.datalore.mapper.core,R=n.jetbrains.datalore.vis.svg.event.SvgEventSpec.values,j=e.kotlin.IllegalStateException_init,L=o.jetbrains.datalore.base.function.Function,z=o.jetbrains.datalore.base.observable.property.WritableProperty,D=e.numberToInt,M=e.kotlin.collections.LinkedHashMap_init_q3lmfv$,B=i.jetbrains.datalore.mapper.core.Mapper,F=n.jetbrains.datalore.vis.svg.SvgImageElementEx,U=n.jetbrains.datalore.vis.svg.SvgImageElement,q=i.jetbrains.datalore.mapper.core.MapperFactory,H=n.jetbrains.datalore.vis.svg,G=(e.defineInlineFunction,e.kotlin.Unit),K=e.kotlin.collections.AbstractMutableList,V=o.jetbrains.datalore.base.function.Value,Y=o.jetbrains.datalore.base.observable.property.PropertyChangeEvent,W=o.jetbrains.datalore.base.observable.event.ListenerCaller,X=o.jetbrains.datalore.base.observable.event.Listeners,Z=o.jetbrains.datalore.base.observable.property.Property,J=e.kotlinx.dom.addClass_hhb33f$,Q=e.kotlinx.dom.removeClass_hhb33f$,tt=o.jetbrains.datalore.base.geometry.Vector,et=o.jetbrains.datalore.base.function.Supplier,nt=r.jetbrains.datalore.base.observable.property.UpdatableProperty,it=n.jetbrains.datalore.vis.svg.SvgEllipseElement,ot=n.jetbrains.datalore.vis.svg.SvgCircleElement,rt=n.jetbrains.datalore.vis.svg.SvgRectElement,at=n.jetbrains.datalore.vis.svg.SvgTextElement,st=n.jetbrains.datalore.vis.svg.SvgPathElement,lt=n.jetbrains.datalore.vis.svg.SvgLineElement,ut=n.jetbrains.datalore.vis.svg.SvgSvgElement,ct=n.jetbrains.datalore.vis.svg.SvgGElement,pt=n.jetbrains.datalore.vis.svg.SvgStyleElement,ht=n.jetbrains.datalore.vis.svg.SvgTSpanElement,_t=n.jetbrains.datalore.vis.svg.SvgDefsElement,dt=n.jetbrains.datalore.vis.svg.SvgClipPathElement;function ft(t,e,n){this.source_0=t,this.target_0=e,this.targetPeer_0=n,this.myHandlersRegs_0=null}function mt(){}function $t(){}function yt(t,e){this.closure$source=t,this.closure$spec=e}function gt(t,e,n){this.closure$target=t,this.closure$eventType=e,this.closure$listener=n,C.call(this)}function vt(){}function bt(){this.myMappingMap_0=N()}function wt(t,e,n){St.call(this,t,e,n),this.myPeer_0=n,this.myHandlersRegs_0=null}function xt(t){this.this$SvgElementMapper=t,this.myReg_0=null}function kt(t){this.this$SvgElementMapper=t}function Ct(t){this.this$SvgElementMapper=t}function Et(t,e){this.this$SvgElementMapper=t,this.closure$spec=e}function St(t,e,n){B.call(this,t,e),this.peer_cyou3s$_0=n}function Tt(t){this.myPeer_0=t}function Ot(t){It(),B.call(this,t,It().createDocument_0()),this.myRootMapper_0=null}function Nt(){Pt=this}gt.prototype=Object.create(C.prototype),gt.prototype.constructor=gt,St.prototype=Object.create(B.prototype),St.prototype.constructor=St,wt.prototype=Object.create(St.prototype),wt.prototype.constructor=wt,Ot.prototype=Object.create(B.prototype),Ot.prototype.constructor=Ot,At.prototype=Object.create(St.prototype),At.prototype.constructor=At,Ut.prototype=Object.create(C.prototype),Ut.prototype.constructor=Ut,Qt.prototype=Object.create(K.prototype),Qt.prototype.constructor=Qt,te.prototype=Object.create(K.prototype),te.prototype.constructor=te,oe.prototype=Object.create(C.prototype),oe.prototype.constructor=oe,re.prototype=Object.create(C.prototype),re.prototype.constructor=re,pe.prototype=Object.create(nt.prototype),pe.prototype.constructor=pe,ft.prototype.attach_1rog5x$=function(t){if(this.myHandlersRegs_0=a(),e.isType(this.source_0,s)){var n="Slim SVG node is not expected: "+l(e.getKClassFromExpression(this.source_0).simpleName);throw $(n.toString())}this.targetPeer_0.appendChild_xwzc9q$(this.target_0,this.generateNode_0(this.source_0))},ft.prototype.detach=function(){var t;for(t=u(this.myHandlersRegs_0).iterator();t.hasNext();)t.next().remove();this.myHandlersRegs_0=null,this.targetPeer_0.removeAllChildren_11rb$(this.target_0)},ft.prototype.generateNode_0=function(t){if(e.isType(t,s))return this.generateSlimNode_0(t);if(e.isType(t,c))return this.generateElement_0(t);if(e.isType(t,p))return this.generateTextNode_0(t);throw h("Can't generate dom for svg node "+e.getKClassFromExpression(t).simpleName)},ft.prototype.generateElement_0=function(t){var e,n,i=this.targetPeer_0.newSvgElement_b1cgbq$(t);for(e=t.attributeKeys.iterator();e.hasNext();){var o=e.next();this.targetPeer_0.setAttribute_ohl585$(i,o.name,l(t.getAttribute_61zpoe$(o.name).get()))}var r=t.handlersSet().get();for(r.isEmpty()||this.targetPeer_0.hookEventHandlers_ewuthb$(t,i,r),n=t.children().iterator();n.hasNext();){var a=n.next();this.targetPeer_0.appendChild_xwzc9q$(i,this.generateNode_0(a))}return i},ft.prototype.generateTextNode_0=function(t){return this.targetPeer_0.newSvgTextNode_tginx7$(t)},ft.prototype.generateSlimNode_0=function(t){var e,n,i=this.targetPeer_0.newSvgSlimNode_qwqme8$(t);if(d(t.elementName,_.SvgSlimElements.GROUP))for(e=t.slimChildren.iterator();e.hasNext();){var o=e.next();this.targetPeer_0.appendChild_xwzc9q$(i,this.generateSlimNode_0(o))}for(n=t.attributes.iterator();n.hasNext();){var r=n.next();this.targetPeer_0.setAttribute_ohl585$(i,r.key,r.value)}return i},ft.$metadata$={kind:f,simpleName:"SvgNodeSubtreeGeneratingSynchronizer",interfaces:[m]},mt.$metadata$={kind:y,simpleName:"TargetPeer",interfaces:[]},$t.prototype.appendChild_xwzc9q$=function(t,e){t.appendChild(e)},$t.prototype.removeAllChildren_11rb$=function(t){if(t.hasChildNodes())for(var e=t.firstChild;null!=e;){var n=e.nextSibling;t.removeChild(e),e=n}},$t.prototype.newSvgElement_b1cgbq$=function(t){return _e().generateElement_b1cgbq$(t)},$t.prototype.newSvgTextNode_tginx7$=function(t){var e=document.createTextNode("");return e.nodeValue=t.textContent().get(),e},$t.prototype.newSvgSlimNode_qwqme8$=function(t){return _e().generateSlimNode_qwqme8$(t)},$t.prototype.setAttribute_ohl585$=function(t,n,i){var o;(e.isType(o=t,Element)?o:v()).setAttribute(n,i)},$t.prototype.hookEventHandlers_ewuthb$=function(t,n,i){var o,r,a,s=new b([]);for(o=i.iterator();o.hasNext();){var l=o.next();switch(l.name){case"MOUSE_CLICKED":r=w.Companion.CLICK;break;case"MOUSE_PRESSED":r=w.Companion.MOUSE_DOWN;break;case"MOUSE_RELEASED":r=w.Companion.MOUSE_UP;break;case"MOUSE_OVER":r=w.Companion.MOUSE_OVER;break;case"MOUSE_MOVE":r=w.Companion.MOUSE_MOVE;break;case"MOUSE_OUT":r=w.Companion.MOUSE_OUT;break;default:throw $("unexpected event spec "+l)}var u=r;s.add_3xv6fb$(this.addMouseHandler_0(t,e.isType(a=n,EventTarget)?a:v(),l,u.name))}return s},yt.prototype.handleEvent=function(t){var n;t.stopPropagation();var i=e.isType(n=t,MouseEvent)?n:v(),o=new k(i.clientX,i.clientY,x.DomEventUtil.getButton_tfvzir$(i),x.DomEventUtil.getModifiers_tfvzir$(i));this.closure$source.dispatch_lgzia2$(this.closure$spec,o)},yt.$metadata$={kind:f,interfaces:[]},gt.prototype.doRemove=function(){this.closure$target.removeEventListener(this.closure$eventType,this.closure$listener,!1)},gt.$metadata$={kind:f,interfaces:[C]},$t.prototype.addMouseHandler_0=function(t,e,n,i){var o=new yt(t,n);return e.addEventListener(i,o,!1),new gt(e,i,o)},$t.$metadata$={kind:f,simpleName:"DomTargetPeer",interfaces:[mt]},vt.prototype.toDataUrl_nps3vt$=function(t,n,i){var o,r,a=null==(o=document.createElement("canvas"))||e.isType(o,HTMLCanvasElement)?o:v();if(null==a)throw h("Canvas is not supported.");a.width=t,a.height=n;for(var s=e.isType(r=a.getContext("2d"),CanvasRenderingContext2D)?r:v(),l=s.createImageData(t,n),u=l.data,c=0;c>24&255,t,e),Vt(i,o,n>>16&255,t,e),Kt(i,o,n>>8&255,t,e),Gt(i,o,255&n,t,e)},vt.$metadata$={kind:f,simpleName:"RGBEncoderDom",interfaces:[E]},bt.prototype.ensureSourceRegistered_0=function(t){if(!this.myMappingMap_0.containsKey_11rb$(t))throw h("Trying to call platform peer method of unmapped node")},bt.prototype.registerMapper_dxg7rd$=function(t,e){this.myMappingMap_0.put_xwzc9p$(t,e)},bt.prototype.unregisterMapper_26jijc$=function(t){this.myMappingMap_0.remove_11rb$(t)},bt.prototype.getComputedTextLength_u60gfq$=function(t){var n,i;this.ensureSourceRegistered_0(e.isType(n=t,S)?n:v());var o=u(this.myMappingMap_0.get_11rb$(t)).target;return(e.isType(i=o,SVGTextContentElement)?i:v()).getComputedTextLength()},bt.prototype.transformCoordinates_1=function(t,n,i){var o,r;this.ensureSourceRegistered_0(e.isType(o=t,S)?o:v());var a=u(this.myMappingMap_0.get_11rb$(t)).target;return this.transformCoordinates_0(e.isType(r=a,SVGElement)?r:v(),n.x,n.y,i)},bt.prototype.transformCoordinates_0=function(t,n,i,o){var r,a=(e.isType(r=t,SVGGraphicsElement)?r:v()).getCTM();o&&(a=u(a).inverse());var s=u(t.ownerSVGElement).createSVGPoint();s.x=n,s.y=i;var l=s.matrixTransform(u(a));return new T(l.x,l.y)},bt.prototype.inverseScreenTransform_ljxa03$=function(t,n){var i,o=t.ownerSvgElement;this.ensureSourceRegistered_0(u(o));var r=u(this.myMappingMap_0.get_11rb$(o)).target;return this.inverseScreenTransform_0(e.isType(i=r,SVGSVGElement)?i:v(),n.x,n.y)},bt.prototype.inverseScreenTransform_0=function(t,e,n){var i=u(t.getScreenCTM()).inverse(),o=t.createSVGPoint();return o.x=e,o.y=n,o=o.matrixTransform(i),new T(o.x,o.y)},bt.prototype.invertTransform_12yub8$=function(t,e){return this.transformCoordinates_1(t,e,!0)},bt.prototype.applyTransform_12yub8$=function(t,e){return this.transformCoordinates_1(t,e,!1)},bt.prototype.getBBox_7snaev$=function(t){var n;this.ensureSourceRegistered_0(e.isType(n=t,S)?n:v());var i=u(this.myMappingMap_0.get_11rb$(t)).target;return this.getBoundingBox_0(i)},bt.prototype.getBoundingBox_0=function(t){var n,i=(e.isType(n=t,SVGGraphicsElement)?n:v()).getBBox();return O(i.x,i.y,i.width,i.height)},bt.$metadata$={kind:f,simpleName:"SvgDomPeer",interfaces:[P]},kt.prototype.onAttrSet_ud3ldc$=function(t){null==t.newValue&&this.this$SvgElementMapper.target.removeAttribute(t.attrSpec.name),this.this$SvgElementMapper.target.setAttribute(t.attrSpec.name,l(t.newValue))},kt.$metadata$={kind:f,interfaces:[I]},xt.prototype.attach_1rog5x$=function(t){var e;for(this.myReg_0=this.this$SvgElementMapper.source.addListener_e4m8w6$(new kt(this.this$SvgElementMapper)),e=this.this$SvgElementMapper.source.attributeKeys.iterator();e.hasNext();){var n=e.next(),i=n.name,o=l(this.this$SvgElementMapper.source.getAttribute_61zpoe$(i).get());n.hasNamespace()?this.this$SvgElementMapper.target.setAttributeNS(n.namespaceUri,i,o):this.this$SvgElementMapper.target.setAttribute(i,o)}},xt.prototype.detach=function(){u(this.myReg_0).remove()},xt.$metadata$={kind:f,interfaces:[m]},Et.prototype.apply_11rb$=function(t){if(e.isType(t,MouseEvent)){var n=this.this$SvgElementMapper.createMouseEvent_0(t);return this.this$SvgElementMapper.source.dispatch_lgzia2$(this.closure$spec,n),!0}return!1},Et.$metadata$={kind:f,interfaces:[L]},Ct.prototype.set_11rb$=function(t){var e,n,i;for(null==this.this$SvgElementMapper.myHandlersRegs_0&&(this.this$SvgElementMapper.myHandlersRegs_0=M()),e=R(),n=0;n!==e.length;++n){var o=e[n];if(!u(t).contains_11rb$(o)&&u(this.this$SvgElementMapper.myHandlersRegs_0).containsKey_11rb$(o)&&u(u(this.this$SvgElementMapper.myHandlersRegs_0).remove_11rb$(o)).dispose(),t.contains_11rb$(o)&&!u(this.this$SvgElementMapper.myHandlersRegs_0).containsKey_11rb$(o)){switch(o.name){case"MOUSE_CLICKED":i=w.Companion.CLICK;break;case"MOUSE_PRESSED":i=w.Companion.MOUSE_DOWN;break;case"MOUSE_RELEASED":i=w.Companion.MOUSE_UP;break;case"MOUSE_OVER":i=w.Companion.MOUSE_OVER;break;case"MOUSE_MOVE":i=w.Companion.MOUSE_MOVE;break;case"MOUSE_OUT":i=w.Companion.MOUSE_OUT;break;default:throw j()}var r=i,a=u(this.this$SvgElementMapper.myHandlersRegs_0),s=Ft(this.this$SvgElementMapper.target,r,new Et(this.this$SvgElementMapper,o));a.put_xwzc9p$(o,s)}}},Ct.$metadata$={kind:f,interfaces:[z]},wt.prototype.registerSynchronizers_jp3a7u$=function(t){St.prototype.registerSynchronizers_jp3a7u$.call(this,t),t.add_te27wm$(new xt(this)),t.add_te27wm$(A.Synchronizers.forPropsOneWay_2ov6i0$(this.source.handlersSet(),new Ct(this)))},wt.prototype.onDetach=function(){var t;if(St.prototype.onDetach.call(this),null!=this.myHandlersRegs_0){for(t=u(this.myHandlersRegs_0).values.iterator();t.hasNext();)t.next().dispose();u(this.myHandlersRegs_0).clear()}},wt.prototype.createMouseEvent_0=function(t){t.stopPropagation();var e=this.myPeer_0.inverseScreenTransform_ljxa03$(this.source,new T(t.clientX,t.clientY));return new k(D(e.x),D(e.y),x.DomEventUtil.getButton_tfvzir$(t),x.DomEventUtil.getModifiers_tfvzir$(t))},wt.$metadata$={kind:f,simpleName:"SvgElementMapper",interfaces:[St]},St.prototype.registerSynchronizers_jp3a7u$=function(t){B.prototype.registerSynchronizers_jp3a7u$.call(this,t),this.source.isPrebuiltSubtree?t.add_te27wm$(new ft(this.source,this.target,new $t)):t.add_te27wm$(A.Synchronizers.forObservableRole_umd8ru$(this,this.source.children(),_e().nodeChildren_b3w3xb$(this.target),new Tt(this.peer_cyou3s$_0)))},St.prototype.onAttach_8uof53$=function(t){B.prototype.onAttach_8uof53$.call(this,t),this.peer_cyou3s$_0.registerMapper_dxg7rd$(this.source,this)},St.prototype.onDetach=function(){B.prototype.onDetach.call(this),this.peer_cyou3s$_0.unregisterMapper_26jijc$(this.source)},St.$metadata$={kind:f,simpleName:"SvgNodeMapper",interfaces:[B]},Tt.prototype.createMapper_11rb$=function(t){if(e.isType(t,U)){var n=t;return e.isType(n,F)&&(n=n.asImageElement_xhdger$(new vt)),new wt(n,_e().generateElement_b1cgbq$(t),this.myPeer_0)}if(e.isType(t,c))return new wt(t,_e().generateElement_b1cgbq$(t),this.myPeer_0);if(e.isType(t,p))return new At(t,_e().generateTextElement_tginx7$(t),this.myPeer_0);if(e.isType(t,s))return new St(t,_e().generateSlimNode_qwqme8$(t),this.myPeer_0);throw h("Unsupported SvgNode "+e.getKClassFromExpression(t))},Tt.$metadata$={kind:f,simpleName:"SvgNodeMapperFactory",interfaces:[q]},Nt.prototype.createDocument_0=function(){var t;return e.isType(t=document.createElementNS(H.XmlNamespace.SVG_NAMESPACE_URI,"svg"),SVGSVGElement)?t:v()},Nt.$metadata$={kind:g,simpleName:"Companion",interfaces:[]};var Pt=null;function It(){return null===Pt&&new Nt,Pt}function At(t,e,n){St.call(this,t,e,n)}function Rt(t){this.this$SvgTextNodeMapper=t}function jt(){Lt=this,this.DEFAULT="default",this.NONE="none",this.BLOCK="block",this.FLEX="flex",this.GRID="grid",this.INLINE_BLOCK="inline-block"}Ot.prototype.onAttach_8uof53$=function(t){if(B.prototype.onAttach_8uof53$.call(this,t),!this.source.isAttached())throw h("Element must be attached");var e=new bt;this.source.container().setPeer_kqs5uc$(e),this.myRootMapper_0=new wt(this.source,this.target,e),this.target.setAttribute("shape-rendering","geometricPrecision"),u(this.myRootMapper_0).attachRoot_8uof53$()},Ot.prototype.onDetach=function(){u(this.myRootMapper_0).detachRoot(),this.myRootMapper_0=null,this.source.isAttached()&&this.source.container().setPeer_kqs5uc$(null),B.prototype.onDetach.call(this)},Ot.$metadata$={kind:f,simpleName:"SvgRootDocumentMapper",interfaces:[B]},Rt.prototype.set_11rb$=function(t){this.this$SvgTextNodeMapper.target.nodeValue=t},Rt.$metadata$={kind:f,interfaces:[z]},At.prototype.registerSynchronizers_jp3a7u$=function(t){St.prototype.registerSynchronizers_jp3a7u$.call(this,t),t.add_te27wm$(A.Synchronizers.forPropsOneWay_2ov6i0$(this.source.textContent(),new Rt(this)))},At.$metadata$={kind:f,simpleName:"SvgTextNodeMapper",interfaces:[St]},jt.$metadata$={kind:g,simpleName:"CssDisplay",interfaces:[]};var Lt=null;function zt(){return null===Lt&&new jt,Lt}function Dt(t,e){return t.removeProperty(e),t}function Mt(t){return Dt(t,"display")}function Bt(t){this.closure$handler=t}function Ft(t,e,n){return qt(t,e,new Bt(n),!1)}function Ut(t,e,n){this.closure$type=t,this.closure$listener=e,this.this$onEvent=n,C.call(this)}function qt(t,e,n,i){return t.addEventListener(e.name,n,i),new Ut(e,n,t)}function Ht(t,e,n,i,o){Yt(t,e,n,i,o,3)}function Gt(t,e,n,i,o){Yt(t,e,n,i,o,2)}function Kt(t,e,n,i,o){Yt(t,e,n,i,o,1)}function Vt(t,e,n,i,o){Yt(t,e,n,i,o,0)}function Yt(t,n,i,o,r,a){n[(4*(o+e.imul(r,t.width)|0)|0)+a|0]=i}function Wt(t){return t.childNodes.length}function Xt(t,e){return t.insertBefore(e,t.firstChild)}function Zt(t,e,n){var i=null!=n?n.nextSibling:null;null==i?t.appendChild(e):t.insertBefore(e,i)}function Jt(){he=this}function Qt(t){this.closure$n=t,K.call(this)}function te(t,e){this.closure$items=t,this.closure$base=e,K.call(this)}function ee(t){this.closure$e=t}function ne(t){this.closure$element=t,this.myTimerRegistration_0=null,this.myListeners_0=new X}function ie(t,e){this.closure$value=t,this.closure$currentValue=e}function oe(t){this.closure$timer=t,C.call(this)}function re(t,e){this.closure$reg=t,this.this$=e,C.call(this)}function ae(t,e){this.closure$el=t,this.closure$cls=e,this.myValue_0=null}function se(t,e){this.closure$el=t,this.closure$attr=e}function le(t,e,n){this.closure$el=t,this.closure$attr=e,this.closure$attrValue=n}function ue(t){this.closure$el=t}function ce(t){this.closure$el=t}function pe(t,e){this.closure$period=t,this.closure$supplier=e,nt.call(this),this.myTimer_0=-1}Bt.prototype.handleEvent=function(t){this.closure$handler.apply_11rb$(t)||(t.preventDefault(),t.stopPropagation())},Bt.$metadata$={kind:f,interfaces:[]},Ut.prototype.doRemove=function(){this.this$onEvent.removeEventListener(this.closure$type.name,this.closure$listener)},Ut.$metadata$={kind:f,interfaces:[C]},Jt.prototype.elementChildren_2rdptt$=function(t){return this.nodeChildren_b3w3xb$(t)},Object.defineProperty(Qt.prototype,"size",{configurable:!0,get:function(){return Wt(this.closure$n)}}),Qt.prototype.get_za3lpa$=function(t){return this.closure$n.childNodes[t]},Qt.prototype.set_wxm5ur$=function(t,e){if(null!=u(e).parentNode)throw j();var n=u(this.get_za3lpa$(t));return this.closure$n.replaceChild(n,e),n},Qt.prototype.add_wxm5ur$=function(t,e){if(null!=u(e).parentNode)throw j();if(0===t)Xt(this.closure$n,e);else{var n=t-1|0,i=this.closure$n.childNodes[n];Zt(this.closure$n,e,i)}},Qt.prototype.removeAt_za3lpa$=function(t){var e=u(this.closure$n.childNodes[t]);return this.closure$n.removeChild(e),e},Qt.$metadata$={kind:f,interfaces:[K]},Jt.prototype.nodeChildren_b3w3xb$=function(t){return new Qt(t)},Object.defineProperty(te.prototype,"size",{configurable:!0,get:function(){return this.closure$items.size}}),te.prototype.get_za3lpa$=function(t){return this.closure$items.get_za3lpa$(t)},te.prototype.set_wxm5ur$=function(t,e){var n=this.closure$items.set_wxm5ur$(t,e);return this.closure$base.set_wxm5ur$(t,u(n).getElement()),n},te.prototype.add_wxm5ur$=function(t,e){this.closure$items.add_wxm5ur$(t,e),this.closure$base.add_wxm5ur$(t,u(e).getElement())},te.prototype.removeAt_za3lpa$=function(t){var e=this.closure$items.removeAt_za3lpa$(t);return this.closure$base.removeAt_za3lpa$(t),e},te.$metadata$={kind:f,interfaces:[K]},Jt.prototype.withElementChildren_9w66cp$=function(t){return new te(a(),t)},ee.prototype.set_11rb$=function(t){this.closure$e.innerHTML=t},ee.$metadata$={kind:f,interfaces:[z]},Jt.prototype.innerTextOf_2rdptt$=function(t){return new ee(t)},Object.defineProperty(ne.prototype,"propExpr",{configurable:!0,get:function(){return"checkbox("+this.closure$element+")"}}),ne.prototype.get=function(){return this.closure$element.checked},ne.prototype.set_11rb$=function(t){this.closure$element.checked=t},ie.prototype.call_11rb$=function(t){t.onEvent_11rb$(new Y(this.closure$value.get(),this.closure$currentValue))},ie.$metadata$={kind:f,interfaces:[W]},oe.prototype.doRemove=function(){window.clearInterval(this.closure$timer)},oe.$metadata$={kind:f,interfaces:[C]},re.prototype.doRemove=function(){this.closure$reg.remove(),this.this$.myListeners_0.isEmpty&&(u(this.this$.myTimerRegistration_0).remove(),this.this$.myTimerRegistration_0=null)},re.$metadata$={kind:f,interfaces:[C]},ne.prototype.addHandler_gxwwpc$=function(t){if(this.myListeners_0.isEmpty){var e=new V(this.closure$element.checked),n=window.setInterval((i=this.closure$element,o=e,r=this,function(){var t=i.checked;return t!==o.get()&&(r.myListeners_0.fire_kucmxw$(new ie(o,t)),o.set_11rb$(t)),G}));this.myTimerRegistration_0=new oe(n)}var i,o,r;return new re(this.myListeners_0.add_11rb$(t),this)},ne.$metadata$={kind:f,interfaces:[Z]},Jt.prototype.checkbox_36rv4q$=function(t){return new ne(t)},ae.prototype.set_11rb$=function(t){this.myValue_0!==t&&(t?J(this.closure$el,[this.closure$cls]):Q(this.closure$el,[this.closure$cls]),this.myValue_0=t)},ae.$metadata$={kind:f,interfaces:[z]},Jt.prototype.hasClass_t9mn69$=function(t,e){return new ae(t,e)},se.prototype.set_11rb$=function(t){this.closure$el.setAttribute(this.closure$attr,t)},se.$metadata$={kind:f,interfaces:[z]},Jt.prototype.attribute_t9mn69$=function(t,e){return new se(t,e)},le.prototype.set_11rb$=function(t){t?this.closure$el.setAttribute(this.closure$attr,this.closure$attrValue):this.closure$el.removeAttribute(this.closure$attr)},le.$metadata$={kind:f,interfaces:[z]},Jt.prototype.hasAttribute_1x5wil$=function(t,e,n){return new le(t,e,n)},ue.prototype.set_11rb$=function(t){t?Mt(this.closure$el.style):this.closure$el.style.display=zt().NONE},ue.$metadata$={kind:f,interfaces:[z]},Jt.prototype.visibilityOf_lt8gi4$=function(t){return new ue(t)},ce.prototype.get=function(){return new tt(this.closure$el.clientWidth,this.closure$el.clientHeight)},ce.$metadata$={kind:f,interfaces:[et]},Jt.prototype.dimension_2rdptt$=function(t){return this.timerBasedProperty_ndenup$(new ce(t),200)},pe.prototype.doAddListeners=function(){var t;this.myTimer_0=window.setInterval((t=this,function(){return t.update(),G}),this.closure$period)},pe.prototype.doRemoveListeners=function(){window.clearInterval(this.myTimer_0)},pe.prototype.doGet=function(){return this.closure$supplier.get()},pe.$metadata$={kind:f,interfaces:[nt]},Jt.prototype.timerBasedProperty_ndenup$=function(t,e){return new pe(e,t)},Jt.prototype.generateElement_b1cgbq$=function(t){if(e.isType(t,it))return this.createSVGElement_0("ellipse");if(e.isType(t,ot))return this.createSVGElement_0("circle");if(e.isType(t,rt))return this.createSVGElement_0("rect");if(e.isType(t,at))return this.createSVGElement_0("text");if(e.isType(t,st))return this.createSVGElement_0("path");if(e.isType(t,lt))return this.createSVGElement_0("line");if(e.isType(t,ut))return this.createSVGElement_0("svg");if(e.isType(t,ct))return this.createSVGElement_0("g");if(e.isType(t,pt))return this.createSVGElement_0("style");if(e.isType(t,ht))return this.createSVGElement_0("tspan");if(e.isType(t,_t))return this.createSVGElement_0("defs");if(e.isType(t,dt))return this.createSVGElement_0("clipPath");if(e.isType(t,U))return this.createSVGElement_0("image");throw h("Unsupported svg element "+l(e.getKClassFromExpression(t).simpleName))},Jt.prototype.generateSlimNode_qwqme8$=function(t){switch(t.elementName){case"g":return this.createSVGElement_0("g");case"line":return this.createSVGElement_0("line");case"circle":return this.createSVGElement_0("circle");case"rect":return this.createSVGElement_0("rect");case"path":return this.createSVGElement_0("path");default:throw h("Unsupported SvgSlimNode "+e.getKClassFromExpression(t))}},Jt.prototype.generateTextElement_tginx7$=function(t){return document.createTextNode("")},Jt.prototype.createSVGElement_0=function(t){var n;return e.isType(n=document.createElementNS(H.XmlNamespace.SVG_NAMESPACE_URI,t),SVGElement)?n:v()},Jt.$metadata$={kind:g,simpleName:"DomUtil",interfaces:[]};var he=null;function _e(){return null===he&&new Jt,he}var de=t.jetbrains||(t.jetbrains={}),fe=de.datalore||(de.datalore={}),me=fe.vis||(fe.vis={}),$e=me.svgMapper||(me.svgMapper={});$e.SvgNodeSubtreeGeneratingSynchronizer=ft,$e.TargetPeer=mt;var ye=$e.dom||($e.dom={});ye.DomTargetPeer=$t,ye.RGBEncoderDom=vt,ye.SvgDomPeer=bt,ye.SvgElementMapper=wt,ye.SvgNodeMapper=St,ye.SvgNodeMapperFactory=Tt,Object.defineProperty(Ot,"Companion",{get:It}),ye.SvgRootDocumentMapper=Ot,ye.SvgTextNodeMapper=At;var ge=ye.css||(ye.css={});Object.defineProperty(ge,"CssDisplay",{get:zt});var ve=ye.domExtensions||(ye.domExtensions={});ve.clearProperty_77nir7$=Dt,ve.clearDisplay_b8w5wr$=Mt,ve.on_wkfwsw$=Ft,ve.onEvent_jxnl6r$=qt,ve.setAlphaAt_h5k0c3$=Ht,ve.setBlueAt_h5k0c3$=Gt,ve.setGreenAt_h5k0c3$=Kt,ve.setRedAt_h5k0c3$=Vt,ve.setColorAt_z0tnfj$=Yt,ve.get_childCount_asww5s$=Wt,ve.insertFirst_fga9sf$=Xt,ve.insertAfter_5a54o3$=Zt;var be=ye.domUtil||(ye.domUtil={});return Object.defineProperty(be,"DomUtil",{get:_e}),t})?i.apply(e,o):i)||(t.exports=r)},322:function(t,e,n){var i,o,r;o=[e,n(421),n(486)],void 0===(r="function"==typeof(i=function(t,e,n){"use strict";var i=e.kotlin.collections.toList_7wnvza$,o=e.kotlin.text.StringBuilder_init,r=e.toString,a=e.kotlin.text.trimMargin_rjktp$,s=e.kotlin.text.Regex_init_61zpoe$,l=e.kotlin.text.removeSuffix_gsj5wt$,u=e.kotlin.text.toDoubleOrNull_pdl1vz$,c=e.equals,p=n.jetbrains.datalore.base.values.FontFace,h=n.jetbrains.datalore.base.values.Color,_=e.getCallableRef,d=e.Kind.OBJECT,f=e.Kind.CLASS,m=e.throwCCE,$=e.kotlin.text.trim_gw00vp$,y=e.kotlin.collections.LinkedHashMap_init_q3lmfv$,g=e.hashCode,v=e.ensureNotNull,b=e.kotlin.Enum,w=e.throwISE,x=e.Kind.INTERFACE,k=e.kotlin.collections.HashMap_init_q3lmfv$,C=e.kotlin.IllegalArgumentException_init,E=Object,S=n.jetbrains.datalore.base.observable.property.PropertyChangeEvent,T=n.jetbrains.datalore.base.observable.property.Property,O=n.jetbrains.datalore.base.observable.event.ListenerCaller,N=n.jetbrains.datalore.base.observable.event.Listeners,P=n.jetbrains.datalore.base.registration.Registration,I=n.jetbrains.datalore.base.listMap.ListMap,A=e.kotlin.collections.emptySet_287e2$,R=n.jetbrains.datalore.base.observable.property.ReadableProperty,j=(e.kotlin.Unit,e.kotlin.IllegalStateException_init_pdl1vj$),L=n.jetbrains.datalore.base.observable.collections.list.ObservableList,z=n.jetbrains.datalore.base.observable.children.ChildList,D=n.jetbrains.datalore.base.observable.children.SimpleComposite,M=e.kotlin.text.StringBuilder,B=n.jetbrains.datalore.base.observable.property.ValueProperty,F=e.toBoxedChar,U=e.kotlin.text.uppercaseChar_myv2d0$,q=e.getKClass,H=e.kotlin.IllegalArgumentException_init_pdl1vj$,G=e.unboxChar,K=e.kotlin.collections.ArrayList_init_ww73n8$,V=e.kotlin.collections.ArrayList_init_287e2$,Y=n.jetbrains.datalore.base.geometry.DoubleVector,W=e.kotlin.collections.ArrayList_init_mqih57$,X=Math,Z=e.kotlin.text.split_ip8yn$,J=e.kotlin.text.contains_li3zpu$,Q=n.jetbrains.datalore.base.observable.property.WritableProperty,tt=e.kotlin.UnsupportedOperationException_init_pdl1vj$,et=n.jetbrains.datalore.base.observable.collections.list.ObservableArrayList,nt=e.numberToInt,it=n.jetbrains.datalore.base.event.Event,ot=(e.numberToDouble,e.kotlin.text.toDouble_pdl1vz$,e.kotlin.collections.filterNotNull_m3lr2h$),rt=e.kotlin.collections.emptyList_287e2$,at=e.kotlin.collections.collectionSizeOrDefault_ba2ldo$;function st(t,e){pt(),this.textStyles_0=t,this.defaultFamily_0=e}function lt(){ct=this,this.UNDEFINED_FONT_FACE=p.Companion.BOLD_ITALIC,this.UNDEFINED_FONT_COLOR=new h(150,0,255),this.DEFAULT_FONT_SIZE_0=15,this.DEFAULT_FONT_MONOSPACED_0=!1,this.CSS_REGEX_0="\\.([\\w\\-]+)\\s+\\{([^\\{\\}]*)\\}"}function ut(t,n){var i,o,r,a;return null!=(r=null!=(o=null!=(i=s(n+":(.+);").find_905azu$(t))?i.groupValues:null)?o.get_za3lpa$(1):null)?$(e.isCharSequence(a=r)?a:m()).toString():null}Js.prototype=Object.create(D.prototype),Js.prototype.constructor=Js,ka.prototype=Object.create(Js.prototype),ka.prototype.constructor=ka,Yl.prototype=Object.create(ka.prototype),Yl.prototype.constructor=Yl,Ga.prototype=Object.create(Yl.prototype),Ga.prototype.constructor=Ga,$t.prototype=Object.create(Ga.prototype),$t.prototype.constructor=$t,fi.prototype=Object.create(b.prototype),fi.prototype.constructor=fi,bt.prototype=Object.create(Ga.prototype),bt.prototype.constructor=bt,vi.prototype=Object.create(b.prototype),vi.prototype.constructor=vi,xa.prototype=Object.create(Ga.prototype),xa.prototype.constructor=xa,Pa.prototype=Object.create(P.prototype),Pa.prototype.constructor=Pa,Ra.prototype=Object.create(Ga.prototype),Ra.prototype.constructor=Ra,Ba.prototype=Object.create(P.prototype),Ba.prototype.constructor=Ba,Fa.prototype=Object.create(P.prototype),Fa.prototype.constructor=Fa,Ha.prototype=Object.create(Ga.prototype),Ha.prototype.constructor=Ha,us.prototype=Object.create(b.prototype),us.prototype.constructor=us,bs.prototype=Object.create(b.prototype),bs.prototype.constructor=bs,Ts.prototype=Object.create(Ga.prototype),Ts.prototype.constructor=Ts,As.prototype=Object.create(Ts.prototype),As.prototype.constructor=As,zs.prototype=Object.create(Ga.prototype),zs.prototype.constructor=zs,Qs.prototype=Object.create(z.prototype),Qs.prototype.constructor=Qs,ol.prototype=Object.create(B.prototype),ol.prototype.constructor=ol,al.prototype=Object.create(b.prototype),al.prototype.constructor=al,Ol.prototype=Object.create(b.prototype),Ol.prototype.constructor=Ol,Rl.prototype=Object.create(Ga.prototype),Rl.prototype.constructor=Rl,Ml.prototype=Object.create(Ga.prototype),Ml.prototype.constructor=Ml,Jl.prototype=Object.create(ka.prototype),Jl.prototype.constructor=Jl,Ql.prototype=Object.create(Yl.prototype),Ql.prototype.constructor=Ql,au.prototype=Object.create(ka.prototype),au.prototype.constructor=au,fu.prototype=Object.create(Ga.prototype),fu.prototype.constructor=fu,bu.prototype=Object.create(et.prototype),bu.prototype.constructor=bu,gu.prototype=Object.create(Js.prototype),gu.prototype.constructor=gu,Ku.prototype=Object.create(it.prototype),Ku.prototype.constructor=Ku,Yu.prototype=Object.create(b.prototype),Yu.prototype.constructor=Yu,nc.prototype=Object.create(Js.prototype),nc.prototype.constructor=nc,ic.prototype=Object.create(lc.prototype),ic.prototype.constructor=ic,ac.prototype=Object.create(nc.prototype),ac.prototype.constructor=ac,rc.prototype=Object.create(ic.prototype),rc.prototype.constructor=rc,st.prototype.getClasses=function(){return i(this.textStyles_0.keys)},st.prototype.getTextStyle_61zpoe$=function(t){var e;return null!=(e=this.textStyles_0.get_11rb$(t))?e:new ht(this.defaultFamily_0,pt().UNDEFINED_FONT_FACE,pt().DEFAULT_FONT_SIZE_0,pt().UNDEFINED_FONT_COLOR)},st.prototype.toCSS_jyasbz$=function(t,e){var n,i=o();return i.append_pdl1vj$(a("\n |"+(null!=(n=null!=e?"#"+r(e)+" ":null)?n:"")+"."+t+" {\n |"+pt().toCSS_0(this.getTextStyle_61zpoe$(t))+"\n |}\n |")),i.toString()},st.prototype.toCSS=function(){var t,e=o();for(t=this.getClasses().iterator();t.hasNext();){var n=t.next();e.append_pdl1vj$(this.toCSS_jyasbz$(n,null))}return e.toString()},lt.prototype.toCSS_t8jpc2$=function(t){return"font-weight: "+(t.bold?"bold":"normal")+";\n font-style: "+(t.italic?"italic":"normal")+";"},lt.prototype.toCSS_0=function(t){return a("\n | fill: "+t.color.toHexColor()+";\n | font-family: "+t.family+";\n | font-size: "+t.size+"px;\n | "+this.toCSS_t8jpc2$(t.face)+" \n ")},lt.prototype.fromCSS_do2bxa$=function(t,e,n){var i,o=ut,r=y();for(i=s(this.CSS_REGEX_0).findAll_905azu$(t).iterator();i.hasNext();){var a,d,f,m,$,g=i.next().destructured,v=g.match.groupValues.get_za3lpa$(1),b=g.match.groupValues.get_za3lpa$(2),w=null!=(a=o(b,"font-family"))?a:e,x=o(b,"font-weight"),k=o(b,"font-style"),C=null!=(m=null!=(f=null!=(d=o(b,"font-size"))?l(d,"px"):null)?u(f):null)?m:n,E=o(b,"fill"),S=new ht(w,new p(c(x,"bold"),c(k,"italic")),C,null!=($=null!=E?_("parseHex",function(t,e){return t.parseHex_61zpoe$(e)}.bind(null,h))(E):null)?$:h.Companion.BLACK);r.put_xwzc9p$(v,S)}return new st(r,e)},lt.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var ct=null;function pt(){return null===ct&&new lt,ct}function ht(t,e,n,i){this.family=t,this.face=e,this.size=n,this.color=i}function _t(t,e){mt(),this.name=t,this.namespaceUri=e}function dt(){ft=this}st.$metadata$={kind:f,simpleName:"StyleSheet",interfaces:[]},ht.$metadata$={kind:f,simpleName:"TextStyle",interfaces:[]},ht.prototype.component1=function(){return this.family},ht.prototype.component2=function(){return this.face},ht.prototype.component3=function(){return this.size},ht.prototype.component4=function(){return this.color},ht.prototype.copy_i7gmcr$=function(t,e,n,i){return new ht(void 0===t?this.family:t,void 0===e?this.face:e,void 0===n?this.size:n,void 0===i?this.color:i)},ht.prototype.toString=function(){return"TextStyle(family="+e.toString(this.family)+", face="+e.toString(this.face)+", size="+e.toString(this.size)+", color="+e.toString(this.color)+")"},ht.prototype.hashCode=function(){var t=0;return 31*(t=31*(t=31*(t=31*t+e.hashCode(this.family)|0)+e.hashCode(this.face)|0)+e.hashCode(this.size)|0)+e.hashCode(this.color)|0},ht.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.family,t.family)&&e.equals(this.face,t.face)&&e.equals(this.size,t.size)&&e.equals(this.color,t.color)},dt.prototype.createSpec_ytbaoo$=function(t){return new _t(t,null)},dt.prototype.createSpecNS_wswq18$=function(t,e,n){return new _t(e+":"+t,n)},dt.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var ft=null;function mt(){return null===ft&&new dt,ft}function $t(){vt(),Ga.call(this),this.elementName_4ww0r9$_0="circle"}function yt(){gt=this,this.CX=mt().createSpec_ytbaoo$("cx"),this.CY=mt().createSpec_ytbaoo$("cy"),this.R=mt().createSpec_ytbaoo$("r")}_t.prototype.hasNamespace=function(){return null!=this.namespaceUri},_t.prototype.toString=function(){return this.name},_t.prototype.hashCode=function(){return g(this.name)},_t.prototype.equals=function(t){var n;return this===t||!(null==t||null==(n=e.getKClassFromExpression(this))||!n.equals(e.getKClassFromExpression(t)))&&(e.isType(t,_t)||m(),!!c(this.name,t.name))},_t.$metadata$={kind:f,simpleName:"SvgAttributeSpec",interfaces:[]},yt.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var gt=null;function vt(){return null===gt&&new yt,gt}function bt(){di(),Ga.call(this)}function wt(){_i=this,this.CLIP_PATH_UNITS_0=mt().createSpec_ytbaoo$("clipPathUnits")}Object.defineProperty($t.prototype,"elementName",{configurable:!0,get:function(){return this.elementName_4ww0r9$_0}}),Object.defineProperty($t.prototype,"bBox",{configurable:!0,get:function(){return v(this.container().getPeer()).getBBox_7snaev$(this)}}),$t.prototype.cx=function(){return this.getAttribute_mumjwj$(vt().CX)},$t.prototype.cy=function(){return this.getAttribute_mumjwj$(vt().CY)},$t.prototype.r=function(){return this.getAttribute_mumjwj$(vt().R)},$t.prototype.transform=function(){return this.getAttribute_mumjwj$(Iu().TRANSFORM)},$t.prototype.fill=function(){return this.getAttribute_mumjwj$(Vl().FILL)},$t.prototype.fillColor=function(){return Lu().colorAttributeTransform_dc5zq8$(this.fill(),this.fillOpacity())},$t.prototype.fillOpacity=function(){return this.getAttribute_mumjwj$(Vl().FILL_OPACITY)},$t.prototype.stroke=function(){return this.getAttribute_mumjwj$(Vl().STROKE)},$t.prototype.strokeColor=function(){return Lu().colorAttributeTransform_dc5zq8$(this.stroke(),this.strokeOpacity())},$t.prototype.strokeOpacity=function(){return this.getAttribute_mumjwj$(Vl().STROKE_OPACITY)},$t.prototype.strokeWidth=function(){return this.getAttribute_mumjwj$(Vl().STROKE_WIDTH)},$t.prototype.pointToTransformedCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).invertTransform_12yub8$(this,t)},$t.prototype.pointToAbsoluteCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).applyTransform_12yub8$(this,t)},$t.$metadata$={kind:f,simpleName:"SvgCircleElement",interfaces:[Hl,Ou,Ga]},wt.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var xt,kt,Ct,Et,St,Tt,Ot,Nt,Pt,It,At,Rt,jt,Lt,zt,Dt,Mt,Bt,Ft,Ut,qt,Ht,Gt,Kt,Vt,Yt,Wt,Xt,Zt,Jt,Qt,te,ee,ne,ie,oe,re,ae,se,le,ue,ce,pe,he,_e,de,fe,me,$e,ye,ge,ve,be,we,xe,ke,Ce,Ee,Se,Te,Oe,Ne,Pe,Ie,Ae,Re,je,Le,ze,De,Me,Be,Fe,Ue,qe,He,Ge,Ke,Ve,Ye,We,Xe,Ze,Je,Qe,tn,en,nn,on,rn,an,sn,ln,un,cn,pn,hn,_n,dn,fn,mn,$n,yn,gn,vn,bn,wn,xn,kn,Cn,En,Sn,Tn,On,Nn,Pn,In,An,Rn,jn,Ln,zn,Dn,Mn,Bn,Fn,Un,qn,Hn,Gn,Kn,Vn,Yn,Wn,Xn,Zn,Jn,Qn,ti,ei,ni,ii,oi,ri,ai,si,li,ui,ci,pi,hi,_i=null;function di(){return null===_i&&new wt,_i}function fi(t,e,n){b.call(this),this.myAttributeString_ss0dpy$_0=n,this.name$=t,this.ordinal$=e}function mi(){mi=function(){},xt=new fi("USER_SPACE_ON_USE",0,"userSpaceOnUse"),kt=new fi("OBJECT_BOUNDING_BOX",1,"objectBoundingBox")}function $i(){return mi(),xt}function yi(){return mi(),kt}function gi(){}function vi(t,e,n){b.call(this),this.literal_7kwssz$_0=n,this.name$=t,this.ordinal$=e}function bi(){bi=function(){},Ct=new vi("ALICE_BLUE",0,"aliceblue"),Et=new vi("ANTIQUE_WHITE",1,"antiquewhite"),St=new vi("AQUA",2,"aqua"),Tt=new vi("AQUAMARINE",3,"aquamarine"),Ot=new vi("AZURE",4,"azure"),Nt=new vi("BEIGE",5,"beige"),Pt=new vi("BISQUE",6,"bisque"),It=new vi("BLACK",7,"black"),At=new vi("BLANCHED_ALMOND",8,"blanchedalmond"),Rt=new vi("BLUE",9,"blue"),jt=new vi("BLUE_VIOLET",10,"blueviolet"),Lt=new vi("BROWN",11,"brown"),zt=new vi("BURLY_WOOD",12,"burlywood"),Dt=new vi("CADET_BLUE",13,"cadetblue"),Mt=new vi("CHARTREUSE",14,"chartreuse"),Bt=new vi("CHOCOLATE",15,"chocolate"),Ft=new vi("CORAL",16,"coral"),Ut=new vi("CORNFLOWER_BLUE",17,"cornflowerblue"),qt=new vi("CORNSILK",18,"cornsilk"),Ht=new vi("CRIMSON",19,"crimson"),Gt=new vi("CYAN",20,"cyan"),Kt=new vi("DARK_BLUE",21,"darkblue"),Vt=new vi("DARK_CYAN",22,"darkcyan"),Yt=new vi("DARK_GOLDEN_ROD",23,"darkgoldenrod"),Wt=new vi("DARK_GRAY",24,"darkgray"),Xt=new vi("DARK_GREEN",25,"darkgreen"),Zt=new vi("DARK_GREY",26,"darkgrey"),Jt=new vi("DARK_KHAKI",27,"darkkhaki"),Qt=new vi("DARK_MAGENTA",28,"darkmagenta"),te=new vi("DARK_OLIVE_GREEN",29,"darkolivegreen"),ee=new vi("DARK_ORANGE",30,"darkorange"),ne=new vi("DARK_ORCHID",31,"darkorchid"),ie=new vi("DARK_RED",32,"darkred"),oe=new vi("DARK_SALMON",33,"darksalmon"),re=new vi("DARK_SEA_GREEN",34,"darkseagreen"),ae=new vi("DARK_SLATE_BLUE",35,"darkslateblue"),se=new vi("DARK_SLATE_GRAY",36,"darkslategray"),le=new vi("DARK_SLATE_GREY",37,"darkslategrey"),ue=new vi("DARK_TURQUOISE",38,"darkturquoise"),ce=new vi("DARK_VIOLET",39,"darkviolet"),pe=new vi("DEEP_PINK",40,"deeppink"),he=new vi("DEEP_SKY_BLUE",41,"deepskyblue"),_e=new vi("DIM_GRAY",42,"dimgray"),de=new vi("DIM_GREY",43,"dimgrey"),fe=new vi("DODGER_BLUE",44,"dodgerblue"),me=new vi("FIRE_BRICK",45,"firebrick"),$e=new vi("FLORAL_WHITE",46,"floralwhite"),ye=new vi("FOREST_GREEN",47,"forestgreen"),ge=new vi("FUCHSIA",48,"fuchsia"),ve=new vi("GAINSBORO",49,"gainsboro"),be=new vi("GHOST_WHITE",50,"ghostwhite"),we=new vi("GOLD",51,"gold"),xe=new vi("GOLDEN_ROD",52,"goldenrod"),ke=new vi("GRAY",53,"gray"),Ce=new vi("GREY",54,"grey"),Ee=new vi("GREEN",55,"green"),Se=new vi("GREEN_YELLOW",56,"greenyellow"),Te=new vi("HONEY_DEW",57,"honeydew"),Oe=new vi("HOT_PINK",58,"hotpink"),Ne=new vi("INDIAN_RED",59,"indianred"),Pe=new vi("INDIGO",60,"indigo"),Ie=new vi("IVORY",61,"ivory"),Ae=new vi("KHAKI",62,"khaki"),Re=new vi("LAVENDER",63,"lavender"),je=new vi("LAVENDER_BLUSH",64,"lavenderblush"),Le=new vi("LAWN_GREEN",65,"lawngreen"),ze=new vi("LEMON_CHIFFON",66,"lemonchiffon"),De=new vi("LIGHT_BLUE",67,"lightblue"),Me=new vi("LIGHT_CORAL",68,"lightcoral"),Be=new vi("LIGHT_CYAN",69,"lightcyan"),Fe=new vi("LIGHT_GOLDEN_ROD_YELLOW",70,"lightgoldenrodyellow"),Ue=new vi("LIGHT_GRAY",71,"lightgray"),qe=new vi("LIGHT_GREEN",72,"lightgreen"),He=new vi("LIGHT_GREY",73,"lightgrey"),Ge=new vi("LIGHT_PINK",74,"lightpink"),Ke=new vi("LIGHT_SALMON",75,"lightsalmon"),Ve=new vi("LIGHT_SEA_GREEN",76,"lightseagreen"),Ye=new vi("LIGHT_SKY_BLUE",77,"lightskyblue"),We=new vi("LIGHT_SLATE_GRAY",78,"lightslategray"),Xe=new vi("LIGHT_SLATE_GREY",79,"lightslategrey"),Ze=new vi("LIGHT_STEEL_BLUE",80,"lightsteelblue"),Je=new vi("LIGHT_YELLOW",81,"lightyellow"),Qe=new vi("LIME",82,"lime"),tn=new vi("LIME_GREEN",83,"limegreen"),en=new vi("LINEN",84,"linen"),nn=new vi("MAGENTA",85,"magenta"),on=new vi("MAROON",86,"maroon"),rn=new vi("MEDIUM_AQUA_MARINE",87,"mediumaquamarine"),an=new vi("MEDIUM_BLUE",88,"mediumblue"),sn=new vi("MEDIUM_ORCHID",89,"mediumorchid"),ln=new vi("MEDIUM_PURPLE",90,"mediumpurple"),un=new vi("MEDIUM_SEAGREEN",91,"mediumseagreen"),cn=new vi("MEDIUM_SLATE_BLUE",92,"mediumslateblue"),pn=new vi("MEDIUM_SPRING_GREEN",93,"mediumspringgreen"),hn=new vi("MEDIUM_TURQUOISE",94,"mediumturquoise"),_n=new vi("MEDIUM_VIOLET_RED",95,"mediumvioletred"),dn=new vi("MIDNIGHT_BLUE",96,"midnightblue"),fn=new vi("MINT_CREAM",97,"mintcream"),mn=new vi("MISTY_ROSE",98,"mistyrose"),$n=new vi("MOCCASIN",99,"moccasin"),yn=new vi("NAVAJO_WHITE",100,"navajowhite"),gn=new vi("NAVY",101,"navy"),vn=new vi("OLD_LACE",102,"oldlace"),bn=new vi("OLIVE",103,"olive"),wn=new vi("OLIVE_DRAB",104,"olivedrab"),xn=new vi("ORANGE",105,"orange"),kn=new vi("ORANGE_RED",106,"orangered"),Cn=new vi("ORCHID",107,"orchid"),En=new vi("PALE_GOLDEN_ROD",108,"palegoldenrod"),Sn=new vi("PALE_GREEN",109,"palegreen"),Tn=new vi("PALE_TURQUOISE",110,"paleturquoise"),On=new vi("PALE_VIOLET_RED",111,"palevioletred"),Nn=new vi("PAPAYA_WHIP",112,"papayawhip"),Pn=new vi("PEACH_PUFF",113,"peachpuff"),In=new vi("PERU",114,"peru"),An=new vi("PINK",115,"pink"),Rn=new vi("PLUM",116,"plum"),jn=new vi("POWDER_BLUE",117,"powderblue"),Ln=new vi("PURPLE",118,"purple"),zn=new vi("RED",119,"red"),Dn=new vi("ROSY_BROWN",120,"rosybrown"),Mn=new vi("ROYAL_BLUE",121,"royalblue"),Bn=new vi("SADDLE_BROWN",122,"saddlebrown"),Fn=new vi("SALMON",123,"salmon"),Un=new vi("SANDY_BROWN",124,"sandybrown"),qn=new vi("SEA_GREEN",125,"seagreen"),Hn=new vi("SEASHELL",126,"seashell"),Gn=new vi("SIENNA",127,"sienna"),Kn=new vi("SILVER",128,"silver"),Vn=new vi("SKY_BLUE",129,"skyblue"),Yn=new vi("SLATE_BLUE",130,"slateblue"),Wn=new vi("SLATE_GRAY",131,"slategray"),Xn=new vi("SLATE_GREY",132,"slategrey"),Zn=new vi("SNOW",133,"snow"),Jn=new vi("SPRING_GREEN",134,"springgreen"),Qn=new vi("STEEL_BLUE",135,"steelblue"),ti=new vi("TAN",136,"tan"),ei=new vi("TEAL",137,"teal"),ni=new vi("THISTLE",138,"thistle"),ii=new vi("TOMATO",139,"tomato"),oi=new vi("TURQUOISE",140,"turquoise"),ri=new vi("VIOLET",141,"violet"),ai=new vi("WHEAT",142,"wheat"),si=new vi("WHITE",143,"white"),li=new vi("WHITE_SMOKE",144,"whitesmoke"),ui=new vi("YELLOW",145,"yellow"),ci=new vi("YELLOW_GREEN",146,"yellowgreen"),pi=new vi("NONE",147,"none"),hi=new vi("CURRENT_COLOR",148,"currentColor"),_a()}function wi(){return bi(),Ct}function xi(){return bi(),Et}function ki(){return bi(),St}function Ci(){return bi(),Tt}function Ei(){return bi(),Ot}function Si(){return bi(),Nt}function Ti(){return bi(),Pt}function Oi(){return bi(),It}function Ni(){return bi(),At}function Pi(){return bi(),Rt}function Ii(){return bi(),jt}function Ai(){return bi(),Lt}function Ri(){return bi(),zt}function ji(){return bi(),Dt}function Li(){return bi(),Mt}function zi(){return bi(),Bt}function Di(){return bi(),Ft}function Mi(){return bi(),Ut}function Bi(){return bi(),qt}function Fi(){return bi(),Ht}function Ui(){return bi(),Gt}function qi(){return bi(),Kt}function Hi(){return bi(),Vt}function Gi(){return bi(),Yt}function Ki(){return bi(),Wt}function Vi(){return bi(),Xt}function Yi(){return bi(),Zt}function Wi(){return bi(),Jt}function Xi(){return bi(),Qt}function Zi(){return bi(),te}function Ji(){return bi(),ee}function Qi(){return bi(),ne}function to(){return bi(),ie}function eo(){return bi(),oe}function no(){return bi(),re}function io(){return bi(),ae}function oo(){return bi(),se}function ro(){return bi(),le}function ao(){return bi(),ue}function so(){return bi(),ce}function lo(){return bi(),pe}function uo(){return bi(),he}function co(){return bi(),_e}function po(){return bi(),de}function ho(){return bi(),fe}function _o(){return bi(),me}function fo(){return bi(),$e}function mo(){return bi(),ye}function $o(){return bi(),ge}function yo(){return bi(),ve}function go(){return bi(),be}function vo(){return bi(),we}function bo(){return bi(),xe}function wo(){return bi(),ke}function xo(){return bi(),Ce}function ko(){return bi(),Ee}function Co(){return bi(),Se}function Eo(){return bi(),Te}function So(){return bi(),Oe}function To(){return bi(),Ne}function Oo(){return bi(),Pe}function No(){return bi(),Ie}function Po(){return bi(),Ae}function Io(){return bi(),Re}function Ao(){return bi(),je}function Ro(){return bi(),Le}function jo(){return bi(),ze}function Lo(){return bi(),De}function zo(){return bi(),Me}function Do(){return bi(),Be}function Mo(){return bi(),Fe}function Bo(){return bi(),Ue}function Fo(){return bi(),qe}function Uo(){return bi(),He}function qo(){return bi(),Ge}function Ho(){return bi(),Ke}function Go(){return bi(),Ve}function Ko(){return bi(),Ye}function Vo(){return bi(),We}function Yo(){return bi(),Xe}function Wo(){return bi(),Ze}function Xo(){return bi(),Je}function Zo(){return bi(),Qe}function Jo(){return bi(),tn}function Qo(){return bi(),en}function tr(){return bi(),nn}function er(){return bi(),on}function nr(){return bi(),rn}function ir(){return bi(),an}function or(){return bi(),sn}function rr(){return bi(),ln}function ar(){return bi(),un}function sr(){return bi(),cn}function lr(){return bi(),pn}function ur(){return bi(),hn}function cr(){return bi(),_n}function pr(){return bi(),dn}function hr(){return bi(),fn}function _r(){return bi(),mn}function dr(){return bi(),$n}function fr(){return bi(),yn}function mr(){return bi(),gn}function $r(){return bi(),vn}function yr(){return bi(),bn}function gr(){return bi(),wn}function vr(){return bi(),xn}function br(){return bi(),kn}function wr(){return bi(),Cn}function xr(){return bi(),En}function kr(){return bi(),Sn}function Cr(){return bi(),Tn}function Er(){return bi(),On}function Sr(){return bi(),Nn}function Tr(){return bi(),Pn}function Or(){return bi(),In}function Nr(){return bi(),An}function Pr(){return bi(),Rn}function Ir(){return bi(),jn}function Ar(){return bi(),Ln}function Rr(){return bi(),zn}function jr(){return bi(),Dn}function Lr(){return bi(),Mn}function zr(){return bi(),Bn}function Dr(){return bi(),Fn}function Mr(){return bi(),Un}function Br(){return bi(),qn}function Fr(){return bi(),Hn}function Ur(){return bi(),Gn}function qr(){return bi(),Kn}function Hr(){return bi(),Vn}function Gr(){return bi(),Yn}function Kr(){return bi(),Wn}function Vr(){return bi(),Xn}function Yr(){return bi(),Zn}function Wr(){return bi(),Jn}function Xr(){return bi(),Qn}function Zr(){return bi(),ti}function Jr(){return bi(),ei}function Qr(){return bi(),ni}function ta(){return bi(),ii}function ea(){return bi(),oi}function na(){return bi(),ri}function ia(){return bi(),ai}function oa(){return bi(),si}function ra(){return bi(),li}function aa(){return bi(),ui}function sa(){return bi(),ci}function la(){return bi(),pi}function ua(){return bi(),hi}function ca(){ha=this,this.svgColorList_0=this.createSvgColorList_0()}function pa(t,e,n){this.myR_0=t,this.myG_0=e,this.myB_0=n}Object.defineProperty(bt.prototype,"elementName",{configurable:!0,get:function(){return"clipPath"}}),Object.defineProperty(bt.prototype,"bBox",{configurable:!0,get:function(){return v(this.container().getPeer()).getBBox_7snaev$(this)}}),bt.prototype.clipPathUnits=function(){return this.getAttribute_mumjwj$(di().CLIP_PATH_UNITS_0)},bt.prototype.transform=function(){return this.getAttribute_mumjwj$(Iu().TRANSFORM)},bt.prototype.pointToTransformedCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).invertTransform_12yub8$(this,t)},bt.prototype.pointToAbsoluteCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).applyTransform_12yub8$(this,t)},fi.prototype.toString=function(){return this.myAttributeString_ss0dpy$_0},fi.$metadata$={kind:f,simpleName:"ClipPathUnits",interfaces:[b]},fi.values=function(){return[$i(),yi()]},fi.valueOf_61zpoe$=function(t){switch(t){case"USER_SPACE_ON_USE":return $i();case"OBJECT_BOUNDING_BOX":return yi();default:w("No enum constant jetbrains.datalore.vis.svg.SvgClipPathElement.ClipPathUnits."+t)}},bt.$metadata$={kind:f,simpleName:"SvgClipPathElement",interfaces:[Ou,Ga]},gi.$metadata$={kind:x,simpleName:"SvgColor",interfaces:[]},vi.prototype.toString=function(){return this.literal_7kwssz$_0},ca.prototype.createSvgColorList_0=function(){var t,e=k(),n=da();for(t=0;t!==n.length;++t){var i=n[t],o=i.toString().toLowerCase();e.put_xwzc9p$(o,i)}return e},ca.prototype.isColorName_61zpoe$=function(t){return this.svgColorList_0.containsKey_11rb$(t.toLowerCase())},ca.prototype.forName_61zpoe$=function(t){var e;if(null==(e=this.svgColorList_0.get_11rb$(t.toLowerCase())))throw C();return e},ca.prototype.create_qt1dr2$=function(t,e,n){return new pa(t,e,n)},ca.prototype.create_2160e9$=function(t){return null==t?la():new pa(t.red,t.green,t.blue)},pa.prototype.toString=function(){return"rgb("+this.myR_0+","+this.myG_0+","+this.myB_0+")"},pa.$metadata$={kind:f,simpleName:"SvgColorRgb",interfaces:[gi]},pa.prototype.component1_0=function(){return this.myR_0},pa.prototype.component2_0=function(){return this.myG_0},pa.prototype.component3_0=function(){return this.myB_0},pa.prototype.copy_qt1dr2$=function(t,e,n){return new pa(void 0===t?this.myR_0:t,void 0===e?this.myG_0:e,void 0===n?this.myB_0:n)},pa.prototype.hashCode=function(){var t=0;return 31*(t=31*(t=31*t+e.hashCode(this.myR_0)|0)+e.hashCode(this.myG_0)|0)+e.hashCode(this.myB_0)|0},pa.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.myR_0,t.myR_0)&&e.equals(this.myG_0,t.myG_0)&&e.equals(this.myB_0,t.myB_0)},ca.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var ha=null;function _a(){return bi(),null===ha&&new ca,ha}function da(){return[wi(),xi(),ki(),Ci(),Ei(),Si(),Ti(),Oi(),Ni(),Pi(),Ii(),Ai(),Ri(),ji(),Li(),zi(),Di(),Mi(),Bi(),Fi(),Ui(),qi(),Hi(),Gi(),Ki(),Vi(),Yi(),Wi(),Xi(),Zi(),Ji(),Qi(),to(),eo(),no(),io(),oo(),ro(),ao(),so(),lo(),uo(),co(),po(),ho(),_o(),fo(),mo(),$o(),yo(),go(),vo(),bo(),wo(),xo(),ko(),Co(),Eo(),So(),To(),Oo(),No(),Po(),Io(),Ao(),Ro(),jo(),Lo(),zo(),Do(),Mo(),Bo(),Fo(),Uo(),qo(),Ho(),Go(),Ko(),Vo(),Yo(),Wo(),Xo(),Zo(),Jo(),Qo(),tr(),er(),nr(),ir(),or(),rr(),ar(),sr(),lr(),ur(),cr(),pr(),hr(),_r(),dr(),fr(),mr(),$r(),yr(),gr(),vr(),br(),wr(),xr(),kr(),Cr(),Er(),Sr(),Tr(),Or(),Nr(),Pr(),Ir(),Ar(),Rr(),jr(),Lr(),zr(),Dr(),Mr(),Br(),Fr(),Ur(),qr(),Hr(),Gr(),Kr(),Vr(),Yr(),Wr(),Xr(),Zr(),Jr(),Qr(),ta(),ea(),na(),ia(),oa(),ra(),aa(),sa(),la(),ua()]}function fa(){ma=this,this.WIDTH="width",this.HEIGHT="height",this.SVG_TEXT_ANCHOR_ATTRIBUTE="text-anchor",this.SVG_STROKE_DASHARRAY_ATTRIBUTE="stroke-dasharray",this.SVG_STYLE_ATTRIBUTE="style",this.SVG_TEXT_DY_ATTRIBUTE="dy",this.SVG_TEXT_ANCHOR_START="start",this.SVG_TEXT_ANCHOR_MIDDLE="middle",this.SVG_TEXT_ANCHOR_END="end",this.SVG_TEXT_DY_TOP="0.7em",this.SVG_TEXT_DY_CENTER="0.35em"}vi.$metadata$={kind:f,simpleName:"SvgColors",interfaces:[gi,b]},vi.values=da,vi.valueOf_61zpoe$=function(t){switch(t){case"ALICE_BLUE":return wi();case"ANTIQUE_WHITE":return xi();case"AQUA":return ki();case"AQUAMARINE":return Ci();case"AZURE":return Ei();case"BEIGE":return Si();case"BISQUE":return Ti();case"BLACK":return Oi();case"BLANCHED_ALMOND":return Ni();case"BLUE":return Pi();case"BLUE_VIOLET":return Ii();case"BROWN":return Ai();case"BURLY_WOOD":return Ri();case"CADET_BLUE":return ji();case"CHARTREUSE":return Li();case"CHOCOLATE":return zi();case"CORAL":return Di();case"CORNFLOWER_BLUE":return Mi();case"CORNSILK":return Bi();case"CRIMSON":return Fi();case"CYAN":return Ui();case"DARK_BLUE":return qi();case"DARK_CYAN":return Hi();case"DARK_GOLDEN_ROD":return Gi();case"DARK_GRAY":return Ki();case"DARK_GREEN":return Vi();case"DARK_GREY":return Yi();case"DARK_KHAKI":return Wi();case"DARK_MAGENTA":return Xi();case"DARK_OLIVE_GREEN":return Zi();case"DARK_ORANGE":return Ji();case"DARK_ORCHID":return Qi();case"DARK_RED":return to();case"DARK_SALMON":return eo();case"DARK_SEA_GREEN":return no();case"DARK_SLATE_BLUE":return io();case"DARK_SLATE_GRAY":return oo();case"DARK_SLATE_GREY":return ro();case"DARK_TURQUOISE":return ao();case"DARK_VIOLET":return so();case"DEEP_PINK":return lo();case"DEEP_SKY_BLUE":return uo();case"DIM_GRAY":return co();case"DIM_GREY":return po();case"DODGER_BLUE":return ho();case"FIRE_BRICK":return _o();case"FLORAL_WHITE":return fo();case"FOREST_GREEN":return mo();case"FUCHSIA":return $o();case"GAINSBORO":return yo();case"GHOST_WHITE":return go();case"GOLD":return vo();case"GOLDEN_ROD":return bo();case"GRAY":return wo();case"GREY":return xo();case"GREEN":return ko();case"GREEN_YELLOW":return Co();case"HONEY_DEW":return Eo();case"HOT_PINK":return So();case"INDIAN_RED":return To();case"INDIGO":return Oo();case"IVORY":return No();case"KHAKI":return Po();case"LAVENDER":return Io();case"LAVENDER_BLUSH":return Ao();case"LAWN_GREEN":return Ro();case"LEMON_CHIFFON":return jo();case"LIGHT_BLUE":return Lo();case"LIGHT_CORAL":return zo();case"LIGHT_CYAN":return Do();case"LIGHT_GOLDEN_ROD_YELLOW":return Mo();case"LIGHT_GRAY":return Bo();case"LIGHT_GREEN":return Fo();case"LIGHT_GREY":return Uo();case"LIGHT_PINK":return qo();case"LIGHT_SALMON":return Ho();case"LIGHT_SEA_GREEN":return Go();case"LIGHT_SKY_BLUE":return Ko();case"LIGHT_SLATE_GRAY":return Vo();case"LIGHT_SLATE_GREY":return Yo();case"LIGHT_STEEL_BLUE":return Wo();case"LIGHT_YELLOW":return Xo();case"LIME":return Zo();case"LIME_GREEN":return Jo();case"LINEN":return Qo();case"MAGENTA":return tr();case"MAROON":return er();case"MEDIUM_AQUA_MARINE":return nr();case"MEDIUM_BLUE":return ir();case"MEDIUM_ORCHID":return or();case"MEDIUM_PURPLE":return rr();case"MEDIUM_SEAGREEN":return ar();case"MEDIUM_SLATE_BLUE":return sr();case"MEDIUM_SPRING_GREEN":return lr();case"MEDIUM_TURQUOISE":return ur();case"MEDIUM_VIOLET_RED":return cr();case"MIDNIGHT_BLUE":return pr();case"MINT_CREAM":return hr();case"MISTY_ROSE":return _r();case"MOCCASIN":return dr();case"NAVAJO_WHITE":return fr();case"NAVY":return mr();case"OLD_LACE":return $r();case"OLIVE":return yr();case"OLIVE_DRAB":return gr();case"ORANGE":return vr();case"ORANGE_RED":return br();case"ORCHID":return wr();case"PALE_GOLDEN_ROD":return xr();case"PALE_GREEN":return kr();case"PALE_TURQUOISE":return Cr();case"PALE_VIOLET_RED":return Er();case"PAPAYA_WHIP":return Sr();case"PEACH_PUFF":return Tr();case"PERU":return Or();case"PINK":return Nr();case"PLUM":return Pr();case"POWDER_BLUE":return Ir();case"PURPLE":return Ar();case"RED":return Rr();case"ROSY_BROWN":return jr();case"ROYAL_BLUE":return Lr();case"SADDLE_BROWN":return zr();case"SALMON":return Dr();case"SANDY_BROWN":return Mr();case"SEA_GREEN":return Br();case"SEASHELL":return Fr();case"SIENNA":return Ur();case"SILVER":return qr();case"SKY_BLUE":return Hr();case"SLATE_BLUE":return Gr();case"SLATE_GRAY":return Kr();case"SLATE_GREY":return Vr();case"SNOW":return Yr();case"SPRING_GREEN":return Wr();case"STEEL_BLUE":return Xr();case"TAN":return Zr();case"TEAL":return Jr();case"THISTLE":return Qr();case"TOMATO":return ta();case"TURQUOISE":return ea();case"VIOLET":return na();case"WHEAT":return ia();case"WHITE":return oa();case"WHITE_SMOKE":return ra();case"YELLOW":return aa();case"YELLOW_GREEN":return sa();case"NONE":return la();case"CURRENT_COLOR":return ua();default:w("No enum constant jetbrains.datalore.vis.svg.SvgColors."+t)}},fa.$metadata$={kind:d,simpleName:"SvgConstants",interfaces:[]};var ma=null;function $a(){return null===ma&&new fa,ma}function ya(){ba()}function ga(){va=this,this.OPACITY=mt().createSpec_ytbaoo$("opacity"),this.CLIP_PATH=mt().createSpec_ytbaoo$("clip-path")}ga.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var va=null;function ba(){return null===va&&new ga,va}function wa(){}function xa(){Ga.call(this),this.elementName_ohv755$_0="defs"}function ka(){Sa(),Js.call(this),this.myAttributes_9lwppr$_0=new Ia(this),this.myListeners_acqj1r$_0=null,this.myEventPeer_bxokaa$_0=new Da}function Ca(){Ea=this,this.ID=mt().createSpec_ytbaoo$("id")}ya.$metadata$={kind:x,simpleName:"SvgContainer",interfaces:[]},wa.$metadata$={kind:x,simpleName:"SvgCssResource",interfaces:[]},Object.defineProperty(xa.prototype,"elementName",{configurable:!0,get:function(){return this.elementName_ohv755$_0}}),Object.defineProperty(xa.prototype,"bBox",{configurable:!0,get:function(){return v(this.container().getPeer()).getBBox_7snaev$(this)}}),xa.prototype.transform=function(){return this.getAttribute_mumjwj$(Iu().TRANSFORM)},xa.prototype.pointToTransformedCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).invertTransform_12yub8$(this,t)},xa.prototype.pointToAbsoluteCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).applyTransform_12yub8$(this,t)},xa.$metadata$={kind:f,simpleName:"SvgDefsElement",interfaces:[Ou,ya,Ga]},Ca.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var Ea=null;function Sa(){return null===Ea&&new Ca,Ea}function Ta(t,e){this.closure$spec=t,this.this$SvgElement=e}function Oa(t,e){this.closure$spec=t,this.closure$handler=e}function Na(t){this.closure$event=t}function Pa(t,e){this.closure$reg=t,this.this$SvgElement=e,P.call(this)}function Ia(t){this.$outer=t,this.myAttrs_0=null}function Aa(){}function Ra(){za(),Ga.call(this),this.elementName_psynub$_0="ellipse"}function ja(){La=this,this.CX=mt().createSpec_ytbaoo$("cx"),this.CY=mt().createSpec_ytbaoo$("cy"),this.RX=mt().createSpec_ytbaoo$("rx"),this.RY=mt().createSpec_ytbaoo$("ry")}Object.defineProperty(ka.prototype,"ownerSvgElement",{configurable:!0,get:function(){for(var t,n=this;null!=n&&!e.isType(n,Ql);)n=n.parentProperty().get();return null!=n?null==(t=n)||e.isType(t,Ql)?t:m():null}}),Object.defineProperty(ka.prototype,"attributeKeys",{configurable:!0,get:function(){return this.myAttributes_9lwppr$_0.keySet()}}),ka.prototype.id=function(){return this.getAttribute_mumjwj$(Sa().ID)},ka.prototype.handlersSet=function(){return this.myEventPeer_bxokaa$_0.handlersSet()},ka.prototype.addEventHandler_mm8kk2$=function(t,e){return this.myEventPeer_bxokaa$_0.addEventHandler_mm8kk2$(t,e)},ka.prototype.dispatch_lgzia2$=function(t,n){var i;this.myEventPeer_bxokaa$_0.dispatch_2raoxs$(t,n,this),null!=this.parentProperty().get()&&!n.isConsumed&&e.isType(this.parentProperty().get(),ka)&&(e.isType(i=this.parentProperty().get(),ka)?i:m()).dispatch_lgzia2$(t,n)},ka.prototype.getSpecByName_o4z2a7$_0=function(t){return mt().createSpec_ytbaoo$(t)},Object.defineProperty(Ta.prototype,"propExpr",{configurable:!0,get:function(){return this.toString()+"."+this.closure$spec}}),Ta.prototype.get=function(){return this.this$SvgElement.myAttributes_9lwppr$_0.get_mumjwj$(this.closure$spec)},Ta.prototype.set_11rb$=function(t){this.this$SvgElement.myAttributes_9lwppr$_0.set_qdh7ux$(this.closure$spec,t)},Oa.prototype.onAttrSet_ud3ldc$=function(t){var n,i;if(this.closure$spec===t.attrSpec){var o=null==(n=t.oldValue)||e.isType(n,E)?n:m(),r=null==(i=t.newValue)||e.isType(i,E)?i:m();this.closure$handler.onEvent_11rb$(new S(o,r))}},Oa.$metadata$={kind:f,interfaces:[Aa]},Ta.prototype.addHandler_gxwwpc$=function(t){return this.this$SvgElement.addListener_e4m8w6$(new Oa(this.closure$spec,t))},Ta.$metadata$={kind:f,interfaces:[T]},ka.prototype.getAttribute_mumjwj$=function(t){return new Ta(t,this)},ka.prototype.getAttribute_61zpoe$=function(t){var e=this.getSpecByName_o4z2a7$_0(t);return this.getAttribute_mumjwj$(e)},ka.prototype.setAttribute_qdh7ux$=function(t,e){this.getAttribute_mumjwj$(t).set_11rb$(e)},ka.prototype.setAttribute_jyasbz$=function(t,e){this.getAttribute_61zpoe$(t).set_11rb$(e)},Na.prototype.call_11rb$=function(t){t.onAttrSet_ud3ldc$(this.closure$event)},Na.$metadata$={kind:f,interfaces:[O]},ka.prototype.onAttributeChanged_2oaikr$_0=function(t){null!=this.myListeners_acqj1r$_0&&v(this.myListeners_acqj1r$_0).fire_kucmxw$(new Na(t)),this.isAttached()&&this.container().attributeChanged_1u4bot$(this,t)},Pa.prototype.doRemove=function(){this.closure$reg.remove(),v(this.this$SvgElement.myListeners_acqj1r$_0).isEmpty&&(this.this$SvgElement.myListeners_acqj1r$_0=null)},Pa.$metadata$={kind:f,interfaces:[P]},ka.prototype.addListener_e4m8w6$=function(t){return null==this.myListeners_acqj1r$_0&&(this.myListeners_acqj1r$_0=new N),new Pa(v(this.myListeners_acqj1r$_0).add_11rb$(t),this)},ka.prototype.toString=function(){return"<"+this.elementName+" "+this.myAttributes_9lwppr$_0.toSvgString_8be2vx$()+">"},Object.defineProperty(Ia.prototype,"isEmpty",{configurable:!0,get:function(){return null==this.myAttrs_0||v(this.myAttrs_0).isEmpty}}),Ia.prototype.size=function(){return null==this.myAttrs_0?0:v(this.myAttrs_0).size()},Ia.prototype.containsKey_p8ci7$=function(t){return null!=this.myAttrs_0&&v(this.myAttrs_0).containsKey_11rb$(t)},Ia.prototype.get_mumjwj$=function(t){var n;return null!=this.myAttrs_0&&v(this.myAttrs_0).containsKey_11rb$(t)?null==(n=v(this.myAttrs_0).get_11rb$(t))||e.isType(n,E)?n:m():null},Ia.prototype.set_qdh7ux$=function(t,n){var i,o;null==this.myAttrs_0&&(this.myAttrs_0=new I);var r=null==n?null==(i=v(this.myAttrs_0).remove_11rb$(t))||e.isType(i,E)?i:m():null==(o=v(this.myAttrs_0).put_xwzc9p$(t,n))||e.isType(o,E)?o:m();if(!c(n,r)){var a=new Ku(t,r,n);this.$outer.onAttributeChanged_2oaikr$_0(a)}return r},Ia.prototype.remove_mumjwj$=function(t){return this.set_qdh7ux$(t,null)},Ia.prototype.keySet=function(){return null==this.myAttrs_0?A():v(this.myAttrs_0).keySet()},Ia.prototype.toSvgString_8be2vx$=function(){var t,e=o();for(t=this.keySet().iterator();t.hasNext();){var n=t.next();e.append_pdl1vj$(n.name).append_pdl1vj$('="').append_s8jyv4$(this.get_mumjwj$(n)).append_pdl1vj$('" ')}return e.toString()},Ia.prototype.toString=function(){return this.toSvgString_8be2vx$()},Ia.$metadata$={kind:f,simpleName:"AttributeMap",interfaces:[]},ka.$metadata$={kind:f,simpleName:"SvgElement",interfaces:[Js]},Aa.$metadata$={kind:x,simpleName:"SvgElementListener",interfaces:[]},ja.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var La=null;function za(){return null===La&&new ja,La}function Da(){this.myEventHandlers_0=null,this.myListeners_0=null}function Ma(t){this.this$SvgEventPeer=t}function Ba(t,e){this.closure$addReg=t,this.this$SvgEventPeer=e,P.call(this)}function Fa(t,e,n,i){this.closure$addReg=t,this.closure$specListeners=e,this.closure$eventHandlers=n,this.closure$spec=i,P.call(this)}function Ua(t,e){this.closure$oldHandlersSet=t,this.this$SvgEventPeer=e}function qa(t,e){this.closure$event=t,this.closure$target=e}function Ha(){Ga.call(this),this.elementName_84zyy2$_0="g"}function Ga(){ls(),Yl.call(this)}function Ka(){ss=this,this.POINTER_EVENTS_0=mt().createSpec_ytbaoo$("pointer-events"),this.OPACITY=mt().createSpec_ytbaoo$("opacity"),this.VISIBILITY=mt().createSpec_ytbaoo$("visibility"),this.CLIP_PATH=mt().createSpec_ytbaoo$("clip-path"),this.CLIP_BOUNDS_JFX=mt().createSpec_ytbaoo$("clip-bounds-jfx")}Object.defineProperty(Ra.prototype,"elementName",{configurable:!0,get:function(){return this.elementName_psynub$_0}}),Object.defineProperty(Ra.prototype,"bBox",{configurable:!0,get:function(){return v(this.container().getPeer()).getBBox_7snaev$(this)}}),Ra.prototype.cx=function(){return this.getAttribute_mumjwj$(za().CX)},Ra.prototype.cy=function(){return this.getAttribute_mumjwj$(za().CY)},Ra.prototype.rx=function(){return this.getAttribute_mumjwj$(za().RX)},Ra.prototype.ry=function(){return this.getAttribute_mumjwj$(za().RY)},Ra.prototype.transform=function(){return this.getAttribute_mumjwj$(Iu().TRANSFORM)},Ra.prototype.fill=function(){return this.getAttribute_mumjwj$(Vl().FILL)},Ra.prototype.fillColor=function(){return Lu().colorAttributeTransform_dc5zq8$(this.fill(),this.fillOpacity())},Ra.prototype.fillOpacity=function(){return this.getAttribute_mumjwj$(Vl().FILL_OPACITY)},Ra.prototype.stroke=function(){return this.getAttribute_mumjwj$(Vl().STROKE)},Ra.prototype.strokeColor=function(){return Lu().colorAttributeTransform_dc5zq8$(this.stroke(),this.strokeOpacity())},Ra.prototype.strokeOpacity=function(){return this.getAttribute_mumjwj$(Vl().STROKE_OPACITY)},Ra.prototype.strokeWidth=function(){return this.getAttribute_mumjwj$(Vl().STROKE_WIDTH)},Ra.prototype.pointToTransformedCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).invertTransform_12yub8$(this,t)},Ra.prototype.pointToAbsoluteCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).applyTransform_12yub8$(this,t)},Ra.$metadata$={kind:f,simpleName:"SvgEllipseElement",interfaces:[Hl,Ou,Ga]},Object.defineProperty(Ma.prototype,"propExpr",{configurable:!0,get:function(){return this.toString()+".handlersProp"}}),Ma.prototype.get=function(){return this.this$SvgEventPeer.handlersKeySet_0()},Ba.prototype.doRemove=function(){this.closure$addReg.remove(),v(this.this$SvgEventPeer.myListeners_0).isEmpty&&(this.this$SvgEventPeer.myListeners_0=null)},Ba.$metadata$={kind:f,interfaces:[P]},Ma.prototype.addHandler_gxwwpc$=function(t){return null==this.this$SvgEventPeer.myListeners_0&&(this.this$SvgEventPeer.myListeners_0=new N),new Ba(v(this.this$SvgEventPeer.myListeners_0).add_11rb$(t),this.this$SvgEventPeer)},Ma.$metadata$={kind:f,interfaces:[R]},Da.prototype.handlersSet=function(){return new Ma(this)},Da.prototype.handlersKeySet_0=function(){return null==this.myEventHandlers_0?A():v(this.myEventHandlers_0).keys},Fa.prototype.doRemove=function(){this.closure$addReg.remove(),this.closure$specListeners.isEmpty&&this.closure$eventHandlers.remove_11rb$(this.closure$spec)},Fa.$metadata$={kind:f,interfaces:[P]},Ua.prototype.call_11rb$=function(t){t.onEvent_11rb$(new S(this.closure$oldHandlersSet,this.this$SvgEventPeer.handlersKeySet_0()))},Ua.$metadata$={kind:f,interfaces:[O]},Da.prototype.addEventHandler_mm8kk2$=function(t,e){var n;null==this.myEventHandlers_0&&(this.myEventHandlers_0=k());var i=v(this.myEventHandlers_0);if(!i.containsKey_11rb$(t)){var o=new N;i.put_xwzc9p$(t,o)}var r=i.keys,a=v(i.get_11rb$(t)),s=new Fa(a.add_11rb$(e),a,i,t);return null!=(n=this.myListeners_0)&&n.fire_kucmxw$(new Ua(r,this)),s},qa.prototype.call_11rb$=function(t){var n;this.closure$event.isConsumed||(e.isType(n=t,Vu)?n:m()).handle_42da0z$(this.closure$target,this.closure$event)},qa.$metadata$={kind:f,interfaces:[O]},Da.prototype.dispatch_2raoxs$=function(t,e,n){null!=this.myEventHandlers_0&&v(this.myEventHandlers_0).containsKey_11rb$(t)&&v(v(this.myEventHandlers_0).get_11rb$(t)).fire_kucmxw$(new qa(e,n))},Da.$metadata$={kind:f,simpleName:"SvgEventPeer",interfaces:[]},Object.defineProperty(Ha.prototype,"elementName",{configurable:!0,get:function(){return this.elementName_84zyy2$_0}}),Object.defineProperty(Ha.prototype,"bBox",{configurable:!0,get:function(){return v(this.container().getPeer()).getBBox_7snaev$(this)}}),Ha.prototype.transform=function(){return this.getAttribute_mumjwj$(Iu().TRANSFORM)},Ha.prototype.pointToTransformedCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).invertTransform_12yub8$(this,t)},Ha.prototype.pointToAbsoluteCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).applyTransform_12yub8$(this,t)},Ha.$metadata$={kind:f,simpleName:"SvgGElement",interfaces:[ya,Ou,Ga]},Ka.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var Va,Ya,Wa,Xa,Za,Ja,Qa,ts,es,ns,is,os,rs,as,ss=null;function ls(){return null===ss&&new Ka,ss}function us(t,e,n){b.call(this),this.myAttributeString_wpy0pw$_0=n,this.name$=t,this.ordinal$=e}function cs(){cs=function(){},Va=new us("VISIBLE_PAINTED",0,"visiblePainted"),Ya=new us("VISIBLE_FILL",1,"visibleFill"),Wa=new us("VISIBLE_STROKE",2,"visibleStroke"),Xa=new us("VISIBLE",3,"visible"),Za=new us("PAINTED",4,"painted"),Ja=new us("FILL",5,"fill"),Qa=new us("STROKE",6,"stroke"),ts=new us("ALL",7,"all"),es=new us("NONE",8,"none"),ns=new us("INHERIT",9,"inherit")}function ps(){return cs(),Va}function hs(){return cs(),Ya}function _s(){return cs(),Wa}function ds(){return cs(),Xa}function fs(){return cs(),Za}function ms(){return cs(),Ja}function $s(){return cs(),Qa}function ys(){return cs(),ts}function gs(){return cs(),es}function vs(){return cs(),ns}function bs(t,e,n){b.call(this),this.myAttrString_w3r471$_0=n,this.name$=t,this.ordinal$=e}function ws(){ws=function(){},is=new bs("VISIBLE",0,"visible"),os=new bs("HIDDEN",1,"hidden"),rs=new bs("COLLAPSE",2,"collapse"),as=new bs("INHERIT",3,"inherit")}function xs(){return ws(),is}function ks(){return ws(),os}function Cs(){return ws(),rs}function Es(){return ws(),as}function Ss(t){this.myElementId_0=t}function Ts(){Ps(),Ga.call(this),this.elementName_r17hoq$_0="image",this.setAttribute_qdh7ux$(Ps().PRESERVE_ASPECT_RATIO,"none"),this.setAttribute_jyasbz$($a().SVG_STYLE_ATTRIBUTE,"image-rendering: pixelated;image-rendering: crisp-edges;")}function Os(){Ns=this,this.X=mt().createSpec_ytbaoo$("x"),this.Y=mt().createSpec_ytbaoo$("y"),this.WIDTH=mt().createSpec_ytbaoo$($a().WIDTH),this.HEIGHT=mt().createSpec_ytbaoo$($a().HEIGHT),this.HREF=mt().createSpecNS_wswq18$("href",Gu().XLINK_PREFIX,Gu().XLINK_NAMESPACE_URI),this.PRESERVE_ASPECT_RATIO=mt().createSpec_ytbaoo$("preserveAspectRatio")}Ga.prototype.pointerEvents=function(){return this.getAttribute_mumjwj$(ls().POINTER_EVENTS_0)},Ga.prototype.opacity=function(){return this.getAttribute_mumjwj$(ls().OPACITY)},Ga.prototype.visibility=function(){return this.getAttribute_mumjwj$(ls().VISIBILITY)},Ga.prototype.clipPath=function(){return this.getAttribute_mumjwj$(ls().CLIP_PATH)},us.prototype.toString=function(){return this.myAttributeString_wpy0pw$_0},us.$metadata$={kind:f,simpleName:"PointerEvents",interfaces:[b]},us.values=function(){return[ps(),hs(),_s(),ds(),fs(),ms(),$s(),ys(),gs(),vs()]},us.valueOf_61zpoe$=function(t){switch(t){case"VISIBLE_PAINTED":return ps();case"VISIBLE_FILL":return hs();case"VISIBLE_STROKE":return _s();case"VISIBLE":return ds();case"PAINTED":return fs();case"FILL":return ms();case"STROKE":return $s();case"ALL":return ys();case"NONE":return gs();case"INHERIT":return vs();default:w("No enum constant jetbrains.datalore.vis.svg.SvgGraphicsElement.PointerEvents."+t)}},bs.prototype.toString=function(){return this.myAttrString_w3r471$_0},bs.$metadata$={kind:f,simpleName:"Visibility",interfaces:[b]},bs.values=function(){return[xs(),ks(),Cs(),Es()]},bs.valueOf_61zpoe$=function(t){switch(t){case"VISIBLE":return xs();case"HIDDEN":return ks();case"COLLAPSE":return Cs();case"INHERIT":return Es();default:w("No enum constant jetbrains.datalore.vis.svg.SvgGraphicsElement.Visibility."+t)}},Ga.$metadata$={kind:f,simpleName:"SvgGraphicsElement",interfaces:[Yl]},Ss.prototype.toString=function(){return"url(#"+this.myElementId_0+")"},Ss.$metadata$={kind:f,simpleName:"SvgIRI",interfaces:[]},Os.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var Ns=null;function Ps(){return null===Ns&&new Os,Ns}function Is(t,e,n,i,o){return o=o||Object.create(Ts.prototype),Ts.call(o),o.setAttribute_qdh7ux$(Ps().X,t),o.setAttribute_qdh7ux$(Ps().Y,e),o.setAttribute_qdh7ux$(Ps().WIDTH,n),o.setAttribute_qdh7ux$(Ps().HEIGHT,i),o}function As(t,e,n,i,o){Is(t,e,n,i,this),this.myBitmap_0=o}function Rs(t,e){this.closure$hrefProp=t,this.this$SvgImageElementEx=e}function js(){}function Ls(t,e,n){this.width=t,this.height=e,this.argbValues=n.slice()}function zs(){Xs(),Ga.call(this),this.elementName_7igd9t$_0="line"}function Ds(){Ws=this,this.X1=mt().createSpec_ytbaoo$("x1"),this.Y1=mt().createSpec_ytbaoo$("y1"),this.X2=mt().createSpec_ytbaoo$("x2"),this.Y2=mt().createSpec_ytbaoo$("y2")}Object.defineProperty(Ts.prototype,"elementName",{configurable:!0,get:function(){return this.elementName_r17hoq$_0}}),Object.defineProperty(Ts.prototype,"bBox",{configurable:!0,get:function(){return v(this.container().getPeer()).getBBox_7snaev$(this)}}),Ts.prototype.x=function(){return this.getAttribute_mumjwj$(Ps().X)},Ts.prototype.y=function(){return this.getAttribute_mumjwj$(Ps().Y)},Ts.prototype.width=function(){return this.getAttribute_mumjwj$(Ps().WIDTH)},Ts.prototype.height=function(){return this.getAttribute_mumjwj$(Ps().HEIGHT)},Ts.prototype.href=function(){return this.getAttribute_mumjwj$(Ps().HREF)},Ts.prototype.preserveAspectRatio=function(){return this.getAttribute_mumjwj$(Ps().PRESERVE_ASPECT_RATIO)},Ts.prototype.transform=function(){return this.getAttribute_mumjwj$(Iu().TRANSFORM)},Ts.prototype.pointToTransformedCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).invertTransform_12yub8$(this,t)},Ts.prototype.pointToAbsoluteCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).applyTransform_12yub8$(this,t)},Ts.$metadata$={kind:f,simpleName:"SvgImageElement",interfaces:[Ou,Ga]},Object.defineProperty(Rs.prototype,"propExpr",{configurable:!0,get:function(){return this.closure$hrefProp.propExpr}}),Rs.prototype.get=function(){return this.closure$hrefProp.get()},Rs.prototype.addHandler_gxwwpc$=function(t){return this.closure$hrefProp.addHandler_gxwwpc$(t)},Rs.prototype.set_11rb$=function(t){throw j("href property is read-only in "+e.getKClassFromExpression(this.this$SvgImageElementEx).simpleName)},Rs.$metadata$={kind:f,interfaces:[T]},As.prototype.href=function(){return new Rs(Ts.prototype.href.call(this),this)},As.prototype.asImageElement_xhdger$=function(t){var e=new Ts;Lu().copyAttributes_azdp7k$(this,e);var n=t.toDataUrl_nps3vt$(this.myBitmap_0.width,this.myBitmap_0.height,this.myBitmap_0.argbValues);return e.href().set_11rb$(n),e},js.$metadata$={kind:x,simpleName:"RGBEncoder",interfaces:[]},Ls.$metadata$={kind:f,simpleName:"Bitmap",interfaces:[]},As.$metadata$={kind:f,simpleName:"SvgImageElementEx",interfaces:[Ts]},Ds.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var Ms,Bs,Fs,Us,qs,Hs,Gs,Ks,Vs,Ys,Ws=null;function Xs(){return null===Ws&&new Ds,Ws}function Zs(){}function Js(){D.call(this),this.myContainer_rnn3uj$_0=null,this.myChildren_jvkzg9$_0=null,this.isPrebuiltSubtree=!1}function Qs(t,e){this.$outer=t,z.call(this,e)}function tl(t){this.mySvgRoot_0=new ol(this,t),this.myListeners_0=new N,this.myPeer_0=null,this.mySvgRoot_0.get().attach_1gwaml$(this)}function el(t,e){this.closure$element=t,this.closure$event=e}function nl(t){this.closure$node=t}function il(t){this.closure$node=t}function ol(t,e){this.this$SvgNodeContainer=t,B.call(this,e)}function rl(t){Sl(),this.myPathData_0=t}function al(t,e,n){b.call(this),this.myChar_90i289$_0=n,this.name$=t,this.ordinal$=e}function sl(){sl=function(){},Ms=new al("MOVE_TO",0,109),Bs=new al("LINE_TO",1,108),Fs=new al("HORIZONTAL_LINE_TO",2,104),Us=new al("VERTICAL_LINE_TO",3,118),qs=new al("CURVE_TO",4,99),Hs=new al("SMOOTH_CURVE_TO",5,115),Gs=new al("QUADRATIC_BEZIER_CURVE_TO",6,113),Ks=new al("SMOOTH_QUADRATIC_BEZIER_CURVE_TO",7,116),Vs=new al("ELLIPTICAL_ARC",8,97),Ys=new al("CLOSE_PATH",9,122),vl()}function ll(){return sl(),Ms}function ul(){return sl(),Bs}function cl(){return sl(),Fs}function pl(){return sl(),Us}function hl(){return sl(),qs}function _l(){return sl(),Hs}function dl(){return sl(),Gs}function fl(){return sl(),Ks}function ml(){return sl(),Vs}function $l(){return sl(),Ys}function yl(){var t,e;for(gl=this,this.MAP_0=k(),t=bl(),e=0;e!==t.length;++e){var n=t[e],i=this.MAP_0,o=n.absoluteCmd();i.put_xwzc9p$(o,n);var r=this.MAP_0,a=n.relativeCmd();r.put_xwzc9p$(a,n)}}Object.defineProperty(zs.prototype,"elementName",{configurable:!0,get:function(){return this.elementName_7igd9t$_0}}),Object.defineProperty(zs.prototype,"bBox",{configurable:!0,get:function(){return v(this.container().getPeer()).getBBox_7snaev$(this)}}),zs.prototype.x1=function(){return this.getAttribute_mumjwj$(Xs().X1)},zs.prototype.y1=function(){return this.getAttribute_mumjwj$(Xs().Y1)},zs.prototype.x2=function(){return this.getAttribute_mumjwj$(Xs().X2)},zs.prototype.y2=function(){return this.getAttribute_mumjwj$(Xs().Y2)},zs.prototype.transform=function(){return this.getAttribute_mumjwj$(Iu().TRANSFORM)},zs.prototype.fill=function(){return this.getAttribute_mumjwj$(Vl().FILL)},zs.prototype.fillColor=function(){return Lu().colorAttributeTransform_dc5zq8$(this.fill(),this.fillOpacity())},zs.prototype.fillOpacity=function(){return this.getAttribute_mumjwj$(Vl().FILL_OPACITY)},zs.prototype.stroke=function(){return this.getAttribute_mumjwj$(Vl().STROKE)},zs.prototype.strokeColor=function(){return Lu().colorAttributeTransform_dc5zq8$(this.stroke(),this.strokeOpacity())},zs.prototype.strokeOpacity=function(){return this.getAttribute_mumjwj$(Vl().STROKE_OPACITY)},zs.prototype.strokeWidth=function(){return this.getAttribute_mumjwj$(Vl().STROKE_WIDTH)},zs.prototype.pointToTransformedCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).invertTransform_12yub8$(this,t)},zs.prototype.pointToAbsoluteCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).applyTransform_12yub8$(this,t)},zs.$metadata$={kind:f,simpleName:"SvgLineElement",interfaces:[Hl,Ou,Ga]},Zs.$metadata$={kind:x,simpleName:"SvgLocatable",interfaces:[]},Js.prototype.isAttached=function(){return null!=this.myContainer_rnn3uj$_0},Js.prototype.container=function(){return v(this.myContainer_rnn3uj$_0)},Js.prototype.children=function(){var t;return null==this.myChildren_jvkzg9$_0&&(this.myChildren_jvkzg9$_0=new Qs(this,this)),e.isType(t=this.myChildren_jvkzg9$_0,L)?t:m()},Js.prototype.attach_1gwaml$=function(t){var e;if(this.isAttached())throw j("Svg element is already attached");for(e=this.children().iterator();e.hasNext();)e.next().attach_1gwaml$(t);this.myContainer_rnn3uj$_0=t,v(this.myContainer_rnn3uj$_0).svgNodeAttached_vvfmut$(this)},Js.prototype.detach_8be2vx$=function(){var t;if(!this.isAttached())throw j("Svg element is not attached");for(t=this.children().iterator();t.hasNext();)t.next().detach_8be2vx$();v(this.myContainer_rnn3uj$_0).svgNodeDetached_vvfmut$(this),this.myContainer_rnn3uj$_0=null},Qs.prototype.beforeItemAdded_wxm5ur$=function(t,e){this.$outer.isAttached()&&e.attach_1gwaml$(this.$outer.container()),z.prototype.beforeItemAdded_wxm5ur$.call(this,t,e)},Qs.prototype.beforeItemSet_hu11d4$=function(t,e,n){this.$outer.isAttached()&&(e.detach_8be2vx$(),n.attach_1gwaml$(this.$outer.container())),z.prototype.beforeItemSet_hu11d4$.call(this,t,e,n)},Qs.prototype.beforeItemRemoved_wxm5ur$=function(t,e){this.$outer.isAttached()&&e.detach_8be2vx$(),z.prototype.beforeItemRemoved_wxm5ur$.call(this,t,e)},Qs.$metadata$={kind:f,simpleName:"SvgChildList",interfaces:[z]},Js.$metadata$={kind:f,simpleName:"SvgNode",interfaces:[D]},tl.prototype.setPeer_kqs5uc$=function(t){this.myPeer_0=t},tl.prototype.getPeer=function(){return this.myPeer_0},tl.prototype.root=function(){return this.mySvgRoot_0},tl.prototype.addListener_6zkzfn$=function(t){return this.myListeners_0.add_11rb$(t)},el.prototype.call_11rb$=function(t){t.onAttributeSet_os9wmi$(this.closure$element,this.closure$event)},el.$metadata$={kind:f,interfaces:[O]},tl.prototype.attributeChanged_1u4bot$=function(t,e){this.myListeners_0.fire_kucmxw$(new el(t,e))},nl.prototype.call_11rb$=function(t){t.onNodeAttached_26jijc$(this.closure$node)},nl.$metadata$={kind:f,interfaces:[O]},tl.prototype.svgNodeAttached_vvfmut$=function(t){this.myListeners_0.fire_kucmxw$(new nl(t))},il.prototype.call_11rb$=function(t){t.onNodeDetached_26jijc$(this.closure$node)},il.$metadata$={kind:f,interfaces:[O]},tl.prototype.svgNodeDetached_vvfmut$=function(t){this.myListeners_0.fire_kucmxw$(new il(t))},ol.prototype.set_11rb$=function(t){this.get().detach_8be2vx$(),B.prototype.set_11rb$.call(this,t),t.attach_1gwaml$(this.this$SvgNodeContainer)},ol.$metadata$={kind:f,interfaces:[B]},tl.$metadata$={kind:f,simpleName:"SvgNodeContainer",interfaces:[]},al.prototype.relativeCmd=function(){return F(this.myChar_90i289$_0)},al.prototype.absoluteCmd=function(){return F(U(this.myChar_90i289$_0))},yl.prototype.get_s8itvh$=function(t){if(this.MAP_0.containsKey_11rb$(F(t)))return v(this.MAP_0.get_11rb$(F(t)));throw H("No enum constant "+r(q(al))+"@myChar."+String.fromCharCode(F(t)))},yl.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var gl=null;function vl(){return sl(),null===gl&&new yl,gl}function bl(){return[ll(),ul(),cl(),pl(),hl(),_l(),dl(),fl(),ml(),$l()]}function wl(){El=this,this.EMPTY=new rl("")}al.$metadata$={kind:f,simpleName:"Action",interfaces:[b]},al.values=bl,al.valueOf_61zpoe$=function(t){switch(t){case"MOVE_TO":return ll();case"LINE_TO":return ul();case"HORIZONTAL_LINE_TO":return cl();case"VERTICAL_LINE_TO":return pl();case"CURVE_TO":return hl();case"SMOOTH_CURVE_TO":return _l();case"QUADRATIC_BEZIER_CURVE_TO":return dl();case"SMOOTH_QUADRATIC_BEZIER_CURVE_TO":return fl();case"ELLIPTICAL_ARC":return ml();case"CLOSE_PATH":return $l();default:w("No enum constant jetbrains.datalore.vis.svg.SvgPathData.Action."+t)}},rl.prototype.toString=function(){return this.myPathData_0},wl.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var xl,kl,Cl,El=null;function Sl(){return null===El&&new wl,El}function Tl(t){void 0===t&&(t=!0),this.myDefaultAbsolute_0=t,this.myStringBuilder_0=null,this.myTension_0=.7,this.myStringBuilder_0=o()}function Ol(t,e){b.call(this),this.name$=t,this.ordinal$=e}function Nl(){Nl=function(){},xl=new Ol("LINEAR",0),kl=new Ol("CARDINAL",1),Cl=new Ol("MONOTONE",2)}function Pl(){return Nl(),xl}function Il(){return Nl(),kl}function Al(){return Nl(),Cl}function Rl(){zl(),Ga.call(this),this.elementName_d87la8$_0="path"}function jl(){Ll=this,this.D=mt().createSpec_ytbaoo$("d")}rl.$metadata$={kind:f,simpleName:"SvgPathData",interfaces:[]},Ol.$metadata$={kind:f,simpleName:"Interpolation",interfaces:[b]},Ol.values=function(){return[Pl(),Il(),Al()]},Ol.valueOf_61zpoe$=function(t){switch(t){case"LINEAR":return Pl();case"CARDINAL":return Il();case"MONOTONE":return Al();default:w("No enum constant jetbrains.datalore.vis.svg.SvgPathDataBuilder.Interpolation."+t)}},Tl.prototype.build=function(){return new rl(this.myStringBuilder_0.toString())},Tl.prototype.addAction_0=function(t,e,n){var i;for(e?this.myStringBuilder_0.append_s8itvh$(G(t.absoluteCmd())):this.myStringBuilder_0.append_s8itvh$(G(t.relativeCmd())),i=0;i!==n.length;++i){var o=n[i];this.myStringBuilder_0.append_s8jyv4$(o).append_s8itvh$(32)}},Tl.prototype.addActionWithStringTokens_0=function(t,e,n){var i;for(e?this.myStringBuilder_0.append_s8itvh$(G(t.absoluteCmd())):this.myStringBuilder_0.append_s8itvh$(G(t.relativeCmd())),i=0;i!==n.length;++i){var o=n[i];this.myStringBuilder_0.append_pdl1vj$(o).append_s8itvh$(32)}},Tl.prototype.moveTo_przk3b$=function(t,e,n){return void 0===n&&(n=this.myDefaultAbsolute_0),this.addAction_0(ll(),n,new Float64Array([t,e])),this},Tl.prototype.moveTo_k2qmv6$=function(t,e){return this.moveTo_przk3b$(t.x,t.y,e)},Tl.prototype.moveTo_gpjtzr$=function(t){return this.moveTo_przk3b$(t.x,t.y)},Tl.prototype.lineTo_przk3b$=function(t,e,n){return void 0===n&&(n=this.myDefaultAbsolute_0),this.addAction_0(ul(),n,new Float64Array([t,e])),this},Tl.prototype.lineTo_k2qmv6$=function(t,e){return this.lineTo_przk3b$(t.x,t.y,e)},Tl.prototype.lineTo_gpjtzr$=function(t){return this.lineTo_przk3b$(t.x,t.y)},Tl.prototype.horizontalLineTo_8555vt$=function(t,e){return void 0===e&&(e=this.myDefaultAbsolute_0),this.addAction_0(cl(),e,new Float64Array([t])),this},Tl.prototype.verticalLineTo_8555vt$=function(t,e){return void 0===e&&(e=this.myDefaultAbsolute_0),this.addAction_0(pl(),e,new Float64Array([t])),this},Tl.prototype.curveTo_igz2nj$=function(t,e,n,i,o,r,a){return void 0===a&&(a=this.myDefaultAbsolute_0),this.addAction_0(hl(),a,new Float64Array([t,e,n,i,o,r])),this},Tl.prototype.curveTo_d4nu7w$=function(t,e,n,i){return this.curveTo_igz2nj$(t.x,t.y,e.x,e.y,n.x,n.y,i)},Tl.prototype.curveTo_fkixjx$=function(t,e,n){return this.curveTo_igz2nj$(t.x,t.y,e.x,e.y,n.x,n.y)},Tl.prototype.smoothCurveTo_84c9il$=function(t,e,n,i,o){return void 0===o&&(o=this.myDefaultAbsolute_0),this.addAction_0(_l(),o,new Float64Array([t,e,n,i])),this},Tl.prototype.smoothCurveTo_sosulb$=function(t,e,n){return this.smoothCurveTo_84c9il$(t.x,t.y,e.x,e.y,n)},Tl.prototype.smoothCurveTo_qt8ska$=function(t,e){return this.smoothCurveTo_84c9il$(t.x,t.y,e.x,e.y)},Tl.prototype.quadraticBezierCurveTo_84c9il$=function(t,e,n,i,o){return void 0===o&&(o=this.myDefaultAbsolute_0),this.addAction_0(dl(),o,new Float64Array([t,e,n,i])),this},Tl.prototype.quadraticBezierCurveTo_sosulb$=function(t,e,n){return this.quadraticBezierCurveTo_84c9il$(t.x,t.y,e.x,e.y,n)},Tl.prototype.quadraticBezierCurveTo_qt8ska$=function(t,e){return this.quadraticBezierCurveTo_84c9il$(t.x,t.y,e.x,e.y)},Tl.prototype.smoothQuadraticBezierCurveTo_przk3b$=function(t,e,n){return void 0===n&&(n=this.myDefaultAbsolute_0),this.addAction_0(fl(),n,new Float64Array([t,e])),this},Tl.prototype.smoothQuadraticBezierCurveTo_k2qmv6$=function(t,e){return this.smoothQuadraticBezierCurveTo_przk3b$(t.x,t.y,e)},Tl.prototype.smoothQuadraticBezierCurveTo_gpjtzr$=function(t){return this.smoothQuadraticBezierCurveTo_przk3b$(t.x,t.y)},Tl.prototype.ellipticalArc_d37okh$=function(t,e,n,i,o,r,a,s){return void 0===s&&(s=this.myDefaultAbsolute_0),this.addActionWithStringTokens_0(ml(),s,[t.toString(),e.toString(),n.toString(),i?"1":"0",o?"1":"0",r.toString(),a.toString()]),this},Tl.prototype.ellipticalArc_dcaprc$=function(t,e,n,i,o,r,a){return this.ellipticalArc_d37okh$(t,e,n,i,o,r.x,r.y,a)},Tl.prototype.ellipticalArc_gc0whr$=function(t,e,n,i,o,r){return this.ellipticalArc_d37okh$(t,e,n,i,o,r.x,r.y)},Tl.prototype.closePath=function(){return this.addAction_0($l(),this.myDefaultAbsolute_0,new Float64Array([])),this},Tl.prototype.setTension_14dthe$=function(t){if(0>t||t>1)throw H("Tension should be within [0, 1] interval");this.myTension_0=t},Tl.prototype.lineSlope_0=function(t,e){return(e.y-t.y)/(e.x-t.x)},Tl.prototype.finiteDifferences_0=function(t){var e,n=K(t.size),i=this.lineSlope_0(t.get_za3lpa$(0),t.get_za3lpa$(1));n.add_11rb$(i),e=t.size-1|0;for(var o=1;o1){a=e.get_za3lpa$(1),o=t.get_za3lpa$(s),s=s+1|0,this.curveTo_igz2nj$(i.x+r.x,i.y+r.y,o.x-a.x,o.y-a.y,o.x,o.y,!0);for(var l=2;l9){var l=s;s=3*o/X.sqrt(l),n.set_wxm5ur$(i,s*r),n.set_wxm5ur$(i+1|0,s*a)}}}for(var u=V(),c=0;c!==t.size;++c){var p=c+1|0,h=t.size-1|0,_=c-1|0,d=(t.get_za3lpa$(X.min(p,h)).x-t.get_za3lpa$(X.max(_,0)).x)/(6*(1+n.get_za3lpa$(c)*n.get_za3lpa$(c)));u.add_11rb$(new Y(d,n.get_za3lpa$(c)*d))}return u},Tl.prototype.interpolatePoints_3g1a62$=function(t,e,n){if(t.size!==e.size)throw H("Sizes of xs and ys must be equal");for(var i=K(t.size),o=W(t),r=W(e),a=0;a!==t.size;++a)i.add_11rb$(new Y(o.get_za3lpa$(a),r.get_za3lpa$(a)));switch(n.name){case"LINEAR":this.doLinearInterpolation_0(i);break;case"CARDINAL":i.size<3?this.doLinearInterpolation_0(i):this.doCardinalInterpolation_0(i);break;case"MONOTONE":i.size<3?this.doLinearInterpolation_0(i):this.doHermiteInterpolation_0(i,this.monotoneTangents_0(i))}return this},Tl.prototype.interpolatePoints_1ravjc$=function(t,e){var n,i=K(t.size),o=K(t.size);for(n=t.iterator();n.hasNext();){var r=n.next();i.add_11rb$(r.x),o.add_11rb$(r.y)}return this.interpolatePoints_3g1a62$(i,o,e)},Tl.$metadata$={kind:f,simpleName:"SvgPathDataBuilder",interfaces:[]},jl.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var Ll=null;function zl(){return null===Ll&&new jl,Ll}function Dl(){}function Ml(){Ul(),Ga.call(this),this.elementName_sgtow1$_0="rect"}function Bl(){Fl=this,this.X=mt().createSpec_ytbaoo$("x"),this.Y=mt().createSpec_ytbaoo$("y"),this.WIDTH=mt().createSpec_ytbaoo$($a().WIDTH),this.HEIGHT=mt().createSpec_ytbaoo$($a().HEIGHT)}Object.defineProperty(Rl.prototype,"elementName",{configurable:!0,get:function(){return this.elementName_d87la8$_0}}),Object.defineProperty(Rl.prototype,"bBox",{configurable:!0,get:function(){return v(this.container().getPeer()).getBBox_7snaev$(this)}}),Rl.prototype.d=function(){return this.getAttribute_mumjwj$(zl().D)},Rl.prototype.transform=function(){return this.getAttribute_mumjwj$(Iu().TRANSFORM)},Rl.prototype.fill=function(){return this.getAttribute_mumjwj$(Vl().FILL)},Rl.prototype.fillColor=function(){return Lu().colorAttributeTransform_dc5zq8$(this.fill(),this.fillOpacity())},Rl.prototype.fillOpacity=function(){return this.getAttribute_mumjwj$(Vl().FILL_OPACITY)},Rl.prototype.stroke=function(){return this.getAttribute_mumjwj$(Vl().STROKE)},Rl.prototype.strokeColor=function(){return Lu().colorAttributeTransform_dc5zq8$(this.stroke(),this.strokeOpacity())},Rl.prototype.strokeOpacity=function(){return this.getAttribute_mumjwj$(Vl().STROKE_OPACITY)},Rl.prototype.strokeWidth=function(){return this.getAttribute_mumjwj$(Vl().STROKE_WIDTH)},Rl.prototype.pointToTransformedCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).invertTransform_12yub8$(this,t)},Rl.prototype.pointToAbsoluteCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).applyTransform_12yub8$(this,t)},Rl.$metadata$={kind:f,simpleName:"SvgPathElement",interfaces:[Hl,Ou,Ga]},Dl.$metadata$={kind:x,simpleName:"SvgPlatformPeer",interfaces:[]},Bl.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var Fl=null;function Ul(){return null===Fl&&new Bl,Fl}function ql(t,e,n,i,o){return o=o||Object.create(Ml.prototype),Ml.call(o),o.setAttribute_qdh7ux$(Ul().X,t),o.setAttribute_qdh7ux$(Ul().Y,e),o.setAttribute_qdh7ux$(Ul().HEIGHT,i),o.setAttribute_qdh7ux$(Ul().WIDTH,n),o}function Hl(){Vl()}function Gl(){Kl=this,this.FILL=mt().createSpec_ytbaoo$("fill"),this.FILL_OPACITY=mt().createSpec_ytbaoo$("fill-opacity"),this.STROKE=mt().createSpec_ytbaoo$("stroke"),this.STROKE_OPACITY=mt().createSpec_ytbaoo$("stroke-opacity"),this.STROKE_WIDTH=mt().createSpec_ytbaoo$("stroke-width")}Object.defineProperty(Ml.prototype,"elementName",{configurable:!0,get:function(){return this.elementName_sgtow1$_0}}),Object.defineProperty(Ml.prototype,"bBox",{configurable:!0,get:function(){return v(this.container().getPeer()).getBBox_7snaev$(this)}}),Ml.prototype.x=function(){return this.getAttribute_mumjwj$(Ul().X)},Ml.prototype.y=function(){return this.getAttribute_mumjwj$(Ul().Y)},Ml.prototype.height=function(){return this.getAttribute_mumjwj$(Ul().HEIGHT)},Ml.prototype.width=function(){return this.getAttribute_mumjwj$(Ul().WIDTH)},Ml.prototype.transform=function(){return this.getAttribute_mumjwj$(Iu().TRANSFORM)},Ml.prototype.fill=function(){return this.getAttribute_mumjwj$(Vl().FILL)},Ml.prototype.fillColor=function(){return Lu().colorAttributeTransform_dc5zq8$(this.fill(),this.fillOpacity())},Ml.prototype.fillOpacity=function(){return this.getAttribute_mumjwj$(Vl().FILL_OPACITY)},Ml.prototype.stroke=function(){return this.getAttribute_mumjwj$(Vl().STROKE)},Ml.prototype.strokeColor=function(){return Lu().colorAttributeTransform_dc5zq8$(this.stroke(),this.strokeOpacity())},Ml.prototype.strokeOpacity=function(){return this.getAttribute_mumjwj$(Vl().STROKE_OPACITY)},Ml.prototype.strokeWidth=function(){return this.getAttribute_mumjwj$(Vl().STROKE_WIDTH)},Ml.prototype.pointToTransformedCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).invertTransform_12yub8$(this,t)},Ml.prototype.pointToAbsoluteCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).applyTransform_12yub8$(this,t)},Ml.$metadata$={kind:f,simpleName:"SvgRectElement",interfaces:[Hl,Ou,Ga]},Gl.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var Kl=null;function Vl(){return null===Kl&&new Gl,Kl}function Yl(){Zl(),ka.call(this)}function Wl(){Xl=this,this.CLASS=mt().createSpec_ytbaoo$("class")}Hl.$metadata$={kind:x,simpleName:"SvgShape",interfaces:[]},Wl.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var Xl=null;function Zl(){return null===Xl&&new Wl,Xl}function Jl(t){ka.call(this),this.resource=t,this.elementName_1a5z8g$_0="style",this.setContent_61zpoe$(this.resource.css())}function Ql(){nu(),Yl.call(this),this.elementName_9c3al$_0="svg"}function tu(){eu=this,this.X=mt().createSpec_ytbaoo$("x"),this.Y=mt().createSpec_ytbaoo$("y"),this.WIDTH=mt().createSpec_ytbaoo$($a().WIDTH),this.HEIGHT=mt().createSpec_ytbaoo$($a().HEIGHT),this.VIEW_BOX=mt().createSpec_ytbaoo$("viewBox")}Yl.prototype.classAttribute=function(){return this.getAttribute_mumjwj$(Zl().CLASS)},Yl.prototype.addClass_61zpoe$=function(t){this.validateClassName_rb6n0l$_0(t);var e=this.classAttribute();return null==e.get()?(e.set_11rb$(t),!0):!Z(v(e.get()),[" "]).contains_11rb$(t)&&(e.set_11rb$(e.get()+" "+t),!0)},Yl.prototype.removeClass_61zpoe$=function(t){this.validateClassName_rb6n0l$_0(t);var e=this.classAttribute();if(null==e.get())return!1;var n=W(Z(v(e.get()),[" "])),i=n.remove_11rb$(t);return i&&e.set_11rb$(this.buildClassString_fbk06u$_0(n)),i},Yl.prototype.replaceClass_puj7f4$=function(t,e){this.validateClassName_rb6n0l$_0(t),this.validateClassName_rb6n0l$_0(e);var n=this.classAttribute();if(null==n.get())throw j("Trying to replace class when class is empty");var i=Z(v(n.get()),[" "]);if(!i.contains_11rb$(t))throw j("Class attribute does not contain specified oldClass");for(var o=i.size,r=K(o),a=0;a0&&n.append_s8itvh$(32),n.append_pdl1vj$(i)}return n.toString()},Yl.prototype.validateClassName_rb6n0l$_0=function(t){if(J(t," "))throw H("Class name cannot contain spaces")},Yl.$metadata$={kind:f,simpleName:"SvgStylableElement",interfaces:[ka]},Object.defineProperty(Jl.prototype,"elementName",{configurable:!0,get:function(){return this.elementName_1a5z8g$_0}}),Jl.prototype.setContent_61zpoe$=function(t){for(var e=this.children();!e.isEmpty();)e.removeAt_za3lpa$(0);var n=new gu(t);e.add_11rb$(n),this.setAttribute_jyasbz$("type","text/css")},Jl.$metadata$={kind:f,simpleName:"SvgStyleElement",interfaces:[ka]},tu.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var eu=null;function nu(){return null===eu&&new tu,eu}function iu(t){this.this$SvgSvgElement=t}function ou(){this.myX_0=0,this.myY_0=0,this.myWidth_0=0,this.myHeight_0=0}function ru(t,e){return e=e||Object.create(ou.prototype),ou.call(e),e.myX_0=t.origin.x,e.myY_0=t.origin.y,e.myWidth_0=t.dimension.x,e.myHeight_0=t.dimension.y,e}function au(){uu(),ka.call(this),this.elementName_7co8y5$_0="tspan"}function su(){lu=this,this.X_0=mt().createSpec_ytbaoo$("x"),this.Y_0=mt().createSpec_ytbaoo$("y")}Object.defineProperty(Ql.prototype,"elementName",{configurable:!0,get:function(){return this.elementName_9c3al$_0}}),Object.defineProperty(Ql.prototype,"bBox",{configurable:!0,get:function(){return v(this.container().getPeer()).getBBox_7snaev$(this)}}),Ql.prototype.setStyle_i8z0m3$=function(t){this.children().add_11rb$(new Jl(t))},Ql.prototype.x=function(){return this.getAttribute_mumjwj$(nu().X)},Ql.prototype.y=function(){return this.getAttribute_mumjwj$(nu().Y)},Ql.prototype.width=function(){return this.getAttribute_mumjwj$(nu().WIDTH)},Ql.prototype.height=function(){return this.getAttribute_mumjwj$(nu().HEIGHT)},Ql.prototype.viewBox=function(){return this.getAttribute_mumjwj$(nu().VIEW_BOX)},iu.prototype.set_11rb$=function(t){this.this$SvgSvgElement.viewBox().set_11rb$(ru(t))},iu.$metadata$={kind:f,interfaces:[Q]},Ql.prototype.viewBoxRect=function(){return new iu(this)},Ql.prototype.opacity=function(){return this.getAttribute_mumjwj$(ba().OPACITY)},Ql.prototype.clipPath=function(){return this.getAttribute_mumjwj$(ba().CLIP_PATH)},Ql.prototype.pointToTransformedCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).invertTransform_12yub8$(this,t)},Ql.prototype.pointToAbsoluteCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).applyTransform_12yub8$(this,t)},ou.prototype.toString=function(){return this.myX_0.toString()+" "+this.myY_0+" "+this.myWidth_0+" "+this.myHeight_0},ou.$metadata$={kind:f,simpleName:"ViewBoxRectangle",interfaces:[]},Ql.$metadata$={kind:f,simpleName:"SvgSvgElement",interfaces:[Zs,ya,Yl]},su.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var lu=null;function uu(){return null===lu&&new su,lu}function cu(t,e){return e=e||Object.create(au.prototype),au.call(e),e.setText_61zpoe$(t),e}function pu(){du()}function hu(){_u=this,this.FILL=mt().createSpec_ytbaoo$("fill"),this.FILL_OPACITY=mt().createSpec_ytbaoo$("fill-opacity"),this.STROKE=mt().createSpec_ytbaoo$("stroke"),this.STROKE_OPACITY=mt().createSpec_ytbaoo$("stroke-opacity"),this.STROKE_WIDTH=mt().createSpec_ytbaoo$("stroke-width"),this.TEXT_ANCHOR=mt().createSpec_ytbaoo$($a().SVG_TEXT_ANCHOR_ATTRIBUTE),this.TEXT_DY=mt().createSpec_ytbaoo$($a().SVG_TEXT_DY_ATTRIBUTE)}Object.defineProperty(au.prototype,"elementName",{configurable:!0,get:function(){return this.elementName_7co8y5$_0}}),Object.defineProperty(au.prototype,"computedTextLength",{configurable:!0,get:function(){return v(this.container().getPeer()).getComputedTextLength_u60gfq$(this)}}),au.prototype.x=function(){return this.getAttribute_mumjwj$(uu().X_0)},au.prototype.y=function(){return this.getAttribute_mumjwj$(uu().Y_0)},au.prototype.setText_61zpoe$=function(t){this.children().clear(),this.addText_61zpoe$(t)},au.prototype.addText_61zpoe$=function(t){var e=new gu(t);this.children().add_11rb$(e)},au.prototype.fill=function(){return this.getAttribute_mumjwj$(du().FILL)},au.prototype.fillColor=function(){return Lu().colorAttributeTransform_dc5zq8$(this.fill(),this.fillOpacity())},au.prototype.fillOpacity=function(){return this.getAttribute_mumjwj$(du().FILL_OPACITY)},au.prototype.stroke=function(){return this.getAttribute_mumjwj$(du().STROKE)},au.prototype.strokeColor=function(){return Lu().colorAttributeTransform_dc5zq8$(this.stroke(),this.strokeOpacity())},au.prototype.strokeOpacity=function(){return this.getAttribute_mumjwj$(du().STROKE_OPACITY)},au.prototype.strokeWidth=function(){return this.getAttribute_mumjwj$(du().STROKE_WIDTH)},au.prototype.textAnchor=function(){return this.getAttribute_mumjwj$(du().TEXT_ANCHOR)},au.prototype.textDy=function(){return this.getAttribute_mumjwj$(du().TEXT_DY)},au.$metadata$={kind:f,simpleName:"SvgTSpanElement",interfaces:[pu,ka]},hu.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var _u=null;function du(){return null===_u&&new hu,_u}function fu(){yu(),Ga.call(this),this.elementName_s70iuw$_0="text"}function mu(){$u=this,this.X=mt().createSpec_ytbaoo$("x"),this.Y=mt().createSpec_ytbaoo$("y")}pu.$metadata$={kind:x,simpleName:"SvgTextContent",interfaces:[]},mu.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var $u=null;function yu(){return null===$u&&new mu,$u}function gu(t){xu(),Js.call(this),this.myContent_0=null,this.myContent_0=new B(t)}function vu(){wu=this,this.NO_CHILDREN_LIST_0=new bu}function bu(){et.call(this)}Object.defineProperty(fu.prototype,"elementName",{configurable:!0,get:function(){return this.elementName_s70iuw$_0}}),Object.defineProperty(fu.prototype,"computedTextLength",{configurable:!0,get:function(){return v(this.container().getPeer()).getComputedTextLength_u60gfq$(this)}}),Object.defineProperty(fu.prototype,"bBox",{configurable:!0,get:function(){return v(this.container().getPeer()).getBBox_7snaev$(this)}}),fu.prototype.x=function(){return this.getAttribute_mumjwj$(yu().X)},fu.prototype.y=function(){return this.getAttribute_mumjwj$(yu().Y)},fu.prototype.transform=function(){return this.getAttribute_mumjwj$(Iu().TRANSFORM)},fu.prototype.setTextNode_61zpoe$=function(t){this.children().clear(),this.addTextNode_61zpoe$(t)},fu.prototype.addTextNode_61zpoe$=function(t){var e=new gu(t);this.children().add_11rb$(e)},fu.prototype.setTSpan_ddcap8$=function(t){this.children().clear(),this.addTSpan_ddcap8$(t)},fu.prototype.setTSpan_61zpoe$=function(t){this.children().clear(),this.addTSpan_61zpoe$(t)},fu.prototype.addTSpan_ddcap8$=function(t){this.children().add_11rb$(t)},fu.prototype.addTSpan_61zpoe$=function(t){this.children().add_11rb$(cu(t))},fu.prototype.fill=function(){return this.getAttribute_mumjwj$(du().FILL)},fu.prototype.fillColor=function(){return Lu().colorAttributeTransform_dc5zq8$(this.fill(),this.fillOpacity())},fu.prototype.fillOpacity=function(){return this.getAttribute_mumjwj$(du().FILL_OPACITY)},fu.prototype.stroke=function(){return this.getAttribute_mumjwj$(du().STROKE)},fu.prototype.strokeColor=function(){return Lu().colorAttributeTransform_dc5zq8$(this.stroke(),this.strokeOpacity())},fu.prototype.strokeOpacity=function(){return this.getAttribute_mumjwj$(du().STROKE_OPACITY)},fu.prototype.strokeWidth=function(){return this.getAttribute_mumjwj$(du().STROKE_WIDTH)},fu.prototype.textAnchor=function(){return this.getAttribute_mumjwj$(du().TEXT_ANCHOR)},fu.prototype.textDy=function(){return this.getAttribute_mumjwj$(du().TEXT_DY)},fu.prototype.pointToTransformedCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).invertTransform_12yub8$(this,t)},fu.prototype.pointToAbsoluteCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).applyTransform_12yub8$(this,t)},fu.$metadata$={kind:f,simpleName:"SvgTextElement",interfaces:[pu,Ou,Ga]},gu.prototype.textContent=function(){return this.myContent_0},gu.prototype.children=function(){return xu().NO_CHILDREN_LIST_0},gu.prototype.toString=function(){return this.textContent().get()},bu.prototype.checkAdd_wxm5ur$=function(t,e){throw tt("Cannot add children to SvgTextNode")},bu.prototype.checkRemove_wxm5ur$=function(t,e){throw tt("Cannot remove children from SvgTextNode")},bu.$metadata$={kind:f,interfaces:[et]},vu.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var wu=null;function xu(){return null===wu&&new vu,wu}function ku(t){Su(),this.myTransform_0=t}function Cu(){Eu=this,this.EMPTY=new ku(""),this.MATRIX="matrix",this.ROTATE="rotate",this.SCALE="scale",this.SKEW_X="skewX",this.SKEW_Y="skewY",this.TRANSLATE="translate"}gu.$metadata$={kind:f,simpleName:"SvgTextNode",interfaces:[Js]},ku.prototype.toString=function(){return this.myTransform_0},Cu.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var Eu=null;function Su(){return null===Eu&&new Cu,Eu}function Tu(){this.myStringBuilder_0=o()}function Ou(){Iu()}function Nu(){Pu=this,this.TRANSFORM=mt().createSpec_ytbaoo$("transform")}ku.$metadata$={kind:f,simpleName:"SvgTransform",interfaces:[]},Tu.prototype.build=function(){return new ku(this.myStringBuilder_0.toString())},Tu.prototype.addTransformation_0=function(t,e){var n;for(this.myStringBuilder_0.append_pdl1vj$(t).append_s8itvh$(40),n=0;n!==e.length;++n){var i=e[n];this.myStringBuilder_0.append_s8jyv4$(i).append_s8itvh$(32)}return this.myStringBuilder_0.append_pdl1vj$(") "),this},Tu.prototype.matrix_15yvbs$=function(t,e,n,i,o,r){return this.addTransformation_0(Su().MATRIX,new Float64Array([t,e,n,i,o,r]))},Tu.prototype.translate_lu1900$=function(t,e){return this.addTransformation_0(Su().TRANSLATE,new Float64Array([t,e]))},Tu.prototype.translate_gpjtzr$=function(t){return this.translate_lu1900$(t.x,t.y)},Tu.prototype.translate_14dthe$=function(t){return this.addTransformation_0(Su().TRANSLATE,new Float64Array([t]))},Tu.prototype.scale_lu1900$=function(t,e){return this.addTransformation_0(Su().SCALE,new Float64Array([t,e]))},Tu.prototype.scale_14dthe$=function(t){return this.addTransformation_0(Su().SCALE,new Float64Array([t]))},Tu.prototype.rotate_yvo9jy$=function(t,e,n){return this.addTransformation_0(Su().ROTATE,new Float64Array([t,e,n]))},Tu.prototype.rotate_jx7lbv$=function(t,e){return this.rotate_yvo9jy$(t,e.x,e.y)},Tu.prototype.rotate_14dthe$=function(t){return this.addTransformation_0(Su().ROTATE,new Float64Array([t]))},Tu.prototype.skewX_14dthe$=function(t){return this.addTransformation_0(Su().SKEW_X,new Float64Array([t]))},Tu.prototype.skewY_14dthe$=function(t){return this.addTransformation_0(Su().SKEW_Y,new Float64Array([t]))},Tu.$metadata$={kind:f,simpleName:"SvgTransformBuilder",interfaces:[]},Nu.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var Pu=null;function Iu(){return null===Pu&&new Nu,Pu}function Au(){ju=this,this.OPACITY_TABLE_0=new Float64Array(256);for(var t=0;t<=255;t++)this.OPACITY_TABLE_0[t]=t/255}function Ru(t,e){this.closure$color=t,this.closure$opacity=e}Ou.$metadata$={kind:x,simpleName:"SvgTransformable",interfaces:[Zs]},Au.prototype.opacity_98b62m$=function(t){return this.OPACITY_TABLE_0[t.alpha]},Au.prototype.alpha2opacity_za3lpa$=function(t){return this.OPACITY_TABLE_0[t]},Au.prototype.toARGB_98b62m$=function(t){return this.toARGB_tjonv8$(t.red,t.green,t.blue,t.alpha)},Au.prototype.toARGB_o14uds$=function(t,e){var n=t.red,i=t.green,o=t.blue,r=255*e,a=X.min(255,r);return this.toARGB_tjonv8$(n,i,o,nt(X.max(0,a)))},Au.prototype.toARGB_tjonv8$=function(t,e,n,i){return(i<<24)+((t<<16)+(e<<8)+n|0)|0},Ru.prototype.set_11rb$=function(t){this.closure$color.set_11rb$(_a().create_2160e9$(t)),null!=t?this.closure$opacity.set_11rb$(Lu().opacity_98b62m$(t)):this.closure$opacity.set_11rb$(1)},Ru.$metadata$={kind:f,interfaces:[Q]},Au.prototype.colorAttributeTransform_dc5zq8$=function(t,e){return new Ru(t,e)},Au.prototype.transformMatrix_98ex5o$=function(t,e,n,i,o,r,a){t.transform().set_11rb$((new Tu).matrix_15yvbs$(e,n,i,o,r,a).build())},Au.prototype.transformTranslate_pw34rw$=function(t,e,n){t.transform().set_11rb$((new Tu).translate_lu1900$(e,n).build())},Au.prototype.transformTranslate_cbcjvx$=function(t,e){this.transformTranslate_pw34rw$(t,e.x,e.y)},Au.prototype.transformTranslate_wl99a6$=function(t,e){t.transform().set_11rb$((new Tu).translate_14dthe$(e).build())},Au.prototype.transformScale_pw34rw$=function(t,e,n){t.transform().set_11rb$((new Tu).scale_lu1900$(e,n).build())},Au.prototype.transformScale_wl99a6$=function(t,e){t.transform().set_11rb$((new Tu).scale_14dthe$(e).build())},Au.prototype.transformRotate_tk1esa$=function(t,e,n,i){t.transform().set_11rb$((new Tu).rotate_yvo9jy$(e,n,i).build())},Au.prototype.transformRotate_wl99a6$=function(t,e){t.transform().set_11rb$((new Tu).rotate_14dthe$(e).build())},Au.prototype.transformSkewX_wl99a6$=function(t,e){t.transform().set_11rb$((new Tu).skewX_14dthe$(e).build())},Au.prototype.transformSkewY_wl99a6$=function(t,e){t.transform().set_11rb$((new Tu).skewY_14dthe$(e).build())},Au.prototype.copyAttributes_azdp7k$=function(t,n){var i,o;for(i=t.attributeKeys.iterator();i.hasNext();){var r=i.next(),a=e.isType(o=r,_t)?o:m();n.setAttribute_qdh7ux$(a,t.getAttribute_mumjwj$(r).get())}},Au.prototype.pngDataURI_61zpoe$=function(t){return new M("data:image/png;base64,").append_pdl1vj$(t).toString()},Au.$metadata$={kind:d,simpleName:"SvgUtils",interfaces:[]};var ju=null;function Lu(){return null===ju&&new Au,ju}function zu(){Hu=this,this.SVG_NAMESPACE_URI="http://www.w3.org/2000/svg",this.XLINK_NAMESPACE_URI="http://www.w3.org/1999/xlink",this.XLINK_PREFIX="xlink"}zu.$metadata$={kind:d,simpleName:"XmlNamespace",interfaces:[]};var Du,Mu,Bu,Fu,Uu,qu,Hu=null;function Gu(){return null===Hu&&new zu,Hu}function Ku(t,e,n){it.call(this),this.attrSpec=t,this.oldValue=e,this.newValue=n}function Vu(){}function Yu(t,e){b.call(this),this.name$=t,this.ordinal$=e}function Wu(){Wu=function(){},Du=new Yu("MOUSE_CLICKED",0),Mu=new Yu("MOUSE_PRESSED",1),Bu=new Yu("MOUSE_RELEASED",2),Fu=new Yu("MOUSE_OVER",3),Uu=new Yu("MOUSE_MOVE",4),qu=new Yu("MOUSE_OUT",5)}function Xu(){return Wu(),Du}function Zu(){return Wu(),Mu}function Ju(){return Wu(),Bu}function Qu(){return Wu(),Fu}function tc(){return Wu(),Uu}function ec(){return Wu(),qu}function nc(){Js.call(this),this.isPrebuiltSubtree=!0}function ic(t){lc.call(this,t),this.myAttributes_0=e.newArray(pc().ATTR_COUNT_8be2vx$,null)}function oc(t,e){this.closure$key=t,this.closure$value=e}function rc(t){ic.call(this,dc().GROUP),this.myChildren_0=K(t)}function ac(t){nc.call(this),this.myGroup_0=t}function sc(t,e,n){return n=n||Object.create(rc.prototype),rc.call(n,t),n.setAttribute_vux3hl$(19,e),n}function lc(t){pc(),this.elementName=t}function uc(){cc=this,this.fill_8be2vx$=0,this.fillOpacity_8be2vx$=1,this.stroke_8be2vx$=2,this.strokeOpacity_8be2vx$=3,this.strokeWidth_8be2vx$=4,this.strokeTransform_8be2vx$=5,this.classes_8be2vx$=6,this.x1_8be2vx$=7,this.y1_8be2vx$=8,this.x2_8be2vx$=9,this.y2_8be2vx$=10,this.cx_8be2vx$=11,this.cy_8be2vx$=12,this.r_8be2vx$=13,this.x_8be2vx$=14,this.y_8be2vx$=15,this.height_8be2vx$=16,this.width_8be2vx$=17,this.pathData_8be2vx$=18,this.transform_8be2vx$=19,this.ATTR_KEYS_8be2vx$=["fill","fill-opacity","stroke","stroke-opacity","stroke-width","transform","classes","x1","y1","x2","y2","cx","cy","r","x","y","height","width","d","transform"],this.ATTR_COUNT_8be2vx$=this.ATTR_KEYS_8be2vx$.length}Ku.$metadata$={kind:f,simpleName:"SvgAttributeEvent",interfaces:[it]},Vu.$metadata$={kind:x,simpleName:"SvgEventHandler",interfaces:[]},Yu.$metadata$={kind:f,simpleName:"SvgEventSpec",interfaces:[b]},Yu.values=function(){return[Xu(),Zu(),Ju(),Qu(),tc(),ec()]},Yu.valueOf_61zpoe$=function(t){switch(t){case"MOUSE_CLICKED":return Xu();case"MOUSE_PRESSED":return Zu();case"MOUSE_RELEASED":return Ju();case"MOUSE_OVER":return Qu();case"MOUSE_MOVE":return tc();case"MOUSE_OUT":return ec();default:w("No enum constant jetbrains.datalore.vis.svg.event.SvgEventSpec."+t)}},nc.prototype.children=function(){var t=Js.prototype.children.call(this);if(!t.isEmpty())throw j("Can't have children");return t},nc.$metadata$={kind:f,simpleName:"DummySvgNode",interfaces:[Js]},Object.defineProperty(oc.prototype,"key",{configurable:!0,get:function(){return this.closure$key}}),Object.defineProperty(oc.prototype,"value",{configurable:!0,get:function(){return this.closure$value.toString()}}),oc.$metadata$={kind:f,interfaces:[$c]},Object.defineProperty(ic.prototype,"attributes",{configurable:!0,get:function(){var t,e,n=this.myAttributes_0,i=K(n.length),o=0;for(t=0;t!==n.length;++t){var r,a=n[t],s=i.add_11rb$,l=(o=(e=o)+1|0,e),u=pc().ATTR_KEYS_8be2vx$[l];r=null==a?null:new oc(u,a),s.call(i,r)}return ot(i)}}),Object.defineProperty(ic.prototype,"slimChildren",{configurable:!0,get:function(){return rt()}}),ic.prototype.setAttribute_vux3hl$=function(t,e){this.myAttributes_0[t]=e},ic.prototype.hasAttribute_za3lpa$=function(t){return null!=this.myAttributes_0[t]},ic.prototype.getAttribute_za3lpa$=function(t){return this.myAttributes_0[t]},ic.prototype.appendTo_i2myw1$=function(t){var n;(e.isType(n=t,rc)?n:m()).addChild_3o5936$(this)},ic.$metadata$={kind:f,simpleName:"ElementJava",interfaces:[mc,lc]},Object.defineProperty(rc.prototype,"slimChildren",{configurable:!0,get:function(){var t,e=this.myChildren_0,n=K(at(e,10));for(t=e.iterator();t.hasNext();){var i=t.next();n.add_11rb$(i)}return n}}),rc.prototype.addChild_3o5936$=function(t){this.myChildren_0.add_11rb$(t)},rc.prototype.asDummySvgNode=function(){return new ac(this)},Object.defineProperty(ac.prototype,"elementName",{configurable:!0,get:function(){return this.myGroup_0.elementName}}),Object.defineProperty(ac.prototype,"attributes",{configurable:!0,get:function(){return this.myGroup_0.attributes}}),Object.defineProperty(ac.prototype,"slimChildren",{configurable:!0,get:function(){return this.myGroup_0.slimChildren}}),ac.$metadata$={kind:f,simpleName:"MyDummySvgNode",interfaces:[mc,nc]},rc.$metadata$={kind:f,simpleName:"GroupJava",interfaces:[fc,ic]},uc.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var cc=null;function pc(){return null===cc&&new uc,cc}function hc(){_c=this,this.GROUP="g",this.LINE="line",this.CIRCLE="circle",this.RECT="rect",this.PATH="path"}lc.prototype.setFill_o14uds$=function(t,e){this.setAttribute_vux3hl$(0,t.toHexColor()),e<1&&this.setAttribute_vux3hl$(1,e.toString())},lc.prototype.setStroke_o14uds$=function(t,e){this.setAttribute_vux3hl$(2,t.toHexColor()),e<1&&this.setAttribute_vux3hl$(3,e.toString())},lc.prototype.setStrokeWidth_14dthe$=function(t){this.setAttribute_vux3hl$(4,t.toString())},lc.prototype.setAttribute_7u9h3l$=function(t,e){this.setAttribute_vux3hl$(t,e.toString())},lc.$metadata$={kind:f,simpleName:"SlimBase",interfaces:[gc]},hc.prototype.createElement_0=function(t){return new ic(t)},hc.prototype.g_za3lpa$=function(t){return new rc(t)},hc.prototype.g_vux3hl$=function(t,e){return sc(t,e)},hc.prototype.line_6y0v78$=function(t,e,n,i){var o=this.createElement_0(this.LINE);return o.setAttribute_7u9h3l$(7,t),o.setAttribute_7u9h3l$(8,e),o.setAttribute_7u9h3l$(9,n),o.setAttribute_7u9h3l$(10,i),o},hc.prototype.circle_yvo9jy$=function(t,e,n){var i=this.createElement_0(this.CIRCLE);return i.setAttribute_7u9h3l$(11,t),i.setAttribute_7u9h3l$(12,e),i.setAttribute_7u9h3l$(13,n),i},hc.prototype.rect_6y0v78$=function(t,e,n,i){var o=this.createElement_0(this.RECT);return o.setAttribute_7u9h3l$(14,t),o.setAttribute_7u9h3l$(15,e),o.setAttribute_7u9h3l$(17,n),o.setAttribute_7u9h3l$(16,i),o},hc.prototype.path_za3rmp$=function(t){var e=this.createElement_0(this.PATH);return e.setAttribute_vux3hl$(18,t.toString()),e},hc.$metadata$={kind:d,simpleName:"SvgSlimElements",interfaces:[]};var _c=null;function dc(){return null===_c&&new hc,_c}function fc(){}function mc(){}function $c(){}function yc(){}function gc(){}fc.$metadata$={kind:x,simpleName:"SvgSlimGroup",interfaces:[yc]},$c.$metadata$={kind:x,simpleName:"Attr",interfaces:[]},mc.$metadata$={kind:x,simpleName:"SvgSlimNode",interfaces:[]},yc.$metadata$={kind:x,simpleName:"SvgSlimObject",interfaces:[]},gc.$metadata$={kind:x,simpleName:"SvgSlimShape",interfaces:[yc]},Object.defineProperty(st,"Companion",{get:pt});var vc=t.jetbrains||(t.jetbrains={}),bc=vc.datalore||(vc.datalore={}),wc=bc.vis||(bc.vis={});wc.StyleSheet=st,wc.TextStyle=ht,Object.defineProperty(_t,"Companion",{get:mt});var xc=wc.svg||(wc.svg={});xc.SvgAttributeSpec=_t,Object.defineProperty($t,"Companion",{get:vt}),xc.SvgCircleElement_init_yvo9jy$=function(t,e,n,i){return i=i||Object.create($t.prototype),$t.call(i),i.setAttribute_qdh7ux$(vt().CX,t),i.setAttribute_qdh7ux$(vt().CY,e),i.setAttribute_qdh7ux$(vt().R,n),i},xc.SvgCircleElement=$t,Object.defineProperty(bt,"Companion",{get:di}),Object.defineProperty(fi,"USER_SPACE_ON_USE",{get:$i}),Object.defineProperty(fi,"OBJECT_BOUNDING_BOX",{get:yi}),bt.ClipPathUnits=fi,xc.SvgClipPathElement=bt,xc.SvgColor=gi,Object.defineProperty(vi,"ALICE_BLUE",{get:wi}),Object.defineProperty(vi,"ANTIQUE_WHITE",{get:xi}),Object.defineProperty(vi,"AQUA",{get:ki}),Object.defineProperty(vi,"AQUAMARINE",{get:Ci}),Object.defineProperty(vi,"AZURE",{get:Ei}),Object.defineProperty(vi,"BEIGE",{get:Si}),Object.defineProperty(vi,"BISQUE",{get:Ti}),Object.defineProperty(vi,"BLACK",{get:Oi}),Object.defineProperty(vi,"BLANCHED_ALMOND",{get:Ni}),Object.defineProperty(vi,"BLUE",{get:Pi}),Object.defineProperty(vi,"BLUE_VIOLET",{get:Ii}),Object.defineProperty(vi,"BROWN",{get:Ai}),Object.defineProperty(vi,"BURLY_WOOD",{get:Ri}),Object.defineProperty(vi,"CADET_BLUE",{get:ji}),Object.defineProperty(vi,"CHARTREUSE",{get:Li}),Object.defineProperty(vi,"CHOCOLATE",{get:zi}),Object.defineProperty(vi,"CORAL",{get:Di}),Object.defineProperty(vi,"CORNFLOWER_BLUE",{get:Mi}),Object.defineProperty(vi,"CORNSILK",{get:Bi}),Object.defineProperty(vi,"CRIMSON",{get:Fi}),Object.defineProperty(vi,"CYAN",{get:Ui}),Object.defineProperty(vi,"DARK_BLUE",{get:qi}),Object.defineProperty(vi,"DARK_CYAN",{get:Hi}),Object.defineProperty(vi,"DARK_GOLDEN_ROD",{get:Gi}),Object.defineProperty(vi,"DARK_GRAY",{get:Ki}),Object.defineProperty(vi,"DARK_GREEN",{get:Vi}),Object.defineProperty(vi,"DARK_GREY",{get:Yi}),Object.defineProperty(vi,"DARK_KHAKI",{get:Wi}),Object.defineProperty(vi,"DARK_MAGENTA",{get:Xi}),Object.defineProperty(vi,"DARK_OLIVE_GREEN",{get:Zi}),Object.defineProperty(vi,"DARK_ORANGE",{get:Ji}),Object.defineProperty(vi,"DARK_ORCHID",{get:Qi}),Object.defineProperty(vi,"DARK_RED",{get:to}),Object.defineProperty(vi,"DARK_SALMON",{get:eo}),Object.defineProperty(vi,"DARK_SEA_GREEN",{get:no}),Object.defineProperty(vi,"DARK_SLATE_BLUE",{get:io}),Object.defineProperty(vi,"DARK_SLATE_GRAY",{get:oo}),Object.defineProperty(vi,"DARK_SLATE_GREY",{get:ro}),Object.defineProperty(vi,"DARK_TURQUOISE",{get:ao}),Object.defineProperty(vi,"DARK_VIOLET",{get:so}),Object.defineProperty(vi,"DEEP_PINK",{get:lo}),Object.defineProperty(vi,"DEEP_SKY_BLUE",{get:uo}),Object.defineProperty(vi,"DIM_GRAY",{get:co}),Object.defineProperty(vi,"DIM_GREY",{get:po}),Object.defineProperty(vi,"DODGER_BLUE",{get:ho}),Object.defineProperty(vi,"FIRE_BRICK",{get:_o}),Object.defineProperty(vi,"FLORAL_WHITE",{get:fo}),Object.defineProperty(vi,"FOREST_GREEN",{get:mo}),Object.defineProperty(vi,"FUCHSIA",{get:$o}),Object.defineProperty(vi,"GAINSBORO",{get:yo}),Object.defineProperty(vi,"GHOST_WHITE",{get:go}),Object.defineProperty(vi,"GOLD",{get:vo}),Object.defineProperty(vi,"GOLDEN_ROD",{get:bo}),Object.defineProperty(vi,"GRAY",{get:wo}),Object.defineProperty(vi,"GREY",{get:xo}),Object.defineProperty(vi,"GREEN",{get:ko}),Object.defineProperty(vi,"GREEN_YELLOW",{get:Co}),Object.defineProperty(vi,"HONEY_DEW",{get:Eo}),Object.defineProperty(vi,"HOT_PINK",{get:So}),Object.defineProperty(vi,"INDIAN_RED",{get:To}),Object.defineProperty(vi,"INDIGO",{get:Oo}),Object.defineProperty(vi,"IVORY",{get:No}),Object.defineProperty(vi,"KHAKI",{get:Po}),Object.defineProperty(vi,"LAVENDER",{get:Io}),Object.defineProperty(vi,"LAVENDER_BLUSH",{get:Ao}),Object.defineProperty(vi,"LAWN_GREEN",{get:Ro}),Object.defineProperty(vi,"LEMON_CHIFFON",{get:jo}),Object.defineProperty(vi,"LIGHT_BLUE",{get:Lo}),Object.defineProperty(vi,"LIGHT_CORAL",{get:zo}),Object.defineProperty(vi,"LIGHT_CYAN",{get:Do}),Object.defineProperty(vi,"LIGHT_GOLDEN_ROD_YELLOW",{get:Mo}),Object.defineProperty(vi,"LIGHT_GRAY",{get:Bo}),Object.defineProperty(vi,"LIGHT_GREEN",{get:Fo}),Object.defineProperty(vi,"LIGHT_GREY",{get:Uo}),Object.defineProperty(vi,"LIGHT_PINK",{get:qo}),Object.defineProperty(vi,"LIGHT_SALMON",{get:Ho}),Object.defineProperty(vi,"LIGHT_SEA_GREEN",{get:Go}),Object.defineProperty(vi,"LIGHT_SKY_BLUE",{get:Ko}),Object.defineProperty(vi,"LIGHT_SLATE_GRAY",{get:Vo}),Object.defineProperty(vi,"LIGHT_SLATE_GREY",{get:Yo}),Object.defineProperty(vi,"LIGHT_STEEL_BLUE",{get:Wo}),Object.defineProperty(vi,"LIGHT_YELLOW",{get:Xo}),Object.defineProperty(vi,"LIME",{get:Zo}),Object.defineProperty(vi,"LIME_GREEN",{get:Jo}),Object.defineProperty(vi,"LINEN",{get:Qo}),Object.defineProperty(vi,"MAGENTA",{get:tr}),Object.defineProperty(vi,"MAROON",{get:er}),Object.defineProperty(vi,"MEDIUM_AQUA_MARINE",{get:nr}),Object.defineProperty(vi,"MEDIUM_BLUE",{get:ir}),Object.defineProperty(vi,"MEDIUM_ORCHID",{get:or}),Object.defineProperty(vi,"MEDIUM_PURPLE",{get:rr}),Object.defineProperty(vi,"MEDIUM_SEAGREEN",{get:ar}),Object.defineProperty(vi,"MEDIUM_SLATE_BLUE",{get:sr}),Object.defineProperty(vi,"MEDIUM_SPRING_GREEN",{get:lr}),Object.defineProperty(vi,"MEDIUM_TURQUOISE",{get:ur}),Object.defineProperty(vi,"MEDIUM_VIOLET_RED",{get:cr}),Object.defineProperty(vi,"MIDNIGHT_BLUE",{get:pr}),Object.defineProperty(vi,"MINT_CREAM",{get:hr}),Object.defineProperty(vi,"MISTY_ROSE",{get:_r}),Object.defineProperty(vi,"MOCCASIN",{get:dr}),Object.defineProperty(vi,"NAVAJO_WHITE",{get:fr}),Object.defineProperty(vi,"NAVY",{get:mr}),Object.defineProperty(vi,"OLD_LACE",{get:$r}),Object.defineProperty(vi,"OLIVE",{get:yr}),Object.defineProperty(vi,"OLIVE_DRAB",{get:gr}),Object.defineProperty(vi,"ORANGE",{get:vr}),Object.defineProperty(vi,"ORANGE_RED",{get:br}),Object.defineProperty(vi,"ORCHID",{get:wr}),Object.defineProperty(vi,"PALE_GOLDEN_ROD",{get:xr}),Object.defineProperty(vi,"PALE_GREEN",{get:kr}),Object.defineProperty(vi,"PALE_TURQUOISE",{get:Cr}),Object.defineProperty(vi,"PALE_VIOLET_RED",{get:Er}),Object.defineProperty(vi,"PAPAYA_WHIP",{get:Sr}),Object.defineProperty(vi,"PEACH_PUFF",{get:Tr}),Object.defineProperty(vi,"PERU",{get:Or}),Object.defineProperty(vi,"PINK",{get:Nr}),Object.defineProperty(vi,"PLUM",{get:Pr}),Object.defineProperty(vi,"POWDER_BLUE",{get:Ir}),Object.defineProperty(vi,"PURPLE",{get:Ar}),Object.defineProperty(vi,"RED",{get:Rr}),Object.defineProperty(vi,"ROSY_BROWN",{get:jr}),Object.defineProperty(vi,"ROYAL_BLUE",{get:Lr}),Object.defineProperty(vi,"SADDLE_BROWN",{get:zr}),Object.defineProperty(vi,"SALMON",{get:Dr}),Object.defineProperty(vi,"SANDY_BROWN",{get:Mr}),Object.defineProperty(vi,"SEA_GREEN",{get:Br}),Object.defineProperty(vi,"SEASHELL",{get:Fr}),Object.defineProperty(vi,"SIENNA",{get:Ur}),Object.defineProperty(vi,"SILVER",{get:qr}),Object.defineProperty(vi,"SKY_BLUE",{get:Hr}),Object.defineProperty(vi,"SLATE_BLUE",{get:Gr}),Object.defineProperty(vi,"SLATE_GRAY",{get:Kr}),Object.defineProperty(vi,"SLATE_GREY",{get:Vr}),Object.defineProperty(vi,"SNOW",{get:Yr}),Object.defineProperty(vi,"SPRING_GREEN",{get:Wr}),Object.defineProperty(vi,"STEEL_BLUE",{get:Xr}),Object.defineProperty(vi,"TAN",{get:Zr}),Object.defineProperty(vi,"TEAL",{get:Jr}),Object.defineProperty(vi,"THISTLE",{get:Qr}),Object.defineProperty(vi,"TOMATO",{get:ta}),Object.defineProperty(vi,"TURQUOISE",{get:ea}),Object.defineProperty(vi,"VIOLET",{get:na}),Object.defineProperty(vi,"WHEAT",{get:ia}),Object.defineProperty(vi,"WHITE",{get:oa}),Object.defineProperty(vi,"WHITE_SMOKE",{get:ra}),Object.defineProperty(vi,"YELLOW",{get:aa}),Object.defineProperty(vi,"YELLOW_GREEN",{get:sa}),Object.defineProperty(vi,"NONE",{get:la}),Object.defineProperty(vi,"CURRENT_COLOR",{get:ua}),Object.defineProperty(vi,"Companion",{get:_a}),xc.SvgColors=vi,Object.defineProperty(xc,"SvgConstants",{get:$a}),Object.defineProperty(ya,"Companion",{get:ba}),xc.SvgContainer=ya,xc.SvgCssResource=wa,xc.SvgDefsElement=xa,Object.defineProperty(ka,"Companion",{get:Sa}),xc.SvgElement=ka,xc.SvgElementListener=Aa,Object.defineProperty(Ra,"Companion",{get:za}),xc.SvgEllipseElement=Ra,xc.SvgEventPeer=Da,xc.SvgGElement=Ha,Object.defineProperty(Ga,"Companion",{get:ls}),Object.defineProperty(us,"VISIBLE_PAINTED",{get:ps}),Object.defineProperty(us,"VISIBLE_FILL",{get:hs}),Object.defineProperty(us,"VISIBLE_STROKE",{get:_s}),Object.defineProperty(us,"VISIBLE",{get:ds}),Object.defineProperty(us,"PAINTED",{get:fs}),Object.defineProperty(us,"FILL",{get:ms}),Object.defineProperty(us,"STROKE",{get:$s}),Object.defineProperty(us,"ALL",{get:ys}),Object.defineProperty(us,"NONE",{get:gs}),Object.defineProperty(us,"INHERIT",{get:vs}),Ga.PointerEvents=us,Object.defineProperty(bs,"VISIBLE",{get:xs}),Object.defineProperty(bs,"HIDDEN",{get:ks}),Object.defineProperty(bs,"COLLAPSE",{get:Cs}),Object.defineProperty(bs,"INHERIT",{get:Es}),Ga.Visibility=bs,xc.SvgGraphicsElement=Ga,xc.SvgIRI=Ss,Object.defineProperty(Ts,"Companion",{get:Ps}),xc.SvgImageElement_init_6y0v78$=Is,xc.SvgImageElement=Ts,As.RGBEncoder=js,As.Bitmap=Ls,xc.SvgImageElementEx=As,Object.defineProperty(zs,"Companion",{get:Xs}),xc.SvgLineElement_init_6y0v78$=function(t,e,n,i,o){return o=o||Object.create(zs.prototype),zs.call(o),o.setAttribute_qdh7ux$(Xs().X1,t),o.setAttribute_qdh7ux$(Xs().Y1,e),o.setAttribute_qdh7ux$(Xs().X2,n),o.setAttribute_qdh7ux$(Xs().Y2,i),o},xc.SvgLineElement=zs,xc.SvgLocatable=Zs,xc.SvgNode=Js,xc.SvgNodeContainer=tl,Object.defineProperty(al,"MOVE_TO",{get:ll}),Object.defineProperty(al,"LINE_TO",{get:ul}),Object.defineProperty(al,"HORIZONTAL_LINE_TO",{get:cl}),Object.defineProperty(al,"VERTICAL_LINE_TO",{get:pl}),Object.defineProperty(al,"CURVE_TO",{get:hl}),Object.defineProperty(al,"SMOOTH_CURVE_TO",{get:_l}),Object.defineProperty(al,"QUADRATIC_BEZIER_CURVE_TO",{get:dl}),Object.defineProperty(al,"SMOOTH_QUADRATIC_BEZIER_CURVE_TO",{get:fl}),Object.defineProperty(al,"ELLIPTICAL_ARC",{get:ml}),Object.defineProperty(al,"CLOSE_PATH",{get:$l}),Object.defineProperty(al,"Companion",{get:vl}),rl.Action=al,Object.defineProperty(rl,"Companion",{get:Sl}),xc.SvgPathData=rl,Object.defineProperty(Ol,"LINEAR",{get:Pl}),Object.defineProperty(Ol,"CARDINAL",{get:Il}),Object.defineProperty(Ol,"MONOTONE",{get:Al}),Tl.Interpolation=Ol,xc.SvgPathDataBuilder=Tl,Object.defineProperty(Rl,"Companion",{get:zl}),xc.SvgPathElement_init_7jrsat$=function(t,e){return e=e||Object.create(Rl.prototype),Rl.call(e),e.setAttribute_qdh7ux$(zl().D,t),e},xc.SvgPathElement=Rl,xc.SvgPlatformPeer=Dl,Object.defineProperty(Ml,"Companion",{get:Ul}),xc.SvgRectElement_init_6y0v78$=ql,xc.SvgRectElement_init_wthzt5$=function(t,e){return e=e||Object.create(Ml.prototype),ql(t.origin.x,t.origin.y,t.dimension.x,t.dimension.y,e),e},xc.SvgRectElement=Ml,Object.defineProperty(Hl,"Companion",{get:Vl}),xc.SvgShape=Hl,Object.defineProperty(Yl,"Companion",{get:Zl}),xc.SvgStylableElement=Yl,xc.SvgStyleElement=Jl,Object.defineProperty(Ql,"Companion",{get:nu}),Ql.ViewBoxRectangle_init_6y0v78$=function(t,e,n,i,o){return o=o||Object.create(ou.prototype),ou.call(o),o.myX_0=t,o.myY_0=e,o.myWidth_0=n,o.myHeight_0=i,o},Ql.ViewBoxRectangle_init_wthzt5$=ru,Ql.ViewBoxRectangle=ou,xc.SvgSvgElement=Ql,Object.defineProperty(au,"Companion",{get:uu}),xc.SvgTSpanElement_init_61zpoe$=cu,xc.SvgTSpanElement=au,Object.defineProperty(pu,"Companion",{get:du}),xc.SvgTextContent=pu,Object.defineProperty(fu,"Companion",{get:yu}),xc.SvgTextElement_init_61zpoe$=function(t,e){return e=e||Object.create(fu.prototype),fu.call(e),e.setTextNode_61zpoe$(t),e},xc.SvgTextElement=fu,Object.defineProperty(gu,"Companion",{get:xu}),xc.SvgTextNode=gu,Object.defineProperty(ku,"Companion",{get:Su}),xc.SvgTransform=ku,xc.SvgTransformBuilder=Tu,Object.defineProperty(Ou,"Companion",{get:Iu}),xc.SvgTransformable=Ou,Object.defineProperty(xc,"SvgUtils",{get:Lu}),Object.defineProperty(xc,"XmlNamespace",{get:Gu});var kc=xc.event||(xc.event={});kc.SvgAttributeEvent=Ku,kc.SvgEventHandler=Vu,Object.defineProperty(Yu,"MOUSE_CLICKED",{get:Xu}),Object.defineProperty(Yu,"MOUSE_PRESSED",{get:Zu}),Object.defineProperty(Yu,"MOUSE_RELEASED",{get:Ju}),Object.defineProperty(Yu,"MOUSE_OVER",{get:Qu}),Object.defineProperty(Yu,"MOUSE_MOVE",{get:tc}),Object.defineProperty(Yu,"MOUSE_OUT",{get:ec}),kc.SvgEventSpec=Yu;var Cc=xc.slim||(xc.slim={});return Cc.DummySvgNode=nc,Cc.ElementJava=ic,Cc.GroupJava_init_vux3hl$=sc,Cc.GroupJava=rc,Object.defineProperty(lc,"Companion",{get:pc}),Cc.SlimBase=lc,Object.defineProperty(Cc,"SvgSlimElements",{get:dc}),Cc.SvgSlimGroup=fc,mc.Attr=$c,Cc.SvgSlimNode=mc,Cc.SvgSlimObject=yc,Cc.SvgSlimShape=gc,t})?i.apply(e,o):i)||(t.exports=r)}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var n=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t].call(n.exports,n,n.exports,__webpack_require__),n.exports}var __webpack_exports__=__webpack_require__(837);window.LetsPlot=__webpack_exports__})(); +(()=>{var __webpack_modules__={73:function(t,e,n){var i,o,r;o=[e,n(421)],void 0===(r="function"==typeof(i=function(t,e){"use strict";e.defineInlineFunction,e.wrapFunction;var n=e.Kind.INTERFACE,i=e.Kind.OBJECT,o=e.toString,r=e.equals,a=e.kotlin.Exception,s=e.kotlin.js.get_js_1yb8b7$,l=e.kotlin.Enum,u=e.Kind.CLASS,c=e.throwISE,p=e.kotlin.Unit,h=e.getCallableRef;function _(){}function d(){f=this}I.prototype=Object.create(l.prototype),I.prototype.constructor=I,_.$metadata$={kind:n,simpleName:"Appender",interfaces:[]},d.prototype.trace_s8jyv4$=function(t){console.log(t)},d.prototype.debug_s8jyv4$=function(t){console.log(t)},d.prototype.info_s8jyv4$=function(t){console.info(t)},d.prototype.warn_s8jyv4$=function(t){console.warn(t)},d.prototype.error_s8jyv4$=function(t){console.error(t)},d.$metadata$={kind:i,simpleName:"ConsoleOutputAppender",interfaces:[_]};var f=null;function m(){return null===f&&new d,f}function $(){y=this}$.prototype.formatMessage_pijeg6$=function(t,n,i){var r,s=t.name+": ["+n+"] ";try{r=o(i())}catch(t){if(!e.isType(t,a))throw t;r=G.ErrorMessageProducer.getErrorLog_3lhtaa$(t)}return s+r},$.prototype.formatMessage_hqgb2y$=function(t,n,i,r){var s,l=t.name+": ["+n+"] ";try{s=o(r())}catch(t){if(!e.isType(t,a))throw t;s=G.ErrorMessageProducer.getErrorLog_3lhtaa$(t)}return l+s+this.throwableToString_0(i)},$.prototype.formatMessage_i9qi47$=function(t,n,i,r){var s,l=t.name+": ["+n+"] "+o(null!=i?i.getName():null)+" ";try{s=o(r())}catch(t){if(!e.isType(t,a))throw t;s=G.ErrorMessageProducer.getErrorLog_3lhtaa$(t)}return l+s},$.prototype.formatMessage_fud0c7$=function(t,n,i,r,s){var l,u=t.name+": ["+n+"] "+o(null!=i?i.getName():null)+" ";try{l=o(s())}catch(t){if(!e.isType(t,a))throw t;l=G.ErrorMessageProducer.getErrorLog_3lhtaa$(t)}return u+l+this.throwableToString_0(r)},$.prototype.throwableToString_0=function(t){if(null==t)return"";for(var e="",n=t;null!=n&&!r(n.cause,n);)e+=", Caused by: '"+o(n.message)+"'",n=n.cause;return e},$.$metadata$={kind:i,simpleName:"DefaultMessageFormatter",interfaces:[v]};var y=null;function g(){return null===y&&new $,y}function v(){}function b(){}function w(){x=this}v.$metadata$={kind:n,simpleName:"Formatter",interfaces:[]},b.$metadata$={kind:n,simpleName:"KLogger",interfaces:[]},w.prototype.logger_o14v8n$=function(t){return new U(s(e.getKClassFromExpression(t)).name)},w.prototype.logger_61zpoe$=function(t){return new U(t)},w.$metadata$={kind:i,simpleName:"KotlinLogging",interfaces:[]};var x=null;function k(){N=this,this.LOG_LEVEL=L(),this.APPENDER=m(),this.FORMATTER=g()}k.$metadata$={kind:i,simpleName:"KotlinLoggingConfiguration",interfaces:[]};var C,E,S,T,O,N=null;function P(){return null===N&&new k,N}function I(t,e){l.call(this),this.name$=t,this.ordinal$=e}function A(){A=function(){},C=new I("TRACE",0),E=new I("DEBUG",1),S=new I("INFO",2),T=new I("WARN",3),O=new I("ERROR",4)}function R(){return A(),C}function j(){return A(),E}function L(){return A(),S}function z(){return A(),T}function D(){return A(),O}function M(t){return t.ordinal>=P().LOG_LEVEL.ordinal}function B(){F=this}I.$metadata$={kind:u,simpleName:"KotlinLoggingLevel",interfaces:[l]},I.values=function(){return[R(),j(),L(),z(),D()]},I.valueOf_61zpoe$=function(t){switch(t){case"TRACE":return R();case"DEBUG":return j();case"INFO":return L();case"WARN":return z();case"ERROR":return D();default:c("No enum constant mu.KotlinLoggingLevel."+t)}},B.prototype.getErrorLog_3lhtaa$=function(t){return"Log message invocation failed: "+t},B.$metadata$={kind:i,simpleName:"ErrorMessageProducer",interfaces:[]};var F=null;function U(t){this.loggerName_0=t}function q(){return"exit()"}U.prototype.trace_nq59yw$=function(t){this.logIfEnabled_0(R(),t,h("trace",function(t,e){return t.trace_s8jyv4$(e),p}.bind(null,P().APPENDER)))},U.prototype.debug_nq59yw$=function(t){this.logIfEnabled_0(j(),t,h("debug",function(t,e){return t.debug_s8jyv4$(e),p}.bind(null,P().APPENDER)))},U.prototype.info_nq59yw$=function(t){this.logIfEnabled_0(L(),t,h("info",function(t,e){return t.info_s8jyv4$(e),p}.bind(null,P().APPENDER)))},U.prototype.warn_nq59yw$=function(t){this.logIfEnabled_0(z(),t,h("warn",function(t,e){return t.warn_s8jyv4$(e),p}.bind(null,P().APPENDER)))},U.prototype.error_nq59yw$=function(t){this.logIfEnabled_0(D(),t,h("error",function(t,e){return t.error_s8jyv4$(e),p}.bind(null,P().APPENDER)))},U.prototype.trace_ca4k3s$=function(t,e){this.logIfEnabled_1(R(),e,t,h("trace",function(t,e){return t.trace_s8jyv4$(e),p}.bind(null,P().APPENDER)))},U.prototype.debug_ca4k3s$=function(t,e){this.logIfEnabled_1(j(),e,t,h("debug",function(t,e){return t.debug_s8jyv4$(e),p}.bind(null,P().APPENDER)))},U.prototype.info_ca4k3s$=function(t,e){this.logIfEnabled_1(L(),e,t,h("info",function(t,e){return t.info_s8jyv4$(e),p}.bind(null,P().APPENDER)))},U.prototype.warn_ca4k3s$=function(t,e){this.logIfEnabled_1(z(),e,t,h("warn",function(t,e){return t.warn_s8jyv4$(e),p}.bind(null,P().APPENDER)))},U.prototype.error_ca4k3s$=function(t,e){this.logIfEnabled_1(D(),e,t,h("error",function(t,e){return t.error_s8jyv4$(e),p}.bind(null,P().APPENDER)))},U.prototype.trace_8jakm3$=function(t,e){this.logIfEnabled_2(R(),t,e,h("trace",function(t,e){return t.trace_s8jyv4$(e),p}.bind(null,P().APPENDER)))},U.prototype.debug_8jakm3$=function(t,e){this.logIfEnabled_2(j(),t,e,h("debug",function(t,e){return t.debug_s8jyv4$(e),p}.bind(null,P().APPENDER)))},U.prototype.info_8jakm3$=function(t,e){this.logIfEnabled_2(L(),t,e,h("info",function(t,e){return t.info_s8jyv4$(e),p}.bind(null,P().APPENDER)))},U.prototype.warn_8jakm3$=function(t,e){this.logIfEnabled_2(z(),t,e,h("warn",function(t,e){return t.warn_s8jyv4$(e),p}.bind(null,P().APPENDER)))},U.prototype.error_8jakm3$=function(t,e){this.logIfEnabled_2(D(),t,e,h("error",function(t,e){return t.error_s8jyv4$(e),p}.bind(null,P().APPENDER)))},U.prototype.trace_o4svvp$=function(t,e,n){this.logIfEnabled_3(R(),t,n,e,h("trace",function(t,e){return t.trace_s8jyv4$(e),p}.bind(null,P().APPENDER)))},U.prototype.debug_o4svvp$=function(t,e,n){this.logIfEnabled_3(j(),t,n,e,h("debug",function(t,e){return t.debug_s8jyv4$(e),p}.bind(null,P().APPENDER)))},U.prototype.info_o4svvp$=function(t,e,n){this.logIfEnabled_3(L(),t,n,e,h("info",function(t,e){return t.info_s8jyv4$(e),p}.bind(null,P().APPENDER)))},U.prototype.warn_o4svvp$=function(t,e,n){this.logIfEnabled_3(z(),t,n,e,h("warn",function(t,e){return t.warn_s8jyv4$(e),p}.bind(null,P().APPENDER)))},U.prototype.error_o4svvp$=function(t,e,n){this.logIfEnabled_3(D(),t,n,e,h("error",function(t,e){return t.error_s8jyv4$(e),p}.bind(null,P().APPENDER)))},U.prototype.logIfEnabled_0=function(t,e,n){M(t)&&n(P().FORMATTER.formatMessage_pijeg6$(t,this.loggerName_0,e))},U.prototype.logIfEnabled_1=function(t,e,n,i){M(t)&&i(P().FORMATTER.formatMessage_hqgb2y$(t,this.loggerName_0,n,e))},U.prototype.logIfEnabled_2=function(t,e,n,i){M(t)&&i(P().FORMATTER.formatMessage_i9qi47$(t,this.loggerName_0,e,n))},U.prototype.logIfEnabled_3=function(t,e,n,i,o){M(t)&&o(P().FORMATTER.formatMessage_fud0c7$(t,this.loggerName_0,e,i,n))},U.prototype.entry_yhszz7$=function(t){var e;this.logIfEnabled_0(R(),(e=t,function(){return"entry("+e+")"}),h("trace",function(t,e){return t.trace_s8jyv4$(e),p}.bind(null,P().APPENDER)))},U.prototype.exit=function(){this.logIfEnabled_0(R(),q,h("trace",function(t,e){return t.trace_s8jyv4$(e),p}.bind(null,P().APPENDER)))},U.prototype.exit_mh5how$=function(t){return this.logIfEnabled_0(R(),(e=t,function(){return"exit("+e+")"}),h("trace",function(t,e){return t.trace_s8jyv4$(e),p}.bind(null,P().APPENDER))),t;var e},U.prototype.throwing_849n7l$=function(t){return this.logIfEnabled_1(D(),(e=t,function(){return"throwing("+e}),t,h("error",function(t,e){return t.error_s8jyv4$(e),p}.bind(null,P().APPENDER))),t;var e},U.prototype.catching_849n7l$=function(t){var e;this.logIfEnabled_1(D(),(e=t,function(){return"catching("+e}),t,h("error",function(t,e){return t.error_s8jyv4$(e),p}.bind(null,P().APPENDER)))},U.$metadata$={kind:u,simpleName:"KLoggerJS",interfaces:[b]};var H=t.mu||(t.mu={}),G=H.internal||(H.internal={});return H.Appender=_,Object.defineProperty(H,"ConsoleOutputAppender",{get:m}),Object.defineProperty(H,"DefaultMessageFormatter",{get:g}),H.Formatter=v,H.KLogger=b,Object.defineProperty(H,"KotlinLogging",{get:function(){return null===x&&new w,x}}),Object.defineProperty(H,"KotlinLoggingConfiguration",{get:P}),Object.defineProperty(I,"TRACE",{get:R}),Object.defineProperty(I,"DEBUG",{get:j}),Object.defineProperty(I,"INFO",{get:L}),Object.defineProperty(I,"WARN",{get:z}),Object.defineProperty(I,"ERROR",{get:D}),H.KotlinLoggingLevel=I,H.isLoggingEnabled_pm19j7$=M,Object.defineProperty(G,"ErrorMessageProducer",{get:function(){return null===F&&new B,F}}),G.KLoggerJS=U,t})?i.apply(e,o):i)||(t.exports=r)},421:function(t,e){var n,i;n=function(t){var e=t;t.isBooleanArray=function(t){return(Array.isArray(t)||t instanceof Int8Array)&&"BooleanArray"===t.$type$},t.isByteArray=function(t){return t instanceof Int8Array&&"BooleanArray"!==t.$type$},t.isShortArray=function(t){return t instanceof Int16Array},t.isCharArray=function(t){return t instanceof Uint16Array&&"CharArray"===t.$type$},t.isIntArray=function(t){return t instanceof Int32Array},t.isFloatArray=function(t){return t instanceof Float32Array},t.isDoubleArray=function(t){return t instanceof Float64Array},t.isLongArray=function(t){return Array.isArray(t)&&"LongArray"===t.$type$},t.isArray=function(t){return Array.isArray(t)&&!t.$type$},t.isArrayish=function(t){return Array.isArray(t)||ArrayBuffer.isView(t)},t.arrayToString=function(e){if(null===e)return"null";var n=t.isCharArray(e)?String.fromCharCode:t.toString;return"["+Array.prototype.map.call(e,(function(t){return n(t)})).join(", ")+"]"},t.arrayEquals=function(e,n){if(e===n)return!0;if(null===e||null===n||!t.isArrayish(n)||e.length!==n.length)return!1;for(var i=0,o=e.length;i>16},t.toByte=function(t){return(255&t)<<24>>24},t.toChar=function(t){return 65535&t},t.numberToLong=function(e){return e instanceof t.Long?e:t.Long.fromNumber(e)},t.numberToInt=function(e){return e instanceof t.Long?e.toInt():t.doubleToInt(e)},t.numberToDouble=function(t){return+t},t.doubleToInt=function(t){return t>2147483647?2147483647:t<-2147483648?-2147483648:0|t},t.toBoxedChar=function(e){return null==e||e instanceof t.BoxedChar?e:new t.BoxedChar(e)},t.unboxChar=function(e){return null==e?e:t.toChar(e)},t.equals=function(t,e){return null==t?null==e:null!=e&&(t!=t?e!=e:"object"==typeof t&&"function"==typeof t.equals?t.equals(e):"number"==typeof t&&"number"==typeof e?t===e&&(0!==t||1/t==1/e):t===e)},t.hashCode=function(e){if(null==e)return 0;var n=typeof e;return"object"===n?"function"==typeof e.hashCode?e.hashCode():h(e):"function"===n?h(e):"number"===n?t.numberHashCode(e):"boolean"===n?Number(e):function(t){for(var e=0,n=0;n=t.Long.TWO_PWR_63_DBL_?t.Long.MAX_VALUE:e<0?t.Long.fromNumber(-e).negate():new t.Long(e%t.Long.TWO_PWR_32_DBL_|0,e/t.Long.TWO_PWR_32_DBL_|0)},t.Long.fromBits=function(e,n){return new t.Long(e,n)},t.Long.fromString=function(e,n){if(0==e.length)throw Error("number format error: empty string");var i=n||10;if(i<2||36=0)throw Error('number format error: interior "-" character: '+e);for(var o=t.Long.fromNumber(Math.pow(i,8)),r=t.Long.ZERO,a=0;a=0?this.low_:t.Long.TWO_PWR_32_DBL_+this.low_},t.Long.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equalsLong(t.Long.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var e=0!=this.high_?this.high_:this.low_,n=31;n>0&&0==(e&1<0},t.Long.prototype.greaterThanOrEqual=function(t){return this.compare(t)>=0},t.Long.prototype.compare=function(t){if(this.equalsLong(t))return 0;var e=this.isNegative(),n=t.isNegative();return e&&!n?-1:!e&&n?1:this.subtract(t).isNegative()?-1:1},t.Long.prototype.negate=function(){return this.equalsLong(t.Long.MIN_VALUE)?t.Long.MIN_VALUE:this.not().add(t.Long.ONE)},t.Long.prototype.add=function(e){var n=this.high_>>>16,i=65535&this.high_,o=this.low_>>>16,r=65535&this.low_,a=e.high_>>>16,s=65535&e.high_,l=e.low_>>>16,u=0,c=0,p=0,h=0;return p+=(h+=r+(65535&e.low_))>>>16,h&=65535,c+=(p+=o+l)>>>16,p&=65535,u+=(c+=i+s)>>>16,c&=65535,u+=n+a,u&=65535,t.Long.fromBits(p<<16|h,u<<16|c)},t.Long.prototype.subtract=function(t){return this.add(t.negate())},t.Long.prototype.multiply=function(e){if(this.isZero())return t.Long.ZERO;if(e.isZero())return t.Long.ZERO;if(this.equalsLong(t.Long.MIN_VALUE))return e.isOdd()?t.Long.MIN_VALUE:t.Long.ZERO;if(e.equalsLong(t.Long.MIN_VALUE))return this.isOdd()?t.Long.MIN_VALUE:t.Long.ZERO;if(this.isNegative())return e.isNegative()?this.negate().multiply(e.negate()):this.negate().multiply(e).negate();if(e.isNegative())return this.multiply(e.negate()).negate();if(this.lessThan(t.Long.TWO_PWR_24_)&&e.lessThan(t.Long.TWO_PWR_24_))return t.Long.fromNumber(this.toNumber()*e.toNumber());var n=this.high_>>>16,i=65535&this.high_,o=this.low_>>>16,r=65535&this.low_,a=e.high_>>>16,s=65535&e.high_,l=e.low_>>>16,u=65535&e.low_,c=0,p=0,h=0,_=0;return h+=(_+=r*u)>>>16,_&=65535,p+=(h+=o*u)>>>16,h&=65535,p+=(h+=r*l)>>>16,h&=65535,c+=(p+=i*u)>>>16,p&=65535,c+=(p+=o*l)>>>16,p&=65535,c+=(p+=r*s)>>>16,p&=65535,c+=n*u+i*l+o*s+r*a,c&=65535,t.Long.fromBits(h<<16|_,c<<16|p)},t.Long.prototype.div=function(e){if(e.isZero())throw Error("division by zero");if(this.isZero())return t.Long.ZERO;if(this.equalsLong(t.Long.MIN_VALUE)){if(e.equalsLong(t.Long.ONE)||e.equalsLong(t.Long.NEG_ONE))return t.Long.MIN_VALUE;if(e.equalsLong(t.Long.MIN_VALUE))return t.Long.ONE;if((o=this.shiftRight(1).div(e).shiftLeft(1)).equalsLong(t.Long.ZERO))return e.isNegative()?t.Long.ONE:t.Long.NEG_ONE;var n=this.subtract(e.multiply(o));return o.add(n.div(e))}if(e.equalsLong(t.Long.MIN_VALUE))return t.Long.ZERO;if(this.isNegative())return e.isNegative()?this.negate().div(e.negate()):this.negate().div(e).negate();if(e.isNegative())return this.div(e.negate()).negate();var i=t.Long.ZERO;for(n=this;n.greaterThanOrEqual(e);){for(var o=Math.max(1,Math.floor(n.toNumber()/e.toNumber())),r=Math.ceil(Math.log(o)/Math.LN2),a=r<=48?1:Math.pow(2,r-48),s=t.Long.fromNumber(o),l=s.multiply(e);l.isNegative()||l.greaterThan(n);)o-=a,l=(s=t.Long.fromNumber(o)).multiply(e);s.isZero()&&(s=t.Long.ONE),i=i.add(s),n=n.subtract(l)}return i},t.Long.prototype.modulo=function(t){return this.subtract(this.div(t).multiply(t))},t.Long.prototype.not=function(){return t.Long.fromBits(~this.low_,~this.high_)},t.Long.prototype.and=function(e){return t.Long.fromBits(this.low_&e.low_,this.high_&e.high_)},t.Long.prototype.or=function(e){return t.Long.fromBits(this.low_|e.low_,this.high_|e.high_)},t.Long.prototype.xor=function(e){return t.Long.fromBits(this.low_^e.low_,this.high_^e.high_)},t.Long.prototype.shiftLeft=function(e){if(0==(e&=63))return this;var n=this.low_;if(e<32){var i=this.high_;return t.Long.fromBits(n<>>32-e)}return t.Long.fromBits(0,n<>>e|n<<32-e,n>>e)}return t.Long.fromBits(n>>e-32,n>=0?0:-1)},t.Long.prototype.shiftRightUnsigned=function(e){if(0==(e&=63))return this;var n=this.high_;if(e<32){var i=this.low_;return t.Long.fromBits(i>>>e|n<<32-e,n>>>e)}return 32==e?t.Long.fromBits(n,0):t.Long.fromBits(n>>>e-32,0)},t.Long.prototype.equals=function(e){return e instanceof t.Long&&this.equalsLong(e)},t.Long.prototype.compareTo_11rb$=t.Long.prototype.compare,t.Long.prototype.inc=function(){return this.add(t.Long.ONE)},t.Long.prototype.dec=function(){return this.add(t.Long.NEG_ONE)},t.Long.prototype.valueOf=function(){return this.toNumber()},t.Long.prototype.unaryPlus=function(){return this},t.Long.prototype.unaryMinus=t.Long.prototype.negate,t.Long.prototype.inv=t.Long.prototype.not,t.Long.prototype.rangeTo=function(e){return new t.kotlin.ranges.LongRange(this,e)},t.defineInlineFunction=function(t,e){return e},t.wrapFunction=function(t){var e=function(){return(e=t()).apply(this,arguments)};return function(){return e.apply(this,arguments)}},t.isTypeOf=function(t){return function(e){return typeof e===t}},t.isInstanceOf=function(e){return function(n){return t.isType(n,e)}},t.orNull=function(t){return function(e){return null==e||t(e)}},t.suspendCall=function(t){return t},t.coroutineResult=function(t){_()},t.coroutineReceiver=function(t){_()},t.setCoroutineResult=function(t,e){_()},t.getReifiedTypeParameterKType=function(t){_()},t.compareTo=function(e,n){var i=typeof e;return"number"===i?"number"==typeof n?t.doubleCompareTo(e,n):t.primitiveCompareTo(e,n):"string"===i||"boolean"===i?t.primitiveCompareTo(e,n):e.compareTo_11rb$(n)},t.primitiveCompareTo=function(t,e){return te?1:0},t.doubleCompareTo=function(t,e){if(te)return 1;if(t===e){if(0!==t)return 0;var n=1/t;return n===1/e?0:n<0?-1:1}return t!=t?e!=e?0:1:-1},t.charInc=function(e){return t.toChar(e+1)},t.imul=Math.imul||d,t.imulEmulated=d,i=new ArrayBuffer(8),o=new Float64Array(i),r=new Float32Array(i),a=new Int32Array(i),s=0,l=1,o[0]=-1,0!==a[s]&&(s=1,l=0),t.doubleToBits=function(e){return t.doubleToRawBits(isNaN(e)?NaN:e)},t.doubleToRawBits=function(e){return o[0]=e,t.Long.fromBits(a[s],a[l])},t.doubleFromBits=function(t){return a[s]=t.low_,a[l]=t.high_,o[0]},t.floatToBits=function(e){return t.floatToRawBits(isNaN(e)?NaN:e)},t.floatToRawBits=function(t){return r[0]=t,a[0]},t.floatFromBits=function(t){return a[0]=t,r[0]},t.numberHashCode=function(t){return(0|t)===t?0|t:(o[0]=t,(31*a[l]|0)+a[s]|0)},t.ensureNotNull=function(e){return null!=e?e:t.throwNPE()},void 0===String.prototype.startsWith&&Object.defineProperty(String.prototype,"startsWith",{value:function(t,e){return e=e||0,this.lastIndexOf(t,e)===e}}),void 0===String.prototype.endsWith&&Object.defineProperty(String.prototype,"endsWith",{value:function(t,e){var n=this.toString();(void 0===e||e>n.length)&&(e=n.length),e-=t.length;var i=n.indexOf(t,e);return-1!==i&&i===e}}),void 0===Math.sign&&(Math.sign=function(t){return 0==(t=+t)||isNaN(t)?Number(t):t>0?1:-1}),void 0===Math.trunc&&(Math.trunc=function(t){return isNaN(t)?NaN:t>0?Math.floor(t):Math.ceil(t)}),function(){var t=Math.sqrt(2220446049250313e-31),e=Math.sqrt(t),n=1/t,i=1/e;if(void 0===Math.sinh&&(Math.sinh=function(n){if(Math.abs(n)t&&(i+=n*n*n/6),i}var o=Math.exp(n),r=1/o;return isFinite(o)?isFinite(r)?(o-r)/2:-Math.exp(-n-Math.LN2):Math.exp(n-Math.LN2)}),void 0===Math.cosh&&(Math.cosh=function(t){var e=Math.exp(t),n=1/e;return isFinite(e)&&isFinite(n)?(e+n)/2:Math.exp(Math.abs(t)-Math.LN2)}),void 0===Math.tanh&&(Math.tanh=function(n){if(Math.abs(n)t&&(i-=n*n*n/3),i}var o=Math.exp(+n),r=Math.exp(-n);return o===1/0?1:r===1/0?-1:(o-r)/(o+r)}),void 0===Math.asinh){var o=function(r){if(r>=+e)return r>i?r>n?Math.log(r)+Math.LN2:Math.log(2*r+1/(2*r)):Math.log(r+Math.sqrt(r*r+1));if(r<=-e)return-o(-r);var a=r;return Math.abs(r)>=t&&(a-=r*r*r/6),a};Math.asinh=o}void 0===Math.acosh&&(Math.acosh=function(i){if(i<1)return NaN;if(i-1>=e)return i>n?Math.log(i)+Math.LN2:Math.log(i+Math.sqrt(i*i-1));var o=Math.sqrt(i-1),r=o;return o>=t&&(r-=o*o*o/12),Math.sqrt(2)*r}),void 0===Math.atanh&&(Math.atanh=function(n){if(Math.abs(n)t&&(i+=n*n*n/3),i}return Math.log((1+n)/(1-n))/2}),void 0===Math.log1p&&(Math.log1p=function(t){if(Math.abs(t)>>0;return 0===e?32:31-(u(e)/c|0)|0})),void 0===ArrayBuffer.isView&&(ArrayBuffer.isView=function(t){return null!=t&&null!=t.__proto__&&t.__proto__.__proto__===Int8Array.prototype.__proto__}),void 0===Array.prototype.fill&&Object.defineProperty(Array.prototype,"fill",{value:function(t){if(null==this)throw new TypeError("this is null or not defined");for(var e=Object(this),n=e.length>>>0,i=arguments[1]>>0,o=i<0?Math.max(n+i,0):Math.min(i,n),r=arguments[2],a=void 0===r?n:r>>0,s=a<0?Math.max(n+a,0):Math.min(a,n);oe)return 1;if(t===e){if(0!==t)return 0;var n=1/t;return n===1/e?0:n<0?-1:1}return t!=t?e!=e?0:1:-1};for(i=0;i=0}function G(t,e){return V(t,e)>=0}function K(t,e){if(null==e){for(var n=0;n!==t.length;++n)if(null==t[n])return n}else for(var i=0;i!==t.length;++i)if(s(e,t[i]))return i;return-1}function V(t,e){for(var n=0;n!==t.length;++n)if(e===t[n])return n;return-1}function Y(t,e){var n,i;if(null==e)for(n=Dt(tt(t)).iterator();n.hasNext();){var o=n.next();if(null==t[o])return o}else for(i=Dt(tt(t)).iterator();i.hasNext();){var r=i.next();if(s(e,t[r]))return r}return-1}function W(t,e){var n;for(n=Dt(et(t)).iterator();n.hasNext();){var i=n.next();if(e===t[i])return i}return-1}function X(t){var e;switch(t.length){case 0:throw new $n("Array is empty.");case 1:e=t[0];break;default:throw sn("Array has more than one element.")}return e}function Z(t){return J(t,yi())}function J(t,e){var n;for(n=0;n!==t.length;++n){var i=t[n];null!=i&&e.add_11rb$(i)}return e}function Q(t,e){var n;if(!(e>=0))throw sn(("Requested element count "+e+" is less than zero.").toString());if(0===e)return ss();if(e>=t.length)return at(t);if(1===e)return Vn(t[0]);var i=0,o=gi();for(n=0;n!==t.length;++n){var r=t[n];if(o.add_11rb$(r),(i=i+1|0)===e)break}return o}function tt(t){return new cc(0,nt(t))}function et(t){return new cc(0,ot(t))}function nt(t){return t.length-1|0}function it(t){return t.length-1|0}function ot(t){return t.length-1|0}function rt(t,e){var n;for(n=0;n!==t.length;++n){var i=t[n];e.add_11rb$(i)}return e}function at(t){var e;switch(t.length){case 0:e=ss();break;case 1:e=Vn(t[0]);break;default:e=st(t)}return e}function st(t){return vi(rs(t))}function lt(t){var e;switch(t.length){case 0:e=Bl();break;case 1:e=Yn(t[0]);break;default:e=rt(t,lo(t.length))}return e}function ut(t,e,n,i,o,r,a,s){var l;void 0===n&&(n=", "),void 0===i&&(i=""),void 0===o&&(o=""),void 0===r&&(r=-1),void 0===a&&(a="..."),void 0===s&&(s=null),e.append_gw00v9$(i);var u=0;for(l=0;l!==t.length;++l){var c=t[l];if((u=u+1|0)>1&&e.append_gw00v9$(n),!(r<0||u<=r))break;qc(e,c,s)}return r>=0&&u>r&&e.append_gw00v9$(a),e.append_gw00v9$(o),e}function ct(e){return 0===e.length?cl():new q((n=e,function(){return t.arrayIterator(n)}));var n}function pt(t){this.closure$iterator=t}function ht(e,n){return t.isType(e,ue)?e.contains_11rb$(n):$t(e,n)>=0}function _t(e,n){return t.isType(e,pe)?e.get_za3lpa$(n):dt(e,n,(i=n,function(t){throw new cn("Collection doesn't contain element at index "+i+".")}));var i}function dt(e,n,i){var o;if(t.isType(e,pe))return n>=0&&n<=hs(e)?e.get_za3lpa$(n):i(n);if(n<0)return i(n);for(var r=e.iterator(),a=0;r.hasNext();){var s=r.next();if(n===(a=(o=a)+1|0,o))return s}return i(n)}function ft(e){if(t.isType(e,pe))return mt(e);var n=e.iterator();if(!n.hasNext())throw new $n("Collection is empty.");return n.next()}function mt(t){if(t.isEmpty())throw new $n("List is empty.");return t.get_za3lpa$(0)}function $t(e,n){var i;if(t.isType(e,pe))return e.indexOf_11rb$(n);var o=0;for(i=e.iterator();i.hasNext();){var r=i.next();if(ti(o),s(n,r))return o;o=o+1|0}return-1}function yt(e){if(t.isType(e,pe))return gt(e);var n=e.iterator();if(!n.hasNext())throw new $n("Collection is empty.");for(var i=n.next();n.hasNext();)i=n.next();return i}function gt(t){if(t.isEmpty())throw new $n("List is empty.");return t.get_za3lpa$(hs(t))}function vt(e){if(t.isType(e,pe))return bt(e);var n=e.iterator();if(!n.hasNext())throw new $n("Collection is empty.");var i=n.next();if(n.hasNext())throw sn("Collection has more than one element.");return i}function bt(t){var e;switch(t.size){case 0:throw new $n("List is empty.");case 1:e=t.get_za3lpa$(0);break;default:throw sn("List has more than one element.")}return e}function wt(t,e){var n;for(n=t.iterator();n.hasNext();){var i=n.next();null!=i&&e.add_11rb$(i)}return e}function xt(e,n){var i;if(!(n>=0))throw sn(("Requested element count "+n+" is less than zero.").toString());if(0===n)return ss();if(t.isType(e,ue)){if(n>=e.size)return Tt(e);if(1===n)return Vn(ft(e))}var o=0,r=gi();for(i=e.iterator();i.hasNext();){var a=i.next();if(r.add_11rb$(a),(o=o+1|0)===n)break}return _s(r)}function kt(t,e){for(var n=hs(t);n>=1;n--){var i=e.nextInt_za3lpa$(n+1|0);t.set_wxm5ur$(i,t.set_wxm5ur$(n,t.get_za3lpa$(i)))}}function Ct(e,n){var i;if(t.isType(e,ue)){if(e.size<=1)return Tt(e);var o=t.isArray(i=Hn(e))?i:yo();return Rn(o,n),Sn(o)}var r=Ot(e);return Zn(r,n),r}function Et(t,e){var n;for(n=t.iterator();n.hasNext();){var i=n.next();e.add_11rb$(i)}return e}function St(t){return Et(t,Hi(bs(t,12)))}function Tt(e){var n;if(t.isType(e,ue)){switch(e.size){case 0:n=ss();break;case 1:n=Vn(t.isType(e,pe)?e.get_za3lpa$(0):e.iterator().next());break;default:n=Nt(e)}return n}return _s(Ot(e))}function Ot(e){return t.isType(e,ue)?Nt(e):Et(e,yi())}function Nt(t){return vi(t)}function Pt(e){var n;if(t.isType(e,ue)){switch(e.size){case 0:n=Bl();break;case 1:n=Yn(t.isType(e,pe)?e.get_za3lpa$(0):e.iterator().next());break;default:n=Et(e,lo(e.size))}return n}return Ul(Et(e,ro()))}function It(e){return t.isType(e,ue)?ao(e):Et(e,ro())}function At(e,n){if(t.isType(n,ue)){var i=gi((e.size,n.size));return i.addAll_brywnq$(e),i.addAll_brywnq$(n),i}var o=vi(e);return Fs(o,n),o}function Rt(t,e,n,i,o,r,a,s){var l;void 0===n&&(n=", "),void 0===i&&(i=""),void 0===o&&(o=""),void 0===r&&(r=-1),void 0===a&&(a="..."),void 0===s&&(s=null),e.append_gw00v9$(i);var u=0;for(l=t.iterator();l.hasNext();){var c=l.next();if((u=u+1|0)>1&&e.append_gw00v9$(n),!(r<0||u<=r))break;qc(e,c,s)}return r>=0&&u>r&&e.append_gw00v9$(a),e.append_gw00v9$(o),e}function jt(t,e,n,i,o,r,a){return void 0===e&&(e=", "),void 0===n&&(n=""),void 0===i&&(i=""),void 0===o&&(o=-1),void 0===r&&(r="..."),void 0===a&&(a=null),Rt(t,Er(),e,n,i,o,r,a).toString()}function Lt(t){return new pt((e=t,function(){return e.iterator()}));var e}function zt(t,e){return Tc().fromClosedRange_qt1dr2$(t,e,-1)}function Dt(t){return Tc().fromClosedRange_qt1dr2$(t.last,t.first,0|-t.step)}function Mt(t,e){return e<=-2147483648?_c().EMPTY:new cc(t,e-1|0)}function Bt(t,e){return te?e:t}function Ut(t,e,n){if(e>n)throw sn("Cannot coerce value to an empty range: maximum "+n+" is less than minimum "+e+".");return tn?n:t}function qt(t,e){if(e.isEmpty())throw sn("Cannot coerce value to an empty range: "+e+".");return e.lessThanOrEquals_n65qkk$(t,e.start)&&!e.lessThanOrEquals_n65qkk$(e.start,t)?e.start:e.lessThanOrEquals_n65qkk$(e.endInclusive,t)&&!e.lessThanOrEquals_n65qkk$(t,e.endInclusive)?e.endInclusive:t}function Ht(t){this.closure$iterator=t}function Gt(t,e){return new gl(t,!1,e)}function Kt(t){return null==t}function Vt(e){var n;return t.isType(n=Gt(e,Kt),il)?n:yo()}function Yt(e,n){if(!(n>=0))throw sn(("Requested element count "+n+" is less than zero.").toString());return 0===n?cl():t.isType(e,Sl)?e.take_za3lpa$(n):new Nl(e,n)}function Wt(t,e){this.this$sortedWith=t,this.closure$comparator=e}function Xt(t,e){var n;for(n=t.iterator();n.hasNext();){var i=n.next();e.add_11rb$(i)}return e}function Zt(t){return _s(Jt(t))}function Jt(t){return Xt(t,yi())}function Qt(t,e){return new bl(t,e)}function te(t,e,n,i){return void 0===n&&(n=1),void 0===i&&(i=!1),Gl(t,e,n,i,!1)}function ee(t,e){return th(t,e)}function ne(t,e,n,i,o,r,a,s){var l;void 0===n&&(n=", "),void 0===i&&(i=""),void 0===o&&(o=""),void 0===r&&(r=-1),void 0===a&&(a="..."),void 0===s&&(s=null),e.append_gw00v9$(i);var u=0;for(l=t.iterator();l.hasNext();){var c=l.next();if((u=u+1|0)>1&&e.append_gw00v9$(n),!(r<0||u<=r))break;qc(e,c,s)}return r>=0&&u>r&&e.append_gw00v9$(a),e.append_gw00v9$(o),e}function ie(t){return new Ht((e=t,function(){return e.iterator()}));var e}function oe(t){this.closure$iterator=t}function re(t,e){if(!(e>=0))throw sn(("Requested character count "+e+" is less than zero.").toString());return t.substring(0,Ft(e,t.length))}function ae(){}function se(){}function le(){}function ue(){}function ce(){}function pe(){}function he(){}function _e(){}function de(){}function fe(){}function me(){}function $e(){}function ye(){}function ge(){}function ve(){}function be(){}function we(){}function xe(){ke=this}en.prototype=Object.create(T.prototype),en.prototype.constructor=en,on.prototype=Object.create(en.prototype),on.prototype.constructor=on,Se.prototype=Object.create(el.prototype),Se.prototype.constructor=Se,Oe.prototype=Object.create(Ys.prototype),Oe.prototype.constructor=Oe,Pe.prototype=Object.create(Xs.prototype),Pe.prototype.constructor=Pe,Ae.prototype=Object.create(Ws.prototype),Ae.prototype.constructor=Ae,je.prototype=Object.create(Zs.prototype),je.prototype.constructor=je,ze.prototype=Object.create(Qs.prototype),ze.prototype.constructor=ze,Me.prototype=Object.create(tl.prototype),Me.prototype.constructor=Me,Fe.prototype=Object.create(Js.prototype),Fe.prototype.constructor=Fe,Qe.prototype=Object.create(T.prototype),Qe.prototype.constructor=Qe,an.prototype=Object.create(on.prototype),an.prototype.constructor=an,ln.prototype=Object.create(on.prototype),ln.prototype.constructor=ln,cn.prototype=Object.create(on.prototype),cn.prototype.constructor=cn,pn.prototype=Object.create(on.prototype),pn.prototype.constructor=pn,dn.prototype=Object.create(an.prototype),dn.prototype.constructor=dn,fn.prototype=Object.create(on.prototype),fn.prototype.constructor=fn,mn.prototype=Object.create(on.prototype),mn.prototype.constructor=mn,$n.prototype=Object.create(on.prototype),$n.prototype.constructor=$n,gn.prototype=Object.create(on.prototype),gn.prototype.constructor=gn,vn.prototype=Object.create(on.prototype),vn.prototype.constructor=vn,wn.prototype=Object.create(on.prototype),wn.prototype.constructor=wn,Aa.prototype=Object.create(Ca.prototype),Aa.prototype.constructor=Aa,Tn.prototype=Object.create(Aa.prototype),Tn.prototype.constructor=Tn,oi.prototype=Object.create(Ca.prototype),oi.prototype.constructor=oi,si.prototype=Object.create(ai.prototype),si.prototype.constructor=si,ri.prototype=Object.create(oi.prototype),ri.prototype.constructor=ri,li.prototype=Object.create(ri.prototype),li.prototype.constructor=li,mi.prototype=Object.create(oi.prototype),mi.prototype.constructor=mi,pi.prototype=Object.create(mi.prototype),pi.prototype.constructor=pi,hi.prototype=Object.create(mi.prototype),hi.prototype.constructor=hi,di.prototype=Object.create(oi.prototype),di.prototype.constructor=di,ui.prototype=Object.create(Ba.prototype),ui.prototype.constructor=ui,$i.prototype=Object.create(ri.prototype),$i.prototype.constructor=$i,Li.prototype=Object.create(pi.prototype),Li.prototype.constructor=Li,ji.prototype=Object.create(ui.prototype),ji.prototype.constructor=ji,Fi.prototype=Object.create(mi.prototype),Fi.prototype.constructor=Fi,Zi.prototype=Object.create(ci.prototype),Zi.prototype.constructor=Zi,Ji.prototype=Object.create(pi.prototype),Ji.prototype.constructor=Ji,Xi.prototype=Object.create(ji.prototype),Xi.prototype.constructor=Xi,oo.prototype=Object.create(Fi.prototype),oo.prototype.constructor=oo,po.prototype=Object.create(co.prototype),po.prototype.constructor=po,ho.prototype=Object.create(co.prototype),ho.prototype.constructor=ho,_o.prototype=Object.create(ho.prototype),_o.prototype.constructor=_o,mo.prototype=Object.create(ln.prototype),mo.prototype.constructor=mo,Io.prototype=Object.create(Po.prototype),Io.prototype.constructor=Io,Ao.prototype=Object.create(Po.prototype),Ao.prototype.constructor=Ao,Ro.prototype=Object.create(Po.prototype),Ro.prototype.constructor=Ro,wr.prototype=Object.create(en.prototype),wr.prototype.constructor=wr,jr.prototype=Object.create(k.prototype),jr.prototype.constructor=jr,ia.prototype=Object.create(Aa.prototype),ia.prototype.constructor=ia,oa.prototype=Object.create(Ca.prototype),oa.prototype.constructor=oa,Ea.prototype=Object.create(k.prototype),Ea.prototype.constructor=Ea,Ra.prototype=Object.create(Aa.prototype),Ra.prototype.constructor=Ra,La.prototype=Object.create(ja.prototype),La.prototype.constructor=La,Ya.prototype=Object.create(Ca.prototype),Ya.prototype.constructor=Ya,Fa.prototype=Object.create(Ya.prototype),Fa.prototype.constructor=Fa,qa.prototype=Object.create(Ca.prototype),qa.prototype.constructor=qa,nl.prototype=Object.create(Aa.prototype),nl.prototype.constructor=nl,ll.prototype=Object.create(sl.prototype),ll.prototype.constructor=ll,Wl.prototype=Object.create(Ia.prototype),Wl.prototype.constructor=Wl,Yl.prototype=Object.create(Aa.prototype),Yl.prototype.constructor=Yl,Nu.prototype=Object.create(k.prototype),Nu.prototype.constructor=Nu,Hu.prototype=Object.create(qu.prototype),Hu.prototype.constructor=Hu,nc.prototype=Object.create(qu.prototype),nc.prototype.constructor=nc,ac.prototype=Object.create(bc.prototype),ac.prototype.constructor=ac,cc.prototype=Object.create(Cc.prototype),cc.prototype.constructor=cc,dc.prototype=Object.create(Oc.prototype),dc.prototype.constructor=dc,yc.prototype=Object.create(Ws.prototype),yc.prototype.constructor=yc,gc.prototype=Object.create(Zs.prototype),gc.prototype.constructor=gc,vc.prototype=Object.create(Js.prototype),vc.prototype.constructor=vc,ip.prototype=Object.create(Ws.prototype),ip.prototype.constructor=ip,jp.prototype=Object.create(k.prototype),jp.prototype.constructor=jp,Jp.prototype=Object.create(Qe.prototype),Jp.prototype.constructor=Jp,uh.prototype=Object.create(_h.prototype),uh.prototype.constructor=uh,wh.prototype=Object.create(Eh.prototype),wh.prototype.constructor=wh,q.prototype.iterator=function(){return this.closure$iterator()},q.$metadata$={kind:o,interfaces:[il]},pt.prototype.iterator=function(){return this.closure$iterator()},pt.$metadata$={kind:o,interfaces:[il]},Ht.prototype.iterator=function(){return this.closure$iterator()},Ht.$metadata$={kind:o,interfaces:[se]},Wt.prototype.iterator=function(){var t=Jt(this.this$sortedWith);return Zn(t,this.closure$comparator),t.iterator()},Wt.$metadata$={kind:o,interfaces:[il]},oe.prototype.iterator=function(){return this.closure$iterator()},oe.$metadata$={kind:o,interfaces:[il]},ae.$metadata$={kind:w,simpleName:"CharSequence",interfaces:[]},se.$metadata$={kind:w,simpleName:"Iterable",interfaces:[]},le.$metadata$={kind:w,simpleName:"MutableIterable",interfaces:[se]},ue.$metadata$={kind:w,simpleName:"Collection",interfaces:[se]},ce.$metadata$={kind:w,simpleName:"MutableCollection",interfaces:[le,ue]},pe.$metadata$={kind:w,simpleName:"List",interfaces:[ue]},he.$metadata$={kind:w,simpleName:"MutableList",interfaces:[ce,pe]},_e.$metadata$={kind:w,simpleName:"Set",interfaces:[ue]},de.$metadata$={kind:w,simpleName:"MutableSet",interfaces:[ce,_e]},fe.prototype.getOrDefault_xwzc9p$=function(t,e){throw new Jp},me.$metadata$={kind:w,simpleName:"Entry",interfaces:[]},fe.$metadata$={kind:w,simpleName:"Map",interfaces:[]},$e.prototype.remove_xwzc9p$=function(t,e){return!0},ye.$metadata$={kind:w,simpleName:"MutableEntry",interfaces:[me]},$e.$metadata$={kind:w,simpleName:"MutableMap",interfaces:[fe]},ge.$metadata$={kind:w,simpleName:"Iterator",interfaces:[]},ve.$metadata$={kind:w,simpleName:"MutableIterator",interfaces:[ge]},be.$metadata$={kind:w,simpleName:"ListIterator",interfaces:[ge]},we.$metadata$={kind:w,simpleName:"MutableListIterator",interfaces:[ve,be]},xe.prototype.toString=function(){return"kotlin.Unit"},xe.$metadata$={kind:x,simpleName:"Unit",interfaces:[]};var ke=null;function Ce(){return null===ke&&new xe,ke}function Ee(t){this.closure$arr=t,this.index=0}function Se(t){this.closure$array=t,el.call(this),this.index=0}function Te(t){return new Se(t)}function Oe(t){this.closure$array=t,Ys.call(this),this.index=0}function Ne(t){return new Oe(t)}function Pe(t){this.closure$array=t,Xs.call(this),this.index=0}function Ie(t){return new Pe(t)}function Ae(t){this.closure$array=t,Ws.call(this),this.index=0}function Re(t){return new Ae(t)}function je(t){this.closure$array=t,Zs.call(this),this.index=0}function Le(t){return new je(t)}function ze(t){this.closure$array=t,Qs.call(this),this.index=0}function De(t){return new ze(t)}function Me(t){this.closure$array=t,tl.call(this),this.index=0}function Be(t){return new Me(t)}function Fe(t){this.closure$array=t,Js.call(this),this.index=0}function Ue(t){return new Fe(t)}function qe(t){this.callableName=t}function He(t){this.c=t}function Ge(t){this.resultContinuation_0=t,this.state_0=0,this.exceptionState_0=0,this.result_0=null,this.exception_0=null,this.finallyPath_0=null,this.context_hxcuhl$_0=this.resultContinuation_0.context,this.intercepted__0=null}function Ke(){Ve=this}Ee.prototype.hasNext=function(){return this.indexr)for(o.length=e;r=0))throw sn(("Invalid new array size: "+e+".").toString());return kn(t,new Int8Array(e))}function Nn(t,e){if(!(e>=0))throw sn(("Invalid new array size: "+e+".").toString());return Cn(t,e,null)}function Pn(t,e,n){return Ma().checkRangeIndexes_cub51b$(e,n,t.length),t.slice(e,n)}function In(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=t.length),Ma().checkRangeIndexes_cub51b$(n,i,t.length),t.fill(e,n,i)}function An(t){t.length>1&&xi(t)}function Rn(t,e){t.length>1&&bi(t,e)}function jn(t){var e=(t.size/2|0)-1|0;if(!(e<0))for(var n=hs(t),i=0;i<=e;i++){var o=t.get_za3lpa$(i);t.set_wxm5ur$(i,t.get_za3lpa$(n)),t.set_wxm5ur$(n,o),n=n-1|0}}function Ln(){Dn=this,this.rangeStart_8be2vx$=new Int32Array([48,1632,1776,1984,2406,2534,2662,2790,2918,3046,3174,3302,3430,3558,3664,3792,3872,4160,4240,6112,6160,6470,6608,6784,6800,6992,7088,7232,7248,42528,43216,43264,43472,43504,43600,44016,65296])}We.prototype=Object.create(Ge.prototype),We.prototype.constructor=We,We.prototype.doResume=function(){var t;if(null!=(t=this.exception_0))throw t;return this.closure$block()},We.$metadata$={kind:o,interfaces:[Ge]},Object.defineProperty(Qe.prototype,"message",{get:function(){return this.message_q7r8iu$_0}}),Object.defineProperty(Qe.prototype,"cause",{get:function(){return this.cause_us9j0c$_0}}),Qe.$metadata$={kind:o,simpleName:"Error",interfaces:[T]},Object.defineProperty(en.prototype,"message",{get:function(){return this.message_8yp7un$_0}}),Object.defineProperty(en.prototype,"cause",{get:function(){return this.cause_th0jdv$_0}}),en.$metadata$={kind:o,simpleName:"Exception",interfaces:[T]},on.$metadata$={kind:o,simpleName:"RuntimeException",interfaces:[en]},an.$metadata$={kind:o,simpleName:"IllegalArgumentException",interfaces:[on]},ln.$metadata$={kind:o,simpleName:"IllegalStateException",interfaces:[on]},cn.$metadata$={kind:o,simpleName:"IndexOutOfBoundsException",interfaces:[on]},pn.$metadata$={kind:o,simpleName:"UnsupportedOperationException",interfaces:[on]},dn.$metadata$={kind:o,simpleName:"NumberFormatException",interfaces:[an]},fn.$metadata$={kind:o,simpleName:"NullPointerException",interfaces:[on]},mn.$metadata$={kind:o,simpleName:"ClassCastException",interfaces:[on]},$n.$metadata$={kind:o,simpleName:"NoSuchElementException",interfaces:[on]},gn.$metadata$={kind:o,simpleName:"ArithmeticException",interfaces:[on]},vn.$metadata$={kind:o,simpleName:"NoWhenBranchMatchedException",interfaces:[on]},wn.$metadata$={kind:o,simpleName:"UninitializedPropertyAccessException",interfaces:[on]},Object.defineProperty(Tn.prototype,"size",{configurable:!0,get:function(){return this.this$asList.length}}),Tn.prototype.isEmpty=function(){return 0===this.this$asList.length},Tn.prototype.contains_11rb$=function(t){return G(this.this$asList,t)},Tn.prototype.get_za3lpa$=function(t){return Ma().checkElementIndex_6xvm5r$(t,this.size),l(this.this$asList[t])},Tn.prototype.indexOf_11rb$=function(e){var n;return t.isChar(null==(n=l(e))||t.isType(n,S)?n:yo())?V(this.this$asList,e):-1},Tn.prototype.lastIndexOf_11rb$=function(e){var n;return t.isChar(null==(n=l(e))||t.isType(n,S)?n:yo())?W(this.this$asList,e):-1},Tn.$metadata$={kind:o,interfaces:[uo,Aa]},Ln.$metadata$={kind:x,simpleName:"Digit",interfaces:[]};var zn,Dn=null;function Mn(){return null===Dn&&new Ln,Dn}function Bn(t,e){for(var n=0,i=t.length-1|0,o=-1,r=0;n<=i;)if(e>(r=t[o=(n+i|0)/2|0]))n=o+1|0;else{if(e===r)return o;i=o-1|0}return o-(e4096&&(5760===e||8192<=e&&e<=8202||8232===e||8233===e||8239===e||8287===e||12288===e)}function qn(t){this.function$=t}function Hn(t){return void 0!==t.toArray?t.toArray():Gn(t)}function Gn(t){for(var e=[],n=t.iterator();n.hasNext();)e.push(n.next());return e}function Kn(t,e){var n;if(e.length=0;l--)e[n+l|0]=t[i+l|0]}function ti(t){return t<0&&fs(),t}function ei(t){return t<0&&ms(),t}function ni(t){return t}function ii(){return!1}function oi(){Ca.call(this)}function ri(){oi.call(this),this.modCount=0}function ai(t){this.$outer=t,this.index_0=0,this.last_0=-1}function si(t,e){this.$outer=t,ai.call(this,this.$outer),Ma().checkPositionIndex_6xvm5r$(e,this.$outer.size),this.index_0=e}function li(t,e,n){ri.call(this),this.list_0=t,this.fromIndex_0=e,this._size_0=0,Ma().checkRangeIndexes_cub51b$(this.fromIndex_0,n,this.list_0.size),this._size_0=n-this.fromIndex_0|0}function ui(){Ba.call(this),this._keys_qe2m0n$_0=null,this._values_kxdlqh$_0=null}function ci(t,e){this.key_5xhq3d$_0=t,this._value_0=e}function pi(){mi.call(this)}function hi(t){this.this$AbstractMutableMap=t,mi.call(this)}function _i(t){this.closure$entryIterator=t}function di(t){this.this$AbstractMutableMap=t,oi.call(this)}function fi(t){this.closure$entryIterator=t}function mi(){oi.call(this)}function $i(t){ri.call(this),this.array_hd7ov6$_0=t,this.isReadOnly_dbt2oh$_0=!1}function yi(t){return t=t||Object.create($i.prototype),$i.call(t,[]),t}function gi(t,e){return e=e||Object.create($i.prototype),$i.call(e,[]),e}function vi(t,e){return e=e||Object.create($i.prototype),$i.call(e,Hn(t)),e}function bi(t,e){if(Ci()){var n=(i=e,function(t,e){return i.compare(t,e)});t.sort(n)}else Ei(t,0,nt(t),e);var i}function wi(e,n){return t.compareTo(e,n)}function xi(t){if(Ci()){var e=wi;t.sort(e)}else Ei(t,0,nt(t),Jl())}function ki(t,e){return(3&t)-(3&e)|0}function Ci(){if(null!=zn)return zn;zn=!1;for(var t=[],e=0;e<600;e++)t.push(e);var n=ki;t.sort(n);for(var i=1;i=r)return!1}return zn=!0,!0}function Ei(e,n,i,o){var r=Si(e,t.newArray(e.length,null),n,i,o);if(r!==e)for(var a=n;a<=i;a++)e[a]=r[a]}function Si(t,e,n,i,o){if(n===i)return t;for(var r=(n+i|0)/2|0,a=Si(t,e,n,r,o),s=Si(t,e,r+1|0,i,o),l=a===e?t:e,u=n,c=r+1|0,p=n;p<=i;p++)if(u<=r&&c<=i){var h=a[u],_=s[c];o.compare(h,_)<=0?(l[p]=h,u=u+1|0):(l[p]=_,c=c+1|0)}else u<=r?(l[p]=a[u],u=u+1|0):(l[p]=s[c],c=c+1|0);return l}function Ti(){}function Oi(){Ai=this}qn.prototype.compare=function(t,e){return this.function$(t,e)},qn.$metadata$={kind:w,simpleName:"Comparator",interfaces:[]},oi.prototype.remove_11rb$=function(t){this.checkIsMutable();for(var e=this.iterator();e.hasNext();)if(s(e.next(),t))return e.remove(),!0;return!1},oi.prototype.addAll_brywnq$=function(t){var e;this.checkIsMutable();var n=!1;for(e=t.iterator();e.hasNext();){var i=e.next();this.add_11rb$(i)&&(n=!0)}return n},oi.prototype.removeAll_brywnq$=function(e){var n;return this.checkIsMutable(),Hs(t.isType(this,le)?this:yo(),(n=e,function(t){return n.contains_11rb$(t)}))},oi.prototype.retainAll_brywnq$=function(e){var n;return this.checkIsMutable(),Hs(t.isType(this,le)?this:yo(),(n=e,function(t){return!n.contains_11rb$(t)}))},oi.prototype.clear=function(){this.checkIsMutable();for(var t=this.iterator();t.hasNext();)t.next(),t.remove()},oi.prototype.toJSON=function(){return this.toArray()},oi.prototype.checkIsMutable=function(){},oi.$metadata$={kind:o,simpleName:"AbstractMutableCollection",interfaces:[ce,Ca]},ri.prototype.add_11rb$=function(t){return this.checkIsMutable(),this.add_wxm5ur$(this.size,t),!0},ri.prototype.addAll_u57x28$=function(t,e){var n,i;Ma().checkPositionIndex_6xvm5r$(t,this.size),this.checkIsMutable();var o=t,r=!1;for(n=e.iterator();n.hasNext();){var a=n.next();this.add_wxm5ur$((o=(i=o)+1|0,i),a),r=!0}return r},ri.prototype.clear=function(){this.checkIsMutable(),this.removeRange_vux9f0$(0,this.size)},ri.prototype.removeAll_brywnq$=function(t){return this.checkIsMutable(),Ks(this,(e=t,function(t){return e.contains_11rb$(t)}));var e},ri.prototype.retainAll_brywnq$=function(t){return this.checkIsMutable(),Ks(this,(e=t,function(t){return!e.contains_11rb$(t)}));var e},ri.prototype.iterator=function(){return new ai(this)},ri.prototype.contains_11rb$=function(t){return this.indexOf_11rb$(t)>=0},ri.prototype.indexOf_11rb$=function(t){var e;e=hs(this);for(var n=0;n<=e;n++)if(s(this.get_za3lpa$(n),t))return n;return-1},ri.prototype.lastIndexOf_11rb$=function(t){for(var e=hs(this);e>=0;e--)if(s(this.get_za3lpa$(e),t))return e;return-1},ri.prototype.listIterator=function(){return this.listIterator_za3lpa$(0)},ri.prototype.listIterator_za3lpa$=function(t){return new si(this,t)},ri.prototype.subList_vux9f0$=function(t,e){return new li(this,t,e)},ri.prototype.removeRange_vux9f0$=function(t,e){for(var n=this.listIterator_za3lpa$(t),i=e-t|0,o=0;o0},si.prototype.nextIndex=function(){return this.index_0},si.prototype.previous=function(){if(!this.hasPrevious())throw yn();return this.last_0=(this.index_0=this.index_0-1|0,this.index_0),this.$outer.get_za3lpa$(this.last_0)},si.prototype.previousIndex=function(){return this.index_0-1|0},si.prototype.add_11rb$=function(t){this.$outer.add_wxm5ur$(this.index_0,t),this.index_0=this.index_0+1|0,this.last_0=-1},si.prototype.set_11rb$=function(t){if(-1===this.last_0)throw un("Call next() or previous() before updating element value with the iterator.".toString());this.$outer.set_wxm5ur$(this.last_0,t)},si.$metadata$={kind:o,simpleName:"ListIteratorImpl",interfaces:[we,ai]},li.prototype.add_wxm5ur$=function(t,e){Ma().checkPositionIndex_6xvm5r$(t,this._size_0),this.list_0.add_wxm5ur$(this.fromIndex_0+t|0,e),this._size_0=this._size_0+1|0},li.prototype.get_za3lpa$=function(t){return Ma().checkElementIndex_6xvm5r$(t,this._size_0),this.list_0.get_za3lpa$(this.fromIndex_0+t|0)},li.prototype.removeAt_za3lpa$=function(t){Ma().checkElementIndex_6xvm5r$(t,this._size_0);var e=this.list_0.removeAt_za3lpa$(this.fromIndex_0+t|0);return this._size_0=this._size_0-1|0,e},li.prototype.set_wxm5ur$=function(t,e){return Ma().checkElementIndex_6xvm5r$(t,this._size_0),this.list_0.set_wxm5ur$(this.fromIndex_0+t|0,e)},Object.defineProperty(li.prototype,"size",{configurable:!0,get:function(){return this._size_0}}),li.prototype.checkIsMutable=function(){this.list_0.checkIsMutable()},li.$metadata$={kind:o,simpleName:"SubList",interfaces:[uo,ri]},ri.$metadata$={kind:o,simpleName:"AbstractMutableList",interfaces:[he,oi]},Object.defineProperty(ci.prototype,"key",{get:function(){return this.key_5xhq3d$_0}}),Object.defineProperty(ci.prototype,"value",{configurable:!0,get:function(){return this._value_0}}),ci.prototype.setValue_11rc$=function(t){var e=this._value_0;return this._value_0=t,e},ci.prototype.hashCode=function(){return Va().entryHashCode_9fthdn$(this)},ci.prototype.toString=function(){return Va().entryToString_9fthdn$(this)},ci.prototype.equals=function(t){return Va().entryEquals_js7fox$(this,t)},ci.$metadata$={kind:o,simpleName:"SimpleEntry",interfaces:[ye]},pi.prototype.contains_11rb$=function(t){return this.containsEntry_kw6fkd$(t)},pi.prototype.remove_11rb$=function(t){return this.removeEntry_kw6fkd$(t)},pi.$metadata$={kind:o,simpleName:"AbstractEntrySet",interfaces:[mi]},ui.prototype.clear=function(){this.entries.clear()},hi.prototype.add_11rb$=function(t){throw _n("Add is not supported on keys")},hi.prototype.clear=function(){this.this$AbstractMutableMap.clear()},hi.prototype.contains_11rb$=function(t){return this.this$AbstractMutableMap.containsKey_11rb$(t)},_i.prototype.hasNext=function(){return this.closure$entryIterator.hasNext()},_i.prototype.next=function(){return this.closure$entryIterator.next().key},_i.prototype.remove=function(){this.closure$entryIterator.remove()},_i.$metadata$={kind:o,interfaces:[ve]},hi.prototype.iterator=function(){return new _i(this.this$AbstractMutableMap.entries.iterator())},hi.prototype.remove_11rb$=function(t){return this.checkIsMutable(),!!this.this$AbstractMutableMap.containsKey_11rb$(t)&&(this.this$AbstractMutableMap.remove_11rb$(t),!0)},Object.defineProperty(hi.prototype,"size",{configurable:!0,get:function(){return this.this$AbstractMutableMap.size}}),hi.prototype.checkIsMutable=function(){this.this$AbstractMutableMap.checkIsMutable()},hi.$metadata$={kind:o,interfaces:[mi]},Object.defineProperty(ui.prototype,"keys",{configurable:!0,get:function(){return null==this._keys_qe2m0n$_0&&(this._keys_qe2m0n$_0=new hi(this)),E(this._keys_qe2m0n$_0)}}),ui.prototype.putAll_a2k3zr$=function(t){var e;for(this.checkIsMutable(),e=t.entries.iterator();e.hasNext();){var n=e.next(),i=n.key,o=n.value;this.put_xwzc9p$(i,o)}},di.prototype.add_11rb$=function(t){throw _n("Add is not supported on values")},di.prototype.clear=function(){this.this$AbstractMutableMap.clear()},di.prototype.contains_11rb$=function(t){return this.this$AbstractMutableMap.containsValue_11rc$(t)},fi.prototype.hasNext=function(){return this.closure$entryIterator.hasNext()},fi.prototype.next=function(){return this.closure$entryIterator.next().value},fi.prototype.remove=function(){this.closure$entryIterator.remove()},fi.$metadata$={kind:o,interfaces:[ve]},di.prototype.iterator=function(){return new fi(this.this$AbstractMutableMap.entries.iterator())},Object.defineProperty(di.prototype,"size",{configurable:!0,get:function(){return this.this$AbstractMutableMap.size}}),di.prototype.checkIsMutable=function(){this.this$AbstractMutableMap.checkIsMutable()},di.$metadata$={kind:o,interfaces:[oi]},Object.defineProperty(ui.prototype,"values",{configurable:!0,get:function(){return null==this._values_kxdlqh$_0&&(this._values_kxdlqh$_0=new di(this)),E(this._values_kxdlqh$_0)}}),ui.prototype.remove_11rb$=function(t){this.checkIsMutable();for(var e=this.entries.iterator();e.hasNext();){var n=e.next(),i=n.key;if(s(t,i)){var o=n.value;return e.remove(),o}}return null},ui.prototype.checkIsMutable=function(){},ui.$metadata$={kind:o,simpleName:"AbstractMutableMap",interfaces:[$e,Ba]},mi.prototype.equals=function(e){return e===this||!!t.isType(e,_e)&&Za().setEquals_y8f7en$(this,e)},mi.prototype.hashCode=function(){return Za().unorderedHashCode_nykoif$(this)},mi.$metadata$={kind:o,simpleName:"AbstractMutableSet",interfaces:[de,oi]},$i.prototype.build=function(){return this.checkIsMutable(),this.isReadOnly_dbt2oh$_0=!0,this},$i.prototype.trimToSize=function(){},$i.prototype.ensureCapacity_za3lpa$=function(t){},Object.defineProperty($i.prototype,"size",{configurable:!0,get:function(){return this.array_hd7ov6$_0.length}}),$i.prototype.get_za3lpa$=function(e){var n;return null==(n=this.array_hd7ov6$_0[this.rangeCheck_xcmk5o$_0(e)])||t.isType(n,S)?n:yo()},$i.prototype.set_wxm5ur$=function(e,n){var i;this.checkIsMutable(),this.rangeCheck_xcmk5o$_0(e);var o=this.array_hd7ov6$_0[e];return this.array_hd7ov6$_0[e]=n,null==(i=o)||t.isType(i,S)?i:yo()},$i.prototype.add_11rb$=function(t){return this.checkIsMutable(),this.array_hd7ov6$_0.push(t),this.modCount=this.modCount+1|0,!0},$i.prototype.add_wxm5ur$=function(t,e){this.checkIsMutable(),this.array_hd7ov6$_0.splice(this.insertionRangeCheck_xwivfl$_0(t),0,e),this.modCount=this.modCount+1|0},$i.prototype.addAll_brywnq$=function(t){return this.checkIsMutable(),!t.isEmpty()&&(this.array_hd7ov6$_0=this.array_hd7ov6$_0.concat(Hn(t)),this.modCount=this.modCount+1|0,!0)},$i.prototype.addAll_u57x28$=function(t,e){return this.checkIsMutable(),this.insertionRangeCheck_xwivfl$_0(t),t===this.size?this.addAll_brywnq$(e):!e.isEmpty()&&(t===this.size?this.addAll_brywnq$(e):(this.array_hd7ov6$_0=0===t?Hn(e).concat(this.array_hd7ov6$_0):Pn(this.array_hd7ov6$_0,0,t).concat(Hn(e),Pn(this.array_hd7ov6$_0,t,this.size)),this.modCount=this.modCount+1|0,!0))},$i.prototype.removeAt_za3lpa$=function(t){return this.checkIsMutable(),this.rangeCheck_xcmk5o$_0(t),this.modCount=this.modCount+1|0,t===hs(this)?this.array_hd7ov6$_0.pop():this.array_hd7ov6$_0.splice(t,1)[0]},$i.prototype.remove_11rb$=function(t){var e;this.checkIsMutable(),e=this.array_hd7ov6$_0;for(var n=0;n!==e.length;++n)if(s(this.array_hd7ov6$_0[n],t))return this.array_hd7ov6$_0.splice(n,1),this.modCount=this.modCount+1|0,!0;return!1},$i.prototype.removeRange_vux9f0$=function(t,e){this.checkIsMutable(),this.modCount=this.modCount+1|0,this.array_hd7ov6$_0.splice(t,e-t|0)},$i.prototype.clear=function(){this.checkIsMutable(),this.array_hd7ov6$_0=[],this.modCount=this.modCount+1|0},$i.prototype.indexOf_11rb$=function(t){return K(this.array_hd7ov6$_0,t)},$i.prototype.lastIndexOf_11rb$=function(t){return Y(this.array_hd7ov6$_0,t)},$i.prototype.toString=function(){return O(this.array_hd7ov6$_0)},$i.prototype.toArray_ro6dgy$=function(e){var n,i;if(e.lengththis.size&&(e[this.size]=null==null||t.isType(null,S)?null:yo()),e},$i.prototype.toArray=function(){return[].slice.call(this.array_hd7ov6$_0)},$i.prototype.checkIsMutable=function(){if(this.isReadOnly_dbt2oh$_0)throw hn()},$i.prototype.rangeCheck_xcmk5o$_0=function(t){return Ma().checkElementIndex_6xvm5r$(t,this.size),t},$i.prototype.insertionRangeCheck_xwivfl$_0=function(t){return Ma().checkPositionIndex_6xvm5r$(t,this.size),t},$i.$metadata$={kind:o,simpleName:"ArrayList",interfaces:[uo,ri,he]},Oi.prototype.equals_oaftn8$=function(t,e){return s(t,e)},Oi.prototype.getHashCode_s8jyv4$=function(t){var e;return null!=(e=null!=t?P(t):null)?e:0},Oi.$metadata$={kind:x,simpleName:"HashCode",interfaces:[Ti]};var Ni,Pi,Ii,Ai=null;function Ri(){return null===Ai&&new Oi,Ai}function ji(){this.internalMap_uxhen5$_0=null,this.equality_vgh6cm$_0=null,this._entries_7ih87x$_0=null}function Li(t){this.$outer=t,pi.call(this)}function zi(t,e){return e=e||Object.create(ji.prototype),ui.call(e),ji.call(e),e.internalMap_uxhen5$_0=t,e.equality_vgh6cm$_0=t.equality,e}function Di(t){return t=t||Object.create(ji.prototype),zi(new Ki(Ri()),t),t}function Mi(t,e,n){if(Di(n=n||Object.create(ji.prototype)),!(t>=0))throw sn(("Negative initial capacity: "+t).toString());if(!(e>=0))throw sn(("Non-positive load factor: "+e).toString());return n}function Bi(t,e){return Mi(t,0,e=e||Object.create(ji.prototype)),e}function Fi(){this.map_8be2vx$=null}function Ui(t){return t=t||Object.create(Fi.prototype),mi.call(t),Fi.call(t),t.map_8be2vx$=Di(),t}function qi(t,e,n){return n=n||Object.create(Fi.prototype),mi.call(n),Fi.call(n),n.map_8be2vx$=Mi(t,e),n}function Hi(t,e){return qi(t,0,e=e||Object.create(Fi.prototype)),e}function Gi(t,e){return e=e||Object.create(Fi.prototype),mi.call(e),Fi.call(e),e.map_8be2vx$=t,e}function Ki(t){this.equality_mamlu8$_0=t,this.backingMap_0=this.createJsMap(),this.size_x3bm7r$_0=0}function Vi(t){this.this$InternalHashCodeMap=t,this.state=-1,this.keys=Object.keys(t.backingMap_0),this.keyIndex=-1,this.chainOrEntry=null,this.isChain=!1,this.itemIndex=-1,this.lastEntry=null}function Yi(){}function Wi(t){this.equality_qma612$_0=t,this.backingMap_0=this.createJsMap(),this.size_6u3ykz$_0=0}function Xi(){this.head_1lr44l$_0=null,this.map_97q5dv$_0=null,this.isReadOnly_uhyvn5$_0=!1}function Zi(t,e,n){this.$outer=t,ci.call(this,e,n),this.next_8be2vx$=null,this.prev_8be2vx$=null}function Ji(t){this.$outer=t,pi.call(this)}function Qi(t){this.$outer=t,this.last_0=null,this.next_0=null,this.next_0=this.$outer.$outer.head_1lr44l$_0}function to(t){return Di(t=t||Object.create(Xi.prototype)),Xi.call(t),t.map_97q5dv$_0=Di(),t}function eo(t,e,n){return Mi(t,e,n=n||Object.create(Xi.prototype)),Xi.call(n),n.map_97q5dv$_0=Di(),n}function no(t,e){return eo(t,0,e=e||Object.create(Xi.prototype)),e}function io(t,e){return Di(e=e||Object.create(Xi.prototype)),Xi.call(e),e.map_97q5dv$_0=Di(),e.putAll_a2k3zr$(t),e}function oo(){}function ro(t){return t=t||Object.create(oo.prototype),Gi(to(),t),oo.call(t),t}function ao(t,e){return e=e||Object.create(oo.prototype),Gi(to(),e),oo.call(e),e.addAll_brywnq$(t),e}function so(t,e,n){return n=n||Object.create(oo.prototype),Gi(eo(t,e),n),oo.call(n),n}function lo(t,e){return so(t,0,e=e||Object.create(oo.prototype)),e}function uo(){}function co(){}function po(t){co.call(this),this.outputStream=t}function ho(){co.call(this),this.buffer=""}function _o(){ho.call(this)}function fo(t,e){this.delegate_0=t,this.result_0=e}function mo(){this.name="CancellationException"}function $o(t,e){this.closure$context=t,this.closure$resumeWith=e}function yo(){throw new mn("Illegal cast")}function go(t){throw un(t)}function vo(){}function bo(e){if(wo(e)||e===c.NEGATIVE_INFINITY)return e;if(0===e)return-c.MIN_VALUE;var n=I(e).add(t.Long.fromInt(e>0?-1:1));return t.doubleFromBits(n)}function wo(t){return t!=t}function xo(t){return t!=t}function ko(t){return t===c.POSITIVE_INFINITY||t===c.NEGATIVE_INFINITY}function Co(t){return t===A.POSITIVE_INFINITY||t===A.NEGATIVE_INFINITY}function Eo(t){return!ko(t)&&!wo(t)}function So(){return Wu(Math.random()*Math.pow(2,32)|0)}function To(t,e){return t*Pi+e*Ii}function Oo(){}function No(){}function Po(t){this.jClass_1ppatx$_0=t}function Io(t){var e;Po.call(this,t),this.simpleName_m7mxi0$_0=null!=(e=t.$metadata$)?e.simpleName:null}function Ao(t,e,n){Po.call(this,t),this.givenSimpleName_0=e,this.isInstanceFunction_0=n}function Ro(){jo=this,Po.call(this,Object),this.simpleName_lnzy73$_0="Nothing"}Ti.$metadata$={kind:w,simpleName:"EqualityComparator",interfaces:[]},Li.prototype.add_11rb$=function(t){throw _n("Add is not supported on entries")},Li.prototype.clear=function(){this.$outer.clear()},Li.prototype.containsEntry_kw6fkd$=function(t){return this.$outer.containsEntry_8hxqw4$(t)},Li.prototype.iterator=function(){return this.$outer.internalMap_uxhen5$_0.iterator()},Li.prototype.removeEntry_kw6fkd$=function(t){return!!ht(this,t)&&(this.$outer.remove_11rb$(t.key),!0)},Object.defineProperty(Li.prototype,"size",{configurable:!0,get:function(){return this.$outer.size}}),Li.$metadata$={kind:o,simpleName:"EntrySet",interfaces:[pi]},ji.prototype.clear=function(){this.internalMap_uxhen5$_0.clear()},ji.prototype.containsKey_11rb$=function(t){return this.internalMap_uxhen5$_0.contains_11rb$(t)},ji.prototype.containsValue_11rc$=function(e){var n,i=this.internalMap_uxhen5$_0;t:do{var o;if(t.isType(i,ue)&&i.isEmpty()){n=!1;break t}for(o=i.iterator();o.hasNext();){var r=o.next();if(this.equality_vgh6cm$_0.equals_oaftn8$(r.value,e)){n=!0;break t}}n=!1}while(0);return n},Object.defineProperty(ji.prototype,"entries",{configurable:!0,get:function(){return null==this._entries_7ih87x$_0&&(this._entries_7ih87x$_0=this.createEntrySet()),E(this._entries_7ih87x$_0)}}),ji.prototype.createEntrySet=function(){return new Li(this)},ji.prototype.get_11rb$=function(t){return this.internalMap_uxhen5$_0.get_11rb$(t)},ji.prototype.put_xwzc9p$=function(t,e){return this.internalMap_uxhen5$_0.put_xwzc9p$(t,e)},ji.prototype.remove_11rb$=function(t){return this.internalMap_uxhen5$_0.remove_11rb$(t)},Object.defineProperty(ji.prototype,"size",{configurable:!0,get:function(){return this.internalMap_uxhen5$_0.size}}),ji.$metadata$={kind:o,simpleName:"HashMap",interfaces:[ui,$e]},Fi.prototype.add_11rb$=function(t){return null==this.map_8be2vx$.put_xwzc9p$(t,this)},Fi.prototype.clear=function(){this.map_8be2vx$.clear()},Fi.prototype.contains_11rb$=function(t){return this.map_8be2vx$.containsKey_11rb$(t)},Fi.prototype.isEmpty=function(){return this.map_8be2vx$.isEmpty()},Fi.prototype.iterator=function(){return this.map_8be2vx$.keys.iterator()},Fi.prototype.remove_11rb$=function(t){return null!=this.map_8be2vx$.remove_11rb$(t)},Object.defineProperty(Fi.prototype,"size",{configurable:!0,get:function(){return this.map_8be2vx$.size}}),Fi.$metadata$={kind:o,simpleName:"HashSet",interfaces:[mi,de]},Object.defineProperty(Ki.prototype,"equality",{get:function(){return this.equality_mamlu8$_0}}),Object.defineProperty(Ki.prototype,"size",{configurable:!0,get:function(){return this.size_x3bm7r$_0},set:function(t){this.size_x3bm7r$_0=t}}),Ki.prototype.put_xwzc9p$=function(e,n){var i=this.equality.getHashCode_s8jyv4$(e),o=this.getChainOrEntryOrNull_0(i);if(null==o)this.backingMap_0[i]=new ci(e,n);else{if(!t.isArray(o)){var r=o;return this.equality.equals_oaftn8$(r.key,e)?r.setValue_11rc$(n):(this.backingMap_0[i]=[r,new ci(e,n)],this.size=this.size+1|0,null)}var a=o,s=this.findEntryInChain_0(a,e);if(null!=s)return s.setValue_11rc$(n);a.push(new ci(e,n))}return this.size=this.size+1|0,null},Ki.prototype.remove_11rb$=function(e){var n,i=this.equality.getHashCode_s8jyv4$(e);if(null==(n=this.getChainOrEntryOrNull_0(i)))return null;var o=n;if(!t.isArray(o)){var r=o;return this.equality.equals_oaftn8$(r.key,e)?(delete this.backingMap_0[i],this.size=this.size-1|0,r.value):null}for(var a=o,s=0;s!==a.length;++s){var l=a[s];if(this.equality.equals_oaftn8$(e,l.key))return 1===a.length?(a.length=0,delete this.backingMap_0[i]):a.splice(s,1),this.size=this.size-1|0,l.value}return null},Ki.prototype.clear=function(){this.backingMap_0=this.createJsMap(),this.size=0},Ki.prototype.contains_11rb$=function(t){return null!=this.getEntry_0(t)},Ki.prototype.get_11rb$=function(t){var e;return null!=(e=this.getEntry_0(t))?e.value:null},Ki.prototype.getEntry_0=function(e){var n;if(null==(n=this.getChainOrEntryOrNull_0(this.equality.getHashCode_s8jyv4$(e))))return null;var i=n;if(t.isArray(i)){var o=i;return this.findEntryInChain_0(o,e)}var r=i;return this.equality.equals_oaftn8$(r.key,e)?r:null},Ki.prototype.findEntryInChain_0=function(t,e){var n;t:do{var i;for(i=0;i!==t.length;++i){var o=t[i];if(this.equality.equals_oaftn8$(o.key,e)){n=o;break t}}n=null}while(0);return n},Vi.prototype.computeNext_0=function(){if(null!=this.chainOrEntry&&this.isChain){var e=this.chainOrEntry.length;if(this.itemIndex=this.itemIndex+1|0,this.itemIndex=0&&(this.buffer=this.buffer+e.substring(0,n),this.flush(),e=e.substring(n+1|0)),this.buffer=this.buffer+e},_o.prototype.flush=function(){console.log(this.buffer),this.buffer=""},_o.$metadata$={kind:o,simpleName:"BufferedOutputToConsoleLog",interfaces:[ho]},Object.defineProperty(fo.prototype,"context",{configurable:!0,get:function(){return this.delegate_0.context}}),fo.prototype.resumeWith_tl1gpc$=function(t){var e=this.result_0;if(e===Au())this.result_0=t.value;else{if(e!==Ou())throw un("Already resumed");this.result_0=Ru(),this.delegate_0.resumeWith_tl1gpc$(t)}},fo.prototype.getOrThrow=function(){var e;if(this.result_0===Au())return this.result_0=Ou(),Ou();var n=this.result_0;if(n===Ru())e=Ou();else{if(t.isType(n,Wp))throw n.exception;e=n}return e},fo.$metadata$={kind:o,simpleName:"SafeContinuation",interfaces:[su]},mo.$metadata$={kind:o,simpleName:"CancellationException",interfaces:[ln]},Object.defineProperty($o.prototype,"context",{configurable:!0,get:function(){return this.closure$context}}),$o.prototype.resumeWith_tl1gpc$=function(t){this.closure$resumeWith(t)},$o.$metadata$={kind:o,interfaces:[su]},vo.$metadata$={kind:w,simpleName:"Serializable",interfaces:[]},Oo.$metadata$={kind:w,simpleName:"KCallable",interfaces:[]},No.$metadata$={kind:w,simpleName:"KClass",interfaces:[Uc]},Object.defineProperty(Po.prototype,"jClass",{get:function(){return this.jClass_1ppatx$_0}}),Object.defineProperty(Po.prototype,"qualifiedName",{configurable:!0,get:function(){throw new Jp}}),Po.prototype.equals=function(e){return t.isType(e,Po)&&s(this.jClass,e.jClass)},Po.prototype.hashCode=function(){var t,e;return null!=(e=null!=(t=this.simpleName)?P(t):null)?e:0},Po.prototype.toString=function(){return"class "+g(this.simpleName)},Po.$metadata$={kind:o,simpleName:"KClassImpl",interfaces:[No]},Object.defineProperty(Io.prototype,"simpleName",{configurable:!0,get:function(){return this.simpleName_m7mxi0$_0}}),Io.prototype.isInstance_s8jyv4$=function(e){var n=this.jClass;return t.isType(e,n)},Io.$metadata$={kind:o,simpleName:"SimpleKClassImpl",interfaces:[Po]},Ao.prototype.equals=function(e){return!!t.isType(e,Ao)&&Po.prototype.equals.call(this,e)&&s(this.givenSimpleName_0,e.givenSimpleName_0)},Object.defineProperty(Ao.prototype,"simpleName",{configurable:!0,get:function(){return this.givenSimpleName_0}}),Ao.prototype.isInstance_s8jyv4$=function(t){return this.isInstanceFunction_0(t)},Ao.$metadata$={kind:o,simpleName:"PrimitiveKClassImpl",interfaces:[Po]},Object.defineProperty(Ro.prototype,"simpleName",{configurable:!0,get:function(){return this.simpleName_lnzy73$_0}}),Ro.prototype.isInstance_s8jyv4$=function(t){return!1},Object.defineProperty(Ro.prototype,"jClass",{configurable:!0,get:function(){throw _n("There's no native JS class for Nothing type")}}),Ro.prototype.equals=function(t){return t===this},Ro.prototype.hashCode=function(){return 0},Ro.$metadata$={kind:x,simpleName:"NothingKClassImpl",interfaces:[Po]};var jo=null;function Lo(){return null===jo&&new Ro,jo}function zo(){}function Do(){}function Mo(){}function Bo(){}function Fo(){}function Uo(){}function qo(){}function Ho(){}function Go(t,e,n){this.classifier_50lv52$_0=t,this.arguments_lev63t$_0=e,this.isMarkedNullable_748rxs$_0=n}function Ko(){fr=this,this.anyClass=new Ao(Object,"Any",Vo),this.numberClass=new Ao(Number,"Number",Yo),this.nothingClass=Lo(),this.booleanClass=new Ao(Boolean,"Boolean",Wo),this.byteClass=new Ao(Number,"Byte",Xo),this.shortClass=new Ao(Number,"Short",Zo),this.intClass=new Ao(Number,"Int",Jo),this.floatClass=new Ao(Number,"Float",Qo),this.doubleClass=new Ao(Number,"Double",tr),this.arrayClass=new Ao(Array,"Array",er),this.stringClass=new Ao(String,"String",nr),this.throwableClass=new Ao(Error,"Throwable",ir),this.booleanArrayClass=new Ao(Array,"BooleanArray",or),this.charArrayClass=new Ao(Uint16Array,"CharArray",rr),this.byteArrayClass=new Ao(Int8Array,"ByteArray",ar),this.shortArrayClass=new Ao(Int16Array,"ShortArray",sr),this.intArrayClass=new Ao(Int32Array,"IntArray",lr),this.longArrayClass=new Ao(Array,"LongArray",ur),this.floatArrayClass=new Ao(Float32Array,"FloatArray",cr),this.doubleArrayClass=new Ao(Float64Array,"DoubleArray",pr)}function Vo(e){return t.isType(e,S)}function Yo(e){return t.isNumber(e)}function Wo(t){return"boolean"==typeof t}function Xo(t){return"number"==typeof t}function Zo(t){return"number"==typeof t}function Jo(t){return"number"==typeof t}function Qo(t){return"number"==typeof t}function tr(t){return"number"==typeof t}function er(e){return t.isArray(e)}function nr(t){return"string"==typeof t}function ir(e){return t.isType(e,T)}function or(e){return t.isBooleanArray(e)}function rr(e){return t.isCharArray(e)}function ar(e){return t.isByteArray(e)}function sr(e){return t.isShortArray(e)}function lr(e){return t.isIntArray(e)}function ur(e){return t.isLongArray(e)}function cr(e){return t.isFloatArray(e)}function pr(e){return t.isDoubleArray(e)}Object.defineProperty(zo.prototype,"simpleName",{configurable:!0,get:function(){throw un("Unknown simpleName for ErrorKClass".toString())}}),Object.defineProperty(zo.prototype,"qualifiedName",{configurable:!0,get:function(){throw un("Unknown qualifiedName for ErrorKClass".toString())}}),zo.prototype.isInstance_s8jyv4$=function(t){throw un("Can's check isInstance on ErrorKClass".toString())},zo.prototype.equals=function(t){return t===this},zo.prototype.hashCode=function(){return 0},zo.$metadata$={kind:o,simpleName:"ErrorKClass",interfaces:[No]},Do.$metadata$={kind:w,simpleName:"KProperty",interfaces:[Oo]},Mo.$metadata$={kind:w,simpleName:"KMutableProperty",interfaces:[Do]},Bo.$metadata$={kind:w,simpleName:"KProperty0",interfaces:[Do]},Fo.$metadata$={kind:w,simpleName:"KMutableProperty0",interfaces:[Mo,Bo]},Uo.$metadata$={kind:w,simpleName:"KProperty1",interfaces:[Do]},qo.$metadata$={kind:w,simpleName:"KMutableProperty1",interfaces:[Mo,Uo]},Ho.$metadata$={kind:w,simpleName:"KType",interfaces:[]},Object.defineProperty(Go.prototype,"classifier",{get:function(){return this.classifier_50lv52$_0}}),Object.defineProperty(Go.prototype,"arguments",{get:function(){return this.arguments_lev63t$_0}}),Object.defineProperty(Go.prototype,"isMarkedNullable",{get:function(){return this.isMarkedNullable_748rxs$_0}}),Go.prototype.equals=function(e){return t.isType(e,Go)&&s(this.classifier,e.classifier)&&s(this.arguments,e.arguments)&&this.isMarkedNullable===e.isMarkedNullable},Go.prototype.hashCode=function(){return(31*((31*P(this.classifier)|0)+P(this.arguments)|0)|0)+P(this.isMarkedNullable)|0},Go.prototype.toString=function(){var e,n=t.isType(e=this.classifier,No)?e:null;return(null==n?this.classifier.toString():null!=n.simpleName?n.simpleName:"(non-denotable type)")+(this.arguments.isEmpty()?"":jt(this.arguments,", ","<",">"))+(this.isMarkedNullable?"?":"")},Go.$metadata$={kind:o,simpleName:"KTypeImpl",interfaces:[Ho]},Ko.prototype.functionClass=function(t){var e,n,i;if(null!=(e=hr[t]))n=e;else{var o=new Ao(Function,"Function"+t,(i=t,function(t){return"function"==typeof t&&t.length===i}));hr[t]=o,n=o}return n},Ko.$metadata$={kind:x,simpleName:"PrimitiveClasses",interfaces:[]};var hr,_r,dr,fr=null;function mr(){return null===fr&&new Ko,fr}function $r(t){return Array.isArray(t)?yr(t):gr(t)}function yr(t){switch(t.length){case 1:return gr(t[0]);case 0:return Lo();default:return new zo}}function gr(t){var e;if(t===String)return mr().stringClass;var n=t.$metadata$;if(null!=n)if(null==n.$kClass$){var i=new Io(t);n.$kClass$=i,e=i}else e=n.$kClass$;else e=new Io(t);return e}function vr(t){t.lastIndex=0}function br(){}function wr(t){nn(t,this),this.name="CharacterCodingException"}function xr(t){this.string_0=void 0!==t?t:""}function kr(t,e){return Er(e=e||Object.create(xr.prototype)),e}function Cr(t,e){return e=e||Object.create(xr.prototype),xr.call(e,t.toString()),e}function Er(t){return t=t||Object.create(xr.prototype),xr.call(t,""),t}function Sr(t){var e=String.fromCharCode(t).toUpperCase();return e.length>1?t:e.charCodeAt(0)}function Tr(t){return new ac(j.MIN_HIGH_SURROGATE,j.MAX_HIGH_SURROGATE).contains_mef7kx$(t)}function Or(t){return new ac(j.MIN_LOW_SURROGATE,j.MAX_LOW_SURROGATE).contains_mef7kx$(t)}function Nr(t){return Un(t)}function Pr(t){var e;return null!=(e=Vc(t))?e:Zc(t)}function Ir(t){switch(t.toLowerCase()){case"nan":case"+nan":case"-nan":return!0;default:return!1}}function Ar(t){if(!(2<=t&&t<=36))throw sn("radix "+t+" was not in valid range 2..36");return t}function Rr(t,e){var n;return(n=t>=48&&t<=57?t-48:t>=65&&t<=90?t-65+10|0:t>=97&&t<=122?t-97+10|0:t<128?-1:t>=65313&&t<=65338?t-65313+10|0:t>=65345&&t<=65370?t-65345+10|0:Fn(t))>=e?-1:n}function jr(t,e,n){k.call(this),this.value=n,this.name$=t,this.ordinal$=e}function Lr(){Lr=function(){},_r=new jr("IGNORE_CASE",0,"i"),dr=new jr("MULTILINE",1,"m")}function zr(){return Lr(),_r}function Dr(){return Lr(),dr}function Mr(t){return t.value}function Br(t,e){return jt(t,"",e,void 0,void 0,void 0,Mr)}function Fr(t){this.value=t}function Ur(e,n){var i,o;if(null==(o=t.isType(i=e,Pp)?i:null))throw _n("Retrieving groups by name is not supported on this platform.");return o.get_61zpoe$(n)}function qr(t,e){ta(),this.pattern=t,this.options=Pt(e),this.nativePattern_0=new RegExp(t,Br(e,"gu")),this.nativeStickyPattern_0=null,this.nativeMatchesEntirePattern_0=null}function Hr(t){return t.next()}function Gr(t,e,n,i,o,r){Ge.call(this,r),this.$controller=o,this.exceptionState_0=1,this.local$closure$input=t,this.local$this$Regex=e,this.local$closure$limit=n,this.local$match=void 0,this.local$nextStart=void 0,this.local$splitCount=void 0,this.local$foundMatch=void 0,this.local$$receiver=i}function Kr(){Qr=this,this.patternEscape_0=new RegExp("[\\\\^$*+?.()|[\\]{}]","g"),this.replacementEscape_0=new RegExp("[\\\\$]","g"),this.nativeReplacementEscape_0=new RegExp("\\$","g")}br.$metadata$={kind:w,simpleName:"Appendable",interfaces:[]},wr.$metadata$={kind:o,simpleName:"CharacterCodingException",interfaces:[en]},Object.defineProperty(xr.prototype,"length",{configurable:!0,get:function(){return this.string_0.length}}),xr.prototype.charCodeAt=function(t){var e=this.string_0;if(!(t>=0&&t<=ap(e)))throw new cn("index: "+t+", length: "+this.length+"}");return e.charCodeAt(t)},xr.prototype.subSequence_vux9f0$=function(t,e){return this.string_0.substring(t,e)},xr.prototype.append_s8itvh$=function(t){return this.string_0+=String.fromCharCode(t),this},xr.prototype.append_gw00v9$=function(t){return this.string_0+=g(t),this},xr.prototype.append_ezbsdh$=function(t,e,n){return this.appendRange_3peag4$(null!=t?t:"null",e,n)},xr.prototype.reverse=function(){for(var t,e,n="",i=this.string_0.length-1|0;i>=0;){var o=this.string_0.charCodeAt((i=(t=i)-1|0,t));if(Or(o)&&i>=0){var r=this.string_0.charCodeAt((i=(e=i)-1|0,e));n=Tr(r)?n+String.fromCharCode(l(r))+String.fromCharCode(l(o)):n+String.fromCharCode(l(o))+String.fromCharCode(l(r))}else n+=String.fromCharCode(o)}return this.string_0=n,this},xr.prototype.append_s8jyv4$=function(t){return this.string_0+=g(t),this},xr.prototype.append_6taknv$=function(t){return this.string_0+=t,this},xr.prototype.append_4hbowm$=function(t){return this.string_0+=ua(t),this},xr.prototype.append_61zpoe$=function(t){return this.append_pdl1vj$(t)},xr.prototype.append_pdl1vj$=function(t){return this.string_0=this.string_0+(null!=t?t:"null"),this},xr.prototype.capacity=function(){return this.length},xr.prototype.ensureCapacity_za3lpa$=function(t){},xr.prototype.indexOf_61zpoe$=function(t){return this.string_0.indexOf(t)},xr.prototype.indexOf_bm4lxs$=function(t,e){return this.string_0.indexOf(t,e)},xr.prototype.lastIndexOf_61zpoe$=function(t){return this.string_0.lastIndexOf(t)},xr.prototype.lastIndexOf_bm4lxs$=function(t,e){return 0===t.length&&e<0?-1:this.string_0.lastIndexOf(t,e)},xr.prototype.insert_fzusl$=function(t,e){return Ma().checkPositionIndex_6xvm5r$(t,this.length),this.string_0=this.string_0.substring(0,t)+g(e)+this.string_0.substring(t),this},xr.prototype.insert_6t1mh3$=function(t,e){return Ma().checkPositionIndex_6xvm5r$(t,this.length),this.string_0=this.string_0.substring(0,t)+String.fromCharCode(l(e))+this.string_0.substring(t),this},xr.prototype.insert_7u455s$=function(t,e){return Ma().checkPositionIndex_6xvm5r$(t,this.length),this.string_0=this.string_0.substring(0,t)+ua(e)+this.string_0.substring(t),this},xr.prototype.insert_1u9bqd$=function(t,e){return Ma().checkPositionIndex_6xvm5r$(t,this.length),this.string_0=this.string_0.substring(0,t)+g(e)+this.string_0.substring(t),this},xr.prototype.insert_6t2rgq$=function(t,e){return Ma().checkPositionIndex_6xvm5r$(t,this.length),this.string_0=this.string_0.substring(0,t)+g(e)+this.string_0.substring(t),this},xr.prototype.insert_19mbxw$=function(t,e){return this.insert_vqvrqt$(t,e)},xr.prototype.insert_vqvrqt$=function(t,e){Ma().checkPositionIndex_6xvm5r$(t,this.length);var n=null!=e?e:"null";return this.string_0=this.string_0.substring(0,t)+n+this.string_0.substring(t),this},xr.prototype.setLength_za3lpa$=function(t){if(t<0)throw sn("Negative new length: "+t+".");if(t<=this.length)this.string_0=this.string_0.substring(0,t);else for(var e=this.length;en)throw new cn("startIndex: "+t+", length: "+n);if(t>e)throw sn("startIndex("+t+") > endIndex("+e+")")},xr.prototype.deleteAt_za3lpa$=function(t){return Ma().checkElementIndex_6xvm5r$(t,this.length),this.string_0=this.string_0.substring(0,t)+this.string_0.substring(t+1|0),this},xr.prototype.deleteRange_vux9f0$=function(t,e){return this.checkReplaceRange_0(t,e,this.length),this.string_0=this.string_0.substring(0,t)+this.string_0.substring(e),this},xr.prototype.toCharArray_pqkatk$=function(t,e,n,i){var o;void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=this.length),Ma().checkBoundsIndexes_cub51b$(n,i,this.length),Ma().checkBoundsIndexes_cub51b$(e,e+i-n|0,t.length);for(var r=e,a=n;at.length)throw new cn("index out of bounds: "+e+", input length: "+t.length);var n=this.initStickyPattern_0();return n.lastIndex=e,n.test(t.toString())},qr.prototype.find_905azu$=function(t,e){if(void 0===e&&(e=0),e<0||e>t.length)throw new cn("Start index out of bounds: "+e+", input length: "+t.length);return ra(this.nativePattern_0,t.toString(),e,this.nativePattern_0)},qr.prototype.findAll_905azu$=function(t,e){if(void 0===e&&(e=0),e<0||e>t.length)throw new cn("Start index out of bounds: "+e+", input length: "+t.length);return Ll((n=t,i=e,o=this,function(){return o.find_905azu$(n,i)}),Hr);var n,i,o},qr.prototype.matchEntire_6bul2c$=function(t){return ra(this.initMatchesEntirePattern_0(),t.toString(),0,this.nativePattern_0)},qr.prototype.matchAt_905azu$=function(t,e){if(e<0||e>t.length)throw new cn("index out of bounds: "+e+", input length: "+t.length);return ra(this.initStickyPattern_0(),t.toString(),e,this.nativePattern_0)},qr.prototype.replace_x2uqeu$=function(t,e){return gp(e,92)||gp(e,36)?this.replace_20wsma$(t,(n=e,function(t){return aa(t,n)})):t.toString().replace(this.nativePattern_0,e);var n},qr.prototype.replace_20wsma$=function(t,e){var n=this.find_905azu$(t);if(null==n)return t.toString();var i=0,o=t.length,r=kr();do{var a=E(n);r.append_ezbsdh$(t,i,a.range.start),r.append_gw00v9$(e(a)),i=a.range.endInclusive+1|0,n=a.next()}while(i=_.size)throw new cn("Group with index "+f+" does not exist");u.append_pdl1vj$(null!=(s=null!=(a=_.get_za3lpa$(f))?a.value:null)?s:""),l=d}}else u.append_s8itvh$(c)}return u.toString()}function sa(t,e){for(var n=e;n=i)return $a(0,n,o);var r=0|t.charCodeAt(n);return 56320<=r&&r<=57343?65536+((1023&e)<<10)|1023&r:$a(0,n,o)}function ga(t,e,n,i,o){if(0==(30&e)||n>=i)return $a(0,n,o);var r=t[n];return 128!=(192&r)?$a(0,n,o):e<<6^r^3968}function va(t,e,n,i,o){if(n>=i)return $a(0,n,o);var r=t[n];if(0==(15&e)){if(160!=(224&r))return $a(0,n,o)}else if(13==(15&e)){if(128!=(224&r))return $a(0,n,o)}else if(128!=(192&r))return $a(0,n,o);if((n+1|0)===i)return $a(1,n,o);var a=t[n+1|0];return 128!=(192&a)?$a(1,n,o):e<<12^r<<6^a^-123008}function ba(t,e,n,i,o){n>=i&&$a(0,n,o);var r=t[n];if(0==(15&e)){if((240&r)<=128)return $a(0,n,o)}else if(4==(15&e)){if(128!=(240&r))return $a(0,n,o)}else{if((15&e)>4)return $a(0,n,o);if(128!=(192&r))return $a(0,n,o)}if((n+1|0)===i)return $a(1,n,o);var a=t[n+1|0];if(128!=(192&a))return $a(1,n,o);if((n+2|0)===i)return $a(2,n,o);var s=t[n+2|0];return 128!=(192&s)?$a(2,n,o):e<<18^r<<12^a<<6^s^3678080}function wa(t,e,n,i){var o,r,a,s,l,u,c,p,h,_,d,m,$,y;if(!(e>=0&&n<=t.length&&e<=n))throw sn("Failed requirement.".toString());for(var g=new Int8Array(3*(n-e|0)|0),v=0,b=e;b>6|192),g[(s=v,v=s+1|0,s)]=f(63&w|128);else if(w<55296||w>=57344)g[(l=v,v=l+1|0,l)]=f(w>>12|224),g[(u=v,v=u+1|0,u)]=f(w>>6&63|128),g[(c=v,v=c+1|0,c)]=f(63&w|128);else{var x=ya(t,w,b,n,i);x<=0?(g[(p=v,v=p+1|0,p)]=Vr[0],g[(h=v,v=h+1|0,h)]=Vr[1],g[(_=v,v=_+1|0,_)]=Vr[2]):(g[(d=v,v=d+1|0,d)]=f(x>>18|240),g[(m=v,v=m+1|0,m)]=f(x>>12&63|128),g[($=v,v=$+1|0,$)]=f(x>>6&63|128),g[(y=v,v=y+1|0,y)]=f(63&x|128),b=b+1|0)}}return g.length===v?g:On(g,v)}function xa(t,e,n,i){var o;if(!(e>=0&&n<=t.length&&e<=n))throw sn("Failed requirement.".toString());for(var r=e,a=Er();r=0)a.append_s8itvh$(_(s));else if(s>>5==-2){var l=ga(t,s,r,n,i);l<=0?(a.append_s8itvh$(Yr),r=r+(0|-l)|0):(a.append_s8itvh$(_(l)),r=r+1|0)}else if(s>>4==-2){var u=va(t,s,r,n,i);u<=0?(a.append_s8itvh$(Yr),r=r+(0|-u)|0):(a.append_s8itvh$(_(u)),r=r+2|0)}else if(s>>3==-2){var c=ba(t,s,r,n,i);if(c<=0)a.append_s8itvh$(Yr),r=r+(0|-c)|0;else{var p=c-65536>>10|55296,h=1023&c|56320;a.append_s8itvh$(_(p)),a.append_s8itvh$(_(h)),r=r+3|0}}else $a(0,r,i),a.append_s8itvh$(Yr)}return a.toString()}function ka(t,e){var n=t.className;return ea("(^|.*\\s+)"+e+"($|\\s+.*)").matches_6bul2c$(n)}function Ca(){}function Ea(t,e){k.call(this),this.name$=t,this.ordinal$=e}function Sa(){Sa=function(){},Wr=new Ea("Ready",0),Xr=new Ea("NotReady",1),Zr=new Ea("Done",2),Jr=new Ea("Failed",3)}function Ta(){return Sa(),Wr}function Oa(){return Sa(),Xr}function Na(){return Sa(),Zr}function Pa(){return Sa(),Jr}function Ia(){this.state_smy23j$_0=Oa(),this.nextValue_phdh64$_0=null}function Aa(){Ma(),Ca.call(this)}function Ra(t,e,n){Aa.call(this),this.list_0=t,this.fromIndex_0=e,this._size_0=0,Ma().checkRangeIndexes_cub51b$(this.fromIndex_0,n,this.list_0.size),this._size_0=n-this.fromIndex_0|0}function ja(t){this.$outer=t,this.index_0=0}function La(t,e){this.$outer=t,ja.call(this,this.$outer),Ma().checkPositionIndex_6xvm5r$(e,this.$outer.size),this.index_0=e}function za(){Da=this}qr.$metadata$={kind:o,simpleName:"Regex",interfaces:[]},Object.defineProperty(na.prototype,"range",{configurable:!0,get:function(){return this.range_co6b9w$_0}}),Object.defineProperty(na.prototype,"value",{configurable:!0,get:function(){return E(this.closure$match[0])}}),Object.defineProperty(na.prototype,"groups",{configurable:!0,get:function(){return this.groups_qcaztb$_0}}),na.prototype.hasOwnPrototypeProperty_0=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},Object.defineProperty(ia.prototype,"size",{configurable:!0,get:function(){return this.closure$match.length}}),ia.prototype.get_za3lpa$=function(t){var e;return null!=(e=this.closure$match[t])?e:""},ia.$metadata$={kind:o,interfaces:[Aa]},Object.defineProperty(na.prototype,"groupValues",{configurable:!0,get:function(){return null==this.groupValues__0&&(this.groupValues__0=new ia(this.closure$match)),E(this.groupValues__0)}}),na.prototype.next=function(){return ra(this.closure$nextPattern,this.closure$input,this.closure$range.isEmpty()?this.advanceToNextCharacter_0(this.closure$range.start):this.closure$range.endInclusive+1|0,this.closure$nextPattern)},na.prototype.advanceToNextCharacter_0=function(t){if(t0},La.prototype.nextIndex=function(){return this.index_0},La.prototype.previous=function(){if(!this.hasPrevious())throw yn();return this.$outer.get_za3lpa$((this.index_0=this.index_0-1|0,this.index_0))},La.prototype.previousIndex=function(){return this.index_0-1|0},La.$metadata$={kind:o,simpleName:"ListIteratorImpl",interfaces:[be,ja]},za.prototype.checkElementIndex_6xvm5r$=function(t,e){if(t<0||t>=e)throw new cn("index: "+t+", size: "+e)},za.prototype.checkPositionIndex_6xvm5r$=function(t,e){if(t<0||t>e)throw new cn("index: "+t+", size: "+e)},za.prototype.checkRangeIndexes_cub51b$=function(t,e,n){if(t<0||e>n)throw new cn("fromIndex: "+t+", toIndex: "+e+", size: "+n);if(t>e)throw sn("fromIndex: "+t+" > toIndex: "+e)},za.prototype.checkBoundsIndexes_cub51b$=function(t,e,n){if(t<0||e>n)throw new cn("startIndex: "+t+", endIndex: "+e+", size: "+n);if(t>e)throw sn("startIndex: "+t+" > endIndex: "+e)},za.prototype.orderedHashCode_nykoif$=function(t){var e,n,i=1;for(e=t.iterator();e.hasNext();){var o=e.next();i=(31*i|0)+(null!=(n=null!=o?P(o):null)?n:0)|0}return i},za.prototype.orderedEquals_e92ka7$=function(t,e){var n;if(t.size!==e.size)return!1;var i=e.iterator();for(n=t.iterator();n.hasNext();){var o=n.next(),r=i.next();if(!s(o,r))return!1}return!0},za.$metadata$={kind:x,simpleName:"Companion",interfaces:[]};var Da=null;function Ma(){return null===Da&&new za,Da}function Ba(){Va(),this._keys_up5z3z$_0=null,this._values_6nw1f1$_0=null}function Fa(t){this.this$AbstractMap=t,Ya.call(this)}function Ua(t){this.closure$entryIterator=t}function qa(t){this.this$AbstractMap=t,Ca.call(this)}function Ha(t){this.closure$entryIterator=t}function Ga(){Ka=this}Aa.$metadata$={kind:o,simpleName:"AbstractList",interfaces:[pe,Ca]},Ba.prototype.containsKey_11rb$=function(t){return null!=this.implFindEntry_8k1i24$_0(t)},Ba.prototype.containsValue_11rc$=function(e){var n,i=this.entries;t:do{var o;if(t.isType(i,ue)&&i.isEmpty()){n=!1;break t}for(o=i.iterator();o.hasNext();){var r=o.next();if(s(r.value,e)){n=!0;break t}}n=!1}while(0);return n},Ba.prototype.containsEntry_8hxqw4$=function(e){if(!t.isType(e,me))return!1;var n=e.key,i=e.value,o=(t.isType(this,fe)?this:v()).get_11rb$(n);if(!s(i,o))return!1;var r=null==o;return r&&(r=!(t.isType(this,fe)?this:v()).containsKey_11rb$(n)),!r},Ba.prototype.equals=function(e){if(e===this)return!0;if(!t.isType(e,fe))return!1;if(this.size!==e.size)return!1;var n,i=e.entries;t:do{var o;if(t.isType(i,ue)&&i.isEmpty()){n=!0;break t}for(o=i.iterator();o.hasNext();){var r=o.next();if(!this.containsEntry_8hxqw4$(r)){n=!1;break t}}n=!0}while(0);return n},Ba.prototype.get_11rb$=function(t){var e;return null!=(e=this.implFindEntry_8k1i24$_0(t))?e.value:null},Ba.prototype.hashCode=function(){return P(this.entries)},Ba.prototype.isEmpty=function(){return 0===this.size},Object.defineProperty(Ba.prototype,"size",{configurable:!0,get:function(){return this.entries.size}}),Fa.prototype.contains_11rb$=function(t){return this.this$AbstractMap.containsKey_11rb$(t)},Ua.prototype.hasNext=function(){return this.closure$entryIterator.hasNext()},Ua.prototype.next=function(){return this.closure$entryIterator.next().key},Ua.$metadata$={kind:o,interfaces:[ge]},Fa.prototype.iterator=function(){return new Ua(this.this$AbstractMap.entries.iterator())},Object.defineProperty(Fa.prototype,"size",{configurable:!0,get:function(){return this.this$AbstractMap.size}}),Fa.$metadata$={kind:o,interfaces:[Ya]},Object.defineProperty(Ba.prototype,"keys",{configurable:!0,get:function(){return null==this._keys_up5z3z$_0&&(this._keys_up5z3z$_0=new Fa(this)),E(this._keys_up5z3z$_0)}}),Ba.prototype.toString=function(){return jt(this.entries,", ","{","}",void 0,void 0,(t=this,function(e){return t.toString_55he67$_0(e)}));var t},Ba.prototype.toString_55he67$_0=function(t){return this.toString_kthv8s$_0(t.key)+"="+this.toString_kthv8s$_0(t.value)},Ba.prototype.toString_kthv8s$_0=function(t){return t===this?"(this Map)":g(t)},qa.prototype.contains_11rb$=function(t){return this.this$AbstractMap.containsValue_11rc$(t)},Ha.prototype.hasNext=function(){return this.closure$entryIterator.hasNext()},Ha.prototype.next=function(){return this.closure$entryIterator.next().value},Ha.$metadata$={kind:o,interfaces:[ge]},qa.prototype.iterator=function(){return new Ha(this.this$AbstractMap.entries.iterator())},Object.defineProperty(qa.prototype,"size",{configurable:!0,get:function(){return this.this$AbstractMap.size}}),qa.$metadata$={kind:o,interfaces:[Ca]},Object.defineProperty(Ba.prototype,"values",{configurable:!0,get:function(){return null==this._values_6nw1f1$_0&&(this._values_6nw1f1$_0=new qa(this)),E(this._values_6nw1f1$_0)}}),Ba.prototype.implFindEntry_8k1i24$_0=function(t){var e,n=this.entries;t:do{var i;for(i=n.iterator();i.hasNext();){var o=i.next();if(s(o.key,t)){e=o;break t}}e=null}while(0);return e},Ga.prototype.entryHashCode_9fthdn$=function(t){var e,n,i,o;return(null!=(n=null!=(e=t.key)?P(e):null)?n:0)^(null!=(o=null!=(i=t.value)?P(i):null)?o:0)},Ga.prototype.entryToString_9fthdn$=function(t){return g(t.key)+"="+g(t.value)},Ga.prototype.entryEquals_js7fox$=function(e,n){return!!t.isType(n,me)&&s(e.key,n.key)&&s(e.value,n.value)},Ga.$metadata$={kind:x,simpleName:"Companion",interfaces:[]};var Ka=null;function Va(){return null===Ka&&new Ga,Ka}function Ya(){Za(),Ca.call(this)}function Wa(){Xa=this}Ba.$metadata$={kind:o,simpleName:"AbstractMap",interfaces:[fe]},Ya.prototype.equals=function(e){return e===this||!!t.isType(e,_e)&&Za().setEquals_y8f7en$(this,e)},Ya.prototype.hashCode=function(){return Za().unorderedHashCode_nykoif$(this)},Wa.prototype.unorderedHashCode_nykoif$=function(t){var e,n=0;for(e=t.iterator();e.hasNext();){var i,o=e.next();n=n+(null!=(i=null!=o?P(o):null)?i:0)|0}return n},Wa.prototype.setEquals_y8f7en$=function(t,e){return t.size===e.size&&t.containsAll_brywnq$(e)},Wa.$metadata$={kind:x,simpleName:"Companion",interfaces:[]};var Xa=null;function Za(){return null===Xa&&new Wa,Xa}function Ja(e,n){return t.isType(e,_e)?e:t.isType(e,ue)?(t.isType(n,ue)&&n.size,e):Tt(e)}function Qa(){ts=this}Ya.$metadata$={kind:o,simpleName:"AbstractSet",interfaces:[_e,Ca]},Qa.prototype.hasNext=function(){return!1},Qa.prototype.hasPrevious=function(){return!1},Qa.prototype.nextIndex=function(){return 0},Qa.prototype.previousIndex=function(){return-1},Qa.prototype.next=function(){throw yn()},Qa.prototype.previous=function(){throw yn()},Qa.$metadata$={kind:x,simpleName:"EmptyIterator",interfaces:[be]};var ts=null;function es(){return null===ts&&new Qa,ts}function ns(){is=this,this.serialVersionUID_0=L}ns.prototype.equals=function(e){return t.isType(e,pe)&&e.isEmpty()},ns.prototype.hashCode=function(){return 1},ns.prototype.toString=function(){return"[]"},Object.defineProperty(ns.prototype,"size",{configurable:!0,get:function(){return 0}}),ns.prototype.isEmpty=function(){return!0},ns.prototype.contains_11rb$=function(t){return!1},ns.prototype.containsAll_brywnq$=function(t){return t.isEmpty()},ns.prototype.get_za3lpa$=function(t){throw new cn("Empty list doesn't contain element at index "+t+".")},ns.prototype.indexOf_11rb$=function(t){return-1},ns.prototype.lastIndexOf_11rb$=function(t){return-1},ns.prototype.iterator=function(){return es()},ns.prototype.listIterator=function(){return es()},ns.prototype.listIterator_za3lpa$=function(t){if(0!==t)throw new cn("Index: "+t);return es()},ns.prototype.subList_vux9f0$=function(t,e){if(0===t&&0===e)return this;throw new cn("fromIndex: "+t+", toIndex: "+e)},ns.prototype.readResolve_0=function(){return os()},ns.$metadata$={kind:x,simpleName:"EmptyList",interfaces:[uo,vo,pe]};var is=null;function os(){return null===is&&new ns,is}function rs(t){return new as(t,!1)}function as(t,e){this.values=t,this.isVarargs=e}function ss(){return os()}function ls(t){return t.length>0?Sn(t):ss()}function us(t){return 0===t.length?yi():vi(new as(t,!0))}function cs(t){return 0===t.length?yi():vi(new as(t,!0))}function ps(t){return new cc(0,t.size-1|0)}function hs(t){return t.size-1|0}function _s(t){switch(t.size){case 0:return ss();case 1:return Vn(t.get_za3lpa$(0));default:return t}}function ds(t,e,n){if(e>n)throw sn("fromIndex ("+e+") is greater than toIndex ("+n+").");if(e<0)throw new cn("fromIndex ("+e+") is less than zero.");if(n>t)throw new cn("toIndex ("+n+") is greater than size ("+t+").")}function fs(){throw new gn("Index overflow has happened.")}function ms(){throw new gn("Count overflow has happened.")}function $s(){}function ys(t,e){this.index=t,this.value=e}function gs(t){this.iteratorFactory_0=t}function vs(e){return t.isType(e,ue)?e.size:null}function bs(e,n){return t.isType(e,ue)?e.size:n}function ws(t){this.iterator_0=t,this.index_0=0}function xs(e,n){if(t.isType(e,ks))return e.getOrImplicitDefault_11rb$(n);var i,o=e.get_11rb$(n);if(null==o&&!e.containsKey_11rb$(n))throw new $n("Key "+n+" is missing in the map.");return null==(i=o)||t.isType(i,S)?i:v()}function ks(){}function Cs(){}function Es(t,e){this.map_a09uzx$_0=t,this.default_0=e}function Ss(){Ts=this,this.serialVersionUID_0=z}Object.defineProperty(as.prototype,"size",{configurable:!0,get:function(){return this.values.length}}),as.prototype.isEmpty=function(){return 0===this.values.length},as.prototype.contains_11rb$=function(t){return H(this.values,t)},as.prototype.containsAll_brywnq$=function(e){var n;t:do{var i;if(t.isType(e,ue)&&e.isEmpty()){n=!0;break t}for(i=e.iterator();i.hasNext();){var o=i.next();if(!this.contains_11rb$(o)){n=!1;break t}}n=!0}while(0);return n},as.prototype.iterator=function(){return t.arrayIterator(this.values)},as.prototype.toArray=function(){var t=this.values;return this.isVarargs?t:t.slice()},as.$metadata$={kind:o,simpleName:"ArrayAsCollection",interfaces:[ue]},$s.$metadata$={kind:w,simpleName:"Grouping",interfaces:[]},ys.$metadata$={kind:o,simpleName:"IndexedValue",interfaces:[]},ys.prototype.component1=function(){return this.index},ys.prototype.component2=function(){return this.value},ys.prototype.copy_wxm5ur$=function(t,e){return new ys(void 0===t?this.index:t,void 0===e?this.value:e)},ys.prototype.toString=function(){return"IndexedValue(index="+t.toString(this.index)+", value="+t.toString(this.value)+")"},ys.prototype.hashCode=function(){var e=0;return 31*(e=31*e+t.hashCode(this.index)|0)+t.hashCode(this.value)|0},ys.prototype.equals=function(e){return this===e||null!==e&&"object"==typeof e&&Object.getPrototypeOf(this)===Object.getPrototypeOf(e)&&t.equals(this.index,e.index)&&t.equals(this.value,e.value)},gs.prototype.iterator=function(){return new ws(this.iteratorFactory_0())},gs.$metadata$={kind:o,simpleName:"IndexingIterable",interfaces:[se]},ws.prototype.hasNext=function(){return this.iterator_0.hasNext()},ws.prototype.next=function(){var t;return new ys(ti((t=this.index_0,this.index_0=t+1|0,t)),this.iterator_0.next())},ws.$metadata$={kind:o,simpleName:"IndexingIterator",interfaces:[ge]},ks.$metadata$={kind:w,simpleName:"MapWithDefault",interfaces:[fe]},Ss.prototype.equals=function(e){return t.isType(e,fe)&&e.isEmpty()},Ss.prototype.hashCode=function(){return 0},Ss.prototype.toString=function(){return"{}"},Object.defineProperty(Ss.prototype,"size",{configurable:!0,get:function(){return 0}}),Ss.prototype.isEmpty=function(){return!0},Ss.prototype.containsKey_11rb$=function(t){return!1},Ss.prototype.containsValue_11rc$=function(t){return!1},Ss.prototype.get_11rb$=function(t){return null},Object.defineProperty(Ss.prototype,"entries",{configurable:!0,get:function(){return Ml()}}),Object.defineProperty(Ss.prototype,"keys",{configurable:!0,get:function(){return Ml()}}),Object.defineProperty(Ss.prototype,"values",{configurable:!0,get:function(){return os()}}),Ss.prototype.readResolve_0=function(){return Os()},Ss.$metadata$={kind:x,simpleName:"EmptyMap",interfaces:[vo,fe]};var Ts=null;function Os(){return null===Ts&&new Ss,Ts}function Ns(){var e;return t.isType(e=Os(),fe)?e:yo()}function Ps(t){var e=Bi(t.length);return Is(e,t),e}function Is(t,e){var n;for(n=0;n!==e.length;++n){var i=e[n],o=i.component1(),r=i.component2();t.put_xwzc9p$(o,r)}}function As(t,e){var n;for(n=e.iterator();n.hasNext();){var i=n.next(),o=i.component1(),r=i.component2();t.put_xwzc9p$(o,r)}}function Rs(t,e){var n;for(n=e.iterator();n.hasNext();){var i=n.next(),o=i.component1(),r=i.component2();t.put_xwzc9p$(o,r)}}function js(e){var n;if(t.isType(e,ue)){switch(e.size){case 0:n=Ns();break;case 1:n=Wn(t.isType(e,pe)?e.get_za3lpa$(0):e.iterator().next());break;default:n=Ls(e,no(e.size))}return n}return Bs(Ls(e,to()))}function Ls(t,e){return As(e,t),e}function zs(t,e){return Is(e,t),e}function Ds(t,e){return Rs(e,t),e}function Ms(t){return io(t)}function Bs(t){return 0===t.size?Ns():t}function Fs(e,n){var i;if(t.isType(n,ue))return e.addAll_brywnq$(n);var o=!1;for(i=n.iterator();i.hasNext();){var r=i.next();e.add_11rb$(r)&&(o=!0)}return o}function Us(e,n){var i,o=Ja(n,e);return(t.isType(i=e,ce)?i:v()).removeAll_brywnq$(o)}function qs(e,n){var i,o=Ja(n,e);return(t.isType(i=e,ce)?i:v()).retainAll_brywnq$(o)}function Hs(t,e){return Gs(t,e,!0)}function Gs(t,e,n){for(var i={v:!1},o=t.iterator();o.hasNext();)e(o.next())===n&&(o.remove(),i.v=!0);return i.v}function Ks(t,e){return Vs(t,e,!0)}function Vs(e,n,i){var o,r,a;if(!t.isType(e,uo))return Gs(t.isType(o=e,le)?o:yo(),n,i);var s=0;r=hs(e);for(var l=0;l<=r;l++){var u=e.get_za3lpa$(l);n(u)!==i&&(s!==l&&e.set_wxm5ur$(s,u),s=s+1|0)}if(s=a;c--)e.removeAt_za3lpa$(c);return!0}return!1}function Ys(){}function Ws(){}function Xs(){}function Zs(){}function Js(){}function Qs(){}function tl(){}function el(){}function nl(t){Aa.call(this),this.delegate_0=t}function il(){}function ol(t){this.closure$iterator=t}function rl(t){return new ol((e=t,function(){return al(e)}));var e}function al(t){var e=new ll;return e.nextStep=Ze(t,e,e),e}function sl(){}function ll(){sl.call(this),this.state_0=0,this.nextValue_0=null,this.nextIterator_0=null,this.nextStep=null}function ul(t){return 0===t.length?cl():ct(t)}function cl(){return _l()}function pl(){hl=this}Ys.prototype.next=function(){return this.nextByte()},Ys.$metadata$={kind:o,simpleName:"ByteIterator",interfaces:[ge]},Ws.prototype.next=function(){return l(this.nextChar())},Ws.$metadata$={kind:o,simpleName:"CharIterator",interfaces:[ge]},Xs.prototype.next=function(){return this.nextShort()},Xs.$metadata$={kind:o,simpleName:"ShortIterator",interfaces:[ge]},Zs.prototype.next=function(){return this.nextInt()},Zs.$metadata$={kind:o,simpleName:"IntIterator",interfaces:[ge]},Js.prototype.next=function(){return this.nextLong()},Js.$metadata$={kind:o,simpleName:"LongIterator",interfaces:[ge]},Qs.prototype.next=function(){return this.nextFloat()},Qs.$metadata$={kind:o,simpleName:"FloatIterator",interfaces:[ge]},tl.prototype.next=function(){return this.nextDouble()},tl.$metadata$={kind:o,simpleName:"DoubleIterator",interfaces:[ge]},el.prototype.next=function(){return this.nextBoolean()},el.$metadata$={kind:o,simpleName:"BooleanIterator",interfaces:[ge]},Object.defineProperty(nl.prototype,"size",{configurable:!0,get:function(){return this.delegate_0.size}}),nl.prototype.get_za3lpa$=function(t){return this.delegate_0.get_za3lpa$(function(t,e){var n;if(n=hs(t),0<=e&&e<=n)return hs(t)-e|0;throw new cn("Element index "+e+" must be in range ["+new cc(0,hs(t))+"].")}(this,t))},nl.$metadata$={kind:o,simpleName:"ReversedListReadOnly",interfaces:[Aa]},il.$metadata$={kind:w,simpleName:"Sequence",interfaces:[]},ol.prototype.iterator=function(){return this.closure$iterator()},ol.$metadata$={kind:o,interfaces:[il]},sl.prototype.yieldAll_p1ys8y$=function(e,n){if(!t.isType(e,ue)||!e.isEmpty())return this.yieldAll_1phuh2$(e.iterator(),n)},sl.prototype.yieldAll_swo9gw$=function(t,e){return this.yieldAll_1phuh2$(t.iterator(),e)},sl.$metadata$={kind:o,simpleName:"SequenceScope",interfaces:[]},ll.prototype.hasNext=function(){for(;;){switch(this.state_0){case 0:break;case 1:if(E(this.nextIterator_0).hasNext())return this.state_0=2,!0;this.nextIterator_0=null;break;case 4:return!1;case 3:case 2:return!0;default:throw this.exceptionalState_0()}this.state_0=5;var t=E(this.nextStep);this.nextStep=null,t.resumeWith_tl1gpc$(new Gp(Ce()))}},ll.prototype.next=function(){var e;switch(this.state_0){case 0:case 1:return this.nextNotReady_0();case 2:return this.state_0=1,E(this.nextIterator_0).next();case 3:this.state_0=0;var n=null==(e=this.nextValue_0)||t.isType(e,S)?e:yo();return this.nextValue_0=null,n;default:throw this.exceptionalState_0()}},ll.prototype.nextNotReady_0=function(){if(this.hasNext())return this.next();throw yn()},ll.prototype.exceptionalState_0=function(){switch(this.state_0){case 4:return yn();case 5:return un("Iterator has failed.");default:return un("Unexpected state of the iterator: "+this.state_0)}},ll.prototype.yield_11rb$=function(t,e){return this.nextValue_0=t,this.state_0=3,(n=this,function(t){return n.nextStep=t,Ou()})(e);var n},ll.prototype.yieldAll_1phuh2$=function(t,e){if(t.hasNext())return this.nextIterator_0=t,this.state_0=2,(n=this,function(t){return n.nextStep=t,Ou()})(e);var n},ll.prototype.resumeWith_tl1gpc$=function(e){var n;Zp(e),null==(n=e.value)||t.isType(n,S)||v(),this.state_0=4},Object.defineProperty(ll.prototype,"context",{configurable:!0,get:function(){return vu()}}),ll.$metadata$={kind:o,simpleName:"SequenceBuilderIterator",interfaces:[su,ge,sl]},pl.prototype.iterator=function(){return es()},pl.prototype.drop_za3lpa$=function(t){return _l()},pl.prototype.take_za3lpa$=function(t){return _l()},pl.$metadata$={kind:x,simpleName:"EmptySequence",interfaces:[Sl,il]};var hl=null;function _l(){return null===hl&&new pl,hl}function dl(t){return t.iterator()}function fl(t){return yl(t,dl)}function ml(t){return t.iterator()}function $l(t){return t}function yl(e,n){var i;return t.isType(e,bl)?(t.isType(i=e,bl)?i:yo()).flatten_1tglza$(n):new Cl(e,$l,n)}function gl(t,e,n){void 0===e&&(e=!0),this.sequence_0=t,this.sendWhen_0=e,this.predicate_0=n}function vl(t){this.this$FilteringSequence=t,this.iterator=t.sequence_0.iterator(),this.nextState=-1,this.nextItem=null}function bl(t,e){this.sequence_0=t,this.transformer_0=e}function wl(t){this.this$TransformingSequence=t,this.iterator=t.sequence_0.iterator()}function xl(t,e,n){this.sequence1_0=t,this.sequence2_0=e,this.transform_0=n}function kl(t){this.this$MergingSequence=t,this.iterator1=t.sequence1_0.iterator(),this.iterator2=t.sequence2_0.iterator()}function Cl(t,e,n){this.sequence_0=t,this.transformer_0=e,this.iterator_0=n}function El(t){this.this$FlatteningSequence=t,this.iterator=t.sequence_0.iterator(),this.itemIterator=null}function Sl(){}function Tl(t,e,n){if(this.sequence_0=t,this.startIndex_0=e,this.endIndex_0=n,!(this.startIndex_0>=0))throw sn(("startIndex should be non-negative, but is "+this.startIndex_0).toString());if(!(this.endIndex_0>=0))throw sn(("endIndex should be non-negative, but is "+this.endIndex_0).toString());if(!(this.endIndex_0>=this.startIndex_0))throw sn(("endIndex should be not less than startIndex, but was "+this.endIndex_0+" < "+this.startIndex_0).toString())}function Ol(t){this.this$SubSequence=t,this.iterator=t.sequence_0.iterator(),this.position=0}function Nl(t,e){if(this.sequence_0=t,this.count_0=e,!(this.count_0>=0))throw sn(("count must be non-negative, but was "+this.count_0+".").toString())}function Pl(t){this.left=t.count_0,this.iterator=t.sequence_0.iterator()}function Il(t,e){if(this.sequence_0=t,this.count_0=e,!(this.count_0>=0))throw sn(("count must be non-negative, but was "+this.count_0+".").toString())}function Al(t){this.iterator=t.sequence_0.iterator(),this.left=t.count_0}function Rl(t,e){this.getInitialValue_0=t,this.getNextValue_0=e}function jl(t){this.this$GeneratorSequence=t,this.nextItem=null,this.nextState=-2}function Ll(t,e){return new Rl(t,e)}function zl(){Dl=this,this.serialVersionUID_0=D}vl.prototype.calcNext_0=function(){for(;this.iterator.hasNext();){var t=this.iterator.next();if(this.this$FilteringSequence.predicate_0(t)===this.this$FilteringSequence.sendWhen_0)return this.nextItem=t,void(this.nextState=1)}this.nextState=0},vl.prototype.next=function(){var e;if(-1===this.nextState&&this.calcNext_0(),0===this.nextState)throw yn();var n=this.nextItem;return this.nextItem=null,this.nextState=-1,null==(e=n)||t.isType(e,S)?e:yo()},vl.prototype.hasNext=function(){return-1===this.nextState&&this.calcNext_0(),1===this.nextState},vl.$metadata$={kind:o,interfaces:[ge]},gl.prototype.iterator=function(){return new vl(this)},gl.$metadata$={kind:o,simpleName:"FilteringSequence",interfaces:[il]},wl.prototype.next=function(){return this.this$TransformingSequence.transformer_0(this.iterator.next())},wl.prototype.hasNext=function(){return this.iterator.hasNext()},wl.$metadata$={kind:o,interfaces:[ge]},bl.prototype.iterator=function(){return new wl(this)},bl.prototype.flatten_1tglza$=function(t){return new Cl(this.sequence_0,this.transformer_0,t)},bl.$metadata$={kind:o,simpleName:"TransformingSequence",interfaces:[il]},kl.prototype.next=function(){return this.this$MergingSequence.transform_0(this.iterator1.next(),this.iterator2.next())},kl.prototype.hasNext=function(){return this.iterator1.hasNext()&&this.iterator2.hasNext()},kl.$metadata$={kind:o,interfaces:[ge]},xl.prototype.iterator=function(){return new kl(this)},xl.$metadata$={kind:o,simpleName:"MergingSequence",interfaces:[il]},El.prototype.next=function(){if(!this.ensureItemIterator_0())throw yn();return E(this.itemIterator).next()},El.prototype.hasNext=function(){return this.ensureItemIterator_0()},El.prototype.ensureItemIterator_0=function(){var t;for(!1===(null!=(t=this.itemIterator)?t.hasNext():null)&&(this.itemIterator=null);null==this.itemIterator;){if(!this.iterator.hasNext())return!1;var e=this.iterator.next(),n=this.this$FlatteningSequence.iterator_0(this.this$FlatteningSequence.transformer_0(e));if(n.hasNext())return this.itemIterator=n,!0}return!0},El.$metadata$={kind:o,interfaces:[ge]},Cl.prototype.iterator=function(){return new El(this)},Cl.$metadata$={kind:o,simpleName:"FlatteningSequence",interfaces:[il]},Sl.$metadata$={kind:w,simpleName:"DropTakeSequence",interfaces:[il]},Object.defineProperty(Tl.prototype,"count_0",{configurable:!0,get:function(){return this.endIndex_0-this.startIndex_0|0}}),Tl.prototype.drop_za3lpa$=function(t){return t>=this.count_0?cl():new Tl(this.sequence_0,this.startIndex_0+t|0,this.endIndex_0)},Tl.prototype.take_za3lpa$=function(t){return t>=this.count_0?this:new Tl(this.sequence_0,this.startIndex_0,this.startIndex_0+t|0)},Ol.prototype.drop_0=function(){for(;this.position=this.this$SubSequence.endIndex_0)throw yn();return this.position=this.position+1|0,this.iterator.next()},Ol.$metadata$={kind:o,interfaces:[ge]},Tl.prototype.iterator=function(){return new Ol(this)},Tl.$metadata$={kind:o,simpleName:"SubSequence",interfaces:[Sl,il]},Nl.prototype.drop_za3lpa$=function(t){return t>=this.count_0?cl():new Tl(this.sequence_0,t,this.count_0)},Nl.prototype.take_za3lpa$=function(t){return t>=this.count_0?this:new Nl(this.sequence_0,t)},Pl.prototype.next=function(){if(0===this.left)throw yn();return this.left=this.left-1|0,this.iterator.next()},Pl.prototype.hasNext=function(){return this.left>0&&this.iterator.hasNext()},Pl.$metadata$={kind:o,interfaces:[ge]},Nl.prototype.iterator=function(){return new Pl(this)},Nl.$metadata$={kind:o,simpleName:"TakeSequence",interfaces:[Sl,il]},Il.prototype.drop_za3lpa$=function(t){var e=this.count_0+t|0;return e<0?new Il(this,t):new Il(this.sequence_0,e)},Il.prototype.take_za3lpa$=function(t){var e=this.count_0+t|0;return e<0?new Nl(this,t):new Tl(this.sequence_0,this.count_0,e)},Al.prototype.drop_0=function(){for(;this.left>0&&this.iterator.hasNext();)this.iterator.next(),this.left=this.left-1|0},Al.prototype.next=function(){return this.drop_0(),this.iterator.next()},Al.prototype.hasNext=function(){return this.drop_0(),this.iterator.hasNext()},Al.$metadata$={kind:o,interfaces:[ge]},Il.prototype.iterator=function(){return new Al(this)},Il.$metadata$={kind:o,simpleName:"DropSequence",interfaces:[Sl,il]},jl.prototype.calcNext_0=function(){this.nextItem=-2===this.nextState?this.this$GeneratorSequence.getInitialValue_0():this.this$GeneratorSequence.getNextValue_0(E(this.nextItem)),this.nextState=null==this.nextItem?0:1},jl.prototype.next=function(){var e;if(this.nextState<0&&this.calcNext_0(),0===this.nextState)throw yn();var n=t.isType(e=this.nextItem,S)?e:yo();return this.nextState=-1,n},jl.prototype.hasNext=function(){return this.nextState<0&&this.calcNext_0(),1===this.nextState},jl.$metadata$={kind:o,interfaces:[ge]},Rl.prototype.iterator=function(){return new jl(this)},Rl.$metadata$={kind:o,simpleName:"GeneratorSequence",interfaces:[il]},zl.prototype.equals=function(e){return t.isType(e,_e)&&e.isEmpty()},zl.prototype.hashCode=function(){return 0},zl.prototype.toString=function(){return"[]"},Object.defineProperty(zl.prototype,"size",{configurable:!0,get:function(){return 0}}),zl.prototype.isEmpty=function(){return!0},zl.prototype.contains_11rb$=function(t){return!1},zl.prototype.containsAll_brywnq$=function(t){return t.isEmpty()},zl.prototype.iterator=function(){return es()},zl.prototype.readResolve_0=function(){return Ml()},zl.$metadata$={kind:x,simpleName:"EmptySet",interfaces:[vo,_e]};var Dl=null;function Ml(){return null===Dl&&new zl,Dl}function Bl(){return Ml()}function Fl(t){return rt(t,Hi(t.length))}function Ul(t){switch(t.size){case 0:return Bl();case 1:return Yn(t.iterator().next());default:return t}}function ql(t){this.closure$iterator=t}function Hl(t,e){if(!(t>0&&e>0))throw sn((t!==e?"Both size "+t+" and step "+e+" must be greater than zero.":"size "+t+" must be greater than zero.").toString())}function Gl(t,e,n,i,o){return Hl(e,n),new ql((r=t,a=e,s=n,l=i,u=o,function(){return Vl(r.iterator(),a,s,l,u)}));var r,a,s,l,u}function Kl(t,e,n,i,o,r,a,s){Ge.call(this,s),this.$controller=a,this.exceptionState_0=1,this.local$closure$size=t,this.local$closure$step=e,this.local$closure$iterator=n,this.local$closure$reuseBuffer=i,this.local$closure$partialWindows=o,this.local$tmp$=void 0,this.local$tmp$_0=void 0,this.local$gap=void 0,this.local$buffer=void 0,this.local$skip=void 0,this.local$e=void 0,this.local$buffer_0=void 0,this.local$$receiver=r}function Vl(t,e,n,i,o){return t.hasNext()?al((r=e,a=n,s=t,l=o,u=i,function(t,e,n){var i=new Kl(r,a,s,l,u,t,this,e);return n?i:i.doResume(null)})):es();var r,a,s,l,u}function Yl(t,e){if(Aa.call(this),this.buffer_0=t,!(e>=0))throw sn(("ring buffer filled size should not be negative but it is "+e).toString());if(!(e<=this.buffer_0.length))throw sn(("ring buffer filled size: "+e+" cannot be larger than the buffer size: "+this.buffer_0.length).toString());this.capacity_0=this.buffer_0.length,this.startIndex_0=0,this.size_4goa01$_0=e}function Wl(t){this.this$RingBuffer=t,Ia.call(this),this.count_0=t.size,this.index_0=t.startIndex_0}function Xl(e,n){var i;return e===n?0:null==e?-1:null==n?1:t.compareTo(t.isComparable(i=e)?i:yo(),n)}function Zl(t){return function(e,n){return function(t,e,n){var i;for(i=0;i!==n.length;++i){var o=n[i],r=Xl(o(t),o(e));if(0!==r)return r}return 0}(e,n,t)}}function Jl(){var e;return t.isType(e=iu(),qn)?e:yo()}function Ql(){var e;return t.isType(e=au(),qn)?e:yo()}function tu(t){this.comparator=t}function eu(){nu=this}ql.prototype.iterator=function(){return this.closure$iterator()},ql.$metadata$={kind:o,interfaces:[il]},Kl.$metadata$={kind:t.Kind.CLASS,simpleName:null,interfaces:[Ge]},Kl.prototype=Object.create(Ge.prototype),Kl.prototype.constructor=Kl,Kl.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var e=Ft(this.local$closure$size,1024);if(this.local$gap=this.local$closure$step-this.local$closure$size|0,this.local$gap>=0){this.local$buffer=gi(),this.local$skip=0,this.local$tmp$=this.local$closure$iterator,this.state_0=13;continue}this.local$buffer_0=(i=e,o=(o=void 0)||Object.create(Yl.prototype),Yl.call(o,t.newArray(i,null),0),o),this.local$tmp$_0=this.local$closure$iterator,this.state_0=2;continue;case 1:throw this.exception_0;case 2:if(!this.local$tmp$_0.hasNext()){this.state_0=6;continue}var n=this.local$tmp$_0.next();if(this.local$buffer_0.add_11rb$(n),this.local$buffer_0.isFull()){if(this.local$buffer_0.size0){this.local$skip=this.local$skip-1|0,this.state_0=13;continue}this.state_0=14;continue;case 14:if(this.local$buffer.add_11rb$(this.local$e),this.local$buffer.size===this.local$closure$size){if(this.state_0=15,this.result_0=this.local$$receiver.yield_11rb$(this.local$buffer,this),this.result_0===Ou())return Ou();continue}this.state_0=16;continue;case 15:this.local$closure$reuseBuffer?this.local$buffer.clear():this.local$buffer=gi(this.local$closure$size),this.local$skip=this.local$gap,this.state_0=16;continue;case 16:this.state_0=13;continue;case 17:if(this.local$buffer.isEmpty()){this.state_0=20;continue}if(this.local$closure$partialWindows||this.local$buffer.size===this.local$closure$size){if(this.state_0=18,this.result_0=this.local$$receiver.yield_11rb$(this.local$buffer,this),this.result_0===Ou())return Ou();continue}this.state_0=19;continue;case 19:this.state_0=20;continue;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}var i,o},Object.defineProperty(Yl.prototype,"size",{configurable:!0,get:function(){return this.size_4goa01$_0},set:function(t){this.size_4goa01$_0=t}}),Yl.prototype.get_za3lpa$=function(e){var n;return Ma().checkElementIndex_6xvm5r$(e,this.size),null==(n=this.buffer_0[(this.startIndex_0+e|0)%this.capacity_0|0])||t.isType(n,S)?n:yo()},Yl.prototype.isFull=function(){return this.size===this.capacity_0},Wl.prototype.computeNext=function(){var e;0===this.count_0?this.done():(this.setNext_11rb$(null==(e=this.this$RingBuffer.buffer_0[this.index_0])||t.isType(e,S)?e:yo()),this.index_0=(this.index_0+1|0)%this.this$RingBuffer.capacity_0|0,this.count_0=this.count_0-1|0)},Wl.$metadata$={kind:o,interfaces:[Ia]},Yl.prototype.iterator=function(){return new Wl(this)},Yl.prototype.toArray_ro6dgy$=function(e){for(var n,i,o,r,a=e.lengththis.size&&(a[this.size]=null),t.isArray(r=a)?r:yo()},Yl.prototype.toArray=function(){return this.toArray_ro6dgy$(t.newArray(this.size,null))},Yl.prototype.expanded_za3lpa$=function(e){var n=Ft(this.capacity_0+(this.capacity_0>>1)+1|0,e);return new Yl(0===this.startIndex_0?Nn(this.buffer_0,n):this.toArray_ro6dgy$(t.newArray(n,null)),this.size)},Yl.prototype.add_11rb$=function(t){if(this.isFull())throw un("ring buffer is full");this.buffer_0[(this.startIndex_0+this.size|0)%this.capacity_0|0]=t,this.size=this.size+1|0},Yl.prototype.removeFirst_za3lpa$=function(t){if(!(t>=0))throw sn(("n shouldn't be negative but it is "+t).toString());if(!(t<=this.size))throw sn(("n shouldn't be greater than the buffer size: n = "+t+", size = "+this.size).toString());if(t>0){var e=this.startIndex_0,n=(e+t|0)%this.capacity_0|0;e>n?(In(this.buffer_0,null,e,this.capacity_0),In(this.buffer_0,null,0,n)):In(this.buffer_0,null,e,n),this.startIndex_0=n,this.size=this.size-t|0}},Yl.prototype.forward_0=function(t,e){return(t+e|0)%this.capacity_0|0},Yl.$metadata$={kind:o,simpleName:"RingBuffer",interfaces:[uo,Aa]},tu.prototype.compare=function(t,e){return this.comparator.compare(e,t)},tu.prototype.reversed=function(){return this.comparator},tu.$metadata$={kind:o,simpleName:"ReversedComparator",interfaces:[qn]},eu.prototype.compare=function(e,n){return t.compareTo(e,n)},eu.prototype.reversed=function(){return au()},eu.$metadata$={kind:x,simpleName:"NaturalOrderComparator",interfaces:[qn]};var nu=null;function iu(){return null===nu&&new eu,nu}function ou(){ru=this}ou.prototype.compare=function(e,n){return t.compareTo(n,e)},ou.prototype.reversed=function(){return iu()},ou.$metadata$={kind:x,simpleName:"ReverseOrderComparator",interfaces:[qn]};var ru=null;function au(){return null===ru&&new ou,ru}function su(){}function lu(){pu()}function uu(){cu=this}su.$metadata$={kind:w,simpleName:"Continuation",interfaces:[]},r("kotlin.kotlin.coroutines.suspendCoroutine_922awp$",a((function(){var n=e.kotlin.coroutines.intrinsics.intercepted_f9mg25$,i=e.kotlin.coroutines.SafeContinuation_init_wj8d80$;return function(e,o){return t.suspendCall((r=e,function(t){var e=i(n(t));return r(e),e.getOrThrow()})(t.coroutineReceiver())),t.coroutineResult(t.coroutineReceiver());var r}}))),uu.$metadata$={kind:x,simpleName:"Key",interfaces:[du]};var cu=null;function pu(){return null===cu&&new uu,cu}function hu(){}function _u(t,e){var n=t.minusKey_yeqjby$(e.key);if(n===vu())return e;var i=n.get_j3r2sn$(pu());if(null==i)return new bu(n,e);var o=n.minusKey_yeqjby$(pu());return o===vu()?new bu(e,i):new bu(new bu(o,e),i)}function du(){}function fu(){}function mu(t){this.key_no4tas$_0=t}function $u(e,n){this.safeCast_9rw4bk$_0=n,this.topmostKey_3x72pn$_0=t.isType(e,$u)?e.topmostKey_3x72pn$_0:e}function yu(){gu=this,this.serialVersionUID_0=p}lu.prototype.releaseInterceptedContinuation_k98bjh$=function(t){},lu.prototype.get_j3r2sn$=function(e){var n;return t.isType(e,$u)?e.isSubKey_i2ksv9$(this.key)&&t.isType(n=e.tryCast_m1180o$(this),fu)?n:null:pu()===e?t.isType(this,fu)?this:yo():null},lu.prototype.minusKey_yeqjby$=function(e){return t.isType(e,$u)?e.isSubKey_i2ksv9$(this.key)&&null!=e.tryCast_m1180o$(this)?vu():this:pu()===e?vu():this},lu.$metadata$={kind:w,simpleName:"ContinuationInterceptor",interfaces:[fu]},hu.prototype.plus_1fupul$=function(t){return t===vu()?this:t.fold_3cc69b$(this,_u)},du.$metadata$={kind:w,simpleName:"Key",interfaces:[]},fu.prototype.get_j3r2sn$=function(e){return s(this.key,e)?t.isType(this,fu)?this:yo():null},fu.prototype.fold_3cc69b$=function(t,e){return e(t,this)},fu.prototype.minusKey_yeqjby$=function(t){return s(this.key,t)?vu():this},fu.$metadata$={kind:w,simpleName:"Element",interfaces:[hu]},hu.$metadata$={kind:w,simpleName:"CoroutineContext",interfaces:[]},Object.defineProperty(mu.prototype,"key",{get:function(){return this.key_no4tas$_0}}),mu.$metadata$={kind:o,simpleName:"AbstractCoroutineContextElement",interfaces:[fu]},$u.prototype.tryCast_m1180o$=function(t){return this.safeCast_9rw4bk$_0(t)},$u.prototype.isSubKey_i2ksv9$=function(t){return t===this||this.topmostKey_3x72pn$_0===t},$u.$metadata$={kind:o,simpleName:"AbstractCoroutineContextKey",interfaces:[du]},yu.prototype.readResolve_0=function(){return vu()},yu.prototype.get_j3r2sn$=function(t){return null},yu.prototype.fold_3cc69b$=function(t,e){return t},yu.prototype.plus_1fupul$=function(t){return t},yu.prototype.minusKey_yeqjby$=function(t){return this},yu.prototype.hashCode=function(){return 0},yu.prototype.toString=function(){return"EmptyCoroutineContext"},yu.$metadata$={kind:x,simpleName:"EmptyCoroutineContext",interfaces:[vo,hu]};var gu=null;function vu(){return null===gu&&new yu,gu}function bu(t,e){this.left_0=t,this.element_0=e}function wu(t,e){return 0===t.length?e.toString():t+", "+e}function xu(t){null===Tu&&new ku,this.elements=t}function ku(){Tu=this,this.serialVersionUID_0=p}bu.prototype.get_j3r2sn$=function(e){for(var n,i=this;;){if(null!=(n=i.element_0.get_j3r2sn$(e)))return n;var o=i.left_0;if(!t.isType(o,bu))return o.get_j3r2sn$(e);i=o}},bu.prototype.fold_3cc69b$=function(t,e){return e(this.left_0.fold_3cc69b$(t,e),this.element_0)},bu.prototype.minusKey_yeqjby$=function(t){if(null!=this.element_0.get_j3r2sn$(t))return this.left_0;var e=this.left_0.minusKey_yeqjby$(t);return e===this.left_0?this:e===vu()?this.element_0:new bu(e,this.element_0)},bu.prototype.size_0=function(){for(var e,n,i=this,o=2;;){if(null==(n=t.isType(e=i.left_0,bu)?e:null))return o;i=n,o=o+1|0}},bu.prototype.contains_0=function(t){return s(this.get_j3r2sn$(t.key),t)},bu.prototype.containsAll_0=function(e){for(var n,i=e;;){if(!this.contains_0(i.element_0))return!1;var o=i.left_0;if(!t.isType(o,bu))return this.contains_0(t.isType(n=o,fu)?n:yo());i=o}},bu.prototype.equals=function(e){return this===e||t.isType(e,bu)&&e.size_0()===this.size_0()&&e.containsAll_0(this)},bu.prototype.hashCode=function(){return P(this.left_0)+P(this.element_0)|0},bu.prototype.toString=function(){return"["+this.fold_3cc69b$("",wu)+"]"},bu.prototype.writeReplace_0=function(){var e,n,i,o=this.size_0(),r=t.newArray(o,null),a={v:0};if(this.fold_3cc69b$(Ce(),(n=r,i=a,function(t,e){var o;return n[(o=i.v,i.v=o+1|0,o)]=e,xe})),a.v!==o)throw un("Check failed.".toString());return new xu(t.isArray(e=r)?e:yo())},ku.$metadata$={kind:x,simpleName:"Companion",interfaces:[]};var Cu,Eu,Su,Tu=null;function Ou(){return Iu()}function Nu(t,e){k.call(this),this.name$=t,this.ordinal$=e}function Pu(){Pu=function(){},Cu=new Nu("COROUTINE_SUSPENDED",0),Eu=new Nu("UNDECIDED",1),Su=new Nu("RESUMED",2)}function Iu(){return Pu(),Cu}function Au(){return Pu(),Eu}function Ru(){return Pu(),Su}function ju(t,e){var n=t%e|0;return n>=0?n:n+e|0}function Lu(t,e){var n=t.modulo(e);return n.toNumber()>=0?n:n.add(e)}function zu(t,e,n){return ju(ju(t,n)-ju(e,n)|0,n)}function Du(t,e,n){return Lu(Lu(t,n).subtract(Lu(e,n)),n)}function Mu(t,e,n){if(n>0)return t>=e?e:e-zu(e,t,n)|0;if(n<0)return t<=e?e:e+zu(t,e,0|-n)|0;throw sn("Step is zero.")}function Bu(t,e,n){if(n.toNumber()>0)return t.compareTo_11rb$(e)>=0?e:e.subtract(Du(e,t,n));if(n.toNumber()<0)return t.compareTo_11rb$(e)<=0?e:e.add(Du(t,e,n.unaryMinus()));throw sn("Step is zero.")}function Fu(t){this.function$=t}function Uu(){}function qu(){Yu()}function Hu(){Vu=this,qu.call(this),this.defaultRandom_0=So()}function Gu(){Ku=this,this.serialVersionUID_0=p}xu.prototype.readResolve_0=function(){var t,e=this.elements,n=vu();for(t=0;t!==e.length;++t){var i=e[t];n=n.plus_1fupul$(i)}return n},xu.$metadata$={kind:o,simpleName:"Serialized",interfaces:[vo]},bu.$metadata$={kind:o,simpleName:"CombinedContext",interfaces:[vo,hu]},r("kotlin.kotlin.coroutines.intrinsics.suspendCoroutineUninterceptedOrReturn_zb0pmy$",a((function(){var t=e.kotlin.NotImplementedError;return function(e,n){throw new t("Implementation of suspendCoroutineUninterceptedOrReturn is intrinsic")}}))),Nu.$metadata$={kind:o,simpleName:"CoroutineSingletons",interfaces:[k]},Nu.values=function(){return[Iu(),Au(),Ru()]},Nu.valueOf_61zpoe$=function(t){switch(t){case"COROUTINE_SUSPENDED":return Iu();case"UNDECIDED":return Au();case"RESUMED":return Ru();default:go("No enum constant kotlin.coroutines.intrinsics.CoroutineSingletons."+t)}},Fu.prototype.getValue_lrcp0p$=function(t,e){return this.function$(t,e)},Fu.$metadata$={kind:w,simpleName:"ReadOnlyProperty",interfaces:[]},Uu.$metadata$={kind:w,simpleName:"ReadWriteProperty",interfaces:[Fu]},qu.prototype.nextInt=function(){return this.nextBits_za3lpa$(32)},qu.prototype.nextInt_za3lpa$=function(t){return this.nextInt_vux9f0$(0,t)},qu.prototype.nextInt_vux9f0$=function(t,e){var n;Ju(t,e);var i=e-t|0;if(i>0||-2147483648===i){if((i&(0|-i))===i){var o=Xu(i);n=this.nextBits_za3lpa$(o)}else{var r;do{var a=this.nextInt()>>>1;r=a%i|0}while((a-r+(i-1)|0)<0);n=r}return t+n|0}for(;;){var s=this.nextInt();if(t<=s&&s0){var r;if(s(o.and(o.unaryMinus()),o)){var a=o.toInt(),l=o.shiftRightUnsigned(32).toInt();if(0!==a){var u=Xu(a);i=t.Long.fromInt(this.nextBits_za3lpa$(u)).and(b)}else if(1===l)i=t.Long.fromInt(this.nextInt()).and(b);else{var c=Xu(l);i=t.Long.fromInt(this.nextBits_za3lpa$(c)).shiftLeft(32).add(t.Long.fromInt(this.nextInt()).and(b))}r=i}else{var p;do{var h=this.nextLong().shiftRightUnsigned(1);p=h.modulo(o)}while(h.subtract(p).add(o.subtract(t.Long.fromInt(1))).toNumber()<0);r=p}return e.add(r)}for(;;){var _=this.nextLong();if(e.lessThanOrEqual(_)&&_.lessThan(n))return _}},qu.prototype.nextBoolean=function(){return 0!==this.nextBits_za3lpa$(1)},qu.prototype.nextDouble=function(){return To(this.nextBits_za3lpa$(26),this.nextBits_za3lpa$(27))},qu.prototype.nextDouble_14dthe$=function(t){return this.nextDouble_lu1900$(0,t)},qu.prototype.nextDouble_lu1900$=function(t,e){var n;tc(t,e);var i=e-t;if(ko(i)&&Eo(t)&&Eo(e)){var o=this.nextDouble()*(e/2-t/2);n=t+o+o}else n=t+this.nextDouble()*i;var r=n;return r>=e?bo(e):r},qu.prototype.nextFloat=function(){return this.nextBits_za3lpa$(24)/16777216},qu.prototype.nextBytes_mj6st8$$default=function(t,e,n){if(!(0<=e&&e<=t.length&&0<=n&&n<=t.length))throw sn((i=e,o=n,r=t,function(){return"fromIndex ("+i+") or toIndex ("+o+") are out of range: 0.."+r.length+"."})().toString());var i,o,r;if(!(e<=n))throw sn(("fromIndex ("+e+") must be not greater than toIndex ("+n+").").toString());for(var a=(n-e|0)/4|0,s={v:e},l=0;l>>8),t[s.v+2|0]=f(u>>>16),t[s.v+3|0]=f(u>>>24),s.v=s.v+4|0}for(var c=n-s.v|0,p=this.nextBits_za3lpa$(8*c|0),h=0;h>>(8*h|0));return t},qu.prototype.nextBytes_mj6st8$=function(t,e,n,i){return void 0===e&&(e=0),void 0===n&&(n=t.length),i?i(t,e,n):this.nextBytes_mj6st8$$default(t,e,n)},qu.prototype.nextBytes_fqrh44$=function(t){return this.nextBytes_mj6st8$(t,0,t.length)},qu.prototype.nextBytes_za3lpa$=function(t){return this.nextBytes_fqrh44$(new Int8Array(t))},Gu.prototype.readResolve_0=function(){return Yu()},Gu.$metadata$={kind:x,simpleName:"Serialized",interfaces:[vo]};var Ku=null;Hu.prototype.writeReplace_0=function(){return null===Ku&&new Gu,Ku},Hu.prototype.nextBits_za3lpa$=function(t){return this.defaultRandom_0.nextBits_za3lpa$(t)},Hu.prototype.nextInt=function(){return this.defaultRandom_0.nextInt()},Hu.prototype.nextInt_za3lpa$=function(t){return this.defaultRandom_0.nextInt_za3lpa$(t)},Hu.prototype.nextInt_vux9f0$=function(t,e){return this.defaultRandom_0.nextInt_vux9f0$(t,e)},Hu.prototype.nextLong=function(){return this.defaultRandom_0.nextLong()},Hu.prototype.nextLong_s8cxhz$=function(t){return this.defaultRandom_0.nextLong_s8cxhz$(t)},Hu.prototype.nextLong_3pjtqy$=function(t,e){return this.defaultRandom_0.nextLong_3pjtqy$(t,e)},Hu.prototype.nextBoolean=function(){return this.defaultRandom_0.nextBoolean()},Hu.prototype.nextDouble=function(){return this.defaultRandom_0.nextDouble()},Hu.prototype.nextDouble_14dthe$=function(t){return this.defaultRandom_0.nextDouble_14dthe$(t)},Hu.prototype.nextDouble_lu1900$=function(t,e){return this.defaultRandom_0.nextDouble_lu1900$(t,e)},Hu.prototype.nextFloat=function(){return this.defaultRandom_0.nextFloat()},Hu.prototype.nextBytes_fqrh44$=function(t){return this.defaultRandom_0.nextBytes_fqrh44$(t)},Hu.prototype.nextBytes_za3lpa$=function(t){return this.defaultRandom_0.nextBytes_za3lpa$(t)},Hu.prototype.nextBytes_mj6st8$$default=function(t,e,n){return this.defaultRandom_0.nextBytes_mj6st8$(t,e,n)},Hu.$metadata$={kind:x,simpleName:"Default",interfaces:[vo,qu]};var Vu=null;function Yu(){return null===Vu&&new Hu,Vu}function Wu(t){return rc(t,t>>31)}function Xu(t){return 31-R(t)|0}function Zu(t,e){return t>>>32-e&(0|-e)>>31}function Ju(t,e){if(!(e>t))throw sn(ec(t,e).toString())}function Qu(t,e){if(!(e.compareTo_11rb$(t)>0))throw sn(ec(t,e).toString())}function tc(t,e){if(!(e>t))throw sn(ec(t,e).toString())}function ec(t,e){return"Random range is empty: ["+t.toString()+", "+e.toString()+")."}function nc(t,e,n,i,o,r){if(null===oc&&new ic,qu.call(this),this.x_0=t,this.y_0=e,this.z_0=n,this.w_0=i,this.v_0=o,this.addend_0=r,0==(this.x_0|this.y_0|this.z_0|this.w_0|this.v_0))throw sn("Initial state must have at least one non-zero element.".toString());for(var a=0;a<64;a++)this.nextInt()}function ic(){oc=this,this.serialVersionUID_0=p}qu.$metadata$={kind:o,simpleName:"Random",interfaces:[]},nc.prototype.nextInt=function(){var t=this.x_0;t^=t>>>2,this.x_0=this.y_0,this.y_0=this.z_0,this.z_0=this.w_0;var e=this.v_0;return this.w_0=e,t=t^t<<1^e^e<<4,this.v_0=t,this.addend_0=this.addend_0+362437|0,t+this.addend_0|0},nc.prototype.nextBits_za3lpa$=function(t){return Zu(this.nextInt(),t)},ic.$metadata$={kind:x,simpleName:"Companion",interfaces:[]};var oc=null;function rc(t,e,n){return n=n||Object.create(nc.prototype),nc.call(n,t,e,0,0,~t,t<<10^e>>>4),n}function ac(t,e){uc(),bc.call(this,t,e,1)}function sc(){lc=this,this.EMPTY=new ac(_(1),_(0))}nc.$metadata$={kind:o,simpleName:"XorWowRandom",interfaces:[vo,qu]},Object.defineProperty(ac.prototype,"start",{configurable:!0,get:function(){return l(this.first)}}),Object.defineProperty(ac.prototype,"endInclusive",{configurable:!0,get:function(){return l(this.last)}}),Object.defineProperty(ac.prototype,"endExclusive",{configurable:!0,get:function(){if(this.last===j.MAX_VALUE)throw un("Cannot return the exclusive upper bound of a range that includes MAX_VALUE.".toString());return l(_(this.last+1))}}),ac.prototype.contains_mef7kx$=function(t){return this.first<=t&&t<=this.last},ac.prototype.isEmpty=function(){return this.first>this.last},ac.prototype.equals=function(e){return t.isType(e,ac)&&(this.isEmpty()&&e.isEmpty()||this.first===e.first&&this.last===e.last)},ac.prototype.hashCode=function(){return this.isEmpty()?-1:(31*(0|this.first)|0)+(0|this.last)|0},ac.prototype.toString=function(){return String.fromCharCode(this.first)+".."+String.fromCharCode(this.last)},sc.$metadata$={kind:x,simpleName:"Companion",interfaces:[]};var lc=null;function uc(){return null===lc&&new sc,lc}function cc(t,e){_c(),Cc.call(this,t,e,1)}function pc(){hc=this,this.EMPTY=new cc(1,0)}ac.$metadata$={kind:o,simpleName:"CharRange",interfaces:[zc,Lc,bc]},Object.defineProperty(cc.prototype,"start",{configurable:!0,get:function(){return this.first}}),Object.defineProperty(cc.prototype,"endInclusive",{configurable:!0,get:function(){return this.last}}),Object.defineProperty(cc.prototype,"endExclusive",{configurable:!0,get:function(){if(2147483647===this.last)throw un("Cannot return the exclusive upper bound of a range that includes MAX_VALUE.".toString());return this.last+1|0}}),cc.prototype.contains_mef7kx$=function(t){return this.first<=t&&t<=this.last},cc.prototype.isEmpty=function(){return this.first>this.last},cc.prototype.equals=function(e){return t.isType(e,cc)&&(this.isEmpty()&&e.isEmpty()||this.first===e.first&&this.last===e.last)},cc.prototype.hashCode=function(){return this.isEmpty()?-1:(31*this.first|0)+this.last|0},cc.prototype.toString=function(){return this.first.toString()+".."+this.last},pc.$metadata$={kind:x,simpleName:"Companion",interfaces:[]};var hc=null;function _c(){return null===hc&&new pc,hc}function dc(t,e){$c(),Oc.call(this,t,e,M)}function fc(){mc=this,this.EMPTY=new dc(M,p)}cc.$metadata$={kind:o,simpleName:"IntRange",interfaces:[zc,Lc,Cc]},Object.defineProperty(dc.prototype,"start",{configurable:!0,get:function(){return this.first}}),Object.defineProperty(dc.prototype,"endInclusive",{configurable:!0,get:function(){return this.last}}),Object.defineProperty(dc.prototype,"endExclusive",{configurable:!0,get:function(){if(s(this.last,y))throw un("Cannot return the exclusive upper bound of a range that includes MAX_VALUE.".toString());return this.last.add(t.Long.fromInt(1))}}),dc.prototype.contains_mef7kx$=function(t){return this.first.compareTo_11rb$(t)<=0&&t.compareTo_11rb$(this.last)<=0},dc.prototype.isEmpty=function(){return this.first.compareTo_11rb$(this.last)>0},dc.prototype.equals=function(e){return t.isType(e,dc)&&(this.isEmpty()&&e.isEmpty()||s(this.first,e.first)&&s(this.last,e.last))},dc.prototype.hashCode=function(){return this.isEmpty()?-1:t.Long.fromInt(31).multiply(this.first.xor(this.first.shiftRightUnsigned(32))).add(this.last.xor(this.last.shiftRightUnsigned(32))).toInt()},dc.prototype.toString=function(){return this.first.toString()+".."+this.last.toString()},fc.$metadata$={kind:x,simpleName:"Companion",interfaces:[]};var mc=null;function $c(){return null===mc&&new fc,mc}function yc(t,e,n){Ws.call(this),this.step=n,this.finalElement_0=0|e,this.hasNext_0=this.step>0?t<=e:t>=e,this.next_0=this.hasNext_0?0|t:this.finalElement_0}function gc(t,e,n){Zs.call(this),this.step=n,this.finalElement_0=e,this.hasNext_0=this.step>0?t<=e:t>=e,this.next_0=this.hasNext_0?t:this.finalElement_0}function vc(t,e,n){Js.call(this),this.step=n,this.finalElement_0=e,this.hasNext_0=this.step.toNumber()>0?t.compareTo_11rb$(e)<=0:t.compareTo_11rb$(e)>=0,this.next_0=this.hasNext_0?t:this.finalElement_0}function bc(t,e,n){if(kc(),0===n)throw sn("Step must be non-zero.");if(-2147483648===n)throw sn("Step must be greater than Int.MIN_VALUE to avoid overflow on negation.");this.first=t,this.last=_(Mu(0|t,0|e,n)),this.step=n}function wc(){xc=this}dc.$metadata$={kind:o,simpleName:"LongRange",interfaces:[zc,Lc,Oc]},yc.prototype.hasNext=function(){return this.hasNext_0},yc.prototype.nextChar=function(){var t=this.next_0;if(t===this.finalElement_0){if(!this.hasNext_0)throw yn();this.hasNext_0=!1}else this.next_0=this.next_0+this.step|0;return _(t)},yc.$metadata$={kind:o,simpleName:"CharProgressionIterator",interfaces:[Ws]},gc.prototype.hasNext=function(){return this.hasNext_0},gc.prototype.nextInt=function(){var t=this.next_0;if(t===this.finalElement_0){if(!this.hasNext_0)throw yn();this.hasNext_0=!1}else this.next_0=this.next_0+this.step|0;return t},gc.$metadata$={kind:o,simpleName:"IntProgressionIterator",interfaces:[Zs]},vc.prototype.hasNext=function(){return this.hasNext_0},vc.prototype.nextLong=function(){var t=this.next_0;if(s(t,this.finalElement_0)){if(!this.hasNext_0)throw yn();this.hasNext_0=!1}else this.next_0=this.next_0.add(this.step);return t},vc.$metadata$={kind:o,simpleName:"LongProgressionIterator",interfaces:[Js]},bc.prototype.iterator=function(){return new yc(this.first,this.last,this.step)},bc.prototype.isEmpty=function(){return this.step>0?this.first>this.last:this.first0?String.fromCharCode(this.first)+".."+String.fromCharCode(this.last)+" step "+this.step:String.fromCharCode(this.first)+" downTo "+String.fromCharCode(this.last)+" step "+(0|-this.step)},wc.prototype.fromClosedRange_ayra44$=function(t,e,n){return new bc(t,e,n)},wc.$metadata$={kind:x,simpleName:"Companion",interfaces:[]};var xc=null;function kc(){return null===xc&&new wc,xc}function Cc(t,e,n){if(Tc(),0===n)throw sn("Step must be non-zero.");if(-2147483648===n)throw sn("Step must be greater than Int.MIN_VALUE to avoid overflow on negation.");this.first=t,this.last=Mu(t,e,n),this.step=n}function Ec(){Sc=this}bc.$metadata$={kind:o,simpleName:"CharProgression",interfaces:[se]},Cc.prototype.iterator=function(){return new gc(this.first,this.last,this.step)},Cc.prototype.isEmpty=function(){return this.step>0?this.first>this.last:this.first0?this.first.toString()+".."+this.last+" step "+this.step:this.first.toString()+" downTo "+this.last+" step "+(0|-this.step)},Ec.prototype.fromClosedRange_qt1dr2$=function(t,e,n){return new Cc(t,e,n)},Ec.$metadata$={kind:x,simpleName:"Companion",interfaces:[]};var Sc=null;function Tc(){return null===Sc&&new Ec,Sc}function Oc(t,e,n){if(jc(),s(n,p))throw sn("Step must be non-zero.");if(s(n,$))throw sn("Step must be greater than Long.MIN_VALUE to avoid overflow on negation.");this.first=t,this.last=Bu(t,e,n),this.step=n}function Nc(){Rc=this}Cc.$metadata$={kind:o,simpleName:"IntProgression",interfaces:[se]},Oc.prototype.iterator=function(){return new vc(this.first,this.last,this.step)},Oc.prototype.isEmpty=function(){return this.step.toNumber()>0?this.first.compareTo_11rb$(this.last)>0:this.first.compareTo_11rb$(this.last)<0},Oc.prototype.equals=function(e){return t.isType(e,Oc)&&(this.isEmpty()&&e.isEmpty()||s(this.first,e.first)&&s(this.last,e.last)&&s(this.step,e.step))},Oc.prototype.hashCode=function(){return this.isEmpty()?-1:t.Long.fromInt(31).multiply(t.Long.fromInt(31).multiply(this.first.xor(this.first.shiftRightUnsigned(32))).add(this.last.xor(this.last.shiftRightUnsigned(32)))).add(this.step.xor(this.step.shiftRightUnsigned(32))).toInt()},Oc.prototype.toString=function(){return this.step.toNumber()>0?this.first.toString()+".."+this.last.toString()+" step "+this.step.toString():this.first.toString()+" downTo "+this.last.toString()+" step "+this.step.unaryMinus().toString()},Nc.prototype.fromClosedRange_b9bd0d$=function(t,e,n){return new Oc(t,e,n)},Nc.$metadata$={kind:x,simpleName:"Companion",interfaces:[]};var Pc,Ic,Ac,Rc=null;function jc(){return null===Rc&&new Nc,Rc}function Lc(){}function zc(){}function Dc(t,e){this.start_p1gsmm$_0=t,this.endInclusive_jj4lf7$_0=e}function Mc(t,e){this.start_ndr8iz$_0=t,this.endExclusive_cyyf3u$_0=e}function Bc(){}function Fc(t,e){this._start_0=t,this._endInclusive_0=e}function Uc(){}function qc(e,n,i){null!=i?e.append_gw00v9$(i(n)):null==n||t.isCharSequence(n)?e.append_gw00v9$(n):t.isChar(n)?e.append_s8itvh$(u(n)):e.append_gw00v9$(g(n))}function Hc(t,e,n){if(void 0===n&&(n=!1),t===e)return!0;if(!n)return!1;var i=Sr(t),o=Sr(e),r=i===o;return r||(r=String.fromCharCode(i).toLowerCase().charCodeAt(0)===String.fromCharCode(o).toLowerCase().charCodeAt(0)),r}function Gc(e,n,i){if(void 0===n&&(n=""),void 0===i&&(i="|"),fa(i))throw sn("marginPrefix must be non-blank string.".toString());var o,r,a,s,c=Op(e),p=(e.length,t.imul(n.length,c.size),0===(a=n).length?Kc:(s=a,function(t){return s+t})),h=hs(c),_=yi(),d=0;for(o=c.iterator();o.hasNext();){var f,m,$,y,g=o.next(),v=ti((d=(r=d)+1|0,r));if(0!==v&&v!==h||!fa(g)){var b;t:do{var w,x,k,C;x=(w=rp(g)).first,k=w.last,C=w.step;for(var E=x;E<=k;E+=C)if(!Nr(u(l(g.charCodeAt(E))))){b=E;break t}b=-1}while(0);var S=b;y=null!=($=null!=(m=-1===S?null:_a(g,i,S)?g.substring(S+i.length|0):null)?p(m):null)?$:g}else y=null;null!=(f=y)&&_.add_11rb$(f)}return Rt(_,kr(),"\n").toString()}function Kc(t){return t}function Vc(t){return Yc(t,10)}function Yc(e,n){Ar(n);var i,o,r,a=e.length;if(0===a)return null;var s=e.charCodeAt(0);if(s<48){if(1===a)return null;if(i=1,45===s)o=!0,r=-2147483648;else{if(43!==s)return null;o=!1,r=-2147483647}}else i=0,o=!1,r=-2147483647;for(var l=-59652323,u=l,c=0,p=i;p(t.length-o|0)||i>(n.length-o|0))return!1;for(var a=0;a0&&Hc(t.charCodeAt(0),e,n)}function pp(t,e,n){return void 0===n&&(n=!1),t.length>0&&Hc(t.charCodeAt(ap(t)),e,n)}function hp(t,e,n){return void 0===n&&(n=!1),n||"string"!=typeof t||"string"!=typeof e?up(t,0,e,0,e.length,n):ha(t,e)}function _p(t,e,n){return void 0===n&&(n=!1),n||"string"!=typeof t||"string"!=typeof e?up(t,t.length-e.length|0,e,0,e.length,n):da(t,e)}function dp(t,e,n,i){var o,r;if(void 0===n&&(n=0),void 0===i&&(i=!1),!i&&1===e.length&&"string"==typeof t){var a=X(e);return t.indexOf(String.fromCharCode(a),n)}o=Bt(n,0),r=ap(t);for(var s=o;s<=r;s++){var c,p=t.charCodeAt(s);t:do{var h;for(h=0;h!==e.length;++h){var _=u(e[h]);if(Hc(u(l(_)),p,i)){c=!0;break t}}c=!1}while(0);if(c)return s}return-1}function fp(t,e,n,i,o,r){var a,s;void 0===r&&(r=!1);var l=r?zt(Ft(n,ap(t)),Bt(i,0)):new cc(Bt(n,0),Ft(i,t.length));if("string"==typeof t&&"string"==typeof e)for(a=l.iterator();a.hasNext();){var u=a.next();if(ma(e,0,t,u,e.length,o))return u}else for(s=l.iterator();s.hasNext();){var c=s.next();if(up(e,0,t,c,e.length,o))return c}return-1}function mp(e,n,i,o){return void 0===i&&(i=0),void 0===o&&(o=!1),o||"string"!=typeof e?dp(e,t.charArrayOf(n),i,o):e.indexOf(String.fromCharCode(n),i)}function $p(t,e,n,i){return void 0===n&&(n=0),void 0===i&&(i=!1),i||"string"!=typeof t?fp(t,e,n,t.length,i):t.indexOf(e,n)}function yp(t,e,n,i){return void 0===n&&(n=ap(t)),void 0===i&&(i=!1),i||"string"!=typeof t?fp(t,e,n,0,i,!0):t.lastIndexOf(e,n)}function gp(t,e,n){return void 0===n&&(n=!1),mp(t,e,void 0,n)>=0}function vp(t,e,n,i){this.input_0=t,this.startIndex_0=e,this.limit_0=n,this.getNextMatch_0=i}function bp(t){this.this$DelimitedRangesSequence=t,this.nextState=-1,this.currentStartIndex=Ut(t.startIndex_0,0,t.input_0.length),this.nextSearchIndex=this.currentStartIndex,this.nextItem=null,this.counter=0}function wp(t,e,n,i,o){return void 0===n&&(n=0),void 0===i&&(i=!1),void 0===o&&(o=0),Cp(o),new vp(t,n,o,(r=e,a=i,function(t,e){var n=dp(t,r,e,a);return n<0?null:th(n,1)}));var r,a}function xp(t,e){return function(n,i){var o;return null!=(o=function(t,e,n,i,o){var r,a;if(!i&&1===e.size){var s=vt(e),l=o?yp(t,s,n):$p(t,s,n);return l<0?null:th(l,s)}var u=o?zt(Ft(n,ap(t)),0):new cc(Bt(n,0),t.length);if("string"==typeof t)for(r=u.iterator();r.hasNext();){var c,p=r.next();t:do{var h;for(h=e.iterator();h.hasNext();){var _=h.next();if(ma(_,0,t,p,_.length,i)){c=_;break t}}c=null}while(0);if(null!=c)return th(p,c)}else for(a=u.iterator();a.hasNext();){var d,f=a.next();t:do{var m;for(m=e.iterator();m.hasNext();){var $=m.next();if(up($,0,t,f,$.length,i)){d=$;break t}}d=null}while(0);if(null!=d)return th(f,d)}return null}(n,t,i,e,!1))?th(o.first,o.second.length):null}}function kp(t,e,n,i,o){return void 0===n&&(n=0),void 0===i&&(i=!1),void 0===o&&(o=0),Cp(o),new vp(t,n,o,xp(Sn(e),i))}function Cp(t){if(!(t>=0))throw sn(("Limit must be non-negative, but was "+t).toString())}function Ep(t,e,n,i){return void 0===n&&(n=!1),void 0===i&&(i=0),Qt(kp(t,e,void 0,n,i),(o=t,function(t){return lp(o,t)}));var o}function Sp(e,n,i,o){Cp(o);var r=0,a=$p(e,n,r,i);if(-1===a||1===o)return Vn(e.toString());var s=o>0,l=gi(s&&Ft(o,10));do{if(l.add_11rb$(t.subSequence(e,r,a).toString()),r=a+n.length|0,s&&l.size===(o-1|0))break;a=$p(e,n,r,i)}while(-1!==a);return l.add_11rb$(t.subSequence(e,r,e.length).toString()),l}function Tp(t){return Ep(t,["\r\n","\n","\r"])}function Op(t){return Zt(Tp(t))}function Np(){}function Pp(){}function Ip(){}function Ap(t){this.match=t}function Rp(){}function jp(t,e){k.call(this),this.name$=t,this.ordinal$=e}function Lp(){Lp=function(){},Pc=new jp("SYNCHRONIZED",0),Ic=new jp("PUBLICATION",1),Ac=new jp("NONE",2)}function zp(){return Lp(),Pc}function Dp(){return Lp(),Ic}function Mp(){return Lp(),Ac}function Bp(){Fp=this}Oc.$metadata$={kind:o,simpleName:"LongProgression",interfaces:[se]},Lc.prototype.contains_mef7kx$=function(e){return t.compareTo(e,this.start)>=0&&t.compareTo(e,this.endInclusive)<=0},Lc.prototype.isEmpty=function(){return t.compareTo(this.start,this.endInclusive)>0},Lc.$metadata$={kind:w,simpleName:"ClosedRange",interfaces:[]},zc.prototype.contains_mef7kx$=function(e){return t.compareTo(e,this.start)>=0&&t.compareTo(e,this.endExclusive)<0},zc.prototype.isEmpty=function(){return t.compareTo(this.start,this.endExclusive)>=0},zc.$metadata$={kind:w,simpleName:"OpenEndRange",interfaces:[]},Bc.prototype.contains_mef7kx$=function(t){return this.lessThanOrEquals_n65qkk$(this.start,t)&&this.lessThanOrEquals_n65qkk$(t,this.endInclusive)},Bc.prototype.isEmpty=function(){return!this.lessThanOrEquals_n65qkk$(this.start,this.endInclusive)},Bc.$metadata$={kind:w,simpleName:"ClosedFloatingPointRange",interfaces:[Lc]},Object.defineProperty(Fc.prototype,"start",{configurable:!0,get:function(){return this._start_0}}),Object.defineProperty(Fc.prototype,"endInclusive",{configurable:!0,get:function(){return this._endInclusive_0}}),Fc.prototype.lessThanOrEquals_n65qkk$=function(t,e){return t<=e},Fc.prototype.contains_mef7kx$=function(t){return t>=this._start_0&&t<=this._endInclusive_0},Fc.prototype.isEmpty=function(){return!(this._start_0<=this._endInclusive_0)},Fc.prototype.equals=function(e){return t.isType(e,Fc)&&(this.isEmpty()&&e.isEmpty()||this._start_0===e._start_0&&this._endInclusive_0===e._endInclusive_0)},Fc.prototype.hashCode=function(){return this.isEmpty()?-1:(31*P(this._start_0)|0)+P(this._endInclusive_0)|0},Fc.prototype.toString=function(){return this._start_0.toString()+".."+this._endInclusive_0},Fc.$metadata$={kind:o,simpleName:"ClosedDoubleRange",interfaces:[Bc]},Uc.$metadata$={kind:w,simpleName:"KClassifier",interfaces:[]},ip.prototype.nextChar=function(){var t,e;return t=this.index_0,this.index_0=t+1|0,e=t,this.this$iterator.charCodeAt(e)},ip.prototype.hasNext=function(){return this.index_00&&(this.counter=this.counter+1|0,this.counter>=this.this$DelimitedRangesSequence.limit_0)||this.nextSearchIndex>this.this$DelimitedRangesSequence.input_0.length)this.nextItem=new cc(this.currentStartIndex,ap(this.this$DelimitedRangesSequence.input_0)),this.nextSearchIndex=-1;else{var t=this.this$DelimitedRangesSequence.getNextMatch_0(this.this$DelimitedRangesSequence.input_0,this.nextSearchIndex);if(null==t)this.nextItem=new cc(this.currentStartIndex,ap(this.this$DelimitedRangesSequence.input_0)),this.nextSearchIndex=-1;else{var e=t.component1(),n=t.component2();this.nextItem=Mt(this.currentStartIndex,e),this.currentStartIndex=e+n|0,this.nextSearchIndex=this.currentStartIndex+(0===n?1:0)|0}}this.nextState=1}},bp.prototype.next=function(){var e;if(-1===this.nextState&&this.calcNext_0(),0===this.nextState)throw yn();var n=t.isType(e=this.nextItem,cc)?e:yo();return this.nextItem=null,this.nextState=-1,n},bp.prototype.hasNext=function(){return-1===this.nextState&&this.calcNext_0(),1===this.nextState},bp.$metadata$={kind:o,interfaces:[ge]},vp.prototype.iterator=function(){return new bp(this)},vp.$metadata$={kind:o,simpleName:"DelimitedRangesSequence",interfaces:[il]},Np.$metadata$={kind:w,simpleName:"MatchGroupCollection",interfaces:[ue]},Pp.$metadata$={kind:w,simpleName:"MatchNamedGroupCollection",interfaces:[Np]},Object.defineProperty(Ip.prototype,"destructured",{configurable:!0,get:function(){return new Ap(this)}}),Ap.prototype.component1=r("kotlin.kotlin.text.MatchResult.Destructured.component1",(function(){return this.match.groupValues.get_za3lpa$(1)})),Ap.prototype.component2=r("kotlin.kotlin.text.MatchResult.Destructured.component2",(function(){return this.match.groupValues.get_za3lpa$(2)})),Ap.prototype.component3=r("kotlin.kotlin.text.MatchResult.Destructured.component3",(function(){return this.match.groupValues.get_za3lpa$(3)})),Ap.prototype.component4=r("kotlin.kotlin.text.MatchResult.Destructured.component4",(function(){return this.match.groupValues.get_za3lpa$(4)})),Ap.prototype.component5=r("kotlin.kotlin.text.MatchResult.Destructured.component5",(function(){return this.match.groupValues.get_za3lpa$(5)})),Ap.prototype.component6=r("kotlin.kotlin.text.MatchResult.Destructured.component6",(function(){return this.match.groupValues.get_za3lpa$(6)})),Ap.prototype.component7=r("kotlin.kotlin.text.MatchResult.Destructured.component7",(function(){return this.match.groupValues.get_za3lpa$(7)})),Ap.prototype.component8=r("kotlin.kotlin.text.MatchResult.Destructured.component8",(function(){return this.match.groupValues.get_za3lpa$(8)})),Ap.prototype.component9=r("kotlin.kotlin.text.MatchResult.Destructured.component9",(function(){return this.match.groupValues.get_za3lpa$(9)})),Ap.prototype.component10=r("kotlin.kotlin.text.MatchResult.Destructured.component10",(function(){return this.match.groupValues.get_za3lpa$(10)})),Ap.prototype.toList=function(){return this.match.groupValues.subList_vux9f0$(1,this.match.groupValues.size)},Ap.$metadata$={kind:o,simpleName:"Destructured",interfaces:[]},Ip.$metadata$={kind:w,simpleName:"MatchResult",interfaces:[]},Rp.$metadata$={kind:w,simpleName:"Lazy",interfaces:[]},jp.$metadata$={kind:o,simpleName:"LazyThreadSafetyMode",interfaces:[k]},jp.values=function(){return[zp(),Dp(),Mp()]},jp.valueOf_61zpoe$=function(t){switch(t){case"SYNCHRONIZED":return zp();case"PUBLICATION":return Dp();case"NONE":return Mp();default:go("No enum constant kotlin.LazyThreadSafetyMode."+t)}},Bp.$metadata$={kind:x,simpleName:"UNINITIALIZED_VALUE",interfaces:[]};var Fp=null;function Up(){return null===Fp&&new Bp,Fp}function qp(t){this.initializer_0=t,this._value_0=Up()}function Hp(t){this.value_7taq70$_0=t}function Gp(t){Yp(),this.value=t}function Kp(){Vp=this}Object.defineProperty(qp.prototype,"value",{configurable:!0,get:function(){var e;return this._value_0===Up()&&(this._value_0=E(this.initializer_0)(),this.initializer_0=null),null==(e=this._value_0)||t.isType(e,S)?e:yo()}}),qp.prototype.isInitialized=function(){return this._value_0!==Up()},qp.prototype.toString=function(){return this.isInitialized()?g(this.value):"Lazy value not initialized yet."},qp.prototype.writeReplace_0=function(){return new Hp(this.value)},qp.$metadata$={kind:o,simpleName:"UnsafeLazyImpl",interfaces:[vo,Rp]},Object.defineProperty(Hp.prototype,"value",{get:function(){return this.value_7taq70$_0}}),Hp.prototype.isInitialized=function(){return!0},Hp.prototype.toString=function(){return g(this.value)},Hp.$metadata$={kind:o,simpleName:"InitializedLazyImpl",interfaces:[vo,Rp]},Object.defineProperty(Gp.prototype,"isSuccess",{configurable:!0,get:function(){return!t.isType(this.value,Wp)}}),Object.defineProperty(Gp.prototype,"isFailure",{configurable:!0,get:function(){return t.isType(this.value,Wp)}}),Gp.prototype.getOrNull=r("kotlin.kotlin.Result.getOrNull",a((function(){var e=Object,n=t.throwCCE;return function(){var i;return this.isFailure?null:null==(i=this.value)||t.isType(i,e)?i:n()}}))),Gp.prototype.exceptionOrNull=function(){return t.isType(this.value,Wp)?this.value.exception:null},Gp.prototype.toString=function(){return t.isType(this.value,Wp)?this.value.toString():"Success("+g(this.value)+")"},Kp.prototype.success_mh5how$=r("kotlin.kotlin.Result.Companion.success_mh5how$",a((function(){var t=e.kotlin.Result;return function(e){return new t(e)}}))),Kp.prototype.failure_lsqlk3$=r("kotlin.kotlin.Result.Companion.failure_lsqlk3$",a((function(){var t=e.kotlin.createFailure_tcv7n7$,n=e.kotlin.Result;return function(e){return new n(t(e))}}))),Kp.$metadata$={kind:x,simpleName:"Companion",interfaces:[]};var Vp=null;function Yp(){return null===Vp&&new Kp,Vp}function Wp(t){this.exception=t}function Xp(t){return new Wp(t)}function Zp(e){if(t.isType(e.value,Wp))throw e.value.exception}function Jp(t){void 0===t&&(t="An operation is not implemented."),tn(t,this),this.name="NotImplementedError"}function Qp(t,e){this.first=t,this.second=e}function th(t,e){return new Qp(t,e)}function eh(t){oh(),this.data=t}function nh(){ih=this,this.MIN_VALUE=new eh(0),this.MAX_VALUE=new eh(-1),this.SIZE_BYTES=1,this.SIZE_BITS=8}Wp.prototype.equals=function(e){return t.isType(e,Wp)&&s(this.exception,e.exception)},Wp.prototype.hashCode=function(){return P(this.exception)},Wp.prototype.toString=function(){return"Failure("+this.exception+")"},Wp.$metadata$={kind:o,simpleName:"Failure",interfaces:[vo]},Gp.$metadata$={kind:o,simpleName:"Result",interfaces:[vo]},Gp.prototype.unbox=function(){return this.value},Gp.prototype.hashCode=function(){var e=0;return 31*e+t.hashCode(this.value)|0},Gp.prototype.equals=function(e){return this===e||null!==e&&"object"==typeof e&&Object.getPrototypeOf(this)===Object.getPrototypeOf(e)&&t.equals(this.value,e.value)},Jp.$metadata$={kind:o,simpleName:"NotImplementedError",interfaces:[Qe]},Qp.prototype.toString=function(){return"("+this.first+", "+this.second+")"},Qp.$metadata$={kind:o,simpleName:"Pair",interfaces:[vo]},Qp.prototype.component1=function(){return this.first},Qp.prototype.component2=function(){return this.second},Qp.prototype.copy_xwzc9p$=function(t,e){return new Qp(void 0===t?this.first:t,void 0===e?this.second:e)},Qp.prototype.hashCode=function(){var e=0;return 31*(e=31*e+t.hashCode(this.first)|0)+t.hashCode(this.second)|0},Qp.prototype.equals=function(e){return this===e||null!==e&&"object"==typeof e&&Object.getPrototypeOf(this)===Object.getPrototypeOf(e)&&t.equals(this.first,e.first)&&t.equals(this.second,e.second)},nh.$metadata$={kind:x,simpleName:"Companion",interfaces:[]};var ih=null;function oh(){return null===ih&&new nh,ih}function rh(t){lh(),this.data=t}function ah(){sh=this,this.MIN_VALUE=new rh(0),this.MAX_VALUE=new rh(-1),this.SIZE_BYTES=4,this.SIZE_BITS=32}eh.prototype.compareTo_11rb$=r("kotlin.kotlin.UByte.compareTo_11rb$",(function(e){return t.primitiveCompareTo(255&this.data,255&e.data)})),eh.prototype.compareTo_6hrhkk$=r("kotlin.kotlin.UByte.compareTo_6hrhkk$",(function(e){return t.primitiveCompareTo(255&this.data,65535&e.data)})),eh.prototype.compareTo_s87ys9$=r("kotlin.kotlin.UByte.compareTo_s87ys9$",a((function(){var t=e.kotlin.UInt,n=e.kotlin.uintCompare_vux9f0$;return function(e){return n(new t(255&this.data).data,e.data)}}))),eh.prototype.compareTo_mpgczg$=r("kotlin.kotlin.UByte.compareTo_mpgczg$",a((function(){var n=t.Long.fromInt(255),i=e.kotlin.ULong,o=e.kotlin.ulongCompare_3pjtqy$;return function(e){return o(new i(t.Long.fromInt(this.data).and(n)).data,e.data)}}))),eh.prototype.plus_mpmjao$=r("kotlin.kotlin.UByte.plus_mpmjao$",a((function(){var t=e.kotlin.UInt;return function(e){return new t(new t(255&this.data).data+new t(255&e.data).data|0)}}))),eh.prototype.plus_6hrhkk$=r("kotlin.kotlin.UByte.plus_6hrhkk$",a((function(){var t=e.kotlin.UInt;return function(e){return new t(new t(255&this.data).data+new t(65535&e.data).data|0)}}))),eh.prototype.plus_s87ys9$=r("kotlin.kotlin.UByte.plus_s87ys9$",a((function(){var t=e.kotlin.UInt;return function(e){return new t(new t(255&this.data).data+e.data|0)}}))),eh.prototype.plus_mpgczg$=r("kotlin.kotlin.UByte.plus_mpgczg$",a((function(){var n=t.Long.fromInt(255),i=e.kotlin.ULong;return function(e){return new i(new i(t.Long.fromInt(this.data).and(n)).data.add(e.data))}}))),eh.prototype.minus_mpmjao$=r("kotlin.kotlin.UByte.minus_mpmjao$",a((function(){var t=e.kotlin.UInt;return function(e){return new t(new t(255&this.data).data-new t(255&e.data).data|0)}}))),eh.prototype.minus_6hrhkk$=r("kotlin.kotlin.UByte.minus_6hrhkk$",a((function(){var t=e.kotlin.UInt;return function(e){return new t(new t(255&this.data).data-new t(65535&e.data).data|0)}}))),eh.prototype.minus_s87ys9$=r("kotlin.kotlin.UByte.minus_s87ys9$",a((function(){var t=e.kotlin.UInt;return function(e){return new t(new t(255&this.data).data-e.data|0)}}))),eh.prototype.minus_mpgczg$=r("kotlin.kotlin.UByte.minus_mpgczg$",a((function(){var n=t.Long.fromInt(255),i=e.kotlin.ULong;return function(e){return new i(new i(t.Long.fromInt(this.data).and(n)).data.subtract(e.data))}}))),eh.prototype.times_mpmjao$=r("kotlin.kotlin.UByte.times_mpmjao$",a((function(){var n=e.kotlin.UInt;return function(e){return new n(t.imul(new n(255&this.data).data,new n(255&e.data).data))}}))),eh.prototype.times_6hrhkk$=r("kotlin.kotlin.UByte.times_6hrhkk$",a((function(){var n=e.kotlin.UInt;return function(e){return new n(t.imul(new n(255&this.data).data,new n(65535&e.data).data))}}))),eh.prototype.times_s87ys9$=r("kotlin.kotlin.UByte.times_s87ys9$",a((function(){var n=e.kotlin.UInt;return function(e){return new n(t.imul(new n(255&this.data).data,e.data))}}))),eh.prototype.times_mpgczg$=r("kotlin.kotlin.UByte.times_mpgczg$",a((function(){var n=t.Long.fromInt(255),i=e.kotlin.ULong;return function(e){return new i(new i(t.Long.fromInt(this.data).and(n)).data.multiply(e.data))}}))),eh.prototype.div_mpmjao$=r("kotlin.kotlin.UByte.div_mpmjao$",a((function(){var t=e.kotlin.UInt,n=e.kotlin.uintDivide_oqfnby$;return function(e){return n(new t(255&this.data),new t(255&e.data))}}))),eh.prototype.div_6hrhkk$=r("kotlin.kotlin.UByte.div_6hrhkk$",a((function(){var t=e.kotlin.UInt,n=e.kotlin.uintDivide_oqfnby$;return function(e){return n(new t(255&this.data),new t(65535&e.data))}}))),eh.prototype.div_s87ys9$=r("kotlin.kotlin.UByte.div_s87ys9$",a((function(){var t=e.kotlin.UInt,n=e.kotlin.uintDivide_oqfnby$;return function(e){return n(new t(255&this.data),e)}}))),eh.prototype.div_mpgczg$=r("kotlin.kotlin.UByte.div_mpgczg$",a((function(){var n=t.Long.fromInt(255),i=e.kotlin.ULong,o=e.kotlin.ulongDivide_jpm79w$;return function(e){return o(new i(t.Long.fromInt(this.data).and(n)),e)}}))),eh.prototype.rem_mpmjao$=r("kotlin.kotlin.UByte.rem_mpmjao$",a((function(){var t=e.kotlin.UInt,n=e.kotlin.uintRemainder_oqfnby$;return function(e){return n(new t(255&this.data),new t(255&e.data))}}))),eh.prototype.rem_6hrhkk$=r("kotlin.kotlin.UByte.rem_6hrhkk$",a((function(){var t=e.kotlin.UInt,n=e.kotlin.uintRemainder_oqfnby$;return function(e){return n(new t(255&this.data),new t(65535&e.data))}}))),eh.prototype.rem_s87ys9$=r("kotlin.kotlin.UByte.rem_s87ys9$",a((function(){var t=e.kotlin.UInt,n=e.kotlin.uintRemainder_oqfnby$;return function(e){return n(new t(255&this.data),e)}}))),eh.prototype.rem_mpgczg$=r("kotlin.kotlin.UByte.rem_mpgczg$",a((function(){var n=t.Long.fromInt(255),i=e.kotlin.ULong,o=e.kotlin.ulongRemainder_jpm79w$;return function(e){return o(new i(t.Long.fromInt(this.data).and(n)),e)}}))),eh.prototype.floorDiv_mpmjao$=r("kotlin.kotlin.UByte.floorDiv_mpmjao$",a((function(){var t=e.kotlin.UInt,n=e.kotlin.uintDivide_oqfnby$;return function(e){return n(new t(255&this.data),new t(255&e.data))}}))),eh.prototype.floorDiv_6hrhkk$=r("kotlin.kotlin.UByte.floorDiv_6hrhkk$",a((function(){var t=e.kotlin.UInt,n=e.kotlin.uintDivide_oqfnby$;return function(e){return n(new t(255&this.data),new t(65535&e.data))}}))),eh.prototype.floorDiv_s87ys9$=r("kotlin.kotlin.UByte.floorDiv_s87ys9$",a((function(){var t=e.kotlin.UInt,n=e.kotlin.uintDivide_oqfnby$;return function(e){return n(new t(255&this.data),e)}}))),eh.prototype.floorDiv_mpgczg$=r("kotlin.kotlin.UByte.floorDiv_mpgczg$",a((function(){var n=t.Long.fromInt(255),i=e.kotlin.ULong,o=e.kotlin.ulongDivide_jpm79w$;return function(e){return o(new i(t.Long.fromInt(this.data).and(n)),e)}}))),eh.prototype.mod_mpmjao$=r("kotlin.kotlin.UByte.mod_mpmjao$",a((function(){var n=e.kotlin.UInt,i=e.kotlin.uintRemainder_oqfnby$,o=t.toByte,r=e.kotlin.UByte;return function(t){return new r(o(i(new n(255&this.data),new n(255&t.data)).data))}}))),eh.prototype.mod_6hrhkk$=r("kotlin.kotlin.UByte.mod_6hrhkk$",a((function(){var n=e.kotlin.UInt,i=e.kotlin.uintRemainder_oqfnby$,o=t.toShort,r=e.kotlin.UShort;return function(t){return new r(o(i(new n(255&this.data),new n(65535&t.data)).data))}}))),eh.prototype.mod_s87ys9$=r("kotlin.kotlin.UByte.mod_s87ys9$",a((function(){var t=e.kotlin.UInt,n=e.kotlin.uintRemainder_oqfnby$;return function(e){return n(new t(255&this.data),e)}}))),eh.prototype.mod_mpgczg$=r("kotlin.kotlin.UByte.mod_mpgczg$",a((function(){var n=t.Long.fromInt(255),i=e.kotlin.ULong,o=e.kotlin.ulongRemainder_jpm79w$;return function(e){return o(new i(t.Long.fromInt(this.data).and(n)),e)}}))),eh.prototype.inc=r("kotlin.kotlin.UByte.inc",a((function(){var n=t.toByte,i=e.kotlin.UByte;return function(){return new i(n(this.data+1))}}))),eh.prototype.dec=r("kotlin.kotlin.UByte.dec",a((function(){var n=t.toByte,i=e.kotlin.UByte;return function(){return new i(n(this.data-1))}}))),eh.prototype.rangeTo_mpmjao$=r("kotlin.kotlin.UByte.rangeTo_mpmjao$",a((function(){var t=e.kotlin.ranges.UIntRange,n=e.kotlin.UInt;return function(e){return new t(new n(255&this.data),new n(255&e.data))}}))),eh.prototype.and_mpmjao$=r("kotlin.kotlin.UByte.and_mpmjao$",a((function(){var n=e.kotlin.UByte,i=t.toByte;return function(t){return new n(i(this.data&t.data))}}))),eh.prototype.or_mpmjao$=r("kotlin.kotlin.UByte.or_mpmjao$",a((function(){var n=e.kotlin.UByte,i=t.toByte;return function(t){return new n(i(this.data|t.data))}}))),eh.prototype.xor_mpmjao$=r("kotlin.kotlin.UByte.xor_mpmjao$",a((function(){var n=e.kotlin.UByte,i=t.toByte;return function(t){return new n(i(this.data^t.data))}}))),eh.prototype.inv=r("kotlin.kotlin.UByte.inv",a((function(){var n=e.kotlin.UByte,i=t.toByte;return function(){return new n(i(~this.data))}}))),eh.prototype.toByte=r("kotlin.kotlin.UByte.toByte",(function(){return this.data})),eh.prototype.toShort=r("kotlin.kotlin.UByte.toShort",a((function(){var e=t.toShort;return function(){return e(255&this.data)}}))),eh.prototype.toInt=r("kotlin.kotlin.UByte.toInt",(function(){return 255&this.data})),eh.prototype.toLong=r("kotlin.kotlin.UByte.toLong",a((function(){var e=t.Long.fromInt(255);return function(){return t.Long.fromInt(this.data).and(e)}}))),eh.prototype.toUByte=r("kotlin.kotlin.UByte.toUByte",(function(){return this})),eh.prototype.toUShort=r("kotlin.kotlin.UByte.toUShort",a((function(){var n=e.kotlin.UShort,i=t.toShort;return function(){return new n(i(255&this.data))}}))),eh.prototype.toUInt=r("kotlin.kotlin.UByte.toUInt",a((function(){var t=e.kotlin.UInt;return function(){return new t(255&this.data)}}))),eh.prototype.toULong=r("kotlin.kotlin.UByte.toULong",a((function(){var n=t.Long.fromInt(255),i=e.kotlin.ULong;return function(){return new i(t.Long.fromInt(this.data).and(n))}}))),eh.prototype.toFloat=r("kotlin.kotlin.UByte.toFloat",(function(){return 255&this.data})),eh.prototype.toDouble=r("kotlin.kotlin.UByte.toDouble",(function(){return 255&this.data})),eh.prototype.toString=function(){return(255&this.data).toString()},eh.$metadata$={kind:o,simpleName:"UByte",interfaces:[C]},eh.prototype.unbox=function(){return this.data},eh.prototype.hashCode=function(){var e=0;return 31*e+t.hashCode(this.data)|0},eh.prototype.equals=function(e){return this===e||null!==e&&"object"==typeof e&&Object.getPrototypeOf(this)===Object.getPrototypeOf(e)&&t.equals(this.data,e.data)},ah.$metadata$={kind:x,simpleName:"Companion",interfaces:[]};var sh=null;function lh(){return null===sh&&new ah,sh}function uh(t,e){hh(),_h.call(this,t,e,1)}function ch(){ph=this,this.EMPTY=new uh(lh().MAX_VALUE,lh().MIN_VALUE)}rh.prototype.compareTo_mpmjao$=r("kotlin.kotlin.UInt.compareTo_mpmjao$",a((function(){var t=e.kotlin.UInt,n=e.kotlin.uintCompare_vux9f0$;return function(e){return n(this.data,new t(255&e.data).data)}}))),rh.prototype.compareTo_6hrhkk$=r("kotlin.kotlin.UInt.compareTo_6hrhkk$",a((function(){var t=e.kotlin.UInt,n=e.kotlin.uintCompare_vux9f0$;return function(e){return n(this.data,new t(65535&e.data).data)}}))),rh.prototype.compareTo_11rb$=r("kotlin.kotlin.UInt.compareTo_11rb$",a((function(){var t=e.kotlin.uintCompare_vux9f0$;return function(e){return t(this.data,e.data)}}))),rh.prototype.compareTo_mpgczg$=r("kotlin.kotlin.UInt.compareTo_mpgczg$",a((function(){var n=new t.Long(-1,0),i=e.kotlin.ULong,o=e.kotlin.ulongCompare_3pjtqy$;return function(e){return o(new i(t.Long.fromInt(this.data).and(n)).data,e.data)}}))),rh.prototype.plus_mpmjao$=r("kotlin.kotlin.UInt.plus_mpmjao$",a((function(){var t=e.kotlin.UInt;return function(e){return new t(this.data+new t(255&e.data).data|0)}}))),rh.prototype.plus_6hrhkk$=r("kotlin.kotlin.UInt.plus_6hrhkk$",a((function(){var t=e.kotlin.UInt;return function(e){return new t(this.data+new t(65535&e.data).data|0)}}))),rh.prototype.plus_s87ys9$=r("kotlin.kotlin.UInt.plus_s87ys9$",a((function(){var t=e.kotlin.UInt;return function(e){return new t(this.data+e.data|0)}}))),rh.prototype.plus_mpgczg$=r("kotlin.kotlin.UInt.plus_mpgczg$",a((function(){var n=new t.Long(-1,0),i=e.kotlin.ULong;return function(e){return new i(new i(t.Long.fromInt(this.data).and(n)).data.add(e.data))}}))),rh.prototype.minus_mpmjao$=r("kotlin.kotlin.UInt.minus_mpmjao$",a((function(){var t=e.kotlin.UInt;return function(e){return new t(this.data-new t(255&e.data).data|0)}}))),rh.prototype.minus_6hrhkk$=r("kotlin.kotlin.UInt.minus_6hrhkk$",a((function(){var t=e.kotlin.UInt;return function(e){return new t(this.data-new t(65535&e.data).data|0)}}))),rh.prototype.minus_s87ys9$=r("kotlin.kotlin.UInt.minus_s87ys9$",a((function(){var t=e.kotlin.UInt;return function(e){return new t(this.data-e.data|0)}}))),rh.prototype.minus_mpgczg$=r("kotlin.kotlin.UInt.minus_mpgczg$",a((function(){var n=new t.Long(-1,0),i=e.kotlin.ULong;return function(e){return new i(new i(t.Long.fromInt(this.data).and(n)).data.subtract(e.data))}}))),rh.prototype.times_mpmjao$=r("kotlin.kotlin.UInt.times_mpmjao$",a((function(){var n=e.kotlin.UInt;return function(e){return new n(t.imul(this.data,new n(255&e.data).data))}}))),rh.prototype.times_6hrhkk$=r("kotlin.kotlin.UInt.times_6hrhkk$",a((function(){var n=e.kotlin.UInt;return function(e){return new n(t.imul(this.data,new n(65535&e.data).data))}}))),rh.prototype.times_s87ys9$=r("kotlin.kotlin.UInt.times_s87ys9$",a((function(){var n=e.kotlin.UInt;return function(e){return new n(t.imul(this.data,e.data))}}))),rh.prototype.times_mpgczg$=r("kotlin.kotlin.UInt.times_mpgczg$",a((function(){var n=new t.Long(-1,0),i=e.kotlin.ULong;return function(e){return new i(new i(t.Long.fromInt(this.data).and(n)).data.multiply(e.data))}}))),rh.prototype.div_mpmjao$=r("kotlin.kotlin.UInt.div_mpmjao$",a((function(){var t=e.kotlin.UInt,n=e.kotlin.uintDivide_oqfnby$;return function(e){return n(this,new t(255&e.data))}}))),rh.prototype.div_6hrhkk$=r("kotlin.kotlin.UInt.div_6hrhkk$",a((function(){var t=e.kotlin.UInt,n=e.kotlin.uintDivide_oqfnby$;return function(e){return n(this,new t(65535&e.data))}}))),rh.prototype.div_s87ys9$=r("kotlin.kotlin.UInt.div_s87ys9$",a((function(){var t=e.kotlin.uintDivide_oqfnby$;return function(e){return t(this,e)}}))),rh.prototype.div_mpgczg$=r("kotlin.kotlin.UInt.div_mpgczg$",a((function(){var n=new t.Long(-1,0),i=e.kotlin.ULong,o=e.kotlin.ulongDivide_jpm79w$;return function(e){return o(new i(t.Long.fromInt(this.data).and(n)),e)}}))),rh.prototype.rem_mpmjao$=r("kotlin.kotlin.UInt.rem_mpmjao$",a((function(){var t=e.kotlin.UInt,n=e.kotlin.uintRemainder_oqfnby$;return function(e){return n(this,new t(255&e.data))}}))),rh.prototype.rem_6hrhkk$=r("kotlin.kotlin.UInt.rem_6hrhkk$",a((function(){var t=e.kotlin.UInt,n=e.kotlin.uintRemainder_oqfnby$;return function(e){return n(this,new t(65535&e.data))}}))),rh.prototype.rem_s87ys9$=r("kotlin.kotlin.UInt.rem_s87ys9$",a((function(){var t=e.kotlin.uintRemainder_oqfnby$;return function(e){return t(this,e)}}))),rh.prototype.rem_mpgczg$=r("kotlin.kotlin.UInt.rem_mpgczg$",a((function(){var n=new t.Long(-1,0),i=e.kotlin.ULong,o=e.kotlin.ulongRemainder_jpm79w$;return function(e){return o(new i(t.Long.fromInt(this.data).and(n)),e)}}))),rh.prototype.floorDiv_mpmjao$=r("kotlin.kotlin.UInt.floorDiv_mpmjao$",a((function(){var t=e.kotlin.UInt,n=e.kotlin.uintDivide_oqfnby$;return function(e){return n(this,new t(255&e.data))}}))),rh.prototype.floorDiv_6hrhkk$=r("kotlin.kotlin.UInt.floorDiv_6hrhkk$",a((function(){var t=e.kotlin.UInt,n=e.kotlin.uintDivide_oqfnby$;return function(e){return n(this,new t(65535&e.data))}}))),rh.prototype.floorDiv_s87ys9$=r("kotlin.kotlin.UInt.floorDiv_s87ys9$",a((function(){var t=e.kotlin.uintDivide_oqfnby$;return function(e){return t(this,e)}}))),rh.prototype.floorDiv_mpgczg$=r("kotlin.kotlin.UInt.floorDiv_mpgczg$",a((function(){var n=new t.Long(-1,0),i=e.kotlin.ULong,o=e.kotlin.ulongDivide_jpm79w$;return function(e){return o(new i(t.Long.fromInt(this.data).and(n)),e)}}))),rh.prototype.mod_mpmjao$=r("kotlin.kotlin.UInt.mod_mpmjao$",a((function(){var n=e.kotlin.UInt,i=e.kotlin.uintRemainder_oqfnby$,o=t.toByte,r=e.kotlin.UByte;return function(t){return new r(o(i(this,new n(255&t.data)).data))}}))),rh.prototype.mod_6hrhkk$=r("kotlin.kotlin.UInt.mod_6hrhkk$",a((function(){var n=e.kotlin.UInt,i=e.kotlin.uintRemainder_oqfnby$,o=t.toShort,r=e.kotlin.UShort;return function(t){return new r(o(i(this,new n(65535&t.data)).data))}}))),rh.prototype.mod_s87ys9$=r("kotlin.kotlin.UInt.mod_s87ys9$",a((function(){var t=e.kotlin.uintRemainder_oqfnby$;return function(e){return t(this,e)}}))),rh.prototype.mod_mpgczg$=r("kotlin.kotlin.UInt.mod_mpgczg$",a((function(){var n=new t.Long(-1,0),i=e.kotlin.ULong,o=e.kotlin.ulongRemainder_jpm79w$;return function(e){return o(new i(t.Long.fromInt(this.data).and(n)),e)}}))),rh.prototype.inc=r("kotlin.kotlin.UInt.inc",a((function(){var t=e.kotlin.UInt;return function(){return new t(this.data+1|0)}}))),rh.prototype.dec=r("kotlin.kotlin.UInt.dec",a((function(){var t=e.kotlin.UInt;return function(){return new t(this.data-1|0)}}))),rh.prototype.rangeTo_s87ys9$=r("kotlin.kotlin.UInt.rangeTo_s87ys9$",a((function(){var t=e.kotlin.ranges.UIntRange;return function(e){return new t(this,e)}}))),rh.prototype.shl_za3lpa$=r("kotlin.kotlin.UInt.shl_za3lpa$",a((function(){var t=e.kotlin.UInt;return function(e){return new t(this.data<>>e)}}))),rh.prototype.and_s87ys9$=r("kotlin.kotlin.UInt.and_s87ys9$",a((function(){var t=e.kotlin.UInt;return function(e){return new t(this.data&e.data)}}))),rh.prototype.or_s87ys9$=r("kotlin.kotlin.UInt.or_s87ys9$",a((function(){var t=e.kotlin.UInt;return function(e){return new t(this.data|e.data)}}))),rh.prototype.xor_s87ys9$=r("kotlin.kotlin.UInt.xor_s87ys9$",a((function(){var t=e.kotlin.UInt;return function(e){return new t(this.data^e.data)}}))),rh.prototype.inv=r("kotlin.kotlin.UInt.inv",a((function(){var t=e.kotlin.UInt;return function(){return new t(~this.data)}}))),rh.prototype.toByte=r("kotlin.kotlin.UInt.toByte",a((function(){var e=t.toByte;return function(){return e(this.data)}}))),rh.prototype.toShort=r("kotlin.kotlin.UInt.toShort",a((function(){var e=t.toShort;return function(){return e(this.data)}}))),rh.prototype.toInt=r("kotlin.kotlin.UInt.toInt",(function(){return this.data})),rh.prototype.toLong=r("kotlin.kotlin.UInt.toLong",a((function(){var e=new t.Long(-1,0);return function(){return t.Long.fromInt(this.data).and(e)}}))),rh.prototype.toUByte=r("kotlin.kotlin.UInt.toUByte",a((function(){var n=t.toByte,i=e.kotlin.UByte;return function(){return new i(n(this.data))}}))),rh.prototype.toUShort=r("kotlin.kotlin.UInt.toUShort",a((function(){var n=t.toShort,i=e.kotlin.UShort;return function(){return new i(n(this.data))}}))),rh.prototype.toUInt=r("kotlin.kotlin.UInt.toUInt",(function(){return this})),rh.prototype.toULong=r("kotlin.kotlin.UInt.toULong",a((function(){var n=new t.Long(-1,0),i=e.kotlin.ULong;return function(){return new i(t.Long.fromInt(this.data).and(n))}}))),rh.prototype.toFloat=r("kotlin.kotlin.UInt.toFloat",a((function(){var t=e.kotlin.uintToDouble_za3lpa$;return function(){return t(this.data)}}))),rh.prototype.toDouble=r("kotlin.kotlin.UInt.toDouble",a((function(){var t=e.kotlin.uintToDouble_za3lpa$;return function(){return t(this.data)}}))),rh.prototype.toString=function(){return t.Long.fromInt(this.data).and(b).toString()},rh.$metadata$={kind:o,simpleName:"UInt",interfaces:[C]},rh.prototype.unbox=function(){return this.data},rh.prototype.hashCode=function(){var e=0;return 31*e+t.hashCode(this.data)|0},rh.prototype.equals=function(e){return this===e||null!==e&&"object"==typeof e&&Object.getPrototypeOf(this)===Object.getPrototypeOf(e)&&t.equals(this.data,e.data)},Object.defineProperty(uh.prototype,"start",{configurable:!0,get:function(){return this.first}}),Object.defineProperty(uh.prototype,"endInclusive",{configurable:!0,get:function(){return this.last}}),Object.defineProperty(uh.prototype,"endExclusive",{configurable:!0,get:function(){var t;if(null!=(t=this.last)&&t.equals(lh().MAX_VALUE))throw un("Cannot return the exclusive upper bound of a range that includes MAX_VALUE.".toString());return new rh(this.last.data+new rh(1).data|0)}}),uh.prototype.contains_mef7kx$=function(t){var e=Mh(this.first.data,t.data)<=0;return e&&(e=Mh(t.data,this.last.data)<=0),e},uh.prototype.isEmpty=function(){return Mh(this.first.data,this.last.data)>0},uh.prototype.equals=function(e){var n,i;return t.isType(e,uh)&&(this.isEmpty()&&e.isEmpty()||(null!=(n=this.first)?n.equals(e.first):null)&&(null!=(i=this.last)?i.equals(e.last):null))},uh.prototype.hashCode=function(){return this.isEmpty()?-1:(31*this.first.data|0)+this.last.data|0},uh.prototype.toString=function(){return this.first.toString()+".."+this.last},ch.$metadata$={kind:x,simpleName:"Companion",interfaces:[]};var ph=null;function hh(){return null===ph&&new ch,ph}function _h(t,e,n){if(mh(),0===n)throw sn("Step must be non-zero.");if(-2147483648===n)throw sn("Step must be greater than Int.MIN_VALUE to avoid overflow on negation.");this.first=t,this.last=Ah(t,e,n),this.step=n}function dh(){fh=this}uh.$metadata$={kind:o,simpleName:"UIntRange",interfaces:[zc,Lc,_h]},_h.prototype.iterator=function(){return new $h(this.first,this.last,this.step)},_h.prototype.isEmpty=function(){return this.step>0?Mh(this.first.data,this.last.data)>0:Mh(this.first.data,this.last.data)<0},_h.prototype.equals=function(e){var n,i;return t.isType(e,_h)&&(this.isEmpty()&&e.isEmpty()||(null!=(n=this.first)?n.equals(e.first):null)&&(null!=(i=this.last)?i.equals(e.last):null)&&this.step===e.step)},_h.prototype.hashCode=function(){return this.isEmpty()?-1:(31*((31*this.first.data|0)+this.last.data|0)|0)+this.step|0},_h.prototype.toString=function(){return this.step>0?this.first.toString()+".."+this.last+" step "+this.step:this.first.toString()+" downTo "+this.last+" step "+(0|-this.step)},dh.prototype.fromClosedRange_fjk8us$=function(t,e,n){return new _h(t,e,n)},dh.$metadata$={kind:x,simpleName:"Companion",interfaces:[]};var fh=null;function mh(){return null===fh&&new dh,fh}function $h(t,e,n){this.finalElement_0=e,this.hasNext_0=n>0?Mh(t.data,e.data)<=0:Mh(t.data,e.data)>=0,this.step_0=new rh(n),this.next_0=this.hasNext_0?t:this.finalElement_0}function yh(t){bh(),this.data=t}function gh(){vh=this,this.MIN_VALUE=new yh(p),this.MAX_VALUE=new yh(d),this.SIZE_BYTES=8,this.SIZE_BITS=64}_h.$metadata$={kind:o,simpleName:"UIntProgression",interfaces:[se]},$h.prototype.hasNext=function(){return this.hasNext_0},$h.prototype.next=function(){var t=this.next_0;if(null!=t&&t.equals(this.finalElement_0)){if(!this.hasNext_0)throw yn();this.hasNext_0=!1}else this.next_0=new rh(this.next_0.data+this.step_0.data|0);return t},$h.$metadata$={kind:o,simpleName:"UIntProgressionIterator",interfaces:[ge]},gh.$metadata$={kind:x,simpleName:"Companion",interfaces:[]};var vh=null;function bh(){return null===vh&&new gh,vh}function wh(t,e){Ch(),Eh.call(this,t,e,M)}function xh(){kh=this,this.EMPTY=new wh(bh().MAX_VALUE,bh().MIN_VALUE)}yh.prototype.compareTo_mpmjao$=r("kotlin.kotlin.ULong.compareTo_mpmjao$",a((function(){var n=t.Long.fromInt(255),i=e.kotlin.ULong,o=e.kotlin.ulongCompare_3pjtqy$;return function(e){return o(this.data,new i(t.Long.fromInt(e.data).and(n)).data)}}))),yh.prototype.compareTo_6hrhkk$=r("kotlin.kotlin.ULong.compareTo_6hrhkk$",a((function(){var n=t.Long.fromInt(65535),i=e.kotlin.ULong,o=e.kotlin.ulongCompare_3pjtqy$;return function(e){return o(this.data,new i(t.Long.fromInt(e.data).and(n)).data)}}))),yh.prototype.compareTo_s87ys9$=r("kotlin.kotlin.ULong.compareTo_s87ys9$",a((function(){var n=new t.Long(-1,0),i=e.kotlin.ULong,o=e.kotlin.ulongCompare_3pjtqy$;return function(e){return o(this.data,new i(t.Long.fromInt(e.data).and(n)).data)}}))),yh.prototype.compareTo_11rb$=r("kotlin.kotlin.ULong.compareTo_11rb$",a((function(){var t=e.kotlin.ulongCompare_3pjtqy$;return function(e){return t(this.data,e.data)}}))),yh.prototype.plus_mpmjao$=r("kotlin.kotlin.ULong.plus_mpmjao$",a((function(){var n=t.Long.fromInt(255),i=e.kotlin.ULong;return function(e){return new i(this.data.add(new i(t.Long.fromInt(e.data).and(n)).data))}}))),yh.prototype.plus_6hrhkk$=r("kotlin.kotlin.ULong.plus_6hrhkk$",a((function(){var n=t.Long.fromInt(65535),i=e.kotlin.ULong;return function(e){return new i(this.data.add(new i(t.Long.fromInt(e.data).and(n)).data))}}))),yh.prototype.plus_s87ys9$=r("kotlin.kotlin.ULong.plus_s87ys9$",a((function(){var n=new t.Long(-1,0),i=e.kotlin.ULong;return function(e){return new i(this.data.add(new i(t.Long.fromInt(e.data).and(n)).data))}}))),yh.prototype.plus_mpgczg$=r("kotlin.kotlin.ULong.plus_mpgczg$",a((function(){var t=e.kotlin.ULong;return function(e){return new t(this.data.add(e.data))}}))),yh.prototype.minus_mpmjao$=r("kotlin.kotlin.ULong.minus_mpmjao$",a((function(){var n=t.Long.fromInt(255),i=e.kotlin.ULong;return function(e){return new i(this.data.subtract(new i(t.Long.fromInt(e.data).and(n)).data))}}))),yh.prototype.minus_6hrhkk$=r("kotlin.kotlin.ULong.minus_6hrhkk$",a((function(){var n=t.Long.fromInt(65535),i=e.kotlin.ULong;return function(e){return new i(this.data.subtract(new i(t.Long.fromInt(e.data).and(n)).data))}}))),yh.prototype.minus_s87ys9$=r("kotlin.kotlin.ULong.minus_s87ys9$",a((function(){var n=new t.Long(-1,0),i=e.kotlin.ULong;return function(e){return new i(this.data.subtract(new i(t.Long.fromInt(e.data).and(n)).data))}}))),yh.prototype.minus_mpgczg$=r("kotlin.kotlin.ULong.minus_mpgczg$",a((function(){var t=e.kotlin.ULong;return function(e){return new t(this.data.subtract(e.data))}}))),yh.prototype.times_mpmjao$=r("kotlin.kotlin.ULong.times_mpmjao$",a((function(){var n=t.Long.fromInt(255),i=e.kotlin.ULong;return function(e){return new i(this.data.multiply(new i(t.Long.fromInt(e.data).and(n)).data))}}))),yh.prototype.times_6hrhkk$=r("kotlin.kotlin.ULong.times_6hrhkk$",a((function(){var n=t.Long.fromInt(65535),i=e.kotlin.ULong;return function(e){return new i(this.data.multiply(new i(t.Long.fromInt(e.data).and(n)).data))}}))),yh.prototype.times_s87ys9$=r("kotlin.kotlin.ULong.times_s87ys9$",a((function(){var n=new t.Long(-1,0),i=e.kotlin.ULong;return function(e){return new i(this.data.multiply(new i(t.Long.fromInt(e.data).and(n)).data))}}))),yh.prototype.times_mpgczg$=r("kotlin.kotlin.ULong.times_mpgczg$",a((function(){var t=e.kotlin.ULong;return function(e){return new t(this.data.multiply(e.data))}}))),yh.prototype.div_mpmjao$=r("kotlin.kotlin.ULong.div_mpmjao$",a((function(){var n=t.Long.fromInt(255),i=e.kotlin.ULong,o=e.kotlin.ulongDivide_jpm79w$;return function(e){return o(this,new i(t.Long.fromInt(e.data).and(n)))}}))),yh.prototype.div_6hrhkk$=r("kotlin.kotlin.ULong.div_6hrhkk$",a((function(){var n=t.Long.fromInt(65535),i=e.kotlin.ULong,o=e.kotlin.ulongDivide_jpm79w$;return function(e){return o(this,new i(t.Long.fromInt(e.data).and(n)))}}))),yh.prototype.div_s87ys9$=r("kotlin.kotlin.ULong.div_s87ys9$",a((function(){var n=new t.Long(-1,0),i=e.kotlin.ULong,o=e.kotlin.ulongDivide_jpm79w$;return function(e){return o(this,new i(t.Long.fromInt(e.data).and(n)))}}))),yh.prototype.div_mpgczg$=r("kotlin.kotlin.ULong.div_mpgczg$",a((function(){var t=e.kotlin.ulongDivide_jpm79w$;return function(e){return t(this,e)}}))),yh.prototype.rem_mpmjao$=r("kotlin.kotlin.ULong.rem_mpmjao$",a((function(){var n=t.Long.fromInt(255),i=e.kotlin.ULong,o=e.kotlin.ulongRemainder_jpm79w$;return function(e){return o(this,new i(t.Long.fromInt(e.data).and(n)))}}))),yh.prototype.rem_6hrhkk$=r("kotlin.kotlin.ULong.rem_6hrhkk$",a((function(){var n=t.Long.fromInt(65535),i=e.kotlin.ULong,o=e.kotlin.ulongRemainder_jpm79w$;return function(e){return o(this,new i(t.Long.fromInt(e.data).and(n)))}}))),yh.prototype.rem_s87ys9$=r("kotlin.kotlin.ULong.rem_s87ys9$",a((function(){var n=new t.Long(-1,0),i=e.kotlin.ULong,o=e.kotlin.ulongRemainder_jpm79w$;return function(e){return o(this,new i(t.Long.fromInt(e.data).and(n)))}}))),yh.prototype.rem_mpgczg$=r("kotlin.kotlin.ULong.rem_mpgczg$",a((function(){var t=e.kotlin.ulongRemainder_jpm79w$;return function(e){return t(this,e)}}))),yh.prototype.floorDiv_mpmjao$=r("kotlin.kotlin.ULong.floorDiv_mpmjao$",a((function(){var n=t.Long.fromInt(255),i=e.kotlin.ULong,o=e.kotlin.ulongDivide_jpm79w$;return function(e){return o(this,new i(t.Long.fromInt(e.data).and(n)))}}))),yh.prototype.floorDiv_6hrhkk$=r("kotlin.kotlin.ULong.floorDiv_6hrhkk$",a((function(){var n=t.Long.fromInt(65535),i=e.kotlin.ULong,o=e.kotlin.ulongDivide_jpm79w$;return function(e){return o(this,new i(t.Long.fromInt(e.data).and(n)))}}))),yh.prototype.floorDiv_s87ys9$=r("kotlin.kotlin.ULong.floorDiv_s87ys9$",a((function(){var n=new t.Long(-1,0),i=e.kotlin.ULong,o=e.kotlin.ulongDivide_jpm79w$;return function(e){return o(this,new i(t.Long.fromInt(e.data).and(n)))}}))),yh.prototype.floorDiv_mpgczg$=r("kotlin.kotlin.ULong.floorDiv_mpgczg$",a((function(){var t=e.kotlin.ulongDivide_jpm79w$;return function(e){return t(this,e)}}))),yh.prototype.mod_mpmjao$=r("kotlin.kotlin.ULong.mod_mpmjao$",a((function(){var n=t.Long.fromInt(255),i=e.kotlin.ULong,o=e.kotlin.ulongRemainder_jpm79w$,r=t.toByte,a=e.kotlin.UByte;return function(e){return new a(r(o(this,new i(t.Long.fromInt(e.data).and(n))).data.toInt()))}}))),yh.prototype.mod_6hrhkk$=r("kotlin.kotlin.ULong.mod_6hrhkk$",a((function(){var n=t.Long.fromInt(65535),i=e.kotlin.ULong,o=e.kotlin.ulongRemainder_jpm79w$,r=t.toShort,a=e.kotlin.UShort;return function(e){return new a(r(o(this,new i(t.Long.fromInt(e.data).and(n))).data.toInt()))}}))),yh.prototype.mod_s87ys9$=r("kotlin.kotlin.ULong.mod_s87ys9$",a((function(){var n=new t.Long(-1,0),i=e.kotlin.ULong,o=e.kotlin.ulongRemainder_jpm79w$,r=e.kotlin.UInt;return function(e){return new r(o(this,new i(t.Long.fromInt(e.data).and(n))).data.toInt())}}))),yh.prototype.mod_mpgczg$=r("kotlin.kotlin.ULong.mod_mpgczg$",a((function(){var t=e.kotlin.ulongRemainder_jpm79w$;return function(e){return t(this,e)}}))),yh.prototype.inc=r("kotlin.kotlin.ULong.inc",a((function(){var t=e.kotlin.ULong;return function(){return new t(this.data.inc())}}))),yh.prototype.dec=r("kotlin.kotlin.ULong.dec",a((function(){var t=e.kotlin.ULong;return function(){return new t(this.data.dec())}}))),yh.prototype.rangeTo_mpgczg$=r("kotlin.kotlin.ULong.rangeTo_mpgczg$",a((function(){var t=e.kotlin.ranges.ULongRange;return function(e){return new t(this,e)}}))),yh.prototype.shl_za3lpa$=r("kotlin.kotlin.ULong.shl_za3lpa$",a((function(){var t=e.kotlin.ULong;return function(e){return new t(this.data.shiftLeft(e))}}))),yh.prototype.shr_za3lpa$=r("kotlin.kotlin.ULong.shr_za3lpa$",a((function(){var t=e.kotlin.ULong;return function(e){return new t(this.data.shiftRightUnsigned(e))}}))),yh.prototype.and_mpgczg$=r("kotlin.kotlin.ULong.and_mpgczg$",a((function(){var t=e.kotlin.ULong;return function(e){return new t(this.data.and(e.data))}}))),yh.prototype.or_mpgczg$=r("kotlin.kotlin.ULong.or_mpgczg$",a((function(){var t=e.kotlin.ULong;return function(e){return new t(this.data.or(e.data))}}))),yh.prototype.xor_mpgczg$=r("kotlin.kotlin.ULong.xor_mpgczg$",a((function(){var t=e.kotlin.ULong;return function(e){return new t(this.data.xor(e.data))}}))),yh.prototype.inv=r("kotlin.kotlin.ULong.inv",a((function(){var t=e.kotlin.ULong;return function(){return new t(this.data.inv())}}))),yh.prototype.toByte=r("kotlin.kotlin.ULong.toByte",a((function(){var e=t.toByte;return function(){return e(this.data.toInt())}}))),yh.prototype.toShort=r("kotlin.kotlin.ULong.toShort",a((function(){var e=t.toShort;return function(){return e(this.data.toInt())}}))),yh.prototype.toInt=r("kotlin.kotlin.ULong.toInt",(function(){return this.data.toInt()})),yh.prototype.toLong=r("kotlin.kotlin.ULong.toLong",(function(){return this.data})),yh.prototype.toUByte=r("kotlin.kotlin.ULong.toUByte",a((function(){var n=t.toByte,i=e.kotlin.UByte;return function(){return new i(n(this.data.toInt()))}}))),yh.prototype.toUShort=r("kotlin.kotlin.ULong.toUShort",a((function(){var n=t.toShort,i=e.kotlin.UShort;return function(){return new i(n(this.data.toInt()))}}))),yh.prototype.toUInt=r("kotlin.kotlin.ULong.toUInt",a((function(){var t=e.kotlin.UInt;return function(){return new t(this.data.toInt())}}))),yh.prototype.toULong=r("kotlin.kotlin.ULong.toULong",(function(){return this})),yh.prototype.toFloat=r("kotlin.kotlin.ULong.toFloat",a((function(){var t=e.kotlin.ulongToDouble_s8cxhz$;return function(){return t(this.data)}}))),yh.prototype.toDouble=r("kotlin.kotlin.ULong.toDouble",a((function(){var t=e.kotlin.ulongToDouble_s8cxhz$;return function(){return t(this.data)}}))),yh.prototype.toString=function(){return qh(this.data)},yh.$metadata$={kind:o,simpleName:"ULong",interfaces:[C]},yh.prototype.unbox=function(){return this.data},yh.prototype.hashCode=function(){var e=0;return 31*e+t.hashCode(this.data)|0},yh.prototype.equals=function(e){return this===e||null!==e&&"object"==typeof e&&Object.getPrototypeOf(this)===Object.getPrototypeOf(e)&&t.equals(this.data,e.data)},Object.defineProperty(wh.prototype,"start",{configurable:!0,get:function(){return this.first}}),Object.defineProperty(wh.prototype,"endInclusive",{configurable:!0,get:function(){return this.last}}),Object.defineProperty(wh.prototype,"endExclusive",{configurable:!0,get:function(){var e;if(null!=(e=this.last)&&e.equals(bh().MAX_VALUE))throw un("Cannot return the exclusive upper bound of a range that includes MAX_VALUE.".toString());return new yh(this.last.data.add(new yh(t.Long.fromInt(new rh(1).data).and(b)).data))}}),wh.prototype.contains_mef7kx$=function(t){var e=Bh(this.first.data,t.data)<=0;return e&&(e=Bh(t.data,this.last.data)<=0),e},wh.prototype.isEmpty=function(){return Bh(this.first.data,this.last.data)>0},wh.prototype.equals=function(e){var n,i;return t.isType(e,wh)&&(this.isEmpty()&&e.isEmpty()||(null!=(n=this.first)?n.equals(e.first):null)&&(null!=(i=this.last)?i.equals(e.last):null))},wh.prototype.hashCode=function(){return this.isEmpty()?-1:(31*new yh(this.first.data.xor(new yh(this.first.data.shiftRightUnsigned(32)).data)).data.toInt()|0)+new yh(this.last.data.xor(new yh(this.last.data.shiftRightUnsigned(32)).data)).data.toInt()|0},wh.prototype.toString=function(){return this.first.toString()+".."+this.last},xh.$metadata$={kind:x,simpleName:"Companion",interfaces:[]};var kh=null;function Ch(){return null===kh&&new xh,kh}function Eh(t,e,n){if(Oh(),s(n,p))throw sn("Step must be non-zero.");if(s(n,$))throw sn("Step must be greater than Long.MIN_VALUE to avoid overflow on negation.");this.first=t,this.last=Rh(t,e,n),this.step=n}function Sh(){Th=this}wh.$metadata$={kind:o,simpleName:"ULongRange",interfaces:[zc,Lc,Eh]},Eh.prototype.iterator=function(){return new Nh(this.first,this.last,this.step)},Eh.prototype.isEmpty=function(){return this.step.toNumber()>0?Bh(this.first.data,this.last.data)>0:Bh(this.first.data,this.last.data)<0},Eh.prototype.equals=function(e){var n,i;return t.isType(e,Eh)&&(this.isEmpty()&&e.isEmpty()||(null!=(n=this.first)?n.equals(e.first):null)&&(null!=(i=this.last)?i.equals(e.last):null)&&s(this.step,e.step))},Eh.prototype.hashCode=function(){return this.isEmpty()?-1:(31*((31*new yh(this.first.data.xor(new yh(this.first.data.shiftRightUnsigned(32)).data)).data.toInt()|0)+new yh(this.last.data.xor(new yh(this.last.data.shiftRightUnsigned(32)).data)).data.toInt()|0)|0)+this.step.xor(this.step.shiftRightUnsigned(32)).toInt()|0},Eh.prototype.toString=function(){return this.step.toNumber()>0?this.first.toString()+".."+this.last+" step "+this.step.toString():this.first.toString()+" downTo "+this.last+" step "+this.step.unaryMinus().toString()},Sh.prototype.fromClosedRange_15zasp$=function(t,e,n){return new Eh(t,e,n)},Sh.$metadata$={kind:x,simpleName:"Companion",interfaces:[]};var Th=null;function Oh(){return null===Th&&new Sh,Th}function Nh(t,e,n){this.finalElement_0=e,this.hasNext_0=n.toNumber()>0?Bh(t.data,e.data)<=0:Bh(t.data,e.data)>=0,this.step_0=new yh(n),this.next_0=this.hasNext_0?t:this.finalElement_0}function Ph(t,e,n){var i=Fh(t,n),o=Fh(e,n);return Mh(i.data,o.data)>=0?new rh(i.data-o.data|0):new rh(new rh(i.data-o.data|0).data+n.data|0)}function Ih(t,e,n){var i=Uh(t,n),o=Uh(e,n);return Bh(i.data,o.data)>=0?new yh(i.data.subtract(o.data)):new yh(new yh(i.data.subtract(o.data)).data.add(n.data))}function Ah(t,e,n){if(n>0)return Mh(t.data,e.data)>=0?e:new rh(e.data-Ph(e,t,new rh(n)).data|0);if(n<0)return Mh(t.data,e.data)<=0?e:new rh(e.data+Ph(t,e,new rh(0|-n)).data|0);throw sn("Step is zero.")}function Rh(t,e,n){if(n.toNumber()>0)return Bh(t.data,e.data)>=0?e:new yh(e.data.subtract(Ih(e,t,new yh(n)).data));if(n.toNumber()<0)return Bh(t.data,e.data)<=0?e:new yh(e.data.add(Ih(t,e,new yh(n.unaryMinus())).data));throw sn("Step is zero.")}function jh(t){Dh(),this.data=t}function Lh(){zh=this,this.MIN_VALUE=new jh(0),this.MAX_VALUE=new jh(-1),this.SIZE_BYTES=2,this.SIZE_BITS=16}Eh.$metadata$={kind:o,simpleName:"ULongProgression",interfaces:[se]},Nh.prototype.hasNext=function(){return this.hasNext_0},Nh.prototype.next=function(){var t=this.next_0;if(null!=t&&t.equals(this.finalElement_0)){if(!this.hasNext_0)throw yn();this.hasNext_0=!1}else this.next_0=new yh(this.next_0.data.add(this.step_0.data));return t},Nh.$metadata$={kind:o,simpleName:"ULongProgressionIterator",interfaces:[ge]},Lh.$metadata$={kind:x,simpleName:"Companion",interfaces:[]};var zh=null;function Dh(){return null===zh&&new Lh,zh}function Mh(e,n){return t.primitiveCompareTo(-2147483648^e,-2147483648^n)}function Bh(t,e){return t.xor($).compareTo_11rb$(e.xor($))}function Fh(e,n){return new rh(t.Long.fromInt(e.data).and(b).modulo(t.Long.fromInt(n.data).and(b)).toInt())}function Uh(t,e){var n=t.data,i=e.data;if(i.toNumber()<0)return Bh(t.data,e.data)<0?t:new yh(t.data.subtract(e.data));if(n.toNumber()>=0)return new yh(n.modulo(i));var o=n.shiftRightUnsigned(1).div(i).shiftLeft(1),r=n.subtract(o.multiply(i));return new yh(r.subtract(Bh(new yh(r).data,new yh(i).data)>=0?i:p))}function qh(t){return Hh(t,10)}function Hh(e,n){if(e.toNumber()>=0)return En(e,n);var i=e.shiftRightUnsigned(1).div(t.Long.fromInt(n)).shiftLeft(1),o=e.subtract(i.multiply(t.Long.fromInt(n)));return o.toNumber()>=n&&(o=o.subtract(t.Long.fromInt(n)),i=i.add(t.Long.fromInt(1))),En(i,n)+En(o,n)}jh.prototype.compareTo_mpmjao$=r("kotlin.kotlin.UShort.compareTo_mpmjao$",(function(e){return t.primitiveCompareTo(65535&this.data,255&e.data)})),jh.prototype.compareTo_11rb$=r("kotlin.kotlin.UShort.compareTo_11rb$",(function(e){return t.primitiveCompareTo(65535&this.data,65535&e.data)})),jh.prototype.compareTo_s87ys9$=r("kotlin.kotlin.UShort.compareTo_s87ys9$",a((function(){var t=e.kotlin.UInt,n=e.kotlin.uintCompare_vux9f0$;return function(e){return n(new t(65535&this.data).data,e.data)}}))),jh.prototype.compareTo_mpgczg$=r("kotlin.kotlin.UShort.compareTo_mpgczg$",a((function(){var n=t.Long.fromInt(65535),i=e.kotlin.ULong,o=e.kotlin.ulongCompare_3pjtqy$;return function(e){return o(new i(t.Long.fromInt(this.data).and(n)).data,e.data)}}))),jh.prototype.plus_mpmjao$=r("kotlin.kotlin.UShort.plus_mpmjao$",a((function(){var t=e.kotlin.UInt;return function(e){return new t(new t(65535&this.data).data+new t(255&e.data).data|0)}}))),jh.prototype.plus_6hrhkk$=r("kotlin.kotlin.UShort.plus_6hrhkk$",a((function(){var t=e.kotlin.UInt;return function(e){return new t(new t(65535&this.data).data+new t(65535&e.data).data|0)}}))),jh.prototype.plus_s87ys9$=r("kotlin.kotlin.UShort.plus_s87ys9$",a((function(){var t=e.kotlin.UInt;return function(e){return new t(new t(65535&this.data).data+e.data|0)}}))),jh.prototype.plus_mpgczg$=r("kotlin.kotlin.UShort.plus_mpgczg$",a((function(){var n=t.Long.fromInt(65535),i=e.kotlin.ULong;return function(e){return new i(new i(t.Long.fromInt(this.data).and(n)).data.add(e.data))}}))),jh.prototype.minus_mpmjao$=r("kotlin.kotlin.UShort.minus_mpmjao$",a((function(){var t=e.kotlin.UInt;return function(e){return new t(new t(65535&this.data).data-new t(255&e.data).data|0)}}))),jh.prototype.minus_6hrhkk$=r("kotlin.kotlin.UShort.minus_6hrhkk$",a((function(){var t=e.kotlin.UInt;return function(e){return new t(new t(65535&this.data).data-new t(65535&e.data).data|0)}}))),jh.prototype.minus_s87ys9$=r("kotlin.kotlin.UShort.minus_s87ys9$",a((function(){var t=e.kotlin.UInt;return function(e){return new t(new t(65535&this.data).data-e.data|0)}}))),jh.prototype.minus_mpgczg$=r("kotlin.kotlin.UShort.minus_mpgczg$",a((function(){var n=t.Long.fromInt(65535),i=e.kotlin.ULong;return function(e){return new i(new i(t.Long.fromInt(this.data).and(n)).data.subtract(e.data))}}))),jh.prototype.times_mpmjao$=r("kotlin.kotlin.UShort.times_mpmjao$",a((function(){var n=e.kotlin.UInt;return function(e){return new n(t.imul(new n(65535&this.data).data,new n(255&e.data).data))}}))),jh.prototype.times_6hrhkk$=r("kotlin.kotlin.UShort.times_6hrhkk$",a((function(){var n=e.kotlin.UInt;return function(e){return new n(t.imul(new n(65535&this.data).data,new n(65535&e.data).data))}}))),jh.prototype.times_s87ys9$=r("kotlin.kotlin.UShort.times_s87ys9$",a((function(){var n=e.kotlin.UInt;return function(e){return new n(t.imul(new n(65535&this.data).data,e.data))}}))),jh.prototype.times_mpgczg$=r("kotlin.kotlin.UShort.times_mpgczg$",a((function(){var n=t.Long.fromInt(65535),i=e.kotlin.ULong;return function(e){return new i(new i(t.Long.fromInt(this.data).and(n)).data.multiply(e.data))}}))),jh.prototype.div_mpmjao$=r("kotlin.kotlin.UShort.div_mpmjao$",a((function(){var t=e.kotlin.UInt,n=e.kotlin.uintDivide_oqfnby$;return function(e){return n(new t(65535&this.data),new t(255&e.data))}}))),jh.prototype.div_6hrhkk$=r("kotlin.kotlin.UShort.div_6hrhkk$",a((function(){var t=e.kotlin.UInt,n=e.kotlin.uintDivide_oqfnby$;return function(e){return n(new t(65535&this.data),new t(65535&e.data))}}))),jh.prototype.div_s87ys9$=r("kotlin.kotlin.UShort.div_s87ys9$",a((function(){var t=e.kotlin.UInt,n=e.kotlin.uintDivide_oqfnby$;return function(e){return n(new t(65535&this.data),e)}}))),jh.prototype.div_mpgczg$=r("kotlin.kotlin.UShort.div_mpgczg$",a((function(){var n=t.Long.fromInt(65535),i=e.kotlin.ULong,o=e.kotlin.ulongDivide_jpm79w$;return function(e){return o(new i(t.Long.fromInt(this.data).and(n)),e)}}))),jh.prototype.rem_mpmjao$=r("kotlin.kotlin.UShort.rem_mpmjao$",a((function(){var t=e.kotlin.UInt,n=e.kotlin.uintRemainder_oqfnby$;return function(e){return n(new t(65535&this.data),new t(255&e.data))}}))),jh.prototype.rem_6hrhkk$=r("kotlin.kotlin.UShort.rem_6hrhkk$",a((function(){var t=e.kotlin.UInt,n=e.kotlin.uintRemainder_oqfnby$;return function(e){return n(new t(65535&this.data),new t(65535&e.data))}}))),jh.prototype.rem_s87ys9$=r("kotlin.kotlin.UShort.rem_s87ys9$",a((function(){var t=e.kotlin.UInt,n=e.kotlin.uintRemainder_oqfnby$;return function(e){return n(new t(65535&this.data),e)}}))),jh.prototype.rem_mpgczg$=r("kotlin.kotlin.UShort.rem_mpgczg$",a((function(){var n=t.Long.fromInt(65535),i=e.kotlin.ULong,o=e.kotlin.ulongRemainder_jpm79w$;return function(e){return o(new i(t.Long.fromInt(this.data).and(n)),e)}}))),jh.prototype.floorDiv_mpmjao$=r("kotlin.kotlin.UShort.floorDiv_mpmjao$",a((function(){var t=e.kotlin.UInt,n=e.kotlin.uintDivide_oqfnby$;return function(e){return n(new t(65535&this.data),new t(255&e.data))}}))),jh.prototype.floorDiv_6hrhkk$=r("kotlin.kotlin.UShort.floorDiv_6hrhkk$",a((function(){var t=e.kotlin.UInt,n=e.kotlin.uintDivide_oqfnby$;return function(e){return n(new t(65535&this.data),new t(65535&e.data))}}))),jh.prototype.floorDiv_s87ys9$=r("kotlin.kotlin.UShort.floorDiv_s87ys9$",a((function(){var t=e.kotlin.UInt,n=e.kotlin.uintDivide_oqfnby$;return function(e){return n(new t(65535&this.data),e)}}))),jh.prototype.floorDiv_mpgczg$=r("kotlin.kotlin.UShort.floorDiv_mpgczg$",a((function(){var n=t.Long.fromInt(65535),i=e.kotlin.ULong,o=e.kotlin.ulongDivide_jpm79w$;return function(e){return o(new i(t.Long.fromInt(this.data).and(n)),e)}}))),jh.prototype.mod_mpmjao$=r("kotlin.kotlin.UShort.mod_mpmjao$",a((function(){var n=e.kotlin.UInt,i=e.kotlin.uintRemainder_oqfnby$,o=t.toByte,r=e.kotlin.UByte;return function(t){return new r(o(i(new n(65535&this.data),new n(255&t.data)).data))}}))),jh.prototype.mod_6hrhkk$=r("kotlin.kotlin.UShort.mod_6hrhkk$",a((function(){var n=e.kotlin.UInt,i=e.kotlin.uintRemainder_oqfnby$,o=t.toShort,r=e.kotlin.UShort;return function(t){return new r(o(i(new n(65535&this.data),new n(65535&t.data)).data))}}))),jh.prototype.mod_s87ys9$=r("kotlin.kotlin.UShort.mod_s87ys9$",a((function(){var t=e.kotlin.UInt,n=e.kotlin.uintRemainder_oqfnby$;return function(e){return n(new t(65535&this.data),e)}}))),jh.prototype.mod_mpgczg$=r("kotlin.kotlin.UShort.mod_mpgczg$",a((function(){var n=t.Long.fromInt(65535),i=e.kotlin.ULong,o=e.kotlin.ulongRemainder_jpm79w$;return function(e){return o(new i(t.Long.fromInt(this.data).and(n)),e)}}))),jh.prototype.inc=r("kotlin.kotlin.UShort.inc",a((function(){var n=t.toShort,i=e.kotlin.UShort;return function(){return new i(n(this.data+1))}}))),jh.prototype.dec=r("kotlin.kotlin.UShort.dec",a((function(){var n=t.toShort,i=e.kotlin.UShort;return function(){return new i(n(this.data-1))}}))),jh.prototype.rangeTo_6hrhkk$=r("kotlin.kotlin.UShort.rangeTo_6hrhkk$",a((function(){var t=e.kotlin.ranges.UIntRange,n=e.kotlin.UInt;return function(e){return new t(new n(65535&this.data),new n(65535&e.data))}}))),jh.prototype.and_6hrhkk$=r("kotlin.kotlin.UShort.and_6hrhkk$",a((function(){var n=e.kotlin.UShort,i=t.toShort;return function(t){return new n(i(this.data&t.data))}}))),jh.prototype.or_6hrhkk$=r("kotlin.kotlin.UShort.or_6hrhkk$",a((function(){var n=e.kotlin.UShort,i=t.toShort;return function(t){return new n(i(this.data|t.data))}}))),jh.prototype.xor_6hrhkk$=r("kotlin.kotlin.UShort.xor_6hrhkk$",a((function(){var n=e.kotlin.UShort,i=t.toShort;return function(t){return new n(i(this.data^t.data))}}))),jh.prototype.inv=r("kotlin.kotlin.UShort.inv",a((function(){var n=e.kotlin.UShort,i=t.toShort;return function(){return new n(i(~this.data))}}))),jh.prototype.toByte=r("kotlin.kotlin.UShort.toByte",a((function(){var e=t.toByte;return function(){return e(this.data)}}))),jh.prototype.toShort=r("kotlin.kotlin.UShort.toShort",(function(){return this.data})),jh.prototype.toInt=r("kotlin.kotlin.UShort.toInt",(function(){return 65535&this.data})),jh.prototype.toLong=r("kotlin.kotlin.UShort.toLong",a((function(){var e=t.Long.fromInt(65535);return function(){return t.Long.fromInt(this.data).and(e)}}))),jh.prototype.toUByte=r("kotlin.kotlin.UShort.toUByte",a((function(){var n=t.toByte,i=e.kotlin.UByte;return function(){return new i(n(this.data))}}))),jh.prototype.toUShort=r("kotlin.kotlin.UShort.toUShort",(function(){return this})),jh.prototype.toUInt=r("kotlin.kotlin.UShort.toUInt",a((function(){var t=e.kotlin.UInt;return function(){return new t(65535&this.data)}}))),jh.prototype.toULong=r("kotlin.kotlin.UShort.toULong",a((function(){var n=t.Long.fromInt(65535),i=e.kotlin.ULong;return function(){return new i(t.Long.fromInt(this.data).and(n))}}))),jh.prototype.toFloat=r("kotlin.kotlin.UShort.toFloat",(function(){return 65535&this.data})),jh.prototype.toDouble=r("kotlin.kotlin.UShort.toDouble",(function(){return 65535&this.data})),jh.prototype.toString=function(){return(65535&this.data).toString()},jh.$metadata$={kind:o,simpleName:"UShort",interfaces:[C]},jh.prototype.unbox=function(){return this.data},jh.prototype.hashCode=function(){var e=0;return 31*e+t.hashCode(this.data)|0},jh.prototype.equals=function(e){return this===e||null!==e&&"object"==typeof e&&Object.getPrototypeOf(this)===Object.getPrototypeOf(e)&&t.equals(this.data,e.data)};var Gh=e.kotlin||(e.kotlin={}),Kh=Gh.internal||(Gh.internal={}),Vh=Gh.collections||(Gh.collections={});Vh.contains_mjy6jw$=H,Vh.contains_o2f9me$=G,Vh.get_lastIndex_m7z4lg$=nt,Vh.get_lastIndex_bvy38s$=it,Vh.get_lastIndex_355ntz$=ot,Vh.indexOf_mjy6jw$=K,Vh.indexOf_o2f9me$=V,Vh.get_indices_m7z4lg$=tt;var Yh=Gh.ranges||(Gh.ranges={});Yh.reversed_zf1xzc$=Dt,Vh.get_indices_bvy38s$=function(t){return new cc(0,it(t))},Vh.get_indices_355ntz$=et,Vh.last_us0mfu$=function(t){if(0===t.length)throw new $n("Array is empty.");return t[nt(t)]},Vh.lastIndexOf_mjy6jw$=Y,Vh.lastIndexOf_o2f9me$=W;var Wh=Gh.random||(Gh.random={});Wh.Random=qu,Vh.single_355ntz$=X,Gh.IllegalArgumentException_init_pdl1vj$=sn,Vh.dropLast_8ujjk8$=function(t,e){if(!(e>=0))throw sn(("Requested element count "+e+" is less than zero.").toString());return Q(t,Bt(t.length-e|0,0))},Vh.take_8ujjk8$=Q,Vh.emptyList_287e2$=ss,Vh.ArrayList_init_287e2$=yi,Vh.filterNotNull_emfgvx$=Z,Vh.filterNotNullTo_hhiqfl$=J,Vh.toList_us0mfu$=at,Vh.sortWith_iwcb0m$=Rn,Vh.mapCapacity_za3lpa$=ni,Yh.coerceAtLeast_dqglrj$=Bt,Vh.LinkedHashMap_init_bwtc7$=no,Yh.coerceAtMost_dqglrj$=Ft,Vh.toCollection_5n4o2z$=rt,Vh.toMutableList_us0mfu$=st,Vh.toMutableList_bvy38s$=function(t){var e,n=gi(t.length);for(e=0;e!==t.length;++e){var i=t[e];n.add_11rb$(i)}return n},Vh.toSet_us0mfu$=lt,Vh.addAll_ipc267$=Fs,Vh.LinkedHashMap_init_q3lmfv$=to,Vh.Grouping=$s,Vh.ArrayList_init_ww73n8$=gi,Vh.HashSet_init_287e2$=Ui,Gh.NoSuchElementException_init=yn,Gh.UnsupportedOperationException_init_pdl1vj$=_n,Vh.listOf_mh5how$=Vn,Vh.collectionSizeOrDefault_ba2ldo$=bs,Vh.zip_pmvpm9$=function(t,e){for(var n=h.min(t.length,e.length),i=gi(),o=0;o=0&&e<=hs(t)?t.get_za3lpa$(e):null},Vh.first_7wnvza$=ft,Vh.first_2p1efm$=mt,Vh.firstOrNull_7wnvza$=function(e){if(t.isType(e,pe))return e.isEmpty()?null:e.get_za3lpa$(0);var n=e.iterator();return n.hasNext()?n.next():null},Vh.firstOrNull_2p1efm$=function(t){return t.isEmpty()?null:t.get_za3lpa$(0)},Vh.indexOf_2ws7j4$=$t,Vh.checkIndexOverflow_za3lpa$=ti,Vh.last_7wnvza$=yt,Vh.last_2p1efm$=gt,Vh.lastOrNull_2p1efm$=function(t){return t.isEmpty()?null:t.get_za3lpa$(t.size-1|0)},Vh.random_iscd7z$=function(t,e){if(t.isEmpty())throw new $n("Collection is empty.");return _t(t,e.nextInt_za3lpa$(t.size))},Vh.single_7wnvza$=vt,Vh.single_2p1efm$=bt,Vh.drop_ba2ldo$=function(e,n){var i,o,r,a;if(!(n>=0))throw sn(("Requested element count "+n+" is less than zero.").toString());if(0===n)return Tt(e);if(t.isType(e,ue)){var s=e.size-n|0;if(s<=0)return ss();if(1===s)return Vn(yt(e));if(a=gi(),t.isType(e,pe)){if(t.isType(e,uo)){i=e.size;for(var l=n;l=n?a.add_11rb$(p):c=c+1|0}return _s(a)},Vh.dropLast_yzln2o$=function(t,e){if(!(e>=0))throw sn(("Requested element count "+e+" is less than zero.").toString());return xt(t,Bt(t.size-e|0,0))},Vh.take_ba2ldo$=xt,Vh.filterNotNull_m3lr2h$=function(t){return wt(t,yi())},Vh.filterNotNullTo_u9kwcl$=wt,Vh.slice_b9tsm5$=function(t,e){var n,i=bs(e,10);if(0===i)return ss();var o=gi();for(n=e.iterator();n.hasNext();){var r=n.next();o.add_11rb$(t.get_za3lpa$(r))}return o},Vh.takeLast_yzln2o$=function(e,n){var i;if(!(n>=0))throw sn(("Requested element count "+n+" is less than zero.").toString());if(0===n)return ss();var o=e.size;if(n>=o)return Tt(e);if(1===n)return Vn(gt(e));var r=gi();if(t.isType(e,uo))for(var a=o-n|0;a0?e:t},Yh.coerceAtMost_38ydlf$=function(t,e){return t>e?e:t},Yh.coerceIn_e4yvb3$=Ut,Yh.coerceIn_ekzx8g$=function(t,e,n){if(e.compareTo_11rb$(n)>0)throw sn("Cannot coerce value to an empty range: maximum "+n.toString()+" is less than minimum "+e.toString()+".");return t.compareTo_11rb$(e)<0?e:t.compareTo_11rb$(n)>0?n:t},Yh.coerceIn_nig4hr$=function(t,e,n){if(e>n)throw sn("Cannot coerce value to an empty range: maximum "+n+" is less than minimum "+e+".");return tn?n:t},Yh.coerceIn_52zmhz$=qt,Yh.coerceIn_nayhkp$=function(e,n){if(t.isType(n,Bc))return qt(e,n);if(n.isEmpty())throw sn("Cannot coerce value to an empty range: "+n+".");return en.endInclusive?n.endInclusive:e};var Jh=Gh.sequences||(Gh.sequences={});Jh.first_veqyi0$=function(t){var e=t.iterator();if(!e.hasNext())throw new $n("Sequence is empty.");return e.next()},Jh.firstOrNull_veqyi0$=function(t){var e=t.iterator();return e.hasNext()?e.next():null},Jh.drop_wuwhe2$=function(e,n){if(!(n>=0))throw sn(("Requested element count "+n+" is less than zero.").toString());return 0===n?e:t.isType(e,Sl)?e.drop_za3lpa$(n):new Il(e,n)},Jh.filter_euau3h$=function(t,e){return new gl(t,!0,e)},Jh.Sequence=il,Jh.filterNot_euau3h$=Gt,Jh.filterNotNull_q2m9h7$=Vt,Jh.take_wuwhe2$=Yt,Jh.sortedWith_vjgqpk$=function(t,e){return new Wt(t,e)},Jh.toCollection_gtszxp$=Xt,Jh.toHashSet_veqyi0$=function(t){return Xt(t,Ui())},Jh.toList_veqyi0$=Zt,Jh.toMutableList_veqyi0$=Jt,Jh.toSet_veqyi0$=function(t){return Ul(Xt(t,ro()))},Jh.map_z5avom$=Qt,Jh.mapNotNull_qpz9h9$=function(t,e){return Vt(new bl(t,e))},Jh.count_veqyi0$=function(t){var e,n=0;for(e=t.iterator();e.hasNext();)e.next(),ei(n=n+1|0);return n},Jh.maxOrNull_1bslqu$=function(t){var e=t.iterator();if(!e.hasNext())return null;for(var n=e.next();e.hasNext();){var i=e.next();n=h.max(n,i)}return n},Jh.minOrNull_1bslqu$=function(t){var e=t.iterator();if(!e.hasNext())return null;for(var n=e.next();e.hasNext();){var i=e.next();n=h.min(n,i)}return n},Jh.chunked_wuwhe2$=function(t,e){return te(t,e,e,!0)},Jh.plus_v0iwhp$=function(t,e){return fl(ul([t,e]))},Jh.windowed_1ll6yl$=te,Jh.zip_r7q3s9$=function(t,e){return new xl(t,e,ee)},Jh.joinTo_q99qgx$=ne,Jh.joinToString_853xkz$=function(t,e,n,i,o,r,a){return void 0===e&&(e=", "),void 0===n&&(n=""),void 0===i&&(i=""),void 0===o&&(o=-1),void 0===r&&(r="..."),void 0===a&&(a=null),ne(t,Er(),e,n,i,o,r,a).toString()},Jh.asIterable_veqyi0$=ie,Vh.minus_khz7k3$=function(e,n){var i=Ja(n,e);if(i.isEmpty())return Pt(e);if(t.isType(i,_e)){var o,r=ro();for(o=e.iterator();o.hasNext();){var a=o.next();i.contains_11rb$(a)||r.add_11rb$(a)}return r}var s=ao(e);return s.removeAll_brywnq$(i),s},Vh.plus_xfiyik$=function(t,e){var n=lo(t.size+1|0);return n.addAll_brywnq$(t),n.add_11rb$(e),n},Vh.plus_khz7k3$=function(t,e){var n,i,o=lo(null!=(i=null!=(n=vs(e))?t.size+n|0:null)?i:2*t.size|0);return o.addAll_brywnq$(t),Fs(o,e),o},Zh.get_lastIndex_gw00vp$=ap,Zh.first_gw00vp$=function(t){if(0===t.length)throw new $n("Char sequence is empty.");return t.charCodeAt(0)},Zh.iterator_gw00vp$=op,Zh.get_indices_gw00vp$=rp,Zh.last_gw00vp$=function(t){if(0===t.length)throw new $n("Char sequence is empty.");return t.charCodeAt(ap(t))},Zh.drop_6ic1pp$=function(t,e){if(!(e>=0))throw sn(("Requested character count "+e+" is less than zero.").toString());return t.substring(Ft(e,t.length))},Zh.dropLast_6ic1pp$=function(t,e){if(!(e>=0))throw sn(("Requested character count "+e+" is less than zero.").toString());return re(t,Bt(t.length-e|0,0))},Zh.StringBuilder_init=Er,Zh.slice_fc3b62$=function(t,e){return e.isEmpty()?"":sp(t,e)},Zh.take_6ic1pp$=re,Zh.reversed_gw00vp$=function(t){return Cr(t).reverse()},Zh.asSequence_gw00vp$=function(t){var e,n="string"==typeof t;return n&&(n=0===t.length),n?cl():new oe((e=t,function(){return op(e)}))},Gh.UInt=rh,Gh.ULong=yh,Gh.UByte=eh,Gh.UShort=jh,Vh.copyOf_mrm5p$=On,Vh.copyOfRange_ietg8x$=function(t,e,n){return Ma().checkRangeIndexes_cub51b$(e,n,t.length),t.slice(e,n)};var Qh=Gh.js||(Gh.js={}),t_=Gh.math||(Gh.math={});Object.defineProperty(t_,"PI",{get:function(){return n}}),Object.defineProperty(t_,"E",{get:function(){return i}});var e_=Gh.io||(Gh.io={});Gh.CharSequence=ae,Vh.Iterable=se,Vh.MutableIterable=le,Vh.MutableCollection=ce,Vh.List=pe,Vh.MutableList=he,Vh.Set=_e,Vh.MutableSet=de,fe.Entry=me,Vh.Map=fe,$e.MutableEntry=ye,Vh.MutableMap=$e,Vh.Iterator=ge,Vh.MutableIterator=ve,Vh.ListIterator=be,Vh.MutableListIterator=we,Object.defineProperty(Gh,"Unit",{get:Ce}),e.arrayIterator=function(t,e){if(null==e)return new Ee(t);switch(e){case"BooleanArray":return Te(t);case"ByteArray":return Ne(t);case"ShortArray":return Ie(t);case"CharArray":return Re(t);case"IntArray":return Le(t);case"LongArray":return Ue(t);case"FloatArray":return De(t);case"DoubleArray":return Be(t);default:throw un("Unsupported type argument for arrayIterator: "+g(e))}},e.booleanArrayIterator=Te,e.byteArrayIterator=Ne,e.shortArrayIterator=Ie,e.charArrayIterator=Re,e.intArrayIterator=Le,e.floatArrayIterator=De,e.doubleArrayIterator=Be,e.longArrayIterator=Ue,e.PropertyMetadata=qe,e.noWhenBranchMatched=function(){throw bn()},e.subSequence=function(t,e,n){return"string"==typeof t?t.substring(e,n):t.subSequence_vux9f0$(e,n)},e.captureStack=function(t,e){Error.captureStackTrace?Error.captureStackTrace(e):e.stack=(new Error).stack},e.newThrowable=function(t,e){var n,i=new Error;return n=s(typeof t,"undefined")?null!=e?e.toString():null:t,i.message=n,i.cause=e,i.name="Throwable",i},e.BoxedChar=He,e.charArrayOf=function(){var t="CharArray",e=new Uint16Array(arguments);return e.$type$=t,e};var n_=Gh.coroutines||(Gh.coroutines={});n_.CoroutineImpl=Ge,Object.defineProperty(n_,"CompletedContinuation",{get:Ye});var i_=n_.intrinsics||(n_.intrinsics={});i_.createCoroutineUnintercepted_x18nsh$=Xe,i_.createCoroutineUnintercepted_3a617i$=Ze,i_.intercepted_f9mg25$=Je,Gh.Error_init_pdl1vj$=tn,Gh.Error=Qe,Gh.Exception_init=function(t){return t=t||Object.create(en.prototype),en.call(t,null,null),t},Gh.Exception_init_pdl1vj$=nn,Gh.Exception=en,Gh.RuntimeException_init=function(t){return t=t||Object.create(on.prototype),on.call(t,null,null),t},Gh.RuntimeException_init_pdl1vj$=rn,Gh.RuntimeException=on,Gh.IllegalArgumentException_init=function(t){return t=t||Object.create(an.prototype),an.call(t,null,null),t},Gh.IllegalArgumentException=an,Gh.IllegalStateException_init=function(t){return t=t||Object.create(ln.prototype),ln.call(t,null,null),t},Gh.IllegalStateException_init_pdl1vj$=un,Gh.IllegalStateException=ln,Gh.IndexOutOfBoundsException_init=function(t){return t=t||Object.create(cn.prototype),cn.call(t,null),t},Gh.IndexOutOfBoundsException=cn,Gh.UnsupportedOperationException_init=hn,Gh.UnsupportedOperationException=pn,Gh.NumberFormatException=dn,Gh.NullPointerException=fn,Gh.ClassCastException=mn,Gh.NoSuchElementException=$n,Gh.ArithmeticException=gn,Gh.NoWhenBranchMatchedException_init=bn,Gh.NoWhenBranchMatchedException=vn,Gh.UninitializedPropertyAccessException_init_pdl1vj$=xn,Gh.UninitializedPropertyAccessException=wn,Gh.lazy_klfg04$=function(t){return new qp(t)},Gh.lazy_kls4a0$=function(t,e){return new qp(e)},Gh.fillFrom_dgzutr$=kn,Gh.arrayCopyResize_xao4iu$=Cn,Zh.toString_if0zpk$=En,Vh.asList_us0mfu$=Sn,Vh.asList_355ntz$=function(t){return new Tn(t)},Vh.arrayCopy=Qn,Vh.copyOf_8ujjk8$=Nn,Vh.copyOfRange_5f8l3u$=Pn,Vh.fill_jfbbbd$=In,Vh.fill_6mk3ue$=function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=t.length),Ma().checkRangeIndexes_cub51b$(n,i,t.length),t.fill(e,n,i)},Vh.fill_tpuxuu$=function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=t.length),Ma().checkRangeIndexes_cub51b$(n,i,t.length),t.fill(e,n,i)},Vh.fill_x4f2cq$=function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=t.length),Ma().checkRangeIndexes_cub51b$(n,i,t.length),t.fill(e,n,i)},Vh.sort_pbinho$=An,Vh.toTypedArray_964n91$=function(t){return[].slice.call(t)},Vh.toTypedArray_bvy38s$=function(t){return[].slice.call(t)},Vh.reverse_vvxzk3$=jn,Zh.binarySearchRange_wmnbas$=Bn,Zh.digitToIntImpl_nupfqh$=Fn,Zh.isWhitespaceImpl_nupfqh$=Un,Gh.Comparator=qn,Vh.copyToArray=Hn,Vh.copyToArrayImpl=Gn,Vh.copyToExistingArrayImpl=Kn,Vh.setOf_mh5how$=Yn,Vh.LinkedHashSet_init_287e2$=ro,Vh.LinkedHashSet_init_ww73n8$=lo,Vh.mapOf_x2b85n$=Wn,Vh.shuffle_vvxzk3$=function(t){kt(t,Yu())},Vh.sort_4wi501$=Xn,Vh.toMutableMap_abgq59$=Ms,Vh.brittleContainsOptimizationEnabled_8be2vx$=ii,Vh.AbstractMutableCollection=oi,Vh.AbstractMutableList=ri,ui.SimpleEntry_init_trwmqg$=function(t,e){return e=e||Object.create(ci.prototype),ci.call(e,t.key,t.value),e},ui.SimpleEntry=ci,ui.AbstractEntrySet=pi,Vh.AbstractMutableMap=ui,Vh.AbstractMutableSet=mi,Vh.ArrayList_init_mqih57$=vi,Vh.ArrayList=$i,Vh.sortArrayWith_6xblhi$=bi,Vh.sortArray_5zbtrs$=xi,Object.defineProperty(Ti,"HashCode",{get:Ri}),Vh.EqualityComparator=Ti,Vh.HashMap_init_va96d4$=zi,Vh.HashMap_init_q3lmfv$=Di,Vh.HashMap_init_xf5xz2$=Mi,Vh.HashMap_init_bwtc7$=Bi,Vh.HashMap_init_73mtqc$=function(t,e){return Di(e=e||Object.create(ji.prototype)),e.putAll_a2k3zr$(t),e},Vh.HashMap=ji,Vh.HashSet_init_mqih57$=function(t,e){return e=e||Object.create(Fi.prototype),mi.call(e),Fi.call(e),e.map_8be2vx$=Bi(t.size),e.addAll_brywnq$(t),e},Vh.HashSet_init_2wofer$=qi,Vh.HashSet_init_ww73n8$=Hi,Vh.HashSet_init_nn01ho$=Gi,Vh.HashSet=Fi,Vh.InternalHashCodeMap=Ki,Vh.InternalMap=Yi,Vh.InternalStringMap=Wi,Vh.LinkedHashMap_init_xf5xz2$=eo,Vh.LinkedHashMap_init_73mtqc$=io,Vh.LinkedHashMap=Xi,Vh.LinkedHashSet_init_mqih57$=ao,Vh.LinkedHashSet_init_2wofer$=so,Vh.LinkedHashSet=oo,Vh.RandomAccess=uo,e_.BaseOutput=co,e_.NodeJsOutput=po,e_.BufferedOutput=ho,e_.BufferedOutputToConsoleLog=_o,e_.println_s8jyv4$=function(t){Ni.println_s8jyv4$(t)},n_.SafeContinuation_init_wj8d80$=function(t,e){return e=e||Object.create(fo.prototype),fo.call(e,t,Au()),e},n_.SafeContinuation=fo;var o_=n_.cancellation||(n_.cancellation={});o_.CancellationException_init_pdl1vj$=function(t,e){return un(t,e=e||Object.create(mo.prototype)),mo.call(e),e},o_.CancellationException_init_wspj0f$=function(t,e,n){return n=n||Object.create(mo.prototype),ln.call(n,t,e),mo.call(n),n},o_.CancellationException=mo;var r_=e.kotlinx||(e.kotlinx={}),a_=r_.dom||(r_.dom={});a_.createElement_7cgwi1$=function(t,e,n){var i=t.createElement(e);return n(i),i},a_.hasClass_46n0ku$=ka,a_.addClass_hhb33f$=function(e,n){var i,o=yi();for(i=0;i!==n.length;++i){var r=n[i];ka(e,r)||o.add_11rb$(r)}var a=o;if(!a.isEmpty()){var s,l=tp(t.isCharSequence(s=e.className)?s:v()).toString(),u=Er();return u.append_pdl1vj$(l),0!==l.length&&u.append_pdl1vj$(" "),Rt(a,u," "),e.className=u.toString(),!0}return!1},a_.removeClass_hhb33f$=function(e,n){var i;t:do{var o;for(o=0;o!==n.length;++o)if(ka(e,n[o])){i=!0;break t}i=!1}while(0);if(i){var r,a,s=lt(n),l=tp(t.isCharSequence(r=e.className)?r:v()).toString(),u=ea("\\s+").split_905azu$(l,0),c=yi();for(a=u.iterator();a.hasNext();){var p=a.next();s.contains_11rb$(p)||c.add_11rb$(p)}return e.className=jt(c," "),!0}return!1},Qh.iterator_s8jyvk$=function(e){var n,i=e;return null!=e.iterator?e.iterator():t.isArrayish(i)?t.arrayIterator(i):(t.isType(n=i,se)?n:yo()).iterator()},e.throwNPE=function(t){throw new fn(t)},e.throwCCE=yo,e.throwISE=go,e.throwUPAE=function(t){throw xn("lateinit property "+t+" has not been initialized")},e_.Serializable=vo,t_.round_14dthe$=function(t){if(t%.5!=0)return Math.round(t);var e=h.floor(t);return e%2==0?e:h.ceil(t)},t_.nextDown_yrwdxr$=bo,t_.roundToInt_yrwdxr$=function(t){if(wo(t))throw sn("Cannot round NaN value.");return t>2147483647?2147483647:t<-2147483648?-2147483648:m(Math.round(t))},t_.roundToLong_yrwdxr$=function(e){if(wo(e))throw sn("Cannot round NaN value.");return e>y.toNumber()?y:e<$.toNumber()?$:t.Long.fromNumber(Math.round(e))},t_.abs_za3lpa$=function(t){return t<0?0|-t:t},t_.get_sign_s8ev3n$=function(t){return t<0?-1:t>0?1:0},t_.abs_s8cxhz$=function(t){return t.toNumber()<0?t.unaryMinus():t},Gh.isNaN_yrwdxr$=wo,Gh.isNaN_81szk$=xo,Gh.isInfinite_yrwdxr$=ko,Gh.isInfinite_81szk$=Co,Gh.isFinite_yrwdxr$=Eo,Gh.isFinite_81szk$=function(t){return!Co(t)&&!xo(t)},Wh.defaultPlatformRandom_8be2vx$=So,Wh.doubleFromParts_6xvm5r$=To;var s_=Gh.reflect||(Gh.reflect={});Qh.get_js_1yb8b7$=function(e){var n;return(t.isType(n=e,Po)?n:yo()).jClass},s_.KCallable=Oo,s_.KClass=No;var l_=s_.js||(s_.js={}),u_=l_.internal||(l_.internal={});u_.KClassImpl=Po,u_.SimpleKClassImpl=Io,u_.PrimitiveKClassImpl=Ao,Object.defineProperty(u_,"NothingKClassImpl",{get:Lo}),u_.ErrorKClass=zo,s_.KProperty=Do,s_.KMutableProperty=Mo,s_.KProperty0=Bo,s_.KMutableProperty0=Fo,s_.KProperty1=Uo,s_.KMutableProperty1=qo,s_.KType=Ho,e.createKType=function(t,e,n){return new Go(t,Sn(e),n)},u_.KTypeImpl=Go,Object.defineProperty(u_,"PrimitiveClasses",{get:mr}),e.getKClass=$r,e.getKClassM=yr,e.getKClassFromExpression=function(e){var n;switch(typeof e){case"string":n=mr().stringClass;break;case"number":n=(0|e)===e?mr().intClass:mr().doubleClass;break;case"boolean":n=mr().booleanClass;break;case"function":n=mr().functionClass(e.length);break;default:if(t.isBooleanArray(e))n=mr().booleanArrayClass;else if(t.isCharArray(e))n=mr().charArrayClass;else if(t.isByteArray(e))n=mr().byteArrayClass;else if(t.isShortArray(e))n=mr().shortArrayClass;else if(t.isIntArray(e))n=mr().intArrayClass;else if(t.isLongArray(e))n=mr().longArrayClass;else if(t.isFloatArray(e))n=mr().floatArrayClass;else if(t.isDoubleArray(e))n=mr().doubleArrayClass;else if(t.isType(e,No))n=$r(No);else if(t.isArray(e))n=mr().arrayClass;else{var i=Object.getPrototypeOf(e).constructor;n=i===Object?mr().anyClass:i===Error?mr().throwableClass:gr(i)}}return n},e.getKClass1=gr,Qh.reset_xjqeni$=vr,Zh.Appendable=br,Zh.CharacterCodingException=wr,Zh.StringBuilder_init_za3lpa$=kr,Zh.StringBuilder_init_6bul2c$=Cr,Zh.StringBuilder=xr,Zh.uppercaseChar_myv2d0$=Sr,Zh.isHighSurrogate_myv2d0$=Tr,Zh.isLowSurrogate_myv2d0$=Or,Zh.isWhitespace_myv2d0$=Nr,Zh.toBoolean_5cw0du$=function(t){var e=null!=t;return e&&(e=s(t.toLowerCase(),"true")),e},Zh.toInt_pdl1vz$=Pr,Zh.toInt_6ic1pp$=function(t,e){var n;return null!=(n=Yc(t,e))?n:Zc(t)},Zh.toLong_pdl1vz$=function(t){var e;return null!=(e=Wc(t))?e:Zc(t)},Zh.toDouble_pdl1vz$=function(t){var e=+t;return(wo(e)&&!Ir(t)||0===e&&fa(t))&&Zc(t),e},Zh.toDoubleOrNull_pdl1vz$=function(t){var e=+t;return wo(e)&&!Ir(t)||0===e&&fa(t)?null:e},Zh.toString_dqglrj$=function(t,e){return t.toString(Ar(e))},Zh.checkRadix_za3lpa$=Ar,Zh.digitOf_xvg9q0$=Rr,Object.defineProperty(jr,"IGNORE_CASE",{get:zr}),Object.defineProperty(jr,"MULTILINE",{get:Dr}),Zh.RegexOption=jr,Zh.MatchGroup=Fr,Zh.get_bnt56j$=Ur,Object.defineProperty(qr,"Companion",{get:ta}),Zh.Regex_init_sb3q2$=function(t,e,n){return n=n||Object.create(qr.prototype),qr.call(n,t,Yn(e)),n},Zh.Regex_init_61zpoe$=ea,Zh.Regex=qr,Zh.concatToString_355ntz$=ua,Zh.concatToString_wlitf7$=ca,Zh.decodeToString_964n91$=function(t){return xa(t,0,t.length,!1)},Zh.encodeToByteArray_pdl1vz$=function(t){return wa(t,0,t.length,!1)},Zh.compareTo_7epoxm$=pa,Zh.startsWith_7epoxm$=ha,Zh.startsWith_3azpy2$=_a,Zh.endsWith_7epoxm$=da,Zh.isBlank_gw00vp$=fa,Zh.equals_igcy3c$=function(t,e,n){var i;if(void 0===n&&(n=!1),null==t)return null==e;if(null==e)return!1;if(!n)return s(t,e);if(t.length!==e.length)return!1;i=t.length;for(var o=0;o=0))throw sn(("Count 'n' must be non-negative, but was "+e+".").toString());switch(e){case 0:n="";break;case 1:n=t.toString();break;default:var i="";if(0!==t.length)for(var o=t.toString(),r=e;1==(1&r)&&(i+=o),0!=(r>>>=1);)o+=o;return i}return n},Zh.replace_680rmw$=function(t,e,n,i){return void 0===i&&(i=!1),t.replace(new RegExp(ta().escape_61zpoe$(e),i?"gui":"gu"),ta().nativeEscapeReplacement_y4putb$(n))},Zh.replace_r2fvfm$=function(t,e,n,i){return void 0===i&&(i=!1),t.replace(new RegExp(ta().escape_61zpoe$(String.fromCharCode(e)),i?"gui":"gu"),String.fromCharCode(n))},Zh.encodeUtf8_eq9l2e$=wa,Zh.decodeUtf8_bndkiu$=xa,Gh.addSuppressed_oh0dqn$=function(t,e){if(t!==e){var n=t._suppressed;null==n?t._suppressed=us([e]):n.add_11rb$(e)}},Vh.AbstractCollection=Ca,Vh.AbstractIterator=Ia,Object.defineProperty(Aa,"Companion",{get:Ma}),Vh.AbstractList=Aa,Object.defineProperty(Ba,"Companion",{get:Va}),Vh.AbstractMap=Ba,Object.defineProperty(Ya,"Companion",{get:Za}),Vh.AbstractSet=Ya,Vh.convertToSetForSetOperationWith_wo44v8$=Ja,Object.defineProperty(Vh,"EmptyIterator",{get:es}),Object.defineProperty(Vh,"EmptyList",{get:os}),Vh.asCollection_vj43ah$=rs,Vh.listOf_i5x0yv$=ls,Vh.mutableListOf_i5x0yv$=us,Vh.arrayListOf_i5x0yv$=cs,Vh.listOfNotNull_issdgt$=function(t){return null!=t?Vn(t):ss()},Vh.listOfNotNull_jurz7g$=function(t){return Z(t)},Vh.get_indices_gzk92b$=ps,Vh.optimizeReadOnlyList_qzupvv$=_s,Vh.binarySearch_jhx6be$=function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=t.size),ds(t.size,n,i);for(var o=n,r=i-1|0;o<=r;){var a=o+r>>>1,s=Xl(t.get_za3lpa$(a),e);if(s<0)o=a+1|0;else{if(!(s>0))return a;r=a-1|0}}return 0|-(o+1|0)},Vh.binarySearch_vikexg$=function(t,e,n,i,o){void 0===i&&(i=0),void 0===o&&(o=t.size),ds(t.size,i,o);for(var r=i,a=o-1|0;r<=a;){var s=r+a>>>1,l=t.get_za3lpa$(s),u=n.compare(l,e);if(u<0)r=s+1|0;else{if(!(u>0))return s;a=s-1|0}}return 0|-(r+1|0)},Xh.compareValues_s00gnj$=Xl,Vh.throwIndexOverflow=fs,Vh.throwCountOverflow=ms,Vh.IndexedValue=ys,Vh.IndexingIterable=gs,Vh.collectionSizeOrNull_7wnvza$=vs,Vh.flatten_u0ad8z$=function(t){var e,n=yi();for(e=t.iterator();e.hasNext();)Fs(n,e.next());return n},Vh.unzip_6hr0sd$=function(t){bs(t,10);var e,n=gi(),i=gi();for(e=t.iterator();e.hasNext();){var o=e.next();n.add_11rb$(o.first),i.add_11rb$(o.second)}return th(n,i)},Vh.IndexingIterator=ws,Vh.getOrImplicitDefault_t9ocha$=xs,Vh.emptyMap_q3lmfv$=Ns,Vh.mapOf_qfcya0$=function(t){return t.length>0?zs(t,no(t.length)):Ns()},Vh.mutableMapOf_qfcya0$=function(t){var e=no(t.length);return Is(e,t),e},Vh.hashMapOf_qfcya0$=Ps,Vh.getValue_t9ocha$=function(t,e){return xs(t,e)},Vh.putAll_5gv49o$=Is,Vh.putAll_cweazw$=As,Vh.putAll_2ud8ki$=Rs,Vh.toMap_6hr0sd$=js,Vh.toMap_jbpz7q$=Ls,Vh.toMap_ujwnei$=zs,Vh.toMap_ah2ab9$=function(t){return Bs(Ds(t,to()))},Vh.toMap_vxlxo8$=Ds,Vh.plus_cm8adq$=function(t,e){var n;if(t.isEmpty())n=js(e);else{var i=io(t);As(i,e),n=i}return n},Vh.plus_iwxh38$=function(t,e){var n=io(t);return n.putAll_a2k3zr$(e),n},Vh.minus_4pa84t$=function(t,e){var n=Ms(t);return n.remove_11rb$(e),Bs(n)},Vh.minus_uk696c$=function(t,e){var n=Ms(t);return Us(n.keys,e),Bs(n)},Vh.removeAll_ipc267$=Us,Vh.optimizeReadOnlyMap_1vp4qn$=Bs,Vh.retainAll_ipc267$=qs,Vh.removeAll_uhyeqt$=Hs,Vh.removeLast_vvxzk3$=function(t){if(t.isEmpty())throw new $n("List is empty.");return t.removeAt_za3lpa$(hs(t))},Vh.removeLastOrNull_vvxzk3$=function(t){return t.isEmpty()?null:t.removeAt_za3lpa$(hs(t))},Vh.removeAll_qafx1e$=Ks,Vh.retainAll_qafx1e$=function(t,e){return Vs(t,e,!1)},Vh.ByteIterator=Ys,Vh.CharIterator=Ws,Vh.ShortIterator=Xs,Vh.IntIterator=Zs,Vh.LongIterator=Js,Vh.FloatIterator=Qs,Vh.DoubleIterator=tl,Vh.BooleanIterator=el,Vh.asReversed_2p1efm$=function(t){return new nl(t)},Jh.sequence_o0x0bg$=rl,Jh.iterator_o0x0bg$=al,Jh.SequenceScope=sl,Jh.sequenceOf_i5x0yv$=ul,Jh.emptySequence_287e2$=cl,Jh.flatten_41nmvn$=fl,Jh.flatten_d9bjs1$=function(t){return yl(t,ml)},Jh.FilteringSequence=gl,Jh.TransformingSequence=bl,Jh.MergingSequence=xl,Jh.FlatteningSequence=Cl,Jh.DropTakeSequence=Sl,Jh.SubSequence=Tl,Jh.TakeSequence=Nl,Jh.DropSequence=Il,Jh.generateSequence_c6s9hp$=Ll,Object.defineProperty(Vh,"EmptySet",{get:Ml}),Vh.emptySet_287e2$=Bl,Vh.setOf_i5x0yv$=function(t){return t.length>0?lt(t):Bl()},Vh.mutableSetOf_i5x0yv$=function(t){return rt(t,lo(t.length))},Vh.hashSetOf_i5x0yv$=Fl,Vh.linkedSetOf_i5x0yv$=function(t){return rt(t,lo(t.length))},Vh.optimizeReadOnlySet_94kdbt$=Ul,Vh.checkWindowSizeStep_6xvm5r$=Hl,Vh.windowedSequence_38k18b$=Gl,Vh.windowedIterator_4ozct4$=Vl,Xh.compareBy_bvgy4j$=function(t){if(!(t.length>0))throw sn("Failed requirement.".toString());return new qn(Zl(t))},Xh.naturalOrder_dahdeg$=Jl,Xh.reverseOrder_dahdeg$=Ql,Xh.reversed_2avth4$=function(e){var n,i;return t.isType(e,tu)?e.comparator:s(e,iu())?t.isType(n=au(),qn)?n:yo():s(e,au())?t.isType(i=iu(),qn)?i:yo():new tu(e)},n_.Continuation=su,Gh.Result=Gp,n_.startCoroutine_x18nsh$=function(t,e){Je(Xe(t,e)).resumeWith_tl1gpc$(new Gp(Ce()))},n_.startCoroutine_3a617i$=function(t,e,n){Je(Ze(t,e,n)).resumeWith_tl1gpc$(new Gp(Ce()))},i_.get_COROUTINE_SUSPENDED=Ou,Object.defineProperty(lu,"Key",{get:pu}),n_.ContinuationInterceptor=lu,hu.Key=du,hu.Element=fu,n_.CoroutineContext=hu,n_.AbstractCoroutineContextElement=mu,n_.AbstractCoroutineContextKey=$u,Object.defineProperty(n_,"EmptyCoroutineContext",{get:vu}),n_.CombinedContext=bu,Object.defineProperty(i_,"COROUTINE_SUSPENDED",{get:Ou}),Object.defineProperty(Nu,"COROUTINE_SUSPENDED",{get:Iu}),Object.defineProperty(Nu,"UNDECIDED",{get:Au}),Object.defineProperty(Nu,"RESUMED",{get:Ru}),i_.CoroutineSingletons=Nu,Kh.getProgressionLastElement_qt1dr2$=Mu,Kh.getProgressionLastElement_b9bd0d$=Bu;var c_=Gh.properties||(Gh.properties={});c_.ReadOnlyProperty=Fu,c_.ReadWriteProperty=Uu,Object.defineProperty(qu,"Default",{get:Yu}),Wh.Random_za3lpa$=Wu,Wh.Random_s8cxhz$=function(t){return rc(t.toInt(),t.shiftRight(32).toInt())},Wh.fastLog2_kcn2v3$=Xu,Wh.takeUpperBits_b6l1hq$=Zu,Wh.checkRangeBounds_6xvm5r$=Ju,Wh.checkRangeBounds_cfj5zr$=Qu,Wh.checkRangeBounds_sdh6z7$=tc,Wh.boundsErrorMessage_dgzutr$=ec,Wh.XorWowRandom_init_6xvm5r$=rc,Wh.XorWowRandom=nc,Object.defineProperty(ac,"Companion",{get:uc}),Yh.CharRange=ac,Object.defineProperty(cc,"Companion",{get:_c}),Yh.IntRange=cc,Object.defineProperty(dc,"Companion",{get:$c}),Yh.LongRange=dc,Yh.CharProgressionIterator=yc,Yh.IntProgressionIterator=gc,Yh.LongProgressionIterator=vc,Object.defineProperty(bc,"Companion",{get:kc}),Yh.CharProgression=bc,Object.defineProperty(Cc,"Companion",{get:Tc}),Yh.IntProgression=Cc,Object.defineProperty(Oc,"Companion",{get:jc}),Yh.LongProgression=Oc,Yh.OpenEndRange=zc,Yh.ClosedFloatingPointRange=Bc,Yh.rangeTo_38ydlf$=function(t,e){return new Fc(t,e)},s_.KClassifier=Uc,Zh.appendElement_k2zgzt$=qc,Zh.equals_4lte5s$=Hc,Zh.isSurrogate_myv2d0$=function(t){return new ac(j.MIN_SURROGATE,j.MAX_SURROGATE).contains_mef7kx$(t)},Zh.trimMargin_rjktp$=function(t,e){return void 0===e&&(e="|"),Gc(t,"",e)},Zh.replaceIndentByMargin_j4ogox$=Gc,Zh.toIntOrNull_pdl1vz$=Vc,Zh.toIntOrNull_6ic1pp$=Yc,Zh.toLongOrNull_pdl1vz$=Wc,Zh.toLongOrNull_6ic1pp$=Xc,Zh.numberFormatError_y4putb$=Zc,Zh.trimStart_wqw3xr$=Jc,Zh.trimEnd_wqw3xr$=Qc,Zh.trim_gw00vp$=tp,Zh.padStart_yk9sg4$=ep,Zh.padStart_vrc1nu$=function(e,n,i){var o;return void 0===i&&(i=32),ep(t.isCharSequence(o=e)?o:yo(),n,i).toString()},Zh.padEnd_yk9sg4$=np,Zh.padEnd_vrc1nu$=function(e,n,i){var o;return void 0===i&&(i=32),np(t.isCharSequence(o=e)?o:yo(),n,i).toString()},Zh.substring_fc3b62$=sp,Zh.substring_i511yc$=lp,Zh.substringBefore_j4ogox$=function(t,e,n){void 0===n&&(n=t);var i=$p(t,e);return-1===i?n:t.substring(0,i)},Zh.substringAfter_j4ogox$=function(t,e,n){void 0===n&&(n=t);var i=$p(t,e);return-1===i?n:t.substring(i+e.length|0,t.length)},Zh.removePrefix_gsj5wt$=function(t,e){return hp(t,e)?t.substring(e.length):t},Zh.removeSuffix_gsj5wt$=function(t,e){return _p(t,e)?t.substring(0,t.length-e.length|0):t},Zh.removeSurrounding_90ijwr$=function(t,e,n){return t.length>=(e.length+n.length|0)&&hp(t,e)&&_p(t,n)?t.substring(e.length,t.length-n.length|0):t},Zh.regionMatchesImpl_4c7s8r$=up,Zh.startsWith_sgbm27$=cp,Zh.endsWith_sgbm27$=pp,Zh.startsWith_li3zpu$=hp,Zh.endsWith_li3zpu$=_p,Zh.indexOfAny_junqau$=dp,Zh.indexOf_8eortd$=mp,Zh.indexOf_l5u8uk$=$p,Zh.lastIndexOf_l5u8uk$=yp,Zh.contains_li3zpu$=function(t,e,n){return void 0===n&&(n=!1),"string"==typeof e?$p(t,e,void 0,n)>=0:fp(t,e,0,t.length,n)>=0},Zh.contains_sgbm27$=gp,Zh.requireNonNegativeLimit_kcn2v3$=Cp,Zh.splitToSequence_ip8yn$=Ep,Zh.split_ip8yn$=function(t,e,n,i){if(void 0===n&&(n=!1),void 0===i&&(i=0),1===e.length){var o=e[0];if(0!==o.length)return Sp(t,o,n,i)}var r,a=ie(kp(t,e,void 0,n,i)),s=gi(bs(a,10));for(r=a.iterator();r.hasNext();){var l=r.next();s.add_11rb$(lp(t,l))}return s},Zh.split_o64adg$=function(t,e,n,i){if(void 0===n&&(n=!1),void 0===i&&(i=0),1===e.length)return Sp(t,String.fromCharCode(e[0]),n,i);var o,r=ie(wp(t,e,void 0,n,i)),a=gi(bs(r,10));for(o=r.iterator();o.hasNext();){var s=o.next();a.add_11rb$(lp(t,s))}return a},Zh.lineSequence_gw00vp$=Tp,Zh.lines_gw00vp$=Op,Zh.MatchGroupCollection=Np,Zh.MatchNamedGroupCollection=Pp,Ip.Destructured=Ap,Zh.MatchResult=Ip,Gh.Lazy=Rp,Object.defineProperty(jp,"SYNCHRONIZED",{get:zp}),Object.defineProperty(jp,"PUBLICATION",{get:Dp}),Object.defineProperty(jp,"NONE",{get:Mp}),Gh.LazyThreadSafetyMode=jp,Object.defineProperty(Gh,"UNINITIALIZED_VALUE",{get:Up}),Gh.UnsafeLazyImpl=qp,Gh.InitializedLazyImpl=Hp,Gh.createFailure_tcv7n7$=Xp,Object.defineProperty(Gp,"Companion",{get:Yp}),Gp.Failure=Wp,Gh.throwOnFailure_iacion$=Zp,Gh.NotImplementedError=Jp,Gh.Pair=Qp,Gh.to_ujzrz7$=th,Gh.toList_tt9upe$=function(t){return ls([t.first,t.second])},Object.defineProperty(eh,"Companion",{get:oh}),Object.defineProperty(rh,"Companion",{get:lh}),Gh.uintCompare_vux9f0$=Mh,Gh.uintDivide_oqfnby$=function(e,n){return new rh(t.Long.fromInt(e.data).and(b).div(t.Long.fromInt(n.data).and(b)).toInt())},Gh.uintRemainder_oqfnby$=Fh,Gh.uintToDouble_za3lpa$=function(t){return(2147483647&t)+2*(t>>>31<<30)},Object.defineProperty(uh,"Companion",{get:hh}),Yh.UIntRange=uh,Object.defineProperty(_h,"Companion",{get:mh}),Yh.UIntProgression=_h,Object.defineProperty(yh,"Companion",{get:bh}),Gh.ulongCompare_3pjtqy$=Bh,Gh.ulongDivide_jpm79w$=function(e,n){var i=e.data,o=n.data;if(o.toNumber()<0)return Bh(e.data,n.data)<0?new yh(p):new yh(M);if(i.toNumber()>=0)return new yh(i.div(o));var r=i.shiftRightUnsigned(1).div(o).shiftLeft(1),a=i.subtract(r.multiply(o));return new yh(r.add(t.Long.fromInt(Bh(new yh(a).data,new yh(o).data)>=0?1:0)))},Gh.ulongRemainder_jpm79w$=Uh,Gh.ulongToDouble_s8cxhz$=function(t){return 2048*t.shiftRightUnsigned(11).toNumber()+t.and(U).toNumber()},Object.defineProperty(wh,"Companion",{get:Ch}),Yh.ULongRange=wh,Object.defineProperty(Eh,"Companion",{get:Oh}),Yh.ULongProgression=Eh,Kh.getProgressionLastElement_fjk8us$=Ah,Kh.getProgressionLastElement_15zasp$=Rh,Object.defineProperty(jh,"Companion",{get:Dh}),Gh.ulongToString_8e33dg$=qh,Gh.ulongToString_plstum$=Hh,$e.prototype.getOrDefault_xwzc9p$=fe.prototype.getOrDefault_xwzc9p$,Ba.prototype.getOrDefault_xwzc9p$=fe.prototype.getOrDefault_xwzc9p$,ui.prototype.remove_xwzc9p$=$e.prototype.remove_xwzc9p$,Ki.prototype.createJsMap=Yi.prototype.createJsMap,Wi.prototype.createJsMap=Yi.prototype.createJsMap,Object.defineProperty(na.prototype,"destructured",Object.getOwnPropertyDescriptor(Ip.prototype,"destructured")),ks.prototype.getOrDefault_xwzc9p$=fe.prototype.getOrDefault_xwzc9p$,Cs.prototype.remove_xwzc9p$=$e.prototype.remove_xwzc9p$,Cs.prototype.getOrDefault_xwzc9p$=$e.prototype.getOrDefault_xwzc9p$,ks.prototype.getOrDefault_xwzc9p$,Es.prototype.remove_xwzc9p$=Cs.prototype.remove_xwzc9p$,Es.prototype.getOrDefault_xwzc9p$=Cs.prototype.getOrDefault_xwzc9p$,Ss.prototype.getOrDefault_xwzc9p$=fe.prototype.getOrDefault_xwzc9p$,fu.prototype.plus_1fupul$=hu.prototype.plus_1fupul$,lu.prototype.fold_3cc69b$=fu.prototype.fold_3cc69b$,lu.prototype.plus_1fupul$=fu.prototype.plus_1fupul$,mu.prototype.get_j3r2sn$=fu.prototype.get_j3r2sn$,mu.prototype.fold_3cc69b$=fu.prototype.fold_3cc69b$,mu.prototype.minusKey_yeqjby$=fu.prototype.minusKey_yeqjby$,mu.prototype.plus_1fupul$=fu.prototype.plus_1fupul$,bu.prototype.plus_1fupul$=hu.prototype.plus_1fupul$,Dc.prototype.contains_mef7kx$=Lc.prototype.contains_mef7kx$,Dc.prototype.isEmpty=Lc.prototype.isEmpty,Mc.prototype.contains_mef7kx$=zc.prototype.contains_mef7kx$,Mc.prototype.isEmpty=zc.prototype.isEmpty,n=3.141592653589793,i=2.718281828459045,zn=null;var p_="undefined"!=typeof process&&process.versions&&!!process.versions.node;Ni=p_?new po(process.stdout):new _o,new $o(vu(),(function(e){var n;return Zp(e),null==(n=e.value)||t.isType(n,S)||v(),xe})),Pi=h.pow(2,-26),Ii=h.pow(2,-53),hr=t.newArray(0,null),new qn((function(t,e){return pa(t,e,!0)})),Vr=new Int8Array([f(239),f(191),f(189)]),Yr=65533,new Gp(Ou())}()},void 0===(i=n.apply(e,[e]))||(t.exports=i)},595:function(t,e,n){var i,o,r;o=[e,n(421)],void 0===(r="function"==typeof(i=function(t,e){"use strict";var n=e.defineInlineFunction,i=e.Kind.CLASS,o=(e.Long.ZERO,Array),r=e.Kind.OBJECT,a=(e.wrapFunction,e.toString),s=e.equals;function l(t){var e,n=o(t);e=n.length-1|0;for(var i=0;i<=e;i++)n[i]=f(null);this.array_0=n}function u(){}function c(){p=this,u.call(this)}c.prototype=Object.create(u.prototype),c.prototype.constructor=c,Object.defineProperty(l.prototype,"atomicfu$size",{configurable:!0,get:function(){return this.array_0.length}}),l.prototype.atomicfu$get=function(t){return this.array_0[t]},l.$metadata$={kind:i,simpleName:"AtomicArray",interfaces:[]},u.prototype.atomicfu$Trace$append$1=function(t){},u.prototype.atomicfu$Trace$append$2=function(t,e){},u.prototype.atomicfu$Trace$append$3=function(t,e,n){},u.prototype.atomicfu$Trace$append$4=function(t,e,n,i){},u.prototype.invoke_t0s8mz$=n("kotlinx-atomicfu.kotlinx.atomicfu.TraceBase.invoke_t0s8mz$",(function(t){this.atomicfu$Trace$append$1(t())})),c.$metadata$={kind:r,simpleName:"None",interfaces:[u]};var p=null;function h(){return null===p&&new c,p}function _(){}function d(t,e){return void 0===e&&(e=h()),new g(t)}function f(t){return d(t,h())}function m(t,e){return void 0===e&&(e=h()),new b(t)}function $(t,e){return void 0===e&&(e=h()),new w(t)}function y(t,e){return void 0===e&&(e=h()),new v(t)}function g(t){this.kotlinx$atomicfu$value=t}function v(t){this.kotlinx$atomicfu$value=t}function b(t){this.kotlinx$atomicfu$value=t}function w(t){this.kotlinx$atomicfu$value=t}function x(){}u.$metadata$={kind:i,simpleName:"TraceBase",interfaces:[]},_.prototype.atomicfu$TraceFormat$format=function(t,e){return t.toString()+": "+e.toString()},_.$metadata$={kind:i,simpleName:"TraceFormat",interfaces:[]},g.prototype.getValue_n5byny$=n("kotlinx-atomicfu.kotlinx.atomicfu.AtomicRef.getValue_n5byny$",(function(t,e){return this.kotlinx$atomicfu$value})),g.prototype.setValue_sq4zib$=n("kotlinx-atomicfu.kotlinx.atomicfu.AtomicRef.setValue_sq4zib$",(function(t,e,n){this.kotlinx$atomicfu$value=n})),g.prototype.lazySet_11rb$=n("kotlinx-atomicfu.kotlinx.atomicfu.AtomicRef.lazySet_11rb$",(function(t){this.kotlinx$atomicfu$value=t})),g.prototype.atomicfu$compareAndSet=function(t,e){return this.kotlinx$atomicfu$value===t&&(this.kotlinx$atomicfu$value=e,!0)},g.prototype.atomicfu$getAndSet=function(t){var e=this.kotlinx$atomicfu$value;return this.kotlinx$atomicfu$value=t,e},g.prototype.toString=function(){return a(this.kotlinx$atomicfu$value)},g.$metadata$={kind:i,simpleName:"AtomicRef",interfaces:[]},v.prototype.getValue_n5byny$=n("kotlinx-atomicfu.kotlinx.atomicfu.AtomicBoolean.getValue_n5byny$",(function(t,e){return this.kotlinx$atomicfu$value})),v.prototype.setValue_t08ssb$=n("kotlinx-atomicfu.kotlinx.atomicfu.AtomicBoolean.setValue_t08ssb$",(function(t,e,n){this.kotlinx$atomicfu$value=n})),v.prototype.lazySet_6taknv$=n("kotlinx-atomicfu.kotlinx.atomicfu.AtomicBoolean.lazySet_6taknv$",(function(t){this.kotlinx$atomicfu$value=t})),v.prototype.atomicfu$compareAndSet=function(t,e){return this.kotlinx$atomicfu$value===t&&(this.kotlinx$atomicfu$value=e,!0)},v.prototype.atomicfu$getAndSet=function(t){var e=this.kotlinx$atomicfu$value;return this.kotlinx$atomicfu$value=t,e},v.prototype.toString=function(){return this.kotlinx$atomicfu$value.toString()},v.$metadata$={kind:i,simpleName:"AtomicBoolean",interfaces:[]},b.prototype.getValue_n5byny$=n("kotlinx-atomicfu.kotlinx.atomicfu.AtomicInt.getValue_n5byny$",(function(t,e){return this.kotlinx$atomicfu$value})),b.prototype.setValue_4vfhis$=n("kotlinx-atomicfu.kotlinx.atomicfu.AtomicInt.setValue_4vfhis$",(function(t,e,n){this.kotlinx$atomicfu$value=n})),b.prototype.lazySet_za3lpa$=n("kotlinx-atomicfu.kotlinx.atomicfu.AtomicInt.lazySet_za3lpa$",(function(t){this.kotlinx$atomicfu$value=t})),b.prototype.atomicfu$compareAndSet=function(t,e){return this.kotlinx$atomicfu$value===t&&(this.kotlinx$atomicfu$value=e,!0)},b.prototype.atomicfu$getAndSet=function(t){var e=this.kotlinx$atomicfu$value;return this.kotlinx$atomicfu$value=t,e},b.prototype.atomicfu$getAndIncrement=function(){var t;return t=this.kotlinx$atomicfu$value,this.kotlinx$atomicfu$value=t+1|0,t},b.prototype.atomicfu$getAndDecrement=function(){var t;return t=this.kotlinx$atomicfu$value,this.kotlinx$atomicfu$value=t-1|0,t},b.prototype.atomicfu$getAndAdd=function(t){var e=this.kotlinx$atomicfu$value;return this.kotlinx$atomicfu$value=this.kotlinx$atomicfu$value+t|0,e},b.prototype.atomicfu$addAndGet=function(t){return this.kotlinx$atomicfu$value=this.kotlinx$atomicfu$value+t|0,this.kotlinx$atomicfu$value},b.prototype.atomicfu$incrementAndGet=function(){return this.kotlinx$atomicfu$value=this.kotlinx$atomicfu$value+1|0,this.kotlinx$atomicfu$value},b.prototype.atomicfu$decrementAndGet=function(){return this.kotlinx$atomicfu$value=this.kotlinx$atomicfu$value-1|0,this.kotlinx$atomicfu$value},b.prototype.plusAssign_za3lpa$=n("kotlinx-atomicfu.kotlinx.atomicfu.AtomicInt.plusAssign_za3lpa$",(function(t){this.atomicfu$getAndAdd(t)})),b.prototype.minusAssign_za3lpa$=n("kotlinx-atomicfu.kotlinx.atomicfu.AtomicInt.minusAssign_za3lpa$",(function(t){this.atomicfu$getAndAdd(0|-t)})),b.prototype.toString=function(){return this.kotlinx$atomicfu$value.toString()},b.$metadata$={kind:i,simpleName:"AtomicInt",interfaces:[]},w.prototype.getValue_n5byny$=n("kotlinx-atomicfu.kotlinx.atomicfu.AtomicLong.getValue_n5byny$",(function(t,e){return this.kotlinx$atomicfu$value})),w.prototype.setValue_9021kx$=n("kotlinx-atomicfu.kotlinx.atomicfu.AtomicLong.setValue_9021kx$",(function(t,e,n){this.kotlinx$atomicfu$value=n})),w.prototype.lazySet_s8cxhz$=n("kotlinx-atomicfu.kotlinx.atomicfu.AtomicLong.lazySet_s8cxhz$",(function(t){this.kotlinx$atomicfu$value=t})),w.prototype.atomicfu$compareAndSet=function(t,e){return!!s(this.kotlinx$atomicfu$value,t)&&(this.kotlinx$atomicfu$value=e,!0)},w.prototype.atomicfu$getAndSet=function(t){var e=this.kotlinx$atomicfu$value;return this.kotlinx$atomicfu$value=t,e},w.prototype.atomicfu$getAndIncrement$long=function(){var t;return t=this.kotlinx$atomicfu$value,this.kotlinx$atomicfu$value=t.inc(),t},w.prototype.atomicfu$getAndDecrement$long=function(){var t;return t=this.kotlinx$atomicfu$value,this.kotlinx$atomicfu$value=t.dec(),t},w.prototype.atomicfu$getAndAdd$long=function(t){var e=this.kotlinx$atomicfu$value;return this.kotlinx$atomicfu$value=this.kotlinx$atomicfu$value.add(t),e},w.prototype.atomicfu$addAndGet$long=function(t){return this.kotlinx$atomicfu$value=this.kotlinx$atomicfu$value.add(t),this.kotlinx$atomicfu$value},w.prototype.atomicfu$incrementAndGet$long=function(){return this.kotlinx$atomicfu$value=this.kotlinx$atomicfu$value.inc(),this.kotlinx$atomicfu$value},w.prototype.atomicfu$decrementAndGet$long=function(){return this.kotlinx$atomicfu$value=this.kotlinx$atomicfu$value.dec(),this.kotlinx$atomicfu$value},w.prototype.plusAssign_s8cxhz$=n("kotlinx-atomicfu.kotlinx.atomicfu.AtomicLong.plusAssign_s8cxhz$",(function(t){this.atomicfu$getAndAdd$long(t)})),w.prototype.minusAssign_s8cxhz$=n("kotlinx-atomicfu.kotlinx.atomicfu.AtomicLong.minusAssign_s8cxhz$",(function(t){this.atomicfu$getAndAdd$long(t.unaryMinus())})),w.prototype.toString=function(){return this.kotlinx$atomicfu$value.toString()},w.$metadata$={kind:i,simpleName:"AtomicLong",interfaces:[]},x.prototype.lock=n("kotlinx-atomicfu.kotlinx.atomicfu.locks.ReentrantLock.lock",(function(){})),x.prototype.tryLock=n("kotlinx-atomicfu.kotlinx.atomicfu.locks.ReentrantLock.tryLock",(function(){return!0})),x.prototype.unlock=n("kotlinx-atomicfu.kotlinx.atomicfu.locks.ReentrantLock.unlock",(function(){})),x.$metadata$={kind:i,simpleName:"ReentrantLock",interfaces:[]};var k=t.kotlinx||(t.kotlinx={}),C=k.atomicfu||(k.atomicfu={});return C.atomicfu$AtomicRefArray$ofNulls=function(t){return new l(t)},C.atomicfu$AtomicRefArray$ref=l,Object.defineProperty(u,"None",{get:h}),C.atomicfu$TraceBase=u,C.atomicfu$TraceFormat=_,C.atomic$ref$=d,C.atomic$ref$1=f,C.atomic$int$=m,C.atomic$int$1=function(t){return m(t,h())},C.atomic$long$=$,C.atomic$long$1=function(t){return $(t,h())},C.atomic$boolean$=y,C.atomic$boolean$1=function(t){return y(t,h())},C.AtomicRef=g,C.AtomicBoolean=v,C.AtomicInt=b,C.AtomicLong=w,(C.locks||(C.locks={})).ReentrantLock=x,new _,new x,t})?i.apply(e,o):i)||(t.exports=r)},197:function(t,e,n){var i,o,r;o=[e,n(421),n(595)],void 0===(r="function"==typeof(i=function(t,e,n){"use strict";var i,o=t.$$importsForInline$$||(t.$$importsForInline$$={}),r=Object,a=e.throwCCE,s=e.Kind.CLASS,l=e.kotlin.coroutines.Continuation,u=e.kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED,c=e.kotlin.coroutines.CoroutineImpl,p=(e.kotlin.collections.emptyList_287e2$,e.kotlin.Unit),h=e.throwUPAE,_=n.kotlinx.atomicfu.atomic$ref$1,d=n.kotlinx.atomicfu.atomic$int$1,f=(e.kotlin.collections.copyToArray,e.kotlin.coroutines.intrinsics.intercepted_f9mg25$),m=e.kotlin.collections.ArrayList_init_ww73n8$,$=e.kotlin.Result,y=e.kotlin.coroutines,g=e.kotlin.coroutines.intrinsics.createCoroutineUnintercepted_3a617i$,v=e.kotlin.coroutines.ContinuationInterceptor,b=e.equals,w=e.defineInlineFunction,x=e.wrapFunction,k=e.kotlin.IllegalStateException_init_pdl1vj$,C=e.Kind.INTERFACE,E=Error,S=e.toString,T=e.Kind.OBJECT,O=n.kotlinx.atomicfu.atomic$boolean$1,N=e.kotlin.coroutines.cancellation.CancellationException_init_pdl1vj$,P=e.kotlin.createFailure_tcv7n7$,I=e.kotlin.coroutines.AbstractCoroutineContextKey,A=e.kotlin.coroutines.AbstractCoroutineContextElement,R=e.kotlin.RuntimeException,j=e.kotlin.coroutines.CoroutineContext.Key,L=e.kotlin.coroutines.CoroutineContext.Element,z=e.kotlin.coroutines.cancellation.CancellationException_init_wspj0f$,D=e.kotlin.coroutines.startCoroutine_x18nsh$,M=e.kotlin.coroutines.startCoroutine_3a617i$,B=e.kotlin.Enum,F=e.throwISE,U=e.Long.MAX_VALUE,q=e.Long.ONE,H=e.Long.ZERO,G=new e.Long(0,1),K=(e.Long.fromInt(1e6),new e.Long(2077252342,2147),new e.Long(-1,1073741823),e.ensureNotNull),V=(e.kotlin.Comparable,e.kotlin.IllegalArgumentException_init_pdl1vj$),Y=e.kotlin.Error,W=e.kotlin.coroutines.cancellation.CancellationException,X=e.kotlin.IllegalStateException,Z=e.kotlin.sequences.sequence_o0x0bg$,J=e.kotlin.collections.ArrayList,Q=e.kotlin.text.StringBuilder_init,tt=e.kotlin.UnsupportedOperationException,et=e.kotlin.UnsupportedOperationException_init_pdl1vj$,nt=(e.kotlin.sequences.emptySequence_287e2$,e.kotlin.addSuppressed_oh0dqn$),it=Function,ot=(e.kotlin.ranges.coerceAtMost_2p08ub$,n.kotlinx.atomicfu.atomic$long$1),rt=e.kotlin.collections.fill_jfbbbd$,at=Math,st=e.kotlin.NoSuchElementException,lt=e.hashCode,ut=e.kotlin.collections.ArrayList_init_287e2$,ct=(e.kotlin.collections.indexOf_mjy6jw$,e.kotlin.collections.arrayCopy),pt=(e.kotlin.IndexOutOfBoundsException,e.kotlin.collections.LinkedHashMap_init_q3lmfv$,e.kotlin.collections.IndexedValue,e.kotlin.collections.HashSet_init_287e2$,e.kotlin.collections.LinkedHashSet_init_287e2$),ht=(e.kotlin.to_ujzrz7$,e.Long.NEG_ONE,e.kotlin.collections.copyOf_8ujjk8$,e.kotlin.collections.joinToString_fmv235$,e.kotlin.collections.listOf_mh5how$,e.toByte,e.kotlin.ranges.coerceAtLeast_dqglrj$,e.kotlin.ArithmeticException,new e.Long(0,805306368)),_t=e.Long.fromInt(1073741823),dt=new e.Long(-1073741824,268435455),ft=new e.Long(0,268435456),mt=new e.Long(0,536870912),$t=n.kotlinx.atomicfu.atomicfu$AtomicRefArray$ofNulls,yt=(e.kotlin.text.toBoolean_5cw0du$,e.kotlin.text.toLongOrNull_pdl1vz$),gt=e.kotlin.coroutines.intrinsics.createCoroutineUnintercepted_x18nsh$,vt=e.kotlin.collections.shuffle_vvxzk3$,bt=e.Long.fromInt(2147483647),wt=e.kotlin.ranges.coerceIn_ekzx8g$,xt=e.kotlin.collections.HashSet_init_ww73n8$,kt=(e.kotlin.collections.get_lastIndex_55thoc$,e.kotlin.NoSuchElementException_init,e.kotlin.collections.MutableIterator,e.kotlin.collections.AbstractMutableList,e.kotlin.UnsupportedOperationException_init);function Ct(t,e,n){_n.call(this,n),e&&this.initParentJob_5dx9e$(t.get_j3r2sn$(Ve())),this.context_p8rm81$_0=t.plus_1fupul$(this)}function Et(t,e){Ct.call(this,t,!0,e)}function St(t,e){c.call(this,e),this.exceptionState_0=1,this.$this=t}function Tt(t,e){Et.call(this,t,!1),this.continuation_0=g(e,this,this)}function Ot(t,e){Ct.call(this,t,!0,e)}function Nt(t,e){Ot.call(this,t,!1),this.continuation_0=g(e,this,this)}function Pt(t,e){lr.call(this,t,e),this._decision_0=d(0)}function It(){}function At(t){var n,i;return e.isType(t,Io)?null==(i=null!=(n=t.claimReusableCancellableContinuation())&&n.resetStateReusable_8be2vx$()?n:null)?new Dt(t,2):i:new Dt(t,1)}function Rt(t,e){t.invokeOnCancellation_f05bi3$(new Lt(e))}function jt(t,e){t.invokeOnCancellation_f05bi3$(new zt(e))}function Lt(t){Ht.call(this),this.node_0=t}function zt(t){qt.call(this),this.handle_0=t}function Dt(t,e){Lo.call(this,e),this.delegate_dhbmku$_0=t,this.context_xycjfy$_0=this.delegate.context,this._decision_0=d(0),this._state_0=_(Ut()),this.parentHandle_0=null}function Mt(){}function Bt(){Ft=this}Ct.prototype=Object.create(_n.prototype),Ct.prototype.constructor=Ct,qt.prototype=Object.create(Mr.prototype),qt.prototype.constructor=qt,Dr.prototype=Object.create(Ta.prototype),Dr.prototype.constructor=Dr,Cn.prototype=Object.create(Dr.prototype),Cn.prototype.constructor=Cn,Et.prototype=Object.create(Ct.prototype),Et.prototype.constructor=Et,Tt.prototype=Object.create(Et.prototype),Tt.prototype.constructor=Tt,Ot.prototype=Object.create(Ct.prototype),Ot.prototype.constructor=Ot,Nt.prototype=Object.create(Ot.prototype),Nt.prototype.constructor=Nt,lr.prototype=Object.create(Ct.prototype),lr.prototype.constructor=lr,Pt.prototype=Object.create(lr.prototype),Pt.prototype.constructor=Pt,Ht.prototype=Object.create(qt.prototype),Ht.prototype.constructor=Ht,Lt.prototype=Object.create(Ht.prototype),Lt.prototype.constructor=Lt,zt.prototype=Object.create(qt.prototype),zt.prototype.constructor=zt,Lo.prototype=Object.create(wa.prototype),Lo.prototype.constructor=Lo,Dt.prototype=Object.create(Lo.prototype),Dt.prototype.constructor=Dt,Gt.prototype=Object.create(qt.prototype),Gt.prototype.constructor=Gt,Yt.prototype=Object.create(_n.prototype),Yt.prototype.constructor=Yt,ne.prototype=Object.create(ee.prototype),ne.prototype.constructor=ne,oe.prototype=Object.create(I.prototype),oe.prototype.constructor=oe,ie.prototype=Object.create(A.prototype),ie.prototype.constructor=ie,de.prototype=Object.create(A.prototype),de.prototype.constructor=de,Ee.prototype=Object.create(B.prototype),Ee.prototype.constructor=Ee,ze.prototype=Object.create(ie.prototype),ze.prototype.constructor=ze,oa.prototype=Object.create(ze.prototype),oa.prototype.constructor=oa,Fe.prototype=Object.create(oa.prototype),Ue.prototype=Object.create(R.prototype),Ue.prototype.constructor=Ue,qe.prototype=Object.create(Y.prototype),qe.prototype.constructor=qe,$n.prototype=Object.create(Cn.prototype),$n.prototype.constructor=$n,yn.prototype=Object.create(Dt.prototype),yn.prototype.constructor=yn,xn.prototype=Object.create(_n.prototype),xn.prototype.constructor=xn,Aa.prototype=Object.create(Ta.prototype),Aa.prototype.constructor=Aa,En.prototype=Object.create(Aa.prototype),En.prototype.constructor=En,Tn.prototype=Object.create(Cn.prototype),Tn.prototype.constructor=Tn,On.prototype=Object.create(Cn.prototype),On.prototype.constructor=On,Nn.prototype=Object.create(Cn.prototype),Nn.prototype.constructor=Nn,Pn.prototype=Object.create(Cn.prototype),Pn.prototype.constructor=Pn,In.prototype=Object.create(Cn.prototype),In.prototype.constructor=In,An.prototype=Object.create(Cn.prototype),An.prototype.constructor=An,Rn.prototype=Object.create(Cn.prototype),Rn.prototype.constructor=Rn,jn.prototype=Object.create(Rn.prototype),jn.prototype.constructor=jn,Ln.prototype=Object.create(Rn.prototype),Ln.prototype.constructor=Ln,zn.prototype=Object.create(Rn.prototype),zn.prototype.constructor=zn,Dn.prototype=Object.create(ie.prototype),Dn.prototype.constructor=Dn,Mn.prototype=Object.create(A.prototype),Bn.prototype=Object.create(xn.prototype),Bn.prototype.constructor=Bn,qn.prototype=Object.create(lr.prototype),qn.prototype.constructor=qn,Hn.prototype=Object.create(W.prototype),Hn.prototype.constructor=Hn,Kn.prototype=Object.create(ie.prototype),Kn.prototype.constructor=Kn,Pa.prototype=Object.create(Po.prototype),Pa.prototype.constructor=Pa,Oa.prototype=Object.create(Pa.prototype),Oa.prototype.constructor=Oa,ci.prototype=Object.create(Oa.prototype),ci.prototype.constructor=ci,Na.prototype=Object.create(Pa.prototype),Na.prototype.constructor=Na,hi.prototype=Object.create(Na.prototype),hi.prototype.constructor=hi,Si.prototype=Object.create(Ta.prototype),Si.prototype.constructor=Si,di.prototype=Object.create(Si.prototype),di.prototype.constructor=di,fi.prototype=Object.create(Si.prototype),fi.prototype.constructor=fi,yi.prototype=Object.create(Na.prototype),yi.prototype.constructor=yi,bi.prototype=Object.create(Ht.prototype),bi.prototype.constructor=bi,Ii.prototype=Object.create(Ta.prototype),Ii.prototype.constructor=Ii,xi.prototype=Object.create(Ii.prototype),xi.prototype.constructor=xi,ki.prototype=Object.create(xi.prototype),ki.prototype.constructor=ki,Ci.prototype=Object.create(Ii.prototype),Ci.prototype.constructor=Ci,Ei.prototype=Object.create(Ii.prototype),Ei.prototype.constructor=Ei,mi.prototype=Object.create(ui.prototype),mi.prototype.constructor=mi,Oi.prototype=Object.create(Si.prototype),Oi.prototype.constructor=Oi,Ni.prototype=Object.create(Oi.prototype),Ni.prototype.constructor=Ni,Pi.prototype=Object.create(Si.prototype),Pi.prototype.constructor=Pi,Ai.prototype=Object.create(mi.prototype),Ai.prototype.constructor=Ai,Ri.prototype=Object.create(Ct.prototype),Li.prototype=Object.create(B.prototype),Li.prototype.constructor=Li,Yi.prototype=Object.create(Vi.prototype),Yi.prototype.constructor=Yi,co.prototype=Object.create(X.prototype),co.prototype.constructor=co,po.prototype=Object.create(st.prototype),po.prototype.constructor=po,ho.prototype=Object.create(Ct.prototype),fo.prototype=Object.create(mi.prototype),fo.prototype.constructor=fo,mo.prototype=Object.create(mi.prototype),mo.prototype.constructor=mo,yo.prototype=Object.create(mi.prototype),yo.prototype.constructor=yo,No.prototype=Object.create(Oo.prototype),No.prototype.constructor=No,Io.prototype=Object.create(Lo.prototype),Io.prototype.constructor=Io,Bo.prototype=Object.create(ie.prototype),Bo.prototype.constructor=Bo,sr.prototype=Object.create(R.prototype),sr.prototype.constructor=sr,Pr.prototype=Object.create(Rn.prototype),Pr.prototype.constructor=Pr,Ir.prototype=Object.create(Oo.prototype),Ir.prototype.constructor=Ir,Ar.prototype=Object.create(No.prototype),Ar.prototype.constructor=Ar,Rr.prototype=Object.create(Ta.prototype),Rr.prototype.constructor=Rr,Nr.prototype=Object.create(Aa.prototype),Nr.prototype.constructor=Nr,zr.prototype=Object.create(ie.prototype),zr.prototype.constructor=zr,Vr.prototype=Object.create(lr.prototype),Vr.prototype.constructor=Vr,ea.prototype=Object.create(Dn.prototype),ea.prototype.constructor=ea,ia.prototype=Object.create(ze.prototype),ia.prototype.constructor=ia,aa.prototype=Object.create(W.prototype),aa.prototype.constructor=aa,va.prototype=Object.create(To.prototype),va.prototype.constructor=va,ua.prototype=Object.create(va.prototype),ua.prototype.constructor=ua,la.prototype=Object.create(ie.prototype),la.prototype.constructor=la,ca.prototype=Object.create(la.prototype),ca.prototype.constructor=ca,_a.prototype=Object.create(la.prototype),_a.prototype.constructor=_a,ma.prototype=Object.create(qt.prototype),ma.prototype.constructor=ma,$a.prototype=Object.create(ie.prototype),$a.prototype.constructor=$a,ga.prototype=Object.create(va.prototype),ga.prototype.constructor=ga,Ca.prototype=Object.create(W.prototype),Ca.prototype.constructor=Ca,Ia.prototype=Object.create(Oo.prototype),Ia.prototype.constructor=Ia,Object.defineProperty(Ct.prototype,"context",{configurable:!0,get:function(){return this.context_p8rm81$_0}}),Object.defineProperty(Ct.prototype,"coroutineContext",{configurable:!0,get:function(){return this.context}}),Object.defineProperty(Ct.prototype,"isActive",{configurable:!0,get:function(){return e.callGetter(this,_n.prototype,"isActive")}}),Ct.prototype.onCompleted_11rb$=function(t){},Ct.prototype.onCancelled_z1nxw$=function(t,e){},Ct.prototype.cancellationExceptionMessage=function(){return Xr(this)+" was cancelled"},Ct.prototype.onCompletionInternal_s8jyv4$=function(t){var n;e.isType(t,ee)?this.onCancelled_z1nxw$(t.cause,t.handled):this.onCompleted_11rb$(null==(n=t)||e.isType(n,r)?n:a())},Ct.prototype.resumeWith_tl1gpc$=function(t){var e=this.makeCompletingOnce_8ea4ql$(Zt(t));e!==rn&&this.afterResume_s8jyv4$(e)},Ct.prototype.afterResume_s8jyv4$=function(t){this.afterCompletion_s8jyv4$(t)},Ct.prototype.handleOnCompletionException_tcv7n7$=function(t){le(this.context,t)},Ct.prototype.nameString=function(){var t;return null==(this.context,t=null)?_n.prototype.nameString.call(this):'"'+t+'":'+_n.prototype.nameString.call(this)},Ct.prototype.start_b5ul0p$=function(t,e,n){t.invoke_3o0yor$(n,e,this)},Ct.$metadata$={kind:s,simpleName:"AbstractCoroutine",interfaces:[ye,l,_n,He]},Et.prototype.getCompleted=function(){var t;return null==(t=this.getCompletedInternal_8be2vx$())||e.isType(t,r)?t:a()},St.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},St.prototype=Object.create(c.prototype),St.prototype.constructor=St,St.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;if(this.state_0=2,this.result_0=this.$this.awaitInternal_8be2vx$(this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:return null==(t=this.result_0)||e.isType(t,r)?t:a();default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Et.prototype.await=function(t,e){var n=new St(this,t);return e?n:n.doResume(null)},Object.defineProperty(Et.prototype,"onAwait",{configurable:!0,get:function(){return this}}),Et.prototype.registerSelectClause1_o3xas4$=function(t,e){this.registerSelectClause1Internal_u6kgbh$(t,e)},Et.$metadata$={kind:s,simpleName:"DeferredCoroutine",interfaces:[Er,Ae,Ct]},Tt.prototype.onStart=function(){fr(this.continuation_0,this)},Tt.$metadata$={kind:s,simpleName:"LazyDeferredCoroutine",interfaces:[Et]},w("kotlinx-coroutines-core.kotlinx.coroutines.invoke_5xrhu2$",x((function(){var n=t.kotlinx.coroutines.withContext_i5cbzn$;return function(t,i,o){return e.suspendCall(n(t,i,e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),Ot.prototype.handleJobException_tcv7n7$=function(t){return le(this.context,t),!0},Ot.$metadata$={kind:s,simpleName:"StandaloneCoroutine",interfaces:[Ct]},Nt.prototype.onStart=function(){fr(this.continuation_0,this)},Nt.$metadata$={kind:s,simpleName:"LazyStandaloneCoroutine",interfaces:[Ot]},Pt.prototype.trySuspend_0=function(){for(var t=this._decision_0;;)switch(t.kotlinx$atomicfu$value){case 0:if(this._decision_0.atomicfu$compareAndSet(0,1))return!0;break;case 2:return!1;default:throw k("Already suspended".toString())}},Pt.prototype.tryResume_0=function(){for(var t=this._decision_0;;)switch(t.kotlinx$atomicfu$value){case 0:if(this._decision_0.atomicfu$compareAndSet(0,2))return!0;break;case 1:return!1;default:throw k("Already resumed".toString())}},Pt.prototype.afterCompletion_s8jyv4$=function(t){this.afterResume_s8jyv4$(t)},Pt.prototype.afterResume_s8jyv4$=function(t){this.tryResume_0()||Ao(f(this.uCont),Qt(t,this.uCont))},Pt.prototype.getResult=function(){var t;if(this.trySuspend_0())return u;var n=bn(this.state_8be2vx$);if(e.isType(n,ee))throw n.cause;return null==(t=n)||e.isType(t,r)?t:a()},Pt.$metadata$={kind:s,simpleName:"DispatchedCoroutine",interfaces:[lr]},It.prototype.tryResume_19pj23$=function(t,e,n){return void 0===e&&(e=null),n?n(t,e):this.tryResume_19pj23$$default(t,e)},It.prototype.cancel_dbl4no$=function(t,e){return void 0===t&&(t=null),e?e(t):this.cancel_dbl4no$$default(t)},It.$metadata$={kind:C,simpleName:"CancellableContinuation",interfaces:[l]},w("kotlinx-coroutines-core.kotlinx.coroutines.suspendCancellableCoroutine_o6sdx9$",x((function(){var n=e.kotlin.coroutines.intrinsics.intercepted_f9mg25$,i=t.kotlinx.coroutines.CancellableContinuationImpl;return function(t,o){return e.suspendCall((r=t,function(t){var e=new i(n(t),1);return e.initCancellability(),r(e),e.getResult()})(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver());var r}}))),w("kotlinx-coroutines-core.kotlinx.coroutines.suspendCancellableCoroutineReusable_mkkzkw$",x((function(){var n=e.kotlin.coroutines.intrinsics.intercepted_f9mg25$,i=t.kotlinx.coroutines.getOrCreateCancellableContinuation_3j0xf1$;return function(t,o){return e.suspendCall((r=t,function(t){var e=i(n(t));return r(e),e.getResult()})(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver());var r}}))),Lt.prototype.invoke=function(t){this.node_0.remove()},Lt.prototype.toString=function(){return"RemoveOnCancel["+this.node_0+"]"},Lt.$metadata$={kind:s,simpleName:"RemoveOnCancel",interfaces:[Ht]},zt.prototype.invoke=function(t){this.handle_0.dispose()},zt.prototype.toString=function(){return"DisposeOnCancel["+this.handle_0+"]"},zt.$metadata$={kind:s,simpleName:"DisposeOnCancel",interfaces:[qt]},Object.defineProperty(Dt.prototype,"delegate",{get:function(){return this.delegate_dhbmku$_0}}),Object.defineProperty(Dt.prototype,"context",{configurable:!0,get:function(){return this.context_xycjfy$_0}}),Object.defineProperty(Dt.prototype,"state_8be2vx$",{configurable:!0,get:function(){return this._state_0.kotlinx$atomicfu$value}}),Object.defineProperty(Dt.prototype,"isActive",{configurable:!0,get:function(){return e.isType(this.state_8be2vx$,Mt)}}),Object.defineProperty(Dt.prototype,"isCompleted",{configurable:!0,get:function(){return!e.isType(this.state_8be2vx$,Mt)}}),Object.defineProperty(Dt.prototype,"isCancelled",{configurable:!0,get:function(){return e.isType(this.state_8be2vx$,ne)}}),Object.defineProperty(Dt.prototype,"stateDebugRepresentation_0",{configurable:!0,get:function(){var t;return t=this.state_8be2vx$,e.isType(t,Mt)?"Active":e.isType(t,ne)?"Cancelled":"Completed"}}),Dt.prototype.initCancellability=function(){var t;if(null!=(t=this.installParentHandle_0())){var e=t;this.isCompleted&&(e.dispose(),this.parentHandle_0=hn())}},Dt.prototype.isReusable_0=function(){var t;return jo(this.resumeMode)&&(e.isType(t=this.delegate,Io)?t:a()).isReusable()},Dt.prototype.resetStateReusable_8be2vx$=function(){var t=this._state_0.kotlinx$atomicfu$value;return e.isType(t,Kt)&&null!=t.idempotentResume?(this.detachChild_8be2vx$(),!1):(this._decision_0.kotlinx$atomicfu$value=0,this._state_0.kotlinx$atomicfu$value=Ut(),!0)},Object.defineProperty(Dt.prototype,"callerFrame",{configurable:!0,get:function(){var t;return e.isType(t=this.delegate,za)?t:null}}),Dt.prototype.getStackTraceElement=function(){return null},Dt.prototype.takeState=function(){return this.state_8be2vx$},Dt.prototype.cancelCompletedResult_83a7kv$=function(t,n){for(var i=this._state_0;;){var o=i.kotlinx$atomicfu$value;if(e.isType(o,Mt))throw k("Not completed".toString());if(e.isType(o,ee))return;if(e.isType(o,Kt)){if(o.cancelled)throw k("Must be called at most once".toString());var r=o.copy_pkdjca$(void 0,void 0,void 0,void 0,n);if(this._state_0.atomicfu$compareAndSet(o,r))return void o.invokeHandlers_gygfbe$(this,n)}else if(this._state_0.atomicfu$compareAndSet(o,new Kt(o,void 0,void 0,void 0,n)))return}},Dt.prototype.cancelLater_0=function(t){var n;return!!this.isReusable_0()&&(e.isType(n=this.delegate,Io)?n:a()).postponeCancellation_tcv7n7$(t)},Dt.prototype.cancel_dbl4no$$default=function(t){for(var n=this._state_0;;){var i=n.kotlinx$atomicfu$value;t:do{var o,r;if(!e.isType(i,Mt))return!1;var a=new ne(this,t,e.isType(i,qt));if(!this._state_0.atomicfu$compareAndSet(i,a))break t;return null!=(r=e.isType(o=i,qt)?o:null)&&this.callCancelHandler_gluymk$(r,t),this.detachChildIfNonResuable_0(),this.dispatchResume_0(this.resumeMode),!0}while(0)}},Dt.prototype.parentCancelled_8o0b5c$=function(t){this.cancelLater_0(t)||(this.cancel_dbl4no$(t),this.detachChildIfNonResuable_0())},Dt.prototype.callCancelHandlerSafely_0=function(t){try{t()}catch(t){if(!e.isType(t,E))throw t;le(this.context,new Ue("Exception in invokeOnCancellation handler for "+this,t))}},Dt.prototype.callCancelHandler_0=function(t,n){try{Br(t,n)}catch(t){if(!e.isType(t,E))throw t;le(this.context,new Ue("Exception in invokeOnCancellation handler for "+this,t))}},Dt.prototype.callCancelHandler_gluymk$=function(t,n){try{t.invoke(n)}catch(t){if(!e.isType(t,E))throw t;le(this.context,new Ue("Exception in invokeOnCancellation handler for "+this,t))}},Dt.prototype.callOnCancellation_e590hv$=function(t,n){try{t(n)}catch(t){if(!e.isType(t,E))throw t;le(this.context,new Ue("Exception in resume onCancellation handler for "+this,t))}},Dt.prototype.getContinuationCancellationCause_dqr1mp$=function(t){return t.getCancellationException()},Dt.prototype.trySuspend_0=function(){for(var t=this._decision_0;;)switch(t.kotlinx$atomicfu$value){case 0:if(this._decision_0.atomicfu$compareAndSet(0,1))return!0;break;case 2:return!1;default:throw k("Already suspended".toString())}},Dt.prototype.tryResume_0=function(){for(var t=this._decision_0;;)switch(t.kotlinx$atomicfu$value){case 0:if(this._decision_0.atomicfu$compareAndSet(0,2))return!0;break;case 1:return!1;default:throw k("Already resumed".toString())}},Dt.prototype.getResult=function(){var t=this.isReusable_0();if(this.trySuspend_0())return null==this.parentHandle_0&&this.installParentHandle_0(),t&&this.releaseClaimedReusableContinuation_0(),u;t&&this.releaseClaimedReusableContinuation_0();var n=this.state_8be2vx$;if(e.isType(n,ee))throw Ra(n.cause);if(Ro(this.resumeMode)){var i=this.context.get_j3r2sn$(Ve());if(null!=i&&!i.isActive){var o=i.getCancellationException();throw this.cancelCompletedResult_83a7kv$(n,o),Ra(o)}}return this.getSuccessfulResult_tpy1pm$(n)},Dt.prototype.installParentHandle_0=function(){var t;if(null==(t=this.context.get_j3r2sn$(Ve())))return null;var e=t.invokeOnCompletion_ct2b2z$(!0,void 0,new zn(this));return this.parentHandle_0=e,e},Dt.prototype.releaseClaimedReusableContinuation_0=function(){var t,n,i;if(null!=(i=null!=(n=e.isType(t=this.delegate,Io)?t:null)?n.tryReleaseClaimedContinuation_jp3215$(this):null)){var o=i;this.detachChild_8be2vx$(),this.cancel_dbl4no$(o)}},Dt.prototype.resumeWith_tl1gpc$=function(t){this.resumeImpl_0(Jt(t,this),this.resumeMode)},Dt.prototype.resume_q1ktlu$=function(t,e){this.resumeImpl_0(t,this.resumeMode,e)},Dt.prototype.invokeOnCancellation_f05bi3$=function(t){for(var n=this.makeCancelHandler_0(t),i=this._state_0;;){var o,r,a=i.kotlinx$atomicfu$value;if(e.isType(a,Bt)){if(this._state_0.atomicfu$compareAndSet(a,n))return}else if(e.isType(a,qt))this.multipleHandlersError_0(t,a);else{if(e.isType(a,ee))return a.makeHandled()||this.multipleHandlersError_0(t,a),void(e.isType(a,ne)&&this.callCancelHandler_0(t,null!=(r=e.isType(o=a,ee)?o:null)?r.cause:null));if(e.isType(a,Kt)){if(null!=a.cancelHandler&&this.multipleHandlersError_0(t,a),e.isType(n,Ht))return;if(a.cancelled)return void this.callCancelHandler_0(t,a.cancelCause);var s=a.copy_pkdjca$(void 0,n);if(this._state_0.atomicfu$compareAndSet(a,s))return}else{if(e.isType(n,Ht))return;var l=new Kt(a,n);if(this._state_0.atomicfu$compareAndSet(a,l))return}}}},Dt.prototype.multipleHandlersError_0=function(t,e){throw k(("It's prohibited to register multiple handlers, tried to register "+t+", already has "+S(e)).toString())},Dt.prototype.makeCancelHandler_0=function(t){return e.isType(t,qt)?t:new Gt(t)},Dt.prototype.dispatchResume_0=function(t){this.tryResume_0()||zo(this,t)},Dt.prototype.resumedState_0=function(t,n,i,o,r){var a;return e.isType(n,ee)||!Ro(i)&&null==r||null==o&&(!e.isType(t,qt)||e.isType(t,Ht))&&null==r?n:new Kt(n,e.isType(a=t,qt)?a:null,o,r)},Dt.prototype.resumeImpl_0=function(t,n,i){void 0===i&&(i=null);for(var o=this._state_0;;){var r=o.kotlinx$atomicfu$value;t:do{if(e.isType(r,Mt)){var a=this.resumedState_0(r,t,n,i,null);if(!this._state_0.atomicfu$compareAndSet(r,a))break t;return this.detachChildIfNonResuable_0(),void this.dispatchResume_0(n)}if(e.isType(r,ne)&&r.makeResumed())return void(null!=i&&this.callOnCancellation_e590hv$(i,r.cause));this.alreadyResumedError_0(t)}while(0)}},Dt.prototype.tryResumeImpl_0=function(t,n,o){for(var r=this._state_0;;){var a=r.kotlinx$atomicfu$value;t:do{if(e.isType(a,Mt)){var s=this.resumedState_0(a,t,this.resumeMode,o,n);if(!this._state_0.atomicfu$compareAndSet(a,s))break t;return this.detachChildIfNonResuable_0(),i}return e.isType(a,Kt)&&null!=n&&a.idempotentResume===n?i:null}while(0)}},Dt.prototype.alreadyResumedError_0=function(t){throw k(("Already resumed, but proposed with update "+S(t)).toString())},Dt.prototype.detachChildIfNonResuable_0=function(){this.isReusable_0()||this.detachChild_8be2vx$()},Dt.prototype.detachChild_8be2vx$=function(){var t;null!=(t=this.parentHandle_0)&&(t.dispose(),this.parentHandle_0=hn())},Dt.prototype.tryResume_19pj23$$default=function(t,e){return this.tryResumeImpl_0(t,e,null)},Dt.prototype.tryResume_i8qury$=function(t,e,n){return this.tryResumeImpl_0(t,e,n)},Dt.prototype.tryResumeWithException_tcv7n7$=function(t){return this.tryResumeImpl_0(new ee(t),null,null)},Dt.prototype.completeResume_za3rmp$=function(t){this.dispatchResume_0(this.resumeMode)},Dt.prototype.resumeUndispatched_hyuxa3$=function(t,n){var i,o=e.isType(i=this.delegate,Io)?i:null;this.resumeImpl_0(n,(null!=o?o.dispatcher:null)===t?4:this.resumeMode)},Dt.prototype.resumeUndispatchedWithException_gd0rtt$=function(t,n){var i,o=e.isType(i=this.delegate,Io)?i:null;this.resumeImpl_0(new ee(n),(null!=o?o.dispatcher:null)===t?4:this.resumeMode)},Dt.prototype.getSuccessfulResult_tpy1pm$=function(t){var n,i;return e.isType(t,Kt)?null==(n=t.result)||e.isType(n,r)?n:a():null==(i=t)||e.isType(i,r)?i:a()},Dt.prototype.getExceptionalResult_s8jyv4$=function(t){var e;return null!=(e=Lo.prototype.getExceptionalResult_s8jyv4$.call(this,t))?Ra(e,this.delegate):null},Dt.prototype.toString=function(){return this.nameString()+"("+Gr(this.delegate)+"){"+this.stateDebugRepresentation_0+"}@"+Wr(this)},Dt.prototype.nameString=function(){return"CancellableContinuation"},Dt.$metadata$={kind:s,simpleName:"CancellableContinuationImpl",interfaces:[za,It,Lo]},Mt.$metadata$={kind:C,simpleName:"NotCompleted",interfaces:[]},Bt.prototype.toString=function(){return"Active"},Bt.$metadata$={kind:T,simpleName:"Active",interfaces:[Mt]};var Ft=null;function Ut(){return null===Ft&&new Bt,Ft}function qt(){Mr.call(this)}function Ht(){qt.call(this)}function Gt(t){qt.call(this),this.handler_0=t}function Kt(t,e,n,i,o){void 0===e&&(e=null),void 0===n&&(n=null),void 0===i&&(i=null),void 0===o&&(o=null),this.result=t,this.cancelHandler=e,this.onCancellation=n,this.idempotentResume=i,this.cancelCause=o}function Vt(){}function Yt(t){_n.call(this,!0),this.initParentJob_5dx9e$(t)}function Wt(t,e){c.call(this,e),this.exceptionState_0=1,this.$this=t}function Xt(){}function Zt(t,n){var i,o;void 0===n&&(n=null);var s=t.exceptionOrNull();if(null==s){var l=null==(i=t.value)||e.isType(i,r)?i:a();o=null!=n?new te(l,n):l}else o=new ee(s);return o}function Jt(t,n){var i,o=t.exceptionOrNull();return null==o?null==(i=t.value)||e.isType(i,r)?i:a():new ee(Ra(o))}function Qt(t,n){var i;return e.isType(t,ee)?new $(P(Ra(t.cause))):($.Companion,new $(null==(i=t)||e.isType(i,r)?i:a()))}function te(t,e){this.result=t,this.onCancellation=e}function ee(t,e){void 0===e&&(e=!1),this.cause=t,this._handled_0=O(e)}function ne(t,e,n){ee.call(this,null!=e?e:N("Continuation "+t+" was cancelled normally"),n),this._resumed_0=O(!1)}function ie(){se(),A.call(this,v.Key)}function oe(){ae=this,I.call(this,v.Key,re)}function re(t){var n;return e.isType(n=t,ie)?n:null}qt.$metadata$={kind:s,simpleName:"CancelHandler",interfaces:[Mt,Mr]},Ht.$metadata$={kind:s,simpleName:"BeforeResumeCancelHandler",interfaces:[qt]},Gt.prototype.invoke=function(t){this.handler_0(t)},Gt.prototype.toString=function(){return"InvokeOnCancel["+Xr(this.handler_0)+"@"+Wr(this)+"]"},Gt.$metadata$={kind:s,simpleName:"InvokeOnCancel",interfaces:[qt]},Object.defineProperty(Kt.prototype,"cancelled",{configurable:!0,get:function(){return null!=this.cancelCause}}),Kt.prototype.invokeHandlers_gygfbe$=function(t,e){var n,i;null!=(n=this.cancelHandler)&&t.callCancelHandler_gluymk$(n,e),null!=(i=this.onCancellation)&&t.callOnCancellation_e590hv$(i,e)},Kt.$metadata$={kind:s,simpleName:"CompletedContinuation",interfaces:[]},Kt.prototype.component1=function(){return this.result},Kt.prototype.component2=function(){return this.cancelHandler},Kt.prototype.component3=function(){return this.onCancellation},Kt.prototype.component4=function(){return this.idempotentResume},Kt.prototype.component5=function(){return this.cancelCause},Kt.prototype.copy_pkdjca$=function(t,e,n,i,o){return new Kt(void 0===t?this.result:t,void 0===e?this.cancelHandler:e,void 0===n?this.onCancellation:n,void 0===i?this.idempotentResume:i,void 0===o?this.cancelCause:o)},Kt.prototype.toString=function(){return"CompletedContinuation(result="+e.toString(this.result)+", cancelHandler="+e.toString(this.cancelHandler)+", onCancellation="+e.toString(this.onCancellation)+", idempotentResume="+e.toString(this.idempotentResume)+", cancelCause="+e.toString(this.cancelCause)+")"},Kt.prototype.hashCode=function(){var t=0;return 31*(t=31*(t=31*(t=31*(t=31*t+e.hashCode(this.result)|0)+e.hashCode(this.cancelHandler)|0)+e.hashCode(this.onCancellation)|0)+e.hashCode(this.idempotentResume)|0)+e.hashCode(this.cancelCause)|0},Kt.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.result,t.result)&&e.equals(this.cancelHandler,t.cancelHandler)&&e.equals(this.onCancellation,t.onCancellation)&&e.equals(this.idempotentResume,t.idempotentResume)&&e.equals(this.cancelCause,t.cancelCause)},Vt.$metadata$={kind:C,simpleName:"CompletableDeferred",interfaces:[Ae]},Object.defineProperty(Yt.prototype,"onCancelComplete",{configurable:!0,get:function(){return!0}}),Yt.prototype.getCompleted=function(){var t;return null==(t=this.getCompletedInternal_8be2vx$())||e.isType(t,r)?t:a()},Wt.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},Wt.prototype=Object.create(c.prototype),Wt.prototype.constructor=Wt,Wt.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;if(this.state_0=2,this.result_0=this.$this.awaitInternal_8be2vx$(this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:return null==(t=this.result_0)||e.isType(t,r)?t:a();default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Yt.prototype.await=function(t,e){var n=new Wt(this,t);return e?n:n.doResume(null)},Object.defineProperty(Yt.prototype,"onAwait",{configurable:!0,get:function(){return this}}),Yt.prototype.registerSelectClause1_o3xas4$=function(t,e){this.registerSelectClause1Internal_u6kgbh$(t,e)},Yt.prototype.complete_11rb$=function(t){return this.makeCompleting_8ea4ql$(t)},Yt.prototype.completeExceptionally_tcv7n7$=function(t){return this.makeCompleting_8ea4ql$(new ee(t))},Yt.$metadata$={kind:s,simpleName:"CompletableDeferredImpl",interfaces:[Er,Vt,_n]},Xt.$metadata$={kind:C,simpleName:"CompletableJob",interfaces:[He]},te.$metadata$={kind:s,simpleName:"CompletedWithCancellation",interfaces:[]},te.prototype.component1=function(){return this.result},te.prototype.component2=function(){return this.onCancellation},te.prototype.copy_pe4fyg$=function(t,e){return new te(void 0===t?this.result:t,void 0===e?this.onCancellation:e)},te.prototype.toString=function(){return"CompletedWithCancellation(result="+e.toString(this.result)+", onCancellation="+e.toString(this.onCancellation)+")"},te.prototype.hashCode=function(){var t=0;return 31*(t=31*t+e.hashCode(this.result)|0)+e.hashCode(this.onCancellation)|0},te.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.result,t.result)&&e.equals(this.onCancellation,t.onCancellation)},Object.defineProperty(ee.prototype,"handled",{configurable:!0,get:function(){return this._handled_0.kotlinx$atomicfu$value}}),ee.prototype.makeHandled=function(){return this._handled_0.atomicfu$compareAndSet(!1,!0)},ee.prototype.toString=function(){return Xr(this)+"["+this.cause+"]"},ee.$metadata$={kind:s,simpleName:"CompletedExceptionally",interfaces:[]},ne.prototype.makeResumed=function(){return this._resumed_0.atomicfu$compareAndSet(!1,!0)},ne.$metadata$={kind:s,simpleName:"CancelledContinuation",interfaces:[ee]},oe.$metadata$={kind:T,simpleName:"Key",interfaces:[I]};var ae=null;function se(){return null===ae&&new oe,ae}function le(t,n){var i;try{if(null!=(i=t.get_j3r2sn$(_e())))return void i.handleException_1ur55u$(t,n)}catch(t){if(e.isType(t,E))return void Yr(0,ue(n,t));throw t}Yr(0,n)}function ue(t,e){return t===e?t:new R("Exception while trying to handle coroutine exception",e)}function ce(){_e()}function pe(){he=this}ie.prototype.isDispatchNeeded_1fupul$=function(t){return!0},ie.prototype.limitedParallelism_za3lpa$=function(t){return Fo(t),new Bo(this,t)},ie.prototype.dispatchYield_5bn72i$=function(t,e){this.dispatch_5bn72i$(t,e)},ie.prototype.interceptContinuation_wj8d80$=function(t){return new Io(this,t)},ie.prototype.releaseInterceptedContinuation_k98bjh$=function(t){var n;(e.isType(n=t,Io)?n:a()).release()},ie.prototype.plus_9wrrq5$=function(t){return t},ie.prototype.toString=function(){return Xr(this)+"@"+Wr(this)},ie.$metadata$={kind:s,simpleName:"CoroutineDispatcher",interfaces:[v,A]},pe.$metadata$={kind:T,simpleName:"Key",interfaces:[j]};var he=null;function _e(){return null===he&&new pe,he}function de(t){$e(),A.call(this,$e()),this.name=t}function fe(){me=this}ce.$metadata$={kind:C,simpleName:"CoroutineExceptionHandler",interfaces:[L]},fe.$metadata$={kind:T,simpleName:"Key",interfaces:[j]};var me=null;function $e(){return null===me&&new fe,me}function ye(){}function ge(){ke=this}de.prototype.toString=function(){return"CoroutineName("+this.name+")"},de.$metadata$={kind:s,simpleName:"CoroutineName",interfaces:[A]},de.prototype.component1=function(){return this.name},de.prototype.copy_61zpoe$=function(t){return new de(void 0===t?this.name:t)},de.prototype.hashCode=function(){var t=0;return 31*t+e.hashCode(this.name)|0},de.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.name,t.name)},ye.$metadata$={kind:C,simpleName:"CoroutineScope",interfaces:[]},Object.defineProperty(ge.prototype,"coroutineContext",{configurable:!0,get:function(){return y.EmptyCoroutineContext}}),ge.$metadata$={kind:T,simpleName:"GlobalScope",interfaces:[ye]};var ve,be,we,xe,ke=null;function Ce(t,e){var n;if(void 0===e&&(e=null),null==(n=t.coroutineContext.get_j3r2sn$(Ve())))throw k(("Scope cannot be cancelled because it does not have a job: "+t).toString());n.cancel_x5z25k$(e)}function Ee(t,e){B.call(this),this.name$=t,this.ordinal$=e}function Se(){Se=function(){},ve=new Ee("DEFAULT",0),be=new Ee("LAZY",1),we=new Ee("ATOMIC",2),xe=new Ee("UNDISPATCHED",3)}function Te(){return Se(),ve}function Oe(){return Se(),be}function Ne(){return Se(),we}function Pe(){return Se(),xe}function Ie(){}function Ae(){}function Re(t){return function(e){var n=new Dt(f(e),1);return n.initCancellability(),t(n),n.getResult()}}function je(){}function Le(t){var n,i;return null!=(i=e.isType(n=t.get_j3r2sn$(v.Key),je)?n:null)?i:Ur()}function ze(){ie.call(this),this.useCount_0=H,this.shared_0=!1,this.unconfinedQueue_0=null}function De(){Me=this,this.ref_0=new Fa}w("kotlinx-coroutines-core.kotlinx.coroutines.currentCoroutineContext",(function(t){return e.coroutineReceiver().context})),Ee.prototype.invoke_810yno$=function(t,n){switch(this.name){case"DEFAULT":_r(t,n);break;case"ATOMIC":D(t,n);break;case"UNDISPATCHED":gr(t,n);break;case"LAZY":break;default:e.noWhenBranchMatched()}},Ee.prototype.invoke_3o0yor$=function(t,n,i){switch(this.name){case"DEFAULT":dr(t,n,i);break;case"ATOMIC":M(t,n,i);break;case"UNDISPATCHED":vr(t,n,i);break;case"LAZY":break;default:e.noWhenBranchMatched()}},Object.defineProperty(Ee.prototype,"isLazy",{configurable:!0,get:function(){return this===Oe()}}),Ee.$metadata$={kind:s,simpleName:"CoroutineStart",interfaces:[B]},Ee.values=function(){return[Te(),Oe(),Ne(),Pe()]},Ee.valueOf_61zpoe$=function(t){switch(t){case"DEFAULT":return Te();case"LAZY":return Oe();case"ATOMIC":return Ne();case"UNDISPATCHED":return Pe();default:F("No enum constant kotlinx.coroutines.CoroutineStart."+t)}},Ie.$metadata$={kind:C,simpleName:"CopyableThrowable",interfaces:[]},Ae.$metadata$={kind:C,simpleName:"Deferred",interfaces:[He]},je.prototype.delay_s8cxhz$=function(t,e){if(!(t.toNumber()<=0))return Re((n=t,i=this,function(t){return i.scheduleResumeAfterDelay_egqmvs$(n,t),p}))(e);var n,i},je.prototype.invokeOnTimeout_oczv3n$=function(t,e,n){return Ur().invokeOnTimeout_oczv3n$(t,e,n)},je.$metadata$={kind:C,simpleName:"Delay",interfaces:[]},ze.prototype.processNextEvent=function(){return this.processUnconfinedEvent()?H:U},Object.defineProperty(ze.prototype,"isEmpty",{configurable:!0,get:function(){return this.isUnconfinedQueueEmpty}}),Object.defineProperty(ze.prototype,"nextTime",{configurable:!0,get:function(){var t;return null==(t=this.unconfinedQueue_0)||t.isEmpty?U:H}}),ze.prototype.processUnconfinedEvent=function(){var t,e;return null!=(t=this.unconfinedQueue_0)&&null!=(e=t.removeFirstOrNull())&&(e.run(),!0)},ze.prototype.shouldBeProcessedFromContext=function(){return!1},ze.prototype.dispatchUnconfined_4avnfa$=function(t){var e,n;if(null!=(e=this.unconfinedQueue_0))n=e;else{var i=new To;this.unconfinedQueue_0=i,n=i}n.addLast_trkh7z$(t)},Object.defineProperty(ze.prototype,"isActive",{configurable:!0,get:function(){return this.useCount_0.toNumber()>0}}),Object.defineProperty(ze.prototype,"isUnconfinedLoopActive",{configurable:!0,get:function(){return this.useCount_0.compareTo_11rb$(this.delta_0(!0))>=0}}),Object.defineProperty(ze.prototype,"isUnconfinedQueueEmpty",{configurable:!0,get:function(){var t,e;return null==(e=null!=(t=this.unconfinedQueue_0)?t.isEmpty:null)||e}}),ze.prototype.delta_0=function(t){return t?G:q},ze.prototype.incrementUseCount_6taknv$=function(t){void 0===t&&(t=!1),this.useCount_0=this.useCount_0.add(this.delta_0(t)),t||(this.shared_0=!0)},ze.prototype.decrementUseCount_6taknv$=function(t){void 0===t&&(t=!1),this.useCount_0=this.useCount_0.subtract(this.delta_0(t)),this.useCount_0.toNumber()>0||this.shared_0&&this.shutdown()},ze.prototype.limitedParallelism_za3lpa$=function(t){return Fo(t),this},ze.prototype.shutdown=function(){},ze.$metadata$={kind:s,simpleName:"EventLoop",interfaces:[ie]},Object.defineProperty(De.prototype,"eventLoop_8be2vx$",{configurable:!0,get:function(){var t,e;if(null!=(t=this.ref_0.get()))e=t;else{var n=na();this.ref_0.set_11rb$(n),e=n}return e}}),De.prototype.currentOrNull_8be2vx$=function(){return this.ref_0.get()},De.prototype.resetEventLoop_8be2vx$=function(){this.ref_0.set_11rb$(null)},De.prototype.setEventLoop_13etkv$=function(t){this.ref_0.set_11rb$(t)},De.$metadata$={kind:T,simpleName:"ThreadLocalEventLoop",interfaces:[]};var Me=null;function Be(){return null===Me&&new De,Me}function Fe(){oa.call(this),this._queue_0=_(null),this._delayed_0=_(null),this._isCompleted_0=O(!1)}function Ue(t,e){R.call(this,t,e),this.name="CompletionHandlerException"}function qe(t,e){Y.call(this,t,e),this.name="CoroutinesInternalError"}function He(){Ve()}function Ge(){Ke=this}Ue.$metadata$={kind:s,simpleName:"CompletionHandlerException",interfaces:[R]},qe.$metadata$={kind:s,simpleName:"CoroutinesInternalError",interfaces:[Y]},Ge.$metadata$={kind:T,simpleName:"Key",interfaces:[j]};var Ke=null;function Ve(){return null===Ke&&new Ge,Ke}function Ye(t){return void 0===t&&(t=null),new xn(t)}function We(t){this.function$=t}function Xe(){}function Ze(){}function Je(){}function Qe(t,e){return t.invokeOnCompletion_f05bi3$(new Pn(e))}function tn(t){if(!t.isActive)throw t.getCancellationException()}function en(t){var e;null!=(e=t.get_j3r2sn$(Ve()))&&tn(e)}function nn(){pn=this}He.prototype.cancel_x5z25k$=function(t,e){void 0===t&&(t=null),e?e(t):this.cancel_x5z25k$$default(t)},He.prototype.cancel=function(){this.cancel_x5z25k$(null)},He.prototype.cancel_dbl4no$=function(t,e){return void 0===t&&(t=null),e?e(t):this.cancel_dbl4no$$default(t)},He.prototype.invokeOnCompletion_ct2b2z$=function(t,e,n,i){return void 0===t&&(t=!1),void 0===e&&(e=!0),i?i(t,e,n):this.invokeOnCompletion_ct2b2z$$default(t,e,n)},He.prototype.plus_dqr1mp$=function(t){return t},He.$metadata$={kind:C,simpleName:"Job",interfaces:[L]},We.prototype.dispose=function(){return this.function$()},We.$metadata$={kind:C,simpleName:"DisposableHandle",interfaces:[]},Xe.$metadata$={kind:C,simpleName:"ChildJob",interfaces:[He]},Ze.$metadata$={kind:C,simpleName:"ParentJob",interfaces:[He]},Je.$metadata$={kind:C,simpleName:"ChildHandle",interfaces:[We]},Object.defineProperty(nn.prototype,"parent",{configurable:!0,get:function(){return null}}),nn.prototype.dispose=function(){},nn.prototype.childCancelled_tcv7n7$=function(t){return!1},nn.prototype.toString=function(){return"NonDisposableHandle"},nn.$metadata$={kind:T,simpleName:"NonDisposableHandle",interfaces:[Je,We]};var on,rn,an,sn,ln,un,cn,pn=null;function hn(){return null===pn&&new nn,pn}function _n(t){this._state_v70vig$_0=_(t?cn:un),this._parentHandle_acgcx5$_0=_(null)}function dn(t,e){return function(){return t.state_8be2vx$===e}}function fn(t,e,n,i){c.call(this,i),this.$controller=n,this.exceptionState_0=1,this.local$this$JobSupport=t,this.local$tmp$=void 0,this.local$tmp$_0=void 0,this.local$cur=void 0,this.local$$receiver=e}function mn(t,e,n){this.list_m9wkmb$_0=t,this._isCompleting_0=O(e),this._rootCause_0=_(n),this._exceptionsHolder_0=_(null)}function $n(t,e,n,i){Cn.call(this),this.parent_0=t,this.state_0=e,this.child_0=n,this.proposedUpdate_0=i}function yn(t,e){Dt.call(this,t,1),this.job_0=e}function gn(t){this.state=t}function vn(t){return e.isType(t,kn)?new gn(t):t}function bn(t){var n,i,o;return null!=(o=null!=(i=e.isType(n=t,gn)?n:null)?i.state:null)?o:t}function wn(t){this.isActive_hyoax9$_0=t}function xn(t){_n.call(this,!0),this.initParentJob_5dx9e$(t),this.handlesException_fejgjb$_0=this.handlesExceptionF()}function kn(){}function Cn(){Dr.call(this),this.job_ndnibc$_0=this.job_ndnibc$_0}function En(){Aa.call(this)}function Sn(t){this.list_afai45$_0=t}function Tn(t){Cn.call(this),this.handler_0=t}function On(t){Cn.call(this),this.continuation_0=t}function Nn(t){Cn.call(this),this.continuation_0=t}function Pn(t){Cn.call(this),this.handle_0=t}function In(t,e){Cn.call(this),this.select_0=t,this.block_0=e}function An(t,e){Cn.call(this),this.select_0=t,this.block_0=e}function Rn(){Cn.call(this)}function jn(t){Rn.call(this),this.handler_0=t,this._invoked_0=d(0)}function Ln(t){Rn.call(this),this.childJob=t}function zn(t){Rn.call(this),this.child=t}function Dn(){ie.call(this)}function Mn(){A.call(this,Ve()),this.message_0="NonCancellable can be used only as an argument for 'withContext', direct usages of its API are prohibited"}function Bn(t){xn.call(this,t)}function Fn(t,e,n){return function(i){var o,r,a=new qn(t,i);return e.v=a,r=n,Qe(o=a,Le(o.uCont.context).invokeOnTimeout_oczv3n$(o.time,o,o.context)),wr(o,o,r)}}function Un(t,e,n){c.call(this,n),this.exceptionState_0=7,this.local$coroutine=void 0,this.local$e=void 0,this.local$timeMillis=t,this.local$block=e}function qn(t,e){lr.call(this,e.context,e),this.time=t}function Hn(t,e){N(t,this),this.coroutine_8be2vx$=e,this.name="TimeoutCancellationException"}function Gn(t,e){return new Hn("Timed out waiting for "+t.toString()+" ms",e)}function Kn(){Vn=this,ie.call(this)}Object.defineProperty(_n.prototype,"key",{configurable:!0,get:function(){return Ve()}}),Object.defineProperty(_n.prototype,"parentHandle_8be2vx$",{configurable:!0,get:function(){return this._parentHandle_acgcx5$_0.kotlinx$atomicfu$value},set:function(t){this._parentHandle_acgcx5$_0.kotlinx$atomicfu$value=t}}),_n.prototype.initParentJob_5dx9e$=function(t){if(null!=t){t.start();var e=t.attachChild_kx8v25$(this);this.parentHandle_8be2vx$=e,this.isCompleted&&(e.dispose(),this.parentHandle_8be2vx$=hn())}else this.parentHandle_8be2vx$=hn()},Object.defineProperty(_n.prototype,"state_8be2vx$",{configurable:!0,get:function(){for(var t=this._state_v70vig$_0;;){var n=t.kotlinx$atomicfu$value;if(!e.isType(n,Oo))return n;n.perform_s8jyv4$(this)}}}),_n.prototype.loopOnState_46ivxf$_0=function(t){for(;;)t(this.state_8be2vx$)},Object.defineProperty(_n.prototype,"isActive",{configurable:!0,get:function(){var t=this.state_8be2vx$;return e.isType(t,kn)&&t.isActive}}),Object.defineProperty(_n.prototype,"isCompleted",{configurable:!0,get:function(){return!e.isType(this.state_8be2vx$,kn)}}),Object.defineProperty(_n.prototype,"isCancelled",{configurable:!0,get:function(){var t=this.state_8be2vx$;return e.isType(t,ee)||e.isType(t,mn)&&t.isCancelling}}),_n.prototype.finalizeFinishingState_10mr1z$_0=function(t,n){var i,o,r,s=null!=(o=e.isType(i=n,ee)?i:null)?o.cause:null,l={v:!1};l.v=t.isCancelling;var u=t.sealLocked_dbl4no$(s),c=this.getFinalRootCause_3zkch4$_0(t,u);null!=c&&this.addSuppressedExceptions_85dgeo$_0(c,u);var p=c,h=null==p||p===s?n:new ee(p);return null!=p&&(this.cancelParent_7dutpz$_0(p)||this.handleJobException_tcv7n7$(p))&&(e.isType(r=h,ee)?r:a()).makeHandled(),l.v||this.onCancelling_dbl4no$(p),this.onCompletionInternal_s8jyv4$(h),this._state_v70vig$_0.atomicfu$compareAndSet(t,vn(h)),this.completeStateFinalization_a4ilmi$_0(t,h),h},_n.prototype.getFinalRootCause_3zkch4$_0=function(t,n){if(n.isEmpty())return t.isCancelling?new aa(this.cancellationExceptionMessage(),null,this):null;var i;t:do{var o;for(o=n.iterator();o.hasNext();){var r=o.next();if(!e.isType(r,W)){i=r;break t}}i=null}while(0);if(null!=i)return i;var a=n.get_za3lpa$(0);if(e.isType(a,Hn)){var s;t:do{var l;for(l=n.iterator();l.hasNext();){var u=l.next();if(u!==a&&e.isType(u,Hn)){s=u;break t}}s=null}while(0);if(null!=s)return s}return a},_n.prototype.addSuppressedExceptions_85dgeo$_0=function(t,n){var i;if(!(n.size<=1)){var o=Sa(n.size),r=t;for(i=n.iterator();i.hasNext();){var a=i.next();a!==t&&a!==r&&!e.isType(a,W)&&o.add_11rb$(a)}}},_n.prototype.tryFinalizeSimpleState_5emg4m$_0=function(t,e){return!!this._state_v70vig$_0.atomicfu$compareAndSet(t,vn(e))&&(this.onCancelling_dbl4no$(null),this.onCompletionInternal_s8jyv4$(e),this.completeStateFinalization_a4ilmi$_0(t,e),!0)},_n.prototype.completeStateFinalization_a4ilmi$_0=function(t,n){var i,o,r,a;null!=(i=this.parentHandle_8be2vx$)&&(i.dispose(),this.parentHandle_8be2vx$=hn());var s=null!=(r=e.isType(o=n,ee)?o:null)?r.cause:null;if(e.isType(t,Cn))try{t.invoke(s)}catch(n){if(!e.isType(n,E))throw n;this.handleOnCompletionException_tcv7n7$(new Ue("Exception in completion handler "+t+" for "+this,n))}else null!=(a=t.list)&&this.notifyCompletion_mgxta4$_0(a,s)},_n.prototype.notifyCancelling_xkpzb8$_0=function(t,n){var i;this.onCancelling_dbl4no$(n);for(var o={v:null},r=t._next;!b(r,t);){if(e.isType(r,Rn)){var a,s=r;try{s.invoke(n)}catch(t){if(!e.isType(t,E))throw t;null==(null!=(a=o.v)?a:null)&&(o.v=new Ue("Exception in completion handler "+s+" for "+this,t))}}r=r._next}null!=(i=o.v)&&this.handleOnCompletionException_tcv7n7$(i),this.cancelParent_7dutpz$_0(n)},_n.prototype.cancelParent_7dutpz$_0=function(t){if(this.isScopedCoroutine)return!0;var n=e.isType(t,W),i=this.parentHandle_8be2vx$;return null===i||i===hn()?n:i.childCancelled_tcv7n7$(t)||n},_n.prototype.notifyCompletion_mgxta4$_0=function(t,n){for(var i,o={v:null},r=t._next;!b(r,t);){if(e.isType(r,Cn)){var a,s=r;try{s.invoke(n)}catch(t){if(!e.isType(t,E))throw t;null==(null!=(a=o.v)?a:null)&&(o.v=new Ue("Exception in completion handler "+s+" for "+this,t))}}r=r._next}null!=(i=o.v)&&this.handleOnCompletionException_tcv7n7$(i)},_n.prototype.notifyHandlers_8g4jwh$_0=x((function(){var t=e.equals;return function(n,i,o,r){for(var a,s={v:null},l=o._next;!t(l,o);){if(i(l)){var u,c=l;try{c.invoke(r)}catch(t){if(!e.isType(t,E))throw t;null==(null!=(u=s.v)?u:null)&&(s.v=new Ue("Exception in completion handler "+c+" for "+this,t))}}l=l._next}null!=(a=s.v)&&this.handleOnCompletionException_tcv7n7$(a)}})),_n.prototype.start=function(){for(;;)switch(this.startInternal_tp1bqd$_0(this.state_8be2vx$)){case 0:return!1;case 1:return!0}},_n.prototype.startInternal_tp1bqd$_0=function(t){return e.isType(t,wn)?t.isActive?0:this._state_v70vig$_0.atomicfu$compareAndSet(t,cn)?(this.onStart(),1):-1:e.isType(t,Sn)?this._state_v70vig$_0.atomicfu$compareAndSet(t,t.list)?(this.onStart(),1):-1:0},_n.prototype.onStart=function(){},_n.prototype.getCancellationException=function(){var t,n,i=this.state_8be2vx$;if(e.isType(i,mn)){if(null==(n=null!=(t=i.rootCause)?this.toCancellationException_rg9tb7$(t,Xr(this)+" is cancelling"):null))throw k(("Job is still new or active: "+this).toString());return n}if(e.isType(i,kn))throw k(("Job is still new or active: "+this).toString());return e.isType(i,ee)?this.toCancellationException_rg9tb7$(i.cause):new aa(Xr(this)+" has completed normally",null,this)},_n.prototype.toCancellationException_rg9tb7$=function(t,n){var i,o;return void 0===n&&(n=null),null!=(o=e.isType(i=t,W)?i:null)?o:new aa(null!=n?n:this.cancellationExceptionMessage(),t,this)},Object.defineProperty(_n.prototype,"completionCause",{configurable:!0,get:function(){var t,n=this.state_8be2vx$;if(e.isType(n,mn)){if(null==(t=n.rootCause))throw k(("Job is still new or active: "+this).toString());return t}if(e.isType(n,kn))throw k(("Job is still new or active: "+this).toString());return e.isType(n,ee)?n.cause:null}}),Object.defineProperty(_n.prototype,"completionCauseHandled",{configurable:!0,get:function(){var t=this.state_8be2vx$;return e.isType(t,ee)&&t.handled}}),_n.prototype.invokeOnCompletion_f05bi3$=function(t){return this.invokeOnCompletion_ct2b2z$(!1,!0,t)},_n.prototype.invokeOnCompletion_ct2b2z$$default=function(t,n,i){for(var o=this.makeNode_9qhc1i$_0(i,t);;){var r=this.state_8be2vx$;t:do{var s,l,u;if(e.isType(r,wn))if(r.isActive){if(this._state_v70vig$_0.atomicfu$compareAndSet(r,o))return o}else this.promoteEmptyToNodeList_lchanx$_0(r);else{if(!e.isType(r,kn))return n&&Br(i,null!=(u=e.isType(l=r,ee)?l:null)?u.cause:null),hn();var c=r.list;if(null==c)this.promoteSingleToNodeList_l9deey$_0(e.isType(s=r,Cn)?s:a());else{var p={v:null},h={v:hn()};if(t&&e.isType(r,mn)){p.v=r.rootCause;var _=null==p.v;if(_||(_=e.isType(i,Ln)&&!r.isCompleting),_){if(!this.addLastAtomic_ct8uo8$_0(r,c,o))break t;if(null==p.v)return o;h.v=o}}if(null!=p.v)return n&&Br(i,p.v),h.v;if(this.addLastAtomic_ct8uo8$_0(r,c,o))return o}}}while(0)}},_n.prototype.makeNode_9qhc1i$_0=function(t,n){var i,o,r,a,s,l=n?null!=(o=e.isType(i=t,Rn)?i:null)?o:new jn(t):null!=(s=null!=(a=e.isType(r=t,Cn)?r:null)?a:null)?s:new Tn(t);return l.job=this,l},_n.prototype.addLastAtomic_ct8uo8$_0=function(t,e,n){var i;t:do{if(!dn(this,t)()){i=!1;break t}e.addLast_l2j9rm$(n),i=!0}while(0);return i},_n.prototype.promoteEmptyToNodeList_lchanx$_0=function(t){var e=new En,n=t.isActive?e:new Sn(e);this._state_v70vig$_0.atomicfu$compareAndSet(t,n)},_n.prototype.promoteSingleToNodeList_l9deey$_0=function(t){t.addOneIfEmpty_l2j9rm$(new En);var e=t._next;this._state_v70vig$_0.atomicfu$compareAndSet(t,e)},_n.prototype.join=function(t){if(this.joinInternal_ta6o25$_0())return this.joinSuspend_kfh5g8$_0(t);en(t.context)},_n.prototype.joinInternal_ta6o25$_0=function(){for(;;){var t=this.state_8be2vx$;if(!e.isType(t,kn))return!1;if(this.startInternal_tp1bqd$_0(t)>=0)return!0}},_n.prototype.joinSuspend_kfh5g8$_0=function(t){return(n=this,e=function(t){return jt(t,n.invokeOnCompletion_f05bi3$(new On(t))),p},function(t){var n=new Dt(f(t),1);return n.initCancellability(),e(n),n.getResult()})(t);var e,n},Object.defineProperty(_n.prototype,"onJoin",{configurable:!0,get:function(){return this}}),_n.prototype.registerSelectClause0_s9h9qd$=function(t,n){for(;;){var i=this.state_8be2vx$;if(t.isSelected)return;if(!e.isType(i,kn))return void(t.trySelect()&&$r(n,t.completion));if(0===this.startInternal_tp1bqd$_0(i))return void t.disposeOnSelect_rvfg84$(this.invokeOnCompletion_f05bi3$(new In(t,n)))}},_n.prototype.removeNode_jr34ao$=function(t){for(;;){var n=this.state_8be2vx$;if(!e.isType(n,Cn))return e.isType(n,kn)?void(null!=n.list&&t.remove()):void 0;if(n!==t)return;if(this._state_v70vig$_0.atomicfu$compareAndSet(n,cn))return}},Object.defineProperty(_n.prototype,"onCancelComplete",{configurable:!0,get:function(){return!1}}),_n.prototype.cancel_x5z25k$$default=function(t){this.cancelInternal_tcv7n7$(null!=t?t:new aa(this.cancellationExceptionMessage(),null,this))},_n.prototype.cancellationExceptionMessage=function(){return"Job was cancelled"},_n.prototype.cancel_dbl4no$$default=function(t){var e;return this.cancelInternal_tcv7n7$(null!=(e=null!=t?this.toCancellationException_rg9tb7$(t):null)?e:new aa(this.cancellationExceptionMessage(),null,this)),!0},_n.prototype.cancelInternal_tcv7n7$=function(t){this.cancelImpl_8ea4ql$(t)},_n.prototype.parentCancelled_pv1t6x$=function(t){this.cancelImpl_8ea4ql$(t)},_n.prototype.childCancelled_tcv7n7$=function(t){return!!e.isType(t,W)||this.cancelImpl_8ea4ql$(t)&&this.handlesException},_n.prototype.cancelCoroutine_dbl4no$=function(t){return this.cancelImpl_8ea4ql$(t)},_n.prototype.cancelImpl_8ea4ql$=function(t){var e,n=on;return!(!this.onCancelComplete||(n=this.cancelMakeCompleting_z3ww04$_0(t))!==rn)||(n===on&&(n=this.makeCancelling_xjon1g$_0(t)),n===on||n===rn?e=!0:n===sn?e=!1:(this.afterCompletion_s8jyv4$(n),e=!0),e)},_n.prototype.cancelMakeCompleting_z3ww04$_0=function(t){for(;;){var n=this.state_8be2vx$;if(!e.isType(n,kn)||e.isType(n,mn)&&n.isCompleting)return on;var i=new ee(this.createCauseException_kfrsk8$_0(t)),o=this.tryMakeCompleting_w5s53t$_0(n,i);if(o!==an)return o}},_n.prototype.defaultCancellationException_6umzry$=w("kotlinx-coroutines-core.kotlinx.coroutines.JobSupport.defaultCancellationException_6umzry$",x((function(){var e=t.kotlinx.coroutines.JobCancellationException;return function(t,n){return void 0===t&&(t=null),void 0===n&&(n=null),new e(null!=t?t:this.cancellationExceptionMessage(),n,this)}}))),_n.prototype.getChildJobCancellationCause=function(){var t,n,i,o=this.state_8be2vx$;if(e.isType(o,mn))t=o.rootCause;else if(e.isType(o,ee))t=o.cause;else{if(e.isType(o,kn))throw k(("Cannot be cancelling child in this state: "+S(o)).toString());t=null}var r=t;return null!=(i=e.isType(n=r,W)?n:null)?i:new aa("Parent job is "+this.stateString_u2sjqg$_0(o),r,this)},_n.prototype.createCauseException_kfrsk8$_0=function(t){var n;return null==t||e.isType(t,E)?null!=t?t:new aa(this.cancellationExceptionMessage(),null,this):(e.isType(n=t,Ze)?n:a()).getChildJobCancellationCause()},_n.prototype.makeCancelling_xjon1g$_0=function(t){for(var n={v:null};;){var i,o,r=this.state_8be2vx$;if(e.isType(r,mn)){var a;if(r.isSealed)return sn;var s=r.isCancelling;if(null!=t||!s){var l;if(null!=(a=n.v))l=a;else{var u=this.createCauseException_kfrsk8$_0(t);n.v=u,l=u}var c=l;r.addExceptionLocked_tcv7n7$(c)}var p=r.rootCause,h=s?null:p;return null!=h&&this.notifyCancelling_xkpzb8$_0(r.list,h),on}if(!e.isType(r,kn))return sn;if(null!=(i=n.v))o=i;else{var _=this.createCauseException_kfrsk8$_0(t);n.v=_,o=_}var d=o;if(r.isActive){if(this.tryMakeCancelling_v0qvyy$_0(r,d))return on}else{var f=this.tryMakeCompleting_w5s53t$_0(r,new ee(d));if(f===on)throw k(("Cannot happen in "+S(r)).toString());if(f!==an)return f}}},_n.prototype.getOrPromoteCancellingList_dmij2j$_0=function(t){var n,i;if(null==(i=t.list)){if(e.isType(t,wn))n=new En;else{if(!e.isType(t,Cn))throw k(("State should have list: "+t).toString());this.promoteSingleToNodeList_l9deey$_0(t),n=null}i=n}return i},_n.prototype.tryMakeCancelling_v0qvyy$_0=function(t,e){var n;if(null==(n=this.getOrPromoteCancellingList_dmij2j$_0(t)))return!1;var i=n,o=new mn(i,!1,e);return!!this._state_v70vig$_0.atomicfu$compareAndSet(t,o)&&(this.notifyCancelling_xkpzb8$_0(i,e),!0)},_n.prototype.makeCompleting_8ea4ql$=function(t){for(;;){var e=this.tryMakeCompleting_w5s53t$_0(this.state_8be2vx$,t);if(e===on)return!1;if(e===rn)return!0;if(e!==an)return this.afterCompletion_s8jyv4$(e),!0}},_n.prototype.makeCompletingOnce_8ea4ql$=function(t){for(;;){var e=this.tryMakeCompleting_w5s53t$_0(this.state_8be2vx$,t);if(e===on)throw new X("Job "+this+" is already complete or completing, but is being completed with "+S(t),this.get_exceptionOrNull_ejijbb$_0(t));if(e!==an)return e}},_n.prototype.tryMakeCompleting_w5s53t$_0=function(t,n){return e.isType(t,kn)?!e.isType(t,wn)&&!e.isType(t,Cn)||e.isType(t,Ln)||e.isType(n,ee)?this.tryMakeCompletingSlowPath_uh1ctj$_0(t,n):this.tryFinalizeSimpleState_5emg4m$_0(t,n)?n:an:on},_n.prototype.tryMakeCompletingSlowPath_uh1ctj$_0=function(t,n){var i,o,r,a;if(null==(i=this.getOrPromoteCancellingList_dmij2j$_0(t)))return an;var s,l,u=i,c=null!=(r=e.isType(o=t,mn)?o:null)?r:new mn(u,!1,null),p={v:null};if(c.isCompleting)return on;if(c.isCompleting=!0,c!==t&&!this._state_v70vig$_0.atomicfu$compareAndSet(t,c))return an;var h=c.isCancelling;null!=(l=e.isType(s=n,ee)?s:null)&&c.addExceptionLocked_tcv7n7$(l.cause);var _=c.rootCause;p.v=h?null:_,null!=(a=p.v)&&this.notifyCancelling_xkpzb8$_0(u,a);var d=this.firstChild_15hr5g$_0(t);return null!=d&&this.tryWaitForChild_dzo3im$_0(c,d,n)?rn:this.finalizeFinishingState_10mr1z$_0(c,n)},_n.prototype.get_exceptionOrNull_ejijbb$_0=function(t){var n,i;return null!=(i=e.isType(n=t,ee)?n:null)?i.cause:null},_n.prototype.firstChild_15hr5g$_0=function(t){var n,i,o;return null!=(o=e.isType(n=t,Ln)?n:null)?o:null!=(i=t.list)?this.nextChild_n2no7k$_0(i):null},_n.prototype.tryWaitForChild_dzo3im$_0=function(t,e,n){var i;if(e.childJob.invokeOnCompletion_ct2b2z$(void 0,!1,new $n(this,t,e,n))!==hn())return!0;if(null==(i=this.nextChild_n2no7k$_0(e)))return!1;var o=i;return this.tryWaitForChild_dzo3im$_0(t,o,n)},_n.prototype.continueCompleting_vth2d4$_0=function(t,e,n){var i=this.nextChild_n2no7k$_0(e);if(null==i||!this.tryWaitForChild_dzo3im$_0(t,i,n)){var o=this.finalizeFinishingState_10mr1z$_0(t,n);this.afterCompletion_s8jyv4$(o)}},_n.prototype.nextChild_n2no7k$_0=function(t){for(var n=t;n._removed;)n=n._prev;for(;;)if(!(n=n._next)._removed){if(e.isType(n,Ln))return n;if(e.isType(n,En))return null}},fn.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},fn.prototype=Object.create(c.prototype),fn.prototype.constructor=fn,fn.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t=this.local$this$JobSupport.state_8be2vx$;if(e.isType(t,Ln)){if(this.state_0=8,this.result_0=this.local$$receiver.yield_11rb$(t.childJob,this),this.result_0===u)return u;continue}if(e.isType(t,kn)){if(null!=(this.local$tmp$=t.list)){this.local$cur=this.local$tmp$._next,this.state_0=2;continue}this.local$tmp$_0=null,this.state_0=6;continue}this.state_0=7;continue;case 1:throw this.exception_0;case 2:if(b(this.local$cur,this.local$tmp$)){this.state_0=5;continue}if(e.isType(this.local$cur,Ln)){if(this.state_0=3,this.result_0=this.local$$receiver.yield_11rb$(this.local$cur.childJob,this),this.result_0===u)return u;continue}this.state_0=4;continue;case 3:this.state_0=4;continue;case 4:this.local$cur=this.local$cur._next,this.state_0=2;continue;case 5:this.local$tmp$_0=p,this.state_0=6;continue;case 6:return this.local$tmp$_0;case 7:this.state_0=9;continue;case 8:return this.result_0;case 9:return p;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Object.defineProperty(_n.prototype,"children",{configurable:!0,get:function(){return Z((t=this,function(e,n,i){var o=new fn(t,e,this,n);return i?o:o.doResume(null)}));var t}}),_n.prototype.attachChild_kx8v25$=function(t){var n;return e.isType(n=this.invokeOnCompletion_ct2b2z$(!0,void 0,new Ln(t)),Je)?n:a()},_n.prototype.handleOnCompletionException_tcv7n7$=function(t){throw t},_n.prototype.onCancelling_dbl4no$=function(t){},Object.defineProperty(_n.prototype,"isScopedCoroutine",{configurable:!0,get:function(){return!1}}),Object.defineProperty(_n.prototype,"handlesException",{configurable:!0,get:function(){return!0}}),_n.prototype.handleJobException_tcv7n7$=function(t){return!1},_n.prototype.onCompletionInternal_s8jyv4$=function(t){},_n.prototype.afterCompletion_s8jyv4$=function(t){},_n.prototype.toString=function(){return this.toDebugString()+"@"+Wr(this)},_n.prototype.toDebugString=function(){return this.nameString()+"{"+this.stateString_u2sjqg$_0(this.state_8be2vx$)+"}"},_n.prototype.nameString=function(){return Xr(this)},_n.prototype.stateString_u2sjqg$_0=function(t){return e.isType(t,mn)?t.isCancelling?"Cancelling":t.isCompleting?"Completing":"Active":e.isType(t,kn)?t.isActive?"Active":"New":e.isType(t,ee)?"Cancelled":"Completed"},Object.defineProperty(mn.prototype,"list",{get:function(){return this.list_m9wkmb$_0}}),Object.defineProperty(mn.prototype,"isCompleting",{configurable:!0,get:function(){return this._isCompleting_0.kotlinx$atomicfu$value},set:function(t){this._isCompleting_0.kotlinx$atomicfu$value=t}}),Object.defineProperty(mn.prototype,"rootCause",{configurable:!0,get:function(){return this._rootCause_0.kotlinx$atomicfu$value},set:function(t){this._rootCause_0.kotlinx$atomicfu$value=t}}),Object.defineProperty(mn.prototype,"exceptionsHolder_0",{configurable:!0,get:function(){return this._exceptionsHolder_0.kotlinx$atomicfu$value},set:function(t){this._exceptionsHolder_0.kotlinx$atomicfu$value=t}}),Object.defineProperty(mn.prototype,"isSealed",{configurable:!0,get:function(){return this.exceptionsHolder_0===ln}}),Object.defineProperty(mn.prototype,"isCancelling",{configurable:!0,get:function(){return null!=this.rootCause}}),Object.defineProperty(mn.prototype,"isActive",{configurable:!0,get:function(){return null==this.rootCause}}),mn.prototype.sealLocked_dbl4no$=function(t){var n,i,o=this.exceptionsHolder_0;if(null==o)i=this.allocateList_0();else if(e.isType(o,E)){var r=this.allocateList_0();r.add_11rb$(o),i=r}else{if(!e.isType(o,J))throw k(("State is "+S(o)).toString());i=e.isType(n=o,J)?n:a()}var s=i,l=this.rootCause;return null!=l&&s.add_wxm5ur$(0,l),null==t||b(t,l)||s.add_11rb$(t),this.exceptionsHolder_0=ln,s},mn.prototype.addExceptionLocked_tcv7n7$=function(t){var n,i=this.rootCause;if(null!=i){if(t!==i){var o=this.exceptionsHolder_0;if(null==o)this.exceptionsHolder_0=t;else if(e.isType(o,E)){if(t===o)return;var r=this.allocateList_0();r.add_11rb$(o),r.add_11rb$(t),this.exceptionsHolder_0=r}else{if(!e.isType(o,J))throw k(("State is "+S(o)).toString());(e.isType(n=o,J)?n:a()).add_11rb$(t)}}}else this.rootCause=t},mn.prototype.allocateList_0=function(){return m(4)},mn.prototype.toString=function(){return"Finishing[cancelling="+this.isCancelling+", completing="+this.isCompleting+", rootCause="+S(this.rootCause)+", exceptions="+S(this.exceptionsHolder_0)+", list="+this.list+"]"},mn.$metadata$={kind:s,simpleName:"Finishing",interfaces:[kn]},_n.prototype.get_isCancelling_dpdoz8$_0=function(t){return e.isType(t,mn)&&t.isCancelling},$n.prototype.invoke=function(t){this.parent_0.continueCompleting_vth2d4$_0(this.state_0,this.child_0,this.proposedUpdate_0)},$n.$metadata$={kind:s,simpleName:"ChildCompletion",interfaces:[Cn]},yn.prototype.getContinuationCancellationCause_dqr1mp$=function(t){var n,i=this.job_0.state_8be2vx$;return e.isType(i,mn)&&null!=(n=i.rootCause)?n:e.isType(i,ee)?i.cause:t.getCancellationException()},yn.prototype.nameString=function(){return"AwaitContinuation"},yn.$metadata$={kind:s,simpleName:"AwaitContinuation",interfaces:[Dt]},Object.defineProperty(_n.prototype,"isCompletedExceptionally",{configurable:!0,get:function(){return e.isType(this.state_8be2vx$,ee)}}),_n.prototype.getCompletionExceptionOrNull=function(){var t=this.state_8be2vx$;if(e.isType(t,kn))throw k("This job has not completed yet".toString());return this.get_exceptionOrNull_ejijbb$_0(t)},_n.prototype.getCompletedInternal_8be2vx$=function(){var t=this.state_8be2vx$;if(e.isType(t,kn))throw k("This job has not completed yet".toString());if(e.isType(t,ee))throw t.cause;return bn(t)},_n.prototype.awaitInternal_8be2vx$=function(t){for(;;){var n=this.state_8be2vx$;if(!e.isType(n,kn)){if(e.isType(n,ee))throw n.cause;return bn(n)}if(this.startInternal_tp1bqd$_0(n)>=0)break}return this.awaitSuspend_ixl9xw$_0(t)},_n.prototype.awaitSuspend_ixl9xw$_0=function(t){return(e=this,function(t){var n=new yn(f(t),e);return n.initCancellability(),jt(n,e.invokeOnCompletion_f05bi3$(new Nn(n))),n.getResult()})(t);var e},_n.prototype.registerSelectClause1Internal_u6kgbh$=function(t,n){for(;;){var i,o=this.state_8be2vx$;if(t.isSelected)return;if(!e.isType(o,kn))return void(t.trySelect()&&(e.isType(o,ee)?t.resumeSelectWithException_tcv7n7$(o.cause):yr(n,null==(i=bn(o))||e.isType(i,r)?i:a(),t.completion)));if(0===this.startInternal_tp1bqd$_0(o))return void t.disposeOnSelect_rvfg84$(this.invokeOnCompletion_f05bi3$(new An(t,n)))}},_n.prototype.selectAwaitCompletion_u6kgbh$=function(t,n){var i,o=this.state_8be2vx$;e.isType(o,ee)?t.resumeSelectWithException_tcv7n7$(o.cause):dr(n,null==(i=bn(o))||e.isType(i,r)?i:a(),t.completion)},_n.$metadata$={kind:s,simpleName:"JobSupport",interfaces:[Cr,Ze,Xe,He]},gn.$metadata$={kind:s,simpleName:"IncompleteStateBox",interfaces:[]},Object.defineProperty(wn.prototype,"isActive",{get:function(){return this.isActive_hyoax9$_0}}),Object.defineProperty(wn.prototype,"list",{configurable:!0,get:function(){return null}}),wn.prototype.toString=function(){return"Empty{"+(this.isActive?"Active":"New")+"}"},wn.$metadata$={kind:s,simpleName:"Empty",interfaces:[kn]},Object.defineProperty(xn.prototype,"onCancelComplete",{configurable:!0,get:function(){return!0}}),Object.defineProperty(xn.prototype,"handlesException",{configurable:!0,get:function(){return this.handlesException_fejgjb$_0}}),xn.prototype.complete=function(){return this.makeCompleting_8ea4ql$(p)},xn.prototype.completeExceptionally_tcv7n7$=function(t){return this.makeCompleting_8ea4ql$(new ee(t))},xn.prototype.handlesExceptionF=function(){var t,n,i,o,r,a;if(null==(i=null!=(n=e.isType(t=this.parentHandle_8be2vx$,Ln)?t:null)?n.job:null))return!1;for(var s=i;;){if(s.handlesException)return!0;if(null==(a=null!=(r=e.isType(o=s.parentHandle_8be2vx$,Ln)?o:null)?r.job:null))return!1;s=a}},xn.$metadata$={kind:s,simpleName:"JobImpl",interfaces:[Xt,_n]},kn.$metadata$={kind:C,simpleName:"Incomplete",interfaces:[]},Object.defineProperty(Cn.prototype,"job",{configurable:!0,get:function(){return null==this.job_ndnibc$_0?h("job"):this.job_ndnibc$_0},set:function(t){this.job_ndnibc$_0=t}}),Object.defineProperty(Cn.prototype,"isActive",{configurable:!0,get:function(){return!0}}),Object.defineProperty(Cn.prototype,"list",{configurable:!0,get:function(){return null}}),Cn.prototype.dispose=function(){this.job.removeNode_jr34ao$(this)},Cn.prototype.toString=function(){return Xr(this)+"@"+Wr(this)+"[job@"+Wr(this.job)+"]"},Cn.$metadata$={kind:s,simpleName:"JobNode",interfaces:[kn,We,Dr]},Object.defineProperty(En.prototype,"isActive",{configurable:!0,get:function(){return!0}}),Object.defineProperty(En.prototype,"list",{configurable:!0,get:function(){return this}}),En.prototype.getString_61zpoe$=function(t){var n=Q();n.append_pdl1vj$("List{"),n.append_pdl1vj$(t),n.append_pdl1vj$("}[");for(var i={v:!0},o=this._next;!b(o,this);){if(e.isType(o,Cn)){var r=o;i.v?i.v=!1:n.append_pdl1vj$(", "),n.append_s8jyv4$(r)}o=o._next}return n.append_pdl1vj$("]"),n.toString()},En.prototype.toString=function(){return er?this.getString_61zpoe$("Active"):Aa.prototype.toString.call(this)},En.$metadata$={kind:s,simpleName:"NodeList",interfaces:[kn,Aa]},Object.defineProperty(Sn.prototype,"list",{get:function(){return this.list_afai45$_0}}),Object.defineProperty(Sn.prototype,"isActive",{configurable:!0,get:function(){return!1}}),Sn.prototype.toString=function(){return er?this.list.getString_61zpoe$("New"):r.prototype.toString.call(this)},Sn.$metadata$={kind:s,simpleName:"InactiveNodeList",interfaces:[kn]},Tn.prototype.invoke=function(t){this.handler_0(t)},Tn.$metadata$={kind:s,simpleName:"InvokeOnCompletion",interfaces:[Cn]},On.prototype.invoke=function(t){this.continuation_0.resumeWith_tl1gpc$(new $(p))},On.$metadata$={kind:s,simpleName:"ResumeOnCompletion",interfaces:[Cn]},Nn.prototype.invoke=function(t){var n,i,o=this.job.state_8be2vx$;if(e.isType(o,ee)){var s=this.continuation_0,l=o.cause;s.resumeWith_tl1gpc$(new $(P(l)))}else{i=this.continuation_0;var u=null==(n=bn(o))||e.isType(n,r)?n:a();i.resumeWith_tl1gpc$(new $(u))}},Nn.$metadata$={kind:s,simpleName:"ResumeAwaitOnCompletion",interfaces:[Cn]},Pn.prototype.invoke=function(t){this.handle_0.dispose()},Pn.$metadata$={kind:s,simpleName:"DisposeOnCompletion",interfaces:[Cn]},In.prototype.invoke=function(t){this.select_0.trySelect()&&_r(this.block_0,this.select_0.completion)},In.$metadata$={kind:s,simpleName:"SelectJoinOnCompletion",interfaces:[Cn]},An.prototype.invoke=function(t){this.select_0.trySelect()&&this.job.selectAwaitCompletion_u6kgbh$(this.select_0,this.block_0)},An.$metadata$={kind:s,simpleName:"SelectAwaitOnCompletion",interfaces:[Cn]},Rn.$metadata$={kind:s,simpleName:"JobCancellingNode",interfaces:[Cn]},jn.prototype.invoke=function(t){this._invoked_0.atomicfu$compareAndSet(0,1)&&this.handler_0(t)},jn.$metadata$={kind:s,simpleName:"InvokeOnCancelling",interfaces:[Rn]},Object.defineProperty(Ln.prototype,"parent",{configurable:!0,get:function(){return this.job}}),Ln.prototype.invoke=function(t){this.childJob.parentCancelled_pv1t6x$(this.job)},Ln.prototype.childCancelled_tcv7n7$=function(t){return this.job.childCancelled_tcv7n7$(t)},Ln.$metadata$={kind:s,simpleName:"ChildHandleNode",interfaces:[Je,Rn]},zn.prototype.invoke=function(t){this.child.parentCancelled_8o0b5c$(this.child.getContinuationCancellationCause_dqr1mp$(this.job))},zn.$metadata$={kind:s,simpleName:"ChildContinuation",interfaces:[Rn]},Dn.prototype.toString=function(){var t;return null!=(t=this.toStringInternalImpl())?t:Xr(this)+"@"+Wr(this)},Dn.prototype.limitedParallelism_za3lpa$=function(t){return Fo(t),this},Dn.prototype.toStringInternalImpl=function(){var t,n=ta().Main;if(this===n)return"Dispatchers.Main";try{t=n.immediate}catch(n){if(!e.isType(n,tt))throw n;t=null}return this===t?"Dispatchers.Main.immediate":null},Dn.$metadata$={kind:s,simpleName:"MainCoroutineDispatcher",interfaces:[ie]},Bn.prototype.childCancelled_tcv7n7$=function(t){return!1},Bn.$metadata$={kind:s,simpleName:"SupervisorJobImpl",interfaces:[xn]},Un.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},Un.prototype=Object.create(c.prototype),Un.prototype.constructor=Un,Un.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.local$timeMillis.compareTo_11rb$(H)<=0)return null;this.state_0=1;continue;case 1:if(this.local$coroutine={v:null},this.exceptionState_0=3,this.state_0=2,this.result_0=Fn(this.local$timeMillis,this.local$coroutine,this.local$block)(this),this.result_0===u)return u;continue;case 2:return this.result_0;case 3:if(this.exceptionState_0=7,this.local$e=this.exception_0,e.isType(this.local$e,Hn)){if(this.local$e.coroutine_8be2vx$===this.local$coroutine.v)return null;this.state_0=4;continue}throw this.local$e;case 4:throw this.local$e;case 5:this.state_0=6;continue;case 6:return;case 7:throw this.exception_0;default:throw this.state_0=7,new Error("State Machine Unreachable execution")}}catch(t){if(7===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},qn.prototype.run=function(){this.cancelCoroutine_dbl4no$(Gn(this.time,this))},qn.prototype.nameString=function(){return lr.prototype.nameString.call(this)+"(timeMillis="+this.time.toString()+")"},qn.$metadata$={kind:s,simpleName:"TimeoutCoroutine",interfaces:[ba,lr]},Hn.prototype.createCopy=function(){var t,e=new Hn(null!=(t=this.message)?t:"",this.coroutine_8be2vx$);return e},Hn.$metadata$={kind:s,simpleName:"TimeoutCancellationException",interfaces:[Ie,W]},Kn.prototype.limitedParallelism_za3lpa$=function(t){throw et("limitedParallelism is not supported for Dispatchers.Unconfined")},Kn.prototype.isDispatchNeeded_1fupul$=function(t){return!1},Kn.prototype.dispatch_5bn72i$=function(t,e){var n=t.get_j3r2sn$(si());if(null==n)throw et("Dispatchers.Unconfined.dispatch function can only be used by the yield function. If you wrap Unconfined dispatcher in your code, make sure you properly delegate isDispatchNeeded and dispatch calls.");n.dispatcherWasUnconfined=!0},Kn.prototype.toString=function(){return"Dispatchers.Unconfined"},Kn.$metadata$={kind:T,simpleName:"Unconfined",interfaces:[ie]};var Vn=null;function Yn(){return null===Vn&&new Kn,Vn}function Wn(){si(),A.call(this,si()),this.dispatcherWasUnconfined=!1}function Xn(){ai=this}Xn.$metadata$={kind:T,simpleName:"Key",interfaces:[j]};var Zn,Jn,Qn,ti,ei,ni,ii,oi,ri,ai=null;function si(){return null===ai&&new Xn,ai}function li(t){return function(e){var n=At(f(e));return t(n),n.getResult()}}function ui(t){this.onUndeliveredElement_0=t,this.queue_0=new Aa,this.onCloseHandler_0=_(null)}function ci(t,e){Oa.call(this,t,new fi(e))}function pi(t){return function(){return t.isBufferFull}}function hi(t,e){Na.call(this,e),this.element=t}function _i(t){this.this$AbstractSendChannel=t}function di(t,e,n,i){Si.call(this),this.pollResult_m5nr4l$_0=t,this.channel=e,this.select=n,this.block=i}function fi(t){Si.call(this),this.element=t}function mi(t){ui.call(this,t)}function $i(t){return function(){return t.isBufferEmpty}}function yi(t){Na.call(this,t)}function gi(t){this.this$AbstractChannel=t}function vi(t){this.this$AbstractChannel=t}function bi(t,e){this.$outer=t,Ht.call(this),this.receive_0=e}function wi(t){this.channel=t,this.result=ti}function xi(t,e){Ii.call(this),this.cont=t,this.receiveMode=e}function ki(t,e,n){xi.call(this,t,e),this.onUndeliveredElement=n}function Ci(t,e){Ii.call(this),this.iterator=t,this.cont=e}function Ei(t,e,n,i){Ii.call(this),this.channel=t,this.select=e,this.block=n,this.receiveMode=i}function Si(){Ta.call(this)}function Ti(){}function Oi(t,e){Si.call(this),this.pollResult_vo6xxe$_0=t,this.cont=e}function Ni(t,e,n){Oi.call(this,t,e),this.onUndeliveredElement=n}function Pi(t){Si.call(this),this.closeCause=t}function Ii(){Ta.call(this)}function Ai(t,n,i){if(mi.call(this,i),this.capacity_0=t,this.onBufferOverflow_0=n,!(this.capacity_0>=1)){var o="ArrayChannel capacity must be at least 1, but "+this.capacity_0+" was specified";throw V(o.toString())}this.lock_0=new Ea;var r=this.capacity_0,a=e.newArray(at.min(r,8),null);rt(a,Zn),this.buffer_0=a,this.head_0=0,this.size_0=d(0)}function Ri(t,e,n){Ct.call(this,t,!1,n),this._channel_0=e,this.initParentJob_5dx9e$(t.get_j3r2sn$(Ve()))}function ji(){}function Li(t,e){B.call(this),this.name$=t,this.ordinal$=e}function zi(){zi=function(){},ii=new Li("SUSPEND",0),oi=new Li("DROP_OLDEST",1),ri=new Li("DROP_LATEST",2)}function Di(){return zi(),ii}function Mi(){return zi(),oi}function Bi(){return zi(),ri}function Fi(){}function Ui(){}function qi(t,e){c.call(this,e),this.exceptionState_0=1,this.$this=t}function Hi(t){this.this$ReceiveChannel=t}function Gi(t,e,n){c.call(this,n),this.exceptionState_0=1,this.local$closure$block=t,this.local$it=e}function Ki(t){Zi(),this.holder=t}function Vi(){}function Yi(t){Vi.call(this),this.cause=t}function Wi(){Xi=this,this.failed_0=new Vi}ui.prototype.offerInternal_11rb$=function(t){for(var e;;){if(null==(e=this.takeFirstReceiveOrPeekClosed()))return Qn;var n=e;if(null!=n.tryResumeReceive_j43gjz$(t,null))return n.completeResumeReceive_11rb$(t),n.offerResult}},ui.prototype.offerSelectInternal_ys5ufj$=function(t,e){var n=this.describeTryOffer_0(t),i=e.performAtomicTrySelect_6q0pxr$(n);if(null!=i)return i;var o=n.result;return o.completeResumeReceive_11rb$(t),o.offerResult},Object.defineProperty(ui.prototype,"closedForSend_0",{configurable:!0,get:function(){var t,n,i;return null!=(n=e.isType(t=this.queue_0._prev,Pi)?t:null)?(this.helpClose_0(n),i=n):i=null,i}}),Object.defineProperty(ui.prototype,"closedForReceive_0",{configurable:!0,get:function(){var t,n,i;return null!=(n=e.isType(t=this.queue_0._next,Pi)?t:null)?(this.helpClose_0(n),i=n):i=null,i}}),ui.prototype.takeFirstSendOrPeekClosed_0=function(){var t,n=this.queue_0;t:do{var i=n._next;if(i===n){t=null;break t}if(!e.isType(i,Si)){t=null;break t}if(e.isType(i,Pi)){t=i;break t}if(!i.removeImpl())throw k("Should remove".toString());t=i}while(0);return t},ui.prototype.sendBuffered_0=function(t){var n=this.queue_0,i=new fi(t),o=n._prev;return e.isType(o,Ti)?o:(n.addLast_l2j9rm$(i),null)},ui.prototype.describeSendBuffered_0=function(t){return new ci(this.queue_0,t)},ci.prototype.failure_l2j9rm$=function(t){return e.isType(t,Pi)?t:e.isType(t,Ti)?Qn:null},ci.$metadata$={kind:s,simpleName:"SendBufferedDesc",interfaces:[Oa]},Object.defineProperty(ui.prototype,"isClosedForSend",{configurable:!0,get:function(){return null!=this.closedForSend_0}}),Object.defineProperty(ui.prototype,"isFullImpl_0",{configurable:!0,get:function(){return!e.isType(this.queue_0._next,Ti)&&this.isBufferFull}}),ui.prototype.send_11rb$=function(t,e){if(this.offerInternal_11rb$(t)!==Jn)return this.sendSuspend_0(t,e)},ui.prototype.offer_11rb$=function(t){var n,i;try{return Fi.prototype.offer_11rb$.call(this,t)}catch(o){if(e.isType(o,E)){if(null!=(i=null!=(n=this.onUndeliveredElement_0)?or(n,t):null))throw nt(i,o),i;throw o}throw o}},ui.prototype.trySend_11rb$=function(t){var n,i,o=this.offerInternal_11rb$(t);if(o===Jn)i=Zi().success_mh5how$(p);else if(o===Qn){if(null==(n=this.closedForSend_0))return Zi().failure_287e2$();var r=n;i=Zi().closed_xo0v4m$(this.helpCloseAndGetSendException_0(r))}else{if(!e.isType(o,Pi))throw k(("trySend returned "+o.toString()).toString());i=Zi().closed_xo0v4m$(this.helpCloseAndGetSendException_0(o))}return i},ui.prototype.helpCloseAndGetSendException_0=function(t){return this.helpClose_0(t),t.sendException},ui.prototype.helpCloseAndGetSendException_1=function(t,e){var n,i;if(this.helpClose_0(e),null!=(i=null!=(n=this.onUndeliveredElement_0)?or(n,t):null))throw nt(i,e.sendException),i;return e.sendException},ui.prototype.sendSuspend_0=function(t,n){return li((i=this,o=t,function(t){for(;;){if(i.isFullImpl_0){var n=null==i.onUndeliveredElement_0?new Oi(o,t):new Ni(o,t,i.onUndeliveredElement_0),r=i.enqueueSend_vs6846$(n);if(null==r)return void Rt(t,n);if(e.isType(r,Pi))return void i.helpCloseAndResumeWithSendException_0(t,o,r);if(r!==ei&&!e.isType(r,Ii))throw k(("enqueueSend returned "+S(r)).toString())}var a=i.offerInternal_11rb$(o);if(a===Jn)return void t.resumeWith_tl1gpc$(new $(p));if(a!==Qn){if(e.isType(a,Pi))return void i.helpCloseAndResumeWithSendException_0(t,o,a);throw k(("offerInternal returned "+a.toString()).toString())}}}))(n);var i,o},ui.prototype.helpCloseAndResumeWithSendException_0=function(t,e,n){var i,o;this.helpClose_0(n);var r=n.sendException;if(null!=(o=null!=(i=this.onUndeliveredElement_0)?or(i,e):null))return nt(o,r),void t.resumeWith_tl1gpc$(new $(P(o)));t.resumeWith_tl1gpc$(new $(P(r)))},ui.prototype.enqueueSend_vs6846$=function(t){if(this.isBufferAlwaysFull){var n=this.queue_0,i=n._prev;if(e.isType(i,Ti))return i;n.addLast_l2j9rm$(t)}else{var o,r=this.queue_0;t:do{var a=r._prev;if(e.isType(a,Ti))return a;if(!pi(this)()){o=!1;break t}r.addLast_l2j9rm$(t),o=!0}while(0);if(!o)return ei}return null},ui.prototype.close_dbl4no$$default=function(t){var n,i,o=new Pi(t),r=this.queue_0;t:do{if(e.isType(r._prev,Pi)){i=!1;break t}r.addLast_l2j9rm$(o),i=!0}while(0);var s=i,l=s?o:e.isType(n=this.queue_0._prev,Pi)?n:a();return this.helpClose_0(l),s&&this.invokeOnCloseHandler_0(t),s},ui.prototype.invokeOnCloseHandler_0=function(t){var e,n=this.onCloseHandler_0.kotlinx$atomicfu$value;null!==n&&n!==ni&&this.onCloseHandler_0.atomicfu$compareAndSet(n,ni)&&("function"==typeof(e=n)?e:a())(t)},ui.prototype.invokeOnClose_f05bi3$=function(t){if(!this.onCloseHandler_0.atomicfu$compareAndSet(null,t)){var e=this.onCloseHandler_0.kotlinx$atomicfu$value;if(e===ni)throw k("Another handler was already registered and successfully invoked");throw k("Another handler was already registered: "+S(e))}var n=this.closedForSend_0;null!=n&&this.onCloseHandler_0.atomicfu$compareAndSet(t,ni)&&t(n.closeCause)},ui.prototype.helpClose_0=function(t){for(var n,i,o=new Mo;null!=(i=e.isType(n=t._prev,Ii)?n:null);){var s=i;s.remove()?o=o.plus_11rb$(s):s.helpRemove()}var l,u,c,p=o;if(null!=(l=p.holder_0))if(e.isType(l,J))for(var h=e.isType(c=p.holder_0,J)?c:a(),_=h.size-1|0;_>=0;_--)h.get_za3lpa$(_).resumeReceiveClosed_1zqbm$(t);else(null==(u=p.holder_0)||e.isType(u,r)?u:a()).resumeReceiveClosed_1zqbm$(t);this.onClosedIdempotent_l2j9rm$(t)},ui.prototype.onClosedIdempotent_l2j9rm$=function(t){},ui.prototype.takeFirstReceiveOrPeekClosed=function(){var t,n=this.queue_0;t:do{var i=n._next;if(i===n){t=null;break t}if(!e.isType(i,Ti)){t=null;break t}if(e.isType(i,Pi)){t=i;break t}if(!i.removeImpl())throw k("Should remove".toString());t=i}while(0);return t},ui.prototype.describeTryOffer_0=function(t){return new hi(t,this.queue_0)},hi.prototype.failure_l2j9rm$=function(t){return e.isType(t,Pi)?t:e.isType(t,Ti)?null:Qn},hi.prototype.onPrepare_xe32vn$=function(t){var n,i;return null==(i=(e.isType(n=t.affected,Ti)?n:a()).tryResumeReceive_j43gjz$(this.element,t))?so:i===oo?oo:null},hi.$metadata$={kind:s,simpleName:"TryOfferDesc",interfaces:[Na]},_i.prototype.registerSelectClause2_rol3se$=function(t,e,n){this.this$AbstractSendChannel.registerSelectSend_0(t,e,n)},_i.$metadata$={kind:s,interfaces:[Sr]},Object.defineProperty(ui.prototype,"onSend",{configurable:!0,get:function(){return new _i(this)}}),ui.prototype.registerSelectSend_0=function(t,n,i){for(;;){if(t.isSelected)return;if(this.isFullImpl_0){var o=new di(n,this,t,i),r=this.enqueueSend_vs6846$(o);if(null==r)return void t.disposeOnSelect_rvfg84$(o);if(e.isType(r,Pi))throw this.helpCloseAndGetSendException_1(n,r);if(r!==ei&&!e.isType(r,Ii))throw k(("enqueueSend returned "+S(r)+" ").toString())}var a=this.offerSelectInternal_ys5ufj$(n,t);if(a===Vo)return;if(a!==Qn&&a!==oo){if(a===Jn)return void yr(i,this,t.completion);throw e.isType(a,Pi)?this.helpCloseAndGetSendException_1(n,a):k(("offerSelectInternal returned "+a.toString()).toString())}}},ui.prototype.toString=function(){return Xr(this)+"@"+Wr(this)+"{"+this.queueDebugStateString_0+"}"+this.bufferDebugString},Object.defineProperty(ui.prototype,"queueDebugStateString_0",{configurable:!0,get:function(){var t=this.queue_0._next;if(t===this.queue_0)return"EmptyQueue";var n=e.isType(t,Pi)?t.toString():e.isType(t,Ii)?"ReceiveQueued":e.isType(t,Si)?"SendQueued":"UNEXPECTED:"+t,i=this.queue_0._prev;return i!==t&&(n+=",queueSize="+this.countQueueSize_0(),e.isType(i,Pi)&&(n+=",closedForSend="+i)),n}}),ui.prototype.countQueueSize_0=function(){for(var t={v:0},n=this.queue_0,i=n._next;!b(i,n);)e.isType(i,Ta)&&(t.v=t.v+1|0),i=i._next;return t.v},Object.defineProperty(ui.prototype,"bufferDebugString",{configurable:!0,get:function(){return""}}),Object.defineProperty(di.prototype,"pollResult",{get:function(){return this.pollResult_m5nr4l$_0}}),di.prototype.tryResumeSend_uc1cc4$=function(t){var n;return null==(n=this.select.trySelectOther_uc1cc4$(t))||e.isType(n,cr)?n:a()},di.prototype.completeResumeSend=function(){dr(this.block,this.channel,this.select.completion)},di.prototype.dispose=function(){this.remove()&&this.undeliveredElement()},di.prototype.resumeSendClosed_1zqbm$=function(t){this.select.trySelect()&&this.select.resumeSelectWithException_tcv7n7$(t.sendException)},di.prototype.undeliveredElement=function(){var t;null!=(t=this.channel.onUndeliveredElement_0)&&rr(t,this.pollResult,this.select.completion.context)},di.prototype.toString=function(){return"SendSelect@"+Wr(this)+"("+this.pollResult+")["+this.channel+", "+this.select+"]"},di.$metadata$={kind:s,simpleName:"SendSelect",interfaces:[We,Si]},Object.defineProperty(fi.prototype,"pollResult",{configurable:!0,get:function(){return this.element}}),fi.prototype.tryResumeSend_uc1cc4$=function(t){return null!=t&&t.finishPrepare(),i},fi.prototype.completeResumeSend=function(){},fi.prototype.resumeSendClosed_1zqbm$=function(t){},fi.prototype.toString=function(){return"SendBuffered@"+Wr(this)+"("+this.element+")"},fi.$metadata$={kind:s,simpleName:"SendBuffered",interfaces:[Si]},ui.$metadata$={kind:s,simpleName:"AbstractSendChannel",interfaces:[Fi]},mi.prototype.pollInternal=function(){for(var t;;){if(null==(t=this.takeFirstSendOrPeekClosed_0()))return ti;var e=t;if(null!=e.tryResumeSend_uc1cc4$(null))return e.completeResumeSend(),e.pollResult;e.undeliveredElement()}},mi.prototype.pollSelectInternal_y5yyj0$=function(t){var e=this.describeTryPoll_0(),n=t.performAtomicTrySelect_6q0pxr$(e);return null!=n?n:(e.result.completeResumeSend(),e.result.pollResult)},Object.defineProperty(mi.prototype,"hasReceiveOrClosed_0",{configurable:!0,get:function(){return e.isType(this.queue_0._next,Ti)}}),Object.defineProperty(mi.prototype,"isClosedForReceive",{configurable:!0,get:function(){return null!=this.closedForReceive_0&&this.isBufferEmpty}}),Object.defineProperty(mi.prototype,"isEmpty",{configurable:!0,get:function(){return this.isEmptyImpl_0}}),Object.defineProperty(mi.prototype,"isEmptyImpl_0",{configurable:!0,get:function(){return!e.isType(this.queue_0._next,Si)&&this.isBufferEmpty}}),mi.prototype.receive=function(t){var n,i=this.pollInternal();return i===ti||e.isType(i,Pi)?this.receiveSuspend_0(0,t):null==(n=i)||e.isType(n,r)?n:a()},mi.prototype.receiveSuspend_0=function(t,n){return li((i=this,o=t,function(t){var n,s,l,u,c,h,_;null==i.onUndeliveredElement_0?c=new xi(e.isType(n=t,It)?n:a(),o):(l=e.isType(s=t,It)?s:a(),u=i.onUndeliveredElement_0,c=new ki(l,o,u));for(var d=c;;){if(i.enqueueReceive_0(d))return void i.removeReceiveOnCancel_0(t,d);var f=i.pollInternal();if(e.isType(f,Pi))return void d.resumeReceiveClosed_1zqbm$(f);if(f!==ti)return void t.resume_q1ktlu$(d.resumeValue_11rb$(null==(h=f)||e.isType(h,r)?h:a()),d.resumeOnCancellationFun_11rb$(null==(_=f)||e.isType(_,r)?_:a()))}return p}))(n);var i,o},mi.prototype.enqueueReceiveInternal_i292ax$=function(t){var n;if(this.isBufferAlwaysEmpty){var i,o=this.queue_0;t:do{if(e.isType(o._prev,Si)){i=!1;break t}o.addLast_l2j9rm$(t),i=!0}while(0);n=i}else{var r,a=this.queue_0;t:do{if(e.isType(a._prev,Si)){r=!1;break t}if(!$i(this)()){r=!1;break t}a.addLast_l2j9rm$(t),r=!0}while(0);n=r}return n},mi.prototype.enqueueReceive_0=function(t){var e=this.enqueueReceiveInternal_i292ax$(t);return e&&this.onReceiveEnqueued(),e},mi.prototype.receiveCatching=function(t){var n,i=this.pollInternal();return i!==ti?e.isType(i,Pi)?Zi().closed_xo0v4m$(i.closeCause):Zi().success_mh5how$(null==(n=i)||e.isType(n,r)?n:a()):this.receiveSuspend_0(1,t)},mi.prototype.tryReceive=function(){var t,n=this.pollInternal();return n===ti?Zi().failure_287e2$():e.isType(n,Pi)?Zi().closed_xo0v4m$(n.closeCause):Zi().success_mh5how$(null==(t=n)||e.isType(t,r)?t:a())},mi.prototype.cancel_dbl4no$$default=function(t){return this.cancelInternal_fg6mcv$(t)},mi.prototype.cancel_x5z25k$$default=function(t){this.isClosedForReceive||this.cancelInternal_fg6mcv$(null!=t?t:N(Xr(this)+" was cancelled"))},mi.prototype.cancelInternal_fg6mcv$=function(t){var e=this.close_dbl4no$(t);return this.onCancelIdempotent_6taknv$(e),e},mi.prototype.onCancelIdempotent_6taknv$=function(t){var n;if(null==(n=this.closedForSend_0))throw k("Cannot happen".toString());for(var i=n,o=new Mo;;){var r,s=i._prev;if(e.isType(s,Aa))break;s.remove()?o=o.plus_11rb$(e.isType(r=s,Si)?r:a()):s.helpRemove()}this.onCancelIdempotentList_kji3ae$(o,i)},mi.prototype.onCancelIdempotentList_kji3ae$=function(t,n){var i,o,s;if(null!=(i=t.holder_0))if(e.isType(i,J))for(var l=e.isType(s=t.holder_0,J)?s:a(),u=l.size-1|0;u>=0;u--)l.get_za3lpa$(u).resumeSendClosed_1zqbm$(n);else(null==(o=t.holder_0)||e.isType(o,r)?o:a()).resumeSendClosed_1zqbm$(n)},mi.prototype.iterator=function(){return new wi(this)},mi.prototype.describeTryPoll_0=function(){return new yi(this.queue_0)},yi.prototype.failure_l2j9rm$=function(t){return e.isType(t,Pi)?t:e.isType(t,Si)?null:ti},yi.prototype.onPrepare_xe32vn$=function(t){var n,i;return null==(i=(e.isType(n=t.affected,Si)?n:a()).tryResumeSend_uc1cc4$(t))?so:i===oo?oo:null},yi.prototype.onRemoved_l2j9rm$=function(t){var n;(e.isType(n=t,Si)?n:a()).undeliveredElement()},yi.$metadata$={kind:s,simpleName:"TryPollDesc",interfaces:[Na]},gi.prototype.registerSelectClause1_o3xas4$=function(t,n){var i,o;o=e.isType(i=n,it)?i:a(),this.this$AbstractChannel.registerSelectReceiveMode_0(t,0,o)},gi.$metadata$={kind:s,interfaces:[Er]},Object.defineProperty(mi.prototype,"onReceive",{configurable:!0,get:function(){return new gi(this)}}),vi.prototype.registerSelectClause1_o3xas4$=function(t,n){var i,o;o=e.isType(i=n,it)?i:a(),this.this$AbstractChannel.registerSelectReceiveMode_0(t,1,o)},vi.$metadata$={kind:s,interfaces:[Er]},Object.defineProperty(mi.prototype,"onReceiveCatching",{configurable:!0,get:function(){return new vi(this)}}),mi.prototype.registerSelectReceiveMode_0=function(t,e,n){for(;;){if(t.isSelected)return;if(this.isEmptyImpl_0){if(this.enqueueReceiveSelect_0(t,n,e))return}else{var i=this.pollSelectInternal_y5yyj0$(t);if(i===Vo)return;i!==ti&&i!==oo&&this.tryStartBlockUnintercepted_0(n,t,e,i)}}},mi.prototype.tryStartBlockUnintercepted_0=function(t,n,i,o){var s;if(e.isType(o,Pi))switch(i){case 0:throw o.receiveException;case 1:if(!n.trySelect())return;yr(t,Zi().closed_xo0v4m$(o.closeCause),n.completion)}else yr(t,1===i?e.isType(o,Pi)?Zi().closed_xo0v4m$(o.closeCause):Zi().success_mh5how$(null==(s=o)||e.isType(s,r)?s:a()):o,n.completion)},mi.prototype.enqueueReceiveSelect_0=function(t,e,n){var i=new Ei(this,t,e,n),o=this.enqueueReceive_0(i);return o&&t.disposeOnSelect_rvfg84$(i),o},mi.prototype.takeFirstReceiveOrPeekClosed=function(){var t=ui.prototype.takeFirstReceiveOrPeekClosed.call(this);return null==t||e.isType(t,Pi)||this.onReceiveDequeued(),t},mi.prototype.onReceiveEnqueued=function(){},mi.prototype.onReceiveDequeued=function(){},mi.prototype.removeReceiveOnCancel_0=function(t,e){t.invokeOnCancellation_f05bi3$(new bi(this,e))},bi.prototype.invoke=function(t){this.receive_0.remove()&&this.$outer.onReceiveDequeued()},bi.prototype.toString=function(){return"RemoveReceiveOnCancel["+this.receive_0+"]"},bi.$metadata$={kind:s,simpleName:"RemoveReceiveOnCancel",interfaces:[Ht]},wi.prototype.hasNext=function(t){return this.result!==ti?this.hasNextResult_0(this.result):(this.result=this.channel.pollInternal(),this.result!==ti?this.hasNextResult_0(this.result):this.hasNextSuspend_0(t))},wi.prototype.hasNextResult_0=function(t){if(e.isType(t,Pi)){if(null!=t.closeCause)throw t.receiveException;return!1}return!0},wi.prototype.hasNextSuspend_0=function(t){return li((n=this,function(t){for(var i,o,s,l,u=new Ci(n,t);;){if(n.channel.enqueueReceive_0(u))return void n.channel.removeReceiveOnCancel_0(t,u);var c=n.channel.pollInternal();if(n.result=c,e.isType(c,Pi)){if(null==c.closeCause)t.resumeWith_tl1gpc$(new $(!1));else{var h=c.receiveException;t.resumeWith_tl1gpc$(new $(P(h)))}return}if(c!==ti)return l=n.channel.onUndeliveredElement_0,o=null==(i=c)||e.isType(i,r)?i:a(),s=t.context,void t.resume_q1ktlu$(!0,null!=l?ar(l,o,s):null)}return p}))(t);var n},wi.prototype.next=function(){var t,n=this.result;if(e.isType(n,Pi))throw n.receiveException;if(n!==ti)return this.result=ti,null==(t=n)||e.isType(t,r)?t:a();throw k("'hasNext' should be called prior to 'next' invocation")},wi.$metadata$={kind:s,simpleName:"Itr",interfaces:[Ji]},xi.prototype.resumeValue_11rb$=function(t){return 1===this.receiveMode?Zi().success_mh5how$(t):t},xi.prototype.tryResumeReceive_j43gjz$=function(t,e){return null==this.cont.tryResume_i8qury$(this.resumeValue_11rb$(t),null!=e?e.desc:null,this.resumeOnCancellationFun_11rb$(t))?null:(null!=e&&e.finishPrepare(),i)},xi.prototype.completeResumeReceive_11rb$=function(t){this.cont.completeResume_za3rmp$(i)},xi.prototype.resumeReceiveClosed_1zqbm$=function(t){if(1===this.receiveMode){var e=this.cont,n=Zi().closed_xo0v4m$(t.closeCause);e.resumeWith_tl1gpc$(new $(n))}else{var i=this.cont,o=t.receiveException;i.resumeWith_tl1gpc$(new $(P(o)))}},xi.prototype.toString=function(){return"ReceiveElement@"+Wr(this)+"[receiveMode="+this.receiveMode+"]"},xi.$metadata$={kind:s,simpleName:"ReceiveElement",interfaces:[Ii]},ki.prototype.resumeOnCancellationFun_11rb$=function(t){return ar(this.onUndeliveredElement,t,this.cont.context)},ki.$metadata$={kind:s,simpleName:"ReceiveElementWithUndeliveredHandler",interfaces:[xi]},Ci.prototype.tryResumeReceive_j43gjz$=function(t,e){return null==this.cont.tryResume_i8qury$(!0,null!=e?e.desc:null,this.resumeOnCancellationFun_11rb$(t))?null:(null!=e&&e.finishPrepare(),i)},Ci.prototype.completeResumeReceive_11rb$=function(t){this.iterator.result=t,this.cont.completeResume_za3rmp$(i)},Ci.prototype.resumeReceiveClosed_1zqbm$=function(t){var e=null==t.closeCause?this.cont.tryResume_19pj23$(!1):this.cont.tryResumeWithException_tcv7n7$(t.receiveException);null!=e&&(this.iterator.result=t,this.cont.completeResume_za3rmp$(e))},Ci.prototype.resumeOnCancellationFun_11rb$=function(t){var e;return null!=(e=this.iterator.channel.onUndeliveredElement_0)?ar(e,t,this.cont.context):null},Ci.prototype.toString=function(){return"ReceiveHasNext@"+Wr(this)},Ci.$metadata$={kind:s,simpleName:"ReceiveHasNext",interfaces:[Ii]},Ei.prototype.tryResumeReceive_j43gjz$=function(t,n){var i;return null==(i=this.select.trySelectOther_uc1cc4$(n))||e.isType(i,cr)?i:a()},Ei.prototype.completeResumeReceive_11rb$=function(t){dr(this.block,1===this.receiveMode?Zi().success_mh5how$(t):t,this.select.completion,this.resumeOnCancellationFun_11rb$(t))},Ei.prototype.resumeReceiveClosed_1zqbm$=function(t){if(this.select.trySelect())switch(this.receiveMode){case 0:this.select.resumeSelectWithException_tcv7n7$(t.receiveException);break;case 1:dr(this.block,Zi().closed_xo0v4m$(t.closeCause),this.select.completion)}},Ei.prototype.dispose=function(){this.remove()&&this.channel.onReceiveDequeued()},Ei.prototype.resumeOnCancellationFun_11rb$=function(t){var e;return null!=(e=this.channel.onUndeliveredElement_0)?ar(e,t,this.select.completion.context):null},Ei.prototype.toString=function(){return"ReceiveSelect@"+Wr(this)+"["+this.select+",receiveMode="+this.receiveMode+"]"},Ei.$metadata$={kind:s,simpleName:"ReceiveSelect",interfaces:[We,Ii]},mi.$metadata$={kind:s,simpleName:"AbstractChannel",interfaces:[to,ui]},Si.prototype.undeliveredElement=function(){},Si.$metadata$={kind:s,simpleName:"Send",interfaces:[Ta]},Ti.$metadata$={kind:C,simpleName:"ReceiveOrClosed",interfaces:[]},Object.defineProperty(Oi.prototype,"pollResult",{get:function(){return this.pollResult_vo6xxe$_0}}),Oi.prototype.tryResumeSend_uc1cc4$=function(t){return null==this.cont.tryResume_19pj23$(p,null!=t?t.desc:null)?null:(null!=t&&t.finishPrepare(),i)},Oi.prototype.completeResumeSend=function(){this.cont.completeResume_za3rmp$(i)},Oi.prototype.resumeSendClosed_1zqbm$=function(t){var e=this.cont,n=t.sendException;e.resumeWith_tl1gpc$(new $(P(n)))},Oi.prototype.toString=function(){return Xr(this)+"@"+Wr(this)+"("+this.pollResult+")"},Oi.$metadata$={kind:s,simpleName:"SendElement",interfaces:[Si]},Ni.prototype.remove=function(){return!!Oi.prototype.remove.call(this)&&(this.undeliveredElement(),!0)},Ni.prototype.undeliveredElement=function(){rr(this.onUndeliveredElement,this.pollResult,this.cont.context)},Ni.$metadata$={kind:s,simpleName:"SendElementWithUndeliveredHandler",interfaces:[Oi]},Object.defineProperty(Pi.prototype,"sendException",{configurable:!0,get:function(){var t;return null!=(t=this.closeCause)?t:new co(no)}}),Object.defineProperty(Pi.prototype,"receiveException",{configurable:!0,get:function(){var t;return null!=(t=this.closeCause)?t:new po(no)}}),Object.defineProperty(Pi.prototype,"offerResult",{configurable:!0,get:function(){return this}}),Object.defineProperty(Pi.prototype,"pollResult",{configurable:!0,get:function(){return this}}),Pi.prototype.tryResumeSend_uc1cc4$=function(t){return null!=t&&t.finishPrepare(),i},Pi.prototype.completeResumeSend=function(){},Pi.prototype.tryResumeReceive_j43gjz$=function(t,e){return null!=e&&e.finishPrepare(),i},Pi.prototype.completeResumeReceive_11rb$=function(t){},Pi.prototype.resumeSendClosed_1zqbm$=function(t){},Pi.prototype.toString=function(){return"Closed@"+Wr(this)+"["+S(this.closeCause)+"]"},Pi.$metadata$={kind:s,simpleName:"Closed",interfaces:[Ti,Si]},Object.defineProperty(Ii.prototype,"offerResult",{configurable:!0,get:function(){return Jn}}),Ii.prototype.resumeOnCancellationFun_11rb$=function(t){return null},Ii.$metadata$={kind:s,simpleName:"Receive",interfaces:[Ti,Ta]},Object.defineProperty(Ai.prototype,"isBufferAlwaysEmpty",{configurable:!0,get:function(){return!1}}),Object.defineProperty(Ai.prototype,"isBufferEmpty",{configurable:!0,get:function(){return 0===this.size_0.kotlinx$atomicfu$value}}),Object.defineProperty(Ai.prototype,"isBufferAlwaysFull",{configurable:!0,get:function(){return!1}}),Object.defineProperty(Ai.prototype,"isBufferFull",{configurable:!0,get:function(){return this.size_0.kotlinx$atomicfu$value===this.capacity_0&&this.onBufferOverflow_0===Di()}}),Object.defineProperty(Ai.prototype,"isEmpty",{configurable:!0,get:function(){return this.isEmptyImpl_0}}),Object.defineProperty(Ai.prototype,"isClosedForReceive",{configurable:!0,get:function(){return e.callGetter(this,mi.prototype,"isClosedForReceive")}}),Ai.prototype.offerInternal_11rb$=function(t){var n={v:null};t:do{var i,o,r,a=this.size_0.kotlinx$atomicfu$value;if(null!=(i=this.closedForSend_0))return i;if(null!=(o=this.updateBufferSize_0(a)))return o;if(0===a)for(;null!=(r=this.takeFirstReceiveOrPeekClosed());){if(n.v=r,e.isType(n.v,Pi))return this.size_0.kotlinx$atomicfu$value=a,K(n.v);if(null!=K(n.v).tryResumeReceive_j43gjz$(t,null)){this.size_0.kotlinx$atomicfu$value=a;break t}}return this.enqueueElement_0(a,t),Jn}while(0);return K(n.v).completeResumeReceive_11rb$(t),K(n.v).offerResult},Ai.prototype.offerSelectInternal_ys5ufj$=function(t,n){var i={v:null};t:do{var o,r,a=this.size_0.kotlinx$atomicfu$value;if(null!=(o=this.closedForSend_0))return o;if(null!=(r=this.updateBufferSize_0(a)))return r;if(0===a)e:for(;;){var s=this.describeTryOffer_0(t),l=n.performAtomicTrySelect_6q0pxr$(s);if(null==l){this.size_0.kotlinx$atomicfu$value=a,i.v=s.result;break t}if(l===Qn)break e;if(l!==oo){if(l===Vo||e.isType(l,Pi))return this.size_0.kotlinx$atomicfu$value=a,l;throw k(("performAtomicTrySelect(describeTryOffer) returned "+S(l)).toString())}}return n.trySelect()?(this.enqueueElement_0(a,t),Jn):(this.size_0.kotlinx$atomicfu$value=a,Vo)}while(0);return K(i.v).completeResumeReceive_11rb$(t),K(i.v).offerResult},Ai.prototype.enqueueSend_vs6846$=function(t){return mi.prototype.enqueueSend_vs6846$.call(this,t)},Ai.prototype.updateBufferSize_0=function(t){var n;if(t=this.buffer_0.length){for(var n=2*this.buffer_0.length|0,i=this.capacity_0,o=at.min(n,i),r=e.newArray(o,null),a=0;a=1))throw V(("Expected positive parallelism level, but got "+t).toString())}function Uo(t){this._cur_0=_(new qo(8,t))}function qo(t,e){if(ir(),this.capacity_0=t,this.singleConsumer_0=e,this.mask_0=this.capacity_0-1|0,this._next_0=_(null),this._state_0=ot(H),this.array_0=$t(this.capacity_0),!(this.mask_0<=1073741823))throw k("Check failed.".toString());if(0!=(this.capacity_0&this.mask_0))throw k("Check failed.".toString())}function Ho(t){this.index=t}function Go(){nr=this,this.INITIAL_CAPACITY=8,this.CAPACITY_BITS=30,this.MAX_CAPACITY_MASK=1073741823,this.HEAD_SHIFT=0,this.HEAD_MASK=_t,this.TAIL_SHIFT=30,this.TAIL_MASK=dt,this.FROZEN_SHIFT=60,this.FROZEN_MASK=ft,this.CLOSED_SHIFT=61,this.CLOSED_MASK=mt,this.MIN_ADD_SPIN_CAPACITY=1024,this.REMOVE_FROZEN=new cr("REMOVE_FROZEN"),this.ADD_SUCCESS=0,this.ADD_FROZEN=1,this.ADD_CLOSED=2}to.$metadata$={kind:C,simpleName:"Channel",interfaces:[Ui,Fi]},co.$metadata$={kind:s,simpleName:"ClosedSendChannelException",interfaces:[X]},po.$metadata$={kind:s,simpleName:"ClosedReceiveChannelException",interfaces:[st]},w("kotlinx-coroutines-core.kotlinx.coroutines.channels.consumeEach_fsi0yh$",x((function(){var n=e.kotlin.Unit,i=Error,o=t.kotlinx.coroutines.channels.cancelConsumed_v57n85$;return function(t,r,a){var s=null;try{var l;for(l=t.iterator();e.suspendCall(l.hasNext(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver());)r(l.next())}catch(t){throw e.isType(t,i)?(s=t,t):t}finally{o(t,s)}return n}}))),w("kotlinx-coroutines-core.kotlinx.coroutines.channels.consumeEach_ur1qrk$",x((function(){var t=e.kotlin.Unit;return function(n,i,o){var r=n.openSubscription();try{var a;for(a=r.iterator();e.suspendCall(a.hasNext(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver());)i(a.next())}finally{r.cancel_x5z25k$()}return t}}))),Object.defineProperty(fo.prototype,"isBufferAlwaysEmpty",{configurable:!0,get:function(){return!1}}),Object.defineProperty(fo.prototype,"isBufferEmpty",{configurable:!0,get:function(){return this.value_0===Zn}}),Object.defineProperty(fo.prototype,"isBufferAlwaysFull",{configurable:!0,get:function(){return!1}}),Object.defineProperty(fo.prototype,"isBufferFull",{configurable:!0,get:function(){return!1}}),Object.defineProperty(fo.prototype,"isEmpty",{configurable:!0,get:function(){return this.isEmptyImpl_0}}),fo.prototype.offerInternal_11rb$=function(t){var n={v:null};t:do{var i,o,r;if(null!=(i=this.closedForSend_0))return i;if(this.value_0===Zn)for(;null!=(o=this.takeFirstReceiveOrPeekClosed());){if(n.v=o,e.isType(n.v,Pi))return K(n.v);if(null!=K(n.v).tryResumeReceive_j43gjz$(t,null))break t}if(null!=(r=this.updateValueLocked_0(t)))throw r;return Jn}while(0);return K(n.v).completeResumeReceive_11rb$(t),K(n.v).offerResult},fo.prototype.offerSelectInternal_ys5ufj$=function(t,n){var i={v:null};t:do{var o,r;if(null!=(o=this.closedForSend_0))return o;if(this.value_0===Zn)e:for(;;){var a=this.describeTryOffer_0(t),s=n.performAtomicTrySelect_6q0pxr$(a);if(null==s){i.v=a.result;break t}if(s===Qn)break e;if(s!==oo){if(s===Vo||e.isType(s,Pi))return s;throw k(("performAtomicTrySelect(describeTryOffer) returned "+S(s)).toString())}}if(!n.trySelect())return Vo;if(null!=(r=this.updateValueLocked_0(t)))throw r;return Jn}while(0);return K(i.v).completeResumeReceive_11rb$(t),K(i.v).offerResult},fo.prototype.pollInternal=function(){var t,e={v:null};return this.value_0===Zn?null!=(t=this.closedForSend_0)?t:ti:(e.v=this.value_0,this.value_0=Zn,e.v)},fo.prototype.pollSelectInternal_y5yyj0$=function(t){var e,n={v:null};return this.value_0===Zn?null!=(e=this.closedForSend_0)?e:ti:t.trySelect()?(n.v=this.value_0,this.value_0=Zn,n.v):Vo},fo.prototype.onCancelIdempotent_6taknv$=function(t){var e,n={v:null};if(n.v=this.updateValueLocked_0(Zn),mi.prototype.onCancelIdempotent_6taknv$.call(this,t),null!=(e=n.v))throw e},fo.prototype.updateValueLocked_0=function(t){var n,i,o,s,l=this.value_0;l===Zn?s=null:(o=this.onUndeliveredElement_0,i=null==(n=l)||e.isType(n,r)?n:a(),s=null!=o?or(o,i):null);var u=s;return this.value_0=t,u},fo.prototype.enqueueReceiveInternal_i292ax$=function(t){return mi.prototype.enqueueReceiveInternal_i292ax$.call(this,t)},Object.defineProperty(fo.prototype,"bufferDebugString",{configurable:!0,get:function(){return"(value="+S(this.value_0)+")"}}),fo.$metadata$={kind:s,simpleName:"ConflatedChannel",interfaces:[mi]},Object.defineProperty(mo.prototype,"isBufferAlwaysEmpty",{configurable:!0,get:function(){return!0}}),Object.defineProperty(mo.prototype,"isBufferEmpty",{configurable:!0,get:function(){return!0}}),Object.defineProperty(mo.prototype,"isBufferAlwaysFull",{configurable:!0,get:function(){return!1}}),Object.defineProperty(mo.prototype,"isBufferFull",{configurable:!0,get:function(){return!1}}),mo.prototype.offerInternal_11rb$=function(t){for(;;){var n=mi.prototype.offerInternal_11rb$.call(this,t);if(n===Jn)return Jn;if(n!==Qn){if(e.isType(n,Pi))return n;throw k(("Invalid offerInternal result "+n.toString()).toString())}var i=this.sendBuffered_0(t);if(null==i)return Jn;if(e.isType(i,Pi))return i}},mo.prototype.offerSelectInternal_ys5ufj$=function(t,n){for(var i;;){var o=this.hasReceiveOrClosed_0?mi.prototype.offerSelectInternal_ys5ufj$.call(this,t,n):null!=(i=n.performAtomicTrySelect_6q0pxr$(this.describeSendBuffered_0(t)))?i:Jn;if(o===Vo)return Vo;if(o===Jn)return Jn;if(o!==Qn&&o!==oo){if(e.isType(o,Pi))return o;throw k(("Invalid result "+o.toString()).toString())}}},mo.prototype.onCancelIdempotentList_kji3ae$=function(t,n){var i,o,s,l,u={v:null};if(null!=(o=t.holder_0))if(e.isType(o,J))for(var c=e.isType(l=t.holder_0,J)?l:a(),p=c.size-1|0;p>=0;p--){var h,_,d,f,m=c.get_za3lpa$(p);e.isType(m,fi)?(f=this.onUndeliveredElement_0,_=null==(h=m.element)||e.isType(h,r)?h:a(),d=u.v,u.v=null!=f?or(f,_,d):null):m.resumeSendClosed_1zqbm$(n)}else{var $,y,g,v,b=null==(s=t.holder_0)||e.isType(s,r)?s:a();e.isType(b,fi)?(v=this.onUndeliveredElement_0,y=null==($=b.element)||e.isType($,r)?$:a(),g=u.v,u.v=null!=v?or(v,y,g):null):b.resumeSendClosed_1zqbm$(n)}if(null!=(i=u.v))throw i},mo.$metadata$={kind:s,simpleName:"LinkedListChannel",interfaces:[mi]},Object.defineProperty(yo.prototype,"isBufferAlwaysEmpty",{configurable:!0,get:function(){return!0}}),Object.defineProperty(yo.prototype,"isBufferEmpty",{configurable:!0,get:function(){return!0}}),Object.defineProperty(yo.prototype,"isBufferAlwaysFull",{configurable:!0,get:function(){return!0}}),Object.defineProperty(yo.prototype,"isBufferFull",{configurable:!0,get:function(){return!0}}),yo.$metadata$={kind:s,simpleName:"RendezvousChannel",interfaces:[mi]},go.$metadata$={kind:C,simpleName:"Flow",interfaces:[]},vo.prototype.emit_11rb$=function(t,e){return this.function$(t,e)},vo.$metadata$={kind:C,simpleName:"FlowCollector",interfaces:[]},w("kotlinx-coroutines-core.kotlinx.coroutines.flow.collectWhile_rysrwq$",x((function(){var n=e.kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED,i=e.kotlin.coroutines.CoroutineImpl,o=t.kotlinx.coroutines.flow.internal.AbortFlowException,r=e.Kind.CLASS,a=t.kotlinx.coroutines.flow.FlowCollector,s=t.kotlinx.coroutines.flow.internal.checkOwnership_ygf9h9$;function l(t){this.closure$predicate=t}function u(t,e,n){i.call(this,n),this.exceptionState_0=1,this.$this=t,this.local$value=e}return u.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[i]},u.prototype=Object.create(i.prototype),u.prototype.constructor=u,u.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.closure$predicate(this.local$value,this),this.result_0===n)return n;continue;case 1:throw this.exception_0;case 2:if(!this.result_0)throw new o(this.$this);return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},l.prototype.emit_11rb$=function(t,e,n){var i=new u(this,t,e);return n?i:i.doResume(null)},l.$metadata$={kind:r,interfaces:[a]},function(t,n,i){var r=new l(n);try{e.suspendCall(t.collect_42ocv1$(r,e.coroutineReceiver()))}catch(t){if(!e.isType(t,o))throw t;s(t,r)}}}))),w("kotlinx-coroutines-core.kotlinx.coroutines.flow.toList_qzmi91$",x((function(){var n=t.kotlinx.coroutines.flow.Flow,i=e.throwCCE,o=t.kotlinx.coroutines.flow.toList_7a0s5y$;return function(t,r){var a;return e.suspendCall(o(e.isType(a=t,n)?a:i(),void 0,e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),w("kotlinx-coroutines-core.kotlinx.coroutines.flow.toSet_qzmi91$",x((function(){var n=t.kotlinx.coroutines.flow.Flow,i=e.throwCCE,o=t.kotlinx.coroutines.flow.toSet_a3q90u$;return function(t,r){var a;return e.suspendCall(o(e.isType(a=t,n)?a:i(),void 0,e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),w("kotlinx-coroutines-core.kotlinx.coroutines.flow.count_qzmi91$",x((function(){var n=t.kotlinx.coroutines.flow.Flow,i=e.throwCCE,o=t.kotlinx.coroutines.flow.count_x2ftfk$;return function(t,r){var a;return e.suspendCall(o(e.isType(a=t,n)?a:i(),e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),w("kotlinx-coroutines-core.kotlinx.coroutines.flow.collectIndexed_57beod$",x((function(){var n=e.Kind.CLASS,i=t.kotlinx.coroutines.flow.FlowCollector,o=e.kotlin.ArithmeticException;function r(t){this.closure$action=t,this.index_0=0}return r.prototype.emit_11rb$=function(t,e){var n,i;i=this.closure$action;var r=(n=this.index_0,this.index_0=n+1|0,n);if(r<0)throw new o("Index overflow has happened");return i(r,t,e)},r.$metadata$={kind:n,interfaces:[i]},function(t,n,i){return e.suspendCall(t.collect_42ocv1$(new r(n),e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),w("kotlinx-coroutines-core.kotlinx.coroutines.flow.collect_706ovd$",x((function(){var n=e.Kind.CLASS,i=t.kotlinx.coroutines.flow.FlowCollector;function o(t){this.closure$action=t}return o.prototype.emit_11rb$=function(t,e){return this.closure$action(t,e)},o.$metadata$={kind:n,interfaces:[i]},function(t,n,i){return e.suspendCall(t.collect_42ocv1$(new o(n),e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),bo.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},bo.prototype=Object.create(c.prototype),bo.prototype.constructor=bo,bo.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:return this.local$closure$destination.add_11rb$(this.local$value);case 1:throw this.exception_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},xo.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},xo.prototype=Object.create(c.prototype),xo.prototype.constructor=xo,xo.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.local$$receiver.collect_42ocv1$(new vo(wo(this.local$destination)),this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:return this.local$destination;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Co.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},Co.prototype=Object.create(c.prototype),Co.prototype.constructor=Co,Co.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:return this.local$closure$i.v=this.local$closure$i.v+1|0,this.local$closure$i.v;case 1:throw this.exception_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},So.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},So.prototype=Object.create(c.prototype),So.prototype.constructor=So,So.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.local$i={v:0},this.state_0=2,this.result_0=this.local$$receiver.collect_42ocv1$(new vo(Eo(this.local$i)),this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:return this.local$i.v;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},w("kotlinx-coroutines-core.kotlinx.coroutines.flow.fold_usjyvu$",x((function(){var n=e.kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED,i=e.kotlin.coroutines.CoroutineImpl,o=e.kotlin.Unit,r=t.kotlinx.coroutines.flow.FlowCollector;function a(t,e,n,o){i.call(this,o),this.exceptionState_0=1,this.local$closure$operation=t,this.local$closure$accumulator=e,this.local$value=n}return a.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[i]},a.prototype=Object.create(i.prototype),a.prototype.constructor=a,a.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.local$closure$operation(this.local$closure$accumulator.v,this.local$value,this),this.result_0===n)return n;continue;case 1:throw this.exception_0;case 2:return this.local$closure$accumulator.v=this.result_0,o;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},function(t,n,i,o){var s,l,u={v:n};return e.suspendCall(t.collect_42ocv1$(new r((s=i,l=u,function(t,e,n){var i=new a(s,l,t,e);return n?i:i.doResume(null)})),e.coroutineReceiver())),u.v}}))),Object.defineProperty(To.prototype,"isEmpty",{configurable:!0,get:function(){return this.head_0===this.tail_0}}),To.prototype.addLast_trkh7z$=function(t){this.elements_0[this.tail_0]=t,this.tail_0=this.tail_0+1&this.elements_0.length-1,this.tail_0===this.head_0&&this.ensureCapacity_0()},To.prototype.removeFirstOrNull=function(){var t;if(this.head_0===this.tail_0)return null;var n=this.elements_0[this.head_0];return this.elements_0[this.head_0]=null,this.head_0=this.head_0+1&this.elements_0.length-1,e.isType(t=n,r)?t:a()},To.prototype.clear=function(){this.head_0=0,this.tail_0=0,this.elements_0=e.newArray(this.elements_0.length,null)},To.prototype.ensureCapacity_0=function(){var t=this.elements_0.length,n=t<<1,i=e.newArray(n,null),o=this.elements_0;ct(o,i,0,this.head_0,o.length),ct(this.elements_0,i,this.elements_0.length-this.head_0|0,0,this.head_0),this.elements_0=i,this.head_0=0,this.tail_0=t},To.$metadata$={kind:s,simpleName:"ArrayQueue",interfaces:[]},Oo.prototype.toString=function(){return Xr(this)+"@"+Wr(this)},Oo.prototype.isEarlierThan_bfmzsr$=function(t){var e,n;if(null==(e=this.atomicOp))return!1;var i=e;if(null==(n=t.atomicOp))return!1;var o=n;return i.opSequence.compareTo_11rb$(o.opSequence)<0},Oo.$metadata$={kind:s,simpleName:"OpDescriptor",interfaces:[]},Object.defineProperty(No.prototype,"consensus",{configurable:!0,get:function(){return this._consensus_c6dvpx$_0.kotlinx$atomicfu$value}}),Object.defineProperty(No.prototype,"isDecided",{configurable:!0,get:function(){return this._consensus_c6dvpx$_0.kotlinx$atomicfu$value!==io}}),Object.defineProperty(No.prototype,"opSequence",{configurable:!0,get:function(){return H}}),Object.defineProperty(No.prototype,"atomicOp",{configurable:!0,get:function(){return this}}),No.prototype.decide_s8jyv4$=function(t){var e=this._consensus_c6dvpx$_0.kotlinx$atomicfu$value;return e!==io?e:this._consensus_c6dvpx$_0.atomicfu$compareAndSet(io,t)?t:this._consensus_c6dvpx$_0.kotlinx$atomicfu$value},No.prototype.perform_s8jyv4$=function(t){var n,i,o=this._consensus_c6dvpx$_0.kotlinx$atomicfu$value;return o===io&&(o=this.decide_s8jyv4$(this.prepare_11rb$(null==(n=t)||e.isType(n,r)?n:a()))),this.complete_19pj23$(null==(i=t)||e.isType(i,r)?i:a(),o),o},No.$metadata$={kind:s,simpleName:"AtomicOp",interfaces:[Oo]},Object.defineProperty(Po.prototype,"atomicOp",{configurable:!0,get:function(){return null==this.atomicOp_ss7ttb$_0?h("atomicOp"):this.atomicOp_ss7ttb$_0},set:function(t){this.atomicOp_ss7ttb$_0=t}}),Po.$metadata$={kind:s,simpleName:"AtomicDesc",interfaces:[]},Object.defineProperty(Io.prototype,"callerFrame",{configurable:!0,get:function(){var t;return e.isType(t=this.continuation,za)?t:null}}),Io.prototype.getStackTraceElement=function(){return null},Object.defineProperty(Io.prototype,"reusableCancellableContinuation_0",{configurable:!0,get:function(){var t;return e.isType(t=this._reusableCancellableContinuation_0.kotlinx$atomicfu$value,Dt)?t:null}}),Io.prototype.isReusable=function(){return null!=this._reusableCancellableContinuation_0.kotlinx$atomicfu$value},Io.prototype.awaitReusability=function(){for(var t=this._reusableCancellableContinuation_0;;)if(t.kotlinx$atomicfu$value!==ao)return},Io.prototype.release=function(){var t;this.awaitReusability(),null!=(t=this.reusableCancellableContinuation_0)&&t.detachChild_8be2vx$()},Io.prototype.claimReusableCancellableContinuation=function(){for(var t=this._reusableCancellableContinuation_0;;){var n,i=t.kotlinx$atomicfu$value;if(null===i)return this._reusableCancellableContinuation_0.kotlinx$atomicfu$value=ao,null;if(e.isType(i,Dt)){if(this._reusableCancellableContinuation_0.atomicfu$compareAndSet(i,ao))return e.isType(n=i,Dt)?n:a()}else if(i!==ao&&!e.isType(i,E))throw k(("Inconsistent state "+S(i)).toString())}},Io.prototype.tryReleaseClaimedContinuation_jp3215$=function(t){for(var n=this._reusableCancellableContinuation_0;;){var i=n.kotlinx$atomicfu$value;if(i!==ao){if(e.isType(i,E)){if(!this._reusableCancellableContinuation_0.atomicfu$compareAndSet(i,null))throw V("Failed requirement.".toString());return i}throw k(("Inconsistent state "+S(i)).toString())}if(this._reusableCancellableContinuation_0.atomicfu$compareAndSet(ao,t))return null}},Io.prototype.postponeCancellation_tcv7n7$=function(t){for(var n=this._reusableCancellableContinuation_0;;){var i=n.kotlinx$atomicfu$value;if(b(i,ao)){if(this._reusableCancellableContinuation_0.atomicfu$compareAndSet(ao,t))return!0}else{if(e.isType(i,E))return!0;if(this._reusableCancellableContinuation_0.atomicfu$compareAndSet(i,null))return!1}}},Io.prototype.takeState=function(){var t=this._state_8be2vx$;return this._state_8be2vx$=ro,t},Object.defineProperty(Io.prototype,"delegate",{configurable:!0,get:function(){return this}}),Io.prototype.resumeWith_tl1gpc$=function(t){var n=this.continuation.context,i=Zt(t);if(this.dispatcher.isDispatchNeeded_1fupul$(n))this._state_8be2vx$=i,this.resumeMode=0,this.dispatcher.dispatch_5bn72i$(n,this);else{var o=Be().eventLoop_8be2vx$;if(o.isUnconfinedLoopActive)this._state_8be2vx$=i,this.resumeMode=0,o.dispatchUnconfined_4avnfa$(this);else{o.incrementUseCount_6taknv$(!0);try{for(this.context,this.continuation.resumeWith_tl1gpc$(t);o.processUnconfinedEvent(););}catch(t){if(!e.isType(t,E))throw t;this.handleFatalException_pr7uss$(t,null)}finally{o.decrementUseCount_6taknv$(!0)}}}},Io.prototype.resumeCancellableWith_rdpv6h$=w("kotlinx-coroutines-core.kotlinx.coroutines.internal.DispatchedContinuation.resumeCancellableWith_rdpv6h$",x((function(){var n=t.kotlinx.coroutines.toState_fbj1ua$,i=e.kotlin.Unit,o=e.wrapFunction,r=Error,a=t.kotlinx.coroutines.Job,s=e.kotlin.Result,l=e.kotlin.createFailure_tcv7n7$;return o((function(){var n=t.kotlinx.coroutines.Job,o=e.kotlin.Result,r=e.kotlin.createFailure_tcv7n7$;return function(t,e,a){return function(){var s,l=e,u=t;t:do{var c=l.context.get_j3r2sn$(n.Key);if(null!=c&&!c.isActive){var p=c.getCancellationException();l.cancelCompletedResult_83a7kv$(u,p),l.resumeWith_tl1gpc$(new o(r(p))),s=!0;break t}s=!1}while(0);return s||e.continuation.resumeWith_tl1gpc$(a),i}}})),function(t,i){var o=n(t,i);if(this.dispatcher.isDispatchNeeded_1fupul$(this.context))this._state_8be2vx$=o,this.resumeMode=1,this.dispatcher.dispatch_5bn72i$(this.context,this);else{var u=Be().eventLoop_8be2vx$;if(u.isUnconfinedLoopActive)this._state_8be2vx$=o,this.resumeMode=1,u.dispatchUnconfined_4avnfa$(this);else{u.incrementUseCount_6taknv$(!0);try{var c;t:do{var p=this.context.get_j3r2sn$(a.Key);if(null!=p&&!p.isActive){var h=p.getCancellationException();this.cancelCompletedResult_83a7kv$(o,h),this.resumeWith_tl1gpc$(new s(l(h))),c=!0;break t}c=!1}while(0);for(c||this.continuation.resumeWith_tl1gpc$(t);u.processUnconfinedEvent(););}catch(t){if(!e.isType(t,r))throw t;this.handleFatalException_pr7uss$(t,null)}finally{u.decrementUseCount_6taknv$(!0)}}}}}))),Io.prototype.cancelCompletedResult_83a7kv$=function(t,n){e.isType(t,te)&&t.onCancellation(n)},Io.prototype.resumeCancelled_s8jyv4$=w("kotlinx-coroutines-core.kotlinx.coroutines.internal.DispatchedContinuation.resumeCancelled_s8jyv4$",x((function(){var n=t.kotlinx.coroutines.Job,i=e.kotlin.Result,o=e.kotlin.createFailure_tcv7n7$;return function(t){var e=this.context.get_j3r2sn$(n.Key);if(null!=e&&!e.isActive){var r=e.getCancellationException();return this.cancelCompletedResult_83a7kv$(t,r),this.resumeWith_tl1gpc$(new i(o(r))),!0}return!1}}))),Io.prototype.resumeUndispatchedWith_tl1gpc$=w("kotlinx-coroutines-core.kotlinx.coroutines.internal.DispatchedContinuation.resumeUndispatchedWith_tl1gpc$",(function(t){this.continuation.resumeWith_tl1gpc$(t)})),Io.prototype.dispatchYield_6v298r$=function(t,e){this._state_8be2vx$=e,this.resumeMode=1,this.dispatcher.dispatchYield_5bn72i$(t,this)},Io.prototype.toString=function(){return"DispatchedContinuation["+this.dispatcher+", "+Gr(this.continuation)+"]"},Object.defineProperty(Io.prototype,"context",{configurable:!0,get:function(){return this.continuation.context}}),Io.$metadata$={kind:s,simpleName:"DispatchedContinuation",interfaces:[l,za,Lo]},Lo.prototype.cancelCompletedResult_83a7kv$=function(t,e){},Lo.prototype.getSuccessfulResult_tpy1pm$=function(t){var n;return null==(n=t)||e.isType(n,r)?n:a()},Lo.prototype.getExceptionalResult_s8jyv4$=function(t){var n,i;return null!=(i=e.isType(n=t,ee)?n:null)?i.cause:null},Lo.prototype.run=function(){var t,n=null;try{var i=(e.isType(t=this.delegate,Io)?t:a()).continuation,o=i.context,r=this.takeState(),s=this.getExceptionalResult_s8jyv4$(r),l=null==s&&Ro(this.resumeMode)?o.get_j3r2sn$(Ve()):null;if(null==l||l.isActive)if(null!=s)i.resumeWith_tl1gpc$(new $(P(s)));else{var u=this.getSuccessfulResult_tpy1pm$(r);i.resumeWith_tl1gpc$(new $(u))}else{var c=l.getCancellationException();this.cancelCompletedResult_83a7kv$(r,c),i.resumeWith_tl1gpc$(new $(P(Ra(c))))}}catch(t){if(!e.isType(t,E))throw t;n=t}finally{var h;try{h=new $(p)}catch(t){if(!e.isType(t,E))throw t;h=new $(P(t))}var _=h;this.handleFatalException_pr7uss$(n,_.exceptionOrNull())}},Lo.prototype.handleFatalException_pr7uss$=function(t,e){if(null!==t||null!==e){var n=new qe("Fatal exception in coroutines machinery for "+this+". Please read KDoc to 'handleFatalException' method and report this incident to maintainers",K(null!=t?t:e));le(this.delegate.context,n)}},Lo.$metadata$={kind:s,simpleName:"DispatchedTask",interfaces:[wa]},Mo.prototype.plus_11rb$=function(t){var n,i,o,s;if(null==(n=this.holder_0))s=new Mo(t);else if(e.isType(n,J))(e.isType(i=this.holder_0,J)?i:a()).add_11rb$(t),s=new Mo(this.holder_0);else{var l=m(4);l.add_11rb$(null==(o=this.holder_0)||e.isType(o,r)?o:a()),l.add_11rb$(t),s=new Mo(l)}return s},Mo.prototype.forEachReversed_qlkmfe$=w("kotlinx-coroutines-core.kotlinx.coroutines.internal.InlineList.forEachReversed_qlkmfe$",x((function(){var t=Object,n=e.throwCCE,i=e.kotlin.collections.ArrayList;return function(o){var r,a,s;if(null!=(r=this.holder_0))if(e.isType(r,i))for(var l=e.isType(s=this.holder_0,i)?s:n(),u=l.size-1|0;u>=0;u--)o(l.get_za3lpa$(u));else o(null==(a=this.holder_0)||e.isType(a,t)?a:n())}}))),Mo.$metadata$={kind:s,simpleName:"InlineList",interfaces:[]},Mo.prototype.unbox=function(){return this.holder_0},Mo.prototype.toString=function(){return"InlineList(holder="+e.toString(this.holder_0)+")"},Mo.prototype.hashCode=function(){var t=0;return 31*t+e.hashCode(this.holder_0)|0},Mo.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.holder_0,t.holder_0)},Bo.prototype.limitedParallelism_za3lpa$=function(t){return Fo(t),t>=this.parallelism_0?this:ie.prototype.limitedParallelism_za3lpa$.call(this,t)},Bo.prototype.run=function(){for(var t={v:0};;){var n=this.queue_0.removeFirstOrNull();if(null==n){if(this.runningWorkers_0=this.runningWorkers_0-1|0,0===this.queue_0.size)return;this.runningWorkers_0=this.runningWorkers_0+1|0,t.v=0}else{try{n.run()}catch(t){if(!e.isType(t,E))throw t;le(y.EmptyCoroutineContext,t)}if(t.v=t.v+1|0,t.v>=16&&this.dispatcher_0.isDispatchNeeded_1fupul$(this))return void this.dispatcher_0.dispatch_5bn72i$(this,this)}}},Bo.prototype.dispatch_5bn72i$=function(t,e){t:do{if(this.addAndTryDispatching_0(e))break t;if(!this.tryAllocateWorker_0())break t;this.dispatcher_0.dispatch_5bn72i$(this,this)}while(0)},Bo.prototype.dispatchYield_5bn72i$=function(t,e){t:do{if(this.addAndTryDispatching_0(e))break t;if(!this.tryAllocateWorker_0())break t;this.dispatcher_0.dispatchYield_5bn72i$(this,this)}while(0)},Bo.prototype.dispatchInternal_0=function(t,e){this.addAndTryDispatching_0(t)||this.tryAllocateWorker_0()&&e()},Bo.prototype.tryAllocateWorker_0=function(){return!(this.runningWorkers_0>=this.parallelism_0||(this.runningWorkers_0=this.runningWorkers_0+1|0,0))},Bo.prototype.addAndTryDispatching_0=function(t){return this.queue_0.addLast_trkh7z$(t),this.runningWorkers_0>=this.parallelism_0},Bo.prototype.delay_s8cxhz$=function(t,e){return this.$delegate_ay9hik$_0.delay_s8cxhz$(t,e)},Bo.prototype.invokeOnTimeout_oczv3n$=function(t,e,n){return this.$delegate_ay9hik$_0.invokeOnTimeout_oczv3n$(t,e,n)},Bo.prototype.scheduleResumeAfterDelay_egqmvs$=function(t,e){return this.$delegate_ay9hik$_0.scheduleResumeAfterDelay_egqmvs$(t,e)},Bo.$metadata$={kind:s,simpleName:"LimitedDispatcher",interfaces:[je,ba,ie]},Object.defineProperty(Uo.prototype,"isEmpty",{configurable:!0,get:function(){return this._cur_0.kotlinx$atomicfu$value.isEmpty}}),Object.defineProperty(Uo.prototype,"size",{configurable:!0,get:function(){return this._cur_0.kotlinx$atomicfu$value.size}}),Uo.prototype.close=function(){for(var t=this._cur_0;;){var e=t.kotlinx$atomicfu$value;if(e.close())return;this._cur_0.atomicfu$compareAndSet(e,e.next())}},Uo.prototype.addLast_trkh7z$=function(t){for(var e=this._cur_0;;){var n=e.kotlinx$atomicfu$value;switch(n.addLast_trkh7z$(t)){case 0:return!0;case 2:return!1;case 1:this._cur_0.atomicfu$compareAndSet(n,n.next())}}},Uo.prototype.removeFirstOrNull=function(){for(var t=this._cur_0;;){var n,i=t.kotlinx$atomicfu$value,o=i.removeFirstOrNull();if(o!==ir().REMOVE_FROZEN)return null==(n=o)||e.isType(n,r)?n:a();this._cur_0.atomicfu$compareAndSet(i,i.next())}},Uo.prototype.map_m8mn37$=function(t){return this._cur_0.kotlinx$atomicfu$value.map_m8mn37$(t)},Uo.prototype.isClosed=function(){return this._cur_0.kotlinx$atomicfu$value.isClosed()},Uo.$metadata$={kind:s,simpleName:"LockFreeTaskQueue",interfaces:[]},Object.defineProperty(qo.prototype,"isEmpty",{configurable:!0,get:function(){var t=this._state_0.kotlinx$atomicfu$value;return t.and(LockFreeTaskQueueCore$Companion$HEAD_MASK).shiftRight(0).toInt()===t.and(LockFreeTaskQueueCore$Companion$TAIL_MASK).shiftRight(30).toInt()}}),Object.defineProperty(qo.prototype,"size",{configurable:!0,get:function(){var t=this._state_0.kotlinx$atomicfu$value,e=t.and(LockFreeTaskQueueCore$Companion$HEAD_MASK).shiftRight(0).toInt();return t.and(LockFreeTaskQueueCore$Companion$TAIL_MASK).shiftRight(30).toInt()-e&1073741823}}),qo.prototype.close=function(){var t=this._state_0;t:do{for(;;){var e=t.kotlinx$atomicfu$value;if(!b(e.and(ir().CLOSED_MASK),H))return!0;if(!b(e.and(ir().FROZEN_MASK),H))return!1;var n=e.or(ir().CLOSED_MASK);if(t.atomicfu$compareAndSet(e,n))break t}}while(0);return!0},qo.prototype.addLast_trkh7z$=function(t){for(var e=this._state_0;;){var n=e.kotlinx$atomicfu$value;t:do{if(!b(n.and(ht),H))return ir().addFailReason_mts6qi$(n);var i,o=n.and(LockFreeTaskQueueCore$Companion$HEAD_MASK).shiftRight(0).toInt(),r=n.and(LockFreeTaskQueueCore$Companion$TAIL_MASK).shiftRight(30).toInt(),a=this.mask_0;if((r+2&a)==(o&a))return 1;if(!this.singleConsumer_0&&null!=this.array_0.atomicfu$get(r&a).kotlinx$atomicfu$value){if(this.capacity_0<1024||(r-o&1073741823)>this.capacity_0>>1)return 1;break t}var s=r+1&1073741823;if(this._state_0.atomicfu$compareAndSet(n,ir().updateTail_if0zpk$(n,s))){this.array_0.atomicfu$get(r&a).kotlinx$atomicfu$value=t;for(var l=this;!b(l._state_0.kotlinx$atomicfu$value.and(ir().FROZEN_MASK),H)&&null!=(i=l.next().fillPlaceholder_0(r,t));)l=i;return 0}}while(0)}},qo.prototype.fillPlaceholder_0=function(t,n){var i=this.array_0.atomicfu$get(t&this.mask_0).kotlinx$atomicfu$value;return e.isType(i,Ho)&&i.index===t?(this.array_0.atomicfu$get(t&this.mask_0).kotlinx$atomicfu$value=n,this):null},qo.prototype.removeFirstOrNull=function(){for(var t=this._state_0;;){var n=t.kotlinx$atomicfu$value;t:do{if(!b(n.and(ir().FROZEN_MASK),H))return ir().REMOVE_FROZEN;var i,o=n.and(LockFreeTaskQueueCore$Companion$HEAD_MASK).shiftRight(0).toInt();if((n.and(LockFreeTaskQueueCore$Companion$TAIL_MASK).shiftRight(30).toInt()&this.mask_0)==(o&this.mask_0))return null;var r=this.array_0.atomicfu$get(o&this.mask_0).kotlinx$atomicfu$value;if(null==r){if(this.singleConsumer_0)return null;break t}if(e.isType(r,Ho))return null;var a=o+1&1073741823;if(this._state_0.atomicfu$compareAndSet(n,ir().updateHead_if0zpk$(n,a)))return this.array_0.atomicfu$get(o&this.mask_0).kotlinx$atomicfu$value=null,r;if(!this.singleConsumer_0)break t;for(var s=this;;){if(null==(i=s.removeSlowPath_0(o,a)))return r;s=i}}while(0)}},qo.prototype.removeSlowPath_0=function(t,e){for(var n=this._state_0;;){var i=n.kotlinx$atomicfu$value,o=i.and(LockFreeTaskQueueCore$Companion$HEAD_MASK).shiftRight(0).toInt();if(i.and(LockFreeTaskQueueCore$Companion$TAIL_MASK).shiftRight(30).toInt(),!b(i.and(ir().FROZEN_MASK),H))return this.next();if(this._state_0.atomicfu$compareAndSet(i,ir().updateHead_if0zpk$(i,e)))return this.array_0.atomicfu$get(o&this.mask_0).kotlinx$atomicfu$value=null,null}},qo.prototype.next=function(){return this.allocateOrGetNextCopy_0(this.markFrozen_0())},qo.prototype.markFrozen_0=function(){var t,e=this._state_0;t:do{for(;;){var n=e.kotlinx$atomicfu$value;if(!b(n.and(ir().FROZEN_MASK),H))return n;var i=n.or(ir().FROZEN_MASK);if(e.atomicfu$compareAndSet(n,i)){t=i;break t}}}while(0);return t},qo.prototype.allocateOrGetNextCopy_0=function(t){for(var e=this._next_0;;){var n=e.kotlinx$atomicfu$value;if(null!=n)return n;this._next_0.atomicfu$compareAndSet(null,this.allocateNextCopy_0(t))}},qo.prototype.allocateNextCopy_0=function(t){for(var e,n=new qo(2*this.capacity_0|0,this.singleConsumer_0),i=t.and(LockFreeTaskQueueCore$Companion$HEAD_MASK).shiftRight(0).toInt(),o=t.and(LockFreeTaskQueueCore$Companion$TAIL_MASK).shiftRight(30).toInt(),r=i;(r&this.mask_0)!=(o&this.mask_0);){var a=null!=(e=this.array_0.atomicfu$get(r&this.mask_0).kotlinx$atomicfu$value)?e:new Ho(r);n.array_0.atomicfu$get(r&n.mask_0).kotlinx$atomicfu$value=a,r=r+1|0}return n._state_0.kotlinx$atomicfu$value=ir().wo_2p08ub$(t,ir().FROZEN_MASK),n},qo.prototype.map_m8mn37$=function(t){for(var n,i=m(this.capacity_0),o=this._state_0.kotlinx$atomicfu$value,s=o.and(LockFreeTaskQueueCore$Companion$HEAD_MASK).shiftRight(0).toInt(),l=o.and(LockFreeTaskQueueCore$Companion$TAIL_MASK).shiftRight(30).toInt(),u=s;(u&this.mask_0)!=(l&this.mask_0);){var c=this.array_0.atomicfu$get(u&this.mask_0).kotlinx$atomicfu$value;null==c||e.isType(c,Ho)||i.add_11rb$(t(e.isType(n=c,r)?n:a())),u=u+1|0}return i},qo.prototype.isClosed=function(){return!b(this._state_0.kotlinx$atomicfu$value.and(ir().CLOSED_MASK),H)},Ho.$metadata$={kind:s,simpleName:"Placeholder",interfaces:[]},Go.prototype.wo_2p08ub$=function(t,e){return t.and(e.inv())},Go.prototype.updateHead_if0zpk$=function(t,n){return this.wo_2p08ub$(t,this.HEAD_MASK).or(e.Long.fromInt(n).shiftLeft(0))},Go.prototype.updateTail_if0zpk$=function(t,n){return this.wo_2p08ub$(t,this.TAIL_MASK).or(e.Long.fromInt(n).shiftLeft(30))},Go.prototype.withState_d0ock6$=w("kotlinx-coroutines-core.kotlinx.coroutines.internal.LockFreeTaskQueueCore.Companion.withState_d0ock6$",x((function(){var t=e.Long.fromInt(1073741823),n=new e.Long(-1073741824,268435455);return function(e,i){return i(e.and(t).shiftRight(0).toInt(),e.and(n).shiftRight(30).toInt())}}))),Go.prototype.addFailReason_mts6qi$=function(t){return b(t.and(this.CLOSED_MASK),H)?1:2},Go.$metadata$={kind:T,simpleName:"Companion",interfaces:[]};var Ko,Vo,Yo,Wo,Xo,Zo,Jo,Qo,tr,er,nr=null;function ir(){return null===nr&&new Go,nr}function or(t,n,i){void 0===i&&(i=null);try{t(n)}catch(t){if(!e.isType(t,E))throw t;if(null==i||i.cause===t)return new sr("Exception in undelivered element handler for "+n,t)}return i}function rr(t,e,n){var i;null!=(i=or(t,e,null))&&le(n,i)}function ar(t,e,n){return i=e,o=n,r=t,function(t){return rr(r,i,o),p};var i,o,r}function sr(t,e){R.call(this,t,e),this.name="UndeliveredElementException"}function lr(t,e){Ct.call(this,t,!0,!0),this.uCont=e}function ur(t){this.coroutineContext_glfhxt$_0=t}function cr(t){this.symbol=t}function pr(t,n,i,o){return void 0===i&&(i=1),void 0===o&&(o=2147483647),hr(t,e.Long.fromInt(n),e.Long.fromInt(i),e.Long.fromInt(o)).toInt()}function hr(t,e,n,i){var o;if(void 0===n&&(n=q),void 0===i&&(i=U),null==null)return e;if(null==(o=yt(null)))throw k(("System property '"+t+"' has unrecognized value 'null'").toString());var r=o;if(!n.lessThanOrEqual(r)||!r.lessThanOrEqual(i))throw k(("System property '"+t+"' should be in range "+n.toString()+".."+i.toString()+", but is '"+r.toString()+"'").toString());return r}function _r(t,n){try{Ao(f(gt(t,n)),new $(p))}catch(t){if(!e.isType(t,E))throw t;mr(n,t)}}function dr(t,n,i,o){void 0===o&&(o=null);try{Ao(f(g(t,n,i)),new $(p),o)}catch(t){if(!e.isType(t,E))throw t;mr(i,t)}}function fr(t,n){try{Ao(f(t),new $(p))}catch(t){if(!e.isType(t,E))throw t;mr(n,t)}}function mr(t,e){throw t.resumeWith_tl1gpc$(new $(P(e))),e}function $r(t,n){t:do{var i,o,s=n;try{i=t(s,!1)}catch(t){if(e.isType(t,E)){var l=t;s.resumeWith_tl1gpc$(new $(P(l)));break t}throw t}if(i!==u){var c=null==(o=i)||e.isType(o,r)?o:a();s.resumeWith_tl1gpc$(new $(c))}}while(0)}function yr(t,n,i){t:do{var o,s,l=i;try{o=t(n,l,!1)}catch(t){if(e.isType(t,E)){var c=t;l.resumeWith_tl1gpc$(new $(P(c)));break t}throw t}if(o!==u){var p=null==(s=o)||e.isType(s,r)?s:a();l.resumeWith_tl1gpc$(new $(p))}}while(0)}function gr(t,n){t:do{var i,o,s=n;try{n.context,i=t(s,!1)}catch(t){if(e.isType(t,E)){var l=t;s.resumeWith_tl1gpc$(new $(P(l)));break t}throw t}if(i!==u){var c=null==(o=i)||e.isType(o,r)?o:a();s.resumeWith_tl1gpc$(new $(c))}}while(0)}function vr(t,n,i){t:do{var o,s,l=i;try{i.context,o=t(n,l,!1)}catch(t){if(e.isType(t,E)){var c=t;l.resumeWith_tl1gpc$(new $(P(c)));break t}throw t}if(o!==u){var p=null==(s=o)||e.isType(s,r)?s:a();l.resumeWith_tl1gpc$(new $(p))}}while(0)}function br(t,n,i){var o;t:do{var r;try{r=i(n,t,!1)}catch(t){if(!e.isType(t,E))throw t;r=new ee(t)}var a=r;if(a===u){o=u;break t}var s=t.makeCompletingOnce_8ea4ql$(a);if(s===rn){o=u;break t}if(e.isType(s,ee))throw Ra(s.cause,t.uCont);o=bn(s)}while(0);return o}function wr(t,n,i){var o;t:do{var r,a;try{r=i(n,t,!1)}catch(t){if(!e.isType(t,E))throw t;r=new ee(t)}var s=r;if(s===u){o=u;break t}var l=t.makeCompletingOnce_8ea4ql$(s);if(l===rn){o=u;break t}if(e.isType(l,ee)){var c=l.cause;if(!e.isType(c,Hn)||c.coroutine_8be2vx$!==t)throw Ra(l.cause,t.uCont);if(e.isType(s,ee))throw Ra(s.cause,t.uCont);a=s}else a=bn(l);o=a}while(0);return o}function xr(t){this.closure$block=t}function kr(){}function Cr(){}function Er(){}function Sr(){}function Tr(){}function Or(){this.number_0=ot(q)}function Nr(t){Aa.call(this),this.uCont_0=t,this._state_0=_(Ko),this._result_0=_(Yo),this._parentHandle_0=_(null)}function Pr(t){this.$outer=t,Rn.call(this)}function Ir(t){Oo.call(this),this.otherOp=t}function Ar(t,e){No.call(this),this.impl=t,this.desc=e,this.opSequence_oe6pw4$_0=Xo.next(),this.desc.atomicOp=this}function Rr(t){Ta.call(this),this.handle=t}function jr(t){this.instance=new Nr(t),this.clauses=ut()}function Lr(t){this.locked=t}function zr(){ie.call(this)}function Dr(){Ta.call(this)}function Mr(){}function Br(t,e){b(typeof t,"function")?t(e):t.invoke(e)}function Fr(){if(function(){var t=!b(typeof navigator,Qo)&&null!=navigator&&null!=navigator.userAgent;t&&(t=!b(typeof navigator.userAgent,Qo));var e=t;return e&&(e=!b(typeof navigator.userAgent.match,Qo)),e&&navigator.userAgent.match("\\bjsdom\\b")}())return ha();var t=!b(typeof window,Qo)&&null!=window;if(t&&(t=!b(typeof window.addEventListener,Qo)),t)return ka(window);var e=b(typeof process,Qo);return e||(e=b(typeof process.nextTick,Qo)),e?fa():ha()}function Ur(){var t;return e.isType(t=ta().Default,je)?t:a()}function qr(t,e){var n=t.coroutineContext.plus_1fupul$(e);return n!==ta().Default&&null==n.get_j3r2sn$(v.Key)?n.plus_1fupul$(ta().Default):n}function Hr(t,e){return t.plus_1fupul$(e)}function Gr(t){return t.toString()}function Kr(t){return null}function Vr(t,e){lr.call(this,t,e)}function Yr(t,e){console.error(e)}function Wr(t){var e,n=t.__debug_counter;return"number"!=typeof n&&(n=tr=tr+1|0,t.__debug_counter=n),("number"==typeof(e=n)?e:a()).toString()}function Xr(t){var n;return null!=(n=e.getKClassFromExpression(t).simpleName)?n:"Unknown"}function Zr(){Qr=this,this.Default=Fr(),this.Unconfined=Yn(),this.mainDispatcher_0=new ea(this.Default,!1),this.injectedMainDispatcher_0=null}qo.$metadata$={kind:s,simpleName:"LockFreeTaskQueueCore",interfaces:[]},sr.$metadata$={kind:s,simpleName:"UndeliveredElementException",interfaces:[R]},Object.defineProperty(lr.prototype,"callerFrame",{configurable:!0,get:function(){var t;return e.isType(t=this.uCont,za)?t:null}}),lr.prototype.getStackTraceElement=function(){return null},Object.defineProperty(lr.prototype,"isScopedCoroutine",{configurable:!0,get:function(){return!0}}),Object.defineProperty(lr.prototype,"parent_8be2vx$",{configurable:!0,get:function(){var t;return null!=(t=this.parentHandle_8be2vx$)?t.parent:null}}),lr.prototype.afterCompletion_s8jyv4$=function(t){Ao(f(this.uCont),Qt(t,this.uCont))},lr.prototype.afterResume_s8jyv4$=function(t){this.uCont.resumeWith_tl1gpc$(Qt(t,this.uCont))},lr.$metadata$={kind:s,simpleName:"ScopeCoroutine",interfaces:[za,Ct]},Object.defineProperty(ur.prototype,"coroutineContext",{configurable:!0,get:function(){return this.coroutineContext_glfhxt$_0}}),ur.prototype.toString=function(){return"CoroutineScope(coroutineContext="+this.coroutineContext+")"},ur.$metadata$={kind:s,simpleName:"ContextScope",interfaces:[ye]},cr.prototype.toString=function(){return"<"+this.symbol+">"},cr.prototype.unbox_tpy1pm$=w("kotlinx-coroutines-core.kotlinx.coroutines.internal.Symbol.unbox_tpy1pm$",x((function(){var t=Object,n=e.throwCCE;return function(i){var o;return i===this?null==null||e.isType(null,t)?null:n():null==(o=i)||e.isType(o,t)?o:n()}}))),cr.$metadata$={kind:s,simpleName:"Symbol",interfaces:[]},xr.prototype.run=function(){this.closure$block()},xr.$metadata$={kind:s,interfaces:[ba]},kr.prototype.invoke_en0wgx$=function(t,e){this.invoke_ha2bmj$(t,null,e)},kr.$metadata$={kind:C,simpleName:"SelectBuilder",interfaces:[]},Cr.$metadata$={kind:C,simpleName:"SelectClause0",interfaces:[]},Er.$metadata$={kind:C,simpleName:"SelectClause1",interfaces:[]},Sr.$metadata$={kind:C,simpleName:"SelectClause2",interfaces:[]},Tr.$metadata$={kind:C,simpleName:"SelectInstance",interfaces:[]},w("kotlinx-coroutines-core.kotlinx.coroutines.selects.select_wd2ujs$",x((function(){var n=t.kotlinx.coroutines.selects.SelectBuilderImpl,i=Error;return function(t,o){return e.suspendCall((r=t,function(t){var o=new n(t);try{r(o)}catch(t){if(!e.isType(t,i))throw t;o.handleBuilderException_tcv7n7$(t)}return o.getResult()})(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver());var r}}))),Or.prototype.next=function(){return this.number_0.atomicfu$incrementAndGet$long()},Or.$metadata$={kind:s,simpleName:"SeqNumber",interfaces:[]},Object.defineProperty(Nr.prototype,"callerFrame",{configurable:!0,get:function(){var t;return e.isType(t=this.uCont_0,za)?t:null}}),Nr.prototype.getStackTraceElement=function(){return null},Object.defineProperty(Nr.prototype,"parentHandle_0",{configurable:!0,get:function(){return this._parentHandle_0.kotlinx$atomicfu$value},set:function(t){this._parentHandle_0.kotlinx$atomicfu$value=t}}),Object.defineProperty(Nr.prototype,"context",{configurable:!0,get:function(){return this.uCont_0.context}}),Object.defineProperty(Nr.prototype,"completion",{configurable:!0,get:function(){return this}}),Nr.prototype.doResume_0=function(t,e){for(var n=this._result_0;;){var i=n.kotlinx$atomicfu$value;if(i===Yo){var o=t();if(this._result_0.atomicfu$compareAndSet(Yo,o))return}else{if(i!==u)throw k("Already resumed");if(this._result_0.atomicfu$compareAndSet(u,Wo))return void e()}}},Nr.prototype.resumeWith_tl1gpc$=function(t){t:do{for(var e=this._result_0;;){var n=e.kotlinx$atomicfu$value;if(n===Yo){var i=Zt(t);if(this._result_0.atomicfu$compareAndSet(Yo,i))break t}else{if(n!==u)throw k("Already resumed");if(this._result_0.atomicfu$compareAndSet(u,Wo)){if(t.isFailure){var o=this.uCont_0;o.resumeWith_tl1gpc$(new $(P(Ra(K(t.exceptionOrNull())))))}else this.uCont_0.resumeWith_tl1gpc$(t);break t}}}}while(0)},Nr.prototype.resumeSelectWithException_tcv7n7$=function(t){t:do{for(var e=this._result_0;;){var n=e.kotlinx$atomicfu$value;if(n===Yo){var i=new ee(Ra(t,this.uCont_0));if(this._result_0.atomicfu$compareAndSet(Yo,i))break t}else{if(n!==u)throw k("Already resumed");if(this._result_0.atomicfu$compareAndSet(u,Wo)){f(this.uCont_0).resumeWith_tl1gpc$(new $(P(t)));break t}}}}while(0)},Nr.prototype.getResult=function(){this.isSelected||this.initCancellability_0();var t=this._result_0.kotlinx$atomicfu$value;if(t===Yo){if(this._result_0.atomicfu$compareAndSet(Yo,u))return u;t=this._result_0.kotlinx$atomicfu$value}if(t===Wo)throw k("Already resumed");if(e.isType(t,ee))throw t.cause;return t},Nr.prototype.initCancellability_0=function(){var t;if(null!=(t=this.context.get_j3r2sn$(Ve()))){var e=t.invokeOnCompletion_ct2b2z$(!0,void 0,new Pr(this));this.parentHandle_0=e,this.isSelected&&e.dispose()}},Pr.prototype.invoke=function(t){this.$outer.trySelect()&&this.$outer.resumeSelectWithException_tcv7n7$(this.job.getCancellationException())},Pr.$metadata$={kind:s,simpleName:"SelectOnCancelling",interfaces:[Rn]},Nr.prototype.handleBuilderException_tcv7n7$=function(t){if(this.trySelect())this.resumeWith_tl1gpc$(new $(P(t)));else if(!e.isType(t,W)){var n=this.getResult();e.isType(n,ee)&&n.cause===t||le(this.context,t)}},Object.defineProperty(Nr.prototype,"isSelected",{configurable:!0,get:function(){for(var t=this._state_0;;){var n=t.kotlinx$atomicfu$value;if(n===Ko)return!1;if(!e.isType(n,Oo))return!0;n.perform_s8jyv4$(this)}}}),Nr.prototype.disposeOnSelect_rvfg84$=function(t){var e=new Rr(t);(this.isSelected||(this.addLast_l2j9rm$(e),this.isSelected))&&t.dispose()},Nr.prototype.doAfterSelect_0=function(){var t;null!=(t=this.parentHandle_0)&&t.dispose();for(var n=this._next;!b(n,this);)e.isType(n,Rr)&&n.handle.dispose(),n=n._next},Nr.prototype.trySelect=function(){var t,e=this.trySelectOther_uc1cc4$(null);if(e===i)t=!0;else{if(null!=e)throw k(("Unexpected trySelectIdempotent result "+S(e)).toString());t=!1}return t},Nr.prototype.trySelectOther_uc1cc4$=function(t){for(var n=this._state_0;;){var o=n.kotlinx$atomicfu$value;t:do{if(o===Ko){if(null==t){if(!this._state_0.atomicfu$compareAndSet(Ko,null))break t}else{var r=new Ir(t);if(!this._state_0.atomicfu$compareAndSet(Ko,r))break t;var a=r.perform_s8jyv4$(this);if(null!==a)return a}return this.doAfterSelect_0(),i}if(!e.isType(o,Oo))return null==t?null:o===t.desc?i:null;if(null!=t){var s=t.atomicOp;if(e.isType(s,Ar)&&s.impl===this)throw k("Cannot use matching select clauses on the same object".toString());if(s.isEarlierThan_bfmzsr$(o))return oo}o.perform_s8jyv4$(this)}while(0)}},Ir.prototype.perform_s8jyv4$=function(t){var n,i=e.isType(n=t,Nr)?n:a();this.otherOp.finishPrepare();var o=this.otherOp.atomicOp.decide_s8jyv4$(null),r=null==o?this.otherOp.desc:Ko;return i._state_0.atomicfu$compareAndSet(this,r),o},Object.defineProperty(Ir.prototype,"atomicOp",{configurable:!0,get:function(){return this.otherOp.atomicOp}}),Ir.$metadata$={kind:s,simpleName:"PairSelectOp",interfaces:[Oo]},Nr.prototype.performAtomicTrySelect_6q0pxr$=function(t){return new Ar(this,t).perform_s8jyv4$(null)},Nr.prototype.toString=function(){return"SelectInstance(state="+S(this._state_0.kotlinx$atomicfu$value)+", result="+S(this._result_0.kotlinx$atomicfu$value)+")"},Object.defineProperty(Ar.prototype,"opSequence",{configurable:!0,get:function(){return this.opSequence_oe6pw4$_0}}),Ar.prototype.prepare_11rb$=function(t){var n;if(null==t&&null!=(n=this.prepareSelectOp_0()))return n;try{return this.desc.prepare_4uxf5b$(this)}catch(n){throw e.isType(n,E)?(null==t&&this.undoPrepare_0(),n):n}},Ar.prototype.complete_19pj23$=function(t,e){this.completeSelect_0(e),this.desc.complete_ayrq83$(this,e)},Ar.prototype.prepareSelectOp_0=function(){for(var t=this.impl._state_0;;){var n=t.kotlinx$atomicfu$value;if(n===this)return null;if(e.isType(n,Oo))n.perform_s8jyv4$(this.impl);else{if(n!==Ko)return Vo;if(this.impl._state_0.atomicfu$compareAndSet(Ko,this))return null}}},Ar.prototype.undoPrepare_0=function(){this.impl._state_0.atomicfu$compareAndSet(this,Ko)},Ar.prototype.completeSelect_0=function(t){var e=null==t,n=e?null:Ko;this.impl._state_0.atomicfu$compareAndSet(this,n)&&e&&this.impl.doAfterSelect_0()},Ar.prototype.toString=function(){return"AtomicSelectOp(sequence="+this.opSequence.toString()+")"},Ar.$metadata$={kind:s,simpleName:"AtomicSelectOp",interfaces:[No]},Nr.prototype.invoke_nd4vgy$=function(t,e){t.registerSelectClause0_s9h9qd$(this,e)},Nr.prototype.invoke_veq140$=function(t,e){t.registerSelectClause1_o3xas4$(this,e)},Nr.prototype.invoke_ha2bmj$=function(t,e,n){t.registerSelectClause2_rol3se$(this,e,n)},Nr.prototype.onTimeout_7xvrws$=function(t,e){if(t.compareTo_11rb$(H)<=0)this.trySelect()&&$r(e,this.completion);else{var n=new xr((i=this,o=e,function(){return i.trySelect()&&_r(o,i.completion),p}));this.disposeOnSelect_rvfg84$(Le(this.context).invokeOnTimeout_oczv3n$(t,n,this.context))}var i,o},Rr.$metadata$={kind:s,simpleName:"DisposeNode",interfaces:[Ta]},Nr.$metadata$={kind:s,simpleName:"SelectBuilderImpl",interfaces:[za,l,Tr,kr,Aa]},w("kotlinx-coroutines-core.kotlinx.coroutines.selects.selectUnbiased_wd2ujs$",x((function(){var n=t.kotlinx.coroutines.selects.UnbiasedSelectBuilderImpl,i=Error;return function(t,o){return e.suspendCall((r=t,function(t){var o=new n(t);try{r(o)}catch(t){if(!e.isType(t,i))throw t;o.handleBuilderException_tcv7n7$(t)}return o.initSelectResult()})(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver());var r}}))),jr.prototype.handleBuilderException_tcv7n7$=function(t){this.instance.handleBuilderException_tcv7n7$(t)},jr.prototype.initSelectResult=function(){if(!this.instance.isSelected)try{var t;for(vt(this.clauses),t=this.clauses.iterator();t.hasNext();)t.next()()}catch(t){if(!e.isType(t,E))throw t;this.instance.handleBuilderException_tcv7n7$(t)}return this.instance.getResult()},jr.prototype.invoke_nd4vgy$=function(t,e){var n,i,o;this.clauses.add_11rb$((n=this,i=e,o=t,function(){return o.registerSelectClause0_s9h9qd$(n.instance,i),p}))},jr.prototype.invoke_veq140$=function(t,e){var n,i,o;this.clauses.add_11rb$((n=this,i=e,o=t,function(){return o.registerSelectClause1_o3xas4$(n.instance,i),p}))},jr.prototype.invoke_ha2bmj$=function(t,e,n){var i,o,r,a;this.clauses.add_11rb$((i=this,o=e,r=n,a=t,function(){return a.registerSelectClause2_rol3se$(i.instance,o,r),p}))},jr.prototype.onTimeout_7xvrws$=function(t,e){var n,i,o;this.clauses.add_11rb$((n=this,i=t,o=e,function(){return n.instance.onTimeout_7xvrws$(i,o),p}))},jr.$metadata$={kind:s,simpleName:"UnbiasedSelectBuilderImpl",interfaces:[kr]},w("kotlinx-coroutines-core.kotlinx.coroutines.selects.whileSelect_vmyjlh$",x((function(){var n=t.kotlinx.coroutines.selects.SelectBuilderImpl,i=Error;function o(t){return function(o){var r=new n(o);try{t(r)}catch(t){if(!e.isType(t,i))throw t;r.handleBuilderException_tcv7n7$(t)}return r.getResult()}}return function(t,n){for(;e.suspendCall(o(t)(e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver()););}}))),w("kotlinx-coroutines-core.kotlinx.coroutines.sync.withLock_8701tb$",(function(t,n,i,o){void 0===n&&(n=null),e.suspendCall(t.lock_s8jyv4$(n,e.coroutineReceiver()));try{return i()}finally{t.unlock_s8jyv4$(n)}})),Lr.prototype.toString=function(){return"Empty["+this.locked.toString()+"]"},Lr.$metadata$={kind:s,simpleName:"Empty",interfaces:[]},w("kotlinx-coroutines-core.kotlinx.coroutines.sync.withPermit_103m5a$",(function(t,n,i){e.suspendCall(t.acquire(e.coroutineReceiver()));try{return n()}finally{t.release()}})),zr.$metadata$={kind:s,simpleName:"CloseableCoroutineDispatcher",interfaces:[ie]},Dr.$metadata$={kind:s,simpleName:"CompletionHandlerBase",interfaces:[Ta]},Mr.$metadata$={kind:s,simpleName:"CancelHandlerBase",interfaces:[]},Vr.prototype.afterResume_s8jyv4$=function(t){this.uCont.resumeWith_tl1gpc$(Qt(t,this.uCont))},Vr.$metadata$={kind:s,simpleName:"UndispatchedCoroutine",interfaces:[lr]},Object.defineProperty(Zr.prototype,"Main",{configurable:!0,get:function(){var t;return null!=(t=this.injectedMainDispatcher_0)?t:this.mainDispatcher_0}}),Zr.prototype.injectMain_ox7ct2$=function(t){this.injectedMainDispatcher_0=t},Zr.prototype.resetInjectedMain=function(){this.injectedMainDispatcher_0=null},Zr.$metadata$={kind:T,simpleName:"Dispatchers",interfaces:[]};var Jr,Qr=null;function ta(){return null===Qr&&new Zr,Qr}function ea(t,e){Dn.call(this),this.delegate=t,this.invokeImmediately_0=e,this.immediate_iydbla$_0=this.invokeImmediately_0?this:new ea(this.delegate,!0)}function na(){return new ia}function ia(){ze.call(this)}function oa(){ze.call(this)}function ra(){throw et("runBlocking event loop is not supported")}function aa(t,e,n){z(t,e,this),this.job_8be2vx$=n,this.name="JobCancellationException"}function sa(t){return wt(t,H,Jr).toInt()}function la(){ie.call(this),this.messageQueue_8be2vx$=new ua(this)}function ua(t){var e;this.$outer=t,va.call(this),this.processQueue_8be2vx$=(e=this,function(){return e.process(),p})}function ca(){pa=this,la.call(this)}Object.defineProperty(ea.prototype,"immediate",{configurable:!0,get:function(){return this.immediate_iydbla$_0}}),ea.prototype.isDispatchNeeded_1fupul$=function(t){return!this.invokeImmediately_0},ea.prototype.dispatch_5bn72i$=function(t,e){this.delegate.dispatch_5bn72i$(t,e)},ea.prototype.dispatchYield_5bn72i$=function(t,e){this.delegate.dispatchYield_5bn72i$(t,e)},ea.prototype.toString=function(){var t;return null!=(t=this.toStringInternalImpl())?t:this.delegate.toString()},ea.$metadata$={kind:s,simpleName:"JsMainDispatcher",interfaces:[Dn]},ia.prototype.dispatch_5bn72i$=function(t,e){ra()},ia.$metadata$={kind:s,simpleName:"UnconfinedEventLoop",interfaces:[ze]},oa.prototype.unpark_0=function(){ra()},oa.prototype.reschedule_0=function(t,e){ra()},oa.$metadata$={kind:s,simpleName:"EventLoopImplPlatform",interfaces:[ze]},aa.prototype.toString=function(){return W.prototype.toString.call(this)+"; job="+this.job_8be2vx$},aa.prototype.equals=function(t){return t===this||e.isType(t,aa)&&b(t.message,this.message)&&b(t.job_8be2vx$,this.job_8be2vx$)&&b(t.cause,this.cause)},aa.prototype.hashCode=function(){var t,e;return(31*((31*lt(K(this.message))|0)+lt(this.job_8be2vx$)|0)|0)+(null!=(e=null!=(t=this.cause)?lt(t):null)?e:0)|0},aa.$metadata$={kind:s,simpleName:"JobCancellationException",interfaces:[W]},ua.prototype.schedule=function(){this.$outer.scheduleQueueProcessing()},ua.prototype.reschedule=function(){setTimeout(this.processQueue_8be2vx$,0)},ua.$metadata$={kind:s,simpleName:"ScheduledMessageQueue",interfaces:[va]},la.prototype.limitedParallelism_za3lpa$=function(t){return Fo(t),this},la.prototype.dispatch_5bn72i$=function(t,e){this.messageQueue_8be2vx$.enqueue_771g0p$(e)},la.prototype.invokeOnTimeout_oczv3n$=function(t,e,n){return new ma(setTimeout((i=e,function(){return i.run(),p}),sa(t)));var i},la.prototype.scheduleResumeAfterDelay_egqmvs$=function(t,e){var n,i,o=setTimeout((n=e,i=this,function(){return n.resumeUndispatched_hyuxa3$(i,p),p}),sa(t));e.invokeOnCancellation_f05bi3$(new ma(o))},la.$metadata$={kind:s,simpleName:"SetTimeoutBasedDispatcher",interfaces:[je,ie]},ca.prototype.scheduleQueueProcessing=function(){process.nextTick(this.messageQueue_8be2vx$.processQueue_8be2vx$)},ca.$metadata$={kind:T,simpleName:"NodeDispatcher",interfaces:[la]};var pa=null;function ha(){return null===pa&&new ca,pa}function _a(){da=this,la.call(this)}_a.prototype.scheduleQueueProcessing=function(){setTimeout(this.messageQueue_8be2vx$.processQueue_8be2vx$,0)},_a.$metadata$={kind:T,simpleName:"SetTimeoutDispatcher",interfaces:[la]};var da=null;function fa(){return null===da&&new _a,da}function ma(t){qt.call(this),this.handle_0=t}function $a(t){ie.call(this),this.window_0=t,this.queue_0=new ga(this.window_0)}function ya(t,e){this.this$WindowDispatcher=t,this.closure$handle=e}function ga(t){var e;va.call(this),this.window_0=t,this.messageName_0="dispatchCoroutine",this.window_0.addEventListener("message",(e=this,function(t){return t.source==e.window_0&&t.data==e.messageName_0&&(t.stopPropagation(),e.process()),p}),!0)}function va(){To.call(this),this.yieldEvery=16,this.scheduled_0=!1}function ba(){}function wa(){}function xa(t){}function ka(t){var e,n;if(null!=(e=t.coroutineDispatcher))n=e;else{var i=new $a(t);t.coroutineDispatcher=i,n=i}return n}function Ca(t){N("Flow was aborted, no more elements needed",this),this.owner=t,this.name="AbortFlowException"}function Ea(){}function Sa(t){return xt(t)}function Ta(){this._next=this,this._prev=this,this._removed=!1}function Oa(t,e){Pa.call(this),this.queue=t,this.node=e}function Na(t){Pa.call(this),this.queue=t,this.affectedNode_rjf1fm$_0=this.queue._next}function Pa(){Po.call(this)}function Ia(t,e,n){Oo.call(this),this.affected=t,this.desc=e,this.atomicOp_khy6pf$_0=n}function Aa(){Ta.call(this)}function Ra(t,e){return t}function ja(t){return t}function La(t){return t}function za(){}function Da(t,e){}function Ma(t){return null}function Ba(t){return 0}function Fa(){this.value_0=null}ma.prototype.dispose=function(){clearTimeout(this.handle_0)},ma.prototype.invoke=function(t){this.dispose()},ma.prototype.toString=function(){return"ClearTimeout["+this.handle_0+"]"},ma.$metadata$={kind:s,simpleName:"ClearTimeout",interfaces:[We,qt]},$a.prototype.dispatch_5bn72i$=function(t,e){this.queue_0.enqueue_771g0p$(e)},$a.prototype.scheduleResumeAfterDelay_egqmvs$=function(t,e){var n,i;this.window_0.setTimeout((n=e,i=this,function(){return n.resumeUndispatched_hyuxa3$(i,p),p}),sa(t))},ya.prototype.dispose=function(){this.this$WindowDispatcher.window_0.clearTimeout(this.closure$handle)},ya.$metadata$={kind:s,interfaces:[We]},$a.prototype.invokeOnTimeout_oczv3n$=function(t,e,n){return new ya(this,this.window_0.setTimeout((i=e,function(){return i.run(),p}),sa(t)));var i},$a.$metadata$={kind:s,simpleName:"WindowDispatcher",interfaces:[je,ie]},ga.prototype.schedule=function(){var t;Promise.resolve(p).then((t=this,function(e){return t.process(),p}))},ga.prototype.reschedule=function(){this.window_0.postMessage(this.messageName_0,"*")},ga.$metadata$={kind:s,simpleName:"WindowMessageQueue",interfaces:[va]},va.prototype.enqueue_771g0p$=function(t){this.addLast_trkh7z$(t),this.scheduled_0||(this.scheduled_0=!0,this.schedule())},va.prototype.process=function(){try{for(var t=this.yieldEvery,e=0;e "+n+"\n |with response from "+get_request(t).url+":\n |status: "+t.status+"\n |response headers: \n |"+joinToString(flattenEntries(t.headers),void 0,void 0,void 0,void 0,void 0,NoTransformationFoundException$message$lambda)+"\n ")}function NoTransformationFoundException$message$lambda(t){return t.component1()+": "+t.component2()+"\n"}function SavedHttpCall(t,e,n,i){HttpClientCall.call(this,t),this.responseBody_0=i,this.request=new SavedHttpRequest(this,e),this.response=new SavedHttpResponse(this,this.responseBody_0,n),this.allowDoubleReceive_je4pft$_0=!0}function SavedHttpRequest(t,e){this.call_k7cxor$_0=t,this.$delegate_k8mkjd$_0=e}function SavedHttpResponse(t,e,n){HttpResponse.call(this),this.call_tbj7t5$_0=t,this.context_0=Job_0(),this.status_i2dvkt$_0=n.status,this.version_ol3l9j$_0=n.version,this.requestTime_3msfjx$_0=n.requestTime,this.responseTime_xhbsdj$_0=n.responseTime,this.headers_w25qx3$_0=n.headers,this.coroutineContext_pwmz9e$_0=n.coroutineContext.plus_1fupul$(this.context_0),this.content_mzxkbe$_0=ByteReadChannel_0(e)}function Coroutine$save(t,e){CoroutineImpl.call(this,e),this.exceptionState_0=1,this.local$$receiver=t}function save(t,e,n){var i=new Coroutine$save(t,e);return n?i:i.doResume(null)}function UnsupportedContentTypeException(t){IllegalStateException_init("Failed to write body: "+Kotlin.getKClassFromExpression(t),this),this.name="UnsupportedContentTypeException"}function ObservableContent(t,e,n){var i;if(OutgoingContent$ReadChannelContent.call(this),this.callContext_0=e,this.listener_0=n,Kotlin.isType(t,OutgoingContent$ByteArrayContent))i=ByteReadChannel_0(t.bytes());else{if(Kotlin.isType(t,OutgoingContent$ProtocolUpgrade))throw new UnsupportedContentTypeException(t);i=Kotlin.isType(t,OutgoingContent$NoContent)?ByteReadChannel.Companion.Empty:Kotlin.isType(t,OutgoingContent$ReadChannelContent)?t.readFrom():Kotlin.isType(t,OutgoingContent$WriteChannelContent)?writer(coroutines.GlobalScope,this.callContext_0,!0,ObservableContent$content$lambda(t)).channel:Kotlin.noWhenBranchMatched()}this.content_0=i,this.delegate_0=t}function Coroutine$ObservableContent$content$lambda(t,e,n,i){CoroutineImpl.call(this,i),this.$controller=n,this.exceptionState_0=1,this.local$closure$delegate=t,this.local$$receiver=e}function ObservableContent$content$lambda(t){return function(e,n,i){var o=new Coroutine$ObservableContent$content$lambda(t,e,this,n);return i?o:o.doResume(null)}}function attachToUserJob$lambda(t){return function(e){if(null!=e)return t.cancel_x5z25k$(CancellationException_init(e.message)),Unit}}function attachToUserJob$lambda_0(t){return function(e){return t.dispose(),Unit}}function HttpClientEngine(){}function HttpClientEngine$install$lambda$lambda(t,e){return function(n){return null!=n&&t.monitor.raise_asioqi$(HttpResponseCancelled,e),Unit}}function Coroutine$HttpClientEngine$install$lambda(t,e,n,i,o,r){CoroutineImpl.call(this,r),this.$controller=o,this.exceptionState_0=1,this.local$closure$client=t,this.local$this$HttpClientEngine=e,this.local$requestData=void 0,this.local$$receiver=n,this.local$content=i}function HttpClientEngine$install$lambda(t,e){return function(n,i,o,r){var a=new Coroutine$HttpClientEngine$install$lambda(t,e,n,i,this,o);return r?a:a.doResume(null)}}function Coroutine$HttpClientEngine$executeWithinCallContext$lambda(t,e,n,i,o){CoroutineImpl.call(this,o),this.$controller=i,this.exceptionState_0=1,this.local$this$HttpClientEngine=t,this.local$closure$requestData=e}function HttpClientEngine$executeWithinCallContext$lambda(t,e){return function(n,i,o){var r=new Coroutine$HttpClientEngine$executeWithinCallContext$lambda(t,e,n,this,i);return o?r:r.doResume(null)}}function Coroutine$executeWithinCallContext_2kaaho$_0(t,e,n){CoroutineImpl.call(this,n),this.exceptionState_0=1,this.$this=t,this.local$requestData=e}function HttpClientEngineFactory(){}function HttpClientEngineFactory$create$lambda(t){return Unit}function config$ObjectLiteral(t,e){this.closure$parent=t,this.closure$nested=e}function createCallContext(t,e,n){var i=Job_0(e),o=t.coroutineContext.plus_1fupul$(i).plus_1fupul$(CALL_COROUTINE);t:do{var r;if(null==(r=n.context.get_j3r2sn$(Job.Key)))break t;var a=r.invokeOnCompletion_ct2b2z$(!0,void 0,attachToUserJob$lambda(i));i.invokeOnCompletion_f05bi3$(attachToUserJob$lambda_0(a))}while(0);return o}function validateHeaders(t){var e,n=t.headers.names(),i=ArrayList_init();for(e=n.iterator();e.hasNext();){var o=e.next();http.HttpHeaders.UnsafeHeadersList.contains_11rb$(o)&&i.add_11rb$(o)}var r=i;if(!r.isEmpty())throw new UnsafeHeaderException(r.toString())}function HttpClientEngineBase(t){this.engineName_n0bloo$_0=t,this.closed_je8r6f$_0=atomic(!1),this.coroutineContext_huxu0y$_0=lazy(HttpClientEngineBase$coroutineContext$lambda(this))}function HttpClientEngineBase$close$lambda(t){return function(e){return close_1(t.dispatcher),Unit}}function HttpClientEngineBase$coroutineContext$lambda(t){return function(){return SilentSupervisor().plus_1fupul$(t.dispatcher).plus_1fupul$(new CoroutineName(t.engineName_n0bloo$_0+"-context"))}}function ClientEngineClosedException(t){void 0===t&&(t=null),IllegalStateException_init("Client already closed",this),this.cause_om4vf0$_0=t,this.name="ClientEngineClosedException"}function close_1(t){try{(Kotlin.isType(t,CloseableCoroutineDispatcher)||Kotlin.isType(t,Closeable))&&t.close()}catch(t){if(!Kotlin.isType(t,Throwable))throw t}}function HttpClientEngineCapability(){}function HttpClientEngineConfig(){this.threadsCount=4,this.pipelining=!1,this.proxy=null}function mergeHeaders$lambda(t,e){return function(n){return n.appendAll_hb0ubp$(t),n.appendAll_hb0ubp$(e.headers),Unit}}function mergeHeaders$lambda_0(t){return function(e,n){if(!equals(http.HttpHeaders.ContentLength,e)&&!equals(http.HttpHeaders.ContentType,e)){var i;if(DATE_HEADERS.contains_11rb$(e))for(i=n.iterator();i.hasNext();){var o=i.next();t(e,o)}else t(e,joinToString(n,","));return Unit}}}function mergeHeaders(t,e,n){var i,o,r,a,s,l;buildHeaders(mergeHeaders$lambda(t,e)).forEach_ubvtmq$(mergeHeaders$lambda_0(n)),null==t.get_61zpoe$(http.HttpHeaders.UserAgent)&&null==e.headers.get_61zpoe$(http.HttpHeaders.UserAgent)&&needUserAgent()&&n(http.HttpHeaders.UserAgent,KTOR_DEFAULT_USER_AGENT);var u=null!=(r=null!=(o=null!=(i=e.contentType)?i.toString():null)?o:e.headers.get_61zpoe$(http.HttpHeaders.ContentType))?r:t.get_61zpoe$(http.HttpHeaders.ContentType),c=null!=(l=null!=(s=null!=(a=e.contentLength)?a.toString():null)?s:e.headers.get_61zpoe$(http.HttpHeaders.ContentLength))?l:t.get_61zpoe$(http.HttpHeaders.ContentLength);null!=u&&n(http.HttpHeaders.ContentType,u),null!=c&&n(http.HttpHeaders.ContentLength,c)}function callContext(t){return ensureNotNull(t.context.get_j3r2sn$(KtorCallContextElement$Companion_getInstance())).callContext}function KtorCallContextElement(t){KtorCallContextElement$Companion_getInstance(),this.callContext=t}function KtorCallContextElement$Companion(){KtorCallContextElement$Companion_instance=this}HttpClientCall.$metadata$={kind:Kind_CLASS,simpleName:"HttpClientCall",interfaces:[CoroutineScope]},defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.call.body_8ov3cv$",wrapFunction((function(){var t=Kotlin.getReifiedTypeParameterKType,e=Kotlin.throwCCE,n=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,i=Kotlin.getKClass,o=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,r=Error;return function(a,s,l,u){var c,p,h=n.JsType,_=i(a);t:do{try{p=t(a)}catch(t){if(Kotlin.isType(t,r)){p=null;break t}throw t}}while(0);return Kotlin.suspendCall(l.bodyNullable_qi9ur9$(o(h,_,p),Kotlin.coroutineReceiver())),s(c=Kotlin.coroutineResult(Kotlin.coroutineReceiver()))?c:e()}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.call.body_5sqbag$",wrapFunction((function(){var t=Kotlin.getReifiedTypeParameterKType,e=Kotlin.throwCCE,n=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,i=Kotlin.getKClass,o=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,r=Error;return function(a,s,l,u){var c,p,h=l.call,_=n.JsType,d=i(a);t:do{try{p=t(a)}catch(t){if(Kotlin.isType(t,r)){p=null;break t}throw t}}while(0);return Kotlin.suspendCall(h.bodyNullable_qi9ur9$(o(_,d,p),Kotlin.coroutineReceiver())),s(c=Kotlin.coroutineResult(Kotlin.coroutineReceiver()))?c:e()}}))),Object.defineProperty(DoubleReceiveException.prototype,"message",{configurable:!0,get:function(){return this.message_eo7lbx$_0}}),DoubleReceiveException.$metadata$={kind:Kind_CLASS,simpleName:"DoubleReceiveException",interfaces:[IllegalStateException]},Object.defineProperty(NoTransformationFoundException.prototype,"message",{configurable:!0,get:function(){return this.message_gd84kd$_0}}),NoTransformationFoundException.$metadata$={kind:Kind_CLASS,simpleName:"NoTransformationFoundException",interfaces:[UnsupportedOperationException]},SavedHttpCall.prototype.getResponseContent=function(t){return ByteReadChannel_0(this.responseBody_0)},Object.defineProperty(SavedHttpCall.prototype,"allowDoubleReceive",{configurable:!0,get:function(){return this.allowDoubleReceive_je4pft$_0}}),SavedHttpCall.$metadata$={kind:Kind_CLASS,simpleName:"SavedHttpCall",interfaces:[HttpClientCall]},Object.defineProperty(SavedHttpRequest.prototype,"call",{get:function(){return this.call_k7cxor$_0}}),Object.defineProperty(SavedHttpRequest.prototype,"attributes",{configurable:!0,get:function(){return this.$delegate_k8mkjd$_0.attributes}}),Object.defineProperty(SavedHttpRequest.prototype,"content",{configurable:!0,get:function(){return this.$delegate_k8mkjd$_0.content}}),Object.defineProperty(SavedHttpRequest.prototype,"coroutineContext",{configurable:!0,get:function(){return this.$delegate_k8mkjd$_0.coroutineContext}}),Object.defineProperty(SavedHttpRequest.prototype,"headers",{configurable:!0,get:function(){return this.$delegate_k8mkjd$_0.headers}}),Object.defineProperty(SavedHttpRequest.prototype,"method",{configurable:!0,get:function(){return this.$delegate_k8mkjd$_0.method}}),Object.defineProperty(SavedHttpRequest.prototype,"url",{configurable:!0,get:function(){return this.$delegate_k8mkjd$_0.url}}),SavedHttpRequest.$metadata$={kind:Kind_CLASS,simpleName:"SavedHttpRequest",interfaces:[HttpRequest_0]},Object.defineProperty(SavedHttpResponse.prototype,"call",{get:function(){return this.call_tbj7t5$_0}}),Object.defineProperty(SavedHttpResponse.prototype,"status",{configurable:!0,get:function(){return this.status_i2dvkt$_0}}),Object.defineProperty(SavedHttpResponse.prototype,"version",{configurable:!0,get:function(){return this.version_ol3l9j$_0}}),Object.defineProperty(SavedHttpResponse.prototype,"requestTime",{configurable:!0,get:function(){return this.requestTime_3msfjx$_0}}),Object.defineProperty(SavedHttpResponse.prototype,"responseTime",{configurable:!0,get:function(){return this.responseTime_xhbsdj$_0}}),Object.defineProperty(SavedHttpResponse.prototype,"headers",{configurable:!0,get:function(){return this.headers_w25qx3$_0}}),Object.defineProperty(SavedHttpResponse.prototype,"coroutineContext",{configurable:!0,get:function(){return this.coroutineContext_pwmz9e$_0}}),Object.defineProperty(SavedHttpResponse.prototype,"content",{configurable:!0,get:function(){return this.content_mzxkbe$_0}}),SavedHttpResponse.$metadata$={kind:Kind_CLASS,simpleName:"SavedHttpResponse",interfaces:[HttpResponse]},Coroutine$save.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$save.prototype=Object.create(CoroutineImpl.prototype),Coroutine$save.prototype.constructor=Coroutine$save,Coroutine$save.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.local$$receiver.response.content.readRemaining_s8cxhz$(void 0,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 1:throw this.exception_0;case 2:var t=readBytes(this.result_0);return new SavedHttpCall(this.local$$receiver.client,this.local$$receiver.request,this.local$$receiver.response,t);default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},UnsupportedContentTypeException.$metadata$={kind:Kind_CLASS,simpleName:"UnsupportedContentTypeException",interfaces:[IllegalStateException]},Object.defineProperty(ObservableContent.prototype,"contentType",{configurable:!0,get:function(){return this.delegate_0.contentType}}),Object.defineProperty(ObservableContent.prototype,"contentLength",{configurable:!0,get:function(){return this.delegate_0.contentLength}}),Object.defineProperty(ObservableContent.prototype,"status",{configurable:!0,get:function(){return this.delegate_0.status}}),Object.defineProperty(ObservableContent.prototype,"headers",{configurable:!0,get:function(){return this.delegate_0.headers}}),ObservableContent.prototype.getProperty_yzaw86$=function(t){return this.delegate_0.getProperty_yzaw86$(t)},ObservableContent.prototype.setProperty_uuntuo$=function(t,e){this.delegate_0.setProperty_uuntuo$(t,e)},ObservableContent.prototype.readFrom=function(){return observable(this.content_0,this.callContext_0,this.contentLength,this.listener_0)},Coroutine$ObservableContent$content$lambda.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$ObservableContent$content$lambda.prototype=Object.create(CoroutineImpl.prototype),Coroutine$ObservableContent$content$lambda.prototype.constructor=Coroutine$ObservableContent$content$lambda,Coroutine$ObservableContent$content$lambda.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.local$closure$delegate.writeTo_h3x4ir$(this.local$$receiver.channel,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 1:throw this.exception_0;case 2:return this.result_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},ObservableContent.$metadata$={kind:Kind_CLASS,simpleName:"ObservableContent",interfaces:[OutgoingContent$ReadChannelContent]},Object.defineProperty(HttpClientEngine.prototype,"supportedCapabilities",{configurable:!0,get:function(){return emptySet()}}),Object.defineProperty(HttpClientEngine.prototype,"closed_yj5g8o$_0",{configurable:!0,get:function(){var t,e;return!(null!=(e=null!=(t=this.coroutineContext.get_j3r2sn$(Job.Key))?t.isActive:null)&&e)}}),Coroutine$HttpClientEngine$install$lambda.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$HttpClientEngine$install$lambda.prototype=Object.create(CoroutineImpl.prototype),Coroutine$HttpClientEngine$install$lambda.prototype.constructor=Coroutine$HttpClientEngine$install$lambda,Coroutine$HttpClientEngine$install$lambda.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t=new HttpRequestBuilder;if(t.takeFromWithExecutionContext_s9rlw$(this.local$$receiver.context),null==this.local$content){t.body=content.NullBody;var e,n=reflect.JsType,i=PrimitiveClasses$anyClass;t:do{try{e=createKType(PrimitiveClasses$anyClass,[],!1)}catch(t){if(Kotlin.isType(t,Throwable)){e=null;break t}throw t}}while(0);t.bodyType=typeInfoImpl(n,i,e)}else if(Kotlin.isType(this.local$content,OutgoingContent))t.body=this.local$content,t.bodyType=null;else{t.body=this.local$content;var o,r=reflect.JsType,a=PrimitiveClasses$anyClass;t:do{try{o=createKType(PrimitiveClasses$anyClass,[],!1)}catch(t){if(Kotlin.isType(t,Throwable)){o=null;break t}throw t}}while(0);t.bodyType=typeInfoImpl(r,a,o)}var s=t;this.local$closure$client.monitor.raise_asioqi$(HttpRequestIsReadyForSending,s);var l=s.build();if(l.attributes.put_uuntuo$(CLIENT_CONFIG,this.local$closure$client.config_8be2vx$),this.local$requestData=l,validateHeaders(this.local$requestData),this.local$this$HttpClientEngine.checkExtensions_1320zn$_0(this.local$requestData),this.state_0=2,this.result_0=this.local$this$HttpClientEngine.executeWithinCallContext_2kaaho$_0(this.local$requestData,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 1:throw this.exception_0;case 2:var u=this.result_0,c=HttpClientCall_init(this.local$closure$client,this.local$requestData,u),p=c.response;if(this.local$closure$client.monitor.raise_asioqi$(HttpResponseReceived,p),get_job(p.coroutineContext).invokeOnCompletion_f05bi3$(HttpClientEngine$install$lambda$lambda(this.local$closure$client,p)),this.state_0=3,this.result_0=this.local$$receiver.proceedWith_trkh7z$(c,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 3:return this.result_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},HttpClientEngine.prototype.install_k5i6f8$=function(t){t.sendPipeline.intercept_h71y74$(HttpSendPipeline$Phases_getInstance().Engine,HttpClientEngine$install$lambda(t,this))},Coroutine$HttpClientEngine$executeWithinCallContext$lambda.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$HttpClientEngine$executeWithinCallContext$lambda.prototype=Object.create(CoroutineImpl.prototype),Coroutine$HttpClientEngine$executeWithinCallContext$lambda.prototype.constructor=Coroutine$HttpClientEngine$executeWithinCallContext$lambda,Coroutine$HttpClientEngine$executeWithinCallContext$lambda.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.local$this$HttpClientEngine.closed_yj5g8o$_0)throw new ClientEngineClosedException;if(this.state_0=2,this.result_0=this.local$this$HttpClientEngine.execute_dkgphz$(this.local$closure$requestData,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 1:throw this.exception_0;case 2:return this.result_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Coroutine$executeWithinCallContext_2kaaho$_0.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$executeWithinCallContext_2kaaho$_0.prototype=Object.create(CoroutineImpl.prototype),Coroutine$executeWithinCallContext_2kaaho$_0.prototype.constructor=Coroutine$executeWithinCallContext_2kaaho$_0,Coroutine$executeWithinCallContext_2kaaho$_0.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=createCallContext(this.$this,this.local$requestData.executionContext,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 1:throw this.exception_0;case 2:var t=this.result_0,e=t.plus_1fupul$(new KtorCallContextElement(t));if(this.state_0=3,this.result_0=async(this.$this,e,void 0,HttpClientEngine$executeWithinCallContext$lambda(this.$this,this.local$requestData)).await(this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 3:return this.result_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},HttpClientEngine.prototype.executeWithinCallContext_2kaaho$_0=function(t,e,n){var i=new Coroutine$executeWithinCallContext_2kaaho$_0(this,t,e);return n?i:i.doResume(null)},HttpClientEngine.prototype.checkExtensions_1320zn$_0=function(t){var e;for(e=t.requiredCapabilities_8be2vx$.iterator();e.hasNext();){var n=e.next();if(!this.supportedCapabilities.contains_11rb$(n))throw IllegalArgumentException_init(("Engine doesn't support "+n).toString())}},HttpClientEngine.$metadata$={kind:Kind_INTERFACE,simpleName:"HttpClientEngine",interfaces:[Closeable,CoroutineScope]},HttpClientEngineFactory.prototype.create_dxyxif$=function(t,e){return void 0===t&&(t=HttpClientEngineFactory$create$lambda),e?e(t):this.create_dxyxif$$default(t)},HttpClientEngineFactory.$metadata$={kind:Kind_INTERFACE,simpleName:"HttpClientEngineFactory",interfaces:[]},Object.defineProperty(HttpClientEngineBase.prototype,"coroutineContext",{configurable:!0,get:function(){return this.coroutineContext_huxu0y$_0.value}}),HttpClientEngineBase.prototype.close=function(){var t,e;if(this.closed_je8r6f$_0.atomicfu$compareAndSet(!1,!0)&&null!=(e=Kotlin.isType(t=this.coroutineContext.get_j3r2sn$(Job.Key),CompletableJob)?t:null)){var n=e;n.complete(),n.invokeOnCompletion_f05bi3$(HttpClientEngineBase$close$lambda(this))}},HttpClientEngineBase.$metadata$={kind:Kind_CLASS,simpleName:"HttpClientEngineBase",interfaces:[HttpClientEngine]},Object.defineProperty(ClientEngineClosedException.prototype,"cause",{get:function(){return this.cause_om4vf0$_0}}),ClientEngineClosedException.$metadata$={kind:Kind_CLASS,simpleName:"ClientEngineClosedException",interfaces:[IllegalStateException]},HttpClientEngineCapability.$metadata$={kind:Kind_INTERFACE,simpleName:"HttpClientEngineCapability",interfaces:[]},HttpClientEngineConfig.$metadata$={kind:Kind_CLASS,simpleName:"HttpClientEngineConfig",interfaces:[]},Object.defineProperty(KtorCallContextElement.prototype,"key",{configurable:!0,get:function(){return KtorCallContextElement$Companion_getInstance()}}),KtorCallContextElement$Companion.$metadata$={kind:Kind_OBJECT,simpleName:"Companion",interfaces:[CoroutineContext$Key]};var KtorCallContextElement$Companion_instance=null,UploadProgressListenerAttributeKey,DownloadProgressListenerAttributeKey;function KtorCallContextElement$Companion_getInstance(){return null===KtorCallContextElement$Companion_instance&&new KtorCallContextElement$Companion,KtorCallContextElement$Companion_instance}function needUserAgent(){return!util.PlatformUtils.IS_BROWSER}function BodyProgress(){BodyProgress$Plugin_getInstance()}function Coroutine$BodyProgress$handle$lambda(t,e,n,i){CoroutineImpl.call(this,i),this.$controller=n,this.exceptionState_0=1,this.local$tmp$=void 0,this.local$$receiver=t,this.local$content=e}function BodyProgress$handle$lambda(t,e,n,i){var o=new Coroutine$BodyProgress$handle$lambda(t,e,this,n);return i?o:o.doResume(null)}function Coroutine$BodyProgress$handle$lambda_0(t,e,n,i){CoroutineImpl.call(this,i),this.$controller=n,this.exceptionState_0=1,this.local$tmp$=void 0,this.local$$receiver=t,this.local$response=e}function BodyProgress$handle$lambda_0(t,e,n,i){var o=new Coroutine$BodyProgress$handle$lambda_0(t,e,this,n);return i?o:o.doResume(null)}function BodyProgress$Plugin(){BodyProgress$Plugin_instance=this,this.key_xac8mq$_0=new AttributeKey("BodyProgress")}KtorCallContextElement.$metadata$={kind:Kind_CLASS,simpleName:"KtorCallContextElement",interfaces:[CoroutineContext$Element]},defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.engine.attachToUserJob_mmkme6$",wrapFunction((function(){var t=_.$$importsForInline$$["kotlinx-coroutines-core"].kotlinx.coroutines.Job,e=Kotlin.kotlin.coroutines.cancellation.CancellationException_init_pdl1vj$,n=Kotlin.kotlin.Unit;return function(i,o){var r;if(null!=(r=Kotlin.coroutineReceiver().context.get_j3r2sn$(t.Key))){var a,s,l=r.invokeOnCompletion_ct2b2z$(!0,void 0,(a=i,function(t){if(null!=t)return a.cancel_x5z25k$(e(t.message)),n}));i.invokeOnCompletion_f05bi3$((s=l,function(t){return s.dispose(),n}))}}}))),Coroutine$BodyProgress$handle$lambda.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$BodyProgress$handle$lambda.prototype=Object.create(CoroutineImpl.prototype),Coroutine$BodyProgress$handle$lambda.prototype.constructor=Coroutine$BodyProgress$handle$lambda,Coroutine$BodyProgress$handle$lambda.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;if(this.local$tmp$=this.local$$receiver.context.attributes.getOrNull_yzaw86$(UploadProgressListenerAttributeKey),null==this.local$tmp$)return;this.state_0=2;continue;case 1:throw this.exception_0;case 2:var e=this.local$tmp$,n=new ObservableContent(Kotlin.isType(t=this.local$content,OutgoingContent)?t:throwCCE(),this.local$$receiver.context.executionContext,e);if(this.state_0=3,this.result_0=this.local$$receiver.proceedWith_trkh7z$(n,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 3:return this.result_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Coroutine$BodyProgress$handle$lambda_0.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$BodyProgress$handle$lambda_0.prototype=Object.create(CoroutineImpl.prototype),Coroutine$BodyProgress$handle$lambda_0.prototype.constructor=Coroutine$BodyProgress$handle$lambda_0,Coroutine$BodyProgress$handle$lambda_0.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.local$tmp$=this.local$response.call.request.attributes.getOrNull_yzaw86$(DownloadProgressListenerAttributeKey),null==this.local$tmp$)return;this.state_0=2;continue;case 1:throw this.exception_0;case 2:var t=this.local$tmp$,e=withObservableDownload(this.local$response,t);if(this.state_0=3,this.result_0=this.local$$receiver.proceedWith_trkh7z$(e,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 3:return this.result_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},BodyProgress.prototype.handle_0=function(t){var e=new PipelinePhase("ObservableContent");t.requestPipeline.insertPhaseAfter_b9zzbm$(HttpRequestPipeline$Phases_getInstance().Render,e),t.requestPipeline.intercept_h71y74$(e,BodyProgress$handle$lambda),t.receivePipeline.intercept_h71y74$(HttpReceivePipeline$Phases_getInstance().After,BodyProgress$handle$lambda_0)},Object.defineProperty(BodyProgress$Plugin.prototype,"key",{configurable:!0,get:function(){return this.key_xac8mq$_0}}),BodyProgress$Plugin.prototype.prepare_oh3mgy$$default=function(t){return new BodyProgress},BodyProgress$Plugin.prototype.install_wojrb5$=function(t,e){t.handle_0(e)},BodyProgress$Plugin.$metadata$={kind:Kind_OBJECT,simpleName:"Plugin",interfaces:[HttpClientPlugin]};var BodyProgress$Plugin_instance=null;function BodyProgress$Plugin_getInstance(){return null===BodyProgress$Plugin_instance&&new BodyProgress$Plugin,BodyProgress$Plugin_instance}function withObservableDownload(t,e){return wrapWithContent_1(t,observable(t.content,t.coroutineContext,contentLength(t),e))}function DataConversion_0(){DataConversion_instance=this,this.key_93ftbi$_0=new AttributeKey("DataConversion")}BodyProgress.$metadata$={kind:Kind_CLASS,simpleName:"BodyProgress",interfaces:[]};var DataConversion_instance=null;function DefaultRequest$Plugin(){DefaultRequest$Plugin_instance=this,this.key_5a3dpp$_0=new AttributeKey("DefaultRequest")}var DefaultRequest$Plugin_instance=null,ValidateMark,NO_RESPONSE_TEXT,BODY_FAILED_DECODING,DEPRECATED_EXCEPTION_CTOR;function Coroutine$addDefaultResponseValidation$lambda$lambda(t,e){CoroutineImpl.call(this,e),this.exceptionState_0=7,this.local$tmp$=void 0,this.local$statusCode=void 0,this.local$originCall=void 0,this.local$exceptionResponse=void 0,this.local$response=t}function addDefaultResponseValidation$lambda$lambda(t,e,n){var i=new Coroutine$addDefaultResponseValidation$lambda$lambda(t,e);return n?i:i.doResume(null)}function addDefaultResponseValidation$lambda(t){return function(e){return e.expectSuccess=t.expectSuccess,e.validateResponse_d4bkoy$(addDefaultResponseValidation$lambda$lambda),Unit}}function addDefaultResponseValidation(t){HttpResponseValidator(t,addDefaultResponseValidation$lambda(t))}function ResponseException(t,e){IllegalStateException_init("Bad response: "+t+'. Text: "'+e+'"',this),this.name="ResponseException",this.response=t}function RedirectResponseException(t,e){ResponseException.call(this,t,e),this.name="RedirectResponseException",this.message_8bpi86$_0="Unhandled redirect: "+t.call.request.method.value+" "+t.call.request.url+". Status: "+t.status+'. Text: "'+e+'"'}function ServerResponseException(t,e){ResponseException.call(this,t,e),this.name="ServerResponseException",this.message_2wntoz$_0="Server error("+t.call.request.method.value+" "+t.call.request.url+": "+t.status.toString()+'. Text: "'+e+'"'}function ClientRequestException(t,e){ResponseException.call(this,t,e),this.name="ClientRequestException",this.message_pce58h$_0="Client request("+t.call.request.method.value+" "+t.call.request.url+") invalid: "+t.status+'. Text: "'+e+'"'}function defaultTransformers$lambda$ObjectLiteral(t,e){this.closure$body=t,OutgoingContent$ByteArrayContent.call(this),this.contentType_qbp83j$_0=null!=e?e:ContentType.Application.OctetStream,this.contentLength_3supn9$_0=Kotlin.Long.fromInt(t.length)}function defaultTransformers$lambda$ObjectLiteral_0(t,e,n){var i;this.closure$body=t,OutgoingContent$ReadChannelContent.call(this),this.contentLength_3supn9$_0=null!=(i=e.context.headers.get_61zpoe$(http.HttpHeaders.ContentLength))?toLong(i):null,this.contentType_qbp83j$_0=null!=n?n:ContentType.Application.OctetStream}function Coroutine$defaultTransformers$lambda(t,e,n,i){CoroutineImpl.call(this,i),this.$controller=n,this.exceptionState_0=1,this.local$$receiver=t,this.local$body=e}function defaultTransformers$lambda(t,e,n,i){var o=new Coroutine$defaultTransformers$lambda(t,e,this,n);return i?o:o.doResume(null)}function Coroutine$defaultTransformers$lambda$lambda(t,e,n,i,o){CoroutineImpl.call(this,o),this.$controller=i,this.exceptionState_0=6,this.local$closure$body=t,this.local$closure$response=e,this.local$$receiver=n}function defaultTransformers$lambda$lambda(t,e){return function(n,i,o){var r=new Coroutine$defaultTransformers$lambda$lambda(t,e,n,this,i);return o?r:r.doResume(null)}}function defaultTransformers$lambda$lambda$lambda(t){return function(e){return t.complete(),Unit}}function Coroutine$defaultTransformers$lambda_0(t,e,n,i){CoroutineImpl.call(this,i),this.$controller=n,this.exceptionState_0=1,this.local$info=void 0,this.local$body=void 0,this.local$response=void 0,this.local$$receiver=t,this.local$f=e}function defaultTransformers$lambda_0(t,e,n,i){var o=new Coroutine$defaultTransformers$lambda_0(t,e,this,n);return i?o:o.doResume(null)}function defaultTransformers(t){t.requestPipeline.intercept_h71y74$(HttpRequestPipeline$Phases_getInstance().Render,defaultTransformers$lambda),t.responsePipeline.intercept_h71y74$(HttpResponsePipeline$Phases_getInstance().Parse,defaultTransformers$lambda_0),platformResponseDefaultTransformers(t)}function HttpCallValidator(t,e,n){HttpCallValidator$Companion_getInstance(),this.responseValidators_0=t,this.callExceptionHandlers_0=e,this.expectSuccess_0=n}function Coroutine$validateResponse_0(t,e,n){CoroutineImpl.call(this,n),this.exceptionState_0=1,this.$this=t,this.local$tmp$=void 0,this.local$response=e}function Coroutine$processException_0(t,e,n,i){CoroutineImpl.call(this,i),this.exceptionState_0=1,this.$this=t,this.local$tmp$=void 0,this.local$cause=e,this.local$request=n}function HttpCallValidator$Config(){this.responseValidators_8be2vx$=ArrayList_init(),this.responseExceptionHandlers_8be2vx$=ArrayList_init(),this.expectSuccess=!0}function HttpCallValidator$Companion(){HttpCallValidator$Companion_instance=this,this.key_vbv7yu$_0=new AttributeKey("HttpResponseValidator")}function HttpCallValidator$Companion$install$lambda$lambda(t){return function(){return t.expectSuccess_0}}function Coroutine$HttpCallValidator$Companion$install$lambda(t,e,n,i,o){CoroutineImpl.call(this,o),this.$controller=i,this.exceptionState_0=6,this.local$closure$plugin=t,this.local$unwrappedCause=void 0,this.local$$receiver=e,this.local$it=n}function HttpCallValidator$Companion$install$lambda(t){return function(e,n,i,o){var r=new Coroutine$HttpCallValidator$Companion$install$lambda(t,e,n,this,i);return o?r:r.doResume(null)}}function Coroutine$HttpCallValidator$Companion$install$lambda_0(t,e,n,i,o){CoroutineImpl.call(this,o),this.$controller=i,this.exceptionState_0=6,this.local$closure$plugin=t,this.local$unwrappedCause=void 0,this.local$$receiver=e,this.local$container=n}function HttpCallValidator$Companion$install$lambda_0(t){return function(e,n,i,o){var r=new Coroutine$HttpCallValidator$Companion$install$lambda_0(t,e,n,this,i);return o?r:r.doResume(null)}}function Coroutine$HttpCallValidator$Companion$install$lambda_1(t,e,n,i,o){CoroutineImpl.call(this,o),this.$controller=i,this.exceptionState_0=1,this.local$closure$plugin=t,this.local$call=void 0,this.local$$receiver=e,this.local$request=n}function HttpCallValidator$Companion$install$lambda_1(t){return function(e,n,i,o){var r=new Coroutine$HttpCallValidator$Companion$install$lambda_1(t,e,n,this,i);return o?r:r.doResume(null)}}Coroutine$addDefaultResponseValidation$lambda$lambda.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$addDefaultResponseValidation$lambda$lambda.prototype=Object.create(CoroutineImpl.prototype),Coroutine$addDefaultResponseValidation$lambda$lambda.prototype.constructor=Coroutine$addDefaultResponseValidation$lambda$lambda,Coroutine$addDefaultResponseValidation$lambda$lambda.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.local$response.call.attributes.get_yzaw86$(ExpectSuccessAttributeKey)){this.state_0=1;continue}return;case 1:if(this.local$statusCode=this.local$response.status.value,this.local$originCall=this.local$response.call,this.local$statusCode<300||this.local$originCall.attributes.contains_w48dwb$(ValidateMark))return;this.state_0=2;continue;case 2:if(this.state_0=3,this.result_0=save(this.local$originCall,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 3:var t=this.result_0;t.attributes.put_uuntuo$(ValidateMark,Unit);var e=t;if(this.local$exceptionResponse=e.response,this.exceptionState_0=5,this.state_0=4,this.result_0=bodyAsText(this.local$exceptionResponse,void 0,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 4:this.local$tmp$=this.result_0,this.exceptionState_0=7,this.state_0=6;continue;case 5:this.exceptionState_0=7;var n=this.exception_0;if(!Kotlin.isType(n,MalformedInputException))throw n;this.local$tmp$=BODY_FAILED_DECODING,this.state_0=6;continue;case 6:var i=this.local$tmp$;throw this.local$statusCode>=300&&this.local$statusCode<=399?new RedirectResponseException(this.local$exceptionResponse,i):this.local$statusCode>=400&&this.local$statusCode<=499?new ClientRequestException(this.local$exceptionResponse,i):this.local$statusCode>=500&&this.local$statusCode<=599?new ServerResponseException(this.local$exceptionResponse,i):new ResponseException(this.local$exceptionResponse,i);case 7:throw this.exception_0;default:throw this.state_0=7,new Error("State Machine Unreachable execution")}}catch(t){if(7===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},ResponseException.$metadata$={kind:Kind_CLASS,simpleName:"ResponseException",interfaces:[IllegalStateException]},Object.defineProperty(RedirectResponseException.prototype,"message",{configurable:!0,get:function(){return this.message_8bpi86$_0}}),RedirectResponseException.$metadata$={kind:Kind_CLASS,simpleName:"RedirectResponseException",interfaces:[ResponseException]},Object.defineProperty(ServerResponseException.prototype,"message",{configurable:!0,get:function(){return this.message_2wntoz$_0}}),ServerResponseException.$metadata$={kind:Kind_CLASS,simpleName:"ServerResponseException",interfaces:[ResponseException]},Object.defineProperty(ClientRequestException.prototype,"message",{configurable:!0,get:function(){return this.message_pce58h$_0}}),ClientRequestException.$metadata$={kind:Kind_CLASS,simpleName:"ClientRequestException",interfaces:[ResponseException]},Object.defineProperty(defaultTransformers$lambda$ObjectLiteral.prototype,"contentType",{configurable:!0,get:function(){return this.contentType_qbp83j$_0}}),Object.defineProperty(defaultTransformers$lambda$ObjectLiteral.prototype,"contentLength",{configurable:!0,get:function(){return this.contentLength_3supn9$_0}}),defaultTransformers$lambda$ObjectLiteral.prototype.bytes=function(){return this.closure$body},defaultTransformers$lambda$ObjectLiteral.$metadata$={kind:Kind_CLASS,interfaces:[OutgoingContent$ByteArrayContent]},Object.defineProperty(defaultTransformers$lambda$ObjectLiteral_0.prototype,"contentLength",{configurable:!0,get:function(){return this.contentLength_3supn9$_0}}),Object.defineProperty(defaultTransformers$lambda$ObjectLiteral_0.prototype,"contentType",{configurable:!0,get:function(){return this.contentType_qbp83j$_0}}),defaultTransformers$lambda$ObjectLiteral_0.prototype.readFrom=function(){return this.closure$body},defaultTransformers$lambda$ObjectLiteral_0.$metadata$={kind:Kind_CLASS,interfaces:[OutgoingContent$ReadChannelContent]},Coroutine$defaultTransformers$lambda.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$defaultTransformers$lambda.prototype=Object.create(CoroutineImpl.prototype),Coroutine$defaultTransformers$lambda.prototype.constructor=Coroutine$defaultTransformers$lambda,Coroutine$defaultTransformers$lambda.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:null==this.local$$receiver.context.headers.get_61zpoe$(http.HttpHeaders.Accept)&&this.local$$receiver.context.headers.append_puj7f4$(http.HttpHeaders.Accept,"*/*");var t=contentType(this.local$$receiver.context),e="string"==typeof this.local$body?new TextContent(this.local$body,null!=t?t:ContentType.Text.Plain):Kotlin.isByteArray(this.local$body)?new defaultTransformers$lambda$ObjectLiteral(this.local$body,t):Kotlin.isType(this.local$body,ByteReadChannel)?new defaultTransformers$lambda$ObjectLiteral_0(this.local$body,this.local$$receiver,t):Kotlin.isType(this.local$body,OutgoingContent)?this.local$body:platformRequestDefaultTransform(t,this.local$$receiver.context,this.local$body);if(null!=(null!=e?e.contentType:null)){if(this.local$$receiver.context.headers.remove_61zpoe$(http.HttpHeaders.ContentType),this.state_0=2,this.result_0=this.local$$receiver.proceedWith_trkh7z$(e,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue}this.state_0=3;continue;case 1:throw this.exception_0;case 2:case 3:return Unit;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Coroutine$defaultTransformers$lambda$lambda.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$defaultTransformers$lambda$lambda.prototype=Object.create(CoroutineImpl.prototype),Coroutine$defaultTransformers$lambda$lambda.prototype.constructor=Coroutine$defaultTransformers$lambda$lambda,Coroutine$defaultTransformers$lambda$lambda.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.exceptionState_0=3,this.state_0=1,this.result_0=copyTo(this.local$closure$body,this.local$$receiver.channel,Long$Companion$MAX_VALUE,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 1:this.exceptionState_0=6,this.finallyPath_0=[2],this.state_0=4,this.$returnValue=this.result_0;continue;case 2:return this.$returnValue;case 3:this.finallyPath_0=[6],this.exceptionState_0=4;var t=this.exception_0;throw Kotlin.isType(t,CancellationException)?(cancel(this.local$closure$response,t),t):Kotlin.isType(t,Throwable)?(cancel_0(this.local$closure$response,"Receive failed",t),t):t;case 4:this.exceptionState_0=6,complete(this.local$closure$response),this.state_0=this.finallyPath_0.shift();continue;case 5:return;case 6:throw this.exception_0;default:throw this.state_0=6,new Error("State Machine Unreachable execution")}}catch(t){if(6===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Coroutine$defaultTransformers$lambda_0.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$defaultTransformers$lambda_0.prototype=Object.create(CoroutineImpl.prototype),Coroutine$defaultTransformers$lambda_0.prototype.constructor=Coroutine$defaultTransformers$lambda_0,Coroutine$defaultTransformers$lambda_0.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;if(this.local$info=this.local$f.component1(),this.local$body=this.local$f.component2(),Kotlin.isType(this.local$body,ByteReadChannel)){this.state_0=2;continue}return;case 1:throw this.exception_0;case 2:if(this.local$response=this.local$$receiver.context.response,t=this.local$info.type,equals(t,getKClass(Object.getPrototypeOf(kotlin.Unit).constructor))){if(cancel_1(this.local$body),this.state_0=16,this.result_0=this.local$$receiver.proceedWith_trkh7z$(new HttpResponseContainer(this.local$info,Unit),this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue}if(equals(t,PrimitiveClasses$intClass)){if(this.state_0=13,this.result_0=this.local$body.readRemaining_s8cxhz$(void 0,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue}if(equals(t,getKClass(ByteReadPacket))||equals(t,getKClass(Input))){if(this.state_0=10,this.result_0=this.local$body.readRemaining_s8cxhz$(void 0,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue}if(equals(t,PrimitiveClasses$byteArrayClass)){if(this.state_0=7,this.result_0=toByteArray(this.local$body,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue}if(equals(t,getKClass(ByteReadChannel))){var e=Job_0(this.local$response.coroutineContext.get_j3r2sn$(Job.Key)),n=writer(this.local$$receiver,this.local$response.coroutineContext,void 0,defaultTransformers$lambda$lambda(this.local$body,this.local$response));n.invokeOnCompletion_f05bi3$(defaultTransformers$lambda$lambda$lambda(e));var i=n.channel;if(this.state_0=5,this.result_0=this.local$$receiver.proceedWith_trkh7z$(new HttpResponseContainer(this.local$info,i),this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue}if(equals(t,getKClass(HttpStatusCode))){if(cancel_1(this.local$body),this.state_0=3,this.result_0=this.local$$receiver.proceedWith_trkh7z$(new HttpResponseContainer(this.local$info,this.local$response.status),this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue}this.state_0=4;continue;case 3:case 5:case 8:case 11:case 14:case 16:return this.result_0;case 4:this.state_0=6;continue;case 6:this.state_0=9;continue;case 7:var o=this.result_0,r=contentLength(this.local$response);if(null==this.local$response.headers.get_61zpoe$(http.HttpHeaders.ContentEncoding)&&null!=r&&r.toNumber()>0&&o.length!==r.toInt()){var a="Expected "+toString(r)+", actual "+o.length;throw IllegalStateException_init(a.toString())}if(this.state_0=8,this.result_0=this.local$$receiver.proceedWith_trkh7z$(new HttpResponseContainer(this.local$info,o),this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 9:this.state_0=12;continue;case 10:if(this.state_0=11,this.result_0=this.local$$receiver.proceedWith_trkh7z$(new HttpResponseContainer(this.local$info,this.result_0),this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 12:this.state_0=15;continue;case 13:if(this.state_0=14,this.result_0=this.local$$receiver.proceedWith_trkh7z$(new HttpResponseContainer(this.local$info,toInt(this.result_0.readText_vux9f0$())),this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 15:this.state_0=17;continue;case 17:return Unit;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Coroutine$validateResponse_0.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$validateResponse_0.prototype=Object.create(CoroutineImpl.prototype),Coroutine$validateResponse_0.prototype.constructor=Coroutine$validateResponse_0,Coroutine$validateResponse_0.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.local$tmp$=this.$this.responseValidators_0.iterator(),this.state_0=2;continue;case 1:throw this.exception_0;case 2:if(!this.local$tmp$.hasNext()){this.state_0=4;continue}var t=this.local$tmp$.next();if(this.state_0=3,this.result_0=t(this.local$response,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 3:this.state_0=2;continue;case 4:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},HttpCallValidator.prototype.validateResponse_0=function(t,e,n){var i=new Coroutine$validateResponse_0(this,t,e);return n?i:i.doResume(null)},Coroutine$processException_0.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$processException_0.prototype=Object.create(CoroutineImpl.prototype),Coroutine$processException_0.prototype.constructor=Coroutine$processException_0,Coroutine$processException_0.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.local$tmp$=this.$this.callExceptionHandlers_0.iterator(),this.state_0=2;continue;case 1:throw this.exception_0;case 2:if(!this.local$tmp$.hasNext()){this.state_0=7;continue}var t=this.local$tmp$.next();if(Kotlin.isType(t,ExceptionHandlerWrapper)){if(this.state_0=5,this.result_0=t.handler(this.local$cause,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue}if(Kotlin.isType(t,RequestExceptionHandlerWrapper)){if(this.state_0=3,this.result_0=t.handler(this.local$cause,this.local$request,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue}this.state_0=4;continue;case 3:this.state_0=4;continue;case 4:case 5:this.state_0=6;continue;case 6:this.state_0=2;continue;case 7:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},HttpCallValidator.prototype.processException_0=function(t,e,n,i){var o=new Coroutine$processException_0(this,t,e,n);return i?o:o.doResume(null)},HttpCallValidator$Config.prototype.handleResponseException_9rdja$=function(t){var e=this.responseExceptionHandlers_8be2vx$,n=new ExceptionHandlerWrapper(t);e.add_11rb$(n)},HttpCallValidator$Config.prototype.handleResponseExceptionWithRequest_yc597p$=function(t){var e=this.responseExceptionHandlers_8be2vx$,n=new RequestExceptionHandlerWrapper(t);e.add_11rb$(n)},HttpCallValidator$Config.prototype.validateResponse_d4bkoy$=function(t){this.responseValidators_8be2vx$.add_11rb$(t)},HttpCallValidator$Config.$metadata$={kind:Kind_CLASS,simpleName:"Config",interfaces:[]},Object.defineProperty(HttpCallValidator$Companion.prototype,"key",{configurable:!0,get:function(){return this.key_vbv7yu$_0}}),HttpCallValidator$Companion.prototype.prepare_oh3mgy$$default=function(t){var e=new HttpCallValidator$Config;t(e);var n=e;return new HttpCallValidator(reversed(n.responseValidators_8be2vx$),reversed(n.responseExceptionHandlers_8be2vx$),n.expectSuccess)},Coroutine$HttpCallValidator$Companion$install$lambda.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$HttpCallValidator$Companion$install$lambda.prototype=Object.create(CoroutineImpl.prototype),Coroutine$HttpCallValidator$Companion$install$lambda.prototype.constructor=Coroutine$HttpCallValidator$Companion$install$lambda,Coroutine$HttpCallValidator$Companion$install$lambda.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.exceptionState_0=2,this.local$$receiver.context.attributes.computeIfAbsent_u4q9l2$(ExpectSuccessAttributeKey,HttpCallValidator$Companion$install$lambda$lambda(this.local$closure$plugin)),this.state_0=1,this.result_0=this.local$$receiver.proceedWith_trkh7z$(this.local$it,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 1:return this.result_0;case 2:this.exceptionState_0=6;var t=this.exception_0;if(Kotlin.isType(t,Throwable)){if(this.local$unwrappedCause=unwrapCancellationException(t),this.state_0=3,this.result_0=this.local$closure$plugin.processException_0(this.local$unwrappedCause,HttpRequest(this.local$$receiver.context),this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue}throw t;case 3:throw this.local$unwrappedCause;case 4:this.state_0=5;continue;case 5:return;case 6:throw this.exception_0;default:throw this.state_0=6,new Error("State Machine Unreachable execution")}}catch(t){if(6===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Coroutine$HttpCallValidator$Companion$install$lambda_0.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$HttpCallValidator$Companion$install$lambda_0.prototype=Object.create(CoroutineImpl.prototype),Coroutine$HttpCallValidator$Companion$install$lambda_0.prototype.constructor=Coroutine$HttpCallValidator$Companion$install$lambda_0,Coroutine$HttpCallValidator$Companion$install$lambda_0.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.exceptionState_0=2,this.state_0=1,this.result_0=this.local$$receiver.proceedWith_trkh7z$(this.local$container,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 1:return this.result_0;case 2:this.exceptionState_0=6;var t=this.exception_0;if(Kotlin.isType(t,Throwable)){if(this.local$unwrappedCause=unwrapCancellationException(t),this.state_0=3,this.result_0=this.local$closure$plugin.processException_0(this.local$unwrappedCause,this.local$$receiver.context.request,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue}throw t;case 3:throw this.local$unwrappedCause;case 4:this.state_0=5;continue;case 5:return;case 6:throw this.exception_0;default:throw this.state_0=6,new Error("State Machine Unreachable execution")}}catch(t){if(6===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Coroutine$HttpCallValidator$Companion$install$lambda_1.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$HttpCallValidator$Companion$install$lambda_1.prototype=Object.create(CoroutineImpl.prototype),Coroutine$HttpCallValidator$Companion$install$lambda_1.prototype.constructor=Coroutine$HttpCallValidator$Companion$install$lambda_1,Coroutine$HttpCallValidator$Companion$install$lambda_1.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.local$$receiver.execute_s9rlw$(this.local$request,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 1:throw this.exception_0;case 2:if(this.local$call=this.result_0,this.state_0=3,this.result_0=this.local$closure$plugin.validateResponse_0(this.local$call.response,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 3:return this.local$call;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},HttpCallValidator$Companion.prototype.install_wojrb5$=function(t,e){e.requestPipeline.intercept_h71y74$(HttpRequestPipeline$Phases_getInstance().Before,HttpCallValidator$Companion$install$lambda(t));var n=new PipelinePhase("BeforeReceive");e.responsePipeline.insertPhaseBefore_b9zzbm$(HttpResponsePipeline$Phases_getInstance().Receive,n),e.responsePipeline.intercept_h71y74$(n,HttpCallValidator$Companion$install$lambda_0(t)),plugin(e,HttpSend$Plugin_getInstance()).intercept_aa8w70$(HttpCallValidator$Companion$install$lambda_1(t))},HttpCallValidator$Companion.$metadata$={kind:Kind_OBJECT,simpleName:"Companion",interfaces:[HttpClientPlugin]};var HttpCallValidator$Companion_instance=null,ExpectSuccessAttributeKey,PLUGIN_INSTALLED_LIST;function HttpCallValidator$Companion_getInstance(){return null===HttpCallValidator$Companion_instance&&new HttpCallValidator$Companion,HttpCallValidator$Companion_instance}function HttpRequest$ObjectLiteral(t){this.closure$builder=t,this.method_wo5b7y$_0=t.method,this.url_okq4sy$_0=t.url.build(),this.attributes_qewzi4$_0=t.attributes,this.headers_th47hh$_0=t.headers.build()}function HttpRequest(t){return new HttpRequest$ObjectLiteral(t)}function HttpResponseValidator(t,e){t.install_dq2y33$(HttpCallValidator$Companion_getInstance(),e)}function HandlerWrapper(){}function ExceptionHandlerWrapper(t){this.handler=t}function RequestExceptionHandlerWrapper(t){this.handler=t}function HttpClientPlugin(){}function HttpClientPlugin$prepare$lambda(t){return Unit}function pluginOrNull(t,e){var n;return null!=(n=t.attributes.getOrNull_yzaw86$(PLUGIN_INSTALLED_LIST))?n.getOrNull_yzaw86$(e.key):null}function plugin(t,e){var n;if(null==(n=pluginOrNull(t,e)))throw IllegalStateException_init("Plugin "+e+" is not installed. Consider using `install("+e.key+")` in client config first.");return n}HttpCallValidator.$metadata$={kind:Kind_CLASS,simpleName:"HttpCallValidator",interfaces:[]},Object.defineProperty(HttpRequest$ObjectLiteral.prototype,"call",{configurable:!0,get:function(){throw IllegalStateException_init("Call is not initialized".toString())}}),Object.defineProperty(HttpRequest$ObjectLiteral.prototype,"method",{configurable:!0,get:function(){return this.method_wo5b7y$_0}}),Object.defineProperty(HttpRequest$ObjectLiteral.prototype,"url",{configurable:!0,get:function(){return this.url_okq4sy$_0}}),Object.defineProperty(HttpRequest$ObjectLiteral.prototype,"attributes",{configurable:!0,get:function(){return this.attributes_qewzi4$_0}}),Object.defineProperty(HttpRequest$ObjectLiteral.prototype,"headers",{configurable:!0,get:function(){return this.headers_th47hh$_0}}),Object.defineProperty(HttpRequest$ObjectLiteral.prototype,"content",{configurable:!0,get:function(){var t,e;if(null==(e=Kotlin.isType(t=this.closure$builder.body,OutgoingContent)?t:null))throw IllegalStateException_init(("Content was not transformed to OutgoingContent yet. Current body is "+this.closure$builder.body.toString()).toString());return e}}),HttpRequest$ObjectLiteral.$metadata$={kind:Kind_CLASS,interfaces:[HttpRequest_0]},HandlerWrapper.$metadata$={kind:Kind_INTERFACE,simpleName:"HandlerWrapper",interfaces:[]},ExceptionHandlerWrapper.$metadata$={kind:Kind_CLASS,simpleName:"ExceptionHandlerWrapper",interfaces:[HandlerWrapper]},RequestExceptionHandlerWrapper.$metadata$={kind:Kind_CLASS,simpleName:"RequestExceptionHandlerWrapper",interfaces:[HandlerWrapper]},HttpClientPlugin.prototype.prepare_oh3mgy$=function(t,e){return void 0===t&&(t=HttpClientPlugin$prepare$lambda),e?e(t):this.prepare_oh3mgy$$default(t)},HttpClientPlugin.$metadata$={kind:Kind_INTERFACE,simpleName:"HttpClientPlugin",interfaces:[]};var compareByDescending$lambda=wrapFunction((function(){var t=Kotlin.kotlin.comparisons.compareValues_s00gnj$;return function(e){return function(n,i){var o=e;return t(o(i),o(n))}}})),compareBy$lambda=wrapFunction((function(){var t=Kotlin.kotlin.comparisons.compareValues_s00gnj$;return function(e){return function(n,i){var o=e;return t(o(n),o(i))}}}));function HttpPlainText(t,e,n,i){var o,r,a;HttpPlainText$Plugin_getInstance(),this.responseCharsetFallback_0=i,this.requestCharset_0=null,this.acceptCharsetHeader_0=null;var s,l=sortedWith(toList(e),new Comparator(compareByDescending$lambda(HttpPlainText_init$lambda))),u=ArrayList_init();for(s=t.iterator();s.hasNext();){var c=s.next();e.containsKey_11rb$(c)||u.add_11rb$(c)}var p,h,_=sortedWith(u,new Comparator(compareBy$lambda(HttpPlainText_init$lambda_0))),d=StringBuilder_init();for(p=_.iterator();p.hasNext();){var f=p.next();d.length>0&&d.append_pdl1vj$(","),d.append_pdl1vj$(get_name(f))}for(h=l.iterator();h.hasNext();){var m=h.next(),$=m.component1(),y=m.component2();if(d.length>0&&d.append_pdl1vj$(","),!contains(rangeTo(0,1),y))throw IllegalStateException_init("Check failed.".toString());var g=roundToInt(100*y)/100;d.append_pdl1vj$(get_name($)+";q="+g)}0===d.length&&d.append_pdl1vj$(get_name(this.responseCharsetFallback_0)),this.acceptCharsetHeader_0=d.toString(),this.requestCharset_0=null!=(a=null!=(r=null!=n?n:firstOrNull(_))?r:null!=(o=firstOrNull(l))?o.first:null)?a:charsets.Charsets.UTF_8}function HttpPlainText$Config(){this.charsets_8be2vx$=LinkedHashSet_init(),this.charsetQuality_8be2vx$=LinkedHashMap_init(),this.sendCharset=null,this.responseCharsetFallback=charsets.Charsets.UTF_8}function HttpPlainText$Plugin(){HttpPlainText$Plugin_instance=this,this.key_y9ebr4$_0=new AttributeKey("HttpPlainText")}function Coroutine$HttpPlainText$Plugin$install$lambda(t,e,n,i,o){CoroutineImpl.call(this,o),this.$controller=i,this.exceptionState_0=1,this.local$closure$plugin=t,this.local$contentType=void 0,this.local$$receiver=e,this.local$content=n}function HttpPlainText$Plugin$install$lambda(t){return function(e,n,i,o){var r=new Coroutine$HttpPlainText$Plugin$install$lambda(t,e,n,this,i);return o?r:r.doResume(null)}}function Coroutine$HttpPlainText$Plugin$install$lambda_0(t,e,n,i,o){CoroutineImpl.call(this,o),this.$controller=i,this.exceptionState_0=1,this.local$closure$plugin=t,this.local$info=void 0,this.local$body=void 0,this.local$$receiver=e,this.local$f=n}function HttpPlainText$Plugin$install$lambda_0(t){return function(e,n,i,o){var r=new Coroutine$HttpPlainText$Plugin$install$lambda_0(t,e,n,this,i);return o?r:r.doResume(null)}}HttpPlainText$Config.prototype.register_qv516$=function(t,e){if(void 0===e&&(e=null),null!=e&&!contains(rangeTo(0,1),e))throw IllegalStateException_init("Check failed.".toString());this.charsets_8be2vx$.add_11rb$(t),null==e?this.charsetQuality_8be2vx$.remove_11rb$(t):this.charsetQuality_8be2vx$.put_xwzc9p$(t,e)},HttpPlainText$Config.$metadata$={kind:Kind_CLASS,simpleName:"Config",interfaces:[]},Object.defineProperty(HttpPlainText$Plugin.prototype,"key",{configurable:!0,get:function(){return this.key_y9ebr4$_0}}),HttpPlainText$Plugin.prototype.prepare_oh3mgy$$default=function(t){var e=new HttpPlainText$Config;t(e);var n=e;return new HttpPlainText(n.charsets_8be2vx$,n.charsetQuality_8be2vx$,n.sendCharset,n.responseCharsetFallback)},Coroutine$HttpPlainText$Plugin$install$lambda.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$HttpPlainText$Plugin$install$lambda.prototype=Object.create(CoroutineImpl.prototype),Coroutine$HttpPlainText$Plugin$install$lambda.prototype.constructor=Coroutine$HttpPlainText$Plugin$install$lambda,Coroutine$HttpPlainText$Plugin$install$lambda.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.local$closure$plugin.addCharsetHeaders_jc2hdt$(this.local$$receiver.context),"string"!=typeof this.local$content)return;this.state_0=2;continue;case 1:throw this.exception_0;case 2:if(this.local$contentType=contentType(this.local$$receiver.context),null==this.local$contentType||equals(this.local$contentType.contentType,ContentType.Text.Plain.contentType)){this.state_0=3;continue}return;case 3:if(this.state_0=4,this.result_0=this.local$$receiver.proceedWith_trkh7z$(this.local$closure$plugin.wrapContent_0(this.local$content,this.local$contentType),this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 4:return this.result_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Coroutine$HttpPlainText$Plugin$install$lambda_0.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$HttpPlainText$Plugin$install$lambda_0.prototype=Object.create(CoroutineImpl.prototype),Coroutine$HttpPlainText$Plugin$install$lambda_0.prototype.constructor=Coroutine$HttpPlainText$Plugin$install$lambda_0,Coroutine$HttpPlainText$Plugin$install$lambda_0.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;if(this.local$info=this.local$f.component1(),this.local$body=this.local$f.component2(),null!=(t=this.local$info.type)&&t.equals(PrimitiveClasses$stringClass)&&Kotlin.isType(this.local$body,ByteReadChannel)){this.state_0=2;continue}return;case 1:throw this.exception_0;case 2:if(this.state_0=3,this.result_0=this.local$body.readRemaining_s8cxhz$(void 0,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 3:var e=this.result_0,n=this.local$closure$plugin.read_r18uy3$(this.local$$receiver.context,e);if(this.state_0=4,this.result_0=this.local$$receiver.proceedWith_trkh7z$(new HttpResponseContainer(this.local$info,n),this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 4:return this.result_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},HttpPlainText$Plugin.prototype.install_wojrb5$=function(t,e){e.requestPipeline.intercept_h71y74$(HttpRequestPipeline$Phases_getInstance().Render,HttpPlainText$Plugin$install$lambda(t)),e.responsePipeline.intercept_h71y74$(HttpResponsePipeline$Phases_getInstance().Transform,HttpPlainText$Plugin$install$lambda_0(t))},HttpPlainText$Plugin.$metadata$={kind:Kind_OBJECT,simpleName:"Plugin",interfaces:[HttpClientPlugin]};var HttpPlainText$Plugin_instance=null,ALLOWED_FOR_REDIRECT;function HttpPlainText$Plugin_getInstance(){return null===HttpPlainText$Plugin_instance&&new HttpPlainText$Plugin,HttpPlainText$Plugin_instance}function HttpPlainText_init$lambda(t){return t.second}function HttpPlainText_init$lambda_0(t){return get_name(t)}function HttpRedirect(t,e){HttpRedirect$Plugin_getInstance(),this.checkHttpMethod_0=t,this.allowHttpsDowngrade_0=e}function HttpRedirect$Config(){this.checkHttpMethod=!0,this.allowHttpsDowngrade=!1}function HttpRedirect$Plugin(){HttpRedirect$Plugin_instance=this,this.key_fcr0bn$_0=new AttributeKey("HttpRedirect"),this.HttpResponseRedirect=new EventDefinition}function Coroutine$HttpRedirect$Plugin$install$lambda(t,e,n,i,o,r,a){CoroutineImpl.call(this,a),this.$controller=r,this.exceptionState_0=1,this.local$closure$plugin=t,this.local$closure$scope=e,this.local$this$HttpRedirect$=n,this.local$origin=void 0,this.local$$receiver=i,this.local$context=o}function HttpRedirect$Plugin$install$lambda(t,e,n){return function(i,o,r,a){var s=new Coroutine$HttpRedirect$Plugin$install$lambda(t,e,n,i,o,this,r);return a?s:s.doResume(null)}}function Coroutine$handleCall_0(t,e,n,i,o,r,a){CoroutineImpl.call(this,a),this.exceptionState_0=1,this.$this=t,this.local$call=void 0,this.local$requestBuilder=void 0,this.local$originProtocol=void 0,this.local$originAuthority=void 0,this.local$$receiver=void 0,this.local$$receiver_0=e,this.local$context=n,this.local$origin=i,this.local$allowHttpsDowngrade=o,this.local$client=r}HttpPlainText.prototype.wrapContent_0=function(t,e){var n,i=null!=e?e:ContentType.Text.Plain,o=null!=(n=null!=e?charset(e):null)?n:this.requestCharset_0;return new TextContent(t,withCharset(i,o))},HttpPlainText.prototype.read_r18uy3$=function(t,e){var n,i=null!=(n=charset_0(t.response))?n:this.responseCharsetFallback_0;return readText(e,i)},HttpPlainText.prototype.addCharsetHeaders_jc2hdt$=function(t){null==t.headers.get_61zpoe$(http.HttpHeaders.AcceptCharset)&&t.headers.set_puj7f4$(http.HttpHeaders.AcceptCharset,this.acceptCharsetHeader_0)},HttpPlainText.$metadata$={kind:Kind_CLASS,simpleName:"HttpPlainText",interfaces:[]},HttpRedirect$Config.$metadata$={kind:Kind_CLASS,simpleName:"Config",interfaces:[]},Object.defineProperty(HttpRedirect$Plugin.prototype,"key",{configurable:!0,get:function(){return this.key_fcr0bn$_0}}),HttpRedirect$Plugin.prototype.prepare_oh3mgy$$default=function(t){var e=new HttpRedirect$Config;t(e);var n=e;return new HttpRedirect(n.checkHttpMethod,n.allowHttpsDowngrade)},Coroutine$HttpRedirect$Plugin$install$lambda.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$HttpRedirect$Plugin$install$lambda.prototype=Object.create(CoroutineImpl.prototype),Coroutine$HttpRedirect$Plugin$install$lambda.prototype.constructor=Coroutine$HttpRedirect$Plugin$install$lambda,Coroutine$HttpRedirect$Plugin$install$lambda.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.local$$receiver.execute_s9rlw$(this.local$context,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 1:throw this.exception_0;case 2:if(this.local$origin=this.result_0,this.local$closure$plugin.checkHttpMethod_0&&!ALLOWED_FOR_REDIRECT.contains_11rb$(this.local$origin.request.method))return this.local$origin;this.state_0=3;continue;case 3:if(this.state_0=4,this.result_0=this.local$this$HttpRedirect$.handleCall_0(this.local$$receiver,this.local$context,this.local$origin,this.local$closure$plugin.allowHttpsDowngrade_0,this.local$closure$scope,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 4:return this.result_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},HttpRedirect$Plugin.prototype.install_wojrb5$=function(t,e){plugin(e,HttpSend$Plugin_getInstance()).intercept_aa8w70$(HttpRedirect$Plugin$install$lambda(t,e,this))},Coroutine$handleCall_0.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$handleCall_0.prototype=Object.create(CoroutineImpl.prototype),Coroutine$handleCall_0.prototype.constructor=Coroutine$handleCall_0,Coroutine$handleCall_0.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(isRedirect(this.local$origin.response.status)){this.state_0=2;continue}return this.local$origin;case 1:throw this.exception_0;case 2:this.local$call={v:this.local$origin},this.local$requestBuilder={v:this.local$context},this.local$originProtocol=this.local$origin.request.url.protocol,this.local$originAuthority=get_authority(this.local$origin.request.url),this.state_0=3;continue;case 3:this.local$client.monitor.raise_asioqi$(this.$this.HttpResponseRedirect,this.local$call.v.response);var t=this.local$call.v.response.headers.get_61zpoe$(http.HttpHeaders.Location);if(this.local$$receiver=new HttpRequestBuilder,this.local$$receiver.takeFromWithExecutionContext_s9rlw$(this.local$requestBuilder.v),this.local$$receiver.url.parameters.clear(),null!=t&&takeFrom_0(this.local$$receiver.url,t),this.local$allowHttpsDowngrade||!isSecure(this.local$originProtocol)||isSecure(this.local$$receiver.url.protocol)){this.state_0=4;continue}return this.local$call.v;case 4:if(equals(this.local$originAuthority,get_authority_0(this.local$$receiver.url))||this.local$$receiver.headers.remove_61zpoe$(http.HttpHeaders.Authorization),this.local$requestBuilder.v=this.local$$receiver,this.state_0=5,this.result_0=this.local$$receiver_0.execute_s9rlw$(this.local$requestBuilder.v,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 5:if(this.local$call.v=this.result_0,isRedirect(this.local$call.v.response.status)){this.state_0=6;continue}return this.local$call.v;case 6:this.state_0=3;continue;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},HttpRedirect$Plugin.prototype.handleCall_0=function(t,e,n,i,o,r,a){var s=new Coroutine$handleCall_0(this,t,e,n,i,o,r);return a?s:s.doResume(null)},HttpRedirect$Plugin.$metadata$={kind:Kind_OBJECT,simpleName:"Plugin",interfaces:[HttpClientPlugin]};var HttpRedirect$Plugin_instance=null;function HttpRedirect$Plugin_getInstance(){return null===HttpRedirect$Plugin_instance&&new HttpRedirect$Plugin,HttpRedirect$Plugin_instance}function isRedirect(t){var e;return(e=t.value)===HttpStatusCode.Companion.MovedPermanently.value||e===HttpStatusCode.Companion.Found.value||e===HttpStatusCode.Companion.TemporaryRedirect.value||e===HttpStatusCode.Companion.PermanentRedirect.value||e===HttpStatusCode.Companion.SeeOther.value}function HttpRequestLifecycle(){HttpRequestLifecycle$Plugin_getInstance()}function HttpRequestLifecycle$Plugin(){HttpRequestLifecycle$Plugin_instance=this,this.key_hfnmn2$_0=new AttributeKey("RequestLifecycle")}function Coroutine$HttpRequestLifecycle$Plugin$install$lambda(t,e,n,i,o){CoroutineImpl.call(this,o),this.$controller=i,this.exceptionState_0=6,this.local$closure$scope=t,this.local$executionContext=void 0,this.local$$receiver=e}function HttpRequestLifecycle$Plugin$install$lambda(t){return function(e,n,i,o){var r=new Coroutine$HttpRequestLifecycle$Plugin$install$lambda(t,e,n,this,i);return o?r:r.doResume(null)}}HttpRedirect.$metadata$={kind:Kind_CLASS,simpleName:"HttpRedirect",interfaces:[]},Object.defineProperty(HttpRequestLifecycle$Plugin.prototype,"key",{configurable:!0,get:function(){return this.key_hfnmn2$_0}}),HttpRequestLifecycle$Plugin.prototype.prepare_oh3mgy$$default=function(t){return new HttpRequestLifecycle},Coroutine$HttpRequestLifecycle$Plugin$install$lambda.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$HttpRequestLifecycle$Plugin$install$lambda.prototype=Object.create(CoroutineImpl.prototype),Coroutine$HttpRequestLifecycle$Plugin$install$lambda.prototype.constructor=Coroutine$HttpRequestLifecycle$Plugin$install$lambda,Coroutine$HttpRequestLifecycle$Plugin$install$lambda.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.local$executionContext=Job_0(this.local$$receiver.context.executionContext),attachToClientEngineJob(this.local$executionContext,ensureNotNull(this.local$closure$scope.coroutineContext.get_j3r2sn$(Job.Key))),this.exceptionState_0=3,this.local$$receiver.context.executionContext=this.local$executionContext,this.state_0=1,this.result_0=this.local$$receiver.proceed(this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 1:this.exceptionState_0=6,this.finallyPath_0=[2],this.state_0=4,this.$returnValue=this.result_0;continue;case 2:return this.$returnValue;case 3:this.finallyPath_0=[6],this.exceptionState_0=4;var t=this.exception_0;throw Kotlin.isType(t,Throwable)?(this.local$executionContext.completeExceptionally_tcv7n7$(t),t):t;case 4:this.exceptionState_0=6,this.local$executionContext.complete(),this.state_0=this.finallyPath_0.shift();continue;case 5:return;case 6:throw this.exception_0;default:throw this.state_0=6,new Error("State Machine Unreachable execution")}}catch(t){if(6===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},HttpRequestLifecycle$Plugin.prototype.install_wojrb5$=function(t,e){e.requestPipeline.intercept_h71y74$(HttpRequestPipeline$Phases_getInstance().Before,HttpRequestLifecycle$Plugin$install$lambda(e))},HttpRequestLifecycle$Plugin.$metadata$={kind:Kind_OBJECT,simpleName:"Plugin",interfaces:[HttpClientPlugin]};var HttpRequestLifecycle$Plugin_instance=null;function HttpRequestLifecycle$Plugin_getInstance(){return null===HttpRequestLifecycle$Plugin_instance&&new HttpRequestLifecycle$Plugin,HttpRequestLifecycle$Plugin_instance}function attachToClientEngineJob$lambda(t){return function(e){return null!=e?cancel_2(t,"Engine failed",e):t.complete(),Unit}}function attachToClientEngineJob$lambda_0(t){return function(e){return t.dispose(),Unit}}function attachToClientEngineJob(t,e){var n=e.invokeOnCompletion_f05bi3$(attachToClientEngineJob$lambda(t));t.invokeOnCompletion_f05bi3$(attachToClientEngineJob$lambda_0(n))}function HttpRequestRetry$Plugin(){HttpRequestRetry$Plugin_instance=this,this.key_y2bw0w$_0=new AttributeKey("RetryFeature"),this.HttpRequestRetryEvent=new EventDefinition}HttpRequestLifecycle.$metadata$={kind:Kind_CLASS,simpleName:"HttpRequestLifecycle",interfaces:[]};var HttpRequestRetry$Plugin_instance=null,MaxRetriesPerRequestAttributeKey,ShouldRetryPerRequestAttributeKey,ShouldRetryOnExceptionPerRequestAttributeKey,ModifyRequestPerRequestAttributeKey,RetryDelayPerRequestAttributeKey;function Sender(){}function HttpSend(t){HttpSend$Plugin_getInstance(),void 0===t&&(t=20),this.maxSendCount_0=t,this.interceptors_0=ArrayList_init()}function HttpSend$Config(){this.maxSendCount=20}function HttpSend$Plugin(){HttpSend$Plugin_instance=this,this.key_uv5xfz$_0=new AttributeKey("HttpSend")}function Coroutine$HttpSend$Plugin$install$lambda(t,e,n,i,o,r){CoroutineImpl.call(this,r),this.$controller=o,this.exceptionState_0=1,this.local$closure$plugin=t,this.local$closure$scope=e,this.local$$receiver=n,this.local$content=i}function HttpSend$Plugin$install$lambda(t,e){return function(n,i,o,r){var a=new Coroutine$HttpSend$Plugin$install$lambda(t,e,n,i,this,o);return r?a:a.doResume(null)}}Sender.$metadata$={kind:Kind_INTERFACE,simpleName:"Sender",interfaces:[]},HttpSend$Config.$metadata$={kind:Kind_CLASS,simpleName:"Config",interfaces:[]},HttpSend.prototype.intercept_w12cfo$=function(t){throw IllegalStateException_init("This interceptors do not allow to intercept original call. Please use another overload and call `this.execute(request)` manually".toString())},HttpSend.prototype.intercept_aa8w70$=function(t){this.interceptors_0.add_11rb$(t)},Object.defineProperty(HttpSend$Plugin.prototype,"key",{configurable:!0,get:function(){return this.key_uv5xfz$_0}}),HttpSend$Plugin.prototype.prepare_oh3mgy$$default=function(t){var e=new HttpSend$Config;return t(e),new HttpSend(e.maxSendCount)},Coroutine$HttpSend$Plugin$install$lambda.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$HttpSend$Plugin$install$lambda.prototype=Object.create(CoroutineImpl.prototype),Coroutine$HttpSend$Plugin$install$lambda.prototype.constructor=Coroutine$HttpSend$Plugin$install$lambda,Coroutine$HttpSend$Plugin$install$lambda.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(!Kotlin.isType(this.local$content,OutgoingContent)){var t=trimMargin("\n|Fail to prepare request body for sending. \n|The body type is: "+Kotlin.getKClassFromExpression(this.local$content)+", with Content-Type: "+toString(contentType(this.local$$receiver.context))+".\n|\n|If you expect serialized body, please check that you have installed the corresponding plugin(like `ContentNegotiation`) and set `Content-Type` header.");throw IllegalStateException_init(t.toString())}var e=this.local$$receiver.context;if(null==this.local$content){e.body=content.NullBody;var n,i=reflect.JsType,o=getKClass(OutgoingContent);t:do{try{n=createKType(getKClass(OutgoingContent),[],!1)}catch(t){if(Kotlin.isType(t,Throwable)){n=null;break t}throw t}}while(0);e.bodyType=typeInfoImpl(i,o,n)}else if(Kotlin.isType(this.local$content,OutgoingContent))e.body=this.local$content,e.bodyType=null;else{e.body=this.local$content;var r,a=reflect.JsType,s=getKClass(OutgoingContent);t:do{try{r=createKType(getKClass(OutgoingContent),[],!1)}catch(t){if(Kotlin.isType(t,Throwable)){r=null;break t}throw t}}while(0);e.bodyType=typeInfoImpl(a,s,r)}var l,u={v:new HttpSend$DefaultSender(this.local$closure$plugin.maxSendCount_0,this.local$closure$scope)};for(l=downTo(get_lastIndex(this.local$closure$plugin.interceptors_0),0).iterator();l.hasNext();){var c=l.next(),p=this.local$closure$plugin.interceptors_0.get_za3lpa$(c);u.v=new HttpSend$InterceptedSender(p,u.v)}if(this.state_0=2,this.result_0=u.v.execute_s9rlw$(this.local$$receiver.context,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 1:throw this.exception_0;case 2:var h=this.result_0;if(this.state_0=3,this.result_0=this.local$$receiver.proceedWith_trkh7z$(h,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 3:return this.result_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},HttpSend$Plugin.prototype.install_wojrb5$=function(t,e){e.requestPipeline.intercept_h71y74$(HttpRequestPipeline$Phases_getInstance().Send,HttpSend$Plugin$install$lambda(t,e))},HttpSend$Plugin.$metadata$={kind:Kind_OBJECT,simpleName:"Plugin",interfaces:[HttpClientPlugin]};var HttpSend$Plugin_instance=null;function HttpSend$Plugin_getInstance(){return null===HttpSend$Plugin_instance&&new HttpSend$Plugin,HttpSend$Plugin_instance}function HttpSend$InterceptedSender(t,e){this.interceptor_0=t,this.nextSender_0=e}function HttpSend$DefaultSender(t,e){this.maxSendCount_0=t,this.client_0=e,this.sentCount_0=0,this.currentCall_0=null}function Coroutine$execute_s9rlw$(t,e,n){CoroutineImpl.call(this,n),this.exceptionState_0=1,this.$this=t,this.local$requestBuilder=e}function SendCountExceedException(t){IllegalStateException_init(t,this),this.name="SendCountExceedException"}function HttpTimeout(t,e,n){HttpTimeout$Plugin_getInstance(),this.requestTimeoutMillis_0=t,this.connectTimeoutMillis_0=e,this.socketTimeoutMillis_0=n}function HttpTimeout$HttpTimeoutCapabilityConfiguration(){HttpTimeout$HttpTimeoutCapabilityConfiguration$Companion_getInstance(),this._requestTimeoutMillis_0=L0,this._connectTimeoutMillis_0=L0,this._socketTimeoutMillis_0=L0}function HttpTimeout$HttpTimeoutCapabilityConfiguration$Companion(){HttpTimeout$HttpTimeoutCapabilityConfiguration$Companion_instance=this,this.key=new AttributeKey("TimeoutConfiguration")}HttpSend$InterceptedSender.prototype.execute_s9rlw$=function(t,e){return this.interceptor_0(this.nextSender_0,t,e)},HttpSend$InterceptedSender.$metadata$={kind:Kind_CLASS,simpleName:"InterceptedSender",interfaces:[Sender]},Coroutine$execute_s9rlw$.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$execute_s9rlw$.prototype=Object.create(CoroutineImpl.prototype),Coroutine$execute_s9rlw$.prototype.constructor=Coroutine$execute_s9rlw$,Coroutine$execute_s9rlw$.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t,e,n;if(null!=(t=this.$this.currentCall_0)&&cancel(t),this.$this.sentCount_0>=this.$this.maxSendCount_0)throw new SendCountExceedException("Max send count "+this.$this.maxSendCount_0+" exceeded. Consider increasing the property maxSendCount if more is required.");if(this.$this.sentCount_0=this.$this.sentCount_0+1|0,this.state_0=2,this.result_0=this.$this.client_0.sendPipeline.execute_8pmvt0$(this.local$requestBuilder,this.local$requestBuilder.body,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 1:throw this.exception_0;case 2:var i=this.result_0;if(null==(n=Kotlin.isType(e=i,HttpClientCall)?e:null))throw IllegalStateException_init(("Failed to execute send pipeline. Expected [HttpClientCall], but received "+i.toString()).toString());var o=n;return this.$this.currentCall_0=o,o;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},HttpSend$DefaultSender.prototype.execute_s9rlw$=function(t,e,n){var i=new Coroutine$execute_s9rlw$(this,t,e);return n?i:i.doResume(null)},HttpSend$DefaultSender.$metadata$={kind:Kind_CLASS,simpleName:"DefaultSender",interfaces:[Sender]},HttpSend.$metadata$={kind:Kind_CLASS,simpleName:"HttpSend",interfaces:[]},SendCountExceedException.$metadata$={kind:Kind_CLASS,simpleName:"SendCountExceedException",interfaces:[IllegalStateException]},Object.defineProperty(HttpTimeout$HttpTimeoutCapabilityConfiguration.prototype,"requestTimeoutMillis",{configurable:!0,get:function(){return this._requestTimeoutMillis_0},set:function(t){this._requestTimeoutMillis_0=this.checkTimeoutValue_0(t)}}),Object.defineProperty(HttpTimeout$HttpTimeoutCapabilityConfiguration.prototype,"connectTimeoutMillis",{configurable:!0,get:function(){return this._connectTimeoutMillis_0},set:function(t){this._connectTimeoutMillis_0=this.checkTimeoutValue_0(t)}}),Object.defineProperty(HttpTimeout$HttpTimeoutCapabilityConfiguration.prototype,"socketTimeoutMillis",{configurable:!0,get:function(){return this._socketTimeoutMillis_0},set:function(t){this._socketTimeoutMillis_0=this.checkTimeoutValue_0(t)}}),HttpTimeout$HttpTimeoutCapabilityConfiguration.prototype.build_8be2vx$=function(){return new HttpTimeout(this.requestTimeoutMillis,this.connectTimeoutMillis,this.socketTimeoutMillis)},HttpTimeout$HttpTimeoutCapabilityConfiguration.prototype.checkTimeoutValue_0=function(t){if(!(null==t||t.toNumber()>0))throw IllegalArgumentException_init("Only positive timeout values are allowed, for infinite timeout use HttpTimeout.INFINITE_TIMEOUT_MS".toString());return t},HttpTimeout$HttpTimeoutCapabilityConfiguration.prototype.equals=function(t){var e;return!!(this===t||null!=t&&null!=(e=Kotlin.getKClassFromExpression(this))&&e.equals(Kotlin.getKClassFromExpression(t))&&(Kotlin.isType(t,HttpTimeout$HttpTimeoutCapabilityConfiguration)||throwCCE(),equals(this._requestTimeoutMillis_0,t._requestTimeoutMillis_0)&&equals(this._connectTimeoutMillis_0,t._connectTimeoutMillis_0)&&equals(this._socketTimeoutMillis_0,t._socketTimeoutMillis_0)))},HttpTimeout$HttpTimeoutCapabilityConfiguration.prototype.hashCode=function(){var t,e,n,i,o,r,a=null!=(e=null!=(t=this._requestTimeoutMillis_0)?hashCode(t):null)?e:0;return(31*(a=(31*a|0)+(null!=(i=null!=(n=this._connectTimeoutMillis_0)?hashCode(n):null)?i:0)|0)|0)+(null!=(r=null!=(o=this._socketTimeoutMillis_0)?hashCode(o):null)?r:0)|0},HttpTimeout$HttpTimeoutCapabilityConfiguration$Companion.$metadata$={kind:Kind_OBJECT,simpleName:"Companion",interfaces:[]};var HttpTimeout$HttpTimeoutCapabilityConfiguration$Companion_instance=null;function HttpTimeout$HttpTimeoutCapabilityConfiguration$Companion_getInstance(){return null===HttpTimeout$HttpTimeoutCapabilityConfiguration$Companion_instance&&new HttpTimeout$HttpTimeoutCapabilityConfiguration$Companion,HttpTimeout$HttpTimeoutCapabilityConfiguration$Companion_instance}function HttpTimeout$HttpTimeout$HttpTimeoutCapabilityConfiguration_init(t,e,n,i){return void 0===t&&(t=null),void 0===e&&(e=null),void 0===n&&(n=null),i=i||Object.create(HttpTimeout$HttpTimeoutCapabilityConfiguration.prototype),HttpTimeout$HttpTimeoutCapabilityConfiguration.call(i),i.requestTimeoutMillis=t,i.connectTimeoutMillis=e,i.socketTimeoutMillis=n,i}function HttpTimeout$Plugin(){HttpTimeout$Plugin_instance=this,this.key_9he6wm$_0=new AttributeKey("TimeoutPlugin"),this.INFINITE_TIMEOUT_MS=Long$Companion$MAX_VALUE}function Coroutine$HttpTimeout$Plugin$install$lambda$lambda$lambda(t,e,n,i,o,r){CoroutineImpl.call(this,r),this.$controller=o,this.exceptionState_0=1,this.local$closure$requestTimeout=t,this.local$closure$context=e,this.local$closure$executionContext=n}function HttpTimeout$Plugin$install$lambda$lambda$lambda(t,e,n){return function(i,o,r){var a=new Coroutine$HttpTimeout$Plugin$install$lambda$lambda$lambda(t,e,n,i,this,o);return r?a:a.doResume(null)}}function HttpTimeout$Plugin$install$lambda$lambda$lambda_0(t){return function(e){return t.cancel_x5z25k$(),Unit}}function Coroutine$HttpTimeout$Plugin$install$lambda(t,e,n,i,o,r,a){CoroutineImpl.call(this,a),this.$controller=r,this.exceptionState_0=1,this.local$closure$plugin=t,this.local$this$HttpTimeout$=e,this.local$closure$scope=n,this.local$$receiver=i}function HttpTimeout$Plugin$install$lambda(t,e,n){return function(i,o,r,a){var s=new Coroutine$HttpTimeout$Plugin$install$lambda(t,e,n,i,o,this,r);return a?s:s.doResume(null)}}HttpTimeout$HttpTimeoutCapabilityConfiguration.$metadata$={kind:Kind_CLASS,simpleName:"HttpTimeoutCapabilityConfiguration",interfaces:[]},HttpTimeout.prototype.hasNotNullTimeouts_0=function(){return null!=this.requestTimeoutMillis_0||null!=this.connectTimeoutMillis_0||null!=this.socketTimeoutMillis_0},Object.defineProperty(HttpTimeout$Plugin.prototype,"key",{configurable:!0,get:function(){return this.key_9he6wm$_0}}),HttpTimeout$Plugin.prototype.prepare_oh3mgy$$default=function(t){var e=HttpTimeout$HttpTimeout$HttpTimeoutCapabilityConfiguration_init();return t(e),e.build_8be2vx$()},Coroutine$HttpTimeout$Plugin$install$lambda$lambda$lambda.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$HttpTimeout$Plugin$install$lambda$lambda$lambda.prototype=Object.create(CoroutineImpl.prototype),Coroutine$HttpTimeout$Plugin$install$lambda$lambda$lambda.prototype.constructor=Coroutine$HttpTimeout$Plugin$install$lambda$lambda$lambda,Coroutine$HttpTimeout$Plugin$install$lambda$lambda$lambda.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=delay(this.local$closure$requestTimeout,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 1:throw this.exception_0;case 2:var t=HttpRequestTimeoutException_init(this.local$closure$context);return cancel_2(this.local$closure$executionContext,ensureNotNull(t.message),t),Unit;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Coroutine$HttpTimeout$Plugin$install$lambda.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$HttpTimeout$Plugin$install$lambda.prototype=Object.create(CoroutineImpl.prototype),Coroutine$HttpTimeout$Plugin$install$lambda.prototype.constructor=Coroutine$HttpTimeout$Plugin$install$lambda,Coroutine$HttpTimeout$Plugin$install$lambda.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(isWebsocket(this.local$$receiver.context.url.protocol)||Kotlin.isType(this.local$$receiver.context.body,ClientUpgradeContent))return;var t,e=this.local$$receiver.context.getCapabilityOrNull_i25mbv$(HttpTimeout$Plugin_getInstance());if(null==e&&this.local$closure$plugin.hasNotNullTimeouts_0()&&(e=HttpTimeout$HttpTimeout$HttpTimeoutCapabilityConfiguration_init(),this.local$$receiver.context.setCapability_wfl2px$(HttpTimeout$Plugin_getInstance(),e)),null!=e){var n=e,i=this.local$closure$plugin,o=this.local$this$HttpTimeout$,r=this.local$closure$scope;t:do{var a,s,l,u,c=this.local$$receiver.context;n.connectTimeoutMillis=null!=(a=n.connectTimeoutMillis)?a:i.connectTimeoutMillis_0,n.socketTimeoutMillis=null!=(s=n.socketTimeoutMillis)?s:i.socketTimeoutMillis_0,n.requestTimeoutMillis=null!=(l=n.requestTimeoutMillis)?l:i.requestTimeoutMillis_0;var p=null!=(u=n.requestTimeoutMillis)?u:i.requestTimeoutMillis_0;if(null==p||equals(p,o.INFINITE_TIMEOUT_MS))break t;var h=c.executionContext,_=launch(r,void 0,void 0,HttpTimeout$Plugin$install$lambda$lambda$lambda(p,c,h));c.executionContext.invokeOnCompletion_f05bi3$(HttpTimeout$Plugin$install$lambda$lambda$lambda_0(_))}while(0);t=n}else t=null;return t;case 1:throw this.exception_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},HttpTimeout$Plugin.prototype.install_wojrb5$=function(t,e){e.requestPipeline.intercept_h71y74$(HttpRequestPipeline$Phases_getInstance().Before,HttpTimeout$Plugin$install$lambda(t,this,e))},HttpTimeout$Plugin.$metadata$={kind:Kind_OBJECT,simpleName:"Plugin",interfaces:[HttpClientEngineCapability,HttpClientPlugin]};var HttpTimeout$Plugin_instance=null;function HttpTimeout$Plugin_getInstance(){return null===HttpTimeout$Plugin_instance&&new HttpTimeout$Plugin,HttpTimeout$Plugin_instance}function HttpRequestTimeoutException(t,e){IOException_init("Request timeout has expired [url="+t+", request_timeout="+(null!=e?e:"unknown").toString()+" ms]",this),this.name="HttpRequestTimeoutException"}function HttpRequestTimeoutException_init(t,e){var n;return e=e||Object.create(HttpRequestTimeoutException.prototype),HttpRequestTimeoutException.call(e,t.url.buildString(),null!=(n=t.getCapabilityOrNull_i25mbv$(HttpTimeout$Plugin_getInstance()))?n.requestTimeoutMillis:null),e}function UserAgent$Plugin(){UserAgent$Plugin_instance=this,this.key_vlyr9n$_0=new AttributeKey("UserAgent")}HttpTimeout.$metadata$={kind:Kind_CLASS,simpleName:"HttpTimeout",interfaces:[]},HttpRequestTimeoutException.$metadata$={kind:Kind_CLASS,simpleName:"HttpRequestTimeoutException",interfaces:[IOException]};var UserAgent$Plugin_instance=null,CacheControl_instance=null;function HttpCache$Companion(){HttpCache$Companion_instance=this,this.key_p083cc$_0=new AttributeKey("HttpCache"),this.HttpResponseFromCache=new EventDefinition}var HttpCache$Companion_instance=null,ValidateStatus$ShouldValidate_instance,ValidateStatus$ShouldNotValidate_instance,ValidateStatus$ShouldWarn_instance,DisabledCacheStorage_instance=null,HttpCacheStorage$Companion_instance=null;function HttpCookies$Companion(){HttpCookies$Companion_instance=this,this.key_6q2kl6$_0=new AttributeKey("HttpCookies")}var HttpCookies$Companion_instance=null;function wrapWithContent_1(t,e){return new DelegatedResponse(t.call,e,t)}function DelegatedResponse(t,e,n){HttpResponse.call(this),this.call_bpc16b$_0=t,this.content_if43bk$_0=e,this.origin_0=n,this.coroutineContext_jo80q4$_0=this.origin_0.coroutineContext}function ResponseObserver$Plugin(){ResponseObserver$Plugin_instance=this,this.key_8ecns0$_0=new AttributeKey("BodyInterceptor")}Object.defineProperty(DelegatedResponse.prototype,"call",{get:function(){return this.call_bpc16b$_0}}),Object.defineProperty(DelegatedResponse.prototype,"content",{get:function(){return this.content_if43bk$_0}}),Object.defineProperty(DelegatedResponse.prototype,"coroutineContext",{configurable:!0,get:function(){return this.coroutineContext_jo80q4$_0}}),Object.defineProperty(DelegatedResponse.prototype,"status",{configurable:!0,get:function(){return this.origin_0.status}}),Object.defineProperty(DelegatedResponse.prototype,"version",{configurable:!0,get:function(){return this.origin_0.version}}),Object.defineProperty(DelegatedResponse.prototype,"requestTime",{configurable:!0,get:function(){return this.origin_0.requestTime}}),Object.defineProperty(DelegatedResponse.prototype,"responseTime",{configurable:!0,get:function(){return this.origin_0.responseTime}}),Object.defineProperty(DelegatedResponse.prototype,"headers",{configurable:!0,get:function(){return this.origin_0.headers}}),DelegatedResponse.$metadata$={kind:Kind_CLASS,simpleName:"DelegatedResponse",interfaces:[HttpResponse]};var ResponseObserver$Plugin_instance=null,WEBSOCKET_VERSION,NONCE_SIZE,REQUEST_EXTENSIONS_KEY;function ClientWebSocketSession(){}function DefaultClientWebSocketSession(t,e){this.call_isp37v$_0=t,this.$delegate_qgt999$_0=e}function DelegatingClientWebSocketSession(t,e){this.call_763etk$_0=t,this.$delegate_m50m56$_0=e}function get_converter(t){var e;return null!=(e=pluginOrNull(t.call.client,WebSockets$Plugin_getInstance()))?e.contentConverter:null}function WebSocketContent(){ClientUpgradeContent.call(this);var t=StringBuilder_init(),e=generateNonce(16);t.append_pdl1vj$(encodeBase64(e)),this.nonce_0=t.toString();var n=new HeadersBuilder;n.append_puj7f4$(http.HttpHeaders.Upgrade,"websocket"),n.append_puj7f4$(http.HttpHeaders.Connection,"upgrade"),n.append_puj7f4$(http.HttpHeaders.SecWebSocketKey,this.nonce_0),n.append_puj7f4$(http.HttpHeaders.SecWebSocketVersion,WEBSOCKET_VERSION),this.headers_81bwsu$_0=n.build()}function WebSocketCapability(){WebSocketCapability_instance=this}ClientWebSocketSession.$metadata$={kind:Kind_INTERFACE,simpleName:"ClientWebSocketSession",interfaces:[WebSocketSession]},Object.defineProperty(DefaultClientWebSocketSession.prototype,"call",{get:function(){return this.call_isp37v$_0}}),Object.defineProperty(DefaultClientWebSocketSession.prototype,"closeReason",{configurable:!0,get:function(){return this.$delegate_qgt999$_0.closeReason}}),Object.defineProperty(DefaultClientWebSocketSession.prototype,"coroutineContext",{configurable:!0,get:function(){return this.$delegate_qgt999$_0.coroutineContext}}),Object.defineProperty(DefaultClientWebSocketSession.prototype,"extensions",{configurable:!0,get:function(){return this.$delegate_qgt999$_0.extensions}}),Object.defineProperty(DefaultClientWebSocketSession.prototype,"incoming",{configurable:!0,get:function(){return this.$delegate_qgt999$_0.incoming}}),Object.defineProperty(DefaultClientWebSocketSession.prototype,"masking",{configurable:!0,get:function(){return this.$delegate_qgt999$_0.masking},set:function(t){this.$delegate_qgt999$_0.masking=t}}),Object.defineProperty(DefaultClientWebSocketSession.prototype,"maxFrameSize",{configurable:!0,get:function(){return this.$delegate_qgt999$_0.maxFrameSize},set:function(t){this.$delegate_qgt999$_0.maxFrameSize=t}}),Object.defineProperty(DefaultClientWebSocketSession.prototype,"outgoing",{configurable:!0,get:function(){return this.$delegate_qgt999$_0.outgoing}}),Object.defineProperty(DefaultClientWebSocketSession.prototype,"pingIntervalMillis",{configurable:!0,get:function(){return this.$delegate_qgt999$_0.pingIntervalMillis},set:function(t){this.$delegate_qgt999$_0.pingIntervalMillis=t}}),Object.defineProperty(DefaultClientWebSocketSession.prototype,"timeoutMillis",{configurable:!0,get:function(){return this.$delegate_qgt999$_0.timeoutMillis},set:function(t){this.$delegate_qgt999$_0.timeoutMillis=t}}),DefaultClientWebSocketSession.prototype.flush=function(t){return this.$delegate_qgt999$_0.flush(t)},DefaultClientWebSocketSession.prototype.send_q1ubw4$=function(t,e){return this.$delegate_qgt999$_0.send_q1ubw4$(t,e)},DefaultClientWebSocketSession.prototype.start_wwqcjq$$default=function(t){return this.$delegate_qgt999$_0.start_wwqcjq$$default(t)},DefaultClientWebSocketSession.prototype.terminate=function(){return this.$delegate_qgt999$_0.terminate()},DefaultClientWebSocketSession.$metadata$={kind:Kind_CLASS,simpleName:"DefaultClientWebSocketSession",interfaces:[DefaultWebSocketSession,ClientWebSocketSession]},Object.defineProperty(DelegatingClientWebSocketSession.prototype,"call",{get:function(){return this.call_763etk$_0}}),Object.defineProperty(DelegatingClientWebSocketSession.prototype,"coroutineContext",{configurable:!0,get:function(){return this.$delegate_m50m56$_0.coroutineContext}}),Object.defineProperty(DelegatingClientWebSocketSession.prototype,"extensions",{configurable:!0,get:function(){return this.$delegate_m50m56$_0.extensions}}),Object.defineProperty(DelegatingClientWebSocketSession.prototype,"incoming",{configurable:!0,get:function(){return this.$delegate_m50m56$_0.incoming}}),Object.defineProperty(DelegatingClientWebSocketSession.prototype,"masking",{configurable:!0,get:function(){return this.$delegate_m50m56$_0.masking},set:function(t){this.$delegate_m50m56$_0.masking=t}}),Object.defineProperty(DelegatingClientWebSocketSession.prototype,"maxFrameSize",{configurable:!0,get:function(){return this.$delegate_m50m56$_0.maxFrameSize},set:function(t){this.$delegate_m50m56$_0.maxFrameSize=t}}),Object.defineProperty(DelegatingClientWebSocketSession.prototype,"outgoing",{configurable:!0,get:function(){return this.$delegate_m50m56$_0.outgoing}}),DelegatingClientWebSocketSession.prototype.flush=function(t){return this.$delegate_m50m56$_0.flush(t)},DelegatingClientWebSocketSession.prototype.send_q1ubw4$=function(t,e){return this.$delegate_m50m56$_0.send_q1ubw4$(t,e)},DelegatingClientWebSocketSession.prototype.terminate=function(){return this.$delegate_m50m56$_0.terminate()},DelegatingClientWebSocketSession.$metadata$={kind:Kind_CLASS,simpleName:"DelegatingClientWebSocketSession",interfaces:[ClientWebSocketSession,WebSocketSession]},defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.plugins.websocket.sendSerialized_6ltcma$",wrapFunction((function(){var t=_.io.ktor.client.plugins.websocket.get_converter_vw5opa$,e=_.$$importsForInline$$["ktor-ktor-serialization-js-legacy"].io.ktor.serialization.WebsocketConverterNotFoundException,n=_.$$importsForInline$$["ktor-ktor-serialization-js-legacy"].io.ktor.serialization.suitableCharset_4q0pk1$,i=Kotlin.getReifiedTypeParameterKType,o=_.$$importsForInline$$["ktor-ktor-websocket-serialization-js-legacy"].$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,r=Kotlin.getKClass,a=_.$$importsForInline$$["ktor-ktor-websocket-serialization-js-legacy"].$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,s=Error;return function(l,u,c,p,h){var _;if(null==(_=t(c)))throw new e("No converter was found for websocket");var d,f=_,m=n(c.call.request.headers),$=o.JsType,y=r(l);t:do{try{d=i(l)}catch(t){if(Kotlin.isType(t,s)){d=null;break t}throw t}}while(0);Kotlin.suspendCall(f.serializeNullable_rh40qx$(m,a($,y,d),p,Kotlin.coroutineReceiver()));var g=Kotlin.coroutineResult(Kotlin.coroutineReceiver());Kotlin.suspendCall(c.outgoing.send_11rb$(g,Kotlin.coroutineReceiver()))}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.plugins.websocket.receiveDeserialized_8j5n8k$",wrapFunction((function(){var t=_.io.ktor.client.plugins.websocket.get_converter_vw5opa$,e=_.$$importsForInline$$["ktor-ktor-serialization-js-legacy"].io.ktor.serialization.WebsocketConverterNotFoundException,n=_.$$importsForInline$$["ktor-ktor-serialization-js-legacy"].io.ktor.serialization.suitableCharset_4q0pk1$,i=Kotlin.getReifiedTypeParameterKType,o=Kotlin.throwCCE,r=_.$$importsForInline$$["ktor-ktor-websocket-serialization-js-legacy"].$$importsForInline$$["ktor-ktor-serialization-js-legacy"].io.ktor.serialization.WebsocketDeserializeException,a=Kotlin.getKClass,s=Kotlin.toString,l=_.$$importsForInline$$["ktor-ktor-websocket-serialization-js-legacy"].$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,u=_.$$importsForInline$$["ktor-ktor-websocket-serialization-js-legacy"].$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,c=Error;return function(p,h,_,d){var f,m;if(null==(f=t(_)))throw new e("No converter was found for websocket");var $=f,y=n(_.call.request.headers);t:do{var g;Kotlin.suspendCall(_.incoming.receive(Kotlin.coroutineReceiver()));var v=Kotlin.coroutineResult(Kotlin.coroutineReceiver());if(!$.isApplicable_q1ubw4$(v))throw new r("Converter doesn't support frame type "+v.frameType.name,void 0,v);var b,w=l.JsType,x=a(p);e:do{try{b=i(p)}catch(t){if(Kotlin.isType(t,c)){b=null;break e}throw t}}while(0);var k=u(w,x,b);Kotlin.suspendCall($.deserialize_v0czzf$(y,k,v,Kotlin.coroutineReceiver()));var C=Kotlin.coroutineResult(Kotlin.coroutineReceiver());if(h(C)){Kotlin.setCoroutineResult(C,Kotlin.coroutineReceiver());break t}if(null==C){if(!0===(null!=(g=k.kotlinType)?g.isMarkedNullable:null)){Kotlin.setCoroutineResult(null,Kotlin.coroutineReceiver());break t}throw new r("Frame has null content",void 0,v)}throw new r("Can't deserialize value : expected value of type "+s(a(p).simpleName)+", got "+s(Kotlin.getKClassFromExpression(C).simpleName),void 0,v)}while(0);return h(m=Kotlin.coroutineResult(Kotlin.coroutineReceiver()))?m:o()}}))),Object.defineProperty(WebSocketContent.prototype,"headers",{configurable:!0,get:function(){return this.headers_81bwsu$_0}}),WebSocketContent.prototype.verify_fkh4uy$=function(t){var e;if(null==(e=t.get_61zpoe$(http.HttpHeaders.SecWebSocketAccept)))throw IllegalStateException_init("Server should specify header Sec-WebSocket-Accept".toString());var n=e,i=websocketServerAccept(this.nonce_0);if(!equals(i,n))throw IllegalStateException_init(("Failed to verify server accept header. Expected: "+i+", received: "+n).toString())},WebSocketContent.prototype.toString=function(){return"WebSocketContent"},WebSocketContent.$metadata$={kind:Kind_CLASS,simpleName:"WebSocketContent",interfaces:[ClientUpgradeContent]},WebSocketCapability.prototype.toString=function(){return"WebSocketCapability"},WebSocketCapability.$metadata$={kind:Kind_OBJECT,simpleName:"WebSocketCapability",interfaces:[HttpClientEngineCapability]};var WebSocketCapability_instance=null;function WebSocketCapability_getInstance(){return null===WebSocketCapability_instance&&new WebSocketCapability,WebSocketCapability_instance}function WebSocketExtensionsCapability(){WebSocketExtensionsCapability_instance=this}WebSocketExtensionsCapability.prototype.toString=function(){return"WebSocketExtensionsCapability"},WebSocketExtensionsCapability.$metadata$={kind:Kind_OBJECT,simpleName:"WebSocketExtensionsCapability",interfaces:[HttpClientEngineCapability]};var WebSocketExtensionsCapability_instance=null;function WebSocketExtensionsCapability_getInstance(){return null===WebSocketExtensionsCapability_instance&&new WebSocketExtensionsCapability,WebSocketExtensionsCapability_instance}function WebSockets(t,e,n,i){WebSockets$Plugin_getInstance(),void 0===i&&(i=null),this.pingInterval=t,this.maxFrameSize=e,this.extensionsConfig_0=n,this.contentConverter=i}function WebSockets$Config(){this.extensionsConfig_8be2vx$=new WebSocketExtensionsConfig,this.pingInterval=L_1,this.maxFrameSize=L2147483647,this.contentConverter=null}function WebSockets$Plugin(){WebSockets$Plugin_instance=this,this.key_duloku$_0=new AttributeKey("Websocket")}function Coroutine$WebSockets$Plugin$install$lambda(t,e,n,i,o,r){CoroutineImpl.call(this,r),this.$controller=o,this.exceptionState_0=1,this.local$closure$extensionsSupported=t,this.local$closure$plugin=e,this.local$$receiver=n}function WebSockets$Plugin$install$lambda(t,e){return function(n,i,o,r){var a=new Coroutine$WebSockets$Plugin$install$lambda(t,e,n,i,this,o);return r?a:a.doResume(null)}}function Coroutine$WebSockets$Plugin$install$lambda_0(t,e,n,i,o,r){CoroutineImpl.call(this,r),this.$controller=o,this.exceptionState_0=1,this.local$closure$plugin=t,this.local$closure$extensionsSupported=e,this.local$info=void 0,this.local$session=void 0,this.local$$receiver=n,this.local$f=i}function WebSockets$Plugin$install$lambda_0(t,e){return function(n,i,o,r){var a=new Coroutine$WebSockets$Plugin$install$lambda_0(t,e,n,i,this,o);return r?a:a.doResume(null)}}WebSockets.prototype.installExtensions_0=function(t){var e=this.extensionsConfig_0.build();t.attributes.put_uuntuo$(REQUEST_EXTENSIONS_KEY,e);var n,i=ArrayList_init();for(n=e.iterator();n.hasNext();){var o=n.next().protocols;addAll(i,o)}var r=i;this.addNegotiatedProtocols_0(t,r)},WebSockets.prototype.completeNegotiation_0=function(t){var e,n,i,o=null!=(n=null!=(e=t.response.headers.get_61zpoe$(http.HttpHeaders.SecWebSocketExtensions))?parseWebSocketExtensions(e):null)?n:emptyList(),r=t.attributes.get_yzaw86$(REQUEST_EXTENSIONS_KEY),a=ArrayList_init();for(i=r.iterator();i.hasNext();){var s=i.next();s.clientNegotiation_wklug5$(o)&&a.add_11rb$(s)}return a},WebSockets.prototype.addNegotiatedProtocols_0=function(t,e){if(!e.isEmpty()){var n=joinToString(e,";");header(t,http.HttpHeaders.SecWebSocketExtensions,n)}},WebSockets.prototype.convertSessionToDefault_7ikcz7$=function(t){if(Kotlin.isType(t,DefaultWebSocketSession))return t;var e=DefaultWebSocketSession_0(t,this.pingInterval,this.pingInterval.multiply(Kotlin.Long.fromInt(2)));return e.maxFrameSize=this.maxFrameSize,e},WebSockets$Config.prototype.extensions_rm8exh$=function(t){t(this.extensionsConfig_8be2vx$)},WebSockets$Config.$metadata$={kind:Kind_CLASS,simpleName:"Config",interfaces:[]},Object.defineProperty(WebSockets$Plugin.prototype,"key",{configurable:!0,get:function(){return this.key_duloku$_0}}),WebSockets$Plugin.prototype.prepare_oh3mgy$$default=function(t){var e=new WebSockets$Config;t(e);var n=e;return new WebSockets(n.pingInterval,n.maxFrameSize,n.extensionsConfig_8be2vx$,n.contentConverter)},Coroutine$WebSockets$Plugin$install$lambda.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$WebSockets$Plugin$install$lambda.prototype=Object.create(CoroutineImpl.prototype),Coroutine$WebSockets$Plugin$install$lambda.prototype.constructor=Coroutine$WebSockets$Plugin$install$lambda,Coroutine$WebSockets$Plugin$install$lambda.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(isWebsocket(this.local$$receiver.context.url.protocol)){this.state_0=2;continue}return;case 1:throw this.exception_0;case 2:if(this.local$$receiver.context.setCapability_wfl2px$(WebSocketCapability_getInstance(),Unit),this.local$closure$extensionsSupported&&this.local$closure$plugin.installExtensions_0(this.local$$receiver.context),this.state_0=3,this.result_0=this.local$$receiver.proceedWith_trkh7z$(new WebSocketContent,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 3:return this.result_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Coroutine$WebSockets$Plugin$install$lambda_0.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$WebSockets$Plugin$install$lambda_0.prototype=Object.create(CoroutineImpl.prototype),Coroutine$WebSockets$Plugin$install$lambda_0.prototype.constructor=Coroutine$WebSockets$Plugin$install$lambda_0,Coroutine$WebSockets$Plugin$install$lambda_0.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;if(this.local$info=this.local$f.component1(),this.local$session=this.local$f.component2(),Kotlin.isType(this.local$session,WebSocketSession)){this.state_0=2;continue}return;case 1:throw this.exception_0;case 2:if(equals(this.local$info.type,getKClass(DefaultClientWebSocketSession))){var e=this.local$closure$plugin.convertSessionToDefault_7ikcz7$(this.local$session),n=new DefaultClientWebSocketSession(this.local$$receiver.context,e),i=this.local$closure$extensionsSupported?this.local$closure$plugin.completeNegotiation_0(this.local$$receiver.context):emptyList();n.start_wwqcjq$(i),t=n}else t=new DelegatingClientWebSocketSession(this.local$$receiver.context,this.local$session);var o=t,r=new HttpResponseContainer(this.local$info,o);if(this.state_0=3,this.result_0=this.local$$receiver.proceedWith_trkh7z$(r,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 3:return this.result_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},WebSockets$Plugin.prototype.install_wojrb5$=function(t,e){var n=e.engine.supportedCapabilities.contains_11rb$(WebSocketExtensionsCapability_getInstance());e.requestPipeline.intercept_h71y74$(HttpRequestPipeline$Phases_getInstance().Render,WebSockets$Plugin$install$lambda(n,t)),e.responsePipeline.intercept_h71y74$(HttpResponsePipeline$Phases_getInstance().Transform,WebSockets$Plugin$install$lambda_0(t,n))},WebSockets$Plugin.$metadata$={kind:Kind_OBJECT,simpleName:"Plugin",interfaces:[HttpClientPlugin]};var WebSockets$Plugin_instance=null;function WebSockets$Plugin_getInstance(){return null===WebSockets$Plugin_instance&&new WebSockets$Plugin,WebSockets$Plugin_instance}function WebSocketException(t){IllegalStateException_init(t,this),this.name="WebSocketException"}function webSocket$lambda$lambda(t,e){return t.protocol=URLProtocol.Companion.WS,Unit}function Coroutine$webSocket$lambda(t,e,n){CoroutineImpl.call(this,n),this.exceptionState_0=7,this.local$closure$block=t,this.local$it=e}function webSocket$lambda(t){return function(e,n,i){var o=new Coroutine$webSocket$lambda(t,e,n);return i?o:o.doResume(null)}}function Coroutine$webSocket(t,e,n,i){CoroutineImpl.call(this,i),this.exceptionState_0=10,this.local$session=void 0,this.local$response=void 0,this.local$$receiver=t,this.local$request=e,this.local$block=n}function webSocket(t,e,n,i,o){var r=new Coroutine$webSocket(t,e,n,i);return o?r:r.doResume(null)}function webSocket$lambda_0(t){return Unit}function webSocket$lambda_1(t,e,n,i,o){return function(r){return r.method=t,url_0(r,"ws",e,n,i),o(r),Unit}}function Coroutine$webSocket_0(t,e,n,i,o,r,a,s){CoroutineImpl.call(this,s),this.exceptionState_0=1,this.local$$receiver=t,this.local$method=e,this.local$host=n,this.local$port=i,this.local$path=o,this.local$request=r,this.local$block=a}function webSocket_0(t,e,n,i,o,r,a,s,l){var u=new Coroutine$webSocket_0(t,e,n,i,o,r,a,s);return l?u:u.doResume(null)}function webSocket$lambda_2(t){return Unit}function webSocket$lambda_3(t,e){return function(n){return n.url.protocol=URLProtocol.Companion.WS,n.url.port=get_port(n),takeFrom_0(n.url,t),e(n),Unit}}function Coroutine$webSocket_1(t,e,n,i,o){CoroutineImpl.call(this,o),this.exceptionState_0=1,this.local$$receiver=t,this.local$urlString=e,this.local$request=n,this.local$block=i}function webSocket_1(t,e,n,i,o,r){var a=new Coroutine$webSocket_1(t,e,n,i,o);return r?a:a.doResume(null)}function ClientUpgradeContent(){OutgoingContent$NoContent.call(this),this.content_1mwwgv$_xt2h6t$_0=lazy(ClientUpgradeContent$content$lambda)}function Coroutine$pipeTo_h3x4ir$(t,e,n){CoroutineImpl.call(this,n),this.exceptionState_0=1,this.$this=t,this.local$output=e}function ClientUpgradeContent$content$lambda(){return ByteChannel()}function DefaultHttpRequest(t,e){this.call_bo7spw$_0=t,this.method_c5x7eh$_0=e.method,this.url_9j6cnp$_0=e.url,this.content_jw4yw1$_0=e.body,this.headers_atwsac$_0=e.headers,this.attributes_el41s3$_0=e.attributes}function HttpRequest_0(){}function HttpRequestBuilder(){HttpRequestBuilder$Companion_getInstance(),this.url=new URLBuilder_0,this.method=HttpMethod.Companion.Get,this.headers_nor9ye$_0=new HeadersBuilder,this.body_ts5xt2$_0=EmptyContent_getInstance(),this.executionContext_h6ms6p$_0=SupervisorJob(),this.attributes=Attributes(!0)}function HttpRequestBuilder$setCapability$lambda(){return LinkedHashMap_init()}function HttpRequestBuilder$Companion(){HttpRequestBuilder$Companion_instance=this}WebSockets.$metadata$={kind:Kind_CLASS,simpleName:"WebSockets",interfaces:[]},WebSocketException.$metadata$={kind:Kind_CLASS,simpleName:"WebSocketException",interfaces:[IllegalStateException]},Coroutine$webSocket$lambda.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$webSocket$lambda.prototype=Object.create(CoroutineImpl.prototype),Coroutine$webSocket$lambda.prototype.constructor=Coroutine$webSocket$lambda,Coroutine$webSocket$lambda.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.exceptionState_0=4,this.state_0=1,this.result_0=this.local$closure$block(this.local$it,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 1:this.exceptionState_0=7,this.finallyPath_0=[2],this.state_0=5,this.$returnValue=this.result_0;continue;case 2:return this.$returnValue;case 3:return;case 4:this.finallyPath_0=[7],this.state_0=5;continue;case 5:if(this.exceptionState_0=7,this.state_0=6,this.result_0=close(this.local$it,void 0,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 6:this.state_0=this.finallyPath_0.shift();continue;case 7:throw this.exception_0;default:throw this.state_0=7,new Error("State Machine Unreachable execution")}}catch(t){if(7===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Coroutine$webSocket.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$webSocket.prototype=Object.create(CoroutineImpl.prototype),Coroutine$webSocket.prototype.constructor=Coroutine$webSocket,Coroutine$webSocket.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:plugin(this.local$$receiver,WebSockets$Plugin_getInstance());var t=new HttpRequestBuilder;if(t.url_6yzzjr$(webSocket$lambda$lambda),this.local$request(t),this.result_0=new HttpStatement(t,this.local$$receiver),this.local$session=this.result_0,this.exceptionState_0=8,this.state_0=1,this.result_0=this.local$session.executeUnsafe(this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 1:var e;this.local$response=this.result_0,this.exceptionState_0=5;var n,i=this.local$response.call,o=reflect.JsType,r=getKClass(DefaultClientWebSocketSession);t:do{try{n=createKType(getKClass(DefaultClientWebSocketSession),[],!1)}catch(t){if(Kotlin.isType(t,Throwable)){n=null;break t}throw t}}while(0);if(this.state_0=2,this.result_0=i.bodyNullable_qi9ur9$(typeInfoImpl(o,r,n),this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 2:this.result_0=Kotlin.isType(e=this.result_0,DefaultClientWebSocketSession)?e:throwCCE();var a=this.result_0;if(this.state_0=3,this.result_0=webSocket$lambda(this.local$block)(a,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 3:this.exceptionState_0=8,this.finallyPath_0=[4],this.state_0=6;continue;case 4:this.exceptionState_0=10,this.state_0=9;continue;case 5:this.finallyPath_0=[8],this.state_0=6;continue;case 6:if(this.exceptionState_0=8,this.state_0=7,this.result_0=this.local$session.cleanup_abn2de$(this.local$response,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 7:this.state_0=this.finallyPath_0.shift();continue;case 8:this.exceptionState_0=10;var s=this.exception_0;throw Kotlin.isType(s,CancellationException)?unwrapCancellationException(s):s;case 9:return;case 10:throw this.exception_0;default:throw this.state_0=10,new Error("State Machine Unreachable execution")}}catch(t){if(10===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Coroutine$webSocket_0.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$webSocket_0.prototype=Object.create(CoroutineImpl.prototype),Coroutine$webSocket_0.prototype.constructor=Coroutine$webSocket_0,Coroutine$webSocket_0.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(void 0===this.local$method&&(this.local$method=HttpMethod.Companion.Get),void 0===this.local$host&&(this.local$host=null),void 0===this.local$port&&(this.local$port=null),void 0===this.local$path&&(this.local$path=null),void 0===this.local$request&&(this.local$request=webSocket$lambda_0),this.state_0=2,this.result_0=webSocket(this.local$$receiver,webSocket$lambda_1(this.local$method,this.local$host,this.local$port,this.local$path,this.local$request),this.local$block,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 1:throw this.exception_0;case 2:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Coroutine$webSocket_1.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$webSocket_1.prototype=Object.create(CoroutineImpl.prototype),Coroutine$webSocket_1.prototype.constructor=Coroutine$webSocket_1,Coroutine$webSocket_1.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(void 0===this.local$request&&(this.local$request=webSocket$lambda_2),this.state_0=2,this.result_0=webSocket_0(this.local$$receiver,HttpMethod.Companion.Get,null,null,null,webSocket$lambda_3(this.local$urlString,this.local$request),this.local$block,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 1:throw this.exception_0;case 2:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Object.defineProperty(ClientUpgradeContent.prototype,"content_1mwwgv$_0",{configurable:!0,get:function(){return this.content_1mwwgv$_xt2h6t$_0.value}}),Object.defineProperty(ClientUpgradeContent.prototype,"output",{configurable:!0,get:function(){return this.content_1mwwgv$_0}}),Coroutine$pipeTo_h3x4ir$.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$pipeTo_h3x4ir$.prototype=Object.create(CoroutineImpl.prototype),Coroutine$pipeTo_h3x4ir$.prototype.constructor=Coroutine$pipeTo_h3x4ir$,Coroutine$pipeTo_h3x4ir$.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=copyAndClose(this.$this.content_1mwwgv$_0,this.local$output,void 0,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 1:throw this.exception_0;case 2:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},ClientUpgradeContent.prototype.pipeTo_h3x4ir$=function(t,e,n){var i=new Coroutine$pipeTo_h3x4ir$(this,t,e);return n?i:i.doResume(null)},ClientUpgradeContent.$metadata$={kind:Kind_CLASS,simpleName:"ClientUpgradeContent",interfaces:[OutgoingContent$NoContent]},Object.defineProperty(DefaultHttpRequest.prototype,"call",{get:function(){return this.call_bo7spw$_0}}),Object.defineProperty(DefaultHttpRequest.prototype,"coroutineContext",{configurable:!0,get:function(){return this.call.coroutineContext}}),Object.defineProperty(DefaultHttpRequest.prototype,"method",{configurable:!0,get:function(){return this.method_c5x7eh$_0}}),Object.defineProperty(DefaultHttpRequest.prototype,"url",{configurable:!0,get:function(){return this.url_9j6cnp$_0}}),Object.defineProperty(DefaultHttpRequest.prototype,"content",{configurable:!0,get:function(){return this.content_jw4yw1$_0}}),Object.defineProperty(DefaultHttpRequest.prototype,"headers",{configurable:!0,get:function(){return this.headers_atwsac$_0}}),Object.defineProperty(DefaultHttpRequest.prototype,"attributes",{configurable:!0,get:function(){return this.attributes_el41s3$_0}}),DefaultHttpRequest.$metadata$={kind:Kind_CLASS,simpleName:"DefaultHttpRequest",interfaces:[HttpRequest_0]},Object.defineProperty(HttpRequest_0.prototype,"coroutineContext",{configurable:!0,get:function(){return this.call.coroutineContext}}),HttpRequest_0.$metadata$={kind:Kind_INTERFACE,simpleName:"HttpRequest",interfaces:[CoroutineScope,HttpMessage]},Object.defineProperty(HttpRequestBuilder.prototype,"headers",{configurable:!0,get:function(){return this.headers_nor9ye$_0}}),Object.defineProperty(HttpRequestBuilder.prototype,"body",{configurable:!0,get:function(){return this.body_ts5xt2$_0},set:function(t){this.body_ts5xt2$_0=t}}),Object.defineProperty(HttpRequestBuilder.prototype,"bodyType",{configurable:!0,get:function(){return this.attributes.getOrNull_yzaw86$(BodyTypeAttributeKey)},set:function(t){null!=t?this.attributes.put_uuntuo$(BodyTypeAttributeKey,t):this.attributes.remove_yzaw86$(BodyTypeAttributeKey)}}),Object.defineProperty(HttpRequestBuilder.prototype,"executionContext",{configurable:!0,get:function(){return this.executionContext_h6ms6p$_0},set:function(t){this.executionContext_h6ms6p$_0=t}}),HttpRequestBuilder.prototype.url_6yzzjr$=function(t){t(this.url,this.url)},HttpRequestBuilder.prototype.build=function(){var t,e,n,i,o;if(t=this.url.build(),e=this.method,n=this.headers.build(),null==(o=Kotlin.isType(i=this.body,OutgoingContent)?i:null))throw IllegalStateException_init(("No request transformation found: "+this.body.toString()).toString());return new HttpRequestData(t,e,n,o,this.executionContext,this.attributes)},HttpRequestBuilder.prototype.setAttributes_yhh5ns$=function(t){t(this.attributes)},HttpRequestBuilder.prototype.takeFromWithExecutionContext_s9rlw$=function(t){return this.executionContext=t.executionContext,this.takeFrom_s9rlw$(t)},HttpRequestBuilder.prototype.takeFrom_s9rlw$=function(t){return this.method=t.method,this.body=t.body,this.bodyType=t.bodyType,takeFrom(this.url,t.url),this.url.encodedPathSegments=this.url.encodedPathSegments,appendAll(this.headers,t.headers),putAll(this.attributes,t.attributes),this},HttpRequestBuilder.prototype.setCapability_wfl2px$=function(t,e){this.attributes.computeIfAbsent_u4q9l2$(ENGINE_CAPABILITIES_KEY,HttpRequestBuilder$setCapability$lambda).put_xwzc9p$(t,e)},HttpRequestBuilder.prototype.getCapabilityOrNull_i25mbv$=function(t){var e,n;return null==(n=null!=(e=this.attributes.getOrNull_yzaw86$(ENGINE_CAPABILITIES_KEY))?e.get_11rb$(t):null)||Kotlin.isType(n,Any)?n:throwCCE()},HttpRequestBuilder$Companion.$metadata$={kind:Kind_OBJECT,simpleName:"Companion",interfaces:[]};var HttpRequestBuilder$Companion_instance=null;function HttpRequestBuilder$Companion_getInstance(){return null===HttpRequestBuilder$Companion_instance&&new HttpRequestBuilder$Companion,HttpRequestBuilder$Companion_instance}function HttpRequestData(t,e,n,i,o,r){var a,s;this.url=t,this.method=e,this.headers=n,this.body=i,this.executionContext=o,this.attributes=r,this.requiredCapabilities_8be2vx$=null!=(s=null!=(a=this.attributes.getOrNull_yzaw86$(ENGINE_CAPABILITIES_KEY))?a.keys:null)?s:emptySet()}function HttpResponseData(t,e,n,i,o,r){this.statusCode=t,this.requestTime=e,this.headers=n,this.version=i,this.body=o,this.callContext=r,this.responseTime=GMTDate()}function url$lambda(t){return Unit}function url_0(t,e,n,i,o,r){void 0===e&&(e=null),void 0===n&&(n=null),void 0===i&&(i=null),void 0===o&&(o=null),void 0===r&&(r=url$lambda),set(t.url,e,n,i,o,r)}function url_1(t,e){takeFrom_0(t.url,e)}function isUpgradeRequest(t){return Kotlin.isType(t.body,ClientUpgradeContent)}function HttpRequestPipeline(t){HttpRequestPipeline$Phases_getInstance(),void 0===t&&(t=!1),Pipeline.call(this,[HttpRequestPipeline$Phases_getInstance().Before,HttpRequestPipeline$Phases_getInstance().State,HttpRequestPipeline$Phases_getInstance().Transform,HttpRequestPipeline$Phases_getInstance().Render,HttpRequestPipeline$Phases_getInstance().Send]),this.developmentMode_dglch5$_0=t}function HttpRequestPipeline$Phases(){HttpRequestPipeline$Phases_instance=this,this.Before=new PipelinePhase("Before"),this.State=new PipelinePhase("State"),this.Transform=new PipelinePhase("Transform"),this.Render=new PipelinePhase("Render"),this.Send=new PipelinePhase("Send")}HttpRequestBuilder.$metadata$={kind:Kind_CLASS,simpleName:"HttpRequestBuilder",interfaces:[HttpMessageBuilder]},HttpRequestData.prototype.getCapabilityOrNull_1sr7de$=function(t){var e,n;return null==(n=null!=(e=this.attributes.getOrNull_yzaw86$(ENGINE_CAPABILITIES_KEY))?e.get_11rb$(t):null)||Kotlin.isType(n,Any)?n:throwCCE()},HttpRequestData.prototype.toString=function(){return"HttpRequestData(url="+this.url+", method="+this.method+")"},HttpRequestData.$metadata$={kind:Kind_CLASS,simpleName:"HttpRequestData",interfaces:[]},HttpResponseData.prototype.toString=function(){return"HttpResponseData=(statusCode="+this.statusCode+")"},HttpResponseData.$metadata$={kind:Kind_CLASS,simpleName:"HttpResponseData",interfaces:[]},Object.defineProperty(HttpRequestPipeline.prototype,"developmentMode",{get:function(){return this.developmentMode_dglch5$_0}}),HttpRequestPipeline$Phases.$metadata$={kind:Kind_OBJECT,simpleName:"Phases",interfaces:[]};var HttpRequestPipeline$Phases_instance=null;function HttpRequestPipeline$Phases_getInstance(){return null===HttpRequestPipeline$Phases_instance&&new HttpRequestPipeline$Phases,HttpRequestPipeline$Phases_instance}function HttpSendPipeline(t){HttpSendPipeline$Phases_getInstance(),void 0===t&&(t=!1),Pipeline.call(this,[HttpSendPipeline$Phases_getInstance().Before,HttpSendPipeline$Phases_getInstance().State,HttpSendPipeline$Phases_getInstance().Monitoring,HttpSendPipeline$Phases_getInstance().Engine,HttpSendPipeline$Phases_getInstance().Receive]),this.developmentMode_7517lc$_0=t}function HttpSendPipeline$Phases(){HttpSendPipeline$Phases_instance=this,this.Before=new PipelinePhase("Before"),this.State=new PipelinePhase("State"),this.Monitoring=new PipelinePhase("Monitoring"),this.Engine=new PipelinePhase("Engine"),this.Receive=new PipelinePhase("Receive")}HttpRequestPipeline.$metadata$={kind:Kind_CLASS,simpleName:"HttpRequestPipeline",interfaces:[Pipeline]},Object.defineProperty(HttpSendPipeline.prototype,"developmentMode",{get:function(){return this.developmentMode_7517lc$_0}}),HttpSendPipeline$Phases.$metadata$={kind:Kind_OBJECT,simpleName:"Phases",interfaces:[]};var HttpSendPipeline$Phases_instance=null,BodyTypeAttributeKey,RN_BYTES;function HttpSendPipeline$Phases_getInstance(){return null===HttpSendPipeline$Phases_instance&&new HttpSendPipeline$Phases,HttpSendPipeline$Phases_instance}function url_2(t,e){takeFrom_1(t.url,e)}function FormDataContent(t){OutgoingContent$ByteArrayContent.call(this),this.formData=t;var e,n,i=formUrlEncode(this.formData);t:do{if(null!=(e=charsets.Charsets.UTF_8)&&e.equals(charsets.Charsets.UTF_8)){n=encodeToByteArray(i);break t}n=encodeToByteArray_0(e.newEncoder(),i,0,i.length)}while(0);this.content_0=n,this.contentLength_f2tvnf$_0=Kotlin.Long.fromInt(this.content_0.length),this.contentType_gyve29$_0=withCharset(ContentType.Application.FormUrlEncoded,charsets.Charsets.UTF_8)}function MultiPartFormDataContent(t,e,n){void 0===e&&(e=generateBoundary()),void 0===n&&(n=ContentType.MultiPart.FormData.withParameter_puj7f4$("boundary",e)),OutgoingContent$WriteChannelContent.call(this),this.boundary=e,this.contentType_azd2en$_0=n;var i,o,r="--"+this.boundary+"\r\n";t:do{if(null!=(i=charsets.Charsets.UTF_8)&&i.equals(charsets.Charsets.UTF_8)){o=encodeToByteArray(r);break t}o=encodeToByteArray_0(i.newEncoder(),r,0,r.length)}while(0);this.BOUNDARY_BYTES_0=o;var a,s,l="--"+this.boundary+"--\r\n";t:do{if(null!=(a=charsets.Charsets.UTF_8)&&a.equals(charsets.Charsets.UTF_8)){s=encodeToByteArray(l);break t}s=encodeToByteArray_0(a.newEncoder(),l,0,l.length)}while(0);this.LAST_BOUNDARY_BYTES_0=s,this.BODY_OVERHEAD_SIZE_0=this.LAST_BOUNDARY_BYTES_0.length,this.PART_OVERHEAD_SIZE_0=(2*RN_BYTES.length|0)+this.BOUNDARY_BYTES_0.length|0;var u,c,p=ArrayList_init_0(collectionSizeOrDefault(t,10));for(u=t.iterator();u.hasNext();){var h,_,d,f,m,$,y=u.next(),g=p.add_11rb$,v=new BytePacketBuilder;for(_=y.headers.entries().iterator();_.hasNext();){var b=_.next(),w=b.key,x=b.value;writeText(v,w+": "+joinToString(x,"; ")),writeFully_0(v,RN_BYTES)}var k=null!=(d=y.headers.get_61zpoe$(http.HttpHeaders.ContentLength))?toLong(d):null;if(Kotlin.isType(y,PartData$FileItem)){var C=readBytes(v.build()),E=null!=(f=null!=k?k.add(Kotlin.Long.fromInt(this.PART_OVERHEAD_SIZE_0)):null)?f.add(Kotlin.Long.fromInt(C.length)):null;h=new PreparedPart$InputPart(C,y.provider,E)}else if(Kotlin.isType(y,PartData$BinaryItem)){var S=readBytes(v.build()),T=null!=(m=null!=k?k.add(Kotlin.Long.fromInt(this.PART_OVERHEAD_SIZE_0)):null)?m.add(Kotlin.Long.fromInt(S.length)):null;h=new PreparedPart$InputPart(S,y.provider,T)}else if(Kotlin.isType(y,PartData$FormItem)){var O,N=new BytePacketBuilder;try{writeText(N,y.value),O=N.build()}catch(t){throw Kotlin.isType(t,Throwable)?(N.release(),t):t}var P=readBytes(O),I=MultiPartFormDataContent$rawParts$lambda$lambda(P);null==k&&(writeText(v,http.HttpHeaders.ContentLength+": "+P.length),writeFully_0(v,RN_BYTES));var A=readBytes(v.build()),R=P.length+this.PART_OVERHEAD_SIZE_0+A.length|0;h=new PreparedPart$InputPart(A,I,Kotlin.Long.fromInt(R))}else if(Kotlin.isType(y,PartData$BinaryChannelItem)){var j=readBytes(v.build()),L=null!=($=null!=k?k.add(Kotlin.Long.fromInt(this.PART_OVERHEAD_SIZE_0)):null)?$.add(Kotlin.Long.fromInt(j.length)):null;h=new PreparedPart$ChannelPart(j,y.provider,L)}else h=Kotlin.noWhenBranchMatched();g.call(p,h)}this.rawParts_0=p,this.contentLength_egukxp$_0=null;var z=L0;for(c=this.rawParts_0.iterator();c.hasNext();){var D=c.next().size;if(null==D){z=null;break}z=null!=z?z.add(D):null}null!=z&&(z=z.add(Kotlin.Long.fromInt(this.BODY_OVERHEAD_SIZE_0))),this.contentLength_egukxp$_0=z}function Coroutine$writeTo_h3x4ir$(t,e,n){CoroutineImpl.call(this,n),this.exceptionState_0=18,this.$this=t,this.local$tmp$=void 0,this.local$part=void 0,this.local$$receiver=void 0,this.local$closed=void 0,this.local$channel=e}function MultiPartFormDataContent$rawParts$lambda$lambda(t){return function(){var e,n=new BytePacketBuilder;try{writeFully_0(n,t),e=n.build()}catch(t){throw Kotlin.isType(t,Throwable)?(n.release(),t):t}return e}}function generateBoundary(){for(var t=StringBuilder_init(),e=0;e<32;e++)t.append_pdl1vj$(toString_0(Random.Default.nextInt(),16));return take(t.toString(),70)}function PreparedPart(t,e){this.headers=t,this.size=e}function PreparedPart$InputPart(t,e,n){PreparedPart.call(this,t,n),this.provider=e}function PreparedPart$ChannelPart(t,e,n){PreparedPart.call(this,t,n),this.provider=e}function Coroutine$copyTo(t,e,n){CoroutineImpl.call(this,n),this.exceptionState_0=8,this.local$buffer=void 0,this.local$bytesWritten=void 0,this.local$$receiver=t,this.local$channel=e}function copyTo_1(t,e,n,i){var o=new Coroutine$copyTo(t,e,n);return i?o:o.doResume(null)}function get_port(t){return t.url.port}function header(t,e,n){null!=n&&t.headers.append_puj7f4$(e,n.toString())}function DefaultHttpResponse(t,e){var n,i;HttpResponse.call(this),this.call_9p3cfk$_0=t,this.coroutineContext_5l7f2v$_0=e.callContext,this.status_gsg6kc$_0=e.statusCode,this.version_vctfwy$_0=e.version,this.requestTime_34y64q$_0=e.requestTime,this.responseTime_u9wao0$_0=e.responseTime,this.content_7wqjir$_0=null!=(i=Kotlin.isType(n=e.body,ByteReadChannel)?n:null)?i:ByteReadChannel.Companion.Empty,this.headers_gyyq4g$_0=e.headers}function HttpResponse(){}function get_request(t){return t.call.request}function complete(t){var e;(Kotlin.isType(e=ensureNotNull(t.coroutineContext.get_j3r2sn$(Job.Key)),CompletableJob)?e:throwCCE()).complete()}function Coroutine$bodyAsText(t,e,n){CoroutineImpl.call(this,n),this.exceptionState_0=1,this.local$decoder=void 0,this.local$$receiver=t,this.local$fallbackCharset=e}function bodyAsText(t,e,n,i){var o=new Coroutine$bodyAsText(t,e,n);return i?o:o.doResume(null)}function HttpResponsePipeline(t){HttpResponsePipeline$Phases_getInstance(),void 0===t&&(t=!1),Pipeline.call(this,[HttpResponsePipeline$Phases_getInstance().Receive,HttpResponsePipeline$Phases_getInstance().Parse,HttpResponsePipeline$Phases_getInstance().Transform,HttpResponsePipeline$Phases_getInstance().State,HttpResponsePipeline$Phases_getInstance().After]),this.developmentMode_368lah$_0=t}function HttpResponsePipeline$Phases(){HttpResponsePipeline$Phases_instance=this,this.Receive=new PipelinePhase("Receive"),this.Parse=new PipelinePhase("Parse"),this.Transform=new PipelinePhase("Transform"),this.State=new PipelinePhase("State"),this.After=new PipelinePhase("After")}HttpSendPipeline.$metadata$={kind:Kind_CLASS,simpleName:"HttpSendPipeline",interfaces:[Pipeline]},defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.request_30bfl5$",wrapFunction((function(){var t=_.io.ktor.client.request.HttpRequestBuilder,e=_.io.ktor.client.statement.HttpStatement;return function(n,i,o){return void 0===i&&(i=new t),Kotlin.suspendCall(new e(i,n).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareRequest_30bfl5$",wrapFunction((function(){var t=_.io.ktor.client.request.HttpRequestBuilder,e=_.io.ktor.client.statement.HttpStatement;return function(n,i,o){return void 0===i&&(i=new t),new e(i,n)}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.request_uxii9k$",wrapFunction((function(){var t=_.io.ktor.client.request.HttpRequestBuilder,e=_.io.ktor.client.statement.HttpStatement;return function(n,i,o){var r=new t;return i(r),Kotlin.suspendCall(new e(r,n).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareRequest_uxii9k$",wrapFunction((function(){var t=_.io.ktor.client.request.HttpRequestBuilder,e=_.io.ktor.client.statement.HttpStatement;return function(n,i,o){var r=new t;return i(r),Kotlin.setCoroutineResult(new e(r,n),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.request_7cz7zq$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=_.io.ktor.client.request.url_g8iu3v$,n=_.io.ktor.client.request.HttpRequestBuilder,i=_.io.ktor.client.statement.HttpStatement;function o(e){return t}return function(t,r,a,s){void 0===a&&(a=o);var l=new n;return e(l,r),a(l),Kotlin.suspendCall(new i(l,t).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareRequest_7cz7zq$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=_.io.ktor.client.request.url_g8iu3v$,n=_.io.ktor.client.request.HttpRequestBuilder,i=_.io.ktor.client.statement.HttpStatement;function o(e){return t}return function(t,r,a,s){void 0===a&&(a=o);var l=new n;return e(l,r),a(l),Kotlin.setCoroutineResult(new i(l,t),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.request_9weqol$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=_.io.ktor.client.request.url_qpqkqe$,n=_.io.ktor.client.request.HttpRequestBuilder,i=_.io.ktor.client.statement.HttpStatement;function o(e){return t}return function(t,r,a,s){void 0===a&&(a=o);var l=new n;return e(l,r),a(l),Kotlin.suspendCall(new i(l,t).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareRequest_9weqol$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=_.io.ktor.client.request.url_qpqkqe$,n=_.io.ktor.client.request.HttpRequestBuilder,i=_.io.ktor.client.statement.HttpStatement;function o(e){return t}return function(t,r,a,s){void 0===a&&(a=o);var l=new n;return e(l,r),a(l),Kotlin.setCoroutineResult(new i(l,t),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.get_30bfl5$",wrapFunction((function(){var t=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,e=_.io.ktor.client.statement.HttpStatement;return function(n,i,o){return i.method=t.Companion.Get,Kotlin.suspendCall(new e(i,n).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.post_30bfl5$",wrapFunction((function(){var t=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,e=_.io.ktor.client.statement.HttpStatement;return function(n,i,o){return i.method=t.Companion.Post,Kotlin.suspendCall(new e(i,n).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.put_30bfl5$",wrapFunction((function(){var t=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,e=_.io.ktor.client.statement.HttpStatement;return function(n,i,o){return i.method=t.Companion.Put,Kotlin.suspendCall(new e(i,n).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.delete_30bfl5$",wrapFunction((function(){var t=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,e=_.io.ktor.client.statement.HttpStatement;return function(n,i,o){return i.method=t.Companion.Delete,Kotlin.suspendCall(new e(i,n).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.options_30bfl5$",wrapFunction((function(){var t=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,e=_.io.ktor.client.statement.HttpStatement;return function(n,i,o){return i.method=t.Companion.Options,Kotlin.suspendCall(new e(i,n).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.patch_30bfl5$",wrapFunction((function(){var t=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,e=_.io.ktor.client.statement.HttpStatement;return function(n,i,o){return i.method=t.Companion.Patch,Kotlin.suspendCall(new e(i,n).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.head_30bfl5$",wrapFunction((function(){var t=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,e=_.io.ktor.client.statement.HttpStatement;return function(n,i,o){return i.method=t.Companion.Head,Kotlin.suspendCall(new e(i,n).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareGet_30bfl5$",wrapFunction((function(){var t=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,e=_.io.ktor.client.statement.HttpStatement;return function(n,i,o){return i.method=t.Companion.Get,Kotlin.setCoroutineResult(new e(i,n),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.preparePost_30bfl5$",wrapFunction((function(){var t=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,e=_.io.ktor.client.statement.HttpStatement;return function(n,i,o){return i.method=t.Companion.Post,Kotlin.setCoroutineResult(new e(i,n),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.preparePut_30bfl5$",wrapFunction((function(){var t=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,e=_.io.ktor.client.statement.HttpStatement;return function(n,i,o){return i.method=t.Companion.Put,Kotlin.setCoroutineResult(new e(i,n),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareDelete_30bfl5$",wrapFunction((function(){var t=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,e=_.io.ktor.client.statement.HttpStatement;return function(n,i,o){return i.method=t.Companion.Delete,Kotlin.setCoroutineResult(new e(i,n),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareOptions_30bfl5$",wrapFunction((function(){var t=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,e=_.io.ktor.client.statement.HttpStatement;return function(n,i,o){return i.method=t.Companion.Options,Kotlin.setCoroutineResult(new e(i,n),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.preparePatch_30bfl5$",wrapFunction((function(){var t=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,e=_.io.ktor.client.statement.HttpStatement;return function(n,i,o){return i.method=t.Companion.Patch,Kotlin.setCoroutineResult(new e(i,n),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareHead_30bfl5$",wrapFunction((function(){var t=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,e=_.io.ktor.client.statement.HttpStatement;return function(n,i,o){return i.method=t.Companion.Head,Kotlin.setCoroutineResult(new e(i,n),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.get_uxii9k$",wrapFunction((function(){var t=_.io.ktor.client.request.HttpRequestBuilder,e=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,n=_.io.ktor.client.statement.HttpStatement;return function(i,o,r){var a=new t;return o(a),a.method=e.Companion.Get,Kotlin.suspendCall(new n(a,i).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.post_uxii9k$",wrapFunction((function(){var t=_.io.ktor.client.request.HttpRequestBuilder,e=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,n=_.io.ktor.client.statement.HttpStatement;return function(i,o,r){var a=new t;return o(a),a.method=e.Companion.Post,Kotlin.suspendCall(new n(a,i).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.put_uxii9k$",wrapFunction((function(){var t=_.io.ktor.client.request.HttpRequestBuilder,e=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,n=_.io.ktor.client.statement.HttpStatement;return function(i,o,r){var a=new t;return o(a),a.method=e.Companion.Put,Kotlin.suspendCall(new n(a,i).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.delete_uxii9k$",wrapFunction((function(){var t=_.io.ktor.client.request.HttpRequestBuilder,e=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,n=_.io.ktor.client.statement.HttpStatement;return function(i,o,r){var a=new t;return o(a),a.method=e.Companion.Delete,Kotlin.suspendCall(new n(a,i).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.options_uxii9k$",wrapFunction((function(){var t=_.io.ktor.client.request.HttpRequestBuilder,e=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,n=_.io.ktor.client.statement.HttpStatement;return function(i,o,r){var a=new t;return o(a),a.method=e.Companion.Options,Kotlin.suspendCall(new n(a,i).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.patch_uxii9k$",wrapFunction((function(){var t=_.io.ktor.client.request.HttpRequestBuilder,e=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,n=_.io.ktor.client.statement.HttpStatement;return function(i,o,r){var a=new t;return o(a),a.method=e.Companion.Patch,Kotlin.suspendCall(new n(a,i).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.head_uxii9k$",wrapFunction((function(){var t=_.io.ktor.client.request.HttpRequestBuilder,e=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,n=_.io.ktor.client.statement.HttpStatement;return function(i,o,r){var a=new t;return o(a),a.method=e.Companion.Head,Kotlin.suspendCall(new n(a,i).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareGet_uxii9k$",wrapFunction((function(){var t=_.io.ktor.client.request.HttpRequestBuilder,e=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,n=_.io.ktor.client.statement.HttpStatement;return function(i,o,r){var a=new t;return o(a),a.method=e.Companion.Get,Kotlin.setCoroutineResult(new n(a,i),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.preparePost_uxii9k$",wrapFunction((function(){var t=_.io.ktor.client.request.HttpRequestBuilder,e=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,n=_.io.ktor.client.statement.HttpStatement;return function(i,o,r){var a=new t;return o(a),a.method=e.Companion.Post,Kotlin.setCoroutineResult(new n(a,i),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.preparePut_uxii9k$",wrapFunction((function(){var t=_.io.ktor.client.request.HttpRequestBuilder,e=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,n=_.io.ktor.client.statement.HttpStatement;return function(i,o,r){var a=new t;return o(a),a.method=e.Companion.Put,Kotlin.setCoroutineResult(new n(a,i),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareDelete_uxii9k$",wrapFunction((function(){var t=_.io.ktor.client.request.HttpRequestBuilder,e=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,n=_.io.ktor.client.statement.HttpStatement;return function(i,o,r){var a=new t;return o(a),a.method=e.Companion.Delete,Kotlin.setCoroutineResult(new n(a,i),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareOptions_uxii9k$",wrapFunction((function(){var t=_.io.ktor.client.request.HttpRequestBuilder,e=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,n=_.io.ktor.client.statement.HttpStatement;return function(i,o,r){var a=new t;return o(a),a.method=e.Companion.Options,Kotlin.setCoroutineResult(new n(a,i),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.preparePatch_uxii9k$",wrapFunction((function(){var t=_.io.ktor.client.request.HttpRequestBuilder,e=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,n=_.io.ktor.client.statement.HttpStatement;return function(i,o,r){var a=new t;return o(a),a.method=e.Companion.Patch,Kotlin.setCoroutineResult(new n(a,i),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareHead_uxii9k$",wrapFunction((function(){var t=_.io.ktor.client.request.HttpRequestBuilder,e=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,n=_.io.ktor.client.statement.HttpStatement;return function(i,o,r){var a=new t;return o(a),a.method=e.Companion.Head,Kotlin.setCoroutineResult(new n(a,i),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.get_7cz7zq$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=_.io.ktor.client.request.url_g8iu3v$,n=_.io.ktor.client.request.HttpRequestBuilder,i=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=_.io.ktor.client.statement.HttpStatement;function r(e){return t}return function(t,a,s,l){void 0===s&&(s=r);var u=new n;return e(u,a),s(u),u.method=i.Companion.Get,Kotlin.suspendCall(new o(u,t).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.post_7cz7zq$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=_.io.ktor.client.request.url_g8iu3v$,n=_.io.ktor.client.request.HttpRequestBuilder,i=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=_.io.ktor.client.statement.HttpStatement;function r(e){return t}return function(t,a,s,l){void 0===s&&(s=r);var u=new n;return e(u,a),s(u),u.method=i.Companion.Post,Kotlin.suspendCall(new o(u,t).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.put_7cz7zq$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=_.io.ktor.client.request.url_g8iu3v$,n=_.io.ktor.client.request.HttpRequestBuilder,i=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=_.io.ktor.client.statement.HttpStatement;function r(e){return t}return function(t,a,s,l){void 0===s&&(s=r);var u=new n;return e(u,a),s(u),u.method=i.Companion.Put,Kotlin.suspendCall(new o(u,t).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.delete_7cz7zq$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=_.io.ktor.client.request.url_g8iu3v$,n=_.io.ktor.client.request.HttpRequestBuilder,i=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=_.io.ktor.client.statement.HttpStatement;function r(e){return t}return function(t,a,s,l){void 0===s&&(s=r);var u=new n;return e(u,a),s(u),u.method=i.Companion.Delete,Kotlin.suspendCall(new o(u,t).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.options_7cz7zq$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=_.io.ktor.client.request.url_g8iu3v$,n=_.io.ktor.client.request.HttpRequestBuilder,i=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=_.io.ktor.client.statement.HttpStatement;function r(e){return t}return function(t,a,s,l){void 0===s&&(s=r);var u=new n;return e(u,a),s(u),u.method=i.Companion.Options,Kotlin.suspendCall(new o(u,t).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.patch_7cz7zq$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=_.io.ktor.client.request.url_g8iu3v$,n=_.io.ktor.client.request.HttpRequestBuilder,i=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=_.io.ktor.client.statement.HttpStatement;function r(e){return t}return function(t,a,s,l){void 0===s&&(s=r);var u=new n;return e(u,a),s(u),u.method=i.Companion.Patch,Kotlin.suspendCall(new o(u,t).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.head_7cz7zq$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=_.io.ktor.client.request.url_g8iu3v$,n=_.io.ktor.client.request.HttpRequestBuilder,i=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=_.io.ktor.client.statement.HttpStatement;function r(e){return t}return function(t,a,s,l){void 0===s&&(s=r);var u=new n;return e(u,a),s(u),u.method=i.Companion.Head,Kotlin.suspendCall(new o(u,t).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareGet_7cz7zq$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=_.io.ktor.client.request.url_g8iu3v$,n=_.io.ktor.client.request.HttpRequestBuilder,i=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=_.io.ktor.client.statement.HttpStatement;function r(e){return t}return function(t,a,s,l){void 0===s&&(s=r);var u=new n;return e(u,a),s(u),u.method=i.Companion.Get,Kotlin.setCoroutineResult(new o(u,t),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.preparePost_7cz7zq$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=_.io.ktor.client.request.url_g8iu3v$,n=_.io.ktor.client.request.HttpRequestBuilder,i=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=_.io.ktor.client.statement.HttpStatement;function r(e){return t}return function(t,a,s,l){void 0===s&&(s=r);var u=new n;return e(u,a),s(u),u.method=i.Companion.Post,Kotlin.setCoroutineResult(new o(u,t),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.preparePut_7cz7zq$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=_.io.ktor.client.request.url_g8iu3v$,n=_.io.ktor.client.request.HttpRequestBuilder,i=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=_.io.ktor.client.statement.HttpStatement;function r(e){return t}return function(t,a,s,l){void 0===s&&(s=r);var u=new n;return e(u,a),s(u),u.method=i.Companion.Put,Kotlin.setCoroutineResult(new o(u,t),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareDelete_7cz7zq$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=_.io.ktor.client.request.url_g8iu3v$,n=_.io.ktor.client.request.HttpRequestBuilder,i=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=_.io.ktor.client.statement.HttpStatement;function r(e){return t}return function(t,a,s,l){void 0===s&&(s=r);var u=new n;return e(u,a),s(u),u.method=i.Companion.Delete,Kotlin.setCoroutineResult(new o(u,t),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareOptions_7cz7zq$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=_.io.ktor.client.request.url_g8iu3v$,n=_.io.ktor.client.request.HttpRequestBuilder,i=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=_.io.ktor.client.statement.HttpStatement;function r(e){return t}return function(t,a,s,l){void 0===s&&(s=r);var u=new n;return e(u,a),s(u),u.method=i.Companion.Options,Kotlin.setCoroutineResult(new o(u,t),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.preparePatch_7cz7zq$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=_.io.ktor.client.request.url_g8iu3v$,n=_.io.ktor.client.request.HttpRequestBuilder,i=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=_.io.ktor.client.statement.HttpStatement;function r(e){return t}return function(t,a,s,l){void 0===s&&(s=r);var u=new n;return e(u,a),s(u),u.method=i.Companion.Patch,Kotlin.setCoroutineResult(new o(u,t),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareHead_7cz7zq$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=_.io.ktor.client.request.url_g8iu3v$,n=_.io.ktor.client.request.HttpRequestBuilder,i=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=_.io.ktor.client.statement.HttpStatement;function r(e){return t}return function(t,a,s,l){void 0===s&&(s=r);var u=new n;return e(u,a),s(u),u.method=i.Companion.Head,Kotlin.setCoroutineResult(new o(u,t),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.get_9weqol$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.takeFrom_wol2ee$,n=_.io.ktor.client.request.HttpRequestBuilder,i=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=_.io.ktor.client.statement.HttpStatement;function r(e){return t}return function(t,a,s,l){void 0===s&&(s=r);var u=new n;return e(u.url,a),s(u),u.method=i.Companion.Get,Kotlin.suspendCall(new o(u,t).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareGet_9weqol$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.takeFrom_wol2ee$,n=_.io.ktor.client.request.HttpRequestBuilder,i=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=_.io.ktor.client.statement.HttpStatement;function r(e){return t}return function(t,a,s,l){void 0===s&&(s=r);var u=new n;return e(u.url,a),s(u),u.method=i.Companion.Get,Kotlin.setCoroutineResult(new o(u,t),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.post_9weqol$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.takeFrom_wol2ee$,n=_.io.ktor.client.request.HttpRequestBuilder,i=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=_.io.ktor.client.statement.HttpStatement;function r(e){return t}return function(t,a,s,l){void 0===s&&(s=r);var u=new n;return e(u.url,a),s(u),u.method=i.Companion.Post,Kotlin.suspendCall(new o(u,t).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.preparePost_9weqol$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.takeFrom_wol2ee$,n=_.io.ktor.client.request.HttpRequestBuilder,i=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=_.io.ktor.client.statement.HttpStatement;function r(e){return t}return function(t,a,s,l){void 0===s&&(s=r);var u=new n;return e(u.url,a),s(u),u.method=i.Companion.Post,Kotlin.setCoroutineResult(new o(u,t),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.put_9weqol$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.takeFrom_wol2ee$,n=_.io.ktor.client.request.HttpRequestBuilder,i=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=_.io.ktor.client.statement.HttpStatement;function r(e){return t}return function(t,a,s,l){void 0===s&&(s=r);var u=new n;return e(u.url,a),s(u),u.method=i.Companion.Put,Kotlin.suspendCall(new o(u,t).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.preparePut_9weqol$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.takeFrom_wol2ee$,n=_.io.ktor.client.request.HttpRequestBuilder,i=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=_.io.ktor.client.statement.HttpStatement;function r(e){return t}return function(t,a,s,l){void 0===s&&(s=r);var u=new n;return e(u.url,a),s(u),u.method=i.Companion.Put,Kotlin.setCoroutineResult(new o(u,t),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.patch_9weqol$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.takeFrom_wol2ee$,n=_.io.ktor.client.request.HttpRequestBuilder,i=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=_.io.ktor.client.statement.HttpStatement;function r(e){return t}return function(t,a,s,l){void 0===s&&(s=r);var u=new n;return e(u.url,a),s(u),u.method=i.Companion.Patch,Kotlin.suspendCall(new o(u,t).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.preparePatch_9weqol$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.takeFrom_wol2ee$,n=_.io.ktor.client.request.HttpRequestBuilder,i=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=_.io.ktor.client.statement.HttpStatement;function r(e){return t}return function(t,a,s,l){void 0===s&&(s=r);var u=new n;return e(u.url,a),s(u),u.method=i.Companion.Patch,Kotlin.setCoroutineResult(new o(u,t),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.options_9weqol$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.takeFrom_wol2ee$,n=_.io.ktor.client.request.HttpRequestBuilder,i=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=_.io.ktor.client.statement.HttpStatement;function r(e){return t}return function(t,a,s,l){void 0===s&&(s=r);var u=new n;return e(u.url,a),s(u),u.method=i.Companion.Options,Kotlin.suspendCall(new o(u,t).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareOptions_9weqol$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.takeFrom_wol2ee$,n=_.io.ktor.client.request.HttpRequestBuilder,i=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=_.io.ktor.client.statement.HttpStatement;function r(e){return t}return function(t,a,s,l){void 0===s&&(s=r);var u=new n;return e(u.url,a),s(u),u.method=i.Companion.Options,Kotlin.setCoroutineResult(new o(u,t),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.head_9weqol$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.takeFrom_wol2ee$,n=_.io.ktor.client.request.HttpRequestBuilder,i=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=_.io.ktor.client.statement.HttpStatement;function r(e){return t}return function(t,a,s,l){void 0===s&&(s=r);var u=new n;return e(u.url,a),s(u),u.method=i.Companion.Head,Kotlin.suspendCall(new o(u,t).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareHead_9weqol$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.takeFrom_wol2ee$,n=_.io.ktor.client.request.HttpRequestBuilder,i=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=_.io.ktor.client.statement.HttpStatement;function r(e){return t}return function(t,a,s,l){void 0===s&&(s=r);var u=new n;return e(u.url,a),s(u),u.method=i.Companion.Head,Kotlin.setCoroutineResult(new o(u,t),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.delete_9weqol$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.takeFrom_wol2ee$,n=_.io.ktor.client.request.HttpRequestBuilder,i=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=_.io.ktor.client.statement.HttpStatement;function r(e){return t}return function(t,a,s,l){void 0===s&&(s=r);var u=new n;return e(u.url,a),s(u),u.method=i.Companion.Delete,Kotlin.suspendCall(new o(u,t).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.prepareDelete_9weqol$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.takeFrom_wol2ee$,n=_.io.ktor.client.request.HttpRequestBuilder,i=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=_.io.ktor.client.statement.HttpStatement;function r(e){return t}return function(t,a,s,l){void 0===s&&(s=r);var u=new n;return e(u.url,a),s(u),u.method=i.Companion.Delete,Kotlin.setCoroutineResult(new o(u,t),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),Object.defineProperty(FormDataContent.prototype,"contentLength",{configurable:!0,get:function(){return this.contentLength_f2tvnf$_0}}),Object.defineProperty(FormDataContent.prototype,"contentType",{configurable:!0,get:function(){return this.contentType_gyve29$_0}}),FormDataContent.prototype.bytes=function(){return this.content_0},FormDataContent.$metadata$={kind:Kind_CLASS,simpleName:"FormDataContent",interfaces:[OutgoingContent$ByteArrayContent]},Object.defineProperty(MultiPartFormDataContent.prototype,"contentType",{get:function(){return this.contentType_azd2en$_0}}),Object.defineProperty(MultiPartFormDataContent.prototype,"contentLength",{configurable:!0,get:function(){return this.contentLength_egukxp$_0}}),Coroutine$writeTo_h3x4ir$.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$writeTo_h3x4ir$.prototype=Object.create(CoroutineImpl.prototype),Coroutine$writeTo_h3x4ir$.prototype.constructor=Coroutine$writeTo_h3x4ir$,Coroutine$writeTo_h3x4ir$.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.exceptionState_0=15,this.local$tmp$=this.$this.rawParts_0.iterator(),this.state_0=1;continue;case 1:if(!this.local$tmp$.hasNext()){this.state_0=13;continue}if(this.local$part=this.local$tmp$.next(),this.state_0=2,this.result_0=writeFully(this.local$channel,this.$this.BOUNDARY_BYTES_0,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 2:if(this.state_0=3,this.result_0=writeFully(this.local$channel,this.local$part.headers,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 3:if(this.state_0=4,this.result_0=writeFully(this.local$channel,RN_BYTES,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 4:if(Kotlin.isType(this.local$part,PreparedPart$InputPart)){if(this.local$$receiver=this.local$part.provider(),this.local$closed=!1,this.exceptionState_0=8,this.state_0=7,this.result_0=copyTo_1(this.local$$receiver,this.local$channel,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue}if(Kotlin.isType(this.local$part,PreparedPart$ChannelPart)){if(this.state_0=5,this.result_0=copyTo_0(this.local$part.provider(),this.local$channel,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue}Kotlin.noWhenBranchMatched(),this.state_0=6;continue;case 5:this.state_0=6;continue;case 6:case 10:this.state_0=11;continue;case 7:this.exceptionState_0=15,this.finallyPath_0=[10],this.state_0=9;continue;case 8:this.finallyPath_0=[15],this.exceptionState_0=9;var t=this.exception_0;if(Kotlin.isType(t,Throwable)){try{this.local$closed=!0,this.local$$receiver.close()}catch(e){if(!Kotlin.isType(e,Throwable))throw e;addSuppressedInternal(t,e)}throw t}throw t;case 9:this.exceptionState_0=15,this.local$closed||this.local$$receiver.close(),this.state_0=this.finallyPath_0.shift();continue;case 11:if(this.state_0=12,this.result_0=writeFully(this.local$channel,RN_BYTES,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 12:this.state_0=1;continue;case 13:if(this.state_0=14,this.result_0=writeFully(this.local$channel,this.$this.LAST_BOUNDARY_BYTES_0,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 14:this.exceptionState_0=18,this.finallyPath_0=[17],this.state_0=16;continue;case 15:this.finallyPath_0=[18],this.exceptionState_0=16;var e=this.exception_0;if(!Kotlin.isType(e,Throwable))throw e;this.local$channel.close_dbl4no$(e),this.finallyPath_0=[17],this.state_0=16;continue;case 16:this.exceptionState_0=18,close_0(this.local$channel),this.state_0=this.finallyPath_0.shift();continue;case 17:return;case 18:throw this.exception_0;default:throw this.state_0=18,new Error("State Machine Unreachable execution")}}catch(t){if(18===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},MultiPartFormDataContent.prototype.writeTo_h3x4ir$=function(t,e,n){var i=new Coroutine$writeTo_h3x4ir$(this,t,e);return n?i:i.doResume(null)},MultiPartFormDataContent.$metadata$={kind:Kind_CLASS,simpleName:"MultiPartFormDataContent",interfaces:[OutgoingContent$WriteChannelContent]},PreparedPart$InputPart.$metadata$={kind:Kind_CLASS,simpleName:"InputPart",interfaces:[PreparedPart]},PreparedPart$ChannelPart.$metadata$={kind:Kind_CLASS,simpleName:"ChannelPart",interfaces:[PreparedPart]},PreparedPart.$metadata$={kind:Kind_CLASS,simpleName:"PreparedPart",interfaces:[]},Coroutine$copyTo.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$copyTo.prototype=Object.create(CoroutineImpl.prototype),Coroutine$copyTo.prototype.constructor=Coroutine$copyTo,Coroutine$copyTo.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(Kotlin.isType(this.local$$receiver,ByteReadPacket)){if(this.state_0=1,this.result_0=this.local$channel.writePacket_3uq2w4$(this.local$$receiver,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue}this.state_0=2;continue;case 1:case 10:return;case 2:case 9:this.state_0=3;continue;case 3:if(this.local$$receiver.endOfInput){this.state_0=10;continue}var t;if(this.state_0=4,this.result_0=requestWriteBuffer(this.local$channel,1,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 4:this.local$buffer=null!=(t=this.result_0)?t:Buffer.Companion.Empty,this.local$bytesWritten=0,this.exceptionState_0=5;var e=this.local$buffer.memory,n=Kotlin.Long.fromInt(this.local$buffer.writePosition);this.local$bytesWritten=readAvailable(this.local$$receiver,e,n,Kotlin.Long.fromInt(this.local$buffer.limit).subtract(n)).toInt(),this.local$buffer.commitWritten_za3lpa$(this.local$bytesWritten),this.result_0=this.local$bytesWritten,this.exceptionState_0=8,this.finallyPath_0=[9],this.state_0=6;continue;case 5:this.finallyPath_0=[8],this.state_0=6;continue;case 6:if(this.exceptionState_0=8,this.state_0=7,this.result_0=completeWriting(this.local$channel,this.local$buffer,this.local$bytesWritten,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 7:this.state_0=this.finallyPath_0.shift();continue;case 8:throw this.exception_0;default:throw this.state_0=8,new Error("State Machine Unreachable execution")}}catch(t){if(8===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.forms.submitForm_9i20zh$",wrapFunction((function(){var t=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.Parameters,e=Kotlin.kotlin.Unit,n=Kotlin.wrapFunction,i=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=_.io.ktor.client.request.forms.FormDataContent,r=Kotlin.getKClass,a=Kotlin.createKType,s=_.io.ktor.client.request.HttpRequestBuilder,l=_.io.ktor.client.statement.HttpStatement,u=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content,c=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content.OutgoingContent,p=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,h=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,d=Error;function f(t){return e}return n((function(){var t=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content,n=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content.OutgoingContent,s=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,l=Kotlin.getKClass,u=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,c=Error;return function(p,h,_){return function(d){if(p)d.method=i.Companion.Get,d.url.parameters.appendAll_hb0ubp$(h);else{d.method=i.Companion.Post;var f=new o(h);if(null==f){d.body=t.NullBody;var m,$=s.JsType,y=l(o);t:do{try{m=a(r(o),[],!1)}catch(t){if(Kotlin.isType(t,c)){m=null;break t}throw t}}while(0);d.bodyType=u($,y,m)}else if(Kotlin.isType(f,n))d.body=f,d.bodyType=null;else{d.body=f;var g,v=s.JsType,b=l(o);t:do{try{g=a(r(o),[],!1)}catch(t){if(Kotlin.isType(t,c)){g=null;break t}throw t}}while(0);d.bodyType=u(v,b,g)}}return _(d),e}}})),function(e,n,_,m,$){void 0===n&&(n=t.Companion.Empty),void 0===_&&(_=!1),void 0===m&&(m=f);var y=new s;if(_)y.method=i.Companion.Get,y.url.parameters.appendAll_hb0ubp$(n);else{y.method=i.Companion.Post;var g=new o(n);if(null==g){y.body=u.NullBody;var v,b=p.JsType,w=r(o);t:do{try{v=a(r(o),[],!1)}catch(t){if(Kotlin.isType(t,d)){v=null;break t}throw t}}while(0);y.bodyType=h(b,w,v)}else if(Kotlin.isType(g,c))y.body=g,y.bodyType=null;else{y.body=g;var x,k=p.JsType,C=r(o);t:do{try{x=a(r(o),[],!1)}catch(t){if(Kotlin.isType(t,d)){x=null;break t}throw t}}while(0);y.bodyType=h(k,C,x)}}return m(y),Kotlin.suspendCall(new l(y,e).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.forms.submitFormWithBinaryData_ln1qgv$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=Kotlin.wrapFunction,n=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,i=_.io.ktor.client.request.forms.MultiPartFormDataContent,o=Kotlin.getKClass,r=Kotlin.createKType,a=_.io.ktor.client.request.HttpRequestBuilder,s=_.io.ktor.client.statement.HttpStatement,l=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content,u=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content.OutgoingContent,c=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,p=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,h=Error;function d(e){return t}return e((function(){var e=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content,a=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content.OutgoingContent,s=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,l=Kotlin.getKClass,u=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,c=Error;return function(p,h){return function(_){_.method=n.Companion.Post;var d=new i(p);if(null==d){_.body=e.NullBody;var f,m=s.JsType,$=l(i);t:do{try{f=r(o(i),[],!1)}catch(t){if(Kotlin.isType(t,c)){f=null;break t}throw t}}while(0);_.bodyType=u(m,$,f)}else if(Kotlin.isType(d,a))_.body=d,_.bodyType=null;else{_.body=d;var y,g=s.JsType,v=l(i);t:do{try{y=r(o(i),[],!1)}catch(t){if(Kotlin.isType(t,c)){y=null;break t}throw t}}while(0);_.bodyType=u(g,v,y)}return h(_),t}}})),function(t,e,_,f){void 0===_&&(_=d);var m=new a;m.method=n.Companion.Post;var $=new i(e);if(null==$){m.body=l.NullBody;var y,g=c.JsType,v=o(i);t:do{try{y=r(o(i),[],!1)}catch(t){if(Kotlin.isType(t,h)){y=null;break t}throw t}}while(0);m.bodyType=p(g,v,y)}else if(Kotlin.isType($,u))m.body=$,m.bodyType=null;else{m.body=$;var b,w=c.JsType,x=o(i);t:do{try{b=r(o(i),[],!1)}catch(t){if(Kotlin.isType(t,h)){b=null;break t}throw t}}while(0);m.bodyType=p(w,x,b)}return _(m),Kotlin.suspendCall(new s(m,t).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.forms.submitFormWithBinaryData_rrwb9t$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=Kotlin.wrapFunction,n=_.io.ktor.client.request.url_g8iu3v$,i=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=_.io.ktor.client.request.forms.MultiPartFormDataContent,r=Kotlin.getKClass,a=Kotlin.createKType,s=_.io.ktor.client.request.HttpRequestBuilder,l=_.io.ktor.client.statement.HttpStatement,u=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content,c=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content.OutgoingContent,p=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,h=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,d=Error;function f(e){return t}return e((function(){var e=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content,n=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content.OutgoingContent,s=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,l=Kotlin.getKClass,u=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,c=Error;return function(p,h){return function(_){_.method=i.Companion.Post;var d=new o(p);if(null==d){_.body=e.NullBody;var f,m=s.JsType,$=l(o);t:do{try{f=a(r(o),[],!1)}catch(t){if(Kotlin.isType(t,c)){f=null;break t}throw t}}while(0);_.bodyType=u(m,$,f)}else if(Kotlin.isType(d,n))_.body=d,_.bodyType=null;else{_.body=d;var y,g=s.JsType,v=l(o);t:do{try{y=a(r(o),[],!1)}catch(t){if(Kotlin.isType(t,c)){y=null;break t}throw t}}while(0);_.bodyType=u(g,v,y)}return h(_),t}}})),function(t,e,_,m,$){void 0===m&&(m=f);var y=new s;y.method=i.Companion.Post;var g=new o(_);if(null==g){y.body=u.NullBody;var v,b=p.JsType,w=r(o);t:do{try{v=a(r(o),[],!1)}catch(t){if(Kotlin.isType(t,d)){v=null;break t}throw t}}while(0);y.bodyType=h(b,w,v)}else if(Kotlin.isType(g,c))y.body=g,y.bodyType=null;else{y.body=g;var x,k=p.JsType,C=r(o);t:do{try{x=a(r(o),[],!1)}catch(t){if(Kotlin.isType(t,d)){x=null;break t}throw t}}while(0);y.bodyType=h(k,C,x)}return n(y,e),m(y),Kotlin.suspendCall(new l(y,t).execute(Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.forms.prepareForm_9i20zh$",wrapFunction((function(){var t=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.Parameters,e=Kotlin.kotlin.Unit,n=Kotlin.wrapFunction,i=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=_.io.ktor.client.request.forms.FormDataContent,r=Kotlin.getKClass,a=Kotlin.createKType,s=_.io.ktor.client.request.HttpRequestBuilder,l=_.io.ktor.client.statement.HttpStatement,u=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content,c=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content.OutgoingContent,p=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,h=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,d=Error;function f(t){return e}return n((function(){var t=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content,n=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content.OutgoingContent,s=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,l=Kotlin.getKClass,u=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,c=Error;return function(p,h,_){return function(d){if(p)d.method=i.Companion.Get,d.url.parameters.appendAll_hb0ubp$(h);else{d.method=i.Companion.Post;var f=new o(h);if(null==f){d.body=t.NullBody;var m,$=s.JsType,y=l(o);t:do{try{m=a(r(o),[],!1)}catch(t){if(Kotlin.isType(t,c)){m=null;break t}throw t}}while(0);d.bodyType=u($,y,m)}else if(Kotlin.isType(f,n))d.body=f,d.bodyType=null;else{d.body=f;var g,v=s.JsType,b=l(o);t:do{try{g=a(r(o),[],!1)}catch(t){if(Kotlin.isType(t,c)){g=null;break t}throw t}}while(0);d.bodyType=u(v,b,g)}}return _(d),e}}})),function(e,n,_,m,$){void 0===n&&(n=t.Companion.Empty),void 0===_&&(_=!1),void 0===m&&(m=f);var y=new s;if(_)y.method=i.Companion.Get,y.url.parameters.appendAll_hb0ubp$(n);else{y.method=i.Companion.Post;var g=new o(n);if(null==g){y.body=u.NullBody;var v,b=p.JsType,w=r(o);t:do{try{v=a(r(o),[],!1)}catch(t){if(Kotlin.isType(t,d)){v=null;break t}throw t}}while(0);y.bodyType=h(b,w,v)}else if(Kotlin.isType(g,c))y.body=g,y.bodyType=null;else{y.body=g;var x,k=p.JsType,C=r(o);t:do{try{x=a(r(o),[],!1)}catch(t){if(Kotlin.isType(t,d)){x=null;break t}throw t}}while(0);y.bodyType=h(k,C,x)}}return m(y),Kotlin.setCoroutineResult(new l(y,e),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.forms.prepareFormWithBinaryData_ln1qgv$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=Kotlin.wrapFunction,n=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,i=_.io.ktor.client.request.forms.MultiPartFormDataContent,o=Kotlin.getKClass,r=Kotlin.createKType,a=_.io.ktor.client.request.HttpRequestBuilder,s=_.io.ktor.client.statement.HttpStatement,l=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content,u=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content.OutgoingContent,c=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,p=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,h=Error;function d(e){return t}return e((function(){var e=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content,a=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content.OutgoingContent,s=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,l=Kotlin.getKClass,u=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,c=Error;return function(p,h){return function(_){_.method=n.Companion.Post;var d=new i(p);if(null==d){_.body=e.NullBody;var f,m=s.JsType,$=l(i);t:do{try{f=r(o(i),[],!1)}catch(t){if(Kotlin.isType(t,c)){f=null;break t}throw t}}while(0);_.bodyType=u(m,$,f)}else if(Kotlin.isType(d,a))_.body=d,_.bodyType=null;else{_.body=d;var y,g=s.JsType,v=l(i);t:do{try{y=r(o(i),[],!1)}catch(t){if(Kotlin.isType(t,c)){y=null;break t}throw t}}while(0);_.bodyType=u(g,v,y)}return h(_),t}}})),function(t,e,_,f){void 0===_&&(_=d);var m=new a;m.method=n.Companion.Post;var $=new i(e);if(null==$){m.body=l.NullBody;var y,g=c.JsType,v=o(i);t:do{try{y=r(o(i),[],!1)}catch(t){if(Kotlin.isType(t,h)){y=null;break t}throw t}}while(0);m.bodyType=p(g,v,y)}else if(Kotlin.isType($,u))m.body=$,m.bodyType=null;else{m.body=$;var b,w=c.JsType,x=o(i);t:do{try{b=r(o(i),[],!1)}catch(t){if(Kotlin.isType(t,h)){b=null;break t}throw t}}while(0);m.bodyType=p(w,x,b)}return _(m),Kotlin.setCoroutineResult(new s(m,t),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.request.forms.prepareFormWithBinaryData_rrwb9t$",wrapFunction((function(){var t=Kotlin.kotlin.Unit,e=Kotlin.wrapFunction,n=_.io.ktor.client.request.url_g8iu3v$,i=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,o=_.io.ktor.client.request.forms.MultiPartFormDataContent,r=Kotlin.getKClass,a=Kotlin.createKType,s=_.io.ktor.client.request.HttpRequestBuilder,l=_.io.ktor.client.statement.HttpStatement,u=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content,c=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content.OutgoingContent,p=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,h=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,d=Error;function f(e){return t}function m(e,i){return function(o){return n(o,e),i(o),t}}return e((function(){var e=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content,n=_.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content.OutgoingContent,s=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,l=Kotlin.getKClass,u=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,c=Error;return function(p,h){return function(_){_.method=i.Companion.Post;var d=new o(p);if(null==d){_.body=e.NullBody;var f,m=s.JsType,$=l(o);t:do{try{f=a(r(o),[],!1)}catch(t){if(Kotlin.isType(t,c)){f=null;break t}throw t}}while(0);_.bodyType=u(m,$,f)}else if(Kotlin.isType(d,n))_.body=d,_.bodyType=null;else{_.body=d;var y,g=s.JsType,v=l(o);t:do{try{y=a(r(o),[],!1)}catch(t){if(Kotlin.isType(t,c)){y=null;break t}throw t}}while(0);_.bodyType=u(g,v,y)}return h(_),t}}})),function(t,e,n,_,$){void 0===_&&(_=f);var y=new s;y.method=i.Companion.Post;var g=new o(n);if(null==g){y.body=u.NullBody;var v,b=p.JsType,w=r(o);t:do{try{v=a(r(o),[],!1)}catch(t){if(Kotlin.isType(t,d)){v=null;break t}throw t}}while(0);y.bodyType=h(b,w,v)}else if(Kotlin.isType(g,c))y.body=g,y.bodyType=null;else{y.body=g;var x,k=p.JsType,C=r(o);t:do{try{x=a(r(o),[],!1)}catch(t){if(Kotlin.isType(t,d)){x=null;break t}throw t}}while(0);y.bodyType=h(k,C,x)}return m(e,_)(y),Kotlin.setCoroutineResult(new l(y,t),Kotlin.coroutineReceiver()),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.statement.receive_n40086$",wrapFunction((function(){var t=Kotlin.kotlin.IllegalStateException_init_pdl1vj$;return function(e,n,i,o){throw t("Use `body` method instead".toString())}}))),defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.statement.receive_wkua8a$",wrapFunction((function(){var t=Kotlin.kotlin.IllegalStateException_init_pdl1vj$;return function(e,n,i,o,r){throw t("Use `body` method instead".toString())}}))),Object.defineProperty(DefaultHttpResponse.prototype,"call",{get:function(){return this.call_9p3cfk$_0}}),Object.defineProperty(DefaultHttpResponse.prototype,"coroutineContext",{configurable:!0,get:function(){return this.coroutineContext_5l7f2v$_0}}),Object.defineProperty(DefaultHttpResponse.prototype,"status",{configurable:!0,get:function(){return this.status_gsg6kc$_0}}),Object.defineProperty(DefaultHttpResponse.prototype,"version",{configurable:!0,get:function(){return this.version_vctfwy$_0}}),Object.defineProperty(DefaultHttpResponse.prototype,"requestTime",{configurable:!0,get:function(){return this.requestTime_34y64q$_0}}),Object.defineProperty(DefaultHttpResponse.prototype,"responseTime",{configurable:!0,get:function(){return this.responseTime_u9wao0$_0}}),Object.defineProperty(DefaultHttpResponse.prototype,"content",{configurable:!0,get:function(){return this.content_7wqjir$_0}}),Object.defineProperty(DefaultHttpResponse.prototype,"headers",{configurable:!0,get:function(){return this.headers_gyyq4g$_0}}),DefaultHttpResponse.$metadata$={kind:Kind_CLASS,simpleName:"DefaultHttpResponse",interfaces:[HttpResponse]},HttpResponse.prototype.toString=function(){return"HttpResponse["+get_request(this).url+", "+this.status+"]"},HttpResponse.$metadata$={kind:Kind_CLASS,simpleName:"HttpResponse",interfaces:[CoroutineScope,HttpMessage]},Coroutine$bodyAsText.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$bodyAsText.prototype=Object.create(CoroutineImpl.prototype),Coroutine$bodyAsText.prototype.constructor=Coroutine$bodyAsText,Coroutine$bodyAsText.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;void 0===this.local$fallbackCharset&&(this.local$fallbackCharset=charsets.Charsets.UTF_8);var e,n=null!=(t=charset_0(this.local$$receiver))?t:this.local$fallbackCharset;this.local$decoder=n.newDecoder();var i,o=this.local$$receiver.call,r=reflect.JsType,a=getKClass(Input);t:do{try{i=createKType(getKClass(Input),[],!1)}catch(t){if(Kotlin.isType(t,Throwable)){i=null;break t}throw t}}while(0);if(this.state_0=2,this.result_0=o.bodyNullable_qi9ur9$(typeInfoImpl(r,a,i),this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 1:throw this.exception_0;case 2:this.result_0=Kotlin.isType(e=this.result_0,Input)?e:throwCCE();var s=this.result_0;return decode(this.local$decoder,s);default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Object.defineProperty(HttpResponsePipeline.prototype,"developmentMode",{get:function(){return this.developmentMode_368lah$_0}}),HttpResponsePipeline$Phases.$metadata$={kind:Kind_OBJECT,simpleName:"Phases",interfaces:[]};var HttpResponsePipeline$Phases_instance=null;function HttpResponsePipeline$Phases_getInstance(){return null===HttpResponsePipeline$Phases_instance&&new HttpResponsePipeline$Phases,HttpResponsePipeline$Phases_instance}function HttpReceivePipeline(t){HttpReceivePipeline$Phases_getInstance(),void 0===t&&(t=!1),Pipeline.call(this,[HttpReceivePipeline$Phases_getInstance().Before,HttpReceivePipeline$Phases_getInstance().State,HttpReceivePipeline$Phases_getInstance().After]),this.developmentMode_wr860l$_0=t}function HttpReceivePipeline$Phases(){HttpReceivePipeline$Phases_instance=this,this.Before=new PipelinePhase("Before"),this.State=new PipelinePhase("State"),this.After=new PipelinePhase("After")}HttpResponsePipeline.$metadata$={kind:Kind_CLASS,simpleName:"HttpResponsePipeline",interfaces:[Pipeline]},Object.defineProperty(HttpReceivePipeline.prototype,"developmentMode",{get:function(){return this.developmentMode_wr860l$_0}}),HttpReceivePipeline$Phases.$metadata$={kind:Kind_OBJECT,simpleName:"Phases",interfaces:[]};var HttpReceivePipeline$Phases_instance=null,DEFAULT_HTTP_POOL_SIZE,DEFAULT_HTTP_BUFFER_SIZE;function HttpReceivePipeline$Phases_getInstance(){return null===HttpReceivePipeline$Phases_instance&&new HttpReceivePipeline$Phases,HttpReceivePipeline$Phases_instance}function HttpResponseContainer(t,e){this.expectedType=t,this.response=e}function HttpStatement(t,e){this.builder_0=t,this.client=e,this.checkCapabilities_0()}function Coroutine$execute_2rh6on$(t,e,n){CoroutineImpl.call(this,n),this.exceptionState_0=10,this.$this=t,this.local$response=void 0,this.local$block=e}function Coroutine$HttpStatement$execute$lambda(t,e){CoroutineImpl.call(this,e),this.exceptionState_0=1,this.local$it=t}function HttpStatement$execute$lambda(t,e,n){var i=new Coroutine$HttpStatement$execute$lambda(t,e);return n?i:i.doResume(null)}function Coroutine$body_287e2$(t,e,n,i){CoroutineImpl.call(this,i),this.exceptionState_0=8,this.$this=t,this.local$tmp$=void 0,this.local$response=void 0,this.local$T_0=e,this.local$isT=n}function Coroutine$body_yswr0a$(t,e,n,i,o){CoroutineImpl.call(this,o),this.exceptionState_0=11,this.$this=t,this.local$response=void 0,this.local$T_0=e,this.local$isT=n,this.local$block=i}function Coroutine$executeUnsafe(t,e){CoroutineImpl.call(this,e),this.exceptionState_0=4,this.$this=t}function Coroutine$cleanup_abn2de$(t,e,n){CoroutineImpl.call(this,n),this.exceptionState_0=1,this.$this=t,this.local$$receiver=e}function Coroutine$readBytes_0(t,e){CoroutineImpl.call(this,e),this.exceptionState_0=1,this.local$$receiver=t}function readBytes_1(t,e,n){var i=new Coroutine$readBytes_0(t,e);return n?i:i.doResume(null)}function Coroutine$observable$lambda(t,e,n,i,o,r){CoroutineImpl.call(this,r),this.$controller=o,this.exceptionState_0=11,this.local$closure$contentLength=t,this.local$this$observable=e,this.local$closure$listener=n,this.local$$receiver=void 0,this.local$instance=void 0,this.local$this$observable_0=void 0,this.local$closure$listener_0=void 0,this.local$total=void 0,this.local$bytesSend=void 0,this.local$read=void 0,this.local$$receiver_0=i}function observable$lambda(t,e,n){return function(i,o,r){var a=new Coroutine$observable$lambda(t,e,n,i,this,o);return r?a:a.doResume(null)}}function observable(t,e,n,i){return writer(coroutines.GlobalScope,e,!0,observable$lambda(n,t,i)).channel}HttpReceivePipeline.$metadata$={kind:Kind_CLASS,simpleName:"HttpReceivePipeline",interfaces:[Pipeline]},HttpResponseContainer.$metadata$={kind:Kind_CLASS,simpleName:"HttpResponseContainer",interfaces:[]},HttpResponseContainer.prototype.component1=function(){return this.expectedType},HttpResponseContainer.prototype.component2=function(){return this.response},HttpResponseContainer.prototype.copy_487ue8$=function(t,e){return new HttpResponseContainer(void 0===t?this.expectedType:t,void 0===e?this.response:e)},HttpResponseContainer.prototype.toString=function(){return"HttpResponseContainer(expectedType="+Kotlin.toString(this.expectedType)+", response="+Kotlin.toString(this.response)+")"},HttpResponseContainer.prototype.hashCode=function(){var t=0;return 31*(t=31*t+Kotlin.hashCode(this.expectedType)|0)+Kotlin.hashCode(this.response)|0},HttpResponseContainer.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&Kotlin.equals(this.expectedType,t.expectedType)&&Kotlin.equals(this.response,t.response)},Coroutine$execute_2rh6on$.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$execute_2rh6on$.prototype=Object.create(CoroutineImpl.prototype),Coroutine$execute_2rh6on$.prototype.constructor=Coroutine$execute_2rh6on$,Coroutine$execute_2rh6on$.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.exceptionState_0=8,this.state_0=1,this.result_0=this.$this.executeUnsafe(this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 1:if(this.local$response=this.result_0,this.exceptionState_0=5,this.state_0=2,this.result_0=this.local$block(this.local$response,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 2:this.exceptionState_0=10,this.finallyPath_0=[3],this.state_0=6,this.$returnValue=this.result_0;continue;case 3:return this.$returnValue;case 4:this.exceptionState_0=10,this.state_0=9;continue;case 5:this.finallyPath_0=[8],this.state_0=6;continue;case 6:if(this.exceptionState_0=8,this.state_0=7,this.result_0=this.$this.cleanup_abn2de$(this.local$response,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 7:this.state_0=this.finallyPath_0.shift();continue;case 8:this.exceptionState_0=10;var t=this.exception_0;throw Kotlin.isType(t,CancellationException)?unwrapCancellationException(t):t;case 9:return;case 10:throw this.exception_0;default:throw this.state_0=10,new Error("State Machine Unreachable execution")}}catch(t){if(10===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},HttpStatement.prototype.execute_2rh6on$=function(t,e,n){var i=new Coroutine$execute_2rh6on$(this,t,e);return n?i:i.doResume(null)},Coroutine$HttpStatement$execute$lambda.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$HttpStatement$execute$lambda.prototype=Object.create(CoroutineImpl.prototype),Coroutine$HttpStatement$execute$lambda.prototype.constructor=Coroutine$HttpStatement$execute$lambda,Coroutine$HttpStatement$execute$lambda.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=save(this.local$it.call,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 1:throw this.exception_0;case 2:return this.result_0.response;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},HttpStatement.prototype.execute=function(t){return this.execute_2rh6on$(HttpStatement$execute$lambda,t)},Coroutine$body_287e2$.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$body_287e2$.prototype=Object.create(CoroutineImpl.prototype),Coroutine$body_287e2$.prototype.constructor=Coroutine$body_287e2$,Coroutine$body_287e2$.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.exceptionState_0=6,this.state_0=1,this.result_0=this.$this.executeUnsafe(this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 1:var t;this.local$response=this.result_0,this.exceptionState_0=4;var e,n=this.local$response.call,i=reflect.JsType,o=getKClass(this.local$T_0);t:do{try{e=getReifiedTypeParameterKType(this.local$T_0)}catch(t){if(Kotlin.isType(t,Throwable)){e=null;break t}throw t}}while(0);if(this.state_0=2,this.result_0=n.bodyNullable_qi9ur9$(typeInfoImpl(i,o,e),this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 2:this.result_0=this.local$isT(t=this.result_0)?t:throwCCE(),this.local$tmp$=this.result_0,this.exceptionState_0=6,this.finallyPath_0=[3],this.state_0=5;continue;case 3:return this.local$tmp$;case 4:this.finallyPath_0=[6],this.state_0=5;continue;case 5:this.exceptionState_0=6,complete(this.local$response),this.state_0=this.finallyPath_0.shift();continue;case 6:this.exceptionState_0=8;var r=this.exception_0;throw Kotlin.isType(r,CancellationException)?unwrapCancellationException(r):r;case 7:return;case 8:throw this.exception_0;default:throw this.state_0=8,new Error("State Machine Unreachable execution")}}catch(t){if(8===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},HttpStatement.prototype.body_287e2$=function(t,e,n,i){var o=new Coroutine$body_287e2$(this,t,e,n);return i?o:o.doResume(null)},defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.statement.HttpStatement.body_287e2$",wrapFunction((function(){var t=Kotlin.getReifiedTypeParameterKType,e=_.io.ktor.client.statement.complete_abn2de$,n=Kotlin.wrapFunction,i=_.io.ktor.client.utils.unwrapCancellationException_dbl4o4$,o=Kotlin.kotlin.coroutines.cancellation.CancellationException,r=Kotlin.throwCCE,a=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,s=Kotlin.getKClass,l=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,u=Error;return n((function(){var n=Kotlin.throwCCE,i=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,o=Kotlin.getKClass,r=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,a=Error;return function(s,l,u,c){return function(){var p;l.executeUnsafe(s);var h=s.$$coroutineResult$$;try{var _,d,f=u,m=c,$=h.call,y=i.JsType,g=o(f);t:do{try{d=t(u)}catch(t){if(Kotlin.isType(t,a)){d=null;break t}throw t}}while(0);$.bodyNullable_qi9ur9$(r(y,g,d),$this$),$this$.$$coroutineResult$$=m(_=$this$.$$coroutineResult$$)?_:n(),p=s.$$coroutineResult$$}finally{e(h)}return p}}})),function(n,c,p){try{var h;Kotlin.suspendCall(this.executeUnsafe(Kotlin.coroutineReceiver()));var _=Kotlin.coroutineResult(Kotlin.coroutineReceiver());try{var d,f,m=_.call,$=a.JsType,y=s(n);t:do{try{f=t(n)}catch(t){if(Kotlin.isType(t,u)){f=null;break t}throw t}}while(0);Kotlin.suspendCall(m.bodyNullable_qi9ur9$(l($,y,f),Kotlin.coroutineReceiver())),Kotlin.setCoroutineResult(c(d=Kotlin.coroutineResult(Kotlin.coroutineReceiver()))?d:r(),Kotlin.coroutineReceiver()),h=Kotlin.coroutineResult(Kotlin.coroutineReceiver())}finally{e(_)}return h}catch(t){throw Kotlin.isType(t,o)?i(t):t}}}))),Coroutine$body_yswr0a$.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$body_yswr0a$.prototype=Object.create(CoroutineImpl.prototype),Coroutine$body_yswr0a$.prototype.constructor=Coroutine$body_yswr0a$,Coroutine$body_yswr0a$.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.exceptionState_0=9,this.state_0=1,this.result_0=this.$this.executeUnsafe(this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 1:var t;this.local$response=this.result_0,this.exceptionState_0=6;var e,n=this.local$response.call,i=reflect.JsType,o=getKClass(this.local$T_0);t:do{try{e=getReifiedTypeParameterKType(this.local$T_0)}catch(t){if(Kotlin.isType(t,Throwable)){e=null;break t}throw t}}while(0);if(this.state_0=2,this.result_0=n.bodyNullable_qi9ur9$(typeInfoImpl(i,o,e),this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 2:this.result_0=this.local$isT(t=this.result_0)?t:throwCCE();var r=this.result_0;if(this.state_0=3,this.result_0=this.local$block(r,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 3:this.exceptionState_0=11,this.finallyPath_0=[4],this.state_0=7,this.$returnValue=this.result_0;continue;case 4:return this.$returnValue;case 5:this.exceptionState_0=11,this.state_0=10;continue;case 6:this.finallyPath_0=[9],this.state_0=7;continue;case 7:if(this.exceptionState_0=9,this.state_0=8,this.result_0=this.$this.cleanup_abn2de$(this.local$response,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 8:this.state_0=this.finallyPath_0.shift();continue;case 9:this.exceptionState_0=11;var a=this.exception_0;throw Kotlin.isType(a,CancellationException)?unwrapCancellationException(a):a;case 10:return;case 11:throw this.exception_0;default:throw this.state_0=11,new Error("State Machine Unreachable execution")}}catch(t){if(11===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},HttpStatement.prototype.body_yswr0a$=function(t,e,n,i,o){var r=new Coroutine$body_yswr0a$(this,t,e,n,i);return o?r:r.doResume(null)},defineInlineFunction("ktor-ktor-client-core-js-legacy.io.ktor.client.statement.HttpStatement.body_yswr0a$",wrapFunction((function(){var t=Kotlin.getReifiedTypeParameterKType,e=Kotlin.wrapFunction,n=_.io.ktor.client.utils.unwrapCancellationException_dbl4o4$,i=Kotlin.kotlin.coroutines.cancellation.CancellationException,o=Kotlin.throwCCE,r=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,a=Kotlin.getKClass,s=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,l=Error;return e((function(){var e=Kotlin.throwCCE,n=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,i=Kotlin.getKClass,o=_.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,r=Error;return function(a,s,l,u,c){return function(){s.executeUnsafe(a);var p=a.$$coroutineResult$$;try{var h,_,d=l,f=u,m=p.call,$=n.JsType,y=i(d);t:do{try{_=t(l)}catch(t){if(Kotlin.isType(t,r)){_=null;break t}throw t}}while(0);m.bodyNullable_qi9ur9$(o($,y,_),$this$),$this$.$$coroutineResult$$=f(h=$this$.$$coroutineResult$$)?h:e();var g=a.$$coroutineResult$$;return c(g,a),a.$$coroutineResult$$}finally{s.cleanup_abn2de$(p,a)}}}})),function(e,u,c,p){try{Kotlin.suspendCall(this.executeUnsafe(Kotlin.coroutineReceiver()));var h=Kotlin.coroutineResult(Kotlin.coroutineReceiver());try{var _,d,f=h.call,m=r.JsType,$=a(e);t:do{try{d=t(e)}catch(t){if(Kotlin.isType(t,l)){d=null;break t}throw t}}while(0);Kotlin.suspendCall(f.bodyNullable_qi9ur9$(s(m,$,d),Kotlin.coroutineReceiver())),Kotlin.setCoroutineResult(u(_=Kotlin.coroutineResult(Kotlin.coroutineReceiver()))?_:o(),Kotlin.coroutineReceiver());var y=Kotlin.coroutineResult(Kotlin.coroutineReceiver());return Kotlin.suspendCall(c(y,Kotlin.coroutineReceiver())),Kotlin.coroutineResult(Kotlin.coroutineReceiver())}finally{Kotlin.suspendCall(this.cleanup_abn2de$(h,Kotlin.coroutineReceiver()))}}catch(t){throw Kotlin.isType(t,i)?n(t):t}}}))),Coroutine$executeUnsafe.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$executeUnsafe.prototype=Object.create(CoroutineImpl.prototype),Coroutine$executeUnsafe.prototype.constructor=Coroutine$executeUnsafe,Coroutine$executeUnsafe.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.exceptionState_0=2;var t=(new HttpRequestBuilder).takeFromWithExecutionContext_s9rlw$(this.$this.builder_0);if(this.state_0=1,this.result_0=this.$this.client.execute_jc2hdt$(t,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 1:return this.result_0.response;case 2:this.exceptionState_0=4;var e=this.exception_0;throw Kotlin.isType(e,CancellationException)?unwrapCancellationException(e):e;case 3:return;case 4:throw this.exception_0;default:throw this.state_0=4,new Error("State Machine Unreachable execution")}}catch(t){if(4===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},HttpStatement.prototype.executeUnsafe=function(t,e){var n=new Coroutine$executeUnsafe(this,t);return e?n:n.doResume(null)},Coroutine$cleanup_abn2de$.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$cleanup_abn2de$.prototype=Object.create(CoroutineImpl.prototype),Coroutine$cleanup_abn2de$.prototype.constructor=Coroutine$cleanup_abn2de$,Coroutine$cleanup_abn2de$.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t,e=Kotlin.isType(t=ensureNotNull(this.local$$receiver.coroutineContext.get_j3r2sn$(Job.Key)),CompletableJob)?t:throwCCE();e.complete();try{cancel_1(this.local$$receiver.content)}catch(t){if(!Kotlin.isType(t,Throwable))throw t}if(this.state_0=2,this.result_0=e.join(this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 1:throw this.exception_0;case 2:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},HttpStatement.prototype.cleanup_abn2de$=function(t,e,n){var i=new Coroutine$cleanup_abn2de$(this,t,e);return n?i:i.doResume(null)},HttpStatement.prototype.checkCapabilities_0=function(){var t,e,n,i,o;if(null!=(e=null!=(t=this.builder_0.attributes.getOrNull_yzaw86$(ENGINE_CAPABILITIES_KEY))?t.keys:null)){var r,a=ArrayList_init();for(r=e.iterator();r.hasNext();){var s=r.next();Kotlin.isType(s,HttpClientPlugin)&&a.add_11rb$(s)}i=a}else i=null;if(null!=(n=i))for(o=n.iterator();o.hasNext();){var l=o.next();if(null==pluginOrNull(this.client,l))throw IllegalArgumentException_init(("Consider installing "+l+" plugin because the request requires it to be installed").toString())}},HttpStatement.prototype.toString=function(){return"HttpStatement["+this.builder_0.url.buildString()+"]"},HttpStatement.$metadata$={kind:Kind_CLASS,simpleName:"HttpStatement",interfaces:[]},Coroutine$readBytes_0.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$readBytes_0.prototype=Object.create(CoroutineImpl.prototype),Coroutine$readBytes_0.prototype.constructor=Coroutine$readBytes_0,Coroutine$readBytes_0.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.local$$receiver.content.readRemaining_s8cxhz$(void 0,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 1:throw this.exception_0;case 2:return readBytes(this.result_0);default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Coroutine$observable$lambda.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$observable$lambda.prototype=Object.create(CoroutineImpl.prototype),Coroutine$observable$lambda.prototype.constructor=Coroutine$observable$lambda,Coroutine$observable$lambda.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.local$$receiver=pool.ByteArrayPool,this.local$instance=this.local$$receiver.borrow(),this.exceptionState_0=9;var t=this.local$closure$contentLength;this.local$this$observable_0=this.local$this$observable,this.local$closure$listener_0=this.local$closure$listener,this.local$total=null!=t?t:L_1,this.local$bytesSend=L0,this.state_0=1;continue;case 1:if(this.local$this$observable_0.isClosedForRead){this.state_0=5;continue}if(this.state_0=2,this.result_0=readAvailable_0(this.local$this$observable_0,this.local$instance,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 2:if(this.local$read=this.result_0,this.state_0=3,this.result_0=this.local$$receiver_0.channel.writeFully_mj6st8$(this.local$instance,0,this.local$read,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 3:if(this.local$bytesSend=this.local$bytesSend.add(Kotlin.Long.fromInt(this.local$read)),this.state_0=4,this.result_0=this.local$closure$listener_0(this.local$bytesSend,this.local$total,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 4:this.state_0=1;continue;case 5:var e=this.local$this$observable_0.closedCause;if(this.local$$receiver_0.channel.close_dbl4no$(e),null==e&&equals(this.local$bytesSend,L0)){if(this.state_0=6,this.result_0=this.local$closure$listener_0(this.local$bytesSend,this.local$total,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue}this.state_0=7;continue;case 6:this.state_0=7;continue;case 7:this.exceptionState_0=11,this.finallyPath_0=[8],this.state_0=10;continue;case 8:return Unit;case 9:this.finallyPath_0=[11],this.state_0=10;continue;case 10:this.exceptionState_0=11,this.local$$receiver.recycle_trkh7z$(this.local$instance),this.state_0=this.finallyPath_0.shift();continue;case 11:throw this.exception_0;default:throw this.state_0=11,new Error("State Machine Unreachable execution")}}catch(t){if(11===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}};var CacheControl_instance_0=null,HttpRequestCreated,HttpRequestIsReadyForSending,HttpResponseReceived,HttpResponseReceiveFailed,HttpResponseCancelled;function HttpResponseReceiveFail(t,e){this.response=t,this.cause=e}function EmptyContent(){EmptyContent_instance=this,OutgoingContent$NoContent.call(this),this.contentLength_89rfwp$_0=L0}HttpResponseReceiveFail.$metadata$={kind:Kind_CLASS,simpleName:"HttpResponseReceiveFail",interfaces:[]},Object.defineProperty(EmptyContent.prototype,"contentLength",{configurable:!0,get:function(){return this.contentLength_89rfwp$_0}}),EmptyContent.prototype.toString=function(){return"EmptyContent"},EmptyContent.$metadata$={kind:Kind_OBJECT,simpleName:"EmptyContent",interfaces:[OutgoingContent$NoContent]};var EmptyContent_instance=null;function EmptyContent_getInstance(){return null===EmptyContent_instance&&new EmptyContent,EmptyContent_instance}function buildHeaders$lambda(t){return Unit}function buildHeaders(t){void 0===t&&(t=buildHeaders$lambda);var e=new HeadersBuilder;return t(e),e.build()}function HttpClient$lambda_1(t){return Unit}function HttpClient_2(t){return void 0===t&&(t=HttpClient$lambda_1),HttpClient(JsClient(),t)}var ProxyBuilder_instance=null;function Js(){Js_instance=this}Js.prototype.create_dxyxif$$default=function(t){var e=new HttpClientEngineConfig;return t(e),new JsClientEngine(e)},Js.$metadata$={kind:Kind_OBJECT,simpleName:"Js",interfaces:[HttpClientEngineFactory]};var Js_instance=null;function Js_getInstance(){return null===Js_instance&&new Js,Js_instance}function JsClient(){return Js_getInstance()}function suspendCancellableCoroutine$lambda(t){return function(e){var n=new CancellableContinuationImpl_init(intercepted(e),1);return n.initCancellability(),t(n),n.getResult()}}function JsClientEngine(t){if(HttpClientEngineBase.call(this,"ktor-js"),this.config_2md4la$_0=t,this.dispatcher_j9yf5v$_0=coroutines.Dispatchers.Default,this.supportedCapabilities_380cpg$_0=setOf_0([HttpTimeout$Plugin_getInstance(),WebSocketCapability_getInstance()]),null!=this.config.proxy)throw IllegalStateException_init("Proxy unsupported in Js engine.".toString())}function Coroutine$execute_dkgphz$(t,e,n){CoroutineImpl.call(this,n),this.exceptionState_0=1,this.$this=t,this.local$callContext=void 0,this.local$clientConfig=void 0,this.local$requestTime=void 0,this.local$data=e}function JsClientEngine$createWebSocket$ObjectLiteral(){}function JsClientEngine$createWebSocket$lambda(t){return function(e,n){return t[e]=joinToString(n,","),Unit}}function Coroutine$executeWebSocketRequest_0(t,e,n,i){CoroutineImpl.call(this,i),this.exceptionState_0=4,this.$this=t,this.local$requestTime=void 0,this.local$urlString=void 0,this.local$socket=void 0,this.local$request=e,this.local$callContext=n}function awaitConnection$lambda$lambda(t,e){return function(n){switch(n.type){case"open":var i=e;t.resumeWith_tl1gpc$(new Result(i));break;case"error":var o=t,r=new WebSocketException(asString(n));o.resumeWith_tl1gpc$(new Result(createFailure(r)))}return Unit}}function awaitConnection$lambda$lambda_0(t,e){return function(n){return e.removeEventListener("open",t),e.removeEventListener("error",t),null!=n&&e.close(),Unit}}function awaitConnection$lambda(t){return function(e){if(!e.isCancelled){var n=awaitConnection$lambda$lambda(e,t);return t.addEventListener("open",n),t.addEventListener("error",n),e.invokeOnCancellation_f05bi3$(awaitConnection$lambda$lambda_0(n,t)),Unit}}}function Coroutine$awaitConnection(t,e){CoroutineImpl.call(this,e),this.exceptionState_0=1,this.local$$receiver=t}function awaitConnection(t,e,n){var i=new Coroutine$awaitConnection(t,e);return n?i:i.doResume(null)}function asString(t){var e=StringBuilder_init();return e.append_pdl1vj$(JSON.stringify(t,["message","target","type","isTrusted"])),e.toString()}function mapToKtor$lambda$lambda(t){return function(e,n){return t.append_puj7f4$(n,e),Unit}}function mapToKtor$lambda(t){return function(e){return t.forEach(mapToKtor$lambda$lambda(e)),Unit}}function mapToKtor(t){return buildHeaders(mapToKtor$lambda(t))}function JsError(t){Throwable.call(this),this.message_9vnttw$_0="Error from javascript["+t.toString()+"].",this.cause_kdow7y$_0=null,this.origin=t,Kotlin.captureStack(Throwable,this),this.name="JsError"}function toRaw$lambda(t){return function(e,n){return t[e]=n,Unit}}function Coroutine$toRaw$lambda(t,e,n,i){CoroutineImpl.call(this,i),this.$controller=n,this.exceptionState_0=1,this.local$closure$content=t,this.local$$receiver=e}function toRaw$lambda_0(t){return function(e,n,i){var o=new Coroutine$toRaw$lambda(t,e,this,n);return i?o:o.doResume(null)}}function toRaw$lambda_1(t,e,n,i){return function(o){return o.method=t.method.value,o.headers=e,o.redirect=n.followRedirects?"follow":"manual",null!=i&&(o.body=new Uint8Array(toTypedArray(i))),Unit}}function Coroutine$toRaw(t,e,n,i){CoroutineImpl.call(this,i),this.exceptionState_0=1,this.local$tmp$=void 0,this.local$jsHeaders=void 0,this.local$$receiver=t,this.local$clientConfig=e,this.local$callContext=n}function toRaw(t,e,n,i,o){var r=new Coroutine$toRaw(t,e,n,i);return o?r:r.doResume(null)}function buildObject(t){var e,n=null==(e={})||Kotlin.isType(e,Any)?e:throwCCE();return t(n),n}function asByteArray(t){return new Int8Array(t.buffer,t.byteOffset,t.length)}function suspendCancellableCoroutine$lambda_0(t){return function(e){var n=new CancellableContinuationImpl_init(intercepted(e),1);return n.initCancellability(),t(n),n.getResult()}}function readBodyBrowser(t,e){var n;return null==(n=e.body)?ByteReadChannel.Companion.Empty:channelFromStream(t,n)}function Coroutine$channelFromStream$lambda(t,e,n,i){CoroutineImpl.call(this,i),this.$controller=n,this.exceptionState_0=8,this.local$closure$stream=t,this.local$tmp$=void 0,this.local$reader=void 0,this.local$$receiver=e}function channelFromStream$lambda(t){return function(e,n,i){var o=new Coroutine$channelFromStream$lambda(t,e,this,n);return i?o:o.doResume(null)}}function channelFromStream(t,e){return writer(t,void 0,void 0,channelFromStream$lambda(e)).channel}function readChunk$lambda$lambda(t){return function(e){var n=e.value,i=e.done||null==n?null:n;return t.resumeWith_tl1gpc$(new Result(i)),Unit}}function readChunk$lambda$lambda_0(t){return function(e){return t.resumeWith_tl1gpc$(new Result(createFailure(e))),Unit}}function readChunk$lambda(t){return function(e){return t.read().then(readChunk$lambda$lambda(e)).catch(readChunk$lambda$lambda_0(e)),Unit}}function Coroutine$readChunk(t,e){CoroutineImpl.call(this,e),this.exceptionState_0=1,this.local$$receiver=t}function readChunk(t,e,n){var i=new Coroutine$readChunk(t,e);return n?i:i.doResume(null)}function suspendCancellableCoroutine$lambda_1(t){return function(e){var n=new CancellableContinuationImpl_init(intercepted(e),1);return n.initCancellability(),t(n),n.getResult()}}function commonFetch$lambda$lambda(t){return function(e){return t.abort(),Unit}}function commonFetch$lambda$lambda_0(t){return function(e){return t.resumeWith_tl1gpc$(new Result(e)),Unit}}function commonFetch$lambda$lambda_1(t){return function(e){return t.resumeWith_tl1gpc$(new Result(createFailure(new Error_0("Fail to fetch",e)))),Unit}}function commonFetch$lambda(t,e){return function(n){var i=AbortController_0();return t.signal=i.signal,n.invokeOnCancellation_f05bi3$(commonFetch$lambda$lambda(i)),(util.PlatformUtils.IS_BROWSER?fetch(e,t):jsRequireNodeFetch()(e,t)).then(commonFetch$lambda$lambda_0(n),commonFetch$lambda$lambda_1(n)),Unit}}function Coroutine$commonFetch(t,e,n){CoroutineImpl.call(this,n),this.exceptionState_0=1,this.local$input=t,this.local$init=e}function commonFetch(t,e,n,i){var o=new Coroutine$commonFetch(t,e,n);return i?o:o.doResume(null)}function AbortController_0(){var tmp$;if(util.PlatformUtils.IS_BROWSER)tmp$=new AbortController;else{var controller=eval("require")("abort-controller");tmp$=new controller}return tmp$}function readBody(t,e){return util.PlatformUtils.IS_BROWSER?readBodyBrowser(t,e):readBodyNode(t,e)}function jsRequireNodeFetch(){try{return eval("require")("node-fetch")}catch(t){throw Error_init("Error loading module 'node-fetch': "+t.toString())}}function readBodyNode$lambda$lambda(t,e){return function(n){return t.trySend_11rb$(asByteArray(new Uint8Array(n))).isSuccess,e.pause()}}function readBodyNode$lambda$lambda_0(t,e){return function(n){var i=new JsError(n);return t.close_dbl4no$(i),e.channel.close_dbl4no$(i)}}function readBodyNode$lambda$lambda_1(t){return function(){return t.close_dbl4no$()}}function Coroutine$readBodyNode$lambda(t,e,n,i){CoroutineImpl.call(this,i),this.$controller=n,this.exceptionState_0=8,this.local$closure$response=t,this.local$tmp$_0=void 0,this.local$body=void 0,this.local$$receiver=e}function readBodyNode$lambda(t){return function(e,n,i){var o=new Coroutine$readBodyNode$lambda(t,e,this,n);return i?o:o.doResume(null)}}function readBodyNode(t,e){return writer(t,void 0,void 0,readBodyNode$lambda(e)).channel}function platformRequestDefaultTransform(t,e,n){return null}function platformResponseDefaultTransformers(t){}function JsWebSocketSession(t,e){var n;this.coroutineContext_rv3h91$_0=t,this.websocket_0=e,this._closeReason_0=CompletableDeferred(),this._incoming_0=Channel(2147483647),this._outgoing_0=Channel(2147483647),this.incoming_z0xtng$_0=this._incoming_0,this.outgoing_j2o89i$_0=this._outgoing_0,this.closeReason_qo69t6$_0=this._closeReason_0,this.websocket_0.binaryType="arraybuffer",this.websocket_0.addEventListener("message",JsWebSocketSession_init$lambda(this)),this.websocket_0.addEventListener("error",JsWebSocketSession_init$lambda_0(this)),this.websocket_0.addEventListener("close",JsWebSocketSession_init$lambda_1(this)),launch(this,void 0,void 0,JsWebSocketSession_init$lambda_2(this)),null!=(n=this.coroutineContext.get_j3r2sn$(Job.Key))&&n.invokeOnCompletion_f05bi3$(JsWebSocketSession_init$lambda_3(this))}function JsWebSocketSession_init$lambda(t){return function(e){var n,i=e,o=i.data;if(Kotlin.isType(o,ArrayBuffer))n=Frame$Frame$Binary_init(!1,new Int8Array(o));else{if("string"!=typeof o){var r=IllegalStateException_init("Unknown frame type: "+i.type);throw t._closeReason_0.completeExceptionally_tcv7n7$(r),r}n=Frame$Frame$Text_init(o)}var a=n;return t._incoming_0.trySend_11rb$(a),Unit}}function JsWebSocketSession_init$lambda_0(t){return function(e){var n=new WebSocketException(e.toString());return t._closeReason_0.completeExceptionally_tcv7n7$(n),t._incoming_0.close_dbl4no$(n),t._outgoing_0.cancel_x5z25k$(),Unit}}function JsWebSocketSession_init$lambda_1(t){return function(e){var n,i,o=new CloseReason("number"==typeof(n=e.code)?n:throwCCE(),"string"==typeof(i=e.reason)?i:throwCCE());return t._closeReason_0.complete_11rb$(o),t._incoming_0.trySend_11rb$(Frame$Frame$Close_init(o)),t._incoming_0.close_dbl4no$(),t._outgoing_0.cancel_x5z25k$(),Unit}}function Coroutine$JsWebSocketSession_init$lambda(t,e,n,i){CoroutineImpl.call(this,i),this.$controller=n,this.exceptionState_0=8,this.local$this$JsWebSocketSession=t,this.local$$receiver=void 0,this.local$cause=void 0,this.local$tmp$=void 0}function JsWebSocketSession_init$lambda_2(t){return function(e,n,i){var o=new Coroutine$JsWebSocketSession_init$lambda(t,e,this,n);return i?o:o.doResume(null)}}function JsWebSocketSession_init$lambda_3(t){return function(e){return null==e?t.websocket_0.close():t.websocket_0.close(CloseReason$Codes.INTERNAL_ERROR.code,"Client failed"),Unit}}function unwrapCancellationException(t){return t}Object.defineProperty(JsClientEngine.prototype,"config",{get:function(){return this.config_2md4la$_0}}),Object.defineProperty(JsClientEngine.prototype,"dispatcher",{configurable:!0,get:function(){return this.dispatcher_j9yf5v$_0}}),Object.defineProperty(JsClientEngine.prototype,"supportedCapabilities",{configurable:!0,get:function(){return this.supportedCapabilities_380cpg$_0}}),Coroutine$execute_dkgphz$.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$execute_dkgphz$.prototype=Object.create(CoroutineImpl.prototype),Coroutine$execute_dkgphz$.prototype.constructor=Coroutine$execute_dkgphz$,Coroutine$execute_dkgphz$.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=callContext(this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 1:throw this.exception_0;case 2:if(this.local$callContext=this.result_0,this.local$clientConfig=this.local$data.attributes.get_yzaw86$(CLIENT_CONFIG),isUpgradeRequest(this.local$data)){if(this.state_0=3,this.result_0=this.$this.executeWebSocketRequest_0(this.local$data,this.local$callContext,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue}this.state_0=4;continue;case 3:return this.result_0;case 4:if(this.local$requestTime=GMTDate(),this.state_0=5,this.result_0=toRaw(this.local$data,this.local$clientConfig,this.local$callContext,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 5:var t=this.result_0;if(this.state_0=6,this.result_0=commonFetch(this.local$data.url.toString(),t,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 6:var e=this.result_0,n=new HttpStatusCode(e.status,e.statusText),i=mapToKtor(e.headers),o=HttpProtocolVersion.Companion.HTTP_1_1,r=readBody(CoroutineScope_0(this.local$callContext),e);return new HttpResponseData(n,this.local$requestTime,i,o,r,this.local$callContext);default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},JsClientEngine.prototype.execute_dkgphz$=function(t,e,n){var i=new Coroutine$execute_dkgphz$(this,t,e);return n?i:i.doResume(null)},JsClientEngine$createWebSocket$ObjectLiteral.$metadata$={kind:Kind_CLASS,interfaces:[]},JsClientEngine.prototype.createWebSocket_0=function(urlString_capturingHack,headers){if(util.PlatformUtils.IS_NODE){var ws_capturingHack=eval("require")("ws"),headers_capturingHack=new JsClientEngine$createWebSocket$ObjectLiteral;return headers.forEach_ubvtmq$(JsClientEngine$createWebSocket$lambda(headers_capturingHack)),new ws_capturingHack(urlString_capturingHack,{headers:headers_capturingHack})}return new WebSocket(urlString_capturingHack)},Coroutine$executeWebSocketRequest_0.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$executeWebSocketRequest_0.prototype=Object.create(CoroutineImpl.prototype),Coroutine$executeWebSocketRequest_0.prototype.constructor=Coroutine$executeWebSocketRequest_0,Coroutine$executeWebSocketRequest_0.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.local$requestTime=GMTDate(),this.local$urlString=this.local$request.url.toString(),this.local$socket=this.$this.createWebSocket_0(this.local$urlString,this.local$request.headers),this.exceptionState_0=2,this.state_0=1,this.result_0=awaitConnection(this.local$socket,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 1:this.exceptionState_0=4,this.state_0=3;continue;case 2:this.exceptionState_0=4;var t=this.exception_0;throw Kotlin.isType(t,Throwable)?(cancel_3(this.local$callContext,CancellationException_init_0("Failed to connect to "+this.local$urlString,t)),t):t;case 3:var e=new JsWebSocketSession(this.local$callContext,this.local$socket);return new HttpResponseData(HttpStatusCode.Companion.OK,this.local$requestTime,Headers.Companion.Empty,HttpProtocolVersion.Companion.HTTP_1_1,e,this.local$callContext);case 4:throw this.exception_0;default:throw this.state_0=4,new Error("State Machine Unreachable execution")}}catch(t){if(4===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},JsClientEngine.prototype.executeWebSocketRequest_0=function(t,e,n,i){var o=new Coroutine$executeWebSocketRequest_0(this,t,e,n);return i?o:o.doResume(null)},JsClientEngine.$metadata$={kind:Kind_CLASS,simpleName:"JsClientEngine",interfaces:[HttpClientEngineBase]},Coroutine$awaitConnection.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$awaitConnection.prototype=Object.create(CoroutineImpl.prototype),Coroutine$awaitConnection.prototype.constructor=Coroutine$awaitConnection,Coroutine$awaitConnection.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=suspendCancellableCoroutine$lambda(awaitConnection$lambda(this.local$$receiver))(this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 1:throw this.exception_0;case 2:return this.result_0,this.result_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Object.defineProperty(JsError.prototype,"message",{get:function(){return this.message_9vnttw$_0}}),Object.defineProperty(JsError.prototype,"cause",{get:function(){return this.cause_kdow7y$_0}}),JsError.$metadata$={kind:Kind_CLASS,simpleName:"JsError",interfaces:[Throwable]},Coroutine$toRaw$lambda.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$toRaw$lambda.prototype=Object.create(CoroutineImpl.prototype),Coroutine$toRaw$lambda.prototype.constructor=Coroutine$toRaw$lambda,Coroutine$toRaw$lambda.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.local$closure$content.writeTo_h3x4ir$(this.local$$receiver.channel,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 1:throw this.exception_0;case 2:return this.result_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Coroutine$toRaw.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$toRaw.prototype=Object.create(CoroutineImpl.prototype),Coroutine$toRaw.prototype.constructor=Coroutine$toRaw,Coroutine$toRaw.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.local$jsHeaders={},mergeHeaders(this.local$$receiver.headers,this.local$$receiver.body,toRaw$lambda(this.local$jsHeaders));var t=this.local$$receiver.body;if(Kotlin.isType(t,OutgoingContent$ByteArrayContent)){this.local$tmp$=t.bytes(),this.state_0=6;continue}if(Kotlin.isType(t,OutgoingContent$ReadChannelContent)){if(this.state_0=4,this.result_0=t.readFrom().readRemaining_s8cxhz$(void 0,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue}if(Kotlin.isType(t,OutgoingContent$WriteChannelContent)){if(this.state_0=2,this.result_0=writer(coroutines.GlobalScope,this.local$callContext,void 0,toRaw$lambda_0(t)).channel.readRemaining_s8cxhz$(void 0,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue}this.local$tmp$=null,this.state_0=3;continue;case 1:throw this.exception_0;case 2:this.local$tmp$=readBytes(this.result_0),this.state_0=3;continue;case 3:this.state_0=5;continue;case 4:this.local$tmp$=readBytes(this.result_0),this.state_0=5;continue;case 5:this.state_0=6;continue;case 6:var e=this.local$tmp$;return buildObject(toRaw$lambda_1(this.local$$receiver,this.local$jsHeaders,this.local$clientConfig,e));default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Coroutine$channelFromStream$lambda.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$channelFromStream$lambda.prototype=Object.create(CoroutineImpl.prototype),Coroutine$channelFromStream$lambda.prototype.constructor=Coroutine$channelFromStream$lambda,Coroutine$channelFromStream$lambda.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.local$reader=this.local$closure$stream.getReader(),this.state_0=1;continue;case 1:if(this.exceptionState_0=6,this.state_0=2,this.result_0=readChunk(this.local$reader,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 2:if(this.local$tmp$=this.result_0,null==this.local$tmp$){this.exceptionState_0=6,this.state_0=5;continue}this.state_0=3;continue;case 3:var t=this.local$tmp$;if(this.state_0=4,this.result_0=writeFully(this.local$$receiver.channel,asByteArray(t),this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 4:this.exceptionState_0=8,this.state_0=7;continue;case 5:return Unit;case 6:this.exceptionState_0=8;var e=this.exception_0;throw Kotlin.isType(e,Throwable)?(this.local$reader.cancel(e),e):e;case 7:this.state_0=1;continue;case 8:throw this.exception_0;default:throw this.state_0=8,new Error("State Machine Unreachable execution")}}catch(t){if(8===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Coroutine$readChunk.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$readChunk.prototype=Object.create(CoroutineImpl.prototype),Coroutine$readChunk.prototype.constructor=Coroutine$readChunk,Coroutine$readChunk.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=suspendCancellableCoroutine$lambda_0(readChunk$lambda(this.local$$receiver))(this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 1:throw this.exception_0;case 2:return this.result_0,this.result_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Coroutine$commonFetch.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$commonFetch.prototype=Object.create(CoroutineImpl.prototype),Coroutine$commonFetch.prototype.constructor=Coroutine$commonFetch,Coroutine$commonFetch.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=suspendCancellableCoroutine$lambda_1(commonFetch$lambda(this.local$init,this.local$input))(this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 1:throw this.exception_0;case 2:return this.result_0,this.result_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Coroutine$readBodyNode$lambda.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$readBodyNode$lambda.prototype=Object.create(CoroutineImpl.prototype),Coroutine$readBodyNode$lambda.prototype.constructor=Coroutine$readBodyNode$lambda,Coroutine$readBodyNode$lambda.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t,e;if(null==(t=this.local$closure$response.body))throw IllegalStateException_init("Fail to get body".toString());e=t,this.local$body=e;var n=Channel(1);this.local$body.on("data",readBodyNode$lambda$lambda(n,this.local$body)),this.local$body.on("error",readBodyNode$lambda$lambda_0(n,this.local$$receiver)),this.local$body.on("end",readBodyNode$lambda$lambda_1(n)),this.exceptionState_0=6,this.local$tmp$_0=n.iterator(),this.state_0=1;continue;case 1:if(this.state_0=2,this.result_0=this.local$tmp$_0.hasNext(this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 2:if(this.result_0){this.state_0=3;continue}this.state_0=5;continue;case 3:var i=this.local$tmp$_0.next();if(this.state_0=4,this.result_0=writeFully(this.local$$receiver.channel,i,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 4:this.local$body.resume(),this.state_0=1;continue;case 5:this.exceptionState_0=8,this.state_0=7;continue;case 6:this.exceptionState_0=8;var o=this.exception_0;throw Kotlin.isType(o,Throwable)?(this.local$body.destroy(o),o):o;case 7:return Unit;case 8:throw this.exception_0;default:throw this.state_0=8,new Error("State Machine Unreachable execution")}}catch(t){if(8===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Object.defineProperty(JsWebSocketSession.prototype,"coroutineContext",{get:function(){return this.coroutineContext_rv3h91$_0}}),Object.defineProperty(JsWebSocketSession.prototype,"incoming",{configurable:!0,get:function(){return this.incoming_z0xtng$_0}}),Object.defineProperty(JsWebSocketSession.prototype,"outgoing",{configurable:!0,get:function(){return this.outgoing_j2o89i$_0}}),Object.defineProperty(JsWebSocketSession.prototype,"extensions",{configurable:!0,get:function(){return emptyList()}}),Object.defineProperty(JsWebSocketSession.prototype,"closeReason",{configurable:!0,get:function(){return this.closeReason_qo69t6$_0}}),Object.defineProperty(JsWebSocketSession.prototype,"pingIntervalMillis",{configurable:!0,get:function(){throw new WebSocketException("Websocket ping-pong is not supported in JS engine.")},set:function(t){throw new WebSocketException("Websocket ping-pong is not supported in JS engine.")}}),Object.defineProperty(JsWebSocketSession.prototype,"timeoutMillis",{configurable:!0,get:function(){throw new WebSocketException("Websocket timeout is not supported in JS engine.")},set:function(t){throw new WebSocketException("Websocket timeout is not supported in JS engine.")}}),Object.defineProperty(JsWebSocketSession.prototype,"masking",{configurable:!0,get:function(){return!0},set:function(t){throw new WebSocketException("Masking switch is not supported in JS engine.")}}),Object.defineProperty(JsWebSocketSession.prototype,"maxFrameSize",{configurable:!0,get:function(){return Long$Companion$MAX_VALUE},set:function(t){throw new WebSocketException("Max frame size switch is not supported in Js engine.")}}),JsWebSocketSession.prototype.start_wwqcjq$$default=function(t){if(!t.isEmpty())throw IllegalArgumentException_init("Extensions are not supported.".toString())},JsWebSocketSession.prototype.flush=function(t){},JsWebSocketSession.prototype.terminate=function(){this._incoming_0.cancel_x5z25k$(),this._outgoing_0.cancel_x5z25k$(),cancel_2(this._closeReason_0,"WebSocket terminated"),this.websocket_0.close()},JsWebSocketSession.prototype.isReservedStatusCode_0=function(t){var e=CloseReason$Codes.Companion.byCode_mq22fl$(t);return null==e||equals(e,CloseReason$Codes.CLOSED_ABNORMALLY)},Coroutine$JsWebSocketSession_init$lambda.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$JsWebSocketSession_init$lambda.prototype=Object.create(CoroutineImpl.prototype),Coroutine$JsWebSocketSession_init$lambda.prototype.constructor=Coroutine$JsWebSocketSession_init$lambda,Coroutine$JsWebSocketSession_init$lambda.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.local$$receiver=this.local$this$JsWebSocketSession._outgoing_0,this.local$cause=null,this.exceptionState_0=5,this.local$tmp$=this.local$$receiver.iterator(),this.state_0=1;continue;case 1:if(this.state_0=2,this.result_0=this.local$tmp$.hasNext(this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 2:if(this.result_0){this.state_0=3;continue}this.state_0=4;continue;case 3:var t,e=this.local$tmp$.next(),n=this.local$this$JsWebSocketSession;switch(e.frameType.name){case"TEXT":var i=e.data;n.websocket_0.send(String_0(i));break;case"BINARY":var o=Kotlin.isType(t=e.data,Int8Array)?t:throwCCE(),r=o.buffer.slice(o.byteOffset,o.byteOffset+o.byteLength|0);n.websocket_0.send(r);break;case"CLOSE":var a,s=new BytePacketBuilder;try{writeFully_0(s,e.data),a=s.build()}catch(t){throw Kotlin.isType(t,Throwable)?(s.release(),t):t}var l=a,u=readShort(l),c=l.readText_vux9f0$();n._closeReason_0.complete_11rb$(new CloseReason(u,c)),n.isReservedStatusCode_0(u)?n.websocket_0.close():n.websocket_0.close(u,c)}this.state_0=1;continue;case 4:this.exceptionState_0=8,this.finallyPath_0=[7],this.state_0=6;continue;case 5:this.finallyPath_0=[8],this.exceptionState_0=6;var p=this.exception_0;throw Kotlin.isType(p,Throwable)?(this.local$cause=p,p):p;case 6:this.exceptionState_0=8,cancelConsumed(this.local$$receiver,this.local$cause),this.state_0=this.finallyPath_0.shift();continue;case 7:return this.result_0=Unit,this.result_0;case 8:throw this.exception_0;default:throw this.state_0=8,new Error("State Machine Unreachable execution")}}catch(t){if(8===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},JsWebSocketSession.$metadata$={kind:Kind_CLASS,simpleName:"JsWebSocketSession",interfaces:[DefaultWebSocketSession]};var package$io=_.io||(_.io={}),package$ktor=package$io.ktor||(package$io.ktor={}),package$client=package$ktor.client||(package$ktor.client={});package$client.HttpClient_744i18$=HttpClient,package$client.HttpClient_init_qii15z$=HttpClient_init,package$client.HttpClient=HttpClient_1,package$client.HttpClientConfig=HttpClientConfig;var package$call=package$client.call||(package$client.call={});Object.defineProperty(HttpClientCall,"Companion",{get:HttpClientCall$Companion_getInstance}),package$call.HttpClientCall_init_nfutnc$=HttpClientCall_init,package$call.HttpClientCall=HttpClientCall,$$importsForInline$$["ktor-ktor-utils-js-legacy"]=$module$ktor_ktor_utils_js_legacy,package$call.DoubleReceiveException=DoubleReceiveException,package$call.NoTransformationFoundException=NoTransformationFoundException,package$call.SavedHttpCall=SavedHttpCall,package$call.SavedHttpRequest=SavedHttpRequest,package$call.SavedHttpResponse=SavedHttpResponse,package$call.save_iicrl5$=save,package$call.UnsupportedContentTypeException=UnsupportedContentTypeException;var package$content=package$client.content||(package$client.content={});package$content.ObservableContent=ObservableContent;var package$engine=package$client.engine||(package$client.engine={});package$engine.HttpClientEngine=HttpClientEngine,package$engine.HttpClientEngineFactory=HttpClientEngineFactory,package$engine.createCallContext_antxd1$=createCallContext,package$engine.HttpClientEngineBase=HttpClientEngineBase,package$engine.ClientEngineClosedException=ClientEngineClosedException,package$engine.HttpClientEngineCapability=HttpClientEngineCapability,package$engine.HttpClientEngineConfig=HttpClientEngineConfig,package$engine.mergeHeaders_kqv6tz$=mergeHeaders,package$engine.callContext=callContext,Object.defineProperty(KtorCallContextElement,"Companion",{get:KtorCallContextElement$Companion_getInstance}),package$engine.KtorCallContextElement=KtorCallContextElement,$$importsForInline$$["kotlinx-coroutines-core"]=$module$kotlinx_coroutines_core,Object.defineProperty(BodyProgress,"Plugin",{get:BodyProgress$Plugin_getInstance});var package$plugins=package$client.plugins||(package$client.plugins={});package$plugins.BodyProgress=BodyProgress,package$plugins.withObservableDownload_qnpnm4$=withObservableDownload,package$plugins.addDefaultResponseValidation_bbdm9p$=addDefaultResponseValidation,package$plugins.ResponseException=ResponseException,package$plugins.RedirectResponseException=RedirectResponseException,package$plugins.ServerResponseException=ServerResponseException,package$plugins.ClientRequestException=ClientRequestException,package$plugins.defaultTransformers_ejcypf$=defaultTransformers,HttpCallValidator.Config=HttpCallValidator$Config,Object.defineProperty(HttpCallValidator,"Companion",{get:HttpCallValidator$Companion_getInstance}),package$plugins.HttpCallValidator=HttpCallValidator,package$plugins.HttpResponseValidator_44ieoj$=HttpResponseValidator,package$plugins.HandlerWrapper=HandlerWrapper,package$plugins.ExceptionHandlerWrapper=ExceptionHandlerWrapper,package$plugins.RequestExceptionHandlerWrapper=RequestExceptionHandlerWrapper,package$plugins.HttpClientPlugin=HttpClientPlugin,package$plugins.pluginOrNull_dd3wyz$=pluginOrNull,package$plugins.plugin_dd3wyz$=plugin,HttpPlainText.Config=HttpPlainText$Config,Object.defineProperty(HttpPlainText,"Plugin",{get:HttpPlainText$Plugin_getInstance}),package$plugins.HttpPlainText=HttpPlainText,HttpRedirect.Config=HttpRedirect$Config,Object.defineProperty(HttpRedirect,"Plugin",{get:HttpRedirect$Plugin_getInstance}),package$plugins.HttpRedirect=HttpRedirect,Object.defineProperty(HttpRequestLifecycle,"Plugin",{get:HttpRequestLifecycle$Plugin_getInstance}),package$plugins.HttpRequestLifecycle=HttpRequestLifecycle,package$plugins.Sender=Sender,HttpSend.Config=HttpSend$Config,Object.defineProperty(HttpSend,"Plugin",{get:HttpSend$Plugin_getInstance}),package$plugins.HttpSend=HttpSend,package$plugins.SendCountExceedException=SendCountExceedException,Object.defineProperty(HttpTimeout$HttpTimeoutCapabilityConfiguration,"Companion",{get:HttpTimeout$HttpTimeoutCapabilityConfiguration$Companion_getInstance}),HttpTimeout.HttpTimeoutCapabilityConfiguration_init_oq4a4q$=HttpTimeout$HttpTimeout$HttpTimeoutCapabilityConfiguration_init,HttpTimeout.HttpTimeoutCapabilityConfiguration=HttpTimeout$HttpTimeoutCapabilityConfiguration,Object.defineProperty(HttpTimeout,"Plugin",{get:HttpTimeout$Plugin_getInstance}),package$plugins.HttpTimeout=HttpTimeout,package$plugins.HttpRequestTimeoutException_init_s9rlw$=HttpRequestTimeoutException_init,package$plugins.HttpRequestTimeoutException=HttpRequestTimeoutException;var package$utils=package$client.utils||(package$client.utils={});package$utils.unwrapCancellationException_dbl4o4$=unwrapCancellationException,$$importsForInline$$["ktor-ktor-http-js-legacy"]=$module$ktor_ktor_http_js_legacy;var package$observer=package$plugins.observer||(package$plugins.observer={});package$observer.wrapWithContent_hinyhb$=wrapWithContent_1,package$observer.DelegatedResponse=DelegatedResponse;var package$websocket=package$plugins.websocket||(package$plugins.websocket={});package$websocket.ClientWebSocketSession=ClientWebSocketSession,package$websocket.DefaultClientWebSocketSession=DefaultClientWebSocketSession,package$websocket.DelegatingClientWebSocketSession=DelegatingClientWebSocketSession,package$websocket.get_converter_vw5opa$=get_converter,$$importsForInline$$["ktor-ktor-serialization-js-legacy"]=$module$ktor_ktor_serialization_js_legacy,$$importsForInline$$["ktor-ktor-websocket-serialization-js-legacy"]=$module$ktor_ktor_websocket_serialization_js_legacy,package$websocket.WebSocketContent=WebSocketContent,Object.defineProperty(package$websocket,"WebSocketCapability",{get:WebSocketCapability_getInstance}),Object.defineProperty(package$websocket,"WebSocketExtensionsCapability",{get:WebSocketExtensionsCapability_getInstance}),WebSockets.Config=WebSockets$Config,Object.defineProperty(WebSockets,"Plugin",{get:WebSockets$Plugin_getInstance}),package$websocket.WebSockets=WebSockets,package$websocket.WebSocketException=WebSocketException,package$websocket.webSocket_vs36k0$=webSocket,package$websocket.webSocket_z2dzuw$=webSocket_0,package$websocket.webSocket_ada30e$=webSocket_1;var package$request=package$client.request||(package$client.request={});package$request.ClientUpgradeContent=ClientUpgradeContent,package$request.DefaultHttpRequest=DefaultHttpRequest,package$request.HttpRequest=HttpRequest_0,Object.defineProperty(HttpRequestBuilder,"Companion",{get:HttpRequestBuilder$Companion_getInstance}),package$request.HttpRequestBuilder=HttpRequestBuilder,package$request.HttpRequestData=HttpRequestData,package$request.HttpResponseData=HttpResponseData,package$request.url_77nkxq$=url_0,package$request.url_g8iu3v$=url_1,package$request.isUpgradeRequest_5kadeu$=isUpgradeRequest,Object.defineProperty(HttpRequestPipeline,"Phases",{get:HttpRequestPipeline$Phases_getInstance}),package$request.HttpRequestPipeline=HttpRequestPipeline,Object.defineProperty(HttpSendPipeline,"Phases",{get:HttpSendPipeline$Phases_getInstance}),package$request.HttpSendPipeline=HttpSendPipeline,package$request.url_qpqkqe$=url_2,$$importsForInline$$["ktor-ktor-io-js-legacy"]=$module$ktor_ktor_io_js_legacy;var package$forms=package$request.forms||(package$request.forms={});package$forms.FormDataContent=FormDataContent,package$forms.MultiPartFormDataContent=MultiPartFormDataContent,package$request.get_port_ocert9$=get_port,package$request.header_rpxout$=header;var package$statement=package$client.statement||(package$client.statement={});package$statement.DefaultHttpResponse=DefaultHttpResponse,package$statement.HttpResponse=HttpResponse,package$statement.get_request_abn2de$=get_request,package$statement.complete_abn2de$=complete,package$statement.bodyAsText_89yka0$=bodyAsText,Object.defineProperty(HttpResponsePipeline,"Phases",{get:HttpResponsePipeline$Phases_getInstance}),package$statement.HttpResponsePipeline=HttpResponsePipeline,Object.defineProperty(HttpReceivePipeline,"Phases",{get:HttpReceivePipeline$Phases_getInstance}),package$statement.HttpReceivePipeline=HttpReceivePipeline,package$statement.HttpResponseContainer=HttpResponseContainer,package$statement.HttpStatement=HttpStatement,package$statement.readBytes_abn2de$=readBytes_1,package$utils.observable_joo1j6$=observable,package$utils.HttpResponseReceiveFail=HttpResponseReceiveFail,Object.defineProperty(package$utils,"EmptyContent",{get:EmptyContent_getInstance}),package$utils.buildHeaders_g6xk4w$=buildHeaders,package$client.HttpClient_f0veat$=HttpClient_2;var package$js=package$engine.js||(package$engine.js={});Object.defineProperty(package$js,"Js",{get:Js_getInstance}),package$js.JsClient=JsClient,package$js.JsClientEngine=JsClientEngine,package$js.JsError=JsError,package$js.toRaw_kenwlq$=toRaw,package$js.buildObject_ymnom6$=buildObject,package$js.asByteArray_es0py6$=asByteArray;var package$browser=package$js.browser||(package$js.browser={});package$browser.readBodyBrowser_qitd22$=readBodyBrowser,package$browser.channelFromStream_qgv9rp$=channelFromStream,package$browser.readChunk_blugp5$=readChunk;var package$compatibility=package$js.compatibility||(package$js.compatibility={});package$compatibility.commonFetch_gzh8gj$=commonFetch,package$compatibility.AbortController_8be2vx$=AbortController_0,package$compatibility.readBody_qitd22$=readBody;var package$node=package$js.node||(package$js.node={}),charset_1,toByteArray$result;package$node.readBodyNode_qitd22$=readBodyNode,package$plugins.platformRequestDefaultTransform_mb9ulc$=platformRequestDefaultTransform,package$plugins.platformResponseDefaultTransformers_h1fxjk$=platformResponseDefaultTransformers,package$websocket.JsWebSocketSession=JsWebSocketSession,config$ObjectLiteral.prototype.create_dxyxif$=HttpClientEngineFactory.prototype.create_dxyxif$,Object.defineProperty(HttpClientEngineBase.prototype,"supportedCapabilities",Object.getOwnPropertyDescriptor(HttpClientEngine.prototype,"supportedCapabilities")),HttpClientEngineBase.prototype.install_k5i6f8$=HttpClientEngine.prototype.install_k5i6f8$,HttpClientEngineBase.prototype.executeWithinCallContext_2kaaho$_0=HttpClientEngine.prototype.executeWithinCallContext_2kaaho$_0,HttpClientEngineBase.prototype.checkExtensions_1320zn$_0=HttpClientEngine.prototype.checkExtensions_1320zn$_0,KtorCallContextElement.prototype.fold_3cc69b$=CoroutineContext$Element.prototype.fold_3cc69b$,KtorCallContextElement.prototype.get_j3r2sn$=CoroutineContext$Element.prototype.get_j3r2sn$,KtorCallContextElement.prototype.minusKey_yeqjby$=CoroutineContext$Element.prototype.minusKey_yeqjby$,KtorCallContextElement.prototype.plus_1fupul$=CoroutineContext$Element.prototype.plus_1fupul$,BodyProgress$Plugin.prototype.prepare_oh3mgy$=HttpClientPlugin.prototype.prepare_oh3mgy$,DataConversion_0.prototype.prepare_oh3mgy$=HttpClientPlugin.prototype.prepare_oh3mgy$,DefaultRequest$Plugin.prototype.prepare_oh3mgy$=HttpClientPlugin.prototype.prepare_oh3mgy$,HttpCallValidator$Companion.prototype.prepare_oh3mgy$=HttpClientPlugin.prototype.prepare_oh3mgy$,Object.defineProperty(HttpRequest$ObjectLiteral.prototype,"coroutineContext",Object.getOwnPropertyDescriptor(HttpRequest_0.prototype,"coroutineContext")),HttpPlainText$Plugin.prototype.prepare_oh3mgy$=HttpClientPlugin.prototype.prepare_oh3mgy$,HttpRedirect$Plugin.prototype.prepare_oh3mgy$=HttpClientPlugin.prototype.prepare_oh3mgy$,HttpRequestLifecycle$Plugin.prototype.prepare_oh3mgy$=HttpClientPlugin.prototype.prepare_oh3mgy$,HttpRequestRetry$Plugin.prototype.prepare_oh3mgy$=HttpClientPlugin.prototype.prepare_oh3mgy$,HttpSend$Plugin.prototype.prepare_oh3mgy$=HttpClientPlugin.prototype.prepare_oh3mgy$,HttpTimeout$Plugin.prototype.prepare_oh3mgy$=HttpClientPlugin.prototype.prepare_oh3mgy$,UserAgent$Plugin.prototype.prepare_oh3mgy$=HttpClientPlugin.prototype.prepare_oh3mgy$,HttpCache$Companion.prototype.prepare_oh3mgy$=HttpClientPlugin.prototype.prepare_oh3mgy$,HttpCookies$Companion.prototype.prepare_oh3mgy$=HttpClientPlugin.prototype.prepare_oh3mgy$,ResponseObserver$Plugin.prototype.prepare_oh3mgy$=HttpClientPlugin.prototype.prepare_oh3mgy$,ClientWebSocketSession.prototype.send_q1ubw4$=WebSocketSession.prototype.send_q1ubw4$,DefaultClientWebSocketSession.prototype.start_wwqcjq$=DefaultWebSocketSession.prototype.start_wwqcjq$,WebSockets$Plugin.prototype.prepare_oh3mgy$=HttpClientPlugin.prototype.prepare_oh3mgy$,Js.prototype.create_dxyxif$=HttpClientEngineFactory.prototype.create_dxyxif$,JsClientEngine.prototype.executeWithinCallContext_2kaaho$_0=HttpClientEngine.prototype.executeWithinCallContext_2kaaho$_0,JsClientEngine.prototype.checkExtensions_1320zn$_0=HttpClientEngine.prototype.checkExtensions_1320zn$_0,JsWebSocketSession.prototype.send_q1ubw4$=DefaultWebSocketSession.prototype.send_q1ubw4$,JsWebSocketSession.prototype.start_wwqcjq$=DefaultWebSocketSession.prototype.start_wwqcjq$,CALL_COROUTINE=new CoroutineName("call-context"),CLIENT_CONFIG=new AttributeKey("client-config"),ENGINE_CAPABILITIES_KEY=new AttributeKey("EngineCapabilities"),DEFAULT_CAPABILITIES=setOf(HttpTimeout$Plugin_getInstance()),KTOR_DEFAULT_USER_AGENT="Ktor client",DATE_HEADERS=setOf_0([http.HttpHeaders.Date,http.HttpHeaders.Expires,http.HttpHeaders.LastModified,http.HttpHeaders.IfModifiedSince,http.HttpHeaders.IfUnmodifiedSince]),UploadProgressListenerAttributeKey=new AttributeKey("UploadProgressListenerAttributeKey"),DownloadProgressListenerAttributeKey=new AttributeKey("DownloadProgressListenerAttributeKey"),ValidateMark=new AttributeKey("ValidateMark"),NO_RESPONSE_TEXT="",BODY_FAILED_DECODING="",DEPRECATED_EXCEPTION_CTOR="Please, provide response text in constructor",ExpectSuccessAttributeKey=new AttributeKey("ExpectSuccessAttributeKey"),PLUGIN_INSTALLED_LIST=new AttributeKey("ApplicationPluginRegistry"),ALLOWED_FOR_REDIRECT=setOf_0([HttpMethod.Companion.Get,HttpMethod.Companion.Head]),MaxRetriesPerRequestAttributeKey=new AttributeKey("MaxRetriesPerRequestAttributeKey"),ShouldRetryPerRequestAttributeKey=new AttributeKey("ShouldRetryPerRequestAttributeKey"),ShouldRetryOnExceptionPerRequestAttributeKey=new AttributeKey("ShouldRetryOnExceptionPerRequestAttributeKey"),ModifyRequestPerRequestAttributeKey=new AttributeKey("ModifyRequestPerRequestAttributeKey"),RetryDelayPerRequestAttributeKey=new AttributeKey("RetryDelayPerRequestAttributeKey"),WEBSOCKET_VERSION="13",NONCE_SIZE=16,REQUEST_EXTENSIONS_KEY=new AttributeKey("Websocket extensions"),BodyTypeAttributeKey=new AttributeKey("BodyTypeAttributeKey");t:do{if(charset_1=charsets.Charsets.UTF_8,null!=charset_1&&charset_1.equals(charsets.Charsets.UTF_8)){toByteArray$result=encodeToByteArray("\r\n");break t}toByteArray$result=encodeToByteArray_0(charset_1.newEncoder(),"\r\n",0,"\r\n".length)}while(0);return RN_BYTES=toByteArray$result,DEFAULT_HTTP_POOL_SIZE=1e3,DEFAULT_HTTP_BUFFER_SIZE=4096,HttpRequestCreated=new EventDefinition,HttpRequestIsReadyForSending=new EventDefinition,HttpResponseReceived=new EventDefinition,HttpResponseReceiveFailed=new EventDefinition,HttpResponseCancelled=new EventDefinition,_},__WEBPACK_AMD_DEFINE_ARRAY__=[exports,__webpack_require__(421),__webpack_require__(197),__webpack_require__(847),__webpack_require__(122),__webpack_require__(595),__webpack_require__(266),__webpack_require__(376),__webpack_require__(677),__webpack_require__(851),__webpack_require__(891)],void 0===(__WEBPACK_AMD_DEFINE_RESULT__="function"==typeof(__WEBPACK_AMD_DEFINE_FACTORY__=factory)?__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__):__WEBPACK_AMD_DEFINE_FACTORY__)||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},266:function(t,e,n){var i,o,r;o=[e,n(421),n(197),n(847)],void 0===(r="function"==typeof(i=function(t,e,n,i){"use strict";var o=t.$$importsForInline$$||(t.$$importsForInline$$={}),r=n.kotlinx.coroutines.internal.LinkedListHead,a=e.equals,s=e.kotlin.Unit,l=e.throwCCE,u=e.kotlin.addSuppressed_oh0dqn$,c=Error,p=n.kotlinx.coroutines.internal.LinkedListNode,h=e.Kind.CLASS,_=n.kotlinx.coroutines.DisposableHandle,d=i.io.ktor.util.collections.CopyOnWriteHashMap;function f(){this.handlers_0=new d}function m(t){return new r}function $(t){return function(e){return a(e.handler,t)&&e.remove(),s}}function y(t,n,i){return function(i){var o,r;try{("function"==typeof(o=i.handler)?o:l())(t)}catch(t){if(!e.isType(t,c))throw t;if(null==(null!=(r=n.v)?(u(r,t),s):null)){var a=t;n.v=a}}return s}}function g(t){p.call(this),this.handler=t}function v(){}g.prototype=Object.create(p.prototype),g.prototype.constructor=g,f.prototype.subscribe_pxwj6z$=function(t,e){var n=new g(e);return this.handlers_0.computeIfAbsent_bci5j9$(t,m).addLast_l2j9rm$(n),n},f.prototype.unsubscribe_pxwj6z$=function(t,n){var i;if(null!=(i=this.handlers_0.get_trkh7z$(t)))for(var o=i._next;!a(o,i);)e.isType(o,g)&&$(n)(o),o=o._next},f.prototype.raise_asioqi$=function(t,n){var i,o,r={v:null};if(null!=(i=this.handlers_0.get_trkh7z$(t)))for(var s=i._next;!a(s,i);)e.isType(s,g)&&y(n,r)(s),s=s._next;if(null!=(o=r.v))throw o},g.prototype.dispose=function(){this.remove()},g.$metadata$={kind:h,simpleName:"HandlerRegistration",interfaces:[_,p]},f.$metadata$={kind:h,simpleName:"Events",interfaces:[]},v.$metadata$={kind:h,simpleName:"EventDefinition",interfaces:[]},o["kotlinx-coroutines-core"]=n;var b=t.io||(t.io={}),w=b.ktor||(b.ktor={}),x=w.events||(w.events={});return x.Events=f,x.EventDefinition=v,t})?i.apply(e,o):i)||(t.exports=r)},376:function(t,e,n){var i,o,r;o=[e,n(421),n(122),n(847),n(197)],void 0===(r="function"==typeof(i=function(t,e,n,i,o){"use strict";var r,a,s,l,u,c,p,h=t.$$importsForInline$$||(t.$$importsForInline$$={}),_=e.kotlin.Enum,d=e.Kind.CLASS,f=e.throwISE,m=e.equals,$=e.kotlin.collections.ArrayList_init_ww73n8$,y=e.toString,g=e.kotlin.collections.joinToString_fmv235$,v=e.hashCode,b=e.kotlin.ranges.CharRange,w=e.kotlin.collections.plus_q4559j$,x=e.kotlin.collections.plus_mydzjv$,k=e.unboxChar,C=e.toByte,E=e.kotlin.collections.toSet_7wnvza$,S=e.toBoxedChar,T=e.kotlin.collections.setOf_i5x0yv$,O=e.kotlin.collections.plus_khz7k3$,N=e.kotlin.collections.listOf_i5x0yv$,P=n.io.ktor.utils.io.charsets,I=n.io.ktor.utils.io.charsets.encode_fj4osb$,A=e.toChar,R=e.kotlin.Unit,j=e.kotlin.text.isSurrogate_myv2d0$,L=e.kotlin.text.concatToString_355ntz$,z=e.kotlin.text.StringBuilder_init_za3lpa$,D=n.io.ktor.utils.io.core.String_xge8xe$,M=e.kotlin.Exception_init_pdl1vj$,B=e.kotlin.Exception,F=e.kotlin.text.StringBuilder_init,U=e.kotlin.text.iterator_gw00vp$,q=n.io.ktor.utils.io.core.internal.prepareReadFirstHead_j319xh$,H=n.io.ktor.utils.io.core.internal.prepareReadNextHead_x2nit9$,G=n.io.ktor.utils.io.core.internal.completeReadHead_x2nit9$,K=e.kotlin.collections.collectionSizeOrDefault_ba2ldo$,V=e.kotlin.collections.plus_qloxvw$,Y=e.Kind.OBJECT,W=e.kotlin.collections.emptyList_287e2$,X=e.kotlin.text.startsWith_7epoxm$,Z=e.kotlin.collections.last_2p1efm$,J=e.Kind.INTERFACE,Q=e.kotlin.text.equals_igcy3c$,tt=e.kotlin.text.isBlank_gw00vp$,et=e.kotlin.text.indexOf_8eortd$,nt=e.kotlin.text.contains_sgbm27$,it=n.io.ktor.utils.io.charsets.get_name_2sg7fd$,ot=n.io.ktor.utils.io.charsets.Charset,rt=e.kotlin.IllegalArgumentException,at=e.kotlin.collections.Collection,st=e.throwCCE,lt=e.kotlin.text.trim_gw00vp$,ut=e.kotlin.collections.emptyMap_q3lmfv$,ct=i.io.ktor.util.toLowerCasePreservingASCIIRules_pdl1vz$,pt=e.kotlin.to_ujzrz7$,ht=e.kotlin.sequences.map_z5avom$,_t=(e.kotlin.sequences.filter_euau3h$,e.kotlin.text.endsWith_7epoxm$,e.kotlin.collections.toMap_ah2ab9$,e.kotlin.IllegalArgumentException_init_pdl1vj$),dt=e.kotlin.text.isWhitespace_myv2d0$,ft=e.kotlin.text.toLong_pdl1vz$,mt=(e.Long.ZERO,e.Long.fromInt(2147483647),e.kotlin.ranges.coerceIn_ekzx8g$,e.kotlin.NoSuchElementException,e.kotlin.collections.mapCapacity_za3lpa$),$t=e.kotlin.collections.LinkedHashMap_init_bwtc7$,yt=e.kotlin.collections.Map,gt=e.kotlin.collections.LinkedHashMap_init_q3lmfv$,vt=e.kotlin.collections.ArrayList_init_287e2$,bt=e.kotlin.text.Regex_init_61zpoe$,wt=e.defineInlineFunction,xt=e.wrapFunction,kt=e.kotlin.text.toInt_pdl1vz$,Ct=(i.io.ktor.util.date.Month.values,e.ensureNotNull),Et=(e.kotlin.ranges.IntRange,i.io.ktor.util.date.GMTDate_qlqxlw$,e.kotlin.IllegalStateException_init_pdl1vj$),St=e.kotlin.IllegalStateException,Tt=i.io.ktor.util.date.GMTDateParser,Ot=i.io.ktor.util.date.InvalidDateStringException,Nt=e.kotlin.text.padStart_vrc1nu$,Pt=i.io.ktor.util.toCharArray_pdl1vz$,It=e.kotlin.text.removePrefix_gsj5wt$,At=(e.kotlin.text.substringAfter_j4ogox$,i.io.ktor.util.caseInsensitiveMap_30y1fr$),Rt=e.kotlin.collections.asSequence_7wnvza$,jt=e.kotlin.lazy_klfg04$,Lt=e.kotlin.collections.firstOrNull_2p1efm$,zt=Error,Dt=e.kotlin.collections.get_lastIndex_55thoc$,Mt=e.kotlin.text.first_gw00vp$,Bt=e.kotlin.text.last_gw00vp$,Ft=e.kotlin.text.get_lastIndex_gw00vp$,Ut=i.io.ktor.util.StringValues,qt=i.io.ktor.util.StringValuesBuilderImpl,Ht=e.kotlin.collections.emptySet_287e2$,Gt=e.kotlin.collections.listOf_mh5how$,Kt=e.kotlin.collections.asList_us0mfu$,Vt=(e.kotlin.collections.toMap_6hr0sd$,i.io.ktor.util.StringValuesImpl),Yt=e.kotlin.text.toDoubleOrNull_pdl1vz$,Wt=e.kotlin.ranges.rangeTo_38ydlf$,Xt=e.kotlin.collections.sortedWith_eknfly$,Zt=e.kotlin.LazyThreadSafetyMode,Jt=e.kotlin.lazy_kls4a0$,Qt=e.kotlin.Comparator,te=e.kotlin.text.split_ip8yn$,ee=e.kotlin.collections.addAll_ipc267$,ne=e.kotlin.ranges.coerceAtLeast_dqglrj$,ie=(e.kotlin.text.substringBefore_j4ogox$,e.kotlin.collections.joinTo_gcc71v$),oe=(e.kotlin.text.removeSuffix_gsj5wt$,e.kotlin.collections.joinToString_cgipc5$,e.kotlin.text.lineSequence_gw00vp$),re=e.kotlin.sequences.mapNotNull_qpz9h9$,ae=e.kotlin.sequences.toList_veqyi0$,se=i.io.ktor.util.StringValuesBuilder,le=e.kotlin.text.split_o64adg$,ue=(e.kotlin.ranges.coerceAtMost_2p08ub$,e.kotlin.collections.filterNotNull_emfgvx$,e.kotlin.text.indexOf_l5u8uk$),ce=e.kotlin.text.startsWith_sgbm27$,pe=(e.kotlin.collections.toList_us0mfu$,e.kotlin.collections.first_2p1efm$),he=e.kotlin.collections.dropLast_yzln2o$,_e=(e.kotlin.collections.drop_ba2ldo$,e.kotlin.collections.toMutableList_4c7yge$),de=e.kotlin.text.indexOfAny_junqau$,fe=e.kotlin.text.get_indices_gw00vp$,me=e.kotlin.ranges.reversed_zf1xzc$,$e=i.io.ktor.util.isLowerCase_myv2d0$,ye=i.io.ktor.util.appendAll_k10e8h$,ge=(e.kotlin.ranges.until_dqglrj$,e.kotlin.text.substring_fc3b62$,i.io.ktor.util),ve=(i.io.ktor.util.generateNonce,i.io.ktor.util.AttributeKey),be=e.kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED,we=e.kotlin.coroutines.CoroutineImpl,xe=i.io.ktor.util.AttributesJsFn,ke=n.io.ktor.utils.io.ByteReadChannel,Ce=o.kotlinx.coroutines,Ee=n.io.ktor.utils.io.copyTo_47ygvz$,Se=n.io.ktor.utils.io.writer_x9a1ni$,Te=e.kotlin.text.take_6ic1pp$,Oe=e.kotlin.text.encodeToByteArray_pdl1vz$,Ne=n.io.ktor.utils.io.charsets.encodeToByteArray_fj4osb$,Pe=i.io.ktor.util.date.truncateToSeconds_bcxie9$,Ie=e.kotlin.text.drop_6ic1pp$,Ae=e.kotlin.text.Regex,Re=(e.kotlin.text.repeat_94bcnn$,e.kotlin.io.println_s8jyv4$,e.kotlin.collections.checkIndexOverflow_za3lpa$),je=i.io.ktor.util.sha1_fqrh44$,Le=i.io.ktor.util.encodeBase64_964n91$;function ze(t,e){t.set_puj7f4$(fi().ETag,e)}function De(t,e,n,i){void 0===e&&(e=!1),void 0===n&&(n=!1),void 0===i&&(i=P.Charsets.UTF_8);var o,a,s,u=F();return Qe(I(i.newEncoder(),t),(o=n,a=u,s=e,function(t){return t===C(32)?o?a.append_s8itvh$(43):a.append_pdl1vj$("%20"):r.contains_11rb$(t)||!s&&l.contains_11rb$(t)?a.append_s8itvh$(A(t)):a.append_pdl1vj$(Xe(t)),R})),u.toString()}function Me(t){return Fe(t,!0)}function Be(t){return function(e){return t.append_pdl1vj$(Xe(e)),R}}function Fe(t,e){for(var n=F(),i=P.Charsets.UTF_8,o=0;o>4),_[(s=d,d=s+1|0,s)]=Je(15&$)}}return L(_)}function He(t){return Ue(t,!0)}function Ge(t,e,n,i,o){return void 0===e&&(e=0),void 0===n&&(n=t.length),void 0===i&&(i=!1),void 0===o&&(o=P.Charsets.UTF_8),Ve(t,e,n,i,o)}function Ke(t,e,n,i){return void 0===e&&(e=0),void 0===n&&(n=t.length),void 0===i&&(i=P.Charsets.UTF_8),Ve(t,e,n,!1,i)}function Ve(t,e,n,i,o){for(var r=e;r255?l/3|0:l);o>n&&u.append_ezbsdh$(t,n,o);for(var c=o,p=null;c=i){var d,f=c;throw d=t.length,new We("Incomplete trailing HEX escape: "+e.subSequence(t,f,d).toString()+", in "+t+" at "+c)}var m=Ze(t.charCodeAt(c+1|0)),$=Ze(t.charCodeAt(c+2|0));if(-1===m||-1===$)throw new We("Wrong HEX escape: %"+String.fromCharCode(t.charCodeAt(c+1|0))+String.fromCharCode(t.charCodeAt(c+2|0))+", in "+t+", at "+c);p[(s=_,_=s+1|0,s)]=C((16*m|0)+$|0),c=c+3|0}u.append_pdl1vj$(D(p,0,_,a))}else u.append_s8itvh$(h),c=c+1|0}return u.toString()}function We(t){M(t,this),this.name="URLDecodeException"}function Xe(t){var n=255&t,i=e.charArray(3);return i[0]=37,i[1]=Je(n>>4),i[2]=Je(15&n),L(i)}function Ze(t){return new b(48,57).contains_mef7kx$(t)?t-48:new b(65,70).contains_mef7kx$(t)?t-65+10|0:new b(97,102).contains_mef7kx$(t)?t-97+10|0:-1}function Je(t){return A(t>=0&&t<=9?48+t:A(65+t)-10)}function Qe(t,e){t:do{var n,i,o=!0;if(null==(n=q(t,1)))break t;var r=n;try{for(;;){for(var a=r;a.writePosition>a.readPosition;)e(a.readByte());if(o=!1,null==(i=H(t,r)))break;r=i,o=!0}}finally{o&&G(t,r)}}while(0)}function tn(t,e){on(),void 0===e&&(e=W()),zn.call(this,t,e)}function en(){nn=this,this.File=new tn("file"),this.Mixed=new tn("mixed"),this.Attachment=new tn("attachment"),this.Inline=new tn("inline")}We.prototype=Object.create(B.prototype),We.prototype.constructor=We,tn.prototype=Object.create(zn.prototype),tn.prototype.constructor=tn,ln.prototype=Object.create(zn.prototype),ln.prototype.constructor=ln,On.prototype=Object.create(B.prototype),On.prototype.constructor=On,Vn.prototype=Object.create(qt.prototype),Vn.prototype.constructor=Vn,Zn.prototype=Object.create(Vt.prototype),Zn.prototype.constructor=Zn,mi.prototype=Object.create(rt.prototype),mi.prototype.constructor=mi,$i.prototype=Object.create(rt.prototype),$i.prototype.constructor=$i,yi.prototype=Object.create(rt.prototype),yi.prototype.constructor=yi,Wi.prototype=Object.create(qt.prototype),Wi.prototype.constructor=Wi,Xi.prototype=Object.create(Vt.prototype),Xi.prototype.constructor=Xi,mo.prototype=Object.create(St.prototype),mo.prototype.constructor=mo,hr.prototype=Object.create(sr.prototype),hr.prototype.constructor=hr,Bo.prototype=Object.create(hr.prototype),Bo.prototype.constructor=Bo,pr.prototype=Object.create(sr.prototype),pr.prototype.constructor=pr,Uo.prototype=Object.create(pr.prototype),Uo.prototype.constructor=Uo,Go.prototype=Object.create(Ho.prototype),Go.prototype.constructor=Go,Ko.prototype=Object.create(Ho.prototype),Ko.prototype.constructor=Ko,Vo.prototype=Object.create(Ho.prototype),Vo.prototype.constructor=Vo,Yo.prototype=Object.create(Ho.prototype),Yo.prototype.constructor=Yo,lr.prototype=Object.create(sr.prototype),lr.prototype.constructor=lr,ur.prototype=Object.create(sr.prototype),ur.prototype.constructor=ur,_r.prototype=Object.create(sr.prototype),_r.prototype.constructor=_r,dr.prototype=Object.create(hr.prototype),dr.prototype.constructor=dr,mr.prototype=Object.create(_.prototype),mr.prototype.constructor=mr,Ir.prototype=Object.create(Or.prototype),Ir.prototype.constructor=Ir,Ar.prototype=Object.create(Or.prototype),Ar.prototype.constructor=Ar,Rr.prototype=Object.create(Or.prototype),Rr.prototype.constructor=Rr,jr.prototype=Object.create(Or.prototype),jr.prototype.constructor=jr,Lr.prototype=Object.create(Or.prototype),Lr.prototype.constructor=Lr,zr.prototype=Object.create(Or.prototype),zr.prototype.constructor=zr,Dr.prototype=Object.create(Or.prototype),Dr.prototype.constructor=Dr,Mr.prototype=Object.create(Or.prototype),Mr.prototype.constructor=Mr,Br.prototype=Object.create(Or.prototype),Br.prototype.constructor=Br,Fr.prototype=Object.create(Or.prototype),Fr.prototype.constructor=Fr,We.$metadata$={kind:d,simpleName:"URLDecodeException",interfaces:[B]},Object.defineProperty(tn.prototype,"disposition",{configurable:!0,get:function(){return this.content}}),Object.defineProperty(tn.prototype,"name",{configurable:!0,get:function(){return this.parameter_61zpoe$(sn().Name)}}),tn.prototype.withParameter_qz9155$=function(t,e,n){void 0===n&&(n=!0);var i=n?function(t,e){if(!m(t,sn().FileNameAsterisk))return e;if(X(e,"utf-8''",!0))return e;var n;t:do{var i;for(i=U(e);i.hasNext();){var o=k(i.next());if(!c.contains_11rb$(S(o))){n=!1;break t}}n=!0}while(0);return n?e:"utf-8''"+qe(e,c)}(t,e):e;return new tn(this.disposition,V(this.parameters,ti(t,i)))},tn.prototype.withParameters_1wyvw$=function(t){return new tn(this.disposition,x(this.parameters,t))},tn.prototype.equals=function(t){return e.isType(t,tn)&&m(this.disposition,t.disposition)&&m(this.parameters,t.parameters)},tn.prototype.hashCode=function(){return(31*v(this.disposition)|0)+v(this.parameters)|0},en.prototype.parse_61zpoe$=function(t){var e=Z(ii(t));return new tn(e.value,e.params)},en.$metadata$={kind:Y,simpleName:"Companion",interfaces:[]};var nn=null;function on(){return null===nn&&new en,nn}function rn(){an=this,this.FileName="filename",this.FileNameAsterisk="filename*",this.Name="name",this.CreationDate="creation-date",this.ModificationDate="modification-date",this.ReadDate="read-date",this.Size="size",this.Handling="handling"}rn.$metadata$={kind:Y,simpleName:"Parameters",interfaces:[]};var an=null;function sn(){return null===an&&new rn,an}function ln(t,e,n,i){pn(),void 0===i&&(i=W()),zn.call(this,n,i),this.contentType=t,this.contentSubtype=e}function un(){cn=this,this.Any=Tn("*","*")}tn.$metadata$={kind:d,simpleName:"ContentDisposition",interfaces:[zn]},ln.prototype.withParameter_puj7f4$=function(t,e){return this.hasParameter_0(t,e)?this:new ln(this.contentType,this.contentSubtype,this.content,V(this.parameters,ti(t,e)))},ln.prototype.hasParameter_0=function(t,n){switch(this.parameters.size){case 0:return!1;case 1:var i=this.parameters.get_za3lpa$(0);return Q(i.name,t,!0)&&Q(i.value,n,!0);default:var o,r=this.parameters;t:do{var a;if(e.isType(r,at)&&r.isEmpty()){o=!1;break t}for(a=r.iterator();a.hasNext();){var s=a.next();if(Q(s.name,t,!0)&&Q(s.value,n,!0)){o=!0;break t}}o=!1}while(0);return o}},ln.prototype.withoutParameters=function(){return this.parameters.isEmpty()?this:Tn(this.contentType,this.contentSubtype)},ln.prototype.match_9v5yzd$=function(t){var n,i;if(!m(t.contentType,"*")&&!Q(t.contentType,this.contentType,!0))return!1;if(!m(t.contentSubtype,"*")&&!Q(t.contentSubtype,this.contentSubtype,!0))return!1;for(n=t.parameters.iterator();n.hasNext();){var o=n.next(),r=o.component1(),a=o.component2();if(m(r,"*"))if(m(a,"*"))i=!0;else{var s,l=this.parameters;t:do{var u;if(e.isType(l,at)&&l.isEmpty()){s=!1;break t}for(u=l.iterator();u.hasNext();){var c=u.next();if(Q(c.value,a,!0)){s=!0;break t}}s=!1}while(0);i=s}else{var p=this.parameter_61zpoe$(r);i=m(a,"*")?null!=p:Q(p,a,!0)}if(!i)return!1}return!0},ln.prototype.match_61zpoe$=function(t){return this.match_9v5yzd$(pn().parse_61zpoe$(t))},ln.prototype.equals=function(t){return e.isType(t,ln)&&Q(this.contentType,t.contentType,!0)&&Q(this.contentSubtype,t.contentSubtype,!0)&&m(this.parameters,t.parameters)},ln.prototype.hashCode=function(){var t=v(this.contentType.toLowerCase());return(t=t+((31*t|0)+v(this.contentSubtype.toLowerCase()))|0)+(31*v(this.parameters)|0)|0},un.prototype.parse_61zpoe$=function(t){if(tt(t))return this.Any;var n=Z(ii(t)),i=n.value,o=n.params,r=et(i,47);if(-1===r){var a;if(m(lt(e.isCharSequence(a=i)?a:st()).toString(),"*"))return this.Any;throw new On(t)}var s,l=i.substring(0,r),u=lt(e.isCharSequence(s=l)?s:st()).toString();if(0===u.length)throw new On(t);var c,p=r+1|0,h=i.substring(p),_=lt(e.isCharSequence(c=h)?c:st()).toString();if(nt(u,32)||nt(_,32))throw new On(t);if(0===_.length||nt(_,47))throw new On(t);return Tn(u,_,o)},un.$metadata$={kind:Y,simpleName:"Companion",interfaces:[]};var cn=null;function pn(){return null===cn&&new un,cn}function hn(){_n=this,this.Any=Tn("application","*"),this.Atom=Tn("application","atom+xml"),this.Cbor=Tn("application","cbor"),this.Json=Tn("application","json"),this.HalJson=Tn("application","hal+json"),this.JavaScript=Tn("application","javascript"),this.OctetStream=Tn("application","octet-stream"),this.FontWoff=Tn("application","font-woff"),this.Rss=Tn("application","rss+xml"),this.Xml=Tn("application","xml"),this.Xml_Dtd=Tn("application","xml-dtd"),this.Zip=Tn("application","zip"),this.GZip=Tn("application","gzip"),this.FormUrlEncoded=Tn("application","x-www-form-urlencoded"),this.Pdf=Tn("application","pdf"),this.Xlsx=Tn("application","vnd.openxmlformats-officedocument.spreadsheetml.sheet"),this.Docx=Tn("application","vnd.openxmlformats-officedocument.wordprocessingml.document"),this.Pptx=Tn("application","vnd.openxmlformats-officedocument.presentationml.presentation"),this.ProtoBuf=Tn("application","protobuf"),this.Wasm=Tn("application","wasm"),this.ProblemJson=Tn("application","problem+json"),this.ProblemXml=Tn("application","problem+xml")}hn.$metadata$={kind:Y,simpleName:"Application",interfaces:[]};var _n=null;function dn(){fn=this,this.Any=Tn("audio","*"),this.MP4=Tn("audio","mp4"),this.MPEG=Tn("audio","mpeg"),this.OGG=Tn("audio","ogg")}dn.$metadata$={kind:Y,simpleName:"Audio",interfaces:[]};var fn=null;function mn(){$n=this,this.Any=Tn("image","*"),this.GIF=Tn("image","gif"),this.JPEG=Tn("image","jpeg"),this.PNG=Tn("image","png"),this.SVG=Tn("image","svg+xml"),this.XIcon=Tn("image","x-icon")}mn.$metadata$={kind:Y,simpleName:"Image",interfaces:[]};var $n=null;function yn(){gn=this,this.Any=Tn("message","*"),this.Http=Tn("message","http")}yn.$metadata$={kind:Y,simpleName:"Message",interfaces:[]};var gn=null;function vn(){bn=this,this.Any=Tn("multipart","*"),this.Mixed=Tn("multipart","mixed"),this.Alternative=Tn("multipart","alternative"),this.Related=Tn("multipart","related"),this.FormData=Tn("multipart","form-data"),this.Signed=Tn("multipart","signed"),this.Encrypted=Tn("multipart","encrypted"),this.ByteRanges=Tn("multipart","byteranges")}vn.$metadata$={kind:Y,simpleName:"MultiPart",interfaces:[]};var bn=null;function wn(){xn=this,this.Any=Tn("text","*"),this.Plain=Tn("text","plain"),this.CSS=Tn("text","css"),this.CSV=Tn("text","csv"),this.Html=Tn("text","html"),this.JavaScript=Tn("text","javascript"),this.VCard=Tn("text","vcard"),this.Xml=Tn("text","xml"),this.EventStream=Tn("text","event-stream")}wn.$metadata$={kind:Y,simpleName:"Text",interfaces:[]};var xn=null;function kn(){Sn=this,this.Any=Tn("video","*"),this.MPEG=Tn("video","mpeg"),this.MP4=Tn("video","mp4"),this.OGG=Tn("video","ogg"),this.QuickTime=Tn("video","quicktime")}kn.$metadata$={kind:Y,simpleName:"Video",interfaces:[]};var Cn,En,Sn=null;function Tn(t,e,n,i){return void 0===n&&(n=W()),i=i||Object.create(ln.prototype),ln.call(i,t,e,t+"/"+e,n),i}function On(t){M("Bad Content-Type format: "+t,this),this.name="BadContentTypeFormatException"}function Nn(t){var n,i;if(null!=(n=t.parameter_61zpoe$("charset"))){var o;t:do{try{o=ot.Companion.forName_61zpoe$(n)}catch(t){if(e.isType(t,rt)){o=null;break t}throw t}}while(0);i=o}else i=null;return i}function Pn(t){var n,i,o=lt(e.isCharSequence(n=t)?n:st()).toString();for(i=Cn.iterator();i.hasNext();){var r=i.next();try{return new Tt(r).parse_61zpoe$(t)}catch(t){if(!e.isType(t,Ot))throw t}}throw Et(("Failed to parse date: "+o).toString())}function In(t){var e=F();return e.append_pdl1vj$(t.dayOfWeek.value+", "),e.append_pdl1vj$(An(t.dayOfMonth,2)+" "),e.append_pdl1vj$(t.month.value+" "),e.append_pdl1vj$(An(t.year,4)),e.append_pdl1vj$(" "+An(t.hours,2)+":"+An(t.minutes,2)+":"+An(t.seconds,2)+" "),e.append_pdl1vj$("GMT"),e.toString()}function An(t,e){return Nt(t.toString(),e,48)}function Rn(t){var e=t.component1(),n=t.component2();return pt(n,e)}function jn(t){var e,n=gt();for(e=t.iterator();e.hasNext();){var i,o=e.next(),r=o.first,a=n.get_11rb$(r);if(null==a){var s=vt();n.put_xwzc9p$(r,s),i=s}else i=a;i.add_11rb$(o)}var l,u=$t(mt(n.size));for(l=n.entries.iterator();l.hasNext();){var c,p=l.next(),h=u.put_xwzc9p$,_=p.key,d=p.value,f=$(K(d,10));for(c=d.iterator();c.hasNext();){var m=c.next();f.add_11rb$(m.second)}h.call(u,_,f)}return u}function Ln(t){try{return pn().parse_61zpoe$(t)}catch(n){throw e.isType(n,zt)?new rt("Failed to parse "+t,n):n}}function zn(t,e){Bn(),void 0===e&&(e=W()),this.content=t,this.parameters=e}function Dn(){Mn=this}ln.$metadata$={kind:d,simpleName:"ContentType",interfaces:[zn]},On.$metadata$={kind:d,simpleName:"BadContentTypeFormatException",interfaces:[B]},zn.prototype.parameter_61zpoe$=function(t){var e;e=Dt(this.parameters);for(var n=0;n<=e;n++){var i=this.parameters.get_za3lpa$(n);if(Q(i.name,t,!0))return i.value}return null},zn.prototype.toString=function(){if(this.parameters.isEmpty())return this.content;var t,e=this.content.length,n=0;for(t=this.parameters.iterator();t.hasNext();){var i=t.next();n=n+(i.name.length+i.value.length+3|0)|0}var o,r=z(e+n|0);r.append_pdl1vj$(this.content),o=Dt(this.parameters);for(var a=0;a<=o;a++){var s=this.parameters.get_za3lpa$(a);r.append_pdl1vj$("; "),r.append_pdl1vj$(s.name),r.append_pdl1vj$("=");var l=s.value;Fn(l)?r.append_pdl1vj$(Un(l)):r.append_pdl1vj$(l)}return r.toString()},Dn.prototype.parse_g5gu5m$=wt("ktor-ktor-http-js-legacy.io.ktor.http.HeaderValueWithParameters.Companion.parse_g5gu5m$",xt((function(){var n=t.io.ktor.http.parseHeaderValue_pdl1vj$,i=e.kotlin.collections.last_2p1efm$;return function(t,e){var o=i(n(t));return e(o.value,o.params)}}))),Dn.$metadata$={kind:Y,simpleName:"Companion",interfaces:[]};var Mn=null;function Bn(){return null===Mn&&new Dn,Mn}function Fn(t){var e;if(0===t.length)return!0;if(function(t){if(t.length<2)return!1;if(34!==Mt(t)||34!==Bt(t))return!1;var e=1;do{var n=et(t,34,e);if(n===Ft(t))break;for(var i=0,o=n-1|0;92===t.charCodeAt(o);)i=i+1|0,o=o-1|0;if(i%2==0)return!1;e=n+1|0}while(e?@[\\]{}',t)}function vi(){}function bi(){}function wi(t){var e;return null!=(e=t.headers.get_61zpoe$(fi().ContentType))?pn().parse_61zpoe$(e):null}function xi(t){Ei(),this.value=t}function ki(){Ci=this,this.Get=new xi("GET"),this.Post=new xi("POST"),this.Put=new xi("PUT"),this.Patch=new xi("PATCH"),this.Delete=new xi("DELETE"),this.Head=new xi("HEAD"),this.Options=new xi("OPTIONS"),this.DefaultMethods=N([this.Get,this.Post,this.Put,this.Patch,this.Delete,this.Head,this.Options])}mi.$metadata$={kind:d,simpleName:"UnsafeHeaderException",interfaces:[rt]},$i.$metadata$={kind:d,simpleName:"IllegalHeaderNameException",interfaces:[rt]},yi.$metadata$={kind:d,simpleName:"IllegalHeaderValueException",interfaces:[rt]},vi.$metadata$={kind:J,simpleName:"HttpMessage",interfaces:[]},bi.$metadata$={kind:J,simpleName:"HttpMessageBuilder",interfaces:[]},ki.prototype.parse_61zpoe$=function(t){return m(t,this.Get.value)?this.Get:m(t,this.Post.value)?this.Post:m(t,this.Put.value)?this.Put:m(t,this.Patch.value)?this.Patch:m(t,this.Delete.value)?this.Delete:m(t,this.Head.value)?this.Head:m(t,this.Options.value)?this.Options:new xi(t)},ki.$metadata$={kind:Y,simpleName:"Companion",interfaces:[]};var Ci=null;function Ei(){return null===Ci&&new ki,Ci}function Si(t,e,n){Ni(),this.name=t,this.major=e,this.minor=n}function Ti(){Oi=this,this.HTTP_2_0=new Si("HTTP",2,0),this.HTTP_1_1=new Si("HTTP",1,1),this.HTTP_1_0=new Si("HTTP",1,0),this.SPDY_3=new Si("SPDY",3,0),this.QUIC=new Si("QUIC",1,0)}xi.$metadata$={kind:d,simpleName:"HttpMethod",interfaces:[]},xi.prototype.component1=function(){return this.value},xi.prototype.copy_61zpoe$=function(t){return new xi(void 0===t?this.value:t)},xi.prototype.toString=function(){return"HttpMethod(value="+e.toString(this.value)+")"},xi.prototype.hashCode=function(){var t=0;return 31*t+e.hashCode(this.value)|0},xi.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.value,t.value)},Ti.prototype.fromValue_3m52m6$=function(t,e,n){return m(t,"HTTP")&&1===e&&1===n?this.HTTP_1_1:m(t,"HTTP")&&2===e&&0===n?this.HTTP_2_0:new Si(t,e,n)},Ti.prototype.parse_6bul2c$=function(t){var e=te(t,["/","."]);if(3!==e.size)throw Et(("Failed to parse HttpProtocolVersion. Expected format: protocol/major.minor, but actual: "+t).toString());var n=e.get_za3lpa$(0),i=e.get_za3lpa$(1),o=e.get_za3lpa$(2);return this.fromValue_3m52m6$(n,kt(i),kt(o))},Ti.$metadata$={kind:Y,simpleName:"Companion",interfaces:[]};var Oi=null;function Ni(){return null===Oi&&new Ti,Oi}function Pi(t,e){ji(),this.value=t,this.description=e}function Ii(){Ri=this,this.Continue=new Pi(100,"Continue"),this.SwitchingProtocols=new Pi(101,"Switching Protocols"),this.Processing=new Pi(102,"Processing"),this.OK=new Pi(200,"OK"),this.Created=new Pi(201,"Created"),this.Accepted=new Pi(202,"Accepted"),this.NonAuthoritativeInformation=new Pi(203,"Non-Authoritative Information"),this.NoContent=new Pi(204,"No Content"),this.ResetContent=new Pi(205,"Reset Content"),this.PartialContent=new Pi(206,"Partial Content"),this.MultiStatus=new Pi(207,"Multi-Status"),this.MultipleChoices=new Pi(300,"Multiple Choices"),this.MovedPermanently=new Pi(301,"Moved Permanently"),this.Found=new Pi(302,"Found"),this.SeeOther=new Pi(303,"See Other"),this.NotModified=new Pi(304,"Not Modified"),this.UseProxy=new Pi(305,"Use Proxy"),this.SwitchProxy=new Pi(306,"Switch Proxy"),this.TemporaryRedirect=new Pi(307,"Temporary Redirect"),this.PermanentRedirect=new Pi(308,"Permanent Redirect"),this.BadRequest=new Pi(400,"Bad Request"),this.Unauthorized=new Pi(401,"Unauthorized"),this.PaymentRequired=new Pi(402,"Payment Required"),this.Forbidden=new Pi(403,"Forbidden"),this.NotFound=new Pi(404,"Not Found"),this.MethodNotAllowed=new Pi(405,"Method Not Allowed"),this.NotAcceptable=new Pi(406,"Not Acceptable"),this.ProxyAuthenticationRequired=new Pi(407,"Proxy Authentication Required"),this.RequestTimeout=new Pi(408,"Request Timeout"),this.Conflict=new Pi(409,"Conflict"),this.Gone=new Pi(410,"Gone"),this.LengthRequired=new Pi(411,"Length Required"),this.PreconditionFailed=new Pi(412,"Precondition Failed"),this.PayloadTooLarge=new Pi(413,"Payload Too Large"),this.RequestURITooLong=new Pi(414,"Request-URI Too Long"),this.UnsupportedMediaType=new Pi(415,"Unsupported Media Type"),this.RequestedRangeNotSatisfiable=new Pi(416,"Requested Range Not Satisfiable"),this.ExpectationFailed=new Pi(417,"Expectation Failed"),this.UnprocessableEntity=new Pi(422,"Unprocessable Entity"),this.Locked=new Pi(423,"Locked"),this.FailedDependency=new Pi(424,"Failed Dependency"),this.UpgradeRequired=new Pi(426,"Upgrade Required"),this.TooManyRequests=new Pi(429,"Too Many Requests"),this.RequestHeaderFieldTooLarge=new Pi(431,"Request Header Fields Too Large"),this.InternalServerError=new Pi(500,"Internal Server Error"),this.NotImplemented=new Pi(501,"Not Implemented"),this.BadGateway=new Pi(502,"Bad Gateway"),this.ServiceUnavailable=new Pi(503,"Service Unavailable"),this.GatewayTimeout=new Pi(504,"Gateway Timeout"),this.VersionNotSupported=new Pi(505,"HTTP Version Not Supported"),this.VariantAlsoNegotiates=new Pi(506,"Variant Also Negotiates"),this.InsufficientStorage=new Pi(507,"Insufficient Storage"),this.allStatusCodes=Li();var t,e=this.allStatusCodes,n=ne(mt(K(e,10)),16),i=$t(n);for(t=e.iterator();t.hasNext();){var o=t.next();i.put_xwzc9p$(o.value,o)}this.statusCodesMap_0=i}Si.prototype.toString=function(){return this.name+"/"+this.major+"."+this.minor},Si.$metadata$={kind:d,simpleName:"HttpProtocolVersion",interfaces:[]},Si.prototype.component1=function(){return this.name},Si.prototype.component2=function(){return this.major},Si.prototype.component3=function(){return this.minor},Si.prototype.copy_3m52m6$=function(t,e,n){return new Si(void 0===t?this.name:t,void 0===e?this.major:e,void 0===n?this.minor:n)},Si.prototype.hashCode=function(){var t=0;return 31*(t=31*(t=31*t+e.hashCode(this.name)|0)+e.hashCode(this.major)|0)+e.hashCode(this.minor)|0},Si.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.name,t.name)&&e.equals(this.major,t.major)&&e.equals(this.minor,t.minor)},Pi.prototype.toString=function(){return this.value.toString()+" "+this.description},Pi.prototype.equals=function(t){return e.isType(t,Pi)&&t.value===this.value},Pi.prototype.hashCode=function(){return v(this.value)},Pi.prototype.description_61zpoe$=function(t){return this.copy_19mbxw$(void 0,t)},Ii.prototype.fromValue_za3lpa$=function(t){var e;return null!=(e=this.statusCodesMap_0.get_11rb$(t))?e:new Pi(t,"Unknown Status Code")},Ii.$metadata$={kind:Y,simpleName:"Companion",interfaces:[]};var Ai,Ri=null;function ji(){return null===Ri&&new Ii,Ri}function Li(){return N([ji().Continue,ji().SwitchingProtocols,ji().Processing,ji().OK,ji().Created,ji().Accepted,ji().NonAuthoritativeInformation,ji().NoContent,ji().ResetContent,ji().PartialContent,ji().MultiStatus,ji().MultipleChoices,ji().MovedPermanently,ji().Found,ji().SeeOther,ji().NotModified,ji().UseProxy,ji().SwitchProxy,ji().TemporaryRedirect,ji().PermanentRedirect,ji().BadRequest,ji().Unauthorized,ji().PaymentRequired,ji().Forbidden,ji().NotFound,ji().MethodNotAllowed,ji().NotAcceptable,ji().ProxyAuthenticationRequired,ji().RequestTimeout,ji().Conflict,ji().Gone,ji().LengthRequired,ji().PreconditionFailed,ji().PayloadTooLarge,ji().RequestURITooLong,ji().UnsupportedMediaType,ji().RequestedRangeNotSatisfiable,ji().ExpectationFailed,ji().UnprocessableEntity,ji().Locked,ji().FailedDependency,ji().UpgradeRequired,ji().TooManyRequests,ji().RequestHeaderFieldTooLarge,ji().InternalServerError,ji().NotImplemented,ji().BadGateway,ji().ServiceUnavailable,ji().GatewayTimeout,ji().VersionNotSupported,ji().VariantAlsoNegotiates,ji().InsufficientStorage])}function zi(t){var e=F();return Mi(t,e),e.toString()}function Di(t){var e=Ue(t.first,!0);return null==t.second?e:e+"="+He(y(t.second))}function Mi(t,e){ie(t,e,"&",void 0,void 0,void 0,void 0,Di)}function Bi(t){var n,i=lt(e.isCharSequence(n=t)?n:st()).toString();if(0===i.length)return null;var o=et(i,44),r=i.substring(0,o),a=o+1|0,s=i.substring(a);return pt(ct(It(r,".")),Ln(s))}function Fi(){return ae(re(oe("\n.123,application/vnd.lotus-1-2-3\n.3dmf,x-world/x-3dmf\n.3dml,text/vnd.in3d.3dml\n.3dm,x-world/x-3dmf\n.3g2,video/3gpp2\n.3gp,video/3gpp\n.7z,application/x-7z-compressed\n.aab,application/x-authorware-bin\n.aac,audio/aac\n.aam,application/x-authorware-map\n.a,application/octet-stream\n.aas,application/x-authorware-seg\n.abc,text/vnd.abc\n.abw,application/x-abiword\n.ac,application/pkix-attr-cert\n.acc,application/vnd.americandynamics.acc\n.ace,application/x-ace-compressed\n.acgi,text/html\n.acu,application/vnd.acucobol\n.adp,audio/adpcm\n.aep,application/vnd.audiograph\n.afl,video/animaflex\n.afp,application/vnd.ibm.modcap\n.ahead,application/vnd.ahead.space\n.ai,application/postscript\n.aif,audio/aiff\n.aifc,audio/aiff\n.aiff,audio/aiff\n.aim,application/x-aim\n.aip,text/x-audiosoft-intra\n.air,application/vnd.adobe.air-application-installer-package+zip\n.ait,application/vnd.dvb.ait\n.ami,application/vnd.amiga.ami\n.ani,application/x-navi-animation\n.aos,application/x-nokia-9000-communicator-add-on-software\n.apk,application/vnd.android.package-archive\n.application,application/x-ms-application\n,application/pgp-encrypted\n.apr,application/vnd.lotus-approach\n.aps,application/mime\n.arc,application/octet-stream\n.arj,application/arj\n.arj,application/octet-stream\n.art,image/x-jg\n.asf,video/x-ms-asf\n.asm,text/x-asm\n.aso,application/vnd.accpac.simply.aso\n.asp,text/asp\n.asx,application/x-mplayer2\n.asx,video/x-ms-asf\n.asx,video/x-ms-asf-plugin\n.atc,application/vnd.acucorp\n.atomcat,application/atomcat+xml\n.atomsvc,application/atomsvc+xml\n.atom,application/atom+xml\n.atx,application/vnd.antix.game-component\n.au,audio/basic\n.au,audio/x-au\n.avi,video/avi\n.avi,video/msvideo\n.avi,video/x-msvideo\n.avs,video/avs-video\n.aw,application/applixware\n.azf,application/vnd.airzip.filesecure.azf\n.azs,application/vnd.airzip.filesecure.azs\n.azw,application/vnd.amazon.ebook\n.bcpio,application/x-bcpio\n.bdf,application/x-font-bdf\n.bdm,application/vnd.syncml.dm+wbxml\n.bed,application/vnd.realvnc.bed\n.bh2,application/vnd.fujitsu.oasysprs\n.bin,application/macbinary\n.bin,application/mac-binary\n.bin,application/octet-stream\n.bin,application/x-binary\n.bin,application/x-macbinary\n.bmi,application/vnd.bmi\n.bm,image/bmp\n.bmp,image/bmp\n.bmp,image/x-windows-bmp\n.boo,application/book\n.book,application/book\n.box,application/vnd.previewsystems.box\n.boz,application/x-bzip2\n.bsh,application/x-bsh\n.btif,image/prs.btif\n.bz2,application/x-bzip2\n.bz,application/x-bzip\n.c11amc,application/vnd.cluetrust.cartomobile-config\n.c11amz,application/vnd.cluetrust.cartomobile-config-pkg\n.c4g,application/vnd.clonk.c4group\n.cab,application/vnd.ms-cab-compressed\n.car,application/vnd.curl.car\n.cat,application/vnd.ms-pki.seccat\n.ccad,application/clariscad\n.cco,application/x-cocoa\n.cc,text/plain\n.cc,text/x-c\n.ccxml,application/ccxml+xml,\n.cdbcmsg,application/vnd.contact.cmsg\n.cdf,application/cdf\n.cdf,application/x-cdf\n.cdf,application/x-netcdf\n.cdkey,application/vnd.mediastation.cdkey\n.cdmia,application/cdmi-capability\n.cdmic,application/cdmi-container\n.cdmid,application/cdmi-domain\n.cdmio,application/cdmi-object\n.cdmiq,application/cdmi-queue\n.cdx,chemical/x-cdx\n.cdxml,application/vnd.chemdraw+xml\n.cdy,application/vnd.cinderella\n.cer,application/pkix-cert\n.cgm,image/cgm\n.cha,application/x-chat\n.chat,application/x-chat\n.chm,application/vnd.ms-htmlhelp\n.chrt,application/vnd.kde.kchart\n.cif,chemical/x-cif\n.cii,application/vnd.anser-web-certificate-issue-initiation\n.cil,application/vnd.ms-artgalry\n.cla,application/vnd.claymore\n.class,application/java\n.class,application/java-byte-code\n.class,application/java-vm\n.class,application/x-java-class\n.clkk,application/vnd.crick.clicker.keyboard\n.clkp,application/vnd.crick.clicker.palette\n.clkt,application/vnd.crick.clicker.template\n.clkw,application/vnd.crick.clicker.wordbank\n.clkx,application/vnd.crick.clicker\n.clp,application/x-msclip\n.cmc,application/vnd.cosmocaller\n.cmdf,chemical/x-cmdf\n.cml,chemical/x-cml\n.cmp,application/vnd.yellowriver-custom-menu\n.cmx,image/x-cmx\n.cod,application/vnd.rim.cod\n.com,application/octet-stream\n.com,text/plain\n.conf,text/plain\n.cpio,application/x-cpio\n.cpp,text/x-c\n.cpt,application/mac-compactpro\n.cpt,application/x-compactpro\n.cpt,application/x-cpt\n.crd,application/x-mscardfile\n.crl,application/pkcs-crl\n.crl,application/pkix-crl\n.crt,application/pkix-cert\n.crt,application/x-x509-ca-cert\n.crt,application/x-x509-user-cert\n.cryptonote,application/vnd.rig.cryptonote\n.csh,application/x-csh\n.csh,text/x-script.csh\n.csml,chemical/x-csml\n.csp,application/vnd.commonspace\n.css,text/css\n.csv,text/csv\n.c,text/plain\n.c++,text/plain\n.c,text/x-c\n.cu,application/cu-seeme\n.curl,text/vnd.curl\n.cww,application/prs.cww\n.cxx,text/plain\n.dat,binary/octet-stream\n.dae,model/vnd.collada+xml\n.daf,application/vnd.mobius.daf\n.davmount,application/davmount+xml\n.dcr,application/x-director\n.dcurl,text/vnd.curl.dcurl\n.dd2,application/vnd.oma.dd2+xml\n.ddd,application/vnd.fujixerox.ddd\n.deb,application/x-debian-package\n.deepv,application/x-deepv\n.def,text/plain\n.der,application/x-x509-ca-cert\n.dfac,application/vnd.dreamfactory\n.dif,video/x-dv\n.dir,application/x-director\n.dis,application/vnd.mobius.dis\n.djvu,image/vnd.djvu\n.dl,video/dl\n.dl,video/x-dl\n.dna,application/vnd.dna\n.doc,application/msword\n.docm,application/vnd.ms-word.document.macroenabled.12\n.docx,application/vnd.openxmlformats-officedocument.wordprocessingml.document\n.dot,application/msword\n.dotm,application/vnd.ms-word.template.macroenabled.12\n.dotx,application/vnd.openxmlformats-officedocument.wordprocessingml.template\n.dp,application/commonground\n.dp,application/vnd.osgi.dp\n.dpg,application/vnd.dpgraph\n.dra,audio/vnd.dra\n.drw,application/drafting\n.dsc,text/prs.lines.tag\n.dssc,application/dssc+der\n.dtb,application/x-dtbook+xml\n.dtd,application/xml-dtd\n.dts,audio/vnd.dts\n.dtshd,audio/vnd.dts.hd\n.dump,application/octet-stream\n.dvi,application/x-dvi\n.dv,video/x-dv\n.dwf,model/vnd.dwf\n.dwg,application/acad\n.dwg,image/vnd.dwg\n.dwg,image/x-dwg\n.dxf,application/dxf\n.dxf,image/vnd.dwg\n.dxf,image/vnd.dxf\n.dxf,image/x-dwg\n.dxp,application/vnd.spotfire.dxp\n.dxr,application/x-director\n.ecelp4800,audio/vnd.nuera.ecelp4800\n.ecelp7470,audio/vnd.nuera.ecelp7470\n.ecelp9600,audio/vnd.nuera.ecelp9600\n.edm,application/vnd.novadigm.edm\n.edx,application/vnd.novadigm.edx\n.efif,application/vnd.picsel\n.ei6,application/vnd.pg.osasli\n.elc,application/x-elc\n.el,text/x-script.elisp\n.eml,message/rfc822\n.emma,application/emma+xml\n.env,application/x-envoy\n.eol,audio/vnd.digital-winds\n.eot,application/vnd.ms-fontobject\n.eps,application/postscript\n.epub,application/epub+zip\n.es3,application/vnd.eszigno3+xml\n.es,application/ecmascript\n.es,application/x-esrehber\n.esf,application/vnd.epson.esf\n.etx,text/x-setext\n.evy,application/envoy\n.evy,application/x-envoy\n.exe,application/octet-stream\n.exe,application/x-msdownload\n.exi,application/exi\n.ext,application/vnd.novadigm.ext\n.ez2,application/vnd.ezpix-album\n.ez3,application/vnd.ezpix-package\n.f4v,video/x-f4v\n.f77,text/x-fortran\n.f90,text/plain\n.f90,text/x-fortran\n.fbs,image/vnd.fastbidsheet\n.fcs,application/vnd.isac.fcs\n.fdf,application/vnd.fdf\n.fe_launch,application/vnd.denovo.fcselayout-link\n.fg5,application/vnd.fujitsu.oasysgp\n.fh,image/x-freehand\n.fif,application/fractals\n.fif,image/fif\n.fig,application/x-xfig\n.fli,video/fli\n.fli,video/x-fli\n.flo,application/vnd.micrografx.flo\n.flo,image/florian\n.flv,video/x-flv\n.flw,application/vnd.kde.kivio\n.flx,text/vnd.fmi.flexstor\n.fly,text/vnd.fly\n.fm,application/vnd.framemaker\n.fmf,video/x-atomic3d-feature\n.fnc,application/vnd.frogans.fnc\n.for,text/plain\n.for,text/x-fortran\n.fpx,image/vnd.fpx\n.fpx,image/vnd.net-fpx\n.frl,application/freeloader\n.fsc,application/vnd.fsc.weblaunch\n.fst,image/vnd.fst\n.ftc,application/vnd.fluxtime.clip\n.f,text/plain\n.f,text/x-fortran\n.fti,application/vnd.anser-web-funds-transfer-initiation\n.funk,audio/make\n.fvt,video/vnd.fvt\n.fxp,application/vnd.adobe.fxp\n.fzs,application/vnd.fuzzysheet\n.g2w,application/vnd.geoplan\n.g3,image/g3fax\n.g3w,application/vnd.geospace\n.gac,application/vnd.groove-account\n.gdl,model/vnd.gdl\n.geo,application/vnd.dynageo\n.gex,application/vnd.geometry-explorer\n.ggb,application/vnd.geogebra.file\n.ggt,application/vnd.geogebra.tool\n.ghf,application/vnd.groove-help\n.gif,image/gif\n.gim,application/vnd.groove-identity-message\n.gl,video/gl\n.gl,video/x-gl\n.gmx,application/vnd.gmx\n.gnumeric,application/x-gnumeric\n.gph,application/vnd.flographit\n.gqf,application/vnd.grafeq\n.gram,application/srgs\n.grv,application/vnd.groove-injector\n.grxml,application/srgs+xml\n.gsd,audio/x-gsm\n.gsf,application/x-font-ghostscript\n.gsm,audio/x-gsm\n.gsp,application/x-gsp\n.gss,application/x-gss\n.gtar,application/x-gtar\n.g,text/plain\n.gtm,application/vnd.groove-tool-message\n.gtw,model/vnd.gtw\n.gv,text/vnd.graphviz\n.gxt,application/vnd.geonext\n.gz,application/x-compressed\n.gz,application/x-gzip\n.gzip,application/x-gzip\n.gzip,multipart/x-gzip\n.h261,video/h261\n.h263,video/h263\n.h264,video/h264\n.hal,application/vnd.hal+xml\n.hbci,application/vnd.hbci\n.hdf,application/x-hdf\n.help,application/x-helpfile\n.hgl,application/vnd.hp-hpgl\n.hh,text/plain\n.hh,text/x-h\n.hlb,text/x-script\n.hlp,application/hlp\n.hlp,application/winhlp\n.hlp,application/x-helpfile\n.hlp,application/x-winhelp\n.hpg,application/vnd.hp-hpgl\n.hpgl,application/vnd.hp-hpgl\n.hpid,application/vnd.hp-hpid\n.hps,application/vnd.hp-hps\n.hqx,application/binhex\n.hqx,application/binhex4\n.hqx,application/mac-binhex\n.hqx,application/mac-binhex40\n.hqx,application/x-binhex40\n.hqx,application/x-mac-binhex40\n.hta,application/hta\n.htc,text/x-component\n.h,text/plain\n.h,text/x-h\n.htke,application/vnd.kenameaapp\n.htmls,text/html\n.html,text/html\n.htm,text/html\n.htt,text/webviewhtml\n.htx,text/html\n.hvd,application/vnd.yamaha.hv-dic\n.hvp,application/vnd.yamaha.hv-voice\n.hvs,application/vnd.yamaha.hv-script\n.i2g,application/vnd.intergeo\n.icc,application/vnd.iccprofile\n.ice,x-conference/x-cooltalk\n.ico,image/x-icon\n.ics,text/calendar\n.idc,text/plain\n.ief,image/ief\n.iefs,image/ief\n.iff,application/iff\n.ifm,application/vnd.shana.informed.formdata\n.iges,application/iges\n.iges,model/iges\n.igl,application/vnd.igloader\n.igm,application/vnd.insors.igm\n.igs,application/iges\n.igs,model/iges\n.igx,application/vnd.micrografx.igx\n.iif,application/vnd.shana.informed.interchange\n.ima,application/x-ima\n.imap,application/x-httpd-imap\n.imp,application/vnd.accpac.simply.imp\n.ims,application/vnd.ms-ims\n.inf,application/inf\n.ins,application/x-internett-signup\n.ip,application/x-ip2\n.ipfix,application/ipfix\n.ipk,application/vnd.shana.informed.package\n.irm,application/vnd.ibm.rights-management\n.irp,application/vnd.irepository.package+xml\n.isu,video/x-isvideo\n.it,audio/it\n.itp,application/vnd.shana.informed.formtemplate\n.iv,application/x-inventor\n.ivp,application/vnd.immervision-ivp\n.ivr,i-world/i-vrml\n.ivu,application/vnd.immervision-ivu\n.ivy,application/x-livescreen\n.jad,text/vnd.sun.j2me.app-descriptor\n.jam,application/vnd.jam\n.jam,audio/x-jam\n.jar,application/java-archive\n.java,text/plain\n.java,text/x-java-source\n.jav,text/plain\n.jav,text/x-java-source\n.jcm,application/x-java-commerce\n.jfif,image/jpeg\n.jfif,image/pjpeg\n.jfif-tbnl,image/jpeg\n.jisp,application/vnd.jisp\n.jlt,application/vnd.hp-jlyt\n.jnlp,application/x-java-jnlp-file\n.joda,application/vnd.joost.joda-archive\n.jpeg,image/jpeg\n.jpe,image/jpeg\n.jpg,image/jpeg\n.jpgv,video/jpeg\n.jpm,video/jpm\n.jps,image/x-jps\n.js,application/javascript\n.json,application/json\n.jut,image/jutvision\n.kar,audio/midi\n.karbon,application/vnd.kde.karbon\n.kar,music/x-karaoke\n.key,application/pgp-keys\n.keychain,application/octet-stream\n.kfo,application/vnd.kde.kformula\n.kia,application/vnd.kidspiration\n.kml,application/vnd.google-earth.kml+xml\n.kmz,application/vnd.google-earth.kmz\n.kne,application/vnd.kinar\n.kon,application/vnd.kde.kontour\n.kpr,application/vnd.kde.kpresenter\n.ksh,application/x-ksh\n.ksh,text/x-script.ksh\n.ksp,application/vnd.kde.kspread\n.ktx,image/ktx\n.ktz,application/vnd.kahootz\n.kwd,application/vnd.kde.kword\n.la,audio/nspaudio\n.la,audio/x-nspaudio\n.lam,audio/x-liveaudio\n.lasxml,application/vnd.las.las+xml\n.latex,application/x-latex\n.lbd,application/vnd.llamagraphics.life-balance.desktop\n.lbe,application/vnd.llamagraphics.life-balance.exchange+xml\n.les,application/vnd.hhe.lesson-player\n.lha,application/lha\n.lha,application/x-lha\n.link66,application/vnd.route66.link66+xml\n.list,text/plain\n.lma,audio/nspaudio\n.lma,audio/x-nspaudio\n.log,text/plain\n.lrm,application/vnd.ms-lrm\n.lsp,application/x-lisp\n.lsp,text/x-script.lisp\n.lst,text/plain\n.lsx,text/x-la-asf\n.ltf,application/vnd.frogans.ltf\n.ltx,application/x-latex\n.lvp,audio/vnd.lucent.voice\n.lwp,application/vnd.lotus-wordpro\n.lzh,application/octet-stream\n.lzh,application/x-lzh\n.lzx,application/lzx\n.lzx,application/octet-stream\n.lzx,application/x-lzx\n.m1v,video/mpeg\n.m21,application/mp21\n.m2a,audio/mpeg\n.m2v,video/mpeg\n.m3u8,application/vnd.apple.mpegurl\n.m3u,audio/x-mpegurl\n.m4a,audio/mp4\n.m4v,video/mp4\n.ma,application/mathematica\n.mads,application/mads+xml\n.mag,application/vnd.ecowin.chart\n.man,application/x-troff-man\n.map,application/x-navimap\n.mar,text/plain\n.mathml,application/mathml+xml\n.mbd,application/mbedlet\n.mbk,application/vnd.mobius.mbk\n.mbox,application/mbox\n.mc1,application/vnd.medcalcdata\n.mc$,application/x-magic-cap-package-1.0\n.mcd,application/mcad\n.mcd,application/vnd.mcd\n.mcd,application/x-mathcad\n.mcf,image/vasa\n.mcf,text/mcf\n.mcp,application/netmc\n.mcurl,text/vnd.curl.mcurl\n.mdb,application/x-msaccess\n.mdi,image/vnd.ms-modi\n.me,application/x-troff-me\n.meta4,application/metalink4+xml\n.mets,application/mets+xml\n.mfm,application/vnd.mfmp\n.mgp,application/vnd.osgeo.mapguide.package\n.mgz,application/vnd.proteus.magazine\n.mht,message/rfc822\n.mhtml,message/rfc822\n.mid,application/x-midi\n.mid,audio/midi\n.mid,audio/x-mid\n.midi,application/x-midi\n.midi,audio/midi\n.midi,audio/x-mid\n.midi,audio/x-midi\n.midi,music/crescendo\n.midi,x-music/x-midi\n.mid,music/crescendo\n.mid,x-music/x-midi\n.mif,application/vnd.mif\n.mif,application/x-frame\n.mif,application/x-mif\n.mime,message/rfc822\n.mime,www/mime\n.mj2,video/mj2\n.mjf,audio/x-vnd.audioexplosion.mjuicemediafile\n.mjpg,video/x-motion-jpeg\n.mkv,video/x-matroska\n.mkv,audio/x-matroska\n.mlp,application/vnd.dolby.mlp\n.mm,application/base64\n.mm,application/x-meme\n.mmd,application/vnd.chipnuts.karaoke-mmd\n.mme,application/base64\n.mmf,application/vnd.smaf\n.mmr,image/vnd.fujixerox.edmics-mmr\n.mny,application/x-msmoney\n.mod,audio/mod\n.mod,audio/x-mod\n.mods,application/mods+xml\n.moov,video/quicktime\n.movie,video/x-sgi-movie\n.mov,video/quicktime\n.mp2,audio/mpeg\n.mp2,audio/x-mpeg\n.mp2,video/mpeg\n.mp2,video/x-mpeg\n.mp2,video/x-mpeq2a\n.mp3,audio/mpeg\n.mp3,audio/mpeg3\n.mp4a,audio/mp4\n.mp4,video/mp4\n.mp4,application/mp4\n.mpa,audio/mpeg\n.mpc,application/vnd.mophun.certificate\n.mpc,application/x-project\n.mpeg,video/mpeg\n.mpe,video/mpeg\n.mpga,audio/mpeg\n.mpg,video/mpeg\n.mpg,audio/mpeg\n.mpkg,application/vnd.apple.installer+xml\n.mpm,application/vnd.blueice.multipass\n.mpn,application/vnd.mophun.application\n.mpp,application/vnd.ms-project\n.mpt,application/x-project\n.mpv,application/x-project\n.mpx,application/x-project\n.mpy,application/vnd.ibm.minipay\n.mqy,application/vnd.mobius.mqy\n.mrc,application/marc\n.mrcx,application/marcxml+xml\n.ms,application/x-troff-ms\n.mscml,application/mediaservercontrol+xml\n.mseq,application/vnd.mseq\n.msf,application/vnd.epson.msf\n.msg,application/vnd.ms-outlook\n.msh,model/mesh\n.msl,application/vnd.mobius.msl\n.msty,application/vnd.muvee.style\n.m,text/plain\n.m,text/x-m\n.mts,model/vnd.mts\n.mus,application/vnd.musician\n.musicxml,application/vnd.recordare.musicxml+xml\n.mvb,application/x-msmediaview\n.mv,video/x-sgi-movie\n.mwf,application/vnd.mfer\n.mxf,application/mxf\n.mxl,application/vnd.recordare.musicxml\n.mxml,application/xv+xml\n.mxs,application/vnd.triscape.mxs\n.mxu,video/vnd.mpegurl\n.my,audio/make\n.mzz,application/x-vnd.audioexplosion.mzz\n.n3,text/n3\nN/A,application/andrew-inset\n.nap,image/naplps\n.naplps,image/naplps\n.nbp,application/vnd.wolfram.player\n.nc,application/x-netcdf\n.ncm,application/vnd.nokia.configuration-message\n.ncx,application/x-dtbncx+xml\n.n-gage,application/vnd.nokia.n-gage.symbian.install\n.ngdat,application/vnd.nokia.n-gage.data\n.niff,image/x-niff\n.nif,image/x-niff\n.nix,application/x-mix-transfer\n.nlu,application/vnd.neurolanguage.nlu\n.nml,application/vnd.enliven\n.nnd,application/vnd.noblenet-directory\n.nns,application/vnd.noblenet-sealer\n.nnw,application/vnd.noblenet-web\n.npx,image/vnd.net-fpx\n.nsc,application/x-conference\n.nsf,application/vnd.lotus-notes\n.nvd,application/x-navidoc\n.oa2,application/vnd.fujitsu.oasys2\n.oa3,application/vnd.fujitsu.oasys3\n.o,application/octet-stream\n.oas,application/vnd.fujitsu.oasys\n.obd,application/x-msbinder\n.oda,application/oda\n.odb,application/vnd.oasis.opendocument.database\n.odc,application/vnd.oasis.opendocument.chart\n.odf,application/vnd.oasis.opendocument.formula\n.odft,application/vnd.oasis.opendocument.formula-template\n.odg,application/vnd.oasis.opendocument.graphics\n.odi,application/vnd.oasis.opendocument.image\n.odm,application/vnd.oasis.opendocument.text-master\n.odp,application/vnd.oasis.opendocument.presentation\n.ods,application/vnd.oasis.opendocument.spreadsheet\n.odt,application/vnd.oasis.opendocument.text\n.oga,audio/ogg\n.ogg,audio/ogg\n.ogv,video/ogg\n.ogx,application/ogg\n.omc,application/x-omc\n.omcd,application/x-omcdatamaker\n.omcr,application/x-omcregerator\n.onetoc,application/onenote\n.opf,application/oebps-package+xml\n.org,application/vnd.lotus-organizer\n.osf,application/vnd.yamaha.openscoreformat\n.osfpvg,application/vnd.yamaha.openscoreformat.osfpvg+xml\n.otc,application/vnd.oasis.opendocument.chart-template\n.otf,application/x-font-otf\n.otg,application/vnd.oasis.opendocument.graphics-template\n.oth,application/vnd.oasis.opendocument.text-web\n.oti,application/vnd.oasis.opendocument.image-template\n.otp,application/vnd.oasis.opendocument.presentation-template\n.ots,application/vnd.oasis.opendocument.spreadsheet-template\n.ott,application/vnd.oasis.opendocument.text-template\n.oxt,application/vnd.openofficeorg.extension\n.p10,application/pkcs10\n.p12,application/pkcs-12\n.p7a,application/x-pkcs7-signature\n.p7b,application/x-pkcs7-certificates\n.p7c,application/pkcs7-mime\n.p7m,application/pkcs7-mime\n.p7r,application/x-pkcs7-certreqresp\n.p7s,application/pkcs7-signature\n.p8,application/pkcs8\n.pages,application/vnd.apple.pages\n.part,application/pro_eng\n.par,text/plain-bas\n.pas,text/pascal\n.paw,application/vnd.pawaafile\n.pbd,application/vnd.powerbuilder6\n.pbm,image/x-portable-bitmap\n.pcf,application/x-font-pcf\n.pcl,application/vnd.hp-pcl\n.pcl,application/x-pcl\n.pclxl,application/vnd.hp-pclxl\n.pct,image/x-pict\n.pcurl,application/vnd.curl.pcurl\n.pcx,image/x-pcx\n.pdb,application/vnd.palm\n.pdb,chemical/x-pdb\n.pdf,application/pdf\n.pem,application/x-pem-file\n.pfa,application/x-font-type1\n.pfr,application/font-tdpfr\n.pfunk,audio/make\n.pfunk,audio/make.my.funk\n.pfx,application/x-pkcs12\n.pgm,image/x-portable-graymap\n.pgn,application/x-chess-pgn\n.pgp,application/pgp-signature\n.pic,image/pict\n.pict,image/pict\n.pkg,application/x-newton-compatible-pkg\n.pki,application/pkixcmp\n.pkipath,application/pkix-pkipath\n.pko,application/vnd.ms-pki.pko\n.plb,application/vnd.3gpp.pic-bw-large\n.plc,application/vnd.mobius.plc\n.plf,application/vnd.pocketlearn\n.pls,application/pls+xml\n.pl,text/plain\n.pl,text/x-script.perl\n.plx,application/x-pixclscript\n.pm4,application/x-pagemaker\n.pm5,application/x-pagemaker\n.pm,image/x-xpixmap\n.pml,application/vnd.ctc-posml\n.pm,text/x-script.perl-module\n.png,image/png\n.pnm,application/x-portable-anymap\n.pnm,image/x-portable-anymap\n.portpkg,application/vnd.macports.portpkg\n.pot,application/mspowerpoint\n.pot,application/vnd.ms-powerpoint\n.potm,application/vnd.ms-powerpoint.template.macroenabled.12\n.potx,application/vnd.openxmlformats-officedocument.presentationml.template\n.pov,model/x-pov\n.ppa,application/vnd.ms-powerpoint\n.ppam,application/vnd.ms-powerpoint.addin.macroenabled.12\n.ppd,application/vnd.cups-ppd\n.ppm,image/x-portable-pixmap\n.pps,application/mspowerpoint\n.pps,application/vnd.ms-powerpoint\n.ppsm,application/vnd.ms-powerpoint.slideshow.macroenabled.12\n.ppsx,application/vnd.openxmlformats-officedocument.presentationml.slideshow\n.ppt,application/mspowerpoint\n.ppt,application/powerpoint\n.ppt,application/vnd.ms-powerpoint\n.ppt,application/x-mspowerpoint\n.pptm,application/vnd.ms-powerpoint.presentation.macroenabled.12\n.pptx,application/vnd.openxmlformats-officedocument.presentationml.presentation\n.ppz,application/mspowerpoint\n.prc,application/x-mobipocket-ebook\n.pre,application/vnd.lotus-freelance\n.pre,application/x-freelance\n.prf,application/pics-rules\n.prt,application/pro_eng\n.ps,application/postscript\n.psb,application/vnd.3gpp.pic-bw-small\n.psd,application/octet-stream\n.psd,image/vnd.adobe.photoshop\n.psf,application/x-font-linux-psf\n.pskcxml,application/pskc+xml\n.p,text/x-pascal\n.ptid,application/vnd.pvi.ptid1\n.pub,application/x-mspublisher\n.pvb,application/vnd.3gpp.pic-bw-var\n.pvu,paleovu/x-pv\n.pwn,application/vnd.3m.post-it-notes\n.pwz,application/vnd.ms-powerpoint\n.pya,audio/vnd.ms-playready.media.pya\n.pyc,application/x-bytecode.python\n.py,text/x-script.python\n.pyv,video/vnd.ms-playready.media.pyv\n.qam,application/vnd.epson.quickanime\n.qbo,application/vnd.intu.qbo\n.qcp,audio/vnd.qcelp\n.qd3d,x-world/x-3dmf\n.qd3,x-world/x-3dmf\n.qfx,application/vnd.intu.qfx\n.qif,image/x-quicktime\n.qps,application/vnd.publishare-delta-tree\n.qtc,video/x-qtc\n.qtif,image/x-quicktime\n.qti,image/x-quicktime\n.qt,video/quicktime\n.qxd,application/vnd.quark.quarkxpress\n.ra,audio/x-pn-realaudio\n.ra,audio/x-pn-realaudio-plugin\n.ra,audio/x-realaudio\n.ram,audio/x-pn-realaudio\n.rar,application/x-rar-compressed\n.ras,application/x-cmu-raster\n.ras,image/cmu-raster\n.ras,image/x-cmu-raster\n.rast,image/cmu-raster\n.rcprofile,application/vnd.ipunplugged.rcprofile\n.rdf,application/rdf+xml\n.rdz,application/vnd.data-vision.rdz\n.rep,application/vnd.businessobjects\n.res,application/x-dtbresource+xml\n.rexx,text/x-script.rexx\n.rf,image/vnd.rn-realflash\n.rgb,image/x-rgb\n.rif,application/reginfo+xml\n.rip,audio/vnd.rip\n.rl,application/resource-lists+xml\n.rlc,image/vnd.fujixerox.edmics-rlc\n.rld,application/resource-lists-diff+xml\n.rm,application/vnd.rn-realmedia\n.rm,audio/x-pn-realaudio\n.rmi,audio/mid\n.rmm,audio/x-pn-realaudio\n.rmp,audio/x-pn-realaudio\n.rmp,audio/x-pn-realaudio-plugin\n.rms,application/vnd.jcp.javame.midlet-rms\n.rnc,application/relax-ng-compact-syntax\n.rng,application/ringing-tones\n.rng,application/vnd.nokia.ringing-tone\n.rnx,application/vnd.rn-realplayer\n.roff,application/x-troff\n.rp9,application/vnd.cloanto.rp9\n.rp,image/vnd.rn-realpix\n.rpm,audio/x-pn-realaudio-plugin\n.rpm,application/x-rpm\n.rpss,application/vnd.nokia.radio-presets\n.rpst,application/vnd.nokia.radio-preset\n.rq,application/sparql-query\n.rs,application/rls-services+xml\n.rsd,application/rsd+xml\n.rss,application/rss+xml\n.rtf,application/rtf\n.rtf,text/rtf\n.rt,text/richtext\n.rt,text/vnd.rn-realtext\n.rtx,application/rtf\n.rtx,text/richtext\n.rv,video/vnd.rn-realvideo\n.s3m,audio/s3m\n.saf,application/vnd.yamaha.smaf-audio\n.saveme,application/octet-stream\n.sbk,application/x-tbook\n.sbml,application/sbml+xml\n.sc,application/vnd.ibm.secure-container\n.scd,application/x-msschedule\n.scm,application/vnd.lotus-screencam\n.scm,application/x-lotusscreencam\n.scm,text/x-script.guile\n.scm,text/x-script.scheme\n.scm,video/x-scm\n.scq,application/scvp-cv-request\n.scs,application/scvp-cv-response\n.scurl,text/vnd.curl.scurl\n.sda,application/vnd.stardivision.draw\n.sdc,application/vnd.stardivision.calc\n.sdd,application/vnd.stardivision.impress\n.sdf,application/octet-stream\n.sdkm,application/vnd.solent.sdkm+xml\n.sdml,text/plain\n.sdp,application/sdp\n.sdp,application/x-sdp\n.sdr,application/sounder\n.sdw,application/vnd.stardivision.writer\n.sea,application/sea\n.sea,application/x-sea\n.see,application/vnd.seemail\n.seed,application/vnd.fdsn.seed\n.sema,application/vnd.sema\n.semd,application/vnd.semd\n.semf,application/vnd.semf\n.ser,application/java-serialized-object\n.set,application/set\n.setpay,application/set-payment-initiation\n.setreg,application/set-registration-initiation\n.sfd-hdstx,application/vnd.hydrostatix.sof-data\n.sfs,application/vnd.spotfire.sfs\n.sgl,application/vnd.stardivision.writer-global\n.sgml,text/sgml\n.sgml,text/x-sgml\n.sgm,text/sgml\n.sgm,text/x-sgml\n.sh,application/x-bsh\n.sh,application/x-sh\n.sh,application/x-shar\n.shar,application/x-bsh\n.shar,application/x-shar\n.shf,application/shf+xml\n.sh,text/x-script.sh\n.shtml,text/html\n.shtml,text/x-server-parsed-html\n.sid,audio/x-psid\n.sis,application/vnd.symbian.install\n.sit,application/x-sit\n.sit,application/x-stuffit\n.sitx,application/x-stuffitx\n.skd,application/x-koan\n.skm,application/x-koan\n.skp,application/vnd.koan\n.skp,application/x-koan\n.skt,application/x-koan\n.sl,application/x-seelogo\n.sldm,application/vnd.ms-powerpoint.slide.macroenabled.12\n.sldx,application/vnd.openxmlformats-officedocument.presentationml.slide\n.slt,application/vnd.epson.salt\n.sm,application/vnd.stepmania.stepchart\n.smf,application/vnd.stardivision.math\n.smi,application/smil\n.smi,application/smil+xml\n.smil,application/smil\n.snd,audio/basic\n.snd,audio/x-adpcm\n.snf,application/x-font-snf\n.sol,application/solids\n.spc,application/x-pkcs7-certificates\n.spc,text/x-speech\n.spf,application/vnd.yamaha.smaf-phrase\n.spl,application/futuresplash\n.spl,application/x-futuresplash\n.spot,text/vnd.in3d.spot\n.spp,application/scvp-vp-response\n.spq,application/scvp-vp-request\n.spr,application/x-sprite\n.sprite,application/x-sprite\n.src,application/x-wais-source\n.srt,text/srt\n.sru,application/sru+xml\n.srx,application/sparql-results+xml\n.sse,application/vnd.kodak-descriptor\n.ssf,application/vnd.epson.ssf\n.ssi,text/x-server-parsed-html\n.ssm,application/streamingmedia\n.ssml,application/ssml+xml\n.sst,application/vnd.ms-pki.certstore\n.st,application/vnd.sailingtracker.track\n.stc,application/vnd.sun.xml.calc.template\n.std,application/vnd.sun.xml.draw.template\n.step,application/step\n.s,text/x-asm\n.stf,application/vnd.wt.stf\n.sti,application/vnd.sun.xml.impress.template\n.stk,application/hyperstudio\n.stl,application/sla\n.stl,application/vnd.ms-pki.stl\n.stl,application/x-navistyle\n.stp,application/step\n.str,application/vnd.pg.format\n.stw,application/vnd.sun.xml.writer.template\n.sub,image/vnd.dvb.subtitle\n.sus,application/vnd.sus-calendar\n.sv4cpio,application/x-sv4cpio\n.sv4crc,application/x-sv4crc\n.svc,application/vnd.dvb.service\n.svd,application/vnd.svd\n.svf,image/vnd.dwg\n.svf,image/x-dwg\n.svg,image/svg+xml\n.svr,application/x-world\n.svr,x-world/x-svr\n.swf,application/x-shockwave-flash\n.swi,application/vnd.aristanetworks.swi\n.sxc,application/vnd.sun.xml.calc\n.sxd,application/vnd.sun.xml.draw\n.sxg,application/vnd.sun.xml.writer.global\n.sxi,application/vnd.sun.xml.impress\n.sxm,application/vnd.sun.xml.math\n.sxw,application/vnd.sun.xml.writer\n.talk,text/x-speech\n.tao,application/vnd.tao.intent-module-archive\n.t,application/x-troff\n.tar,application/x-tar\n.tbk,application/toolbook\n.tbk,application/x-tbook\n.tcap,application/vnd.3gpp2.tcap\n.tcl,application/x-tcl\n.tcl,text/x-script.tcl\n.tcsh,text/x-script.tcsh\n.teacher,application/vnd.smart.teacher\n.tei,application/tei+xml\n.tex,application/x-tex\n.texi,application/x-texinfo\n.texinfo,application/x-texinfo\n.text,text/plain\n.tfi,application/thraud+xml\n.tfm,application/x-tex-tfm\n.tgz,application/gnutar\n.tgz,application/x-compressed\n.thmx,application/vnd.ms-officetheme\n.tiff,image/tiff\n.tif,image/tiff\n.tmo,application/vnd.tmobile-livetv\n.torrent,application/x-bittorrent\n.tpl,application/vnd.groove-tool-template\n.tpt,application/vnd.trid.tpt\n.tra,application/vnd.trueapp\n.tr,application/x-troff\n.trm,application/x-msterminal\n.tsd,application/timestamped-data\n.tsi,audio/tsp-audio\n.tsp,application/dsptype\n.tsp,audio/tsplayer\n.tsv,text/tab-separated-values\n.t,text/troff\n.ttf,application/x-font-ttf\n.ttl,text/turtle\n.turbot,image/florian\n.twd,application/vnd.simtech-mindmapper\n.txd,application/vnd.genomatix.tuxedo\n.txf,application/vnd.mobius.txf\n.txt,text/plain\n.ufd,application/vnd.ufdl\n.uil,text/x-uil\n.umj,application/vnd.umajin\n.unis,text/uri-list\n.uni,text/uri-list\n.unityweb,application/vnd.unity\n.unv,application/i-deas\n.uoml,application/vnd.uoml+xml\n.uris,text/uri-list\n.uri,text/uri-list\n.ustar,application/x-ustar\n.ustar,multipart/x-ustar\n.utz,application/vnd.uiq.theme\n.uu,application/octet-stream\n.uue,text/x-uuencode\n.uu,text/x-uuencode\n.uva,audio/vnd.dece.audio\n.uvh,video/vnd.dece.hd\n.uvi,image/vnd.dece.graphic\n.uvm,video/vnd.dece.mobile\n.uvp,video/vnd.dece.pd\n.uvs,video/vnd.dece.sd\n.uvu,video/vnd.uvvu.mp4\n.uvv,video/vnd.dece.video\n.vcd,application/x-cdlink\n.vcf,text/x-vcard\n.vcg,application/vnd.groove-vcard\n.vcs,text/x-vcalendar\n.vcx,application/vnd.vcx\n.vda,application/vda\n.vdo,video/vdo\n.vew,application/groupwise\n.vis,application/vnd.visionary\n.vivo,video/vivo\n.vivo,video/vnd.vivo\n.viv,video/vivo\n.viv,video/vnd.vivo\n.vmd,application/vocaltec-media-desc\n.vmf,application/vocaltec-media-file\n.vob,video/dvd\n.voc,audio/voc\n.voc,audio/x-voc\n.vos,video/vosaic\n.vox,audio/voxware\n.vqe,audio/x-twinvq-plugin\n.vqf,audio/x-twinvq\n.vql,audio/x-twinvq-plugin\n.vrml,application/x-vrml\n.vrml,model/vrml\n.vrml,x-world/x-vrml\n.vrt,x-world/x-vrt\n.vsd,application/vnd.visio\n.vsd,application/x-visio\n.vsf,application/vnd.vsf\n.vst,application/x-visio\n.vsw,application/x-visio\n.vtt,text/vtt\n.vtu,model/vnd.vtu\n.vxml,application/voicexml+xml\n.w60,application/wordperfect6.0\n.w61,application/wordperfect6.1\n.w6w,application/msword\n.wad,application/x-doom\n.war,application/zip\n.wasm,application/wasm\n.wav,audio/wav\n.wax,audio/x-ms-wax\n.wb1,application/x-qpro\n.wbmp,image/vnd.wap.wbmp\n.wbs,application/vnd.criticaltools.wbs+xml\n.wbxml,application/vnd.wap.wbxml\n.weba,audio/webm\n.web,application/vnd.xara\n.webm,video/webm\n.webp,image/webp\n.wg,application/vnd.pmi.widget\n.wgt,application/widget\n.wiz,application/msword\n.wk1,application/x-123\n.wma,audio/x-ms-wma\n.wmd,application/x-ms-wmd\n.wmf,application/x-msmetafile\n.wmf,windows/metafile\n.wmlc,application/vnd.wap.wmlc\n.wmlsc,application/vnd.wap.wmlscriptc\n.wmls,text/vnd.wap.wmlscript\n.wml,text/vnd.wap.wml\n.wm,video/x-ms-wm\n.wmv,video/x-ms-wmv\n.wmx,video/x-ms-wmx\n.wmz,application/x-ms-wmz\n.woff,application/x-font-woff\n.word,application/msword\n.wp5,application/wordperfect\n.wp5,application/wordperfect6.0\n.wp6,application/wordperfect\n.wp,application/wordperfect\n.wpd,application/vnd.wordperfect\n.wpd,application/wordperfect\n.wpd,application/x-wpwin\n.wpl,application/vnd.ms-wpl\n.wps,application/vnd.ms-works\n.wq1,application/x-lotus\n.wqd,application/vnd.wqd\n.wri,application/mswrite\n.wri,application/x-mswrite\n.wri,application/x-wri\n.wrl,application/x-world\n.wrl,model/vrml\n.wrl,x-world/x-vrml\n.wrz,model/vrml\n.wrz,x-world/x-vrml\n.wsc,text/scriplet\n.wsdl,application/wsdl+xml\n.wspolicy,application/wspolicy+xml\n.wsrc,application/x-wais-source\n.wtb,application/vnd.webturbo\n.wtk,application/x-wintalk\n.wvx,video/x-ms-wvx\n.x3d,application/vnd.hzn-3d-crossword\n.xap,application/x-silverlight-app\n.xar,application/vnd.xara\n.xbap,application/x-ms-xbap\n.xbd,application/vnd.fujixerox.docuworks.binder\n.xbm,image/xbm\n.xbm,image/x-xbitmap\n.xbm,image/x-xbm\n.xdf,application/xcap-diff+xml\n.xdm,application/vnd.syncml.dm+xml\n.xdp,application/vnd.adobe.xdp+xml\n.xdr,video/x-amt-demorun\n.xdssc,application/dssc+xml\n.xdw,application/vnd.fujixerox.docuworks\n.xenc,application/xenc+xml\n.xer,application/patch-ops-error+xml\n.xfdf,application/vnd.adobe.xfdf\n.xfdl,application/vnd.xfdl\n.xgz,xgl/drawing\n.xhtml,application/xhtml+xml\n.xif,image/vnd.xiff\n.xla,application/excel\n.xla,application/x-excel\n.xla,application/x-msexcel\n.xlam,application/vnd.ms-excel.addin.macroenabled.12\n.xl,application/excel\n.xlb,application/excel\n.xlb,application/vnd.ms-excel\n.xlb,application/x-excel\n.xlc,application/excel\n.xlc,application/vnd.ms-excel\n.xlc,application/x-excel\n.xld,application/excel\n.xld,application/x-excel\n.xlk,application/excel\n.xlk,application/x-excel\n.xll,application/excel\n.xll,application/vnd.ms-excel\n.xll,application/x-excel\n.xlm,application/excel\n.xlm,application/vnd.ms-excel\n.xlm,application/x-excel\n.xls,application/excel\n.xls,application/vnd.ms-excel\n.xls,application/x-excel\n.xls,application/x-msexcel\n.xlsb,application/vnd.ms-excel.sheet.binary.macroenabled.12\n.xlsm,application/vnd.ms-excel.sheet.macroenabled.12\n.xlsx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\n.xlt,application/excel\n.xlt,application/x-excel\n.xltm,application/vnd.ms-excel.template.macroenabled.12\n.xltx,application/vnd.openxmlformats-officedocument.spreadsheetml.template\n.xlv,application/excel\n.xlv,application/x-excel\n.xlw,application/excel\n.xlw,application/vnd.ms-excel\n.xlw,application/x-excel\n.xlw,application/x-msexcel\n.xm,audio/xm\n.xml,application/xml\n.xml,text/xml\n.xmz,xgl/movie\n.xo,application/vnd.olpc-sugar\n.xop,application/xop+xml\n.xpi,application/x-xpinstall\n.xpix,application/x-vnd.ls-xpix\n.xpm,image/xpm\n.xpm,image/x-xpixmap\n.x-png,image/png\n.xpr,application/vnd.is-xpr\n.xps,application/vnd.ms-xpsdocument\n.xpw,application/vnd.intercon.formnet\n.xslt,application/xslt+xml\n.xsm,application/vnd.syncml+xml\n.xspf,application/xspf+xml\n.xsr,video/x-amt-showrun\n.xul,application/vnd.mozilla.xul+xml\n.xwd,image/x-xwd\n.xwd,image/x-xwindowdump\n.xyz,chemical/x-pdb\n.xyz,chemical/x-xyz\n.xz,application/x-xz\n.yaml,text/yaml\n.yang,application/yang\n.yin,application/yin+xml\n.z,application/x-compress\n.z,application/x-compressed\n.zaz,application/vnd.zzazz.deck+xml\n.zip,application/zip\n.zip,application/x-compressed\n.zip,application/x-zip-compressed\n.zip,multipart/x-zip\n.zir,application/vnd.zul\n.zmm,application/vnd.handheld-entertainment+xml\n.zoo,application/octet-stream\n.zsh,text/x-script.zsh\n"),Bi))}function Ui(){return Ai.value}function qi(){Ki()}function Hi(){Gi=this,this.Empty=Qi()}Pi.$metadata$={kind:d,simpleName:"HttpStatusCode",interfaces:[]},Pi.prototype.component1=function(){return this.value},Pi.prototype.component2=function(){return this.description},Pi.prototype.copy_19mbxw$=function(t,e){return new Pi(void 0===t?this.value:t,void 0===e?this.description:e)},Hi.prototype.build_itqcaa$=wt("ktor-ktor-http-js-legacy.io.ktor.http.Parameters.Companion.build_itqcaa$",xt((function(){var e=t.io.ktor.http.ParametersBuilder_za3lpa$;return function(t){var n=e();return t(n),n.build()}}))),Hi.$metadata$={kind:Y,simpleName:"Companion",interfaces:[]};var Gi=null;function Ki(){return null===Gi&&new Hi,Gi}function Vi(){}function Yi(t){return void 0===t&&(t=8),new Wi(t)}function Wi(t){void 0===t&&(t=8),qt.call(this,!0,t)}function Xi(t){void 0===t&&(t=ut()),Vt.call(this,!0,t)}function Zi(){Ji=this}qi.$metadata$={kind:J,simpleName:"Parameters",interfaces:[Ut]},Vi.$metadata$={kind:J,simpleName:"ParametersBuilder",interfaces:[se]},Wi.prototype.build=function(){return new Xi(this.values)},Wi.$metadata$={kind:d,simpleName:"ParametersBuilderImpl",interfaces:[Vi,qt]},Xi.prototype.toString=function(){return"Parameters "+this.entries()},Xi.$metadata$={kind:d,simpleName:"ParametersImpl",interfaces:[Vt,qi]},Object.defineProperty(Zi.prototype,"caseInsensitiveName",{configurable:!0,get:function(){return!0}}),Zi.prototype.getAll_61zpoe$=function(t){return null},Zi.prototype.names=function(){return Ht()},Zi.prototype.entries=function(){return Ht()},Zi.prototype.isEmpty=function(){return!0},Zi.prototype.toString=function(){return"Parameters "+this.entries()},Zi.prototype.equals=function(t){return e.isType(t,qi)&&t.isEmpty()},Zi.$metadata$={kind:Y,simpleName:"EmptyParameters",interfaces:[qi]};var Ji=null;function Qi(){return null===Ji&&new Zi,Ji}function to(t,e,n,i){var o;if(void 0===e&&(e=0),void 0===n&&(n=1e3),void 0===i&&(i=!0),e>Ft(t))o=Ki().Empty;else{var r=Yi();(function(t,e,n,i,o){var r,a=0,s=n,l=-1;r=Ft(e);for(var u=n;u<=r;u++){if(a===i)return;switch(e.charCodeAt(u)){case 38:eo(t,e,s,l,u,o),s=u+1|0,l=-1,a=a+1|0;break;case 61:-1===l&&(l=u)}}a!==i&&eo(t,e,s,l,e.length,o)})(r,t,e,n,i),o=r.build()}return o}function eo(t,e,n,i,o,r){if(-1!==i){var a=io(n,i,e),s=no(a,i,e);if(s>a){var l=r?Ge(e,a,s):e.substring(a,s),u=io(i+1|0,o,e),c=no(u,o,e),p=r?Ge(e,u,c,!0):e.substring(u,c);t.append_puj7f4$(l,p)}}else{var h=io(n,o,e),_=no(h,o,e);if(_>h){var d=r?Ge(e,h,_):e.substring(h,_);t.appendAll_poujtz$(d,W())}}}function no(t,e,n){for(var i=e;i>t&&dt(n.charCodeAt(i-1|0));)i=i-1|0;return i}function io(t,e,n){for(var i=t;i0&&(e.append_s8itvh$(35),e.append_gw00v9$(t.encodedFragment)),e}(this,z(256)).toString()},oo.prototype.build=function(){return this.applyOrigin_0(),new No(this.protocol,this.host,this.port,this.pathSegments,this.parameters.build(),this.fragment,this.user,this.password,this.trailingQuery,this.buildString())},oo.prototype.applyOrigin_0=function(){var t;this.host.length>0||m(this.protocol.name,"file")||(this.host=lo().originUrl_0.host,null!=(t=this.protocol)&&t.equals(xo().HTTP)&&(this.protocol=lo().originUrl_0.protocol),0===this.port&&(this.port=lo().originUrl_0.specifiedPort))},ro.$metadata$={kind:Y,simpleName:"Companion",interfaces:[]};var ao,so=null;function lo(){return null===so&&new ro,so}function uo(t){var e=F();return Oo(e,t.encodedUser,t.encodedPassword),e.toString()}function co(t){var e=F();return e.append_pdl1vj$(uo(t)),e.append_pdl1vj$(t.host),0!==t.port&&t.port!==t.protocol.defaultPort&&(e.append_pdl1vj$(":"),e.append_pdl1vj$(t.port.toString())),e.toString()}function po(t){return function(t){return t.isEmpty()?"":1===t.size?0===pe(t).length?"/":pe(t):g(t,"/")}(t.encodedPathSegments)}function ho(t,n){var i;i=tt(n)?W():m(n,"/")?ao:_e(le(n,e.charArrayOf(47))),t.encodedPathSegments=i}function _o(t){return R}function fo(t,n){var i;if(tt(n))return t;try{i=$o(t,n)}catch(t){throw e.isType(t,zt)?new mo(n,t):t}return i}function mo(t,e){St.call(this,"Fail to parse url: "+t,e),this.name="URLParserException"}function $o(t,n){var i,o,r,a,s;t:do{var l,u,c,p;u=(l=fe(n)).first,c=l.last,p=l.step;for(var h=u;h<=c;h+=p)if(!dt(k(S(n.charCodeAt(h))))){s=h;break t}s=-1}while(0);var _,d=s;t:do{var f;for(f=me(fe(n)).iterator();f.hasNext();){var $=f.next();if(!dt(k(S(n.charCodeAt($))))){_=$;break t}}_=-1}while(0);var y=_+1|0,g=function(t,e,n){var i=e,o=-1,r=t.charCodeAt(i);for(new b(97,122).contains_mef7kx$(r)||new b(65,90).contains_mef7kx$(r)||(o=i);i0){var v=d,w=d+g|0,C=n.substring(v,w);t.protocol=xo().createOrDefault_61zpoe$(C),d=d+(g+1)|0}var E=function(t,e,n,i){for(var o=0;(e+o|0)=2)t:for(;;){var T=de(n,Pt("@/\\?#"),d),O=null!=(i=T>0?T:null)?i:y;if(!(O=y)return t.encodedPathSegments=47===n.charCodeAt(y-1|0)?ao:W(),t;o=0===E?he(t.encodedPathSegments,1):W(),t.encodedPathSegments=o;var j=de(n,Pt("?#"),d),L=null!=(r=j>0?j:null)?r:y;if(L>d){var z=d,D=n.substring(z,L),M=1===t.encodedPathSegments.size;M&&(M=0===pe(t.encodedPathSegments).length);var B=M?W():t.encodedPathSegments,F=m(D,"/")?ao:le(D,e.charArrayOf(47));a=1===E?ao:W();var U=x(a,F);t.encodedPathSegments=x(B,U),d=L}return d0?r:null)?o:i,s=n+1|0;return to(e.substring(s,a),void 0,void 0,!1).forEach_ubvtmq$((l=t,function(t,e){return l.encodedParameters.appendAll_poujtz$(t,e),R})),a;var l}(t,n,d,y)),function(t,e,n,i){if(n0?r:null)?o:i;if(t.host=e.substring(n,a),(a+1|0)0){n=!0;break t}}n=!1}while(0);return n},br.prototype.ifUnmodifiedSince_iwdcyr$=function(t){var n;t:do{var i;if(e.isType(t,at)&&t.isEmpty()){n=!0;break t}for(i=t.iterator();i.hasNext();){var o=i.next();if(!(this.truncatedModificationDate_0.compareTo_11rb$(o)<=0)){n=!1;break t}}n=!0}while(0);return n},br.prototype.appendHeadersTo_ewccyn$=function(t){t.set_puj7f4$(fi().LastModified,In(this.lastModified))},br.prototype.parseDates_0=function(t){var n,i=vt();for(n=t.iterator();n.hasNext();){var o=n.next();tt(o)||i.add_11rb$(o)}var r,a=vt();for(r=i.iterator();r.hasNext();){var s,l,u=r.next();t:do{try{l=Pn(u)}catch(t){if(e.isType(t,zt)){l=null;break t}throw t}}while(0);null!=(s=l)&&a.add_11rb$(s)}return a.isEmpty()?null:a},br.$metadata$={kind:d,simpleName:"LastModifiedVersion",interfaces:[fr]},br.prototype.component1=function(){return this.lastModified},br.prototype.copy_ou65wy$=function(t){return new br(void 0===t?this.lastModified:t)},br.prototype.toString=function(){return"LastModifiedVersion(lastModified="+e.toString(this.lastModified)+")"},br.prototype.hashCode=function(){var t=0;return 31*t+e.hashCode(this.lastModified)|0},br.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.lastModified,t.lastModified)},wr.prototype.check_fkh4uy$=function(t){var e,n,i,o;if(null!=(n=null!=(e=t.get_61zpoe$(fi().IfNoneMatch))?Er().parse_61zpoe$(e):null)){var r=this.noneMatch_qetvw1$(n);if(r!==yr())return r}if(null!=(o=null!=(i=t.get_61zpoe$(fi().IfMatch))?Er().parse_61zpoe$(i):null)){var a=this.match_qetvw1$(o);if(a!==yr())return a}return yr()},wr.prototype.match_4cvlr2$=function(t){return!!(null!=this&&this.equals(Er().STAR)||null!=t&&t.equals(Er().STAR))||m(this.normalized_0,t.normalized_0)},wr.prototype.noneMatch_qetvw1$=function(t){if(t.contains_11rb$(Er().STAR))return yr();var n;t:do{var i;if(e.isType(t,at)&&t.isEmpty()){n=!1;break t}for(i=t.iterator();i.hasNext();){var o=i.next();if(this.match_4cvlr2$(o)){n=!0;break t}}n=!1}while(0);return n?gr():yr()},wr.prototype.match_qetvw1$=function(t){var e;if(t.isEmpty())return yr();if(t.contains_11rb$(Er().STAR))return yr();for(e=t.iterator();e.hasNext();){var n=e.next();if(this.match_4cvlr2$(n))return yr()}return vr()},wr.prototype.appendHeadersTo_ewccyn$=function(t){ze(t,this.normalized_0)},xr.prototype.parse_61zpoe$=function(t){var e,n=ii(t),i=$(K(n,10));for(e=n.iterator();e.hasNext();){var o=e.next(),r=i.add_11rb$;if(1!==o.quality){var a="entity-tag quality parameter is not allowed: "+o.quality+".";throw Et(a.toString())}if(!o.params.isEmpty()){var s="entity-tag parameters are not allowed: "+o.params+".";throw Et(s.toString())}r.call(i,this.parseSingle_61zpoe$(o.value))}return i},xr.prototype.parseSingle_61zpoe$=function(t){var e,n;return m(t,"*")?this.STAR:(X(t,"W/")?(e=!0,n=Ie(t,2)):(e=!1,n=t),new wr(X(n,'"')?n:Un(n),e))},xr.$metadata$={kind:Y,simpleName:"Companion",interfaces:[]};var kr,Cr=null;function Er(){return null===Cr&&new xr,Cr}function Sr(){}function Tr(t){this.mapping_0=t}function Or(){}function Nr(){}function Pr(){}function Ir(t){Or.call(this),this.value=t}function Ar(t){Or.call(this),this.value=t}function Rr(t,e){Or.call(this),this.from=S(t),this.to=S(e)}function jr(t){Or.call(this),this.value=t}function Lr(t,e){Or.call(this),this.name=t,this.grammar=e}function zr(t){Or.call(this),this.grammar_j1kz5k$_0=t}function Dr(t){Or.call(this),this.grammar_misagz$_0=t}function Mr(t){Or.call(this),this.grammar_8xmxwn$_0=t}function Br(t){Or.call(this);var n,i=vt();for(n=t.iterator();n.hasNext();){var o=n.next();e.isType(o,Br)?ee(i,o.grammars):i.add_11rb$(o)}this.grammars_78ca78$_0=i}function Fr(t){Or.call(this);var n,i=vt();for(n=t.iterator();n.hasNext();){var o=n.next();e.isType(o,Fr)?ee(i,o.grammars):i.add_11rb$(o)}this.grammars_nbkzju$_0=i}function Ur(t,e){return qr(new Ir(t),e)}function qr(t,e){return new Br(N([t,e]))}function Hr(t,e){return qr(t,new Ir(e))}function Gr(t,e){return new Fr(N([t,e]))}function Kr(t,e){return Gr(t,new Ir(e))}function Vr(t){return new Mr(t)}function Yr(t,e){return new Rr(t,e)}function Wr(){return new jr("\\d")}function Xr(){return Gr(Gr(Wr(),Yr(65,70)),Yr(97,102))}function Zr(){return Vr(Wr())}function Jr(t,e){this.expression_0=t,this.indexes_0=e}function Qr(t){var e=gt(),n=ea(t,e).regex;return new Jr(bt(n),e)}function ta(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!1),this.regex=n?"("+t+")":t,this.groupsCount=n?e+1|0:e}function ea(t,n,i,o){var r;if(void 0===i&&(i=1),void 0===o&&(o=!1),e.isType(t,Ir))return new ta(Ae.Companion.escape_61zpoe$(t.value));if(e.isType(t,jr))return new ta(t.value);if(e.isType(t,Lr)){var a=ea(t.grammar,n,i+1|0);return function(t,n,i){var o;if(!(e.isType(o=t,yt)?o:st()).containsKey_11rb$(n)){var r=vt();t.put_xwzc9p$(n,r)}Ct(t.get_11rb$(n)).add_11rb$(i)}(n,t.name,i),new ta(a.regex,a.groupsCount,!0)}if(e.isType(t,Nr)){var s,l,u=F(),c={v:o?i+1|0:i},p=0;for(s=t.grammars.iterator();s.hasNext();){var h=s.next(),_=Re((p=(l=p)+1|0,l)),d=ea(h,n,c.v,!0);0!==_&&e.isType(t,Fr)&&u.append_pdl1vj$("|"),u.append_pdl1vj$(d.regex),c.v=c.v+d.groupsCount|0}var f=o?c.v-i-1|0:c.v-i|0;return new ta(u.toString(),f,o)}if(e.isType(t,Pr)){if(e.isType(t,zr))r=63;else if(e.isType(t,Dr))r=42;else{if(!e.isType(t,Mr))throw Et(("Unsupported simple grammar element: "+t).toString());r=43}var m=r,$=ea(t.grammar,n,i,!0);return new ta($.regex+String.fromCharCode(m),$.groupsCount)}if(e.isType(t,Ar))return new ta("["+Ae.Companion.escape_61zpoe$(t.value)+"]");if(e.isType(t,Rr))return new ta("["+String.fromCharCode(k(t.from))+"-"+String.fromCharCode(k(t.to))+"]");throw Et(("Unsupported grammar element: "+t).toString())}function na(t){var e;if(ge.PlatformUtils.IS_BROWSER){var n;return"string"==typeof(e=(n="undefined"!=typeof window?window.location.origin:self.location.origin)&&"null"!=n?n:"http://localhost")?e:st()}return"http://localhost"}wr.$metadata$={kind:d,simpleName:"EntityTagVersion",interfaces:[fr]},wr.prototype.component1=function(){return this.etag},wr.prototype.component2=function(){return this.weak},wr.prototype.copy_ivxn3r$=function(t,e){return new wr(void 0===t?this.etag:t,void 0===e?this.weak:e)},wr.prototype.toString=function(){return"EntityTagVersion(etag="+e.toString(this.etag)+", weak="+e.toString(this.weak)+")"},wr.prototype.hashCode=function(){var t=0;return 31*(t=31*t+e.hashCode(this.etag)|0)+e.hashCode(this.weak)|0},wr.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.etag,t.etag)&&e.equals(this.weak,t.weak)},Sr.$metadata$={kind:J,simpleName:"Parser",interfaces:[]},Tr.prototype.get_61zpoe$=function(t){var e;return null!=(e=this.mapping_0.get_11rb$(t))?Lt(e):null},Tr.prototype.getAll_61zpoe$=function(t){var e;return null!=(e=this.mapping_0.get_11rb$(t))?e:W()},Tr.prototype.contains_61zpoe$=function(t){var n,i=this.mapping_0;return(e.isType(n=i,yt)?n:st()).containsKey_11rb$(t)},Tr.$metadata$={kind:d,simpleName:"ParseResult",interfaces:[]},Or.$metadata$={kind:d,simpleName:"Grammar",interfaces:[]},Nr.$metadata$={kind:J,simpleName:"ComplexGrammar",interfaces:[]},Pr.$metadata$={kind:J,simpleName:"SimpleGrammar",interfaces:[]},Ir.$metadata$={kind:d,simpleName:"StringGrammar",interfaces:[Or]},Ar.$metadata$={kind:d,simpleName:"AnyOfGrammar",interfaces:[Or]},Rr.$metadata$={kind:d,simpleName:"RangeGrammar",interfaces:[Or]},jr.$metadata$={kind:d,simpleName:"RawGrammar",interfaces:[Or]},Lr.$metadata$={kind:d,simpleName:"NamedGrammar",interfaces:[Or]},Object.defineProperty(zr.prototype,"grammar",{get:function(){return this.grammar_j1kz5k$_0}}),zr.$metadata$={kind:d,simpleName:"MaybeGrammar",interfaces:[Pr,Or]},Object.defineProperty(Dr.prototype,"grammar",{get:function(){return this.grammar_misagz$_0}}),Dr.$metadata$={kind:d,simpleName:"ManyGrammar",interfaces:[Pr,Or]},Object.defineProperty(Mr.prototype,"grammar",{get:function(){return this.grammar_8xmxwn$_0}}),Mr.$metadata$={kind:d,simpleName:"AtLeastOne",interfaces:[Pr,Or]},Object.defineProperty(Br.prototype,"grammars",{configurable:!0,get:function(){return this.grammars_78ca78$_0}}),Br.$metadata$={kind:d,simpleName:"SequenceGrammar",interfaces:[Nr,Or]},Object.defineProperty(Fr.prototype,"grammars",{configurable:!0,get:function(){return this.grammars_nbkzju$_0}}),Fr.$metadata$={kind:d,simpleName:"OrGrammar",interfaces:[Nr,Or]},Jr.prototype.parse_61zpoe$=function(t){var e=this.expression_0.matchEntire_6bul2c$(t);if(null==e||e.value.length!==t.length)return null;var n,i=gt();for(n=this.indexes_0.entries.iterator();n.hasNext();){var o,r=n.next(),a=r.key;for(o=r.value.iterator();o.hasNext();){var s,l=o.next(),u=vt();if(null!=(s=e.groups.get_za3lpa$(l))){var c=s.value;u.add_11rb$(c)}u.isEmpty()||i.put_xwzc9p$(a,u)}}return new Tr(i)},Jr.prototype.match_61zpoe$=function(t){return this.expression_0.matches_6bul2c$(t)},Jr.$metadata$={kind:d,simpleName:"RegexParser",interfaces:[Sr]},ta.$metadata$={kind:d,simpleName:"GrammarRegex",interfaces:[]};var ia=t.io||(t.io={}),oa=ia.ktor||(ia.ktor={}),ra=oa.http||(oa.http={});ra.etag_srqufk$=ze,ra.encodeURLQueryComponent_x6vyl7$=De,ra.encodeURLPathPart_pdl1vz$=Me,ra.encodeURLPath_pgzefr$=Fe,ra.encodeURLParameter_f4dhtg$=Ue,ra.percentEncode_8bc624$=qe,ra.encodeURLParameterValue_7efafi$=He,ra.decodeURLQueryComponent_5bhe4q$=Ge,ra.decodeURLPart_99zovv$=Ke,ra.URLDecodeException=We,h["ktor-ktor-io-js-legacy"]=n,Object.defineProperty(tn,"Companion",{get:on}),Object.defineProperty(tn,"Parameters",{get:sn}),ra.ContentDisposition=tn,Object.defineProperty(ln,"Companion",{get:pn}),Object.defineProperty(ln,"Application",{get:function(){return null===_n&&new hn,_n}}),Object.defineProperty(ln,"Audio",{get:function(){return null===fn&&new dn,fn}}),Object.defineProperty(ln,"Image",{get:function(){return null===$n&&new mn,$n}}),Object.defineProperty(ln,"Message",{get:function(){return null===gn&&new yn,gn}}),Object.defineProperty(ln,"MultiPart",{get:function(){return null===bn&&new vn,bn}}),Object.defineProperty(ln,"Text",{get:function(){return null===xn&&new wn,xn}}),Object.defineProperty(ln,"Video",{get:function(){return null===Sn&&new kn,Sn}}),ra.ContentType_init_bo4f5s$=Tn,ra.ContentType=ln,ra.BadContentTypeFormatException=On,ra.withCharset_73qf4i$=function(t,e){return t.withParameter_puj7f4$("charset",it(e))},ra.charset_10ldo9$=Nn,h["ktor-ktor-utils-js-legacy"]=i,ra.fromHttpToGmtDate_pdl1vz$=Pn,ra.toHttpDate_bcxie9$=In,ra.groupByPairs_oo4ux4$=jn,ra.toContentType_7efafi$=Ln,ra.parseHeaderValue_pdl1vj$=ii,Object.defineProperty(zn,"Companion",{get:Bn}),ra.HeaderValueWithParameters=zn,ra.quote_pdl1vz$=Un,Object.defineProperty(qn,"Companion",{get:Kn}),ra.Headers=qn,ra.HeadersBuilder=Vn,Object.defineProperty(ra,"EmptyHeaders",{get:Xn}),ra.HeadersImpl=Zn,ra.HeaderValueParam_init_puj7f4$=ti,ra.HeaderValueParam=Qn,ra.HeaderValue=ei,ra.parseAndSortHeader_pdl1vj$=function(t){return Xt(ii(t),new Qt(Jn(ni)))},ra.parseHeaderValue_4mavae$=ri,Object.defineProperty(ra,"HttpHeaders",{get:fi}),ra.UnsafeHeaderException=mi,ra.IllegalHeaderNameException=$i,ra.IllegalHeaderValueException=yi,ra.HttpMessage=vi,ra.HttpMessageBuilder=bi,ra.contentType_jzzg3d$=function(t){var e;return null!=(e=t.headers.get_61zpoe$(fi().ContentType))?pn().parse_61zpoe$(e):null},ra.contentType_v1wgmc$=wi,ra.charset_v1wgmc$=function(t){var e;return null!=(e=wi(t))?Nn(e):null},ra.contentLength_v1wgmc$=function(t){var e;return null!=(e=t.headers.get_61zpoe$(fi().ContentLength))?ft(e):null},Object.defineProperty(xi,"Companion",{get:Ei}),ra.HttpMethod=xi,Object.defineProperty(Si,"Companion",{get:Ni}),ra.HttpProtocolVersion=Si,Object.defineProperty(Pi,"Companion",{get:ji}),ra.HttpStatusCode=Pi,ra.allStatusCodes_8be2vx$=Li,ra.formUrlEncode_nyru4$=zi,ra.formUrlEncodeTo_oiqysc$=Mi,ra.formUrlEncode_invt95$=function(t){var e,n=t.entries(),i=vt();for(e=n.iterator();e.hasNext();){var o,r=e.next(),a=r.value,s=$(K(a,10));for(o=a.iterator();o.hasNext();){var l=o.next();s.add_11rb$(pt(r.key,l))}ee(i,s)}return zi(i)},ra.loadMimes_8be2vx$=Fi,Object.defineProperty(ra,"mimes_8be2vx$",{get:Ui}),ra.ParametersBuilder_za3lpa$=Yi,Object.defineProperty(qi,"Companion",{get:Ki}),ra.Parameters=qi,ra.ParametersBuilder=Vi,ra.ParametersBuilderImpl=Wi,ra.ParametersImpl=Xi,Object.defineProperty(ra,"EmptyParameters",{get:Qi}),ra.parseQueryString_yib5kn$=to,Object.defineProperty(oo,"Companion",{get:lo}),ra.URLBuilder=oo,ra.get_encodedUserAndPassword_a0yvw4$=uo,ra.get_authority_3q1sfd$=co,ra.get_encodedPath_3q1sfd$=po,ra.set_encodedPath_jl1sg7$=ho,ra.set_ax9qsi$=function(t,e,n,i,o,r){void 0===e&&(e=null),void 0===n&&(n=null),void 0===i&&(i=null),void 0===o&&(o=null),void 0===r&&(r=_o),null!=e&&(t.protocol=xo().createOrDefault_61zpoe$(e)),null!=n&&(t.host=n),null!=i&&(t.port=i),null!=o&&ho(t,o),r(t)},ra.takeFrom_jl1sg7$=fo,ra.URLParserException=mo,ra.takeFromUnsafe_9pkbii$=$o,Object.defineProperty(vo,"Companion",{get:xo}),ra.URLProtocol=vo,ra.isWebsocket_v5fpbg$=function(t){return m(t.name,"ws")||m(t.name,"wss")},ra.isSecure_v5fpbg$=function(t){return m(t.name,"https")||m(t.name,"wss")},ra.Url_61zpoe$=ko,ra.URLBuilder_61zpoe$=Co,ra.takeFrom_rs9g2p$=function(t,e){t.protocol=e.protocol,t.host=e.host,t.port=e.port,t.encodedPathSegments=e.encodedPathSegments,t.encodedUser=e.encodedUser,t.encodedPassword=e.encodedPassword;var n=Yi();return ye(n,e.encodedParameters),t.encodedParameters=n,t.encodedFragment=e.encodedFragment,t.trailingQuery=e.trailingQuery,t},ra.takeFrom_wol2ee$=function(t,e){t.protocol=e.protocol,t.host=e.host,t.port=e.port,ho(t,e.encodedPath),t.encodedUser=e.encodedUser,t.encodedPassword=e.encodedPassword;var n=Yi();return n.appendAll_hb0ubp$(to(e.encodedQuery,void 0,void 0,!1)),t.encodedParameters=n,t.encodedFragment=e.encodedFragment,t.trailingQuery=e.trailingQuery,t},ra.get_hostWithPort_5y8s0c$=Eo,ra.appendUrlFullPath_jjjp4j$=To,ra.appendUserAndPassword_g1wfna$=Oo,Object.defineProperty(No,"Companion",{get:Ro}),ra.Url=No,ra.get_authority_5y8s0c$=function(t){var e=F();return e.append_pdl1vj$(jo(t)),0===t.specifiedPort||t.specifiedPort===t.protocol.defaultPort?e.append_pdl1vj$(t.host):e.append_pdl1vj$(Eo(t)),e.toString()},ra.get_encodedUserAndPassword_yq0j0v$=jo,ra.UrlDecodedParametersBuilder=Lo,ra.decodeParameters_7g7dkj$=zo,ra.encodeParameters_hdxgco$=Do;var aa=ra.content||(ra.content={});aa.ByteArrayContent=Bo,aa.CachingOptions=Fo,Object.defineProperty(aa,"CachingProperty",{get:function(){return Io}}),aa.get_caching_eu3mal$=function(t){return t.getProperty_yzaw86$(Io)},aa.set_caching_sc47we$=function(t,e){t.setProperty_uuntuo$(Io,e)},aa.ChannelWriterContent=Uo,Ho.FormItem=Go,Ho.FileItem=Ko,Ho.BinaryItem=Vo,Ho.BinaryChannelItem=Yo,aa.PartData=Ho,Object.defineProperty(Xo,"Empty",{get:function(){return null===Jo&&new Zo,Jo}}),aa.MultiPartData=Xo,aa.forEachPart_la3alz$=function(t,e,n,i){var o=new Qo(t,e,n);return i?o:o.doResume(null)},aa.readAllParts_4xn7mu$=function(t,e,n){var i=new tr(t,e);return n?i:i.doResume(null)},Object.defineProperty(aa,"NullBody",{get:function(){return null===ar&&new er,ar}}),sr.NoContent=lr,sr.ReadChannelContent=ur,sr.WriteChannelContent=pr,sr.ByteArrayContent=hr,sr.ProtocolUpgrade=_r,aa.OutgoingContent=sr,aa.TextContent=dr,Object.defineProperty(aa,"VersionListProperty",{get:function(){return nr}}),aa.get_versions_eu3mal$=function(t){var e;return null!=(e=t.getProperty_yzaw86$(nr))?e:W()},aa.set_versions_fbvemh$=function(t,e){t.setProperty_uuntuo$(nr,e)},aa.Version=fr,Object.defineProperty(mr,"OK",{get:yr}),Object.defineProperty(mr,"NOT_MODIFIED",{get:gr}),Object.defineProperty(mr,"PRECONDITION_FAILED",{get:vr}),aa.VersionCheckResult=mr,aa.LastModifiedVersion=br,aa.EntityTagVersion_61zpoe$=function(t){return Er().parseSingle_61zpoe$(t)},Object.defineProperty(wr,"Companion",{get:Er}),aa.EntityTagVersion=wr;var sa=ra.parsing||(ra.parsing={});sa.Parser=Sr,sa.ParseResult=Tr,sa.Grammar=Or,sa.ComplexGrammar=Nr,sa.SimpleGrammar=Pr,sa.StringGrammar=Ir,sa.AnyOfGrammar=Ar,sa.RangeGrammar=Rr,sa.RawGrammar=jr,sa.NamedGrammar=Lr,sa.MaybeGrammar=zr,sa.ManyGrammar=Dr,sa.AtLeastOne=Mr,sa.SequenceGrammar=Br,sa.OrGrammar=Fr,sa.then_um0xbp$=Ur,sa.then_f2q84u$=qr,sa.then_98g7gp$=Hr,sa.or_f2q84u$=Gr,sa.or_98g7gp$=Kr,sa.atLeastOne_aknn8a$=Vr,sa.to_ls4k3e$=Yr,Object.defineProperty(sa,"digit_8be2vx$",{get:Wr}),Object.defineProperty(sa,"hex_8be2vx$",{get:Xr}),Object.defineProperty(sa,"digits_8be2vx$",{get:Zr});var la=sa.regex||(sa.regex={});la.RegexParser=Jr,la.buildRegexParser_rd79pn$=Qr,(ra.websocket||(ra.websocket={})).websocketServerAccept_61zpoe$=function(t){var n,i,o=lt(e.isCharSequence(n=t)?n:st()).toString()+kr,r=P.Charsets.ISO_8859_1;t:do{if(null!=r&&r.equals(P.Charsets.UTF_8)){i=Oe(o);break t}i=Ne(r.newEncoder(),o,0,o.length)}while(0);return Le(je(i))},ra.get_origin_i4hgrd$=na,qn.prototype.contains_61zpoe$=Ut.prototype.contains_61zpoe$,qn.prototype.contains_puj7f4$=Ut.prototype.contains_puj7f4$,qn.prototype.forEach_ubvtmq$=Ut.prototype.forEach_ubvtmq$,qn.prototype.get_61zpoe$=Ut.prototype.get_61zpoe$,Yn.prototype.contains_61zpoe$=qn.prototype.contains_61zpoe$,Yn.prototype.contains_puj7f4$=qn.prototype.contains_puj7f4$,Yn.prototype.forEach_ubvtmq$=qn.prototype.forEach_ubvtmq$,Yn.prototype.get_61zpoe$=qn.prototype.get_61zpoe$,qi.prototype.contains_61zpoe$=Ut.prototype.contains_61zpoe$,qi.prototype.contains_puj7f4$=Ut.prototype.contains_puj7f4$,qi.prototype.forEach_ubvtmq$=Ut.prototype.forEach_ubvtmq$,qi.prototype.get_61zpoe$=Ut.prototype.get_61zpoe$,Zi.prototype.contains_61zpoe$=qi.prototype.contains_61zpoe$,Zi.prototype.contains_puj7f4$=qi.prototype.contains_puj7f4$,Zi.prototype.forEach_ubvtmq$=qi.prototype.forEach_ubvtmq$,Zi.prototype.get_61zpoe$=qi.prototype.get_61zpoe$;var ua,ca=x(w(new b(97,122),new b(65,90)),new b(48,57)),pa=$(K(ca,10));for(ua=ca.iterator();ua.hasNext();){var ha=ua.next();pa.add_11rb$(C(0|k(ha)))}r=E(pa),a=E(x(w(new b(97,122),new b(65,90)),new b(48,57))),s=E(x(w(new b(97,102),new b(65,70)),new b(48,57)));var _a,da=T([S(58),S(47),S(63),S(35),S(91),S(93),S(64),S(33),S(36),S(38),S(39),S(40),S(41),S(42),S(44),S(59),S(61),S(45),S(46),S(95),S(126),S(43)]),fa=$(K(da,10));for(_a=da.iterator();_a.hasNext();){var ma=_a.next();fa.add_11rb$(C(0|k(ma)))}l=fa,u=T([S(58),S(64),S(33),S(36),S(38),S(39),S(40),S(41),S(42),S(43),S(44),S(59),S(61),S(45),S(46),S(95),S(126)]),c=O(a,T([S(33),S(35),S(36),S(38),S(43),S(45),S(46),S(94),S(95),S(96),S(124),S(126)]));var $a,ya=N([S(45),S(46),S(95),S(126)]),ga=$(K(ya,10));for($a=ya.iterator();$a.hasNext();){var va=$a.next();ga.add_11rb$(C(0|k(va)))}return p=ga,T(["max-age","expires","domain","path","secure","httponly","$x-enc"]),bt('(^|;)\\s*([^;=\\{\\}\\s]+)\\s*(=\\s*("[^"]*"|[^;]*))?'),T([S(59),S(44),S(34)]),Cn=N(["***, dd MMM YYYY hh:mm:ss zzz","****, dd-MMM-YYYY hh:mm:ss zzz","*** MMM d hh:mm:ss YYYY","***, dd-MMM-YYYY hh:mm:ss zzz","***, dd-MMM-YYYY hh-mm-ss zzz","***, dd MMM YYYY hh:mm:ss zzz","*** dd-MMM-YYYY hh:mm:ss zzz","*** dd MMM YYYY hh:mm:ss zzz","*** dd-MMM-YYYY hh-mm-ss zzz","***,dd-MMM-YYYY hh:mm:ss zzz","*** MMM d YYYY hh:mm:ss zzz"]),jt((function(){var t=At();return t.putAll_a2k3zr$(jn(Rt(Ui()))),t})),jt((function(){return jn(ht(Rt(Ui()),Rn))})),En=T([S(40),S(41),S(60),S(62),S(64),S(44),S(59),S(58),S(92),S(34),S(47),S(91),S(93),S(63),S(61),S(123),S(125),S(32),S(9),S(10),S(13)]),Qr(Gr(qr(Hr(qr(Hr(qr(Hr(Zr(),"."),Zr()),"."),Zr()),"."),Zr()),Hr(Ur("[",Vr(Kr(Xr(),":"))),"]"))),Ai=jt((function(){return Fi()})),ao=Gt(""),T([S(33),S(35),S(36),S(37),S(38),S(39),S(42),S(43),S(45),S(46),S(94),S(95),S(96),S(124),S(126)]),T([S(45),S(46),S(95),S(126),S(43),S(47)]),bt("[a-zA-Z0-9\\-._~+/]+=*"),bt("\\\\."),Io=new ve("Caching"),nr=new ve("VersionList"),kr="258EAFA5-E914-47DA-95CA-C5AB0DC85B11",t})?i.apply(e,o):i)||(t.exports=r)},122:function(t,e,n){var i,o,r;o=[e,n(421),n(595),n(197)],void 0===(r="function"==typeof(i=function(t,e,n,i){"use strict";var o,r,a=t.$$importsForInline$$||(t.$$importsForInline$$={}),s=e.Kind.INTERFACE,l=(e.kotlin.text.encodeToByteArray_pdl1vz$,e.Long.fromInt(4088)),u=e.kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED,c=e.kotlin.coroutines.CoroutineImpl,p=e.ensureNotNull,h=e.Kind.CLASS,_=e.kotlin.Unit,d=e.Long.ZERO,f=e.equals,m=e.throwCCE,$=e.toByte,y=e.kotlin.text.StringBuilder_init,g=e.kotlin.coroutines.cancellation.CancellationException_init_pdl1vj$,v=e.kotlin.ranges.coerceAtMost_2p08ub$,b=n.kotlinx.atomicfu.atomic$ref$1,w=n.kotlinx.atomicfu.atomic$long$1,x=n.kotlinx.atomicfu.atomic$int$1,k=Object,C=e.kotlin.IllegalStateException_init_pdl1vj$,E=Math,S=e.kotlin.IllegalArgumentException_init_pdl1vj$,T=e.Long.MAX_VALUE,O=e.defineInlineFunction,N=e.wrapFunction,P=e.toShort,I=e.kotlin.coroutines.cancellation.CancellationException,A=Error,R=i.kotlinx.coroutines.Job,j=i.kotlinx.coroutines.CoroutineScope,L=e.kotlin.coroutines,z=i.kotlinx.coroutines,D=(i.kotlinx.coroutines.newCoroutineContext_7n4184$,i.kotlinx.coroutines.CoroutineScope_1fupul$,i.kotlinx.coroutines.CoroutineDispatcher),M=i.kotlinx.coroutines.launch_s496o7$,B=e.kotlin.ranges.coerceAtMost_dqglrj$,F=e.kotlin.UnsupportedOperationException_init_pdl1vj$,U=e.kotlin.UShort,q=(e.kotlin.UInt,e.kotlin.ULong,e.Long.fromInt(16)),H=e.kotlin.text.StringBuilder_init_za3lpa$,G=e.Kind.OBJECT,K=e.kotlin.Exception_init_pdl1vj$,V=e.kotlin.Exception,Y=(e.kotlin.UByte,new e.Long(-1,0)),W=e.Long.ONE,X=e.kotlin.UnsupportedOperationException_init,Z=e.kotlin.text.Appendable,J=e.kotlin.ranges.coerceAtLeast_dqglrj$,Q=e.unboxChar,tt=e.toChar,et=e.toBoxedChar,nt=e.Long.NEG_ONE,it=e.floatToRawBits,ot=e.doubleToRawBits,rt=(e.kotlin.text.contains_sgbm27$,e.kotlin.collections.copyOf_mrm5p$,e.Long.fromInt(2147483647)),at=e.kotlin.IndexOutOfBoundsException,st=e.kotlin.CharSequence,lt=e.kotlin.text.isLowSurrogate_myv2d0$,ut=e.kotlin.text.isHighSurrogate_myv2d0$,ct=i.kotlinx.coroutines.Job_5dx9e$,pt=n.kotlinx.atomicfu.atomic$boolean$1,ht=e.toString,_t=e.hashCode,dt=e.kotlin.lazy_klfg04$,ft=(e.kotlin.io.println_s8jyv4$,e.kotlin.js.get_js_1yb8b7$),mt=e.kotlin.text.replace_r2fvfm$,$t=Int8Array,yt=e.kotlin.Enum,gt=e.throwISE,vt=e.kotlin.IndexOutOfBoundsException_init,bt=e.kotlin.collections.setOf_i5x0yv$,wt=e.kotlin.text.decodeToString_964n91$,xt=e.kotlin.text.trim_gw00vp$;function kt(){}function Ct(t,e,n){void 0===n&&(n=Ki().Pool),this.autoFlush_tqevpj$_0=e,this._lastReadView_api77i$_0=b(Ki().Empty),this._totalBytesRead_mx8dwu$_0=w(d),this._totalBytesWritten_s86f3f$_0=w(d),this._availableForRead_c8qrsp$_0=x(0),this.channelSize_gcvxze$_0=x(0),this._closed_l8h0oz$_0=b(null),this.writable=new Wn(n),this.readable=ti(t,n),this.lastReadAvailable_1j890x$_fakn2m$_0=x(0),this.lastReadView_92ta1h$_nlevyr$_0=b(Ki().Empty),this.slot_2l2jew$_0=new fo,this.flushMutex_pw64cr$_0=new k,this.flushBuffer_1r7aq2$_0=new Wn;var i=Vn(t).toInt();this.afterWrite_za3lpa$(i),this._availableForRead_c8qrsp$_0.atomicfu$addAndGet(i)}function Et(t,e){return function(){return t.availableForWrite=i)){var a=_o(o,1,null);try{for(var s;;){var l=sn(t,e,r.v,i,a);if(!(l>=0))throw C("Check failed.".toString());if(r.v=r.v+l|0,(s=r.v>=i?0:0===l?8:1)<=0)break;a=_o(o,s,a)}}finally{o.afterHeadWrite()}cn(t,o)}}function rn(t,n,i){void 0===i&&(i=2147483647);var o=e.Long.fromInt(i),r=un(n),a=H((o.compareTo_11rb$(r)<=0?o:r).toInt());return _r(t,n,a,i),a.toString()}function an(t){wr.call(this,t),this.name="TooLongLineException"}function sn(t,e,n,i,o){var r=i-n|0;return sr(t,new Li(e,n,r),0,r,o)}function ln(t,n,i,o){void 0===i&&(i=0),void 0===o&&(o=n.length);var r={v:i};if(r.v>=o)return qi;var a=Ki().Pool.borrow();try{var s,l=sr(t,n,r.v,o,a);if(r.v=r.v+l|0,r.v===o){var u,c,p=new Int8Array(a.writePosition-a.readPosition|0);return u=p.length-0|0,Mn(e.isType(c=a,hn)?c:m(),p,0,u),p}var h=new Wn;try{h.appendSingleChunk_pvnryh$(a.duplicate()),pn(t,h,n,r.v,o),s=h.build()}catch(t){throw e.isType(t,A)?(h.release(),t):t}return Ni(s)}finally{a.release_2bs5fo$(Ki().Pool)}}function un(t){if(e.isType(t,Xn))return t.remaining;var n=t.remaining,i=q;return n.compareTo_11rb$(i)>=0?n:i}function cn(t,e){var n={v:1},i={v:0},o=_o(e,1,null);try{for(;;){var r=o,a=r.limit-r.writePosition|0;if(n.v=0,i.v=i.v+(a-(r.limit-r.writePosition|0))|0,!(n.v>0))break;o=_o(e,1,o)}}finally{e.afterHeadWrite()}return i.v}function pn(t,e,n,i,o){var r={v:i};if(r.v>=o)return 0;var a={v:0},s=_o(e,1,null);try{for(var l;;){var u=s,c=u.limit-u.writePosition|0,p=sr(t,n,r.v,o,u);if(!(p>=0))throw C("Check failed.".toString());if(r.v=r.v+p|0,a.v=a.v+(c-(u.limit-u.writePosition|0))|0,(l=r.v>=o?0:0===p?8:1)<=0)break;s=_o(e,l,s)}}finally{e.afterHeadWrite()}return a.v=a.v+cn(0,e)|0,a.v}function hn(t){mn(),this.memory=t,this.readPosition_osecaz$_0=0,this.writePosition_oj9ite$_0=0,this.startGap_cakrhy$_0=0,this.limit_uf38zz$_0=this.memory.view.byteLength,this.capacity=this.memory.view.byteLength}function _n(){fn=this,this.ReservedSize=8}Ie.prototype=Object.create(I.prototype),Ie.prototype.constructor=Ie,wr.prototype=Object.create(A.prototype),wr.prototype.constructor=wr,an.prototype=Object.create(wr.prototype),an.prototype.constructor=an,En.prototype=Object.create(V.prototype),En.prototype.constructor=En,Nn.prototype=Object.create(na.prototype),Nn.prototype.constructor=Nn,Wn.prototype=Object.create(yi.prototype),Wn.prototype.constructor=Wn,Xn.prototype=Object.create(ei.prototype),Xn.prototype.constructor=Xn,Fi.prototype=Object.create(xo.prototype),Fi.prototype.constructor=Fi,Ui.prototype=Object.create(xo.prototype),Ui.prototype.constructor=Ui,zi.prototype=Object.create(hn.prototype),zi.prototype.constructor=zi,lo.prototype=Object.create(V.prototype),lo.prototype.constructor=lo,bo.prototype=Object.create(na.prototype),bo.prototype.constructor=bo,To.prototype=Object.create(Ct.prototype),To.prototype.constructor=To,or.prototype=Object.create(ir.prototype),or.prototype.constructor=or,pr.prototype=Object.create(cr.prototype),pr.prototype.constructor=pr,br.prototype=Object.create(Jo.prototype),br.prototype.constructor=br,Nr.prototype=Object.create(yt.prototype),Nr.prototype.constructor=Nr,Kr.prototype=Object.create(V.prototype),Kr.prototype.constructor=Kr,Yr.prototype=Object.create(Kr.prototype),Yr.prototype.constructor=Yr,kt.$metadata$={kind:s,simpleName:"ByteChannel",interfaces:[zo,Io]},Object.defineProperty(Ct.prototype,"autoFlush",{get:function(){return this.autoFlush_tqevpj$_0}}),Object.defineProperty(Ct.prototype,"isCancelled_e0fq87$_0",{configurable:!0,get:function(){var t;return null!=(null!=(t=this._closed_l8h0oz$_0.kotlinx$atomicfu$value)?t.cause:null)}}),Object.defineProperty(Ct.prototype,"closed",{configurable:!0,get:function(){return null!=this._closed_l8h0oz$_0.kotlinx$atomicfu$value},set:function(t){throw C("Setting is not allowed for closed".toString())}}),Object.defineProperty(Ct.prototype,"lastReadAvailable_1j890x$_0",{configurable:!0,get:function(){return this.lastReadAvailable_1j890x$_fakn2m$_0.kotlinx$atomicfu$value},set:function(t){this.lastReadAvailable_1j890x$_fakn2m$_0.kotlinx$atomicfu$value=t}}),Object.defineProperty(Ct.prototype,"lastReadView_92ta1h$_0",{configurable:!0,get:function(){return this.lastReadView_92ta1h$_nlevyr$_0.kotlinx$atomicfu$value},set:function(t){this.lastReadView_92ta1h$_nlevyr$_0.kotlinx$atomicfu$value=t}}),Object.defineProperty(Ct.prototype,"availableForRead",{configurable:!0,get:function(){return this._availableForRead_c8qrsp$_0.kotlinx$atomicfu$value}}),Object.defineProperty(Ct.prototype,"availableForWrite",{configurable:!0,get:function(){var t=4088-this.channelSize_gcvxze$_0.kotlinx$atomicfu$value|0;return E.max(0,t)}}),Object.defineProperty(Ct.prototype,"isClosedForRead",{configurable:!0,get:function(){return this.isCancelled_e0fq87$_0||this.closed&&0===this.channelSize_gcvxze$_0.kotlinx$atomicfu$value}}),Object.defineProperty(Ct.prototype,"isClosedForWrite",{configurable:!0,get:function(){return this.closed}}),Object.defineProperty(Ct.prototype,"totalBytesRead",{configurable:!0,get:function(){return this._totalBytesRead_mx8dwu$_0.kotlinx$atomicfu$value}}),Object.defineProperty(Ct.prototype,"totalBytesWritten",{configurable:!0,get:function(){return this._totalBytesWritten_s86f3f$_0.kotlinx$atomicfu$value}}),Object.defineProperty(Ct.prototype,"closedCause",{configurable:!0,get:function(){var t;return null!=(t=this._closed_l8h0oz$_0.kotlinx$atomicfu$value)?t.cause:null},set:function(t){throw C("Closed cause shouldn't be changed directly".toString())}}),St.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},St.prototype=Object.create(c.prototype),St.prototype.constructor=St,St.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:case 4:this.state_0=2;continue;case 1:throw this.exception_0;case 2:if(this.$this.availableForWrite>=this.local$count||this.$this.closed){this.state_0=5;continue}if(this.$this.flushImpl_t0lzva$_0()){this.state_0=4;continue}if(this.state_0=3,this.result_0=this.$this.slot_2l2jew$_0.sleep_u332lz$(Et(this.$this,this.local$count),this),this.result_0===u)return u;continue;case 3:this.state_0=4;continue;case 5:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.awaitAtLeastNBytesAvailableForWrite_kcn2v3$=function(t,e,n){var i=new St(this,t,e);return n?i:i.doResume(null)},Ot.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},Ot.prototype=Object.create(c.prototype),Ot.prototype.constructor=Ot,Ot.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:case 3:this.state_0=2;continue;case 1:throw this.exception_0;case 2:if(this.$this.availableForRead>=this.local$count||this.$this.isClosedForRead){this.state_0=4;continue}if(this.state_0=3,this.result_0=this.$this.slot_2l2jew$_0.sleep_u332lz$(Tt(this.$this,this.local$count),this),this.result_0===u)return u;continue;case 4:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.awaitAtLeastNBytesAvailableForRead_kcn2v3$=function(t,e,n){var i=new Ot(this,t,e);return n?i:i.doResume(null)},Ct.prototype.flush=function(){this.flushImpl_t0lzva$_0()},Ct.prototype.flushImpl_t0lzva$_0=function(){return this.writable.isEmpty?(this.slot_2l2jew$_0.resume(),!1):(this.flushWrittenBytes_2bgxqi$_0(),this.slot_2l2jew$_0.resume(),!0)},Ct.prototype.flushWrittenBytes_2bgxqi$_0=function(){var t=this.writable.size,e=p(this.writable.stealAll_8be2vx$());this.flushBuffer_1r7aq2$_0.writeChunkBuffer_pvnryh$(e),this._availableForRead_c8qrsp$_0.atomicfu$addAndGet(t)},Ct.prototype.prepareFlushedBytes=function(){uo(this.readable,this.flushBuffer_1r7aq2$_0)},Ct.prototype.ensureNotClosed_ozgwi5$_0=function(){var t;if(this.closed)throw null!=(t=this.closedCause)?t:new Ie("Channel "+this+" is already closed")},Ct.prototype.ensureNotFailed_7bddlw$_0=function(){var t;if(null!=(t=this.closedCause))throw t},Ct.prototype.ensureNotFailed_2bmfsh$_0=function(t){var e;if(null!=(e=this.closedCause))throw t.release(),e},Nt.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},Nt.prototype=Object.create(c.prototype),Nt.prototype.constructor=Nt,Nt.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(1,this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:return this.$this.writable.writeByte_s8j3t7$(this.local$b),void this.$this.afterWrite_za3lpa$(1);default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.writeByte_s8j3t7$=function(t,e,n){var i=new Nt(this,t,e);return n?i:i.doResume(null)},Pt.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},Pt.prototype=Object.create(c.prototype),Pt.prototype.constructor=Pt,Pt.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(2,this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:return xi(this.$this.writable,this.local$s),void this.$this.afterWrite_za3lpa$(2);default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.writeShort_mq22fl$=function(t,e,n){var i=new Pt(this,t,e);return n?i:i.doResume(null)},It.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},It.prototype=Object.create(c.prototype),It.prototype.constructor=It,It.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(4,this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:return ki(this.$this.writable,this.local$i),void this.$this.afterWrite_za3lpa$(4);default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.writeInt_za3lpa$=function(t,e,n){var i=new It(this,t,e);return n?i:i.doResume(null)},At.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},At.prototype=Object.create(c.prototype),At.prototype.constructor=At,At.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(8,this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:return Ei(this.$this.writable,this.local$l),void this.$this.afterWrite_za3lpa$(8);default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.writeLong_s8cxhz$=function(t,e,n){var i=new At(this,t,e);return n?i:i.doResume(null)},Rt.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},Rt.prototype=Object.create(c.prototype),Rt.prototype.constructor=Rt,Rt.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(4,this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:return Ti(this.$this.writable,this.local$f),void this.$this.afterWrite_za3lpa$(4);default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.writeFloat_mx4ult$=function(t,e,n){var i=new Rt(this,t,e);return n?i:i.doResume(null)},jt.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},jt.prototype=Object.create(c.prototype),jt.prototype.constructor=jt,jt.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(8,this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:return Oi(this.$this.writable,this.local$d),void this.$this.afterWrite_za3lpa$(8);default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.writeDouble_14dthe$=function(t,e,n){var i=new jt(this,t,e);return n?i:i.doResume(null)},Lt.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},Lt.prototype=Object.create(c.prototype),Lt.prototype.constructor=Lt,Lt.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(1,this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:var t=this.local$packet.remaining.toInt();return this.$this.writable.writePacket_3uq2w4$(this.local$packet),void this.$this.afterWrite_za3lpa$(t);default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.writePacket_3uq2w4$=function(t,e,n){var i=new Lt(this,t,e);return n?i:i.doResume(null)},zt.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},zt.prototype=Object.create(c.prototype),zt.prototype.constructor=zt,zt.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(1,this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:var t=this.local$src.writePosition-this.local$src.readPosition|0;return vi(this.$this.writable,this.local$src),void this.$this.afterWrite_za3lpa$(t);default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.writeFully_b4g5fm$=function(t,e,n){var i=new zt(this,t,e);return n?i:i.doResume(null)},Dt.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},Dt.prototype=Object.create(c.prototype),Dt.prototype.constructor=Dt,Dt.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.local$currentIndex=this.local$offset,this.local$endIndex=this.local$offset+this.local$length|0,this.state_0=2;continue;case 1:throw this.exception_0;case 2:if(this.local$currentIndex>=this.local$endIndex){this.state_0=4;continue}if(this.state_0=3,this.result_0=this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(1,this),this.result_0===u)return u;continue;case 3:var t=this.$this.availableForWrite,e=this.local$endIndex-this.local$currentIndex|0,n=E.min(t,e);gi(this.$this.writable,this.local$src,this.local$currentIndex,n),this.local$currentIndex=this.local$currentIndex+n|0,this.$this.afterWrite_za3lpa$(n),this.state_0=2;continue;case 4:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.writeFully_mj6st8$=function(t,e,n,i,o){var r=new Dt(this,t,e,n,i);return o?r:r.doResume(null)},Mt.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},Mt.prototype=Object.create(c.prototype),Mt.prototype.constructor=Mt,Mt.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.local$currentIndex=this.local$startIndex,this.state_0=2;continue;case 1:throw this.exception_0;case 2:if(this.local$currentIndex>=this.local$endIndex){this.state_0=4;continue}if(this.state_0=3,this.result_0=this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(1,this),this.result_0===u)return u;continue;case 3:var t=this.$this.availableForWrite,e=this.local$endIndex-this.local$currentIndex|0,n=E.min(t,e);bi(this.$this.writable,this.local$memory,this.local$currentIndex,n),this.local$currentIndex=this.local$currentIndex+n|0,this.$this.afterWrite_za3lpa$(n),this.state_0=2;continue;case 4:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.writeFully_9etqdk$=function(t,e,n,i,o){var r=new Mt(this,t,e,n,i);return o?r:r.doResume(null)},Bt.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},Bt.prototype=Object.create(c.prototype),Bt.prototype.constructor=Bt,Bt.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.local$srcRemaining=this.local$src.writePosition-this.local$src.readPosition|0,0===this.local$srcRemaining)return 0;this.state_0=2;continue;case 1:throw this.exception_0;case 2:var t=this.$this.availableForWrite,e=E.min(this.local$srcRemaining,t);if(0===e){if(this.state_0=3,this.result_0=this.$this.writeAvailableSuspend_2ppiy2$_0(this.local$src,this),this.result_0===u)return u;continue}vi(this.$this.writable,this.local$src,e),this.$this.afterWrite_za3lpa$(e),this.local$tmp$=e,this.state_0=4;continue;case 3:this.local$tmp$=this.result_0,this.state_0=4;continue;case 4:return this.local$tmp$;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.writeAvailable_j2u0py$=function(t,e,n){var i=new Bt(this,t,e);return n?i:i.doResume(null)},Ft.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},Ft.prototype=Object.create(c.prototype),Ft.prototype.constructor=Ft,Ft.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(0===this.local$length)return 0;this.state_0=2;continue;case 1:throw this.exception_0;case 2:var t=this.$this.availableForWrite,e=E.min(this.local$length,t);if(0===e){if(this.state_0=3,this.result_0=this.$this.writeAvailableSuspend_1zn44g$_0(this.local$src,this.local$offset,this.local$length,this),this.result_0===u)return u;continue}gi(this.$this.writable,this.local$src,this.local$offset,e),this.$this.afterWrite_za3lpa$(e),this.local$tmp$=e,this.state_0=4;continue;case 3:this.local$tmp$=this.result_0,this.state_0=4;continue;case 4:return this.local$tmp$;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.writeAvailable_mj6st8$=function(t,e,n,i,o){var r=new Ft(this,t,e,n,i);return o?r:r.doResume(null)},Ut.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},Ut.prototype=Object.create(c.prototype),Ut.prototype.constructor=Ut,Ut.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t=this.$this.beginWriteSession();if(this.state_0=2,this.result_0=this.local$visitor(t,this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.writeSuspendSession_8dv01$=function(t,e,n){var i=new Ut(this,t,e);return n?i:i.doResume(null)},qt.prototype.request_za3lpa$=function(t){return 0===this.this$ByteChannelSequentialBase.availableForWrite?null:this.this$ByteChannelSequentialBase.writable.prepareWriteHead_za3lpa$(t)},qt.prototype.written_za3lpa$=function(t){this.this$ByteChannelSequentialBase.writable.afterHeadWrite(),this.this$ByteChannelSequentialBase.afterWrite_za3lpa$(t)},qt.prototype.flush=function(){this.this$ByteChannelSequentialBase.flush()},Ht.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},Ht.prototype=Object.create(c.prototype),Ht.prototype.constructor=Ht,Ht.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.$this.this$ByteChannelSequentialBase.availableForWrite=this.local$limit.toNumber()){this.state_0=5;continue}var t=this.local$limit.subtract(e.Long.fromInt(this.local$builder.size)),n=this.$this.readable.remaining,i=t.compareTo_11rb$(n)<=0?t:n;if(this.local$builder.writePacket_pi0yjl$(this.$this.readable,i),this.$this.afterRead_za3lpa$(i.toInt()),this.$this.ensureNotFailed_2bmfsh$_0(this.local$builder),this.$this.isClosedForRead||this.local$builder.size===this.local$limit.toInt()){this.state_0=5;continue}this.state_0=3;continue;case 3:if(this.state_0=4,this.result_0=this.$this.awaitSuspend_za3lpa$(1,this),this.result_0===u)return u;continue;case 5:return this.$this.ensureNotFailed_2bmfsh$_0(this.local$builder),this.local$builder.build();default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.readRemainingSuspend_gfhva8$_0=function(t,e,n,i){var o=new oe(this,t,e,n);return i?o:o.doResume(null)},re.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},re.prototype=Object.create(c.prototype),re.prototype.constructor=re,re.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.$this.checkClosed_e67qpq$_0(this.local$size);var t=new Wn,n=this.local$size,i=e.Long.fromInt(n),o=this.$this.readable.remaining,r=(i.compareTo_11rb$(o)<=0?i:o).toInt();if(n=n-r|0,t.writePacket_f7stg6$(this.$this.readable,r),this.$this.afterRead_za3lpa$(r),this.$this.checkClosed_e67qpq$_0(n,t),n>0){if(this.state_0=2,this.result_0=this.$this.readPacketSuspend_2ns5o1$_0(t,n,this),this.result_0===u)return u;continue}this.local$tmp$=t.build(),this.state_0=3;continue;case 1:throw this.exception_0;case 2:this.local$tmp$=this.result_0,this.state_0=3;continue;case 3:return this.local$tmp$;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.readPacket_za3lpa$=function(t,e,n){var i=new re(this,t,e);return n?i:i.doResume(null)},ae.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},ae.prototype=Object.create(c.prototype),ae.prototype.constructor=ae,ae.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.local$remaining=this.local$size,this.state_0=2;continue;case 1:throw this.exception_0;case 2:if(this.local$remaining<=0){this.state_0=5;continue}var t=e.Long.fromInt(this.local$remaining),n=this.$this.readable.remaining,i=(t.compareTo_11rb$(n)<=0?t:n).toInt();if(this.local$remaining=this.local$remaining-i|0,this.local$builder.writePacket_f7stg6$(this.$this.readable,i),this.$this.afterRead_za3lpa$(i),this.$this.checkClosed_e67qpq$_0(this.local$remaining,this.local$builder),this.local$remaining>0){if(this.state_0=3,this.result_0=this.$this.awaitSuspend_za3lpa$(1,this),this.result_0===u)return u;continue}this.state_0=4;continue;case 3:this.state_0=4;continue;case 4:this.state_0=2;continue;case 5:return this.$this.checkClosed_e67qpq$_0(this.local$remaining,this.local$builder),this.local$builder.build();default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.readPacketSuspend_2ns5o1$_0=function(t,e,n,i){var o=new ae(this,t,e,n);return i?o:o.doResume(null)},Ct.prototype.readAvailableClosed=function(){var t;if(null!=(t=this.closedCause))throw t;return this.availableForRead>0&&this.prepareFlushedBytes(),-1},Ct.prototype.readAvailable_j2u0py$=function(t,n){var i;return this.readAvailable_lh221x$(e.isType(i=t,hn)?i:m(),n)},se.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},se.prototype=Object.create(c.prototype),se.prototype.constructor=se,se.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;if(null!=(t=this.$this.closedCause))throw t;if(this.$this.closed&&0===this.$this.availableForRead)return-1;this.state_0=2;continue;case 1:throw this.exception_0;case 2:if(0==(this.local$dst.limit-this.local$dst.writePosition|0))return 0;this.state_0=3;continue;case 3:if(0===this.$this.availableForRead){if(this.state_0=4,this.result_0=this.$this.awaitSuspend_za3lpa$(1,this),this.result_0===u)return u;continue}this.state_0=5;continue;case 4:this.state_0=5;continue;case 5:this.$this.readable.canRead()||this.$this.prepareFlushedBytes();var n=e.Long.fromInt(this.local$dst.limit-this.local$dst.writePosition|0),i=this.$this.readable.remaining,o=(n.compareTo_11rb$(i)<=0?n:i).toInt();return si(this.$this.readable,this.local$dst,o),this.$this.afterRead_za3lpa$(o),o;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.readAvailable_lh221x$=function(t,e,n){var i=new se(this,t,e);return n?i:i.doResume(null)},le.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},le.prototype=Object.create(c.prototype),le.prototype.constructor=le,le.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;if(this.state_0=2,this.result_0=this.$this.readFully_bkznnu$_0(e.isType(t=this.local$dst,hn)?t:m(),this.local$n,this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.readFully_a396d0$=function(t,e,n,i){var o=new le(this,t,e,n);return i?o:o.doResume(null)},ue.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},ue.prototype=Object.create(c.prototype),ue.prototype.constructor=ue,ue.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(!(this.local$n<=(this.local$dst.limit-this.local$dst.writePosition|0))){var t="Not enough space in the destination buffer to write "+this.local$n+" bytes";throw S(t.toString())}if(!(this.local$n>=0))throw S("n shouldn't be negative".toString());if(null!=this.$this.closedCause)throw p(this.$this.closedCause);if(this.$this.readable.remaining.toNumber()>=this.local$n){var e=(si(this.$this.readable,this.local$dst,this.local$n),_);this.$this.afterRead_za3lpa$(this.local$n),this.local$tmp$=e,this.state_0=4;continue}if(this.$this.closed)throw new Yr("Channel is closed and not enough bytes available: required "+this.local$n+" but "+this.$this.availableForRead+" available");if(this.state_0=2,this.result_0=this.$this.readFullySuspend_8xotw2$_0(this.local$dst,this.local$n,this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:this.local$tmp$=this.result_0,this.state_0=3;continue;case 3:this.state_0=4;continue;case 4:this.state_0=5;continue;case 5:return this.local$tmp$;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.readFully_bkznnu$_0=function(t,e,n,i){var o=new ue(this,t,e,n);return i?o:o.doResume(null)},ce.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},ce.prototype=Object.create(c.prototype),ce.prototype.constructor=ce,ce.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.awaitSuspend_za3lpa$(this.local$n,this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:if(this.state_0=3,this.result_0=this.$this.readFully_bkznnu$_0(this.local$dst,this.local$n,this),this.result_0===u)return u;continue;case 3:return this.result_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.readFullySuspend_8xotw2$_0=function(t,e,n,i){var o=new ce(this,t,e,n);return i?o:o.doResume(null)},pe.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},pe.prototype=Object.create(c.prototype),pe.prototype.constructor=pe,pe.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;if(null!=(t=this.$this.closedCause))throw t;if(this.$this.closed&&0===this.$this.availableForRead)return-1;this.state_0=2;continue;case 1:throw this.exception_0;case 2:if(0===this.local$length)return 0;this.state_0=3;continue;case 3:if(0===this.$this.availableForRead){if(this.state_0=4,this.result_0=this.$this.awaitSuspend_za3lpa$(1,this),this.result_0===u)return u;continue}this.state_0=5;continue;case 4:this.state_0=5;continue;case 5:this.$this.readable.canRead()||this.$this.prepareFlushedBytes();var n=e.Long.fromInt(this.local$length),i=this.$this.readable.remaining,o=(n.compareTo_11rb$(i)<=0?n:i).toInt();return ai(this.$this.readable,this.local$dst,this.local$offset,o),this.$this.afterRead_za3lpa$(o),o;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.readAvailable_mj6st8$=function(t,e,n,i,o){var r=new pe(this,t,e,n,i);return o?r:r.doResume(null)},he.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},he.prototype=Object.create(c.prototype),he.prototype.constructor=he,he.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.readAvailable_mj6st8$(this.local$dst,this.local$offset,this.local$length,this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:if(this.local$rc=this.result_0,this.local$rc===this.local$length)return;this.state_0=3;continue;case 3:if(-1===this.local$rc)throw new Yr("Unexpected end of stream");if(this.state_0=4,this.result_0=this.$this.readFullySuspend_ayq7by$_0(this.local$dst,this.local$offset+this.local$rc|0,this.local$length-this.local$rc|0,this),this.result_0===u)return u;continue;case 4:return this.result_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.readFully_mj6st8$=function(t,e,n,i,o){var r=new he(this,t,e,n,i);return o?r:r.doResume(null)},_e.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},_e.prototype=Object.create(c.prototype),_e.prototype.constructor=_e,_e.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.local$written=0,this.state_0=2;continue;case 1:throw this.exception_0;case 2:if(this.local$written>=this.local$length){this.state_0=4;continue}if(this.state_0=3,this.result_0=this.$this.readAvailable_mj6st8$(this.local$dst,this.local$offset+this.local$written|0,this.local$length-this.local$written|0,this),this.result_0===u)return u;continue;case 3:var t=this.result_0;if(-1===t)throw new Yr("Unexpected end of stream");this.local$written=this.local$written+t|0,this.state_0=2;continue;case 4:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.readFullySuspend_ayq7by$_0=function(t,e,n,i,o){var r=new _e(this,t,e,n,i);return o?r:r.doResume(null)},de.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},de.prototype=Object.create(c.prototype),de.prototype.constructor=de,de.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.$this.readable.canRead()){var t=this.$this.readable.readByte()===$(1);this.$this.afterRead_za3lpa$(1),this.local$tmp$=t,this.state_0=3;continue}if(this.state_0=2,this.result_0=this.$this.readBooleanSlow_cbbszf$_0(this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:this.local$tmp$=this.result_0,this.state_0=3;continue;case 3:return this.local$tmp$;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.readBoolean=function(t,e){var n=new de(this,t);return e?n:n.doResume(null)},fe.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},fe.prototype=Object.create(c.prototype),fe.prototype.constructor=fe,fe.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.awaitSuspend_za3lpa$(1,this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:if(this.$this.checkClosed_e67qpq$_0(1),this.state_0=3,this.result_0=this.$this.readBoolean(this),this.result_0===u)return u;continue;case 3:return this.result_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.readBooleanSlow_cbbszf$_0=function(t,e){var n=new fe(this,t);return e?n:n.doResume(null)},Ct.prototype.completeReading_um9rnf$_0=function(){var t=this.lastReadView_92ta1h$_0,e=t.writePosition-t.readPosition|0,n=this.lastReadAvailable_1j890x$_0-e|0;this.lastReadView_92ta1h$_0!==mn().Empty&&po(this.readable,this.lastReadView_92ta1h$_0),n>0&&this.afterRead_za3lpa$(n),this.lastReadAvailable_1j890x$_0=0,this.lastReadView_92ta1h$_0=Ki().Empty},Ct.prototype.await_za3lpa$$default=function(t,e){if(!(t>=0))throw S(("atLeast parameter shouldn't be negative: "+t).toString());if(!(t<=o.toNumber())){var n="atLeast parameter shouldn't be larger than max buffer size of "+o.toString()+": "+t;throw S(n.toString())}return this.completeReading_um9rnf$_0(),0===t?!this.isClosedForRead:this.readable.remaining.toNumber()>=t||this.awaitSuspend_za3lpa$(t,e)},me.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},me.prototype=Object.create(c.prototype),me.prototype.constructor=me,me.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.$this.readable.endOfInput){if(this.state_0=2,this.result_0=this.$this.awaitSuspend_za3lpa$(1,this),this.result_0===u)return u;continue}return!0;case 1:throw this.exception_0;case 2:return this.result_0;case 3:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.awaitInternalAtLeast1_8be2vx$=function(t,e){var n=new me(this,t);return e?n:n.doResume(null)},$e.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},$e.prototype=Object.create(c.prototype),$e.prototype.constructor=$e,$e.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;if(!(this.local$atLeast>=0))throw S("Failed requirement.".toString());if(this.state_0=2,this.result_0=this.$this.awaitAtLeastNBytesAvailableForRead_kcn2v3$(this.local$atLeast,this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:if(this.$this.prepareFlushedBytes(),null!=(t=this.$this.closedCause))throw t;return!this.$this.isClosedForRead&&this.$this.availableForRead>=this.local$atLeast;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.awaitSuspend_za3lpa$=function(t,e,n){var i=new $e(this,t,e);return n?i:i.doResume(null)},Ct.prototype.discard_za3lpa$=function(t){var e;if(null!=(e=this.closedCause))throw e;if(0===t)return 0;var n=this.readable.discard_za3lpa$(t);return this.afterRead_za3lpa$(t),this.requestNextView_id8q5z$_0(1),n},Ct.prototype.request_za3lpa$$default=function(t){var e;if(null!=(e=this.closedCause))throw e;return this.completeReading_um9rnf$_0(),this.requestNextView_id8q5z$_0(t)},Ct.prototype.requestNextView_id8q5z$_0=function(t){this.readable.endOfInput&&this.prepareFlushedBytes();var e=this.readable.prepareReadHead_kcn2v3$(t);return null==e?(this.lastReadView_92ta1h$_0=Ki().Empty,this.lastReadAvailable_1j890x$_0=0):(this.lastReadView_92ta1h$_0=e,this.lastReadAvailable_1j890x$_0=e.writePosition-e.readPosition|0),e},ye.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},ye.prototype=Object.create(c.prototype),ye.prototype.constructor=ye,ye.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t=this.$this.readable.discard_s8cxhz$(this.local$max);if(this.$this.afterRead_za3lpa$(t.toInt()),f(t,this.local$max)||this.$this.isClosedForRead)return this.$this.ensureNotFailed_7bddlw$_0(),t;if(this.state_0=2,this.result_0=this.$this.discardSuspend_7c0j1e$_0(this.local$max,t,this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:this.local$tmp$=this.result_0,this.state_0=3;continue;case 3:return this.local$tmp$;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.discard_s8cxhz$=function(t,e,n){var i=new ye(this,t,e);return n?i:i.doResume(null)},ge.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},ge.prototype=Object.create(c.prototype),ge.prototype.constructor=ge,ge.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.local$discarded=this.local$discarded0,this.state_0=2;continue;case 1:throw this.exception_0;case 2:if(this.state_0=3,this.result_0=this.$this.await_za3lpa$(1,this),this.result_0===u)return u;continue;case 3:if(this.result_0){this.state_0=4;continue}this.state_0=5;continue;case 4:var t=this.$this.readable.discard_s8cxhz$(this.local$max.subtract(this.local$discarded));if(this.$this.afterRead_za3lpa$(t.toInt()),this.local$discarded=this.local$discarded.add(t),this.local$discarded.compareTo_11rb$(this.local$max)>=0||this.$this.isClosedForRead){this.state_0=5;continue}this.state_0=2;continue;case 5:return this.$this.ensureNotFailed_7bddlw$_0(),this.local$discarded;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.discardSuspend_7c0j1e$_0=function(t,e,n,i){var o=new ge(this,t,e,n);return i?o:o.doResume(null)},Ct.prototype.readSession_m70re0$=function(t){try{t(this)}finally{this.completeReading_um9rnf$_0()}},Ct.prototype.startReadSession=function(){return this},Ct.prototype.endReadSession=function(){this.completeReading_um9rnf$_0()},ve.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},ve.prototype=Object.create(c.prototype),ve.prototype.constructor=ve,ve.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.exceptionState_0=3,this.state_0=1,this.result_0=this.local$consumer(this.$this,this),this.result_0===u)return u;continue;case 1:this.exceptionState_0=5,this.finallyPath_0=[2],this.state_0=4;continue;case 2:return;case 3:this.finallyPath_0=[5],this.state_0=4;continue;case 4:this.exceptionState_0=5,this.$this.completeReading_um9rnf$_0(),this.state_0=this.finallyPath_0.shift();continue;case 5:throw this.exception_0;default:throw this.state_0=5,new Error("State Machine Unreachable execution")}}catch(t){if(5===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.readSuspendableSession_kiqllg$=function(t,e,n){var i=new ve(this,t,e);return n?i:i.doResume(null)},be.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},be.prototype=Object.create(c.prototype),be.prototype.constructor=be,be.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.local$this$ByteChannelSequentialBase.await_za3lpa$(this.local$size,this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:return this.result_0?this.local$this$ByteChannelSequentialBase.readable:null;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.readUTF8LineTo_yhx0yw$=function(t,e,n){if(this.isClosedForRead){var i=this.closedCause;if(null!=i)throw i;return!1}return Ji(t,e,(r=this,function(t,e,n){var i=new be(r,t,e);return n?i:i.doResume(null)}),(o=this,function(t){return o.afterRead_za3lpa$(t),_}),n);var o,r},we.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},we.prototype=Object.create(c.prototype),we.prototype.constructor=we,we.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.local$builder=y(),this.state_0=2,this.result_0=this.$this.readUTF8LineTo_yhx0yw$(this.local$builder,this.local$limit,this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:if(this.result_0){this.state_0=3;continue}return null;case 3:return this.local$builder.toString();default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.readUTF8Line_za3lpa$=function(t,e,n){var i=new we(this,t,e);return n?i:i.doResume(null)},Ct.prototype.cancel_dbl4no$=function(t){return null==this.closedCause&&!this.closed&&this.close_dbl4no$(null!=t?t:g("Channel cancelled"))},Ct.prototype.close_dbl4no$=function(t){var e=null==t?r:new Ae(t);return!!this._closed_l8h0oz$_0.atomicfu$compareAndSet(null,e)&&(null!=t?(this.readable.release(),this.writable.release(),this.flushBuffer_1r7aq2$_0.release()):this.flush(),this.slot_2l2jew$_0.cancel_dbl4no$(t),!0)},Ct.prototype.transferTo_pxvbjg$=function(t,e){var n,i=this.readable.remaining;return i.compareTo_11rb$(e)<=0?(t.writable.writePacket_3uq2w4$(this.readable),t.afterWrite_za3lpa$(i.toInt()),this.afterRead_za3lpa$(i.toInt()),n=i):n=d,n},xe.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},xe.prototype=Object.create(c.prototype),xe.prototype.constructor=xe,xe.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(1,this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:if(this.state_0=3,this.result_0=this.$this.writeAvailable_j2u0py$(this.local$src,this),this.result_0===u)return u;continue;case 3:return this.result_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.writeAvailableSuspend_2ppiy2$_0=function(t,e,n){var i=new xe(this,t,e);return n?i:i.doResume(null)},ke.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},ke.prototype=Object.create(c.prototype),ke.prototype.constructor=ke,ke.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(1,this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:if(this.state_0=3,this.result_0=this.$this.writeAvailable_mj6st8$(this.local$src,this.local$offset,this.local$length,this),this.result_0===u)return u;continue;case 3:return this.result_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.writeAvailableSuspend_1zn44g$_0=function(t,e,n,i,o){var r=new ke(this,t,e,n,i);return o?r:r.doResume(null)},Ct.prototype.afterWrite_za3lpa$=function(t){this.addBytesWritten_9dtw3h$_0(t),this.closed&&(this.writable.release(),this.ensureNotClosed_ozgwi5$_0()),(this.autoFlush||0===this.availableForWrite)&&this.flush()},Ce.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},Ce.prototype=Object.create(c.prototype),Ce.prototype.constructor=Ce,Ce.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.$this.flush(),this.state_0=2,this.result_0=this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(1,this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:return void this.$this.ensureNotClosed_ozgwi5$_0();default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.awaitFreeSpace=function(t,e){var n=new Ce(this,t);return e?n:n.doResume(null)},Ee.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},Ee.prototype=Object.create(c.prototype),Ee.prototype.constructor=Ee,Ee.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.await_za3lpa$(1,this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.awaitContent=function(t,e){var n=new Ee(this,t);return e?n:n.doResume(null)},Se.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},Se.prototype=Object.create(c.prototype),Se.prototype.constructor=Se,Se.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t,n=v(this.local$closure$min.add(this.local$closure$offset),o).toInt();if(this.state_0=2,this.result_0=this.local$$receiver.await_za3lpa$(n,this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:var i=null!=(t=this.local$$receiver.request_za3lpa$(1))?t:Ki().Empty;if((i.writePosition-i.readPosition|0)>this.local$closure$offset.toNumber()){var r=this.local$closure$bytesCopied,a=e.Long.fromInt(i.writePosition-i.readPosition|0).subtract(this.local$closure$offset),s=this.local$closure$max,l=e.Long.fromInt(this.local$closure$destination.view.byteLength).subtract(this.local$closure$destinationOffset),c=s.compareTo_11rb$(l)<=0?s:l;return r.v=a.compareTo_11rb$(c)<=0?a:c,i.memory.copyTo_q2ka7j$(this.local$closure$destination,this.local$closure$offset,this.local$closure$bytesCopied.v,this.local$closure$destinationOffset),_}this.state_0=3;continue;case 3:return _;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Oe.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},Oe.prototype=Object.create(c.prototype),Oe.prototype.constructor=Oe,Oe.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.local$bytesCopied={v:d},this.state_0=2,this.result_0=this.$this.readSuspendableSession_kiqllg$(Te(this.local$min,this.local$offset,this.local$max,this.local$destination,this.local$destinationOffset,this.local$bytesCopied),this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:return this.local$bytesCopied.v;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ct.prototype.peekTo_afjyek$$default=function(t,e,n,i,o,r,a){var s=new Oe(this,t,e,n,i,o,r);return a?s:s.doResume(null)},Ct.prototype.addBytesRead_w6zh0o$_0=function(t){if(!(t>=0))throw S(("Can't read negative amount of bytes: "+t).toString());if(this.channelSize_gcvxze$_0.atomicfu$getAndAdd(0|-t),this._totalBytesRead_mx8dwu$_0.atomicfu$addAndGet$long(e.Long.fromInt(t)),this._availableForRead_c8qrsp$_0.atomicfu$getAndAdd(0|-t),!(this.channelSize_gcvxze$_0.kotlinx$atomicfu$value>=0)){var n="Readable bytes count is negative: "+this.availableForRead+", "+t+" in "+this;throw C(n.toString())}if(!(this.availableForRead>=0)){var i="Readable bytes count is negative: "+this.availableForRead+", "+t+" in "+this;throw C(i.toString())}},Ct.prototype.addBytesWritten_9dtw3h$_0=function(t){if(!(t>=0))throw S(("Can't write negative amount of bytes: "+t).toString());if(this.channelSize_gcvxze$_0.atomicfu$getAndAdd(t),this._totalBytesWritten_s86f3f$_0.atomicfu$addAndGet$long(e.Long.fromInt(t)),!(this.channelSize_gcvxze$_0.kotlinx$atomicfu$value>=0)){var n="Readable bytes count is negative: "+this.channelSize_gcvxze$_0.kotlinx$atomicfu$value+", "+t+" in "+this;throw C(n.toString())}},Ct.$metadata$={kind:h,simpleName:"ByteChannelSequentialBase",interfaces:[Je,We,qe,kt,zo,Io]},O("ktor-ktor-io-js-legacy.io.ktor.utils.io.discardExact_b56lbm$",N((function(){var n=e.equals,i=t.io.ktor.utils.io.errors.EOFException;return function(t,o,r){if(e.suspendCall(t.discard_s8cxhz$(o,e.coroutineReceiver())),!n(e.coroutineResult(e.coroutineReceiver()),o))throw new i("Unable to discard "+o.toString()+" bytes")}}))),Ne.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},Ne.prototype=Object.create(c.prototype),Ne.prototype.constructor=Ne,Ne.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(void 0===this.local$limit&&(this.local$limit=T),this.state_0=2,this.result_0=So(this.local$$receiver,this.local$dst,this.local$limit,this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:var t=this.result_0;return Pe(this.local$dst),t;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},O("ktor-ktor-io-js-legacy.io.ktor.utils.io.writePacket_4qjh7u$",N((function(){var n=t.io.ktor.utils.io.core.BytePacketBuilder,i=Error;return function(t,o,r){var a,s=new n;try{o(s),a=s.build()}catch(t){throw e.isType(t,i)?(s.release(),t):t}return e.suspendCall(t.writePacket_3uq2w4$(a,e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),Ie.$metadata$={kind:h,simpleName:"ClosedWriteChannelException",interfaces:[I]},O("ktor-ktor-io-js-legacy.io.ktor.utils.io.readShort_e2pdtf$",N((function(){var n=t.io.ktor.utils.io.bits.reverseByteOrder_5vcgdc$,i=t.io.ktor.utils.io.core.ByteOrder,o=e.equals;return function(t,r,a){e.suspendCall(t.readShort(e.coroutineReceiver()));var s=e.coroutineResult(e.coroutineReceiver());return o(r,i.BIG_ENDIAN)?s:n(s)}}))),O("ktor-ktor-io-js-legacy.io.ktor.utils.io.readInt_e2pdtf$",N((function(){var n=t.io.ktor.utils.io.bits.reverseByteOrder_s8ev3n$,i=t.io.ktor.utils.io.core.ByteOrder,o=e.equals;return function(t,r,a){e.suspendCall(t.readInt(e.coroutineReceiver()));var s=e.coroutineResult(e.coroutineReceiver());return o(r,i.BIG_ENDIAN)?s:n(s)}}))),O("ktor-ktor-io-js-legacy.io.ktor.utils.io.readLong_e2pdtf$",N((function(){var n=t.io.ktor.utils.io.bits.reverseByteOrder_mts6qi$,i=t.io.ktor.utils.io.core.ByteOrder,o=e.equals;return function(t,r,a){e.suspendCall(t.readLong(e.coroutineReceiver()));var s=e.coroutineResult(e.coroutineReceiver());return o(r,i.BIG_ENDIAN)?s:n(s)}}))),O("ktor-ktor-io-js-legacy.io.ktor.utils.io.readFloat_e2pdtf$",N((function(){var n=t.io.ktor.utils.io.bits.reverseByteOrder_81szk$,i=t.io.ktor.utils.io.core.ByteOrder,o=e.equals;return function(t,r,a){e.suspendCall(t.readFloat(e.coroutineReceiver()));var s=e.coroutineResult(e.coroutineReceiver());return o(r,i.BIG_ENDIAN)?s:n(s)}}))),O("ktor-ktor-io-js-legacy.io.ktor.utils.io.readDouble_e2pdtf$",N((function(){var n=t.io.ktor.utils.io.bits.reverseByteOrder_yrwdxr$,i=t.io.ktor.utils.io.core.ByteOrder,o=e.equals;return function(t,r,a){e.suspendCall(t.readDouble(e.coroutineReceiver()));var s=e.coroutineResult(e.coroutineReceiver());return o(r,i.BIG_ENDIAN)?s:n(s)}}))),O("ktor-ktor-io-js-legacy.io.ktor.utils.io.readShortLittleEndian_3dmw3p$",N((function(){var n=t.io.ktor.utils.io.bits.reverseByteOrder_5vcgdc$;return function(t,i){return e.suspendCall(t.readShort(e.coroutineReceiver())),n(e.coroutineResult(e.coroutineReceiver()))}}))),O("ktor-ktor-io-js-legacy.io.ktor.utils.io.readIntLittleEndian_3dmw3p$",N((function(){var n=t.io.ktor.utils.io.bits.reverseByteOrder_s8ev3n$;return function(t,i){return e.suspendCall(t.readInt(e.coroutineReceiver())),n(e.coroutineResult(e.coroutineReceiver()))}}))),O("ktor-ktor-io-js-legacy.io.ktor.utils.io.readLongLittleEndian_3dmw3p$",N((function(){var n=t.io.ktor.utils.io.bits.reverseByteOrder_mts6qi$;return function(t,i){return e.suspendCall(t.readLong(e.coroutineReceiver())),n(e.coroutineResult(e.coroutineReceiver()))}}))),O("ktor-ktor-io-js-legacy.io.ktor.utils.io.readFloatLittleEndian_3dmw3p$",N((function(){var n=t.io.ktor.utils.io.bits.reverseByteOrder_81szk$;return function(t,i){return e.suspendCall(t.readFloat(e.coroutineReceiver())),n(e.coroutineResult(e.coroutineReceiver()))}}))),O("ktor-ktor-io-js-legacy.io.ktor.utils.io.readDoubleLittleEndian_3dmw3p$",N((function(){var n=t.io.ktor.utils.io.bits.reverseByteOrder_yrwdxr$;return function(t,i){return e.suspendCall(t.readDouble(e.coroutineReceiver())),n(e.coroutineResult(e.coroutineReceiver()))}}))),Ae.$metadata$={kind:h,simpleName:"CloseElement",interfaces:[]},Re.$metadata$={kind:s,simpleName:"ReaderJob",interfaces:[R]},je.$metadata$={kind:s,simpleName:"WriterJob",interfaces:[R]},Le.$metadata$={kind:s,simpleName:"ReaderScope",interfaces:[j]},ze.$metadata$={kind:s,simpleName:"WriterScope",interfaces:[j]},De.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},De.prototype=Object.create(c.prototype),De.prototype.constructor=De,De.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;this.local$closure$attachJob&&this.local$closure$channel.attachJob_dqr1mp$(p(this.local$$receiver.coroutineContext.get_j3r2sn$(R.Key)));var n=e.isType(t=new Me(this.local$$receiver,this.local$closure$channel),j)?t:m();if(this.exceptionState_0=2,this.state_0=1,this.result_0=this.local$closure$block(n,this),this.result_0===u)return u;continue;case 1:return this.result_0;case 2:this.exceptionState_0=5;var i=this.exception_0;if(e.isType(i,A)){if(!f(this.local$closure$dispatcher,z.Dispatchers.Unconfined)&&null!=this.local$closure$dispatcher)throw i;return this.local$closure$channel.cancel_dbl4no$(i)}throw i;case 3:this.state_0=4;continue;case 4:return;case 5:throw this.exception_0;default:throw this.state_0=5,new Error("State Machine Unreachable execution")}}catch(t){if(5===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Object.defineProperty(Me.prototype,"channel",{get:function(){return this.channel_79cwt9$_0}}),Object.defineProperty(Me.prototype,"coroutineContext",{configurable:!0,get:function(){return this.$delegate_h3p63m$_0.coroutineContext}}),Me.$metadata$={kind:h,simpleName:"ChannelScope",interfaces:[ze,Le,j]},Object.defineProperty(Be.prototype,"channel",{get:function(){return this.channel_zg1n2y$_0}}),Be.prototype.toString=function(){return"ChannelJob["+this.delegate_0+"]"},Object.defineProperty(Be.prototype,"children",{configurable:!0,get:function(){return this.delegate_0.children}}),Object.defineProperty(Be.prototype,"isActive",{configurable:!0,get:function(){return this.delegate_0.isActive}}),Object.defineProperty(Be.prototype,"isCancelled",{configurable:!0,get:function(){return this.delegate_0.isCancelled}}),Object.defineProperty(Be.prototype,"isCompleted",{configurable:!0,get:function(){return this.delegate_0.isCompleted}}),Object.defineProperty(Be.prototype,"key",{configurable:!0,get:function(){return this.delegate_0.key}}),Object.defineProperty(Be.prototype,"onJoin",{configurable:!0,get:function(){return this.delegate_0.onJoin}}),Be.prototype.attachChild_kx8v25$=function(t){return this.delegate_0.attachChild_kx8v25$(t)},Be.prototype.cancel=function(){return this.delegate_0.cancel()},Be.prototype.cancel_dbl4no$$default=function(t){return this.delegate_0.cancel_dbl4no$$default(t)},Be.prototype.cancel_x5z25k$$default=function(t){return this.delegate_0.cancel_x5z25k$$default(t)},Be.prototype.fold_3cc69b$=function(t,e){return this.delegate_0.fold_3cc69b$(t,e)},Be.prototype.get_j3r2sn$=function(t){return this.delegate_0.get_j3r2sn$(t)},Be.prototype.getCancellationException=function(){return this.delegate_0.getCancellationException()},Be.prototype.invokeOnCompletion_ct2b2z$$default=function(t,e,n){return this.delegate_0.invokeOnCompletion_ct2b2z$$default(t,e,n)},Be.prototype.invokeOnCompletion_f05bi3$=function(t){return this.delegate_0.invokeOnCompletion_f05bi3$(t)},Be.prototype.join=function(t){return this.delegate_0.join(t)},Be.prototype.minusKey_yeqjby$=function(t){return this.delegate_0.minusKey_yeqjby$(t)},Be.prototype.plus_1fupul$=function(t){return this.delegate_0.plus_1fupul$(t)},Be.prototype.plus_dqr1mp$=function(t){return this.delegate_0.plus_dqr1mp$(t)},Be.prototype.start=function(){return this.delegate_0.start()},Be.$metadata$={kind:h,simpleName:"ChannelJob",interfaces:[je,Re,R]},O("ktor-ktor-io-js-legacy.io.ktor.utils.io.read_ons6h$",N((function(){var n=t.io.ktor.utils.io.requestBuffer_78elpf$,i=t.io.ktor.utils.io.core.Buffer,o=t.io.ktor.utils.io.completeReadingFromBuffer_6msh3s$,r=Error;return function(t,a,s,l){var u;void 0===a&&(a=1),e.suspendCall(n(t,a,e.coroutineReceiver()));var c=null!=(u=e.coroutineResult(e.coroutineReceiver()))?u:i.Companion.Empty;try{var p=s(c.memory,e.Long.fromInt(c.readPosition),e.Long.fromInt(c.writePosition));return e.suspendCall(o(t,c,p,e.coroutineReceiver())),p}catch(n){throw e.isType(n,r)?(e.suspendCall(o(t,c,0,e.coroutineReceiver())),n):n}}}))),Ue.prototype.request_za3lpa$=function(t,e){return void 0===t&&(t=1),e?e(t):this.request_za3lpa$$default(t)},Ue.$metadata$={kind:s,simpleName:"ReadSession",interfaces:[]},qe.prototype.await_za3lpa$=function(t,e,n){return void 0===t&&(t=1),n?n(t,e):this.await_za3lpa$$default(t,e)},qe.$metadata$={kind:s,simpleName:"SuspendableReadSession",interfaces:[Ue]},He.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},He.prototype=Object.create(c.prototype),He.prototype.constructor=He,He.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;if(t=e.isType(this.local$$receiver,qe)?this.local$$receiver:e.isType(this.local$$receiver,We)?this.local$$receiver.startReadSession():null,this.local$readSession=t,null!=this.local$readSession){var n=this.local$readSession.request_za3lpa$(B(this.local$desiredSize,8));if(null!=n)return n;this.state_0=2;continue}this.state_0=4;continue;case 1:throw this.exception_0;case 2:if(this.state_0=3,this.result_0=(i=this.local$readSession,o=this.local$desiredSize,r=void 0,a=void 0,a=new Ke(i,o,this),r?a:a.doResume(null)),this.result_0===u)return u;continue;case 3:case 5:return this.result_0;case 4:if(this.state_0=5,this.result_0=Ye(this.local$$receiver,this.local$desiredSize,this),this.result_0===u)return u;continue;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}var i,o,r,a},Ge.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},Ge.prototype=Object.create(c.prototype),Ge.prototype.constructor=Ge,Ge.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(!(this.local$bytesRead>=0)){var t="bytesRead shouldn't be negative: "+this.local$bytesRead;throw C(t.toString())}var n;if(null!=(n=e.isType(this.local$$receiver,We)?this.local$$receiver.startReadSession():null))return n.discard_za3lpa$(this.local$bytesRead),void(e.isType(this.local$$receiver,We)&&this.local$$receiver.endReadSession());this.state_0=2;continue;case 1:throw this.exception_0;case 2:if(e.isType(this.local$buffer,zi)&&this.local$buffer!==Ki().Empty){if(this.local$buffer.release_2bs5fo$(Ki().Pool),this.state_0=3,this.result_0=this.local$$receiver.discard_s8cxhz$(e.Long.fromInt(this.local$bytesRead),this),this.result_0===u)return u;continue}this.state_0=4;continue;case 3:this.state_0=4;continue;case 4:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ke.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},Ke.prototype=Object.create(c.prototype),Ke.prototype.constructor=Ke,Ke.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.local$$receiver.await_za3lpa$(this.local$desiredSize,this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:return this.local$$receiver.request_za3lpa$(1);default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Ve.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},Ve.prototype=Object.create(c.prototype),Ve.prototype.constructor=Ve,Ve.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.local$chunk=Ki().Pool.borrow(),this.state_0=2,this.result_0=this.local$$receiver.peekTo_afjyek$(this.local$chunk.memory,e.Long.fromInt(this.local$chunk.writePosition),d,e.Long.fromInt(this.local$desiredSize),e.Long.fromInt(this.local$chunk.limit-this.local$chunk.writePosition|0),this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:var t=this.result_0;return this.local$chunk.commitWritten_za3lpa$(t.toInt()),this.local$chunk;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},We.$metadata$={kind:s,simpleName:"HasReadSession",interfaces:[]},O("ktor-ktor-io-js-legacy.io.ktor.utils.io.write_k0oolq$",N((function(){var n=t.io.ktor.utils.io.requestWriteBuffer_9tm6dw$,i=t.io.ktor.utils.io.core.Buffer,o=t.io.ktor.utils.io.completeWriting_oczduq$;return function(t,r,a,s){var l;void 0===r&&(r=1),e.suspendCall(n(t,r,e.coroutineReceiver()));var u=null!=(l=e.coroutineResult(e.coroutineReceiver()))?l:i.Companion.Empty,c=0;try{return c=a(u.memory,e.Long.fromInt(u.writePosition),e.Long.fromInt(u.limit)),u.commitWritten_za3lpa$(c),c}finally{e.suspendCall(o(t,u,c,e.coroutineReceiver()))}}}))),Xe.$metadata$={kind:s,simpleName:"WriterSession",interfaces:[]},Ze.$metadata$={kind:s,simpleName:"WriterSuspendSession",interfaces:[Xe]},Je.$metadata$={kind:s,simpleName:"HasWriteSession",interfaces:[]},Qe.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},Qe.prototype=Object.create(c.prototype),Qe.prototype.constructor=Qe,Qe.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;if(t=e.isType(this.local$$receiver,Je)?this.local$$receiver.beginWriteSession():null,this.local$session=t,null!=this.local$session){var n=this.local$session.request_za3lpa$(this.local$desiredSpace);if(null!=n)return n;this.state_0=2;continue}this.state_0=4;continue;case 1:throw this.exception_0;case 2:if(this.state_0=3,this.result_0=(o=this.local$session,r=this.local$desiredSpace,a=void 0,s=void 0,s=new en(o,r,this),a?s:s.doResume(null)),this.result_0===u)return u;continue;case 3:return this.result_0;case 4:return i=void 0,(i=Ki().Pool.borrow()).resetForWrite(),i.reserveEndGap_za3lpa$(8),i;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}var i,o,r,a,s},tn.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},tn.prototype=Object.create(c.prototype),tn.prototype.constructor=tn,tn.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(e.isType(this.local$buffer,zi)){if(this.state_0=2,this.result_0=this.local$$receiver.writeFully_b4g5fm$(this.local$buffer,this),this.result_0===u)return u;continue}this.state_0=3;continue;case 1:throw this.exception_0;case 2:return void this.local$buffer.release_2bs5fo$(Ki().Pool);case 3:throw F("Only ChunkBuffer instance is supported.");default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},en.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},en.prototype=Object.create(c.prototype),en.prototype.constructor=en,en.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;if(this.state_0=2,this.result_0=this.local$session.tryAwait_za3lpa$(this.local$desiredSpace,this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:return null!=(t=this.local$session.request_za3lpa$(this.local$desiredSpace))?t:this.local$session.request_za3lpa$(1);default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},nn.$metadata$={kind:s,simpleName:"Allocator",interfaces:[]},an.$metadata$={kind:h,simpleName:"TooLongLineException",interfaces:[wr]},Object.defineProperty(hn.prototype,"readPosition",{configurable:!0,get:function(){return this.readPosition_osecaz$_0},set:function(t){this.readPosition_osecaz$_0=t}}),Object.defineProperty(hn.prototype,"writePosition",{configurable:!0,get:function(){return this.writePosition_oj9ite$_0},set:function(t){this.writePosition_oj9ite$_0=t}}),Object.defineProperty(hn.prototype,"startGap",{configurable:!0,get:function(){return this.startGap_cakrhy$_0},set:function(t){this.startGap_cakrhy$_0=t}}),Object.defineProperty(hn.prototype,"limit",{configurable:!0,get:function(){return this.limit_uf38zz$_0},set:function(t){this.limit_uf38zz$_0=t}}),Object.defineProperty(hn.prototype,"endGap",{configurable:!0,get:O("ktor-ktor-io-js-legacy.io.ktor.utils.io.core.Buffer.get_endGap",(function(){return this.capacity-this.limit|0}))}),Object.defineProperty(hn.prototype,"readRemaining",{configurable:!0,get:O("ktor-ktor-io-js-legacy.io.ktor.utils.io.core.Buffer.get_readRemaining",(function(){return this.writePosition-this.readPosition|0}))}),Object.defineProperty(hn.prototype,"writeRemaining",{configurable:!0,get:O("ktor-ktor-io-js-legacy.io.ktor.utils.io.core.Buffer.get_writeRemaining",(function(){return this.limit-this.writePosition|0}))}),hn.prototype.discardExact_za3lpa$=function(t){if(void 0===t&&(t=this.writePosition-this.readPosition|0),0!==t){var e=this.readPosition+t|0;(t<0||e>this.writePosition)&&$n(t,this.writePosition-this.readPosition|0),this.readPosition=e}},hn.prototype.commitWritten_za3lpa$=function(t){var e=this.writePosition+t|0;(t<0||e>this.limit)&&yn(t,this.limit-this.writePosition|0),this.writePosition=e},hn.prototype.commitWrittenUntilIndex_za3lpa$=function(t){var e=this.limit;if(t=e){if(t===e)return this.writePosition=t,!1;yn(t-this.writePosition|0,this.limit-this.writePosition|0)}return this.writePosition=t,!0},hn.prototype.discardUntilIndex_kcn2v3$=function(t){(t<0||t>this.writePosition)&&$n(t-this.readPosition|0,this.writePosition-this.readPosition|0),this.readPosition!==t&&(this.readPosition=t)},hn.prototype.rewind_za3lpa$=function(t){void 0===t&&(t=this.readPosition-this.startGap|0);var e=this.readPosition-t|0;e=0))throw S(("startGap shouldn't be negative: "+t).toString());if(!(this.readPosition>=t))return this.readPosition===this.writePosition?(t>this.limit&&vn(this,t),this.writePosition=t,this.readPosition=t,void(this.startGap=t)):void bn(this,t);this.startGap=t},hn.prototype.reserveEndGap_za3lpa$=function(t){if(!(t>=0))throw S(("endGap shouldn't be negative: "+t).toString());var e=this.capacity-t|0;if(e>=this.writePosition)this.limit=e;else{if(e<0&&wn(this,t),e=0))throw S(("newReadPosition shouldn't be negative: "+t).toString());if(!(t<=this.readPosition)){var e="newReadPosition shouldn't be ahead of the read position: "+t+" > "+this.readPosition;throw S(e.toString())}this.readPosition=t,this.startGap>t&&(this.startGap=t)},hn.prototype.duplicateTo_b4g5fm$=function(t){t.limit=this.limit,t.startGap=this.startGap,t.readPosition=this.readPosition,t.writePosition=this.writePosition},hn.prototype.duplicate=function(){var t=new hn(this.memory);return t.duplicateTo_b4g5fm$(t),t},hn.prototype.tryPeekByte=function(){var t=this.readPosition;return t===this.writePosition?-1:255&this.memory.view.getInt8(t)},hn.prototype.tryReadByte=function(){var t=this.readPosition;return t===this.writePosition?-1:(this.readPosition=t+1|0,255&this.memory.view.getInt8(t))},hn.prototype.readByte=function(){var t=this.readPosition;if(t===this.writePosition)throw new Yr("No readable bytes available.");return this.readPosition=t+1|0,this.memory.view.getInt8(t)},hn.prototype.writeByte_s8j3t7$=function(t){var e=this.writePosition;if(e===this.limit)throw new En("No free space in the buffer to write a byte");this.memory.view.setInt8(e,t),this.writePosition=e+1|0},hn.prototype.reset=function(){this.releaseGaps_8be2vx$(),this.resetForWrite()},hn.prototype.toString=function(){return"Buffer("+(this.writePosition-this.readPosition|0)+" used, "+(this.limit-this.writePosition|0)+" free, "+(this.startGap+(this.capacity-this.limit|0)|0)+" reserved of "+this.capacity+")"},Object.defineProperty(_n.prototype,"Empty",{configurable:!0,get:function(){return Ki().Empty}}),_n.$metadata$={kind:G,simpleName:"Companion",interfaces:[]};var dn,fn=null;function mn(){return null===fn&&new _n,fn}function $n(t,e){throw new Yr("Unable to discard "+t+" bytes: only "+e+" available for reading")}function yn(t,e){throw new Yr("Unable to discard "+t+" bytes: only "+e+" available for writing")}function gn(t,e){throw S("Unable to rewind "+t+" bytes: only "+e+" could be rewinded")}function vn(t,e){if(e>t.capacity)throw S("Start gap "+e+" is bigger than the capacity "+t.capacity);throw C("Unable to reserve "+e+" start gap: there are already "+(t.capacity-t.limit|0)+" bytes reserved in the end")}function bn(t,e){throw C("Unable to reserve "+e+" start gap: there are already "+(t.writePosition-t.readPosition|0)+" content bytes starting at offset "+t.readPosition)}function wn(t,e){throw S("End gap "+e+" is too big: capacity is "+t.capacity)}function xn(t,e){throw S("End gap "+e+" is too big: there are already "+t.startGap+" bytes reserved in the beginning")}function kn(t,e){throw S("Unable to reserve end gap "+e+": there are already "+(t.writePosition-t.readPosition|0)+" content bytes at offset "+t.readPosition)}function Cn(t,e){t.releaseStartGap_kcn2v3$(t.readPosition-e|0)}function En(t){void 0===t&&(t="Not enough free space"),K(t,this),this.name="InsufficientSpaceException"}function Sn(t,e,n,i){return i=i||Object.create(En.prototype),En.call(i,"Not enough free space to write "+t+" of "+e+" bytes, available "+n+" bytes."),i}function Tn(t,e,n){var i=e.writePosition-e.readPosition|0,o=E.min(i,n);(t.limit-t.writePosition|0)<=o&&function(t,e){if(((t.limit-t.writePosition|0)+(t.capacity-t.limit|0)|0)0&&t.releaseEndGap_8be2vx$()}(t,o),e.memory.copyTo_ubllm2$(t.memory,e.readPosition,o,t.writePosition);var r=o;e.discardExact_za3lpa$(r);var a=r;return t.commitWritten_za3lpa$(a),a}function On(t,e){var n=e.writePosition-e.readPosition|0,i=t.readPosition;if(i=0))throw S("Failed requirement.".toString());if(!(n<=(e.limit-e.writePosition|0)))throw S("Failed requirement.".toString());var i={v:null},o=t.memory,r=t.readPosition;if((t.writePosition-r|0)=0))throw S(("length shouldn't be negative: "+n).toString());if(!(n<=(e.writePosition-e.readPosition|0))){var i="length shouldn't be greater than the source read remaining: "+n+" > "+(e.writePosition-e.readPosition|0);throw S(i.toString())}if(!(n<=(t.limit-t.writePosition|0))){var o="length shouldn't be greater than the destination write remaining space: "+n+" > "+(t.limit-t.writePosition|0);throw S(o.toString())}var r=t.memory,a=t.writePosition,s=t.limit-a|0;if(s0}}),Object.defineProperty(Wn.prototype,"_pool",{configurable:!0,get:function(){return this.pool}}),Wn.prototype.closeDestination=function(){},Wn.prototype.flush_9etqdk$=function(t,e,n){},Wn.prototype.append_s8itvh$=function(t){var n;return e.isType(n=yi.prototype.append_s8itvh$.call(this,t),Wn)?n:m()},Wn.prototype.append_gw00v9$=function(t){var n;return e.isType(n=yi.prototype.append_gw00v9$.call(this,t),Wn)?n:m()},Wn.prototype.append_ezbsdh$=function(t,n,i){var o;return e.isType(o=yi.prototype.append_ezbsdh$.call(this,t,n,i),Wn)?o:m()},Wn.prototype.build=function(){var t=this.size,n=this.stealAll_8be2vx$();return null==n?Qn().Empty:new Xn(n,e.Long.fromInt(t),this.pool)},Wn.prototype.toString=function(){return"BytePacketBuilder("+this.size+" bytes written)"},Wn.$metadata$={kind:h,simpleName:"BytePacketBuilder",interfaces:[yi]},Xn.prototype.copy=function(){return new Xn(Hn(this.head),this.remaining,this.pool)},Xn.prototype.fill=function(){return null},Xn.prototype.fill_9etqdk$=function(t,e,n){return 0},Xn.prototype.closeSource=function(){},Xn.prototype.toString=function(){return"ByteReadPacket("+this.remaining.toString()+" bytes remaining)"},Zn.$metadata$={kind:G,simpleName:"Companion",interfaces:[]};var Jn=null;function Qn(){return null===Jn&&new Zn,Jn}function ti(t,e,n){return n=n||Object.create(Xn.prototype),Xn.call(n,t,Vn(t),e),n}function ei(t,n,i){ri(),void 0===t&&(t=Ki().Empty),void 0===n&&(n=Vn(t)),void 0===i&&(i=Ki().Pool),this.pool=i,this._head_g6i1fh$_vyxu5r$_0=t,this.headMemory=t.memory,this.headPosition=t.readPosition,this.headEndExclusive=t.writePosition,this.tailRemaining_kvq7my$_0=n.subtract(e.Long.fromInt(this.headEndExclusive-this.headPosition|0)),this.noMoreChunksAvailable_qul5an$_0=!1}function ni(t,e){this.closure$destination=t,this.idx_0=e}function ii(){oi=this}Xn.$metadata$={kind:h,simpleName:"ByteReadPacket",interfaces:[ei]},Object.defineProperty(ei.prototype,"endOfInput",{configurable:!0,get:function(){return 0==(this.headEndExclusive-this.headPosition|0)&&f(this.tailRemaining,d)&&(this.noMoreChunksAvailable_qul5an$_0||null==this.doFill_9l192i$_0())}}),Object.defineProperty(ei.prototype,"_head_g6i1fh$_0",{configurable:!0,get:function(){return this._head_g6i1fh$_vyxu5r$_0},set:function(t){this._head_g6i1fh$_vyxu5r$_0=t,this.headMemory=t.memory,this.headPosition=t.readPosition,this.headEndExclusive=t.writePosition}}),Object.defineProperty(ei.prototype,"head",{configurable:!0,get:function(){var t=this._head_g6i1fh$_0;return t.discardUntilIndex_kcn2v3$(this.headPosition),t}}),Object.defineProperty(ei.prototype,"tailRemaining",{configurable:!0,get:function(){return this.tailRemaining_kvq7my$_0},set:function(t){if(!(t.toNumber()>=0)){var e="tailRemaining shouldn't be negative: "+t.toString();throw S(e.toString())}this.tailRemaining_kvq7my$_0=t}}),Object.defineProperty(ei.prototype,"headRemaining",{configurable:!0,get:O("ktor-ktor-io-js-legacy.io.ktor.utils.io.core.Input.get_headRemaining",(function(){return this.headEndExclusive-this.headPosition|0}))}),ei.prototype.prefetch_8e33dg$=function(t){if(t.toNumber()<=0)return!0;var n=this.headEndExclusive-this.headPosition|0;return n>=t.toNumber()||e.Long.fromInt(n).add(this.tailRemaining).compareTo_11rb$(t)>=0||this.doPrefetch_pddalv$_0(t)},ei.prototype.peekTo_afjyek$=function(t,n,i,o,r){var a;void 0===i&&(i=d),void 0===o&&(o=W),void 0===r&&(r=T),this.prefetch_8e33dg$(o.add(i));for(var s=this.head,l=d,u=i,c=n,p=e.Long.fromInt(t.view.byteLength).subtract(n),h=r.compareTo_11rb$(p)<=0?r:p;l.compareTo_11rb$(o)<0&&l.compareTo_11rb$(h)<0;){var _=s,f=_.writePosition-_.readPosition|0;if(f>u.toNumber()){var m=e.Long.fromInt(f).subtract(u),$=h.subtract(l),y=m.compareTo_11rb$($)<=0?m:$;s.memory.copyTo_q2ka7j$(t,e.Long.fromInt(s.readPosition).add(u),y,c),u=d,l=l.add(y),c=c.add(y)}else u=u.subtract(e.Long.fromInt(f));if(null==(a=s.next))break;s=a}return l},ei.prototype.doPrefetch_pddalv$_0=function(t){var n=Kn(this._head_g6i1fh$_0),i=e.Long.fromInt(this.headEndExclusive-this.headPosition|0).add(this.tailRemaining);do{var o=this.fill();if(null==o)return this.noMoreChunksAvailable_qul5an$_0=!0,!1;var r=o.writePosition-o.readPosition|0;n===Ki().Empty?(this._head_g6i1fh$_0=o,n=o):(n.next=o,this.tailRemaining=this.tailRemaining.add(e.Long.fromInt(r))),i=i.add(e.Long.fromInt(r))}while(i.compareTo_11rb$(t)<0);return!0},Object.defineProperty(ei.prototype,"remaining",{configurable:!0,get:function(){return e.Long.fromInt(this.headEndExclusive-this.headPosition|0).add(this.tailRemaining)}}),ei.prototype.canRead=function(){return this.headPosition!==this.headEndExclusive||!f(this.tailRemaining,d)},ei.prototype.hasBytes_za3lpa$=function(t){return e.Long.fromInt(this.headEndExclusive-this.headPosition|0).add(this.tailRemaining).toNumber()>=t},ei.prototype.release=function(){var t=this.head,e=Ki().Empty;t!==e&&(this._head_g6i1fh$_0=e,this.tailRemaining=d,qn(t,this.pool))},ei.prototype.close=function(){this.release(),this.noMoreChunksAvailable_qul5an$_0||(this.noMoreChunksAvailable_qul5an$_0=!0),this.closeSource()},ei.prototype.stealAll_8be2vx$=function(){var t=this.head,e=Ki().Empty;return t===e?null:(this._head_g6i1fh$_0=e,this.tailRemaining=d,t)},ei.prototype.steal_8be2vx$=function(){var t=this.head,n=t.next,i=Ki().Empty;return t===i?null:(null==n?(this._head_g6i1fh$_0=i,this.tailRemaining=d):(this._head_g6i1fh$_0=n,this.tailRemaining=this.tailRemaining.subtract(e.Long.fromInt(n.writePosition-n.readPosition|0))),t.next=null,t)},ei.prototype.append_pvnryh$=function(t){if(t!==Ki().Empty){var n=Vn(t);this._head_g6i1fh$_0===Ki().Empty?(this._head_g6i1fh$_0=t,this.tailRemaining=n.subtract(e.Long.fromInt(this.headEndExclusive-this.headPosition|0))):(Kn(this._head_g6i1fh$_0).next=t,this.tailRemaining=this.tailRemaining.add(n))}},ei.prototype.tryWriteAppend_pvnryh$=function(t){var n=Kn(this.head),i=t.writePosition-t.readPosition|0,o=0===i;return o||(o=(n.limit-n.writePosition|0)=0))throw S(("Negative discard is not allowed: "+t).toString());return this.discardAsMuchAsPossible_ulotxs$_0(t,0)},ei.prototype.discardExact_za3lpa$=function(t){if(this.discard_za3lpa$(t)!==t)throw new Yr("Unable to discard "+t+" bytes due to end of packet")},ei.prototype.tryPeek=function(){var t,e,n=this.head;return(this.headEndExclusive-this.headPosition|0)>0?n.tryPeekByte():f(this.tailRemaining,d)&&this.noMoreChunksAvailable_qul5an$_0?-1:null!=(e=null!=(t=this.prepareReadLoop_yg4yvd$_0(1,n))?t.tryPeekByte():null)?e:-1},ei.prototype.peekTo_j2u0py$=function(t){var n,i;if(null==(n=this.prepareReadHead_kcn2v3$(1)))return-1;var o=n,r=t.limit-t.writePosition|0,a=o.writePosition-o.readPosition|0,s=E.min(r,a);return Un(e.isType(i=t,hn)?i:m(),o,s),s},ei.prototype.discard_s8cxhz$=function(t){return t.toNumber()<=0?d:this.discardAsMuchAsPossible_3oo2wm$_0(t,d)},ni.prototype.append_s8itvh$=function(t){var e;return this.closure$destination[(e=this.idx_0,this.idx_0=e+1|0,e)]=t,this},ni.prototype.append_gw00v9$=function(t){var e,n;if("string"==typeof t)Gr(t,this.closure$destination,this.idx_0),this.idx_0=this.idx_0+t.length|0;else if(null!=t){e=t.length;for(var i=0;i=0){var o=Pi(this,this.remaining.toInt());return t.append_gw00v9$(o),o.length}return this.readASCII_lsba8n$_0(t,n,i)},ei.prototype.readTextExact_a5kscm$=function(t,e){this.readText_5dvtqg$(t,e,e)},ei.prototype.readText_vux9f0$=function(t,n){if(void 0===t&&(t=0),void 0===n&&(n=2147483647),0===t&&(0===n||this.endOfInput))return"";var i=this.remaining;if(i.toNumber()>0&&e.Long.fromInt(n).compareTo_11rb$(i)>=0)return Pi(this,i.toInt());var o=H(B(J(t,16),n));return this.readASCII_lsba8n$_0(o,t,n),o.toString()},ei.prototype.readTextExact_za3lpa$=function(t){return this.readText_vux9f0$(t,t)},ei.prototype.readASCII_lsba8n$_0=function(t,e,n){if(0===n&&0===e)return 0;if(this.endOfInput){if(0===e)return 0;this.atLeastMinCharactersRequire_wmluvz$_0(e)}else n=l)try{var h,_=s;n:do{for(var d={v:0},f={v:0},m={v:0},$=_.memory,y=_.readPosition,g=_.writePosition,v=y;v>=1,d.v=d.v+1|0;if(m.v=d.v,d.v=d.v-1|0,m.v>(g-v|0)){_.discardExact_za3lpa$(v-y|0),h=m.v;break n}}else if(f.v=f.v<<6|127&b,d.v=d.v-1|0,0===d.v){if(io(f.v)){var E,S=et(tt(f.v));if(i.v===n?E=!1:(t.append_s8itvh$(Q(S)),i.v=i.v+1|0,E=!0),!E){_.discardExact_za3lpa$(v-y-m.v+1|0),h=-1;break n}}else if(oo(f.v)){var T,O=et(tt(ao(f.v)));i.v===n?T=!1:(t.append_s8itvh$(Q(O)),i.v=i.v+1|0,T=!0);var N=!T;if(!N){var P,I=et(tt(ro(f.v)));i.v===n?P=!1:(t.append_s8itvh$(Q(I)),i.v=i.v+1|0,P=!0),N=!P}if(N){_.discardExact_za3lpa$(v-y-m.v+1|0),h=-1;break n}}else no(f.v);f.v=0}}var A=g-y|0;_.discardExact_za3lpa$(A),h=0}while(0);l=0===h?1:h>0?h:0}finally{var R=s;u=R.writePosition-R.readPosition|0}else u=p;if(a=!1,0===u)r=ho(this,s);else{var j=u0)}finally{a&&po(this,s)}}while(0);return i.va?(t.releaseEndGap_8be2vx$(),this.headEndExclusive=t.writePosition,this.tailRemaining=this.tailRemaining.add(e.Long.fromInt(a))):(this._head_g6i1fh$_0=i,this.tailRemaining=this.tailRemaining.subtract(e.Long.fromInt((i.writePosition-i.readPosition|0)-a|0)),t.cleanNext(),t.release_2bs5fo$(this.pool))},ei.prototype.fixGapAfterReadFallback_dfsyd9$_0=function(t){if(this.noMoreChunksAvailable_qul5an$_0&&null==t.next)return this.headPosition=t.readPosition,this.headEndExclusive=t.writePosition,void(this.tailRemaining=d);var e=t.writePosition-t.readPosition|0,n=8-(t.capacity-t.limit|0)|0,i=E.min(e,n);if(e>i)this.fixGapAfterReadFallbackUnreserved_cwr1c2$_0(t,e,i);else{var o=this.pool.borrow();o.reserveEndGap_za3lpa$(8),o.next=t.cleanNext(),Tn(o,t,e),this._head_g6i1fh$_0=o}t.release_2bs5fo$(this.pool)},ei.prototype.fixGapAfterReadFallbackUnreserved_cwr1c2$_0=function(t,e,n){var i=this.pool.borrow(),o=this.pool.borrow();i.reserveEndGap_za3lpa$(8),o.reserveEndGap_za3lpa$(8),i.next=o,o.next=t.cleanNext(),Tn(i,t,e-n|0),Tn(o,t,n),this._head_g6i1fh$_0=i,this.tailRemaining=Vn(o)},ei.prototype.ensureNext_1iqd97$_0=function(t,n){var i;if(t===n)return this.doFill_9l192i$_0();var o=t.cleanNext();return t.release_2bs5fo$(this.pool),null==o?(this._head_g6i1fh$_0=n,this.tailRemaining=d,i=this.ensureNext_1iqd97$_0(n,n)):o.writePosition>o.readPosition?(this._head_g6i1fh$_0=o,this.tailRemaining=this.tailRemaining.subtract(e.Long.fromInt(o.writePosition-o.readPosition|0)),i=o):i=this.ensureNext_1iqd97$_0(o,n),i},ei.prototype.fill=function(){var t=this.pool.borrow();try{t.reserveEndGap_za3lpa$(8);var n=this.fill_9etqdk$(t.memory,t.writePosition,t.limit-t.writePosition|0);return 0!==n||(this.noMoreChunksAvailable_qul5an$_0=!0,t.writePosition>t.readPosition)?(t.commitWritten_za3lpa$(n),t):(t.release_2bs5fo$(this.pool),null)}catch(n){throw e.isType(n,A)?(t.release_2bs5fo$(this.pool),n):n}},ei.prototype.markNoMoreChunksAvailable=function(){this.noMoreChunksAvailable_qul5an$_0||(this.noMoreChunksAvailable_qul5an$_0=!0)},ei.prototype.doFill_9l192i$_0=function(){if(this.noMoreChunksAvailable_qul5an$_0)return null;var t=this.fill();return null==t?(this.noMoreChunksAvailable_qul5an$_0=!0,null):(this.appendView_eeywmr$_0(t),t)},ei.prototype.appendView_eeywmr$_0=function(t){var e,n,i=Kn(this._head_g6i1fh$_0);if(i===Ki().Empty){if(this._head_g6i1fh$_0=t,!f(this.tailRemaining,d))throw C("It should be no tail remaining bytes if current tail is EmptyBuffer");this.tailRemaining=null!=(n=null!=(e=t.next)?Vn(e):null)?n:d}else i.next=t,this.tailRemaining=this.tailRemaining.add(Vn(t))},ei.prototype.prepareRead_za3lpa$=function(t){var e=this.head;return(this.headEndExclusive-this.headPosition|0)>=t?e:this.prepareReadLoop_yg4yvd$_0(t,e)},ei.prototype.prepareRead_cvuqs$=function(t,e){return(this.headEndExclusive-this.headPosition|0)>=t?e:this.prepareReadLoop_yg4yvd$_0(t,e)},ei.prototype.prepareReadLoop_yg4yvd$_0=function(t,n){var i,o,r=this.headEndExclusive-this.headPosition|0;if(r>=t)return n;if(null==(o=null!=(i=n.next)?i:this.doFill_9l192i$_0()))return null;var a=o;if(0===r)return n!==Ki().Empty&&this.releaseHead_pvnryh$(n),this.prepareReadLoop_yg4yvd$_0(t,a);var s=Tn(n,a,t-r|0);return this.headEndExclusive=n.writePosition,this.tailRemaining=this.tailRemaining.subtract(e.Long.fromInt(s)),a.writePosition>a.readPosition?a.reserveStartGap_za3lpa$(s):(n.next=null,n.next=a.cleanNext(),a.release_2bs5fo$(this.pool)),(n.writePosition-n.readPosition|0)>=t?n:(t>8&&this.minSizeIsTooBig_w2md11$_0(t),this.prepareReadLoop_yg4yvd$_0(t,n))},ei.prototype.minSizeIsTooBig_w2md11$_0=function(t){throw C("minSize of "+t+" is too big (should be less than 8)")},ei.prototype.afterRead_ssg6l8$_0=function(t){0==(t.writePosition-t.readPosition|0)&&this.releaseHead_pvnryh$(t)},ei.prototype.releaseHead_pvnryh$=function(t){var n,i=null!=(n=t.cleanNext())?n:Ki().Empty;return this._head_g6i1fh$_0=i,this.tailRemaining=this.tailRemaining.subtract(e.Long.fromInt(i.writePosition-i.readPosition|0)),t.release_2bs5fo$(this.pool),i},ii.$metadata$={kind:G,simpleName:"Companion",interfaces:[]};var oi=null;function ri(){return null===oi&&new ii,oi}function ai(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=e.length-n|0);var o={v:i},r={v:n};t:do{var a,s,l=!0;if(null==(a=co(t,1)))break t;var u=a;try{for(;;){var c=u,p=o.v,h=c.writePosition-c.readPosition|0,_=E.min(p,h);if(Mn(c,e,r.v,_),o.v=o.v-_|0,r.v=r.v+_|0,!(o.v>0))break;if(l=!1,null==(s=ho(t,u)))break;u=s,l=!0}}finally{l&&po(t,u)}}while(0);var d=o.v;d>0&&ji(d)}function si(t,e,n){void 0===n&&(n=e.limit-e.writePosition|0);var i={v:n},o={v:0};t:do{var r,a,s=!0;if(null==(r=co(t,1)))break t;var l=r;try{for(;;){var u=l,c=i.v,p=u.writePosition-u.readPosition|0,h=E.min(c,p);if(Fn(u,e,h),i.v=i.v-h|0,o.v=o.v+h|0,!(i.v>0))break;if(s=!1,null==(a=ho(t,l)))break;l=a,s=!0}}finally{s&&po(t,l)}}while(0);var _=i.v;_>0&&ji(_)}function li(t){var e;t:do{if((t.headEndExclusive-t.headPosition|0)>2){var n=t.headPosition;t.headPosition=n+2|0,e=t.headMemory.view.getInt16(n,!1);break t}e=ui(t)}while(0);return e}function ui(t){var e,n=null!=(e=co(t,2))?e:ji(2),i=Pn(n);return po(t,n),i}function ci(t){var e;t:do{if((t.headEndExclusive-t.headPosition|0)>4){var n=t.headPosition;t.headPosition=n+4|0,e=t.headMemory.view.getInt32(n,!1);break t}e=pi(t)}while(0);return e}function pi(t){var e,n=null!=(e=co(t,4))?e:ji(4),i=In(n);return po(t,n),i}function hi(t){var n;t:do{if((t.headEndExclusive-t.headPosition|0)>8){var i=t.headPosition;t.headPosition=i+8|0;var o=t.headMemory;n=e.Long.fromInt(o.view.getUint32(i,!1)).shiftLeft(32).or(e.Long.fromInt(o.view.getUint32(i+4|0,!1)));break t}n=_i(t)}while(0);return n}function _i(t){var e,n=null!=(e=co(t,8))?e:ji(8),i=An(n);return po(t,n),i}function di(t){var e;t:do{if((t.headEndExclusive-t.headPosition|0)>4){var n=t.headPosition;t.headPosition=n+4|0,e=t.headMemory.view.getFloat32(n,!1);break t}e=fi(t)}while(0);return e}function fi(t){var e,n=null!=(e=co(t,4))?e:ji(4),i=Rn(n);return po(t,n),i}function mi(t){var e;t:do{if((t.headEndExclusive-t.headPosition|0)>8){var n=t.headPosition;t.headPosition=n+8|0,e=t.headMemory.view.getFloat64(n,!1);break t}e=$i(t)}while(0);return e}function $i(t){var e,n=null!=(e=co(t,8))?e:ji(8),i=jn(n);return po(t,n),i}function yi(t){this.pool=t,this._head_fdtp0q$_0=null,this._tail_fkcube$_0=null,this.tailMemory_8be2vx$=Vo().Empty,this.tailPosition_8be2vx$=0,this.tailEndExclusive_8be2vx$=0,this.tailInitialPosition_9teb5g$_0=0,this.chainedSize_k37a08$_0=0}function gi(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=e.length-n|0);var o={v:n},r={v:i},a=_o(t,1,null);try{for(;;){var s=a,l=r.v,u=s.limit-s.writePosition|0,c=E.min(l,u);if(Bn(s,e,o.v,c),o.v=o.v+c|0,r.v=r.v-c|0,!(r.v>0))break;a=_o(t,1,a)}}finally{t.afterHeadWrite()}}function vi(t,e,n){void 0===n&&(n=e.writePosition-e.readPosition|0);var i={v:0},o={v:n},r=_o(t,1,null);try{for(;;){var a=r,s=o.v,l=a.limit-a.writePosition|0,u=E.min(s,l);if(Un(a,e,u),i.v=i.v+u|0,o.v=o.v-u|0,!(o.v>0))break;r=_o(t,1,r)}}finally{t.afterHeadWrite()}}function bi(t,n,i,o){wi(t,n,e.Long.fromInt(i),e.Long.fromInt(o))}function wi(t,n,i,o){var r={v:i},a={v:o},s=_o(t,1,null);try{for(;;){var l=s,u=a.v,c=e.Long.fromInt(l.limit-l.writePosition|0),p=u.compareTo_11rb$(c)<=0?u:c;if(n.copyTo_q2ka7j$(l.memory,r.v,p,e.Long.fromInt(l.writePosition)),l.commitWritten_za3lpa$(p.toInt()),r.v=r.v.add(p),a.v=a.v.subtract(p),!(a.v.toNumber()>0))break;s=_o(t,1,s)}}finally{t.afterHeadWrite()}}function xi(t,e){var n;t:do{var i=t.tailPosition_8be2vx$;if((t.tailEndExclusive_8be2vx$-i|0)>2){t.tailPosition_8be2vx$=i+2|0,t.tailMemory_8be2vx$.view.setInt16(i,e,!1),n=!0;break t}n=!1}while(0);n||function(t,e){Ln(t.prepareWriteHead_za3lpa$(2),e),t.afterHeadWrite()}(t,e)}function ki(t,e){var n;t:do{var i=t.tailPosition_8be2vx$;if((t.tailEndExclusive_8be2vx$-i|0)>4){t.tailPosition_8be2vx$=i+4|0,t.tailMemory_8be2vx$.view.setInt32(i,e,!1),n=!0;break t}n=!1}while(0);n||Ci(t,e)}function Ci(t,e){zn(t.prepareWriteHead_za3lpa$(4),e),t.afterHeadWrite()}function Ei(t,e){var n;t:do{var i=t.tailPosition_8be2vx$;if((t.tailEndExclusive_8be2vx$-i|0)>8){t.tailPosition_8be2vx$=i+8|0;var o=t.tailMemory_8be2vx$;o.view.setInt32(i,e.shiftRight(32).toInt(),!1),o.view.setInt32(i+4|0,e.and(Y).toInt(),!1),n=!0;break t}n=!1}while(0);n||Si(t,e)}function Si(t,e){Dn(t.prepareWriteHead_za3lpa$(8),e),t.afterHeadWrite()}function Ti(t,e){var n;t:do{var i=t.tailPosition_8be2vx$;if((t.tailEndExclusive_8be2vx$-i|0)>4){t.tailPosition_8be2vx$=i+4|0,t.tailMemory_8be2vx$.view.setFloat32(i,e,!1),n=!0;break t}n=!1}while(0);n||Ci(t,it(e))}function Oi(t,e){var n;t:do{var i=t.tailPosition_8be2vx$;if((t.tailEndExclusive_8be2vx$-i|0)>8){t.tailPosition_8be2vx$=i+8|0,t.tailMemory_8be2vx$.view.setFloat64(i,e,!1),n=!0;break t}n=!1}while(0);n||Si(t,ot(e))}function Ni(t,e){if(void 0===e){var n=t.remaining;if(n.compareTo_11rb$(rt)>0)throw S("Unable to convert to a ByteArray: packet is too big");e=n.toInt()}if(0!==e){var i=new Int8Array(e);return ai(t,i,0,e),i}return qi}function Pi(t,e,n){return void 0===n&&(n=vr().UTF_8),dr(n.newDecoder(),t,e)}function Ii(t,e,n,i,o){if(void 0===n&&(n=0),void 0===i&&(i=e.length),void 0===o&&(o=vr().UTF_8),o===vr().UTF_8)return Ri(t,e,n,i);pn(o.newEncoder(),t,e,n,i)}function Ai(t,e,n,i,o){if(void 0===n&&(n=0),void 0===i&&(i=e.length),void 0===o&&(o=vr().UTF_8),o===vr().UTF_8)return Ri(t,new Li(e,0,e.length),n,i);on(o.newEncoder(),e,n,i,t)}function Ri(t,e,n,i){var o={v:n},r=_o(t,1,null);try{for(var a;;){var s=r,l=s.memory,u=s.writePosition,c=s.limit,p=to(l,e,o.v,i,u,c),h=p.component1(),_=p.component2();if(o.v=o.v+(65535&h.data)|0,s.commitWritten_za3lpa$(65535&_.data),(a=0==(65535&h.data)&&o.v=2147483647&&Xi(i,"total size increase");var o=i.toInt();this.appendChainImpl_wtmh6s$_0(t,n,o)},yi.prototype.appendNewChunk_bwe9h8$_0=function(){var t=this.pool.borrow();return t.reserveEndGap_za3lpa$(8),this.appendSingleChunk_pvnryh$(t),t},yi.prototype.appendChainImpl_wtmh6s$_0=function(t,e,n){var i=this._tail_fkcube$_0;if(null==i)this._head_fdtp0q$_0=t,this.chainedSize_k37a08$_0=0;else{i.next=t;var o=this.tailPosition_8be2vx$;i.commitWrittenUntilIndex_za3lpa$(o),this.chainedSize_k37a08$_0=this.chainedSize_k37a08$_0+(o-this.tailInitialPosition_9teb5g$_0)|0}this._tail_fkcube$_0=e,this.chainedSize_k37a08$_0=this.chainedSize_k37a08$_0+n|0,this.tailMemory_8be2vx$=e.memory,this.tailPosition_8be2vx$=e.writePosition,this.tailInitialPosition_9teb5g$_0=e.readPosition,this.tailEndExclusive_8be2vx$=e.limit},yi.prototype.writeByte_s8j3t7$=function(t){var e=this.tailPosition_8be2vx$;return e=3){var n,i=this.tailMemory_8be2vx$,o=0|t;o>=0&&o<=127?(i.view.setInt8(e,$(o)),n=1):o>=128&&o<=2047?(i.view.setInt8(e,$(192|o>>6&31)),i.view.setInt8(e+1|0,$(128|63&o)),n=2):o>=2048&&o<=65535?(i.view.setInt8(e,$(224|o>>12&15)),i.view.setInt8(e+1|0,$(128|o>>6&63)),i.view.setInt8(e+2|0,$(128|63&o)),n=3):o>=65536&&o<=1114111?(i.view.setInt8(e,$(240|o>>18&7)),i.view.setInt8(e+1|0,$(128|o>>12&63)),i.view.setInt8(e+2|0,$(128|o>>6&63)),i.view.setInt8(e+3|0,$(128|63&o)),n=4):n=no(o);var r=n;return this.tailPosition_8be2vx$=e+r|0,this}return this.appendCharFallback_wm9vyu$_0(t),this},yi.prototype.appendCharFallback_wm9vyu$_0=function(t){var e=this.prepareWriteHead_za3lpa$(3);try{var n,i=e.memory,o=e.writePosition,r=0|t;r>=0&&r<=127?(i.view.setInt8(o,$(r)),n=1):r>=128&&r<=2047?(i.view.setInt8(o,$(192|r>>6&31)),i.view.setInt8(o+1|0,$(128|63&r)),n=2):r>=2048&&r<=65535?(i.view.setInt8(o,$(224|r>>12&15)),i.view.setInt8(o+1|0,$(128|r>>6&63)),i.view.setInt8(o+2|0,$(128|63&r)),n=3):r>=65536&&r<=1114111?(i.view.setInt8(o,$(240|r>>18&7)),i.view.setInt8(o+1|0,$(128|r>>12&63)),i.view.setInt8(o+2|0,$(128|r>>6&63)),i.view.setInt8(o+3|0,$(128|63&r)),n=4):n=no(r);var a=n;if(e.commitWritten_za3lpa$(a),!(a>=0))throw C("The returned value shouldn't be negative".toString())}finally{this.afterHeadWrite()}},yi.prototype.append_gw00v9$=function(t){return null==t?this.append_ezbsdh$("null",0,4):this.append_ezbsdh$(t,0,t.length),this},yi.prototype.append_ezbsdh$=function(t,e,n){return null==t?this.append_ezbsdh$("null",e,n):(Ii(this,t,e,n,vr().UTF_8),this)},yi.prototype.writePacket_3uq2w4$=function(t){var e=t.stealAll_8be2vx$();if(null!=e){var n=this._tail_fkcube$_0;null!=n?this.writePacketMerging_3vyrdt$_0(n,e,t.pool):this.appendChain_pvnryh$(e)}else t.release()},yi.prototype.writeChunkBuffer_pvnryh$=function(t){var e=this._tail_fkcube$_0;null!=e?this.writePacketMerging_3vyrdt$_0(e,t,this.pool):this.appendChain_pvnryh$(t)},yi.prototype.writePacketMerging_3vyrdt$_0=function(t,e,n){var i;t.commitWrittenUntilIndex_za3lpa$(this.tailPosition_8be2vx$);var o=t.writePosition-t.readPosition|0,r=e.writePosition-e.readPosition|0,a=jr,s=r0;){var o=t.headEndExclusive-t.headPosition|0;if(!(o<=i.v)){var r,a=null!=(r=t.prepareRead_za3lpa$(1))?r:ji(1),s=a.readPosition;try{vi(this,a,i.v)}finally{var l=a.readPosition;if(l0;){var r=e.Long.fromInt(t.headEndExclusive-t.headPosition|0);if(!(r.compareTo_11rb$(o.v)<=0)){var a,s=null!=(a=t.prepareRead_za3lpa$(1))?a:ji(1),l=s.readPosition;try{vi(this,s,o.v.toInt())}finally{var u=s.readPosition;if(u=t&&null!=(e=this._tail_fkcube$_0)?(e.commitWrittenUntilIndex_za3lpa$(this.tailPosition_8be2vx$),e):this.appendNewChunk_bwe9h8$_0()},yi.prototype.afterHeadWrite=function(){var t;null!=(t=this._tail_fkcube$_0)&&(this.tailPosition_8be2vx$=t.writePosition)},yi.prototype.write_rtdvbs$=O("ktor-ktor-io-js-legacy.io.ktor.utils.io.core.Output.write_rtdvbs$",N((function(){var t=e.kotlin.IllegalStateException_init_pdl1vj$;return function(e,n){var i=this.prepareWriteHead_za3lpa$(e);try{var o=n(i);if(!(o>=0))throw t("The returned value shouldn't be negative".toString());return o}finally{this.afterHeadWrite()}}}))),yi.prototype.last_j2u0py$=function(t){this.appendSingleChunk_pvnryh$(t)},yi.prototype.afterBytesStolen_8be2vx$=function(){var t=this.head_8be2vx$;if(t!==Ki().Empty){if(null!=t.next)throw C("Check failed.".toString());t.resetForWrite(),t.reserveEndGap_za3lpa$(8),this.tailPosition_8be2vx$=t.writePosition,this.tailInitialPosition_9teb5g$_0=this.tailPosition_8be2vx$,this.tailEndExclusive_8be2vx$=t.limit}},yi.$metadata$={kind:h,simpleName:"Output",interfaces:[Fr,Z]},Object.defineProperty(Li.prototype,"length",{get:function(){return this.length_xy9hzd$_0}}),Li.prototype.charCodeAt=function(t){return t>=this.length&&this.indexOutOfBounds_0(t),this.array_0[t+this.offset_0|0]},Li.prototype.subSequence_vux9f0$=function(t,e){if(!(t>=0))throw S(("startIndex shouldn't be negative: "+t).toString());if(!(t<=this.length)){var n="startIndex is too large: "+t+" > "+this.length;throw S(n.toString())}if(!((t+e|0)<=this.length)){var i="endIndex is too large: "+e+" > "+this.length;throw S(i.toString())}if(!(e>=t))throw S(("endIndex should be greater or equal to startIndex: "+t+" > "+e).toString());return new Li(this.array_0,this.offset_0+t|0,e-t|0)},Li.prototype.indexOutOfBounds_0=function(t){throw new at("String index out of bounds: "+t+" > "+this.length)},Li.$metadata$={kind:h,simpleName:"CharArraySequence",interfaces:[st]},Object.defineProperty(zi.prototype,"origin",{configurable:!0,get:function(){return this.origin_dlah8g$_0},set:function(t){this.origin_dlah8g$_0=t}}),Object.defineProperty(zi.prototype,"next",{configurable:!0,get:function(){return this.nextRef_43oo9e$_0.kotlinx$atomicfu$value},set:function(t){null==t?this.cleanNext():this.appendNext_v1qrlf$_0(t)}}),Object.defineProperty(zi.prototype,"referenceCount",{configurable:!0,get:function(){return this.refCount_yk3bl6$_0.kotlinx$atomicfu$value}}),zi.prototype.appendNext_v1qrlf$_0=function(t){if(!this.nextRef_43oo9e$_0.atomicfu$compareAndSet(null,t))throw C("This chunk has already a next chunk.")},zi.prototype.cleanNext=function(){return this.nextRef_43oo9e$_0.atomicfu$getAndSet(null)},zi.prototype.duplicate=function(){var t,e=null!=(t=this.origin)?t:this;e.acquire_8be2vx$();var n=new zi(this.memory,e,this.parentPool_8be2vx$);return this.duplicateTo_b4g5fm$(n),n},zi.prototype.release_2bs5fo$=function(t){var e;if(this.release_8be2vx$()){var n=this.origin;null!=n?(this.unlink_8be2vx$(),n.release_2bs5fo$(t)):(null!=(e=this.parentPool_8be2vx$)?e:t).recycle_trkh7z$(this)}},zi.prototype.unlink_8be2vx$=function(){if(!this.refCount_yk3bl6$_0.atomicfu$compareAndSet(0,-1))throw C("Unable to unlink: buffer is in use.");this.cleanNext(),this.origin=null},zi.prototype.acquire_8be2vx$=function(){var t=this.refCount_yk3bl6$_0;t:do{for(;;){var e=t.kotlinx$atomicfu$value;if(e<=0)throw C("Unable to acquire chunk: it is already released.");var n=e+1|0;if(t.atomicfu$compareAndSet(e,n))break t}}while(0)},zi.prototype.unpark_8be2vx$=function(){var t=this.refCount_yk3bl6$_0;t:do{for(;;){var e=t.kotlinx$atomicfu$value;if(e<0)throw C("This instance is already disposed and couldn't be borrowed.");if(e>0)throw C("This instance is already in use but somehow appeared in the pool.");if(t.atomicfu$compareAndSet(e,1))break t}}while(0)},zi.prototype.release_8be2vx$=function(){var t,e=this.refCount_yk3bl6$_0;t:do{for(;;){var n=e.kotlinx$atomicfu$value;if(n<=0)throw C("Unable to release: it is already released.");var i=n-1|0;if(e.atomicfu$compareAndSet(n,i)){t=i;break t}}}while(0);return 0===t},zi.prototype.reset=function(){if(null!=this.origin)throw S("Unable to reset buffer with origin".toString());hn.prototype.reset.call(this),this.nextRef_43oo9e$_0.kotlinx$atomicfu$value=null},Object.defineProperty(Mi.prototype,"capacity",{configurable:!0,get:function(){return dn.capacity}}),Mi.prototype.borrow=function(){return dn.borrow()},Mi.prototype.recycle_trkh7z$=function(t){dn.recycle_trkh7z$(t)},Mi.prototype.dispose=function(){dn.dispose()},Mi.$metadata$={kind:h,interfaces:[wo]},Object.defineProperty(Bi.prototype,"capacity",{configurable:!0,get:function(){return 1}}),Bi.prototype.borrow=function(){return Ki().Empty},Bi.prototype.recycle_trkh7z$=function(t){if(t!==Ki().Empty)throw S("Only ChunkBuffer.Empty instance could be recycled.".toString())},Bi.prototype.dispose=function(){},Bi.$metadata$={kind:h,interfaces:[wo]},Fi.prototype.borrow=function(){return new zi(qo().alloc_za3lpa$(4096),null,this)},Fi.prototype.recycle_trkh7z$=function(t){qo().free_vn6nzs$(t.memory)},Fi.$metadata$={kind:h,interfaces:[xo]},Ui.prototype.borrow=function(){throw F("This pool doesn't support borrow")},Ui.prototype.recycle_trkh7z$=function(t){},Ui.$metadata$={kind:h,interfaces:[xo]},Di.$metadata$={kind:G,simpleName:"Companion",interfaces:[]};var qi,Hi,Gi=null;function Ki(){return null===Gi&&new Di,Gi}function Vi(t){return 1===t.referenceCount}function Yi(t){this.value=t}function Wi(t,e,n){return n=n||Object.create(Yi.prototype),Yi.call(n,(65535&t.data)<<16|65535&e.data),n}function Xi(t,e){throw S("Long value "+t.toString()+" of "+e+" doesn't fit into 32-bit integer")}function Zi(t,e,n,i,o){c.call(this,o),this.exceptionState_0=1,this.local$tmp$=void 0,this.local$decoded=void 0,this.local$size=void 0,this.local$cr=void 0,this.local$end=void 0,this.local$out=t,this.local$limit=e,this.local$nextChunk=n,this.local$afterRead=i}function Ji(t,e,n,i,o,r){var a=new Zi(t,e,n,i,o);return r?a:a.doResume(null)}function Qi(t){throw new Yr("Premature end of stream: expected "+t+" bytes to decode UTF-8 char")}function to(t,e,n,i,o,r){for(var a,s,l=n+(65535&U.Companion.MAX_VALUE.data)|0,u=E.min(i,l),c=B(r,65535&U.Companion.MAX_VALUE.data),p=o,h=n;;){if(p>=c||h>=u)return Wi(new U(P(h-n|0)),new U(P(p-o|0)));var _=65535&(0|e.charCodeAt((h=(a=h)+1|0,a)));if(0!=(65408&_))break;t.view.setInt8((p=(s=p)+1|0,s),$(_))}return function(t,e,n,i,o,r,a,s){for(var l,u,c=n,p=r,h=a-3|0;!((h-p|0)<=0||c>=i);){var _,d=e.charCodeAt((c=(l=c)+1|0,l)),f=ut(d)?c!==i&<(e.charCodeAt(c))?so(d,e.charCodeAt((c=(u=c)+1|0,u))):63:0|d,m=p;f>=0&&f<=127?(t.view.setInt8(m,$(f)),_=1):f>=128&&f<=2047?(t.view.setInt8(m,$(192|f>>6&31)),t.view.setInt8(m+1|0,$(128|63&f)),_=2):f>=2048&&f<=65535?(t.view.setInt8(m,$(224|f>>12&15)),t.view.setInt8(m+1|0,$(128|f>>6&63)),t.view.setInt8(m+2|0,$(128|63&f)),_=3):f>=65536&&f<=1114111?(t.view.setInt8(m,$(240|f>>18&7)),t.view.setInt8(m+1|0,$(128|f>>12&63)),t.view.setInt8(m+2|0,$(128|f>>6&63)),t.view.setInt8(m+3|0,$(128|63&f)),_=4):_=no(f),p=p+_|0}return p===h?function(t,e,n,i,o,r,a,s){for(var l,u,c=n,p=r;;){var h=a-p|0;if(h<=0||c>=i)break;var _=e.charCodeAt((c=(l=c)+1|0,l)),d=ut(_)?c!==i&<(e.charCodeAt(c))?so(_,e.charCodeAt((c=(u=c)+1|0,u))):63:0|_;if((d>=1&&d<=127?1:d>=128&&d<=2047?2:d>=2048&&d<=65535?3:d>=65536&&d<=1114111?4:no(d))>h){c=c-1|0;break}var f,m=p;d>=0&&d<=127?(t.view.setInt8(m,$(d)),f=1):d>=128&&d<=2047?(t.view.setInt8(m,$(192|d>>6&31)),t.view.setInt8(m+1|0,$(128|63&d)),f=2):d>=2048&&d<=65535?(t.view.setInt8(m,$(224|d>>12&15)),t.view.setInt8(m+1|0,$(128|d>>6&63)),t.view.setInt8(m+2|0,$(128|63&d)),f=3):d>=65536&&d<=1114111?(t.view.setInt8(m,$(240|d>>18&7)),t.view.setInt8(m+1|0,$(128|d>>12&63)),t.view.setInt8(m+2|0,$(128|d>>6&63)),t.view.setInt8(m+3|0,$(128|63&d)),f=4):f=no(d),p=p+f|0}return Wi(new U(P(c-o|0)),new U(P(p-s|0)))}(t,e,c,i,o,p,a,s):Wi(new U(P(c-o|0)),new U(P(p-s|0)))}(t,e,h=h-1|0,u,n,p,c,o)}function eo(t){throw new lo("Expected "+t+" more character bytes")}function no(t){throw S("Malformed code-point "+t+" found")}function io(t){return t>>>16==0}function oo(t){return t<=1114111}function ro(t){return 56320+(1023&t)|0}function ao(t){return 55232+(t>>>10)|0}function so(t,e){return((0|t)-55232|0)<<10|(0|e)-56320|0}function lo(t){K(t,this),this.name="MalformedUTF8InputException"}function uo(t,e){var n,i=e.size;if(null==(n=e.stealAll_8be2vx$()))return 0;var o=n;return i<=jr&&null==o.next&&t.tryWriteAppend_pvnryh$(o)?(e.afterBytesStolen_8be2vx$(),i):(t.append_pvnryh$(o),i)}function co(t,e){return t.prepareReadHead_kcn2v3$(e)}function po(t,e){e!==t&&(e.writePosition>e.readPosition?(e.capacity-e.limit|0)<8?t.fixGapAfterRead_pvnryh$(e):t.headPosition=e.readPosition:t.ensureNext_j2u0py$(e))}function ho(t,e){return e===t?t.canRead()?t:null:t.ensureNextHead_pvnryh$(e)}function _o(t,e,n){return null!=n&&t.afterHeadWrite(),t.prepareWriteHead_za3lpa$(e)}function fo(){this.suspension_0=b(null)}function mo(t,e,n){c.call(this,n),this.exceptionState_0=1,this.$this=t,this.local$sleepCondition=e}function $o(t,e,n){c.call(this,n),this.exceptionState_0=1,this.$this=t,this.local$suspended=void 0,this.local$sleepCondition=e}function yo(t,e,n,i){c.call(this,i),this.exceptionState_0=1,this.local$tmp$=void 0,this.local$remainingLimit=void 0,this.local$transferred=void 0,this.local$tail=void 0,this.local$$receiver=t,this.local$dst=e,this.local$limit=n}function go(t,e,n,i,o){var r=new yo(t,e,n,i);return o?r:r.doResume(null)}function vo(t,e,n,i){c.call(this,i),this.exceptionState_0=9,this.local$lastPiece=void 0,this.local$rc=void 0,this.local$$receiver=t,this.local$dst=e,this.local$limit=n}function bo(t){na.call(this,t)}function wo(){}function xo(){}function ko(){this.borrowed_m1d2y6$_0=x(0),this.disposed_rxrbhb$_0=pt(!1),this.instance_vlsx8v$_0=b(null)}function Co(t){return void 0===t&&(t=!1),new To(Ki().Empty,t)}function Eo(t,n,i){var o;if(0===t.length)return Lo().Empty;for(var r=Ki().Pool.borrow(),a=r,s=n,l=s+i|0;;){a.reserveEndGap_za3lpa$(8);var u=l-s|0,c=a,p=c.limit-c.writePosition|0,h=E.min(u,p);if(Bn(e.isType(o=a,hn)?o:m(),t,s,h),(s=s+h|0)===l)break;var _=a;a=Ki().Pool.borrow(),_.next=a}var d=new To(r,!1);return Pe(d),d}function So(t,n,i,o){var r,a;return go(e.isType(r=t,Ct)?r:m(),e.isType(a=n,Ct)?a:m(),i,o)}function To(t,e){Ct.call(this,t,e),this.attachedJob_0=null}function Oo(t,e,n,i,o){c.call(this,o),this.exceptionState_0=1,this.$this=t,this.local$dst=e,this.local$offset=n,this.local$length=i}function No(t,e,n,i,o){c.call(this,o),this.exceptionState_0=1,this.$this=t,this.local$dst=e,this.local$offset=n,this.local$length=i}function Po(t,e,n,i,o){c.call(this,o),this.exceptionState_0=1,this.$this=t,this.local$start=void 0,this.local$end=void 0,this.local$remaining=void 0,this.local$dst=e,this.local$offset=n,this.local$length=i}function Io(){Lo()}function Ao(){jo=this,this.Empty_wsx8uv$_0=dt(Ro)}function Ro(){var t=new To(Ki().Empty,!1);return t.close_dbl4no$(null),t}zi.$metadata$={kind:h,simpleName:"ChunkBuffer",interfaces:[hn]},Object.defineProperty(Yi.prototype,"characters",{configurable:!0,get:function(){return new U(P(this.value>>>16))}}),Object.defineProperty(Yi.prototype,"bytes",{configurable:!0,get:function(){return new U(P(65535&this.value))}}),Yi.prototype.component1=function(){return this.characters},Yi.prototype.component2=function(){return this.bytes},Yi.$metadata$={kind:h,simpleName:"EncodeResult",interfaces:[]},Yi.prototype.unbox=function(){return this.value},Yi.prototype.toString=function(){return"EncodeResult(value="+e.toString(this.value)+")"},Yi.prototype.hashCode=function(){var t=0;return 31*t+e.hashCode(this.value)|0},Yi.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.value,t.value)},Zi.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},Zi.prototype=Object.create(c.prototype),Zi.prototype.constructor=Zi,Zi.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.local$decoded={v:0},this.local$size={v:1},this.local$cr={v:!1},this.local$end={v:!1},this.state_0=2;continue;case 1:throw this.exception_0;case 2:if(this.local$end.v||0===this.local$size.v){this.state_0=5;continue}if(this.state_0=3,this.result_0=this.local$nextChunk(this.local$size.v,this),this.result_0===u)return u;continue;case 3:if(this.local$tmp$=this.result_0,null==this.local$tmp$){this.state_0=5;continue}this.state_0=4;continue;case 4:var t=this.local$tmp$,e=t.remaining;t:do{var n,i,o=!0;if(null==(n=co(t,1)))break t;var r=n,a=1;try{e:do{var s,l=r,c=l.writePosition-l.readPosition|0;if(c>=a)try{var p,h=r,_={v:0};n:do{for(var d={v:0},f={v:0},m={v:0},$=h.memory,y=h.readPosition,g=h.writePosition,v=y;v>=1,d.v=d.v+1|0;if(m.v=d.v,d.v=d.v-1|0,m.v>(g-v|0)){h.discardExact_za3lpa$(v-y|0),p=m.v;break n}}else if(f.v=f.v<<6|127&b,d.v=d.v-1|0,0===d.v){if(io(f.v)){var E,S=et(tt(f.v));i:do{switch(Q(S)){case 13:if(this.local$cr.v){this.local$end.v=!0,E=!1;break i}this.local$cr.v=!0,E=!0;break i;case 10:this.local$end.v=!0,_.v=1,E=!1;break i;default:if(this.local$cr.v){this.local$end.v=!0,E=!1;break i}if(this.local$decoded.v===this.local$limit)throw new an("Too many characters in line: limit "+this.local$limit+" exceeded");this.local$decoded.v=this.local$decoded.v+1|0,this.local$out.append_s8itvh$(Q(S)),E=!0;break i}}while(0);if(!E){h.discardExact_za3lpa$(v-y-m.v+1|0),p=-1;break n}}else if(oo(f.v)){var T,O=et(tt(ao(f.v)));i:do{switch(Q(O)){case 13:if(this.local$cr.v){this.local$end.v=!0,T=!1;break i}this.local$cr.v=!0,T=!0;break i;case 10:this.local$end.v=!0,_.v=1,T=!1;break i;default:if(this.local$cr.v){this.local$end.v=!0,T=!1;break i}if(this.local$decoded.v===this.local$limit)throw new an("Too many characters in line: limit "+this.local$limit+" exceeded");this.local$decoded.v=this.local$decoded.v+1|0,this.local$out.append_s8itvh$(Q(O)),T=!0;break i}}while(0);var N=!T;if(!N){var P,I=et(tt(ro(f.v)));i:do{switch(Q(I)){case 13:if(this.local$cr.v){this.local$end.v=!0,P=!1;break i}this.local$cr.v=!0,P=!0;break i;case 10:this.local$end.v=!0,_.v=1,P=!1;break i;default:if(this.local$cr.v){this.local$end.v=!0,P=!1;break i}if(this.local$decoded.v===this.local$limit)throw new an("Too many characters in line: limit "+this.local$limit+" exceeded");this.local$decoded.v=this.local$decoded.v+1|0,this.local$out.append_s8itvh$(Q(I)),P=!0;break i}}while(0);N=!P}if(N){h.discardExact_za3lpa$(v-y-m.v+1|0),p=-1;break n}}else no(f.v);f.v=0}}var A=g-y|0;h.discardExact_za3lpa$(A),p=0}while(0);this.local$size.v=p,_.v>0&&h.discardExact_za3lpa$(_.v),this.local$size.v=this.local$end.v?0:J(this.local$size.v,1),a=this.local$size.v}finally{var R=r;s=R.writePosition-R.readPosition|0}else s=c;if(o=!1,0===s)i=ho(t,r);else{var j=s0)}finally{o&&po(t,r)}}while(0);this.local$afterRead(e.subtract(t.remaining).toInt()),this.state_0=2;continue;case 5:return this.local$size.v>1&&Qi(this.local$size.v),this.local$cr.v&&(this.local$end.v=!0),this.local$decoded.v>0||this.local$end.v;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},lo.$metadata$={kind:h,simpleName:"MalformedUTF8InputException",interfaces:[V]},mo.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},mo.prototype=Object.create(c.prototype),mo.prototype.constructor=mo,mo.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.trySuspend_0(this.local$sleepCondition,this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:if(this.result_0)return;this.state_0=3;continue;case 3:return void this.$this.resume();default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},fo.prototype.sleep_u332lz$=function(t,e,n){var i=new mo(this,t,e);return n?i:i.doResume(null)},fo.prototype.resume=function(){var t;null!=(t=this.suspension_0.atomicfu$getAndSet(null))&&t.complete()},fo.prototype.cancel_dbl4no$=function(t){var e;if(null!=(e=this.suspension_0.atomicfu$getAndSet(null))){var n=e;null!=t?n.completeExceptionally_tcv7n7$(t):n.complete()}},$o.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},$o.prototype=Object.create(c.prototype),$o.prototype.constructor=$o,$o.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.local$suspended=!1;var t=ct();if(this.$this.suspension_0.atomicfu$compareAndSet(null,t)&&this.local$sleepCondition()){if(this.local$suspended=!0,this.state_0=2,this.result_0=t.join(this),this.result_0===u)return u;continue}this.state_0=3;continue;case 1:throw this.exception_0;case 2:this.state_0=3;continue;case 3:return this.local$suspended;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},fo.prototype.trySuspend_0=function(t,e,n){var i=new $o(this,t,e);return n?i:i.doResume(null)},fo.$metadata$={kind:h,simpleName:"AwaitingSlot",interfaces:[]},yo.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},yo.prototype=Object.create(c.prototype),yo.prototype.constructor=yo,yo.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.local$$receiver===this.local$dst)throw S("Failed requirement.".toString());if(null!=this.local$$receiver.closedCause)return this.local$dst.close_dbl4no$(this.local$$receiver.closedCause),d;this.state_0=2;continue;case 1:throw this.exception_0;case 2:this.local$remainingLimit=this.local$limit,this.state_0=3;continue;case 3:if(this.local$remainingLimit.toNumber()<=0){this.state_0=11;continue}if(this.state_0=4,this.result_0=this.local$$receiver.awaitInternalAtLeast1_8be2vx$(this),this.result_0===u)return u;continue;case 4:if(this.result_0){this.state_0=5;continue}this.state_0=11;continue;case 5:if(this.local$transferred=this.local$$receiver.transferTo_pxvbjg$(this.local$dst,this.local$remainingLimit),f(this.local$transferred,d)){if(this.state_0=8,this.result_0=(e=this.local$$receiver,n=this.local$dst,i=this.local$remainingLimit,o=void 0,r=void 0,r=new vo(e,n,i,this),o?r:r.doResume(null)),this.result_0===u)return u;continue}if(0===this.local$dst.availableForWrite){if(this.state_0=6,this.result_0=this.local$dst.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(1,this),this.result_0===u)return u;continue}this.state_0=7;continue;case 6:this.state_0=7;continue;case 7:this.local$tmp$=this.local$transferred,this.state_0=10;continue;case 8:if(this.local$tail=this.result_0,f(this.local$tail,d)){this.state_0=11;continue}this.state_0=9;continue;case 9:this.local$tmp$=this.local$tail,this.state_0=10;continue;case 10:var t=this.local$tmp$;this.local$remainingLimit=this.local$remainingLimit.subtract(t),t.toNumber()>0&&this.local$dst.flush(),this.state_0=3;continue;case 11:return this.local$limit.subtract(this.local$remainingLimit);default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}var e,n,i,o,r},vo.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},vo.prototype=Object.create(c.prototype),vo.prototype.constructor=vo,vo.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.local$lastPiece=Ki().Pool.borrow(),this.exceptionState_0=7,this.local$lastPiece.resetForWrite_za3lpa$(v(this.local$limit,e.Long.fromInt(this.local$lastPiece.capacity)).toInt()),this.state_0=1,this.result_0=this.local$$receiver.readAvailable_j2u0py$(this.local$lastPiece,this),this.result_0===u)return u;continue;case 1:if(this.local$rc=this.result_0,-1===this.local$rc){this.local$lastPiece.release_2bs5fo$(Ki().Pool),this.exceptionState_0=9,this.finallyPath_0=[2],this.state_0=8,this.$returnValue=d;continue}this.state_0=3;continue;case 2:case 5:return this.$returnValue;case 3:if(this.state_0=4,this.result_0=this.local$dst.writeFully_b4g5fm$(this.local$lastPiece,this),this.result_0===u)return u;continue;case 4:this.exceptionState_0=9,this.finallyPath_0=[5],this.state_0=8,this.$returnValue=e.Long.fromInt(this.local$rc);continue;case 6:return;case 7:this.finallyPath_0=[9],this.state_0=8;continue;case 8:this.exceptionState_0=9,this.local$lastPiece.release_2bs5fo$(Ki().Pool),this.state_0=this.finallyPath_0.shift();continue;case 9:throw this.exception_0;default:throw this.state_0=9,new Error("State Machine Unreachable execution")}}catch(t){if(9===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},bo.prototype.produceInstance=function(){return new Int8Array(4096)},bo.$metadata$={kind:h,interfaces:[na]},wo.prototype.close=function(){this.dispose()},wo.$metadata$={kind:s,simpleName:"ObjectPool",interfaces:[Fr]},Object.defineProperty(xo.prototype,"capacity",{configurable:!0,get:function(){return 0}}),xo.prototype.recycle_trkh7z$=function(t){},xo.prototype.dispose=function(){},xo.$metadata$={kind:h,simpleName:"NoPoolImpl",interfaces:[wo]},To.prototype.attachJob_dqr1mp$=function(t){var e,n;null!=(e=this.attachedJob_0)&&e.cancel_x5z25k$(),this.attachedJob_0=t,t.invokeOnCompletion_ct2b2z$(!0,void 0,(n=this,function(t){return n.attachedJob_0=null,null!=t&&n.cancel_dbl4no$(Fe(t)),_}))},Oo.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},Oo.prototype=Object.create(c.prototype),Oo.prototype.constructor=Oo,Oo.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;if(this.$this.readable.endOfInput){if(this.state_0=2,this.result_0=this.$this.readAvailableSuspend_0(this.local$dst,this.local$offset,this.local$length,this),this.result_0===u)return u;continue}if(null!=(t=this.$this.closedCause))throw t;var e=qr(this.$this.readable,this.local$dst,this.local$offset,this.local$length);return this.$this.afterRead_za3lpa$(e),e;case 1:throw this.exception_0;case 2:return this.result_0;case 3:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},To.prototype.readAvailable_qmgm5g$=function(t,e,n,i,o){var r=new Oo(this,t,e,n,i);return o?r:r.doResume(null)},No.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},No.prototype=Object.create(c.prototype),No.prototype.constructor=No,No.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.await_za3lpa$(1,this),this.result_0===u)return u;continue;case 1:throw this.exception_0;case 2:if(this.result_0){this.state_0=3;continue}return-1;case 3:if(this.state_0=4,this.result_0=this.$this.readAvailable_qmgm5g$(this.local$dst,this.local$offset,this.local$length,this),this.result_0===u)return u;continue;case 4:return this.result_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},To.prototype.readAvailableSuspend_0=function(t,e,n,i,o){var r=new No(this,t,e,n,i);return o?r:r.doResume(null)},To.prototype.readFully_qmgm5g$=function(t,e,n,i){var o;if(this.availableForRead>=n){if(null!=(o=this.closedCause))throw o;return Ur(this.readable,t,e,n),void this.afterRead_za3lpa$(n-e|0)}return this.readFullySuspend_0(t,e,n,i)},Po.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[c]},Po.prototype=Object.create(c.prototype),Po.prototype.constructor=Po,Po.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.local$start=this.local$offset,this.local$end=this.local$offset+this.local$length|0,this.local$remaining=this.local$length,this.state_0=2;continue;case 1:throw this.exception_0;case 2:if(this.local$start>=this.local$end){this.state_0=4;continue}if(this.state_0=3,this.result_0=this.$this.readAvailable_qmgm5g$(this.local$dst,this.local$start,this.local$remaining,this),this.result_0===u)return u;continue;case 3:var t=this.result_0;if(-1===t)throw new Yr("Premature end of stream: required "+this.local$remaining+" more bytes");this.local$start=this.local$start+t|0,this.local$remaining=this.local$remaining-t|0,this.state_0=2;continue;case 4:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},To.prototype.readFullySuspend_0=function(t,e,n,i,o){var r=new Po(this,t,e,n,i);return o?r:r.doResume(null)},To.prototype.toString=function(){return"ByteChannel["+ht(this.attachedJob_0)+", "+_t(this)+"]"},To.$metadata$={kind:h,simpleName:"ByteChannelJS",interfaces:[Ct]},Io.prototype.readRemaining_s8cxhz$=function(t,e,n){return void 0===t&&(t=T),n?n(t,e):this.readRemaining_s8cxhz$$default(t,e)},Io.prototype.peekTo_afjyek$=function(t,e,n,i,o,r,a){return void 0===n&&(n=d),void 0===i&&(i=W),void 0===o&&(o=T),a?a(t,e,n,i,o,r):this.peekTo_afjyek$$default(t,e,n,i,o,r)},Object.defineProperty(Ao.prototype,"Empty",{configurable:!0,get:function(){return this.Empty_wsx8uv$_0.value}}),Ao.$metadata$={kind:G,simpleName:"Companion",interfaces:[]};var jo=null;function Lo(){return null===jo&&new Ao,jo}function zo(){}function Do(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=e.length-n|0);var o=e;return Bo(Vo(),o,n,i)}function Mo(t,e,n,i){return void 0===n&&(n=0),void 0===i&&(i=e.byteLength-n|0),new Ho(new DataView(e,n,i))}function Bo(t,e,n,i){return void 0===n&&(n=0),void 0===i&&(i=e.byteLength),Mo(Vo(),e.buffer,e.byteOffset+n|0,i)}function Fo(){Uo=this}Io.$metadata$={kind:s,simpleName:"ByteReadChannel",interfaces:[]},zo.$metadata$={kind:s,simpleName:"ByteWriteChannel",interfaces:[]},Fo.prototype.alloc_za3lpa$=function(t){return new Ho(new DataView(new ArrayBuffer(t)))},Fo.prototype.alloc_s8cxhz$=function(t){return t.toNumber()>=2147483647&&Xi(t,"size"),new Ho(new DataView(new ArrayBuffer(t.toInt())))},Fo.prototype.free_vn6nzs$=function(t){},Fo.$metadata$={kind:G,simpleName:"DefaultAllocator",interfaces:[nn]};var Uo=null;function qo(){return null===Uo&&new Fo,Uo}function Ho(t){Vo(),this.view=t}function Go(){Ko=this,this.Empty=new Ho(new DataView(new ArrayBuffer(0)))}Object.defineProperty(Ho.prototype,"size",{configurable:!0,get:O("ktor-ktor-io-js-legacy.io.ktor.utils.io.bits.Memory.get_size",(function(){return e.Long.fromInt(this.view.byteLength)}))}),Object.defineProperty(Ho.prototype,"size32",{configurable:!0,get:O("ktor-ktor-io-js-legacy.io.ktor.utils.io.bits.Memory.get_size32",(function(){return this.view.byteLength}))}),Ho.prototype.loadAt_za3lpa$=O("ktor-ktor-io-js-legacy.io.ktor.utils.io.bits.Memory.loadAt_za3lpa$",(function(t){return this.view.getInt8(t)})),Ho.prototype.loadAt_s8cxhz$=O("ktor-ktor-io-js-legacy.io.ktor.utils.io.bits.Memory.loadAt_s8cxhz$",N((function(){var e=t.io.ktor.utils.io.core.internal.failLongToIntConversion_a4hdmt$;return function(t){var n=this.view;return t.toNumber()>=2147483647&&e(t,"index"),n.getInt8(t.toInt())}}))),Ho.prototype.storeAt_6t1wet$=O("ktor-ktor-io-js-legacy.io.ktor.utils.io.bits.Memory.storeAt_6t1wet$",(function(t,e){this.view.setInt8(t,e)})),Ho.prototype.storeAt_3pq026$=O("ktor-ktor-io-js-legacy.io.ktor.utils.io.bits.Memory.storeAt_3pq026$",N((function(){var e=t.io.ktor.utils.io.core.internal.failLongToIntConversion_a4hdmt$;return function(t,n){var i=this.view;t.toNumber()>=2147483647&&e(t,"index"),i.setInt8(t.toInt(),n)}}))),Ho.prototype.slice_vux9f0$=function(t,n){if(!(t>=0))throw S(("offset shouldn't be negative: "+t).toString());if(!(n>=0))throw S(("length shouldn't be negative: "+n).toString());if((t+n|0)>e.Long.fromInt(this.view.byteLength).toNumber())throw new at("offset + length > size: "+t+" + "+n+" > "+e.Long.fromInt(this.view.byteLength).toString());return new Ho(new DataView(this.view.buffer,this.view.byteOffset+t|0,n))},Ho.prototype.slice_3pjtqy$=function(t,e){t.toNumber()>=2147483647&&Xi(t,"offset");var n=t.toInt();return e.toNumber()>=2147483647&&Xi(e,"length"),this.slice_vux9f0$(n,e.toInt())},Ho.prototype.copyTo_ubllm2$=function(t,e,n,i){var o=new Int8Array(this.view.buffer,this.view.byteOffset+e|0,n);new Int8Array(t.view.buffer,t.view.byteOffset+i|0,n).set(o)},Ho.prototype.copyTo_q2ka7j$=function(t,e,n,i){e.toNumber()>=2147483647&&Xi(e,"offset");var o=e.toInt();n.toNumber()>=2147483647&&Xi(n,"length");var r=n.toInt();i.toNumber()>=2147483647&&Xi(i,"destinationOffset"),this.copyTo_ubllm2$(t,o,r,i.toInt())},Go.$metadata$={kind:G,simpleName:"Companion",interfaces:[]};var Ko=null;function Vo(){return null===Ko&&new Go,Ko}function Yo(t,e,n,i,o){var r=e,a=new Int8Array(t.view.buffer,t.view.byteOffset+n|0,i);r.set(a,o)}function Wo(t,e,n,i,o){var r=new Int8Array(e,o,i),a=new Int8Array(t.view.buffer,t.view.byteOffset+n|0,i);r.set(a,0)}function Xo(t,e,n,i,o){var r=new Int8Array(t,n,i);new Int8Array(e.view.buffer,e.view.byteOffset+o|0,i).set(r,0)}function Zo(t,e,n,i,o){Xo(t.buffer,e,n+t.byteOffset|0,i,o)}function Jo(t){er(),this._name_8be2vx$=t}function Qo(){tr=this}Ho.$metadata$={kind:h,simpleName:"Memory",interfaces:[]},Jo.prototype.equals=function(t){return this===t||!(null==t||!f(ft(e.getKClassFromExpression(this)),ft(e.getKClassFromExpression(t))))&&(e.isType(t,Jo)||m(),!!f(this._name_8be2vx$,t._name_8be2vx$))},Jo.prototype.hashCode=function(){return _t(this._name_8be2vx$)},Jo.prototype.toString=function(){return this._name_8be2vx$},Qo.prototype.forName_61zpoe$=function(t){if(f(t,"UTF-8")||f(t,"utf-8")||f(t,"UTF8")||f(t,"utf8"))return vr().UTF_8;var e=f(t,"ISO-8859-1")||f(t,"iso-8859-1");if(!e){var n=mt(t,95,45),i=f(n,"iso-8859-1");i||(i=f(n.toLowerCase(),"iso-8859-1")),e=i}if(e||f(t,"latin1")||f(t,"Latin1"))return vr().ISO_8859_1;throw S("Charset "+t+" is not supported")},Qo.prototype.isSupported_61zpoe$=function(t){if(f(t,"UTF-8")||f(t,"utf-8")||f(t,"UTF8")||f(t,"utf8"))return!0;var e=f(t,"ISO-8859-1")||f(t,"iso-8859-1");if(!e){var n=mt(t,95,45),i=f(n,"iso-8859-1");i||(i=f(n.toLowerCase(),"iso-8859-1")),e=i}return!(!e&&!f(t,"latin1"))},Qo.$metadata$={kind:G,simpleName:"Companion",interfaces:[]};var tr=null;function er(){return null===tr&&new Qo,tr}function nr(t){return t._name_8be2vx$}function ir(t){this._charset_8be2vx$=t}function or(t){ir.call(this,t),this.charset_0=t}function rr(t){return t._charset_8be2vx$}function ar(t,e,n,i){return void 0===n&&(n=0),void 0===i&&(i=e.length),ln(t,e,n,i)}function sr(t,n,i,o,r){var a;if(!(i<=o))throw S("Failed requirement.".toString());if(null!=(a=rr(t))&&a.equals(vr().ISO_8859_1))return Cr(n,i,o,r);if(rr(t)!==vr().UTF_8)throw S("Only UTF-8 encoding is supported in JS".toString());for(var s=new TextEncoder,l=i,u=r.limit-r.writePosition|0;l0;){var c=o-l|0,p=u/6|0,h=J(E.min(c,p),1),_=ut(n.charCodeAt(l+h-1|0)),d=_&&1===h?l+2|0:_?l+h-1|0:l+h|0,f=l,m=s.encode(e.subSequence(n,f,d).toString());if(m.length>u)break;Or(r,m),l=d,u=u-m.length|0}return l-i|0}function lr(t,e,n){if(rr(t)!==vr().UTF_8)throw S("Failed requirement.".toString());n.writePacket_3uq2w4$(e)}function ur(t,e){return!0}function cr(t){this._charset_8be2vx$=t}function pr(t){cr.call(this,t),this.charset_0=t}function hr(t){return t._charset_8be2vx$}function _r(t,n,i,o){var r=Wr(nr(hr(t)),!0),a={v:0};t:do{var s,l,u=!0;if(null==(s=co(n,1)))break t;var c=s,p=1;try{e:do{var h,_=c,d=_.writePosition-_.readPosition|0;if(d>=p)try{var f,m=c;n:do{var $,y=o-a.v|0,g=m.writePosition-m.readPosition|0;if(y0&&m.rewind_za3lpa$(g),f=0}else f=a.v0)}finally{u&&po(n,c)}}while(0);if(a.v=D)try{var U=z,q=U.memory,H=U.readPosition,G=U.writePosition,K=kr(new $t(q.view.buffer,q.view.byteOffset+H|0,G-H|0),r,o-a.v|0);i.append_gw00v9$(K.charactersDecoded),a.v=a.v+K.charactersDecoded.length|0;var V=K.bytesConsumed;U.discardExact_za3lpa$(V),V>0?I.v=1:8===I.v?I.v=0:I.v=I.v+1|0,D=I.v}finally{var Y=z;M=Y.writePosition-Y.readPosition|0}else M=F;if(L=!1,0===M)j=ho(n,z);else{var W=M0)}finally{L&&po(n,z)}}while(0)}return a.v}function dr(t,n,i){if(0===i)return"";if((n.headEndExclusive-n.headPosition|0)>=i){var o,r,a=Wr(hr(t)._name_8be2vx$,!0),s=n.head,l=n.headMemory.view;try{var u=0===s.readPosition&&i===l.byteLength?l:new DataView(l.buffer,l.byteOffset+s.readPosition|0,i);o=a.decode_c2mund$(u)}catch(t){throw e.isType(t,A)?new wr("Failed to decode bytes: "+(null!=(r=t.message)?r:"no cause provided")):t}var c=o;return n.discardExact_za3lpa$(i),c}return function(t,n,i){var o,r=Wr(nr(hr(t)),!0),a={v:i},s=H(i);try{t:do{var l,u,c=!0;if(null==(l=co(n,6)))break t;var p=l,h=6;try{do{var _,d=p,f=d.writePosition-d.readPosition|0;if(f>=h)try{var m,$=p,y=$.writePosition-$.readPosition|0,g=a.v,v=E.min(y,g);if(0===$.readPosition&&$.memory.view.byteLength===v){var b,w,x=$.memory.view;try{b=r.decode_g2l45e$(x,Zr(!0))}catch(t){throw e.isType(t,A)?new wr("Failed to decode bytes: "+(null!=(w=t.message)?w:"no cause provided")):t}m=b}else{var k,C,S=new Int8Array($.memory.view.buffer,$.memory.view.byteOffset+$.readPosition|0,v);try{k=r.decode_g2l45e$(S,Zr(!0))}catch(t){throw e.isType(t,A)?new wr("Failed to decode bytes: "+(null!=(C=t.message)?C:"no cause provided")):t}m=k}var T=m;s.append_pdl1vj$(T),$.discardExact_za3lpa$(v),a.v=a.v-v|0,h=a.v>0?6:0}finally{var O=p;_=O.writePosition-O.readPosition|0}else _=f;if(c=!1,0===_)u=ho(n,p);else{var N=_0)}finally{c&&po(n,p)}}while(0);if(a.v>0)t:do{var I,R,j=!0;if(null==(I=co(n,1)))break t;var L=I;try{for(;;){var z,D=L,M=D.writePosition-D.readPosition|0,B=a.v,F=E.min(M,B);if(0===D.readPosition&&D.memory.view.byteLength===F)z=r.decode_c2mund$(D.memory.view);else{var U,q,G=new Int8Array(D.memory.view.buffer,D.memory.view.byteOffset+D.readPosition|0,F);try{U=r.decode_g2l45e$(G,Zr(!0))}catch(t){throw e.isType(t,A)?new wr("Failed to decode bytes: "+(null!=(q=t.message)?q:"no cause provided")):t}z=U}var K=z;if(s.append_pdl1vj$(K),D.discardExact_za3lpa$(F),a.v=a.v-F|0,j=!1,null==(R=ho(n,L)))break;L=R,j=!0}}finally{j&&po(n,L)}}while(0);s.append_pdl1vj$(r.decode())}catch(t){throw e.isType(t,A)?new wr("Failed to decode bytes: "+(null!=(o=t.message)?o:"no cause provided")):t}if(a.v>0)throw new Yr("Not enough bytes available: had only "+(i-a.v|0)+" instead of "+i);return s.toString()}(t,n,i)}function fr(){gr=this,this.UTF_8=new br("UTF-8"),this.ISO_8859_1=new br("ISO-8859-1")}Jo.$metadata$={kind:h,simpleName:"Charset",interfaces:[]},ir.$metadata$={kind:h,simpleName:"CharsetEncoder",interfaces:[]},or.$metadata$={kind:h,simpleName:"CharsetEncoderImpl",interfaces:[ir]},or.prototype.component1_0=function(){return this.charset_0},or.prototype.copy_6ypavq$=function(t){return new or(void 0===t?this.charset_0:t)},or.prototype.toString=function(){return"CharsetEncoderImpl(charset="+e.toString(this.charset_0)+")"},or.prototype.hashCode=function(){var t=0;return 31*t+e.hashCode(this.charset_0)|0},or.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.charset_0,t.charset_0)},cr.$metadata$={kind:h,simpleName:"CharsetDecoder",interfaces:[]},pr.$metadata$={kind:h,simpleName:"CharsetDecoderImpl",interfaces:[cr]},pr.prototype.component1_0=function(){return this.charset_0},pr.prototype.copy_6ypavq$=function(t){return new pr(void 0===t?this.charset_0:t)},pr.prototype.toString=function(){return"CharsetDecoderImpl(charset="+e.toString(this.charset_0)+")"},pr.prototype.hashCode=function(){var t=0;return 31*t+e.hashCode(this.charset_0)|0},pr.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.charset_0,t.charset_0)},fr.$metadata$={kind:G,simpleName:"Charsets",interfaces:[]};var mr,$r,yr,gr=null;function vr(){return null===gr&&new fr,gr}function br(t){Jo.call(this,t),this.name=t}function wr(t){A.call(this),this.message_dl21pz$_0=t,this.cause_5de4tn$_0=null,e.captureStack(A,this),this.name="MalformedInputException"}function xr(t,e){this.charactersDecoded=t,this.bytesConsumed=e}function kr(t,n,i){if(0===i)return new xr("",0);try{var o=B(i,t.byteLength),r=n.decode_c2mund$(t.subarray(0,o));if(r.length<=i)return new xr(r,o)}catch(t){}return function(t,n,i){for(var o,r=B(i>=268435455?2147483647:8*i|0,t.byteLength);r>8;){try{var a=n.decode_c2mund$(t.subarray(0,r));if(a.length<=i)return new xr(a,r)}catch(t){}r=r/2|0}for(r=8;r>0;){try{var s=n.decode_c2mund$(t.subarray(0,r));if(s.length<=i)return new xr(s,r)}catch(t){}r=r-1|0}try{n.decode_c2mund$(t)}catch(t){throw e.isType(t,A)?new wr("Failed to decode bytes: "+(null!=(o=t.message)?o:"no cause provided")):t}throw new wr("Unable to decode buffer")}(t,n,i)}function Cr(t,e,n,i){if(e>=n)return 0;for(var o,r=i.writePosition,a=i.memory.slice_vux9f0$(r,i.limit-r|0).view,s=new Int8Array(a.buffer,a.byteOffset,a.byteLength),l=0,u=e;u255&&Er(c),s[(o=l,l=o+1|0,o)]=$(c)}var p=l;return i.commitWritten_za3lpa$(p),n-e|0}function Er(t){throw new wr("The character with unicode point "+t+" couldn't be mapped to ISO-8859-1 character")}function Sr(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=e.byteLength-n|0);var o=t.memory,r=t.readPosition;if((t.writePosition-r|0)t.readPosition))return-1;var o=t.writePosition-t.readPosition|0,r=E.min(i,o);return Sr(t,e,n,r),r}function Or(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=e.byteLength-n|0);var o=t.memory,r=t.writePosition;if((t.limit-r|0)0&&(o.v=o.v+u|0),!(o.v=0))throw new at("offset ("+t+") shouldn't be negative");if(!(e>=0))throw new at("length ("+e+") shouldn't be negative");if(!((t+e|0)<=n.length))throw new at("offset ("+t+") + length ("+e+") > bytes.size ("+n.length+")");throw vt()}function Gr(t,e,n){var i,o=t.length;if(!((n+o|0)<=e.length))throw S("Failed requirement.".toString());for(var r=n,a=0;a255&&r.writeByte_s8j3t7$($(c>>8)),r.writeByte_s8j3t7$($(255&c))}n=r.build()}catch(t){throw e.isType(t,A)?(r.release(),t):t}return wt(Ni(n))},ea.prototype.decode_g2l45e$=function(t,e){return this.decode_c2mund$(t)},ea.$metadata$={kind:h,simpleName:"TextDecoderFallback",interfaces:[Xr]},Object.defineProperty(na.prototype,"capacity",{get:function(){return this.capacity_7nvyry$_0}}),na.prototype.disposeInstance_trkh7z$=function(t){},na.prototype.clearInstance_trkh7z$=function(t){return t},na.prototype.validateInstance_trkh7z$=function(t){},na.prototype.borrow=function(){var t;if(0===this.size_p9jgx3$_0)return this.produceInstance();var n=(this.size_p9jgx3$_0=this.size_p9jgx3$_0-1|0,this.size_p9jgx3$_0),i=e.isType(t=this.instances_j5hzgy$_0[n],k)?t:m();return this.instances_j5hzgy$_0[n]=null,this.clearInstance_trkh7z$(i)},na.prototype.recycle_trkh7z$=function(t){var e;this.validateInstance_trkh7z$(t),this.size_p9jgx3$_0===this.capacity?this.disposeInstance_trkh7z$(t):this.instances_j5hzgy$_0[(e=this.size_p9jgx3$_0,this.size_p9jgx3$_0=e+1|0,e)]=t},na.prototype.dispose=function(){var t,n;t=this.size_p9jgx3$_0;for(var i=0;i>>8)},la.reverseByteOrder_s8ev3n$=function(t){var e=P(65535&t),n=P((255&e)<<8|(65535&e)>>>8)<<16,i=P(t>>>16);return n|65535&P((255&i)<<8|(65535&i)>>>8)},la.reverseByteOrder_mts6qi$=function(t){var n=t.and(Y).toInt(),i=P(65535&n),o=P((255&i)<<8|(65535&i)>>>8)<<16,r=P(n>>>16),a=e.Long.fromInt(o|65535&P((255&r)<<8|(65535&r)>>>8)).shiftLeft(32),s=t.shiftRightUnsigned(32).toInt(),l=P(65535&s),u=P((255&l)<<8|(65535&l)>>>8)<<16,c=P(s>>>16);return a.or(e.Long.fromInt(u|65535&P((255&c)<<8|(65535&c)>>>8)).and(Y))},la.reverseByteOrder_81szk$=function(t){var n=it(t),i=P(65535&n),o=P((255&i)<<8|(65535&i)>>>8)<<16,r=P(n>>>16),a=o|65535&P((255&r)<<8|(65535&r)>>>8);return e.floatFromBits(a)},la.reverseByteOrder_yrwdxr$=function(t){var n=ot(t),i=n.and(Y).toInt(),o=P(65535&i),r=P((255&o)<<8|(65535&o)>>>8)<<16,a=P(i>>>16),s=e.Long.fromInt(r|65535&P((255&a)<<8|(65535&a)>>>8)).shiftLeft(32),l=n.shiftRightUnsigned(32).toInt(),u=P(65535&l),c=P((255&u)<<8|(65535&u)>>>8)<<16,p=P(l>>>16),h=s.or(e.Long.fromInt(c|65535&P((255&p)<<8|(65535&p)>>>8)).and(Y));return e.doubleFromBits(h)},sa.ByteOrder=Nr,aa.CloseElement=Ae,aa.ReaderJob=Re,aa.WriterJob=je,aa.ReaderScope=Le,aa.WriterScope=ze,aa.writer_x9a1ni$=function(t,e,n,i){return void 0===e&&(e=L.EmptyCoroutineContext),void 0===n&&(n=!1),function(t,e,n,i,o){var r=t.coroutineContext.get_j3r2sn$(D.Key),a=M(t,e,void 0,(s=i,l=n,u=o,c=r,function(t,e,n){var i=new De(s,l,u,c,t,this,e);return n?i:i.doResume(null)}));var s,l,u,c;return a.invokeOnCompletion_f05bi3$((p=n,function(t){return p.close_dbl4no$(t),_})),new Be(a,n);var p}(t,e,Co(n),!0,i)},aa.unwrapCancellationException_fg6mcf$=Fe,aa.requestBuffer_78elpf$=function(t,e,n,i){var o=new He(t,e,n);return i?o:o.doResume(null)},sa.Buffer=hn,aa.completeReadingFromBuffer_6msh3s$=function(t,e,n,i,o){var r=new Ge(t,e,n,i);return o?r:r.doResume(null)},aa.ReadSession=Ue,aa.SuspendableReadSession=qe,aa.HasReadSession=We,aa.requestWriteBuffer_9tm6dw$=function(t,e,n,i){var o=new Qe(t,e,n);return i?o:o.doResume(null)},aa.completeWriting_oczduq$=function(t,n,i,o){if(!e.isType(t,Je))return a=new tn(t,n,o),r?a:a.doResume(null);var r,a;t.endWriteSession_za3lpa$(i)},aa.WriterSession=Xe,aa.WriterSuspendSession=Ze,aa.HasWriteSession=Je,la.Allocator=nn,la.copyTo_tiw1kd$=Yo;var ua=aa.charsets||(aa.charsets={});ua.encode_6xuvjk$=function(t,e,n,i,o){pn(t,o,e,n,i)},ua.encodeToByteArrayImpl_fj4osb$=function(t,e,n,i){return void 0===n&&(n=0),void 0===i&&(i=e.length),ar(t,e,n,i)},ua.encode_fj4osb$=function(t,n,i,o){var r;void 0===i&&(i=0),void 0===o&&(o=n.length);var a=new Wn;try{pn(t,a,n,i,o),r=a.build()}catch(t){throw e.isType(t,A)?(a.release(),t):t}return r},ua.encodeUTF8_45773h$=function(t,n){var i,o=new Wn;try{lr(t,n,o),i=o.build()}catch(t){throw e.isType(t,A)?(o.release(),t):t}return i},ua.encode_ufq2gc$=on,ua.decode_lb8wo3$=rn,ua.TooLongLineException=an,ua.encodeArrayImpl_bptnt4$=sn,ua.encodeToByteArrayImpl1_5lnu54$=ln,ua.sizeEstimate_i9ek5c$=un,ua.encodeToImpl_nctdml$=pn,Object.defineProperty(hn,"Companion",{get:mn}),sa.discardFailed_6xvm5r$=$n,sa.commitWrittenFailed_6xvm5r$=yn,sa.rewindFailed_6xvm5r$=gn,sa.startGapReservationFailedDueToLimit_g087h2$=vn,sa.startGapReservationFailed_g087h2$=bn,sa.endGapReservationFailedDueToCapacity_g087h2$=wn,sa.endGapReservationFailedDueToStartGap_g087h2$=xn,sa.endGapReservationFailedDueToContent_g087h2$=kn,sa.restoreStartGap_g087h2$=Cn,sa.InsufficientSpaceException_init_3m52m6$=Sn,sa.InsufficientSpaceException=En,sa.writeBufferAppend_eajdjw$=Tn,sa.writeBufferPrepend_tfs7w2$=On,sa.DefaultBufferPool=Nn,sa.readShort_abnlgx$=Pn,sa.readInt_abnlgx$=In,sa.readLong_abnlgx$=An,sa.readFloat_abnlgx$=Rn,sa.readDouble_abnlgx$=jn,sa.writeShort_cx5lgg$=Ln,sa.writeInt_cni1rh$=zn,sa.writeLong_xy6qu0$=Dn,sa.readFully_7ntqvp$=Mn,sa.writeFully_7ntqvp$=Bn,sa.readFully_i3yunz$=Fn,sa.writeFully_i3yunz$=Un,sa.releaseAll_dgux4l$=qn,sa.copyAll_kx8gx4$=Hn,sa.findTail_kx8gx4$=Kn,sa.remainingAll_kx8gx4$=Vn,sa.BytePacketBuilder=Wn,Object.defineProperty(Xn,"Companion",{get:Qn}),sa.ByteReadPacket_init_mfe2hi$=ti,sa.ByteReadPacket=Xn,sa.addSuppressedInternal_oh0dqn$=function(t,e){},Object.defineProperty(ei,"Companion",{get:ri}),sa.Input=ei;var ca=sa.internal||(sa.internal={});ca.prepareReadFirstHead_j319xh$=co,ca.prepareReadNextHead_x2nit9$=ho,ca.completeReadHead_x2nit9$=po,sa.readFully_ja303r$=ai,sa.readFully_n4diq5$=si,sa.readAvailable_czhrh1$=function(t,n,i,o){var r={v:o},a={v:i};t:do{var s,l,u=!0;if(null==(s=co(t,1)))break t;var c=s;try{for(;;){var p=c,h=r.v,_=e.Long.fromInt(p.writePosition-p.readPosition|0),m=(h.compareTo_11rb$(_)<=0?h:_).toInt(),$=p.memory,y=e.Long.fromInt(p.readPosition),g=a.v;if($.copyTo_q2ka7j$(n,y,e.Long.fromInt(m),g),p.discardExact_za3lpa$(m),r.v=r.v.subtract(e.Long.fromInt(m)),a.v=a.v.add(e.Long.fromInt(m)),!(r.v.toNumber()>0))break;if(u=!1,null==(l=ho(t,c)))break;c=l,u=!0}}finally{u&&po(t,c)}}while(0);var v=r.v,b=o.subtract(v);return f(b,d)&&t.endOfInput?nt:b},sa.readShort_7wsnj1$=li,sa.readInt_7wsnj1$=ci,sa.readLong_7wsnj1$=hi,sa.readFloat_7wsnj1$=di,sa.readFloatFallback_7wsnj1$=fi,sa.readDouble_7wsnj1$=mi,sa.readDoubleFallback_7wsnj1$=$i,sa.Output=yi,sa.writeFully_i6snlg$=gi,sa.writeFully_apj91c$=vi,sa.writeFully_35rta0$=bi,sa.writeFully_bch96q$=wi,ca.prepareWriteHead_uoax3m$=_o,sa.writeShort_9kfkzl$=xi,sa.writeInt_qu9kum$=ki,sa.writeLong_kb5mzd$=Ei,sa.writeFloat_9rid5t$=Ti,sa.writeDouble_jgp4k2$=Oi,sa.prematureEndOfStream_za3lpa$=ji,ua.encodeToByteArray_fj4osb$=ar,sa.readBytes_xc9h3n$=Ni,sa.readText_1lnizf$=function(t,e,n){return void 0===e&&(e=vr().UTF_8),void 0===n&&(n=2147483647),rn(e.newDecoder(),t,n)},sa.readTextExactBytes_yqne27$=Pi,sa.writeText_t153jy$=Ii,sa.writeText_t7k8z4$=Ai,ca.CharArraySequence=Li,Object.defineProperty(zi,"Companion",{get:Ki}),ca.ChunkBuffer=zi,ca.isExclusivelyOwned_kx8gx4$=Vi,ca.EncodeResult_init_2ahd1g$=Wi,ca.EncodeResult=Yi,ca.failLongToIntConversion_a4hdmt$=Xi,ca.decodeUTF8LineLoopSuspend_dsomrf$=Ji,ca.malformedByteCount_za3lpa$=eo,ca.isBmpCodePoint_za3lpa$=io,ca.isValidCodePoint_za3lpa$=oo,ca.malformedCodePoint_za3lpa$=no,ca.highSurrogate_za3lpa$=ao,ca.lowSurrogate_za3lpa$=ro,ca.encodeUTF8_yjoz4m$=to,ca.codePoint_fdkhi5$=so,ca.MalformedUTF8InputException=lo,ca.unsafeAppend_z83jwh$=uo;var pa=aa.internal||(aa.internal={});pa.AwaitingSlot=fo,pa.copyToSequentialImpl_6ii227$=go;var ha=aa.pool||(aa.pool={});Object.defineProperty(ha,"ByteArrayPool",{get:function(){return Hi}}),ha.ObjectPool=wo,ha.NoPoolImpl=xo,ha.SingleInstancePool=ko,aa.ByteChannel_6taknv$=Co,aa.ByteReadChannel_mj6st8$=Eo,aa.copyTo_47ygvz$=So,aa.ByteChannelJS=To,Object.defineProperty(Io,"Companion",{get:Lo}),aa.ByteReadChannel=Io,aa.ByteWriteChannel=zo,la.Memory=Ho,la.of_2z595v$=Do,la.of_3qjk6t$=Mo,la.of_d2rc7k$=Bo,Object.defineProperty(la,"DefaultAllocator",{get:qo}),Object.defineProperty(Ho,"Companion",{get:Vo}),la.copyTo_1uvjz5$=Wo,la.copyTo_3wm8wl$=Xo,la.copyTo_vnj7g0$=Zo,Object.defineProperty(Jo,"Companion",{get:er}),ua.Charset=Jo,ua.get_name_2sg7fd$=nr,ua.CharsetEncoder=ir,ua.get_charset_x4isqx$=rr,ua.encodeImpl_edsj0y$=sr,ua.encodeUTF8_sbvn4u$=lr,ua.encodeComplete_5txte2$=ur,ua.CharsetDecoder=cr,ua.get_charset_e9jvmp$=hr,ua.decodeBuffer_eccjnr$=function(t,e,n,i,o){if(void 0===o&&(o=2147483647),0===o)return 0;var r=Wr(nr(hr(t))),a={v:null},s=e.memory,l=e.readPosition,u=e.writePosition,c=kr(new $t(s.view.buffer,s.view.byteOffset+l|0,u-l|0),r,o);n.append_gw00v9$(c.charactersDecoded),a.v=c.bytesConsumed;var p=c.bytesConsumed;return e.discardExact_za3lpa$(p),a.v},ua.decode_eyhcpn$=_r,ua.decodeExactBytes_lb8wo3$=dr,Object.defineProperty(ua,"Charsets",{get:vr}),ua.MalformedInputException=wr,Object.defineProperty(ua,"MAX_CHARACTERS_SIZE_IN_BYTES_8be2vx$",{get:function(){return mr}}),ua.DecodeBufferResult=xr,ua.decodeBufferImpl_g8dwr5$=kr,ua.encodeISO88591_4e1bz1$=Cr,sa.readFully_xbe0h9$=Sr,sa.readAvailable_xbe0h9$=Tr,sa.writeFully_agdgmg$=Or,Object.defineProperty(Nr,"BIG_ENDIAN",{get:Ir}),Object.defineProperty(Nr,"LITTLE_ENDIAN",{get:Ar}),Object.defineProperty(Nr,"Companion",{get:Br}),sa.Closeable=Fr,sa.readFully_7dohgh$=Ur,sa.readAvailable_7dohgh$=qr,sa.String_xge8xe$=function(t,e,n,i){void 0===e&&(e=0),void 0===n&&(n=t.length),void 0===i&&(i=vr().UTF_8),(e<0||n<0||(e+n|0)>t.length)&&Hr(e,n,t);var o=t,r=o.byteOffset+e|0,a=o.buffer.slice(r,r+n|0),s=new zi(Mo(Vo(),a),null,Ki().NoPool_8be2vx$);s.resetForRead();var l=ti(s,Ki().NoPoolManuallyManaged_8be2vx$);return rn(i.newDecoder(),l,2147483647)},sa.checkIndices_khgzz8$=Hr,sa.getCharsInternal_8t7fl6$=Gr;var _a=aa.errors||(aa.errors={});_a.IOException_init_61zpoe$=Vr,_a.IOException=Kr,_a.EOFException=Yr;var da=aa.js||(aa.js={});return da.Decoder_t8jjq2$=Wr,da.Decoder=Xr,da.decodeOptions_vft4zs$=Zr,da.toKtor_y2kull$=Qr,da.textDecoderOptions_vft4zs$=ta,da.TextDecoderFallback=ea,ha.DefaultPool=na,kt.prototype.readRemaining_s8cxhz$=Io.prototype.readRemaining_s8cxhz$,kt.prototype.peekTo_afjyek$=Io.prototype.peekTo_afjyek$,qe.prototype.request_za3lpa$=Ue.prototype.request_za3lpa$,Ct.prototype.readRemaining_s8cxhz$=kt.prototype.readRemaining_s8cxhz$,Ct.prototype.await_za3lpa$=qe.prototype.await_za3lpa$,Ct.prototype.request_za3lpa$=qe.prototype.request_za3lpa$,Ct.prototype.peekTo_afjyek$=kt.prototype.peekTo_afjyek$,Re.prototype.cancel=R.prototype.cancel,Re.prototype.fold_3cc69b$=R.prototype.fold_3cc69b$,Re.prototype.get_j3r2sn$=R.prototype.get_j3r2sn$,Re.prototype.minusKey_yeqjby$=R.prototype.minusKey_yeqjby$,Re.prototype.plus_dqr1mp$=R.prototype.plus_dqr1mp$,Re.prototype.plus_1fupul$=R.prototype.plus_1fupul$,Re.prototype.cancel_dbl4no$=R.prototype.cancel_dbl4no$,Re.prototype.cancel_x5z25k$=R.prototype.cancel_x5z25k$,Re.prototype.invokeOnCompletion_ct2b2z$=R.prototype.invokeOnCompletion_ct2b2z$,je.prototype.cancel=R.prototype.cancel,je.prototype.fold_3cc69b$=R.prototype.fold_3cc69b$,je.prototype.get_j3r2sn$=R.prototype.get_j3r2sn$,je.prototype.minusKey_yeqjby$=R.prototype.minusKey_yeqjby$,je.prototype.plus_dqr1mp$=R.prototype.plus_dqr1mp$,je.prototype.plus_1fupul$=R.prototype.plus_1fupul$,je.prototype.cancel_dbl4no$=R.prototype.cancel_dbl4no$,je.prototype.cancel_x5z25k$=R.prototype.cancel_x5z25k$,je.prototype.invokeOnCompletion_ct2b2z$=R.prototype.invokeOnCompletion_ct2b2z$,Be.prototype.cancel_dbl4no$=Re.prototype.cancel_dbl4no$,Be.prototype.cancel_x5z25k$=Re.prototype.cancel_x5z25k$,Be.prototype.invokeOnCompletion_ct2b2z$=Re.prototype.invokeOnCompletion_ct2b2z$,na.prototype.close=wo.prototype.close,Mi.prototype.close=wo.prototype.close,Bi.prototype.close=wo.prototype.close,xo.prototype.close=wo.prototype.close,ko.prototype.close=wo.prototype.close,o=l,r=new Ae(null),dn=new Nn,qi=new Int8Array(0),Hi=new bo(128),Br().nativeOrder(),Ar(),mr=8,jr=200,Lr=bt(["ansi_x3.4-1968","ascii","cp1252","cp819","csisolatin1","ibm819","iso-8859-1","iso-ir-100","iso8859-1","iso88591","iso_8859-1","iso_8859-1:1987","l1","latin1","us-ascii","windows-1252","x-cp1252"]),zr=new Int8Array([$(239),$(191),$(189)]),Dr=new Int32Array([8364,-1,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,-1,381,-1,-1,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,-1,382,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255]),t})?i.apply(e,o):i)||(t.exports=r)},851:function(t,e,n){var i,o,r;o=[e,n(421),n(122),n(376),n(197),n(847)],void 0===(r="function"==typeof(i=function(t,e,n,i,o,r){"use strict";var a=t.$$importsForInline$$||(t.$$importsForInline$$={}),s=e.kotlin.Exception,l=e.Kind.CLASS,u=(e.kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED,e.kotlin.coroutines.CoroutineImpl,e.ensureNotNull,e.Kind.INTERFACE,n.io.ktor.utils.io.charsets),c=i.io.ktor.http,p=i.io.ktor.http.parseAndSortHeader_pdl1vj$,h=e.equals,_=n.io.ktor.utils.io.charsets.Charset,d=(e.kotlin.Unit,i.io.ktor.http.content,o.kotlinx.coroutines.flow.FlowCollector,o.kotlinx.coroutines.flow.Flow,e.defineInlineFunction),f=e.wrapFunction;function m(t,e){void 0===e&&(e=null),s.call(this,t,e),this.name="ContentConvertException"}function $(t,e){void 0===e&&(e=null),m.call(this,t,e),this.name="WebsocketContentConvertException"}function y(t,e){void 0===e&&(e=null),$.call(this,t,e),this.name="WebsocketConverterNotFoundException"}function g(t,e,n){void 0===e&&(e=null),$.call(this,t,e),this.frame=n,this.name="WebsocketDeserializeException"}function v(t,e){var n;for(void 0===e&&(e=u.Charsets.UTF_8),n=p(t.get_61zpoe$(c.HttpHeaders.AcceptCharset)).iterator();n.hasNext();){var i=n.next().component1();if(h(i,"*"))return e;if(_.Companion.isSupported_61zpoe$(i))return _.Companion.forName_61zpoe$(i)}return null}e.getReifiedTypeParameterKType,r.io.ktor.util.reflect,e.getKClass,r.io.ktor.util.reflect.typeInfoImpl_1lvkm8$,Error,e.throwCCE,m.prototype=Object.create(s.prototype),m.prototype.constructor=m,$.prototype=Object.create(m.prototype),$.prototype.constructor=$,y.prototype=Object.create($.prototype),y.prototype.constructor=y,g.prototype=Object.create($.prototype),g.prototype.constructor=g,m.$metadata$={kind:l,simpleName:"ContentConvertException",interfaces:[s]},$.$metadata$={kind:l,simpleName:"WebsocketContentConvertException",interfaces:[m]},y.$metadata$={kind:l,simpleName:"WebsocketConverterNotFoundException",interfaces:[$]},g.$metadata$={kind:l,simpleName:"WebsocketDeserializeException",interfaces:[$]},d("ktor-ktor-serialization-js-legacy.io.ktor.serialization.serialize_du9chr$",f((function(){var n=t.$$importsForInline$$["ktor-ktor-io-js-legacy"].io.ktor.utils.io.charsets,i=e.getReifiedTypeParameterKType,o=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,r=e.getKClass,a=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,s=Error;return function(t,l,u,c,p,h){void 0===p&&(p=n.Charsets.UTF_8);var _,d=o.JsType,f=r(t);t:do{try{_=i(t)}catch(t){if(e.isType(t,s)){_=null;break t}throw t}}while(0);return e.suspendCall(u.serializeNullable_rh40qx$(p,a(d,f,_),c,e.coroutineReceiver())),e.coroutineResult(e.coroutineReceiver())}}))),d("ktor-ktor-serialization-js-legacy.io.ktor.serialization.deserialize_v41121$",f((function(){var n=t.$$importsForInline$$["ktor-ktor-io-js-legacy"].io.ktor.utils.io.charsets,i=e.getReifiedTypeParameterKType,o=e.throwCCE,r=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,a=e.getKClass,s=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,l=Error;return function(t,u,c,p,h,_){var d;void 0===h&&(h=n.Charsets.UTF_8);var f,m=r.JsType,$=a(t);t:do{try{f=i(t)}catch(t){if(e.isType(t,l)){f=null;break t}throw t}}while(0);return e.suspendCall(c.deserialize_v0czzf$(h,s(m,$,f),p,e.coroutineReceiver())),u(d=e.coroutineResult(e.coroutineReceiver()))?d:o()}})));var b=t.io||(t.io={}),w=b.ktor||(b.ktor={}),x=w.serialization||(w.serialization={});return x.ContentConvertException=m,x.WebsocketContentConvertException=$,x.WebsocketConverterNotFoundException=y,x.WebsocketDeserializeException=g,x.suitableCharset_4q0pk1$=function(t,e){var n;return void 0===e&&(e=u.Charsets.UTF_8),null!=(n=v(t,e))?n:e},x.suitableCharsetOrNull_4q0pk1$=v,a["kotlinx-coroutines-core"]=o,a["ktor-ktor-io-js-legacy"]=n,a["ktor-ktor-utils-js-legacy"]=r,t})?i.apply(e,o):i)||(t.exports=r)},847:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__,factory;factory=function(_,Kotlin,$module$ktor_ktor_io_js_legacy,$module$kotlinx_coroutines_core,$module$kotlinx_atomicfu){"use strict";var $$importsForInline$$=_.$$importsForInline$$||(_.$$importsForInline$$={}),Kind_CLASS=Kotlin.Kind.CLASS,throwCCE=Kotlin.throwCCE,equals=Kotlin.equals,hashCode=Kotlin.hashCode,IllegalStateException_init=Kotlin.kotlin.IllegalStateException_init_pdl1vj$,Kind_INTERFACE=Kotlin.Kind.INTERFACE,toChar=Kotlin.toChar,indexOf=Kotlin.kotlin.text.indexOf_8eortd$,writeText=$module$ktor_ktor_io_js_legacy.io.ktor.utils.io.core.writeText_t153jy$,concatToString=Kotlin.kotlin.text.concatToString_wlitf7$,readBytes=$module$ktor_ktor_io_js_legacy.io.ktor.utils.io.core.readBytes_xc9h3n$,charsets=$module$ktor_ktor_io_js_legacy.io.ktor.utils.io.charsets,String_0=$module$ktor_ktor_io_js_legacy.io.ktor.utils.io.core.String_xge8xe$,unboxChar=Kotlin.unboxChar,toByte=Kotlin.toByte,defineInlineFunction=Kotlin.defineInlineFunction,wrapFunction=Kotlin.wrapFunction,BytePacketBuilder_init=$module$ktor_ktor_io_js_legacy.io.ktor.utils.io.core.BytePacketBuilder,Throwable=Error,get_lastIndex=Kotlin.kotlin.text.get_lastIndex_gw00vp$,toBoxedChar=Kotlin.toBoxedChar,L4096=Kotlin.Long.fromInt(4096),ByteChannel=$module$ktor_ktor_io_js_legacy.io.ktor.utils.io.ByteChannel_6taknv$,Unit=Kotlin.kotlin.Unit,COROUTINE_SUSPENDED=Kotlin.kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED,CoroutineImpl=Kotlin.kotlin.coroutines.CoroutineImpl,async=$module$kotlinx_coroutines_core.kotlinx.coroutines.async_pda6u4$,listOf=Kotlin.kotlin.collections.listOf_i5x0yv$,close=$module$ktor_ktor_io_js_legacy.io.ktor.utils.io.close_x5qia6$,launch=$module$kotlinx_coroutines_core.kotlinx.coroutines.launch_s496o7$,to=Kotlin.kotlin.to_ujzrz7$,coroutines=$module$kotlinx_coroutines_core.kotlinx.coroutines,ByteChannel_0=$module$ktor_ktor_io_js_legacy.io.ktor.utils.io.ByteChannel,addSuppressedInternal=$module$ktor_ktor_io_js_legacy.io.ktor.utils.io.core.addSuppressedInternal_oh0dqn$,toShort=Kotlin.toShort,MutableMap=Kotlin.kotlin.collections.MutableMap,ensureNotNull=Kotlin.ensureNotNull,Map$Entry=Kotlin.kotlin.collections.Map.Entry,MutableMap$MutableEntry=Kotlin.kotlin.collections.MutableMap.MutableEntry,LinkedHashMap_init=Kotlin.kotlin.collections.LinkedHashMap_init_q3lmfv$,MutableSet=Kotlin.kotlin.collections.MutableSet,addAll=Kotlin.kotlin.collections.addAll_ipc267$,Map=Kotlin.kotlin.collections.Map,charArray=Kotlin.charArray,repeat=Kotlin.kotlin.text.repeat_94bcnn$,toString=Kotlin.toString,println=Kotlin.kotlin.io.println_s8jyv4$,SupervisorJob=$module$kotlinx_coroutines_core.kotlinx.coroutines.SupervisorJob_5dx9e$,AbstractCoroutineContextElement=Kotlin.kotlin.coroutines.AbstractCoroutineContextElement,CoroutineExceptionHandler=$module$kotlinx_coroutines_core.kotlinx.coroutines.CoroutineExceptionHandler,concatToString_0=Kotlin.kotlin.text.concatToString_355ntz$,toInt=Kotlin.kotlin.text.toInt_6ic1pp$,encodeToByteArray=Kotlin.kotlin.text.encodeToByteArray_pdl1vz$,encodeToByteArray_0=$module$ktor_ktor_io_js_legacy.io.ktor.utils.io.charsets.encodeToByteArray_fj4osb$,MutableIterator=Kotlin.kotlin.collections.MutableIterator,Set=Kotlin.kotlin.collections.Set,collectionSizeOrDefault=Kotlin.kotlin.collections.collectionSizeOrDefault_ba2ldo$,ArrayList_init=Kotlin.kotlin.collections.ArrayList_init_ww73n8$,Kind_OBJECT=Kotlin.Kind.OBJECT,toList=Kotlin.kotlin.collections.toList_us0mfu$,fill=Kotlin.kotlin.collections.fill_6mk3ue$,L0=Kotlin.Long.ZERO,fill_0=Kotlin.kotlin.collections.fill_tpuxuu$,arrayCopy=Kotlin.kotlin.collections.arrayCopy,UnsupportedOperationException_init=Kotlin.kotlin.UnsupportedOperationException_init_pdl1vj$,firstOrNull=Kotlin.kotlin.collections.firstOrNull_2p1efm$,equals_0=Kotlin.kotlin.text.equals_igcy3c$,setOf=Kotlin.kotlin.collections.setOf_mh5how$,emptyMap=Kotlin.kotlin.collections.emptyMap_q3lmfv$,toSet=Kotlin.kotlin.collections.toSet_7wnvza$,emptySet=Kotlin.kotlin.collections.emptySet_287e2$,LinkedHashMap_init_0=Kotlin.kotlin.collections.LinkedHashMap_init_bwtc7$,asList=Kotlin.kotlin.collections.asList_us0mfu$,toMap=Kotlin.kotlin.collections.toMap_6hr0sd$,listOf_0=Kotlin.kotlin.collections.listOf_mh5how$,single=Kotlin.kotlin.collections.single_7wnvza$,toList_0=Kotlin.kotlin.collections.toList_7wnvza$,ArrayList_init_0=Kotlin.kotlin.collections.ArrayList_init_287e2$,CharRange=Kotlin.kotlin.ranges.CharRange,StringBuilder_init=Kotlin.kotlin.text.StringBuilder_init_za3lpa$,get_indices=Kotlin.kotlin.text.get_indices_gw00vp$,IOException=$module$ktor_ktor_io_js_legacy.io.ktor.utils.io.errors.IOException,mutableListOf=Kotlin.kotlin.collections.mutableListOf_i5x0yv$,Collection=Kotlin.kotlin.collections.Collection,LinkedHashSet_init=Kotlin.kotlin.collections.LinkedHashSet_init_287e2$,HashMap_init=Kotlin.kotlin.collections.HashMap_init_73mtqc$,atomic=$module$kotlinx_atomicfu.kotlinx.atomicfu.atomic$ref$1,emptyList=Kotlin.kotlin.collections.emptyList_287e2$,Iterable=Kotlin.kotlin.collections.Iterable,PrimitiveClasses$intClass=Kotlin.kotlin.reflect.js.internal.PrimitiveClasses.intClass,PrimitiveClasses$floatClass=Kotlin.kotlin.reflect.js.internal.PrimitiveClasses.floatClass,PrimitiveClasses$doubleClass=Kotlin.kotlin.reflect.js.internal.PrimitiveClasses.doubleClass,getKClass=Kotlin.getKClass,Long=Kotlin.Long,PrimitiveClasses$shortClass=Kotlin.kotlin.reflect.js.internal.PrimitiveClasses.shortClass,Char=Kotlin.BoxedChar,PrimitiveClasses$booleanClass=Kotlin.kotlin.reflect.js.internal.PrimitiveClasses.booleanClass,PrimitiveClasses$stringClass=Kotlin.kotlin.reflect.js.internal.PrimitiveClasses.stringClass,List=Kotlin.kotlin.collections.List,MutableList=Kotlin.kotlin.collections.MutableList,single_0=Kotlin.kotlin.collections.single_2p1efm$,KClass=Kotlin.kotlin.reflect.KClass,toInt_0=Kotlin.kotlin.text.toInt_pdl1vz$,toDouble=Kotlin.kotlin.text.toDouble_pdl1vz$,toLong=Kotlin.kotlin.text.toLong_pdl1vz$,toBoolean=Kotlin.kotlin.text.toBoolean_5cw0du$,Exception_init=Kotlin.kotlin.Exception_init_pdl1vj$,Exception=Kotlin.kotlin.Exception,Enum=Kotlin.kotlin.Enum,throwISE=Kotlin.throwISE,Comparable=Kotlin.kotlin.Comparable,throwUPAE=Kotlin.throwUPAE,IllegalStateException=Kotlin.kotlin.IllegalStateException,iterator=Kotlin.kotlin.text.iterator_gw00vp$,withContext=$module$kotlinx_coroutines_core.kotlinx.coroutines.withContext_i5cbzn$,CoroutineContext$Key=Kotlin.kotlin.coroutines.CoroutineContext.Key,joinToString=Kotlin.kotlin.collections.joinToString_fmv235$,Any=Object,UnsupportedOperationException_init_0=Kotlin.kotlin.UnsupportedOperationException_init,SuspendFunction2=Function,ArrayList=Kotlin.kotlin.collections.ArrayList,get_lastIndex_0=Kotlin.kotlin.collections.get_lastIndex_55thoc$,toMutableList=Kotlin.kotlin.collections.toMutableList_4c7yge$,last=Kotlin.kotlin.collections.last_2p1efm$,CoroutineScope=$module$kotlinx_coroutines_core.kotlinx.coroutines.CoroutineScope,recoverStackTrace=$module$kotlinx_coroutines_core.kotlinx.coroutines.internal.recoverStackTrace_ak2v6d$,getCallableRef=Kotlin.getCallableRef,coroutines_0=Kotlin.kotlin.coroutines,Continuation=Kotlin.kotlin.coroutines.Continuation,Result=Kotlin.kotlin.Result,createFailure=Kotlin.kotlin.createFailure_tcv7n7$,lazy=Kotlin.kotlin.lazy_klfg04$,isNaN_0=Kotlin.kotlin.isNaN_yrwdxr$,IllegalArgumentException_init=Kotlin.kotlin.IllegalArgumentException_init,IllegalArgumentException=Kotlin.kotlin.IllegalArgumentException,BASE64_ALPHABET,BASE64_MASK,BASE64_MASK_INT,BASE64_PAD,BASE64_INVERSE_ALPHABET,CHUNK_BUFFER_SIZE,digits,NONCE_SIZE_IN_BYTES;function AttributeKey(t){if(this.name=t,0===this.name.length)throw IllegalStateException_init("Name can't be blank")}function Attributes(){}function putAll(t,e){var n;for(n=e.allKeys.iterator();n.hasNext();){var i,o=n.next();t.put_uuntuo$(Kotlin.isType(i=o,AttributeKey)?i:throwCCE(),e.get_yzaw86$(o))}}function encodeBase64_0(t){for(var e,n,i=t,o=0,r={v:0},a=Kotlin.charArray(3+((8*t.length|0)/6|0)|0);(o+3|0)<=i.length;){var s=i[o],l=i[o+1|0],u=i[o+2|0];o=o+3|0;for(var c=(255&s)<<16|(255&l)<<8|255&u,p=3;p>=0;p--){var h=c>>(6*p|0)&63;a[(e=r.v,r.v=e+1|0,e)]=BASE64_ALPHABET.charCodeAt(h)}}var _=i.length-o|0;if(0===_)return concatToString(a,0,r.v);for(var d=1===_?0|(255&i[o])<<16:(255&i[o])<<16|(255&i[o+1|0])<<8|0,f=(8*(3-_|0)|0)/6|0,m=3;m>=f;m--){var $=d>>(6*m|0)&63;a[(n=r.v,r.v=n+1|0,n)]=BASE64_ALPHABET.charCodeAt($)}for(var y=0;y>4],i[(n=o,o=n+1|0,n)]=r[15&s]}return concatToString_0(i)}function generateNonce(t){var e,n=new BytePacketBuilder_init;try{for(;n.size>>32-e}function Sha1(){this.messageLength_0=L0,this.unprocessed_0=new Int8Array(64),this.unprocessedLimit_0=0,this.words_0=new Int32Array(80),this.h0_0=1732584193,this.h1_0=-271733879,this.h2_0=-1732584194,this.h3_0=271733878,this.h4_0=-1009589776}HashFunction.prototype.update_mj6st8$=function(t,e,n,i){void 0===e&&(e=0),void 0===n&&(n=t.length),i?i(t,e,n):this.update_mj6st8$$default(t,e,n)},HashFunction.$metadata$={kind:Kind_INTERFACE,simpleName:"HashFunction",interfaces:[]},Sha1.prototype.update_mj6st8$$default=function(t,e,n){this.messageLength_0=this.messageLength_0.add(Kotlin.Long.fromInt(n));var i=e,o=i+n|0,r=this.unprocessed_0,a=this.unprocessedLimit_0;if(a>0){if((a+n|0)<64)return arrayCopy(t,r,a,i,o),void(this.unprocessedLimit_0=a+n|0);var s=64-a|0;arrayCopy(t,r,a,i,i+s|0),this.processChunk_0(r,0),this.unprocessedLimit_0=0,i=i+s|0}for(;io)return arrayCopy(t,r,0,i,o),void(this.unprocessedLimit_0=o-i|0);this.processChunk_0(t,i),i=l}},Sha1.prototype.processChunk_0=function(t,e){for(var n,i,o,r,a,s=this.words_0,l=e,u=0;u<16;u++)s[u]=(255&t[(n=l,l=n+1|0,n)])<<24|(255&t[(i=l,l=i+1|0,i)])<<16|(255&t[(o=l,l=o+1|0,o)])<<8|255&t[(r=l,l=r+1|0,r)];for(var c=16;c<80;c++)s[c]=leftRotate(s[c-3|0]^s[c-8|0]^s[c-14|0]^s[c-16|0],1);for(var p=this.h0_0,h=this.h1_0,_=this.h2_0,d=this.h3_0,f=this.h4_0,m=0;m<80;m++){if(m<20){var $=d^h&(_^d);a=leftRotate(p,5)+$+f+1518500249+s[m]|0}else if(m<40){var y=h^_^d;a=leftRotate(p,5)+y+f+1859775393+s[m]|0}else if(m<60){var g=h&_|h&d|_&d;a=leftRotate(p,5)+g+f+-1894007588+s[m]|0}else{var v=h^_^d;a=leftRotate(p,5)+v+f+-899497514+s[m]|0}var b=a;f=d,d=_,_=leftRotate(h,30),h=p,p=b}this.h0_0=this.h0_0+p|0,this.h1_0=this.h1_0+h|0,this.h2_0=this.h2_0+_|0,this.h3_0=this.h3_0+d|0,this.h4_0=this.h4_0+f|0},Sha1.prototype.digest=function(){var t,e=this.unprocessed_0,n=this.unprocessedLimit_0,i=this.messageLength_0.multiply(Kotlin.Long.fromInt(8));e[(t=n,n=t+1|0,t)]=toByte(128),n>56?(fill(e,0,n,64),this.processChunk_0(e,0),fill(e,0,0,n)):fill(e,0,n,56),e[56]=toByte(i.shiftRightUnsigned(56).toInt()),e[57]=toByte(i.shiftRightUnsigned(48).toInt()),e[58]=toByte(i.shiftRightUnsigned(40).toInt()),e[59]=toByte(i.shiftRightUnsigned(32).toInt()),e[60]=toByte(i.shiftRightUnsigned(24).toInt()),e[61]=toByte(i.shiftRightUnsigned(16).toInt()),e[62]=toByte(i.shiftRightUnsigned(8).toInt()),e[63]=toByte(i.toInt()),this.processChunk_0(e,0);var o=this.h0_0,r=this.h1_0,a=this.h2_0,s=this.h3_0,l=this.h4_0;return this.reset_0(),new Int8Array([toByte(o>>24),toByte(o>>16),toByte(o>>8),toByte(o),toByte(r>>24),toByte(r>>16),toByte(r>>8),toByte(r),toByte(a>>24),toByte(a>>16),toByte(a>>8),toByte(a),toByte(s>>24),toByte(s>>16),toByte(s>>8),toByte(s),toByte(l>>24),toByte(l>>16),toByte(l>>8),toByte(l)])},Sha1.prototype.reset_0=function(){this.messageLength_0=L0,fill(this.unprocessed_0,0),this.unprocessedLimit_0=0,fill_0(this.words_0,0),this.h0_0=1732584193,this.h1_0=-271733879,this.h2_0=-1732584194,this.h3_0=271733878,this.h4_0=-1009589776},Sha1.$metadata$={kind:Kind_CLASS,simpleName:"Sha1",interfaces:[HashFunction]};var GenerateOnlyNonceManager_instance=null,AlwaysFailNonceManager_instance=null;function StringValues(){StringValues$Companion_getInstance()}function StringValues$Companion(){StringValues$Companion_instance=this,this.Empty=new StringValuesImpl}StringValues$Companion.prototype.build_o7hlrk$=defineInlineFunction("ktor-ktor-utils-js-legacy.io.ktor.util.StringValues.Companion.build_o7hlrk$",wrapFunction((function(){var t=_.io.ktor.util.StringValuesBuilderImpl;return function(e,n){void 0===e&&(e=!1);var i=new t(e);return n(i),i.build()}}))),StringValues$Companion.$metadata$={kind:Kind_OBJECT,simpleName:"Companion",interfaces:[]};var StringValues$Companion_instance=null,INITIAL_CAPACITY;function StringValues$Companion_getInstance(){return null===StringValues$Companion_instance&&new StringValues$Companion,StringValues$Companion_instance}function StringValuesBuilder(){}function StringValuesImpl(t,e){void 0===t&&(t=!1),void 0===e&&(e=emptyMap()),this.caseInsensitiveName_w2tiaf$_0=t,this.values=null;var n,i=this.caseInsensitiveName?caseInsensitiveMap():LinkedHashMap_init();for(n=e.entries.iterator();n.hasNext();){for(var o=n.next(),r=o.key,a=o.value,s=a.size,l=ArrayList_init(s),u=0;u0))throw IllegalStateException_init("Date parser pattern shouldn't be empty.".toString())}function GMTDateParser$Companion(){GMTDateParser$Companion_instance=this,this.SECONDS=toBoxedChar(115),this.MINUTES=toBoxedChar(109),this.HOURS=toBoxedChar(104),this.DAY_OF_MONTH=toBoxedChar(100),this.MONTH=toBoxedChar(77),this.YEAR=toBoxedChar(89),this.ZONE=toBoxedChar(122),this.ANY=toBoxedChar(42)}GMTDate.$metadata$={kind:Kind_CLASS,simpleName:"GMTDate",interfaces:[Comparable]},GMTDate.prototype.component1=function(){return this.seconds},GMTDate.prototype.component2=function(){return this.minutes},GMTDate.prototype.component3=function(){return this.hours},GMTDate.prototype.component4=function(){return this.dayOfWeek},GMTDate.prototype.component5=function(){return this.dayOfMonth},GMTDate.prototype.component6=function(){return this.dayOfYear},GMTDate.prototype.component7=function(){return this.month},GMTDate.prototype.component8=function(){return this.year},GMTDate.prototype.component9=function(){return this.timestamp},GMTDate.prototype.copy_j9f46j$=function(t,e,n,i,o,r,a,s,l){return new GMTDate(void 0===t?this.seconds:t,void 0===e?this.minutes:e,void 0===n?this.hours:n,void 0===i?this.dayOfWeek:i,void 0===o?this.dayOfMonth:o,void 0===r?this.dayOfYear:r,void 0===a?this.month:a,void 0===s?this.year:s,void 0===l?this.timestamp:l)},GMTDate.prototype.toString=function(){return"GMTDate(seconds="+Kotlin.toString(this.seconds)+", minutes="+Kotlin.toString(this.minutes)+", hours="+Kotlin.toString(this.hours)+", dayOfWeek="+Kotlin.toString(this.dayOfWeek)+", dayOfMonth="+Kotlin.toString(this.dayOfMonth)+", dayOfYear="+Kotlin.toString(this.dayOfYear)+", month="+Kotlin.toString(this.month)+", year="+Kotlin.toString(this.year)+", timestamp="+Kotlin.toString(this.timestamp)+")"},GMTDate.prototype.hashCode=function(){var t=0;return 31*(t=31*(t=31*(t=31*(t=31*(t=31*(t=31*(t=31*(t=31*t+Kotlin.hashCode(this.seconds)|0)+Kotlin.hashCode(this.minutes)|0)+Kotlin.hashCode(this.hours)|0)+Kotlin.hashCode(this.dayOfWeek)|0)+Kotlin.hashCode(this.dayOfMonth)|0)+Kotlin.hashCode(this.dayOfYear)|0)+Kotlin.hashCode(this.month)|0)+Kotlin.hashCode(this.year)|0)+Kotlin.hashCode(this.timestamp)|0},GMTDate.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&Kotlin.equals(this.seconds,t.seconds)&&Kotlin.equals(this.minutes,t.minutes)&&Kotlin.equals(this.hours,t.hours)&&Kotlin.equals(this.dayOfWeek,t.dayOfWeek)&&Kotlin.equals(this.dayOfMonth,t.dayOfMonth)&&Kotlin.equals(this.dayOfYear,t.dayOfYear)&&Kotlin.equals(this.month,t.month)&&Kotlin.equals(this.year,t.year)&&Kotlin.equals(this.timestamp,t.timestamp)},GMTDateParser.prototype.parse_61zpoe$=function(t){var e=new GMTDateBuilder,n=0,i=this.pattern_0.charCodeAt(n),o=0,r=1;try{for(;r=this.interceptors_0.size?(this.finish(),this.subject):this.proceedLoop_0(t)},DebugPipelineContext.prototype.execute_trkh7z$=function(t,e){return this.index_0=0,this.subject=t,this.proceed(e)},Coroutine$proceedLoop_0.$metadata$={kind:Kotlin.Kind.CLASS,simpleName:null,interfaces:[CoroutineImpl]},Coroutine$proceedLoop_0.prototype=Object.create(CoroutineImpl.prototype),Coroutine$proceedLoop_0.prototype.constructor=Coroutine$proceedLoop_0,Coroutine$proceedLoop_0.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;this.state_0=2;continue;case 1:throw this.exception_0;case 2:if(this.local$index=this.$this.index_0,-1===this.local$index){this.state_0=6;continue}this.state_0=3;continue;case 3:if(this.local$interceptors=this.$this.interceptors_0,this.local$index>=this.local$interceptors.size){this.$this.finish(),this.state_0=6;continue}this.state_0=4;continue;case 4:var e=this.local$interceptors.get_za3lpa$(this.local$index);if(this.$this.index_0=this.local$index+1|0,this.state_0=5,this.result_0=(Kotlin.isType(t=e,SuspendFunction2)?t:throwCCE())(this.$this,this.$this.subject,this),this.result_0===COROUTINE_SUSPENDED)return COROUTINE_SUSPENDED;continue;case 5:this.state_0=2;continue;case 6:return this.$this.subject;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},DebugPipelineContext.prototype.proceedLoop_0=function(t,e){var n=new Coroutine$proceedLoop_0(this,t);return e?n:n.doResume(null)},DebugPipelineContext.$metadata$={kind:Kind_CLASS,simpleName:"DebugPipelineContext",interfaces:[PipelineContext]},Object.defineProperty(PhaseContent.prototype,"isEmpty",{configurable:!0,get:function(){return this.interceptors_0.isEmpty()}}),Object.defineProperty(PhaseContent.prototype,"size",{configurable:!0,get:function(){return this.interceptors_0.size}}),PhaseContent.prototype.addInterceptor_g7ktxf$=function(t){this.shared&&this.copyInterceptors_0(),this.interceptors_0.add_11rb$(t)},PhaseContent.prototype.addTo_nenlhb$=function(t){var e,n=this.interceptors_0;Kotlin.isType(t,ArrayList)&&t.ensureCapacity_za3lpa$(t.size+n.size|0),e=n.size;for(var i=0;i=0)throw IllegalStateException_init("Already started");return this.proceed(e)},SuspendFunctionGun.prototype.loop_0=function(t){for(;;){var e=this.index_0;if(e===this.blocks_0.size)return!!t||(this.resumeRootWith_0(new Result(this.subject)),!1);this.index_0=e+1|0;var n=this.blocks_0.get_za3lpa$(e);try{if(n(this,this.subject,this.continuation_0)===COROUTINE_SUSPENDED)return!1}catch(t){if(Kotlin.isType(t,Throwable))return this.resumeRootWith_0(new Result(createFailure(t))),!1;throw t}}},SuspendFunctionGun.prototype.resumeRootWith_0=function(t){var e;if(this.lastSuspensionIndex_0<0)throw IllegalStateException_init("No more continuations to resume".toString());var n=ensureNotNull(this.suspensions_0[this.lastSuspensionIndex_0]);if(this.suspensions_0[(e=this.lastSuspensionIndex_0,this.lastSuspensionIndex_0=e-1|0,e)]=null,t.isFailure){var i=recoverStackTraceBridge(ensureNotNull(t.exceptionOrNull()),n);n.resumeWith_tl1gpc$(new Result(createFailure(i)))}else n.resumeWith_tl1gpc$(t)},SuspendFunctionGun.prototype.discardLastRootContinuation_0=function(){var t;if(this.lastSuspensionIndex_0<0)throw IllegalStateException_init("No more continuations to resume");this.suspensions_0[(t=this.lastSuspensionIndex_0,this.lastSuspensionIndex_0=t-1|0,t)]=null},SuspendFunctionGun.prototype.addContinuation_0=function(t){this.suspensions_0[(this.lastSuspensionIndex_0=this.lastSuspensionIndex_0+1|0,this.lastSuspensionIndex_0)]=t},Object.defineProperty(SuspendFunctionGun$continuation$ObjectLiteral.prototype,"callerFrame",{configurable:!0,get:function(){var t;return Kotlin.isType(t=this.peekContinuation_0(),CoroutineStackFrame)?t:null}}),SuspendFunctionGun$continuation$ObjectLiteral.prototype.getStackTraceElement=function(){return null},SuspendFunctionGun$continuation$ObjectLiteral.prototype.peekContinuation_0=function(){var t;if(-2147483648===this.currentIndex&&(this.currentIndex=this.this$SuspendFunctionGun.lastSuspensionIndex_0),this.currentIndex<0)return this.currentIndex=-2147483648,null;try{if(null==(t=this.this$SuspendFunctionGun.suspensions_0[this.currentIndex]))return StackWalkingFailedFrame_getInstance();var e=t;return this.currentIndex=this.currentIndex-1|0,e}catch(t){if(Kotlin.isType(t,Throwable))return StackWalkingFailedFrame_getInstance();throw t}},Object.defineProperty(SuspendFunctionGun$continuation$ObjectLiteral.prototype,"context",{configurable:!0,get:function(){var t,e;if(null==(e=null!=(t=this.this$SuspendFunctionGun.suspensions_0[this.this$SuspendFunctionGun.lastSuspensionIndex_0])?t.context:null))throw IllegalStateException_init("Not started".toString());return e}}),SuspendFunctionGun$continuation$ObjectLiteral.prototype.resumeWith_tl1gpc$=function(t){t.isFailure?this.this$SuspendFunctionGun.resumeRootWith_0(new Result(createFailure(ensureNotNull(t.exceptionOrNull())))):this.this$SuspendFunctionGun.loop_0(!1)},SuspendFunctionGun$continuation$ObjectLiteral.$metadata$={kind:Kind_CLASS,interfaces:[CoroutineStackFrame,Continuation]},SuspendFunctionGun.$metadata$={kind:Kind_CLASS,simpleName:"SuspendFunctionGun",interfaces:[PipelineContext]},TypeInfo.$metadata$={kind:Kind_CLASS,simpleName:"TypeInfo",interfaces:[]},TypeInfo.prototype.component1=function(){return this.type},TypeInfo.prototype.component2=function(){return this.reifiedType},TypeInfo.prototype.component3=function(){return this.kotlinType},TypeInfo.prototype.copy_yupgpq$=function(t,e,n){return new TypeInfo(void 0===t?this.type:t,void 0===e?this.reifiedType:e,void 0===n?this.kotlinType:n)},TypeInfo.prototype.toString=function(){return"TypeInfo(type="+Kotlin.toString(this.type)+", reifiedType="+Kotlin.toString(this.reifiedType)+", kotlinType="+Kotlin.toString(this.kotlinType)+")"},TypeInfo.prototype.hashCode=function(){var t=0;return 31*(t=31*(t=31*t+Kotlin.hashCode(this.type)|0)+Kotlin.hashCode(this.reifiedType)|0)+Kotlin.hashCode(this.kotlinType)|0},TypeInfo.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&Kotlin.equals(this.type,t.type)&&Kotlin.equals(this.reifiedType,t.reifiedType)&&Kotlin.equals(this.kotlinType,t.kotlinType)},AttributesJs.prototype.getOrNull_yzaw86$=function(t){var e;return null==(e=this.map_0.get_11rb$(t))||Kotlin.isType(e,Any)?e:throwCCE()},AttributesJs.prototype.contains_w48dwb$=function(t){return this.map_0.containsKey_11rb$(t)},AttributesJs.prototype.put_uuntuo$=function(t,e){this.map_0.put_xwzc9p$(t,e)},AttributesJs.prototype.remove_yzaw86$=function(t){this.map_0.remove_11rb$(t)},AttributesJs.prototype.computeIfAbsent_u4q9l2$=function(t,e){var n,i;if(null!=(n=this.map_0.get_11rb$(t)))return Kotlin.isType(i=n,Any)?i:throwCCE();var o=e();return this.map_0.put_xwzc9p$(t,o),o},Object.defineProperty(AttributesJs.prototype,"allKeys",{configurable:!0,get:function(){return toList_0(this.map_0.keys)}}),AttributesJs.$metadata$={kind:Kind_CLASS,simpleName:"AttributesJs",interfaces:[Attributes]},PlatformUtils.$metadata$={kind:Kind_OBJECT,simpleName:"PlatformUtils",interfaces:[]};var PlatformUtils_instance=null;function PlatformUtils_getInstance(){return null===PlatformUtils_instance&&new PlatformUtils,PlatformUtils_instance}function CoroutineStackFrame(){}function createStackTraceElement(t,e,n,i){return new Any}function GMTDate_0(t){var e,n;void 0===t&&(t=null);var i=null!=(n=null!=(e=null!=t?t.toNumber():null)?new Date(e):null)?n:new Date;if(isNaN_0(i.getTime()))throw new InvalidTimestampException(ensureNotNull(t));var o=WeekDay$Companion_getInstance().from_za3lpa$((i.getUTCDay()+6|0)%7),r=Month$Companion_getInstance().from_za3lpa$(i.getUTCMonth());return new GMTDate(i.getUTCSeconds(),i.getUTCMinutes(),i.getUTCHours(),o,i.getUTCDate(),i.getUTCFullYear(),r,i.getUTCFullYear(),Kotlin.Long.fromNumber(i.getTime()))}function GMTDate_1(t,e,n,i,o,r){return GMTDate_0(Kotlin.Long.fromNumber(Date.UTC(r,o.ordinal,i,n,e,t)))}function InvalidTimestampException(t){IllegalStateException_init("Invalid date timestamp exception: "+t.toString(),this),this.name="InvalidTimestampException"}function getTimeMillis(){return Kotlin.Long.fromNumber((new Date).getTime())}function IntellijIdeaDebugDetector(){IntellijIdeaDebugDetector_instance=this,this.isDebuggerConnected=!1}CoroutineStackFrame.$metadata$={kind:Kind_INTERFACE,simpleName:"CoroutineStackFrame",interfaces:[]},InvalidTimestampException.$metadata$={kind:Kind_CLASS,simpleName:"InvalidTimestampException",interfaces:[IllegalStateException]},IntellijIdeaDebugDetector.$metadata$={kind:Kind_OBJECT,simpleName:"IntellijIdeaDebugDetector",interfaces:[]};var IntellijIdeaDebugDetector_instance=null;function IntellijIdeaDebugDetector_getInstance(){return null===IntellijIdeaDebugDetector_instance&&new IntellijIdeaDebugDetector,IntellijIdeaDebugDetector_instance}function initCauseBridge(t,e){}function withCause(t,e){return t}function Type(){}function JsType(){JsType_instance=this}Type.$metadata$={kind:Kind_INTERFACE,simpleName:"Type",interfaces:[]},JsType.$metadata$={kind:Kind_OBJECT,simpleName:"JsType",interfaces:[Type]};var JsType_instance=null;function JsType_getInstance(){return null===JsType_instance&&new JsType,JsType_instance}function typeInfoImpl(t,e,n){return new TypeInfo(e,t,n)}function instanceOf(t,e){return e.isInstance_s8jyv4$(t)}function get_platformType(t){return JsType_getInstance()}var package$io=_.io||(_.io={}),package$ktor=package$io.ktor||(package$io.ktor={}),package$util=package$ktor.util||(package$ktor.util={});package$util.AttributeKey=AttributeKey,package$util.Attributes=Attributes,package$util.putAll_orn3b7$=putAll,$$importsForInline$$["ktor-ktor-io-js-legacy"]=$module$ktor_ktor_io_js_legacy,package$util.encodeBase64_964n91$=encodeBase64_0,package$util.toByteArray_3dmw3p$=toByteArray,package$util.CaseInsensitiveMap=CaseInsensitiveMap,package$util.isLowerCase_myv2d0$=isLowerCase,package$util.toCharArray_pdl1vz$=toCharArray,package$util.caseInsensitiveMap_30y1fr$=caseInsensitiveMap,$$importsForInline$$["kotlinx-coroutines-core"]=$module$kotlinx_coroutines_core,package$util.SilentSupervisor_5dx9e$=SilentSupervisor,package$util.hex_fqrh44$=hex,package$util.generateNonce_za3lpa$=generateNonce,package$util.DelegatingMutableSet=DelegatingMutableSet,package$util.HashFunction=HashFunction,package$util.digest_7uhtiw$=digest,package$util.Sha1=Sha1,Object.defineProperty(StringValues,"Companion",{get:StringValues$Companion_getInstance}),package$util.StringValues=StringValues,package$util.StringValuesBuilder=StringValuesBuilder,package$util.StringValuesImpl=StringValuesImpl,package$util.StringValuesBuilderImpl=StringValuesBuilderImpl,package$util.flattenEntries_vr6bp2$=flattenEntries,package$util.appendAll_k10e8h$=appendAll,package$util.toLowerCasePreservingASCIIRules_pdl1vz$=toLowerCasePreservingASCIIRules,package$util.caseInsensitive_7efafi$=caseInsensitive,package$util.CaseInsensitiveString=CaseInsensitiveString;var package$cio=package$util.cio||(package$util.cio={});package$cio.ChannelIOException=ChannelIOException;var package$collections=package$util.collections||(package$util.collections={});package$collections.CopyOnWriteHashMap=CopyOnWriteHashMap,Object.defineProperty(WeekDay,"MONDAY",{get:WeekDay$MONDAY_getInstance}),Object.defineProperty(WeekDay,"TUESDAY",{get:WeekDay$TUESDAY_getInstance}),Object.defineProperty(WeekDay,"WEDNESDAY",{get:WeekDay$WEDNESDAY_getInstance}),Object.defineProperty(WeekDay,"THURSDAY",{get:WeekDay$THURSDAY_getInstance}),Object.defineProperty(WeekDay,"FRIDAY",{get:WeekDay$FRIDAY_getInstance}),Object.defineProperty(WeekDay,"SATURDAY",{get:WeekDay$SATURDAY_getInstance}),Object.defineProperty(WeekDay,"SUNDAY",{get:WeekDay$SUNDAY_getInstance}),Object.defineProperty(WeekDay,"Companion",{get:WeekDay$Companion_getInstance});var package$date=package$util.date||(package$util.date={});package$date.WeekDay=WeekDay,Object.defineProperty(Month,"JANUARY",{get:Month$JANUARY_getInstance}),Object.defineProperty(Month,"FEBRUARY",{get:Month$FEBRUARY_getInstance}),Object.defineProperty(Month,"MARCH",{get:Month$MARCH_getInstance}),Object.defineProperty(Month,"APRIL",{get:Month$APRIL_getInstance}),Object.defineProperty(Month,"MAY",{get:Month$MAY_getInstance}),Object.defineProperty(Month,"JUNE",{get:Month$JUNE_getInstance}),Object.defineProperty(Month,"JULY",{get:Month$JULY_getInstance}),Object.defineProperty(Month,"AUGUST",{get:Month$AUGUST_getInstance}),Object.defineProperty(Month,"SEPTEMBER",{get:Month$SEPTEMBER_getInstance}),Object.defineProperty(Month,"OCTOBER",{get:Month$OCTOBER_getInstance}),Object.defineProperty(Month,"NOVEMBER",{get:Month$NOVEMBER_getInstance}),Object.defineProperty(Month,"DECEMBER",{get:Month$DECEMBER_getInstance}),Object.defineProperty(Month,"Companion",{get:Month$Companion_getInstance}),package$date.Month=Month,Object.defineProperty(GMTDate,"Companion",{get:GMTDate$Companion_getInstance}),package$date.GMTDate=GMTDate,package$date.truncateToSeconds_bcxie9$=truncateToSeconds,Object.defineProperty(GMTDateParser,"Companion",{get:GMTDateParser$Companion_getInstance}),package$date.GMTDateParser=GMTDateParser,package$date.GMTDateBuilder=GMTDateBuilder,package$date.InvalidDateStringException=InvalidDateStringException;var package$debug=package$util.debug||(package$util.debug={});package$debug.initContextInDebugMode_lnyleu$=initContextInDebugMode;var package$plugins=package$debug.plugins||(package$debug.plugins={});Object.defineProperty(PluginsTrace,"Key",{get:PluginsTrace$Key_getInstance}),package$plugins.PluginsTrace=PluginsTrace;var package$internal=package$util.internal||(package$util.internal={});$$importsForInline$$["kotlinx-atomicfu"]=$module$kotlinx_atomicfu;var package$pipeline=package$util.pipeline||(package$util.pipeline={});package$pipeline.DebugPipelineContext=DebugPipelineContext,Object.defineProperty(PhaseContent,"Companion",{get:PhaseContent$Companion_getInstance}),package$pipeline.PhaseContent_init_ctf2er$=PhaseContent_init,package$pipeline.PhaseContent=PhaseContent,package$pipeline.Pipeline=Pipeline,package$pipeline.PipelineContext=PipelineContext,package$pipeline.pipelineContextFor_djf7bn$=pipelineContextFor,package$pipeline.PipelinePhase=PipelinePhase,package$pipeline.InvalidPhaseException=InvalidPhaseException,PipelinePhaseRelation.After=PipelinePhaseRelation$After,PipelinePhaseRelation.Before=PipelinePhaseRelation$Before,Object.defineProperty(PipelinePhaseRelation,"Last",{get:PipelinePhaseRelation$Last_getInstance}),package$pipeline.PipelinePhaseRelation=PipelinePhaseRelation,package$pipeline.recoverStackTraceBridge_5yr8tz$=recoverStackTraceBridge,Object.defineProperty(package$pipeline,"StackWalkingFailed",{get:StackWalkingFailed_getInstance}),Object.defineProperty(package$pipeline,"StackWalkingFailedFrame",{get:StackWalkingFailedFrame_getInstance}),package$pipeline.SuspendFunctionGun=SuspendFunctionGun;var package$reflect=package$util.reflect||(package$util.reflect={});package$reflect.TypeInfo=TypeInfo,package$util.AttributesJsFn=Attributes_0,package$util.AttributesJs=AttributesJs,package$util.unmodifiable_cgavii$=unmodifiable,package$util.generateNonce=generateNonce_0,package$util.sha1_fqrh44$=sha1,Object.defineProperty(package$util,"PlatformUtils",{get:PlatformUtils_getInstance}),package$util.CoroutineStackFrame=CoroutineStackFrame,package$util.createStackTraceElement_svyzhk$=createStackTraceElement,package$date.GMTDate_mts6q2$=GMTDate_0,package$date.GMTDate_qlqxlw$=GMTDate_1,package$date.InvalidTimestampException=InvalidTimestampException,package$date.getTimeMillis=getTimeMillis,Object.defineProperty(package$debug,"IntellijIdeaDebugDetector",{get:IntellijIdeaDebugDetector_getInstance}),package$internal.initCauseBridge_oh0dqn$=initCauseBridge,package$pipeline.withCause_6zzckt$=withCause,package$reflect.Type=Type,Object.defineProperty(package$reflect,"JsType",{get:JsType_getInstance}),package$reflect.typeInfoImpl_1lvkm8$=typeInfoImpl,package$reflect.instanceOf_lgjw4r$=instanceOf,package$reflect.get_platformType_op6ljc$=get_platformType,Sha1.prototype.update_mj6st8$=HashFunction.prototype.update_mj6st8$,AttributesJs.prototype.get_yzaw86$=Attributes.prototype.get_yzaw86$,AttributesJs.prototype.take_yzaw86$=Attributes.prototype.take_yzaw86$,AttributesJs.prototype.takeOrNull_yzaw86$=Attributes.prototype.takeOrNull_yzaw86$,BASE64_ALPHABET="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",BASE64_MASK=63,BASE64_MASK_INT=63,BASE64_PAD=61;var array=new Int32Array(256),tmp$;tmp$=array.length-1|0;for(var i=0;i<=tmp$;i++)array[i]=indexOf(BASE64_ALPHABET,toChar(i));return BASE64_INVERSE_ALPHABET=array,digits=toCharArray("0123456789abcdef"),NONCE_SIZE_IN_BYTES=16,INITIAL_CAPACITY=32,UNDECIDED=0,SUCCESS=1,FAILURE=2,CONDITION_FALSE=new Symbol("CONDITION_FALSE"),ALREADY_REMOVED=new Symbol("ALREADY_REMOVED"),LIST_EMPTY=new Symbol("LIST_EMPTY"),REMOVE_PREPARED=new Symbol("REMOVE_PREPARED"),NO_DECISION=new Symbol("NO_DECISION"),_crypto=lazy(_crypto$lambda),_},__WEBPACK_AMD_DEFINE_ARRAY__=[exports,__webpack_require__(421),__webpack_require__(122),__webpack_require__(197),__webpack_require__(595)],void 0===(__WEBPACK_AMD_DEFINE_RESULT__="function"==typeof(__WEBPACK_AMD_DEFINE_FACTORY__=factory)?__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__):__WEBPACK_AMD_DEFINE_FACTORY__)||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},891:function(t,e,n){var i,o,r;o=[e,n(421),n(847),n(851)],void 0===(r="function"==typeof(i=function(t,e,n,i){"use strict";var o=t.$$importsForInline$$||(t.$$importsForInline$$={}),r=(e.kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED,e.kotlin.coroutines.CoroutineImpl,e.defineInlineFunction),a=e.wrapFunction;return i.io.ktor.serialization.WebsocketDeserializeException,e.getReifiedTypeParameterKType,n.io.ktor.util.reflect,e.getKClass,n.io.ktor.util.reflect.typeInfoImpl_1lvkm8$,Error,e.toString,r("ktor-ktor-websocket-serialization-js-legacy.io.ktor.websocket.serialization.sendSerializedBase_2qtcud$",a((function(){var n=e.getReifiedTypeParameterKType,i=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,o=e.getKClass,r=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,a=Error;return function(t,s,l,u,c,p,h){var _,d=i.JsType,f=o(t);t:do{try{_=n(t)}catch(t){if(e.isType(t,a)){_=null;break t}throw t}}while(0);e.suspendCall(c.serializeNullable_rh40qx$(p,r(d,f,_),u,e.coroutineReceiver()));var m=e.coroutineResult(e.coroutineReceiver());e.suspendCall(l.outgoing.send_11rb$(m,e.coroutineReceiver()))}}))),r("ktor-ktor-websocket-serialization-js-legacy.io.ktor.websocket.serialization.receiveDeserializedBase_27sgp7$",a((function(){var n=t.$$importsForInline$$["ktor-ktor-serialization-js-legacy"].io.ktor.serialization.WebsocketDeserializeException,i=e.getReifiedTypeParameterKType,o=e.getKClass,r=e.toString,a=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,s=t.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,l=Error;return function(t,u,c,p,h,_){var d;e.suspendCall(c.incoming.receive(e.coroutineReceiver()));var f=e.coroutineResult(e.coroutineReceiver());if(!p.isApplicable_q1ubw4$(f))throw new n("Converter doesn't support frame type "+f.frameType.name,void 0,f);var m,$=a.JsType,y=o(t);t:do{try{m=i(t)}catch(t){if(e.isType(t,l)){m=null;break t}throw t}}while(0);var g=s($,y,m);e.suspendCall(p.deserialize_v0czzf$(h,g,f,e.coroutineReceiver()));var v=e.coroutineResult(e.coroutineReceiver());if(u(v))return v;if(null==v){if(!0===(null!=(d=g.kotlinType)?d.isMarkedNullable:null))return null;throw new n("Frame has null content",void 0,f)}throw new n("Can't deserialize value : expected value of type "+r(o(t).simpleName)+", got "+r(e.getKClassFromExpression(v).simpleName),void 0,f)}}))),o["ktor-ktor-utils-js-legacy"]=n,o["ktor-ktor-serialization-js-legacy"]=i,t})?i.apply(e,o):i)||(t.exports=r)},677:function(t,e,n){var i,o,r;o=[e,n(421),n(197),n(122),n(847),n(595)],void 0===(r="function"==typeof(i=function(t,e,n,i,o,r){"use strict";var a,s,l,u,c,p,h,_,d,f,m,$,y=t.$$importsForInline$$||(t.$$importsForInline$$={}),g=e.Kind.OBJECT,v=e.kotlin.Enum,b=e.Kind.CLASS,w=e.throwISE,x=e.kotlin.collections.mapCapacity_za3lpa$,k=e.kotlin.ranges.coerceAtLeast_dqglrj$,C=e.kotlin.collections.LinkedHashMap_init_bwtc7$,E=e.kotlin.collections.emptyList_287e2$,S=e.Kind.INTERFACE,T=e.Long.NEG_ONE,O=e.Long.fromInt(15e3),N=n.kotlinx.coroutines.CoroutineName,P=e.kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED,I=e.kotlin.coroutines.CoroutineImpl,A=n.kotlinx.coroutines.cancel_q2ti5d$,R=n.kotlinx.coroutines,j=e.kotlin.Unit,L=i.io.ktor.utils.io.core.BytePacketBuilder,z=e.ensureNotNull,D=i.io.ktor.utils.io.core.writeFully_i6snlg$,M=i.io.ktor.utils.io.core.readBytes_xc9h3n$,B=n.kotlinx.coroutines.channels.ClosedSendChannelException,F=Error,U=n.kotlinx.coroutines.launch_s496o7$,q=n.kotlinx.coroutines.CoroutineStart,H=n.kotlinx.coroutines.channels.ClosedReceiveChannelException,G=e.kotlin.coroutines.cancellation.CancellationException,K=o.io.ktor.util.cio.ChannelIOException,V=e.kotlin.coroutines.cancellation.CancellationException_init_wspj0f$,Y=i.io.ktor.utils.io.errors.IOException_init_61zpoe$,W=e.Long.ZERO,X=r.kotlinx.atomicfu.atomic$ref$1,Z=n.kotlinx.coroutines.CompletableDeferred_xptg6w$,J=n.kotlinx.coroutines.channels.Channel_lsve6m$,Q=r.kotlinx.atomicfu.atomic$boolean$1,tt=n.kotlinx.coroutines.Job,et=n.kotlinx.coroutines.Job_5dx9e$,nt=e.kotlin.IllegalArgumentException_init_pdl1vj$,it=e.kotlin.collections.ArrayList_init_287e2$,ot=e.kotlin.IllegalStateException_init_pdl1vj$,rt=n.kotlinx.coroutines.channels.cancelConsumed_v57n85$,at=i.io.ktor.utils.io.charsets,st=i.io.ktor.utils.io.charsets.decode_lb8wo3$,lt=i.io.ktor.utils.io.core.readShort_7wsnj1$,ut=n.kotlinx.coroutines.DisposableHandle,ct=o.io.ktor.util.internal.initCauseBridge_oh0dqn$,pt=e.kotlin.Exception_init,ht=e.kotlin.Exception,_t=n.kotlinx.coroutines.CopyableThrowable,dt=e.kotlin.collections.get_lastIndex_m7z4lg$,ft=Array,mt=o.io.ktor.util.date.getTimeMillis,$t=e.kotlin.random.Random_s8cxhz$,yt=n.kotlinx.coroutines.withTimeoutOrNull_ms3uf5$,gt=o.io.ktor.util.hex_fqrh44$,vt=i.io.ktor.utils.io.core.String_xge8xe$,bt=e.equals,wt=e.kotlin.text.encodeToByteArray_pdl1vz$,xt=i.io.ktor.utils.io.charsets.encodeToByteArray_fj4osb$,kt=e.Long.fromInt(2147483647),Ct=(i.io.ktor.utils.io.close_x5qia6$,i.io.ktor.utils.io.errors.EOFException,e.toByte,e.toShort,e.kotlin.random.Random,e.Long.fromInt(65535),i.io.ktor.utils.io.bits,e.defineInlineFunction,e.wrapFunction,e.kotlin.collections.collectionSizeOrDefault_ba2ldo$),Et=e.kotlin.collections.ArrayList_init_ww73n8$,St=e.kotlin.collections.asSequence_7wnvza$,Tt=e.kotlin.text.indexOf_8eortd$,Ot=e.kotlin.to_ujzrz7$,Nt=e.kotlin.ranges.until_dqglrj$,Pt=e.kotlin.text.substring_fc3b62$,It=e.kotlin.sequences.map_z5avom$,At=e.kotlin.collections.joinToString_fmv235$,Rt=e.kotlin.text.split_ip8yn$,jt=e.kotlin.collections.first_2p1efm$,Lt=e.kotlin.collections.drop_ba2ldo$,zt=e.throwCCE,Dt=e.kotlin.text.trim_gw00vp$,Mt=n.kotlinx.coroutines.CoroutineScope,Bt=i.io.ktor.utils.io.core.writeShort_9kfkzl$,Ft=i.io.ktor.utils.io.core.writeText_t153jy$;function Ut(t,e){this.code=t,this.message=e}function qt(t,e,n){v.call(this),this.code=n,this.name$=t,this.ordinal$=e}function Ht(){Ht=function(){},a=new qt("NORMAL",0,1e3),s=new qt("GOING_AWAY",1,1001),l=new qt("PROTOCOL_ERROR",2,1002),u=new qt("CANNOT_ACCEPT",3,1003),c=new qt("CLOSED_ABNORMALLY",4,1006),p=new qt("NOT_CONSISTENT",5,1007),h=new qt("VIOLATED_POLICY",6,1008),_=new qt("TOO_BIG",7,1009),d=new qt("NO_EXTENSION",8,1010),f=new qt("INTERNAL_ERROR",9,1011),m=new qt("SERVICE_RESTART",10,1012),$=new qt("TRY_AGAIN_LATER",11,1013),le()}function Gt(){return Ht(),a}function Kt(){return Ht(),s}function Vt(){return Ht(),l}function Yt(){return Ht(),u}function Wt(){return Ht(),c}function Xt(){return Ht(),p}function Zt(){return Ht(),h}function Jt(){return Ht(),_}function Qt(){return Ht(),d}function te(){return Ht(),f}function ee(){return Ht(),m}function ne(){return Ht(),$}function ie(){se=this;var t,e=ue(),n=k(x(e.length),16),i=C(n);for(t=0;t!==e.length;++t){var o=e[t];i.put_xwzc9p$(o.code,o)}this.byCodeMap_0=i,this.UNEXPECTED_CONDITION=te()}qt.prototype=Object.create(v.prototype),qt.prototype.constructor=qt,Ae.prototype=Object.create(ht.prototype),Ae.prototype.constructor=Ae,Re.prototype=Object.create(v.prototype),Re.prototype.constructor=Re,dn.prototype=Object.create(_n.prototype),dn.prototype.constructor=dn,mn.prototype=Object.create(_n.prototype),mn.prototype.constructor=mn,yn.prototype=Object.create(_n.prototype),yn.prototype.constructor=yn,bn.prototype=Object.create(_n.prototype),bn.prototype.constructor=bn,wn.prototype=Object.create(_n.prototype),wn.prototype.constructor=wn,Object.defineProperty(Ut.prototype,"knownReason",{configurable:!0,get:function(){return le().byCode_mq22fl$(this.code)}}),Ut.prototype.toString=function(){var t;return"CloseReason(reason="+(null!=(t=this.knownReason)?t:this.code).toString()+", message="+this.message+")"},ie.prototype.byCode_mq22fl$=function(t){return this.byCodeMap_0.get_11rb$(t)},ie.$metadata$={kind:g,simpleName:"Companion",interfaces:[]};var oe,re,ae,se=null;function le(){return Ht(),null===se&&new ie,se}function ue(){return[Gt(),Kt(),Vt(),Yt(),Wt(),Xt(),Zt(),Jt(),Qt(),te(),ee(),ne()]}function ce(t,e,n){return n=n||Object.create(Ut.prototype),Ut.call(n,t.code,e),n}function pe(){}function he(t,e,n){xe(),this.raw_0=t,this.pinger_0=X(null),this.closeReasonRef_0=Z(),this.filtered_0=J(8),this.outgoingToBeProcessed_0=J(8),this.closed_0=Q(!1),this.context_0=et(this.raw_0.coroutineContext.get_j3r2sn$(tt.Key)),this._extensions_0=it(),this.started_0=Q(!1),this.coroutineContext_e1jcv0$_0=this.raw_0.coroutineContext.plus_1fupul$(this.context_0).plus_1fupul$(new N("ws-default")),this.pingIntervalMillis_3oq8ke$_0=e,this.timeoutMillis_jqpwcu$_0=n,this.closeReason_rkke7x$_0=this.closeReasonRef_0}function _e(t,e,n){I.call(this,n),this.exceptionState_0=1,this.$this=t,this.local$message=e}function de(t,e){I.call(this,e),this.exceptionState_0=1,this.$this=t}function fe(t,e,n,i,o){I.call(this,o),this.$controller=i,this.exceptionState_0=32,this.local$this$DefaultWebSocketSessionImpl=t,this.local$closure$ponger=e,this.local$last=void 0,this.local$closeFramePresented=void 0,this.local$$receiver=void 0,this.local$cause=void 0,this.local$tmp$=void 0,this.local$e=void 0,this.local$this$DefaultWebSocketSessionImpl_0=void 0,this.local$closure$ponger_0=void 0}function me(t,e,n,i){I.call(this,i),this.$controller=n,this.exceptionState_0=18,this.local$this$DefaultWebSocketSessionImpl=t}function $e(t,e){I.call(this,e),this.exceptionState_0=1,this.$this=t,this.local$tmp$=void 0,this.local$tmp$_0=void 0}function ye(t,e,n,i){I.call(this,i),this.exceptionState_0=7,this.$this=t,this.local$reasonToSend=void 0,this.local$reason=e,this.local$exception=n}function ge(t,e,n){I.call(this,n),this.exceptionState_0=1,this.local$this$DefaultWebSocketSessionImpl=t,this.local$it=e}function ve(t,e,n,i){I.call(this,i),this.exceptionState_0=1,this.$this=t,this.local$size=void 0,this.local$packet=e,this.local$frame=n}function be(){we=this,this.EmptyPong_0=new wn(new Int8Array(0),Ie())}qt.$metadata$={kind:b,simpleName:"Codes",interfaces:[v]},qt.values=ue,qt.valueOf_61zpoe$=function(t){switch(t){case"NORMAL":return Gt();case"GOING_AWAY":return Kt();case"PROTOCOL_ERROR":return Vt();case"CANNOT_ACCEPT":return Yt();case"CLOSED_ABNORMALLY":return Wt();case"NOT_CONSISTENT":return Xt();case"VIOLATED_POLICY":return Zt();case"TOO_BIG":return Jt();case"NO_EXTENSION":return Qt();case"INTERNAL_ERROR":return te();case"SERVICE_RESTART":return ee();case"TRY_AGAIN_LATER":return ne();default:w("No enum constant io.ktor.websocket.CloseReason.Codes."+t)}},Ut.$metadata$={kind:b,simpleName:"CloseReason",interfaces:[]},Ut.prototype.component1=function(){return this.code},Ut.prototype.component2=function(){return this.message},Ut.prototype.copy_qid81t$=function(t,e){return new Ut(void 0===t?this.code:t,void 0===e?this.message:e)},Ut.prototype.hashCode=function(){var t=0;return 31*(t=31*t+e.hashCode(this.code)|0)+e.hashCode(this.message)|0},Ut.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.code,t.code)&&e.equals(this.message,t.message)},pe.prototype.start_wwqcjq$=function(t,e){void 0===t&&(t=E()),e?e(t):this.start_wwqcjq$$default(t)},pe.$metadata$={kind:S,simpleName:"DefaultWebSocketSession",interfaces:[sn]},Object.defineProperty(he.prototype,"incoming",{configurable:!0,get:function(){return this.filtered_0}}),Object.defineProperty(he.prototype,"outgoing",{configurable:!0,get:function(){return this.outgoingToBeProcessed_0}}),Object.defineProperty(he.prototype,"extensions",{configurable:!0,get:function(){return this._extensions_0}}),Object.defineProperty(he.prototype,"coroutineContext",{configurable:!0,get:function(){return this.coroutineContext_e1jcv0$_0}}),Object.defineProperty(he.prototype,"masking",{configurable:!0,get:function(){return this.raw_0.masking},set:function(t){this.raw_0.masking=t}}),Object.defineProperty(he.prototype,"maxFrameSize",{configurable:!0,get:function(){return this.raw_0.maxFrameSize},set:function(t){this.raw_0.maxFrameSize=t}}),Object.defineProperty(he.prototype,"pingIntervalMillis",{configurable:!0,get:function(){return this.pingIntervalMillis_3oq8ke$_0},set:function(t){this.pingIntervalMillis_3oq8ke$_0=t,this.runOrCancelPinger_0()}}),Object.defineProperty(he.prototype,"timeoutMillis",{configurable:!0,get:function(){return this.timeoutMillis_jqpwcu$_0},set:function(t){this.timeoutMillis_jqpwcu$_0=t,this.runOrCancelPinger_0()}}),Object.defineProperty(he.prototype,"closeReason",{configurable:!0,get:function(){return this.closeReason_rkke7x$_0}}),he.prototype.start_wwqcjq$$default=function(t){if(!this.started_0.atomicfu$compareAndSet(!1,!0))throw ot("WebSocket session is already started.".toString());this._extensions_0.addAll_brywnq$(t),this.runOrCancelPinger_0(),this.runIncomingProcessor_0(Ye(this,this.outgoing)),this.runOutgoingProcessor_0()},_e.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[I]},_e.prototype=Object.create(I.prototype),_e.prototype.constructor=_e,_e.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(void 0===this.local$message&&(this.local$message="Server is going down"),this.state_0=2,this.result_0=this.$this.sendCloseSequence_0(ce(Kt(),this.local$message),void 0,this),this.result_0===P)return P;continue;case 1:throw this.exception_0;case 2:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},he.prototype.goingAway_61zpoe$=function(t,e,n){var i=new _e(this,t,e);return n?i:i.doResume(null)},de.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[I]},de.prototype=Object.create(I.prototype),de.prototype.constructor=de,de.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.$this.raw_0.flush(this),this.result_0===P)return P;continue;case 1:throw this.exception_0;case 2:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},he.prototype.flush=function(t,e){var n=new de(this,t);return e?n:n.doResume(null)},he.prototype.terminate=function(){this.context_0.cancel_x5z25k$(),A(this.raw_0)},fe.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[I]},fe.prototype=Object.create(I.prototype),fe.prototype.constructor=fe,fe.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;this.local$last={v:null},this.local$closeFramePresented={v:!1},this.exceptionState_0=2,this.local$$receiver=this.local$this$DefaultWebSocketSessionImpl.raw_0.incoming,this.local$cause=null,this.exceptionState_0=1,this.local$tmp$=this.local$$receiver.iterator(),this.state_0=11;continue;case 1:this.finallyPath_0=[2],this.exceptionState_0=26;var n=this.exception_0;throw e.isType(n,F)?(this.local$cause=n,n):n;case 2:this.finallyPath_0=[32],this.exceptionState_0=7;var i=this.exception_0;if(e.isType(i,B)){this.exceptionState_0=32,this.finallyPath_0=[5],this.state_0=7,this.$returnValue=j;continue}if(e.isType(i,F)){var o=i;this.local$closure$ponger.close_dbl4no$(),this.exceptionState_0=32,this.finallyPath_0=[3],this.state_0=7,this.$returnValue=this.local$this$DefaultWebSocketSessionImpl.filtered_0.close_dbl4no$(o);continue}throw i;case 3:case 5:case 28:return this.$returnValue;case 4:this.state_0=6;continue;case 6:this.finallyPath_0=[31],this.state_0=7;continue;case 7:if(this.exceptionState_0=32,this.local$closure$ponger.close_dbl4no$(),null!=(t=this.local$last.v)&&t.release(),this.local$this$DefaultWebSocketSessionImpl.filtered_0.close_dbl4no$(),this.local$closeFramePresented.v){this.state_0=30;continue}if(this.state_0=29,this.result_0=cn(this.local$this$DefaultWebSocketSessionImpl,ce(Wt(),"Connection was closed without close frame"),this),this.result_0===P)return P;continue;case 8:case 31:return;case 9:this.state_0=10;continue;case 10:this.state_0=11;continue;case 11:if(this.state_0=12,this.result_0=this.local$tmp$.hasNext(this),this.result_0===P)return P;continue;case 12:if(this.result_0){this.state_0=13;continue}this.state_0=25;continue;case 13:this.local$e=this.local$tmp$.next(),this.local$this$DefaultWebSocketSessionImpl_0=this.local$this$DefaultWebSocketSessionImpl,this.local$closure$ponger_0=this.local$closure$ponger,this.state_0=14;continue;case 14:var r,a,s,l;if(e.isType(this.local$e,yn)){if(this.local$this$DefaultWebSocketSessionImpl_0.outgoing.isClosedForSend){this.state_0=24;continue}if(this.state_0=23,this.result_0=this.local$this$DefaultWebSocketSessionImpl_0.outgoing.send_11rb$(gn(null!=(r=ke(this.local$e))?r:ae),this),this.result_0===P)return P;continue}if(e.isType(this.local$e,wn)){if(null!=(a=this.local$this$DefaultWebSocketSessionImpl_0.pinger_0.kotlinx$atomicfu$value)){if(this.state_0=20,this.result_0=a.send_11rb$(this.local$e,this),this.result_0===P)return P;continue}this.result_0=null,this.state_0=21;continue}if(e.isType(this.local$e,bn)){if(this.state_0=18,this.result_0=this.local$closure$ponger_0.send_11rb$(this.local$e,this),this.result_0===P)return P;continue}if(this.state_0=15,this.result_0=this.local$this$DefaultWebSocketSessionImpl_0.checkMaxFrameSize_0(this.local$last.v,this.local$e,this),this.result_0===P)return P;continue;case 15:if(this.local$e.fin){this.state_0=16;continue}null==this.local$last.v&&(this.local$last.v=new L),D(z(this.local$last.v),this.local$e.data),this.state_0=10;continue;case 16:var u;null!=(s=this.local$last.v)?(D(s,this.local$e.data),u=Cn().byType_da1xm4$(!0,this.local$e.frameType,M(s.build()),this.local$e.rsv1,this.local$e.rsv2,this.local$e.rsv3)):u=null;var c=null!=(l=u)?l:this.local$e;if(this.local$last.v=null,this.state_0=17,this.result_0=this.local$this$DefaultWebSocketSessionImpl_0.filtered_0.send_11rb$(this.local$this$DefaultWebSocketSessionImpl_0.processIncomingExtensions_0(c),this),this.result_0===P)return P;continue;case 17:case 18:this.state_0=19;continue;case 19:case 21:this.state_0=22;continue;case 20:this.result_0=j,this.state_0=21;continue;case 22:this.state_0=9;continue;case 23:this.state_0=24;continue;case 24:this.local$closeFramePresented.v=!0,this.exceptionState_0=32,this.finallyPath_0=[7,8],this.state_0=26;continue;case 25:this.exceptionState_0=2,this.finallyPath_0=[27],this.state_0=26;continue;case 26:this.exceptionState_0=2,rt(this.local$$receiver,this.local$cause),this.state_0=this.finallyPath_0.shift();continue;case 27:this.result_0=j,this.exceptionState_0=32,this.finallyPath_0=[28],this.state_0=7,this.$returnValue=this.result_0;continue;case 29:this.state_0=30;continue;case 30:this.state_0=this.finallyPath_0.shift();continue;case 32:throw this.exception_0;default:throw this.state_0=32,new Error("State Machine Unreachable execution")}}catch(t){if(32===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},he.prototype.runIncomingProcessor_0=function(t){return U(this,oe.plus_1fupul$(R.Dispatchers.Unconfined),void 0,(e=this,n=t,function(t,i,o){var r=new fe(e,n,t,this,i);return o?r:r.doResume(null)}));var e,n},me.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[I]},me.prototype=Object.create(I.prototype),me.prototype.constructor=me,me.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.exceptionState_0=3,this.state_0=1,this.result_0=this.local$this$DefaultWebSocketSessionImpl.outgoingProcessorLoop_0(this),this.result_0===P)return P;continue;case 1:this.exceptionState_0=18,this.finallyPath_0=[2],this.state_0=15,this.$returnValue=this.result_0;continue;case 2:case 5:case 7:case 9:case 11:case 13:return this.$returnValue;case 3:this.finallyPath_0=[18],this.exceptionState_0=15;var t=this.exception_0;if(e.isType(t,B)){this.exceptionState_0=18,this.finallyPath_0=[13],this.state_0=15,this.$returnValue=j;continue}if(e.isType(t,H)){this.exceptionState_0=18,this.finallyPath_0=[11],this.state_0=15,this.$returnValue=j;continue}if(e.isType(t,G)){this.exceptionState_0=18,this.finallyPath_0=[9],this.state_0=15,this.$returnValue=j;continue}if(e.isType(t,K)){this.exceptionState_0=18,this.finallyPath_0=[7],this.state_0=15,this.$returnValue=j;continue}if(e.isType(t,F)){var n=t;if(this.local$this$DefaultWebSocketSessionImpl.outgoingToBeProcessed_0.cancel_x5z25k$(V("Failed to send frame",n)),this.state_0=4,this.result_0=hn(this.local$this$DefaultWebSocketSessionImpl.raw_0,n,this),this.result_0===P)return P;continue}throw t;case 4:this.exceptionState_0=18,this.finallyPath_0=[5],this.state_0=15,this.$returnValue=this.result_0;continue;case 6:this.state_0=8;continue;case 8:this.state_0=10;continue;case 10:this.state_0=12;continue;case 12:this.state_0=14;continue;case 14:this.finallyPath_0=[17],this.state_0=15;continue;case 15:if(this.exceptionState_0=18,this.local$this$DefaultWebSocketSessionImpl.outgoingToBeProcessed_0.cancel_x5z25k$(),this.state_0=16,this.result_0=cn(this.local$this$DefaultWebSocketSessionImpl.raw_0,void 0,this),this.result_0===P)return P;continue;case 16:this.state_0=this.finallyPath_0.shift();continue;case 17:return;case 18:throw this.exception_0;default:throw this.state_0=18,new Error("State Machine Unreachable execution")}}catch(t){if(18===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},he.prototype.runOutgoingProcessor_0=function(){return U(this,re.plus_1fupul$(R.Dispatchers.Unconfined),q.UNDISPATCHED,(t=this,function(e,n,i){var o=new me(t,e,this,n);return i?o:o.doResume(null)}));var t},$e.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[I]},$e.prototype=Object.create(I.prototype),$e.prototype.constructor=$e,$e.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.local$tmp$=this.$this.outgoingToBeProcessed_0.iterator(),this.state_0=2;continue;case 1:throw this.exception_0;case 2:if(this.state_0=3,this.result_0=this.local$tmp$.hasNext(this),this.result_0===P)return P;continue;case 3:if(this.result_0){this.state_0=4;continue}this.state_0=8;continue;case 4:var t=this.local$tmp$.next();if(e.isType(t,yn)){if(this.state_0=5,this.result_0=this.$this.sendCloseSequence_0(ke(t),void 0,this),this.result_0===P)return P;continue}e.isType(t,mn)||e.isType(t,dn)?this.local$tmp$_0=this.$this.processOutgoingExtensions_0(t):this.local$tmp$_0=t,this.state_0=6;continue;case 5:this.state_0=8;continue;case 6:var n=this.local$tmp$_0;if(this.state_0=7,this.result_0=this.$this.raw_0.outgoing.send_11rb$(n,this),this.result_0===P)return P;continue;case 7:this.state_0=2;continue;case 8:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},he.prototype.outgoingProcessorLoop_0=function(t,e){var n=new $e(this,t);return e?n:n.doResume(null)},ye.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[I]},ye.prototype=Object.create(I.prototype),ye.prototype.constructor=ye,ye.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(void 0===this.local$exception&&(this.local$exception=null),this.$this.tryClose_0()){this.state_0=1;continue}return;case 1:if(this.$this.context_0.complete(),this.local$reasonToSend=null!=this.local$reason?this.local$reason:ce(Gt(),""),this.exceptionState_0=5,this.$this.runOrCancelPinger_0(),this.local$reasonToSend.code!==Wt().code){if(this.state_0=2,this.result_0=this.$this.raw_0.outgoing.send_11rb$(gn(this.local$reasonToSend),this),this.result_0===P)return P;continue}this.state_0=3;continue;case 2:this.state_0=3;continue;case 3:this.exceptionState_0=7,this.finallyPath_0=[4],this.state_0=6;continue;case 4:return;case 5:this.finallyPath_0=[7],this.state_0=6;continue;case 6:this.exceptionState_0=7,this.$this.closeReasonRef_0.complete_11rb$(this.local$reasonToSend),null!=this.local$exception&&(this.$this.outgoingToBeProcessed_0.close_dbl4no$(this.local$exception),this.$this.filtered_0.close_dbl4no$(this.local$exception)),this.state_0=this.finallyPath_0.shift();continue;case 7:throw this.exception_0;default:throw this.state_0=7,new Error("State Machine Unreachable execution")}}catch(t){if(7===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},he.prototype.sendCloseSequence_0=function(t,e,n,i){var o=new ye(this,t,e,n);return i?o:o.doResume(null)},he.prototype.tryClose_0=function(){return this.closed_0.atomicfu$compareAndSet(!1,!0)},ge.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[I]},ge.prototype=Object.create(I.prototype),ge.prototype.constructor=ge,ge.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=this.local$this$DefaultWebSocketSessionImpl.sendCloseSequence_0(this.local$it,Y("Ping timeout"),this),this.result_0===P)return P;continue;case 1:throw this.exception_0;case 2:return this.result_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},he.prototype.runOrCancelPinger_0=function(){var t,e,n,i=this.pingIntervalMillis,o=this.closed_0.kotlinx$atomicfu$value?null:i.compareTo_11rb$(W)>0?tn(this,this.raw_0.outgoing,i,this.timeoutMillis,(n=this,function(t,e,i){var o=new ge(n,t,e);return i?o:o.doResume(null)})):null;null!=(t=this.pinger_0.atomicfu$getAndSet(o))&&t.close_dbl4no$(),null!=(e=null!=o?o.trySend_11rb$(xe().EmptyPong_0):null)&&e.isSuccess,this.closed_0.kotlinx$atomicfu$value&&null!=o&&this.runOrCancelPinger_0()},ve.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[I]},ve.prototype=Object.create(I.prototype),ve.prototype.constructor=ve,ve.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;if(this.local$size=this.local$frame.data.length+(null!=(t=null!=this.local$packet?this.local$packet.size:null)?t:0)|0,this.local$size>this.$this.maxFrameSize.toNumber()){if(null!=this.local$packet&&this.local$packet.release(),this.state_0=2,this.result_0=cn(this.$this,ce(Jt(),"Frame is too big: "+this.local$size+". Max size is "+this.$this.maxFrameSize.toString()),this),this.result_0===P)return P;continue}this.state_0=3;continue;case 1:throw this.exception_0;case 2:throw new Ae(e.Long.fromInt(this.local$size));case 3:return;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},he.prototype.checkMaxFrameSize_0=function(t,e,n,i){var o=new ve(this,t,e,n);return i?o:o.doResume(null)},he.prototype.processIncomingExtensions_0=function(t){var e,n=t;for(e=this.extensions.iterator();e.hasNext();)n=e.next().processIncomingFrame_q1ubw4$(n);return n},he.prototype.processOutgoingExtensions_0=function(t){var e,n=t;for(e=this.extensions.iterator();e.hasNext();)n=e.next().processOutgoingFrame_q1ubw4$(n);return n},be.$metadata$={kind:g,simpleName:"Companion",interfaces:[]};var we=null;function xe(){return null===we&&new be,we}function ke(t){if(t.data.length<2)return null;var n,i=new L;try{D(i,t.data),n=i.build()}catch(t){throw e.isType(t,F)?(i.release(),t):t}var o=n;return new Ut(lt(o),o.readText_vux9f0$())}function Ce(){Pe=this}he.$metadata$={kind:b,simpleName:"DefaultWebSocketSessionImpl",interfaces:[pe,sn]},Ce.prototype.dispose=function(){},Ce.prototype.toString=function(){return"NonDisposableHandle"},Ce.$metadata$={kind:g,simpleName:"NonDisposableHandle",interfaces:[ut]};var Ee,Se,Te,Oe,Ne,Pe=null;function Ie(){return null===Pe&&new Ce,Pe}function Ae(t){pt(this),this.frameSize=t,this.name="FrameTooBigException"}function Re(t,e,n,i){v.call(this),this.controlFrame=n,this.opcode=i,this.name$=t,this.ordinal$=e}function je(){je=function(){},Ee=new Re("TEXT",0,!1,1),Se=new Re("BINARY",1,!1,2),Te=new Re("CLOSE",2,!0,8),Oe=new Re("PING",3,!0,9),Ne=new Re("PONG",4,!0,10),Ge()}function Le(){return je(),Ee}function ze(){return je(),Se}function De(){return je(),Te}function Me(){return je(),Oe}function Be(){return je(),Ne}function Fe(){He=this;var t,n=Ke();t:do{if(0===n.length){t=null;break t}var i=n[0],o=dt(n);if(0===o){t=i;break t}for(var r=i.opcode,a=1;a<=o;a++){var s=n[a],l=s.opcode;e.compareTo(r,l)<0&&(i=s,r=l)}t=i}while(0);this.maxOpcode_0=z(t).opcode;var u,c=ft(this.maxOpcode_0+1|0);u=c.length-1|0;for(var p=0;p<=u;p++){var h,_=Ke();t:do{var d,f=null,m=!1;for(d=0;d!==_.length;++d){var $=_[d];if($.opcode===p){if(m){h=null;break t}f=$,m=!0}}if(!m){h=null;break t}h=f}while(0);c[p]=h}this.byOpcodeArray_0=c}Object.defineProperty(Ae.prototype,"message",{configurable:!0,get:function(){return"Frame is too big: "+this.frameSize.toString()}}),Ae.prototype.createCopy=function(){var t=new Ae(this.frameSize);return ct(t,this),t},Ae.$metadata$={kind:b,simpleName:"FrameTooBigException",interfaces:[_t,ht]},Fe.prototype.get_za3lpa$=function(t){var e;return e=this.maxOpcode_0,0<=t&&t<=e?this.byOpcodeArray_0[t]:null},Fe.$metadata$={kind:g,simpleName:"Companion",interfaces:[]};var Ue,qe,He=null;function Ge(){return je(),null===He&&new Fe,He}function Ke(){return[Le(),ze(),De(),Me(),Be()]}function Ve(t,e,n,i,o){I.call(this,o),this.$controller=i,this.exceptionState_0=12,this.local$closure$channel=t,this.local$closure$outgoing=e,this.local$$receiver=void 0,this.local$cause=void 0,this.local$tmp$=void 0}function Ye(t,e){var n,i,o=J(5);return U(t,Ue,void 0,(n=o,i=e,function(t,e,o){var r=new Ve(n,i,t,this,e);return o?r:r.doResume(null)})),o}function We(t,e,n,i){I.call(this,i),this.$controller=n,this.exceptionState_0=1,this.local$closure$channel=t}function Xe(t){return function(e,n,i){var o=new We(t,e,this,n);return i?o:o.doResume(null)}}function Ze(t,e,n,i,o,r){I.call(this,r),this.$controller=o,this.exceptionState_0=1,this.local$closure$outgoing=t,this.local$closure$pingMessage=e,this.local$closure$channel=n}function Je(t,e,n){return function(i,o,r){var a=new Ze(t,e,n,i,this,o);return r?a:a.doResume(null)}}function Qe(t,e,n,i,o,r,a,s){I.call(this,s),this.$controller=a,this.exceptionState_0=12,this.local$closure$periodMillis=t,this.local$closure$channel=e,this.local$closure$timeoutMillis=n,this.local$closure$outgoing=i,this.local$closure$onTimeout=o,this.local$random=void 0,this.local$pingIdBytes=void 0}function tn(t,e,n,i,o){var r,a,s,l,u,c,p=et(),h=J(2147483647);return U(t,p.plus_1fupul$(qe),void 0,(a=n,s=h,l=i,u=e,c=o,function(t,e,n){var i=new Qe(a,s,l,u,c,t,this,e);return n?i:i.doResume(null)})),z(t.coroutineContext.get_j3r2sn$(tt.Key)).invokeOnCompletion_f05bi3$((r=p,function(t){return r.cancel_x5z25k$(),j})),h}function en(t,e,n,i,o){void 0===n&&(n=kt),void 0===i&&(i=!1),this.input_0=t,this.output_0=e,this.maxFrameSize_bk9yz7$_0=n,this.masking_w8hg6f$_0=i,this.socketJob_0=et(o.get_j3r2sn$(tt.Key)),this._incoming_0=J(8),this._outgoing_0=J(8),this.lastOpcode_0=0,this.coroutineContext_2cg00w$_0=o.plus_1fupul$(this.socketJob_0).plus_1fupul$(new N("raw-ws")),this.writerJob_0=U(this,new N("ws-writer"),q.ATOMIC,RawWebSocketCommon$writerJob$lambda(this)),this.readerJob_0=U(this,new N("ws-reader"),q.ATOMIC,RawWebSocketCommon$readerJob$lambda(this)),this.socketJob_0.complete()}function nn(){this.installers_0=it(),this.rcv_0=[!1,!1,!1]}function on(t){return j}function rn(t,e){this.name=t,this.parameters=e}function an(t){var e=Tt(t,61);if(e<0)return Ot(t,"");var n,i=Pt(t,Nt(0,e));if((e+1|0)0?n.children().get_za3lpa$(i-1|0):null},Ut.prototype.firstLeaf_gv3x1o$=function(t){var e;if(null==(e=t.firstChild()))return t;var n=e;return this.firstLeaf_gv3x1o$(n)},Ut.prototype.lastLeaf_gv3x1o$=function(t){var e;if(null==(e=t.lastChild()))return t;var n=e;return this.lastLeaf_gv3x1o$(n)},Ut.prototype.nextLeaf_gv3x1o$=function(t){return this.nextLeaf_yd3t6i$(t,null)},Ut.prototype.nextLeaf_yd3t6i$=function(t,e){for(var n=t;;){var i=n.nextSibling();if(null!=i)return this.firstLeaf_gv3x1o$(i);if(this.isNonCompositeChild_gv3x1o$(n))return null;var o=n.parent;if(o===e)return null;n=d(o)}},Ut.prototype.prevLeaf_gv3x1o$=function(t){return this.prevLeaf_yd3t6i$(t,null)},Ut.prototype.prevLeaf_yd3t6i$=function(t,e){for(var n=t;;){var i=n.prevSibling();if(null!=i)return this.lastLeaf_gv3x1o$(i);if(this.isNonCompositeChild_gv3x1o$(n))return null;var o=n.parent;if(o===e)return null;n=d(o)}},Ut.prototype.root_2jhxsk$=function(t){for(var e=t;;){if(null==e.parent)return e;e=d(e.parent)}},Ut.prototype.ancestorsFrom_2jhxsk$=function(t){return this.iterateFrom_0(t,qt)},Ut.prototype.ancestors_2jhxsk$=function(t){return this.iterate_e5aqdj$(t,Ht)},Ut.prototype.nextLeaves_gv3x1o$=function(t){return this.iterate_e5aqdj$(t,(e=this,function(t){return e.nextLeaf_gv3x1o$(t)}));var e},Ut.prototype.prevLeaves_gv3x1o$=function(t){return this.iterate_e5aqdj$(t,(e=this,function(t){return e.prevLeaf_gv3x1o$(t)}));var e},Ut.prototype.nextNavOrder_gv3x1o$=function(t){return this.iterate_e5aqdj$(t,(e=t,n=this,function(t){return n.nextNavOrder_0(e,t)}));var e,n},Ut.prototype.prevNavOrder_gv3x1o$=function(t){return this.iterate_e5aqdj$(t,(e=t,n=this,function(t){return n.prevNavOrder_0(e,t)}));var e,n},Ut.prototype.nextNavOrder_0=function(t,e){var n=e.nextSibling();if(null!=n)return this.firstLeaf_gv3x1o$(n);if(this.isNonCompositeChild_gv3x1o$(e))return null;var i=e.parent;return this.isDescendant_5jhjy8$(i,t)?this.nextNavOrder_0(t,d(i)):i},Ut.prototype.prevNavOrder_0=function(t,e){var n=e.prevSibling();if(null!=n)return this.lastLeaf_gv3x1o$(n);if(this.isNonCompositeChild_gv3x1o$(e))return null;var i=e.parent;return this.isDescendant_5jhjy8$(i,t)?this.prevNavOrder_0(t,d(i)):i},Ut.prototype.isBefore_yd3t6i$=function(t,e){if(t===e)return!1;var n=this.reverseAncestors_0(t),i=this.reverseAncestors_0(e);if(n.get_za3lpa$(0)!==i.get_za3lpa$(0))throw x("Items are in different trees");for(var o=n.size,r=i.size,a=N.min(o,r),s=1;s0}throw x("One parameter is an ancestor of the other")},Ut.prototype.deltaBetween_b8q44p$=function(t,e){for(var n=t,i=t,o=0;;){if(n===e)return 0|-o;if(i===e)return o;if(o=o+1|0,null==n&&null==i)throw $("Both left and right are null");null!=n&&(n=n.prevSibling()),null!=i&&(i=i.nextSibling())}},Ut.prototype.commonAncestor_pd1sey$=function(t,e){var n,i;if(t===e)return t;if(this.isDescendant_5jhjy8$(t,e))return t;if(this.isDescendant_5jhjy8$(e,t))return e;var o=v(),r=v();for(n=this.ancestorsFrom_2jhxsk$(t).iterator();n.hasNext();){var a=n.next();o.add_11rb$(a)}for(i=this.ancestorsFrom_2jhxsk$(e).iterator();i.hasNext();){var s=i.next();r.add_11rb$(s)}if(o.isEmpty()||r.isEmpty())return null;do{var l=o.removeAt_za3lpa$(o.size-1|0);if(l!==r.removeAt_za3lpa$(r.size-1|0))return l.parent;var u=!o.isEmpty();u&&(u=!r.isEmpty())}while(u);return null},Ut.prototype.getClosestAncestor_hpi6l0$=function(t,e,n){var i;for(i=(e?this.ancestorsFrom_2jhxsk$(t):this.ancestors_2jhxsk$(t)).iterator();i.hasNext();){var o=i.next();if(n(o))return o}return null},Ut.prototype.isDescendant_5jhjy8$=function(t,e){return null!=this.getClosestAncestor_hpi6l0$(e,!0,k.Functions.same_tpy1pm$(t))},Ut.prototype.reverseAncestors_0=function(t){var e=v();return this.collectReverseAncestors_0(t,e),e},Ut.prototype.collectReverseAncestors_0=function(t,e){var n=t.parent;null!=n&&this.collectReverseAncestors_0(n,e),e.add_11rb$(t)},Ut.prototype.toList_qkgd1o$=function(t){var e,n=v();for(e=t.iterator();e.hasNext();){var i=e.next();n.add_11rb$(i)}return n},Ut.prototype.isLastChild_ofc81$=function(t){var e,n;if(null==(e=t.parent))return!1;var i=e.children(),o=i.indexOf_11rb$(t);for(n=i.subList_vux9f0$(o+1|0,i.size).iterator();n.hasNext();)if(n.next().visible().get())return!1;return!0},Ut.prototype.isFirstChild_ofc81$=function(t){var e,n;if(null==(e=t.parent))return!1;var i=e.children(),o=i.indexOf_11rb$(t);for(n=i.subList_vux9f0$(0,o).iterator();n.hasNext();)if(n.next().visible().get())return!1;return!0},Ut.prototype.firstFocusable_ghk449$=function(t){return this.firstFocusable_eny5bg$(t,!0)},Ut.prototype.firstFocusable_eny5bg$=function(t,e){var n;for(n=t.children().iterator();n.hasNext();){var i=n.next();if(i.visible().get()){if(!e&&i.focusable().get())return i;var o=this.firstFocusable_ghk449$(i);if(null!=o)return o}}return t.focusable().get()?t:null},Ut.prototype.lastFocusable_ghk449$=function(t){return this.lastFocusable_eny5bg$(t,!0)},Ut.prototype.lastFocusable_eny5bg$=function(t,e){var n,i=t.children();for(n=E(C(i)).iterator();n.hasNext();){var o=n.next(),r=i.get_za3lpa$(o);if(r.visible().get()){if(!e&&r.focusable().get())return r;var a=this.lastFocusable_eny5bg$(r,e);if(null!=a)return a}}return t.focusable().get()?t:null},Ut.prototype.isVisible_vv2w6c$=function(t){return null==this.getClosestAncestor_hpi6l0$(t,!0,Gt)},Ut.prototype.focusableParent_2xdot8$=function(t){return this.focusableParent_ce34rj$(t,!1)},Ut.prototype.focusableParent_ce34rj$=function(t,e){return this.getClosestAncestor_hpi6l0$(t,e,Kt)},Ut.prototype.isFocusable_c3v93w$=function(t){return t.focusable().get()&&this.isVisible_vv2w6c$(t)},Ut.prototype.next_c8h0sn$=function(t,e){var n;for(n=this.nextNavOrder_gv3x1o$(t).iterator();n.hasNext();){var i=n.next();if(e(i))return i}return null},Ut.prototype.prev_c8h0sn$=function(t,e){var n;for(n=this.prevNavOrder_gv3x1o$(t).iterator();n.hasNext();){var i=n.next();if(e(i))return i}return null},Ut.prototype.nextFocusable_l3p44k$=function(t){var e;for(e=this.nextNavOrder_gv3x1o$(t).iterator();e.hasNext();){var n=e.next();if(this.isFocusable_c3v93w$(n))return n}return null},Ut.prototype.prevFocusable_l3p44k$=function(t){var e;for(e=this.prevNavOrder_gv3x1o$(t).iterator();e.hasNext();){var n=e.next();if(this.isFocusable_c3v93w$(n))return n}return null},Ut.prototype.iterate_e5aqdj$=function(t,e){return this.iterateFrom_0(e(t),e)},Yt.prototype.hasNext=function(){return null!=this.myCurrent_0},Yt.prototype.next=function(){if(null==this.myCurrent_0)throw S();var t=this.myCurrent_0;return this.myCurrent_0=this.closure$trans(d(t)),t},Yt.$metadata$={kind:c,interfaces:[T]},Vt.prototype.iterator=function(){return new Yt(this.closure$trans,this.closure$initial)},Vt.$metadata$={kind:c,interfaces:[O]},Ut.prototype.iterateFrom_0=function(t,e){return new Vt(e,t)},Ut.prototype.allBetween_yd3t6i$=function(t,e){var n=v();return e!==t&&this.includeClosed_0(t,e,n),n},Ut.prototype.includeClosed_0=function(t,e,n){for(var i=t.nextSibling();null!=i;){if(this.includeOpen_0(i,e,n))return;i=i.nextSibling()}if(null==t.parent)throw x("Right bound not found in left's bound hierarchy. to="+e);this.includeClosed_0(d(t.parent),e,n)},Ut.prototype.includeOpen_0=function(t,e,n){var i;if(t===e)return!0;for(i=t.children().iterator();i.hasNext();){var o=i.next();if(this.includeOpen_0(o,e,n))return!0}return n.add_11rb$(t),!1},Ut.prototype.isAbove_k112ux$=function(t,e){return this.ourWithBounds_0.isAbove_k112ux$(t,e)},Ut.prototype.isBelow_k112ux$=function(t,e){return this.ourWithBounds_0.isBelow_k112ux$(t,e)},Ut.prototype.homeElement_mgqo3l$=function(t){return this.ourWithBounds_0.homeElement_mgqo3l$(t)},Ut.prototype.endElement_mgqo3l$=function(t){return this.ourWithBounds_0.endElement_mgqo3l$(t)},Ut.prototype.upperFocusable_8i9rgd$=function(t,e){return this.ourWithBounds_0.upperFocusable_8i9rgd$(t,e)},Ut.prototype.lowerFocusable_8i9rgd$=function(t,e){return this.ourWithBounds_0.lowerFocusable_8i9rgd$(t,e)},Ut.$metadata$={kind:f,simpleName:"Composites",interfaces:[]};var Wt=null;function Xt(){return null===Wt&&new Ut,Wt}function Zt(t){this.myThreshold_0=t}function Jt(t,e){this.$outer=t,this.myInitial_0=e,this.myFirstFocusableAbove_0=null,this.myFirstFocusableAbove_0=this.firstFocusableAbove_0(this.myInitial_0)}function Qt(t,e){this.$outer=t,this.myInitial_0=e,this.myFirstFocusableBelow_0=null,this.myFirstFocusableBelow_0=this.firstFocusableBelow_0(this.myInitial_0)}function te(){}function ee(){ne=this}Zt.prototype.isAbove_k112ux$=function(t,e){var n=d(t).bounds,i=d(e).bounds;return(n.origin.y+n.dimension.y-this.myThreshold_0|0)<=i.origin.y},Zt.prototype.isBelow_k112ux$=function(t,e){return this.isAbove_k112ux$(e,t)},Zt.prototype.homeElement_mgqo3l$=function(t){for(var e=t;;){var n=Xt().prevFocusable_l3p44k$(e);if(null==n||this.isAbove_k112ux$(n,t))return e;e=n}},Zt.prototype.endElement_mgqo3l$=function(t){for(var e=t;;){var n=Xt().nextFocusable_l3p44k$(e);if(null==n||this.isBelow_k112ux$(n,t))return e;e=n}},Zt.prototype.upperFocusables_mgqo3l$=function(t){var e,n=new Jt(this,t);return Xt().iterate_e5aqdj$(t,(e=n,function(t){return e.apply_11rb$(t)}))},Zt.prototype.lowerFocusables_mgqo3l$=function(t){var e,n=new Qt(this,t);return Xt().iterate_e5aqdj$(t,(e=n,function(t){return e.apply_11rb$(t)}))},Zt.prototype.upperFocusable_8i9rgd$=function(t,e){for(var n=Xt().prevFocusable_l3p44k$(t),i=null;null!=n&&(null==i||!this.isAbove_k112ux$(n,i));)null!=i?this.distanceTo_nr7zox$(i,e)>this.distanceTo_nr7zox$(n,e)&&(i=n):this.isAbove_k112ux$(n,t)&&(i=n),n=Xt().prevFocusable_l3p44k$(n);return i},Zt.prototype.lowerFocusable_8i9rgd$=function(t,e){for(var n=Xt().nextFocusable_l3p44k$(t),i=null;null!=n&&(null==i||!this.isBelow_k112ux$(n,i));)null!=i?this.distanceTo_nr7zox$(i,e)>this.distanceTo_nr7zox$(n,e)&&(i=n):this.isBelow_k112ux$(n,t)&&(i=n),n=Xt().nextFocusable_l3p44k$(n);return i},Zt.prototype.distanceTo_nr7zox$=function(t,e){var n=t.bounds;return n.distance_119tl4$(new P(e,n.origin.y))},Jt.prototype.firstFocusableAbove_0=function(t){for(var e=Xt().prevFocusable_l3p44k$(t);null!=e&&!this.$outer.isAbove_k112ux$(e,t);)e=Xt().prevFocusable_l3p44k$(e);return e},Jt.prototype.apply_11rb$=function(t){if(t===this.myInitial_0)return this.myFirstFocusableAbove_0;var e=Xt().prevFocusable_l3p44k$(t);return null==e||this.$outer.isAbove_k112ux$(e,this.myFirstFocusableAbove_0)?null:e},Jt.$metadata$={kind:c,simpleName:"NextUpperFocusable",interfaces:[I]},Qt.prototype.firstFocusableBelow_0=function(t){for(var e=Xt().nextFocusable_l3p44k$(t);null!=e&&!this.$outer.isBelow_k112ux$(e,t);)e=Xt().nextFocusable_l3p44k$(e);return e},Qt.prototype.apply_11rb$=function(t){if(t===this.myInitial_0)return this.myFirstFocusableBelow_0;var e=Xt().nextFocusable_l3p44k$(t);return null==e||this.$outer.isBelow_k112ux$(e,this.myFirstFocusableBelow_0)?null:e},Qt.$metadata$={kind:c,simpleName:"NextLowerFocusable",interfaces:[I]},Zt.$metadata$={kind:c,simpleName:"CompositesWithBounds",interfaces:[]},te.$metadata$={kind:o,simpleName:"HasParent",interfaces:[]},ee.prototype.decode_fqrh44$=function(t){return A(t)},ee.$metadata$={kind:f,simpleName:"TextDecoder",interfaces:[]};var ne=null;function ie(){G.call(this),this.myListeners_xjxep$_0=null}function oe(t){this.closure$item=t}function re(t,e){this.closure$iterator=t,this.this$AbstractObservableSet=e,this.myCanRemove_0=!1,this.myLastReturned_0=null}function ae(t){this.closure$item=t}function se(t){this.closure$handler=t,M.call(this)}function le(){ie.call(this),this.mySet_fvkh6y$_0=null}function ue(){}function ce(){this.myListeners_0=new g}function pe(t){this.closure$event=t}function he(t){Z.call(this),this.myValue_uehepj$_0=t,this.myHandlers_e7gyn7$_0=null}function _e(t){this.closure$event=t}function de(t){this.this$BaseDerivedProperty=t,g.call(this)}function fe(t,e){he.call(this,t);var n,i=J(e.length);n=i.length-1|0;for(var o=0;o<=n;o++)i[o]=e[o];this.myDeps_nbedfd$_0=i,this.myRegistrations_3svoxv$_0=null}function me(t){this.this$DerivedProperty=t}function $e(){ln=this,this.TRUE=this.constant_mh5how$(!0),this.FALSE=this.constant_mh5how$(!1)}function ye(t){return null==t?null:!t}function ge(t){return null!=t}function ve(t){return null==t}function be(t,e,n,i){this.closure$string=t,this.closure$prefix=e,fe.call(this,n,i)}function we(t,e,n){this.closure$prop=t,fe.call(this,e,n)}function xe(t,e,n,i){this.closure$op1=t,this.closure$op2=e,fe.call(this,n,i)}function ke(t,e,n,i){this.closure$op1=t,this.closure$op2=e,fe.call(this,n,i)}function Ce(t,e,n,i){this.closure$p1=t,this.closure$p2=e,fe.call(this,n,i)}function Ee(t,e,n){this.closure$source=t,this.closure$nullValue=e,this.closure$fun=n}function Se(t,e,n,i){this.closure$source=t,this.closure$fun=e,this.closure$calc=n,he.call(this,i),this.myTargetProperty_0=null,this.mySourceRegistration_0=null,this.myTargetRegistration_0=null}function Te(t){this.this$=t}function Oe(t,e,n,i){this.this$=t,this.closure$source=e,this.closure$fun=n,this.closure$targetHandler=i}function Ne(t,e){this.closure$source=t,this.closure$fun=e}function Pe(t,e,n){this.closure$source=t,this.closure$fun=e,this.closure$calc=n,he.call(this,n.get()),this.myTargetProperty_0=null,this.mySourceRegistration_0=null,this.myTargetRegistration_0=null}function Ie(t){this.this$MyProperty=t}function Ae(t,e,n,i){this.this$MyProperty=t,this.closure$source=e,this.closure$fun=n,this.closure$targetHandler=i}function Re(t,e){this.closure$prop=t,this.closure$selector=e}function je(t,e,n,i){this.closure$esReg=t,this.closure$prop=e,this.closure$selector=n,this.closure$handler=i}function Le(t){this.closure$update=t}function ze(t,e){this.closure$propReg=t,this.closure$esReg=e,s.call(this)}function De(t,e,n,i){this.closure$p1=t,this.closure$p2=e,fe.call(this,n,i)}function Me(t,e,n,i){this.closure$prop=t,this.closure$f=e,fe.call(this,n,i)}function Be(t,e,n){this.closure$prop=t,this.closure$sToT=e,this.closure$tToS=n}function Fe(t,e){this.closure$sToT=t,this.closure$handler=e}function Ue(t){this.closure$value=t,Z.call(this)}function qe(t,e,n){this.closure$collection=t,cn.call(this,e,n)}function He(t,e,n){this.closure$collection=t,cn.call(this,e,n)}function Ge(t,e){this.closure$collection=t,he.call(this,e),this.myCollectionRegistration_0=null}function Ke(t){this.this$=t}function Ve(t){this.closure$r=t,M.call(this)}function Ye(t,e,n,i,o){this.closure$cond=t,this.closure$ifTrue=e,this.closure$ifFalse=n,fe.call(this,i,o)}function We(t,e,n){this.closure$cond=t,this.closure$ifTrue=e,this.closure$ifFalse=n}function Xe(t,e,n,i){this.closure$prop=t,this.closure$ifNull=e,fe.call(this,n,i)}function Ze(t,e,n){this.closure$values=t,fe.call(this,e,n)}function Je(t,e,n,i){this.closure$source=t,this.closure$validator=e,fe.call(this,n,i)}function Qe(t,e){this.closure$source=t,this.closure$validator=e,fe.call(this,null,[t]),this.myLastValid_0=null}function tn(t,e,n,i){this.closure$p=t,this.closure$nullValue=e,fe.call(this,n,i)}function en(t,e){this.closure$read=t,this.closure$write=e}function nn(t){this.closure$props=t}function on(t){this.closure$coll=t}function rn(t,e){this.closure$coll=t,this.closure$handler=e,M.call(this)}function an(t,e,n){this.closure$props=t,fe.call(this,e,n)}function sn(t,e,n){this.closure$props=t,fe.call(this,e,n)}ie.prototype.addListener_n5no9j$=function(t){return null==this.myListeners_xjxep$_0&&(this.myListeners_xjxep$_0=new g),d(this.myListeners_xjxep$_0).add_11rb$(t)},ie.prototype.add_11rb$=function(t){if(this.contains_11rb$(t))return!1;this.doBeforeAdd_zcqj2i$_0(t);var e=!1;try{this.onItemAdd_11rb$(t),e=this.doAdd_11rb$(t)}finally{this.doAfterAdd_yxsu9c$_0(t,e)}return e},ie.prototype.doBeforeAdd_zcqj2i$_0=function(t){this.checkAdd_11rb$(t),this.beforeItemAdded_11rb$(t)},oe.prototype.call_11rb$=function(t){t.onItemAdded_u8tacu$(new q(null,this.closure$item,-1,U.ADD))},oe.$metadata$={kind:c,interfaces:[y]},ie.prototype.doAfterAdd_yxsu9c$_0=function(t,e){try{e&&null!=this.myListeners_xjxep$_0&&d(this.myListeners_xjxep$_0).fire_kucmxw$(new oe(t))}finally{this.afterItemAdded_iuyhfk$(t,e)}},ie.prototype.remove_11rb$=function(t){if(!this.contains_11rb$(t))return!1;this.doBeforeRemove_u15i8b$_0(t);var e=!1;try{this.onItemRemove_11rb$(t),e=this.doRemove_11rb$(t)}finally{this.doAfterRemove_xembz3$_0(t,e)}return e},re.prototype.hasNext=function(){return this.closure$iterator.hasNext()},re.prototype.next=function(){return this.myLastReturned_0=this.closure$iterator.next(),this.myCanRemove_0=!0,d(this.myLastReturned_0)},re.prototype.remove=function(){if(!this.myCanRemove_0)throw B();this.myCanRemove_0=!1,this.this$AbstractObservableSet.doBeforeRemove_u15i8b$_0(d(this.myLastReturned_0));var t=!1;try{this.closure$iterator.remove(),t=!0}finally{this.this$AbstractObservableSet.doAfterRemove_xembz3$_0(d(this.myLastReturned_0),t)}},re.$metadata$={kind:c,interfaces:[H]},ie.prototype.iterator=function(){return 0===this.size?K().iterator():new re(this.actualIterator,this)},ie.prototype.doBeforeRemove_u15i8b$_0=function(t){this.checkRemove_11rb$(t),this.beforeItemRemoved_11rb$(t)},ae.prototype.call_11rb$=function(t){t.onItemRemoved_u8tacu$(new q(this.closure$item,null,-1,U.REMOVE))},ae.$metadata$={kind:c,interfaces:[y]},ie.prototype.doAfterRemove_xembz3$_0=function(t,e){try{e&&null!=this.myListeners_xjxep$_0&&d(this.myListeners_xjxep$_0).fire_kucmxw$(new ae(t))}finally{this.afterItemRemoved_iuyhfk$(t,e)}},ie.prototype.checkAdd_11rb$=function(t){},ie.prototype.checkRemove_11rb$=function(t){},ie.prototype.beforeItemAdded_11rb$=function(t){},ie.prototype.onItemAdd_11rb$=function(t){},ie.prototype.afterItemAdded_iuyhfk$=function(t,e){},ie.prototype.beforeItemRemoved_11rb$=function(t){},ie.prototype.onItemRemove_11rb$=function(t){},ie.prototype.afterItemRemoved_iuyhfk$=function(t,e){},se.prototype.onItemAdded_u8tacu$=function(t){this.closure$handler.onEvent_11rb$(t)},se.prototype.onItemRemoved_u8tacu$=function(t){this.closure$handler.onEvent_11rb$(t)},se.$metadata$={kind:c,interfaces:[M]},ie.prototype.addHandler_gxwwpc$=function(t){return this.addListener_n5no9j$(new se(t))},ie.$metadata$={kind:c,simpleName:"AbstractObservableSet",interfaces:[ue,G]},Object.defineProperty(le.prototype,"size",{configurable:!0,get:function(){var t,e;return null!=(e=null!=(t=this.mySet_fvkh6y$_0)?t.size:null)?e:0}}),Object.defineProperty(le.prototype,"actualIterator",{configurable:!0,get:function(){return d(this.mySet_fvkh6y$_0).iterator()}}),le.prototype.contains_11rb$=function(t){var e,n;return null!=(n=null!=(e=this.mySet_fvkh6y$_0)?e.contains_11rb$(t):null)&&n},le.prototype.doAdd_11rb$=function(t){return this.ensureSetInitialized_8c11ng$_0(),d(this.mySet_fvkh6y$_0).add_11rb$(t)},le.prototype.doRemove_11rb$=function(t){return d(this.mySet_fvkh6y$_0).remove_11rb$(t)},le.prototype.ensureSetInitialized_8c11ng$_0=function(){null==this.mySet_fvkh6y$_0&&(this.mySet_fvkh6y$_0=V(1))},le.$metadata$={kind:c,simpleName:"ObservableHashSet",interfaces:[ie]},ue.$metadata$={kind:o,simpleName:"ObservableSet",interfaces:[R,Y]},pe.prototype.call_11rb$=function(t){t.onEvent_11rb$(this.closure$event)},pe.$metadata$={kind:c,interfaces:[y]},ce.prototype.fire_11rb$=function(t){this.myListeners_0.fire_kucmxw$(new pe(t))},ce.prototype.addHandler_gxwwpc$=function(t){return this.myListeners_0.add_11rb$(t)},ce.$metadata$={kind:c,simpleName:"SimpleEventSource",interfaces:[X]},he.prototype.get=function(){return null!=this.myHandlers_e7gyn7$_0?this.myValue_uehepj$_0:this.doGet()},_e.prototype.call_11rb$=function(t){t.onEvent_11rb$(this.closure$event)},_e.$metadata$={kind:c,interfaces:[y]},he.prototype.somethingChanged=function(){var t=this.doGet();if(!F(this.myValue_uehepj$_0,t)){var e=new L(this.myValue_uehepj$_0,t);this.myValue_uehepj$_0=t,null!=this.myHandlers_e7gyn7$_0&&d(this.myHandlers_e7gyn7$_0).fire_kucmxw$(new _e(e))}},de.prototype.beforeFirstAdded=function(){this.this$BaseDerivedProperty.myValue_uehepj$_0=this.this$BaseDerivedProperty.doGet(),this.this$BaseDerivedProperty.doAddListeners()},de.prototype.afterLastRemoved=function(){this.this$BaseDerivedProperty.doRemoveListeners(),this.this$BaseDerivedProperty.myHandlers_e7gyn7$_0=null},de.$metadata$={kind:c,interfaces:[g]},he.prototype.addHandler_gxwwpc$=function(t){return null==this.myHandlers_e7gyn7$_0&&(this.myHandlers_e7gyn7$_0=new de(this)),d(this.myHandlers_e7gyn7$_0).add_11rb$(t)},he.$metadata$={kind:c,simpleName:"BaseDerivedProperty",interfaces:[Z]},fe.prototype.doAddListeners=function(){var t,e=J(this.myDeps_nbedfd$_0.length);t=e.length-1|0;for(var n=0;n<=t;n++)e[n]=this.register_hhwf17$_0(this.myDeps_nbedfd$_0[n]);this.myRegistrations_3svoxv$_0=e},me.prototype.onEvent_11rb$=function(t){this.this$DerivedProperty.somethingChanged()},me.$metadata$={kind:c,interfaces:[z]},fe.prototype.register_hhwf17$_0=function(t){return t.addHandler_gxwwpc$(new me(this))},fe.prototype.doRemoveListeners=function(){var t,e;for(t=d(this.myRegistrations_3svoxv$_0),e=0;e!==t.length;++e)t[e].remove();this.myRegistrations_3svoxv$_0=null},fe.$metadata$={kind:c,simpleName:"DerivedProperty",interfaces:[he]},$e.prototype.not_scsqf1$=function(t){return this.map_ohntev$(t,ye)},$e.prototype.notNull_pnjvn9$=function(t){return this.map_ohntev$(t,ge)},$e.prototype.isNull_pnjvn9$=function(t){return this.map_ohntev$(t,ve)},Object.defineProperty(be.prototype,"propExpr",{configurable:!0,get:function(){return"startsWith("+this.closure$string.propExpr+", "+this.closure$prefix.propExpr+")"}}),be.prototype.doGet=function(){return null!=this.closure$string.get()&&null!=this.closure$prefix.get()&&tt(d(this.closure$string.get()),d(this.closure$prefix.get()))},be.$metadata$={kind:c,interfaces:[fe]},$e.prototype.startsWith_258nik$=function(t,e){return new be(t,e,!1,[t,e])},Object.defineProperty(we.prototype,"propExpr",{configurable:!0,get:function(){return"isEmptyString("+this.closure$prop.propExpr+")"}}),we.prototype.doGet=function(){var t=this.closure$prop.get(),e=null==t;return e||(e=0===t.length),e},we.$metadata$={kind:c,interfaces:[fe]},$e.prototype.isNullOrEmpty_zi86m3$=function(t){return new we(t,!1,[t])},Object.defineProperty(xe.prototype,"propExpr",{configurable:!0,get:function(){return"("+this.closure$op1.propExpr+" && "+this.closure$op2.propExpr+")"}}),xe.prototype.doGet=function(){return un().and_0(this.closure$op1.get(),this.closure$op2.get())},xe.$metadata$={kind:c,interfaces:[fe]},$e.prototype.and_us87nw$=function(t,e){return new xe(t,e,null,[t,e])},$e.prototype.and_0=function(t,e){return null==t?this.andWithNull_0(e):null==e?this.andWithNull_0(t):t&&e},$e.prototype.andWithNull_0=function(t){return!(null!=t&&!t)&&null},Object.defineProperty(ke.prototype,"propExpr",{configurable:!0,get:function(){return"("+this.closure$op1.propExpr+" || "+this.closure$op2.propExpr+")"}}),ke.prototype.doGet=function(){return un().or_0(this.closure$op1.get(),this.closure$op2.get())},ke.$metadata$={kind:c,interfaces:[fe]},$e.prototype.or_us87nw$=function(t,e){return new ke(t,e,null,[t,e])},$e.prototype.or_0=function(t,e){return null==t?this.orWithNull_0(e):null==e?this.orWithNull_0(t):t||e},$e.prototype.orWithNull_0=function(t){return!(null==t||!t)||null},Object.defineProperty(Ce.prototype,"propExpr",{configurable:!0,get:function(){return"("+this.closure$p1.propExpr+" + "+this.closure$p2.propExpr+")"}}),Ce.prototype.doGet=function(){return null==this.closure$p1.get()||null==this.closure$p2.get()?null:d(this.closure$p1.get())+d(this.closure$p2.get())|0},Ce.$metadata$={kind:c,interfaces:[fe]},$e.prototype.add_qmazvq$=function(t,e){return new Ce(t,e,null,[t,e])},$e.prototype.select_uirx34$=function(t,e){return this.select_phvhtn$(t,e,null)},Ee.prototype.get=function(){var t;if(null==(t=this.closure$source.get()))return this.closure$nullValue;var e=t;return this.closure$fun(e).get()},Ee.$metadata$={kind:c,interfaces:[et]},Object.defineProperty(Se.prototype,"propExpr",{configurable:!0,get:function(){return"select("+this.closure$source.propExpr+", "+w(this.closure$fun)+")"}}),Te.prototype.onEvent_11rb$=function(t){this.this$.somethingChanged()},Te.$metadata$={kind:c,interfaces:[z]},Oe.prototype.onEvent_11rb$=function(t){null!=this.this$.myTargetProperty_0&&d(this.this$.myTargetRegistration_0).remove();var e=this.closure$source.get();this.this$.myTargetProperty_0=null!=e?this.closure$fun(e):null,null!=this.this$.myTargetProperty_0&&(this.this$.myTargetRegistration_0=d(this.this$.myTargetProperty_0).addHandler_gxwwpc$(this.closure$targetHandler)),this.this$.somethingChanged()},Oe.$metadata$={kind:c,interfaces:[z]},Se.prototype.doAddListeners=function(){this.myTargetProperty_0=null==this.closure$source.get()?null:this.closure$fun(this.closure$source.get());var t=new Te(this),e=new Oe(this,this.closure$source,this.closure$fun,t);this.mySourceRegistration_0=this.closure$source.addHandler_gxwwpc$(e),null!=this.myTargetProperty_0&&(this.myTargetRegistration_0=d(this.myTargetProperty_0).addHandler_gxwwpc$(t))},Se.prototype.doRemoveListeners=function(){null!=this.myTargetProperty_0&&d(this.myTargetRegistration_0).remove(),d(this.mySourceRegistration_0).remove()},Se.prototype.doGet=function(){return this.closure$calc.get()},Se.$metadata$={kind:c,interfaces:[he]},$e.prototype.select_phvhtn$=function(t,e,n){return new Se(t,e,new Ee(t,n,e),null)},Ne.prototype.get=function(){var t;if(null==(t=this.closure$source.get()))return null;var e=t;return this.closure$fun(e).get()},Ne.$metadata$={kind:c,interfaces:[et]},Object.defineProperty(Pe.prototype,"propExpr",{configurable:!0,get:function(){return"select("+this.closure$source.propExpr+", "+w(this.closure$fun)+")"}}),Ie.prototype.onEvent_11rb$=function(t){this.this$MyProperty.somethingChanged()},Ie.$metadata$={kind:c,interfaces:[z]},Ae.prototype.onEvent_11rb$=function(t){null!=this.this$MyProperty.myTargetProperty_0&&d(this.this$MyProperty.myTargetRegistration_0).remove();var e=this.closure$source.get();this.this$MyProperty.myTargetProperty_0=null!=e?this.closure$fun(e):null,null!=this.this$MyProperty.myTargetProperty_0&&(this.this$MyProperty.myTargetRegistration_0=d(this.this$MyProperty.myTargetProperty_0).addHandler_gxwwpc$(this.closure$targetHandler)),this.this$MyProperty.somethingChanged()},Ae.$metadata$={kind:c,interfaces:[z]},Pe.prototype.doAddListeners=function(){this.myTargetProperty_0=null==this.closure$source.get()?null:this.closure$fun(this.closure$source.get());var t=new Ie(this),e=new Ae(this,this.closure$source,this.closure$fun,t);this.mySourceRegistration_0=this.closure$source.addHandler_gxwwpc$(e),null!=this.myTargetProperty_0&&(this.myTargetRegistration_0=d(this.myTargetProperty_0).addHandler_gxwwpc$(t))},Pe.prototype.doRemoveListeners=function(){null!=this.myTargetProperty_0&&d(this.myTargetRegistration_0).remove(),d(this.mySourceRegistration_0).remove()},Pe.prototype.doGet=function(){return this.closure$calc.get()},Pe.prototype.set_11rb$=function(t){null!=this.myTargetProperty_0&&d(this.myTargetProperty_0).set_11rb$(t)},Pe.$metadata$={kind:c,simpleName:"MyProperty",interfaces:[D,he]},$e.prototype.selectRw_dnjkuo$=function(t,e){return new Pe(t,e,new Ne(t,e))},je.prototype.run=function(){this.closure$esReg.get().remove(),null!=this.closure$prop.get()?this.closure$esReg.set_11rb$(this.closure$selector(this.closure$prop.get()).addHandler_gxwwpc$(this.closure$handler)):this.closure$esReg.set_11rb$(s.Companion.EMPTY)},je.$metadata$={kind:c,interfaces:[W]},Le.prototype.onEvent_11rb$=function(t){this.closure$update.run()},Le.$metadata$={kind:c,interfaces:[z]},ze.prototype.doRemove=function(){this.closure$propReg.remove(),this.closure$esReg.get().remove()},ze.$metadata$={kind:c,interfaces:[s]},Re.prototype.addHandler_gxwwpc$=function(t){var e=new r(s.Companion.EMPTY),n=new je(e,this.closure$prop,this.closure$selector,t);return n.run(),new ze(this.closure$prop.addHandler_gxwwpc$(new Le(n)),e)},Re.$metadata$={kind:c,interfaces:[X]},$e.prototype.selectEvent_mncfl5$=function(t,e){return new Re(t,e)},$e.prototype.same_xyb9ob$=function(t,e){return this.map_ohntev$(t,(n=e,function(t){return t===n}));var n},$e.prototype.equals_xyb9ob$=function(t,e){return this.map_ohntev$(t,(n=e,function(t){return F(t,n)}));var n},Object.defineProperty(De.prototype,"propExpr",{configurable:!0,get:function(){return"equals("+this.closure$p1.propExpr+", "+this.closure$p2.propExpr+")"}}),De.prototype.doGet=function(){return F(this.closure$p1.get(),this.closure$p2.get())},De.$metadata$={kind:c,interfaces:[fe]},$e.prototype.equals_r3q8zu$=function(t,e){return new De(t,e,!1,[t,e])},$e.prototype.notEquals_xyb9ob$=function(t,e){return this.not_scsqf1$(this.equals_xyb9ob$(t,e))},$e.prototype.notEquals_r3q8zu$=function(t,e){return this.not_scsqf1$(this.equals_r3q8zu$(t,e))},Object.defineProperty(Me.prototype,"propExpr",{configurable:!0,get:function(){return"transform("+this.closure$prop.propExpr+", "+w(this.closure$f)+")"}}),Me.prototype.doGet=function(){return this.closure$f(this.closure$prop.get())},Me.$metadata$={kind:c,interfaces:[fe]},$e.prototype.map_ohntev$=function(t,e){return new Me(t,e,e(t.get()),[t])},Object.defineProperty(Be.prototype,"propExpr",{configurable:!0,get:function(){return"transform("+this.closure$prop.propExpr+", "+w(this.closure$sToT)+", "+w(this.closure$tToS)+")"}}),Be.prototype.get=function(){return this.closure$sToT(this.closure$prop.get())},Fe.prototype.onEvent_11rb$=function(t){var e=this.closure$sToT(t.oldValue),n=this.closure$sToT(t.newValue);F(e,n)||this.closure$handler.onEvent_11rb$(new L(e,n))},Fe.$metadata$={kind:c,interfaces:[z]},Be.prototype.addHandler_gxwwpc$=function(t){return this.closure$prop.addHandler_gxwwpc$(new Fe(this.closure$sToT,t))},Be.prototype.set_11rb$=function(t){this.closure$prop.set_11rb$(this.closure$tToS(t))},Be.$metadata$={kind:c,simpleName:"TransformedProperty",interfaces:[D]},$e.prototype.map_6va22f$=function(t,e,n){return new Be(t,e,n)},Object.defineProperty(Ue.prototype,"propExpr",{configurable:!0,get:function(){return"constant("+this.closure$value+")"}}),Ue.prototype.get=function(){return this.closure$value},Ue.prototype.addHandler_gxwwpc$=function(t){return s.Companion.EMPTY},Ue.$metadata$={kind:c,interfaces:[Z]},$e.prototype.constant_mh5how$=function(t){return new Ue(t)},Object.defineProperty(qe.prototype,"propExpr",{configurable:!0,get:function(){return"isEmpty("+this.closure$collection+")"}}),qe.prototype.doGet=function(){return this.closure$collection.isEmpty()},qe.$metadata$={kind:c,interfaces:[cn]},$e.prototype.isEmpty_4gck1s$=function(t){return new qe(t,t,t.isEmpty())},Object.defineProperty(He.prototype,"propExpr",{configurable:!0,get:function(){return"size("+this.closure$collection+")"}}),He.prototype.doGet=function(){return this.closure$collection.size},He.$metadata$={kind:c,interfaces:[cn]},$e.prototype.size_4gck1s$=function(t){return new He(t,t,t.size)},$e.prototype.notEmpty_4gck1s$=function(t){var n;return this.not_scsqf1$(e.isType(n=this.empty_4gck1s$(t),nt)?n:u())},Object.defineProperty(Ge.prototype,"propExpr",{configurable:!0,get:function(){return"empty("+this.closure$collection+")"}}),Ke.prototype.run=function(){this.this$.somethingChanged()},Ke.$metadata$={kind:c,interfaces:[W]},Ge.prototype.doAddListeners=function(){this.myCollectionRegistration_0=this.closure$collection.addListener_n5no9j$(un().simpleAdapter_0(new Ke(this)))},Ge.prototype.doRemoveListeners=function(){d(this.myCollectionRegistration_0).remove()},Ge.prototype.doGet=function(){return this.closure$collection.isEmpty()},Ge.$metadata$={kind:c,interfaces:[he]},$e.prototype.empty_4gck1s$=function(t){return new Ge(t,t.isEmpty())},Ve.prototype.onItemAdded_u8tacu$=function(t){this.closure$r.run()},Ve.prototype.onItemRemoved_u8tacu$=function(t){this.closure$r.run()},Ve.$metadata$={kind:c,interfaces:[M]},$e.prototype.simpleAdapter_0=function(t){return new Ve(t)},Object.defineProperty(Ye.prototype,"propExpr",{configurable:!0,get:function(){return"if("+this.closure$cond.propExpr+", "+this.closure$ifTrue.propExpr+", "+this.closure$ifFalse.propExpr+")"}}),Ye.prototype.doGet=function(){return this.closure$cond.get()?this.closure$ifTrue.get():this.closure$ifFalse.get()},Ye.$metadata$={kind:c,interfaces:[fe]},$e.prototype.ifProp_h6sj4s$=function(t,e,n){return new Ye(t,e,n,null,[t,e,n])},$e.prototype.ifProp_2ercqg$=function(t,e,n){return this.ifProp_h6sj4s$(t,this.constant_mh5how$(e),this.constant_mh5how$(n))},We.prototype.set_11rb$=function(t){t?this.closure$cond.set_11rb$(this.closure$ifTrue):this.closure$cond.set_11rb$(this.closure$ifFalse)},We.$metadata$={kind:c,interfaces:[j]},$e.prototype.ifProp_g6gwfc$=function(t,e,n){return new We(t,e,n)},Xe.prototype.doGet=function(){return null==this.closure$prop.get()?this.closure$ifNull:this.closure$prop.get()},Xe.$metadata$={kind:c,interfaces:[fe]},$e.prototype.withDefaultValue_xyb9ob$=function(t,e){return new Xe(t,e,e,[t])},Object.defineProperty(Ze.prototype,"propExpr",{configurable:!0,get:function(){var t,e,n=it();n.append_pdl1vj$("firstNotNull(");var i=!0;for(t=this.closure$values,e=0;e!==t.length;++e){var o=t[e];i?i=!1:n.append_pdl1vj$(", "),n.append_pdl1vj$(o.propExpr)}return n.append_pdl1vj$(")"),n.toString()}}),Ze.prototype.doGet=function(){var t,e;for(t=this.closure$values,e=0;e!==t.length;++e){var n=t[e];if(null!=n.get())return n.get()}return null},Ze.$metadata$={kind:c,interfaces:[fe]},$e.prototype.firstNotNull_qrqmoy$=function(t){return new Ze(t,null,t.slice())},Object.defineProperty(Je.prototype,"propExpr",{configurable:!0,get:function(){return"isValid("+this.closure$source.propExpr+", "+w(this.closure$validator)+")"}}),Je.prototype.doGet=function(){return this.closure$validator(this.closure$source.get())},Je.$metadata$={kind:c,interfaces:[fe]},$e.prototype.isPropertyValid_ngb39s$=function(t,e){return new Je(t,e,!1,[t])},Object.defineProperty(Qe.prototype,"propExpr",{configurable:!0,get:function(){return"validated("+this.closure$source.propExpr+", "+w(this.closure$validator)+")"}}),Qe.prototype.doGet=function(){var t=this.closure$source.get();return this.closure$validator(t)&&(this.myLastValid_0=t),this.myLastValid_0},Qe.prototype.set_11rb$=function(t){this.closure$validator(t)&&this.closure$source.set_11rb$(t)},Qe.$metadata$={kind:c,simpleName:"ValidatedProperty",interfaces:[D,fe]},$e.prototype.validatedProperty_nzo3ll$=function(t,e){return new Qe(t,e)},tn.prototype.doGet=function(){var t=this.closure$p.get();return null!=t?""+w(t):this.closure$nullValue},tn.$metadata$={kind:c,interfaces:[fe]},$e.prototype.toStringOf_ysc3eg$=function(t,e){return void 0===e&&(e="null"),new tn(t,e,e,[t])},Object.defineProperty(en.prototype,"propExpr",{configurable:!0,get:function(){return this.closure$read.propExpr}}),en.prototype.get=function(){return this.closure$read.get()},en.prototype.addHandler_gxwwpc$=function(t){return this.closure$read.addHandler_gxwwpc$(t)},en.prototype.set_11rb$=function(t){this.closure$write.set_11rb$(t)},en.$metadata$={kind:c,interfaces:[D]},$e.prototype.property_2ov6i0$=function(t,e){return new en(t,e)},nn.prototype.set_11rb$=function(t){var e,n;for(e=this.closure$props,n=0;n!==e.length;++n)e[n].set_11rb$(t)},nn.$metadata$={kind:c,interfaces:[j]},$e.prototype.compose_qzq9dc$=function(t){return new nn(t)},Object.defineProperty(on.prototype,"propExpr",{configurable:!0,get:function(){return"singleItemCollection("+this.closure$coll+")"}}),on.prototype.get=function(){return this.closure$coll.isEmpty()?null:this.closure$coll.iterator().next()},on.prototype.set_11rb$=function(t){var e=this.get();F(e,t)||(this.closure$coll.clear(),null!=t&&this.closure$coll.add_11rb$(t))},rn.prototype.onItemAdded_u8tacu$=function(t){if(1!==this.closure$coll.size)throw B();this.closure$handler.onEvent_11rb$(new L(null,t.newItem))},rn.prototype.onItemSet_u8tacu$=function(t){if(0!==t.index)throw B();this.closure$handler.onEvent_11rb$(new L(t.oldItem,t.newItem))},rn.prototype.onItemRemoved_u8tacu$=function(t){if(!this.closure$coll.isEmpty())throw B();this.closure$handler.onEvent_11rb$(new L(t.oldItem,null))},rn.$metadata$={kind:c,interfaces:[M]},on.prototype.addHandler_gxwwpc$=function(t){return this.closure$coll.addListener_n5no9j$(new rn(this.closure$coll,t))},on.$metadata$={kind:c,interfaces:[D]},$e.prototype.forSingleItemCollection_4gck1s$=function(t){if(t.size>1)throw $("Collection "+t+" has more than one item");return new on(t)},Object.defineProperty(an.prototype,"propExpr",{configurable:!0,get:function(){var t,e=new ot("(");e.append_pdl1vj$(this.closure$props[0].propExpr),t=this.closure$props.length;for(var n=1;nt.myDragThreshold_0&&(t.myDragging_0=!0,t.dispatch_0(dt.MOUSE_DRAGGED,e)):t.myButtonPressed_0||t.myDragging_0||t.dispatch_0(dt.MOUSE_MOVED,e),a}}(this))}function $n(t,e,n){this.closure$eventSpec=t,this.this$DomEventMapper=e,this.closure$listener=n,s.call(this)}function yn(){gn=this}mn.prototype.dispatch_0=function(t,e){var n=this.myEventTarget_0.getBoundingClientRect(),i=new ht(e.clientX-pt(n.x)|0,e.clientY-pt(n.y)|0,vn().getButton_tfvzir$(e),vn().getModifiers_tfvzir$(e));this.destMouseEventPeer_0(t,i)},$n.prototype.doRemove=function(){this.this$DomEventMapper.targetNode_0(this.closure$eventSpec).removeEventListener(this.closure$eventSpec.name,this.closure$listener)},$n.$metadata$={kind:c,interfaces:[s]},mn.prototype.handle_0=function(t,e){var n,i=new vi((n=e,function(t){return n(t),!1}));this.targetNode_0(t).addEventListener(t.name,i),this.regs_0.add_3xv6fb$(new $n(t,this,i))},mn.prototype.targetNode_0=function(t){return F(t,Ci().MOUSE_MOVE)||F(t,Ci().MOUSE_UP),this.myEventTarget_0},mn.prototype.dispose=function(){this.regs_0.dispose()},mn.$metadata$={kind:c,simpleName:"DomEventMapper",interfaces:[Q]},yn.prototype.toKeyEvent_0=function(t){var e=xn().getKey_za3lpa$(t.keyCode),n=ft();return t.ctrlKey&&n.add_11rb$(mt.CONTROL),t.altKey&&n.add_11rb$(mt.ALT),t.shiftKey&&n.add_11rb$(mt.SHIFT),t.metaKey&&n.add_11rb$(mt.META),$t(e,ct(t.charCode),n)},yn.prototype.matches_d0kix2$=function(t,e){return e.matches_l9pgtg$(this.toKeyEvent_0(t).keyStroke)},yn.prototype.dispatchKeyPress_vco4xc$=function(t,e){var n=this.toKeyEvent_0(t);return e(n),!(n.key===yt.BACKSPACE||n.key===yt.UP||n.key===yt.DOWN||n.key===yt.LEFT||n.key===yt.RIGHT||n.key===yt.SPACE||n.is_c4rqdo$([gt.KeyStrokeSpecs.SELECT_LEFT])||n.is_c4rqdo$([gt.KeyStrokeSpecs.SELECT_UP])||n.is_c4rqdo$([gt.KeyStrokeSpecs.SELECT_RIGHT])||n.is_c4rqdo$([gt.KeyStrokeSpecs.SELECT_DOWN])||n.is_c4rqdo$([gt.KeyStrokeSpecs.MATCHING_CONSTRUCTS])||n.is_ji7i3y$(yt.TAB,[])||n.is_ji7i3y$(yt.TAB,[mt.SHIFT])||n.isConsumed)},yn.prototype.dispatchKeyRelease_c128jx$=function(t,e){var n=this.toKeyEvent_0(t);return e(n),!n.isConsumed},yn.prototype.dispatchKeyType_c128jx$=function(t,e){var n=this.toKeyEvent_0(t);return t.charCode<32||127===t.charCode||10===ct(t.charCode)||13===ct(t.charCode)||!!(n.has_hny0b7$(mt.META)||n.has_hny0b7$(mt.CONTROL)&&!n.has_hny0b7$(mt.ALT))||(e(n),!n.isConsumed)},yn.prototype.getButton_tfvzir$=function(t){var e;switch(t.button){case 0:e=vt.LEFT;break;case 1:e=vt.MIDDLE;break;case 2:e=vt.RIGHT;break;default:e=vt.NONE}return e},yn.prototype.getModifiers_tfvzir$=function(t){var e=t.ctrlKey,n=t.altKey,i=t.shiftKey,o=t.metaKey;return new bt(e,n,i,o)},yn.$metadata$={kind:f,simpleName:"DomEventUtil",interfaces:[]};var gn=null;function vn(){return null===gn&&new yn,gn}function bn(){wn=this,this.KEY_ARRAY_0=e.newArray(200,null),this.KEY_ARRAY_0[Fn().KEY_ALT]=yt.ALT,this.KEY_ARRAY_0[Fn().KEY_BACKSPACE]=yt.BACKSPACE,this.KEY_ARRAY_0[Fn().KEY_CTRL]=yt.CONTROL,this.KEY_ARRAY_0[Fn().KEY_DELETE]=yt.DELETE,this.KEY_ARRAY_0[Fn().KEY_DOWN]=yt.DOWN,this.KEY_ARRAY_0[Fn().KEY_END]=yt.END,this.KEY_ARRAY_0[Fn().KEY_ENTER]=yt.ENTER,this.KEY_ARRAY_0[Fn().KEY_ESCAPE]=yt.ESCAPE,this.KEY_ARRAY_0[Fn().KEY_HOME]=yt.HOME,this.KEY_ARRAY_0[Fn().KEY_LEFT]=yt.LEFT,this.KEY_ARRAY_0[Fn().KEY_PAGEDOWN]=yt.PAGE_DOWN,this.KEY_ARRAY_0[Fn().KEY_PAGEUP]=yt.PAGE_UP,this.KEY_ARRAY_0[Fn().KEY_RIGHT]=yt.RIGHT,this.KEY_ARRAY_0[Fn().KEY_SHIFT]=yt.SHIFT,this.KEY_ARRAY_0[Fn().KEY_TAB]=yt.TAB,this.KEY_ARRAY_0[Fn().KEY_UP]=yt.UP,this.KEY_ARRAY_0[45]=yt.INSERT,this.KEY_ARRAY_0[32]=yt.SPACE,this.KEY_ARRAY_0[65]=yt.A,this.KEY_ARRAY_0[66]=yt.B,this.KEY_ARRAY_0[67]=yt.C,this.KEY_ARRAY_0[68]=yt.D,this.KEY_ARRAY_0[69]=yt.E,this.KEY_ARRAY_0[70]=yt.F,this.KEY_ARRAY_0[71]=yt.G,this.KEY_ARRAY_0[72]=yt.H,this.KEY_ARRAY_0[73]=yt.I,this.KEY_ARRAY_0[74]=yt.J,this.KEY_ARRAY_0[75]=yt.K,this.KEY_ARRAY_0[76]=yt.L,this.KEY_ARRAY_0[77]=yt.M,this.KEY_ARRAY_0[78]=yt.N,this.KEY_ARRAY_0[79]=yt.O,this.KEY_ARRAY_0[80]=yt.P,this.KEY_ARRAY_0[81]=yt.Q,this.KEY_ARRAY_0[82]=yt.R,this.KEY_ARRAY_0[83]=yt.S,this.KEY_ARRAY_0[84]=yt.T,this.KEY_ARRAY_0[85]=yt.U,this.KEY_ARRAY_0[86]=yt.V,this.KEY_ARRAY_0[87]=yt.W,this.KEY_ARRAY_0[88]=yt.X,this.KEY_ARRAY_0[89]=yt.Y,this.KEY_ARRAY_0[90]=yt.Z,this.KEY_ARRAY_0[219]=yt.LEFT_BRACE,this.KEY_ARRAY_0[221]=yt.RIGHT_BRACE,this.KEY_ARRAY_0[48]=yt.DIGIT_0,this.KEY_ARRAY_0[49]=yt.DIGIT_1,this.KEY_ARRAY_0[50]=yt.DIGIT_2,this.KEY_ARRAY_0[51]=yt.DIGIT_3,this.KEY_ARRAY_0[52]=yt.DIGIT_4,this.KEY_ARRAY_0[53]=yt.DIGIT_5,this.KEY_ARRAY_0[54]=yt.DIGIT_6,this.KEY_ARRAY_0[55]=yt.DIGIT_7,this.KEY_ARRAY_0[56]=yt.DIGIT_8,this.KEY_ARRAY_0[57]=yt.DIGIT_9,this.KEY_ARRAY_0[112]=yt.F1,this.KEY_ARRAY_0[113]=yt.F2,this.KEY_ARRAY_0[114]=yt.F3,this.KEY_ARRAY_0[115]=yt.F4,this.KEY_ARRAY_0[116]=yt.F5,this.KEY_ARRAY_0[117]=yt.F6,this.KEY_ARRAY_0[118]=yt.F7,this.KEY_ARRAY_0[119]=yt.F8,this.KEY_ARRAY_0[120]=yt.F9,this.KEY_ARRAY_0[121]=yt.F10,this.KEY_ARRAY_0[122]=yt.F11,this.KEY_ARRAY_0[123]=yt.F12,this.KEY_ARRAY_0[188]=yt.COMMA,this.KEY_ARRAY_0[190]=yt.PERIOD,this.KEY_ARRAY_0[191]=yt.SLASH,this.KEY_ARRAY_0[192]=yt.BACK_QUOTE}bn.prototype.getKey_za3lpa$=function(t){if(t0){var c=new zn(O(t,T(i.v,s)));n.add_11rb$(c)}n.add_11rb$(new Dn(r)),i.v=u+1|0}if(i.v=Bi().CACHE_DAYS_0&&o===Bi().EPOCH.year&&(o=Bi().CACHE_STAMP_0.year,i=Bi().CACHE_STAMP_0.month,n=Bi().CACHE_STAMP_0.day,e=e-Bi().CACHE_DAYS_0|0);e>0;){var a=i.getDaysInYear_za3lpa$(o)-n+1|0;if(e=s?(n=1,i=io().JANUARY,o=o+1|0,e=e-s|0):(i=z(i.next()),n=1,e=e-a|0,r=!0)}}return new zi(n,i,o)},zi.prototype.nextDate=function(){return this.addDays_za3lpa$(1)},zi.prototype.prevDate=function(){return this.subtractDays_za3lpa$(1)},zi.prototype.subtractDays_za3lpa$=function(t){if(t<0)throw L();if(0===t)return this;if(te?Bi().lastDayOf_8fsw02$(this.year-1|0).subtractDays_za3lpa$(t-e-1|0):Bi().lastDayOf_8fsw02$(this.year,z(this.month.prev())).subtractDays_za3lpa$(t-this.day|0)},zi.prototype.compareTo_11rb$=function(t){return this.year!==t.year?this.year-t.year|0:this.month.ordinal()!==t.month.ordinal()?this.month.ordinal()-t.month.ordinal()|0:this.day-t.day|0},zi.prototype.equals=function(t){var n;if(!e.isType(t,zi))return!1;var i=null==(n=t)||e.isType(n,zi)?n:I();return z(i).year===this.year&&i.month===this.month&&i.day===this.day},zi.prototype.hashCode=function(){return(239*this.year|0)+(31*D(this.month)|0)+this.day|0},zi.prototype.toString=function(){var t=M();return t.append_s8jyv4$(this.year),this.appendMonth_0(t),this.appendDay_0(t),t.toString()},zi.prototype.appendDay_0=function(t){this.day<10&&t.append_pdl1vj$("0"),t.append_s8jyv4$(this.day)},zi.prototype.appendMonth_0=function(t){var e=this.month.ordinal()+1|0;e<10&&t.append_pdl1vj$("0"),t.append_s8jyv4$(e)},zi.prototype.toPrettyString=function(){var t=M();return this.appendDay_0(t),t.append_pdl1vj$("."),this.appendMonth_0(t),t.append_pdl1vj$("."),t.append_s8jyv4$(this.year),t.toString()},Di.prototype.parse_61zpoe$=function(t){if(8!==t.length)throw B();var e=F(t.substring(0,4)),n=F(t.substring(4,6));return new zi(F(t.substring(6,8)),io().values()[n-1|0],e)},Di.prototype.firstDayOf_8fsw02$=function(t,e){return void 0===e&&(e=io().JANUARY),new zi(1,e,t)},Di.prototype.lastDayOf_8fsw02$=function(t,e){return void 0===e&&(e=io().DECEMBER),new zi(e.days,e,t)},Di.$metadata$={kind:o,simpleName:"Companion",interfaces:[]};var Mi=null;function Bi(){return null===Mi&&new Di,Mi}function Fi(t,e){Hi(),void 0===e&&(e=fo().DAY_START),this.date=t,this.time=e}function Ui(){qi=this}zi.$metadata$={kind:i,simpleName:"Date",interfaces:[U]},Object.defineProperty(Fi.prototype,"year",{configurable:!0,get:function(){return this.date.year}}),Object.defineProperty(Fi.prototype,"month",{configurable:!0,get:function(){return this.date.month}}),Object.defineProperty(Fi.prototype,"day",{configurable:!0,get:function(){return this.date.day}}),Object.defineProperty(Fi.prototype,"weekDay",{configurable:!0,get:function(){return this.date.weekDay}}),Object.defineProperty(Fi.prototype,"hours",{configurable:!0,get:function(){return this.time.hours}}),Object.defineProperty(Fi.prototype,"minutes",{configurable:!0,get:function(){return this.time.minutes}}),Object.defineProperty(Fi.prototype,"seconds",{configurable:!0,get:function(){return this.time.seconds}}),Object.defineProperty(Fi.prototype,"milliseconds",{configurable:!0,get:function(){return this.time.milliseconds}}),Fi.prototype.changeDate_z9gqti$=function(t){return new Fi(t,this.time)},Fi.prototype.changeTime_z96d9j$=function(t){return new Fi(this.date,t)},Fi.prototype.add_27523k$=function(t){var e=jo().UTC.toInstant_amwj4p$(this);return jo().UTC.toDateTime_x2y23v$(e.add_27523k$(t))},Fi.prototype.to_amwj4p$=function(t){var e=jo().UTC.toInstant_amwj4p$(this),n=jo().UTC.toInstant_amwj4p$(t);return e.to_x2y23v$(n)},Fi.prototype.isBefore_amwj4p$=function(t){return this.compareTo_11rb$(t)<0},Fi.prototype.isAfter_amwj4p$=function(t){return this.compareTo_11rb$(t)>0},Fi.prototype.hashCode=function(){return(31*this.date.hashCode()|0)+this.time.hashCode()|0},Fi.prototype.equals=function(t){var n,i,o;if(!e.isType(t,Fi))return!1;var r=null==(n=t)||e.isType(n,Fi)?n:I();return(null!=(i=this.date)?i.equals(z(r).date):null)&&(null!=(o=this.time)?o.equals(r.time):null)},Fi.prototype.compareTo_11rb$=function(t){var e=this.date.compareTo_11rb$(t.date);return 0!==e?e:this.time.compareTo_11rb$(t.time)},Fi.prototype.toString=function(){return this.date.toString()+"T"+q(this.time)},Fi.prototype.toPrettyString=function(){return this.time.toPrettyHMString()+" "+this.date.toPrettyString()},Ui.prototype.parse_61zpoe$=function(t){if(t.length<15)throw L();return new Fi(Bi().parse_61zpoe$(t.substring(0,8)),fo().parse_61zpoe$(t.substring(9)))},Ui.$metadata$={kind:o,simpleName:"Companion",interfaces:[]};var qi=null;function Hi(){return null===qi&&new Ui,qi}function Gi(){var t,e;Ki=this,this.BASE_YEAR=1900,this.MAX_SUPPORTED_YEAR=2100,this.MIN_SUPPORTED_YEAR_8be2vx$=1970,this.DAYS_IN_YEAR_8be2vx$=0,this.DAYS_IN_LEAP_YEAR_8be2vx$=0,this.LEAP_YEARS_FROM_1969_8be2vx$=new Int32Array([477,477,477,478,478,478,478,479,479,479,479,480,480,480,480,481,481,481,481,482,482,482,482,483,483,483,483,484,484,484,484,485,485,485,485,486,486,486,486,487,487,487,487,488,488,488,488,489,489,489,489,490,490,490,490,491,491,491,491,492,492,492,492,493,493,493,493,494,494,494,494,495,495,495,495,496,496,496,496,497,497,497,497,498,498,498,498,499,499,499,499,500,500,500,500,501,501,501,501,502,502,502,502,503,503,503,503,504,504,504,504,505,505,505,505,506,506,506,506,507,507,507,507,508,508,508,508,509,509,509,509,509]);var n=0,i=0;for(t=io().values(),e=0;e!==t.length;++e){var o=t[e];n=n+o.getDaysInLeapYear()|0,i=i+o.days|0}this.DAYS_IN_YEAR_8be2vx$=i,this.DAYS_IN_LEAP_YEAR_8be2vx$=n}Fi.$metadata$={kind:i,simpleName:"DateTime",interfaces:[U]},Gi.prototype.isLeap_kcn2v3$=function(t){return this.checkYear_0(t),1==(this.LEAP_YEARS_FROM_1969_8be2vx$[t-1970+1|0]-this.LEAP_YEARS_FROM_1969_8be2vx$[t-1970|0]|0)},Gi.prototype.leapYearsBetween_6xvm5r$=function(t,e){if(t>e)throw L();return this.checkYear_0(t),this.checkYear_0(e),this.LEAP_YEARS_FROM_1969_8be2vx$[e-1970|0]-this.LEAP_YEARS_FROM_1969_8be2vx$[t-1970|0]|0},Gi.prototype.leapYearsFromZero_0=function(t){return(t/4|0)-(t/100|0)+(t/400|0)|0},Gi.prototype.checkYear_0=function(t){if(t>2100||t<1970)throw E(t.toString()+"")},Gi.$metadata$={kind:o,simpleName:"DateTimeUtil",interfaces:[]};var Ki=null;function Vi(){return null===Ki&&new Gi,Ki}function Yi(t){Zi(),this.duration=t}function Wi(){Xi=this,this.MS=new Yi(G),this.SECOND=this.MS.mul_s8cxhz$(K),this.MINUTE=this.SECOND.mul_s8cxhz$(V),this.HOUR=this.MINUTE.mul_s8cxhz$(V),this.DAY=this.HOUR.mul_s8cxhz$(Y),this.WEEK=this.DAY.mul_s8cxhz$(W)}Object.defineProperty(Yi.prototype,"isPositive",{configurable:!0,get:function(){return this.duration.toNumber()>0}}),Yi.prototype.mul_s8cxhz$=function(t){return new Yi(this.duration.multiply(t))},Yi.prototype.add_27523k$=function(t){return new Yi(this.duration.add(t.duration))},Yi.prototype.sub_27523k$=function(t){return new Yi(this.duration.subtract(t.duration))},Yi.prototype.div_27523k$=function(t){return this.duration.toNumber()/t.duration.toNumber()},Yi.prototype.compareTo_11rb$=function(t){var e=this.duration.subtract(t.duration);return e.toNumber()>0?1:p(e,H)?0:-1},Yi.prototype.hashCode=function(){return this.duration.toInt()},Yi.prototype.equals=function(t){return!!e.isType(t,Yi)&&p(this.duration,t.duration)},Yi.prototype.toString=function(){return"Duration : "+q(this.duration)+"ms"},Wi.prototype.get_week_2vr8y7$=function(t){return t.duration.div(this.WEEK.duration)},Wi.prototype.get_day_2vr8y7$=function(t){return t.duration.modulo(this.WEEK.duration).div(this.DAY.duration)},Wi.prototype.get_hour_2vr8y7$=function(t){return t.duration.modulo(this.DAY.duration).div(this.HOUR.duration)},Wi.prototype.get_minute_2vr8y7$=function(t){return t.duration.modulo(this.HOUR.duration).div(this.MINUTE.duration)},Wi.prototype.get_second_2vr8y7$=function(t){return t.duration.modulo(this.MINUTE.duration).div(this.SECOND.duration)},Wi.prototype.get_millis_2vr8y7$=function(t){return t.duration.modulo(this.SECOND.duration).div(this.MS.duration)},Wi.prototype.get_totalWeeks_2vr8y7$=function(t){return t.duration.div(this.WEEK.duration)},Wi.prototype.get_totalDays_2vr8y7$=function(t){return t.duration.div(this.DAY.duration)},Wi.prototype.get_totalHours_2vr8y7$=function(t){return t.duration.div(this.DAY.duration)},Wi.prototype.get_totalMinutes_2vr8y7$=function(t){return t.duration.div(this.MINUTE.duration)},Wi.$metadata$={kind:o,simpleName:"Companion",interfaces:[]};var Xi=null;function Zi(){return null===Xi&&new Wi,Xi}function Ji(t){this.timeSinceEpoch=t}function Qi(t,e,n){io(),this.days=t,this.myOrdinal_hzcl1t$_0=e,this.myName_s01cg9$_0=n}function to(t,e,n,i){Qi.call(this,t,n,i),this.myDaysInLeapYear_0=e}function eo(){no=this,this.JANUARY=new Qi(31,0,"January"),this.FEBRUARY=new to(28,29,1,"February"),this.MARCH=new Qi(31,2,"March"),this.APRIL=new Qi(30,3,"April"),this.MAY=new Qi(31,4,"May"),this.JUNE=new Qi(30,5,"June"),this.JULY=new Qi(31,6,"July"),this.AUGUST=new Qi(31,7,"August"),this.SEPTEMBER=new Qi(30,8,"September"),this.OCTOBER=new Qi(31,9,"October"),this.NOVEMBER=new Qi(30,10,"November"),this.DECEMBER=new Qi(31,11,"December"),this.VALUES_0=[this.JANUARY,this.FEBRUARY,this.MARCH,this.APRIL,this.MAY,this.JUNE,this.JULY,this.AUGUST,this.SEPTEMBER,this.OCTOBER,this.NOVEMBER,this.DECEMBER]}Yi.$metadata$={kind:i,simpleName:"Duration",interfaces:[U]},Ji.prototype.add_27523k$=function(t){return new Ji(this.timeSinceEpoch.add(t.duration))},Ji.prototype.sub_27523k$=function(t){return new Ji(this.timeSinceEpoch.subtract(t.duration))},Ji.prototype.to_x2y23v$=function(t){return new Yi(t.timeSinceEpoch.subtract(this.timeSinceEpoch))},Ji.prototype.compareTo_11rb$=function(t){var e=this.timeSinceEpoch.subtract(t.timeSinceEpoch);return e.toNumber()>0?1:p(e,H)?0:-1},Ji.prototype.hashCode=function(){return this.timeSinceEpoch.toInt()},Ji.prototype.toString=function(){return""+q(this.timeSinceEpoch)},Ji.prototype.equals=function(t){return!!e.isType(t,Ji)&&p(this.timeSinceEpoch,t.timeSinceEpoch)},Ji.$metadata$={kind:i,simpleName:"Instant",interfaces:[U]},Qi.prototype.ordinal=function(){return this.myOrdinal_hzcl1t$_0},Qi.prototype.getDaysInYear_za3lpa$=function(t){return this.days},Qi.prototype.getDaysInLeapYear=function(){return this.days},Qi.prototype.prev=function(){return 0===this.myOrdinal_hzcl1t$_0?null:io().values()[this.myOrdinal_hzcl1t$_0-1|0]},Qi.prototype.next=function(){var t=io().values();return this.myOrdinal_hzcl1t$_0===(t.length-1|0)?null:t[this.myOrdinal_hzcl1t$_0+1|0]},Qi.prototype.toString=function(){return this.myName_s01cg9$_0},to.prototype.getDaysInLeapYear=function(){return this.myDaysInLeapYear_0},to.prototype.getDaysInYear_za3lpa$=function(t){return Vi().isLeap_kcn2v3$(t)?this.getDaysInLeapYear():this.days},to.$metadata$={kind:i,simpleName:"VarLengthMonth",interfaces:[Qi]},eo.prototype.values=function(){return this.VALUES_0},eo.$metadata$={kind:o,simpleName:"Companion",interfaces:[]};var no=null;function io(){return null===no&&new eo,no}function oo(t,e,n,i){if(fo(),void 0===n&&(n=0),void 0===i&&(i=0),this.hours=t,this.minutes=e,this.seconds=n,this.milliseconds=i,this.hours<0||this.hours>24)throw L();if(24===this.hours&&(0!==this.minutes||0!==this.seconds))throw L();if(this.minutes<0||this.minutes>=60)throw L();if(this.seconds<0||this.seconds>=60)throw L()}function ro(){_o=this,this.DELIMITER_0=58,this.DAY_START=new oo(0,0),this.DAY_END=new oo(24,0)}Qi.$metadata$={kind:i,simpleName:"Month",interfaces:[]},oo.prototype.compareTo_11rb$=function(t){var e=this.hours-t.hours|0;return 0!==e||0!=(e=this.minutes-t.minutes|0)||0!=(e=this.seconds-t.seconds|0)?e:this.milliseconds-t.milliseconds|0},oo.prototype.hashCode=function(){return(239*this.hours|0)+(491*this.minutes|0)+(41*this.seconds|0)+this.milliseconds|0},oo.prototype.equals=function(t){var n;return!!e.isType(t,oo)&&0===this.compareTo_11rb$(z(null==(n=t)||e.isType(n,oo)?n:I()))},oo.prototype.toString=function(){var t=M();return this.hours<10&&t.append_pdl1vj$("0"),t.append_s8jyv4$(this.hours),this.minutes<10&&t.append_pdl1vj$("0"),t.append_s8jyv4$(this.minutes),this.seconds<10&&t.append_pdl1vj$("0"),t.append_s8jyv4$(this.seconds),t.toString()},oo.prototype.toPrettyHMString=function(){var t=M();return this.hours<10&&t.append_pdl1vj$("0"),t.append_s8jyv4$(this.hours).append_s8itvh$(fo().DELIMITER_0),this.minutes<10&&t.append_pdl1vj$("0"),t.append_s8jyv4$(this.minutes),t.toString()},ro.prototype.parse_61zpoe$=function(t){if(t.length<6)throw L();return new oo(F(t.substring(0,2)),F(t.substring(2,4)),F(t.substring(4,6)))},ro.prototype.fromPrettyHMString_61zpoe$=function(t){var n=this.DELIMITER_0;if(!X(t,String.fromCharCode(n)+""))throw L();var i=t.length;if(5!==i&&4!==i)throw L();var o=4===i?1:2;try{var r=F(t.substring(0,o)),a=o+1|0;return new oo(r,F(t.substring(a,i)),0)}catch(t){throw e.isType(t,Z)?L():t}},ro.$metadata$={kind:o,simpleName:"Companion",interfaces:[]};var ao,so,lo,uo,co,po,ho,_o=null;function fo(){return null===_o&&new ro,_o}function mo(t,e,n,i){A.call(this),this.abbreviation=n,this.isWeekend=i,this.name$=t,this.ordinal$=e}function $o(){$o=function(){},ao=new mo("MONDAY",0,"MO",!1),so=new mo("TUESDAY",1,"TU",!1),lo=new mo("WEDNESDAY",2,"WE",!1),uo=new mo("THURSDAY",3,"TH",!1),co=new mo("FRIDAY",4,"FR",!1),po=new mo("SATURDAY",5,"SA",!0),ho=new mo("SUNDAY",6,"SU",!0)}function yo(){return $o(),ao}function go(){return $o(),so}function vo(){return $o(),lo}function bo(){return $o(),uo}function wo(){return $o(),co}function xo(){return $o(),po}function ko(){return $o(),ho}function Co(){return[yo(),go(),vo(),bo(),wo(),xo(),ko()]}function Eo(){}function So(){No=this}function To(t,e){this.closure$weekDay=t,this.closure$month=e}function Oo(t,e,n){this.closure$number=t,this.closure$weekDay=e,this.closure$month=n}oo.$metadata$={kind:i,simpleName:"Time",interfaces:[U]},mo.$metadata$={kind:i,simpleName:"WeekDay",interfaces:[A]},mo.values=Co,mo.valueOf_61zpoe$=function(t){switch(t){case"MONDAY":return yo();case"TUESDAY":return go();case"WEDNESDAY":return vo();case"THURSDAY":return bo();case"FRIDAY":return wo();case"SATURDAY":return xo();case"SUNDAY":return ko();default:R("No enum constant jetbrains.datalore.base.datetime.WeekDay."+t)}},Eo.$metadata$={kind:h,simpleName:"DateSpec",interfaces:[]},Object.defineProperty(To.prototype,"rRule",{configurable:!0,get:function(){return"RRULE:FREQ=YEARLY;BYDAY=-1"+this.closure$weekDay.abbreviation+";BYMONTH="+q(this.closure$month.ordinal()+1|0)}}),To.prototype.getDate_za3lpa$=function(t){for(var e=this.closure$month.getDaysInYear_za3lpa$(t);e>=1;e--){var n=new zi(e,this.closure$month,t);if(n.weekDay===this.closure$weekDay)return n}throw B()},To.$metadata$={kind:i,interfaces:[Eo]},So.prototype.last_kvq57g$=function(t,e){return new To(t,e)},Object.defineProperty(Oo.prototype,"rRule",{configurable:!0,get:function(){return"RRULE:FREQ=YEARLY;BYDAY="+q(this.closure$number)+this.closure$weekDay.abbreviation+";BYMONTH="+q(this.closure$month.ordinal()+1|0)}}),Oo.prototype.getDate_za3lpa$=function(t){for(var n=e.imul(this.closure$number-1|0,Co().length)+1|0,i=this.closure$month.getDaysInYear_za3lpa$(t),o=n;o<=i;o++){var r=new zi(o,this.closure$month,t);if(r.weekDay===this.closure$weekDay)return r}throw B()},Oo.$metadata$={kind:i,interfaces:[Eo]},So.prototype.first_t96ihi$=function(t,e,n){return void 0===n&&(n=1),new Oo(n,t,e)},So.$metadata$={kind:o,simpleName:"DateSpecs",interfaces:[]};var No=null;function Po(){return null===No&&new So,No}function Io(t){jo(),this.id=t}function Ao(){Ro=this,this.UTC=va().utc(),this.BERLIN=va().withEuSummerTime_rwkwum$("Europe/Berlin",Zi().HOUR.mul_s8cxhz$(G)),this.MOSCOW=new Lo,this.NY=va().withUsSummerTime_rwkwum$("America/New_York",Zi().HOUR.mul_s8cxhz$(J))}Io.prototype.convertTo_8hfrhi$=function(t,e){return e===this?t:e.toDateTime_x2y23v$(this.toInstant_amwj4p$(t))},Io.prototype.convertTimeAtDay_aopdye$=function(t,e,n){var i=new Fi(e,t),o=this.convertTo_8hfrhi$(i,n),r=e.compareTo_11rb$(o.date);return 0!==r&&(i=new Fi(r>0?e.nextDate():e.prevDate(),t),o=this.convertTo_8hfrhi$(i,n)),o.time},Io.prototype.getTimeZoneShift_x2y23v$=function(t){var e=this.toDateTime_x2y23v$(t);return t.to_x2y23v$(jo().UTC.toInstant_amwj4p$(e))},Io.prototype.toString=function(){return z(this.id)},Ao.$metadata$={kind:o,simpleName:"Companion",interfaces:[]};var Ro=null;function jo(){return null===Ro&&new Ao,Ro}function Lo(){Mo(),Io.call(this,Mo().ID_0),this.myOldOffset_0=Zi().HOUR.mul_s8cxhz$(Q),this.myNewOffset_0=Zi().HOUR.mul_s8cxhz$(tt),this.myOldTz_0=va().offset_nf4kng$(null,this.myOldOffset_0,jo().UTC),this.myNewTz_0=va().offset_nf4kng$(null,this.myNewOffset_0,jo().UTC),this.myOffsetChangeTime_0=new Fi(new zi(26,io().OCTOBER,2014),new oo(2,0)),this.myOffsetChangeInstant_0=this.myOldTz_0.toInstant_amwj4p$(this.myOffsetChangeTime_0)}function zo(){Do=this,this.ID_0="Europe/Moscow"}Io.$metadata$={kind:i,simpleName:"TimeZone",interfaces:[]},Lo.prototype.toDateTime_x2y23v$=function(t){return t.compareTo_11rb$(this.myOffsetChangeInstant_0)>=0?this.myNewTz_0.toDateTime_x2y23v$(t):this.myOldTz_0.toDateTime_x2y23v$(t)},Lo.prototype.toInstant_amwj4p$=function(t){return t.compareTo_11rb$(this.myOffsetChangeTime_0)>=0?this.myNewTz_0.toInstant_amwj4p$(t):this.myOldTz_0.toInstant_amwj4p$(t)},zo.$metadata$={kind:o,simpleName:"Companion",interfaces:[]};var Do=null;function Mo(){return null===Do&&new zo,Do}function Bo(){ga=this,this.MILLIS_IN_SECOND_0=K,this.MILLIS_IN_MINUTE_0=et,this.MILLIS_IN_HOUR_0=nt,this.MILLIS_IN_DAY_0=it}function Fo(t){Io.call(this,t)}function Uo(t,e,n){this.closure$base=t,this.closure$offset=e,Io.call(this,n)}function qo(t,e,n,i,o){this.closure$startSpec=t,this.closure$utcChangeTime=e,this.closure$endSpec=n,Go.call(this,i,o)}function Ho(t,e,n,i,o){this.closure$startSpec=t,this.closure$offset=e,this.closure$endSpec=n,Go.call(this,i,o)}function Go(t,e){Io.call(this,t),this.myTz_0=va().offset_nf4kng$(null,e,jo().UTC),this.mySummerTz_0=va().offset_nf4kng$(null,e.add_27523k$(Zi().HOUR),jo().UTC)}Lo.$metadata$={kind:i,simpleName:"TimeZoneMoscow",interfaces:[Io]},Bo.prototype.toDateTime_0=function(t,e){var n=t,i=(n=n.add_27523k$(e)).timeSinceEpoch.div(this.MILLIS_IN_DAY_0).toInt(),o=Bi().EPOCH.addDays_za3lpa$(i),r=n.timeSinceEpoch.modulo(this.MILLIS_IN_DAY_0);return new Fi(o,new oo(r.div(this.MILLIS_IN_HOUR_0).toInt(),(r=r.modulo(this.MILLIS_IN_HOUR_0)).div(this.MILLIS_IN_MINUTE_0).toInt(),(r=r.modulo(this.MILLIS_IN_MINUTE_0)).div(this.MILLIS_IN_SECOND_0).toInt(),(r=r.modulo(this.MILLIS_IN_SECOND_0)).modulo(this.MILLIS_IN_SECOND_0).toInt()))},Bo.prototype.toInstant_0=function(t,e){return new Ji(this.toMillis_0(t.date).add(this.toMillis_1(t.time))).sub_27523k$(e)},Bo.prototype.toMillis_1=function(t){return e.Long.fromInt(t.hours).multiply(V).add(e.Long.fromInt(t.minutes)).multiply(e.Long.fromInt(60)).add(e.Long.fromInt(t.seconds)).multiply(e.Long.fromInt(1e3)).add(e.Long.fromInt(t.milliseconds))},Bo.prototype.toMillis_0=function(t){return e.Long.fromInt(t.daysFrom_z9gqti$(Bi().EPOCH)).multiply(this.MILLIS_IN_DAY_0)},Fo.prototype.toDateTime_x2y23v$=function(t){return va().toDateTime_0(t,new Yi(H))},Fo.prototype.toInstant_amwj4p$=function(t){return va().toInstant_0(t,new Yi(H))},Fo.$metadata$={kind:i,interfaces:[Io]},Bo.prototype.utc=function(){return new Fo("UTC")},Uo.prototype.toDateTime_x2y23v$=function(t){return this.closure$base.toDateTime_x2y23v$(t.add_27523k$(this.closure$offset))},Uo.prototype.toInstant_amwj4p$=function(t){return this.closure$base.toInstant_amwj4p$(t).sub_27523k$(this.closure$offset)},Uo.$metadata$={kind:i,interfaces:[Io]},Bo.prototype.offset_nf4kng$=function(t,e,n){return new Uo(n,e,t)},qo.prototype.getStartInstant_za3lpa$=function(t){return jo().UTC.toInstant_amwj4p$(new Fi(this.closure$startSpec.getDate_za3lpa$(t),this.closure$utcChangeTime))},qo.prototype.getEndInstant_za3lpa$=function(t){return jo().UTC.toInstant_amwj4p$(new Fi(this.closure$endSpec.getDate_za3lpa$(t),this.closure$utcChangeTime))},qo.$metadata$={kind:i,interfaces:[Go]},Bo.prototype.withEuSummerTime_rwkwum$=function(t,e){var n=Po().last_kvq57g$(ko(),io().MARCH),i=Po().last_kvq57g$(ko(),io().OCTOBER);return new qo(n,new oo(1,0),i,t,e)},Ho.prototype.getStartInstant_za3lpa$=function(t){return jo().UTC.toInstant_amwj4p$(new Fi(this.closure$startSpec.getDate_za3lpa$(t),new oo(2,0))).sub_27523k$(this.closure$offset)},Ho.prototype.getEndInstant_za3lpa$=function(t){return jo().UTC.toInstant_amwj4p$(new Fi(this.closure$endSpec.getDate_za3lpa$(t),new oo(2,0))).sub_27523k$(this.closure$offset.add_27523k$(Zi().HOUR))},Ho.$metadata$={kind:i,interfaces:[Go]},Bo.prototype.withUsSummerTime_rwkwum$=function(t,e){return new Ho(Po().first_t96ihi$(ko(),io().MARCH,2),e,Po().first_t96ihi$(ko(),io().NOVEMBER),t,e)},Go.prototype.toDateTime_x2y23v$=function(t){var e=this.myTz_0.toDateTime_x2y23v$(t),n=this.getStartInstant_za3lpa$(e.year),i=this.getEndInstant_za3lpa$(e.year);return t.compareTo_11rb$(n)>0&&t.compareTo_11rb$(i)<0?this.mySummerTz_0.toDateTime_x2y23v$(t):e},Go.prototype.toInstant_amwj4p$=function(t){var e=this.toDateTime_x2y23v$(this.getStartInstant_za3lpa$(t.year)),n=this.toDateTime_x2y23v$(this.getEndInstant_za3lpa$(t.year));return t.compareTo_11rb$(e)>0&&t.compareTo_11rb$(n)<0?this.mySummerTz_0.toInstant_amwj4p$(t):this.myTz_0.toInstant_amwj4p$(t)},Go.$metadata$={kind:i,simpleName:"DSTimeZone",interfaces:[Io]},Bo.$metadata$={kind:o,simpleName:"TimeZones",interfaces:[]};var Ko,Vo,Yo,Wo,Xo,Zo,Jo,Qo,tr,er,nr,ir,or,rr,ar,sr,lr,ur,cr,pr,hr,_r,dr,fr,mr,$r,yr,gr,vr,br,wr,xr,kr,Cr,Er,Sr,Tr,Or,Nr,Pr,Ir,Ar,Rr,jr,Lr,zr,Dr,Mr,Br,Fr,Ur,qr,Hr,Gr,Kr,Vr,Yr,Wr,Xr,Zr,Jr,Qr,ta,ea,na,ia,oa,ra,aa,sa,la,ua,ca,pa,ha,_a,da,fa,ma,$a,ya,ga=null;function va(){return null===ga&&new Bo,ga}function ba(){}function wa(t){var e;this.myNormalizedValueMap_0=null,this.myOriginalNames_0=null;var n=t.length,i=at(n),o=r(n);for(e=0;e!==t.length;++e){var a=t[e],s=a.toString();o.add_11rb$(s);var l=this.toNormalizedName_0(s),u=i.put_xwzc9p$(l,a);if(null!=u)throw E("duplicate values: '"+a+"', '"+q(u)+"'")}this.myOriginalNames_0=o,this.myNormalizedValueMap_0=i}function xa(t,e){A.call(this),this.name$=t,this.ordinal$=e}function ka(){ka=function(){},Ko=new xa("NONE",0),Vo=new xa("LEFT",1),Yo=new xa("MIDDLE",2),Wo=new xa("RIGHT",3)}function Ca(){return ka(),Ko}function Ea(){return ka(),Vo}function Sa(){return ka(),Yo}function Ta(){return ka(),Wo}function Oa(){this.eventContext_qzl3re$_d6nbbo$_0=null,this.isConsumed_gb68t5$_0=!1}function Na(t,e,n){A.call(this),this.myValue_n4kdnj$_0=n,this.name$=t,this.ordinal$=e}function Pa(){Pa=function(){},Xo=new Na("A",0,"A"),Zo=new Na("B",1,"B"),Jo=new Na("C",2,"C"),Qo=new Na("D",3,"D"),tr=new Na("E",4,"E"),er=new Na("F",5,"F"),nr=new Na("G",6,"G"),ir=new Na("H",7,"H"),or=new Na("I",8,"I"),rr=new Na("J",9,"J"),ar=new Na("K",10,"K"),sr=new Na("L",11,"L"),lr=new Na("M",12,"M"),ur=new Na("N",13,"N"),cr=new Na("O",14,"O"),pr=new Na("P",15,"P"),hr=new Na("Q",16,"Q"),_r=new Na("R",17,"R"),dr=new Na("S",18,"S"),fr=new Na("T",19,"T"),mr=new Na("U",20,"U"),$r=new Na("V",21,"V"),yr=new Na("W",22,"W"),gr=new Na("X",23,"X"),vr=new Na("Y",24,"Y"),br=new Na("Z",25,"Z"),wr=new Na("DIGIT_0",26,"0"),xr=new Na("DIGIT_1",27,"1"),kr=new Na("DIGIT_2",28,"2"),Cr=new Na("DIGIT_3",29,"3"),Er=new Na("DIGIT_4",30,"4"),Sr=new Na("DIGIT_5",31,"5"),Tr=new Na("DIGIT_6",32,"6"),Or=new Na("DIGIT_7",33,"7"),Nr=new Na("DIGIT_8",34,"8"),Pr=new Na("DIGIT_9",35,"9"),Ir=new Na("LEFT_BRACE",36,"["),Ar=new Na("RIGHT_BRACE",37,"]"),Rr=new Na("UP",38,"Up"),jr=new Na("DOWN",39,"Down"),Lr=new Na("LEFT",40,"Left"),zr=new Na("RIGHT",41,"Right"),Dr=new Na("PAGE_UP",42,"Page Up"),Mr=new Na("PAGE_DOWN",43,"Page Down"),Br=new Na("ESCAPE",44,"Escape"),Fr=new Na("ENTER",45,"Enter"),Ur=new Na("HOME",46,"Home"),qr=new Na("END",47,"End"),Hr=new Na("TAB",48,"Tab"),Gr=new Na("SPACE",49,"Space"),Kr=new Na("INSERT",50,"Insert"),Vr=new Na("DELETE",51,"Delete"),Yr=new Na("BACKSPACE",52,"Backspace"),Wr=new Na("EQUALS",53,"Equals"),Xr=new Na("BACK_QUOTE",54,"`"),Zr=new Na("PLUS",55,"Plus"),Jr=new Na("MINUS",56,"Minus"),Qr=new Na("SLASH",57,"Slash"),ta=new Na("CONTROL",58,"Ctrl"),ea=new Na("META",59,"Meta"),na=new Na("ALT",60,"Alt"),ia=new Na("SHIFT",61,"Shift"),oa=new Na("UNKNOWN",62,"?"),ra=new Na("F1",63,"F1"),aa=new Na("F2",64,"F2"),sa=new Na("F3",65,"F3"),la=new Na("F4",66,"F4"),ua=new Na("F5",67,"F5"),ca=new Na("F6",68,"F6"),pa=new Na("F7",69,"F7"),ha=new Na("F8",70,"F8"),_a=new Na("F9",71,"F9"),da=new Na("F10",72,"F10"),fa=new Na("F11",73,"F11"),ma=new Na("F12",74,"F12"),$a=new Na("COMMA",75,","),ya=new Na("PERIOD",76,".")}function Ia(){return Pa(),Xo}function Aa(){return Pa(),Zo}function Ra(){return Pa(),Jo}function ja(){return Pa(),Qo}function La(){return Pa(),tr}function za(){return Pa(),er}function Da(){return Pa(),nr}function Ma(){return Pa(),ir}function Ba(){return Pa(),or}function Fa(){return Pa(),rr}function Ua(){return Pa(),ar}function qa(){return Pa(),sr}function Ha(){return Pa(),lr}function Ga(){return Pa(),ur}function Ka(){return Pa(),cr}function Va(){return Pa(),pr}function Ya(){return Pa(),hr}function Wa(){return Pa(),_r}function Xa(){return Pa(),dr}function Za(){return Pa(),fr}function Ja(){return Pa(),mr}function Qa(){return Pa(),$r}function ts(){return Pa(),yr}function es(){return Pa(),gr}function ns(){return Pa(),vr}function is(){return Pa(),br}function os(){return Pa(),wr}function rs(){return Pa(),xr}function as(){return Pa(),kr}function ss(){return Pa(),Cr}function ls(){return Pa(),Er}function us(){return Pa(),Sr}function cs(){return Pa(),Tr}function ps(){return Pa(),Or}function hs(){return Pa(),Nr}function _s(){return Pa(),Pr}function ds(){return Pa(),Ir}function fs(){return Pa(),Ar}function ms(){return Pa(),Rr}function $s(){return Pa(),jr}function ys(){return Pa(),Lr}function gs(){return Pa(),zr}function vs(){return Pa(),Dr}function bs(){return Pa(),Mr}function ws(){return Pa(),Br}function xs(){return Pa(),Fr}function ks(){return Pa(),Ur}function Cs(){return Pa(),qr}function Es(){return Pa(),Hr}function Ss(){return Pa(),Gr}function Ts(){return Pa(),Kr}function Os(){return Pa(),Vr}function Ns(){return Pa(),Yr}function Ps(){return Pa(),Wr}function Is(){return Pa(),Xr}function As(){return Pa(),Zr}function Rs(){return Pa(),Jr}function js(){return Pa(),Qr}function Ls(){return Pa(),ta}function zs(){return Pa(),ea}function Ds(){return Pa(),na}function Ms(){return Pa(),ia}function Bs(){return Pa(),oa}function Fs(){return Pa(),ra}function Us(){return Pa(),aa}function qs(){return Pa(),sa}function Hs(){return Pa(),la}function Gs(){return Pa(),ua}function Ks(){return Pa(),ca}function Vs(){return Pa(),pa}function Ys(){return Pa(),ha}function Ws(){return Pa(),_a}function Xs(){return Pa(),da}function Zs(){return Pa(),fa}function Js(){return Pa(),ma}function Qs(){return Pa(),$a}function tl(){return Pa(),ya}function el(){this.keyStroke=null,this.keyChar=null}function nl(t,e,n,i){return i=i||Object.create(el.prototype),Oa.call(i),el.call(i),i.keyStroke=ul(t,n),i.keyChar=e,i}function il(t,e,n,i){al(),this.isCtrl=t,this.isAlt=e,this.isShift=n,this.isMeta=i}function ol(){var t;rl=this,this.EMPTY_MODIFIERS_0=(t=t||Object.create(il.prototype),il.call(t,!1,!1,!1,!1),t)}ba.$metadata$={kind:h,simpleName:"EnumInfo",interfaces:[]},Object.defineProperty(wa.prototype,"originalNames",{configurable:!0,get:function(){return this.myOriginalNames_0}}),wa.prototype.toNormalizedName_0=function(t){return t.toUpperCase()},wa.prototype.safeValueOf_7po0m$=function(t,e){var n=this.safeValueOf_pdl1vj$(t);return null!=n?n:e},wa.prototype.safeValueOf_pdl1vj$=function(t){return this.hasValue_pdl1vj$(t)?this.myNormalizedValueMap_0.get_11rb$(this.toNormalizedName_0(z(t))):null},wa.prototype.hasValue_pdl1vj$=function(t){return null!=t&&this.myNormalizedValueMap_0.containsKey_11rb$(this.toNormalizedName_0(t))},wa.prototype.unsafeValueOf_61zpoe$=function(t){var e;if(null==(e=this.safeValueOf_pdl1vj$(t)))throw E("name not found: '"+t+"'");return e},wa.$metadata$={kind:i,simpleName:"EnumInfoImpl",interfaces:[ba]},xa.$metadata$={kind:i,simpleName:"Button",interfaces:[A]},xa.values=function(){return[Ca(),Ea(),Sa(),Ta()]},xa.valueOf_61zpoe$=function(t){switch(t){case"NONE":return Ca();case"LEFT":return Ea();case"MIDDLE":return Sa();case"RIGHT":return Ta();default:R("No enum constant jetbrains.datalore.base.event.Button."+t)}},Object.defineProperty(Oa.prototype,"eventContext_qzl3re$_0",{configurable:!0,get:function(){return this.eventContext_qzl3re$_d6nbbo$_0},set:function(t){if(null!=this.eventContext_qzl3re$_0)throw g("Already set "+q(z(this.eventContext_qzl3re$_0)));if(this.isConsumed)throw g("Can't set a context to the consumed event");if(null==t)throw E("Can't set null context");this.eventContext_qzl3re$_d6nbbo$_0=t}}),Object.defineProperty(Oa.prototype,"isConsumed",{configurable:!0,get:function(){return this.isConsumed_gb68t5$_0},set:function(t){this.isConsumed_gb68t5$_0=t}}),Oa.prototype.consume=function(){this.doConsume_smptag$_0()},Oa.prototype.doConsume_smptag$_0=function(){if(this.isConsumed)throw st();this.isConsumed=!0},Oa.prototype.ensureConsumed=function(){this.isConsumed||this.consume()},Oa.$metadata$={kind:i,simpleName:"Event",interfaces:[]},Na.prototype.toString=function(){return this.myValue_n4kdnj$_0},Na.$metadata$={kind:i,simpleName:"Key",interfaces:[A]},Na.values=function(){return[Ia(),Aa(),Ra(),ja(),La(),za(),Da(),Ma(),Ba(),Fa(),Ua(),qa(),Ha(),Ga(),Ka(),Va(),Ya(),Wa(),Xa(),Za(),Ja(),Qa(),ts(),es(),ns(),is(),os(),rs(),as(),ss(),ls(),us(),cs(),ps(),hs(),_s(),ds(),fs(),ms(),$s(),ys(),gs(),vs(),bs(),ws(),xs(),ks(),Cs(),Es(),Ss(),Ts(),Os(),Ns(),Ps(),Is(),As(),Rs(),js(),Ls(),zs(),Ds(),Ms(),Bs(),Fs(),Us(),qs(),Hs(),Gs(),Ks(),Vs(),Ys(),Ws(),Xs(),Zs(),Js(),Qs(),tl()]},Na.valueOf_61zpoe$=function(t){switch(t){case"A":return Ia();case"B":return Aa();case"C":return Ra();case"D":return ja();case"E":return La();case"F":return za();case"G":return Da();case"H":return Ma();case"I":return Ba();case"J":return Fa();case"K":return Ua();case"L":return qa();case"M":return Ha();case"N":return Ga();case"O":return Ka();case"P":return Va();case"Q":return Ya();case"R":return Wa();case"S":return Xa();case"T":return Za();case"U":return Ja();case"V":return Qa();case"W":return ts();case"X":return es();case"Y":return ns();case"Z":return is();case"DIGIT_0":return os();case"DIGIT_1":return rs();case"DIGIT_2":return as();case"DIGIT_3":return ss();case"DIGIT_4":return ls();case"DIGIT_5":return us();case"DIGIT_6":return cs();case"DIGIT_7":return ps();case"DIGIT_8":return hs();case"DIGIT_9":return _s();case"LEFT_BRACE":return ds();case"RIGHT_BRACE":return fs();case"UP":return ms();case"DOWN":return $s();case"LEFT":return ys();case"RIGHT":return gs();case"PAGE_UP":return vs();case"PAGE_DOWN":return bs();case"ESCAPE":return ws();case"ENTER":return xs();case"HOME":return ks();case"END":return Cs();case"TAB":return Es();case"SPACE":return Ss();case"INSERT":return Ts();case"DELETE":return Os();case"BACKSPACE":return Ns();case"EQUALS":return Ps();case"BACK_QUOTE":return Is();case"PLUS":return As();case"MINUS":return Rs();case"SLASH":return js();case"CONTROL":return Ls();case"META":return zs();case"ALT":return Ds();case"SHIFT":return Ms();case"UNKNOWN":return Bs();case"F1":return Fs();case"F2":return Us();case"F3":return qs();case"F4":return Hs();case"F5":return Gs();case"F6":return Ks();case"F7":return Vs();case"F8":return Ys();case"F9":return Ws();case"F10":return Xs();case"F11":return Zs();case"F12":return Js();case"COMMA":return Qs();case"PERIOD":return tl();default:R("No enum constant jetbrains.datalore.base.event.Key."+t)}},Object.defineProperty(el.prototype,"key",{configurable:!0,get:function(){return this.keyStroke.key}}),Object.defineProperty(el.prototype,"modifiers",{configurable:!0,get:function(){return this.keyStroke.modifiers}}),el.prototype.is_ji7i3y$=function(t,e){return this.keyStroke.is_ji7i3y$(t,e.slice())},el.prototype.is_c4rqdo$=function(t){var e;for(e=0;e!==t.length;++e)if(t[e].matches_l9pgtg$(this.keyStroke))return!0;return!1},el.prototype.is_4t3vif$=function(t){var e;for(e=0;e!==t.length;++e)if(t[e].matches_l9pgtg$(this.keyStroke))return!0;return!1},el.prototype.has_hny0b7$=function(t){return this.keyStroke.has_hny0b7$(t)},el.prototype.copy=function(){return nl(this.key,lt(this.keyChar),this.modifiers)},el.prototype.toString=function(){return this.keyStroke.toString()},el.$metadata$={kind:i,simpleName:"KeyEvent",interfaces:[Oa]},ol.prototype.emptyModifiers=function(){return this.EMPTY_MODIFIERS_0},ol.prototype.withShift=function(){return new il(!1,!1,!0,!1)},ol.$metadata$={kind:o,simpleName:"Companion",interfaces:[]};var rl=null;function al(){return null===rl&&new ol,rl}function sl(){this.key=null,this.modifiers=null}function ll(t,e,n){return n=n||Object.create(sl.prototype),ul(t,ht(e),n),n}function ul(t,e,n){return n=n||Object.create(sl.prototype),sl.call(n),n.key=t,n.modifiers=pt(e),n}function cl(){this.myKeyStrokes_0=null}function pl(t,e,n){return n=n||Object.create(cl.prototype),cl.call(n),n.myKeyStrokes_0=[ll(t,e.slice())],n}function hl(t,e){return e=e||Object.create(cl.prototype),cl.call(e),e.myKeyStrokes_0=dt(t),e}function _l(t,e){return e=e||Object.create(cl.prototype),cl.call(e),e.myKeyStrokes_0=t.slice(),e}function dl(){gl=this,this.COPY=this.composite_c4rqdo$([this.ctrlOrMeta_ji7i3y$(Ra(),[]),pl(Ts(),[wl()])]),this.CUT=this.composite_c4rqdo$([this.ctrlOrMeta_ji7i3y$(es(),[]),pl(Os(),[kl()])]),this.PASTE=this.composite_c4rqdo$([this.ctrlOrMeta_ji7i3y$(Qa(),[]),pl(Ts(),[kl()])]),this.UNDO=this.ctrlOrMeta_ji7i3y$(is(),[]),this.REDO=this.UNDO.with_hny0b7$(kl()),this.COMPLETE=pl(Ss(),[wl()]),this.SHOW_DOC=this.composite_c4rqdo$([pl(Fs(),[]),this.ctrlOrMeta_ji7i3y$(Fa(),[])]),this.HELP=this.composite_c4rqdo$([this.ctrlOrMeta_ji7i3y$(Ba(),[]),this.ctrlOrMeta_ji7i3y$(Fs(),[])]),this.HOME=this.composite_4t3vif$([ll(ks(),[]),ll(ys(),[Cl()])]),this.END=this.composite_4t3vif$([ll(Cs(),[]),ll(gs(),[Cl()])]),this.FILE_HOME=this.ctrlOrMeta_ji7i3y$(ks(),[]),this.FILE_END=this.ctrlOrMeta_ji7i3y$(Cs(),[]),this.PREV_WORD=this.ctrlOrAlt_ji7i3y$(ys(),[]),this.NEXT_WORD=this.ctrlOrAlt_ji7i3y$(gs(),[]),this.NEXT_EDITABLE=this.ctrlOrMeta_ji7i3y$(gs(),[xl()]),this.PREV_EDITABLE=this.ctrlOrMeta_ji7i3y$(ys(),[xl()]),this.SELECT_ALL=this.ctrlOrMeta_ji7i3y$(Ia(),[]),this.SELECT_FILE_HOME=this.FILE_HOME.with_hny0b7$(kl()),this.SELECT_FILE_END=this.FILE_END.with_hny0b7$(kl()),this.SELECT_HOME=this.HOME.with_hny0b7$(kl()),this.SELECT_END=this.END.with_hny0b7$(kl()),this.SELECT_WORD_FORWARD=this.NEXT_WORD.with_hny0b7$(kl()),this.SELECT_WORD_BACKWARD=this.PREV_WORD.with_hny0b7$(kl()),this.SELECT_LEFT=pl(ys(),[kl()]),this.SELECT_RIGHT=pl(gs(),[kl()]),this.SELECT_UP=pl(ms(),[kl()]),this.SELECT_DOWN=pl($s(),[kl()]),this.INCREASE_SELECTION=pl(ms(),[xl()]),this.DECREASE_SELECTION=pl($s(),[xl()]),this.INSERT_BEFORE=this.composite_4t3vif$([ul(xs(),this.add_0(Cl(),[])),ll(Ts(),[]),ul(xs(),this.add_0(wl(),[]))]),this.INSERT_AFTER=pl(xs(),[]),this.INSERT=this.composite_c4rqdo$([this.INSERT_BEFORE,this.INSERT_AFTER]),this.DUPLICATE=this.ctrlOrMeta_ji7i3y$(ja(),[]),this.DELETE_CURRENT=this.composite_c4rqdo$([this.ctrlOrMeta_ji7i3y$(Ns(),[]),this.ctrlOrMeta_ji7i3y$(Os(),[])]),this.DELETE_TO_WORD_START=pl(Ns(),[xl()]),this.MATCHING_CONSTRUCTS=this.composite_c4rqdo$([this.ctrlOrMeta_ji7i3y$(ds(),[xl()]),this.ctrlOrMeta_ji7i3y$(fs(),[xl()])]),this.NAVIGATE=this.ctrlOrMeta_ji7i3y$(Aa(),[]),this.NAVIGATE_BACK=this.ctrlOrMeta_ji7i3y$(ds(),[]),this.NAVIGATE_FORWARD=this.ctrlOrMeta_ji7i3y$(fs(),[])}il.$metadata$={kind:i,simpleName:"KeyModifiers",interfaces:[]},sl.prototype.has_hny0b7$=function(t){return this.modifiers.contains_11rb$(t)},sl.prototype.is_ji7i3y$=function(t,e){return this.matches_l9pgtg$(ll(t,e.slice()))},sl.prototype.matches_l9pgtg$=function(t){return this.equals(t)},sl.prototype.with_hny0b7$=function(t){var e=pt(this.modifiers);return e.add_11rb$(t),ul(this.key,e)},sl.prototype.hashCode=function(){return(31*this.key.hashCode()|0)+D(this.modifiers)|0},sl.prototype.equals=function(t){var n;if(!e.isType(t,sl))return!1;var i=null==(n=t)||e.isType(n,sl)?n:I();return this.key===z(i).key&&p(this.modifiers,z(i).modifiers)},sl.prototype.toString=function(){return this.key.toString()+" "+this.modifiers},sl.$metadata$={kind:i,simpleName:"KeyStroke",interfaces:[]},Object.defineProperty(cl.prototype,"keyStrokes",{configurable:!0,get:function(){return _t(this.myKeyStrokes_0.slice())}}),Object.defineProperty(cl.prototype,"isEmpty",{configurable:!0,get:function(){return 0===this.myKeyStrokes_0.length}}),cl.prototype.matches_l9pgtg$=function(t){var e,n;for(e=this.myKeyStrokes_0,n=0;n!==e.length;++n)if(e[n].matches_l9pgtg$(t))return!0;return!1},cl.prototype.with_hny0b7$=function(t){var e,n,i=l();for(e=this.myKeyStrokes_0,n=0;n!==e.length;++n){var o=e[n];i.add_11rb$(o.with_hny0b7$(t))}return hl(i)},cl.prototype.equals=function(t){var n,i;if(this===t)return!0;if(null==t||null==(n=e.getKClassFromExpression(this))||!n.equals(e.getKClassFromExpression(t)))return!1;var o=null==(i=t)||e.isType(i,cl)?i:I();return p(this.keyStrokes,z(o).keyStrokes)},cl.prototype.hashCode=function(){return D(this.keyStrokes)},cl.prototype.toString=function(){return this.keyStrokes.toString()},cl.$metadata$={kind:i,simpleName:"KeyStrokeSpec",interfaces:[]},dl.prototype.ctrlOrMeta_ji7i3y$=function(t,e){return this.composite_4t3vif$([ul(t,this.add_0(wl(),e.slice())),ul(t,this.add_0(Cl(),e.slice()))])},dl.prototype.ctrlOrAlt_ji7i3y$=function(t,e){return this.composite_4t3vif$([ul(t,this.add_0(wl(),e.slice())),ul(t,this.add_0(xl(),e.slice()))])},dl.prototype.add_0=function(t,e){var n=pt(ht(e));return n.add_11rb$(t),n},dl.prototype.composite_c4rqdo$=function(t){var e,n,i=ft();for(e=0;e!==t.length;++e)for(n=t[e].keyStrokes.iterator();n.hasNext();){var o=n.next();i.add_11rb$(o)}return hl(i)},dl.prototype.composite_4t3vif$=function(t){return _l(t.slice())},dl.prototype.withoutShift_b0jlop$=function(t){var e,n=t.keyStrokes.iterator().next(),i=n.modifiers,o=ft();for(e=i.iterator();e.hasNext();){var r=e.next();r!==kl()&&o.add_11rb$(r)}return nl(n.key,ut(0),o)},dl.$metadata$={kind:o,simpleName:"KeyStrokeSpecs",interfaces:[]};var fl,ml,$l,yl,gl=null;function vl(t,e){A.call(this),this.name$=t,this.ordinal$=e}function bl(){bl=function(){},fl=new vl("CONTROL",0),ml=new vl("ALT",1),$l=new vl("SHIFT",2),yl=new vl("META",3)}function wl(){return bl(),fl}function xl(){return bl(),ml}function kl(){return bl(),$l}function Cl(){return bl(),yl}function El(t,e,n,i){if(zl(),Xl.call(this,t,e),this.button=n,this.modifiers=i,null==this.button)throw E("Null button".toString())}function Sl(){Ll=this}vl.$metadata$={kind:i,simpleName:"ModifierKey",interfaces:[A]},vl.values=function(){return[wl(),xl(),kl(),Cl()]},vl.valueOf_61zpoe$=function(t){switch(t){case"CONTROL":return wl();case"ALT":return xl();case"SHIFT":return kl();case"META":return Cl();default:R("No enum constant jetbrains.datalore.base.event.ModifierKey."+t)}},Sl.prototype.noButton_119tl4$=function(t){return Dl(t,Ca(),al().emptyModifiers())},Sl.prototype.leftButton_119tl4$=function(t){return Dl(t,Ea(),al().emptyModifiers())},Sl.prototype.middleButton_119tl4$=function(t){return Dl(t,Sa(),al().emptyModifiers())},Sl.prototype.rightButton_119tl4$=function(t){return Dl(t,Ta(),al().emptyModifiers())},Sl.$metadata$={kind:o,simpleName:"Companion",interfaces:[]};var Tl,Ol,Nl,Pl,Il,Al,Rl,jl,Ll=null;function zl(){return null===Ll&&new Sl,Ll}function Dl(t,e,n,i){return i=i||Object.create(El.prototype),El.call(i,t.x,t.y,e,n),i}function Ml(){}function Bl(t,e){A.call(this),this.name$=t,this.ordinal$=e}function Fl(){Fl=function(){},Tl=new Bl("MOUSE_ENTERED",0),Ol=new Bl("MOUSE_LEFT",1),Nl=new Bl("MOUSE_MOVED",2),Pl=new Bl("MOUSE_DRAGGED",3),Il=new Bl("MOUSE_CLICKED",4),Al=new Bl("MOUSE_DOUBLE_CLICKED",5),Rl=new Bl("MOUSE_PRESSED",6),jl=new Bl("MOUSE_RELEASED",7)}function Ul(){return Fl(),Tl}function ql(){return Fl(),Ol}function Hl(){return Fl(),Nl}function Gl(){return Fl(),Pl}function Kl(){return Fl(),Il}function Vl(){return Fl(),Al}function Yl(){return Fl(),Rl}function Wl(){return Fl(),jl}function Xl(t,e){Oa.call(this),this.x=t,this.y=e}function Zl(){}function Jl(){su=this,this.TRUE_PREDICATE_0=iu,this.FALSE_PREDICATE_0=ou,this.NULL_PREDICATE_0=ru,this.NOT_NULL_PREDICATE_0=au}function Ql(t){this.closure$value=t}function tu(t){return t}function eu(t){this.closure$lambda=t}function nu(t){this.mySupplier_0=t,this.myCachedValue_0=null,this.myCached_0=!1}function iu(t){return!0}function ou(t){return!1}function ru(t){return null==t}function au(t){return null!=t}El.$metadata$={kind:i,simpleName:"MouseEvent",interfaces:[Xl]},Ml.$metadata$={kind:h,simpleName:"MouseEventSource",interfaces:[]},Bl.$metadata$={kind:i,simpleName:"MouseEventSpec",interfaces:[A]},Bl.values=function(){return[Ul(),ql(),Hl(),Gl(),Kl(),Vl(),Yl(),Wl()]},Bl.valueOf_61zpoe$=function(t){switch(t){case"MOUSE_ENTERED":return Ul();case"MOUSE_LEFT":return ql();case"MOUSE_MOVED":return Hl();case"MOUSE_DRAGGED":return Gl();case"MOUSE_CLICKED":return Kl();case"MOUSE_DOUBLE_CLICKED":return Vl();case"MOUSE_PRESSED":return Yl();case"MOUSE_RELEASED":return Wl();default:R("No enum constant jetbrains.datalore.base.event.MouseEventSpec."+t)}},Object.defineProperty(Xl.prototype,"location",{configurable:!0,get:function(){return new Mu(this.x,this.y)}}),Xl.prototype.toString=function(){return"{x="+this.x+",y="+this.y+"}"},Xl.$metadata$={kind:i,simpleName:"PointEvent",interfaces:[Oa]},Zl.$metadata$={kind:h,simpleName:"Function",interfaces:[]},Ql.prototype.get=function(){return this.closure$value},Ql.$metadata$={kind:i,interfaces:[uu]},Jl.prototype.constantSupplier_mh5how$=function(t){return new Ql(t)},Jl.prototype.memorize_kji2v1$=function(t){return new nu(t)},Jl.prototype.alwaysTrue_287e2$=function(){return this.TRUE_PREDICATE_0},Jl.prototype.alwaysFalse_287e2$=function(){return this.FALSE_PREDICATE_0},Jl.prototype.constant_jkq9vw$=function(t){return e=t,function(t){return e};var e},Jl.prototype.isNull_287e2$=function(){return this.NULL_PREDICATE_0},Jl.prototype.isNotNull_287e2$=function(){return this.NOT_NULL_PREDICATE_0},Jl.prototype.identity_287e2$=function(){return tu},Jl.prototype.same_tpy1pm$=function(t){return e=t,function(t){return t===e};var e},eu.prototype.apply_11rb$=function(t){return this.closure$lambda(t)},eu.$metadata$={kind:i,interfaces:[Zl]},Jl.prototype.funcOf_7h29gk$=function(t){return new eu(t)},nu.prototype.get=function(){return this.myCached_0||(this.myCachedValue_0=this.mySupplier_0.get(),this.myCached_0=!0),z(this.myCachedValue_0)},nu.$metadata$={kind:i,simpleName:"Memo",interfaces:[uu]},Jl.$metadata$={kind:o,simpleName:"Functions",interfaces:[]};var su=null;function lu(){}function uu(){}function cu(t){this.myValue_0=t}function pu(){hu=this}lu.$metadata$={kind:h,simpleName:"Runnable",interfaces:[]},uu.$metadata$={kind:h,simpleName:"Supplier",interfaces:[]},cu.prototype.get=function(){return this.myValue_0},cu.prototype.set_11rb$=function(t){this.myValue_0=t},cu.prototype.toString=function(){return""+q(this.myValue_0)},cu.$metadata$={kind:i,simpleName:"Value",interfaces:[uu]},pu.prototype.getRootCause_tcv7n7$=function(t){for(var e=t,n=!1,i=t;null!=i.cause;){if((i=z(i.cause))===e)throw new mt("Loop in causal chain detected.",i);n&&(e=z(e.cause)),n=!n}return i},pu.$metadata$={kind:o,simpleName:"Throwables",interfaces:[]};var hu=null;function _u(t){mu.call(this),this.myComparator_0=t}function du(){fu=this}_u.prototype.compare=function(t,e){return this.myComparator_0.compare(t,e)},_u.$metadata$={kind:i,simpleName:"ComparatorOrdering",interfaces:[mu]},du.prototype.checkNonNegative_0=function(t){if(t<0)throw new $t(t.toString())},du.prototype.isEmpty_fakr2g$=function(t){var n,i,o;return null!=(o=null!=(i=e.isType(n=t,yt)?n:null)?i.isEmpty():null)?o:!t.iterator().hasNext()},du.$metadata$={kind:o,simpleName:"Iterables",interfaces:[]};var fu=null;function mu(){vu()}function $u(t){this.this$Ordering=t}function yu(){gu=this}mu.prototype.isOrdered_p1ys8y$=function(t){var e=t.iterator();if(e.hasNext())for(var n=e.next();e.hasNext();){var i=e.next();if(this.compare(n,i)>0)return!1;n=i}return!0},$u.prototype.compare=function(t,e){return this.this$Ordering.compare(t,e)},$u.$metadata$={kind:i,interfaces:[gt]},mu.prototype.sortedCopy_m5x2f4$=function(t){return vt(t,new $u(this))},mu.prototype.reverse=function(){return new _u(bt(this))},mu.prototype.min_t5quzl$=function(t,e){return this.compare(t,e)<=0?t:e},mu.prototype.min_m5x2f4$=function(t){return this.min_x5a2gs$(t.iterator())},mu.prototype.min_x5a2gs$=function(t){for(var e=t.next();t.hasNext();)e=this.min_t5quzl$(e,t.next());return e},mu.prototype.max_t5quzl$=function(t,e){return this.compare(t,e)>=0?t:e},mu.prototype.max_m5x2f4$=function(t){return this.max_x5a2gs$(t.iterator())},mu.prototype.max_x5a2gs$=function(t){for(var e=t.next();t.hasNext();)e=this.max_t5quzl$(e,t.next());return e},yu.prototype.from_iajr8b$=function(t){var n;return e.isType(t,mu)?e.isType(n=t,mu)?n:I():new _u(t)},yu.prototype.natural_dahdeg$=function(){return new _u(wt())},yu.$metadata$={kind:o,simpleName:"Companion",interfaces:[]};var gu=null;function vu(){return null===gu&&new yu,gu}function bu(){this.elements_0=l()}function wu(t,e){Cu(),this.origin=t,this.dimension=e}function xu(){ku=this}mu.$metadata$={kind:i,simpleName:"Ordering",interfaces:[gt]},bu.prototype.empty=function(){return this.elements_0.isEmpty()},bu.prototype.push_11rb$=function(t){return this.elements_0.add_11rb$(t)},bu.prototype.pop=function(){return this.elements_0.isEmpty()?null:this.elements_0.removeAt_za3lpa$(this.elements_0.size-1|0)},bu.prototype.peek=function(){return xt(this.elements_0)},bu.$metadata$={kind:i,simpleName:"Stack",interfaces:[]},Object.defineProperty(wu.prototype,"center",{configurable:!0,get:function(){return this.origin.add_gpjtzr$(this.dimension.mul_14dthe$(.5))}}),Object.defineProperty(wu.prototype,"left",{configurable:!0,get:function(){return this.origin.x}}),Object.defineProperty(wu.prototype,"right",{configurable:!0,get:function(){return this.origin.x+this.dimension.x}}),Object.defineProperty(wu.prototype,"top",{configurable:!0,get:function(){return this.origin.y}}),Object.defineProperty(wu.prototype,"bottom",{configurable:!0,get:function(){return this.origin.y+this.dimension.y}}),Object.defineProperty(wu.prototype,"width",{configurable:!0,get:function(){return this.dimension.x}}),Object.defineProperty(wu.prototype,"height",{configurable:!0,get:function(){return this.dimension.y}}),Object.defineProperty(wu.prototype,"parts",{configurable:!0,get:function(){var t=l();return t.add_11rb$(new Iu(this.origin,this.origin.add_gpjtzr$(new Au(this.dimension.x,0)))),t.add_11rb$(new Iu(this.origin,this.origin.add_gpjtzr$(new Au(0,this.dimension.y)))),t.add_11rb$(new Iu(this.origin.add_gpjtzr$(this.dimension),this.origin.add_gpjtzr$(new Au(this.dimension.x,0)))),t.add_11rb$(new Iu(this.origin.add_gpjtzr$(this.dimension),this.origin.add_gpjtzr$(new Au(0,this.dimension.y)))),t}}),wu.prototype.xRange=function(){return new qu(this.origin.x,this.origin.x+this.dimension.x)},wu.prototype.yRange=function(){return new qu(this.origin.y,this.origin.y+this.dimension.y)},wu.prototype.contains_gpjtzr$=function(t){return this.origin.x<=t.x&&this.origin.x+this.dimension.x>=t.x&&this.origin.y<=t.y&&this.origin.y+this.dimension.y>=t.y},wu.prototype.flip=function(){return new wu(this.origin.flip(),this.dimension.flip())},wu.prototype.union_wthzt5$=function(t){var e=this.origin.min_gpjtzr$(t.origin),n=this.origin.add_gpjtzr$(this.dimension),i=t.origin.add_gpjtzr$(t.dimension);return new wu(e,n.max_gpjtzr$(i).subtract_gpjtzr$(e))},wu.prototype.intersects_wthzt5$=function(t){var e=this.origin,n=this.origin.add_gpjtzr$(this.dimension),i=t.origin,o=t.origin.add_gpjtzr$(t.dimension);return o.x>=e.x&&n.x>=i.x&&o.y>=e.y&&n.y>=i.y},wu.prototype.intersect_wthzt5$=function(t){var e=this.origin,n=this.origin.add_gpjtzr$(this.dimension),i=t.origin,o=t.origin.add_gpjtzr$(t.dimension),r=e.max_gpjtzr$(i),a=n.min_gpjtzr$(o).subtract_gpjtzr$(r);return a.x<0||a.y<0?null:new wu(r,a)},wu.prototype.add_gpjtzr$=function(t){return new wu(this.origin.add_gpjtzr$(t),this.dimension)},wu.prototype.subtract_gpjtzr$=function(t){return new wu(this.origin.subtract_gpjtzr$(t),this.dimension)},wu.prototype.distance_gpjtzr$=function(t){var e,n=0,i=!1;for(e=this.parts.iterator();e.hasNext();){var o=e.next();if(i){var r=o.distance_gpjtzr$(t);r=0&&n.dotProduct_gpjtzr$(o)>=0},Iu.prototype.intersection_69p9e5$=function(t){var e=this.start,n=t.start,i=this.end.subtract_gpjtzr$(this.start),o=t.end.subtract_gpjtzr$(t.start),r=i.dotProduct_gpjtzr$(o.orthogonal());if(0===r)return null;var a=n.subtract_gpjtzr$(e).dotProduct_gpjtzr$(o.orthogonal())/r;if(a<0||a>1)return null;var s=o.dotProduct_gpjtzr$(i.orthogonal()),l=e.subtract_gpjtzr$(n).dotProduct_gpjtzr$(i.orthogonal())/s;return l<0||l>1?null:e.add_gpjtzr$(i.mul_14dthe$(a))},Iu.prototype.length=function(){return this.start.subtract_gpjtzr$(this.end).length()},Iu.prototype.equals=function(t){var n;if(!e.isType(t,Iu))return!1;var i=null==(n=t)||e.isType(n,Iu)?n:I();return z(i).start.equals(this.start)&&i.end.equals(this.end)},Iu.prototype.hashCode=function(){return(31*this.start.hashCode()|0)+this.end.hashCode()|0},Iu.prototype.toString=function(){return"["+this.start+" -> "+this.end+"]"},Iu.$metadata$={kind:i,simpleName:"DoubleSegment",interfaces:[]},Object.defineProperty(Au.prototype,"isFinite",{configurable:!0,get:function(){return Ct(this.x)&&Ct(this.y)}}),Au.prototype.add_gpjtzr$=function(t){return new Au(this.x+t.x,this.y+t.y)},Au.prototype.subtract_gpjtzr$=function(t){return new Au(this.x-t.x,this.y-t.y)},Au.prototype.max_gpjtzr$=function(t){var e=this.x,n=t.x,i=v.max(e,n),o=this.y,r=t.y;return new Au(i,v.max(o,r))},Au.prototype.min_gpjtzr$=function(t){var e=this.x,n=t.x,i=v.min(e,n),o=this.y,r=t.y;return new Au(i,v.min(o,r))},Au.prototype.mul_14dthe$=function(t){return new Au(this.x*t,this.y*t)},Au.prototype.dotProduct_gpjtzr$=function(t){return this.x*t.x+this.y*t.y},Au.prototype.negate=function(){return new Au(-this.x,-this.y)},Au.prototype.orthogonal=function(){return new Au(-this.y,this.x)},Au.prototype.length=function(){var t=this.x*this.x+this.y*this.y;return v.sqrt(t)},Au.prototype.normalize=function(){return this.mul_14dthe$(1/this.length())},Au.prototype.rotate_14dthe$=function(t){return new Au(this.x*v.cos(t)-this.y*v.sin(t),this.x*v.sin(t)+this.y*v.cos(t))},Au.prototype.flip=function(){return new Au(this.y,this.x)},Au.prototype.equals=function(t){var n;if(!e.isType(t,Au))return!1;var i=null==(n=t)||e.isType(n,Au)?n:I();return z(i).x===this.x&&i.y===this.y},Au.prototype.hashCode=function(){return D(this.x)+(31*D(this.y)|0)|0},Au.prototype.toString=function(){return"("+this.x+", "+this.y+")"},Ru.$metadata$={kind:o,simpleName:"Companion",interfaces:[]};var ju=null;function Lu(){return null===ju&&new Ru,ju}function zu(t,e){this.origin=t,this.dimension=e}function Du(t,e){this.start=t,this.end=e}function Mu(t,e){Uu(),this.x=t,this.y=e}function Bu(){Fu=this,this.ZERO=new Mu(0,0)}Au.$metadata$={kind:i,simpleName:"DoubleVector",interfaces:[]},Object.defineProperty(zu.prototype,"boundSegments",{configurable:!0,get:function(){var t=this.boundPoints_0;return[new Du(t[0],t[1]),new Du(t[1],t[2]),new Du(t[2],t[3]),new Du(t[3],t[0])]}}),Object.defineProperty(zu.prototype,"boundPoints_0",{configurable:!0,get:function(){return[this.origin,this.origin.add_119tl4$(new Mu(this.dimension.x,0)),this.origin.add_119tl4$(this.dimension),this.origin.add_119tl4$(new Mu(0,this.dimension.y))]}}),zu.prototype.add_119tl4$=function(t){return new zu(this.origin.add_119tl4$(t),this.dimension)},zu.prototype.sub_119tl4$=function(t){return new zu(this.origin.sub_119tl4$(t),this.dimension)},zu.prototype.contains_vfns7u$=function(t){return this.contains_119tl4$(t.origin)&&this.contains_119tl4$(t.origin.add_119tl4$(t.dimension))},zu.prototype.contains_119tl4$=function(t){return this.origin.x<=t.x&&(this.origin.x+this.dimension.x|0)>=t.x&&this.origin.y<=t.y&&(this.origin.y+this.dimension.y|0)>=t.y},zu.prototype.union_vfns7u$=function(t){var e=this.origin.min_119tl4$(t.origin),n=this.origin.add_119tl4$(this.dimension),i=t.origin.add_119tl4$(t.dimension);return new zu(e,n.max_119tl4$(i).sub_119tl4$(e))},zu.prototype.intersects_vfns7u$=function(t){var e=this.origin,n=this.origin.add_119tl4$(this.dimension),i=t.origin,o=t.origin.add_119tl4$(t.dimension);return o.x>=e.x&&n.x>=i.x&&o.y>=e.y&&n.y>=i.y},zu.prototype.intersect_vfns7u$=function(t){if(!this.intersects_vfns7u$(t))throw g("rectangle ["+this+"] doesn't intersect ["+t+"]");var e=this.origin.add_119tl4$(this.dimension),n=t.origin.add_119tl4$(t.dimension),i=e.min_119tl4$(n),o=this.origin.max_119tl4$(t.origin);return new zu(o,i.sub_119tl4$(o))},zu.prototype.innerIntersects_vfns7u$=function(t){var e=this.origin,n=this.origin.add_119tl4$(this.dimension),i=t.origin,o=t.origin.add_119tl4$(t.dimension);return o.x>e.x&&n.x>i.x&&o.y>e.y&&n.y>i.y},zu.prototype.changeDimension_119tl4$=function(t){return new zu(this.origin,t)},zu.prototype.distance_119tl4$=function(t){return this.toDoubleRectangle_0().distance_gpjtzr$(t.toDoubleVector())},zu.prototype.xRange=function(){return new Vu(this.origin.x,this.origin.x+this.dimension.x|0)},zu.prototype.yRange=function(){return new Vu(this.origin.y,this.origin.y+this.dimension.y|0)},zu.prototype.hashCode=function(){return(31*this.origin.hashCode()|0)+this.dimension.hashCode()|0},zu.prototype.equals=function(t){var n,i,o;if(!e.isType(t,zu))return!1;var r=null==(n=t)||e.isType(n,zu)?n:I();return(null!=(i=this.origin)?i.equals(z(r).origin):null)&&(null!=(o=this.dimension)?o.equals(r.dimension):null)},zu.prototype.toDoubleRectangle_0=function(){return new wu(this.origin.toDoubleVector(),this.dimension.toDoubleVector())},zu.prototype.center=function(){return this.origin.add_119tl4$(new Mu(this.dimension.x/2|0,this.dimension.y/2|0))},zu.prototype.toString=function(){return this.origin.toString()+" - "+this.dimension},zu.$metadata$={kind:i,simpleName:"Rectangle",interfaces:[]},Du.prototype.distance_119tl4$=function(t){var n=this.start.sub_119tl4$(t),i=this.end.sub_119tl4$(t);if(this.isDistanceToLineBest_0(t))return Et(e.imul(n.x,i.y)-e.imul(n.y,i.x)|0)/this.length();var o=n.toDoubleVector().length(),r=i.toDoubleVector().length();return v.min(o,r)},Du.prototype.isDistanceToLineBest_0=function(t){var e=this.start.sub_119tl4$(this.end),n=e.negate(),i=t.sub_119tl4$(this.end),o=t.sub_119tl4$(this.start);return e.dotProduct_119tl4$(i)>=0&&n.dotProduct_119tl4$(o)>=0},Du.prototype.toDoubleSegment=function(){return new Iu(this.start.toDoubleVector(),this.end.toDoubleVector())},Du.prototype.intersection_51grtu$=function(t){return this.toDoubleSegment().intersection_69p9e5$(t.toDoubleSegment())},Du.prototype.length=function(){return this.start.sub_119tl4$(this.end).length()},Du.prototype.contains_119tl4$=function(t){var e=t.sub_119tl4$(this.start),n=t.sub_119tl4$(this.end);return!!e.isParallel_119tl4$(n)&&e.dotProduct_119tl4$(n)<=0},Du.prototype.equals=function(t){var n,i,o;if(!e.isType(t,Du))return!1;var r=null==(n=t)||e.isType(n,Du)?n:I();return(null!=(i=z(r).start)?i.equals(this.start):null)&&(null!=(o=r.end)?o.equals(this.end):null)},Du.prototype.hashCode=function(){return(31*this.start.hashCode()|0)+this.end.hashCode()|0},Du.prototype.toString=function(){return"["+this.start+" -> "+this.end+"]"},Du.$metadata$={kind:i,simpleName:"Segment",interfaces:[]},Bu.$metadata$={kind:o,simpleName:"Companion",interfaces:[]};var Fu=null;function Uu(){return null===Fu&&new Bu,Fu}function qu(t,e){if(Ku(),Yu.call(this),this.lowerEnd_77ys8f$_0=v.min(t,e),this.upperEnd_jfdci8$_0=v.max(t,e),this.length=this.upperEnd-this.lowerEnd,!Ct(t)||!Ct(e))throw g(("Ends must be finite: lower="+t+" upper="+e).toString())}function Hu(){Gu=this}Mu.prototype.add_119tl4$=function(t){return new Mu(this.x+t.x|0,this.y+t.y|0)},Mu.prototype.sub_119tl4$=function(t){return this.add_119tl4$(t.negate())},Mu.prototype.negate=function(){return new Mu(0|-this.x,0|-this.y)},Mu.prototype.max_119tl4$=function(t){var e=this.x,n=t.x,i=v.max(e,n),o=this.y,r=t.y;return new Mu(i,v.max(o,r))},Mu.prototype.min_119tl4$=function(t){var e=this.x,n=t.x,i=v.min(e,n),o=this.y,r=t.y;return new Mu(i,v.min(o,r))},Mu.prototype.mul_za3lpa$=function(t){return new Mu(e.imul(this.x,t),e.imul(this.y,t))},Mu.prototype.div_za3lpa$=function(t){return new Mu(this.x/t|0,this.y/t|0)},Mu.prototype.dotProduct_119tl4$=function(t){return e.imul(this.x,t.x)+e.imul(this.y,t.y)|0},Mu.prototype.length=function(){var t=e.imul(this.x,this.x)+e.imul(this.y,this.y)|0;return v.sqrt(t)},Mu.prototype.toDoubleVector=function(){return new Au(this.x,this.y)},Mu.prototype.abs=function(){return new Mu(Et(this.x),Et(this.y))},Mu.prototype.isParallel_119tl4$=function(t){return 0==(e.imul(this.x,t.y)-e.imul(t.x,this.y)|0)},Mu.prototype.orthogonal=function(){return new Mu(0|-this.y,this.x)},Mu.prototype.equals=function(t){var n;if(!e.isType(t,Mu))return!1;var i=null==(n=t)||e.isType(n,Mu)?n:I();return this.x===z(i).x&&this.y===i.y},Mu.prototype.hashCode=function(){return(31*this.x|0)+this.y|0},Mu.prototype.toString=function(){return"("+this.x+", "+this.y+")"},Mu.$metadata$={kind:i,simpleName:"Vector",interfaces:[]},Object.defineProperty(qu.prototype,"lowerEnd",{configurable:!0,get:function(){return this.lowerEnd_77ys8f$_0}}),Object.defineProperty(qu.prototype,"upperEnd",{configurable:!0,get:function(){return this.upperEnd_jfdci8$_0}}),qu.prototype.contains_14dthe$=function(t){return t>=this.lowerEnd&&t<=this.upperEnd},qu.prototype.contains_3lmjpf$=function(t){return this.lowerEnd<=t.lowerEnd&&this.upperEnd>=t.upperEnd},qu.prototype.encloses_3lmjpf$=function(t){return this.lowerEnd<=t.lowerEnd&&this.upperEnd>=t.upperEnd},qu.prototype.connected_3lmjpf$=function(t){return!(this.lowerEnd>t.upperEnd||this.upperEnd=this.lowerEnd&&t<=this.upperEnd},Vu.prototype.encloses_rwq86h$=function(t){return this.lowerEnd<=t.lowerEnd&&this.upperEnd>=t.upperEnd},Vu.prototype.connected_rwq86h$=function(t){return!(this.lowerEnd>t.upperEnd||this.upperEnd0;)n=n+1|0,i=i.div(e.Long.fromInt(10));return n}function $p(t){Ap(),this.spec_0=t}function yp(t,e,n,i,o,r,a,s,l,u){void 0===t&&(t=" "),void 0===e&&(e=">"),void 0===n&&(n="-"),void 0===r&&(r=-1),void 0===s&&(s=6),void 0===l&&(l=""),void 0===u&&(u=!1),this.fill=t,this.align=e,this.sign=n,this.symbol=i,this.zero=o,this.width=r,this.comma=a,this.precision=s,this.type=l,this.trim=u}function gp(t,n,i,o,r){xp(),void 0===t&&(t=0),void 0===n&&(n=!1),void 0===i&&(i=H),void 0===o&&(o=H),void 0===r&&(r=null),this.number=t,this.negative=n,this.integerPart=i,this.fractionalPart=o,this.exponent=r,this.fractionLeadingZeros=18-mp(this.fractionalPart)|0,this.integerLength=mp(this.integerPart),this.fractionString=fe("0",this.fractionLeadingZeros)+me(this.fractionalPart.toString(),e.charArrayOf(48))}function vp(){wp=this,this.MAX_DECIMALS_0=18,this.MAX_DECIMAL_VALUE_8be2vx$=e.Long.fromNumber(v.pow(10,18))}function bp(t,n){var i=t;n>18&&(i=O(t,T(0,t.length-(n-18)|0)));var o=he(i),r=_e(18-n|0,0);return o.multiply(e.Long.fromNumber(v.pow(10,r)))}Object.defineProperty(Qc.prototype,"isEmpty",{configurable:!0,get:function(){return 0===this.size()}}),Qc.prototype.containsKey_11rb$=function(t){return this.findByKey_0(t)>=0},Qc.prototype.remove_11rb$=function(t){var n,i=this.findByKey_0(t);if(i>=0){var o=this.myData_0[i+1|0];return this.removeAt_0(i),null==(n=o)||e.isType(n,ie)?n:I()}return null},Object.defineProperty(ip.prototype,"size",{configurable:!0,get:function(){return this.this$ListMap.size()}}),ip.prototype.add_11rb$=function(t){throw g("Not available in keySet")},op.prototype.get_za3lpa$=function(t){return this.this$ListMap.myData_0[t]},op.$metadata$={kind:i,interfaces:[pp]},ip.prototype.iterator=function(){return this.this$ListMap.mapIterator_0(new op(this.this$ListMap))},ip.$metadata$={kind:i,interfaces:[oe]},Qc.prototype.keySet=function(){return new ip(this)},Object.defineProperty(rp.prototype,"size",{configurable:!0,get:function(){return this.this$ListMap.size()}}),ap.prototype.get_za3lpa$=function(t){return this.this$ListMap.myData_0[t+1|0]},ap.$metadata$={kind:i,interfaces:[pp]},rp.prototype.iterator=function(){return this.this$ListMap.mapIterator_0(new ap(this.this$ListMap))},rp.$metadata$={kind:i,interfaces:[re]},Qc.prototype.values=function(){return new rp(this)},Object.defineProperty(sp.prototype,"size",{configurable:!0,get:function(){return this.this$ListMap.size()}}),lp.prototype.get_za3lpa$=function(t){return new cp(this.this$ListMap,t)},lp.$metadata$={kind:i,interfaces:[pp]},sp.prototype.iterator=function(){return this.this$ListMap.mapIterator_0(new lp(this.this$ListMap))},sp.$metadata$={kind:i,interfaces:[ae]},Qc.prototype.entrySet=function(){return new sp(this)},Qc.prototype.size=function(){return this.myData_0.length/2|0},Qc.prototype.put_xwzc9p$=function(t,n){var i,o=this.findByKey_0(t);if(o>=0){var r=this.myData_0[o+1|0];return this.myData_0[o+1|0]=n,null==(i=r)||e.isType(i,ie)?i:I()}var a,s=ue(this.myData_0.length+2|0);a=s.length-1|0;for(var l=0;l<=a;l++)s[l]=l=18)return kp(t,he(l),H,p);if(!(p<18))throw g("Check failed.".toString());if(p<0)return kp(t,void 0,o(l+u,Et(p)+u.length|0));if(!(p>=0&&p<=18))throw g("Check failed.".toString());if(p>=u.length)return kp(t,he(l+u+fe("0",p-u.length|0)));if(!(p>=0&&p=^]))?([+ -])?([#$])?(0)?(\\d+)?(,)?(?:\\.(\\d+))?([%bcdefgosXx])?$")}function Tp(t){return S(t,"")}gp.$metadata$={kind:i,simpleName:"NumberInfo",interfaces:[]},gp.prototype.component1=function(){return this.number},gp.prototype.component2=function(){return this.negative},gp.prototype.component3=function(){return this.integerPart},gp.prototype.component4=function(){return this.fractionalPart},gp.prototype.component5=function(){return this.exponent},gp.prototype.copy_xz9h4k$=function(t,e,n,i,o){return new gp(void 0===t?this.number:t,void 0===e?this.negative:e,void 0===n?this.integerPart:n,void 0===i?this.fractionalPart:i,void 0===o?this.exponent:o)},gp.prototype.toString=function(){return"NumberInfo(number="+e.toString(this.number)+", negative="+e.toString(this.negative)+", integerPart="+e.toString(this.integerPart)+", fractionalPart="+e.toString(this.fractionalPart)+", exponent="+e.toString(this.exponent)+")"},gp.prototype.hashCode=function(){var t=0;return 31*(t=31*(t=31*(t=31*(t=31*t+e.hashCode(this.number)|0)+e.hashCode(this.negative)|0)+e.hashCode(this.integerPart)|0)+e.hashCode(this.fractionalPart)|0)+e.hashCode(this.exponent)|0},gp.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.number,t.number)&&e.equals(this.negative,t.negative)&&e.equals(this.integerPart,t.integerPart)&&e.equals(this.fractionalPart,t.fractionalPart)&&e.equals(this.exponent,t.exponent)},Cp.$metadata$={kind:i,simpleName:"Output",interfaces:[]},Cp.prototype.component1=function(){return this.body},Cp.prototype.component2=function(){return this.sign},Cp.prototype.component3=function(){return this.prefix},Cp.prototype.component4=function(){return this.suffix},Cp.prototype.component5=function(){return this.padding},Cp.prototype.copy_rm1j3u$=function(t,e,n,i,o){return new Cp(void 0===t?this.body:t,void 0===e?this.sign:e,void 0===n?this.prefix:n,void 0===i?this.suffix:i,void 0===o?this.padding:o)},Cp.prototype.toString=function(){return"Output(body="+e.toString(this.body)+", sign="+e.toString(this.sign)+", prefix="+e.toString(this.prefix)+", suffix="+e.toString(this.suffix)+", padding="+e.toString(this.padding)+")"},Cp.prototype.hashCode=function(){var t=0;return 31*(t=31*(t=31*(t=31*(t=31*t+e.hashCode(this.body)|0)+e.hashCode(this.sign)|0)+e.hashCode(this.prefix)|0)+e.hashCode(this.suffix)|0)+e.hashCode(this.padding)|0},Cp.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.body,t.body)&&e.equals(this.sign,t.sign)&&e.equals(this.prefix,t.prefix)&&e.equals(this.suffix,t.suffix)&&e.equals(this.padding,t.padding)},Ep.prototype.toString=function(){var t,e=this.integerPart,n=Ap().FRACTION_DELIMITER_0;return e+(null!=(t=this.fractionalPart.length>0?n:null)?t:"")+this.fractionalPart+this.exponentialPart},Ep.$metadata$={kind:i,simpleName:"FormattedNumber",interfaces:[]},Ep.prototype.component1=function(){return this.integerPart},Ep.prototype.component2=function(){return this.fractionalPart},Ep.prototype.component3=function(){return this.exponentialPart},Ep.prototype.copy_6hosri$=function(t,e,n){return new Ep(void 0===t?this.integerPart:t,void 0===e?this.fractionalPart:e,void 0===n?this.exponentialPart:n)},Ep.prototype.hashCode=function(){var t=0;return 31*(t=31*(t=31*t+e.hashCode(this.integerPart)|0)+e.hashCode(this.fractionalPart)|0)+e.hashCode(this.exponentialPart)|0},Ep.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.integerPart,t.integerPart)&&e.equals(this.fractionalPart,t.fractionalPart)&&e.equals(this.exponentialPart,t.exponentialPart)},$p.prototype.apply_3p81yu$=function(t){var e=this.handleNonNumbers_0(t);if(null!=e)return e;var n=xp().createNumberInfo_yjmjg9$(t),i=new Cp;return i=this.computeBody_0(i,n),i=this.trimFraction_0(i),i=this.computeSign_0(i,n),i=this.computePrefix_0(i),i=this.computeSuffix_0(i),this.spec_0.comma&&!this.spec_0.zero&&(i=this.applyGroup_0(i)),i=this.computePadding_0(i),this.spec_0.comma&&this.spec_0.zero&&(i=this.applyGroup_0(i)),this.getAlignedString_0(i)},$p.prototype.handleNonNumbers_0=function(t){var e=ee(t);return $e(e)?"NaN":e===ye.NEGATIVE_INFINITY?"-Infinity":e===ye.POSITIVE_INFINITY?"+Infinity":null},$p.prototype.getAlignedString_0=function(t){var e;switch(this.spec_0.align){case"<":e=t.sign+t.prefix+t.body+t.suffix+t.padding;break;case"=":e=t.sign+t.prefix+t.padding+t.body+t.suffix;break;case"^":var n=t.padding.length/2|0;e=ge(t.padding,T(0,n))+t.sign+t.prefix+t.body+t.suffix+ge(t.padding,T(n,t.padding.length));break;default:e=t.padding+t.sign+t.prefix+t.body+t.suffix}return e},$p.prototype.applyGroup_0=function(t){var e,n,i=t.padding,o=null!=(e=this.spec_0.zero?i:null)?e:"",r=t.body,a=o+r.integerPart,s=a.length/3,l=jt(v.ceil(s)-1),u=_e(this.spec_0.width-r.fractionalLength-r.exponentialPart.length|0,r.integerPart.length+l|0);if((a=Ap().group_0(a)).length>u){var c=a,p=a.length-u|0;a=c.substring(p),ve(a,44)&&(a="0"+a)}return t.copy_rm1j3u$(r.copy_6hosri$(a),void 0,void 0,void 0,null!=(n=this.spec_0.zero?"":null)?n:t.padding)},$p.prototype.computeBody_0=function(t,e){var n;switch(this.spec_0.type){case"%":n=this.toFixedFormat_0(xp().createNumberInfo_yjmjg9$(100*e.number),this.spec_0.precision);break;case"c":n=new Ep(e.number.toString());break;case"d":n=this.toSimpleFormat_0(e,0);break;case"e":n=this.toSimpleFormat_0(this.toExponential_0(e,this.spec_0.precision),this.spec_0.precision);break;case"f":n=this.toFixedFormat_0(e,this.spec_0.precision);break;case"g":n=this.toPrecisionFormat_0(e,this.spec_0.precision);break;case"b":n=new Ep(we(be(e.number),2));break;case"o":n=new Ep(we(be(e.number),8));break;case"X":n=new Ep(we(be(e.number),16).toUpperCase());break;case"x":n=new Ep(we(be(e.number),16));break;case"s":n=this.toSiFormat_0(e,this.spec_0.precision);break;default:throw E("Wrong type: "+this.spec_0.type)}var i=n;return t.copy_rm1j3u$(i)},$p.prototype.toExponential_0=function(t,e){var n;void 0===e&&(e=-1);var i=t.number;if(i-1&&(s=this.roundToPrecision_0(s,e)),s.integerLength>1&&(o=o+1|0,s=xp().createNumberInfo_yjmjg9$(a/10)),s.copy_xz9h4k$(void 0,void 0,void 0,void 0,o)},$p.prototype.toPrecisionFormat_0=function(t,e){return void 0===e&&(e=-1),p(t.integerPart,H)?p(t.fractionalPart,H)?this.toFixedFormat_0(t,e-1|0):this.toFixedFormat_0(t,e+t.fractionLeadingZeros|0):t.integerLength>e?this.toSimpleFormat_0(this.toExponential_0(t,e-1|0),e-1|0):this.toFixedFormat_0(t,e-t.integerLength|0)},$p.prototype.toFixedFormat_0=function(t,e){if(void 0===e&&(e=0),e<=0)return new Ep(be(t.number).toString());var n=this.roundToPrecision_0(t,e),i=t.integerLength=0?"+":"")+q(t.exponent):"",i=xp().createNumberInfo_yjmjg9$(t.integerPart.toNumber()+t.fractionalPart.toNumber()/xp().MAX_DECIMAL_VALUE_8be2vx$.toNumber());return e>-1?this.toFixedFormat_0(i,e).copy_6hosri$(void 0,void 0,n):new Ep(i.integerPart.toString(),p(i.fractionalPart,H)?"":i.fractionString,n)},$p.prototype.toSiFormat_0=function(t,e){var n;void 0===e&&(e=-1);var i=(null!=(n=(null==t.exponent?this.toExponential_0(t,e-1|0):t).exponent)?n:0)/3,o=3*jt(Ee(Ce(v.floor(i),-8),8))|0,r=xp(),a=t.number,s=0|-o,l=r.createNumberInfo_yjmjg9$(a*v.pow(10,s)),u=8+(o/3|0)|0,c=Ap().SI_SUFFIXES_0[u];return this.toFixedFormat_0(l,e-l.integerLength|0).copy_6hosri$(void 0,void 0,c)},$p.prototype.roundToPrecision_0=function(t,n){var i;void 0===n&&(n=0);var o,r,a=n+(null!=(i=t.exponent)?i:0)|0;if(a<0){o=H;var s=Et(a);r=t.integerLength<=s?H:t.integerPart.div(e.Long.fromNumber(v.pow(10,s))).multiply(e.Long.fromNumber(v.pow(10,s)))}else{var l=xp().MAX_DECIMAL_VALUE_8be2vx$.div(e.Long.fromNumber(v.pow(10,a)));o=p(l,H)?t.fractionalPart:be(t.fractionalPart.toNumber()/l.toNumber()).multiply(l),r=t.integerPart,p(o,xp().MAX_DECIMAL_VALUE_8be2vx$)&&(o=H,r=r.inc())}var u=r.toNumber()+o.toNumber()/xp().MAX_DECIMAL_VALUE_8be2vx$.toNumber();return t.copy_xz9h4k$(u,void 0,r,o)},$p.prototype.trimFraction_0=function(t){var n=!this.spec_0.trim;if(n||(n=0===t.body.fractionalPart.length),n)return t;var i=me(t.body.fractionalPart,e.charArrayOf(48));return t.copy_rm1j3u$(t.body.copy_6hosri$(void 0,i))},$p.prototype.computeSign_0=function(t,e){var n,i=t.body,o=Te(Se(i.integerPart),Se(i.fractionalPart));t:do{var r;for(r=o.iterator();r.hasNext();){var a=r.next();if(48!==lt(a)){n=!1;break t}}n=!0}while(0);var s=n,l=e.negative&&!s?"-":p(this.spec_0.sign,"-")?"":this.spec_0.sign;return t.copy_rm1j3u$(void 0,l)},$p.prototype.computePrefix_0=function(t){var e;switch(this.spec_0.symbol){case"$":e=Ap().CURRENCY_0;break;case"#":e=Oe("boxX",this.spec_0.type)>-1?"0"+this.spec_0.type.toLowerCase():"";break;default:e=""}var n=e;return t.copy_rm1j3u$(void 0,void 0,n)},$p.prototype.computeSuffix_0=function(t){var e=Ap().PERCENT_0,n=p(this.spec_0.type,"%")?e:null;return t.copy_rm1j3u$(void 0,void 0,void 0,null!=n?n:"")},$p.prototype.computePadding_0=function(t){var e=t.sign.length+t.prefix.length+t.body.fullLength+t.suffix.length|0,n=e",null!=(s=null!=(a=m.groups.get_za3lpa$(3))?a.value:null)?s:"-",null!=(u=null!=(l=m.groups.get_za3lpa$(4))?l.value:null)?u:"",null!=m.groups.get_za3lpa$(5),F(null!=(p=null!=(c=m.groups.get_za3lpa$(6))?c.value:null)?p:"-1"),null!=m.groups.get_za3lpa$(7),F(null!=(_=null!=(h=m.groups.get_za3lpa$(8))?h.value:null)?_:"6"),null!=(f=null!=(d=m.groups.get_za3lpa$(9))?d.value:null)?f:"")},Sp.prototype.group_0=function(t){var n,i,o=Pe(At(Ne(Se(Ie(e.isCharSequence(n=t)?n:I()).toString()),3),Tp),this.COMMA_0);return Ie(e.isCharSequence(i=o)?i:I()).toString()},Sp.$metadata$={kind:o,simpleName:"Companion",interfaces:[]};var Op,Np,Pp,Ip=null;function Ap(){return null===Ip&&new Sp,Ip}function Rp(t,e){return e=e||Object.create($p.prototype),$p.call(e,Ap().create_61zpoe$(t)),e}function jp(t){ih.call(this),this.myParent_2riath$_0=t,this.addListener_n5no9j$(new Dp)}function Lp(t,e){this.closure$item=t,this.this$ChildList=e}function zp(t,e){this.this$ChildList=t,this.closure$index=e}function Dp(){Up.call(this)}function Mp(){}function Bp(){}function Fp(){this.myParent_eaa9sw$_0=new dh,this.myPositionData_2io8uh$_0=null}function Up(){}function qp(t,e,n,i){if(this.oldItem=t,this.newItem=e,this.index=n,this.type=i,Kp()===this.type&&null!=this.oldItem||Yp()===this.type&&null!=this.newItem)throw st()}function Hp(t,e){A.call(this),this.name$=t,this.ordinal$=e}function Gp(){Gp=function(){},Op=new Hp("ADD",0),Np=new Hp("SET",1),Pp=new Hp("REMOVE",2)}function Kp(){return Gp(),Op}function Vp(){return Gp(),Np}function Yp(){return Gp(),Pp}function Wp(){}function Xp(){}function Zp(){Re.call(this),this.myListeners_ky8jhb$_0=null}function Jp(t){this.closure$event=t}function Qp(t){this.closure$event=t}function th(t){this.closure$event=t}function eh(t){this.this$AbstractObservableList=t,ch.call(this)}function nh(t){this.closure$handler=t}function ih(){Zp.call(this),this.myContainer_2lyzpq$_0=null}function oh(){}function rh(){}function ah(t){this.closure$onEvent=t}function sh(){}function lh(){}function uh(){}function ch(){this.myListeners_30lqoe$_0=null,this.myFireDepth_t4vnc0$_0=0,this.myListenersCount_umrzvt$_0=0}function ph(t,e){this.this$Listeners=t,this.closure$l=e,Ih.call(this)}function hh(t,e){this.listener=t,this.add=e}function _h(){this.propExpr_4jt19b$_0=e.getKClassFromExpression(this).toString()}function dh(t){void 0===t&&(t=null),_h.call(this),this.myValue_0=t,this.myHandlers_0=null,this.myPendingEvent_0=null}function fh(t){this.this$DelayedValueProperty=t}function mh(t){this.this$DelayedValueProperty=t,ch.call(this)}function $h(){}function yh(){bh=this}function gh(t){this.closure$target=t}function vh(t,e,n,i){this.closure$syncing=t,this.closure$target=e,this.closure$source=n,this.myForward_0=i}$p.$metadata$={kind:i,simpleName:"NumberFormat",interfaces:[]},jp.prototype.checkAdd_wxm5ur$=function(t,e){if(ih.prototype.checkAdd_wxm5ur$.call(this,t,e),null!=e.parentProperty().get())throw L()},Object.defineProperty(zp.prototype,"role",{configurable:!0,get:function(){return this.this$ChildList}}),zp.prototype.get=function(){return this.this$ChildList.size<=this.closure$index?null:this.this$ChildList.get_za3lpa$(this.closure$index)},zp.$metadata$={kind:i,interfaces:[Mp]},Lp.prototype.get=function(){var t=this.this$ChildList.indexOf_11rb$(this.closure$item);return new zp(this.this$ChildList,t)},Lp.prototype.remove=function(){this.this$ChildList.remove_11rb$(this.closure$item)},Lp.$metadata$={kind:i,interfaces:[Bp]},jp.prototype.beforeItemAdded_wxm5ur$=function(t,e){e.parentProperty().set_11rb$(this.myParent_2riath$_0),e.setPositionData_uvvaqs$(new Lp(e,this))},jp.prototype.checkSet_hu11d4$=function(t,e,n){ih.prototype.checkSet_hu11d4$.call(this,t,e,n),this.checkRemove_wxm5ur$(t,e),this.checkAdd_wxm5ur$(t,n)},jp.prototype.beforeItemSet_hu11d4$=function(t,e,n){this.beforeItemAdded_wxm5ur$(t,n)},jp.prototype.checkRemove_wxm5ur$=function(t,e){if(ih.prototype.checkRemove_wxm5ur$.call(this,t,e),e.parentProperty().get()!==this.myParent_2riath$_0)throw L()},Dp.prototype.onItemAdded_u8tacu$=function(t){z(t.newItem).parentProperty().flush()},Dp.prototype.onItemRemoved_u8tacu$=function(t){var e=t.oldItem;z(e).parentProperty().set_11rb$(null),e.setPositionData_uvvaqs$(null),e.parentProperty().flush()},Dp.$metadata$={kind:i,interfaces:[Up]},jp.$metadata$={kind:i,simpleName:"ChildList",interfaces:[ih]},Mp.$metadata$={kind:h,simpleName:"Position",interfaces:[]},Bp.$metadata$={kind:h,simpleName:"PositionData",interfaces:[]},Object.defineProperty(Fp.prototype,"position",{configurable:!0,get:function(){if(null==this.myPositionData_2io8uh$_0)throw st();return z(this.myPositionData_2io8uh$_0).get()}}),Fp.prototype.removeFromParent=function(){null!=this.myPositionData_2io8uh$_0&&z(this.myPositionData_2io8uh$_0).remove()},Fp.prototype.parentProperty=function(){return this.myParent_eaa9sw$_0},Fp.prototype.setPositionData_uvvaqs$=function(t){this.myPositionData_2io8uh$_0=t},Fp.$metadata$={kind:i,simpleName:"SimpleComposite",interfaces:[]},Up.prototype.onItemAdded_u8tacu$=function(t){},Up.prototype.onItemSet_u8tacu$=function(t){this.onItemRemoved_u8tacu$(new qp(t.oldItem,null,t.index,Yp())),this.onItemAdded_u8tacu$(new qp(null,t.newItem,t.index,Kp()))},Up.prototype.onItemRemoved_u8tacu$=function(t){},Up.$metadata$={kind:i,simpleName:"CollectionAdapter",interfaces:[Wp]},qp.prototype.dispatch_11rb$=function(t){Kp()===this.type?t.onItemAdded_u8tacu$(this):Vp()===this.type?t.onItemSet_u8tacu$(this):t.onItemRemoved_u8tacu$(this)},qp.prototype.toString=function(){return Kp()===this.type?q(this.newItem)+" added at "+q(this.index):Vp()===this.type?q(this.oldItem)+" replaced with "+q(this.newItem)+" at "+q(this.index):q(this.oldItem)+" removed at "+q(this.index)},qp.prototype.equals=function(t){var n;return this===t||!(null==t||null==(n=e.getKClassFromExpression(this))||!n.equals(e.getKClassFromExpression(t)))&&(e.isType(t,qp)||I(),!!p(this.oldItem,t.oldItem)&&!!p(this.newItem,t.newItem)&&this.index===t.index&&this.type===t.type)},qp.prototype.hashCode=function(){var t,e,n,i,o=null!=(e=null!=(t=this.oldItem)?D(t):null)?e:0;return(31*(o=(31*(o=(31*o|0)+(null!=(i=null!=(n=this.newItem)?D(n):null)?i:0)|0)|0)+this.index|0)|0)+this.type.hashCode()|0},Hp.$metadata$={kind:i,simpleName:"EventType",interfaces:[A]},Hp.values=function(){return[Kp(),Vp(),Yp()]},Hp.valueOf_61zpoe$=function(t){switch(t){case"ADD":return Kp();case"SET":return Vp();case"REMOVE":return Yp();default:R("No enum constant jetbrains.datalore.base.observable.collections.CollectionItemEvent.EventType."+t)}},qp.$metadata$={kind:i,simpleName:"CollectionItemEvent",interfaces:[uh]},Wp.$metadata$={kind:h,simpleName:"CollectionListener",interfaces:[]},Xp.$metadata$={kind:h,simpleName:"ObservableCollection",interfaces:[sh,Ae]},Zp.prototype.checkAdd_wxm5ur$=function(t,e){if(t<0||t>this.size)throw new $t("Add: index="+t+", size="+this.size)},Zp.prototype.checkSet_hu11d4$=function(t,e,n){if(t<0||t>=this.size)throw new $t("Set: index="+t+", size="+this.size)},Zp.prototype.checkRemove_wxm5ur$=function(t,e){if(t<0||t>=this.size)throw new $t("Remove: index="+t+", size="+this.size)},Jp.prototype.call_11rb$=function(t){t.onItemAdded_u8tacu$(this.closure$event)},Jp.$metadata$={kind:i,interfaces:[lh]},Zp.prototype.add_wxm5ur$=function(t,e){this.checkAdd_wxm5ur$(t,e),this.beforeItemAdded_wxm5ur$(t,e);var n=!1;try{if(this.doAdd_wxm5ur$(t,e),n=!0,this.onItemAdd_wxm5ur$(t,e),null!=this.myListeners_ky8jhb$_0){var i=new qp(null,e,t,Kp());z(this.myListeners_ky8jhb$_0).fire_kucmxw$(new Jp(i))}}finally{this.afterItemAdded_5x52oa$(t,e,n)}},Zp.prototype.beforeItemAdded_wxm5ur$=function(t,e){},Zp.prototype.onItemAdd_wxm5ur$=function(t,e){},Zp.prototype.afterItemAdded_5x52oa$=function(t,e,n){},Qp.prototype.call_11rb$=function(t){t.onItemSet_u8tacu$(this.closure$event)},Qp.$metadata$={kind:i,interfaces:[lh]},Zp.prototype.set_wxm5ur$=function(t,e){var n=this.get_za3lpa$(t);this.checkSet_hu11d4$(t,n,e),this.beforeItemSet_hu11d4$(t,n,e);var i=!1;try{if(this.doSet_wxm5ur$(t,e),i=!0,this.onItemSet_hu11d4$(t,n,e),null!=this.myListeners_ky8jhb$_0){var o=new qp(n,e,t,Vp());z(this.myListeners_ky8jhb$_0).fire_kucmxw$(new Qp(o))}}finally{this.afterItemSet_yk9x8x$(t,n,e,i)}return n},Zp.prototype.doSet_wxm5ur$=function(t,e){this.doRemove_za3lpa$(t),this.doAdd_wxm5ur$(t,e)},Zp.prototype.beforeItemSet_hu11d4$=function(t,e,n){},Zp.prototype.onItemSet_hu11d4$=function(t,e,n){},Zp.prototype.afterItemSet_yk9x8x$=function(t,e,n,i){},th.prototype.call_11rb$=function(t){t.onItemRemoved_u8tacu$(this.closure$event)},th.$metadata$={kind:i,interfaces:[lh]},Zp.prototype.removeAt_za3lpa$=function(t){var e=this.get_za3lpa$(t);this.checkRemove_wxm5ur$(t,e),this.beforeItemRemoved_wxm5ur$(t,e);var n=!1;try{if(this.doRemove_za3lpa$(t),n=!0,this.onItemRemove_wxm5ur$(t,e),null!=this.myListeners_ky8jhb$_0){var i=new qp(e,null,t,Yp());z(this.myListeners_ky8jhb$_0).fire_kucmxw$(new th(i))}}finally{this.afterItemRemoved_5x52oa$(t,e,n)}return e},Zp.prototype.beforeItemRemoved_wxm5ur$=function(t,e){},Zp.prototype.onItemRemove_wxm5ur$=function(t,e){},Zp.prototype.afterItemRemoved_5x52oa$=function(t,e,n){},eh.prototype.beforeFirstAdded=function(){this.this$AbstractObservableList.onListenersAdded()},eh.prototype.afterLastRemoved=function(){this.this$AbstractObservableList.myListeners_ky8jhb$_0=null,this.this$AbstractObservableList.onListenersRemoved()},eh.$metadata$={kind:i,interfaces:[ch]},Zp.prototype.addListener_n5no9j$=function(t){return null==this.myListeners_ky8jhb$_0&&(this.myListeners_ky8jhb$_0=new eh(this)),z(this.myListeners_ky8jhb$_0).add_11rb$(t)},nh.prototype.onItemAdded_u8tacu$=function(t){this.closure$handler.onEvent_11rb$(t)},nh.prototype.onItemSet_u8tacu$=function(t){this.closure$handler.onEvent_11rb$(t)},nh.prototype.onItemRemoved_u8tacu$=function(t){this.closure$handler.onEvent_11rb$(t)},nh.$metadata$={kind:i,interfaces:[Wp]},Zp.prototype.addHandler_gxwwpc$=function(t){var e=new nh(t);return this.addListener_n5no9j$(e)},Zp.prototype.onListenersAdded=function(){},Zp.prototype.onListenersRemoved=function(){},Zp.$metadata$={kind:i,simpleName:"AbstractObservableList",interfaces:[oh,Re]},Object.defineProperty(ih.prototype,"size",{configurable:!0,get:function(){return null==this.myContainer_2lyzpq$_0?0:z(this.myContainer_2lyzpq$_0).size}}),ih.prototype.get_za3lpa$=function(t){if(null==this.myContainer_2lyzpq$_0)throw new $t(t.toString());return z(this.myContainer_2lyzpq$_0).get_za3lpa$(t)},ih.prototype.doAdd_wxm5ur$=function(t,e){this.ensureContainerInitialized_mjxwec$_0(),z(this.myContainer_2lyzpq$_0).add_wxm5ur$(t,e)},ih.prototype.doSet_wxm5ur$=function(t,e){z(this.myContainer_2lyzpq$_0).set_wxm5ur$(t,e)},ih.prototype.doRemove_za3lpa$=function(t){z(this.myContainer_2lyzpq$_0).removeAt_za3lpa$(t),z(this.myContainer_2lyzpq$_0).isEmpty()&&(this.myContainer_2lyzpq$_0=null)},ih.prototype.ensureContainerInitialized_mjxwec$_0=function(){null==this.myContainer_2lyzpq$_0&&(this.myContainer_2lyzpq$_0=r(1))},ih.$metadata$={kind:i,simpleName:"ObservableArrayList",interfaces:[Zp]},oh.$metadata$={kind:h,simpleName:"ObservableList",interfaces:[Xp,je]},rh.$metadata$={kind:h,simpleName:"EventHandler",interfaces:[]},ah.prototype.onEvent_11rb$=function(t){this.closure$onEvent(t)},ah.$metadata$={kind:i,interfaces:[rh]},sh.$metadata$={kind:h,simpleName:"EventSource",interfaces:[]},lh.$metadata$={kind:h,simpleName:"ListenerCaller",interfaces:[]},uh.$metadata$={kind:h,simpleName:"ListenerEvent",interfaces:[]},Object.defineProperty(ch.prototype,"isEmpty",{configurable:!0,get:function(){return null==this.myListeners_30lqoe$_0||z(this.myListeners_30lqoe$_0).isEmpty()}}),ph.prototype.doRemove=function(){var t,n;this.this$Listeners.myFireDepth_t4vnc0$_0>0?z(this.this$Listeners.myListeners_30lqoe$_0).add_11rb$(new hh(this.closure$l,!1)):(z(this.this$Listeners.myListeners_30lqoe$_0).remove_11rb$(e.isType(t=this.closure$l,ie)?t:I()),n=this.this$Listeners.myListenersCount_umrzvt$_0,this.this$Listeners.myListenersCount_umrzvt$_0=n-1|0),this.this$Listeners.isEmpty&&this.this$Listeners.afterLastRemoved()},ph.$metadata$={kind:i,interfaces:[Ih]},ch.prototype.add_11rb$=function(t){var n;return this.isEmpty&&this.beforeFirstAdded(),this.myFireDepth_t4vnc0$_0>0?z(this.myListeners_30lqoe$_0).add_11rb$(new hh(t,!0)):(null==this.myListeners_30lqoe$_0&&(this.myListeners_30lqoe$_0=r(1)),z(this.myListeners_30lqoe$_0).add_11rb$(e.isType(n=t,ie)?n:I()),this.myListenersCount_umrzvt$_0=this.myListenersCount_umrzvt$_0+1|0),new ph(this,t)},ch.prototype.fire_kucmxw$=function(t){var n;if(!this.isEmpty){this.beforeFire_ul1jia$_0();try{for(var i=this.myListenersCount_umrzvt$_0,o=0;o "+q(this.newValue)},wh.prototype.equals=function(t){var n;return this===t||!(null==t||null==(n=e.getKClassFromExpression(this))||!n.equals(e.getKClassFromExpression(t)))&&(e.isType(t,wh)||I(),!!p(this.oldValue,t.oldValue)&&!!p(this.newValue,t.newValue))},wh.prototype.hashCode=function(){var t,e,n,i,o=null!=(e=null!=(t=this.oldValue)?D(t):null)?e:0;return(31*o|0)+(null!=(i=null!=(n=this.newValue)?D(n):null)?i:0)|0},wh.$metadata$={kind:i,simpleName:"PropertyChangeEvent",interfaces:[]},xh.$metadata$={kind:h,simpleName:"ReadableProperty",interfaces:[uu,sh]},Object.defineProperty(kh.prototype,"propExpr",{configurable:!0,get:function(){return"valueProperty()"}}),kh.prototype.get=function(){return this.myValue_x0fqz2$_0},kh.prototype.set_11rb$=function(t){if(!p(t,this.myValue_x0fqz2$_0)){var e=this.myValue_x0fqz2$_0;this.myValue_x0fqz2$_0=t,this.fireEvents_ym4swk$_0(e,this.myValue_x0fqz2$_0)}},Ch.prototype.call_11rb$=function(t){t.onEvent_11rb$(this.closure$event)},Ch.$metadata$={kind:i,interfaces:[lh]},kh.prototype.fireEvents_ym4swk$_0=function(t,e){if(null!=this.myHandlers_sdxgfs$_0){var n=new wh(t,e);z(this.myHandlers_sdxgfs$_0).fire_kucmxw$(new Ch(n))}},Eh.prototype.afterLastRemoved=function(){this.this$ValueProperty.myHandlers_sdxgfs$_0=null},Eh.$metadata$={kind:i,interfaces:[ch]},kh.prototype.addHandler_gxwwpc$=function(t){return null==this.myHandlers_sdxgfs$_0&&(this.myHandlers_sdxgfs$_0=new Eh(this)),z(this.myHandlers_sdxgfs$_0).add_11rb$(t)},kh.$metadata$={kind:i,simpleName:"ValueProperty",interfaces:[$h,_h]},Sh.$metadata$={kind:h,simpleName:"WritableProperty",interfaces:[]},Th.prototype.randomString_za3lpa$=function(t){for(var e=De(ze(new Ht(97,122),new Ht(65,90)),new Ht(48,57)),n=r(t),i=0;i=0;t--)this.myRegistrations_0.get_za3lpa$(t).remove();this.myRegistrations_0.clear()},Nh.$metadata$={kind:i,simpleName:"CompositeRegistration",interfaces:[Ih]},Ph.$metadata$={kind:h,simpleName:"Disposable",interfaces:[]},Ih.prototype.remove=function(){if(this.myRemoved_guv51v$_0)throw g("Registration already removed");this.myRemoved_guv51v$_0=!0,this.doRemove()},Ih.prototype.dispose=function(){this.remove()},Ah.prototype.doRemove=function(){},Ah.prototype.remove=function(){},Ah.$metadata$={kind:i,simpleName:"EmptyRegistration",interfaces:[Ih]},jh.prototype.doRemove=function(){this.closure$disposable.dispose()},jh.$metadata$={kind:i,interfaces:[Ih]},Rh.prototype.from_gg3y3y$=function(t){return new jh(t)},Lh.prototype.doRemove=function(){var t,e;for(t=this.closure$disposables,e=0;e!==t.length;++e)t[e].dispose()},Lh.$metadata$={kind:i,interfaces:[Ih]},Rh.prototype.from_h9hjd7$=function(t){return new Lh(t)},Rh.$metadata$={kind:o,simpleName:"Companion",interfaces:[]};var zh=null;function Dh(){return null===zh&&new Rh,zh}function Mh(){}function Bh(){Vh=this,this.instance=new Mh}Ih.$metadata$={kind:i,simpleName:"Registration",interfaces:[Ph]},Mh.prototype.handle_tcv7n7$=function(t){throw t},Mh.$metadata$={kind:i,simpleName:"ThrowableHandler",interfaces:[]},Bh.$metadata$={kind:o,simpleName:"ThrowableHandlers",interfaces:[]};var Fh,Uh,qh,Hh,Gh,Kh,Vh=null;function Yh(){return null===Vh&&new Bh,Vh}var Wh=rt((function(){var t=e.kotlin.comparisons.compareValues_s00gnj$;return function(e){return function(n,i){var o=e;return t(o(n),o(i))}}}));function Xh(t){return t.first}function Zh(t){return t.second}function Jh(t,e,n){n_(),this.myMapRect_0=t,this.myLoopX_0=e,this.myLoopY_0=n}function Qh(){e_=this}function t_(t,e){return new qu(v.min(t,e),v.max(t,e))}Jh.prototype.calculateBoundingBox_qpfwx8$=function(t,e){var n=this.calculateBoundingRange_0(t,ff(this.myMapRect_0),this.myLoopX_0),i=this.calculateBoundingRange_0(e,mf(this.myMapRect_0),this.myLoopY_0);return Af(n.lowerEnd,i.lowerEnd,n_().length_0(n),n_().length_0(i))},Jh.prototype.calculateBoundingRange_0=function(t,e,n){var i;return i=n?n_().calculateLoopLimitRange_oau7x0$(t,e):new qu(z(Ue(At(t,$("start",1,(function(t){return Xh(t)}))))),z(qe(At(t,$("end",1,(function(t){return Zh(t)})))))),i},Qh.prototype.calculateLoopLimitRange_oau7x0$=function(t,e){return this.normalizeCenter_0(this.invertRange_0(this.findMaxGapBetweenRanges_0(He(At(t,(n=e,function(t){return y_().splitSegment_6y0v78$(Xh(t),Zh(t),n.lowerEnd,n.upperEnd)}))),this.length_0(e)),this.length_0(e)),e);var n},Qh.prototype.normalizeCenter_0=function(t,e){return e.contains_14dthe$((t.upperEnd+t.lowerEnd)/2)?t:new qu(t.lowerEnd-this.length_0(e),t.upperEnd-this.length_0(e))},Qh.prototype.findMaxGapBetweenRanges_0=function(t,n){var i,o=Ve(t,new gt(Wh($("lowerEnd",1,(function(t){return t.lowerEnd}))))),r=$("upperEnd",1,(function(t){return t.upperEnd}));t:do{var a=o.iterator();if(!a.hasNext()){i=null;break t}var s=a.next();if(!a.hasNext()){i=s;break t}var l=r(s);do{var u=a.next(),c=r(u);e.compareTo(l,c)<0&&(s=u,l=c)}while(a.hasNext());i=s}while(0);var p=z(i).upperEnd,h=Ge(o).lowerEnd,_=n+h,d=p,f=new qu(p,v.max(_,d)),m=o.iterator();for(p=m.next().upperEnd;m.hasNext();){var y=m.next();(h=y.lowerEnd)>p&&h-p>this.length_0(f)&&(f=new qu(p,h));var g=p,b=y.upperEnd;p=v.max(g,b)}return f},Qh.prototype.invertRange_0=function(t,e){var n=t_;return this.length_0(t)>e?new qu(t.lowerEnd,t.lowerEnd):t.upperEnd>e?n(t.upperEnd-e,t.lowerEnd):n(t.upperEnd,e+t.lowerEnd)},Qh.prototype.length_0=function(t){return t.upperEnd-t.lowerEnd},Qh.$metadata$={kind:o,simpleName:"Companion",interfaces:[]};var e_=null;function n_(){return null===e_&&new Qh,e_}function i_(t,e,n){return At(b(T(0,n)),(i=t,o=e,function(t){return new Ke(i(t),o(t))}));var i,o}function o_(){c_=this,this.LON_INDEX_0=0,this.LAT_INDEX_0=1}function r_(){}function a_(t){return p(t.getString_61zpoe$("type"),"Feature")}function s_(t){return t.getObject_61zpoe$("geometry")}Jh.$metadata$={kind:i,simpleName:"GeoBoundingBoxCalculator",interfaces:[]},o_.prototype.parse_gdwatq$=function(t,e){var n=Qu(Tc().parseJson_61zpoe$(t)),i=new M_;e(i);var o=i;(new r_).parse_m8ausf$(n,o)},o_.prototype.parse_4mzk4t$=function(t,e){var n=Qu(Tc().parseJson_61zpoe$(t));(new r_).parse_m8ausf$(n,e)},r_.prototype.parse_m8ausf$=function(t,e){var n=t.getString_61zpoe$("type");switch(n){case"FeatureCollection":var i;if(!t.contains_61zpoe$("features"))throw E("GeoJson: Missing 'features' in 'FeatureCollection'".toString());for(i=At(Ye(t.getArray_61zpoe$("features").fluentObjectStream(),a_),s_).iterator();i.hasNext();){var o=i.next();this.parse_m8ausf$(o,e)}break;case"GeometryCollection":var r;if(!t.contains_61zpoe$("geometries"))throw E("GeoJson: Missing 'geometries' in 'GeometryCollection'".toString());for(r=t.getArray_61zpoe$("geometries").fluentObjectStream().iterator();r.hasNext();){var a=r.next();this.parse_m8ausf$(a,e)}break;default:if(!t.contains_61zpoe$("coordinates"))throw E(("GeoJson: Missing 'coordinates' in "+n).toString());var l=t.getArray_61zpoe$("coordinates");switch(n){case"Point":var u=this.parsePoint_0(l);s("onPoint",function(t,e){return t.onPoint_adb7pk$(e),Pt}.bind(null,e))(u);break;case"LineString":var c=this.parseLineString_0(l);s("onLineString",function(t,e){return t.onLineString_1u6eph$(e),Pt}.bind(null,e))(c);break;case"Polygon":var p=this.parsePolygon_0(l);s("onPolygon",function(t,e){return t.onPolygon_z3kb82$(e),Pt}.bind(null,e))(p);break;case"MultiPoint":var h=this.parseMultiPoint_0(l);s("onMultiPoint",function(t,e){return t.onMultiPoint_oeq1z7$(e),Pt}.bind(null,e))(h);break;case"MultiLineString":var _=this.parseMultiLineString_0(l);s("onMultiLineString",function(t,e){return t.onMultiLineString_6n275e$(e),Pt}.bind(null,e))(_);break;case"MultiPolygon":var d=this.parseMultiPolygon_0(l);s("onMultiPolygon",function(t,e){return t.onMultiPolygon_a0zxnd$(e),Pt}.bind(null,e))(d);break;default:throw g(("Not support GeoJson type: "+n).toString())}}},r_.prototype.parsePoint_0=function(t){return Mf(t.getDouble_za3lpa$(0),t.getDouble_za3lpa$(1))},r_.prototype.parseLineString_0=function(t){return new Sf(this.mapArray_0(t,s("parsePoint",function(t,e){return t.parsePoint_0(e)}.bind(null,this))))},r_.prototype.parseRing_0=function(t){return new Rf(this.mapArray_0(t,s("parsePoint",function(t,e){return t.parsePoint_0(e)}.bind(null,this))))},r_.prototype.parseMultiPoint_0=function(t){return new Of(this.mapArray_0(t,s("parsePoint",function(t,e){return t.parsePoint_0(e)}.bind(null,this))))},r_.prototype.parsePolygon_0=function(t){return new Pf(this.mapArray_0(t,s("parseRing",function(t,e){return t.parseRing_0(e)}.bind(null,this))))},r_.prototype.parseMultiLineString_0=function(t){return new Tf(this.mapArray_0(t,s("parseLineString",function(t,e){return t.parseLineString_0(e)}.bind(null,this))))},r_.prototype.parseMultiPolygon_0=function(t){return new Nf(this.mapArray_0(t,s("parsePolygon",function(t,e){return t.parsePolygon_0(e)}.bind(null,this))))},r_.prototype.mapArray_0=function(t,n){return We(At(t.stream(),(i=n,function(t){var n;return i(Zu(e.isType(n=t,It)?n:I()))})));var i},r_.$metadata$={kind:i,simpleName:"Parser",interfaces:[]},o_.$metadata$={kind:o,simpleName:"GeoJson",interfaces:[]};var l_,u_,c_=null;function p_(t,e,n,i){if(this.myLongitudeSegment_0=null,this.myLatitudeRange_0=null,!(e<=i))throw E(("Invalid latitude range: ["+e+".."+i+"]").toString());this.myLongitudeSegment_0=new f_(t,n),this.myLatitudeRange_0=new qu(e,i)}function h_(t){var e=Uh,n=qh,i=v.min(t,n);return v.max(e,i)}function __(t){var e=Gh,n=Kh,i=v.min(t,n);return v.max(e,i)}function d_(t){var e=t-jt(t/Hh)*Hh;return e>qh&&(e-=Hh),e<-qh&&(e+=Hh),e}function f_(t,e){y_(),this.myStart_0=h_(t),this.myEnd_0=h_(e),this.isEmpty=this.myEnd_0===this.myStart_0}function m_(){$_=this}Object.defineProperty(p_.prototype,"isEmpty",{configurable:!0,get:function(){return this.myLongitudeSegment_0.isEmpty&&this.latitudeRangeIsEmpty_0(this.myLatitudeRange_0)}}),p_.prototype.latitudeRangeIsEmpty_0=function(t){return t.upperEnd===t.lowerEnd},p_.prototype.startLongitude=function(){return this.myLongitudeSegment_0.start()},p_.prototype.endLongitude=function(){return this.myLongitudeSegment_0.end()},p_.prototype.minLatitude=function(){return this.myLatitudeRange_0.lowerEnd},p_.prototype.maxLatitude=function(){return this.myLatitudeRange_0.upperEnd},p_.prototype.encloses_emtjl$=function(t){return this.myLongitudeSegment_0.encloses_moa7dh$(t.myLongitudeSegment_0)&&this.myLatitudeRange_0.encloses_3lmjpf$(t.myLatitudeRange_0)},p_.prototype.splitByAntiMeridian=function(){var t,e=l();for(t=this.myLongitudeSegment_0.splitByAntiMeridian().iterator();t.hasNext();){var n=t.next();e.add_11rb$(_f(new Df(n.lowerEnd,this.myLatitudeRange_0.lowerEnd),new Df(n.upperEnd,this.myLatitudeRange_0.upperEnd)))}return e},p_.prototype.equals=function(t){var n,i,o,r;if(this===t)return!0;if(null==t||null==(n=e.getKClassFromExpression(this))||!n.equals(e.getKClassFromExpression(t)))return!1;var a=null==(i=t)||e.isType(i,p_)?i:I();return(null!=(o=this.myLongitudeSegment_0)?o.equals(z(a).myLongitudeSegment_0):null)&&(null!=(r=this.myLatitudeRange_0)?r.equals(a.myLatitudeRange_0):null)},p_.prototype.hashCode=function(){return D(_t([this.myLongitudeSegment_0,this.myLatitudeRange_0]))},p_.$metadata$={kind:i,simpleName:"GeoRectangle",interfaces:[]},f_.prototype.start=function(){return this.myStart_0},f_.prototype.end=function(){return this.myEnd_0},f_.prototype.length=function(){return this.myEnd_0-this.myStart_0+(this.myEnd_0=1;r--){var a=48,s=1<0&&o.argsNumber!==i){var r,a="Wrong number of arguments in pattern '"+t+"' "+(null!=(r=null!=n?"to format '"+q(n)+"'":null)?r:"")+". Expected "+i+" "+(i>1?"arguments":"argument")+" instead of "+o.argsNumber;throw E(a.toString())}return o},Pd.$metadata$={kind:o,simpleName:"Companion",interfaces:[]};var Id,Ad,Rd,jd=null;function Ld(){return null===jd&&new Pd,jd}function zd(t){return t.groupValues.get_za3lpa$(2)}function Dd(t){nn.call(this),this.myGeometry_8dt6c9$_0=t}function Md(t){return Nn(t,$("x",1,(function(t){return t.x})),$("y",1,(function(t){return t.y})))}function Bd(t,e,n,i){return _f(new Df(t,e),new Df(n,i))}function Fd(t){return Pu().calculateBoundingBox_h5l7ap$(t,$("x",1,(function(t){return t.x})),$("y",1,(function(t){return t.y})),Bd)}function Ud(t){return t.origin}function qd(t){return of(t.origin,t.dimension)}function Hd(t){return t.origin.y+t.dimension.y}function Gd(t){return t.origin.x+t.dimension.x}function Kd(t){return t.dimension.y}function Vd(t){return t.dimension.x}function Yd(t){return t.origin.y}function Wd(t){return t.origin.x}function Xd(t){return new jf(Hd(t))}function Zd(t){return new jf(Kd(t))}function Jd(t){return new jf(Vd(t))}function Qd(t){return new jf(Yd(t))}function tf(t){return new jf(Wd(t))}function ef(t){return new jf(t.x)}function nf(t){return new jf(t.y)}function of(t,e){return new Df(t.x+e.x,t.y+e.y)}function rf(t,e){return new Df(t.x-e.x,t.y-e.y)}function af(t,e){return new Df(t.x/e,t.y/e)}function sf(t){return t}function lf(t){return t}function uf(t,e,n){return void 0===e&&(e=sf),void 0===n&&(n=lf),new Df(e(ef(t)).value,n(nf(t)).value)}function cf(t,e){return new jf(t.value+e.value)}function pf(t,e){return new jf(t.value-e.value)}function hf(t,e){return new jf(t.value/e)}function _f(t,e){return new If(t,rf(e,t))}function df(t){return Fd(an(He(b(t))))}function ff(t){return new qu(t.origin.x,t.origin.x+t.dimension.x)}function mf(t){return new qu(t.origin.y,t.origin.y+t.dimension.y)}function $f(t){var e,n=l();for(e=t.iterator();e.hasNext();){var i;null!=(i=df(e.next()))&&n.add_11rb$(i)}return n}function yf(t,e){A.call(this),this.name$=t,this.ordinal$=e}function gf(){gf=function(){},Id=new yf("MULTI_POINT",0),Ad=new yf("MULTI_LINESTRING",1),Rd=new yf("MULTI_POLYGON",2)}function vf(){return gf(),Id}function bf(){return gf(),Ad}function wf(){return gf(),Rd}function xf(t,e,n,i){Ef(),this.type=t,this.myMultiPoint_0=e,this.myMultiLineString_0=n,this.myMultiPolygon_0=i}function kf(){Cf=this}Cd.$metadata$={kind:i,simpleName:"StringFormat",interfaces:[]},Dd.prototype.get_za3lpa$=function(t){return this.myGeometry_8dt6c9$_0.get_za3lpa$(t)},Object.defineProperty(Dd.prototype,"size",{configurable:!0,get:function(){return this.myGeometry_8dt6c9$_0.size}}),Dd.$metadata$={kind:i,simpleName:"AbstractGeometryList",interfaces:[nn]},yf.$metadata$={kind:i,simpleName:"GeometryType",interfaces:[A]},yf.values=function(){return[vf(),bf(),wf()]},yf.valueOf_61zpoe$=function(t){switch(t){case"MULTI_POINT":return vf();case"MULTI_LINESTRING":return bf();case"MULTI_POLYGON":return wf();default:R("No enum constant jetbrains.datalore.base.typedGeometry.GeometryType."+t)}},Object.defineProperty(xf.prototype,"multiPoint",{configurable:!0,get:function(){var t;if(null==(t=this.myMultiPoint_0))throw g((this.type.toString()+" is not a MultiPoint").toString());return t}}),Object.defineProperty(xf.prototype,"multiLineString",{configurable:!0,get:function(){var t;if(null==(t=this.myMultiLineString_0))throw g((this.type.toString()+" is not a MultiLineString").toString());return t}}),Object.defineProperty(xf.prototype,"multiPolygon",{configurable:!0,get:function(){var t;if(null==(t=this.myMultiPolygon_0))throw g((this.type.toString()+" is not a MultiPolygon").toString());return t}}),kf.prototype.createMultiPoint_xgn53i$=function(t){return new xf(vf(),t,null,null)},kf.prototype.createMultiLineString_bc4hlz$=function(t){return new xf(bf(),null,t,null)},kf.prototype.createMultiPolygon_8ft4gs$=function(t){return new xf(wf(),null,null,t)},kf.$metadata$={kind:o,simpleName:"Companion",interfaces:[]};var Cf=null;function Ef(){return null===Cf&&new kf,Cf}function Sf(t){Dd.call(this,t)}function Tf(t){Dd.call(this,t)}function Of(t){Dd.call(this,t)}function Nf(t){Dd.call(this,t)}function Pf(t){Dd.call(this,t)}function If(t,e){this.origin=t,this.dimension=e}function Af(t,e,n,i,o){return o=o||Object.create(If.prototype),If.call(o,new Df(t,e),new Df(n,i)),o}function Rf(t){Dd.call(this,t)}function jf(t){this.value=t}function Lf(){zf=this,this.SAMPLING_EPSILON_0=.001}xf.$metadata$={kind:i,simpleName:"Geometry",interfaces:[]},Sf.$metadata$={kind:i,simpleName:"LineString",interfaces:[Dd]},Tf.$metadata$={kind:i,simpleName:"MultiLineString",interfaces:[Dd]},Of.$metadata$={kind:i,simpleName:"MultiPoint",interfaces:[Dd]},Nf.$metadata$={kind:i,simpleName:"MultiPolygon",interfaces:[Dd]},Pf.$metadata$={kind:i,simpleName:"Polygon",interfaces:[Dd]},If.$metadata$={kind:i,simpleName:"Rect",interfaces:[]},If.prototype.component1=function(){return this.origin},If.prototype.component2=function(){return this.dimension},If.prototype.copy_rbt1hw$=function(t,e){return new If(void 0===t?this.origin:t,void 0===e?this.dimension:e)},If.prototype.toString=function(){return"Rect(origin="+e.toString(this.origin)+", dimension="+e.toString(this.dimension)+")"},If.prototype.hashCode=function(){var t=0;return 31*(t=31*t+e.hashCode(this.origin)|0)+e.hashCode(this.dimension)|0},If.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.origin,t.origin)&&e.equals(this.dimension,t.dimension)},Rf.$metadata$={kind:i,simpleName:"Ring",interfaces:[Dd]},jf.$metadata$={kind:i,simpleName:"Scalar",interfaces:[]},jf.prototype.unbox=function(){return this.value},jf.prototype.toString=function(){return"Scalar(value="+e.toString(this.value)+")"},jf.prototype.hashCode=function(){var t=0;return 31*t+e.hashCode(this.value)|0},jf.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.value,t.value)},Lf.prototype.transformBBox_3w2x7e$=function(t,e){return Fd(this.transformRing_0(s("rectToPolygon",function(t,e){return t.rectToPolygon_0(e)}.bind(null,this))(t),e,this.SAMPLING_EPSILON_0))},Lf.prototype.transformMultiPolygon_prkczh$=function(t,e){var n,i=r(t.size);for(n=t.iterator();n.hasNext();){var o=n.next();i.add_11rb$(this.transformPolygon_0(o,e,this.SAMPLING_EPSILON_0))}return new Nf(i)},Lf.prototype.transformPolygon_0=function(t,e,n){var i,o=r(t.size);for(i=t.iterator();i.hasNext();){var a=i.next();o.add_11rb$(new Rf(this.transformRing_0(a,e,n)))}return new Pf(o)},Lf.prototype.transformRing_0=function(t,e,n){return new Ff(e,n).resample_ohchv7$(t)},Lf.prototype.transform_c0yqik$=function(t,e){var n,i=r(t.size);for(n=t.iterator();n.hasNext();){var o=n.next();i.add_11rb$(this.transform_0(o,e,this.SAMPLING_EPSILON_0))}return new Nf(i)},Lf.prototype.transform_0=function(t,e,n){var i,o=r(t.size);for(i=t.iterator();i.hasNext();){var a=i.next();o.add_11rb$(new Rf(this.transform_1(a,e,n)))}return new Pf(o)},Lf.prototype.transform_1=function(t,e,n){var i,o=r(t.size);for(i=t.iterator();i.hasNext();){var a=i.next();o.add_11rb$(e(a))}return o},Lf.prototype.rectToPolygon_0=function(t){var e,n=l();return n.add_11rb$(t.origin),n.add_11rb$(uf(t.origin,(e=t,function(t){return cf(t,Jd(e))}))),n.add_11rb$(of(t.origin,t.dimension)),n.add_11rb$(uf(t.origin,void 0,function(t){return function(e){return cf(e,Zd(t))}}(t))),n.add_11rb$(t.origin),n},Lf.$metadata$={kind:o,simpleName:"Transforms",interfaces:[]};var zf=null;function Df(t,e){this.x=t,this.y=e}function Mf(t,e){return new Df(t,e)}function Bf(t,e){return new Df(t.value,e.value)}function Ff(t,e){Gf(),this.transform_0=t,this.resampler_0=Cn().generic_csv0sv$(s("tranformWrapper",function(t,e){return t.tranformWrapper_0(e)}.bind(null,this)),e,Gf().VEC_ADAPTER)}function Uf(){Hf=this,this.VEC_ADAPTER=new qf}function qf(){}Df.$metadata$={kind:i,simpleName:"Vec",interfaces:[]},Df.prototype.component1=function(){return this.x},Df.prototype.component2=function(){return this.y},Df.prototype.copy_lu1900$=function(t,e){return new Df(void 0===t?this.x:t,void 0===e?this.y:e)},Df.prototype.toString=function(){return"Vec(x="+e.toString(this.x)+", y="+e.toString(this.y)+")"},Df.prototype.hashCode=function(){var t=0;return 31*(t=31*t+e.hashCode(this.x)|0)+e.hashCode(this.y)|0},Df.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.x,t.x)&&e.equals(this.y,t.y)},Ff.prototype.tranformWrapper_0=function(t){var n;return this.transform_0(e.isType(n=t,Df)?n:I())},Ff.prototype.resample_ohchv7$=function(t){var n;return e.isType(n=this.resampler_0.resample_4ezy5m$(t),It)?n:I()},Ff.prototype.resample_rbt1hw$=function(t,n){var i;return e.isType(i=this.resampler_0.resample_xwzc9q$(t,n),It)?i:I()},qf.prototype.x_11rb$=function(t){return t.x},qf.prototype.y_11rb$=function(t){return t.y},qf.prototype.create_lu1900$=function(t,e){return new Df(t,e)},qf.$metadata$={kind:i,interfaces:[En]},Uf.$metadata$={kind:o,simpleName:"Companion",interfaces:[]};var Hf=null;function Gf(){return null===Hf&&new Uf,Hf}function Kf(){}function Vf(){this.map=kt()}function Yf(t,e,n,i){if(Zf(),void 0===i&&(i=255),this.red=t,this.green=e,this.blue=n,this.alpha=i,!(0<=this.red&&this.red<=255&&0<=this.green&&this.green<=255&&0<=this.blue&&this.blue<=255&&0<=this.alpha&&this.alpha<=255))throw E(("Color components out of range: "+this).toString())}function Wf(){Xf=this,this.TRANSPARENT=new Yf(0,0,0,0),this.WHITE=new Yf(255,255,255),this.CONSOLE_WHITE=new Yf(204,204,204),this.BLACK=new Yf(0,0,0),this.LIGHT_GRAY=new Yf(192,192,192),this.VERY_LIGHT_GRAY=new Yf(210,210,210),this.GRAY=new Yf(128,128,128),this.RED=new Yf(255,0,0),this.LIGHT_GREEN=new Yf(210,255,210),this.GREEN=new Yf(0,255,0),this.DARK_GREEN=new Yf(0,128,0),this.BLUE=new Yf(0,0,255),this.DARK_BLUE=new Yf(0,0,128),this.LIGHT_BLUE=new Yf(210,210,255),this.YELLOW=new Yf(255,255,0),this.CONSOLE_YELLOW=new Yf(174,174,36),this.LIGHT_YELLOW=new Yf(255,255,128),this.VERY_LIGHT_YELLOW=new Yf(255,255,210),this.MAGENTA=new Yf(255,0,255),this.LIGHT_MAGENTA=new Yf(255,210,255),this.DARK_MAGENTA=new Yf(128,0,128),this.CYAN=new Yf(0,255,255),this.LIGHT_CYAN=new Yf(210,255,255),this.ORANGE=new Yf(255,192,0),this.PINK=new Yf(255,175,175),this.LIGHT_PINK=new Yf(255,210,210),this.PACIFIC_BLUE=this.parseHex_61zpoe$("#118ED8"),this.RGB_0="rgb",this.COLOR_0="color",this.RGBA_0="rgba"}Ff.$metadata$={kind:i,simpleName:"VecResampler",interfaces:[]},Kf.$metadata$={kind:h,simpleName:"TypedKey",interfaces:[]},Vf.prototype.get_ex36zt$=function(t){var n;if(this.map.containsKey_11rb$(t))return null==(n=this.map.get_11rb$(t))||e.isType(n,ie)?n:I();throw new Nt("Wasn't found key "+t)},Vf.prototype.set_ev6mlr$=function(t,e){this.put_ev6mlr$(t,e)},Vf.prototype.put_ev6mlr$=function(t,e){null==e?this.map.remove_11rb$(t):this.map.put_xwzc9p$(t,e)},Vf.prototype.contains_ku7evr$=function(t){return this.containsKey_ex36zt$(t)},Vf.prototype.containsKey_ex36zt$=function(t){return this.map.containsKey_11rb$(t)},Vf.prototype.keys_287e2$=function(){var t;return e.isType(t=this.map.keys,sn)?t:I()},Vf.$metadata$={kind:i,simpleName:"TypedKeyHashMap",interfaces:[]},Yf.prototype.changeAlpha_za3lpa$=function(t){return new Yf(this.red,this.green,this.blue,t)},Yf.prototype.equals=function(t){return this===t||!!e.isType(t,Yf)&&this.red===t.red&&this.green===t.green&&this.blue===t.blue&&this.alpha===t.alpha},Yf.prototype.toCssColor=function(){return 255===this.alpha?"rgb("+this.red+","+this.green+","+this.blue+")":"rgba("+q(this.red)+","+q(this.green)+","+q(this.blue)+","+q(this.alpha/255)+")"},Yf.prototype.toHexColor=function(){return"#"+Zf().toColorPart_0(this.red)+Zf().toColorPart_0(this.green)+Zf().toColorPart_0(this.blue)},Yf.prototype.hashCode=function(){var t=0;return(31*(t=(31*(t=(31*(t=(31*t|0)+this.red|0)|0)+this.green|0)|0)+this.blue|0)|0)+this.alpha|0},Yf.prototype.toString=function(){return"color("+this.red+","+this.green+","+this.blue+","+this.alpha+")"},Wf.prototype.parseOrNull_61zpoe$=function(t){var n,i,o;try{o=new pn(this.parseHex_61zpoe$(t))}catch(t){if(!e.isType(t,Le))throw t;o=new pn(hn(t))}var r,a=o;if(null!=(n=a.isFailure?null:null==(r=a.value)||e.isType(r,ie)?r:I()))i=n;else{var s;try{s=new pn(this.parseRGB_61zpoe$(t))}catch(t){if(!e.isType(t,Le))throw t;s=new pn(hn(t))}var l,u=s;i=u.isFailure?null:null==(l=u.value)||e.isType(l,ie)?l:I()}return i},Wf.prototype.parseRGB_61zpoe$=function(t){var n=this.findNext_0(t,"(",0),i=t.substring(0,n),o=this.findNext_0(t,",",n+1|0),r=this.findNext_0(t,",",o+1|0),a=-1;if(p(i,this.RGBA_0))a=this.findNext_0(t,",",r+1|0);else if(p(i,this.COLOR_0))a=Oe(t,",",r+1|0);else if(!p(i,this.RGB_0))throw E(t);for(var s,l=this.findNext_0(t,")",a+1|0),u=n+1|0,c=t.substring(u,o),h=e.isCharSequence(s=c)?s:I(),_=0,d=h.length-1|0,f=!1;_<=d;){var m=f?d:_,$=lt(Ut(h.charCodeAt(m)))<=32;if(f){if(!$)break;d=d-1|0}else $?_=_+1|0:f=!0}for(var y,g=F(e.subSequence(h,_,d+1|0).toString()),v=o+1|0,b=t.substring(v,r),w=e.isCharSequence(y=b)?y:I(),x=0,k=w.length-1|0,C=!1;x<=k;){var S=C?k:x,T=lt(Ut(w.charCodeAt(S)))<=32;if(C){if(!T)break;k=k-1|0}else T?x=x+1|0:C=!0}var O,N,P=F(e.subSequence(w,x,k+1|0).toString());if(-1===a){for(var A,R=r+1|0,j=t.substring(R,l),L=e.isCharSequence(A=j)?A:I(),z=0,D=L.length-1|0,M=!1;z<=D;){var B=M?D:z,U=lt(Ut(L.charCodeAt(B)))<=32;if(M){if(!U)break;D=D-1|0}else U?z=z+1|0:M=!0}O=F(e.subSequence(L,z,D+1|0).toString()),N=255}else{for(var q,H=r+1|0,G=a,K=t.substring(H,G),V=e.isCharSequence(q=K)?q:I(),Y=0,W=V.length-1|0,X=!1;Y<=W;){var Z=X?W:Y,J=lt(Ut(V.charCodeAt(Z)))<=32;if(X){if(!J)break;W=W-1|0}else J?Y=Y+1|0:X=!0}O=F(e.subSequence(V,Y,W+1|0).toString());for(var Q,tt=a+1|0,et=t.substring(tt,l),nt=e.isCharSequence(Q=et)?Q:I(),it=0,ot=nt.length-1|0,rt=!1;it<=ot;){var at=rt?ot:it,st=lt(Ut(nt.charCodeAt(at)))<=32;if(rt){if(!st)break;ot=ot-1|0}else st?it=it+1|0:rt=!0}N=_n(255*Kt(e.subSequence(nt,it,ot+1|0).toString()))}return new Yf(g,P,O,N)},Wf.prototype.findNext_0=function(t,e,n){var i=Oe(t,e,n);if(-1===i)throw E("text="+t+" what="+e+" from="+n);return i},Wf.prototype.parseHex_61zpoe$=function(t){var e=t;if(!cn(e,"#"))throw E("Not a HEX value: "+e);if(6!==(e=e.substring(1)).length)throw E("Not a HEX value: "+e);return new Yf(te(e.substring(0,2),16),te(e.substring(2,4),16),te(e.substring(4,6),16))},Wf.prototype.toColorPart_0=function(t){if(t<0||t>255)throw E("RGB color part must be in range [0..255] but was "+t);var e=Qt(t,16);return 1===e.length?"0"+e:e},Wf.$metadata$={kind:o,simpleName:"Companion",interfaces:[]};var Xf=null;function Zf(){return null===Xf&&new Wf,Xf}function Jf(){Qf=this,this.DEFAULT_FACTOR_0=.7,this.variantColors_0=C([w("dark_blue",Zf().DARK_BLUE),w("dark_green",Zf().DARK_GREEN),w("dark_magenta",Zf().DARK_MAGENTA),w("light_blue",Zf().LIGHT_BLUE),w("light_gray",Zf().LIGHT_GRAY),w("light_green",Zf().LIGHT_GREEN),w("light_yellow",Zf().LIGHT_YELLOW),w("light_magenta",Zf().LIGHT_MAGENTA),w("light_cyan",Zf().LIGHT_CYAN),w("light_pink",Zf().LIGHT_PINK),w("very_light_gray",Zf().VERY_LIGHT_GRAY),w("very_light_yellow",Zf().VERY_LIGHT_YELLOW)]);var t,e=fn(C([w("white",Zf().WHITE),w("black",Zf().BLACK),w("gray",Zf().GRAY),w("red",Zf().RED),w("green",Zf().GREEN),w("blue",Zf().BLUE),w("yellow",Zf().YELLOW),w("magenta",Zf().MAGENTA),w("cyan",Zf().CYAN),w("orange",Zf().ORANGE),w("pink",Zf().PINK)]),this.variantColors_0),n=this.variantColors_0,i=yn($n(n.size));for(t=n.entries.iterator();t.hasNext();){var o=t.next();i.put_xwzc9p$(mn(o.key,95,45),o.value)}var r,a=fn(e,i),s=this.variantColors_0,l=yn($n(s.size));for(r=s.entries.iterator();r.hasNext();){var u=r.next();l.put_xwzc9p$(Qe(u.key,"_",""),u.value)}this.namedColors_0=fn(a,l)}Yf.$metadata$={kind:i,simpleName:"Color",interfaces:[]},Jf.prototype.parseColor_61zpoe$=function(t){var e;if(dn(t,40)>0)e=Zf().parseRGB_61zpoe$(t);else if(cn(t,"#"))e=Zf().parseHex_61zpoe$(t);else{if(!this.isColorName_61zpoe$(t))throw E("Error persing color value: "+t);e=this.forName_61zpoe$(t)}return e},Jf.prototype.isColorName_61zpoe$=function(t){return this.namedColors_0.containsKey_11rb$(t.toLowerCase())},Jf.prototype.forName_61zpoe$=function(t){var e;if(null==(e=this.namedColors_0.get_11rb$(t.toLowerCase())))throw L();return e},Jf.prototype.generateHueColor=function(){return 360*Me.Default.nextDouble()},Jf.prototype.generateColor_lu1900$=function(t,e){return this.rgbFromHsv_6y0v78$(360*Me.Default.nextDouble(),t,e)},Jf.prototype.rgbFromHsv_6y0v78$=function(t,e,n,i){void 0===n&&(n=1),void 0===i&&(i=1);var o=t/60,r=n*e,a=o%2-1,s=r*(1-v.abs(a)),l=0,u=0,c=0;o<1?(l=r,u=s):o<2?(l=s,u=r):o<3?(u=r,c=s):o<4?(u=s,c=r):o<5?(l=s,c=r):(l=r,c=s);var p=n-r;return new Yf(_n(255*(l+p)),_n(255*(u+p)),_n(255*(c+p)),_n(255*i))},Jf.prototype.hsvFromRgb_98b62m$=function(t){var e=1/255,n=t.red*e,i=t.green*e,o=t.blue*e,r=v.min(i,o),a=v.min(n,r),s=v.max(i,o),l=v.max(n,s),u=1/(6*(l-a));return new um(360*(l===a?0:l===n?i>=o?(i-o)*u:1+(i-o)*u:l===i?1/3+(o-n)*u:2/3+(n-i)*u),0===l?0:1-a/l,l)},Jf.prototype.darker_w32t8z$=function(t,e){var n;if(void 0===e&&(e=this.DEFAULT_FACTOR_0),null!=t){var i=jt(t.red*e),o=v.max(i,0),r=jt(t.green*e),a=v.max(r,0),s=jt(t.blue*e);n=new Yf(o,a,v.max(s,0),t.alpha)}else n=null;return n},Jf.prototype.lighter_o14uds$=function(t,e){void 0===e&&(e=this.DEFAULT_FACTOR_0);var n=t.red,i=t.green,o=t.blue,r=t.alpha,a=jt(1/(1-e));if(0===n&&0===i&&0===o)return new Yf(a,a,a,r);n>0&&n0&&i0&&o0&&s.add_11rb$(u)}var c,p,h=r(y(s,10));for(c=s.iterator();c.hasNext();){var _=c.next();h.add_11rb$(o(_))}var d=new em;for(p=h.iterator();p.hasNext();){var f=p.next();d=d.plus_j9uppr$(f)}return d},nm.$metadata$={kind:o,simpleName:"Companion",interfaces:[]};var im=null;function om(){return null===im&&new nm,im}function rm(t,e,n){lm(),void 0===n&&(n=1),this.name=t,this.monospaced=e,this.widthFactor=n}function am(){sm=this,this.SERIF=new rm("serif",!1),this.HELVETICA=new rm("Helvetica",!1)}em.$metadata$={kind:i,simpleName:"FontFace",interfaces:[]},rm.prototype.toString=function(){return this.name},am.$metadata$={kind:o,simpleName:"Companion",interfaces:[]};var sm=null;function lm(){return null===sm&&new am,sm}function um(t,e,n){if(void 0===n&&(n=1),this.h=0,this.s=0,this.v=0,!(e>=-.001&&e<=1.001))throw E(("HSV 'saturation' must be in range [0, 1] but was "+e).toString());if(!(n>=-.001&&n<=1.001))throw E(("HSV 'value' must be in range [0, 1] but was "+n).toString());this.h=_n(100*t)/100;var i=_n(100*e)/100;this.s=v.abs(i);var o=_n(100*n)/100;this.v=v.abs(o)}function cm(){}function pm(){_m=this}function hm(t){this.closure$kl=t}rm.$metadata$={kind:i,simpleName:"FontFamily",interfaces:[]},um.prototype.toString=function(){return"HSV("+this.h+", "+this.s+", "+this.v+")"},um.prototype.equals=function(t){var n;return this===t||!(null==t||null==(n=e.getKClassFromExpression(this))||!n.equals(e.getKClassFromExpression(t)))&&(e.isType(t,um)||I(),this.h===t.h&&this.s===t.s&&this.v===t.v)},um.prototype.hashCode=function(){var t=D(this.h);return(31*(t=(31*t|0)+D(this.s)|0)|0)+D(this.v)|0},um.$metadata$={kind:i,simpleName:"HSV",interfaces:[]},cm.$metadata$={kind:h,simpleName:"SomeFig",interfaces:[]},hm.prototype.error_l35kib$=function(t,e){this.closure$kl.error_ca4k3s$(t,e)},hm.prototype.info_h4ejuu$=function(t){this.closure$kl.info_nq59yw$(t)},hm.$metadata$={kind:i,interfaces:[hp]},pm.prototype.logger_xo1ogr$=function(t){var e;return new hm(vn.KotlinLogging.logger_61zpoe$(null!=(e=t.simpleName)?e:""))},pm.$metadata$={kind:o,simpleName:"PortableLogging",interfaces:[]};var _m=null;Object.defineProperty(bn,"Companion",{get:Cn}),bn.DataAdapter=En;var dm=t.jetbrains||(t.jetbrains={}),fm=dm.datalore||(dm.datalore={}),mm=fm.base||(fm.base={}),$m=mm.algorithms||(mm.algorithms={});$m.AdaptiveResampler=bn,$m.splitRings_bemo1h$=Sn,$m.isClosed_2p1efm$=Tn,$m.calculateArea_ytws2g$=function(t){return Pn(t,$("x",1,(function(t){return t.x})),$("y",1,(function(t){return t.y})))},$m.isClockwise_st9g9f$=Nn,$m.calculateArea_st9g9f$=Pn,(mm.collections||(mm.collections={})).filterNotNullKeys_go3l1a$=function(t){return k(x(b(t.entries),In))};var ym=mm.dateFormat||(mm.dateFormat={});Object.defineProperty(ym,"DateLocale",{get:jn}),Ln.SpecPart=zn,Ln.PatternSpecPart=Dn,Object.defineProperty(Ln,"Companion",{get:si}),ym.DateTimeFormat_init_61zpoe$=li,ym.DateTimeFormat=Ln,Object.defineProperty(ui,"DAY_OF_WEEK_ABBR",{get:pi}),Object.defineProperty(ui,"DAY_OF_WEEK_FULL",{get:hi}),Object.defineProperty(ui,"MONTH_ABBR",{get:_i}),Object.defineProperty(ui,"MONTH_FULL",{get:di}),Object.defineProperty(ui,"DAY_OF_MONTH_LEADING_ZERO",{get:fi}),Object.defineProperty(ui,"DAY_OF_MONTH",{get:mi}),Object.defineProperty(ui,"DAY_OF_THE_YEAR",{get:$i}),Object.defineProperty(ui,"MONTH",{get:yi}),Object.defineProperty(ui,"DAY_OF_WEEK",{get:gi}),Object.defineProperty(ui,"YEAR_SHORT",{get:vi}),Object.defineProperty(ui,"YEAR_FULL",{get:bi}),Object.defineProperty(ui,"HOUR_24",{get:wi}),Object.defineProperty(ui,"HOUR_12_LEADING_ZERO",{get:xi}),Object.defineProperty(ui,"HOUR_12",{get:ki}),Object.defineProperty(ui,"MINUTE",{get:Ci}),Object.defineProperty(ui,"MERIDIAN_LOWER",{get:Ei}),Object.defineProperty(ui,"MERIDIAN_UPPER",{get:Si}),Object.defineProperty(ui,"SECOND",{get:Ti}),Object.defineProperty(Ni,"DATE",{get:Ii}),Object.defineProperty(Ni,"TIME",{get:Ai}),Oi.prototype.Kind=Ni,Object.defineProperty(ui,"Companion",{get:ji}),ym.Pattern=ui,Object.defineProperty(zi,"Companion",{get:Bi});var gm=mm.datetime||(mm.datetime={});gm.Date=zi,Object.defineProperty(Fi,"Companion",{get:Hi}),gm.DateTime=Fi,Object.defineProperty(gm,"DateTimeUtil",{get:Vi}),Object.defineProperty(Yi,"Companion",{get:Zi}),gm.Duration=Yi,gm.Instant=Ji,Object.defineProperty(Qi,"Companion",{get:io}),gm.Month=Qi,Object.defineProperty(oo,"Companion",{get:fo}),gm.Time=oo,Object.defineProperty(mo,"MONDAY",{get:yo}),Object.defineProperty(mo,"TUESDAY",{get:go}),Object.defineProperty(mo,"WEDNESDAY",{get:vo}),Object.defineProperty(mo,"THURSDAY",{get:bo}),Object.defineProperty(mo,"FRIDAY",{get:wo}),Object.defineProperty(mo,"SATURDAY",{get:xo}),Object.defineProperty(mo,"SUNDAY",{get:ko}),gm.WeekDay=mo;var vm=gm.tz||(gm.tz={});vm.DateSpec=Eo,Object.defineProperty(vm,"DateSpecs",{get:Po}),Object.defineProperty(Io,"Companion",{get:jo}),vm.TimeZone=Io,Object.defineProperty(Lo,"Companion",{get:Mo}),vm.TimeZoneMoscow=Lo,Object.defineProperty(vm,"TimeZones",{get:va});var bm=mm.enums||(mm.enums={});bm.EnumInfo=ba,bm.EnumInfoImpl=wa,Object.defineProperty(xa,"NONE",{get:Ca}),Object.defineProperty(xa,"LEFT",{get:Ea}),Object.defineProperty(xa,"MIDDLE",{get:Sa}),Object.defineProperty(xa,"RIGHT",{get:Ta});var wm=mm.event||(mm.event={});wm.Button=xa,wm.Event=Oa,Object.defineProperty(Na,"A",{get:Ia}),Object.defineProperty(Na,"B",{get:Aa}),Object.defineProperty(Na,"C",{get:Ra}),Object.defineProperty(Na,"D",{get:ja}),Object.defineProperty(Na,"E",{get:La}),Object.defineProperty(Na,"F",{get:za}),Object.defineProperty(Na,"G",{get:Da}),Object.defineProperty(Na,"H",{get:Ma}),Object.defineProperty(Na,"I",{get:Ba}),Object.defineProperty(Na,"J",{get:Fa}),Object.defineProperty(Na,"K",{get:Ua}),Object.defineProperty(Na,"L",{get:qa}),Object.defineProperty(Na,"M",{get:Ha}),Object.defineProperty(Na,"N",{get:Ga}),Object.defineProperty(Na,"O",{get:Ka}),Object.defineProperty(Na,"P",{get:Va}),Object.defineProperty(Na,"Q",{get:Ya}),Object.defineProperty(Na,"R",{get:Wa}),Object.defineProperty(Na,"S",{get:Xa}),Object.defineProperty(Na,"T",{get:Za}),Object.defineProperty(Na,"U",{get:Ja}),Object.defineProperty(Na,"V",{get:Qa}),Object.defineProperty(Na,"W",{get:ts}),Object.defineProperty(Na,"X",{get:es}),Object.defineProperty(Na,"Y",{get:ns}),Object.defineProperty(Na,"Z",{get:is}),Object.defineProperty(Na,"DIGIT_0",{get:os}),Object.defineProperty(Na,"DIGIT_1",{get:rs}),Object.defineProperty(Na,"DIGIT_2",{get:as}),Object.defineProperty(Na,"DIGIT_3",{get:ss}),Object.defineProperty(Na,"DIGIT_4",{get:ls}),Object.defineProperty(Na,"DIGIT_5",{get:us}),Object.defineProperty(Na,"DIGIT_6",{get:cs}),Object.defineProperty(Na,"DIGIT_7",{get:ps}),Object.defineProperty(Na,"DIGIT_8",{get:hs}),Object.defineProperty(Na,"DIGIT_9",{get:_s}),Object.defineProperty(Na,"LEFT_BRACE",{get:ds}),Object.defineProperty(Na,"RIGHT_BRACE",{get:fs}),Object.defineProperty(Na,"UP",{get:ms}),Object.defineProperty(Na,"DOWN",{get:$s}),Object.defineProperty(Na,"LEFT",{get:ys}),Object.defineProperty(Na,"RIGHT",{get:gs}),Object.defineProperty(Na,"PAGE_UP",{get:vs}),Object.defineProperty(Na,"PAGE_DOWN",{get:bs}),Object.defineProperty(Na,"ESCAPE",{get:ws}),Object.defineProperty(Na,"ENTER",{get:xs}),Object.defineProperty(Na,"HOME",{get:ks}),Object.defineProperty(Na,"END",{get:Cs}),Object.defineProperty(Na,"TAB",{get:Es}),Object.defineProperty(Na,"SPACE",{get:Ss}),Object.defineProperty(Na,"INSERT",{get:Ts}),Object.defineProperty(Na,"DELETE",{get:Os}),Object.defineProperty(Na,"BACKSPACE",{get:Ns}),Object.defineProperty(Na,"EQUALS",{get:Ps}),Object.defineProperty(Na,"BACK_QUOTE",{get:Is}),Object.defineProperty(Na,"PLUS",{get:As}),Object.defineProperty(Na,"MINUS",{get:Rs}),Object.defineProperty(Na,"SLASH",{get:js}),Object.defineProperty(Na,"CONTROL",{get:Ls}),Object.defineProperty(Na,"META",{get:zs}),Object.defineProperty(Na,"ALT",{get:Ds}),Object.defineProperty(Na,"SHIFT",{get:Ms}),Object.defineProperty(Na,"UNKNOWN",{get:Bs}),Object.defineProperty(Na,"F1",{get:Fs}),Object.defineProperty(Na,"F2",{get:Us}),Object.defineProperty(Na,"F3",{get:qs}),Object.defineProperty(Na,"F4",{get:Hs}),Object.defineProperty(Na,"F5",{get:Gs}),Object.defineProperty(Na,"F6",{get:Ks}),Object.defineProperty(Na,"F7",{get:Vs}),Object.defineProperty(Na,"F8",{get:Ys}),Object.defineProperty(Na,"F9",{get:Ws}),Object.defineProperty(Na,"F10",{get:Xs}),Object.defineProperty(Na,"F11",{get:Zs}),Object.defineProperty(Na,"F12",{get:Js}),Object.defineProperty(Na,"COMMA",{get:Qs}),Object.defineProperty(Na,"PERIOD",{get:tl}),wm.Key=Na,wm.KeyEvent_init_m5etgt$=nl,wm.KeyEvent=el,Object.defineProperty(il,"Companion",{get:al}),wm.KeyModifiers=il,wm.KeyStroke_init_ji7i3y$=ll,wm.KeyStroke_init_812rgc$=ul,wm.KeyStroke=sl,wm.KeyStrokeSpec_init_ji7i3y$=pl,wm.KeyStrokeSpec_init_luoraj$=hl,wm.KeyStrokeSpec_init_4t3vif$=_l,wm.KeyStrokeSpec=cl,Object.defineProperty(wm,"KeyStrokeSpecs",{get:function(){return null===gl&&new dl,gl}}),Object.defineProperty(vl,"CONTROL",{get:wl}),Object.defineProperty(vl,"ALT",{get:xl}),Object.defineProperty(vl,"SHIFT",{get:kl}),Object.defineProperty(vl,"META",{get:Cl}),wm.ModifierKey=vl,Object.defineProperty(El,"Companion",{get:zl}),wm.MouseEvent_init_fbovgd$=Dl,wm.MouseEvent=El,wm.MouseEventSource=Ml,Object.defineProperty(Bl,"MOUSE_ENTERED",{get:Ul}),Object.defineProperty(Bl,"MOUSE_LEFT",{get:ql}),Object.defineProperty(Bl,"MOUSE_MOVED",{get:Hl}),Object.defineProperty(Bl,"MOUSE_DRAGGED",{get:Gl}),Object.defineProperty(Bl,"MOUSE_CLICKED",{get:Kl}),Object.defineProperty(Bl,"MOUSE_DOUBLE_CLICKED",{get:Vl}),Object.defineProperty(Bl,"MOUSE_PRESSED",{get:Yl}),Object.defineProperty(Bl,"MOUSE_RELEASED",{get:Wl}),wm.MouseEventSpec=Bl,wm.PointEvent=Xl;var xm=mm.function||(mm.function={});xm.Function=Zl,Object.defineProperty(xm,"Functions",{get:function(){return null===su&&new Jl,su}}),xm.Runnable=lu,xm.Supplier=uu,xm.Value=cu;var km=mm.gcommon||(mm.gcommon={}),Cm=km.base||(km.base={});Object.defineProperty(Cm,"Throwables",{get:function(){return null===hu&&new pu,hu}});var Em=km.collect||(km.collect={});Em.ComparatorOrdering=_u,Object.defineProperty(Em,"Iterables",{get:function(){return null===fu&&new du,fu}}),Object.defineProperty(mu,"Companion",{get:vu}),Em.Ordering=mu,Em.Stack=bu,Object.defineProperty(wu,"Companion",{get:Cu});var Sm=mm.geometry||(mm.geometry={});Sm.DoubleRectangle_init_6y0v78$=Eu,Sm.DoubleRectangle_init_7e97im$=Su,Sm.DoubleRectangle=wu,Object.defineProperty(Sm,"DoubleRectangles",{get:Pu}),Sm.DoubleSegment=Iu,Object.defineProperty(Au,"Companion",{get:Lu}),Sm.DoubleVector=Au,Sm.Rectangle_init_tjonv8$=function(t,e,n,i,o){return o=o||Object.create(zu.prototype),zu.call(o,new Mu(t,e),new Mu(n,i)),o},Sm.Rectangle=zu,Sm.Segment=Du,Object.defineProperty(Mu,"Companion",{get:Uu}),Sm.Vector=Mu,Object.defineProperty(qu,"Companion",{get:Ku});var Tm=mm.interval||(mm.interval={});Tm.DoubleSpan=qu,Tm.IntSpan=Vu,Tm.NumSpan=Yu;var Om=mm.json||(mm.json={});Om.FluentArray_init=Xu,Om.FluentArray_init_giv38x$=Zu,Om.FluentArray=Wu,Om.FluentObject_init_bkhwtg$=Qu,Om.FluentObject_init=function(t){return t=t||Object.create(Ju.prototype),tc.call(t),Ju.call(t),t.myObj_0=kt(),t},Om.FluentObject=Ju,Om.FluentValue=tc,Om.JsonFormatter=ec,Object.defineProperty(nc,"Companion",{get:cc}),Om.JsonLexer=nc,pc.JsonException=hc,Om.JsonParser=pc,Object.defineProperty(Om,"JsonSupport",{get:Tc}),Object.defineProperty(Oc,"LEFT_BRACE",{get:Pc}),Object.defineProperty(Oc,"RIGHT_BRACE",{get:Ic}),Object.defineProperty(Oc,"LEFT_BRACKET",{get:Ac}),Object.defineProperty(Oc,"RIGHT_BRACKET",{get:Rc}),Object.defineProperty(Oc,"COMMA",{get:jc}),Object.defineProperty(Oc,"COLON",{get:Lc}),Object.defineProperty(Oc,"STRING",{get:zc}),Object.defineProperty(Oc,"NUMBER",{get:Dc}),Object.defineProperty(Oc,"TRUE",{get:Mc}),Object.defineProperty(Oc,"FALSE",{get:Bc}),Object.defineProperty(Oc,"NULL",{get:Fc}),Om.Token=Oc,Om.escape_pdl1vz$=Uc,Om.unescape_pdl1vz$=qc,Om.streamOf_9ma18$=Hc,Om.objectsStreamOf_9ma18$=Kc,Om.getAsInt_s8jyv4$=function(t){var n;return jt(e.isNumber(n=t)?n:I())},Om.getAsString_s8jyv4$=Vc,Om.parseEnum_xwn52g$=Yc,Om.formatEnum_wbfx10$=Wc,Om.put_5zytao$=function(t,e,n){var i,o=Xu(),a=r(y(n,10));for(i=n.iterator();i.hasNext();){var s=i.next();a.add_11rb$(s)}return t.put_wxs67v$(e,o.addStrings_d294za$(a))},Om.getNumber_8dq7w5$=Xc,Om.getDouble_8dq7w5$=Zc,Om.getString_8dq7w5$=function(t,n){var i,o;return"string"==typeof(i=(e.isType(o=t,P)?o:I()).get_11rb$(n))?i:I()},Om.getArr_8dq7w5$=Jc,Object.defineProperty(Qc,"Companion",{get:np}),Qc.Entry=cp,(mm.listMap||(mm.listMap={})).ListMap=Qc;var Nm=mm.logging||(mm.logging={});Nm.Logger=hp;var Pm=mm.math||(mm.math={});Pm.toRadians_14dthe$=_p,Pm.toDegrees_14dthe$=dp,Pm.round_lu1900$=function(t,e){return new Mu(jt(pe(t)),jt(pe(e)))},Pm.ipow_dqglrj$=fp,Pm.areEqual_yvo9jy$=function(t,e,n){void 0===n&&(n=1e-5);var i=t-e;return v.abs(i)=e.x&&t.origin.y<=e.y&&t.origin.y+t.dimension.y>=e.y},Hm.intersects_32samh$=function(t,e){var n=t.origin,i=of(t.origin,t.dimension),o=e.origin,r=of(e.origin,e.dimension);return r.x>=n.x&&i.x>=o.x&&r.y>=n.y&&i.y>=o.y},Hm.xRange_h9e6jg$=ff,Hm.yRange_h9e6jg$=mf,Hm.limit_lddjmn$=$f,Hm.toDoubleVector_kyfm6e$=function(t){return new Au(t.x,t.y)},Hm.toVec_ie011s$=function(t){return new Df(t.x,t.y)},Hm.toRect_2pmvqo$=function(t){return Af(t.left,t.top,t.width,t.height)},Object.defineProperty(yf,"MULTI_POINT",{get:vf}),Object.defineProperty(yf,"MULTI_LINESTRING",{get:bf}),Object.defineProperty(yf,"MULTI_POLYGON",{get:wf}),Hm.GeometryType=yf,Object.defineProperty(xf,"Companion",{get:Ef}),Hm.Geometry=xf,Hm.LineString=Sf,Hm.MultiLineString=Tf,Hm.MultiPoint=Of,Hm.MultiPolygon=Nf,Hm.Polygon=Pf,Hm.Rect_init_94ua8u$=Af,Hm.Rect=If,Hm.Ring=Rf,Hm.Scalar=jf,Object.defineProperty(Hm,"Transforms",{get:function(){return null===zf&&new Lf,zf}}),Hm.Vec_init_vrm8gm$=function(t,e,n){return n=n||Object.create(Df.prototype),Df.call(n,t,e),n},Hm.Vec=Df,Hm.explicitVec_y7b45i$=Mf,Hm.newVec_4xl464$=Bf,Hm.VecResampler=Ff;var Gm=mm.typedKey||(mm.typedKey={});Gm.TypedKey=Kf,Gm.TypedKeyHashMap=Vf;var Km=mm.unsupported||(mm.unsupported={});Km.UNSUPPORTED=function(){throw ln()},Km.UNSUPPORTED_61zpoe$=function(t){throw un(t)},Object.defineProperty(Yf,"Companion",{get:Zf});var Vm=mm.values||(mm.values={});Vm.Color=Yf,Object.defineProperty(Vm,"Colors",{get:function(){return null===Qf&&new Jf,Qf}}),Vm.Font=tm,Object.defineProperty(em,"Companion",{get:om}),Vm.FontFace=em,Object.defineProperty(rm,"Companion",{get:lm}),Vm.FontFamily=rm,Vm.HSV=um,Vm.SomeFig=cm,Object.defineProperty(Nm,"PortableLogging",{get:function(){return null===_m&&new pm,_m}}),xn.prototype.get_x_wijs$=En.prototype.get_x_wijs$,xn.prototype.get_y_wijs$=En.prototype.get_y_wijs$,Object.defineProperty(nd.prototype,"nonlinear",Object.getOwnPropertyDescriptor(xd.prototype,"nonlinear")),Object.defineProperty(nd.prototype,"cylindrical",Object.getOwnPropertyDescriptor(xd.prototype,"cylindrical")),Object.defineProperty(sd.prototype,"nonlinear",Object.getOwnPropertyDescriptor(xd.prototype,"nonlinear")),Object.defineProperty(sd.prototype,"cylindrical",Object.getOwnPropertyDescriptor(xd.prototype,"cylindrical")),Object.defineProperty(ld.prototype,"nonlinear",Object.getOwnPropertyDescriptor(xd.prototype,"nonlinear")),Object.defineProperty(ld.prototype,"cylindrical",Object.getOwnPropertyDescriptor(xd.prototype,"cylindrical")),Object.defineProperty(hd.prototype,"cylindrical",Object.getOwnPropertyDescriptor(xd.prototype,"cylindrical")),Object.defineProperty(md.prototype,"nonlinear",Object.getOwnPropertyDescriptor(xd.prototype,"nonlinear")),qf.prototype.get_x_wijs$=En.prototype.get_x_wijs$,qf.prototype.get_y_wijs$=En.prototype.get_y_wijs$,Cc=C([w(Ut(34),Ut(34)),w(Ut(92),Ut(92)),w(Ut(47),Ut(47)),w(Ut(98),Ut(8)),w(Ut(102),Ut(12)),w(Ut(110),Ut(10)),w(Ut(114),Ut(13)),w(Ut(116),Ut(9))]);var Ym,Wm=T(0,32),Xm=r(y(Wm,10));for(Ym=Wm.iterator();Ym.hasNext();){var Zm=Ym.next();Xm.add_11rb$(Ut(ut(Zm)))}return Ec=Zt(Xm),Fh=6378137,l_=Af(Uh=-180,Gh=-90,Hh=(qh=180)-Uh,(Kh=90)-Gh),u_=new Jh(l_,!0,!1),t})?i.apply(e,o):i)||(t.exports=r)},204:function(t,e,n){var i,o,r;o=[e,n(421),n(486),n(705),n(834),n(197),n(677)],void 0===(r="function"==typeof(i=function(t,e,n,i,o,r,a){"use strict";var s,l,u,c,p,h,_,d=t.$$importsForInline$$||(t.$$importsForInline$$={}),f=(e.toByte,e.kotlin.ranges.CharRange,e.kotlin.IllegalStateException_init),m=e.Kind.OBJECT,$=e.getCallableRef,y=e.Kind.CLASS,g=n.jetbrains.datalore.base.typedGeometry.explicitVec_y7b45i$,v=e.kotlin.Unit,b=n.jetbrains.datalore.base.typedGeometry.LineString,w=n.jetbrains.datalore.base.typedGeometry.Polygon,x=n.jetbrains.datalore.base.typedGeometry.MultiPoint,k=n.jetbrains.datalore.base.typedGeometry.MultiLineString,C=n.jetbrains.datalore.base.typedGeometry.MultiPolygon,E=e.throwUPAE,S=e.kotlin.collections.ArrayList_init_ww73n8$,T=n.jetbrains.datalore.base.function,O=n.jetbrains.datalore.base.typedGeometry.Ring,N=n.jetbrains.datalore.base.gcommon.collect.Stack,P=e.kotlin.IllegalStateException_init_pdl1vj$,I=e.ensureNotNull,A=e.kotlin.IllegalArgumentException_init_pdl1vj$,R=e.kotlin.Enum,j=e.throwISE,L=Math,z=e.kotlin.collections.ArrayList_init_287e2$,D=e.Kind.INTERFACE,M=e.throwCCE,B=e.hashCode,F=e.equals,U=e.kotlin.lazy_klfg04$,q=i.jetbrains.datalore.base.encoding,H=n.jetbrains.datalore.base.spatial.SimpleFeature.GeometryConsumer,G=n.jetbrains.datalore.base.spatial,K=e.kotlin.collections.listOf_mh5how$,V=e.kotlin.collections.emptyList_287e2$,Y=e.kotlin.collections.HashMap_init_73mtqc$,W=e.kotlin.collections.HashSet_init_287e2$,X=e.kotlin.collections.HashMap_init_q3lmfv$,Z=e.kotlin.collections.toList_7wnvza$,J=e.kotlin.collections.collectionSizeOrDefault_ba2ldo$,Q=i.jetbrains.datalore.base.async.ThreadSafeAsync,tt=n.jetbrains.datalore.base.json,et=e.kotlin.reflect.js.internal.PrimitiveClasses.stringClass,nt=e.createKType,it=Error,ot=e.kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED,rt=e.kotlin.coroutines.CoroutineImpl,at=r.kotlinx.coroutines.launch_s496o7$,st=o.io.ktor.client.HttpClient_f0veat$,lt=o.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content,ut=o.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.content.OutgoingContent,ct=o.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect,pt=o.$$importsForInline$$["ktor-ktor-utils-js-legacy"].io.ktor.util.reflect.typeInfoImpl_1lvkm8$,ht=o.io.ktor.client.request.url_g8iu3v$,_t=o.io.ktor.client.request.HttpRequestBuilder,dt=o.$$importsForInline$$["ktor-ktor-http-js-legacy"].io.ktor.http.HttpMethod,ft=o.io.ktor.client.statement.HttpStatement,mt=e.kotlin.RuntimeException_init_pdl1vj$,$t=(e.kotlin.RuntimeException,e.getPropertyCallableRef),yt=e.kotlin.text.StringBuilder_init,gt=e.kotlin.collections.joinToString_fmv235$,vt=e.kotlin.collections.sorted_exjks8$,bt=e.kotlin.collections.addAll_ipc267$,wt=e.kotlin.text.equals_igcy3c$,xt=e.kotlin.collections.ArrayList_init_mqih57$,kt=(e.kotlin.RuntimeException_init,n.jetbrains.datalore.base.json.getDouble_8dq7w5$),Ct=n.jetbrains.datalore.base.spatial.GeoRectangle,Et=n.jetbrains.datalore.base.json.FluentObject_init,St=n.jetbrains.datalore.base.json.put_5zytao$,Tt=n.jetbrains.datalore.base.json.formatEnum_wbfx10$,Ot=n.jetbrains.datalore.base.json.FluentObject_init_bkhwtg$,Nt=n.jetbrains.datalore.base.spatial.QuadKey,Pt=e.arrayEquals,It=e.arrayHashCode,At=n.jetbrains.datalore.base.typedGeometry.Geometry,Rt=n.jetbrains.datalore.base.typedGeometry.reinterpret_mme8i6$,jt=n.jetbrains.datalore.base.typedGeometry.reinterpret_jbix3p$,Lt=n.jetbrains.datalore.base.typedGeometry.reinterpret_jvjmug$,zt=n.jetbrains.datalore.base.typedGeometry.reinterpret_yzg6d5$,Dt=n.jetbrains.datalore.base.typedGeometry.reinterpret_7o1yec$,Mt=n.jetbrains.datalore.base.typedGeometry.reinterpret_za8sjz$,Bt=i.jetbrains.datalore.base.concurrent.Lock,Ft=n.jetbrains.datalore.base.registration.throwableHandlers,Ut=e.kotlin.collections.copyOfRange_ietg8x$,qt=e.kotlin.ranges.until_dqglrj$,Ht=o.io.ktor.client.statement.readBytes_abn2de$,Gt=e.kotlin.Exception_init_pdl1vj$,Kt=o.io.ktor.client.plugins.ResponseException,Vt=e.kotlin.collections.Map,Yt=e.kotlin.sequences.map_z5avom$,Wt=e.kotlin.sequences.toList_veqyi0$,Xt=n.jetbrains.datalore.base.json.getString_8dq7w5$,Zt=e.kotlin.collections.getValue_t9ocha$,Jt=n.jetbrains.datalore.base.json.getAsInt_s8jyv4$,Qt=e.kotlin.collections.List,te=e.kotlin.collections.requireNoNulls_whsx6z$,ee=n.jetbrains.datalore.base.values.Color,ne=e.kotlin.text.toInt_6ic1pp$,ie=n.jetbrains.datalore.base.json.FluentArray_init,oe=n.jetbrains.datalore.base.typedGeometry.get_left_h9e6jg$,re=n.jetbrains.datalore.base.typedGeometry.get_top_h9e6jg$,ae=n.jetbrains.datalore.base.typedGeometry.get_right_h9e6jg$,se=n.jetbrains.datalore.base.typedGeometry.get_bottom_h9e6jg$,le=e.kotlin.sequences.toSet_veqyi0$,ue=n.jetbrains.datalore.base.typedGeometry.newSpanRectangle_2d1svq$,ce=n.jetbrains.datalore.base.json.parseEnum_xwn52g$,pe=a.io.ktor.websocket.readText_xv7s0w$,he=a.io.ktor.websocket.Frame.Text,_e=a.io.ktor.websocket.readBytes_q8vmvx$,de=a.io.ktor.websocket.Frame.Binary,fe=o.io.ktor.client.plugins.websocket.webSocket_ada30e$,me=a.io.ktor.websocket.CloseReason.Codes,$e=a.io.ktor.websocket.CloseReason_init_dy9ulh$,ye=a.io.ktor.websocket.close_d9la3o$,ge=a.io.ktor.websocket.Frame.Text_init_61zpoe$,ve=o.io.ktor.client.engine.js,be=o.io.ktor.client.plugins.websocket.WebSockets,we=o.io.ktor.client.HttpClient_744i18$;function xe(t){this.myData_0=t,this.myPointer_0=0}function ke(t,e,n){this.myPrecision_0=t,this.myInputBuffer_0=e,this.myGeometryConsumer_0=n,this.myParsers_0=new N,this.x_0=0,this.y_0=0}function Ce(t){this.myCtx_0=t}function Ee(t,e){Ce.call(this,e),this.myParsingResultConsumer_0=t,this.myP_ymgig6$_0=this.myP_ymgig6$_0}function Se(t,e,n){Ce.call(this,n),this.myCount_0=t,this.myParsingResultConsumer_0=e,this.myGeometries_0=S(this.myCount_0)}function Te(t,e){Se.call(this,e.readCount_0(),t,e)}function Oe(t,e,n,i,o){Se.call(this,t,i,o),this.myNestedParserFactory_0=e,this.myNestedToGeometry_0=n}function Ne(t,e){var n;Oe.call(this,e.readCount_0(),T.Functions.funcOf_7h29gk$((n=e,function(t){return new Te(t,n)})),T.Functions.funcOf_7h29gk$($("Ring",(function(t){return new O(t)}))),t,e)}function Pe(t,e,n){var i;Oe.call(this,t,T.Functions.funcOf_7h29gk$((i=n,function(t){return new Ee(t,i)})),T.Functions.funcOf_7h29gk$(T.Functions.identity_287e2$()),e,n)}function Ie(t,e,n){var i;Oe.call(this,t,T.Functions.funcOf_7h29gk$((i=n,function(t){return new Te(t,i)})),T.Functions.funcOf_7h29gk$($("LineString",(function(t){return new b(t)}))),e,n)}function Ae(t,e,n){var i;Oe.call(this,t,T.Functions.funcOf_7h29gk$((i=n,function(t){return new Ne(t,i)})),T.Functions.funcOf_7h29gk$($("Polygon",(function(t){return new w(t)}))),e,n)}function Re(){Ye=this,this.META_ID_LIST_BIT_0=2,this.META_EMPTY_GEOMETRY_BIT_0=4,this.META_BBOX_BIT_0=0,this.META_SIZE_BIT_0=1,this.META_EXTRA_PRECISION_BIT_0=3}function je(t,e){this.myGeometryConsumer_0=e,this.myInputBuffer_0=new xe(t),this.myFeatureParser_0=null}function Le(t,e){R.call(this),this.name$=t,this.ordinal$=e}function ze(){ze=function(){},s=new Le("POINT",0),l=new Le("LINESTRING",1),u=new Le("POLYGON",2),c=new Le("MULTI_POINT",3),p=new Le("MULTI_LINESTRING",4),h=new Le("MULTI_POLYGON",5),_=new Le("GEOMETRY_COLLECTION",6),Ve()}function De(){return ze(),s}function Me(){return ze(),l}function Be(){return ze(),u}function Fe(){return ze(),c}function Ue(){return ze(),p}function qe(){return ze(),h}function He(){return ze(),_}function Ge(){Ke=this}Ee.prototype=Object.create(Ce.prototype),Ee.prototype.constructor=Ee,Se.prototype=Object.create(Ce.prototype),Se.prototype.constructor=Se,Te.prototype=Object.create(Se.prototype),Te.prototype.constructor=Te,Oe.prototype=Object.create(Se.prototype),Oe.prototype.constructor=Oe,Ne.prototype=Object.create(Oe.prototype),Ne.prototype.constructor=Ne,Pe.prototype=Object.create(Oe.prototype),Pe.prototype.constructor=Pe,Ie.prototype=Object.create(Oe.prototype),Ie.prototype.constructor=Ie,Ae.prototype=Object.create(Oe.prototype),Ae.prototype.constructor=Ae,Le.prototype=Object.create(R.prototype),Le.prototype.constructor=Le,sn.prototype=Object.create(an.prototype),sn.prototype.constructor=sn,un.prototype=Object.create(an.prototype),un.prototype.constructor=un,Cn.prototype=Object.create(R.prototype),Cn.prototype.constructor=Cn,Ln.prototype=Object.create(R.prototype),Ln.prototype.constructor=Ln,Yn.prototype=Object.create(Wn.prototype),Yn.prototype.constructor=Yn,Vn.prototype=Object.create(Kn.prototype),Vn.prototype.constructor=Vn,wi.prototype=Object.create(R.prototype),wi.prototype.constructor=wi,Yi.prototype=Object.create(R.prototype),Yi.prototype.constructor=Yi,vo.prototype=Object.create(R.prototype),vo.prototype.constructor=vo,Zo.prototype=Object.create(R.prototype),Zo.prototype.constructor=Zo,fr.prototype=Object.create(dr.prototype),fr.prototype.constructor=fr,mr.prototype=Object.create(dr.prototype),mr.prototype.constructor=mr,$r.prototype=Object.create(dr.prototype),$r.prototype.constructor=$r,kr.prototype=Object.create(R.prototype),kr.prototype.constructor=kr,Or.prototype=Object.create(R.prototype),Or.prototype.constructor=Or,sa.prototype=Object.create(R.prototype),sa.prototype.constructor=sa,xe.prototype.hasNext=function(){return this.myPointer_0>4)},je.prototype.type_kcn2v3$=function(t){return Ve().fromCode_kcn2v3$(15&t)},je.prototype.assertNoMeta_0=function(t){if(this.isSet_0(t,3))throw P("META_EXTRA_PRECISION_BIT is not supported");if(this.isSet_0(t,1))throw P("META_SIZE_BIT is not supported");if(this.isSet_0(t,0))throw P("META_BBOX_BIT is not supported")},Ge.prototype.fromCode_kcn2v3$=function(t){switch(t){case 1:return De();case 2:return Me();case 3:return Be();case 4:return Fe();case 5:return Ue();case 6:return qe();case 7:return He();default:throw A("Unkown geometry type: "+t)}},Ge.$metadata$={kind:m,simpleName:"Companion",interfaces:[]};var Ke=null;function Ve(){return ze(),null===Ke&&new Ge,Ke}Le.$metadata$={kind:y,simpleName:"GeometryType",interfaces:[R]},Le.values=function(){return[De(),Me(),Be(),Fe(),Ue(),qe(),He()]},Le.valueOf_61zpoe$=function(t){switch(t){case"POINT":return De();case"LINESTRING":return Me();case"POLYGON":return Be();case"MULTI_POINT":return Fe();case"MULTI_LINESTRING":return Ue();case"MULTI_POLYGON":return qe();case"GEOMETRY_COLLECTION":return He();default:j("No enum constant jetbrains.gis.common.twkb.Twkb.Parser.GeometryType."+t)}},je.$metadata$={kind:y,simpleName:"Parser",interfaces:[]},Re.$metadata$={kind:m,simpleName:"Twkb",interfaces:[]};var Ye=null;function We(){return null===Ye&&new Re,Ye}function Xe(){Ze=this,this.VARINT_EXPECT_NEXT_PART_0=7}Xe.prototype.readVarInt_5a21t1$=function(t){var e=this.readVarUInt_t0n4v2$(t);return this.decodeZigZag_kcn2v3$(e)},Xe.prototype.readVarUInt_t0n4v2$=function(t){var e,n=0,i=0;do{n|=(127&(e=t()))<>1^(0|-(1&t))},Xe.$metadata$={kind:m,simpleName:"VarInt",interfaces:[]};var Ze=null;function Je(){return null===Ze&&new Xe,Ze}function Qe(){on()}function tn(){nn=this}function en(t){this.closure$points=t}en.prototype.asMultipolygon=function(){return this.closure$points},en.$metadata$={kind:y,interfaces:[Qe]},tn.prototype.create_8ft4gs$=function(t){return new en(t)},tn.$metadata$={kind:m,simpleName:"Companion",interfaces:[]};var nn=null;function on(){return null===nn&&new tn,nn}function rn(){xn=this}function an(t){var e;this.rawData_8be2vx$=t,this.myMultipolygon_svkeey$_0=U((e=this,function(){return e.parse_61zpoe$(e.rawData_8be2vx$)}))}function sn(t){an.call(this,t)}function ln(t){this.closure$polygons=t}function un(t){an.call(this,t)}function cn(t){return function(e){return e.onPolygon=function(t){return function(e){if(null!=t.v)throw A("Failed requirement.".toString());return t.v=new C(K(e)),v}}(t),e.onMultiPolygon=function(t){return function(e){if(null!=t.v)throw A("Failed requirement.".toString());return t.v=e,v}}(t),v}}Qe.$metadata$={kind:D,simpleName:"Boundary",interfaces:[]},rn.prototype.fromTwkb_61zpoe$=function(t){return new sn(t)},rn.prototype.fromGeoJson_61zpoe$=function(t){return new un(t)},rn.prototype.getRawData_e1chq9$=function(t){var n;return(e.isType(n=t,an)?n:M()).rawData_8be2vx$},Object.defineProperty(an.prototype,"myMultipolygon_0",{configurable:!0,get:function(){return this.myMultipolygon_svkeey$_0.value}}),an.prototype.asMultipolygon=function(){return this.myMultipolygon_0},an.prototype.hashCode=function(){return B(this.rawData_8be2vx$)},an.prototype.equals=function(t){var n;return this===t||!(null==t||null==(n=e.getKClassFromExpression(this))||!n.equals(e.getKClassFromExpression(t)))&&(e.isType(t,an)||M(),!!F(this.rawData_8be2vx$,t.rawData_8be2vx$))},an.$metadata$={kind:y,simpleName:"StringBoundary",interfaces:[Qe]},ln.prototype.onPolygon_z3kb82$=function(t){this.closure$polygons.add_11rb$(t)},ln.prototype.onMultiPolygon_a0zxnd$=function(t){this.closure$polygons.addAll_brywnq$(t)},ln.$metadata$={kind:y,interfaces:[H]},sn.prototype.parse_61zpoe$=function(t){var e=z();return We().parse_cqmfzd$(q.Base64.decode_61zpoe$(t),new ln(e)),new C(e)},sn.$metadata$={kind:y,simpleName:"TinyBoundary",interfaces:[an]},un.prototype.parse_61zpoe$=function(t){var e,n={v:null};return G.GeoJson.parse_gdwatq$(t,cn(n)),null!=(e=n.v)?e:new C(V())},un.$metadata$={kind:y,simpleName:"GeoJsonBoundary",interfaces:[an]},rn.$metadata$={kind:m,simpleName:"Boundaries",interfaces:[]};var pn,hn,_n,dn,fn,mn,$n,yn,gn,vn,bn,wn,xn=null;function kn(){return null===xn&&new rn,xn}function Cn(t,e){R.call(this),this.name$=t,this.ordinal$=e}function En(){En=function(){},pn=new Cn("COUNTRY",0),hn=new Cn("MACRO_STATE",1),_n=new Cn("STATE",2),dn=new Cn("MACRO_COUNTY",3),fn=new Cn("COUNTY",4),mn=new Cn("CITY",5)}function Sn(){return En(),pn}function Tn(){return En(),hn}function On(){return En(),_n}function Nn(){return En(),dn}function Pn(){return En(),fn}function In(){return En(),mn}function An(){return[Sn(),Tn(),On(),Nn(),Pn(),In()]}function Rn(t,e){var n,i;this.key=t,this.multiPolygon=null;var o=z();for(n=e.iterator();n.hasNext();)for(i=n.next().asMultipolygon().iterator();i.hasNext();){var r=i.next();r.isEmpty()||o.add_11rb$(r)}this.multiPolygon=new C(o)}function jn(){}function Ln(t,e,n){R.call(this),this.myValue_l7uf9u$_0=n,this.name$=t,this.ordinal$=e}function zn(){zn=function(){},$n=new Ln("HIGHLIGHTS",0,"highlights"),yn=new Ln("POSITION",1,"position"),gn=new Ln("CENTROID",2,"centroid"),vn=new Ln("LIMIT",3,"limit"),bn=new Ln("BOUNDARY",4,"boundary"),wn=new Ln("FRAGMENTS",5,"tiles")}function Dn(){return zn(),$n}function Mn(){return zn(),yn}function Bn(){return zn(),gn}function Fn(){return zn(),vn}function Un(){return zn(),bn}function qn(){return zn(),wn}function Hn(){}function Gn(){ti=this,this.PARENT_KIND_ID_0=!0}function Kn(){this.mySelf_r0smt8$_2fjbkj$_0=this.mySelf_r0smt8$_2fjbkj$_0,this.features=W(),this.fragments_n0offn$_0=null,this.levelOfDetails_31v9rh$_0=null}function Vn(){Kn.call(this),this.mode_73qlis$_0=ki(),this.ids_kuk605$_0=this.ids_kuk605$_0,Kn.prototype.setSelf_8auog8$.call(this,this)}function Yn(t,e,n,i){Wn.call(this,e,n,i),this.ids_uekfos$_0=t}function Wn(t,e,n){this.features_o650gb$_0=t,this.fragments_gwv6hr$_0=e,this.levelOfDetails_6xp3yt$_0=n}function Xn(){this.values_dve3y8$_0=this.values_dve3y8$_0,this.kind_0=ei().PARENT_KIND_ID_0}Cn.$metadata$={kind:y,simpleName:"FeatureLevel",interfaces:[R]},Cn.values=An,Cn.valueOf_61zpoe$=function(t){switch(t){case"COUNTRY":return Sn();case"MACRO_STATE":return Tn();case"STATE":return On();case"MACRO_COUNTY":return Nn();case"COUNTY":return Pn();case"CITY":return In();default:j("No enum constant jetbrains.gis.geoprotocol.FeatureLevel."+t)}},Rn.$metadata$={kind:y,simpleName:"Fragment",interfaces:[]},Ln.prototype.toString=function(){return this.myValue_l7uf9u$_0},Ln.$metadata$={kind:y,simpleName:"FeatureOption",interfaces:[R]},Ln.values=function(){return[Dn(),Mn(),Bn(),Fn(),Un(),qn()]},Ln.valueOf_61zpoe$=function(t){switch(t){case"HIGHLIGHTS":return Dn();case"POSITION":return Mn();case"CENTROID":return Bn();case"LIMIT":return Fn();case"BOUNDARY":return Un();case"FRAGMENTS":return qn();default:j("No enum constant jetbrains.gis.geoprotocol.GeoRequest.FeatureOption."+t)}},Hn.$metadata$={kind:D,simpleName:"ExplicitSearchRequest",interfaces:[jn]},jn.$metadata$={kind:D,simpleName:"GeoRequest",interfaces:[]},Object.defineProperty(Kn.prototype,"mySelf_r0smt8$_0",{configurable:!0,get:function(){return null==this.mySelf_r0smt8$_2fjbkj$_0?E("mySelf"):this.mySelf_r0smt8$_2fjbkj$_0},set:function(t){this.mySelf_r0smt8$_2fjbkj$_0=t}}),Object.defineProperty(Kn.prototype,"fragments",{configurable:!0,get:function(){return this.fragments_n0offn$_0},set:function(t){this.fragments_n0offn$_0=t}}),Object.defineProperty(Kn.prototype,"levelOfDetails",{configurable:!0,get:function(){return this.levelOfDetails_31v9rh$_0},set:function(t){this.levelOfDetails_31v9rh$_0=t}}),Kn.prototype.setSelf_8auog8$=function(t){this.mySelf_r0smt8$_0=t},Kn.prototype.setResolution_s8ev37$=function(t){return this.levelOfDetails=null!=t?$o().fromResolution_za3lpa$(t):null,this.mySelf_r0smt8$_0},Kn.prototype.setFragments_g9b45l$=function(t){return this.fragments=null!=t?Y(t):null,this.mySelf_r0smt8$_0},Kn.prototype.addFragments_8j3uov$=function(t,e){return null==this.fragments&&(this.fragments=X()),I(this.fragments).put_xwzc9p$(t,e),this.mySelf_r0smt8$_0},Kn.prototype.addFeature_bdjexh$=function(t){return this.features.add_11rb$(t),this.mySelf_r0smt8$_0},Kn.prototype.setFeatures_kzd2fe$=function(t){return this.features.clear(),this.features.addAll_brywnq$(t),this.mySelf_r0smt8$_0},Kn.$metadata$={kind:y,simpleName:"RequestBuilderBase",interfaces:[]},Object.defineProperty(Vn.prototype,"mode",{configurable:!0,get:function(){return this.mode_73qlis$_0}}),Object.defineProperty(Vn.prototype,"ids_0",{configurable:!0,get:function(){return null==this.ids_kuk605$_0?E("ids"):this.ids_kuk605$_0},set:function(t){this.ids_kuk605$_0=t}}),Vn.prototype.setIds_mhpeer$=function(t){return this.ids_0=t,this},Vn.prototype.build=function(){return new Yn(this.ids_0,this.features,this.fragments,this.levelOfDetails)},Object.defineProperty(Yn.prototype,"ids",{get:function(){return this.ids_uekfos$_0}}),Yn.$metadata$={kind:y,simpleName:"MyExplicitSearchRequest",interfaces:[Hn,Wn]},Vn.$metadata$={kind:y,simpleName:"ExplicitRequestBuilder",interfaces:[Kn]},Object.defineProperty(Wn.prototype,"features",{get:function(){return this.features_o650gb$_0}}),Object.defineProperty(Wn.prototype,"fragments",{get:function(){return this.fragments_gwv6hr$_0}}),Object.defineProperty(Wn.prototype,"levelOfDetails",{get:function(){return this.levelOfDetails_6xp3yt$_0}}),Wn.$metadata$={kind:y,simpleName:"MyGeoRequestBase",interfaces:[jn]},Object.defineProperty(Xn.prototype,"values_0",{configurable:!0,get:function(){return null==this.values_dve3y8$_0?E("values"):this.values_dve3y8$_0},set:function(t){this.values_dve3y8$_0=t}}),Xn.prototype.setParentValues_mhpeer$=function(t){return this.values_0=t,this},Xn.prototype.setParentKind_6taknv$=function(t){return this.kind_0=t,this},Xn.prototype.build=function(){return this.kind_0===ei().PARENT_KIND_ID_0?Eo().withIdList_mhpeer$(this.values_0):Eo().withName_61zpoe$(this.values_0.get_za3lpa$(0))},Xn.$metadata$={kind:y,simpleName:"MapRegionBuilder",interfaces:[]},Gn.$metadata$={kind:m,simpleName:"GeoRequestBuilder",interfaces:[]};var Zn,Jn,Qn,ti=null;function ei(){return null===ti&&new Gn,ti}function ni(){}function ii(t,e){this.answers=t,this.featureLevel=e}function oi(t,e,n){this.id=t,this.name=e,this.level=n}function ri(t){this.geocodedFeatures=t}function ai(t,e,n,i,o,r,a,s,l){this.id=t,this.name=e,this.centroid=n,this.position=i,this.limit=o,this.boundary=r,this.highlights=a,this.fragments=s,this.parents=l}function si(t){this.message=t}function li(t,e){this.features=t,this.featureLevel=e}function ui(t,e,n){this.request=t,this.namesakeCount=e,this.namesakes=n}function ci(t,e){this.name=t,this.parents=e}function pi(t,e){this.name=t,this.level=e}function hi(){}function _i(){this.geocodingAnswers_0=z(),this.featureLevel_0=null}function di(){this.ambiguousFeatures_0=z(),this.featureLevel_0=null}function fi(){this.geocodedFeatures_0=z()}function mi(){this.id_jdni55$_0=this.id_jdni55$_0,this.name_da6rd5$_0=this.name_da6rd5$_0,this.centroid_0=null,this.limit_0=null,this.position_0=null,this.boundary_0=null,this.highlights_0=z(),this.fragments_0=z(),this.parents_0=z()}function $i(){this.query_lkdzx6$_0=this.query_lkdzx6$_0,this.totalNamesakeCount_0=0,this.namesakeExamples_0=z()}function yi(){this.name_xd6cda$_0=this.name_xd6cda$_0,this.parentNames_0=z(),this.parentLevels_0=z()}function gi(){}function vi(t){this.myUrl_0=t,this.myClient_0=st()}function bi(t,e,n,i,o,r){rt.call(this,r),this.$controller=o,this.exceptionState_0=6,this.local$this$GeoTransportImpl=t,this.local$closure$request=e,this.local$closure$async=n}function wi(t,e,n){R.call(this),this.myValue_dowh1b$_0=n,this.name$=t,this.ordinal$=e}function xi(){xi=function(){},Zn=new wi("BY_ID",0,"by_id"),Jn=new wi("BY_NAME",1,"by_geocoding"),Qn=new wi("REVERSE",2,"reverse")}function ki(){return xi(),Zn}function Ci(){return xi(),Jn}function Ei(){return xi(),Qn}function Si(t){Vi(),this.myTransport_0=t}function Ti(t){if(e.isType(t,ii)){var n,i=t.answers,o=$t("geocodedFeatures",1,(function(t){return t.geocodedFeatures})),r=z();for(n=i.iterator();n.hasNext();){var a=o(n.next());bt(r,a)}return r}throw e.isType(t,li)?mt(Vi().createAmbiguousMessage_z3t9ig$(t.features)):e.isType(t,si)?mt("GIS error: "+t.message):P("Unknown response status: "+t)}function Oi(){Ki=this}function Ni(t){return t.name}oi.$metadata$={kind:y,simpleName:"GeoParent",interfaces:[]},oi.prototype.component1=function(){return this.id},oi.prototype.component2=function(){return this.name},oi.prototype.component3=function(){return this.level},oi.prototype.copy_7n6hd0$=function(t,e,n){return new oi(void 0===t?this.id:t,void 0===e?this.name:e,void 0===n?this.level:n)},oi.prototype.toString=function(){return"GeoParent(id="+e.toString(this.id)+", name="+e.toString(this.name)+", level="+e.toString(this.level)+")"},oi.prototype.hashCode=function(){var t=0;return 31*(t=31*(t=31*t+e.hashCode(this.id)|0)+e.hashCode(this.name)|0)+e.hashCode(this.level)|0},oi.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.id,t.id)&&e.equals(this.name,t.name)&&e.equals(this.level,t.level)},ri.$metadata$={kind:y,simpleName:"GeocodingAnswer",interfaces:[]},ri.prototype.component1=function(){return this.geocodedFeatures},ri.prototype.copy_vovv7g$=function(t){return new ri(void 0===t?this.geocodedFeatures:t)},ri.prototype.toString=function(){return"GeocodingAnswer(geocodedFeatures="+e.toString(this.geocodedFeatures)+")"},ri.prototype.hashCode=function(){var t=0;return 31*t+e.hashCode(this.geocodedFeatures)|0},ri.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.geocodedFeatures,t.geocodedFeatures)},ai.$metadata$={kind:y,simpleName:"GeocodedFeature",interfaces:[]},ai.prototype.component1=function(){return this.id},ai.prototype.component2=function(){return this.name},ai.prototype.component3=function(){return this.centroid},ai.prototype.component4=function(){return this.position},ai.prototype.component5=function(){return this.limit},ai.prototype.component6=function(){return this.boundary},ai.prototype.component7=function(){return this.highlights},ai.prototype.component8=function(){return this.fragments},ai.prototype.component9=function(){return this.parents},ai.prototype.copy_gmmtvp$=function(t,e,n,i,o,r,a,s,l){return new ai(void 0===t?this.id:t,void 0===e?this.name:e,void 0===n?this.centroid:n,void 0===i?this.position:i,void 0===o?this.limit:o,void 0===r?this.boundary:r,void 0===a?this.highlights:a,void 0===s?this.fragments:s,void 0===l?this.parents:l)},ai.prototype.toString=function(){return"GeocodedFeature(id="+e.toString(this.id)+", name="+e.toString(this.name)+", centroid="+e.toString(this.centroid)+", position="+e.toString(this.position)+", limit="+e.toString(this.limit)+", boundary="+e.toString(this.boundary)+", highlights="+e.toString(this.highlights)+", fragments="+e.toString(this.fragments)+", parents="+e.toString(this.parents)+")"},ai.prototype.hashCode=function(){var t=0;return 31*(t=31*(t=31*(t=31*(t=31*(t=31*(t=31*(t=31*(t=31*t+e.hashCode(this.id)|0)+e.hashCode(this.name)|0)+e.hashCode(this.centroid)|0)+e.hashCode(this.position)|0)+e.hashCode(this.limit)|0)+e.hashCode(this.boundary)|0)+e.hashCode(this.highlights)|0)+e.hashCode(this.fragments)|0)+e.hashCode(this.parents)|0},ai.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.id,t.id)&&e.equals(this.name,t.name)&&e.equals(this.centroid,t.centroid)&&e.equals(this.position,t.position)&&e.equals(this.limit,t.limit)&&e.equals(this.boundary,t.boundary)&&e.equals(this.highlights,t.highlights)&&e.equals(this.fragments,t.fragments)&&e.equals(this.parents,t.parents)},ii.$metadata$={kind:y,simpleName:"SuccessGeoResponse",interfaces:[ni]},ii.prototype.component1=function(){return this.answers},ii.prototype.component2=function(){return this.featureLevel},ii.prototype.copy_k7bx52$=function(t,e){return new ii(void 0===t?this.answers:t,void 0===e?this.featureLevel:e)},ii.prototype.toString=function(){return"SuccessGeoResponse(answers="+e.toString(this.answers)+", featureLevel="+e.toString(this.featureLevel)+")"},ii.prototype.hashCode=function(){var t=0;return 31*(t=31*t+e.hashCode(this.answers)|0)+e.hashCode(this.featureLevel)|0},ii.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.answers,t.answers)&&e.equals(this.featureLevel,t.featureLevel)},si.$metadata$={kind:y,simpleName:"ErrorGeoResponse",interfaces:[ni]},si.prototype.component1=function(){return this.message},si.prototype.copy_61zpoe$=function(t){return new si(void 0===t?this.message:t)},si.prototype.toString=function(){return"ErrorGeoResponse(message="+e.toString(this.message)+")"},si.prototype.hashCode=function(){var t=0;return 31*t+e.hashCode(this.message)|0},si.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.message,t.message)},ui.$metadata$={kind:y,simpleName:"AmbiguousFeature",interfaces:[]},ui.prototype.component1=function(){return this.request},ui.prototype.component2=function(){return this.namesakeCount},ui.prototype.component3=function(){return this.namesakes},ui.prototype.copy_ckeskw$=function(t,e,n){return new ui(void 0===t?this.request:t,void 0===e?this.namesakeCount:e,void 0===n?this.namesakes:n)},ui.prototype.toString=function(){return"AmbiguousFeature(request="+e.toString(this.request)+", namesakeCount="+e.toString(this.namesakeCount)+", namesakes="+e.toString(this.namesakes)+")"},ui.prototype.hashCode=function(){var t=0;return 31*(t=31*(t=31*t+e.hashCode(this.request)|0)+e.hashCode(this.namesakeCount)|0)+e.hashCode(this.namesakes)|0},ui.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.request,t.request)&&e.equals(this.namesakeCount,t.namesakeCount)&&e.equals(this.namesakes,t.namesakes)},ci.$metadata$={kind:y,simpleName:"Namesake",interfaces:[]},ci.prototype.component1=function(){return this.name},ci.prototype.component2=function(){return this.parents},ci.prototype.copy_5b6i1g$=function(t,e){return new ci(void 0===t?this.name:t,void 0===e?this.parents:e)},ci.prototype.toString=function(){return"Namesake(name="+e.toString(this.name)+", parents="+e.toString(this.parents)+")"},ci.prototype.hashCode=function(){var t=0;return 31*(t=31*t+e.hashCode(this.name)|0)+e.hashCode(this.parents)|0},ci.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.name,t.name)&&e.equals(this.parents,t.parents)},pi.$metadata$={kind:y,simpleName:"NamesakeParent",interfaces:[]},pi.prototype.component1=function(){return this.name},pi.prototype.component2=function(){return this.level},pi.prototype.copy_3i9pe2$=function(t,e){return new pi(void 0===t?this.name:t,void 0===e?this.level:e)},pi.prototype.toString=function(){return"NamesakeParent(name="+e.toString(this.name)+", level="+e.toString(this.level)+")"},pi.prototype.hashCode=function(){var t=0;return 31*(t=31*t+e.hashCode(this.name)|0)+e.hashCode(this.level)|0},pi.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.name,t.name)&&e.equals(this.level,t.level)},li.$metadata$={kind:y,simpleName:"AmbiguousGeoResponse",interfaces:[ni]},li.prototype.component1=function(){return this.features},li.prototype.component2=function(){return this.featureLevel},li.prototype.copy_i46hsw$=function(t,e){return new li(void 0===t?this.features:t,void 0===e?this.featureLevel:e)},li.prototype.toString=function(){return"AmbiguousGeoResponse(features="+e.toString(this.features)+", featureLevel="+e.toString(this.featureLevel)+")"},li.prototype.hashCode=function(){var t=0;return 31*(t=31*t+e.hashCode(this.features)|0)+e.hashCode(this.featureLevel)|0},li.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.features,t.features)&&e.equals(this.featureLevel,t.featureLevel)},ni.$metadata$={kind:D,simpleName:"GeoResponse",interfaces:[]},_i.prototype.addGeocodingAnswer_vyutcg$=function(t){return this.geocodingAnswers_0.add_11rb$(t),this},_i.prototype.setLevel_ywpjnb$=function(t){return this.featureLevel_0=t,this},_i.prototype.build=function(){return new ii(this.geocodingAnswers_0,this.featureLevel_0)},_i.$metadata$={kind:y,simpleName:"SuccessResponseBuilder",interfaces:[]},di.prototype.addAmbiguousFeature_1j15ng$=function(t){return this.ambiguousFeatures_0.add_11rb$(t),this},di.prototype.setLevel_ywpjnb$=function(t){return this.featureLevel_0=t,this},di.prototype.build=function(){return new li(this.ambiguousFeatures_0,this.featureLevel_0)},di.$metadata$={kind:y,simpleName:"AmbiguousResponseBuilder",interfaces:[]},fi.prototype.addGeocodedFeature_sv8o3d$=function(t){return this.geocodedFeatures_0.add_11rb$(t),this},fi.prototype.addGeocodedFeatures_vovv7g$=function(t){var e,n=$("add",function(t,e){return t.add_11rb$(e)}.bind(null,this.geocodedFeatures_0));for(e=t.iterator();e.hasNext();)n(e.next());return this},fi.prototype.build=function(){return new ri(this.geocodedFeatures_0)},fi.$metadata$={kind:y,simpleName:"GeocodingAnswerBuilder",interfaces:[]},Object.defineProperty(mi.prototype,"id_0",{configurable:!0,get:function(){return null==this.id_jdni55$_0?E("id"):this.id_jdni55$_0},set:function(t){this.id_jdni55$_0=t}}),Object.defineProperty(mi.prototype,"name_0",{configurable:!0,get:function(){return null==this.name_da6rd5$_0?E("name"):this.name_da6rd5$_0},set:function(t){this.name_da6rd5$_0=t}}),mi.prototype.setId_61zpoe$=function(t){return this.id_0=t,this},mi.prototype.setName_61zpoe$=function(t){return this.name_0=t,this},mi.prototype.setBoundary_s3sx1a$=function(t){return this.boundary_0=t,this},mi.prototype.setCentroid_5bqtx5$=function(t){return this.centroid_0=t,this},mi.prototype.setLimit_emtjl$=function(t){return this.limit_0=t,this},mi.prototype.setPosition_emtjl$=function(t){return this.position_0=t,this},mi.prototype.addHighlight_61zpoe$=function(t){return this.highlights_0.add_11rb$(t),this},mi.prototype.addFragment_1ve0tm$=function(t){return this.fragments_0.add_11rb$(t),this},mi.prototype.addParent_yde6eq$=function(t){return this.parents_0.add_11rb$(t),this},mi.prototype.addParents_4zz52x$=function(t){return this.parents_0.addAll_brywnq$(t),this},mi.prototype.build=function(){var t=this.highlights_0,e=this.fragments_0,n=this.parents_0;return new ai(this.id_0,this.name_0,this.centroid_0,this.position_0,this.limit_0,this.boundary_0,t.isEmpty()?null:t,e.isEmpty()?null:e,n.isEmpty()?null:n)},mi.$metadata$={kind:y,simpleName:"GeocodedFeatureBuilder",interfaces:[]},Object.defineProperty($i.prototype,"query_0",{configurable:!0,get:function(){return null==this.query_lkdzx6$_0?E("query"):this.query_lkdzx6$_0},set:function(t){this.query_lkdzx6$_0=t}}),$i.prototype.setQuery_61zpoe$=function(t){return this.query_0=t,this},$i.prototype.addNamesakeExample_ulfa63$=function(t){return this.namesakeExamples_0.add_11rb$(t),this},$i.prototype.setTotalNamesakeCount_za3lpa$=function(t){return this.totalNamesakeCount_0=t,this},$i.prototype.build=function(){return new ui(this.query_0,this.totalNamesakeCount_0,this.namesakeExamples_0)},$i.$metadata$={kind:y,simpleName:"AmbiguousFeatureBuilder",interfaces:[]},Object.defineProperty(yi.prototype,"name_0",{configurable:!0,get:function(){return null==this.name_xd6cda$_0?E("name"):this.name_xd6cda$_0},set:function(t){this.name_xd6cda$_0=t}}),yi.prototype.setName_61zpoe$=function(t){return this.name_0=t,this},yi.prototype.addParentName_61zpoe$=function(t){return this.parentNames_0.add_11rb$(t),this},yi.prototype.addParentLevel_5pii6g$=function(t){return this.parentLevels_0.add_11rb$(t),this},yi.prototype.build=function(){if(this.parentNames_0.size!==this.parentLevels_0.size)throw f();for(var t=this.name_0,e=this.parentNames_0,n=this.parentLevels_0,i=e.iterator(),o=n.iterator(),r=S(L.min(J(e,10),J(n,10)));i.hasNext()&&o.hasNext();)r.add_11rb$(new pi(i.next(),o.next()));return new ci(t,Z(r))},yi.$metadata$={kind:y,simpleName:"NamesakeBuilder",interfaces:[]},gi.$metadata$={kind:D,simpleName:"GeoTransport",interfaces:[]},bi.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[rt]},bi.prototype=Object.create(rt.prototype),bi.prototype.constructor=bi,bi.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.exceptionState_0=3;var t=this.local$this$GeoTransportImpl.myClient_0,n=this.local$this$GeoTransportImpl.myUrl_0,i=new _t;ht(i,n);var o=this.local$closure$request,r=$("format",function(t,e){return t.format_2yxzh4$(e)}.bind(null,Io()))(o),a=$("formatJson",function(t,e){return t.formatJson_za3rmp$(e)}.bind(null,tt.JsonSupport))(r);if(null==a){i.body=lt.NullBody;var s,l=ct.JsType,u=et;t:do{try{s=nt(et,[],!1)}catch(t){if(e.isType(t,it)){s=null;break t}throw t}}while(0);i.bodyType=pt(l,u,s)}else if(e.isType(a,ut))i.body=a,i.bodyType=null;else{i.body=a;var c,p=ct.JsType,h=et;t:do{try{c=nt(et,[],!1)}catch(t){if(e.isType(t,it)){c=null;break t}throw t}}while(0);i.bodyType=pt(p,h,c)}if(i.method=dt.Companion.Post,this.state_0=1,this.result_0=new ft(i,t).execute(this),this.result_0===ot)return ot;continue;case 1:this.result_0;var _,d,f=this.result_0.call,m=ct.JsType,y=et;t:do{try{d=nt(et,[],!1)}catch(t){if(e.isType(t,it)){d=null;break t}throw t}}while(0);if(this.state_0=2,this.result_0=f.bodyNullable_qi9ur9$(pt(m,y,d),this),this.result_0===ot)return ot;continue;case 2:this.result_0="string"==typeof(_=this.result_0)?_:M();var g=this.result_0,b=$("parseJson",function(t,e){return t.parseJson_61zpoe$(e)}.bind(null,tt.JsonSupport))(g),w=$("parse",function(t,e){return t.parse_bkhwtg$(e)}.bind(null,Ho()))(b);return $("success",function(t,e){return t.success_11rb$(e),v}.bind(null,this.local$closure$async))(w);case 3:this.exceptionState_0=6;var x=this.exception_0;if(e.isType(x,it))return this.local$closure$async.failure_tcv7n7$(x),v;throw x;case 4:this.state_0=5;continue;case 5:return;case 6:throw this.exception_0;default:throw this.state_0=6,new Error("State Machine Unreachable execution")}}catch(t){if(6===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},vi.prototype.send_2yxzh4$=function(t){var e,n,i,o=new Q;return at(this.myClient_0,void 0,void 0,(e=this,n=t,i=o,function(t,o,r){var a=new bi(e,n,i,t,this,o);return r?a:a.doResume(null)})),o},vi.$metadata$={kind:y,simpleName:"GeoTransportImpl",interfaces:[gi]},wi.prototype.toString=function(){return this.myValue_dowh1b$_0},wi.$metadata$={kind:y,simpleName:"GeocodingMode",interfaces:[R]},wi.values=function(){return[ki(),Ci(),Ei()]},wi.valueOf_61zpoe$=function(t){switch(t){case"BY_ID":return ki();case"BY_NAME":return Ci();case"REVERSE":return Ei();default:j("No enum constant jetbrains.gis.geoprotocol.GeocodingMode."+t)}},Si.prototype.execute_2yxzh4$=function(t){return this.myTransport_0.send_2yxzh4$(t).map_2o04qz$(Ti)},Oi.prototype.createAmbiguousMessage_z3t9ig$=function(t){var e,n=yt().append_pdl1vj$("Geocoding errors:\n");for(e=t.iterator();e.hasNext();){var i=e.next();if(1!==i.namesakeCount)if(i.namesakeCount>1){n.append_pdl1vj$("Multiple objects ("+i.namesakeCount).append_pdl1vj$(") were found for '"+i.request+"'").append_pdl1vj$(i.namesakes.isEmpty()?".":":");var o,r,a=i.namesakes,s=S(J(a,10));for(o=a.iterator();o.hasNext();){var l=o.next(),u=s.add_11rb$,c=l.component1(),p=l.component2();u.call(s,"- "+c+gt(p,void 0,"(",")",void 0,void 0,Ni))}for(r=vt(s).iterator();r.hasNext();){var h=r.next();n.append_pdl1vj$("\n"+h)}}else n.append_pdl1vj$("No objects were found for '"+i.request+"'.");n.append_pdl1vj$("\n")}return n.toString()},Oi.$metadata$={kind:m,simpleName:"Companion",interfaces:[]};var Pi,Ii,Ai,Ri,ji,Li,zi,Di,Mi,Bi,Fi,Ui,qi,Hi,Gi,Ki=null;function Vi(){return null===Ki&&new Oi,Ki}function Yi(t,e){R.call(this),this.name$=t,this.ordinal$=e}function Wi(){Wi=function(){},Pi=new Yi("CITY_HIGH",0),Ii=new Yi("CITY_MEDIUM",1),Ai=new Yi("CITY_LOW",2),Ri=new Yi("COUNTY_HIGH",3),ji=new Yi("COUNTY_MEDIUM",4),Li=new Yi("COUNTY_LOW",5),zi=new Yi("STATE_HIGH",6),Di=new Yi("STATE_MEDIUM",7),Mi=new Yi("STATE_LOW",8),Bi=new Yi("COUNTRY_HIGH",9),Fi=new Yi("COUNTRY_MEDIUM",10),Ui=new Yi("COUNTRY_LOW",11),qi=new Yi("WORLD_HIGH",12),Hi=new Yi("WORLD_MEDIUM",13),Gi=new Yi("WORLD_LOW",14),$o()}function Xi(){return Wi(),Pi}function Zi(){return Wi(),Ii}function Ji(){return Wi(),Ai}function Qi(){return Wi(),Ri}function to(){return Wi(),ji}function eo(){return Wi(),Li}function no(){return Wi(),zi}function io(){return Wi(),Di}function oo(){return Wi(),Mi}function ro(){return Wi(),Bi}function ao(){return Wi(),Fi}function so(){return Wi(),Ui}function lo(){return Wi(),qi}function uo(){return Wi(),Hi}function co(){return Wi(),Gi}function po(t,e){this.resolution_8be2vx$=t,this.level_8be2vx$=e}function ho(){mo=this;var t,e=yo(),n=S(e.length);for(t=0;t!==e.length;++t){var i=e[t];n.add_11rb$(new po(i.toResolution(),i))}this.LOD_RANGES_0=n}Si.$metadata$={kind:y,simpleName:"GeocodingService",interfaces:[]},po.$metadata$={kind:y,simpleName:"Lod",interfaces:[]},Yi.prototype.toResolution=function(){return 15-this.ordinal|0},ho.prototype.fromResolution_za3lpa$=function(t){var e;for(e=this.LOD_RANGES_0.iterator();e.hasNext();){var n=e.next();if(t>=n.resolution_8be2vx$)return n.level_8be2vx$}return co()},ho.$metadata$={kind:m,simpleName:"Companion",interfaces:[]};var _o,fo,mo=null;function $o(){return Wi(),null===mo&&new ho,mo}function yo(){return[Xi(),Zi(),Ji(),Qi(),to(),eo(),no(),io(),oo(),ro(),ao(),so(),lo(),uo(),co()]}function go(t,e){Eo(),this.myKind_0=t,this.myValueList_0=null,this.myValueList_0=xt(e)}function vo(t,e){R.call(this),this.name$=t,this.ordinal$=e}function bo(){bo=function(){},_o=new vo("MAP_REGION_KIND_ID",0),fo=new vo("MAP_REGION_KIND_NAME",1)}function wo(){return bo(),_o}function xo(){return bo(),fo}function ko(){Co=this,this.US_48_NAME_0="us-48",this.US_48_0=new go(xo(),K(this.US_48_NAME_0)),this.US_48_PARENT_NAME_0="United States of America",this.US_48_PARENT=new go(xo(),K(this.US_48_PARENT_NAME_0))}Yi.$metadata$={kind:y,simpleName:"LevelOfDetails",interfaces:[R]},Yi.values=yo,Yi.valueOf_61zpoe$=function(t){switch(t){case"CITY_HIGH":return Xi();case"CITY_MEDIUM":return Zi();case"CITY_LOW":return Ji();case"COUNTY_HIGH":return Qi();case"COUNTY_MEDIUM":return to();case"COUNTY_LOW":return eo();case"STATE_HIGH":return no();case"STATE_MEDIUM":return io();case"STATE_LOW":return oo();case"COUNTRY_HIGH":return ro();case"COUNTRY_MEDIUM":return ao();case"COUNTRY_LOW":return so();case"WORLD_HIGH":return lo();case"WORLD_MEDIUM":return uo();case"WORLD_LOW":return co();default:j("No enum constant jetbrains.gis.geoprotocol.LevelOfDetails."+t)}},Object.defineProperty(go.prototype,"idList",{configurable:!0,get:function(){if(!this.containsId())throw A("Can't get ids from MapRegion with name".toString());return this.myValueList_0}}),Object.defineProperty(go.prototype,"name",{configurable:!0,get:function(){if(!this.containsName())throw A("Can't get name from MapRegion with ids".toString());if(1!==this.myValueList_0.size)throw A("MapRegion should contain one name".toString());return this.myValueList_0.get_za3lpa$(0)}}),go.prototype.containsId=function(){return this.myKind_0===wo()},go.prototype.containsName=function(){return this.myKind_0===xo()},go.prototype.equals=function(t){var n;return this===t||!(null==t||null==(n=e.getKClassFromExpression(this))||!n.equals(e.getKClassFromExpression(t)))&&(e.isType(t,go)||M(),this.myKind_0===t.myKind_0&&!!F(this.myValueList_0,t.myValueList_0))},go.prototype.hashCode=function(){var t=this.myKind_0.hashCode();return(31*t|0)+B(this.myValueList_0)|0},vo.$metadata$={kind:y,simpleName:"MapRegionKind",interfaces:[R]},vo.values=function(){return[wo(),xo()]},vo.valueOf_61zpoe$=function(t){switch(t){case"MAP_REGION_KIND_ID":return wo();case"MAP_REGION_KIND_NAME":return xo();default:j("No enum constant jetbrains.gis.geoprotocol.MapRegion.MapRegionKind."+t)}},ko.prototype.withIdList_mhpeer$=function(t){return new go(wo(),t)},ko.prototype.withId_61zpoe$=function(t){return new go(wo(),K(t))},ko.prototype.withName_61zpoe$=function(t){return wt(this.US_48_NAME_0,t,!0)?this.US_48_0:new go(xo(),K(t))},ko.$metadata$={kind:m,simpleName:"Companion",interfaces:[]};var Co=null;function Eo(){return null===Co&&new ko,Co}function So(){To=this,this.MIN_LON_0="min_lon",this.MIN_LAT_0="min_lat",this.MAX_LON_0="max_lon",this.MAX_LAT_0="max_lat"}go.$metadata$={kind:y,simpleName:"MapRegion",interfaces:[]},So.prototype.parseGeoRectangle_bkhwtg$=function(t){return new Ct(kt(t,this.MIN_LON_0),kt(t,this.MIN_LAT_0),kt(t,this.MAX_LON_0),kt(t,this.MAX_LAT_0))},So.prototype.formatGeoRectangle_emtjl$=function(t){return Et().put_hzlfav$(this.MIN_LON_0,t.startLongitude()).put_hzlfav$(this.MIN_LAT_0,t.minLatitude()).put_hzlfav$(this.MAX_LAT_0,t.maxLatitude()).put_hzlfav$(this.MAX_LON_0,t.endLongitude())},So.$metadata$={kind:m,simpleName:"ProtocolJsonHelper",interfaces:[]};var To=null;function Oo(){return null===To&&new So,To}function No(){Po=this,this.PARENT_KIND_ID_0=!0,this.PARENT_KIND_NAME_0=!1}No.prototype.format_2yxzh4$=function(t){if(!e.isType(t,Hn))throw P("Unknown request: "+e.getKClassFromExpression(t).toString());return this.explicit_0(t)},No.prototype.explicit_0=function(t){return St(this.common_0(t,ki()),jo().IDS,t.ids).get()},No.prototype.common_0=function(t,e){var n,i,o,r,a,s,l=Et().put_hzlfav$(jo().VERSION,3).put_snuhza$(jo().MODE,e).put_hzlfav$(jo().RESOLUTION,null!=(n=t.levelOfDetails)?n.toResolution():null),u=jo().FEATURE_OPTIONS,c=t.features,p=S(J(c,10));for(a=c.iterator();a.hasNext();){var h=a.next();p.add_11rb$(Tt(h))}if(r=St(l,u,p),i=jo().FRAGMENTS,null!=(o=t.fragments)){var _,d=Et(),f=S(o.size);for(_=o.entries.iterator();_.hasNext();){var m,$=_.next(),y=f.add_11rb$,g=$.key,v=$.value,b=$t("key",1,(function(t){return t.key})),w=S(J(v,10));for(m=v.iterator();m.hasNext();){var x=m.next();w.add_11rb$(b(x))}y.call(f,St(d,g,w))}s=d}else s=null;return r.putRemovable_wxs67v$(i,s)},No.$metadata$={kind:m,simpleName:"RequestJsonFormatter",interfaces:[]};var Po=null;function Io(){return null===Po&&new No,Po}function Ao(){Ro=this,this.PROTOCOL_VERSION=3,this.VERSION="version",this.MODE="mode",this.RESOLUTION="resolution",this.FEATURE_OPTIONS="feature_options",this.IDS="ids",this.FRAGMENTS="tiles"}Ao.$metadata$={kind:m,simpleName:"RequestKeys",interfaces:[]};var Ro=null;function jo(){return null===Ro&&new Ao,Ro}function Lo(){qo=this}function zo(t,e){return function(n){return n.forArrEntries_2wy1dl$(function(t,e){return function(n,i){var o,r=t,a=new Nt(n),s=S(J(i,10));for(o=i.iterator();o.hasNext();){var l,u=o.next();s.add_11rb$(e.readBoundary_0("string"==typeof(l=I(u))?l:M()))}return r.addFragment_1ve0tm$(new Rn(a,s)),v}}(t,e)),v}}function Do(t,e){return function(n){var i=new mi;return n.getString_hyc7mn$(Xo().ID,$("setId",function(t,e){return t.setId_61zpoe$(e)}.bind(null,i))).getString_hyc7mn$(Xo().NAME,$("setName",function(t,e){return t.setName_61zpoe$(e)}.bind(null,i))).forExistingStrings_hyc7mn$(Xo().HIGHLIGHTS,$("addHighlight",function(t,e){return t.addHighlight_61zpoe$(e)}.bind(null,i))).getExistingString_hyc7mn$(Xo().BOUNDARY,function(t,e){return function(n){return t.setBoundary_s3sx1a$(e.readGeometry_0(n)),v}}(i,t)).forObjects_6k19qz$(Xo().PARENTS,function(t,e){return function(n){return t.addParent_yde6eq$(e.parseGeoParent_0(n)),v}}(i,t)).getExistingObject_6k19qz$(Xo().CENTROID,function(t,e){return function(n){return t.setCentroid_5bqtx5$(e.parseCentroid_0(n)),v}}(i,t)).getExistingObject_6k19qz$(Xo().LIMIT,function(t,e){return function(n){return t.setLimit_emtjl$(e.parseGeoRectangle_0(n)),v}}(i,t)).getExistingObject_6k19qz$(Xo().POSITION,function(t,e){return function(n){return t.setPosition_emtjl$(e.parseGeoRectangle_0(n)),v}}(i,t)).getExistingObject_6k19qz$(Xo().FRAGMENTS,zo(i,t)),e.addGeocodedFeature_sv8o3d$(i.build()),v}}function Mo(t,e){return function(n){return n.getOptionalEnum_651ru9$(Xo().LEVEL,$("setLevel",function(t,e){return t.setLevel_ywpjnb$(e)}.bind(null,t)),An()).forObjects_6k19qz$(Xo().ANSWERS,function(t,e){return function(n){var i=new fi;return n.forObjects_6k19qz$(Xo().FEATURES,Do(t,i)),e.addGeocodingAnswer_vyutcg$(i.build()),v}}(e,t)),v}}function Bo(t){return function(e){var n,i=new yi;return e.getString_hyc7mn$(Xo().NAMESAKE_NAME,$("setName",function(t,e){return t.setName_61zpoe$(e)}.bind(null,i))).forObjects_6k19qz$(Xo().NAMESAKE_PARENTS,(n=i,function(t){return t.getString_hyc7mn$(Xo().NAMESAKE_NAME,$("addParentName",function(t,e){return t.addParentName_61zpoe$(e)}.bind(null,n))).getEnum_651ru9$(Xo().LEVEL,$("addParentLevel",function(t,e){return t.addParentLevel_5pii6g$(e)}.bind(null,n)),An()),v})),t.addNamesakeExample_ulfa63$(i.build()),v}}function Fo(t){return function(e){var n,i=new $i;return e.getString_hyc7mn$(Xo().QUERY,(n=i,function(t){return n.setQuery_61zpoe$(t),v})).getInt_qoz5hj$(Xo().NAMESAKE_COUNT,function(t){return function(e){return t.setTotalNamesakeCount_za3lpa$(e),v}}(i)).forObjects_6k19qz$(Xo().NAMESAKE_EXAMPLES,Bo(i)),t.addAmbiguousFeature_1j15ng$(i.build()),v}}function Uo(t){return function(e){return e.getOptionalEnum_651ru9$(Xo().LEVEL,function(t){return function(e){return t.setLevel_ywpjnb$(e),v}}(t),An()).forObjects_6k19qz$(Xo().FEATURES,Fo(t)),v}}Lo.prototype.parse_bkhwtg$=function(t){var e,n=Ot(t),i=n.getEnum_xwn52g$(Xo().STATUS,nr());switch(i.name){case"SUCCESS":e=this.success_0(n);break;case"AMBIGUOUS":e=this.ambiguous_0(n);break;case"ERROR":e=this.error_0(n);break;default:throw P("Unknown response status: "+i)}return e},Lo.prototype.success_0=function(t){var e=new _i;return t.getObject_6k19qz$(Xo().DATA,Mo(e,this)),e.build()},Lo.prototype.ambiguous_0=function(t){var e=new di;return t.getObject_6k19qz$(Xo().DATA,Uo(e)),e.build()},Lo.prototype.error_0=function(t){return new si(t.getString_61zpoe$(Xo().MESSAGE))},Lo.prototype.parseCentroid_0=function(t){return g(t.getDouble_61zpoe$(Xo().LON),t.getDouble_61zpoe$(Xo().LAT))},Lo.prototype.readGeometry_0=function(t){return kn().fromGeoJson_61zpoe$(t)},Lo.prototype.readBoundary_0=function(t){return kn().fromTwkb_61zpoe$(t)},Lo.prototype.parseGeoRectangle_0=function(t){return Oo().parseGeoRectangle_bkhwtg$(t.get())},Lo.prototype.parseGeoParent_0=function(t){return new oi(t.getString_61zpoe$(Xo().PARENT_ID),t.getString_61zpoe$(Xo().PARENT_NAME),t.getEnum_xwn52g$(Xo().PARENT_LEVEL,An()))},Lo.$metadata$={kind:m,simpleName:"ResponseJsonParser",interfaces:[]};var qo=null;function Ho(){return null===qo&&new Lo,qo}function Go(){Wo=this,this.STATUS="status",this.MESSAGE="message",this.DATA="data",this.FEATURES="features",this.ANSWERS="answers",this.LEVEL="level",this.QUERY="query",this.ID="id",this.NAME="name",this.PARENTS="parents",this.PARENT_ID="parent_id",this.PARENT_NAME="parent_name",this.PARENT_LEVEL="parent_level",this.HIGHLIGHTS="highlights",this.BOUNDARY="boundary",this.FRAGMENTS="tiles",this.LIMIT="limit",this.CENTROID="centroid",this.POSITION="position",this.LON="lon",this.LAT="lat",this.NAMESAKE_COUNT="total_namesake_count",this.NAMESAKE_EXAMPLES="namesake_examples",this.NAMESAKE_NAME="name",this.NAMESAKE_PARENTS="parents"}Go.$metadata$={kind:m,simpleName:"ResponseKeys",interfaces:[]};var Ko,Vo,Yo,Wo=null;function Xo(){return null===Wo&&new Go,Wo}function Zo(t,e){R.call(this),this.name$=t,this.ordinal$=e}function Jo(){Jo=function(){},Ko=new Zo("SUCCESS",0),Vo=new Zo("AMBIGUOUS",1),Yo=new Zo("ERROR",2)}function Qo(){return Jo(),Ko}function tr(){return Jo(),Vo}function er(){return Jo(),Yo}function nr(){return[Qo(),tr(),er()]}function ir(t){_r(),this.myTwkb_mge4rt$_0=t}function or(){hr=this}Zo.$metadata$={kind:y,simpleName:"ResponseStatus",interfaces:[R]},Zo.values=nr,Zo.valueOf_61zpoe$=function(t){switch(t){case"SUCCESS":return Qo();case"AMBIGUOUS":return tr();case"ERROR":return er();default:j("No enum constant jetbrains.gis.geoprotocol.json.ResponseStatus."+t)}},or.prototype.createEmpty=function(){return new ir(new Int8Array(0))},or.$metadata$={kind:m,simpleName:"Companion",interfaces:[]};var rr,ar,sr,lr,ur,cr,pr,hr=null;function _r(){return null===hr&&new or,hr}function dr(){}function fr(t){dr.call(this),this.styleName=t}function mr(t,e,n){dr.call(this),this.key=t,this.zoom=e,this.bbox=n}function $r(t){dr.call(this),this.coordinates=t}function yr(t,e,n){this.x=t,this.y=e,this.z=n}function gr(t){this.myGeometryConsumer_0=new vr,this.myParser_0=We().parser_cqmfzd$(t.asTwkb(),this.myGeometryConsumer_0)}function vr(){this.myTileGeometries_0=z()}function br(t,e,n,i,o,r,a){this.name=t,this.geometryCollection=e,this.kinds=n,this.subs=i,this.labels=o,this.shorts=r,this.size=a}function wr(){this.name="NoName",this.geometryCollection=_r().createEmpty(),this.kinds=V(),this.subs=V(),this.labels=V(),this.shorts=V(),this.layerSize=0}function xr(t,e){this.myTheme_fy5ei1$_0=e,this.mySocket_8l2uvz$_0=t.build_korocx$(new ga(new jr(this),Ft.ThrowableHandlers.instance)),this.myMessageQueue_ew5tg6$_0=new zr,this.pendingRequests_jgnyu1$_0=new Lr,this.mapConfig_7r1z1y$_0=null,this.myIncrement_xi5m5t$_0=0,this.myStatus_68s9dq$_0=Pr()}function kr(t,e){R.call(this),this.name$=t,this.ordinal$=e}function Cr(){Cr=function(){},rr=new kr("COLOR",0),ar=new kr("LIGHT",1),sr=new kr("DARK",2)}function Er(){return Cr(),rr}function Sr(){return Cr(),ar}function Tr(){return Cr(),sr}function Or(t,e){R.call(this),this.name$=t,this.ordinal$=e}function Nr(){Nr=function(){},lr=new Or("NOT_CONNECTED",0),ur=new Or("CONFIGURED",1),cr=new Or("CONNECTING",2),pr=new Or("ERROR",3)}function Pr(){return Nr(),lr}function Ir(){return Nr(),ur}function Ar(){return Nr(),cr}function Rr(){return Nr(),pr}function jr(t){this.$outer=t}function Lr(){this.lock_0=new Bt,this.myAsyncMap_0=X()}function zr(){this.myList_0=z(),this.myLock_0=new Bt}function Dr(t){this.bytes_0=t,this.count_0=this.bytes_0.length,this.position_0=0}function Mr(t){this.byteArrayStream_0=new Dr(t),this.key_0=this.readString_0(),this.tileLayers_0=this.readLayers_0()}function Br(){this.myClient_0=st()}function Fr(t,e,n,i,o,r){rt.call(this,r),this.$controller=o,this.exceptionState_0=7,this.local$this$HttpTileTransport=t,this.local$closure$url=e,this.local$closure$async=n}function Ur(){Vr=this,this.MIN_ZOOM_FIELD_0="minZoom",this.MAX_ZOOM_FIELD_0="maxZoom",this.ZOOMS_0="zooms",this.LAYERS_0="layers",this.BORDER_0="border",this.TABLE_0="table",this.COLUMNS_0="columns",this.ORDER_0="order",this.COLORS_0="colors",this.STYLES_0="styles",this.TILE_SHEETS_0="tiles",this.BACKGROUND_0="background",this.FILTER_0="filter",this.GT_0="$gt",this.GTE_0="$gte",this.LT_0="$lt",this.LTE_0="$lte",this.SYMBOLIZER_0="symbolizer",this.TYPE_0="type",this.FILL_0="fill",this.STROKE_0="stroke",this.STROKE_WIDTH_0="stroke-width",this.LINE_CAP_0="stroke-linecap",this.LINE_JOIN_0="stroke-linejoin",this.LABEL_FIELD_0="label",this.FONT_STYLE_0="fontStyle",this.FONT_FACE_0="fontface",this.TEXT_TRANSFORM_0="text-transform",this.SIZE_0="size",this.WRAP_WIDTH_0="wrap-width",this.MINIMUM_PADDING_0="minimum-padding",this.REPEAT_DISTANCE_0="repeat-distance",this.SHIELD_CORNER_RADIUS_0="shield-corner-radius",this.SHIELD_FILL_COLOR_0="shield-fill-color",this.SHIELD_STROKE_COLOR_0="shield-stroke-color",this.MIN_ZOOM_0=1,this.MAX_ZOOM_0=15}function qr(t){var e;return"string"==typeof(e=t)?e:M()}function Hr(t,n){return function(i){return i.forEntries_ophlsb$(function(t,n){return function(i,o){var r,a,s,l,u,c;if(e.isType(o,Qt)){var p,h=S(J(o,10));for(p=o.iterator();p.hasNext();){var _=p.next();h.add_11rb$(Jt(_))}l=h,r=function(t){return l.contains_11rb$(t)}}else if(e.isNumber(o))s=Jt(o),r=function(t){return t===s};else{if(!e.isType(o,Vt))throw P("Unsupported filter type.");r=t.makeCompareFunctions_0(Ot(o))}return a=r,n.addFilterFunction_xmiwn3$((u=a,c=i,function(t){return u(t.getFieldValue_61zpoe$(c))})),v}}(t,n)),v}}function Gr(t,e,n){return function(i){var o,r=new ya;return i.getExistingString_hyc7mn$(t.TYPE_0,(o=r,function(t){return o.type=t,v})).getExistingString_hyc7mn$(t.FILL_0,function(t,e){return function(n){return e.fill=t.get_11rb$(n),v}}(e,r)).getExistingString_hyc7mn$(t.STROKE_0,function(t,e){return function(n){return e.stroke=t.get_11rb$(n),v}}(e,r)).getExistingDouble_l47sdb$(t.STROKE_WIDTH_0,function(t){return function(e){return t.strokeWidth=e,v}}(r)).getExistingString_hyc7mn$(t.LINE_CAP_0,function(t){return function(e){return t.lineCap=e,v}}(r)).getExistingString_hyc7mn$(t.LINE_JOIN_0,function(t){return function(e){return t.lineJoin=e,v}}(r)).getExistingString_hyc7mn$(t.LABEL_FIELD_0,function(t){return function(e){return t.labelField=e,v}}(r)).getExistingString_hyc7mn$(t.FONT_STYLE_0,function(t){return function(e){return t.fontStyle=e,v}}(r)).getExistingString_hyc7mn$(t.FONT_FACE_0,function(t){return function(e){return t.fontFamily=e,v}}(r)).getExistingString_hyc7mn$(t.TEXT_TRANSFORM_0,function(t){return function(e){return t.textTransform=e,v}}(r)).getExistingDouble_l47sdb$(t.SIZE_0,function(t){return function(e){return t.size=e,v}}(r)).getExistingDouble_l47sdb$(t.WRAP_WIDTH_0,function(t){return function(e){return t.wrapWidth=e,v}}(r)).getExistingDouble_l47sdb$(t.MINIMUM_PADDING_0,function(t){return function(e){return t.minimumPadding=e,v}}(r)).getExistingDouble_l47sdb$(t.REPEAT_DISTANCE_0,function(t){return function(e){return t.repeatDistance=e,v}}(r)).getExistingDouble_l47sdb$(t.SHIELD_CORNER_RADIUS_0,function(t){return function(e){return t.shieldCornerRadius=e,v}}(r)).getExistingString_hyc7mn$(t.SHIELD_FILL_COLOR_0,function(t,e){return function(n){return e.shieldFillColor=t.get_11rb$(n),v}}(e,r)).getExistingString_hyc7mn$(t.SHIELD_STROKE_COLOR_0,function(t,e){return function(n){return e.shieldStrokeColor=t.get_11rb$(n),v}}(e,r)),n.style_wyrdse$(r),v}}function Kr(t,e){return function(n){var i=X();return n.forArrEntries_2wy1dl$(function(t,e){return function(n,i){var o,r=e,a=S(J(i,10));for(o=i.iterator();o.hasNext();){var s,l=o.next();a.add_11rb$(Zt(t,"string"==typeof(s=l)?s:M()))}return r.put_xwzc9p$(n,a),v}}(t,i)),e.rulesByTileSheet=i,v}}ir.prototype.asTwkb=function(){return this.myTwkb_mge4rt$_0},ir.prototype.equals=function(t){var n;return this===t||!(null==t||null==(n=e.getKClassFromExpression(this))||!n.equals(e.getKClassFromExpression(t)))&&(e.isType(t,ir)||M(),!!Pt(this.myTwkb_mge4rt$_0,t.myTwkb_mge4rt$_0))},ir.prototype.hashCode=function(){return It(this.myTwkb_mge4rt$_0)},ir.prototype.toString=function(){return"GeometryCollection(myTwkb="+this.myTwkb_mge4rt$_0+")"},ir.$metadata$={kind:y,simpleName:"GeometryCollection",interfaces:[]},fr.$metadata$={kind:y,simpleName:"ConfigureConnectionRequest",interfaces:[dr]},mr.$metadata$={kind:y,simpleName:"GetBinaryGeometryRequest",interfaces:[dr]},$r.$metadata$={kind:y,simpleName:"CancelBinaryTileRequest",interfaces:[dr]},dr.$metadata$={kind:y,simpleName:"Request",interfaces:[]},yr.prototype.toString=function(){return this.z.toString()+"-"+this.x+"-"+this.y},yr.prototype.equals=function(t){var n;return this===t||!(null==t||null==(n=e.getKClassFromExpression(this))||!n.equals(e.getKClassFromExpression(t)))&&(e.isType(t,yr)||M(),this.x===t.x&&this.y===t.y&&this.z===t.z)},yr.prototype.hashCode=function(){var t=this.x;return(31*(t=(31*t|0)+this.y|0)|0)+this.z|0},yr.$metadata$={kind:y,simpleName:"TileCoordinates",interfaces:[]},Object.defineProperty(gr.prototype,"geometries",{configurable:!0,get:function(){return this.myGeometryConsumer_0.tileGeometries}}),gr.prototype.resume=function(){return this.myParser_0.next()},Object.defineProperty(vr.prototype,"tileGeometries",{configurable:!0,get:function(){return this.myTileGeometries_0}}),vr.prototype.onPoint_adb7pk$=function(t){this.myTileGeometries_0.add_11rb$(At.Companion.createMultiPoint_xgn53i$(new x(K(Rt(t)))))},vr.prototype.onLineString_1u6eph$=function(t){this.myTileGeometries_0.add_11rb$(At.Companion.createMultiLineString_bc4hlz$(new k(K(jt(t)))))},vr.prototype.onPolygon_z3kb82$=function(t){this.myTileGeometries_0.add_11rb$(At.Companion.createMultiPolygon_8ft4gs$(new C(K(Lt(t)))))},vr.prototype.onMultiPoint_oeq1z7$=function(t){this.myTileGeometries_0.add_11rb$(At.Companion.createMultiPoint_xgn53i$(zt(t)))},vr.prototype.onMultiLineString_6n275e$=function(t){this.myTileGeometries_0.add_11rb$(At.Companion.createMultiLineString_bc4hlz$(Dt(t)))},vr.prototype.onMultiPolygon_a0zxnd$=function(t){this.myTileGeometries_0.add_11rb$(At.Companion.createMultiPolygon_8ft4gs$(Mt(t)))},vr.$metadata$={kind:y,simpleName:"MyGeometryConsumer",interfaces:[H]},gr.$metadata$={kind:y,simpleName:"TileGeometryParser",interfaces:[]},br.$metadata$={kind:y,simpleName:"TileLayer",interfaces:[]},br.prototype.component1=function(){return this.name},br.prototype.component2=function(){return this.geometryCollection},br.prototype.component3=function(){return this.kinds},br.prototype.component4=function(){return this.subs},br.prototype.component5=function(){return this.labels},br.prototype.component6=function(){return this.shorts},br.prototype.component7=function(){return this.size},br.prototype.copy_4csmna$=function(t,e,n,i,o,r,a){return new br(void 0===t?this.name:t,void 0===e?this.geometryCollection:e,void 0===n?this.kinds:n,void 0===i?this.subs:i,void 0===o?this.labels:o,void 0===r?this.shorts:r,void 0===a?this.size:a)},br.prototype.toString=function(){return"TileLayer(name="+e.toString(this.name)+", geometryCollection="+e.toString(this.geometryCollection)+", kinds="+e.toString(this.kinds)+", subs="+e.toString(this.subs)+", labels="+e.toString(this.labels)+", shorts="+e.toString(this.shorts)+", size="+e.toString(this.size)+")"},br.prototype.hashCode=function(){var t=0;return 31*(t=31*(t=31*(t=31*(t=31*(t=31*(t=31*t+e.hashCode(this.name)|0)+e.hashCode(this.geometryCollection)|0)+e.hashCode(this.kinds)|0)+e.hashCode(this.subs)|0)+e.hashCode(this.labels)|0)+e.hashCode(this.shorts)|0)+e.hashCode(this.size)|0},br.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.name,t.name)&&e.equals(this.geometryCollection,t.geometryCollection)&&e.equals(this.kinds,t.kinds)&&e.equals(this.subs,t.subs)&&e.equals(this.labels,t.labels)&&e.equals(this.shorts,t.shorts)&&e.equals(this.size,t.size)},wr.prototype.build=function(){return new br(this.name,this.geometryCollection,this.kinds,this.subs,this.labels,this.shorts,this.layerSize)},wr.$metadata$={kind:y,simpleName:"TileLayerBuilder",interfaces:[]},kr.$metadata$={kind:y,simpleName:"Theme",interfaces:[R]},kr.values=function(){return[Er(),Sr(),Tr()]},kr.valueOf_61zpoe$=function(t){switch(t){case"COLOR":return Er();case"LIGHT":return Sr();case"DARK":return Tr();default:j("No enum constant jetbrains.gis.tileprotocol.TileService.Theme."+t)}},Object.defineProperty(xr.prototype,"mapConfig",{configurable:!0,get:function(){return this.mapConfig_7r1z1y$_0},set:function(t){this.mapConfig_7r1z1y$_0=t}}),xr.prototype.getTileData_h9hod0$=function(t,n){var i,o=(i=this.myIncrement_xi5m5t$_0,this.myIncrement_xi5m5t$_0=i+1|0,i).toString(),r=new Q;this.pendingRequests_jgnyu1$_0.put_9yqal7$(o,r);try{var a=new mr(o,n,t),s=$("format",function(t,e){return t.format_scn9es$(e)}.bind(null,Zr()))(a),l=$("formatJson",function(t,e){return t.formatJson_za3rmp$(e)}.bind(null,tt.JsonSupport))(s);$("sendGeometryRequest",function(t,e){return t.sendGeometryRequest_rzspr3$_0(e),v}.bind(null,this))(l)}catch(t){if(!e.isType(t,it))throw t;this.pendingRequests_jgnyu1$_0.poll_61zpoe$(o).failure_tcv7n7$(t)}return r},xr.prototype.sendGeometryRequest_rzspr3$_0=function(t){switch(this.myStatus_68s9dq$_0.name){case"NOT_CONNECTED":this.myMessageQueue_ew5tg6$_0.add_11rb$(t),this.myStatus_68s9dq$_0=Ar(),this.mySocket_8l2uvz$_0.connect();break;case"CONFIGURED":this.mySocket_8l2uvz$_0.send_61zpoe$(t);break;case"CONNECTING":this.myMessageQueue_ew5tg6$_0.add_11rb$(t);break;case"ERROR":throw P("Socket error")}},xr.prototype.sendInitMessage_n8ehnp$_0=function(){var t=new fr(this.myTheme_fy5ei1$_0.name.toLowerCase()),e=$("format",function(t,e){return t.format_scn9es$(e)}.bind(null,Zr()))(t),n=tt.JsonSupport.formatJson_za3rmp$(e);$("send",function(t,e){return t.send_61zpoe$(e),v}.bind(null,this.mySocket_8l2uvz$_0))(n)},Or.$metadata$={kind:y,simpleName:"SocketStatus",interfaces:[R]},Or.values=function(){return[Pr(),Ir(),Ar(),Rr()]},Or.valueOf_61zpoe$=function(t){switch(t){case"NOT_CONNECTED":return Pr();case"CONFIGURED":return Ir();case"CONNECTING":return Ar();case"ERROR":return Rr();default:j("No enum constant jetbrains.gis.tileprotocol.TileService.SocketStatus."+t)}},jr.prototype.onOpen=function(){this.$outer.sendInitMessage_n8ehnp$_0()},jr.prototype.onClose_61zpoe$=function(t){this.$outer.myMessageQueue_ew5tg6$_0.add_11rb$(t),this.$outer.myStatus_68s9dq$_0===Ir()&&(this.$outer.myStatus_68s9dq$_0=Ar(),this.$outer.mySocket_8l2uvz$_0.connect())},jr.prototype.onError_tcv7n7$=function(t){this.$outer.myStatus_68s9dq$_0=Rr(),this.failPending_0(t)},jr.prototype.onTextMessage_61zpoe$=function(t){null==this.$outer.mapConfig&&(this.$outer.mapConfig=Yr().parse_jbvn2s$(tt.JsonSupport.parseJson_61zpoe$(t))),this.$outer.myStatus_68s9dq$_0=Ir();var e=this.$outer.myMessageQueue_ew5tg6$_0;this.$outer;var n=this.$outer;e.forEach_qlkmfe$($("send",function(t,e){return t.send_61zpoe$(e),v}.bind(null,n.mySocket_8l2uvz$_0))),e.clear()},jr.prototype.onBinaryMessage_fqrh44$=function(t){try{var n=new Mr(t);this.$outer;var i=this.$outer,o=n.component1(),r=n.component2();i.pendingRequests_jgnyu1$_0.poll_61zpoe$(o).success_11rb$(r)}catch(t){if(!e.isType(t,it))throw t;this.failPending_0(t)}},jr.prototype.failPending_0=function(t){var e;for(e=this.$outer.pendingRequests_jgnyu1$_0.pollAll().values.iterator();e.hasNext();)e.next().failure_tcv7n7$(t)},jr.$metadata$={kind:y,simpleName:"TileSocketHandler",interfaces:[xa]},Lr.prototype.put_9yqal7$=function(t,e){var n=this.lock_0;try{n.lock(),this.myAsyncMap_0.put_xwzc9p$(t,e)}finally{n.unlock()}},Lr.prototype.pollAll=function(){var t=this.lock_0;try{t.lock();var e=Y(this.myAsyncMap_0);return this.myAsyncMap_0.clear(),e}finally{t.unlock()}},Lr.prototype.poll_61zpoe$=function(t){var e=this.lock_0;try{return e.lock(),I(this.myAsyncMap_0.remove_11rb$(t))}finally{e.unlock()}},Lr.$metadata$={kind:y,simpleName:"RequestMap",interfaces:[]},zr.prototype.add_11rb$=function(t){var e=this.myLock_0;try{e.lock(),this.myList_0.add_11rb$(t)}finally{e.unlock()}},zr.prototype.forEach_qlkmfe$=function(t){var e=this.myLock_0;try{var n;for(e.lock(),n=this.myList_0.iterator();n.hasNext();)t(n.next())}finally{e.unlock()}},zr.prototype.clear=function(){var t=this.myLock_0;try{t.lock(),this.myList_0.clear()}finally{t.unlock()}},zr.$metadata$={kind:y,simpleName:"ThreadSafeMessageQueue",interfaces:[]},xr.$metadata$={kind:y,simpleName:"TileService",interfaces:[]},Dr.prototype.available=function(){return this.count_0-this.position_0|0},Dr.prototype.read=function(){var t;if(this.position_0=this.count_0)throw P("Array size exceeded.");if(t>this.available())throw P("Expected to read "+t+" bytea, but read "+this.available());if(t<=0)return new Int8Array(0);var e=this.position_0;return this.position_0=this.position_0+t|0,Ut(this.bytes_0,e,this.position_0)},Dr.$metadata$={kind:y,simpleName:"ByteArrayStream",interfaces:[]},Mr.prototype.readLayers_0=function(){var t=z();do{var e=this.byteArrayStream_0.available(),n=new wr;n.name=this.readString_0();var i=Je().readVarUInt_t0n4v2$($("readByte",function(t){return t.readByte_0()}.bind(null,this)));n.geometryCollection=new ir($("read",function(t,e){return t.read_za3lpa$(e)}.bind(null,this.byteArrayStream_0))(i)),n.kinds=this.readInts_0(),n.subs=this.readInts_0(),n.labels=this.readStrings_0(),n.shorts=this.readStrings_0(),n.layerSize=e-this.byteArrayStream_0.available()|0;var o=n.build();$("add",function(t,e){return t.add_11rb$(e)}.bind(null,t))(o)}while(this.byteArrayStream_0.available()>0);return t},Mr.prototype.readInts_0=function(){var t,e=Je().readVarUInt_t0n4v2$($("readByte",function(t){return t.readByte_0()}.bind(null,this)));if(e>0){var n,i=qt(0,e),o=S(J(i,10));for(n=i.iterator();n.hasNext();)n.next(),o.add_11rb$(Je().readVarUInt_t0n4v2$($("readByte",function(t){return t.readByte_0()}.bind(null,this))));t=o}else{if(0!==e)throw f();t=V()}return t},Mr.prototype.readStrings_0=function(){var t,e=Je().readVarUInt_t0n4v2$($("readByte",function(t){return t.readByte_0()}.bind(null,this)));if(e>0){var n,i=qt(0,e),o=S(J(i,10));for(n=i.iterator();n.hasNext();)n.next(),o.add_11rb$(this.readString_0());t=o}else{if(0!==e)throw f();t=V()}return t},Mr.prototype.readString_0=function(){var t,e=Je().readVarUInt_t0n4v2$($("readByte",function(t){return t.readByte_0()}.bind(null,this)));if(e>0)t=q.TextDecoder.decode_fqrh44$(this.byteArrayStream_0.read_za3lpa$(e));else{if(0!==e)throw f();t=""}return t},Mr.prototype.readByte_0=function(){return this.byteArrayStream_0.read()},Mr.prototype.component1=function(){return this.key_0},Mr.prototype.component2=function(){return this.tileLayers_0},Mr.$metadata$={kind:y,simpleName:"ResponseTileDecoder",interfaces:[]},Fr.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[rt]},Fr.prototype=Object.create(rt.prototype),Fr.prototype.constructor=Fr,Fr.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.exceptionState_0=3;var t=this.local$this$HttpTileTransport.myClient_0,n=this.local$closure$url,i=new _t;if(ht(i,n),i.method=dt.Companion.Get,this.state_0=1,this.result_0=new ft(i,t).execute(this),this.result_0===ot)return ot;continue;case 1:if(this.result_0,this.state_0=2,this.result_0=Ht(this.result_0,this),this.result_0===ot)return ot;continue;case 2:var o=this.result_0;return this.local$closure$async.success_11rb$(o),v;case 3:this.exceptionState_0=7;var r=this.exception_0;if(e.isType(r,Kt))return this.local$closure$async.failure_tcv7n7$(Gt(r.response.status.toString())),v;if(e.isType(r,it))return this.local$closure$async.failure_tcv7n7$(r),v;throw r;case 4:this.state_0=5;continue;case 5:this.state_0=6;continue;case 6:return;case 7:throw this.exception_0;default:throw this.state_0=7,new Error("State Machine Unreachable execution")}}catch(t){if(7===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Br.prototype.get_61zpoe$=function(t){var e,n,i,o=new Q;return at(this.myClient_0,void 0,void 0,(e=this,n=t,i=o,function(t,o,r){var a=new Fr(e,n,i,t,this,o);return r?a:a.doResume(null)})),o},Br.$metadata$={kind:y,simpleName:"HttpTileTransport",interfaces:[]},Ur.prototype.parse_jbvn2s$=function(t){var e=Ot(t),n=this.readColors_0(e.getObject_61zpoe$(this.COLORS_0)),i=this.readStyles_0(e.getObject_61zpoe$(this.STYLES_0),n);return(new da).tileSheetBackgrounds_5rxuhj$(this.readTileSheets_0(e.getObject_61zpoe$(this.TILE_SHEETS_0),n)).colors_5rxuhj$(n).layerNamesByZoom_qqdhea$(this.readZooms_0(e.getObject_61zpoe$(this.ZOOMS_0))).layers_c08aqx$(this.readLayers_0(e.getObject_61zpoe$(this.LAYERS_0),i)).build()},Ur.prototype.readStyles_0=function(t,n){var i,o,r,a=X();return t.forArrEntries_2wy1dl$((i=n,o=this,r=a,function(t,n){var a,s=r,l=S(J(n,10));for(a=n.iterator();a.hasNext();){var u,c=a.next(),p=l.add_11rb$,h=i;p.call(l,o.readRule_0(Ot(e.isType(u=c,Vt)?u:M()),h))}return s.put_xwzc9p$(t,l),v})),a},Ur.prototype.readZooms_0=function(t){for(var e=X(),n=1;n<=15;n++){var i=Wt(Yt(t.getArray_61zpoe$(n.toString()).stream(),qr));e.put_xwzc9p$(n,i)}return e},Ur.prototype.readLayers_0=function(t,e){var n,i,o,r=X();return t.forObjEntries_izf7h5$((n=e,i=this,o=r,function(t,e){var r=o,a=i.parseLayerConfig_0(t,Ot(e),n);return r.put_xwzc9p$(t,a),v})),r},Ur.prototype.readColors_0=function(t){var e,n,i=X();return t.forEntries_ophlsb$((e=this,n=i,function(t,i){var o,r;r="string"==typeof(o=i)?o:M();var a=n,s=e.parseHexWithAlpha_0(r);return a.put_xwzc9p$(t,s),v})),i},Ur.prototype.readTileSheets_0=function(t,e){var n,i,o,r=X();return t.forObjEntries_izf7h5$((n=e,i=this,o=r,function(t,e){var r=o,a=Zt(n,Xt(e,i.BACKGROUND_0));return r.put_xwzc9p$(t,a),v})),r},Ur.prototype.readRule_0=function(t,e){var n=new $a;return t.getIntOrDefault_u1i54l$(this.MIN_ZOOM_FIELD_0,$("minZoom",function(t,e){return t.minZoom_za3lpa$(e),v}.bind(null,n)),1).getIntOrDefault_u1i54l$(this.MAX_ZOOM_FIELD_0,$("maxZoom",function(t,e){return t.maxZoom_za3lpa$(e),v}.bind(null,n)),15).getExistingObject_6k19qz$(this.FILTER_0,Hr(this,n)).getExistingObject_6k19qz$(this.SYMBOLIZER_0,Gr(this,e,n)),n.build()},Ur.prototype.makeCompareFunctions_0=function(t){if(t.contains_61zpoe$(this.GT_0))return e=t.getInt_61zpoe$(this.GT_0),function(t){return t>e};var e;if(t.contains_61zpoe$(this.GTE_0))return function(t){return function(e){return e>=t}}(t.getInt_61zpoe$(this.GTE_0));if(t.contains_61zpoe$(this.LT_0))return function(t){return function(e){return ee)return!1;for(n=this.filters.iterator();n.hasNext();)if(!n.next()(t))return!1;return!0},Object.defineProperty($a.prototype,"style_0",{configurable:!0,get:function(){return null==this.style_czizc7$_0?E("style"):this.style_czizc7$_0},set:function(t){this.style_czizc7$_0=t}}),$a.prototype.minZoom_za3lpa$=function(t){this.minZoom_0=t},$a.prototype.maxZoom_za3lpa$=function(t){this.maxZoom_0=t},$a.prototype.style_wyrdse$=function(t){this.style_0=t},$a.prototype.addFilterFunction_xmiwn3$=function(t){this.filters_0.add_11rb$(t)},$a.prototype.build=function(){return new ma(I(this.minZoom_0),I(this.maxZoom_0),this.filters_0,this.style_0)},$a.$metadata$={kind:y,simpleName:"RuleBuilder",interfaces:[]},ma.$metadata$={kind:y,simpleName:"Rule",interfaces:[]},ya.$metadata$={kind:y,simpleName:"Style",interfaces:[]},ga.prototype.safeRun_0=function(t){try{t()}catch(t){if(!e.isType(t,it))throw t;this.myThrowableHandler_0.handle_tcv7n7$(t)}},ga.prototype.onClose_61zpoe$=function(t){var e,n;this.safeRun_0((e=this,n=t,function(){return e.myHandler_0.onClose_61zpoe$(n),v}))},ga.prototype.onError_tcv7n7$=function(t){var e,n;this.safeRun_0((e=this,n=t,function(){return e.myHandler_0.onError_tcv7n7$(n),v}))},ga.prototype.onTextMessage_61zpoe$=function(t){var e,n;this.safeRun_0((e=this,n=t,function(){return e.myHandler_0.onTextMessage_61zpoe$(n),v}))},ga.prototype.onBinaryMessage_fqrh44$=function(t){var e,n;this.safeRun_0((e=this,n=t,function(){return e.myHandler_0.onBinaryMessage_fqrh44$(n),v}))},ga.prototype.onOpen=function(){var t;this.safeRun_0((t=this,function(){return t.myHandler_0.onOpen(),v}))},ga.$metadata$={kind:y,simpleName:"SafeSocketHandler",interfaces:[xa]},va.$metadata$={kind:D,simpleName:"Socket",interfaces:[]},wa.$metadata$={kind:y,simpleName:"BaseSocketBuilder",interfaces:[ba]},ba.$metadata$={kind:D,simpleName:"SocketBuilder",interfaces:[]},xa.$metadata$={kind:D,simpleName:"SocketHandler",interfaces:[]},Ca.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[rt]},Ca.prototype=Object.create(rt.prototype),Ca.prototype.constructor=Ca,Ca.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:this.local$this$TileWebSocket.mySession_0=this.local$$receiver,this.local$this$TileWebSocket.myHandler_0.onOpen(),this.local$tmp$=this.local$$receiver.incoming.iterator(),this.state_0=2;continue;case 1:throw this.exception_0;case 2:if(this.state_0=3,this.result_0=this.local$tmp$.hasNext(this),this.result_0===ot)return ot;continue;case 3:if(this.result_0){this.state_0=4;continue}this.state_0=5;continue;case 4:var t=this.local$tmp$.next();e.isType(t,he)?this.local$this$TileWebSocket.myHandler_0.onTextMessage_61zpoe$(pe(t)):e.isType(t,de)&&this.local$this$TileWebSocket.myHandler_0.onBinaryMessage_fqrh44$(_e(t)),this.state_0=2;continue;case 5:return v;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},Sa.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[rt]},Sa.prototype=Object.create(rt.prototype),Sa.prototype.constructor=Sa,Sa.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:if(this.state_0=2,this.result_0=fe(this.local$this$,this.local$this$TileWebSocket.myUrl_0,void 0,Ea(this.local$this$TileWebSocket),this),this.result_0===ot)return ot;continue;case 1:throw this.exception_0;case 2:return this.result_0;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},ka.prototype.connect=function(){var t,e,n=this.myClient_0;at(n,void 0,void 0,(t=this,e=n,function(n,i,o){var r=new Sa(t,e,n,this,i);return o?r:r.doResume(null)}))},Ta.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[rt]},Ta.prototype=Object.create(rt.prototype),Ta.prototype.constructor=Ta,Ta.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;if(null!=(t=this.local$this$TileWebSocket.mySession_0)){if(this.state_0=2,this.result_0=ye(t,$e(me.NORMAL,"Close session"),this),this.result_0===ot)return ot;continue}this.result_0=null,this.state_0=3;continue;case 1:throw this.exception_0;case 2:this.result_0=v,this.state_0=3;continue;case 3:return this.local$this$TileWebSocket.mySession_0=null,v;default:throw this.state_0=1,new Error("State Machine Unreachable execution")}}catch(t){if(1===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},ka.prototype.close=function(){var t;at(this.myClient_0,void 0,void 0,(t=this,function(e,n,i){var o=new Ta(t,e,this,n);return i?o:o.doResume(null)}))},Oa.$metadata$={kind:e.Kind.CLASS,simpleName:null,interfaces:[rt]},Oa.prototype=Object.create(rt.prototype),Oa.prototype.constructor=Oa,Oa.prototype.doResume=function(){for(;;)try{switch(this.state_0){case 0:var t;if(null!=(t=this.local$this$TileWebSocket.mySession_0)){if(this.local$closure$msg_0=this.local$closure$msg,this.local$this$TileWebSocket_0=this.local$this$TileWebSocket,this.exceptionState_0=2,this.state_0=1,this.result_0=t.outgoing.send_11rb$(ge(this.local$closure$msg_0),this),this.result_0===ot)return ot;continue}this.local$tmp$=null,this.state_0=4;continue;case 1:this.exceptionState_0=5,this.state_0=3;continue;case 2:this.exceptionState_0=5;var n=this.exception_0;if(!e.isType(n,it))throw n;this.local$this$TileWebSocket_0.myHandler_0.onClose_61zpoe$(this.local$closure$msg_0),this.state_0=3;continue;case 3:this.local$tmp$=v,this.state_0=4;continue;case 4:return this.local$tmp$;case 5:throw this.exception_0;default:throw this.state_0=5,new Error("State Machine Unreachable execution")}}catch(t){if(5===this.state_0)throw this.exceptionState_0=this.state_0,t;this.state_0=this.exceptionState_0,this.exception_0=t}},ka.prototype.send_61zpoe$=function(t){var e,n;at(this.myClient_0,void 0,void 0,(e=this,n=t,function(t,i,o){var r=new Oa(e,n,t,this,i);return o?r:r.doResume(null)}))},ka.$metadata$={kind:y,simpleName:"TileWebSocket",interfaces:[va]},Na.prototype.build_korocx$=function(t){return new ka(we(ve.Js,Pa),t,this.myUrl_0)},Na.$metadata$={kind:y,simpleName:"TileWebSocketBuilder",interfaces:[ba]};var Ia=t.jetbrains||(t.jetbrains={}),Aa=Ia.gis||(Ia.gis={}),Ra=Aa.common||(Aa.common={}),ja=Ra.twkb||(Ra.twkb={});ja.InputBuffer=xe,ja.SimpleFeatureParser=ke,Object.defineProperty(Le,"POINT",{get:De}),Object.defineProperty(Le,"LINESTRING",{get:Me}),Object.defineProperty(Le,"POLYGON",{get:Be}),Object.defineProperty(Le,"MULTI_POINT",{get:Fe}),Object.defineProperty(Le,"MULTI_LINESTRING",{get:Ue}),Object.defineProperty(Le,"MULTI_POLYGON",{get:qe}),Object.defineProperty(Le,"GEOMETRY_COLLECTION",{get:He}),Object.defineProperty(Le,"Companion",{get:Ve}),je.GeometryType=Le,Re.prototype.Parser=je,Object.defineProperty(ja,"Twkb",{get:We}),Object.defineProperty(ja,"VarInt",{get:Je}),Object.defineProperty(Qe,"Companion",{get:on});var La=Aa.geoprotocol||(Aa.geoprotocol={});La.Boundary=Qe,Object.defineProperty(La,"Boundaries",{get:kn}),Object.defineProperty(Cn,"COUNTRY",{get:Sn}),Object.defineProperty(Cn,"MACRO_STATE",{get:Tn}),Object.defineProperty(Cn,"STATE",{get:On}),Object.defineProperty(Cn,"MACRO_COUNTY",{get:Nn}),Object.defineProperty(Cn,"COUNTY",{get:Pn}),Object.defineProperty(Cn,"CITY",{get:In}),La.FeatureLevel=Cn,La.Fragment=Rn,Object.defineProperty(Ln,"HIGHLIGHTS",{get:Dn}),Object.defineProperty(Ln,"POSITION",{get:Mn}),Object.defineProperty(Ln,"CENTROID",{get:Bn}),Object.defineProperty(Ln,"LIMIT",{get:Fn}),Object.defineProperty(Ln,"BOUNDARY",{get:Un}),Object.defineProperty(Ln,"FRAGMENTS",{get:qn}),jn.FeatureOption=Ln,jn.ExplicitSearchRequest=Hn,La.GeoRequest=jn,Gn.prototype.RequestBuilderBase=Kn,Vn.MyExplicitSearchRequest=Yn,Gn.prototype.ExplicitRequestBuilder=Vn,Gn.prototype.MyGeoRequestBase=Wn,Gn.prototype.MapRegionBuilder=Xn,Object.defineProperty(La,"GeoRequestBuilder",{get:ei}),ii.GeoParent=oi,ii.GeocodingAnswer=ri,ii.GeocodedFeature=ai,ni.SuccessGeoResponse=ii,ni.ErrorGeoResponse=si,li.AmbiguousFeature=ui,li.Namesake=ci,li.NamesakeParent=pi,ni.AmbiguousGeoResponse=li,La.GeoResponse=ni,hi.prototype.SuccessResponseBuilder=_i,hi.prototype.AmbiguousResponseBuilder=di,hi.prototype.GeocodingAnswerBuilder=fi,hi.prototype.GeocodedFeatureBuilder=mi,hi.prototype.AmbiguousFeatureBuilder=$i,hi.prototype.NamesakeBuilder=yi,La.GeoTransport=gi,d["ktor-ktor-client-core-js-legacy"]=o,La.GeoTransportImpl=vi,Object.defineProperty(wi,"BY_ID",{get:ki}),Object.defineProperty(wi,"BY_NAME",{get:Ci}),Object.defineProperty(wi,"REVERSE",{get:Ei}),La.GeocodingMode=wi,Object.defineProperty(Si,"Companion",{get:Vi}),La.GeocodingService=Si,Object.defineProperty(Yi,"CITY_HIGH",{get:Xi}),Object.defineProperty(Yi,"CITY_MEDIUM",{get:Zi}),Object.defineProperty(Yi,"CITY_LOW",{get:Ji}),Object.defineProperty(Yi,"COUNTY_HIGH",{get:Qi}),Object.defineProperty(Yi,"COUNTY_MEDIUM",{get:to}),Object.defineProperty(Yi,"COUNTY_LOW",{get:eo}),Object.defineProperty(Yi,"STATE_HIGH",{get:no}),Object.defineProperty(Yi,"STATE_MEDIUM",{get:io}),Object.defineProperty(Yi,"STATE_LOW",{get:oo}),Object.defineProperty(Yi,"COUNTRY_HIGH",{get:ro}),Object.defineProperty(Yi,"COUNTRY_MEDIUM",{get:ao}),Object.defineProperty(Yi,"COUNTRY_LOW",{get:so}),Object.defineProperty(Yi,"WORLD_HIGH",{get:lo}),Object.defineProperty(Yi,"WORLD_MEDIUM",{get:uo}),Object.defineProperty(Yi,"WORLD_LOW",{get:co}),Object.defineProperty(Yi,"Companion",{get:$o}),La.LevelOfDetails=Yi,Object.defineProperty(go,"Companion",{get:Eo}),La.MapRegion=go;var za=La.json||(La.json={});Object.defineProperty(za,"ProtocolJsonHelper",{get:Oo}),Object.defineProperty(za,"RequestJsonFormatter",{get:Io}),Object.defineProperty(za,"RequestKeys",{get:jo}),Object.defineProperty(za,"ResponseJsonParser",{get:Ho}),Object.defineProperty(za,"ResponseKeys",{get:Xo}),Object.defineProperty(Zo,"SUCCESS",{get:Qo}),Object.defineProperty(Zo,"AMBIGUOUS",{get:tr}),Object.defineProperty(Zo,"ERROR",{get:er}),za.ResponseStatus=Zo,Object.defineProperty(ir,"Companion",{get:_r});var Da=Aa.tileprotocol||(Aa.tileprotocol={});Da.GeometryCollection=ir,dr.ConfigureConnectionRequest=fr,dr.GetBinaryGeometryRequest=mr,dr.CancelBinaryTileRequest=$r,Da.Request=dr,Da.TileCoordinates=yr,Da.TileGeometryParser=gr,Da.TileLayer=br,Da.TileLayerBuilder=wr,Object.defineProperty(kr,"COLOR",{get:Er}),Object.defineProperty(kr,"LIGHT",{get:Sr}),Object.defineProperty(kr,"DARK",{get:Tr}),xr.Theme=kr,xr.TileSocketHandler=jr,d["lets-plot-base-js-legacy"]=i,xr.RequestMap=Lr,xr.ThreadSafeMessageQueue=zr,Da.TileService=xr;var Ma=Da.binary||(Da.binary={});Ma.ByteArrayStream=Dr,Ma.ResponseTileDecoder=Mr,(Da.http||(Da.http={})).HttpTileTransport=Br;var Ba=Da.json||(Da.json={});Object.defineProperty(Ba,"MapStyleJsonParser",{get:Yr}),Object.defineProperty(Ba,"RequestFormatter",{get:Zr}),d["lets-plot-base-portable-js-legacy"]=n,Object.defineProperty(Ba,"RequestJsonParser",{get:ta}),Object.defineProperty(Ba,"RequestKeys",{get:aa}),Object.defineProperty(sa,"CONFIGURE_CONNECTION",{get:ua}),Object.defineProperty(sa,"GET_BINARY_TILE",{get:ca}),Object.defineProperty(sa,"CANCEL_BINARY_TILE",{get:pa}),Ba.RequestTypes=sa;var Fa=Da.mapConfig||(Da.mapConfig={});Fa.LayerConfig=ha,_a.MapConfigBuilder=da,Fa.MapConfig=_a,Fa.TilePredicate=fa,ma.RuleBuilder=$a,Fa.Rule=ma,Fa.Style=ya;var Ua=Da.socket||(Da.socket={});return Ua.SafeSocketHandler=ga,Ua.Socket=va,ba.BaseSocketBuilder=wa,Ua.SocketBuilder=ba,Ua.SocketHandler=xa,Ua.TileWebSocket=ka,Ua.TileWebSocketBuilder=Na,ln.prototype.onLineString_1u6eph$=H.prototype.onLineString_1u6eph$,ln.prototype.onMultiLineString_6n275e$=H.prototype.onMultiLineString_6n275e$,ln.prototype.onMultiPoint_oeq1z7$=H.prototype.onMultiPoint_oeq1z7$,ln.prototype.onPoint_adb7pk$=H.prototype.onPoint_adb7pk$,t})?i.apply(e,o):i)||(t.exports=r)},837:function(t,e,n){var i,o,r;o=[e,n(421),n(73),n(705),n(246),n(486),n(860),n(463),n(856),n(322),n(96)],void 0===(r="function"==typeof(i=function(t,e,n,i,o,r,a,s,l,u,c){"use strict";var p,h,_=n.mu,d=e.kotlin.Unit,f=i.jetbrains.datalore.base.jsObject.dynamicObjectToMap_za3rmp$,m=o.jetbrains.datalore.plot.config.PlotConfig,$=e.kotlin.RuntimeException,y=r.jetbrains.datalore.base.geometry.DoubleVector,g=e.kotlin.text.toDouble_pdl1vz$,v=o.jetbrains.datalore.plot,b=o.jetbrains.datalore.plot.MonolithicCommon.PlotsBuildResult.Error,w=e.throwCCE,x=o.jetbrains.datalore.plot.MonolithicCommon.PlotsBuildResult.Success,k=e.ensureNotNull,C=e.kotlinx.dom.createElement_7cgwi1$,E=r.jetbrains.datalore.base.geometry.DoubleRectangle,S=a.jetbrains.datalore.plot.livemap.CursorServiceConfig,T=s.jetbrains.datalore.plot.builder.PlotContainer,O=i.jetbrains.datalore.base.js.css.enumerables.CssCursor,N=i.jetbrains.datalore.base.js.css.setCursor_1m07bc$,P=o.jetbrains.datalore.plot.config.LiveMapOptionsParser,I=a.jetbrains.datalore.plot.livemap,A=l.jetbrains.datalore.vis.svgMapper.dom.SvgRootDocumentMapper,R=u.jetbrains.datalore.vis.svg.SvgNodeContainer,j=i.jetbrains.datalore.base.js.css.enumerables.CssPosition,L=i.jetbrains.datalore.base.js.css.setPosition_h2yxxn$,z=i.jetbrains.datalore.base.event.dom.DomEventMapper,D=c.jetbrains.datalore.vis.canvasFigure.CanvasFigure,M=i.jetbrains.datalore.base.js.css.setLeft_1gtuon$,B=i.jetbrains.datalore.base.js.css.setTop_1gtuon$,F=i.jetbrains.datalore.base.js.css.setWidth_o105z1$,U=c.jetbrains.datalore.vis.canvas.dom.DomCanvasControl,q=c.jetbrains.datalore.vis.canvas.dom.DomCanvasControl.DomEventPeer,H=o.jetbrains.datalore.plot.config,G=o.jetbrains.datalore.plot.server.config,K=o.jetbrains.datalore.plot.config.PlotConfigClientSide,V=e.kotlin.collections.ArrayList_init_287e2$,Y=e.kotlin.collections.addAll_ipc267$,W=e.kotlin.collections.collectionSizeOrDefault_ba2ldo$,X=e.kotlin.collections.ArrayList_init_ww73n8$,Z=e.kotlin.text.isBlank_gw00vp$;function J(t,n,i,o){var r,a,s,l,u,c,p=n>0&&i>0?new y(n,i):null,_=null!=(l=null!=(s=null!=(a=null!=(r=o.ownerDocument)?r.body:null)?a.dataset:null)?s[h]:null)?g(l):null,d=null==_?o.clientWidth:null,f=v.MonolithicCommon.buildPlotsFromProcessedSpecs_ovpcwh$(t,p,d,_);if(f.isError)ot((e.isType(u=f,b)?u:w()).error,o);else{var m,$,k=e.isType(c=f,x)?c:w(),C=k.buildInfos,E=V();for(m=C.iterator();m.hasNext();){var S=m.next().computationMessages;Y(E,S)}for($=E.iterator();$.hasNext();)rt($.next(),o);1===k.buildInfos.size?et(k.buildInfos.get_za3lpa$(0),o):tt(k.buildInfos,o)}}function Q(t){return function(e){return e.setAttribute("style","position: absolute; left: "+t.origin.x+"px; top: "+t.origin.y+"px;"),d}}function tt(t,n){var i,o;for(i=t.iterator();i.hasNext();){var r=i.next(),a=e.isType(o=C(k(n.ownerDocument),"div",Q(r)),HTMLElement)?o:w();n.appendChild(a),et(r,a)}var s,l,u=X(W(t,10));for(s=t.iterator();s.hasNext();){var c=s.next();u.add_11rb$(c.bounds())}var p=new E(y.Companion.ZERO,y.Companion.ZERO);for(l=u.iterator();l.hasNext();){var h=l.next();p=p.union_wthzt5$(h)}var _=p,d="position: relative; width: "+_.width+"px; height: "+_.height+"px;";n.setAttribute("style",d)}function et(t,n){var i=t.plotAssembler,o=new S;!function(t,e,n){var i;null!=(i=P.Companion.parseFromPlotSpec_x7u0o8$(e))&&I.LiveMapProvider.injectLiveMapProvider_p2x1s5$(t.coreLayersByTile,i,n)}(i,t.processedPlotSpec,o);var r,a=i.createPlot(),s=function(t,n){t.ensureContentBuilt();var i,o=t.svg,r=new A(o);for(new R(o),r.attachRoot_8uof53$(),t.isLiveMap&&L(r.target.style,j.RELATIVE),new z(r.target,function(t){return function(e,n){return t.mouseEventPeer.dispatch_w7zfbj$(e,n),d}}(t)),i=t.liveMapFigures.iterator();i.hasNext();){var a,s,l=i.next(),u=(e.isType(a=l,D)?a:w()).bounds().get(),c=e.isType(s=document.createElement("div"),HTMLElement)?s:w(),p=c.style;M(p,u.origin.x),B(p,u.origin.y),F(p,u.dimension.x),L(p,j.RELATIVE);var h=new U(c,u.dimension,new q(r.target,u));l.mapToCanvas_49gm0j$(h),n.appendChild(c)}return r.target}(new T(a,t.size),n);N(s.style,O.CROSSHAIR),o.defaultSetter_o14v8n$((r=s,function(){return N(r.style,O.CROSSHAIR),d})),o.pointerSetter_o14v8n$(function(t){return function(){return N(t.style,O.POINTER),d}}(s)),n.appendChild(s)}function nt(){return d}function it(t,e){var n=H.FailureHandler.failureInfo_j5jy6c$(t);ot(n.message,e),n.isInternalError&&p.error_ca4k3s$(t,nt)}function ot(t,e){at(t,"lets-plot-message-error","color:darkred;",e)}function rt(t,e){at(t,"lets-plot-message-info","color:darkblue;",e)}function at(t,n,i,o){var r,a=e.isType(r=k(o.ownerDocument).createElement("p"),HTMLParagraphElement)?r:w();Z(i)||a.setAttribute("style",i),a.textContent=t,a.className=n,o.appendChild(a)}function st(t,e){if(m.Companion.assertPlotSpecOrErrorMessage_x7u0o8$(t),m.Companion.isFailure_x7u0o8$(t))return t;var n=e?t:G.BackendSpecTransformUtil.processTransform_2wxo1b$(t);return m.Companion.isFailure_x7u0o8$(n)?n:K.Companion.processTransform_2wxo1b$(n)}return t.buildPlotFromRawSpecs=function(t,n,i,o){try{var r=f(t);m.Companion.assertPlotSpecOrErrorMessage_x7u0o8$(r),J(st(r,!1),n,i,o)}catch(t){if(!e.isType(t,$))throw t;it(t,o)}},t.buildPlotFromProcessedSpecs=function(t,n,i,o){try{J(st(f(t),!0),n,i,o)}catch(t){if(!e.isType(t,$))throw t;it(t,o)}},t.buildGGBunchComponent_w287e$=tt,p=_.KotlinLogging.logger_o14v8n$((function(){return d})),h="letsPlotPreferredWidth",t})?i.apply(e,o):i)||(t.exports=r)},746:function(t,e,n){var i,o,r;o=[e,n(421),n(486),n(96),n(705),n(204)],void 0===(r="function"==typeof(i=function(t,e,n,i,o,r){"use strict";var a=t.$$importsForInline$$||(t.$$importsForInline$$={}),s=n.jetbrains.datalore.base.typedGeometry.Vec,l=e.Kind.OBJECT,u=e.Kind.INTERFACE,c=n.jetbrains.datalore.base.typedGeometry.Vec_init_vrm8gm$,p=n.jetbrains.datalore.base.typedGeometry.explicitVec_y7b45i$,h=e.ensureNotNull,_=e.equals,d=e.toString,f=e.Long.ZERO,m=e.Kind.CLASS,$=e.getKClass,y=e.kotlin.sequences.map_z5avom$,g=e.kotlin.sequences.toSet_veqyi0$,v=e.kotlin.collections.toSet_7wnvza$,b=e.kotlin.collections.intersect_q4559j$,w=e.getPropertyCallableRef,x=e.kotlin.collections.joinToString_fmv235$,k=e.kotlin.sequences.filter_euau3h$,C=e.kotlin.sequences.count_veqyi0$,E=e.numberToInt,S=e.kotlin.collections.ArrayList_init_287e2$,T=e.kotlin.collections.listOf_i5x0yv$,O=n.jetbrains.datalore.base.values.Color,N=n.jetbrains.datalore.base.geometry.DoubleVector,P=e.throwCCE,I=e.kotlin.IllegalStateException_init_pdl1vj$,A=e.throwUPAE,R=n.jetbrains.datalore.base.observable.event.EventHandler,j=e.kotlin.Unit,L=n.jetbrains.datalore.base.geometry.Vector,z=i.jetbrains.datalore.vis.canvas.AnimationProvider.AnimationEventHandler,D=e.getCallableRef,M=i.jetbrains.datalore.vis.canvas,B=n.jetbrains.datalore.base.typedGeometry.toDoubleVector_kyfm6e$,F=n.jetbrains.datalore.base.typedGeometry.plus_cg1mpz$,U=n.jetbrains.datalore.base.typedGeometry.div_4nb5xq$,q=i.jetbrains.datalore.vis.canvas.DeltaTime,H=n.jetbrains.datalore.base.registration.Registration,G=o.jetbrains.datalore.base.observable.event.SimpleEventSource,K=n.jetbrains.datalore.base.observable.property.ValueProperty,V=n.jetbrains.datalore.base.registration.Disposable,Y=n.jetbrains.datalore.base.geometry.DoubleRectangle_init_6y0v78$,W=n.jetbrains.datalore.base.spatial,X=n.jetbrains.datalore.base.typedGeometry.get_scalarX_xocuba$,Z=n.jetbrains.datalore.base.typedGeometry.minus_qnxb21$,J=n.jetbrains.datalore.base.typedGeometry.transform_nj6yk8$,Q=n.jetbrains.datalore.base.typedGeometry.plus_qnxb21$,tt=e.kotlin.math.round_14dthe$,et=Math,nt=e.kotlin.ranges.IntRange,it=n.jetbrains.datalore.base.typedGeometry.get_center_xdjzag$,ot=e.kotlin.collections.emptyList_287e2$,rt=e.kotlin.collections.HashMap_init_q3lmfv$,at=(r.jetbrains.gis.geoprotocol.MapRegion,n.jetbrains.datalore.base.spatial.GeoRectangle),st=r.jetbrains.gis.tileprotocol.socket.TileWebSocketBuilder,lt=r.jetbrains.gis.tileprotocol.TileService,ut=r.jetbrains.gis.tileprotocol.TileService.Theme,ct=r.jetbrains.gis.geoprotocol.GeoTransportImpl,pt=r.jetbrains.gis.geoprotocol.GeocodingService,ht=e.kotlin.collections.listOf_mh5how$,_t=e.kotlin.IllegalArgumentException_init_pdl1vj$,dt=e.kotlin.collections.toDoubleArray_tcduak$,ft=n.jetbrains.datalore.base.typedGeometry.get_scalarLeft_xdjzag$,mt=n.jetbrains.datalore.base.typedGeometry.get_scalarRight_xdjzag$,$t=n.jetbrains.datalore.base.typedGeometry.get_scalarTop_xdjzag$,yt=n.jetbrains.datalore.base.typedGeometry.get_scalarBottom_xdjzag$,gt=n.jetbrains.datalore.base.typedGeometry.Ring,vt=n.jetbrains.datalore.base.typedGeometry.Polygon,bt=n.jetbrains.datalore.base.typedGeometry.MultiPolygon,wt=n.jetbrains.datalore.base.typedGeometry.get_left_h9e6jg$,xt=n.jetbrains.datalore.base.typedGeometry.get_width_h9e6jg$,kt=n.jetbrains.datalore.base.typedGeometry.Rect,Ct=n.jetbrains.datalore.base.typedGeometry.get_top_h9e6jg$,Et=n.jetbrains.datalore.base.typedGeometry.get_height_h9e6jg$,St=o.jetbrains.datalore.base.async,Tt=n.jetbrains.datalore.base.typedGeometry,Ot=n.jetbrains.datalore.base.typedGeometry.bbox_8ft4gs$,Nt=n.jetbrains.datalore.base.math.toRadians_14dthe$,Pt=e.kotlin.collections.collectionSizeOrDefault_ba2ldo$,It=e.kotlin.collections.ArrayList_init_ww73n8$,At=e.kotlin.js.internal.DoubleCompanionObject,Rt=e.kotlin.RuntimeException_init_pdl1vj$,jt=r.jetbrains.gis.geoprotocol.GeoTransport,Lt=n.jetbrains.datalore.base.unsupported.UNSUPPORTED_61zpoe$,zt=r.jetbrains.gis.tileprotocol.socket.Socket,Dt=r.jetbrains.gis.tileprotocol.socket.SocketBuilder,Mt=i.jetbrains.datalore.vis.canvas.scheduleAsync_ebnxch$,Bt=n.jetbrains.datalore.base.observable.property,Ft=o.jetbrains.datalore.base.observable.property,Ut=i.jetbrains.datalore.vis.canvas.SingleCanvasControl,qt=e.kotlin.text.split_ip8yn$,Ht=i.jetbrains.datalore.vis.canvas.Context2d.TextBaseline,Gt=i.jetbrains.datalore.vis.canvas.Context2d.TextAlign,Kt=i.jetbrains.datalore.vis.canvas.Context2d.Font,Vt=e.kotlin.collections.get_indices_gzk92b$,Yt=e.kotlin.math,Wt=e.Long.fromInt(1e3),Xt=e.kotlin.math.roundToInt_yrwdxr$,Zt=e.kotlin.ranges.coerceIn_nayhkp$,Jt=e.kotlin.math.abs_za3lpa$,Qt=n.jetbrains.datalore.base.typedGeometry.times_4nb5xq$,te=e.kotlin.collections.sum_l63kqw$,ee=e.kotlin.collections.first_2p1efm$,ne=e.kotlin.NotImplementedError,ie=e.kotlin.ranges.rangeTo_38ydlf$,oe=n.jetbrains.datalore.base.typedGeometry.LineString,re=e.kotlin.collections.binarySearch_jhx6be$,ae=e.kotlin.collections.drop_ba2ldo$,se=e.kotlin.isNaN_yrwdxr$,le=i.jetbrains.datalore.vis.canvas.Context2d.LineJoin,ue=e.kotlin.to_ujzrz7$,ce=e.kotlin.Enum,pe=e.throwISE,he=e.kotlin.collections.take_ba2ldo$,_e=e.kotlin.collections.reversed_7wnvza$,de=e.kotlin.collections.takeLast_yzln2o$,fe=e.kotlin.collections.checkIndexOverflow_za3lpa$,me=e.kotlin.text.split_o64adg$,$e=e.kotlin.text.trim_gw00vp$,ye=n.jetbrains.datalore.base.typedGeometry.Rect_init_94ua8u$,ge=e.kotlin.Pair,ve=e.numberToDouble,be=e.kotlin.IllegalArgumentException_init,we=e.kotlin.text.toBoolean_5cw0du$,xe=e.kotlin.text.equals_igcy3c$,ke=e.kotlin.collections.Map,Ce=n.jetbrains.datalore.base.geometry.Rectangle_init_tjonv8$,Ee=i.jetbrains.datalore.vis.canvasFigure.CanvasFigure,Se=n.jetbrains.datalore.base.typedGeometry.minus_cg1mpz$,Te=n.jetbrains.datalore.base.typedGeometry.get_right_h9e6jg$,Oe=n.jetbrains.datalore.base.typedGeometry.get_bottom_h9e6jg$,Ne=e.kotlin.IndexOutOfBoundsException_init,Pe=e.kotlin.collections.AbstractIterator,Ie=e.kotlin.collections.MutableIterator,Ae=e.kotlin.collections.MutableIterable,Re=e.kotlin.collections.binarySearch_vikexg$,je=e.kotlin.collections.AbstractCollection,Le=e.kotlin.comparisons.reversed_2avth4$,ze=e.wrapFunction,De=e.kotlin.Comparator,Me=e.kotlin.collections.mutableListOf_i5x0yv$,Be=e.kotlin.collections.ArrayList_init_mqih57$,Fe=e.defineInlineFunction,Ue=e.kotlin.sequences.toList_veqyi0$,qe=e.kotlin.collections.asSequence_7wnvza$,He=e.kotlin.sequences.mapNotNull_qpz9h9$,Ge=e.kotlin.collections.emptySet_287e2$,Ke=e.kotlin.collections.HashSet_init_287e2$,Ve=e.kotlin.collections.emptyMap_q3lmfv$,Ye=e.kotlin.collections.first_7wnvza$,We=e.kotlin.sequences.firstOrNull_veqyi0$,Xe=e.kotlin.sequences.filterNot_euau3h$,Ze=e.PropertyMetadata,Je=e.kotlin.text.startsWith_7epoxm$,Qe=e.kotlin.text.Regex_init_61zpoe$,tn=e.kotlin.properties.ReadWriteProperty,en=e.kotlin.NoSuchElementException_init,nn=n.jetbrains.datalore.base.geometry.DoubleRectangle,on=n.jetbrains.datalore.base.event.MouseEventSpec,rn=e.kotlin.collections.toList_7wnvza$,an=n.jetbrains.datalore.base.event.Button,sn=e.kotlin.IllegalStateException_init,ln=n.jetbrains.datalore.base.registration.CompositeRegistration,un=o.jetbrains.datalore.base.concurrent.Lock,cn=i.jetbrains.datalore.vis.canvas.drawImage_m9lis9$,pn=e.kotlin.collections.addAll_ipc267$,hn=e.kotlin.collections.LinkedHashMap_init_q3lmfv$,_n=e.kotlin.sequences.toHashSet_veqyi0$,dn=n.jetbrains.datalore.base.typedGeometry.get_scalarY_xocuba$,fn=n.jetbrains.datalore.base.typedGeometry.compareTo_85q7fw$,mn=n.jetbrains.datalore.base.typedGeometry.Scalar,$n=n.jetbrains.datalore.base.spatial.normalizeLon_14dthe$,yn=(n.jetbrains.datalore.base.spatial.limitLon_14dthe$,n.jetbrains.datalore.base.spatial.limitLat_14dthe$,n.jetbrains.datalore.base.typedGeometry.newSpanRectangle_2d1svq$,n.jetbrains.datalore.base.spatial.projections.mercator),gn=n.jetbrains.datalore.base.spatial.projections.azimuthalEqualArea,vn=n.jetbrains.datalore.base.spatial.projections.conicEqualArea_lu1900$,bn=n.jetbrains.datalore.base.typedGeometry.toRect_2pmvqo$,wn=n.jetbrains.datalore.base.typedGeometry.toVec_ie011s$,xn=e.kotlin.collections.HashMap_init_73mtqc$,kn=e.kotlin.collections.HashSet_init_ww73n8$,Cn=e.kotlin.collections.subtract_q4559j$,En=r.jetbrains.gis.geoprotocol.Fragment,Sn=n.jetbrains.datalore.base.typedGeometry.reinterpret_za8sjz$,Tn=n.jetbrains.datalore.base.spatial.zoom_c2pv3p$,On=r.jetbrains.gis.geoprotocol.GeoRequestBuilder.ExplicitRequestBuilder,Nn=r.jetbrains.gis.geoprotocol.GeoRequest.FeatureOption,Pn=n.jetbrains.datalore.base.spatial.computeRect_c2pv3p$,In=n.jetbrains.datalore.base.typedGeometry.intersects_32samh$,An=e.kotlin.collections.HashSet_init_mqih57$,Rn=e.kotlin.collections.removeAll_uhyeqt$,jn=n.jetbrains.datalore.base.typedGeometry.limit_lddjmn$,Ln=e.kotlin.collections.single_2p1efm$,zn=n.jetbrains.datalore.base.typedGeometry.reinterpret_mme8i6$,Dn=n.jetbrains.datalore.base.typedGeometry.Geometry,Mn=n.jetbrains.datalore.base.typedGeometry.VecResampler,Bn=n.jetbrains.datalore.base.typedGeometry.MultiLineString,Fn=e.kotlin.io.println_s8jyv4$,Un=e.kotlin.RuntimeException,qn=n.jetbrains.datalore.base.typedGeometry.MultiPoint,Hn=e.kotlin.collections.last_2p1efm$,Gn=e.kotlin.text.dropLast_6ic1pp$,Kn=n.jetbrains.datalore.base.typedGeometry.unaryMinus_e0pgg$,Vn=n.jetbrains.datalore.base.spatial.computeRect_v4gkf3$,Yn=e.kotlin.collections.mapCapacity_za3lpa$,Wn=e.kotlin.collections.LinkedHashMap_init_bwtc7$,Xn=n.jetbrains.datalore.base.spatial.QuadKey,Zn=n.jetbrains.datalore.base.spatial.projectRect_cub2h3$,Jn=e.kotlin.collections.removeAll_qafx1e$,Qn=e.kotlin.collections.Collection,ti=n.jetbrains.datalore.base.spatial.projectOrigin_cub2h3$,ei=e.kotlin.text.replace_680rmw$,ni=r.jetbrains.gis.tileprotocol.http.HttpTileTransport,ii=(e.kotlin.random.Random,i.jetbrains.datalore.vis.canvas.Context2d.Font_init_1nsek9$),oi=i.jetbrains.datalore.vis.canvas.Context2d.LineCap,ri=e.kotlin.text.get_indices_gw00vp$,ai=e.kotlin.text.indexOf_8eortd$,si=n.jetbrains.datalore.base.spatial.convertToGeoRectangle_i3vl8m$,li=n.jetbrains.datalore.base.spatial.geoRectsBBox_wfabpm$,ui=r.jetbrains.gis.tileprotocol.TileGeometryParser,ci=e.kotlin.collections.getOrNull_yzln2o$,pi=e.kotlin.collections.flatten_u0ad8z$,hi=r.jetbrains.gis.tileprotocol.mapConfig.TilePredicate,_i=n.jetbrains.datalore.base.math.round_lu1900$,di=e.kotlin.collections.setOf_i5x0yv$,fi=Math.sign,mi=n.jetbrains.datalore.base.spatial.calculateQuadKeys_h9hod0$,$i=e.kotlin.collections.minus_khz7k3$,yi=n.jetbrains.datalore.base.spatial.GeoBoundingBoxCalculator,gi=n.jetbrains.datalore.base.spatial.union_86o20w$,vi=n.jetbrains.datalore.base.typedGeometry.xRange_h9e6jg$,bi=n.jetbrains.datalore.base.typedGeometry.yRange_h9e6jg$,wi=n.jetbrains.datalore.base.spatial.calculateQuadKeys_a35lcs$,xi=n.jetbrains.datalore.base.interval.DoubleSpan,ki=e.kotlin.sequences.filterNotNull_q2m9h7$,Ci=e.kotlin.sequences.sortedWith_vjgqpk$,Ei=n.jetbrains.datalore.base.typedGeometry.contains_h8bixx$,Si=n.jetbrains.datalore.base.typedGeometry.limit_106pae$,Ti=e.hashCode,Oi=e.kotlin.text.toString_dqglrj$;function Ni(){Ai()}function Pi(){Ii=this,this.ZERO_VEC=new s(0,0)}Fi.prototype=Object.create(Bi.prototype),Fi.prototype.constructor=Fi,Qo.prototype=Object.create(lt.prototype),Qo.prototype.constructor=Qo,Tr.prototype=Object.create(Ls.prototype),Tr.prototype.constructor=Tr,Hr.prototype=Object.create(Ls.prototype),Hr.prototype.constructor=Hr,la.prototype=Object.create(ce.prototype),la.prototype.constructor=la,_a.prototype=Object.create(ce.prototype),_a.prototype.constructor=_a,Da.prototype=Object.create(ce.prototype),Da.prototype.constructor=Da,is.prototype=Object.create(Pe.prototype),is.prototype.constructor=is,cs.prototype=Object.create(Pe.prototype),cs.prototype.constructor=cs,us.prototype=Object.create(je.prototype),us.prototype.constructor=us,vs.prototype=Object.create(ce.prototype),vs.prototype.constructor=vs,Cs.prototype=Object.create(ce.prototype),Cs.prototype.constructor=Cs,Ms.prototype=Object.create(Ls.prototype),Ms.prototype.constructor=Ms,Bs.prototype=Object.create(Ls.prototype),Bs.prototype.constructor=Bs,Ys.prototype=Object.create(Zs.prototype),Ys.prototype.constructor=Ys,Qs.prototype=Object.create(Jl.prototype),Qs.prototype.constructor=Qs,$l.prototype=Object.create(ce.prototype),$l.prototype.constructor=$l,wl.prototype=Object.create(ce.prototype),wl.prototype.constructor=wl,ol.prototype=Object.create(Jl.prototype),ol.prototype.constructor=ol,Ll.prototype=Object.create(Jl.prototype),Ll.prototype.constructor=Ll,Fl.prototype=Object.create(Jl.prototype),Fl.prototype.constructor=Fl,Gl.prototype=Object.create(Jl.prototype),Gl.prototype.constructor=Gl,Yl.prototype=Object.create(Jl.prototype),Yl.prototype.constructor=Yl,Xl.prototype=Object.create(Jl.prototype),Xl.prototype.constructor=Xl,ou.prototype=Object.create(Jl.prototype),ou.prototype.constructor=ou,au.prototype=Object.create(Jl.prototype),au.prototype.constructor=au,mu.prototype=Object.create(ce.prototype),mu.prototype.constructor=mu,gu.prototype=Object.create(Ls.prototype),gu.prototype.constructor=gu,Tu.prototype=Object.create(ce.prototype),Tu.prototype.constructor=Tu,Lu.prototype=Object.create(Ls.prototype),Lu.prototype.constructor=Lu,Vu.prototype=Object.create(Ls.prototype),Vu.prototype.constructor=Vu,Zu.prototype=Object.create(ce.prototype),Zu.prototype.constructor=Zu,oc.prototype=Object.create(ce.prototype),oc.prototype.constructor=oc,yc.prototype=Object.create($c.prototype),yc.prototype.constructor=yc,gc.prototype=Object.create($c.prototype),gc.prototype.constructor=gc,vc.prototype=Object.create(Ls.prototype),vc.prototype.constructor=vc,bc.prototype=Object.create(ce.prototype),bc.prototype.constructor=bc,Gc.prototype=Object.create(Ls.prototype),Gc.prototype.constructor=Gc,Rp.prototype=Object.create(Ls.prototype),Rp.prototype.constructor=Rp,zp.prototype=Object.create(Ls.prototype),zp.prototype.constructor=zp,Wp.prototype=Object.create(Ls.prototype),Wp.prototype.constructor=Wp,th.prototype=Object.create(Ls.prototype),th.prototype.constructor=th,eh.prototype=Object.create(Ls.prototype),eh.prototype.constructor=eh,_h.prototype=Object.create(Ls.prototype),_h.prototype.constructor=_h,Oh.prototype=Object.create(Ls.prototype),Oh.prototype.constructor=Oh,Ah.prototype=Object.create(Ls.prototype),Ah.prototype.constructor=Ah,Mh.prototype=Object.create(Ls.prototype),Mh.prototype.constructor=Mh,Wh.prototype=Object.create(Ls.prototype),Wh.prototype.constructor=Wh,t_.prototype=Object.create(Ls.prototype),t_.prototype.constructor=t_,s_.prototype=Object.create(Ls.prototype),s_.prototype.constructor=s_,b_.prototype=Object.create(Ks.prototype),b_.prototype.constructor=b_,x_.prototype=Object.create(Ls.prototype),x_.prototype.constructor=x_,O_.prototype=Object.create(Ls.prototype),O_.prototype.constructor=O_,A_.prototype=Object.create(Ls.prototype),A_.prototype.constructor=A_,R_.prototype=Object.create(ce.prototype),R_.prototype.constructor=R_,bd.prototype=Object.create(Ls.prototype),bd.prototype.constructor=bd,Pd.prototype=Object.create(Ls.prototype),Pd.prototype.constructor=Pd,rf.prototype=Object.create(ce.prototype),rf.prototype.constructor=rf,cf.prototype=Object.create(Ls.prototype),cf.prototype.constructor=cf,Cf.prototype=Object.create(Ls.prototype),Cf.prototype.constructor=Cf,jf.prototype=Object.create(Ls.prototype),jf.prototype.constructor=jf,zf.prototype=Object.create(Ls.prototype),zf.prototype.constructor=zf,Zf.prototype=Object.create(ce.prototype),Zf.prototype.constructor=Zf,am.prototype=Object.create(Ls.prototype),am.prototype.constructor=am,cm.prototype=Object.create(Ls.prototype),cm.prototype.constructor=cm,dm.prototype=Object.create(Ls.prototype),dm.prototype.constructor=dm,Cm.prototype=Object.create(Ls.prototype),Cm.prototype.constructor=Cm,Im.prototype=Object.create(Ls.prototype),Im.prototype.constructor=Im,zm.prototype=Object.create(Ls.prototype),zm.prototype.constructor=zm,a$.prototype=Object.create(r$.prototype),a$.prototype.constructor=a$,s$.prototype=Object.create(r$.prototype),s$.prototype.constructor=s$,o$.prototype=Object.create(Ls.prototype),o$.prototype.constructor=o$,$$.prototype=Object.create(Ls.prototype),$$.prototype.constructor=$$,w$.prototype=Object.create(H.prototype),w$.prototype.constructor=w$,Pi.$metadata$={kind:l,simpleName:"Companion",interfaces:[]};var Ii=null;function Ai(){return null===Ii&&new Pi,Ii}function Ri(){zi()}function ji(){Li=this,this.ZERO_VEC=new s(0,0)}ji.$metadata$={kind:l,simpleName:"Companion",interfaces:[]};var Li=null;function zi(){return null===Li&&new ji,Li}function Di(t){return c(t.x,t.y)}function Mi(t){return p(t.x,t.y)}function Bi(){}function Fi(t,e,n,i,o,r,a){io(),Bi.call(this),this.dirtyLayers_0=e,this.schedulerSystem_0=n,this.debugService_0=i,this.graphicsService_0=o,this.registry_0=r,this.layerManager_0=a,this.diagnostics_0=S(),this.deltaTime_0=f,this.metrics_0=null,this.diagnostics_0.addAll_brywnq$(T([new Ui(this),new qi(this),new Gi(this),new Ki(this),new Vi(this),new Yi(this),new Wi(this),new Xi(this),new Qi(this,t)])),this.debugService_0.setValuesOrder_mhpeer$(T([io().TIMER_TICK_0,io().SYSTEMS_UPDATE_TIME_0,io().ENTITIES_COUNT_0,io().SLOWEST_SYSTEM_0,io().FREEZING_SYSTEM_0,io().SCHEDULER_SYSTEM_0,io().DIRTY_LAYERS_0,io().STREAMING_FRAGMENTS_0,io().DOWNLOADING_FRAGMENTS_0,io().FRAGMENTS_CACHE_0,io().DOWNLOADING_TILES_0,io().IS_LOADING_0]));var s=new au;s.color=O.Companion.DARK_GREEN,s.fontFamily="Courier New",s.fontSize=12,s.origin=new N(4,150),this.metrics_0=s,this.graphicsService_0.addToRenderer_vrfpg5$(this.metrics_0)}function Ui(t){this.$outer=t,this.timeToShowLeft_0=f,this.freezeTime_0=0,this.message_0="",this.timeToShow_0=7e3}function qi(t){this.$outer=t}function Hi(t){var n,i;if(null==(i=null==(n=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(cc)))||e.isType(n,cc)?n:P()))throw I("Component "+$(cc).simpleName+" is not found");return i.canvasLayer}function Gi(t){this.$outer=t}function Ki(t){this.$outer=t}function Vi(t){this.$outer=t}function Yi(t){this.$outer=t}function Wi(t){this.$outer=t}function Xi(t){this.$outer=t}function Zi(t){var n,i;if(null==(i=null==(n=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(vf)))||e.isType(n,vf)?n:P()))throw I("Component "+$(vf).simpleName+" is not found");return null==i.tileData}function Ji(t){var n,i;if(null==(i=null==(n=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(Nd)))||e.isType(n,Nd)?n:P()))throw I("Component "+$(Nd).simpleName+" is not found");return null==i.imageData}function Qi(t,e){this.$outer=t,this.isLoading_0=e}function to(){}function eo(){no=this,this.TIMER_TICK_0="timer_tick",this.SYSTEMS_UPDATE_TIME_0="systems_update_time",this.ENTITIES_COUNT_0="entities_count",this.SLOWEST_SYSTEM_0="slow_system",this.FREEZING_SYSTEM_0="freezing_system",this.SCHEDULER_SYSTEM_0="scheduler_load",this.DIRTY_LAYERS_0="dirty_layers",this.STREAMING_FRAGMENTS_0="streaming_fragments",this.DOWNLOADING_FRAGMENTS_0="downloading_fragments",this.DOWNLOADING_TILES_0="downloading_tiles",this.FRAGMENTS_CACHE_0="fragments_cache",this.IS_LOADING_0="is_loading"}Bi.prototype.update_s8cxhz$=function(t){},Object.defineProperty(Fi.prototype,"slowestSystemType_0",{configurable:!0,get:function(){var t;return e.getKClassFromExpression(h(null!=(t=this.debugService_0.slowestSystem())?t.first:null)).simpleName}}),Object.defineProperty(Fi.prototype,"slowestSystemTime_0",{configurable:!0,get:function(){var t,e;return null!=(e=null!=(t=this.debugService_0.slowestSystem())?t.second:null)?e:0}}),Fi.prototype.update_s8cxhz$=function(t){var e;for(this.deltaTime_0=t,this.debugService_0.setValue_puj7f4$(io().TIMER_TICK_0,"Timer tick: "+this.toOdd_mts6qi$(this.deltaTime_0).toString()),this.debugService_0.setValue_puj7f4$(io().SYSTEMS_UPDATE_TIME_0,"Systems update: "+this.toOdd_mts6qi$(this.debugService_0.totalUpdateTime).toString()),this.debugService_0.setValue_puj7f4$(io().ENTITIES_COUNT_0,"Entities count: "+this.registry_0.entitiesCount),e=this.diagnostics_0.iterator();e.hasNext();)e.next().update();_(this.metrics_0.text,this.debugService_0.values)||(this.metrics_0.text=this.debugService_0.values,this.graphicsService_0.repaint())},Ui.prototype.update=function(){this.$outer.slowestSystemTime_0>16?this.$outer.slowestSystemTime_0>this.freezeTime_0&&(this.timeToShowLeft_0=e.Long.fromInt(this.timeToShow_0),this.message_0="Freezed by: "+this.$outer.formatDouble_0(this.$outer.slowestSystemTime_0,1)+" "+d(this.$outer.slowestSystemType_0),this.freezeTime_0=this.$outer.slowestSystemTime_0):this.timeToShowLeft_0.toNumber()>0?this.timeToShowLeft_0=this.timeToShowLeft_0.subtract(this.$outer.deltaTime_0):this.timeToShowLeft_0.toNumber()<0&&(this.message_0="",this.timeToShowLeft_0=f,this.freezeTime_0=0),this.$outer.debugService_0.setValue_puj7f4$(io().FREEZING_SYSTEM_0,this.message_0)},Ui.$metadata$={kind:m,simpleName:"FreezingSystemDiagnostic",interfaces:[to]},qi.prototype.update=function(){var t=x(b(g(y(this.$outer.registry_0.getEntitiesById_wlb8mv$(this.$outer.dirtyLayers_0),Hi)),v(this.$outer.layerManager_0.layers)),void 0,void 0,void 0,void 0,void 0,w("name",1,(function(t){return t.name})));this.$outer.debugService_0.setValue_puj7f4$(io().DIRTY_LAYERS_0,"Dirty layers: "+t)},qi.$metadata$={kind:m,simpleName:"DirtyLayersDiagnostic",interfaces:[to]},Gi.prototype.update=function(){this.$outer.debugService_0.setValue_puj7f4$(io().SLOWEST_SYSTEM_0,"Slowest update: "+(this.$outer.slowestSystemTime_0>2?this.$outer.formatDouble_0(this.$outer.slowestSystemTime_0,1)+" "+d(this.$outer.slowestSystemType_0):"-"))},Gi.$metadata$={kind:m,simpleName:"SlowestSystemDiagnostic",interfaces:[to]},Ki.prototype.update=function(){var t=this.$outer.registry_0.count_9u06oy$($(qc));this.$outer.debugService_0.setValue_puj7f4$(io().SCHEDULER_SYSTEM_0,"Micro threads: "+t+", "+this.$outer.schedulerSystem_0.loading.toString())},Ki.$metadata$={kind:m,simpleName:"SchedulerSystemDiagnostic",interfaces:[to]},Vi.prototype.update=function(){var t,n,i,o,r=this.$outer.registry_0;t:do{if(r.containsEntity_9u06oy$($(vp))){var a,s,l=r.getSingletonEntity_9u06oy$($(vp));if(null==(s=null==(a=l.componentManager.getComponents_ahlfl2$(l).get_11rb$($(vp)))||e.isType(a,vp)?a:P()))throw I("Component "+$(vp).simpleName+" is not found");o=s;break t}o=null}while(0);var u=null!=(i=null!=(n=null!=(t=o)?t.keys():null)?n.size:null)?i:0;this.$outer.debugService_0.setValue_puj7f4$(io().FRAGMENTS_CACHE_0,"Fragments cache: "+u)},Vi.$metadata$={kind:m,simpleName:"FragmentsCacheDiagnostic",interfaces:[to]},Yi.prototype.update=function(){var t,n,i,o,r=this.$outer.registry_0;t:do{if(r.containsEntity_9u06oy$($(Ap))){var a,s,l=r.getSingletonEntity_9u06oy$($(Ap));if(null==(s=null==(a=l.componentManager.getComponents_ahlfl2$(l).get_11rb$($(Ap)))||e.isType(a,Ap)?a:P()))throw I("Component "+$(Ap).simpleName+" is not found");o=s;break t}o=null}while(0);var u=null!=(i=null!=(n=null!=(t=o)?t.keys():null)?n.size:null)?i:0;this.$outer.debugService_0.setValue_puj7f4$(io().STREAMING_FRAGMENTS_0,"Streaming fragments: "+u)},Yi.$metadata$={kind:m,simpleName:"StreamingFragmentsDiagnostic",interfaces:[to]},Wi.prototype.update=function(){var t,n,i,o,r=this.$outer.registry_0;t:do{if(r.containsEntity_9u06oy$($(Sp))){var a,s,l=r.getSingletonEntity_9u06oy$($(Sp));if(null==(s=null==(a=l.componentManager.getComponents_ahlfl2$(l).get_11rb$($(Sp)))||e.isType(a,Sp)?a:P()))throw I("Component "+$(Sp).simpleName+" is not found");o=s;break t}o=null}while(0);if(null!=(t=o)){var u,c="D: "+t.downloading.size+" Q: ",p=t.queue.values,h=w("size",1,(function(t){return t.size})),_=0;for(u=p.iterator();u.hasNext();)_=_+h(u.next())|0;i=c+_}else i=null;var d=null!=(n=i)?n:"D: 0 Q: 0";this.$outer.debugService_0.setValue_puj7f4$(io().DOWNLOADING_FRAGMENTS_0,"Downloading fragments: "+d)},Wi.$metadata$={kind:m,simpleName:"DownloadingFragmentsDiagnostic",interfaces:[to]},Xi.prototype.update=function(){var t=C(k(this.$outer.registry_0.getEntities_9u06oy$($(vf)),Zi)),e=C(k(this.$outer.registry_0.getEntities_9u06oy$($(Nd)),Ji));this.$outer.debugService_0.setValue_puj7f4$(io().DOWNLOADING_TILES_0,"Downloading tiles: V: "+t+", R: "+e)},Xi.$metadata$={kind:m,simpleName:"DownloadingTilesDiagnostic",interfaces:[to]},Qi.prototype.update=function(){this.$outer.debugService_0.setValue_puj7f4$(io().IS_LOADING_0,"Is loading: "+this.isLoading_0.get())},Qi.$metadata$={kind:m,simpleName:"IsLoadingDiagnostic",interfaces:[to]},to.$metadata$={kind:u,simpleName:"Diagnostic",interfaces:[]},Fi.prototype.formatDouble_0=function(t,e){var n=E(t),i=E(10*(t-n)*e);return n.toString()+"."+i},eo.$metadata$={kind:l,simpleName:"Companion",interfaces:[]};var no=null;function io(){return null===no&&new eo,no}function oo(t,e,n,i,o,r,a,s,l,u,c,p,h){this.myMapRuler_0=t,this.myMapProjection_0=e,this.viewport_0=n,this.layers_0=i,this.myBasemapTileSystemProvider_0=o,this.myFragmentProvider_0=r,this.myDevParams_0=a,this.myMapLocationConsumer_0=s,this.myMapLocationRect_0=l,this.myZoom_0=u,this.myAttribution_0=c,this.myShowCoordPickTools_0=p,this.myCursorService_0=h,this.myRenderTarget_0=this.myDevParams_0.read_m9w1rv$(za().RENDER_TARGET),this.myTimerReg_0=H.Companion.EMPTY,this.myInitialized_0=!1,this.myEcsController_wurexj$_0=this.myEcsController_wurexj$_0,this.myContext_l6buwl$_0=this.myContext_l6buwl$_0,this.myLayerRenderingSystem_rw6iwg$_0=this.myLayerRenderingSystem_rw6iwg$_0,this.myLayerManager_n334qq$_0=this.myLayerManager_n334qq$_0,this.myDiagnostics_hj908e$_0=this.myDiagnostics_hj908e$_0,this.mySchedulerSystem_xjqp68$_0=this.mySchedulerSystem_xjqp68$_0,this.myUiService_gvbha1$_0=this.myUiService_gvbha1$_0,this.myTextMeasurer_najro9$_0=this.myTextMeasurer_najro9$_0,this.errorEvent_0=new G,this.isLoading=new K(!0),this.myComponentManager_0=new Hs}function ro(t){this.closure$handler=t}function ao(t,e){return function(n){return t.schedule_klfg04$(function(t,e){return function(){return t.errorEvent_0.fire_11rb$(e),j}}(e,n)),j}}function so(t,e,n){this.timePredicate_0=t,this.skipTime_0=e,this.animationMultiplier_0=n,this.deltaTime_0=new q,this.currentTime_0=f}function lo(t,e){po(),this.myViewport_0=t,this.myMapProjection_0=e}function uo(){co=this}Fi.$metadata$={kind:m,simpleName:"LiveMapDiagnostics",interfaces:[Bi]},Bi.prototype.toOdd_mts6qi$=function(t){return t.subtract(t.modulo(e.Long.fromInt(2)))},Bi.$metadata$={kind:m,simpleName:"Diagnostics",interfaces:[]},Object.defineProperty(oo.prototype,"myEcsController_0",{configurable:!0,get:function(){return null==this.myEcsController_wurexj$_0?A("myEcsController"):this.myEcsController_wurexj$_0},set:function(t){this.myEcsController_wurexj$_0=t}}),Object.defineProperty(oo.prototype,"myContext_0",{configurable:!0,get:function(){return null==this.myContext_l6buwl$_0?A("myContext"):this.myContext_l6buwl$_0},set:function(t){this.myContext_l6buwl$_0=t}}),Object.defineProperty(oo.prototype,"myLayerRenderingSystem_0",{configurable:!0,get:function(){return null==this.myLayerRenderingSystem_rw6iwg$_0?A("myLayerRenderingSystem"):this.myLayerRenderingSystem_rw6iwg$_0},set:function(t){this.myLayerRenderingSystem_rw6iwg$_0=t}}),Object.defineProperty(oo.prototype,"myLayerManager_0",{configurable:!0,get:function(){return null==this.myLayerManager_n334qq$_0?A("myLayerManager"):this.myLayerManager_n334qq$_0},set:function(t){this.myLayerManager_n334qq$_0=t}}),Object.defineProperty(oo.prototype,"myDiagnostics_0",{configurable:!0,get:function(){return null==this.myDiagnostics_hj908e$_0?A("myDiagnostics"):this.myDiagnostics_hj908e$_0},set:function(t){this.myDiagnostics_hj908e$_0=t}}),Object.defineProperty(oo.prototype,"mySchedulerSystem_0",{configurable:!0,get:function(){return null==this.mySchedulerSystem_xjqp68$_0?A("mySchedulerSystem"):this.mySchedulerSystem_xjqp68$_0},set:function(t){this.mySchedulerSystem_xjqp68$_0=t}}),Object.defineProperty(oo.prototype,"myUiService_0",{configurable:!0,get:function(){return null==this.myUiService_gvbha1$_0?A("myUiService"):this.myUiService_gvbha1$_0},set:function(t){this.myUiService_gvbha1$_0=t}}),Object.defineProperty(oo.prototype,"myTextMeasurer_0",{configurable:!0,get:function(){return null==this.myTextMeasurer_najro9$_0?A("myTextMeasurer"):this.myTextMeasurer_najro9$_0},set:function(t){this.myTextMeasurer_najro9$_0=t}}),ro.prototype.onEvent_11rb$=function(t){this.closure$handler(t)},ro.$metadata$={kind:m,interfaces:[R]},oo.prototype.addErrorHandler_4m4org$=function(t){return this.errorEvent_0.addHandler_gxwwpc$(new ro(t))},oo.prototype.draw_49gm0j$=function(t){var n,i=new Rf(this.myComponentManager_0);i.requestZoom_14dthe$(this.viewport_0.zoom),i.requestPosition_v214yr$(this.viewport_0.position);var o=i;switch(this.myRenderTarget_0.name){case"OWN_OFFSCREEN_CANVAS":n=new yc(t);break;case"OWN_SCREEN_CANVAS":n=new gc(t);break;default:n=e.noWhenBranchMatched()}this.myLayerManager_0=n,this.myContext_0=new b_(this.myMapProjection_0,t,new S_(this.viewport_0,t),ao(t,this),o,this.myLayerManager_0),this.myTextMeasurer_0=new hu(this.myContext_0.mapRenderContext.canvasProvider.createCanvas_119tl4$(L.Companion.ZERO).context2d),this.myUiService_0=new v$(this.myComponentManager_0,this.myTextMeasurer_0);var r,a=new so((r=this,function(t){return r.animationHandler_0(r.myComponentManager_0,t)}),e.Long.fromInt(this.myDevParams_0.read_zgynif$(za().UPDATE_PAUSE_MS)),this.myDevParams_0.read_366xgz$(za().UPDATE_TIME_MULTIPLIER));this.myTimerReg_0=M.CanvasControlUtil.setAnimationHandler_1ixrg0$(t,z.Companion.toHandler_qm21m0$(D("onTime",function(t,e){return t.onTime_8e33dg$(e)}.bind(null,a))))},oo.prototype.searchResult=function(){if(!this.myInitialized_0)return null;var t,n,i=this.myComponentManager_0.getSingletonEntity_9u06oy$($(Lm));if(null==(n=null==(t=i.componentManager.getComponents_ahlfl2$(i).get_11rb$($(Lm)))||e.isType(t,Lm)?t:P()))throw I("Component "+$(Lm).simpleName+" is not found");return n.searchResult},oo.prototype.animationHandler_0=function(t,e){return this.myInitialized_0||(this.init_0(t),this.myInitialized_0=!0),this.myEcsController_0.update_14dthe$(e.toNumber()),this.myDiagnostics_0.update_s8cxhz$(e),this.myLayerRenderingSystem_0.updated},oo.prototype.init_0=function(t){var e;this.initLayers_0(t),this.initSystems_0(t),this.initCamera_0(t),e=this.myDevParams_0.isSet_1a54na$(za().PERF_STATS)?new Fi(this.isLoading,this.myLayerRenderingSystem_0.dirtyLayers,this.mySchedulerSystem_0,this.myContext_0.metricsService,this.myUiService_0,t,this.myLayerManager_0):new Bi,this.myDiagnostics_0=e},oo.prototype.initSystems_0=function(t){var n,i;switch(this.myDevParams_0.read_m9w1rv$(za().MICRO_TASK_EXECUTOR).name){case"UI_THREAD":n=new Nc(this.myContext_0,e.Long.fromInt(this.myDevParams_0.read_zgynif$(za().COMPUTATION_FRAME_TIME)));break;case"AUTO":case"BACKGROUND":n=N$().create();break;default:n=e.noWhenBranchMatched()}var o=null!=n?n:new Nc(this.myContext_0,e.Long.fromInt(this.myDevParams_0.read_zgynif$(za().COMPUTATION_FRAME_TIME)));this.myLayerRenderingSystem_0=new vc(t,this.myLayerManager_0),this.mySchedulerSystem_0=new Gc(o,t),this.myEcsController_0=new Vs(t,this.myContext_0,T([new Vu(t),new Lu(t,this.myLayerManager_0),new jf(t),new gu(t,this.myCursorService_0),new s_(t,this.myMapProjection_0,this.viewport_0),new Ah(t,null==this.myMapLocationRect_0),new Oh(this.myMapRuler_0,this.myMapProjection_0,t),new Mh(t,null!=(i=this.myZoom_0)?i:null,this.myMapLocationRect_0),new _h(t),new Wh(t),new Ms(t),new Bs(t),new Im(t),new Cm(t),new o$(this.myUiService_0,new h$(this.myContext_0.mapRenderContext.canvasProvider),t,this.myMapLocationConsumer_0,this.myLayerManager_0,this.myAttribution_0,this.myShowCoordPickTools_0,this.myDevParams_0.isSet_1a54na$(za().SHOW_RESET_POSITION_ACTION)),new O_(t),this.myBasemapTileSystemProvider_0.create_v8qzyl$(t),new A_(this.myDevParams_0.read_zgynif$(za().TILE_CACHE_LIMIT),t),new Cf(t),new Wp(t),new Rp(this.myDevParams_0.read_zgynif$(za().FRAGMENT_ACTIVE_DOWNLOADS_LIMIT),this.myFragmentProvider_0,t),new zp(this.myDevParams_0.read_zgynif$(za().COMPUTATION_PROJECTION_QUANT),t),new eh(t),new th(this.myDevParams_0.read_zgynif$(za().FRAGMENT_CACHE_LIMIT),t),new cm(t),new dm(t),new t_(this.myDevParams_0.read_zgynif$(za().COMPUTATION_PROJECTION_QUANT),t),new am(t),new zm(this.myUiService_0,t),new Tr(t),new x_(t),new $$(t),this.myLayerRenderingSystem_0,this.mySchedulerSystem_0,new Hr(t),new zf(t)]))},oo.prototype.initCamera_0=function(t){var n,i,o=new Eu,r=Xs(t.getSingletonEntity_9u06oy$($(Vf)),(n=this,i=o,function(t){var e=new Xl,o=n;return e.origin=B(zi().ZERO_VEC),e.dimension=B(o.viewport_0.size),t.unaryPlus_jixjl7$(new _u(e)),t.unaryPlus_jixjl7$(i),j}));o.addDoubleClickListener_abz6et$(function(t,n){return function(i){var o=t.contains_9u06oy$($(Df));if(!o){var r,a,s=t;if(null==(a=null==(r=s.componentManager.getComponents_ahlfl2$(s).get_11rb$($(Vf)))||e.isType(r,Vf)?r:P()))throw I("Component "+$(Vf).simpleName+" is not found");o=a.zoom===n.viewport_0.maxZoom}if(!o){var l=Di(i.location),u=n.viewport_0.getMapCoord_sctv0c$(U(F(l,n.viewport_0.center),2));return Uf().setAnimation_5srvv$(t,l,u,1),j}}}(r,this))},oo.prototype.initLayers_0=function(t){var e;this.myBasemapTileSystemProvider_0.isVector?Xs(t.createEntity_61zpoe$("vector_layer_ground"),(e=this,function(t){return t.unaryPlus_jixjl7$(new U_(L_())),t.unaryPlus_jixjl7$(new v_),t.unaryPlus_jixjl7$(new Kf),t.unaryPlus_jixjl7$(e.myLayerManager_0.addLayer_o457vg$("ground",Qu())),j})):Xs(t.createEntity_61zpoe$("raster_layer_ground"),function(t){return function(e){return e.unaryPlus_jixjl7$(new U_(M_())),e.unaryPlus_jixjl7$(new v_),e.unaryPlus_jixjl7$(new Kf),e.unaryPlus_jixjl7$(t.myLayerManager_0.addLayer_o457vg$("http_ground",Qu())),j}}(this));var n,i=new fo(t,this.myLayerManager_0,this.myMapProjection_0,this.myTextMeasurer_0),o=this.layers_0,r=D("apply",function(t,e){return e(t),t}.bind(null,i));for(n=o.iterator();n.hasNext();)r(n.next());this.myBasemapTileSystemProvider_0.isVector&&Xs(t.createEntity_61zpoe$("vector_layer_labels"),function(t){return function(e){return e.unaryPlus_jixjl7$(new U_(z_())),e.unaryPlus_jixjl7$(new v_),e.unaryPlus_jixjl7$(new Kf),e.unaryPlus_jixjl7$(t.myLayerManager_0.addLayer_o457vg$("labels",ec())),j}}(this)),this.myDevParams_0.isSet_1a54na$(za().DEBUG_GRID)&&Xs(t.createEntity_61zpoe$("cell_layer_debug"),function(t){return function(e){return e.unaryPlus_jixjl7$(new U_(D_())),e.unaryPlus_jixjl7$(new W_),e.unaryPlus_jixjl7$(new v_),e.unaryPlus_jixjl7$(new Kf),e.unaryPlus_jixjl7$(t.myLayerManager_0.addLayer_o457vg$("debug",ec())),j}}(this)),Xs(t.createEntity_61zpoe$("layer_ui"),function(t){return function(e){return e.unaryPlus_jixjl7$(new y$),e.unaryPlus_jixjl7$(t.myLayerManager_0.addLayer_o457vg$("ui",nc())),j}}(this))},oo.prototype.dispose=function(){this.myTimerReg_0.dispose(),this.myEcsController_0.dispose()},so.prototype.onTime_8e33dg$=function(t){var n=this.deltaTime_0.tick_s8cxhz$(t);return this.currentTime_0=this.currentTime_0.add(n),this.currentTime_0.compareTo_11rb$(this.skipTime_0)>0&&(this.currentTime_0=f,this.timePredicate_0(e.Long.fromNumber(n.toNumber()*this.animationMultiplier_0)))},so.$metadata$={kind:m,simpleName:"UpdateController",interfaces:[]},oo.$metadata$={kind:m,simpleName:"LiveMap",interfaces:[V]},Object.defineProperty(lo.prototype,"viewLonLatRect",{configurable:!0,get:function(){var t,e,n=this.myViewport_0.window;if(null==(t=this.worldToLonLat_0(n.origin)))return null;var i=t;if(null==(e=this.worldToLonLat_0(F(n.origin,n.dimension))))return null;var o=e;return Y(i.x,o.y,o.x-i.x,i.y-o.y)}}),lo.prototype.worldToLonLat_0=function(t){var e,n,i,o,r=this.myMapProjection_0.mapRect.dimension;return t.x>r.x?(i=p(W.FULL_LONGITUDE,0),n=J(t,(o=r,function(t){return Z(t,X(o))}))):t.x<0?(i=p(-W.FULL_LONGITUDE,0),n=J(r,function(t){return function(e){return Q(e,X(t))}}(r))):(i=p(0,0),n=t),null==(e=this.myMapProjection_0.invert_11rc$(n))?null:F(i,e)},uo.prototype.getLocationString_wthzt5$=function(t){var e=t.dimension.mul_14dthe$(.05);return"location = ["+d(this.round_0(t.left+e.x,6))+", "+d(this.round_0(t.top+e.y,6))+", "+d(this.round_0(t.right-e.x,6))+", "+d(this.round_0(t.bottom-e.y,6))+"]"},uo.prototype.round_0=function(t,e){var n=et.pow(10,e);return tt(t*n)/n},uo.$metadata$={kind:l,simpleName:"Companion",interfaces:[]};var co=null;function po(){return null===co&&new uo,co}function ho(){this.isLoopY_0=!1,this.size=N.Companion.ZERO,this.geocodingService=rr().bogusGeocodingService(),this.tileSystemProvider=yd().chessboard_a87jzg$(),this.layers=ot(),this.interactive=!0,this.mapLocation=null,this.projection=rp().mercator(),this.mapLocationConsumer=_o,this.attribution=null,this.showCoordPickTools=!1,this.zoom=null,this.minZoom=1,this.maxZoom=15,this.cursorService=new e$,this.devParams=new Pa(rt())}function _o(t){return j}function fo(t,e,n,i){this.myComponentManager=t,this.layerManager=e,this.mapProjection=n,this.textMeasurer=i}function mo(){this.url_6i03cv$_0=this.url_6i03cv$_0,this.theme=ut.COLOR}function $o(){this.url_u3glsy$_0=this.url_u3glsy$_0}function yo(t,e,n){return Xs(t.createEntity_61zpoe$(n),(i=e,function(t){return t.unaryPlus_jixjl7$(i),t.unaryPlus_jixjl7$(new Kf),t.unaryPlus_jixjl7$(new Gf),t.unaryPlus_jixjl7$(new qf),j}));var i}function go(t){var n,i;if(this.myComponentManager_0=t.componentManager,this.myParentLayerComponent_0=new pc(t.id_8be2vx$),null==(i=null==(n=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(v_)))||e.isType(n,v_)?n:P()))throw I("Component "+$(v_).simpleName+" is not found");this.myLayerEntityComponent_0=i}function vo(t){return t.unaryPlus_jixjl7$(bh()),t.unaryPlus_jixjl7$(Ch()),j}function bo(t){var e=new mo;return t(e),e.build()}function wo(t){var e=new $o;return t(e),e.build()}function xo(t,e){return t.add_57nep2$(new Th(e))}function ko(t,e,n,i){this.id=t,this.centroid=e,this.bbox=n,this.position=i}function Co(t,e,n){this.factory=t,this.mapProjection=e,this.horizontal=n}function Eo(t,e,n){var i;n(new Co(new go(Xs(t.myComponentManager.createEntity_61zpoe$("map_layer_line"),(i=t,function(t){return t.unaryPlus_jixjl7$(i.layerManager.addLayer_o457vg$("geom_line",tc())),t.unaryPlus_jixjl7$(new v_),j}))),t.mapProjection,e))}function So(t,e){this.factory_0=t,this.mapProjection_0=e,this.sizeScalingRange=null,this.alphaScalingEnabled=!1,this.point=null,this.lineDash=ot(),this.strokeColor=O.Companion.BLACK,this.strokeWidth=1}function To(t,e){return function(n,i){var o=function(t,e,n){var i;return i=T(e?[J(t,Oo(n)),J(t,No(n))]:[J(t,void 0,Po(n)),J(t,void 0,Io(n))]),new bt(ht(new vt(ht(new gt(i)))))}(i,t,e.mapProjection_0.mapRect),r=function(t,e,n,i){return n?new kt(p(wt(i),t.y-e/2),p(xt(i),e)):new kt(p(t.x-e/2,Ct(i)),p(e,Et(i)))}(i,e.strokeWidth,t,e.mapProjection_0.mapRect),a=new w_;a.renderer=new aa,n.unaryPlus_jixjl7$(a);var s=new Nr,l=e;s.sizeScalingRange=l.sizeScalingRange,s.alphaScalingEnabled=l.alphaScalingEnabled,s.strokeColor=l.strokeColor,s.strokeWidth=l.strokeWidth,s.lineDash=dt(l.lineDash),n.unaryPlus_jixjl7$(s),n.unaryPlus_jixjl7$(new Wf(r.origin));var u=new r_;return u.geometry=o,n.unaryPlus_jixjl7$(u),n.unaryPlus_jixjl7$(new Yf(r.dimension)),n.unaryPlus_jixjl7$(new Xf),n.unaryPlus_jixjl7$(new om),j}}function Oo(t){return function(e){return ft(t)}}function No(t){return function(e){return mt(t)}}function Po(t){return function(e){return $t(t)}}function Io(t){return function(e){return yt(t)}}function Ao(){Do()}function Ro(){zo=this}function jo(t){this.closure$geoRectangle=t}function Lo(t){this.closure$mapRegion=t}lo.$metadata$={kind:m,simpleName:"LiveMapLocation",interfaces:[]},ho.prototype.build=function(){var t,e;if(!(this.minZoom<=this.maxZoom))throw _t("minZoom should be less than or equal to maxZoom".toString());var n=null==this.zoom;if(!n){var i=new nt(this.minZoom,this.maxZoom),o=this.zoom;n=null!=o&&i.contains_mef7kx$(o)}if(!n){var r="Zoom must be in range ["+this.minZoom+", "+this.maxZoom+"], but was "+d(this.zoom);throw _t(r.toString())}var a=Na(this.projection),s=new Pm(a.mapRect,this.projection.cylindrical,this.isLoopY_0),l=km().create_sburk9$(s,Mi(this.size),it(a.mapRect),this.minZoom,this.maxZoom);return l.zoom=null!=(t=this.zoom)?t:l.minZoom+1|0,new oo(s,a,l,this.layers,this.tileSystemProvider,qp(this.geocodingService,this.size),this.devParams,this.mapLocationConsumer,null!=(e=this.mapLocation)?e.getBBox_1do3x8$(new Rh(this.geocodingService,s,a)):null,this.zoom,this.attribution,this.showCoordPickTools,this.cursorService)},ho.$metadata$={kind:m,simpleName:"LiveMapBuilder",interfaces:[]},fo.$metadata$={kind:m,simpleName:"LayersBuilder",interfaces:[]},Object.defineProperty(mo.prototype,"url",{configurable:!0,get:function(){return null==this.url_6i03cv$_0?A("url"):this.url_6i03cv$_0},set:function(t){this.url_6i03cv$_0=t}}),mo.prototype.build=function(){return new lt(new st(this.url),this.theme)},mo.$metadata$={kind:m,simpleName:"LiveMapTileServiceBuilder",interfaces:[]},Object.defineProperty($o.prototype,"url",{configurable:!0,get:function(){return null==this.url_u3glsy$_0?A("url"):this.url_u3glsy$_0},set:function(t){this.url_u3glsy$_0=t}}),$o.prototype.build=function(){return new pt(new ct(this.url))},$o.$metadata$={kind:m,simpleName:"LiveMapGeocodingServiceBuilder",interfaces:[]},go.prototype.createMapEntity_61zpoe$=function(t){var e=yo(this.myComponentManager_0,this.myParentLayerComponent_0,t);return this.myLayerEntityComponent_0.add_za3lpa$(e.id_8be2vx$),e},go.prototype.createStaticEntityWithLocation_6enyom$=function(t,e){return Xs(this.createStaticEntity_6enyom$(t,e),vo)},go.prototype.createStaticEntity_6enyom$=function(t,e){return this.createMapEntity_61zpoe$(t).add_57nep2$(new Sh(e))},go.$metadata$={kind:m,simpleName:"MapEntityFactory",interfaces:[]},ko.$metadata$={kind:m,simpleName:"GeoObject",interfaces:[]},Co.$metadata$={kind:m,simpleName:"Lines",interfaces:[]},So.prototype.build_6taknv$=function(t){if(null==this.point)throw I("Can't create line entity. Coord is null.".toString());var e=xo(this.factory_0.createStaticEntity_6enyom$("map_ent_s_line",h(this.point)),To(t,this));return e.removeComponent_9u06oy$($(gh)),e.removeComponent_9u06oy$($(xh)),e.removeComponent_9u06oy$($(wh)),e},So.$metadata$={kind:m,simpleName:"LineBuilder",interfaces:[]},jo.prototype.getBBox_1do3x8$=function(t){return St.Asyncs.constant_mh5how$(t.calculateBBoxOfGeoRect_12lugk$(this.closure$geoRectangle))},jo.$metadata$={kind:m,interfaces:[Ao]},Ro.prototype.create_emtjl$=function(t){return new jo(t)},Lo.prototype.getBBox_1do3x8$=function(t){return t.geocodeMapRegion_4x05nu$(this.closure$mapRegion)},Lo.$metadata$={kind:m,interfaces:[Ao]},Ro.prototype.create_4x05nu$=function(t){return new Lo(t)},Ro.$metadata$={kind:l,simpleName:"Companion",interfaces:[]};var zo=null;function Do(){return null===zo&&new Ro,zo}function Mo(t,e){this.factory=t,this.mapProjection=e}function Bo(t,e){this.myFactory_0=t,this.myMapProjection_0=e,this.sizeScalingRange=null,this.alphaScalingEnabled=!1,this.layerIndex=null,this.index=null,this.regionId="",this.lineDash=ot(),this.strokeColor=O.Companion.BLACK,this.strokeWidth=1,this.points_aeya17$_0=this.points_aeya17$_0,this.flat=!0,this.animation=0,this.speed=0,this.flow=0,this.arrowAngle=null,this.arrowLength=null,this.arrowAtEnds=null,this.arrowType=null}function Fo(t){return t.duration=5e3,t.easingFunction=mp().LINEAR,t.direction=ws(),t.loop=Os(),j}function Uo(t){var e,n=function(t){var e,n=S(),i=S();if(!t.isEmpty()){i.add_11rb$(t.get_za3lpa$(0)),e=t.size;for(var o=1;o360-l){var u=r.x<0?-1:1,c=r.x-180*u,h=a.x+180*u,_=(a.y-r.y)*(h===c?.5:c/(c-h))+r.y;i.add_11rb$(p(180*u,_)),n.add_11rb$(i),(i=S()).add_11rb$(p(180*-u,_))}i.add_11rb$(a)}}return n.add_11rb$(i),n}(t),i=It(Pt(n,10));for(e=n.iterator();e.hasNext();){var o=e.next();i.add_11rb$(new vt(ht(new gt(o))))}return new bt(i)}function qo(t,e){this.factory=t,this.mapProjection=e}function Ho(t){this.myFactory_0=t,this.sizeScalingRange=null,this.alphaScalingEnabled=!1,this.layerIndex=null,this.radius=0,this.holeSize=0,this.point=null,this.strokeColor=O.Companion.WHITE,this.strokeWidth=0,this.indices=ot(),this.values=ot(),this.colors=ot(),this.explodes=null}function Go(t,e){this.factory=t,this.mapProjection=e}function Ko(t){this.myFactory_0=t,this.sizeScalingRange=null,this.alphaScalingEnabled=!1,this.layerIndex=null,this.radius=4,this.point=null,this.strokeColor=O.Companion.BLACK,this.strokeWidth=1,this.index=null,this.fillColor=O.Companion.WHITE,this.animation=0,this.label="",this.shape=1}function Vo(t,e){this.factory=t,this.mapProjection=e}function Yo(t,e){this.myFactory_0=t,this.myMapProjection_0=e,this.sizeScalingRange=null,this.alphaScalingEnabled=!1,this.layerIndex=null,this.index=null,this.geoObject=null,this.lineDash=ot(),this.strokeColor=O.Companion.BLACK,this.strokeWidth=0,this.fillColor=O.Companion.GREEN,this.geometry=null}function Wo(){or=this}function Xo(){}function Zo(){}function Jo(){}function Qo(t,e){lt.call(this,t,e)}function tr(t){return t.url="http://10.0.0.127:3020/map_data/geocoding",j}function er(t){return t.url="https://geo2.datalore.jetbrains.com",j}function nr(t){return t.url="ws://10.0.0.127:3933",j}function ir(t){return t.url="wss://tiles.datalore.jetbrains.com",j}Ao.$metadata$={kind:u,simpleName:"MapLocation",interfaces:[]},Mo.$metadata$={kind:m,simpleName:"Paths",interfaces:[]},Object.defineProperty(Bo.prototype,"points",{configurable:!0,get:function(){return null==this.points_aeya17$_0?A("points"):this.points_aeya17$_0},set:function(t){this.points_aeya17$_0=t}}),Bo.prototype.build_6taknv$=function(t){var e,n,i,o,r,a,s,l=Uo(this.points),u=Ot(Tt.Transforms.transformMultiPolygon_prkczh$(l,D("project",function(t,e){return t.project_11rb$(e)}.bind(null,this.myMapProjection_0)))),c=Uo(this.flat?this.points:Yc(this.points)),p=Tt.Transforms.transformMultiPolygon_prkczh$(c,D("project",function(t,e){return t.project_11rb$(e)}.bind(null,this.myMapProjection_0)));if(null!=(e=Ot(p))){var _=Xs(this.myFactory_0.createMapEntity_61zpoe$("map_ent_path"),(i=this,o=u,r=e,a=p,s=t,function(t){null!=i.layerIndex&&null!=i.index&&t.unaryPlus_jixjl7$(new Am(h(i.layerIndex),h(i.index)));var e=new w_;e.renderer=new aa,t.unaryPlus_jixjl7$(e);var n=new Nr,l=i;if(n.sizeScalingRange=l.sizeScalingRange,n.alphaScalingEnabled=l.alphaScalingEnabled,n.strokeColor=l.strokeColor,n.strokeWidth=l.strokeWidth,n.lineDash=dt(l.lineDash),n.arrowSpec=ga().create_jtt7dg$(l.arrowAngle,l.arrowLength,l.arrowAtEnds,l.arrowType),t.unaryPlus_jixjl7$(n),null!=o){var u=o,c=new Or;c.location=u,t.unaryPlus_jixjl7$(c)}t.unaryPlus_jixjl7$(new Wf(r.origin));var p=new r_;return p.geometry=a,t.unaryPlus_jixjl7$(p),t.unaryPlus_jixjl7$(new Yf(r.dimension)),t.unaryPlus_jixjl7$(new Xf),t.unaryPlus_jixjl7$(new om),t.unaryPlus_jixjl7$(bh()),t.unaryPlus_jixjl7$(Ch()),s||t.unaryPlus_jixjl7$(new Rm(new Um)),j}));if(2===this.animation){var d=this.addAnimationComponent_0(_.componentManager.createEntity_61zpoe$("map_ent_path_animation"),Fo),f=new w_;f.renderer=new Wr,this.addGrowingPathEffectComponent_0(_.setComponent_qqqpmc$(f),(n=d,function(t){return t.animationId=n.id_8be2vx$,j}))}return _}return null},Bo.prototype.addAnimationComponent_0=function(t,e){var n=new zs;return e(n),t.add_57nep2$(n)},Bo.prototype.addGrowingPathEffectComponent_0=function(t,e){var n=new Yr;return e(n),t.add_57nep2$(n)},Bo.$metadata$={kind:m,simpleName:"PathBuilder",interfaces:[]},qo.$metadata$={kind:m,simpleName:"Pies",interfaces:[]},Ho.prototype.build=function(){if(null==this.point)throw I("Can't create pieSector entity. Coord is null.".toString());return xo(this.myFactory_0.createStaticEntityWithLocation_6enyom$("map_ent_s_pie_sector",h(this.point)),(t=this,function(e,n){null!=t.layerIndex&&e.unaryPlus_jixjl7$(new Am(h(t.layerIndex),0)),e.unaryPlus_jixjl7$(new Rm(new zr));var i=new w_;i.renderer=new Lr,e.unaryPlus_jixjl7$(i);var o=new Nr,r=t;o.sizeScalingRange=r.sizeScalingRange,o.alphaScalingEnabled=r.alphaScalingEnabled,o.strokeColor=r.strokeColor,o.strokeWidth=r.strokeWidth,e.unaryPlus_jixjl7$(o);var a=new Ar,s=t;return a.radius=s.radius,a.holeSize=s.holeSize,a.sliceValues=s.values,a.colors=s.colors,a.indices=s.indices,a.explodeValues=s.explodes,e.unaryPlus_jixjl7$(a),e.unaryPlus_jixjl7$(new Wf(n)),e.unaryPlus_jixjl7$(new im),e.unaryPlus_jixjl7$(new Xf),e.unaryPlus_jixjl7$(new om),j}));var t},Ho.$metadata$={kind:m,simpleName:"PieBuilder",interfaces:[]},Go.$metadata$={kind:m,simpleName:"Points",interfaces:[]},Ko.prototype.build_6taknv$=function(t){void 0===t&&(t=!1);var e,n,i,o=2*this.radius;if(null==this.point)throw I("Can't create point entity. Coord is null.".toString());return xo(this.myFactory_0.createStaticEntityWithLocation_6enyom$("map_ent_s_point",h(this.point)),(e=this,n=o,i=t,function(t,o){null!=e.layerIndex&&null!=e.index&&t.unaryPlus_jixjl7$(new Am(h(e.layerIndex),h(e.index)));var r=new w_;r.renderer=new oa(e.shape),t.unaryPlus_jixjl7$(r);var a,s=new Nr,l=e;if(s.sizeScalingRange=l.sizeScalingRange,s.alphaScalingEnabled=l.alphaScalingEnabled,(a=l.shape)>=1&&a<=14)s.strokeColor=l.strokeColor,s.strokeWidth=l.strokeWidth;else if(a>=15&&a<=18||20===a)s.fillColor=l.strokeColor,s.strokeWidth=At.NaN;else if(19===a)s.fillColor=l.strokeColor,s.strokeColor=l.strokeColor,s.strokeWidth=l.strokeWidth;else{if(!(a>=21&&a<=25))throw I(("Not supported shape: "+l.shape).toString());s.fillColor=l.fillColor,s.strokeColor=l.strokeColor,s.strokeWidth=l.strokeWidth}t.unaryPlus_jixjl7$(s);var u=new Ir;return u.size=n,t.unaryPlus_jixjl7$(u),t.unaryPlus_jixjl7$(new Wf(o)),t.unaryPlus_jixjl7$(new im),t.unaryPlus_jixjl7$(new Xf),t.unaryPlus_jixjl7$(new om),i||t.unaryPlus_jixjl7$(new Rm(new Km)),j}))},Ko.$metadata$={kind:m,simpleName:"PointBuilder",interfaces:[]},Vo.$metadata$={kind:m,simpleName:"Polygons",interfaces:[]},Yo.prototype.build=function(){return null!=this.geoObject?this.createGeoObjectEntity_0():null!=this.geometry?this.createStaticEntity_0():null},Yo.prototype.createStaticEntity_0=function(){var t,e=h(this.geometry),n=Tt.Transforms.transformMultiPolygon_prkczh$(e,D("project",function(t,e){return t.project_11rb$(e)}.bind(null,this.myMapProjection_0)));if(null==(t=Ot(n)))throw I("Polygon bbox can't be null".toString());var i,o,r,a=t;return Xs(this.myFactory_0.createMapEntity_61zpoe$("map_ent_s_polygon"),(i=this,o=a,r=n,function(t){null!=i.layerIndex&&null!=i.index&&t.unaryPlus_jixjl7$(new Am(h(i.layerIndex),h(i.index)));var e=new w_;e.renderer=new ra,t.unaryPlus_jixjl7$(e);var n=new Nr,a=i;n.sizeScalingRange=a.sizeScalingRange,n.alphaScalingEnabled=a.alphaScalingEnabled,n.fillColor=a.fillColor,n.strokeColor=a.strokeColor,n.strokeWidth=a.strokeWidth,t.unaryPlus_jixjl7$(n),t.unaryPlus_jixjl7$(new Wf(o.origin));var s=new r_;return s.geometry=r,t.unaryPlus_jixjl7$(s),t.unaryPlus_jixjl7$(new Yf(o.dimension)),t.unaryPlus_jixjl7$(new Xf),t.unaryPlus_jixjl7$(new om),t.unaryPlus_jixjl7$(new Yh),t.unaryPlus_jixjl7$(bh()),t.unaryPlus_jixjl7$(Ch()),t.unaryPlus_jixjl7$(new Rm(new Xm)),j}))},Yo.prototype.createGeoObjectEntity_0=function(){var t,n,i,o,r=h(this.geoObject),a=Xs(this.myFactory_0.createMapEntity_61zpoe$("map_ent_geo_object_polygon_"+r.id),(i=this,o=r,function(t){var e=new w_;e.renderer=new ih,t.unaryPlus_jixjl7$(e);var n=new Nr,r=i;return n.sizeScalingRange=r.sizeScalingRange,n.fillColor=r.fillColor,n.strokeColor=r.strokeColor,n.strokeWidth=r.strokeWidth,t.unaryPlus_jixjl7$(n),t.unaryPlus_jixjl7$(new yh(o.id)),t.unaryPlus_jixjl7$(new Np),t.unaryPlus_jixjl7$(new Op(o.bbox)),t.unaryPlus_jixjl7$(new Xf),t.unaryPlus_jixjl7$(bh()),t.unaryPlus_jixjl7$(Ch()),j}));if(null==(n=null==(t=a.componentManager.getComponents_ahlfl2$(a).get_11rb$($(Xf)))||e.isType(t,Xf)?t:P()))throw I("Component "+$(Xf).simpleName+" is not found");return n.origins=ht(zi().ZERO_VEC),a},Yo.$metadata$={kind:m,simpleName:"PolygonsBuilder",interfaces:[]},Xo.prototype.send_2yxzh4$=function(t){return St.Asyncs.failure_lsqlk3$(Rt("Geocoding is disabled."))},Xo.$metadata$={kind:m,interfaces:[jt]},Wo.prototype.bogusGeocodingService=function(){return new pt(new Xo)},Jo.prototype.connect=function(){Lt("DummySocketBuilder.connect")},Jo.prototype.close=function(){Lt("DummySocketBuilder.close")},Jo.prototype.send_61zpoe$=function(t){Lt("DummySocketBuilder.send")},Jo.$metadata$={kind:m,interfaces:[zt]},Zo.prototype.build_korocx$=function(t){return new Jo},Zo.$metadata$={kind:m,simpleName:"DummySocketBuilder",interfaces:[Dt]},Qo.prototype.getTileData_h9hod0$=function(t,e){return St.Asyncs.constant_mh5how$(ot())},Qo.$metadata$={kind:m,interfaces:[lt]},Wo.prototype.bogusTileProvider=function(){return new Qo(new Zo,ut.COLOR)},Wo.prototype.devGeocodingService=function(){return wo(tr)},Wo.prototype.jetbrainsGeocodingService=function(){return wo(er)},Wo.prototype.devTileProvider=function(){return bo(nr)},Wo.prototype.jetbrainsTileProvider=function(){return bo(ir)},Wo.$metadata$={kind:l,simpleName:"Services",interfaces:[]};var or=null;function rr(){return null===or&&new Wo,or}function ar(t,e){this.factory=t,this.textMeasurer=e}function sr(t){this.myFactory_0=t,this.index=0,this.point=null,this.fillColor=O.Companion.TRANSPARENT,this.strokeColor=O.Companion.BLACK,this.strokeWidth=0,this.drawBorder=!1,this.labelPadding=.25,this.labelRadius=.15,this.labelSize=1,this.label="",this.size=10,this.family="Arial",this.fontface="",this.hjust=0,this.vjust=0,this.angle=0,this.lineheight=1}function lr(){}function ur(){_r(),this.canvasControl_5z19zi$_0=this.canvasControl_5z19zi$_0,this.canvasContent_0=_r().EMPTY_CANVAS_CONTENT_0}function cr(){}function pr(){hr=this,this.EMPTY_CANVAS_CONTENT_0=new cr}ar.$metadata$={kind:m,simpleName:"Texts",interfaces:[]},sr.prototype.build_np63pn$=function(t){var e,n,i=this.createTextSpec_0(t);if(null==this.point)throw I("Can't create text entity. Coord is null.".toString());return xo(this.myFactory_0.createStaticEntityWithLocation_6enyom$("map_ent_s_text",h(this.point)),(e=this,n=i,function(t,i){var o=new w_;o.renderer=new va,t.unaryPlus_jixjl7$(o);var r=new Nr,a=e;r.fillColor=a.fillColor,r.strokeColor=a.strokeColor,r.strokeWidth=a.strokeWidth,r.lineheight=a.lineheight,t.unaryPlus_jixjl7$(r);var s=new Pr;s.textSpec=n,t.unaryPlus_jixjl7$(s),t.unaryPlus_jixjl7$(new Wf(i)),t.unaryPlus_jixjl7$(new Xf),t.unaryPlus_jixjl7$(new om),t.unaryPlus_jixjl7$(new rm);var l=new im;return l.dimension=n.dimension,t.unaryPlus_jixjl7$(l),j}))},sr.prototype.createTextSpec_0=function(t){return new xa(this.label,this.fontface,E(this.size),this.family,this.angle,this.hjust,this.vjust,t,this.drawBorder,this.labelPadding,this.labelRadius,this.labelSize,this.lineheight)},sr.$metadata$={kind:m,simpleName:"TextBuilder",interfaces:[]},lr.$metadata$={kind:u,simpleName:"CanvasContent",interfaces:[]},Object.defineProperty(ur.prototype,"canvasControl",{configurable:!0,get:function(){return null==this.canvasControl_5z19zi$_0?A("canvasControl"):this.canvasControl_5z19zi$_0},set:function(t){this.canvasControl_5z19zi$_0=t}}),ur.prototype.show_5jcx07$=function(t){this.canvasContent_0.hide(),this.canvasContent_0=t,this.canvasContent_0.show_49gm0j$(this.canvasControl)},ur.prototype.clear=function(){this.show_5jcx07$(_r().EMPTY_CANVAS_CONTENT_0)},cr.prototype.show_49gm0j$=function(t){},cr.prototype.hide=function(){},cr.$metadata$={kind:m,simpleName:"EmptyContent",interfaces:[lr]},pr.$metadata$={kind:l,simpleName:"Companion",interfaces:[]};var hr=null;function _r(){return null===hr&&new pr,hr}function dr(t){this.liveMap_0=t}function fr(){this.contentPresenter_0=null,this.errorHandlerRegistration_0=H.Companion.EMPTY,this.isLoadingLiveMapRegistration_0=H.Companion.EMPTY,this.removed_0=!1,this.initializing_0=new K(!0),this.liveMapIsLoading_0=new K(!0),this.isLoading=Ft.Properties.map_ohntev$(Ft.Properties.or_us87nw$(this.initializing_0,this.liveMapIsLoading_0),mr)}function mr(t){return!0===t}function $r(t){return t=t||Object.create(fr.prototype),fr.call(t),t.contentPresenter_0=new ur,t}function yr(t){wr(),this.message_0=t,this.canvasControl_c0z47b$_0=this.canvasControl_c0z47b$_0}function gr(t,e){return function(n){return M.CanvasControlUtil.drawLater_pfyfsw$(t,function(t,e){return function(){return t.canvasControl_0.context.drawImage_1j7zd4$(e),j}}(e,n)),j}}function vr(){br=this,this.FONT_SIZE_0=17,this.FONT_HEIGHT_0=21.25,this.FONT_COLOR_0=new O(179,179,179),this.BACKGROUND_COLOR_0=O.Companion.WHITE}ur.$metadata$={kind:m,simpleName:"CanvasContentPresenter",interfaces:[]},dr.prototype.show_49gm0j$=function(t){this.liveMap_0.draw_49gm0j$(t)},dr.prototype.hide=function(){this.liveMap_0.dispose()},dr.prototype.addErrorHandler_4m4org$=function(t){return this.liveMap_0.addErrorHandler_4m4org$(t)},dr.$metadata$={kind:m,simpleName:"LiveMapContent",interfaces:[lr]},fr.prototype.render_62iii2$=function(t,e){this.contentPresenter_0.canvasControl=t,this.showSpinner_0(),Mt(t,e).onResult_m8e4a6$(D("showLiveMap",function(t,e){return t.showLiveMap_0(e),j}.bind(null,this)),D("showError",function(t,e){return t.showError_0(e),j}.bind(null,this)))},fr.prototype.showLiveMap_0=function(t){if(this.isLoadingLiveMapRegistration_0!==H.Companion.EMPTY)throw I("Unexpected".toString());var e,n;this.initializing_0.set_11rb$(!1),this.isLoadingLiveMapRegistration_0=Bt.PropertyBinding.bindOneWay_2ov6i0$(t.isLoading,this.liveMapIsLoading_0),this.setContent_0((e=t,n=this,function(){var t=new dr(e),i=n;return i.errorHandlerRegistration_0=t.addErrorHandler_4m4org$(D("showError",function(t,e){return t.showError_0(e),j}.bind(null,i))),t}))},fr.prototype.showSpinner_0=function(){this.initializing_0.set_11rb$(!0),this.setContent_0(D("SpinnerContent",(function(){return new xr})))},fr.prototype.showError_0=function(t){this.initializing_0.set_11rb$(!1),this.liveMapIsLoading_0.set_11rb$(!1);var e,n=t.message;this.setContent_0((e=n,function(){return new yr(null!=e?e:"Undefined exception")}))},fr.prototype.setContent_0=function(t){this.removed_0||this.contentPresenter_0.show_5jcx07$(t())},fr.prototype.dispose=function(){this.removed_0=!0,this.errorHandlerRegistration_0.dispose(),this.isLoadingLiveMapRegistration_0.dispose(),this.contentPresenter_0.clear()},fr.$metadata$={kind:m,simpleName:"LiveMapPresenter",interfaces:[V]},Object.defineProperty(yr.prototype,"canvasControl_0",{configurable:!0,get:function(){return null==this.canvasControl_c0z47b$_0?A("canvasControl"):this.canvasControl_c0z47b$_0},set:function(t){this.canvasControl_c0z47b$_0=t}}),yr.prototype.show_49gm0j$=function(t){this.canvasControl_0=new Ut(t);var e=this.canvasControl_0.createCanvas();this.drawText_0(e.context2d,new N(e.size.x,e.size.y)),e.takeSnapshot().onSuccess_qlkmfe$(gr(t,this))},yr.prototype.hide=function(){this.canvasControl_0.dispose()},yr.prototype.drawText_0=function(t,e){var n=qt(this.message_0,["\n"]);t.save(),t.setFillStyle_2160e9$(wr().BACKGROUND_COLOR_0),t.fillRect_6y0v78$(0,0,e.x,e.y),t.setTextBaseline_5cz80h$(Ht.TOP),t.setTextAlign_iwro1z$(Gt.START),t.setFillStyle_2160e9$(wr().FONT_COLOR_0),t.setFont_ov8mpe$(new Kt(void 0,void 0,wr().FONT_SIZE_0,"Helvetica, Arial, sans-serif"));var i,o,r=wr().FONT_HEIGHT_0*n.size,a={v:0};for(i=n.iterator();i.hasNext();){var s=i.next(),l=a.v,u=t.measureText_61zpoe$(s);a.v=et.max(l,u)}for(o=Vt(n).iterator();o.hasNext();){var c=o.next();t.fillText_ai6r6m$(n.get_za3lpa$(c),(e.x-a.v)/2,(e.y-r)/2+c*wr().FONT_HEIGHT_0)}t.restore()},vr.$metadata$={kind:l,simpleName:"Companion",interfaces:[]};var br=null;function wr(){return null===br&&new vr,br}function xr(){Sr(),this.registration_tipnjx$_0=this.registration_tipnjx$_0,this.canvasControl_jrpjs7$_0=this.canvasControl_jrpjs7$_0,this.spinnerCenter_g0ryds$_0=this.spinnerCenter_g0ryds$_0}function kr(t,e){return function(n){return e.drawSpinner_0(t.context2d,n),t.takeSnapshot().onSuccess_qlkmfe$(function(t){return function(e){return t.canvasControl_0.context.drawImage_1j7zd4$(e),j}}(e)),!0}}function Cr(){Er=this,this.BACKGROUND_COLOR_0=O.Companion.WHITE,this.CIRCLE_COLOR_0=new O(232,232,232),this.FONT_COLOR_0=new O(97,97,97),this.ARC_COLOR_0=new O(0,191,255),this.LINE_WIDTH_0=.9,this.RADIUS_0=11.5,this.BACK_RADIUS_0=this.RADIUS_0+this.LINE_WIDTH_0,this.ARC_LENGTH_0=Yt.PI/2,this.LOOP_DURATION_0=Wt,this.SPACE_0=15,this.LOADING_TEXT_0="Loading...",this.FONT_SIZE_0=12}yr.$metadata$={kind:m,simpleName:"MessageContent",interfaces:[lr]},Object.defineProperty(xr.prototype,"registration_0",{configurable:!0,get:function(){return null==this.registration_tipnjx$_0?A("registration"):this.registration_tipnjx$_0},set:function(t){this.registration_tipnjx$_0=t}}),Object.defineProperty(xr.prototype,"canvasControl_0",{configurable:!0,get:function(){return null==this.canvasControl_jrpjs7$_0?A("canvasControl"):this.canvasControl_jrpjs7$_0},set:function(t){this.canvasControl_jrpjs7$_0=t}}),Object.defineProperty(xr.prototype,"spinnerCenter_0",{configurable:!0,get:function(){return null==this.spinnerCenter_g0ryds$_0?A("spinnerCenter"):this.spinnerCenter_g0ryds$_0},set:function(t){this.spinnerCenter_g0ryds$_0=t}}),xr.prototype.show_49gm0j$=function(t){this.canvasControl_0=new Ut(t);var e=this.canvasControl_0.createCanvas();this.drawStaticElements_0(e.context2d),this.registration_0=M.CanvasControlUtil.setAnimationHandler_1ixrg0$(t,z.Companion.toHandler_qm21m0$(kr(e,this)))},xr.prototype.hide=function(){this.canvasControl_0.dispose(),this.registration_0.dispose()},xr.prototype.drawStaticElements_0=function(t){t.save(),t.setFont_ov8mpe$(new Kt(void 0,void 0,Sr().FONT_SIZE_0,"Helvetica, Arial, sans-serif"));var e=t.measureText_61zpoe$(Sr().LOADING_TEXT_0),n=2*Sr().RADIUS_0+Sr().LINE_WIDTH_0,i=n+Sr().SPACE_0+e,o=this.canvasControl_0.size;this.spinnerCenter_0=new N((o.x-i)/2+n/2,o.y/2),t.setFillStyle_2160e9$(Sr().BACKGROUND_COLOR_0),t.fillRect_6y0v78$(0,0,o.x,o.y),t.setTextBaseline_5cz80h$(Ht.MIDDLE),t.setTextAlign_iwro1z$(Gt.START),t.setFillStyle_2160e9$(Sr().FONT_COLOR_0),t.fillText_ai6r6m$(Sr().LOADING_TEXT_0,(o.x+i)/2-e,o.y/2),t.restore()},xr.prototype.drawSpinner_0=function(t,e){t.save(),t.setFillStyle_2160e9$(Sr().BACKGROUND_COLOR_0),t.fillRect_6y0v78$(this.spinnerCenter_0.x-Sr().BACK_RADIUS_0,this.spinnerCenter_0.y-Sr().BACK_RADIUS_0,2*Sr().BACK_RADIUS_0,2*Sr().BACK_RADIUS_0),this.drawSpinnerArc_0(t,Sr().CIRCLE_COLOR_0,0,2*Yt.PI);var n=2*Yt.PI*e.modulo(Sr().LOOP_DURATION_0).toNumber()/Sr().LOOP_DURATION_0.toNumber();this.drawSpinnerArc_0(t,Sr().ARC_COLOR_0,n,Sr().ARC_LENGTH_0),t.restore()},xr.prototype.drawSpinnerArc_0=function(t,e,n,i){t.setLineWidth_14dthe$(Sr().LINE_WIDTH_0),t.setStrokeStyle_2160e9$(e),t.beginPath(),t.arc_6p3vsx$(this.spinnerCenter_0.x,this.spinnerCenter_0.y,Sr().RADIUS_0,n,n+i),t.stroke()},Cr.$metadata$={kind:l,simpleName:"Companion",interfaces:[]};var Er=null;function Sr(){return null===Er&&new Cr,Er}function Tr(t){Ls.call(this,t),this.alphaScalingStartingLevel_0=3}function Or(){this.location_4dtecb$_0=this.location_4dtecb$_0}function Nr(){this.strokeWidth=0,this.fillColor=null,this.strokeColor=null,this.lineDash=null,this.arrowSpec=null,this.lineheight=null,this.sizeScalingRange=null,this.alphaScalingEnabled=!1,this.scalingSizeFactor=1,this.scalingAlphaValue=null}function Pr(){this.textSpec_f9xlil$_0=this.textSpec_f9xlil$_0}function Ir(){this.size=0}function Ar(){this.radius=0,this.holeSize=0,this.indices=ot(),this.sliceValues=ot(),this.colors=ot(),this.explodeValues=null}function Rr(){Fr=this}function jr(t,e,n,i,o,r,a){this.index=t,this.radius=e,this.holeRadius=n,this.fillColor=i,this.startAngle=o,this.endAngle=r,this.angle_0=this.endAngle-this.startAngle,this.direction_0=this.startAngle+this.angle_0/2;var s=this.direction_0,l=a*et.cos(s),u=this.direction_0;this.sectorCenter=new N(l,a*et.sin(u)),this.outerArcStart=this.outerArcPoint_14dthe$(this.startAngle),this.outerArcEnd=this.outerArcPoint_14dthe$(this.endAngle),this.innerArcStart=this.innerArcPoint_14dthe$(this.startAngle),this.innerArcEnd=this.innerArcPoint_14dthe$(this.endAngle)}function Lr(){}function zr(){Br()}function Dr(){Mr=this,this.LOCATABLE_COMPONENTS=T([$(Ar),$(Xf)])}xr.$metadata$={kind:m,simpleName:"SpinnerContent",interfaces:[lr]},Tr.prototype.updateImpl_og8vrq$=function(t,n){var i;if(null!=t.initialZoom)for(i=this.componentManager.getEntities_tv8pd9$(T([$(Hf),$(Nr)])).iterator();i.hasNext();){var o,r,a,s,l,u,c=i.next();if(null==(null==(o=c.componentManager.getComponents_ahlfl2$(c).get_11rb$($(Hf)))||e.isType(o,Hf)?o:P()))throw I("Component "+$(Hf).simpleName+" is not found");if(null==(a=null==(r=c.componentManager.getComponents_ahlfl2$(c).get_11rb$($(Nr)))||e.isType(r,Nr)?r:P()))throw I("Component "+$(Nr).simpleName+" is not found");if(null!=(s=a.sizeScalingRange)){var p,_,d=Xt(t.camera.zoom)-h(t.initialZoom)|0,f=Zt(d,s),m=f-this.alphaScalingStartingLevel_0+1|0;if(a.alphaScalingEnabled&&m>0){var y=1-.2*m;p=Xt(255*et.max(.1,y))}else p=null;if(a.scalingAlphaValue=p,0===f)_=1;else if(f>0)_=et.pow(2,f);else{if(!(f<0))throw I("Unknown".toString());var g=Jt(f);_=1/et.pow(2,g)}a.scalingSizeFactor=_}if(c.contains_9u06oy$($(Ir))){var v,b;if(null==(b=null==(v=c.componentManager.getComponents_ahlfl2$(c).get_11rb$($(Ir)))||e.isType(v,Ir)?v:P()))throw I("Component "+$(Ir).simpleName+" is not found");u=b}else u=null;if(null!=(l=u)){var w;if(c.contains_9u06oy$($(im))){var x,k;if(null==(k=null==(x=c.componentManager.getComponents_ahlfl2$(c).get_11rb$($(im)))||e.isType(x,im)?x:P()))throw I("Component "+$(im).simpleName+" is not found");w=k}else{var C=new im;c.add_57nep2$(C),w=C}w.dimension=Qt(Mi(new N(l.size,l.size)),a.scalingSizeFactor)}}},Tr.$metadata$={kind:m,simpleName:"ChartElementScalingSystem",interfaces:[Ls]},Object.defineProperty(Or.prototype,"location",{configurable:!0,get:function(){return null==this.location_4dtecb$_0?A("location"):this.location_4dtecb$_0},set:function(t){this.location_4dtecb$_0=t}}),Or.$metadata$={kind:m,simpleName:"ChartElementLocationComponent",interfaces:[qs]},Nr.$metadata$={kind:m,simpleName:"ChartElementComponent",interfaces:[qs]},Object.defineProperty(Pr.prototype,"textSpec",{configurable:!0,get:function(){return null==this.textSpec_f9xlil$_0?A("textSpec"):this.textSpec_f9xlil$_0},set:function(t){this.textSpec_f9xlil$_0=t}}),Pr.$metadata$={kind:m,simpleName:"TextSpecComponent",interfaces:[qs]},Ir.$metadata$={kind:m,simpleName:"PointComponent",interfaces:[qs]},Ar.$metadata$={kind:m,simpleName:"PieSpecComponent",interfaces:[qs]},jr.prototype.outerArcPoint_14dthe$=function(t){return this.arcPoint_0(this.radius,t)},jr.prototype.innerArcPoint_14dthe$=function(t){return this.arcPoint_0(this.holeRadius,t)},jr.prototype.arcPoint_0=function(t,e){return this.sectorCenter.add_gpjtzr$(new N(t*et.cos(e),t*et.sin(e)))},jr.$metadata$={kind:m,simpleName:"Sector",interfaces:[]},Rr.prototype.computeSectors_0=function(t,e){var n,i,o=(n=te(t.sliceValues),i=t,function(t){var e;return e=0===n?1/i.sliceValues.size:et.abs(t)/n,2*Yt.PI*e}),r={v:-Yt.PI/2};r.v-=o(ee(t.sliceValues));var a,s=t.radius*e,l=Vt(t.sliceValues),u=It(Pt(l,10));for(a=l.iterator();a.hasNext();){var c,p,h,_=a.next(),d=u.add_11rb$,f=new jr(t.indices.get_za3lpa$(_),s,s*t.holeSize,t.colors.get_za3lpa$(_),r.v,r.v+o(t.sliceValues.get_za3lpa$(_)),null!=(h=null!=(p=null!=(c=t.explodeValues)?c.get_za3lpa$(_):null)?s*p:null)?h:0);r.v=f.endAngle,d.call(u,f)}return u},Lr.prototype.render_j83es7$=function(t,n){var i,o;if(null==(o=null==(i=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(Nr)))||e.isType(i,Nr)?i:P()))throw I("Component "+$(Nr).simpleName+" is not found");var r,a,s=o;if(null==(a=null==(r=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(Ar)))||e.isType(r,Ar)?r:P()))throw I("Component "+$(Ar).simpleName+" is not found");var l,u,c,p=a,_=(u=n,c=s,function(t){u.setFillStyle_2160e9$(Oa().changeAlphaWithMin_umlfxr$(t.fillColor,c.scalingAlphaValue)),u.beginPath();var e=u;e.arc_6p3vsx$(t.sectorCenter.x,t.sectorCenter.y,t.holeRadius,t.startAngle,t.endAngle),e.arc_6p3vsx$(t.sectorCenter.x,t.sectorCenter.y,t.radius,t.endAngle,t.startAngle,!0),u.fill()}),d=function(t,e){return function(n){if(null!=t.strokeColor&&0!==t.strokeWidth){var i=e,o=t;i.setStrokeStyle_2160e9$(Oa().changeAlphaWithMin_umlfxr$(h(o.strokeColor),o.scalingAlphaValue)),i.setLineWidth_14dthe$(o.strokeWidth),i.beginPath();var r=n.sectorCenter.x,a=n.sectorCenter.y,s=n.holeRadius;i.arc_6p3vsx$(r,a,et.max(0,s),n.startAngle,n.endAngle),i.stroke(),i.beginPath(),i.arc_6p3vsx$(n.sectorCenter.x,n.sectorCenter.y,n.radius,n.startAngle,n.endAngle),i.stroke(),i.beginPath(),i.moveTo_lu1900$(n.innerArcStart.x,n.innerArcStart.y),i.lineTo_lu1900$(n.outerArcStart.x,n.outerArcStart.y),i.stroke(),i.beginPath(),i.moveTo_lu1900$(n.innerArcEnd.x,n.innerArcEnd.y),i.lineTo_lu1900$(n.outerArcEnd.x,n.outerArcEnd.y),i.stroke()}}}(s,n);for(l=Ur().computeSectors_0(p,s.scalingSizeFactor).iterator();l.hasNext();){var f=l.next();_(f),d(f)}},Lr.$metadata$={kind:m,simpleName:"Renderer",interfaces:[T_]},zr.prototype.search_t1r7fu$=function(t,n){if(!n.contains_tv8pd9$(Br().LOCATABLE_COMPONENTS))return null;var i,o;if(null==(o=null==(i=n.componentManager.getComponents_ahlfl2$(n).get_11rb$($(Nr)))||e.isType(i,Nr)?i:P()))throw I("Component "+$(Nr).simpleName+" is not found");var r,a,s=o;if(null==(a=null==(r=n.componentManager.getComponents_ahlfl2$(n).get_11rb$($(Ar)))||e.isType(r,Ar)?r:P()))throw I("Component "+$(Ar).simpleName+" is not found");var l,u=a;for(l=Ur().computeSectors_0(u,s.scalingSizeFactor).iterator();l.hasNext();){var c,p,h,_=l.next();if(null==(p=null==(c=n.componentManager.getComponents_ahlfl2$(n).get_11rb$($(Xf)))||e.isType(c,Xf)?c:P()))throw I("Component "+$(Xf).simpleName+" is not found");for(h=p.origins.iterator();h.hasNext();){var d=h.next(),f=B(d).add_gpjtzr$(_.sectorCenter);if(this.isCoordinateInPieSector_0(t,Mi(f),_.holeRadius,_.radius,_.startAngle,_.endAngle)){var m,y;if(null==(y=null==(m=n.componentManager.getComponents_ahlfl2$(n).get_11rb$($(Am)))||e.isType(m,Am)?m:P()))throw I("Component "+$(Am).simpleName+" is not found");return new t$(y.layerIndex,_.index)}}}return null},zr.prototype.isCoordinateInTarget_t1r7fu$=function(t,e){throw new ne},zr.prototype.isCoordinateInPieSector_0=function(t,e,n,i,o,r){if(!ie(n,i).contains_mef7kx$(Fm().distance_2d1svq$(t,e)))return!1;var a,s=Fm().calculateAngle_2d1svq$(e,t),l=ie(-Yt.PI/2,Yt.PI).contains_mef7kx$(s);if(l&&(l=et.abs(o)>Yt.PI),l)a=s-2*Yt.PI;else{var u=ie(-Yt.PI,-Yt.PI/2).contains_mef7kx$(s);u&&(u=et.abs(r)>Yt.PI),a=u?s+2*Yt.PI:s}return o<=a&&a=0)return t.endIndex=r,void(t.interpolatedPoint=null);if((r=~r-1|0)==(i.size-1|0))return t.endIndex=r,void(t.interpolatedPoint=null);var a=i.get_za3lpa$(r),s=i.get_za3lpa$(r+1|0)-a;if(s>2){var l=(n-a/o)/(s/o),u=e.get_za3lpa$(r),c=e.get_za3lpa$(r+1|0);t.endIndex=r,t.interpolatedPoint=p(u.x+(c.x-u.x)*l,u.y+(c.y-u.y)*l)}else t.endIndex=r,t.interpolatedPoint=null},Gr.$metadata$={kind:l,simpleName:"Companion",interfaces:[]};var Kr=null;function Vr(){return null===Kr&&new Gr,Kr}function Yr(){this.animationId=0,this.lengthIndex=ot(),this.length=0,this.endIndex=0,this.interpolatedPoint=null}function Wr(){}Hr.$metadata$={kind:m,simpleName:"GrowingPathEffectSystem",interfaces:[Ls]},Yr.$metadata$={kind:m,simpleName:"GrowingPathEffectComponent",interfaces:[qs]},Wr.prototype.render_j83es7$=function(t,n){var i,o,r;if(t.contains_9u06oy$($(Qh))){var a,s;if(null==(s=null==(a=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(Nr)))||e.isType(a,Nr)?a:P()))throw I("Component "+$(Nr).simpleName+" is not found");var l,u,c=s;if(null==(u=null==(l=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(Qh)))||e.isType(l,Qh)?l:P()))throw I("Component "+$(Qh).simpleName+" is not found");var p,h,_=u.geometry;if(null==(h=null==(p=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(Yr)))||e.isType(p,Yr)?p:P()))throw I("Component "+$(Yr).simpleName+" is not found");var d=h;for(n.setStrokeStyle_2160e9$(c.strokeColor),n.setLineWidth_14dthe$(c.strokeWidth),n.beginPath(),i=_.iterator();i.hasNext();){var f=i.next().get_za3lpa$(0),m=f.get_za3lpa$(0);n.moveTo_lu1900$(m.x,m.y),o=d.endIndex;for(var y=1;y<=o;y++)m=f.get_za3lpa$(y),n.lineTo_lu1900$(m.x,m.y);null!=(r=d.interpolatedPoint)&&n.lineTo_lu1900$(r.x,r.y)}n.stroke()}},Wr.$metadata$={kind:m,simpleName:"GrowingPathRenderer",interfaces:[T_]},qr.$metadata$={kind:l,simpleName:"GrowingPathEffect",interfaces:[]};var Xr,Zr,Jr,Qr,ta,ea=null;function na(){return null===ea&&new qr,ea}function ia(){ba=this}function oa(t){this.shape_0=t}function ra(){}function aa(){}function sa(t,e,n,i){ga(),this.angle=t,this.length=e,this.end=n,this.type=i}function la(t,e){ce.call(this),this.name$=t,this.ordinal$=e}function ua(){ua=function(){},Xr=new la("LAST",0),Zr=new la("FIRST",1),Jr=new la("BOTH",2)}function ca(){return ua(),Xr}function pa(){return ua(),Zr}function ha(){return ua(),Jr}function _a(t,e){ce.call(this),this.name$=t,this.ordinal$=e}function da(){da=function(){},Qr=new _a("OPEN",0),ta=new _a("CLOSED",1)}function fa(){return da(),Qr}function ma(){return da(),ta}function $a(){ya=this}ia.prototype.drawLines_2iqieo$=function(t,e,n){var i,o;for(i=t.iterator();i.hasNext();)for(o=i.next().iterator();o.hasNext();){var r,a=o.next();for($_(e,a.get_za3lpa$(0)),r=ae(a,1).iterator();r.hasNext();)y_(e,r.next())}n(e)},oa.prototype.render_j83es7$=function(t,n){var i,o;if(null==(o=null==(i=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(Nr)))||e.isType(i,Nr)?i:P()))throw I("Component "+$(Nr).simpleName+" is not found");var r,a,s=o;if(null==(a=null==(r=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(Ir)))||e.isType(r,Ir)?r:P()))throw I("Component "+$(Ir).simpleName+" is not found");var l=a.size*s.scalingSizeFactor/2;n.beginPath(),Oa().drawPath_iz58c6$(n,l,this.shape_0),null!=s.fillColor&&(n.setFillStyle_2160e9$(Oa().changeAlphaWithMin_umlfxr$(h(s.fillColor),s.scalingAlphaValue)),n.fill()),null==s.strokeColor||se(s.strokeWidth)||(n.setStrokeStyle_2160e9$(Oa().changeAlphaWithMin_umlfxr$(h(s.strokeColor),s.scalingAlphaValue)),n.setLineWidth_14dthe$(s.strokeWidth),n.stroke())},oa.$metadata$={kind:m,simpleName:"PointRenderer",interfaces:[T_]},ra.prototype.render_j83es7$=function(t,n){if(t.contains_9u06oy$($(Qh))){if(n.save(),t.contains_9u06oy$($(Yh))){var i,o;if(null==(o=null==(i=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(Yh)))||e.isType(i,Yh)?i:P()))throw I("Component "+$(Yh).simpleName+" is not found");var r=o.scale;1!==r&&n.scale_lu1900$(r,r)}var a,s;if(null==(s=null==(a=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(Nr)))||e.isType(a,Nr)?a:P()))throw I("Component "+$(Nr).simpleName+" is not found");var l=s;n.setLineJoin_v2gigt$(le.ROUND),n.beginPath();var u,c,p=wa();if(null==(c=null==(u=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(Qh)))||e.isType(u,Qh)?u:P()))throw I("Component "+$(Qh).simpleName+" is not found");p.drawLines_2iqieo$(c.geometry,n,(_=l,function(t){return t.closePath(),null!=_.fillColor&&(t.setFillStyle_2160e9$(Oa().changeAlphaWithMin_umlfxr$(h(_.fillColor),_.scalingAlphaValue)),t.fill()),null!=_.strokeColor&&0!==_.strokeWidth&&(t.setStrokeStyle_2160e9$(Oa().changeAlphaWithMin_umlfxr$(h(_.strokeColor),_.scalingAlphaValue)),t.setLineWidth_14dthe$(_.strokeWidth*_.scalingSizeFactor),t.stroke()),j})),n.restore()}var _},ra.$metadata$={kind:m,simpleName:"PolygonRenderer",interfaces:[T_]},aa.prototype.render_j83es7$=function(t,n){var i;if(t.contains_9u06oy$($(Qh))){var o,r;if(null==(r=null==(o=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(Qh)))||e.isType(o,Qh)?o:P()))throw I("Component "+$(Qh).simpleName+" is not found");var a,s,l=r.geometry;if(null==(s=null==(a=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(Nr)))||e.isType(a,Nr)?a:P()))throw I("Component "+$(Nr).simpleName+" is not found");var u=s,c=Oa().changeAlphaWithMin_umlfxr$(h(u.strokeColor),u.scalingAlphaValue);n.setStrokeStyle_2160e9$(c);var p,_=h(u.lineDash),d=It(_.length);for(p=0;p!==_.length;++p){var f=_[p];d.add_11rb$(f*u.scalingSizeFactor)}n.setLineDash_gf7tl1$(dt(d)),n.setLineWidth_14dthe$(u.strokeWidth*u.scalingSizeFactor),n.beginPath(),wa().drawLines_2iqieo$(l,n,D("stroke",(function(t){return t.stroke(),j}))),null!=(i=u.arrowSpec)&&this.drawArrows_0(i,l,c,u.scalingSizeFactor,n)}},Object.defineProperty(sa.prototype,"isOnFirstEnd",{configurable:!0,get:function(){return this.end===pa()||this.end===ha()}}),Object.defineProperty(sa.prototype,"isOnLastEnd",{configurable:!0,get:function(){return this.end===ca()||this.end===ha()}}),sa.prototype.createGeometry_6y0v78$=function(t,e,n,i){var o=Float64Array,r=this.length*i,a=t-this.angle,s=e-r*et.cos(a),l=this.length*i,u=t+this.angle,c=new o([s,e,e-l*et.cos(u)]),p=Float64Array,h=this.length*i,_=t-this.angle,d=n-h*et.sin(_),f=this.length*i,m=t+this.angle,$=new p([d,n,n-f*et.sin(m)]);return ue(c,$)},la.$metadata$={kind:m,simpleName:"End",interfaces:[ce]},la.values=function(){return[ca(),pa(),ha()]},la.valueOf_61zpoe$=function(t){switch(t){case"LAST":return ca();case"FIRST":return pa();case"BOTH":return ha();default:pe("No enum constant jetbrains.livemap.chart.Renderers.PathRenderer.ArrowSpec.End."+t)}},_a.$metadata$={kind:m,simpleName:"Type",interfaces:[ce]},_a.values=function(){return[fa(),ma()]},_a.valueOf_61zpoe$=function(t){switch(t){case"OPEN":return fa();case"CLOSED":return ma();default:pe("No enum constant jetbrains.livemap.chart.Renderers.PathRenderer.ArrowSpec.Type."+t)}},$a.prototype.create_jtt7dg$=function(t,e,n,i){var o,r;if(null==t||null==e)return null;switch(n){case"last":o=ca();break;case"first":o=pa();break;case"both":o=ha();break;default:throw _t("Expected: first|last|both")}var a=o;switch(i){case"open":r=fa();break;case"closed":r=ma();break;default:throw _t("Expected: open|closed")}return new sa(t,e,a,r)},$a.$metadata$={kind:l,simpleName:"Companion",interfaces:[]};var ya=null;function ga(){return null===ya&&new $a,ya}function va(){}sa.$metadata$={kind:m,simpleName:"ArrowSpec",interfaces:[]},aa.prototype.drawArrows_0=function(t,e,n,i,o){var r,a,s,l,u,c=(s=o,l=i,u=n,function(t,e){if(!(t.size<2)){var n=t.get_za3lpa$(0),i=t.get_za3lpa$(1),o=i.x-n.x,r=i.y-n.y;if(0!==o||0!==r){s.beginPath(),s.setLineDash_gf7tl1$(new Float64Array([]));var a=et.atan2(r,o),c=e.createGeometry_6y0v78$(a,i.x,i.y,l),p=c.component1(),h=c.component2();s.moveTo_lu1900$(p[0],h[0]);for(var _=1;_<=2;_++)s.lineTo_lu1900$(p[_],h[_]);e.type===ma()&&(s.closePath(),s.setFillStyle_2160e9$(u),s.fill()),s.stroke()}}});for(r=e.iterator();r.hasNext();)for(a=r.next().iterator();a.hasNext();){var p=a.next();t.isOnFirstEnd&&c(_e(he(p,2)),t),t.isOnLastEnd&&c(de(p,2),t)}},aa.$metadata$={kind:m,simpleName:"PathRenderer",interfaces:[T_]},va.prototype.render_j83es7$=function(t,n){var i,o,r,a;if(null==(a=null==(r=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(Nr)))||e.isType(r,Nr)?r:P()))throw I("Component "+$(Nr).simpleName+" is not found");var s,l,u=a;if(null==(l=null==(s=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(Pr)))||e.isType(s,Pr)?s:P()))throw I("Component "+$(Pr).simpleName+" is not found");var c,_,d,f=l.textSpec;if(n.save(),n.rotate_14dthe$(f.angle),f.drawBorder){var m=f.rectangle;this.drawRoundedRectangle_0(m,f.labelRadius*m.height,n),null!=u.fillColor&&(n.setFillStyle_2160e9$(Oa().changeAlphaWithMin_umlfxr$(h(u.fillColor),u.scalingAlphaValue)),n.fill()),null!=u.strokeColor&&0!==f.labelSize&&(n.setStrokeStyle_2160e9$(u.strokeColor),n.setLineWidth_14dthe$(f.labelSize),n.stroke()),o=0===(i=f.hjust)?f.padding:1===i?-f.padding:0,c=p(o,m.origin.y+f.padding+.8*f.font.fontSize)}else{var y,g;y=1===(g=f.vjust)?.7*f.font.fontSize:0===g?-f.textSize.y+f.font.fontSize:-f.textSize.y/2+.8*f.font.fontSize,c=p(0,y)}n.setFont_ov8mpe$(f.font),n.setFillStyle_2160e9$(u.strokeColor),n.setTextAlign_iwro1z$(f.textAlign);var v=0;for(_=f.lines.iterator();_.hasNext();){var b=_.next(),w=c;n.fillText_ai6r6m$(b,w.x,w.y+f.lineHeight*fe((v=(d=v)+1|0,d)))}n.restore()},va.prototype.drawRoundedRectangle_0=function(t,e,n){n.beginPath();var i=t.width/2,o=t.height/2,r=et.min(e,i,o);n.moveTo_lu1900$(t.right-r,t.bottom),n.bezierCurveTo_15yvbs$(t.right-r,t.bottom,t.right,t.bottom,t.right,t.bottom-r),n.lineTo_lu1900$(t.right,t.top+r),n.bezierCurveTo_15yvbs$(t.right,t.top+r,t.right,t.top,t.right-r,t.top),n.lineTo_lu1900$(t.left+r,t.top),n.bezierCurveTo_15yvbs$(t.left+r,t.top,t.left,t.top,t.left,t.top+r),n.lineTo_lu1900$(t.left,t.bottom-r),n.bezierCurveTo_15yvbs$(t.left,t.bottom-r,t.left,t.bottom,t.left+r,t.bottom),n.closePath()},va.$metadata$={kind:m,simpleName:"TextRenderer",interfaces:[T_]},ia.$metadata$={kind:l,simpleName:"Renderers",interfaces:[]};var ba=null;function wa(){return null===ba&&new ia,ba}function xa(t,n,i,o,r,a,s,l,u,c,p,h,_){this.hjust=a,this.vjust=s,this.drawBorder=u,this.labelRadius=p,this.labelSize=h;var d,f,m,$=me(t,e.charArrayOf(10)),y=It(Pt($,10));for(d=$.iterator();d.hasNext();){var g,v=d.next();y.add_11rb$($e(e.isCharSequence(g=v)?g:P()).toString())}this.lines=y,this.font=new Kt(M.CssStyleUtil.extractFontStyle_pdl1vz$(n),M.CssStyleUtil.extractFontWeight_pdl1vz$(n),i,o),this.dimension=null,this.angle=Nt(-r),this.lineHeight=_*i,this.textSize=l.measure_qzozgn$(this.lines,this.font,this.lineHeight),m=0===(f=this.hjust)?Gt.START:1===f?Gt.END:Gt.CENTER,this.textAlign=m,this.padding=this.font.fontSize*c,this.rectangle=null,this.dimension=this.rotateTextSize_0(this.textSize.mul_14dthe$(2),this.angle);var b=this.textSize.x+2*this.padding,w=this.textSize.y+2*this.padding;this.rectangle=Y(-b*this.hjust,-w*(1-this.vjust),b,w)}function ka(){Ta=this}xa.prototype.rotateTextSize_0=function(t,e){var n=new N(t.x/2,+t.y/2).rotate_14dthe$(e),i=new N(t.x/2,-t.y/2).rotate_14dthe$(e),o=n.x,r=et.abs(o),a=i.x,s=et.abs(a),l=et.max(r,s),u=n.y,c=et.abs(u),h=i.y,_=et.abs(h),d=et.max(c,_);return p(2*l,2*d)},xa.$metadata$={kind:m,simpleName:"TextSpec",interfaces:[]},ka.prototype.drawPath_iz58c6$=function(t,e,n){switch(n){case 0:case 15:case 22:this.square_mics58$(t,e);break;case 1:case 16:case 19:case 20:case 21:this.circle_mics58$(t,e);break;case 2:case 17:case 24:this.triangleUp_mics58$(t,e);break;case 3:this.plus_mics58$(t,e);break;case 4:this.cross_mics58$(t,e);break;case 5:case 18:case 23:this.diamond_mics58$(t,e);break;case 6:case 25:this.triangleDown_mics58$(t,e);break;case 7:this.square_mics58$(t,e),this.cross_mics58$(t,e);break;case 8:this.plus_mics58$(t,e),this.cross_mics58$(t,e);break;case 9:this.diamond_mics58$(t,e),this.plus_mics58$(t,e);break;case 10:this.circle_mics58$(t,e),this.plus_mics58$(t,e);break;case 11:this.triangleUp_mics58$(t,e),this.triangleDown_mics58$(t,e);break;case 12:this.square_mics58$(t,e),this.plus_mics58$(t,e);break;case 13:this.circle_mics58$(t,e),this.cross_mics58$(t,e);break;case 14:this.squareTriangle_mics58$(t,e);break;default:throw I("Unknown point shape")}},ka.prototype.circle_mics58$=function(t,e){t.arc_6p3vsx$(0,0,e,0,2*Yt.PI)},ka.prototype.square_mics58$=function(t,e){t.moveTo_lu1900$(-e,-e),t.lineTo_lu1900$(e,-e),t.lineTo_lu1900$(e,e),t.lineTo_lu1900$(-e,e),t.lineTo_lu1900$(-e,-e)},ka.prototype.squareTriangle_mics58$=function(t,e){t.moveTo_lu1900$(-e,e),t.lineTo_lu1900$(0,-e),t.lineTo_lu1900$(e,e),t.lineTo_lu1900$(-e,e),t.lineTo_lu1900$(-e,-e),t.lineTo_lu1900$(e,-e),t.lineTo_lu1900$(e,e)},ka.prototype.triangleUp_mics58$=function(t,e){var n=3*e/et.sqrt(3);t.moveTo_lu1900$(0,-e),t.lineTo_lu1900$(n/2,e/2),t.lineTo_lu1900$(-n/2,e/2),t.lineTo_lu1900$(0,-e)},ka.prototype.triangleDown_mics58$=function(t,e){var n=3*e/et.sqrt(3);t.moveTo_lu1900$(0,e),t.lineTo_lu1900$(-n/2,-e/2),t.lineTo_lu1900$(n/2,-e/2),t.lineTo_lu1900$(0,e)},ka.prototype.plus_mics58$=function(t,e){t.moveTo_lu1900$(0,-e),t.lineTo_lu1900$(0,e),t.moveTo_lu1900$(-e,0),t.lineTo_lu1900$(e,0)},ka.prototype.cross_mics58$=function(t,e){t.moveTo_lu1900$(-e,-e),t.lineTo_lu1900$(e,e),t.moveTo_lu1900$(-e,e),t.lineTo_lu1900$(e,-e)},ka.prototype.diamond_mics58$=function(t,e){t.moveTo_lu1900$(0,-e),t.lineTo_lu1900$(e,0),t.lineTo_lu1900$(0,e),t.lineTo_lu1900$(-e,0),t.lineTo_lu1900$(0,-e)},ka.prototype.changeAlphaWithMin_umlfxr$=function(t,e){var n,i,o;if(null!=e){var r=t.alpha;o=et.min(e,r)}else o=null;return null!=(i=null!=(n=o)?D("changeAlpha",function(t,e){return t.changeAlpha_za3lpa$(e)}.bind(null,t))(n):null)?i:t},ka.$metadata$={kind:l,simpleName:"Utils",interfaces:[]};var Ca,Ea,Sa,Ta=null;function Oa(){return null===Ta&&new ka,Ta}function Na(t){var e=new Wa(t,Ea);return e.reverseY=!0,e.create()}function Pa(t){za(),this.devParams_0=t}function Ia(){La=this,this.ENABLE_SCALING=new Ka("scalable_symbols",!0),this.SHOW_RESET_POSITION_ACTION=new Ka("show_reset_position_action",!0),this.PERF_STATS=new Ka("perf_stats",!1),this.DEBUG_TILES=new Ka("debug_tiles",!1),this.DEBUG_GRID=new Ka("debug_grid",!1),this.TILE_CACHE_LIMIT=new Ha("tile_cache_limit",36),this.FRAGMENT_ACTIVE_DOWNLOADS_LIMIT=new Ha("fragment_active_downaloads_limit",30),this.FRAGMENT_CACHE_LIMIT=new Ha("fragment_cache_limit",500),this.COMPUTATION_PROJECTION_QUANT=new Ha("computation_projection_quant",1e3),this.COMPUTATION_FRAME_TIME=new Ha("computation_frame_time",28),this.UPDATE_PAUSE_MS=new Ha("update_pause_ms",0),this.UPDATE_TIME_MULTIPLIER=new Ga("update_time_multiplier",1),this.RENDER_TARGET=new Va("render_target",xc(),T([new ge("offscreen_layers",xc()),new ge("screen_layers",kc())])),this.MICRO_TASK_EXECUTOR=new Va("microtask_executor",Ua(),T([new ge("ui_thread",Ba()),new ge("background",Fa()),new ge("auto",Ua())]))}Ia.$metadata$={kind:l,simpleName:"Companion",interfaces:[]};var Aa,Ra,ja,La=null;function za(){return null===La&&new Ia,La}function Da(t,e){ce.call(this),this.name$=t,this.ordinal$=e}function Ma(){Ma=function(){},Aa=new Da("UI_THREAD",0),Ra=new Da("BACKGROUND",1),ja=new Da("AUTO",2)}function Ba(){return Ma(),Aa}function Fa(){return Ma(),Ra}function Ua(){return Ma(),ja}function qa(t,e){this.key=t,this.defaultValue_0=e}function Ha(t,e){this.key=t,this.defaultValue_0=e}function Ga(t,e){this.key=t,this.defaultValue_0=e}function Ka(t,e){this.key=t,this.defaultValue_0=e}function Va(t,e,n){this.key=t,this.defaultValue_0=e,this.valuesMap_0=n}function Ya(t){this.liveMap_0=t,this.myBounds_0=new K(Ce(0,0,0,0)),this.myLiveMapPresenter_0=$r()}function Wa(t,e){this.geoProjection_0=t,this.mapRect_0=e,this.reverseX=!1,this.reverseY=!1}function Xa(t){this.closure$offset=t}function Za(t,e){this.closure$t1=t,this.closure$t2=e}function Ja(t,e){this.closure$t1=t,this.closure$t2=e}function Qa(t,e){this.closure$t1=t,this.closure$t2=e}function ts(t,e){this.closure$proj=t,this.this$MapProjectionBuilder=e}function es(){this.head_0=null}function ns(t,e,n){this.myItem_8be2vx$=t,this.myPrev_8be2vx$=e,this.myNext_8be2vx$=n}function is(t){this.$outer=t,Pe.call(this),this.node_0=this.$outer.head_0,this.last_0=null}function os(t){return t=t||Object.create(es.prototype),es.call(t),t}function rs(t){this.limit_0=t,this.map_0=rt(),this.head_0=null,this.tail_0=null}function as(t,e,n,i){this.myKey_8be2vx$=t,this.myItem_8be2vx$=e,this.myPrev_8be2vx$=n,this.myNext_8be2vx$=i}function ss(t){this.comparator_0=t,this.queue_0=S()}function ls(t){return new us(t)}function us(t){je.call(this),this.item_0=t}function cs(t){Pe.call(this),this.value_0=t,this.requested_0=!1}function ps(){}Da.$metadata$={kind:m,simpleName:"MicroTaskExecutor",interfaces:[ce]},Da.values=function(){return[Ba(),Fa(),Ua()]},Da.valueOf_61zpoe$=function(t){switch(t){case"UI_THREAD":return Ba();case"BACKGROUND":return Fa();case"AUTO":return Ua();default:pe("No enum constant jetbrains.livemap.config.DevParams.MicroTaskExecutor."+t)}},Pa.prototype.isSet_1a54na$=function(t){return t.isSet_nz6vj6$(this)},Pa.prototype.read_zgynif$=function(t){return t.read_5pp8sb$(this)},Pa.prototype.read_366xgz$=function(t){return t.read_5pp8sb$(this)},Pa.prototype.read_4y4ucz$=function(t){return t.read_5pp8sb$(this)},Pa.prototype.read_m9w1rv$=function(t){return t.read_5pp8sb$(this)},Pa.prototype.get_0=function(t){var n,i=this.devParams_0;return(e.isType(n=i,ke)?n:P()).get_11rb$(t)},qa.prototype.read_5pp8sb$=function(t){var e=t.get_0(this.key);if(null==e)return this.defaultValue_0;if("string"==typeof e)return e;throw I("".toString())},qa.$metadata$={kind:m,simpleName:"StringParam",interfaces:[]},Ha.prototype.read_5pp8sb$=function(t){var n=t.get_0(this.key);if(null==n)return this.defaultValue_0;if(e.isNumber(n))return E(n);throw I("".toString())},Ha.$metadata$={kind:m,simpleName:"IntParam",interfaces:[]},Ga.prototype.read_5pp8sb$=function(t){var n=t.get_0(this.key);if(null==n)return this.defaultValue_0;if(e.isNumber(n))return ve(n);throw be()},Ga.$metadata$={kind:m,simpleName:"DoubleParam",interfaces:[]},Ka.prototype.isSet_nz6vj6$=function(t){var e=t.get_0(this.key);if(null==e)return this.defaultValue_0;if("boolean"==typeof e)return e;if("string"==typeof e)return we(e);throw be()},Ka.$metadata$={kind:m,simpleName:"BoolParam",interfaces:[]},Va.prototype.fromString_0=function(t){var e;for(e=this.valuesMap_0.iterator();e.hasNext();){var n=e.next(),i=n.component1(),o=n.component2();if(xe(i,t,!0))return o}throw be()},Va.prototype.read_5pp8sb$=function(t){var e=t.get_0(this.key);if(null==e)return this.defaultValue_0;if("string"==typeof e)return this.fromString_0(e);throw be()},Va.$metadata$={kind:m,simpleName:"EnumParam",interfaces:[]},Pa.$metadata$={kind:m,simpleName:"DevParams",interfaces:[]},Object.defineProperty(Ya.prototype,"isLoading",{configurable:!0,get:function(){return this.myLiveMapPresenter_0.isLoading}}),Ya.prototype.setBounds_vfns7u$=function(t){this.myBounds_0.set_11rb$(t)},Ya.prototype.bounds=function(){return this.myBounds_0},Ya.prototype.mapToCanvas_49gm0j$=function(t){return this.myLiveMapPresenter_0.render_62iii2$(t,this.liveMap_0),H.Companion.from_gg3y3y$(this.myLiveMapPresenter_0)},Ya.$metadata$={kind:m,simpleName:"LiveMapCanvasFigure",interfaces:[Ee]},Xa.prototype.project_11rb$=function(t){return t-this.closure$offset},Xa.prototype.invert_11rc$=function(t){return t+this.closure$offset},Xa.$metadata$={kind:m,interfaces:[tp]},Wa.prototype.offset_0=function(t){return new Xa(t)},Za.prototype.project_11rb$=function(t){var e;return null!=(e=D("project",function(t,e){return t.project_11rb$(e)}.bind(null,this.closure$t1))(t))?D("project",function(t,e){return t.project_11rb$(e)}.bind(null,this.closure$t2))(e):null},Za.prototype.invert_11rc$=function(t){var e;return null!=(e=D("invert",function(t,e){return t.invert_11rc$(e)}.bind(null,this.closure$t2))(t))?D("invert",function(t,e){return t.invert_11rc$(e)}.bind(null,this.closure$t1))(e):null},Za.$metadata$={kind:m,interfaces:[Qc]},Wa.prototype.composite_0=function(t,e){return new Za(t,e)},Ja.prototype.project_11rb$=function(t){var e;return null!=(e=D("project",function(t,e){return t.project_11rb$(e)}.bind(null,this.closure$t1))(t))?D("project",function(t,e){return t.project_11rb$(e)}.bind(null,this.closure$t2))(e):null},Ja.prototype.invert_11rc$=function(t){var e;return null!=(e=D("invert",function(t,e){return t.invert_11rc$(e)}.bind(null,this.closure$t2))(t))?D("invert",function(t,e){return t.invert_11rc$(e)}.bind(null,this.closure$t1))(e):null},Ja.$metadata$={kind:m,interfaces:[Qc]},Wa.prototype.composite_1=function(t,e){return new Ja(t,e)},Qa.prototype.project_11rb$=function(t){var e=D("project",function(t,e){return t.project_11rb$(e)}.bind(null,this.closure$t1))(t);return D("project",function(t,e){return t.project_11rb$(e)}.bind(null,this.closure$t2))(e)},Qa.prototype.invert_11rc$=function(t){var e=D("invert",function(t,e){return t.invert_11rc$(e)}.bind(null,this.closure$t2))(t);return D("invert",function(t,e){return t.invert_11rc$(e)}.bind(null,this.closure$t1))(e)},Qa.$metadata$={kind:m,interfaces:[tp]},Wa.prototype.composite_2=function(t,e){return new Qa(t,e)},Wa.prototype.linear_0=function(t,e){return this.composite_2(this.offset_0(t),rp().scale_d4mmvr$((n=e,function(){return n})));var n},ts.prototype.project_11rb$=function(t){return this.closure$proj.project_11rb$(t)},ts.prototype.invert_11rc$=function(t){return this.closure$proj.invert_11rc$(t)},Object.defineProperty(ts.prototype,"mapRect",{configurable:!0,get:function(){return this.this$MapProjectionBuilder.mapRect_0}}),ts.$metadata$={kind:m,interfaces:[E_]},Wa.prototype.create=function(){var t,n;if(null==(t=Tt.Transforms.transformBBox_3w2x7e$(this.geoProjection_0.validRect(),D("project",function(t,e){return t.project_11rb$(e)}.bind(null,this.geoProjection_0)))))throw I("Unable to transform projection valid rect".toString());var i=t,o=xt(this.mapRect_0)/xt(i),r=Et(this.mapRect_0)/Et(i),a=et.min(o,r),l=e.isType(n=Qt(this.mapRect_0.dimension,1/a),s)?n:P(),u=new kt(Se(it(i),Qt(l,.5)),l),c=this.reverseX?Te(u):wt(u),p=this.reverseX?-a:a,h=this.reverseY?Oe(u):Ct(u),_=this.reverseY?-a:a,d=rp().tuple_bkiy7g$(this.linear_0(c,p),this.linear_0(h,_));return new ts(this.composite_1(this.geoProjection_0,d),this)},Wa.$metadata$={kind:m,simpleName:"MapProjectionBuilder",interfaces:[]},es.prototype.iterator=function(){return new is(this)},Object.defineProperty(es.prototype,"size",{configurable:!0,get:function(){for(var t=0,e=this.head_0;null!=e;)e=e.myNext_8be2vx$,t=t+1|0;return t}}),es.prototype.get_za3lpa$=function(t){return this.getNodeByIndex_0(t).myItem_8be2vx$},es.prototype.append_11rb$=function(t){var e=this.lastNode_0();null==e?this.head_0=new ns(t,null,null):e.myNext_8be2vx$=new ns(t,e,null)},es.prototype.prepend_11rb$=function(t){var e,n=new ns(t,null,this.head_0);null!=(e=this.head_0)&&(e.myPrev_8be2vx$=n),this.head_0=n},es.prototype.isEmpty=function(){return null==this.head_0},es.prototype.isNotEmpty=function(){return null!=this.head_0},es.prototype.remove_0=function(t){var e,n,i;return _(t,this.head_0)?(this.head_0=h(this.head_0).myNext_8be2vx$,null!=(e=this.head_0)&&(e.myPrev_8be2vx$=null)):(null!=(n=t.myPrev_8be2vx$)&&(n.myNext_8be2vx$=t.myNext_8be2vx$),null!=(i=t.myNext_8be2vx$)&&(i.myPrev_8be2vx$=t.myPrev_8be2vx$)),t.myItem_8be2vx$},es.prototype.remove_za3lpa$=function(t){return this.remove_0(this.getNodeByIndex_0(t))},es.prototype.removeFirst=function(){return this.remove_za3lpa$(0)},es.prototype.removeLast=function(){return this.remove_za3lpa$(this.size-1|0)},es.prototype.lastNode_0=function(){var t;if(null==(t=this.head_0))return null;for(var e=t;null!=e.myNext_8be2vx$;)e=h(e.myNext_8be2vx$);return e},es.prototype.getNodeByIndex_0=function(t){var e;if(null==(e=this.head_0))throw Ne();for(var n={v:e},i=0;ithis.limit_0&&null!=(i=this.tail_0)&&(this.tail_0=i.myPrev_8be2vx$,h(this.tail_0).myNext_8be2vx$=null,this.map_0.remove_11rb$(i.myKey_8be2vx$))},rs.prototype.getOrPut_kpg1aj$=function(t,e){var n,i=this.get_11rb$(t);if(null!=i)n=i;else{var o=e();this.put_xwzc9p$(t,o),n=o}return n},rs.prototype.containsKey_11rb$=function(t){return this.map_0.containsKey_11rb$(t)},as.$metadata$={kind:m,simpleName:"Node",interfaces:[]},rs.$metadata$={kind:m,simpleName:"LruCache",interfaces:[]},ss.prototype.add_11rb$=function(t){var e=Re(this.queue_0,t,this.comparator_0);e<0&&(e=(0|-e)-1|0),this.queue_0.add_wxm5ur$(e,t)},ss.prototype.peek=function(){return this.queue_0.isEmpty()?null:this.queue_0.get_za3lpa$(0)},ss.prototype.clear=function(){this.queue_0.clear()},ss.prototype.toArray=function(){return this.queue_0},ss.$metadata$={kind:m,simpleName:"PriorityQueue",interfaces:[]},Object.defineProperty(us.prototype,"size",{configurable:!0,get:function(){return 1}}),us.prototype.iterator=function(){return new cs(this.item_0)},cs.prototype.computeNext=function(){var t;!1===(t=this.requested_0)?this.setNext_11rb$(this.value_0):!0===t&&this.done(),this.requested_0=!0},cs.$metadata$={kind:m,simpleName:"SingleItemIterator",interfaces:[Pe]},us.$metadata$={kind:m,simpleName:"SingletonCollection",interfaces:[je]},ps.$metadata$={kind:m,simpleName:"BusyStateComponent",interfaces:[qs]};var hs,_s,ds,fs,ms,$s=ze((function(){var t=e.kotlin.comparisons.compareValues_s00gnj$;return function(e){return function(n,i){var o=e;return t(o(n),o(i))}}}));function ys(t){this.mySystemTime_0=t,this.myMeasures_0=new ss(Le(new De($s(w("second",1,(function(t){return t.second})))))),this.myBeginTime_0=f,this.totalUpdateTime_581y0z$_0=f,this.myValuesMap_0=rt(),this.myValuesOrder_0=S()}function gs(){}function vs(t,e){ce.call(this),this.name$=t,this.ordinal$=e}function bs(){bs=function(){},hs=new vs("FORWARD",0),_s=new vs("BACK",1)}function ws(){return bs(),hs}function xs(){return bs(),_s}function ks(){return[ws(),xs()]}function Cs(t,e){ce.call(this),this.name$=t,this.ordinal$=e}function Es(){Es=function(){},ds=new Cs("DISABLED",0),fs=new Cs("SWITCH_DIRECTION",1),ms=new Cs("KEEP_DIRECTION",2)}function Ss(){return Es(),ds}function Ts(){return Es(),fs}function Os(){return Es(),ms}function Ns(){}function Ps(t,e,n){this.start_0=t,this.length_0=e,this.consumer_0=n}function Is(t){this.duration_0=t,this.easingFunction_0=mp().LINEAR,this.loop_0=Ss(),this.direction_0=ws(),this.animators_0=S()}function As(t,e,n){this.timeState_0=t,this.easingFunction_0=e,this.animators_0=n,this.time_kdbqol$_0=0}function Rs(){}function js(t,e,n){this.duration=t,this.loop_0=e,this.direction=n,this.isFinished_wap2n$_0=!1}function Ls(t){this.componentManager=t,this.myTasks_osfxy5$_0=S()}function zs(){this.time=0,this.duration=0,this.finished=!1,this.progress=0,this.easingFunction_heah4c$_0=this.easingFunction_heah4c$_0,this.loop_zepar7$_0=this.loop_zepar7$_0,this.direction_vdy4gu$_0=this.direction_vdy4gu$_0}function Ds(t){this.animation=t}function Ms(t){Ls.call(this,t)}function Bs(t){Ls.call(this,t)}function Fs(t){return t.remove(),j}function Us(){}function qs(){}function Hs(){this.myEntityById_0=rt(),this.myComponentsByEntity_0=rt(),this.myEntitiesByComponent_0=rt(),this.myRemovedEntities_0=S(),this.myIdGenerator_0=0,this.entities_8be2vx$=this.myComponentsByEntity_0.keys}function Gs(t){return t.hasRemoveFlag()}function Ks(t){this.eventSource=t,this.systemTime_kac7b8$_0=new E$,this.frameStartTimeMs_fwcob4$_0=f,this.metricsService=new ys(this.systemTime),this.tick=f}function Vs(t,e,n){var i;for(this.myComponentManager_0=t,this.myContext_0=e,this.mySystems_0=n,this.myDebugService_0=this.myContext_0.metricsService,i=this.mySystems_0.iterator();i.hasNext();)i.next().init_c257f0$(this.myContext_0)}function Ys(t,e,n){Zs.call(this),this.id_8be2vx$=t,this.name=e,this.componentManager=n,this.componentsMap_8be2vx$=rt()}function Ws(){this.components=S()}function Xs(t,e){var n,i=new Ws;for(e(i),n=i.components.iterator();n.hasNext();){var o=n.next();t.componentManager.addComponent_pw9baj$(t,o)}return t}function Zs(){this.removeFlag_krvsok$_0=!1}function Js(){}function Qs(){Jl.call(this),this.center_0=N.Companion.ZERO,this.strokeColor_owdycr$_0=this.visualProp_exotbh$(this,null),this.strokeWidth_fixage$_0=this.visualProp_exotbh$(this,null),this.angle_ei6kc3$_0=this.visualProp_exotbh$(this,Yt.PI/2),this.startAngle_hk2vnn$_0=this.visualProp_exotbh$(this,0)}Object.defineProperty(ys.prototype,"totalUpdateTime",{configurable:!0,get:function(){return this.totalUpdateTime_581y0z$_0},set:function(t){this.totalUpdateTime_581y0z$_0=t}}),Object.defineProperty(ys.prototype,"values",{configurable:!0,get:function(){var t,e,n=S();for(t=this.myValuesOrder_0.iterator();t.hasNext();){var i=t.next();null!=(e=this.myValuesMap_0.get_11rb$(i))&&e.length>0&&n.add_11rb$(e)}return n}}),ys.prototype.beginMeasureUpdate=function(){this.myBeginTime_0=this.mySystemTime_0.getTimeMs()},ys.prototype.endMeasureUpdate_ha9gfm$=function(t){var e=this.mySystemTime_0.getTimeMs().subtract(this.myBeginTime_0);this.myMeasures_0.add_11rb$(new ge(t,e.toNumber())),this.totalUpdateTime=this.totalUpdateTime.add(e)},ys.prototype.reset=function(){this.myMeasures_0.clear(),this.totalUpdateTime=f},ys.prototype.slowestSystem=function(){return this.myMeasures_0.peek()},ys.prototype.setValue_puj7f4$=function(t,e){this.myValuesMap_0.put_xwzc9p$(t,e)},ys.prototype.setValuesOrder_mhpeer$=function(t){this.myValuesOrder_0=t},ys.$metadata$={kind:m,simpleName:"MetricsService",interfaces:[]},vs.$metadata$={kind:m,simpleName:"Direction",interfaces:[ce]},vs.values=ks,vs.valueOf_61zpoe$=function(t){switch(t){case"FORWARD":return ws();case"BACK":return xs();default:pe("No enum constant jetbrains.livemap.core.animation.Animation.Direction."+t)}},Cs.$metadata$={kind:m,simpleName:"Loop",interfaces:[ce]},Cs.values=function(){return[Ss(),Ts(),Os()]},Cs.valueOf_61zpoe$=function(t){switch(t){case"DISABLED":return Ss();case"SWITCH_DIRECTION":return Ts();case"KEEP_DIRECTION":return Os();default:pe("No enum constant jetbrains.livemap.core.animation.Animation.Loop."+t)}},gs.$metadata$={kind:u,simpleName:"Animation",interfaces:[]},Ps.prototype.doAnimation_14dthe$=function(t){this.consumer_0(this.start_0+t*this.length_0)},Ps.$metadata$={kind:m,simpleName:"DoubleAnimator",interfaces:[Rs]},Is.prototype.setEasingFunction_7fnk9s$=function(t){return this.easingFunction_0=t,this},Is.prototype.setLoop_tfw1f3$=function(t){return this.loop_0=t,this},Is.prototype.setDirection_aylh82$=function(t){return this.direction_0=t,this},Is.prototype.setAnimator_i7e8zu$=function(t){return this.animators_0=Me([t]),this},Is.prototype.setAnimators_1h9huh$=function(t){return this.animators_0=Be(t),this},Is.prototype.addAnimator_i7e8zu$=function(t){return this.animators_0.add_11rb$(t),this},Is.prototype.build=function(){return new As(new js(this.duration_0,this.loop_0,this.direction_0),this.easingFunction_0,this.animators_0)},Is.$metadata$={kind:m,simpleName:"AnimationBuilder",interfaces:[]},Object.defineProperty(As.prototype,"isFinished",{configurable:!0,get:function(){return this.timeState_0.isFinished}}),Object.defineProperty(As.prototype,"duration",{configurable:!0,get:function(){return this.timeState_0.duration}}),Object.defineProperty(As.prototype,"time",{configurable:!0,get:function(){return this.time_kdbqol$_0},set:function(t){this.time_kdbqol$_0=this.timeState_0.calcTime_tq0o01$(t)}}),As.prototype.animate=function(){var t,e=this.progress_0;for(t=this.animators_0.iterator();t.hasNext();)t.next().doAnimation_14dthe$(e)},Object.defineProperty(As.prototype,"progress_0",{configurable:!0,get:function(){if(0===this.duration)return 1;var t=this.easingFunction_0(this.time/this.duration);return this.timeState_0.direction===ws()?t:1-t}}),As.$metadata$={kind:m,simpleName:"SimpleAnimation",interfaces:[gs]},Rs.$metadata$={kind:u,simpleName:"Animator",interfaces:[]},Object.defineProperty(js.prototype,"isFinished",{configurable:!0,get:function(){return this.isFinished_wap2n$_0},set:function(t){this.isFinished_wap2n$_0=t}}),js.prototype.calcTime_tq0o01$=function(t){var e;if(t>this.duration){if(this.loop_0===Ss())e=this.duration,this.isFinished=!0;else if(e=t%this.duration,this.loop_0===Ts()){var n=E(this.direction.ordinal+t/this.duration)%2|0;this.direction=ks()[n]}}else e=t;return e},js.$metadata$={kind:m,simpleName:"TimeState",interfaces:[]},Ls.prototype.init_c257f0$=function(t){var n;this.initImpl_4pvjek$(e.isType(n=t,Ks)?n:P())},Ls.prototype.update_tqyjj6$=function(t,n){var i;this.executeTasks_t289vu$_0(),this.updateImpl_og8vrq$(e.isType(i=t,Ks)?i:P(),n)},Ls.prototype.destroy=function(){},Ls.prototype.initImpl_4pvjek$=function(t){},Ls.prototype.updateImpl_og8vrq$=function(t,e){},Ls.prototype.getEntities_s66lbm$=Fe("lets-plot-livemap-js-legacy.jetbrains.livemap.core.ecs.AbstractSystem.getEntities_s66lbm$",ze((function(){var t=e.getKClass;return function(e,n){return this.componentManager.getEntities_9u06oy$(t(e))}}))),Ls.prototype.getEntities_9u06oy$=function(t){return this.componentManager.getEntities_9u06oy$(t)},Ls.prototype.getEntities_38uplf$=function(t){return this.componentManager.getEntities_tv8pd9$(t)},Ls.prototype.getMutableEntities_s66lbm$=Fe("lets-plot-livemap-js-legacy.jetbrains.livemap.core.ecs.AbstractSystem.getMutableEntities_s66lbm$",ze((function(){var t=e.getKClass,n=e.kotlin.sequences.toList_veqyi0$;return function(e,i){return n(this.componentManager.getEntities_9u06oy$(t(e)))}}))),Ls.prototype.getMutableEntities_38uplf$=function(t){return Ue(this.componentManager.getEntities_tv8pd9$(t))},Ls.prototype.getEntityById_za3lpa$=function(t){return this.componentManager.getEntityById_za3lpa$(t)},Ls.prototype.getEntitiesById_wlb8mv$=function(t){return this.componentManager.getEntitiesById_wlb8mv$(t)},Ls.prototype.getSingletonEntity_9u06oy$=function(t){return this.componentManager.getSingletonEntity_9u06oy$(t)},Ls.prototype.containsEntity_9u06oy$=function(t){return this.componentManager.containsEntity_9u06oy$(t)},Ls.prototype.getSingleton_s66lbm$=Fe("lets-plot-livemap-js-legacy.jetbrains.livemap.core.ecs.AbstractSystem.getSingleton_s66lbm$",ze((function(){var t=e.getKClass,n=e.throwCCE,i=e.kotlin.IllegalStateException_init_pdl1vj$;return function(e,o){var r,a,s=this.componentManager.getSingletonEntity_9u06oy$(t(e));if(null==(a=null==(r=s.componentManager.getComponents_ahlfl2$(s).get_11rb$(t(e)))||o(r)?r:n()))throw i("Component "+t(e).simpleName+" is not found");return a}}))),Ls.prototype.getSingletonEntity_s66lbm$=Fe("lets-plot-livemap-js-legacy.jetbrains.livemap.core.ecs.AbstractSystem.getSingletonEntity_s66lbm$",ze((function(){var t=e.getKClass;return function(e,n){return this.componentManager.getSingletonEntity_9u06oy$(t(e))}}))),Ls.prototype.getSingletonEntity_38uplf$=function(t){return this.componentManager.getSingletonEntity_tv8pd9$(t)},Ls.prototype.createEntity_61zpoe$=function(t){return this.componentManager.createEntity_61zpoe$(t)},Ls.prototype.runLaterBySystem_ayosff$=function(t,e){var n,i,o;this.myTasks_osfxy5$_0.add_11rb$((n=this,i=t,o=e,function(){return n.componentManager.containsEntity_ahlfl2$(i)&&o(i),j}))},Ls.prototype.fetchTasks_u1j879$_0=function(){if(this.myTasks_osfxy5$_0.isEmpty())return ot();var t=Be(this.myTasks_osfxy5$_0);return this.myTasks_osfxy5$_0.clear(),t},Ls.prototype.executeTasks_t289vu$_0=function(){var t;for(t=this.fetchTasks_u1j879$_0().iterator();t.hasNext();)t.next()()},Ls.$metadata$={kind:m,simpleName:"AbstractSystem",interfaces:[Js]},Object.defineProperty(zs.prototype,"easingFunction",{configurable:!0,get:function(){return null==this.easingFunction_heah4c$_0?A("easingFunction"):this.easingFunction_heah4c$_0},set:function(t){this.easingFunction_heah4c$_0=t}}),Object.defineProperty(zs.prototype,"loop",{configurable:!0,get:function(){return null==this.loop_zepar7$_0?A("loop"):this.loop_zepar7$_0},set:function(t){this.loop_zepar7$_0=t}}),Object.defineProperty(zs.prototype,"direction",{configurable:!0,get:function(){return null==this.direction_vdy4gu$_0?A("direction"):this.direction_vdy4gu$_0},set:function(t){this.direction_vdy4gu$_0=t}}),zs.$metadata$={kind:m,simpleName:"AnimationComponent",interfaces:[qs]},Ds.$metadata$={kind:m,simpleName:"AnimationObjectComponent",interfaces:[qs]},Ms.prototype.init_c257f0$=function(t){},Ms.prototype.update_tqyjj6$=function(t,n){var i;for(i=this.getEntities_9u06oy$($(Ds)).iterator();i.hasNext();){var o,r,a=i.next();if(null==(r=null==(o=a.componentManager.getComponents_ahlfl2$(a).get_11rb$($(Ds)))||e.isType(o,Ds)?o:P()))throw I("Component "+$(Ds).simpleName+" is not found");var s=r.animation;s.time=s.time+n,s.animate(),s.isFinished&&a.removeComponent_9u06oy$($(Ds))}},Ms.$metadata$={kind:m,simpleName:"AnimationObjectSystem",interfaces:[Ls]},Bs.prototype.updateProgress_0=function(t){var n;switch(t.direction.name){case"FORWARD":n=this.progress_0(t);break;case"BACK":n=1-this.progress_0(t);break;default:n=e.noWhenBranchMatched()}t.progress=n},Bs.prototype.progress_0=function(t){return t.easingFunction(t.time/t.duration)},Bs.prototype.updateTime_0=function(t,e){var n,i=t.time+e,o=t.duration,r=t.loop;if(i>o){if(r===Ss())n=o,t.finished=!0;else if(n=i%o,r===Ts()){var a=E(t.direction.ordinal+i/o)%2|0;t.direction=ks()[a]}}else n=i;t.time=n},Bs.prototype.updateImpl_og8vrq$=function(t,n){var i;for(i=this.getEntities_9u06oy$($(zs)).iterator();i.hasNext();){var o,r,a=i.next();if(null==(r=null==(o=a.componentManager.getComponents_ahlfl2$(a).get_11rb$($(zs)))||e.isType(o,zs)?o:P()))throw I("Component "+$(zs).simpleName+" is not found");var s=r;this.updateTime_0(s,n),this.updateProgress_0(s),s.finished&&this.runLaterBySystem_ayosff$(a,Fs)}},Bs.$metadata$={kind:m,simpleName:"AnimationSystem",interfaces:[Ls]},Us.$metadata$={kind:u,simpleName:"EcsClock",interfaces:[]},qs.$metadata$={kind:u,simpleName:"EcsComponent",interfaces:[]},Object.defineProperty(Hs.prototype,"entitiesCount",{configurable:!0,get:function(){return this.myComponentsByEntity_0.size}}),Hs.prototype.createEntity_61zpoe$=function(t){var e,n=new Ys((e=this.myIdGenerator_0,this.myIdGenerator_0=e+1|0,e),t,this),i=this.myComponentsByEntity_0,o=n.componentsMap_8be2vx$;i.put_xwzc9p$(n,o);var r=this.myEntityById_0,a=n.id_8be2vx$;return r.put_xwzc9p$(a,n),n},Hs.prototype.getEntityById_za3lpa$=function(t){return h(this.findEntityById_za3lpa$(t))},Hs.prototype.getEntitiesById_wlb8mv$=function(t){return this.notRemoved_0(He(qe(t),(e=this,function(t){return e.myEntityById_0.get_11rb$(t)})));var e},Hs.prototype.findEntityById_za3lpa$=function(t){var e;return null!=(e=this.myEntityById_0.get_11rb$(t))?e.hasRemoveFlag()?null:e:null},Hs.prototype.getEntities_9u06oy$=function(t){var e;return this.notRemoved_1(null!=(e=this.myEntitiesByComponent_0.get_11rb$(t))?e:Ge())},Hs.prototype.addComponent_pw9baj$=function(t,n){var i=this.myComponentsByEntity_0.get_11rb$(t);if(null==i)throw _t("addComponent to non existing entity".toString());var o,r=e.getKClassFromExpression(n);if((e.isType(o=i,ke)?o:P()).containsKey_11rb$(r)){var a="Entity already has component with the type "+d(e.getKClassFromExpression(n));throw _t(a.toString())}var s=e.getKClassFromExpression(n);i.put_xwzc9p$(s,n);var l,u=this.myEntitiesByComponent_0,c=e.getKClassFromExpression(n),p=u.get_11rb$(c);if(null==p){var h=Ke();u.put_xwzc9p$(c,h),l=h}else l=p;l.add_11rb$(t)},Hs.prototype.getComponents_ahlfl2$=function(t){var e;return t.hasRemoveFlag()?Ve():null!=(e=this.myComponentsByEntity_0.get_11rb$(t))?e:Ve()},Hs.prototype.count_9u06oy$=function(t){var e,n,i;return null!=(i=null!=(n=null!=(e=this.myEntitiesByComponent_0.get_11rb$(t))?this.notRemoved_1(e):null)?C(n):null)?i:0},Hs.prototype.containsEntity_9u06oy$=function(t){return this.myEntitiesByComponent_0.containsKey_11rb$(t)},Hs.prototype.containsEntity_ahlfl2$=function(t){return!t.hasRemoveFlag()&&this.myComponentsByEntity_0.containsKey_11rb$(t)},Hs.prototype.getEntities_tv8pd9$=function(t){return k(this.getEntities_9u06oy$(Ye(t)),(e=t,function(t){return t.contains_tv8pd9$(e)}));var e},Hs.prototype.tryGetSingletonEntity_tv8pd9$=function(t){var e=this.getEntities_tv8pd9$(t);if(!(C(e)<=1))throw I(("Entity with specified components is not a singleton: "+t).toString());return We(e)},Hs.prototype.getSingletonEntity_tv8pd9$=function(t){var e=this.tryGetSingletonEntity_tv8pd9$(t);if(null==e)throw I(("Entity with specified components does not exist: "+t).toString());return e},Hs.prototype.getSingletonEntity_9u06oy$=function(t){return this.getSingletonEntity_tv8pd9$(ls(t))},Hs.prototype.getSingletonEntity_s66lbm$=Fe("lets-plot-livemap-js-legacy.jetbrains.livemap.core.ecs.EcsComponentManager.getSingletonEntity_s66lbm$",ze((function(){var t=e.getKClass;return function(e,n){return this.getSingletonEntity_9u06oy$(t(e))}}))),Hs.prototype.getEntity_9u06oy$=function(t){var e;if(null==(e=We(this.getEntities_9u06oy$(t))))throw I(("Entity with specified component does not exist: "+t).toString());return e},Hs.prototype.getSingleton_s66lbm$=Fe("lets-plot-livemap-js-legacy.jetbrains.livemap.core.ecs.EcsComponentManager.getSingleton_s66lbm$",ze((function(){var t=e.getKClass,n=e.throwCCE,i=e.kotlin.IllegalStateException_init_pdl1vj$;return function(e,o){var r,a,s=this.getSingletonEntity_9u06oy$(t(e));if(null==(a=null==(r=s.componentManager.getComponents_ahlfl2$(s).get_11rb$(t(e)))||o(r)?r:n()))throw i("Component "+t(e).simpleName+" is not found");return a}}))),Hs.prototype.tryGetSingleton_s66lbm$=Fe("lets-plot-livemap-js-legacy.jetbrains.livemap.core.ecs.EcsComponentManager.tryGetSingleton_s66lbm$",ze((function(){var t=e.getKClass,n=e.throwCCE,i=e.kotlin.IllegalStateException_init_pdl1vj$;return function(e,o){if(this.containsEntity_9u06oy$(t(e))){var r,a,s=this.getSingletonEntity_9u06oy$(t(e));if(null==(a=null==(r=s.componentManager.getComponents_ahlfl2$(s).get_11rb$(t(e)))||o(r)?r:n()))throw i("Component "+t(e).simpleName+" is not found");return a}return null}}))),Hs.prototype.count_s66lbm$=Fe("lets-plot-livemap-js-legacy.jetbrains.livemap.core.ecs.EcsComponentManager.count_s66lbm$",ze((function(){var t=e.getKClass;return function(e,n){return this.count_9u06oy$(t(e))}}))),Hs.prototype.containsEntity_s66lbm$=Fe("lets-plot-livemap-js-legacy.jetbrains.livemap.core.ecs.EcsComponentManager.containsEntity_s66lbm$",ze((function(){var t=e.getKClass;return function(e,n){return this.containsEntity_9u06oy$(t(e))}}))),Hs.prototype.removeEntity_ag9c8t$=function(t){var e=this.myRemovedEntities_0;t.setRemoveFlag(),e.add_11rb$(t)},Hs.prototype.removeComponent_mfvtx1$=function(t,e){var n;this.removeEntityFromComponents_0(t,e),null!=(n=this.getComponentsWithRemoved_0(t))&&n.remove_11rb$(e)},Hs.prototype.getComponentsWithRemoved_0=function(t){return this.myComponentsByEntity_0.get_11rb$(t)},Hs.prototype.doRemove_8be2vx$=function(){var t;for(t=this.myRemovedEntities_0.iterator();t.hasNext();){var e,n,i=t.next();if(null!=(e=this.getComponentsWithRemoved_0(i)))for(n=e.entries.iterator();n.hasNext();){var o=n.next().key;this.removeEntityFromComponents_0(i,o)}this.myComponentsByEntity_0.remove_11rb$(i),this.myEntityById_0.remove_11rb$(i.id_8be2vx$)}this.myRemovedEntities_0.clear()},Hs.prototype.removeEntityFromComponents_0=function(t,e){var n;null!=(n=this.myEntitiesByComponent_0.get_11rb$(e))&&(n.remove_11rb$(t),n.isEmpty()&&this.myEntitiesByComponent_0.remove_11rb$(e))},Hs.prototype.notRemoved_1=function(t){return Xe(qe(t),D("hasRemoveFlag",(function(t){return t.hasRemoveFlag()})))},Hs.prototype.notRemoved_0=function(t){return Xe(t,Gs)},Hs.prototype.removeEntity_za3lpa$=function(t){var e;null!=(e=this.findEntityById_za3lpa$(t))&&D("removeEntity",function(t,e){return t.removeEntity_ag9c8t$(e),j}.bind(null,this))(e)},Hs.$metadata$={kind:m,simpleName:"EcsComponentManager",interfaces:[]},Object.defineProperty(Ks.prototype,"systemTime",{configurable:!0,get:function(){return this.systemTime_kac7b8$_0}}),Object.defineProperty(Ks.prototype,"frameStartTimeMs",{configurable:!0,get:function(){return this.frameStartTimeMs_fwcob4$_0},set:function(t){this.frameStartTimeMs_fwcob4$_0=t}}),Object.defineProperty(Ks.prototype,"frameDurationMs",{configurable:!0,get:function(){return this.systemTime.getTimeMs().subtract(this.frameStartTimeMs)}}),Ks.prototype.startFrame_8be2vx$=function(){this.tick=this.tick.inc(),this.frameStartTimeMs=this.systemTime.getTimeMs()},Ks.$metadata$={kind:m,simpleName:"EcsContext",interfaces:[Us]},Vs.prototype.update_14dthe$=function(t){var e;for(this.myContext_0.startFrame_8be2vx$(),this.myDebugService_0.reset(),e=this.mySystems_0.iterator();e.hasNext();){var n=e.next();this.myDebugService_0.beginMeasureUpdate(),n.update_tqyjj6$(this.myContext_0,t),this.myDebugService_0.endMeasureUpdate_ha9gfm$(n)}this.myComponentManager_0.doRemove_8be2vx$()},Vs.prototype.dispose=function(){var t;for(t=this.mySystems_0.iterator();t.hasNext();)t.next().destroy()},Vs.$metadata$={kind:m,simpleName:"EcsController",interfaces:[V]},Object.defineProperty(Ys.prototype,"components_0",{configurable:!0,get:function(){return this.componentsMap_8be2vx$.values}}),Ys.prototype.toString=function(){return this.name},Ys.prototype.add_57nep2$=function(t){return this.componentManager.addComponent_pw9baj$(this,t),this},Ys.prototype.get_s66lbm$=Fe("lets-plot-livemap-js-legacy.jetbrains.livemap.core.ecs.EcsEntity.get_s66lbm$",ze((function(){var t=e.getKClass,n=e.throwCCE,i=e.kotlin.IllegalStateException_init_pdl1vj$;return function(e,o){var r,a;if(null==(a=null==(r=this.componentManager.getComponents_ahlfl2$(this).get_11rb$(t(e)))||o(r)?r:n()))throw i("Component "+t(e).simpleName+" is not found");return a}}))),Ys.prototype.tryGet_s66lbm$=Fe("lets-plot-livemap-js-legacy.jetbrains.livemap.core.ecs.EcsEntity.tryGet_s66lbm$",ze((function(){var t=e.getKClass,n=e.throwCCE,i=e.kotlin.IllegalStateException_init_pdl1vj$;return function(e,o){if(this.contains_9u06oy$(t(e))){var r,a;if(null==(a=null==(r=this.componentManager.getComponents_ahlfl2$(this).get_11rb$(t(e)))||o(r)?r:n()))throw i("Component "+t(e).simpleName+" is not found");return a}return null}}))),Ys.prototype.provide_fpbork$=Fe("lets-plot-livemap-js-legacy.jetbrains.livemap.core.ecs.EcsEntity.provide_fpbork$",ze((function(){var t=e.getKClass,n=e.throwCCE,i=e.kotlin.IllegalStateException_init_pdl1vj$;return function(e,o,r){if(this.contains_9u06oy$(t(e))){var a,s;if(null==(s=null==(a=this.componentManager.getComponents_ahlfl2$(this).get_11rb$(t(e)))||o(a)?a:n()))throw i("Component "+t(e).simpleName+" is not found");return s}var l=r();return this.add_57nep2$(l),l}}))),Ys.prototype.addComponent_qqqpmc$=function(t){return this.componentManager.addComponent_pw9baj$(this,t),this},Ys.prototype.setComponent_qqqpmc$=function(t){return this.contains_9u06oy$(e.getKClassFromExpression(t))&&this.componentManager.removeComponent_mfvtx1$(this,e.getKClassFromExpression(t)),this.componentManager.addComponent_pw9baj$(this,t),this},Ys.prototype.removeComponent_9u06oy$=function(t){this.componentManager.removeComponent_mfvtx1$(this,t)},Ys.prototype.remove=function(){this.componentManager.removeEntity_ag9c8t$(this)},Ys.prototype.contains_9u06oy$=function(t){return this.componentManager.getComponents_ahlfl2$(this).containsKey_11rb$(t)},Ys.prototype.contains_tv8pd9$=function(t){return this.componentManager.getComponents_ahlfl2$(this).keys.containsAll_brywnq$(t)},Ys.prototype.getComponent_s66lbm$=Fe("lets-plot-livemap-js-legacy.jetbrains.livemap.core.ecs.EcsEntity.getComponent_s66lbm$",ze((function(){var t=e.getKClass,n=e.throwCCE,i=e.kotlin.IllegalStateException_init_pdl1vj$;return function(e,o){var r,a;if(null==(a=null==(r=this.componentManager.getComponents_ahlfl2$(this).get_11rb$(t(e)))||o(r)?r:n()))throw i("Component "+t(e).simpleName+" is not found");return a}}))),Ys.prototype.contains_s66lbm$=Fe("lets-plot-livemap-js-legacy.jetbrains.livemap.core.ecs.EcsEntity.contains_s66lbm$",ze((function(){var t=e.getKClass;return function(e,n){return this.contains_9u06oy$(t(e))}}))),Ys.prototype.remove_s66lbm$=Fe("lets-plot-livemap-js-legacy.jetbrains.livemap.core.ecs.EcsEntity.remove_s66lbm$",ze((function(){var t=e.getKClass;return function(e,n){return this.removeComponent_9u06oy$(t(e)),this}}))),Ys.prototype.tag_fpbork$=Fe("lets-plot-livemap-js-legacy.jetbrains.livemap.core.ecs.EcsEntity.tag_fpbork$",ze((function(){var t=e.getKClass,n=e.throwCCE,i=e.kotlin.IllegalStateException_init_pdl1vj$;return function(e,o,r){var a;if(this.contains_9u06oy$(t(e))){var s,l;if(null==(l=null==(s=this.componentManager.getComponents_ahlfl2$(this).get_11rb$(t(e)))||o(s)?s:n()))throw i("Component "+t(e).simpleName+" is not found");a=l}else{var u=r();this.add_57nep2$(u),a=u}return a}}))),Ys.prototype.tag_qqqpmc$=Fe("lets-plot-livemap-js-legacy.jetbrains.livemap.core.ecs.EcsEntity.tag_qqqpmc$",ze((function(){var n=t.jetbrains.livemap.core.ecs.EcsComponent,i=t.jetbrains.livemap.core.ecs.EcsEntity,o=e.getKClass,r=e.throwCCE,a=e.kotlin.IllegalStateException_init_pdl1vj$;return function(t,s,l){if(this.contains_9u06oy$(o(t))){var u,c,p=[n,i];if(null==(c=null==(u=this.componentManager.getComponents_ahlfl2$(this).get_11rb$(o(p)))||e.isType(u,n)&&e.isType(u,i)?u:r()))throw a("Component "+o(p).simpleName+" is not found");return c}return this.add_57nep2$(l)}}))),Ys.prototype.untag_s66lbm$=Fe("lets-plot-livemap-js-legacy.jetbrains.livemap.core.ecs.EcsEntity.untag_s66lbm$",ze((function(){var t=e.getKClass;return function(e,n){this.removeComponent_9u06oy$(t(e))}}))),Ys.$metadata$={kind:m,simpleName:"EcsEntity",interfaces:[Zs]},Ws.prototype.unaryPlus_jixjl7$=function(t){this.components.add_11rb$(t)},Ws.$metadata$={kind:m,simpleName:"ComponentsList",interfaces:[]},Zs.prototype.setRemoveFlag=function(){this.removeFlag_krvsok$_0=!0},Zs.prototype.hasRemoveFlag=function(){return this.removeFlag_krvsok$_0},Zs.$metadata$={kind:m,simpleName:"EcsRemovable",interfaces:[]},Js.$metadata$={kind:u,simpleName:"EcsSystem",interfaces:[]};var tl=new Ze("strokeColor");Object.defineProperty(Qs.prototype,"strokeColor",{configurable:!0,get:function(){return this.strokeColor_owdycr$_0.getValue_lrcp0p$(this,tl)},set:function(t){this.strokeColor_owdycr$_0.setValue_9rddgb$(this,tl,t)}});var el=new Ze("strokeWidth");Object.defineProperty(Qs.prototype,"strokeWidth",{configurable:!0,get:function(){return this.strokeWidth_fixage$_0.getValue_lrcp0p$(this,el)},set:function(t){this.strokeWidth_fixage$_0.setValue_9rddgb$(this,el,t)}});var nl=new Ze("angle");Object.defineProperty(Qs.prototype,"angle",{configurable:!0,get:function(){return this.angle_ei6kc3$_0.getValue_lrcp0p$(this,nl)},set:function(t){this.angle_ei6kc3$_0.setValue_9rddgb$(this,nl,t)}});var il=new Ze("startAngle");function ol(){jl(),Jl.call(this),this.texts_0=S(),this.clickHandler_0=S(),this.alignment_0=new ml,this.text_99ctik$_0=this.visualProp_exotbh$(this,""),this.padding_j0zg8u$_0=this.visualProp_exotbh$(this,0),this.background_yvf78z$_0=this.visualProp_exotbh$(this,O.Companion.TRANSPARENT)}Object.defineProperty(Qs.prototype,"startAngle",{configurable:!0,get:function(){return this.startAngle_hk2vnn$_0.getValue_lrcp0p$(this,il)},set:function(t){this.startAngle_hk2vnn$_0.setValue_9rddgb$(this,il,t)}}),Qs.prototype.updateState=function(){this.center_0=this.dimension.mul_14dthe$(.5)},Qs.prototype.renderInternal_pzzegf$=function(t){var e,n;t.beginPath(),t.arc_6p3vsx$(this.center_0.x,this.center_0.y,this.dimension.x/2,this.startAngle,this.startAngle+this.angle),null!=(e=this.strokeWidth)&&t.setLineWidth_14dthe$(e),null!=(n=this.strokeColor)&&t.setStrokeStyle_2160e9$(n),t.stroke()},Qs.$metadata$={kind:m,simpleName:"Arc",interfaces:[Jl]};var rl=new Ze("text");Object.defineProperty(ol.prototype,"text",{configurable:!0,get:function(){return this.text_99ctik$_0.getValue_lrcp0p$(this,rl)},set:function(t){this.text_99ctik$_0.setValue_9rddgb$(this,rl,t)}});var al=new Ze("padding");Object.defineProperty(ol.prototype,"padding",{configurable:!0,get:function(){return this.padding_j0zg8u$_0.getValue_lrcp0p$(this,al)},set:function(t){this.padding_j0zg8u$_0.setValue_9rddgb$(this,al,t)}});var sl,ll,ul,cl,pl,hl,_l=new Ze("background");function dl(t,e){return function(n){return n.color=t,n.fontFamily=jl().CONTRIBUTORS_FONT_FAMILY_0,n.fontSize=11,n.text=ht(e.text),j}}function fl(t){return function(){return P$(t.href),j}}function ml(){this.horizontal=gl(),this.vertical=kl()}function $l(t,e){ce.call(this),this.name$=t,this.ordinal$=e}function yl(){yl=function(){},sl=new $l("RIGHT",0),ll=new $l("CENTER",1),ul=new $l("LEFT",2)}function gl(){return yl(),sl}function vl(){return yl(),ll}function bl(){return yl(),ul}function wl(t,e){ce.call(this),this.name$=t,this.ordinal$=e}function xl(){xl=function(){},cl=new wl("TOP",0),pl=new wl("CENTER",1),hl=new wl("BOTTOM",2)}function kl(){return xl(),cl}function Cl(){return xl(),pl}function El(){return xl(),hl}function Sl(){}function Tl(t){this.text_w88oe$_0=t}function Ol(t,e){this.href=t,this.text_hkpiap$_0=e}function Nl(){Pl=this,this.regex_0=Qe("(]*>[^<]*<\\/a>|[^<]*)"),this.linkRegex_0=Qe('href="([^"]*)"[^>]*>([^<]*)<\\/a>')}Object.defineProperty(ol.prototype,"background",{configurable:!0,get:function(){return this.background_yvf78z$_0.getValue_lrcp0p$(this,_l)},set:function(t){this.background_yvf78z$_0.setValue_9rddgb$(this,_l,t)}}),Object.defineProperty(ol.prototype,"horizontalAlignment",{configurable:!0,get:function(){return this.alignment_0.horizontal},set:function(t){this.alignment_0.horizontal=t,this.isDirty=!0}}),Object.defineProperty(ol.prototype,"verticalAlignment",{configurable:!0,get:function(){return this.alignment_0.vertical},set:function(t){this.alignment_0.vertical=t,this.isDirty=!0}}),ol.prototype.updateState=function(){var t,n,i,o,r=this.clickHandler_0;for(t=r.iterator();t.hasNext();)t.next().remove();for(r.clear(),n=Il().parse_61zpoe$(this.text).iterator();n.hasNext();){var a=n.next(),s=e.isType(a,Ol)?new O(26,13,171):O.Companion.BLACK,l=new au;if(l.attach_uwgaf4$(this.graphics),this.setState_238w1j$(l,dl(s,a)),e.isType(a,Ol)){var u=this.clickHandler_0,c=this.graphics.onClick_gc7t6w$(l,fl(a));u.add_11rb$(c)}this.texts_0.add_11rb$(l)}for(i=this.texts_0.iterator();i.hasNext();){var p=i.next(),h=p.dimension;p.origin=new N(this.dimension.x+this.padding,this.padding);var _=this.dimension.x+h.x,d=this.dimension.y,f=h.y;this.dimension=new N(_,et.max(d,f))}for(this.dimension=this.dimension.add_gpjtzr$(new N(2*this.padding,2*this.padding)),this.origin=this.alignment_0.calculatePosition_qt8ska$(this.origin,this.dimension),o=this.texts_0.iterator();o.hasNext();){var m=o.next();m.origin=gp().plus_ehqgfx$(m.origin,this.origin)}},ol.prototype.renderInternal_pzzegf$=function(t){var e;for(t.setTransform_15yvbs$(1,0,0,1,0,0),t.save(),t.setFillStyle_2160e9$(this.background),t.fillRect_6y0v78$(this.origin.x,this.origin.y,this.dimension.x,this.dimension.y),t.restore(),e=this.texts_0.iterator();e.hasNext();){var n=e.next();this.renderPrimitive_0(t,n)}},ol.prototype.renderPrimitive_0=function(t,e){t.save();var n=e.origin;t.setTransform_15yvbs$(1,0,0,1,n.x,n.y),e.render_pzzegf$(t),t.restore()},$l.$metadata$={kind:m,simpleName:"HorizontalAlignment",interfaces:[ce]},$l.values=function(){return[gl(),vl(),bl()]},$l.valueOf_61zpoe$=function(t){switch(t){case"RIGHT":return gl();case"CENTER":return vl();case"LEFT":return bl();default:pe("No enum constant jetbrains.livemap.core.graphics.Attribution.Alignment.HorizontalAlignment."+t)}},wl.$metadata$={kind:m,simpleName:"VerticalAlignment",interfaces:[ce]},wl.values=function(){return[kl(),Cl(),El()]},wl.valueOf_61zpoe$=function(t){switch(t){case"TOP":return kl();case"CENTER":return Cl();case"BOTTOM":return El();default:pe("No enum constant jetbrains.livemap.core.graphics.Attribution.Alignment.VerticalAlignment."+t)}},ml.prototype.calculatePosition_qt8ska$=function(t,n){var i,o;switch(this.horizontal.name){case"LEFT":i=-n.x;break;case"CENTER":i=-n.x/2;break;case"RIGHT":i=0;break;default:i=e.noWhenBranchMatched()}var r=i;switch(this.vertical.name){case"TOP":o=0;break;case"CENTER":o=-n.y/2;break;case"BOTTOM":o=-n.y;break;default:o=e.noWhenBranchMatched()}var a=o;return gp().plus_ehqgfx$(t,new N(r,a))},ml.$metadata$={kind:m,simpleName:"Alignment",interfaces:[]},Object.defineProperty(Tl.prototype,"text",{get:function(){return this.text_w88oe$_0}}),Tl.$metadata$={kind:m,simpleName:"SimpleText",interfaces:[Sl]},Tl.prototype.component1=function(){return this.text},Tl.prototype.copy_61zpoe$=function(t){return new Tl(void 0===t?this.text:t)},Tl.prototype.toString=function(){return"SimpleText(text="+e.toString(this.text)+")"},Tl.prototype.hashCode=function(){var t=0;return 31*t+e.hashCode(this.text)|0},Tl.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.text,t.text)},Object.defineProperty(Ol.prototype,"text",{get:function(){return this.text_hkpiap$_0}}),Ol.$metadata$={kind:m,simpleName:"SimpleLink",interfaces:[Sl]},Ol.prototype.component1=function(){return this.href},Ol.prototype.component2=function(){return this.text},Ol.prototype.copy_puj7f4$=function(t,e){return new Ol(void 0===t?this.href:t,void 0===e?this.text:e)},Ol.prototype.toString=function(){return"SimpleLink(href="+e.toString(this.href)+", text="+e.toString(this.text)+")"},Ol.prototype.hashCode=function(){var t=0;return 31*(t=31*t+e.hashCode(this.href)|0)+e.hashCode(this.text)|0},Ol.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.href,t.href)&&e.equals(this.text,t.text)},Sl.$metadata$={kind:u,simpleName:"AttributionParts",interfaces:[]},Nl.prototype.parse_61zpoe$=function(t){for(var e=S(),n=this.regex_0.find_905azu$(t);null!=n;){if(n.value.length>0){var i=Je(n.value,"=0;g--)null!=(r=y.get_11rb$(g))&&this.acceptListeners_0($,r)}},Lu.prototype.acceptListeners_0=function(t,n){var i;for(i=n.iterator();i.hasNext();){var o,r,a,s=i.next();if(null==(a=null==(r=s.componentManager.getComponents_ahlfl2$(s).get_11rb$($(Ru)))||e.isType(r,Ru)?r:P()))throw I("Component "+$(Ru).simpleName+" is not found");var l,u,c=a;if(null==(u=null==(l=s.componentManager.getComponents_ahlfl2$(s).get_11rb$($(Eu)))||e.isType(l,Eu)?l:P()))throw I("Component "+$(Eu).simpleName+" is not found");var p,h=u;if(null!=(o=c.getEvent_uuhdck$(t))&&!o.isStopped)for(p=h.getListeners_skrnrl$(t).iterator();p.hasNext();)p.next()(o)}},Lu.prototype.getZIndex_0=function(t,n){var i;if(t.contains_9u06oy$($(Vf)))i=0;else{var o,r,a=t.componentManager;if(null==(r=null==(o=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(pc)))||e.isType(o,pc)?o:P()))throw I("Component "+$(pc).simpleName+" is not found");var s,l,u=a.getEntityById_za3lpa$(r.layerId);if(null==(l=null==(s=u.componentManager.getComponents_ahlfl2$(u).get_11rb$($(cc)))||e.isType(s,cc)?s:P()))throw I("Component "+$(cc).simpleName+" is not found");var c=l.canvasLayer;i=n.indexOf_11rb$(c)+1|0}return i},Object.defineProperty(zu.prototype,"myInput_0",{configurable:!0,get:function(){return null==this.myInput_e8l61w$_0?A("myInput"):this.myInput_e8l61w$_0},set:function(t){this.myInput_e8l61w$_0=t}}),Object.defineProperty(zu.prototype,"myClickable_0",{configurable:!0,get:function(){return null==this.myClickable_rbak90$_0?A("myClickable"):this.myClickable_rbak90$_0},set:function(t){this.myClickable_rbak90$_0=t}}),Object.defineProperty(zu.prototype,"myListeners_0",{configurable:!0,get:function(){return null==this.myListeners_gfgcs9$_0?A("myListeners"):this.myListeners_gfgcs9$_0},set:function(t){this.myListeners_gfgcs9$_0=t}}),Object.defineProperty(zu.prototype,"myEntity_0",{configurable:!0,get:function(){return null==this.myEntity_2u1elx$_0?A("myEntity"):this.myEntity_2u1elx$_0},set:function(t){this.myEntity_2u1elx$_0=t}}),zu.prototype.setEntity_ag9c8t$=function(t){var n,i,o,r,a,s;if(this.myEntity_0=t,null==(i=null==(n=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(Ru)))||e.isType(n,Ru)?n:P()))throw I("Component "+$(Ru).simpleName+" is not found");if(this.myInput_0=i,null==(r=null==(o=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(_u)))||e.isType(o,_u)?o:P()))throw I("Component "+$(_u).simpleName+" is not found");if(this.myClickable_0=r,null==(s=null==(a=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(Eu)))||e.isType(a,Eu)?a:P()))throw I("Component "+$(Eu).simpleName+" is not found");this.myListeners_0=s},zu.prototype.needToAdd_uuhdck$=function(t){var e=this.myInput_0.getEvent_uuhdck$(t);return null!=e&&this.myListeners_0.contains_uuhdck$(t)&&du(e.location,this.myClickable_0)},zu.prototype.addTo_o8fzf1$=function(t,e){var n,i=t.get_11rb$(e);if(null==i){var o=S();t.put_xwzc9p$(e,o),n=o}else n=i;n.add_11rb$(this.myEntity_0)},zu.$metadata$={kind:m,simpleName:"InteractiveEntityView",interfaces:[]},Du.$metadata$={kind:l,simpleName:"Companion",interfaces:[]};var Mu,Bu,Fu,Uu,qu,Hu,Gu=null;function Ku(){return null===Gu&&new Du,Gu}function Vu(t){Ls.call(this,t),this.myRegs_0=new ln([]),this.myDragState_0=null,this.rawMouseEventsQueueLock_0=new un,this.rawMouseEventsQueue_0=S()}function Yu(t,e,n,i,o){void 0===t&&(t=null),void 0===e&&(e=null),void 0===n&&(n=null),void 0===i&&(i=null),void 0===o&&(o=null),this.moveEvent=t,this.pressEvent=e,this.clickEvent=n,this.doubleClickEvent=i,this.dragState=o}function Wu(t,e){this.this$MouseInputSystem=t,this.closure$mouseEventSpec=e}function Xu(t,e,n){this.canvas=t,this.name=e,this.kind=n,this.myRect_0=Y(0,0,this.canvas.size.x,this.canvas.size.y),this.myRenderTaskList_0=S()}function Zu(t,e){ce.call(this),this.name$=t,this.ordinal$=e}function Ju(){Ju=function(){},Mu=new Zu("BASEMAP_TILES",0),Bu=new Zu("FEATURES",1),Fu=new Zu("BASEMAP_LABELS",2),Uu=new Zu("UI",3)}function Qu(){return Ju(),Mu}function tc(){return Ju(),Bu}function ec(){return Ju(),Fu}function nc(){return Ju(),Uu}function ic(){return[Qu(),tc(),ec(),nc()]}function oc(t,e){ce.call(this),this.name$=t,this.ordinal$=e}function rc(){rc=function(){},qu=new oc("COPY",0),Hu=new oc("REPAINT",1)}function ac(){return rc(),qu}function sc(){return rc(),Hu}function lc(t){switch(t.kind.name){case"BASEMAP_TILES":case"BASEMAP_LABELS":case"UI":return sc();case"FEATURES":return ac();default:return e.noWhenBranchMatched()}}function uc(){}function cc(t){this.canvasLayer=t}function pc(t){mc(),this.layerId=t}function hc(){fc=this}Lu.$metadata$={kind:m,simpleName:"MouseInputDetectionSystem",interfaces:[Ls]},Yu.$metadata$={kind:m,simpleName:"InputEvent",interfaces:[]},Yu.prototype.component1=function(){return this.moveEvent},Yu.prototype.component2=function(){return this.pressEvent},Yu.prototype.component3=function(){return this.clickEvent},Yu.prototype.component4=function(){return this.doubleClickEvent},Yu.prototype.component5=function(){return this.dragState},Yu.prototype.copy_46wif7$=function(t,e,n,i,o){return new Yu(void 0===t?this.moveEvent:t,void 0===e?this.pressEvent:e,void 0===n?this.clickEvent:n,void 0===i?this.doubleClickEvent:i,void 0===o?this.dragState:o)},Yu.prototype.toString=function(){return"InputEvent(moveEvent="+e.toString(this.moveEvent)+", pressEvent="+e.toString(this.pressEvent)+", clickEvent="+e.toString(this.clickEvent)+", doubleClickEvent="+e.toString(this.doubleClickEvent)+", dragState="+e.toString(this.dragState)+")"},Yu.prototype.hashCode=function(){var t=0;return 31*(t=31*(t=31*(t=31*(t=31*t+e.hashCode(this.moveEvent)|0)+e.hashCode(this.pressEvent)|0)+e.hashCode(this.clickEvent)|0)+e.hashCode(this.doubleClickEvent)|0)+e.hashCode(this.dragState)|0},Yu.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.moveEvent,t.moveEvent)&&e.equals(this.pressEvent,t.pressEvent)&&e.equals(this.clickEvent,t.clickEvent)&&e.equals(this.doubleClickEvent,t.doubleClickEvent)&&e.equals(this.dragState,t.dragState)},Wu.prototype.onEvent_11rb$=function(t){var e=this.this$MouseInputSystem.rawMouseEventsQueueLock_0;this.this$MouseInputSystem,this.closure$mouseEventSpec;try{e.lock(),this.this$MouseInputSystem.rawMouseEventsQueue_0.add_11rb$(ue(this.closure$mouseEventSpec,t))}finally{e.unlock()}},Wu.$metadata$={kind:m,interfaces:[R]},Vu.prototype.enqueue_0=function(t){return new Wu(this,t)},Vu.prototype.init_c257f0$=function(t){this.myRegs_0.add_3xv6fb$(t.eventSource.addEventHandler_mfdhbe$(on.MOUSE_DOUBLE_CLICKED,this.enqueue_0(on.MOUSE_DOUBLE_CLICKED))),this.myRegs_0.add_3xv6fb$(t.eventSource.addEventHandler_mfdhbe$(on.MOUSE_PRESSED,this.enqueue_0(on.MOUSE_PRESSED))),this.myRegs_0.add_3xv6fb$(t.eventSource.addEventHandler_mfdhbe$(on.MOUSE_RELEASED,this.enqueue_0(on.MOUSE_RELEASED))),this.myRegs_0.add_3xv6fb$(t.eventSource.addEventHandler_mfdhbe$(on.MOUSE_DRAGGED,this.enqueue_0(on.MOUSE_DRAGGED))),this.myRegs_0.add_3xv6fb$(t.eventSource.addEventHandler_mfdhbe$(on.MOUSE_MOVED,this.enqueue_0(on.MOUSE_MOVED))),this.myRegs_0.add_3xv6fb$(t.eventSource.addEventHandler_mfdhbe$(on.MOUSE_CLICKED,this.enqueue_0(on.MOUSE_CLICKED)))},Vu.prototype.update_tqyjj6$=function(t,n){var i,o,r,a,s,l=this.rawMouseEventsQueueLock_0;try{l.lock();var u=rn(this.rawMouseEventsQueue_0);this.rawMouseEventsQueue_0.clear()}finally{l.unlock()}var c=u;!0===(null!=(i=this.myDragState_0)?i.started:null)&&(this.myDragState_0=null!=(o=this.myDragState_0)?o.copy_tug3mr$(void 0,void 0,!1,!0):null),!0===(null!=(r=this.myDragState_0)?r.stopped:null)&&(this.myDragState_0=null);var p=null!=(a=this.handleEvent_0(c))?a:new Yu(void 0,void 0,void 0,void 0,this.myDragState_0);for(s=this.getEntities_9u06oy$($(Ru)).iterator();s.hasNext();){var h,_,d=s.next();if(null==(_=null==(h=d.componentManager.getComponents_ahlfl2$(d).get_11rb$($(Ru)))||e.isType(h,Ru)?h:P()))throw I("Component "+$(Ru).simpleName+" is not found");_.moveEvent=p.moveEvent,_.pressEvent=p.pressEvent,_.clickEvent=p.clickEvent,_.doubleClickEvent=p.doubleClickEvent,_.dragState=p.dragState}},Vu.prototype.destroy=function(){this.myRegs_0.dispose()},Vu.prototype.handleEvent_0=function(t){if(t.isEmpty())return null;var e,n={v:null},i={v:null},o={v:null},r={v:null};for(e=t.iterator();e.hasNext();){var a=e.next(),s=a.component1(),l=a.component2();switch(s.name){case"MOUSE_MOVED":i.v=new Su(l.location);break;case"MOUSE_DRAGGED":this.updateDragState_0(l.location,!1);break;case"MOUSE_RELEASED":_(l.button,an.LEFT)&&this.updateDragState_0(l.location,!0)}if(_(l.button,an.LEFT))switch(s.name){case"MOUSE_CLICKED":o.v=new Su(l.location);break;case"MOUSE_DOUBLE_CLICKED":r.v=new Su(l.location);break;case"MOUSE_PRESSED":n.v=new Su(l.location)}}return new Yu(i.v,n.v,o.v,r.v,this.myDragState_0)},Vu.prototype.updateDragState_0=function(t,e){var n,i,o,r,a,s,l=null!=(i=null!=(n=this.myDragState_0)?n.origin:null)?i:t;if(null!=(o=this.myDragState_0)){var u;if(o.started)if(e){if(!e)throw sn();u=new ju(l,t,!0,void 0,!0)}else u=new ju(l,t,!0);else if(o.dragging)if(e){if(!e)throw sn();u=new ju(l,t,void 0,void 0,!0)}else u=new ju(l,t,void 0,!0);else{if(!o.stopped)throw sn();if(e){if(!e)throw sn();u=new ju(l,t,void 0,void 0,!0)}else u=new ju(l,t,void 0,void 0,!0)}a=u}else a=null;s=null!=(r=a)?r:e||e?null:new ju(t,t,!0),this.myDragState_0=s},Vu.$metadata$={kind:m,simpleName:"MouseInputSystem",interfaces:[Ls]},Object.defineProperty(Xu.prototype,"size",{configurable:!0,get:function(){return this.canvas.size}}),Xu.prototype.addRenderTask_ddf932$=function(t){this.myRenderTaskList_0.add_11rb$(t)},Xu.prototype.clearRenderTaskss=function(){this.myRenderTaskList_0.clear()},Xu.prototype.render=function(){var t,e=this.canvas.context2d;for(t=this.myRenderTaskList_0.iterator();t.hasNext();)t.next()(e);this.myRenderTaskList_0.clear()},Xu.prototype.snapshot=function(){return this.canvas.immidiateSnapshot()},Xu.prototype.clear=function(){this.canvas.context2d.clearRect_wthzt5$(this.myRect_0)},Xu.prototype.removeFrom_49gm0j$=function(t){t.removeChild_eqkm0m$(this.canvas)},Xu.prototype.toString=function(){return"layer_"+this.name},Xu.prototype.containsRenderTasks=function(){return!this.myRenderTaskList_0.isEmpty()},Xu.$metadata$={kind:m,simpleName:"CanvasLayer",interfaces:[]},Zu.$metadata$={kind:m,simpleName:"LayerKind",interfaces:[ce]},Zu.values=ic,Zu.valueOf_61zpoe$=function(t){switch(t){case"BASEMAP_TILES":return Qu();case"FEATURES":return tc();case"BASEMAP_LABELS":return ec();case"UI":return nc();default:pe("No enum constant jetbrains.livemap.core.layers.LayerKind."+t)}},oc.$metadata$={kind:m,simpleName:"PanningPolicy",interfaces:[ce]},oc.values=function(){return[ac(),sc()]},oc.valueOf_61zpoe$=function(t){switch(t){case"COPY":return ac();case"REPAINT":return sc();default:pe("No enum constant jetbrains.livemap.core.layers.PanningPolicy."+t)}},uc.$metadata$={kind:m,simpleName:"DirtyCanvasLayerComponent",interfaces:[qs]},cc.$metadata$={kind:m,simpleName:"CanvasLayerComponent",interfaces:[qs]},hc.prototype.tagDirtyParentLayer_ahlfl2$=function(t){var n,i;if(null==(i=null==(n=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(pc)))||e.isType(n,pc)?n:P()))throw I("Component "+$(pc).simpleName+" is not found");var o,r=i,a=t.componentManager.getEntityById_za3lpa$(r.layerId);if(a.contains_9u06oy$($(uc))){if(null==(null==(o=a.componentManager.getComponents_ahlfl2$(a).get_11rb$($(uc)))||e.isType(o,uc)?o:P()))throw I("Component "+$(uc).simpleName+" is not found")}else a.add_57nep2$(new uc)},hc.$metadata$={kind:l,simpleName:"Companion",interfaces:[]};var _c,dc,fc=null;function mc(){return null===fc&&new hc,fc}function $c(){this.children_33f4bg$_0=rt(),this.layers=S()}function yc(t){$c.call(this),this.singleCanvasControl_0=new Ut(t),this.rect_0=new nn(N.Companion.ZERO,t.size.toDoubleVector()),this.myBackingStore_0=hn(),this.myPanningOffsets_0=hn()}function gc(t){$c.call(this),this.canvasControl_0=t,this.myBackingStore_0=hn(),this.myPanningOffsets_0=hn()}function vc(t,e){Ls.call(this,t),this.myLayerManager_0=e,this.myDirtyLayers_0=ot(),this.updated_o1kj47$_0=!0}function bc(t,e){ce.call(this),this.name$=t,this.ordinal$=e}function wc(){wc=function(){},_c=new bc("OWN_OFFSCREEN_CANVAS",0),dc=new bc("OWN_SCREEN_CANVAS",1)}function xc(){return wc(),_c}function kc(){return wc(),dc}function Cc(t,e){this.mySystemTime_0=t,this.myMicroTask_0=e,this.finishEventSource_0=new G,this.processTime_hf7vj9$_0=f,this.maxResumeTime_v6sfa5$_0=f}function Ec(t){this.closure$handler=t}function Sc(){}function Tc(t,e){return Uc().map_69kpin$(t,e)}function Oc(t,e){return Uc().flatMap_fgpnzh$(t,e)}function Nc(t,e){this.myClock_0=t,this.myFrameDurationLimit_0=e}function Pc(){}function Ic(){Fc=this,this.EMPTY_MICRO_THREAD_0=new zc}function Ac(t,e){this.closure$microTask=t,this.closure$mapFunction=e,this.result_0=null,this.transformed_0=!1}function Rc(t,e){this.closure$microTask=t,this.closure$mapFunction=e,this.transformed_0=!1,this.result_0=null}function jc(t){this.myTasks_0=t.iterator()}function Lc(t){this.threads_0=t.iterator(),this.currentMicroThread_0=Uc().EMPTY_MICRO_THREAD_0,this.goToNextAliveMicroThread_0()}function zc(){}pc.$metadata$={kind:m,simpleName:"ParentLayerComponent",interfaces:[qs]},$c.prototype.repaintLayer_d4crcm$=function(t,e,n){void 0===e&&(e=zi().ZERO_VEC),n?n(t,e):this.repaintLayer_d4crcm$$default(t,e)},$c.prototype.add_z87q7o$=function(t,e){var n,i=this.children_33f4bg$_0,o=i.get_11rb$(t);if(null==o){var r=S();i.put_xwzc9p$(t,r),n=r}else n=o;n.add_11rb$(e),this.layers.clear();var a,s=this.layers,l=ic(),u=S();for(a=0;a!==l.length;++a){var c,p=l[a],h=null!=(c=this.children_33f4bg$_0.get_11rb$(p))?c:ot();pn(u,h)}s.addAll_brywnq$(u)},$c.prototype.remove_9zyk86$=function(t){var e;null!=(e=this.children_33f4bg$_0.get_11rb$(t.kind))&&e.remove_11rb$(t),this.layers.remove_11rb$(t)},$c.$metadata$={kind:m,simpleName:"LayerManager",interfaces:[]},yc.prototype.pan_lmrm5h$=function(t,e){var n;for(this.singleCanvasControl_0.context.clearRect_wthzt5$(this.rect_0),n=this.layers.iterator();n.hasNext();){var i=n.next();switch(lc(i).name){case"COPY":this.panLayer_0(i,t);break;case"REPAINT":e.contains_11rb$(i)&&this.repaintLayer_d4crcm$(i,t),this.panLayer_0(i,t)}}},yc.prototype.repaint_kmaqvf$=function(t){if(!t.isEmpty()){var e,n,i=D("repaintLayer",function(t,e){return t.repaintLayer_d4crcm$(e),j}.bind(null,this));for(e=t.iterator();e.hasNext();)i(e.next());for(this.singleCanvasControl_0.context.clearRect_wthzt5$(this.rect_0),n=this.layers.iterator();n.hasNext();){var o,r=n.next();null!=(o=this.myBackingStore_0.get_11rb$(r))&&this.singleCanvasControl_0.context.drawImage_1j7zd4$(o)}}},yc.prototype.panLayer_0=function(t,e){var n,i,o=_(t.kind,nc())?zi().ZERO_VEC:Se(e,null!=(n=this.myPanningOffsets_0.get_11rb$(t))?n:zi().ZERO_VEC);null!=(i=this.myBackingStore_0.get_11rb$(t))&&cn(this.singleCanvasControl_0.context,i,o)},yc.prototype.repaintLayer_d4crcm$$default=function(t,e){t.clear(),t.render();var n=this.myBackingStore_0,i=t.snapshot();n.put_xwzc9p$(t,i),this.myPanningOffsets_0.put_xwzc9p$(t,e)},yc.prototype.addLayer_o457vg$=function(t,e){var n=new Xu(this.singleCanvasControl_0.createCanvas(),t,e);return this.add_z87q7o$(e,n),new cc(n)},yc.prototype.removeLayer_9zyk86$=function(t){this.remove_9zyk86$(t)},yc.$metadata$={kind:m,simpleName:"OffscreenLayerManager",interfaces:[$c]},gc.prototype.pan_lmrm5h$=function(t,n){var i;for(i=this.layers.iterator();i.hasNext();){var o=i.next();switch(lc(o).name){case"COPY":this.panLayer_0(o,t);break;case"REPAINT":if(n.contains_11rb$(o)){this.repaintLayer_d4crcm$(o,t);var r=this.myBackingStore_0,a=o.snapshot();r.put_xwzc9p$(o,a),this.myPanningOffsets_0.put_xwzc9p$(o,t)}var s,l=this.myBackingStore_0;if(!(e.isType(s=l,ke)?s:P()).containsKey_11rb$(o)){var u=this.myBackingStore_0,c=o.snapshot();u.put_xwzc9p$(o,c),this.myPanningOffsets_0.put_xwzc9p$(o,t)}this.panLayer_0(o,t)}}},gc.prototype.repaint_kmaqvf$=function(t){var e;if(!t.isEmpty())for(e=t.iterator();e.hasNext();){var n=e.next();this.myBackingStore_0.remove_11rb$(n),this.myPanningOffsets_0.remove_11rb$(n),this.repaintLayer_d4crcm$(n)}},gc.prototype.addLayer_o457vg$=function(t,e){var n=this.canvasControl_0.createCanvas_119tl4$(this.canvasControl_0.size),i=new Xu(n,t,e);return this.add_z87q7o$(e,i),this.canvasControl_0.addChild_fwfip8$(this.layers.indexOf_11rb$(i),n),new cc(i)},gc.prototype.removeLayer_9zyk86$=function(t){t.removeFrom_49gm0j$(this.canvasControl_0),this.remove_9zyk86$(t)},gc.prototype.panLayer_0=function(t,e){if(!_(t.kind,nc())){var n,i=this.myBackingStore_0,o=i.get_11rb$(t);if(null==o){var r=t.snapshot();i.put_xwzc9p$(t,r),n=r}else n=o;var a,s=n;t.clear(),cn(t.canvas.context2d,s,Se(e,null!=(a=this.myPanningOffsets_0.get_11rb$(t))?a:zi().ZERO_VEC))}},gc.prototype.repaintLayer_d4crcm$$default=function(t,e){t.clear(),t.render()},gc.$metadata$={kind:m,simpleName:"ScreenLayerManager",interfaces:[$c]},Object.defineProperty(vc.prototype,"dirtyLayers",{configurable:!0,get:function(){return this.myDirtyLayers_0}}),Object.defineProperty(vc.prototype,"updated",{configurable:!0,get:function(){return this.updated_o1kj47$_0},set:function(t){this.updated_o1kj47$_0=t}}),vc.prototype.updateImpl_og8vrq$=function(t,n){if(this.updated=!1,null!=t.camera.panFrameDistance){if(_(t.camera.panFrameDistance,zi().ZERO_VEC)&&this.dirtyLayers.isEmpty())return;var i,o=Ue(this.componentManager.getEntities_9u06oy$($(uc))),r=w("id",1,(function(t){return t.id_8be2vx$})),a=It(Pt(o,10));for(i=o.iterator();i.hasNext();){var s=i.next();a.add_11rb$(r(s))}this.myDirtyLayers_0=a,this.updated=!o.isEmpty();var l,u=It(Pt(o,10));for(l=o.iterator();l.hasNext();){var c,p,d=l.next(),f=u.add_11rb$;if(null==(p=null==(c=d.componentManager.getComponents_ahlfl2$(d).get_11rb$($(cc)))||e.isType(c,cc)?c:P()))throw I("Component "+$(cc).simpleName+" is not found");f.call(u,p.canvasLayer)}var m,y,g=u,v=w("id",1,(function(t){return t.id_8be2vx$})),b=It(Pt(o,10));for(m=o.iterator();m.hasNext();){var x=m.next();b.add_11rb$(v(x))}for(this.myDirtyLayers_0=b,y=o.iterator();y.hasNext();){var k,C,E=y.next();if(null==(C=null==(k=E.componentManager.getComponents_ahlfl2$(E).get_11rb$($(cc)))||e.isType(k,cc)?k:P()))throw I("Component "+$(cc).simpleName+" is not found");lc(C.canvasLayer)===sc()&&E.removeComponent_9u06oy$($(uc))}this.myLayerManager_0.pan_lmrm5h$(h(t.camera.panDistance),g),this.updated=!0}else{var S,T,O=Ue(this.componentManager.getEntities_9u06oy$($(uc))),N=w("id",1,(function(t){return t.id_8be2vx$})),A=It(Pt(O,10));for(S=O.iterator();S.hasNext();){var R=S.next();A.add_11rb$(N(R))}for(this.myDirtyLayers_0=A,this.updated=!O.isEmpty(),T=O.iterator();T.hasNext();)T.next().removeComponent_9u06oy$($(uc));var j,L=this.myLayerManager_0,z=It(Pt(O,10));for(j=O.iterator();j.hasNext();){var D,M,B=j.next(),F=z.add_11rb$;if(null==(M=null==(D=B.componentManager.getComponents_ahlfl2$(B).get_11rb$($(cc)))||e.isType(D,cc)?D:P()))throw I("Component "+$(cc).simpleName+" is not found");F.call(z,M.canvasLayer)}L.repaint_kmaqvf$(z)}},vc.$metadata$={kind:m,simpleName:"LayersRenderingSystem",interfaces:[Ls]},bc.$metadata$={kind:m,simpleName:"RenderTarget",interfaces:[ce]},bc.values=function(){return[xc(),kc()]},bc.valueOf_61zpoe$=function(t){switch(t){case"OWN_OFFSCREEN_CANVAS":return xc();case"OWN_SCREEN_CANVAS":return kc();default:pe("No enum constant jetbrains.livemap.core.layers.RenderTarget."+t)}},Object.defineProperty(Cc.prototype,"processTime",{configurable:!0,get:function(){return this.processTime_hf7vj9$_0},set:function(t){this.processTime_hf7vj9$_0=t}}),Object.defineProperty(Cc.prototype,"maxResumeTime",{configurable:!0,get:function(){return this.maxResumeTime_v6sfa5$_0},set:function(t){this.maxResumeTime_v6sfa5$_0=t}}),Cc.prototype.resume=function(){var t=this.mySystemTime_0.getTimeMs();this.myMicroTask_0.resume();var e=this.mySystemTime_0.getTimeMs().subtract(t);this.processTime=this.processTime.add(e);var n=this.maxResumeTime;this.maxResumeTime=e.compareTo_11rb$(n)>=0?e:n,this.myMicroTask_0.alive()||this.finishEventSource_0.fire_11rb$(null)},Ec.prototype.onEvent_11rb$=function(t){this.closure$handler()},Ec.$metadata$={kind:m,interfaces:[R]},Cc.prototype.addFinishHandler_o14v8n$=function(t){return this.finishEventSource_0.addHandler_gxwwpc$(new Ec(t))},Cc.prototype.alive=function(){return this.myMicroTask_0.alive()},Cc.prototype.getResult=function(){return this.myMicroTask_0.getResult()},Cc.$metadata$={kind:m,simpleName:"DebugMicroTask",interfaces:[Sc]},Sc.$metadata$={kind:u,simpleName:"MicroTask",interfaces:[]},Nc.prototype.start=function(){},Nc.prototype.stop=function(){},Nc.prototype.updateAndGetFinished_gjcz1g$=function(t){for(var e=Ke(),n=!0;;){var i=n;if(i&&(i=!t.isEmpty()),!i)break;for(var o=t.iterator();o.hasNext();){if(this.myClock_0.frameDurationMs.compareTo_11rb$(this.myFrameDurationLimit_0)>0){n=!1;break}for(var r,a=o.next(),s=a.resumesBeforeTimeCheck_8be2vx$;s=(r=s)-1|0,r>0&&a.microTask.alive();)a.microTask.resume();a.microTask.alive()||(e.add_11rb$(a),o.remove())}}return e},Nc.$metadata$={kind:m,simpleName:"MicroTaskCooperativeExecutor",interfaces:[Pc]},Pc.$metadata$={kind:u,simpleName:"MicroTaskExecutor",interfaces:[]},Ac.prototype.resume=function(){this.closure$microTask.alive()?this.closure$microTask.resume():this.transformed_0||(this.result_0=this.closure$mapFunction(this.closure$microTask.getResult()),this.transformed_0=!0)},Ac.prototype.alive=function(){return this.closure$microTask.alive()||!this.transformed_0},Ac.prototype.getResult=function(){var t;if(null==(t=this.result_0))throw I("".toString());return t},Ac.$metadata$={kind:m,interfaces:[Sc]},Ic.prototype.map_69kpin$=function(t,e){return new Ac(t,e)},Rc.prototype.resume=function(){this.closure$microTask.alive()?this.closure$microTask.resume():this.transformed_0?h(this.result_0).alive()&&h(this.result_0).resume():(this.result_0=this.closure$mapFunction(this.closure$microTask.getResult()),this.transformed_0=!0)},Rc.prototype.alive=function(){return this.closure$microTask.alive()||!this.transformed_0||h(this.result_0).alive()},Rc.prototype.getResult=function(){return h(this.result_0).getResult()},Rc.$metadata$={kind:m,interfaces:[Sc]},Ic.prototype.flatMap_fgpnzh$=function(t,e){return new Rc(t,e)},Ic.prototype.create_o14v8n$=function(t){return new jc(ht(t))},Ic.prototype.create_xduz9s$=function(t){return new jc(t)},Ic.prototype.join_asgahm$=function(t){return new Lc(t)},jc.prototype.resume=function(){this.myTasks_0.next()()},jc.prototype.alive=function(){return this.myTasks_0.hasNext()},jc.prototype.getResult=function(){return j},jc.$metadata$={kind:m,simpleName:"CompositeMicroThread",interfaces:[Sc]},Lc.prototype.resume=function(){this.currentMicroThread_0.resume(),this.goToNextAliveMicroThread_0()},Lc.prototype.alive=function(){return this.currentMicroThread_0.alive()},Lc.prototype.getResult=function(){return j},Lc.prototype.goToNextAliveMicroThread_0=function(){for(;!this.currentMicroThread_0.alive();){if(!this.threads_0.hasNext())return;this.currentMicroThread_0=this.threads_0.next()}},Lc.$metadata$={kind:m,simpleName:"MultiMicroThread",interfaces:[Sc]},zc.prototype.getResult=function(){return j},zc.prototype.resume=function(){},zc.prototype.alive=function(){return!1},zc.$metadata$={kind:m,interfaces:[Sc]},Ic.$metadata$={kind:l,simpleName:"MicroTaskUtil",interfaces:[]};var Dc,Mc,Bc,Fc=null;function Uc(){return null===Fc&&new Ic,Fc}function qc(t,e){this.microTask=t,this.resumesBeforeTimeCheck_8be2vx$=e}function Hc(t,e,n){t.setComponent_qqqpmc$(new qc(n,e))}function Gc(t,e){Ls.call(this,e),this.microTaskExecutor_0=t,this.loading_dhgexf$_0=f}function Kc(t){var n,i;if(null==(i=null==(n=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(qc)))||e.isType(n,qc)?n:P()))throw I("Component "+$(qc).simpleName+" is not found");return i}function Vc(){}function Yc(t){var e,n=S();if(t.isEmpty())return n;n.add_11rb$(t.get_za3lpa$(0)),e=t.size;for(var i=1;i=0?1:-1)*Bc/2;return t.add_11rb$(J(e,void 0,(o=l,function(t){return new mn(o)}))),void t.add_11rb$(J(n,void 0,function(t){return function(e){return new mn(t)}}(l)))}for(var u=Xc(e.x,n.x)<=Xc(n.x,e.x)?1:-1,c=Zc(e.y),h=et.tan(c),_=Zc(n.y),d=et.tan(_),f=Zc(n.x-e.x),m=et.sin(f),$=e.x;;){var y=$-n.x;if(!(et.abs(y)>Dc))break;var g=Zc(($=$n($+=u*Dc))-e.x),v=d*et.sin(g),b=Zc(n.x-$),w=(v+h*et.sin(b))/m,x=(i=et.atan(w),Bc*i/Yt.PI);t.add_11rb$(p($,x))}}}function Xc(t,e){var n=e-t;return n+(n<0?Mc:0)}function Zc(t){return Yt.PI*t/Bc}function Jc(){}function Qc(){}function tp(){}function ep(){op=this}function np(t,e){this.closure$xProjection=t,this.closure$yProjection=e}function ip(t){this.closure$scale=t}qc.$metadata$={kind:m,simpleName:"MicroThreadComponent",interfaces:[qs]},Object.defineProperty(Gc.prototype,"loading",{configurable:!0,get:function(){return this.loading_dhgexf$_0},set:function(t){this.loading_dhgexf$_0=t}}),Gc.prototype.initImpl_4pvjek$=function(t){this.microTaskExecutor_0.start()},Gc.prototype.updateImpl_og8vrq$=function(t,n){if(this.componentManager.count_9u06oy$($(qc))>0){var i,o=qe(Ue(this.getEntities_9u06oy$($(qc)))),r=_n(y(o,Kc)),a=D("updateAndGetFinished",function(t,e){return t.updateAndGetFinished_gjcz1g$(e)}.bind(null,this.microTaskExecutor_0))(r);for(i=k(o,function(t){return function(n){var i,o,r=t;if(null==(o=null==(i=n.componentManager.getComponents_ahlfl2$(n).get_11rb$($(qc)))||e.isType(i,qc)?i:P()))throw I("Component "+$(qc).simpleName+" is not found");return r.contains_11rb$(o)}}(a)).iterator();i.hasNext();)i.next().removeComponent_9u06oy$($(qc));this.loading=t.frameDurationMs}else this.loading=f},Gc.prototype.destroy=function(){this.microTaskExecutor_0.stop()},Gc.$metadata$={kind:m,simpleName:"SchedulerSystem",interfaces:[Ls]},Vc.$metadata$={kind:u,simpleName:"GeoProjection",interfaces:[Qc]},Jc.$metadata$={kind:u,simpleName:"MapRuler",interfaces:[]},Qc.$metadata$={kind:u,simpleName:"UnsafeProjection",interfaces:[]},tp.$metadata$={kind:u,simpleName:"Projection",interfaces:[]},ep.prototype.mercator=function(){return new ap(yn())},ep.prototype.geographic=function(){return new ap(yn())},ep.prototype.azimuthalEqualArea=function(){return new ap(gn())},ep.prototype.conicEqualArea=function(){return new ap(vn(0,Yt.PI/3))},ep.prototype.zoom_27pd89$=function(t){return this.tuple_bkiy7g$(this.scale_d4mmvr$((e=t,function(){var t=e();return et.pow(2,t)})),this.scale_d4mmvr$(function(t){return function(){var e=t();return et.pow(2,e)}}(t)));var e},np.prototype.project_11rb$=function(t){return p(this.closure$xProjection.project_11rb$(t.x),this.closure$yProjection.project_11rb$(t.y))},np.prototype.invert_11rc$=function(t){return p(this.closure$xProjection.invert_11rc$(t.x),this.closure$yProjection.invert_11rc$(t.y))},np.$metadata$={kind:m,interfaces:[tp]},ep.prototype.tuple_bkiy7g$=function(t,e){return new np(t,e)},ip.prototype.project_11rb$=function(t){return t*this.closure$scale()},ip.prototype.invert_11rc$=function(t){return t/this.closure$scale()},ip.$metadata$={kind:m,interfaces:[tp]},ep.prototype.scale_d4mmvr$=function(t){return new ip(t)},ep.$metadata$={kind:l,simpleName:"Projections",interfaces:[]};var op=null;function rp(){return null===op&&new ep,op}function ap(t){this.projection_0=t,this.cylindrical_fqel0n$_0=this.projection_0.cylindrical}function sp(){fp=this,this.LINEAR=lp,this.EASE_IN_QUAD=up,this.EASE_IN_QUBIC=cp,this.EASE_IN_QUART=pp,this.EASE_OUT_QUAD=hp,this.EASE_OUT_QUBIC=_p,this.EASE_OUT_QUART=dp}function lp(t){return t}function up(t){return t*t}function cp(t){return t*t*t}function pp(t){return t*t*t*t}function hp(t){return 1-(1-t)*(1-t)}function _p(t){var e=1-t;return 1-et.pow(e,3)}function dp(t){var e=1-t;return 1-et.pow(e,4)}ap.prototype.validRect=function(){return bn(this.projection_0.validDomain())},Object.defineProperty(ap.prototype,"cylindrical",{configurable:!0,get:function(){return this.cylindrical_fqel0n$_0}}),ap.prototype.project_11rb$=function(t){var e;return null!=(e=this.projection_0.project_gpjtzr$(B(t)))?wn(e):null},ap.prototype.invert_11rc$=function(t){var e;return null!=(e=this.projection_0.invert_gpjtzr$(B(t)))?wn(e):null},ap.$metadata$={kind:m,simpleName:"ProjectionWrapper",interfaces:[Vc]},sp.$metadata$={kind:l,simpleName:"EasingFunctions",interfaces:[]};var fp=null;function mp(){return null===fp&&new sp,fp}function $p(){yp=this}$p.prototype.minus_ehqgfx$=function(t,e){return t.subtract_gpjtzr$(e)},$p.prototype.plus_ehqgfx$=function(t,e){return t.add_gpjtzr$(e)},$p.prototype.inside_4g47t2$=function(t,e,n,i){return!(ve(t)n.x+i.x||ve(e)>n.y+i.y)},$p.$metadata$={kind:l,simpleName:"Geometries",interfaces:[]};var yp=null;function gp(){return null===yp&&new $p,yp}function vp(){this.myCache_0=rt()}function bp(){kp(),this.myCache_0=new rs(5e3)}function wp(){xp=this,this.EMPTY_FRAGMENTS_CACHE_LIMIT_0=5e4,this.REGIONS_CACHE_LIMIT_0=5e3}vp.prototype.contains_swlqxw$=function(t){return this.myCache_0.containsKey_11rb$(t)},vp.prototype.keys=function(){return this.myCache_0.keys},vp.prototype.store_4kmdn9$=function(t,e){if(this.myCache_0.containsKey_11rb$(t))throw I(("Already existing fragment: "+e.name).toString());this.myCache_0.put_xwzc9p$(t,e)},vp.prototype.get_k4wxx5$=function(t){return this.myCache_0.get_11rb$(t)},vp.prototype.dispose_k4wxx5$=function(t){var e;null!=(e=this.get_k4wxx5$(t))&&e.remove(),this.myCache_0.remove_11rb$(t)},vp.$metadata$={kind:m,simpleName:"CachedFragmentsComponent",interfaces:[qs]},bp.prototype.createCache=function(){return new rs(5e4)},bp.prototype.add_swlqxw$=function(t){this.myCache_0.getOrPut_kpg1aj$(t.regionId,D("createCache",function(t){return t.createCache()}.bind(null,this))).put_xwzc9p$(t.quadKey,!0)},bp.prototype.contains_ny6xdl$=function(t,e){var n=this.myCache_0.get_11rb$(t);return null!=n&&n.containsKey_11rb$(e)},bp.prototype.addAll_euygzw$=function(t){var e;for(e=t.iterator();e.hasNext();){var n=e.next();this.add_swlqxw$(n)}},wp.$metadata$={kind:l,simpleName:"Companion",interfaces:[]};var xp=null;function kp(){return null===xp&&new wp,xp}function Cp(){this.existingRegions=Ke()}function Ep(){this.myNewFragments_0=Ke(),this.myObsoleteFragments_0=Ke()}function Sp(){this.queue=rt(),this.downloading=Ke(),this.downloaded_eudksv$_0=rt()}function Tp(t){this.fragmentKey=t}function Op(t){this.bbox=t}function Np(){this.myFragmentEntities_0=Ke()}function Pp(){this.myEmitted_0=Ke()}function Ip(){this.myEmitted_0=Ke()}function Ap(){this.fetching_0=rt()}function Rp(t,e,n){Ls.call(this,n),this.myMaxActiveDownloads_0=t,this.myFragmentGeometryProvider_0=e,this.myRegionFragments_0=rt(),this.myLock_0=new un}function jp(t,e,n){return function(i){var o;for(o=t.iterator();o.hasNext();){var r=o.next();e.remove_swlqxw$(new Up(n,r))}return j}}function Lp(t,e){return function(n){var i;for(i=n.entries.iterator();i.hasNext();){var o,r=i.next(),a=t,s=e,l=r.key,u=r.value,c=Be(u),p=w("key",1,(function(t){return t.key})),h=It(Pt(u,10));for(o=u.iterator();o.hasNext();){var _=o.next();h.add_11rb$(p(_))}var d,f=v(h);for(d=Cn(a,f).iterator();d.hasNext();){var m=d.next();c.add_11rb$(new En(m,ot()))}var $=s.myLock_0;try{$.lock();var y,g=s.myRegionFragments_0,b=g.get_11rb$(l);if(null==b){var x=S();g.put_xwzc9p$(l,x),y=x}else y=b;y.addAll_brywnq$(c)}finally{$.unlock()}}return j}}function zp(t,e){Ls.call(this,e),this.myProjectionQuant_0=t,this.myRegionIndex_0=new ah(e),this.myWaitingForScreenGeometry_0=rt()}function Dp(t){return t.unaryPlus_jixjl7$(new Ap),t.unaryPlus_jixjl7$(new Pp),t.unaryPlus_jixjl7$(new vp),j}function Mp(t){return function(e){return Xs(e,function(t){return function(e){return e.unaryPlus_jixjl7$(new Yf(t.dimension)),e.unaryPlus_jixjl7$(new Wf(t.origin)),j}}(t)),j}}function Bp(t,e,n){return function(i){var o;if(null==(o=Ot(i)))throw I("Fragment bbox can't be null".toString());var r=o;return e.runLaterBySystem_ayosff$(t,Mp(r)),Hh().simple_prkczh$(i,function(t,e){return function(n){return t.project_11rb$(Se(n,e.origin))}}(n,r))}}function Fp(t,n,i){return function(o){return Xs(o,function(t,n,i){return function(o){o.unaryPlus_jixjl7$(new Kf),o.unaryPlus_jixjl7$(new Gf),o.unaryPlus_jixjl7$(new Hf),o.unaryPlus_jixjl7$(new qf);var r=new Yh;r.zoom=t.zoom(),o.unaryPlus_jixjl7$(r),o.unaryPlus_jixjl7$(new Tp(t)),o.unaryPlus_jixjl7$(new Xf);var a=new Qh;a.geometry=n,o.unaryPlus_jixjl7$(a);var s,l,u=i.myRegionIndex_0.find_61zpoe$(t.regionId);if(null==(l=null==(s=u.componentManager.getComponents_ahlfl2$(u).get_11rb$($(pc)))||e.isType(s,pc)?s:P()))throw I("Component "+$(pc).simpleName+" is not found");return o.unaryPlus_jixjl7$(l),j}}(t,n,i)),j}}function Up(t,e){this.regionId=t,this.quadKey=e}function qp(t,e){return new Hp(new Gp(e),t)}function Hp(t,e){this.fragmentCache_u881rh$_0=t,this.geocodingService_cdrmvv$_0=e}function Gp(t){Yp(),this.limit_0=e.imul(3*Yp().calculateCachedSideTileCount_0(t.x)|0,Yp().calculateCachedSideTileCount_0(t.y)),this.cache_0=new rs(this.limit_0)}function Kp(){Vp=this,this.CACHED_ZOOM_COUNT_0=3,this.CACHED_VIEW_COUNT_0=2}bp.$metadata$={kind:m,simpleName:"EmptyFragmentsComponent",interfaces:[qs]},Cp.$metadata$={kind:m,simpleName:"ExistingRegionsComponent",interfaces:[qs]},Object.defineProperty(Ep.prototype,"requested",{configurable:!0,get:function(){return this.myNewFragments_0}}),Object.defineProperty(Ep.prototype,"obsolete",{configurable:!0,get:function(){return this.myObsoleteFragments_0}}),Ep.prototype.setToAdd_7xa9to$=function(t){this.myNewFragments_0.clear(),this.myNewFragments_0.addAll_brywnq$(t)},Ep.prototype.setToRemove_7xa9to$=function(t){this.myObsoleteFragments_0.clear(),this.myObsoleteFragments_0.addAll_brywnq$(t)},Ep.prototype.anyChanges=function(){return!this.myNewFragments_0.isEmpty()&&this.myObsoleteFragments_0.isEmpty()},Ep.$metadata$={kind:m,simpleName:"ChangedFragmentsComponent",interfaces:[qs]},Object.defineProperty(Sp.prototype,"downloaded",{configurable:!0,get:function(){return this.downloaded_eudksv$_0},set:function(t){this.downloaded.clear(),this.downloaded.putAll_a2k3zr$(t)}}),Sp.prototype.getZoomQueue_za3lpa$=function(t){var e;return null!=(e=this.queue.get_11rb$(t))?e:Ke()},Sp.prototype.extendQueue_euygzw$=function(t){var e;for(e=t.iterator();e.hasNext();){var n,i=e.next(),o=this.queue,r=i.zoom(),a=o.get_11rb$(r);if(null==a){var s=Ke();o.put_xwzc9p$(r,s),n=s}else n=a;n.add_11rb$(i)}},Sp.prototype.reduceQueue_euygzw$=function(t){var e,n;for(e=t.iterator();e.hasNext();){var i=e.next();null!=(n=this.queue.get_11rb$(i.zoom()))&&n.remove_11rb$(i)}},Sp.prototype.extendDownloading_cxgz5$=function(t){this.downloading.addAll_brywnq$(t)},Sp.prototype.reduceDownloading_cxgz5$=function(t){this.downloading.removeAll_brywnq$(t)},Sp.$metadata$={kind:m,simpleName:"DownloadingFragmentsComponent",interfaces:[qs]},Tp.$metadata$={kind:m,simpleName:"FragmentComponent",interfaces:[qs]},Op.$metadata$={kind:m,simpleName:"RegionBBoxComponent",interfaces:[qs]},Object.defineProperty(Np.prototype,"fragments",{configurable:!0,get:function(){return this.myFragmentEntities_0},set:function(t){this.myFragmentEntities_0.clear(),this.myFragmentEntities_0.addAll_brywnq$(t)}}),Np.$metadata$={kind:m,simpleName:"RegionFragmentsComponent",interfaces:[qs]},Pp.prototype.setEmitted_euygzw$=function(t){return this.myEmitted_0.clear(),this.myEmitted_0.addAll_brywnq$(t),this},Pp.prototype.keys_8be2vx$=function(){return this.myEmitted_0},Pp.$metadata$={kind:m,simpleName:"EmittedFragmentsComponent",interfaces:[qs]},Ip.prototype.keys=function(){return this.myEmitted_0},Ip.$metadata$={kind:m,simpleName:"EmittedRegionsComponent",interfaces:[qs]},Ap.prototype.keys=function(){return this.fetching_0.keys},Ap.prototype.add_swlqxw$=function(t){this.fetching_0.put_xwzc9p$(t,null)},Ap.prototype.addAll_cxgz5$=function(t){var e;for(e=t.iterator();e.hasNext();){var n=e.next();this.fetching_0.put_xwzc9p$(n,null)}},Ap.prototype.set_adz6c2$=function(t,e){this.fetching_0.put_xwzc9p$(t,e)},Ap.prototype.getEntity_swlqxw$=function(t){return this.fetching_0.get_11rb$(t)},Ap.prototype.remove_swlqxw$=function(t){this.fetching_0.remove_11rb$(t)},Ap.$metadata$={kind:m,simpleName:"StreamingFragmentsComponent",interfaces:[qs]},Rp.prototype.initImpl_4pvjek$=function(t){this.createEntity_61zpoe$("DownloadingFragments").add_57nep2$(new Sp)},Rp.prototype.updateImpl_og8vrq$=function(t,n){var i,o,r=this.componentManager.getSingletonEntity_9u06oy$($(Sp));if(null==(o=null==(i=r.componentManager.getComponents_ahlfl2$(r).get_11rb$($(Sp)))||e.isType(i,Sp)?i:P()))throw I("Component "+$(Sp).simpleName+" is not found");var a,s,l=o,u=this.componentManager.getSingletonEntity_9u06oy$($(Ep));if(null==(s=null==(a=u.componentManager.getComponents_ahlfl2$(u).get_11rb$($(Ep)))||e.isType(a,Ep)?a:P()))throw I("Component "+$(Ep).simpleName+" is not found");var c,p,h=s,_=this.componentManager.getSingletonEntity_9u06oy$($(Ap));if(null==(p=null==(c=_.componentManager.getComponents_ahlfl2$(_).get_11rb$($(Ap)))||e.isType(c,Ap)?c:P()))throw I("Component "+$(Ap).simpleName+" is not found");var d,f,m=p,y=this.componentManager.getSingletonEntity_9u06oy$($(vp));if(null==(f=null==(d=y.componentManager.getComponents_ahlfl2$(y).get_11rb$($(vp)))||e.isType(d,vp)?d:P()))throw I("Component "+$(vp).simpleName+" is not found");var g=f;if(l.reduceQueue_euygzw$(h.obsolete),l.extendQueue_euygzw$(ch().ofCopy_euygzw$(h.requested).exclude_8tsrz2$(m.keys()).exclude_8tsrz2$(g.keys()).exclude_8tsrz2$(l.downloading).get()),l.downloading.size=0;)i.add_11rb$(o.next()),o.remove(),n=n-1|0;return i},Rp.prototype.downloadGeometries_0=function(t){var n,i,o,r=rt(),a=this.componentManager.getSingletonEntity_9u06oy$($(Ap));if(null==(o=null==(i=a.componentManager.getComponents_ahlfl2$(a).get_11rb$($(Ap)))||e.isType(i,Ap)?i:P()))throw I("Component "+$(Ap).simpleName+" is not found");var s,l=o;for(n=t.iterator();n.hasNext();){var u,c=n.next(),p=c.regionId,h=r.get_11rb$(p);if(null==h){var _=Ke();r.put_xwzc9p$(p,_),u=_}else u=h;u.add_11rb$(c.quadKey),l.add_swlqxw$(c)}for(s=r.entries.iterator();s.hasNext();){var d=s.next(),f=d.key,m=d.value,y=this.myFragmentGeometryProvider_0.getFragments_u051w$(ht(f),m);y.onFailure_4m4org$(jp(m,l,f)),y.onSuccess_qlkmfe$(Lp(m,this))}},Rp.$metadata$={kind:m,simpleName:"FragmentDownloadingSystem",interfaces:[Ls]},zp.prototype.initImpl_4pvjek$=function(t){Xs(this.createEntity_61zpoe$("FragmentsFetch"),Dp)},zp.prototype.updateImpl_og8vrq$=function(t,n){var i,o,r=this.componentManager.getSingletonEntity_9u06oy$($(Sp));if(null==(o=null==(i=r.componentManager.getComponents_ahlfl2$(r).get_11rb$($(Sp)))||e.isType(i,Sp)?i:P()))throw I("Component "+$(Sp).simpleName+" is not found");var a=o.downloaded,s=Ke();if(!a.isEmpty()){var l,u,c=this.componentManager.getSingletonEntity_9u06oy$($(gm));if(null==(u=null==(l=c.componentManager.getComponents_ahlfl2$(c).get_11rb$($(gm)))||e.isType(l,gm)?l:P()))throw I("Component "+$(gm).simpleName+" is not found");var p,h=u.visibleQuads,_=Ke(),d=Ke();for(p=a.entries.iterator();p.hasNext();){var f=p.next(),m=f.key,y=f.value;if(h.contains_11rb$(m.quadKey))if(y.isEmpty()){s.add_11rb$(m);var g,v,w=this.componentManager.getSingletonEntity_9u06oy$($(Ap));if(null==(v=null==(g=w.componentManager.getComponents_ahlfl2$(w).get_11rb$($(Ap)))||e.isType(g,Ap)?g:P()))throw I("Component "+$(Ap).simpleName+" is not found");v.remove_swlqxw$(m)}else{_.add_11rb$(m.quadKey);var x=this.myWaitingForScreenGeometry_0,k=this.createFragmentEntity_0(m,Sn(y),t.mapProjection);x.put_xwzc9p$(m,k)}else{var C,E,S=this.componentManager.getSingletonEntity_9u06oy$($(Ap));if(null==(E=null==(C=S.componentManager.getComponents_ahlfl2$(S).get_11rb$($(Ap)))||e.isType(C,Ap)?C:P()))throw I("Component "+$(Ap).simpleName+" is not found");E.remove_swlqxw$(m),d.add_11rb$(m.quadKey)}}}var T,O=this.findTransformedFragments_0();for(T=O.entries.iterator();T.hasNext();){var N,A,R=T.next(),j=R.key,L=R.value,z=this.componentManager.getSingletonEntity_9u06oy$($(Ap));if(null==(A=null==(N=z.componentManager.getComponents_ahlfl2$(z).get_11rb$($(Ap)))||e.isType(N,Ap)?N:P()))throw I("Component "+$(Ap).simpleName+" is not found");A.remove_swlqxw$(j);var D,M,B=this.componentManager.getSingletonEntity_9u06oy$($(vp));if(null==(M=null==(D=B.componentManager.getComponents_ahlfl2$(B).get_11rb$($(vp)))||e.isType(D,vp)?D:P()))throw I("Component "+$(vp).simpleName+" is not found");M.store_4kmdn9$(j,L)}var F=Ke();F.addAll_brywnq$(s),F.addAll_brywnq$(O.keys);var U,q,H=this.componentManager.getSingletonEntity_9u06oy$($(Ep));if(null==(q=null==(U=H.componentManager.getComponents_ahlfl2$(H).get_11rb$($(Ep)))||e.isType(U,Ep)?U:P()))throw I("Component "+$(Ep).simpleName+" is not found");var G,K,V=q.requested,Y=this.componentManager.getSingletonEntity_9u06oy$($(vp));if(null==(K=null==(G=Y.componentManager.getComponents_ahlfl2$(Y).get_11rb$($(vp)))||e.isType(G,vp)?G:P()))throw I("Component "+$(vp).simpleName+" is not found");F.addAll_brywnq$(b(V,K.keys()));var W,X,Z=this.componentManager.getSingletonEntity_9u06oy$($(bp));if(null==(X=null==(W=Z.componentManager.getComponents_ahlfl2$(Z).get_11rb$($(bp)))||e.isType(W,bp)?W:P()))throw I("Component "+$(bp).simpleName+" is not found");X.addAll_euygzw$(s);var J,Q,tt=this.componentManager.getSingletonEntity_9u06oy$($(Pp));if(null==(Q=null==(J=tt.componentManager.getComponents_ahlfl2$(tt).get_11rb$($(Pp)))||e.isType(J,Pp)?J:P()))throw I("Component "+$(Pp).simpleName+" is not found");Q.setEmitted_euygzw$(F)},zp.prototype.findTransformedFragments_0=function(){for(var t=rt(),n=this.myWaitingForScreenGeometry_0.values.iterator();n.hasNext();){var i=n.next();if(i.contains_9u06oy$($(Qh))){var o,r;if(null==(r=null==(o=i.componentManager.getComponents_ahlfl2$(i).get_11rb$($(Tp)))||e.isType(o,Tp)?o:P()))throw I("Component "+$(Tp).simpleName+" is not found");var a=r.fragmentKey;t.put_xwzc9p$(a,i),n.remove()}}return t},zp.prototype.createFragmentEntity_0=function(t,n,i){if(n.isEmpty())throw _t("Failed requirement.".toString());var o,r,a,s=this.createEntity_61zpoe$(hh().entityName_k4wxx5$(t)),l=rp().zoom_27pd89$(D("zoom",function(t){return t.zoom()}.bind(null,t))),u=Tc(Oc(Hh().resampling_prkczh$(n,D("project",function(t,e){return t.project_11rb$(e)}.bind(null,i))),Bp(s,this,l)),(o=s,r=t,a=this,function(t){a.runLaterBySystem_ayosff$(o,Fp(r,t,a))}));s.add_57nep2$(new qc(u,this.myProjectionQuant_0));var c,p,h=this.componentManager.getSingletonEntity_9u06oy$($(Ap));if(null==(p=null==(c=h.componentManager.getComponents_ahlfl2$(h).get_11rb$($(Ap)))||e.isType(c,Ap)?c:P()))throw I("Component "+$(Ap).simpleName+" is not found");return p.set_adz6c2$(t,s),s},zp.$metadata$={kind:m,simpleName:"FragmentEmitSystem",interfaces:[Ls]},Up.prototype.zoom=function(){return Tn(this.quadKey)},Up.$metadata$={kind:m,simpleName:"FragmentKey",interfaces:[]},Up.prototype.component1=function(){return this.regionId},Up.prototype.component2=function(){return this.quadKey},Up.prototype.copy_cwu9hm$=function(t,e){return new Up(void 0===t?this.regionId:t,void 0===e?this.quadKey:e)},Up.prototype.toString=function(){return"FragmentKey(regionId="+e.toString(this.regionId)+", quadKey="+e.toString(this.quadKey)+")"},Up.prototype.hashCode=function(){var t=0;return 31*(t=31*t+e.hashCode(this.regionId)|0)+e.hashCode(this.quadKey)|0},Up.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.regionId,t.regionId)&&e.equals(this.quadKey,t.quadKey)},Hp.prototype.getFragments_u051w$=function(t,e){var n,i,o=rt(),r=!1;for(n=t.iterator();n.hasNext();){var a=n.next(),s=S();for(i=e.iterator();i.hasNext();){var l=i.next();this.fragmentCache_u881rh$_0.contains_cwu9hm$(a,l)||(s.add_11rb$(l),r=!0)}s.isEmpty()||o.put_xwzc9p$(a,s)}if(!r)return St.Asyncs.constant_mh5how$(this.getCachedGeometries_t2k0vx$_0(t,e));var u,c,p,h=(new On).setIds_mhpeer$(t).addFeature_bdjexh$(Nn.FRAGMENTS).setFragments_g9b45l$(o).build();return this.geocodingService_cdrmvv$_0.execute_2yxzh4$(h).map_2o04qz$((u=e,c=t,p=this,function(t){var e,n;for(e=u.iterator();e.hasNext();){var i,o=e.next(),r=p;for(i=c.iterator();i.hasNext();){var a=i.next();r.fragmentCache_u881rh$_0.contains_cwu9hm$(a,o)||r.fragmentCache_u881rh$_0.putEmpty_cwu9hm$(a,o)}}for(n=t.iterator();n.hasNext();){var s,l,h=n.next(),_=p;if(null!=(s=h.fragments))for(l=s.iterator();l.hasNext();){var d=l.next();_.fragmentCache_u881rh$_0.put_ckpnrz$(h.id,d.key,d)}}return p.getCachedGeometries_t2k0vx$_0(c,u)}))},Hp.prototype.getCachedGeometries_t2k0vx$_0=function(t,e){var n,i=rt();for(n=t.iterator();n.hasNext();){var o,r=n.next(),a=S();for(o=e.iterator();o.hasNext();){var s,l=o.next();null!=(s=this.fragmentCache_u881rh$_0.get_cwu9hm$(r,l))&&D("add",function(t,e){return t.add_11rb$(e)}.bind(null,a))(s)}i.put_xwzc9p$(r,a)}return i},Gp.prototype.contains_cwu9hm$=function(t,e){var n,i;return null!=(i=null!=(n=this.cache_0.get_11rb$(e))?n.containsKey_11rb$(t):null)&&i},Gp.prototype.get_cwu9hm$=function(t,e){var n;return null!=(n=this.cache_0.get_11rb$(e))?n.get_11rb$(t):null},Gp.prototype.putEmpty_cwu9hm$=function(t,e){this.put_ckpnrz$(t,e,null)},Gp.prototype.put_ckpnrz$=function(t,e,n){this.cache_0.getOrPut_kpg1aj$(e,D("HashMap",(function(){return rt()}))).put_xwzc9p$(t,n)},Kp.prototype.calculateCachedSideTileCount_0=function(t){return E(2*t/Ca+1)},Kp.$metadata$={kind:l,simpleName:"Companion",interfaces:[]};var Vp=null;function Yp(){return null===Vp&&new Kp,Vp}function Wp(t){Qp(),Ls.call(this,t)}function Xp(t){return t.unaryPlus_jixjl7$(new Ep),t.unaryPlus_jixjl7$(new bp),t.unaryPlus_jixjl7$(new Cp),j}function Zp(){Jp=this,this.REGION_ENTITY_COMPONENTS=T([$(yh),$(Op),$(Np)])}Gp.$metadata$={kind:m,simpleName:"FragmentCache",interfaces:[]},Hp.$metadata$={kind:m,simpleName:"FragmentProvider",interfaces:[]},Wp.prototype.initImpl_4pvjek$=function(t){Xs(this.createEntity_61zpoe$("FragmentsChange"),Xp)},Wp.prototype.updateImpl_og8vrq$=function(t,n){var i,o,r,a,s,l=this.componentManager.getSingletonEntity_9u06oy$($(gm));if(null==(s=null==(a=l.componentManager.getComponents_ahlfl2$(l).get_11rb$($(gm)))||e.isType(a,gm)?a:P()))throw I("Component "+$(gm).simpleName+" is not found");var u,c,p=s,h=this.componentManager.getSingletonEntity_9u06oy$($(Ep));if(null==(c=null==(u=h.componentManager.getComponents_ahlfl2$(h).get_11rb$($(Ep)))||e.isType(u,Ep)?u:P()))throw I("Component "+$(Ep).simpleName+" is not found");var _,d,f=c,m=this.componentManager.getSingletonEntity_9u06oy$($(bp));if(null==(d=null==(_=m.componentManager.getComponents_ahlfl2$(m).get_11rb$($(bp)))||e.isType(_,bp)?_:P()))throw I("Component "+$(bp).simpleName+" is not found");var y,g,v=d,b=this.componentManager.getSingletonEntity_9u06oy$($(Cp));if(null==(g=null==(y=b.componentManager.getComponents_ahlfl2$(b).get_11rb$($(Cp)))||e.isType(y,Cp)?y:P()))throw I("Component "+$(Cp).simpleName+" is not found");var w=g.existingRegions,x=p.quadsToRemove,k=S(),C=S();for(i=this.getEntities_38uplf$(Qp().REGION_ENTITY_COMPONENTS).iterator();i.hasNext();){var E,T,O=i.next();if(null==(T=null==(E=O.componentManager.getComponents_ahlfl2$(O).get_11rb$($(Op)))||e.isType(E,Op)?E:P()))throw I("Component "+$(Op).simpleName+" is not found");var N,A,R=T.bbox;if(null==(A=null==(N=O.componentManager.getComponents_ahlfl2$(O).get_11rb$($(yh)))||e.isType(N,yh)?N:P()))throw I("Component "+$(yh).simpleName+" is not found");var j=A.regionId,L=p.quadsToLoad;for(w.contains_11rb$(j)||(L=p.visibleQuads,w.add_11rb$(j)),o=L.iterator();o.hasNext();){var z=o.next();!v.contains_ny6xdl$(j,z)&&this.intersect_0(R,z)&&k.add_11rb$(new Up(j,z))}for(r=x.iterator();r.hasNext();){var D=r.next();v.contains_ny6xdl$(j,D)||C.add_11rb$(new Up(j,D))}}f.setToAdd_7xa9to$(k),f.setToRemove_7xa9to$(C)},Wp.prototype.intersect_0=function(t,e){var n,i=Pn(e);for(n=t.splitByAntiMeridian().iterator();n.hasNext();){var o=n.next();if(In(o,i))return!0}return!1},Zp.$metadata$={kind:l,simpleName:"Companion",interfaces:[]};var Jp=null;function Qp(){return null===Jp&&new Zp,Jp}function th(t,e){Ls.call(this,e),this.myCacheSize_0=t}function eh(t){Ls.call(this,t),this.myRegionIndex_0=new ah(t),this.myPendingFragments_0=rt(),this.myPendingZoom_0=-1}function nh(){this.myWaitingFragments_0=Ke(),this.myReadyFragments_0=Ke(),this.myIsDone_0=!1}function ih(){}function oh(t){return function(e){return t.nop_0(),j}}function rh(){ph=this}function ah(t){this.myComponentManager_0=t,this.myRegionIndex_0=new rs(1e4)}function sh(t){ch(),this.myValues_0=t}function lh(){uh=this}Wp.$metadata$={kind:m,simpleName:"FragmentUpdateSystem",interfaces:[Ls]},th.prototype.updateImpl_og8vrq$=function(t,n){var i,o,r,a,s,l=this.componentManager.getSingletonEntity_9u06oy$($(Ep));if(null==(a=null==(r=l.componentManager.getComponents_ahlfl2$(l).get_11rb$($(Ep)))||e.isType(r,Ep)?r:P()))throw I("Component "+$(Ep).simpleName+" is not found");if(a.anyChanges()){var u,c,p=this.componentManager.getSingletonEntity_9u06oy$($(Ep));if(null==(c=null==(u=p.componentManager.getComponents_ahlfl2$(p).get_11rb$($(Ep)))||e.isType(u,Ep)?u:P()))throw I("Component "+$(Ep).simpleName+" is not found");var h,_,d,f=c.requested,m=Ke(),y=this.componentManager.getSingletonEntity_9u06oy$($(Ap));if(null==(d=null==(_=y.componentManager.getComponents_ahlfl2$(y).get_11rb$($(Ap)))||e.isType(_,Ap)?_:P()))throw I("Component "+$(Ap).simpleName+" is not found");var g,v=d,b=Ke();if(!f.isEmpty()){var w=Ye(f).zoom();for(h=v.keys().iterator();h.hasNext();){var x=h.next();x.zoom()===w?m.add_11rb$(x):b.add_11rb$(x)}}for(g=b.iterator();g.hasNext();){var k,C=g.next();null!=(k=v.getEntity_swlqxw$(C))&&k.remove(),v.remove_swlqxw$(C)}var E=Ke();for(i=this.getEntities_9u06oy$($(Np)).iterator();i.hasNext();){var S,T,O=i.next();if(null==(T=null==(S=O.componentManager.getComponents_ahlfl2$(O).get_11rb$($(Np)))||e.isType(S,Np)?S:P()))throw I("Component "+$(Np).simpleName+" is not found");var N,A=T.fragments,R=It(Pt(A,10));for(N=A.iterator();N.hasNext();){var j,L,z=N.next(),D=R.add_11rb$;if(null==(L=null==(j=z.componentManager.getComponents_ahlfl2$(z).get_11rb$($(Tp)))||e.isType(j,Tp)?j:P()))throw I("Component "+$(Tp).simpleName+" is not found");D.call(R,L.fragmentKey)}E.addAll_brywnq$(R)}var M,B,F=this.componentManager.getSingletonEntity_9u06oy$($(vp));if(null==(B=null==(M=F.componentManager.getComponents_ahlfl2$(F).get_11rb$($(vp)))||e.isType(M,vp)?M:P()))throw I("Component "+$(vp).simpleName+" is not found");var U,q,H=B,G=this.componentManager.getSingletonEntity_9u06oy$($(gm));if(null==(q=null==(U=G.componentManager.getComponents_ahlfl2$(G).get_11rb$($(gm)))||e.isType(U,gm)?U:P()))throw I("Component "+$(gm).simpleName+" is not found");var K,V,Y=q.visibleQuads,W=An(H.keys()),X=this.componentManager.getSingletonEntity_9u06oy$($(Ep));if(null==(V=null==(K=X.componentManager.getComponents_ahlfl2$(X).get_11rb$($(Ep)))||e.isType(K,Ep)?K:P()))throw I("Component "+$(Ep).simpleName+" is not found");W.addAll_brywnq$(V.obsolete),W.removeAll_brywnq$(f),W.removeAll_brywnq$(E),W.removeAll_brywnq$(m),Rn(W,(s=Y,function(t){return s.contains_11rb$(t.quadKey)}));for(var Z=W.size-this.myCacheSize_0|0,J=W.iterator();J.hasNext()&&(Z=(o=Z)-1|0,o>0);){var Q=J.next();H.contains_swlqxw$(Q)&&H.dispose_k4wxx5$(Q)}}},th.$metadata$={kind:m,simpleName:"FragmentsRemovingSystem",interfaces:[Ls]},eh.prototype.initImpl_4pvjek$=function(t){this.createEntity_61zpoe$("emitted_regions").add_57nep2$(new Ip)},eh.prototype.updateImpl_og8vrq$=function(t,n){var i;t.camera.isZoomFractionChanged&&t.camera.isZoomLevelChanged&&(this.myPendingZoom_0=E(t.camera.zoom),this.myPendingFragments_0.clear());var o,r,a=this.componentManager.getSingletonEntity_9u06oy$($(Ep));if(null==(r=null==(o=a.componentManager.getComponents_ahlfl2$(a).get_11rb$($(Ep)))||e.isType(o,Ep)?o:P()))throw I("Component "+$(Ep).simpleName+" is not found");var s,l=r.requested,u=D("wait",function(t,e){return t.wait_0(e),j}.bind(null,this));for(s=l.iterator();s.hasNext();)u(s.next());var c,p,h=this.componentManager.getSingletonEntity_9u06oy$($(Ep));if(null==(p=null==(c=h.componentManager.getComponents_ahlfl2$(h).get_11rb$($(Ep)))||e.isType(c,Ep)?c:P()))throw I("Component "+$(Ep).simpleName+" is not found");var _,d=p.obsolete,f=D("remove",function(t,e){return t.remove_0(e),j}.bind(null,this));for(_=d.iterator();_.hasNext();)f(_.next());var m,y,g=this.componentManager.getSingletonEntity_9u06oy$($(Pp));if(null==(y=null==(m=g.componentManager.getComponents_ahlfl2$(g).get_11rb$($(Pp)))||e.isType(m,Pp)?m:P()))throw I("Component "+$(Pp).simpleName+" is not found");var v,b=y.keys_8be2vx$(),w=D("accept",function(t,e){return t.accept_0(e),j}.bind(null,this));for(v=b.iterator();v.hasNext();)w(v.next());var x,k,C=this.componentManager.getSingletonEntity_9u06oy$($(Ip));if(null==(k=null==(x=C.componentManager.getComponents_ahlfl2$(C).get_11rb$($(Ip)))||e.isType(x,Ip)?x:P()))throw I("Component "+$(Ip).simpleName+" is not found");var S=k;for(S.keys().clear(),i=this.checkReadyRegions_0().iterator();i.hasNext();){var T=i.next();S.keys().add_11rb$(T),this.renderRegion_0(T)}},eh.prototype.renderRegion_0=function(t){var n,i,o=this.myRegionIndex_0.find_61zpoe$(t),r=this.componentManager.getSingletonEntity_9u06oy$($(vp));if(null==(i=null==(n=r.componentManager.getComponents_ahlfl2$(r).get_11rb$($(vp)))||e.isType(n,vp)?n:P()))throw I("Component "+$(vp).simpleName+" is not found");var a,s,l=i;if(null==(s=null==(a=o.componentManager.getComponents_ahlfl2$(o).get_11rb$($(Np)))||e.isType(a,Np)?a:P()))throw I("Component "+$(Np).simpleName+" is not found");var u,c=h(this.myPendingFragments_0.get_11rb$(t)).readyFragments(),p=D("get",function(t,e){return t.get_k4wxx5$(e)}.bind(null,l)),_=S();for(u=c.iterator();u.hasNext();){var d;null!=(d=p(u.next()))&&_.add_11rb$(d)}s.fragments=_,mc().tagDirtyParentLayer_ahlfl2$(o)},eh.prototype.wait_0=function(t){if(this.myPendingZoom_0===t.zoom()){var e,n=this.myPendingFragments_0,i=t.regionId,o=n.get_11rb$(i);if(null==o){var r=new nh;n.put_xwzc9p$(i,r),e=r}else e=o;e.waitFragment_k4wxx5$(t)}},eh.prototype.accept_0=function(t){var e;this.myPendingZoom_0===t.zoom()&&null!=(e=this.myPendingFragments_0.get_11rb$(t.regionId))&&e.accept_k4wxx5$(t)},eh.prototype.remove_0=function(t){var e;this.myPendingZoom_0===t.zoom()&&null!=(e=this.myPendingFragments_0.get_11rb$(t.regionId))&&e.remove_k4wxx5$(t)},eh.prototype.checkReadyRegions_0=function(){var t,e=S();for(t=this.myPendingFragments_0.entries.iterator();t.hasNext();){var n=t.next(),i=n.key;n.value.checkDone()&&e.add_11rb$(i)}return e},nh.prototype.waitFragment_k4wxx5$=function(t){this.myWaitingFragments_0.add_11rb$(t),this.myIsDone_0=!1},nh.prototype.accept_k4wxx5$=function(t){this.myReadyFragments_0.add_11rb$(t),this.remove_k4wxx5$(t)},nh.prototype.remove_k4wxx5$=function(t){this.myWaitingFragments_0.remove_11rb$(t),this.myWaitingFragments_0.isEmpty()&&(this.myIsDone_0=!0)},nh.prototype.checkDone=function(){return!!this.myIsDone_0&&(this.myIsDone_0=!1,!0)},nh.prototype.readyFragments=function(){return this.myReadyFragments_0},nh.$metadata$={kind:m,simpleName:"PendingFragments",interfaces:[]},eh.$metadata$={kind:m,simpleName:"RegionEmitSystem",interfaces:[Ls]},ih.prototype.render_j83es7$=function(t,n){var i,o,r,a,s,l,u;if(null==(u=null==(l=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(Np)))||e.isType(l,Np)?l:P()))throw I("Component "+$(Np).simpleName+" is not found");var c=u.fragments;if(!c.isEmpty()){for(i=c.iterator();i.hasNext();){var p,h=i.next();if(h.contains_9u06oy$($(Qh))){var _,d;if(null==(d=null==(_=h.componentManager.getComponents_ahlfl2$(h).get_11rb$($(Qh)))||e.isType(_,Qh)?_:P()))throw I("Component "+$(Qh).simpleName+" is not found");p=d}else p=null;var f=null==p;if(!f){var m;if(h.contains_9u06oy$($(Xf))){var y,g;if(null==(g=null==(y=h.componentManager.getComponents_ahlfl2$(h).get_11rb$($(Xf)))||e.isType(y,Xf)?y:P()))throw I("Component "+$(Xf).simpleName+" is not found");m=g}else m=null;f=null==m}if(f)return}var v,b;if(null==(b=null==(v=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(Nr)))||e.isType(v,Nr)?v:P()))throw I("Component "+$(Nr).simpleName+" is not found");n.setFillStyle_2160e9$(b.fillColor),n.setStrokeStyle_2160e9$(b.strokeColor),n.setLineWidth_14dthe$(b.strokeWidth);var w,x,k=Ye(c);if(null==(x=null==(w=k.componentManager.getComponents_ahlfl2$(k).get_11rb$($(Yh)))||e.isType(w,Yh)?w:P()))throw I("Component "+$(Yh).simpleName+" is not found");for(n.scale_14dthe$(x.scale),o=c.iterator();o.hasNext();){var C,E=o.next();if(E.contains_9u06oy$($(Qh))){var S,T;if(null==(T=null==(S=E.componentManager.getComponents_ahlfl2$(E).get_11rb$($(Qh)))||e.isType(S,Qh)?S:P()))throw I("Component "+$(Qh).simpleName+" is not found");C=T}else C=null;if(null==(r=C))throw I("".toString());var O,N=r;if(E.contains_9u06oy$($(Xf))){var A,R;if(null==(R=null==(A=E.componentManager.getComponents_ahlfl2$(E).get_11rb$($(Xf)))||e.isType(A,Xf)?A:P()))throw I("Component "+$(Xf).simpleName+" is not found");O=R}else O=null;if(null==(a=O))throw I("".toString());for(s=a.origins.iterator();s.hasNext();){var j=s.next();n.save(),n.beginPath();var L,z,D=Ye(c);if(null==(z=null==(L=D.componentManager.getComponents_ahlfl2$(D).get_11rb$($(Yh)))||e.isType(L,Yh)?L:P()))throw I("Component "+$(Yh).simpleName+" is not found");g_(n,U(j,z.scale)),wa().drawLines_2iqieo$(N.geometry,n,oh(this)),n.fill(),n.restore()}}}},ih.prototype.nop_0=function(){},ih.$metadata$={kind:m,simpleName:"RegionRenderer",interfaces:[T_]},rh.prototype.entityName_k4wxx5$=function(t){return this.entityName_cwu9hm$(t.regionId,t.quadKey)},rh.prototype.entityName_cwu9hm$=function(t,e){return"fragment_"+t+"_"+e.key},ah.prototype.find_61zpoe$=function(t){var n,i,o;if(this.myRegionIndex_0.containsKey_11rb$(t)){var r;if(i=this.myComponentManager_0,null==(n=this.myRegionIndex_0.get_11rb$(t)))throw I("".toString());return r=n,i.getEntityById_za3lpa$(r)}for(o=this.myComponentManager_0.getEntities_9u06oy$($(yh)).iterator();o.hasNext();){var a,s,l=o.next();if(null==(s=null==(a=l.componentManager.getComponents_ahlfl2$(l).get_11rb$($(yh)))||e.isType(a,yh)?a:P()))throw I("Component "+$(yh).simpleName+" is not found");if(_(s.regionId,t))return this.myRegionIndex_0.put_xwzc9p$(t,l.id_8be2vx$),l}throw I("".toString())},ah.$metadata$={kind:m,simpleName:"RegionsIndex",interfaces:[]},sh.prototype.exclude_8tsrz2$=function(t){return this.myValues_0.removeAll_brywnq$(t),this},sh.prototype.get=function(){return this.myValues_0},lh.prototype.ofCopy_euygzw$=function(t){return new sh(An(t))},lh.$metadata$={kind:l,simpleName:"Companion",interfaces:[]};var uh=null;function ch(){return null===uh&&new lh,uh}sh.$metadata$={kind:m,simpleName:"SetBuilder",interfaces:[]},rh.$metadata$={kind:l,simpleName:"Utils",interfaces:[]};var ph=null;function hh(){return null===ph&&new rh,ph}function _h(t){$h(),Ls.call(this,t),this.myMapProjection_1mw1qp$_0=this.myMapProjection_1mw1qp$_0}function dh(t,e){return function(n){var i;if(null!=(i=t.myMapProjection_0.project_11rb$(t.get_point_0(e)))){var o=e;t.get_worldPointInitializer_0(o)(n,i)}return j}}function fh(){mh=this,this.NEED_APPLY=T([$(Sh),$(Th)])}Object.defineProperty(_h.prototype,"myMapProjection_0",{configurable:!0,get:function(){return null==this.myMapProjection_1mw1qp$_0?A("myMapProjection"):this.myMapProjection_1mw1qp$_0},set:function(t){this.myMapProjection_1mw1qp$_0=t}}),_h.prototype.initImpl_4pvjek$=function(t){this.myMapProjection_0=t.mapProjection},_h.prototype.updateImpl_og8vrq$=function(t,e){var n;for(n=this.getMutableEntities_38uplf$($h().NEED_APPLY).iterator();n.hasNext();){var i=n.next();Xs(i,dh(this,i)),mc().tagDirtyParentLayer_ahlfl2$(i),i.removeComponent_9u06oy$($(Sh)),i.removeComponent_9u06oy$($(Th))}},_h.prototype.get_point_0=function(t){var n,i;if(null==(i=null==(n=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(Sh)))||e.isType(n,Sh)?n:P()))throw I("Component "+$(Sh).simpleName+" is not found");return i.point},_h.prototype.get_worldPointInitializer_0=function(t){var n,i;if(null==(i=null==(n=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(Th)))||e.isType(n,Th)?n:P()))throw I("Component "+$(Th).simpleName+" is not found");return i.worldPointInitializer},fh.$metadata$={kind:l,simpleName:"Companion",interfaces:[]};var mh=null;function $h(){return null===mh&&new fh,mh}function yh(t){this.regionId=t}function gh(){vh=this}_h.$metadata$={kind:m,simpleName:"ApplyPointSystem",interfaces:[Ls]},yh.$metadata$={kind:m,simpleName:"RegionIdComponent",interfaces:[qs]},gh.$metadata$={kind:l,simpleName:"NeedLocationComponent",interfaces:[qs]};var vh=null;function bh(){return null===vh&&new gh,vh}function wh(){}function xh(){kh=this}wh.$metadata$={kind:l,simpleName:"NeedGeocodeLocationComponent",interfaces:[qs]},xh.$metadata$={kind:l,simpleName:"NeedCalculateLocationComponent",interfaces:[qs]};var kh=null;function Ch(){return null===kh&&new xh,kh}function Eh(){this.myWaitingCount_0=null,this.locations=S()}function Sh(t){this.point=t}function Th(t){this.worldPointInitializer=t}function Oh(t,e,n){Ih(),Ls.call(this,n),this.mapRuler_0=t,this.mapProjection_0=e,this.myLocation_f4pf0e$_0=this.myLocation_f4pf0e$_0}function Nh(){Ph=this,this.READY_CALCULATE=ht($(xh))}Eh.prototype.add_m7vcan$=function(t){this.locations.add_11rb$(t)},Eh.prototype.wait_za3lpa$=function(t){var e,n;this.myWaitingCount_0=null!=(n=null!=(e=this.myWaitingCount_0)?e+t|0:null)?n:t},Eh.prototype.isReady=function(){return null!=this.myWaitingCount_0&&this.myWaitingCount_0===this.locations.size},Eh.$metadata$={kind:m,simpleName:"LocationComponent",interfaces:[qs]},Sh.$metadata$={kind:m,simpleName:"LonLatComponent",interfaces:[qs]},Th.$metadata$={kind:m,simpleName:"PointInitializerComponent",interfaces:[qs]},Object.defineProperty(Oh.prototype,"myLocation_0",{configurable:!0,get:function(){return null==this.myLocation_f4pf0e$_0?A("myLocation"):this.myLocation_f4pf0e$_0},set:function(t){this.myLocation_f4pf0e$_0=t}}),Oh.prototype.initImpl_4pvjek$=function(t){var n,i,o=this.componentManager.getSingletonEntity_9u06oy$($(Eh));if(null==(i=null==(n=o.componentManager.getComponents_ahlfl2$(o).get_11rb$($(Eh)))||e.isType(n,Eh)?n:P()))throw I("Component "+$(Eh).simpleName+" is not found");this.myLocation_0=i},Oh.prototype.updateImpl_og8vrq$=function(t,n){var i;for(i=this.getMutableEntities_38uplf$(Ih().READY_CALCULATE).iterator();i.hasNext();){var o,r,a,s,l,u,c=i.next();if(c.contains_9u06oy$($(Or))){var p,h,_=this.mapRuler_0;if(null==(h=null==(p=c.componentManager.getComponents_ahlfl2$(c).get_11rb$($(Or)))||e.isType(p,Or)?p:P()))throw I("Component "+$(Or).simpleName+" is not found");u=_.calculateBoundingBox_yqwbdx$(ht(h.location))}else if(c.contains_9u06oy$($(r_))){var d,f;if(null==(f=null==(d=c.componentManager.getComponents_ahlfl2$(c).get_11rb$($(r_)))||e.isType(d,r_)?d:P()))throw I("Component "+$(r_).simpleName+" is not found");if(null==(r=null!=(o=f.geometry)?this.mapRuler_0.calculateBoundingBox_yqwbdx$(jn(o)):null))throw I("Unexpected - no geometry".toString());u=r}else if(c.contains_9u06oy$($(Wf))){var m,y,g;if(null==(y=null==(m=c.componentManager.getComponents_ahlfl2$(c).get_11rb$($(Wf)))||e.isType(m,Wf)?m:P()))throw I("Component "+$(Wf).simpleName+" is not found");if(a=y.origin,c.contains_9u06oy$($(Yf))){var v,b;if(null==(b=null==(v=c.componentManager.getComponents_ahlfl2$(c).get_11rb$($(Yf)))||e.isType(v,Yf)?v:P()))throw I("Component "+$(Yf).simpleName+" is not found");g=b}else g=null;u=new kt(a,null!=(l=null!=(s=g)?s.dimension:null)?l:Ai().ZERO_VEC)}else if(c.contains_9u06oy$($(Op))){var w,x,k=Dh();if(null==(x=null==(w=c.componentManager.getComponents_ahlfl2$(c).get_11rb$($(Op)))||e.isType(w,Op)?w:P()))throw I("Component "+$(Op).simpleName+" is not found");var C=k.convertToWorldRects_7iiq3f$(x.bbox,this.mapProjection_0);u=this.mapRuler_0.calculateBoundingBox_yqwbdx$(C)}else u=null;null!=u&&(this.myLocation_0.add_m7vcan$(u),c.removeComponent_9u06oy$($(xh)))}},Nh.$metadata$={kind:l,simpleName:"Companion",interfaces:[]};var Ph=null;function Ih(){return null===Ph&&new Nh,Ph}function Ah(t,e){Ls.call(this,t),this.myNeedLocation_0=e,this.myLocation_0=new Eh}function Rh(t,e,n){Dh(),this.myGeocodingService_0=t,this.myMapRuler_0=e,this.myMapProjection_0=n}function jh(){zh=this}Oh.$metadata$={kind:m,simpleName:"LocationCalculateSystem",interfaces:[Ls]},Ah.prototype.initImpl_4pvjek$=function(t){this.createEntity_61zpoe$("LocationSingleton").add_57nep2$(this.myLocation_0)},Ah.prototype.updateImpl_og8vrq$=function(t,e){var n,i,o=Ue(this.componentManager.getEntities_9u06oy$($(gh)));if(this.myNeedLocation_0)this.myLocation_0.wait_za3lpa$(o.size);else for(n=o.iterator();n.hasNext();){var r=n.next();r.removeComponent_9u06oy$($(xh)),r.removeComponent_9u06oy$($(wh))}for(i=o.iterator();i.hasNext();)i.next().removeComponent_9u06oy$($(gh))},Ah.$metadata$={kind:m,simpleName:"LocationCounterSystem",interfaces:[Ls]},Rh.prototype.geocodeMapRegion_4x05nu$=function(t){var e,n=this.createRequestBuilder_0(t).addFeature_bdjexh$(Nn.CENTROID).addFeature_bdjexh$(Nn.POSITION).build();return D("execute",function(t,e){return t.execute_2yxzh4$(e)}.bind(null,this.myGeocodingService_0))(n).map_2o04qz$((e=this,function(t){var n,i,o,r;if(t.isEmpty())throw Rt("There is no geocoded feature for location.");if(1===t.size){var a=Ln(t);return n=e.myMapRuler_0,i=e.calculateBBoxOfGeoRect_12lugk$(h(a.position)),r=null!=(o=e.myMapProjection_0.project_11rb$(zn(h(a.centroid))))?o:c(0,0),e.calculateExtendedRectangleWithCenter_0(n,i,r)}var s,l=It(Pt(t,10));for(s=t.iterator();s.hasNext();){var u=s.next();l.add_11rb$(h(u.position))}return D("calculateBBoxOfGeoRects",function(t,e){return t.calculateBBoxOfGeoRects_0(e)}.bind(null,e))(l)}))},Rh.prototype.createRequestBuilder_0=function(t){if(!t.containsId())throw _t("location should contain geocode".toString());return(new On).setIds_mhpeer$(t.idList)},Rh.prototype.calculateBBoxOfGeoRect_12lugk$=function(t){return this.myMapRuler_0.calculateBoundingBox_yqwbdx$(Dh().convertToWorldRects_7iiq3f$(t,this.myMapProjection_0))},Rh.prototype.calculateBBoxOfGeoRects_0=function(t){var e,n=S();for(e=t.iterator();e.hasNext();){var i=e.next();n.addAll_brywnq$(Dh().convertToWorldRects_7iiq3f$(i,this.myMapProjection_0))}return this.myMapRuler_0.calculateBoundingBox_yqwbdx$(n)},Rh.prototype.calculateExtendedRectangleWithCenter_0=function(t,e,n){var i=this.calculateRadius_0(n.x,wt(e),xt(e),D("distanceX",function(t,e,n){return t.distanceX_lu1900$(e,n)}.bind(null,t))),o=this.calculateRadius_0(n.y,Ct(e),Et(e),D("distanceY",function(t,e,n){return t.distanceY_lu1900$(e,n)}.bind(null,t)));return ye(n.x-i,n.y-o,2*i,2*o)},Rh.prototype.calculateRadius_0=function(t,e,n,i){var o=e+n,r=i(t,e),a=i(t,o),s=et.min(r,a);return ie(e,o).contains_mef7kx$(t)?n-s:n+s},jh.prototype.convertToWorldRects_7iiq3f$=function(t,e){var n,i=t.splitByAntiMeridian(),o=S();for(n=i.iterator();n.hasNext();){var r,a=n.next();null!=(r=Tt.Transforms.transformBBox_3w2x7e$(a,D("project",function(t,e){return t.project_11rb$(e)}.bind(null,e))))&&o.add_11rb$(r)}return o},jh.$metadata$={kind:l,simpleName:"Companion",interfaces:[]};var Lh,zh=null;function Dh(){return null===zh&&new jh,zh}function Mh(t,e,n){Ls.call(this,t),this.myZoom_0=e,this.myLocationRect_0=n,this.myLocation_9g9fb6$_0=this.myLocation_9g9fb6$_0,this.myViewport_3hrnxt$_0=this.myViewport_3hrnxt$_0,this.myDefaultLocation_fypjfr$_0=this.myDefaultLocation_fypjfr$_0,this.myNeedLocation_0=!0}function Bh(t,e){return function(n){t.myNeedLocation_0=!1;var i=t,o=ht(n);return i.calculatePosition_0(D("calculateBoundingBox",function(t,e){return t.calculateBoundingBox_wa2m8g$(e)}.bind(null,t.myViewport_0))(o),function(t,e){return function(n,i){return e.initMapPoisition_0(t,n,i),j}}(e,t)),j}}function Fh(){qh=this}function Uh(t){this.myTransform_0=t,this.myAdaptiveResampling_0=new Mn(this.myTransform_0,Lh),this.myPrevPoint_0=null,this.myRing_0=null}Rh.$metadata$={kind:m,simpleName:"MapLocationGeocoder",interfaces:[]},Object.defineProperty(Mh.prototype,"myLocation_0",{configurable:!0,get:function(){return null==this.myLocation_9g9fb6$_0?A("myLocation"):this.myLocation_9g9fb6$_0},set:function(t){this.myLocation_9g9fb6$_0=t}}),Object.defineProperty(Mh.prototype,"myViewport_0",{configurable:!0,get:function(){return null==this.myViewport_3hrnxt$_0?A("myViewport"):this.myViewport_3hrnxt$_0},set:function(t){this.myViewport_3hrnxt$_0=t}}),Object.defineProperty(Mh.prototype,"myDefaultLocation_0",{configurable:!0,get:function(){return null==this.myDefaultLocation_fypjfr$_0?A("myDefaultLocation"):this.myDefaultLocation_fypjfr$_0},set:function(t){this.myDefaultLocation_fypjfr$_0=t}}),Mh.prototype.initImpl_4pvjek$=function(t){var n,i,o=this.componentManager.getSingletonEntity_9u06oy$($(Eh));if(null==(i=null==(n=o.componentManager.getComponents_ahlfl2$(o).get_11rb$($(Eh)))||e.isType(n,Eh)?n:P()))throw I("Component "+$(Eh).simpleName+" is not found");this.myLocation_0=i,this.myViewport_0=t.mapRenderContext.viewport,this.myDefaultLocation_0=Dh().convertToWorldRects_7iiq3f$(Sa,t.mapProjection)},Mh.prototype.updateImpl_og8vrq$=function(t,e){var n,i,o;if(this.myNeedLocation_0)if(null!=this.myLocationRect_0)this.myLocationRect_0.map_2o04qz$(Bh(this,t));else if(this.myLocation_0.isReady()){this.myNeedLocation_0=!1;var r=this.myLocation_0.locations,a=null!=(n=r.isEmpty()?null:r)?n:this.myDefaultLocation_0;this.calculatePosition_0(D("calculateBoundingBox",function(t,e){return t.calculateBoundingBox_wa2m8g$(e)}.bind(null,this.myViewport_0))(a),(i=t,o=this,function(t,e){return o.initMapPoisition_0(i,t,e),j}))}},Mh.prototype.calculatePosition_0=function(t,e){var n;null==(n=this.myZoom_0)&&(n=0!==t.dimension.x&&0!==t.dimension.y?this.calculateMaxZoom_0(t.dimension,this.myViewport_0.size):this.calculateMaxZoom_0(this.myViewport_0.calculateBoundingBox_wa2m8g$(this.myDefaultLocation_0).dimension,this.myViewport_0.size)),e(n,it(t))},Mh.prototype.initMapPoisition_0=function(t,e,n){var i=et.floor(e);t.camera.requestZoom_14dthe$(i),t.camera.requestPosition_v214yr$(n),t.initialPosition=n,t.initialZoom=E(i)},Mh.prototype.calculateMaxZoom_0=function(t,e){var n=this.calculateMaxZoom_1(t.x,e.x),i=this.calculateMaxZoom_1(t.y,e.y),o=et.min(n,i),r=this.myViewport_0.minZoom,a=this.myViewport_0.maxZoom,s=et.min(o,a);return et.max(r,s)},Mh.prototype.calculateMaxZoom_1=function(t,e){var n;if(0===t)n=this.myViewport_0.maxZoom;else if(0===e)n=this.myViewport_0.minZoom;else{var i=e/t;n=et.log(i)/et.log(2)}return n},Mh.$metadata$={kind:m,simpleName:"MapLocationInitializationSystem",interfaces:[Ls]},Fh.prototype.resampling_d2zb78$=function(t,e){return this.createTransformer_0(t,this.resampling_0(e))},Fh.prototype.simple_prkczh$=function(t,e){return new Vh(t,this.simple_0(e))},Fh.prototype.resampling_prkczh$=function(t,e){return new Vh(t,this.resampling_0(e))},Fh.prototype.simple_0=function(t){return e=t,function(t,n){var i;return null!=(i=e(t))&&n.add_11rb$(i),j};var e},Fh.prototype.resampling_0=function(t){return D("next",function(t,e,n){return t.next_2w6fi5$(e,n),j}.bind(null,new Uh(t)))},Fh.prototype.createTransformer_0=function(t,n){var i;switch(t.type.name){case"MULTI_POLYGON":i=Tc(new Vh(t.multiPolygon,n),D("createMultiPolygon",(function(t){return Dn.Companion.createMultiPolygon_8ft4gs$(t)})));break;case"MULTI_LINESTRING":i=Tc(new Gh(t.multiLineString,n),D("createMultiLineString",(function(t){return Dn.Companion.createMultiLineString_bc4hlz$(t)})));break;case"MULTI_POINT":i=Tc(new Kh(t.multiPoint,n),D("createMultiPoint",(function(t){return Dn.Companion.createMultiPoint_xgn53i$(t)})));break;default:i=e.noWhenBranchMatched()}return i},Uh.prototype.next_2w6fi5$=function(t,e){var n;null!=this.myRing_0&&e===this.myRing_0||(this.myRing_0=e,this.myPrevPoint_0=null);var i=this.myPrevPoint_0;if(this.myPrevPoint_0=t,null==i)null!=(n=this.myTransform_0(t))&&D("add",function(t,e){return t.add_11rb$(e)}.bind(null,h(this.myRing_0)))(n);else{var o,r=ae(this.myAdaptiveResampling_0.resample_rbt1hw$(i,t),1),a=D("add",function(t,e){return t.add_11rb$(e)}.bind(null,h(this.myRing_0)));for(o=r.iterator();o.hasNext();)a(o.next())}},Uh.$metadata$={kind:m,simpleName:"IterativeResampler",interfaces:[]},Fh.$metadata$={kind:l,simpleName:"GeometryTransform",interfaces:[]};var qh=null;function Hh(){return null===qh&&new Fh,qh}function Gh(t,n){this.myTransform_0=n,this.myLineStringIterator_go6o1r$_0=this.myLineStringIterator_go6o1r$_0,this.myPointIterator_8dl2ke$_0=this.myPointIterator_8dl2ke$_0,this.myNewLineString_0=S(),this.myNewMultiLineString_0=S(),this.myHasNext_0=!0,this.myResult_pphhuf$_0=this.myResult_pphhuf$_0;try{this.myLineStringIterator_0=t.iterator(),this.myPointIterator_0=this.myLineStringIterator_0.next().iterator()}catch(t){if(!e.isType(t,Un))throw t;Fn(t)}}function Kh(t,n){this.myTransform_0=n,this.myPointIterator_dr5tzt$_0=this.myPointIterator_dr5tzt$_0,this.myNewMultiPoint_0=S(),this.myHasNext_0=!0,this.myResult_kbfpjm$_0=this.myResult_kbfpjm$_0;try{this.myPointIterator_0=t.iterator()}catch(t){if(!e.isType(t,Un))throw t;Fn(t)}}function Vh(t,n){this.myTransform_0=n,this.myPolygonsIterator_luodmq$_0=this.myPolygonsIterator_luodmq$_0,this.myRingIterator_1fq3dz$_0=this.myRingIterator_1fq3dz$_0,this.myPointIterator_tmjm9$_0=this.myPointIterator_tmjm9$_0,this.myNewRing_0=S(),this.myNewPolygon_0=S(),this.myNewMultiPolygon_0=S(),this.myHasNext_0=!0,this.myResult_7m5cwo$_0=this.myResult_7m5cwo$_0;try{this.myPolygonsIterator_0=t.iterator(),this.myRingIterator_0=this.myPolygonsIterator_0.next().iterator(),this.myPointIterator_0=this.myRingIterator_0.next().iterator()}catch(t){if(!e.isType(t,Un))throw t;Fn(t)}}function Yh(){this.scale=1,this.zoom=0}function Wh(t){Jh(),Ls.call(this,t)}function Xh(){Zh=this,this.COMPONENT_TYPES_0=T([$(qf),$(Yh)])}Object.defineProperty(Gh.prototype,"myLineStringIterator_0",{configurable:!0,get:function(){return null==this.myLineStringIterator_go6o1r$_0?A("myLineStringIterator"):this.myLineStringIterator_go6o1r$_0},set:function(t){this.myLineStringIterator_go6o1r$_0=t}}),Object.defineProperty(Gh.prototype,"myPointIterator_0",{configurable:!0,get:function(){return null==this.myPointIterator_8dl2ke$_0?A("myPointIterator"):this.myPointIterator_8dl2ke$_0},set:function(t){this.myPointIterator_8dl2ke$_0=t}}),Object.defineProperty(Gh.prototype,"myResult_0",{configurable:!0,get:function(){return null==this.myResult_pphhuf$_0?A("myResult"):this.myResult_pphhuf$_0},set:function(t){this.myResult_pphhuf$_0=t}}),Gh.prototype.getResult=function(){return this.myResult_0},Gh.prototype.resume=function(){if(!this.myPointIterator_0.hasNext()){if(this.myNewMultiLineString_0.add_11rb$(new oe(this.myNewLineString_0)),!this.myLineStringIterator_0.hasNext())return this.myHasNext_0=!1,void(this.myResult_0=new Bn(this.myNewMultiLineString_0));this.myPointIterator_0=this.myLineStringIterator_0.next().iterator(),this.myNewLineString_0=S()}this.myTransform_0(this.myPointIterator_0.next(),this.myNewLineString_0)},Gh.prototype.alive=function(){return this.myHasNext_0},Gh.$metadata$={kind:m,simpleName:"MultiLineStringTransform",interfaces:[Sc]},Object.defineProperty(Kh.prototype,"myPointIterator_0",{configurable:!0,get:function(){return null==this.myPointIterator_dr5tzt$_0?A("myPointIterator"):this.myPointIterator_dr5tzt$_0},set:function(t){this.myPointIterator_dr5tzt$_0=t}}),Object.defineProperty(Kh.prototype,"myResult_0",{configurable:!0,get:function(){return null==this.myResult_kbfpjm$_0?A("myResult"):this.myResult_kbfpjm$_0},set:function(t){this.myResult_kbfpjm$_0=t}}),Kh.prototype.getResult=function(){return this.myResult_0},Kh.prototype.resume=function(){if(!this.myPointIterator_0.hasNext())return this.myHasNext_0=!1,void(this.myResult_0=new qn(this.myNewMultiPoint_0));this.myTransform_0(this.myPointIterator_0.next(),this.myNewMultiPoint_0)},Kh.prototype.alive=function(){return this.myHasNext_0},Kh.$metadata$={kind:m,simpleName:"MultiPointTransform",interfaces:[Sc]},Object.defineProperty(Vh.prototype,"myPolygonsIterator_0",{configurable:!0,get:function(){return null==this.myPolygonsIterator_luodmq$_0?A("myPolygonsIterator"):this.myPolygonsIterator_luodmq$_0},set:function(t){this.myPolygonsIterator_luodmq$_0=t}}),Object.defineProperty(Vh.prototype,"myRingIterator_0",{configurable:!0,get:function(){return null==this.myRingIterator_1fq3dz$_0?A("myRingIterator"):this.myRingIterator_1fq3dz$_0},set:function(t){this.myRingIterator_1fq3dz$_0=t}}),Object.defineProperty(Vh.prototype,"myPointIterator_0",{configurable:!0,get:function(){return null==this.myPointIterator_tmjm9$_0?A("myPointIterator"):this.myPointIterator_tmjm9$_0},set:function(t){this.myPointIterator_tmjm9$_0=t}}),Object.defineProperty(Vh.prototype,"myResult_0",{configurable:!0,get:function(){return null==this.myResult_7m5cwo$_0?A("myResult"):this.myResult_7m5cwo$_0},set:function(t){this.myResult_7m5cwo$_0=t}}),Vh.prototype.getResult=function(){return this.myResult_0},Vh.prototype.resume=function(){if(!this.myPointIterator_0.hasNext())if(this.myNewPolygon_0.add_11rb$(new gt(this.myNewRing_0)),this.myRingIterator_0.hasNext())this.myPointIterator_0=this.myRingIterator_0.next().iterator(),this.myNewRing_0=S();else{if(this.myNewMultiPolygon_0.add_11rb$(new vt(this.myNewPolygon_0)),!this.myPolygonsIterator_0.hasNext())return this.myHasNext_0=!1,void(this.myResult_0=new bt(this.myNewMultiPolygon_0));this.myRingIterator_0=this.myPolygonsIterator_0.next().iterator(),this.myPointIterator_0=this.myRingIterator_0.next().iterator(),this.myNewRing_0=S(),this.myNewPolygon_0=S()}this.myTransform_0(this.myPointIterator_0.next(),this.myNewRing_0)},Vh.prototype.alive=function(){return this.myHasNext_0},Vh.$metadata$={kind:m,simpleName:"MultiPolygonTransform",interfaces:[Sc]},Yh.$metadata$={kind:m,simpleName:"ScaleComponent",interfaces:[qs]},Wh.prototype.updateImpl_og8vrq$=function(t,n){var i;if(t.camera.isZoomLevelChanged)for(i=this.getEntities_38uplf$(Jh().COMPONENT_TYPES_0).iterator();i.hasNext();){var o,r,a=i.next();if(null==(r=null==(o=a.componentManager.getComponents_ahlfl2$(a).get_11rb$($(Yh)))||e.isType(o,Yh)?o:P()))throw I("Component "+$(Yh).simpleName+" is not found");var s=r,l=t.camera.zoom-s.zoom,u=et.pow(2,l);s.scale=u}},Xh.$metadata$={kind:l,simpleName:"Companion",interfaces:[]};var Zh=null;function Jh(){return null===Zh&&new Xh,Zh}function Qh(){this.geometry_ycd7cj$_0=this.geometry_ycd7cj$_0,this.zoom=0}function t_(t,e){o_(),Ls.call(this,e),this.myQuantIterations_0=t}function e_(t,n,i){return function(o){return i.runLaterBySystem_ayosff$(t,function(t,n){return function(i){var o,r;if(mc().tagDirtyParentLayer_ahlfl2$(i),i.contains_9u06oy$($(Qh))){var a,s;if(null==(s=null==(a=i.componentManager.getComponents_ahlfl2$(i).get_11rb$($(Qh)))||e.isType(a,Qh)?a:P()))throw I("Component "+$(Qh).simpleName+" is not found");r=s}else{var l=new Qh;i.add_57nep2$(l),r=l}var u,c=r,p=t,h=n;if(c.geometry=p,c.zoom=h,i.contains_9u06oy$($(Yh))){var _,d;if(null==(d=null==(_=i.componentManager.getComponents_ahlfl2$(i).get_11rb$($(Yh)))||e.isType(_,Yh)?_:P()))throw I("Component "+$(Yh).simpleName+" is not found");u=d}else u=null;return null!=(o=u)&&(o.zoom=n,o.scale=1),j}}(o,n)),j}}function n_(){i_=this,this.COMPONENT_TYPES_0=T([$(qf),$(Wf),$(r_),$(om),$(pc)])}Wh.$metadata$={kind:m,simpleName:"ScaleUpdateSystem",interfaces:[Ls]},Object.defineProperty(Qh.prototype,"geometry",{configurable:!0,get:function(){return null==this.geometry_ycd7cj$_0?A("geometry"):this.geometry_ycd7cj$_0},set:function(t){this.geometry_ycd7cj$_0=t}}),Qh.$metadata$={kind:m,simpleName:"ScreenGeometryComponent",interfaces:[qs]},t_.prototype.createScalingTask_0=function(t,n){var i,o;if(t.contains_9u06oy$($(Yh))||t.removeComponent_9u06oy$($(Qh)),null==(o=null==(i=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(Wf)))||e.isType(i,Wf)?i:P()))throw I("Component "+$(Wf).simpleName+" is not found");var r,a,s,l,u,c=o.origin,p=rp().zoom_27pd89$((s=n,function(){return s})),_=Hh();if(null==(a=null==(r=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(r_)))||e.isType(r,r_)?r:P()))throw I("Component "+$(r_).simpleName+" is not found");return Tc(_.simple_prkczh$(h(a.geometry),(l=p,u=c,function(t){return l.project_11rb$(Se(t,u))})),e_(t,n,this))},t_.prototype.updateImpl_og8vrq$=function(t,e){var n,i=t.mapRenderContext.viewport;if(t.camera.isZoomLevelChanged)for(n=this.getEntities_38uplf$(o_().COMPONENT_TYPES_0).iterator();n.hasNext();){var o=n.next();o.setComponent_qqqpmc$(new qc(this.createScalingTask_0(o,i.zoom),this.myQuantIterations_0))}},n_.$metadata$={kind:l,simpleName:"Companion",interfaces:[]};var i_=null;function o_(){return null===i_&&new n_,i_}function r_(){this.geometry=null}function a_(){this.points=S()}function s_(t,e,n){d_(),Ls.call(this,t),this.myComponentManager_0=t,this.myMapProjection_0=e,this.myViewport_0=n}function l_(){__=this,this.WIDGET_COMPONENTS=T([$(v_),$(Ru),$(a_)]),this.DARK_ORANGE=O.Companion.parseHex_61zpoe$("#cc7a00")}t_.$metadata$={kind:m,simpleName:"WorldGeometry2ScreenUpdateSystem",interfaces:[Ls]},r_.$metadata$={kind:m,simpleName:"WorldGeometryComponent",interfaces:[qs]},a_.$metadata$={kind:m,simpleName:"MakeGeometryWidgetComponent",interfaces:[qs]},s_.prototype.updateImpl_og8vrq$=function(t,e){var n,i,o;if(null!=(n=this.getWidgetLayer_0())&&null!=(i=this.click_0(n))&&!i.isStopped){var r=Di(i.location),a=D("getMapCoord",function(t,e){return t.getMapCoord_sctv0c$(e)}.bind(null,this.myViewport_0))(r);null!=(o=D("invert",function(t,e){return t.invert_11rc$(e)}.bind(null,this.myMapProjection_0))(a))&&(this.createVisualEntities_0(o,n),this.add_0(n,o))}},s_.prototype.createVisualEntities_0=function(t,e){var n=new go(e),i=new Ko(n);if(i.point=t,i.strokeColor=d_().DARK_ORANGE,i.shape=20,i.build_6taknv$(!0),this.count_0(e)>0){var o=new Bo(n,this.myMapProjection_0);o.sizeScalingRange=null,o.strokeColor=d_().DARK_ORANGE,o.strokeWidth=1.5,o.points=T([this.last_0(e),t]),o.flat=!0,o.build_6taknv$(!0)}},s_.prototype.getWidgetLayer_0=function(){return this.myComponentManager_0.tryGetSingletonEntity_tv8pd9$(d_().WIDGET_COMPONENTS)},s_.prototype.click_0=function(t){var n,i;if(null==(i=null==(n=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(Ru)))||e.isType(n,Ru)?n:P()))throw I("Component "+$(Ru).simpleName+" is not found");return i.clickEvent},s_.prototype.count_0=function(t){var n,i;if(null==(i=null==(n=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(a_)))||e.isType(n,a_)?n:P()))throw I("Component "+$(a_).simpleName+" is not found");return i.points.size},s_.prototype.last_0=function(t){var n,i;if(null==(i=null==(n=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(a_)))||e.isType(n,a_)?n:P()))throw I("Component "+$(a_).simpleName+" is not found");return Hn(i.points)},s_.prototype.add_0=function(t,n){var i,o;if(null==(o=null==(i=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(a_)))||e.isType(i,a_)?i:P()))throw I("Component "+$(a_).simpleName+" is not found");return o.points.add_11rb$(n)},l_.$metadata$={kind:l,simpleName:"Companion",interfaces:[]};var u_,c_,p_,h_,__=null;function d_(){return null===__&&new l_,__}function f_(t){var e,n={v:0},i={v:""},o={v:""};for(e=t.iterator();e.hasNext();){var r=e.next();5===n.v&&(n.v=0,i.v+="\n ",o.v+="\n "),n.v=n.v+1|0,i.v+=m_(r.x)+", ",o.v+=m_(r.y)+", "}return"geometry = {\n 'lon': ["+Gn(i.v,2)+"], \n 'lat': ["+Gn(o.v,2)+"]\n}"}function m_(t){var e=qt(t.toString(),["."]);return e.get_za3lpa$(0)+"."+(e.get_za3lpa$(1).length>6?e.get_za3lpa$(1).substring(0,6):e.get_za3lpa$(1))}function $_(t,e){t.moveTo_lu1900$(e.x,e.y)}function y_(t,e){t.lineTo_lu1900$(e.x,e.y)}function g_(t,e){t.translate_lu1900$(e.x,e.y)}function v_(){this.myEntities_0=Ke(),this.entities=this.myEntities_0}function b_(t,e,n,i,o,r){Ks.call(this,e),this.mapProjection_v1u6xk$_0=t,this.mapRenderContext_ja7t4k$_0=n,this.errorHandler_n2fbtd$_0=i,this.camera_krmw3w$_0=o,this.layerManager=r,this.initialPosition=null,this.initialZoom=null}function w_(){this.renderer_4w62i8$_0=this.renderer_4w62i8$_0}function x_(t){Ls.call(this,t)}function k_(t){var n;if(t.contains_9u06oy$($(Xf))){var i,o;if(null==(o=null==(i=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(Xf)))||e.isType(i,Xf)?i:P()))throw I("Component "+$(Xf).simpleName+" is not found");n=o}else n=null;return null!=n}function C_(t,e){this.closure$renderer=t,this.closure$mapEntity=e}function E_(){}function S_(t,e){this.viewport_t39w15$_0=t,this.canvasProvider=e}function T_(){}function O_(t){Ls.call(this,t),this.myMapRect_sb91lf$_0=this.myMapRect_sb91lf$_0,this.myDonorTileCalculators_1ozvg6$_0=this.myDonorTileCalculators_1ozvg6$_0}function N_(t){return t.unaryPlus_jixjl7$(new ed),j}function P_(t,n,i,o,r,a){return function(s){var l,u;s.unaryPlus_jixjl7$(new Wf(t.origin));var c=new w_;Y_().NULL_RENDERER,s.unaryPlus_jixjl7$(c);var p=new Xf;p.rounding=nm(),s.unaryPlus_jixjl7$(p),s.unaryPlus_jixjl7$(new om);var h=new im,_=t,d=n;h.dimension=_m().world2Screen_cshcqd$(_.dimension,d),s.unaryPlus_jixjl7$(h),s.unaryPlus_jixjl7$(new B_(i)),s.unaryPlus_jixjl7$(new F_(o));var f,m,y=new H_;if(m=!0===(f=r.contains_9u06oy$($(W_)))?new bf:!1===f?new I_:e.noWhenBranchMatched(),y.renderer=m,s.unaryPlus_jixjl7$(y),!0===(l=r.contains_9u06oy$($(W_))))u=new Z_;else if(!1===l){var g=new q_,v=o,b=i;g.tile=a.calculateDonorTile_0(v,b),u=g}else u=e.noWhenBranchMatched();return s.unaryPlus_jixjl7$(u),j}}function I_(){this.myCellRect_b7nn33$_0=this.myCellRect_b7nn33$_0,this.myCtx_oq3nra$_0=this.myCtx_oq3nra$_0}function A_(t,e){Ls.call(this,e),this.myTileCacheLimit_0=t,this.myCache_0=S()}function R_(t,e,n){ce.call(this),this.myValue_3b2340$_0=n,this.name$=t,this.ordinal$=e}function j_(){j_=function(){},u_=new R_("WORLD",0,"world"),c_=new R_("LABEL",1,"label"),p_=new R_("DEBUG",2,"debug"),h_=new R_("RASTER",3,"raster_tile")}function L_(){return j_(),u_}function z_(){return j_(),c_}function D_(){return j_(),p_}function M_(){return j_(),h_}function B_(t){this.cellKey=t}function F_(t){this.layerKind=t}function U_(t){this.layerKind=t}function q_(){this.tile=null,this.nonCacheable=!1}function H_(){Y_(),this.renderer=Y_().NULL_RENDERER}function G_(){V_=this,this.NULL_RENDERER=new K_}function K_(){}s_.$metadata$={kind:m,simpleName:"MakeGeometryWidgetSystem",interfaces:[Ls]},v_.prototype.add_za3lpa$=function(t){this.myEntities_0.add_11rb$(t)},v_.prototype.remove_za3lpa$=function(t){this.myEntities_0.remove_11rb$(t)},v_.$metadata$={kind:m,simpleName:"LayerEntitiesComponent",interfaces:[qs]},Object.defineProperty(b_.prototype,"mapProjection",{get:function(){return this.mapProjection_v1u6xk$_0}}),Object.defineProperty(b_.prototype,"mapRenderContext",{get:function(){return this.mapRenderContext_ja7t4k$_0}}),Object.defineProperty(b_.prototype,"camera",{get:function(){return this.camera_krmw3w$_0}}),b_.prototype.raiseError_tcv7n7$=function(t){this.errorHandler_n2fbtd$_0(t)},b_.$metadata$={kind:m,simpleName:"LiveMapContext",interfaces:[Ks]},Object.defineProperty(w_.prototype,"renderer",{configurable:!0,get:function(){return null==this.renderer_4w62i8$_0?A("renderer"):this.renderer_4w62i8$_0},set:function(t){this.renderer_4w62i8$_0=t}}),w_.$metadata$={kind:m,simpleName:"RenderableComponent",interfaces:[qs]},x_.prototype.updateImpl_og8vrq$=function(t,n){var i;for(i=this.componentManager.getEntities_tv8pd9$(T([$(v_),$(cc)])).iterator();i.hasNext();){var o,r,a,s,l=i.next();if(null==(r=null==(o=l.componentManager.getComponents_ahlfl2$(l).get_11rb$($(v_)))||e.isType(o,v_)?o:P()))throw I("Component "+$(v_).simpleName+" is not found");if(null==(s=null==(a=l.componentManager.getComponents_ahlfl2$(l).get_11rb$($(cc)))||e.isType(a,cc)?a:P()))throw I("Component "+$(cc).simpleName+" is not found");s.canvasLayer.clearRenderTaskss(),this.addRenderTasks_0(s,r,t)}},C_.prototype.render_pzzegf$=function(t){this.closure$renderer.render_j83es7$(this.closure$mapEntity,t)},C_.$metadata$={kind:m,interfaces:[iu]},x_.prototype.addRenderTasks_0=function(t,n,i){var o,r=this.componentManager.getSingletonEntity_9u06oy$($(Vf));if(r.contains_9u06oy$($(Df))){var a,s;if(null==(s=null==(a=r.componentManager.getComponents_ahlfl2$(r).get_11rb$($(Df)))||e.isType(a,Df)?a:P()))throw I("Component "+$(Df).simpleName+" is not found");o=s}else o=null;var l,u,c,p,h=o;t.canvasLayer.addRenderTask_ddf932$((l=h,u=n,c=this,p=i,function(t){var n,i;if(t.save(),null!=l){var o=l;g_(t,o.scaleOrigin),t.scale_lu1900$(o.currentScale,o.currentScale),g_(t,Kn(o.scaleOrigin)),i=o}else i=null;for(null!=i||t.scale_lu1900$(1,1),n=k(c.getEntitiesById_wlb8mv$(u.entities),k_).iterator();n.hasNext();){var r,a,s=n.next();if(null==(a=null==(r=s.componentManager.getComponents_ahlfl2$(s).get_11rb$($(w_)))||e.isType(r,w_)?r:P()))throw I("Component "+$(w_).simpleName+" is not found");var h,_,d,f=a.renderer;if(null==(_=null==(h=s.componentManager.getComponents_ahlfl2$(s).get_11rb$($(Xf)))||e.isType(h,Xf)?h:P()))throw I("Component "+$(Xf).simpleName+" is not found");for(d=_.origins.iterator();d.hasNext();){var m=d.next();p.mapRenderContext.draw_qynjys$(t,m,new C_(f,s))}}return t.restore(),j}))},x_.$metadata$={kind:m,simpleName:"MapEntitiesRenderingSystem",interfaces:[Ls]},E_.$metadata$={kind:u,simpleName:"MapProjection",interfaces:[Qc]},Object.defineProperty(S_.prototype,"viewport",{get:function(){return this.viewport_t39w15$_0}}),S_.prototype.draw_qynjys$=function(t,e,n){this.draw_93hxp9$_0(t,e.x,e.y,n)},S_.prototype.draw_j9d1y9$=function(t,e,n){this.draw_93hxp9$_0(t,e.x,e.y,n)},S_.prototype.draw_93hxp9$_0=function(t,e,n,i){t.save(),t.translate_lu1900$(e,n),i.render_pzzegf$(t),t.restore()},S_.$metadata$={kind:m,simpleName:"MapRenderContext",interfaces:[]},T_.$metadata$={kind:u,simpleName:"Renderer",interfaces:[]},Object.defineProperty(O_.prototype,"myMapRect_0",{configurable:!0,get:function(){return null==this.myMapRect_sb91lf$_0?A("myMapRect"):this.myMapRect_sb91lf$_0},set:function(t){this.myMapRect_sb91lf$_0=t}}),Object.defineProperty(O_.prototype,"myDonorTileCalculators_0",{configurable:!0,get:function(){return null==this.myDonorTileCalculators_1ozvg6$_0?A("myDonorTileCalculators"):this.myDonorTileCalculators_1ozvg6$_0},set:function(t){this.myDonorTileCalculators_1ozvg6$_0=t}}),O_.prototype.initImpl_4pvjek$=function(t){this.myMapRect_0=t.mapProjection.mapRect,Xs(this.createEntity_61zpoe$("tile_for_request"),N_)},O_.prototype.updateImpl_og8vrq$=function(t,n){this.myDonorTileCalculators_0=this.createDonorTileCalculators_0();var i,o,r=this.componentManager.getSingletonEntity_9u06oy$($(gm));if(null==(o=null==(i=r.componentManager.getComponents_ahlfl2$(r).get_11rb$($(gm)))||e.isType(i,gm)?i:P()))throw I("Component "+$(gm).simpleName+" is not found");var a,s=An(o.cellsToLoad);for(a=this.getEntities_9u06oy$($(B_)).iterator();a.hasNext();){var l,u,c=a.next();if(null==(u=null==(l=c.componentManager.getComponents_ahlfl2$(c).get_11rb$($(B_)))||e.isType(l,B_)?l:P()))throw I("Component "+$(B_).simpleName+" is not found");s.remove_11rb$(u.cellKey)}var p,h=D("createTileLayerEntities",function(t,e){return t.createTileLayerEntities_0(e),j}.bind(null,this));for(p=s.iterator();p.hasNext();)h(p.next());var _,d,f=this.componentManager.getSingletonEntity_9u06oy$($(ed));if(null==(d=null==(_=f.componentManager.getComponents_ahlfl2$(f).get_11rb$($(ed)))||e.isType(_,ed)?_:P()))throw I("Component "+$(ed).simpleName+" is not found");d.requestTiles=s},O_.prototype.createDonorTileCalculators_0=function(){var t,n,i=rt();for(t=this.getEntities_38uplf$(gf().TILE_COMPONENT_LIST).iterator();t.hasNext();){var o,r,a=t.next();if(null==(r=null==(o=a.componentManager.getComponents_ahlfl2$(a).get_11rb$($(q_)))||e.isType(o,q_)?o:P()))throw I("Component "+$(q_).simpleName+" is not found");if(!r.nonCacheable){var s,l;if(null==(l=null==(s=a.componentManager.getComponents_ahlfl2$(a).get_11rb$($(q_)))||e.isType(s,q_)?s:P()))throw I("Component "+$(q_).simpleName+" is not found");if(null!=(n=l.tile)){var u,c,p=n;if(null==(c=null==(u=a.componentManager.getComponents_ahlfl2$(a).get_11rb$($(F_)))||e.isType(u,F_)?u:P()))throw I("Component "+$(F_).simpleName+" is not found");var h,_=c.layerKind,d=i.get_11rb$(_);if(null==d){var f=rt();i.put_xwzc9p$(_,f),h=f}else h=d;var m,y,g=h;if(null==(y=null==(m=a.componentManager.getComponents_ahlfl2$(a).get_11rb$($(B_)))||e.isType(m,B_)?m:P()))throw I("Component "+$(B_).simpleName+" is not found");var v=y.cellKey;g.put_xwzc9p$(v,p)}}}var b,w=Wn(Yn(i.size));for(b=i.entries.iterator();b.hasNext();){var x=b.next(),k=w.put_xwzc9p$,C=x.key,E=x.value;k.call(w,C,new nd(E))}return w},O_.prototype.createTileLayerEntities_0=function(t){var n,i=t.length,o=Vn(t,this.myMapRect_0);for(n=this.componentManager.getEntities_9u06oy$($(U_)).iterator();n.hasNext();){var r,a,s=n.next();if(null==(a=null==(r=s.componentManager.getComponents_ahlfl2$(s).get_11rb$($(U_)))||e.isType(r,U_)?r:P()))throw I("Component "+$(U_).simpleName+" is not found");var l,u,c=a.layerKind,p=Xs(yo(this.componentManager,new pc(s.id_8be2vx$),"tile_"+c+"_"+t),P_(o,i,t,c,s,this));if(null==(u=null==(l=s.componentManager.getComponents_ahlfl2$(s).get_11rb$($(v_)))||e.isType(l,v_)?l:P()))throw I("Component "+$(v_).simpleName+" is not found");u.add_za3lpa$(p.id_8be2vx$)}},O_.prototype.calculateDonorTile_0=function(t,e){var n;return null!=(n=this.myDonorTileCalculators_0.get_11rb$(t))?n.createDonorTile_k5pieh$(e):null},O_.$metadata$={kind:m,simpleName:"BasemapCellLoadingSystem",interfaces:[Ls]},Object.defineProperty(I_.prototype,"myCellRect_0",{configurable:!0,get:function(){return null==this.myCellRect_b7nn33$_0?A("myCellRect"):this.myCellRect_b7nn33$_0},set:function(t){this.myCellRect_b7nn33$_0=t}}),Object.defineProperty(I_.prototype,"myCtx_0",{configurable:!0,get:function(){return null==this.myCtx_oq3nra$_0?A("myCtx"):this.myCtx_oq3nra$_0},set:function(t){this.myCtx_oq3nra$_0=t}}),I_.prototype.render_j83es7$=function(t,n){var i,o,r;if(null==(r=null==(o=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(q_)))||e.isType(o,q_)?o:P()))throw I("Component "+$(q_).simpleName+" is not found");if(null!=(i=r.tile)){var a,s,l=i;if(null==(s=null==(a=t.componentManager.getComponents_ahlfl2$(t).get_11rb$($(im)))||e.isType(a,im)?a:P()))throw I("Component "+$(im).simpleName+" is not found");var u=s.dimension;this.render_bwqe93$(l,new kt(zi().ZERO_VEC,u),n)}},I_.prototype.render_bwqe93$=function(t,e,n){this.myCellRect_0=e,this.myCtx_0=n,this.renderTile_0(t,new Xn(""),new Xn(""))},I_.prototype.renderTile_0=function(t,n,i){if(e.isType(t,rd))this.renderSnapshotTile_0(t,n,i);else if(e.isType(t,ad))this.renderSubTile_0(t,n,i);else if(e.isType(t,sd))this.renderCompositeTile_0(t,n,i);else if(!e.isType(t,ld))throw I(("Unsupported Tile class: "+$(od)).toString())},I_.prototype.renderSubTile_0=function(t,e,n){this.renderTile_0(t.tile,t.subKey.plus_vnxxg4$(e),n)},I_.prototype.renderCompositeTile_0=function(t,e,n){var i;for(i=t.tiles.iterator();i.hasNext();){var o=i.next(),r=o.component1(),a=o.component2();this.renderTile_0(r,e,n.plus_vnxxg4$(a))}},I_.prototype.renderSnapshotTile_0=function(t,e,n){var i=Zn(e,this.myCellRect_0),o=Zn(n,this.myCellRect_0);this.myCtx_0.drawImage_urnjjc$(t.snapshot,wt(i),Ct(i),xt(i),Et(i),wt(o),Ct(o),xt(o),Et(o))},I_.$metadata$={kind:m,simpleName:"BasemapCellRenderer",interfaces:[T_]},A_.prototype.updateImpl_og8vrq$=function(t,n){var i,o,r=this.getSingletonEntity_38uplf$(Nm().CELL_STATE_REQUIRED_COMPONENTS_8be2vx$);if(null==(o=null==(i=r.componentManager.getComponents_ahlfl2$(r).get_11rb$($(gm)))||e.isType(i,gm)?i:P()))throw I("Component "+$(gm).simpleName+" is not found");var a,s=o;for(a=this.componentManager.getEntities_9u06oy$($(H_)).iterator();a.hasNext();){var l,u,c=a.next();if(null==(u=null==(l=c.componentManager.getComponents_ahlfl2$(c).get_11rb$($(B_)))||e.isType(l,B_)?l:P()))throw I("Component "+$(B_).simpleName+" is not found");var p=u.cellKey;if(s.visibleCells.contains_11rb$(p)){var h,_,d,f;if(null==(_=null==(h=c.componentManager.getComponents_ahlfl2$(c).get_11rb$($(w_)))||e.isType(h,w_)?h:P()))throw I("Component "+$(w_).simpleName+" is not found");if(null==(f=null==(d=c.componentManager.getComponents_ahlfl2$(c).get_11rb$($(H_)))||e.isType(d,H_)?d:P()))throw I("Component "+$(H_).simpleName+" is not found");_.renderer=f.renderer}if(s.cellsToRemove.contains_11rb$(p)){var m,y;if(null==(y=null==(m=c.componentManager.getComponents_ahlfl2$(c).get_11rb$($(w_)))||e.isType(m,w_)?m:P()))throw I("Component "+$(w_).simpleName+" is not found");y.renderer=Y_().NULL_RENDERER}}var g,v=Ke();for(Jn(this.myCache_0,D("contains",function(t,e){return t.contains_11rb$(e)}.bind(null,s.visibleCells))),pn(this.myCache_0,s.cellsToRemove),g=this.componentManager.getEntities_9u06oy$($(q_)).iterator();g.hasNext();){var b,w,x=g.next();if(null==(w=null==(b=x.componentManager.getComponents_ahlfl2$(x).get_11rb$($(q_)))||e.isType(b,q_)?b:P()))throw I("Component "+$(q_).simpleName+" is not found");if(w.nonCacheable){var k,C;if(null==(C=null==(k=x.componentManager.getComponents_ahlfl2$(x).get_11rb$($(B_)))||e.isType(k,B_)?k:P()))throw I("Component "+$(B_).simpleName+" is not found");var E=C.cellKey;s.cellsToRemove.contains_11rb$(E)&&(v.add_11rb$(E),this.myCache_0.remove_11rb$(E))}}for(;!this.myCache_0.isEmpty()&&this.myCache_0.size>this.myTileCacheLimit_0;)v.add_11rb$(this.myCache_0.removeAt_za3lpa$(0));this.removeCells_0(v)},A_.prototype.removeCells_0=function(t){var n,i=Ue(this.getEntities_9u06oy$($(v_)));for(n=k(this.getEntities_9u06oy$($(B_)),function(t){return function(n){var i,o,r=t;if(null==(o=null==(i=n.componentManager.getComponents_ahlfl2$(n).get_11rb$($(B_)))||e.isType(i,B_)?i:P()))throw I("Component "+$(B_).simpleName+" is not found");return r.contains_11rb$(o.cellKey)}}(t)).iterator();n.hasNext();){var o,r=n.next();for(o=i.iterator();o.hasNext();){var a,s,l=o.next();if(null==(s=null==(a=l.componentManager.getComponents_ahlfl2$(l).get_11rb$($(v_)))||e.isType(a,v_)?a:P()))throw I("Component "+$(v_).simpleName+" is not found");s.remove_za3lpa$(r.id_8be2vx$)}r.remove()}},A_.$metadata$={kind:m,simpleName:"BasemapCellsRemovingSystem",interfaces:[Ls]},R_.prototype.toString=function(){return this.myValue_3b2340$_0},R_.$metadata$={kind:m,simpleName:"BasemapLayerKind",interfaces:[ce]},R_.values=function(){return[L_(),z_(),D_(),M_()]},R_.valueOf_61zpoe$=function(t){switch(t){case"WORLD":return L_();case"LABEL":return z_();case"DEBUG":return D_();case"RASTER":return M_();default:pe("No enum constant jetbrains.livemap.mapengine.basemap.BasemapLayerKind."+t)}},B_.$metadata$={kind:m,simpleName:"BasemapCellComponent",interfaces:[qs]},F_.$metadata$={kind:m,simpleName:"KindComponent",interfaces:[qs]},U_.$metadata$={kind:m,simpleName:"BasemapLayerComponent",interfaces:[qs]},q_.$metadata$={kind:m,simpleName:"BasemapTileComponent",interfaces:[qs]},K_.prototype.render_j83es7$=function(t,e){},K_.$metadata$={kind:m,interfaces:[T_]},G_.$metadata$={kind:l,simpleName:"Companion",interfaces:[]};var V_=null;function Y_(){return null===V_&&new G_,V_}function W_(){}function X_(){this.stats=rt()}function Z_(){td(),this.myData_0=rt()}function J_(){Q_=this,this.PARSING_TIME="Parsing time",this.LOADING_TIME="Loading time",this.CELL_DATA_SIZE="Cell data size",this.BIGGEST_LAYER="BL",this.LINES_ORDER=T([this.CELL_DATA_SIZE,this.LOADING_TIME,this.PARSING_TIME,this.BIGGEST_LAYER,this.renderTimeKey_izw60t$(L_()),this.snapshotTimeKey_izw60t$(L_()),this.renderTimeKey_izw60t$(z_()),this.snapshotTimeKey_izw60t$(z_())])}H_.$metadata$={kind:m,simpleName:"BasemapCellRendererComponent",interfaces:[qs]},W_.$metadata$={kind:m,simpleName:"DebugCellLayerComponent",interfaces:[qs]},X_.prototype.add_7bkhbv$=function(t,e,n){var i,o=this.stats,r=o.get_11rb$(t);if(null==r){var a=rt();o.put_xwzc9p$(t,a),i=a}else i=r;i.put_xwzc9p$(e,n)},X_.$metadata$={kind:m,simpleName:"StatisticsComponent",interfaces:[qs]},Z_.prototype.get_61zpoe$=function(t){return this.myData_0.get_11rb$(t)},Z_.prototype.addData_mod7fw$=function(t){this.myData_0.putAll_a2k3zr$(t)},J_.prototype.renderTimeKey_izw60t$=function(t){return"Render time "+t},J_.prototype.snapshotTimeKey_izw60t$=function(t){return"Snapshot time "+t},J_.$metadata$={kind:l,simpleName:"Companion",interfaces:[]};var Q_=null;function td(){return null===Q_&&new J_,Q_}function ed(){this.requestTiles=Ke()}function nd(t){this.myExistedTiles_0=t}function id(t,e){return function(n){return e.startsWith_0(n.key,t.key)}}function od(){}function rd(t){this.snapshot=t}function ad(t,e){this.tile=t,this.subKey=e}function sd(){this.tiles=os()}function ld(){pd()}function ud(){cd=this,this.EMPTY_TILE=new ld}Z_.$metadata$={kind:m,simpleName:"DebugDataComponent",interfaces:[qs]},ed.$metadata$={kind:m,simpleName:"RequestTilesComponent",interfaces:[qs]},nd.prototype.createDonorTile_k5pieh$=function(t){var e,n=this.findUpDonorTile_0(t),i=this.findDownDonorTile_0(t);if(n!==pd().EMPTY_TILE&&i!==pd().EMPTY_TILE){var o=new sd;o.add_63tkuk$(n,new Xn("")),o.add_63tkuk$(i,new Xn("")),e=o}else e=n!==pd().EMPTY_TILE?n:i!==pd().EMPTY_TILE?i:pd().EMPTY_TILE;return e},nd.prototype.findDownDonorTile_0=function(t){var n,i,o,r=os(),a=this.myExistedTiles_0,s=hn();for(i=a.entries.iterator();i.hasNext();){var l=i.next();this.startsWith_0(l.key,t)&&s.put_xwzc9p$(l.key,l.value)}for(o=s.entries.iterator();o.hasNext();){var u,c=o.next();t:do{var p;if(e.isType(r,Qn)&&r.isEmpty()){u=!1;break t}for(p=r.iterator();p.hasNext();){var h=p.next();if(this.startsWith_0(c.key,h.key)){u=!0;break t}}u=!1}while(0);u||(Rn(r,id(c,this)),r.append_11rb$(c))}if(r.isNotEmpty()){var _,d=new sd;for(_=r.iterator();_.hasNext();){var f=_.next(),m=f.key,$=f.value;d.add_63tkuk$($,this.subKey_0(m,t))}n=d}else n=pd().EMPTY_TILE;return n},nd.prototype.findUpDonorTile_0=function(t){var n,i,o,r=this.myExistedTiles_0,a=hn();for(o=r.entries.iterator();o.hasNext();){var s=o.next();this.startsWith_0(t,s.key)&&a.put_xwzc9p$(s.key,s.value)}var l,u=a.entries;t:do{var c=u.iterator();if(!c.hasNext()){l=null;break t}var p=c.next();if(!c.hasNext()){l=p;break t}var h=p.key.length;do{var _=c.next(),d=_.key.length;e.compareTo(h,d)<0&&(p=_,h=d)}while(c.hasNext());l=p}while(0);return null!=(i=null!=(n=l)?new ad(n.value,this.subKey_0(t,n.key)):null)?i:pd().EMPTY_TILE},nd.prototype.startsWith_0=function(t,e){return Je(t.key,e.key)},nd.prototype.subKey_0=function(t,e){var n=t.key,i=e.length;return new Xn(n.substring(i))},nd.$metadata$={kind:m,simpleName:"DonorTileCalculator",interfaces:[]},rd.$metadata$={kind:m,simpleName:"SnapshotTile",interfaces:[od]},ad.$metadata$={kind:m,simpleName:"SubTile",interfaces:[od]},sd.prototype.add_63tkuk$=function(t,e){this.tiles.append_11rb$(new ge(t,e))},sd.$metadata$={kind:m,simpleName:"CompositeTile",interfaces:[od]},ud.$metadata$={kind:l,simpleName:"Companion",interfaces:[]};var cd=null;function pd(){return null===cd&&new ud,cd}function hd(){$d=this}function _d(t,e){this.closure$black=t,this.closure$white=e,this.isVector_smhqkq$_0=!1}function dd(t){this.closure$color=t,this.isVector_qi8n7z$_0=!1}function fd(t){this.closure$domains=t,this.isVector_nsfxxv$_0=!1}function md(t,e){this.closure$quantumIterations=t,this.closure$tileService=e,this.isVector_q6ijx3$_0=!0}ld.$metadata$={kind:m,simpleName:"EmptyTile",interfaces:[od]},od.$metadata$={kind:u,simpleName:"Tile",interfaces:[]},_d.prototype.create_v8qzyl$=function(t){return new Pd(jd(this.closure$black,this.closure$white),t)},Object.defineProperty(_d.prototype,"isVector",{configurable:!0,get:function(){return this.isVector_smhqkq$_0}}),_d.$metadata$={kind:m,interfaces:[gd]},hd.prototype.chessboard_a87jzg$=function(t,e){return void 0===t&&(t=O.Companion.GRAY),void 0===e&&(e=O.Companion.LIGHT_GRAY),new _d(t,e)},dd.prototype.create_v8qzyl$=function(t){return new Pd(Rd(this.closure$color),t)},Object.defineProperty(dd.prototype,"isVector",{configurable:!0,get:function(){return this.isVector_qi8n7z$_0}}),dd.$metadata$={kind:m,interfaces:[gd]},hd.prototype.solid_98b62m$=function(t){return new dd(t)},fd.prototype.create_v8qzyl$=function(t){return new bd(this.closure$domains,t)},Object.defineProperty(fd.prototype,"isVector",{configurable:!0,get:function(){return this.isVector_nsfxxv$_0}}),fd.$metadata$={kind:m,interfaces:[gd]},hd.prototype.raster_mhpeer$=function(t){return new fd(t)},md.prototype.create_v8qzyl$=function(t){return new cf(this.closure$quantumIterations,this.closure$tileService,t)},Object.defineProperty(md.prototype,"isVector",{configurable:!0,get:function(){return this.isVector_q6ijx3$_0}}),md.$metadata$={kind:m,interfaces:[gd]},hd.prototype.letsPlot_e94j16$=function(t,e){return void 0===e&&(e=1e3),new md(e,t)},hd.$metadata$={kind:l,simpleName:"Tilesets",interfaces:[]};var $d=null;function yd(){return null===$d&&new hd,$d}function gd(){}gd.$metadata$={kind:u,simpleName:"BasemapTileSystemProvider",interfaces:[]};var vd=ze((function(){var t=e.getKClass;return function(e,n){return function(n){var i=e;return n.contains_9u06oy$(t(i))}}}));function bd(t,e){Od(),Ls.call(this,e),this.myDomains_0=t,this.myIndex_0=0,this.myTileTransport_0=new ni}function wd(t,e){return function(n){return n.unaryPlus_jixjl7$(new B_(t)),n.unaryPlus_jixjl7$(e),j}}function xd(t){return function(e){return t.imageData=e,j}}function kd(t){return function(e){return t.imageData=new Int8Array(0),t.errorCode=e,j}}function Cd(t,n,i){return function(o){return i.runLaterBySystem_ayosff$(t,function(t,n){return function(i){var o,r;if(null==(r=null==(o=i.componentManager.getComponents_ahlfl2$(i).get_11rb$($(q_)))||e.isType(o,q_)?o:P()))throw I("Component "+$(q_).simpleName+" is not found");var a=t,s=n;return r.nonCacheable=null!=a.errorCode,r.tile=new rd(s),mc().tagDirtyParentLayer_ahlfl2$(i),j}}(n,o)),j}}function Ed(t,e,n,i,o){return function(){var r,a;if(null!=t.errorCode){var s=null!=(r=h(t.errorCode).message)?r:"Unknown error",l=e.mapRenderContext.canvasProvider.createCanvas_119tl4$(Od().TILE_PIXEL_DIMESION),u=l.context2d,c=u.measureText_61zpoe$(s),p=c0&&ta.v&&1!==s.size;)l.add_wxm5ur$(0,s.removeAt_za3lpa$(s.size-1|0));1===s.size&&t.measureText_61zpoe$(s.get_za3lpa$(0))>a.v?(u.add_11rb$(s.get_za3lpa$(0)),a.v=t.measureText_61zpoe$(s.get_za3lpa$(0))):u.add_11rb$(x(s," ")),s=l,l=S()}for(r=e.iterator();r.hasNext();){var p=r.next(),h=this.bboxFromPoint_0(p,a.v,c);if(!this.labelInBounds_0(h)){var _,d,f=0;for(_=u.iterator();_.hasNext();){var m=_.next(),$=h.origin.y+c/2+c*fe((f=(d=f)+1|0,d));t.strokeText_ai6r6m$(m,p.x,$),t.fillText_ai6r6m$(m,p.x,$)}this.myLabelBounds_0.add_11rb$(h)}}},Md.prototype.labelInBounds_0=function(t){var e,n=this.myLabelBounds_0;t:do{var i;for(i=n.iterator();i.hasNext();){var o=i.next();if(t.intersects_wthzt5$(o)){e=o;break t}}e=null}while(0);return null!=e},Md.prototype.getLabel_0=function(t){var e,n=null!=(e=this.myStyle_0.labelField)?e:Kd().LABEL_0;switch(n){case"short":return t.short;case"label":return t.label;default:throw I("Unknown label field: "+n)}},Md.prototype.applyTo_pzzegf$=function(t){var e,n;t.setFont_ov8mpe$(ii(null!=(e=this.myStyle_0.fontStyle)?M.CssStyleUtil.extractFontStyle_pdl1vz$(e):null,null!=(n=this.myStyle_0.fontStyle)?M.CssStyleUtil.extractFontWeight_pdl1vz$(n):null,this.myStyle_0.size,this.myStyle_0.fontFamily)),t.setTextAlign_iwro1z$(Gt.CENTER),t.setTextBaseline_5cz80h$(Ht.MIDDLE),Kd().setBaseStyle_ocy23$(t,this.myStyle_0)},Md.$metadata$={kind:m,simpleName:"PointTextSymbolizer",interfaces:[Ld]},Bd.prototype.createDrawTasks_r2wkzh$=function(t,e){return ot()},Bd.prototype.applyTo_pzzegf$=function(t){},Bd.$metadata$={kind:m,simpleName:"ShieldTextSymbolizer",interfaces:[Ld]},Fd.prototype.createDrawTasks_r2wkzh$=function(t,e){return ot()},Fd.prototype.applyTo_pzzegf$=function(t){},Fd.$metadata$={kind:m,simpleName:"LineTextSymbolizer",interfaces:[Ld]},Ud.prototype.create_h15n9n$=function(t,e){var n,i;switch(n=t.type){case"line":i=new Dd(t);break;case"polygon":i=new zd(t);break;case"point-text":i=new Md(t,e);break;case"shield-text":i=new Bd(t,e);break;case"line-text":i=new Fd(t,e);break;default:throw I(null==n?"Empty symbolizer type.".toString():"Unknown symbolizer type.".toString())}return i},Ud.prototype.stringToLineCap_61zpoe$=function(t){var e;switch(t){case"butt":e=oi.BUTT;break;case"round":e=oi.ROUND;break;case"square":e=oi.SQUARE;break;default:throw I(("Unknown lineCap type: "+t).toString())}return e},Ud.prototype.stringToLineJoin_61zpoe$=function(t){var e;switch(t){case"bevel":e=le.BEVEL;break;case"round":e=le.ROUND;break;case"miter":e=le.MITER;break;default:throw I(("Unknown lineJoin type: "+t).toString())}return e},Ud.prototype.splitLabel_61zpoe$=function(t){var e,n,i,o,r=S(),a=0;n=(e=ri(t)).first,i=e.last,o=e.step;for(var s=n;s<=i;s+=o)if(32===t.charCodeAt(s)){if(a!==s){var l=a;r.add_11rb$(t.substring(l,s))}a=s+1|0}else if(-1!==ai("-',.)!?",t.charCodeAt(s))){var u=a,c=s+1|0;r.add_11rb$(t.substring(u,c)),a=s+1|0}if(a!==t.length){var p=a;r.add_11rb$(t.substring(p))}return r},Ud.prototype.setBaseStyle_ocy23$=function(t,e){var n,i,o;null!=(n=e.strokeWidth)&&D("setLineWidth",function(t,e){return t.setLineWidth_14dthe$(e),j}.bind(null,t))(n),null!=(i=e.fill)&&t.setFillStyle_2160e9$(i),null!=(o=e.stroke)&&t.setStrokeStyle_2160e9$(o)},Ud.$metadata$={kind:l,simpleName:"Companion",interfaces:[]};var qd,Hd,Gd=null;function Kd(){return null===Gd&&new Ud,Gd}function Vd(){}function Yd(t,e){this.myMapProjection_0=t,this.myTileService_0=e}function Wd(){}function Xd(t){this.myMapProjection_0=t}function Zd(t,e){return function(n){var i=t,o=e.name;return i.put_xwzc9p$(o,n),j}}function Jd(t,e,n){return function(i){t.add_11rb$(new of(i,ci(e.kinds,n),ci(e.subs,n),ci(e.labels,n),ci(e.shorts,n)))}}function Qd(t){this.closure$tileGeometryParser=t,this.myDone_0=!1}function tf(){}function ef(t){this.myMapConfigSupplier_0=t}function nf(t,e){return function(){return t.applyTo_pzzegf$(e),j}}function of(t,e,n,i,o){this.tileGeometry=t,this.myKind_0=e,this.mySub_0=n,this.label=i,this.short=o}function rf(t,e,n){ce.call(this),this.field=n,this.name$=t,this.ordinal$=e}function af(){af=function(){},qd=new rf("CLASS",0,"class"),Hd=new rf("SUB",1,"sub")}function sf(){return af(),qd}function lf(){return af(),Hd}Ld.$metadata$={kind:u,simpleName:"Symbolizer",interfaces:[]},Vd.$metadata$={kind:u,simpleName:"TileDataFetcher",interfaces:[]},Yd.prototype.fetch_k5pieh$=function(t){var e,n=ym(this.myMapProjection_0,t);if(null==(e=this.calculateBBox_0(n)))return St.Asyncs.constant_mh5how$(ot());var i=e,o=t.length;return this.myTileService_0.getTileData_h9hod0$(i,o)},Yd.prototype.calculateBBox_0=function(t){var e,n=W.BBOX_CALCULATOR,i=It(Pt(t,10));for(e=t.iterator();e.hasNext();){var o=e.next();i.add_11rb$(Pn(o))}var r,a=It(Pt(i,10));for(r=i.iterator();r.hasNext();){var s=r.next();a.add_11rb$(si(s))}return li(n,a)},Yd.$metadata$={kind:m,simpleName:"TileDataFetcherImpl",interfaces:[Vd]},Wd.$metadata$={kind:u,simpleName:"TileDataParser",interfaces:[]},Xd.prototype.parse_gzyc9c$=function(t,e){var n,i=this.calculateTransform_0(t),o=rt(),r=It(Pt(e,10));for(n=e.iterator();n.hasNext();){var a=n.next();r.add_11rb$(Tc(this.parseTileLayer_0(a,i),Zd(o,a)))}var s,l=r;return Tc(Uc().join_asgahm$(l),(s=o,function(t){return s}))},Xd.prototype.calculateTransform_0=function(t){var e,n,i,o=rp().zoom_27pd89$(w("length",0,function(t){return t.length}.bind(null,t))),r=Vn(t,this.myMapProjection_0.mapRect),a=o.project_11rb$(r.origin);return e=this,n=o,i=a,function(t){var o,r;if(null!=(o=e.myMapProjection_0.project_11rb$(t))){var a=i;r=Se(n.project_11rb$(o),a)}else r=null;return r}},Xd.prototype.parseTileLayer_0=function(t,e){return Oc(this.createMicroThread_0(new ui(t.geometryCollection)),(n=e,i=t,function(t){for(var e=S(),o=S(),r=t.size,a=0;an&&(a-=r),a=s?this.calculateSquareDistanceToPathPoint_0(t,e,i):this.calculateSquareDistanceToPathPoint_0(t,e,n)-l},Mm.prototype.calculateSquareDistanceToPathPoint_0=function(t,e,n){var i=t.x-e.get_za3lpa$(n).x,o=t.y-e.get_za3lpa$(n).y;return i*i+o*o},Mm.prototype.ringContainsCoordinate_bsqkoz$=function(t,e){var n,i=0;n=t.size;for(var o=1;o=e.y&&t.get_za3lpa$(o).y>=e.y||t.get_za3lpa$(r).y1)throw d("There are more than one mapper for "+e);return n.iterator().next()},zt.prototype.getMappers_abn725$=function(t,e){var n,i=this.getMappers_0(e),o=null;for(n=i.iterator();n.hasNext();){var r=n.next();if(Lt().isDescendant_1xbo8k$(t,r)){if(null==o){if(1===i.size)return K(r);o=Z()}o.add_11rb$(r)}}return null==o?J():o},zt.prototype.put_teo19m$=function(t,e){if(this.myProperties_0.containsKey_11rb$(t))throw d("Property "+t+" is already defined");if(null==e)throw V("Trying to set null as a value of "+t);this.myProperties_0.put_xwzc9p$(t,e)},zt.prototype.get_kpbivk$=function(t){var n,i;if(null==(n=this.myProperties_0.get_11rb$(t)))throw d("Property "+t+" wasn't found");return null==(i=n)||e.isType(i,Y)?i:k()},zt.prototype.contains_iegf2p$=function(t){return this.myProperties_0.containsKey_11rb$(t)},zt.prototype.remove_9l51dn$=function(t){var n;if(!this.myProperties_0.containsKey_11rb$(t))throw d("Property "+t+" wasn't found");return null==(n=this.myProperties_0.remove_11rb$(t))||e.isType(n,Y)?n:k()},zt.prototype.getMappers=function(){var t,e=Z();for(t=this.myMappers_0.keys.iterator();t.hasNext();){var n=t.next();e.addAll_brywnq$(this.getMappers_0(n))}return e},zt.prototype.getMappers_0=function(t){var n,i,o;if(!this.myMappers_0.containsKey_11rb$(t))return J();var r=this.myMappers_0.get_11rb$(t);if(e.isType(r,st)){var a=e.isType(n=r,st)?n:k();return K(a)}var s=Z();for(o=(e.isType(i=r,F)?i:k()).iterator();o.hasNext();){var l=o.next();s.add_11rb$(l)}return s},zt.$metadata$={kind:p,simpleName:"MappingContext",interfaces:[]},Ft.prototype.onItemAdded_u8tacu$=function(t){var e=this.this$ObservableCollectionRoleSynchronizer.createMapper_11rb$(_(t.newItem));this.closure$modifiableMappers.add_wxm5ur$(t.index,e),this.this$ObservableCollectionRoleSynchronizer.myTarget_0.add_wxm5ur$(t.index,e.target),this.this$ObservableCollectionRoleSynchronizer.processMapper_obu244$(e)},Ft.prototype.onItemRemoved_u8tacu$=function(t){this.closure$modifiableMappers.removeAt_za3lpa$(t.index),this.this$ObservableCollectionRoleSynchronizer.myTarget_0.removeAt_za3lpa$(t.index)},Ft.$metadata$={kind:p,interfaces:[Q]},Bt.prototype.onAttach=function(){var t;if(nt.prototype.onAttach.call(this),!this.myTarget_0.isEmpty())throw V("Target Collection Should Be Empty");this.myCollectionRegistration_0=B.Companion.EMPTY,new it(this).update_4f0l55$(this.mySource_0);var e=this.modifiableMappers;for(t=e.iterator();t.hasNext();){var n=t.next();this.myTarget_0.add_11rb$(n.target)}this.myCollectionRegistration_0=this.mySource_0.addListener_n5no9j$(new Ft(this,e))},Bt.prototype.onDetach=function(){nt.prototype.onDetach.call(this),_(this.myCollectionRegistration_0).remove(),this.myTarget_0.clear()},Bt.$metadata$={kind:p,simpleName:"ObservableCollectionRoleSynchronizer",interfaces:[nt]},Ut.$metadata$={kind:I,simpleName:"RefreshableSynchronizer",interfaces:[Wt]},qt.prototype.attach_1rog5x$=function(t){this.myReg_cuddgt$_0=this.doAttach_1rog5x$(t)},qt.prototype.detach=function(){_(this.myReg_cuddgt$_0).remove()},qt.$metadata$={kind:p,simpleName:"RegistrationSynchronizer",interfaces:[Wt]},Ht.$metadata$={kind:I,simpleName:"RoleSynchronizer",interfaces:[Wt]},Kt.prototype.mapperAdded_r9e1k2$=function(t,e){this.this$SimpleRoleSynchronizer.myTarget_0.add_wxm5ur$(t,e.target)},Kt.prototype.mapperRemoved_r9e1k2$=function(t,e){this.this$SimpleRoleSynchronizer.myTarget_0.removeAt_za3lpa$(t)},Kt.$metadata$={kind:p,interfaces:[it]},Gt.prototype.refresh=function(){new Kt(this).update_4f0l55$(this.mySource_0)},Gt.prototype.onAttach=function(){nt.prototype.onAttach.call(this),this.refresh()},Gt.prototype.onDetach=function(){nt.prototype.onDetach.call(this),this.myTarget_0.clear()},Gt.$metadata$={kind:p,simpleName:"SimpleRoleSynchronizer",interfaces:[Ut,nt]},Object.defineProperty(Vt.prototype,"mappers",{configurable:!0,get:function(){return null==this.myTargetMapper_0.get()?T():O(_(this.myTargetMapper_0.get()))}}),Yt.prototype.onEvent_11rb$=function(t){this.this$SingleChildRoleSynchronizer.sync_0()},Yt.$metadata$={kind:p,interfaces:[tt]},Vt.prototype.attach_1rog5x$=function(t){this.sync_0(),this.myChildRegistration_0=this.myChildProperty_0.addHandler_gxwwpc$(new Yt(this))},Vt.prototype.detach=function(){this.myChildRegistration_0.remove(),this.myTargetProperty_0.set_11rb$(null),this.myTargetMapper_0.set_11rb$(null)},Vt.prototype.sync_0=function(){var t,e=this.myChildProperty_0.get();if(e!==(null!=(t=this.myTargetMapper_0.get())?t.source:null))if(null!=e){var n=this.createMapper_11rb$(e);this.myTargetMapper_0.set_11rb$(n),this.myTargetProperty_0.set_11rb$(n.target),this.processMapper_obu244$(n)}else this.myTargetMapper_0.set_11rb$(null),this.myTargetProperty_0.set_11rb$(null)},Vt.$metadata$={kind:p,simpleName:"SingleChildRoleSynchronizer",interfaces:[ot]},Xt.$metadata$={kind:m,simpleName:"Companion",interfaces:[]};var Zt=null;function Jt(){return null===Zt&&new Xt,Zt}function Qt(){}function te(){he=this,this.EMPTY_0=new pe}function ee(t,e){this.closure$target=t,this.closure$source=e,qt.call(this)}function ne(t){this.closure$target=t}function ie(t,e){this.closure$source=t,this.closure$target=e,this.myOldValue_0=null,this.myRegistration_0=null}function oe(t){this.closure$r=t}function re(t){this.closure$disposable=t}function ae(t){this.closure$disposables=t}function se(t,e){this.closure$r=t,this.closure$src=e,qt.call(this)}function le(t){this.closure$r=t}function ue(t,e){this.closure$src=t,this.closure$h=e,qt.call(this)}function ce(t){this.closure$h=t}function pe(){}Wt.$metadata$={kind:I,simpleName:"Synchronizer",interfaces:[]},Qt.$metadata$={kind:I,simpleName:"SynchronizerContext",interfaces:[]},te.prototype.forSimpleRole_z48wgy$=function(t,e,n,i){return new Gt(t,e,n,i)},te.prototype.forObservableRole_abqnzq$=function(t,e,n,i,o){return new _e(t,e,n,i,o)},te.prototype.forObservableRole_umd8ru$=function(t,e,n,i){return this.forObservableRole_ndqwza$(t,e,n,i,null)},te.prototype.forObservableRole_ndqwza$=function(t,e,n,i,o){return new Bt(t,e,n,i,o)},te.prototype.forSingleRole_pri2ej$=function(t,e,n,i){return new Vt(t,e,n,i)},ne.prototype.onEvent_11rb$=function(t){this.closure$target.set_11rb$(t.newValue)},ne.$metadata$={kind:p,interfaces:[tt]},ee.prototype.doAttach_1rog5x$=function(t){return this.closure$target.set_11rb$(this.closure$source.get()),this.closure$source.addHandler_gxwwpc$(new ne(this.closure$target))},ee.$metadata$={kind:p,interfaces:[qt]},te.prototype.forPropsOneWay_2ov6i0$=function(t,e){return new ee(e,t)},ie.prototype.attach_1rog5x$=function(t){this.myOldValue_0=this.closure$source.get(),this.myRegistration_0=et.PropertyBinding.bindTwoWay_ejkotq$(this.closure$source,this.closure$target)},ie.prototype.detach=function(){var t;_(this.myRegistration_0).remove(),this.closure$target.set_11rb$(null==(t=this.myOldValue_0)||e.isType(t,Y)?t:k())},ie.$metadata$={kind:p,interfaces:[Wt]},te.prototype.forPropsTwoWay_ejkotq$=function(t,e){return new ie(t,e)},oe.prototype.attach_1rog5x$=function(t){},oe.prototype.detach=function(){this.closure$r.remove()},oe.$metadata$={kind:p,interfaces:[Wt]},te.prototype.forRegistration_3xv6fb$=function(t){return new oe(t)},re.prototype.attach_1rog5x$=function(t){},re.prototype.detach=function(){this.closure$disposable.dispose()},re.$metadata$={kind:p,interfaces:[Wt]},te.prototype.forDisposable_gg3y3y$=function(t){return new re(t)},ae.prototype.attach_1rog5x$=function(t){},ae.prototype.detach=function(){var t,e;for(t=this.closure$disposables,e=0;e!==t.length;++e)t[e].dispose()},ae.$metadata$={kind:p,interfaces:[Wt]},te.prototype.forDisposables_h9hjd7$=function(t){return new ae(t)},le.prototype.onEvent_11rb$=function(t){this.closure$r.run()},le.$metadata$={kind:p,interfaces:[tt]},se.prototype.doAttach_1rog5x$=function(t){return this.closure$r.run(),this.closure$src.addHandler_gxwwpc$(new le(this.closure$r))},se.$metadata$={kind:p,interfaces:[qt]},te.prototype.forEventSource_giy12r$=function(t,e){return new se(e,t)},ce.prototype.onEvent_11rb$=function(t){this.closure$h(t)},ce.$metadata$={kind:p,interfaces:[tt]},ue.prototype.doAttach_1rog5x$=function(t){return this.closure$src.addHandler_gxwwpc$(new ce(this.closure$h))},ue.$metadata$={kind:p,interfaces:[qt]},te.prototype.forEventSource_k8sbiu$=function(t,e){return new ue(t,e)},te.prototype.empty=function(){return this.EMPTY_0},pe.prototype.attach_1rog5x$=function(t){},pe.prototype.detach=function(){},pe.$metadata$={kind:p,interfaces:[Wt]},te.$metadata$={kind:m,simpleName:"Synchronizers",interfaces:[]};var he=null;function _e(t,e,n,i,o){nt.call(this,t),this.mySource_0=e,this.mySourceTransformer_0=n,this.myTarget_0=i,this.myCollectionRegistration_0=null,this.mySourceTransformation_0=null,this.addMapperFactory_7h0hpi$(o)}function de(t){this.this$TransformingObservableCollectionRoleSynchronizer=t,Q.call(this)}de.prototype.onItemAdded_u8tacu$=function(t){var e=this.this$TransformingObservableCollectionRoleSynchronizer.createMapper_11rb$(_(t.newItem));this.this$TransformingObservableCollectionRoleSynchronizer.modifiableMappers.add_wxm5ur$(t.index,e),this.this$TransformingObservableCollectionRoleSynchronizer.myTarget_0.add_wxm5ur$(t.index,e.target),this.this$TransformingObservableCollectionRoleSynchronizer.processMapper_obu244$(e)},de.prototype.onItemRemoved_u8tacu$=function(t){this.this$TransformingObservableCollectionRoleSynchronizer.modifiableMappers.removeAt_za3lpa$(t.index),this.this$TransformingObservableCollectionRoleSynchronizer.myTarget_0.removeAt_za3lpa$(t.index)},de.$metadata$={kind:p,interfaces:[Q]},_e.prototype.onAttach=function(){var t;nt.prototype.onAttach.call(this);var e=new N;for(this.mySourceTransformation_0=this.mySourceTransformer_0.transform_xwzc9p$(this.mySource_0,e),new it(this).update_4f0l55$(e),t=this.modifiableMappers.iterator();t.hasNext();){var n=t.next();this.myTarget_0.add_11rb$(n.target)}this.myCollectionRegistration_0=e.addListener_n5no9j$(new de(this))},_e.prototype.onDetach=function(){nt.prototype.onDetach.call(this),_(this.myCollectionRegistration_0).remove(),_(this.mySourceTransformation_0).dispose(),this.myTarget_0.clear()},_e.$metadata$={kind:p,simpleName:"TransformingObservableCollectionRoleSynchronizer",interfaces:[nt]},nt.MapperUpdater=it;var fe=t.jetbrains||(t.jetbrains={}),me=fe.datalore||(fe.datalore={}),$e=me.mapper||(me.mapper={}),ye=$e.core||($e.core={});return ye.BaseCollectionRoleSynchronizer=nt,ye.BaseRoleSynchronizer=ot,rt.DifferenceItem=at,ye.DifferenceBuilder=rt,st.SynchronizersConfiguration=yt,Object.defineProperty(st,"Companion",{get:Ot}),ye.Mapper=st,ye.MapperFactory=Nt,Object.defineProperty(ye,"Mappers",{get:Lt}),ye.MappingContext=zt,ye.ObservableCollectionRoleSynchronizer=Bt,ye.RefreshableSynchronizer=Ut,ye.RegistrationSynchronizer=qt,ye.RoleSynchronizer=Ht,ye.SimpleRoleSynchronizer=Gt,ye.SingleChildRoleSynchronizer=Vt,Object.defineProperty(Wt,"Companion",{get:Jt}),ye.Synchronizer=Wt,ye.SynchronizerContext=Qt,Object.defineProperty(ye,"Synchronizers",{get:function(){return null===he&&new te,he}}),ye.TransformingObservableCollectionRoleSynchronizer=_e,t})?i.apply(e,o):i)||(t.exports=r)},832:function(t,e,n){var i,o,r;o=[e,n(421),n(486),n(479),n(322)],void 0===(r="function"==typeof(i=function(t,e,n,i,o){"use strict";var r=t.$$importsForInline$$||(t.$$importsForInline$$={}),a=e.kotlin.collections.List,s=e.throwCCE,l=e.equals,u=e.kotlin.IllegalArgumentException_init_pdl1vj$,c=e.kotlin.collections.ArrayList_init_287e2$,p=e.Kind.OBJECT,h=e.Kind.CLASS,_=n.jetbrains.datalore.base.typedKey.TypedKey,d=e.Kind.INTERFACE,f=e.numberToDouble,m=e.kotlin.to_ujzrz7$,$=n.jetbrains.datalore.base.geometry.DoubleRectangle,y=e.kotlin.text.StringBuilder_init,g=e.kotlin.collections.getValue_t9ocha$,v=e.kotlin.collections.LinkedHashSet_init_mqih57$,b=e.kotlin.collections.Collection,w=i.jetbrains.datalore.plot.common.data,x=e.ensureNotNull,k=e.kotlin.isFinite_yrwdxr$,C=e.kotlin.collections.zip_45mdf7$,E=e.getCallableRef,S=e.kotlin.collections.toList_abgq59$,T=e.kotlin.comparisons.compareBy_bvgy4j$,O=e.kotlin.collections.sortedWith_eknfly$,N=e.kotlin.collections.reversed_7wnvza$,P=e.kotlin.collections.plus_mydzjv$,I=e.kotlin.collections.toSet_7wnvza$,A=n.jetbrains.datalore.base.logging,R=e.getKClass,j=e.kotlin.Enum,L=e.throwISE,z=e.kotlin.collections.ArrayList_init_mqih57$,D=e.kotlin.collections.HashMap_init_q3lmfv$,M=e.kotlin.collections.slice_b9tsm5$,B=e.kotlin.collections.HashMap_init_73mtqc$,F=e.kotlin.collections.collectionSizeOrDefault_ba2ldo$,U=e.kotlin.collections.ArrayList_init_ww73n8$,q=e.kotlin.collections.LinkedHashMap_init_q3lmfv$,H=e.kotlin.collections.mapCapacity_za3lpa$,G=e.kotlin.collections.LinkedHashMap_init_bwtc7$,K=e.kotlin.collections.MutableCollection,V=e.kotlin.IllegalStateException_init_pdl1vj$,Y=e.toString,W=e.kotlin.math.roundToInt_yrwdxr$,X=e.kotlin.collections.LinkedHashSet_init_287e2$,Z=e.kotlin.collections.toList_7wnvza$,J=e.kotlin.collections.distinct_7wnvza$,Q=e.kotlin.collections.toMap_6hr0sd$,tt=e.kotlin.collections.checkIndexOverflow_za3lpa$,et=e.kotlin.collections.Map,nt=e.kotlin.collections.listOf_i5x0yv$,it=e.kotlin.Unit,ot=n.jetbrains.datalore.base.typedKey.TypedKeyHashMap,rt=e.kotlin.js.internal.DoubleCompanionObject,at=n.jetbrains.datalore.base.values.Color,st=e.kotlin.collections.Iterable,lt=n.jetbrains.datalore.base.interval.DoubleSpan,ut=e.kotlin.collections.HashSet_init_mqih57$,ct=e.kotlin.NoSuchElementException,pt=e.kotlin.collections.Iterator,ht=n.jetbrains.datalore.base.function.Function,_t=n.jetbrains.datalore.base.values,dt=o.jetbrains.datalore.vis.svg,ft=e.kotlin.collections.joinToString_fmv235$,mt=n.jetbrains.datalore.base.geometry.DoubleVector,$t=n.jetbrains.datalore.base.spatial.projections.identity,yt=n.jetbrains.datalore.base.gcommon.collect.Ordering,gt=e.kotlin.Comparator,vt=e.getPropertyCallableRef,bt=e.kotlin.ranges.coerceAtLeast_dqglrj$,wt=e.kotlin.text.startsWith_7epoxm$,xt=e.kotlin.text.isBlank_gw00vp$,kt=e.kotlin.text.Regex_init_61zpoe$,Ct=n.jetbrains.datalore.base.geometry.DoubleSegment,Et=e.kotlin.collections.HashSet_init_ww73n8$,St=e.kotlin.collections.asReversed_2p1efm$,Tt=e.kotlin.collections.any_7wnvza$,Ot=e.wrapFunction,Nt=e.kotlin.collections.reverse_vvxzk3$,Pt=e.kotlin.collections.emptyList_287e2$,It=Object,At=e.kotlin.collections.first_7wnvza$,Rt=e.numberToInt,jt=o.jetbrains.datalore.vis.svg.SvgPathDataBuilder,Lt=Math,zt=n.jetbrains.datalore.base.enums.EnumInfoImpl,Dt=n.jetbrains.datalore.base.geometry.DoubleRectangle_init_6y0v78$,Mt=o.jetbrains.datalore.vis.svg.SvgLineElement_init_6y0v78$,Bt=o.jetbrains.datalore.vis.svg.SvgGElement,Ft=o.jetbrains.datalore.vis.svg.slim,Ut=o.jetbrains.datalore.vis.svg.SvgRectElement_init_6y0v78$,qt=n.jetbrains.datalore.base.geometry.DoubleRectangle_init_7e97im$,Ht=o.jetbrains.datalore.vis.svg.SvgImageElement_init_6y0v78$,Gt=o.jetbrains.datalore.vis.svg.SvgPathElement,Kt=e.throwUPAE,Vt=n.jetbrains.datalore.base.collections.filterNotNullKeys_go3l1a$,Yt=e.kotlin.math,Wt=n.jetbrains.datalore.base.algorithms.AdaptiveResampler,Xt=e.kotlin.collections.listOf_mh5how$,Zt=e.kotlin.collections.first_2p1efm$,Jt=o.jetbrains.datalore.vis.svg.SvgCircleElement_init_yvo9jy$,Qt=e.kotlin.ranges.rangeTo_38ydlf$,te=e.kotlin.NoSuchElementException_init,ee=e.kotlin.collections.addAll_ipc267$,ne=e.kotlin.math.round_14dthe$,ie=o.jetbrains.datalore.vis.svg.SvgImageElementEx.Bitmap,oe=o.jetbrains.datalore.vis.svg.SvgImageElementEx,re=o.jetbrains.datalore.vis.svg.SvgPathElement_init_7jrsat$,ae=o.jetbrains.datalore.vis.svg.SvgShape,se=o.jetbrains.datalore.vis.svg.SvgElement,le=e.kotlin.collections.listOfNotNull_jurz7g$,ue=n.jetbrains.datalore.base.algorithms.splitRings_bemo1h$,ce=i.jetbrains.datalore.plot.common.geometry.PolylineSimplifier,pe=e.kotlin.Pair,he=e.kotlin.collections.sum_l63kqw$,_e=e.kotlin.collections.last_2p1efm$,de=o.jetbrains.datalore.vis.svg.SvgRectElement_init_wthzt5$,fe=e.kotlin.collections.contains_2ws7j4$,me=e.kotlin.collections.toMutableList_4c7yge$,$e=n.jetbrains.datalore.base.math.areEqual_yvo9jy$,ye=n.jetbrains.datalore.base.values.FontFace,ge=e.kotlin.collections.mapOf_qfcya0$,ve=e.kotlin.collections.emptyMap_q3lmfv$,be=e.kotlin.random.Random,we=i.jetbrains.datalore.plot.common.util.MutableDouble,xe=o.jetbrains.datalore.vis.svg.slim.SvgSlimObject,ke=o.jetbrains.datalore.vis.svg.SvgPathData,Ce=o.jetbrains.datalore.vis.svg.SvgPathDataBuilder.Interpolation,Ee=n.jetbrains.datalore.base.observable.property.WritableProperty,Se=o.jetbrains.datalore.vis.svg.SvgColors,Te=e.kotlin.collections.firstOrNull_2p1efm$,Oe=e.kotlin.text.split_o64adg$,Ne=o.jetbrains.datalore.vis.svg.SvgTextElement_init_61zpoe$,Pe=e.kotlin.text.trim_gw00vp$,Ie=n.jetbrains.datalore.base.observable.event.EventHandler,Ae=n.jetbrains.datalore.base.registration.CompositeRegistration,Re=o.jetbrains.datalore.vis.svg.SvgClipPathElement,je=o.jetbrains.datalore.vis.svg.SvgRectElement,Le=o.jetbrains.datalore.vis.svg.SvgDefsElement,ze=o.jetbrains.datalore.vis.svg.SvgIRI,De=o.jetbrains.datalore.vis.svg.SvgGraphicsElement,Me=o.jetbrains.datalore.vis.svg.SvgTransformBuilder,Be=e.kotlin.ranges.CharRange,Fe=e.kotlin.collections.plus_q4559j$,Ue=e.kotlin.text.first_gw00vp$,qe=e.toBoxedChar,He=e.unboxChar,Ge=n.jetbrains.datalore.base.random,Ke=e.kotlin.text.iterator_gw00vp$,Ve=e.kotlin.collections.filterNotNull_m3lr2h$,Ye=i.jetbrains.datalore.plot.common.time.interval.YearInterval,We=i.jetbrains.datalore.plot.common.time,Xe=i.jetbrains.datalore.plot.common.time.interval,Ze=e.kotlin.ranges.until_dqglrj$,Je=Math.log10,Qe=n.jetbrains.datalore.base.numberFormat.NumberFormat_init_61zpoe$,tn=n.jetbrains.datalore.base.datetime.Duration,en=e.Long.ZERO,nn=e.kotlin.math.abs_s8cxhz$,on=n.jetbrains.datalore.base.stringFormat.StringFormat,rn=e.kotlin.collections.toList_us0mfu$,an=e.numberToLong,sn=i.jetbrains.datalore.plot.common.text,ln=i.jetbrains.datalore.plot.common.time.interval.TimeInterval,un=e.kotlin.isNaN_yrwdxr$,cn=e.kotlin.collections.binarySearch_jhx6be$,pn=e.kotlin.math.abs_za3lpa$,hn=e.kotlin.collections.toMutableMap_abgq59$,_n=e.kotlin.collections.sorted_exjks8$,dn=e.kotlin.collections.mutableListOf_i5x0yv$,fn=e.kotlin.collections.maxOrNull_l63kqw$,mn=e.kotlin.collections.mutableMapOf_qfcya0$,$n=e.kotlin.collections.HashSet_init_287e2$,yn=e.kotlin.collections.sortWith_nqfjgj$,gn=e.hashCode,vn=e.kotlin.collections.mapOf_x2b85n$,bn=e.kotlin.RuntimeException_init_pdl1vj$,wn=e.kotlin.collections.unzip_6hr0sd$,xn=e.kotlin.collections.copyToArray,kn=Array,Cn=e.kotlin.ranges.IntRange,En=e.kotlin.collections.getOrNull_yzln2o$,Sn=e.Long.fromInt(37),Tn=e.kotlin.random.Random_s8cxhz$,On=e.kotlin.ranges.coerceIn_nig4hr$,Nn=e.kotlin.isInfinite_yrwdxr$,Pn=new e.Long(456400702,-8856424),In=e.kotlin.collections.arrayCopy,An=e.kotlin.collections.average_bvy38s$,Rn=e.kotlin.collections.arrayListOf_i5x0yv$,jn=e.kotlin.collections.fill_x4f2cq$,Ln=e.primitiveArraySort,zn=(e.kotlin.collections.fill_tpuxuu$,e.kotlin.collections.get_lastIndex_bvy38s$),Dn=e.kotlin.collections.get_indices_bvy38s$,Mn=e.kotlin.ranges.reversed_zf1xzc$,Bn=e.kotlin.collections.toMutableList_bvy38s$,Fn=e.kotlin.isNaN_81szk$,Un=e.floatToBits,qn=e.doubleToBits,Hn=e.Long.fromInt(-2147483648),Gn=new e.Long(1994767346,-1362668208),Kn=e.kotlin.collections.zip_pmvpm9$,Vn=e.kotlin.collections.toDoubleArray_tcduak$,Yn=e.kotlin.collections.asSequence_7wnvza$,Wn=e.kotlin.sequences.zip_r7q3s9$,Xn=e.kotlin.sequences.drop_wuwhe2$;function Zn(t,e){ti(),void 0===e&&(e=!0),this.name=t,this.isNumeric=e,ti().values_0.add_11rb$(this)}function Jn(){Qn=this,this.values_0=c(),this.X=new Zn("x"),this.Y=new Zn("y"),this.Z=new Zn("z"),this.COLOR=new Zn("color",!1),this.FILL=new Zn("fill",!1),this.ALPHA=new Zn("alpha"),this.SHAPE=new Zn("shape",!1),this.LINETYPE=new Zn("linetype",!1),this.SIZE=new Zn("size"),this.STACKSIZE=new Zn("stacksize"),this.WIDTH=new Zn("width"),this.HEIGHT=new Zn("height"),this.BINWIDTH=new Zn("binwidth"),this.VIOLINWIDTH=new Zn("violinwidth"),this.WEIGHT=new Zn("weight"),this.INTERCEPT=new Zn("intercept"),this.SLOPE=new Zn("slope"),this.XINTERCEPT=new Zn("xintercept"),this.YINTERCEPT=new Zn("yintercept"),this.LOWER=new Zn("lower"),this.MIDDLE=new Zn("middle"),this.UPPER=new Zn("upper"),this.SAMPLE=new Zn("sample"),this.QUANTILE=new Zn("quantile"),this.XMIN=new Zn("xmin"),this.XMAX=new Zn("xmax"),this.YMIN=new Zn("ymin"),this.YMAX=new Zn("ymax"),this.XEND=new Zn("xend"),this.YEND=new Zn("yend"),this.MAP_ID=new Zn("map_id",!1),this.FRAME=new Zn("frame",!1),this.SPEED=new Zn("speed"),this.FLOW=new Zn("flow"),this.LABEL=new Zn("label",!1),this.FAMILY=new Zn("family",!1),this.FONTFACE=new Zn("fontface",!1),this.LINEHEIGHT=new Zn("lineheight"),this.HJUST=new Zn("hjust",!1),this.VJUST=new Zn("vjust",!1),this.ANGLE=new Zn("angle"),this.SLICE=new Zn("slice"),this.EXPLODE=new Zn("explode")}mi.prototype=Object.create(j.prototype),mi.prototype.constructor=mi,Oo.prototype=Object.create(j.prototype),Oo.prototype.constructor=Oo,ea.prototype=Object.create(Pi.prototype),ea.prototype.constructor=ea,sa.prototype=Object.create(ra.prototype),sa.prototype.constructor=sa,la.prototype=Object.create(ra.prototype),la.prototype.constructor=la,ua.prototype=Object.create(ra.prototype),ua.prototype.constructor=ua,Ra.prototype=Object.create(Vr.prototype),Ra.prototype.constructor=Ra,za.prototype=Object.create(dl.prototype),za.prototype.constructor=za,Fa.prototype=Object.create(dl.prototype),Fa.prototype.constructor=Fa,Ka.prototype=Object.create(dl.prototype),Ka.prototype.constructor=Ka,Za.prototype=Object.create(dl.prototype),Za.prototype.constructor=Za,Jc.prototype=Object.create(dl.prototype),Jc.prototype.constructor=Jc,es.prototype=Object.create(Jc.prototype),es.prototype.constructor=es,ih.prototype=Object.create(Pi.prototype),ih.prototype.constructor=ih,ss.prototype=Object.create(ih.prototype),ss.prototype.constructor=ss,rs.prototype=Object.create(dl.prototype),rs.prototype.constructor=rs,iu.prototype=Object.create(dl.prototype),iu.prototype.constructor=iu,ps.prototype=Object.create(iu.prototype),ps.prototype.constructor=ps,Gu.prototype=Object.create(dl.prototype),Gu.prototype.constructor=Gu,fs.prototype=Object.create(Gu.prototype),fs.prototype.constructor=fs,gs.prototype=Object.create(dl.prototype),gs.prototype.constructor=gs,ks.prototype=Object.create(ps.prototype),ks.prototype.constructor=ks,Ts.prototype=Object.create(fs.prototype),Ts.prototype.constructor=Ts,Is.prototype=Object.create(Fa.prototype),Is.prototype.constructor=Is,Sh.prototype=Object.create(oh.prototype),Sh.prototype.constructor=Sh,Fs.prototype=Object.create(Sh.prototype),Fs.prototype.constructor=Fs,Us.prototype=Object.create(j.prototype),Us.prototype.constructor=Us,Bs.prototype=Object.create(dl.prototype),Bs.prototype.constructor=Bs,tl.prototype=Object.create(dl.prototype),tl.prototype.constructor=tl,Dl.prototype=Object.create(iu.prototype),Dl.prototype.constructor=Dl,cl.prototype=Object.create(Dl.prototype),cl.prototype.constructor=cl,yl.prototype=Object.create(dl.prototype),yl.prototype.constructor=yl,wl.prototype=Object.create(Za.prototype),wl.prototype.constructor=wl,El.prototype=Object.create(dl.prototype),El.prototype.constructor=El,ju.prototype=Object.create(dl.prototype),ju.prototype.constructor=ju,Nl.prototype=Object.create(ju.prototype),Nl.prototype.constructor=Nl,Vc.prototype=Object.create(dl.prototype),Vc.prototype.constructor=Vc,Rl.prototype=Object.create(Vc.prototype),Rl.prototype.constructor=Rl,Ul.prototype=Object.create(dl.prototype),Ul.prototype.constructor=Ul,Ql.prototype=Object.create(Gu.prototype),Ql.prototype.constructor=Ql,du.prototype=Object.create(ih.prototype),du.prototype.constructor=du,fu.prototype=Object.create(j.prototype),fu.prototype.constructor=fu,$u.prototype=Object.create(fu.prototype),$u.prototype.constructor=$u,vu.prototype=Object.create(fu.prototype),vu.prototype.constructor=vu,xu.prototype=Object.create(fu.prototype),xu.prototype.constructor=xu,uu.prototype=Object.create(dl.prototype),uu.prototype.constructor=uu,Bu.prototype=Object.create(dl.prototype),Bu.prototype.constructor=Bu,Wu.prototype=Object.create(ju.prototype),Wu.prototype.constructor=Wu,Qu.prototype=Object.create(iu.prototype),Qu.prototype.constructor=Qu,ic.prototype=Object.create(ju.prototype),ic.prototype.constructor=ic,sc.prototype=Object.create(iu.prototype),sc.prototype.constructor=sc,pc.prototype=Object.create(dl.prototype),pc.prototype.constructor=pc,fc.prototype=Object.create(dl.prototype),fc.prototype.constructor=fc,gc.prototype=Object.create(dl.prototype),gc.prototype.constructor=gc,xc.prototype=Object.create(dl.prototype),xc.prototype.constructor=xc,Tc.prototype=Object.create(dl.prototype),Tc.prototype.constructor=Tc,zc.prototype=Object.create(j.prototype),zc.prototype.constructor=zc,Lc.prototype=Object.create(Dl.prototype),Lc.prototype.constructor=Lc,np.prototype=Object.create(dl.prototype),np.prototype.constructor=np,ap.prototype=Object.create(dl.prototype),ap.prototype.constructor=ap,$p.prototype=Object.create(j.prototype),$p.prototype.constructor=$p,mp.prototype=Object.create(Bs.prototype),mp.prototype.constructor=mp,Mp.prototype=Object.create(ih.prototype),Mp.prototype.constructor=Mp,Bp.prototype=Object.create(j.prototype),Bp.prototype.constructor=Bp,Gp.prototype=Object.create(j.prototype),Gp.prototype.constructor=Gp,qh.prototype=Object.create(oh.prototype),qh.prototype.constructor=qh,Yh.prototype=Object.create(oh.prototype),Yh.prototype.constructor=Yh,l_.prototype=Object.create(ih.prototype),l_.prototype.constructor=l_,Jh.prototype=Object.create(Ah.prototype),Jh.prototype.constructor=Jh,d_.prototype=Object.create(j.prototype),d_.prototype.constructor=d_,g_.prototype=Object.create(j.prototype),g_.prototype.constructor=g_,R_.prototype=Object.create(j.prototype),R_.prototype.constructor=R_,U_.prototype=Object.create(A_.prototype),U_.prototype.constructor=U_,id.prototype=Object.create(j.prototype),id.prototype.constructor=id,ld.prototype=Object.create(j.prototype),ld.prototype.constructor=ld,Nd.prototype=Object.create(j.prototype),Nd.prototype.constructor=Nd,jd.prototype=Object.create(j.prototype),jd.prototype.constructor=jd,qd.prototype=Object.create(j.prototype),qd.prototype.constructor=qd,mf.prototype=Object.create(j.prototype),mf.prototype.constructor=mf,Af.prototype=Object.create(j.prototype),Af.prototype.constructor=Af,jf.prototype=Object.create(Af.prototype),jf.prototype.constructor=jf,Df.prototype=Object.create(Af.prototype),Df.prototype.constructor=Df,xm.prototype=Object.create(j.prototype),xm.prototype.constructor=xm,r$.prototype=Object.create(b$.prototype),r$.prototype.constructor=r$,O$.prototype=Object.create(g$.prototype),O$.prototype.constructor=O$,a$.prototype=Object.create(O$.prototype),a$.prototype.constructor=a$,c$.prototype=Object.create(b$.prototype),c$.prototype.constructor=c$,v$.prototype=Object.create(O$.prototype),v$.prototype.constructor=v$,k$.prototype=Object.create(b$.prototype),k$.prototype.constructor=k$,C$.prototype=Object.create(b$.prototype),C$.prototype.constructor=C$,N$.prototype=Object.create(G$.prototype),N$.prototype.constructor=N$,P$.prototype=Object.create(G$.prototype),P$.prototype.constructor=P$,z$.prototype=Object.create(G$.prototype),z$.prototype.constructor=z$,ly.prototype=Object.create(j.prototype),ly.prototype.constructor=ly,_y.prototype=Object.create(j.prototype),_y.prototype.constructor=_y,vy.prototype=Object.create(G$.prototype),vy.prototype.constructor=vy,Oy.prototype=Object.create(ky.prototype),Oy.prototype.constructor=Oy,Ty.prototype=Object.create(wy.prototype),Ty.prototype.constructor=Ty,Iy.prototype=Object.create(ky.prototype),Iy.prototype.constructor=Iy,Py.prototype=Object.create(wy.prototype),Py.prototype.constructor=Py,ag.prototype=Object.create(rg.prototype),ag.prototype.constructor=ag,sg.prototype=Object.create(rg.prototype),sg.prototype.constructor=sg,fg.prototype=Object.create(rg.prototype),fg.prototype.constructor=fg,kg.prototype=Object.create(xg.prototype),kg.prototype.constructor=kg,Pg.prototype=Object.create(xg.prototype),Pg.prototype.constructor=Pg,Ug.prototype=Object.create(xg.prototype),Ug.prototype.constructor=Ug,Gg.prototype=Object.create(xg.prototype),Gg.prototype.constructor=Gg,Qg.prototype=Object.create(lv.prototype),Qg.prototype.constructor=Qg,ov.prototype=Object.create(lv.prototype),ov.prototype.constructor=ov,uv.prototype=Object.create(lv.prototype),uv.prototype.constructor=uv,gv.prototype=Object.create(j.prototype),gv.prototype.constructor=gv,yv.prototype=Object.create(lv.prototype),yv.prototype.constructor=yv,jv.prototype=Object.create(lv.prototype),jv.prototype.constructor=jv,Jv.prototype=Object.create(j.prototype),Jv.prototype.constructor=Jv,sb.prototype=Object.create(lv.prototype),sb.prototype.constructor=sb,mb.prototype=Object.create(lv.prototype),mb.prototype.constructor=mb,vb.prototype=Object.create(Qg.prototype),vb.prototype.constructor=vb,kb.prototype=Object.create(Qg.prototype),kb.prototype.constructor=kb,Tb.prototype=Object.create(ov.prototype),Tb.prototype.constructor=Tb,Ob.prototype=Object.create(ov.prototype),Ob.prototype.constructor=Ob,Nb.prototype=Object.create(lv.prototype),Nb.prototype.constructor=Nb,Kb.prototype=Object.create(j.prototype),Kb.prototype.constructor=Kb,ew.prototype=Object.create(j.prototype),ew.prototype.constructor=ew,Hb.prototype=Object.create(lv.prototype),Hb.prototype.constructor=Hb,xw.prototype=Object.create(j.prototype),xw.prototype.constructor=xw,ww.prototype=Object.create(lv.prototype),ww.prototype.constructor=ww,jw.prototype=Object.create(lv.prototype),jw.prototype.constructor=jw,Mw.prototype=Object.create(lv.prototype),Mw.prototype.constructor=Mw,qw.prototype=Object.create(lv.prototype),qw.prototype.constructor=qw,tx.prototype=Object.create(j.prototype),tx.prototype.constructor=tx,Qw.prototype=Object.create(lv.prototype),Qw.prototype.constructor=Qw,kx.prototype=Object.create(j.prototype),kx.prototype.constructor=kx,xx.prototype=Object.create(lv.prototype),xx.prototype.constructor=xx,jx.prototype=Object.create(lv.prototype),jx.prototype.constructor=jx,Ux.prototype=Object.create(j.prototype),Ux.prototype.constructor=Ux,Fx.prototype=Object.create(lv.prototype),Fx.prototype.constructor=Fx,Xx.prototype=Object.create(lv.prototype),Xx.prototype.constructor=Xx,ck.prototype=Object.create(gk.prototype),ck.prototype.constructor=ck,hk.prototype=Object.create(j.prototype),hk.prototype.constructor=hk,Ek.prototype=Object.create(zk.prototype),Ek.prototype.constructor=Ek,Ik.prototype=Object.create(ck.prototype),Ik.prototype.constructor=Ik,Kk.prototype=Object.create(zk.prototype),Kk.prototype.constructor=Kk,Wk.prototype=Object.create(tk.prototype),Wk.prototype.constructor=Wk,uC.prototype=Object.create(j.prototype),uC.prototype.constructor=uC,fC.prototype=Object.create(tk.prototype),fC.prototype.constructor=fC,EC.prototype=Object.create(tk.prototype),EC.prototype.constructor=EC,NC.prototype=Object.create(tk.prototype),NC.prototype.constructor=NC,zC.prototype=Object.create(qC.prototype),zC.prototype.constructor=zC,DC.prototype=Object.create(qC.prototype),DC.prototype.constructor=DC,MC.prototype=Object.create(qC.prototype),MC.prototype.constructor=MC,Object.defineProperty(Zn.prototype,"isColor",{configurable:!0,get:function(){return ti().isColor_896ixz$(this)}}),Zn.prototype.toString=function(){return"aes '"+this.name+"'"},Jn.prototype.numeric_shhb9a$=function(t){var n,i,o=c();for(i=t.iterator();i.hasNext();){var r=i.next();r.isNumeric&&o.add_11rb$(r)}return e.isType(n=o,a)?n:s()},Jn.prototype.isPositional_896ixz$=function(t){return this.isPositionalXY_896ixz$(t)||l(t,this.SLOPE)},Jn.prototype.isPositionalXY_896ixz$=function(t){return this.isPositionalX_896ixz$(t)||this.isPositionalY_896ixz$(t)},Jn.prototype.isPositionalX_896ixz$=function(t){return l(t,this.X)||l(t,this.XINTERCEPT)||l(t,this.XMIN)||l(t,this.XMAX)||l(t,this.XEND)},Jn.prototype.isPositionalY_896ixz$=function(t){return l(t,this.Y)||l(t,this.YMIN)||l(t,this.YMAX)||l(t,this.INTERCEPT)||l(t,this.YINTERCEPT)||l(t,this.LOWER)||l(t,this.MIDDLE)||l(t,this.UPPER)||l(t,this.SAMPLE)||l(t,this.YEND)},Jn.prototype.toAxisAes_pnj1mo$=function(t,e){var n;if(l(t,this.X)||l(t,this.Y))n=t;else if(this.isPositionalX_896ixz$(t))n=e?this.Y:this.X;else{if(!this.isPositionalY_896ixz$(t))throw u("Expected a positional aes by was "+t);n=e?this.X:this.Y}return n},Jn.prototype.isColor_896ixz$=function(t){return l(t,this.COLOR)||l(t,this.FILL)},Jn.prototype.affectingScaleX_896ixz$=function(t){return this.isPositionalX_896ixz$(t)},Jn.prototype.affectingScaleY_896ixz$=function(t){return this.isPositionalY_896ixz$(t)&&!l(t,this.INTERCEPT)},Jn.prototype.affectingScaleX_shhb9a$=function(t){var e,n=this.numeric_shhb9a$(t),i=c();for(e=n.iterator();e.hasNext();){var o=e.next();this.affectingScaleX_896ixz$(o)&&i.add_11rb$(o)}return i},Jn.prototype.affectingScaleY_shhb9a$=function(t){var e,n=this.numeric_shhb9a$(t),i=c();for(e=n.iterator();e.hasNext();){var o=e.next();this.affectingScaleY_896ixz$(o)&&i.add_11rb$(o)}return i},Jn.prototype.noGuideNeeded_896ixz$=function(t){return l(t,this.MAP_ID)||l(t,this.FRAME)||l(t,this.SPEED)||l(t,this.FLOW)||l(t,this.LABEL)||l(t,this.SLOPE)||l(t,this.STACKSIZE)||l(t,this.WIDTH)||l(t,this.HEIGHT)||l(t,this.BINWIDTH)||l(t,this.VIOLINWIDTH)||l(t,this.QUANTILE)||l(t,this.HJUST)||l(t,this.VJUST)||l(t,this.ANGLE)||l(t,this.FAMILY)||l(t,this.FONTFACE)||l(t,this.LINEHEIGHT)||l(t,this.SLICE)||l(t,this.EXPLODE)||this.isPositional_896ixz$(t)},Jn.prototype.values=function(){return this.values_0},Jn.prototype.allPositional=function(){var t,n,i=this.values_0,o=c();for(n=i.iterator();n.hasNext();){var r=n.next();this.isPositional_896ixz$(r)&&o.add_11rb$(r)}return e.isType(t=o,a)?t:s()},Jn.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var Qn=null;function ti(){return null===Qn&&new Jn,Qn}function ei(){}function ni(){}function ii(){}function oi(t){var e;for(di(),this.myVectorByVar_0=null,this.myIsNumeric_0=null,this.myIsDateTime_0=null,this.myRanges_0=D(),this.myDistinctValues_0=D(),this.myOrderSpecs_0=null,this.assertAllSeriesAreSameSize_0(t.myVectorByVar_8be2vx$),this.myVectorByVar_0=B(t.myVectorByVar_8be2vx$),this.myIsNumeric_0=B(t.myIsNumeric_8be2vx$),this.myIsDateTime_0=B(t.myIsDateTime_8be2vx$),this.myOrderSpecs_0=t.myOrderSpecs_8be2vx$,e=this.myOrderSpecs_0.iterator();e.hasNext();){var n=e.next(),i=this.myDistinctValues_0,o=n.variable,r=this.getOrderedDistinctValues_0(n);i.put_xwzc9p$(o,r)}}function ri(t,e,n,i){void 0===i&&(i=null),this.variable=t,this.orderBy=e,this.direction=n,this.aggregateOperation=i}function ai(t){return null!=t&&(!("number"==typeof t)||k(t))}function si(t){var n;return e.isComparable(n=t.second)?n:s()}function li(t){var n;return e.isComparable(n=t.first)?n:s()}function ui(){_i=this,this.LOG_0=A.PortableLogging.logger_xo1ogr$(R(oi))}Zn.$metadata$={kind:h,simpleName:"Aes",interfaces:[_]},ei.$metadata$={kind:d,simpleName:"Aesthetics",interfaces:[]},ni.prototype.isInDomain_s8jyv4$=function(t){return!!e.isNumber(t)&&this.isInDomain_yrwdxb$(f(t))},ni.prototype.createApplicableDomain_yrwdxb$=function(t,e){return void 0===t&&(t=null),e?e(t):this.createApplicableDomain_yrwdxb$$default(t)},ni.prototype.definedLimits=function(){return m(null,null)},ni.$metadata$={kind:d,simpleName:"ContinuousTransform",interfaces:[Br]},ii.prototype.toClient_wthzt5$=function(t){var e=this.toClient_gpjtzr$(t.origin),n=this.toClient_gpjtzr$(t.origin.add_gpjtzr$(t.dimension));return null!=e&&null!=n?$.Companion.span_qt8ska$(e,n):null},ii.$metadata$={kind:d,simpleName:"CoordinateSystem",interfaces:[]},ri.$metadata$={kind:h,simpleName:"OrderSpec",interfaces:[]},Object.defineProperty(oi.prototype,"isEmpty",{configurable:!0,get:function(){return this.myVectorByVar_0.isEmpty()}}),oi.prototype.assertAllSeriesAreSameSize_0=function(t){if(t.size>1)for(var e=t.entries.iterator(),n=e.next().value.size;e.hasNext();)if(e.next().value.size!==n)throw u("All data series in data frame must have equal size\n"+this.dumpSizes_0(t))},oi.prototype.dumpSizes_0=function(t){var e,n=y();for(e=t.entries.iterator();e.hasNext();){var i=e.next(),o=i.key,r=i.value;n.append_pdl1vj$(o.name).append_pdl1vj$(" : ").append_s8jyv4$(r.size).append_s8itvh$(10)}return n.toString()},oi.prototype.rowCount=function(){return this.myVectorByVar_0.isEmpty()?0:this.myVectorByVar_0.entries.iterator().next().value.size},oi.prototype.has_8xm3sj$=function(t){return this.myVectorByVar_0.containsKey_11rb$(t)},oi.prototype.isEmpty_8xm3sj$=function(t){return this.get_8xm3sj$(t).isEmpty()},oi.prototype.hasNoOrEmpty_8xm3sj$=function(t){return!this.has_8xm3sj$(t)||this.isEmpty_8xm3sj$(t)},oi.prototype.get_8xm3sj$=function(t){return this.assertDefined_8xm3sj$(t),g(this.myVectorByVar_0,t)},oi.prototype.getNumeric_8xm3sj$=function(t){var n;this.assertDefined_8xm3sj$(t);var i=g(this.myVectorByVar_0,t);return i.isEmpty()||this.assertNumeric_0(t),e.isType(n=i,a)?n:s()},oi.prototype.distinctValues_8xm3sj$=function(t){this.assertDefined_8xm3sj$(t);var n=this.myDistinctValues_0.get_11rb$(t);if(null==n){var i,o=v(this.get_8xm3sj$(t));o.remove_11rb$(null);var r=o;return e.isType(i=r,b)?i:s()}return n},oi.prototype.variables=function(){return this.myVectorByVar_0.keys},oi.prototype.isNumeric_8xm3sj$=function(t){if(this.assertDefined_8xm3sj$(t),!this.myIsNumeric_0.containsKey_11rb$(t)){var e=w.SeriesUtil.checkedDoubles_9ma18$(this.get_8xm3sj$(t)),n=this.myIsNumeric_0,i=e.notEmptyAndCanBeCast();n.put_xwzc9p$(t,i)}return x(this.myIsNumeric_0.get_11rb$(t))},oi.prototype.isDateTime_8xm3sj$=function(t){return this.assertDefined_8xm3sj$(t),this.myIsDateTime_0.containsKey_11rb$(t)},oi.prototype.range_8xm3sj$=function(t){if(!this.myRanges_0.containsKey_11rb$(t)){var e=this.getNumeric_8xm3sj$(t),n=w.SeriesUtil.range_l63ks6$(e);this.myRanges_0.put_xwzc9p$(t,n)}return this.myRanges_0.get_11rb$(t)},oi.prototype.builder=function(){return Oi(this)},oi.prototype.slice_ampky3$=function(t){return Ni(this,t).build()},oi.prototype.assertDefined_8xm3sj$=function(t){if(!this.has_8xm3sj$(t)){var e=u(this.undefinedVariableErrorMessage_61zpoe$(t.name));throw di().LOG_0.error_l35kib$(e,(n=e,function(){return x(n.message)})),e}var n},oi.prototype.undefinedVariableErrorMessage_61zpoe$=function(t){var e,n="Variable not found: '"+t+"'. Variables in data frame: ",i=this.variables(),o=U(F(i,10));for(e=i.iterator();e.hasNext();){var r=e.next();o.add_11rb$("'"+r.name+"'")}return n+o},oi.prototype.assertNumeric_0=function(t){if(!this.isNumeric_8xm3sj$(t)){var e=u("Not a numeric variable: '"+t+"'");throw di().LOG_0.error_l35kib$(e,(n=e,function(){return x(n.message)})),e}var n},oi.prototype.selectIndices_pqoyrt$=function(t){return this.buildModified_0((e=t,function(t){return w.SeriesUtil.pickAtIndices_ge51dg$(t,e)}));var e},oi.prototype.selectIndices_p1n9e9$=function(t){return this.buildModified_0((e=t,function(t){return w.SeriesUtil.pickAtIndices_jlfzfq$(t,e)}));var e},oi.prototype.dropIndices_p1n9e9$=function(t){return t.isEmpty()?this:this.buildModified_0((e=t,function(t){return w.SeriesUtil.skipAtIndices_jlfzfq$(t,e)}));var e},oi.prototype.buildModified_0=function(t){var e,n=this.builder();for(e=this.myVectorByVar_0.keys.iterator();e.hasNext();){var i=e.next(),o=this.myVectorByVar_0.get_11rb$(i),r=t(x(o));n.putIntern_bxyhp4$(i,r)}return n.build()},oi.prototype.getOrderedDistinctValues_0=function(t){var e,n,i=ai;if(null!=t.aggregateOperation){if(!this.isNumeric_8xm3sj$(t.orderBy))throw u("Can't apply aggregate operation to non-numeric values".toString());var o,r=C(this.get_8xm3sj$(t.variable),this.getNumeric_8xm3sj$(t.orderBy)),a=q();for(o=r.iterator();o.hasNext();){var s,l=o.next(),p=l.component1(),h=a.get_11rb$(p);if(null==h){var _=c();a.put_xwzc9p$(p,_),s=_}else s=h;var d=s,f=d.add_11rb$,m=l.component2();f.call(d,m)}var $,y=G(H(a.size));for($=a.entries.iterator();$.hasNext();){var g,v=$.next(),b=y.put_xwzc9p$,w=v.key,x=v.value,k=t.aggregateOperation,E=c();for(g=x.iterator();g.hasNext();){var A=g.next();i(A)&&E.add_11rb$(A)}b.call(y,w,k.call(t,E))}e=S(y)}else e=C(this.get_8xm3sj$(t.variable),this.get_8xm3sj$(t.orderBy));var R,j=e,L=c();for(R=j.iterator();R.hasNext();){var z=R.next();i(z.second)&&i(z.first)&&L.add_11rb$(z)}var D,M=O(L,T([si,li])),B=c();for(D=M.iterator();D.hasNext();){var F;null!=(F=D.next().first)&&B.add_11rb$(F)}var U,K=B,V=C(this.get_8xm3sj$(t.variable),this.get_8xm3sj$(t.orderBy)),Y=c();for(U=V.iterator();U.hasNext();){var W=U.next();i(W.second)||Y.add_11rb$(W)}var X,Z=c();for(X=Y.iterator();X.hasNext();){var J;null!=(J=X.next().first)&&Z.add_11rb$(J)}var Q=Z;return n=t.direction<0?N(K):K,I(P(n,Q))},ui.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var ci,pi,hi,_i=null;function di(){return null===_i&&new ui,_i}function fi(t,e,n){xi(),void 0===e&&(e=yi()),void 0===n&&(n=t),this.name=t,this.source=e,this.label=n}function mi(t,e){j.call(this),this.name$=t,this.ordinal$=e}function $i(){$i=function(){},ci=new mi("ORIGIN",0),pi=new mi("TRANSFORM",1),hi=new mi("STAT",2)}function yi(){return $i(),ci}function gi(){return $i(),pi}function vi(){return $i(),hi}function bi(){wi=this}Object.defineProperty(fi.prototype,"isOrigin",{configurable:!0,get:function(){return this.source===yi()}}),Object.defineProperty(fi.prototype,"isStat",{configurable:!0,get:function(){return this.source===vi()}}),Object.defineProperty(fi.prototype,"isTransform",{configurable:!0,get:function(){return this.source===gi()}}),fi.prototype.toString=function(){return this.name},fi.prototype.toSummaryString=function(){return this.name+", '"+this.label+"' ["+this.source+"]"},mi.$metadata$={kind:h,simpleName:"Source",interfaces:[j]},mi.values=function(){return[yi(),gi(),vi()]},mi.valueOf_61zpoe$=function(t){switch(t){case"ORIGIN":return yi();case"TRANSFORM":return gi();case"STAT":return vi();default:L("No enum constant jetbrains.datalore.plot.base.DataFrame.Variable.Source."+t)}},bi.prototype.createOriginal_puj7f4$=function(t,e){return void 0===e&&(e=t),new fi(t,yi(),e)},bi.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var wi=null;function xi(){return null===wi&&new bi,wi}function ki(){Si(),this.myVectorByVar_8be2vx$=D(),this.myIsNumeric_8be2vx$=D(),this.myIsDateTime_8be2vx$=D(),this.myOrderSpecs_8be2vx$=c()}function Ci(){Ei=this}fi.$metadata$={kind:h,simpleName:"Variable",interfaces:[]},ki.prototype.initInternals_0=function(t,e,n,i){this.myVectorByVar_8be2vx$.putAll_a2k3zr$(t),this.myIsNumeric_8be2vx$.putAll_a2k3zr$(e),this.myIsDateTime_8be2vx$.putAll_a2k3zr$(n),this.myOrderSpecs_8be2vx$.addAll_brywnq$(i)},ki.prototype.put_2l962d$=function(t,e){return this.putIntern_bxyhp4$(t,e),this.myIsNumeric_8be2vx$.remove_11rb$(t),this.myIsDateTime_8be2vx$.remove_11rb$(t),this},ki.prototype.putNumeric_s1rqo9$=function(t,e){return this.putIntern_bxyhp4$(t,e),this.myIsNumeric_8be2vx$.put_xwzc9p$(t,!0),this},ki.prototype.putDiscrete_2l962d$=function(t,e){return this.putIntern_bxyhp4$(t,e),this.myIsNumeric_8be2vx$.put_xwzc9p$(t,!1),this},ki.prototype.putDateTime_2l962d$=function(t,e){return this.putIntern_bxyhp4$(t,e),this.myIsDateTime_8be2vx$.put_xwzc9p$(t,!0),this},ki.prototype.putIntern_bxyhp4$=function(t,e){var n=this.myVectorByVar_8be2vx$,i=z(e);n.put_xwzc9p$(t,i)},ki.prototype.remove_8xm3sj$=function(t){return this.myVectorByVar_8be2vx$.remove_11rb$(t),this.myIsNumeric_8be2vx$.remove_11rb$(t),this.myIsDateTime_8be2vx$.remove_11rb$(t),this},ki.prototype.addOrderSpecs_l2t0xf$=function(t){var e,n=E("addOrderSpec",function(t,e){return t.addOrderSpec_22dbp4$(e)}.bind(null,this));for(e=t.iterator();e.hasNext();)n(e.next());return this},ki.prototype.addOrderSpec_22dbp4$=function(t){var n,i=this.myOrderSpecs_8be2vx$;t:do{var o;for(o=i.iterator();o.hasNext();){var r=o.next();if(l(r.variable,t.variable)){n=r;break t}}n=null}while(0);var a=n;if(null==(null!=a?a.aggregateOperation:null)){var u,c=this.myOrderSpecs_8be2vx$;(e.isType(u=c,K)?u:s()).remove_11rb$(a),this.myOrderSpecs_8be2vx$.add_11rb$(t)}return this},ki.prototype.build=function(){return new oi(this)},Ci.prototype.emptyFrame=function(){return Ti().build()},Ci.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var Ei=null;function Si(){return null===Ei&&new Ci,Ei}function Ti(t){return t=t||Object.create(ki.prototype),ki.call(t),t}function Oi(t,e){return e=e||Object.create(ki.prototype),ki.call(e),e.initInternals_0(t.myVectorByVar_0,t.myIsNumeric_0,t.myIsDateTime_0,t.myOrderSpecs_0),e}function Ni(t,e,n){n=n||Object.create(ki.prototype),ki.call(n);var i,o=t.myVectorByVar_0,r=G(H(o.size));for(i=o.entries.iterator();i.hasNext();){var a=i.next(),s=r.put_xwzc9p$,l=a.key,u=a.value;s.call(r,l,M(u,e))}var c=r;return n.initInternals_0(c,t.myIsNumeric_0,t.myIsDateTime_0,t.myOrderSpecs_0),n}function Pi(){}function Ii(t,e){var n;Eo(),this.domainValues_0=t,this.domainLimits_0=e,this.indexByDomainValue_0=null,this.effectiveDomain=null,this.effectiveDomainTransformed=null,n=this.domainLimits_0.isEmpty()?J(this.domainValues_0):J(this.domainLimits_0),this.effectiveDomain=n;var i,o,r=this.effectiveDomain,a=U(F(r,10)),s=0;for(i=r.iterator();i.hasNext();){var l=i.next();a.add_11rb$(m(l,tt((s=(o=s)+1|0,o))))}this.indexByDomainValue_0=Q(a);var u,c=this.effectiveDomain,p=U(F(c,10));for(u=c.iterator();u.hasNext();){var h=u.next();p.add_11rb$(g(this.indexByDomainValue_0,h))}this.effectiveDomainTransformed=p}function Ai(){Co=this}ki.$metadata$={kind:h,simpleName:"Builder",interfaces:[]},oi.$metadata$={kind:h,simpleName:"DataFrame",interfaces:[]},Pi.prototype.x=function(){return this.get_31786j$(ti().X)},Pi.prototype.y=function(){return this.get_31786j$(ti().Y)},Pi.prototype.z=function(){return this.get_31786j$(ti().Z)},Pi.prototype.ymin=function(){return this.get_31786j$(ti().YMIN)},Pi.prototype.ymax=function(){return this.get_31786j$(ti().YMAX)},Pi.prototype.color=function(){return this.get_31786j$(ti().COLOR)},Pi.prototype.fill=function(){return this.get_31786j$(ti().FILL)},Pi.prototype.alpha=function(){return this.get_31786j$(ti().ALPHA)},Pi.prototype.shape=function(){return this.get_31786j$(ti().SHAPE)},Pi.prototype.lineType=function(){return this.getNotNull_a8ig9y$_0(ti().LINETYPE)},Pi.prototype.size=function(){return this.get_31786j$(ti().SIZE)},Pi.prototype.stacksize=function(){return this.get_31786j$(ti().STACKSIZE)},Pi.prototype.width=function(){return this.get_31786j$(ti().WIDTH)},Pi.prototype.height=function(){return this.get_31786j$(ti().HEIGHT)},Pi.prototype.binwidth=function(){return this.get_31786j$(ti().BINWIDTH)},Pi.prototype.violinwidth=function(){return this.get_31786j$(ti().VIOLINWIDTH)},Pi.prototype.weight=function(){return this.get_31786j$(ti().WEIGHT)},Pi.prototype.intercept=function(){return this.get_31786j$(ti().INTERCEPT)},Pi.prototype.slope=function(){return this.get_31786j$(ti().SLOPE)},Pi.prototype.interceptX=function(){return this.get_31786j$(ti().XINTERCEPT)},Pi.prototype.interceptY=function(){return this.get_31786j$(ti().YINTERCEPT)},Pi.prototype.lower=function(){return this.get_31786j$(ti().LOWER)},Pi.prototype.middle=function(){return this.get_31786j$(ti().MIDDLE)},Pi.prototype.upper=function(){return this.get_31786j$(ti().UPPER)},Pi.prototype.sample=function(){return this.get_31786j$(ti().SAMPLE)},Pi.prototype.quantile=function(){return this.get_31786j$(ti().QUANTILE)},Pi.prototype.mapId=function(){return this.getNotNull_a8ig9y$_0(ti().MAP_ID)},Pi.prototype.frame=function(){return this.getNotNull_a8ig9y$_0(ti().FRAME)},Pi.prototype.speed=function(){return this.get_31786j$(ti().SPEED)},Pi.prototype.flow=function(){return this.get_31786j$(ti().FLOW)},Pi.prototype.xmin=function(){return this.get_31786j$(ti().XMIN)},Pi.prototype.xmax=function(){return this.get_31786j$(ti().XMAX)},Pi.prototype.xend=function(){return this.get_31786j$(ti().XEND)},Pi.prototype.yend=function(){return this.get_31786j$(ti().YEND)},Pi.prototype.label=function(){return this.get_31786j$(ti().LABEL)},Pi.prototype.family=function(){return this.getNotNull_a8ig9y$_0(ti().FAMILY)},Pi.prototype.fontface=function(){return this.getNotNull_a8ig9y$_0(ti().FONTFACE)},Pi.prototype.lineheight=function(){return this.get_31786j$(ti().LINEHEIGHT)},Pi.prototype.hjust=function(){return this.getNotNull_a8ig9y$_0(ti().HJUST)},Pi.prototype.vjust=function(){return this.getNotNull_a8ig9y$_0(ti().VJUST)},Pi.prototype.angle=function(){return this.get_31786j$(ti().ANGLE)},Pi.prototype.slice=function(){return this.get_31786j$(ti().SLICE)},Pi.prototype.explode=function(){return this.get_31786j$(ti().EXPLODE)},Pi.prototype.numeric_vktour$=function(t){return this.get_31786j$(t)},Pi.prototype.defined_896ixz$=function(t){var e;if(t.isNumeric){var n=this.get_31786j$(t);return null!=n&&k("number"==typeof(e=n)?e:s())}return!0},Pi.prototype.getNotNull_a8ig9y$_0=function(t){var e;if(null==(e=this.get_31786j$(t)))throw V("No value for aesthetic "+t+" at index "+this.index());return e},Pi.$metadata$={kind:h,simpleName:"DataPointAesthetics",interfaces:[]},Ii.prototype.hasDomainLimits=function(){return!this.domainLimits_0.isEmpty()},Ii.prototype.isInDomain_s8jyv4$=function(t){var n,i=this.indexByDomainValue_0;return(e.isType(n=i,et)?n:s()).containsKey_11rb$(t)},Ii.prototype.indexOf_za3rmp$=function(t){return g(this.indexByDomainValue_0,t)},Ii.prototype.apply_9ma18$=function(t){var e,n=U(F(t,10));for(e=t.iterator();e.hasNext();){var i=e.next();n.add_11rb$(this.asNumber_0(i))}return n},Ii.prototype.applyInverse_yrwdxb$=function(t){return this.fromNumber_0(t)},Ii.prototype.asNumber_0=function(t){if(null==t)return null;if(this.indexByDomainValue_0.containsKey_11rb$(t))return g(this.indexByDomainValue_0,t);throw V("value "+Y(t)+" is not in the domain: "+this.effectiveDomain)},Ii.prototype.fromNumber_0=function(t){if(null==t||!k(t))return null;var e=W(t);return e>=0&&e0&&(l=this.alpha_il6rhx$(a,i)),t.update_mjoany$(r,s,a,l,o)},ha.prototype.alpha_il6rhx$=function(t,e){return _t.Colors.solid_98b62m$(t)?x(e.alpha()):dt.SvgUtils.alpha2opacity_za3lpa$(t.alpha)},ha.prototype.strokeWidth_l6g9mh$=function(t){return 2*x(t.size())},ha.prototype.textSize_l6g9mh$=function(t){return 2*x(t.size())},ha.prototype.updateStroke_g0plfl$=function(t,e,n){t.strokeColor().set_11rb$(e.color()),_t.Colors.solid_98b62m$(x(e.color()))&&n&&t.strokeOpacity().set_11rb$(e.alpha())},ha.prototype.updateFill_v4tjbc$=function(t,e){t.fillColor().set_11rb$(e.fill()),_t.Colors.solid_98b62m$(x(e.fill()))&&t.fillOpacity().set_11rb$(e.alpha())},ha.$metadata$={kind:p,simpleName:"AestheticsUtil",interfaces:[]};var _a=null;function da(){return null===_a&&new ha,_a}function fa(t){this.myMap_0=t}function ma(){}function $a(t,e){this.lines_0=t,this.textStyle=e}function ya(t,e,n,i,o){ba(),this.hScaleMapper=t,this.vScaleMapper=e,this.clientBounds=n,this.projection_8be2vx$=i,this.flipAxis_0=o,this.cachedUnitSize_0=null}function ga(){va=this}fa.prototype.get_31786j$=function(t){var e;return"function"==typeof(e=this.myMap_0.get_11rb$(t))?e:s()},fa.$metadata$={kind:h,simpleName:"TypedIndexFunctionMap",interfaces:[]},ma.$metadata$={kind:d,simpleName:"AnnotationLineSpec",interfaces:[]},$a.prototype.getAnnotationText_za3lpa$=function(t){var e,n=this.lines_0,i=c();for(e=n.iterator();e.hasNext();){var o;null!=(o=e.next().getAnnotationText_za3lpa$(t))&&i.add_11rb$(o)}return ft(i,"\n")},$a.$metadata$={kind:h,simpleName:"Annotations",interfaces:[]},ya.prototype.toClient_gpjtzr$=function(t){var e=this.projection_8be2vx$.project_gpjtzr$(t);if(null!=e){var n=this.hScaleMapper.invoke_yrwdxb$(this.flipAxis_0?e.y:e.x),i=this.vScaleMapper.invoke_yrwdxb$(this.flipAxis_0?e.x:e.y);if(null!=n&&null!=i)return new mt(n,i)}return null},ya.prototype.unitSize_gpjtzr$=function(t){var e;return this.projection_8be2vx$.nonlinear?e=this.unitSizeIntern_0(t):(null==this.cachedUnitSize_0&&(this.cachedUnitSize_0=this.unitSizeIntern_0(t)),e=x(this.cachedUnitSize_0)),e},ya.prototype.unitSizeIntern_0=function(t){var e=ba().toValidUnitSquareCenter_oomppp$(t,this.projection_8be2vx$),n=x(this.toClient_gpjtzr$(new mt(e.x-.5,e.y))),i=x(this.toClient_gpjtzr$(new mt(e.x+.5,e.y))).subtract_gpjtzr$(n).length(),o=x(this.toClient_gpjtzr$(new mt(e.x,e.y-.5))),r=x(this.toClient_gpjtzr$(new mt(e.x,e.y+.5))).subtract_gpjtzr$(o).length();return new mt(i,r)},ya.prototype.flip=function(){return new ya(this.hScaleMapper,this.vScaleMapper,this.clientBounds,this.projection_8be2vx$,!this.flipAxis_0)},ga.prototype.create_u2nuxj$=function(t,n,i,o){var r=!0===o?t.flip():!1===o?t:e.noWhenBranchMatched(),a=i.project_gpjtzr$(r.origin);if(null==a){var s="Can't project domain left-top: "+r.origin;throw V(s.toString())}var l=r.origin.add_gpjtzr$(r.dimension),u=i.project_gpjtzr$(l);if(null==u)throw V(("Can't project domain right-bottom: "+l).toString());var c=$.Companion.span_qt8ska$(a,u),p=!0===o?c.flip():!1===o?c:e.noWhenBranchMatched();if(0===p.xRange().length)throw V("Can't create coordinates mapper: X-domain size is 0.0".toString());if(0===p.yRange().length)throw V("Can't create coordinates mapper: Y-domain size is 0.0".toString());var h=Vy().mul_3mogjz$(p.xRange(),n.x),_=Vy().mul_3mogjz$(p.yRange(),n.y),d=new mt(x(h.invoke_yrwdxb$(p.origin.x)),x(_.invoke_yrwdxb$(p.origin.y)));return new ya(h,_,new $(d,n),i,o)},ga.prototype.toValidUnitSquareCenter_oomppp$=function(t,e){var n=e.validDomain(),i=t.xn.right-.5?n.right-.5:t.x,o=t.yn.bottom-.5?n.bottom-.5:t.y;return new mt(i,o)},ga.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var va=null;function ba(){return null===va&&new ga,va}function wa(){Ca=this}function xa(){ka=this}ya.$metadata$={kind:h,simpleName:"CoordinatesMapper",interfaces:[]},wa.prototype.create_i06iub$=function(t){return new Ea(t)},xa.prototype.create_3y20zv$=function(t,e,n){return new Ea(ba().create_u2nuxj$($.Companion.hvRange_7e97im$(t,e),n,$t(),!1))},xa.$metadata$={kind:p,simpleName:"DemoAndTest",interfaces:[]};var ka=null;wa.$metadata$={kind:p,simpleName:"Coords",interfaces:[]};var Ca=null;function Ea(t){this.coordMapper_0=t,this.clientLeft_0=this.coordMapper_0.clientBounds.xRange().lowerEnd,this.clientBottom_0=this.coordMapper_0.clientBounds.yRange().upperEnd}function Sa(){Oa=this}function Ta(t,n){return e.compareTo(t.name,n.name)}Ea.prototype.toClient_gpjtzr$=function(t){var e=this.coordMapper_0.toClient_gpjtzr$(t);return null!=e?this.toScreen_0(e):null},Ea.prototype.unitSize_gpjtzr$=function(t){return this.coordMapper_0.unitSize_gpjtzr$(t)},Ea.prototype.flip=function(){return new Ea(this.coordMapper_0.flip())},Ea.prototype.toScreen_0=function(t){var e=t.x-this.clientLeft_0,n=this.clientBottom_0-t.y;return new mt(e,n)},Ea.$metadata$={kind:h,simpleName:"DefaultCoordinateSystem",interfaces:[ii]},Sa.prototype.transformVarFor_896ixz$=function(t){return La().forAes_896ixz$(t)},Sa.prototype.applyTransform_f2tird$=function(t,e,n,i){var o=this.transformVarFor_896ixz$(n);return this.applyTransform_3268a5$(t,e,o,i)},Sa.prototype.applyTransform_3268a5$=function(t,e,n,i){var o=tg().applyTransform_uc4x6i$(t.get_8xm3sj$(e),i);return t.builder().putNumeric_s1rqo9$(n,o).build()},Sa.prototype.hasVariable_vede35$=function(t,e){var n;for(n=t.variables().iterator();n.hasNext();){var i=n.next();if(l(e,i.name))return!0}return!1},Sa.prototype.findVariableOrFail_vede35$=function(t,e){var n;for(n=t.variables().iterator();n.hasNext();){var i=n.next();if(l(e,i.name))return i}throw u(t.undefinedVariableErrorMessage_61zpoe$(e))},Sa.prototype.isNumeric_vede35$=function(t,e){return t.isNumeric_8xm3sj$(this.findVariableOrFail_vede35$(t,e))},Sa.prototype.sortedCopy_jgbhqw$=function(t){return yt.Companion.from_iajr8b$(new gt(Ta)).sortedCopy_m5x2f4$(t)},Sa.prototype.variables_dhhkv7$=function(t){var e,n=t.variables(),i=vt("name",1,(function(t){return t.name})),o=bt(H(F(n,10)),16),r=G(o);for(e=n.iterator();e.hasNext();){var a=e.next();r.put_xwzc9p$(i(a),a)}return r},Sa.prototype.appendReplace_yxlle4$=function(t,n){var i,o,r=(o=this,function(t,n,i){var r,a=o;for(r=n.iterator();r.hasNext();){var s,l=r.next(),u=a.findVariableOrFail_vede35$(i,l.name);!0===(s=i.isNumeric_8xm3sj$(u))?t.putNumeric_s1rqo9$(l,i.getNumeric_8xm3sj$(u)):!1===s?t.putDiscrete_2l962d$(l,i.get_8xm3sj$(u)):e.noWhenBranchMatched()}return t}),a=Ti(),l=t.variables(),u=c();for(i=l.iterator();i.hasNext();){var p,h=i.next(),_=this.variables_dhhkv7$(n),d=h.name;(e.isType(p=_,et)?p:s()).containsKey_11rb$(d)||u.add_11rb$(h)}var f,m=r(a,u,t),$=t.variables(),y=c();for(f=$.iterator();f.hasNext();){var g,v=f.next(),b=this.variables_dhhkv7$(n),w=v.name;(e.isType(g=b,et)?g:s()).containsKey_11rb$(w)&&y.add_11rb$(v)}var x,k=r(m,y,n),C=n.variables(),E=c();for(x=C.iterator();x.hasNext();){var S,T=x.next(),O=this.variables_dhhkv7$(t),N=T.name;(e.isType(S=O,et)?S:s()).containsKey_11rb$(N)||E.add_11rb$(T)}return r(k,E,n).build()},Sa.prototype.toMap_dhhkv7$=function(t){var e,n=D();for(e=t.variables().iterator();e.hasNext();){var i=e.next(),o=i.name,r=t.get_8xm3sj$(i);n.put_xwzc9p$(o,r)}return n},Sa.prototype.fromMap_bkhwtg$=function(t){var n,i=Ti();for(n=t.entries.iterator();n.hasNext();){var o=n.next(),r=o.key,s=o.value;if("string"!=typeof r){var l="Map to data-frame: key expected a String but was "+e.getKClassFromExpression(x(r)).simpleName+" : "+Y(r);throw u(l.toString())}if(!e.isType(s,a)){var c="Map to data-frame: value expected a List but was "+e.getKClassFromExpression(x(s)).simpleName+" : "+Y(s);throw u(c.toString())}i.put_2l962d$(this.createVariable_puj7f4$(r),s)}return i.build()},Sa.prototype.createVariable_puj7f4$=function(t,e){return void 0===e&&(e=t),La().isTransformVar_61zpoe$(t)?La().get_61zpoe$(t):Bx().isStatVar_61zpoe$(t)?Bx().statVar_61zpoe$(t):Ia().isDummyVar_61zpoe$(t)?Ia().newDummy_61zpoe$(t):new fi(t,yi(),e)},Sa.prototype.getSummaryText_dhhkv7$=function(t){var e,n=y();for(e=t.variables().iterator();e.hasNext();){var i=e.next();n.append_pdl1vj$(i.toSummaryString()).append_pdl1vj$(" numeric: "+Y(t.isNumeric_8xm3sj$(i))).append_pdl1vj$(" size: "+Y(t.get_8xm3sj$(i).size)).append_s8itvh$(10)}return n.toString()},Sa.prototype.removeAllExcept_dipqvu$=function(t,e){var n,i=t.builder();for(n=t.variables().iterator();n.hasNext();){var o=n.next();e.contains_11rb$(o.name)||i.remove_8xm3sj$(o)}return i.build()},Sa.prototype.addDateTimeVariables_dipqvu$=function(t,e){var n,i=t.builder();for(n=t.variables().iterator();n.hasNext();){var o=n.next();e.contains_11rb$(o.name)&&(i.remove_8xm3sj$(o),i.putDateTime_2l962d$(o,t.get_8xm3sj$(o)))}return i.build()},Sa.$metadata$={kind:p,simpleName:"DataFrameUtil",interfaces:[]};var Oa=null;function Na(){Pa=this,this.PREFIX_0="__"}Na.prototype.isDummyVar_61zpoe$=function(t){if(!xt(t)&&t.length>2&&wt(t,this.PREFIX_0)){var e=t.substring(2);return kt("[0-9]+").matches_6bul2c$(e)}return!1},Na.prototype.dummyNames_za3lpa$=function(t){for(var e=c(),n=0;n=this.minHeight?i.add_11rb$(o):(Tt(i)&&n.add_11rb$(i),i=c())}return Tt(i)&&n.add_11rb$(i),n},Ka.prototype.buildRidge_0=function(t,e,n,i,o){var r,a,s=new Sh(n,i,o),l=this.toLocationBound_0(o),u=q();for(r=e.iterator();r.hasNext();){var p,h=r.next(),_=h.fill(),d=u.get_11rb$(_);if(null==d){var f=c();u.put_xwzc9p$(_,f),p=f}else p=d;p.add_11rb$(h)}for(a=u.entries.iterator();a.hasNext();){var m=a.next().value,$=s.createBands_dor9uj$(m,l,Va,!0);$l().appendNodes_37zgbi$($,t)}s.setAlphaEnabled_6taknv$(!1);var y,g,v=q();for(y=e.iterator();y.hasNext();){var b,w=y.next(),x=w.color(),k=v.get_11rb$(x);if(null==k){var C=c();v.put_xwzc9p$(x,C),b=C}else b=k;b.add_11rb$(w)}for(g=v.entries.iterator();g.hasNext();){var E=g.next().value;$l().appendNodes_37zgbi$(s.createLines_rrreuh$(E,l),t)}this.quantileLines&&this.drawQuantileLines_0(t,e,n,i,o),this.buildHints_0(e,o,s,l)},Ka.prototype.drawQuantileLines_0=function(t,e,n,i,o){var r,a,s=O(e,T([E("group",(function(t){return t.group()})),E("quantile",(function(t){return t.quantile()})),E("x",(function(t){return t.x()}))])).iterator();if(s.hasNext())for(var l=s.next();s.hasNext();){var u=s.next();l.quantile()==u.quantile()||!0!==(null!=(r=l.quantile())?k(r):null)&&!0!==(null!=(a=u.quantile())?k(a):null)||this.drawQuantileLine_0(t,u,n,i,o),l=u}},Ka.prototype.drawQuantileLine_0=function(t,e,n,i,o){var r=new oh(n,i,o).createSvgElementHelper(),a=this.toLocationBound_0(o)(e),s=new mt(x(e.x()),x(e.y())),l=x(r.createLine_ollnar$(a,s,e));t.add_26jijc$(l)},Ka.prototype.toLocationBound_0=function(t){return e=t,n=this,function(t){var i=x(t.x()),o=x(t.y())+e.getResolution_vktour$(ti().Y)*n.scale*x(t.height());return new mt(i,o)};var e,n},Ka.prototype.buildHints_0=function(t,e,n,i){var o,r,a,s,l,u,c,p=Uh().createMultiPointDataByGroup_ugj9hh$(t,Uh().singlePointAppender_v9bvvf$((u=i,c=n,function(t){var e=u(t);return c.toClient_tkjljq$(e,t)})),Uh().reducer_8555vt$(.999,!1)),h=this.getGeomTargetCollector_vl74i5$(e),_=gh().createColorMarkerMapper_oomlkg$(Wo(),e);for(o=p.iterator();o.hasNext();){var d=o.next();r=d.points,a=d.localToGlobalIndex,s=new h_(void 0,void 0,void 0,_(d.aes)),l=e.flipped?cd():pd(),h.addPath_sa5m83$(r,a,s,l)}},Ka.prototype.heightSpan_rxtiyv$=function(t,e,n,i){var o,r=ti().HEIGHT,a=n*this.scale,s=t.get_31786j$(e),l=t.get_31786j$(r);if(w.SeriesUtil.allFinite_jma9l8$(s,l)){x(s);var u=a*x(l);o=l>=this.minHeight?new lt(s,s+u):null}else o=null;return o},Ya.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var Wa=null;function Xa(){return null===Wa&&new Ya,Wa}function Za(){ts(),dl.call(this)}function Ja(){Qa=this,this.HANDLES_GROUPS=!1}Ka.$metadata$={kind:h,simpleName:"AreaRidgesGeom",interfaces:[dp,dl]},Za.prototype.buildIntern_uzv8ab$=function(t,e,n,i,o){var r,a=new oh(n,i,o),s=new Yh(e,n,i,o).createRectangles_rezc4r$(ts().clientRectByDataPoint_0(o,a,!1));for(Nt(s),r=s.iterator();r.hasNext();){var l=r.next();t.add_26jijc$(l)}Jp().collectRectangleTargets_u4ggc5$(Pt(),e,n,i,o,ts().clientRectByDataPoint_0(o,a,!0),E("fillWithAlpha",function(t,e){return t.fillWithAlpha_l6g9mh$(e)}.bind(null,gh())))},Ja.prototype.clientRectByDataPoint_0=function(t,e,n){return i=t,o=n,r=e,function(t){var e,n,a=t.x(),s=t.y(),l=t.width();if(w.SeriesUtil.allFinite_xjrefz$(a,s,l)){x(a),x(s);var u=x(l)*i.getResolution_vktour$(ti().X);if(o){var c=new mt(a-u/2,s),p=new mt(u,0);e=new $(c,p)}else{var h,_;s>=0?(h=new mt(a-u/2,0),_=new mt(u,s)):(h=new mt(a-u/2,s),_=new mt(u,-s)),e=new $(h,_)}var d,f=e;if(null!=(n=r.toClient_ioi29i$(f,t))){var m=i;d=n.width<2?mh().extendTrueWidth_c4alhb$(n,2,m):n}else d=null;return d}return null};var i,o,r},Ja.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var Qa=null;function ts(){return null===Qa&&new Ja,Qa}function es(){os(),Jc.call(this)}function ns(){is=this,this.HANDLES_GROUPS=!1}Za.$metadata$={kind:h,simpleName:"BarGeom",interfaces:[dl]},ns.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var is=null;function os(){return null===is&&new ns,is}function rs(){cs(),dl.call(this),this.fattenMidline=1,this.whiskerWidth=.5,this.outlierColor=null,this.outlierFill=null,this.outlierShape=null,this.outlierSize=null}function as(t){return gh().colorWithAlpha_l6g9mh$(t)}function ss(t,e){this.this$BoxplotGeom=t,ih.call(this,e)}function ls(){us=this,this.HANDLES_GROUPS=!1,this.LEGEND_FACTORY_0=eh().legendFactory_6taknv$(!0),this.OUTLIER_DEF_SIZE_0=pa().point().defaultValue_31786j$(ti().SIZE)}es.$metadata$={kind:h,simpleName:"Bin2dGeom",interfaces:[Jc]},Object.defineProperty(rs.prototype,"legendKeyElementFactory",{configurable:!0,get:function(){return cs().LEGEND_FACTORY_0}}),rs.prototype.buildIntern_uzv8ab$=function(t,e,n,i,o){var r=new oh(n,i,o);eh().buildBoxes_sm51l0$(t,e,n,i,o,cs().clientRectByDataPoint_0(o,r,!1)),this.buildLines_0(t,e,o,r),this.buildOutliers_0(t,e,n,i,o),Jp().collectRectangleTargets_u4ggc5$(nt([ti().YMAX,ti().UPPER,ti().MIDDLE,ti().LOWER,ti().YMIN]),e,n,i,o,cs().clientRectByDataPoint_0(o,r,!0),as,void 0,hd())},rs.prototype.buildLines_0=function(t,e,n,i){var o,r,a;eh().buildMidlines_6b8tv8$(t,e,n,i,this.fattenMidline);var s=i.createSvgElementHelper();for(o=mh().withDefined_2oeq97$(e.dataPoints(),ti().X).iterator();o.hasNext();){var l=o.next(),u=x(l.x()),p=(null!=(a=null!=(r=l.width())?r*n.getResolution_vktour$(ti().X)/2:null)?a:0)*this.whiskerWidth,h=c();if(l.defined_896ixz$(ti().LOWER)&&l.defined_896ixz$(ti().YMIN)){var _=x(l.lower()),d=x(l.ymin());h.add_11rb$(x(s.createLine_ollnar$(new mt(u,_),new mt(u,d),l))),h.add_11rb$(x(s.createLine_ollnar$(new mt(u-p,d),new mt(u+p,d),l)))}if(l.defined_896ixz$(ti().UPPER)&&l.defined_896ixz$(ti().YMAX)){var f,m=x(l.upper()),$=x(l.ymax());for(h.add_11rb$(x(s.createLine_ollnar$(new mt(u,m),new mt(u,$),l))),h.add_11rb$(x(s.createLine_ollnar$(new mt(u-p,$),new mt(u+p,$),l))),f=h.iterator();f.hasNext();){var y=f.next();t.add_26jijc$(y)}}}},rs.prototype.buildOutliers_0=function(t,e,n,i,o){var r=this.getOutliersAesthetics_0(e);(new ju).buildIntern_uzv8ab$(t,r,n,i,o.withTargetCollector_xrq6q$(new ed))},rs.prototype.getOutliersAesthetics_0=function(t){return new Ah(t,(e=this,function(t){return e.toOutlierDataPointAesthetics_0(t)}));var e},ss.prototype.get_31786j$=function(t){var n,i,o,r,a;return null==(a=l(t,ti().COLOR)?null!=(n=this.this$BoxplotGeom.outlierColor)?n:ih.prototype.get_31786j$.call(this,t):l(t,ti().FILL)?null!=(i=this.this$BoxplotGeom.outlierFill)?i:ih.prototype.get_31786j$.call(this,t):l(t,ti().SHAPE)?null!=(o=this.this$BoxplotGeom.outlierShape)?o:ih.prototype.get_31786j$.call(this,t):l(t,ti().SIZE)?null!=(r=this.this$BoxplotGeom.outlierSize)?r:cs().OUTLIER_DEF_SIZE_0:l(t,ti().ALPHA)?1:ih.prototype.get_31786j$.call(this,t))||e.isType(a,It)?a:s()},ss.$metadata$={kind:h,interfaces:[ih]},rs.prototype.toOutlierDataPointAesthetics_0=function(t){return t.defined_896ixz$(ti().Y)?new ss(this,t):t},ls.prototype.clientRectByDataPoint_0=function(t,e,n){return i=t,o=e,r=n,function(t){var e,n;if(t.defined_896ixz$(ti().X)&&t.defined_896ixz$(ti().LOWER)&&t.defined_896ixz$(ti().UPPER)&&t.defined_896ixz$(ti().WIDTH)){var a,s=x(t.x()),l=x(t.lower()),u=x(t.upper()),c=x(t.width())*i.getResolution_vktour$(ti().X);if(null!=(e=o.toClient_ioi29i$($.Companion.XYWH_6y0v78$(s-c/2,l,c,u-l),t))){var p=i;a=r&&u===l?mh().extendTrueHeight_c4alhb$(e,2,p):e}else a=null;n=a}else n=null;return n};var i,o,r},ls.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var us=null;function cs(){return null===us&&new ls,us}function ps(){ds(),iu.call(this)}function hs(){_s=this,this.HANDLES_GROUPS=au().HANDLES_GROUPS}rs.$metadata$={kind:h,simpleName:"BoxplotGeom",interfaces:[dl]},hs.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var _s=null;function ds(){return null===_s&&new hs,_s}function fs(){ys(),Gu.call(this)}function ms(){$s=this,this.HANDLES_GROUPS=Yu().HANDLES_GROUPS}ps.$metadata$={kind:h,simpleName:"ContourGeom",interfaces:[iu]},ms.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var $s=null;function ys(){return null===$s&&new ms,$s}function gs(){xs(),dl.call(this),this.fattenMidline=2.5}function vs(t){return gh().colorWithAlpha_l6g9mh$(t)}function bs(){ws=this,this.HANDLES_GROUPS=!1,this.LEGEND_FACTORY_0=eh().legendFactory_6taknv$(!1)}fs.$metadata$={kind:h,simpleName:"ContourfGeom",interfaces:[Gu]},Object.defineProperty(gs.prototype,"legendKeyElementFactory",{configurable:!0,get:function(){return xs().LEGEND_FACTORY_0}}),gs.prototype.buildIntern_uzv8ab$=function(t,e,n,i,o){var r=new oh(n,i,o);eh().buildBoxes_sm51l0$(t,e,n,i,o,xs().clientRectByDataPoint_0(o,r,!1)),eh().buildMidlines_6b8tv8$(t,e,o,r,this.fattenMidline),Jp().collectRectangleTargets_u4ggc5$(nt([ti().YMAX,ti().YMIN]),e,n,i,o,xs().clientRectByDataPoint_0(o,r,!0),vs)},bs.prototype.clientRectByDataPoint_0=function(t,e,n){return i=n,o=t,r=e,function(t){var e;if(!i&&t.defined_896ixz$(ti().X)&&t.defined_896ixz$(ti().YMIN)&&t.defined_896ixz$(ti().YMAX)&&t.defined_896ixz$(ti().WIDTH)){var n=x(t.x()),a=x(t.ymin()),s=x(t.ymax()),l=x(t.width())*o.getResolution_vktour$(ti().X),u=new mt(n-l/2,a),c=new mt(l,s-a);e=new $(u,c)}else if(i&&t.defined_896ixz$(ti().X)&&t.defined_896ixz$(ti().MIDDLE)&&t.defined_896ixz$(ti().WIDTH)){var p=x(t.x()),h=x(t.middle()),_=x(t.width())*o.getResolution_vktour$(ti().X),d=new mt(p-_/2,h),f=new mt(_,0);e=new $(d,f)}else e=null;var m=e;return null!=m?r.toClient_ioi29i$(m,t):null};var i,o,r},bs.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var ws=null;function xs(){return null===ws&&new bs,ws}function ks(){Ss(),ps.call(this)}function Cs(){Es=this,this.HANDLES_GROUPS=ds().HANDLES_GROUPS}gs.$metadata$={kind:h,simpleName:"CrossBarGeom",interfaces:[dl]},Cs.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var Es=null;function Ss(){return null===Es&&new Cs,Es}function Ts(){Ps(),fs.call(this)}function Os(){Ns=this,this.HANDLES_GROUPS=ys().HANDLES_GROUPS}ks.$metadata$={kind:h,simpleName:"Density2dGeom",interfaces:[ps]},Os.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var Ns=null;function Ps(){return null===Ns&&new Os,Ns}function Is(){Ms(),Fa.call(this)}function As(){Ds=this,this.HANDLES_GROUPS=Ha().HANDLES_GROUPS}Ts.$metadata$={kind:h,simpleName:"Density2dfGeom",interfaces:[fs]},Is.prototype.setupTooltipParams_dyn5n6$=function(t,e){return new h_(void 0,void 0,void 0,gh().createColorMarkerMapper_oomlkg$(nr(),e)(t))},As.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var Rs,js,Ls,zs,Ds=null;function Ms(){return null===Ds&&new As,Ds}function Bs(){Qs(),dl.call(this),this.dotSize=Qs().DEF_DOTSIZE,this.stackRatio=Qs().DEF_STACKRATIO,this.stackGroups=Qs().DEF_STACKGROUPS,this.stackDir_ttmjs1$_0=Qs().DEF_STACKDIR,this.method=Qs().DEF_METHOD}function Fs(t,e,n){Sh.call(this,t,e,n)}function Us(t,e){j.call(this),this.name$=t,this.ordinal$=e}function qs(){qs=function(){},Rs=new Us("UP",0),js=new Us("DOWN",1),Ls=new Us("CENTER",2),zs=new Us("CENTERWHOLE",3),Xs()}function Hs(){return qs(),Rs}function Gs(){return qs(),js}function Ks(){return qs(),Ls}function Vs(){return qs(),zs}function Ys(){Ws=this,this.ENUM_INFO_0=new zt(Us.values())}Is.$metadata$={kind:h,simpleName:"DensityGeom",interfaces:[Fa]},Object.defineProperty(Bs.prototype,"stackDir",{configurable:!0,get:function(){return this.stackDir_ttmjs1$_0},set:function(t){this.stackDir_ttmjs1$_0=t}}),Object.defineProperty(Bs.prototype,"legendKeyElementFactory",{configurable:!0,get:function(){return new rl}}),Bs.prototype.preferableNullDomain_896ixz$=function(t){var n;if(l(t,ti().Y))switch(this.stackDir.name){case"UP":n=new lt(0,1);break;case"DOWN":n=new lt(-1,0);break;case"CENTER":case"CENTERWHOLE":n=new lt(-.5,.5);break;default:n=e.noWhenBranchMatched()}else n=dl.prototype.preferableNullDomain_896ixz$.call(this,t);return n},Bs.prototype.buildIntern_uzv8ab$=function(t,n,i,o,r){var a=mh().withDefined_7jazl$(n.dataPoints(),ti().BINWIDTH,ti().X,ti().Y);if(Tt(a)){var s,l,u=At(a),p=x(u.x()),h=x(u.y()),_=x(u.binwidth()),d=x(o.toClient_gpjtzr$(new mt(p,h))),f=x(o.toClient_gpjtzr$(new mt(p+_,h)));if(!1===(l=r.flipped)){var m=d.x-f.x;s=Lt.abs(m)}else if(!0===l){var $=d.y-f.y;s=Lt.abs($)}else s=e.noWhenBranchMatched();var y,g,v=s,b=mh().withDefined_fl3lpi$(a,ti().X,ti().STACKSIZE),w=q();for(y=b.iterator();y.hasNext();){var k,C=y.next(),E=C.x(),S=w.get_11rb$(E);if(null==S){var T=c();w.put_xwzc9p$(E,T),k=T}else k=S;k.add_11rb$(C)}for(g=w.entries.iterator();g.hasNext();){var O=g.next().value;this.buildStack_pfu8my$_0(t,O,i,o,r,v)}}},Bs.prototype.buildStack_pfu8my$_0=function(t,e,n,i,o,r){var a,s=new Fs(n,i,o),l=new oh(n,i,o),u=0;for(a=e.iterator();a.hasNext();){for(var c=a.next(),p=this.boundedStackSize_jcw1pd$(u+Rt(x(c.stacksize()))|0,i,o,r,o.flipped)-u|0,h=-1,_=0;_Yt.PI,!0,t.outerArcEnd),e.lineTo_gpjtzr$(t.innerArcEnd),e.ellipticalArc_gc0whr$(t.holeRadius,t.holeRadius,0,t.angle>Yt.PI,!1,t.innerArcStart);var n=new P$(e),i=this.getFillColor_0(t.p),o=da().alpha_il6rhx$(i,t.p);return n.fill().set_11rb$(_t.Colors.withOpacity_o14uds$(i,o)),n.width().set_11rb$(this.strokeWidth),n.color().set_11rb$(this.strokeColor),n},uu.prototype.buildHint_0=function(t,e){var n,i=cu(t);e.addPolygon_sa5m83$(P(i(!0),N(i(!1))),(n=t,function(t){return n.p.index()}),new h_(void 0,void 0,void 0,Xt(this.getFillColor_0(t.p))))},uu.prototype.getFillColor_0=function(t){var n;return!0===(n=this.fillWithColor)?x(t.color()):!1===n?x(t.fill()):e.noWhenBranchMatched()},uu.prototype.computeSectors_0=function(t,e){var n,i=0;for(n=e.iterator();n.hasNext();){var o=n.next(),r=x(o.slice());i+=Lt.abs(r)}var a,s,l=(a=i,s=e,function(t){var e;if(0===a)e=1/s.size;else{var n=x(t.slice());e=Lt.abs(n)/a}return 2*Yt.PI*e}),u={v:-Yt.PI/2};u.v-=l(Zt(e));var c,p=U(F(e,10));for(c=e.iterator();c.hasNext();){var h=c.next(),_=p.add_11rb$,d=new pu(this,t,h,u.v,u.v+l(h));u.v=d.endAngle,_.call(p,d)}return p},pu.prototype.outerArcPoint_14dthe$=function(t){return this.arcPoint_0(this.radius,t)},pu.prototype.innerArcPoint_14dthe$=function(t){return this.arcPoint_0(this.holeRadius,t)},pu.prototype.arcPoint_0=function(t,e){return this.position.add_gpjtzr$(new mt(t*Lt.cos(e),t*Lt.sin(e)))},Object.defineProperty(pu.prototype,"sectorCenter",{configurable:!0,get:function(){var t=.5*(this.radius-this.holeRadius),e=this.position,n=this.holeRadius,i=this.direction,o=n*Lt.cos(i),r=this.holeRadius,a=this.direction,s=e.add_gpjtzr$(new mt(o,r*Lt.sin(a))),l=this.direction,u=t*Lt.cos(l),c=this.direction;return s.add_gpjtzr$(new mt(u,t*Lt.sin(c)))}}),pu.$metadata$={kind:h,simpleName:"Sector",interfaces:[]},hu.prototype.createKeyElement_s1fn0c$=function(t,e){var n=new Bt;this.$outer;var i,o=this.$outer,r=n.children(),a=Jt(e.x/2,e.y/2,this.shapeSize_0(t)/2);return a.fillColor().set_11rb$(o.getFillColor_0(t)),a.strokeColor().set_11rb$(null!=(i=o.getFillColor_0(t))&&i.equals(at.Companion.TRANSPARENT)?at.Companion.BLACK:o.strokeColor),a.strokeWidth().set_11rb$(1.5),r.add_11rb$(a),n},hu.prototype.minimumKeySize_l6g9mh$=function(t){var e=this.shapeSize_0(t)+4;return new mt(e,e)},hu.prototype.shapeSize_0=function(t){return Kr().pieDiameter_l6g9mh$(t)},hu.$metadata$={kind:h,simpleName:"PieLegendKeyElementFactory",interfaces:[Nf]},uu.prototype.buildAnnotations_0=function(t,n,i,o){if(null!=o.annotations&&!i.isEmpty()){var r,a=c();for(r=i.iterator();r.hasNext();){var s=r.next();(s.outerArcStart.xn.x||h.outerArcEnd.x>n.x||h.sectorCenter.x>n.x)&&p.add_11rb$(h)}var _=p.isEmpty()?i:p,d=u.iterator();if(!d.hasNext())throw te();for(var f=d.next(),m=f.pieCenter.x-f.radius;d.hasNext();){var $=d.next(),y=$.pieCenter.x-$.radius;m=Lt.min(m,y)}var g=m-20,v=_.iterator();if(!v.hasNext())throw te();for(var b=v.next(),w=b.pieCenter.x+b.radius;v.hasNext();){var k=v.next(),C=k.pieCenter.x+k.radius;w=Lt.max(w,C)}var E,S=w+20,T=(nt=o,function(t,e){return Zh().measure_2i20mu$(t,Pu().toTextDataPointAesthetics_0(e,x(nt.annotations).textStyle),nt)}),O=vt("radius",1,(function(t){return t.radius}));t:do{var N=u.iterator();if(!N.hasNext())throw te();var P=N.next();if(!N.hasNext()){E=P;break t}var I=O(P);do{var A=N.next(),R=O(A);e.compareTo(I,R)<0&&(P=A,I=R)}while(N.hasNext());E=P}while(0);var j,L=E,z=L.holeRadius+1.2*(L.radius-L.holeRadius),D=vt("radius",1,(function(t){return t.radius}));t:do{var M=_.iterator();if(!M.hasNext())throw te();var B=M.next();if(!M.hasNext()){j=B;break t}var q=D(B);do{var H=M.next(),G=D(H);e.compareTo(q,G)<0&&(B=H,q=G)}while(M.hasNext());j=B}while(0);var K,V=j,Y=V.holeRadius+1.2*(V.radius-V.holeRadius),W=U(F(i,10));for(K=i.iterator();K.hasNext();){var X=K.next(),Z=W.add_11rb$,J=u.contains_11rb$(X)&&_.contains_11rb$(X)?Lt.max(z,Y):u.contains_11rb$(X)?z:Y;Z.call(W,this.getAnnotationLabel_0(X,x(o.annotations),T,J))}var Q,tt=W;for(Q=Pu().createAnnotationElements_0(n,tt,x(o.annotations).textStyle,new lt(g,S),o).iterator();Q.hasNext();){var et=Q.next();t.add_26jijc$(et)}}var nt},uu.prototype.getAnnotationLabel_0=function(t,n,i,o){var r,a,s,l,u=n.getAnnotationText_za3lpa$(t.p.index()),p=i(u,t.p),h=(l=t,function(t){var e=t.subtract_gpjtzr$(l.position);if(!Qt(l.holeRadius,l.radius).contains_mef7kx$(e.length()))return!1;var n,i=e.y,o=e.x,r=Lt.atan2(i,o),a=l,s=Qt(-Yt.PI/2,Yt.PI).contains_mef7kx$(r);if(s){var u=a.startAngle;s=Lt.abs(u)>Yt.PI}if(s)n=r-2*Yt.PI;else{var c=Qt(-Yt.PI,-Yt.PI/2).contains_mef7kx$(r);if(c){var p=a.endAngle;c=Lt.abs(p)>Yt.PI}n=c?r+2*Yt.PI:r}var h=n;return l.startAngle<=h&&ha||t.side===wu()&&t.outerPointerCoord.xw.SeriesUtil.TINY))throw u(("x-step is too small: "+_).toString());if(!(d>w.SeriesUtil.TINY))throw u(("y-step is too small: "+d).toString());var f=ne(h.dimension.x/_)+1,m=ne(h.dimension.y/d)+1;if(f*m>5e6){var $=h.center,y=["Raster image size","["+f+" X "+m+"]","exceeds capability","of","your imaging device"],g=$.y+16*y.length/2;for(a=0;a!==y.length;++a){var v=new vy(y[a]);v.textColor().set_11rb$(at.Companion.DARK_MAGENTA),v.textOpacity().set_11rb$(.5),v.setFontSize_14dthe$(12),v.setFontWeight_pdl1vj$("bold"),v.setHorizontalAnchor_mf4siq$(hy()),v.setVerticalAnchor_yaylw0$($y());var b=x(p.toClient_sap1gj$($.x,g,c));v.moveTo_gpjtzr$(b),t.add_26jijc$(v.rootGroup),g-=16}}else{var k=Rt(ne(f)),C=Rt(ne(m)),E=new mt(.5*_,.5*d),S=x(p.toClient_tkjljq$(h.origin.subtract_gpjtzr$(E),c)),T=x(p.toClient_tkjljq$(h.origin.add_gpjtzr$(h.dimension).add_gpjtzr$(E),c)),O=T.x0),f){var m=new mt(x(h),x(_)),$=s.toClient_tkjljq$(m,p);if(null==$)continue;var y=null==this.sizeUnit?1:Xc().getSizeUnitRatio_0(m,i,x(this.sizeUnit)),g=this.buildTextComponent_l38ay9$(p,$,d,y,o,c);t.add_26jijc$(g),l.addPoint_cnsimy$(p.index(),$,y*Kr().textSize_l6g9mh$(p)/2,new h_(void 0,void 0,void 0,u(p)),hd())}}},Vc.prototype.buildTextComponent_l38ay9$=function(t,n,i,o,r,a){var s,l=new z$(i);Zh().decorate_tkk9c5$(l,t,o,!0);var u=Zh().hAnchor_blfaqq$(t,n,a);l.setHorizontalAnchor_mf4siq$(u);var c=Zh().fontSize_agflcp$(t,o),p=Zh().measure_2i20mu$(i,t,r,o).y;switch(Zh().vAnchor_blfaqq$(t,n,a).name){case"TOP":s=n.y+.7*c;break;case"BOTTOM":s=n.y-p+c;break;case"CENTER":s=n.y-p/2+.8*c;break;default:s=e.noWhenBranchMatched()}var h=s,_=new mt(n.x,h);l.moveTo_gpjtzr$(_);var d=new Bt;return d.children().add_11rb$(l.rootGroup),dt.SvgUtils.transformRotate_tk1esa$(d,Zh().angle_l6g9mh$(t),n.x,n.y),d},Vc.prototype.toString_31jswb$_0=function(t){return null==t?this.naValue:null!=this.formatter?x(this.formatter)(t):t.toString()},Yc.prototype.getSizeUnitRatio_0=function(t,e,n){var i,o=e.unitSize_gpjtzr$(t);switch(n.toLowerCase()){case"x":i=o.x;break;case"y":i=o.y;break;default:throw V(("Size unit value must be either 'x' or 'y', but was "+n+".").toString())}return i/this.BASELINE_TEXT_WIDTH_0},Yc.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var Wc=null;function Xc(){return null===Wc&&new Yc,Wc}function Zc(){}function Jc(){ep(),dl.call(this)}function Qc(){tp=this,this.HANDLES_GROUPS=!1}Vc.$metadata$={kind:h,simpleName:"TextGeom",interfaces:[dl]},Zc.prototype.createKeyElement_s1fn0c$=function(t,e){var n=Ut(0,0,e.x,e.y);da().updateFill_v4tjbc$(n,t);var i=new vy("a");Zh().decorate_hqvh83$(i,t),i.setHorizontalAnchor_mf4siq$(hy()),i.setVerticalAnchor_yaylw0$($y()),i.moveTo_lu1900$(e.x/2,e.y/2);var o=new Bt;return o.children().add_11rb$(n),o.children().add_11rb$(i.rootGroup),o},Zc.prototype.minimumKeySize_l6g9mh$=function(t){var e=Kr().strokeWidth_l6g9mh$(t);return new mt(4,e+4)},Zc.$metadata$={kind:h,simpleName:"TextLegendKeyElementFactory",interfaces:[Nf]},Jc.prototype.buildIntern_uzv8ab$=function(t,e,n,i,o){var r=new oh(n,i,o),a=new Yh(e,n,i,o),s=a.createSlimRectangles_rezc4r$(ep().clientRectByDataPoint_0(o,r));t.add_26jijc$($l().wrap_i2myw1$(s));var l=gh().createColorMarkerMapper_oomlkg$(zo(),o);new Vh(a,ep().clientRectByDataPoint_0(o,r),hd(),l).collectTo_xrq6q$(o.targetCollector)},Qc.prototype.clientRectByDataPoint_0=function(t,e){return n=t,i=e,function(t){var e=t.x(),o=t.y(),r=t.width(),a=t.height();if(w.SeriesUtil.allFinite_rd1tgs$(e,o,r,a)){var s=x(r)*n.getResolution_vktour$(ti().X),l=x(a)*n.getResolution_vktour$(ti().Y),u=new mt(x(e)-s/2,x(o)-l/2),c=new mt(s,l);return i.toClient_ioi29i$(new $(u,c),t)}return null};var n,i},Qc.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var tp=null;function ep(){return null===tp&&new Qc,tp}function np(){rp(),dl.call(this)}function ip(){op=this,this.HANDLES_GROUPS=!1,this.LEGEND_KEY_ELEMENT_FACTORY=new zp}Jc.$metadata$={kind:h,simpleName:"TileGeom",interfaces:[dl]},Object.defineProperty(np.prototype,"legendKeyElementFactory",{configurable:!0,get:function(){return rp().LEGEND_KEY_ELEMENT_FACTORY}}),np.prototype.buildIntern_uzv8ab$=function(t,e,n,i,o){var r,a=new oh(n,i,o),s=a.createSvgElementHelper();s.setStrokeAlphaEnabled_6taknv$(!0);var l,u=$l().overallAesBounds_vl74i5$(o),p=gh().createColorMarkerMapper_oomlkg$(Vo(),o),h=c();for(r=mh().withDefined_2oeq97$(e.dataPoints(),ti().XINTERCEPT).iterator();r.hasNext();){var _=r.next(),d=x(_.interceptX());if(u.xRange().contains_14dthe$(d)){var f=new mt(d,u.top),m=new mt(d,u.bottom),y=s.createLine_ollnar$(f,m,_);if(null==y)continue;h.add_11rb$(y);var g=x(a.toClient_ioi29i$($.Companion.span_qt8ska$(f,m),_)),v=Kr().strokeWidth_l6g9mh$(_)+4,b=mh().extendTrueWidth_c4alhb$(g,v,o);o.targetCollector.addRectangle_bxzvr8$(_.index(),b,new h_(void 0,void 0,void 0,p(_)))}}for(l=h.iterator();l.hasNext();){var w=l.next();t.add_26jijc$(w)}},ip.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var op=null;function rp(){return null===op&&new ip,op}function ap(){_p(),dl.call(this),this.showHalf=_p().DEF_SHOW_HALF,this.drawQuantiles_0=_p().DEF_DRAW_QUANTILES}function sp(){hp=this,this.DEF_DRAW_QUANTILES=Pt(),this.DEF_SHOW_HALF=0,this.HANDLES_GROUPS=!0}np.$metadata$={kind:h,simpleName:"VLineGeom",interfaces:[dl]},Object.defineProperty(ap.prototype,"negativeSign_0",{configurable:!0,get:function(){return this.showHalf>0?0:-1}}),Object.defineProperty(ap.prototype,"positiveSign_0",{configurable:!0,get:function(){return this.showHalf<0?0:1}}),ap.prototype.setDrawQuantiles_d3e2cz$=function(t){this.drawQuantiles_0=t},ap.prototype.buildIntern_uzv8ab$=function(t,e,n,i,o){this.buildLines_0(t,e,n,i,o)},ap.prototype.buildLines_0=function(t,e,n,i,o){var r,a=mh().withDefined_i1kplo$(e.dataPoints(),ti().X,ti().Y,ti().VIOLINWIDTH,ti().WIDTH),s=q();for(r=a.iterator();r.hasNext();){var l,u=r.next(),p=u.x(),h=s.get_11rb$(p);if(null==h){var _=c();s.put_xwzc9p$(p,_),l=_}else l=h;l.add_11rb$(u)}var d,f,$=U(s.size);for(d=s.entries.iterator();d.hasNext();){var y=d.next(),g=$.add_11rb$,v=y.key,b=y.value;g.call($,m(v,mh().ordered_Y_hku6c7$(b,!1)))}for(f=$.iterator();f.hasNext();){var w=f.next().component2();this.buildViolin_0(t,w,n,i,o)}},ap.prototype.buildViolin_0=function(t,e,n,i,o){var r=new Sh(n,i,o),a=this.toLocationBound_0(this.negativeSign_0,o),s=this.toLocationBound_0(this.positiveSign_0,o),l=r.createBands_dor9uj$(e,a,s);$l().appendNodes_37zgbi$(l,t),r.setAlphaEnabled_6taknv$(!1),$l().appendNodes_37zgbi$(r.createLines_rrreuh$(e,a),t),$l().appendNodes_37zgbi$(r.createLines_rrreuh$(e,s),t),this.buildQuantiles_0(t,e,n,i,o),this.buildHints_0(e,o,r,a),this.buildHints_0(e,o,r,s)},ap.prototype.buildQuantiles_0=function(t,e,n,i,o){var r,a,s,l=new qh(n,i,o,this.drawQuantiles_0,ti().Y,ti().VIOLINWIDTH,ti().X),u=(a=this,s=o,function(t){return new mt(a.toLocationBound_0(a.negativeSign_0,s)(t).x,x(t.y()))}),c=function(t,e){return function(n){return new mt(t.toLocationBound_0(t.positiveSign_0,e)(n).x,x(n.y()))}}(this,o);for(r=l.createGroupedQuantiles_dnvhv4$(e,u,c).iterator();r.hasNext();){var p=r.next();t.add_26jijc$(p)}},ap.prototype.toLocationBound_0=function(t,e){return n=e,i=t,function(t){var e=x(t.x())+n.getResolution_vktour$(ti().X)/2*i*x(t.width())*x(t.violinwidth()),o=x(t.y());return new mt(e,o)};var n,i},ap.prototype.buildHints_0=function(t,e,n,i){var o,r,a,s,l,u,c,p=Uh().createMultiPointDataByGroup_ugj9hh$(t,Uh().singlePointAppender_v9bvvf$((u=i,c=n,function(t){var e=u(t);return c.toClient_tkjljq$(e,t)})),Uh().reducer_8555vt$(.999,!1)),h=this.getGeomTargetCollector_vl74i5$(e),_=gh().createColorMarkerMapper_oomlkg$(Xo(),e);for(o=p.iterator();o.hasNext();){var d=o.next();r=d.points,a=d.localToGlobalIndex,s=new h_(void 0,void 0,void 0,_(d.aes)),l=e.flipped?cd():pd(),h.addPath_sa5m83$(r,a,s,l)}},sp.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var lp,up,cp,pp,hp=null;function _p(){return null===hp&&new sp,hp}function dp(){}function fp(){}function mp(){Ap(),Bs.call(this),this.yStackDir=Ap().DEF_YSTACKDIR}function $p(t,e){j.call(this),this.name$=t,this.ordinal$=e}function yp(){yp=function(){},lp=new $p("LEFT",0),up=new $p("RIGHT",1),cp=new $p("CENTER",2),pp=new $p("CENTERWHOLE",3),Cp()}function gp(){return yp(),lp}function vp(){return yp(),up}function bp(){return yp(),cp}function wp(){return yp(),pp}function xp(){kp=this,this.ENUM_INFO_0=new zt($p.values())}ap.$metadata$={kind:h,simpleName:"ViolinGeom",interfaces:[dl]},dp.$metadata$={kind:d,simpleName:"WithHeight",interfaces:[]},fp.$metadata$={kind:d,simpleName:"WithWidth",interfaces:[]},Object.defineProperty(mp.prototype,"legendKeyElementFactory",{configurable:!0,get:function(){return new rl}}),mp.prototype.buildIntern_uzv8ab$=function(t,n,i,o,r){var a=mh().withDefined_7jazl$(n.dataPoints(),ti().BINWIDTH,ti().X,ti().Y);if(Tt(a)){var s,l,u=At(a),p=x(u.x()),h=x(u.y()),_=x(u.binwidth()),d=x(o.toClient_gpjtzr$(new mt(p,h))),f=x(o.toClient_gpjtzr$(new mt(p,h+_)));if(!1===(l=r.flipped)){var m=d.y-f.y;s=Lt.abs(m)}else if(!0===l){var $=d.x-f.x;s=Lt.abs($)}else s=e.noWhenBranchMatched();var y,g,v=s,b=mh().withDefined_7jazl$(a,ti().X,ti().Y,ti().STACKSIZE),w=q();for(y=b.iterator();y.hasNext();){var k,C=y.next(),E=C.x(),S=w.get_11rb$(E);if(null==S){var T=c();w.put_xwzc9p$(E,T),k=T}else k=S;k.add_11rb$(C)}for(g=w.entries.iterator();g.hasNext();){var O,N,P=g.next().value,I=q();for(O=P.iterator();O.hasNext();){var A,R=O.next(),j=R.y(),L=I.get_11rb$(j);if(null==L){var z=c();I.put_xwzc9p$(j,z),A=z}else A=L;A.add_11rb$(R)}for(N=I.entries.iterator();N.hasNext();){var D=N.next().value;this.buildStack_0(t,D,i,o,r,v)}}}},mp.prototype.buildStack_0=function(t,e,n,i,o,r){var a,s,l=new Fs(n,i,o),u=new oh(n,i,o),c=0;for(s=e.iterator();s.hasNext();){var p=s.next();c+=x(p.stacksize())}var h=Rt(c),_=this.boundedStackSize_jcw1pd$(h,i,o,r,!o.flipped),d=0;for(a=e.iterator();a.hasNext();){for(var f=a.next(),m=this.boundedStackSize_jcw1pd$(d+Rt(x(f.stacksize()))|0,i,o,r,!o.flipped)-d|0,$=this.stackDotsAcrossGroups()?_:m,y=-1,g=0;g0?e:null}),d=(r=l(t,Bo())||l(t,Ko())||l(t,Vo())||l(t,Uo())||l(t,Po())||l(t,qo())||l(t,mr())||l(t,zo())?E("colorWithAlpha",function(t,e){return t.colorWithAlpha_l6g9mh$(e)}.bind(null,gh())):l(t,Qo())?E("pointStrokeMapper",function(t,e){return t.pointStrokeMapper_0(e)}.bind(null,this)):E("color",(function(t){return t.color()})),function(t){var e;return null!=(e=r(t))&&e.alpha>0&&0!==t.size()?e:null});if(null==t)o=le([n?_:null,i?d:null]);else if(l(t,Po())||l(t,ir())||l(t,rr())||l(t,hr())||l(t,Io())||l(t,_r())||l(t,Ko())||l(t,Vo())||l(t,fr())||l(t,Ao()))o=Xt(d);else if(l(t,nr()))o=n?le([n?_:null,i?d:null]):Xt(d);else if(l(t,Qo())){var f=(s=i,u=n,p=_,function(t){var n=x(t.shape()),i=e.isType(n,xm)&&n.isSolid?s:u,o=p(t);return i?o:null});o=le([f,i?d:null])}else o=le([n&&xr().renders_7dhqpi$(t).contains_11rb$(ti().FILL)?_:null,i&&xr().renders_7dhqpi$(t).contains_11rb$(ti().COLOR)?d:null]);return h=o,function(t){var e,n=h,i=c();for(e=n.iterator();e.hasNext();){var o;null!=(o=e.next()(t))&&i.add_11rb$(o)}return i}},$h.$metadata$={kind:p,simpleName:"HintColorUtil",interfaces:[]};var yh=null;function gh(){return null===yh&&new $h,yh}function vh(t,e){this.myPoint_0=t,this.myHelper_0=e,this._hints_0=D()}function bh(){this.myDefaultObjectRadius_0=null,this.myDefaultX_0=null,this.myDefaultColor_0=null,this.myDefaultKind_0=null}function wh(t,e){this.$outer=t,this.aes=e,this.kind=null,this.objectRadius_u2tfw5$_0=null,this.x_is741i$_0=null,this.color_8be2vx$_ng3d4v$_0=null,this.objectRadius=this.$outer.myDefaultObjectRadius_0,this.x=this.$outer.myDefaultX_0,this.kind=this.$outer.myDefaultKind_0,this.color_8be2vx$=this.$outer.myDefaultColor_0}function xh(t,e,n,i,o,r){Eh(),this.myTargetCollector_0=t,this.myDataPoints_0=e,this.myLinesHelper_0=n,this.myClosePath_0=i,this.myColorsByDataPoint_0=o,this.myFlipped_0=r}function kh(){Ch=this,this.DROP_POINT_DISTANCE_0=.999}Object.defineProperty(vh.prototype,"hints",{configurable:!0,get:function(){return this._hints_0}}),vh.prototype.addHint_p9kkqu$=function(t){var e=this.getCoord_0(t);if(null!=e){var n=this._hints_0,i=t.aes,o=this.createHint_0(t,e);n.put_xwzc9p$(i,o)}return this},vh.prototype.getCoord_0=function(t){var e;if(null==t.x)throw u("x coord is not set");var n=t.aes;if(this.myPoint_0.defined_896ixz$(n)){var i=x(this.myHelper_0.toClient_sap1gj$(x(t.x),x(this.myPoint_0.get_31786j$(n)),this.myPoint_0));e=this.myHelper_0.ctx_8be2vx$.flipped?i.flip():i}else e=null;return e},vh.prototype.createHint_0=function(t,e){var n,i,o=t.objectRadius,r=t.color_8be2vx$;if(null==o)throw u("object radius is not set");if(n=t.kind,l(n,cd()))i=Td().verticalTooltip_eox10j$(e,o,void 0,r,Pt());else if(l(n,pd()))i=Td().horizontalTooltip_eox10j$(e,o,void 0,r,Pt());else if(l(n,hd()))i=Td().cursorTooltip_un7elx$(e,void 0,void 0,Pt());else{if(!l(n,fd()))throw u("Unknown hint kind: "+Y(t.kind));i=Td().rotatedTooltip_6lq1u6$(e,o,r)}return i},bh.prototype.defaultObjectRadius_14dthe$=function(t){return this.myDefaultObjectRadius_0=t,this},bh.prototype.defaultX_14dthe$=function(t){return this.myDefaultX_0=t,this},bh.prototype.defaultColor_yo1m5r$=function(t,e){return this.myDefaultColor_0=null!=e?t.changeAlpha_za3lpa$(Rt(255*e)):t,this},bh.prototype.create_vktour$=function(t){return new wh(this,t)},bh.prototype.defaultKind_nnfttk$=function(t){return this.myDefaultKind_0=t,this},Object.defineProperty(wh.prototype,"objectRadius",{configurable:!0,get:function(){return this.objectRadius_u2tfw5$_0},set:function(t){this.objectRadius_u2tfw5$_0=t}}),Object.defineProperty(wh.prototype,"x",{configurable:!0,get:function(){return this.x_is741i$_0},set:function(t){this.x_is741i$_0=t}}),Object.defineProperty(wh.prototype,"color_8be2vx$",{configurable:!0,get:function(){return this.color_8be2vx$_ng3d4v$_0},set:function(t){this.color_8be2vx$_ng3d4v$_0=t}}),wh.prototype.objectRadius_14dthe$=function(t){return this.objectRadius=t,this},wh.prototype.x_14dthe$=function(t){return this.x=t,this},wh.prototype.color_98b62m$=function(t){return this.color_8be2vx$=t,this},wh.$metadata$={kind:h,simpleName:"HintConfig",interfaces:[]},bh.$metadata$={kind:h,simpleName:"HintConfigFactory",interfaces:[]},vh.$metadata$={kind:h,simpleName:"HintsCollection",interfaces:[]},xh.prototype.construct=function(){var t,e=c();for(t=this.createMultiPointDataByGroup_0().iterator();t.hasNext();){var n=t.next();e.addAll_brywnq$(this.myLinesHelper_0.createPaths_edlkk9$(n.aes,n.points,this.myClosePath_0)),this.buildHint_0(n)}return e},xh.prototype.buildHint_0=function(t){var e,n,i,o,r;this.myClosePath_0?this.myTargetCollector_0.addPolygon_sa5m83$(t.points,t.localToGlobalIndex,new h_(void 0,void 0,void 0,this.myColorsByDataPoint_0(t.aes))):(r=this.myTargetCollector_0,e=t.points,n=t.localToGlobalIndex,i=new h_(void 0,void 0,void 0,this.myColorsByDataPoint_0(t.aes)),o=this.myFlipped_0?cd():pd(),r.addPath_sa5m83$(e,n,i,o))},xh.prototype.createMultiPointDataByGroup_0=function(){return Uh().createMultiPointDataByGroup_ugj9hh$(this.myDataPoints_0,Uh().singlePointAppender_v9bvvf$((t=this,function(e){return t.myLinesHelper_0.toClient_tkjljq$(x(mh().TO_LOCATION_X_Y(e)),e)})),Uh().reducer_8555vt$(Eh().DROP_POINT_DISTANCE_0,this.myClosePath_0));var t},kh.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var Ch=null;function Eh(){return null===Ch&&new kh,Ch}function Sh(t,e,n){oh.call(this,t,e,n),this.myAlphaFilter_nxoahd$_0=Ph,this.myWidthFilter_sx37fb$_0=Ih,this.myAlphaEnabled_98jfa$_0=!0}function Th(t){return function(e){return t(e)}}function Oh(t){return function(e){return t(e)}}function Nh(t){this.path=t}function Ph(t){return t}function Ih(t){return t}function Ah(t,e){this.aesthetics_si83cx$_0=t,this.pointAestheticsMapper_y60s7e$_0=e}function Rh(t,e,n,i){this.aes=t,this.points=e,this.localToGlobalIndex=n,this.group=i}function jh(){Fh=this}function Lh(){return new Mh}function zh(){}function Dh(t,e){this.myCoordinateAppender_0=t,this.myPointCollector_0=e,this.myFirstAes_0=null}function Mh(){this.myPoints_0=c(),this.myIndexes_0=c()}function Bh(t,e){this.myDropPointDistance_0=t,this.myPolygon_0=e,this.myReducedPoints_0=c(),this.myReducedIndexes_0=c(),this.myLastAdded_0=null,this.myLastPostponed_0=null,this.myRegionStart_0=null}xh.$metadata$={kind:h,simpleName:"LinePathConstructor",interfaces:[]},Sh.prototype.insertPathSeparators_fr5rf4$_0=function(t){var e,n=c();for(e=t.iterator();e.hasNext();){var i=e.next();n.isEmpty()||n.add_11rb$(L$().END_OF_SUBPATH),n.addAll_brywnq$(i)}return n},Sh.prototype.setAlphaEnabled_6taknv$=function(t){this.myAlphaEnabled_98jfa$_0=t},Sh.prototype.createLines_rrreuh$=function(t,e){return this.createPaths_gfkrhx$_0(t,e,!1)},Sh.prototype.createPaths_gfkrhx$_0=function(t,e,n){var i,o=c();for(i=Uh().createMultiPointDataByGroup_ugj9hh$(t,Uh().singlePointAppender_v9bvvf$(this.toClientLocation_sfitzs$(function(t){return function(e){return t(e)}}(e))),Uh().reducer_8555vt$(.999,n)).iterator();i.hasNext();){var r=i.next();o.addAll_brywnq$(this.createPaths_edlkk9$(r.aes,r.points,n))}return o},Sh.prototype.createPaths_edlkk9$=function(t,e,n){var i,o=c();for(n?o.add_11rb$(L$().polygon_yh26e7$(this.insertPathSeparators_fr5rf4$_0(ue(e)))):o.add_11rb$(L$().line_qdtdbw$(e)),i=o.iterator();i.hasNext();){var r=i.next();this.decorate_frjrd5$(r,t,n)}return o},Sh.prototype.createSteps_1fp004$=function(t,e){var n,i,o=c();for(n=Uh().createMultiPointDataByGroup_ugj9hh$(t,Uh().singlePointAppender_v9bvvf$(this.toClientLocation_sfitzs$(mh().TO_LOCATION_X_Y)),Uh().reducer_8555vt$(.999,!1)).iterator();n.hasNext();){var r=n.next(),a=r.points;if(!a.isEmpty()){var s=c(),l=null;for(i=a.iterator();i.hasNext();){var u=i.next();if(null!=l){var p=e===Mc()?u.x:l.x,h=e===Mc()?l.y:u.y;s.add_11rb$(new mt(p,h))}s.add_11rb$(u),l=u}var _=L$().line_qdtdbw$(s);this.decorate_frjrd5$(_,r.aes,!1),o.add_11rb$(new Nh(_))}}return o},Sh.prototype.createBands_dor9uj$=function(t,e,n,i){var o;void 0===i&&(i=!1);var r=c(),a=mh().createGroups_83glv4$(t);for(o=yt.Companion.natural_dahdeg$().sortedCopy_m5x2f4$(a.keys).iterator();o.hasNext();){var s=o.next(),l=x(a.get_11rb$(s)),u=this.project_rrreuh$(l,Th(e)),p=z(i?this.simplify_l17hfs$_0(u):u),h=z(this.project_rrreuh$(N(l),Oh(n)));if(p.addAll_brywnq$(i?this.simplify_l17hfs$_0(h):h),!p.isEmpty()){var _=L$().polygon_yh26e7$(p);this.decorateFillingPart_e7h5w8$_0(_,l.get_za3lpa$(0)),r.add_11rb$(_)}}return r},Sh.prototype.simplify_l17hfs$_0=function(t){return ce.Companion.douglasPeucker_ytws2g$(t).setWeightLimit_14dthe$(.25).points},Sh.prototype.decorate_frjrd5$=function(t,e,n){var i=e.color(),o=x(this.myAlphaFilter_nxoahd$_0(da().alpha_il6rhx$(x(i),e)));t.color().set_11rb$(_t.Colors.withOpacity_o14uds$(i,o)),da().ALPHA_CONTROLS_BOTH_8be2vx$||!n&&this.myAlphaEnabled_98jfa$_0||t.color().set_11rb$(i),n&&this.decorateFillingPart_e7h5w8$_0(t,e);var r=x(this.myWidthFilter_sx37fb$_0(Kr().strokeWidth_l6g9mh$(e)));t.width().set_11rb$(r);var a=e.lineType();a.isBlank||a.isSolid||t.dashArray().set_11rb$(a.dashArray)},Sh.prototype.decorateFillingPart_e7h5w8$_0=function(t,e){var n=e.fill(),i=x(this.myAlphaFilter_nxoahd$_0(da().alpha_il6rhx$(x(n),e)));t.fill().set_11rb$(_t.Colors.withOpacity_o14uds$(n,i))},Sh.prototype.setAlphaFilter_m9g0ow$=function(t){this.myAlphaFilter_nxoahd$_0=t},Sh.prototype.setWidthFilter_m9g0ow$=function(t){this.myWidthFilter_sx37fb$_0=t},Nh.$metadata$={kind:h,simpleName:"PathInfo",interfaces:[]},Sh.$metadata$={kind:h,simpleName:"LinesHelper",interfaces:[oh]},Object.defineProperty(Ah.prototype,"isEmpty",{configurable:!0,get:function(){return this.aesthetics_si83cx$_0.isEmpty}}),Ah.prototype.dataPointAt_za3lpa$=function(t){return this.pointAestheticsMapper_y60s7e$_0(this.aesthetics_si83cx$_0.dataPointAt_za3lpa$(t))},Ah.prototype.dataPointCount=function(){return this.aesthetics_si83cx$_0.dataPointCount()},Ah.prototype.dataPoints=function(){var t,e=this.aesthetics_si83cx$_0.dataPoints(),n=U(F(e,10));for(t=e.iterator();t.hasNext();){var i=t.next();n.add_11rb$(this.pointAestheticsMapper_y60s7e$_0(i))}return n},Ah.prototype.range_vktour$=function(t){throw V("MappedAesthetics.range: not implemented "+t)},Ah.prototype.resolution_594811$=function(t,e){throw V("MappedAesthetics.resolution: not implemented "+t)},Ah.prototype.numericValues_vktour$=function(t){throw V("MappedAesthetics.numericValues: not implemented "+t)},Ah.prototype.groups=function(){return this.aesthetics_si83cx$_0.groups()},Ah.$metadata$={kind:h,simpleName:"MappedAesthetics",interfaces:[ei]},Rh.$metadata$={kind:h,simpleName:"MultiPointData",interfaces:[]},jh.prototype.collector=function(){return Lh},jh.prototype.reducer_8555vt$=function(t,e){return n=t,i=e,function(){return new Bh(n,i)};var n,i},jh.prototype.singlePointAppender_v9bvvf$=function(t){return e=t,function(t,n){return n(e(t)),it};var e},jh.prototype.multiPointAppender_t2aup3$=function(t){return e=t,function(t,n){var i;for(i=e(t).iterator();i.hasNext();)n(i.next());return it};var e},jh.prototype.createMultiPointDataByGroup_ugj9hh$=function(t,n,i){var o,r,a=D();for(o=t.iterator();o.hasNext();){var l,u,p=o.next(),h=p.group();if(!(e.isType(l=a,et)?l:s()).containsKey_11rb$(h)){var _=x(h),d=new Dh(n,i());a.put_xwzc9p$(_,d)}x((e.isType(u=a,et)?u:s()).get_11rb$(h)).add_lsjzq4$(p)}var f=c();for(r=yt.Companion.natural_dahdeg$().sortedCopy_m5x2f4$(a.keys).iterator();r.hasNext();){var m=r.next(),$=x(a.get_11rb$(m)).create_kcn2v3$(m);$.points.isEmpty()||f.add_11rb$($)}return f},zh.$metadata$={kind:d,simpleName:"PointCollector",interfaces:[]},Dh.prototype.add_lsjzq4$=function(t){var e,n;null==this.myFirstAes_0&&(this.myFirstAes_0=t),this.myCoordinateAppender_0(t,(e=this,n=t,function(t){return e.myPointCollector_0.add_aqrfag$(t,n.index()),it}))},Dh.prototype.create_kcn2v3$=function(t){var e,n=this.myPointCollector_0.points;return new Rh(x(this.myFirstAes_0),n.first,(e=n,function(t){return e.second.get_za3lpa$(t)}),t)},Dh.$metadata$={kind:h,simpleName:"MultiPointDataCombiner",interfaces:[]},Object.defineProperty(Mh.prototype,"points",{configurable:!0,get:function(){return new pe(this.myPoints_0,this.myIndexes_0)}}),Mh.prototype.add_aqrfag$=function(t,e){this.myPoints_0.add_11rb$(x(t)),this.myIndexes_0.add_11rb$(e)},Mh.$metadata$={kind:h,simpleName:"SimplePointCollector",interfaces:[zh]},Object.defineProperty(Bh.prototype,"points",{configurable:!0,get:function(){return null!=this.myLastPostponed_0&&(this.addPoint_0(x(this.myLastPostponed_0).first,x(this.myLastPostponed_0).second),this.myLastPostponed_0=null),new pe(this.myReducedPoints_0,this.myReducedIndexes_0)}}),Bh.prototype.isCloserThan_0=function(t,e,n){var i=t.x-e.x,o=Lt.abs(i)=t){e=a;break t}a=a+1|0}e=-1}while(0);var s=e;if(0===s)return Zt(i);if(-1===s)return _e(i);var l=(i.get_za3lpa$(s)-i.get_za3lpa$(s-1|0))/(n.get_za3lpa$(s)-n.get_za3lpa$(s-1|0));return l*t+(i.get_za3lpa$(s-1|0)-l*n.get_za3lpa$(s-1|0))};var n,i},Hh.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var Gh=null;function Kh(){return null===Gh&&new Hh,Gh}function Vh(t,e,n,i){this.rectanglesHelper_0=t,this.clientRectByDataPoint_0=e,this.tooltipKind_0=n,this.colorsByDataPoint_0=i}function Yh(t,e,n,i){oh.call(this,e,n,i),this.myAesthetics_0=t}function Wh(){Xh=this,this.HJUST_MAP_0=ge([m("right",py()),m("middle",hy()),m("left",cy()),m(0,cy()),m(.5,hy()),m(1,py())]),this.VJUST_MAP_0=ge([m("bottom",my()),m("center",$y()),m("top",fy()),m(0,my()),m(.5,$y()),m(1,fy())]),this.FONT_FAMILY_MAP_0=ge([m("sans","sans-serif"),m("serif","serif"),m("mono","monospace")])}qh.$metadata$={kind:h,simpleName:"QuantilesHelper",interfaces:[oh]},Vh.prototype.collectTo_xrq6q$=function(t){var e,n;this.rectanglesHelper_0.iterateRectangleGeometry_xwqduk$(this.clientRectByDataPoint_0,(e=t,n=this,function(t,i){return e.addRectangle_bxzvr8$(t.index(),i,new h_(void 0,void 0,void 0,n.colorsByDataPoint_0(t)),n.tooltipKind_0),it}))},Vh.$metadata$={kind:h,simpleName:"RectTargetCollectorHelper",interfaces:[]},Yh.prototype.createRectangles_rezc4r$=function(t){var e,n,i=c();e=this.myAesthetics_0.dataPointCount();for(var o=0;o180?a-360:a)<-180?a+360:a)>45&&a<135,u=a<-45&&a>-135,c=o?vt("x",1,(function(t){return t.x})):vt("y",1,(function(t){return t.y})),p=o?vt("y",1,(function(t){return t.y})):vt("x",1,(function(t){return t.x})),h=s||u?p:c,_=o&&s||!o&&u;if(!_){var d=a;_=Lt.abs(d)>=135}var f=_,m=l(t,"inward")&&f||l(t,"outward")&&!f;r=nt(o?["left","middle","right"]:["top","center","bottom"]);var $=me(r);m&&Nt($);var y=$,g=$e(h(n),h(i))?1:h(n)=0){var _=x(u),d=x(o.get_11rb$(u))+h;o.put_xwzc9p$(_,d)}else{var f=x(u),m=x(r.get_11rb$(u))-h;r.put_xwzc9p$(f,m)}}}var $=D();i=t.dataPointCount();for(var y=0;y=0;if(E&&(E=x((e.isType(C=o,et)?C:s()).get_11rb$(b))>0),E){var S,T=1/x((e.isType(S=o,et)?S:s()).get_11rb$(b));$.put_xwzc9p$(y,T)}else{var O,N=k<0;if(N&&(N=x((e.isType(O=r,et)?O:s()).get_11rb$(b))>0),N){var P,I=1/x((e.isType(P=r,et)?P:s()).get_11rb$(b));$.put_xwzc9p$(y,I)}else $.put_xwzc9p$(y,1)}}else $.put_xwzc9p$(y,1)}return $},Xd.prototype.translate_tshsjz$=function(t,e,n){var i=this.myStackPosHelper_0.translate_tshsjz$(t,e,n);return new mt(i.x,i.y*g(this.myScalerByIndex_0,e.index()))},Xd.prototype.handlesGroups=function(){return bf().handlesGroups()},Xd.$metadata$={kind:h,simpleName:"FillPos",interfaces:[Er]},Zd.prototype.translate_tshsjz$=function(t,e,n){var i=this.myJitterPosHelper_0.translate_tshsjz$(t,e,n);return this.myDodgePosHelper_0.translate_tshsjz$(i,e,n)},Zd.prototype.handlesGroups=function(){return kf().handlesGroups()},Zd.$metadata$={kind:h,simpleName:"JitterDodgePos",interfaces:[Er]},Jd.prototype.translate_tshsjz$=function(t,e,n){var i=(2*be.Default.nextDouble()-1)*this.myWidth_0*n.getResolution_vktour$(ti().X),o=(2*be.Default.nextDouble()-1)*this.myHeight_0*n.getResolution_vktour$(ti().Y);return t.add_gpjtzr$(new mt(i,o))},Jd.prototype.handlesGroups=function(){return wf().handlesGroups()},Qd.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var tf=null;function ef(){return null===tf&&new Qd,tf}function nf(t,e){_f(),this.nudgeDist_0=new mt(null!=t?t:_f().DEF_NUDGE_WIDTH,null!=e?e:_f().DEF_NUDGE_HEIGHT)}function of(){hf=this,this.DEF_NUDGE_WIDTH=0,this.DEF_NUDGE_HEIGHT=0}Jd.$metadata$={kind:h,simpleName:"JitterPos",interfaces:[Er]},nf.prototype.translate_tshsjz$=function(t,e,n){return t.add_gpjtzr$(this.nudgeDist_0)},nf.prototype.handlesGroups=function(){return xf().handlesGroups()},of.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var rf,af,sf,lf,uf,cf,pf,hf=null;function _f(){return null===hf&&new of,hf}function df(){Cf=this}function ff(){}function mf(t,e,n){j.call(this),this.handlesGroups_y0evzn$_0=n,this.name$=t,this.ordinal$=e}function $f(){$f=function(){},rf=new mf("IDENTITY",0,!1),af=new mf("DODGE",1,!0),sf=new mf("STACK",2,!0),lf=new mf("FILL",3,!0),uf=new mf("JITTER",4,!1),cf=new mf("NUDGE",5,!1),pf=new mf("JITTER_DODGE",6,!0)}function yf(){return $f(),rf}function gf(){return $f(),af}function vf(){return $f(),sf}function bf(){return $f(),lf}function wf(){return $f(),uf}function xf(){return $f(),cf}function kf(){return $f(),pf}nf.$metadata$={kind:h,simpleName:"NudgePos",interfaces:[Er]},Object.defineProperty(ff.prototype,"isIdentity",{configurable:!0,get:function(){return!0}}),ff.prototype.translate_tshsjz$=function(t,e,n){return t},ff.prototype.handlesGroups=function(){return yf().handlesGroups()},ff.$metadata$={kind:h,interfaces:[Er]},df.prototype.identity=function(){return new ff},df.prototype.dodge_vvhcz8$=function(t,e,n){return new Wd(t,e,n)},df.prototype.stack_nvozds$=function(t,e){return new Ef(t,e)},df.prototype.fill_nvozds$=function(t,e){return new Xd(t,e)},df.prototype.jitter_jma9l8$=function(t,e){return new Jd(t,e)},df.prototype.nudge_jma9l8$=function(t,e){return new nf(t,e)},df.prototype.jitterDodge_e2pc44$=function(t,e,n,i,o){return new Zd(t,e,n,i,o)},mf.prototype.handlesGroups=function(){return this.handlesGroups_y0evzn$_0},mf.$metadata$={kind:h,simpleName:"Meta",interfaces:[j]},mf.values=function(){return[yf(),gf(),vf(),bf(),wf(),xf(),kf()]},mf.valueOf_61zpoe$=function(t){switch(t){case"IDENTITY":return yf();case"DODGE":return gf();case"STACK":return vf();case"FILL":return bf();case"JITTER":return wf();case"NUDGE":return xf();case"JITTER_DODGE":return kf();default:L("No enum constant jetbrains.datalore.plot.base.pos.PositionAdjustments.Meta."+t)}},df.$metadata$={kind:p,simpleName:"PositionAdjustments",interfaces:[]};var Cf=null;function Ef(t,e){Of(),this.myOffsetByIndex_0=this.mapIndexToOffset_0(t,null!=e?e:Of().DEF_VJUST_0)}function Sf(){Tf=this,this.DEF_VJUST_0=1}Ef.prototype.mapIndexToOffset_0=function(t,n){var i,o=D(),r=D();i=t.dataPointCount();for(var a=0;a=0?f.second.getAndAdd_14dthe$(_):f.first.getAndAdd_14dthe$(_))-_*(1-n);o.put_xwzc9p$(a,m)}}}return o},Ef.prototype.translate_tshsjz$=function(t,e,n){return t.add_gpjtzr$(new mt(0,x(this.myOffsetByIndex_0.get_11rb$(e.index()))))},Ef.prototype.handlesGroups=function(){return vf().handlesGroups()},Sf.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var Tf=null;function Of(){return null===Tf&&new Sf,Tf}function Nf(){}function Pf(){}function If(){}function Af(t,e,n,i){j.call(this),this.code=n,this.myDashArray_j93rys$_0=i,this.name$=t,this.ordinal$=e}function Rf(){Rf=function(){},new jf,new Df,Mf=new Af("DASHED",2,2,nt([4.3,4.3])),Bf=new Af("DOTTED",3,3,nt([1,3.2])),Ff=new Af("DOTDASH",4,4,nt([1,3.2,4.3,3.2])),Uf=new Af("LONGDASH",5,5,nt([7.4,3.2])),qf=new Af("TWODASH",6,6,nt([2.4,2.4,6.4,2.4]))}function jf(){Lf=this,Af.call(this,"BLANK",0,0,null)}Ef.$metadata$={kind:h,simpleName:"StackPos",interfaces:[Er]},Nf.prototype.minimumKeySize_l6g9mh$=function(t){var e=2*Kr().strokeWidth_l6g9mh$(t)+4;return new mt(e,e)},Nf.$metadata$={kind:d,simpleName:"LegendKeyElementFactory",interfaces:[]},Pf.$metadata$={kind:d,simpleName:"SvgRoot",interfaces:[]},If.$metadata$={kind:d,simpleName:"LineType",interfaces:[]},Object.defineProperty(jf.prototype,"isBlank",{configurable:!0,get:function(){return!0}}),jf.$metadata$={kind:h,simpleName:"BLANK",interfaces:[Af]};var Lf=null;function zf(){return Rf(),Lf}function Df(){mm=this,Af.call(this,"SOLID",1,1,null)}Object.defineProperty(Df.prototype,"isSolid",{configurable:!0,get:function(){return!0}}),Df.$metadata$={kind:h,simpleName:"SOLID",interfaces:[Af]};var Mf,Bf,Ff,Uf,qf,Hf,Gf,Kf,Vf,Yf,Wf,Xf,Zf,Jf,Qf,tm,em,nm,im,om,rm,am,sm,lm,um,cm,pm,hm,_m,dm,fm,mm=null;function $m(){return Rf(),mm}function ym(){return Rf(),Mf}function gm(){return Rf(),Bf}function vm(){return Rf(),Ff}function bm(){return Rf(),Uf}function wm(){return Rf(),qf}function xm(t,e,n,i,o,r){void 0===i&&(i=!1),void 0===o&&(o=!1),void 0===r&&(r=!1),j.call(this),this.code_djxmtz$_0=n,this.isSolid=i,this.isFilled=o,this.isSmall_kvok7h$_0=r,this.name$=t,this.ordinal$=e}function km(){km=function(){},Hf=new xm("STICK_SQUARE",0,0),Gf=new xm("STICK_CIRCLE",1,1),Kf=new xm("STICK_TRIANGLE_UP",2,2),Vf=new xm("STICK_PLUS",3,3),Yf=new xm("STICK_CROSS",4,4),Wf=new xm("STICK_DIAMOND",5,5),Xf=new xm("STICK_TRIANGLE_DOWN",6,6),Zf=new xm("STICK_SQUARE_CROSS",7,7),Jf=new xm("STICK_STAR",8,8),Qf=new xm("STICK_DIAMOND_PLUS",9,9),tm=new xm("STICK_CIRCLE_PLUS",10,10),em=new xm("STICK_TRIANGLE_UP_DOWN",11,11),nm=new xm("STICK_SQUARE_PLUS",12,12),im=new xm("STICK_CIRCLE_CROSS",13,13),om=new xm("STICK_SQUARE_TRIANGLE_UP",14,14),rm=new xm("SOLID_SQUARE",15,15,!0,!1),am=new xm("SOLID_CIRCLE",16,16,!0,!1),sm=new xm("SOLID_TRIANGLE_UP",17,17,!0,!1),lm=new xm("SOLID_DIAMOND",18,18,!0,!1,!0),um=new xm("SOLID_CIRCLE_2",19,19,!0,!1),cm=new xm("BULLET",20,20,!0,!1,!0),pm=new xm("FILLED_CIRCLE",21,21,!1,!0),hm=new xm("FILLED_SQUARE",22,22,!1,!0),_m=new xm("FILLED_DIAMOND",23,23,!1,!0),dm=new xm("FILLED_TRIANGLE_UP",24,24,!1,!0),fm=new xm("FILLED_TRIANGLE_DOWN",25,25,!1,!0)}function Cm(){return km(),Hf}function Em(){return km(),Gf}function Sm(){return km(),Kf}function Tm(){return km(),Vf}function Om(){return km(),Yf}function Nm(){return km(),Wf}function Pm(){return km(),Xf}function Im(){return km(),Zf}function Am(){return km(),Jf}function Rm(){return km(),Qf}function jm(){return km(),tm}function Lm(){return km(),em}function zm(){return km(),nm}function Dm(){return km(),im}function Mm(){return km(),om}function Bm(){return km(),rm}function Fm(){return km(),am}function Um(){return km(),sm}function qm(){return km(),lm}function Hm(){return km(),um}function Gm(){return km(),cm}function Km(){return km(),pm}function Vm(){return km(),hm}function Ym(){return km(),_m}function Wm(){return km(),dm}function Xm(){return km(),fm}function Zm(){}function Jm(){Qm=this}Object.defineProperty(Af.prototype,"isSolid",{configurable:!0,get:function(){return!1}}),Object.defineProperty(Af.prototype,"isBlank",{configurable:!0,get:function(){return!1}}),Object.defineProperty(Af.prototype,"dashArray",{configurable:!0,get:function(){if(!this.isSolid&&!this.isBlank)return x(this.myDashArray_j93rys$_0);throw V("No dash array in "+this.name.toLowerCase()+" linetype")}}),Af.$metadata$={kind:h,simpleName:"NamedLineType",interfaces:[If,j]},Af.values=function(){return[zf(),$m(),ym(),gm(),vm(),bm(),wm()]},Af.valueOf_61zpoe$=function(t){switch(t){case"BLANK":return zf();case"SOLID":return $m();case"DASHED":return ym();case"DOTTED":return gm();case"DOTDASH":return vm();case"LONGDASH":return bm();case"TWODASH":return wm();default:L("No enum constant jetbrains.datalore.plot.base.render.linetype.NamedLineType."+t)}},Object.defineProperty(xm.prototype,"code",{get:function(){return this.code_djxmtz$_0}}),Object.defineProperty(xm.prototype,"isHollow",{configurable:!0,get:function(){return!(this.isFilled||this.isSolid)}}),xm.prototype.size_l6g9mh$=function(t){return this.isSmall_kvok7h$_0?Kr().circleDiameterSmaller_l6g9mh$(t):Kr().circleDiameter_l6g9mh$(t)},xm.prototype.strokeWidth_l6g9mh$=function(t){return this.isSolid?0:1},xm.$metadata$={kind:h,simpleName:"NamedShape",interfaces:[Zm,j]},xm.values=function(){return[Cm(),Em(),Sm(),Tm(),Om(),Nm(),Pm(),Im(),Am(),Rm(),jm(),Lm(),zm(),Dm(),Mm(),Bm(),Fm(),Um(),qm(),Hm(),Gm(),Km(),Vm(),Ym(),Wm(),Xm()]},xm.valueOf_61zpoe$=function(t){switch(t){case"STICK_SQUARE":return Cm();case"STICK_CIRCLE":return Em();case"STICK_TRIANGLE_UP":return Sm();case"STICK_PLUS":return Tm();case"STICK_CROSS":return Om();case"STICK_DIAMOND":return Nm();case"STICK_TRIANGLE_DOWN":return Pm();case"STICK_SQUARE_CROSS":return Im();case"STICK_STAR":return Am();case"STICK_DIAMOND_PLUS":return Rm();case"STICK_CIRCLE_PLUS":return jm();case"STICK_TRIANGLE_UP_DOWN":return Lm();case"STICK_SQUARE_PLUS":return zm();case"STICK_CIRCLE_CROSS":return Dm();case"STICK_SQUARE_TRIANGLE_UP":return Mm();case"SOLID_SQUARE":return Bm();case"SOLID_CIRCLE":return Fm();case"SOLID_TRIANGLE_UP":return Um();case"SOLID_DIAMOND":return qm();case"SOLID_CIRCLE_2":return Hm();case"BULLET":return Gm();case"FILLED_CIRCLE":return Km();case"FILLED_SQUARE":return Vm();case"FILLED_DIAMOND":return Ym();case"FILLED_TRIANGLE_UP":return Wm();case"FILLED_TRIANGLE_DOWN":return Xm();default:L("No enum constant jetbrains.datalore.plot.base.render.point.NamedShape."+t)}},Zm.$metadata$={kind:d,simpleName:"PointShape",interfaces:[]},Jm.prototype.create_d8smhz$=function(t,n,i,o){if(void 0===o&&(o=1),l(t,i$()))return this.createTinyDotShape_0(n,i);if(e.isType(t,xm)){var r=t.size_l6g9mh$(i)*o;if(!k(r))throw V(("Invalid point size: "+r).toString());return this.createNamedShape_0(t,n,r,i)}throw u("Unsupported point shape code "+t.code+" "+Y(e.getKClassFromExpression(t).simpleName))},Jm.prototype.createTinyDotShape_0=function(t,e){var n=Ft.SvgSlimElements.rect_6y0v78$(t.x-.5,t.y-.5,1,1),i=x(e.color()),o=da().alpha_il6rhx$(i,e);return n.setFill_o14uds$(i,o),n.setStrokeWidth_14dthe$(0),n},Jm.prototype.createNamedShape_0=function(t,e,n,i){var o=this.createSlimGlyph_0(t,e,n);return da().decorate_l4vgcq$(o,t.isFilled,t.isSolid,i,t.strokeWidth_l6g9mh$(i)),o},Jm.prototype.createSlimGlyph_0=function(t,n,i){switch(t.name){case"STICK_SQUARE":case"SOLID_SQUARE":case"FILLED_SQUARE":return y$().square_e1sv3v$(n,i);case"STICK_CIRCLE":case"SOLID_CIRCLE":case"SOLID_CIRCLE_2":case"BULLET":case"FILLED_CIRCLE":return y$().circle_e1sv3v$(n,i);case"STICK_TRIANGLE_UP":case"SOLID_TRIANGLE_UP":case"FILLED_TRIANGLE_UP":return y$().triangleUp_e1sv3v$(n,i);case"STICK_TRIANGLE_DOWN":case"FILLED_TRIANGLE_DOWN":return y$().triangleDown_e1sv3v$(n,i);case"STICK_DIAMOND":case"SOLID_DIAMOND":case"FILLED_DIAMOND":return y$().diamond_e1sv3v$(n,i);case"STICK_PLUS":return y$().stickPlus_e1sv3v$(n,i);case"STICK_CROSS":return y$().stickCross_e1sv3v$(n,i);case"STICK_SQUARE_CROSS":return y$().stickSquareCross_e1sv3v$(n,i);case"STICK_STAR":return y$().stickStar_e1sv3v$(n,i);case"STICK_DIAMOND_PLUS":return y$().stickDiamondPlus_e1sv3v$(n,i);case"STICK_CIRCLE_PLUS":return y$().stickCirclePlus_e1sv3v$(n,i);case"STICK_TRIANGLE_UP_DOWN":return y$().stickTriangleUpDown_e1sv3v$(n,i);case"STICK_SQUARE_PLUS":return y$().stickSquarePlus_e1sv3v$(n,i);case"STICK_CIRCLE_CROSS":return y$().stickCircleCross_e1sv3v$(n,i);case"STICK_SQUARE_TRIANGLE_UP":return y$().stickSquareTriangleUp_e1sv3v$(n,i);default:e.noWhenBranchMatched()}},Jm.$metadata$={kind:p,simpleName:"PointShapeSvg",interfaces:[]};var Qm=null;function t$(){return null===Qm&&new Jm,Qm}function e$(){n$=this}Object.defineProperty(e$.prototype,"code",{configurable:!0,get:function(){return 46}}),e$.prototype.size_l6g9mh$=function(t){return 1},e$.prototype.strokeWidth_l6g9mh$=function(t){return 0},e$.$metadata$={kind:p,simpleName:"TinyPointShape",interfaces:[Zm]};var n$=null;function i$(){return null===n$&&new e$,n$}function o$(){}function r$(t,e){x$(t,e,this)}function a$(t,e,n){u$(),void 0===n&&(n=!0),O$.call(this);var i=t.x,o=t.y,r=(n?e*u$().CIRCLE_WIDTH_ADJUST_RATIO:e)/2,a=Ft.SvgSlimElements.line_6y0v78$(i-r,o-r,i+r,o+r),s=Ft.SvgSlimElements.line_6y0v78$(i-r,o+r,i+r,o-r);this.setShapes_0(a,s)}function s$(){l$=this;var t=Yt.PI/4;this.CIRCLE_WIDTH_ADJUST_RATIO=Lt.cos(t)}o$.$metadata$={kind:d,simpleName:"UpdatableShape",interfaces:[]},r$.prototype.createShape_e1sv3v$=function(t,e){return Ft.SvgSlimElements.circle_yvo9jy$(t.x,t.y,e/2)},r$.$metadata$={kind:h,simpleName:"CircleGlyph",interfaces:[b$]},s$.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var l$=null;function u$(){return null===l$&&new s$,l$}function c$(t,e){x$(t,e,this)}function p$(){}function h$(t,e){this.myG1_0=t,this.myG2_0=e}function _$(){d$=this}a$.$metadata$={kind:h,simpleName:"CrossGlyph",interfaces:[O$]},c$.prototype.createShape_e1sv3v$=function(t,e){var n,i=e/2,o=t.x-i,r=t.y-i,a=nt([i,e,i,0]),s=U(F(a,10));for(n=a.iterator();n.hasNext();){var l=n.next();s.add_11rb$(l+o)}var u,c=s,p=nt([0,i,e,i]),h=U(F(p,10));for(u=p.iterator();u.hasNext();){var _=u.next();h.add_11rb$(_+r)}var d=h,f=f$().buildPathData_2a5262$(c,d);return Ft.SvgSlimElements.path_za3rmp$(f)},c$.$metadata$={kind:h,simpleName:"DiamondGlyph",interfaces:[b$]},p$.$metadata$={kind:d,simpleName:"Glyph",interfaces:[xe,o$]},h$.prototype.update_mjoany$=function(t,e,n,i,o){this.myG1_0.update_mjoany$(t,e,n,i,o),this.myG2_0.update_mjoany$(t,e,n,i,o)},h$.prototype.appendTo_i2myw1$=function(t){this.myG1_0.appendTo_i2myw1$(t),this.myG2_0.appendTo_i2myw1$(t)},h$.$metadata$={kind:h,simpleName:"GlyphPair",interfaces:[p$]},_$.prototype.buildPathData_2a5262$=function(t,e){if(t.size!==e.size)throw u("Sizes of X/Y collections must be equal".toString());return t.isEmpty()?ke.Companion.EMPTY:new jt(!0).moveTo_przk3b$(t.get_za3lpa$(0),e.get_za3lpa$(0)).interpolatePoints_3g1a62$(t,e,Ce.LINEAR).closePath().build()},_$.$metadata$={kind:p,simpleName:"GlyphUtil",interfaces:[]};var d$=null;function f$(){return null===d$&&new _$,d$}function m$(){$$=this}m$.prototype.square_e1sv3v$=function(t,e){return new k$(t,e)},m$.prototype.circle_e1sv3v$=function(t,e){return new r$(t,e)},m$.prototype.diamond_e1sv3v$=function(t,e){return new c$(t,e)},m$.prototype.triangleUp_e1sv3v$=function(t,e){return new C$(t,e,!0)},m$.prototype.triangleDown_e1sv3v$=function(t,e){return new C$(t,e,!1)},m$.prototype.stickPlus_e1sv3v$=function(t,e){return new v$(t,e)},m$.prototype.stickCross_e1sv3v$=function(t,e){return new a$(t,e)},m$.prototype.stickSquareCross_e1sv3v$=function(t,e){return new h$(new k$(t,e),new a$(t,e,!1))},m$.prototype.stickStar_e1sv3v$=function(t,e){return new h$(new v$(t,e),new a$(t,e))},m$.prototype.stickDiamondPlus_e1sv3v$=function(t,e){return new h$(new c$(t,e),new v$(t,e))},m$.prototype.stickCirclePlus_e1sv3v$=function(t,e){return new h$(new r$(t,e),new v$(t,e))},m$.prototype.stickTriangleUpDown_e1sv3v$=function(t,e){return new h$(new C$(t,e,!0),new C$(t,e,!1))},m$.prototype.stickSquarePlus_e1sv3v$=function(t,e){return new h$(new k$(t,e),new v$(t,e))},m$.prototype.stickCircleCross_e1sv3v$=function(t,e){return new h$(new r$(t,e),new a$(t,e))},m$.prototype.stickSquareTriangleUp_e1sv3v$=function(t,e){return new h$(new k$(t,e),new C$(t,e,!0,!0))},m$.$metadata$={kind:p,simpleName:"Glyphs",interfaces:[]};var $$=null;function y$(){return null===$$&&new m$,$$}function g$(){}function v$(t,e){O$.call(this);var n=e/2,i=t.x-n,o=t.y-n,r=Ft.SvgSlimElements.line_6y0v78$(0+i,n+o,e+i,n+o),a=Ft.SvgSlimElements.line_6y0v78$(n+i,0+o,n+i,e+o);this.setShapes_0(r,a)}function b$(){this.myShape_tmqwxg$_0=null}function w$(t,e){return e=e||Object.create(b$.prototype),b$.call(e),e.myShape_tmqwxg$_0=t,e}function x$(t,e,n){return n=n||Object.create(b$.prototype),b$.call(n),n.myShape_tmqwxg$_0=n.createShape_e1sv3v$(t,e),n}function k$(t,e){x$(t,e,this)}function C$(t,e,n,i){T$(),void 0===i&&(i=!1),w$(T$().createTriangleShape_0(t,e,n,i),this)}function E$(){S$=this;var t=Yt.PI/3;this.SIDE_TO_HEIGHT_RATIO_0=Lt.sin(t),this.VERTICAL_OFFSET_RATIO_0=1/12}g$.prototype.update_0=function(t,e,n,i,o,r){null!=t&&t.setFill_o14uds$(e,n),null!=t&&t.setStroke_o14uds$(i,o),null!=t&&t.setStrokeWidth_14dthe$(r)},g$.$metadata$={kind:h,simpleName:"MultiShapeGlyph",interfaces:[p$]},v$.$metadata$={kind:h,simpleName:"PlusGlyph",interfaces:[O$]},b$.prototype.update_mjoany$=function(t,e,n,i,o){this.myShape_tmqwxg$_0.setFill_o14uds$(t,e),this.myShape_tmqwxg$_0.setStroke_o14uds$(n,i),this.myShape_tmqwxg$_0.setStrokeWidth_14dthe$(o)},b$.prototype.appendTo_i2myw1$=function(t){this.myShape_tmqwxg$_0.appendTo_i2myw1$(t)},b$.$metadata$={kind:h,simpleName:"SingletonGlyph",interfaces:[p$]},k$.prototype.createShape_e1sv3v$=function(t,e){return Ft.SvgSlimElements.rect_6y0v78$(t.x-e/2,t.y-e/2,e,e)},k$.$metadata$={kind:h,simpleName:"SquareGlyph",interfaces:[b$]},C$.prototype.createShape_e1sv3v$=function(t,e){throw V("Not applicable")},E$.prototype.createTriangleShape_0=function(t,e,n,i){var o,r,a=e/2,s=i?e:this.SIDE_TO_HEIGHT_RATIO_0*e,l=i?0:s*this.VERTICAL_OFFSET_RATIO_0,u=(e-s)/2;n?(u-=l,o=nt([a,e,0]),r=nt([0+u,s+u,s+u])):(u+=l,o=nt([0,e,a]),r=nt([0+u,0+u,s+u]));var c,p=t.x-a,h=t.y-a,_=f$(),d=o,f=U(F(d,10));for(c=d.iterator();c.hasNext();){var m=c.next();f.add_11rb$(m+p)}var $,y=r,g=U(F(y,10));for($=y.iterator();$.hasNext();){var v=$.next();g.add_11rb$(v+h)}var b=_.buildPathData_2a5262$(f,g);return Ft.SvgSlimElements.path_za3rmp$(b)},E$.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var S$=null;function T$(){return null===S$&&new E$,S$}function O$(){g$.call(this),this.myS1_0=null,this.myS2_0=null}function N$(){G$.call(this)}function P$(t){L$(),G$.call(this),this.myPath_0=null,this.myDashArray_0=null,this.myPath_0=re(t.build()),this.myPath_0.fill().set_11rb$(Se.NONE);this.myPath_0.strokeWidth().set_11rb$(1),this.add_26jijc$(this.myPath_0)}function I$(t){this.this$LinePath=t}function A$(t){this.this$LinePath=t}function R$(){j$=this,this.END_OF_SUBPATH=null}C$.$metadata$={kind:h,simpleName:"TriangleGlyph",interfaces:[b$]},O$.prototype.setShapes_0=function(t,e){this.myS1_0=t,this.myS2_0=e},O$.prototype.update_mjoany$=function(t,e,n,i,o){this.update_0(this.myS1_0,t,e,n,i,o),this.update_0(this.myS2_0,t,e,n,i,o)},O$.prototype.appendTo_i2myw1$=function(t){x(this.myS1_0).appendTo_i2myw1$(t),x(this.myS2_0).appendTo_i2myw1$(t)},O$.$metadata$={kind:h,simpleName:"TwoShapeGlyph",interfaces:[g$]},N$.prototype.buildComponent=function(){},N$.$metadata$={kind:h,simpleName:"GroupComponent",interfaces:[G$]},P$.prototype.buildComponent=function(){},P$.prototype.color=function(){return this.myPath_0.strokeColor()},P$.prototype.fill=function(){return this.myPath_0.fillColor()},I$.prototype.set_11rb$=function(t){this.this$LinePath.myPath_0.strokeWidth().set_11rb$(t),this.this$LinePath.updatePathDashArray_0()},I$.$metadata$={kind:h,interfaces:[Ee]},P$.prototype.width=function(){return new I$(this)},A$.prototype.set_11rb$=function(t){this.this$LinePath.myDashArray_0=z(t),this.this$LinePath.updatePathDashArray_0()},A$.$metadata$={kind:h,interfaces:[Ee]},P$.prototype.dashArray=function(){return new A$(this)},P$.prototype.updatePathDashArray_0=function(){if(null!=this.myDashArray_0&&!x(this.myDashArray_0).isEmpty()){var t=this.myPath_0.strokeWidth().get(),e=null!=t?t:1;H$().apply_3xqz7j$(this.myPath_0,e,x(this.myDashArray_0))}},R$.prototype.line_qdtdbw$=function(t){return new P$(this.pathBuilder_0(t,!1))},R$.prototype.polygon_yh26e7$=function(t){return new P$(this.pathBuilder_0(t,!0))},R$.prototype.pathBuilder_0=function(t,e){var n,i=new jt(!0),o=c();for(n=t.iterator();n.hasNext();){var r=n.next();r===this.END_OF_SUBPATH?(this.buildSegment_0(i,o,false),e&&i.closePath(),o=c()):o.add_11rb$(x(r))}return this.buildSegment_0(i,o,false),e&&i.closePath(),i},R$.prototype.buildSegment_0=function(t,e,n){e.isEmpty()||(t.moveTo_gpjtzr$(e.get_za3lpa$(0)),t.interpolatePoints_1ravjc$(e,n?Ce.CARDINAL:Ce.LINEAR))},R$.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var j$=null;function L$(){return null===j$&&new R$,j$}function z$(t){F$(),G$.call(this),this.text=t;var e,n=F$().splitLines_61zpoe$(this.text),i=U(F(n,10));for(e=n.iterator();e.hasNext();){var o=e.next();i.add_11rb$(Ne(o))}this.myLines_0=i,this.myTextColor_0=null,this.myFontSize_0=0,this.myFontWeight_0=null,this.myFontFamily_0=null,this.myFontStyle_0=null,this.myLineHeight_0=0;var r,a=this.myLines_0,s=E("add",function(t,e){return t.add_11rb$(e)}.bind(null,this.rootGroup.children()));for(r=a.iterator();r.hasNext();)s(r.next())}function D$(t){this.this$MultilineLabel=t}function M$(){B$=this}P$.$metadata$={kind:h,simpleName:"LinePath",interfaces:[G$]},z$.prototype.buildComponent=function(){},z$.prototype.addClassName_61zpoe$=function(t){var e;for(e=this.myLines_0.iterator();e.hasNext();)e.next().addClass_61zpoe$(t)},D$.prototype.set_11rb$=function(t){var e;for(e=this.this$MultilineLabel.myLines_0.iterator();e.hasNext();)e.next().fillColor();this.this$MultilineLabel.myTextColor_0=t,this.this$MultilineLabel.updateStyleAttribute_0()},D$.$metadata$={kind:h,interfaces:[Ee]},z$.prototype.textColor=function(){return new D$(this)},z$.prototype.setHorizontalAnchor_mf4siq$=function(t){var e;for(e=this.myLines_0.iterator();e.hasNext();)e.next().setAttribute_jyasbz$(dt.SvgConstants.SVG_TEXT_ANCHOR_ATTRIBUTE,gy().toTextAnchor_eiqnj5$(t))},z$.prototype.setFontSize_14dthe$=function(t){this.myFontSize_0=t,this.updateStyleAttribute_0()},z$.prototype.setFontWeight_pdl1vj$=function(t){this.myFontWeight_0=t,this.updateStyleAttribute_0()},z$.prototype.setFontStyle_pdl1vj$=function(t){this.myFontStyle_0=t,this.updateStyleAttribute_0()},z$.prototype.setFontFamily_pdl1vj$=function(t){this.myFontFamily_0=t,this.updateStyleAttribute_0()},z$.prototype.setTextOpacity_yrwdxb$=function(t){var e;for(e=this.myLines_0.iterator();e.hasNext();)e.next().fillOpacity().set_11rb$(t)},z$.prototype.updateStyleAttribute_0=function(){var t,e=gy().buildStyle_xqk9oc$(this.myTextColor_0,this.myFontSize_0,this.myFontWeight_0,this.myFontFamily_0,this.myFontStyle_0);for(t=this.myLines_0.iterator();t.hasNext();)t.next().setAttribute_jyasbz$(dt.SvgConstants.SVG_STYLE_ATTRIBUTE,e)},z$.prototype.setX_14dthe$=function(t){var e;for(e=this.myLines_0.iterator();e.hasNext();)e.next().x().set_11rb$(t)},z$.prototype.setY_14dthe$=function(t){this.updatePositions_0(t)},z$.prototype.setLineHeight_14dthe$=function(t){var e,n,i;this.myLineHeight_0=t;var o=null!=(i=null!=(n=null!=(e=Te(this.myLines_0))?e.y():null)?n.get():null)?i:0;this.updatePositions_0(o)},z$.prototype.updatePositions_0=function(t){var e,n,i=0;for(e=this.myLines_0.iterator();e.hasNext();){var o=e.next(),r=tt((i=(n=i)+1|0,n));o.y().set_11rb$(t+this.myLineHeight_0*r)}},z$.prototype.linesCount=function(){return this.myLines_0.size},M$.prototype.splitLines_61zpoe$=function(t){var n,i=Oe(t,e.charArrayOf(10)),o=U(F(i,10));for(n=i.iterator();n.hasNext();){var r,a=n.next();o.add_11rb$(Pe(e.isCharSequence(r=a)?r:s()).toString())}return o},M$.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var B$=null;function F$(){return null===B$&&new M$,B$}function U$(){q$=this}z$.$metadata$={kind:h,simpleName:"MultilineLabel",interfaces:[G$]},U$.prototype.apply_3xqz7j$=function(t,e,n){var i,o=y();for(i=n.iterator();i.hasNext();){var r=i.next()*e;o.length>0&&o.append_s8itvh$(44),o.append_pdl1vj$(r.toString())}t.getAttribute_61zpoe$(dt.SvgConstants.SVG_STROKE_DASHARRAY_ATTRIBUTE).set_11rb$(o.toString())},U$.$metadata$={kind:p,simpleName:"StrokeDashArraySupport",interfaces:[]};var q$=null;function H$(){return null===q$&&new U$,q$}function G$(){W$(),this.myIsBuilt_hfl4wb$_0=!1,this.myIsBuilding_wftuqx$_0=!1,this.myRootGroup_34n42m$_0=new Bt,this.myChildComponents_jx3u37$_0=c(),this.myOrigin_c2o9zl$_0=mt.Companion.ZERO,this.myRotationAngle_woxwye$_0=0,this.myCompositeRegistration_t8l21t$_0=new Ae([])}function K$(t){this.this$SvgComponent=t}function V$(){Y$=this,this.CLIP_PATH_ID_PREFIX="c"}Object.defineProperty(G$.prototype,"childComponents",{configurable:!0,get:function(){if(!this.myIsBuilt_hfl4wb$_0)throw u("Plot has not yet built".toString());return z(this.myChildComponents_jx3u37$_0)}}),Object.defineProperty(G$.prototype,"rootGroup",{configurable:!0,get:function(){return this.ensureBuilt(),this.myRootGroup_34n42m$_0}}),G$.prototype.ensureBuilt=function(){this.myIsBuilt_hfl4wb$_0||this.myIsBuilding_wftuqx$_0||this.buildComponentIntern_92lbvk$_0()},G$.prototype.buildComponentIntern_92lbvk$_0=function(){try{this.myIsBuilding_wftuqx$_0=!0,this.buildComponent()}finally{this.myIsBuilding_wftuqx$_0=!1,this.myIsBuilt_hfl4wb$_0=!0}},K$.prototype.onEvent_11rb$=function(t){this.this$SvgComponent.needRebuild()},K$.$metadata$={kind:h,interfaces:[Ie]},G$.prototype.rebuildHandler_287e2$=function(){return new K$(this)},G$.prototype.needRebuild=function(){this.myIsBuilt_hfl4wb$_0&&(this.clear(),this.buildComponentIntern_92lbvk$_0())},G$.prototype.reg_3xv6fb$=function(t){this.myCompositeRegistration_t8l21t$_0.add_3xv6fb$(t)},G$.prototype.clear=function(){var t;for(this.myIsBuilt_hfl4wb$_0=!1,t=this.myChildComponents_jx3u37$_0.iterator();t.hasNext();)t.next().clear();this.myChildComponents_jx3u37$_0.clear(),this.myRootGroup_34n42m$_0.children().clear(),this.myCompositeRegistration_t8l21t$_0.remove(),this.myCompositeRegistration_t8l21t$_0=new Ae([])},G$.prototype.add_8icvvv$=function(t){this.myChildComponents_jx3u37$_0.add_11rb$(t),this.add_26jijc$(t.rootGroup)},G$.prototype.add_26jijc$=function(t){this.myRootGroup_34n42m$_0.children().add_11rb$(t)},G$.prototype.moveTo_gpjtzr$=function(t){this.myOrigin_c2o9zl$_0=t,this.myRootGroup_34n42m$_0.transform().set_11rb$(W$().buildTransform_e1sv3v$(this.myOrigin_c2o9zl$_0,this.myRotationAngle_woxwye$_0))},G$.prototype.moveTo_lu1900$=function(t,e){this.moveTo_gpjtzr$(new mt(t,e))},G$.prototype.rotate_14dthe$=function(t){this.myRotationAngle_woxwye$_0=t,this.myRootGroup_34n42m$_0.transform().set_11rb$(W$().buildTransform_e1sv3v$(this.myOrigin_c2o9zl$_0,this.myRotationAngle_woxwye$_0))},G$.prototype.toRelativeCoordinates_gpjtzr$=function(t){return this.rootGroup.pointToTransformedCoordinates_gpjtzr$(t)},G$.prototype.toAbsoluteCoordinates_gpjtzr$=function(t){return this.rootGroup.pointToAbsoluteCoordinates_gpjtzr$(t)},G$.prototype.clipBounds_wthzt5$=function(t){var e=new Re;e.id().set_11rb$(ay().get_61zpoe$(W$().CLIP_PATH_ID_PREFIX));var n=e.children(),i=new je;i.x().set_11rb$(t.left),i.y().set_11rb$(t.top),i.width().set_11rb$(t.width),i.height().set_11rb$(t.height),n.add_11rb$(i);var o=e,r=new Le;r.children().add_11rb$(o);var a=r;this.add_26jijc$(a),this.rootGroup.clipPath().set_11rb$(new ze(x(o.id().get()))),this.rootGroup.setAttribute_qdh7ux$(De.Companion.CLIP_BOUNDS_JFX,t)},G$.prototype.addClassName_61zpoe$=function(t){this.myRootGroup_34n42m$_0.addClass_61zpoe$(t)},V$.prototype.buildTransform_e1sv3v$=function(t,e){var n=new Me;return null!=t&&t.equals(mt.Companion.ZERO)||n.translate_lu1900$(t.x,t.y),0!==e&&n.rotate_14dthe$(e),n.build()},V$.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var Y$=null;function W$(){return null===Y$&&new V$,Y$}function X$(){ry=this,this.suffixGen_0=J$}function Z$(){this.nextIndex_0=0}function J$(){return Ge.RandomString.randomString_za3lpa$(6)}G$.$metadata$={kind:h,simpleName:"SvgComponent",interfaces:[]},X$.prototype.setUpForTest=function(){var t,e=new Z$;this.suffixGen_0=(t=e,function(){return t.next()})},X$.prototype.get_61zpoe$=function(t){var e,n=Fe(new Be(97,122),new Be(65,90));if(!(t.length>0))throw u("ID prefix should not be empty".toString());if(!n.contains_11rb$(qe(Ue(t))))throw u("ID should start with a letter".toString());t:do{var i;for(i=Ke(t);i.hasNext();){var o=He(i.next()),r=qe(o);if(!P(n,new Be(48,57)).contains_11rb$(r)&&45!==He(r)&&95!==He(r)){e=!1;break t}}e=!0}while(0);if(!e)throw u("ID prefix can contain only the characters [a-zA-Z0-9], the hyphen (-) and the underscore (_)".toString());return t+this.suffixGen_0().toString()},Z$.prototype.next=function(){var t;return"clip-"+(t=this.nextIndex_0,this.nextIndex_0=t+1|0,t)},Z$.$metadata$={kind:h,simpleName:"IncrementalId",interfaces:[]},X$.$metadata$={kind:p,simpleName:"SvgUID",interfaces:[]};var Q$,ty,ey,ny,iy,oy,ry=null;function ay(){return null===ry&&new X$,ry}function sy(){yy=this}function ly(t,e){j.call(this),this.name$=t,this.ordinal$=e}function uy(){uy=function(){},Q$=new ly("LEFT",0),ty=new ly("RIGHT",1),ey=new ly("MIDDLE",2)}function cy(){return uy(),Q$}function py(){return uy(),ty}function hy(){return uy(),ey}function _y(t,e){j.call(this),this.name$=t,this.ordinal$=e}function dy(){dy=function(){},ny=new _y("TOP",0),iy=new _y("BOTTOM",1),oy=new _y("CENTER",2)}function fy(){return dy(),ny}function my(){return dy(),iy}function $y(){return dy(),oy}ly.$metadata$={kind:h,simpleName:"HorizontalAnchor",interfaces:[j]},ly.values=function(){return[cy(),py(),hy()]},ly.valueOf_61zpoe$=function(t){switch(t){case"LEFT":return cy();case"RIGHT":return py();case"MIDDLE":return hy();default:L("No enum constant jetbrains.datalore.plot.base.render.svg.Text.HorizontalAnchor."+t)}},_y.$metadata$={kind:h,simpleName:"VerticalAnchor",interfaces:[j]},_y.values=function(){return[fy(),my(),$y()]},_y.valueOf_61zpoe$=function(t){switch(t){case"TOP":return fy();case"BOTTOM":return my();case"CENTER":return $y();default:L("No enum constant jetbrains.datalore.plot.base.render.svg.Text.VerticalAnchor."+t)}},sy.prototype.toTextAnchor_eiqnj5$=function(t){var n;switch(t.name){case"LEFT":n=null;break;case"MIDDLE":n=dt.SvgConstants.SVG_TEXT_ANCHOR_MIDDLE;break;case"RIGHT":n=dt.SvgConstants.SVG_TEXT_ANCHOR_END;break;default:n=e.noWhenBranchMatched()}return n},sy.prototype.toDominantBaseline_1kyaur$=function(t){var n;switch(t.name){case"TOP":n="hanging";break;case"CENTER":n="central";break;case"BOTTOM":n=null;break;default:n=e.noWhenBranchMatched()}return n},sy.prototype.toDY_1kyaur$=function(t){var n;switch(t.name){case"TOP":n=dt.SvgConstants.SVG_TEXT_DY_TOP;break;case"CENTER":n=dt.SvgConstants.SVG_TEXT_DY_CENTER;break;case"BOTTOM":n=null;break;default:n=e.noWhenBranchMatched()}return n},sy.prototype.buildStyle_xqk9oc$=function(t,e,n,i,o){void 0===t&&(t=null),void 0===e&&(e=null),void 0===n&&(n=null),void 0===i&&(i=null),void 0===o&&(o=null);var r=y();if(null!=t&&r.append_pdl1vj$("fill:").append_pdl1vj$(t.toHexColor()).append_s8itvh$(59),null!=e&&e>0&&null!=i){var a=y();null!=o&&0!==o.length&&a.append_pdl1vj$(o).append_s8itvh$(32),null!=n&&0!==n.length&&a.append_pdl1vj$(n).append_s8itvh$(32),a.append_s8jyv4$(e).append_pdl1vj$("px "),a.append_pdl1vj$(i).append_pdl1vj$(";"),r.append_pdl1vj$("font:").append_gw00v9$(a)}else null==o||xt(o)||r.append_pdl1vj$("font-style:").append_pdl1vj$(o).append_s8itvh$(59),null!=n&&0!==n.length&&r.append_pdl1vj$("font-weight:").append_pdl1vj$(n).append_s8itvh$(59),null!=e&&e>0&&r.append_pdl1vj$("font-size:").append_s8jyv4$(e).append_pdl1vj$("px;"),null!=i&&0!==i.length&&r.append_pdl1vj$("font-family:").append_pdl1vj$(i).append_s8itvh$(59);return r.toString()},sy.$metadata$={kind:p,simpleName:"Text",interfaces:[]};var yy=null;function gy(){return null===yy&&new sy,yy}function vy(t){G$.call(this),this.myText_0=Ne(t),this.myTextColor_0=null,this.myFontSize_0=0,this.myFontWeight_0=null,this.myFontFamily_0=null,this.myFontStyle_0=null,this.rootGroup.children().add_11rb$(this.myText_0)}function by(t){this.this$TextLabel=t}function wy(){this.definedBreaks_0=null,this.definedLabels_0=null,this.name_iafnnl$_0=null,this.multiplicativeExpand_lxi716$_0=0,this.additiveExpand_59ok4k$_0=0,this.labelFormatter_tb2f2k$_0=null}function xy(t){return t.toString()}function ky(t){this.myName_8be2vx$=t.name,this.myBreaks_8be2vx$=t.definedBreaks_0,this.myLabels_8be2vx$=t.definedLabels_0,this.myLabelFormatter_8be2vx$=t.labelFormatter,this.myMultiplicativeExpand_8be2vx$=t.multiplicativeExpand,this.myAdditiveExpand_8be2vx$=t.additiveExpand}function Cy(t,e,n){return void 0===e&&(e=null),n=n||Object.create(wy.prototype),wy.call(n),n.name_iafnnl$_0=t,n.definedBreaks_0=e,n.definedLabels_0=null,n.labelFormatter_tb2f2k$_0=null,n}function Ey(t,e){return e=e||Object.create(wy.prototype),wy.call(e),e.name_iafnnl$_0=t.myName_8be2vx$,e.definedBreaks_0=t.myBreaks_8be2vx$,e.definedLabels_0=t.myLabels_8be2vx$,e.labelFormatter_tb2f2k$_0=t.myLabelFormatter_8be2vx$,e.multiplicativeExpand=t.myMultiplicativeExpand_8be2vx$,e.additiveExpand=t.myAdditiveExpand_8be2vx$,e}function Sy(){}function Ty(){this.continuousTransform_0=null,this.customBreaksGenerator_0=null,this.isContinuous_r02bms$_0=!1,this.isContinuousDomain_cs93sw$_0=!0}function Oy(t){ky.call(this,t),this.myContinuousTransform=t.continuousTransform_0,this.myCustomBreaksGenerator=t.customBreaksGenerator_0,this.myContinuousOutput=t.isContinuous}function Ny(t,e,n){return Cy(t,void 0,n=n||Object.create(Ty.prototype)),Ty.call(n),n.isContinuous_r02bms$_0=e,n.continuousTransform_0=Jg().IDENTITY,n.customBreaksGenerator_0=null,n.multiplicativeExpand=.05,n.additiveExpand=0,n}function Py(){this.discreteTransform_0=null,this.isContinuous_x06152$_0=!1,this.isContinuousDomain_nnfxw6$_0=!1}function Iy(t){ky.call(this,t),this.discreteTransform_8be2vx$=t.discreteTransform_0}function Ay(t,e,n){return Cy(t,null,n=n||Object.create(Py.prototype)),Py.call(n),n.discreteTransform_0=e,n.multiplicativeExpand=0,n.additiveExpand=.2,n}function Ry(){jy=this}vy.prototype.buildComponent=function(){},vy.prototype.addClassName_61zpoe$=function(t){this.myText_0.addClass_61zpoe$(t)},by.prototype.set_11rb$=function(t){this.this$TextLabel.myText_0.fillColor(),this.this$TextLabel.myTextColor_0=t,this.this$TextLabel.updateStyleAttribute_0()},by.$metadata$={kind:h,interfaces:[Ee]},vy.prototype.textColor=function(){return new by(this)},vy.prototype.textOpacity=function(){return this.myText_0.fillOpacity()},vy.prototype.x=function(){return this.myText_0.x()},vy.prototype.y=function(){return this.myText_0.y()},vy.prototype.setHorizontalAnchor_mf4siq$=function(t){this.myText_0.setAttribute_jyasbz$(dt.SvgConstants.SVG_TEXT_ANCHOR_ATTRIBUTE,gy().toTextAnchor_eiqnj5$(t))},vy.prototype.setVerticalAnchor_yaylw0$=function(t){this.myText_0.setAttribute_jyasbz$(dt.SvgConstants.SVG_TEXT_DY_ATTRIBUTE,gy().toDY_1kyaur$(t))},vy.prototype.setFontSize_14dthe$=function(t){this.myFontSize_0=t,this.updateStyleAttribute_0()},vy.prototype.setFontWeight_pdl1vj$=function(t){this.myFontWeight_0=t,this.updateStyleAttribute_0()},vy.prototype.setFontStyle_pdl1vj$=function(t){this.myFontStyle_0=t,this.updateStyleAttribute_0()},vy.prototype.setFontFamily_pdl1vj$=function(t){this.myFontFamily_0=t,this.updateStyleAttribute_0()},vy.prototype.updateStyleAttribute_0=function(){var t=gy().buildStyle_xqk9oc$(this.myTextColor_0,this.myFontSize_0,this.myFontWeight_0,this.myFontFamily_0,this.myFontStyle_0);this.myText_0.setAttribute_jyasbz$(dt.SvgConstants.SVG_STYLE_ATTRIBUTE,t)},vy.$metadata$={kind:h,simpleName:"TextLabel",interfaces:[G$]},Object.defineProperty(wy.prototype,"name",{configurable:!0,get:function(){return this.name_iafnnl$_0}}),Object.defineProperty(wy.prototype,"multiplicativeExpand",{configurable:!0,get:function(){return this.multiplicativeExpand_lxi716$_0},set:function(t){this.multiplicativeExpand_lxi716$_0=t}}),Object.defineProperty(wy.prototype,"additiveExpand",{configurable:!0,get:function(){return this.additiveExpand_59ok4k$_0},set:function(t){this.additiveExpand_59ok4k$_0=t}}),Object.defineProperty(wy.prototype,"labelFormatter",{configurable:!0,get:function(){return this.labelFormatter_tb2f2k$_0}}),wy.prototype.hasBreaks=function(){return null!=this.definedBreaks_0},wy.prototype.hasDefinedBreaks_0=function(){return null!=this.definedBreaks_0},wy.prototype.getBreaksIntern=function(){if(null==this.definedBreaks_0){var t="No breaks defined for scale "+this.name;throw V(t.toString())}return this.definedBreaks_0},wy.prototype.getLabelsIntern=function(){if(null==this.definedLabels_0){var t="No labels defined for scale "+this.name;throw V(t.toString())}return this.definedLabels_0},wy.prototype.getScaleBreaks=function(){var t,n,i;if(!this.hasBreaks())return Zy().EMPTY;var o,r,l=this.getBreaksIntern(),u=this.getLabels_0(l),p=this.transform.unwrap(),h=tg().applyTransform_uc4x6i$(l,p),_=U(F(h,10)),d=0;for(o=h.iterator();o.hasNext();){var f=o.next(),m=_.add_11rb$,$=tt((d=(r=d)+1|0,r));m.call(_,null==f?null:$)}var y,g,v=I(Ve(_)),b=c(),w=0;for(y=l.iterator();y.hasNext();){var x=y.next();v.contains_11rb$(tt((w=(g=w)+1|0,g)))&&b.add_11rb$(x)}n=e.isType(t=b,a)?t:s(),i=Ve(h);var k,C,E=c(),S=0;for(k=u.iterator();k.hasNext();){var T=k.next();v.contains_11rb$(tt((S=(C=S)+1|0,C)))&&E.add_11rb$(T)}return new Yy(n,i,E)},wy.prototype.getLabels_0=function(t){var n,i;if(null!=this.definedLabels_0){var o=this.getLabelsIntern();if(o.isEmpty()){for(var r=t.size,a=U(r),l=0;l0))throw u(("'count' must be positive: "+n).toString());var i=e-t,o=!1;i<0&&(i=-i,o=!0),this.span=i,this.targetStep=this.span/n,this.isReversed=o,this.normalStart=o?e:t,this.normalEnd=o?t:e}function ag(t,e,n,i){var o;void 0===i&&(i=null),rg.call(this,t,e,n),this.breaks_n95hiz$_0=null,this.formatter=null;var r=this.targetStep;if(r<1e3)this.formatter=new gg(i).getFormatter_14dthe$(r),this.breaks_n95hiz$_0=new sg(t,e,n).breaks;else{var a=this.normalStart,s=this.normalEnd,l=null;if(null!=i&&(l=me(i.range_lu1900$(a,s))),null!=l&&l.size<=n)this.formatter=x(i).tickFormatter;else if(r>Ye.Companion.MS){this.formatter=Ye.Companion.TICK_FORMATTER,l=c();var u=We.TimeUtil.asDateTimeUTC_14dthe$(a),p=u.year;for(u.isAfter_amwj4p$(We.TimeUtil.yearStart_za3lpa$(p))&&(p=p+1|0),o=new sg(p,We.TimeUtil.asDateTimeUTC_14dthe$(s).year,n).breaks.iterator();o.hasNext();){var h=o.next(),_=We.TimeUtil.yearStart_za3lpa$(Rt(ne(h)));l.add_11rb$(We.TimeUtil.asInstantUTC_amwj4p$(_).toNumber())}}else{var d=Xe.NiceTimeInterval.forMillis_14dthe$(r);this.formatter=d.tickFormatter,l=me(d.range_lu1900$(a,s))}this.isReversed&&Nt(l),this.breaks_n95hiz$_0=l}}function sg(t,e,n,i){var o,r;if(cg(),void 0===i&&(i=!1),rg.call(this,t,e,n),this.breaks_egvm9d$_0=null,!(n>0))throw V(("Can't compute breaks for count: "+n).toString());var a=i?this.targetStep:cg().computeNiceStep_0(this.span,n);if(w.SeriesUtil.isBeyondPrecision_lu1900$(this.normalStart,a)||w.SeriesUtil.isBeyondPrecision_lu1900$(this.normalEnd,a))o=Pt();else if(i){var s,l=Ze(0,n),u=U(F(l,10));for(s=l.iterator();s.hasNext();){var c=s.next();u.add_11rb$(this.normalStart+a/2+c*a)}o=u}else o=cg().computeNiceBreaks_0(this.normalStart,this.normalEnd,a);var p=o;r=p.isEmpty()?Xt(this.normalStart):this.isReversed?St(p):p,this.breaks_egvm9d$_0=r}function lg(){ug=this}rg.$metadata$={kind:h,simpleName:"BreaksHelperBase",interfaces:[]},Object.defineProperty(ag.prototype,"breaks",{configurable:!0,get:function(){return this.breaks_n95hiz$_0}}),ag.$metadata$={kind:h,simpleName:"DateTimeBreaksHelper",interfaces:[rg]},Object.defineProperty(sg.prototype,"breaks",{configurable:!0,get:function(){return this.breaks_egvm9d$_0}}),lg.prototype.computeNiceStep_0=function(t,e){var n=Je(t/e),i=Lt.floor(n),o=Lt.pow(10,i),r=o*e/t;return r<=.15?10*o:r<=.35?5*o:r<=.75?2*o:o},lg.prototype.computeNiceBreaks_0=function(t,e,n){if(0===n)return Pt();var i=n/1e4,o=t-i,r=e+i,a=c(),s=o/n,l=Lt.ceil(s)*n;for(t>=0&&o<0&&(l=0);l<=r;){var u=l;l=Lt.min(u,e),a.add_11rb$(l),l+=n}return a},lg.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var ug=null;function cg(){return null===ug&&new lg,ug}function pg(t,e,n){this.formatter_0=null;var i=0===t?10*rt.MIN_VALUE:Lt.abs(t),o=0===e?i/10:Lt.abs(e),r="f",a="",s=Je(Lt.abs(i)),l=Je(o),u=-l,c=!1;s<0&&l<-4?(c=!0,r="e",u=s-l):s>7&&l>2&&(c=!0,u=s-l),u<0&&(u=0,r="d");var p=u-.001;u=Lt.ceil(p),c?r=s>0&&n?"s":"e":a=",",this.formatter_0=Qe(a+"."+Rt(u)+r)}function hg(){this.myHasDomain_0=!1,this.myDomainStart_0=0,this.myDomainEnd_0=0,this.myOutputValues_9bxfi2$_0=this.myOutputValues_9bxfi2$_0}function _g(){dg=this}sg.$metadata$={kind:h,simpleName:"LinearBreaksHelper",interfaces:[rg]},pg.prototype.apply_za3rmp$=function(t){var n;return this.formatter_0.apply_3p81yu$(e.isNumber(n=t)?n:s())},pg.$metadata$={kind:h,simpleName:"NumericBreakFormatter",interfaces:[]},Object.defineProperty(hg.prototype,"myOutputValues_0",{configurable:!0,get:function(){return null==this.myOutputValues_9bxfi2$_0?Kt("myOutputValues"):this.myOutputValues_9bxfi2$_0},set:function(t){this.myOutputValues_9bxfi2$_0=t}}),Object.defineProperty(hg.prototype,"outputValues",{configurable:!0,get:function(){return this.myOutputValues_0}}),Object.defineProperty(hg.prototype,"domainQuantized",{configurable:!0,get:function(){var t;if(this.myDomainStart_0===this.myDomainEnd_0)return Xt(new lt(this.myDomainStart_0,this.myDomainEnd_0));var e=c(),n=this.myOutputValues_0.size,i=this.bucketSize_0();t=n-1|0;for(var o=0;o "+e).toString());return this.myHasDomain_0=!0,this.myDomainStart_0=t,this.myDomainEnd_0=e,this},hg.prototype.range_brywnq$=function(t){return this.myOutputValues_0=z(t),this},hg.prototype.quantize_14dthe$=function(t){var e=this.outputIndex_0(t);return this.myOutputValues_0.get_za3lpa$(e)},hg.prototype.outputIndex_0=function(t){if(!this.myHasDomain_0)throw V("Domain not defined.".toString());var e=null!=this.myOutputValues_9bxfi2$_0;if(e&&(e=!this.myOutputValues_0.isEmpty()),!e)throw V("Output values are not defined.".toString());var n=this.bucketSize_0(),i=Rt((t-this.myDomainStart_0)/n),o=this.myOutputValues_0.size-1|0,r=Lt.min(o,i);return Lt.max(0,r)},hg.prototype.getOutputValueIndex_za3rmp$=function(t){return e.isNumber(t)?this.outputIndex_0(f(t)):-1},hg.prototype.getOutputValue_za3rmp$=function(t){return e.isNumber(t)?this.quantize_14dthe$(f(t)):null},hg.prototype.bucketSize_0=function(){return(this.myDomainEnd_0-this.myDomainStart_0)/this.myOutputValues_0.size},hg.$metadata$={kind:h,simpleName:"QuantizeScale",interfaces:[vg]},_g.prototype.withBreaks_ssmbt$=function(t,e,n){var i=t.getBreaksGenerator().generateBreaks_f140j5$(e,n),o=i.domainValues,r=i.labels;return t.with().breaks_pqjuzw$(o).labels_mhpeer$(r).build()},_g.$metadata$={kind:p,simpleName:"ScaleBreaksUtil",interfaces:[]};var dg=null;function fg(t,n,i){var o,r;yg(),rg.call(this,t,n,i),this.breaks_k28v1z$_0=null,this.formatter=null;var a,l=this.targetStep<1e3?new sg(t,n,i).breaks:this.computeNiceTicks_0();r=!0===(o=this.isReversed)?N(l):!1===o?l:e.noWhenBranchMatched(),this.breaks_k28v1z$_0=r,this.formatter=(a=this,function(t){var n,i;return i=an(e.isNumber(n=t)?n:s()),a.formatString_0(i)})}function mg(){$g=this,this.dayFormat_0=this.newStringFormat_0("{d}d"),this.hmsFormat_0=this.newStringFormat_0("{d}:{02d}:{02d}"),this.hmFormat_0=this.newStringFormat_0("{d}:{02d}")}Object.defineProperty(fg.prototype,"breaks",{configurable:!0,get:function(){return this.breaks_k28v1z$_0}}),fg.prototype.formatBreaks_d3e2cz$=function(t){var n;if(this.targetStep<1e3){var i,o=this.formatter,r=U(F(t,10));for(i=t.iterator();i.hasNext();){var a=i.next();r.add_11rb$(o(a))}n=r}else{var s;t:do{var u;if(e.isType(t,b)&&t.isEmpty()){s=!0;break t}for(u=t.iterator();u.hasNext();){var c=u.next();if(!(c>=tn.Companion.DAY.duration.toNumber()||l(tn.Companion.get_second_2vr8y7$(new tn(e.Long.fromNumber(c))),en))){s=!1;break t}}s=!0}while(0);var p,h=s,_=U(F(t,10));for(p=t.iterator();p.hasNext();){var d=p.next();_.add_11rb$(this.formatString_0(e.Long.fromNumber(d),h))}n=_}return n},fg.prototype.formatString_0=function(t,n){var i,o;if(void 0===n&&(n=!1),l(t,en))return"0";var r=new tn(nn(t)),a=c();tn.Companion.get_totalDays_2vr8y7$(r).toNumber()>0&&a.add_11rb$(yg().formatTotalDays_0(r));var s=y();if(n)(tn.Companion.get_hour_2vr8y7$(r).toNumber()>0||tn.Companion.get_minute_2vr8y7$(r).toNumber()>0)&&s.append_pdl1vj$(yg().formatHm_0(r));else if((tn.Companion.get_hour_2vr8y7$(r).toNumber()>0||tn.Companion.get_minute_2vr8y7$(r).toNumber()>0||tn.Companion.get_second_2vr8y7$(r).toNumber()>0)&&s.append_pdl1vj$(yg().formatHms_0(r)),tn.Companion.get_millis_2vr8y7$(r).toNumber()>0){var u=this.span>tn.Companion.SECOND.duration.toNumber();u&&(u=0===s.length),u&&s.append_pdl1vj$(yg().formatHms_0(r)),s.length>0&&s.append_pdl1vj$("."),l(tn.Companion.get_millis_2vr8y7$(r).modulo(e.Long.fromInt(10)),en)&&l(tn.Companion.get_millis_2vr8y7$(r).modulo(e.Long.fromInt(100)),en)?s.append_s8jyv4$(tn.Companion.get_millis_2vr8y7$(r).div(e.Long.fromInt(100))):s.append_s8jyv4$(tn.Companion.get_millis_2vr8y7$(r))}var p=s.toString();null!=(i=xt(p)?null:p)&&E("add",function(t,e){return t.add_11rb$(e)}.bind(null,a))(i);var h=null!=(o=t.toNumber()<0?"-":null)?o:"";return ft(a," ",h)},fg.prototype.computeNiceTicks_0=function(){var t,n,i=nt([e.Long.fromInt(1).multiply(tn.Companion.SECOND.duration),e.Long.fromInt(5).multiply(tn.Companion.SECOND.duration),e.Long.fromInt(15).multiply(tn.Companion.SECOND.duration),e.Long.fromInt(30).multiply(tn.Companion.SECOND.duration),e.Long.fromInt(1).multiply(tn.Companion.MINUTE.duration),e.Long.fromInt(5).multiply(tn.Companion.MINUTE.duration),e.Long.fromInt(15).multiply(tn.Companion.MINUTE.duration),e.Long.fromInt(30).multiply(tn.Companion.MINUTE.duration),e.Long.fromInt(1).multiply(tn.Companion.HOUR.duration),e.Long.fromInt(3).multiply(tn.Companion.HOUR.duration),e.Long.fromInt(6).multiply(tn.Companion.HOUR.duration),e.Long.fromInt(12).multiply(tn.Companion.HOUR.duration),e.Long.fromInt(1).multiply(tn.Companion.DAY.duration),e.Long.fromInt(2).multiply(tn.Companion.DAY.duration),e.Long.fromInt(1).multiply(tn.Companion.WEEK.duration),e.Long.fromInt(4).multiply(tn.Companion.WEEK.duration),e.Long.fromInt(12).multiply(tn.Companion.WEEK.duration),e.Long.fromInt(48).multiply(tn.Companion.WEEK.duration)]);t:do{var o=i.iterator();if(!o.hasNext()){n=null;break t}var r=o.next();if(!o.hasNext()){n=r;break t}var a=nn(r.subtract(e.Long.fromNumber(this.targetStep)));do{var s=o.next(),l=nn(s.subtract(e.Long.fromNumber(this.targetStep)));e.compareTo(a,l)>0&&(r=s,a=l)}while(o.hasNext());n=r}while(0);for(var u=null!=(t=n)?t:tn.Companion.SECOND.duration,p=this.normalStart/u.toNumber(),h=Lt.ceil(p)*u.toNumber(),_=c();h<=this.normalEnd;)_.add_11rb$(h),h+=u;return _},mg.prototype.formatTotalDays_0=function(t){return this.apply_0(this.dayFormat_0,[tn.Companion.get_totalDays_2vr8y7$(t)])},mg.prototype.formatHms_0=function(t){return this.apply_0(this.hmsFormat_0,[tn.Companion.get_hour_2vr8y7$(t),tn.Companion.get_minute_2vr8y7$(t),tn.Companion.get_second_2vr8y7$(t)])},mg.prototype.formatHm_0=function(t){return this.apply_0(this.hmFormat_0,[tn.Companion.get_hour_2vr8y7$(t),tn.Companion.get_minute_2vr8y7$(t)])},mg.prototype.newStringFormat_0=function(t){return on.Companion.forNArgs_zeh6sj$(t,-1)},mg.prototype.apply_0=function(t,e){return t.format_pqjuzw$(rn(e))},mg.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var $g=null;function yg(){return null===$g&&new mg,$g}function gg(t){this.minInterval_0=t}function vg(){}function bg(t,n,i){if(void 0===n&&(n=null),void 0===i&&(i=null),this.actual_0=t,this.lowerLimit_0=n,this.upperLimit_0=i,null==this.lowerLimit_0&&null==this.upperLimit_0)throw V("Continuous transform: undefined limit.".toString());if(null!=this.lowerLimit_0){if(!k(this.lowerLimit_0)){var o="Continuous transform lower limit: "+Y(this.lowerLimit_0)+".";throw V(o.toString())}if(!this.actual_0.isInDomain_yrwdxb$(this.lowerLimit_0)){var r="Lower limit: "+Y(this.lowerLimit_0)+" is outside of "+Y(e.getKClassFromExpression(this.actual_0).simpleName)+" domain.";throw V(r.toString())}}if(null!=this.upperLimit_0){if(!k(this.upperLimit_0)){var a="Continuous transform upper limit: "+Y(this.upperLimit_0);throw V(a.toString())}if(!this.actual_0.isInDomain_yrwdxb$(this.upperLimit_0)){var s="Upper limit: "+Y(this.upperLimit_0)+" is outside of "+Y(e.getKClassFromExpression(this.actual_0).simpleName)+" domain.";throw V(s.toString())}}if(!(null==this.lowerLimit_0||null==this.upperLimit_0||this.upperLimit_0>=this.lowerLimit_0)){var l="Continuous transform limits: lower ("+Y(this.lowerLimit_0)+") > upper ("+Y(this.upperLimit_0)+")";throw V(l.toString())}}function wg(t){void 0===t&&(t=null),this.labelFormatter_0=t}function xg(t,e){this.transformFun_vpw6mq$_0=t,this.inverseFun_2rsie$_0=e}function kg(){xg.call(this,Cg,Eg)}function Cg(t){return t}function Eg(t){return t}function Sg(t){Ng(),void 0===t&&(t=null),this.formatter_0=t}function Tg(){Og=this}fg.$metadata$={kind:h,simpleName:"TimeBreaksHelper",interfaces:[rg]},gg.prototype.getFormatter_14dthe$=function(t){return sn.Formatter.time_61zpoe$(this.formatPattern_0(t))},gg.prototype.formatPattern_0=function(t){if(t<1e3)return ln.Companion.milliseconds_za3lpa$(1).tickFormatPattern;if(null!=this.minInterval_0){var e=100*t;if(100>=this.minInterval_0.range_lu1900$(0,e).size)return this.minInterval_0.tickFormatPattern}return t>Ye.Companion.MS?Ye.Companion.TICK_FORMAT:Xe.NiceTimeInterval.forMillis_14dthe$(t).tickFormatPattern},gg.$metadata$={kind:h,simpleName:"TimeScaleTickFormatterFactory",interfaces:[]},vg.$metadata$={kind:d,simpleName:"WithFiniteOrderedOutput",interfaces:[]},bg.prototype.hasDomainLimits=function(){return!0},bg.prototype.isInDomain_yrwdxb$=function(t){return!(null==t||!k(t))&&!(null!=this.lowerLimit_0&&tthis.upperLimit_0)&&this.actual_0.isInDomain_yrwdxb$(t)},bg.prototype.apply_yrwdxb$=function(t){return this.actual_0.apply_yrwdxb$(t)},bg.prototype.apply_9ma18$=function(t){return this.actual_0.apply_9ma18$(t)},bg.prototype.applyInverse_yrwdxb$=function(t){return this.actual_0.applyInverse_yrwdxb$(t)},bg.prototype.applyInverse_k9kaly$=function(t){return this.actual_0.applyInverse_k9kaly$(t)},bg.prototype.createApplicableDomain_yrwdxb$$default=function(t){return this.actual_0.createApplicableDomain_yrwdxb$(t)},bg.prototype.toApplicableDomain_3lmjpf$=function(t){return this.actual_0.toApplicableDomain_3lmjpf$(t)},bg.prototype.unwrap=function(){return this.actual_0.unwrap()},bg.prototype.definedLimits=function(){return new pe(this.lowerLimit_0,this.upperLimit_0)},bg.$metadata$={kind:h,simpleName:"ContinuousTransformWithLimits",interfaces:[ni]},wg.prototype.generateBreaks_f140j5$=function(t,e){var n,i,o=this.breaksHelper_0(t,e),r=o.breaks,a=null!=(n=this.labelFormatter_0)?n:o.formatter,s=c();for(i=r.iterator();i.hasNext();){var l=i.next();s.add_11rb$(a(l))}return new Yy(r,r,s)},wg.prototype.breaksHelper_0=function(t,e){return new ag(t.lowerEnd,t.upperEnd,e)},wg.prototype.labelFormatter_f140j5$=function(t,e){var n;return null!=(n=this.labelFormatter_0)?n:this.defaultFormatter_f140j5$(t,e)},wg.prototype.defaultFormatter_f140j5$=function(t,e){return this.breaksHelper_0(t,e).formatter},wg.$metadata$={kind:h,simpleName:"DateTimeBreaksGen",interfaces:[Sy]},xg.prototype.apply_yrwdxb$=function(t){return null!=t?this.transformFun_vpw6mq$_0(t):null},xg.prototype.apply_9ma18$=function(t){var e,n=this.safeCastToDoubles_9ma18$(t),i=U(F(n,10));for(e=n.iterator();e.hasNext();){var o=e.next();i.add_11rb$(this.apply_yrwdxb$(o))}return i},xg.prototype.applyInverse_yrwdxb$=function(t){return null!=t?this.inverseFun_2rsie$_0(t):null},xg.prototype.applyInverse_k9kaly$=function(t){var e,n=U(F(t,10));for(e=t.iterator();e.hasNext();){var i=e.next();n.add_11rb$(this.applyInverse_yrwdxb$(i))}return n},xg.prototype.safeCastToDoubles_9ma18$=function(t){var e=w.SeriesUtil.checkedDoubles_9ma18$(t);if(!e.canBeCast())throw V("Not a collections of Double(s)".toString());return e.cast()},xg.$metadata$={kind:h,simpleName:"FunTransform",interfaces:[ni]},kg.prototype.hasDomainLimits=function(){return!1},kg.prototype.isInDomain_yrwdxb$=function(t){return w.SeriesUtil.isFinite_yrwdxb$(t)},kg.prototype.createApplicableDomain_yrwdxb$$default=function(t){if(null==t)return this.createApplicableDomain_yrwdxb$(0);var e=k(t)?t:0;return new lt(e-.5,e+.5)},kg.prototype.toApplicableDomain_3lmjpf$=function(t){return t},kg.prototype.apply_9ma18$=function(t){return this.safeCastToDoubles_9ma18$(t)},kg.prototype.applyInverse_k9kaly$=function(t){return t},kg.$metadata$={kind:h,simpleName:"IdentityTransform",interfaces:[xg]},Sg.prototype.generateBreaks_f140j5$=function(t,e){var n,i,o=Ng().generateBreakValues_fn9mnm$(t,e),r=null!=(n=this.formatter_0)?n:Ng().createFormatter_0(o),a=U(F(o,10));for(i=o.iterator();i.hasNext();){var s=i.next();a.add_11rb$(r(s))}return new Yy(o,o,a)},Sg.prototype.labelFormatter_f140j5$=function(t,e){var n;return null!=(n=this.formatter_0)?n:this.defaultFormatter_f140j5$(t,e)},Sg.prototype.defaultFormatter_f140j5$=function(t,e){return Ng().createFormatter_0(Ng().generateBreakValues_fn9mnm$(t,e))},Tg.prototype.generateBreakValues_fn9mnm$=function(t,e){return new sg(t.lowerEnd,t.upperEnd,e).breaks},Tg.prototype.createFormatter_0=function(t){var e,n;if(t.isEmpty())n=new pe(0,.5);else{var i=Zt(t),o=Lt.abs(i),r=_e(t),a=Lt.abs(r),s=Lt.max(o,a);if(1===t.size)e=s/10;else{var l=t.get_za3lpa$(1)-t.get_za3lpa$(0);e=Lt.abs(l)}n=new pe(s,e)}var u=n,c=new pg(u.component1(),u.component2(),!0);return E("apply",function(t,e){return t.apply_za3rmp$(e)}.bind(null,c))},Tg.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var Og=null;function Ng(){return null===Og&&new Tg,Og}function Pg(){Rg(),xg.call(this,jg,Lg)}function Ig(){Ag=this,this.LOWER_LIM_TRANSFOTMED_8be2vx$=-rt.MAX_VALUE/10,this.LOWER_LIM_DOMAIN_8be2vx$=10*rt.MIN_VALUE}Sg.$metadata$={kind:h,simpleName:"LinearBreaksGen",interfaces:[Sy]},Pg.prototype.hasDomainLimits=function(){return!0},Pg.prototype.isInDomain_yrwdxb$=function(t){return w.SeriesUtil.isFinite_yrwdxb$(t)&&x(t)>=Rg().LOWER_LIM_DOMAIN_8be2vx$},Pg.prototype.isZero_0=function(t){return w.SeriesUtil.isFinite_yrwdxb$(t)&&x(t)>=0&&t=0},Gg.prototype.createApplicableDomain_yrwdxb$$default=function(t){var e;if(this.isInDomain_yrwdxb$(t)){var n=x(t);e=Lt.max(n,0)}else e=1;var i=e,o=i-.5;return new lt(Lt.max(o,0),i+.5)},Gg.prototype.toApplicableDomain_3lmjpf$=function(t){var e=t.lowerEnd,n=Lt.max(e,0),i=t.upperEnd,o=Lt.max(i,0);return new lt(n,o)},Gg.$metadata$={kind:h,simpleName:"SqrtTransform",interfaces:[xg]},Yg.prototype.generateBreaks_f140j5$=function(t,e){var n=this.breaksHelper_0(t,e),i=n.breaks;return new Yy(i,i,n.formatBreaks_d3e2cz$(i))},Yg.prototype.labelFormatter_f140j5$=function(t,e){return this.breaksHelper_0(t,e).formatter},Yg.prototype.defaultFormatter_f140j5$=function(t,e){return this.breaksHelper_0(t,e).formatter},Yg.prototype.breaksHelper_0=function(t,e){return new fg(t.lowerEnd,t.upperEnd,e)},Yg.$metadata$={kind:h,simpleName:"TimeBreaksGen",interfaces:[Sy]},Wg.prototype.continuousWithLimits_23v90k$=function(t,e){return new bg(t,e.first,e.second)},Wg.prototype.createBreaksGeneratorForTransformedDomain_5x42z5$=function(t,n){var i,o;if(void 0===n&&(n=null),i=t.unwrap(),l(i,this.IDENTITY))o=new Sg(n);else if(l(i,this.REVERSE))o=new Sg(n);else if(l(i,this.SQRT))o=new zg(this.SQRT,n);else{if(!l(i,this.LOG10))throw V("Unexpected 'transform' type: "+Y(e.getKClassFromExpression(t).simpleName));o=new zg(this.LOG10,n)}return new Xg(t,o)},Wg.prototype.ensureApplicableDomain_qnx9nl$=function(t,n){var i;if(null==t)return n.createApplicableDomain_yrwdxb$();var o=n.toApplicableDomain_3lmjpf$(t);return!0===(i=w.SeriesUtil.isBeyondPrecision_3lmjpf$(o))?n.createApplicableDomain_yrwdxb$(o.upperEnd):!1===i?o:e.noWhenBranchMatched()},Xg.prototype.labelFormatter_f140j5$=function(t,e){var n=tg().applyInverseTransform_j5tjae$(t,this.transform_0);return this.breaksGenerator.labelFormatter_f140j5$(n,e)},Xg.prototype.defaultFormatter_f140j5$=function(t,e){var n=tg().applyInverseTransform_j5tjae$(t,this.transform_0);return this.breaksGenerator.defaultFormatter_f140j5$(n,e)},Xg.prototype.generateBreaks_f140j5$=function(t,e){var n,i=tg().applyInverseTransform_j5tjae$(t,this.transform_0),o=this.breaksGenerator.generateBreaks_f140j5$(i,e),r=o.domainValues,a=this.transform_0.apply_9ma18$(r),l=U(F(a,10));for(n=a.iterator();n.hasNext();){var u,c=n.next();l.add_11rb$("number"==typeof(u=c)?u:s())}return new Yy(r,l,o.labels)},Xg.$metadata$={kind:h,simpleName:"BreaksGeneratorForTransformedDomain",interfaces:[Sy]},Wg.$metadata$={kind:p,simpleName:"Transforms",interfaces:[]};var Zg=null;function Jg(){return null===Zg&&new Wg,Zg}function Qg(t,e){iv(),lv.call(this,t),this.count2d_r54406$_0=e}function tv(t){return function(e){if(t.has_8xm3sj$(e)){var n,i=t.getNumeric_8xm3sj$(e),o=U(F(i,10));for(n=i.iterator();n.hasNext();){var r=n.next();o.add_11rb$(w.SeriesUtil.isFinite_yrwdxb$(r)?r:null)}return o}for(var a=t.rowCount(),s=U(a),l=0;l 999 is too large!";throw u(p.toString())}if(!(this.nY<=999)){var h="The input nY = "+this.nY+" > 999 is too large!";throw u(h.toString())}}function rv(){av=this,this.DEF_KERNEL=Yb(),this.DEF_ADJUST=1,this.DEF_N=100,this.DEF_BW=iw(),this.DEF_CONTOUR=!0,this.DEF_BIN_COUNT=10,this.DEF_BIN_WIDTH=0,this.DEF_MAPPING_0=ge([m(ti().X,Bx().X),m(ti().Y,Bx().Y)]),this.MAX_N_0=999}Qg.$metadata$={kind:h,simpleName:"AbstractCountStat",interfaces:[lv]},ov.prototype.getBandWidthX_k9kaly$=function(t){var e;return null!=(e=this.bandWidthX_pmqi0t$_0)?e:bw().bandWidth_whucba$(this.bandWidthMethod_3lcf4y$_0,t)},ov.prototype.getBandWidthY_k9kaly$=function(t){var e;return null!=(e=this.bandWidthY_pmqi1o$_0)?e:bw().bandWidth_whucba$(this.bandWidthMethod_3lcf4y$_0,t)},ov.prototype.consumes=function(){return nt([ti().X,ti().Y,ti().WEIGHT])},ov.prototype.apply_kdy6bf$$default=function(t,e,n){throw V("'density2d' statistic can't be executed on the client side")},rv.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var av=null;function sv(){return null===av&&new rv,av}function lv(t){this.defaultMappings_lvkmi1$_0=t}function uv(t,e,n,i,o){fv(),void 0===t&&(t=30),void 0===e&&(e=30),void 0===n&&(n=fv().DEF_BINWIDTH),void 0===i&&(i=fv().DEF_BINWIDTH),void 0===o&&(o=fv().DEF_DROP),lv.call(this,fv().DEF_MAPPING_0),this.drop_0=o,this.binOptionsX_0=new Nv(t,n),this.binOptionsY_0=new Nv(e,i)}function cv(){dv=this,this.DEF_BINS=30,this.DEF_BINWIDTH=null,this.DEF_DROP=!0,this.DEF_MAPPING_0=ge([m(ti().X,Bx().X),m(ti().Y,Bx().Y),m(ti().FILL,Bx().COUNT)])}ov.$metadata$={kind:h,simpleName:"AbstractDensity2dStat",interfaces:[lv]},lv.prototype.normalize_dhhkv7$=function(t){return t},lv.prototype.hasDefaultMapping_896ixz$=function(t){return this.defaultMappings_lvkmi1$_0.containsKey_11rb$(t)},lv.prototype.getDefaultMapping_896ixz$=function(t){if(this.defaultMappings_lvkmi1$_0.containsKey_11rb$(t))return x(this.defaultMappings_lvkmi1$_0.get_11rb$(t));throw u("Stat "+e.getKClassFromExpression(this).simpleName+" has no default mapping for aes: "+Y(t))},lv.prototype.hasRequiredValues_xht41f$=function(t,e){var n;for(n=0;n!==e.length;++n){var i=e[n],o=La().forAes_896ixz$(i);if(t.hasNoOrEmpty_8xm3sj$(o))return!1}return!0},lv.prototype.withEmptyStatValues=function(){var t,e=Ti();for(t=ti().values().iterator();t.hasNext();){var n=t.next();this.hasDefaultMapping_896ixz$(n)&&e.put_2l962d$(this.getDefaultMapping_896ixz$(n),Pt())}return e.build()},lv.$metadata$={kind:h,simpleName:"BaseStat",interfaces:[Lr]},uv.prototype.consumes=function(){return nt([ti().X,ti().Y,ti().WEIGHT])},uv.prototype.apply_kdy6bf$$default=function(t,n,i){if(!this.hasRequiredValues_xht41f$(t,[ti().X,ti().Y]))return this.withEmptyStatValues();var o=n.overallXRange(),r=n.overallYRange();if(null==o||null==r)return this.withEmptyStatValues();var a=fv().adjustRangeInitial_0(o),s=fv().adjustRangeInitial_0(r),l=Rv().binCountAndWidth_11nzti$(a.length,this.binOptionsX_0),u=Rv().binCountAndWidth_11nzti$(s.length,this.binOptionsY_0),c=fv().adjustRangeFinal_0(o,l.width),p=fv().adjustRangeFinal_0(r,u.width),h=Rv().binCountAndWidth_11nzti$(c.length,this.binOptionsX_0),_=Rv().binCountAndWidth_11nzti$(p.length,this.binOptionsY_0),d=e.imul(h.count,_.count),f=fv().densityNormalizingFactor_0(c.length,p.length,d),m=this.computeBins_0(t.getNumeric_8xm3sj$(La().X),t.getNumeric_8xm3sj$(La().Y),c.lowerEnd,p.lowerEnd,h.count,_.count,h.width,_.width,Rv().weightAtIndex_dhhkv7$(t),f);return Ti().putNumeric_s1rqo9$(Bx().X,m.x_8be2vx$).putNumeric_s1rqo9$(Bx().Y,m.y_8be2vx$).putNumeric_s1rqo9$(Bx().COUNT,m.count_8be2vx$).putNumeric_s1rqo9$(Bx().DENSITY,m.density_8be2vx$).build()},uv.prototype.computeBins_0=function(t,e,n,i,o,r,a,s,l,u){for(var p=0,h=D(),_=0;_!==t.size;++_){var d=t.get_za3lpa$(_),f=e.get_za3lpa$(_);if(w.SeriesUtil.allFinite_jma9l8$(d,f)){var m=l(_);p+=m;var $=(x(d)-n)/a,y=Rt(Lt.floor($)),g=(x(f)-i)/s,v=Rt(Lt.floor(g)),b=new pe(y,v);if(!h.containsKey_11rb$(b)){var k=new we(0);h.put_xwzc9p$(b,k)}x(h.get_11rb$(b)).getAndAdd_14dthe$(m)}}for(var C=c(),E=c(),S=c(),T=c(),O=n+a/2,N=i+s/2,P=0;P0?1/y:1,v=this.computeHistogramBins_0(n,a,u,c,this.weightAtIndex_dhhkv7$(t),g);if(v.x_8be2vx$.size!==u){var b="Internal: stat data size="+Y(v.x_8be2vx$.size)+" expected bin count="+Y(u);throw V(b.toString())}return v},Sv.prototype.computeDotdensityStatSeries_51qu1d$=function(t,e,n){var i=t.length,o=i>0?this.binCountAndWidth_11nzti$(i,n).width:1;return this.computeDotdensityBins_0(e,o)},Sv.prototype.computeHistogramBins_0=function(t,e,n,i,o,r){for(var a=0,s=D(),l=0;l!==t.size;++l){var u=t.get_za3lpa$(l);if(w.SeriesUtil.isFinite_yrwdxb$(u)){var p=o(l);a+=p;var h=(x(u)-e)/i,_=Rt(Lt.floor(h));if(!s.containsKey_11rb$(_)){var d=new we(0);s.put_xwzc9p$(_,d)}x(s.get_11rb$(_)).getAndAdd_14dthe$(p)}}for(var f=c(),m=c(),$=c(),y=e+i/2,g=0;g0},Nv.$metadata$={kind:h,simpleName:"BinOptions",interfaces:[]},Pv.$metadata$={kind:h,simpleName:"CountAndWidth",interfaces:[]},Iv.$metadata$={kind:h,simpleName:"BinsData",interfaces:[]},Sv.$metadata$={kind:p,simpleName:"BinStatUtil",interfaces:[]};var Av=null;function Rv(){return null===Av&&new Sv,Av}function jv(t,e){Dv(),lv.call(this,Dv().DEF_MAPPING_0),this.whiskerIQRRatio_0=t,this.computeWidth_0=e}function Lv(){zv=this,this.DEF_WHISKER_IQR_RATIO=1.5,this.DEF_COMPUTE_WIDTH=!1,this.DEF_MAPPING_0=ge([m(ti().X,Bx().X),m(ti().Y,Bx().Y),m(ti().YMIN,Bx().Y_MIN),m(ti().YMAX,Bx().Y_MAX),m(ti().LOWER,Bx().LOWER),m(ti().MIDDLE,Bx().MIDDLE),m(ti().UPPER,Bx().UPPER)])}jv.prototype.hasDefaultMapping_896ixz$=function(t){return lv.prototype.hasDefaultMapping_896ixz$.call(this,t)||l(t,ti().WIDTH)&&this.computeWidth_0},jv.prototype.getDefaultMapping_896ixz$=function(t){return l(t,ti().WIDTH)?Bx().WIDTH:lv.prototype.getDefaultMapping_896ixz$.call(this,t)},jv.prototype.consumes=function(){return nt([ti().X,ti().Y])},jv.prototype.apply_kdy6bf$$default=function(t,e,n){var i,o,r,a;if(!this.hasRequiredValues_xht41f$(t,[ti().Y]))return this.withEmptyStatValues();var s=t.getNumeric_8xm3sj$(La().Y);if(t.has_8xm3sj$(La().X))i=t.getNumeric_8xm3sj$(La().X);else{for(var l=s.size,u=U(l),c=0;c=G&&Z<=K&&X.add_11rb$(Z)}var J=X,Q=w.SeriesUtil.range_l63ks6$(J);null!=Q&&(V=Q.lowerEnd,Y=Q.upperEnd)}var tt,et=c();for(tt=L.iterator();tt.hasNext();){var nt=tt.next();(ntK)&&et.add_11rb$(nt)}for(r=et.iterator();r.hasNext();){var it=r.next();E.add_11rb$(j),S.add_11rb$(it),T.add_11rb$(rt.NaN),O.add_11rb$(rt.NaN),N.add_11rb$(rt.NaN),P.add_11rb$(rt.NaN),I.add_11rb$(rt.NaN),A.add_11rb$(z)}E.add_11rb$(j),S.add_11rb$(rt.NaN),T.add_11rb$(B),O.add_11rb$(F),N.add_11rb$(U),P.add_11rb$(V),I.add_11rb$(Y),A.add_11rb$(z)}return mn([m(Bx().X,E),m(Bx().Y,S),m(Bx().MIDDLE,T),m(Bx().LOWER,O),m(Bx().UPPER,N),m(Bx().Y_MIN,P),m(Bx().Y_MAX,I),m(Bx().COUNT,A)])},Lv.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var zv=null;function Dv(){return null===zv&&new Lv,zv}function Mv(){Kv(),this.myContourX_0=c(),this.myContourY_0=c(),this.myContourLevel_0=c(),this.myContourGroup_0=c(),this.myGroup_0=0}function Bv(){Gv=this}jv.$metadata$={kind:h,simpleName:"BoxplotStat",interfaces:[lv]},Object.defineProperty(Mv.prototype,"dataFrame_0",{configurable:!0,get:function(){return Ti().putNumeric_s1rqo9$(Bx().X,this.myContourX_0).putNumeric_s1rqo9$(Bx().Y,this.myContourY_0).putNumeric_s1rqo9$(Bx().LEVEL,this.myContourLevel_0).putNumeric_s1rqo9$(Bx().GROUP,this.myContourGroup_0).build()}}),Mv.prototype.add_e7h60q$=function(t,e){var n;for(n=t.iterator();n.hasNext();){var i=n.next();this.myContourX_0.add_11rb$(i.x),this.myContourY_0.add_11rb$(i.y),this.myContourLevel_0.add_11rb$(e),this.myContourGroup_0.add_11rb$(this.myGroup_0)}this.myGroup_0+=1},Bv.prototype.getPathDataFrame_9s3d7f$=function(t,e){var n,i,o=new Mv;for(n=t.iterator();n.hasNext();){var r=n.next();for(i=x(e.get_11rb$(r)).iterator();i.hasNext();){var a=i.next();o.add_e7h60q$(a,r)}}return o.dataFrame_0},Bv.prototype.getPolygonDataFrame_dnsuee$=function(t,e){var n,i=new Mv;for(n=t.iterator();n.hasNext();){var o=n.next(),r=x(e.get_11rb$(o));i.add_e7h60q$(r,o)}return i.dataFrame_0},Bv.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var Fv,Uv,qv,Hv,Gv=null;function Kv(){return null===Gv&&new Bv,Gv}function Vv(t,e){ab(),this.myLowLeft_0=null,this.myLowRight_0=null,this.myUpLeft_0=null,this.myUpRight_0=null;var n=t.lowerEnd,i=t.upperEnd,o=e.lowerEnd,r=e.upperEnd;this.myLowLeft_0=new mt(n,o),this.myLowRight_0=new mt(i,o),this.myUpLeft_0=new mt(n,r),this.myUpRight_0=new mt(i,r)}function Yv(t,n){return e.compareTo(t.x,n.x)}function Wv(t,n){return e.compareTo(t.y,n.y)}function Xv(t,n){return e.compareTo(n.x,t.x)}function Zv(t,n){return e.compareTo(n.y,t.y)}function Jv(t,e){j.call(this),this.name$=t,this.ordinal$=e}function Qv(){Qv=function(){},Fv=new Jv("DOWN",0),Uv=new Jv("RIGHT",1),qv=new Jv("UP",2),Hv=new Jv("LEFT",3)}function tb(){return Qv(),Fv}function eb(){return Qv(),Uv}function nb(){return Qv(),qv}function ib(){return Qv(),Hv}function ob(){rb=this}Mv.$metadata$={kind:h,simpleName:"Contour",interfaces:[]},Vv.prototype.createPolygons_lrt0be$=function(t,e,n){var i,o,r,a=D(),s=c();for(i=t.values.iterator();i.hasNext();){var l=i.next();s.addAll_brywnq$(l)}var u=c(),p=this.createOuterMap_0(s,u),h=t.keys.size;o=h+1|0;for(var _=0;_0&&d.addAll_brywnq$(ab().reverseAll_0(x(t.get_11rb$(e.get_za3lpa$(_-1|0))))),_=0},ob.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var rb=null;function ab(){return null===rb&&new ob,rb}function sb(t,e){cb(),lv.call(this,cb().DEF_MAPPING_0),this.myBinOptions_0=new Nv(t,e)}function lb(){ub=this,this.DEF_BIN_COUNT=10,this.DEF_MAPPING_0=ge([m(ti().X,Bx().X),m(ti().Y,Bx().Y)])}Vv.$metadata$={kind:h,simpleName:"ContourFillHelper",interfaces:[]},sb.prototype.consumes=function(){return nt([ti().X,ti().Y,ti().Z])},sb.prototype.apply_kdy6bf$$default=function(t,e,n){var i;if(!this.hasRequiredValues_xht41f$(t,[ti().X,ti().Y,ti().Z]))return this.withEmptyStatValues();if(null==(i=fb().computeLevels_wuiwgl$(t,this.myBinOptions_0)))return Si().emptyFrame();var o=i,r=fb().computeContours_jco5dt$(t,o);return Kv().getPathDataFrame_9s3d7f$(o,r)},lb.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var ub=null;function cb(){return null===ub&&new lb,ub}function pb(){db=this,this.xLoc_0=new Float64Array([0,1,1,0,.5]),this.yLoc_0=new Float64Array([0,0,1,1,.5])}function hb(t,e,n){this.z=n,this.myX=0,this.myY=0,this.myIsCenter_0=0,this.myX=Rt(t),this.myY=Rt(e),this.myIsCenter_0=t%1==0?0:1}function _b(t,e){this.myA=t,this.myB=e}sb.$metadata$={kind:h,simpleName:"ContourStat",interfaces:[lv]},pb.prototype.estimateRegularGridShape_fsp013$=function(t){var e,n=0,i=null;for(e=t.iterator();e.hasNext();){var o=e.next();if(null==i)i=o;else if(o==i)break;n=n+1|0}if(n<=1)throw u("Data grid must be at least 2 columns wide (was "+n+")");var r=t.size/n|0;if(r<=1)throw u("Data grid must be at least 2 rows tall (was "+r+")");return new pe(n,r)},pb.prototype.computeLevels_wuiwgl$=function(t,e){if(!(t.has_8xm3sj$(La().X)&&t.has_8xm3sj$(La().Y)&&t.has_8xm3sj$(La().Z)))return null;var n=t.range_8xm3sj$(La().Z);return this.computeLevels_d8pdtm$(n,e)},pb.prototype.computeLevels_d8pdtm$=function(t,e){var n;if(null==t||w.SeriesUtil.isBeyondPrecision_3lmjpf$(t))return null;var i=Rv().binCountAndWidth_11nzti$(t.length,e),o=c();n=i.count;for(var r=0;r1&&p.add_11rb$(_)}return p},pb.prototype.confirmPaths_0=function(t){var e,n,i,o=c(),r=D();for(e=t.iterator();e.hasNext();){var a=e.next(),s=a.get_za3lpa$(0),l=a.get_za3lpa$(a.size-1|0);if(null!=s&&s.equals(l))o.add_11rb$(a);else if(r.containsKey_11rb$(s)||r.containsKey_11rb$(l)){var u=r.get_11rb$(s),p=r.get_11rb$(l);this.removePathByEndpoints_ebaanh$(u,r),this.removePathByEndpoints_ebaanh$(p,r);var h=c();if(u===p){h.addAll_brywnq$(x(u)),h.addAll_brywnq$(a.subList_vux9f0$(1,a.size)),o.add_11rb$(h);continue}null!=u&&null!=p?(h.addAll_brywnq$(u),h.addAll_brywnq$(a.subList_vux9f0$(1,a.size-1|0)),h.addAll_brywnq$(p)):null==u?(h.addAll_brywnq$(x(p)),h.addAll_u57x28$(0,a.subList_vux9f0$(0,a.size-1|0))):(h.addAll_brywnq$(u),h.addAll_brywnq$(a.subList_vux9f0$(1,a.size)));var _=h.get_za3lpa$(0);r.put_xwzc9p$(_,h);var d=h.get_za3lpa$(h.size-1|0);r.put_xwzc9p$(d,h)}else{var f=a.get_za3lpa$(0);r.put_xwzc9p$(f,a);var m=a.get_za3lpa$(a.size-1|0);r.put_xwzc9p$(m,a)}}for(n=ut(r.values).iterator();n.hasNext();){var $=n.next();o.add_11rb$($)}var y=c();for(i=o.iterator();i.hasNext();){var g=i.next();y.addAll_brywnq$(this.pathSeparator_0(g))}return y},pb.prototype.removePathByEndpoints_ebaanh$=function(t,e){null!=t&&(e.remove_11rb$(t.get_za3lpa$(0)),e.remove_11rb$(t.get_za3lpa$(t.size-1|0)))},pb.prototype.pathSeparator_0=function(t){var e,n,i=c(),o=0;e=t.size-1|0;for(var r=1;rm&&o<=$)){var k=this.computeSegmentsForGridCell_0(o,f,u,l);s.addAll_brywnq$(k)}}}return s},pb.prototype.computeSegmentsForGridCell_0=function(t,e,n,i){for(var o,r=c(),a=c(),s=0;s<=4;s++)a.add_11rb$(new hb(n+this.xLoc_0[s],i+this.yLoc_0[s],e[s]));for(var l=0;l<=3;l++){var u=(l+1|0)%4|0;(o=c()).add_11rb$(a.get_za3lpa$(l)),o.add_11rb$(a.get_za3lpa$(u)),o.add_11rb$(a.get_za3lpa$(4));var p=this.intersectionSegment_0(o,t);null!=p&&r.add_11rb$(p)}return r},pb.prototype.intersectionSegment_0=function(t,e){var n,i;switch((100*t.get_za3lpa$(0).getType_14dthe$(x(e))|0)+(10*t.get_za3lpa$(1).getType_14dthe$(e)|0)+t.get_za3lpa$(2).getType_14dthe$(e)|0){case 100:n=new _b(t.get_za3lpa$(2),t.get_za3lpa$(0)),i=new _b(t.get_za3lpa$(0),t.get_za3lpa$(1));break;case 10:n=new _b(t.get_za3lpa$(0),t.get_za3lpa$(1)),i=new _b(t.get_za3lpa$(1),t.get_za3lpa$(2));break;case 1:n=new _b(t.get_za3lpa$(1),t.get_za3lpa$(2)),i=new _b(t.get_za3lpa$(2),t.get_za3lpa$(0));break;case 110:n=new _b(t.get_za3lpa$(0),t.get_za3lpa$(2)),i=new _b(t.get_za3lpa$(2),t.get_za3lpa$(1));break;case 101:n=new _b(t.get_za3lpa$(2),t.get_za3lpa$(1)),i=new _b(t.get_za3lpa$(1),t.get_za3lpa$(0));break;case 11:n=new _b(t.get_za3lpa$(1),t.get_za3lpa$(0)),i=new _b(t.get_za3lpa$(0),t.get_za3lpa$(2));break;default:return null}return new pe(n,i)},pb.prototype.checkEdges_0=function(t,e,n){var i,o;for(i=t.iterator();i.hasNext();){var r=i.next();null!=(o=r.get_za3lpa$(0))&&o.equals(r.get_za3lpa$(r.size-1|0))||(this.checkEdge_0(r.get_za3lpa$(0),e,n),this.checkEdge_0(r.get_za3lpa$(r.size-1|0),e,n))}},pb.prototype.checkEdge_0=function(t,e,n){var i=t.myA,o=t.myB;if(!(0===i.myX&&0===o.myX||0===i.myY&&0===o.myY||i.myX===(e-1|0)&&o.myX===(e-1|0)||i.myY===(n-1|0)&&o.myY===(n-1|0)))throw u("Check Edge Failed")},Object.defineProperty(hb.prototype,"coord",{configurable:!0,get:function(){return new mt(this.x,this.y)}}),Object.defineProperty(hb.prototype,"x",{configurable:!0,get:function(){return this.myX+.5*this.myIsCenter_0}}),Object.defineProperty(hb.prototype,"y",{configurable:!0,get:function(){return this.myY+.5*this.myIsCenter_0}}),hb.prototype.equals=function(t){var n,i;if(this===t)return!0;if(null==t||null==(n=e.getKClassFromExpression(this))||!n.equals(e.getKClassFromExpression(t)))return!1;var o=null==(i=t)||e.isType(i,hb)?i:s();return this.myX===x(o).myX&&this.myY===o.myY&&this.myIsCenter_0===o.myIsCenter_0},hb.prototype.hashCode=function(){return gn([this.myX,this.myY,this.myIsCenter_0])},hb.prototype.getType_14dthe$=function(t){return this.z>=t?1:0},hb.$metadata$={kind:h,simpleName:"TripleVector",interfaces:[]},_b.prototype.equals=function(t){var n,i,o,r,a;if(!e.isType(t,_b))return!1;var l=null==(n=t)||e.isType(n,_b)?n:s();return(null!=(i=this.myA)?i.equals(x(l).myA):null)&&(null!=(o=this.myB)?o.equals(l.myB):null)||(null!=(r=this.myA)?r.equals(l.myB):null)&&(null!=(a=this.myB)?a.equals(l.myA):null)},_b.prototype.hashCode=function(){return this.myA.coord.hashCode()+this.myB.coord.hashCode()|0},_b.prototype.intersect_14dthe$=function(t){var e=this.myA.z,n=this.myB.z;if(t===e)return this.myA.coord;if(t===n)return this.myB.coord;var i=(n-e)/(t-e),o=this.myA.x,r=this.myA.y,a=this.myB.x,s=this.myB.y;return new mt(o+(a-o)/i,r+(s-r)/i)},_b.$metadata$={kind:h,simpleName:"Edge",interfaces:[]},pb.$metadata$={kind:p,simpleName:"ContourStatUtil",interfaces:[]};var db=null;function fb(){return null===db&&new pb,db}function mb(t,e){gb(),lv.call(this,gb().DEF_MAPPING_0),this.myBinOptions_0=new Nv(t,e)}function $b(){yb=this,this.DEF_MAPPING_0=ge([m(ti().X,Bx().X),m(ti().Y,Bx().Y)])}mb.prototype.consumes=function(){return nt([ti().X,ti().Y,ti().Z])},mb.prototype.apply_kdy6bf$$default=function(t,e,n){var i;if(!this.hasRequiredValues_xht41f$(t,[ti().X,ti().Y,ti().Z]))return this.withEmptyStatValues();if(null==(i=fb().computeLevels_wuiwgl$(t,this.myBinOptions_0)))return Si().emptyFrame();var o=i,r=fb().computeContours_jco5dt$(t,o),a=x(t.range_8xm3sj$(La().X)),s=x(t.range_8xm3sj$(La().Y)),l=x(t.range_8xm3sj$(La().Z)),u=new Vv(a,s),c=ab().computeFillLevels_xdhjlo$(l,o),p=u.createPolygons_lrt0be$(r,o,c);return Kv().getPolygonDataFrame_dnsuee$(c,p)},$b.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var yb=null;function gb(){return null===yb&&new $b,yb}function vb(){xb(),Qg.call(this,xb().DEF_MAPPING_0,!0)}function bb(){wb=this,this.DEF_MAPPING_0=ge([m(ti().X,Bx().X),m(ti().Y,Bx().Y),m(ti().SLICE,Bx().COUNT)])}mb.$metadata$={kind:h,simpleName:"ContourfStat",interfaces:[lv]},vb.prototype.consumes=function(){return nt([ti().X,ti().Y,ti().WEIGHT])},vb.prototype.addToStatVars_p1i5mc$=function(t){var n,i=c(),o=c();for(n=t.iterator();n.hasNext();){var r,a=n.next();e.isType(a,pe)||s();var l,u="number"==typeof(r=a.first)?r:s();i.add_11rb$(u);var p="number"==typeof(l=a.second)?l:s();o.add_11rb$(p)}return ge([m(Bx().X,i),m(Bx().Y,o)])},bb.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var wb=null;function xb(){return null===wb&&new bb,wb}function kb(){Sb(),Qg.call(this,Sb().DEF_MAPPING_0,!1)}function Cb(){Eb=this,this.DEF_MAPPING_0=ge([m(ti().X,Bx().X),m(ti().Y,Bx().COUNT)])}vb.$metadata$={kind:h,simpleName:"Count2dStat",interfaces:[Qg]},kb.prototype.consumes=function(){return nt([ti().X,ti().WEIGHT])},kb.prototype.apply_kdy6bf$$default=function(t,e,n){return this.hasRequiredValues_xht41f$(t,[ti().X])?this.apply_kdy6bf$(t,e,n,Qg.prototype.apply_kdy6bf$$default.bind(this)):this.withEmptyStatValues()},kb.prototype.addToStatVars_p1i5mc$=function(t){var e,n=U(F(t,10));for(e=t.iterator();e.hasNext();){var i,o=e.next();n.add_11rb$("number"==typeof(i=o)?i:s())}var r=n;return vn(m(Bx().X,r))},Cb.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var Eb=null;function Sb(){return null===Eb&&new Cb,Eb}function Tb(t,e,n,i,o,r,a,s,l,u){ov.call(this,t,e,n,i,o,r,a,s,l,u)}function Ob(t,e,n,i,o,r,a,s,l,u){ov.call(this,t,e,n,i,o,r,a,s,l,u)}function Nb(t,e,n,i,o,r,a,s,l){if(Ab(),lv.call(this,Ab().DEF_MAPPING_0),this.trim_0=t,this.tailsCutoff_0=e,this.bandWidth_0=n,this.bandWidthMethod_0=i,this.adjust_0=o,this.kernel_0=r,this.n_0=a,this.fullScanMax_0=s,this.quantiles_0=l,!(this.n_0<=1024)){var c="The input n = "+this.n_0+" > 1024 is too large!";throw u(c.toString())}}function Pb(){Ib=this,this.DEF_TRIM=!1,this.DEF_QUANTILES=nt([.25,.5,.75]),this.DEF_MAPPING_0=ge([m(ti().X,Bx().X),m(ti().Y,Bx().Y),m(ti().HEIGHT,Bx().HEIGHT),m(ti().QUANTILE,Bx().QUANTILE)])}kb.$metadata$={kind:h,simpleName:"CountStat",interfaces:[Qg]},Tb.prototype.apply_kdy6bf$$default=function(t,e,n){var i,o,r;if(!this.hasRequiredValues_xht41f$(t,[ti().X,ti().Y]))return this.withEmptyStatValues();var a=t.getNumeric_8xm3sj$(La().X),s=t.getNumeric_8xm3sj$(La().Y);if(a.isEmpty())return Si().emptyFrame();if(a.size!==s.size)throw bn("len(x)= "+Y(a.size)+" and len(y)= "+Y(s.size)+" doesn't match!");var l=e.overallXRange(),u=e.overallYRange(),p=c(),h=c(),_=c(),d=new Float64Array(2);d[0]=this.getBandWidthX_k9kaly$(a),d[1]=this.getBandWidthY_k9kaly$(s);var f=bw().createStepValues_f140j5$(x(l),this.nX),m=bw().createStepValues_f140j5$(x(u),this.nY),$=Rv().weightVector_5m8trb$(a.size,t),y=Pk(bw().createRawMatrix_a6xq99$(a,f,this.kernelFun,d[0],this.adjust,$)),g=Pk(bw().createRawMatrix_a6xq99$(s,m,this.kernelFun,d[1],this.adjust,$)).multiply_1dlv11$(y.transpose());i=this.nY;for(var v=0;v 1024 is too large!";throw u(s.toString())}}function Gb(t){return t.first}function Kb(t,e){j.call(this),this.name$=t,this.ordinal$=e}function Vb(){Vb=function(){},Rb=new Kb("GAUSSIAN",0),jb=new Kb("RECTANGULAR",1),Lb=new Kb("TRIANGULAR",2),zb=new Kb("BIWEIGHT",3),Db=new Kb("EPANECHNIKOV",4),Mb=new Kb("OPTCOSINE",5),Bb=new Kb("COSINE",6)}function Yb(){return Vb(),Rb}function Wb(){return Vb(),jb}function Xb(){return Vb(),Lb}function Zb(){return Vb(),zb}function Jb(){return Vb(),Db}function Qb(){return Vb(),Mb}function tw(){return Vb(),Bb}function ew(t,e){j.call(this),this.name$=t,this.ordinal$=e}function nw(){nw=function(){},Fb=new ew("NRD0",0),Ub=new ew("NRD",1)}function iw(){return nw(),Fb}function ow(){return nw(),Ub}function rw(){aw=this,this.DEF_TRIM=!1,this.DEF_KERNEL=Yb(),this.DEF_ADJUST=1,this.DEF_N=512,this.DEF_BW=iw(),this.DEF_FULL_SCAN_MAX=5e3,this.MAX_N=1024,this.DEF_MAPPING_0=ge([m(ti().X,Bx().X),m(ti().Y,Bx().DENSITY)])}Hb.prototype.consumes=function(){return nt([ti().X,ti().WEIGHT])},Hb.prototype.apply_kdy6bf$$default=function(t,e,n){var i,o,r,a,s,l;if(!this.hasRequiredValues_xht41f$(t,[ti().X]))return this.withEmptyStatValues();if(t.has_8xm3sj$(La().WEIGHT)){var u=w.SeriesUtil.filterFinite_10sy24$(t.getNumeric_8xm3sj$(La().X),t.getNumeric_8xm3sj$(La().WEIGHT)),p=u.get_za3lpa$(0),h=u.get_za3lpa$(1),_=wn(O(C(p,h),new gt(qb(Gb))));s=_.component1(),l=_.component2()}else{var d,f=Ve(t.getNumeric_8xm3sj$(La().X)),m=c();for(d=f.iterator();d.hasNext();){var $=d.next();k($)&&m.add_11rb$($)}for(var y=(s=_n(m)).size,g=U(y),v=0;v0){var f=_/1.34;return.9*Lt.min(d,f)*Lt.pow(r,-.2)}if(d>0){return.9*d*Lt.pow(r,-.2)}break;case"NRD":if(_>0){var m=_/1.34;return 1.06*Lt.min(d,m)*Lt.pow(r,-.2)}if(d>0){return 1.06*d*Lt.pow(r,-.2)}}return 1},uw.prototype.calculateQuantiles_0=function(t,e,n){if(t.isEmpty())return Pt();var i,o=he(e);t:do{var r=e.iterator();if(!r.hasNext()){i=Pt();break t}var a={v:r.next()},s=U(F(e,10));s.add_11rb$(a.v);for(var l=s;r.hasNext();)a.v=a.v+r.next(),l.add_11rb$(a.v);i=l}while(0);var u,c=i,p=U(F(c,10));for(u=c.iterator();u.hasNext();){var h=u.next();p.add_11rb$(h/o)}var _=p,d=n.iterator();if(!d.hasNext()){for(var f=t.size,m=U(f),$=0;$=t){e=a;break t}a=a+1|0}e=-1}while(0);var s=e;if(0===s)return Zt(i);if(-1===s)return _e(i);var l=(i.get_za3lpa$(s)-i.get_za3lpa$(s-1|0))/(n.get_za3lpa$(s)-n.get_za3lpa$(s-1|0));return l*t+(i.get_za3lpa$(s-1|0)-l*n.get_za3lpa$(s-1|0))};var n,i},uw.prototype.expandByGroupEnds_0=function(t,e,n,i){var o;void 0===i&&(i=null);var r,a=t.values,s=U(F(a,10));for(r=a.iterator();r.hasNext();){var c=r.next();s.add_11rb$(c.size)}if(1!==I(s).size)throw u("All data series in stat data must have equal size".toString());if(!t.keys.contains_11rb$(e))throw u(("Stat data should contain variable "+e).toString());if(!t.keys.contains_11rb$(n))throw u(("Stat data should contain variable "+n).toString());if(null!=i&&!t.keys.contains_11rb$(i)){var p="Stat data should contain variable "+Y(i);throw u(p.toString())}var h,_=t.keys,d=U(F(_,10));for(h=_.iterator();h.hasNext();){var f=h.next();d.add_11rb$(m(f,Pt()))}var $=mn(xn(d).slice());o=g(t,e).size;for(var y=0;y0){var v=null==i?0:g(t,i).get_za3lpa$(y-1|0),b=null==i?0:g(t,i).get_za3lpa$(y),w=g(t,n).get_za3lpa$(y-1|0),x=g(t,n).get_za3lpa$(y),k=g(t,e).get_za3lpa$(y-1|0),C=g(t,e).get_za3lpa$(y);if(v===b&&!(k<=C))throw u(("Data series "+e+" should be ordered").toString());if(v===b&&w!==x){var E;if(v===b&&!(w<=x))throw u(("Data series "+n+" should be ordered").toString());for(E=t.keys.iterator();E.hasNext();){var S=E.next();if(l(S,n)){var T=P(g($,S),Xt(g(t,S).get_za3lpa$(y)));$.put_xwzc9p$(S,T)}else{var O=P(g($,S),Xt(g(t,S).get_za3lpa$(y-1|0)));$.put_xwzc9p$(S,O)}}}}var N;for(N=t.keys.iterator();N.hasNext();){var A=N.next(),R=P(g($,A),Xt(g(t,A).get_za3lpa$(y)));$.put_xwzc9p$(A,R)}}return $},uw.prototype.kernel_uyf859$=function(t){var e;switch(t.name){case"GAUSSIAN":e=pw;break;case"RECTANGULAR":e=hw;break;case"TRIANGULAR":e=_w;break;case"BIWEIGHT":e=dw;break;case"EPANECHNIKOV":e=fw;break;case"OPTCOSINE":e=mw;break;default:e=$w}return e},uw.prototype.densityFunction_99moap$=function(t,n,i,o,r,a,s){var l,u=null!=i?i:this.bandWidth_whucba$(o,t),c=this.kernel_uyf859$(a);return 1==(l=t.size<=s)?this.densityFunctionFullScan_hztk2d$(t,n,c,u,r):!1===l?this.densityFunctionFast_hztk2d$(t,n,c,u,r):e.noWhenBranchMatched()},uw.prototype.densityFunctionFullScan_hztk2d$=function(t,e,n,i,o){return r=t,a=n,s=i*o,l=e,function(t){for(var e=0,n=0;n!==r.size;++n)e+=a((t-r.get_za3lpa$(n))/s)*l.get_za3lpa$(n);return e/s};var r,a,s,l},uw.prototype.densityFunctionFast_hztk2d$=function(t,e,n,i,o){var r,a,s,l,u,c=i*o;return r=t,a=5*c,s=n,l=c,u=e,function(t){var e,n=0,i=cn(r,t-a);i<0&&(i=(0|-i)-1|0);var o=cn(r,t+a);o<0&&(o=(0|-o)-1|0),e=o;for(var c=i;c(o-1)/o)return t.get_za3lpa$(o-2|0)+(2*o-1)/(3*o)*(t.get_za3lpa$(o-1|0)-t.get_za3lpa$(o-2|0));var r=(o+1/3)*e-2/3,a=Rt(Lt.floor(r)),s=Rt(Lt.ceil(r));return t.get_za3lpa$(a)+(r-a)*(t.get_za3lpa$(s)-t.get_za3lpa$(a))},dx.prototype.lineByPoints_7em3hw$=function(t,e){if(t.second===t.first){var n="Should be "+t.first+" != "+t.second;throw u(n.toString())}var i,o,r=(e.second-e.first)/(t.second-t.first);return i=r,o=e.first-r*t.first,function(t){return i*t+o}},dx.$metadata$={kind:p,simpleName:"QQStatUtil",interfaces:[]};var fx,mx,$x,yx,gx,vx=null;function bx(){return null===vx&&new dx,vx}function wx(t){this.myDataFrame_0=t}function xx(t,e,n,i,o,r,a,s){Ax(),lv.call(this,Ax().DEF_MAPPING_0),this.smootherPointCount_0=t,this.smoothingMethod_0=e,this.confidenceLevel_0=n,this.displayConfidenceInterval_0=i,this.span_0=o,this.polynomialDegree_0=r,this.loessCriticalSize_0=a,this.samplingSeed_0=s}function kx(t,e){j.call(this),this.name$=t,this.ordinal$=e}function Cx(){Cx=function(){},fx=new kx("LM",0),mx=new kx("GLM",1),$x=new kx("GAM",2),yx=new kx("LOESS",3),gx=new kx("RLM",4)}function Ex(){return Cx(),fx}function Sx(){return Cx(),mx}function Tx(){return Cx(),$x}function Ox(){return Cx(),yx}function Nx(){return Cx(),gx}function Px(){Ix=this,this.DEF_MAPPING_0=ge([m(ti().X,Bx().X),m(ti().Y,Bx().Y)]),this.DEF_EVAL_POINT_COUNT=80,this.DEF_SMOOTHING_METHOD=Ex(),this.DEF_CONFIDENCE_LEVEL=.95,this.DEF_DISPLAY_CONFIDENCE_INTERVAL=!0,this.DEF_SPAN=.5,this.DEF_DEG=1,this.DEF_LOESS_CRITICAL_SIZE=1e3,this.DEF_SAMPLING_SEED=Sn}wx.prototype.overallXRange=function(){return this.myDataFrame_0.range_8xm3sj$(La().X)},wx.prototype.overallYRange=function(){return this.myDataFrame_0.range_8xm3sj$(La().Y)},wx.$metadata$={kind:h,simpleName:"SimpleStatContext",interfaces:[Dr]},xx.prototype.hasDefaultMapping_896ixz$=function(t){return lv.prototype.hasDefaultMapping_896ixz$.call(this,t)||l(t,ti().YMIN)&&this.displayConfidenceInterval_0||l(t,ti().YMAX)&&this.displayConfidenceInterval_0},xx.prototype.getDefaultMapping_896ixz$=function(t){return l(t,ti().YMIN)?Bx().Y_MIN:l(t,ti().YMAX)?Bx().Y_MAX:lv.prototype.getDefaultMapping_896ixz$.call(this,t)},kx.$metadata$={kind:h,simpleName:"Method",interfaces:[j]},kx.values=function(){return[Ex(),Sx(),Tx(),Ox(),Nx()]},kx.valueOf_61zpoe$=function(t){switch(t){case"LM":return Ex();case"GLM":return Sx();case"GAM":return Tx();case"LOESS":return Ox();case"RLM":return Nx();default:L("No enum constant jetbrains.datalore.plot.base.stat.SmoothStat.Method."+t)}},Px.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var Ix=null;function Ax(){return null===Ix&&new Px,Ix}function Rx(){var t;Mx=this,this.X=new fi("..x..",vi(),"x"),this.Y=new fi("..y..",vi(),"y"),this.COUNT=new fi("..count..",vi(),"count"),this.DENSITY=new fi("..density..",vi(),"density"),this.Y_MIN=new fi("..ymin..",vi(),"y min"),this.Y_MAX=new fi("..ymax..",vi(),"y max"),this.SAMPLE=new fi("..sample..",vi(),"sample"),this.THEORETICAL=new fi("..theoretical..",vi(),"theoretical"),this.SE=new fi("..se..",vi(),"standard error"),this.LEVEL=new fi("..level..",vi(),"level"),this.QUANTILE=new fi("..quantile..",vi(),"quantile"),this.LOWER=new fi("..lower..",vi(),"lower"),this.MIDDLE=new fi("..middle..",vi(),"middle"),this.UPPER=new fi("..upper..",vi(),"upper"),this.WIDTH=new fi("..width..",vi(),"width"),this.HEIGHT=new fi("..height..",vi(),"height"),this.BIN_WIDTH=new fi("..binwidth..",vi(),"binwidth"),this.VIOLIN_WIDTH=new fi("..violinwidth..",vi(),"violinwidth"),this.SUM=new fi("..sum..",vi(),"sum"),this.PROP=new fi("..prop..",vi(),"prop"),this.PROPPCT=new fi("..proppct..",vi(),"proppct"),this.SCALED=new fi("..scaled..",vi(),"scaled"),this.GROUP=new fi("..group..",vi(),"group"),this.IDENTITY=new jx;var e=nt([this.X,this.Y,this.COUNT,this.DENSITY,this.Y_MIN,this.Y_MAX,this.SAMPLE,this.THEORETICAL,this.SE,this.LEVEL,this.QUANTILE,this.LOWER,this.MIDDLE,this.UPPER,this.WIDTH,this.HEIGHT,this.BIN_WIDTH,this.VIOLIN_WIDTH,this.SUM,this.PROP,this.PROPPCT,this.SCALED,this.GROUP]),n=D();for(t=e.iterator();t.hasNext();){var i=t.next(),o=i.name;n.put_xwzc9p$(o,i)}this.VARS_0=n}function jx(){lv.call(this,ve())}xx.prototype.consumes=function(){return nt([ti().X,ti().Y])},xx.prototype.needSampling_0=function(t){return this.smoothingMethod_0===Ox()&&!(t<=this.loessCriticalSize_0)},xx.prototype.applySampling_0=function(t,e){return e("LOESS drew a random sample with max_n="+this.loessCriticalSize_0+", seed="+this.samplingSeed_0.toString()),XC().sampleWithoutReplacement_egh5ya$(this.loessCriticalSize_0,Tn(this.samplingSeed_0),t)},xx.prototype.apply_kdy6bf$$default=function(t,e,n){if(!this.hasRequiredValues_xht41f$(t,[ti().Y]))return this.withEmptyStatValues();var i=t;this.needSampling_0(i.rowCount())&&(i=this.applySampling_0(i,n));var o,r,a,s,l,u,p=i.getNumeric_8xm3sj$(La().Y);if(p.size<3)return this.withEmptyStatValues();if(i.has_8xm3sj$(La().X))o=i.getNumeric_8xm3sj$(La().X);else{o=c();for(var h=0;h!==p.size;++h)o.add_11rb$(h)}if(null==w.SeriesUtil.range_l63ks6$(o))return this.withEmptyStatValues();var _=this.applySmoothing_0(o,p);r=x(_.get_11rb$(Bx().X)),a=x(_.get_11rb$(Bx().Y)),s=x(_.get_11rb$(Bx().Y_MIN)),l=x(_.get_11rb$(Bx().Y_MAX)),u=x(_.get_11rb$(Bx().SE));var d=Ti().putNumeric_s1rqo9$(Bx().X,r).putNumeric_s1rqo9$(Bx().Y,a);return this.displayConfidenceInterval_0&&d.putNumeric_s1rqo9$(Bx().Y_MIN,s).putNumeric_s1rqo9$(Bx().Y_MAX,l).putNumeric_s1rqo9$(Bx().SE,u),d.build()},xx.prototype.applySmoothing_0=function(t,e){var n,i,o,r=c(),a=c(),s=c(),l=c(),p=c(),h=D(),_=Bx().X;h.put_xwzc9p$(_,r);var d=Bx().Y;h.put_xwzc9p$(d,a);var f=Bx().Y_MIN;h.put_xwzc9p$(f,s);var m=Bx().Y_MAX;h.put_xwzc9p$(m,l);var $=Bx().SE;switch(h.put_xwzc9p$($,p),this.smoothingMethod_0.name){case"LM":if(!(this.polynomialDegree_0>=1))throw u("Degree of polynomial regression must be at least 1".toString());if(1===this.polynomialDegree_0)n=new zC(t,e,this.confidenceLevel_0);else{if(!UC().canBeComputed_fgqkrm$(t,e,this.polynomialDegree_0))return h;n=new MC(t,e,this.confidenceLevel_0,this.polynomialDegree_0)}break;case"LOESS":var y=new DC(t,e,this.confidenceLevel_0,this.span_0);if(!y.canCompute)return h;n=y;break;default:throw u("Unsupported smoother method: "+this.smoothingMethod_0+" (only 'lm' and 'loess' methods are currently available)")}var g=n;if(null==(i=w.SeriesUtil.range_l63ks6$(t)))return h;var v=i,b=v.lowerEnd,x=(v.upperEnd-b)/(this.smootherPointCount_0-1|0);o=this.smootherPointCount_0;for(var k=0;k 1024 is too large!";throw u(c.toString())}}function Ux(t,e){j.call(this),this.name$=t,this.ordinal$=e}function qx(){qx=function(){},Lx=new Ux("AREA",0),zx=new Ux("COUNT",1),Dx=new Ux("WIDTH",2)}function Hx(){return qx(),Lx}function Gx(){return qx(),zx}function Kx(){return qx(),Dx}function Vx(){Yx=this,this.DEF_SCALE=Hx(),this.DEF_TRIM=!0,this.DEF_TAILS_CUTOFF=3,this.DEF_MAPPING_0=ge([m(ti().X,Bx().X),m(ti().Y,Bx().Y),m(ti().VIOLINWIDTH,Bx().VIOLIN_WIDTH)])}Fx.prototype.consumes=function(){return nt([ti().X,ti().Y,ti().WEIGHT])},Fx.prototype.apply_kdy6bf$$default=function(t,e,n){var i,o,r,a;if(!this.hasRequiredValues_xht41f$(t,[ti().Y]))return this.withEmptyStatValues();var s=t.getNumeric_8xm3sj$(La().Y);if(t.has_8xm3sj$(La().X))i=t.getNumeric_8xm3sj$(La().X);else{for(var l=s.size,u=U(l),c=0;c0?C.get_za3lpa$(N)/T:rt.NaN)}var P,I=y*x(fn(E)),A=U(F(C,10));for(P=C.iterator();P.hasNext();){var R=P.next();A.add_11rb$(R/I)}n=A;break;case"WIDTH":n=t.getNumeric_8xm3sj$(Bx().SCALED);break;default:n=e.noWhenBranchMatched()}var j=n;return t.builder().putNumeric_s1rqo9$(Bx().VIOLIN_WIDTH,j).build()},Ux.$metadata$={kind:h,simpleName:"Scale",interfaces:[j]},Ux.values=function(){return[Hx(),Gx(),Kx()]},Ux.valueOf_61zpoe$=function(t){switch(t){case"AREA":return Hx();case"COUNT":return Gx();case"WIDTH":return Kx();default:L("No enum constant jetbrains.datalore.plot.base.stat.YDensityStat.Scale."+t)}},Vx.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var Yx=null;function Wx(){return null===Yx&&new Vx,Yx}function Xx(t,e,n,i,o){Qx(),lv.call(this,Qx().DEF_MAPPING_0),this.xPosKind_0=n,this.xPos_0=i,this.method_0=o,this.binOptions_0=new Nv(t,e)}function Zx(){Jx=this,this.DEF_MAPPING_0=ge([m(ti().X,Bx().X),m(ti().Y,Bx().Y),m(ti().STACKSIZE,Bx().COUNT),m(ti().BINWIDTH,Bx().BIN_WIDTH)])}Fx.$metadata$={kind:h,simpleName:"YDensityStat",interfaces:[lv]},Xx.prototype.consumes=function(){return nt([ti().X,ti().Y])},Xx.prototype.apply_kdy6bf$$default=function(t,e,n){var i,o;if(!this.hasRequiredValues_xht41f$(t,[ti().Y]))return this.withEmptyStatValues();var r=t.getNumeric_8xm3sj$(La().Y);if(t.has_8xm3sj$(La().X))i=t.getNumeric_8xm3sj$(La().X);else{for(var a=r.size,s=U(a),l=0;le)throw V(("NumberIsTooLarge - x0:"+t+", x1:"+e).toString());return this.cumulativeProbability_14dthe$(e)-this.cumulativeProbability_14dthe$(t)},ek.prototype.value_14dthe$=function(t){return this.this$AbstractRealDistribution.cumulativeProbability_14dthe$(t)-this.closure$p},ek.$metadata$={kind:h,interfaces:[PC]},tk.prototype.inverseCumulativeProbability_14dthe$=function(t){if(t<0||t>1)throw V(("OutOfRange [0, 1] - p"+t).toString());var e=this.supportLowerBound;if(0===t)return e;var n=this.supportUpperBound;if(1===t)return n;var i,o=this.numericalMean,r=this.numericalVariance,a=Lt.sqrt(r);if(i=!(Nn(o)||un(o)||Nn(a)||un(a)),e===rt.NEGATIVE_INFINITY)if(i){var s=(1-t)/t;e=o-a*Lt.sqrt(s)}else for(e=-1;this.cumulativeProbability_14dthe$(e)>=t;)e*=2;if(n===rt.POSITIVE_INFINITY)if(i){var l=t/(1-t);n=o+a*Lt.sqrt(l)}else for(n=1;this.cumulativeProbability_14dthe$(n)=this.supportLowerBound){var h=this.cumulativeProbability_14dthe$(c);if(this.cumulativeProbability_14dthe$(c-p)===h){for(n=c;n-e>p;){var _=.5*(e+n);this.cumulativeProbability_14dthe$(_)1||e<=0||n<=0)r=rt.NaN;else if(t>(e+1)/(e+n+2))r=1-this.regularizedBeta_tychlm$(1-t,n,e,i,o);else{var a=new Ek(n,e),s=1-t,l=e*Lt.log(t)+n*Lt.log(s)-Lt.log(e)-this.logBeta_88ee24$(e,n,i,o);r=1*Lt.exp(l)/a.evaluate_syxxoe$(t,i,o)}return r},Ck.prototype.logBeta_88ee24$=function(t,e,n,i){return void 0===n&&(n=this.DEFAULT_EPSILON_0),void 0===i&&(i=2147483647),un(t)||un(e)||t<=0||e<=0?rt.NaN:Yk().logGamma_14dthe$(t)+Yk().logGamma_14dthe$(e)-Yk().logGamma_14dthe$(t+e)},Ck.$metadata$={kind:p,simpleName:"Beta",interfaces:[]};var Sk=null;function Tk(){return null===Sk&&new Ck,Sk}function Ok(){this.BLOCK_SIZE_0=52,this.rows_0=0,this.columns_0=0,this.blockRows_0=0,this.blockColumns_0=0,this.blocks_4giiw5$_0=this.blocks_4giiw5$_0}function Nk(t,e,n){return n=n||Object.create(Ok.prototype),Ok.call(n),n.rows_0=t,n.columns_0=e,n.blockRows_0=(t+n.BLOCK_SIZE_0-1|0)/n.BLOCK_SIZE_0|0,n.blockColumns_0=(e+n.BLOCK_SIZE_0-1|0)/n.BLOCK_SIZE_0|0,n.blocks_0=n.createBlocksLayout_0(t,e),n}function Pk(t,e){return e=e||Object.create(Ok.prototype),Ok.call(e),e.create_omvvzo$(t.length,t[0].length,e.toBlocksLayout_n8oub7$(t),!1),e}function Ik(){jk()}function Ak(){Rk=this,this.DEFAULT_ABSOLUTE_ACCURACY_0=1e-6}Object.defineProperty(Ok.prototype,"blocks_0",{configurable:!0,get:function(){return null==this.blocks_4giiw5$_0?Kt("blocks"):this.blocks_4giiw5$_0},set:function(t){this.blocks_4giiw5$_0=t}}),Ok.prototype.create_omvvzo$=function(t,n,i,o){var r;this.rows_0=t,this.columns_0=n,this.blockRows_0=(t+this.BLOCK_SIZE_0-1|0)/this.BLOCK_SIZE_0|0,this.blockColumns_0=(n+this.BLOCK_SIZE_0-1|0)/this.BLOCK_SIZE_0|0;var a=c();o||(this.blocks_0=i);var s=0;r=this.blockRows_0;for(var l=0;lthis.getRowDimension_0())throw V(("row out of range: "+t).toString());if(n<0||n>this.getColumnDimension_0())throw V(("column out of range: "+n).toString());var i=t/this.BLOCK_SIZE_0|0,o=n/this.BLOCK_SIZE_0|0,r=e.imul(t-e.imul(i,this.BLOCK_SIZE_0)|0,this.blockWidth_0(o))+(n-e.imul(o,this.BLOCK_SIZE_0))|0;return this.blocks_0[e.imul(i,this.blockColumns_0)+o|0][r]},Ok.prototype.getRowDimension_0=function(){return this.rows_0},Ok.prototype.getColumnDimension_0=function(){return this.columns_0},Ok.prototype.blockWidth_0=function(t){return t===(this.blockColumns_0-1|0)?this.columns_0-e.imul(t,this.BLOCK_SIZE_0)|0:this.BLOCK_SIZE_0},Ok.prototype.blockHeight_0=function(t){return t===(this.blockRows_0-1|0)?this.rows_0-e.imul(t,this.BLOCK_SIZE_0)|0:this.BLOCK_SIZE_0},Ok.prototype.toBlocksLayout_n8oub7$=function(t){for(var n=t.length,i=t[0].length,o=(n+this.BLOCK_SIZE_0-1|0)/this.BLOCK_SIZE_0|0,r=(i+this.BLOCK_SIZE_0-1|0)/this.BLOCK_SIZE_0|0,a=0;a!==t.length;++a){var s=t[a].length;if(s!==i)throw V(("Wrong dimension: "+i+", "+s).toString())}for(var l=c(),u=0,p=0;p0?k=-k:x=-x,C=p,p=c;var S=$*k,T=x>=1.5*y*k-Lt.abs(S);if(!T){var O=.5*C*k;T=x>=Lt.abs(O)}T?p=c=y:c=x/k}o=a,r=s;var N=c;Lt.abs(N)>$?a+=c:y>0?a+=$:a-=$,((s=this.computeObjectiveValue_14dthe$(a))>0&&u>0||s<=0&&u<=0)&&(l=o,u=r,p=c=a-o)}},Ak.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var Rk=null;function jk(){return null===Rk&&new Ak,Rk}function Lk(t,e){return void 0===t&&(t=jk().DEFAULT_ABSOLUTE_ACCURACY_0),pk(t,e=e||Object.create(Ik.prototype)),Ik.call(e),e}function zk(){Bk()}function Dk(){Mk=this,this.DEFAULT_EPSILON_0=1e-8}Ik.$metadata$={kind:h,simpleName:"BrentSolver",interfaces:[ck]},zk.prototype.evaluate_12fank$=function(t,e){return this.evaluate_syxxoe$(t,Bk().DEFAULT_EPSILON_0,e)},zk.prototype.evaluate_syxxoe$=function(t,e,n){void 0===e&&(e=Bk().DEFAULT_EPSILON_0),void 0===n&&(n=2147483647);for(var i=1,o=this.getA_5wr77w$(0,t),r=0,a=1,s=o/a,l=0,u=rt.MAX_VALUE;le;){l=l+1|0;var c=this.getA_5wr77w$(l,t),p=this.getB_5wr77w$(l,t),h=c*o+p*i,_=c*a+p*r,d=!1;if(Nn(h)||Nn(_)){var f=1,m=1,$=Lt.max(c,p);if($<=0)throw V("ConvergenceException".toString());d=!0;for(var y=0;y<5&&(m=f,f*=$,0!==c&&c>p?(h=o/m+p/f*i,_=a/m+p/f*r):0!==p&&(h=c/f*o+i/m,_=c/f*a+r/m),d=Nn(h)||Nn(_));y++);}if(d)throw V("ConvergenceException".toString());var g=h/_;if(un(g))throw V("ConvergenceException".toString());var v=g/s-1;u=Lt.abs(v),s=h/_,i=o,o=h,r=a,a=_}if(l>=n)throw V("MaxCountExceeded".toString());return s},Dk.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var Mk=null;function Bk(){return null===Mk&&new Dk,Mk}function Fk(t){if(Hk(),this.knots_0=t,this.ps_0=null,0===this.knots_0.length)throw u("The knots list must not be empty".toString());this.ps_0=Rn([new mC(new Float64Array([1])),new mC(new Float64Array([-An(this.knots_0),1]))])}function Uk(){qk=this,this.X=new mC(new Float64Array([0,1]))}zk.$metadata$={kind:h,simpleName:"ContinuedFraction",interfaces:[]},Fk.prototype.alphaBeta_0=function(t){var e,n;if(t!==this.ps_0.size)throw u("Alpha must be calculated sequentially.".toString());var i=_e(this.ps_0),o=this.ps_0.get_za3lpa$(this.ps_0.size-2|0),r=0,a=0,s=0;for(e=this.knots_0,n=0;n!==e.length;++n){var l=e[n],c=i.value_14dthe$(l),p=Lt.pow(c,2),h=o.value_14dthe$(l);r+=l*p,a+=p,s+=Lt.pow(h,2)}return new pe(r/a,a/s)},Fk.prototype.getPolynomial_za3lpa$=function(t){var e;if(!(t>=0))throw u("Degree of Forsythe polynomial must not be negative".toString());if(!(t=this.ps_0.size){e=t+1|0;for(var n=this.ps_0.size;n<=e;n++){var i=this.alphaBeta_0(n),o=i.component1(),r=i.component2(),a=_e(this.ps_0),s=this.ps_0.get_za3lpa$(this.ps_0.size-2|0),l=Hk().X.times_3j0b7h$(a).minus_3j0b7h$(gC(o,a)).minus_3j0b7h$(gC(r,s));this.ps_0.add_11rb$(l)}}return this.ps_0.get_za3lpa$(t)},Uk.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var qk=null;function Hk(){return null===qk&&new Uk,qk}function Gk(){Vk=this,this.GAMMA=.5772156649015329,this.DEFAULT_EPSILON_0=1e-14,this.LANCZOS_0=new Float64Array([.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22]);var t=2*Yt.PI;this.HALF_LOG_2_PI_0=.5*Lt.log(t),this.C_LIMIT_0=49,this.S_LIMIT_0=1e-5}function Kk(t){this.closure$a=t,zk.call(this)}Fk.$metadata$={kind:h,simpleName:"ForsythePolynomialGenerator",interfaces:[]},Gk.prototype.logGamma_14dthe$=function(t){var e;if(un(t)||t<=0)e=rt.NaN;else{for(var n=0,i=this.LANCZOS_0.length-1|0;i>=1;i--)n+=this.LANCZOS_0[i]/(t+i);var o=t+607/128+.5,r=(n+=this.LANCZOS_0[0])/t;e=(t+.5)*Lt.log(o)-o+this.HALF_LOG_2_PI_0+Lt.log(r)}return e},Gk.prototype.regularizedGammaP_88ee24$=function(t,e,n,i){var o;if(void 0===n&&(n=this.DEFAULT_EPSILON_0),void 0===i&&(i=2147483647),un(t)||un(e)||t<=0||e<0)o=rt.NaN;else if(0===e)o=0;else if(e>=t+1)o=1-this.regularizedGammaQ_88ee24$(t,e,n,i);else{for(var r=0,a=1/t,s=a;;){var l=a/s;if(!(Lt.abs(l)>n&&r=i)throw V(("MaxCountExceeded - maxIterations: "+i).toString());if(Nn(s))o=1;else{var u=-e+t*Lt.log(e)-this.logGamma_14dthe$(t);o=Lt.exp(u)*s}}return o},Kk.prototype.getA_5wr77w$=function(t,e){return 2*t+1-this.closure$a+e},Kk.prototype.getB_5wr77w$=function(t,e){return t*(this.closure$a-t)},Kk.$metadata$={kind:h,interfaces:[zk]},Gk.prototype.regularizedGammaQ_88ee24$=function(t,e,n,i){var o;if(void 0===n&&(n=this.DEFAULT_EPSILON_0),void 0===i&&(i=2147483647),un(t)||un(e)||t<=0||e<0)o=rt.NaN;else if(0===e)o=1;else if(e0&&t<=this.S_LIMIT_0)return-this.GAMMA-1/t;if(t>=this.C_LIMIT_0){var e=1/(t*t);return Lt.log(t)-.5/t-e*(1/12+e*(1/120-e/252))}return this.digamma_14dthe$(t+1)-1/t},Gk.prototype.trigamma_14dthe$=function(t){if(t>0&&t<=this.S_LIMIT_0)return 1/(t*t);if(t>=this.C_LIMIT_0){var e=1/(t*t);return 1/t+e/2+e/t*(1/6-e*(1/30+e/42))}return this.trigamma_14dthe$(t+1)+1/(t*t)},Gk.$metadata$={kind:p,simpleName:"Gamma",interfaces:[]};var Vk=null;function Yk(){return null===Vk&&new Gk,Vk}function Wk(t,e,n,i){Jk(),void 0===n&&(n=Jk().DEFAULT_GAMMA_EPSILON),void 0===i&&(i=Jk().DEFAULT_INVERSE_ABSOLUTE_ACCURACY),tk.call(this),this.alpha_0=t,this.beta_0=e,this.gammaEpsilon_0=n,this.solverAbsoluteAccuracy_9jc02l$_0=i,this.numericalMean_1pdjrd$_0=this.alpha_0/this.beta_0;var o=this.alpha_0,r=this.beta_0;if(this.numericalVariance_x96ws5$_0=o/Lt.pow(r,2),this.supportLowerBound_hxd5jc$_0=0,this.supportUpperBound_rhj9d5$_0=rt.POSITIVE_INFINITY,this.isSupportLowerBoundInclusive_jwso0m$_0=!1,this.isSupportUpperBoundInclusive_aib02z$_0=!1,this.isSupportConnected_4yh3i4$_0=!0,this.alpha_0<=0)throw V(("NotStrictlyPositive - alpha: "+this.alpha_0).toString());if(this.beta_0<=0)throw V(("NotStrictlyPositive - beta: "+this.beta_0).toString())}function Xk(){Zk=this,this.DEFAULT_INVERSE_ABSOLUTE_ACCURACY=1e-9,this.DEFAULT_GAMMA_EPSILON=1e-14}Object.defineProperty(Wk.prototype,"solverAbsoluteAccuracy",{get:function(){return this.solverAbsoluteAccuracy_9jc02l$_0}}),Object.defineProperty(Wk.prototype,"numericalMean",{configurable:!0,get:function(){return this.numericalMean_1pdjrd$_0}}),Object.defineProperty(Wk.prototype,"numericalVariance",{configurable:!0,get:function(){return this.numericalVariance_x96ws5$_0}}),Object.defineProperty(Wk.prototype,"supportLowerBound",{configurable:!0,get:function(){return this.supportLowerBound_hxd5jc$_0}}),Object.defineProperty(Wk.prototype,"supportUpperBound",{configurable:!0,get:function(){return this.supportUpperBound_rhj9d5$_0}}),Object.defineProperty(Wk.prototype,"isSupportLowerBoundInclusive",{configurable:!0,get:function(){return this.isSupportLowerBoundInclusive_jwso0m$_0}}),Object.defineProperty(Wk.prototype,"isSupportUpperBoundInclusive",{configurable:!0,get:function(){return this.isSupportUpperBoundInclusive_aib02z$_0}}),Object.defineProperty(Wk.prototype,"isSupportConnected",{configurable:!0,get:function(){return this.isSupportConnected_4yh3i4$_0}}),Wk.prototype.probability_14dthe$=function(t){return 0},Wk.prototype.density_14dthe$=function(t){var e,n=(e=this,function(t){return Yk().regularizedGammaP_88ee24$(e.alpha_0,e.beta_0*t,e.gammaEpsilon_0)}),i=this.gammaEpsilon_0,o=Lt.sqrt(i)*t;return(n(t+o)-n(t-o))/(2*o)},Wk.prototype.cumulativeProbability_14dthe$=function(t){return t<=0?0:t>37?1:Yk().regularizedGammaP_88ee24$(this.alpha_0,this.beta_0*t,this.gammaEpsilon_0)},Xk.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var Zk=null;function Jk(){return null===Zk&&new Xk,Zk}function Qk(t,e){void 0===t&&(t=0),void 0===e&&(e=new eC),this.maximalCount=t,this.maxCountCallback_0=e,this.count_k39d42$_0=0}function tC(){}function eC(){}function nC(t,e,n){if(sC(),void 0===t&&(t=sC().DEFAULT_BANDWIDTH),void 0===e&&(e=2),void 0===n&&(n=sC().DEFAULT_ACCURACY),this.bandwidth_0=t,this.robustnessIters_0=e,this.accuracy_0=n,this.bandwidth_0<=0||this.bandwidth_0>1)throw V(("Out of range of bandwidth value: "+this.bandwidth_0+" should be > 0 and <= 1").toString());if(this.robustnessIters_0<0)throw V(("Not positive Robutness iterationa: "+this.robustnessIters_0).toString())}function iC(){aC=this,this.DEFAULT_BANDWIDTH=.3,this.DEFAULT_ROBUSTNESS_ITERS=2,this.DEFAULT_ACCURACY=1e-12}Wk.$metadata$={kind:h,simpleName:"GammaDistribution",interfaces:[tk]},Object.defineProperty(Qk.prototype,"count",{configurable:!0,get:function(){return this.count_k39d42$_0},set:function(t){this.count_k39d42$_0=t}}),Qk.prototype.canIncrement=function(){return this.countthis.maximalCount&&this.maxCountCallback_0.trigger_za3lpa$(this.maximalCount)},Qk.prototype.resetCount=function(){this.count=0},tC.$metadata$={kind:d,simpleName:"MaxCountExceededCallback",interfaces:[]},eC.prototype.trigger_za3lpa$=function(t){throw V(("MaxCountExceeded: "+t).toString())},eC.$metadata$={kind:h,interfaces:[tC]},Qk.$metadata$={kind:h,simpleName:"Incrementor",interfaces:[]},nC.prototype.interpolate_g9g6do$=function(t,e){return(new CC).interpolate_g9g6do$(t,this.smooth_0(t,e))},nC.prototype.smooth_1=function(t,e,n){var i;if(t.length!==e.length)throw V(("Dimension mismatch of interpolation points: "+t.length+" != "+e.length).toString());var o=t.length;if(0===o)throw V("No data to interpolate".toString());if(this.checkAllFiniteReal_0(t),this.checkAllFiniteReal_0(e),this.checkAllFiniteReal_0(n),dC().checkOrder_gf7tl1$(t),1===o)return new Float64Array([e[0]]);if(2===o)return new Float64Array([e[0],e[1]]);var r=Rt(this.bandwidth_0*o);if(r<2)throw V(("LOESS 'bandwidthInPoints' is too small: "+r+" < 2").toString());var a=new Float64Array(o),s=new Float64Array(o),l=new Float64Array(o),u=new Float64Array(o);jn(u,1),i=this.robustnessIters_0;for(var c=0;c<=i;c++){for(var p=new Int32Array([0,r-1|0]),h=0;h0&&this.updateBandwidthInterval_0(t,n,h,p);for(var d=p[0],f=p[1],m=0,$=0,y=0,g=0,v=0,b=1/(t[t[h]-t[d]>t[f]-t[h]?d:f]-_),w=Lt.abs(b),x=d;x<=f;x++){var k=t[x],C=e[x],E=x=1)u[M]=0;else{var F=1-B*B;u[M]=F*F}}}return a},nC.prototype.updateBandwidthInterval_0=function(t,e,n,i){var o=i[0],r=i[1],a=this.nextNonzero_0(e,r);if(a=1)return 0;var n=1-e*e*e;return n*n*n},nC.prototype.nextNonzero_0=function(t,e){for(var n=e+1|0;n=r)break t}else if(t[o]>r)break t}r=t[o],o=o+1|0}if(o===a)return!0;if(i)throw V("Non monotonic sequence".toString());return!1},lC.prototype.checkOrder_hixecd$=function(t,e,n){this.checkOrder_j8c91m$(t,e,n,!0)},lC.prototype.checkOrder_gf7tl1$=function(t){this.checkOrder_hixecd$(t,pC(),!0)},lC.$metadata$={kind:p,simpleName:"MathArrays",interfaces:[]};var _C=null;function dC(){return null===_C&&new lC,_C}function fC(t,e){tk.call(this),this.mean_0=t,this.standardDeviation_0=e,this.numericalMean_gjvrbr$_0=this.mean_0;var n=this.standardDeviation_0;if(this.numericalVariance_rb7br7$_0=Lt.pow(n,2),this.supportLowerBound_nvcqka$_0=rt.NEGATIVE_INFINITY,this.supportUpperBound_xfiue3$_0=rt.POSITIVE_INFINITY,this.isSupportLowerBoundInclusive_ltqgv0$_0=!1,this.isSupportUpperBoundInclusive_is9x0j$_0=!1,this.isSupportConnected_nv7yly$_0=!0,this.standardDeviation_0<=0)throw V(("NotStrictlyPositive - STANDARD_DEVIATION: "+this.standardDeviation_0).toString())}function mC(t){this.coefficients_0=null;var e=null==t;if(e||(e=0===t.length),e)throw V("Empty polynomials coefficients array".toString());for(var n=t.length;n>1&&0===t[n-1|0];)n=n-1|0;this.coefficients_0=new Float64Array(n),In(t,this.coefficients_0,0,0,n)}function $C(t,e){return t+e}function yC(t,e){return t-e}function gC(t,e){return e.multiply_14dthe$(t)}function vC(t,n){if(this.knots=null,this.polynomials=null,this.n_0=0,null==t)throw V("Null argument ".toString());if(t.length<2)throw V(("Spline partition must have at least 2 points, got "+t.length).toString());if((t.length-1|0)!==n.length)throw V(("Dimensions mismatch: "+n.length+" polynomial functions != "+t.length+" segment delimiters").toString());dC().checkOrder_gf7tl1$(t),this.n_0=t.length-1|0,this.knots=t,this.polynomials=e.newArray(this.n_0,null),In(n,this.polynomials,0,0,this.n_0)}function bC(){wC=this,this.SGN_MASK_0=Hn,this.SGN_MASK_FLOAT_0=-2147483648}Object.defineProperty(fC.prototype,"numericalMean",{configurable:!0,get:function(){return this.numericalMean_gjvrbr$_0}}),Object.defineProperty(fC.prototype,"numericalVariance",{configurable:!0,get:function(){return this.numericalVariance_rb7br7$_0}}),Object.defineProperty(fC.prototype,"supportLowerBound",{configurable:!0,get:function(){return this.supportLowerBound_nvcqka$_0}}),Object.defineProperty(fC.prototype,"supportUpperBound",{configurable:!0,get:function(){return this.supportUpperBound_xfiue3$_0}}),Object.defineProperty(fC.prototype,"isSupportLowerBoundInclusive",{configurable:!0,get:function(){return this.isSupportLowerBoundInclusive_ltqgv0$_0}}),Object.defineProperty(fC.prototype,"isSupportUpperBoundInclusive",{configurable:!0,get:function(){return this.isSupportUpperBoundInclusive_is9x0j$_0}}),Object.defineProperty(fC.prototype,"isSupportConnected",{configurable:!0,get:function(){return this.isSupportConnected_nv7yly$_0}}),fC.prototype.probability_14dthe$=function(t){return 0},fC.prototype.density_14dthe$=function(t){var e=this.standardDeviation_0,n=2*Yt.PI,i=1/(e*Lt.sqrt(n)),o=Yt.E,r=(t-this.mean_0)/this.standardDeviation_0,a=-.5*Lt.pow(r,2);return i*Lt.pow(o,a)},fC.prototype.cumulativeProbability_14dthe$=function(t){var e=(t-this.mean_0)/this.standardDeviation_0;if(e<-37)return 0;if(e>37)return 1;var n=nt([220.206867912376,221.213596169931,112.079291497871,33.912866078383,6.37396220353165,.700383064443688,.0352624965998911]),i=nt([440.413735824752,793.826512519948,637.333633378831,296.564248779674,86.7807322029461,16.064177579207,1.75566716318264,.0883883476483184]),o=Lt.abs(e),r=Yt.E,a=-Lt.pow(o,2)/2,s=Lt.pow(r,a),l=o<7.07106781186547?s*((((((n.get_za3lpa$(6)*o+n.get_za3lpa$(5))*o+n.get_za3lpa$(4))*o+n.get_za3lpa$(3))*o+n.get_za3lpa$(2))*o+n.get_za3lpa$(1))*o+n.get_za3lpa$(0))/(((((((i.get_za3lpa$(7)*o+i.get_za3lpa$(6))*o+i.get_za3lpa$(5))*o+i.get_za3lpa$(4))*o+i.get_za3lpa$(3))*o+i.get_za3lpa$(2))*o+i.get_za3lpa$(1))*o+i.get_za3lpa$(0)):s/(2.506628274631*(o+1/(o+2/(o+3/(o+4/(o+.65))))));return e>0?(1-l)/this.standardDeviation_0:l/this.standardDeviation_0},fC.prototype.inverseCumulativeProbability_14dthe$=function(t){if(t<0||t>1)throw V(("OutOfRange [0, 1] - p"+t).toString());if(0===t)return this.supportLowerBound;if(1===t)return this.supportUpperBound;var e,n,i=t-.5,o=nt([3.3871328727963665,133.14166789178438,1971.5909503065513,13731.69376550946,45921.95393154987,67265.7709270087,33430.57558358813,2509.0809287301227]),r=nt([42.31333070160091,687.1870074920579,5394.196021424751,21213.794301586597,39307.89580009271,28729.085735721943,5226.495278852854]),a=nt([1.4234371107496835,4.630337846156546,5.769497221460691,3.6478483247632045,1.2704582524523684,.2417807251774506,.022723844989269184,.0007745450142783414]),s=nt([2.053191626637759,1.6763848301838038,.6897673349851,.14810397642748008,.015198666563616457,.0005475938084995345,1.0507500716444169e-9]),l=nt([6.657904643501103,5.463784911164114,1.7848265399172913,.29656057182850487,.026532189526576124,.0012426609473880784,27115555687434876e-21,2.0103343992922881e-7]),u=nt([.599832206555888,.1369298809227358,.014875361290850615,.0007868691311456133,18463183175100548e-21,1.421511758316446e-7,20442631033899397e-31]);if(Lt.abs(i)<=.425)n=i*((((((((e=.180625-Lt.pow(i,2))*o.get_za3lpa$(7)+o.get_za3lpa$(6))*e+o.get_za3lpa$(5))*e+o.get_za3lpa$(4))*e+o.get_za3lpa$(3))*e+o.get_za3lpa$(2))*e+o.get_za3lpa$(1))*e+o.get_za3lpa$(0))/(((((((e*r.get_za3lpa$(6)+r.get_za3lpa$(5))*e+r.get_za3lpa$(4))*e+r.get_za3lpa$(3))*e+r.get_za3lpa$(2))*e+r.get_za3lpa$(1))*e+r.get_za3lpa$(0))*e+1);else{var c=e=i>0?1-t:t,p=-Lt.log(c);n=(e=Lt.sqrt(p))<=5?((((((((e-=1.6)*a.get_za3lpa$(7)+a.get_za3lpa$(6))*e+a.get_za3lpa$(5))*e+a.get_za3lpa$(4))*e+a.get_za3lpa$(3))*e+a.get_za3lpa$(2))*e+a.get_za3lpa$(1))*e+a.get_za3lpa$(0))/(((((((e*s.get_za3lpa$(6)+s.get_za3lpa$(5))*e+s.get_za3lpa$(4))*e+s.get_za3lpa$(3))*e+s.get_za3lpa$(2))*e+s.get_za3lpa$(1))*e+s.get_za3lpa$(0))*e+1):((((((((e-=5)*l.get_za3lpa$(7)+l.get_za3lpa$(6))*e+l.get_za3lpa$(5))*e+l.get_za3lpa$(4))*e+l.get_za3lpa$(3))*e+l.get_za3lpa$(2))*e+l.get_za3lpa$(1))*e+l.get_za3lpa$(0))/(((((((e*u.get_za3lpa$(6)+u.get_za3lpa$(5))*e+u.get_za3lpa$(4))*e+u.get_za3lpa$(3))*e+u.get_za3lpa$(2))*e+u.get_za3lpa$(1))*e+u.get_za3lpa$(0))*e+1),i<0&&(n=-n)}return this.mean_0+this.standardDeviation_0*n},fC.$metadata$={kind:h,simpleName:"NormalDistribution",interfaces:[tk]},mC.prototype.value_14dthe$=function(t){return this.evaluate_0(this.coefficients_0,t)},mC.prototype.evaluate_0=function(t,e){if(null==t)throw V("Null argument: coefficients of the polynomial to evaluate".toString());var n=t.length;if(0===n)throw V("Empty polynomials coefficients array".toString());for(var i=t[n-1|0],o=n-2|0;o>=0;o--)i=e*i+t[o];return i},mC.prototype.unaryPlus=function(){return new mC(this.coefficients_0)},mC.prototype.unaryMinus=function(){var t,e=new Float64Array(this.coefficients_0.length);t=this.coefficients_0;for(var n=0;n!==t.length;++n){var i=t[n];e[n]=-i}return new mC(e)},mC.prototype.apply_op_0=function(t,e){for(var n=this.coefficients_0.length,i=t.coefficients_0.length,o=Lt.max(n,i),r=new Float64Array(o),a=0;a=0;e--)0!==this.coefficients_0[e]&&(0!==t.length&&t.append_pdl1vj$(" + "),t.append_pdl1vj$(this.coefficients_0[e].toString()),e>0&&t.append_pdl1vj$("x"),e>1&&t.append_pdl1vj$("^").append_s8jyv4$(e));return t.toString()},mC.$metadata$={kind:h,simpleName:"PolynomialFunction",interfaces:[]},vC.prototype.value_14dthe$=function(t){var e;if(tthis.knots[this.n_0])throw V((t.toString()+" out of ["+this.knots[0]+", "+this.knots[this.n_0]+"] range").toString());var n=cn(Bn(this.knots),t);return n<0&&(n=(0|-n)-2|0),n>=this.polynomials.length&&(n=n-1|0),null!=(e=this.polynomials[n])?e.value_14dthe$(t-this.knots[n]):null},vC.$metadata$={kind:h,simpleName:"PolynomialSplineFunction",interfaces:[]},bC.prototype.compareTo_yvo9jy$=function(t,e,n){return this.equals_yvo9jy$(t,e,n)?0:t=0;_--)p[_]=s[_]-a[_]*p[_+1|0],c[_]=(n[_+1|0]-n[_])/o[_]-o[_]*(p[_+1|0]+2*p[_])/3,h[_]=(p[_+1|0]-p[_])/(3*o[_]);for(var d=e.newArray(i,null),f=new Float64Array(4),m=0;m1?0:rt.NaN}}),Object.defineProperty(EC.prototype,"numericalVariance",{configurable:!0,get:function(){var t=this.degreesOfFreedom_0;return t>2?t/(t-2):t>1&&t<=2?rt.POSITIVE_INFINITY:rt.NaN}}),Object.defineProperty(EC.prototype,"supportLowerBound",{configurable:!0,get:function(){return rt.NEGATIVE_INFINITY}}),Object.defineProperty(EC.prototype,"supportUpperBound",{configurable:!0,get:function(){return rt.POSITIVE_INFINITY}}),Object.defineProperty(EC.prototype,"isSupportLowerBoundInclusive",{configurable:!0,get:function(){return!1}}),Object.defineProperty(EC.prototype,"isSupportUpperBoundInclusive",{configurable:!0,get:function(){return!1}}),Object.defineProperty(EC.prototype,"isSupportConnected",{configurable:!0,get:function(){return!0}}),EC.prototype.probability_14dthe$=function(t){return 0},EC.prototype.density_14dthe$=function(t){var e=this.degreesOfFreedom_0,n=(e+1)/2,i=Yk().logGamma_14dthe$(n),o=Yt.PI,r=1+t*t/e,a=i-.5*(Lt.log(o)+Lt.log(e))-Yk().logGamma_14dthe$(e/2)-n*Lt.log(r);return Lt.exp(a)},EC.prototype.cumulativeProbability_14dthe$=function(t){var e;if(0===t)e=.5;else{var n=Tk().regularizedBeta_tychlm$(this.degreesOfFreedom_0/(this.degreesOfFreedom_0+t*t),.5*this.degreesOfFreedom_0,.5);e=t<0?.5*n:1-.5*n}return e},SC.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var TC=null;function OC(){return null===TC&&new SC,TC}function NC(t,e){tk.call(this),this.a_0=t,this.b_0=e,this.numericalMean_hc49py$_0=(this.a_0+this.b_0)/2;var n=this.b_0-this.a_0;if(this.numericalVariance_d334rm$_0=Lt.pow(n,2)/12,this.supportLowerBound_wxn4f9$_0=rt.NEGATIVE_INFINITY,this.supportUpperBound_ndh0lg$_0=rt.POSITIVE_INFINITY,this.isSupportLowerBoundInclusive_nhqzoj$_0=!1,this.isSupportUpperBoundInclusive_6xcof2$_0=!1,this.isSupportConnected_92a9tj$_0=!0,this.b_0this.b_0?1:(t-this.a_0)/(this.b_0-this.a_0)},NC.prototype.inverseCumulativeProbability_14dthe$=function(t){if(t<0||t>1)throw V(("OutOfRange [0, 1] - p"+t).toString());return 0===t?this.supportLowerBound:1===t?this.supportUpperBound:this.a_0+t*(this.b_0-this.a_0)},NC.$metadata$={kind:h,simpleName:"UniformDistribution",interfaces:[tk]},PC.$metadata$={kind:d,simpleName:"UnivariateFunction",interfaces:[]},IC.$metadata$={kind:d,simpleName:"UnivariateSolver",interfaces:[kk]},AC.prototype.solve_ljmp9$=function(t,e,n){return Lk().solve_rmnly1$(2147483647,t,e,n)},AC.prototype.solve_wb66u3$=function(t,e,n,i){return Lk(i).solve_rmnly1$(2147483647,t,e,n)},AC.prototype.forceSide_i33h9z$=function(t,e,n,i,o,r,a){if(a===dk())return i;for(var s=n.absoluteAccuracy,l=i*n.relativeAccuracy,u=Lt.abs(l),c=Lt.max(s,u),p=i-c,h=Lt.max(o,p),_=e.value_14dthe$(h),d=i+c,f=Lt.min(r,d),m=e.value_14dthe$(f),$=t-2|0;$>0;){if(_>=0&&m<=0||_<=0&&m>=0)return n.solve_epddgp$($,e,h,f,i,a);var y=!1,g=!1;if(_=0?y=!0:g=!0:_>m?_<=0?y=!0:g=!0:(y=!0,g=!0),y){var v=h-c;h=Lt.max(o,v),_=e.value_14dthe$(h),$=$-1|0}if(g){var b=f+c;f=Lt.min(r,b),m=e.value_14dthe$(f),$=$-1|0}}throw V("NoBracketing".toString())},AC.prototype.bracket_cflw21$=function(t,e,n,i,o){if(void 0===o&&(o=2147483647),o<=0)throw V("NotStrictlyPositive".toString());this.verifySequence_yvo9jy$(n,e,i);var r,a,s=e,l=e,u=0;do{var c=s-1;s=Lt.max(c,n);var p=l+1;l=Lt.min(p,i),r=t.value_14dthe$(s),a=t.value_14dthe$(l),u=u+1|0}while(r*a>0&&un||l0)throw V("NoBracketing".toString());return new Float64Array([s,l])},AC.prototype.midpoint_lu1900$=function(t,e){return.5*(t+e)},AC.prototype.isBracketing_ljmp9$=function(t,e,n){var i=t.value_14dthe$(e),o=t.value_14dthe$(n);return i>=0&&o<=0||i<=0&&o>=0},AC.prototype.isSequence_yvo9jy$=function(t,e,n){return t=e)throw V("NumberIsTooLarge".toString())},AC.prototype.verifySequence_yvo9jy$=function(t,e,n){this.verifyInterval_lu1900$(t,e),this.verifyInterval_lu1900$(e,n)},AC.prototype.verifyBracketing_ljmp9$=function(t,e,n){if(this.verifyInterval_lu1900$(e,n),!this.isBracketing_ljmp9$(t,e,n))throw V("NoBracketing".toString())},AC.$metadata$={kind:p,simpleName:"UnivariateSolverUtils",interfaces:[]};var RC=null;function jC(){return null===RC&&new AC,RC}function LC(t,e,n,i){this.y=t,this.ymin=e,this.ymax=n,this.se=i}function zC(t,e,n){qC.call(this,t,e,n),this.n_0=0,this.meanX_0=0,this.sumXX_0=0,this.beta1_0=0,this.beta0_0=0,this.sy_0=0,this.tcritical_0=0;var i,o=GC(t,e),r=o.component1(),a=o.component2();this.n_0=r.length,this.meanX_0=An(r);var s=0;for(i=0;i!==r.length;++i){var l=r[i]-this.meanX_0;s+=Lt.pow(l,2)}this.sumXX_0=s;var u,c=An(a),p=0;for(u=0;u!==a.length;++u){var h=a[u]-c;p+=Lt.pow(h,2)}var _,d=p,f=0;for(_=Kn(r,a).iterator();_.hasNext();){var m=_.next(),$=m.component1(),y=m.component2();f+=($-this.meanX_0)*(y-c)}var g=f;this.beta1_0=g/this.sumXX_0,this.beta0_0=c-this.beta1_0*this.meanX_0;var v=d-g*g/this.sumXX_0,b=Lt.max(0,v)/(this.n_0-2|0);this.sy_0=Lt.sqrt(b);var w=1-n;this.tcritical_0=new EC(this.n_0-2).inverseCumulativeProbability_14dthe$(1-w/2)}function DC(t,e,n,i){var o;qC.call(this,t,e,n),this.bandwidth_0=i,this.canCompute=!1,this.n_0=0,this.meanX_0=0,this.sumXX_0=0,this.sy_0=0,this.tcritical_0=0,this.polynomial_6goixr$_0=this.polynomial_6goixr$_0;var r=VC(t,e),a=r.component1(),s=r.component2();this.n_0=a.length;var l,u=this.n_0-2,c=Rt(this.bandwidth_0*this.n_0)>=2;this.canCompute=this.n_0>=3&&u>0&&c,this.meanX_0=An(a);var p=0;for(l=0;l!==a.length;++l){var h=a[l]-this.meanX_0;p+=Lt.pow(h,2)}this.sumXX_0=p;var _,d=An(s),f=0;for(_=0;_!==s.length;++_){var m=s[_]-d;f+=Lt.pow(m,2)}var $,y=f,g=0;for($=Kn(a,s).iterator();$.hasNext();){var v=$.next(),b=v.component1(),w=v.component2();g+=(b-this.meanX_0)*(w-d)}var x=y-g*g/this.sumXX_0,k=Lt.max(0,x)/(this.n_0-2|0);if(this.sy_0=Lt.sqrt(k),this.canCompute&&(this.polynomial_0=this.getPoly_0(a,s)),this.canCompute){var C=1-n;o=new EC(u).inverseCumulativeProbability_14dthe$(1-C/2)}else o=rt.NaN;this.tcritical_0=o}function MC(t,e,n,i){if(UC(),qC.call(this,t,e,n),this.p_0=null,this.n_0=0,this.meanX_0=0,this.sumXX_0=0,this.sy_0=0,this.tcritical_0=0,!(i>=2))throw u("Degree of polynomial must be at least 2".toString());var o,r=VC(t,e),a=r.component1(),s=r.component2();if(this.n_0=a.length,!(this.n_0>i))throw u("The number of valid data points must be greater than deg".toString());this.p_0=this.calcPolynomial_0(i,a,s),this.meanX_0=An(a);var l=0;for(o=0;o!==a.length;++o){var c=a[o]-this.meanX_0;l+=Lt.pow(c,2)}this.sumXX_0=l;var p,h=(this.n_0-i|0)-1,_=0;for(p=Kn(a,s).iterator();p.hasNext();){var d=p.next(),f=d.component1(),m=d.component2()-this.p_0.value_14dthe$(f);_+=Lt.pow(m,2)}var $=_/h;this.sy_0=Lt.sqrt($);var y=1-n;this.tcritical_0=new EC(h).inverseCumulativeProbability_14dthe$(1-y/2)}function BC(){FC=this}LC.$metadata$={kind:h,simpleName:"EvalResult",interfaces:[]},LC.prototype.component1=function(){return this.y},LC.prototype.component2=function(){return this.ymin},LC.prototype.component3=function(){return this.ymax},LC.prototype.component4=function(){return this.se},LC.prototype.copy_6y0v78$=function(t,e,n,i){return new LC(void 0===t?this.y:t,void 0===e?this.ymin:e,void 0===n?this.ymax:n,void 0===i?this.se:i)},LC.prototype.toString=function(){return"EvalResult(y="+e.toString(this.y)+", ymin="+e.toString(this.ymin)+", ymax="+e.toString(this.ymax)+", se="+e.toString(this.se)+")"},LC.prototype.hashCode=function(){var t=0;return 31*(t=31*(t=31*(t=31*t+e.hashCode(this.y)|0)+e.hashCode(this.ymin)|0)+e.hashCode(this.ymax)|0)+e.hashCode(this.se)|0},LC.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.y,t.y)&&e.equals(this.ymin,t.ymin)&&e.equals(this.ymax,t.ymax)&&e.equals(this.se,t.se)},zC.prototype.value_0=function(t){return this.beta1_0*t+this.beta0_0},zC.prototype.evalX_14dthe$=function(t){var e=t-this.meanX_0,n=Lt.pow(e,2),i=this.sy_0,o=1/this.n_0+n/this.sumXX_0,r=i*Lt.sqrt(o),a=this.tcritical_0*r,s=this.value_0(t);return new LC(s,s-a,s+a,r)},zC.$metadata$={kind:h,simpleName:"LinearRegression",interfaces:[qC]},Object.defineProperty(DC.prototype,"polynomial_0",{configurable:!0,get:function(){return null==this.polynomial_6goixr$_0?Kt("polynomial"):this.polynomial_6goixr$_0},set:function(t){this.polynomial_6goixr$_0=t}}),DC.prototype.evalX_14dthe$=function(t){var e=t-this.meanX_0,n=Lt.pow(e,2),i=this.sy_0,o=1/this.n_0+n/this.sumXX_0,r=i*Lt.sqrt(o),a=this.tcritical_0*r,s=x(this.polynomial_0.value_14dthe$(t));return new LC(s,s-a,s+a,r)},DC.prototype.getPoly_0=function(t,e){return new nC(this.bandwidth_0,4).interpolate_g9g6do$(t,e)},DC.$metadata$={kind:h,simpleName:"LocalPolynomialRegression",interfaces:[qC]},MC.prototype.calcPolynomial_0=function(t,e,n){for(var i=new Fk(e),o=new mC(new Float64Array([0])),r=0;r<=t;r++){var a=i.getPolynomial_za3lpa$(r),s=this.coefficient_0(a,e,n);o=o.plus_3j0b7h$(gC(s,a))}return o},MC.prototype.coefficient_0=function(t,e,n){for(var i=0,o=0,r=0;rn},BC.$metadata$={kind:p,simpleName:"Companion",interfaces:[]};var FC=null;function UC(){return null===FC&&new BC,FC}function qC(t,e,n){if(!Qt(.01,.99).contains_mef7kx$(n))throw u(("Confidence level is out of range [0.01-0.99]. CL:"+n).toString());if(t.size!==e.size){var i="X/Y must have same size. X:"+Y(t.size)+" Y:"+Y(e.size);throw u(i.toString())}}MC.$metadata$={kind:h,simpleName:"PolynomialRegression",interfaces:[qC]},qC.$metadata$={kind:h,simpleName:"RegressionEvaluator",interfaces:[]};var HC=Ot((function(){var t=e.kotlin.comparisons.compareValues_s00gnj$;return function(e){return function(n,i){var o=e;return t(o(n),o(i))}}}));function GC(t,e){var n,i=c(),o=c();for(n=Wn(Yn(t),Yn(e)).iterator();n.hasNext();){var r=n.next(),a=r.component1(),s=r.component2();w.SeriesUtil.allFinite_jma9l8$(a,s)&&(i.add_11rb$(x(a)),o.add_11rb$(x(s)))}return new pe(Vn(i),Vn(o))}function KC(t){return t.first}function VC(t,e){var n=function(t,e){var n,i=c();for(n=Wn(Yn(t),Yn(e)).iterator();n.hasNext();){var o=n.next(),r=o.component1(),a=o.component2();w.SeriesUtil.allFinite_jma9l8$(r,a)&&i.add_11rb$(new pe(x(r),x(a)))}return i}(t,e);n.size>1&&yn(n,new gt(HC(KC)));var i=function(t){var e;if(t.isEmpty())return new pe(c(),c());var n=c(),i=c(),o=Zt(t),r=o.component1(),a=o.component2(),s=1;for(e=Xn(Yn(t),1).iterator();e.hasNext();){var l=e.next(),u=l.component1(),p=l.component2();u===r?(a+=p,s=s+1|0):(n.add_11rb$(r),i.add_11rb$(a/s),r=u,a=p,s=1)}return n.add_11rb$(r),i.add_11rb$(a/s),new pe(n,i)}(n);return new pe(Vn(i.first),Vn(i.second))}function YC(){WC=this}YC.prototype.sampleWithoutReplacement_o7ew15$=function(t,e,n,i,o){for(var r=e<=(t/2|0),a=r?e:t-e|0,s=$n();s.size "+_(a)),V(t.hoveredControl_0).dispatch_w7zfbj$(D.MOUSE_LEFT,e),t.hoveredControl_0=a,V(t.hoveredControl_0).dispatch_w7zfbj$(D.MOUSE_ENTERED,e);else null!=a&&(t.debugTrace_0&&f("entered on "+_(t.hoveredControl_0)),t.hoveredControl_0=a,V(t.hoveredControl_0).dispatch_w7zfbj$(D.MOUSE_ENTERED,e));return t.dispatchGlobalEvent_0(D.MOUSE_MOVED,e),g}}(this)))),this.regs_0.add_3xv6fb$(this.mouseEventPeer_0.addEventHandler_mfdhbe$(D.MOUSE_DRAGGED,M(function(t){return function(e){var n;return null!=(n=t.hoveredControl_0)&&n.dispatch_w7zfbj$(D.MOUSE_DRAGGED,e),t.dispatchGlobalEvent_0(D.MOUSE_DRAGGED,e),g}}(this)))),this.regs_0.add_3xv6fb$(this.mouseEventPeer_0.addEventHandler_mfdhbe$(D.MOUSE_CLICKED,M(function(t){return function(e){var n;return null!=(n=t.hoveredControl_0)&&n.dispatch_w7zfbj$(D.MOUSE_CLICKED,e),t.dispatchGlobalEvent_0(D.MOUSE_CLICKED,e),g}}(this)))),this.regs_0.add_3xv6fb$(this.mouseEventPeer_0.addEventHandler_mfdhbe$(D.MOUSE_DOUBLE_CLICKED,M(function(t){return function(e){var n;return null!=(n=t.hoveredControl_0)&&n.dispatch_w7zfbj$(D.MOUSE_DOUBLE_CLICKED,e),t.dispatchGlobalEvent_0(D.MOUSE_DOUBLE_CLICKED,e),g}}(this)))),this.regs_0.add_3xv6fb$(this.mouseEventPeer_0.addEventHandler_mfdhbe$(D.MOUSE_PRESSED,M(function(t){return function(e){var n;return null!=(n=t.hoveredControl_0)&&n.dispatch_w7zfbj$(D.MOUSE_PRESSED,e),t.dispatchGlobalEvent_0(D.MOUSE_PRESSED,e),g}}(this)))),this.regs_0.add_3xv6fb$(this.mouseEventPeer_0.addEventHandler_mfdhbe$(D.MOUSE_RELEASED,M(function(t){return function(e){var n;return null!=(n=t.hoveredControl_0)&&n.dispatch_w7zfbj$(D.MOUSE_RELEASED,e),t.dispatchGlobalEvent_0(D.MOUSE_RELEASED,e),g}}(this)))),this.regs_0.add_3xv6fb$(this.mouseEventPeer_0.addEventHandler_mfdhbe$(D.MOUSE_ENTERED,M(function(t){return function(e){var n;return null!=(n=t.hoveredControl_0)&&n.dispatch_w7zfbj$(D.MOUSE_ENTERED,e),t.dispatchGlobalEvent_0(D.MOUSE_ENTERED,e),g}}(this))))}function Oe(t,e,n){this.this$EventsManager=t,this.closure$e=e,this.closure$handler=n,s.call(this)}function Ne(t,e){Ie.call(this),this.uncheckedContent_0=t,this.checkedContent_0=e,this.isChecked_0=!1,this.clickHandler_0=null,this.toggleHandler_0=null,this.size_be1kba$_0=new k(24,24)}function Pe(t){Ie.call(this),this.buttons_0=t;var e,n={v:0};for(e=this.buttons_0.iterator();e.hasNext();){var i=e.next();i.origin=new k(n.v,0),n.v+=i.size.x}var o,r=this.buttons_0,a=z("addChildren",function(t,e){return t.addChildren_wjwrpf$(e),g}.bind(null,this));for(o=r.iterator();o.hasNext();)a(o.next())}function Ie(){this.parent_x76nq7$_0=null,this.svgComponent_jq07bk$_0=new Ae(this),this.children=$(),this.origin_qfmyzn$_0=k.Companion.ZERO}function Ae(t){this.this$UiControl=t,it.call(this)}function Re(){it.call(this),this.hLine_0=new ot,this.hOutline_0=new ot,this.vLine_0=new ot,this.vOutline_0=new ot;var t=je;t(this.hLine_0),t(this.hOutline_0,!0),t(this.vLine_0),t(this.vOutline_0,!0)}function je(t,e){var n,i;void 0===e&&(e=!1);var o=w.Companion.WHITE,r=null!=(n=e?o:null)?n:w.Companion.GRAY,a=null!=(i=e?1.5:null)?i:1;t.strokeColor().set_11rb$(r),t.strokeWidth().set_11rb$(a)}function Le(t,e){this.itemFactory_0=t,this.parent_0=e,this.components_0=$()}function ze(){en(),it.call(this),this.myPointerBox_0=new Ye(this),this.myContentBox_0=new We(this),this.myHorizontalContentPadding_0=T.Tooltip.H_CONTENT_PADDING,this.myVerticalContentPadding_0=T.Tooltip.V_CONTENT_PADDING,this.myYPositionsBetweenLines_0=$(),this.myDebugRectangles_0=new Le(z("RectangleComponent",(function(){return new Qe})),this.rootGroup)}function De(t,e){ut.call(this),this.name$=t,this.ordinal$=e}function Me(){Me=function(){},he=new De("VERTICAL",0),_e=new De("HORIZONTAL",1)}function Be(){return Me(),he}function Fe(){return Me(),_e}function Ue(t,e){ut.call(this),this.name$=t,this.ordinal$=e}function qe(){qe=function(){},de=new Ue("LEFT",0),fe=new Ue("RIGHT",1),me=new Ue("UP",2),$e=new Ue("DOWN",3)}function He(){return qe(),de}function Ge(){return qe(),fe}function Ke(){return qe(),me}function Ve(){return qe(),$e}function Ye(t){this.$outer=t,it.call(this),this.myPointerPath_0=new _t,this.pointerDirection=null,this.myBorderRadius_0=0,this.myHighlightPoint_0=new _t}function We(t){this.$outer=t,it.call(this);var e=new Ct;e.x().set_11rb$(0),e.y().set_11rb$(0),e.width().set_11rb$(0),e.height().set_11rb$(0),this.myTitleContainer_0=e;var n=new Ct;n.x().set_11rb$(0),n.y().set_11rb$(0),n.width().set_11rb$(0),n.height().set_11rb$(0),this.myLinesContainer_0=n;var i=new Ct;i.x().set_11rb$(0),i.y().set_11rb$(0),i.width().set_11rb$(0),i.height().set_11rb$(0),this.myContent_0=i;for(var o=F(3),r=0;r<3;r++)o.add_11rb$(new _t);this.myColorBars_0=o,this.colorBarIndent_0=0}function Xe(t,e){t.strokeWidth().set_11rb$(T.Tooltip.LINE_SEPARATOR_WIDTH),t.strokeOpacity().set_11rb$(1),t.strokeColor().set_11rb$(w.Companion.VERY_LIGHT_GRAY),e.children().add_11rb$(t)}function Ze(t,e,n){t.update_wo1ut2$(V(e.x().get()),V(e.y().get()),V(e.width().get()),V(e.height().get()),n)}function Je(){tn=this,this.DEBUG_DRAWING_0=!1;this.TRIANGLE_POINTS_0=x([new k(0,0),new k(4,9),new k(-4,9)])}function Qe(){it.call(this),this.myRect_0=new _t,this.myRect_0.strokeWidth().set_11rb$(1),this.myRect_0.fillOpacity().set_11rb$(0)}ue.$metadata$={kind:h,simpleName:"DrawRectFeedback",interfaces:[le]},ve.$metadata$={kind:q,simpleName:"InteractionContext",interfaces:[]},be.$metadata$={kind:q,simpleName:"InteractionTarget",interfaces:[]},Object.defineProperty(we.prototype,"started_0",{configurable:!0,get:function(){return null!=this._target_0}}),Object.defineProperty(we.prototype,"target",{configurable:!0,get:function(){var t;if(null==(t=this._target_0))throw W("Mouse drag target wasn't acquired.");return t}}),Object.defineProperty(we.prototype,"dragFrom",{configurable:!0,get:function(){if(!this.started_0)throw d("Mouse drag target wasn't acquired.".toString());return this.dragFrom_6tfci7$_0},set:function(t){this.dragFrom_6tfci7$_0=t}}),Object.defineProperty(we.prototype,"dragTo",{configurable:!0,get:function(){if(!this.started_0)throw d("Mouse drag target wasn't acquired.".toString());return this.dragTo_x6h3oi$_0},set:function(t){this.dragTo_x6h3oi$_0=t}}),we.prototype.loop_qi10rw$=function(t,e,n,i){if(this.disposed_0)throw W("Disposed.".toString());if(this.started_0)throw W("Mouse drag has already started.".toString());var o,r;this.reg_0.add_3xv6fb$(this.ctx_0.eventsManager.onMouseEvent_bp1xvi$(D.MOUSE_RELEASED,(o=this,r=n,function(t,e){if(o.started_0&&!o.completed_0&&!o.aborted_0){var n=e.location.toDoubleVector();o.completed_0=!0,o.dragTo=n,r(o)}return g}))),this.reg_0.add_3xv6fb$(this.ctx_0.eventsManager.onMouseEvent_bp1xvi$(D.MOUSE_DRAGGED,function(t,e,n){return function(i,o){var r;if(!t.completed_0&&!t.aborted_0){var a=o.location.toDoubleVector();if(t.started_0)t.dragTo=a,n(t);else if(null!=(r=t.ctx_0.findTarget_gpjtzr$(a))){var s=t,l=e;s._target_0=r,s.dragFrom=a,s.dragTo=a,l(s)}}return g}}(this,t,e)))},we.prototype.reset=function(){if(this.disposed_0)throw W("Disposed.".toString());f("MouseDragInteraction reset."),this._target_0=null,this.completed_0=!1,this.aborted_0=!1},we.prototype.dispose=function(){this.disposed_0||(f("MouseDragInteraction dispose."),this.disposed_0=!0,this._target_0=null,this.reg_0.dispose())},we.$metadata$={kind:h,simpleName:"MouseDragInteraction",interfaces:[b]},Se.prototype.dispose=function(){f("PanGeomFeedback dispose."),this.closure$interaction.dispose()},Se.$metadata$={kind:h,interfaces:[b]},xe.prototype.start_cdhu05$=function(t){var e,n=new we(t);return n.loop_qi10rw$(ke,Ce,(e=this,function(t){f("PanGeomFeedback complete.");var n=t.dragTo.subtract_gpjtzr$(t.dragFrom),i=t.target;return t.reset(),e.onCompleted_0(G(n,i)),g}),Ee),new Se(n)},xe.$metadata$={kind:h,simpleName:"PanGeomFeedback",interfaces:[le]},Te.prototype.setEventSource_u4bej9$=function(t){this.mouseEventPeer_0.addEventSource_u4bej9$(t)},Te.prototype.register_wjwrpf$=function(t){this.controls_0.add_11rb$(t);var e,n=t.children,i=z("add",function(t,e){return t.add_11rb$(e)}.bind(null,this.controls_0));for(e=n.iterator();e.hasNext();)i(e.next())},Oe.prototype.doRemove=function(){X(this.this$EventsManager.globalMouseEventHandlers_0,this.closure$e).remove_11rb$(this.closure$handler)},Oe.$metadata$={kind:h,interfaces:[s]},Te.prototype.onMouseEvent_bp1xvi$=function(t,e){var n,i=this.globalMouseEventHandlers_0,o=i.get_11rb$(t);if(null==o){var r=$();i.put_xwzc9p$(t,r),n=r}else n=o;return n.add_11rb$(e),new Oe(this,t,e)},Te.prototype.dispatchGlobalEvent_0=function(t,e){var n,i;if(null!=(n=this.globalMouseEventHandlers_0.get_11rb$(t)))for(i=n.iterator();i.hasNext();)i.next()(this.hoveredControl_0,e)},Te.prototype.dispose=function(){this.regs_0.dispose()},Te.$metadata$={kind:h,simpleName:"EventsManager",interfaces:[b]},Object.defineProperty(Ne.prototype,"size",{configurable:!0,get:function(){return this.size_be1kba$_0},set:function(t){this.size_be1kba$_0=t,this.updateContent_0()}}),Ne.prototype.buildUiComponent_rd81cl$=function(t){Ie.prototype.buildUiComponent_rd81cl$.call(this,t),this.updateContent_0()},Ne.prototype.onMouseClicked_l3vbzk$=function(t){var e,n;this.isChecked_0=!this.isChecked_0,null!=(e=this.clickHandler_0)&&e(),null!=(n=this.toggleHandler_0)&&n(this.isChecked_0),this.updateContent_0()},Ne.prototype.updateContent_0=function(){this.checkedContent_0.setAttribute_jyasbz$(et.SvgConstants.WIDTH,this.size.x.toString()),this.checkedContent_0.setAttribute_jyasbz$(et.SvgConstants.HEIGHT,this.size.y.toString()),this.uncheckedContent_0.setAttribute_jyasbz$(et.SvgConstants.WIDTH,this.size.x.toString()),this.uncheckedContent_0.setAttribute_jyasbz$(et.SvgConstants.HEIGHT,this.size.y.toString()),this.svgRoot.children().clear(),this.isChecked_0?this.svgRoot.children().add_11rb$(this.checkedContent_0):this.svgRoot.children().add_11rb$(this.uncheckedContent_0)},Ne.prototype.onClick_o14v8n$=function(t){this.clickHandler_0=t},Ne.prototype.onToggleClick_y8twos$=function(t){this.toggleHandler_0=t},Ne.$metadata$={kind:h,simpleName:"ToggleButtonControl",interfaces:[Ie]},Object.defineProperty(Pe.prototype,"size",{configurable:!0,get:function(){var t,e=0;for(t=this.buttons_0.iterator();t.hasNext();)e+=t.next().size.x;var n=this.buttons_0.iterator();if(!n.hasNext())throw nt();for(var i=n.next().size.y;n.hasNext();){var o=n.next().size.y;i=Y.max(i,o)}return new k(e,i)}}),Pe.prototype.onMouseLeft_l3vbzk$=function(t){this.svgRoot.opacity().set_11rb$(.2)},Pe.prototype.onMouseEntered_l3vbzk$=function(t){this.svgRoot.opacity().set_11rb$(1)},Pe.$metadata$={kind:h,simpleName:"ToolboxControl",interfaces:[Ie]},Object.defineProperty(Ie.prototype,"svgRoot",{configurable:!0,get:function(){return this.svgComponent_jq07bk$_0.rootGroup}}),Object.defineProperty(Ie.prototype,"origin",{configurable:!0,get:function(){return this.origin_qfmyzn$_0},set:function(t){this.origin_qfmyzn$_0=t,this.svgComponent_jq07bk$_0.moveTo_gpjtzr$(t)}}),Object.defineProperty(Ie.prototype,"bbox",{configurable:!0,get:function(){for(var t=this.parent_x76nq7$_0,e=this.origin;null!=t;)e=e.add_gpjtzr$(t.origin),t=t.parent_x76nq7$_0;return new L(e,this.size)}}),Ie.prototype.addChildren_wjwrpf$=function(t){t.parent_x76nq7$_0=this,this.children.add_11rb$(t)},Ie.prototype.buildUiComponent_rd81cl$=function(t){var e;for(e=this.children.iterator();e.hasNext();){var n=e.next();t.children().add_11rb$(n.svgRoot)}},Ie.prototype.dispatch_w7zfbj$=function(t,e){switch(t.name){case"MOUSE_ENTERED":this.onMouseEntered_l3vbzk$(e);break;case"MOUSE_LEFT":this.onMouseLeft_l3vbzk$(e);break;case"MOUSE_MOVED":this.onMouseMoved_l3vbzk$(e);break;case"MOUSE_DRAGGED":this.onMouseDragged_l3vbzk$(e);break;case"MOUSE_CLICKED":this.onMouseClicked_l3vbzk$(e);break;case"MOUSE_DOUBLE_CLICKED":this.onMouseDoubleClicked_l3vbzk$(e);break;case"MOUSE_PRESSED":this.onMousePressed_l3vbzk$(e);break;case"MOUSE_RELEASED":this.onMouseReleased_l3vbzk$(e)}},Ie.prototype.onMouseClicked_l3vbzk$=function(t){},Ie.prototype.onMouseEntered_l3vbzk$=function(t){},Ie.prototype.onMouseLeft_l3vbzk$=function(t){},Ie.prototype.onMouseMoved_l3vbzk$=function(t){},Ie.prototype.onMouseDragged_l3vbzk$=function(t){},Ie.prototype.onMousePressed_l3vbzk$=function(t){},Ie.prototype.onMouseReleased_l3vbzk$=function(t){},Ie.prototype.onMouseDoubleClicked_l3vbzk$=function(t){},Ae.prototype.buildComponent=function(){this.this$UiControl.buildUiComponent_rd81cl$(this.rootGroup)},Ae.$metadata$={kind:h,interfaces:[it]},Ie.$metadata$={kind:h,simpleName:"UiControl",interfaces:[]},Re.prototype.buildComponent=function(){this.add_26jijc$(this.hOutline_0),this.add_26jijc$(this.hLine_0),this.add_26jijc$(this.vOutline_0),this.add_26jijc$(this.vLine_0)},Re.prototype.update_tm920k$=function(t,e,n,i){this.updateLine_0(i,!0,t.x,e.bottom,t.x,e.top),this.updateLine_0(n,!1,e.left,t.y,e.right,t.y)},Re.prototype.updateLine_0=function(t,e,n,i,o,r){var a,s,l,u,c,p=(a=t,s=n,l=i,u=o,c=r,function(t){var e,n;n=t.visibility();var i=O.VISIBLE;n.set_11rb$(null!=(e=a?i:null)?e:O.HIDDEN),t.x1().set_11rb$(s),t.y1().set_11rb$(l),t.x2().set_11rb$(u),t.y2().set_11rb$(c)});!0===e?(p(this.vLine_0),p(this.vOutline_0)):!1===e&&(p(this.hLine_0),p(this.hOutline_0))},Re.$metadata$={kind:h,simpleName:"CrosshairComponent",interfaces:[it]},Le.prototype.provide_za3lpa$=function(t){var e,n,i,o,r=this.components_0.size-t|0;if(0===r)e=rt(),n=rt();else if(r>0)e=P(at(this.components_0,r)),n=rt();else{if(!(r<0))throw W("Can't happen");e=rt();for(var a=st(r),s=F(a),l=0;l1?T.Tooltip.CONTENT_EXTENDED_PADDING:T.Tooltip.H_CONTENT_PADDING,this.myVerticalContentPadding_0=h>1?T.Tooltip.CONTENT_EXTENDED_PADDING:T.Tooltip.V_CONTENT_PADDING,this.myYPositionsBetweenLines_0.clear(),this.myContentBox_0.update_f4wiq6$(o,r,e,l,s,c,a),this.myPointerBox_0.updateStyle_q7br6u$(t,n,i,u,p)},ze.prototype.setPosition_uizhs2$=function(t,e,n,i){void 0===i&&(i=!1);var o=i?T.Tooltip.ROTATION_ANGLE:0;this.rotate_14dthe$(o);var r=e.subtract_gpjtzr$(t).rotate_14dthe$(pt(-o));this.myPointerBox_0.update_n02v9$(r,n,i),this.moveTo_gpjtzr$(t),en().DEBUG_DRAWING_0&&this.myContentBox_0.drawDebugRect()},Ye.prototype.buildComponent=function(){this.add_26jijc$(this.myPointerPath_0),this.add_26jijc$(this.myHighlightPoint_0)},Ye.prototype.updateStyle_q7br6u$=function(t,e,n,i,o){this.myBorderRadius_0=i;var r=this.myPointerPath_0;r.strokeColor().set_11rb$(e),r.strokeWidth().set_11rb$(n),r.fillColor().set_11rb$(t);var a=this.myHighlightPoint_0,s=null!=t&&t.equals(o)?e:t;a.fillColor().set_11rb$(s),a.strokeWidth().set_11rb$(1),a.strokeColor().set_11rb$(o)},Ye.prototype.update_n02v9$=function(t,n,i){var o;if(i)o=null;else switch(n.name){case"HORIZONTAL":o=t.xthis.$outer.contentRect.right?Ge():null;break;case"VERTICAL":o=t.y>this.$outer.contentRect.bottom?Ve():t.y0?i:null)?e:0,r=T.Tooltip.COLOR_BAR_STROKE_WIDTH,a=null!=(n=t>1?r:null)?n:0;return x([a,o,a])},We.prototype.calculateColorBarIndent_0=function(t){var e=this.myColorBars_0.size,n=t.size,i=Y.min(e,n);this.$outer;var o=this.$outer,r=mt(this.colorBarsWidth_0(i));this.colorBarIndent_0=0!==r?r+o.myHorizontalContentPadding_0:0},We.prototype.layoutColorBars_0=function(t){var e,n=$t(t),i=t.size>1?t.get_za3lpa$(1):null;for(e=C(this.myColorBars_0,x([i,n,i])).iterator();e.hasNext();){var o=e.next(),r=o.component1(),a=o.component2();null==a?r.fillOpacity().set_11rb$(0):(r.fillOpacity().set_11rb$(1),r.fillColor().set_11rb$(a))}var s,l,u={v:this.$outer.contentRect.left+this.$outer.myHorizontalContentPadding_0},c=C(this.myColorBars_0,this.colorBarsWidth_0(t.size)),p=$();for(s=c.iterator();s.hasNext();){var h=s.next(),_=h.component1();V(_.fillOpacity().get())>0&&p.add_11rb$(h)}for(l=p.iterator();l.hasNext();){var d=l.next(),f=d.component1(),m=d.component2(),y=f.d(),g=new ht,v=V(this.myLinesContainer_0.y().get()),b=V(this.myLinesContainer_0.height().get());g.moveTo_przk3b$(u.v,v),g.horizontalLineTo_8555vt$(u.v+m),g.verticalLineTo_8555vt$(b),g.horizontalLineTo_8555vt$(u.v),g.verticalLineTo_8555vt$(v),y.set_11rb$(g.build()),u.v+=m}},We.prototype.getBBox_0=function(t){return null==t||yt(t.text)?null:t.rootGroup.bBox},We.prototype.initTitleComponent_0=function(t){var e,n=new gt(en().wrap_0(t,null));n.addClassName_61zpoe$(j.Style.TOOLTIP_TITLE),n.setHorizontalAnchor_mf4siq$(vt.MIDDLE);var i=null!=(e=this.estimateLineHeight_0(t,j.Style.TOOLTIP_TITLE))?e:0;return n.setLineHeight_14dthe$(i+T.Tooltip.INTERVAL_BETWEEN_SUBSTRINGS),this.myTitleContainer_0.children().add_11rb$(n.rootGroup),n},We.prototype.estimateLineHeight_0=function(t,e){var n,i,o,r,a;if(null!=(n=null!=t?bt(t,["\n"]):null)){var s,l=F(B(n,10));for(s=n.iterator();s.hasNext();){var u=s.next(),c=l.add_11rb$,p=new gt(u);p.addClassName_61zpoe$(e),c.call(l,p)}r=l}else r=null;if(null!=(i=r)){var h,_=$();for(h=i.iterator();h.hasNext();){var d,f,m=h.next(),y=this.myLinesContainer_0.children();y.add_11rb$(m.rootGroup);var g=null!=(f=this.getBBox_0(m))?f.height:null;y.remove_11rb$(m.rootGroup),null!=(d=g)&&_.add_11rb$(d)}a=_}else a=null;return null!=(o=a)?ft(o):null},We.prototype.layoutTitle_0=function(t,e,n){return null==t?k.Companion.ZERO:(t.setX_14dthe$(e/2),t.setY_14dthe$(-n.top),new k(e,this.$outer.myVerticalContentPadding_0+n.height))},We.prototype.layoutLines_0=function(t,e,n,i,o){var r,a,s=F(B(t,10));for(a=t.iterator();a.hasNext();){var l,u=a.next();s.add_11rb$(new wt(null!=(l=u.label)?new gt(en().wrap_0(l,null)):null,new gt(en().wrap_0(u.value,30))))}var c,p,h=s;for(c=h.iterator();c.hasNext();){var _=c.next().component1();null!=_&&(_.addClassName_61zpoe$(j.Style.TOOLTIP_LABEL),this.myLinesContainer_0.children().add_11rb$(_.rootGroup))}for(p=h.iterator();p.hasNext();){var d=p.next().component2();d.addClassName_61zpoe$(o),null!=e&&z("set",function(t,e){return t.set_11rb$(e),g}.bind(null,d.textColor()))(e),this.myLinesContainer_0.children().add_11rb$(d.rootGroup)}var f,m=F(B(t,10));for(f=t.iterator();f.hasNext();){var $,y=f.next();m.add_11rb$(null!=($=ft(dt([this.estimateLineHeight_0(y.label,j.Style.TOOLTIP_LABEL),this.estimateLineHeight_0(y.value,o)])))?$:0)}var v,b=m;for(v=C(b,h).iterator();v.hasNext();){var w=v.next(),x=w.component1(),E=w.component2(),S=E.component1(),O=E.component2();null!=S&&S.setLineHeight_14dthe$(x+T.Tooltip.INTERVAL_BETWEEN_SUBSTRINGS),O.setLineHeight_14dthe$(x+T.Tooltip.INTERVAL_BETWEEN_SUBSTRINGS)}var N,P=F(B(h,10));for(N=h.iterator();N.hasNext();){var I=N.next(),A=P.add_11rb$,R=I.component1(),D=I.component2();A.call(P,G(this.getBBox_0(R),this.getBBox_0(D)))}var M=P,U=M.iterator();if(!U.hasNext())throw nt();for(var q,H=U.next().component1(),K=null!=(q=null!=H?H.width:null)?q:0;U.hasNext();){var W,X=U.next().component1(),Z=null!=(W=null!=X?X.width:null)?W:0;K=Y.max(K,Z)}var J,Q=K,tt=null!=(r=ft(b))?r:0,et=C(t,h),it=F(B(et,10));for(J=et.iterator();J.hasNext();){var ot,rt=J.next(),at=it.add_11rb$,st=rt.component1(),lt=rt.component2();ot=null==st.label?0:0===V(st.label).length&&1===lt.second.linesCount()?Q:Q+T.Tooltip.LABEL_VALUE_INTERVAL,at.call(it,ot)}var ut,ct=it,pt=F(B(M,10));for(ut=M.iterator();ut.hasNext();){var ht,_t,mt=ut.next(),$t=pt.add_11rb$,yt=mt.component2();$t.call(pt,null!=(_t=null!=(ht=null!=yt?yt.dimension:null)?ht.x:null)?_t:0)}var bt=C(ct,pt),kt=bt.iterator();if(!kt.hasNext())throw nt();for(var Ct=kt.next(),Et=null!=n?n:0,St=Ct.component1()+Ct.component2(),Tt=Y.max(Et,St);kt.hasNext();){var Ot=kt.next(),Nt=null!=n?n:0,Pt=Ot.component1()+Ot.component2(),It=Y.max(Nt,Pt);Tt=Y.max(Tt,It)}var At,Rt=Tt,jt=C(M,bt),Lt=F(B(jt,10));for(At=jt.iterator();At.hasNext();){var zt,Dt,Mt,Bt,Ft=At.next(),Ut=Lt.add_11rb$,qt=Ft.component1(),Ht=Ft.component2(),Gt=qt.component1(),Kt=qt.component2(),Vt=Ht.component1(),Yt=Ht.component2(),Wt=new k(Vt,null!=(zt=null!=Gt?Gt.height+Gt.top:null)?zt:0);null==(Dt=null!=Kt?Kt.height+Kt.top:null)&&(Dt=null==Gt?tt:0);var Xt=new k(Yt,Dt);Ut.call(Lt,new wt(new L(null!=(Mt=null!=Gt?Gt.origin:null)?Mt:k.Companion.ZERO,Wt),new L(null!=(Bt=null!=Kt?Kt.origin:null)?Bt:k.Companion.ZERO,Xt)))}var Zt,Jt=C(h,Lt),Qt=k.Companion.ZERO;this.$outer;var te=Qt;for(Zt=Jt.iterator();Zt.hasNext();){var ee=Zt.next(),ne=this.$outer,ie=te,oe=ee.component1(),re=ee.component2(),ae=oe.component1(),se=oe.component2(),le=re.component1(),ue=re.component2(),ce=ie.y,pe=ue.top,he=le.top,_e=ce-Y.min(pe,he);se.setY_14dthe$(_e),null!=ae&&ae.setY_14dthe$(_e),null!=ae&&le.dimension.x>0?(ae.setX_14dthe$(-le.left),se.linesCount()>1?(se.setX_14dthe$(Q+T.Tooltip.LABEL_VALUE_INTERVAL),se.setHorizontalAnchor_mf4siq$(vt.LEFT)):(se.setX_14dthe$(Rt),se.setHorizontalAnchor_mf4siq$(vt.RIGHT))):ue.dimension.x===Rt&&1===se.linesCount()?se.setX_14dthe$(-ue.left):(se.setX_14dthe$(Rt/2),se.setHorizontalAnchor_mf4siq$(vt.MIDDLE));var de=ue.height,fe=le.height,me=_e+Y.max(de,fe);ne.myYPositionsBetweenLines_0.add_11rb$(me+T.Tooltip.LINE_INTERVAL/2),te=new k(Rt,me+T.Tooltip.LINE_INTERVAL)}var $e=te.subtract_gpjtzr$(new k(0,T.Tooltip.LINE_INTERVAL));return this.$outer,xt(this.$outer.myYPositionsBetweenLines_0),$e},We.prototype.drawLineSeparators_0=function(t,e){var n=Xe;if(null!=t){var i=new ht;this.$outer;var o=this.$outer;i.moveTo_przk3b$(o.myHorizontalContentPadding_0,t),i.horizontalLineTo_8555vt$(V(this.myTitleContainer_0.width().get())-o.myHorizontalContentPadding_0);var r=i.build();n(kt(r),this.myTitleContainer_0)}this.$outer;var a,s,l=F(B(e,10));for(a=e.iterator();a.hasNext();){var u=a.next(),c=l.add_11rb$,p=this.$outer,h=new ht,_=this.myContent_0;h.moveTo_przk3b$(V(_.x().get())+2,u),h.horizontalLineTo_8555vt$(V(_.width().get())-2*p.myHorizontalContentPadding_0-this.colorBarIndent_0-2),c.call(l,h.build())}for(s=l.iterator();s.hasNext();){var d=s.next();n(kt(d),this.myLinesContainer_0)}},We.prototype.drawDebugRect=function(){var t=Ze,e=this.$outer.myDebugRectangles_0.provide_za3lpa$(3);t(e.get_za3lpa$(0),this.myContent_0,w.Companion.RED),t(e.get_za3lpa$(1),this.myTitleContainer_0,w.Companion.DARK_GREEN),t(e.get_za3lpa$(2),this.myLinesContainer_0,w.Companion.ORANGE)},We.$metadata$={kind:h,simpleName:"ContentBox",interfaces:[it]},Qe.prototype.buildComponent=function(){this.add_26jijc$(this.myRect_0)},Qe.prototype.update_wo1ut2$=function(t,e,n,i,o){var r=new ht;r.moveTo_przk3b$(t,e),r.horizontalLineTo_8555vt$(n),r.verticalLineTo_8555vt$(i),r.horizontalLineTo_8555vt$(t),r.verticalLineTo_8555vt$(e);var a=r.build();this.myRect_0.d().set_11rb$(a),this.myRect_0.strokeColor().set_11rb$(o)},Qe.$metadata$={kind:h,simpleName:"RectangleComponent",interfaces:[it]},Je.prototype.wrap_0=function(t,e){var n,i=gt.Companion.splitLines_61zpoe$(t),o=$();for(n=i.iterator();n.hasNext();){var r,a=n.next();r=null!=e?this.chunkedBy_0(a," ",e):Et(a),Tt(o,r)}return St(o,"\n")},Je.prototype.chunkedBy_0=function(t,e,n){var i,o,r=this.chunkedBy_1(bt(t,[e]),n+e.length|0,(o=e,function(t){return t.length+o.length|0})),a=F(B(r,10));for(i=r.iterator();i.hasNext();){var s=i.next();a.add_11rb$(St(s,e))}return a},Je.prototype.chunkedBy_1=function(t,e,n){var i,o=$(),r={v:$()},a={v:0};for(i=t.iterator();i.hasNext();){var s=i.next(),l=n(s),u=(a.v+l|0)>e;u&&(u=!r.v.isEmpty()),u&&(o.add_11rb$(r.v),r.v=$(),a.v=0),r.v.add_11rb$(s),a.v=a.v+l|0}if(!r.v.isEmpty()){var c=r.v;o.add_11rb$(c)}return o},Je.$metadata$={kind:l,simpleName:"Companion",interfaces:[]};var tn=null;function en(){return null===tn&&new Je,tn}function nn(t){this.mySpace_0=t}function on(t){return t.stemCoord.y}function rn(t){return t.tooltipCoord.y}function an(t,e){var n;this.tooltips_8be2vx$=t,this.space_0=e,this.range_8be2vx$=null;var i,o=this.tooltips_8be2vx$,r=Rt("height",1,(function(t){return t.height_8be2vx$})),a=0;for(i=o.iterator();i.hasNext();)a+=r(i.next());var s=a+(this.tooltips_8be2vx$.size-1|0)*T.Tooltip.MARGIN_BETWEEN_TOOLTIPS;switch(this.tooltips_8be2vx$.size){case 0:n=0;break;case 1:n=this.tooltips_8be2vx$.get_za3lpa$(0).top_8be2vx$;break;default:var l,u=0;for(l=this.tooltips_8be2vx$.iterator();l.hasNext();){var c=l.next();u+=c.bottom_8be2vx$-c.height_8be2vx$/2}n=u/this.tooltips_8be2vx$.size-s/2}var p=n,h=At.Companion.withLowerEnd_lu1900$(p,s);this.range_8be2vx$=An().moveIntoLimit_e1h2sv$(h,this.space_0)}function sn(t,e,n){return n=n||Object.create(an.prototype),an.call(n,Et(t),e),n}ze.$metadata$={kind:h,simpleName:"TooltipBox",interfaces:[it]},nn.prototype.fixOverlapping_t0mqmi$=function(t){var e,n=Nt(t,Ot([on,rn])),i=$(),o=z("spaceOutTooltip",function(t,e,n){return t.spaceOutTooltip_0(e,n)}.bind(null,this)),r=i;for(e=n.iterator();e.hasNext();)r=o(r,e.next());var a,s=r,l=$();for(a=s.iterator();a.hasNext();){var u,c=a.next(),p={v:c.range_8be2vx$.lowerEnd},h=c.tooltips_8be2vx$,_=F(B(h,10));for(u=h.iterator();u.hasNext();){var d=u.next(),f=_.add_11rb$,m=d.moveTo_xoefl8$(new k(d.left_8be2vx$,p.v));p.v+=d.height_8be2vx$+T.Tooltip.MARGIN_BETWEEN_TOOLTIPS,f.call(_,m)}Tt(l,_)}return l},nn.prototype.spaceOutTooltip_0=function(t,e){t.add_11rb$(sn(e,this.mySpace_0));for(var n=0;n<50;n++){var i,o,r,a=Pt(t,2);t:do{var s;for(s=a.iterator();s.hasNext();){var l=s.next(),u=l.get_za3lpa$(0),c=l.get_za3lpa$(1);if(u.overlaps_oe5x5k$(c)){r=l;break t}}r=null}while(0);if(null!=(i=r)){var p=i.get_za3lpa$(0),h=i.get_za3lpa$(1),_=t.indexOf_11rb$(p);t.set_wxm5ur$(_,new an(It(p.tooltips_8be2vx$,h.tooltips_8be2vx$),this.mySpace_0)),o=t.remove_11rb$(h)}else o=null;if(null==o)return t}return t},an.prototype.overlaps_oe5x5k$=function(t){return new At(this.range_8be2vx$.lowerEnd-T.Tooltip.MARGIN_BETWEEN_TOOLTIPS,this.range_8be2vx$.upperEnd+T.Tooltip.MARGIN_BETWEEN_TOOLTIPS).connected_3lmjpf$(t.range_8be2vx$)},an.$metadata$={kind:h,simpleName:"Group",interfaces:[]},nn.$metadata$={kind:h,simpleName:"HorizontalTooltipExpander",interfaces:[]};var ln,un,cn,pn,hn,_n=Mt((function(){var t=e.kotlin.comparisons.compareValues_s00gnj$;return function(e){return function(n,i){var o=e;return t(o(n),o(i))}}}));function dn(t,e){An(),this.myViewport_0=t,this.myPreferredHorizontalAlignment_0=e,this.myHorizontalSpace_0=new At(this.myViewport_0.left,this.myViewport_0.right),this.myVerticalSpace_0=new At(0,0),this.myCursorCoord_0=k.Companion.ZERO,this.myHorizontalTooltipSpace_0=new At(this.myViewport_0.left,this.myViewport_0.right),this.myVerticalTooltipSpace_0=new At(this.myViewport_0.top,this.myViewport_0.bottom),this.myVerticalAlignmentResolver_kuqp7x$_0=this.myVerticalAlignmentResolver_kuqp7x$_0}function fn(t){return t.stemCoord.x}function mn(t){return t.stemCoord.x}function $n(t){return t.tooltipCoord.x}function yn(t,e){ut.call(this),this.name$=t,this.ordinal$=e}function gn(){gn=function(){},ln=new yn("TOP",0),un=new yn("BOTTOM",1)}function vn(){return gn(),ln}function bn(){return gn(),un}function wn(t,e){ut.call(this),this.name$=t,this.ordinal$=e}function xn(){xn=function(){},cn=new wn("LEFT",0),pn=new wn("RIGHT",1),hn=new wn("CENTER",2)}function kn(){return xn(),cn}function Cn(){return xn(),pn}function En(){return xn(),hn}function Sn(){this.tooltipBox=null,this.tooltipSize_8be2vx$=null,this.tooltipSpec=null,this.tooltipCoord=null,this.stemCoord=null}function Tn(t,e,n,i){return i=i||Object.create(Sn.prototype),Sn.call(i),i.tooltipSpec=t.tooltipSpec_8be2vx$,i.tooltipSize_8be2vx$=t.size_8be2vx$,i.tooltipBox=t.tooltipBox_8be2vx$,i.tooltipCoord=e,i.stemCoord=n,i}function On(t,e,n,i){this.tooltipSpec_8be2vx$=t,this.size_8be2vx$=e,this.tooltipBox_8be2vx$=n,this.strokeWidth_0=i}function Nn(t,e,n,i){return i=i||Object.create(On.prototype),On.call(i,t,e.contentRect.dimension,e,n),i}function Pn(){In=this,this.CURSOR_DIMENSION_0=new k(10,10),this.EMPTY_DOUBLE_RANGE_0=At.Companion.withLowerEnd_lu1900$(0,0)}Object.defineProperty(dn.prototype,"myVerticalAlignmentResolver_0",{configurable:!0,get:function(){return null==this.myVerticalAlignmentResolver_kuqp7x$_0?jt("myVerticalAlignmentResolver"):this.myVerticalAlignmentResolver_kuqp7x$_0},set:function(t){this.myVerticalAlignmentResolver_kuqp7x$_0=t}}),dn.prototype.arrange_ubcm6o$=function(t,n,i){var o,r;this.myCursorCoord_0=n,this.myVerticalSpace_0=new At(this.myViewport_0.top,this.myViewport_0.bottom),this.myVerticalAlignmentResolver_0=new Rn(this.myVerticalSpace_0),this.myHorizontalTooltipSpace_0=At.Companion.withLowerEnd_lu1900$(i.left,i.width),this.myVerticalTooltipSpace_0=At.Companion.withLowerEnd_lu1900$(i.top,i.height);var a,s,l=$();t:do{var u;for(u=t.iterator();u.hasNext();){var c=u.next();if(c.hintKind_8be2vx$===E.X_AXIS_TOOLTIP){a=c;break t}}a=null}while(0);if(null!=(o=a)){var p=this.calculateVerticalTooltipPosition_0(o,bn(),!0);if(this.isTooltipWithinBounds_0(p,i)){l.add_11rb$(p);var h=this.myViewport_0.top,_=p.stemCoord.y,d=p.top_8be2vx$;this.myVerticalSpace_0=new At(h,Y.min(_,d)),this.myVerticalAlignmentResolver_0=new Rn(this.myVerticalSpace_0)}}t:do{var f;for(f=t.iterator();f.hasNext();){var m=f.next();if(m.hintKind_8be2vx$===E.Y_AXIS_TOOLTIP){s=m;break t}}s=null}while(0);if(null!=(r=s)){var y=this.calculateHorizontalTooltipPosition_0(r);this.isTooltipWithinBounds_0(y,i)&&l.add_11rb$(y)}i.contains_gpjtzr$(n)&&Tt(l,this.calculateCornerTooltipsPosition_0(t));var g,v=An().select_0(l,[E.Y_AXIS_TOOLTIP]),b=F(B(v,10));for(g=v.iterator();g.hasNext();){var w=g.next();b.add_11rb$(w.rect_8be2vx$())}var x,k=this.calculateDataTooltipsPosition_0(t,b),C=$();for(x=k.iterator();x.hasNext();){var S=x.next();this.isTooltipWithinBounds_0(S,i)&&C.add_11rb$(S)}Tt(l,C);var T,O=z("isAxisTooltip",function(t,e){return t.isAxisTooltip_0(e)}.bind(null,this)),N=$();for(T=t.iterator();T.hasNext();){var P=T.next();O(P)||N.add_11rb$(P)}var I=!N.isEmpty();if(I){var A,R=z("isAxisTooltip",function(t,e){return t.isAxisTooltip_1(e)}.bind(null,this));t:do{var j;if(e.isType(l,U)&&l.isEmpty()){A=!0;break t}for(j=l.iterator();j.hasNext();)if(!R(j.next())){A=!1;break t}A=!0}while(0);I=A}return I&&l.clear(),this.rearrangeWithoutOverlapping_0(l)},dn.prototype.isTooltipWithinBounds_0=function(t,n){var i;switch(t.hintKind_8be2vx$.name){case"X_AXIS_TOOLTIP":i=n.xRange().contains_14dthe$(t.stemCoord.x);break;case"Y_AXIS_TOOLTIP":i=n.yRange().contains_14dthe$(t.stemCoord.y);break;case"VERTICAL_TOOLTIP":case"HORIZONTAL_TOOLTIP":case"CURSOR_TOOLTIP":case"ROTATED_TOOLTIP":i=n.contains_gpjtzr$(t.stemCoord);break;default:i=e.noWhenBranchMatched()}return i},dn.prototype.calculateDataTooltipsPosition_0=function(t,n){var i,o=$();for(i=t.iterator();i.hasNext();){var r=i.next();if(!this.isCorner_0(r))switch(r.hintKind_8be2vx$.name){case"VERTICAL_TOOLTIP":o.add_11rb$(this.calculateVerticalTooltipPosition_0(r,vn(),!1));break;case"HORIZONTAL_TOOLTIP":o.add_11rb$(this.calculateHorizontalTooltipPosition_0(r,n));break;case"CURSOR_TOOLTIP":o.add_11rb$(this.calculateCursorTooltipPosition_0(r,n));break;case"ROTATED_TOOLTIP":o.add_11rb$(this.calculateVerticalTooltipPosition_0(r,bn(),!0,!1));break;case"X_AXIS_TOOLTIP":case"Y_AXIS_TOOLTIP":break;default:e.noWhenBranchMatched()}}return o},dn.prototype.calculateCornerTooltipsPosition_0=function(t){var n,i=$(),o=z("isCorner",function(t,e){return t.isCorner_0(e)}.bind(null,this)),r=$();for(n=t.iterator();n.hasNext();){var a=n.next();o(a)&&r.add_11rb$(a)}var s,l,u=Q();for(s=r.iterator();s.hasNext();){var c,p=s.next(),h=V(p.tooltipSpec_8be2vx$.anchor),_=u.get_11rb$(h);if(null==_){var d=$();u.put_xwzc9p$(h,d),c=d}else c=_;c.add_11rb$(p)}for(l=u.entries.iterator();l.hasNext();){var f,m,y=l.next(),g=y.key,v=y.value,b=0;for(m=v.iterator();m.hasNext();)b+=m.next().size_8be2vx$.y;var w=b+T.Tooltip.MARGIN_BETWEEN_TOOLTIPS*v.size;switch(g.verticalAnchor.name){case"TOP":f=An().rightAligned_0(this.myVerticalTooltipSpace_0.lowerEnd,w,0);break;case"BOTTOM":f=An().leftAligned_0(this.myVerticalTooltipSpace_0.upperEnd,w,0);break;case"MIDDLE":f=An().centered_0((this.myVerticalTooltipSpace_0.lowerEnd+this.myVerticalTooltipSpace_0.upperEnd)/2,w);break;default:f=e.noWhenBranchMatched()}var x,k=f,C={v:k.lowerEnd};for(x=v.iterator();x.hasNext();){var E=x.next(),S=this.calculatePlotCornerTooltipPosition_0(E,C.v,k,g.horizontalAnchor);i.add_11rb$(S),C.v+=S.height_8be2vx$+T.Tooltip.MARGIN_BETWEEN_TOOLTIPS}}return i},dn.prototype.rearrangeWithoutOverlapping_0=function(t){if(t.isEmpty())return t;var n,i,o,r=$(),a=$(),s=(i=a,o=r,function(t){i.add_11rb$(t),o.add_11rb$(t.rect_8be2vx$())});for(n=An().select_0(t,[E.CURSOR_TOOLTIP,E.X_AXIS_TOOLTIP,E.Y_AXIS_TOOLTIP]).iterator();n.hasNext();)s(n.next());var l,u,c,p=An().withOverlapped_0(An().select_0(t,[E.HORIZONTAL_TOOLTIP]),this.selectCorner_0(t)),h=Rt("height",1,(function(t){return t.height_8be2vx$})),_=0;for(u=p.iterator();u.hasNext();)_+=h(u.next());if(_this.myCursorCoord_0.x&&j.add_11rb$(L)}t:do{var z=j.iterator();if(!z.hasNext()){A=null;break t}var D=z.next();if(!z.hasNext()){A=D;break t}var M=D.stemCoord.x;do{var B=z.next(),F=B.stemCoord.x;e.compareTo(M,F)>0&&(D=B,M=F)}while(z.hasNext());A=D}while(0);s(null!=(P=A)?P:zt(R))}return a},dn.prototype.fixOverlappingWithShifting_0=function(t){var e,n=$();for(e=Nt(t,Ot([mn,$n])).iterator();e.hasNext();){var i,o=e.next();if(An().isOverlapped_0(n,o)){var r=new k(zt(n).rect_8be2vx$().right+T.Tooltip.MARGIN_BETWEEN_TOOLTIPS,o.tooltipCoord.y);i=o.moveTo_xoefl8$(r)}else i=o;var a=i;n.add_11rb$(a)}return n},dn.prototype.calculateVerticalTooltipPosition_0=function(t,e,n,i){void 0===i&&(i=!0);var o=i?An().centerInsideRange_0(t.hintCoord_8be2vx$.x,t.size_8be2vx$.x,this.myHorizontalSpace_0):t.hintCoord_8be2vx$.x,r={v:null},a={v:null},s=t.hintCoord_8be2vx$.y,l=t.stemLength_8be2vx$,u=s-t.hintRadius_8be2vx$,c=s+t.hintRadius_8be2vx$,p=t.size_8be2vx$.y,h=An().leftAligned_0(u,p,l),_=An().rightAligned_0(c,p,l),d=t.hintKind_8be2vx$!==E.X_AXIS_TOOLTIP||this.myVerticalSpace_0.contains_3lmjpf$(_)?_:An().leftAligned_0(this.myVerticalSpace_0.upperEnd,p,l),f=!n&&this.overlapsCursorHorizontalRange_0(t,o)?At.Companion.withLowerEnd_lu1900$(this.myCursorCoord_0.y,An().CURSOR_DIMENSION_0.y):An().EMPTY_DOUBLE_RANGE_0;return this.myVerticalTooltipSpace_0.contains_14dthe$(u)&&this.myVerticalAlignmentResolver_0.resolve_2zskwy$(h,d,e,f)===vn()?(a.v=h.lowerEnd,r.v=u):(a.v=d.lowerEnd,r.v=c),Tn(t,new k(o,a.v),new k(t.hintCoord_8be2vx$.x,r.v))},dn.prototype.calculateHorizontalTooltipPosition_0=function(t,n){void 0===n&&(n=rt());var i=An().centerInsideRange_0(t.hintCoord_8be2vx$.y,t.size_8be2vx$.y,this.myVerticalSpace_0),o={v:null},r={v:null},a=t.hintCoord_8be2vx$.x,s=t.size_8be2vx$.x,l=t.hintRadius_8be2vx$,u=t.stemLength_8be2vx$,c=l+u,p=a-l,h=An().leftAligned_0(a,s,c),_=An().rightAligned_0(a,s,c),d=this.myHorizontalSpace_0.contains_3lmjpf$(h)&&(t.hintKind_8be2vx$===E.Y_AXIS_TOOLTIP||this.myHorizontalTooltipSpace_0.contains_14dthe$(p));if(d){var f;t:do{var m;if(e.isType(n,U)&&n.isEmpty()){f=!0;break t}for(m=n.iterator();m.hasNext();){var $=m.next(),y=new L(new k(h.lowerEnd,i),t.size_8be2vx$);if($.intersects_wthzt5$(y)){f=!1;break t}}f=!0}while(0);d=f}var g=d,v=this.myHorizontalSpace_0.contains_3lmjpf$(_);if(t.hintKind_8be2vx$!==E.Y_AXIS_TOOLTIP||g)if(g||v)this.myPreferredHorizontalAlignment_0===kn()&&g||!v?(o.v=h.lowerEnd,r.v=p):(o.v=_.lowerEnd,r.v=a+l);else switch(this.myPreferredHorizontalAlignment_0.name){case"LEFT":r.v=p,o.v=r.v+u;break;case"RIGHT":r.v=a+l,o.v=r.v-s-u;break;case"CENTER":r.v=a,o.v=a-s/2;break;default:e.noWhenBranchMatched()}else o.v=0,r.v=p;var b=new k(r.v,t.hintCoord_8be2vx$.y);return Tn(t,new k(o.v,i),b)},dn.prototype.calculateCursorTooltipPosition_0=function(t,n){var i=An().centerInsideRange_0(this.myCursorCoord_0.x,t.size_8be2vx$.x,this.myHorizontalSpace_0),o={v:null},r={v:null},a=this.myCursorCoord_0.y,s=t.size_8be2vx$.y,l=t.stemLength_8be2vx$,u=a-t.hintRadius_8be2vx$,c=a+t.hintRadius_8be2vx$,p=An().leftAligned_0(u,s,l),h=An().rightAligned_0(c,s,l),_=this.myVerticalSpace_0.contains_3lmjpf$(p);if(_){var d;t:do{var f;if(e.isType(n,U)&&n.isEmpty()){d=!0;break t}for(f=n.iterator();f.hasNext();){var m=f.next(),$=new L(new k(i,p.lowerEnd),t.size_8be2vx$);if(m.intersects_wthzt5$($)){d=!1;break t}}d=!0}while(0);_=d}return _?(o.v=p.lowerEnd,r.v=u):(o.v=h.lowerEnd,r.v=c),Tn(t,new k(i,o.v),new k(this.myCursorCoord_0.x,r.v))},dn.prototype.calculateAnchorX_0=function(t,n){var i;switch(n.name){case"RIGHT":i=this.myHorizontalTooltipSpace_0.upperEnd-t.size_8be2vx$.x;break;case"LEFT":i=this.myHorizontalSpace_0.lowerEnd+this.myHorizontalTooltipSpace_0.lowerEnd+T.Tooltip.MARGIN_BETWEEN_TOOLTIPS;break;case"CENTER":i=(this.myHorizontalTooltipSpace_0.lowerEnd+this.myHorizontalTooltipSpace_0.upperEnd-t.size_8be2vx$.x)/2;break;default:i=e.noWhenBranchMatched()}return i},dn.prototype.calculatePlotCornerTooltipPosition_0=function(t,n,i,o){var r;switch(o.name){case"RIGHT":r=Cn();break;case"LEFT":r=kn();break;case"CENTER":r=En();break;default:r=e.noWhenBranchMatched()}var a=r,s=this.calculateAnchorX_0(t,a),l=this.overlapsCursorHorizontalRange_0(t,s),u=this.overlapsCursorVerticalRange_0(i);l&&u&&(s=this.calculateAnchorX_0(t,a.inversed()));var c=new k(s,n);return Tn(t,c,c)},dn.prototype.overlapsCursorHorizontalRange_0=function(t,e){var n=At.Companion.withLowerEnd_lu1900$(e,t.size_8be2vx$.x),i=At.Companion.withLowerEnd_lu1900$(this.myCursorCoord_0.x,An().CURSOR_DIMENSION_0.x);return n.connected_3lmjpf$(i)},dn.prototype.overlapsCursorVerticalRange_0=function(t){var e=At.Companion.withLowerEnd_lu1900$(this.myCursorCoord_0.y,An().CURSOR_DIMENSION_0.y);return t.connected_3lmjpf$(e)},dn.prototype.isCorner_1=function(t){return null!=t.anchor},dn.prototype.isCorner_0=function(t){return this.isCorner_1(t.tooltipSpec_8be2vx$)},dn.prototype.isCorner_2=function(t){return this.isCorner_1(t.tooltipSpec)},dn.prototype.isAxisTooltip_2=function(t){return x([E.X_AXIS_TOOLTIP,E.Y_AXIS_TOOLTIP]).contains_11rb$(t.layoutHint.kind)},dn.prototype.isAxisTooltip_0=function(t){return this.isAxisTooltip_2(t.tooltipSpec_8be2vx$)},dn.prototype.isAxisTooltip_1=function(t){return this.isAxisTooltip_2(t.tooltipSpec)},dn.prototype.selectCorner_0=function(t){var e,n=z("isCorner",function(t,e){return t.isCorner_2(e)}.bind(null,this)),i=$();for(e=t.iterator();e.hasNext();){var o=e.next();n(o)&&i.add_11rb$(o)}return i},yn.$metadata$={kind:h,simpleName:"VerticalAlignment",interfaces:[ut]},yn.values=function(){return[vn(),bn()]},yn.valueOf_61zpoe$=function(t){switch(t){case"TOP":return vn();case"BOTTOM":return bn();default:ct("No enum constant jetbrains.datalore.plot.builder.tooltip.layout.LayoutManager.VerticalAlignment."+t)}},wn.prototype.inversed=function(){var t;switch(this.name){case"LEFT":t=Cn();break;case"RIGHT":t=kn();break;case"CENTER":t=En();break;default:t=e.noWhenBranchMatched()}return t},wn.$metadata$={kind:h,simpleName:"HorizontalAlignment",interfaces:[ut]},wn.values=function(){return[kn(),Cn(),En()]},wn.valueOf_61zpoe$=function(t){switch(t){case"LEFT":return kn();case"RIGHT":return Cn();case"CENTER":return En();default:ct("No enum constant jetbrains.datalore.plot.builder.tooltip.layout.LayoutManager.HorizontalAlignment."+t)}},Object.defineProperty(Sn.prototype,"left_8be2vx$",{configurable:!0,get:function(){return this.tooltipCoord.x}}),Object.defineProperty(Sn.prototype,"top_8be2vx$",{configurable:!0,get:function(){return this.tooltipCoord.y}}),Object.defineProperty(Sn.prototype,"width_8be2vx$",{configurable:!0,get:function(){return this.tooltipSize_8be2vx$.x}}),Object.defineProperty(Sn.prototype,"height_8be2vx$",{configurable:!0,get:function(){return this.tooltipSize_8be2vx$.y}}),Object.defineProperty(Sn.prototype,"bottom_8be2vx$",{configurable:!0,get:function(){return this.tooltipCoord.y+this.height_8be2vx$}}),Object.defineProperty(Sn.prototype,"right_8be2vx$",{configurable:!0,get:function(){return this.tooltipCoord.x+this.width_8be2vx$}}),Object.defineProperty(Sn.prototype,"hintKind_8be2vx$",{configurable:!0,get:function(){return this.tooltipSpec.layoutHint.kind}}),Sn.prototype.moveTo_xoefl8$=function(t){return function(t,e,n){return n=n||Object.create(Sn.prototype),Sn.call(n),n.tooltipSpec=t.tooltipSpec,n.tooltipSize_8be2vx$=t.tooltipSize_8be2vx$,n.tooltipBox=t.tooltipBox,n.stemCoord=t.stemCoord,n.tooltipCoord=e,n}(this,t)},Sn.prototype.rect_8be2vx$=function(){return new L(this.tooltipCoord,this.tooltipSize_8be2vx$)},Sn.$metadata$={kind:h,simpleName:"PositionedTooltip",interfaces:[]},Object.defineProperty(On.prototype,"hintCoord_8be2vx$",{configurable:!0,get:function(){return V(this.tooltipSpec_8be2vx$.layoutHint.coord)}}),Object.defineProperty(On.prototype,"hintKind_8be2vx$",{configurable:!0,get:function(){return this.tooltipSpec_8be2vx$.layoutHint.kind}}),Object.defineProperty(On.prototype,"hintRadius_8be2vx$",{configurable:!0,get:function(){return this.tooltipSpec_8be2vx$.layoutHint.objectRadius+this.strokeWidth_0}}),Object.defineProperty(On.prototype,"stemLength_8be2vx$",{configurable:!0,get:function(){return this.tooltipSpec_8be2vx$.layoutHint.stemLength.value}}),On.$metadata$={kind:h,simpleName:"MeasuredTooltip",interfaces:[]},Pn.prototype.moveIntoLimit_e1h2sv$=function(t,e){return e.contains_3lmjpf$(t)?t:t.lowerEnde.upperEnd?At.Companion.withUpperEnd_lu1900$(e.upperEnd,t.length):t},Pn.prototype.centered_0=function(t,e){return At.Companion.withLowerEnd_lu1900$(t-e/2,e)},Pn.prototype.leftAligned_0=function(t,e,n){return At.Companion.withLowerEnd_lu1900$(t-e-n,e)},Pn.prototype.rightAligned_0=function(t,e,n){return At.Companion.withLowerEnd_lu1900$(t+n,e)},Pn.prototype.centerInsideRange_0=function(t,e,n){return this.moveIntoLimit_e1h2sv$(this.centered_0(t,e),n).lowerEnd},Pn.prototype.select_0=function(t,e){var n,i=$();for(n=t.iterator();n.hasNext();){var o=n.next();Dt(e,o.hintKind_8be2vx$)&&i.add_11rb$(o)}return i},Pn.prototype.isOverlapped_0=function(t,e){var n;t:do{var i;for(i=t.iterator();i.hasNext();){var o=i.next();if(!J(o,e)&&o.rect_8be2vx$().intersects_wthzt5$(e.rect_8be2vx$())){n=o;break t}}n=null}while(0);return null!=n},Pn.prototype.withOverlapped_0=function(t,e){var n,i=$();for(n=e.iterator();n.hasNext();){var o=n.next();this.isOverlapped_0(t,o)&&i.add_11rb$(o)}var r=i;return It(Lt(t,e),r)},Pn.$metadata$={kind:l,simpleName:"Companion",interfaces:[]};var In=null;function An(){return null===In&&new Pn,In}function Rn(t){Kn(),this.myVerticalSpace_0=t}function jn(){qn(),this.myTopSpaceOk_0=null,this.myTopCursorOk_0=null,this.myBottomSpaceOk_0=null,this.myBottomCursorOk_0=null,this.myPreferredAlignment_0=null}function Ln(t){return qn().getBottomCursorOk_bd4p08$(t)}function zn(t){return qn().getBottomSpaceOk_bd4p08$(t)}function Dn(t){return qn().getTopCursorOk_bd4p08$(t)}function Mn(t){return qn().getTopSpaceOk_bd4p08$(t)}function Bn(t){return qn().getPreferredAlignment_bd4p08$(t)}function Fn(){Un=this}dn.$metadata$={kind:h,simpleName:"LayoutManager",interfaces:[]},Rn.prototype.resolve_2zskwy$=function(t,e,n,i){var o,r=(new jn).topCursorOk_1v8dbw$(!t.connected_3lmjpf$(i)).topSpaceOk_1v8dbw$(this.myVerticalSpace_0.contains_3lmjpf$(t)).bottomCursorOk_1v8dbw$(!e.connected_3lmjpf$(i)).bottomSpaceOk_1v8dbw$(this.myVerticalSpace_0.contains_3lmjpf$(e)).preferredAlignment_tcfutp$(n);for(o=Kn().PLACEMENT_MATCHERS_0.iterator();o.hasNext();){var a=o.next();if(a.first.match_bd4p08$(r))return a.second}throw W("Some matcher should match")},jn.prototype.match_bd4p08$=function(t){return this.match_0(Ln,t)&&this.match_0(zn,t)&&this.match_0(Dn,t)&&this.match_0(Mn,t)&&this.match_0(Bn,t)},jn.prototype.topSpaceOk_1v8dbw$=function(t){return this.myTopSpaceOk_0=t,this},jn.prototype.topCursorOk_1v8dbw$=function(t){return this.myTopCursorOk_0=t,this},jn.prototype.bottomSpaceOk_1v8dbw$=function(t){return this.myBottomSpaceOk_0=t,this},jn.prototype.bottomCursorOk_1v8dbw$=function(t){return this.myBottomCursorOk_0=t,this},jn.prototype.preferredAlignment_tcfutp$=function(t){return this.myPreferredAlignment_0=t,this},jn.prototype.match_0=function(t,e){var n;return null==(n=t(this))||J(n,t(e))},Fn.prototype.getTopSpaceOk_bd4p08$=function(t){return t.myTopSpaceOk_0},Fn.prototype.getTopCursorOk_bd4p08$=function(t){return t.myTopCursorOk_0},Fn.prototype.getBottomSpaceOk_bd4p08$=function(t){return t.myBottomSpaceOk_0},Fn.prototype.getBottomCursorOk_bd4p08$=function(t){return t.myBottomCursorOk_0},Fn.prototype.getPreferredAlignment_bd4p08$=function(t){return t.myPreferredAlignment_0},Fn.$metadata$={kind:l,simpleName:"Companion",interfaces:[]};var Un=null;function qn(){return null===Un&&new Fn,Un}function Hn(){Gn=this,this.PLACEMENT_MATCHERS_0=x([this.rule_0((new jn).preferredAlignment_tcfutp$(vn()).topSpaceOk_1v8dbw$(!0).topCursorOk_1v8dbw$(!0),vn()),this.rule_0((new jn).preferredAlignment_tcfutp$(bn()).bottomSpaceOk_1v8dbw$(!0).bottomCursorOk_1v8dbw$(!0),bn()),this.rule_0((new jn).preferredAlignment_tcfutp$(vn()).topSpaceOk_1v8dbw$(!0).topCursorOk_1v8dbw$(!1).bottomSpaceOk_1v8dbw$(!0).bottomCursorOk_1v8dbw$(!0),bn()),this.rule_0((new jn).preferredAlignment_tcfutp$(bn()).bottomSpaceOk_1v8dbw$(!0).bottomCursorOk_1v8dbw$(!1).topSpaceOk_1v8dbw$(!0).topCursorOk_1v8dbw$(!0),vn()),this.rule_0((new jn).topSpaceOk_1v8dbw$(!1),bn()),this.rule_0((new jn).bottomSpaceOk_1v8dbw$(!1),vn()),this.rule_0(new jn,vn())])}jn.$metadata$={kind:h,simpleName:"Matcher",interfaces:[]},Hn.prototype.rule_0=function(t,e){return new wt(t,e)},Hn.$metadata$={kind:l,simpleName:"Companion",interfaces:[]};var Gn=null;function Kn(){return null===Gn&&new Hn,Gn}function Vn(t,e){Zn(),this.verticalSpace_0=t,this.horizontalSpace_0=e}function Yn(t){this.myAttachToTooltipsTopOffset_0=null,this.myAttachToTooltipsBottomOffset_0=null,this.myAttachToTooltipsLeftOffset_0=null,this.myAttachToTooltipsRightOffset_0=null,this.myTooltipSize_0=t.tooltipSize_8be2vx$,this.myTargetCoord_0=t.stemCoord;var e=this.myTooltipSize_0.x/2,n=this.myTooltipSize_0.y/2;this.myAttachToTooltipsTopOffset_0=new k(-e,0),this.myAttachToTooltipsBottomOffset_0=new k(-e,-this.myTooltipSize_0.y),this.myAttachToTooltipsLeftOffset_0=new k(0,n),this.myAttachToTooltipsRightOffset_0=new k(-this.myTooltipSize_0.x,n)}function Wn(){Xn=this,this.STEM_TO_LEFT_SIDE_ANGLE_RANGE_0=new At(-1/4*Ut.PI,1/4*Ut.PI),this.STEM_TO_BOTTOM_SIDE_ANGLE_RANGE_0=new At(1/4*Ut.PI,3/4*Ut.PI),this.STEM_TO_RIGHT_SIDE_ANGLE_RANGE_0=new At(3/4*Ut.PI,5/4*Ut.PI),this.STEM_TO_TOP_SIDE_ANGLE_RANGE_0=new At(5/4*Ut.PI,7/4*Ut.PI),this.SECTOR_COUNT_0=36,this.SECTOR_ANGLE_0=2*Ut.PI/36,this.POINT_RESTRICTION_SIZE_0=new k(1,1)}Rn.$metadata$={kind:h,simpleName:"VerticalAlignmentResolver",interfaces:[]},Vn.prototype.fixOverlapping_jhkzok$=function(t,e){for(var n,i=$(),o=0,r=t.size;oUt.PI&&(i-=Ut.PI),n.add_11rb$(e.rotate_14dthe$(i)),o=o+1|0,i+=Zn().SECTOR_ANGLE_0;return n},Vn.prototype.intersectsAny_0=function(t,e){var n;for(n=e.iterator();n.hasNext();){var i=n.next();if(t.intersects_wthzt5$(i))return!0}return!1},Vn.prototype.findValidCandidate_0=function(t,e){var n;for(n=t.iterator();n.hasNext();){var i=n.next();if(!this.intersectsAny_0(i,e)&&this.verticalSpace_0.contains_3lmjpf$(At.Companion.withLowerEnd_lu1900$(i.origin.y,i.dimension.y))&&this.horizontalSpace_0.contains_3lmjpf$(At.Companion.withLowerEnd_lu1900$(i.origin.x,i.dimension.x)))return i}return null},Yn.prototype.rotate_14dthe$=function(t){var e,n=qt.NORMAL.value,i=new k(n*Y.cos(t),n*Y.sin(t)).add_gpjtzr$(this.myTargetCoord_0);if(Zn().STEM_TO_BOTTOM_SIDE_ANGLE_RANGE_0.contains_14dthe$(t))e=i.add_gpjtzr$(this.myAttachToTooltipsBottomOffset_0);else if(Zn().STEM_TO_TOP_SIDE_ANGLE_RANGE_0.contains_14dthe$(t))e=i.add_gpjtzr$(this.myAttachToTooltipsTopOffset_0);else if(Zn().STEM_TO_LEFT_SIDE_ANGLE_RANGE_0.contains_14dthe$(t))e=i.add_gpjtzr$(this.myAttachToTooltipsLeftOffset_0);else{if(!Zn().STEM_TO_RIGHT_SIDE_ANGLE_RANGE_0.contains_14dthe$(t))throw Ht();e=i.add_gpjtzr$(this.myAttachToTooltipsRightOffset_0)}return new L(e,this.myTooltipSize_0)},Yn.$metadata$={kind:h,simpleName:"TooltipRotationHelper",interfaces:[]},Wn.$metadata$={kind:l,simpleName:"Companion",interfaces:[]};var Xn=null;function Zn(){return null===Xn&&new Wn,Xn}Vn.$metadata$={kind:h,simpleName:"VerticalTooltipRotatingExpander",interfaces:[]},Object.defineProperty(Gt,"Companion",{get:Yt});var Jn=t.jetbrains||(t.jetbrains={}),Qn=Jn.datalore||(Jn.datalore={}),ti=Qn.plot||(Qn.plot={}),ei=ti.builder||(ti.builder={});ei.PlotContainer=Gt;var ni=ei.interact||(ei.interact={});ni.Interactor=Wt,ni.PlotToolbox=Jt,ni.TooltipRenderer=oe;var ii=ni.tool||(ni.tool={});ii.DragFeedback=le,Object.defineProperty(ue,"Companion",{get:ge}),ii.DrawRectFeedback=ue,ii.InteractionContext=ve,ii.InteractionTarget=be,ii.MouseDragInteraction=we,ii.PanGeomFeedback=xe;var oi=ni.ui||(ni.ui={});oi.EventsManager=Te,oi.ToggleButtonControl=Ne,oi.ToolboxControl=Pe,oi.UiControl=Ie;var ri=ei.tooltip||(ei.tooltip={});ri.CrosshairComponent=Re,ri.RetainableComponents=Le,Object.defineProperty(De,"VERTICAL",{get:Be}),Object.defineProperty(De,"HORIZONTAL",{get:Fe}),ze.Orientation=De,Object.defineProperty(Ue,"LEFT",{get:He}),Object.defineProperty(Ue,"RIGHT",{get:Ge}),Object.defineProperty(Ue,"UP",{get:Ke}),Object.defineProperty(Ue,"DOWN",{get:Ve}),ze.PointerDirection=Ue,Je.prototype.RectangleComponent=Qe,Object.defineProperty(ze,"Companion",{get:en}),ri.TooltipBox=ze,nn.Group_init_ny4pny$=sn,nn.Group=an;var ai=ri.layout||(ri.layout={});return ai.HorizontalTooltipExpander=nn,Object.defineProperty(yn,"TOP",{get:vn}),Object.defineProperty(yn,"BOTTOM",{get:bn}),dn.VerticalAlignment=yn,Object.defineProperty(wn,"LEFT",{get:kn}),Object.defineProperty(wn,"RIGHT",{get:Cn}),Object.defineProperty(wn,"CENTER",{get:En}),dn.HorizontalAlignment=wn,dn.PositionedTooltip_init_3c33xi$=Tn,dn.PositionedTooltip=Sn,dn.MeasuredTooltip_init_sl6uqd$=Nn,dn.MeasuredTooltip=On,Object.defineProperty(dn,"Companion",{get:An}),ai.LayoutManager=dn,Object.defineProperty(jn,"Companion",{get:qn}),Rn.Matcher=jn,Object.defineProperty(Rn,"Companion",{get:Kn}),ai.VerticalAlignmentResolver=Rn,Vn.TooltipRotationHelper=Yn,Object.defineProperty(Vn,"Companion",{get:Zn}),ai.VerticalTooltipRotatingExpander=Vn,t})?i.apply(e,o):i)||(t.exports=r)},806:function(t,e,n){var i,o,r;o=[e,n(421),n(486),n(832),n(322),n(479)],void 0===(r="function"==typeof(i=function(t,e,n,i,o,r){"use strict";var a=e.Kind.OBJECT,s=e.kotlin.collections.zip_45mdf7$,l=e.kotlin.collections.ArrayList_init_287e2$,u=n.jetbrains.datalore.base.geometry.DoubleVector,c=e.kotlin.Pair,p=e.kotlin.IllegalStateException_init_pdl1vj$,h=e.Kind.CLASS,_=i.jetbrains.datalore.plot.base.Scale,d=e.Kind.INTERFACE,f=i.jetbrains.datalore.plot.base.scale,m=i.jetbrains.datalore.plot.base.util,$=i.jetbrains.datalore.plot.base.geom.util.YOrientationAesthetics,y=e.getCallableRef,g=e.kotlin.collections.toSet_7wnvza$,v=e.kotlin.Enum,b=e.throwISE,w=e.kotlin.collections.LinkedHashMap_init_q3lmfv$,x=e.kotlin.collections.getValue_t9ocha$,k=e.kotlin.collections.listOf_mh5how$,C=e.kotlin.collections.first_2p1efm$,E=e.kotlin.to_ujzrz7$,S=e.kotlin.collections.mapOf_qfcya0$,T=i.jetbrains.datalore.plot.base.Aes,O=i.jetbrains.datalore.plot.base.scale.transform,N=e.kotlin.collections.mapCapacity_za3lpa$,P=e.kotlin.collections.LinkedHashMap_init_bwtc7$,I=i.jetbrains.datalore.plot.base.render.svg,A=o.jetbrains.datalore.vis.svg.SvgCssResource,R=n.jetbrains.datalore.base.registration.CompositeRegistration,j=o.jetbrains.datalore.vis.svg.SvgSvgElement,L=n.jetbrains.datalore.base.gcommon.base,z=i.jetbrains.datalore.plot.base.render.svg.TextLabel,D=i.jetbrains.datalore.plot.base.render.svg.Text.HorizontalAnchor,M=i.jetbrains.datalore.plot.base.render.svg.Text.VerticalAnchor,B=e.kotlin.RuntimeException,F=e.kotlin.Unit,U=e.kotlin.collections.emptyList_287e2$,q=n.jetbrains.datalore.base.registration.Registration,H=n.jetbrains.datalore.base.geometry.DoubleRectangle,G=o.jetbrains.datalore.vis.svg.SvgRectElement_init_wthzt5$,K=n.jetbrains.datalore.base.values.Color,V=e.kotlin.collections.plus_mydzjv$,Y=n.jetbrains.datalore.base.geometry.DoubleRectangle_init_6y0v78$,W=e.ensureNotNull,X=e.kotlin.collections.listOf_i5x0yv$,Z=i.jetbrains.datalore.plot.base.render.svg.MultilineLabel,J=e.toString,Q=o.jetbrains.datalore.vis.svg.event.SvgEventSpec,tt=e.kotlin.io.println_s8jyv4$,et=o.jetbrains.datalore.vis.svg.event.SvgEventHandler,nt=n.jetbrains.datalore.base.logging,it=e.getKClass,ot=i.jetbrains.datalore.plot.base.render.svg.SvgComponent,rt=e.kotlin.collections.flatten_u0ad8z$,at=e.getPropertyCallableRef,st=e.kotlin.collections.Collection,lt=Math,ut=i.jetbrains.datalore.plot.base.interact.NullGeomTargetCollector,ct=i.jetbrains.datalore.plot.base.geom.LiveMapGeom,pt=e.throwCCE,ht=e.kotlin.collections.collectionSizeOrDefault_ba2ldo$,_t=e.kotlin.collections.ArrayList_init_ww73n8$,dt=e.kotlin.lazy_klfg04$,ft=e.kotlin.collections.HashMap_init_q3lmfv$,mt=e.equals,$t=i.jetbrains.datalore.plot.base.aes.AestheticsBuilder,yt=i.jetbrains.datalore.plot.base.data,gt=n.jetbrains.datalore.base.interval.DoubleSpan,vt=e.kotlin.isNaN_yrwdxr$,bt=i.jetbrains.datalore.plot.base.ContinuousTransform,wt=Math.sign,xt=i.jetbrains.datalore.plot.base.render.SvgRoot,kt=e.hashCode,Ct=o.jetbrains.datalore.vis.TextStyle,Et=i.jetbrains.datalore.plot.base.annotations.Annotations,St=n.jetbrains.datalore.base.values.FontFamily,Tt=n.jetbrains.datalore.base.values.FontFace,Ot=n.jetbrains.datalore.base.stringFormat.StringFormat,Nt=i.jetbrains.datalore.plot.base.annotations.AnnotationLineSpec,Pt=i.jetbrains.datalore.plot.base.scale.breaks,It=r.jetbrains.datalore.plot.common.data,At=e.numberToInt,Rt=n.jetbrains.datalore.base.values.Font,jt=e.kotlin.collections.HashMap_init_73mtqc$,Lt=i.jetbrains.datalore.plot.base.util.afterOrientation_aa6a3t$,zt=i.jetbrains.datalore.plot.base.geom.GeomBase,Dt=e.kotlin.collections.ArrayList_init_mqih57$,Mt=n.jetbrains.datalore.base.typedKey.TypedKeyHashMap,Bt=i.jetbrains.datalore.plot.base.pos,Ft=i.jetbrains.datalore.plot.base.stat,Ut=i.jetbrains.datalore.plot.base.stat.SimpleStatContext,qt=i.jetbrains.datalore.plot.base.interact.GeomTargetLocator.LookupSpec,Ht=e.kotlin.js.internal.DoubleCompanionObject,Gt=e.kotlin.ranges.coerceAtLeast_dqglrj$,Kt=e.kotlin.IllegalArgumentException_init_pdl1vj$,Vt=i.jetbrains.datalore.plot.base.GeomContext,Yt=Object,Wt=e.kotlin.NoSuchElementException_init,Xt=n.jetbrains.datalore.base.geometry.DoubleRectangle_init_7e97im$,Zt=e.kotlin.isFinite_yrwdxr$,Jt=i.jetbrains.datalore.plot.base.PlotContext.Layer,Qt=i.jetbrains.datalore.plot.base.PlotContext,te=i.jetbrains.datalore.plot.base.ScaleMapper,ee=e.kotlin.collections.HashSet_init_mqih57$,ne=e.kotlin.ranges.until_dqglrj$,ie=e.kotlin.collections.toList_7wnvza$,oe=e.kotlin.collections.distinct_7wnvza$,re=e.kotlin.collections.toMap_6hr0sd$,ae=e.kotlin.collections.List,se=e.kotlin.collections.sortedDescending_exjks8$,le=e.kotlin.collections.sorted_exjks8$,ue=i.jetbrains.datalore.plot.base.pos.PositionAdjustments.Meta,ce=e.kotlin.collections.filterNotNull_m3lr2h$,pe=i.jetbrains.datalore.plot.base.geom.WithWidth,he=i.jetbrains.datalore.plot.base.geom,_e=i.jetbrains.datalore.plot.base.geom.WithHeight,de=e.kotlin.toList_tt9upe$,fe=i.jetbrains.datalore.plot.base.DiscreteTransform,me=e.kotlin.collections.checkIndexOverflow_za3lpa$,$e=e.kotlin.collections.listOfNotNull_jurz7g$,ye=e.kotlin.collections.get_indices_gzk92b$,ge=e.kotlin.UnsupportedOperationException_init_pdl1vj$,ve=e.kotlin.collections.sortedWith_eknfly$,be=e.wrapFunction,we=e.kotlin.Comparator,xe=e.Long.fromInt(37),ke=i.jetbrains.datalore.plot.base,Ce=i.jetbrains.datalore.plot.base.geom.PointGeom,Ee=i.jetbrains.datalore.plot.base.GeomKind,Se=i.jetbrains.datalore.plot.base.aes.AestheticsDefaults,Te=i.jetbrains.datalore.plot.base.geom.PathGeom,Oe=i.jetbrains.datalore.plot.base.geom.LineGeom,Ne=i.jetbrains.datalore.plot.base.geom.SmoothGeom,Pe=i.jetbrains.datalore.plot.base.geom.BarGeom,Ie=i.jetbrains.datalore.plot.base.geom.HistogramGeom,Ae=i.jetbrains.datalore.plot.base.geom.DotplotGeom,Re=i.jetbrains.datalore.plot.base.geom.TileGeom,je=i.jetbrains.datalore.plot.base.geom.Bin2dGeom,Le=i.jetbrains.datalore.plot.base.geom.ErrorBarGeom,ze=i.jetbrains.datalore.plot.base.geom.CrossBarGeom,De=i.jetbrains.datalore.plot.base.geom.LineRangeGeom,Me=i.jetbrains.datalore.plot.base.geom.PointRangeGeom,Be=i.jetbrains.datalore.plot.base.geom.ContourGeom,Fe=i.jetbrains.datalore.plot.base.geom.ContourfGeom,Ue=i.jetbrains.datalore.plot.base.geom.PolygonGeom,qe=i.jetbrains.datalore.plot.base.geom.MapGeom,He=i.jetbrains.datalore.plot.base.geom.ABLineGeom,Ge=i.jetbrains.datalore.plot.base.geom.HLineGeom,Ke=i.jetbrains.datalore.plot.base.geom.VLineGeom,Ve=i.jetbrains.datalore.plot.base.geom.BoxplotGeom,Ye=i.jetbrains.datalore.plot.base.geom.AreaRidgesGeom,We=i.jetbrains.datalore.plot.base.geom.ViolinGeom,Xe=i.jetbrains.datalore.plot.base.geom.YDotplotGeom,Ze=i.jetbrains.datalore.plot.base.geom.RibbonGeom,Je=i.jetbrains.datalore.plot.base.geom.AreaGeom,Qe=i.jetbrains.datalore.plot.base.geom.DensityGeom,tn=i.jetbrains.datalore.plot.base.geom.Density2dGeom,en=i.jetbrains.datalore.plot.base.geom.Density2dfGeom,nn=i.jetbrains.datalore.plot.base.geom.JitterGeom,on=i.jetbrains.datalore.plot.base.geom.QQGeom,rn=i.jetbrains.datalore.plot.base.geom.QQ2Geom,an=i.jetbrains.datalore.plot.base.geom.QQLineGeom,sn=i.jetbrains.datalore.plot.base.geom.QQ2LineGeom,ln=i.jetbrains.datalore.plot.base.geom.FreqpolyGeom,un=i.jetbrains.datalore.plot.base.geom.StepGeom,cn=i.jetbrains.datalore.plot.base.geom.RectGeom,pn=i.jetbrains.datalore.plot.base.geom.SegmentGeom,hn=i.jetbrains.datalore.plot.base.geom.TextGeom,_n=i.jetbrains.datalore.plot.base.geom.RasterGeom,dn=i.jetbrains.datalore.plot.base.geom.ImageGeom,fn=i.jetbrains.datalore.plot.base.geom.PieGeom,mn=i.jetbrains.datalore.plot.base.interact.MappedDataAccess,$n=i.jetbrains.datalore.plot.base.coord,yn=e.kotlin.text.trimMargin_rjktp$,gn=i.jetbrains.datalore.plot.base.coord.CoordinatesMapper,vn=n.jetbrains.datalore.base.spatial.projections.identity,bn=n.jetbrains.datalore.base.spatial.projections.mercator,wn=n.jetbrains.datalore.base.unsupported.UNSUPPORTED_61zpoe$,xn=n.jetbrains.datalore.base.geometry,kn=e.kotlin.collections.first_7wnvza$,Cn=i.jetbrains.datalore.plot.base.DataFrame.Builder_init,En=e.kotlin.collections.plus_iwxh38$,Sn=e.kotlin.collections.maxOrNull_exjks8$,Tn=e.kotlin.collections.listOfNotNull_issdgt$,On=e.kotlin.collections.plus_q4559j$,Nn=e.kotlin.comparisons.compareValues_s00gnj$,Pn=e.kotlin.collections.requireNoNulls_whsx6z$,In=e.kotlin.collections.firstOrNull_2p1efm$,An=e.kotlin.Comparable,Rn=e.kotlin.collections.binarySearch_jhx6be$,jn=e.kotlin.collections.LinkedHashSet_init_287e2$,Ln=e.kotlin.collections.linkedSetOf_i5x0yv$,zn=e.kotlin.collections.plus_khz7k3$,Dn=i.jetbrains.datalore.plot.base.DataFrame.OrderSpec,Mn=e.kotlin.collections.minus_2ws7j4$,Bn=e.kotlin.collections.Map,Fn=e.kotlin.collections.toMutableMap_abgq59$,Un=e.kotlin.collections.mapOf_x2b85n$,qn=e.kotlin.collections.emptyMap_q3lmfv$,Hn=e.numberToDouble,Gn=e.kotlin.collections.asReversed_2p1efm$,Kn=n.jetbrains.datalore.base.values,Vn=n.jetbrains.datalore.base.observable.event.Listeners,Yn=n.jetbrains.datalore.base.observable.event.ListenerCaller,Wn=n.jetbrains.datalore.base.observable.event.EventHandler,Xn=n.jetbrains.datalore.base.event.MouseEventSource,Zn=o.jetbrains.datalore.vis.svg,Jn=o.jetbrains.datalore.vis.svg.SvgLineElement_init_6y0v78$,Qn=o.jetbrains.datalore.vis.svg.SvgLineElement,ti=o.jetbrains.datalore.vis.svg.SvgGElement,ei=e.kotlin.collections.take_ba2ldo$,ni=e.kotlin.collections.takeLast_yzln2o$,ii=e.kotlin.collections.last_2p1efm$,oi=e.kotlin.collections.reverse_vvxzk3$,ri=o.jetbrains.datalore.vis.svg.SvgRectElement_init_6y0v78$,ai=e.kotlin.text.isBlank_gw00vp$,si=i.jetbrains.datalore.plot.base.render.svg.GroupComponent,li=i.jetbrains.datalore.plot.base.interact.ContextualMapping,ui=e.kotlin.collections.minus_q4559j$,ci=e.kotlin.collections.toMutableList_4c7yge$,pi=i.jetbrains.datalore.plot.base.interact.GeomTargetLocator.LookupStrategy,hi=i.jetbrains.datalore.plot.base.interact.GeomTargetLocator.LookupSpace,_i=n.jetbrains.datalore.base.geometry.DoubleSegment,di=n.jetbrains.datalore.base.registration.Disposable,fi=e.kotlin.collections.contains_2ws7j4$,mi=i.jetbrains.datalore.plot.base.interact.TipLayoutHint,$i=e.kotlin.collections.addAll_ipc267$,yi=e.kotlin.collections.withIndex_7wnvza$,gi=e.kotlin.collections.reversed_7wnvza$,vi=i.jetbrains.datalore.plot.base.interact.GeomTargetCollector,bi=i.jetbrains.datalore.plot.base.interact.HitShape,wi=i.jetbrains.datalore.plot.base.interact.GeomTargetLocator,xi=i.jetbrains.datalore.plot.base.interact.GeomTargetLocator.LookupResult,ki=i.jetbrains.datalore.plot.base.interact.TipLayoutHint.Kind,Ci=e.kotlin.collections.setOf_i5x0yv$,Ei=e.kotlin.collections.plus_qloxvw$,Si=e.kotlin.collections.minOrNull_l63kqw$,Ti=e.kotlin.NoSuchElementException,Oi=e.kotlin.collections.HashSet_init_287e2$,Ni=e.kotlin.collections.get_lastIndex_55thoc$,Pi=e.kotlin.collections.checkCountOverflow_za3lpa$,Ii=n.jetbrains.datalore.base.algorithms.splitRings_bemo1h$,Ai=n.jetbrains.datalore.base.algorithms.calculateArea_ytws2g$,Ri=r.jetbrains.datalore.plot.common.geometry.PolylineSimplifier,ji=e.kotlin.collections.sortWith_nqfjgj$,Li=i.jetbrains.datalore.plot.base.interact.GeomTarget,zi=i.jetbrains.datalore.plot.base.interact.GeomTargetCollector.TooltipParams,Di=e.kotlin.collections.sum_plj8ka$,Mi=e.kotlin.collections.maxOrNull_l63kqw$,Bi=i.jetbrains.datalore.plot.base.scale.ScaleBreaks,Fi=e.kotlin.RuntimeException_init_pdl1vj$,Ui=n.jetbrains.datalore.base.math.toRadians_14dthe$,qi=n.jetbrains.datalore.base.unsupported.UNSUPPORTED,Hi=e.kotlin.text.endsWith_7epoxm$,Gi=e.kotlin.text.trim_gw00vp$,Ki=e.kotlin.text.StringBuilder,Vi=o.jetbrains.datalore.vis.StyleSheet,Yi=e.toBoxedChar,Wi=e.unboxChar,Xi=e.kotlin.collections.sum_l63kqw$,Zi=e.kotlin.text.iterator_gw00vp$,Ji=e.kotlin.collections.shuffle_9jeydg$,Qi=e.kotlin.random.Random_s8cxhz$,to=e.kotlin.random.Random,eo=e.kotlin.math.round_14dthe$,no=r.jetbrains.datalore.plot.common.util.MutableDouble,io=r.jetbrains.datalore.plot.common.util.MutableInteger,oo=e.kotlin.collections.asSequence_7wnvza$,ro=e.kotlin.sequences.map_z5avom$,ao=e.kotlin.comparisons.reversed_2avth4$,so=e.kotlin.sequences.sortedWith_vjgqpk$,lo=e.kotlin.math.roundToInt_yrwdxr$,uo=e.kotlin.sequences.toList_veqyi0$,co=n.jetbrains.datalore.base.algorithms.isClosed_2p1efm$,po=e.kotlin.collections.AbstractList,ho=i.jetbrains.datalore.plot.base.render.point,_o=i.jetbrains.datalore.plot.base.render.linetype.NamedLineType,fo=i.jetbrains.datalore.plot.base.aes,mo=i.jetbrains.datalore.plot.base.scale.transform.DateTimeBreaksGen,$o=i.jetbrains.datalore.plot.base.render.point.NamedShape,yo=i.jetbrains.datalore.plot.base.render.point.NamedShape.values,go=e.kotlin.collections.LinkedHashSet_init_mqih57$,vo=r.jetbrains.datalore.plot.common.color,bo=r.jetbrains.datalore.plot.common.color.ColorPalette.Type,wo=r.jetbrains.datalore.plot.common.color.ColorPalette.Qualitative,xo=r.jetbrains.datalore.plot.common.color.ColorPalette.Sequential.valueOf_61zpoe$,ko=r.jetbrains.datalore.plot.common.color.ColorPalette.Diverging.valueOf_61zpoe$,Co=r.jetbrains.datalore.plot.common.color.ColorPalette.Qualitative.valueOf_61zpoe$,Eo=e.kotlin.IllegalArgumentException,So=r.jetbrains.datalore.plot.common.color.ColorPalette.Sequential.values,To=r.jetbrains.datalore.plot.common.color.ColorPalette.Diverging.values,Oo=r.jetbrains.datalore.plot.common.color.ColorPalette.Qualitative.values,No=e.kotlin.collections.joinToString_cgipc5$,Po=e.kotlin.collections.windowed_vo9c23$,Io=e.kotlin.math.abs_za3lpa$,Ao=n.jetbrains.datalore.base.values.HSV,Ro=r.jetbrains.datalore.plot.common.colormap,jo=e.kotlin.ranges.rangeTo_38ydlf$,Lo=i.jetbrains.datalore.plot.base.interact.TooltipLineSpec.DataPoint,zo=e.throwUPAE,Do=e.kotlin.collections.single_2p1efm$,Mo=e.kotlin.collections.joinToString_fmv235$,Bo=i.jetbrains.datalore.plot.base.interact.TooltipLineSpec;function Fo(){Uo=this,this.PLOT_VIEW_TOOLBOX=!1,this.PLOT_DEBUG_DRAWING=!1,this.LEGEND_DEBUG_DRAWING=!1}or.prototype=Object.create(v.prototype),or.prototype.constructor=or,vr.prototype=Object.create(q.prototype),vr.prototype.constructor=vr,yr.prototype=Object.create(ot.prototype),yr.prototype.constructor=yr,Cr.prototype=Object.create(ot.prototype),Cr.prototype.constructor=Cr,Lr.prototype=Object.create(ot.prototype),Lr.prototype.constructor=Lr,Dr.prototype=Object.create(lv.prototype),Dr.prototype.constructor=Dr,Vr.prototype=Object.create(dd.prototype),Vr.prototype.constructor=Vr,Zr.prototype=Object.create(sa.prototype),Zr.prototype.constructor=Zr,ua.prototype=Object.create(sa.prototype),ua.prototype.constructor=ua,fa.prototype=Object.create(dd.prototype),fa.prototype.constructor=fa,Ca.prototype=Object.create(sa.prototype),Ca.prototype.constructor=Ca,Qa.prototype=Object.create(Za.prototype),Qa.prototype.constructor=Qa,ts.prototype=Object.create(Za.prototype),ts.prototype.constructor=ts,es.prototype=Object.create(Za.prototype),es.prototype.constructor=es,ns.prototype=Object.create(Za.prototype),ns.prototype.constructor=ns,is.prototype=Object.create(Za.prototype),is.prototype.constructor=is,os.prototype=Object.create(Za.prototype),os.prototype.constructor=os,rs.prototype=Object.create(Za.prototype),rs.prototype.constructor=rs,Cs.prototype=Object.create(Ua.prototype),Cs.prototype.constructor=Cs,Es.prototype=Object.create(v.prototype),Es.prototype.constructor=Es,Ms.prototype=Object.create(v.prototype),Ms.prototype.constructor=Ms,Ls.prototype=Object.create(Ua.prototype),Ls.prototype.constructor=Ls,Xs.prototype=Object.create(Ys.prototype),Xs.prototype.constructor=Xs,Il.prototype=Object.create(Rl.prototype),Il.prototype.constructor=Il,zl.prototype=Object.create(Rl.prototype),zl.prototype.constructor=zl,Fl.prototype=Object.create(Rl.prototype),Fl.prototype.constructor=Fl,Ul.prototype=Object.create(Rl.prototype),Ul.prototype.constructor=Ul,$u.prototype=Object.create(Iu.prototype),$u.prototype.constructor=$u,yu.prototype=Object.create(Iu.prototype),yu.prototype.constructor=yu,gu.prototype=Object.create(Iu.prototype),gu.prototype.constructor=gu,vu.prototype=Object.create(Iu.prototype),vu.prototype.constructor=vu,bu.prototype=Object.create(Iu.prototype),bu.prototype.constructor=bu,wu.prototype=Object.create(Iu.prototype),wu.prototype.constructor=wu,Su.prototype=Object.create(Iu.prototype),Su.prototype.constructor=Su,Qu.prototype=Object.create(Wu.prototype),Qu.prototype.constructor=Qu,ic.prototype=Object.create(Wu.prototype),ic.prototype.constructor=ic,sc.prototype=Object.create(Qu.prototype),sc.prototype.constructor=sc,lc.prototype=Object.create(Wu.prototype),lc.prototype.constructor=lc,hc.prototype=Object.create(Wu.prototype),hc.prototype.constructor=hc,mc.prototype=Object.create(Wu.prototype),mc.prototype.constructor=mc,vc.prototype=Object.create(Wu.prototype),vc.prototype.constructor=vc,kc.prototype=Object.create(Wu.prototype),kc.prototype.constructor=kc,Oc.prototype=Object.create(q.prototype),Oc.prototype.constructor=Oc,Uc.prototype=Object.create(ot.prototype),Uc.prototype.constructor=Uc,cp.prototype=Object.create(ot.prototype),cp.prototype.constructor=cp,Kc.prototype=Object.create(cp.prototype),Kc.prototype.constructor=Kc,Vc.prototype=Object.create(dp.prototype),Vc.prototype.constructor=Vc,Wc.prototype=Object.create(Vc.prototype),Wc.prototype.constructor=Wc,Xc.prototype=Object.create(Vc.prototype),Xc.prototype.constructor=Xc,tp.prototype=Object.create(fp.prototype),tp.prototype.constructor=tp,ap.prototype=Object.create(v.prototype),ap.prototype.constructor=ap,bp.prototype=Object.create(cp.prototype),bp.prototype.constructor=bp,wp.prototype=Object.create(dp.prototype),wp.prototype.constructor=wp,xp.prototype=Object.create(wp.prototype),xp.prototype.constructor=xp,Ep.prototype=Object.create(wp.prototype),Ep.prototype.constructor=Ep,kp.prototype=Object.create(Ep.prototype),kp.prototype.constructor=kp,Cp.prototype=Object.create(Ep.prototype),Cp.prototype.constructor=Cp,Ap.prototype=Object.create(fp.prototype),Ap.prototype.constructor=Ap,Rp.prototype=Object.create(v.prototype),Rp.prototype.constructor=Rp,Zp.prototype=Object.create(v.prototype),Zp.prototype.constructor=Zp,Eh.prototype=Object.create(v.prototype),Eh.prototype.constructor=Eh,Xh.prototype=Object.create(v.prototype),Xh.prototype.constructor=Xh,g_.prototype=Object.create(y_.prototype),g_.prototype.constructor=g_,x_.prototype=Object.create(y_.prototype),x_.prototype.constructor=x_,S_.prototype=Object.create(y_.prototype),S_.prototype.constructor=S_,I_.prototype=Object.create(y_.prototype),I_.prototype.constructor=I_,td.prototype=Object.create(Rd.prototype),td.prototype.constructor=td,md.prototype=Object.create(dd.prototype),md.prototype.constructor=md,Bd.prototype=Object.create(Rd.prototype),Bd.prototype.constructor=Bd,Yd.prototype=Object.create(v.prototype),Yd.prototype.constructor=Yd,cf.prototype=Object.create(af.prototype),cf.prototype.constructor=cf,pf.prototype=Object.create(af.prototype),pf.prototype.constructor=pf,$f.prototype=Object.create(hf.prototype),$f.prototype.constructor=$f,yf.prototype=Object.create(hf.prototype),yf.prototype.constructor=yf,gf.prototype=Object.create(kf.prototype),gf.prototype.constructor=gf,Rf.prototype=Object.create(gf.prototype),Rf.prototype.constructor=Rf,jf.prototype=Object.create(kf.prototype),jf.prototype.constructor=jf,Lf.prototype=Object.create(gf.prototype),Lf.prototype.constructor=Lf,Bf.prototype=Object.create(gf.prototype),Bf.prototype.constructor=Bf,Hf.prototype=Object.create(gf.prototype),Hf.prototype.constructor=Hf,Yf.prototype=Object.create(gf.prototype),Yf.prototype.constructor=Yf,Jf.prototype=Object.create(gf.prototype),Jf.prototype.constructor=Jf,Qf.prototype=Object.create(kf.prototype),Qf.prototype.constructor=Qf,xm.prototype=Object.create(Sm.prototype),xm.prototype.constructor=xm,x$.prototype=Object.create(U$.prototype),x$.prototype.constructor=x$,g$.prototype=Object.create(x$.prototype),g$.prototype.constructor=g$,k$.prototype=Object.create(x$.prototype),k$.prototype.constructor=k$,T$.prototype=Object.create(U$.prototype),T$.prototype.constructor=T$,I$.prototype=Object.create(U$.prototype),I$.prototype.constructor=I$,L$.prototype=Object.create(U$.prototype),L$.prototype.constructor=L$,V$.prototype=Object.create(U$.prototype),V$.prototype.constructor=V$,Z$.prototype=Object.create(U$.prototype),Z$.prototype.constructor=Z$,J$.prototype=Object.create(Z$.prototype),J$.prototype.constructor=J$,ny.prototype=Object.create(Z$.prototype),ny.prototype.constructor=ny,ay.prototype=Object.create(po.prototype),ay.prototype.constructor=ay,cy.prototype=Object.create(Bg.prototype),cy.prototype.constructor=cy,qy.prototype=Object.create(Py.prototype),qy.prototype.constructor=qy,Mg.prototype=Object.create(Bg.prototype),Mg.prototype.constructor=Mg,eg.prototype=Object.create(Mg.prototype),eg.prototype.constructor=eg,rg.prototype=Object.create(Bg.prototype),rg.prototype.constructor=rg,cg.prototype=Object.create(cy.prototype),cg.prototype.constructor=cg,fg.prototype=Object.create(Bg.prototype),fg.prototype.constructor=fg,gg.prototype=Object.create(Bg.prototype),gg.prototype.constructor=gg,Ag.prototype=Object.create(Bg.prototype),Ag.prototype.constructor=Ag,xg.prototype=Object.create(Ag.prototype),xg.prototype.constructor=xg,Sg.prototype=Object.create(Bg.prototype),Sg.prototype.constructor=Sg,Tg.prototype=Object.create(cy.prototype),Tg.prototype.constructor=Tg,Og.prototype=Object.create(Ag.prototype),Og.prototype.constructor=Og,zg.prototype=Object.create(Ny.prototype),zg.prototype.constructor=zg,Fg.prototype=Object.create(Tg.prototype),Fg.prototype.constructor=Fg,Gg.prototype=Object.create(Mg.prototype),Gg.prototype.constructor=Gg,yv.prototype=Object.create(lv.prototype),yv.prototype.constructor=yv,Fo.$metadata$={kind:a,simpleName:"FeatureSwitch",interfaces:[]};var Uo=null;function qo(){return null===Uo&&new Fo,Uo}function Ho(){Go=this}Ho.prototype.breaksData_zh7dbf$=function(t,e,n,i){var o=this.toAxisCoord_0(t,e,n,i);return new qc(o.component1(),o.component2())},Ho.prototype.toAxisCoord_0=function(t,n,i,o){var r,a=s(t.transformedValues,t.labels),p=l(),h=l();for(r=a.iterator();r.hasNext();){var _=r.next(),d=_.component1(),f=_.component2(),m=!0===o?new u(d,0):!1===o?new u(0,d):e.noWhenBranchMatched(),$=i?m.flip():m,y=n.toClient_gpjtzr$($);if(null!=y&&y.isFinite){var g=o?y.x:y.y;p.add_11rb$(g),h.add_11rb$(f)}}return new c(p,h)},Ho.$metadata$={kind:a,simpleName:"AxisUtil",interfaces:[]};var Go=null;function Ko(){return null===Go&&new Ho,Go}function Vo(){}function Yo(){}function Wo(){}function Xo(){nr=this}function Zo(t,e,n,i,o,r,a,s){this.geom=t,this.geomKind=e,this.aesthetics=n,this.aestheticMappers=i,this.pos=o,this.contextualMapping=r,this.mappedAes=a,this.annotations=s}Vo.$metadata$={kind:d,simpleName:"FrameOfReference",interfaces:[]},Yo.prototype.createTileFrame_sd8y8$=function(t,e,n,i){return void 0===n&&(n=!1),i?i(t,e,n):this.createTileFrame_sd8y8$$default(t,e,n)},Yo.$metadata$={kind:d,simpleName:"FrameOfReferenceProvider",interfaces:[]},Wo.$metadata$={kind:d,simpleName:"GeomLayer",interfaces:[]},Xo.prototype.createLayerRendererData_sqg2xh$=function(t){var n,i,o,r=Rr().prepareLayerAestheticMappers_evxbuk$(t,f.Mappers.IDENTITY,f.Mappers.IDENTITY),a=Rr().createLayerAesthetics_6wb5xp$(t,t.renderedAes(),r),s=!0===(n=t.isYOrientation)?m.YOrientationBaseUtil.flipAesKeys_fzsz32$(r):!1===n?r:e.noWhenBranchMatched(),u=!0===(i=t.isYOrientation)?new $(a):!1===i?a:e.noWhenBranchMatched(),c=t.renderedAes(),p=y("hasBinding",function(t,e){return t.hasBinding_896ixz$(e)}.bind(null,t)),h=l();for(o=c.iterator();o.hasNext();){var _=o.next();p(_)&&h.add_11rb$(_)}var d=g(h),v=Rr().createPositionAdjustment_h0u0lr$(t.posProvider,u);return new Zo(t.geom,t.geomKind,u,s,v,t.createContextualMapping(),d,t.createAnnotations())},Zo.$metadata$={kind:h,simpleName:"LayerRendererData",interfaces:[]},Xo.$metadata$={kind:a,simpleName:"LayerRendererUtil",interfaces:[]};var Jo,Qo,tr,er,nr=null;function ir(){return null===nr&&new Xo,nr}function or(t,e,n){v.call(this),this.id_zg94u8$_0=n,this.name$=t,this.ordinal$=e}function rr(){rr=function(){},Jo=new or("LEFT",0,"LEFT"),Qo=new or("RIGHT",1,"RIGHT"),tr=new or("TOP",2,"TOP"),er=new or("BOTTOM",3,"BOTTOM")}function ar(){return rr(),Jo}function sr(){return rr(),Qo}function lr(){return rr(),tr}function ur(){return rr(),er}function cr(){pr=this,this.MARGINAL_SCALE_0=f.Scales.continuousDomain_shloz7$("marginal",!0),this.MARGINAL_SCALE_REVERSED_0=this.MARGINAL_SCALE_0.with().continuousTransform_gxz7zd$(O.Transforms.REVERSE).build(),this.MARGINAL_SCALES_0=S([E(ar(),this.MARGINAL_SCALE_REVERSED_0),E(lr(),this.MARGINAL_SCALE_0),E(sr(),this.MARGINAL_SCALE_0),E(ur(),this.MARGINAL_SCALE_REVERSED_0)])}or.prototype.toString=function(){return"MarginSide "+this.id_zg94u8$_0},or.$metadata$={kind:h,simpleName:"MarginSide",interfaces:[v]},or.values=function(){return[ar(),sr(),lr(),ur()]},or.valueOf_61zpoe$=function(t){switch(t){case"LEFT":return ar();case"RIGHT":return sr();case"TOP":return lr();case"BOTTOM":return ur();default:b("No enum constant jetbrains.datalore.plot.builder.MarginSide."+t)}},cr.prototype.marginalLayersByMargin_relqli$=function(t){var e,n=w();for(e=t.iterator();e.hasNext();){var i,o=e.next(),r=n,a=o.marginalSide,s=r.get_11rb$(a);if(null==s){var u=l();r.put_xwzc9p$(a,u),i=u}else i=s;i.add_11rb$(o),n=r}return n},cr.prototype.marginalDomainByMargin_2z8kva$=function(t,n,i){var o,r=this.scaleXYByMargin_0(n,i),a=this.marginalLayersByMargin_relqli$(t),s=P(N(a.size));for(o=a.entries.iterator();o.hasNext();){var l,u=o.next(),c=s.put_xwzc9p$,p=u.key;t:do{var h=u.key,_=u.value,d=x(r,h),f=d.component1(),m=d.component2(),$=k(_),y=fs().computePlotXYTransformedDomains_6ppuq6$($,f,m,Ka().undefined()),g=C(y),v=g.component1(),b=g.component2();switch(h.name){case"LEFT":case"RIGHT":l=v;break t;case"TOP":case"BOTTOM":l=b;break t;default:l=e.noWhenBranchMatched();break t}}while(0);c.call(s,p,l)}return s},cr.prototype.scaleXYByMargin_0=function(t,e){return S([E(ar(),new c(this.MARGINAL_SCALE_REVERSED_0,e)),E(sr(),new c(this.MARGINAL_SCALE_0,e)),E(lr(),new c(t,this.MARGINAL_SCALE_0)),E(ur(),new c(t,this.MARGINAL_SCALE_REVERSED_0))])},cr.prototype.toMarginalScaleMap_2q3kgy$=function(t,n,i){var o,r,a=(r=i,function(t){var n;return!0===(n=r)?T.Companion.isPositionalY_896ixz$(t):!1===n?T.Companion.isPositionalX_896ixz$(t):e.noWhenBranchMatched()}),s=function(t){return function(n){var i;return!0===(i=t)?T.Companion.isPositionalX_896ixz$(n):!1===i?T.Companion.isPositionalY_896ixz$(n):e.noWhenBranchMatched()}}(i),l=P(N(t.size));for(o=t.entries.iterator();o.hasNext();){var u,c=o.next(),p=l.put_xwzc9p$,h=c.key;t:do{var _=c.key,d=c.value;switch(n.name){case"LEFT":case"RIGHT":u=a(_)?x(this.MARGINAL_SCALES_0,n):d;break t;case"TOP":case"BOTTOM":u=s(_)?x(this.MARGINAL_SCALES_0,n):d;break t;default:u=e.noWhenBranchMatched();break t}}while(0);p.call(l,h,u)}return l},cr.$metadata$={kind:a,simpleName:"MarginalLayerUtil",interfaces:[]};var pr=null;function hr(){return null===pr&&new cr,pr}function _r(t,e){$r(),this.plot=t,this.svg=new j,this.myContentBuilt_l8hvkk$_0=!1,this.myRegistrations_wwtuqx$_0=new R([]),this.svg.addClass_61zpoe$(l$().PLOT_CONTAINER),this.setSvgSize_2l8z8v$_0(e),this.plot.resize_gpjtzr$(e),this.decorationLayerId=I.SvgUID.get_61zpoe$($r().DECORATION_LAYER_ID_PREFIX)}function dr(t,e){this.this$PlotContainerPortable=t,this.closure$id=e}function fr(){mr=this,this.PLOT_ID_PREFIX="p",this.DECORATION_LAYER_ID_PREFIX="d"}Object.defineProperty(_r.prototype,"liveMapFigures",{configurable:!0,get:function(){return this.plot.liveMapFigures_8be2vx$}}),Object.defineProperty(_r.prototype,"isLiveMap",{configurable:!0,get:function(){return!this.plot.liveMapFigures_8be2vx$.isEmpty()}}),_r.prototype.ensureContentBuilt=function(){this.myContentBuilt_l8hvkk$_0||this.buildContent()},_r.prototype.resize_gpjtzr$=function(t){t.x<=0||t.y<=0||null!=t&&t.equals(this.plot.plotSize)||(this.clearContent(),this.setSvgSize_2l8z8v$_0(t),this.plot.resize_gpjtzr$(t))},dr.prototype.css=function(){return l$().generateCSS_kgh34e$(this.this$PlotContainerPortable.plot.styleSheet,this.closure$id,this.this$PlotContainerPortable.decorationLayerId)},dr.$metadata$={kind:h,interfaces:[A]},_r.prototype.buildContent=function(){if(this.myContentBuilt_l8hvkk$_0)throw p("Check failed.".toString());this.myContentBuilt_l8hvkk$_0=!0;var t=I.SvgUID.get_61zpoe$($r().PLOT_ID_PREFIX);this.svg.setStyle_i8z0m3$(new dr(this,t)),this.plot.rootGroup.id().set_11rb$(t),this.svg.children().add_11rb$(this.plot.rootGroup)},_r.prototype.clearContent=function(){this.myContentBuilt_l8hvkk$_0&&(this.myContentBuilt_l8hvkk$_0=!1,this.svg.children().clear(),this.plot.clear(),this.myRegistrations_wwtuqx$_0.remove(),this.myRegistrations_wwtuqx$_0=new R([]))},_r.prototype.reg_3xv6fb$=function(t){this.myRegistrations_wwtuqx$_0.add_3xv6fb$(t)},_r.prototype.setSvgSize_2l8z8v$_0=function(t){this.svg.width().set_11rb$(t.x),this.svg.height().set_11rb$(t.y)},fr.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var mr=null;function $r(){return null===mr&&new fr,mr}function yr(t,n,i,o,r,a,s,l,u,c,p,h,_){kr(),ot.call(this),this.title_0=t,this.subtitle_0=n,this.caption_0=i,this.coreLayersByTile_0=o,this.marginalLayersByTile_0=r,this.plotLayout_0=a,this.frameProviderByTile_0=s,this.coordProvider_0=l,this.legendBoxInfos_0=u,this.interactionsEnabled=c,this.theme=p,this.styleSheet=h,this.plotContext=_,this.flippedAxis=this.frameProviderByTile_0.get_za3lpa$(0).flipAxis,this.mouseEventPeer=new Tc,this.interactor_6ntbrr$_0=null,this.liveMapFigures_8be2vx$_v4aopx$_0=U(),this.plotSize_jypdvy$_0=Zm().DEF_PLOT_SIZE,this.axisTitleLeft_0=this.frameProviderByTile_0.get_za3lpa$(0).vAxisLabel,this.axisTitleBottom_0=this.frameProviderByTile_0.get_za3lpa$(0).hAxisLabel;var d,f=rt(this.coreLayersByTile_0),m=at("isLiveMap",1,(function(t){return t.isLiveMap}));t:do{var $;if(e.isType(f,st)&&f.isEmpty()){d=!1;break t}for($=f.iterator();$.hasNext();)if(m($.next())){d=!0;break t}d=!1}while(0);this.containsLiveMap_0=d}function gr(){return"buildPlot"}function vr(t){this.this$PlotSvgComponent=t,q.call(this)}function br(t){this.closure$message=t}function wr(){xr=this,this.LOG_0=nt.PortableLogging.logger_xo1ogr$(it(yr)),this.DEBUG_DRAWING_0=qo().PLOT_DEBUG_DRAWING}_r.$metadata$={kind:h,simpleName:"PlotContainerPortable",interfaces:[]},Object.defineProperty(yr.prototype,"interactor",{configurable:!0,get:function(){return this.interactor_6ntbrr$_0},set:function(t){if(null!=this.interactor_6ntbrr$_0)throw p("Can be initialize only once.".toString());this.interactor_6ntbrr$_0=t}}),Object.defineProperty(yr.prototype,"liveMapFigures_8be2vx$",{configurable:!0,get:function(){return this.liveMapFigures_8be2vx$_v4aopx$_0},set:function(t){this.liveMapFigures_8be2vx$_v4aopx$_0=t}}),Object.defineProperty(yr.prototype,"plotSize",{configurable:!0,get:function(){return this.plotSize_jypdvy$_0},set:function(t){this.plotSize_jypdvy$_0=t}}),yr.prototype.buildComponent=function(){var t;try{this.buildPlot_0()}catch(s){if(!e.isType(s,B))throw s;kr().LOG_0.error_l35kib$(s,gr);var n=L.Throwables.getRootCause_tcv7n7$(s),i=["Error building plot: "+e.getKClassFromExpression(n).simpleName,null!=n.message?"'"+n.message+"'":""],o=this.plotSize.y/2-8;for(t=0;t!==i.length;++t){var r=new z(i[t]),a=this.theme.plot().showBackground()?this.theme.plot().textColor():Zm().TEXT_COLOR;r.textColor().set_11rb$(a),r.setFontWeight_pdl1vj$("normal"),r.setFontStyle_pdl1vj$("normal"),r.setHorizontalAnchor_mf4siq$(D.MIDDLE),r.setVerticalAnchor_yaylw0$(M.CENTER),r.moveTo_lu1900$(this.plotSize.x/2,o),this.rootGroup.children().add_11rb$(r.rootGroup),o+=16}}},vr.prototype.doRemove=function(){var t;null!=(t=this.this$PlotSvgComponent.interactor)&&t.dispose(),this.this$PlotSvgComponent.liveMapFigures_8be2vx$=U()},vr.$metadata$={kind:h,interfaces:[q]},yr.prototype.buildPlot_0=function(){this.buildPlotComponents_0(),this.reg_3xv6fb$(new vr(this))},yr.prototype.resize_gpjtzr$=function(t){t.x<=0||t.y<=0||null!=t&&t.equals(this.plotSize)||(this.plotSize=t,this.clear())},yr.prototype.buildPlotComponents_0=function(){var t,e,n,i,o=new H(u.Companion.ZERO,this.plotSize),r=this.theme.plot();if(r.showBackground()){var a=G(o);a.strokeColor().set_11rb$(r.backgroundColor()),a.strokeWidth().set_11rb$(r.backgroundStrokeWidth()),a.fillColor().set_11rb$(r.backgroundFill()),this.containsLiveMap_0&&a.fillOpacity().set_11rb$(0),this.add_26jijc$(a)}kr().DEBUG_DRAWING_0&&this.drawDebugRect_0(o,K.Companion.MAGENTA,"MAGENTA: overallRect");var s,l=this.containsLiveMap_0?Md().liveMapBounds_wthzt5$(o):o,c=this.theme.legend(),p=xd().arrangeLegendBoxes_wcxvwm$(this.legendBoxInfos_0,c),h=!this.containsLiveMap_0,_=Md().subtractTitlesAndLegends_krgcoj$(l.dimension,this.title_0,this.subtitle_0,this.caption_0,this.axisTitleLeft_0,this.axisTitleBottom_0,h,p,this.theme,this.flippedAxis),d=this.plotLayout_0.doLayout_3twog0$(_,this.coordProvider_0);if(!d.tiles.isEmpty()){var f=d.size,m=Md().addTitlesAndLegends_krgcoj$(f,this.title_0,this.subtitle_0,this.caption_0,this.axisTitleLeft_0,this.axisTitleBottom_0,h,p,this.theme,this.flippedAxis),$=o.center.subtract_gpjtzr$(new H(o.origin,m).center),y=$.x,g=lt.max(0,y),v=$.y,b=new u(g,lt.max(0,v)),w=o.origin.add_gpjtzr$(b),x=new H(w,m);kr().DEBUG_DRAWING_0&&this.drawDebugRect_0(x,K.Companion.BLUE,"BLUE: plotOuterBounds");var S=Md().titleSizeDelta_9qd63d$(this.title_0,this.subtitle_0,this.theme.plot()),T=Md().captionSizeDelta_n8fzqq$(this.caption_0,this.theme.plot()),O=new H(x.origin.add_gpjtzr$(S),x.dimension.subtract_gpjtzr$(S).subtract_gpjtzr$(T));kr().DEBUG_DRAWING_0&&this.drawDebugRect_0(O,K.Companion.BLUE,"BLUE: plotOuterBoundsWithoutTitleAndCaption");var N=O.origin.add_gpjtzr$(Md().legendBlockLeftTopDelta_284vw0$(p,c)).add_gpjtzr$(Md().axisTitleSizeDelta_5fzsug$(E(this.axisTitleLeft_0,Id().axisTitle_9yvfuv$(this.theme.verticalAxis_6taknv$(this.flippedAxis))),E(null,o$().DUMMY),h,Md().axisMarginDimensions_1crrl9$(this.theme,this.flippedAxis))),P=Md().overallGeomBounds_93w4c3$(d).add_gpjtzr$(N),I=N;for(t=d.tiles.iterator();t.hasNext();){var A=t.next(),R=A.trueIndex,j=this.frameProviderByTile_0.get_za3lpa$(R),L=j.createTileFrame_sd8y8$(A,this.coordProvider_0,kr().DEBUG_DRAWING_0),z=j.createMarginalFrames_sd8y8$(A,this.coordProvider_0,kr().DEBUG_DRAWING_0),D=new Cr(this.coreLayersByTile_0.get_za3lpa$(R),this.marginalLayersByTile_0.get_za3lpa$(R),I,A,this.theme,L,z),M=I.add_gpjtzr$(A.offset);D.moveTo_gpjtzr$(M),this.add_8icvvv$(D),null!=(e=D.liveMapFigure)&&(this.liveMapFigures_8be2vx$=V(this.liveMapFigures_8be2vx$,k(e)));var B=A.geomOuterBounds.add_gpjtzr$(M),F=A.geomInnerBounds.add_gpjtzr$(M);null!=(n=this.interactor)&&n.onTileAdded_3frgn6$(F,D.targetLocators,D.layerYOrientations,new u(B.left,B.bottom)),kr().DEBUG_DRAWING_0&&this.drawDebugRect_0(F,K.Companion.ORANGE,"ORANGE: geomInnerBoundsAbsolute")}kr().DEBUG_DRAWING_0&&this.drawDebugRect_0(P,K.Companion.RED,"RED: geomAreaBounds");var U,q=(s=this,function(t,e){return s.createTextRectangle_0(t,e.top,void 0,e.bottom)}),X=null!=this.title_0?Y(P.left,x.top,P.width,Md().titleThickness_kyoegs$(this.title_0,Id().plotTitle_5dhkxz$(r),this.theme.plot().titleMargins())):null,Z=null!=X?q(X,this.theme.plot().titleMargins()):null;kr().DEBUG_DRAWING_0&&(null!=Z&&this.drawDebugRect_0(Z,K.Companion.LIGHT_BLUE),null!=X&&this.drawDebugRect_0(X,K.Companion.GRAY),null!=Z&&this.drawDebugRect_0(this.textBoundingBox_0(W(this.title_0),Z,Id().plotTitle_5dhkxz$(r),void 0,-1),K.Companion.DARK_GREEN));var J,Q=null!=this.subtitle_0?Y(P.left,null!=(U=null!=X?X.bottom:null)?U:x.top,P.width,Md().titleThickness_kyoegs$(this.subtitle_0,Id().plotSubtitle_5dhkxz$(r),this.theme.plot().subtitleMargins())):null,tt=null!=Q?q(Q,this.theme.plot().subtitleMargins()):null;if(kr().DEBUG_DRAWING_0&&(null!=tt&&this.drawDebugRect_0(tt,K.Companion.LIGHT_BLUE),null!=Q&&this.drawDebugRect_0(Q,K.Companion.GRAY),null!=tt&&this.drawDebugRect_0(this.textBoundingBox_0(W(this.subtitle_0),tt,Id().plotTitle_5dhkxz$(r),void 0,-1),K.Companion.DARK_GREEN)),null!=this.caption_0){var et=Md().titleThickness_kyoegs$(this.caption_0,Id().plotCaption_5dhkxz$(r),this.theme.plot().captionMargins());J=Y(P.left,x.bottom-et,P.width,et)}else J=null;var nt=J,it=null!=nt?q(nt,this.theme.plot().captionMargins()):null;kr().DEBUG_DRAWING_0&&(null!=it&&this.drawDebugRect_0(it,K.Companion.LIGHT_BLUE),null!=nt&&this.drawDebugRect_0(nt,K.Companion.GRAY),null!=it&&this.drawDebugRect_0(this.textBoundingBox_0(W(this.caption_0),it,Id().plotTitle_5dhkxz$(r),void 0,1),K.Companion.DARK_GREEN)),null!=Z&&this.addTitle_0(this.title_0,Id().plotTitle_5dhkxz$(r),r.titleJustification(),Z,void 0,l$().PLOT_TITLE),null!=tt&&this.addTitle_0(this.subtitle_0,Id().plotSubtitle_5dhkxz$(r),r.subtitleJustification(),tt,void 0,l$().PLOT_SUBTITLE);var ot=Md().overallTileBounds_93w4c3$(d).add_gpjtzr$(N);if(kr().DEBUG_DRAWING_0&&this.drawDebugRect_0(ot,K.Companion.DARK_MAGENTA,"DARK_MAGENTA: overallTileBounds"),h){if(null!=this.axisTitleLeft_0){var rt=W(C(d.tiles).vAxisInfo).orientation;this.addAxisTitle_0(this.axisTitleLeft_0,rt,ot,P,Id().axisTitle_9yvfuv$(this.theme.verticalAxis_6taknv$(this.flippedAxis)),this.theme.verticalAxis_6taknv$(this.flippedAxis).titleJustification(),this.theme.verticalAxis_6taknv$(this.flippedAxis).titleMargins(),l$().AXIS_TITLE+"-"+this.theme.verticalAxis_6taknv$(this.flippedAxis).axis)}if(null!=this.axisTitleBottom_0){var at=W(C(d.tiles).hAxisInfo).orientation;this.addAxisTitle_0(this.axisTitleBottom_0,at,ot,P,Id().axisTitle_9yvfuv$(this.theme.horizontalAxis_6taknv$(this.flippedAxis)),this.theme.horizontalAxis_6taknv$(this.flippedAxis).titleJustification(),this.theme.horizontalAxis_6taknv$(this.flippedAxis).titleMargins(),l$().AXIS_TITLE+"-"+this.theme.horizontalAxis_6taknv$(this.flippedAxis).axis)}}if(!c.position().isHidden)for(i=new gd(O,P,c).doLayout_mx3cup$(p).boxWithLocationList.iterator();i.hasNext();){var st=i.next(),ut=st.legendBox.createLegendBox();ut.moveTo_gpjtzr$(st.location),this.add_8icvvv$(ut)}null!=it&&this.addTitle_0(this.caption_0,Id().plotCaption_5dhkxz$(r),r.captionJustification(),it,void 0,l$().PLOT_CAPTION)}},yr.prototype.createTextRectangle_0=function(t,e,n,i,o){return void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),void 0===o&&(o=0),Y(t.left+o,t.top+e,t.width-(n+o),t.height-(e+i))},yr.prototype.addAxisTitle_0=function(t,n,i,o,r,a,s,l){var u,c,p;switch(n.name){case"LEFT":case"RIGHT":u=Y(i.left,o.top,i.width,o.height);break;case"TOP":case"BOTTOM":u=Y(o.left,i.top,o.width,i.height);break;default:u=e.noWhenBranchMatched()}var h=u;switch(n.name){case"LEFT":case"RIGHT":c=Zd();break;default:c=null}var _=c,d=Md().textDimensions_1al14g$(t,r).y;switch(n.name){case"LEFT":p=Y(h.left-d-s.width(),h.top,d+s.width(),h.height);break;case"RIGHT":p=Y(h.right,h.top,d+s.width(),h.height);break;case"TOP":p=Y(h.left,h.top-d-s.height(),h.width,d+s.height());break;case"BOTTOM":p=Y(h.left,h.bottom,h.width,d+s.height());break;default:p=e.noWhenBranchMatched()}var f=p,m=n.isHorizontal?this.createTextRectangle_0(f,s.top,void 0,s.bottom):this.createTextRectangle_0(f,void 0,s.right,void 0,s.left);this.addTitle_0(t,r,a,m,_,l),kr().DEBUG_DRAWING_0&&(this.drawDebugRect_0(m,K.Companion.LIGHT_BLUE),this.drawDebugRect_0(f,K.Companion.GRAY),this.drawDebugRect_0(this.textBoundingBox_0(t,m,r,n),K.Companion.DARK_GREEN))},yr.prototype.textBoundingBox_0=function(t,e,n,i,o){var r,a;void 0===i&&(i=eh()),void 0===o&&(o=0);var s=Md().textDimensions_1al14g$(t,n);if(X([eh(),nh()]).contains_11rb$(i))r=o>0?e.right-s.x:o<0?e.left:e.center.x-s.x/2,a=Y(r,e.center.y-s.y/2,s.x,s.y);else{var l=o>0?e.bottom-s.x:o<0?e.top:e.center.y-s.x/2;a=Y(e.center.x-s.y/2,l,s.y,s.x)}return a},yr.prototype.addTitle_0=function(t,e,n,i,o,r){var a;if(void 0===o&&(o=null),null!=t){var s=e.height(),l=new Z(t);l.addClassName_61zpoe$(r);var u=Qd().applyJustification_x3kzr8$(i,Md().textDimensions_1al14g$(t,e),s,n,o),c=u.component1(),p=u.component2();l.setLineHeight_14dthe$(s),l.setHorizontalAnchor_mf4siq$(p),l.moveTo_gpjtzr$(c),null!=(a=null!=o?o.angle:null)&&y("rotate",function(t,e){return t.rotate_14dthe$(e),F}.bind(null,l))(a),this.add_8icvvv$(l)}},yr.prototype.drawDebugRect_0=function(t,e,n){void 0===n&&(n=null);var i=G(t);i.strokeColor().set_11rb$(e),i.strokeWidth().set_11rb$(1),i.fillOpacity().set_11rb$(0),null!=n&&this.onMouseMove_0(i,J(n)+": "+t),this.add_26jijc$(i)},br.prototype.handle_42da0z$=function(t,e){tt(this.closure$message)},br.$metadata$={kind:h,interfaces:[et]},yr.prototype.onMouseMove_0=function(t,e){t.addEventHandler_mm8kk2$(Q.MOUSE_MOVE,new br(e))},wr.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var xr=null;function kr(){return null===xr&&new wr,xr}function Cr(t,e,n,i,o,r,a){Tr(),ot.call(this),this.coreLayers_0=t,this.marginalLayers_0=e,this.tilesOrigin_0=n,this.tileLayoutInfo_0=i,this.theme_0=o,this.frameOfReference_0=r,this.marginalFrameByMargin_0=a,this._targetLocators_0=l(),this.liveMapFigure_y5x745$_0=null;var s,u=this.coreLayers_0,c=_t(ht(u,10));for(s=u.iterator();s.hasNext();){var p=s.next();c.add_11rb$(p.isYOrientation)}this.layerYOrientations=c,this.moveTo_gpjtzr$(this.tileLayoutInfo_0.getAbsoluteBounds_gpjtzr$(this.tilesOrigin_0).origin)}function Er(){Sr=this}yr.$metadata$={kind:h,simpleName:"PlotSvgComponent",interfaces:[ot]},Object.defineProperty(Cr.prototype,"liveMapFigure",{configurable:!0,get:function(){return this.liveMapFigure_y5x745$_0},set:function(t){this.liveMapFigure_y5x745$_0=t}}),Object.defineProperty(Cr.prototype,"targetLocators",{configurable:!0,get:function(){return this._targetLocators_0}}),Cr.prototype.buildComponent=function(){var t,e,n,i=this.tileLayoutInfo_0.geomOuterBounds;this.addFacetLabels_0(i,this.theme_0.facets());var o,r=this.coreLayers_0;t:do{var a;for(a=r.iterator();a.hasNext();){var s=a.next();if(s.isLiveMap){o=s;break t}}o=null}while(0);var l=o;if(null!=l){var u=this.tileLayoutInfo_0.getAbsoluteOuterGeomBounds_gpjtzr$(this.tilesOrigin_0),c=Tr().createCanvasFigure_0(l,u);this.liveMapFigure=c.canvasFigure,this._targetLocators_0.add_11rb$(c.targetLocator)}else{for(this.frameOfReference_0.drawBeforeGeomLayer_8icvvv$(this),t=this.coreLayers_0.iterator();t.hasNext();){var p=t.next(),h=new Kh(p.geomKind,p.locatorLookupSpec,p.createContextualMapping());this._targetLocators_0.add_11rb$(h);var _=this.frameOfReference_0.buildGeomComponent_ge0scz$(p,h);this.add_8icvvv$(_)}for(e=hr().marginalLayersByMargin_relqli$(this.marginalLayers_0).entries.iterator();e.hasNext();){var d=e.next(),f=d.key,m=d.value,$=x(this.marginalFrameByMargin_0,f);for(n=m.iterator();n.hasNext();){var y=n.next(),g=$.buildGeomComponent_ge0scz$(y,new ut);this.add_8icvvv$(g)}}this.frameOfReference_0.drawAfterGeomLayer_8icvvv$(this)}},Cr.prototype.addFacetLabels_0=function(t,e){var n,i=this.tileLayoutInfo_0.facetXLabels;if(!i.isEmpty()){var o=id().facetColLabelSize_14dthe$(t.width),r=new u(t.left+0,t.top-id().facetColHeadHeight_za3lpa$(i.size)+6),a=new H(r,o);for(n=i.iterator();n.hasNext();){var s=n.next();this.addFacetLabBackground_0(a,e);var l=a.center.x,c=a.center.y,p=new z(s);p.addClassName_61zpoe$("facet-strip-text-x"),p.moveTo_lu1900$(l,c),p.setHorizontalAnchor_mf4siq$(D.MIDDLE),p.setVerticalAnchor_yaylw0$(M.CENTER),this.add_8icvvv$(p),a=a.add_gpjtzr$(new u(0,o.y))}}if(null!=this.tileLayoutInfo_0.facetYLabel){var h=Y(t.right+6,t.top-0,id().FACET_TAB_HEIGHT-12,t.height-0);this.addFacetLabBackground_0(h,e);var _=h.center.x,d=h.center.y,f=new z(this.tileLayoutInfo_0.facetYLabel);f.addClassName_61zpoe$("facet-strip-text-y"),f.moveTo_lu1900$(_,d),f.setHorizontalAnchor_mf4siq$(D.MIDDLE),f.setVerticalAnchor_yaylw0$(M.CENTER),f.rotate_14dthe$(90),this.add_8icvvv$(f)}},Cr.prototype.addFacetLabBackground_0=function(t,e){if(e.showStripBackground()){var n=G(t);n.strokeWidth().set_11rb$(e.stripStrokeWidth()),n.fillColor().set_11rb$(e.stripFill()),n.strokeColor().set_11rb$(e.stripColor());var i=n;this.add_26jijc$(i)}},Er.prototype.createCanvasFigure_0=function(t,n){var i;return(e.isType(i=t.geom,ct)?i:pt()).createCanvasFigure_wthzt5$(n)},Er.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var Sr=null;function Tr(){return null===Sr&&new Er,Sr}function Or(){Ar=this}function Nr(t){this.closure$aes=t,this.groupCount_n24wkg$_0=dt(function(t){return function(){return g(t.groups()).size}}(t))}function Pr(){Ir=this}Cr.$metadata$={kind:h,simpleName:"PlotTile",interfaces:[ot]},Object.defineProperty(Nr.prototype,"aesthetics",{configurable:!0,get:function(){return this.closure$aes}}),Object.defineProperty(Nr.prototype,"groupCount",{configurable:!0,get:function(){return this.groupCount_n24wkg$_0.value}}),Nr.$metadata$={kind:h,interfaces:[jr]},Or.prototype.createPositionAdjustment_h0u0lr$=function(t,e){return t.createPos_q7kk9g$(new Nr(e))},Or.prototype.prepareLayerAestheticMappers_evxbuk$=function(t,e,n){var i,o=t.isYOrientation,r=ft();for(i=V(t.renderedAes(),X([T.Companion.X,T.Companion.Y])).iterator();i.hasNext();){var a=i.next(),s=mt(a,T.Companion.SLOPE)?f.Mappers.mul_14dthe$(W(n.invoke_yrwdxb$(1))/W(e.invoke_yrwdxb$(1))):mt(a,T.Companion.X)?e:mt(a,T.Companion.Y)?n:T.Companion.isPositionalX_896ixz$(a)?o?n:e:T.Companion.isPositionalY_896ixz$(a)?o?e:n:t.hasBinding_896ixz$(a)?x(t.scaleMapppersNP,a):null;null!=s&&r.put_xwzc9p$(a,s)}return r},Or.prototype.createLayerAesthetics_6wb5xp$=function(t,n,i){var o,r,a,s=new $t;s.group_ddsh32$(t.group);var l=!1;for(o=n.iterator();o.hasNext();){var u=o.next();if(T.Companion.isPositional_896ixz$(u)&&t.hasConstant_896ixz$(u)){l=!0;break}}var c=t.dataFrame,h={v:null};for(r=n.iterator();r.hasNext();){var _=r.next(),d=e.isType(a=_,T)?a:pt(),m=T.Companion.isPositional_896ixz$(d)?f.Mappers.IDENTITY:i.get_11rb$(d);if(t.hasConstant_896ixz$(d)){var $=t.getConstant_31786j$(d),y=this.transformIfContinuous_0(this.scale_0(d,t));s.constantAes_bbdhip$(d,this.constantToAesValue_0(d,$,y,m))}else if(t.hasBinding_896ixz$(d)){if(null==m)throw p(("No scale mapper defined for aesthetic "+d).toString());var g=yt.DataFrameUtil.transformVarFor_896ixz$(d);if(!c.has_8xm3sj$(g))throw p(("Undefined var "+g+" for aesthetic "+d).toString());var v=c.getNumeric_8xm3sj$(g);if(null==h.v)h.v=v.size;else if(h.v!==v.size){var b=J(d)+" expected data size="+J(h.v)+" was size="+J(v.size);throw p(b.toString())}if(0===h.v&&l)s.constantAes_bbdhip$(d,t.aestheticsDefaults.defaultValue_31786j$(d));else{var w=$t.Companion.listMapper_ci44bt$(v,m);s.aes_u42xfl$(d,w)}}else{var x=t.getDefault_31786j$(d),k=this.transformIfContinuous_0(this.scale_0(d,t));s.constantAes_bbdhip$(d,this.constantToAesValue_0(d,x,k,m))}}return null!=h.v&&h.v>0?s.dataPointCount_za3lpa$(h.v):l&&s.dataPointCount_za3lpa$(1),s.build()},Or.prototype.constantToAesValue_0=function(t,n,i,o){var r,a,s,l,u;if(t.isNumeric){var c=null!=i?!0===(a=i.isInDomain_yrwdxb$("number"==typeof(r=n)?r:pt()))?i.apply_yrwdxb$(n):!1===a?null:e.noWhenBranchMatched():"number"==typeof(s=n)?s:null;u=null!=(l=null!=o?o.invoke_yrwdxb$(c):null)?l:c}else u=n;return u},Or.prototype.rangeWithExpand_wxtkag$=function(t,e,n){var i,o;if(null==t)return null;var r=e.multiplicativeExpand,a=e.additiveExpand,s=this.transformIfContinuous_0(e),l=new gt(null!=(i=null!=s?s.applyInverse_yrwdxb$(t.lowerEnd):null)?i:t.lowerEnd,null!=(o=null!=s?s.applyInverse_yrwdxb$(t.upperEnd):null)?o:t.upperEnd),u=l.lowerEnd,c=l.upperEnd,p=a+(c-u)*r,h=p;if(n){var _=0===u||0===c;_||(_=wt(u)===wt(c)),_&&(u>=0?p=0:h=0)}var d,f,m,$=u-p,y=null!=(d=null!=s?s.apply_yrwdxb$($):null)?d:$,g=vt(y)?t.lowerEnd:y,v=c+h,b=null!=(m=null!=s?s.apply_yrwdxb$(v):null)?m:v;return f=vt(b)?t.upperEnd:b,new gt(g,f)},Or.prototype.transformIfContinuous_0=function(t){var n;return null==t?null:t.isContinuousDomain?e.isType(n=t.transform,bt)?n:pt():null},Or.prototype.scale_0=function(t,e){var n=T.Companion.isPositionalXY_896ixz$(t)?T.Companion.toAxisAes_pnj1mo$(t,e.isYOrientation):t;return e.scaleMap.containsKey_896ixz$(n)?e.scaleMap.get_31786j$(n):null},Pr.prototype.layerAestheticsWithoutLayout_sqg2xh$=function(t){var e=Rr().prepareLayerAestheticMappers_evxbuk$(t,f.Mappers.IDENTITY,f.Mappers.IDENTITY);return Rr().createLayerAesthetics_6wb5xp$(t,t.renderedAes(),e)},Pr.$metadata$={kind:a,simpleName:"DemoAndTest",interfaces:[]};var Ir=null;Or.$metadata$={kind:a,simpleName:"PlotUtil",interfaces:[]};var Ar=null;function Rr(){return null===Ar&&new Or,Ar}function jr(){}function Lr(t,e,n,i,o){ot.call(this),this.aesthetics_0=t,this.geom_0=e,this.pos_0=n,this.coord_0=i,this.geomContext_0=o}function zr(t,e){this.variable=t,this.aes=e}function Dr(t,e){Fr(),lv.call(this,null,t,e),this.myLineFormatter_0=Ot.Companion.forNArgs_zeh6sj$(t,e.size,"fields")}function Mr(){Br=this,this.DEFAULT_STYLE_0=new nv(St.Companion.SERIF,Tt.Companion.NORMAL,10,K.Companion.BLACK)}jr.$metadata$={kind:d,simpleName:"PosProviderContext",interfaces:[]},Lr.prototype.buildComponent=function(){this.buildLayer_0()},Lr.prototype.buildLayer_0=function(){this.geom_0.build_uzv8ab$(this,this.aesthetics_0,this.pos_0,this.coord_0,this.geomContext_0)},Lr.$metadata$={kind:h,simpleName:"SvgLayerRenderer",interfaces:[xt,ot]},zr.prototype.toString=function(){return"VarBinding{variable="+this.variable+", aes="+this.aes},zr.prototype.equals=function(t){var n;return this===t||!(null==t||null==(n=e.getKClassFromExpression(this))||!n.equals(e.getKClassFromExpression(t)))&&(e.isType(t,zr)||pt(),!!mt(this.variable,t.variable)&&!!mt(this.aes,t.aes))},zr.prototype.hashCode=function(){var t=kt(this.variable);return(31*t|0)+kt(this.aes)|0},zr.$metadata$={kind:h,simpleName:"VarBinding",interfaces:[]},Dr.prototype.initDataContext_nqispu$=function(t,e){var n;for(n=this.fields.iterator();n.hasNext();)n.next().initDataContext_nqispu$(t,e)},Dr.prototype.getAnnotationText_za3lpa$=function(t){var e,n=this.fields,i=_t(ht(n,10));for(e=n.iterator();e.hasNext();){var o,r=e.next(),a=i.add_11rb$;if(null==(o=r.getAnnotationText_za3lpa$(t)))return null;a.call(i,o)}var s,l=i,u=this.myLineFormatter_0,c=_t(ht(l,10));for(s=l.iterator();s.hasNext();){var p=s.next();c.add_11rb$(p)}return u.format_pqjuzw$(c)},Mr.prototype.createAnnotations_6mw9qm$=function(t,n,i,o){var r,a,s,u,c,p;if(t.linePatterns.isEmpty())return null;var h,_=t.linePatterns,d=l();for(h=_.iterator();h.hasNext();){var f,m=h.next(),$=m.fields,y=l();for(f=$.iterator();f.hasNext();){var g=f.next();e.isType(g,dv)&&y.add_11rb$(g)}var v,b=y;t:do{var w;if(e.isType(b,st)&&b.isEmpty()){v=!0;break t}for(w=b.iterator();w.hasNext();){var x=w.next();if(!n.isMapped_896ixz$(x.aes)){v=!1;break t}}v=!0}while(0);v&&d.add_11rb$(m)}var k,C=d;for(k=C.iterator();k.hasNext();)k.next().initDataContext_nqispu$(i,n);return new Et(C,new Ct(null!=(a=null!=(r=null!=o?o.family:null)?r.name:null)?a:this.DEFAULT_STYLE_0.family.name,null!=(s=null!=o?o.face:null)?s:this.DEFAULT_STYLE_0.face,null!=(c=null!=(u=t.textSize)?u:null!=o?o.size:null)?c:this.DEFAULT_STYLE_0.size,null!=(p=null!=o?o.color:null)?p:this.DEFAULT_STYLE_0.color))},Mr.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var Br=null;function Fr(){return null===Br&&new Mr,Br}function Ur(t,e,n){Gr(),this.valueSources=t,this.linePatterns=e,this.textSize=n}function qr(){Hr=this,this.NONE=new Ur(U(),U(),null)}Dr.$metadata$={kind:h,simpleName:"AnnotationLine",interfaces:[Nt,lv]},qr.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var Hr=null;function Gr(){return null===Hr&&new qr,Hr}function Kr(t,e,n,i,o){Xr(),this.legendTitle_0=t,this.transformedDomain_0=e,this.scale_0=n,this.scaleMapper_0=i,this.theme_0=o,this.colorBarOptions_0=null}function Vr(t,e){this.closure$spec=t,dd.call(this,e)}function Yr(){Wr=this,this.DEBUG_DRAWING_0=qo().LEGEND_DEBUG_DRAWING}Ur.$metadata$={kind:h,simpleName:"AnnotationSpecification",interfaces:[]},Vr.prototype.createLegendBox=function(){var t=new Kc(this.closure$spec);return t.debug=Xr().DEBUG_DRAWING_0,t},Vr.$metadata$={kind:h,interfaces:[dd]},Kr.prototype.createColorBar=function(){var t=this.scale_0;t.hasBreaks()||(t=Pt.ScaleBreaksUtil.withBreaks_ssmbt$(t,this.transformedDomain_0,5));var e=t.getScaleBreaks();if(e.isEmpty)return yd().EMPTY;var n=Xr().createColorBarSpec_9whx24$(this.legendTitle_0,this.transformedDomain_0,e,this.scaleMapper_0,this.theme_0,this.colorBarOptions_0);return new Vr(n,n.size)},Kr.prototype.setOptions_p8ufd2$=function(t){this.colorBarOptions_0=t},Yr.prototype.createColorBarSpec_9whx24$=function(t,e,n,i,o,r){var a;void 0===r&&(r=null);var s=ka().legendDirection_730mk3$(o)===Lp(),l=null!=r?r.width:null,c=null!=r?r.height:null,p=rp().barAbsoluteSize_kkcal5$(s,o);null!=l&&(p=new u(l,p.y)),null!=c&&(p=new u(p.x,c));var h=!s,_=s?Qc().horizontal_6u4c86$(t,e,n,p,h,o):Qc().vertical_6u4c86$(t,e,n,p,h,o);return new tp(t,e,n,i,null!=(a=null!=r?r.binCount:null)?a:20,o,_,h)},Yr.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var Wr=null;function Xr(){return null===Wr&&new Yr,Wr}function Zr(){sa.call(this),this.width=null,this.height=null,this.binCount=null}function Jr(){this.flipped_0=!1,this.aesthetics_0=null,this.aestheticMappers_0=null,this.aesBounds_0=null,this.geomTargetCollector_0=new ut,this.fontFamilyRegistry_0=null,this.annotations_0=null}function Qr(t){this.aesthetics=t.aesthetics_0,this.aestheticMappers=t.aestheticMappers_0,this._aesBounds=t.aesBounds_0,this.flipped_nf6vrh$_0=t.flipped_0,this.targetCollector_2hnek9$_0=t.geomTargetCollector_0,this.annotations_7kjnwx$_0=t.annotations_0,this.fontFamilyRegistry_0=t.fontFamilyRegistry_0}function ta(t){return t=t||Object.create(Jr.prototype),Jr.call(t),t}function ea(t,e,n,i){aa(),this.geomProvider_0=t,this.stat_0=e,this.posProvider_0=n,this.fontFamilyRegistry_0=i,this.myBindings_0=l(),this.myConstantByAes_0=new Mt,this.myGroupingVarName_0=null,this.myPathIdVarName_0=null,this.myScaleProviderByAes_0=ft(),this.myDataPreprocessor_0=null,this.myLocatorLookupSpec_0=qt.Companion.NONE,this.myContextualMappingProvider_0=sh().NONE,this.myIsLegendDisabled_0=!1,this.isYOrientation_0=!1,this.isMarginal_0=!1,this.marginalSide_0=ar(),this.marginalSize_0=Ht.NaN,this.myAnnotationsProvider_0=null}function na(t,e,n,i,o,r,a,s,l,u,c,p,h,_,d,f,m,$){var y;for(this.dataFrame_uc8k26$_0=t,this.posProvider_sk8uxc$_0=n,this.group_btwr86$_0=o,this.varBindings_0=r,this.scaleMap_9lvzv7$_0=s,this.scaleMapppersNP_xaevk1$_0=l,this.locatorLookupSpec_65qeye$_0=u,this.contextualMappingProvider_0=c,this.isLegendDisabled_1bnyfg$_0=p,this.isYOrientation_gj59r2$_0=h,this.isMarginal_jm2roc$_0=_,this.marginalSide_i85i29$_0=d,this.marginalSize_i851qz$_0=f,this.fontFamilyRegistry_xk06j5$_0=m,this.annotationsProvider_0=$,this.geom_ipep5v$_0=e.createGeom(),this.geomKind_qyi6z5$_0=e.geomKind,this.aestheticsDefaults_4lnusm$_0=e.aestheticsDefaults(),this.myRenderedAes_0=null,this.myConstantByAes_0=null,this.myRenderedAes_0=Dt(i),this.myConstantByAes_0=new Mt,y=a.keys_287e2$().iterator();y.hasNext();){var g=y.next();this.myConstantByAes_0.put_ev6mlr$(g,a.get_ex36zt$(g))}}function ia(){ra=this}function oa(t){return function(e,n){var i=Vl().transformOriginals_9nntby$(e,t.myBindings_0,n);if(mt(t.stat_0,Ft.Stats.IDENTITY))return i;var o=new Ut(i),r=new nu(i,Vl().defaultGroupingVariables_39xr23$(e,t.myBindings_0,t.myPathIdVarName_0),t.myGroupingVarName_0,!0),a=new _u(i,t.myBindings_0,n,o,!1);return Vl().buildStatData_ardmvj$(a,t.stat_0,r,U(),U(),U(),null,y("println",(function(t){return tt(t),F}))).data}}Kr.$metadata$={kind:h,simpleName:"ColorBarAssembler",interfaces:[]},Zr.$metadata$={kind:h,simpleName:"ColorBarOptions",interfaces:[sa]},Jr.prototype.flipped_6taknv$=function(t){return this.flipped_0=t,this},Jr.prototype.aesthetics_m7huy5$=function(t){return this.aesthetics_0=t,this},Jr.prototype.aestheticMappers_yu359v$=function(t){return this.aestheticMappers_0=t,this},Jr.prototype.aesBounds_wthzt5$=function(t){return this.aesBounds_0=t,this},Jr.prototype.geomTargetCollector_xrq6q$=function(t){return this.geomTargetCollector_0=t,this},Jr.prototype.fontFamilyRegistry_exm2t6$=function(t){return this.fontFamilyRegistry_0=t,this},Jr.prototype.annotations_dq13fv$=function(t){return this.annotations_0=t,this},Jr.prototype.build=function(){return new Qr(this)},Object.defineProperty(Qr.prototype,"flipped",{configurable:!0,get:function(){return this.flipped_nf6vrh$_0}}),Object.defineProperty(Qr.prototype,"targetCollector",{configurable:!0,get:function(){return this.targetCollector_2hnek9$_0}}),Object.defineProperty(Qr.prototype,"annotations",{configurable:!0,get:function(){return this.annotations_7kjnwx$_0}}),Qr.prototype.getResolution_vktour$=function(t){var e=0;return null!=this.aesthetics&&(e=this.aesthetics.resolution_594811$(t,0)),e<=It.SeriesUtil.TINY&&(e=1),e},Qr.prototype.isMappedAes_896ixz$=function(t){var e,n;return null!=(n=null!=(e=this.aestheticMappers)?e.containsKey_11rb$(t):null)&&n},Qr.prototype.estimateTextSize_9wnxdu$=function(t,e,n,i,o){var r=this.fontFamilyRegistry_0;if(null==r)throw p("Font-family registry is not specified.".toString());var a=r.get_61zpoe$(e);return new t$(new Rt(a,At(n),i,o)).dimensions_61zpoe$(t)},Qr.prototype.getAesBounds=function(){if(null==this._aesBounds)throw p("GeomContext: aesthetics bounds are not defined.".toString());return this._aesBounds},Qr.prototype.withTargetCollector_xrq6q$=function(t){return this.with().geomTargetCollector_xrq6q$(t).build()},Qr.prototype.with=function(){return t=this,e=e||Object.create(Jr.prototype),Jr.call(e),e.flipped_0=t.flipped,e.aesthetics_0=t.aesthetics,e.aestheticMappers_0=t.aestheticMappers,e.aesBounds_0=t._aesBounds,e.geomTargetCollector_0=t.targetCollector,e.annotations_0=t.annotations,e;var t,e},Qr.$metadata$={kind:h,simpleName:"MyGeomContext",interfaces:[ha]},Jr.$metadata$={kind:h,simpleName:"GeomContextBuilder",interfaces:[_a]},ea.prototype.addBinding_14cn14$=function(t){return this.myBindings_0.add_11rb$(t),this},ea.prototype.groupingVar_8xm3sj$=function(t){return this.myGroupingVarName_0=t.name,this},ea.prototype.groupingVarName_61zpoe$=function(t){return this.myGroupingVarName_0=t,this},ea.prototype.pathIdVarName_61zpoe$=function(t){return this.myPathIdVarName_0=t,this},ea.prototype.addConstantAes_bbdhip$=function(t,e){return this.myConstantByAes_0.put_ev6mlr$(t,e),this},ea.prototype.addScaleProvider_jv3qxe$=function(t,e){return this.myScaleProviderByAes_0.put_xwzc9p$(t,e),this},ea.prototype.locatorLookupSpec_271kgc$=function(t){return this.myLocatorLookupSpec_0=t,this},ea.prototype.contextualMappingProvider_td8fxc$=function(t){return this.myContextualMappingProvider_0=t,this},ea.prototype.disableLegend_6taknv$=function(t){return this.myIsLegendDisabled_0=t,this},ea.prototype.yOrientation_6taknv$=function(t){return this.isYOrientation_0=t,this},ea.prototype.marginal_fbs2by$=function(t,e,n){return this.isMarginal_0=t,this.marginalSide_0=e,this.marginalSize_0=n,this},ea.prototype.annotationSpecification_vimm4p$=function(t,e){return this.myAnnotationsProvider_0=(n=t,i=e,function(t,e){return Fr().createAnnotations_6mw9qm$(n,t,e,i)}),this;var n,i},ea.prototype.build_e3vjvq$=function(t,e,n){var i,o,r,a=e.keySet(),s=P(Gt(N(ht(a,10)),16));for(r=a.iterator();r.hasNext();){var u=r.next();s.put_xwzc9p$(u,e.get_31786j$(u).transform)}var c=s,p=t;null!=this.myDataPreprocessor_0&&(p=W(this.myDataPreprocessor_0)(p,c)),p=Vl().transformOriginals_9nntby$(p,this.myBindings_0,c);var h,_=this.myBindings_0,d=Gt(N(ht(_,10)),16),f=P(d);for(h=_.iterator();h.hasNext();){var m,$,y=h.next();$=y.aes,m=y.variable.isOrigin?new zr(yt.DataFrameUtil.transformVarFor_896ixz$(y.aes),y.aes):y;var g=E($,m);f.put_xwzc9p$(g.first,g.second)}var v=jt(f),b=l();for(i=v.values.iterator();i.hasNext();){var w=i.next(),k=w.variable;if(k.isStat){var C=w.aes,S=x(c,C),T=yt.TransformVar.forAes_896ixz$(C);p=yt.DataFrameUtil.applyTransform_3268a5$(p,k,T,S),b.add_11rb$(new zr(T,C))}}for(o=b.iterator();o.hasNext();){var O=o.next(),I=O.aes;v.put_xwzc9p$(I,O)}var A=new nu(p,Vl().defaultGroupingVariables_39xr23$(p,this.myBindings_0,this.myPathIdVarName_0),this.myGroupingVarName_0,this.handlesGroups_0());return new na(p,this.geomProvider_0,this.posProvider_0,this.geomProvider_0.renders(),A.groupMapper,v,this.myConstantByAes_0,e,n,this.myLocatorLookupSpec_0,this.myContextualMappingProvider_0,this.myIsLegendDisabled_0,this.isYOrientation_0,this.isMarginal_0,this.marginalSide_0,this.marginalSize_0,this.fontFamilyRegistry_0,this.myAnnotationsProvider_0)},ea.prototype.handlesGroups_0=function(){return this.geomProvider_0.handlesGroups()||this.posProvider_0.handlesGroups()},Object.defineProperty(na.prototype,"dataFrame",{get:function(){return this.dataFrame_uc8k26$_0}}),Object.defineProperty(na.prototype,"posProvider",{get:function(){return this.posProvider_sk8uxc$_0}}),Object.defineProperty(na.prototype,"group",{get:function(){return this.group_btwr86$_0}}),Object.defineProperty(na.prototype,"scaleMap",{get:function(){return this.scaleMap_9lvzv7$_0}}),Object.defineProperty(na.prototype,"scaleMapppersNP",{get:function(){return this.scaleMapppersNP_xaevk1$_0}}),Object.defineProperty(na.prototype,"locatorLookupSpec",{get:function(){return this.locatorLookupSpec_65qeye$_0}}),Object.defineProperty(na.prototype,"isLegendDisabled",{get:function(){return this.isLegendDisabled_1bnyfg$_0}}),Object.defineProperty(na.prototype,"isYOrientation",{get:function(){return this.isYOrientation_gj59r2$_0}}),Object.defineProperty(na.prototype,"isMarginal",{get:function(){return this.isMarginal_jm2roc$_0}}),Object.defineProperty(na.prototype,"marginalSide",{get:function(){return this.marginalSide_i85i29$_0}}),Object.defineProperty(na.prototype,"marginalSize",{get:function(){return this.marginalSize_i851qz$_0}}),Object.defineProperty(na.prototype,"fontFamilyRegistry",{get:function(){return this.fontFamilyRegistry_xk06j5$_0}}),Object.defineProperty(na.prototype,"geom",{configurable:!0,get:function(){return this.geom_ipep5v$_0}}),Object.defineProperty(na.prototype,"geomKind",{configurable:!0,get:function(){return this.geomKind_qyi6z5$_0}}),Object.defineProperty(na.prototype,"aestheticsDefaults",{configurable:!0,get:function(){return this.aestheticsDefaults_4lnusm$_0}}),Object.defineProperty(na.prototype,"legendKeyElementFactory",{configurable:!0,get:function(){return this.geom.legendKeyElementFactory}}),Object.defineProperty(na.prototype,"isLiveMap",{configurable:!0,get:function(){return e.isType(this.geom,ct)}}),na.prototype.renderedAes=function(){return this.myRenderedAes_0},na.prototype.hasBinding_896ixz$=function(t){return this.varBindings_0.containsKey_11rb$(t)},na.prototype.getBinding_31786j$=function(t){return W(this.varBindings_0.get_11rb$(t))},na.prototype.hasConstant_896ixz$=function(t){return this.myConstantByAes_0.containsKey_ex36zt$(t)},na.prototype.getConstant_31786j$=function(t){if(!this.hasConstant_896ixz$(t))throw Kt(("Constant value is not defined for aes "+t).toString());return this.myConstantByAes_0.get_ex36zt$(t)},na.prototype.getDefault_31786j$=function(t){return this.aestheticsDefaults.defaultValue_31786j$(t)},na.prototype.preferableNullDomain_896ixz$=function(t){var n,i=Lt(t,this.isYOrientation);return(e.isType(n=this.geom,zt)?n:pt()).preferableNullDomain_896ixz$(i)},na.prototype.rangeIncludesZero_896ixz$=function(t){var e=Lt(t,this.isYOrientation);return this.aestheticsDefaults.rangeIncludesZero_896ixz$(e)},na.prototype.setLiveMapProvider_kld0fp$=function(t){if(!e.isType(this.geom,ct))throw p("Not Livemap: "+e.getKClassFromExpression(this.geom).simpleName);this.geom.setLiveMapProvider_kld0fp$(t)},na.prototype.createContextualMapping=function(){var t=new Pl(this.dataFrame,this.varBindings_0,this.scaleMap,this.isYOrientation);return this.contextualMappingProvider_0.createContextualMapping_8fr62e$(t,this.dataFrame)},na.prototype.createAnnotations=function(){var t;return null!=(t=this.annotationsProvider_0)?t(new Pl(this.dataFrame,this.varBindings_0,this.scaleMap,this.isYOrientation),this.dataFrame):null},na.$metadata$={kind:h,simpleName:"MyGeomLayer",interfaces:[Wo]},ia.prototype.demoAndTest_ij5gxo$=function(t,e,n){void 0===n&&(n=ss().wrap_dkjclg$(Bt.PositionAdjustments.identity()));var i=new ea(t,e,n,new Tm);return i.myDataPreprocessor_0=oa(i),i},ia.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var ra=null;function aa(){return null===ra&&new ia,ra}function sa(){pa(),this.isReverse=!1}function la(){ca=this,this.NONE=new ua}function ua(){sa.call(this)}ea.$metadata$={kind:h,simpleName:"GeomLayerBuilder",interfaces:[]},ua.$metadata$={kind:h,interfaces:[sa]},la.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var ca=null;function pa(){return null===ca&&new la,ca}function ha(){}function _a(){}function da(t,e,n,i){va(),this.legendTitle_0=t,this.guideOptionsMap_0=e,this.scaleMappers_0=n,this.theme_0=i,this.legendLayers_0=l()}function fa(t,e){this.closure$spec=t,dd.call(this,e)}function ma(t,n,i,o,r,a){var l,u;this.keyElementFactory_8be2vx$=t,this.aesList_8be2vx$=n,this.keyAesthetics_8be2vx$=null,this.keyLabels_8be2vx$=null;var c=w();for(l=this.aesList_8be2vx$.iterator();l.hasNext();){var h=l.next(),_=a.getScale_896ixz$(h);if(_.hasBreaks()||(_=Pt.ScaleBreaksUtil.withBreaks_ssmbt$(_,a.overallTransformedDomain_896ixz$(h),5)),!_.hasBreaks())throw p(("No breaks were defined for scale "+h).toString());var d,f=_.getScaleBreaks(),m=f.transformedValues,$=_t(ht(m,10));for(d=m.iterator();d.hasNext();){var y,g=d.next();$.add_11rb$(e.isType(y=x(r,h).invoke_yrwdxb$(g),Yt)?y:pt())}var v=$,b=f.labels;for(u=s(b,v).iterator();u.hasNext();){var k,C=u.next(),E=C.component1(),S=C.component2(),T=c.get_11rb$(E);if(null==T){var O=ft();c.put_xwzc9p$(E,O),k=O}else k=T;k.put_xwzc9p$(h,S)}}this.keyAesthetics_8be2vx$=ka().mapToAesthetics_8kbmqf$(c.values,i,o),this.keyLabels_8be2vx$=Dt(c.keys)}function $a(){ga=this,this.DEBUG_DRAWING_0=qo().LEGEND_DEBUG_DRAWING}function ya(t){var e=t.x/2,n=2*lt.floor(e)+1+1,i=t.y/2;return new u(n,2*lt.floor(i)+1+1)}sa.$metadata$={kind:h,simpleName:"GuideOptions",interfaces:[]},_a.$metadata$={kind:d,simpleName:"Builder",interfaces:[]},ha.$metadata$={kind:d,simpleName:"ImmutableGeomContext",interfaces:[Vt]},da.prototype.addLayer_ut0rz1$=function(t,e,n,i,o){this.legendLayers_0.add_11rb$(new ma(t,e,n,i,this.scaleMappers_0,o))},fa.prototype.createLegendBox=function(){var t=new bp(this.closure$spec);return t.debug=va().DEBUG_DRAWING_0,t},fa.$metadata$={kind:h,interfaces:[dd]},da.prototype.createLegend=function(){var t,n,i,o,r,a,s=w();for(t=this.legendLayers_0.iterator();t.hasNext();){var u=t.next(),c=u.keyElementFactory_8be2vx$,p=u.keyAesthetics_8be2vx$.dataPoints().iterator();for(n=u.keyLabels_8be2vx$.iterator();n.hasNext();){var h,_=n.next(),d=s.get_11rb$(_);if(null==d){var f=new mp(_);s.put_xwzc9p$(_,f),h=f}else h=d;h.addLayer_w0u015$(p.next(),c)}}var m=l();for(i=s.values.iterator();i.hasNext();){var $=i.next();$.isEmpty||m.add_11rb$($)}if(m.isEmpty())return yd().EMPTY;var y=l();for(o=this.legendLayers_0.iterator();o.hasNext();)for(r=o.next().aesList_8be2vx$.iterator();r.hasNext();){var g=r.next();e.isType(this.guideOptionsMap_0.get_11rb$(g),Ca)&&y.add_11rb$(e.isType(a=this.guideOptionsMap_0.get_11rb$(g),Ca)?a:pt())}var v=va().createLegendSpec_esqxbx$(this.legendTitle_0,m,this.theme_0,Ta().combine_pmdc6s$(y));return new fa(v,v.size)},ma.$metadata$={kind:h,simpleName:"LegendLayer",interfaces:[]},$a.prototype.createLegendSpec_esqxbx$=function(t,e,n,i){var o,r;void 0===i&&(i=new Ca);var a,s,l=ka().legendDirection_730mk3$(n),c=ya,p=new u(n.keySize(),n.keySize()),h=_t(ht(e,10));for(a=e.iterator();a.hasNext();){var _=a.next();h.add_11rb$(p.max_gpjtzr$(c(_.minimumKeySize)))}if(l===Lp()){var d=at("y",1,(function(t){return t.y})),f=h.iterator();if(!f.hasNext())throw Wt();for(var m=d(f.next());f.hasNext();){var $=d(f.next());m=lt.max(m,$)}var y,g=m,v=_t(ht(h,10));for(y=h.iterator();y.hasNext();){var b=y.next();v.add_11rb$(new u(b.x,g))}s=v}else{var w=at("x",1,(function(t){return t.x})),x=h.iterator();if(!x.hasNext())throw Wt();for(var k=w(x.next());x.hasNext();){var C=w(x.next());k=lt.max(k,C)}var E,S=k,T=_t(ht(h,10));for(E=h.iterator();E.hasNext();){var O=E.next();T.add_11rb$(new u(S,O.y))}s=T}var N,P,I,A=s,R=e.size;if(i.isByRow){if(i.hasColCount()){var j=i.colCount;o=lt.min(j,R)}else if(i.hasRowCount()){var L=R/i.rowCount;o=At(lt.ceil(L))}else o=l===Lp()?R:1;var z=R/(N=o);P=At(lt.ceil(z))}else{if(i.hasRowCount()){var D=i.rowCount;r=lt.min(D,R)}else if(i.hasColCount()){var M=R/i.colCount;r=At(lt.ceil(M))}else r=l!==Lp()?R:1;var B=R/(P=r);N=At(lt.ceil(B))}return(I=l===Lp()?i.hasRowCount()||i.hasColCount()&&i.colCount1)for(i=this.createNameLevelTuples_5cxrh4$(t.subList_vux9f0$(1,t.size),e.subList_vux9f0$(1,e.size)).iterator();i.hasNext();){var u=i.next();a.add_11rb$(V(k(E(o,s)),u))}else a.add_11rb$(k(E(o,s)))}return a},qa.prototype.reorderLevels_dyo1lv$=function(t,e,n){for(var i=re(s(t,n)),o=l(),r=0,a=t.iterator();a.hasNext();++r){var u=a.next();if(r>=e.size)break;o.add_11rb$(this.reorderVarLevels_pbdvt$(u,e.get_za3lpa$(r),x(i,u)))}return o},qa.prototype.reorderVarLevels_pbdvt$=function(t,n,i){return null==t?n:(e.isType(n,ae)||pt(),i<=-1?se(n):i>=1?le(n):n)},qa.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var Ga=null;function Ka(){return null===Ga&&new qa,Ga}function Va(t,e,n,i,o,r,a,s){this.col=t,this.row=e,this.colLabs=n,this.rowLab=i,this.hasHAxis=o,this.hasVAxis=r,this.isBottom=a,this.trueIndex=s}function Ya(){Wa=this}Va.prototype.toString=function(){return"FacetTileInfo(col="+this.col+", row="+this.row+", colLabs="+this.colLabs+", rowLab="+J(this.rowLab)+")"},Va.$metadata$={kind:h,simpleName:"FacetTileInfo",interfaces:[]},Ua.$metadata$={kind:h,simpleName:"PlotFacets",interfaces:[]},Ya.prototype.mappedRenderedAesToCreateGuides_afs8c5$=function(t,e){var n;if(t.isLegendDisabled)return U();var i=l();for(n=t.renderedAes().iterator();n.hasNext();){var o=n.next();T.Companion.noGuideNeeded_896ixz$(o)||t.hasConstant_896ixz$(o)||t.hasBinding_896ixz$(o)&&(e.containsKey_11rb$(o)&&e.get_11rb$(o)===pa().NONE||i.add_11rb$(o))}return i},Ya.prototype.createColorBarAssembler_q2gm1k$=function(t,e,n,i,o,r){var a=new Kr(t,e,n,i,r);return a.setOptions_p8ufd2$(o),a},Ya.prototype.fitsColorBar_k9b7d3$=function(t,e){return t.isColor&&e.isContinuous},Ya.prototype.checkFitsColorBar_k9b7d3$=function(t,e){if(!t.isColor)throw p(("Color-bar is not applicable to "+t+" aesthetic").toString());if(!e.isContinuous)throw p("Color-bar is only applicable when both domain and color palette are continuous".toString())},Ya.$metadata$={kind:a,simpleName:"PlotGuidesAssemblerUtil",interfaces:[]};var Wa=null;function Xa(){return null===Wa&&new Ya,Wa}function Za(){ss()}function Ja(){as=this}function Qa(t){this.closure$pos=t,Za.call(this)}function ts(t){this.closure$vjust=t,Za.call(this)}function es(t){this.closure$width=t,Za.call(this)}function ns(t){this.closure$vjust=t,Za.call(this)}function is(t,e){this.closure$width=t,this.closure$height=e,Za.call(this)}function os(t,e){this.closure$width=t,this.closure$height=e,Za.call(this)}function rs(t,e,n){this.closure$width=t,this.closure$jitterWidth=e,this.closure$jitterHeight=n,Za.call(this)}Qa.prototype.createPos_q7kk9g$=function(t){return this.closure$pos},Qa.prototype.handlesGroups=function(){return this.closure$pos.handlesGroups()},Qa.$metadata$={kind:h,interfaces:[Za]},Ja.prototype.wrap_dkjclg$=function(t){return new Qa(t)},ts.prototype.createPos_q7kk9g$=function(t){return Bt.PositionAdjustments.stack_nvozds$(t.aesthetics,this.closure$vjust)},ts.prototype.handlesGroups=function(){return ue.STACK.handlesGroups()},ts.$metadata$={kind:h,interfaces:[Za]},Ja.prototype.barStack_yrwdxb$=function(t){return void 0===t&&(t=null),new ts(t)},es.prototype.createPos_q7kk9g$=function(t){var e=t.aesthetics,n=t.groupCount;return Bt.PositionAdjustments.dodge_vvhcz8$(e,n,this.closure$width)},es.prototype.handlesGroups=function(){return ue.DODGE.handlesGroups()},es.$metadata$={kind:h,interfaces:[Za]},Ja.prototype.dodge_yrwdxb$=function(t){return void 0===t&&(t=null),new es(t)},ns.prototype.createPos_q7kk9g$=function(t){return Bt.PositionAdjustments.fill_nvozds$(t.aesthetics,this.closure$vjust)},ns.prototype.handlesGroups=function(){return ue.FILL.handlesGroups()},ns.$metadata$={kind:h,interfaces:[Za]},Ja.prototype.fill_yrwdxb$=function(t){return void 0===t&&(t=null),new ns(t)},is.prototype.createPos_q7kk9g$=function(t){return Bt.PositionAdjustments.jitter_jma9l8$(this.closure$width,this.closure$height)},is.prototype.handlesGroups=function(){return ue.JITTER.handlesGroups()},is.$metadata$={kind:h,interfaces:[Za]},Ja.prototype.jitter_jma9l8$=function(t,e){return new is(t,e)},os.prototype.createPos_q7kk9g$=function(t){return Bt.PositionAdjustments.nudge_jma9l8$(this.closure$width,this.closure$height)},os.prototype.handlesGroups=function(){return ue.NUDGE.handlesGroups()},os.$metadata$={kind:h,interfaces:[Za]},Ja.prototype.nudge_jma9l8$=function(t,e){return new os(t,e)},rs.prototype.createPos_q7kk9g$=function(t){var e=t.aesthetics,n=t.groupCount;return Bt.PositionAdjustments.jitterDodge_e2pc44$(e,n,this.closure$width,this.closure$jitterWidth,this.closure$jitterHeight)},rs.prototype.handlesGroups=function(){return ue.JITTER_DODGE.handlesGroups()},rs.$metadata$={kind:h,interfaces:[Za]},Ja.prototype.jitterDodge_xjrefz$=function(t,e,n){return new rs(t,e,n)},Ja.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var as=null;function ss(){return null===as&&new Ja,as}function ls(){ds=this}function us(t,e){return function(n){return he.PointDimensionsUtil.dimensionSpan_qdql09$(n,t,T.Companion.WIDTH,e)}}function cs(t,e){return function(n){return he.PointDimensionsUtil.dimensionSpan_qdql09$(n,t,T.Companion.HEIGHT,e)}}function ps(){hs=this}Za.$metadata$={kind:h,simpleName:"PosProvider",interfaces:[]},ls.prototype.computePlotXYTransformedDomains_6ppuq6$=function(t,e,n,i){var o,r=_s().initialRange_abdep2$(e.transform),a=_s().initialRange_abdep2$(n.transform),u=l(),c=l();for(o=t.iterator();o.hasNext();){var p=o.next(),h=this.computeTileXYDomains_0(p,r,a),_=h.component1(),d=h.component2();u.add_11rb$(_),c.add_11rb$(d)}var f=i.adjustHDomains_7qj307$(u),m=i.adjustVDomains_7qj307$(c),$=this.finalizeDomains_0(T.Companion.X,e,f,t,i.freeHScale),y=this.finalizeDomains_0(T.Companion.Y,n,m,t,i.freeVScale);return s($,y)},ls.prototype.finalizeDomains_0=function(t,e,n,i,o){var r;if(o){var a,s,l=_t(ht(n,10)),u=0;for(a=n.iterator();a.hasNext();){var c=a.next(),p=l.add_11rb$,h=me((u=(s=u)+1|0,s)),_=_s().expandRange_902xfk$(c,t,e,i.get_za3lpa$(h));p.call(l,It.SeriesUtil.ensureApplicableRange_w2blas$(_))}r=l}else{var d,f=ce(n);t:do{var m=f.iterator();if(!m.hasNext()){d=null;break t}for(var $=m.next();m.hasNext();){var y=$,g=m.next();$=W(_s().updateRange_y0d4pd$(y,g))}d=$}while(0);var v,b,w=d,x=i.get_za3lpa$(0),k=_t(ht(x,10));for(v=x.iterator();v.hasNext();){var C=v.next();k.add_11rb$(C.preferableNullDomain_896ixz$(t))}t:do{var E=k.iterator();if(!E.hasNext()){b=null;break t}for(var S=E.next();E.hasNext();){var T=S,O=E.next();S=W(_s().updateRange_y0d4pd$(T,O))}b=S}while(0);var N,P=b,I=_s().expandRange_902xfk$(w,t,e,i.get_za3lpa$(0)),A=It.SeriesUtil.ensureApplicableRange_w2blas$(I,P),R=_t(ht(i,10));for(N=i.iterator();N.hasNext();)N.next(),R.add_11rb$(A);r=R}return r},ls.prototype.computeTileXYDomains_0=function(t,e,n){var i,o,r=P(Gt(N(ht(t,10)),16));for(o=t.iterator();o.hasNext();){var a=o.next();r.put_xwzc9p$(a,this.positionalDryRunAesthetics_0(a))}var s=null,l=null;for(i=r.entries.iterator();i.hasNext();){var u=i.next(),p=u.key,h=u.value,_=this.computeLayerDryRunXYRanges_0(p,h),d=_s().updateRange_y0d4pd$(e,_.first),f=_s().updateRange_y0d4pd$(n,_.second);s=_s().updateRange_y0d4pd$(d,s),l=_s().updateRange_y0d4pd$(f,l)}return new c(s,l)},ls.prototype.positionalDryRunAesthetics_0=function(t){var e,n=t.renderedAes(),i=l();for(e=n.iterator();e.hasNext();){var o=e.next();(T.Companion.affectingScaleX_896ixz$(o)||T.Companion.affectingScaleY_896ixz$(o)||mt(o,T.Companion.HEIGHT)||mt(o,T.Companion.WIDTH))&&i.add_11rb$(o)}var r,a=i,s=P(Gt(N(ht(a,10)),16));for(r=a.iterator();r.hasNext();){var u=r.next();s.put_xwzc9p$(u,f.Mappers.IDENTITY)}var c=s;return Rr().createLayerAesthetics_6wb5xp$(t,a,c)},ls.prototype.computeLayerDryRunXYRanges_0=function(t,n){var i,o,r=!0===(i=t.isYOrientation)?new $(n):!1===i?n:e.noWhenBranchMatched(),a=ta().aesthetics_m7huy5$(r).build(),s=this.computeLayerDryRunXYRangesAfterPosAdjustment_0(t,r,a),l=!0===(o=t.isYOrientation)?new c(s.second,s.first):!1===o?s:e.noWhenBranchMatched(),u=ta().aesthetics_m7huy5$(n).build(),p=this.computeLayerDryRunXYRangesAfterSizeExpand_0(t,n,u),h=p.component1(),_=p.component2(),d=l.first;null==d?d=h:null!=h&&(d=d.union_3lmjpf$(h));var f=l.second;return null==f?f=_:null!=_&&(f=f.union_3lmjpf$(_)),new c(d,f)},ls.prototype.computeLayerDryRunXYRangesAfterPosAdjustment_0=function(t,n,i){var o,r,a,s=T.Companion.affectingScaleX_shhb9a$(t.renderedAes()),l=T.Companion.affectingScaleY_shhb9a$(t.renderedAes()),p=Rr().createPositionAdjustment_h0u0lr$(t.posProvider,n);if(p.isIdentity){var h=_s().combineRanges_73x37m$(s,n),_=_s().combineRanges_73x37m$(l,n);return new c(h,_)}var d=0,f=0,m=0,$=0,y=!1,g=e.imul(s.size,l.size),v=e.newArray(g,null),b=e.newArray(g,null);for(o=n.dataPoints().iterator();o.hasNext();){var w=o.next(),x=-1;for(r=s.iterator();r.hasNext();){var k=r.next(),C=w.numeric_vktour$(k);for(a=l.iterator();a.hasNext();){var E=a.next(),S=w.numeric_vktour$(E);v[x=x+1|0]=C,b[x]=S}}for(;x>=0;){if(null!=v[x]&&null!=b[x]){var O=v[x],N=b[x];if(It.SeriesUtil.isFinite_yrwdxb$(O)&&It.SeriesUtil.isFinite_yrwdxb$(N)){var P=p.translate_tshsjz$(new u(W(O),W(N)),w,i),I=P.x,A=P.y;if(y){var R=d;d=lt.min(I,R);var j=f;f=lt.max(I,j);var L=m;m=lt.min(A,L);var z=$;$=lt.max(A,z)}else d=f=I,m=$=A,y=!0}}x=x-1|0}}var D=y?new gt(d,f):null,M=y?new gt(m,$):null;return new c(D,M)},ls.prototype.computeLayerDryRunXYRangesAfterSizeExpand_0=function(t,n,i){var o,r,a,s,l,u,p,h,_=!0===(o=t.isYOrientation)?E(T.Companion.Y,T.Companion.X):!1===o?E(T.Companion.X,T.Companion.Y):e.noWhenBranchMatched(),d=_.component1(),f=_.component2(),m=t.geom,$=t.renderedAes();if(e.isType(m,pe)){var y=i.getResolution_vktour$(d),g=!t.scaleMap.get_31786j$(d).isContinuousDomain;r=this.computeLayerDryRunRangeAfterSizeExpand_0(n,(l=m,u=d,p=y,h=g,function(t){return l.widthSpan_rxtiyv$(t,u,p,h)}))}else if($.contains_11rb$(T.Companion.WIDTH)){var v=i.getResolution_vktour$(d);r=this.computeLayerDryRunRangeAfterSizeExpand_0(n,us(d,v))}else r=null;if(a=E(d,r),e.isType(m,_e)){var b=i.getResolution_vktour$(f),w=!t.scaleMap.get_31786j$(f).isContinuousDomain;s=this.computeLayerDryRunRangeAfterSizeExpand_0(n,function(t,e,n,i){return function(o){return t.heightSpan_rxtiyv$(o,e,n,i)}}(m,f,b,w))}else if($.contains_11rb$(T.Companion.HEIGHT)){var k=i.getResolution_vktour$(f);s=this.computeLayerDryRunRangeAfterSizeExpand_0(n,cs(f,k))}else s=null;var C=S([a,E(f,s)]);return new c(x(C,T.Companion.X),x(C,T.Companion.Y))},ls.prototype.computeLayerDryRunRangeAfterSizeExpand_0=function(t,e){var n,i=null;for(n=t.dataPoints().iterator();n.hasNext();){var o=e(n.next());i=It.SeriesUtil.span_w2blas$(i,o)}return i},ps.prototype.initialRange_abdep2$=function(t){var n;if(e.isType(t,bt)){var i,o=de(f.ScaleUtil.transformedDefinedLimits_gxz7zd$(t)),r=l();for(i=o.iterator();i.hasNext();){var a=i.next();Zt(a)&&r.add_11rb$(a)}var s=r;n=s.isEmpty()?null:gt.Companion.encloseAll_l63ks6$(s)}else{if(!e.isType(t,fe))throw p("Unexpected transform type: "+J(e.getKClassFromExpression(t).simpleName));n=gt.Companion.encloseAll_l63ks6$(t.effectiveDomainTransformed)}return n},ps.prototype.expandRange_902xfk$=function(t,n,i,o){var r;t:do{var a;if(e.isType(o,st)&&o.isEmpty()){r=!1;break t}for(a=o.iterator();a.hasNext();)if(a.next().rangeIncludesZero_896ixz$(n)){r=!0;break t}r=!1}while(0);var s=r,l=!0===s?this.updateRange_y0d4pd$(gt.Companion.singleton_14dthe$(0),t):!1===s?t:e.noWhenBranchMatched();return Rr().rangeWithExpand_wxtkag$(l,i,s)},ps.prototype.updateRange_0=function(t,e){var n=gt.Companion.encloseAll_l63ks6$(t);return null==e?n:e.union_3lmjpf$(n)},ps.prototype.updateRange_y0d4pd$=function(t,e){var n=t;return null!=n?(null!=e&&(n=e.union_3lmjpf$(n)),n):e},ps.prototype.combineRanges_73x37m$=function(t,e){var n,i,o=null;for(n=t.iterator();n.hasNext();){var r=n.next(),a=e.range_vktour$(r);null!=a&&(o=null!=(i=null!=o?o.union_3lmjpf$(a):null)?i:a)}return o},ps.$metadata$={kind:a,simpleName:"RangeUtil",interfaces:[]};var hs=null;function _s(){return null===hs&&new ps,hs}ls.$metadata$={kind:a,simpleName:"PositionalScalesUtil",interfaces:[]};var ds=null;function fs(){return null===ds&&new ls,ds}function ms(t){this.geomLayers_0=t}function $s(t){ks(),this.map=t}function ys(){xs=this,this.LOG_0=nt.PortableLogging.logger_xo1ogr$(it($s))}Object.defineProperty(ms.prototype,"isYOrientation",{configurable:!0,get:function(){if(this.geomLayers_0.isEmpty())throw p("Check failed.".toString());return this.geomLayers_0.get_za3lpa$(0).isYOrientation}}),Object.defineProperty(ms.prototype,"legendKeyElementFactory",{configurable:!0,get:function(){if(this.geomLayers_0.isEmpty())throw p("Check failed.".toString());return this.geomLayers_0.get_za3lpa$(0).legendKeyElementFactory}}),Object.defineProperty(ms.prototype,"aestheticsDefaults",{configurable:!0,get:function(){if(this.geomLayers_0.isEmpty())throw p("Check failed.".toString());return this.geomLayers_0.get_za3lpa$(0).aestheticsDefaults}}),Object.defineProperty(ms.prototype,"isLegendDisabled",{configurable:!0,get:function(){if(this.geomLayers_0.isEmpty())throw p("Check failed.".toString());return this.geomLayers_0.get_za3lpa$(0).isLegendDisabled}}),ms.prototype.renderedAes=function(){return this.geomLayers_0.isEmpty()?U():this.geomLayers_0.get_za3lpa$(0).renderedAes()},ms.prototype.hasBinding_896ixz$=function(t){return!this.geomLayers_0.isEmpty()&&this.geomLayers_0.get_za3lpa$(0).hasBinding_896ixz$(t)},ms.prototype.hasConstant_896ixz$=function(t){return!this.geomLayers_0.isEmpty()&&this.geomLayers_0.get_za3lpa$(0).hasConstant_896ixz$(t)},ms.prototype.getConstant_31786j$=function(t){if(this.geomLayers_0.isEmpty())throw p("Check failed.".toString());return this.geomLayers_0.get_za3lpa$(0).getConstant_31786j$(t)},ms.prototype.getDataRange_8xm3sj$=function(t){var e;if(!this.isNumericData_0(t))throw p(("Not numeric data ["+t+"]").toString());var n=null;for(e=this.geomLayers_0.iterator();e.hasNext();){var i=e.next().dataFrame.range_8xm3sj$(t);n=It.SeriesUtil.span_w2blas$(n,i)}return n},ms.prototype.isNumericData_0=function(t){var e;if(this.geomLayers_0.isEmpty())throw p("Check failed.".toString());for(e=this.geomLayers_0.iterator();e.hasNext();)if(!e.next().dataFrame.isNumeric_8xm3sj$(t))return!1;return!0},ms.prototype.getVariables_8be2vx$=function(){if(this.geomLayers_0.isEmpty())throw p("Check failed.".toString());return this.geomLayers_0.get_za3lpa$(0).dataFrame.variables()},ms.prototype.hasVariable_tkpq40$=function(t){if(this.geomLayers_0.isEmpty())throw p("Check failed.".toString());return this.geomLayers_0.get_za3lpa$(0).dataFrame.has_8xm3sj$(t)},ms.$metadata$={kind:h,simpleName:"StitchedPlotLayer",interfaces:[]},$s.prototype.get_31786j$=function(t){var n,i,o;if(null==(i=e.isType(n=this.map.get_11rb$(t),_)?n:null)){var r="No scale found for aes: "+t;throw ks().LOG_0.error_l35kib$(p(r),(o=r,function(){return o})),p(r.toString())}return i},$s.prototype.containsKey_896ixz$=function(t){return this.map.containsKey_11rb$(t)},$s.prototype.keySet=function(){return this.map.keys},ys.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var gs,vs,bs,ws,xs=null;function ks(){return null===xs&&new ys,xs}function Cs(t,n,i,o,r,a,s,l,u){void 0===s&&(s=Ka().DEF_FORMATTER),void 0===l&&(l=Ka().DEF_FORMATTER),void 0===u&&(u=Ts()),Ua.call(this),this.xVar_0=t,this.yVar_0=n,this.xFormatter_0=s,this.yFormatter_0=l,this.isDefined_f95yff$_0=null!=this.xVar_0||null!=this.yVar_0;var c=i.size;this.colCount_bhcvpt$_0=lt.max(1,c);var p=o.size;this.rowCount_8ohw8b$_0=lt.max(1,p),this.numTiles_kasr4x$_0=e.imul(this.colCount,this.rowCount),this.freeHScale_syofma$_0=(u===Os()||u===Ns())&&null!=this.xVar_0,this.freeVScale_lcw8tc$_0=(u===Os()||u===Ps())&&null!=this.yVar_0,this.xLevels_0=Ka().reorderVarLevels_pbdvt$(this.xVar_0,i,r),this.yLevels_0=Ka().reorderVarLevels_pbdvt$(this.yVar_0,o,a)}function Es(t,e){v.call(this),this.name$=t,this.ordinal$=e}function Ss(){Ss=function(){},gs=new Es("FIXED",0),vs=new Es("FREE",1),bs=new Es("FREE_X",2),ws=new Es("FREE_Y",3)}function Ts(){return Ss(),gs}function Os(){return Ss(),vs}function Ns(){return Ss(),bs}function Ps(){return Ss(),ws}$s.$metadata$={kind:h,simpleName:"TypedScaleMap",interfaces:[]},Object.defineProperty(Cs.prototype,"isDefined",{configurable:!0,get:function(){return this.isDefined_f95yff$_0}}),Object.defineProperty(Cs.prototype,"colCount",{configurable:!0,get:function(){return this.colCount_bhcvpt$_0}}),Object.defineProperty(Cs.prototype,"rowCount",{configurable:!0,get:function(){return this.rowCount_8ohw8b$_0}}),Object.defineProperty(Cs.prototype,"numTiles",{configurable:!0,get:function(){return this.numTiles_kasr4x$_0}}),Object.defineProperty(Cs.prototype,"variables",{configurable:!0,get:function(){return $e([this.xVar_0,this.yVar_0])}}),Object.defineProperty(Cs.prototype,"freeHScale",{configurable:!0,get:function(){return this.freeHScale_syofma$_0}}),Object.defineProperty(Cs.prototype,"freeVScale",{configurable:!0,get:function(){return this.freeVScale_lcw8tc$_0}}),Object.defineProperty(Cs.prototype,"colLevels_0",{configurable:!0,get:function(){var t=this.xLevels_0;return t.isEmpty()?k(null):t}}),Object.defineProperty(Cs.prototype,"rowLevels_0",{configurable:!0,get:function(){var t=this.yLevels_0;return t.isEmpty()?k(null):t}}),Cs.prototype.dataByTile_dhhkv7$=function(t){var e,n,i,o;if(!this.isDefined)throw Kt("dataByTile() called on Undefined plot facets.".toString());e=$e([this.xVar_0,this.yVar_0]),n=$e([null!=this.xVar_0?this.xLevels_0:null,null!=this.yVar_0?this.yLevels_0:null]);var r=Ka().dataByLevelTuple_w4sfrb$(t,e,n),a=re(r),s=l();for(i=this.rowLevels_0.iterator();i.hasNext();){var u=i.next();for(o=this.colLevels_0.iterator();o.hasNext();){var c=o.next(),p=$e([c,u]),h=x(a,p);s.add_11rb$(h)}}return s},Cs.prototype.tileInfos=function(){var t,e,n,i,o,r=this.colLevels_0,a=_t(ht(r,10));for(o=r.iterator();o.hasNext();){var s=o.next();a.add_11rb$(null!=s?this.xFormatter_0(s):null)}var u,c=a,p=this.rowLevels_0,h=_t(ht(p,10));for(u=p.iterator();u.hasNext();){var _=u.next();h.add_11rb$(null!=_?this.yFormatter_0(_):null)}var d=h,f=l();t=this.rowCount;for(var m=0;m=e.numTiles}}(function(t){return function(n,i){var o;switch(t.direction_0.name){case"H":o=e.imul(i,t.colCount)+n|0;break;case"V":o=e.imul(n,t.rowCount)+i|0;break;default:o=e.noWhenBranchMatched()}return o}}(this),this),x=l(),k=0,C=g.iterator();C.hasNext();++k){var E=C.next(),S=v(k),T=b(k),O=w(S,T)||this.freeHScale,N=0===S||this.freeVScale;x.add_11rb$(new Va(S,T,E,null,O,N,w(S,T),k))}return ve(x,new we(js(new we(Rs(zs)),Ds)))},Ms.$metadata$={kind:h,simpleName:"Direction",interfaces:[v]},Ms.values=function(){return[Fs(),Us()]},Ms.valueOf_61zpoe$=function(t){switch(t){case"H":return Fs();case"V":return Us();default:b("No enum constant jetbrains.datalore.plot.builder.assemble.facet.FacetWrap.Direction."+t)}},qs.prototype.numTiles_0=function(t,e){if(t.isEmpty())throw Kt("List of facets is empty.".toString());if(oe(t).size!==t.size)throw Kt(("Duplicated values in the facets list: "+t).toString());if(t.size!==e.size)throw p("Check failed.".toString());return Ka().createNameLevelTuples_5cxrh4$(t,e).size},qs.prototype.shape_0=function(t,n,i,o){var r,a,s,l,u,p;if(null!=(r=null!=n?n>0:null)&&!r){var h=(u=n,function(){return"'ncol' must be positive, was "+J(u)})();throw Kt(h.toString())}if(null!=(a=null!=i?i>0:null)&&!a){var _=(p=i,function(){return"'nrow' must be positive, was "+J(p)})();throw Kt(_.toString())}if(null!=n){var d=lt.min(n,t),f=t/d,m=At(lt.ceil(f));s=E(d,lt.max(1,m))}else if(null!=i){var $=lt.min(i,t),y=t/$,g=At(lt.ceil(y));s=E(g,lt.max(1,$))}else{var v=t/2|0,b=lt.max(1,v),w=lt.min(4,b),x=t/w,k=At(lt.ceil(x)),C=lt.max(1,k);s=E(w,C)}var S=s,T=S.component1(),O=S.component2();switch(o.name){case"H":var N=t/T;l=new c(T,At(lt.ceil(N)));break;case"V":var P=t/O;l=new c(At(lt.ceil(P)),O);break;default:l=e.noWhenBranchMatched()}return l},qs.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var Hs=null;function Gs(){return null===Hs&&new qs,Hs}function Ks(){Vs=this,this.SEED_0=xe,this.SAFETY_SAMPLING=y$().random_280ow0$(2e5,this.SEED_0),this.POINT=y$().random_280ow0$(5e4,this.SEED_0),this.TILE=y$().random_280ow0$(5e4,this.SEED_0),this.BIN_2D=this.TILE,this.AB_LINE=y$().random_280ow0$(5e3,this.SEED_0),this.H_LINE=y$().random_280ow0$(5e3,this.SEED_0),this.V_LINE=y$().random_280ow0$(5e3,this.SEED_0),this.JITTER=y$().random_280ow0$(5e3,this.SEED_0),this.Q_Q=y$().random_280ow0$(5e3,this.SEED_0),this.Q_Q_LINE=y$().random_280ow0$(5e3,this.SEED_0),this.RECT=y$().random_280ow0$(5e3,this.SEED_0),this.SEGMENT=y$().random_280ow0$(5e3,this.SEED_0),this.TEXT=y$().random_280ow0$(500,this.SEED_0),this.ERROR_BAR=y$().random_280ow0$(500,this.SEED_0),this.CROSS_BAR=y$().random_280ow0$(500,this.SEED_0),this.LINE_RANGE=y$().random_280ow0$(500,this.SEED_0),this.POINT_RANGE=y$().random_280ow0$(500,this.SEED_0),this.BAR=y$().pick_za3lpa$(50),this.HISTOGRAM=y$().systematic_za3lpa$(500),this.DOT_PLOT=y$().systematic_za3lpa$(500),this.Y_DOT_PLOT=y$().systematic_za3lpa$(500),this.PIE=y$().systematic_za3lpa$(500),this.LINE=y$().systematic_za3lpa$(5e3),this.RIBBON=y$().systematic_za3lpa$(5e3),this.AREA=y$().systematic_za3lpa$(5e3),this.DENSITY=y$().systematic_za3lpa$(5e3),this.AREA_RIDGES=y$().systematic_za3lpa$(5e3),this.VIOLIN=y$().pick_za3lpa$(50),this.FREQPOLY=y$().systematic_za3lpa$(5e3),this.STEP=y$().systematic_za3lpa$(5e3),this.PATH=y$().vertexDp_za3lpa$(2e4),this.POLYGON=y$().vertexDp_za3lpa$(2e4),this.MAP=y$().vertexDp_za3lpa$(2e4),this.SMOOTH=y$().systematicGroup_za3lpa$(200),this.CONTOUR=y$().systematicGroup_za3lpa$(200),this.CONTOURF=y$().systematicGroup_za3lpa$(200),this.DENSITY2D=y$().systematicGroup_za3lpa$(200),this.DENSITY2DF=y$().systematicGroup_za3lpa$(200)}Ls.$metadata$={kind:h,simpleName:"FacetWrap",interfaces:[Ua]},Ks.$metadata$={kind:a,simpleName:"DefaultSampling",interfaces:[]};var Vs=null;function Ys(t){Nl(),this.geomKind=t}function Ws(t,e,n,i){this.myKind_0=t,this.myAestheticsDefaults_0=e,this.myHandlesGroups_0=n,this.myGeomSupplier_0=i}function Xs(t,e){this.this$GeomProviderBuilder=t,Ys.call(this,e)}function Zs(){Ol=this}function Js(){return new Ce}function Qs(){return new Te}function tl(){return new Oe}function el(){return new Ne}function nl(){return new Pe}function il(){return new Ie}function ol(){return new Re}function rl(){return new je}function al(){return new Le}function sl(){return new De}function ll(){return new Be}function ul(){return new Fe}function cl(){return new Ue}function pl(){return new qe}function hl(){return new He}function _l(){return new Ge}function dl(){return new Ke}function fl(){return new ct}function ml(){return new Ze}function $l(){return new Je}function yl(){return new Qe}function gl(){return new tn}function vl(){return new en}function bl(){return new nn}function wl(){return new on}function xl(){return new rn}function kl(){return new an}function Cl(){return new sn}function El(){return new ln}function Sl(){return new cn}function Tl(){return new _n}Object.defineProperty(Ys.prototype,"preferredCoordinateSystem",{configurable:!0,get:function(){throw p("No preferred coordinate system")}}),Ys.prototype.renders=function(){return ke.GeomMeta.renders_7dhqpi$(this.geomKind)},Xs.prototype.createGeom=function(){return this.this$GeomProviderBuilder.myGeomSupplier_0()},Xs.prototype.aestheticsDefaults=function(){return this.this$GeomProviderBuilder.myAestheticsDefaults_0},Xs.prototype.handlesGroups=function(){return this.this$GeomProviderBuilder.myHandlesGroups_0},Xs.$metadata$={kind:h,interfaces:[Ys]},Ws.prototype.build_8be2vx$=function(){return new Xs(this,this.myKind_0)},Ws.$metadata$={kind:h,simpleName:"GeomProviderBuilder",interfaces:[]},Zs.prototype.point=function(){return this.point_8j1y0m$(Js)},Zs.prototype.point_8j1y0m$=function(t){return new Ws(Ee.POINT,Se.Companion.point(),Ce.Companion.HANDLES_GROUPS,t).build_8be2vx$()},Zs.prototype.path=function(){return this.path_8j1y0m$(Qs)},Zs.prototype.path_8j1y0m$=function(t){return new Ws(Ee.PATH,Se.Companion.path(),Te.Companion.HANDLES_GROUPS,t).build_8be2vx$()},Zs.prototype.line=function(){return new Ws(Ee.LINE,Se.Companion.line(),Oe.Companion.HANDLES_GROUPS,tl).build_8be2vx$()},Zs.prototype.smooth=function(){return new Ws(Ee.SMOOTH,Se.Companion.smooth(),Ne.Companion.HANDLES_GROUPS,el).build_8be2vx$()},Zs.prototype.bar=function(){return new Ws(Ee.BAR,Se.Companion.bar(),Pe.Companion.HANDLES_GROUPS,nl).build_8be2vx$()},Zs.prototype.histogram=function(){return new Ws(Ee.HISTOGRAM,Se.Companion.histogram(),Ie.Companion.HANDLES_GROUPS,il).build_8be2vx$()},Zs.prototype.dotplot_8j1y0m$=function(t){return new Ws(Ee.DOT_PLOT,Se.Companion.dotplot(),Ae.Companion.HANDLES_GROUPS,t).build_8be2vx$()},Zs.prototype.tile=function(){return new Ws(Ee.TILE,Se.Companion.tile(),Re.Companion.HANDLES_GROUPS,ol).build_8be2vx$()},Zs.prototype.bin2d=function(){return new Ws(Ee.BIN_2D,Se.Companion.bin2d(),je.Companion.HANDLES_GROUPS,rl).build_8be2vx$()},Zs.prototype.errorBar=function(){return new Ws(Ee.ERROR_BAR,Se.Companion.errorBar(),Le.Companion.HANDLES_GROUPS,al).build_8be2vx$()},Zs.prototype.crossBar_8j1y0m$=function(t){return new Ws(Ee.CROSS_BAR,Se.Companion.crossBar(),ze.Companion.HANDLES_GROUPS,t).build_8be2vx$()},Zs.prototype.lineRange=function(){return new Ws(Ee.LINE_RANGE,Se.Companion.lineRange(),De.Companion.HANDLES_GROUPS,sl).build_8be2vx$()},Zs.prototype.pointRange_8j1y0m$=function(t){return new Ws(Ee.POINT_RANGE,Se.Companion.pointRange(),Me.Companion.HANDLES_GROUPS,t).build_8be2vx$()},Zs.prototype.contour=function(){return new Ws(Ee.CONTOUR,Se.Companion.contour(),Be.Companion.HANDLES_GROUPS,ll).build_8be2vx$()},Zs.prototype.contourf=function(){return new Ws(Ee.CONTOURF,Se.Companion.contourf(),Fe.Companion.HANDLES_GROUPS,ul).build_8be2vx$()},Zs.prototype.polygon=function(){return new Ws(Ee.POLYGON,Se.Companion.polygon(),Ue.Companion.HANDLES_GROUPS,cl).build_8be2vx$()},Zs.prototype.map=function(){return new Ws(Ee.MAP,Se.Companion.map(),qe.Companion.HANDLES_GROUPS,pl).build_8be2vx$()},Zs.prototype.abline=function(){return new Ws(Ee.AB_LINE,Se.Companion.abline(),He.Companion.HANDLES_GROUPS,hl).build_8be2vx$()},Zs.prototype.hline=function(){return new Ws(Ee.H_LINE,Se.Companion.hline(),Ge.Companion.HANDLES_GROUPS,_l).build_8be2vx$()},Zs.prototype.vline=function(){return new Ws(Ee.V_LINE,Se.Companion.vline(),Ke.Companion.HANDLES_GROUPS,dl).build_8be2vx$()},Zs.prototype.boxplot_8j1y0m$=function(t){return new Ws(Ee.BOX_PLOT,Se.Companion.boxplot(),Ve.Companion.HANDLES_GROUPS,t).build_8be2vx$()},Zs.prototype.arearidges_8j1y0m$=function(t){return new Ws(Ee.AREA_RIDGES,Se.Companion.areaRidges(),Ye.Companion.HANDLES_GROUPS,t).build_8be2vx$()},Zs.prototype.violin_8j1y0m$=function(t){return new Ws(Ee.VIOLIN,Se.Companion.violin(),We.Companion.HANDLES_GROUPS,t).build_8be2vx$()},Zs.prototype.ydotplot_8j1y0m$=function(t){return new Ws(Ee.Y_DOT_PLOT,Se.Companion.ydotplot(),Xe.Companion.HANDLES_GROUPS,t).build_8be2vx$()},Zs.prototype.livemap=function(){return new Ws(Ee.LIVE_MAP,Se.Companion.livemap(),ct.Companion.HANDLES_GROUPS,fl).build_8be2vx$()},Zs.prototype.ribbon=function(){return new Ws(Ee.RIBBON,Se.Companion.ribbon(),Ze.Companion.HANDLES_GROUPS,ml).build_8be2vx$()},Zs.prototype.area=function(){return new Ws(Ee.AREA,Se.Companion.area(),Je.Companion.HANDLES_GROUPS,$l).build_8be2vx$()},Zs.prototype.density=function(){return new Ws(Ee.DENSITY,Se.Companion.density(),Qe.Companion.HANDLES_GROUPS,yl).build_8be2vx$()},Zs.prototype.density2d=function(){return new Ws(Ee.DENSITY2D,Se.Companion.density2d(),tn.Companion.HANDLES_GROUPS,gl).build_8be2vx$()},Zs.prototype.density2df=function(){return new Ws(Ee.DENSITY2DF,Se.Companion.density2df(),en.Companion.HANDLES_GROUPS,vl).build_8be2vx$()},Zs.prototype.jitter=function(){return new Ws(Ee.JITTER,Se.Companion.jitter(),nn.Companion.HANDLES_GROUPS,bl).build_8be2vx$()},Zs.prototype.qq=function(){return new Ws(Ee.Q_Q,Se.Companion.qq(),on.Companion.HANDLES_GROUPS,wl).build_8be2vx$()},Zs.prototype.qq2=function(){return new Ws(Ee.Q_Q_2,Se.Companion.qq2(),rn.Companion.HANDLES_GROUPS,xl).build_8be2vx$()},Zs.prototype.qqline=function(){return new Ws(Ee.Q_Q_LINE,Se.Companion.qq_line(),an.Companion.HANDLES_GROUPS,kl).build_8be2vx$()},Zs.prototype.qq2line=function(){return new Ws(Ee.Q_Q_2_LINE,Se.Companion.qq2_line(),sn.Companion.HANDLES_GROUPS,Cl).build_8be2vx$()},Zs.prototype.freqpoly=function(){return new Ws(Ee.FREQPOLY,Se.Companion.freqpoly(),ln.Companion.HANDLES_GROUPS,El).build_8be2vx$()},Zs.prototype.step_8j1y0m$=function(t){return new Ws(Ee.STEP,Se.Companion.step(),un.Companion.HANDLES_GROUPS,t).build_8be2vx$()},Zs.prototype.rect=function(){return new Ws(Ee.RECT,Se.Companion.rect(),cn.Companion.HANDLES_GROUPS,Sl).build_8be2vx$()},Zs.prototype.segment_8j1y0m$=function(t){return new Ws(Ee.SEGMENT,Se.Companion.segment(),pn.Companion.HANDLES_GROUPS,t).build_8be2vx$()},Zs.prototype.text_8j1y0m$=function(t){return new Ws(Ee.TEXT,Se.Companion.text(),hn.Companion.HANDLES_GROUPS,t).build_8be2vx$()},Zs.prototype.label_8j1y0m$=function(t){return new Ws(Ee.LABEL,Se.Companion.label(),hn.Companion.HANDLES_GROUPS,t).build_8be2vx$()},Zs.prototype.raster=function(){return new Ws(Ee.RASTER,Se.Companion.raster(),_n.Companion.HANDLES_GROUPS,Tl).build_8be2vx$()},Zs.prototype.image_8j1y0m$=function(t){return new Ws(Ee.IMAGE,Se.Companion.image(),dn.Companion.HANDLES_GROUPS,t).build_8be2vx$()},Zs.prototype.pie_8j1y0m$=function(t){return new Ws(Ee.PIE,Se.Companion.pie(),fn.Companion.HANDLES_GROUPS,t).build_8be2vx$()},Zs.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var Ol=null;function Nl(){return null===Ol&&new Zs,Ol}function Pl(t,e,n,i){this.data_0=t,this.bindings_0=e,this.scaleMap_0=n,this.isYOrientation_daywl3$_0=i,this.myFormatters_0=ft()}function Il(t,e,n){void 0===n&&(n=!1),Rl.call(this,t,e,n)}function Al(){}function Rl(t,e,n,i){if(void 0===i&&(i=vn()),this.xLim_0=t,this.yLim_0=e,this.flipped_u4pwwe$_0=n,this.projection_0=i,!(null==this.xLim_0||this.xLim_0.length>0))throw Kt("Coord x-limits range should be > 0.0".toString());if(!(null==this.yLim_0||this.yLim_0.length>0))throw Kt("Coord y-limits range should be > 0.0".toString())}function jl(){Ll=this}Ys.$metadata$={kind:h,simpleName:"GeomProvider",interfaces:[]},Object.defineProperty(Pl.prototype,"isYOrientation",{get:function(){return this.isYOrientation_daywl3$_0}}),Pl.prototype.isMapped_896ixz$=function(t){return this.bindings_0.containsKey_11rb$(t)},Pl.prototype.getOriginalValue_m6grlz$=function(t,e){if(!this.isMapped_896ixz$(t))throw Kt(("Not mapped: "+t).toString());var n=x(this.bindings_0,t),i=this.scaleMap_0.get_31786j$(t),o=this.data_0.getNumeric_8xm3sj$(n.variable).get_za3lpa$(e);return i.transform.applyInverse_yrwdxb$(o)},Pl.prototype.getMappedDataLabel_896ixz$=function(t){return this.scaleMap_0.get_31786j$(t).name},Pl.$metadata$={kind:h,simpleName:"PointDataAccess",interfaces:[mn]},Il.prototype.with_11nazf$=function(t,e,n){return new Il(t,e,n)},Il.prototype.adjustGeomSize_3y20zv$=function(t,e,n){return n},Il.$metadata$={kind:h,simpleName:"CartesianCoordProvider",interfaces:[Rl]},Al.prototype.createCoordinateSystem_26v79i$=function(t,e){var n=this.createCoordinateMapper_26v79i$(t,e);return $n.Coords.create_i06iub$(n)},Al.$metadata$={kind:d,simpleName:"CoordProvider",interfaces:[]},Object.defineProperty(Rl.prototype,"flipped",{get:function(){return this.flipped_u4pwwe$_0}}),Rl.prototype.adjustDomain_wthzt5$=function(t){var e,n,i=Xt(null!=(e=this.xLim_0)?e:t.xRange(),null!=(n=this.yLim_0)?n:t.yRange()),o=this.projection_0.validDomain().intersect_wthzt5$(i);if(!(null!=o&&o.height>0&&o.width>0))throw Kt(yn("Can't create a valid domain.\n | data bbox: "+t+"\n | x-lim: "+J(this.xLim_0)+"\n | y-lim: "+J(this.yLim_0)+"\n "));return this.flipped?o.flip():o},Rl.prototype.createCoordinateMapper_26v79i$=function(t,e){return gn.Companion.create_u2nuxj$(t,e,this.projection_0,this.flipped)},Rl.$metadata$={kind:h,simpleName:"CoordProviderBase",interfaces:[Al]},jl.prototype.cartesian_11nazf$=function(t,e,n){return void 0===t&&(t=null),void 0===e&&(e=null),void 0===n&&(n=!1),new Il(t,e,n)},jl.prototype.fixed_kt8gy1$=function(t,e,n,i){return void 0===e&&(e=null),void 0===n&&(n=null),void 0===i&&(i=!1),new zl(t,e,n,i)},jl.prototype.map_bjve6d$=function(t,e,n,i){return void 0===t&&(t=null),void 0===e&&(e=null),void 0===n&&(n=!1),void 0===i&&(i=bn()),new Ul(i,t,e,n)},jl.$metadata$={kind:a,simpleName:"CoordProviders",interfaces:[]};var Ll=null;function zl(t,e,n,i){Bl(),Rl.call(this,e,n,i),this.ratio_0=t}function Dl(){Ml=this}zl.prototype.with_11nazf$=function(t,e,n){return new zl(this.ratio_0,t,e,n)},zl.prototype.adjustGeomSize_3y20zv$=function(t,e,n){var i=t.length/e.length/this.ratio_0;return Bl().reshapeGeom_e1sv3v$(n,i)},Dl.prototype.reshapeGeom_e1sv3v$=function(t,e){var n;if(e>t.x/t.y){var i=t.x/e;n=new u(t.x,i)}else{var o=t.y*e;n=new u(o,t.y)}return n},Dl.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var Ml=null;function Bl(){return null===Ml&&new Dl,Ml}function Fl(){Rl.call(this,null,null,!1)}function Ul(t,e,n,i){Rl.call(this,e,n,i,t)}function ql(){Kl=this}function Hl(t,n){return function(i){for(var o,r=!0===(o=t.isNumeric_8xm3sj$(i))?It.SeriesUtil.mean_l4tjj7$(t.getNumeric_8xm3sj$(i),null):!1===o?It.SeriesUtil.firstNotNull_rath1t$(t.get_8xm3sj$(i),null):e.noWhenBranchMatched(),a=n,s=_t(a),l=0;l0&&t=6&&c<=u){var p=this.buildGridLine_0(c,this.gridTheme_0.minorLineWidth(),this.gridTheme_0.minorLineColor());s.children().add_11rb$(p)}}if(this.gridTheme_0.showMajor())for(n=this.breaksData_0.majorBreaks.iterator();n.hasNext();){var h=n.next();if(h>=6&&h<=u){var _=this.buildGridLine_0(h,this.gridTheme_0.majorLineWidth(),this.gridTheme_0.majorLineColor());s.children().add_11rb$(_)}}}if(!this.hideAxis_0){if(!this.hideAxisBreaks_0&&(this.axisTheme_0.showLabels()||this.axisTheme_0.showTickMarks()))for(var d=new Gc(this.orientation_0.isHorizontal),f=0,m=this.breaksData_0.majorBreaks.iterator();m.hasNext();++f){var $=m.next();if($>=0&&$<=l){var y=this.breaksData_0.majorLabels.get_za3lpa$(f%this.breaksData_0.majorLabels.size|0),g=this.tickLabelBaseOffset_0().add_gpjtzr$(this.labelAdjustments_0.additionalOffset_za3lpa$(f)),v=this.buildTick_0(y,g,!d.beforeAddLabel_yvo9jy$($,this.labelAdjustments_0.rotationDegree,Id().axisTick_9yvfuv$(this.axisTheme_0).height()),this.axisTheme_0);switch(this.orientation_0.name){case"LEFT":case"RIGHT":Zn.SvgUtils.transformTranslate_pw34rw$(v,0,$);break;case"TOP":case"BOTTOM":Zn.SvgUtils.transformTranslate_pw34rw$(v,$,0)}s.children().add_11rb$(v)}}if(!this.hideAxisBreaks_0&&this.axisTheme_0.showLine()){var b=Jn(i,o,r,a);b.strokeWidth().set_11rb$(this.axisTheme_0.lineWidth()),b.strokeColor().set_11rb$(this.axisTheme_0.lineColor());var w=b;s.children().add_11rb$(w)}}},Uc.prototype.buildGridLine_0=function(t,n,i){var o,r=this.gridLineDistance_0,a=r+this.gridLineLength_0;switch(this.orientation_0.name){case"LEFT":o=Jn(r,0,a,0);break;case"RIGHT":o=Jn(-r,0,-a,0);break;case"TOP":o=Jn(0,r,0,a);break;case"BOTTOM":o=Jn(0,-r,0,-a);break;default:o=e.noWhenBranchMatched()}var s=o;switch(s.strokeColor().set_11rb$(i),s.strokeWidth().set_11rb$(n),this.orientation_0.name){case"LEFT":case"RIGHT":s.y1().set_11rb$(t),s.y2().set_11rb$(t);break;case"TOP":case"BOTTOM":s.x1().set_11rb$(t),s.x2().set_11rb$(t)}return s},Uc.prototype.buildTick_0=function(t,e,n,i){var o=null;i.showTickMarks()&&((o=new Qn).strokeWidth().set_11rb$(i.tickMarkWidth()),o.strokeColor().set_11rb$(i.tickMarkColor()));var r=null;!n&&i.showLabels()&&(r=new z(t)).addClassName_61zpoe$(l$().AXIS_TEXT+"-"+i.axis);var a=i.tickMarkLength();switch(this.orientation_0.name){case"LEFT":null!=o&&(o.x2().set_11rb$(-a),o.y2().set_11rb$(0));break;case"RIGHT":null!=o&&(o.x2().set_11rb$(a),o.y2().set_11rb$(0));break;case"TOP":null!=o&&(o.x2().set_11rb$(0),o.y2().set_11rb$(-a));break;case"BOTTOM":null!=o&&(o.x2().set_11rb$(0),o.y2().set_11rb$(a))}var s=new ti;return null!=o&&s.children().add_11rb$(o),null!=r&&(r.moveTo_lu1900$(e.x,e.y),r.setHorizontalAnchor_mf4siq$(this.labelAdjustments_0.horizontalAnchor),r.setVerticalAnchor_yaylw0$(this.labelAdjustments_0.verticalAnchor),r.rotate_14dthe$(this.labelAdjustments_0.rotationDegree),s.children().add_11rb$(r.rootGroup)),s},Uc.prototype.tickLabelBaseOffset_0=function(){var t,n=this.axisTheme_0.tickLabelDistance_6taknv$(this.orientation_0.isHorizontal);switch(this.orientation_0.name){case"LEFT":t=new u(this.axisTheme_0.tickLabelMargins().left-n,0);break;case"RIGHT":t=new u(n-this.axisTheme_0.tickLabelMargins().right,0);break;case"TOP":t=new u(0,this.axisTheme_0.tickLabelMargins().top-n);break;case"BOTTOM":t=new u(0,n-this.axisTheme_0.tickLabelMargins().bottom);break;default:t=e.noWhenBranchMatched()}return t},qc.$metadata$={kind:h,simpleName:"BreaksData",interfaces:[]},Hc.prototype.additionalOffset_za3lpa$=function(t){var e,n;return null!=(n=null!=(e=this.additionalOffsets_0)?e.get_za3lpa$(t):null)?n:u.Companion.ZERO},Hc.$metadata$={kind:h,simpleName:"TickLabelAdjustments",interfaces:[]},Gc.prototype.beforeAddLabel_yvo9jy$=function(t,n,i){if(!this.isRelevant_0(n))return!0;var o,r=this.filledRanges_0;t:do{var a;if(e.isType(r,st)&&r.isEmpty()){o=!1;break t}for(a=r.iterator();a.hasNext();){var s=a.next();if(s.contains_14dthe$(t)||s.contains_14dthe$(t+i)){o=!0;break t}}o=!1}while(0);return!o&&(this.filledRanges_0.add_11rb$(new gt(t,t+i)),!0)},Gc.prototype.isRelevant_0=function(t){return this.horizontalAxis?this.isVertical_0(t):this.isHorizontal_0(t)},Gc.prototype.isHorizontal_0=function(t){return t%180==0},Gc.prototype.isVertical_0=function(t){return t/90%2==1},Gc.$metadata$={kind:h,simpleName:"TickLabelsCleaner",interfaces:[]},Uc.$metadata$={kind:h,simpleName:"AxisComponent",interfaces:[ot]},Object.defineProperty(Kc.prototype,"spec",{get:function(){return this.spec_xr0de$_0}}),Kc.prototype.appendGuideContent_26jijc$=function(t){var e,n=this.spec.layout,i=new ti,o=n.barBounds,r=n.isHorizontal;this.addColorBar_0(i,this.spec.domain,this.spec.scaleMapper,this.spec.binCount,o,n.barLengthExpand,r,this.spec.reverse);var a=(r?o.height:o.width)/5,s=n.breakInfos_8be2vx$.iterator();for(e=this.spec.breaks.labels.iterator();e.hasNext();){var c=e.next(),p=s.next(),h=p.tickLocation,_=l();if(r){var d=o.left+h;_.add_11rb$(new u(d,o.top)),_.add_11rb$(new u(d,o.top+a)),_.add_11rb$(new u(d,o.bottom-a)),_.add_11rb$(new u(d,o.bottom))}else{var f=o.top+h;_.add_11rb$(new u(o.left,f)),_.add_11rb$(new u(o.left+a,f)),_.add_11rb$(new u(o.right-a,f)),_.add_11rb$(new u(o.right,f))}this.addTickMark_0(i,_.get_za3lpa$(0),_.get_za3lpa$(1)),this.addTickMark_0(i,_.get_za3lpa$(2),_.get_za3lpa$(3));var m=new z(c);m.addClassName_61zpoe$(l$().LEGEND_ITEM),m.setHorizontalAnchor_mf4siq$(p.labelHorizontalAnchor),m.setVerticalAnchor_yaylw0$(p.labelVerticalAnchor),m.moveTo_lu1900$(p.labelLocation.x,p.labelLocation.y+o.top),i.children().add_11rb$(m.rootGroup)}if(this.debug){var $=new H(u.Companion.ZERO,n.graphSize);i.children().add_11rb$(_p().createTransparentRect_a5dgib$($,K.Companion.DARK_BLUE,1))}return t.children().add_11rb$(i),n.size},Kc.prototype.addColorBar_0=function(t,e,n,i,o,r,a,s){for(var u=e.length,c=lt.max(2,i),p=u/c,h=e.lowerEnd+p/2,_=l(),d=0;dthis.graphSize.y?(t.y-this.graphSize.y)/2:0)}return new u(0,this.titleSize_8be2vx$.y+Id().legendTitle_730mk3$(this.theme).height()/2)}}),Object.defineProperty(dp.prototype,"size",{configurable:!0,get:function(){var t=new H(this.graphOrigin,this.graphSize);return new H(u.Companion.ZERO,u.Companion.ZERO).union_wthzt5$(this.titleBounds_27vr67$_0).union_wthzt5$(t).dimension}}),Object.defineProperty(dp.prototype,"titleSize_8be2vx$",{configurable:!0,get:function(){return ai(this.title_47v7cs$_0)||!this.theme.showTitle()?u.Companion.ZERO:Md().textDimensions_1al14g$(this.title_47v7cs$_0,Id().legendTitle_730mk3$(this.theme))}}),dp.$metadata$={kind:h,simpleName:"LegendBoxLayout",interfaces:[]},Object.defineProperty(fp.prototype,"contentSize_cb71ch$_0",{configurable:!0,get:function(){return this.layout.size}}),Object.defineProperty(fp.prototype,"size",{configurable:!0,get:function(){return this.contentSize_cb71ch$_0.add_gpjtzr$(this.fullContentExtend_5hau13$_0)}}),Object.defineProperty(fp.prototype,"innerBounds",{configurable:!0,get:function(){return new H(this.innerOrigin_3w1y5t$_0,this.contentSize_cb71ch$_0.add_gpjtzr$(this.innerContentExtend_wllzuc$_0))}}),Object.defineProperty(fp.prototype,"contentBounds",{configurable:!0,get:function(){return new H(this.contentOrigin,this.contentSize_cb71ch$_0)}}),fp.prototype.hasTitle=function(){return!ai(this.title)&&this.theme.showTitle()},fp.$metadata$={kind:h,simpleName:"LegendBoxSpec",interfaces:[]},Object.defineProperty(mp.prototype,"minimumKeySize",{configurable:!0,get:function(){var t,e=u.Companion.ZERO;for(t=this.myLayers_0.iterator();t.hasNext();){var n=t.next(),i=n.keyElementFactory.minimumKeySize_l6g9mh$(n.dataPoint);e=e.max_gpjtzr$(i)}return e}}),Object.defineProperty(mp.prototype,"isEmpty",{configurable:!0,get:function(){return this.myLayers_0.isEmpty()}}),mp.prototype.addLayer_w0u015$=function(t,e){this.myLayers_0.add_11rb$(new $p(t,e))},mp.prototype.createKeyElement_gpjtzr$=function(t){var e,n=new ti;for(e=this.myLayers_0.iterator();e.hasNext();){var i=e.next(),o=i.keyElementFactory.createKeyElement_s1fn0c$(i.dataPoint,t);n.children().add_11rb$(o)}return n},$p.$metadata$={kind:h,simpleName:"LegendBreakLayer",interfaces:[]},yp.prototype.simple_998ysp$=function(t,e,n){var i=new mp(t);return i.addLayer_w0u015$(e,n),i},yp.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var gp=null;function vp(){return null===gp&&new yp,gp}function bp(t){cp.call(this),this.spec_8zhhsr$_0=t}function wp(t,e,n,i,o){Ip(),dp.call(this,t,i,o),this.breaks=e,this.keySizes=n,this.myContentSize_8rvo9o$_0=null,this.myKeyLabelBoxes_uk7fn2$_0=l(),this.myLabelBoxes_9jhh53$_0=l(),this.isFillByRow=!1,this.rowCount_kvp0d1$_0=0,this.colCount_nojzuj$_0=0}function xp(t,e,n,i){wp.call(this,t,e,n,Lp(),i),this.colCount=e.size,this.rowCount=1}function kp(t,e,n,i){Ep.call(this,t,e,n,Lp(),i),this.colCount=e.size,this.rowCount=1}function Cp(t,e,n,i){Ep.call(this,t,e,n,zp(),i),this.colCount=1,this.rowCount=e.size}function Ep(t,e,n,i,o){var r;for(wp.call(this,t,e,n,i,o),this.myMaxLabelWidth_0=0,r=e.iterator();r.hasNext();){var a=r.next(),s=this.myMaxLabelWidth_0,l=Id().legendItem_730mk3$(o).width_61zpoe$(a.label);this.myMaxLabelWidth_0=lt.max(s,l)}}function Sp(){Pp=this}mp.$metadata$={kind:h,simpleName:"LegendBreak",interfaces:[]},Object.defineProperty(bp.prototype,"spec",{get:function(){return this.spec_8zhhsr$_0}}),bp.prototype.appendGuideContent_26jijc$=function(t){var e,n=this.spec.layout,i=n.keyLabelBoxes.iterator(),o=n.labelBoxes.iterator(),r=n.keySizes.iterator();for(e=this.spec.breaks_8be2vx$.iterator();e.hasNext();){var a=e.next(),s=i.next(),l=o.next(),c=r.next(),p=this.createBreakElement_0(a,c,s,l);t.children().add_11rb$(p)}if(this.debug){var h=new H(u.Companion.ZERO,n.graphSize);t.children().add_11rb$(_p().createTransparentRect_a5dgib$(h,K.Companion.DARK_BLUE,1))}return n.size},bp.prototype.createBreakElement_0=function(t,e,n,i){var o=new si;o.add_26jijc$(this.createKeyElement_0(t,e));var r=new z(t.label);return r.addClassName_61zpoe$(l$().LEGEND_ITEM),r.setHorizontalAnchor_mf4siq$(D.LEFT),r.setVerticalAnchor_yaylw0$(M.CENTER),r.moveTo_gpjtzr$(i.origin.add_gpjtzr$(new u(0,i.height/2))),o.add_8icvvv$(r),o.moveTo_gpjtzr$(n.origin),o.rootGroup},bp.prototype.createKeyElement_0=function(t,e){var n=new ti,i=new H(u.Companion.ZERO,e),o=G(i);o.strokeWidth().set_11rb$(0),o.fillColor().set_11rb$(this.theme.backgroundFill()),n.children().add_11rb$(o);var r=new u(e.x-2,e.y-2),a=t.createKeyElement_gpjtzr$(r),s=ot.Companion.buildTransform_e1sv3v$(new u(1,1),0);a.transform().set_11rb$(s),n.children().add_11rb$(a);var l=_p().createTransparentRect_a5dgib$(i,this.theme.backgroundFill(),1);return n.children().add_11rb$(l),n},bp.$metadata$={kind:h,simpleName:"LegendComponent",interfaces:[cp]},Object.defineProperty(wp.prototype,"rowCount",{configurable:!0,get:function(){return this.rowCount_kvp0d1$_0},set:function(t){if(!(t>0))throw p(("Row count must be greater than 0, was "+t).toString());this.rowCount_kvp0d1$_0=t}}),Object.defineProperty(wp.prototype,"colCount",{configurable:!0,get:function(){return this.colCount_nojzuj$_0},set:function(t){if(!(t>0))throw p(("Col count must be greater than 0, was "+t).toString());this.colCount_nojzuj$_0=t}}),Object.defineProperty(wp.prototype,"graphSize",{configurable:!0,get:function(){return this.ensureInited_chkycd$_0(),W(this.myContentSize_8rvo9o$_0)}}),Object.defineProperty(wp.prototype,"keyLabelBoxes",{configurable:!0,get:function(){return this.ensureInited_chkycd$_0(),this.myKeyLabelBoxes_uk7fn2$_0}}),Object.defineProperty(wp.prototype,"labelBoxes",{configurable:!0,get:function(){return this.ensureInited_chkycd$_0(),this.myLabelBoxes_9jhh53$_0}}),wp.prototype.ensureInited_chkycd$_0=function(){null==this.myContentSize_8rvo9o$_0&&this.doLayout_zctv6z$_0()},wp.prototype.doLayout_zctv6z$_0=function(){var t,e=Id().legendItem_730mk3$(this.theme).height(),n=Id().legendItem_730mk3$(this.theme).width_61zpoe$(Id().DISTANCE_TO_LABEL_IN_CHARS)/2,i=u.Companion.ZERO,o=null;t=this.breaks;for(var r=0;r!==t.size;++r){var a,s=this.labelSize_za3lpa$(r),l=this.keySizes.get_za3lpa$(r),c=(l.y-e)/2,p=l.x+n,h=new u(p+s.x,l.y);o=new H(null!=(a=null!=o?this.breakBoxOrigin_b4d9xv$(r,o):null)?a:i,h),this.myKeyLabelBoxes_uk7fn2$_0.add_11rb$(o),this.myLabelBoxes_9jhh53$_0.add_11rb$(Y(p,c,s.x,s.y))}this.myContentSize_8rvo9o$_0=_d().union_a7nkjf$(new H(i,u.Companion.ZERO),this.myKeyLabelBoxes_uk7fn2$_0).dimension},xp.prototype.breakBoxOrigin_b4d9xv$=function(t,e){return new u(e.right,0)},xp.prototype.labelSize_za3lpa$=function(t){var e=this.breaks.get_za3lpa$(t).label;return new u(Id().legendItem_730mk3$(this.theme).width_61zpoe$(e),Id().legendItem_730mk3$(this.theme).height())},xp.$metadata$={kind:h,simpleName:"MyHorizontal",interfaces:[wp]},kp.$metadata$={kind:h,simpleName:"MyHorizontalMultiRow",interfaces:[Ep]},Cp.$metadata$={kind:h,simpleName:"MyVertical",interfaces:[Ep]},Ep.prototype.breakBoxOrigin_b4d9xv$=function(t,e){return this.isFillByRow?0==(t%this.colCount|0)?new u(0,e.bottom):new u(e.right,e.top):0==(t%this.rowCount|0)?new u(e.right,0):new u(e.left,e.bottom)},Ep.prototype.labelSize_za3lpa$=function(t){return new u(this.myMaxLabelWidth_0,Id().legendItem_730mk3$(this.theme).height())},Ep.$metadata$={kind:h,simpleName:"MyMultiRow",interfaces:[wp]},Sp.prototype.horizontal_d02gve$=function(t,e,n,i){return new xp(t,e,n,i)},Sp.prototype.horizontalMultiRow_d02gve$=function(t,e,n,i){return new kp(t,e,n,i)},Sp.prototype.vertical_d02gve$=function(t,e,n,i){return new Cp(t,e,n,i)},Sp.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var Tp,Op,Np,Pp=null;function Ip(){return null===Pp&&new Sp,Pp}function Ap(t,e,n,i,o){fp.call(this,t,n,o),this.breaks_8be2vx$=e,this.layout_ebqbgv$_0=i}function Rp(t,e){v.call(this),this.name$=t,this.ordinal$=e}function jp(){jp=function(){},Tp=new Rp("HORIZONTAL",0),Op=new Rp("VERTICAL",1),Np=new Rp("AUTO",2)}function Lp(){return jp(),Tp}function zp(){return jp(),Op}function Dp(){return jp(),Np}function Mp(t,e){Up(),this.x=t,this.y=e}function Bp(){Fp=this,this.CENTER=new Mp(.5,.5)}wp.$metadata$={kind:h,simpleName:"LegendComponentLayout",interfaces:[dp]},Object.defineProperty(Ap.prototype,"layout",{get:function(){return this.layout_ebqbgv$_0}}),Ap.$metadata$={kind:h,simpleName:"LegendComponentSpec",interfaces:[fp]},Rp.$metadata$={kind:h,simpleName:"LegendDirection",interfaces:[v]},Rp.values=function(){return[Lp(),zp(),Dp()]},Rp.valueOf_61zpoe$=function(t){switch(t){case"HORIZONTAL":return Lp();case"VERTICAL":return zp();case"AUTO":return Dp();default:b("No enum constant jetbrains.datalore.plot.builder.guide.LegendDirection."+t)}},Bp.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var Fp=null;function Up(){return null===Fp&&new Bp,Fp}function qp(t,e){Xp(),this.x=t,this.y=e}function Hp(){Wp=this,this.RIGHT=new qp(1,.5),this.LEFT=new qp(0,.5),this.TOP=new qp(.5,1),this.BOTTOM=new qp(.5,1),this.NONE=new qp(Ht.NaN,Ht.NaN)}Mp.$metadata$={kind:h,simpleName:"LegendJustification",interfaces:[]},Object.defineProperty(qp.prototype,"isFixed",{configurable:!0,get:function(){return this===Xp().LEFT||this===Xp().RIGHT||this===Xp().TOP||this===Xp().BOTTOM}}),Object.defineProperty(qp.prototype,"isHidden",{configurable:!0,get:function(){return this===Xp().NONE}}),Object.defineProperty(qp.prototype,"isOverlay",{configurable:!0,get:function(){return!(this.isFixed||this.isHidden)}}),Hp.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var Gp,Kp,Vp,Yp,Wp=null;function Xp(){return null===Wp&&new Hp,Wp}function Zp(t,e,n){v.call(this),this.id_db4vdn$_0=n,this.name$=t,this.ordinal$=e}function Jp(){Jp=function(){},Gp=new Zp("LEFT",0,"LEFT"),Kp=new Zp("RIGHT",1,"RIGHT"),Vp=new Zp("TOP",2,"TOP"),Yp=new Zp("BOTTOM",3,"BOTTOM")}function Qp(){return Jp(),Gp}function th(){return Jp(),Kp}function eh(){return Jp(),Vp}function nh(){return Jp(),Yp}function ih(){sh()}function oh(){ah=this,this.NONE=new rh}function rh(){}qp.$metadata$={kind:h,simpleName:"LegendPosition",interfaces:[]},Object.defineProperty(Zp.prototype,"isHorizontal",{configurable:!0,get:function(){return this===eh()||this===nh()}}),Zp.prototype.flip=function(){var t;switch(this.name){case"LEFT":t=nh();break;case"RIGHT":t=eh();break;case"TOP":t=th();break;case"BOTTOM":t=Qp();break;default:t=e.noWhenBranchMatched()}return t},Zp.prototype.toString=function(){return"Orientation "+this.id_db4vdn$_0},Zp.$metadata$={kind:h,simpleName:"Orientation",interfaces:[v]},Zp.values=function(){return[Qp(),th(),eh(),nh()]},Zp.valueOf_61zpoe$=function(t){switch(t){case"LEFT":return Qp();case"RIGHT":return th();case"TOP":return eh();case"BOTTOM":return nh();default:b("No enum constant jetbrains.datalore.plot.builder.guide.Orientation."+t)}},rh.prototype.createContextualMapping_8fr62e$=function(t,e){return new li(U(),null,null,!1,!1,!1,!1,null)},rh.$metadata$={kind:h,interfaces:[ih]},oh.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var ah=null;function sh(){return null===ah&&new oh,ah}function lh(t){ph(),this.myLocatorLookupSpace_0=t.locatorLookupSpace,this.myLocatorLookupStrategy_0=t.locatorLookupStrategy,this.myTooltipLines_0=t.tooltipLines,this.myTooltipProperties_0=t.tooltipProperties,this.myIgnoreInvisibleTargets_0=t.ignoreInvisibleTargets,this.myIsCrosshairEnabled_0=t.isCrosshairEnabled,this.myTooltipTitle_0=t.tooltipTitle}function uh(){ch=this}ih.$metadata$={kind:d,simpleName:"ContextualMappingProvider",interfaces:[]},lh.prototype.createLookupSpec=function(){return new qt(this.myLocatorLookupSpace_0,this.myLocatorLookupStrategy_0)},lh.prototype.createContextualMapping_8fr62e$=function(t,e){var n,i,o,r,a,s,l=this.myTooltipLines_0,u=_t(ht(l,10));for(s=l.iterator();s.hasNext();){var c=s.next();u.add_11rb$(xv(c))}return n=this.myTooltipProperties_0,i=this.myIgnoreInvisibleTargets_0,o=this.myIsCrosshairEnabled_0,a=null!=(r=this.myTooltipTitle_0)?xv(r):null,ph().createContextualMapping_0(u,t,e,n,i,o,a)},uh.prototype.createTestContextualMapping_fdc7hd$=function(t,e,n,i,o,r){void 0===r&&(r=null);var a=mh().defaultValueSourceTooltipLines_l73v50$(t,e,n,r);return this.createContextualMapping_0(a,i,o,Tv().NONE,!1,!1,null)},uh.prototype.createContextualMapping_0=function(t,n,i,o,r,a,s){var u,c=l();for(u=t.iterator();u.hasNext();){var p,h=u.next(),_=h.fields,d=l();for(p=_.iterator();p.hasNext();){var f=p.next();e.isType(f,dv)&&d.add_11rb$(f)}var m,$=d;t:do{var y;if(e.isType($,st)&&$.isEmpty()){m=!0;break t}for(y=$.iterator();y.hasNext();){var g=y.next();if(!n.isMapped_896ixz$(g.aes)){m=!1;break t}}m=!0}while(0);m&&c.add_11rb$(h)}var v,b,w=c;for(v=w.iterator();v.hasNext();)v.next().initDataContext_nqispu$(i,n);t:do{var x;if(e.isType(w,st)&&w.isEmpty()){b=!1;break t}for(x=w.iterator();x.hasNext();){var k,C=x.next().fields,E=at("isOutlier",1,(function(t){return t.isOutlier}));e:do{var S;if(e.isType(C,st)&&C.isEmpty()){k=!0;break e}for(S=C.iterator();S.hasNext();)if(E(S.next())){k=!1;break e}k=!0}while(0);if(k){b=!0;break t}}b=!1}while(0);var T,O=b;t:do{var N;if(e.isType(w,st)&&w.isEmpty()){T=!1;break t}for(N=w.iterator();N.hasNext();){var P,I=N.next().fields,A=at("isAxis",1,(function(t){return t.isAxis}));e:do{var R;if(e.isType(I,st)&&I.isEmpty()){P=!1;break e}for(R=I.iterator();R.hasNext();)if(A(R.next())){P=!0;break e}P=!1}while(0);if(P){T=!0;break t}}T=!1}while(0);var j=T;return null!=s&&s.initDataContext_nqispu$(i,n),new li(w,o.anchor,o.minWidth,r,O,j,a,s)},uh.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var ch=null;function ph(){return null===ch&&new uh,ch}function hh(t,e,n,i,o){this.locatorLookupSpace=t,this.locatorLookupStrategy=e,this.tooltipAes_0=n,this.tooltipAxisAes_0=i,this.tooltipOutlierAes_0=o,this.myUserTooltipSpec_0=null,this.ignoreInvisibleTargets_ddo194$_0=!1,this.tooltipConstants_xwrflf$_0=null,this.isCrosshairEnabled_vgz91y$_0=!1}function _h(t,e){void 0===e&&(e=null),this.supportedAes_0=t,this.axisAes_0=e}function dh(){fh=this}lh.$metadata$={kind:h,simpleName:"GeomInteraction",interfaces:[ih]},Object.defineProperty(hh.prototype,"ignoreInvisibleTargets",{configurable:!0,get:function(){return this.ignoreInvisibleTargets_ddo194$_0},set:function(t){this.ignoreInvisibleTargets_ddo194$_0=t}}),Object.defineProperty(hh.prototype,"tooltipConstants",{configurable:!0,get:function(){return this.tooltipConstants_xwrflf$_0},set:function(t){this.tooltipConstants_xwrflf$_0=t}}),Object.defineProperty(hh.prototype,"isCrosshairEnabled",{configurable:!0,get:function(){return this.isCrosshairEnabled_vgz91y$_0},set:function(t){this.isCrosshairEnabled_vgz91y$_0=t}}),Object.defineProperty(hh.prototype,"tooltipLines",{configurable:!0,get:function(){return mh().createTooltipLines_ntnr8o$(this.myUserTooltipSpec_0,this.tooltipAes_0,this.tooltipAxisAes_0,this.tooltipOutlierAes_0,this.tooltipConstants)}}),Object.defineProperty(hh.prototype,"tooltipProperties",{configurable:!0,get:function(){var t,e;return null!=(e=null!=(t=this.myUserTooltipSpec_0)?t.tooltipProperties:null)?e:Tv().NONE}}),Object.defineProperty(hh.prototype,"tooltipTitle",{configurable:!0,get:function(){var t;return null!=(t=this.myUserTooltipSpec_0)?t.tooltipTitle:null}}),hh.prototype.tooltipConstants_ayg7dr$=function(t){return this.tooltipConstants=t,this},hh.prototype.tooltipLinesSpec_uvmyj9$=function(t){return this.myUserTooltipSpec_0=t,this},hh.prototype.enableCrosshair_6taknv$=function(t){return this.isCrosshairEnabled=t,this},hh.prototype.ignoreInvisibleTargets_6taknv$=function(t){return this.ignoreInvisibleTargets=t,this},hh.prototype.build=function(){return new lh(this)},_h.prototype.univariateFunction_7k7ojo$=function(t){return this.createBuilder_0(xh().univariateFunction_ahqhwk$(t))},_h.prototype.bivariateFunction_6taknv$=function(t){return this.createBuilder_0(xh().bivariateFunction_xss3$(t))},_h.prototype.createBuilder_0=function(t){var e;return new hh(t.locatorLookupSpace,t.locatorLookupStrategy,ui(this.supportedAes_0,t.axisAesFromFunctionKind),null!=(e=this.axisAes_0)?e:t.axisTooltipEnabled?t.axisAesFromFunctionKind:U(),U())},_h.$metadata$={kind:h,simpleName:"DemoAndTest",interfaces:[]},hh.$metadata$={kind:h,simpleName:"GeomInteractionBuilder",interfaces:[]},dh.prototype.createTooltipLines_ntnr8o$=function(t,n,i,o,r){var a;if(null==t)a=this.defaultValueSourceTooltipLines_l73v50$(n,i,o,null,r);else if(t.useDefaultTooltips())a=this.defaultValueSourceTooltipLines_l73v50$(n,i,o,t.valueSources,r);else if(t.hideTooltips())a=U();else{var s,u=ci(o);for(s=W(t.tooltipLinePatterns).iterator();s.hasNext();){var c,p=s.next().fields,h=l();for(c=p.iterator();c.hasNext();){var _=c.next();e.isType(_,dv)&&h.add_11rb$(_)}var d,f=_t(ht(h,10));for(d=h.iterator();d.hasNext();){var m=d.next();f.add_11rb$(m.aes)}var $=f;u.removeAll_brywnq$($)}var g,v=_t(ht(i,10));for(g=i.iterator();g.hasNext();){var b=g.next();v.add_11rb$(this.getMappingValueSource_0(b,!0,!0,t.valueSources))}var w,x=v,k=_t(ht(u,10));for(w=u.iterator();w.hasNext();){var C=w.next();k.add_11rb$(this.getMappingValueSource_0(C,!0,!1,t.valueSources))}var E,S=k,T=t.tooltipLinePatterns,O=V(x,S),N=y("defaultLineForValueSource",function(t,e){return t.defaultLineForValueSource_u47np3$(e)}.bind(null,wv())),P=_t(ht(O,10));for(E=O.iterator();E.hasNext();){var I=E.next();P.add_11rb$(N(I))}a=V(T,P)}return a},dh.prototype.getMappingValueSource_0=function(t,n,i,o){var r,a,s,u;if(null!=o){var c,p=l();for(c=o.iterator();c.hasNext();){var h=c.next();e.isType(h,dv)&&p.add_11rb$(h)}s=p}else s=null;if(null!=(r=s)){var _;t:do{var d;for(d=r.iterator();d.hasNext();){var f=d.next();if(mt(f.aes,t)){_=f;break t}}_=null}while(0);u=_}else u=null;return null!=(a=null!=u?u.withFlags_dqye30$(n,i):null)?a:new dv(t,n,i)},dh.prototype.defaultValueSourceTooltipLines_l73v50$=function(t,e,n,i,o){var r;void 0===i&&(i=null),void 0===o&&(o=null);var a,s=_t(ht(e,10));for(a=e.iterator();a.hasNext();){var l=a.next();s.add_11rb$(this.getMappingValueSource_0(l,!0,!0,i))}var u,c=s,p=_t(ht(n,10));for(u=n.iterator();u.hasNext();){var h=u.next();p.add_11rb$(this.getMappingValueSource_0(h,!0,!1,i))}var _,d=p,f=_t(ht(t,10));for(_=t.iterator();_.hasNext();){var m=_.next();f.add_11rb$(this.getMappingValueSource_0(m,!1,!1,i))}var $,g=f;if(null!=o){var v,b=_t(o.size);for(v=o.entries.iterator();v.hasNext();){var w=v.next(),x=b.add_11rb$,k=w.key,C=w.value;x.call(b,new ov(k,C,null))}$=b}else $=null;var E,S=null!=(r=$)?r:U(),T=V(V(V(g,c),d),S),O=y("defaultLineForValueSource",function(t,e){return t.defaultLineForValueSource_u47np3$(e)}.bind(null,wv())),N=_t(ht(T,10));for(E=T.iterator();E.hasNext();){var P=E.next();N.add_11rb$(O(P))}return N},dh.$metadata$={kind:a,simpleName:"GeomInteractionBuilderUtil",interfaces:[]};var fh=null;function mh(){return null===fh&&new dh,fh}function $h(t,e,n,i,o){xh(),this.locatorLookupSpace=t,this.locatorLookupStrategy=e,this.axisAesFromFunctionKind=n,this.axisTooltipVisibilityFromFunctionKind=i,this.axisTooltipEnabled=o}function yh(){wh=this,this.AREA_GEOM=!0,this.NON_AREA_GEOM=!1,this.AES_X_0=k(T.Companion.X),this.AES_XY_0=X([T.Companion.X,T.Companion.Y])}$h.prototype.toMultilayerLookupStrategy=function(){var t;return t=pi.NEAREST,new $h(hi.XY,t,this.axisAesFromFunctionKind,this.axisTooltipVisibilityFromFunctionKind,this.axisTooltipEnabled)},yh.prototype.univariateFunction_ahqhwk$=function(t,e){void 0===e&&(e=null);return new $h(hi.X,t,this.AES_X_0,true,this.isAxisTooltipEnabled_0(e,true))},yh.prototype.bivariateFunction_xss3$=function(t,e){void 0===e&&(e=null);var n=!t,i=t?pi.HOVER:pi.NEAREST;return new $h(hi.XY,i,this.AES_XY_0,n,this.isAxisTooltipEnabled_0(e,n))},yh.prototype.none=function(){var t;return t=pi.NONE,new $h(hi.NONE,t,U(),true,this.isAxisTooltipEnabled_0(null,true))},yh.prototype.isAxisTooltipEnabled_0=function(t,e){return null!=t?t:e},yh.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var gh,vh,bh,wh=null;function xh(){return null===wh&&new yh,wh}function kh(){Ph=this}function Ch(t){this.target=t,this.distance_pberzz$_0=-1,this.coord_ovwx85$_0=null}function Eh(t,e){v.call(this),this.name$=t,this.ordinal$=e}function Sh(){Sh=function(){},gh=new Eh("NEW_CLOSER",0),vh=new Eh("NEW_FARTHER",1),bh=new Eh("EQUAL",2)}function Th(){return Sh(),gh}function Oh(){return Sh(),vh}function Nh(){return Sh(),bh}$h.$metadata$={kind:h,simpleName:"GeomTooltipSetup",interfaces:[]},kh.prototype.polygonContainsCoordinate_sz9prc$=function(t,e){var n,i=0;n=t.size;for(var o=1;o=e.y&&a.y>=e.y||r.y=0))throw Kt("Failed requirement.".toString());for(e=t.iterator();e.hasNext();){var i=e.next();i.distance0&&(g=b,v=w)}while(y.hasNext());m=g}while(0);var x,C=null!=(n=null!=(t=m)?t.second:null)?n:0,S={v:U()},T=l();for(x=$.iterator();x.hasNext();){var O=x.next();O.component2()===C&&T.add_11rb$(O)}var N,P,I=_t(ht(T,10));for(N=T.iterator();N.hasNext();){var A=N.next(),R=I.add_11rb$,j=A.component1();R.call(I,j)}for(P=I.iterator();P.hasNext();){var L,z=P.next();L=!S.v.isEmpty()&&X([Ee.TEXT,Ee.LABEL]).contains_11rb$(z.geomKind)?S.v:!S.v.isEmpty()&&c_().stackableResults_0(S.v.get_za3lpa$(0),z)?Ei(S.v,z):k(z),S.v=L}var D,M=_t(ht($,10));for(D=$.iterator();D.hasNext();){var B=D.next(),F=M.add_11rb$,q=B.component1();F.call(M,q)}var H,G=M,K=S.v;t:do{var V;if(e.isType(K,st)&&K.isEmpty()){H=!1;break t}for(V=K.iterator();V.hasNext();){var Y=V.next();if(r(Y)&&a(Y)){H=!0;break t}}H=!1}while(0);if(H)i=S.v;else{var W;t:do{var Z;if(e.isType(G,st)&&G.isEmpty()){W=!0;break t}for(Z=G.iterator();Z.hasNext();)if(r(Z.next())){W=!1;break t}W=!0}while(0);if(W)i=S.v;else{var J;t:do{var Q;if(e.isType(G,st)&&G.isEmpty()){J=!1;break t}for(Q=G.iterator();Q.hasNext();){var tt=Q.next();if(r(tt)&&a(tt)){J=!0;break t}}J=!1}while(0);if(J){var et,nt,it=ve($,new we(n_(a_))),ot=_t(ht(it,10));for(et=it.iterator();et.hasNext();){var rt=et.next(),at=ot.add_11rb$,lt=rt.component1();at.call(ot,lt)}t:do{for(var ut=ot.listIterator_za3lpa$(ot.size);ut.hasPrevious();){var ct=ut.previous();if(r(ct)&&a(ct)){nt=ct;break t}}throw new Ti("List contains no element matching the predicate.")}while(0);i=k(nt)}else{var pt,dt,ft=ve($,new we(n_(s_))),mt=_t(ht(ft,10));for(pt=ft.iterator();pt.hasNext();){var $t=pt.next(),yt=mt.add_11rb$,gt=$t.component1();yt.call(mt,gt)}t:do{for(var vt=mt.listIterator_za3lpa$(mt.size);vt.hasPrevious();){var bt=vt.previous();if(r(bt)){dt=bt;break t}}dt=null}while(0);var wt,xt=dt;t:do{for(var kt=mt.listIterator_za3lpa$(mt.size);kt.hasPrevious();){var Ct=kt.previous();if(a(Ct)){wt=Ct;break t}}wt=null}while(0);i=$e([xt,wt])}}}return i},l_.prototype.distance_0=function(t,e){var n,i,o=t.distance;if(0===o)if(t.isCrosshairEnabled&&null!=e){var r,a=t.targets,s=l();for(r=a.iterator();r.hasNext();){var u=r.next();null!=u.tipLayoutHint.coord&&s.add_11rb$(u)}var c,p=_t(ht(s,10));for(c=s.iterator();c.hasNext();){var h=c.next();p.add_11rb$(Ih().distance_l9poh5$(e,W(h.tipLayoutHint.coord)))}i=null!=(n=Si(p))?n:this.FAKE_DISTANCE_8be2vx$}else i=this.FAKE_DISTANCE_8be2vx$;else i=o;return i},l_.prototype.stackableResults_0=function(t,e){return t.geomKind===e.geomKind&&this.STACKABLE_GEOMS_0.contains_11rb$(e.geomKind)},l_.prototype.filterResults_0=function(t,n,i){if(null==n||!Ci([Ee.DENSITY,Ee.HISTOGRAM,Ee.FREQPOLY,Ee.LINE,Ee.AREA,Ee.SEGMENT]).contains_11rb$(t.geomKind))return t;var o,r,a,s=(r=n,a=i,function(t){var n,i=W(t.tipLayoutHint.coord).subtract_gpjtzr$(r);return!0===(n=a)?i.y:!1===n?i.x:e.noWhenBranchMatched()}),u=t.targets,c=l();for(o=u.iterator();o.hasNext();){var p=o.next();null!=p.tipLayoutHint.coord&&c.add_11rb$(p)}var h,_,d=c,f=_t(ht(d,10));for(h=d.iterator();h.hasNext();){var m=h.next();f.add_11rb$(s(m))}t:do{var $=f.iterator();if(!$.hasNext()){_=null;break t}var y=$.next();if(!$.hasNext()){_=y;break t}var g=y,v=lt.abs(g);do{var b=$.next(),w=lt.abs(b);e.compareTo(v,w)>0&&(y=b,v=w)}while($.hasNext());_=y}while(0);var x,k=_,C=l();for(x=d.iterator();x.hasNext();){var E=x.next();s(E)===k&&C.add_11rb$(E)}var S,T=at("hitIndex",1,(function(t){return t.hitIndex})),O=Oi(),N=l();for(S=C.iterator();S.hasNext();){var P=S.next(),I=T(P);O.add_11rb$(I)&&N.add_11rb$(P)}return new xi(N,t.distance,t.geomKind,t.contextualMapping,t.isCrosshairEnabled)},l_.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var u_=null;function c_(){return null===u_&&new l_,u_}function p_(t,e){m_(),this.locatorLookupSpace_0=t,this.locatorLookupStrategy_0=e}function h_(t){return t.projection().x()}function __(t){return t.projection().x()}function d_(){f_=this,this.POINT_AREA_EPSILON_0=.1,this.RECT_X_NEAREST_EPSILON_0=2}i_.$metadata$={kind:h,simpleName:"LocatedTargetsPicker",interfaces:[]},p_.prototype.checkPath_z3141m$=function(t,n,i){var o,r,a;if(n.points.isEmpty())return null;switch(this.locatorLookupSpace_0.name){case"NONE":a=null;break;case"X":switch(this.locatorLookupStrategy_0.name){case"NONE":a=null;break;case"NEAREST":a=m_().searchNearest_0(t.x,n.points,h_);break;case"HOVER":a=t.xii(n.points).projection().x()?null:m_().searchNearest_0(t.x,n.points,__);break;default:a=e.noWhenBranchMatched()}break;case"XY":switch(this.locatorLookupStrategy_0.name){case"NONE":return null;case"HOVER":for(o=n.points.iterator();o.hasNext();){var s=o.next(),l=s.projection().xy();if(Ih().areEqual_f1g2it$(l,t,m_().POINT_AREA_EPSILON_0))return s}return null;case"NEAREST":var u=null;for(r=n.points.iterator();r.hasNext();){var c=r.next(),p=c.projection().xy();i.check_gpjtzr$(p)&&(u=c)}return u;default:a=e.noWhenBranchMatched()}break;default:a=e.noWhenBranchMatched()}return a},p_.prototype.checkPoint_w0b42b$=function(t,n,i){var o;switch(this.locatorLookupSpace_0.name){case"NONE":o=!1;break;case"X":switch(this.locatorLookupStrategy_0.name){case"NONE":o=!1;break;case"HOVER":o=Ih().areEqual_hln2n9$(n.x(),t.x,m_().POINT_AREA_EPSILON_0);break;case"NEAREST":o=i.check_gpjtzr$(new u(n.x(),0));break;default:o=e.noWhenBranchMatched()}break;case"XY":switch(this.locatorLookupStrategy_0.name){case"NONE":o=!1;break;case"HOVER":o=Ih().areEqual_f1g2it$(n.xy(),t,m_().POINT_AREA_EPSILON_0);break;case"NEAREST":o=i.check_gpjtzr$(n.xy());break;default:o=e.noWhenBranchMatched()}break;default:o=e.noWhenBranchMatched()}return o},p_.prototype.checkRect_fqo6rd$=function(t,n,i){var o;switch(this.locatorLookupSpace_0.name){case"NONE":o=!1;break;case"X":o=this.rangeBasedLookup_0(t,i,n.x());break;case"XY":var r=n.xy();switch(this.locatorLookupStrategy_0.name){case"NONE":o=!1;break;case"HOVER":o=r.contains_gpjtzr$(t);break;case"NEAREST":if(r.contains_gpjtzr$(t))o=i.check_gpjtzr$(t);else{var a=t.xn(ii(e)))return ii(e);for(var i=0,o=Ni(e);i<=o;){var r=(o+i|0)/2|0,a=n(e.get_za3lpa$(r));if(ta))return e.get_za3lpa$(r);i=r+1|0}}return n(e.get_za3lpa$(i))-tthis.POINTS_COUNT_TO_SKIP_SIMPLIFICATION_0){var u=s*this.AREA_TOLERANCE_RATIO_0,c=this.MAX_TOLERANCE_0,h=lt.min(u,c);r=Ri.Companion.visvalingamWhyatt_ytws2g$(o).setWeightLimit_14dthe$(h).points,this.isLogEnabled_0&&this.log_0("Simp: "+J(o.size)+" -> "+J(r.size)+", tolerance="+J(h)+", bbox="+J(a)+", area="+J(s))}else this.isLogEnabled_0&&this.log_0("Keep: size: "+J(o.size)+", bbox="+J(a)+", area="+J(s)),r=o;r.size<4||i.add_11rb$(new P_(r,a))}}return i},T_.prototype.log_0=function(t){tt(t)},T_.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var O_=null;function N_(){return null===O_&&new T_,O_}function P_(t,e){this.edges_0=t,this.bbox_0=e}function I_(t){B_(),y_.call(this),this.data=t,this.points=this.data}function A_(t,e,n){L_(),this.myPointTargetProjection_0=t,this.originalCoord=e,this.index=n}function R_(){j_=this}P_.prototype.contains_gpjtzr$=function(t){return this.bbox_0.contains_gpjtzr$(t)&&Ih().polygonContainsCoordinate_sz9prc$(this.edges_0,t)},P_.$metadata$={kind:h,simpleName:"RingXY",interfaces:[]},S_.$metadata$={kind:h,simpleName:"PolygonTargetProjection",interfaces:[y_]},A_.prototype.projection=function(){return this.myPointTargetProjection_0},R_.prototype.create_d0y48l$=function(t,n,i){var o;switch(i.name){case"X":case"XY":o=new A_(w_().create_p1yge$(t,i),t,n);break;case"NONE":o=F_();break;default:o=e.noWhenBranchMatched()}return o},R_.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var j_=null;function L_(){return null===j_&&new R_,j_}function z_(){M_=this}function D_(t){return t.projection().x()}A_.$metadata$={kind:h,simpleName:"PathPoint",interfaces:[]},z_.prototype.create_zb7j6l$=function(t,e,n){for(var i=l(),o=0,r=t.iterator();r.hasNext();++o){var a=r.next();i.add_11rb$(L_().create_d0y48l$(a,e(o),n))}return n===hi.X&&i.size>1&&ji(i,new we($_(D_))),new I_(i)},z_.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var M_=null;function B_(){return null===M_&&new z_,M_}function F_(){throw p("Undefined geom lookup space")}function U_(t,e,n,i){G_(),this.hitShape_8be2vx$=t,this.indexMapper_8be2vx$=e,this.tooltipParams_0=n,this.tooltipKind_8be2vx$=i}function q_(){H_=this}I_.$metadata$={kind:h,simpleName:"PathTargetProjection",interfaces:[y_]},U_.prototype.createGeomTarget_x7nr8i$=function(t,e){return new Li(e,G_().createTipLayoutHint_po16gq$(t,this.hitShape_8be2vx$,this.tooltipKind_8be2vx$,this.tooltipParams_0.stemLength,this.tooltipParams_0.fillColor,this.tooltipParams_0.markerColors),this.tooltipParams_0.tipLayoutHints)},q_.prototype.createTipLayoutHint_po16gq$=function(t,n,i,o,r,a){var s;switch(n.kind.name){case"POINT":switch(i.name){case"VERTICAL_TOOLTIP":s=mi.Companion.verticalTooltip_eox10j$(t,n.point.radius,o,r,a);break;case"CURSOR_TOOLTIP":s=mi.Companion.cursorTooltip_un7elx$(t,o,r,a);break;default:throw p(("Wrong TipLayoutHint.kind = "+i+" for POINT").toString())}break;case"RECT":switch(i.name){case"VERTICAL_TOOLTIP":s=mi.Companion.verticalTooltip_eox10j$(t,n.rect.width/2,o,r,a);break;case"HORIZONTAL_TOOLTIP":s=mi.Companion.horizontalTooltip_eox10j$(t,n.rect.width/2,o,r,a);break;case"CURSOR_TOOLTIP":s=mi.Companion.cursorTooltip_un7elx$(t,o,r,a);break;case"ROTATED_TOOLTIP":s=mi.Companion.rotatedTooltip_6lq1u6$(t,0,null,o);break;default:throw p(("Wrong TipLayoutHint.kind = "+i+" for RECT").toString())}break;case"PATH":switch(i.name){case"HORIZONTAL_TOOLTIP":s=mi.Companion.horizontalTooltip_eox10j$(t,0,o,r,a);break;case"VERTICAL_TOOLTIP":s=mi.Companion.verticalTooltip_eox10j$(t,0,o,r,a);break;default:throw p(("Wrong TipLayoutHint.kind = "+i+" for PATH").toString())}break;case"POLYGON":if(!mt(i,ki.CURSOR_TOOLTIP))throw p(("Wrong TipLayoutHint.kind = "+i+" for POLYGON").toString());s=mi.Companion.cursorTooltip_un7elx$(t,o,r,a);break;default:s=e.noWhenBranchMatched()}return s},q_.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var H_=null;function G_(){return null===H_&&new q_,H_}function K_(t){this.targetLocator_q7bze5$_0=t}function V_(t){X_(),this.targetCollector_0=t}function Y_(){W_=this}U_.$metadata$={kind:h,simpleName:"TargetPrototype",interfaces:[]},K_.prototype.search_gpjtzr$=function(t){var e,n=this.convertToTargetCoord_gpjtzr$(t);if(null==(e=this.targetLocator_q7bze5$_0.search_gpjtzr$(n)))return null;var i=e;return this.convertLookupResult_rz45e2$_0(i)},K_.prototype.convertLookupResult_rz45e2$_0=function(t){return new xi(this.convertGeomTargets_cu5hhh$_0(t.targets),this.convertToPlotDistance_14dthe$(t.distance),t.geomKind,t.contextualMapping,t.contextualMapping.isCrosshairEnabled)},K_.prototype.convertGeomTargets_cu5hhh$_0=function(t){var e,n=_t(ht(t,10));for(e=t.iterator();e.hasNext();){var i=e.next();n.add_11rb$(new Li(i.hitIndex,this.convertTipLayoutHint_jnrdzl$_0(i.tipLayoutHint),this.convertTipLayoutHints_dshtp8$_0(i.aesTipLayoutHints)))}return n},K_.prototype.convertTipLayoutHint_jnrdzl$_0=function(t){return new mi(t.kind,W(this.safeConvertToPlotCoord_eoxeor$_0(t.coord)),this.convertToPlotDistance_14dthe$(t.objectRadius),t.stemLength,t.fillColor,t.markerColors)},K_.prototype.convertTipLayoutHints_dshtp8$_0=function(t){var e,n=ft();for(e=t.entries.iterator();e.hasNext();){var i=e.next(),o=i.key,r=i.value,a=this.convertTipLayoutHint_jnrdzl$_0(r);n.put_xwzc9p$(o,a)}return n},K_.prototype.safeConvertToPlotCoord_eoxeor$_0=function(t){return null==t?null:this.convertToPlotCoord_gpjtzr$(t)},K_.$metadata$={kind:h,simpleName:"TransformedTargetLocator",interfaces:[wi]},V_.prototype.addPoint_cnsimy$$default=function(t,e,n,i,o){this.targetCollector_0.addPoint_cnsimy$(t,e,n,X_().afterYOrientation_0(i),o)},V_.prototype.addRectangle_bxzvr8$$default=function(t,e,n,i){this.targetCollector_0.addRectangle_bxzvr8$(t,e,X_().afterYOrientation_0(n),i)},V_.prototype.addPath_sa5m83$$default=function(t,e,n,i){this.targetCollector_0.addPath_sa5m83$(t,e,X_().afterYOrientation_0(n),i)},V_.prototype.addPolygon_sa5m83$$default=function(t,e,n,i){this.targetCollector_0.addPolygon_sa5m83$(t,e,X_().afterYOrientation_0(n),i)},V_.prototype.withFlippedAxis=function(){if(e.isType(this.targetCollector_0,Gh))throw p("'withFlippedAxis()' is not applicable to FlippedTargetCollector".toString());return new Gh(this)},V_.prototype.withYOrientation=function(){throw p("'withYOrientation()' is not applicable to YOrientationTargetCollector")},Y_.prototype.afterYOrientation_0=function(t){return new zi(m.YOrientationBaseUtil.flipAesKeys_fzsz32$(t.tipLayoutHints),t.stemLength,t.fillColor,t.markerColors)},Y_.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var W_=null;function X_(){return null===W_&&new Y_,W_}function Z_(){}function J_(){}function Q_(t,e,n,i,o,r,a,s,l,u,c){void 0===a&&(a=null),void 0===s&&(s=null),void 0===l&&(l=null),void 0===u&&(u=null),void 0===c&&(c=null),this.axisLength=t,this.axisDomain=e,this.orientation=n,this.axisBreaks=i,this.tickLabelsBounds=o,this.tickLabelRotationAngle=r,this.tickLabelHorizontalAnchor=a,this.tickLabelVerticalAnchor=s,this.tickLabelAdditionalOffsets=l,this.tickLabelsBoundsMax_0=u,this.tickLabelsTextBounds_8be2vx$=c}function td(t,e,n,i,o){id(),Rd.call(this),this.facets_0=t,this.layoutProviderByTile_0=e,this.showFacetStrip_0=n,this.hAxisTheme_0=i,this.vAxisTheme_0=o,this.totalAddedHSize_0=id().PANEL_PADDING_0*(this.facets_0.colCount-1|0),this.totalAddedVSize_0=id().PANEL_PADDING_0*(this.facets_0.rowCount-1|0);var r=this.vAxisTheme_0.showTitle()||this.vAxisTheme_0.showLabels()?0:10,a=this.hAxisTheme_0.showTitle()||this.hAxisTheme_0.showLabels()?0:10;if(this.setPadding_6y0v78$(10,10,a,r),!this.facets_0.isDefined)throw Kt("Undefined facets.".toString())}function ed(){nd=this,this.FACET_TAB_HEIGHT=30,this.FACET_H_PADDING=0,this.FACET_V_PADDING=6,this.PANEL_PADDING_0=10}V_.$metadata$={kind:h,simpleName:"YOrientationTargetCollector",interfaces:[vi]},Z_.$metadata$={kind:d,simpleName:"ToolFeedback",interfaces:[]},J_.$metadata$={kind:d,simpleName:"AxisLayout",interfaces:[]},Q_.prototype.withAxisLength_14dthe$=function(t){return new Q_(t,this.axisDomain,this.orientation,this.axisBreaks,this.tickLabelsBounds,this.tickLabelRotationAngle,this.tickLabelHorizontalAnchor,this.tickLabelVerticalAnchor,this.tickLabelAdditionalOffsets,this.tickLabelsBoundsMax_0,this.tickLabelsTextBounds_8be2vx$)},Q_.prototype.axisBounds=function(){return this.tickLabelsBounds.union_wthzt5$(Y(0,0,0,0))},Q_.$metadata$={kind:h,simpleName:"AxisLayoutInfo",interfaces:[]},td.prototype.doLayout_3twog0$=function(t,n){var i,o,r,a=new u(t.x-(this.paddingLeft_0+this.paddingRight_0),t.y-(this.paddingTop_0+this.paddingBottom_0)),s=this.facets_0.tileInfos();if(this.showFacetStrip_0){var c;t:do{var p;for(p=s.iterator();p.hasNext();){var h=p.next();if(!h.colLabs.isEmpty()){c=h;break t}}c=null}while(0);var _,d,f=null!=(r=null!=(o=null!=(i=c)?i.colLabs:null)?o.size:null)?r:0,m=l();for(_=s.iterator();_.hasNext();){var $=_.next();$.colLabs.isEmpty()||m.add_11rb$($)}var y=Oi(),g=l();for(d=m.iterator();d.hasNext();){var v=d.next(),b=v.row;y.add_11rb$(b)&&g.add_11rb$(v)}var w,x=g.size,k=id().facetColHeadHeight_za3lpa$(f)*x;t:do{var C;if(e.isType(s,st)&&s.isEmpty()){w=!1;break t}for(C=s.iterator();C.hasNext();)if(null!=C.next().rowLab){w=!0;break t}w=!1}while(0);var E=new u((w?1:0)*id().FACET_TAB_HEIGHT,k);a=a.subtract_gpjtzr$(E)}for(var S=this.facets_0.freeHScale||this.facets_0.freeVScale?rm().createTileLayoutInfos_m2eqzh$(a,this.facets_0,this.layoutProviderByTile_0,this.totalAddedHSize_0,this.totalAddedVSize_0,n,this.hAxisTheme_0,this.vAxisTheme_0):nm().createTileLayoutInfos_m2eqzh$(a,this.facets_0,this.layoutProviderByTile_0,this.totalAddedHSize_0,this.totalAddedVSize_0,n,this.hAxisTheme_0,this.vAxisTheme_0),T=ad().geomOffsetsByCol_53l30a$(S,s,id().PANEL_PADDING_0,this.facets_0.colCount),O=ad().geomOffsetsByRow_igosif$(S,s,this.showFacetStrip_0,id().PANEL_PADDING_0,this.facets_0.rowCount),N=l(),P=l(),I=0,A=s.iterator();A.hasNext();++I){var R=A.next(),j=S.get_za3lpa$(I),L=R.col,z=R.row,D=T.get_za3lpa$(L),M=O.get_za3lpa$(z),B=j.geomOuterBounds.dimension,F=null!=R.rowLab&&this.showFacetStrip_0?id().FACET_TAB_HEIGHT:0,U=R.hasVAxis?j.axisThicknessY():0,q=D-U,G=B.x+U+F,K=this.showFacetStrip_0?id().facetColHeadHeight_za3lpa$(R.colLabs.size):0,V=R.hasHAxis?j.axisThicknessX():0,Y=M-K,W=B.y+K+V,X=new H(new u(q,Y),new u(G,W)),Z=new H(new u(D,M),B);N.add_11rb$(X),P.add_11rb$(Z)}var J=N.iterator();if(!J.hasNext())throw ge("Empty collection can't be reduced.");for(var Q=J.next();J.hasNext();)Q=Q.union_wthzt5$(J.next());for(var tt=Q.origin.negate(),et=new u(this.paddingLeft_0,this.paddingTop_0),nt=l(),it=0,ot=s.iterator();ot.hasNext();++it){var rt,at=ot.next(),lt=S.get_za3lpa$(it),ut=lt.geomInnerBounds.origin.subtract_gpjtzr$(lt.geomOuterBounds.origin),ct=N.get_za3lpa$(it),pt=P.get_za3lpa$(it),dt=new H(pt.origin.add_gpjtzr$(ut),lt.geomInnerBounds.dimension),ft=new ef(et,ct.add_gpjtzr$(tt),pt.add_gpjtzr$(tt),dt.add_gpjtzr$(tt),lt.hAxisInfo,lt.vAxisInfo,at.hasHAxis,at.hasVAxis,void 0,void 0,at.trueIndex);rt=this.showFacetStrip_0?ft.withFacetLabels_5hkr16$(at.colLabs,at.rowLab):ft,nt.add_11rb$(rt)}var mt,$t=_t(ht(nt,10));for(mt=nt.iterator();mt.hasNext();){var yt=mt.next();$t.add_11rb$(yt.bounds)}var gt=$t.iterator();if(!gt.hasNext())throw ge("Empty collection can't be reduced.");for(var vt=gt.next();gt.hasNext();)vt=vt.union_wthzt5$(gt.next());return new jd(nt,vt.dimension.add_gpjtzr$(et).add_gpjtzr$(new u(this.paddingRight_0,this.paddingBottom_0)))},ed.prototype.facetColLabelSize_14dthe$=function(t){return new u(t-0,this.FACET_TAB_HEIGHT-12)},ed.prototype.facetColHeadHeight_za3lpa$=function(t){return t>0?this.facetColLabelSize_14dthe$(0).y*t+12:0},ed.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var nd=null;function id(){return null===nd&&new ed,nd}function od(){rd=this}td.$metadata$={kind:h,simpleName:"FacetedPlotLayout",interfaces:[Rd]},od.prototype.countVAxisInFirstRow_75mdod$=function(t){var e,n=l();for(e=t.iterator();e.hasNext();){var i=e.next();0===i.row&&n.add_11rb$(i)}var o,r=_t(ht(n,10));for(o=n.iterator();o.hasNext();){var a=o.next();r.add_11rb$(a.hasVAxis?1:0)}return Di(r)},od.prototype.countHAxisInFirstCol_75mdod$=function(t){var e,n=l();for(e=t.iterator();e.hasNext();){var i=e.next();0===i.col&&n.add_11rb$(i)}var o,r=_t(ht(n,10));for(o=n.iterator();o.hasNext();){var a=o.next();r.add_11rb$(a.hasHAxis?1:0)}return Di(r)},od.prototype.tilesAreaSize_xxmnvs$=function(t,e,n,i){var o,r,a,s=e.tileInfos(),l=0;for(a=ne(0,e.colCount).iterator();a.hasNext();){var c=a.next();l+=this.maxVAxisThickness_0(t,s,c)}var p,h=l,_=0;for(p=ne(0,e.rowCount).iterator();p.hasNext();){var d=p.next();_+=this.maxHAxisThickness_0(t,s,d,e.rowCount)}var f,m=_,$=ne(0,e.rowCount),y=_t(ht($,10));for(f=$.iterator();f.hasNext();){var g,v=f.next(),b=y.add_11rb$,w=0;for(g=this.rowIndices_0(s,v).iterator();g.hasNext();){var x=g.next();w+=t.get_za3lpa$(x).geomOuterWidth()}b.call(y,w)}var k,C=null!=(o=Mi(y))?o:0,E=ne(0,e.colCount),S=_t(ht(E,10));for(k=E.iterator();k.hasNext();){var T,O=k.next(),N=S.add_11rb$,P=0;for(T=this.colIndices_0(s,O).iterator();T.hasNext();){var I=T.next();P+=t.get_za3lpa$(I).geomOuterHeight()}N.call(S,P)}var A=null!=(r=Mi(S))?r:0;return new u(h+C+n,m+A+i)},od.prototype.maxVAxisThickness_0=function(t,e,n){var i,o=this.colIndices_0(e,n);t:do{var r=o.iterator();if(!r.hasNext()){i=null;break t}for(var a=t.get_za3lpa$(r.next()),s=a.vAxisShown?a.axisThicknessY():0;r.hasNext();){var l=t.get_za3lpa$(r.next()),u=l.vAxisShown?l.axisThicknessY():0;s=lt.max(s,u)}i=s}while(0);return null!=i?i:0},od.prototype.maxHAxisThickness_0=function(t,e,n,i){var o,r=this.rowIndices_0(e,n);t:do{var a=r.iterator();if(!a.hasNext()){o=null;break t}var s,l=a.next();if(e.get_za3lpa$(l).isBottom&&n<(i-1|0))s=0;else{var u=t.get_za3lpa$(l);s=u.hAxisShown?u.axisThicknessX():0}for(var c=s;a.hasNext();){var p,h=a.next();if(e.get_za3lpa$(h).isBottom&&n<(i-1|0))p=0;else{var _=t.get_za3lpa$(h);p=_.hAxisShown?_.axisThicknessX():0}var d=p;c=lt.max(c,d)}o=c}while(0);return null!=o?o:0},od.prototype.colIndices_0=function(t,e){var n,i=yi(t),o=l();for(n=i.iterator();n.hasNext();){var r=n.next();r.component2().col===e&&o.add_11rb$(r)}var a,s=_t(ht(o,10));for(a=o.iterator();a.hasNext();){var u=a.next(),c=s.add_11rb$,p=u.component1();c.call(s,p)}return s},od.prototype.rowIndices_0=function(t,e){var n,i=yi(t),o=l();for(n=i.iterator();n.hasNext();){var r=n.next();r.component2().row===e&&o.add_11rb$(r)}var a,s=_t(ht(o,10));for(a=o.iterator();a.hasNext();){var u=a.next(),c=s.add_11rb$,p=u.component1();c.call(s,p)}return s},od.prototype.geomOffsetsByCol_53l30a$=function(t,e,n,i){for(var o=_t(i),r=0;r0))throw Kt(("maxCount="+e).toString());var i=t.getBreaks_5wr77w$(e,n);if(1===e&&!i.isEmpty)return new Bi(i.domainValues.subList_vux9f0$(0,1),i.transformedValues.subList_vux9f0$(0,1),i.labels.subList_vux9f0$(0,1));for(var o=e;i.size>e;){var r=(i.size-e|0)/2|0;if((o=o-lt.max(1,r)|0)<=1){i=t.getBreaks_5wr77w$(1,n);break}i=t.getBreaks_5wr77w$(o,n)}return i},Nf.prototype.longestLabelWidth_d4huc9$=function(t,n){var i;void 0===n&&(n=Pf);t:do{var o=t.iterator();if(!o.hasNext()){i=null;break t}var r=o.next();if(!o.hasNext()){i=r;break t}var a=n(r);do{var s=o.next(),l=n(s);e.compareTo(a,l)<0&&(r=s,a=l)}while(o.hasNext());i=r}while(0);return null==i?0:n(i)},Nf.prototype.horizontalCenteredLabelBounds_gpjtzr$=function(t){return Y(-t.x/2,0,t.x,t.y)},Nf.prototype.doLayoutVerticalAxisLabels_rdueqq$=function(t,e,n,i,o){var r;if(o.showLabels()){var a=this.verticalAxisLabelsBounds_0(e,n,i,Id().axisTick_9yvfuv$(o));r=this.applyLabelsMargins_r0qkik$(a,o.showTickMarks()?o.tickMarkLength():0,o.tickLabelMargins(),t)}else if(o.showTickMarks()){var s=new H(u.Companion.ZERO,u.Companion.ZERO);r=this.applyLabelsMargins_r0qkik$(s,o.showTickMarks()?o.tickMarkLength():0,o.tickLabelMargins(),t)}else r=new H(u.Companion.ZERO,u.Companion.ZERO);var l=r;return(new Of).breaks_d6t06k$(e).bounds_wthzt5$(l).build()},Nf.prototype.mapToAxis_rtp2vs$=function(t,e,n){var i,o=e.lowerEnd,r=l();for(i=t.iterator();i.hasNext();){var a=n(i.next()-o);r.add_11rb$(W(a))}return r},Nf.prototype.applyLabelsMargins_r0qkik$=function(t,n,i,o){var r,a,s,l;switch(o.name){case"LEFT":r=i.width()+t.width;break;case"TOP":r=i.height()+t.height;break;case"RIGHT":case"BOTTOM":r=0;break;default:r=e.noWhenBranchMatched()}var c=n+r;switch(o.name){case"LEFT":a=new u(-c,0);break;case"RIGHT":a=new u(c,0);break;case"TOP":a=new u(0,-c);break;case"BOTTOM":a=new u(0,c);break;default:a=e.noWhenBranchMatched()}var p=a;l=t.dimension,s=o.isHorizontal?new u(0,i.height()):new u(i.width(),0);var h=l.add_gpjtzr$(s);return new H(t.origin.add_gpjtzr$(p),h)},Nf.prototype.textBounds_14wjue$=function(t,e,n){return n.isHorizontal?Y(t.left,t.top+e.top,t.width,t.height-e.height()):Y(t.left+e.left,t.top,t.width-e.width(),t.height)},Nf.prototype.verticalAxisLabelsBounds_0=function(t,e,n,i){var o,r=this.longestLabelWidth_d4huc9$(t.labels,(o=i,function(t){return o.width_61zpoe$(t)})),a=0,s=0;if(!t.isEmpty){var l=this.mapToAxis_rtp2vs$(t.transformedValues,e,n),c=l.get_za3lpa$(0),p=ii(l);a=lt.min(c,p);var h=l.get_za3lpa$(0),_=ii(l);s=lt.max(h,_),a-=i.height()/2,s+=i.height()/2}var d=new u(0,a),f=new u(r,s-a);return new H(d,f)},Nf.$metadata$={kind:a,simpleName:"BreakLabelsLayoutUtil",interfaces:[]};var If=null;function Af(){return null===If&&new Nf,If}function Rf(t,e,n,i,o){if(gf.call(this,t,e,n,i,o),!t.isHorizontal){var r=t.toString();throw Kt(r.toString())}}function jf(t,e,n,i,o){if(kf.call(this,t,e,n,o),this.myBreaksProvider_0=i,!t.isHorizontal){var r=t.toString();throw Kt(r.toString())}if(this.myBreaksProvider_0.isFixedBreaks)throw Kt("fixed breaks".toString())}function Lf(t,e,n,i,o,r){Mf(),gf.call(this,t,e,n,i,o),this.myMaxLines_0=r,this.myShelfIndexForTickIndex_0=l()}function zf(){Df=this,this.LINE_HEIGHT_0=1.2,this.MIN_DISTANCE_0=60}Rf.prototype.overlap_0=function(t,e){return t.isOverlap_8be2vx$||null!=e&&!(e.xRange().encloses_3lmjpf$(W(t.bounds).xRange())&&e.yRange().encloses_3lmjpf$(t.bounds.yRange()))},Rf.prototype.doLayout_s0wrr0$=function(t,e,n){if(!this.theme.showLabels())return this.noLabelsLayoutInfo_c0p8fa$(t,this.orientation);var i=this.simpleLayout_0().doLayout_s0wrr0$(t,e,n);return this.overlap_0(i,n)&&(i=this.multilineLayout_0().doLayout_s0wrr0$(t,e,n),this.overlap_0(i,n)&&(i=this.tiltedLayout_0().doLayout_s0wrr0$(t,e,n),this.overlap_0(i,n)&&(i=this.verticalLayout_0(this.labelSpec).doLayout_s0wrr0$(t,e,n)))),i},Rf.prototype.simpleLayout_0=function(){return new Bf(this.orientation,this.axisDomain,this.labelSpec,this.breaks_0,this.theme)},Rf.prototype.multilineLayout_0=function(){return new Lf(this.orientation,this.axisDomain,this.labelSpec,this.breaks_0,this.theme,2)},Rf.prototype.tiltedLayout_0=function(){return new Hf(this.orientation,this.axisDomain,this.labelSpec,this.breaks_0,this.theme)},Rf.prototype.verticalLayout_0=function(t){return new Yf(this.orientation,this.axisDomain,t,this.breaks_0,this.theme)},Rf.prototype.labelBounds_gpjtzr$=function(t){throw p("Not implemented here")},Rf.$metadata$={kind:h,simpleName:"HorizontalFixedBreaksLabelsLayout",interfaces:[gf]},jf.prototype.doLayout_s0wrr0$=function(t,e,n){for(var i=qf().estimateBreakCountInitial_29uwtv$(t,Id().axisTick_9yvfuv$(this.theme)),o=this.getBreaks_0(i,t),r=this.doLayoutLabels_0(o,t,e,n);r.isOverlap_8be2vx$;){var a=qf().estimateBreakCount_rh2gss$(o.labels,t,Id().axisTick_9yvfuv$(this.theme));if(a>=i)break;i=a,o=this.getBreaks_0(i,t),r=this.doLayoutLabels_0(o,t,e,n)}return r},jf.prototype.doLayoutLabels_0=function(t,e,n,i){return new Bf(this.orientation,this.axisDomain,this.labelSpec,t,this.theme).doLayout_s0wrr0$(e,n,i)},jf.prototype.getBreaks_0=function(t,e){return Af().getFlexBreaks_73ga93$(this.myBreaksProvider_0,t,e)},jf.$metadata$={kind:h,simpleName:"HorizontalFlexBreaksLabelsLayout",interfaces:[kf]},Object.defineProperty(Lf.prototype,"labelAdditionalOffsets_0",{configurable:!0,get:function(){var t,e=this.labelSpec.height()*Mf().LINE_HEIGHT_0,n=l();t=this.breaks_0.size;for(var i=0;ithis.myMaxLines_0).labelAdditionalOffsets_eajcfd$(this.labelAdditionalOffsets_0).labelHorizontalAnchor_mf4siq$(D.MIDDLE).labelVerticalAnchor_yaylw0$(M.TOP).build()},Lf.prototype.labelBounds_gpjtzr$=function(t){return Af().horizontalCenteredLabelBounds_gpjtzr$(t)},zf.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var Df=null;function Mf(){return null===Df&&new zf,Df}function Bf(t,e,n,i,o){qf(),gf.call(this,t,e,n,i,o)}function Ff(){Uf=this}Lf.$metadata$={kind:h,simpleName:"HorizontalMultilineLabelsLayout",interfaces:[gf]},Bf.prototype.doLayout_s0wrr0$=function(t,e,n){var i;if(this.breaks_0.isEmpty)return this.noLabelsLayoutInfo_c0p8fa$(t,this.orientation);if(!this.theme.showLabels())return this.noLabelsLayoutInfo_c0p8fa$(t,this.orientation);var o=null,r=!1,a=this.mapToAxis_d2cc22$(this.breaks_0.transformedValues,e);for(i=this.labelBoundsList_c3fefx$(a,this.breaks_0.labels,xf().HORIZONTAL_TICK_LOCATION).iterator();i.hasNext();){var s=i.next();r=r||null!=o&&o.xRange().connected_3lmjpf$(It.SeriesUtil.expand_nrrs69$(s.xRange(),Sf().MIN_TICK_LABEL_DISTANCE/2,Sf().MIN_TICK_LABEL_DISTANCE/2)),o=_d().union_te9coj$(s,o)}return(new Of).breaks_d6t06k$(this.breaks_0).bounds_wthzt5$(this.applyLabelsMargins_w7e9pi$(W(o))).overlap_6taknv$(r).labelAdditionalOffsets_eajcfd$(null).labelHorizontalAnchor_mf4siq$(D.MIDDLE).labelVerticalAnchor_yaylw0$(M.TOP).build()},Bf.prototype.labelBounds_gpjtzr$=function(t){return Af().horizontalCenteredLabelBounds_gpjtzr$(t)},Ff.prototype.estimateBreakCountInitial_29uwtv$=function(t,e){return this.estimateBreakCount_0(e.width_61zpoe$(Sf().INITIAL_TICK_LABEL),t)},Ff.prototype.estimateBreakCount_rh2gss$=function(t,e,n){var i,o=Af().longestLabelWidth_d4huc9$(t,(i=n,function(t){return i.width_61zpoe$(t)}));return this.estimateBreakCount_0(o,e)},Ff.prototype.estimateBreakCount_0=function(t,e){var n=e/(t+Sf().MIN_TICK_LABEL_DISTANCE);return At(lt.max(1,n))},Ff.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var Uf=null;function qf(){return null===Uf&&new Ff,Uf}function Hf(t,e,n,i,o){Vf(),gf.call(this,t,e,n,i,o)}function Gf(){Kf=this,this.MIN_DISTANCE_0=5,this.ROTATION_DEGREE_0=-30;var t=Ui(this.ROTATION_DEGREE_0);this.SIN_0=lt.sin(t);var e=Ui(this.ROTATION_DEGREE_0);this.COS_0=lt.cos(e)}Bf.$metadata$={kind:h,simpleName:"HorizontalSimpleLabelsLayout",interfaces:[gf]},Object.defineProperty(Hf.prototype,"labelHorizontalAnchor_0",{configurable:!0,get:function(){if(this.orientation===nh())return D.RIGHT;throw Fi("Not implemented")}}),Object.defineProperty(Hf.prototype,"labelVerticalAnchor_0",{configurable:!0,get:function(){return M.TOP}}),Hf.prototype.doLayout_s0wrr0$=function(t,e,n){var i=this.labelSpec.height(),o=this.mapToAxis_d2cc22$(this.breaks_0.transformedValues,e),r=!1;if(this.breaks_0.size>=2){var a=(i+Vf().MIN_DISTANCE_0)/Vf().SIN_0,s=lt.abs(a),l=o.get_za3lpa$(0)-o.get_za3lpa$(1);r=lt.abs(l)=-90&&Vf().ROTATION_DEGREE_0<=0&&this.labelHorizontalAnchor_0===D.RIGHT&&this.labelVerticalAnchor_0===M.TOP))throw Fi("Not implemented");var e=t.x*Vf().COS_0,n=lt.abs(e),i=t.y*Vf().SIN_0,o=n+2*lt.abs(i),r=t.x*Vf().SIN_0,a=lt.abs(r),s=t.y*Vf().COS_0,l=a+lt.abs(s),u=t.x*Vf().COS_0,c=lt.abs(u),p=t.y*Vf().SIN_0,h=-(c+lt.abs(p));return Y(h,0,o,l)},Gf.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var Kf=null;function Vf(){return null===Kf&&new Gf,Kf}function Yf(t,e,n,i,o){Zf(),gf.call(this,t,e,n,i,o)}function Wf(){Xf=this,this.MIN_DISTANCE_0=5,this.ROTATION_DEGREE_0=90}Hf.$metadata$={kind:h,simpleName:"HorizontalTiltedLabelsLayout",interfaces:[gf]},Object.defineProperty(Yf.prototype,"labelHorizontalAnchor",{configurable:!0,get:function(){if(this.orientation===nh())return D.LEFT;throw Fi("Not implemented")}}),Object.defineProperty(Yf.prototype,"labelVerticalAnchor",{configurable:!0,get:function(){return M.CENTER}}),Yf.prototype.doLayout_s0wrr0$=function(t,e,n){var i=this.labelSpec.height(),o=this.mapToAxis_d2cc22$(this.breaks_0.transformedValues,e),r=!1;if(this.breaks_0.size>=2){var a=i+Zf().MIN_DISTANCE_0,s=o.get_za3lpa$(0)-o.get_za3lpa$(1);r=lt.abs(s)0))throw Kt(("axis length: "+t).toString());var i=this.maxTickCount_0(t),o=this.getBreaks_0(i,t);return Af().doLayoutVerticalAxisLabels_rdueqq$(this.orientation,o,this.axisDomain,e,this.theme)},Qf.prototype.getBreaks_0=function(t,e){return Af().getFlexBreaks_73ga93$(this.myBreaksProvider_0,t,e)},Qf.$metadata$={kind:h,simpleName:"VerticalFlexBreaksLabelsLayout",interfaces:[kf]},tm.prototype.createTileLayoutInfos_m2eqzh$=function(t,e,n,i,o,r,a,s){var l,c=e.tileInfos(),p=ad().countVAxisInFirstRow_75mdod$(c),h=Od().initialThickness_chj3mn$(Qp(),s),_=(t.x-i-p*h)/e.colCount+h,d=ad().countHAxisInFirstCol_75mdod$(c),f=Od().initialThickness_chj3mn$(nh(),a),m=(t.y-o-d*f)/e.rowCount+f,$=n.get_za3lpa$(0).createTopDownTileLayout(),y=$.doLayout_3twog0$(new u(_,m),r),g=_t(ht(c,10));for(l=c.iterator();l.hasNext();){var v=l.next();g.add_11rb$(y.withAxisShown_dqye30$(v.hasHAxis,v.hasVAxis))}var b=g,w=ad().tilesAreaSize_xxmnvs$(b,e,i,o),x=t.x-w.x,k=t.y-w.y,C=lt.abs(x)<=e.colCount;if(C&&(C=lt.abs(k)<=e.rowCount),C)return b;var E,S=x/e.colCount,T=k/e.rowCount,O=y.geomOuterWidth()+S+y.axisThicknessY(),N=y.geomOuterHeight()+T+y.axisThicknessX(),P=$.doLayout_3twog0$(new u(O,N),r),I=_t(ht(c,10));for(E=c.iterator();E.hasNext();){var A=E.next();I.add_11rb$(P.withAxisShown_dqye30$(A.hasHAxis,A.hasVAxis))}return I},tm.$metadata$={kind:a,simpleName:"FixedScalesTilesLayouter",interfaces:[]};var em=null;function nm(){return null===em&&new tm,em}function im(){om=this}im.prototype.createTileLayoutInfos_m2eqzh$=function(t,e,n,i,o,r,a,s){var l,p=e.tileInfos(),h=ad().countVAxisInFirstRow_75mdod$(p),_=Od().initialThickness_chj3mn$(Qp(),s),d=(t.x-i-h*_)/e.colCount,f=ad().countHAxisInFirstCol_75mdod$(p),m=Od().initialThickness_chj3mn$(nh(),a),$=(t.y-o-f*m)/e.rowCount,y=_t(ht(n,10));for(l=n.iterator();l.hasNext();){var g=l.next();y.add_11rb$(g.createInsideOutTileLayout())}var v,b=y,w=_t(ht(p,10));for(v=p.iterator();v.hasNext();){var x=v.next();w.add_11rb$(new c(x,b.get_za3lpa$(x.trueIndex)))}var k,C=w,E=_t(ht(C,10));for(k=C.iterator();k.hasNext();){var S=k.next(),T=E.add_11rb$,O=S.component1(),N=S.component2();T.call(E,N.doLayout_3twog0$(new u(d,$),r).withAxisShown_dqye30$(O.hasHAxis,O.hasVAxis))}var P=E,I=ad().tilesAreaSize_xxmnvs$(P,e,i,o),A=t.x-I.x,R=t.y-I.y,j=lt.abs(A)<=e.colCount;if(j&&(j=lt.abs(R)<=e.rowCount),j)return P;var L,z=d+A/e.colCount,D=$+R/e.rowCount,M=_t(ht(C,10));for(L=C.iterator();L.hasNext();){var B=L.next(),F=M.add_11rb$,U=B.component1(),q=B.component2();F.call(M,q.doLayout_3twog0$(new u(z,D),r).withAxisShown_dqye30$(U.hasHAxis,U.hasVAxis))}return M},im.$metadata$={kind:a,simpleName:"FreeScalesTilesLayouter",interfaces:[]};var om=null;function rm(){return null===om&&new im,om}function am(t,e,n,i,o){um(),this.hAxisLayout_0=t,this.vAxisLayout_0=e,this.hDomain_0=n,this.vDomain_0=i,this.marginsLayout_0=o}function sm(){lm=this,this.AXIS_STRETCH_RATIO_0=.1}am.prototype.doLayout_3twog0$=function(t,e){var n=new H(u.Companion.ZERO,t),i=this.marginsLayout_0.toInnerBounds_wthzt5$(n),o=um().computeAxisInfos_0(this.hAxisLayout_0,this.vAxisLayout_0,i.dimension,this.hDomain_0,this.vDomain_0),r=o.component1(),a=o.component2(),s=um().tileBounds_0(r.axisBounds(),a.axisBounds(),n);return new ef(u.Companion.ZERO,s,n,i,r,a,!0,!0,void 0,void 0,0)},sm.prototype.tileBounds_0=function(t,e,n){var i=new u(n.left-e.width,n.top-ym().GEOM_MARGIN),o=new u(n.right+ym().GEOM_MARGIN,n.bottom+t.height);return new H(i,o.subtract_gpjtzr$(i))},sm.prototype.computeAxisInfos_0=function(t,e,n,i,o){var r=new H(u.Companion.ZERO,n),a=this.computeHAxisInfo_0(t,i,r),s=this.computeVAxisInfo_0(e,o,r);return new c(a,s)},sm.prototype.computeHAxisInfo_0=function(t,e,n){var i=n.xRange(),o=i.length,r=o*this.AXIS_STRETCH_RATIO_0,a=ym().maxHAxisTickLabelsBounds_f1277s$(nh(),r,i,i);return t.doLayout_5wdni1$(e,o,a)},sm.prototype.computeVAxisInfo_0=function(t,e,n){return t.doLayout_5wdni1$(e,n.dimension.y,null)},sm.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var lm=null;function um(){return null===lm&&new sm,lm}function cm(){}function pm(){}function hm(){fm()}function _m(){dm=this,this.TILE_LAYOUT_0=new pm}am.$metadata$={kind:h,simpleName:"InsideOutTileLayout",interfaces:[tf]},Object.defineProperty(cm.prototype,"axis",{configurable:!0,get:function(){return qi()}}),cm.prototype.showLine=function(){return!1},cm.prototype.showTickMarks=function(){return!1},cm.prototype.showLabels=function(){return!1},cm.prototype.showTitle=function(){return!1},cm.prototype.showTooltip=function(){return!1},cm.prototype.titleStyle=function(){return new nv(St.Companion.SERIF,Tt.Companion.NORMAL,Wm().TITLE_FONT_SIZE,Zm().TEXT_COLOR)},cm.prototype.titleJustification=function(){return new Kd(.5,1)},cm.prototype.titleMargins=function(){return new Cd},cm.prototype.lineWidth=function(){return 1},cm.prototype.lineColor=function(){return Wm().LINE_COLOR},cm.prototype.tickMarkColor=function(){return Wm().LINE_COLOR},cm.prototype.labelStyle=function(){return new nv(St.Companion.SERIF,Tt.Companion.NORMAL,Wm().TICK_FONT_SIZE,Zm().TEXT_COLOR)},cm.prototype.tickMarkWidth=function(){return 1},cm.prototype.tickMarkLength=function(){return 4},cm.prototype.tickLabelMargins=function(){return new Cd(3,3,0,0)},cm.prototype.tooltipFill=function(){return Gm().AXIS_TOOLTIP_COLOR},cm.prototype.tooltipColor=function(){return Gm().LIGHT_TEXT_COLOR},cm.prototype.tooltipStrokeWidth=function(){return 1},cm.prototype.tooltipTextStyle=function(){return new nv(St.Companion.SERIF,Tt.Companion.NORMAL,Gm().AXIS_TOOLTIP_FONT_SIZE,Gm().LIGHT_TEXT_COLOR)},cm.$metadata$={kind:h,simpleName:"LiveMapAxisTheme",interfaces:[Wg]},pm.prototype.doLayout_3twog0$=function(t,e){var n=ym().liveMapGeomBounds_gpjtzr$(t);return new ef(u.Companion.ZERO,n,n,n,null,null,!1,!1,void 0,void 0,0)},pm.$metadata$={kind:h,simpleName:"LiveMapTileLayout",interfaces:[tf]},hm.prototype.createTopDownTileLayout=function(){return fm().TILE_LAYOUT_0},hm.prototype.createInsideOutTileLayout=function(){return fm().TILE_LAYOUT_0},_m.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var dm=null;function fm(){return null===dm&&new _m,dm}function mm(){$m=this,this.GEOM_MARGIN=0,this.GEOM_MIN_SIZE=new u(50,50)}hm.$metadata$={kind:h,simpleName:"LiveMapTileLayoutProvider",interfaces:[nf]},mm.prototype.liveMapGeomBounds_gpjtzr$=function(t){return this.subtractMargins_0(0,0,t)},mm.prototype.subtractMargins_0=function(t,e,n){var i=new u(e,this.GEOM_MARGIN),o=new u(this.GEOM_MARGIN,t),r=n.subtract_gpjtzr$(i).subtract_gpjtzr$(o),a=r.x,s=this.GEOM_MIN_SIZE.x,l=lt.max(a,s),c=r.y,p=this.GEOM_MIN_SIZE.y;return new H(i,new u(l,lt.max(c,p)))},mm.prototype.geomOuterBounds_sy27u4$=function(t,e,n,i,o,r){var a=t.subtractFrom_wthzt5$(new H(u.Companion.ZERO,e)),s=o.toInnerSize_gpjtzr$(a.dimension),l=o.toOuterSize_gpjtzr$(r.adjustGeomSize_3y20zv$(n,i,s));return new H(a.origin,l)},mm.prototype.maxHAxisTickLabelsBounds_cvaznw$=function(t,e,n,i){var o=new gt(10,i.x-20);return this.maxHAxisTickLabelsBounds_f1277s$(t,e,n,o)},mm.prototype.maxHAxisTickLabelsBounds_f1277s$=function(t,e,n,i){switch(t.name){case"TOP":case"BOTTOM":var o=n.lowerEnd-i.lowerEnd+e,r=i.upperEnd-n.upperEnd+e,a=1e42,s=mt(t,eh())?-a:0,l=-o,u=o+r+n.length;return Y(l,s,u,a);default:throw Kt("Orientation not supported: "+t)}},mm.$metadata$={kind:a,simpleName:"TileLayoutUtil",interfaces:[]};var $m=null;function ym(){return null===$m&&new mm,$m}function gm(t,e,n,i,o){wm(),this.hAxisLayout_0=t,this.vAxisLayout_0=e,this.hDomain_0=n,this.vDomain_0=i,this.marginsLayout_0=o}function vm(){bm=this,this.AXIS_STRETCH_RATIO_0=.1}gm.prototype.doLayout_3twog0$=function(t,e){var n,i=wm().computeAxisInfos_0(this.hAxisLayout_0,this.vAxisLayout_0,t,this.hDomain_0,this.vDomain_0,this.marginsLayout_0,e),o=ym().geomOuterBounds_sy27u4$(i,t,this.hDomain_0,this.vDomain_0,this.marginsLayout_0,e),r=E(i.hAxisInfo,i.vAxisInfo),a=r.component1(),s=r.component2(),l=this.marginsLayout_0.toInnerBounds_wthzt5$(o).xRange(),c=ym().maxHAxisTickLabelsBounds_cvaznw$(this.hAxisLayout_0.orientation,0,l,t),p=a.tickLabelsBounds,h=c.left-p.left,_=p.left+p.width-c.right,d=o.left,f=o.width;h>0&&(d=o.left+h,f=o.width-h),_>0&&(f-=_);var m=f;f=lt.max(0,m);var $=Y(d,o.top,f,o.height);if(null!=$&&$.equals(o))n=$;else{var y=e.adjustGeomSize_3y20zv$(this.hDomain_0,this.vDomain_0,$.dimension);n=new H($.origin,y)}var g=n,v=wm().tileBounds_0(a.axisBounds(),s.axisBounds(),g),b=this.marginsLayout_0.toInnerBounds_wthzt5$(g),w=a.withAxisLength_14dthe$(b.width),x=s.withAxisLength_14dthe$(b.height);return new ef(u.Companion.ZERO,v,g,b,w,x,!0,!0,void 0,void 0,0)},vm.prototype.tileBounds_0=function(t,e,n){var i=new u(n.left-e.width,n.top-ym().GEOM_MARGIN),o=new u(n.right+ym().GEOM_MARGIN,n.bottom+t.height);return new H(i,o.subtract_gpjtzr$(i))},vm.prototype.computeAxisInfos_0=function(t,e,n,i,o,r,a){var s,l=Em().init_wmnv36$(t,e),u=r.toInnerSize_gpjtzr$(ym().geomOuterBounds_sy27u4$(l,n,i,o,r,a).dimension).y,c=l.layoutVAxis_3mogjz$(o,u),p=ym().geomOuterBounds_sy27u4$(c,n,i,o,r,a),h=r.toInnerBounds_wthzt5$(p).xRange(),_=c.layoutHAxis_g4u3p1$(i,n,h);if(_.hAxisThickness>l.hAxisThickness){var d=r.toInnerSize_gpjtzr$(ym().geomOuterBounds_sy27u4$(_,n,i,o,r,a).dimension).y;s=_.layoutVAxis_3mogjz$(o,d)}else s=_;return s},vm.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var bm=null;function wm(){return null===bm&&new vm,bm}function xm(t,e,n,i,o,r,a,s){Em(),Sm.call(this,t,e,n,i),this.hAxisLayout_0=o,this.vAxisLayout_0=r,this._hAxisInfo_0=a,this._vAxisInfo_0=s}function km(){Cm=this,this.AXIS_STRETCH_RATIO_0=.1}gm.$metadata$={kind:h,simpleName:"TopDownTileLayout",interfaces:[tf]},Object.defineProperty(xm.prototype,"hAxisThickness",{configurable:!0,get:function(){var t;return 1==(t=this.hAxisLayout_0.orientation===eh())?this.top:!1===t?this.bottom:e.noWhenBranchMatched()}}),Object.defineProperty(xm.prototype,"vAxisThickness",{configurable:!0,get:function(){var t;return 1==(t=this.vAxisLayout_0.orientation===Qp())?this.left:!1===t?this.right:e.noWhenBranchMatched()}}),Object.defineProperty(xm.prototype,"hAxisInfo",{configurable:!0,get:function(){var t;if(null==(t=this._hAxisInfo_0))throw p("Horizontal axis is not layouted");return t}}),Object.defineProperty(xm.prototype,"vAxisInfo",{configurable:!0,get:function(){var t;if(null==(t=this._vAxisInfo_0))throw p("Vertical axis is not layouted");return t}}),xm.prototype.subtractFrom_wthzt5$=function(t){var e=Sm.prototype.subtractFrom_wthzt5$.call(this,t),n=e.origin,i=e.width,o=ym().GEOM_MIN_SIZE.x,r=lt.max(i,o),a=e.height,s=ym().GEOM_MIN_SIZE.y;return new H(n,new u(r,lt.max(a,s)))},xm.prototype.layoutHAxis_g4u3p1$=function(t,e,n){var i=n.length,o=i*Em().AXIS_STRETCH_RATIO_0,r=ym().maxHAxisTickLabelsBounds_cvaznw$(this.hAxisLayout_0.orientation,o,n,e),a=this.hAxisLayout_0.doLayout_5wdni1$(t,i,r);return new xm(this.left,this.hAxisLayout_0.orientation===eh()?a.axisBounds().height:this.top,this.right,this.hAxisLayout_0.orientation===nh()?a.axisBounds().height:this.bottom,this.hAxisLayout_0,this.vAxisLayout_0,a,this._vAxisInfo_0)},xm.prototype.layoutVAxis_3mogjz$=function(t,e){var n=this.vAxisLayout_0.doLayout_5wdni1$(t,e,null);return new xm(this.vAxisLayout_0.orientation===Qp()?n.axisBounds().width:this.left,this.top,this.vAxisLayout_0.orientation===th()?n.axisBounds().width:this.right,this.bottom,this.hAxisLayout_0,this.vAxisLayout_0,this._hAxisInfo_0,n)},km.prototype.init_wmnv36$=function(t,e){return new xm(e.orientation===Qp()?e.initialThickness():ym().GEOM_MARGIN,t.orientation===eh()?t.initialThickness():ym().GEOM_MARGIN,e.orientation===th()?e.initialThickness():ym().GEOM_MARGIN,t.orientation===nh()?t.initialThickness():ym().GEOM_MARGIN,t,e,null,null)},km.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var Cm=null;function Em(){return null===Cm&&new km,Cm}function Sm(t,e,n,i){this.left=t,this.top=e,this.right=n,this.bottom=i}function Tm(t){void 0===t&&(t=1),this.defaultWidthFactor_0=t,this.familyByName_0=ft(),this.put_h6gg2f$("monospace",!0),this.put_h6gg2f$("Courier",!0),this.put_h6gg2f$("Consolas",!0),this.put_h6gg2f$("Fixed",!0),this.put_h6gg2f$("Fixedsys",!0),this.put_h6gg2f$("FreeMono",!0),this.put_h6gg2f$("Lucida Console",!0),this.put_h6gg2f$("Monaco",!0),this.put_h6gg2f$("Monofur",!0),this.put_h6gg2f$("OCR-A",!0),this.put_h6gg2f$("OCR-B",!0),this.put_h6gg2f$("Source Code Pro",!0)}function Om(){var t,e,n,i,o,r,a,s,l,c,p,h,_;Xm=this,this.ASPECT_RATIO=1.5,this.MIN_PLOT_WIDTH=50,this.DEF_PLOT_WIDTH=600,this.DEF_LIVE_MAP_WIDTH=800,this.DEF_PLOT_SIZE=new u(this.DEF_PLOT_WIDTH,this.DEF_PLOT_WIDTH/this.ASPECT_RATIO),this.DEF_LIVE_MAP_SIZE=new u(this.DEF_LIVE_MAP_WIDTH,this.DEF_LIVE_MAP_WIDTH/this.ASPECT_RATIO),this.DARK_GRAY="#3d3d3d",this.GRAY=K.Companion.GRAY.toHexColor(),this.LIGHT_GRAY=K.Companion.LIGHT_GRAY.toHexColor(),this.X_LIGHT_GRAY=K.Companion.VERY_LIGHT_GRAY.toHexColor(),this.XX_LIGHT_GRAY="#e0e0e0",this.TEXT_COLOR=K.Companion.parseHex_61zpoe$(this.DARK_GRAY),this.FONT_LARGE=16,this.FONT_MEDIUM=15,this.FONT_SMALL=13,this.FONT_FAMILY_NORMAL='"Lucida Grande", sans-serif',e=l$().PLOT_TITLE,t=Am().FONT_SIZE,n=E(e,this.createTextStyle_0(Tt.Companion.BOLD,t)),i=E(l$().PLOT_SUBTITLE,this.createTextStyle_0(void 0,Lm().FONT_SIZE)),o=E(l$().PLOT_CAPTION,this.createTextStyle_0(void 0,Mm().FONT_SIZE)),r=E(l$().LEGEND_TITLE,this.createTextStyle_0(void 0,Um().TITLE_FONT_SIZE)),a=E(l$().LEGEND_ITEM,this.createTextStyle_0(void 0,Um().ITEM_FONT_SIZE)),s=E(l$().TOOLTIP_TEXT,this.createTextStyle_0(void 0,Gm().DATA_TOOLTIP_FONT_SIZE)),c=l$().TOOLTIP_TITLE,l=Gm().DATA_TOOLTIP_FONT_SIZE,p=E(c,this.createTextStyle_0(Tt.Companion.BOLD,l)),_=l$().TOOLTIP_LABEL,h=Gm().DATA_TOOLTIP_FONT_SIZE,this.DEFAULT_TEXT_STYLES_8be2vx$=S([n,i,o,r,a,s,p,E(_,this.createTextStyle_0(Tt.Companion.BOLD,h)),E("axis-title-x",this.createTextStyle_0(void 0,Wm().TITLE_FONT_SIZE)),E("axis-title-y",this.createTextStyle_0(void 0,Wm().TITLE_FONT_SIZE)),E("axis-text-x",this.createTextStyle_0(void 0,Wm().TICK_FONT_SIZE)),E("axis-text-y",this.createTextStyle_0(void 0,Wm().TICK_FONT_SIZE)),E("axis-tooltip-text-x",this.createTextStyle_0(void 0,Gm().AXIS_TOOLTIP_FONT_SIZE,K.Companion.WHITE)),E("axis-tooltip-text-y",this.createTextStyle_0(void 0,Gm().AXIS_TOOLTIP_FONT_SIZE,K.Companion.WHITE)),E("facet-strip-text-x",this.createTextStyle_0(void 0,this.FONT_MEDIUM)),E("facet-strip-text-y",this.createTextStyle_0(void 0,this.FONT_MEDIUM))])}function Nm(){}function Pm(){Im=this,this.FONT_SIZE=Zm().FONT_LARGE,this.FONT_SIZE_CSS=J(this.FONT_SIZE)+"px"}xm.$metadata$={kind:h,simpleName:"GeomAreaInsets",interfaces:[Sm]},Sm.prototype.subtractFrom_wthzt5$=function(t){var e=new u(this.left,this.top),n=new u(this.right,this.bottom),i=t.dimension.subtract_gpjtzr$(e).subtract_gpjtzr$(n);return new H(t.origin.add_gpjtzr$(e),i)},Sm.$metadata$={kind:h,simpleName:"Insets",interfaces:[]},Tm.prototype.get_61zpoe$=function(t){var n,i,o=Gi(e.isCharSequence(n=t)?n:pt()).toString().toLowerCase(),r=this.familyByName_0,a=r.get_11rb$(o);if(null==a){var s=this.guessFamily_0(t);r.put_xwzc9p$(o,s),i=s}else i=a;return i},Tm.prototype.put_h6gg2f$=function(t,n,i){var o,r,a;void 0===n&&(n=null),void 0===i&&(i=null);var s=Gi(e.isCharSequence(a=t)?a:pt()).toString().toLowerCase(),l=this.familyByName_0.get_11rb$(s),u=null!=(o=null!=n?n:null!=l?l.monospaced:null)&&o,c=null!=(r=null!=i?i:null!=l?l.widthFactor:null)?r:this.defaultWidthFactor_0,p=this.familyByName_0,h=new St(t,u,c);p.put_xwzc9p$(s,h)},Tm.prototype.guessFamily_0=function(t){var n,i=Hi(Gi(e.isCharSequence(n=t)?n:pt()).toString().toLowerCase()," mono");return new St(t,i,this.defaultWidthFactor_0)},Tm.$metadata$={kind:h,simpleName:"DefaultFontFamilyRegistry",interfaces:[Jm]},Pm.$metadata$={kind:a,simpleName:"Title",interfaces:[]};var Im=null;function Am(){return null===Im&&new Pm,Im}function Rm(){jm=this,this.FONT_SIZE=Zm().FONT_MEDIUM,this.FONT_SIZE_CSS=J(this.FONT_SIZE)+"px"}Rm.$metadata$={kind:a,simpleName:"Subtitle",interfaces:[]};var jm=null;function Lm(){return null===jm&&new Rm,jm}function zm(){Dm=this,this.FONT_SIZE=Zm().FONT_SMALL,this.FONT_SIZE_CSS=J(this.FONT_SIZE)+"px"}zm.$metadata$={kind:a,simpleName:"Caption",interfaces:[]};var Dm=null;function Mm(){return null===Dm&&new zm,Dm}function Bm(){Fm=this,this.TITLE_FONT_SIZE=Zm().FONT_MEDIUM,this.ITEM_FONT_SIZE=Zm().FONT_SMALL}Bm.$metadata$={kind:a,simpleName:"Legend",interfaces:[]};var Fm=null;function Um(){return null===Fm&&new Bm,Fm}function qm(){Hm=this,this.MAX_POINTER_FOOTING_LENGTH=12,this.POINTER_FOOTING_TO_SIDE_LENGTH_RATIO=.4,this.MARGIN_BETWEEN_TOOLTIPS=5,this.DATA_TOOLTIP_FONT_SIZE=Zm().FONT_SMALL,this.LINE_INTERVAL=6,this.INTERVAL_BETWEEN_SUBSTRINGS=3,this.H_CONTENT_PADDING=6,this.V_CONTENT_PADDING=6,this.CONTENT_EXTENDED_PADDING=10,this.LABEL_VALUE_INTERVAL=8,this.VALUE_LINE_MAX_LENGTH=30,this.LINE_SEPARATOR_WIDTH=.7,this.BORDER_RADIUS=4,this.COLOR_BAR_WIDTH=4,this.COLOR_BAR_STROKE_WIDTH=1.5,this.DARK_TEXT_COLOR=K.Companion.BLACK,this.LIGHT_TEXT_COLOR=K.Companion.WHITE,this.AXIS_TOOLTIP_FONT_SIZE=Wm().TICK_FONT_SIZE,this.AXIS_TOOLTIP_COLOR=Wm().LINE_COLOR,this.AXIS_RADIUS=1.5,this.ROTATION_ANGLE=15}qm.$metadata$={kind:a,simpleName:"Tooltip",interfaces:[]};var Hm=null;function Gm(){return null===Hm&&new qm,Hm}function Km(){}function Vm(){Ym=this,this.TITLE_FONT_SIZE=Zm().FONT_MEDIUM,this.TICK_FONT_SIZE=Zm().FONT_SMALL,this.LINE_COLOR=K.Companion.parseHex_61zpoe$(Zm().DARK_GRAY)}Nm.$metadata$={kind:h,simpleName:"Common",interfaces:[]},Vm.$metadata$={kind:a,simpleName:"Axis",interfaces:[]};var Ym=null;function Wm(){return null===Ym&&new Vm,Ym}Km.$metadata$={kind:h,simpleName:"Plot",interfaces:[]},Om.prototype.createTextStyle_0=function(t,e,n){return void 0===t&&(t=Tt.Companion.NORMAL),void 0===e&&(e=this.FONT_MEDIUM),void 0===n&&(n=K.Companion.BLACK),new Ct(this.FONT_FAMILY_NORMAL,t,e,n)},Om.$metadata$={kind:a,simpleName:"Defaults",interfaces:[]};var Xm=null;function Zm(){return null===Xm&&new Om,Xm}function Jm(){}function Qm(){}function t$(t){o$(),this.font_dkwnk1$_0=t}function e$(){i$=this,this.FONT_SIZE_TO_GLYPH_WIDTH_RATIO_0=.67,this.FONT_SIZE_TO_GLYPH_WIDTH_RATIO_MONOSPACED_0=.6,this.FONT_WEIGHT_BOLD_TO_NORMAL_WIDTH_RATIO_0=1.075,this.LABEL_PADDING_0=0,this.FONT_WIDTH_SCALE_FACTOR_0=.85026,this.DUMMY=new n$}function n$(){}Jm.$metadata$={kind:d,simpleName:"FontFamilyRegistry",interfaces:[]},Qm.$metadata$={kind:d,simpleName:"LabelSpec",interfaces:[]},Object.defineProperty(t$.prototype,"font",{get:function(){return this.font_dkwnk1$_0}}),t$.prototype.dimensions_61zpoe$=function(t){return new u(this.width_61zpoe$(t),this.height())},t$.prototype.width_61zpoe$=function(t){return(this.font.isMonospased?this.monospacedWidth_0(t.length):o$().FONT_WIDTH_SCALE_FACTOR_0*p$().textWidth_d91ba$(t,this.font))*this.font.family.widthFactor},t$.prototype.monospacedWidth_0=function(t){var e=o$().FONT_SIZE_TO_GLYPH_WIDTH_RATIO_MONOSPACED_0,n=t*this.font.size*e+2*o$().LABEL_PADDING_0;return this.font.isBold?n*o$().FONT_WEIGHT_BOLD_TO_NORMAL_WIDTH_RATIO_0:n},t$.prototype.height=function(){return this.font.size+2*o$().LABEL_PADDING_0},Object.defineProperty(n$.prototype,"font",{configurable:!0,get:function(){return wn("Dummy Label Spec")}}),n$.prototype.dimensions_61zpoe$=function(t){wn("Dummy Label Spec")},n$.prototype.width_61zpoe$=function(t){wn("Dummy Label Spec")},n$.prototype.height=function(){wn("Dummy Label Spec")},n$.$metadata$={kind:h,interfaces:[Qm]},e$.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var i$=null;function o$(){return null===i$&&new e$,i$}function r$(){s$=this,this.PLOT_CONTAINER="plt-container",this.PLOT_TITLE="plot-title",this.PLOT_SUBTITLE="plot-subtitle",this.PLOT_CAPTION="plot-caption",this.AXIS_TITLE="axis-title",this.AXIS_TEXT="axis-text",this.LEGEND_TITLE="legend-title",this.LEGEND_ITEM="legend-item",this.TOOLTIP_TEXT="tooltip-text",this.TOOLTIP_TITLE="tooltip-title",this.TOOLTIP_LABEL="tooltip-label",this.AXIS_TOOLTIP_TEXT="axis-tooltip-text",this.FACET_STRIP_TEXT="facet-strip-text",this.CSS_0=yn("\n |."+this.PLOT_CONTAINER+" {\n | font-family: "+Zm().FONT_FAMILY_NORMAL+";\n | user-select: none;\n | -webkit-user-select: none;\n | -moz-user-select: none;\n | -ms-user-select: none;\n |}\n |text {\n | fill: "+Vi.Companion.UNDEFINED_FONT_COLOR.toHexColor()+";\n | "+Vi.Companion.toCSS_t8jpc2$(Vi.Companion.UNDEFINED_FONT_FACE)+" \n |\n | text-rendering: optimizeLegibility;\n |}\n ")}function a$(t){return new Ct(t.family.name,t.face,t.size,t.color)}t$.$metadata$={kind:h,simpleName:"PlotLabelSpec",interfaces:[Qm]},r$.prototype.generateCSS_kgh34e$=function(t,e,n){var i,o=new Ki(this.CSS_0);for(o.append_s8itvh$(10),i=t.getClasses().iterator();i.hasNext();){var r,a=i.next();switch(a){case"tooltip-text":case"tooltip-title":case"tooltip-label":case"axis-tooltip-text-x":case"axis-tooltip-text-y":r=n;break;default:r=e}var s=r;o.append_pdl1vj$(t.toCSS_jyasbz$(a,s))}return o.toString()},r$.prototype.default=function(){return new Vi(Zm().DEFAULT_TEXT_STYLES_8be2vx$,Zm().FONT_FAMILY_NORMAL)},r$.prototype.fromTheme_1crrl9$=function(t,e){var n=t.horizontalAxis_6taknv$(e),i=e?"y":"x",o=t.verticalAxis_6taknv$(e),r=e?"x":"y",a=a$,s=S([E(this.PLOT_TITLE,a(t.plot().titleStyle())),E(this.PLOT_SUBTITLE,a(t.plot().subtitleStyle())),E(this.PLOT_CAPTION,a(t.plot().captionStyle())),E(this.LEGEND_TITLE,a(t.legend().titleStyle())),E(this.LEGEND_ITEM,a(t.legend().textStyle())),E(this.AXIS_TITLE+"-"+i,a(n.titleStyle())),E(this.AXIS_TEXT+"-"+i,a(n.labelStyle())),E(this.AXIS_TOOLTIP_TEXT+"-"+i,a(n.tooltipTextStyle())),E(this.AXIS_TITLE+"-"+r,a(o.titleStyle())),E(this.AXIS_TEXT+"-"+r,a(o.labelStyle())),E(this.AXIS_TOOLTIP_TEXT+"-"+r,a(o.tooltipTextStyle())),E("facet-strip-text-x",a(t.facets().stripTextStyle())),E("facet-strip-text-y",a(t.facets().stripTextStyle())),E(this.TOOLTIP_TEXT,a(t.tooltips().textStyle())),E(this.TOOLTIP_TITLE,a(t.tooltips().titleStyle())),E(this.TOOLTIP_LABEL,a(t.tooltips().labelStyle()))]);return new Vi(s,Zm().FONT_FAMILY_NORMAL)},r$.$metadata$={kind:a,simpleName:"Style",interfaces:[]};var s$=null;function l$(){return null===s$&&new r$,s$}function u$(){c$=this,this.DEFAULT_CHAR_WIDTH_0=12.327791262135923,this.DEFAULT_FAMILY_0="Lucida Grande",this.DEFAULT_FONT_SIZE_0=14,this.MISCLASSIFIED_0=X([Yi(45),Yi(47),Yi(92),Yi(124)]),this.CLUSTERS_0=X([X([Yi(32),Yi(184),Yi(183),Yi(341),Yi(180),Yi(179),Yi(178),Yi(343),Yi(176),Yi(345),Yi(170),Yi(168),Yi(166),Yi(185),Yi(355),Yi(123),Yi(357),Yi(359),Yi(116),Yi(114),Yi(108),Yi(106),Yi(105),Yi(102),Yi(96),Yi(93),Yi(125),Yi(186),Yi(1110),Yi(239),Yi(238),Yi(237),Yi(236),Yi(296),Yi(297),Yi(298),Yi(299),Yi(300),Yi(301),Yi(302),Yi(303),Yi(1107),Yi(304),Yi(309),Yi(314),Yi(316),Yi(318),Yi(320),Yi(322),Yi(207),Yi(206),Yi(205),Yi(204),Yi(1112),Yi(1111),Yi(305),Yi(91),Yi(161),Yi(44),Yi(46),Yi(73),Yi(41),Yi(40),Yi(39),Yi(1031),Yi(1030),Yi(34),Yi(33),Yi(74),Yi(1075),Yi(539),Yi(58),Yi(567),Yi(383),Yi(59)]),V(this.MISCLASSIFIED_0,X([Yi(463),Yi(328),Yi(311),Yi(326),Yi(312),Yi(1118),Yi(313),Yi(523),Yi(315),Yi(529),Yi(317),Yi(324),Yi(1119),Yi(449),Yi(451),Yi(319),Yi(464),Yi(321),Yi(537),Yi(531),Yi(1080),Yi(307),Yi(263),Yi(1171),Yi(265),Yi(267),Yi(1169),Yi(269),Yi(1168),Yi(273),Yi(275),Yi(277),Yi(279),Yi(1160),Yi(281),Yi(283),Yi(285),Yi(287),Yi(289),Yi(496),Yi(507),Yi(291),Yi(293),Yi(295),Yi(511),Yi(520),Yi(521),Yi(522),Yi(1116),Yi(308),Yi(1115),Yi(335),Yi(448),Yi(1094),Yi(1072),Yi(1093),Yi(361),Yi(1091),Yi(1073),Yi(363),Yi(1074),Yi(1090),Yi(365),Yi(1089),Yi(367),Yi(1088),Yi(369),Yi(1076),Yi(1077),Yi(1087),Yi(371),Yi(1079),Yi(1086),Yi(1085),Yi(375),Yi(1083),Yi(1082),Yi(378),Yi(1081),Yi(382),Yi(402),Yi(331),Yi(1047),Yi(407),Yi(333),Yi(380),Yi(337),Yi(1109),Yi(1108),Yi(564),Yi(566),Yi(585),Yi(429),Yi(427),Yi(1106),Yi(426),Yi(589),Yi(1027),Yi(1105),Yi(1032),Yi(347),Yi(1103),Yi(1043),Yi(349),Yi(1101),Yi(351),Yi(1100),Yi(353),Yi(410),Yi(261),Yi(1095),Yi(406),Yi(259),Yi(1161),Yi(57),Yi(163),Yi(164),Yi(165),Yi(167),Yi(171),Yi(175),Yi(177),Yi(181),Yi(182),Yi(162),Yi(187),Yi(191),Yi(56),Yi(1216),Yi(55),Yi(54),Yi(53),Yi(1197),Yi(52),Yi(51),Yi(1231),Yi(122),Yi(121),Yi(120),Yi(1271),Yi(1275),Yi(70),Yi(63),Yi(94),Yi(95),Yi(97),Yi(98),Yi(99),Yi(100),Yi(101),Yi(103),Yi(104),Yi(107),Yi(110),Yi(111),Yi(112),Yi(113),Yi(115),Yi(117),Yi(118),Yi(50),Yi(49),Yi(76),Yi(243),Yi(233),Yi(234),Yi(42),Yi(235),Yi(255),Yi(240),Yi(241),Yi(254),Yi(242),Yi(232),Yi(253),Yi(1181),Yi(251),Yi(244),Yi(245),Yi(246),Yi(250),Yi(247),Yi(36),Yi(248),Yi(252),Yi(231),Yi(249),Yi(223),Yi(257),Yi(48),Yi(229),Yi(227),Yi(228),Yi(1179),Yi(224),Yi(226),Yi(225)])),X([Yi(1325),Yi(1040),Yi(1041),Yi(1025),Yi(1042),Yi(1277),Yi(494),Yi(501),Yi(576),Yi(1038),Yi(577),Yi(1279),Yi(591),Yi(1287),Yi(1281),Yi(1293),Yi(505),Yi(587),Yi(1036),Yi(1028),Yi(1280),Yi(1297),Yi(495),Yi(584),Yi(583),Yi(578),Yi(1029),Yi(1296),Yi(527),Yi(575),Yi(553),Yi(551),Yi(549),Yi(548),Yi(547),Yi(546),Yi(1044),Yi(543),Yi(540),Yi(538),Yi(536),Yi(535),Yi(533),Yi(525),Yi(541),Yi(555),Yi(557),Yi(559),Yi(1321),Yi(574),Yi(513),Yi(515),Yi(573),Yi(572),Yi(517),Yi(519),Yi(1299),Yi(1319),Yi(1307),Yi(1311),Yi(563),Yi(1317),Yi(561),Yi(506),Yi(1176),Yi(1084),Yi(1274),Yi(1187),Yi(1193),Yi(1195),Yi(1196),Yi(1198),Yi(1199),Yi(1200),Yi(1185),Yi(1201),Yi(1205),Yi(1207),Yi(1209),Yi(1211),Yi(1117),Yi(1213),Yi(1215),Yi(1203),Yi(1183),Yi(1123),Yi(1182),Yi(1173),Yi(1178),Yi(1170),Yi(1167),Yi(1165),Yi(1164),Yi(1163),Yi(493),Yi(1154),Yi(1153),Yi(1143),Yi(1141),Yi(1139),Yi(1135),Yi(1134),Yi(1127),Yi(1180),Yi(1220),Yi(1045),Yi(1222),Yi(1226),Yi(1267),Yi(1269),Yi(1071),Yi(1069),Yi(1068),Yi(1063),Yi(1061),Yi(1265),Yi(1059),Yi(1057),Yi(1056),Yi(1055),Yi(1053),Yi(1270),Yi(1051),Yi(1050),Yi(1058),Yi(1263),Yi(1261),Yi(1259),Yi(1228),Yi(1233),Yi(1235),Yi(1239),Yi(1104),Yi(1241),Yi(1243),Yi(1098),Yi(1246),Yi(1247),Yi(1248),Yi(1177),Yi(1249),Yi(1251),Yi(1253),Yi(1255),Yi(1257),Yi(1224),Yi(491),Yi(1327),Yi(489),Yi(432),Yi(430),Yi(222),Yi(356),Yi(358),Yi(425),Yi(172),Yi(360),Yi(221),Yi(192),Yi(362),Yi(193),Yi(421),Yi(364),Yi(424),Yi(194),Yi(354),Yi(352),Yi(88),Yi(441),Yi(440),Yi(346),Yi(89),Yi(348),Yi(256),Yi(90),Yi(438),Yi(437),Yi(436),Yi(258),Yi(350),Yi(126),Yi(439),Yi(217),Yi(366),Yi(195),Yi(381),Yi(401),Yi(384),Yi(400),Yi(209),Yi(397),Yi(203),Yi(396),Yi(395),Yi(386),Yi(387),Yi(388),Yi(215),Yi(389),Yi(218),Yi(417),Yi(379),Yi(377),Yi(368),Yi(196),Yi(370),Yi(220),Yi(197),Yi(219),Yi(202),Yi(414),Yi(374),Yi(411),Yi(409),Yi(200),Yi(376),Yi(201),Yi(199),Yi(443),Yi(442),Yi(444),Yi(271),Yi(470),Yi(344),Yi(67),Yi(472),Yi(310),Yi(474),Yi(66),Yi(476),Yi(274),Yi(477),Yi(276),Yi(65),Yi(69),Yi(479),Yi(278),Yi(280),Yi(282),Yi(481),Yi(61),Yi(60),Yi(294),Yi(292),Yi(43),Yi(38),Yi(485),Yi(487),Yi(35),Yi(62),Yi(323),Yi(392),Yi(325),Yi(450),Yi(340),Yi(260),Yi(446),Yi(84),Yi(86),Yi(468),Yi(83),Yi(262),Yi(82),Yi(445),Yi(85),Yi(266),Yi(264),Yi(80),Yi(268),Yi(78),Yi(342),Yi(329),Yi(462),Yi(75),Yi(466),Yi(327),Yi(72),Yi(457),Yi(447)]),X([Yi(1146),Yi(286),Yi(1186),Yi(1147),Yi(1175),Yi(1149),Yi(1151),Yi(1152),Yi(284),Yi(1172),Yi(1162),Yi(230),Yi(270),Yi(1166),Yi(1184),Yi(272),Yi(1223),Yi(1192),Yi(1260),Yi(1262),Yi(1264),Yi(1266),Yi(81),Yi(1268),Yi(79),Yi(1273),Yi(77),Yi(1276),Yi(1278),Yi(71),Yi(68),Yi(1285),Yi(1286),Yi(1292),Yi(1294),Yi(1324),Yi(1320),Yi(1318),Yi(1316),Yi(1315),Yi(1310),Yi(1258),Yi(1309),Yi(1305),Yi(1303),Yi(1302),Yi(1301),Yi(1298),Yi(1295),Yi(1306),Yi(1256),Yi(1254),Yi(1252),Yi(1214),Yi(1212),Yi(1210),Yi(1208),Yi(1206),Yi(208),Yi(1218),Yi(1202),Yi(211),Yi(212),Yi(213),Yi(214),Yi(1194),Yi(216),Yi(210),Yi(1189),Yi(1219),Yi(1142),Yi(1250),Yi(109),Yi(119),Yi(1245),Yi(169),Yi(1242),Yi(1221),Yi(1240),Yi(1238),Yi(1234),Yi(1232),Yi(1230),Yi(1227),Yi(1225),Yi(174),Yi(288),Yi(1122),Yi(290),Yi(552),Yi(554),Yi(556),Yi(558),Yi(560),Yi(562),Yi(565),Yi(570),Yi(571),Yi(435),Yi(434),Yi(433),Yi(579),Yi(580),Yi(550),Yi(581),Yi(431),Yi(586),Yi(428),Yi(1140),Yi(588),Yi(590),Yi(1024),Yi(423),Yi(1026),Yi(422),Yi(420),Yi(419),Yi(1035),Yi(416),Yi(582),Yi(1037),Yi(456),Yi(544),Yi(492),Yi(488),Yi(486),Yi(500),Yi(484),Yi(503),Yi(504),Yi(509),Yi(510),Yi(480),Yi(512),Yi(514),Yi(1326),Yi(516),Yi(545),Yi(518),Yi(473),Yi(524),Yi(471),Yi(526),Yi(528),Yi(469),Yi(530),Yi(532),Yi(467),Yi(534),Yi(465),Yi(461),Yi(460),Yi(542),Yi(475),Yi(415),Yi(478),Yi(490),Yi(1062),Yi(394),Yi(1125),Yi(1126),Yi(1066),Yi(306),Yi(393),Yi(1039),Yi(1102),Yi(1130),Yi(1121),Yi(1097),Yi(391),Yi(1096),Yi(390),Yi(385),Yi(1078),Yi(373),Yi(1131),Yi(1092),Yi(1099),Yi(398),Yi(1060),Yi(336),Yi(413),Yi(1138),Yi(408),Yi(330),Yi(1114),Yi(1048),Yi(399),Yi(404),Yi(1049),Yi(1113),Yi(332),Yi(1137),Yi(1052),Yi(1136),Yi(1054),Yi(334),Yi(403),Yi(1129)]),X([Yi(1128),Yi(1291),Yi(1290),Yi(1289),Yi(1124),Yi(1288),Yi(64),Yi(198),Yi(1132),Yi(1144),Yi(1323),Yi(1322),Yi(37),Yi(1145),Yi(497),Yi(498),Yi(499),Yi(1314),Yi(1313),Yi(1312),Yi(502),Yi(1148),Yi(1133),Yi(1308),Yi(483),Yi(482),Yi(1304),Yi(1150),Yi(1300),Yi(508),Yi(459),Yi(1284),Yi(1244),Yi(1065),Yi(1064),Yi(1236),Yi(188),Yi(189),Yi(190),Yi(1067),Yi(1204),Yi(405),Yi(418),Yi(1033),Yi(1034),Yi(1046),Yi(412),Yi(1217),Yi(1229),Yi(1120),Yi(1191),Yi(1070),Yi(1283),Yi(1282),Yi(1174),Yi(338),Yi(339),Yi(1272),Yi(458),Yi(1190),Yi(455),Yi(453),Yi(452),Yi(372),Yi(87),Yi(1188),Yi(568),Yi(569),Yi(454),Yi(1237)])]);var t,e,n=this.CLUSTERS_0,i=_t(ht(n,10)),o=0;for(t=n.iterator();t.hasNext();){var r,a=t.next(),s=i.add_11rb$,l=me((o=(e=o)+1|0,e)),u=_t(ht(a,10));for(r=a.iterator();r.hasNext();){var p=r.next();u.add_11rb$(new c(l,p))}s.call(i,u)}var h,_=rt(i),d=Gt(N(ht(_,10)),16),f=P(d);for(h=_.iterator();h.hasNext();){var m=h.next(),$=E(m.second,m.first);f.put_xwzc9p$($.first,$.second)}this.CLUSTERING_0=f,this.CLUSTER_WIDTH_0=X([6.440506329113925,10.181218274111677,12.583512544802868,14.536683417085428,17.714285714285715]),this.FAMILY_COEFFICIENT_0=S([E("Arial",.08777509389956582),E("Calibri",-.7568924686338481),E("Garamond",-1.2341292120659895),E("Geneva",.08777509389956582),E("Georgia",.06628876951083008),E("Helvetica",.08777509389956582),E("Lucida Grande",.08777509389956582),E("Rockwell",.41710660522332965),E("Times New Roman",-1.2007569745330333),E("Verdana",1.3042084025015728)]),this.SIZE_COEFFICIENT_0=.9843304096547842}u$.prototype.getCharWidth_0=function(t){var e,n=this.CLUSTERING_0,i=Yi(t),o=null!=(e=n.get_11rb$(i))?e:-1;return-1!==o?this.CLUSTER_WIDTH_0.get_za3lpa$(o):this.DEFAULT_CHAR_WIDTH_0},u$.prototype.getFamilyAdditive_0=function(t){var e,n,i=t.family.toString(),o=null!=(e=this.FAMILY_COEFFICIENT_0.get_11rb$(this.DEFAULT_FAMILY_0))?e:0;return null!=(n=this.FAMILY_COEFFICIENT_0.get_11rb$(i))?n:o},u$.prototype.getFaceAdditive_0=function(t){return t.isBold&&t.isItalic?.9172120995070999:t.isBold&&!t.isItalic?.6908238890181602:!t.isBold&&t.isItalic?.1783188620736738:0},u$.prototype.getSizeCoefficient_0=function(t){return this.SIZE_COEFFICIENT_0*t.size/14},u$.prototype.correctPrediction_0=function(t,e,n){return(t+e*(this.getFamilyAdditive_0(n)+this.getFaceAdditive_0(n)))*this.getSizeCoefficient_0(n)},u$.prototype.textWidth_d91ba$=function(t,e){if(0===t.length)return 0;var n,i=y("getCharWidth",function(t,e){return t.getCharWidth_0(Wi(e))}.bind(null,this)),o=_t(t.length);for(n=Zi(t);n.hasNext();){var r=Wi(n.next());o.add_11rb$(i(Yi(r)))}return this.correctPrediction_0(Xi(o),t.length,e)},u$.$metadata$={kind:a,simpleName:"TextWidthEstimator",interfaces:[]};var c$=null;function p$(){return null===c$&&new u$,c$}function h$(){}function _$(){}function d$(){}function f$(){$$=this,this.RANDOM=j$().ALIAS,this.PICK=P$().ALIAS,this.SYSTEMATIC=X$().ALIAS,this.RANDOM_GROUP=w$().ALIAS,this.SYSTEMATIC_GROUP=S$().ALIAS,this.RANDOM_STRATIFIED=F$().ALIAS_8be2vx$,this.VERTEX_VW=ey().ALIAS,this.VERTEX_DP=ry().ALIAS,this.NONE=new m$}function m$(){}h$.$metadata$={kind:d,simpleName:"GroupAwareSampling",interfaces:[d$]},_$.$metadata$={kind:d,simpleName:"PointSampling",interfaces:[d$]},d$.$metadata$={kind:d,simpleName:"Sampling",interfaces:[]},f$.prototype.random_280ow0$=function(t,e){return new I$(t,e)},f$.prototype.pick_za3lpa$=function(t){return new T$(t)},f$.prototype.vertexDp_za3lpa$=function(t){return new ny(t)},f$.prototype.vertexVw_za3lpa$=function(t){return new J$(t)},f$.prototype.systematic_za3lpa$=function(t){return new V$(t)},f$.prototype.randomGroup_280ow0$=function(t,e){return new g$(t,e)},f$.prototype.systematicGroup_za3lpa$=function(t){return new k$(t)},f$.prototype.randomStratified_vcwos1$=function(t,e,n){return new L$(t,e,n)},Object.defineProperty(m$.prototype,"expressionText",{configurable:!0,get:function(){return"none"}}),m$.prototype.isApplicable_dhhkv7$=function(t){return!1},m$.prototype.apply_dhhkv7$=function(t){return t},m$.$metadata$={kind:h,simpleName:"NoneSampling",interfaces:[_$]},f$.$metadata$={kind:a,simpleName:"Samplings",interfaces:[]};var $$=null;function y$(){return null===$$&&new f$,$$}function g$(t,e){w$(),x$.call(this,t),this.mySeed_0=e}function v$(){b$=this,this.ALIAS="group_random"}Object.defineProperty(g$.prototype,"expressionText",{configurable:!0,get:function(){return"sampling_"+w$().ALIAS+"(n="+J(this.sampleSize)+(null!=this.mySeed_0?", seed="+J(this.mySeed_0):"")+")"}}),g$.prototype.apply_se5qvl$=function(t,e){if(!this.isApplicable_se5qvl$(t,e))throw Kt("Failed requirement.".toString());var n=K$().distinctGroups_ejae6o$(e,t.rowCount());Ji(n,this.createRandom_0());var i=g(ei(n,this.sampleSize));return this.doSelect_z69lec$(t,i,e)},g$.prototype.createRandom_0=function(){var t,e;return null!=(e=null!=(t=this.mySeed_0)?Qi(t):null)?e:to.Default},v$.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var b$=null;function w$(){return null===b$&&new v$,b$}function x$(t){U$.call(this,t)}function k$(t){S$(),x$.call(this,t)}function C$(){E$=this,this.ALIAS="group_systematic"}g$.$metadata$={kind:h,simpleName:"GroupRandomSampling",interfaces:[x$]},x$.prototype.isApplicable_se5qvl$=function(t,e){return this.isApplicable_ijg2gx$(t,e,K$().groupCount_ejae6o$(e,t.rowCount()))},x$.prototype.isApplicable_ijg2gx$=function(t,e,n){return n>this.sampleSize},x$.prototype.doSelect_z69lec$=function(t,e,n){var i,o=eu().indicesByGroup_wc9gac$(t.rowCount(),n),r=l();for(i=e.iterator();i.hasNext();){var a=i.next();r.addAll_brywnq$(W(o.get_11rb$(a)))}return t.selectIndices_pqoyrt$(r)},x$.$metadata$={kind:h,simpleName:"GroupSamplingBase",interfaces:[h$,U$]},Object.defineProperty(k$.prototype,"expressionText",{configurable:!0,get:function(){return"sampling_"+S$().ALIAS+"(n="+J(this.sampleSize)+")"}}),k$.prototype.isApplicable_ijg2gx$=function(t,e,n){return x$.prototype.isApplicable_ijg2gx$.call(this,t,e,n)&&X$().computeStep_vux9f0$(n,this.sampleSize)>=2},k$.prototype.apply_se5qvl$=function(t,e){if(!this.isApplicable_se5qvl$(t,e))throw Kt("Failed requirement.".toString());for(var n=K$().distinctGroups_ejae6o$(e,t.rowCount()),i=X$().computeStep_vux9f0$(n.size,this.sampleSize),o=Oi(),r=0;rthis.sampleSize},L$.prototype.apply_se5qvl$=function(t,e){var n,i,o,r,a;if(!this.isApplicable_se5qvl$(t,e))throw Kt("Failed requirement.".toString());var s=eu().indicesByGroup_wc9gac$(t.rowCount(),e),u=null!=(n=this.myMinSubsampleSize_0)?n:2,c=u;u=lt.max(0,c);var p=t.rowCount(),h=l(),_=null!=(o=null!=(i=this.mySeed_0)?Qi(i):null)?o:to.Default;for(r=s.keys.iterator();r.hasNext();){var d=r.next(),f=W(s.get_11rb$(d)),$=f.size,y=$/p,g=At(eo(this.sampleSize*y)),v=g,b=u;if((g=lt.max(v,b))>=$)h.addAll_brywnq$(f);else for(a=m.SamplingUtil.sampleWithoutReplacement_o7ew15$($,g,_,z$(f),D$(f)).iterator();a.hasNext();){var w=a.next();h.add_11rb$(f.get_za3lpa$(w))}}return t.selectIndices_pqoyrt$(h)},M$.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var B$=null;function F$(){return null===B$&&new M$,B$}function U$(t){if(this.sampleSize=t,!(this.sampleSize>0)){var e="Sample size must be greater than zero, but was: "+J(this.sampleSize);throw p(e.toString())}}L$.$metadata$={kind:h,simpleName:"RandomStratifiedSampling",interfaces:[h$,U$]},U$.prototype.isApplicable_dhhkv7$=function(t){return t.rowCount()>this.sampleSize},U$.$metadata$={kind:h,simpleName:"SamplingBase",interfaces:[d$]};var q$=be((function(){var t=e.kotlin.comparisons.compareValues_s00gnj$;return function(e){return function(n,i){var o=e;return t(o(n),o(i))}}}));function H$(){G$=this}H$.prototype.groupCount_ejae6o$=function(t,e){var n,i=ne(0,e),o=_t(ht(i,10));for(n=i.iterator();n.hasNext();){var r=n.next();o.add_11rb$(t(r))}return oe(o).size},H$.prototype.distinctGroups_ejae6o$=function(t,e){var n,i=ne(0,e),o=_t(ht(i,10));for(n=i.iterator();n.hasNext();){var r=n.next();o.add_11rb$(t(r))}return ci(oe(o))},H$.prototype.xVar_bbyvt0$=function(t){return t.contains_11rb$(Ft.Stats.X)?Ft.Stats.X:t.contains_11rb$(yt.TransformVar.X)?yt.TransformVar.X:null},H$.prototype.xVar_dhhkv7$=function(t){var e;if(null==(e=this.xVar_bbyvt0$(t.variables())))throw p("Can't apply sampling: couldn't deduce the (X) variable.");return e},H$.prototype.yVar_dhhkv7$=function(t){if(t.has_8xm3sj$(Ft.Stats.Y))return Ft.Stats.Y;if(t.has_8xm3sj$(yt.TransformVar.Y))return yt.TransformVar.Y;throw p("Can't apply sampling: couldn't deduce the (Y) variable.")},H$.prototype.splitRings_dhhkv7$=function(t){for(var n,i,o=l(),r=null,a=-1,s=new ay(e.isType(n=t.get_8xm3sj$(this.xVar_dhhkv7$(t)),ae)?n:pt(),e.isType(i=t.get_8xm3sj$(this.yVar_dhhkv7$(t)),ae)?i:pt()),u=0;u!==s.size;++u){var c=s.get_za3lpa$(u);a<0?(a=u,r=c):mt(r,c)&&(o.add_11rb$(s.subList_vux9f0$(a,u+1|0)),a=-1,r=null)}return a>=0&&o.add_11rb$(s.subList_vux9f0$(a,s.size)),o},H$.prototype.calculateRingLimits_rmr3bv$=function(t,e){var n,i=_t(ht(t,10));for(n=t.iterator();n.hasNext();){var o=n.next();i.add_11rb$(Ai(o))}var r,a,s=Xi(i),l=new no(0),u=new io(0);return uo(ro(so(ro(so(ro(oo(ye(t)),(a=t,function(t){return new c(t,Ai(a.get_za3lpa$(t)))})),ao(new we(q$((r=this,function(t){return r.getRingArea_0(t)}))))),function(t,e,n,i,o,r){return function(a){var s=lo(a.second/(t-e.get())*(n-i.get()|0)),l=o.get_za3lpa$(r.getRingIndex_6gxk4o$(a)).size,u=lt.min(s,l);return u>=4?(e.getAndAdd_14dthe$(r.getRingArea_0(a)),i.getAndAdd_za3lpa$(u)):u=0,new c(r.getRingIndex_6gxk4o$(a),u)}}(s,l,e,u,t,this)),new we(q$(function(t){return function(e){return t.getRingIndex_6gxk4o$(e)}}(this)))),function(t){return function(e){return t.getRingLimit_5q1b6w$(e)}}(this)))},H$.prototype.getRingIndex_6gxk4o$=function(t){return t.first},H$.prototype.getRingArea_0=function(t){return t.second},H$.prototype.getRingLimit_5q1b6w$=function(t){return t.second},H$.$metadata$={kind:a,simpleName:"SamplingUtil",interfaces:[]};var G$=null;function K$(){return null===G$&&new H$,G$}function V$(t){X$(),U$.call(this,t)}function Y$(){W$=this,this.ALIAS="systematic"}Object.defineProperty(V$.prototype,"expressionText",{configurable:!0,get:function(){return"sampling_"+X$().ALIAS+"(n="+J(this.sampleSize)+")"}}),V$.prototype.isApplicable_dhhkv7$=function(t){return U$.prototype.isApplicable_dhhkv7$.call(this,t)&&this.computeStep_0(t.rowCount())>=2},V$.prototype.apply_dhhkv7$=function(t){if(!this.isApplicable_dhhkv7$(t))throw Kt("Failed requirement.".toString());for(var e=t.rowCount(),n=this.computeStep_0(e),i=l(),o=0;o180&&(_>=h?h+=360:_+=360)}return a=t,s=o,l=f.Mappers.linear_nhuomk$(t,h,_,null),u=f.Mappers.linear_nhuomk$(t,d,m,null),c=f.Mappers.linear_nhuomk$(t,e.v,n.v,null),p=r,function(t){if(null!=t&&a.contains_14dthe$(t)){var e=W(l.invoke_yrwdxb$(t))%360,n=e>=0?e:360+e,i=W(u.invoke_yrwdxb$(t)),o=W(c.invoke_yrwdxb$(t));return Kn.Colors.rgbFromHsv_6y0v78$(n,i,o,p)}return s}},By.$metadata$={kind:a,simpleName:"ColorMapper",interfaces:[]};var Fy=null;function Uy(){return null===Fy&&new By,Fy}function qy(t,e,n){Py.call(this,t,!1),this.breaks_3tqv0$_0=e,this.formatter_dkp6z6$_0=n}function Hy(){Vy=this,this.IDENTITY=new Py(f.Mappers.IDENTITY,!1),this.NUMERIC_UNDEFINED=new Py(f.Mappers.NUMERIC_UNDEFINED,!1)}function Gy(t){return t.toString()}function Ky(t){return t.toString()}Object.defineProperty(qy.prototype,"breaks",{get:function(){return this.breaks_3tqv0$_0}}),Object.defineProperty(qy.prototype,"formatter",{get:function(){return this.formatter_dkp6z6$_0}}),qy.$metadata$={kind:h,simpleName:"GuideMapperWithGuideBreaks",interfaces:[Py,My]},Hy.prototype.discreteToDiscrete_qvw28g$=function(t,e,n){return new qy(f.Mappers.discrete_qvw28g$(t,e,n),t.effectiveDomain,Gy)},Hy.prototype.continuousToDiscrete_3kbtej$=function(t,e,n){var i=f.Mappers.quantized_4lks63$(t,e,n);return this.asNotContinuous_6ljcop$(i)},Hy.prototype.discreteToContinuous_dj8ltc$=function(t,e,n){return new qy(f.Mappers.discreteToContinuous_swidre$(t.effectiveDomainTransformed,e,n),t.effectiveDomain,Ky)},Hy.prototype.continuousToContinuous_gd6940$=function(t,e,n){return this.asContinuous_6ljcop$(f.Mappers.linear_gd6940$(t,e,n))},Hy.prototype.asNotContinuous_6ljcop$=function(t){return new Py(t,!1)},Hy.prototype.asContinuous_6ljcop$=function(t){return new Py(t,!0)},Hy.$metadata$={kind:a,simpleName:"GuideMappers",interfaces:[]};var Vy=null;function Yy(){return null===Vy&&new Hy,Vy}function Wy(){Xy=this,this.NA_VALUE=_o.SOLID}Wy.prototype.allLineTypes=function(){return X([_o.SOLID,_o.DASHED,_o.DOTTED,_o.DOTDASH,_o.LONGDASH,_o.TWODASH])},Wy.$metadata$={kind:a,simpleName:"LineTypeMapper",interfaces:[]};var Xy=null;function Zy(){return null===Xy&&new Wy,Xy}function Jy(){Qy=this,this.NA_VALUE=ho.TinyPointShape}Jy.prototype.allShapes=function(){var t=X([$o.SOLID_CIRCLE,$o.SOLID_TRIANGLE_UP,$o.SOLID_SQUARE,$o.STICK_PLUS,$o.STICK_SQUARE_CROSS,$o.STICK_STAR]),e=go(X(yo().slice()));e.removeAll_brywnq$(t);var n=Dt(t);return n.addAll_brywnq$(e),n},Jy.prototype.hollowShapes=function(){var t,e=X([$o.STICK_CIRCLE,$o.STICK_TRIANGLE_UP,$o.STICK_SQUARE]),n=go(X(yo().slice()));n.removeAll_brywnq$(e);var i=Dt(e);for(t=n.iterator();t.hasNext();){var o=t.next();o.isHollow&&i.add_11rb$(o)}return i},Jy.$metadata$={kind:a,simpleName:"ShapeMapper",interfaces:[]};var Qy=null;function tg(){return null===Qy&&new Jy,Qy}function eg(t,e){og(),Mg.call(this,t,e)}function ng(){ig=this,this.DEF_RANGE_0=new gt(.1,1),this.DEFAULT=new eg(this.DEF_RANGE_0,Oy().get_31786j$(T.Companion.ALPHA))}ng.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var ig=null;function og(){return null===ig&&new ng,ig}function rg(t,n,i,o){var r,a;if(ug(),Bg.call(this,o),this.paletteTypeName_0=t,this.paletteNameOrIndex_0=n,this.direction_0=i,null!=(r=null!=this.paletteNameOrIndex_0?"string"==typeof this.paletteNameOrIndex_0||e.isNumber(this.paletteNameOrIndex_0):null)&&!r){var s=(a=this,function(){return"palette: expected a name or index but was: "+J(e.getKClassFromExpression(W(a.paletteNameOrIndex_0)).simpleName)})();throw Kt(s.toString())}if(e.isNumber(this.paletteNameOrIndex_0)&&null==this.paletteTypeName_0)throw Kt("brewer palette type required: 'seq', 'div' or 'qual'.".toString())}function ag(){lg=this}function sg(t){return"'"+t.name+"'"}eg.$metadata$={kind:h,simpleName:"AlphaMapperProvider",interfaces:[Mg]},rg.prototype.createDiscreteMapper_6i94r7$=function(t){var e=t.effectiveDomain.size,n=this.colorScheme_0(!0,e),i=this.colors_0(n,e);return Yy().discreteToDiscrete_qvw28g$(t,i,this.naValue)},rg.prototype.createContinuousMapper_j5tjae$=function(t,e){var n=this.colorScheme_0(!1),i=this.colors_0(n,n.maxColors),o=f.MapperUtil.rangeWithLimitsAfterTransform_j5tjae$(t,e);return Yy().continuousToDiscrete_3kbtej$(o,i,this.naValue)},rg.prototype.colors_0=function(t,n){var i,o,r=vo.PaletteUtil.schemeColors_7q5c77$(t,n);return!0===(o=null!=(i=null!=this.direction_0?this.direction_0<0:null)&&i)?gi(r):!1===o?r:e.noWhenBranchMatched()},rg.prototype.colorScheme_0=function(t,n){var i;if(void 0===n&&(n=null),"string"==typeof this.paletteNameOrIndex_0){var o=vo.PaletteUtil.paletteTypeByPaletteName_61zpoe$(this.paletteNameOrIndex_0);if(null==o){var r=ug().cantFindPaletteError_0(this.paletteNameOrIndex_0);throw Kt(r.toString())}i=o}else i=null!=this.paletteTypeName_0?ug().paletteType_0(this.paletteTypeName_0):t?bo.QUALITATIVE:bo.SEQUENTIAL;var a=i;return e.isNumber(this.paletteNameOrIndex_0)?vo.PaletteUtil.colorSchemeByIndex_vfydh1$(a,At(this.paletteNameOrIndex_0)):"string"==typeof this.paletteNameOrIndex_0?ug().colorSchemeByName_0(a,this.paletteNameOrIndex_0):a===bo.QUALITATIVE?null!=n&&n<=wo.Set2.maxColors?wo.Set2:wo.Set3:vo.PaletteUtil.colorSchemeByIndex_vfydh1$(a,0)},ag.prototype.paletteType_0=function(t){var e;if(null==t)return bo.SEQUENTIAL;switch(t){case"seq":e=bo.SEQUENTIAL;break;case"div":e=bo.DIVERGING;break;case"qual":e=bo.QUALITATIVE;break;default:throw Kt("Palette type expected one of 'seq' (sequential), 'div' (diverging) or 'qual' (qualitative) but was: '"+J(t)+"'")}return e},ag.prototype.colorSchemeByName_0=function(t,n){var i;try{switch(t.name){case"SEQUENTIAL":i=xo(n);break;case"DIVERGING":i=ko(n);break;case"QUALITATIVE":i=Co(n);break;default:i=e.noWhenBranchMatched()}return i}catch(t){throw e.isType(t,Eo)?Kt(this.cantFindPaletteError_0(n)):t}},ag.prototype.cantFindPaletteError_0=function(t){return yn("\n |Brewer palette '"+t+"' was not found. \n |Valid palette names are: \n | Type 'seq' (sequential): \n | "+this.names_0(So())+" \n | Type 'div' (diverging): \n | "+this.names_0(To())+" \n | Type 'qual' (qualitative): \n | "+this.names_0(Oo())+" \n ")},ag.prototype.names_0=function(t){return No(t,", ",void 0,void 0,void 0,void 0,sg)},ag.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var lg=null;function ug(){return null===lg&&new ag,lg}function cg(t,e,n,i,o){dg(),cy.call(this,o),this.myLow_0=null,this.myMid_0=null,this.myHigh_0=null,this.myMidpoint_0=null,this.myLow_0=null!=t?t:dg().DEF_GRADIENT_LOW_0,this.myMid_0=null!=e?e:dg().DEF_GRADIENT_MID_0,this.myHigh_0=null!=n?n:dg().DEF_GRADIENT_HIGH_0,this.myMidpoint_0=null!=i?i:0}function pg(t,e){this.closure$getMapper=t,this.this$ColorGradient2MapperProvider=e}function hg(){_g=this,this.DEF_GRADIENT_LOW_0=K.Companion.parseHex_61zpoe$("#964540"),this.DEF_GRADIENT_MID_0=K.Companion.WHITE,this.DEF_GRADIENT_HIGH_0=K.Companion.parseHex_61zpoe$("#3B3D96")}rg.$metadata$={kind:h,simpleName:"ColorBrewerMapperProvider",interfaces:[Bg]},pg.prototype.invoke_yrwdxb$=function(t){var e,n=this.closure$getMapper(t);return null!=(e=null!=n?n(t):null)?e:this.this$ColorGradient2MapperProvider.naValue},pg.$metadata$={kind:h,interfaces:[te]},cg.prototype.createContinuousMapper_j5tjae$=function(t,e){var n,i=f.MapperUtil.rangeWithLimitsAfterTransform_j5tjae$(t,e),o=i.lowerEnd,r=W(this.myMidpoint_0),a=i.lowerEnd,s=new gt(o,lt.max(r,a)),l=this.myMidpoint_0,u=i.upperEnd,c=new gt(lt.min(l,u),i.upperEnd),p=Uy().gradient_kuiuox$(s,this.myLow_0,this.myMid_0,this.naValue),h=Uy().gradient_kuiuox$(c,this.myMid_0,this.myHigh_0,this.naValue),_=new pg((n=S([E(s,p),E(c,h)]),function(t){var e,i=null;if(It.SeriesUtil.isFinite_yrwdxb$(t)){var o=Ht.NaN;for(e=n.keys.iterator();e.hasNext();){var r=e.next();if(r.contains_14dthe$(W(t))){var a=r.upperEnd-r.lowerEnd;(null==i||0===o||a0)&&(i=n.get_11rb$(r),o=a)}}}return i}),this);return Yy().asContinuous_6ljcop$(_)},hg.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var _g=null;function dg(){return null===_g&&new hg,_g}function fg(t,e,n){yg(),Bg.call(this,n),this.low_0=null!=t?t:Uy().DEF_GRADIENT_LOW,this.high_0=null!=e?e:Uy().DEF_GRADIENT_HIGH}function mg(){$g=this,this.DEFAULT=new fg(null,null,Uy().NA_VALUE)}cg.$metadata$={kind:h,simpleName:"ColorGradient2MapperProvider",interfaces:[cy]},fg.prototype.createDiscreteMapper_6i94r7$=function(t){var e=t.effectiveDomainTransformed,n=W(It.SeriesUtil.range_l63ks6$(e)),i=Uy().gradient_kuiuox$(n,this.low_0,this.high_0,this.naValue);return Yy().asNotContinuous_6ljcop$(te.Companion.wrap_rjdepr$(i))},fg.prototype.createContinuousMapper_j5tjae$=function(t,e){var n=f.MapperUtil.rangeWithLimitsAfterTransform_j5tjae$(t,e),i=Uy().gradient_kuiuox$(n,this.low_0,this.high_0,this.naValue);return Yy().asContinuous_6ljcop$(te.Companion.wrap_rjdepr$(i))},mg.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var $g=null;function yg(){return null===$g&&new mg,$g}function gg(t,e){if(wg(),Bg.call(this,e),this.colors_0=t,!(this.colors_0.size>1))throw Kt("gradient requires colors list with two or more elements".toString())}function vg(){bg=this}fg.$metadata$={kind:h,simpleName:"ColorGradientMapperProvider",interfaces:[Bg]},gg.prototype.createDiscreteMapper_6i94r7$=function(t){var e=t.effectiveDomainTransformed,n=W(It.SeriesUtil.range_l63ks6$(e)),i=wg().createGradient_b0eetf$(n,this.colors_0,this.naValue);return Yy().asNotContinuous_6ljcop$(te.Companion.wrap_rjdepr$(i))},gg.prototype.createContinuousMapper_j5tjae$=function(t,e){var n=f.MapperUtil.rangeWithLimitsAfterTransform_j5tjae$(t,e),i=wg().createGradient_b0eetf$(n,this.colors_0,this.naValue);return Yy().asContinuous_6ljcop$(te.Companion.wrap_rjdepr$(i))},vg.prototype.createGradient_b0eetf$=function(t,e,n,i){void 0===i&&(i=1);var o,r=e.size-1|0,a=t.length/r,l=ne(0,r),u=_t(ht(l,10));for(o=l.iterator();o.hasNext();){var c=o.next();u.add_11rb$(t.lowerEnd+a*c)}var p,h,_,d,f=V(u,k(t.upperEnd)),m=Po(s(f,e),2),$=_t(ht(m,10));for(p=m.iterator();p.hasNext();){var y=p.next(),g=$.add_11rb$,v=y.get_za3lpa$(0),b=y.get_za3lpa$(1),w=v.component1(),x=v.component2(),E=b.component1(),S=b.component2(),T=new gt(w,E);g.call($,Uy().gradient_kuiuox$(T,x,S,n,i))}return h=n,_=f,d=$,function(t){var e;if(null!=t&&Zt(t)){if(tii(_))return h;var n=Rn(_,t);if(n<0)e=Io(n+1|0)-1|0;else{var i=Ni(d);e=lt.min(n,i)}var o=e;return d.get_za3lpa$(o)(t)}return h}},vg.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var bg=null;function wg(){return null===bg&&new vg,bg}function xg(t,e,n,i,o,r){Eg(),Ag.call(this,r),this.myFromHSV_0=null,this.myToHSV_0=null,this.myHSVIntervals_0=null;var a,s=Eg().normalizeHueRange_0(t),l=null==o||-1!==o,u=l?s.lowerEnd:s.upperEnd,c=l?s.upperEnd:s.lowerEnd,p=null!=i?i:Eg().DEF_START_HUE_0,h=s.contains_14dthe$(p)&&p-s.lowerEnd>1&&s.upperEnd-p>1?X([E(p,c),E(u,p)]):k(E(u,c)),_=(null!=e?e%100:Eg().DEF_SATURATION_0)/100,d=(null!=n?n%100:Eg().DEF_VALUE_0)/100,f=_t(ht(h,10));for(a=h.iterator();a.hasNext();){var m=a.next();f.add_11rb$(E(new Ao(m.first,_,d),new Ao(m.second,_,d)))}this.myHSVIntervals_0=f,this.myFromHSV_0=new Ao(u,_,d),this.myToHSV_0=new Ao(c,_,d)}function kg(){Cg=this,this.DEF_SATURATION_0=50,this.DEF_VALUE_0=90,this.DEF_START_HUE_0=0,this.DEF_HUE_RANGE_0=new gt(15,375),this.DEFAULT=new xg(null,null,null,null,null,K.Companion.GRAY)}gg.$metadata$={kind:h,simpleName:"ColorGradientnMapperProvider",interfaces:[Bg]},xg.prototype.createDiscreteMapper_6i94r7$=function(t){return this.createDiscreteMapper_wikmj1$(t.effectiveDomainTransformed,this.myFromHSV_0,this.myToHSV_0)},xg.prototype.createContinuousMapper_j5tjae$=function(t,e){var n=f.MapperUtil.rangeWithLimitsAfterTransform_j5tjae$(t,e);return this.createContinuousMapper_8wifwj$(n,this.myHSVIntervals_0)},kg.prototype.normalizeHueRange_0=function(t){var e;if(null==t||2!==t.size)e=this.DEF_HUE_RANGE_0;else{var n=t.get_za3lpa$(0),i=t.get_za3lpa$(1),o=lt.min(n,i),r=t.get_za3lpa$(0),a=t.get_za3lpa$(1);e=new gt(o,lt.max(r,a))}return e},kg.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var Cg=null;function Eg(){return null===Cg&&new kg,Cg}function Sg(t,e,n,i,o,r){Bg.call(this,r),this.direction_0=o,this.cmapName_0=null!=t?t:Ro.ColorMaps.VIRIDIS,this.alpha_0=null!=e?e:1,this.begin_0=null!=n?n:0,this.end_0=null!=i?i:1;var a=new gt(0,1);if(!a.contains_14dthe$(this.alpha_0))throw Kt("'alpha' should be in range [0..1]".toString());if(!a.contains_14dthe$(this.begin_0))throw Kt("'begin' should be in range [0..1]".toString());if(!a.contains_14dthe$(this.end_0))throw Kt("'end' should be in range [0..1]".toString())}function Tg(t,e){cy.call(this,e),this.max_ks8piw$_0=t}function Og(t,e,n){Ig(),Ag.call(this,n),this.myFromHSV_0=null,this.myToHSV_0=null;var i=null!=t?t:Ig().DEF_START_0,o=null!=e?e:Ig().DEF_END_0;if(!jo(0,1).contains_mef7kx$(i)){var r="Value of 'start' must be in range: [0,1]: "+J(t);throw Kt(r.toString())}if(!jo(0,1).contains_mef7kx$(o)){var a="Value of 'end' must be in range: [0,1]: "+J(e);throw Kt(a.toString())}this.myFromHSV_0=new Ao(0,0,i),this.myToHSV_0=new Ao(0,0,o)}function Ng(){Pg=this,this.DEF_START_0=.2,this.DEF_END_0=.8}xg.$metadata$={kind:h,simpleName:"ColorHueMapperProvider",interfaces:[Ag]},Sg.prototype.createDiscreteMapper_6i94r7$=function(t){var e=t.effectiveDomain.size,n=this.colors_0(e);return Yy().discreteToDiscrete_qvw28g$(t,n,this.naValue)},Sg.prototype.createContinuousMapper_j5tjae$=function(t,e){var n=this.colors_0(null),i=f.MapperUtil.rangeWithLimitsAfterTransform_j5tjae$(t,e),o=wg().createGradient_b0eetf$(i,n,this.naValue,this.alpha_0);return Yy().asContinuous_6ljcop$(te.Companion.wrap_rjdepr$(o))},Sg.prototype.colors_0=function(t){var n,i;void 0===t&&(t=null);var o=Ro.ColorMaps.getColors_kb58nm$(this.cmapName_0,this.alpha_0,new gt(this.begin_0,this.end_0),t);return!0===(i=null!=(n=null!=this.direction_0?this.direction_0<0:null)&&n)?gi(o):!1===i?o:e.noWhenBranchMatched()},Sg.$metadata$={kind:h,simpleName:"ColormapMapperProvider",interfaces:[Bg]},Tg.prototype.createContinuousMapper_j5tjae$=function(t,e){var n=f.MapperUtil.rangeWithLimitsAfterTransform_j5tjae$(t,e).upperEnd;return Yy().continuousToContinuous_gd6940$(new gt(0,n),new gt(0,this.max_ks8piw$_0),this.naValue)},Tg.$metadata$={kind:h,simpleName:"DirectlyProportionalMapperProvider",interfaces:[cy]},Og.prototype.createDiscreteMapper_6i94r7$=function(t){return this.createDiscreteMapper_wikmj1$(t.effectiveDomainTransformed,this.myFromHSV_0,this.myToHSV_0)},Og.prototype.createContinuousMapper_j5tjae$=function(t,e){var n=f.MapperUtil.rangeWithLimitsAfterTransform_j5tjae$(t,e);return this.createContinuousMapper_8wifwj$(n,k(E(this.myFromHSV_0,this.myToHSV_0)))},Ng.$metadata$={kind:a,simpleName:"Companion",interfaces:[]};var Pg=null;function Ig(){return null===Pg&&new Ng,Pg}function Ag(t){Lg(),Bg.call(this,t)}function Rg(){jg=this}Og.$metadata$={kind:h,simpleName:"GreyscaleLightnessMapperProvider",interfaces:[Ag]},Ag.prototype.createDiscreteMapper_wikmj1$=function(t,e,n){var i=It.SeriesUtil.ensureApplicableRange_w2blas$(It.SeriesUtil.range_l63ks6$(t)),o=t.size,r=e.h,a=n.h;if(o>1){var s=n.h%360-e.h%360,l=lt.abs(s),u=(n.h-e.h)/o;l12},Wn.prototype.checkedDoubles_fakr2g$=function(t){return new Zn(t)},Wn.prototype.checkedDoubles_9ma18$=function(t){return new Xn(t)},Wn.prototype.isFinite_yrwdxb$=function(t){return null!=t&&_t(t)},Wn.prototype.asFinite_z03gcz$=function(t,e){return null!=t&&_t(t)?t:e},Wn.prototype.isFinite_14dthe$=function(t){return _t(t)},Wn.prototype.allFinite_jma9l8$=function(t,e){return this.isFinite_yrwdxb$(t)&&this.isFinite_yrwdxb$(e)},Wn.prototype.allFinite_xjrefz$=function(t,e,n){return this.allFinite_jma9l8$(t,e)&&this.isFinite_yrwdxb$(n)},Wn.prototype.allFinite_rd1tgs$=function(t,e,n,i){return this.allFinite_xjrefz$(t,e,n)&&this.isFinite_yrwdxb$(i)},Wn.prototype.filterFinite_10sy24$=function(t,n){var i,o,r;if(t.size!==n.size)throw mt("Check failed.".toString());for(var a=V(),s=V(),l=!1,u=0,c=t.iterator();c.hasNext();++u){var p,h,_,d,f=c.next(),m=n.get_za3lpa$(u);this.allFinite_jma9l8$(f,m)?l&&(a.add_11rb$("number"==typeof(_=f)?_:J()),s.add_11rb$("number"==typeof(d=m)?d:J())):l||(a.addAll_brywnq$(e.isType(p=$t(pt(t,u)),yt)?p:J()),s.addAll_brywnq$(e.isType(h=$t(pt(n,u)),yt)?h:J()),l=!0)}return!0===(i=l)?rt([a,s]):!1===i?rt([e.isType(o=t,yt)?o:J(),e.isType(r=n,yt)?r:J()]):e.noWhenBranchMatched()},Wn.prototype.range_l63ks6$=function(t){var e,n=0,i=0,o=!1;for(e=t.iterator();e.hasNext();){var r=e.next();if(this.isFinite_yrwdxb$(r))if(o){var a=n,s=nt(r);n=G.min(a,s);var l=i;i=G.max(l,r)}else n=i=nt(r),o=!0}return o?new gt(n,i):null},Wn.prototype.resolution_u62iiw$=function(t,e){var n=Yn().tryRow_l63ks6$(t);if(n.isMesh)return n.resolution;var i=Yn().tryColumn_l63ks6$(t);return i.isMesh?i.resolution:this.resolutionFullScan_0(t,e)},Wn.prototype.resolutionFullScan_0=function(t,n){var i,o,r=this.REAL_NUMBER_0,a=V();for(o=t.iterator();o.hasNext();){var s=o.next();r(s)&&a.add_11rb$(s)}var l=e.isType(i=a,vt)?i:J();if(bt.Iterables.isEmpty_fakr2g$(l))return n;var u=ot.Companion.natural_dahdeg$().sortedCopy_m5x2f4$(l);if(u.size<2)return n;for(var c=u.iterator(),p=n,h=!0,_=c.next();c.hasNext();){var d=c.next(),f=d-_;f>0&&(f10?e.size:10,o=Y(i);for(n=e.iterator();n.hasNext();){var r=n.next();ru&&(c=h,u=_),h=h+1|0}u>=this.myEpsilon_0&&(e.push_11rb$(new jt(a,c)),e.push_11rb$(new jt(c,s)),r.set_wxm5ur$(c,u))}return r},ei.prototype.getWeights_ytws2g$=function(t){return this.calculateWeights_0(t)},ei.$metadata$={kind:U,simpleName:"DouglasPeuckerSimplification",interfaces:[ai]};var oi=Ft((function(){var t=e.kotlin.comparisons.compareValues_s00gnj$;return function(e){return function(n,i){var o=e;return t(o(n),o(i))}}}));function ri(t,e){ui(),this.myPoints_0=t,this.myWeights_0=null,this.myWeightLimit_0=ht.NaN,this.myCountLimit_0=-1,this.myWeights_0=e.getWeights_ytws2g$(this.myPoints_0)}function ai(){}function si(){li=this}Object.defineProperty(ri.prototype,"points",{configurable:!0,get:function(){var t,e=this.indices,n=Y(ut(e,10));for(t=e.iterator();t.hasNext();){var i=t.next();n.add_11rb$(this.myPoints_0.get_za3lpa$(i))}return n}}),Object.defineProperty(ri.prototype,"indices",{configurable:!0,get:function(){var t,e=zt(0,this.myPoints_0.size),n=Y(ut(e,10));for(t=e.iterator();t.hasNext();){var i=t.next();n.add_11rb$(new jt(i,this.myWeights_0.get_za3lpa$(i)))}var o,r=V();for(o=n.iterator();o.hasNext();){var a=o.next();dt(this.getWeight_0(a))||r.add_11rb$(a)}var s,l,u=Mt(r,Dt(new Ut(oi((l=this,function(t){return l.getWeight_0(t)})))));if(this.isWeightLimitSet_0){var c,p=V();for(c=u.iterator();c.hasNext();){var h=c.next();this.getWeight_0(h)>this.myWeightLimit_0&&p.add_11rb$(h)}s=p}else s=pt(u,this.myCountLimit_0);var _,d=s,f=Y(ut(d,10));for(_=d.iterator();_.hasNext();){var m=_.next();f.add_11rb$(this.getIndex_0(m))}return Bt(f)}}),Object.defineProperty(ri.prototype,"isWeightLimitSet_0",{configurable:!0,get:function(){return!dt(this.myWeightLimit_0)}}),ri.prototype.setWeightLimit_14dthe$=function(t){return this.myWeightLimit_0=t,this.myCountLimit_0=-1,this},ri.prototype.setCountLimit_za3lpa$=function(t){return this.myWeightLimit_0=ht.NaN,this.myCountLimit_0=t,this},ri.prototype.getWeight_0=function(t){return t.second},ri.prototype.getIndex_0=function(t){return t.first},ai.$metadata$={kind:K,simpleName:"RankingStrategy",interfaces:[]},si.prototype.visvalingamWhyatt_ytws2g$=function(t){return new ri(t,new pi)},si.prototype.douglasPeucker_ytws2g$=function(t){return new ri(t,new ei)},si.$metadata$={kind:H,simpleName:"Companion",interfaces:[]};var li=null;function ui(){return null===li&&new si,li}ri.$metadata$={kind:U,simpleName:"PolylineSimplifier",interfaces:[]};var ci=Ft((function(){var t=e.kotlin.comparisons.compareValues_s00gnj$;return function(e){return function(n,i){var o=e;return t(o(n),o(i))}}}));function pi(){mi(),this.myVerticesToRemove_0=V(),this.myTriangles_0=null}function hi(t){return t.area}function _i(t,e){this.currentVertex=t,this.myPoints_0=e,this.area_nqp3v0$_0=0,this.prevVertex_0=0,this.nextVertex_0=0,this.prev=null,this.next=null,this.prevVertex_0=this.currentVertex-1|0,this.nextVertex_0=this.currentVertex+1|0,this.area=this.calculateArea_0()}function di(){fi=this,this.INITIAL_AREA_0=ht.MAX_VALUE}Object.defineProperty(pi.prototype,"isSimplificationDone_0",{configurable:!0,get:function(){return this.isEmpty_0}}),Object.defineProperty(pi.prototype,"isEmpty_0",{configurable:!0,get:function(){return nt(this.myTriangles_0).isEmpty()}}),pi.prototype.getWeights_ytws2g$=function(t){this.myTriangles_0=Y(t.size-2|0),this.initTriangles_0(t);for(var e=t.size,n=Y(e),i=0;ir?a.area:r,o.set_wxm5ur$(a.currentVertex,r);var s=a.next;null!=s&&(s.takePrevFrom_em8fn6$(a),this.update_0(s));var l=a.prev;null!=l&&(l.takeNextFrom_em8fn6$(a),this.update_0(l)),this.myVerticesToRemove_0.add_11rb$(a.currentVertex)}return o},pi.prototype.initTriangles_0=function(t){for(var e=Y(t.size-2|0),n=1,i=t.size-1|0;ne)throw te("Duration must be positive");var n=Si().asDateTimeUTC_14dthe$(t),i=this.getFirstDayContaining_amwj4p$(n),o=new Jt(i);o.compareTo_11rb$(n)<0&&(o=this.addInterval_amwj4p$(o));for(var r=V(),a=Si().asInstantUTC_amwj4p$(o).toNumber();a<=e;)r.add_11rb$(a),o=this.addInterval_amwj4p$(o),a=Si().asInstantUTC_amwj4p$(o).toNumber();return r},Oi.$metadata$={kind:U,simpleName:"MeasuredInDays",interfaces:[Mi]},Object.defineProperty(Ni.prototype,"tickFormatPattern",{configurable:!0,get:function(){return"%b"}}),Ni.prototype.getFirstDayContaining_amwj4p$=function(t){var e=t.date;return Zt.Companion.firstDayOf_8fsw02$(e.year,e.month)},Ni.prototype.addInterval_amwj4p$=function(t){var e,n=t;e=this.count;for(var i=0;i=t){n=t-this.AUTO_STEPS_MS_0[i-1|0]=1){var u=e/l,c=u>n?n/u:1,p=e*c,h=A(P.floor(p)),_=u*c;i=new z(h,A(P.floor(_)))}else{var d=n*l,f=d>e?e/d:1,m=d*f,$=A(P.floor(m)),y=n*f;i=new z($,A(P.floor(y)))}}else i=new z(e,n);return i},ir.prototype.singlePlotSize_zbg9oi$=function(t,e,n,i,o,r){var a,s,l;if(null!=e)return e;var u,c=null!=(a=this.getSizeOptionOrNull_0(t))?a:this.defaultSinglePlotSize_0(o,r);if(null!=i){var p=C.Defaults.MIN_PLOT_WIDTH;u=c.mul_14dthe$(P.max(p,i)/c.x)}else u=null;var h=null!=(s=u)?s:c;if(null!=n&&n=0){var R,j;for(E.remove_11rb$(P),R=n.variables().iterator();R.hasNext();){var L=R.next();G(f.get_11rb$(L)).add_11rb$(n.get_8xm3sj$(L).get_za3lpa$(A))}for(j=t.variables().iterator();j.hasNext();){var z=j.next();G(f.get_11rb$(z)).add_11rb$(t.get_8xm3sj$(z).get_za3lpa$(I))}}}}for(w=E.iterator();w.hasNext();){var D;for(D=C(u,w.next()).iterator();D.hasNext();){var M,B,F=D.next();for(M=n.variables().iterator();M.hasNext();){var U=M.next();G(f.get_11rb$(U)).add_11rb$(n.get_8xm3sj$(U).get_za3lpa$(F))}for(B=t.variables().iterator();B.hasNext();){var q=B.next();G(f.get_11rb$(q)).add_11rb$(null)}}}var H,K=f.entries,V=st();for(H=K.iterator();H.hasNext();){var Y=H.next(),W=V,X=Y.key,Z=Y.value;V=W.put_2l962d$(X,Z)}return V.build()},_r.prototype.asVarNameMap_0=function(t){var n;if(null==t)return f();var i=_();if(!e.isType(t,d))throw c("Unsupported data structure: "+e.getKClassFromExpression(t).simpleName);for(n=t.keys.iterator();n.hasNext();){var o,r=n.next(),a=(e.isType(o=t,d)?o:v()).get_11rb$(r);if(e.isType(a,lt)){var s=k(r);i.put_xwzc9p$(s,a)}}return i},_r.prototype.updateDataFrame_0=function(t,e){var n,i,o=nt.DataFrameUtil.variables_dhhkv7$(t),r=t.builder();for(n=e.entries.iterator();n.hasNext();){var a=n.next(),s=a.key,l=a.value,u=null!=(i=o.get_11rb$(s))?i:nt.DataFrameUtil.createVariable_puj7f4$(s);r.put_2l962d$(u,l)}return r.build()},_r.prototype.toList_0=function(t){var n;if(e.isType(t,lt))n=t;else if(e.isNumber(t))n=x(ut(t));else{if(e.isType(t,ct))throw c("Can't cast/transform to list: "+e.getKClassFromExpression(t).simpleName);n=x(t.toString())}return n},_r.prototype.createAesMapping_5bl3vv$=function(t,n){var i;if(null==n)return f();var o=nt.DataFrameUtil.variables_dhhkv7$(t),r=_();for(i=$c().REAL_AES_OPTION_NAMES.iterator();i.hasNext();){var a,s=i.next(),l=(e.isType(a=n,d)?a:v()).get_11rb$(s);if("string"==typeof l){var u,c=null!=(u=o.get_11rb$(l))?u:nt.DataFrameUtil.createVariable_puj7f4$(l),p=$c().toAes_61zpoe$(s);r.put_xwzc9p$(p,c)}}return r},_r.prototype.toNumericPair_9ma18$=function(t){var n=0,i=0,o=t.iterator();if(o.hasNext())try{n=K(""+k(o.next()))}catch(t){if(!e.isType(t,pt))throw t}if(o.hasNext())try{i=K(""+k(o.next()))}catch(t){if(!e.isType(t,pt))throw t}return new p(n,i)},_r.$metadata$={kind:m,simpleName:"ConfigUtil",interfaces:[]};var mr=null;function $r(){return null===mr&&new _r,mr}function yr(t,e,n){br(),np.call(this,e),this.name_0=t,this.defaultCoordProvider_0=n}function gr(){vr=this}gr.prototype.create_ymsr13$=function(t,n,i,o){var r,a,s;if(null==t)return o;var l=e.isType(t,d)?$r().featureName_bkhwtg$(t):t.toString(),u=e.isType(t,d)?e.isType(r=t,d)?r:v():f(),c=cp().over_x7u0o8$(u),p=null!=(a=c.getRangeOrNull_61zpoe$(qc().X_LIM))?this.validateRange_0(a,n):null,h=null!=(s=c.getRangeOrNull_61zpoe$(qc().Y_LIM))?this.validateRange_0(s,i):null;return tt(l,Kc().FLIP)?o.with_11nazf$(p,h,!0):kr().createCoordProvider_q3ggri$(l,p,h,c)},gr.prototype.validateRange_0=function(t,n){var i;if(e.isType(n,dt)){var o=n.toApplicableDomain_3lmjpf$(t);i=new _t(G(n.apply_yrwdxb$(o.lowerEnd)),G(n.apply_yrwdxb$(o.upperEnd)))}else i=t;return i},gr.$metadata$={kind:m,simpleName:"Companion",interfaces:[]};var vr=null;function br(){return null===vr&&new gr,vr}function wr(){xr=this}wr.prototype.createCoordProvider_q3ggri$=function(t,e,n,i){var o,r,a,s=i.getBoolean_ivxn3r$(qc().FLIPPED);switch(t){case"cartesian":a=ft.CoordProviders.cartesian_11nazf$(e,n,s);break;case"fixed":a=ft.CoordProviders.fixed_kt8gy1$(null!=(o=i.getDouble_61zpoe$(qc().RATIO))?o:1,e,n,s);break;case"map":switch(i.getString_61zpoe$(qc().PROJECTION)){case"mercator":default:r=mt();break;case"identity":r=$t();break;case"conic":r=yt();break;case"azimuthal":r=gt()}var l=r;a=ft.CoordProviders.map_bjve6d$(e,n,s,l);break;case"flip":throw M("Don't try to instantiate coord FLIP, it's only a flag.");default:throw c("Unknown coordinate system name: '"+t+"'")}return a},wr.$metadata$={kind:m,simpleName:"CoordProto",interfaces:[]};var xr=null;function kr(){return null===xr&&new wr,xr}function Cr(){Er=this,this.prefix_0="@as_discrete@"}Cr.prototype.isDiscrete_0=function(t){return vt(t,this.prefix_0)},Cr.prototype.toDiscrete_61zpoe$=function(t){if(this.isDiscrete_0(t))throw c(("toDiscrete() - variable already encoded: "+t).toString());return this.prefix_0+t},Cr.prototype.fromDiscrete_0=function(t){if(!this.isDiscrete_0(t))throw c(("fromDiscrete() - variable is not encoded: "+t).toString());return bt(t,this.prefix_0)},Cr.prototype.getMappingAnnotationsSpec_0=function(t,e){var n,i,o,r;if(null!=(i=null!=(n=xp(t,[gs().DATA_META]))?Sp(n,[ps().TAG]):null)){var a,s=h();for(a=i.iterator();a.hasNext();){var l=a.next();tt(pp(l,[ps().ANNOTATION]),e)&&s.add_11rb$(l)}r=s}else r=null;return null!=(o=r)?o:Y()},Cr.prototype.getAsDiscreteAesSet_bkhwtg$=function(t){var e,n,i,o,r,a;if(null!=(e=Sp(t,[ps().TAG]))){var s,l=Rt(At(O(e,10)),16),u=jt(l);for(s=e.iterator();s.hasNext();){var c,p=s.next(),h=wt("string"==typeof(c=pp(p,[ps().AES]))?c:v(),G(pp(p,[ps().ANNOTATION])));u.put_xwzc9p$(h.first,h.second)}r=u}else r=null;if(null!=(n=r)){var _,d=F("equals",function(t,e){return tt(t,e)}.bind(null,ps().AS_DISCRETE)),f=Lt();for(_=n.entries.iterator();_.hasNext();){var m=_.next();d(m.value)&&f.put_xwzc9p$(m.key,m.value)}a=f}else a=null;return null!=(o=null!=(i=a)?i.keys:null)?o:xt()},Cr.prototype.createScaleSpecs_x7u0o8$=function(t){var e,n,i,o,r=this.getMappingAnnotationsSpec_0(t,ps().AS_DISCRETE);if(null!=(e=Sp(t,[Ps().LAYERS]))){var a,s=N(O(e,10));for(a=e.iterator();a.hasNext();){var l=a.next();s.add_11rb$(this.getMappingAnnotationsSpec_0(l,ps().AS_DISCRETE))}o=s}else o=null;var u,c=null!=(i=null!=(n=o)?kt(n):null)?i:Y(),p=Ct(r,c),_=Lt();for(u=p.iterator();u.hasNext();){var d,f=u.next(),m=G(pp(f,[ps().AES])),$=_.get_11rb$(m);if(null==$){var y=h();_.put_xwzc9p$(m,y),d=y}else d=$;d.add_11rb$(pp(f,[ps().PARAMETERS,ps().LABEL]))}var g,v=jt(At(_.size));for(g=_.entries.iterator();g.hasNext();){var b,w=g.next(),x=v.put_xwzc9p$,k=w.key,C=w.value;t:do{for(var E=C.listIterator_za3lpa$(C.size);E.hasPrevious();){var S=E.previous();if(null!=S){b=S;break t}}b=null}while(0);x.call(v,k,b)}var T,P=N(v.size);for(T=v.entries.iterator();T.hasNext();){var I=T.next(),A=P.add_11rb$,R=I.key,j=I.value;A.call(P,Et([wt(pc().AES,R),wt(pc().DISCRETE_DOMAIN,!0),wt(pc().NAME,j)]))}return P},Cr.prototype.createDataFrame_o3uhyx$=function(t,e,n,i,o){var r=$r().createDataFrame_8ea4ql$(t.get_61zpoe$(Ts().DATA)),a=t.getMap_61zpoe$(Ts().MAPPING);if(o){var s,l=nt.DataFrameUtil.toMap_dhhkv7$(r),u=Lt();for(s=l.entries.iterator();s.hasNext();){var p=s.next(),h=p.key;this.isDiscrete_0(h)&&u.put_xwzc9p$(p.key,p.value)}var _,d=u.entries,f=St(r);for(_=d.iterator();_.hasNext();){var m=_.next(),$=f,y=m.key,g=m.value,v=nt.DataFrameUtil.findVariableOrFail_vede35$(r,y);$.remove_8xm3sj$(v),f=$.putDiscrete_2l962d$(v,g)}return new z(a,f.build())}var b,w=this.getAsDiscreteAesSet_bkhwtg$(t.getMap_61zpoe$(gs().DATA_META)),x=Lt();for(b=a.entries.iterator();b.hasNext();){var k=b.next(),C=k.key;w.contains_11rb$(C)&&x.put_xwzc9p$(k.key,k.value)}var E,S=x,T=Lt();for(E=i.entries.iterator();E.hasNext();){var P=E.next();Tt(n,P.key)&&T.put_xwzc9p$(P.key,P.value)}var I,A=Tr(T),R=F("fromDiscrete",function(t,e){return t.fromDiscrete_0(e)}.bind(null,this)),j=N(O(A,10));for(I=A.iterator();I.hasNext();){var L=I.next();j.add_11rb$(R(L))}var D,M=j,B=Ot(Tr(a),Tr(S)),U=Ot(Nt(Tr(S),M),B),q=Pt(nt.DataFrameUtil.toMap_dhhkv7$(e),nt.DataFrameUtil.toMap_dhhkv7$(r)),H=jt(At(S.size));for(D=S.entries.iterator();D.hasNext();){var G=D.next(),K=H.put_xwzc9p$,V=G.key,Y=G.value;if("string"!=typeof Y)throw c("Failed requirement.".toString());K.call(H,V,this.toDiscrete_61zpoe$(Y))}var W,X=Pt(a,H),Z=Lt();for(W=q.entries.iterator();W.hasNext();){var J=W.next(),Q=J.key;U.contains_11rb$(Q)&&Z.put_xwzc9p$(J.key,J.value)}var tt,et=jt(At(Z.size));for(tt=Z.entries.iterator();tt.hasNext();){var it=tt.next(),ot=et.put_xwzc9p$,rt=it.key;ot.call(et,nt.DataFrameUtil.createVariable_puj7f4$(this.toDiscrete_61zpoe$(rt)),it.value)}var at,st=et.entries,lt=St(r);for(at=st.iterator();at.hasNext();){var ut=at.next(),ct=lt,pt=ut.key,ht=ut.value;lt=ct.putDiscrete_2l962d$(pt,ht)}return new z(X,lt.build())},Cr.prototype.getOrderOptions_tjia25$=function(t,n){var i,o,r,a,s;if(null!=(i=null!=t?this.getMappingAnnotationsSpec_0(t,ps().AS_DISCRETE):null)){var l,u=Rt(At(O(i,10)),16),c=jt(u);for(l=i.iterator();l.hasNext();){var p=l.next(),_=wt(G(fp(p,[ps().AES])),xp(p,[ps().PARAMETERS]));c.put_xwzc9p$(_.first,_.second)}a=c}else a=null;if(null!=(o=a)){var f,m=h();for(f=o.entries.iterator();f.hasNext();){var $,y,g,b,w=f.next(),x=w.key,k=w.value;if(!(e.isType(g=n,d)?g:v()).containsKey_11rb$(x))throw M("Check failed.".toString());var C="string"==typeof(y=(e.isType(b=n,d)?b:v()).get_11rb$(x))?y:v();null!=($=It.Companion.create_yyjhqb$(C,null!=k?fp(k,[ps().ORDER_BY]):null,null!=k?pp(k,[ps().ORDER]):null))&&m.add_11rb$($)}s=m}else s=null;return null!=(r=s)?r:Y()},Cr.prototype.inheritToNonDiscrete_qxcvtk$=function(t,e){var n,i=Tr(e),o=F("isDiscrete",function(t,e){return t.isDiscrete_0(e)}.bind(null,this)),r=h();for(n=i.iterator();n.hasNext();){var a=n.next();o(a)||r.add_11rb$(a)}var s,l=h();for(s=r.iterator();s.hasNext();){var u,c,p=s.next();t:do{var _,d,f,m=h();for(d=t.iterator();d.hasNext();){var $=d.next();this.isDiscrete_0($.variableName)&&m.add_11rb$($)}e:do{var y;for(y=m.iterator();y.hasNext();){var g=y.next();if(tt(this.fromDiscrete_0(g.variableName),p)){f=g;break e}}f=null}while(0);if(null==(_=f)){c=null;break t}var v=_,b=v.byVariable;c=It.Companion.create_yyjhqb$(p,tt(b,v.variableName)?null:b,v.getOrderDir())}while(0);null!=(u=c)&&l.add_11rb$(u)}return Ct(t,l)},Cr.prototype.getDateTimeColumns_bkhwtg$=function(t){var e,n,i,o,r,a;if(null!=(e=Sp(t,[$s().TAG]))){var s,l=Rt(At(O(e,10)),16),u=jt(l);for(s=e.iterator();s.hasNext();){var c=s.next(),p=wt(G(fp(c,[$s().COLUMN])),G(pp(c,[$s().TYPE])));u.put_xwzc9p$(p.first,p.second)}r=u}else r=null;if(null!=(n=r)){var h,_=F("equals",function(t,e){return tt(t,e)}.bind(null,fs().DATE_TIME)),d=Lt();for(h=n.entries.iterator();h.hasNext();){var f=h.next();_(f.value)&&d.put_xwzc9p$(f.key,f.value)}a=d}else a=null;return null!=(o=null!=(i=a)?i.keys:null)?o:xt()},Cr.$metadata$={kind:m,simpleName:"DataMetaUtil",interfaces:[]};var Er=null;function Sr(){return null===Er&&new Cr,Er}function Tr(t){var e,n=t.values,i=N(O(n,10));for(e=n.iterator();e.hasNext();){var o,r=e.next();i.add_11rb$("string"==typeof(o=r)?o:v())}return ot(i)}function Or(t){np.call(this,t)}function Nr(){Ir=this}function Pr(t,e){this.message=t,this.isInternalError=e}Or.prototype.createFacets_wcy4lu$=function(t){var e,n=this.getStringSafe_61zpoe$(dc().NAME);switch(n){case"grid":e=this.createGrid_0(t);break;case"wrap":e=this.createWrap_0(t);break;default:throw c("Facet 'grid' or 'wrap' expected but was: `"+n+"`")}return e},Or.prototype.createGrid_0=function(t){var e,n,i=null,o=zt();if(this.has_61zpoe$(dc().X))for(i=this.getStringSafe_61zpoe$(dc().X),e=t.iterator();e.hasNext();){var r=e.next();if(nt.DataFrameUtil.hasVariable_vede35$(r,i)){var a=nt.DataFrameUtil.findVariableOrFail_vede35$(r,i);o.addAll_brywnq$(r.distinctValues_8xm3sj$(a))}}var s=null,l=zt();if(this.has_61zpoe$(dc().Y))for(s=this.getStringSafe_61zpoe$(dc().Y),n=t.iterator();n.hasNext();){var u=n.next();if(nt.DataFrameUtil.hasVariable_vede35$(u,s)){var c=nt.DataFrameUtil.findVariableOrFail_vede35$(u,s);l.addAll_brywnq$(u.distinctValues_8xm3sj$(c))}}var p=this.getScalesOption_0();return new Mt(i,s,Dt(o),Dt(l),this.getOrderOption_0(dc().X_ORDER),this.getOrderOption_0(dc().Y_ORDER),this.getFormatterOption_0(dc().X_FORMAT),this.getFormatterOption_0(dc().Y_FORMAT),p)},Or.prototype.createWrap_0=function(t){var e,n,i=this.getAsStringList_61zpoe$(dc().FACETS),o=this.getInteger_61zpoe$(dc().NCOL),r=this.getInteger_61zpoe$(dc().NROW),a=h();for(e=i.iterator();e.hasNext();){var s=e.next(),l=Bt();for(n=t.iterator();n.hasNext();){var u=n.next();if(nt.DataFrameUtil.hasVariable_vede35$(u,s)){var c=nt.DataFrameUtil.findVariableOrFail_vede35$(u,s);l.addAll_brywnq$(rt(u.get_8xm3sj$(c)))}}a.add_11rb$(Ft(l))}var p,_=this.getAsList_61zpoe$(dc().FACETS_ORDER),d=N(O(_,10));for(p=_.iterator();p.hasNext();){var f=p.next();d.add_11rb$(this.toOrderVal_0(f))}for(var m=d,$=i.size,y=N($),g=0;g<$;g++)y.add_11rb$(0);var v,b=Ut(Ct(m,y),i.size),w=this.getAsList_61zpoe$(dc().FACETS_FORMAT),x=N(O(w,10));for(v=w.iterator();v.hasNext();){var k=v.next();x.add_11rb$(this.toFormatterVal_0(k))}for(var C=x,E=i.size,S=N(E),T=0;T")+" : "+(null!=(i=o.message)?i:""),!0)},Pr.$metadata$={kind:S,simpleName:"FailureInfo",interfaces:[]},Nr.$metadata$={kind:m,simpleName:"FailureHandler",interfaces:[]};var Ir=null;function Ar(){return null===Ir&&new Nr,Ir}function Rr(t){this.plotOptions_0=t}function jr(t,e,n,i){if(Dr(),this.dataAndCoordinates=null,this.mappings=null,_p(n,[gs().MAP_DATA_META,ns().GDF])||_p(n,[gs().DATA_META,ns().GDF])){var o=new Br(t,e,n,i);this.dataAndCoordinates=o.dataAndCoordinates,this.mappings=o.mappings}else{if(!_p(n,[gs().MAP_DATA_META,ls().GEOREFERENCE]))throw Jt();var r=new Mr(e,n,i);this.dataAndCoordinates=r.processedDataFrame,this.mappings=r.processedMappings}}function Lr(){zr=this,this.GEO_ID="__geo_id__",this.POINT_X="lon",this.POINT_Y="lat",this.RECT_XMIN="lonmin",this.RECT_YMIN="latmin",this.RECT_XMAX="lonmax",this.RECT_YMAX="latmax",this.MAP_JOIN_REQUIRED_MESSAGE="map_join is required when both data and map parameters used"}Rr.prototype.createFontFamilyRegistry=function(){var t,n,i=this.plotOptions_0.getList_61zpoe$(Ps().METAINFO_LIST),o=1,r=h();for(t=i.iterator();t.hasNext();){var a=t.next();if(e.isType(a,d)){var s=new np(e.isType(n=a,d)?n:v());switch(s.getStringSafe_61zpoe$(gs().NAME)){case"font_metrics_adjustment":o=s.getDoubleDef_io5o9c$(tp().WIDTH_CORRECTION,o);break;case"font_family_info":r.add_11rb$(s)}}}var l,u=new Xt(o);for(l=r.iterator();l.hasNext();){var c=l.next(),p=c.has_61zpoe$(tp().MONOSPACED)?c.getBoolean_ivxn3r$(tp().MONOSPACED,!1):null;u.put_h6gg2f$(c.getStringSafe_61zpoe$(tp().FAMILY),p,c.getDouble_61zpoe$(tp().WIDTH_CORRECTION))}return u},Rr.$metadata$={kind:S,simpleName:"FontFamilyRegistryConfig",interfaces:[]},Lr.prototype.isApplicable_9bzsud$=function(t,n,i){var o=!i;if(o){var r,a=n.keys,s=h();for(r=a.iterator();r.hasNext();){var l,u;null!=(l="string"==typeof(u=r.next())?u:null)&&s.add_11rb$(l)}var c,p=h();for(c=s.iterator();c.hasNext();){var _,d,f=c.next();try{d=new ye($c().toAes_61zpoe$(f))}catch(t){if(!e.isType(t,ge))throw t;d=new ye(ve(t))}var m,$=d;null!=(_=$.isFailure?null:null==(m=$.value)||e.isType(m,be)?m:v())&&p.add_11rb$(_)}var y,g=F("isPositional",function(t,e){return t.isPositional_896ixz$(e)}.bind(null,Zt.Companion));t:do{var b;if(e.isType(p,we)&&p.isEmpty()){y=!1;break t}for(b=p.iterator();b.hasNext();)if(g(b.next())){y=!0;break t}y=!1}while(0);o=y}return!o&&(_p(t,[gs().MAP_DATA_META,ns().GDF,ns().GEOMETRY])||_p(t,[gs().DATA_META,ns().GDF,ns().GEOMETRY])||_p(t,[gs().MAP_DATA_META,ls().GEOREFERENCE])||_p(t,[gs().DATA_META,ls().GEOREFERENCE]))},Lr.prototype.isGeoDataframe_gp9epa$=function(t,e){return _p(t,[this.toDataMetaKey_0(e),ns().GDF,ns().GEOMETRY])},Lr.prototype.getGeometryColumn_gp9epa$=function(t,e){var n;if(null==(n=fp(t,[this.toDataMetaKey_0(e),ns().GDF,ns().GEOMETRY])))throw M("Geometry column not set".toString());return n},Lr.prototype.toDataMetaKey_0=function(t){switch(t){case"map":return gs().MAP_DATA_META;case"data":return gs().DATA_META;default:throw M(("Unknown gdf role: '"+t+"'. Expected: '"+Js().GEO_POSITIONS+"' or '"+Ts().DATA+"'").toString())}},Lr.$metadata$={kind:m,simpleName:"Companion",interfaces:[]};var zr=null;function Dr(){return null===zr&&new Lr,zr}function Mr(t,n,i){var o,r,a,s,l,u,p;this.processedDataFrame=null,this.processedMappings=null;var h=_p(n,[gs().MAP_DATA_META,ls().GEOREFERENCE])&&!_p(n,[Ms().MAP_JOIN])&&!t.isEmpty;if(h&&(h=!i.isEmpty()),h)throw M(Dr().MAP_JOIN_REQUIRED_MESSAGE.toString());if(_p(n,[gs().MAP_DATA_META,ls().GEOREFERENCE])&&_p(n,[Ms().MAP_JOIN])){if(!_p(n,[Js().GEO_POSITIONS]))throw c("'map' parameter is mandatory with MAP_DATA_META".toString());if(null==(o=Cp(n,[Ms().MAP_JOIN])))throw M("require map_join parameter".toString());var _=o;a=e.isType(r=_.get_za3lpa$(0),lt)?r:v(),s=nt.DataFrameUtil.fromMap_bkhwtg$(G(xp(n,[Js().GEO_POSITIONS]))),u=e.isType(l=_.get_za3lpa$(1),lt)?l:v(),p=$r().join_h5afbe$(t,a,s,u)}else if(_p(n,[gs().MAP_DATA_META,ls().GEOREFERENCE])&&!_p(n,[Ms().MAP_JOIN])&&t.isEmpty){if(!_p(n,[Js().GEO_POSITIONS]))throw c("'map' parameter is mandatory with MAP_DATA_META".toString());p=nt.DataFrameUtil.fromMap_bkhwtg$(G(xp(n,[Js().GEO_POSITIONS])))}else{if(!_p(n,[gs().DATA_META,ls().GEOREFERENCE])||_p(n,[Js().GEO_POSITIONS])||_p(n,[Ms().MAP_JOIN]))throw M("Unknown state");if(!_p(n,[Ts().DATA]))throw c("'data' parameter is mandatory with DATA_META".toString());p=t}var d,f=nt.DataFrameUtil.findVariableOrFail_vede35$(p,as().ID),m=p.get_8xm3sj$(f),$=p.get_8xm3sj$(nt.DataFrameUtil.findVariableOrFail_vede35$(p,as().POSITION)),g=p.get_8xm3sj$(nt.DataFrameUtil.findVariableOrFail_vede35$(p,as().LIMIT)),b=p.get_8xm3sj$(nt.DataFrameUtil.findVariableOrFail_vede35$(p,as().CENTROID)),w=new te(0,Qt(m)),x=N(O(w,10));for(d=w.iterator();d.hasNext();){var k=d.next();x.add_11rb$(y.JsonSupport.formatJson_za3rmp$(ee([wt("id",m.get_za3lpa$(k)),wt("pos",$.get_za3lpa$(k)),wt("lim",g.get_za3lpa$(k)),wt("cen",b.get_za3lpa$(k))])))}var C=x;this.processedDataFrame=p.builder().remove_8xm3sj$(f).put_2l962d$(f,C).build(),this.processedMappings=$r().createAesMapping_5bl3vv$(this.processedDataFrame,Pt(i,ne(wt(Zt.Companion.MAP_ID.name,as().ID))))}function Br(t,n,i,o){var r,a,s,l,u,p,h;this.dataAndCoordinates=null,this.mappings=null;var _,d,f,m=(f=i,function(t){var e,n,i;switch(t){case"map":if(null==(e=xp(f,[Js().GEO_POSITIONS])))throw M("require 'map' parameter".toString());i=e;break;case"data":if(null==(n=xp(f,[Ts().DATA])))throw M("require 'data' parameter".toString());i=n;break;default:throw M(("Unknown gdf location: "+t).toString())}var o=i;return nt.DataFrameUtil.fromMap_bkhwtg$(o)}),$=_p(i,[gs().MAP_DATA_META,ns().GDF,ns().GEOMETRY])&&!_p(i,[Ms().MAP_JOIN])&&!n.isEmpty;if($&&($=!o.isEmpty()),$)throw M(Dr().MAP_JOIN_REQUIRED_MESSAGE.toString());if(_p(i,[gs().MAP_DATA_META,ns().GDF,ns().GEOMETRY])&&_p(i,[Ms().MAP_JOIN])){if(!_p(i,[Js().GEO_POSITIONS]))throw c("'map' parameter is mandatory with MAP_DATA_META".toString());if(null==(r=Cp(i,[Ms().MAP_JOIN])))throw M("require map_join parameter".toString());var y=r;s=e.isType(a=y.get_za3lpa$(0),lt)?a:v(),l=m(Js().GEO_POSITIONS),p=e.isType(u=y.get_za3lpa$(1),lt)?u:v(),_=$r().join_h5afbe$(n,s,l,p),d=nt.DataFrameUtil.findVariableOrFail_vede35$(_,Dr().getGeometryColumn_gp9epa$(i,Js().GEO_POSITIONS))}else if(_p(i,[gs().MAP_DATA_META,ns().GDF,ns().GEOMETRY])&&!_p(i,[Ms().MAP_JOIN])){if(!_p(i,[Js().GEO_POSITIONS]))throw c("'map' parameter is mandatory with MAP_DATA_META".toString());_=m(Js().GEO_POSITIONS),d=nt.DataFrameUtil.findVariableOrFail_vede35$(_,Dr().getGeometryColumn_gp9epa$(i,Js().GEO_POSITIONS))}else{if(!_p(i,[gs().DATA_META,ns().GDF,ns().GEOMETRY])||_p(i,[Js().GEO_POSITIONS])||_p(i,[Ms().MAP_JOIN]))throw M("GeoDataFrame not found in data or map".toString());if(!_p(i,[Ts().DATA]))throw c("'data' parameter is mandatory with DATA_META".toString());_=n,d=nt.DataFrameUtil.findVariableOrFail_vede35$(_,Dr().getGeometryColumn_gp9epa$(i,Ts().DATA))}switch(t.name){case"MAP":case"POLYGON":h=new Xr(_,d);break;case"LIVE_MAP":case"POINT":case"TEXT":case"LABEL":case"PIE":h=new Yr(_,d);break;case"RECT":h=new Zr(_,d);break;case"PATH":h=new Wr(_,d);break;default:throw M(("Unsupported geom: "+t).toString())}var g=h;this.dataAndCoordinates=g.buildDataFrame(),this.mappings=$r().createAesMapping_5bl3vv$(this.dataAndCoordinates,Pt(o,g.mappings))}function Fr(t,e,n){ta(),this.dataFrame_0=t,this.geometries_0=e,this.mappings=n,this.dupCounter_0=h();var i,o=this.mappings.values,r=Rt(At(O(o,10)),16),a=jt(r);for(i=o.iterator();i.hasNext();){var s=i.next();a.put_xwzc9p$(s,h())}this.coordinates_0=a}function Ur(t){return u}function qr(t){return u}function Hr(t){return u}function Gr(t){return u}function Kr(t){return u}function Vr(t){return u}function Yr(t,e){var n;Fr.call(this,t,e,ta().POINT_COLUMNS),this.supportedFeatures_njr4m6$_0=x("Point, MultiPoint"),this.geoJsonConsumer_4woj0e$_0=this.defaultConsumer_5s5pfw$((n=this,function(t){return t.onPoint=function(t){return function(e){return ta().append_ad8zgy$(t.coordinates_0,e),u}}(n),t.onMultiPoint=function(t){return function(e){var n;for(n=e.iterator();n.hasNext();){var i=n.next(),o=t;ta().append_ad8zgy$(o.coordinates_0,i)}return u}}(n),u}))}function Wr(t,e){var n;Fr.call(this,t,e,ta().POINT_COLUMNS),this.supportedFeatures_ozgutd$_0=x("LineString, MultiLineString"),this.geoJsonConsumer_idjvc5$_0=this.defaultConsumer_5s5pfw$((n=this,function(t){return t.onLineString=function(t){return function(e){var n;for(n=e.iterator();n.hasNext();){var i=n.next(),o=t;ta().append_ad8zgy$(o.coordinates_0,i)}return u}}(n),t.onMultiLineString=function(t){return function(e){var n;for(n=le(se(e)).iterator();n.hasNext();){var i=n.next(),o=t;ta().append_ad8zgy$(o.coordinates_0,i)}return u}}(n),u}))}function Xr(t,e){var n;Fr.call(this,t,e,ta().POINT_COLUMNS),this.supportedFeatures_d0rxnq$_0=x("Polygon, MultiPolygon"),this.geoJsonConsumer_noor7u$_0=this.defaultConsumer_5s5pfw$((n=this,function(t){return t.onPolygon=function(t){return function(e){var n;for(n=le(se(e)).iterator();n.hasNext();){var i=n.next(),o=t;ta().append_ad8zgy$(o.coordinates_0,i)}return u}}(n),t.onMultiPolygon=function(t){return function(e){var n;for(n=le(le(se(e))).iterator();n.hasNext();){var i=n.next(),o=t;ta().append_ad8zgy$(o.coordinates_0,i)}return u}}(n),u}))}function Zr(t,e){var n;Fr.call(this,t,e,ta().RECT_MAPPINGS),this.supportedFeatures_bieyrp$_0=x("MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon"),this.geoJsonConsumer_w3z015$_0=this.defaultConsumer_5s5pfw$((n=this,function(t){var e,i=function(t){return function(e){var n;for(n=ce(F("union",function(t,e){return ue(t,e)}.bind(null,ie.BBOX_CALCULATOR))(e)).splitByAntiMeridian().iterator();n.hasNext();){var i=n.next(),o=t;ta().append_4y8q68$(o.coordinates_0,i)}}}(n),o=(e=i,function(t){e(x(t))});return t.onMultiPoint=function(t){return function(e){var n;return null!=(n=pe(e))&&t(n),u}}(o),t.onLineString=function(t){return function(e){var n;return null!=(n=pe(e))&&t(n),u}}(o),t.onMultiLineString=function(t){return function(e){var n;return null!=(n=pe(kt(e)))&&t(n),u}}(o),t.onPolygon=function(t){return function(e){var n;return null!=(n=he(e))&&t(n),u}}(o),t.onMultiPolygon=function(t){return function(e){return t(_e(e)),u}}(i),u}))}function Jr(){Qr=this,this.POINT_COLUMNS=ee([wt(Zt.Companion.X.name,Dr().POINT_X),wt(Zt.Companion.Y.name,Dr().POINT_Y)]),this.RECT_MAPPINGS=ee([wt(Zt.Companion.XMIN.name,Dr().RECT_XMIN),wt(Zt.Companion.YMIN.name,Dr().RECT_YMIN),wt(Zt.Companion.XMAX.name,Dr().RECT_XMAX),wt(Zt.Companion.YMAX.name,Dr().RECT_YMAX)])}jr.$metadata$={kind:S,simpleName:"GeoConfig",interfaces:[]},Mr.$metadata$={kind:S,simpleName:"GeoReferenceProcessor",interfaces:[]},Br.$metadata$={kind:S,simpleName:"GeoDataFrameProcessor",interfaces:[]},Fr.prototype.duplicate_0=function(t,e){var n,i,o=N(O(e,10)),r=0;for(n=e.iterator();n.hasNext();){for(var a=n.next(),s=o.add_11rb$,l=ht((r=(i=r)+1|0,i)),u=N(a),c=0;c=5},ea.$metadata$={kind:m,simpleName:"GeomInteractionUtil",interfaces:[]};var ia=null;function oa(){return null===ia&&new ea,ia}function ra(t,e){return t.containsKey_896ixz$(e)?t.get_31786j$(e):null}function aa(t,e){var n,i;return null!=(i=null!=(n=ra(t,e))?n.isContinuousDomain:null)&&i}function sa(t){ca(),this.geomKind=t}function la(){var t,e;for(ua=this,this.DEFAULTS_0=_(),this.COMMON_0=this.commonDefaults_0(),t=Le(),e=0;e!==t.length;++e){var n=t[e],i=this.DEFAULTS_0,o=this.COMMON_0;i.put_xwzc9p$(n,o)}var r=this.DEFAULTS_0,a=Ee.SMOOTH,s=this.smoothDefaults_0();r.put_xwzc9p$(a,s);var l=this.DEFAULTS_0,u=Ee.BAR,c=this.barDefaults_0();l.put_xwzc9p$(u,c);var p=this.DEFAULTS_0,h=Ee.HISTOGRAM,d=this.histogramDefaults_0();p.put_xwzc9p$(h,d);var f=this.DEFAULTS_0,m=Ee.DOT_PLOT,$=this.dotplotDefaults_0();f.put_xwzc9p$(m,$);var y=this.DEFAULTS_0,g=Ee.CONTOUR,v=this.contourDefaults_0();y.put_xwzc9p$(g,v);var b=this.DEFAULTS_0,w=Ee.CONTOURF,x=this.contourfDefaults_0();b.put_xwzc9p$(w,x);var k=this.DEFAULTS_0,C=Ee.CROSS_BAR,E=this.crossBarDefaults_0();k.put_xwzc9p$(C,E);var S=this.DEFAULTS_0,T=Ee.BOX_PLOT,O=this.boxplotDefaults_0();S.put_xwzc9p$(T,O);var N=this.DEFAULTS_0,P=Ee.AREA_RIDGES,I=this.areaRidgesDefaults_0();N.put_xwzc9p$(P,I);var A=this.DEFAULTS_0,R=Ee.VIOLIN,j=this.violinDefaults_0();A.put_xwzc9p$(R,j);var L=this.DEFAULTS_0,z=Ee.Y_DOT_PLOT,D=this.yDotplotDefaults_0();L.put_xwzc9p$(z,D);var M=this.DEFAULTS_0,B=Ee.AREA,F=this.areaDefaults_0();M.put_xwzc9p$(B,F);var U=this.DEFAULTS_0,q=Ee.DENSITY,H=this.densityDefaults_0();U.put_xwzc9p$(q,H);var G=this.DEFAULTS_0,K=Ee.DENSITY2D,V=this.density2dDefaults_0();G.put_xwzc9p$(K,V);var Y=this.DEFAULTS_0,W=Ee.DENSITY2DF,X=this.density2dfDefaults_0();Y.put_xwzc9p$(W,X);var Z=this.DEFAULTS_0,J=Ee.Q_Q,Q=this.qqDefaults_0();Z.put_xwzc9p$(J,Q);var tt=this.DEFAULTS_0,et=Ee.Q_Q_2,nt=this.qq2Defaults_0();tt.put_xwzc9p$(et,nt);var it=this.DEFAULTS_0,ot=Ee.Q_Q_LINE,rt=this.qqLineDefaults_0();it.put_xwzc9p$(ot,rt);var at=this.DEFAULTS_0,st=Ee.Q_Q_2_LINE,lt=this.qq2LineDefaults_0();at.put_xwzc9p$(st,lt);var ut=this.DEFAULTS_0,ct=Ee.FREQPOLY,pt=this.freqpolyDefaults_0();ut.put_xwzc9p$(ct,pt);var ht=this.DEFAULTS_0,_t=Ee.BIN_2D,dt=this.bin2dDefaults_0();ht.put_xwzc9p$(_t,dt);var ft=this.DEFAULTS_0,mt=Ee.PIE,$t=this.pieDefaults_0();ft.put_xwzc9p$(mt,$t)}sa.prototype.defaultOptions=function(){if(!ca().DEFAULTS_0.containsKey_11rb$(this.geomKind)){var t="Default values doesn't support geom kind: '"+this.geomKind+"'";throw c(t.toString())}return Ae(ca().DEFAULTS_0,this.geomKind)},sa.prototype.preferredSampling=function(){var t;switch(this.geomKind.name){case"POINT":t=Re.DefaultSampling.POINT;break;case"PATH":t=Re.DefaultSampling.PATH;break;case"LINE":t=Re.DefaultSampling.LINE;break;case"SMOOTH":t=Re.DefaultSampling.SMOOTH;break;case"BAR":t=Re.DefaultSampling.BAR;break;case"HISTOGRAM":t=Re.DefaultSampling.HISTOGRAM;break;case"DOT_PLOT":t=Re.DefaultSampling.DOT_PLOT;break;case"TILE":t=Re.DefaultSampling.TILE;break;case"BIN_2D":t=Re.DefaultSampling.BIN_2D;break;case"ERROR_BAR":t=Re.DefaultSampling.ERROR_BAR;break;case"CROSS_BAR":t=Re.DefaultSampling.CROSS_BAR;break;case"LINE_RANGE":t=Re.DefaultSampling.LINE_RANGE;break;case"POINT_RANGE":t=Re.DefaultSampling.POINT_RANGE;break;case"CONTOUR":t=Re.DefaultSampling.CONTOUR;break;case"CONTOURF":t=Re.DefaultSampling.CONTOURF;break;case"POLYGON":t=Re.DefaultSampling.POLYGON;break;case"MAP":t=Re.DefaultSampling.MAP;break;case"AB_LINE":t=Re.DefaultSampling.AB_LINE;break;case"H_LINE":t=Re.DefaultSampling.H_LINE;break;case"V_LINE":t=Re.DefaultSampling.V_LINE;break;case"BOX_PLOT":case"LIVE_MAP":case"RASTER":case"IMAGE":t=je.Samplings.NONE;break;case"AREA_RIDGES":t=Re.DefaultSampling.AREA_RIDGES;break;case"VIOLIN":t=Re.DefaultSampling.VIOLIN;break;case"Y_DOT_PLOT":t=Re.DefaultSampling.Y_DOT_PLOT;break;case"RIBBON":t=Re.DefaultSampling.RIBBON;break;case"AREA":t=Re.DefaultSampling.AREA;break;case"DENSITY":t=Re.DefaultSampling.DENSITY;break;case"DENSITY2D":t=Re.DefaultSampling.DENSITY2D;break;case"DENSITY2DF":t=Re.DefaultSampling.DENSITY2DF;break;case"JITTER":t=Re.DefaultSampling.JITTER;break;case"Q_Q":case"Q_Q_2":t=Re.DefaultSampling.Q_Q;break;case"Q_Q_LINE":case"Q_Q_2_LINE":t=Re.DefaultSampling.Q_Q_LINE;break;case"FREQPOLY":t=Re.DefaultSampling.FREQPOLY;break;case"STEP":t=Re.DefaultSampling.STEP;break;case"RECT":t=Re.DefaultSampling.RECT;break;case"SEGMENT":t=Re.DefaultSampling.SEGMENT;break;case"TEXT":case"LABEL":t=Re.DefaultSampling.TEXT;break;case"PIE":t=Re.DefaultSampling.PIE;break;default:t=e.noWhenBranchMatched()}return t},sa.prototype.renders=function(){return Ne.GeomMeta.renders_7dhqpi$(this.geomKind)},sa.prototype.preferredPositionAdjustmentOptions_opf53k$=function(t){var n,i,o,r,a,s;switch(this.geomKind.name){case"JITTER":o=ee([wt(gs().NAME,sh().JITTER),wt(qu().WIDTH,t.getDouble_61zpoe$(wl().WIDTH)),wt(qu().HEIGHT,t.getDouble_61zpoe$(wl().HEIGHT))]);break;case"Y_DOT_PLOT":o=t.hasOwn_61zpoe$(gl().STACKGROUPS)&&t.getBoolean_ivxn3r$(gl().STACKGROUPS)?sh().IDENTITY:ee([wt(gs().NAME,sh().DODGE),wt(Bu().WIDTH,.95)]);break;case"TEXT":case"LABEL":o=ee([wt(gs().NAME,sh().NUDGE),wt(Ku().WIDTH,t.getDouble_61zpoe$(Bl().NUDGE_X)),wt(Ku().HEIGHT,t.getDouble_61zpoe$(Bl().NUDGE_Y))]);break;default:o=null!=(i=null!=(n=ca().DEFAULTS_0.get_11rb$(this.geomKind))?n.get_11rb$(Ms().POS):null)?i:sh().IDENTITY}var l=o;if(e.isType(l,d)){var u,c=Lt();for(u=l.entries.iterator();u.hasNext();){var p=u.next();null!=p.value&&c.put_xwzc9p$(p.key,p.value)}s=e.isType(r=c,d)?r:v()}else s=ne(wt(gs().NAME,"string"==typeof(a=l)?a:v()));return s},la.prototype.commonDefaults_0=function(){var t=_(),e=Ms().STAT;return t.put_xwzc9p$(e,"identity"),t},la.prototype.smoothDefaults_0=function(){var t=_(),e=Ms().STAT;return t.put_xwzc9p$(e,"smooth"),t},la.prototype.barDefaults_0=function(){var t=_(),e=Ms().STAT;t.put_xwzc9p$(e,"count");var n=Ms().POS;return t.put_xwzc9p$(n,"stack"),t},la.prototype.histogramDefaults_0=function(){var t=_(),e=Ms().STAT;t.put_xwzc9p$(e,"bin");var n=Ms().POS,i=sh().STACK;return t.put_xwzc9p$(n,i),t},la.prototype.dotplotDefaults_0=function(){var t=_(),e=Ms().STAT;t.put_xwzc9p$(e,"dotplot");var n=Ms().POS;return t.put_xwzc9p$(n,"identity"),t},la.prototype.contourDefaults_0=function(){var t=_(),e=Ms().STAT;return t.put_xwzc9p$(e,"contour"),t},la.prototype.contourfDefaults_0=function(){var t=_(),e=Ms().STAT;return t.put_xwzc9p$(e,"contourf"),t},la.prototype.crossBarDefaults_0=function(){var t=_(),e=Ms().STAT;t.put_xwzc9p$(e,"identity");var n=Ms().POS,i=ee([wt(gs().NAME,sh().DODGE),wt(Bu().WIDTH,.95)]);return t.put_xwzc9p$(n,i),t},la.prototype.boxplotDefaults_0=function(){var t=_(),e=Ms().STAT;t.put_xwzc9p$(e,"boxplot");var n=Ms().POS,i=ee([wt(gs().NAME,sh().DODGE),wt(Bu().WIDTH,.95)]);return t.put_xwzc9p$(n,i),t},la.prototype.areaRidgesDefaults_0=function(){var t=_(),e=Ms().STAT;return t.put_xwzc9p$(e,"densityridges"),t},la.prototype.violinDefaults_0=function(){var t=_(),e=Ms().STAT;t.put_xwzc9p$(e,"ydensity");var n=Ms().POS,i=ee([wt(gs().NAME,sh().DODGE),wt(Bu().WIDTH,.95)]);return t.put_xwzc9p$(n,i),t},la.prototype.yDotplotDefaults_0=function(){var t=_(),e=Ms().STAT;return t.put_xwzc9p$(e,"ydotplot"),t},la.prototype.areaDefaults_0=function(){var t=_(),e=Ms().STAT;t.put_xwzc9p$(e,"identity");var n=Ms().POS,i=sh().STACK;return t.put_xwzc9p$(n,i),t},la.prototype.densityDefaults_0=function(){var t=_(),e=Ms().STAT;return t.put_xwzc9p$(e,"density"),t},la.prototype.density2dDefaults_0=function(){var t=_(),e=Ms().STAT;return t.put_xwzc9p$(e,"density2d"),t},la.prototype.density2dfDefaults_0=function(){var t=_(),e=Ms().STAT;return t.put_xwzc9p$(e,"density2df"),t},la.prototype.qqDefaults_0=function(){var t=_(),e=Ms().STAT;return t.put_xwzc9p$(e,"qq"),t},la.prototype.qq2Defaults_0=function(){var t=_(),e=Ms().STAT;return t.put_xwzc9p$(e,"qq2"),t},la.prototype.qqLineDefaults_0=function(){var t=_(),e=Ms().STAT;return t.put_xwzc9p$(e,"qq_line"),t},la.prototype.qq2LineDefaults_0=function(){var t=_(),e=Ms().STAT;return t.put_xwzc9p$(e,"qq2_line"),t},la.prototype.freqpolyDefaults_0=function(){var t=_(),e=Ms().STAT;return t.put_xwzc9p$(e,"bin"),t},la.prototype.bin2dDefaults_0=function(){return ne(wt(Ms().STAT,"bin2d"))},la.prototype.pieDefaults_0=function(){return ne(wt(Ms().STAT,"count2d"))},la.$metadata$={kind:m,simpleName:"Companion",interfaces:[]};var ua=null;function ca(){return null===ua&&new la,ua}function pa(t){da(),sa.call(this,t)}function ha(){_a=this,this.PROVIDER_0=_();var t=this.PROVIDER_0,e=Ee.POINT,n=ze.Companion.point();t.put_xwzc9p$(e,n);var i=this.PROVIDER_0,o=Ee.PATH,r=ze.Companion.path();i.put_xwzc9p$(o,r);var a=this.PROVIDER_0,s=Ee.LINE,l=ze.Companion.line();a.put_xwzc9p$(s,l);var u=this.PROVIDER_0,c=Ee.SMOOTH,p=ze.Companion.smooth();u.put_xwzc9p$(c,p);var h=this.PROVIDER_0,d=Ee.BAR,f=ze.Companion.bar();h.put_xwzc9p$(d,f);var m=this.PROVIDER_0,$=Ee.HISTOGRAM,y=ze.Companion.histogram();m.put_xwzc9p$($,y);var g=this.PROVIDER_0,v=Ee.TILE,b=ze.Companion.tile();g.put_xwzc9p$(v,b);var w=this.PROVIDER_0,x=Ee.BIN_2D,k=ze.Companion.bin2d();w.put_xwzc9p$(x,k);var C=this.PROVIDER_0,E=Ee.ERROR_BAR,S=ze.Companion.errorBar();C.put_xwzc9p$(E,S);var T=this.PROVIDER_0,O=Ee.LINE_RANGE,N=ze.Companion.lineRange();T.put_xwzc9p$(O,N);var P=this.PROVIDER_0,I=Ee.CONTOUR,A=ze.Companion.contour();P.put_xwzc9p$(I,A);var R=this.PROVIDER_0,j=Ee.CONTOURF,L=ze.Companion.contourf();R.put_xwzc9p$(j,L);var z=this.PROVIDER_0,D=Ee.POLYGON,M=ze.Companion.polygon();z.put_xwzc9p$(D,M);var B=this.PROVIDER_0,F=Ee.MAP,U=ze.Companion.map();B.put_xwzc9p$(F,U);var q=this.PROVIDER_0,H=Ee.AB_LINE,G=ze.Companion.abline();q.put_xwzc9p$(H,G);var K=this.PROVIDER_0,V=Ee.H_LINE,Y=ze.Companion.hline();K.put_xwzc9p$(V,Y);var W=this.PROVIDER_0,X=Ee.V_LINE,Z=ze.Companion.vline();W.put_xwzc9p$(X,Z);var J=this.PROVIDER_0,Q=Ee.RIBBON,tt=ze.Companion.ribbon();J.put_xwzc9p$(Q,tt);var et=this.PROVIDER_0,nt=Ee.AREA,it=ze.Companion.area();et.put_xwzc9p$(nt,it);var ot=this.PROVIDER_0,rt=Ee.DENSITY,at=ze.Companion.density();ot.put_xwzc9p$(rt,at);var st=this.PROVIDER_0,lt=Ee.DENSITY2D,ut=ze.Companion.density2d();st.put_xwzc9p$(lt,ut);var ct=this.PROVIDER_0,pt=Ee.DENSITY2DF,ht=ze.Companion.density2df();ct.put_xwzc9p$(pt,ht);var _t=this.PROVIDER_0,dt=Ee.JITTER,ft=ze.Companion.jitter();_t.put_xwzc9p$(dt,ft);var mt=this.PROVIDER_0,$t=Ee.Q_Q,yt=ze.Companion.qq();mt.put_xwzc9p$($t,yt);var gt=this.PROVIDER_0,vt=Ee.Q_Q_2,bt=ze.Companion.qq2();gt.put_xwzc9p$(vt,bt);var wt=this.PROVIDER_0,xt=Ee.Q_Q_LINE,kt=ze.Companion.qqline();wt.put_xwzc9p$(xt,kt);var Ct=this.PROVIDER_0,Et=Ee.Q_Q_2_LINE,St=ze.Companion.qq2line();Ct.put_xwzc9p$(Et,St);var Tt=this.PROVIDER_0,Ot=Ee.FREQPOLY,Nt=ze.Companion.freqpoly();Tt.put_xwzc9p$(Ot,Nt);var Pt=this.PROVIDER_0,It=Ee.RECT,At=ze.Companion.rect();Pt.put_xwzc9p$(It,At);var Rt=this.PROVIDER_0,jt=Ee.RASTER,Lt=ze.Companion.raster();Rt.put_xwzc9p$(jt,Lt);var zt=this.PROVIDER_0,Dt=Ee.LIVE_MAP,Mt=ze.Companion.livemap();zt.put_xwzc9p$(Dt,Mt)}sa.$metadata$={kind:S,simpleName:"GeomProto",interfaces:[]},pa.prototype.preferredCoordinateSystem_qfcmxu$=function(t){var e,n,i;switch(this.geomKind.name){case"TILE":case"BIN_2D":case"CONTOUR":case"CONTOURF":case"DENSITY2D":case"DENSITY2DF":case"RASTER":case"IMAGE":i=ft.CoordProviders.fixed_kt8gy1$(1);break;case"MAP":n=ft.CoordProviders;var o=$t();i=n.map_bjve6d$(void 0,void 0,void 0,null!=(e=t.has_61zpoe$(Ms().USE_CRS)?o:null)?e:mt());break;default:i=null}return i},pa.prototype.geomProvider_opf53k$=function(t){switch(this.geomKind.name){case"DOT_PLOT":return ze.Companion.dotplot_8j1y0m$((n=t,function(){var t=new De;return n.hasOwn_61zpoe$(Ws().DOTSIZE)&&(t.dotSize=G(n.getDouble_61zpoe$(Ws().DOTSIZE))),n.hasOwn_61zpoe$(Ws().STACKRATIO)&&(t.stackRatio=G(n.getDouble_61zpoe$(Ws().STACKRATIO))),n.hasOwn_61zpoe$(Ws().STACKGROUPS)&&(t.stackGroups=n.getBoolean_ivxn3r$(Ws().STACKGROUPS)),n.hasOwn_61zpoe$(Ws().STACKDIR)&&(t.stackDir=Me.Companion.safeValueOf_61zpoe$(G(n.getString_61zpoe$(Ws().STACKDIR)))),n.hasOwn_61zpoe$(Ws().METHOD)&&(t.method=Be.Companion.safeValueOf_61zpoe$(G(n.getString_61zpoe$(Ws().METHOD)))),t}));case"CROSS_BAR":return ze.Companion.crossBar_8j1y0m$(function(t){return function(){var e=new Fe;return t.hasOwn_61zpoe$(el().FATTEN)&&(e.fattenMidline=G(t.getDouble_61zpoe$(el().FATTEN))),e}}(t));case"POINT_RANGE":return ze.Companion.pointRange_8j1y0m$(function(t){return function(){var e=new Ue;return t.hasOwn_61zpoe$(ol().FATTEN)&&(e.fattenMidPoint=G(t.getDouble_61zpoe$(ol().FATTEN))),e}}(t));case"BOX_PLOT":return ze.Companion.boxplot_8j1y0m$(function(t){return function(){var e=new qe;return t.hasOwn_61zpoe$(sl().FATTEN)&&(e.fattenMidline=G(t.getDouble_61zpoe$(sl().FATTEN))),t.hasOwn_61zpoe$(sl().WHISKER_WIDTH)&&(e.whiskerWidth=G(t.getDouble_61zpoe$(sl().WHISKER_WIDTH))),t.hasOwn_61zpoe$(cl().COLOR)&&(e.outlierColor=G(t.getColor_61zpoe$(cl().COLOR))),t.hasOwn_61zpoe$(cl().FILL)&&(e.outlierFill=G(t.getColor_61zpoe$(cl().FILL))),e.outlierShape=t.getShape_61zpoe$(cl().SHAPE),e.outlierSize=t.getDouble_61zpoe$(cl().SIZE),e}}(t));case"AREA_RIDGES":return ze.Companion.arearidges_8j1y0m$(function(t){return function(){var e=new He;return t.hasOwn_61zpoe$(_l().SCALE)&&(e.scale=t.getDoubleDef_io5o9c$(_l().SCALE,He.Companion.DEF_SCALE)),t.hasOwn_61zpoe$(_l().MIN_HEIGHT)&&(e.minHeight=t.getDoubleDef_io5o9c$(_l().MIN_HEIGHT,He.Companion.DEF_MIN_HEIGHT)),t.hasOwn_61zpoe$(_l().QUANTILE_LINES)&&(e.quantileLines=t.getBoolean_ivxn3r$(_l().QUANTILE_LINES,He.Companion.DEF_QUANTILE_LINES)),e}}(t));case"VIOLIN":return ze.Companion.violin_8j1y0m$(function(t){return function(){var e=new Ge;return t.hasOwn_61zpoe$(ml().DRAW_QUANTILES)&&e.setDrawQuantiles_d3e2cz$(t.getBoundedDoubleList_ai6r6m$(ml().DRAW_QUANTILES,0,1)),t.hasOwn_61zpoe$(ml().SHOW_HALF)&&(e.showHalf=G(t.getDouble_61zpoe$(ml().SHOW_HALF))),e}}(t));case"Y_DOT_PLOT":return ze.Companion.ydotplot_8j1y0m$(function(t){return function(){var e=new Ke;return t.hasOwn_61zpoe$(gl().DOTSIZE)&&(e.dotSize=G(t.getDouble_61zpoe$(gl().DOTSIZE))),t.hasOwn_61zpoe$(gl().STACKRATIO)&&(e.stackRatio=G(t.getDouble_61zpoe$(gl().STACKRATIO))),t.hasOwn_61zpoe$(gl().STACKGROUPS)&&(e.stackGroups=t.getBoolean_ivxn3r$(gl().STACKGROUPS)),t.hasOwn_61zpoe$(gl().STACKDIR)&&(e.yStackDir=Ve.Companion.safeValueOf_61zpoe$(G(t.getString_61zpoe$(gl().STACKDIR)))),t.hasOwn_61zpoe$(gl().METHOD)&&(e.method=Be.Companion.safeValueOf_61zpoe$(G(t.getString_61zpoe$(gl().METHOD)))),e}}(t));case"STEP":return ze.Companion.step_8j1y0m$(function(t){return function(){var e=new Ye;return t.hasOwn_61zpoe$(Cl().DIRECTION)&&e.setDirection_61zpoe$(G(t.getString_61zpoe$(Cl().DIRECTION))),e}}(t));case"SEGMENT":return ze.Companion.segment_8j1y0m$(function(t){return function(){var e=new We;if(t.has_61zpoe$(Tl().ARROW)){var n=cr().create_za3rmp$(G(t.get_61zpoe$(Tl().ARROW)));e.arrowSpec=n.createArrowSpec()}return t.has_61zpoe$(Tl().ANIMATION)&&(e.animation=t.get_61zpoe$(Tl().ANIMATION)),t.has_61zpoe$(Tl().FLAT)&&(e.flat=t.getBoolean_ivxn3r$(Tl().FLAT)),e}}(t));case"PATH":return ze.Companion.path_8j1y0m$(function(t){return function(){var e=new Xe;return t.has_61zpoe$(Pl().ANIMATION)&&(e.animation=t.get_61zpoe$(Pl().ANIMATION)),t.has_61zpoe$(Pl().FLAT)&&(e.flat=t.getBoolean_ivxn3r$(Pl().FLAT)),e}}(t));case"POINT":return ze.Companion.point_8j1y0m$(function(t){return function(){var e,n=new Ze;return t.has_61zpoe$(Rl().ANIMATION)&&(n.animation=t.get_61zpoe$(Rl().ANIMATION)),n.sizeUnit=null!=(e=t.getString_61zpoe$(Rl().SIZE_UNIT))?e.toLowerCase():null,n}}(t));case"TEXT":return ze.Companion.text_8j1y0m$(function(t){return function(){var e=new Je;return da().applyTextOptions_0(t,e),e}}(t));case"LABEL":return ze.Companion.label_8j1y0m$(function(t){return function(){var e,n,i,o=new Qe;return da().applyTextOptions_0(t,o),null!=(e=t.getDouble_61zpoe$(ql().LABEL_PADDING))&&(o.paddingFactor=e),null!=(n=t.getDouble_61zpoe$(ql().LABEL_R))&&(o.radiusFactor=n),null!=(i=t.getDouble_61zpoe$(ql().LABEL_SIZE))&&(o.borderWidth=i),o}}(t));case"IMAGE":return ze.Companion.image_8j1y0m$(function(t){return function(){var e;if(!t.hasOwn_61zpoe$(zl().HREF))throw c("Image reference URL (href) is not specified.".toString());for(e=Se([zl().XMIN,zl().XMAX,zl().YMIN,zl().YMAX]).iterator();e.hasNext();){var n=e.next();if(!t.hasOwn_61zpoe$(n))throw c(("'"+n+"' is not specified.").toString())}return new tn(G(t.getString_61zpoe$(zl().HREF)),E.Companion.span_qt8ska$(new p(t.getDoubleSafe_61zpoe$(zl().XMIN),t.getDoubleSafe_61zpoe$(zl().YMIN)),new p(t.getDoubleSafe_61zpoe$(zl().XMAX),t.getDoubleSafe_61zpoe$(zl().YMAX))))}}(t));case"PIE":return ze.Companion.pie_8j1y0m$(function(t){return function(){var e,n,i,o=new en;if(null!=(e=t.getDouble_61zpoe$(Kl().HOLE))&&(o.holeSize=e),null!=(n=t.getDouble_61zpoe$(Kl().STROKE))&&(o.strokeWidth=n),null!=(i=t.getColor_61zpoe$(Kl().STROKE_COLOR))&&(o.strokeColor=i),t.has_61zpoe$(Kl().FILL_BY)){var r=G(t.getString_61zpoe$(Kl().FILL_BY)),a=$c().toAes_61zpoe$(r);o.fillWithColor=tt(a,Zt.Companion.COLOR)}return o}}(t));default:if(!da().PROVIDER_0.containsKey_11rb$(this.geomKind)){var e="Provider doesn't support geom kind: '"+this.geomKind+"'";throw c(e.toString())}return G(da().PROVIDER_0.get_11rb$(this.geomKind))}var n},ha.prototype.applyTextOptions_0=function(t,e){var n,i,o;null!=(n=t.getString_61zpoe$(Bl().LABEL_FORMAT))&&(e.formatter=F("format",function(t,e){return t.format_za3rmp$(e)}.bind(null,Gt.Companion.forOneArg_86f9bg$(n)))),null!=(i=t.getString_61zpoe$(Bl().NA_TEXT))&&(e.naValue=i),e.sizeUnit=null!=(o=t.getString_61zpoe$(Bl().SIZE_UNIT))?o.toLowerCase():null},ha.$metadata$={kind:m,simpleName:"Companion",interfaces:[]};var _a=null;function da(){return null===_a&&new ha,_a}function fa(t){Ea(),np.call(this,t)}function ma(){fa.call(this,f())}function $a(t){fa.call(this,t)}function ya(t,e){this.this$LegendConfig=t,this.closure$options=e}function ga(t,e){this.this$LegendConfig=t,this.closure$options=e}function va(t){fa.call(this,t)}function ba(t,e){this.this$ColorBarConfig=t,this.closure$options=e}function wa(t,e){this.this$ColorBarConfig=t,this.closure$options=e}function xa(t,e){this.this$ColorBarConfig=t,this.closure$options=e}function ka(){Ca=this}pa.$metadata$={kind:S,simpleName:"GeomProtoClientSide",interfaces:[sa]},fa.prototype.createGuideOptions=function(){var t=this.createGuideOptionsIntern();return t.isReverse=this.getBoolean_ivxn3r$(Ec().REVERSE),t},fa.prototype.trySafe_h2o7pw$=function(t){try{t.run()}catch(t){if(!e.isType(t,j))throw t}},ma.prototype.createGuideOptionsIntern=function(){return nn.Companion.NONE},ma.$metadata$={kind:S,simpleName:"GuideNoneConfig",interfaces:[fa]},ya.prototype.run=function(){this.closure$options.colCount=A(G(this.this$LegendConfig.getDouble_61zpoe$(bc().COL_COUNT)))},ya.$metadata$={kind:S,interfaces:[rn]},ga.prototype.run=function(){this.closure$options.rowCount=A(G(this.this$LegendConfig.getDouble_61zpoe$(bc().ROW_COUNT)))},ga.$metadata$={kind:S,interfaces:[rn]},$a.prototype.createGuideOptionsIntern=function(){var t=new on;return this.trySafe_h2o7pw$(new ya(this,t)),this.trySafe_h2o7pw$(new ga(this,t)),t.isByRow=this.getBoolean_ivxn3r$(bc().BY_ROW),t},$a.$metadata$={kind:S,simpleName:"LegendConfig",interfaces:[fa]},ba.prototype.run=function(){this.closure$options.width=this.this$ColorBarConfig.getDouble_61zpoe$(kc().WIDTH)},ba.$metadata$={kind:S,interfaces:[rn]},wa.prototype.run=function(){this.closure$options.height=this.this$ColorBarConfig.getDouble_61zpoe$(kc().HEIGHT)},wa.$metadata$={kind:S,interfaces:[rn]},xa.prototype.run=function(){this.closure$options.binCount=A(G(this.this$ColorBarConfig.getDouble_61zpoe$(kc().BIN_COUNT)))},xa.$metadata$={kind:S,interfaces:[rn]},va.prototype.createGuideOptionsIntern=function(){var t=new an;return this.trySafe_h2o7pw$(new ba(this,t)),this.trySafe_h2o7pw$(new wa(this,t)),this.trySafe_h2o7pw$(new xa(this,t)),t},va.$metadata$={kind:S,simpleName:"ColorBarConfig",interfaces:[fa]},ka.prototype.create_za3rmp$=function(t){var n;if(e.isType(t,d)){var i=e.isType(n=t,d)?n:v();return this.createForName_0($r().featureName_bkhwtg$(i),i)}return this.createForName_0(t.toString(),_())},ka.prototype.createForName_0=function(t,e){var n;switch(t){case"colorbar":case"colourbar":n=new va(e);break;case"none":n=new ma;break;case"legend":n=new $a(e);break;default:throw M(("Unknown guide name: "+t).toString())}return n},ka.$metadata$={kind:m,simpleName:"Companion",interfaces:[]};var Ca=null;function Ea(){return null===Ca&&new ka,Ca}function Sa(t,e){this.this$groupingBy=t,this.closure$keySelector=e}function Ta(t,n,i,o,r,a,s,l){var u,p,_,f,m,$,y;if(Pa(),np.call(this,t,Pa().initDefaultOptions_0(t,a)),this.geomProto=a,this.clientSide_0=s,this.stat=null,this.statKind=u_().safeValueOf_61zpoe$(this.getStringSafe_61zpoe$(Ms().STAT)),this.explicitGroupingVarName=null,this.posProvider=null,this.myCombinedData_0=null,this.varBindings=null,this.constantsMap=null,this.mySamplings_0=null,this.myOrderOptions_0=null,this.tooltips=null,this.annotations=null,this.ownData_pyxqt6$_0=null,this.myOwnDataUpdated_0=!1,u=tt(this.getString_61zpoe$(Ms().POS),sh().STACK)?F("sum",function(t,e){return t.sum_k9kaly$(e)}.bind(null,sn.SeriesUtil)):Ia,this.aggregateOperation=u,this.isMarginal=this.getBoolean_ivxn3r$(Ms().MARGINAL,!1),this.isMarginal){var g=this.getStringSafe_61zpoe$(js().SIDE).toLowerCase();switch(g){case"l":p=ln.LEFT;break;case"r":p=ln.RIGHT;break;case"t":p=ln.TOP;break;case"b":p=ln.BOTTOM;break;default:throw c(js().SIDE+" expected l|r|t|b but was '"+g+"'")}}else p=ln.LEFT;this.marginalSide=p,this.marginalSize=this.getDoubleDef_io5o9c$(js().SIZE,js().SIZE_DEFAULT);var b=Sr().createDataFrame_o3uhyx$(this,n,Sr().getAsDiscreteAesSet_bkhwtg$(o),i,this.clientSide_0),w=b.component1(),x=b.component2();this.clientSide_0||this.update_bm4g0d$(Ts().MAPPING,w),this.stat=h_().createStat_77pq5g$(this.statKind,new np(this.mergedOptions));var k,C,E=ot(this.geomProto.renders());k=!0===(C=this.clientSide_0)?E:!1===C?Nt(E,this.stat.consumes()):e.noWhenBranchMatched();var S,T=un(k,this.isYOrientation),P=Pt(i,w),I=Lt();for(S=P.entries.iterator();S.hasNext();){var A,R=S.next(),j=R.key;t:do{if(tt(j,$c().GROUP))A=!0;else if("string"==typeof j){var L=$c().toAes_61zpoe$(j);switch(this.statKind.name){case"QQ":case"QQ_LINE":A=T.contains_11rb$(L)||tt(L,Zt.Companion.SAMPLE);break t;default:A=T.contains_11rb$(L);break t}}else A=!1}while(0);A&&I.put_xwzc9p$(R.key,R.value)}var z,D=I,B=!D.isEmpty()||Dr().isGeoDataframe_gp9epa$(t,Ts().DATA)||Dr().isApplicable_9bzsud$(t,D,l)?n.isEmpty||x.isEmpty||n.rowCount()!==x.rowCount()?x.isEmpty?n:x:nt.DataFrameUtil.appendReplace_yxlle4$(n,x):et.Companion.emptyFrame(),U=Nt(Sr().getDateTimeColumns_bkhwtg$(o),Sr().getDateTimeColumns_bkhwtg$(this.getMap_61zpoe$(gs().DATA_META))),q={v:nt.DataFrameUtil.addDateTimeVariables_dipqvu$(B,U)};if(this.clientSide_0&&Dr().isApplicable_9bzsud$(t,D,l)){var H=new jr(this.geomProto.geomKind,q.v,t,D);q.v=H.dataAndCoordinates,z=H.mappings}else z=$r().createAesMapping_5bl3vv$(q.v,D);if(this.clientSide_0){var G,K,V=cn.Stats.defaultMapping_qbwusa$(this.stat);G=!0===(K=this.isYOrientation)?pn.YOrientationBaseUtil.flipAesKeys_fzsz32$(V):!1===K?V:e.noWhenBranchMatched(),z=Pt(G,z)}var Y,X=$c().REAL_AES_OPTION_NAMES,Z=h();for(Y=X.iterator();Y.hasNext();){var J=Y.next();this.hasOwn_61zpoe$(J)&&Z.add_11rb$(J)}var Q,it=N(O(Z,10));for(Q=Z.iterator();Q.hasNext();){var rt=Q.next();it.add_11rb$($c().toAes_61zpoe$(rt))}if(z=hn(z,it),this.constantsMap=ja().initConstants_6lkgym$(this,Ot(T,z.keys)),this.explicitGroupingVarName=this.initGroupingVarName_0(q.v,D),this.posProvider=sh().createPosProvider_x7u0o8$(ja().positionAdjustmentOptions_5jh3t9$(this,this.geomProto)),this.varBindings=ja().createBindings_58btk$(q.v,z,T,this.clientSide_0),this.ownData=x,_=this.clientSide_0?null:ja().initSampling_xcvavc$(this,this.geomProto.preferredSampling()),this.mySamplings_0=_,this.has_61zpoe$(Ms().TOOLTIPS))if(f=this.get_61zpoe$(Ms().TOOLTIPS),e.isType(f,d))m=new __(this.getMap_61zpoe$(Ms().TOOLTIPS),this.constantsMap,this.explicitGroupingVarName,this.varBindings).createTooltips();else{if(!tt(f,Ms().NONE))throw M("Incorrect tooltips specification".toString());m=_n.Companion.withoutTooltip()}else m=_n.Companion.defaultTooltip();this.tooltips=m,$=this.has_61zpoe$(Ms().ANNOTATIONS)?new ar(this.getMap_61zpoe$(Ms().ANNOTATIONS),this.constantsMap,this.explicitGroupingVarName,this.varBindings).createAnnotations():W.Companion.NONE,this.annotations=$;var at,st=Sr(),lt=h();for(at=r.iterator();at.hasNext();){var ut,ct=at.next(),pt=this.varBindings,ht=N(O(pt,10));for(ut=pt.iterator();ut.hasNext();){var _t=ut.next();ht.add_11rb$(_t.variable.name)}ht.contains_11rb$(ct.variableName)&<.add_11rb$(ct)}var dt,ft=new Sa(st.inheritToNonDiscrete_qxcvtk$(Ct(lt,Sr().getOrderOptions_tjia25$(t,D)),D),dn("variableName",1,(function(t){return t.variableName}))),mt=Lt();for(dt=ft.sourceIterator();dt.hasNext();){var $t,yt,gt=dt.next(),vt=ft.keyOf_11rb$(gt),bt=mt.get_11rb$(vt);if(null!=bt||mt.containsKey_11rb$(vt)){var wt=null==(yt=bt)||e.isType(yt,be)?yt:v();$t=It.Companion.mergeWith_me9ya9$(wt,gt)}else $t=gt;mt.put_xwzc9p$(vt,$t)}if(this.myOrderOptions_0=Ft(mt.values),this.clientSide_0){var xt,kt=this.myOrderOptions_0,Et=N(O(kt,10));for(xt=kt.iterator();xt.hasNext();){var Tt=xt.next();Et.add_11rb$(fn.OrderOptionUtil.createOrderSpec_e64h97$(q.v.variables(),this.varBindings,Tt,this.aggregateOperation))}var At=Et;y=St(q.v).addOrderSpecs_l2t0xf$(At).build()}else y=q.v;this.myCombinedData_0=y}function Oa(){Na=this}fa.$metadata$={kind:S,simpleName:"GuideConfig",interfaces:[np]},Sa.prototype.sourceIterator=function(){return this.this$groupingBy.iterator()},Sa.prototype.keyOf_11rb$=function(t){return this.closure$keySelector(t)},Sa.$metadata$={kind:S,interfaces:[mn]},Object.defineProperty(Ta.prototype,"ownData",{configurable:!0,get:function(){return this.ownData_pyxqt6$_0},set:function(t){this.ownData_pyxqt6$_0=t}}),Object.defineProperty(Ta.prototype,"combinedData",{configurable:!0,get:function(){if(this.myOwnDataUpdated_0)throw M("Check failed.".toString());return this.myCombinedData_0}}),Object.defineProperty(Ta.prototype,"isLegendDisabled",{configurable:!0,get:function(){return!!this.hasOwn_61zpoe$(Ms().SHOW_LEGEND)&&!this.getBoolean_ivxn3r$(Ms().SHOW_LEGEND,!0)}}),Object.defineProperty(Ta.prototype,"samplings",{configurable:!0,get:function(){if(this.clientSide_0)throw M("Check failed.".toString());return G(this.mySamplings_0)}}),Object.defineProperty(Ta.prototype,"isLiveMap",{configurable:!0,get:function(){return this.geomProto.geomKind===Ee.LIVE_MAP}}),Object.defineProperty(Ta.prototype,"orderOptions",{configurable:!0,get:function(){return this.myOrderOptions_0}}),Object.defineProperty(Ta.prototype,"isYOrientation",{configurable:!0,get:function(){var t,n,i,o;if(!0===(t=this.hasOwn_61zpoe$(Ms().ORIENTATION))){var r;if(null!=(i=null!=(n=this.getString_61zpoe$(Ms().ORIENTATION))?n.toLowerCase():null)){var a;t:do{switch(i){case"y":a=!0;break t;case"x":a=!1;break t;default:throw c(Ms().ORIENTATION+" expected x|y but was "+i)}}while(0);r=a}else r=null;return null!=(o=r)&&o}return!1!==t&&e.noWhenBranchMatched()}}),Ta.prototype.initGroupingVarName_0=function(t,n){var i,o=$c().GROUP,r=(e.isType(i=n,d)?i:v()).get_11rb$(o),a="string"==typeof r?r:null;if(null==a&&this.has_61zpoe$(Js().GEO_POSITIONS)){var s=nt.DataFrameUtil.variables_dhhkv7$(t).get_11rb$("group");null!=s&&(a=s.name)}return a},Ta.prototype.hasVarBinding_61zpoe$=function(t){var e;for(e=this.varBindings.iterator();e.hasNext();){var n=e.next();if(tt(n.variable.name,t))return!0}return!1},Ta.prototype.replaceOwnData_84jd1e$=function(t){if(this.clientSide_0)throw M("Check failed.".toString());if(null==t)throw c("Failed requirement.".toString());this.update_bm4g0d$(Ts().DATA,nt.DataFrameUtil.toMap_dhhkv7$(t)),this.ownData=t,this.myOwnDataUpdated_0=!0},Ta.prototype.hasExplicitGrouping=function(){return null!=this.explicitGroupingVarName},Ta.prototype.isExplicitGrouping_61zpoe$=function(t){return null!=this.explicitGroupingVarName&&tt(this.explicitGroupingVarName,t)},Ta.prototype.getVariableForAes_896ixz$=function(t){var e,n,i=this.varBindings;t:do{var o;for(o=i.iterator();o.hasNext();){var r=o.next();if(tt(r.aes,t)){n=r;break t}}n=null}while(0);return null!=(e=n)?e.variable:null},Ta.prototype.getMapJoin=function(){if(!this.hasOwn_61zpoe$(Ms().MAP_JOIN))return null;var t=this.getList_61zpoe$(Ms().MAP_JOIN);if(2!==t.size)throw c("map_join require 2 parameters".toString());var n=t.get_za3lpa$(0),i=t.get_za3lpa$(1);if(null==n)throw c("Failed requirement.".toString());if(null==i)throw c("Failed requirement.".toString());if(!e.isType(n,lt)){var o="Wrong map_join parameter type: should be a list of strings, but was "+k(e.getKClassFromExpression(n).simpleName);throw c(o.toString())}if(!e.isType(i,lt)){var r="Wrong map_join parameter type: should be a list of string, but was "+k(e.getKClassFromExpression(i).simpleName);throw c(r.toString())}return new z(n,i)},Oa.prototype.initDefaultOptions_0=function(t,n){var i,o,r,a=Ms().GEOM,s=(e.isType(r=t,d)?r:v()).containsKey_11rb$(a);if(!s){var l,u=Ms().STAT;s=(e.isType(l=t,d)?l:v()).containsKey_11rb$(u)}if(!s)throw c("Either 'geom' or 'stat' must be specified.".toString());var p=_();p.putAll_a2k3zr$(n.defaultOptions());var h,f=Ms().STAT,m=null==(i=(e.isType(h=t,d)?h:v()).get_11rb$(f))||"string"==typeof i?i:v();return null==m&&(m="string"==typeof(o=p.get_11rb$(Ms().STAT))?o:v()),Pt(p,h_().defaultOptions_xssx85$(m,n.geomKind))},Oa.$metadata$={kind:m,simpleName:"Companion",interfaces:[]};var Na=null;function Pa(){return null===Na&&new Oa,Na}function Ia(t){return sn.SeriesUtil.mean_l4tjj7$(t,null)}function Aa(){Ra=this}Ta.$metadata$={kind:S,simpleName:"LayerConfig",interfaces:[np]},Aa.prototype.positionAdjustmentOptions_5jh3t9$=function(t,n){var i,o=n.preferredPositionAdjustmentOptions_opf53k$(t),r=t.get_61zpoe$(Ms().POS),a=null==r?o:e.isType(r,d)?e.isType(i=r,d)?i:v():ne(wt(gs().NAME,r.toString()));return tt(a.get_11rb$(gs().NAME),o.get_11rb$(gs().NAME))?Pt(o,a):a},Aa.prototype.initConstants_6lkgym$=function(t,e){var n,i=_(),o=$c().REAL_AES_OPTION_NAMES,r=F("has",function(t,e){return t.has_61zpoe$(e)}.bind(null,t)),a=h();for(n=o.iterator();n.hasNext();){var s=n.next();r(s)&&a.add_11rb$(s)}var l,u,p=F("toAes",function(t,e){return t.toAes_61zpoe$(e)}.bind(null,$c())),d=jt(Rt(At(O(a,10)),16));for(l=a.iterator();l.hasNext();){var f=l.next();d.put_xwzc9p$(f,p(f))}var m,$=Lt();for(u=d.entries.iterator();u.hasNext();){var y=u.next();e.contains_11rb$(y.value)&&$.put_xwzc9p$(y.key,y.value)}for(m=$.entries.iterator();m.hasNext();){var g,v=m.next(),b=v.key,w=v.value,x=G(t.get_61zpoe$(b));if(null==(g=m_().apply_kqseza$(w,x)))throw c("Can't convert to '"+b+"' value: "+x.toString());var k=g;i.put_xwzc9p$(w,k)}return i},Aa.prototype.createBindings_58btk$=function(t,e,n,i){var o,r,a=h();if(null!=e){var s=$n(n);for(s.retainAll_brywnq$(e.keys),o=s.iterator();o.hasNext();){var l=o.next(),u=Ae(e,l);if(t.has_8xm3sj$(u))r=new yn(u,l);else{if(!u.isStat||i)throw c(t.undefinedVariableErrorMessage_61zpoe$(u.name));r=new yn(u,l)}var p=r;a.add_11rb$(p)}}return a},Aa.prototype.initSampling_xcvavc$=function(t,e){return t.has_61zpoe$(Ms().SAMPLING)?ch().create_za3rmp$(G(t.get_61zpoe$(Ms().SAMPLING))):x(e)},Aa.$metadata$={kind:m,simpleName:"LayerConfigUtil",interfaces:[]};var Ra=null;function ja(){return null===Ra&&new Aa,Ra}function La(t,e,n,i){Fa(),np.call(this,t),this.constantsMap_y737o$_0=e,this.groupingVarName_e9l838$_0=n,this.varBindings_j6oqz6$_0=i}function za(t,e,n,i,o){this.$outer=t,this.lines_0=e,this.titleLine_0=o;var r,a=this.prepareFormats_0(n),s=jt(At(a.size));for(r=a.entries.iterator();r.hasNext();){var l=r.next(),c=s.put_xwzc9p$,p=l.key,h=l.key,_=l.value;c.call(s,p,this.createValueSource_0(h.name,h.isAes,_))}var d,f=s,m=Lt(),$=N(a.size);for(d=a.entries.iterator();d.hasNext();){var y=d.next(),g=$.add_11rb$,v=y.key,b=y.value,w=this.getAesValueSourceForVariable_0(v,b,f);m.putAll_a2k3zr$(w),g.call($,u)}this.myValueSources_0=Tn(Pt(f,m));var x,k=N(O(i,10));for(x=i.iterator();x.hasNext();){var C=x.next(),E=k.add_11rb$,S=this.getValueSource_1(this.varField_0(C));E.call(k,bn.Companion.defaultLineForValueSource_u47np3$(S))}this.myLinesForVariableList_0=k}function Da(t,e){this.name=t,this.isAes=e}function Ma(){Ba=this,this.AES_NAME_PREFIX_0="^",this.VARIABLE_NAME_PREFIX_0="@",this.LABEL_SEPARATOR_0="|",this.SOURCE_RE_PATTERN_0=H("(?:\\\\\\^|\\\\@)|(\\^\\w+)|@(([\\w^@]+)|(\\{(.*?)\\})|\\.{2}\\w+\\.{2})")}La.prototype.create=function(){return new za(this,this.has_61zpoe$(Gs().LINES)?this.getStringList_61zpoe$(Gs().LINES):null,this.getList_61zpoe$(Gs().FORMATS),this.getStringList_61zpoe$(Gs().VARIABLES),this.getString_61zpoe$(Gs().TITLE)).parse_8be2vx$()},za.prototype.parse_8be2vx$=function(){var t,e,n=this.parseLines_0(),i=null!=(t=this.titleLine_0)?F("parseLine",function(t,e){return t.parseLine_0(e)}.bind(null,this))(t):null,o=this.myValueSources_0,r=N(o.size);for(e=o.entries.iterator();e.hasNext();){var a=e.next();r.add_11rb$(a.value)}return new gn(r,n,i)},za.prototype.parseLines_0=function(){var t,e;if(null!=(t=this.lines_0)){var n,i=F("parseLine",function(t,e){return t.parseLine_0(e)}.bind(null,this)),o=N(O(t,10));for(n=t.iterator();n.hasNext();){var r=n.next();o.add_11rb$(i(r))}e=o}else e=null;var a=e;return null!=a?Ct(this.myLinesForVariableList_0,a):this.myLinesForVariableList_0.isEmpty()?null:this.myLinesForVariableList_0},za.prototype.parseLine_0=function(t){var e,n,i=this.detachLabel_0(t),o=vn(t,Fa().LABEL_SEPARATOR_0),r=h(),a=Fa().SOURCE_RE_PATTERN_0.replace_20wsma$(o,(e=r,n=this,function(t){if(tt(t.value,"\\^")||tt(t.value,"\\@"))return bt(t.value,"\\");var i=e,o=n.getValueSource_0(t.value);return i.add_11rb$(o),Gt.Companion.valueInLinePattern()}));return new bn(i,a,r)},za.prototype.createValueSource_0=function(t,e,n){var i;if(void 0===n&&(n=null),e&&tt(t,$c().GROUP)){if(null==this.$outer.groupingVarName_e9l838$_0)throw c("Variable name for 'group' is not specified".toString());i=new wn(this.$outer.groupingVarName_e9l838$_0,n)}else if(e){var o=$c().toAes_61zpoe$(t),r=this.$outer.constantsMap_y737o$_0.get_11rb$(o);i=null==r?new xn(o,void 0,void 0,n):new kn(o,r,n)}else i=new wn(t,n);return i},za.prototype.prepareFormats_0=function(t){var n,i=Lt();for(n=t.iterator();n.hasNext();){var o,r,a,s=n.next();if(!e.isType(s,d))throw c("Wrong 'format' arguments".toString());if(!_p(s,[qs().FIELD])||!_p(s,[qs().FORMAT]))throw c("Invalid 'format' arguments: 'field' and 'format' are expected".toString());var l,u,p=qs().FIELD,_="string"==typeof(o=(e.isType(l=s,d)?l:v()).get_11rb$(p))?o:v(),f=qs().FORMAT,m="string"==typeof(r=(e.isType(u=s,d)?u:v()).get_11rb$(f))?r:v();if(vt(_,Fa().AES_NAME_PREFIX_0)){switch(bt(_,Fa().AES_NAME_PREFIX_0)){case"X":var $,y=Zt.Companion.values(),g=F("isPositionalX",function(t,e){return t.isPositionalX_896ixz$(e)}.bind(null,Zt.Companion)),b=h();for($=y.iterator();$.hasNext();){var w=$.next();g(w)&&b.add_11rb$(w)}a=b;break;case"Y":var x,k=Zt.Companion.values(),C=F("isPositionalY",function(t,e){return t.isPositionalY_896ixz$(e)}.bind(null,Zt.Companion)),E=h();for(x=k.iterator();x.hasNext();){var S=x.next();C(S)&&E.add_11rb$(S)}a=E;break;default:var T=this.aesField_0(bt(_,Fa().AES_NAME_PREFIX_0));i.put_xwzc9p$(T,m),a=Y()}var O;for(O=a.iterator();O.hasNext();){var N,P=O.next(),I=this.aesField_0(P.name);(e.isType(N=i,d)?N:v()).containsKey_11rb$(I)||i.put_xwzc9p$(I,m)}}else{var A=this.varField_0(this.detachVariableName_0(_));i.put_xwzc9p$(A,m)}}return i},za.prototype.getAesValueSourceForVariable_0=function(t,n,i){if(t.isAes)return f();var o,r=this.$outer.varBindings_j6oqz6$_0,a=h();for(o=r.iterator();o.hasNext();){var s=o.next();tt(s.variable.name,t.name)&&a.add_11rb$(s)}var l,u=dn("aes",1,(function(t){return t.aes})),c=N(O(a,10));for(l=a.iterator();l.hasNext();){var p=l.next();c.add_11rb$(u(p))}var _,m=Rt(At(O(c,10)),16),$=jt(m);for(_=c.iterator();_.hasNext();){var y,g=_.next(),b=this.aesField_0(g.name),w=(e.isType(y=i,d)?y:v()).containsKey_11rb$(b)?wt(b,G(i.get_11rb$(b))):wt(b,this.createValueSource_0(g.name,!0,n));$.put_xwzc9p$(w.first,w.second)}return $},za.prototype.getValueSource_1=function(t){var n,i,o,r=this.myValueSources_0;if(!(e.isType(o=r,d)?o:v()).containsKey_11rb$(t)){var a,s=this.getAesValueSourceForVariable_0(t,null,this.myValueSources_0),l=Lt();for(a=s.entries.iterator();a.hasNext();){var u,c=a.next(),p=this.myValueSources_0,h=c.key;(e.isType(u=p,d)?u:v()).containsKey_11rb$(h)&&l.put_xwzc9p$(c.key,c.value)}var _,f=Cn(null!=(n=l.isEmpty()?null:l)?n:s);t:do{var m=f.iterator();if(!m.hasNext()){_=null;break t}var $=m.next();if(!m.hasNext()){_=$;break t}var y=$.component1().name;do{var g=m.next(),b=g.component1().name;e.compareTo(y,b)>0&&($=g,y=b)}while(m.hasNext());_=$}while(0);var w=null!=(i=_)?i.second:null,x=this.myValueSources_0,k=null!=w?w:this.createValueSource_0(t.name,t.isAes);x.put_xwzc9p$(t,k)}return G(this.myValueSources_0.get_11rb$(t))},za.prototype.getValueSource_0=function(t){var e;if(vt(t,Fa().AES_NAME_PREFIX_0))e=this.aesField_0(bt(t,Fa().AES_NAME_PREFIX_0));else{if(!vt(t,Fa().VARIABLE_NAME_PREFIX_0))throw M(('Unknown type of the field with name = "'+t+'"').toString());e=this.varField_0(this.detachVariableName_0(t))}var n=e;return this.getValueSource_1(n)},za.prototype.detachVariableName_0=function(t){return En(bt(t,Fa().VARIABLE_NAME_PREFIX_0),"{","}")},za.prototype.detachLabel_0=function(t){var n;if(L(t,Fa().LABEL_SEPARATOR_0)){var i,o=Sn(t,Fa().LABEL_SEPARATOR_0);n=On(e.isCharSequence(i=o)?i:v()).toString()}else n=null;return n},za.prototype.aesField_0=function(t){return new Da(t,!0)},za.prototype.varField_0=function(t){return new Da(t,!1)},za.$metadata$={kind:S,simpleName:"LineSpecConfigParserHelper",interfaces:[]},Da.$metadata$={kind:S,simpleName:"Field",interfaces:[]},Da.prototype.component1=function(){return this.name},Da.prototype.component2=function(){return this.isAes},Da.prototype.copy_ivxn3r$=function(t,e){return new Da(void 0===t?this.name:t,void 0===e?this.isAes:e)},Da.prototype.toString=function(){return"Field(name="+e.toString(this.name)+", isAes="+e.toString(this.isAes)+")"},Da.prototype.hashCode=function(){var t=0;return 31*(t=31*t+e.hashCode(this.name)|0)+e.hashCode(this.isAes)|0},Da.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.name,t.name)&&e.equals(this.isAes,t.isAes)},Ma.$metadata$={kind:m,simpleName:"Companion",interfaces:[]};var Ba=null;function Fa(){return null===Ba&&new Ma,Ba}function Ua(){Ka()}function qa(){Ga=this}function Ha(t){var n,i=Ms().GEOM;return tt((e.isType(n=t,d)?n:v()).get_11rb$(i),Dc().LIVE_MAP)}La.$metadata$={kind:S,simpleName:"LineSpecConfigParser",interfaces:[np]},qa.prototype.parseFromPlotSpec_x7u0o8$=function(t){var n,i=Ha,o=G(Sp(t,[Ps().LAYERS]));t:do{var r;if(e.isType(o,we)&&o.isEmpty()){n=!1;break t}for(r=o.iterator();r.hasNext();)if(i(r.next())){n=!0;break t}n=!1}while(0);if(n){var a;t:do{var s;if(e.isType(o,we)&&o.isEmpty()){a=0;break t}var l=0;for(s=o.iterator();s.hasNext();)i(s.next())&&Pn(l=l+1|0);a=l}while(0);if(1!==a)throw c("Only one geom_livemap is allowed per plot".toString());if(!i(Nn(o)))throw c("geom_livemap should be a first geom".toString());return Nn(o)}return null},qa.$metadata$={kind:m,simpleName:"Companion",interfaces:[]};var Ga=null;function Ka(){return null===Ga&&new qa,Ga}function Va(){ep=this}function Ya(){ys=this,this.KIND="kind",this.NAME="name",this.DATA_META="data_meta",this.MAP_DATA_META="map_data_meta"}function Wa(){Xa=this,this.PLOT="plot",this.GG_BUNCH="ggbunch",this.POS="pos"}Wa.$metadata$={kind:m,simpleName:"Kind",interfaces:[]};var Xa=null;function Za(){return null===Xa&&new Wa,Xa}function Ja(){Qa=this,this.TAG="pubsub",this.CHANNEL_ID="channel_id",this.COL_NAMES="col_names"}Ja.$metadata$={kind:m,simpleName:"PubSub",interfaces:[]};var Qa=null;function ts(){es=this,this.GDF="geodataframe",this.GEOMETRY="geometry"}ts.$metadata$={kind:m,simpleName:"GeoDataFrame",interfaces:[]};var es=null;function ns(){return null===es&&new ts,es}function is(){ss=this,this.GEOREFERENCE="georeference",this.REQUEST="request",this.MAP_REGION_COLUMN="region"}function os(){rs=this,this.ID="id",this.POSITION="position",this.LIMIT="limit",this.CENTROID="centroid"}os.$metadata$={kind:m,simpleName:"Columns",interfaces:[]};var rs=null;function as(){return null===rs&&new os,rs}is.$metadata$={kind:m,simpleName:"GeoReference",interfaces:[]};var ss=null;function ls(){return null===ss&&new is,ss}function us(){cs=this,this.TAG="mapping_annotations",this.AES="aes",this.ANNOTATION="annotation",this.AS_DISCRETE="as_discrete",this.PARAMETERS="parameters",this.LABEL="label",this.ORDER_BY="order_by",this.ORDER="order"}us.$metadata$={kind:m,simpleName:"MappingAnnotation",interfaces:[]};var cs=null;function ps(){return null===cs&&new us,cs}function hs(){ms=this,this.TAG="series_annotations",this.COLUMN="column",this.TYPE="type"}function _s(){ds=this,this.DATE_TIME="datetime",this.TIME_ZONE="time_zone"}_s.$metadata$={kind:m,simpleName:"DateTime",interfaces:[]};var ds=null;function fs(){return null===ds&&new _s,ds}hs.$metadata$={kind:m,simpleName:"SeriesAnnotation",interfaces:[]};var ms=null;function $s(){return null===ms&&new hs,ms}Ya.$metadata$={kind:m,simpleName:"Meta",interfaces:[]};var ys=null;function gs(){return null===ys&&new Ya,ys}function vs(){ks=this,this.ITEMS="items"}function bs(){ws=this,this.X="x",this.Y="y",this.WIDTH="width",this.HEIGHT="height",this.FEATURE_SPEC="feature_spec"}bs.$metadata$={kind:m,simpleName:"Item",interfaces:[]};var ws=null;function xs(){return null===ws&&new bs,ws}vs.$metadata$={kind:m,simpleName:"GGBunch",interfaces:[]};var ks=null;function Cs(){return null===ks&&new vs,ks}function Es(){Ss=this,this.DATA="data",this.MAPPING="mapping"}Es.$metadata$={kind:m,simpleName:"PlotBase",interfaces:[]};var Ss=null;function Ts(){return null===Ss&&new Es,Ss}function Os(){Ns=this,this.BISTRO="bistro",this.LAYERS="layers",this.SCALES="scales",this.TITLE="ggtitle",this.TITLE_TEXT="text",this.SUBTITLE_TEXT="subtitle",this.CAPTION="caption",this.CAPTION_TEXT="text",this.COORD="coord",this.FACET="facet",this.THEME="theme",this.SIZE="ggsize",this.GUIDES="guides",this.WIDTH="width",this.HEIGHT="height",this.METAINFO_LIST="metainfo_list",this.METAINFO="metainfo"}Os.$metadata$={kind:m,simpleName:"Plot",interfaces:[]};var Ns=null;function Ps(){return null===Ns&&new Os,Ns}function Is(){Ds=this,this.GEOM="geom",this.STAT="stat",this.POS="position",this.SAMPLING="sampling",this.SHOW_LEGEND="show_legend",this.TOOLTIPS="tooltips",this.TOOLTIP_ANCHOR="tooltip_anchor",this.TOOLTIP_MIN_WIDTH="tooltip_min_width",this.NONE="none",this.MAP_JOIN="map_join",this.USE_CRS="use_crs",this.ORIENTATION="orientation",this.MARGINAL="marginal",this.ANNOTATIONS="labels",this.ANNOTATION_SIZE="annotation_size"}function As(){Rs=this,this.SIZE="margin_size",this.SIZE_DEFAULT=.1,this.SIDE="margin_side",this.SIDE_LEFT="l",this.SIDE_RIGHT="r",this.SIDE_TOP="t",this.SIDE_BOTTOM="b"}As.$metadata$={kind:m,simpleName:"Marginal",interfaces:[]};var Rs=null;function js(){return null===Rs&&new As,Rs}function Ls(){zs=this,this.PROVIDED="provided"}Ls.$metadata$={kind:m,simpleName:"CRS",interfaces:[]};var zs=null;Is.$metadata$={kind:m,simpleName:"Layer",interfaces:[]};var Ds=null;function Ms(){return null===Ds&&new Is,Ds}function Bs(){Hs=this,this.LINES="lines",this.FORMATS="formats",this.VARIABLES="variables",this.TITLE="title"}function Fs(){Us=this,this.FIELD="field",this.FORMAT="format"}Fs.$metadata$={kind:m,simpleName:"Format",interfaces:[]};var Us=null;function qs(){return null===Us&&new Fs,Us}Bs.$metadata$={kind:m,simpleName:"LinesSpec",interfaces:[]};var Hs=null;function Gs(){return null===Hs&&new Bs,Hs}function Ks(){Ql=this}function Vs(){Ys=this,this.DOTSIZE="dotsize",this.STACKRATIO="stackratio",this.STACKGROUPS="stackgroups",this.STACKDIR="stackdir",this.METHOD="method"}Vs.$metadata$={kind:m,simpleName:"Dotplot",interfaces:[]};var Ys=null;function Ws(){return null===Ys&&new Vs,Ys}function Xs(){Zs=this,this.GEO_POSITIONS="map"}Xs.$metadata$={kind:m,simpleName:"Choropleth",interfaces:[]};var Zs=null;function Js(){return null===Zs&&new Xs,Zs}function Qs(){tl=this,this.FATTEN="fatten"}Qs.$metadata$={kind:m,simpleName:"CrossBar",interfaces:[]};var tl=null;function el(){return null===tl&&new Qs,tl}function nl(){il=this,this.FATTEN="fatten"}nl.$metadata$={kind:m,simpleName:"PointRange",interfaces:[]};var il=null;function ol(){return null===il&&new nl,il}function rl(){al=this,this.FATTEN="fatten",this.WHISKER_WIDTH="whisker_width"}rl.$metadata$={kind:m,simpleName:"Boxplot",interfaces:[]};var al=null;function sl(){return null===al&&new rl,al}function ll(){ul=this,this.COLOR="outlier_color",this.FILL="outlier_fill",this.SHAPE="outlier_shape",this.SIZE="outlier_size"}ll.$metadata$={kind:m,simpleName:"BoxplotOutlier",interfaces:[]};var ul=null;function cl(){return null===ul&&new ll,ul}function pl(){hl=this,this.SCALE="scale",this.MIN_HEIGHT="min_height",this.QUANTILE_LINES="quantile_lines"}pl.$metadata$={kind:m,simpleName:"AreaRidges",interfaces:[]};var hl=null;function _l(){return null===hl&&new pl,hl}function dl(){fl=this,this.DRAW_QUANTILES="draw_quantiles",this.SHOW_HALF="show_half"}dl.$metadata$={kind:m,simpleName:"Violin",interfaces:[]};var fl=null;function ml(){return null===fl&&new dl,fl}function $l(){yl=this,this.DOTSIZE="dotsize",this.STACKRATIO="stackratio",this.STACKGROUPS="stackgroups",this.STACKDIR="stackdir",this.METHOD="method"}$l.$metadata$={kind:m,simpleName:"YDotplot",interfaces:[]};var yl=null;function gl(){return null===yl&&new $l,yl}function vl(){bl=this,this.WIDTH="width",this.HEIGHT="height"}vl.$metadata$={kind:m,simpleName:"Jitter",interfaces:[]};var bl=null;function wl(){return null===bl&&new vl,bl}function xl(){kl=this,this.DIRECTION="direction"}xl.$metadata$={kind:m,simpleName:"Step",interfaces:[]};var kl=null;function Cl(){return null===kl&&new xl,kl}function El(){Sl=this,this.ARROW="arrow",this.ANIMATION="animation",this.FLAT="flat"}El.$metadata$={kind:m,simpleName:"Segment",interfaces:[]};var Sl=null;function Tl(){return null===Sl&&new El,Sl}function Ol(){Nl=this,this.ANIMATION="animation",this.FLAT="flat"}Ol.$metadata$={kind:m,simpleName:"Path",interfaces:[]};var Nl=null;function Pl(){return null===Nl&&new Ol,Nl}function Il(){Al=this,this.ANIMATION="animation",this.SIZE_UNIT="size_unit"}Il.$metadata$={kind:m,simpleName:"Point",interfaces:[]};var Al=null;function Rl(){return null===Al&&new Il,Al}function jl(){Ll=this,this.HREF="href",this.XMIN=Zt.Companion.XMIN.name,this.XMAX=Zt.Companion.XMAX.name,this.YMIN=Zt.Companion.YMIN.name,this.YMAX=Zt.Companion.YMAX.name}jl.$metadata$={kind:m,simpleName:"Image",interfaces:[]};var Ll=null;function zl(){return null===Ll&&new jl,Ll}function Dl(){Ml=this,this.LABEL_FORMAT="label_format",this.NA_TEXT="na_text",this.SIZE_UNIT="size_unit",this.NUDGE_X="nudge_x",this.NUDGE_Y="nudge_y"}Dl.$metadata$={kind:m,simpleName:"Text",interfaces:[]};var Ml=null;function Bl(){return null===Ml&&new Dl,Ml}function Fl(){Ul=this,this.LABEL_PADDING="label_padding",this.LABEL_R="label_r",this.LABEL_SIZE="label_size"}Fl.$metadata$={kind:m,simpleName:"Label",interfaces:[]};var Ul=null;function ql(){return null===Ul&&new Fl,Ul}function Hl(){Gl=this,this.FILL_BY="fill_by",this.HOLE="hole",this.STROKE="stroke",this.STROKE_COLOR="stroke_color"}Hl.$metadata$={kind:m,simpleName:"Pie",interfaces:[]};var Gl=null;function Kl(){return null===Gl&&new Hl,Gl}function Vl(){Xl=this,this.INTERACTIVE="interactive",this.LOCATION="location",this.ZOOM="zoom",this.STROKE="stroke",this.CLUSTERING="clustering",this.LABELS="labels",this.THEME="theme",this.PROJECTION="projection",this.SHOW_COORD_PICK_TOOLS="show_coord_pick_tools",this.DATA_SIZE_ZOOMIN="data_size_zoomin",this.CONST_SIZE_ZOOMIN="const_size_zoomin",this.TILES="tiles",this.GEOCODING="geocoding",this.DEV_PARAMS="dev_params"}function Yl(){Wl=this,this.KIND="kind",this.URL="url",this.THEME="theme",this.ATTRIBUTION="attribution",this.MIN_ZOOM="min_zoom",this.MAX_ZOOM="max_zoom",this.FILL_COLOR="fill_color",this.KIND_VECTOR_LETS_PLOT="vector_lets_plot",this.KIND_RASTER_ZXY="raster_zxy",this.KIND_SOLID="solid",this.KIND_CHESSBOARD="chessboard",this.THEME_COLOR="color",this.THEME_LIGHT="light",this.THEME_DARK="dark"}Yl.$metadata$={kind:m,simpleName:"Tile",interfaces:[]};var Wl=null;Vl.$metadata$={kind:m,simpleName:"LiveMap",interfaces:[]};var Xl=null;function Zl(){Jl=this,this.X="x",this.Y="y"}Zl.$metadata$={kind:m,simpleName:"SizeUnit",interfaces:[]};var Jl=null;Ks.$metadata$={kind:m,simpleName:"Geom",interfaces:[]};var Ql=null;function tu(){Lu=this}function eu(){nu=this,this.COEF="coef",this.VARWIDTH="varwidth"}eu.$metadata$={kind:m,simpleName:"Boxplot",interfaces:[]};var nu=null;function iu(){return null===nu&&new eu,nu}function ou(){ru=this,this.BINS="bins",this.BINWIDTH="binwidth",this.METHOD="method",this.CENTER="center",this.BOUNDARY="boundary"}ou.$metadata$={kind:m,simpleName:"Bin",interfaces:[]};var ru=null;function au(){return null===ru&&new ou,ru}function su(){lu=this,this.BINS="bins",this.BINWIDTH="binwidth",this.DROP="drop"}su.$metadata$={kind:m,simpleName:"Bin2d",interfaces:[]};var lu=null;function uu(){return null===lu&&new su,lu}function cu(){pu=this,this.BINS="bins",this.BINWIDTH="binwidth"}cu.$metadata$={kind:m,simpleName:"Contour",interfaces:[]};var pu=null;function hu(){return null===pu&&new cu,pu}function _u(){du=this,this.METHOD="method",this.TYPE="type",this.FILL_DIAGONAL="diag",this.THRESHOLD="threshold"}_u.$metadata$={kind:m,simpleName:"Corr",interfaces:[]};var du=null;function fu(){mu=this,this.POINT_COUNT="n",this.METHOD="method",this.CONFIDENCE_LEVEL="level",this.DISPLAY_CONFIDENCE_INTERVAL="se",this.SPAN="span",this.POLYNOMIAL_DEGREE="deg",this.LOESS_CRITICAL_SIZE="max_n",this.SAMPLING_SEED="seed"}fu.$metadata$={kind:m,simpleName:"Smooth",interfaces:[]};var mu=null;function $u(){return null===mu&&new fu,mu}function yu(){gu=this,this.TRIM="trim",this.N="n",this.KERNEL="kernel",this.BAND_WIDTH="bw",this.ADJUST="adjust",this.FULL_SCAN_MAX="fs_max"}yu.$metadata$={kind:m,simpleName:"Density",interfaces:[]};var gu=null;function vu(){return null===gu&&new yu,gu}function bu(){wu=this,this.N="n",this.KERNEL="kernel",this.BAND_WIDTH="bw",this.ADJUST="adjust",this.IS_CONTOUR="contour",this.BINS="bins",this.BINWIDTH="binwidth"}bu.$metadata$={kind:m,simpleName:"Density2d",interfaces:[]};var wu=null;function xu(){return null===wu&&new bu,wu}function ku(){Cu=this,this.TRIM="trim",this.TAILS_CUTOFF="tails_cutoff",this.QUANTILES="quantiles"}ku.$metadata$={kind:m,simpleName:"DensityRidges",interfaces:[]};var Cu=null;function Eu(){return null===Cu&&new ku,Cu}function Su(){Tu=this,this.SCALE="scale",this.TRIM="trim",this.TAILS_CUTOFF="tails_cutoff"}Su.$metadata$={kind:m,simpleName:"YDensity",interfaces:[]};var Tu=null;function Ou(){return null===Tu&&new Su,Tu}function Nu(){Pu=this,this.DISTRIBUTION="distribution",this.DISTRIBUTION_PARAMETERS="dparams"}Nu.$metadata$={kind:m,simpleName:"QQ",interfaces:[]};var Pu=null;function Iu(){return null===Pu&&new Nu,Pu}function Au(){Ru=this,this.DISTRIBUTION="distribution",this.DISTRIBUTION_PARAMETERS="dparams",this.LINE_QUANTILES="quantiles"}Au.$metadata$={kind:m,simpleName:"QQLine",interfaces:[]};var Ru=null;function ju(){return null===Ru&&new Au,Ru}tu.$metadata$={kind:m,simpleName:"Stat",interfaces:[]};var Lu=null;function zu(){nc=this}function Du(){Mu=this,this.WIDTH="width"}Du.$metadata$={kind:m,simpleName:"Dodge",interfaces:[]};var Mu=null;function Bu(){return null===Mu&&new Du,Mu}function Fu(){Uu=this,this.WIDTH="width",this.HEIGHT="height"}Fu.$metadata$={kind:m,simpleName:"Jitter",interfaces:[]};var Uu=null;function qu(){return null===Uu&&new Fu,Uu}function Hu(){Gu=this,this.WIDTH="x",this.HEIGHT="y"}Hu.$metadata$={kind:m,simpleName:"Nudge",interfaces:[]};var Gu=null;function Ku(){return null===Gu&&new Hu,Gu}function Vu(){Yu=this,this.DODGE_WIDTH="dodge_width",this.JITTER_WIDTH="jitter_width",this.JITTER_HEIGHT="jitter_height"}Vu.$metadata$={kind:m,simpleName:"JitterDodge",interfaces:[]};var Yu=null;function Wu(){return null===Yu&&new Vu,Yu}function Xu(){Zu=this,this.VJUST="vjust"}Xu.$metadata$={kind:m,simpleName:"Stack",interfaces:[]};var Zu=null;function Ju(){return null===Zu&&new Xu,Zu}function Qu(){tc=this,this.VJUST="vjust"}Qu.$metadata$={kind:m,simpleName:"Fill",interfaces:[]};var tc=null;function ec(){return null===tc&&new Qu,tc}zu.$metadata$={kind:m,simpleName:"Pos",interfaces:[]};var nc=null;function ic(){cc=this,this.NAME=gs().NAME,this.AES="aesthetic",this.BREAKS="breaks",this.LABELS="labels",this.EXPAND="expand",this.LIMITS="limits",this.DISCRETE_DOMAIN="discrete",this.DISCRETE_DOMAIN_REVERSE="reverse",this.DATE_TIME="datetime",this.TIME="time",this.NA_VALUE="na_value",this.GUIDE="guide",this.FORMAT="format",this.POSITION="position",this.POSITION_L="left",this.POSITION_R="right",this.POSITION_T="top",this.POSITION_B="bottom",this.CONTINUOUS_TRANSFORM="trans",this.OUTPUT_VALUES="values",this.SHAPE_SOLID="solid",this.LOW="low",this.MID="mid",this.HIGH="high",this.MIDPOINT="midpoint",this.COLORS="colors",this.HUE_RANGE="h",this.CHROMA="c",this.LUMINANCE="l",this.START_HUE="h_start",this.DIRECTION="direction",this.START="start",this.END="end",this.PALETTE_TYPE="type",this.PALETTE="palette",this.RANGE="range",this.MAX_SIZE="max_size",this.SCALE_MAPPER_KIND="scale_mapper_kind"}function oc(){rc=this,this.IDENTITY="identity",this.COLOR_GRADIENT="color_gradient",this.COLOR_GRADIENT2="color_gradient2",this.COLOR_GRADIENTN="color_gradientn",this.COLOR_HUE="color_hue",this.COLOR_GREY="color_grey",this.COLOR_BREWER="color_brewer",this.COLOR_CMAP="color_cmap",this.SIZE_AREA="size_area"}oc.$metadata$={kind:m,simpleName:"MapperKind",interfaces:[]};var rc=null;function ac(){return null===rc&&new oc,rc}function sc(){lc=this,this.CMAP_NAME="option",this.ALPHA="alpha",this.BEGIN="begin",this.END="end",this.DIRECTION="direction"}sc.$metadata$={kind:m,simpleName:"Viridis",interfaces:[]};var lc=null;function uc(){return null===lc&&new sc,lc}ic.$metadata$={kind:m,simpleName:"Scale",interfaces:[]};var cc=null;function pc(){return null===cc&&new ic,cc}function hc(){_c=this,this.NAME=gs().NAME,this.NAME_GRID="grid",this.NAME_WRAP="wrap",this.SCALES="scales",this.SCALES_FIXED="fixed",this.SCALES_FREE="free",this.SCALES_FREE_X="free_x",this.SCALES_FREE_Y="free_y",this.X="x",this.Y="y",this.X_ORDER="x_order",this.Y_ORDER="y_order",this.X_FORMAT="x_format",this.Y_FORMAT="y_format",this.FACETS="facets",this.NCOL="ncol",this.NROW="nrow",this.FACETS_ORDER="order",this.FACETS_FILL_DIR="dir",this.FACETS_FORMAT="format",this.FACET_ORDER_ASC=1,this.FACET_ORDER_DESC=-1,this.FACET_FILL_VERT="v",this.FACET_FILL_HOR="h"}hc.$metadata$={kind:m,simpleName:"Facet",interfaces:[]};var _c=null;function dc(){return null===_c&&new hc,_c}function fc(){var t;for(mc=this,this.GROUP="group",this.AES_BY_OPTION_0=_(),this.REAL_AES_OPTION_NAMES=this.AES_BY_OPTION_0.keys,t=Zt.Companion.values().iterator();t.hasNext();){var e=t.next(),n=this.AES_BY_OPTION_0,i=this.toOption_896ixz$(e);n.put_xwzc9p$(i,e)}var o=this.AES_BY_OPTION_0,r=Zt.Companion.COLOR;o.put_xwzc9p$("colour",r);var a=this.AES_BY_OPTION_0,s=Zt.Companion.COLOR;a.put_xwzc9p$("col",s)}fc.prototype.toAes_61zpoe$=function(t){if(!this.AES_BY_OPTION_0.containsKey_11rb$(t))throw c(("Not an aesthetic: '"+t+"'").toString());return G(this.AES_BY_OPTION_0.get_11rb$(t))},fc.prototype.toOption_896ixz$=function(t){return t.name.toLowerCase()},fc.$metadata$={kind:m,simpleName:"Mapping",interfaces:[]};var mc=null;function $c(){return null===mc&&new fc,mc}function yc(){Cc=this,this.NONE="none",this.LEGEND="legend",this.COLOR_BAR="colorbar",this.COLOR_BAR_GB="colourbar",this.REVERSE="reverse"}function gc(){vc=this,this.ROW_COUNT="nrow",this.COL_COUNT="ncol",this.BY_ROW="byrow"}gc.$metadata$={kind:m,simpleName:"Legend",interfaces:[]};var vc=null;function bc(){return null===vc&&new gc,vc}function wc(){xc=this,this.WIDTH="barwidth",this.HEIGHT="barheight",this.BIN_COUNT="nbin"}wc.$metadata$={kind:m,simpleName:"ColorBar",interfaces:[]};var xc=null;function kc(){return null===xc&&new wc,xc}yc.$metadata$={kind:m,simpleName:"Guide",interfaces:[]};var Cc=null;function Ec(){return null===Cc&&new yc,Cc}function Sc(){Tc=this,this.ANGLE="angle",this.LENGTH="length",this.ENDS="ends",this.TYPE="type"}Sc.$metadata$={kind:m,simpleName:"Arrow",interfaces:[]};var Tc=null;function Oc(){return null===Tc&&new Sc,Tc}function Nc(){Pc=this,this.NONE="none",this.N="n",this.SEED="seed",this.MIN_SUB_SAMPLE="min_subsample"}Nc.$metadata$={kind:m,simpleName:"Sampling",interfaces:[]};var Pc=null;function Ic(){return null===Pc&&new Nc,Pc}function Ac(){Rc=this,this.FLAVOR="flavor",this.ELEMENT_BLANK=In.ThemeOption.ELEMENT_BLANK_SHORTHAND}Ac.$metadata$={kind:m,simpleName:"Theme",interfaces:[]};var Rc=null;function jc(){return null===Rc&&new Ac,Rc}function Lc(){zc=this,this.PATH_0="path",this.LINE_0="line",this.SMOOTH_0="smooth",this.BAR_0="bar",this.HISTOGRAM="histogram",this.DOT_PLOT_0="dotplot",this.TILE_0="tile",this.BIN_2D_0="bin2d",this.MAP_0="map",this.ERROR_BAR_0="errorbar",this.CROSS_BAR_0="crossbar",this.LINE_RANGE_0="linerange",this.POINT_RANGE_0="pointrange",this.POLYGON="polygon",this.AB_LINE_0="abline",this.H_LINE_0="hline",this.V_LINE_0="vline",this.BOX_PLOT="boxplot",this.AREA_RIDGES_0="area_ridges",this.VIOLIN_0="violin",this.Y_DOT_PLOT="ydotplot",this.LIVE_MAP="livemap",this.POINT="point",this.RIBBON_0="ribbon",this.AREA_0="area",this.DENSITY_0="density",this.CONTOUR_0="contour",this.CONTOURF_0="contourf",this.DENSITY2D_0="density2d",this.DENSITY2DF_0="density2df",this.JITTER="jitter",this.Q_Q_0="qq",this.Q_Q_2_0="qq2",this.Q_Q_LINE_0="qq_line",this.Q_Q_2_LINE_0="qq2_line",this.FREQPOLY_0="freqpoly",this.STEP_0="step",this.RECT_0="rect",this.SEGMENT_0="segment",this.TEXT="text",this.LABEL="label",this.RASTER_0="raster",this.IMAGE="image",this.PIE="pie",this.GEOM_KIND_MAP_0=null;var t=_(),e=this.PATH_0,n=Ee.PATH;t.put_xwzc9p$(e,n);var i=this.LINE_0,o=Ee.LINE;t.put_xwzc9p$(i,o);var r=this.SMOOTH_0,a=Ee.SMOOTH;t.put_xwzc9p$(r,a);var s=this.BAR_0,l=Ee.BAR;t.put_xwzc9p$(s,l);var u=this.HISTOGRAM,c=Ee.HISTOGRAM;t.put_xwzc9p$(u,c);var p=this.DOT_PLOT_0,h=Ee.DOT_PLOT;t.put_xwzc9p$(p,h);var d=this.Y_DOT_PLOT,f=Ee.Y_DOT_PLOT;t.put_xwzc9p$(d,f);var m=this.TILE_0,$=Ee.TILE;t.put_xwzc9p$(m,$);var y=this.BIN_2D_0,g=Ee.BIN_2D;t.put_xwzc9p$(y,g);var v=this.MAP_0,b=Ee.MAP;t.put_xwzc9p$(v,b);var w=this.ERROR_BAR_0,x=Ee.ERROR_BAR;t.put_xwzc9p$(w,x);var k=this.CROSS_BAR_0,C=Ee.CROSS_BAR;t.put_xwzc9p$(k,C);var E=this.LINE_RANGE_0,S=Ee.LINE_RANGE;t.put_xwzc9p$(E,S);var T=this.POINT_RANGE_0,O=Ee.POINT_RANGE;t.put_xwzc9p$(T,O);var N=this.POLYGON,P=Ee.POLYGON;t.put_xwzc9p$(N,P);var I=this.AB_LINE_0,A=Ee.AB_LINE;t.put_xwzc9p$(I,A);var R=this.H_LINE_0,j=Ee.H_LINE;t.put_xwzc9p$(R,j);var L=this.V_LINE_0,z=Ee.V_LINE;t.put_xwzc9p$(L,z);var D=this.BOX_PLOT,M=Ee.BOX_PLOT;t.put_xwzc9p$(D,M);var B=this.AREA_RIDGES_0,F=Ee.AREA_RIDGES;t.put_xwzc9p$(B,F);var U=this.VIOLIN_0,q=Ee.VIOLIN;t.put_xwzc9p$(U,q);var H=this.LIVE_MAP,G=Ee.LIVE_MAP;t.put_xwzc9p$(H,G);var K=this.POINT,V=Ee.POINT;t.put_xwzc9p$(K,V);var Y=this.RIBBON_0,W=Ee.RIBBON;t.put_xwzc9p$(Y,W);var X=this.AREA_0,Z=Ee.AREA;t.put_xwzc9p$(X,Z);var J=this.DENSITY_0,Q=Ee.DENSITY;t.put_xwzc9p$(J,Q);var tt=this.CONTOUR_0,et=Ee.CONTOUR;t.put_xwzc9p$(tt,et);var nt=this.CONTOURF_0,it=Ee.CONTOURF;t.put_xwzc9p$(nt,it);var ot=this.DENSITY2D_0,rt=Ee.DENSITY2D;t.put_xwzc9p$(ot,rt);var at=this.DENSITY2DF_0,st=Ee.DENSITY2DF;t.put_xwzc9p$(at,st);var lt=this.JITTER,ut=Ee.JITTER;t.put_xwzc9p$(lt,ut);var ct=this.Q_Q_0,pt=Ee.Q_Q;t.put_xwzc9p$(ct,pt);var ht=this.Q_Q_2_0,_t=Ee.Q_Q_2;t.put_xwzc9p$(ht,_t);var dt=this.Q_Q_LINE_0,ft=Ee.Q_Q_LINE;t.put_xwzc9p$(dt,ft);var mt=this.Q_Q_2_LINE_0,$t=Ee.Q_Q_2_LINE;t.put_xwzc9p$(mt,$t);var yt=this.FREQPOLY_0,gt=Ee.FREQPOLY;t.put_xwzc9p$(yt,gt);var vt=this.STEP_0,bt=Ee.STEP;t.put_xwzc9p$(vt,bt);var wt=this.RECT_0,xt=Ee.RECT;t.put_xwzc9p$(wt,xt);var kt=this.SEGMENT_0,Ct=Ee.SEGMENT;t.put_xwzc9p$(kt,Ct);var Et=this.TEXT,St=Ee.TEXT;t.put_xwzc9p$(Et,St);var Tt=this.LABEL,Ot=Ee.LABEL;t.put_xwzc9p$(Tt,Ot);var Nt=this.RASTER_0,Pt=Ee.RASTER;t.put_xwzc9p$(Nt,Pt);var It=this.IMAGE,At=Ee.IMAGE;t.put_xwzc9p$(It,At);var Rt=this.PIE,jt=Ee.PIE;t.put_xwzc9p$(Rt,jt),this.GEOM_KIND_MAP_0=t}Lc.prototype.toGeomKind_61zpoe$=function(t){if(!this.GEOM_KIND_MAP_0.containsKey_11rb$(t))throw c("Unknown geom name: '"+t+"'");return G(this.GEOM_KIND_MAP_0.get_11rb$(t))},Lc.prototype.fromGeomKind_7dhqpi$=function(t){var e,n,i,o=this.GEOM_KIND_MAP_0.entries;t:do{var r;for(r=o.iterator();r.hasNext();){var a=r.next();if(a.value===t){i=a;break t}}i=null}while(0);if(null==(n=null!=(e=i)?e.key:null))throw c("Unknown geom: '"+t.name.toLowerCase()+"'");return n},Lc.prototype.values=function(){return this.GEOM_KIND_MAP_0.keys},Lc.$metadata$={kind:m,simpleName:"GeomName",interfaces:[]};var zc=null;function Dc(){return null===zc&&new Lc,zc}function Mc(){Uc=this,this.X_LIM="xlim",this.Y_LIM="ylim",this.RATIO="ratio",this.FLIPPED="flip",this.EXPAND="expand",this.ORIENTATION="orientation",this.PROJECTION="projection"}function Bc(){Fc=this,this.MERCATOR="mercator",this.IDENTITY="identity"}Bc.$metadata$={kind:m,simpleName:"Projections",interfaces:[]};var Fc=null;Mc.$metadata$={kind:m,simpleName:"Coord",interfaces:[]};var Uc=null;function qc(){return null===Uc&&new Mc,Uc}function Hc(){Gc=this,this.CARTESIAN="cartesian",this.FIXED="fixed",this.MAP="map",this.FLIP="flip",this.QUICK_MAP="quickmap",this.EQUAL="equal",this.POLAR="polar",this.TRANS="trans"}Hc.$metadata$={kind:m,simpleName:"CoordName",interfaces:[]};var Gc=null;function Kc(){return null===Gc&&new Hc,Gc}function Vc(){Yc=this,this.IDENTITY="identity",this.LOG10="log10",this.REVERSE="reverse",this.SQRT="sqrt"}Vc.$metadata$={kind:m,simpleName:"TransformName",interfaces:[]};var Yc=null;function Wc(){return null===Yc&&new Vc,Yc}function Xc(){Zc=this,this.FONT_METRICS_ADJUSTMENT="font_metrics_adjustment",this.FONT_FAMILY_INFO="font_family_info"}Xc.$metadata$={kind:m,simpleName:"PlotMetainfo",interfaces:[]};var Zc=null;function Jc(){Qc=this,this.FAMILY="family",this.WIDTH_CORRECTION="width_correction",this.MONOSPACED="monospaced"}Jc.$metadata$={kind:m,simpleName:"FontMetainfo",interfaces:[]};var Qc=null;function tp(){return null===Qc&&new Jc,Qc}Va.$metadata$={kind:m,simpleName:"Option",interfaces:[]};var ep=null;function np(t,e){cp(),void 0===e&&(e=f()),this.options_hgg89y$_0=t,this.defaultOptions_3ebv0h$_0=e}function ip(t){return e.isNumber(t)}function op(t){return null==t||e.isNumber(t)}function rp(t){return e.isNumber(t)}function ap(t){return null==t||e.isNumber(t)}function sp(t){return"string"==typeof t}function lp(){up=this}Object.defineProperty(np.prototype,"mergedOptions",{configurable:!0,get:function(){return Pt(this.defaultOptions_3ebv0h$_0,this.options_hgg89y$_0)}}),Object.defineProperty(np.prototype,"isEmpty",{configurable:!0,get:function(){return this.options_hgg89y$_0.isEmpty()&&this.defaultOptions_3ebv0h$_0.isEmpty()}}),np.prototype.update_bm4g0d$=function(t,n){var i;(e.isType(i=this.options_hgg89y$_0,g)?i:v()).put_xwzc9p$(t,n)},np.prototype.update_x7u0o8$=function(t){var n;(e.isType(n=this.options_hgg89y$_0,g)?n:v()).putAll_a2k3zr$(t)},np.prototype.has_61zpoe$=function(t){return this.hasOwn_61zpoe$(t)||null!=this.defaultOptions_3ebv0h$_0.get_11rb$(t)},np.prototype.hasOwn_61zpoe$=function(t){return null!=this.options_hgg89y$_0.get_11rb$(t)},np.prototype.get_61zpoe$=function(t){return this.hasOwn_61zpoe$(t)?this.options_hgg89y$_0.get_11rb$(t):this.defaultOptions_3ebv0h$_0.get_11rb$(t)},np.prototype.getSafe_61zpoe$=function(t){var e;if(null==(e=this.get_61zpoe$(t)))throw M("Option `"+t+"` not found.");return e},np.prototype.getString_61zpoe$=function(t){var e;return null!=(e=this.get_61zpoe$(t))?e.toString():null},np.prototype.getStringSafe_61zpoe$=function(t){var e;if(null==(e=this.getString_61zpoe$(t)))throw c("Can't get string value: option '"+t+"' is not present.");return e},np.prototype.getList_61zpoe$=function(t){var n;if(null==(n=this.get_61zpoe$(t)))return h();var i=n;if(!e.isType(i,lt)){var o="Not a List: "+t+": "+k(e.getKClassFromExpression(i).simpleName);throw c(o.toString())}return i},np.prototype.getDoubleList_61zpoe$=function(t){var e,n=this.getNumList_61zpoe$(t),i=N(O(n,10));for(e=n.iterator();e.hasNext();){var o=e.next();i.add_11rb$(ut(o))}return i},np.prototype.getOrderedBoundedDoubleDistinctPair_ai6r6m$=function(t,e,n){var i=this.pickTwo_ce1hvq$_0(t,this.getBoundedDoubleList_ai6r6m$(t,e,n));if(!(i.first=2)){var n=t+" requires a list of 2 but was "+e.size;throw c(n.toString())}return new z(e.get_za3lpa$(0),e.get_za3lpa$(1))},np.prototype.getNumList_61zpoe$=function(t){var n;return e.isType(n=this.getNumList_q98glf$_0(t,rp),lt)?n:v()},np.prototype.getNumQList_61zpoe$=function(t){return this.getNumList_q98glf$_0(t,ap)},np.prototype.getNumber_p2oh8l$_0=function(t){var n;if(null==(n=this.get_61zpoe$(t)))return null;var i=n;if(!e.isNumber(i)){var o="Parameter '"+t+"' expected to be a Number, but was "+k(e.getKClassFromExpression(i).simpleName);throw c(o.toString())}return i},np.prototype.getNumList_q98glf$_0=function(t,n){var i,o,r=this.getList_61zpoe$(t);return cp().requireAll_0(r,n,(o=t,function(t){return o+" requires a list of numbers but not numeric encountered: "+k(t)})),e.isType(i=r,lt)?i:v()},np.prototype.getAsList_61zpoe$=function(t){var n,i=null!=(n=this.get_61zpoe$(t))?n:Y();return e.isType(i,lt)?i:x(i)},np.prototype.getAsStringList_61zpoe$=function(t){var e,n=rt(this.getAsList_61zpoe$(t)),i=N(O(n,10));for(e=n.iterator();e.hasNext();){var o=e.next();i.add_11rb$(o.toString())}return i},np.prototype.getStringList_61zpoe$=function(t){var n,i,o=this.getList_61zpoe$(t);return cp().requireAll_0(o,sp,(i=t,function(t){return i+" requires a list of strings but not string encountered: "+k(t)})),e.isType(n=o,lt)?n:v()},np.prototype.getRange_y4putb$=function(t){if(!this.has_61zpoe$(t))throw c("'Range' value is expected in form: [min, max]".toString());var e=this.getRangeOrNull_61zpoe$(t);if(null==e){var n="'range' value is expected in form: [min, max] but was: "+k(this.get_61zpoe$(t));throw c(n.toString())}return e},np.prototype.getRangeOrNull_61zpoe$=function(t){var n,i,o,r=this.get_61zpoe$(t),a=e.isType(r,lt)&&2===r.size;if(a){var s;t:do{var l;if(e.isType(r,we)&&r.isEmpty()){s=!0;break t}for(l=r.iterator();l.hasNext();){var u=l.next();if(!e.isNumber(u)){s=!1;break t}}s=!0}while(0);a=s}if(!0!==a)return null;var c=ut(e.isNumber(n=Nn(r))?n:v()),p=ut(e.isNumber(i=Rn(r))?i:v());try{o=new _t(c,p)}catch(t){if(!e.isType(t,ge))throw t;o=null}return o},np.prototype.getMap_61zpoe$=function(t){var n,i;if(null==(n=this.get_61zpoe$(t)))return f();var o=n;if(!e.isType(o,d)){var r="Not a Map: "+t+": "+e.getKClassFromExpression(o).simpleName;throw c(r.toString())}return e.isType(i=o,d)?i:v()},np.prototype.getBoolean_ivxn3r$=function(t,e){var n,i;return void 0===e&&(e=!1),null!=(i="boolean"==typeof(n=this.get_61zpoe$(t))?n:null)?i:e},np.prototype.getDouble_61zpoe$=function(t){var e;return null!=(e=this.getNumber_p2oh8l$_0(t))?ut(e):null},np.prototype.getDoubleSafe_61zpoe$=function(t){var e,n;if(null==(n=null!=(e=this.getNumber_p2oh8l$_0(t))?ut(e):null))throw c("Can't get double value: option '"+t+"' is not present.");return n},np.prototype.getInteger_61zpoe$=function(t){var e;return null!=(e=this.getNumber_p2oh8l$_0(t))?A(e):null},np.prototype.getLong_61zpoe$=function(t){var e;return null!=(e=this.getNumber_p2oh8l$_0(t))?jn(e):null},np.prototype.getDoubleDef_io5o9c$=function(t,e){var n;return null!=(n=this.getDouble_61zpoe$(t))?n:e},np.prototype.getIntegerDef_bm4lxs$=function(t,e){var n;return null!=(n=this.getInteger_61zpoe$(t))?n:e},np.prototype.getLongDef_4wgjuj$=function(t,e){var n;return null!=(n=this.getLong_61zpoe$(t))?n:e},np.prototype.getValueOrNull_qu2sip$_0=function(t,e){var n;return null==(n=this.get_61zpoe$(t))?null:e(n)},np.prototype.getColor_61zpoe$=function(t){return this.getValue_1va84n$(Zt.Companion.COLOR,t)},np.prototype.getShape_61zpoe$=function(t){return this.getValue_1va84n$(Zt.Companion.SHAPE,t)},np.prototype.getValue_1va84n$=function(t,e){var n;if(null==(n=this.get_61zpoe$(e)))return null;var i=n;return m_().apply_kqseza$(t,i)},lp.prototype.over_x7u0o8$=function(t){return new np(t)},lp.prototype.requireAll_0=function(t,e,n){var i,o,r=h();for(o=t.iterator();o.hasNext();){var a=o.next();e(a)||r.add_11rb$(a)}if(null!=(i=Ln(r))){var s=n(i);throw c(s.toString())}},lp.$metadata$={kind:m,simpleName:"Companion",interfaces:[]};var up=null;function cp(){return null===up&&new lp,up}function pp(t,e){return hp(t,zn(e,1),Dn(e))}function hp(t,e,n){var i;return null!=(i=kp(t,e))?i.get_11rb$(n):null}function _p(t,e){return dp(t,zn(e,1),Dn(e))}function dp(t,e,n){var i,o;return null!=(o=null!=(i=kp(t,e))?i.containsKey_11rb$(n):null)&&o}function fp(t,e){return mp(t,zn(e,1),Dn(e))}function mp(t,e,n){var i,o;return"string"==typeof(o=null!=(i=kp(t,e))?i.get_11rb$(n):null)?o:null}function $p(t,e){return yp(t,zn(e,1),Dn(e))}function yp(t,e,n){var i;return null!=(i=vp(t,e,n))?ut(i):null}function gp(t,e,n){var i;return null!=(i=vp(t,e,n))?A(i):null}function vp(t,n,i){var o,r;return e.isNumber(r=null!=(o=kp(t,n))?o.get_11rb$(i):null)?r:null}function bp(t,e){return wp(t,zn(e,1),Dn(e))}function wp(t,n,i){var o,r,a=null!=(o=kp(t,n))?o.get_11rb$(i):null;if("string"==typeof a)switch(a.toLowerCase()){case"1":case"true":r=!0;break;case"0":case"false":r=!1;break;default:throw c("Unexpected boolean value: '"+k(a)+"'")}else r=e.isNumber(a)?0!==A(a):"boolean"==typeof a?a:null;return r}function xp(t,e){var n;return null!=(n=kp(t,Fn(e)))?Tp(n):null}function kp(t,n){var i,o,r=t;for(o=n.iterator();o.hasNext();){var a,s=o.next(),l=r;t:do{var u,c,p;if(null==(c=null!=(u=null!=l?pp(l,[s]):null)&&e.isType(p=u,d)?p:null)){a=null;break t}a=c}while(0);r=a}return null!=(i=r)?Tp(i):null}function Cp(t,e){return Ep(t,zn(e,1),Dn(e))}function Ep(t,n,i){var o,r;return e.isType(r=null!=(o=kp(t,n))?o.get_11rb$(i):null,lt)?r:null}function Sp(t,n){var i,o,r;if(null!=(i=Cp(t,n.slice()))){var a,s=h();for(a=i.iterator();a.hasNext();){var l,u,c=a.next();null!=(l=e.isType(u=c,d)?u:null)&&s.add_11rb$(l)}r=s}else r=null;return null!=(o=r)?Ft(o):null}function Tp(t){var n;return e.isType(n=t,d)?n:v()}function Op(t,e,n){this.varBindings_0=t,this.dataByVarBinding=e,this.variablesByMappedAes=n}function Np(t,e){var n,i;Ap(),np.call(this,t,Ap().DEF_OPTIONS_0),this.isClientSide_xcbgug$_0=e,this.layerConfigs=null,this.facets=null,this.scaleConfigs=null,this.mapperProviderByAes=null,this.scaleProviderByAes=null,this.transformByAes=null,this.sharedData_n7yy0l$_0=null;var o=Sr().createDataFrame_o3uhyx$(this,et.Companion.emptyFrame(),xt(),f(),this.isClientSide_xcbgug$_0),r=o.component1(),a=o.component2();this.sharedData=a,this.isClientSide_xcbgug$_0||this.update_bm4g0d$(Ts().MAPPING,r),this.layerConfigs=this.createLayerConfigs_usvduj$_0(this.sharedData);var s=!this.isClientSide_xcbgug$_0;if(this.scaleConfigs=oh().createScaleConfigs_2rp8vd$(Ct(this.getList_61zpoe$(Ps().SCALES),Sr().createScaleSpecs_x7u0o8$(t))),this.mapperProviderByAes=qp().createMapperProviders_4llv70$(this.layerConfigs,this.scaleConfigs,s),this.scaleProviderByAes=Wp().createScaleProviders_4llv70$(this.layerConfigs,this.scaleConfigs,s),this.transformByAes=eh().createTransforms_9iw3y2$(this.layerConfigs,this.scaleProviderByAes,this.mapperProviderByAes,s),this.has_61zpoe$(Ps().FACET)){var l=new Or(this.getMap_61zpoe$(Ps().FACET)),u=h();for(n=this.layerConfigs.iterator();n.hasNext();){var c=n.next();u.add_11rb$(c.combinedData)}i=l.createFacets_wcy4lu$(u)}else i=D.Companion.undefined();this.facets=i}function Pp(){Ip=this,this.ERROR_MESSAGE_0="__error_message",this.DEF_OPTIONS_0=f(),this.PLOT_COMPUTATION_MESSAGES_8be2vx$="computation_messages"}np.$metadata$={kind:S,simpleName:"OptionsAccessor",interfaces:[]},Op.prototype.mappedAesWithoutStatPositional=function(){var t,e=this.varBindings_0,n=h();for(t=e.iterator();t.hasNext();){var i=t.next();i.variable.isStat&&Zt.Companion.isPositionalXY_896ixz$(i.aes)||n.add_11rb$(i)}var o,r=N(O(n,10));for(o=n.iterator();o.hasNext();){var a=o.next();r.add_11rb$(a.aes)}return ot(r)},Op.prototype.dataByVarBindingWithoutStatPositional=function(){var t,e=this.dataByVarBinding,n=Lt();for(t=e.entries.iterator();t.hasNext();){var i=t.next(),o=i.key;o.variable.isStat&&Zt.Companion.isPositionalXY_896ixz$(o.aes)||n.put_xwzc9p$(i.key,i.value)}return n},Op.$metadata$={kind:S,simpleName:"PlotAesBindingSetup",interfaces:[]},Object.defineProperty(Np.prototype,"sharedData",{configurable:!0,get:function(){return this.sharedData_n7yy0l$_0},set:function(t){this.sharedData_n7yy0l$_0=t}}),Object.defineProperty(Np.prototype,"title",{configurable:!0,get:function(){var t;return null==(t=this.getMap_61zpoe$(Ps().TITLE).get_11rb$(Ps().TITLE_TEXT))||"string"==typeof t?t:v()}}),Object.defineProperty(Np.prototype,"subtitle",{configurable:!0,get:function(){var t;return null==(t=this.getMap_61zpoe$(Ps().TITLE).get_11rb$(Ps().SUBTITLE_TEXT))||"string"==typeof t?t:v()}}),Object.defineProperty(Np.prototype,"caption",{configurable:!0,get:function(){var t;return null==(t=this.getMap_61zpoe$(Ps().CAPTION).get_11rb$(Ps().CAPTION_TEXT))||"string"==typeof t?t:v()}}),Object.defineProperty(Np.prototype,"containsLiveMap",{configurable:!0,get:function(){var t,n=this.layerConfigs,i=dn("isLiveMap",1,(function(t){return t.isLiveMap}));t:do{var o;if(e.isType(n,we)&&n.isEmpty()){t=!1;break t}for(o=n.iterator();o.hasNext();)if(i(o.next())){t=!0;break t}t=!1}while(0);return t}}),Np.prototype.createLayerConfigs_usvduj$_0=function(t){var n,i,o=h(),r=this.getList_61zpoe$(Ps().LAYERS),a=h();for(i=r.iterator();i.hasNext();){var s,l,u,p=i.next();null!=(s=null!=(u=e.isType(l=p,d)?l:null)?fp(u,[Ms().GEOM]):null)&&a.add_11rb$(s)}var _,f,m=F("toGeomKind",function(t,e){return t.toGeomKind_61zpoe$(e)}.bind(null,Dc())),$=N(O(a,10));for(_=a.iterator();_.hasNext();){var y=_.next();$.add_11rb$(m(y))}t:do{var g;if(e.isType($,we)&&$.isEmpty()){f=!1;break t}for(g=$.iterator();g.hasNext();){var b=g.next();if(Se([Ee.LIVE_MAP,Ee.MAP]).contains_11rb$(b)){f=!0;break t}}f=!1}while(0);var w=f;for(n=r.iterator();n.hasNext();){var x=n.next();if(!e.isType(x,d)){var C="Layer options: expected Map but was "+k(e.getKClassFromExpression(G(x)).simpleName);throw c(C.toString())}e.isType(x,d)||v();var E=this.createLayerConfig_4qlr5d$(x,t,this.getMap_61zpoe$(Ts().MAPPING),this.getMap_61zpoe$(gs().DATA_META),Sr().getOrderOptions_tjia25$(this.mergedOptions,this.getMap_61zpoe$(Ts().MAPPING)),w);o.add_11rb$(E)}return o},Np.prototype.replaceSharedData_dhhkv7$=function(t){if(this.isClientSide_xcbgug$_0)throw M("Check failed.".toString());this.sharedData=t,this.update_bm4g0d$(Ts().DATA,nt.DataFrameUtil.toMap_dhhkv7$(t))},Pp.prototype.failure_61zpoe$=function(t){return ne(wt(this.ERROR_MESSAGE_0,t))},Pp.prototype.assertPlotSpecOrErrorMessage_x7u0o8$=function(t){if(!(this.isFailure_x7u0o8$(t)||this.isPlotSpec_bkhwtg$(t)||this.isGGBunchSpec_bkhwtg$(t)))throw c("Invalid root feature kind: absent or unsupported `kind` key")},Pp.prototype.assertPlotSpec_x7u0o8$=function(t){if(!this.isPlotSpec_bkhwtg$(t)&&!this.isGGBunchSpec_bkhwtg$(t))throw c("Invalid root feature kind: absent or unsupported `kind` key")},Pp.prototype.isFailure_x7u0o8$=function(t){return t.containsKey_11rb$(this.ERROR_MESSAGE_0)},Pp.prototype.getErrorMessage_x7u0o8$=function(t){return k(t.get_11rb$(this.ERROR_MESSAGE_0))},Pp.prototype.isPlotSpec_bkhwtg$=function(t){return tt(Za().PLOT,this.specKind_bkhwtg$(t))},Pp.prototype.isGGBunchSpec_bkhwtg$=function(t){return tt(Za().GG_BUNCH,this.specKind_bkhwtg$(t))},Pp.prototype.specKind_bkhwtg$=function(t){var n,i=gs().KIND;return(e.isType(n=t,d)?n:v()).get_11rb$(i)},Pp.$metadata$={kind:m,simpleName:"Companion",interfaces:[]};var Ip=null;function Ap(){return null===Ip&&new Pp,Ip}function Rp(t){zp(),Np.call(this,t,!0),this.fontFamilyRegistry_8be2vx$=null,this.theme_8be2vx$=null,this.coordProvider_8be2vx$=null,this.guideOptionsMap_8be2vx$=null,this.scaleMap=null,this.mappersByAesNP=null,this.xAxisOrientation_8be2vx$=null,this.yAxisOrientation_8be2vx$=null,this.fontFamilyRegistry_8be2vx$=new Rr(this).createFontFamilyRegistry(),this.theme_8be2vx$=new H_(this.getMap_61zpoe$(Ps().THEME),this.fontFamilyRegistry_8be2vx$).theme;var n,i=Kp().createMappers_iobu9w$(this.layerConfigs,this.transformByAes,this.mapperProviderByAes);this.scaleMap=Jp().createScales_t8derc$(this.layerConfigs,this.transformByAes,i,this.scaleProviderByAes);var o=Lt();for(n=i.entries.iterator();n.hasNext();){var r=n.next(),a=r.key;Zt.Companion.isPositional_896ixz$(a)||o.put_xwzc9p$(r.key,r.value)}this.mappersByAesNP=o;var s,l=this.layerConfigs;t:do{var u;for(u=l.iterator();u.hasNext();){var c,p=u.next(),h=(e.isType(c=p.geomProto,pa)?c:v()).preferredCoordinateSystem_qfcmxu$(p);if(null!=h){s=h;break t}}s=null}while(0);var _=null!=s?s:ft.CoordProviders.cartesian_11nazf$(),d=br().create_ymsr13$(this.get_61zpoe$(Ps().COORD),Ae(this.transformByAes,Zt.Companion.X),Ae(this.transformByAes,Zt.Companion.Y),_);this.coordProvider_8be2vx$=d,this.guideOptionsMap_8be2vx$=Pt(Bp().createGuideOptionsMap_v6zdyz$(this.scaleConfigs),Bp().createGuideOptionsMap_e6mjjf$(this.getMap_61zpoe$(Ps().GUIDES))),this.xAxisOrientation_8be2vx$=G(Ae(this.scaleProviderByAes,Zt.Companion.X).axisOrientation),this.yAxisOrientation_8be2vx$=G(Ae(this.scaleProviderByAes,Zt.Companion.Y).axisOrientation)}function jp(){Lp=this}Np.$metadata$={kind:S,simpleName:"PlotConfig",interfaces:[np]},Rp.prototype.createLayerConfig_4qlr5d$=function(t,e,n,i,o,r){var a,s="string"==typeof(a=t.get_11rb$(Ms().GEOM))?a:v();return new Ta(t,e,n,i,o,new pa(Dc().toGeomKind_61zpoe$(s)),!0,r)},jp.prototype.processTransform_2wxo1b$=function(t){var e=t,n=Ap().isGGBunchSpec_bkhwtg$(e);return e=ad().builderForRawSpec().build().apply_i49brq$(e),ad().builderForRawSpec().change_t6n62v$(Nd().specSelector_6taknv$(n),new Sd).build().apply_i49brq$(e)},jp.prototype.create_vb0rb2$=function(t,e){var n=oh().findComputationMessages_x7u0o8$(t);return n.isEmpty()||e(n),new Rp(t)},jp.$metadata$={kind:m,simpleName:"Companion",interfaces:[]};var Lp=null;function zp(){return null===Lp&&new jp,Lp}function Dp(){Mp=this}Rp.$metadata$={kind:S,simpleName:"PlotConfigClientSide",interfaces:[Np]},Dp.prototype.createGuideOptionsMap_v6zdyz$=function(t){var e,n=_();for(e=t.iterator();e.hasNext();){var i=e.next();if(i.hasGuideOptions()){var o=i.getGuideOptions().createGuideOptions(),r=i.aes;n.put_xwzc9p$(r,o)}}return n},Dp.prototype.createGuideOptionsMap_e6mjjf$=function(t){var e,n=_();for(e=t.entries.iterator();e.hasNext();){var i=e.next(),o=i.key,r=i.value,a=$c().toAes_61zpoe$(o),s=Ea().create_za3rmp$(r).createGuideOptions();n.put_xwzc9p$(a,s)}return n},Dp.prototype.createPlotAssembler_6u1zvq$=function(t){var e=this.buildPlotLayers_0(t),n=Un.Companion.multiTile_s59xp3$(e,t.scaleMap,t.mappersByAesNP,t.coordProvider_8be2vx$,t.xAxisOrientation_8be2vx$,t.yAxisOrientation_8be2vx$,t.theme_8be2vx$);return n.title=t.title,n.subtitle=t.subtitle,n.caption=t.caption,n.guideOptionsMap=t.guideOptionsMap_8be2vx$,n.facets=t.facets,n},Dp.prototype.buildPlotLayers_0=function(t){var n,i,o=h();for(n=t.layerConfigs.iterator();n.hasNext();){var r=n.next().combinedData;o.add_11rb$(r)}var a=oh().toLayersDataByTile_rxbkhd$(o,t.facets),s=h(),l=h();for(i=a.iterator();i.hasNext();){var u,c=i.next(),p=h(),_=t.layerConfigs;t:do{var d;if(e.isType(_,we)&&_.isEmpty()){u=!1;break t}for(d=_.iterator();d.hasNext();)if(d.next().geomProto.geomKind===Ee.LIVE_MAP){u=!0;break t}u=!1}while(0);for(var f=u,m=0;m!==c.size;++m){var $,y;if(!(s.size>=m))throw M("Check failed.".toString());var g,v=t.layerConfigs.get_za3lpa$(m),b=c.get_za3lpa$(m),w=t.scaleMap.map,x=this.createScalesForStatPositionalBindings_0(v.varBindings,v.isYOrientation,w),k=!0===(g=v.isMarginal)?qn.MarginalLayerUtil.toMarginalScaleMap_2q3kgy$(x,v.marginalSide,v.isYOrientation):!1===g?x:e.noWhenBranchMatched();y=!0===($=v.isMarginal)?qn.MarginalLayerUtil.toMarginalScaleMap_2q3kgy$(w,v.marginalSide,!1):!1===$?w:e.noWhenBranchMatched();var C=new Hn(Pt(y,k));if(s.size===m){var E,S,T,O=t.layerConfigs,N=h(),P=0;for(E=O.iterator();E.hasNext();){var I=E.next();ht((P=(S=P)+1|0,S))!==m&&N.add_11rb$(I)}t:do{var A;if(e.isType(N,we)&&N.isEmpty()){T=!1;break t}for(A=N.iterator();A.hasNext();)if(!A.next().tooltips.hideTooltips()){T=!0;break t}T=!1}while(0);var R=T,j=v.isMarginal?null:oa().configGeomTargets_hra3pl$(v,C,R,f,t.theme_8be2vx$);s.add_11rb$(this.createLayerBuilder_0(v,t.fontFamilyRegistry_8be2vx$,j,t.theme_8be2vx$))}var L=s.get_za3lpa$(m).build_e3vjvq$(b,C,t.mappersByAesNP);p.add_11rb$(L)}l.add_11rb$(p)}return l},Dp.prototype.createScalesForStatPositionalBindings_0=function(t,n,i){var o,r=h();for(o=t.iterator();o.hasNext();){var a=o.next();a.variable.isStat&&r.add_11rb$(a)}var s,l=h();for(s=r.iterator();s.hasNext();){var u=s.next();tt(u.aes,Zt.Companion.X)||tt(u.aes,Zt.Companion.Y)||l.add_11rb$(u)}var c,p=h();for(c=l.iterator();c.hasNext();){var _=c.next();Zt.Companion.isPositionalXY_896ixz$(_.aes)&&p.add_11rb$(_)}var d,f=p,m=N(O(f,10));for(d=f.iterator();d.hasNext();){var $,y=d.next(),g=m.add_11rb$;$=!0===n?Zt.Companion.isPositionalX_896ixz$(y.aes)?Zt.Companion.Y:Zt.Companion.X:!1===n?Zt.Companion.isPositionalX_896ixz$(y.aes)?Zt.Companion.X:Zt.Companion.Y:e.noWhenBranchMatched();var v=Ae(i,$).with().name_61zpoe$(y.variable.label).build();g.call(m,wt(y.aes,v))}return Gn(m)},Dp.prototype.createLayerBuilder_0=function(t,n,i,o){var r,a,s,l,u=(e.isType(r=t.geomProto,pa)?r:v()).geomProvider_opf53k$(t),c=t.stat,p=new Kn(u,c,t.posProvider,n).yOrientation_6taknv$(t.isYOrientation).marginal_fbs2by$(t.isMarginal,t.marginalSide,t.marginalSize),h=t.constantsMap;for(a=h.keys.iterator();a.hasNext();){var _=a.next();p.addConstantAes_bbdhip$(e.isType(s=_,Zt)?s:v(),G(h.get_11rb$(_)))}for(t.hasExplicitGrouping()&&p.groupingVarName_61zpoe$(G(t.explicitGroupingVarName)),null!=nt.DataFrameUtil.variables_dhhkv7$(t.combinedData).get_11rb$(Dr().GEO_ID)&&p.pathIdVarName_61zpoe$(Dr().GEO_ID),l=t.varBindings.iterator();l.hasNext();){var d=l.next();p.addBinding_14cn14$(d)}return p.disableLegend_6taknv$(t.isLegendDisabled),null!=i&&p.locatorLookupSpec_271kgc$(i.createLookupSpec()).contextualMappingProvider_td8fxc$(i),p.annotationSpecification_vimm4p$(t.annotations,o.plot().textStyle()),p},Dp.$metadata$={kind:m,simpleName:"PlotConfigClientSideUtil",interfaces:[]};var Mp=null;function Bp(){return null===Mp&&new Dp,Mp}function Fp(){Up=this}Fp.prototype.createMapperProviders_4llv70$=function(t,e,n){var i,o=oh().createPlotAesBindingSetup_vot9yb$(t,n),r=Nt(o.mappedAesWithoutStatPositional(),Vn([Zt.Companion.X,Zt.Companion.Y])),a=jt(Rt(At(O(r,10)),16));for(i=r.iterator();i.hasNext();){var s=i.next();a.put_xwzc9p$(s,Yn.DefaultMapperProvider.get_31786j$(s))}var l,u=a,c=N(O(e,10));for(l=e.iterator();l.hasNext();){var p=l.next();c.add_11rb$(wt(p.aes,p.createMapperProvider()))}var h=Gn(c);return Pt(u,h)},Fp.$metadata$={kind:m,simpleName:"PlotConfigMapperProviders",interfaces:[]};var Up=null;function qp(){return null===Up&&new Fp,Up}function Hp(){Gp=this}Hp.prototype.createMappers_iobu9w$=function(t,n,i){var o,r,a,s,l;if(!n.containsKey_11rb$(Zt.Companion.X))throw M("Check failed.".toString());if(!n.containsKey_11rb$(Zt.Companion.Y))throw M("Check failed.".toString());if(!i.containsKey_11rb$(Zt.Companion.X))throw M("Check failed.".toString());if(!i.containsKey_11rb$(Zt.Companion.Y))throw M("Check failed.".toString());var u=oh().createPlotAesBindingSetup_vot9yb$(t,!1),c=Nt(u.mappedAesWithoutStatPositional(),Vn([Zt.Companion.X,Zt.Companion.Y])),p=u.dataByVarBindingWithoutStatPositional(),h=u.variablesByMappedAes,d=_(),f=Ae(n,Zt.Companion.X);if(e.isType(f,dt)){var m=Zt.Companion.X,$=f.createApplicableDomain_yrwdxb$();d.put_xwzc9p$(m,$)}var y=Ae(n,Zt.Companion.Y);if(e.isType(y,dt)){var g=Zt.Companion.Y,b=y.createApplicableDomain_yrwdxb$();d.put_xwzc9p$(g,b)}for(o=p.entries.iterator();o.hasNext();){var w=o.next(),x=w.key,k=w.value,C=x.aes,E=x.variable,S=Ae(n,C);if(e.isType(S,dt)){if(Zt.Companion.isPositionalXY_896ixz$(C))r=S.createApplicableDomain_yrwdxb$();else{var T=sn.SeriesUtil.span_w2blas$(d.get_11rb$(C),oh().computeContinuousDomain_kp64p4$(k,E,S));r=Wn.Transforms.ensureApplicableDomain_qnx9nl$(T,S)}var O=r;d.put_xwzc9p$(C,O)}}var N=_();for(a=c.iterator();a.hasNext();){var P=a.next(),I=oh().defaultScaleName_wl2n8c$(P,h),A=Ae(i,P),R=Ae(n,P);if(e.isType(R,Zn))l=R.effectiveDomain.isEmpty()?Xn.Mappers.emptyDataMapper_ytbaoo$(I):A.createDiscreteMapper_6i94r7$(R);else{var j=Ae(d,P);l=A.createContinuousMapper_j5tjae$(j,e.isType(s=R,dt)?s:v())}var L=l;N.put_xwzc9p$(P,L)}return N},Hp.$metadata$={kind:m,simpleName:"PlotConfigScaleMappers",interfaces:[]};var Gp=null;function Kp(){return null===Gp&&new Hp,Gp}function Vp(){Yp=this}Vp.prototype.createScaleProviders_4llv70$=function(t,n,i){var o,r=_();for(o=n.iterator();o.hasNext();){var a=o.next(),s=a.createScaleProvider(),l=a.aes;r.put_xwzc9p$(l,s)}var u,c=oh().createPlotAesBindingSetup_vot9yb$(t,i),p=c.dataByVarBinding,f=c.variablesByMappedAes,m=Lt();for(u=p.entries.iterator();u.hasNext();){var $=u.next(),y=$.key;$.value.isDateTime_8xm3sj$(y.variable)&&m.put_xwzc9p$($.key,$.value)}var g,b=m,w=N(b.size);for(g=b.entries.iterator();g.hasNext();){var x=g.next(),k=w.add_11rb$,C=x.key;k.call(w,C.aes)}var E,S=h();for(E=w.iterator();E.hasNext();){var T=E.next();Tt(Vn([Zt.Companion.X,Zt.Companion.Y]),T)&&S.add_11rb$(T)}var P,I,A=h();for(P=S.iterator();P.hasNext();){var R,j=P.next();(e.isType(R=r,d)?R:v()).containsKey_11rb$(j)||A.add_11rb$(j)}for(I=A.iterator();I.hasNext();){var L=I.next(),z=oh().defaultScaleName_wl2n8c$(L,f),D=Yn.ScaleProviderHelper.createDateTimeScaleProvider_1va84n$(L,z);r.put_xwzc9p$(L,D)}var M,B=Nt(c.mappedAesWithoutStatPositional(),Vn([Zt.Companion.X,Zt.Companion.Y])),F=jt(Rt(At(O(B,10)),16));for(M=B.iterator();M.hasNext();){var U,q=M.next(),H=F.put_xwzc9p$,G=Zt.Companion.isPositionalX_896ixz$(q)?Zt.Companion.X:Zt.Companion.isPositionalY_896ixz$(q)?Zt.Companion.Y:q;H.call(F,q,null!=(U=r.get_11rb$(G))?U:Yn.ScaleProviderHelper.createDefault_31786j$(G))}return F},Vp.$metadata$={kind:m,simpleName:"PlotConfigScaleProviders",interfaces:[]};var Yp=null;function Wp(){return null===Yp&&new Vp,Yp}function Xp(){Zp=this}Xp.prototype.createScales_t8derc$=function(t,n,i,o){var r,a,s,l=oh().createPlotAesBindingSetup_vot9yb$(t,!1),u=Nt(l.mappedAesWithoutStatPositional(),Vn([Zt.Companion.X,Zt.Companion.Y])),c=l.variablesByMappedAes,p=_();for(r=u.iterator();r.hasNext();){var h=r.next(),d=oh().defaultScaleName_wl2n8c$(h,c),f=Ae(o,h),m=Ae(n,h);if(e.isType(m,Zn))s=f.createScale_nho0uz$(d,m);else{e.isType(m,dt)||v();var $=Ae(i,h),y=e.isType($,Jn)&&$.isContinuous,g=e.isType($,Qn)?e.isType(a=$,Qn)?a:v():null;s=f.createScale_z70nzq$(d,m,y,g)}var b=s;p.put_xwzc9p$(h,b)}return new Hn(p)},Xp.$metadata$={kind:m,simpleName:"PlotConfigScales",interfaces:[]};var Zp=null;function Jp(){return null===Zp&&new Xp,Zp}function Qp(){th=this}Qp.prototype.createTransforms_9iw3y2$=function(t,n,i,o){var r,a,s,l,u,c,p,d;if(!n.containsKey_11rb$(Zt.Companion.X))throw M("Check failed.".toString());if(!n.containsKey_11rb$(Zt.Companion.Y))throw M("Check failed.".toString());if(!i.containsKey_11rb$(Zt.Companion.X))throw M("Check failed.".toString());if(!i.containsKey_11rb$(Zt.Companion.Y))throw M("Check failed.".toString());var f,m=oh().createPlotAesBindingSetup_vot9yb$(t,o),$=Nt(m.mappedAesWithoutStatPositional(),Vn([Zt.Companion.X,Zt.Companion.Y])),y=h();for(f=$.iterator();f.hasNext();){var g=f.next();Zt.Companion.isPositionalX_896ixz$(g)&&y.add_11rb$(g)}var v,b=ot(y),w=h();for(v=$.iterator();v.hasNext();){var x=v.next();Zt.Companion.isPositionalY_896ixz$(x)&&w.add_11rb$(x)}var k,C=ot(w),E=m.dataByVarBinding,S=m.variablesByMappedAes,T=Bt();for(r=$.iterator();r.hasNext();){var P=r.next(),I=Ae(n,P);if(I.discreteDomain)T.add_11rb$(P);else if(S.containsKey_11rb$(P)){var A,R=Ae(S,P);t:do{var j;if(e.isType(R,we)&&R.isEmpty()){A=!1;break t}for(j=R.iterator();j.hasNext();){var L=j.next(),z=Ae(E,new yn(L,P));if(z.isEmpty_8xm3sj$(L)?this.isDiscreteScaleForEmptyData_0(I,Ae(i,P)):!z.isNumeric_8xm3sj$(L)){A=!0;break t}}A=!1}while(0);A&&T.add_11rb$(P)}}t:do{var D;if(e.isType(T,we)&&T.isEmpty()){k=!1;break t}for(D=T.iterator();D.hasNext();){var B=D.next();if(b.contains_11rb$(B)){k=!0;break t}}k=!1}while(0);var F,U=k;t:do{var q;if(e.isType(T,we)&&T.isEmpty()){F=!1;break t}for(q=T.iterator();q.hasNext();){var H=q.next();if(C.contains_11rb$(H)){F=!0;break t}}F=!1}while(0);var G,K=F;U&&T.addAll_brywnq$(b),K&&T.addAll_brywnq$(C);var V=Lt();for(G=E.entries.iterator();G.hasNext();){var W=G.next();T.contains_11rb$(W.key.aes)&&V.put_xwzc9p$(W.key,W.value)}var X=V,Z=_();for(a=X.entries.iterator();a.hasNext();){var J,Q=a.next(),et=Q.key,nt=Q.value,it=et.aes,at=et.variable,st=nt.distinctValues_8xm3sj$(at),lt=Z.get_11rb$(it);if(null==lt){var ut=zt();Z.put_xwzc9p$(it,ut),J=ut}else J=lt;J.addAll_brywnq$(st)}var ct=_();for(s=T.iterator();s.hasNext();){var pt=s.next(),ht=Ae(n,pt),_t=null!=(l=ht.breaks)?l:Y();if(Z.containsKey_11rb$(pt))u=Ae(Z,pt);else{if(!Tt(Vn([Zt.Companion.X,Zt.Companion.Y]),pt))throw M("No discrete data found for aes "+pt);u=xt()}var dt,ft=ti(Ct(_t,u)),mt=ht.discreteDomainReverse?ei(ft):ft,$t=rt(null!=(c=ht.limits)?c:Y());dt=ht.discreteDomainReverse?ei($t):$t;var yt=new Zn(mt,dt);ct.put_xwzc9p$(pt,yt)}var gt=_();for(p=Ot($,T).iterator();p.hasNext();){var vt=p.next();if(!Zt.Companion.isPositionalXY_896ixz$(vt)||tt(vt,Zt.Companion.X)||tt(vt,Zt.Companion.Y)){var bt=Ae(n,vt),wt=bt.continuousTransform,kt=this.toContinuousLims_0(bt.limits,wt),Et=null!=(d=null!=kt?Wn.Transforms.continuousWithLimits_23v90k$(wt,kt):null)?d:wt;gt.put_xwzc9p$(vt,Et)}}var St,It,Dt=(It=ct,function(t){var e,n=Zn.Companion,i=N(O(t,10));for(e=t.iterator();e.hasNext();){var o=e.next();i.add_11rb$(Ae(It,o))}return n.join_25wxi6$(i)}),Mt=!0===U?Dt(Ft(b)):!1===U?Ae(gt,Zt.Companion.X):e.noWhenBranchMatched(),Ut=!0===K?Dt(Ft(C)):!1===K?Ae(gt,Zt.Companion.Y):e.noWhenBranchMatched(),qt=jt(Rt(At(O(b,10)),16));for(St=b.iterator();St.hasNext();){var Ht=St.next();qt.put_xwzc9p$(Ht,Mt)}var Gt,Kt=jt(Rt(At(O(C,10)),16));for(Gt=C.iterator();Gt.hasNext();){var Vt=Gt.next();Kt.put_xwzc9p$(Vt,Ut)}var Yt=Pt(qt,Kt);return Pt(Pt(ct,gt),Yt)},Qp.prototype.isDiscreteScaleForEmptyData_0=function(t,n){var i,o;if(t.discreteDomain)return!0;if(e.isType(n,ni))return!0;if(e.isType(n,ii))return!1;var r,a=t.breaks,s=t.limits;if(null!=a){var l;t:do{var u;if(e.isType(a,we)&&a.isEmpty()){l=!1;break t}for(u=a.iterator();u.hasNext();){var c=u.next();if(!e.isNumber(c)){l=!0;break t}}l=!1}while(0);r=l}else r=null;var p,h=null!=(i=r)&&i;if(null!=s){var _;if(s.size>2)_=!0;else{var d,f=rt(s);t:do{var m;if(e.isType(f,we)&&f.isEmpty()){d=!1;break t}for(m=f.iterator();m.hasNext();){var $=m.next();if(!e.isNumber($)){d=!0;break t}}d=!1}while(0);_=d}p=_}else p=null;var y=null!=(o=p)&&o;return h||y},Qp.prototype.toContinuousLims_0=function(t,n){var i,o;if(null==t)return null;var r,a=Ut(t,2),s=N(O(a,10));for(r=a.iterator();r.hasNext();){var l,u=r.next(),p=s.add_11rb$;if(null!=u){if(!e.isNumber(u)||!oi(ut(u)))throw c(("Numbers expected: limits="+a).toString());var h=ut(u);l=n.isInDomain_yrwdxb$(h)?h:null}else l=null;p.call(s,l)}var _=s;switch(rt(_).size){case 0:o=null;break;case 2:o=ri(e.isType(i=_,lt)?i:v());break;default:o=Ct(_,x(null))}var d=o;return null!=d?new z(d.get_za3lpa$(0),d.get_za3lpa$(1)):null},Qp.$metadata$={kind:m,simpleName:"PlotConfigTransforms",interfaces:[]};var th=null;function eh(){return null===th&&new Qp,th}function nh(){ih=this}nh.prototype.toLayersDataByTile_rxbkhd$=function(t,e){var n,i;if(e.isDefined){for(var o=e.numTiles,r=N(o),a=0;a1&&(tt(t,Zt.Companion.X)||tt(t,Zt.Companion.Y))?t.name:R(l)}else n=t.name;return n},nh.prototype.computeContinuousDomain_kp64p4$=function(t,e,n){var i;if(n.hasDomainLimits()){var o,r=t.getNumeric_8xm3sj$(e),a=h();for(o=r.iterator();o.hasNext();){var s=o.next();n.isInDomain_yrwdxb$(s)&&a.add_11rb$(s)}var l=a;i=sn.SeriesUtil.range_l63ks6$(l)}else i=t.range_8xm3sj$(e);return i},nh.prototype.createScaleConfigs_2rp8vd$=function(t){var n,i,o,r=_();for(n=t.iterator();n.hasNext();){var a=n.next(),s=e.isType(i=a,d)?i:v(),l=e.isType(o=Dh().aesOrFail_x7u0o8$(s),Zt)?o:v();if(!r.containsKey_11rb$(l)){var u=_();r.put_xwzc9p$(l,u)}G(r.get_11rb$(l)).putAll_a2k3zr$(s)}var c,p=N(r.size);for(c=r.entries.iterator();c.hasNext();){var h=c.next(),f=p.add_11rb$,m=h.key,$=h.value;f.call(p,new dh(m,$))}return p},nh.$metadata$={kind:m,simpleName:"PlotConfigUtil",interfaces:[]};var ih=null;function oh(){return null===ih&&new nh,ih}function rh(){ah=this,this.IDENTITY="identity",this.STACK="stack",this.DODGE="dodge",this.FILL="fill",this.NUDGE="nudge",this.JITTER="jitter",this.JITTER_DODGE="jitterdodge"}rh.prototype.createPosProvider_x7u0o8$=function(t){var e,n=$r().featureName_bkhwtg$(t),i=new np(t);switch(n){case"identity":e=ai.Companion.wrap_dkjclg$(si.PositionAdjustments.identity());break;case"stack":e=ai.Companion.barStack_yrwdxb$(i.getDouble_61zpoe$(Ju().VJUST));break;case"dodge":e=ai.Companion.dodge_yrwdxb$(i.getDouble_61zpoe$(Bu().WIDTH));break;case"fill":e=ai.Companion.fill_yrwdxb$(i.getDouble_61zpoe$(ec().VJUST));break;case"jitter":e=ai.Companion.jitter_jma9l8$(i.getDouble_61zpoe$(qu().WIDTH),i.getDouble_61zpoe$(qu().HEIGHT));break;case"nudge":e=ai.Companion.nudge_jma9l8$(i.getDouble_61zpoe$(Ku().WIDTH),i.getDouble_61zpoe$(Ku().HEIGHT));break;case"jitterdodge":e=ai.Companion.jitterDodge_xjrefz$(i.getDouble_61zpoe$(Wu().DODGE_WIDTH),i.getDouble_61zpoe$(Wu().JITTER_WIDTH),i.getDouble_61zpoe$(Wu().JITTER_HEIGHT));break;default:throw c("Unknown position adjustments name: '"+n+"'")}return e},rh.$metadata$={kind:m,simpleName:"PosProto",interfaces:[]};var ah=null;function sh(){return null===ah&&new rh,ah}function lh(){uh=this}lh.prototype.create_za3rmp$=function(t){var n,i;if(e.isType(t,g)&&$r().isFeatureList_511yu9$(t)){var o=$r().featuresInFeatureList_ui7x64$(e.isType(n=t,g)?n:v()),r=h();for(i=o.iterator();i.hasNext();){var a=i.next();r.add_11rb$(this.createOne_0(a))}return r}return x(this.createOne_0(t))},lh.prototype.createOne_0=function(t){var n;if(e.isType(t,d))return _h().createSampling_d0u64m$($r().featureName_bkhwtg$(t),e.isType(n=t,d)?n:v());if("string"==typeof t)return _h().createSampling_d0u64m$(t,f());throw c("Incorrect sampling specification type: '"+k(e.getKClassFromExpression(t).simpleName)+"'")},lh.$metadata$={kind:m,simpleName:"SamplingConfig",interfaces:[]};var uh=null;function ch(){return null===uh&&new lh,uh}function ph(){hh=this}ph.prototype.createSampling_d0u64m$=function(t,e){var n,i=cp().over_x7u0o8$(e);switch(t){case"none":n=je.Samplings.NONE;break;case"random":n=je.Samplings.random_280ow0$(G(i.getInteger_61zpoe$(Ic().N)),i.getLong_61zpoe$(Ic().SEED));break;case"pick":n=je.Samplings.pick_za3lpa$(G(i.getInteger_61zpoe$(Ic().N)));break;case"systematic":n=je.Samplings.systematic_za3lpa$(G(i.getInteger_61zpoe$(Ic().N)));break;case"group_random":n=je.Samplings.randomGroup_280ow0$(G(i.getInteger_61zpoe$(Ic().N)),i.getLong_61zpoe$(Ic().SEED));break;case"group_systematic":n=je.Samplings.systematicGroup_za3lpa$(G(i.getInteger_61zpoe$(Ic().N)));break;case"random_stratified":n=je.Samplings.randomStratified_vcwos1$(G(i.getInteger_61zpoe$(Ic().N)),i.getLong_61zpoe$(Ic().SEED),i.getInteger_61zpoe$(Ic().MIN_SUB_SAMPLE));break;case"vertex_vw":n=je.Samplings.vertexVw_za3lpa$(G(i.getInteger_61zpoe$(Ic().N)));break;case"vertex_dp":n=je.Samplings.vertexDp_za3lpa$(G(i.getInteger_61zpoe$(Ic().N)));break;default:throw c("Unknown sampling method: '"+t+"'")}return n},ph.$metadata$={kind:m,simpleName:"SamplingProto",interfaces:[]};var hh=null;function _h(){return null===hh&&new ph,hh}function dh(t,e){Dh(),np.call(this,e),this.aes=t}function fh(t){return"'"+t+"'"}function mh(){zh=this}dh.prototype.enforceDiscreteDomain_0=function(){return this.getBoolean_ivxn3r$(pc().DISCRETE_DOMAIN)},dh.prototype.createMapperProvider=function(){var t,n,i,o,r,a,s,l,u,p,h,_,d=Yn.DefaultMapperProvider.get_31786j$(this.aes),f=this.has_61zpoe$(pc().NA_VALUE)?G(this.getValue_1va84n$(this.aes,pc().NA_VALUE)):Yn.DefaultNaValue.get_31786j$(this.aes);if(this.has_61zpoe$(pc().OUTPUT_VALUES)){var m=this.getList_61zpoe$(pc().OUTPUT_VALUES),$=m_().applyToList_s6xytz$(this.aes,m);d=Yn.DefaultMapperProviderUtil.createWithDiscreteOutput_rath1t$($,f)}if(tt(this.aes,Zt.Companion.SHAPE)){var y=this.get_61zpoe$(pc().SHAPE_SOLID);"boolean"==typeof y&&tt(y,!1)&&(d=Yn.DefaultMapperProviderUtil.createWithDiscreteOutput_rath1t$(li.ShapeMapper.hollowShapes(),li.ShapeMapper.NA_VALUE))}else tt(this.aes,Zt.Companion.ALPHA)&&this.has_61zpoe$(pc().RANGE)?d=new ui(this.getRange_y4putb$(pc().RANGE),"number"==typeof(t=f)?t:v()):tt(this.aes,Zt.Companion.SIZE)&&this.has_61zpoe$(pc().RANGE)&&(d=new ci(this.getRange_y4putb$(pc().RANGE),"number"==typeof(n=f)?n:v()));null==(i=this.getString_61zpoe$(pc().SCALE_MAPPER_KIND))&&(i=!this.has_61zpoe$(pc().OUTPUT_VALUES)&&this.enforceDiscreteDomain_0()&&Zt.Companion.isColor_896ixz$(this.aes)?ac().COLOR_BREWER:null);var g=i;if(null!=g)switch(g){case"identity":d=Dh().createIdentityMapperProvider_bbdhip$(this.aes,f);break;case"color_gradient":d=new hi(this.getColor_61zpoe$(pc().LOW),this.getColor_61zpoe$(pc().HIGH),e.isType(o=f,pi)?o:v());break;case"color_gradient2":d=new _i(this.getColor_61zpoe$(pc().LOW),this.getColor_61zpoe$(pc().MID),this.getColor_61zpoe$(pc().HIGH),this.getDouble_61zpoe$(pc().MIDPOINT),e.isType(r=f,pi)?r:v());break;case"color_gradientn":var b,w=this.getStringList_61zpoe$(pc().COLORS),x=F("parseColor",function(t,e){return t.parseColor_61zpoe$(e)}.bind(null,di.Colors)),k=N(O(w,10));for(b=w.iterator();b.hasNext();){var C=b.next();k.add_11rb$(x(C))}d=new fi(k,e.isType(a=f,pi)?a:v());break;case"color_hue":d=new mi(this.getDoubleList_61zpoe$(pc().HUE_RANGE),this.getDouble_61zpoe$(pc().CHROMA),this.getDouble_61zpoe$(pc().LUMINANCE),this.getDouble_61zpoe$(pc().START_HUE),this.getDouble_61zpoe$(pc().DIRECTION),e.isType(s=f,pi)?s:v());break;case"color_grey":d=new $i(this.getDouble_61zpoe$(pc().START),this.getDouble_61zpoe$(pc().END),e.isType(l=f,pi)?l:v());break;case"color_brewer":d=new yi(this.getString_61zpoe$(pc().PALETTE_TYPE),this.get_61zpoe$(pc().PALETTE),this.getDouble_61zpoe$(pc().DIRECTION),e.isType(u=f,pi)?u:v());break;case"color_cmap":d=new gi(this.getString_61zpoe$(uc().CMAP_NAME),this.getDouble_61zpoe$(uc().ALPHA),this.getDouble_61zpoe$(uc().BEGIN),this.getDouble_61zpoe$(uc().END),this.getDouble_61zpoe$(uc().DIRECTION),e.isType(p=f,pi)?p:v());break;case"size_area":d=new vi(this.getDouble_61zpoe$(pc().MAX_SIZE),"number"==typeof(h=f)?h:v());break;default:throw c("Aes '"+this.aes.name+"' - unexpected scale mapper kind: '"+g+"'")}return e.isType(_=d,bi)?_:v()},dh.prototype.createScaleProvider=function(){return this.createScaleProviderBuilder_0().build()},dh.prototype.createScaleProviderBuilder_0=function(){var t,e,n,i=this.enforceDiscreteDomain_0(),o=this.getBoolean_ivxn3r$(pc().DISCRETE_DOMAIN_REVERSE),r=new wi(this.aes);if(r.discreteDomain_6taknv$(i),r.discreteDomainReverse_6taknv$(o),this.getBoolean_ivxn3r$(pc().DATE_TIME)){var a=null!=(t=this.getString_61zpoe$(pc().FORMAT))?(n=Gt.Companion.forOneArg_86f9bg$(t,xi.DATETIME_FORMAT),function(t){return n.format_za3rmp$(t)}):null;r.breaksGenerator_6q5k0b$(new ki(a))}else if(this.getBoolean_ivxn3r$(pc().TIME))r.breaksGenerator_6q5k0b$(new Ci);else if(!i&&this.has_61zpoe$(pc().CONTINUOUS_TRANSFORM)){var s=this.getStringSafe_61zpoe$(pc().CONTINUOUS_TRANSFORM);switch(s.toLowerCase()){case"identity":e=Wn.Transforms.IDENTITY;break;case"log10":e=Wn.Transforms.LOG10;break;case"reverse":e=Wn.Transforms.REVERSE;break;case"sqrt":e=Wn.Transforms.SQRT;break;default:throw c("Unknown transform name: '"+s+"'. Supported: "+R(Se([Wc().IDENTITY,Wc().LOG10,Wc().REVERSE,Wc().SQRT]),void 0,void 0,void 0,void 0,void 0,fh)+".")}var l=e;r.continuousTransform_gxz7zd$(l)}return Se([Zt.Companion.X,Zt.Companion.Y]).contains_11rb$(this.aes)&&this.has_61zpoe$(pc().POSITION)&&(r.axisOrientation=this.getAxisOrientation()),this.applyCommons_0(r)},dh.prototype.applyCommons_0=function(t){var n,i;if(this.has_61zpoe$(pc().NAME)&&t.name_61zpoe$(G(this.getString_61zpoe$(pc().NAME))),this.has_61zpoe$(pc().BREAKS)){var o,r=this.getList_61zpoe$(pc().BREAKS),a=h();for(o=r.iterator();o.hasNext();){var s;null!=(s=o.next())&&a.add_11rb$(s)}t.breaks_pqjuzw$(a)}if(this.has_61zpoe$(pc().LABELS)?t.labels_mhpeer$(this.getStringList_61zpoe$(pc().LABELS)):t.labelFormat_pdl1vj$(this.getString_61zpoe$(pc().FORMAT)),this.has_61zpoe$(pc().EXPAND)){var l=this.getList_61zpoe$(pc().EXPAND);if(!l.isEmpty()){var u=e.isNumber(n=l.get_za3lpa$(0))?n:v();if(t.multiplicativeExpand_14dthe$(ut(u)),l.size>1){var c=e.isNumber(i=l.get_za3lpa$(1))?i:v();t.additiveExpand_14dthe$(ut(c))}}}return this.has_61zpoe$(pc().LIMITS)&&t.limits_9ma18$(this.getList_61zpoe$(pc().LIMITS)),t},dh.prototype.hasGuideOptions=function(){return this.has_61zpoe$(pc().GUIDE)},dh.prototype.getGuideOptions=function(){return Ea().create_za3rmp$(G(this.get_61zpoe$(pc().GUIDE)))},dh.prototype.getAxisOrientation=function(){var t,n,i=this.getStringSafe_61zpoe$(pc().POSITION);switch(On(e.isCharSequence(n=i)?n:v()).toString().toLowerCase()){case"left":t=Ei.LEFT;break;case"right":t=Ei.RIGHT;break;case"top":t=Ei.TOP;break;case"bottom":t=Ei.BOTTOM;break;default:throw c("'"+pc().POSITION+"' - unexpected value: '"+i+"'. Valid values: left|right|top|bottom.")}return t},mh.prototype.aesOrFail_x7u0o8$=function(t){var e=new np(t);if(!e.has_61zpoe$(pc().AES))throw c("Required parameter 'aesthetic' is missing".toString());return $c().toAes_61zpoe$(e.getStringSafe_61zpoe$(pc().AES))},mh.prototype.createIdentityMapperProvider_bbdhip$=function(t,e){var n=m_().getConverter_31786j$(t),i=new Si(n);if(N_().contain_896ixz$(t)){var o=N_().get_31786j$(t);return new Oi(i,Ti.Companion.wrap_4rxbg3$(o,e))}return i},mh.$metadata$={kind:m,simpleName:"Companion",interfaces:[]};var $h,yh,gh,vh,bh,wh,xh,kh,Ch,Eh,Sh,Th,Oh,Nh,Ph,Ih,Ah,Rh,jh,Lh,zh=null;function Dh(){return null===zh&&new mh,zh}function Mh(t,e){Ni.call(this),this.name$=t,this.ordinal$=e}function Bh(){Bh=function(){},$h=new Mh("IDENTITY",0),yh=new Mh("COUNT",1),gh=new Mh("COUNT2D",2),vh=new Mh("BIN",3),bh=new Mh("BIN2D",4),wh=new Mh("DOTPLOT",5),xh=new Mh("SMOOTH",6),kh=new Mh("CONTOUR",7),Ch=new Mh("CONTOURF",8),Eh=new Mh("BOXPLOT",9),Sh=new Mh("DENSITYRIDGES",10),Th=new Mh("YDENSITY",11),Oh=new Mh("YDOTPLOT",12),Nh=new Mh("DENSITY",13),Ph=new Mh("DENSITY2D",14),Ih=new Mh("DENSITY2DF",15),Ah=new Mh("QQ",16),Rh=new Mh("QQ2",17),jh=new Mh("QQ_LINE",18),Lh=new Mh("QQ2_LINE",19),u_()}function Fh(){return Bh(),$h}function Uh(){return Bh(),yh}function qh(){return Bh(),gh}function Hh(){return Bh(),vh}function Gh(){return Bh(),bh}function Kh(){return Bh(),wh}function Vh(){return Bh(),xh}function Yh(){return Bh(),kh}function Wh(){return Bh(),Ch}function Xh(){return Bh(),Eh}function Zh(){return Bh(),Sh}function Jh(){return Bh(),Th}function Qh(){return Bh(),Oh}function t_(){return Bh(),Nh}function e_(){return Bh(),Ph}function n_(){return Bh(),Ih}function i_(){return Bh(),Ah}function o_(){return Bh(),Rh}function r_(){return Bh(),jh}function a_(){return Bh(),Lh}function s_(){l_=this,this.ENUM_INFO_0=new Ii(Mh.values())}dh.$metadata$={kind:S,simpleName:"ScaleConfig",interfaces:[np]},s_.prototype.safeValueOf_61zpoe$=function(t){var e;if(null==(e=this.ENUM_INFO_0.safeValueOf_pdl1vj$(t)))throw c("Unknown stat name: '"+t+"'");return e},s_.$metadata$={kind:m,simpleName:"Companion",interfaces:[]};var l_=null;function u_(){return Bh(),null===l_&&new s_,l_}function c_(){p_=this}Mh.$metadata$={kind:S,simpleName:"StatKind",interfaces:[Ni]},Mh.values=function(){return[Fh(),Uh(),qh(),Hh(),Gh(),Kh(),Vh(),Yh(),Wh(),Xh(),Zh(),Jh(),Qh(),t_(),e_(),n_(),i_(),o_(),r_(),a_()]},Mh.valueOf_61zpoe$=function(t){switch(t){case"IDENTITY":return Fh();case"COUNT":return Uh();case"COUNT2D":return qh();case"BIN":return Hh();case"BIN2D":return Gh();case"DOTPLOT":return Kh();case"SMOOTH":return Vh();case"CONTOUR":return Yh();case"CONTOURF":return Wh();case"BOXPLOT":return Xh();case"DENSITYRIDGES":return Zh();case"YDENSITY":return Jh();case"YDOTPLOT":return Qh();case"DENSITY":return t_();case"DENSITY2D":return e_();case"DENSITY2DF":return n_();case"QQ":return i_();case"QQ2":return o_();case"QQ_LINE":return r_();case"QQ2_LINE":return a_();default:Pi("No enum constant jetbrains.datalore.plot.config.StatKind."+t)}},c_.prototype.defaultOptions_xssx85$=function(t,e){return u_().safeValueOf_61zpoe$(t),f()},c_.prototype.createStat_77pq5g$=function(t,e){switch(t.name){case"IDENTITY":return cn.Stats.IDENTITY;case"COUNT":return cn.Stats.count();case"COUNT2D":return cn.Stats.count2d();case"BIN":return cn.Stats.bin_yyf5ez$(e.getIntegerDef_bm4lxs$(au().BINS,30),e.getDouble_61zpoe$(au().BINWIDTH),e.getDouble_61zpoe$(au().CENTER),e.getDouble_61zpoe$(au().BOUNDARY));case"BIN2D":var n=e.getNumPairDef_j0281h$(uu().BINS,new z(30,30)),i=n.component1(),o=n.component2(),r=e.getNumQPairDef_alde63$(uu().BINWIDTH,new z(Ai.Companion.DEF_BINWIDTH,Ai.Companion.DEF_BINWIDTH)),a=r.component1(),s=r.component2();return new Ai(A(i),A(o),null!=a?ut(a):null,null!=s?ut(s):null,e.getBoolean_ivxn3r$(uu().DROP,Ai.Companion.DEF_DROP));case"DOTPLOT":return this.configureDotplotStat_0(e);case"CONTOUR":return new Ri(e.getIntegerDef_bm4lxs$(hu().BINS,10),e.getDouble_61zpoe$(hu().BINWIDTH));case"CONTOURF":return new ji(e.getIntegerDef_bm4lxs$(hu().BINS,10),e.getDouble_61zpoe$(hu().BINWIDTH));case"SMOOTH":return this.configureSmoothStat_0(e);case"BOXPLOT":return cn.Stats.boxplot_8555vt$(e.getDoubleDef_io5o9c$(iu().COEF,Li.Companion.DEF_WHISKER_IQR_RATIO),e.getBoolean_ivxn3r$(iu().VARWIDTH,Li.Companion.DEF_COMPUTE_WIDTH));case"DENSITYRIDGES":return this.configureDensityRidgesStat_0(e);case"YDENSITY":return this.configureYDensityStat_0(e);case"YDOTPLOT":return this.configureYDotplotStat_0(e);case"DENSITY":return this.configureDensityStat_0(e);case"DENSITY2D":return this.configureDensity2dStat_0(e,!1);case"DENSITY2DF":return this.configureDensity2dStat_0(e,!0);case"QQ":return this.configureQQStat_0(e);case"QQ2":return cn.Stats.qq2();case"QQ_LINE":return this.configureQQLineStat_0(e);case"QQ2_LINE":return this.configureQQ2LineStat_0(e);default:throw c("Unknown stat: '"+t+"'")}},c_.prototype.configureDotplotStat_0=function(t){var e,n=null!=(e=t.getString_61zpoe$(au().METHOD))?Be.Companion.safeValueOf_61zpoe$(e):null;return cn.Stats.dotplot_obxvnq$(t.getIntegerDef_bm4lxs$(au().BINS,30),t.getDouble_61zpoe$(au().BINWIDTH),t.getDouble_61zpoe$(au().CENTER),t.getDouble_61zpoe$(au().BOUNDARY),null!=n?n:zi.Companion.DEF_METHOD)},c_.prototype.configureSmoothStat_0=function(t){var e,n;if(null!=(e=t.getString_61zpoe$($u().METHOD))){var i;t:do{switch(e.toLowerCase()){case"lm":i=Di.LM;break t;case"loess":case"lowess":i=Di.LOESS;break t;case"glm":i=Di.GLM;break t;case"gam":i=Di.GAM;break t;case"rlm":i=Di.RLM;break t;default:throw c("Unsupported smoother method: '"+e+"'\nUse one of: lm, loess, lowess, glm, gam, rlm.")}}while(0);n=i}else n=null;var o=n;return new Mi(t.getIntegerDef_bm4lxs$($u().POINT_COUNT,80),null!=o?o:Mi.Companion.DEF_SMOOTHING_METHOD,t.getDoubleDef_io5o9c$($u().CONFIDENCE_LEVEL,Mi.Companion.DEF_CONFIDENCE_LEVEL),t.getBoolean_ivxn3r$($u().DISPLAY_CONFIDENCE_INTERVAL,Mi.Companion.DEF_DISPLAY_CONFIDENCE_INTERVAL),t.getDoubleDef_io5o9c$($u().SPAN,Mi.Companion.DEF_SPAN),t.getIntegerDef_bm4lxs$($u().POLYNOMIAL_DEGREE,1),t.getIntegerDef_bm4lxs$($u().LOESS_CRITICAL_SIZE,1e3),t.getLongDef_4wgjuj$($u().SAMPLING_SEED,Bi))},c_.prototype.configureDensityRidgesStat_0=function(t){var n,i,o={v:null},r={v:Fi.Companion.DEF_BW};null!=(n=t.get_61zpoe$(vu().BAND_WIDTH))&&(e.isNumber(n)?o.v=ut(n):"string"==typeof n&&(r.v=cn.DensityStatUtil.toBandWidthMethod_61zpoe$(n)));var a=null!=(i=t.getString_61zpoe$(vu().KERNEL))?cn.DensityStatUtil.toKernel_61zpoe$(i):null,s=t.hasOwn_61zpoe$(Eu().QUANTILES)?t.getBoundedDoubleList_ai6r6m$(Eu().QUANTILES,0,1):Ui.Companion.DEF_QUANTILES;return new Ui(t.getBoolean_ivxn3r$(Eu().TRIM,Ui.Companion.DEF_TRIM),t.getDouble_61zpoe$(Eu().TAILS_CUTOFF),o.v,r.v,t.getDoubleDef_io5o9c$(vu().ADJUST,Fi.Companion.DEF_ADJUST),null!=a?a:Fi.Companion.DEF_KERNEL,t.getIntegerDef_bm4lxs$(vu().N,512),t.getIntegerDef_bm4lxs$(vu().FULL_SCAN_MAX,5e3),s)},c_.prototype.configureYDensityStat_0=function(t){var n,i,o,r;if(null!=(n=t.getString_61zpoe$(Ou().SCALE))){var a;t:do{switch(n.toLowerCase()){case"area":a=qi.AREA;break t;case"count":a=qi.COUNT;break t;case"width":a=qi.WIDTH;break t;default:throw c("Unsupported scale: '"+n+"'\nUse one of: area, count, width.")}}while(0);r=a}else r=null;var s=r,l={v:null},u={v:Fi.Companion.DEF_BW};null!=(i=t.get_61zpoe$(vu().BAND_WIDTH))&&(e.isNumber(i)?l.v=ut(i):"string"==typeof i&&(u.v=cn.DensityStatUtil.toBandWidthMethod_61zpoe$(i)));var p=null!=(o=t.getString_61zpoe$(vu().KERNEL))?cn.DensityStatUtil.toKernel_61zpoe$(o):null;return new Hi(null!=s?s:Hi.Companion.DEF_SCALE,t.getBoolean_ivxn3r$(Ou().TRIM,Hi.Companion.DEF_TRIM),t.getDoubleDef_io5o9c$(Ou().TAILS_CUTOFF,Hi.Companion.DEF_TAILS_CUTOFF),l.v,u.v,t.getDoubleDef_io5o9c$(vu().ADJUST,Fi.Companion.DEF_ADJUST),null!=p?p:Fi.Companion.DEF_KERNEL,t.getIntegerDef_bm4lxs$(vu().N,512),t.getIntegerDef_bm4lxs$(vu().FULL_SCAN_MAX,5e3))},c_.prototype.configureYDotplotStat_0=function(t){var e,n=null!=(e=t.getString_61zpoe$(au().METHOD))?Be.Companion.safeValueOf_61zpoe$(e):null;return cn.Stats.ydotplot_obxvnq$(t.getIntegerDef_bm4lxs$(au().BINS,30),t.getDouble_61zpoe$(au().BINWIDTH),t.getDouble_61zpoe$(au().CENTER),t.getDouble_61zpoe$(au().BOUNDARY),null!=n?n:zi.Companion.DEF_METHOD)},c_.prototype.configureDensityStat_0=function(t){var n,i,o={v:null},r={v:Fi.Companion.DEF_BW};null!=(n=t.get_61zpoe$(vu().BAND_WIDTH))&&(e.isNumber(n)?o.v=ut(n):"string"==typeof n&&(r.v=cn.DensityStatUtil.toBandWidthMethod_61zpoe$(n)));var a=null!=(i=t.getString_61zpoe$(vu().KERNEL))?cn.DensityStatUtil.toKernel_61zpoe$(i):null;return new Fi(t.getBoolean_ivxn3r$(vu().TRIM,Fi.Companion.DEF_TRIM),o.v,r.v,t.getDoubleDef_io5o9c$(vu().ADJUST,Fi.Companion.DEF_ADJUST),null!=a?a:Fi.Companion.DEF_KERNEL,t.getIntegerDef_bm4lxs$(vu().N,512),t.getIntegerDef_bm4lxs$(vu().FULL_SCAN_MAX,5e3))},c_.prototype.configureDensity2dStat_0=function(t,n){var i,o,r,a,s,l,u,c,p,h={v:null},_={v:null},d={v:null};if(null!=(i=t.get_61zpoe$(xu().BAND_WIDTH)))if(e.isNumber(i))h.v=ut(i),_.v=ut(i);else if("string"==typeof i)d.v=cn.DensityStatUtil.toBandWidthMethod_61zpoe$(i);else if(e.isType(i,lt))for(var f=0,m=i.iterator();m.hasNext();++f){var $=m.next();switch(f){case 0:var y,g;y=null!=$?ut(e.isNumber(g=$)?g:v()):null,h.v=y;break;case 1:var b,w;b=null!=$?ut(e.isNumber(w=$)?w:v()):null,_.v=b}}var x=null!=(o=t.getString_61zpoe$(xu().KERNEL))?cn.DensityStatUtil.toKernel_61zpoe$(o):null,k={v:null},C={v:null};if(null!=(r=t.get_61zpoe$(xu().N)))if(e.isNumber(r))k.v=A(r),C.v=A(r);else if(e.isType(r,lt))for(var E=0,S=r.iterator();S.hasNext();++E){var T=S.next();switch(E){case 0:var O,N;O=null!=T?A(e.isNumber(N=T)?N:v()):null,k.v=O;break;case 1:var P,I;P=null!=T?A(e.isNumber(I=T)?I:v()):null,C.v=P}}return n?new Ki(h.v,_.v,null!=(a=d.v)?a:Gi.Companion.DEF_BW,t.getDoubleDef_io5o9c$(xu().ADJUST,Gi.Companion.DEF_ADJUST),null!=x?x:Gi.Companion.DEF_KERNEL,null!=(s=k.v)?s:100,null!=(l=C.v)?l:100,t.getBoolean_ivxn3r$(xu().IS_CONTOUR,Gi.Companion.DEF_CONTOUR),t.getIntegerDef_bm4lxs$(xu().BINS,10),t.getDoubleDef_io5o9c$(xu().BINWIDTH,Gi.Companion.DEF_BIN_WIDTH)):new Vi(h.v,_.v,null!=(u=d.v)?u:Gi.Companion.DEF_BW,t.getDoubleDef_io5o9c$(xu().ADJUST,Gi.Companion.DEF_ADJUST),null!=x?x:Gi.Companion.DEF_KERNEL,null!=(c=k.v)?c:100,null!=(p=C.v)?p:100,t.getBoolean_ivxn3r$(xu().IS_CONTOUR,Gi.Companion.DEF_CONTOUR),t.getIntegerDef_bm4lxs$(xu().BINS,10),t.getDoubleDef_io5o9c$(xu().BINWIDTH,Gi.Companion.DEF_BIN_WIDTH))},c_.prototype.configureQQStat_0=function(t){var e,n=null!=(e=t.getString_61zpoe$(Iu().DISTRIBUTION))?Yi.Companion.safeValueOf_61zpoe$(e):null,i=t.getDoubleList_61zpoe$(Iu().DISTRIBUTION_PARAMETERS);return cn.Stats.qq_5e9ahd$(null!=n?n:Wi.Companion.DEF_DISTRIBUTION,i)},c_.prototype.configureQQLineStat_0=function(t){var e,n=null!=(e=t.getString_61zpoe$(ju().DISTRIBUTION))?Yi.Companion.safeValueOf_61zpoe$(e):null,i=t.getDoubleList_61zpoe$(ju().DISTRIBUTION_PARAMETERS),o=null!=t.get_61zpoe$(ju().LINE_QUANTILES)?t.getOrderedBoundedDoubleDistinctPair_ai6r6m$(ju().LINE_QUANTILES,0,1):null;return cn.Stats.qqline_gpdyv6$(null!=n?n:Wi.Companion.DEF_DISTRIBUTION,i,null!=o?o:Xi.Companion.DEF_LINE_QUANTILES)},c_.prototype.configureQQ2LineStat_0=function(t){var e=null!=t.get_61zpoe$(ju().LINE_QUANTILES)?t.getOrderedBoundedDoubleDistinctPair_ai6r6m$(ju().LINE_QUANTILES,0,1):null;return cn.Stats.qq2line_ot2paf$(null!=e?e:Xi.Companion.DEF_LINE_QUANTILES)},c_.$metadata$={kind:m,simpleName:"StatProto",interfaces:[]};var p_=null;function h_(){return null===p_&&new c_,p_}function __(t,e,n,i){La.call(this,t,e,n,i)}function d_(){f_=this,this.CONVERTERS_MAP_0=new P_}__.prototype.createTooltips=function(){var t,e,n,i,o=this.create();if(t=o.valueSources,null!=(e=o.linePatterns)){var r,a=N(O(e,10));for(r=e.iterator();r.hasNext();){var s=r.next();a.add_11rb$(Zi(s))}i=a}else i=null;return new _n(t,i,new Ji(this.readAnchor_0(),this.readMinWidth_0()),null!=(n=o.titleLine)?Zi(n):null)},__.prototype.readAnchor_0=function(){var t;if(!this.has_61zpoe$(Ms().TOOLTIP_ANCHOR))return null;var e=this.getString_61zpoe$(Ms().TOOLTIP_ANCHOR);switch(e){case"top_left":t=new eo(Qi.TOP,to.LEFT);break;case"top_center":t=new eo(Qi.TOP,to.CENTER);break;case"top_right":t=new eo(Qi.TOP,to.RIGHT);break;case"middle_left":t=new eo(Qi.MIDDLE,to.LEFT);break;case"middle_center":t=new eo(Qi.MIDDLE,to.CENTER);break;case"middle_right":t=new eo(Qi.MIDDLE,to.RIGHT);break;case"bottom_left":t=new eo(Qi.BOTTOM,to.LEFT);break;case"bottom_center":t=new eo(Qi.BOTTOM,to.CENTER);break;case"bottom_right":t=new eo(Qi.BOTTOM,to.RIGHT);break;default:throw c("Illegal value "+k(e)+", "+Ms().TOOLTIP_ANCHOR+", expected values are: 'top_left'/'top_center'/'top_right'/'middle_left'/'middle_center'/'middle_right'/'bottom_left'/'bottom_center'/'bottom_right'")}return t},__.prototype.readMinWidth_0=function(){return this.has_61zpoe$(Ms().TOOLTIP_MIN_WIDTH)?this.getDouble_61zpoe$(Ms().TOOLTIP_MIN_WIDTH):null},__.$metadata$={kind:S,simpleName:"TooltipConfig",interfaces:[La]},d_.prototype.getConverter_31786j$=function(t){return this.CONVERTERS_MAP_0.get_31786j$(t)},d_.prototype.apply_kqseza$=function(t,e){return this.getConverter_31786j$(t)(e)},d_.prototype.applyToList_s6xytz$=function(t,e){var n,i=this.getConverter_31786j$(t),o=h();for(n=e.iterator();n.hasNext();){var r=n.next();o.add_11rb$(i(G(r)))}return o},d_.prototype.has_896ixz$=function(t){return this.CONVERTERS_MAP_0.containsKey_896ixz$(t)},d_.$metadata$={kind:m,simpleName:"AesOptionConversion",interfaces:[]};var f_=null;function m_(){return null===f_&&new d_,f_}function $_(){}function y_(){b_()}function g_(){var t,e;for(v_=this,this.LINE_TYPE_BY_CODE_0=_(),this.LINE_TYPE_BY_NAME_0=_(),t=ro(),e=0;e!==t.length;++e){var n=t[e],i=this.LINE_TYPE_BY_CODE_0,o=n.code;i.put_xwzc9p$(o,n);var r=this.LINE_TYPE_BY_NAME_0,a=n.name.toLowerCase();r.put_xwzc9p$(a,n)}}$_.prototype.apply_11rb$=function(t){if(null==t)return null;if(e.isType(t,pi))return t;if(e.isNumber(t))return N_().COLOR.invoke_yrwdxb$(ut(t));try{return di.Colors.parseColor_61zpoe$(t.toString())}catch(n){throw e.isType(n,j)?c("Can't convert to color: '"+k(t)+"' ("+k(e.getKClassFromExpression(t).simpleName)+")"):n}},$_.$metadata$={kind:S,simpleName:"ColorOptionConverter",interfaces:[no]},y_.prototype.apply_11rb$=function(t){return null==t?io.SOLID:e.isType(t,oo)?t:"string"==typeof t&&b_().LINE_TYPE_BY_NAME_0.containsKey_11rb$(t)?G(b_().LINE_TYPE_BY_NAME_0.get_11rb$(t)):e.isNumber(t)&&b_().LINE_TYPE_BY_CODE_0.containsKey_11rb$(A(t))?G(b_().LINE_TYPE_BY_CODE_0.get_11rb$(A(t))):io.SOLID},g_.$metadata$={kind:m,simpleName:"Companion",interfaces:[]};var v_=null;function b_(){return null===v_&&new g_,v_}function w_(){}function x_(){E_()}function k_(){var t,e;C_=this,this.SHAPE_BY_CODE_0=null;var n=_();for(t=uo(),e=0;e!==t.length;++e){var i=t[e],o=i.code;n.put_xwzc9p$(o,i)}var r=so.TinyPointShape.code,a=so.TinyPointShape;n.put_xwzc9p$(r,a),this.SHAPE_BY_CODE_0=n}y_.$metadata$={kind:S,simpleName:"LineTypeOptionConverter",interfaces:[no]},w_.prototype.apply_11rb$=function(t){if(null==t)return null;if(e.isNumber(t))return ut(t);try{return K(t.toString())}catch(n){throw e.isType(n,pt)?c("Can't convert to number: '"+k(t)+"'"):n}},w_.$metadata$={kind:S,simpleName:"NumericOptionConverter",interfaces:[no]},x_.prototype.apply_11rb$=function(t){return E_().convert_0(t)},k_.prototype.convert_0=function(t){return null==t?null:e.isType(t,ao)?t:e.isNumber(t)&&this.SHAPE_BY_CODE_0.containsKey_11rb$(A(t))?G(this.SHAPE_BY_CODE_0.get_11rb$(A(t))):this.charShape_0(t.toString())},k_.prototype.charShape_0=function(t){return t.length>0?46===t.charCodeAt(0)?so.TinyPointShape:lo.BULLET:so.TinyPointShape},k_.$metadata$={kind:m,simpleName:"Companion",interfaces:[]};var C_=null;function E_(){return null===C_&&new k_,C_}function S_(){var t;for(O_=this,this.COLOR=new T_,this.MAP_0=_(),t=Zt.Companion.numeric_shhb9a$(Zt.Companion.values()).iterator();t.hasNext();){var e=t.next(),n=this.MAP_0,i=Xn.Mappers.IDENTITY;n.put_xwzc9p$(e,i)}var o=this.MAP_0,r=Zt.Companion.COLOR,a=this.COLOR;o.put_xwzc9p$(r,a);var s=this.MAP_0,l=Zt.Companion.FILL,u=this.COLOR;s.put_xwzc9p$(l,u)}function T_(){}x_.$metadata$={kind:S,simpleName:"ShapeOptionConverter",interfaces:[no]},S_.prototype.contain_896ixz$=function(t){return this.MAP_0.containsKey_11rb$(t)},S_.prototype.get_31786j$=function(t){var n;if(!this.contain_896ixz$(t)){var i="No continuous identity mapper found for aes "+t.name;throw c(i.toString())}var o=G(this.MAP_0.get_11rb$(t));return e.isType(n=o,Ti)?n:v()},T_.prototype.invoke_yrwdxb$=function(t){var e;if(null==t)e=null;else{var n=po(co(t));e=new pi(n>>16&255,n>>8&255,255&n)}return e},T_.$metadata$={kind:S,interfaces:[Ti]},S_.$metadata$={kind:m,simpleName:"TypedContinuousIdentityMappers",interfaces:[]};var O_=null;function N_(){return null===O_&&new S_,O_}function P_(){B_(),this.myMap_0=_(),this.put_0(Zt.Companion.X,B_().DOUBLE_CVT_0),this.put_0(Zt.Companion.Y,B_().DOUBLE_CVT_0),this.put_0(Zt.Companion.Z,B_().DOUBLE_CVT_0),this.put_0(Zt.Companion.YMIN,B_().DOUBLE_CVT_0),this.put_0(Zt.Companion.YMAX,B_().DOUBLE_CVT_0),this.put_0(Zt.Companion.COLOR,B_().COLOR_CVT_0),this.put_0(Zt.Companion.FILL,B_().COLOR_CVT_0),this.put_0(Zt.Companion.ALPHA,B_().DOUBLE_CVT_0),this.put_0(Zt.Companion.SHAPE,B_().SHAPE_CVT_0),this.put_0(Zt.Companion.LINETYPE,B_().LINETYPE_CVT_0),this.put_0(Zt.Companion.SIZE,B_().DOUBLE_CVT_0),this.put_0(Zt.Companion.STACKSIZE,B_().DOUBLE_CVT_0),this.put_0(Zt.Companion.WIDTH,B_().DOUBLE_CVT_0),this.put_0(Zt.Companion.HEIGHT,B_().DOUBLE_CVT_0),this.put_0(Zt.Companion.BINWIDTH,B_().DOUBLE_CVT_0),this.put_0(Zt.Companion.VIOLINWIDTH,B_().DOUBLE_CVT_0),this.put_0(Zt.Companion.WEIGHT,B_().DOUBLE_CVT_0),this.put_0(Zt.Companion.INTERCEPT,B_().DOUBLE_CVT_0),this.put_0(Zt.Companion.SLOPE,B_().DOUBLE_CVT_0),this.put_0(Zt.Companion.XINTERCEPT,B_().DOUBLE_CVT_0),this.put_0(Zt.Companion.YINTERCEPT,B_().DOUBLE_CVT_0),this.put_0(Zt.Companion.LOWER,B_().DOUBLE_CVT_0),this.put_0(Zt.Companion.MIDDLE,B_().DOUBLE_CVT_0),this.put_0(Zt.Companion.UPPER,B_().DOUBLE_CVT_0),this.put_0(Zt.Companion.SAMPLE,B_().DOUBLE_CVT_0),this.put_0(Zt.Companion.QUANTILE,B_().DOUBLE_CVT_0),this.put_0(Zt.Companion.MAP_ID,B_().IDENTITY_O_CVT_0),this.put_0(Zt.Companion.FRAME,B_().IDENTITY_S_CVT_0),this.put_0(Zt.Companion.SPEED,B_().DOUBLE_CVT_0),this.put_0(Zt.Companion.FLOW,B_().DOUBLE_CVT_0),this.put_0(Zt.Companion.XMIN,B_().DOUBLE_CVT_0),this.put_0(Zt.Companion.XMAX,B_().DOUBLE_CVT_0),this.put_0(Zt.Companion.XEND,B_().DOUBLE_CVT_0),this.put_0(Zt.Companion.YEND,B_().DOUBLE_CVT_0),this.put_0(Zt.Companion.LABEL,B_().IDENTITY_O_CVT_0),this.put_0(Zt.Companion.FAMILY,B_().IDENTITY_S_CVT_0),this.put_0(Zt.Companion.FONTFACE,B_().IDENTITY_S_CVT_0),this.put_0(Zt.Companion.LINEHEIGHT,B_().DOUBLE_CVT_0),this.put_0(Zt.Companion.HJUST,B_().IDENTITY_O_CVT_0),this.put_0(Zt.Companion.VJUST,B_().IDENTITY_O_CVT_0),this.put_0(Zt.Companion.ANGLE,B_().DOUBLE_CVT_0),this.put_0(Zt.Companion.SLICE,B_().DOUBLE_CVT_0),this.put_0(Zt.Companion.EXPLODE,B_().DOUBLE_CVT_0)}function I_(){M_=this,this.IDENTITY_O_CVT_0=A_,this.IDENTITY_S_CVT_0=R_,this.DOUBLE_CVT_0=j_,this.COLOR_CVT_0=L_,this.SHAPE_CVT_0=z_,this.LINETYPE_CVT_0=D_}function A_(t){return t}function R_(t){return null!=t?t.toString():null}function j_(t){return(new w_).apply_11rb$(t)}function L_(t){return(new $_).apply_11rb$(t)}function z_(t){return(new x_).apply_11rb$(t)}function D_(t){return(new y_).apply_11rb$(t)}P_.prototype.put_0=function(t,e){this.myMap_0.put_xwzc9p$(t,e)},P_.prototype.get_31786j$=function(t){var e;return"function"==typeof(e=this.myMap_0.get_11rb$(t))?e:v()},P_.prototype.containsKey_896ixz$=function(t){return this.myMap_0.containsKey_11rb$(t)},I_.$metadata$={kind:m,simpleName:"Companion",interfaces:[]};var M_=null;function B_(){return null===M_&&new I_,M_}function F_(){U_=this}P_.$metadata$={kind:S,simpleName:"TypedOptionConverterMap",interfaces:[]},F_.prototype.convertValue_bm4g0d$=function(t,e){var n;switch(t){case"legend_position":n=this.toPosition_0(e);break;case"legend_justification":n=this.toJustification_0(e);break;case"legend_direction":n=this.toDirection_0(e);break;default:n=e}return n},F_.prototype.toPosition_0=function(t){var n;if("string"==typeof t)switch(t){case"right":n=ho.Companion.RIGHT;break;case"left":n=ho.Companion.LEFT;break;case"top":n=ho.Companion.TOP;break;case"bottom":n=ho.Companion.BOTTOM;break;case"none":n=ho.Companion.NONE;break;default:throw c("Illegal value: '"+t.toString()+"'.\n"+In.ThemeOption.LEGEND_POSITION+" expected value is either a string: left|right|top|bottom|none or two-element numeric list.")}else if(e.isType(t,lt)){var i=$r().toNumericPair_9ma18$(t);n=new ho(i.x,i.y)}else{if(!e.isType(t,ho))throw c("Illegal value type: "+k(e.getKClassFromExpression(t).simpleName)+".\n"+In.ThemeOption.LEGEND_POSITION+" expected value is either a string: left|right|top|bottom|none or two-element numeric list.");n=t}return n},F_.prototype.toJustification_0=function(t){var n;if("string"==typeof t){if(!tt(t,"center"))throw c("Illegal value '"+t.toString()+"', "+In.ThemeOption.LEGEND_JUSTIFICATION+" expected values are: 'center' or two-element numeric list.");n=_o.Companion.CENTER}else if(e.isType(t,lt)){var i=$r().toNumericPair_9ma18$(t);n=new _o(i.x,i.y)}else{if(!e.isType(t,_o))throw c("Illegal value type: "+k(e.getKClassFromExpression(t).simpleName)+", "+In.ThemeOption.LEGEND_JUSTIFICATION+" expected values are: 'center' or two-element numeric list.");n=t}return n},F_.prototype.toDirection_0=function(t){var e;switch(t){case"horizontal":e=fo.HORIZONTAL;break;case"vertical":e=fo.VERTICAL;break;default:throw c("Illegal value: "+t.toString()+", "+In.ThemeOption.LEGEND_DIRECTION+". Expected values are: 'horizontal' or 'vertical'.")}return e},F_.$metadata$={kind:m,simpleName:"LegendThemeConfig",interfaces:[]};var U_=null;function q_(){return null===U_&&new F_,U_}function H_(t,e){V_(),void 0===t&&(t=f()),this.theme=null;var n,i,o=t,r=gs().NAME,a=(null!=(n=o.get_11rb$(r))?n:mo.Name.LP_MINIMAL).toString(),s=go.Companion.forName_61zpoe$(a),l=t,u=jt(At(l.size));for(i=l.entries.iterator();i.hasNext();){var c=i.next(),p=u.put_xwzc9p$,h=c.key,_=c.key,d=c.value,m=V_().convertElementBlank_0(d);m=V_().convertMargins_0(m),p.call(u,h,q_().convertValue_bm4g0d$(_,m))}var $,y=u,g=go.Companion,v=s.values,b=fp(t,[jc().FLAVOR]);$=null!=b?vo.Companion.forName_61zpoe$(b).updateColors_x7u0o8$(v):v;var w=g.mergeWith_oz50u7$($,y);this.theme=new bo(w,e)}function G_(){K_=this}G_.prototype.convertElementBlank_0=function(t){if("string"==typeof t&&tt(t,In.ThemeOption.ELEMENT_BLANK_SHORTHAND))return In.ThemeOption.ELEMENT_BLANK;var n,i=e.isType(t,d);return i&&(i=tt((e.isType(n=t,d)?n:v()).get_11rb$("name"),"blank")),i?In.ThemeOption.ELEMENT_BLANK:t},G_.prototype.convertMargins_0=function(t){var n,i,o=e.isType(t,d);if(o){var r,a=mo.Elem.MARGIN;o=(e.isType(r=t,d)?r:v()).containsKey_11rb$(a)}if(o){var s,l,u=mo.Elem.MARGIN,c=e.isType(n=(e.isType(s=t,d)?s:v()).get_11rb$(u),d)?n:v(),p=N(c.size);for(l=c.entries.iterator();l.hasNext();){var h=l.next(),_=p.add_11rb$,f=h.key,m=h.value;_.call(p,wt(mo.Elem.MARGIN+"_"+k(f),m))}var $=p;i=yo($o(t,mo.Elem.MARGIN),$)}else i=t;return i},G_.$metadata$={kind:m,simpleName:"Companion",interfaces:[]};var K_=null;function V_(){return null===K_&&new G_,K_}function Y_(){W_=this}H_.$metadata$={kind:S,simpleName:"ThemeConfig",interfaces:[]},Y_.prototype.apply_bkhwtg$=function(t){return this.cleanCopyOfMap_0(t)},Y_.prototype.cleanCopyOfMap_0=function(t){var n,i=Lt();for(n=t.keys.iterator();n.hasNext();){var o,r=n.next(),a=(e.isType(o=t,d)?o:v()).get_11rb$(r);if(null!=a){var s=k(r),l=this.cleanValue_0(a);i.put_xwzc9p$(s,l)}}return i},Y_.prototype.cleanValue_0=function(t){return e.isType(t,d)?this.cleanCopyOfMap_0(t):e.isType(t,lt)?this.cleanList_0(t):t},Y_.prototype.cleanList_0=function(t){var e;if(!this.containSpecs_0(t))return t;var n=N(t.size);for(e=t.iterator();e.hasNext();){var i=e.next();n.add_11rb$(this.cleanValue_0(G(i)))}return n},Y_.prototype.containSpecs_0=function(t){var n;t:do{var i;if(e.isType(t,we)&&t.isEmpty()){n=!1;break t}for(i=t.iterator();i.hasNext();){var o=i.next();if(e.isType(o,d)||e.isType(o,lt)){n=!0;break t}}n=!1}while(0);return n},Y_.$metadata$={kind:m,simpleName:"PlotSpecCleaner",interfaces:[]};var W_=null;function X_(){return null===W_&&new Y_,W_}function Z_(t){var e;for(ad(),this.myMakeCleanCopy_0=!1,this.mySpecChanges_0=null,this.myMakeCleanCopy_0=t.myMakeCleanCopy_8be2vx$,this.mySpecChanges_0=_(),e=t.mySpecChanges_8be2vx$.entries.iterator();e.hasNext();){var n=e.next(),i=n.key,o=n.value;if(o.isEmpty())throw M("Check failed.".toString());this.mySpecChanges_0.put_xwzc9p$(i,o)}}function J_(t){this.closure$result=t}function Q_(t){this.myMakeCleanCopy_8be2vx$=t,this.mySpecChanges_8be2vx$=_()}function td(){rd=this}J_.prototype.getSpecsAbsolute_vqirvp$=function(t){var n,i=gd(Fn(t)).findSpecs_bkhwtg$(this.closure$result);return e.isType(n=i,lt)?n:v()},J_.$metadata$={kind:S,interfaces:[$d]},Z_.prototype.apply_i49brq$=function(t){var n,i=this.myMakeCleanCopy_0?X_().apply_bkhwtg$(t):e.isType(n=t,g)?n:v(),o=new J_(i),r=Ed().root();return this.applyChangesToSpec_0(r,i,o),i},Z_.prototype.applyChangesToSpec_0=function(t,e,n){var i,o;for(i=e.keys.iterator();i.hasNext();){var r=i.next(),a=G(e.get_11rb$(r)),s=t.with().part_61zpoe$(r).build();this.applyChangesToValue_0(s,a,n)}for(o=this.applicableSpecChanges_0(t,e).iterator();o.hasNext();)o.next().apply_il3x6g$(e,n)},Z_.prototype.applyChangesToValue_0=function(t,n,i){var o,r;if(e.isType(n,d)){var a=e.isType(o=n,g)?o:v();this.applyChangesToSpec_0(t,a,i)}else if(e.isType(n,lt))for(r=n.iterator();r.hasNext();){var s=r.next();this.applyChangesToValue_0(t,s,i)}},Z_.prototype.applicableSpecChanges_0=function(t,e){var n;if(this.mySpecChanges_0.containsKey_11rb$(t)){var i=h();for(n=G(this.mySpecChanges_0.get_11rb$(t)).iterator();n.hasNext();){var o=n.next();o.isApplicable_x7u0o8$(e)&&i.add_11rb$(o)}return i}return Y()},Q_.prototype.change_t6n62v$=function(t,e){if(!this.mySpecChanges_8be2vx$.containsKey_11rb$(t)){var n=this.mySpecChanges_8be2vx$,i=h();n.put_xwzc9p$(t,i)}return G(this.mySpecChanges_8be2vx$.get_11rb$(t)).add_11rb$(e),this},Q_.prototype.build=function(){return new Z_(this)},Q_.$metadata$={kind:S,simpleName:"Builder",interfaces:[]},td.prototype.builderForRawSpec=function(){return new Q_(!0)},td.prototype.builderForCleanSpec=function(){return new Q_(!1)},td.$metadata$={kind:m,simpleName:"Companion",interfaces:[]};var ed,nd,id,od,rd=null;function ad(){return null===rd&&new td,rd}function sd(){dd=this,this.GGBUNCH_KEY_PARTS=[Cs().ITEMS,xs().FEATURE_SPEC],this.PLOT_WITH_LAYERS_TARGETS_0=Se([cd(),pd(),hd(),_d()])}function ld(t,e){Ni.call(this),this.name$=t,this.ordinal$=e}function ud(){ud=function(){},ed=new ld("PLOT",0),nd=new ld("LAYER",1),id=new ld("GEOM",2),od=new ld("STAT",3)}function cd(){return ud(),ed}function pd(){return ud(),nd}function hd(){return ud(),id}function _d(){return ud(),od}Z_.$metadata$={kind:S,simpleName:"PlotSpecTransform",interfaces:[]},sd.prototype.getDataSpecFinders_6taknv$=function(t){return this.getPlotAndLayersSpecFinders_esgbho$(t,[Ts().DATA])},sd.prototype.getPlotAndLayersSpecFinders_esgbho$=function(t,e){var n=this.getPlotAndLayersSpecSelectorKeys_0(t,e.slice());return this.toFinders_0(n)},sd.prototype.toFinders_0=function(t){var e,n=h();for(e=t.iterator();e.hasNext();){var i=e.next();n.add_11rb$(gd(i))}return n},sd.prototype.getPlotAndLayersSpecSelectors_esgbho$=function(t,e){var n=this.getPlotAndLayersSpecSelectorKeys_0(t,e.slice());return this.toSelectors_0(n)},sd.prototype.toSelectors_0=function(t){var e,n=N(O(t,10));for(e=t.iterator();e.hasNext();){var i=e.next();n.add_11rb$(Ed().from_upaayv$(i))}return n},sd.prototype.getPlotAndLayersSpecSelectorKeys_0=function(t,e){var n,i=h();for(n=this.PLOT_WITH_LAYERS_TARGETS_0.iterator();n.hasNext();){var o=n.next(),r=this.selectorKeys_0(o,t),a=Se(this.concat_0(r,e).slice());i.add_11rb$(a)}return i},sd.prototype.concat_0=function(t,e){return t.concat(e)},sd.prototype.selectorKeys_0=function(t,n){var i;switch(t.name){case"PLOT":i=[];break;case"LAYER":i=[Ps().LAYERS];break;case"GEOM":i=[Ps().LAYERS,Ms().GEOM];break;case"STAT":i=[Ps().LAYERS,Ms().STAT];break;default:e.noWhenBranchMatched()}return n&&(i=this.concat_0(this.GGBUNCH_KEY_PARTS,i)),i},ld.$metadata$={kind:S,simpleName:"TargetSpec",interfaces:[Ni]},ld.values=function(){return[cd(),pd(),hd(),_d()]},ld.valueOf_61zpoe$=function(t){switch(t){case"PLOT":return cd();case"LAYER":return pd();case"GEOM":return hd();case"STAT":return _d();default:Pi("No enum constant jetbrains.datalore.plot.config.transform.PlotSpecTransformUtil.TargetSpec."+t)}},sd.$metadata$={kind:m,simpleName:"PlotSpecTransformUtil",interfaces:[]};var dd=null;function fd(){return null===dd&&new sd,dd}function md(){}function $d(){}function yd(){this.myKeys_0=null}function gd(t,e){return e=e||Object.create(yd.prototype),yd.call(e),e.myKeys_0=Dt(t),e}function vd(t){Ed(),this.myKey_0=null,this.myKey_0=R(G(t.mySelectorParts_8be2vx$),"|")}function bd(){this.mySelectorParts_8be2vx$=null}function wd(t){return t=t||Object.create(bd.prototype),bd.call(t),t.mySelectorParts_8be2vx$=h(),G(t.mySelectorParts_8be2vx$).add_11rb$("/"),t}function xd(t,e){var n;for(e=e||Object.create(bd.prototype),bd.call(e),e.mySelectorParts_8be2vx$=h(),n=0;n!==t.length;++n){var i=t[n];G(e.mySelectorParts_8be2vx$).add_11rb$(i)}return e}function kd(){Cd=this}md.prototype.isApplicable_x7u0o8$=function(t){return!0},md.$metadata$={kind:wo,simpleName:"SpecChange",interfaces:[]},$d.$metadata$={kind:wo,simpleName:"SpecChangeContext",interfaces:[]},yd.prototype.findSpecs_bkhwtg$=function(t){return this.myKeys_0.isEmpty()?x(t):this.findSpecs_0(this.myKeys_0.get_za3lpa$(0),this.myKeys_0.subList_vux9f0$(1,this.myKeys_0.size),t)},yd.prototype.findSpecs_0=function(t,n,i){var o,r;if((e.isType(r=i,d)?r:v()).containsKey_11rb$(t)){var a,s=(e.isType(a=i,d)?a:v()).get_11rb$(t);if(e.isType(s,d))return n.isEmpty()?x(s):this.findSpecs_0(n.get_za3lpa$(0),n.subList_vux9f0$(1,n.size),s);if(e.isType(s,lt)){if(n.isEmpty()){var l=h();for(o=s.iterator();o.hasNext();){var u=o.next();e.isType(u,d)&&l.add_11rb$(u)}return l}return this.findSpecsInList_0(n.get_za3lpa$(0),n.subList_vux9f0$(1,n.size),s)}}return Y()},yd.prototype.findSpecsInList_0=function(t,n,i){var o,r=h();for(o=i.iterator();o.hasNext();){var a=o.next();e.isType(a,d)?r.addAll_brywnq$(this.findSpecs_0(t,n,a)):e.isType(a,lt)&&r.addAll_brywnq$(this.findSpecsInList_0(t,n,a))}return r},yd.$metadata$={kind:S,simpleName:"SpecFinder",interfaces:[]},vd.prototype.with=function(){var t,e=this.myKey_0,n=H("\\|").split_905azu$(e,0);t:do{if(!n.isEmpty())for(var i=n.listIterator_za3lpa$(n.size);i.hasPrevious();)if(0!==i.previous().length){t=Ut(n,i.nextIndex()+1|0);break t}t=Y()}while(0);return xd(ko(t))},vd.prototype.equals=function(t){var n,i;if(this===t)return!0;if(null==t||null==(n=e.getKClassFromExpression(this))||!n.equals(e.getKClassFromExpression(t)))return!1;var o=null==(i=t)||e.isType(i,vd)?i:v();return tt(this.myKey_0,G(o).myKey_0)},vd.prototype.hashCode=function(){return xo(x(this.myKey_0))},vd.prototype.toString=function(){return"SpecSelector{myKey='"+this.myKey_0+String.fromCharCode(39)+String.fromCharCode(125)},bd.prototype.part_61zpoe$=function(t){return G(this.mySelectorParts_8be2vx$).add_11rb$(t),this},bd.prototype.build=function(){return new vd(this)},bd.$metadata$={kind:S,simpleName:"Builder",interfaces:[]},kd.prototype.root=function(){return wd().build()},kd.prototype.of_vqirvp$=function(t){return this.from_upaayv$(Se(t.slice()))},kd.prototype.from_upaayv$=function(t){for(var e=wd(),n=t.iterator();n.hasNext();){var i=n.next();e.part_61zpoe$(i)}return e.build()},kd.$metadata$={kind:m,simpleName:"Companion",interfaces:[]};var Cd=null;function Ed(){return null===Cd&&new kd,Cd}function Sd(){Nd()}function Td(){Od=this}vd.$metadata$={kind:S,simpleName:"SpecSelector",interfaces:[]},Sd.prototype.isApplicable_x7u0o8$=function(t){return e.isType(t.get_11rb$(Ms().GEOM),d)},Sd.prototype.apply_il3x6g$=function(t,n){var i,o,r,a,s=e.isType(i=t.remove_11rb$(Ms().GEOM),g)?i:v(),l=gs().NAME,u="string"==typeof(o=(e.isType(a=s,g)?a:v()).remove_11rb$(l))?o:v(),c=Ms().GEOM;t.put_xwzc9p$(c,u),t.putAll_a2k3zr$(e.isType(r=s,d)?r:v())},Td.prototype.specSelector_6taknv$=function(t){var e=h();return t&&e.addAll_brywnq$(Fn(fd().GGBUNCH_KEY_PARTS)),e.add_11rb$(Ps().LAYERS),Ed().from_upaayv$(e)},Td.$metadata$={kind:m,simpleName:"Companion",interfaces:[]};var Od=null;function Nd(){return null===Od&&new Td,Od}function Pd(){Id=this}Sd.$metadata$={kind:S,simpleName:"MoveGeomPropertiesToLayerMigration",interfaces:[md]},Pd.prototype.applyStatisticalTransform_xdgawp$=function(t,n,i,o,r,a){var s,l,c,p,_,d=fn.DataProcessing.defaultGroupingVariables_39xr23$(t,n.varBindings,null),f=new Co(t,d,n.explicitGroupingVarName,!0),m=n.stat;if(m===cn.Stats.IDENTITY)l=t,s=f;else{var $,y=Ct(n.tooltips.valueSources,n.annotations.valueSources),g=h();for($=y.iterator();$.hasNext();){var v=$.next();e.isType(v,wn)&&g.add_11rb$(v)}var b,w=N(O(g,10));for(b=g.iterator();b.hasNext();){var x=b.next();w.add_11rb$(x.getVariableName())}var k,C=n.orderOptions,E=dn("byVariable",1,(function(t){return t.byVariable})),S=h();for(k=C.iterator();k.hasNext();){var T;null!=(T=E(k.next()))&&S.add_11rb$(T)}var P=Ct(w,S),I=new Eo(t,n.varBindings,o,i,n.isYOrientation),A=fn.DataProcessing.buildStatData_ardmvj$(I,m,f,r,P,n.orderOptions,n.aggregateOperation,(c=a,p=n,_=this,function(t){return c(_.createStatMessage_0(t,p)),u}));l=A.data,s=A.groupingContext}return Gd().apply_fe3is1$(l,n.samplings,s.groupMapper,function(t,e,n){return function(i){return t(n.createSamplingMessage_0(i,e)),u}}(a,n,this))},Pd.prototype.getStatName_0=function(t){var n=G(e.getKClassFromExpression(t.stat).simpleName),i=n=$(n,"Stat"," stat");return H("([a-z])([A-Z]+)").replace_x2uqeu$(i,"$1_$2").toLowerCase()},Pd.prototype.createSamplingMessage_0=function(t,e){return t+" was applied to ["+e.geomProto.geomKind.name.toLowerCase()+"/"+this.getStatName_0(e)+"] layer"},Pd.prototype.createStatMessage_0=function(t,e){return t+" in ["+e.geomProto.geomKind.name.toLowerCase()+"/"+this.getStatName_0(e)+"] layer"},Pd.$metadata$={kind:m,simpleName:"BackendDataProcUtil",interfaces:[]};var Id=null;function Ad(){return null===Id&&new Pd,Id}function Rd(){jd=this,this.LOG_0=U.PortableLogging.logger_xo1ogr$(q(Rd))}Rd.prototype.processTransform_2wxo1b$=function(t){var n,i;try{n=Ap().isGGBunchSpec_bkhwtg$(t)?this.processTransformInBunch_0(t):this.processTransformIntern_0(t)}catch(t){if(!e.isType(t,j))throw t;var o=Ar().failureInfo_j5jy6c$(t);o.isInternalError&&this.LOG_0.error_l35kib$(t,(i=o,function(){return i.message})),n=So(Ap().failure_61zpoe$(o.message))}return n},Rd.prototype.processTransformInBunch_0=function(t){var n,i,o;if(!t.containsKey_11rb$(Cs().ITEMS)){var r=Cs().ITEMS,a=Y();return t.put_xwzc9p$(r,a),t}var s=G(t.get_11rb$(Cs().ITEMS));if(!e.isType(s,lt))throw c("GGBunch: list of features expected but was: "+k(e.getKClassFromExpression(s).simpleName));var l=h();for(n=s.iterator();n.hasNext();){var u=n.next();if(!e.isType(u,d))throw c("GGBunch item: Map of attributes expected but was: "+k(e.getKClassFromExpression(G(u)).simpleName));var p=So(e.isType(i=u,d)?i:v());if(!p.containsKey_11rb$(xs().FEATURE_SPEC))throw c("GGBunch item: absent required attribute: feature_spec");var _=G(p.get_11rb$(xs().FEATURE_SPEC));if(!e.isType(_,d))throw c("GGBunch item '"+xs().FEATURE_SPEC+"' : Map of attributes expected but was: "+k(e.getKClassFromExpression(_).simpleName));var f=So(e.isType(o=_,d)?o:v()),m=f.get_11rb$(gs().KIND);if(!tt(Za().PLOT,m))throw c("GGBunch item feature kind not suppotred: "+k(m));var $=this.processTransformIntern_0(f),y=xs().FEATURE_SPEC;p.put_xwzc9p$(y,$),l.add_11rb$(p)}var g=Cs().ITEMS;return t.put_xwzc9p$(g,l),t},Rd.prototype.processTransformIntern_0=function(t){return this.processTransformIntern2_0(t).component1()},Rd.prototype.getTransformedSpecsAndPlotConfig_ui7x64$=function(t){return this.processTransformIntern2_0(t)},Rd.prototype.processTransformIntern2_0=function(t){var e=Jd().migrationTransform().apply_i49brq$(t);e=Jd().bistroTransform().apply_i49brq$(e);var n=new Dd(e=Jd().entryTransform().apply_i49brq$(e));return n.updatePlotSpec_8be2vx$(),new z(e,n)},Rd.prototype.throwTestingException_0=function(t){var n;if(t.containsKey_11rb$(Ps().TITLE)){var i=G((e.isType(n=t.get_11rb$(Ps().TITLE),d)?n:v()).get_11rb$(Ps().TITLE_TEXT));if(tt("Throw testing exception",i))throw c("User configuration error")}},Rd.$metadata$={kind:m,simpleName:"BackendSpecTransformUtil",interfaces:[]};var jd=null;function Ld(){return null===jd&&new Rd,jd}function zd(t,e){this.dataFrames_0=t,this.transformByAes_0=e}function Dd(t){Ud(),Np.call(this,t,!1)}function Md(t,e){return function(n){return t(e,n),u}}function Bd(){Fd=this,this.LOG_0=U.PortableLogging.logger_xo1ogr$(q(Dd))}zd.prototype.overallRange_0=function(t,e){var n,i=null;for(n=e.iterator();n.hasNext();){var o=n.next();o.has_8xm3sj$(t)&&(i=sn.SeriesUtil.span_w2blas$(i,o.range_8xm3sj$(t)))}return i},zd.prototype.overallXRange=function(){return this.overallRange_1(Zt.Companion.X)},zd.prototype.overallYRange=function(){return this.overallRange_1(Zt.Companion.Y)},zd.prototype.overallRange_1=function(t){var n,i,o=nt.DataFrameUtil.transformVarFor_896ixz$(t),r=new z(To.NaN,To.NaN);if(this.transformByAes_0.containsKey_11rb$(t)){var a=Ae(this.transformByAes_0,t);n=e.isType(a,dt)?Xn.ScaleUtil.transformedDefinedLimits_gxz7zd$(a):r}else n=r;var s=n,l=s.component1(),u=s.component2(),c=this.overallRange_0(o,this.dataFrames_0);if(null!=c){var p=oi(l)?l:c.lowerEnd,h=oi(u)?u:c.upperEnd;i=wt(p,h)}else i=sn.SeriesUtil.allFinite_jma9l8$(l,u)?wt(l,u):null;var _=i;return null!=_?new _t(_.first,_.second):null},zd.$metadata$={kind:S,simpleName:"ConfiguredStatContext",interfaces:[Oo]},Dd.prototype.createLayerConfig_4qlr5d$=function(t,e,n,i,o,r){var a,s="string"==typeof(a=t.get_11rb$(Ms().GEOM))?a:v();return new Ta(t,e,n,i,o,new sa(Dc().toGeomKind_61zpoe$(s)),!1,r)},Dd.prototype.updatePlotSpec_8be2vx$=function(){for(var t=Bt(),e=this.dataByTileByLayerAfterStat_5qft8t$_0(function(t,e){return function(n,i){return t.add_11rb$(n),oh().addComputationMessage_qqfnr1$(e,i),u}}(t,this)),n=h(),i=this.layerConfigs,o=0;o!==i.size;++o){var r,a,s,l,c=_();for(r=e.iterator();r.hasNext();){var p=r.next().get_za3lpa$(o),d=p.variables();if(c.isEmpty())for(a=d.iterator();a.hasNext();){var f=a.next(),m=f.name,$=new z(f,Dt(p.get_8xm3sj$(f)));c.put_xwzc9p$(m,$)}else for(s=d.iterator();s.hasNext();){var y=s.next();G(c.get_11rb$(y.name)).second.addAll_brywnq$(p.get_8xm3sj$(y))}}var g=st();for(l=c.keys.iterator();l.hasNext();){var v=l.next(),b=G(c.get_11rb$(v)).first,w=G(c.get_11rb$(v)).second;g.put_2l962d$(b,w)}var x=g.build();n.add_11rb$(x)}for(var k=0,C=i.iterator();C.hasNext();++k){var E=C.next();if(E.stat!==cn.Stats.IDENTITY||t.contains_11rb$(k)){var S=n.get_za3lpa$(k);E.replaceOwnData_84jd1e$(S)}}this.dropUnusedDataBeforeEncoding_r9oln7$_0(i)},Dd.prototype.dropUnusedDataBeforeEncoding_r9oln7$_0=function(t){var e,n,i,o,r=jt(Rt(At(O(t,10)),16));for(o=t.iterator();o.hasNext();){var a=o.next();r.put_xwzc9p$(a,Ud().variablesToKeep_0(this.facets,a))}var s=r,l=this.sharedData,u=nt.DataFrameUtil.variables_dhhkv7$(l),c=Bt();for(e=u.keys.iterator();e.hasNext();){var p=e.next(),h=!0;for(n=s.entries.iterator();n.hasNext();){var _=n.next(),d=_.key,f=_.value,m=G(d.ownData);if(!nt.DataFrameUtil.variables_dhhkv7$(m).containsKey_11rb$(p)&&f.contains_11rb$(p)){h=!1;break}}h||c.add_11rb$(p)}if(c.size(0===s?_:_/s|0)?m/2|0:20)|0;return F$().size_jn25lk$((r=$,a=y,function(t){return t.width=r,t.height=a,u}))},Cf.prototype.layerData_0=function(t,e,n,i,o){var r=G(t.diag),a=G(t.type),s=Af().matrixXYSeries_jxlxf8$(e,n,a,!i,o,!1,!1),l=s.component1(),u=s.component2(),c=new Pf(e,!r,o);return Af().correlationsToDataframe_no354$(c,l,u)},Cf.$metadata$={kind:m,simpleName:"Companion",interfaces:[]};var Sf=null;function Tf(){return null===Sf&&new Cf,Sf}function Of(t,e,n,i,o,r,a,s){return void 0===e&&(e=null),void 0===n&&(n=null),void 0===i&&(i=null),void 0===o&&(o=null),void 0===r&&(r=null),void 0===a&&(a=null),s=s||Object.create(mf.prototype),mf.call(s,t,null!=e&&e,n,null==i||i,null==o||o,null!=r?r:Tf().DEF_THRESHOLD_0,null!=a?a:1,new $f,new $f,new $f,Tf().scaleGradient_0(Zt.Companion.COLOR,Tf().DEF_LOW_COLOR_0,Tf().DEF_MID_COLOR_0,Tf().DEF_HIGH_COLOR_0),Tf().scaleGradient_0(Zt.Companion.FILL,Tf().DEF_LOW_COLOR_0,Tf().DEF_MID_COLOR_0,Tf().DEF_HIGH_COLOR_0)),s}function Nf(){If=this}function Pf(t,e,n){this.nullDiag_0=e,this.threshold_0=n;var i,o=jt(At(t.size));for(i=t.entries.iterator();i.hasNext();){var r=i.next();o.put_xwzc9p$(this.toKey_1(r.key),r.value)}this.correlations_0=o}mf.$metadata$={kind:S,simpleName:"CorrPlotOptionsBuilder",interfaces:[]},Nf.prototype.computeCorrelations_t3v4vw$=function(t,e){var n,i,o=nt.DataFrameUtil.fromMap_bkhwtg$(t),r=o.variables(),a=h();for(i=r.iterator();i.hasNext();){var s=i.next();o.isNumeric_8xm3sj$(s)&&a.add_11rb$(s)}var l=a,u=Lt();for(n=l.iterator();n.hasNext();){var c=n.next(),p=wt(c,c);u.put_xwzc9p$(p,1)}for(var _=0,d=l.iterator();d.hasNext();++_)for(var f=d.next(),m=o.getNumeric_8xm3sj$(f),$=0;$<_;$++){var y=l.get_za3lpa$($),g=o.getNumeric_8xm3sj$(y),v=wt(f,y),b=this.correlation_0(m,g,e);u.put_xwzc9p$(v,b)}var w,x=jt(At(u.size));for(w=u.entries.iterator();w.hasNext();){var k=w.next();x.put_xwzc9p$(new z(k.key.first.label,k.key.second.label),k.value)}return x},Nf.prototype.correlationsFromCoefficients_dy00ik$=function(t){var e,n=Lt();for(e=t.entries.iterator();e.hasNext();){var i,o,r=e.next(),a=r.key,s=r.value,l=0;for(i=t.keys.iterator();i.hasNext();){var u,c,p=i.next(),h=ht((l=(o=l)+1|0,o)),_=wt(a,p),d=null!=(c="number"==typeof(u=s.get_za3lpa$(h))?u:null)?c:To.NaN;n.put_xwzc9p$(_,d)}}return n},Nf.prototype.correlation_0=function(t,e,n){var i=sn.SeriesUtil.filterFinite_10sy24$(t,e);return n(i.get_za3lpa$(0),i.get_za3lpa$(1))},Nf.prototype.matrixXYSeries_jxlxf8$=function(t,e,n,i,o,r,a){for(var s=h(),l=h(),u=new Pf(t,i,o),c=0,p=e.iterator();p.hasNext();++c){var _,d,f=p.next();switch(n){case"upper":_=e.subList_vux9f0$(c,e.size);break;case"lower":_=e.subList_vux9f0$(0,c+1|0);break;default:_=e}for(d=_.iterator();d.hasNext();){var m=d.next();if(null==u.value_puj7f4$(f,m)){if(r&&tt(f,m))continue;if(a&&!tt(f,m))continue}s.add_11rb$(f),l.add_11rb$(m)}}return new z(s,l)},Nf.prototype.correlationsToDataframe_no354$=function(t,e,n){var i,o,r=h(),a=h(),s=h(),l=h();for(i=B(e,n).iterator();i.hasNext();){var u=i.next(),c=u.component1(),p=u.component2();if(null!=(o=t.value_puj7f4$(c,p))){var _=o;r.add_11rb$(c),a.add_11rb$(p),s.add_11rb$(_),l.add_11rb$(P.abs(_))}}return ee([wt(Lf().X,r),wt(Lf().Y,a),wt(Lf().CORR,s),wt(Lf().CORR_ABS,l)])},Pf.prototype.toKey_0=function(t,n){return e.compareTo(t,n)<0?wt(t,n):wt(n,t)},Pf.prototype.toKey_1=function(t){return this.toKey_0(t.first,t.second)},Pf.prototype.value_puj7f4$=function(t,e){var n;if(tt(t,e)&&this.nullDiag_0)n=null;else{var i=this.correlations_0.get_11rb$(this.toKey_0(t,e));n=null==i||P.abs(i)\n | .plt-container {\n |\tfont-family: "Lucida Grande", sans-serif;\n |\tcursor: crosshair;\n |\tuser-select: none;\n |\t-webkit-user-select: none;\n |\t-moz-user-select: none;\n |\t-ms-user-select: none;\n |}\n |.plt-backdrop {\n | fill: white;\n |}\n |.plt-transparent .plt-backdrop {\n | visibility: hidden;\n |}\n |text {\n |\tfont-size: 15px;\n |\tfill: #3d3d3d;\n |\t\n |\ttext-rendering: optimizeLegibility;\n |}\n |.plt-data-tooltip text {\n |\tfont-size: 13px;\n |}\n |.plt-axis-tooltip text {\n |\tfont-size: 13px;\n |}\n |.plt-axis line {\n |\tshape-rendering: crispedges;\n |}\n |.plt-plot-title {\n |\n | font-size: 19.0px;\n | font-weight: bold;\n |}\n |.plt-axis .tick text {\n |\n | font-size: 13.0px;\n |}\n |.plt-axis.small-tick-font .tick text {\n |\n | font-size: 11.0px;\n |}\n |.plt-axis-title text {\n |\n | font-size: 15.0px;\n |}\n |.plt_legend .legend-title text {\n |\n | font-size: 15.0px;\n | font-weight: bold;\n |}\n |.plt_legend text {\n |\n | font-size: 13.0px;\n |}\n |\n | \n '),I('\n |\n |'+qy+'\n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | Lunch\n | \n | \n | \n | \n | \n | \n | \n | \n | Dinner\n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | 0.0\n | \n | \n | \n | \n | \n | \n | \n | \n | 0.5\n | \n | \n | \n | \n | \n | \n | \n | \n | 1.0\n | \n | \n | \n | \n | \n | \n | \n | \n | 1.5\n | \n | \n | \n | \n | \n | \n | \n | \n | 2.0\n | \n | \n | \n | \n | \n | \n | \n | \n | 2.5\n | \n | \n | \n | \n | \n | \n | \n | \n | 3.0\n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | count\n | \n | \n | \n | \n | \n | \n | time\n | \n | \n | \n | \n |\n '),I('\n |\n |\n |\n | \n | \n | \n | \n | \n | \n | \n | 1\n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | 0\n | \n | \n | \n | \n | \n | \n | \n | \n | 2\n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | b\n | \n | \n | \n | \n | \n | \n | a\n | \n | \n | \n | \n |\n |\n | \n | \n | \n | \n | \n | \n | \n | 1\n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | 0\n | \n | \n | \n | \n | \n | \n | \n | \n | 2\n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | \n | b\n | \n | \n | \n | \n | \n | \n | a\n | \n | \n | \n | \n |\n |\n '),t})?i.apply(e,o):i)||(t.exports=r)},860:function(t,e,n){var i,o,r;o=[e,n(421),n(204),n(486),n(246),n(746),n(832),n(806),n(479),n(705)],void 0===(r="function"==typeof(i=function(t,e,n,i,o,r,a,s,l,u){"use strict";var c=t.$$importsForInline$$||(t.$$importsForInline$$={}),p=e.kotlin.collections.emptyList_287e2$,h=e.kotlin.collections.List,_=e.throwCCE,d=n.jetbrains.gis.geoprotocol.MapRegion,f=i.jetbrains.datalore.base.spatial.convertToGeoRectangle_i3vl8m$,m=o.jetbrains.datalore.plot.config.GeoConfig,$=e.kotlin.IllegalArgumentException_init_pdl1vj$,y=e.kotlin.collections.HashMap_init_q3lmfv$,g=e.kotlin.collections.Map,v=r.jetbrains.livemap.api.MapLocation,b=e.equals,w=i.jetbrains.datalore.base.spatial,x=i.jetbrains.datalore.base.spatial.pointsBBox_2r9fhj$,k=e.getCallableRef,C=i.jetbrains.datalore.base.spatial.makeSegments_8o5yvy$,E=e.Kind.OBJECT,S=e.kotlin.collections.Collection,T=e.kotlin.IllegalStateException_init_pdl1vj$,O=r.jetbrains.livemap.ui.CursorService,N=e.Kind.CLASS,P=e.ensureNotNull,I=a.jetbrains.datalore.plot.base.aes,A=a.jetbrains.datalore.plot.base.geom.util,R=a.jetbrains.datalore.plot.base.Aes,j=s.jetbrains.datalore.plot.builder.scale,L=i.jetbrains.datalore.base.typedGeometry.explicitVec_y7b45i$,z=i.jetbrains.datalore.base.spatial.GeoRectangle,D=i.jetbrains.datalore.base.json,M=r.jetbrains.livemap.api.GeoObject,B=i.jetbrains.datalore.base.values.Color,F=e.numberToInt,U=i.jetbrains.datalore.base.spatial.normalizeLon_14dthe$,q=i.jetbrains.datalore.base.spatial.limitLat_14dthe$,H=i.jetbrains.datalore.base.typedGeometry.Vec,G=e.kotlin.collections.collectionSizeOrDefault_ba2ldo$,K=e.kotlin.collections.ArrayList_init_ww73n8$,V=Math,Y=a.jetbrains.datalore.plot.base.geom.PieGeom,W=e.kotlin.Unit,X=e.toString,Z=a.jetbrains.datalore.plot.base.geom.PathGeom,J=e.kotlin.collections.ArrayList_init_287e2$,Q=l.jetbrains.datalore.plot.common.data,tt=a.jetbrains.datalore.plot.base.geom.SegmentGeom,et=i.jetbrains.datalore.base.geometry.DoubleVector,nt=e.kotlin.collections.listOf_i5x0yv$,it=e.kotlin.collections.toList_7wnvza$,ot=a.jetbrains.datalore.plot.base.geom.PointGeom,rt=a.jetbrains.datalore.plot.base.geom.LabelGeom,at=e.kotlin.to_ujzrz7$,st=e.kotlin.ranges.IntRange,lt=r.jetbrains.livemap.api.point_4sq48w$,ut=r.jetbrains.livemap.api.points_5t73na$,ct=i.jetbrains.datalore.base.typedGeometry.createMultiPolygon_hv912c$,pt=r.jetbrains.livemap.api.polygon_z7sk6d$,ht=r.jetbrains.livemap.api.polygons_6q4rqs$,_t=r.jetbrains.livemap.api.path_noshw0$,dt=r.jetbrains.livemap.api.paths_dvul77$,ft=r.jetbrains.livemap.api.line_us2cr2$,mt=r.jetbrains.livemap.api.vLines_t2cee4$,$t=r.jetbrains.livemap.api.hLines_t2cee4$,yt=a.jetbrains.datalore.plot.base.GeomKind,gt=r.jetbrains.livemap.api.text_od6cu8$,vt=r.jetbrains.livemap.api.texts_mbu85n$,bt=r.jetbrains.livemap.api.pie_m00jb4$,wt=r.jetbrains.livemap.api.pies_vquu0q$,xt=e.kotlin.collections.checkIndexOverflow_za3lpa$,kt=e.getPropertyCallableRef,Ct=e.kotlin.collections.first_2p1efm$,Et=s.jetbrains.datalore.plot.builder,St=e.kotlin.collections.drop_ba2ldo$,Tt=r.jetbrains.livemap.api.LiveMapBuilder,Ot=o.jetbrains.datalore.plot.config.Option.Geom,Nt=a.jetbrains.datalore.plot.base.livemap.LivemapConstants.Projection,Pt=r.jetbrains.livemap.core.projections,It=o.jetbrains.datalore.plot.config.read_wpa7aq$,At=r.jetbrains.livemap.core,Rt=r.jetbrains.livemap.LiveMapLocation,jt=o.jetbrains.datalore.plot.config.getMap_wpa7aq$,Lt=e.kotlin.collections.emptyMap_q3lmfv$,zt=r.jetbrains.livemap.config.DevParams,Dt=o.jetbrains.datalore.plot.config.Option.Geom.LiveMap,Mt=o.jetbrains.datalore.plot.config.getString_wpa7aq$,Bt=o.jetbrains.datalore.plot.config.getInt_wpa7aq$,Ft=o.jetbrains.datalore.plot.config.getBool_wpa7aq$,Ut=r.jetbrains.livemap.api.liveMapGeocoding_leryx0$,qt=r.jetbrains.livemap.api,Ht=u.jetbrains.datalore.base.async,Gt=r.jetbrains.livemap.config.LiveMapCanvasFigure,Kt=i.jetbrains.datalore.base.geometry.Rectangle_init_tjonv8$,Vt=a.jetbrains.datalore.plot.base.geom.LiveMapProvider.LiveMapData,Yt=a.jetbrains.datalore.plot.base.geom.LiveMapProvider,Wt=r.jetbrains.livemap.mapengine.basemap,Xt=e.unboxChar,Zt=e.kotlin.collections.listOf_mh5how$,Jt=e.kotlin.ranges.CharRange,Qt=n.jetbrains.gis.tileprotocol.TileService.Theme.valueOf_61zpoe$,te=r.jetbrains.livemap.api.liveMapVectorTiles_jo61jr$,ee=e.kotlin.collections.checkCountOverflow_za3lpa$,ne=e.kotlin.collections.dropLast_8ujjk8$,ie=e.kotlin.collections.last_us0mfu$,oe=o.jetbrains.datalore.plot.config.getString_euunde$,re=e.kotlin.collections.joinToString_fmv235$,ae=o.$$importsForInline$$["lets-plot-base-portable-js-legacy"].jetbrains.datalore.base.enums.EnumInfoImpl,se=(e.wrapFunction,e.kotlin.text.get_indices_gw00vp$),le=e.toBoxedChar,ue=e.kotlin.ranges.reversed_zf1xzc$,ce=e.kotlin.text.iterator_gw00vp$,pe=a.jetbrains.datalore.plot.base.interact.GeomTargetLocator,he=a.jetbrains.datalore.plot.base.interact.TipLayoutHint,_e=a.jetbrains.datalore.plot.base.interact.GeomTarget,de=a.jetbrains.datalore.plot.base.interact.GeomTargetLocator.LookupResult,fe=e.kotlin.Enum,me=e.throwISE;function $e(){ve=this,this.REGION_TYPE_0="type",this.REGION_DATA_0="data",this.REGION_TYPE_NAME_0="region_name",this.REGION_TYPE_IDS_0="region_ids",this.REGION_TYPE_COORDINATES_0="coordinates",this.REGION_TYPE_DATAFRAME_0="data_frame"}function ye(t){var e;return d.Companion.withName_61zpoe$("string"==typeof(e=t)?e:_())}function ge(t){var e;return v.Companion.create_4x05nu$(d.Companion.withName_61zpoe$("string"==typeof(e=t)?e:_()))}Pe.prototype=Object.create(Ne.prototype),Pe.prototype.constructor=Pe,Ie.prototype=Object.create(Ne.prototype),Ie.prototype.constructor=Ie,vn.prototype=Object.create(fe.prototype),vn.prototype.constructor=vn,$e.prototype.toDoubleList_0=function(t){var n,i;if(t.isEmpty())return p();t:do{var o;if(e.isType(t,S)&&t.isEmpty()){i=!0;break t}for(o=t.iterator();o.hasNext();)if("number"!=typeof o.next()){i=!1;break t}i=!0}while(0);if(i)return e.isType(n=t,h)?n:_();throw T("Can't cast to collection of numbers".toString())},$e.prototype.getWithIdList_0=function(t){var n,i=e.isType(n=t,h)?n:_();return d.Companion.withIdList_mhpeer$(i)},$e.prototype.calculateGeoRectangle_0=function(t){if(!t.isEmpty()&&0!=(t.size%2|0))throw $("Expected: location = [double lon1, double lat1, double lon2, double lat2, ... , double lonN, double latN]".toString());return f(this.calculateBoundingBox_0(this.toDoubleList_0(t)))},$e.prototype.calculateGeoRectangle_1=function(t){var n,i,o,r,a,s,l,u,c,p,d,y=m.Companion.POINT_X,v=(e.isType(d=t,g)?d:_()).containsKey_11rb$(y);if(v){var b,w=m.Companion.POINT_Y;v=(e.isType(b=t,g)?b:_()).containsKey_11rb$(w)}if(v){var x,k=m.Companion.POINT_X;i=this.toDoubleList_0(e.isType(n=(e.isType(x=t,g)?x:_()).get_11rb$(k),h)?n:_());var C,E=m.Companion.POINT_Y;return f(this.calculateBoundingBox_1(i,this.toDoubleList_0(e.isType(o=(e.isType(C=t,g)?C:_()).get_11rb$(E),h)?o:_())))}var S,T=m.Companion.RECT_XMIN,O=(e.isType(S=t,g)?S:_()).containsKey_11rb$(T);if(O){var N,P=m.Companion.RECT_YMIN;O=(e.isType(N=t,g)?N:_()).containsKey_11rb$(P)}var I=O;if(I){var A,R=m.Companion.RECT_XMAX;I=(e.isType(A=t,g)?A:_()).containsKey_11rb$(R)}var j=I;if(j){var L,z=m.Companion.RECT_YMAX;j=(e.isType(L=t,g)?L:_()).containsKey_11rb$(z)}if(j){var D,M=m.Companion.RECT_XMIN;a=this.toDoubleList_0(e.isType(r=(e.isType(D=t,g)?D:_()).get_11rb$(M),h)?r:_());var B,F=m.Companion.RECT_YMIN;l=this.toDoubleList_0(e.isType(s=(e.isType(B=t,g)?B:_()).get_11rb$(F),h)?s:_());var U,q=m.Companion.RECT_XMAX;c=this.toDoubleList_0(e.isType(u=(e.isType(U=t,g)?U:_()).get_11rb$(q),h)?u:_());var H,G=m.Companion.RECT_YMAX;return f(this.calculateBoundingBox_2(a,l,c,this.toDoubleList_0(e.isType(p=(e.isType(H=t,g)?H:_()).get_11rb$(G),h)?p:_())))}throw $("Expected: location = DataFrame with ['lon', 'lat'] or ['lonmin', 'latmin', 'lonmax', 'latmax'] columns")},$e.prototype.createMapRegion_0=function(t){var n,i;if(null==t)n=null;else{if(!e.isType(t,g))throw $("Expected: parent = [String]");var o=y(),r=this.REGION_TYPE_NAME_0;o.put_xwzc9p$(r,ye);var a=this.REGION_TYPE_IDS_0;o.put_xwzc9p$(a,(i=this,function(t){return i.getWithIdList_0(t)})),n=this.handleRegionObject_0(t,o)}return n},$e.prototype.createMapLocation_s8jyv4$=function(t){var n,i;if(null==t)n=null;else{if(!e.isType(t,g))throw $("Expected: location = [String|Array|DataFrame]");var o=y(),r=this.REGION_TYPE_NAME_0;o.put_xwzc9p$(r,ge);var a=this.REGION_TYPE_IDS_0;o.put_xwzc9p$(a,(i=this,function(t){return v.Companion.create_4x05nu$(i.getWithIdList_0(t))}));var s=this.REGION_TYPE_COORDINATES_0;o.put_xwzc9p$(s,function(t){return function(n){var i,o,r;return r=v.Companion,o=e.isType(i=n,h)?i:_(),r.create_emtjl$(t.calculateGeoRectangle_0(o))}}(this));var l=this.REGION_TYPE_DATAFRAME_0;o.put_xwzc9p$(l,function(t){return function(n){var i,o,r;return r=v.Companion,o=e.isType(i=n,g)?i:_(),r.create_emtjl$(t.calculateGeoRectangle_1(o))}}(this)),n=this.handleRegionObject_0(t,o)}return n},$e.prototype.handleRegionObject_0=function(t,n){var i,o,r,a,s=this.REGION_TYPE_0;if(null==(i=(e.isType(a=t,g)?a:_()).get_11rb$(s)))throw $("Invalid map region object");var l,u=i,c=this.REGION_DATA_0;if(null==(o=(e.isType(l=t,g)?l:_()).get_11rb$(c)))throw $("Invalid map region object");var p=o;for(r=n.entries.iterator();r.hasNext();){var h=r.next(),d=h.key,f=h.value;if(b(u,d))return f(p)}throw $("Invalid map region type: "+u.toString())},$e.prototype.calculateBoundingBox_0=function(t){return x(w.BBOX_CALCULATOR,t)},$e.prototype.calculateBoundingBox_1=function(t,e){if(t.size!==e.size)throw $("Longitude list count is not equal Latitude list count.".toString());return w.BBOX_CALCULATOR.calculateBoundingBox_qpfwx8$(C(k("get",function(t,e){return t.get_za3lpa$(e)}.bind(null,t)),k("get",function(t,e){return t.get_za3lpa$(e)}.bind(null,t)),t.size),C(k("get",function(t,e){return t.get_za3lpa$(e)}.bind(null,e)),k("get",function(t,e){return t.get_za3lpa$(e)}.bind(null,e)),t.size))},$e.prototype.calculateBoundingBox_2=function(t,e,n,i){var o=t.size;if(e.size!==o||n.size!==o||i.size!==o)throw $("Counts of 'minLongitudes', 'minLatitudes', 'maxLongitudes', 'maxLatitudes' lists are not equal.".toString());return w.BBOX_CALCULATOR.calculateBoundingBox_qpfwx8$(C(k("get",function(t,e){return t.get_za3lpa$(e)}.bind(null,t)),k("get",function(t,e){return t.get_za3lpa$(e)}.bind(null,n)),o),C(k("get",function(t,e){return t.get_za3lpa$(e)}.bind(null,e)),k("get",function(t,e){return t.get_za3lpa$(e)}.bind(null,i)),o))},$e.$metadata$={kind:E,simpleName:"ConfigUtil",interfaces:[]};var ve=null;function be(){return null===ve&&new $e,ve}function we(){this.cursorService=new O}function xe(){this.myP=null,this.myColorArray_0=p(),this.indices=null,this.valueArray=null,this.explodeArray=null,this.myLayerKind=null,this.geometry_mc6yw0$_0=null,this.point_9u0ihe$_0=null,this.flat=!1,this.animation=0,this.myArrowSpec_0=null,this.myLabelOptions_0=null,this.myPieOptions_0=null}function ke(t){var e,n;return L("number"==typeof(e=t.get_za3lpa$(0))?e:_(),"number"==typeof(n=t.get_za3lpa$(1))?n:_())}function Ce(t){var e,n,i,o;return new z("number"==typeof(e=t.get_za3lpa$(0))?e:_(),"number"==typeof(n=t.get_za3lpa$(1))?n:_(),"number"==typeof(i=t.get_za3lpa$(2))?i:_(),"number"==typeof(o=t.get_za3lpa$(3))?o:_())}function Ee(t,e,n){return n=n||Object.create(xe.prototype),xe.call(n),n.myLayerKind=e,n.myP=t,n.indices=p(),n.valueArray=p(),n.explodeArray=p(),n}function Se(t,e,n){return n=n||Object.create(xe.prototype),xe.call(n),n.myLayerKind=e,n.myP=t.aes,n.indices=t.indices,n.valueArray=t.values,n.myColorArray_0=t.colors,n.explodeArray=t.explodeValues,n}function Te(t,e){this.layerIndex_0=t,this.aesthetics_0=e}function Oe(t,e,n){this.strokeColor=t,this.strokeWidth=e,this.holeSize=n}function Ne(t){this.aesthetics=t,this.myArrowSpec_0=null,this.myAnimation_0=null,this.myFlat_0=!1}function Pe(t,e){this.$outer=t,Ne.call(this,e)}function Ie(t,e){this.$outer=t,Ne.call(this,e)}function Ae(t){return Q.SeriesUtil.allFinite_rd1tgs$(t.x(),t.y(),t.xend(),t.yend())?nt([new et(P(t.x()),P(t.y())),new et(P(t.xend()),P(t.yend()))]):p()}function Re(t,e,n){this.padding=t,this.radius=e,this.size=n}function je(t){this.myAesthetics_0=t,this.myAnimation_0=null,this.myLabelOptions_0=null}function Le(t){return L(P(t.x()),P(t.y()))}function ze(t){return Q.SeriesUtil.isFinite_yrwdxb$(t.interceptY())?L(0,P(t.interceptY())):null}function De(t){return Q.SeriesUtil.isFinite_yrwdxb$(t.interceptX())?L(P(t.interceptX()),0):null}function Me(t){return L(P(t.x()),P(t.y()))}function Be(){qe()}function Fe(){Ue=this}we.prototype.defaultSetter_o14v8n$=function(t){this.cursorService.default=t},we.prototype.pointerSetter_o14v8n$=function(t){this.cursorService.pointer=t},we.$metadata$={kind:N,simpleName:"CursorServiceConfig",interfaces:[]},Object.defineProperty(xe.prototype,"geometry",{configurable:!0,get:function(){return this.geometry_mc6yw0$_0},set:function(t){var e;if(null!=t){var n,i=k("trimLonLat",function(t,e){return t.trimLonLat_0(e)}.bind(null,this)),o=K(G(t,10));for(n=t.iterator();n.hasNext();){var r=n.next();o.add_11rb$(i(r))}e=o}else e=null;this.geometry_mc6yw0$_0=e}}),Object.defineProperty(xe.prototype,"point",{configurable:!0,get:function(){return this.point_9u0ihe$_0},set:function(t){this.point_9u0ihe$_0=null!=t?k("trimLonLat",function(t,e){return t.trimLonLat_0(e)}.bind(null,this))(t):null}}),Object.defineProperty(xe.prototype,"arrowAngle",{configurable:!0,get:function(){var t;return null!=(t=this.myArrowSpec_0)?t.angle:null}}),Object.defineProperty(xe.prototype,"arrowLength",{configurable:!0,get:function(){var t;return null!=(t=this.myArrowSpec_0)?t.length:null}}),Object.defineProperty(xe.prototype,"arrowAtEnds",{configurable:!0,get:function(){var t,e,n;return null!=(n=null!=(e=null!=(t=this.myArrowSpec_0)?t.end:null)?e.name:null)?n.toLowerCase():null}}),Object.defineProperty(xe.prototype,"arrowType",{configurable:!0,get:function(){var t,e,n;return null!=(n=null!=(e=null!=(t=this.myArrowSpec_0)?t.type:null)?e.name:null)?n.toLowerCase():null}}),Object.defineProperty(xe.prototype,"index",{configurable:!0,get:function(){return this.myP.index()}}),Object.defineProperty(xe.prototype,"flow",{configurable:!0,get:function(){return P(this.myP.flow())}}),Object.defineProperty(xe.prototype,"speed",{configurable:!0,get:function(){return P(this.myP.speed())}}),Object.defineProperty(xe.prototype,"family",{configurable:!0,get:function(){return this.myP.family()}}),Object.defineProperty(xe.prototype,"angle",{configurable:!0,get:function(){return P(this.myP.angle())}}),Object.defineProperty(xe.prototype,"shape",{configurable:!0,get:function(){return P(this.myP.shape()).code}}),Object.defineProperty(xe.prototype,"size",{configurable:!0,get:function(){return I.AestheticsUtil.textSize_l6g9mh$(this.myP)}}),Object.defineProperty(xe.prototype,"fillColor",{configurable:!0,get:function(){return this.colorWithAlpha_0(P(this.myP.fill()))}}),Object.defineProperty(xe.prototype,"label",{configurable:!0,get:function(){var t,e;return null!=(e=null!=(t=this.myP.label())?t.toString():null)?e:"n/a"}}),Object.defineProperty(xe.prototype,"lineheight",{configurable:!0,get:function(){return P(this.myP.lineheight())}}),Object.defineProperty(xe.prototype,"hjust",{configurable:!0,get:function(){switch(A.TextUtil.hAnchor_za3rmp$(this.myP.hjust()).name){case"LEFT":return 0;case"RIGHT":return 1;case"MIDDLE":return.5;default:return e.noWhenBranchMatched()}}}),Object.defineProperty(xe.prototype,"vjust",{configurable:!0,get:function(){switch(A.TextUtil.vAnchor_za3rmp$(this.myP.vjust()).name){case"TOP":return 0;case"BOTTOM":return 1;case"CENTER":return.5;default:return e.noWhenBranchMatched()}}}),Object.defineProperty(xe.prototype,"fontface",{configurable:!0,get:function(){var t=this.myP.fontface();return b(t,I.AesInitValue.get_31786j$(R.Companion.FONTFACE))?"":t}}),Object.defineProperty(xe.prototype,"lineDash",{configurable:!0,get:function(){var t=this.myP.lineType();if(t.isSolid||t.isBlank)return p();var e,n=I.AestheticsUtil.strokeWidth_l6g9mh$(this.myP),i=t.dashArray,o=K(G(i,10));for(e=i.iterator();e.hasNext();){var r=e.next();o.add_11rb$(r*n)}return o}}),Object.defineProperty(xe.prototype,"geoObject",{configurable:!0,get:function(){var t,n,i,o,r,a,s,l,u,c;if(!b(this.myP.mapId(),j.DefaultNaValue.get_31786j$(R.Companion.MAP_ID))){var p=ke,d=Ce,f=D.JsonSupport.parseJson_61zpoe$(this.myP.mapId().toString()),m="string"==typeof(t=f.get_11rb$("id"))?t:_();if(null==(o=null!=(i=e.isType(n=f.get_11rb$("lim"),h)?n:null)?d(i):null))throw T("Limit have to be provided".toString());var $=o;if(null==(s=null!=(a=e.isType(r=f.get_11rb$("pos"),h)?r:null)?d(a):null))throw T("Position have to be provided".toString());var y=s;if(null==(c=null!=(u=e.isType(l=f.get_11rb$("cen"),h)?l:null)?p(u):null))throw T("Centroid have to be provided".toString());return new M(m,c,$,y)}return null}}),Object.defineProperty(xe.prototype,"strokeColor",{configurable:!0,get:function(){var t,e;switch(this.myLayerKind.name){case"POLYGON":return P(this.myP.color());case"PIE":return null!=(e=null!=(t=this.myPieOptions_0)?t.strokeColor:null)?e:B.Companion.WHITE;default:return this.colorWithAlpha_0(P(this.myP.color()))}}}),Object.defineProperty(xe.prototype,"radius",{configurable:!0,get:function(){switch(this.myLayerKind.name){case"POLYGON":case"PATH":case"H_LINE":case"V_LINE":case"POINT":var t=P(this.myP.shape()).size_l6g9mh$(this.myP)/2;return V.ceil(t);case"PIE":return I.AesScaling.pieDiameter_l6g9mh$(this.myP)/2;case"TEXT":return 0;default:return e.noWhenBranchMatched()}}}),Object.defineProperty(xe.prototype,"strokeWidth",{configurable:!0,get:function(){var t,n;switch(this.myLayerKind.name){case"POLYGON":case"PATH":case"H_LINE":case"V_LINE":return I.AestheticsUtil.strokeWidth_l6g9mh$(this.myP);case"POINT":return 1;case"TEXT":return 0;case"PIE":return null!=(n=null!=(t=this.myPieOptions_0)?t.strokeWidth:null)?n:0;default:return e.noWhenBranchMatched()}}}),Object.defineProperty(xe.prototype,"colorArray",{configurable:!0,get:function(){var t=this.myLayerKind===Tn();if(t){var n,i=this.valueArray,o=k("equals",function(t,e){return b(t,e)}.bind(null,0));t:do{var r;if(e.isType(i,S)&&i.isEmpty()){n=!0;break t}for(r=i.iterator();r.hasNext();)if(!o(r.next())){n=!1;break t}n=!0}while(0);t=n}if(t){for(var a=this.valueArray.size,s=K(a),l=0;lp)throw $("Error parsing subdomains: wrong brackets order");var h,_=l+1|0,d=t.substring(_,p);if(0===d.length)throw $("Empty subdomains list");t:do{var f;for(f=ce(d);f.hasNext();){var m=Xt(f.next()),y=le(m),g=new Jt(97,122),v=Xt(y);if(!g.contains_mef7kx$(String.fromCharCode(v).toLowerCase().charCodeAt(0))){h=!0;break t}}h=!1}while(0);if(h)throw $("subdomain list contains non-letter symbols");var b,w=t.substring(0,l),x=p+1|0,k=t.length,C=t.substring(x,k),E=K(d.length);for(b=ce(d);b.hasNext();){var S=Xt(b.next()),T=E.add_11rb$,O=le(S);T.call(E,w+String.fromCharCode(O)+C)}return E}rn.prototype.injectLiveMapProvider_p2x1s5$=function(t,n,i){var o;for(o=t.iterator();o.hasNext();){var r,a=o.next(),s=kt("isLiveMap",1,(function(t){return t.isLiveMap}));t:do{var l;if(e.isType(a,S)&&a.isEmpty()){r=!1;break t}for(l=a.iterator();l.hasNext();)if(s(l.next())){r=!0;break t}r=!1}while(0);if(r){var u,c=kt("isLiveMap",1,(function(t){return t.isLiveMap}));t:do{var p;if(e.isType(a,S)&&a.isEmpty()){u=0;break t}var h=0;for(p=a.iterator();p.hasNext();)c(p.next())&&ee(h=h+1|0);u=h}while(0);if(1!==u)throw $("Failed requirement.".toString());if(!Ct(a).isLiveMap)throw $("Failed requirement.".toString());var _,d=Ct(a),f=K(G(a,10));for(_=a.iterator();_.hasNext();){var m=_.next();f.add_11rb$(Et.LayerRendererUtil.createLayerRendererData_sqg2xh$(m))}d.setLiveMapProvider_kld0fp$(new an(f,n,i.cursorService))}}},an.prototype.createLiveMap_wthzt5$=function(t){var n,i,o,r,a,s,l,u,c,p,h,_,d,f,m,g=St(this.letsPlotLayers_0,1),v=new Tt;v.size=t.dimension;var b,w,x=this.myLiveMapOptions_0,C=[Ot.LiveMap.PROJECTION],E=ne(C,1),S=ie(C);t:do{var O;if(null==(O=oe(x,E,S))){b=null;break t}var N=O,P=new ae(Nt.values()),I=P.safeValueOf_pdl1vj$(N);if(null==I){var j="Unknown value '"+N+"'. Expected: "+re(P.originalNames,"|"," [","]",void 0,void 0,on);throw $(j.toString())}b=I}while(0);switch((null!=(n=b)?n:Nt.EPSG3857).name){case"EPSG3857":i=Pt.Projections.mercator();break;case"EPSG4326":i=Pt.Projections.geographic();break;case"AZIMUTHAL":i=Pt.Projections.azimuthalEqualArea();break;case"CONIC":i=Pt.Projections.conicEqualArea();break;default:i=e.noWhenBranchMatched()}if(v.projection=i,v.mapLocation=be().createMapLocation_s8jyv4$(It(this.myLiveMapOptions_0,[Ot.LiveMap.LOCATION])),v.mapLocationConsumer=sn,v.devParams=new zt(null!=(o=jt(this.myLiveMapOptions_0,[Ot.LiveMap.DEV_PARAMS]))?o:Lt()),v.cursorService=this.cursor_0,v.attribution=Mt(this.myLiveMapOptions_0,[Ot.LiveMap.TILES,Dt.Tile.ATTRIBUTION]),v.minZoom=null!=(r=Bt(this.myLiveMapOptions_0,[Ot.LiveMap.TILES,Dt.Tile.MIN_ZOOM]))?r:v.minZoom,v.maxZoom=null!=(a=Bt(this.myLiveMapOptions_0,[Ot.LiveMap.TILES,Dt.Tile.MAX_ZOOM]))?a:v.maxZoom,v.zoom=Bt(this.myLiveMapOptions_0,[Ot.LiveMap.ZOOM]),v.showCoordPickTools=null!=(s=Ft(this.myLiveMapOptions_0,[Ot.LiveMap.SHOW_COORD_PICK_TOOLS]))&&s,v.geocodingService=null!=(c=null!=(u=null!=(l=jt(this.myLiveMapOptions_0,[Ot.LiveMap.GEOCODING]))?Mt(l,["url"]):null)?Ut((w=u,function(t){return t.url=w,W})):null)?c:qt.Services.bogusGeocodingService(),null==(p=jt(this.myLiveMapOptions_0,[Ot.LiveMap.TILES])))throw T("Tiles must be condigured".toString());h=p,_=v.devParams.isSet_1a54na$(zt.Companion.DEBUG_TILES),d=v.devParams.read_zgynif$(zt.Companion.COMPUTATION_PROJECTION_QUANT),v.tileSystemProvider=yn().createTileSystemProvider_0(h,_,d),v.layers=nn().convert_6enlh1$(g,null!=(f=Bt(this.myLiveMapOptions_0,[Ot.LiveMap.DATA_SIZE_ZOOMIN]))?f:0,null!=(m=Bt(this.myLiveMapOptions_0,[Ot.LiveMap.CONST_SIZE_ZOOMIN]))?m:-1);var L,z,D=v,M=y(),B=y(),U=0;for(L=g.iterator();L.hasNext();){var q,H=L.next(),G=xt((U=(z=U)+1|0,z)),K=A.HintColorUtil.createColorMarkerMapper_hpvnyv$(H.geomKind,H.mappedAes.contains_11rb$(R.Companion.FILL),H.mappedAes.contains_11rb$(R.Companion.COLOR));for(B.put_xwzc9p$(G,ln(K,H)),q=H.aesthetics.dataPoints().iterator();q.hasNext();){var V=q.next(),Y=at(G,V.index()),X=H.contextualMapping;M.put_xwzc9p$(Y,X)}}var Z=D.build(),J=k("constant",function(t,e){return t.constant_mh5how$(e)}.bind(null,Ht.Asyncs))(Z),Q=new Gt(J);return Q.setBounds_vfns7u$(Kt(F(t.origin.x),F(t.origin.y),F(t.dimension.x),F(t.dimension.y))),new Vt(Q,new gn(J,M,B))},an.$metadata$={kind:N,simpleName:"MyLiveMapProvider",interfaces:[Yt]},rn.prototype.createTileSystemProvider_0=function(t,n,i){var o;if(n)return Wt.Tilesets.chessboard_a87jzg$();var r,a,s=un,l=Dt.Tile.KIND;switch((e.isType(r=t,g)?r:_()).get_11rb$(l)){case"chessboard":o=Wt.Tilesets.chessboard_a87jzg$();break;case"solid":o=Wt.Tilesets.solid_98b62m$(B.Companion.parseHex_61zpoe$(P(Mt(t,[Dt.Tile.FILL_COLOR]))));break;case"raster_zxy":var u=s(P(Mt(t,[Dt.Tile.URL])));o=k("raster",function(t,e){return t.raster_mhpeer$(e)}.bind(null,Wt.Tilesets))(u);break;case"vector_lets_plot":o=Wt.Tilesets.letsPlot_e94j16$(te((a=t,function(t){var e,n;return null!=(e=Mt(a,[Dt.Tile.URL]))&&(t.url=e),null!=(n=Mt(a,[Dt.Tile.THEME]))&&(t.theme=Qt(n.toUpperCase())),W})),i);break;default:throw $("Tile provider is not set.")}return o},rn.$metadata$={kind:E,simpleName:"LiveMapProvider",interfaces:[]};var cn,pn,hn,_n,dn,fn,mn,$n=null;function yn(){return null===$n&&new rn,$n}function gn(t,e,n){var i;this.myTargetSource_0=e,this.colorsMap_0=n,this.myLiveMap_0=null,t.map_2o04qz$((i=this,function(t){return i.myLiveMap_0=t,W}))}function vn(t,e){fe.call(this),this.name$=t,this.ordinal$=e}function bn(){bn=function(){},cn=new vn("POINT",0),pn=new vn("POLYGON",1),hn=new vn("PATH",2),_n=new vn("H_LINE",3),dn=new vn("V_LINE",4),fn=new vn("TEXT",5),mn=new vn("PIE",6)}function wn(){return bn(),cn}function xn(){return bn(),pn}function kn(){return bn(),hn}function Cn(){return bn(),_n}function En(){return bn(),dn}function Sn(){return bn(),fn}function Tn(){return bn(),mn}gn.prototype.search_gpjtzr$=function(t){var e,n,i;if(null!=(n=null!=(e=this.myLiveMap_0)?e.searchResult():null)){var o,r,a,s,l,u,c;if(o=n.index,s=null!=(a=null!=(r=this.colorsMap_0.get_11rb$(n.layerIndex))?r(n.index):null)?a:p(),l=Zt(new _e(o,he.Companion.cursorTooltip_un7elx$(t,void 0,void 0,s),Lt())),u=yt.LIVE_MAP,null==(c=this.myTargetSource_0.get_11rb$(at(n.layerIndex,n.index))))throw T("Can't find target.".toString());i=new de(l,0,u,c,!1)}else i=null;return i},gn.$metadata$={kind:N,simpleName:"LiveMapTargetLocator",interfaces:[pe]},vn.$metadata$={kind:N,simpleName:"MapLayerKind",interfaces:[fe]},vn.values=function(){return[wn(),xn(),kn(),Cn(),En(),Sn(),Tn()]},vn.valueOf_61zpoe$=function(t){switch(t){case"POINT":return wn();case"POLYGON":return xn();case"PATH":return kn();case"H_LINE":return Cn();case"V_LINE":return En();case"TEXT":return Sn();case"PIE":return Tn();default:me("No enum constant jetbrains.datalore.plot.livemap.MapLayerKind."+t)}};var On=t.jetbrains||(t.jetbrains={}),Nn=On.datalore||(On.datalore={}),Pn=Nn.plot||(Nn.plot={}),In=Pn.livemap||(Pn.livemap={});return Object.defineProperty(In,"ConfigUtil",{get:be}),In.CursorServiceConfig=we,In.DataPointLiveMapAesthetics_init_76osgz$=Ee,In.DataPointLiveMapAesthetics_init_4iukp2$=Se,In.DataPointLiveMapAesthetics=xe,Te.PieOptions=Oe,Te.LabelOptions=Re,Object.defineProperty(Be,"Companion",{get:qe}),Be.MultiDataPoint=Ge,Te.MultiDataPointHelper=Be,In.DataPointsConverter=Te,Object.defineProperty(In,"LayerConverter",{get:nn}),c["lets-plot-plot-config-portable-js-legacy"]=o,Object.defineProperty(In,"LiveMapProvider",{get:yn}),In.LiveMapTargetLocator=gn,Object.defineProperty(vn,"POINT",{get:wn}),Object.defineProperty(vn,"POLYGON",{get:xn}),Object.defineProperty(vn,"PATH",{get:kn}),Object.defineProperty(vn,"H_LINE",{get:Cn}),Object.defineProperty(vn,"V_LINE",{get:En}),Object.defineProperty(vn,"TEXT",{get:Sn}),Object.defineProperty(vn,"PIE",{get:Tn}),In.MapLayerKind=vn,t})?i.apply(e,o):i)||(t.exports=r)},96:function(t,e,n){var i,o,r;o=[e,n(421),n(486),n(705),n(322)],void 0===(r="function"==typeof(i=function(t,e,n,i,o){"use strict";var r=e.Kind.INTERFACE,a=e.Kind.CLASS,s=e.Kind.OBJECT,l=n.jetbrains.datalore.base.event.MouseEventSource,u=e.ensureNotNull,c=n.jetbrains.datalore.base.registration.Registration,p=n.jetbrains.datalore.base.registration.Disposable,h=e.kotlin.Enum,_=e.throwISE,d=e.kotlin.text.toDouble_pdl1vz$,f=e.kotlin.text.Regex_init_61zpoe$,m=e.kotlin.text.RegexOption,$=e.kotlin.text.Regex_init_sb3q2$,y=e.throwCCE,g=e.kotlin.text.trim_gw00vp$,v=e.Long.ZERO,b=i.jetbrains.datalore.base.async.ThreadSafeAsync,w=e.kotlin.Unit,x=n.jetbrains.datalore.base.observable.event.Listeners,k=n.jetbrains.datalore.base.observable.event.ListenerCaller,C=e.kotlin.collections.HashMap_init_q3lmfv$,E=n.jetbrains.datalore.base.geometry.DoubleRectangle_init_6y0v78$,S=n.jetbrains.datalore.base.values.SomeFig,T=(e.kotlin.collections.ArrayList_init_287e2$,e.equals),O=(e.unboxChar,e.kotlin.text.StringBuilder,e.kotlin.IndexOutOfBoundsException,n.jetbrains.datalore.base.geometry.DoubleVector,e.kotlin.collections.ArrayList_init_ww73n8$,o.jetbrains.datalore.vis.svg.SvgTransform,o.jetbrains.datalore.vis.svg.SvgPathData.Action.values,e.kotlin.collections.emptyList_287e2$,e.kotlin.math,i.jetbrains.datalore.base.async),N=i.jetbrains.datalore.base.js.dom.get_context2d_ng27xv$,P=i.jetbrains.datalore.base.js.css.setWidth_o105z1$,I=i.jetbrains.datalore.base.js.css.setHeight_o105z1$,A=e.numberToInt,R=Math,j=n.jetbrains.datalore.base.observable.event.handler_7qq44f$,L=i.jetbrains.datalore.base.js.css.enumerables.CssPosition,z=i.jetbrains.datalore.base.js.css.setPosition_h2yxxn$,D=i.jetbrains.datalore.base.async.SimpleAsync,M=e.getCallableRef,B=n.jetbrains.datalore.base.geometry.Vector,F=i.jetbrains.datalore.base.js.dom.DomEventType,U=i.jetbrains.datalore.base.js.dom.DomEventListener,q=i.jetbrains.datalore.base.event.dom,H=n.jetbrains.datalore.base.event.MouseEvent,G=e.getKClass,K=n.jetbrains.datalore.base.event.MouseEventSpec,V=e.kotlin.IllegalStateException_init_pdl1vj$,Y=e.kotlin.collections.toTypedArray_bvy38s$;function W(){}function X(){}function Z(){et()}function J(){tt=this}function Q(t){this.closure$predicate=t}Tt.prototype=Object.create(h.prototype),Tt.prototype.constructor=Tt,At.prototype=Object.create(h.prototype),At.prototype.constructor=At,Dt.prototype=Object.create(h.prototype),Dt.prototype.constructor=Dt,Ht.prototype=Object.create(h.prototype),Ht.prototype.constructor=Ht,Xt.prototype=Object.create(h.prototype),Xt.prototype.constructor=Xt,te.prototype=Object.create(h.prototype),te.prototype.constructor=te,Ce.prototype=Object.create(ve.prototype),Ce.prototype.constructor=Ce,Pe.prototype=Object.create(ke.prototype),Pe.prototype.constructor=Pe,Ae.prototype=Object.create($e.prototype),Ae.prototype.constructor=Ae,X.$metadata$={kind:r,simpleName:"AnimationTimer",interfaces:[]},Q.prototype.onEvent_s8cxhz$=function(t){return this.closure$predicate(t)},Q.$metadata$={kind:a,interfaces:[Z]},J.prototype.toHandler_qm21m0$=function(t){return new Q(t)},J.$metadata$={kind:s,simpleName:"Companion",interfaces:[]};var tt=null;function et(){return null===tt&&new J,tt}function nt(){}function it(){}function ot(){}function rt(){Ct=this}function at(t,e){this.closure$renderer=t,this.closure$reg=e}function st(t){this.closure$animationTimer=t}Z.$metadata$={kind:r,simpleName:"AnimationEventHandler",interfaces:[]},W.$metadata$={kind:r,simpleName:"AnimationProvider",interfaces:[]},it.$metadata$={kind:r,simpleName:"Snapshot",interfaces:[]},nt.$metadata$={kind:r,simpleName:"Canvas",interfaces:[]},ot.$metadata$={kind:r,simpleName:"CanvasControl",interfaces:[de,l,Et,W]},at.prototype.onEvent_s8cxhz$=function(t){return this.closure$renderer(),u(this.closure$reg[0]).dispose(),!0},at.$metadata$={kind:a,interfaces:[Z]},rt.prototype.drawLater_pfyfsw$=function(t,e){var n=[null];n[0]=this.setAnimationHandler_1ixrg0$(t,new at(e,n))},st.prototype.dispose=function(){this.closure$animationTimer.stop()},st.$metadata$={kind:a,interfaces:[p]},rt.prototype.setAnimationHandler_1ixrg0$=function(t,e){var n=t.createAnimationTimer_ckdfex$(e);return n.start(),c.Companion.from_gg3y3y$(new st(n))},rt.$metadata$={kind:s,simpleName:"CanvasControlUtil",interfaces:[]};var lt,ut,ct,pt,ht,_t,dt,ft,mt,$t,yt,gt,vt,bt,wt,xt,kt,Ct=null;function Et(){}function St(){}function Tt(t,e){h.call(this),this.name$=t,this.ordinal$=e}function Ot(){Ot=function(){},lt=new Tt("BEVEL",0),ut=new Tt("MITER",1),ct=new Tt("ROUND",2)}function Nt(){return Ot(),lt}function Pt(){return Ot(),ut}function It(){return Ot(),ct}function At(t,e){h.call(this),this.name$=t,this.ordinal$=e}function Rt(){Rt=function(){},pt=new At("BUTT",0),ht=new At("ROUND",1),_t=new At("SQUARE",2)}function jt(){return Rt(),pt}function Lt(){return Rt(),ht}function zt(){return Rt(),_t}function Dt(t,e){h.call(this),this.name$=t,this.ordinal$=e}function Mt(){Mt=function(){},dt=new Dt("ALPHABETIC",0),ft=new Dt("BOTTOM",1),mt=new Dt("MIDDLE",2),$t=new Dt("TOP",3)}function Bt(){return Mt(),dt}function Ft(){return Mt(),ft}function Ut(){return Mt(),mt}function qt(){return Mt(),$t}function Ht(t,e){h.call(this),this.name$=t,this.ordinal$=e}function Gt(){Gt=function(){},yt=new Ht("CENTER",0),gt=new Ht("END",1),vt=new Ht("START",2)}function Kt(){return Gt(),yt}function Vt(){return Gt(),gt}function Yt(){return Gt(),vt}function Wt(t,e,n,i){ae(),void 0===t&&(t=Jt()),void 0===e&&(e=ne()),void 0===n&&(n=ae().DEFAULT_SIZE),void 0===i&&(i=ae().DEFAULT_FAMILY),this.fontStyle=t,this.fontWeight=e,this.fontSize=n,this.fontFamily=i}function Xt(t,e){h.call(this),this.name$=t,this.ordinal$=e}function Zt(){Zt=function(){},bt=new Xt("NORMAL",0),wt=new Xt("ITALIC",1)}function Jt(){return Zt(),bt}function Qt(){return Zt(),wt}function te(t,e){h.call(this),this.name$=t,this.ordinal$=e}function ee(){ee=function(){},xt=new te("NORMAL",0),kt=new te("BOLD",1)}function ne(){return ee(),xt}function ie(){return ee(),kt}function oe(){re=this,this.DEFAULT_SIZE=10,this.DEFAULT_FAMILY="serif"}Et.$metadata$={kind:r,simpleName:"CanvasProvider",interfaces:[]},St.prototype.arc_6p3vsx$=function(t,e,n,i,o,r,a){void 0===r&&(r=!1),a?a(t,e,n,i,o,r):this.arc_6p3vsx$$default(t,e,n,i,o,r)},Tt.$metadata$={kind:a,simpleName:"LineJoin",interfaces:[h]},Tt.values=function(){return[Nt(),Pt(),It()]},Tt.valueOf_61zpoe$=function(t){switch(t){case"BEVEL":return Nt();case"MITER":return Pt();case"ROUND":return It();default:_("No enum constant jetbrains.datalore.vis.canvas.Context2d.LineJoin."+t)}},At.$metadata$={kind:a,simpleName:"LineCap",interfaces:[h]},At.values=function(){return[jt(),Lt(),zt()]},At.valueOf_61zpoe$=function(t){switch(t){case"BUTT":return jt();case"ROUND":return Lt();case"SQUARE":return zt();default:_("No enum constant jetbrains.datalore.vis.canvas.Context2d.LineCap."+t)}},Dt.$metadata$={kind:a,simpleName:"TextBaseline",interfaces:[h]},Dt.values=function(){return[Bt(),Ft(),Ut(),qt()]},Dt.valueOf_61zpoe$=function(t){switch(t){case"ALPHABETIC":return Bt();case"BOTTOM":return Ft();case"MIDDLE":return Ut();case"TOP":return qt();default:_("No enum constant jetbrains.datalore.vis.canvas.Context2d.TextBaseline."+t)}},Ht.$metadata$={kind:a,simpleName:"TextAlign",interfaces:[h]},Ht.values=function(){return[Kt(),Vt(),Yt()]},Ht.valueOf_61zpoe$=function(t){switch(t){case"CENTER":return Kt();case"END":return Vt();case"START":return Yt();default:_("No enum constant jetbrains.datalore.vis.canvas.Context2d.TextAlign."+t)}},Xt.$metadata$={kind:a,simpleName:"FontStyle",interfaces:[h]},Xt.values=function(){return[Jt(),Qt()]},Xt.valueOf_61zpoe$=function(t){switch(t){case"NORMAL":return Jt();case"ITALIC":return Qt();default:_("No enum constant jetbrains.datalore.vis.canvas.Context2d.Font.FontStyle."+t)}},te.$metadata$={kind:a,simpleName:"FontWeight",interfaces:[h]},te.values=function(){return[ne(),ie()]},te.valueOf_61zpoe$=function(t){switch(t){case"NORMAL":return ne();case"BOLD":return ie();default:_("No enum constant jetbrains.datalore.vis.canvas.Context2d.Font.FontWeight."+t)}},oe.$metadata$={kind:s,simpleName:"Companion",interfaces:[]};var re=null;function ae(){return null===re&&new oe,re}function se(t){ce(),this.myMatchResult_0=t}function le(){ue=this,this.FONT_SCALABLE_VALUES_0=f("((\\d+\\.?\\d*)px(?:/(\\d+\\.?\\d*)px)?) ?([a-zA-Z -]+)?"),this.SIZE_STRING_0=1,this.FONT_SIZE_0=2,this.LINE_HEIGHT_0=3,this.FONT_FAMILY_0=4}Wt.$metadata$={kind:a,simpleName:"Font",interfaces:[]},Wt.prototype.component1=function(){return this.fontStyle},Wt.prototype.component2=function(){return this.fontWeight},Wt.prototype.component3=function(){return this.fontSize},Wt.prototype.component4=function(){return this.fontFamily},Wt.prototype.copy_edneyn$=function(t,e,n,i){return new Wt(void 0===t?this.fontStyle:t,void 0===e?this.fontWeight:e,void 0===n?this.fontSize:n,void 0===i?this.fontFamily:i)},Wt.prototype.toString=function(){return"Font(fontStyle="+e.toString(this.fontStyle)+", fontWeight="+e.toString(this.fontWeight)+", fontSize="+e.toString(this.fontSize)+", fontFamily="+e.toString(this.fontFamily)+")"},Wt.prototype.hashCode=function(){var t=0;return 31*(t=31*(t=31*(t=31*t+e.hashCode(this.fontStyle)|0)+e.hashCode(this.fontWeight)|0)+e.hashCode(this.fontSize)|0)+e.hashCode(this.fontFamily)|0},Wt.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.fontStyle,t.fontStyle)&&e.equals(this.fontWeight,t.fontWeight)&&e.equals(this.fontSize,t.fontSize)&&e.equals(this.fontFamily,t.fontFamily)},St.$metadata$={kind:r,simpleName:"Context2d",interfaces:[]},Object.defineProperty(se.prototype,"fontFamily",{configurable:!0,get:function(){return this.getString_0(4)}}),Object.defineProperty(se.prototype,"sizeString",{configurable:!0,get:function(){return this.getString_0(1)}}),Object.defineProperty(se.prototype,"fontSize",{configurable:!0,get:function(){return this.getDouble_0(2)}}),Object.defineProperty(se.prototype,"lineHeight",{configurable:!0,get:function(){return this.getDouble_0(3)}}),se.prototype.getString_0=function(t){return this.myMatchResult_0.groupValues.get_za3lpa$(t)},se.prototype.getDouble_0=function(t){var e=this.getString_0(t);return 0===e.length?null:d(e)},le.prototype.create_61zpoe$=function(t){var e=this.FONT_SCALABLE_VALUES_0.find_905azu$(t);return null==e?null:new se(e)},le.$metadata$={kind:s,simpleName:"Companion",interfaces:[]};var ue=null;function ce(){return null===ue&&new le,ue}function pe(){he=this,this.FONT_ATTRIBUTE_0=f("font:(.+);"),this.FONT_0=1}se.$metadata$={kind:a,simpleName:"CssFontParser",interfaces:[]},pe.prototype.extractFontStyle_pdl1vz$=function(t){return $("italic",m.IGNORE_CASE).containsMatchIn_6bul2c$(t)?Qt():Jt()},pe.prototype.extractFontWeight_pdl1vz$=function(t){return $("600|700|800|900|bold",m.IGNORE_CASE).containsMatchIn_6bul2c$(t)?ie():ne()},pe.prototype.extractStyleFont_pdl1vj$=function(t){var n,i;if(null==t)return null;var o,r=this.FONT_ATTRIBUTE_0.find_905azu$(t);return null!=(i=null!=(n=null!=r?r.groupValues:null)?n.get_za3lpa$(1):null)?g(e.isCharSequence(o=i)?o:y()).toString():null},pe.prototype.scaleFont_p7lm8j$=function(t,e){var n,i;if(null==(n=ce().create_61zpoe$(t)))return t;var o=n;if(null==(i=o.sizeString))return t;var r=i,a=this.scaleFontValue_0(o.fontSize,e),s=o.lineHeight,l=this.scaleFontValue_0(s,e);l.length>0&&(a=a+"/"+l);var u=a;return f(r).replaceFirst_x2uqeu$(t,u)},pe.prototype.scaleFontValue_0=function(t,e){return null==t?"":(t*e).toString()+"px"},pe.$metadata$={kind:s,simpleName:"CssStyleUtil",interfaces:[]};var he=null;function _e(){this.myLastTick_0=v,this.myDt_0=v}function de(){}function fe(t,e){return function(n){return e.schedule_klfg04$(function(t,e){return function(){return t.success_11rb$(e),w}}(t,n)),w}}function me(t,e){return function(n){return e.schedule_klfg04$(function(t,e){return function(){return t.failure_tcv7n7$(e),w}}(t,n)),w}}function $e(t){this.myEventHandlers_51nth5$_0=C()}function ye(t,e,n){this.closure$addReg=t,this.this$EventPeer=e,this.closure$eventSpec=n}function ge(t){this.closure$event=t}function ve(t,e,n){this.size_mf5u5r$_0=e,this.context2d_imt5ib$_0=1===n?t:new be(t,n)}function be(t,e){this.ctx_0=t,this.myScale_0=e}function we(t){this.myCanvasControl_0=t,this.canvas=null,this.canvas=this.myCanvasControl_0.createCanvas_119tl4$(this.myCanvasControl_0.size),this.myCanvasControl_0.addChild_eqkm0m$(this.canvas)}function xe(){}function ke(){this.myHandle_0=null,this.myIsStarted_0=!1,this.myIsStarted_0=!1}function Ce(t,n,i){var o;Oe(),ve.call(this,new Re(e.isType(o=t.getContext("2d"),CanvasRenderingContext2D)?o:y()),n,i),this.canvasElement=t,this.pixelRatio_0=i}function Ee(t,e,n){this.canvasElement=t,this.size_0=e,this.pixelRatio_0=n}function Se(){Te=this,this.DEVICE_PIXEL_RATIO=window.devicePixelRatio}_e.prototype.tick_s8cxhz$=function(t){return this.myLastTick_0.toNumber()>0&&(this.myDt_0=t.subtract(this.myLastTick_0)),this.myLastTick_0=t,this.myDt_0},_e.prototype.dt=function(){return this.myDt_0},_e.$metadata$={kind:a,simpleName:"DeltaTime",interfaces:[]},de.$metadata$={kind:r,simpleName:"Dispatcher",interfaces:[]},ye.prototype.dispose=function(){this.closure$addReg.remove(),u(this.this$EventPeer.myEventHandlers_51nth5$_0.get_11rb$(this.closure$eventSpec)).isEmpty&&(this.this$EventPeer.myEventHandlers_51nth5$_0.remove_11rb$(this.closure$eventSpec),this.this$EventPeer.onSpecRemoved_1gkqfp$(this.closure$eventSpec))},ye.$metadata$={kind:a,interfaces:[p]},$e.prototype.addEventHandler_b14a3c$=function(t,e){if(!this.myEventHandlers_51nth5$_0.containsKey_11rb$(t)){var n=this.myEventHandlers_51nth5$_0,i=new x;n.put_xwzc9p$(t,i),this.onSpecAdded_1gkqfp$(t)}var o=u(this.myEventHandlers_51nth5$_0.get_11rb$(t)).add_11rb$(e);return c.Companion.from_gg3y3y$(new ye(o,this,t))},ge.prototype.call_11rb$=function(t){t.onEvent_11rb$(this.closure$event)},ge.$metadata$={kind:a,interfaces:[k]},$e.prototype.dispatch_b6y3vz$=function(t,e){var n;null!=(n=this.myEventHandlers_51nth5$_0.get_11rb$(t))&&n.fire_kucmxw$(new ge(e))},$e.$metadata$={kind:a,simpleName:"EventPeer",interfaces:[]},Object.defineProperty(ve.prototype,"size",{get:function(){return this.size_mf5u5r$_0}}),Object.defineProperty(ve.prototype,"context2d",{configurable:!0,get:function(){return this.context2d_imt5ib$_0}}),ve.$metadata$={kind:a,simpleName:"ScaledCanvas",interfaces:[nt]},be.prototype.scaled_0=function(t){return this.myScale_0*t},be.prototype.descaled_0=function(t){return t/this.myScale_0},be.prototype.scaled_1=function(t){if(1===this.myScale_0)return t;for(var e=new Float64Array(t.length),n=0;n!==t.length;++n)e[n]=this.scaled_0(t[n]);return e},be.prototype.scaled_2=function(t){return t.copy_edneyn$(void 0,void 0,this.scaled_0(t.fontSize))},be.prototype.drawImage_1j7zd4$=function(t){this.drawImage_xo47pw$(t,0,0)},be.prototype.drawImage_xo47pw$=function(t,e,n){this.ctx_0.drawImage_xo47pw$(t,this.scaled_0(e),this.scaled_0(n))},be.prototype.drawImage_nks7bk$=function(t,e,n,i,o){this.ctx_0.drawImage_nks7bk$(t,this.scaled_0(e),this.scaled_0(n),this.scaled_0(i),this.scaled_0(o))},be.prototype.drawImage_urnjjc$=function(t,e,n,i,o,r,a,s,l){this.ctx_0.drawImage_urnjjc$(t,this.scaled_0(e),this.scaled_0(n),this.scaled_0(i),this.scaled_0(o),this.scaled_0(r),this.scaled_0(a),this.scaled_0(s),this.scaled_0(l))},be.prototype.beginPath=function(){this.ctx_0.beginPath()},be.prototype.closePath=function(){this.ctx_0.closePath()},be.prototype.stroke=function(){this.ctx_0.stroke()},be.prototype.fill=function(){this.ctx_0.fill()},be.prototype.fillRect_6y0v78$=function(t,e,n,i){this.ctx_0.fillRect_6y0v78$(this.scaled_0(t),this.scaled_0(e),this.scaled_0(n),this.scaled_0(i))},be.prototype.moveTo_lu1900$=function(t,e){this.ctx_0.moveTo_lu1900$(this.scaled_0(t),this.scaled_0(e))},be.prototype.lineTo_lu1900$=function(t,e){this.ctx_0.lineTo_lu1900$(this.scaled_0(t),this.scaled_0(e))},be.prototype.arc_6p3vsx$$default=function(t,e,n,i,o,r){this.ctx_0.arc_6p3vsx$(this.scaled_0(t),this.scaled_0(e),this.scaled_0(n),i,o,r)},be.prototype.save=function(){this.ctx_0.save()},be.prototype.restore=function(){this.ctx_0.restore()},be.prototype.setFillStyle_2160e9$=function(t){this.ctx_0.setFillStyle_2160e9$(t)},be.prototype.setStrokeStyle_2160e9$=function(t){this.ctx_0.setStrokeStyle_2160e9$(t)},be.prototype.setGlobalAlpha_14dthe$=function(t){this.ctx_0.setGlobalAlpha_14dthe$(t)},be.prototype.setFont_ov8mpe$=function(t){this.ctx_0.setFont_ov8mpe$(this.scaled_2(t))},be.prototype.setLineWidth_14dthe$=function(t){this.ctx_0.setLineWidth_14dthe$(this.scaled_0(t))},be.prototype.strokeRect_6y0v78$=function(t,e,n,i){this.ctx_0.strokeRect_6y0v78$(this.scaled_0(t),this.scaled_0(e),this.scaled_0(n),this.scaled_0(i))},be.prototype.strokeText_ai6r6m$=function(t,e,n){this.ctx_0.strokeText_ai6r6m$(t,this.scaled_0(e),this.scaled_0(n))},be.prototype.fillText_ai6r6m$=function(t,e,n){this.ctx_0.fillText_ai6r6m$(t,this.scaled_0(e),this.scaled_0(n))},be.prototype.scale_lu1900$=function(t,e){this.ctx_0.scale_lu1900$(t,e)},be.prototype.scale_14dthe$=function(t){this.scale_lu1900$(t,t)},be.prototype.rotate_14dthe$=function(t){this.ctx_0.rotate_14dthe$(t)},be.prototype.translate_lu1900$=function(t,e){this.ctx_0.translate_lu1900$(this.scaled_0(t),this.scaled_0(e))},be.prototype.transform_15yvbs$=function(t,e,n,i,o,r){this.ctx_0.transform_15yvbs$(t,e,n,i,this.scaled_0(o),this.scaled_0(r))},be.prototype.bezierCurveTo_15yvbs$=function(t,e,n,i,o,r){this.ctx_0.bezierCurveTo_15yvbs$(this.scaled_0(t),this.scaled_0(e),this.scaled_0(n),this.scaled_0(i),this.scaled_0(o),this.scaled_0(r))},be.prototype.setLineJoin_v2gigt$=function(t){this.ctx_0.setLineJoin_v2gigt$(t)},be.prototype.setLineCap_useuqn$=function(t){this.ctx_0.setLineCap_useuqn$(t)},be.prototype.setTextBaseline_5cz80h$=function(t){this.ctx_0.setTextBaseline_5cz80h$(t)},be.prototype.setTextAlign_iwro1z$=function(t){this.ctx_0.setTextAlign_iwro1z$(t)},be.prototype.setTransform_15yvbs$=function(t,e,n,i,o,r){this.ctx_0.setTransform_15yvbs$(t,e,n,i,this.scaled_0(o),this.scaled_0(r))},be.prototype.fillEvenOdd=function(){this.ctx_0.fillEvenOdd()},be.prototype.setLineDash_gf7tl1$=function(t){this.ctx_0.setLineDash_gf7tl1$(this.scaled_1(t))},be.prototype.measureText_61zpoe$=function(t){return this.descaled_0(this.ctx_0.measureText_61zpoe$(t))},be.prototype.clearRect_wthzt5$=function(t){this.ctx_0.clearRect_wthzt5$(E(this.scaled_0(t.left),this.scaled_0(t.top),this.scaled_0(t.width),this.scaled_0(t.height)))},be.$metadata$={kind:a,simpleName:"ScaledContext2d",interfaces:[St]},Object.defineProperty(we.prototype,"context",{configurable:!0,get:function(){return this.canvas.context2d}}),Object.defineProperty(we.prototype,"size",{configurable:!0,get:function(){return this.myCanvasControl_0.size}}),we.prototype.createCanvas=function(){return this.myCanvasControl_0.createCanvas_119tl4$(this.myCanvasControl_0.size)},we.prototype.dispose=function(){this.myCanvasControl_0.removeChild_eqkm0m$(this.canvas)},we.$metadata$={kind:a,simpleName:"SingleCanvasControl",interfaces:[]},xe.$metadata$={kind:r,simpleName:"CanvasFigure",interfaces:[S]},ke.prototype.start=function(){this.myIsStarted_0||(this.myIsStarted_0=!0,this.requestNextFrame_0())},ke.prototype.stop=function(){this.myIsStarted_0&&(this.myIsStarted_0=!1,window.cancelAnimationFrame(u(this.myHandle_0)))},ke.prototype.execute_0=function(t){this.myIsStarted_0&&(this.handle_s8cxhz$(e.Long.fromNumber(t)),this.requestNextFrame_0())},ke.prototype.requestNextFrame_0=function(){var t;this.myHandle_0=window.requestAnimationFrame((t=this,function(e){return t.execute_0(e),w}))},ke.$metadata$={kind:a,simpleName:"DomAnimationTimer",interfaces:[X]},Ce.prototype.takeSnapshot=function(){return O.Asyncs.constant_mh5how$(new Ee(this.canvasElement,this.size,this.pixelRatio_0))},Ce.prototype.immidiateSnapshot=function(){return new Ee(this.canvasElement,this.size,this.pixelRatio_0)},Ee.prototype.copy=function(){var t=Oe().createNativeCanvas_0(this.size_0,this.pixelRatio_0);return N(t).drawImage(this.canvasElement,0,0),new Ee(t,this.size_0,this.pixelRatio_0)},Ee.$metadata$={kind:a,simpleName:"DomSnapshot",interfaces:[it]},Se.prototype.create_duqvgq$=function(t,e){return new Ce(this.createNativeCanvas_0(t,e),t,e)},Se.prototype.createNativeCanvas_0=function(t,n){var i,o=e.isType(i=document.createElement("canvas"),HTMLCanvasElement)?i:y();P(o.style,t.x),I(o.style,t.y);var r=t.x*n;o.width=A(R.ceil(r));var a=t.y*n;return o.height=A(R.ceil(a)),o},Se.$metadata$={kind:s,simpleName:"Companion",interfaces:[]};var Te=null;function Oe(){return null===Te&&new Se,Te}function Ne(t,e,n){this.myRootElement_0=t,this.size_malc5o$_0=e,this.myEventPeer_0=n}function Pe(t){this.closure$eventHandler=t,ke.call(this)}function Ie(t,n,i,o){return function(r){var a,s,l;if(null!=t){var u,c=t;l=e.isType(u=n.createCanvas_119tl4$(c),Ce)?u:y()}else l=null;var p=null!=(a=l)?a:Oe().create_duqvgq$(new B(i.width,i.height),1);return(e.isType(s=p.canvasElement.getContext("2d"),CanvasRenderingContext2D)?s:y()).drawImage(i,0,0,p.canvasElement.width,p.canvasElement.height),p.takeSnapshot().onSuccess_qlkmfe$(function(t){return function(e){return t(e),w}}(o))}}function Ae(t,e){var n;$e.call(this,G(K)),this.myEventTarget_0=t,this.myTargetBounds_0=e,this.myButtonPressed_0=!1,this.myLastDragEndEventTimestamp_0=0,this.myWasDragged_0=!1,this.myButtonPressCoord_0=null,this.myDragToleranceDistance_0=3,this.handle_0(F.Companion.MOUSE_ENTER,(n=this,function(t){if(n.isHitOnTarget_0(t))return n.dispatch_b6y3vz$(K.MOUSE_ENTERED,n.translate_0(t)),w})),this.handle_0(F.Companion.MOUSE_LEAVE,function(t){return function(e){if(t.isHitOnTarget_0(e))return t.dispatch_b6y3vz$(K.MOUSE_LEFT,t.translate_0(e)),w}}(this)),this.handle_0(F.Companion.CLICK,function(t){return function(e){if(!T(t.myLastDragEndEventTimestamp_0,e.timeStamp)&&t.isHitOnTarget_0(e))return t.dispatch_b6y3vz$(K.MOUSE_CLICKED,t.translate_0(e)),t.myWasDragged_0=!1,w}}(this)),this.handle_0(F.Companion.DOUBLE_CLICK,function(t){return function(e){if(!T(t.myLastDragEndEventTimestamp_0,e.timeStamp)&&t.isHitOnTarget_0(e))return t.dispatch_b6y3vz$(K.MOUSE_DOUBLE_CLICKED,t.translate_0(e)),w}}(this)),this.handle_0(F.Companion.MOUSE_DOWN,function(t){return function(e){if(t.isHitOnTarget_0(e))return e.preventDefault(),t.myButtonPressed_0=!0,t.myButtonPressCoord_0=new B(A(e.x),A(e.y)),t.dispatch_b6y3vz$(K.MOUSE_PRESSED,t.translate_0(e)),w}}(this)),this.handle_0(F.Companion.MOUSE_UP,function(t){return function(e){return t.myWasDragged_0&&(t.myLastDragEndEventTimestamp_0=e.timeStamp),t.myWasDragged_0=!1,t.myButtonPressed_0=!1,t.myButtonPressCoord_0=null,t.dispatch_b6y3vz$(K.MOUSE_RELEASED,t.translate_0(e)),w}}(this)),this.handle_0(F.Companion.MOUSE_MOVE,function(t){return function(e){var n,i,o;if(t.myWasDragged_0)e.preventDefault(),t.dispatch_b6y3vz$(K.MOUSE_DRAGGED,t.translate_0(e));else if(t.myButtonPressed_0&&!t.myWasDragged_0)(null!=(o=null!=(i=null!=(n=t.myButtonPressCoord_0)?n.sub_119tl4$(new B(A(e.x),A(e.y))):null)?i.length():null)?o:0)>t.myDragToleranceDistance_0&&(t.myWasDragged_0=!0,e.preventDefault(),t.dispatch_b6y3vz$(K.MOUSE_DRAGGED,t.translate_0(e)));else{if(t.myButtonPressed_0||t.myWasDragged_0)throw V("MOUSE_MOVE: unknown internal state".toString());if(!t.isHitOnTarget_0(e))return;t.dispatch_b6y3vz$(K.MOUSE_MOVED,t.translate_0(e))}return w}}(this))}function Re(t){this.ctx_0=t}Ce.$metadata$={kind:a,simpleName:"DomCanvas",interfaces:[ve]},Object.defineProperty(Ne.prototype,"size",{get:function(){return this.size_malc5o$_0}}),Pe.prototype.handle_s8cxhz$=function(t){this.closure$eventHandler.onEvent_s8cxhz$(t)},Pe.$metadata$={kind:a,interfaces:[ke]},Ne.prototype.createAnimationTimer_ckdfex$=function(t){return new Pe(t)},Ne.prototype.addEventHandler_mfdhbe$=function(t,e){return this.myEventPeer_0.addEventHandler_b14a3c$(t,j((n=e,function(t){return n.onEvent_11rb$(t),w})));var n},Ne.prototype.createCanvas_119tl4$=function(t){var e=Oe().create_duqvgq$(t,Oe().DEVICE_PIXEL_RATIO);return z(e.canvasElement.style,L.ABSOLUTE),e},Ne.prototype.createSnapshot_61zpoe$=function(t){return this.createSnapshotAsync_0(t,null)},Ne.prototype.createSnapshot_50eegg$=function(t,e){var n={type:"image/png"};return this.createSnapshotAsync_0(URL.createObjectURL(new Blob([t],n)),e)},Ne.prototype.createSnapshotAsync_0=function(t,e){void 0===e&&(e=null);var n=new D,i=new Image;return i.onload=this.onLoad_0(i,e,M("success",function(t,e){return t.success_11rb$(e),w}.bind(null,n))),i.src=t,n},Ne.prototype.onLoad_0=function(t,e,n){return Ie(e,this,t,n)},Ne.prototype.addChild_eqkm0m$=function(t){var n;this.myRootElement_0.appendChild((e.isType(n=t,Ce)?n:y()).canvasElement)},Ne.prototype.addChild_fwfip8$=function(t,n){var i;this.myRootElement_0.insertBefore((e.isType(i=n,Ce)?i:y()).canvasElement,this.myRootElement_0.childNodes[t])},Ne.prototype.removeChild_eqkm0m$=function(t){var n;this.myRootElement_0.removeChild((e.isType(n=t,Ce)?n:y()).canvasElement)},Ne.prototype.schedule_klfg04$=function(t){t()},Ae.prototype.handle_0=function(t,e){var n;(T(t,F.Companion.MOUSE_MOVE)||T(t,F.Companion.MOUSE_UP)?document:this.myEventTarget_0).addEventListener(t.name,new U((n=e,function(t){return n(t),!1})))},Ae.prototype.onSpecAdded_1gkqfp$=function(t){},Ae.prototype.onSpecRemoved_1gkqfp$=function(t){},Ae.prototype.isHitOnTarget_0=function(t){var e=new B(A(t.offsetX),A(t.offsetY));return this.myTargetBounds_0.contains_119tl4$(e)},Ae.prototype.translate_0=function(t){var e=this.myEventTarget_0.getBoundingClientRect();return new H(t.clientX-A(e.x)-this.myTargetBounds_0.origin.x|0,t.clientY-A(e.y)-this.myTargetBounds_0.origin.y|0,q.DomEventUtil.getButton_tfvzir$(t),q.DomEventUtil.getModifiers_tfvzir$(t))},Ae.$metadata$={kind:a,simpleName:"DomEventPeer",interfaces:[$e]},Ne.$metadata$={kind:a,simpleName:"DomCanvasControl",interfaces:[ot]},Re.prototype.convertLineJoin_0=function(t){var n;switch(t.name){case"BEVEL":n="bevel";break;case"MITER":n="miter";break;case"ROUND":n="round";break;default:n=e.noWhenBranchMatched()}return n},Re.prototype.convertLineCap_0=function(t){var n;switch(t.name){case"BUTT":n="butt";break;case"ROUND":n="round";break;case"SQUARE":n="square";break;default:n=e.noWhenBranchMatched()}return n},Re.prototype.convertTextBaseline_0=function(t){var n;switch(t.name){case"ALPHABETIC":n="alphabetic";break;case"BOTTOM":n="bottom";break;case"MIDDLE":n="middle";break;case"TOP":n="top";break;default:n=e.noWhenBranchMatched()}return n},Re.prototype.convertTextAlign_0=function(t){var n;switch(t.name){case"CENTER":n="center";break;case"END":n="end";break;case"START":n="start";break;default:n=e.noWhenBranchMatched()}return n},Re.prototype.drawImage_1j7zd4$=function(t){this.drawImage_xo47pw$(t,0,0)},Re.prototype.drawImage_xo47pw$=function(t,n,i){var o,r=e.isType(o=t,Ee)?o:y();this.ctx_0.drawImage(r.canvasElement,n,i)},Re.prototype.drawImage_nks7bk$=function(t,n,i,o,r){var a,s=e.isType(a=t,Ee)?a:y();this.ctx_0.drawImage(s.canvasElement,n,i,o,r)},Re.prototype.drawImage_urnjjc$=function(t,n,i,o,r,a,s,l,u){var c,p=e.isType(c=t,Ee)?c:y();this.ctx_0.drawImage(p.canvasElement,n,i,o,r,a,s,l,u)},Re.prototype.beginPath=function(){this.ctx_0.beginPath()},Re.prototype.scale_14dthe$=function(t){this.scale_lu1900$(t,t)},Re.prototype.closePath=function(){this.ctx_0.closePath()},Re.prototype.stroke=function(){this.ctx_0.stroke()},Re.prototype.fill=function(){this.ctx_0.fill("nonzero")},Re.prototype.fillEvenOdd=function(){this.ctx_0.fill("evenodd")},Re.prototype.fillRect_6y0v78$=function(t,e,n,i){this.ctx_0.fillRect(t,e,n,i)},Re.prototype.moveTo_lu1900$=function(t,e){this.ctx_0.moveTo(t,e)},Re.prototype.lineTo_lu1900$=function(t,e){this.ctx_0.lineTo(t,e)},Re.prototype.arc_6p3vsx$$default=function(t,e,n,i,o,r){this.ctx_0.arc(t,e,n,i,o,r)},Re.prototype.save=function(){this.ctx_0.save()},Re.prototype.restore=function(){this.ctx_0.restore()},Re.prototype.setFillStyle_2160e9$=function(t){this.ctx_0.fillStyle=null!=t?t.toCssColor():null},Re.prototype.setStrokeStyle_2160e9$=function(t){this.ctx_0.strokeStyle=null!=t?t.toCssColor():null},Re.prototype.setGlobalAlpha_14dthe$=function(t){this.ctx_0.globalAlpha=t},Re.prototype.toCssString_0=function(t){var n,i;switch(t.fontWeight.name){case"NORMAL":n="normal";break;case"BOLD":n="bold";break;default:n=e.noWhenBranchMatched()}var o=n;switch(t.fontStyle.name){case"NORMAL":i="normal";break;case"ITALIC":i="italic";break;default:i=e.noWhenBranchMatched()}return i+" "+o+" "+t.fontSize+"px "+t.fontFamily},Re.prototype.setFont_ov8mpe$=function(t){this.ctx_0.font=this.toCssString_0(t)},Re.prototype.setLineWidth_14dthe$=function(t){this.ctx_0.lineWidth=t},Re.prototype.strokeRect_6y0v78$=function(t,e,n,i){this.ctx_0.strokeRect(t,e,n,i)},Re.prototype.strokeText_ai6r6m$=function(t,e,n){this.ctx_0.strokeText(t,e,n)},Re.prototype.fillText_ai6r6m$=function(t,e,n){this.ctx_0.fillText(t,e,n)},Re.prototype.scale_lu1900$=function(t,e){this.ctx_0.scale(t,e)},Re.prototype.rotate_14dthe$=function(t){this.ctx_0.rotate(t)},Re.prototype.translate_lu1900$=function(t,e){this.ctx_0.translate(t,e)},Re.prototype.transform_15yvbs$=function(t,e,n,i,o,r){this.ctx_0.transform(t,e,n,i,o,r)},Re.prototype.bezierCurveTo_15yvbs$=function(t,e,n,i,o,r){this.ctx_0.bezierCurveTo(t,e,n,i,o,r)},Re.prototype.setLineJoin_v2gigt$=function(t){this.ctx_0.lineJoin=this.convertLineJoin_0(t)},Re.prototype.setLineCap_useuqn$=function(t){this.ctx_0.lineCap=this.convertLineCap_0(t)},Re.prototype.setTextBaseline_5cz80h$=function(t){this.ctx_0.textBaseline=this.convertTextBaseline_0(t)},Re.prototype.setTextAlign_iwro1z$=function(t){this.ctx_0.textAlign=this.convertTextAlign_0(t)},Re.prototype.setTransform_15yvbs$=function(t,e,n,i,o,r){this.ctx_0.setTransform(t,e,n,i,o,r)},Re.prototype.setLineDash_gf7tl1$=function(t){this.ctx_0.setLineDash(Y(t))},Re.prototype.measureText_61zpoe$=function(t){return this.ctx_0.measureText(t).width},Re.prototype.clearRect_wthzt5$=function(t){this.ctx_0.clearRect(t.left,t.top,t.width,t.height)},Re.$metadata$={kind:a,simpleName:"DomContext2d",interfaces:[St]},W.AnimationTimer=X,Object.defineProperty(Z,"Companion",{get:et}),W.AnimationEventHandler=Z;var je=t.jetbrains||(t.jetbrains={}),Le=je.datalore||(je.datalore={}),ze=Le.vis||(Le.vis={}),De=ze.canvas||(ze.canvas={});De.AnimationProvider=W,nt.Snapshot=it,De.Canvas=nt,De.CanvasControl=ot,Object.defineProperty(De,"CanvasControlUtil",{get:function(){return null===Ct&&new rt,Ct}}),De.CanvasProvider=Et,Object.defineProperty(Tt,"BEVEL",{get:Nt}),Object.defineProperty(Tt,"MITER",{get:Pt}),Object.defineProperty(Tt,"ROUND",{get:It}),St.LineJoin=Tt,Object.defineProperty(At,"BUTT",{get:jt}),Object.defineProperty(At,"ROUND",{get:Lt}),Object.defineProperty(At,"SQUARE",{get:zt}),St.LineCap=At,Object.defineProperty(Dt,"ALPHABETIC",{get:Bt}),Object.defineProperty(Dt,"BOTTOM",{get:Ft}),Object.defineProperty(Dt,"MIDDLE",{get:Ut}),Object.defineProperty(Dt,"TOP",{get:qt}),St.TextBaseline=Dt,Object.defineProperty(Ht,"CENTER",{get:Kt}),Object.defineProperty(Ht,"END",{get:Vt}),Object.defineProperty(Ht,"START",{get:Yt}),St.TextAlign=Ht,Object.defineProperty(Xt,"NORMAL",{get:Jt}),Object.defineProperty(Xt,"ITALIC",{get:Qt}),Wt.FontStyle=Xt,Object.defineProperty(te,"NORMAL",{get:ne}),Object.defineProperty(te,"BOLD",{get:ie}),Wt.FontWeight=te,Object.defineProperty(Wt,"Companion",{get:ae}),St.Font_init_1nsek9$=function(t,e,n,i,o){return o=o||Object.create(Wt.prototype),Wt.call(o,null!=t?t:Jt(),null!=e?e:ne(),null!=n?n:ae().DEFAULT_SIZE,null!=i?i:ae().DEFAULT_FAMILY),o},St.Font=Wt,De.Context2d=St,De.drawImage_m9lis9$=function(t,e,n){t.drawImage_xo47pw$(e,n.x,n.y)},Object.defineProperty(se,"Companion",{get:ce}),De.CssFontParser=se,Object.defineProperty(De,"CssStyleUtil",{get:function(){return null===he&&new pe,he}}),De.DeltaTime=_e,De.Dispatcher=de,De.scheduleAsync_ebnxch$=function(t,e){var n=new b;return e.onResult_m8e4a6$(fe(n,t),me(n,t)),n},De.EventPeer=$e,De.ScaledCanvas=ve,De.ScaledContext2d=be,De.SingleCanvasControl=we,(ze.canvasFigure||(ze.canvasFigure={})).CanvasFigure=xe;var Me=De.dom||(De.dom={});return Me.DomAnimationTimer=ke,Ce.DomSnapshot=Ee,Object.defineProperty(Ce,"Companion",{get:Oe}),Me.DomCanvas=Ce,Ne.DomEventPeer=Ae,Me.DomCanvasControl=Ne,Me.DomContext2d=Re,be.prototype.arc_6p3vsx$=St.prototype.arc_6p3vsx$,Re.prototype.arc_6p3vsx$=St.prototype.arc_6p3vsx$,t})?i.apply(e,o):i)||(t.exports=r)},856:function(t,e,n){var i,o,r;o=[e,n(421),n(322),n(284),n(486),n(705)],void 0===(r="function"==typeof(i=function(t,e,n,i,o,r){"use strict";var a=e.kotlin.collections.ArrayList_init_287e2$,s=n.jetbrains.datalore.vis.svg.slim.SvgSlimNode,l=e.toString,u=e.ensureNotNull,c=n.jetbrains.datalore.vis.svg.SvgElement,p=n.jetbrains.datalore.vis.svg.SvgTextNode,h=e.kotlin.IllegalStateException_init_pdl1vj$,_=n.jetbrains.datalore.vis.svg.slim,d=e.equals,f=e.Kind.CLASS,m=i.jetbrains.datalore.mapper.core.Synchronizer,$=e.kotlin.IllegalArgumentException_init_pdl1vj$,y=e.Kind.INTERFACE,g=(n.jetbrains.datalore.vis.svg.SvgNodeContainer,e.Kind.OBJECT),v=e.throwCCE,b=o.jetbrains.datalore.base.registration.CompositeRegistration,w=r.jetbrains.datalore.base.js.dom.DomEventType,x=r.jetbrains.datalore.base.event.dom,k=o.jetbrains.datalore.base.event.MouseEvent,C=o.jetbrains.datalore.base.registration.Registration,E=n.jetbrains.datalore.vis.svg.SvgImageElementEx.RGBEncoder,S=n.jetbrains.datalore.vis.svg.SvgNode,T=o.jetbrains.datalore.base.geometry.DoubleVector,O=o.jetbrains.datalore.base.geometry.DoubleRectangle_init_6y0v78$,N=e.kotlin.collections.HashMap_init_q3lmfv$,P=n.jetbrains.datalore.vis.svg.SvgPlatformPeer,I=n.jetbrains.datalore.vis.svg.SvgElementListener,A=i.jetbrains.datalore.mapper.core,R=n.jetbrains.datalore.vis.svg.event.SvgEventSpec.values,j=e.kotlin.IllegalStateException_init,L=o.jetbrains.datalore.base.function.Function,z=o.jetbrains.datalore.base.observable.property.WritableProperty,D=e.numberToInt,M=e.kotlin.collections.LinkedHashMap_init_q3lmfv$,B=i.jetbrains.datalore.mapper.core.Mapper,F=n.jetbrains.datalore.vis.svg.SvgImageElementEx,U=n.jetbrains.datalore.vis.svg.SvgImageElement,q=i.jetbrains.datalore.mapper.core.MapperFactory,H=n.jetbrains.datalore.vis.svg,G=(e.defineInlineFunction,e.kotlin.Unit),K=e.kotlin.collections.AbstractMutableList,V=o.jetbrains.datalore.base.function.Value,Y=o.jetbrains.datalore.base.observable.property.PropertyChangeEvent,W=o.jetbrains.datalore.base.observable.event.ListenerCaller,X=o.jetbrains.datalore.base.observable.event.Listeners,Z=o.jetbrains.datalore.base.observable.property.Property,J=e.kotlinx.dom.addClass_hhb33f$,Q=e.kotlinx.dom.removeClass_hhb33f$,tt=o.jetbrains.datalore.base.geometry.Vector,et=o.jetbrains.datalore.base.function.Supplier,nt=r.jetbrains.datalore.base.observable.property.UpdatableProperty,it=n.jetbrains.datalore.vis.svg.SvgEllipseElement,ot=n.jetbrains.datalore.vis.svg.SvgCircleElement,rt=n.jetbrains.datalore.vis.svg.SvgRectElement,at=n.jetbrains.datalore.vis.svg.SvgTextElement,st=n.jetbrains.datalore.vis.svg.SvgPathElement,lt=n.jetbrains.datalore.vis.svg.SvgLineElement,ut=n.jetbrains.datalore.vis.svg.SvgSvgElement,ct=n.jetbrains.datalore.vis.svg.SvgGElement,pt=n.jetbrains.datalore.vis.svg.SvgStyleElement,ht=n.jetbrains.datalore.vis.svg.SvgTSpanElement,_t=n.jetbrains.datalore.vis.svg.SvgDefsElement,dt=n.jetbrains.datalore.vis.svg.SvgClipPathElement;function ft(t,e,n){this.source_0=t,this.target_0=e,this.targetPeer_0=n,this.myHandlersRegs_0=null}function mt(){}function $t(){}function yt(t,e){this.closure$source=t,this.closure$spec=e}function gt(t,e,n){this.closure$target=t,this.closure$eventType=e,this.closure$listener=n,C.call(this)}function vt(){}function bt(){this.myMappingMap_0=N()}function wt(t,e,n){St.call(this,t,e,n),this.myPeer_0=n,this.myHandlersRegs_0=null}function xt(t){this.this$SvgElementMapper=t,this.myReg_0=null}function kt(t){this.this$SvgElementMapper=t}function Ct(t){this.this$SvgElementMapper=t}function Et(t,e){this.this$SvgElementMapper=t,this.closure$spec=e}function St(t,e,n){B.call(this,t,e),this.peer_cyou3s$_0=n}function Tt(t){this.myPeer_0=t}function Ot(t){It(),B.call(this,t,It().createDocument_0()),this.myRootMapper_0=null}function Nt(){Pt=this}gt.prototype=Object.create(C.prototype),gt.prototype.constructor=gt,St.prototype=Object.create(B.prototype),St.prototype.constructor=St,wt.prototype=Object.create(St.prototype),wt.prototype.constructor=wt,Ot.prototype=Object.create(B.prototype),Ot.prototype.constructor=Ot,At.prototype=Object.create(St.prototype),At.prototype.constructor=At,Ut.prototype=Object.create(C.prototype),Ut.prototype.constructor=Ut,Qt.prototype=Object.create(K.prototype),Qt.prototype.constructor=Qt,te.prototype=Object.create(K.prototype),te.prototype.constructor=te,oe.prototype=Object.create(C.prototype),oe.prototype.constructor=oe,re.prototype=Object.create(C.prototype),re.prototype.constructor=re,pe.prototype=Object.create(nt.prototype),pe.prototype.constructor=pe,ft.prototype.attach_1rog5x$=function(t){if(this.myHandlersRegs_0=a(),e.isType(this.source_0,s)){var n="Slim SVG node is not expected: "+l(e.getKClassFromExpression(this.source_0).simpleName);throw $(n.toString())}this.targetPeer_0.appendChild_xwzc9q$(this.target_0,this.generateNode_0(this.source_0))},ft.prototype.detach=function(){var t;for(t=u(this.myHandlersRegs_0).iterator();t.hasNext();)t.next().remove();this.myHandlersRegs_0=null,this.targetPeer_0.removeAllChildren_11rb$(this.target_0)},ft.prototype.generateNode_0=function(t){if(e.isType(t,s))return this.generateSlimNode_0(t);if(e.isType(t,c))return this.generateElement_0(t);if(e.isType(t,p))return this.generateTextNode_0(t);throw h("Can't generate dom for svg node "+e.getKClassFromExpression(t).simpleName)},ft.prototype.generateElement_0=function(t){var e,n,i=this.targetPeer_0.newSvgElement_b1cgbq$(t);for(e=t.attributeKeys.iterator();e.hasNext();){var o=e.next();this.targetPeer_0.setAttribute_ohl585$(i,o.name,l(t.getAttribute_61zpoe$(o.name).get()))}var r=t.handlersSet().get();for(r.isEmpty()||this.targetPeer_0.hookEventHandlers_ewuthb$(t,i,r),n=t.children().iterator();n.hasNext();){var a=n.next();this.targetPeer_0.appendChild_xwzc9q$(i,this.generateNode_0(a))}return i},ft.prototype.generateTextNode_0=function(t){return this.targetPeer_0.newSvgTextNode_tginx7$(t)},ft.prototype.generateSlimNode_0=function(t){var e,n,i=this.targetPeer_0.newSvgSlimNode_qwqme8$(t);if(d(t.elementName,_.SvgSlimElements.GROUP))for(e=t.slimChildren.iterator();e.hasNext();){var o=e.next();this.targetPeer_0.appendChild_xwzc9q$(i,this.generateSlimNode_0(o))}for(n=t.attributes.iterator();n.hasNext();){var r=n.next();this.targetPeer_0.setAttribute_ohl585$(i,r.key,r.value)}return i},ft.$metadata$={kind:f,simpleName:"SvgNodeSubtreeGeneratingSynchronizer",interfaces:[m]},mt.$metadata$={kind:y,simpleName:"TargetPeer",interfaces:[]},$t.prototype.appendChild_xwzc9q$=function(t,e){t.appendChild(e)},$t.prototype.removeAllChildren_11rb$=function(t){if(t.hasChildNodes())for(var e=t.firstChild;null!=e;){var n=e.nextSibling;t.removeChild(e),e=n}},$t.prototype.newSvgElement_b1cgbq$=function(t){return _e().generateElement_b1cgbq$(t)},$t.prototype.newSvgTextNode_tginx7$=function(t){var e=document.createTextNode("");return e.nodeValue=t.textContent().get(),e},$t.prototype.newSvgSlimNode_qwqme8$=function(t){return _e().generateSlimNode_qwqme8$(t)},$t.prototype.setAttribute_ohl585$=function(t,n,i){var o;(e.isType(o=t,Element)?o:v()).setAttribute(n,i)},$t.prototype.hookEventHandlers_ewuthb$=function(t,n,i){var o,r,a,s=new b([]);for(o=i.iterator();o.hasNext();){var l=o.next();switch(l.name){case"MOUSE_CLICKED":r=w.Companion.CLICK;break;case"MOUSE_PRESSED":r=w.Companion.MOUSE_DOWN;break;case"MOUSE_RELEASED":r=w.Companion.MOUSE_UP;break;case"MOUSE_OVER":r=w.Companion.MOUSE_OVER;break;case"MOUSE_MOVE":r=w.Companion.MOUSE_MOVE;break;case"MOUSE_OUT":r=w.Companion.MOUSE_OUT;break;default:throw $("unexpected event spec "+l)}var u=r;s.add_3xv6fb$(this.addMouseHandler_0(t,e.isType(a=n,EventTarget)?a:v(),l,u.name))}return s},yt.prototype.handleEvent=function(t){var n;t.stopPropagation();var i=e.isType(n=t,MouseEvent)?n:v(),o=new k(i.clientX,i.clientY,x.DomEventUtil.getButton_tfvzir$(i),x.DomEventUtil.getModifiers_tfvzir$(i));this.closure$source.dispatch_lgzia2$(this.closure$spec,o)},yt.$metadata$={kind:f,interfaces:[]},gt.prototype.doRemove=function(){this.closure$target.removeEventListener(this.closure$eventType,this.closure$listener,!1)},gt.$metadata$={kind:f,interfaces:[C]},$t.prototype.addMouseHandler_0=function(t,e,n,i){var o=new yt(t,n);return e.addEventListener(i,o,!1),new gt(e,i,o)},$t.$metadata$={kind:f,simpleName:"DomTargetPeer",interfaces:[mt]},vt.prototype.toDataUrl_nps3vt$=function(t,n,i){var o,r,a=null==(o=document.createElement("canvas"))||e.isType(o,HTMLCanvasElement)?o:v();if(null==a)throw h("Canvas is not supported.");a.width=t,a.height=n;for(var s=e.isType(r=a.getContext("2d"),CanvasRenderingContext2D)?r:v(),l=s.createImageData(t,n),u=l.data,c=0;c>24&255,t,e),Vt(i,o,n>>16&255,t,e),Kt(i,o,n>>8&255,t,e),Gt(i,o,255&n,t,e)},vt.$metadata$={kind:f,simpleName:"RGBEncoderDom",interfaces:[E]},bt.prototype.ensureSourceRegistered_0=function(t){if(!this.myMappingMap_0.containsKey_11rb$(t))throw h("Trying to call platform peer method of unmapped node")},bt.prototype.registerMapper_dxg7rd$=function(t,e){this.myMappingMap_0.put_xwzc9p$(t,e)},bt.prototype.unregisterMapper_26jijc$=function(t){this.myMappingMap_0.remove_11rb$(t)},bt.prototype.getComputedTextLength_u60gfq$=function(t){var n,i;this.ensureSourceRegistered_0(e.isType(n=t,S)?n:v());var o=u(this.myMappingMap_0.get_11rb$(t)).target;return(e.isType(i=o,SVGTextContentElement)?i:v()).getComputedTextLength()},bt.prototype.transformCoordinates_1=function(t,n,i){var o,r;this.ensureSourceRegistered_0(e.isType(o=t,S)?o:v());var a=u(this.myMappingMap_0.get_11rb$(t)).target;return this.transformCoordinates_0(e.isType(r=a,SVGElement)?r:v(),n.x,n.y,i)},bt.prototype.transformCoordinates_0=function(t,n,i,o){var r,a=(e.isType(r=t,SVGGraphicsElement)?r:v()).getCTM();o&&(a=u(a).inverse());var s=u(t.ownerSVGElement).createSVGPoint();s.x=n,s.y=i;var l=s.matrixTransform(u(a));return new T(l.x,l.y)},bt.prototype.inverseScreenTransform_ljxa03$=function(t,n){var i,o=t.ownerSvgElement;this.ensureSourceRegistered_0(u(o));var r=u(this.myMappingMap_0.get_11rb$(o)).target;return this.inverseScreenTransform_0(e.isType(i=r,SVGSVGElement)?i:v(),n.x,n.y)},bt.prototype.inverseScreenTransform_0=function(t,e,n){var i=u(t.getScreenCTM()).inverse(),o=t.createSVGPoint();return o.x=e,o.y=n,o=o.matrixTransform(i),new T(o.x,o.y)},bt.prototype.invertTransform_12yub8$=function(t,e){return this.transformCoordinates_1(t,e,!0)},bt.prototype.applyTransform_12yub8$=function(t,e){return this.transformCoordinates_1(t,e,!1)},bt.prototype.getBBox_7snaev$=function(t){var n;this.ensureSourceRegistered_0(e.isType(n=t,S)?n:v());var i=u(this.myMappingMap_0.get_11rb$(t)).target;return this.getBoundingBox_0(i)},bt.prototype.getBoundingBox_0=function(t){var n,i=(e.isType(n=t,SVGGraphicsElement)?n:v()).getBBox();return O(i.x,i.y,i.width,i.height)},bt.$metadata$={kind:f,simpleName:"SvgDomPeer",interfaces:[P]},kt.prototype.onAttrSet_ud3ldc$=function(t){null==t.newValue&&this.this$SvgElementMapper.target.removeAttribute(t.attrSpec.name),this.this$SvgElementMapper.target.setAttribute(t.attrSpec.name,l(t.newValue))},kt.$metadata$={kind:f,interfaces:[I]},xt.prototype.attach_1rog5x$=function(t){var e;for(this.myReg_0=this.this$SvgElementMapper.source.addListener_e4m8w6$(new kt(this.this$SvgElementMapper)),e=this.this$SvgElementMapper.source.attributeKeys.iterator();e.hasNext();){var n=e.next(),i=n.name,o=l(this.this$SvgElementMapper.source.getAttribute_61zpoe$(i).get());n.hasNamespace()?this.this$SvgElementMapper.target.setAttributeNS(n.namespaceUri,i,o):this.this$SvgElementMapper.target.setAttribute(i,o)}},xt.prototype.detach=function(){u(this.myReg_0).remove()},xt.$metadata$={kind:f,interfaces:[m]},Et.prototype.apply_11rb$=function(t){if(e.isType(t,MouseEvent)){var n=this.this$SvgElementMapper.createMouseEvent_0(t);return this.this$SvgElementMapper.source.dispatch_lgzia2$(this.closure$spec,n),!0}return!1},Et.$metadata$={kind:f,interfaces:[L]},Ct.prototype.set_11rb$=function(t){var e,n,i;for(null==this.this$SvgElementMapper.myHandlersRegs_0&&(this.this$SvgElementMapper.myHandlersRegs_0=M()),e=R(),n=0;n!==e.length;++n){var o=e[n];if(!u(t).contains_11rb$(o)&&u(this.this$SvgElementMapper.myHandlersRegs_0).containsKey_11rb$(o)&&u(u(this.this$SvgElementMapper.myHandlersRegs_0).remove_11rb$(o)).dispose(),t.contains_11rb$(o)&&!u(this.this$SvgElementMapper.myHandlersRegs_0).containsKey_11rb$(o)){switch(o.name){case"MOUSE_CLICKED":i=w.Companion.CLICK;break;case"MOUSE_PRESSED":i=w.Companion.MOUSE_DOWN;break;case"MOUSE_RELEASED":i=w.Companion.MOUSE_UP;break;case"MOUSE_OVER":i=w.Companion.MOUSE_OVER;break;case"MOUSE_MOVE":i=w.Companion.MOUSE_MOVE;break;case"MOUSE_OUT":i=w.Companion.MOUSE_OUT;break;default:throw j()}var r=i,a=u(this.this$SvgElementMapper.myHandlersRegs_0),s=Ft(this.this$SvgElementMapper.target,r,new Et(this.this$SvgElementMapper,o));a.put_xwzc9p$(o,s)}}},Ct.$metadata$={kind:f,interfaces:[z]},wt.prototype.registerSynchronizers_jp3a7u$=function(t){St.prototype.registerSynchronizers_jp3a7u$.call(this,t),t.add_te27wm$(new xt(this)),t.add_te27wm$(A.Synchronizers.forPropsOneWay_2ov6i0$(this.source.handlersSet(),new Ct(this)))},wt.prototype.onDetach=function(){var t;if(St.prototype.onDetach.call(this),null!=this.myHandlersRegs_0){for(t=u(this.myHandlersRegs_0).values.iterator();t.hasNext();)t.next().dispose();u(this.myHandlersRegs_0).clear()}},wt.prototype.createMouseEvent_0=function(t){t.stopPropagation();var e=this.myPeer_0.inverseScreenTransform_ljxa03$(this.source,new T(t.clientX,t.clientY));return new k(D(e.x),D(e.y),x.DomEventUtil.getButton_tfvzir$(t),x.DomEventUtil.getModifiers_tfvzir$(t))},wt.$metadata$={kind:f,simpleName:"SvgElementMapper",interfaces:[St]},St.prototype.registerSynchronizers_jp3a7u$=function(t){B.prototype.registerSynchronizers_jp3a7u$.call(this,t),this.source.isPrebuiltSubtree?t.add_te27wm$(new ft(this.source,this.target,new $t)):t.add_te27wm$(A.Synchronizers.forObservableRole_umd8ru$(this,this.source.children(),_e().nodeChildren_b3w3xb$(this.target),new Tt(this.peer_cyou3s$_0)))},St.prototype.onAttach_8uof53$=function(t){B.prototype.onAttach_8uof53$.call(this,t),this.peer_cyou3s$_0.registerMapper_dxg7rd$(this.source,this)},St.prototype.onDetach=function(){B.prototype.onDetach.call(this),this.peer_cyou3s$_0.unregisterMapper_26jijc$(this.source)},St.$metadata$={kind:f,simpleName:"SvgNodeMapper",interfaces:[B]},Tt.prototype.createMapper_11rb$=function(t){if(e.isType(t,U)){var n=t;return e.isType(n,F)&&(n=n.asImageElement_xhdger$(new vt)),new wt(n,_e().generateElement_b1cgbq$(t),this.myPeer_0)}if(e.isType(t,c))return new wt(t,_e().generateElement_b1cgbq$(t),this.myPeer_0);if(e.isType(t,p))return new At(t,_e().generateTextElement_tginx7$(t),this.myPeer_0);if(e.isType(t,s))return new St(t,_e().generateSlimNode_qwqme8$(t),this.myPeer_0);throw h("Unsupported SvgNode "+e.getKClassFromExpression(t))},Tt.$metadata$={kind:f,simpleName:"SvgNodeMapperFactory",interfaces:[q]},Nt.prototype.createDocument_0=function(){var t;return e.isType(t=document.createElementNS(H.XmlNamespace.SVG_NAMESPACE_URI,"svg"),SVGSVGElement)?t:v()},Nt.$metadata$={kind:g,simpleName:"Companion",interfaces:[]};var Pt=null;function It(){return null===Pt&&new Nt,Pt}function At(t,e,n){St.call(this,t,e,n)}function Rt(t){this.this$SvgTextNodeMapper=t}function jt(){Lt=this,this.DEFAULT="default",this.NONE="none",this.BLOCK="block",this.FLEX="flex",this.GRID="grid",this.INLINE_BLOCK="inline-block"}Ot.prototype.onAttach_8uof53$=function(t){if(B.prototype.onAttach_8uof53$.call(this,t),!this.source.isAttached())throw h("Element must be attached");var e=new bt;this.source.container().setPeer_kqs5uc$(e),this.myRootMapper_0=new wt(this.source,this.target,e),this.target.setAttribute("shape-rendering","geometricPrecision"),u(this.myRootMapper_0).attachRoot_8uof53$()},Ot.prototype.onDetach=function(){u(this.myRootMapper_0).detachRoot(),this.myRootMapper_0=null,this.source.isAttached()&&this.source.container().setPeer_kqs5uc$(null),B.prototype.onDetach.call(this)},Ot.$metadata$={kind:f,simpleName:"SvgRootDocumentMapper",interfaces:[B]},Rt.prototype.set_11rb$=function(t){this.this$SvgTextNodeMapper.target.nodeValue=t},Rt.$metadata$={kind:f,interfaces:[z]},At.prototype.registerSynchronizers_jp3a7u$=function(t){St.prototype.registerSynchronizers_jp3a7u$.call(this,t),t.add_te27wm$(A.Synchronizers.forPropsOneWay_2ov6i0$(this.source.textContent(),new Rt(this)))},At.$metadata$={kind:f,simpleName:"SvgTextNodeMapper",interfaces:[St]},jt.$metadata$={kind:g,simpleName:"CssDisplay",interfaces:[]};var Lt=null;function zt(){return null===Lt&&new jt,Lt}function Dt(t,e){return t.removeProperty(e),t}function Mt(t){return Dt(t,"display")}function Bt(t){this.closure$handler=t}function Ft(t,e,n){return qt(t,e,new Bt(n),!1)}function Ut(t,e,n){this.closure$type=t,this.closure$listener=e,this.this$onEvent=n,C.call(this)}function qt(t,e,n,i){return t.addEventListener(e.name,n,i),new Ut(e,n,t)}function Ht(t,e,n,i,o){Yt(t,e,n,i,o,3)}function Gt(t,e,n,i,o){Yt(t,e,n,i,o,2)}function Kt(t,e,n,i,o){Yt(t,e,n,i,o,1)}function Vt(t,e,n,i,o){Yt(t,e,n,i,o,0)}function Yt(t,n,i,o,r,a){n[(4*(o+e.imul(r,t.width)|0)|0)+a|0]=i}function Wt(t){return t.childNodes.length}function Xt(t,e){return t.insertBefore(e,t.firstChild)}function Zt(t,e,n){var i=null!=n?n.nextSibling:null;null==i?t.appendChild(e):t.insertBefore(e,i)}function Jt(){he=this}function Qt(t){this.closure$n=t,K.call(this)}function te(t,e){this.closure$items=t,this.closure$base=e,K.call(this)}function ee(t){this.closure$e=t}function ne(t){this.closure$element=t,this.myTimerRegistration_0=null,this.myListeners_0=new X}function ie(t,e){this.closure$value=t,this.closure$currentValue=e}function oe(t){this.closure$timer=t,C.call(this)}function re(t,e){this.closure$reg=t,this.this$=e,C.call(this)}function ae(t,e){this.closure$el=t,this.closure$cls=e,this.myValue_0=null}function se(t,e){this.closure$el=t,this.closure$attr=e}function le(t,e,n){this.closure$el=t,this.closure$attr=e,this.closure$attrValue=n}function ue(t){this.closure$el=t}function ce(t){this.closure$el=t}function pe(t,e){this.closure$period=t,this.closure$supplier=e,nt.call(this),this.myTimer_0=-1}Bt.prototype.handleEvent=function(t){this.closure$handler.apply_11rb$(t)||(t.preventDefault(),t.stopPropagation())},Bt.$metadata$={kind:f,interfaces:[]},Ut.prototype.doRemove=function(){this.this$onEvent.removeEventListener(this.closure$type.name,this.closure$listener)},Ut.$metadata$={kind:f,interfaces:[C]},Jt.prototype.elementChildren_2rdptt$=function(t){return this.nodeChildren_b3w3xb$(t)},Object.defineProperty(Qt.prototype,"size",{configurable:!0,get:function(){return Wt(this.closure$n)}}),Qt.prototype.get_za3lpa$=function(t){return this.closure$n.childNodes[t]},Qt.prototype.set_wxm5ur$=function(t,e){if(null!=u(e).parentNode)throw j();var n=u(this.get_za3lpa$(t));return this.closure$n.replaceChild(n,e),n},Qt.prototype.add_wxm5ur$=function(t,e){if(null!=u(e).parentNode)throw j();if(0===t)Xt(this.closure$n,e);else{var n=t-1|0,i=this.closure$n.childNodes[n];Zt(this.closure$n,e,i)}},Qt.prototype.removeAt_za3lpa$=function(t){var e=u(this.closure$n.childNodes[t]);return this.closure$n.removeChild(e),e},Qt.$metadata$={kind:f,interfaces:[K]},Jt.prototype.nodeChildren_b3w3xb$=function(t){return new Qt(t)},Object.defineProperty(te.prototype,"size",{configurable:!0,get:function(){return this.closure$items.size}}),te.prototype.get_za3lpa$=function(t){return this.closure$items.get_za3lpa$(t)},te.prototype.set_wxm5ur$=function(t,e){var n=this.closure$items.set_wxm5ur$(t,e);return this.closure$base.set_wxm5ur$(t,u(n).getElement()),n},te.prototype.add_wxm5ur$=function(t,e){this.closure$items.add_wxm5ur$(t,e),this.closure$base.add_wxm5ur$(t,u(e).getElement())},te.prototype.removeAt_za3lpa$=function(t){var e=this.closure$items.removeAt_za3lpa$(t);return this.closure$base.removeAt_za3lpa$(t),e},te.$metadata$={kind:f,interfaces:[K]},Jt.prototype.withElementChildren_9w66cp$=function(t){return new te(a(),t)},ee.prototype.set_11rb$=function(t){this.closure$e.innerHTML=t},ee.$metadata$={kind:f,interfaces:[z]},Jt.prototype.innerTextOf_2rdptt$=function(t){return new ee(t)},Object.defineProperty(ne.prototype,"propExpr",{configurable:!0,get:function(){return"checkbox("+this.closure$element+")"}}),ne.prototype.get=function(){return this.closure$element.checked},ne.prototype.set_11rb$=function(t){this.closure$element.checked=t},ie.prototype.call_11rb$=function(t){t.onEvent_11rb$(new Y(this.closure$value.get(),this.closure$currentValue))},ie.$metadata$={kind:f,interfaces:[W]},oe.prototype.doRemove=function(){window.clearInterval(this.closure$timer)},oe.$metadata$={kind:f,interfaces:[C]},re.prototype.doRemove=function(){this.closure$reg.remove(),this.this$.myListeners_0.isEmpty&&(u(this.this$.myTimerRegistration_0).remove(),this.this$.myTimerRegistration_0=null)},re.$metadata$={kind:f,interfaces:[C]},ne.prototype.addHandler_gxwwpc$=function(t){if(this.myListeners_0.isEmpty){var e=new V(this.closure$element.checked),n=window.setInterval((i=this.closure$element,o=e,r=this,function(){var t=i.checked;return t!==o.get()&&(r.myListeners_0.fire_kucmxw$(new ie(o,t)),o.set_11rb$(t)),G}));this.myTimerRegistration_0=new oe(n)}var i,o,r;return new re(this.myListeners_0.add_11rb$(t),this)},ne.$metadata$={kind:f,interfaces:[Z]},Jt.prototype.checkbox_36rv4q$=function(t){return new ne(t)},ae.prototype.set_11rb$=function(t){this.myValue_0!==t&&(t?J(this.closure$el,[this.closure$cls]):Q(this.closure$el,[this.closure$cls]),this.myValue_0=t)},ae.$metadata$={kind:f,interfaces:[z]},Jt.prototype.hasClass_t9mn69$=function(t,e){return new ae(t,e)},se.prototype.set_11rb$=function(t){this.closure$el.setAttribute(this.closure$attr,t)},se.$metadata$={kind:f,interfaces:[z]},Jt.prototype.attribute_t9mn69$=function(t,e){return new se(t,e)},le.prototype.set_11rb$=function(t){t?this.closure$el.setAttribute(this.closure$attr,this.closure$attrValue):this.closure$el.removeAttribute(this.closure$attr)},le.$metadata$={kind:f,interfaces:[z]},Jt.prototype.hasAttribute_1x5wil$=function(t,e,n){return new le(t,e,n)},ue.prototype.set_11rb$=function(t){t?Mt(this.closure$el.style):this.closure$el.style.display=zt().NONE},ue.$metadata$={kind:f,interfaces:[z]},Jt.prototype.visibilityOf_lt8gi4$=function(t){return new ue(t)},ce.prototype.get=function(){return new tt(this.closure$el.clientWidth,this.closure$el.clientHeight)},ce.$metadata$={kind:f,interfaces:[et]},Jt.prototype.dimension_2rdptt$=function(t){return this.timerBasedProperty_ndenup$(new ce(t),200)},pe.prototype.doAddListeners=function(){var t;this.myTimer_0=window.setInterval((t=this,function(){return t.update(),G}),this.closure$period)},pe.prototype.doRemoveListeners=function(){window.clearInterval(this.myTimer_0)},pe.prototype.doGet=function(){return this.closure$supplier.get()},pe.$metadata$={kind:f,interfaces:[nt]},Jt.prototype.timerBasedProperty_ndenup$=function(t,e){return new pe(e,t)},Jt.prototype.generateElement_b1cgbq$=function(t){if(e.isType(t,it))return this.createSVGElement_0("ellipse");if(e.isType(t,ot))return this.createSVGElement_0("circle");if(e.isType(t,rt))return this.createSVGElement_0("rect");if(e.isType(t,at))return this.createSVGElement_0("text");if(e.isType(t,st))return this.createSVGElement_0("path");if(e.isType(t,lt))return this.createSVGElement_0("line");if(e.isType(t,ut))return this.createSVGElement_0("svg");if(e.isType(t,ct))return this.createSVGElement_0("g");if(e.isType(t,pt))return this.createSVGElement_0("style");if(e.isType(t,ht))return this.createSVGElement_0("tspan");if(e.isType(t,_t))return this.createSVGElement_0("defs");if(e.isType(t,dt))return this.createSVGElement_0("clipPath");if(e.isType(t,U))return this.createSVGElement_0("image");throw h("Unsupported svg element "+l(e.getKClassFromExpression(t).simpleName))},Jt.prototype.generateSlimNode_qwqme8$=function(t){switch(t.elementName){case"g":return this.createSVGElement_0("g");case"line":return this.createSVGElement_0("line");case"circle":return this.createSVGElement_0("circle");case"rect":return this.createSVGElement_0("rect");case"path":return this.createSVGElement_0("path");default:throw h("Unsupported SvgSlimNode "+e.getKClassFromExpression(t))}},Jt.prototype.generateTextElement_tginx7$=function(t){return document.createTextNode("")},Jt.prototype.createSVGElement_0=function(t){var n;return e.isType(n=document.createElementNS(H.XmlNamespace.SVG_NAMESPACE_URI,t),SVGElement)?n:v()},Jt.$metadata$={kind:g,simpleName:"DomUtil",interfaces:[]};var he=null;function _e(){return null===he&&new Jt,he}var de=t.jetbrains||(t.jetbrains={}),fe=de.datalore||(de.datalore={}),me=fe.vis||(fe.vis={}),$e=me.svgMapper||(me.svgMapper={});$e.SvgNodeSubtreeGeneratingSynchronizer=ft,$e.TargetPeer=mt;var ye=$e.dom||($e.dom={});ye.DomTargetPeer=$t,ye.RGBEncoderDom=vt,ye.SvgDomPeer=bt,ye.SvgElementMapper=wt,ye.SvgNodeMapper=St,ye.SvgNodeMapperFactory=Tt,Object.defineProperty(Ot,"Companion",{get:It}),ye.SvgRootDocumentMapper=Ot,ye.SvgTextNodeMapper=At;var ge=ye.css||(ye.css={});Object.defineProperty(ge,"CssDisplay",{get:zt});var ve=ye.domExtensions||(ye.domExtensions={});ve.clearProperty_77nir7$=Dt,ve.clearDisplay_b8w5wr$=Mt,ve.on_wkfwsw$=Ft,ve.onEvent_jxnl6r$=qt,ve.setAlphaAt_h5k0c3$=Ht,ve.setBlueAt_h5k0c3$=Gt,ve.setGreenAt_h5k0c3$=Kt,ve.setRedAt_h5k0c3$=Vt,ve.setColorAt_z0tnfj$=Yt,ve.get_childCount_asww5s$=Wt,ve.insertFirst_fga9sf$=Xt,ve.insertAfter_5a54o3$=Zt;var be=ye.domUtil||(ye.domUtil={});return Object.defineProperty(be,"DomUtil",{get:_e}),t})?i.apply(e,o):i)||(t.exports=r)},322:function(t,e,n){var i,o,r;o=[e,n(421),n(486)],void 0===(r="function"==typeof(i=function(t,e,n){"use strict";var i=e.kotlin.collections.toList_7wnvza$,o=e.kotlin.text.StringBuilder_init,r=e.toString,a=e.kotlin.text.trimMargin_rjktp$,s=e.kotlin.text.Regex_init_61zpoe$,l=e.kotlin.text.removeSuffix_gsj5wt$,u=e.kotlin.text.toDoubleOrNull_pdl1vz$,c=e.equals,p=n.jetbrains.datalore.base.values.FontFace,h=n.jetbrains.datalore.base.values.Color,_=e.getCallableRef,d=e.Kind.OBJECT,f=e.Kind.CLASS,m=e.throwCCE,$=e.kotlin.text.trim_gw00vp$,y=e.kotlin.collections.LinkedHashMap_init_q3lmfv$,g=e.hashCode,v=e.ensureNotNull,b=e.kotlin.Enum,w=e.throwISE,x=e.Kind.INTERFACE,k=e.kotlin.collections.HashMap_init_q3lmfv$,C=e.kotlin.IllegalArgumentException_init,E=Object,S=n.jetbrains.datalore.base.observable.property.PropertyChangeEvent,T=n.jetbrains.datalore.base.observable.property.Property,O=n.jetbrains.datalore.base.observable.event.ListenerCaller,N=n.jetbrains.datalore.base.observable.event.Listeners,P=n.jetbrains.datalore.base.registration.Registration,I=n.jetbrains.datalore.base.listMap.ListMap,A=e.kotlin.collections.emptySet_287e2$,R=n.jetbrains.datalore.base.observable.property.ReadableProperty,j=(e.kotlin.Unit,e.kotlin.IllegalStateException_init_pdl1vj$),L=n.jetbrains.datalore.base.observable.collections.list.ObservableList,z=n.jetbrains.datalore.base.observable.children.ChildList,D=n.jetbrains.datalore.base.observable.children.SimpleComposite,M=e.kotlin.text.StringBuilder,B=n.jetbrains.datalore.base.observable.property.ValueProperty,F=e.toBoxedChar,U=e.kotlin.text.uppercaseChar_myv2d0$,q=e.getKClass,H=e.kotlin.IllegalArgumentException_init_pdl1vj$,G=e.unboxChar,K=e.kotlin.collections.ArrayList_init_ww73n8$,V=e.kotlin.collections.ArrayList_init_287e2$,Y=n.jetbrains.datalore.base.geometry.DoubleVector,W=e.kotlin.collections.ArrayList_init_mqih57$,X=Math,Z=e.kotlin.text.split_ip8yn$,J=e.kotlin.text.contains_li3zpu$,Q=n.jetbrains.datalore.base.observable.property.WritableProperty,tt=e.kotlin.UnsupportedOperationException_init_pdl1vj$,et=n.jetbrains.datalore.base.observable.collections.list.ObservableArrayList,nt=e.numberToInt,it=n.jetbrains.datalore.base.event.Event,ot=(e.numberToDouble,e.kotlin.text.toDouble_pdl1vz$,e.kotlin.collections.filterNotNull_m3lr2h$),rt=e.kotlin.collections.emptyList_287e2$,at=e.kotlin.collections.collectionSizeOrDefault_ba2ldo$;function st(t,e){pt(),this.textStyles_0=t,this.defaultFamily_0=e}function lt(){ct=this,this.UNDEFINED_FONT_FACE=p.Companion.BOLD_ITALIC,this.UNDEFINED_FONT_COLOR=new h(150,0,255),this.DEFAULT_FONT_SIZE_0=15,this.DEFAULT_FONT_MONOSPACED_0=!1,this.CSS_REGEX_0="\\.([\\w\\-]+)\\s+\\{([^\\{\\}]*)\\}"}function ut(t,n){var i,o,r,a;return null!=(r=null!=(o=null!=(i=s(n+":(.+);").find_905azu$(t))?i.groupValues:null)?o.get_za3lpa$(1):null)?$(e.isCharSequence(a=r)?a:m()).toString():null}Js.prototype=Object.create(D.prototype),Js.prototype.constructor=Js,ka.prototype=Object.create(Js.prototype),ka.prototype.constructor=ka,Yl.prototype=Object.create(ka.prototype),Yl.prototype.constructor=Yl,Ga.prototype=Object.create(Yl.prototype),Ga.prototype.constructor=Ga,$t.prototype=Object.create(Ga.prototype),$t.prototype.constructor=$t,fi.prototype=Object.create(b.prototype),fi.prototype.constructor=fi,bt.prototype=Object.create(Ga.prototype),bt.prototype.constructor=bt,vi.prototype=Object.create(b.prototype),vi.prototype.constructor=vi,xa.prototype=Object.create(Ga.prototype),xa.prototype.constructor=xa,Pa.prototype=Object.create(P.prototype),Pa.prototype.constructor=Pa,Ra.prototype=Object.create(Ga.prototype),Ra.prototype.constructor=Ra,Ba.prototype=Object.create(P.prototype),Ba.prototype.constructor=Ba,Fa.prototype=Object.create(P.prototype),Fa.prototype.constructor=Fa,Ha.prototype=Object.create(Ga.prototype),Ha.prototype.constructor=Ha,us.prototype=Object.create(b.prototype),us.prototype.constructor=us,bs.prototype=Object.create(b.prototype),bs.prototype.constructor=bs,Ts.prototype=Object.create(Ga.prototype),Ts.prototype.constructor=Ts,As.prototype=Object.create(Ts.prototype),As.prototype.constructor=As,zs.prototype=Object.create(Ga.prototype),zs.prototype.constructor=zs,Qs.prototype=Object.create(z.prototype),Qs.prototype.constructor=Qs,ol.prototype=Object.create(B.prototype),ol.prototype.constructor=ol,al.prototype=Object.create(b.prototype),al.prototype.constructor=al,Ol.prototype=Object.create(b.prototype),Ol.prototype.constructor=Ol,Rl.prototype=Object.create(Ga.prototype),Rl.prototype.constructor=Rl,Ml.prototype=Object.create(Ga.prototype),Ml.prototype.constructor=Ml,Jl.prototype=Object.create(ka.prototype),Jl.prototype.constructor=Jl,Ql.prototype=Object.create(Yl.prototype),Ql.prototype.constructor=Ql,au.prototype=Object.create(ka.prototype),au.prototype.constructor=au,fu.prototype=Object.create(Ga.prototype),fu.prototype.constructor=fu,bu.prototype=Object.create(et.prototype),bu.prototype.constructor=bu,gu.prototype=Object.create(Js.prototype),gu.prototype.constructor=gu,Ku.prototype=Object.create(it.prototype),Ku.prototype.constructor=Ku,Yu.prototype=Object.create(b.prototype),Yu.prototype.constructor=Yu,nc.prototype=Object.create(Js.prototype),nc.prototype.constructor=nc,ic.prototype=Object.create(lc.prototype),ic.prototype.constructor=ic,ac.prototype=Object.create(nc.prototype),ac.prototype.constructor=ac,rc.prototype=Object.create(ic.prototype),rc.prototype.constructor=rc,st.prototype.getClasses=function(){return i(this.textStyles_0.keys)},st.prototype.getTextStyle_61zpoe$=function(t){var e;return null!=(e=this.textStyles_0.get_11rb$(t))?e:new ht(this.defaultFamily_0,pt().UNDEFINED_FONT_FACE,pt().DEFAULT_FONT_SIZE_0,pt().UNDEFINED_FONT_COLOR)},st.prototype.toCSS_jyasbz$=function(t,e){var n,i=o();return i.append_pdl1vj$(a("\n |"+(null!=(n=null!=e?"#"+r(e)+" ":null)?n:"")+"."+t+" {\n |"+pt().toCSS_0(this.getTextStyle_61zpoe$(t))+"\n |}\n |")),i.toString()},st.prototype.toCSS=function(){var t,e=o();for(t=this.getClasses().iterator();t.hasNext();){var n=t.next();e.append_pdl1vj$(this.toCSS_jyasbz$(n,null))}return e.toString()},lt.prototype.toCSS_t8jpc2$=function(t){return"font-weight: "+(t.bold?"bold":"normal")+";\n font-style: "+(t.italic?"italic":"normal")+";"},lt.prototype.toCSS_0=function(t){return a("\n | fill: "+t.color.toHexColor()+";\n | font-family: "+t.family+";\n | font-size: "+t.size+"px;\n | "+this.toCSS_t8jpc2$(t.face)+" \n ")},lt.prototype.fromCSS_do2bxa$=function(t,e,n){var i,o=ut,r=y();for(i=s(this.CSS_REGEX_0).findAll_905azu$(t).iterator();i.hasNext();){var a,d,f,m,$,g=i.next().destructured,v=g.match.groupValues.get_za3lpa$(1),b=g.match.groupValues.get_za3lpa$(2),w=null!=(a=o(b,"font-family"))?a:e,x=o(b,"font-weight"),k=o(b,"font-style"),C=null!=(m=null!=(f=null!=(d=o(b,"font-size"))?l(d,"px"):null)?u(f):null)?m:n,E=o(b,"fill"),S=new ht(w,new p(c(x,"bold"),c(k,"italic")),C,null!=($=null!=E?_("parseHex",function(t,e){return t.parseHex_61zpoe$(e)}.bind(null,h))(E):null)?$:h.Companion.BLACK);r.put_xwzc9p$(v,S)}return new st(r,e)},lt.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var ct=null;function pt(){return null===ct&&new lt,ct}function ht(t,e,n,i){this.family=t,this.face=e,this.size=n,this.color=i}function _t(t,e){mt(),this.name=t,this.namespaceUri=e}function dt(){ft=this}st.$metadata$={kind:f,simpleName:"StyleSheet",interfaces:[]},ht.$metadata$={kind:f,simpleName:"TextStyle",interfaces:[]},ht.prototype.component1=function(){return this.family},ht.prototype.component2=function(){return this.face},ht.prototype.component3=function(){return this.size},ht.prototype.component4=function(){return this.color},ht.prototype.copy_i7gmcr$=function(t,e,n,i){return new ht(void 0===t?this.family:t,void 0===e?this.face:e,void 0===n?this.size:n,void 0===i?this.color:i)},ht.prototype.toString=function(){return"TextStyle(family="+e.toString(this.family)+", face="+e.toString(this.face)+", size="+e.toString(this.size)+", color="+e.toString(this.color)+")"},ht.prototype.hashCode=function(){var t=0;return 31*(t=31*(t=31*(t=31*t+e.hashCode(this.family)|0)+e.hashCode(this.face)|0)+e.hashCode(this.size)|0)+e.hashCode(this.color)|0},ht.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.family,t.family)&&e.equals(this.face,t.face)&&e.equals(this.size,t.size)&&e.equals(this.color,t.color)},dt.prototype.createSpec_ytbaoo$=function(t){return new _t(t,null)},dt.prototype.createSpecNS_wswq18$=function(t,e,n){return new _t(e+":"+t,n)},dt.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var ft=null;function mt(){return null===ft&&new dt,ft}function $t(){vt(),Ga.call(this),this.elementName_4ww0r9$_0="circle"}function yt(){gt=this,this.CX=mt().createSpec_ytbaoo$("cx"),this.CY=mt().createSpec_ytbaoo$("cy"),this.R=mt().createSpec_ytbaoo$("r")}_t.prototype.hasNamespace=function(){return null!=this.namespaceUri},_t.prototype.toString=function(){return this.name},_t.prototype.hashCode=function(){return g(this.name)},_t.prototype.equals=function(t){var n;return this===t||!(null==t||null==(n=e.getKClassFromExpression(this))||!n.equals(e.getKClassFromExpression(t)))&&(e.isType(t,_t)||m(),!!c(this.name,t.name))},_t.$metadata$={kind:f,simpleName:"SvgAttributeSpec",interfaces:[]},yt.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var gt=null;function vt(){return null===gt&&new yt,gt}function bt(){di(),Ga.call(this)}function wt(){_i=this,this.CLIP_PATH_UNITS_0=mt().createSpec_ytbaoo$("clipPathUnits")}Object.defineProperty($t.prototype,"elementName",{configurable:!0,get:function(){return this.elementName_4ww0r9$_0}}),Object.defineProperty($t.prototype,"bBox",{configurable:!0,get:function(){return v(this.container().getPeer()).getBBox_7snaev$(this)}}),$t.prototype.cx=function(){return this.getAttribute_mumjwj$(vt().CX)},$t.prototype.cy=function(){return this.getAttribute_mumjwj$(vt().CY)},$t.prototype.r=function(){return this.getAttribute_mumjwj$(vt().R)},$t.prototype.transform=function(){return this.getAttribute_mumjwj$(Iu().TRANSFORM)},$t.prototype.fill=function(){return this.getAttribute_mumjwj$(Vl().FILL)},$t.prototype.fillColor=function(){return Lu().colorAttributeTransform_dc5zq8$(this.fill(),this.fillOpacity())},$t.prototype.fillOpacity=function(){return this.getAttribute_mumjwj$(Vl().FILL_OPACITY)},$t.prototype.stroke=function(){return this.getAttribute_mumjwj$(Vl().STROKE)},$t.prototype.strokeColor=function(){return Lu().colorAttributeTransform_dc5zq8$(this.stroke(),this.strokeOpacity())},$t.prototype.strokeOpacity=function(){return this.getAttribute_mumjwj$(Vl().STROKE_OPACITY)},$t.prototype.strokeWidth=function(){return this.getAttribute_mumjwj$(Vl().STROKE_WIDTH)},$t.prototype.pointToTransformedCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).invertTransform_12yub8$(this,t)},$t.prototype.pointToAbsoluteCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).applyTransform_12yub8$(this,t)},$t.$metadata$={kind:f,simpleName:"SvgCircleElement",interfaces:[Hl,Ou,Ga]},wt.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var xt,kt,Ct,Et,St,Tt,Ot,Nt,Pt,It,At,Rt,jt,Lt,zt,Dt,Mt,Bt,Ft,Ut,qt,Ht,Gt,Kt,Vt,Yt,Wt,Xt,Zt,Jt,Qt,te,ee,ne,ie,oe,re,ae,se,le,ue,ce,pe,he,_e,de,fe,me,$e,ye,ge,ve,be,we,xe,ke,Ce,Ee,Se,Te,Oe,Ne,Pe,Ie,Ae,Re,je,Le,ze,De,Me,Be,Fe,Ue,qe,He,Ge,Ke,Ve,Ye,We,Xe,Ze,Je,Qe,tn,en,nn,on,rn,an,sn,ln,un,cn,pn,hn,_n,dn,fn,mn,$n,yn,gn,vn,bn,wn,xn,kn,Cn,En,Sn,Tn,On,Nn,Pn,In,An,Rn,jn,Ln,zn,Dn,Mn,Bn,Fn,Un,qn,Hn,Gn,Kn,Vn,Yn,Wn,Xn,Zn,Jn,Qn,ti,ei,ni,ii,oi,ri,ai,si,li,ui,ci,pi,hi,_i=null;function di(){return null===_i&&new wt,_i}function fi(t,e,n){b.call(this),this.myAttributeString_ss0dpy$_0=n,this.name$=t,this.ordinal$=e}function mi(){mi=function(){},xt=new fi("USER_SPACE_ON_USE",0,"userSpaceOnUse"),kt=new fi("OBJECT_BOUNDING_BOX",1,"objectBoundingBox")}function $i(){return mi(),xt}function yi(){return mi(),kt}function gi(){}function vi(t,e,n){b.call(this),this.literal_7kwssz$_0=n,this.name$=t,this.ordinal$=e}function bi(){bi=function(){},Ct=new vi("ALICE_BLUE",0,"aliceblue"),Et=new vi("ANTIQUE_WHITE",1,"antiquewhite"),St=new vi("AQUA",2,"aqua"),Tt=new vi("AQUAMARINE",3,"aquamarine"),Ot=new vi("AZURE",4,"azure"),Nt=new vi("BEIGE",5,"beige"),Pt=new vi("BISQUE",6,"bisque"),It=new vi("BLACK",7,"black"),At=new vi("BLANCHED_ALMOND",8,"blanchedalmond"),Rt=new vi("BLUE",9,"blue"),jt=new vi("BLUE_VIOLET",10,"blueviolet"),Lt=new vi("BROWN",11,"brown"),zt=new vi("BURLY_WOOD",12,"burlywood"),Dt=new vi("CADET_BLUE",13,"cadetblue"),Mt=new vi("CHARTREUSE",14,"chartreuse"),Bt=new vi("CHOCOLATE",15,"chocolate"),Ft=new vi("CORAL",16,"coral"),Ut=new vi("CORNFLOWER_BLUE",17,"cornflowerblue"),qt=new vi("CORNSILK",18,"cornsilk"),Ht=new vi("CRIMSON",19,"crimson"),Gt=new vi("CYAN",20,"cyan"),Kt=new vi("DARK_BLUE",21,"darkblue"),Vt=new vi("DARK_CYAN",22,"darkcyan"),Yt=new vi("DARK_GOLDEN_ROD",23,"darkgoldenrod"),Wt=new vi("DARK_GRAY",24,"darkgray"),Xt=new vi("DARK_GREEN",25,"darkgreen"),Zt=new vi("DARK_GREY",26,"darkgrey"),Jt=new vi("DARK_KHAKI",27,"darkkhaki"),Qt=new vi("DARK_MAGENTA",28,"darkmagenta"),te=new vi("DARK_OLIVE_GREEN",29,"darkolivegreen"),ee=new vi("DARK_ORANGE",30,"darkorange"),ne=new vi("DARK_ORCHID",31,"darkorchid"),ie=new vi("DARK_RED",32,"darkred"),oe=new vi("DARK_SALMON",33,"darksalmon"),re=new vi("DARK_SEA_GREEN",34,"darkseagreen"),ae=new vi("DARK_SLATE_BLUE",35,"darkslateblue"),se=new vi("DARK_SLATE_GRAY",36,"darkslategray"),le=new vi("DARK_SLATE_GREY",37,"darkslategrey"),ue=new vi("DARK_TURQUOISE",38,"darkturquoise"),ce=new vi("DARK_VIOLET",39,"darkviolet"),pe=new vi("DEEP_PINK",40,"deeppink"),he=new vi("DEEP_SKY_BLUE",41,"deepskyblue"),_e=new vi("DIM_GRAY",42,"dimgray"),de=new vi("DIM_GREY",43,"dimgrey"),fe=new vi("DODGER_BLUE",44,"dodgerblue"),me=new vi("FIRE_BRICK",45,"firebrick"),$e=new vi("FLORAL_WHITE",46,"floralwhite"),ye=new vi("FOREST_GREEN",47,"forestgreen"),ge=new vi("FUCHSIA",48,"fuchsia"),ve=new vi("GAINSBORO",49,"gainsboro"),be=new vi("GHOST_WHITE",50,"ghostwhite"),we=new vi("GOLD",51,"gold"),xe=new vi("GOLDEN_ROD",52,"goldenrod"),ke=new vi("GRAY",53,"gray"),Ce=new vi("GREY",54,"grey"),Ee=new vi("GREEN",55,"green"),Se=new vi("GREEN_YELLOW",56,"greenyellow"),Te=new vi("HONEY_DEW",57,"honeydew"),Oe=new vi("HOT_PINK",58,"hotpink"),Ne=new vi("INDIAN_RED",59,"indianred"),Pe=new vi("INDIGO",60,"indigo"),Ie=new vi("IVORY",61,"ivory"),Ae=new vi("KHAKI",62,"khaki"),Re=new vi("LAVENDER",63,"lavender"),je=new vi("LAVENDER_BLUSH",64,"lavenderblush"),Le=new vi("LAWN_GREEN",65,"lawngreen"),ze=new vi("LEMON_CHIFFON",66,"lemonchiffon"),De=new vi("LIGHT_BLUE",67,"lightblue"),Me=new vi("LIGHT_CORAL",68,"lightcoral"),Be=new vi("LIGHT_CYAN",69,"lightcyan"),Fe=new vi("LIGHT_GOLDEN_ROD_YELLOW",70,"lightgoldenrodyellow"),Ue=new vi("LIGHT_GRAY",71,"lightgray"),qe=new vi("LIGHT_GREEN",72,"lightgreen"),He=new vi("LIGHT_GREY",73,"lightgrey"),Ge=new vi("LIGHT_PINK",74,"lightpink"),Ke=new vi("LIGHT_SALMON",75,"lightsalmon"),Ve=new vi("LIGHT_SEA_GREEN",76,"lightseagreen"),Ye=new vi("LIGHT_SKY_BLUE",77,"lightskyblue"),We=new vi("LIGHT_SLATE_GRAY",78,"lightslategray"),Xe=new vi("LIGHT_SLATE_GREY",79,"lightslategrey"),Ze=new vi("LIGHT_STEEL_BLUE",80,"lightsteelblue"),Je=new vi("LIGHT_YELLOW",81,"lightyellow"),Qe=new vi("LIME",82,"lime"),tn=new vi("LIME_GREEN",83,"limegreen"),en=new vi("LINEN",84,"linen"),nn=new vi("MAGENTA",85,"magenta"),on=new vi("MAROON",86,"maroon"),rn=new vi("MEDIUM_AQUA_MARINE",87,"mediumaquamarine"),an=new vi("MEDIUM_BLUE",88,"mediumblue"),sn=new vi("MEDIUM_ORCHID",89,"mediumorchid"),ln=new vi("MEDIUM_PURPLE",90,"mediumpurple"),un=new vi("MEDIUM_SEAGREEN",91,"mediumseagreen"),cn=new vi("MEDIUM_SLATE_BLUE",92,"mediumslateblue"),pn=new vi("MEDIUM_SPRING_GREEN",93,"mediumspringgreen"),hn=new vi("MEDIUM_TURQUOISE",94,"mediumturquoise"),_n=new vi("MEDIUM_VIOLET_RED",95,"mediumvioletred"),dn=new vi("MIDNIGHT_BLUE",96,"midnightblue"),fn=new vi("MINT_CREAM",97,"mintcream"),mn=new vi("MISTY_ROSE",98,"mistyrose"),$n=new vi("MOCCASIN",99,"moccasin"),yn=new vi("NAVAJO_WHITE",100,"navajowhite"),gn=new vi("NAVY",101,"navy"),vn=new vi("OLD_LACE",102,"oldlace"),bn=new vi("OLIVE",103,"olive"),wn=new vi("OLIVE_DRAB",104,"olivedrab"),xn=new vi("ORANGE",105,"orange"),kn=new vi("ORANGE_RED",106,"orangered"),Cn=new vi("ORCHID",107,"orchid"),En=new vi("PALE_GOLDEN_ROD",108,"palegoldenrod"),Sn=new vi("PALE_GREEN",109,"palegreen"),Tn=new vi("PALE_TURQUOISE",110,"paleturquoise"),On=new vi("PALE_VIOLET_RED",111,"palevioletred"),Nn=new vi("PAPAYA_WHIP",112,"papayawhip"),Pn=new vi("PEACH_PUFF",113,"peachpuff"),In=new vi("PERU",114,"peru"),An=new vi("PINK",115,"pink"),Rn=new vi("PLUM",116,"plum"),jn=new vi("POWDER_BLUE",117,"powderblue"),Ln=new vi("PURPLE",118,"purple"),zn=new vi("RED",119,"red"),Dn=new vi("ROSY_BROWN",120,"rosybrown"),Mn=new vi("ROYAL_BLUE",121,"royalblue"),Bn=new vi("SADDLE_BROWN",122,"saddlebrown"),Fn=new vi("SALMON",123,"salmon"),Un=new vi("SANDY_BROWN",124,"sandybrown"),qn=new vi("SEA_GREEN",125,"seagreen"),Hn=new vi("SEASHELL",126,"seashell"),Gn=new vi("SIENNA",127,"sienna"),Kn=new vi("SILVER",128,"silver"),Vn=new vi("SKY_BLUE",129,"skyblue"),Yn=new vi("SLATE_BLUE",130,"slateblue"),Wn=new vi("SLATE_GRAY",131,"slategray"),Xn=new vi("SLATE_GREY",132,"slategrey"),Zn=new vi("SNOW",133,"snow"),Jn=new vi("SPRING_GREEN",134,"springgreen"),Qn=new vi("STEEL_BLUE",135,"steelblue"),ti=new vi("TAN",136,"tan"),ei=new vi("TEAL",137,"teal"),ni=new vi("THISTLE",138,"thistle"),ii=new vi("TOMATO",139,"tomato"),oi=new vi("TURQUOISE",140,"turquoise"),ri=new vi("VIOLET",141,"violet"),ai=new vi("WHEAT",142,"wheat"),si=new vi("WHITE",143,"white"),li=new vi("WHITE_SMOKE",144,"whitesmoke"),ui=new vi("YELLOW",145,"yellow"),ci=new vi("YELLOW_GREEN",146,"yellowgreen"),pi=new vi("NONE",147,"none"),hi=new vi("CURRENT_COLOR",148,"currentColor"),_a()}function wi(){return bi(),Ct}function xi(){return bi(),Et}function ki(){return bi(),St}function Ci(){return bi(),Tt}function Ei(){return bi(),Ot}function Si(){return bi(),Nt}function Ti(){return bi(),Pt}function Oi(){return bi(),It}function Ni(){return bi(),At}function Pi(){return bi(),Rt}function Ii(){return bi(),jt}function Ai(){return bi(),Lt}function Ri(){return bi(),zt}function ji(){return bi(),Dt}function Li(){return bi(),Mt}function zi(){return bi(),Bt}function Di(){return bi(),Ft}function Mi(){return bi(),Ut}function Bi(){return bi(),qt}function Fi(){return bi(),Ht}function Ui(){return bi(),Gt}function qi(){return bi(),Kt}function Hi(){return bi(),Vt}function Gi(){return bi(),Yt}function Ki(){return bi(),Wt}function Vi(){return bi(),Xt}function Yi(){return bi(),Zt}function Wi(){return bi(),Jt}function Xi(){return bi(),Qt}function Zi(){return bi(),te}function Ji(){return bi(),ee}function Qi(){return bi(),ne}function to(){return bi(),ie}function eo(){return bi(),oe}function no(){return bi(),re}function io(){return bi(),ae}function oo(){return bi(),se}function ro(){return bi(),le}function ao(){return bi(),ue}function so(){return bi(),ce}function lo(){return bi(),pe}function uo(){return bi(),he}function co(){return bi(),_e}function po(){return bi(),de}function ho(){return bi(),fe}function _o(){return bi(),me}function fo(){return bi(),$e}function mo(){return bi(),ye}function $o(){return bi(),ge}function yo(){return bi(),ve}function go(){return bi(),be}function vo(){return bi(),we}function bo(){return bi(),xe}function wo(){return bi(),ke}function xo(){return bi(),Ce}function ko(){return bi(),Ee}function Co(){return bi(),Se}function Eo(){return bi(),Te}function So(){return bi(),Oe}function To(){return bi(),Ne}function Oo(){return bi(),Pe}function No(){return bi(),Ie}function Po(){return bi(),Ae}function Io(){return bi(),Re}function Ao(){return bi(),je}function Ro(){return bi(),Le}function jo(){return bi(),ze}function Lo(){return bi(),De}function zo(){return bi(),Me}function Do(){return bi(),Be}function Mo(){return bi(),Fe}function Bo(){return bi(),Ue}function Fo(){return bi(),qe}function Uo(){return bi(),He}function qo(){return bi(),Ge}function Ho(){return bi(),Ke}function Go(){return bi(),Ve}function Ko(){return bi(),Ye}function Vo(){return bi(),We}function Yo(){return bi(),Xe}function Wo(){return bi(),Ze}function Xo(){return bi(),Je}function Zo(){return bi(),Qe}function Jo(){return bi(),tn}function Qo(){return bi(),en}function tr(){return bi(),nn}function er(){return bi(),on}function nr(){return bi(),rn}function ir(){return bi(),an}function or(){return bi(),sn}function rr(){return bi(),ln}function ar(){return bi(),un}function sr(){return bi(),cn}function lr(){return bi(),pn}function ur(){return bi(),hn}function cr(){return bi(),_n}function pr(){return bi(),dn}function hr(){return bi(),fn}function _r(){return bi(),mn}function dr(){return bi(),$n}function fr(){return bi(),yn}function mr(){return bi(),gn}function $r(){return bi(),vn}function yr(){return bi(),bn}function gr(){return bi(),wn}function vr(){return bi(),xn}function br(){return bi(),kn}function wr(){return bi(),Cn}function xr(){return bi(),En}function kr(){return bi(),Sn}function Cr(){return bi(),Tn}function Er(){return bi(),On}function Sr(){return bi(),Nn}function Tr(){return bi(),Pn}function Or(){return bi(),In}function Nr(){return bi(),An}function Pr(){return bi(),Rn}function Ir(){return bi(),jn}function Ar(){return bi(),Ln}function Rr(){return bi(),zn}function jr(){return bi(),Dn}function Lr(){return bi(),Mn}function zr(){return bi(),Bn}function Dr(){return bi(),Fn}function Mr(){return bi(),Un}function Br(){return bi(),qn}function Fr(){return bi(),Hn}function Ur(){return bi(),Gn}function qr(){return bi(),Kn}function Hr(){return bi(),Vn}function Gr(){return bi(),Yn}function Kr(){return bi(),Wn}function Vr(){return bi(),Xn}function Yr(){return bi(),Zn}function Wr(){return bi(),Jn}function Xr(){return bi(),Qn}function Zr(){return bi(),ti}function Jr(){return bi(),ei}function Qr(){return bi(),ni}function ta(){return bi(),ii}function ea(){return bi(),oi}function na(){return bi(),ri}function ia(){return bi(),ai}function oa(){return bi(),si}function ra(){return bi(),li}function aa(){return bi(),ui}function sa(){return bi(),ci}function la(){return bi(),pi}function ua(){return bi(),hi}function ca(){ha=this,this.svgColorList_0=this.createSvgColorList_0()}function pa(t,e,n){this.myR_0=t,this.myG_0=e,this.myB_0=n}Object.defineProperty(bt.prototype,"elementName",{configurable:!0,get:function(){return"clipPath"}}),Object.defineProperty(bt.prototype,"bBox",{configurable:!0,get:function(){return v(this.container().getPeer()).getBBox_7snaev$(this)}}),bt.prototype.clipPathUnits=function(){return this.getAttribute_mumjwj$(di().CLIP_PATH_UNITS_0)},bt.prototype.transform=function(){return this.getAttribute_mumjwj$(Iu().TRANSFORM)},bt.prototype.pointToTransformedCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).invertTransform_12yub8$(this,t)},bt.prototype.pointToAbsoluteCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).applyTransform_12yub8$(this,t)},fi.prototype.toString=function(){return this.myAttributeString_ss0dpy$_0},fi.$metadata$={kind:f,simpleName:"ClipPathUnits",interfaces:[b]},fi.values=function(){return[$i(),yi()]},fi.valueOf_61zpoe$=function(t){switch(t){case"USER_SPACE_ON_USE":return $i();case"OBJECT_BOUNDING_BOX":return yi();default:w("No enum constant jetbrains.datalore.vis.svg.SvgClipPathElement.ClipPathUnits."+t)}},bt.$metadata$={kind:f,simpleName:"SvgClipPathElement",interfaces:[Ou,Ga]},gi.$metadata$={kind:x,simpleName:"SvgColor",interfaces:[]},vi.prototype.toString=function(){return this.literal_7kwssz$_0},ca.prototype.createSvgColorList_0=function(){var t,e=k(),n=da();for(t=0;t!==n.length;++t){var i=n[t],o=i.toString().toLowerCase();e.put_xwzc9p$(o,i)}return e},ca.prototype.isColorName_61zpoe$=function(t){return this.svgColorList_0.containsKey_11rb$(t.toLowerCase())},ca.prototype.forName_61zpoe$=function(t){var e;if(null==(e=this.svgColorList_0.get_11rb$(t.toLowerCase())))throw C();return e},ca.prototype.create_qt1dr2$=function(t,e,n){return new pa(t,e,n)},ca.prototype.create_2160e9$=function(t){return null==t?la():new pa(t.red,t.green,t.blue)},pa.prototype.toString=function(){return"rgb("+this.myR_0+","+this.myG_0+","+this.myB_0+")"},pa.$metadata$={kind:f,simpleName:"SvgColorRgb",interfaces:[gi]},pa.prototype.component1_0=function(){return this.myR_0},pa.prototype.component2_0=function(){return this.myG_0},pa.prototype.component3_0=function(){return this.myB_0},pa.prototype.copy_qt1dr2$=function(t,e,n){return new pa(void 0===t?this.myR_0:t,void 0===e?this.myG_0:e,void 0===n?this.myB_0:n)},pa.prototype.hashCode=function(){var t=0;return 31*(t=31*(t=31*t+e.hashCode(this.myR_0)|0)+e.hashCode(this.myG_0)|0)+e.hashCode(this.myB_0)|0},pa.prototype.equals=function(t){return this===t||null!==t&&"object"==typeof t&&Object.getPrototypeOf(this)===Object.getPrototypeOf(t)&&e.equals(this.myR_0,t.myR_0)&&e.equals(this.myG_0,t.myG_0)&&e.equals(this.myB_0,t.myB_0)},ca.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var ha=null;function _a(){return bi(),null===ha&&new ca,ha}function da(){return[wi(),xi(),ki(),Ci(),Ei(),Si(),Ti(),Oi(),Ni(),Pi(),Ii(),Ai(),Ri(),ji(),Li(),zi(),Di(),Mi(),Bi(),Fi(),Ui(),qi(),Hi(),Gi(),Ki(),Vi(),Yi(),Wi(),Xi(),Zi(),Ji(),Qi(),to(),eo(),no(),io(),oo(),ro(),ao(),so(),lo(),uo(),co(),po(),ho(),_o(),fo(),mo(),$o(),yo(),go(),vo(),bo(),wo(),xo(),ko(),Co(),Eo(),So(),To(),Oo(),No(),Po(),Io(),Ao(),Ro(),jo(),Lo(),zo(),Do(),Mo(),Bo(),Fo(),Uo(),qo(),Ho(),Go(),Ko(),Vo(),Yo(),Wo(),Xo(),Zo(),Jo(),Qo(),tr(),er(),nr(),ir(),or(),rr(),ar(),sr(),lr(),ur(),cr(),pr(),hr(),_r(),dr(),fr(),mr(),$r(),yr(),gr(),vr(),br(),wr(),xr(),kr(),Cr(),Er(),Sr(),Tr(),Or(),Nr(),Pr(),Ir(),Ar(),Rr(),jr(),Lr(),zr(),Dr(),Mr(),Br(),Fr(),Ur(),qr(),Hr(),Gr(),Kr(),Vr(),Yr(),Wr(),Xr(),Zr(),Jr(),Qr(),ta(),ea(),na(),ia(),oa(),ra(),aa(),sa(),la(),ua()]}function fa(){ma=this,this.WIDTH="width",this.HEIGHT="height",this.SVG_TEXT_ANCHOR_ATTRIBUTE="text-anchor",this.SVG_STROKE_DASHARRAY_ATTRIBUTE="stroke-dasharray",this.SVG_STYLE_ATTRIBUTE="style",this.SVG_TEXT_DY_ATTRIBUTE="dy",this.SVG_TEXT_ANCHOR_START="start",this.SVG_TEXT_ANCHOR_MIDDLE="middle",this.SVG_TEXT_ANCHOR_END="end",this.SVG_TEXT_DY_TOP="0.7em",this.SVG_TEXT_DY_CENTER="0.35em"}vi.$metadata$={kind:f,simpleName:"SvgColors",interfaces:[gi,b]},vi.values=da,vi.valueOf_61zpoe$=function(t){switch(t){case"ALICE_BLUE":return wi();case"ANTIQUE_WHITE":return xi();case"AQUA":return ki();case"AQUAMARINE":return Ci();case"AZURE":return Ei();case"BEIGE":return Si();case"BISQUE":return Ti();case"BLACK":return Oi();case"BLANCHED_ALMOND":return Ni();case"BLUE":return Pi();case"BLUE_VIOLET":return Ii();case"BROWN":return Ai();case"BURLY_WOOD":return Ri();case"CADET_BLUE":return ji();case"CHARTREUSE":return Li();case"CHOCOLATE":return zi();case"CORAL":return Di();case"CORNFLOWER_BLUE":return Mi();case"CORNSILK":return Bi();case"CRIMSON":return Fi();case"CYAN":return Ui();case"DARK_BLUE":return qi();case"DARK_CYAN":return Hi();case"DARK_GOLDEN_ROD":return Gi();case"DARK_GRAY":return Ki();case"DARK_GREEN":return Vi();case"DARK_GREY":return Yi();case"DARK_KHAKI":return Wi();case"DARK_MAGENTA":return Xi();case"DARK_OLIVE_GREEN":return Zi();case"DARK_ORANGE":return Ji();case"DARK_ORCHID":return Qi();case"DARK_RED":return to();case"DARK_SALMON":return eo();case"DARK_SEA_GREEN":return no();case"DARK_SLATE_BLUE":return io();case"DARK_SLATE_GRAY":return oo();case"DARK_SLATE_GREY":return ro();case"DARK_TURQUOISE":return ao();case"DARK_VIOLET":return so();case"DEEP_PINK":return lo();case"DEEP_SKY_BLUE":return uo();case"DIM_GRAY":return co();case"DIM_GREY":return po();case"DODGER_BLUE":return ho();case"FIRE_BRICK":return _o();case"FLORAL_WHITE":return fo();case"FOREST_GREEN":return mo();case"FUCHSIA":return $o();case"GAINSBORO":return yo();case"GHOST_WHITE":return go();case"GOLD":return vo();case"GOLDEN_ROD":return bo();case"GRAY":return wo();case"GREY":return xo();case"GREEN":return ko();case"GREEN_YELLOW":return Co();case"HONEY_DEW":return Eo();case"HOT_PINK":return So();case"INDIAN_RED":return To();case"INDIGO":return Oo();case"IVORY":return No();case"KHAKI":return Po();case"LAVENDER":return Io();case"LAVENDER_BLUSH":return Ao();case"LAWN_GREEN":return Ro();case"LEMON_CHIFFON":return jo();case"LIGHT_BLUE":return Lo();case"LIGHT_CORAL":return zo();case"LIGHT_CYAN":return Do();case"LIGHT_GOLDEN_ROD_YELLOW":return Mo();case"LIGHT_GRAY":return Bo();case"LIGHT_GREEN":return Fo();case"LIGHT_GREY":return Uo();case"LIGHT_PINK":return qo();case"LIGHT_SALMON":return Ho();case"LIGHT_SEA_GREEN":return Go();case"LIGHT_SKY_BLUE":return Ko();case"LIGHT_SLATE_GRAY":return Vo();case"LIGHT_SLATE_GREY":return Yo();case"LIGHT_STEEL_BLUE":return Wo();case"LIGHT_YELLOW":return Xo();case"LIME":return Zo();case"LIME_GREEN":return Jo();case"LINEN":return Qo();case"MAGENTA":return tr();case"MAROON":return er();case"MEDIUM_AQUA_MARINE":return nr();case"MEDIUM_BLUE":return ir();case"MEDIUM_ORCHID":return or();case"MEDIUM_PURPLE":return rr();case"MEDIUM_SEAGREEN":return ar();case"MEDIUM_SLATE_BLUE":return sr();case"MEDIUM_SPRING_GREEN":return lr();case"MEDIUM_TURQUOISE":return ur();case"MEDIUM_VIOLET_RED":return cr();case"MIDNIGHT_BLUE":return pr();case"MINT_CREAM":return hr();case"MISTY_ROSE":return _r();case"MOCCASIN":return dr();case"NAVAJO_WHITE":return fr();case"NAVY":return mr();case"OLD_LACE":return $r();case"OLIVE":return yr();case"OLIVE_DRAB":return gr();case"ORANGE":return vr();case"ORANGE_RED":return br();case"ORCHID":return wr();case"PALE_GOLDEN_ROD":return xr();case"PALE_GREEN":return kr();case"PALE_TURQUOISE":return Cr();case"PALE_VIOLET_RED":return Er();case"PAPAYA_WHIP":return Sr();case"PEACH_PUFF":return Tr();case"PERU":return Or();case"PINK":return Nr();case"PLUM":return Pr();case"POWDER_BLUE":return Ir();case"PURPLE":return Ar();case"RED":return Rr();case"ROSY_BROWN":return jr();case"ROYAL_BLUE":return Lr();case"SADDLE_BROWN":return zr();case"SALMON":return Dr();case"SANDY_BROWN":return Mr();case"SEA_GREEN":return Br();case"SEASHELL":return Fr();case"SIENNA":return Ur();case"SILVER":return qr();case"SKY_BLUE":return Hr();case"SLATE_BLUE":return Gr();case"SLATE_GRAY":return Kr();case"SLATE_GREY":return Vr();case"SNOW":return Yr();case"SPRING_GREEN":return Wr();case"STEEL_BLUE":return Xr();case"TAN":return Zr();case"TEAL":return Jr();case"THISTLE":return Qr();case"TOMATO":return ta();case"TURQUOISE":return ea();case"VIOLET":return na();case"WHEAT":return ia();case"WHITE":return oa();case"WHITE_SMOKE":return ra();case"YELLOW":return aa();case"YELLOW_GREEN":return sa();case"NONE":return la();case"CURRENT_COLOR":return ua();default:w("No enum constant jetbrains.datalore.vis.svg.SvgColors."+t)}},fa.$metadata$={kind:d,simpleName:"SvgConstants",interfaces:[]};var ma=null;function $a(){return null===ma&&new fa,ma}function ya(){ba()}function ga(){va=this,this.OPACITY=mt().createSpec_ytbaoo$("opacity"),this.CLIP_PATH=mt().createSpec_ytbaoo$("clip-path")}ga.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var va=null;function ba(){return null===va&&new ga,va}function wa(){}function xa(){Ga.call(this),this.elementName_ohv755$_0="defs"}function ka(){Sa(),Js.call(this),this.myAttributes_9lwppr$_0=new Ia(this),this.myListeners_acqj1r$_0=null,this.myEventPeer_bxokaa$_0=new Da}function Ca(){Ea=this,this.ID=mt().createSpec_ytbaoo$("id")}ya.$metadata$={kind:x,simpleName:"SvgContainer",interfaces:[]},wa.$metadata$={kind:x,simpleName:"SvgCssResource",interfaces:[]},Object.defineProperty(xa.prototype,"elementName",{configurable:!0,get:function(){return this.elementName_ohv755$_0}}),Object.defineProperty(xa.prototype,"bBox",{configurable:!0,get:function(){return v(this.container().getPeer()).getBBox_7snaev$(this)}}),xa.prototype.transform=function(){return this.getAttribute_mumjwj$(Iu().TRANSFORM)},xa.prototype.pointToTransformedCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).invertTransform_12yub8$(this,t)},xa.prototype.pointToAbsoluteCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).applyTransform_12yub8$(this,t)},xa.$metadata$={kind:f,simpleName:"SvgDefsElement",interfaces:[Ou,ya,Ga]},Ca.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var Ea=null;function Sa(){return null===Ea&&new Ca,Ea}function Ta(t,e){this.closure$spec=t,this.this$SvgElement=e}function Oa(t,e){this.closure$spec=t,this.closure$handler=e}function Na(t){this.closure$event=t}function Pa(t,e){this.closure$reg=t,this.this$SvgElement=e,P.call(this)}function Ia(t){this.$outer=t,this.myAttrs_0=null}function Aa(){}function Ra(){za(),Ga.call(this),this.elementName_psynub$_0="ellipse"}function ja(){La=this,this.CX=mt().createSpec_ytbaoo$("cx"),this.CY=mt().createSpec_ytbaoo$("cy"),this.RX=mt().createSpec_ytbaoo$("rx"),this.RY=mt().createSpec_ytbaoo$("ry")}Object.defineProperty(ka.prototype,"ownerSvgElement",{configurable:!0,get:function(){for(var t,n=this;null!=n&&!e.isType(n,Ql);)n=n.parentProperty().get();return null!=n?null==(t=n)||e.isType(t,Ql)?t:m():null}}),Object.defineProperty(ka.prototype,"attributeKeys",{configurable:!0,get:function(){return this.myAttributes_9lwppr$_0.keySet()}}),ka.prototype.id=function(){return this.getAttribute_mumjwj$(Sa().ID)},ka.prototype.handlersSet=function(){return this.myEventPeer_bxokaa$_0.handlersSet()},ka.prototype.addEventHandler_mm8kk2$=function(t,e){return this.myEventPeer_bxokaa$_0.addEventHandler_mm8kk2$(t,e)},ka.prototype.dispatch_lgzia2$=function(t,n){var i;this.myEventPeer_bxokaa$_0.dispatch_2raoxs$(t,n,this),null!=this.parentProperty().get()&&!n.isConsumed&&e.isType(this.parentProperty().get(),ka)&&(e.isType(i=this.parentProperty().get(),ka)?i:m()).dispatch_lgzia2$(t,n)},ka.prototype.getSpecByName_o4z2a7$_0=function(t){return mt().createSpec_ytbaoo$(t)},Object.defineProperty(Ta.prototype,"propExpr",{configurable:!0,get:function(){return this.toString()+"."+this.closure$spec}}),Ta.prototype.get=function(){return this.this$SvgElement.myAttributes_9lwppr$_0.get_mumjwj$(this.closure$spec)},Ta.prototype.set_11rb$=function(t){this.this$SvgElement.myAttributes_9lwppr$_0.set_qdh7ux$(this.closure$spec,t)},Oa.prototype.onAttrSet_ud3ldc$=function(t){var n,i;if(this.closure$spec===t.attrSpec){var o=null==(n=t.oldValue)||e.isType(n,E)?n:m(),r=null==(i=t.newValue)||e.isType(i,E)?i:m();this.closure$handler.onEvent_11rb$(new S(o,r))}},Oa.$metadata$={kind:f,interfaces:[Aa]},Ta.prototype.addHandler_gxwwpc$=function(t){return this.this$SvgElement.addListener_e4m8w6$(new Oa(this.closure$spec,t))},Ta.$metadata$={kind:f,interfaces:[T]},ka.prototype.getAttribute_mumjwj$=function(t){return new Ta(t,this)},ka.prototype.getAttribute_61zpoe$=function(t){var e=this.getSpecByName_o4z2a7$_0(t);return this.getAttribute_mumjwj$(e)},ka.prototype.setAttribute_qdh7ux$=function(t,e){this.getAttribute_mumjwj$(t).set_11rb$(e)},ka.prototype.setAttribute_jyasbz$=function(t,e){this.getAttribute_61zpoe$(t).set_11rb$(e)},Na.prototype.call_11rb$=function(t){t.onAttrSet_ud3ldc$(this.closure$event)},Na.$metadata$={kind:f,interfaces:[O]},ka.prototype.onAttributeChanged_2oaikr$_0=function(t){null!=this.myListeners_acqj1r$_0&&v(this.myListeners_acqj1r$_0).fire_kucmxw$(new Na(t)),this.isAttached()&&this.container().attributeChanged_1u4bot$(this,t)},Pa.prototype.doRemove=function(){this.closure$reg.remove(),v(this.this$SvgElement.myListeners_acqj1r$_0).isEmpty&&(this.this$SvgElement.myListeners_acqj1r$_0=null)},Pa.$metadata$={kind:f,interfaces:[P]},ka.prototype.addListener_e4m8w6$=function(t){return null==this.myListeners_acqj1r$_0&&(this.myListeners_acqj1r$_0=new N),new Pa(v(this.myListeners_acqj1r$_0).add_11rb$(t),this)},ka.prototype.toString=function(){return"<"+this.elementName+" "+this.myAttributes_9lwppr$_0.toSvgString_8be2vx$()+">"},Object.defineProperty(Ia.prototype,"isEmpty",{configurable:!0,get:function(){return null==this.myAttrs_0||v(this.myAttrs_0).isEmpty}}),Ia.prototype.size=function(){return null==this.myAttrs_0?0:v(this.myAttrs_0).size()},Ia.prototype.containsKey_p8ci7$=function(t){return null!=this.myAttrs_0&&v(this.myAttrs_0).containsKey_11rb$(t)},Ia.prototype.get_mumjwj$=function(t){var n;return null!=this.myAttrs_0&&v(this.myAttrs_0).containsKey_11rb$(t)?null==(n=v(this.myAttrs_0).get_11rb$(t))||e.isType(n,E)?n:m():null},Ia.prototype.set_qdh7ux$=function(t,n){var i,o;null==this.myAttrs_0&&(this.myAttrs_0=new I);var r=null==n?null==(i=v(this.myAttrs_0).remove_11rb$(t))||e.isType(i,E)?i:m():null==(o=v(this.myAttrs_0).put_xwzc9p$(t,n))||e.isType(o,E)?o:m();if(!c(n,r)){var a=new Ku(t,r,n);this.$outer.onAttributeChanged_2oaikr$_0(a)}return r},Ia.prototype.remove_mumjwj$=function(t){return this.set_qdh7ux$(t,null)},Ia.prototype.keySet=function(){return null==this.myAttrs_0?A():v(this.myAttrs_0).keySet()},Ia.prototype.toSvgString_8be2vx$=function(){var t,e=o();for(t=this.keySet().iterator();t.hasNext();){var n=t.next();e.append_pdl1vj$(n.name).append_pdl1vj$('="').append_s8jyv4$(this.get_mumjwj$(n)).append_pdl1vj$('" ')}return e.toString()},Ia.prototype.toString=function(){return this.toSvgString_8be2vx$()},Ia.$metadata$={kind:f,simpleName:"AttributeMap",interfaces:[]},ka.$metadata$={kind:f,simpleName:"SvgElement",interfaces:[Js]},Aa.$metadata$={kind:x,simpleName:"SvgElementListener",interfaces:[]},ja.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var La=null;function za(){return null===La&&new ja,La}function Da(){this.myEventHandlers_0=null,this.myListeners_0=null}function Ma(t){this.this$SvgEventPeer=t}function Ba(t,e){this.closure$addReg=t,this.this$SvgEventPeer=e,P.call(this)}function Fa(t,e,n,i){this.closure$addReg=t,this.closure$specListeners=e,this.closure$eventHandlers=n,this.closure$spec=i,P.call(this)}function Ua(t,e){this.closure$oldHandlersSet=t,this.this$SvgEventPeer=e}function qa(t,e){this.closure$event=t,this.closure$target=e}function Ha(){Ga.call(this),this.elementName_84zyy2$_0="g"}function Ga(){ls(),Yl.call(this)}function Ka(){ss=this,this.POINTER_EVENTS_0=mt().createSpec_ytbaoo$("pointer-events"),this.OPACITY=mt().createSpec_ytbaoo$("opacity"),this.VISIBILITY=mt().createSpec_ytbaoo$("visibility"),this.CLIP_PATH=mt().createSpec_ytbaoo$("clip-path"),this.CLIP_BOUNDS_JFX=mt().createSpec_ytbaoo$("clip-bounds-jfx")}Object.defineProperty(Ra.prototype,"elementName",{configurable:!0,get:function(){return this.elementName_psynub$_0}}),Object.defineProperty(Ra.prototype,"bBox",{configurable:!0,get:function(){return v(this.container().getPeer()).getBBox_7snaev$(this)}}),Ra.prototype.cx=function(){return this.getAttribute_mumjwj$(za().CX)},Ra.prototype.cy=function(){return this.getAttribute_mumjwj$(za().CY)},Ra.prototype.rx=function(){return this.getAttribute_mumjwj$(za().RX)},Ra.prototype.ry=function(){return this.getAttribute_mumjwj$(za().RY)},Ra.prototype.transform=function(){return this.getAttribute_mumjwj$(Iu().TRANSFORM)},Ra.prototype.fill=function(){return this.getAttribute_mumjwj$(Vl().FILL)},Ra.prototype.fillColor=function(){return Lu().colorAttributeTransform_dc5zq8$(this.fill(),this.fillOpacity())},Ra.prototype.fillOpacity=function(){return this.getAttribute_mumjwj$(Vl().FILL_OPACITY)},Ra.prototype.stroke=function(){return this.getAttribute_mumjwj$(Vl().STROKE)},Ra.prototype.strokeColor=function(){return Lu().colorAttributeTransform_dc5zq8$(this.stroke(),this.strokeOpacity())},Ra.prototype.strokeOpacity=function(){return this.getAttribute_mumjwj$(Vl().STROKE_OPACITY)},Ra.prototype.strokeWidth=function(){return this.getAttribute_mumjwj$(Vl().STROKE_WIDTH)},Ra.prototype.pointToTransformedCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).invertTransform_12yub8$(this,t)},Ra.prototype.pointToAbsoluteCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).applyTransform_12yub8$(this,t)},Ra.$metadata$={kind:f,simpleName:"SvgEllipseElement",interfaces:[Hl,Ou,Ga]},Object.defineProperty(Ma.prototype,"propExpr",{configurable:!0,get:function(){return this.toString()+".handlersProp"}}),Ma.prototype.get=function(){return this.this$SvgEventPeer.handlersKeySet_0()},Ba.prototype.doRemove=function(){this.closure$addReg.remove(),v(this.this$SvgEventPeer.myListeners_0).isEmpty&&(this.this$SvgEventPeer.myListeners_0=null)},Ba.$metadata$={kind:f,interfaces:[P]},Ma.prototype.addHandler_gxwwpc$=function(t){return null==this.this$SvgEventPeer.myListeners_0&&(this.this$SvgEventPeer.myListeners_0=new N),new Ba(v(this.this$SvgEventPeer.myListeners_0).add_11rb$(t),this.this$SvgEventPeer)},Ma.$metadata$={kind:f,interfaces:[R]},Da.prototype.handlersSet=function(){return new Ma(this)},Da.prototype.handlersKeySet_0=function(){return null==this.myEventHandlers_0?A():v(this.myEventHandlers_0).keys},Fa.prototype.doRemove=function(){this.closure$addReg.remove(),this.closure$specListeners.isEmpty&&this.closure$eventHandlers.remove_11rb$(this.closure$spec)},Fa.$metadata$={kind:f,interfaces:[P]},Ua.prototype.call_11rb$=function(t){t.onEvent_11rb$(new S(this.closure$oldHandlersSet,this.this$SvgEventPeer.handlersKeySet_0()))},Ua.$metadata$={kind:f,interfaces:[O]},Da.prototype.addEventHandler_mm8kk2$=function(t,e){var n;null==this.myEventHandlers_0&&(this.myEventHandlers_0=k());var i=v(this.myEventHandlers_0);if(!i.containsKey_11rb$(t)){var o=new N;i.put_xwzc9p$(t,o)}var r=i.keys,a=v(i.get_11rb$(t)),s=new Fa(a.add_11rb$(e),a,i,t);return null!=(n=this.myListeners_0)&&n.fire_kucmxw$(new Ua(r,this)),s},qa.prototype.call_11rb$=function(t){var n;this.closure$event.isConsumed||(e.isType(n=t,Vu)?n:m()).handle_42da0z$(this.closure$target,this.closure$event)},qa.$metadata$={kind:f,interfaces:[O]},Da.prototype.dispatch_2raoxs$=function(t,e,n){null!=this.myEventHandlers_0&&v(this.myEventHandlers_0).containsKey_11rb$(t)&&v(v(this.myEventHandlers_0).get_11rb$(t)).fire_kucmxw$(new qa(e,n))},Da.$metadata$={kind:f,simpleName:"SvgEventPeer",interfaces:[]},Object.defineProperty(Ha.prototype,"elementName",{configurable:!0,get:function(){return this.elementName_84zyy2$_0}}),Object.defineProperty(Ha.prototype,"bBox",{configurable:!0,get:function(){return v(this.container().getPeer()).getBBox_7snaev$(this)}}),Ha.prototype.transform=function(){return this.getAttribute_mumjwj$(Iu().TRANSFORM)},Ha.prototype.pointToTransformedCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).invertTransform_12yub8$(this,t)},Ha.prototype.pointToAbsoluteCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).applyTransform_12yub8$(this,t)},Ha.$metadata$={kind:f,simpleName:"SvgGElement",interfaces:[ya,Ou,Ga]},Ka.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var Va,Ya,Wa,Xa,Za,Ja,Qa,ts,es,ns,is,os,rs,as,ss=null;function ls(){return null===ss&&new Ka,ss}function us(t,e,n){b.call(this),this.myAttributeString_wpy0pw$_0=n,this.name$=t,this.ordinal$=e}function cs(){cs=function(){},Va=new us("VISIBLE_PAINTED",0,"visiblePainted"),Ya=new us("VISIBLE_FILL",1,"visibleFill"),Wa=new us("VISIBLE_STROKE",2,"visibleStroke"),Xa=new us("VISIBLE",3,"visible"),Za=new us("PAINTED",4,"painted"),Ja=new us("FILL",5,"fill"),Qa=new us("STROKE",6,"stroke"),ts=new us("ALL",7,"all"),es=new us("NONE",8,"none"),ns=new us("INHERIT",9,"inherit")}function ps(){return cs(),Va}function hs(){return cs(),Ya}function _s(){return cs(),Wa}function ds(){return cs(),Xa}function fs(){return cs(),Za}function ms(){return cs(),Ja}function $s(){return cs(),Qa}function ys(){return cs(),ts}function gs(){return cs(),es}function vs(){return cs(),ns}function bs(t,e,n){b.call(this),this.myAttrString_w3r471$_0=n,this.name$=t,this.ordinal$=e}function ws(){ws=function(){},is=new bs("VISIBLE",0,"visible"),os=new bs("HIDDEN",1,"hidden"),rs=new bs("COLLAPSE",2,"collapse"),as=new bs("INHERIT",3,"inherit")}function xs(){return ws(),is}function ks(){return ws(),os}function Cs(){return ws(),rs}function Es(){return ws(),as}function Ss(t){this.myElementId_0=t}function Ts(){Ps(),Ga.call(this),this.elementName_r17hoq$_0="image",this.setAttribute_qdh7ux$(Ps().PRESERVE_ASPECT_RATIO,"none"),this.setAttribute_jyasbz$($a().SVG_STYLE_ATTRIBUTE,"image-rendering: pixelated;image-rendering: crisp-edges;")}function Os(){Ns=this,this.X=mt().createSpec_ytbaoo$("x"),this.Y=mt().createSpec_ytbaoo$("y"),this.WIDTH=mt().createSpec_ytbaoo$($a().WIDTH),this.HEIGHT=mt().createSpec_ytbaoo$($a().HEIGHT),this.HREF=mt().createSpecNS_wswq18$("href",Gu().XLINK_PREFIX,Gu().XLINK_NAMESPACE_URI),this.PRESERVE_ASPECT_RATIO=mt().createSpec_ytbaoo$("preserveAspectRatio")}Ga.prototype.pointerEvents=function(){return this.getAttribute_mumjwj$(ls().POINTER_EVENTS_0)},Ga.prototype.opacity=function(){return this.getAttribute_mumjwj$(ls().OPACITY)},Ga.prototype.visibility=function(){return this.getAttribute_mumjwj$(ls().VISIBILITY)},Ga.prototype.clipPath=function(){return this.getAttribute_mumjwj$(ls().CLIP_PATH)},us.prototype.toString=function(){return this.myAttributeString_wpy0pw$_0},us.$metadata$={kind:f,simpleName:"PointerEvents",interfaces:[b]},us.values=function(){return[ps(),hs(),_s(),ds(),fs(),ms(),$s(),ys(),gs(),vs()]},us.valueOf_61zpoe$=function(t){switch(t){case"VISIBLE_PAINTED":return ps();case"VISIBLE_FILL":return hs();case"VISIBLE_STROKE":return _s();case"VISIBLE":return ds();case"PAINTED":return fs();case"FILL":return ms();case"STROKE":return $s();case"ALL":return ys();case"NONE":return gs();case"INHERIT":return vs();default:w("No enum constant jetbrains.datalore.vis.svg.SvgGraphicsElement.PointerEvents."+t)}},bs.prototype.toString=function(){return this.myAttrString_w3r471$_0},bs.$metadata$={kind:f,simpleName:"Visibility",interfaces:[b]},bs.values=function(){return[xs(),ks(),Cs(),Es()]},bs.valueOf_61zpoe$=function(t){switch(t){case"VISIBLE":return xs();case"HIDDEN":return ks();case"COLLAPSE":return Cs();case"INHERIT":return Es();default:w("No enum constant jetbrains.datalore.vis.svg.SvgGraphicsElement.Visibility."+t)}},Ga.$metadata$={kind:f,simpleName:"SvgGraphicsElement",interfaces:[Yl]},Ss.prototype.toString=function(){return"url(#"+this.myElementId_0+")"},Ss.$metadata$={kind:f,simpleName:"SvgIRI",interfaces:[]},Os.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var Ns=null;function Ps(){return null===Ns&&new Os,Ns}function Is(t,e,n,i,o){return o=o||Object.create(Ts.prototype),Ts.call(o),o.setAttribute_qdh7ux$(Ps().X,t),o.setAttribute_qdh7ux$(Ps().Y,e),o.setAttribute_qdh7ux$(Ps().WIDTH,n),o.setAttribute_qdh7ux$(Ps().HEIGHT,i),o}function As(t,e,n,i,o){Is(t,e,n,i,this),this.myBitmap_0=o}function Rs(t,e){this.closure$hrefProp=t,this.this$SvgImageElementEx=e}function js(){}function Ls(t,e,n){this.width=t,this.height=e,this.argbValues=n.slice()}function zs(){Xs(),Ga.call(this),this.elementName_7igd9t$_0="line"}function Ds(){Ws=this,this.X1=mt().createSpec_ytbaoo$("x1"),this.Y1=mt().createSpec_ytbaoo$("y1"),this.X2=mt().createSpec_ytbaoo$("x2"),this.Y2=mt().createSpec_ytbaoo$("y2")}Object.defineProperty(Ts.prototype,"elementName",{configurable:!0,get:function(){return this.elementName_r17hoq$_0}}),Object.defineProperty(Ts.prototype,"bBox",{configurable:!0,get:function(){return v(this.container().getPeer()).getBBox_7snaev$(this)}}),Ts.prototype.x=function(){return this.getAttribute_mumjwj$(Ps().X)},Ts.prototype.y=function(){return this.getAttribute_mumjwj$(Ps().Y)},Ts.prototype.width=function(){return this.getAttribute_mumjwj$(Ps().WIDTH)},Ts.prototype.height=function(){return this.getAttribute_mumjwj$(Ps().HEIGHT)},Ts.prototype.href=function(){return this.getAttribute_mumjwj$(Ps().HREF)},Ts.prototype.preserveAspectRatio=function(){return this.getAttribute_mumjwj$(Ps().PRESERVE_ASPECT_RATIO)},Ts.prototype.transform=function(){return this.getAttribute_mumjwj$(Iu().TRANSFORM)},Ts.prototype.pointToTransformedCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).invertTransform_12yub8$(this,t)},Ts.prototype.pointToAbsoluteCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).applyTransform_12yub8$(this,t)},Ts.$metadata$={kind:f,simpleName:"SvgImageElement",interfaces:[Ou,Ga]},Object.defineProperty(Rs.prototype,"propExpr",{configurable:!0,get:function(){return this.closure$hrefProp.propExpr}}),Rs.prototype.get=function(){return this.closure$hrefProp.get()},Rs.prototype.addHandler_gxwwpc$=function(t){return this.closure$hrefProp.addHandler_gxwwpc$(t)},Rs.prototype.set_11rb$=function(t){throw j("href property is read-only in "+e.getKClassFromExpression(this.this$SvgImageElementEx).simpleName)},Rs.$metadata$={kind:f,interfaces:[T]},As.prototype.href=function(){return new Rs(Ts.prototype.href.call(this),this)},As.prototype.asImageElement_xhdger$=function(t){var e=new Ts;Lu().copyAttributes_azdp7k$(this,e);var n=t.toDataUrl_nps3vt$(this.myBitmap_0.width,this.myBitmap_0.height,this.myBitmap_0.argbValues);return e.href().set_11rb$(n),e},js.$metadata$={kind:x,simpleName:"RGBEncoder",interfaces:[]},Ls.$metadata$={kind:f,simpleName:"Bitmap",interfaces:[]},As.$metadata$={kind:f,simpleName:"SvgImageElementEx",interfaces:[Ts]},Ds.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var Ms,Bs,Fs,Us,qs,Hs,Gs,Ks,Vs,Ys,Ws=null;function Xs(){return null===Ws&&new Ds,Ws}function Zs(){}function Js(){D.call(this),this.myContainer_rnn3uj$_0=null,this.myChildren_jvkzg9$_0=null,this.isPrebuiltSubtree=!1}function Qs(t,e){this.$outer=t,z.call(this,e)}function tl(t){this.mySvgRoot_0=new ol(this,t),this.myListeners_0=new N,this.myPeer_0=null,this.mySvgRoot_0.get().attach_1gwaml$(this)}function el(t,e){this.closure$element=t,this.closure$event=e}function nl(t){this.closure$node=t}function il(t){this.closure$node=t}function ol(t,e){this.this$SvgNodeContainer=t,B.call(this,e)}function rl(t){Sl(),this.myPathData_0=t}function al(t,e,n){b.call(this),this.myChar_90i289$_0=n,this.name$=t,this.ordinal$=e}function sl(){sl=function(){},Ms=new al("MOVE_TO",0,109),Bs=new al("LINE_TO",1,108),Fs=new al("HORIZONTAL_LINE_TO",2,104),Us=new al("VERTICAL_LINE_TO",3,118),qs=new al("CURVE_TO",4,99),Hs=new al("SMOOTH_CURVE_TO",5,115),Gs=new al("QUADRATIC_BEZIER_CURVE_TO",6,113),Ks=new al("SMOOTH_QUADRATIC_BEZIER_CURVE_TO",7,116),Vs=new al("ELLIPTICAL_ARC",8,97),Ys=new al("CLOSE_PATH",9,122),vl()}function ll(){return sl(),Ms}function ul(){return sl(),Bs}function cl(){return sl(),Fs}function pl(){return sl(),Us}function hl(){return sl(),qs}function _l(){return sl(),Hs}function dl(){return sl(),Gs}function fl(){return sl(),Ks}function ml(){return sl(),Vs}function $l(){return sl(),Ys}function yl(){var t,e;for(gl=this,this.MAP_0=k(),t=bl(),e=0;e!==t.length;++e){var n=t[e],i=this.MAP_0,o=n.absoluteCmd();i.put_xwzc9p$(o,n);var r=this.MAP_0,a=n.relativeCmd();r.put_xwzc9p$(a,n)}}Object.defineProperty(zs.prototype,"elementName",{configurable:!0,get:function(){return this.elementName_7igd9t$_0}}),Object.defineProperty(zs.prototype,"bBox",{configurable:!0,get:function(){return v(this.container().getPeer()).getBBox_7snaev$(this)}}),zs.prototype.x1=function(){return this.getAttribute_mumjwj$(Xs().X1)},zs.prototype.y1=function(){return this.getAttribute_mumjwj$(Xs().Y1)},zs.prototype.x2=function(){return this.getAttribute_mumjwj$(Xs().X2)},zs.prototype.y2=function(){return this.getAttribute_mumjwj$(Xs().Y2)},zs.prototype.transform=function(){return this.getAttribute_mumjwj$(Iu().TRANSFORM)},zs.prototype.fill=function(){return this.getAttribute_mumjwj$(Vl().FILL)},zs.prototype.fillColor=function(){return Lu().colorAttributeTransform_dc5zq8$(this.fill(),this.fillOpacity())},zs.prototype.fillOpacity=function(){return this.getAttribute_mumjwj$(Vl().FILL_OPACITY)},zs.prototype.stroke=function(){return this.getAttribute_mumjwj$(Vl().STROKE)},zs.prototype.strokeColor=function(){return Lu().colorAttributeTransform_dc5zq8$(this.stroke(),this.strokeOpacity())},zs.prototype.strokeOpacity=function(){return this.getAttribute_mumjwj$(Vl().STROKE_OPACITY)},zs.prototype.strokeWidth=function(){return this.getAttribute_mumjwj$(Vl().STROKE_WIDTH)},zs.prototype.pointToTransformedCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).invertTransform_12yub8$(this,t)},zs.prototype.pointToAbsoluteCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).applyTransform_12yub8$(this,t)},zs.$metadata$={kind:f,simpleName:"SvgLineElement",interfaces:[Hl,Ou,Ga]},Zs.$metadata$={kind:x,simpleName:"SvgLocatable",interfaces:[]},Js.prototype.isAttached=function(){return null!=this.myContainer_rnn3uj$_0},Js.prototype.container=function(){return v(this.myContainer_rnn3uj$_0)},Js.prototype.children=function(){var t;return null==this.myChildren_jvkzg9$_0&&(this.myChildren_jvkzg9$_0=new Qs(this,this)),e.isType(t=this.myChildren_jvkzg9$_0,L)?t:m()},Js.prototype.attach_1gwaml$=function(t){var e;if(this.isAttached())throw j("Svg element is already attached");for(e=this.children().iterator();e.hasNext();)e.next().attach_1gwaml$(t);this.myContainer_rnn3uj$_0=t,v(this.myContainer_rnn3uj$_0).svgNodeAttached_vvfmut$(this)},Js.prototype.detach_8be2vx$=function(){var t;if(!this.isAttached())throw j("Svg element is not attached");for(t=this.children().iterator();t.hasNext();)t.next().detach_8be2vx$();v(this.myContainer_rnn3uj$_0).svgNodeDetached_vvfmut$(this),this.myContainer_rnn3uj$_0=null},Qs.prototype.beforeItemAdded_wxm5ur$=function(t,e){this.$outer.isAttached()&&e.attach_1gwaml$(this.$outer.container()),z.prototype.beforeItemAdded_wxm5ur$.call(this,t,e)},Qs.prototype.beforeItemSet_hu11d4$=function(t,e,n){this.$outer.isAttached()&&(e.detach_8be2vx$(),n.attach_1gwaml$(this.$outer.container())),z.prototype.beforeItemSet_hu11d4$.call(this,t,e,n)},Qs.prototype.beforeItemRemoved_wxm5ur$=function(t,e){this.$outer.isAttached()&&e.detach_8be2vx$(),z.prototype.beforeItemRemoved_wxm5ur$.call(this,t,e)},Qs.$metadata$={kind:f,simpleName:"SvgChildList",interfaces:[z]},Js.$metadata$={kind:f,simpleName:"SvgNode",interfaces:[D]},tl.prototype.setPeer_kqs5uc$=function(t){this.myPeer_0=t},tl.prototype.getPeer=function(){return this.myPeer_0},tl.prototype.root=function(){return this.mySvgRoot_0},tl.prototype.addListener_6zkzfn$=function(t){return this.myListeners_0.add_11rb$(t)},el.prototype.call_11rb$=function(t){t.onAttributeSet_os9wmi$(this.closure$element,this.closure$event)},el.$metadata$={kind:f,interfaces:[O]},tl.prototype.attributeChanged_1u4bot$=function(t,e){this.myListeners_0.fire_kucmxw$(new el(t,e))},nl.prototype.call_11rb$=function(t){t.onNodeAttached_26jijc$(this.closure$node)},nl.$metadata$={kind:f,interfaces:[O]},tl.prototype.svgNodeAttached_vvfmut$=function(t){this.myListeners_0.fire_kucmxw$(new nl(t))},il.prototype.call_11rb$=function(t){t.onNodeDetached_26jijc$(this.closure$node)},il.$metadata$={kind:f,interfaces:[O]},tl.prototype.svgNodeDetached_vvfmut$=function(t){this.myListeners_0.fire_kucmxw$(new il(t))},ol.prototype.set_11rb$=function(t){this.get().detach_8be2vx$(),B.prototype.set_11rb$.call(this,t),t.attach_1gwaml$(this.this$SvgNodeContainer)},ol.$metadata$={kind:f,interfaces:[B]},tl.$metadata$={kind:f,simpleName:"SvgNodeContainer",interfaces:[]},al.prototype.relativeCmd=function(){return F(this.myChar_90i289$_0)},al.prototype.absoluteCmd=function(){return F(U(this.myChar_90i289$_0))},yl.prototype.get_s8itvh$=function(t){if(this.MAP_0.containsKey_11rb$(F(t)))return v(this.MAP_0.get_11rb$(F(t)));throw H("No enum constant "+r(q(al))+"@myChar."+String.fromCharCode(F(t)))},yl.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var gl=null;function vl(){return sl(),null===gl&&new yl,gl}function bl(){return[ll(),ul(),cl(),pl(),hl(),_l(),dl(),fl(),ml(),$l()]}function wl(){El=this,this.EMPTY=new rl("")}al.$metadata$={kind:f,simpleName:"Action",interfaces:[b]},al.values=bl,al.valueOf_61zpoe$=function(t){switch(t){case"MOVE_TO":return ll();case"LINE_TO":return ul();case"HORIZONTAL_LINE_TO":return cl();case"VERTICAL_LINE_TO":return pl();case"CURVE_TO":return hl();case"SMOOTH_CURVE_TO":return _l();case"QUADRATIC_BEZIER_CURVE_TO":return dl();case"SMOOTH_QUADRATIC_BEZIER_CURVE_TO":return fl();case"ELLIPTICAL_ARC":return ml();case"CLOSE_PATH":return $l();default:w("No enum constant jetbrains.datalore.vis.svg.SvgPathData.Action."+t)}},rl.prototype.toString=function(){return this.myPathData_0},wl.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var xl,kl,Cl,El=null;function Sl(){return null===El&&new wl,El}function Tl(t){void 0===t&&(t=!0),this.myDefaultAbsolute_0=t,this.myStringBuilder_0=null,this.myTension_0=.7,this.myStringBuilder_0=o()}function Ol(t,e){b.call(this),this.name$=t,this.ordinal$=e}function Nl(){Nl=function(){},xl=new Ol("LINEAR",0),kl=new Ol("CARDINAL",1),Cl=new Ol("MONOTONE",2)}function Pl(){return Nl(),xl}function Il(){return Nl(),kl}function Al(){return Nl(),Cl}function Rl(){zl(),Ga.call(this),this.elementName_d87la8$_0="path"}function jl(){Ll=this,this.D=mt().createSpec_ytbaoo$("d")}rl.$metadata$={kind:f,simpleName:"SvgPathData",interfaces:[]},Ol.$metadata$={kind:f,simpleName:"Interpolation",interfaces:[b]},Ol.values=function(){return[Pl(),Il(),Al()]},Ol.valueOf_61zpoe$=function(t){switch(t){case"LINEAR":return Pl();case"CARDINAL":return Il();case"MONOTONE":return Al();default:w("No enum constant jetbrains.datalore.vis.svg.SvgPathDataBuilder.Interpolation."+t)}},Tl.prototype.build=function(){return new rl(this.myStringBuilder_0.toString())},Tl.prototype.addAction_0=function(t,e,n){var i;for(e?this.myStringBuilder_0.append_s8itvh$(G(t.absoluteCmd())):this.myStringBuilder_0.append_s8itvh$(G(t.relativeCmd())),i=0;i!==n.length;++i){var o=n[i];this.myStringBuilder_0.append_s8jyv4$(o).append_s8itvh$(32)}},Tl.prototype.addActionWithStringTokens_0=function(t,e,n){var i;for(e?this.myStringBuilder_0.append_s8itvh$(G(t.absoluteCmd())):this.myStringBuilder_0.append_s8itvh$(G(t.relativeCmd())),i=0;i!==n.length;++i){var o=n[i];this.myStringBuilder_0.append_pdl1vj$(o).append_s8itvh$(32)}},Tl.prototype.moveTo_przk3b$=function(t,e,n){return void 0===n&&(n=this.myDefaultAbsolute_0),this.addAction_0(ll(),n,new Float64Array([t,e])),this},Tl.prototype.moveTo_k2qmv6$=function(t,e){return this.moveTo_przk3b$(t.x,t.y,e)},Tl.prototype.moveTo_gpjtzr$=function(t){return this.moveTo_przk3b$(t.x,t.y)},Tl.prototype.lineTo_przk3b$=function(t,e,n){return void 0===n&&(n=this.myDefaultAbsolute_0),this.addAction_0(ul(),n,new Float64Array([t,e])),this},Tl.prototype.lineTo_k2qmv6$=function(t,e){return this.lineTo_przk3b$(t.x,t.y,e)},Tl.prototype.lineTo_gpjtzr$=function(t){return this.lineTo_przk3b$(t.x,t.y)},Tl.prototype.horizontalLineTo_8555vt$=function(t,e){return void 0===e&&(e=this.myDefaultAbsolute_0),this.addAction_0(cl(),e,new Float64Array([t])),this},Tl.prototype.verticalLineTo_8555vt$=function(t,e){return void 0===e&&(e=this.myDefaultAbsolute_0),this.addAction_0(pl(),e,new Float64Array([t])),this},Tl.prototype.curveTo_igz2nj$=function(t,e,n,i,o,r,a){return void 0===a&&(a=this.myDefaultAbsolute_0),this.addAction_0(hl(),a,new Float64Array([t,e,n,i,o,r])),this},Tl.prototype.curveTo_d4nu7w$=function(t,e,n,i){return this.curveTo_igz2nj$(t.x,t.y,e.x,e.y,n.x,n.y,i)},Tl.prototype.curveTo_fkixjx$=function(t,e,n){return this.curveTo_igz2nj$(t.x,t.y,e.x,e.y,n.x,n.y)},Tl.prototype.smoothCurveTo_84c9il$=function(t,e,n,i,o){return void 0===o&&(o=this.myDefaultAbsolute_0),this.addAction_0(_l(),o,new Float64Array([t,e,n,i])),this},Tl.prototype.smoothCurveTo_sosulb$=function(t,e,n){return this.smoothCurveTo_84c9il$(t.x,t.y,e.x,e.y,n)},Tl.prototype.smoothCurveTo_qt8ska$=function(t,e){return this.smoothCurveTo_84c9il$(t.x,t.y,e.x,e.y)},Tl.prototype.quadraticBezierCurveTo_84c9il$=function(t,e,n,i,o){return void 0===o&&(o=this.myDefaultAbsolute_0),this.addAction_0(dl(),o,new Float64Array([t,e,n,i])),this},Tl.prototype.quadraticBezierCurveTo_sosulb$=function(t,e,n){return this.quadraticBezierCurveTo_84c9il$(t.x,t.y,e.x,e.y,n)},Tl.prototype.quadraticBezierCurveTo_qt8ska$=function(t,e){return this.quadraticBezierCurveTo_84c9il$(t.x,t.y,e.x,e.y)},Tl.prototype.smoothQuadraticBezierCurveTo_przk3b$=function(t,e,n){return void 0===n&&(n=this.myDefaultAbsolute_0),this.addAction_0(fl(),n,new Float64Array([t,e])),this},Tl.prototype.smoothQuadraticBezierCurveTo_k2qmv6$=function(t,e){return this.smoothQuadraticBezierCurveTo_przk3b$(t.x,t.y,e)},Tl.prototype.smoothQuadraticBezierCurveTo_gpjtzr$=function(t){return this.smoothQuadraticBezierCurveTo_przk3b$(t.x,t.y)},Tl.prototype.ellipticalArc_d37okh$=function(t,e,n,i,o,r,a,s){return void 0===s&&(s=this.myDefaultAbsolute_0),this.addActionWithStringTokens_0(ml(),s,[t.toString(),e.toString(),n.toString(),i?"1":"0",o?"1":"0",r.toString(),a.toString()]),this},Tl.prototype.ellipticalArc_dcaprc$=function(t,e,n,i,o,r,a){return this.ellipticalArc_d37okh$(t,e,n,i,o,r.x,r.y,a)},Tl.prototype.ellipticalArc_gc0whr$=function(t,e,n,i,o,r){return this.ellipticalArc_d37okh$(t,e,n,i,o,r.x,r.y)},Tl.prototype.closePath=function(){return this.addAction_0($l(),this.myDefaultAbsolute_0,new Float64Array([])),this},Tl.prototype.setTension_14dthe$=function(t){if(0>t||t>1)throw H("Tension should be within [0, 1] interval");this.myTension_0=t},Tl.prototype.lineSlope_0=function(t,e){return(e.y-t.y)/(e.x-t.x)},Tl.prototype.finiteDifferences_0=function(t){var e,n=K(t.size),i=this.lineSlope_0(t.get_za3lpa$(0),t.get_za3lpa$(1));n.add_11rb$(i),e=t.size-1|0;for(var o=1;o1){a=e.get_za3lpa$(1),o=t.get_za3lpa$(s),s=s+1|0,this.curveTo_igz2nj$(i.x+r.x,i.y+r.y,o.x-a.x,o.y-a.y,o.x,o.y,!0);for(var l=2;l9){var l=s;s=3*o/X.sqrt(l),n.set_wxm5ur$(i,s*r),n.set_wxm5ur$(i+1|0,s*a)}}}for(var u=V(),c=0;c!==t.size;++c){var p=c+1|0,h=t.size-1|0,_=c-1|0,d=(t.get_za3lpa$(X.min(p,h)).x-t.get_za3lpa$(X.max(_,0)).x)/(6*(1+n.get_za3lpa$(c)*n.get_za3lpa$(c)));u.add_11rb$(new Y(d,n.get_za3lpa$(c)*d))}return u},Tl.prototype.interpolatePoints_3g1a62$=function(t,e,n){if(t.size!==e.size)throw H("Sizes of xs and ys must be equal");for(var i=K(t.size),o=W(t),r=W(e),a=0;a!==t.size;++a)i.add_11rb$(new Y(o.get_za3lpa$(a),r.get_za3lpa$(a)));switch(n.name){case"LINEAR":this.doLinearInterpolation_0(i);break;case"CARDINAL":i.size<3?this.doLinearInterpolation_0(i):this.doCardinalInterpolation_0(i);break;case"MONOTONE":i.size<3?this.doLinearInterpolation_0(i):this.doHermiteInterpolation_0(i,this.monotoneTangents_0(i))}return this},Tl.prototype.interpolatePoints_1ravjc$=function(t,e){var n,i=K(t.size),o=K(t.size);for(n=t.iterator();n.hasNext();){var r=n.next();i.add_11rb$(r.x),o.add_11rb$(r.y)}return this.interpolatePoints_3g1a62$(i,o,e)},Tl.$metadata$={kind:f,simpleName:"SvgPathDataBuilder",interfaces:[]},jl.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var Ll=null;function zl(){return null===Ll&&new jl,Ll}function Dl(){}function Ml(){Ul(),Ga.call(this),this.elementName_sgtow1$_0="rect"}function Bl(){Fl=this,this.X=mt().createSpec_ytbaoo$("x"),this.Y=mt().createSpec_ytbaoo$("y"),this.WIDTH=mt().createSpec_ytbaoo$($a().WIDTH),this.HEIGHT=mt().createSpec_ytbaoo$($a().HEIGHT)}Object.defineProperty(Rl.prototype,"elementName",{configurable:!0,get:function(){return this.elementName_d87la8$_0}}),Object.defineProperty(Rl.prototype,"bBox",{configurable:!0,get:function(){return v(this.container().getPeer()).getBBox_7snaev$(this)}}),Rl.prototype.d=function(){return this.getAttribute_mumjwj$(zl().D)},Rl.prototype.transform=function(){return this.getAttribute_mumjwj$(Iu().TRANSFORM)},Rl.prototype.fill=function(){return this.getAttribute_mumjwj$(Vl().FILL)},Rl.prototype.fillColor=function(){return Lu().colorAttributeTransform_dc5zq8$(this.fill(),this.fillOpacity())},Rl.prototype.fillOpacity=function(){return this.getAttribute_mumjwj$(Vl().FILL_OPACITY)},Rl.prototype.stroke=function(){return this.getAttribute_mumjwj$(Vl().STROKE)},Rl.prototype.strokeColor=function(){return Lu().colorAttributeTransform_dc5zq8$(this.stroke(),this.strokeOpacity())},Rl.prototype.strokeOpacity=function(){return this.getAttribute_mumjwj$(Vl().STROKE_OPACITY)},Rl.prototype.strokeWidth=function(){return this.getAttribute_mumjwj$(Vl().STROKE_WIDTH)},Rl.prototype.pointToTransformedCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).invertTransform_12yub8$(this,t)},Rl.prototype.pointToAbsoluteCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).applyTransform_12yub8$(this,t)},Rl.$metadata$={kind:f,simpleName:"SvgPathElement",interfaces:[Hl,Ou,Ga]},Dl.$metadata$={kind:x,simpleName:"SvgPlatformPeer",interfaces:[]},Bl.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var Fl=null;function Ul(){return null===Fl&&new Bl,Fl}function ql(t,e,n,i,o){return o=o||Object.create(Ml.prototype),Ml.call(o),o.setAttribute_qdh7ux$(Ul().X,t),o.setAttribute_qdh7ux$(Ul().Y,e),o.setAttribute_qdh7ux$(Ul().HEIGHT,i),o.setAttribute_qdh7ux$(Ul().WIDTH,n),o}function Hl(){Vl()}function Gl(){Kl=this,this.FILL=mt().createSpec_ytbaoo$("fill"),this.FILL_OPACITY=mt().createSpec_ytbaoo$("fill-opacity"),this.STROKE=mt().createSpec_ytbaoo$("stroke"),this.STROKE_OPACITY=mt().createSpec_ytbaoo$("stroke-opacity"),this.STROKE_WIDTH=mt().createSpec_ytbaoo$("stroke-width")}Object.defineProperty(Ml.prototype,"elementName",{configurable:!0,get:function(){return this.elementName_sgtow1$_0}}),Object.defineProperty(Ml.prototype,"bBox",{configurable:!0,get:function(){return v(this.container().getPeer()).getBBox_7snaev$(this)}}),Ml.prototype.x=function(){return this.getAttribute_mumjwj$(Ul().X)},Ml.prototype.y=function(){return this.getAttribute_mumjwj$(Ul().Y)},Ml.prototype.height=function(){return this.getAttribute_mumjwj$(Ul().HEIGHT)},Ml.prototype.width=function(){return this.getAttribute_mumjwj$(Ul().WIDTH)},Ml.prototype.transform=function(){return this.getAttribute_mumjwj$(Iu().TRANSFORM)},Ml.prototype.fill=function(){return this.getAttribute_mumjwj$(Vl().FILL)},Ml.prototype.fillColor=function(){return Lu().colorAttributeTransform_dc5zq8$(this.fill(),this.fillOpacity())},Ml.prototype.fillOpacity=function(){return this.getAttribute_mumjwj$(Vl().FILL_OPACITY)},Ml.prototype.stroke=function(){return this.getAttribute_mumjwj$(Vl().STROKE)},Ml.prototype.strokeColor=function(){return Lu().colorAttributeTransform_dc5zq8$(this.stroke(),this.strokeOpacity())},Ml.prototype.strokeOpacity=function(){return this.getAttribute_mumjwj$(Vl().STROKE_OPACITY)},Ml.prototype.strokeWidth=function(){return this.getAttribute_mumjwj$(Vl().STROKE_WIDTH)},Ml.prototype.pointToTransformedCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).invertTransform_12yub8$(this,t)},Ml.prototype.pointToAbsoluteCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).applyTransform_12yub8$(this,t)},Ml.$metadata$={kind:f,simpleName:"SvgRectElement",interfaces:[Hl,Ou,Ga]},Gl.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var Kl=null;function Vl(){return null===Kl&&new Gl,Kl}function Yl(){Zl(),ka.call(this)}function Wl(){Xl=this,this.CLASS=mt().createSpec_ytbaoo$("class")}Hl.$metadata$={kind:x,simpleName:"SvgShape",interfaces:[]},Wl.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var Xl=null;function Zl(){return null===Xl&&new Wl,Xl}function Jl(t){ka.call(this),this.resource=t,this.elementName_1a5z8g$_0="style",this.setContent_61zpoe$(this.resource.css())}function Ql(){nu(),Yl.call(this),this.elementName_9c3al$_0="svg"}function tu(){eu=this,this.X=mt().createSpec_ytbaoo$("x"),this.Y=mt().createSpec_ytbaoo$("y"),this.WIDTH=mt().createSpec_ytbaoo$($a().WIDTH),this.HEIGHT=mt().createSpec_ytbaoo$($a().HEIGHT),this.VIEW_BOX=mt().createSpec_ytbaoo$("viewBox")}Yl.prototype.classAttribute=function(){return this.getAttribute_mumjwj$(Zl().CLASS)},Yl.prototype.addClass_61zpoe$=function(t){this.validateClassName_rb6n0l$_0(t);var e=this.classAttribute();return null==e.get()?(e.set_11rb$(t),!0):!Z(v(e.get()),[" "]).contains_11rb$(t)&&(e.set_11rb$(e.get()+" "+t),!0)},Yl.prototype.removeClass_61zpoe$=function(t){this.validateClassName_rb6n0l$_0(t);var e=this.classAttribute();if(null==e.get())return!1;var n=W(Z(v(e.get()),[" "])),i=n.remove_11rb$(t);return i&&e.set_11rb$(this.buildClassString_fbk06u$_0(n)),i},Yl.prototype.replaceClass_puj7f4$=function(t,e){this.validateClassName_rb6n0l$_0(t),this.validateClassName_rb6n0l$_0(e);var n=this.classAttribute();if(null==n.get())throw j("Trying to replace class when class is empty");var i=Z(v(n.get()),[" "]);if(!i.contains_11rb$(t))throw j("Class attribute does not contain specified oldClass");for(var o=i.size,r=K(o),a=0;a0&&n.append_s8itvh$(32),n.append_pdl1vj$(i)}return n.toString()},Yl.prototype.validateClassName_rb6n0l$_0=function(t){if(J(t," "))throw H("Class name cannot contain spaces")},Yl.$metadata$={kind:f,simpleName:"SvgStylableElement",interfaces:[ka]},Object.defineProperty(Jl.prototype,"elementName",{configurable:!0,get:function(){return this.elementName_1a5z8g$_0}}),Jl.prototype.setContent_61zpoe$=function(t){for(var e=this.children();!e.isEmpty();)e.removeAt_za3lpa$(0);var n=new gu(t);e.add_11rb$(n),this.setAttribute_jyasbz$("type","text/css")},Jl.$metadata$={kind:f,simpleName:"SvgStyleElement",interfaces:[ka]},tu.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var eu=null;function nu(){return null===eu&&new tu,eu}function iu(t){this.this$SvgSvgElement=t}function ou(){this.myX_0=0,this.myY_0=0,this.myWidth_0=0,this.myHeight_0=0}function ru(t,e){return e=e||Object.create(ou.prototype),ou.call(e),e.myX_0=t.origin.x,e.myY_0=t.origin.y,e.myWidth_0=t.dimension.x,e.myHeight_0=t.dimension.y,e}function au(){uu(),ka.call(this),this.elementName_7co8y5$_0="tspan"}function su(){lu=this,this.X_0=mt().createSpec_ytbaoo$("x"),this.Y_0=mt().createSpec_ytbaoo$("y")}Object.defineProperty(Ql.prototype,"elementName",{configurable:!0,get:function(){return this.elementName_9c3al$_0}}),Object.defineProperty(Ql.prototype,"bBox",{configurable:!0,get:function(){return v(this.container().getPeer()).getBBox_7snaev$(this)}}),Ql.prototype.setStyle_i8z0m3$=function(t){this.children().add_11rb$(new Jl(t))},Ql.prototype.x=function(){return this.getAttribute_mumjwj$(nu().X)},Ql.prototype.y=function(){return this.getAttribute_mumjwj$(nu().Y)},Ql.prototype.width=function(){return this.getAttribute_mumjwj$(nu().WIDTH)},Ql.prototype.height=function(){return this.getAttribute_mumjwj$(nu().HEIGHT)},Ql.prototype.viewBox=function(){return this.getAttribute_mumjwj$(nu().VIEW_BOX)},iu.prototype.set_11rb$=function(t){this.this$SvgSvgElement.viewBox().set_11rb$(ru(t))},iu.$metadata$={kind:f,interfaces:[Q]},Ql.prototype.viewBoxRect=function(){return new iu(this)},Ql.prototype.opacity=function(){return this.getAttribute_mumjwj$(ba().OPACITY)},Ql.prototype.clipPath=function(){return this.getAttribute_mumjwj$(ba().CLIP_PATH)},Ql.prototype.pointToTransformedCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).invertTransform_12yub8$(this,t)},Ql.prototype.pointToAbsoluteCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).applyTransform_12yub8$(this,t)},ou.prototype.toString=function(){return this.myX_0.toString()+" "+this.myY_0+" "+this.myWidth_0+" "+this.myHeight_0},ou.$metadata$={kind:f,simpleName:"ViewBoxRectangle",interfaces:[]},Ql.$metadata$={kind:f,simpleName:"SvgSvgElement",interfaces:[Zs,ya,Yl]},su.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var lu=null;function uu(){return null===lu&&new su,lu}function cu(t,e){return e=e||Object.create(au.prototype),au.call(e),e.setText_61zpoe$(t),e}function pu(){du()}function hu(){_u=this,this.FILL=mt().createSpec_ytbaoo$("fill"),this.FILL_OPACITY=mt().createSpec_ytbaoo$("fill-opacity"),this.STROKE=mt().createSpec_ytbaoo$("stroke"),this.STROKE_OPACITY=mt().createSpec_ytbaoo$("stroke-opacity"),this.STROKE_WIDTH=mt().createSpec_ytbaoo$("stroke-width"),this.TEXT_ANCHOR=mt().createSpec_ytbaoo$($a().SVG_TEXT_ANCHOR_ATTRIBUTE),this.TEXT_DY=mt().createSpec_ytbaoo$($a().SVG_TEXT_DY_ATTRIBUTE)}Object.defineProperty(au.prototype,"elementName",{configurable:!0,get:function(){return this.elementName_7co8y5$_0}}),Object.defineProperty(au.prototype,"computedTextLength",{configurable:!0,get:function(){return v(this.container().getPeer()).getComputedTextLength_u60gfq$(this)}}),au.prototype.x=function(){return this.getAttribute_mumjwj$(uu().X_0)},au.prototype.y=function(){return this.getAttribute_mumjwj$(uu().Y_0)},au.prototype.setText_61zpoe$=function(t){this.children().clear(),this.addText_61zpoe$(t)},au.prototype.addText_61zpoe$=function(t){var e=new gu(t);this.children().add_11rb$(e)},au.prototype.fill=function(){return this.getAttribute_mumjwj$(du().FILL)},au.prototype.fillColor=function(){return Lu().colorAttributeTransform_dc5zq8$(this.fill(),this.fillOpacity())},au.prototype.fillOpacity=function(){return this.getAttribute_mumjwj$(du().FILL_OPACITY)},au.prototype.stroke=function(){return this.getAttribute_mumjwj$(du().STROKE)},au.prototype.strokeColor=function(){return Lu().colorAttributeTransform_dc5zq8$(this.stroke(),this.strokeOpacity())},au.prototype.strokeOpacity=function(){return this.getAttribute_mumjwj$(du().STROKE_OPACITY)},au.prototype.strokeWidth=function(){return this.getAttribute_mumjwj$(du().STROKE_WIDTH)},au.prototype.textAnchor=function(){return this.getAttribute_mumjwj$(du().TEXT_ANCHOR)},au.prototype.textDy=function(){return this.getAttribute_mumjwj$(du().TEXT_DY)},au.$metadata$={kind:f,simpleName:"SvgTSpanElement",interfaces:[pu,ka]},hu.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var _u=null;function du(){return null===_u&&new hu,_u}function fu(){yu(),Ga.call(this),this.elementName_s70iuw$_0="text"}function mu(){$u=this,this.X=mt().createSpec_ytbaoo$("x"),this.Y=mt().createSpec_ytbaoo$("y")}pu.$metadata$={kind:x,simpleName:"SvgTextContent",interfaces:[]},mu.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var $u=null;function yu(){return null===$u&&new mu,$u}function gu(t){xu(),Js.call(this),this.myContent_0=null,this.myContent_0=new B(t)}function vu(){wu=this,this.NO_CHILDREN_LIST_0=new bu}function bu(){et.call(this)}Object.defineProperty(fu.prototype,"elementName",{configurable:!0,get:function(){return this.elementName_s70iuw$_0}}),Object.defineProperty(fu.prototype,"computedTextLength",{configurable:!0,get:function(){return v(this.container().getPeer()).getComputedTextLength_u60gfq$(this)}}),Object.defineProperty(fu.prototype,"bBox",{configurable:!0,get:function(){return v(this.container().getPeer()).getBBox_7snaev$(this)}}),fu.prototype.x=function(){return this.getAttribute_mumjwj$(yu().X)},fu.prototype.y=function(){return this.getAttribute_mumjwj$(yu().Y)},fu.prototype.transform=function(){return this.getAttribute_mumjwj$(Iu().TRANSFORM)},fu.prototype.setTextNode_61zpoe$=function(t){this.children().clear(),this.addTextNode_61zpoe$(t)},fu.prototype.addTextNode_61zpoe$=function(t){var e=new gu(t);this.children().add_11rb$(e)},fu.prototype.setTSpan_ddcap8$=function(t){this.children().clear(),this.addTSpan_ddcap8$(t)},fu.prototype.setTSpan_61zpoe$=function(t){this.children().clear(),this.addTSpan_61zpoe$(t)},fu.prototype.addTSpan_ddcap8$=function(t){this.children().add_11rb$(t)},fu.prototype.addTSpan_61zpoe$=function(t){this.children().add_11rb$(cu(t))},fu.prototype.fill=function(){return this.getAttribute_mumjwj$(du().FILL)},fu.prototype.fillColor=function(){return Lu().colorAttributeTransform_dc5zq8$(this.fill(),this.fillOpacity())},fu.prototype.fillOpacity=function(){return this.getAttribute_mumjwj$(du().FILL_OPACITY)},fu.prototype.stroke=function(){return this.getAttribute_mumjwj$(du().STROKE)},fu.prototype.strokeColor=function(){return Lu().colorAttributeTransform_dc5zq8$(this.stroke(),this.strokeOpacity())},fu.prototype.strokeOpacity=function(){return this.getAttribute_mumjwj$(du().STROKE_OPACITY)},fu.prototype.strokeWidth=function(){return this.getAttribute_mumjwj$(du().STROKE_WIDTH)},fu.prototype.textAnchor=function(){return this.getAttribute_mumjwj$(du().TEXT_ANCHOR)},fu.prototype.textDy=function(){return this.getAttribute_mumjwj$(du().TEXT_DY)},fu.prototype.pointToTransformedCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).invertTransform_12yub8$(this,t)},fu.prototype.pointToAbsoluteCoordinates_gpjtzr$=function(t){return v(this.container().getPeer()).applyTransform_12yub8$(this,t)},fu.$metadata$={kind:f,simpleName:"SvgTextElement",interfaces:[pu,Ou,Ga]},gu.prototype.textContent=function(){return this.myContent_0},gu.prototype.children=function(){return xu().NO_CHILDREN_LIST_0},gu.prototype.toString=function(){return this.textContent().get()},bu.prototype.checkAdd_wxm5ur$=function(t,e){throw tt("Cannot add children to SvgTextNode")},bu.prototype.checkRemove_wxm5ur$=function(t,e){throw tt("Cannot remove children from SvgTextNode")},bu.$metadata$={kind:f,interfaces:[et]},vu.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var wu=null;function xu(){return null===wu&&new vu,wu}function ku(t){Su(),this.myTransform_0=t}function Cu(){Eu=this,this.EMPTY=new ku(""),this.MATRIX="matrix",this.ROTATE="rotate",this.SCALE="scale",this.SKEW_X="skewX",this.SKEW_Y="skewY",this.TRANSLATE="translate"}gu.$metadata$={kind:f,simpleName:"SvgTextNode",interfaces:[Js]},ku.prototype.toString=function(){return this.myTransform_0},Cu.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var Eu=null;function Su(){return null===Eu&&new Cu,Eu}function Tu(){this.myStringBuilder_0=o()}function Ou(){Iu()}function Nu(){Pu=this,this.TRANSFORM=mt().createSpec_ytbaoo$("transform")}ku.$metadata$={kind:f,simpleName:"SvgTransform",interfaces:[]},Tu.prototype.build=function(){return new ku(this.myStringBuilder_0.toString())},Tu.prototype.addTransformation_0=function(t,e){var n;for(this.myStringBuilder_0.append_pdl1vj$(t).append_s8itvh$(40),n=0;n!==e.length;++n){var i=e[n];this.myStringBuilder_0.append_s8jyv4$(i).append_s8itvh$(32)}return this.myStringBuilder_0.append_pdl1vj$(") "),this},Tu.prototype.matrix_15yvbs$=function(t,e,n,i,o,r){return this.addTransformation_0(Su().MATRIX,new Float64Array([t,e,n,i,o,r]))},Tu.prototype.translate_lu1900$=function(t,e){return this.addTransformation_0(Su().TRANSLATE,new Float64Array([t,e]))},Tu.prototype.translate_gpjtzr$=function(t){return this.translate_lu1900$(t.x,t.y)},Tu.prototype.translate_14dthe$=function(t){return this.addTransformation_0(Su().TRANSLATE,new Float64Array([t]))},Tu.prototype.scale_lu1900$=function(t,e){return this.addTransformation_0(Su().SCALE,new Float64Array([t,e]))},Tu.prototype.scale_14dthe$=function(t){return this.addTransformation_0(Su().SCALE,new Float64Array([t]))},Tu.prototype.rotate_yvo9jy$=function(t,e,n){return this.addTransformation_0(Su().ROTATE,new Float64Array([t,e,n]))},Tu.prototype.rotate_jx7lbv$=function(t,e){return this.rotate_yvo9jy$(t,e.x,e.y)},Tu.prototype.rotate_14dthe$=function(t){return this.addTransformation_0(Su().ROTATE,new Float64Array([t]))},Tu.prototype.skewX_14dthe$=function(t){return this.addTransformation_0(Su().SKEW_X,new Float64Array([t]))},Tu.prototype.skewY_14dthe$=function(t){return this.addTransformation_0(Su().SKEW_Y,new Float64Array([t]))},Tu.$metadata$={kind:f,simpleName:"SvgTransformBuilder",interfaces:[]},Nu.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var Pu=null;function Iu(){return null===Pu&&new Nu,Pu}function Au(){ju=this,this.OPACITY_TABLE_0=new Float64Array(256);for(var t=0;t<=255;t++)this.OPACITY_TABLE_0[t]=t/255}function Ru(t,e){this.closure$color=t,this.closure$opacity=e}Ou.$metadata$={kind:x,simpleName:"SvgTransformable",interfaces:[Zs]},Au.prototype.opacity_98b62m$=function(t){return this.OPACITY_TABLE_0[t.alpha]},Au.prototype.alpha2opacity_za3lpa$=function(t){return this.OPACITY_TABLE_0[t]},Au.prototype.toARGB_98b62m$=function(t){return this.toARGB_tjonv8$(t.red,t.green,t.blue,t.alpha)},Au.prototype.toARGB_o14uds$=function(t,e){var n=t.red,i=t.green,o=t.blue,r=255*e,a=X.min(255,r);return this.toARGB_tjonv8$(n,i,o,nt(X.max(0,a)))},Au.prototype.toARGB_tjonv8$=function(t,e,n,i){return(i<<24)+((t<<16)+(e<<8)+n|0)|0},Ru.prototype.set_11rb$=function(t){this.closure$color.set_11rb$(_a().create_2160e9$(t)),null!=t?this.closure$opacity.set_11rb$(Lu().opacity_98b62m$(t)):this.closure$opacity.set_11rb$(1)},Ru.$metadata$={kind:f,interfaces:[Q]},Au.prototype.colorAttributeTransform_dc5zq8$=function(t,e){return new Ru(t,e)},Au.prototype.transformMatrix_98ex5o$=function(t,e,n,i,o,r,a){t.transform().set_11rb$((new Tu).matrix_15yvbs$(e,n,i,o,r,a).build())},Au.prototype.transformTranslate_pw34rw$=function(t,e,n){t.transform().set_11rb$((new Tu).translate_lu1900$(e,n).build())},Au.prototype.transformTranslate_cbcjvx$=function(t,e){this.transformTranslate_pw34rw$(t,e.x,e.y)},Au.prototype.transformTranslate_wl99a6$=function(t,e){t.transform().set_11rb$((new Tu).translate_14dthe$(e).build())},Au.prototype.transformScale_pw34rw$=function(t,e,n){t.transform().set_11rb$((new Tu).scale_lu1900$(e,n).build())},Au.prototype.transformScale_wl99a6$=function(t,e){t.transform().set_11rb$((new Tu).scale_14dthe$(e).build())},Au.prototype.transformRotate_tk1esa$=function(t,e,n,i){t.transform().set_11rb$((new Tu).rotate_yvo9jy$(e,n,i).build())},Au.prototype.transformRotate_wl99a6$=function(t,e){t.transform().set_11rb$((new Tu).rotate_14dthe$(e).build())},Au.prototype.transformSkewX_wl99a6$=function(t,e){t.transform().set_11rb$((new Tu).skewX_14dthe$(e).build())},Au.prototype.transformSkewY_wl99a6$=function(t,e){t.transform().set_11rb$((new Tu).skewY_14dthe$(e).build())},Au.prototype.copyAttributes_azdp7k$=function(t,n){var i,o;for(i=t.attributeKeys.iterator();i.hasNext();){var r=i.next(),a=e.isType(o=r,_t)?o:m();n.setAttribute_qdh7ux$(a,t.getAttribute_mumjwj$(r).get())}},Au.prototype.pngDataURI_61zpoe$=function(t){return new M("data:image/png;base64,").append_pdl1vj$(t).toString()},Au.$metadata$={kind:d,simpleName:"SvgUtils",interfaces:[]};var ju=null;function Lu(){return null===ju&&new Au,ju}function zu(){Hu=this,this.SVG_NAMESPACE_URI="http://www.w3.org/2000/svg",this.XLINK_NAMESPACE_URI="http://www.w3.org/1999/xlink",this.XLINK_PREFIX="xlink"}zu.$metadata$={kind:d,simpleName:"XmlNamespace",interfaces:[]};var Du,Mu,Bu,Fu,Uu,qu,Hu=null;function Gu(){return null===Hu&&new zu,Hu}function Ku(t,e,n){it.call(this),this.attrSpec=t,this.oldValue=e,this.newValue=n}function Vu(){}function Yu(t,e){b.call(this),this.name$=t,this.ordinal$=e}function Wu(){Wu=function(){},Du=new Yu("MOUSE_CLICKED",0),Mu=new Yu("MOUSE_PRESSED",1),Bu=new Yu("MOUSE_RELEASED",2),Fu=new Yu("MOUSE_OVER",3),Uu=new Yu("MOUSE_MOVE",4),qu=new Yu("MOUSE_OUT",5)}function Xu(){return Wu(),Du}function Zu(){return Wu(),Mu}function Ju(){return Wu(),Bu}function Qu(){return Wu(),Fu}function tc(){return Wu(),Uu}function ec(){return Wu(),qu}function nc(){Js.call(this),this.isPrebuiltSubtree=!0}function ic(t){lc.call(this,t),this.myAttributes_0=e.newArray(pc().ATTR_COUNT_8be2vx$,null)}function oc(t,e){this.closure$key=t,this.closure$value=e}function rc(t){ic.call(this,dc().GROUP),this.myChildren_0=K(t)}function ac(t){nc.call(this),this.myGroup_0=t}function sc(t,e,n){return n=n||Object.create(rc.prototype),rc.call(n,t),n.setAttribute_vux3hl$(19,e),n}function lc(t){pc(),this.elementName=t}function uc(){cc=this,this.fill_8be2vx$=0,this.fillOpacity_8be2vx$=1,this.stroke_8be2vx$=2,this.strokeOpacity_8be2vx$=3,this.strokeWidth_8be2vx$=4,this.strokeTransform_8be2vx$=5,this.classes_8be2vx$=6,this.x1_8be2vx$=7,this.y1_8be2vx$=8,this.x2_8be2vx$=9,this.y2_8be2vx$=10,this.cx_8be2vx$=11,this.cy_8be2vx$=12,this.r_8be2vx$=13,this.x_8be2vx$=14,this.y_8be2vx$=15,this.height_8be2vx$=16,this.width_8be2vx$=17,this.pathData_8be2vx$=18,this.transform_8be2vx$=19,this.ATTR_KEYS_8be2vx$=["fill","fill-opacity","stroke","stroke-opacity","stroke-width","transform","classes","x1","y1","x2","y2","cx","cy","r","x","y","height","width","d","transform"],this.ATTR_COUNT_8be2vx$=this.ATTR_KEYS_8be2vx$.length}Ku.$metadata$={kind:f,simpleName:"SvgAttributeEvent",interfaces:[it]},Vu.$metadata$={kind:x,simpleName:"SvgEventHandler",interfaces:[]},Yu.$metadata$={kind:f,simpleName:"SvgEventSpec",interfaces:[b]},Yu.values=function(){return[Xu(),Zu(),Ju(),Qu(),tc(),ec()]},Yu.valueOf_61zpoe$=function(t){switch(t){case"MOUSE_CLICKED":return Xu();case"MOUSE_PRESSED":return Zu();case"MOUSE_RELEASED":return Ju();case"MOUSE_OVER":return Qu();case"MOUSE_MOVE":return tc();case"MOUSE_OUT":return ec();default:w("No enum constant jetbrains.datalore.vis.svg.event.SvgEventSpec."+t)}},nc.prototype.children=function(){var t=Js.prototype.children.call(this);if(!t.isEmpty())throw j("Can't have children");return t},nc.$metadata$={kind:f,simpleName:"DummySvgNode",interfaces:[Js]},Object.defineProperty(oc.prototype,"key",{configurable:!0,get:function(){return this.closure$key}}),Object.defineProperty(oc.prototype,"value",{configurable:!0,get:function(){return this.closure$value.toString()}}),oc.$metadata$={kind:f,interfaces:[$c]},Object.defineProperty(ic.prototype,"attributes",{configurable:!0,get:function(){var t,e,n=this.myAttributes_0,i=K(n.length),o=0;for(t=0;t!==n.length;++t){var r,a=n[t],s=i.add_11rb$,l=(o=(e=o)+1|0,e),u=pc().ATTR_KEYS_8be2vx$[l];r=null==a?null:new oc(u,a),s.call(i,r)}return ot(i)}}),Object.defineProperty(ic.prototype,"slimChildren",{configurable:!0,get:function(){return rt()}}),ic.prototype.setAttribute_vux3hl$=function(t,e){this.myAttributes_0[t]=e},ic.prototype.hasAttribute_za3lpa$=function(t){return null!=this.myAttributes_0[t]},ic.prototype.getAttribute_za3lpa$=function(t){return this.myAttributes_0[t]},ic.prototype.appendTo_i2myw1$=function(t){var n;(e.isType(n=t,rc)?n:m()).addChild_3o5936$(this)},ic.$metadata$={kind:f,simpleName:"ElementJava",interfaces:[mc,lc]},Object.defineProperty(rc.prototype,"slimChildren",{configurable:!0,get:function(){var t,e=this.myChildren_0,n=K(at(e,10));for(t=e.iterator();t.hasNext();){var i=t.next();n.add_11rb$(i)}return n}}),rc.prototype.addChild_3o5936$=function(t){this.myChildren_0.add_11rb$(t)},rc.prototype.asDummySvgNode=function(){return new ac(this)},Object.defineProperty(ac.prototype,"elementName",{configurable:!0,get:function(){return this.myGroup_0.elementName}}),Object.defineProperty(ac.prototype,"attributes",{configurable:!0,get:function(){return this.myGroup_0.attributes}}),Object.defineProperty(ac.prototype,"slimChildren",{configurable:!0,get:function(){return this.myGroup_0.slimChildren}}),ac.$metadata$={kind:f,simpleName:"MyDummySvgNode",interfaces:[mc,nc]},rc.$metadata$={kind:f,simpleName:"GroupJava",interfaces:[fc,ic]},uc.$metadata$={kind:d,simpleName:"Companion",interfaces:[]};var cc=null;function pc(){return null===cc&&new uc,cc}function hc(){_c=this,this.GROUP="g",this.LINE="line",this.CIRCLE="circle",this.RECT="rect",this.PATH="path"}lc.prototype.setFill_o14uds$=function(t,e){this.setAttribute_vux3hl$(0,t.toHexColor()),e<1&&this.setAttribute_vux3hl$(1,e.toString())},lc.prototype.setStroke_o14uds$=function(t,e){this.setAttribute_vux3hl$(2,t.toHexColor()),e<1&&this.setAttribute_vux3hl$(3,e.toString())},lc.prototype.setStrokeWidth_14dthe$=function(t){this.setAttribute_vux3hl$(4,t.toString())},lc.prototype.setAttribute_7u9h3l$=function(t,e){this.setAttribute_vux3hl$(t,e.toString())},lc.$metadata$={kind:f,simpleName:"SlimBase",interfaces:[gc]},hc.prototype.createElement_0=function(t){return new ic(t)},hc.prototype.g_za3lpa$=function(t){return new rc(t)},hc.prototype.g_vux3hl$=function(t,e){return sc(t,e)},hc.prototype.line_6y0v78$=function(t,e,n,i){var o=this.createElement_0(this.LINE);return o.setAttribute_7u9h3l$(7,t),o.setAttribute_7u9h3l$(8,e),o.setAttribute_7u9h3l$(9,n),o.setAttribute_7u9h3l$(10,i),o},hc.prototype.circle_yvo9jy$=function(t,e,n){var i=this.createElement_0(this.CIRCLE);return i.setAttribute_7u9h3l$(11,t),i.setAttribute_7u9h3l$(12,e),i.setAttribute_7u9h3l$(13,n),i},hc.prototype.rect_6y0v78$=function(t,e,n,i){var o=this.createElement_0(this.RECT);return o.setAttribute_7u9h3l$(14,t),o.setAttribute_7u9h3l$(15,e),o.setAttribute_7u9h3l$(17,n),o.setAttribute_7u9h3l$(16,i),o},hc.prototype.path_za3rmp$=function(t){var e=this.createElement_0(this.PATH);return e.setAttribute_vux3hl$(18,t.toString()),e},hc.$metadata$={kind:d,simpleName:"SvgSlimElements",interfaces:[]};var _c=null;function dc(){return null===_c&&new hc,_c}function fc(){}function mc(){}function $c(){}function yc(){}function gc(){}fc.$metadata$={kind:x,simpleName:"SvgSlimGroup",interfaces:[yc]},$c.$metadata$={kind:x,simpleName:"Attr",interfaces:[]},mc.$metadata$={kind:x,simpleName:"SvgSlimNode",interfaces:[]},yc.$metadata$={kind:x,simpleName:"SvgSlimObject",interfaces:[]},gc.$metadata$={kind:x,simpleName:"SvgSlimShape",interfaces:[yc]},Object.defineProperty(st,"Companion",{get:pt});var vc=t.jetbrains||(t.jetbrains={}),bc=vc.datalore||(vc.datalore={}),wc=bc.vis||(bc.vis={});wc.StyleSheet=st,wc.TextStyle=ht,Object.defineProperty(_t,"Companion",{get:mt});var xc=wc.svg||(wc.svg={});xc.SvgAttributeSpec=_t,Object.defineProperty($t,"Companion",{get:vt}),xc.SvgCircleElement_init_yvo9jy$=function(t,e,n,i){return i=i||Object.create($t.prototype),$t.call(i),i.setAttribute_qdh7ux$(vt().CX,t),i.setAttribute_qdh7ux$(vt().CY,e),i.setAttribute_qdh7ux$(vt().R,n),i},xc.SvgCircleElement=$t,Object.defineProperty(bt,"Companion",{get:di}),Object.defineProperty(fi,"USER_SPACE_ON_USE",{get:$i}),Object.defineProperty(fi,"OBJECT_BOUNDING_BOX",{get:yi}),bt.ClipPathUnits=fi,xc.SvgClipPathElement=bt,xc.SvgColor=gi,Object.defineProperty(vi,"ALICE_BLUE",{get:wi}),Object.defineProperty(vi,"ANTIQUE_WHITE",{get:xi}),Object.defineProperty(vi,"AQUA",{get:ki}),Object.defineProperty(vi,"AQUAMARINE",{get:Ci}),Object.defineProperty(vi,"AZURE",{get:Ei}),Object.defineProperty(vi,"BEIGE",{get:Si}),Object.defineProperty(vi,"BISQUE",{get:Ti}),Object.defineProperty(vi,"BLACK",{get:Oi}),Object.defineProperty(vi,"BLANCHED_ALMOND",{get:Ni}),Object.defineProperty(vi,"BLUE",{get:Pi}),Object.defineProperty(vi,"BLUE_VIOLET",{get:Ii}),Object.defineProperty(vi,"BROWN",{get:Ai}),Object.defineProperty(vi,"BURLY_WOOD",{get:Ri}),Object.defineProperty(vi,"CADET_BLUE",{get:ji}),Object.defineProperty(vi,"CHARTREUSE",{get:Li}),Object.defineProperty(vi,"CHOCOLATE",{get:zi}),Object.defineProperty(vi,"CORAL",{get:Di}),Object.defineProperty(vi,"CORNFLOWER_BLUE",{get:Mi}),Object.defineProperty(vi,"CORNSILK",{get:Bi}),Object.defineProperty(vi,"CRIMSON",{get:Fi}),Object.defineProperty(vi,"CYAN",{get:Ui}),Object.defineProperty(vi,"DARK_BLUE",{get:qi}),Object.defineProperty(vi,"DARK_CYAN",{get:Hi}),Object.defineProperty(vi,"DARK_GOLDEN_ROD",{get:Gi}),Object.defineProperty(vi,"DARK_GRAY",{get:Ki}),Object.defineProperty(vi,"DARK_GREEN",{get:Vi}),Object.defineProperty(vi,"DARK_GREY",{get:Yi}),Object.defineProperty(vi,"DARK_KHAKI",{get:Wi}),Object.defineProperty(vi,"DARK_MAGENTA",{get:Xi}),Object.defineProperty(vi,"DARK_OLIVE_GREEN",{get:Zi}),Object.defineProperty(vi,"DARK_ORANGE",{get:Ji}),Object.defineProperty(vi,"DARK_ORCHID",{get:Qi}),Object.defineProperty(vi,"DARK_RED",{get:to}),Object.defineProperty(vi,"DARK_SALMON",{get:eo}),Object.defineProperty(vi,"DARK_SEA_GREEN",{get:no}),Object.defineProperty(vi,"DARK_SLATE_BLUE",{get:io}),Object.defineProperty(vi,"DARK_SLATE_GRAY",{get:oo}),Object.defineProperty(vi,"DARK_SLATE_GREY",{get:ro}),Object.defineProperty(vi,"DARK_TURQUOISE",{get:ao}),Object.defineProperty(vi,"DARK_VIOLET",{get:so}),Object.defineProperty(vi,"DEEP_PINK",{get:lo}),Object.defineProperty(vi,"DEEP_SKY_BLUE",{get:uo}),Object.defineProperty(vi,"DIM_GRAY",{get:co}),Object.defineProperty(vi,"DIM_GREY",{get:po}),Object.defineProperty(vi,"DODGER_BLUE",{get:ho}),Object.defineProperty(vi,"FIRE_BRICK",{get:_o}),Object.defineProperty(vi,"FLORAL_WHITE",{get:fo}),Object.defineProperty(vi,"FOREST_GREEN",{get:mo}),Object.defineProperty(vi,"FUCHSIA",{get:$o}),Object.defineProperty(vi,"GAINSBORO",{get:yo}),Object.defineProperty(vi,"GHOST_WHITE",{get:go}),Object.defineProperty(vi,"GOLD",{get:vo}),Object.defineProperty(vi,"GOLDEN_ROD",{get:bo}),Object.defineProperty(vi,"GRAY",{get:wo}),Object.defineProperty(vi,"GREY",{get:xo}),Object.defineProperty(vi,"GREEN",{get:ko}),Object.defineProperty(vi,"GREEN_YELLOW",{get:Co}),Object.defineProperty(vi,"HONEY_DEW",{get:Eo}),Object.defineProperty(vi,"HOT_PINK",{get:So}),Object.defineProperty(vi,"INDIAN_RED",{get:To}),Object.defineProperty(vi,"INDIGO",{get:Oo}),Object.defineProperty(vi,"IVORY",{get:No}),Object.defineProperty(vi,"KHAKI",{get:Po}),Object.defineProperty(vi,"LAVENDER",{get:Io}),Object.defineProperty(vi,"LAVENDER_BLUSH",{get:Ao}),Object.defineProperty(vi,"LAWN_GREEN",{get:Ro}),Object.defineProperty(vi,"LEMON_CHIFFON",{get:jo}),Object.defineProperty(vi,"LIGHT_BLUE",{get:Lo}),Object.defineProperty(vi,"LIGHT_CORAL",{get:zo}),Object.defineProperty(vi,"LIGHT_CYAN",{get:Do}),Object.defineProperty(vi,"LIGHT_GOLDEN_ROD_YELLOW",{get:Mo}),Object.defineProperty(vi,"LIGHT_GRAY",{get:Bo}),Object.defineProperty(vi,"LIGHT_GREEN",{get:Fo}),Object.defineProperty(vi,"LIGHT_GREY",{get:Uo}),Object.defineProperty(vi,"LIGHT_PINK",{get:qo}),Object.defineProperty(vi,"LIGHT_SALMON",{get:Ho}),Object.defineProperty(vi,"LIGHT_SEA_GREEN",{get:Go}),Object.defineProperty(vi,"LIGHT_SKY_BLUE",{get:Ko}),Object.defineProperty(vi,"LIGHT_SLATE_GRAY",{get:Vo}),Object.defineProperty(vi,"LIGHT_SLATE_GREY",{get:Yo}),Object.defineProperty(vi,"LIGHT_STEEL_BLUE",{get:Wo}),Object.defineProperty(vi,"LIGHT_YELLOW",{get:Xo}),Object.defineProperty(vi,"LIME",{get:Zo}),Object.defineProperty(vi,"LIME_GREEN",{get:Jo}),Object.defineProperty(vi,"LINEN",{get:Qo}),Object.defineProperty(vi,"MAGENTA",{get:tr}),Object.defineProperty(vi,"MAROON",{get:er}),Object.defineProperty(vi,"MEDIUM_AQUA_MARINE",{get:nr}),Object.defineProperty(vi,"MEDIUM_BLUE",{get:ir}),Object.defineProperty(vi,"MEDIUM_ORCHID",{get:or}),Object.defineProperty(vi,"MEDIUM_PURPLE",{get:rr}),Object.defineProperty(vi,"MEDIUM_SEAGREEN",{get:ar}),Object.defineProperty(vi,"MEDIUM_SLATE_BLUE",{get:sr}),Object.defineProperty(vi,"MEDIUM_SPRING_GREEN",{get:lr}),Object.defineProperty(vi,"MEDIUM_TURQUOISE",{get:ur}),Object.defineProperty(vi,"MEDIUM_VIOLET_RED",{get:cr}),Object.defineProperty(vi,"MIDNIGHT_BLUE",{get:pr}),Object.defineProperty(vi,"MINT_CREAM",{get:hr}),Object.defineProperty(vi,"MISTY_ROSE",{get:_r}),Object.defineProperty(vi,"MOCCASIN",{get:dr}),Object.defineProperty(vi,"NAVAJO_WHITE",{get:fr}),Object.defineProperty(vi,"NAVY",{get:mr}),Object.defineProperty(vi,"OLD_LACE",{get:$r}),Object.defineProperty(vi,"OLIVE",{get:yr}),Object.defineProperty(vi,"OLIVE_DRAB",{get:gr}),Object.defineProperty(vi,"ORANGE",{get:vr}),Object.defineProperty(vi,"ORANGE_RED",{get:br}),Object.defineProperty(vi,"ORCHID",{get:wr}),Object.defineProperty(vi,"PALE_GOLDEN_ROD",{get:xr}),Object.defineProperty(vi,"PALE_GREEN",{get:kr}),Object.defineProperty(vi,"PALE_TURQUOISE",{get:Cr}),Object.defineProperty(vi,"PALE_VIOLET_RED",{get:Er}),Object.defineProperty(vi,"PAPAYA_WHIP",{get:Sr}),Object.defineProperty(vi,"PEACH_PUFF",{get:Tr}),Object.defineProperty(vi,"PERU",{get:Or}),Object.defineProperty(vi,"PINK",{get:Nr}),Object.defineProperty(vi,"PLUM",{get:Pr}),Object.defineProperty(vi,"POWDER_BLUE",{get:Ir}),Object.defineProperty(vi,"PURPLE",{get:Ar}),Object.defineProperty(vi,"RED",{get:Rr}),Object.defineProperty(vi,"ROSY_BROWN",{get:jr}),Object.defineProperty(vi,"ROYAL_BLUE",{get:Lr}),Object.defineProperty(vi,"SADDLE_BROWN",{get:zr}),Object.defineProperty(vi,"SALMON",{get:Dr}),Object.defineProperty(vi,"SANDY_BROWN",{get:Mr}),Object.defineProperty(vi,"SEA_GREEN",{get:Br}),Object.defineProperty(vi,"SEASHELL",{get:Fr}),Object.defineProperty(vi,"SIENNA",{get:Ur}),Object.defineProperty(vi,"SILVER",{get:qr}),Object.defineProperty(vi,"SKY_BLUE",{get:Hr}),Object.defineProperty(vi,"SLATE_BLUE",{get:Gr}),Object.defineProperty(vi,"SLATE_GRAY",{get:Kr}),Object.defineProperty(vi,"SLATE_GREY",{get:Vr}),Object.defineProperty(vi,"SNOW",{get:Yr}),Object.defineProperty(vi,"SPRING_GREEN",{get:Wr}),Object.defineProperty(vi,"STEEL_BLUE",{get:Xr}),Object.defineProperty(vi,"TAN",{get:Zr}),Object.defineProperty(vi,"TEAL",{get:Jr}),Object.defineProperty(vi,"THISTLE",{get:Qr}),Object.defineProperty(vi,"TOMATO",{get:ta}),Object.defineProperty(vi,"TURQUOISE",{get:ea}),Object.defineProperty(vi,"VIOLET",{get:na}),Object.defineProperty(vi,"WHEAT",{get:ia}),Object.defineProperty(vi,"WHITE",{get:oa}),Object.defineProperty(vi,"WHITE_SMOKE",{get:ra}),Object.defineProperty(vi,"YELLOW",{get:aa}),Object.defineProperty(vi,"YELLOW_GREEN",{get:sa}),Object.defineProperty(vi,"NONE",{get:la}),Object.defineProperty(vi,"CURRENT_COLOR",{get:ua}),Object.defineProperty(vi,"Companion",{get:_a}),xc.SvgColors=vi,Object.defineProperty(xc,"SvgConstants",{get:$a}),Object.defineProperty(ya,"Companion",{get:ba}),xc.SvgContainer=ya,xc.SvgCssResource=wa,xc.SvgDefsElement=xa,Object.defineProperty(ka,"Companion",{get:Sa}),xc.SvgElement=ka,xc.SvgElementListener=Aa,Object.defineProperty(Ra,"Companion",{get:za}),xc.SvgEllipseElement=Ra,xc.SvgEventPeer=Da,xc.SvgGElement=Ha,Object.defineProperty(Ga,"Companion",{get:ls}),Object.defineProperty(us,"VISIBLE_PAINTED",{get:ps}),Object.defineProperty(us,"VISIBLE_FILL",{get:hs}),Object.defineProperty(us,"VISIBLE_STROKE",{get:_s}),Object.defineProperty(us,"VISIBLE",{get:ds}),Object.defineProperty(us,"PAINTED",{get:fs}),Object.defineProperty(us,"FILL",{get:ms}),Object.defineProperty(us,"STROKE",{get:$s}),Object.defineProperty(us,"ALL",{get:ys}),Object.defineProperty(us,"NONE",{get:gs}),Object.defineProperty(us,"INHERIT",{get:vs}),Ga.PointerEvents=us,Object.defineProperty(bs,"VISIBLE",{get:xs}),Object.defineProperty(bs,"HIDDEN",{get:ks}),Object.defineProperty(bs,"COLLAPSE",{get:Cs}),Object.defineProperty(bs,"INHERIT",{get:Es}),Ga.Visibility=bs,xc.SvgGraphicsElement=Ga,xc.SvgIRI=Ss,Object.defineProperty(Ts,"Companion",{get:Ps}),xc.SvgImageElement_init_6y0v78$=Is,xc.SvgImageElement=Ts,As.RGBEncoder=js,As.Bitmap=Ls,xc.SvgImageElementEx=As,Object.defineProperty(zs,"Companion",{get:Xs}),xc.SvgLineElement_init_6y0v78$=function(t,e,n,i,o){return o=o||Object.create(zs.prototype),zs.call(o),o.setAttribute_qdh7ux$(Xs().X1,t),o.setAttribute_qdh7ux$(Xs().Y1,e),o.setAttribute_qdh7ux$(Xs().X2,n),o.setAttribute_qdh7ux$(Xs().Y2,i),o},xc.SvgLineElement=zs,xc.SvgLocatable=Zs,xc.SvgNode=Js,xc.SvgNodeContainer=tl,Object.defineProperty(al,"MOVE_TO",{get:ll}),Object.defineProperty(al,"LINE_TO",{get:ul}),Object.defineProperty(al,"HORIZONTAL_LINE_TO",{get:cl}),Object.defineProperty(al,"VERTICAL_LINE_TO",{get:pl}),Object.defineProperty(al,"CURVE_TO",{get:hl}),Object.defineProperty(al,"SMOOTH_CURVE_TO",{get:_l}),Object.defineProperty(al,"QUADRATIC_BEZIER_CURVE_TO",{get:dl}),Object.defineProperty(al,"SMOOTH_QUADRATIC_BEZIER_CURVE_TO",{get:fl}),Object.defineProperty(al,"ELLIPTICAL_ARC",{get:ml}),Object.defineProperty(al,"CLOSE_PATH",{get:$l}),Object.defineProperty(al,"Companion",{get:vl}),rl.Action=al,Object.defineProperty(rl,"Companion",{get:Sl}),xc.SvgPathData=rl,Object.defineProperty(Ol,"LINEAR",{get:Pl}),Object.defineProperty(Ol,"CARDINAL",{get:Il}),Object.defineProperty(Ol,"MONOTONE",{get:Al}),Tl.Interpolation=Ol,xc.SvgPathDataBuilder=Tl,Object.defineProperty(Rl,"Companion",{get:zl}),xc.SvgPathElement_init_7jrsat$=function(t,e){return e=e||Object.create(Rl.prototype),Rl.call(e),e.setAttribute_qdh7ux$(zl().D,t),e},xc.SvgPathElement=Rl,xc.SvgPlatformPeer=Dl,Object.defineProperty(Ml,"Companion",{get:Ul}),xc.SvgRectElement_init_6y0v78$=ql,xc.SvgRectElement_init_wthzt5$=function(t,e){return e=e||Object.create(Ml.prototype),ql(t.origin.x,t.origin.y,t.dimension.x,t.dimension.y,e),e},xc.SvgRectElement=Ml,Object.defineProperty(Hl,"Companion",{get:Vl}),xc.SvgShape=Hl,Object.defineProperty(Yl,"Companion",{get:Zl}),xc.SvgStylableElement=Yl,xc.SvgStyleElement=Jl,Object.defineProperty(Ql,"Companion",{get:nu}),Ql.ViewBoxRectangle_init_6y0v78$=function(t,e,n,i,o){return o=o||Object.create(ou.prototype),ou.call(o),o.myX_0=t,o.myY_0=e,o.myWidth_0=n,o.myHeight_0=i,o},Ql.ViewBoxRectangle_init_wthzt5$=ru,Ql.ViewBoxRectangle=ou,xc.SvgSvgElement=Ql,Object.defineProperty(au,"Companion",{get:uu}),xc.SvgTSpanElement_init_61zpoe$=cu,xc.SvgTSpanElement=au,Object.defineProperty(pu,"Companion",{get:du}),xc.SvgTextContent=pu,Object.defineProperty(fu,"Companion",{get:yu}),xc.SvgTextElement_init_61zpoe$=function(t,e){return e=e||Object.create(fu.prototype),fu.call(e),e.setTextNode_61zpoe$(t),e},xc.SvgTextElement=fu,Object.defineProperty(gu,"Companion",{get:xu}),xc.SvgTextNode=gu,Object.defineProperty(ku,"Companion",{get:Su}),xc.SvgTransform=ku,xc.SvgTransformBuilder=Tu,Object.defineProperty(Ou,"Companion",{get:Iu}),xc.SvgTransformable=Ou,Object.defineProperty(xc,"SvgUtils",{get:Lu}),Object.defineProperty(xc,"XmlNamespace",{get:Gu});var kc=xc.event||(xc.event={});kc.SvgAttributeEvent=Ku,kc.SvgEventHandler=Vu,Object.defineProperty(Yu,"MOUSE_CLICKED",{get:Xu}),Object.defineProperty(Yu,"MOUSE_PRESSED",{get:Zu}),Object.defineProperty(Yu,"MOUSE_RELEASED",{get:Ju}),Object.defineProperty(Yu,"MOUSE_OVER",{get:Qu}),Object.defineProperty(Yu,"MOUSE_MOVE",{get:tc}),Object.defineProperty(Yu,"MOUSE_OUT",{get:ec}),kc.SvgEventSpec=Yu;var Cc=xc.slim||(xc.slim={});return Cc.DummySvgNode=nc,Cc.ElementJava=ic,Cc.GroupJava_init_vux3hl$=sc,Cc.GroupJava=rc,Object.defineProperty(lc,"Companion",{get:pc}),Cc.SlimBase=lc,Object.defineProperty(Cc,"SvgSlimElements",{get:dc}),Cc.SvgSlimGroup=fc,mc.Attr=$c,Cc.SvgSlimNode=mc,Cc.SvgSlimObject=yc,Cc.SvgSlimShape=gc,t})?i.apply(e,o):i)||(t.exports=r)}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var n=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t].call(n.exports,n,n.exports,__webpack_require__),n.exports}var __webpack_exports__=__webpack_require__(837);window.LetsPlot=__webpack_exports__})(); //# sourceMappingURL=js-package.js.map \ No newline at end of file diff --git a/python-package/lets_plot/_version.py b/python-package/lets_plot/_version.py index 5a1b006af2f..cc421278a82 100644 --- a/python-package/lets_plot/_version.py +++ b/python-package/lets_plot/_version.py @@ -3,4 +3,4 @@ # Use of this source code is governed by the MIT license that can be found in the LICENSE file. # # see: https://www.python.org/dev/peps/pep-0440/#developmental-releases -__version__ = '3.0.1.dev1' +__version__ = '3.0.0'