From a2d6a3dbb714f123d325158be01b6f8c27186ef5 Mon Sep 17 00:00:00 2001 From: Gerasimos Deligiannis Date: Wed, 2 Aug 2023 14:14:50 +0300 Subject: [PATCH] Implement map panel --- README.md | 7 +- assets/js/app.js | 4 +- assets/js/components/map_hook.js | 72 + assets/js/luminous.js | 3 +- assets/package-lock.json | 13 + assets/package.json | 3 +- assets/topojson/europe.topo.json | 1 + dev/demo_dashboard_live.ex | 58 + dev/test_dashboard_live.ex | 11 + dist/luminous.js | 11409 +++++++++++++++++++++++++++++ lib/luminous/components.ex | 34 + lib/luminous/live.ex | 15 + lib/luminous/panel.ex | 20 +- lib/luminous/panel/map.ex | 7 + lib/luminous/query.ex | 16 +- test/luminous/live_test.exs | 11 + 16 files changed, 11671 insertions(+), 13 deletions(-) create mode 100644 assets/js/components/map_hook.js create mode 100644 assets/topojson/europe.topo.json create mode 100644 lib/luminous/panel/map.ex diff --git a/README.md b/README.md index 48012ae..14cbe51 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ live view process: - [chartjs](https://www.chartjs.org/) for rendering plots - [tabulator](https://tabulator.info/) for rendering tabular data - [flatpickr](https://flatpickr.js.org/) for time range selection +- [highcharts](https://www.highcharts.com/) for maps (licensing cost) ## Features @@ -34,6 +35,7 @@ live view process: - Stat panels (show single or multiple stats) - Table panels - Summary statistics in charts +- Map with areas and pins ## Installation @@ -53,12 +55,13 @@ In order to be able to use the provided components, the library's In `assets/js/app.js`: ```javascript -import { ChartJSHook, TableHook, TimeRangeHook } from "luminous" +import { ChartJSHook, TableHook, TimeRangeHook, MapHook } from "luminous" let Hooks = { TimeRangeHook: new TimeRangeHook(), ChartJSHook: new ChartJSHook(), - TableHook: new TableHook() + TableHook: new TableHook(), + MapHook: new MapHook() } ... diff --git a/assets/js/app.js b/assets/js/app.js index 350e492..7f6da80 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -6,11 +6,13 @@ import { LiveSocket } from "phoenix_live_view" import ChartJSHook from "./components/chartjs_hook" import TimeRangeHook from "./components/time_range_hook" import TableHook from "./components/table_hook" +import MapHook from "./components/map_hook" let Hooks = { ChartJSHook: new ChartJSHook(), TimeRangeHook: new TimeRangeHook(), - TableHook: new TableHook() + TableHook: new TableHook(), + MapHook: new MapHook() } let csrfToken = document.querySelector("meta[name='csrf-token']").getAttribute("content") diff --git a/assets/js/components/map_hook.js b/assets/js/components/map_hook.js new file mode 100644 index 0000000..daf433e --- /dev/null +++ b/assets/js/components/map_hook.js @@ -0,0 +1,72 @@ +import HighCharts from 'highcharts'; +import MapChart from 'highcharts/modules/map.js'; + +function MapHook() { + this.mounted = function () { + // the `dataset` property carries all `data-*` attributes of the corresponding html element + const element_data = this.el.dataset + // initialize the library + MapChart(HighCharts); + // Create the chart + this.map = HighCharts.mapChart(element_data.mapId, { + chart: { + map: JSON.parse(this.el.dataset.json), + backgroundColor: 'rgba(0,0,0,0)', // transparent background + height: '100%' + }, + + title: { text: '' }, + credits: { enabled: false }, + + mapNavigation: { + enabled: true, + }, + + colorAxis: { min: 0 }, + + series: [{ + name: this.el.dataset.country, + borderColor: '#A0A0A0', + nullColor: 'rgba(200, 200, 200, 0.3)', + states: { + hover: { + color: '#BADA55' + } + }, + tooltip: { + headerFormat: '', + pointFormat: '{point.description}', + }, + dataLabels: { + enabled: false, + } + }, { + type: 'mappoint', + tooltip: { + headerFormat: '', + pointFormat: '{point.description}', + }, + events: { + click: function (e) { + const url = e.target.point.url; + window.open(url); + } + }, + color: "#030303" + }] + }); + + // setup the event handler + this.handleEvent("panel-" + element_data.componentId + "::refresh-data", this.setMapData()) + }; + + this.setMapData = function () { + return (payload) => { + this.map.series[0].setData(payload.Areas) + this.map.series[1].setData(payload.Pins) + } + }; + +}; + +export default MapHook; \ No newline at end of file diff --git a/assets/js/luminous.js b/assets/js/luminous.js index 3214110..5952ae5 100644 --- a/assets/js/luminous.js +++ b/assets/js/luminous.js @@ -1,5 +1,6 @@ import ChartJSHook from "./components/chartjs_hook" import TableHook from "./components/table_hook" import TimeRangeHook from "./components/time_range_hook" +import MapHook from "./components/map_hook" -export { ChartJSHook, TableHook, TimeRangeHook } +export { ChartJSHook, TableHook, TimeRangeHook, MapHook } diff --git a/assets/package-lock.json b/assets/package-lock.json index 2d0c78e..22bf9bb 100644 --- a/assets/package-lock.json +++ b/assets/package-lock.json @@ -13,6 +13,7 @@ "chartjs-adapter-luxon": "^1.2.0", "chartjs-plugin-zoom": "^1.2.1", "flatpickr": "^4.6.9", + "highcharts": "^11.1.0", "luxon": "^3.0.3", "tabulator-tables": "^5.4.3" } @@ -60,6 +61,12 @@ "node": ">=0.8.0" } }, + "node_modules/highcharts": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/highcharts/-/highcharts-11.1.0.tgz", + "integrity": "sha512-vhmqq6/frteWMx0GKYWwEFL25g4OYc7+m+9KQJb/notXbNtIb8KVy+ijOF7XAFqF165cq0pdLIePAmyFY5ph3g==", + "dev": true + }, "node_modules/luxon": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.3.0.tgz", @@ -111,6 +118,12 @@ "integrity": "sha512-tSQXBXS/MWQOn/RKckawJ61vvsDpCom87JgxiYdGwHdOa0ht0vzUWDlfioofFCRU0L+6NGDt6XzbgoJvZkMeRQ==", "dev": true }, + "highcharts": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/highcharts/-/highcharts-11.1.0.tgz", + "integrity": "sha512-vhmqq6/frteWMx0GKYWwEFL25g4OYc7+m+9KQJb/notXbNtIb8KVy+ijOF7XAFqF165cq0pdLIePAmyFY5ph3g==", + "dev": true + }, "luxon": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.3.0.tgz", diff --git a/assets/package.json b/assets/package.json index 89c1ea3..66f9d7a 100644 --- a/assets/package.json +++ b/assets/package.json @@ -17,7 +17,8 @@ "chartjs-adapter-luxon": "^1.2.0", "chartjs-plugin-zoom": "^1.2.1", "flatpickr": "^4.6.9", + "highcharts": "^11.1.0", "luxon": "^3.0.3", "tabulator-tables": "^5.4.3" } -} \ No newline at end of file +} diff --git a/assets/topojson/europe.topo.json b/assets/topojson/europe.topo.json new file mode 100644 index 0000000..f18eb70 --- /dev/null +++ b/assets/topojson/europe.topo.json @@ -0,0 +1 @@ +{"type":"Topology","objects":{"default":{"type":"GeometryCollection","geometries":[{"type":"MultiPolygon","arcs":[[[0]],[[1]],[[2]],[[3]],[[4]],[[5]],[[6]],[[7]],[[8]],[[9]],[[10]],[[11]],[[12,13]],[[14]]],"id":"DK","properties":{"hc-group":"admin0","hc-key":"dk","hc-a2":"DK","name":"Denmark","labelrank":"4","country-abbrev":"Den.","subregion":"Northern Europe","region-wb":"Europe & Central Asia","iso-a3":"DNK","iso-a2":"DK","woe-id":"23424796","continent":"Europe","hc-middle-lon":9.434,"hc-middle-lat":56.381}},{"type":"MultiPolygon","arcs":[[[15]],[[16]],[[17]],[[18]],[[19]],[[20]],[[21]],[[22]]],"id":"FO","properties":{"hc-group":"admin0","hc-key":"fo","hc-a2":"FO","name":"Faroe Islands","labelrank":"6","country-abbrev":"Faeroe Is.","subregion":"Northern Europe","region-wb":"Europe & Central Asia","iso-a3":"FRO","iso-a2":"FO","woe-id":"23424816","continent":"Europe","hc-middle-lon":-6.84,"hc-middle-lat":62.212}},{"type":"MultiPolygon","arcs":[[[23]],[[24]],[[25]],[[26]],[[27]],[[28]],[[29]],[[30]],[[31]],[[32]],[[33]],[[34]],[[35]],[[36]],[[37]],[[38,39,40]],[[41,42,43,44,45]]],"id":"HR","properties":{"hc-group":"admin0","hc-key":"hr","hc-a2":"HR","name":"Croatia","labelrank":"6","country-abbrev":"Cro.","subregion":"Southern Europe","region-wb":"Europe & Central Asia","iso-a3":"HRV","iso-a2":"HR","woe-id":"23424843","continent":"Europe","hc-middle-lon":14.009,"hc-middle-lat":45.094}},{"type":"MultiPolygon","arcs":[[[46]],[[47]],[[48]],[[49]],[[50]],[[51]],[[52,53]],[[54,55,56],[57]]],"id":"NL","properties":{"hc-group":"admin0","hc-key":"nl","hc-a2":"NL","name":"Netherlands","labelrank":"5","country-abbrev":"Neth.","subregion":"Western Europe","region-wb":"Europe & Central Asia","iso-a3":"NLD","iso-a2":"NL","woe-id":"-90","continent":"Europe","hc-middle-lon":4.643,"hc-middle-lat":51.825}},{"type":"MultiPolygon","arcs":[[[58]],[[59]],[[60]],[[61,62,63,64,65,66,67,68,69,70]],[[71]]],"id":"EE","properties":{"hc-group":"admin0","hc-key":"ee","hc-a2":"EE","name":"Estonia","labelrank":"6","country-abbrev":"Est.","subregion":"Northern Europe","region-wb":"Europe & Central Asia","iso-a3":"EST","iso-a2":"EE","woe-id":"23424805","continent":"Europe","hc-middle-lon":25.656,"hc-middle-lat":58.621}},{"type":"Polygon","arcs":[[72,73,74,75,76,77,78,79]],"id":"BG","properties":{"hc-group":"admin0","hc-key":"bg","hc-a2":"BG","name":"Bulgaria","labelrank":"4","country-abbrev":"Bulg.","subregion":"Eastern Europe","region-wb":"Europe & Central Asia","iso-a3":"BGR","iso-a2":"BG","woe-id":"23424771","continent":"Europe","hc-middle-lon":25.438,"hc-middle-lat":42.727}},{"type":"MultiPolygon","arcs":[[[80]],[[81]],[[82]],[[83]],[[84]],[[85]],[[86,87,88,89,90,91,92,93]]],"id":"ES","properties":{"hc-group":"admin0","hc-key":"es","hc-a2":"ES","name":"Spain","labelrank":"2","country-abbrev":"Sp.","subregion":"Southern Europe","region-wb":"Europe & Central Asia","iso-a3":"ESP","iso-a2":"ES","woe-id":"23424950","continent":"Europe","hc-middle-lon":-3.493,"hc-middle-lat":40.03}},{"type":"MultiPolygon","arcs":[[[94]],[[95]],[[96]],[[97]],[[98]],[[99]],[[100]],[[101,102,103,104,105],[106],[107]],[[108]],[[109]]],"id":"IT","properties":{"hc-group":"admin0","hc-key":"it","hc-a2":"IT","name":"Italy","labelrank":"2","country-abbrev":"Italy","subregion":"Southern Europe","region-wb":"Europe & Central Asia","iso-a3":"ITA","iso-a2":"IT","woe-id":"23424853","continent":"Europe","hc-middle-lon":12.123,"hc-middle-lat":43.117}},{"type":"Polygon","arcs":[[-107]],"id":"SM","properties":{"hc-group":"admin0","hc-key":"sm","hc-a2":"SM","name":"San Marino","labelrank":"6","country-abbrev":"S.M.","subregion":"Southern Europe","region-wb":"Europe & Central Asia","iso-a3":"SMR","iso-a2":"SM","woe-id":"23424947","continent":"Europe","hc-middle-lon":12.449,"hc-middle-lat":43.948}},{"type":"Polygon","arcs":[[107]],"id":"VA","properties":{"hc-group":"admin0","hc-key":"va","hc-a2":"VA","name":"Vatican","labelrank":"6","country-abbrev":"Vat.","subregion":"Southern Europe","region-wb":"Europe & Central Asia","iso-a3":"VAT","iso-a2":"VA","woe-id":"23424986","continent":"Europe","hc-middle-lon":12.453,"hc-middle-lat":41.904}},{"type":"MultiPolygon","arcs":[[[110]],[[111]],[[-74,112,113]],[[114]]],"id":"TR","properties":{"hc-group":"admin0","hc-key":"tr","hc-a2":"TR","name":"Turkey","labelrank":"2","country-abbrev":"Tur.","subregion":"Western Asia","region-wb":"Europe & Central Asia","iso-a3":"TUR","iso-a2":"TR","woe-id":"23424969","continent":"Asia","hc-middle-lon":32.986,"hc-middle-lat":38.916}},{"type":"MultiPolygon","arcs":[[[115]],[[116]]],"id":"MT","properties":{"hc-group":"admin0","hc-key":"mt","hc-a2":"MT","name":"Malta","labelrank":"5","country-abbrev":"Malta","subregion":"Southern Europe","region-wb":"Middle East & North Africa","iso-a3":"MLT","iso-a2":"MT","woe-id":"23424897","continent":"Europe","hc-middle-lon":14.442,"hc-middle-lat":35.901}},{"type":"MultiPolygon","arcs":[[[117]],[[118]],[[119]],[[120]],[[121,122,-103,123,124,125,-92,126,-90,127,128,129,130,131,132],[-86]],[[133]]],"id":"FR","properties":{"hc-group":"admin0","hc-key":"fr","hc-a2":"FR","name":"France","labelrank":"2","country-abbrev":"Fr.","subregion":"Western Europe","region-wb":"Europe & Central Asia","iso-a3":"FRA","iso-a2":"FR","woe-id":"-90","continent":"Europe","hc-middle-lon":2.295,"hc-middle-lat":46.346}},{"type":"MultiPolygon","arcs":[[[134]],[[135]],[[136]],[[137]],[[138]],[[139]],[[140]],[[141]],[[142]],[[143]],[[144]],[[145]],[[146]],[[147]],[[148]],[[149]],[[150]],[[151]],[[152]],[[153]],[[154]],[[155]],[[156]],[[157]],[[158]],[[159]],[[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]]],"id":"NO","properties":{"hc-group":"admin0","hc-key":"no","hc-a2":"NO","name":"Norway","labelrank":"3","country-abbrev":"Nor.","subregion":"Northern Europe","region-wb":"Europe & Central Asia","iso-a3":"NOR","iso-a2":"NO","woe-id":"-90","continent":"Europe","hc-middle-lon":8.993,"hc-middle-lat":60.872}},{"type":"MultiPolygon","arcs":[[[221,222,-132,223,224,-56,225,226,-14,227,228,229,230,231,232],[233]],[[234]],[[235]],[[236]],[[237]],[[238]],[[239]],[[240,-241,241]]],"id":"DE","properties":{"hc-group":"admin0","hc-key":"de","hc-a2":"DE","name":"Germany","labelrank":"2","country-abbrev":"Ger.","subregion":"Western Europe","region-wb":"Europe & Central Asia","iso-a3":"DEU","iso-a2":"DE","woe-id":"23424829","continent":"Europe","hc-middle-lon":10.187,"hc-middle-lat":50.939}},{"type":"MultiPolygon","arcs":[[[242]],[[243,244]]],"id":"IE","properties":{"hc-group":"admin0","hc-key":"ie","hc-a2":"IE","name":"Ireland","labelrank":"3","country-abbrev":"Ire.","subregion":"Northern Europe","region-wb":"Europe & Central Asia","iso-a3":"IRL","iso-a2":"IE","woe-id":"23424803","continent":"Europe","hc-middle-lon":-7.831,"hc-middle-lat":53.159}},{"type":"MultiPolygon","arcs":[[[245]],[[246]],[[247]],[[248,249,250,251,252,253,254,255,256],[257],[258]]],"id":"UA","properties":{"hc-group":"admin0","hc-key":"ua","hc-a2":"UA","name":"Ukraine","labelrank":"3","country-abbrev":"Ukr.","subregion":"Eastern Europe","region-wb":"Europe & Central Asia","iso-a3":"UKR","iso-a2":"UA","woe-id":"23424976","continent":"Europe","hc-middle-lon":32.787,"hc-middle-lat":49.201}},{"type":"MultiPolygon","arcs":[[[259]],[[260]],[[261]],[[262]],[[263]],[[264]],[[265]],[[266]],[[267]],[[268]],[[269]],[[270]],[[271]],[[272]],[[273]],[[274]],[[275]],[[276]],[[277]],[[278]],[[279]],[[280]],[[281]],[[282,-214,283,284]]],"id":"FI","properties":{"hc-group":"admin0","hc-key":"fi","hc-a2":"FI","name":"Finland","labelrank":"3","country-abbrev":"Fin.","subregion":"Northern Europe","region-wb":"Europe & Central Asia","iso-a3":"FIN","iso-a2":"FI","woe-id":"23424812","continent":"Europe","hc-middle-lon":25.868,"hc-middle-lat":62.517}},{"type":"MultiPolygon","arcs":[[[285]],[[286]],[[287]],[[288]],[[289]],[[290]],[[291]],[[292]],[[293]],[[294]],[[295]],[[296]],[[297]],[[298]],[[299]],[[300]],[[301]],[[302]],[[303]],[[-283,304,-215]]],"id":"SE","properties":{"hc-group":"admin0","hc-key":"se","hc-a2":"SE","name":"Sweden","labelrank":"3","country-abbrev":"Swe.","subregion":"Northern Europe","region-wb":"Europe & Central Asia","iso-a3":"SWE","iso-a2":"SE","woe-id":"23424954","continent":"Europe","hc-middle-lon":17.646,"hc-middle-lat":64.491}},{"type":"MultiPolygon","arcs":[[[305,-66,306,307,-63,62,308,-71,309,-284,-213,310,311,-252,312,313,-68],[314]],[[315]],[[316]],[[317]],[[318]],[[319]],[[320]],[[321]],[[322,323,324,325,326,327]],[[328,329,330]],[[331]],[[332,333]],[[334]]],"id":"RU","properties":{"hc-group":"admin0","hc-key":"ru","hc-a2":"RU","name":"Russia","labelrank":"2","country-abbrev":"Rus.","subregion":"Eastern Europe","region-wb":"Europe & Central Asia","iso-a3":"RUS","iso-a2":"RU","woe-id":"23424936","continent":"Europe","hc-middle-lon":39.729,"hc-middle-lat":58.765}},{"type":"MultiPolygon","arcs":[[[335]],[[336]],[[337]],[[338]],[[339]],[[340]],[[341]],[[342]],[[343]],[[344]],[[345]],[[346]],[[347]],[[348]],[[349]],[[350]],[[351]],[[352]],[[353]],[[354]],[[355]],[[356]],[[357]],[[358]],[[359]],[[360]],[[361]],[[362]],[[363]],[[364]],[[365]],[[366,-94]],[[367,368]],[[369,370,-371,371,372,373,374,375,376],[377]],[[378]],[[379]],[[380]],[[381,-245]]],"id":"GB","properties":{"hc-group":"admin0","hc-key":"gb","hc-a2":"GB","name":"United Kingdom","labelrank":"2","country-abbrev":"U.K.","subregion":"Northern Europe","region-wb":"Europe & Central Asia","iso-a3":"GBR","iso-a2":"GB","woe-id":"-90","continent":"Europe","hc-middle-lon":-1.228,"hc-middle-lat":52.105}},{"type":"MultiPolygon","arcs":[[[-378]],[[382,-377,383]],[[384,-369,385,386,387,388,-373]],[[389,370]]],"id":"CY","properties":{"hc-group":"admin0","hc-key":"cy","hc-a2":"CY","name":"Cyprus","labelrank":"5","country-abbrev":"Cyp.","subregion":"Western Asia","region-wb":"Europe & Central Asia","iso-a3":"CYP","iso-a2":"CY","woe-id":"-90","continent":"Asia","hc-middle-lon":32.572,"hc-middle-lat":34.923}},{"type":"Polygon","arcs":[[390,-88,391],[392]],"id":"PT","properties":{"hc-group":"admin0","hc-key":"pt","hc-a2":"PT","name":"Portugal","labelrank":"2","country-abbrev":"Port.","subregion":"Southern Europe","region-wb":"Europe & Central Asia","iso-a3":"PRT","iso-a2":"PT","woe-id":"23424925","continent":"Europe","hc-middle-lon":-8.073,"hc-middle-lat":40.292}},{"type":"MultiPolygon","arcs":[[[393]],[[394]],[[395]],[[396]],[[397]],[[398]],[[399]],[[400]],[[401]],[[402]],[[403]],[[404]],[[405]],[[406]],[[407]],[[408]],[[409]],[[410]],[[411]],[[412]],[[413]],[[414]],[[415]],[[416]],[[417]],[[418]],[[419]],[[420]],[[421]],[[422]],[[423]],[[424]],[[425]],[[426]],[[427]],[[428]],[[429]],[[430]],[[431]],[[432]],[[433]],[[434]],[[435,436,437,438,439,-75,-114,440]],[[441]],[[442]],[[443]],[[444]]],"id":"GR","properties":{"hc-group":"admin0","hc-key":"gr","hc-a2":"GR","name":"Greece","labelrank":"3","country-abbrev":"Greece","subregion":"Southern Europe","region-wb":"Europe & Central Asia","iso-a3":"GRC","iso-a2":"GR","woe-id":"23424833","continent":"Europe","hc-middle-lon":21.616,"hc-middle-lat":39.585}},{"type":"MultiPolygon","arcs":[[[445,446,447,448,-324]],[[449,-328]]],"id":"LT","properties":{"hc-group":"admin0","hc-key":"lt","hc-a2":"LT","name":"Lithuania","labelrank":"5","country-abbrev":"Lith.","subregion":"Northern Europe","region-wb":"Europe & Central Asia","iso-a3":"LTU","iso-a2":"LT","woe-id":"23424875","continent":"Europe","hc-middle-lon":24.371,"hc-middle-lat":55.184}},{"type":"Polygon","arcs":[[450,-106,451,452,-45]],"id":"SI","properties":{"hc-group":"admin0","hc-key":"si","hc-a2":"SI","name":"Slovenia","labelrank":"6","country-abbrev":"Slo.","subregion":"Southern Europe","region-wb":"Europe & Central Asia","iso-a3":"SVN","iso-a2":"SI","woe-id":"23424945","continent":"Europe","hc-middle-lon":14.521,"hc-middle-lat":45.989}},{"type":"Polygon","arcs":[[453,-43,454,455,-40]],"id":"BA","properties":{"hc-group":"admin0","hc-key":"ba","hc-a2":"BA","name":"Bosnia and Herzegovina","labelrank":"5","country-abbrev":"B.H.","subregion":"Southern Europe","region-wb":"Europe & Central Asia","iso-a3":"BIH","iso-a2":"BA","woe-id":"23424761","continent":"Europe","hc-middle-lon":17.609,"hc-middle-lat":44.138}},{"type":"Polygon","arcs":[[456,-125]],"id":"MC","properties":{"hc-group":"admin0","hc-key":"mc","hc-a2":"MC","name":"Monaco","labelrank":"6","country-abbrev":"Mco.","subregion":"Western Europe","region-wb":"Europe & Central Asia","iso-a3":"MCO","iso-a2":"MC","woe-id":"23424892","continent":"Europe","hc-middle-lon":7.4,"hc-middle-lat":43.735}},{"type":"MultiPolygon","arcs":[[[457,458]],[[459,460,461,462,-438,463,-436,464,465,466,467,468,469]],[[470,471]]],"id":"AL","properties":{"hc-group":"admin0","hc-key":"al","hc-a2":"AL","name":"Albania","labelrank":"6","country-abbrev":"Alb.","subregion":"Southern Europe","region-wb":"Europe & Central Asia","iso-a3":"ALB","iso-a2":"AL","woe-id":"23424742","continent":"Europe","hc-middle-lon":19.682,"hc-middle-lat":40.729}},{"type":"MultiPolygon","arcs":[[[472,-384,-376,473]],[[474,475,476,-387]],[[477,478,-374,-389]]],"id":"CNM","properties":{"hc-group":"admin0","hc-key":"cnm","hc-a2":"CN","name":"Cyprus No Mans Area","labelrank":"9","country-abbrev":null,"subregion":"Western Asia","region-wb":"Europe & Central Asia","iso-a3":"-99","iso-a2":null,"woe-id":"-99","continent":"Asia","hc-middle-lon":33.497,"hc-middle-lat":35.006}},{"type":"MultiPolygon","arcs":[[[479,-474,-375,-479]],[[480,-476]]],"id":"NC","properties":{"hc-group":"admin0","hc-key":"nc","hc-a2":"NC","name":"Northern Cyprus","labelrank":"6","country-abbrev":"N. Cy.","subregion":"Western Asia","region-wb":"Europe & Central Asia","iso-a3":"-99","iso-a2":"NC","woe-id":"-90","continent":"Asia","hc-middle-lon":33.685,"hc-middle-lat":35.276}},{"type":"Polygon","arcs":[[-42,481,482,483,484,-77,485,486,487,-455]],"id":"RS","properties":{"hc-group":"admin0","hc-key":"rs","hc-a2":"RS","name":"Republic of Serbia","labelrank":"5","country-abbrev":"Serb.","subregion":"Southern Europe","region-wb":"Europe & Central Asia","iso-a3":"SRB","iso-a2":"RS","woe-id":"-90","continent":"Europe","hc-middle-lon":20.751,"hc-middle-lat":44.169}},{"type":"Polygon","arcs":[[-483,488,-256,489,-254,490,-80,-79,491]],"id":"RO","properties":{"hc-group":"admin0","hc-key":"ro","hc-a2":"RO","name":"Romania","labelrank":"3","country-abbrev":"Rom.","subregion":"Eastern Europe","region-wb":"Europe & Central Asia","iso-a3":"ROU","iso-a2":"RO","woe-id":"23424933","continent":"Europe","hc-middle-lon":24.586,"hc-middle-lat":45.888}},{"type":"Polygon","arcs":[[-468,492,-472,493,-466,494,-41,-456,-488,495]],"id":"ME","properties":{"hc-group":"admin0","hc-key":"me","hc-a2":"ME","name":"Montenegro","labelrank":"6","country-abbrev":"Mont.","subregion":"Southern Europe","region-wb":"Europe & Central Asia","iso-a3":"MNE","iso-a2":"ME","woe-id":"20069817","continent":"Europe","hc-middle-lon":18.917,"hc-middle-lat":42.443}},{"type":"Polygon","arcs":[[496,497]],"id":"LI","properties":{"hc-group":"admin0","hc-key":"li","hc-a2":"LI","name":"Liechtenstein","labelrank":"6","country-abbrev":"Liech.","subregion":"Western Europe","region-wb":"Europe & Central Asia","iso-a3":"LIE","iso-a2":"LI","woe-id":"23424879","continent":"Europe","hc-middle-lon":9.563,"hc-middle-lat":47.158}},{"type":"Polygon","arcs":[[-497,498,499,-233,500,501,502,-452,-105,503]],"id":"AT","properties":{"hc-group":"admin0","hc-key":"at","hc-a2":"AT","name":"Austria","labelrank":"4","country-abbrev":"Aust.","subregion":"Western Europe","region-wb":"Europe & Central Asia","iso-a3":"AUT","iso-a2":"AT","woe-id":"23424750","continent":"Europe","hc-middle-lon":14.67,"hc-middle-lat":47.696}},{"type":"Polygon","arcs":[[-502,504,505,-249,506]],"id":"SK","properties":{"hc-group":"admin0","hc-key":"sk","hc-a2":"SK","name":"Slovakia","labelrank":"6","country-abbrev":"Svk.","subregion":"Eastern Europe","region-wb":"Europe & Central Asia","iso-a3":"SVK","iso-a2":"SK","woe-id":"23424877","continent":"Europe","hc-middle-lon":19.111,"hc-middle-lat":48.728}},{"type":"Polygon","arcs":[[-453,-503,-507,-257,-489,-482,-46]],"id":"HU","properties":{"hc-group":"admin0","hc-key":"hu","hc-a2":"HU","name":"Hungary","labelrank":"5","country-abbrev":"Hun.","subregion":"Eastern Europe","region-wb":"Europe & Central Asia","iso-a3":"HUN","iso-a2":"HU","woe-id":"23424844","continent":"Europe","hc-middle-lon":19.054,"hc-middle-lat":47.106}},{"type":"Polygon","arcs":[[-91,-127]],"id":"AD","properties":{"hc-group":"admin0","hc-key":"ad","hc-a2":"AD","name":"Andorra","labelrank":"6","country-abbrev":"And.","subregion":"Southern Europe","region-wb":"Europe & Central Asia","iso-a3":"AND","iso-a2":"AD","woe-id":"23424744","continent":"Europe","hc-middle-lon":1.582,"hc-middle-lat":42.518}},{"type":"Polygon","arcs":[[-131,507,-224]],"id":"LU","properties":{"hc-group":"admin0","hc-key":"lu","hc-a2":"LU","name":"Luxembourg","labelrank":"6","country-abbrev":"Lux.","subregion":"Western Europe","region-wb":"Europe & Central Asia","iso-a3":"LUX","iso-a2":"LU","woe-id":"23424881","continent":"Europe","hc-middle-lon":6.116,"hc-middle-lat":49.753}},{"type":"Polygon","arcs":[[-223,508,240,509,-499,-498,-504,-104,-123,510,-133]],"id":"CH","properties":{"hc-group":"admin0","hc-key":"ch","hc-a2":"CH","name":"Switzerland","labelrank":"4","country-abbrev":"Switz.","subregion":"Western Europe","region-wb":"Europe & Central Asia","iso-a3":"CHE","iso-a2":"CH","woe-id":"23424957","continent":"Europe","hc-middle-lon":8.222,"hc-middle-lat":46.823}},{"type":"Polygon","arcs":[[-508,-130,511,512,-54,513,-57,-225]],"id":"BE","properties":{"hc-group":"admin0","hc-key":"be","hc-a2":"BE","name":"Belgium","labelrank":"2","country-abbrev":"Belg.","subregion":"Western Europe","region-wb":"Europe & Central Asia","iso-a3":"BEL","iso-a2":"BE","woe-id":"23424757","continent":"Europe","hc-middle-lon":4.577,"hc-middle-lat":50.734}},{"type":"Polygon","arcs":[[-469,-496,-487,514]],"id":"KV","properties":{"hc-group":"admin0","hc-key":"kv","hc-a2":"KV","name":"Kosovo","labelrank":"6","country-abbrev":"Kos.","subregion":"Southern Europe","region-wb":"Europe & Central Asia","iso-a3":"-99","iso-a2":"KV","woe-id":"-90","continent":"Europe","hc-middle-lon":21.535,"hc-middle-lat":42.496}},{"type":"MultiPolygon","arcs":[[[-449,515,-250,-506,516,-231,517,-229,518,519,-325]],[[-329,520,521]],[[522,523]]],"id":"PL","properties":{"hc-group":"admin0","hc-key":"pl","hc-a2":"PL","name":"Poland","labelrank":"3","country-abbrev":"Pol.","subregion":"Eastern Europe","region-wb":"Europe & Central Asia","iso-a3":"POL","iso-a2":"PL","woe-id":"23424923","continent":"Europe","hc-middle-lon":19.887,"hc-middle-lat":51.955}},{"type":"MultiPolygon","arcs":[[[524,525]],[[-76,-440,526,-459,-461,527,-470,-515,-486]]],"id":"MK","properties":{"hc-group":"admin0","hc-key":"mk","hc-a2":"MK","name":"Macedonia","labelrank":"6","country-abbrev":"Mkd.","subregion":"Southern Europe","region-wb":"Europe & Central Asia","iso-a3":"MKD","iso-a2":"MK","woe-id":"23424890","continent":"Europe","hc-middle-lon":21.694,"hc-middle-lat":41.619}},{"type":"Polygon","arcs":[[528,-447,529,-69,-314]],"id":"LV","properties":{"hc-group":"admin0","hc-key":"lv","hc-a2":"LV","name":"Latvia","labelrank":"5","country-abbrev":"Lat.","subregion":"Northern Europe","region-wb":"Europe & Central Asia","iso-a3":"LVA","iso-a2":"LV","woe-id":"23424874","continent":"Europe","hc-middle-lon":26.084,"hc-middle-lat":56.829}},{"type":"Polygon","arcs":[[-529,-313,-251,-516,-448]],"id":"BY","properties":{"hc-group":"admin0","hc-key":"by","hc-a2":"BY","name":"Belarus","labelrank":"4","country-abbrev":"Bela.","subregion":"Eastern Europe","region-wb":"Europe & Central Asia","iso-a3":"BLR","iso-a2":"BY","woe-id":"23424765","continent":"Europe","hc-middle-lon":27.706,"hc-middle-lat":53.222}},{"type":"Polygon","arcs":[[530]],"id":"IS","properties":{"hc-group":"admin0","hc-key":"is","hc-a2":"IS","name":"Iceland","labelrank":"3","country-abbrev":"Iceland","subregion":"Northern Europe","region-wb":"Europe & Central Asia","iso-a3":"ISL","iso-a2":"IS","woe-id":"23424845","continent":"Europe","hc-middle-lon":-17.483,"hc-middle-lat":64.839}},{"type":"Polygon","arcs":[[-490,-255]],"id":"MD","properties":{"hc-group":"admin0","hc-key":"md","hc-a2":"MD","name":"Moldova","labelrank":"6","country-abbrev":"Mda.","subregion":"Eastern Europe","region-wb":"Europe & Central Asia","iso-a3":"MDA","iso-a2":"MD","woe-id":"23424885","continent":"Europe","hc-middle-lon":28.317,"hc-middle-lat":47.479}},{"type":"Polygon","arcs":[[-505,-501,-232,-517]],"id":"CZ","properties":{"hc-group":"admin0","hc-key":"cz","hc-a2":"CZ","name":"Czech Republic","labelrank":"5","country-abbrev":"Cz. Rep.","subregion":"Eastern Europe","region-wb":"Europe & Central Asia","iso-a3":"CZE","iso-a2":"CZ","woe-id":"23424810","continent":"Europe","hc-middle-lon":14.707,"hc-middle-lat":49.755}}],"hc-recommended-transform":{"default":{"crs":"+proj=lcc +lat_1=43 +lat_2=62 +lat_0=30 +lon_0=10 +x_0=0 +y_0=0 +ellps=intl +units=m +no_defs","scale":0.000169255094964,"jsonres":15.5,"jsonmarginX":-999,"jsonmarginY":9851,"xoffset":-1706316.2597,"yoffset":4824494.18154}},"hc-recommended-mapview":{"projection":{"name":"LambertConformalConic","parallels":[43,62],"rotation":[-10]}}}},"arcs":[[[4019,5560],[38,-39],[15,17],[14,-36],[-9,-26],[-33,-5],[-54,44],[10,42],[19,3]],[[3918,5545],[18,-13],[-15,-5],[-19,29],[16,-11]],[[4163,5573],[-35,-30],[-11,17],[23,22],[23,-9]],[[3855,5595],[26,-33],[-7,-27],[-17,11],[-2,49]],[[3972,5556],[-12,-54],[-10,27],[35,86],[-13,-59]],[[4427,5637],[30,-28],[-10,-39],[-43,31],[9,56],[14,-20]],[[3700,5693],[5,-3],[-1,-24],[-9,23],[5,4]],[[3916,5740],[51,-69],[-6,-78],[-22,-12],[-38,17],[-36,44],[0,26],[-24,40],[75,32]],[[4168,5724],[-7,18],[10,23],[7,-26],[-10,-15]],[[3948,5813],[0,-23],[-12,-1],[7,29],[5,-5]],[[3756,6108],[-4,-42],[-25,-33],[-12,30],[11,27],[30,18]],[[4012,6209],[-15,-9],[-3,-24],[-20,17],[38,16]],[[3728,5544],[2,66],[-22,-19],[-2,30],[25,-9],[-8,81],[-35,34],[-24,0],[11,68],[22,22],[-12,50],[-20,12],[2,119],[7,32],[14,-25],[29,0],[18,-26],[2,42],[24,46],[25,-27],[-15,-23],[26,3],[-13,71],[31,36],[20,-14],[19,35],[-58,-27],[-17,15],[-49,-28],[-22,-47],[6,-52],[-33,50],[42,95],[89,11],[18,22],[44,95],[26,2],[45,42],[-19,-50],[14,-37],[-1,-54],[-11,-14],[-20,-76],[11,-95],[47,-7],[21,-24],[-25,-63],[-14,6],[-10,-38],[-4,48],[-11,6],[-20,-41],[2,-64],[-39,-22],[19,-23],[-30,-20],[7,-14],[-41,-37],[25,-66],[-25,-24],[28,-49],[0,-40],[-17,25],[-17,-32]],[[3815,5521],[-69,26],[-18,-3]],[[4044,5830],[21,-9],[16,-62],[24,71],[-18,9],[43,42],[42,-23],[-12,-33],[10,-58],[-40,-45],[-2,-30],[24,-23],[-6,-27],[-23,-7],[-3,-64],[-11,-6],[12,-36],[-23,-40],[-24,49],[16,28],[-27,56],[-44,6],[-19,45],[13,7],[-6,45],[-21,46],[32,1],[26,31],[0,27]],[[1981,7385],[18,-12],[7,-50],[-22,29],[-3,33]],[[1987,7461],[26,-22],[-6,-20],[-23,26],[3,16]],[[1951,7524],[14,-11],[-17,-18],[-27,34],[30,-5]],[[1948,7573],[53,-76],[-2,-26],[-33,49],[-23,16],[5,37]],[[1982,7576],[37,-51],[-15,-16],[-30,31],[-14,33],[22,3]],[[2016,7561],[-6,4],[-4,12],[1,13],[9,-29]],[[2009,7554],[-3,0],[-13,34],[1,4],[15,-38]],[[2029,7571],[-10,25],[6,-2],[6,-17],[-1,-6],[9,-9],[-13,-5],[-5,-7],[-3,34],[11,-13]],[[4657,2227],[-1,-9],[-11,-3],[-3,12],[15,0]],[[4707,2234],[39,-23],[2,-6],[-41,21],[0,8]],[[4638,2282],[30,2],[18,-16],[-39,-6],[-9,20]],[[4573,2309],[3,-11],[-11,-6],[-8,15],[16,2]],[[4615,2352],[21,-19],[50,-9],[-56,0],[-36,19],[21,9]],[[4642,2383],[1,-21],[-44,14],[0,20],[43,-13]],[[4585,2400],[11,-16],[-5,-2],[-16,13],[10,5]],[[4489,2535],[-9,5],[-12,25],[14,-11],[7,-19]],[[4465,2581],[-4,-5],[-8,12],[-7,19],[19,-26]],[[4425,2601],[39,-62],[-9,-3],[-15,41],[-15,24]],[[4422,2727],[7,3],[39,-74],[-40,41],[-6,30]],[[4373,2728],[0,-7],[-8,38],[7,-9],[1,-22]],[[4412,2794],[8,-21],[3,-18],[-19,39],[8,0]],[[4380,2824],[-5,-81],[-14,78],[10,4],[-13,47],[10,7],[12,-55]],[[4391,2904],[11,-43],[16,-31],[-43,31],[16,43]],[[4832,2129],[-78,109],[-41,16],[-22,41],[46,-36]],[[4737,2259],[23,-20],[65,-70]],[[4825,2169],[1,-22],[6,-18]],[[4878,3091],[-7,-33],[19,-66],[-1,-55],[40,-33],[4,-21],[-38,-6],[-5,-77]],[[4890,2800],[-14,-2],[-22,60],[-17,-6],[-34,28],[-25,-3],[-20,-23],[-17,27],[-13,-12],[-34,20],[-9,-12],[-29,37],[-16,-28],[-34,5],[-16,-53],[-14,7],[-25,51],[-24,-16],[-1,-86],[39,-89],[11,-86],[52,-100],[3,-19],[42,-71],[18,-9],[3,-34],[19,-55],[17,-20],[-1,-38]],[[4729,2273],[-57,81],[-21,46],[-40,25],[-62,2],[-5,47],[-52,68],[-40,93],[22,25],[-46,92],[3,73],[-11,43],[-27,47],[-29,19],[-41,-149],[-39,84],[-12,107],[9,-6]],[[4281,2970],[34,-17],[9,24],[45,-10],[21,49],[12,-33],[53,-29],[25,14],[-13,62],[23,29],[24,5],[4,56],[-12,21],[8,28],[69,44],[-5,32],[31,2]],[[4609,3247],[40,-38],[12,-41],[25,-25],[17,-45],[27,-5],[32,-45],[38,3],[22,-12],[30,47],[26,5]],[[3206,4670],[-4,-21],[-33,27],[28,5],[9,-11]],[[3304,5055],[-10,-29],[-10,15],[16,36],[4,-22]],[[3309,5087],[-6,-1],[12,19],[8,7],[-14,-25]],[[3365,5137],[-25,-15],[-3,9],[45,19],[-17,-13]],[[3419,5155],[5,-4],[-31,-8],[-1,10],[27,2]],[[3446,5154],[-3,4],[9,7],[14,-2],[-20,-9]],[[3131,4581],[22,11],[35,-19],[14,18],[27,-12]],[[3229,4579],[-33,-44],[-32,22],[-28,-11],[-5,35]],[[3234,4579],[-36,23],[-13,-16],[-33,18],[-8,26],[41,16],[34,-47],[12,21],[-28,20],[21,26],[-24,44],[6,37],[15,6],[41,91],[26,173],[19,-17],[52,52],[24,57],[44,27],[84,15],[52,-59]],[[3563,5092],[-1,-76],[-12,-31],[-4,-56],[-31,-2],[-8,-45],[31,-7],[6,-60],[-39,-53],[15,-21],[-48,-36],[-29,19],[-22,-25],[19,-44],[12,-71],[-16,-43],[9,-21],[-25,-33],[16,-34],[-8,-43]],[[3428,4410],[-34,3],[16,108],[-41,36],[-28,-8],[-23,59],[-12,-23],[-16,29],[-15,-21],[-17,15],[-10,-33],[-14,4]],[[3395,4859],[9,10],[1,3],[8,11],[-1,31],[-21,5],[20,-11],[-6,-36],[-10,-13],[-31,-32],[-32,30],[59,63],[-5,44],[12,17],[-35,5],[-4,61],[-37,-39],[8,-44],[21,-19],[-31,-22],[7,-51],[-14,-19],[54,-31],[28,37]],[[5376,6565],[-14,-25],[-18,19],[11,19],[21,-13]],[[5361,6680],[15,-2],[3,-17],[-25,-1],[7,20]],[[5306,6670],[24,-7],[12,-39],[-34,-10],[-21,-33],[-13,43],[-42,31],[45,4],[15,32],[14,-21]],[[5919,6764],[-7,-2],[-13,-4]],[[5899,6758],[8,-3]],[[5907,6755],[1,0],[1,0],[-7,-4]],[[5902,6751],[-16,-8],[-5,-32]],[[5881,6711],[-6,-23],[-8,-22]],[[5867,6666],[-20,6],[-51,-16],[-14,-45],[23,-36],[11,-70],[17,-31],[26,-80]],[[5859,6394],[17,-39],[-29,-13],[-20,-78]],[[5827,6264],[-55,27],[-42,-29],[-53,70],[-2,20],[-46,18],[-37,44],[-82,-35],[-26,-22]],[[5484,6357],[18,57],[7,76],[-22,10],[-25,-40],[-41,27],[-9,54],[-16,5],[1,52],[31,-5],[1,19],[-43,-9],[-1,39],[15,17],[-16,15],[7,51],[69,28],[-8,18],[126,44],[30,-14],[36,48],[81,-32],[24,2],[18,-21],[118,-19],[16,20]],[[5901,6799],[10,-11],[8,-24]],[[5210,6466],[16,24],[-13,40],[25,0],[53,37],[6,-12],[29,9],[47,-41],[-18,1],[-15,-30],[-39,-39],[-40,-5],[-15,-61],[-21,0],[23,45],[-38,32]],[[5964,2492],[3,-56],[-15,-47],[-35,12],[-24,-69],[-7,-40],[1,-82],[-17,2],[-33,-70],[21,-1],[13,-50],[26,-56],[4,-27]],[[5901,2008],[-24,5],[-29,-25],[-31,52],[-28,-5],[-9,-20],[-44,-20],[-3,-28],[-21,-30]],[[5712,1937],[-32,-7],[13,-46],[-5,-44],[-27,-15],[-37,3],[-30,-21],[-45,44],[-12,-14],[-20,22],[-10,36],[-52,-9],[-49,-43],[-36,8],[-20,-24],[-22,7]],[[5328,1834],[2,68],[9,36],[-19,82],[-35,31],[-21,51]],[[5264,2102],[18,24],[-9,46],[9,82],[25,4],[28,86],[-52,74],[-19,92],[6,51],[23,24]],[[5293,2585],[5,36],[5,5]],[[5303,2626],[0,-1]],[[5303,2625],[38,-37],[-16,-27],[3,-44],[46,15],[94,-37],[38,13],[52,-14],[45,-26],[47,21],[41,77],[99,45],[25,-15],[15,-29],[30,2],[8,-20],[21,12],[8,-39],[27,-24],[40,-6]],[[2917,1126],[5,-15],[-11,-14],[0,18],[6,11]],[[2932,1223],[5,-20],[-24,-55],[-21,20],[16,47],[24,8]],[[3112,1460],[-2,-55],[35,-6],[-28,-106],[-18,-25],[-33,36],[-13,45],[-18,-26],[-15,39],[64,83],[28,15]],[[3217,1485],[18,-25],[3,-41],[-32,29],[-21,3],[-1,31],[33,3]],[[2147,349],[6,4],[8,-9],[-5,-12],[-9,17]],[[2975,2137],[-1,6],[2,6],[4,-12],[-5,0]],[[2153,413],[-28,-38],[-61,82],[-9,74],[-18,17],[1,47],[-13,41],[-44,57],[-58,7]],[[1923,700],[-13,102],[22,68],[7,45],[28,12],[8,48],[-17,-7],[-29,75],[10,80],[24,32],[10,43],[-22,27],[-18,63],[1,32],[-27,61],[58,2],[18,87],[-18,48],[27,47],[-7,24],[3,110],[-12,47],[13,11],[20,58],[17,8],[32,75],[-41,46],[1,51],[-65,17],[-12,-34],[-42,-8],[-11,18],[-51,-24],[-6,20],[15,42],[-14,31],[-45,-28],[-14,-22]],[[1773,2007],[-13,-22],[-4,58],[31,55],[-27,-12],[23,47],[-23,-4],[9,62],[-25,-31],[-7,18],[17,53],[-24,7],[0,28],[-18,2],[2,36],[15,40],[20,8],[13,29],[17,-12],[41,31],[2,44],[48,53],[58,-21],[16,-32],[112,8],[90,-9],[28,-20],[89,-29],[93,36],[6,-24],[46,-17],[38,23],[43,-37],[27,-7],[38,27]],[[2554,2395],[5,-27],[38,-12],[-9,-45],[57,-34],[25,-3],[20,-41],[29,13],[32,-43],[23,11],[12,-15],[42,4],[1,42],[74,-34],[13,-32]],[[2916,2179],[8,-47],[23,21]],[[2947,2153],[39,-41],[25,21],[21,-24],[53,35],[27,-10]],[[3112,2134],[16,-31],[-19,-17],[-3,-33],[12,-47],[-34,-69],[-71,-68],[-26,-52],[-59,-24],[-62,-40],[-31,-61],[16,-39],[-28,-17],[-28,-90],[-33,-69],[-43,-141],[13,-120],[22,-57],[27,-37],[-36,-55],[-28,-20],[-19,-34],[-28,-129],[6,-68],[-45,-23],[-15,13],[-48,-59],[-16,-44],[-10,-70],[-26,-58],[-26,28],[-24,-8],[-9,-31],[-64,17],[-21,-17],[-21,13],[-51,1],[-43,-10],[-10,-36],[-22,-24],[-20,4],[-32,-25],[-17,-74]],[[2156,413],[-3,0]],[[4100,600],[8,-11],[-2,-12],[-11,12],[5,11]],[[4436,1040],[-2,5],[-6,8],[7,11],[1,-24]],[[3694,1227],[11,-17],[-6,-26],[-6,28],[1,15]],[[3688,1224],[-6,0],[-3,13],[9,11],[0,-24]],[[4323,1663],[-13,1],[2,13],[11,-8],[0,-6]],[[3691,1770],[0,-11],[-10,-5],[4,17],[6,-1]],[[3926,2238],[-5,-25],[-31,10],[6,17],[30,-2]],[[4295,2999],[2,30],[-20,24],[-15,-18],[-22,14],[-16,-37],[-76,-56],[11,37],[-26,-30],[-7,-42],[14,-57],[22,-36],[-10,-41],[-16,6],[-2,-97],[10,-65],[38,-73],[27,-23],[34,-54],[41,-46],[24,-111],[13,-90],[14,-54],[75,-141],[43,-41],[37,-8],[65,10],[18,-42],[-30,-41],[-1,-38],[12,-20],[64,-60],[52,-35],[47,-69],[60,-49],[26,-53],[31,-94],[-16,-87],[-34,32],[-8,57],[-17,46],[-38,4],[-33,28],[-19,32],[-15,-21],[-34,-99],[3,-32],[-16,-44],[2,-32],[27,-19],[46,-59],[-4,-77],[9,-25],[-12,-36],[-29,5],[-34,-53],[3,-81],[-44,-78],[-9,-53],[-48,5],[-1,75],[14,10],[14,54],[-7,51],[38,23],[4,42],[-15,48],[-10,100],[-14,34],[-10,83],[-19,57],[-30,-20],[-25,46],[-24,19],[10,42],[-28,78],[-47,-25],[16,39],[-20,30],[-22,-2],[-42,114],[-17,-11],[-28,24],[-31,-19],[-17,47],[-29,13],[-21,50],[-24,29],[-10,46],[-36,36],[-19,67],[-29,33],[-34,0],[10,33],[-22,52],[-29,26],[5,24],[-29,8],[3,61],[-12,66],[-12,25],[-7,91],[-18,57],[-32,12],[-66,79],[-57,19],[-29,-32],[-27,-55],[-7,-40],[-23,-29],[-52,-16]],[[3597,2506],[-2,20],[24,60],[-4,25],[-31,-14],[-39,32],[-19,35],[-2,48],[24,38],[-14,49],[-23,18],[-14,48],[27,7],[29,35],[6,42],[-20,27],[-2,36],[-19,21],[1,29],[25,28]],[[3544,3090],[18,-12],[40,28],[32,-19],[32,58],[-4,35],[41,49],[-1,-50],[19,-36],[26,-15],[8,-65],[17,15],[-8,24],[32,92],[-1,49],[20,2],[13,-55],[46,17],[9,-37],[13,12],[-13,46],[5,47],[38,-19],[-7,38],[10,53]],[[3929,3347],[61,-27],[11,40],[24,20],[49,-4],[52,29],[-11,-23],[33,-83],[93,-38],[52,-8]],[[4293,3253],[-37,-63],[31,-30],[-20,-48],[18,-11],[-5,-43],[35,-49],[-20,-10]],[[4154,2534],[2,24],[-6,-4],[-4,-12],[8,-8]],[[4153,1989],[0,0]],[[4358,925],[40,19],[31,28],[20,-16],[48,46],[-2,-58],[-32,-92],[-13,-70],[2,-47],[25,-85],[-18,-18],[-11,-78],[-66,37],[-24,68],[-21,20],[-22,-4],[-49,54],[-32,51],[-35,25],[-23,-3],[-26,67],[9,55],[29,46],[16,-41],[22,43],[25,10],[8,-33],[45,-35],[25,20],[29,-9]],[[3774,1253],[-6,-61],[-19,-31],[-28,5],[-5,44],[-21,47],[1,41],[19,137],[-17,7],[11,55],[-4,57],[-16,72],[-17,-3],[-4,44],[11,50],[33,-22],[27,23],[52,96],[24,-22],[14,-18],[-6,-28],[36,-136],[-23,-70],[12,-49],[-10,-164],[-10,-94],[-30,22],[-24,-2]],[[5670,1511],[-22,-16],[-11,7],[28,33],[5,-24]],[[5857,1650],[11,-6],[-13,-18],[-9,17],[11,7]],[[5901,2008],[-5,-41],[12,-48],[34,-55],[59,-49],[22,-9],[-14,-64],[-43,-6],[-40,29],[-32,-30],[-49,4],[-11,-43],[-28,-55],[-55,-48],[-7,-26],[-52,-84],[11,38],[-5,35],[70,77],[-5,16],[-32,-17],[-48,4],[-4,34]],[[5679,1670],[36,62],[-3,79],[34,35],[-5,63],[-29,28]],[[6881,594],[-10,6],[-14,-91],[4,-19],[-11,-54],[-11,0],[-2,-64],[-18,-12],[-6,-36],[-26,27],[7,27],[-20,83],[44,78],[0,54],[-19,34],[-37,-44],[-6,-43],[-32,-18],[-65,75],[-24,-13],[-54,-97],[-13,-55],[-10,28],[-21,-47],[-61,-3],[-38,-29],[-49,41],[-38,101],[-77,72],[-74,23],[-12,-30],[-1,-70],[-19,-76],[-16,16],[-65,-51],[-8,23],[-28,8],[-24,31],[-12,54],[7,33],[-18,23],[-10,-31],[-25,17],[-2,32],[-37,10],[1,-30],[-19,-38],[-17,24],[9,19],[-35,0],[-7,-29],[-35,8],[30,32],[48,2],[-3,32],[31,34],[-83,-21],[-14,15],[-20,-18],[7,44],[17,-8],[16,49],[-17,-6],[-3,38],[-26,-9],[0,66],[-22,19],[27,21],[-1,66],[-42,15],[-12,48],[-20,-30],[-39,45],[27,26],[-15,70],[18,9],[14,-37],[5,-58],[47,26],[-17,9],[-25,79],[19,2],[18,57],[-21,-7],[2,43],[-30,56],[35,57],[-3,28],[-92,-30],[8,41],[0,87],[18,21],[11,47],[37,58],[31,-3],[33,17],[17,-37],[37,0],[-12,49],[40,-7],[-15,-21],[98,1],[20,-10],[22,19],[-42,24],[24,33],[64,13],[42,19],[-65,0],[-37,61],[5,47],[18,23],[74,-25],[28,-1],[15,18],[63,-36],[45,4],[19,30],[0,31],[82,78],[15,33],[39,32],[35,12],[45,38],[113,-20],[41,0],[28,41],[21,-21],[-5,-20],[15,-50],[35,-35],[47,27],[19,-30],[1,-45],[36,-60],[19,37],[41,-23],[6,-30],[61,-40],[12,28],[23,-44],[49,-16],[43,10],[24,24],[4,0],[-249,-1160]],[[4391,331],[-25,10],[-3,25],[21,-12],[7,-23]],[[4358,378],[-10,5],[8,11],[9,-11],[-7,-5]],[[2611,3110],[12,-28],[-4,-23],[-18,45],[10,6]],[[2590,3179],[18,-13],[7,-12],[-34,25],[9,0]],[[2509,3378],[-6,-4],[-5,18],[10,-1],[1,-13]],[[2405,3475],[6,-8],[-20,4],[0,21],[14,-17]],[[3454,3190],[8,22],[55,11]],[[3517,3223],[8,-80],[19,-53]],[[3597,2506],[-3,-7],[-4,-6]],[[3590,2493],[-3,5],[-5,-11]],[[3582,2487],[-24,-19],[-1,-27],[-46,-41],[-15,-33],[9,-23],[-92,-43],[-25,40],[-32,7],[-6,38],[-26,-7],[12,27],[-28,4],[-11,-26],[-29,6],[-6,24],[-35,1],[-11,25],[-19,-5],[-62,-68],[-30,-49],[-9,-45],[2,-106],[14,-33]],[[2947,2153],[1,30],[-32,-4]],[[2554,2395],[15,4],[20,49],[33,297],[-8,-10],[14,236],[5,21],[36,-67],[2,27],[-50,79],[14,53],[-4,97],[-78,67],[-6,36],[-30,51],[14,63],[-19,31],[2,40],[-15,-17],[-31,37],[19,11],[-12,28],[-36,-8],[5,36],[-34,-14],[-51,55],[-36,6],[-10,23],[-49,-22],[-7,46],[-28,26],[45,11],[-2,24],[-27,30],[21,29],[-44,-19],[-3,41],[24,37],[29,4],[37,25],[14,-29],[4,29],[27,-12],[7,41],[47,9],[46,-99],[42,48],[11,-29],[41,37],[1,-25],[52,11],[-20,23],[0,77],[-6,53],[-24,48],[-13,89],[38,-19],[23,16],[19,-24],[-9,-18],[13,-35],[41,-18],[46,-7],[21,-17],[44,38],[28,9],[-35,12],[15,65],[49,40],[56,22],[35,63],[6,25],[4,161],[45,39],[62,21]],[[3039,4502],[-1,0],[8,-67]],[[3046,4435],[22,-32],[40,12],[15,-66],[42,-23],[1,-34],[41,5],[20,-23],[-7,-76],[33,-12],[25,16],[3,26],[21,15],[-9,-45],[8,-52],[10,3],[59,-83],[35,12]],[[3405,4078],[20,-27],[19,15],[24,-10]],[[3468,4056],[17,-6],[23,-72],[14,10],[49,-28],[14,18],[29,-38],[32,1],[30,-22],[-11,-37],[-33,-57],[-6,-70],[-21,-71],[6,-26],[-11,-60],[7,-55]],[[3607,3543],[-23,-42],[-42,19],[-16,-40],[20,-3],[-50,-97],[-18,-11],[-1,-51],[-34,-45],[-8,-48],[9,-17],[-20,-62],[37,30],[-7,14]],[[3737,2027],[-22,55],[19,87],[44,45],[20,-14],[6,87],[9,7],[7,-51],[-3,-51],[9,-28],[2,-118],[-17,-43],[0,-68],[-20,-92],[-49,53],[15,36],[-25,9],[5,56],[-18,10],[18,20]],[[3385,6704],[19,-6],[-3,-11],[-20,14],[4,3]],[[3367,6712],[-8,12],[4,9],[6,-9],[-2,-12]],[[3430,6731],[-9,3],[3,11],[16,-2],[-10,-12]],[[3348,6747],[2,-33],[-14,7],[4,60],[8,-34]],[[3341,6894],[12,-21],[-27,4],[3,28],[12,-11]],[[3373,6887],[-22,-2],[-6,31],[19,8],[9,-37]],[[3391,6959],[-2,-41],[-15,-4],[-6,42],[23,3]],[[3346,6962],[1,-22],[-11,13],[4,17],[6,-8]],[[3327,7029],[2,-33],[-19,25],[3,42],[14,-34]],[[3319,7084],[15,-6],[4,-23],[-22,25],[3,4]],[[3297,7196],[11,-15],[-5,-3],[-12,17],[6,1]],[[3287,7222],[-3,-10],[-7,19],[6,6],[4,-15]],[[3304,7254],[11,-7],[-21,-16],[0,26],[10,-3]],[[3311,7460],[20,-11],[-23,-21],[-14,17],[17,15]],[[3324,7490],[9,-3],[-6,-19],[-12,29],[9,-7]],[[3396,7570],[8,-25],[-26,-4],[2,27],[16,2]],[[3385,7579],[15,8],[-2,-10],[-23,3],[10,-1]],[[3437,7584],[-22,-26],[-8,29],[15,18],[15,-21]],[[3453,7609],[12,-11],[-26,1],[-8,9],[22,1]],[[3530,7689],[1,-9],[-27,-12],[2,20],[24,1]],[[3520,7722],[12,1],[-4,-23],[-11,10],[3,12]],[[3644,7784],[-14,-16],[-12,9],[5,11],[21,-4]],[[3617,7767],[-17,-20],[-14,30],[19,-9],[12,-1]],[[3688,7808],[-13,-1],[-2,15],[7,0],[8,-14]],[[3675,7805],[-20,-6],[-9,12],[16,17],[13,-23]],[[3665,7855],[-33,9],[22,27],[20,-22],[-9,-14]],[[3743,7982],[3,-23],[-9,-9],[-48,-5],[54,37]],[[4032,8209],[10,-12],[-3,-13],[-9,6],[2,19]],[[4016,8203],[21,-38],[-26,9],[-11,40],[16,-11]],[[4029,8214],[-4,-14],[-14,20],[13,5],[5,-11]],[[4014,8284],[-15,-2],[-29,-12],[30,26],[14,-12]],[[3970,8273],[-9,-5],[5,21],[37,13],[-33,-29]],[[4077,8339],[-24,-18],[-5,3],[8,15],[21,0]],[[4132,8350],[-12,-26],[-18,6],[22,38],[8,-18]],[[4148,8448],[9,-32],[-45,-48],[4,39],[32,41]],[[4097,8500],[-4,-29],[-18,7],[8,21],[14,1]],[[4185,8576],[-28,-26],[-13,3],[12,25],[29,-2]],[[4171,8633],[5,-19],[-14,-14],[-26,-13],[35,46]],[[4193,8666],[8,-16],[-13,-6],[-5,9],[10,13]],[[4210,8701],[-7,-21],[-11,8],[2,16],[16,-3]],[[4354,8888],[-4,-29],[-24,18],[8,16],[20,-5]],[[4372,8973],[-1,-7],[-18,-6],[16,18],[3,-5]],[[4452,9123],[20,-13],[-36,-3],[1,15],[15,1]],[[4470,9121],[-10,0],[-2,8],[7,12],[5,-20]],[[4226,9146],[4,-28],[-39,-40],[22,62],[13,6]],[[4259,9146],[-17,-20],[-7,21],[29,17],[-5,-18]],[[4428,9197],[-11,0],[10,15],[7,-6],[-6,-9]],[[4354,9216],[-5,-17],[-5,12],[-9,10],[19,-5]],[[4323,9204],[8,-25],[-30,-5],[-14,-24],[-18,16],[2,31],[52,7]],[[4457,9250],[-44,-49],[-64,-29],[34,45],[-12,15],[29,16],[57,2]],[[4597,9248],[-34,-10],[10,33],[18,6],[6,-29]],[[4413,9266],[-19,17],[45,-1],[-12,-16],[-14,0]],[[4676,9338],[-30,-10],[1,14],[19,24],[10,-28]],[[4689,9365],[0,17],[24,-15],[-24,-20],[0,18]],[[4435,9370],[-13,3],[4,11],[9,0],[0,-14]],[[4599,9397],[16,-2],[0,-22],[-34,22],[18,2]],[[4709,9401],[-6,12],[11,14],[11,-8],[-16,-18]],[[4531,9410],[-44,-16],[16,39],[60,57],[-4,-47],[-28,-33]],[[4870,9644],[22,-37],[-26,-17],[3,-25],[-71,-16],[-22,16],[33,1],[-12,32],[20,22],[48,-2],[5,26]],[[5074,9624],[-12,-1],[2,26],[17,3],[-7,-28]],[[6126,9633],[7,-5],[-42,-16],[19,42],[16,-21]],[[4965,9638],[-22,-5],[5,22],[37,15],[-20,-32]],[[5110,9687],[14,-7],[-18,-17],[-20,14],[24,10]],[[4913,9697],[40,-21],[-19,-43],[-32,-13],[-44,43],[13,19],[42,15]],[[4866,9695],[20,2],[-31,-24],[0,35],[11,-13]],[[5101,9699],[-8,-2],[1,22],[10,-12],[-3,-8]],[[4950,9703],[-21,5],[1,12],[9,0],[11,-17]],[[5088,9709],[-21,-19],[-23,16],[23,36],[27,-11],[-6,-22]],[[4911,9747],[3,-33],[-14,-4],[-12,9],[23,28]],[[4967,9746],[13,-22],[37,-16],[-37,-14],[-20,43],[7,9]],[[5195,9750],[-6,5],[4,29],[9,-9],[-7,-25]],[[5303,9783],[30,-16],[5,-21],[-63,11],[5,26],[23,0]],[[5394,9846],[18,-40],[-31,-41],[-32,-10],[-23,46],[68,45]],[[5430,9871],[34,-24],[-42,-27],[-12,50],[20,1]],[[5458,9954],[1,-27],[-20,12],[6,20],[13,-5]],[[5537,9977],[0,-19],[-19,9],[12,14],[7,-4]],[[5638,9995],[24,-30],[33,-13],[-73,-20],[-28,31],[44,32]],[[1861,9999],[-4,-39],[-79,-26],[-29,-33],[-17,16],[68,40],[21,35],[40,7]],[[6218,9625],[10,-38],[-9,-39],[-38,2],[-25,23],[-18,-49],[-25,-23],[-64,-22],[-11,-44],[-32,-24]],[[6006,9411],[-14,22],[4,30],[54,68],[-24,57],[-82,36],[-26,25],[-31,48],[-37,-13],[-52,-33],[-27,10],[-40,-6],[-34,-55],[-19,-6],[-17,-47],[-1,-42],[-16,-48],[8,-50],[-16,-35],[-52,-20],[-9,-47],[-29,-20],[-21,28],[-37,11],[-46,29],[-22,-27],[-61,-27],[-19,19],[-67,7],[-6,30],[-39,52],[-41,69],[-39,7],[-31,-29],[14,-26],[-14,-13],[-32,17],[-14,-18]],[[5071,9414],[-58,-5],[26,-30],[-11,-68],[-31,-33],[31,-17],[-35,-35],[-100,42],[-44,0],[-24,20],[-29,-11],[-1,-103],[-30,-52],[-65,37],[-58,-53],[-37,-97],[-31,-13],[-8,-24],[35,-60],[-3,-41],[-42,-46],[-42,-78],[-27,-30],[6,-59],[-47,-33],[-59,-8],[12,-77],[-9,-39],[-5,-105],[-23,-63],[-75,-138],[53,-39],[5,-65],[-25,-53],[-79,22],[-62,-36],[-57,-99],[3,-39],[-23,-45],[26,-79],[-14,-21],[6,-52],[-7,-40],[25,-97],[-17,-139],[29,-39],[21,-9],[30,-49],[-22,-91],[-48,-16],[14,-62],[25,-65],[-13,-60],[3,-49],[-42,-59],[-32,-8],[5,-28],[-24,-58],[15,-84],[-17,-90],[-24,-7],[-1,26]],[[4040,6665],[-8,30],[-52,26],[-10,-9],[-25,71],[7,47],[-11,36],[10,36],[-13,7],[-5,-41],[12,-45],[-13,-15],[-1,-73],[-13,7],[-5,-40],[-40,-46],[-30,0],[-47,-35],[20,1],[-106,-158],[-17,-3],[-26,-39],[-10,34],[-13,-40],[-38,-17],[-65,3],[-53,25],[19,28],[-78,45],[-4,22],[-29,15],[-26,63],[9,78],[21,-31],[33,-6],[-18,50],[42,52],[-20,35],[-45,-27],[-9,30],[-13,-37],[-33,63],[34,62],[29,-16],[17,22],[-28,26],[36,28],[20,71],[47,68],[-42,-30],[-37,-53],[0,-37],[-20,4],[3,33],[-16,21],[-16,-20],[-22,13],[-5,49],[14,37],[13,-11],[-11,16],[41,36],[-1,-55],[-15,-8],[8,-8],[10,15],[-2,77],[-18,-34],[-26,-18],[-42,65],[43,-25],[-2,31],[-27,6],[-3,56],[46,-6],[51,26],[44,-20],[36,35],[41,-26],[43,17],[2,13],[-46,-22],[-51,41],[-7,-40],[-30,19],[-68,-13],[-21,-15],[-14,28],[-26,9],[-8,55],[46,37],[-41,21],[-2,29],[41,29],[3,17],[41,-19],[89,-5],[-123,33],[-31,-11],[18,35],[-27,38],[12,14],[31,-42],[-3,34],[56,3],[11,30],[76,40],[-45,2],[26,21],[-31,-2],[7,22],[33,-14],[18,26],[36,0],[48,-30],[0,36],[35,15],[33,-3],[-6,16],[-78,-25],[-8,16],[-38,-6],[-7,57],[41,22],[25,-27],[54,17],[12,37],[29,-41],[-1,-22],[32,-1],[-51,65],[43,5],[-2,11],[-12,-3],[-18,19],[25,5],[2,-5],[-3,18],[32,14],[7,23],[49,-19],[-11,40],[60,38],[29,-60],[-14,-27],[31,-1],[-1,31],[23,7],[56,-13],[13,13],[-27,23],[40,47],[48,22],[-41,24],[45,36],[-27,4],[-33,-24],[13,-30],[-19,-29],[-55,-41],[-56,-18],[-14,49],[26,25],[-54,-33],[0,30],[73,45],[-29,5],[26,66],[49,45],[0,24],[32,6],[8,36],[23,-43],[23,-14],[16,48],[-13,37],[50,26],[-23,5],[30,36],[-48,-39],[-27,3],[18,28],[49,18],[17,22],[19,-8],[50,24],[37,57],[-48,-52],[-18,34],[33,40],[-7,48],[-19,-15],[-7,28],[50,89],[27,28],[-36,-6],[18,25],[74,29],[50,-1],[-44,14],[-62,-25],[33,28],[-36,16],[19,14],[9,61],[26,11],[6,36],[30,1],[-24,35],[71,12],[15,49],[48,15],[13,-20],[22,20],[30,-13],[11,13],[-44,9],[11,18],[-56,-26],[2,16],[-40,-9],[37,50],[19,-13],[25,18],[-36,12],[31,21],[52,-29],[45,31],[-42,-17],[-26,4],[-7,33],[45,28],[-25,15],[-61,-44],[-5,24],[25,5],[-25,21],[23,19],[34,-1],[55,17],[20,16],[-6,0],[-8,-7],[-15,7],[-14,4],[-34,3],[26,27],[47,-1],[4,32],[15,-21],[-7,-38],[22,-40],[7,29],[19,-25],[4,32],[-17,17],[10,40],[-30,25],[48,-17],[-42,26],[53,15],[14,-22],[81,28],[0,29],[-56,-27],[-58,1],[11,56],[68,31],[52,37],[-31,2],[30,53],[44,21],[-8,32],[33,55],[34,-51],[37,9],[-52,31],[3,20],[39,9],[19,-43],[38,-14],[-5,-33],[19,-1],[-14,44],[-22,-1],[-23,50],[16,48],[23,13],[54,6],[-12,-34],[20,-15],[2,38],[16,1],[17,48],[28,-15],[-25,-130],[-31,-39],[40,33],[25,51],[3,52],[73,29],[25,42],[58,-55],[3,43],[-11,20],[-36,9],[-35,32],[43,29],[32,-45],[-5,33],[49,7],[12,-13],[67,-11],[7,-49],[34,-21],[23,20],[-41,19],[26,12],[-14,24],[32,18],[-6,20],[46,40],[44,-8],[-22,19],[26,38],[30,-17],[-8,33],[-28,4],[12,28],[24,-24],[5,55],[54,-15],[11,-36],[20,18],[52,10],[5,-10],[-95,-97],[18,7],[-4,-61],[-25,-21],[-2,-41],[20,0],[45,60],[-14,7],[67,82],[6,24],[34,43],[36,24],[6,-36],[-11,-32],[-34,-17],[35,-2],[-17,-75],[71,71],[0,32],[44,29],[-45,20],[25,7],[-10,23],[33,-20],[1,38],[35,-16],[35,13],[-1,-24],[41,-4],[-11,-32],[-25,-21],[-52,1],[42,-15],[-55,-36],[74,27],[-8,-25],[-44,-36],[37,-23],[-1,-71],[10,76],[31,83],[30,42],[30,3],[39,-27],[-6,-25],[48,9],[-11,-29],[35,25],[91,-81],[13,11],[18,-46],[-60,-10],[-44,-49],[-104,14],[-53,13],[-17,-14],[121,-41],[-27,-19],[33,2],[-6,-47],[35,-2],[24,16],[-5,25],[36,-16],[40,-3]],[[3769,7934],[1,7],[9,0],[5,-6],[-13,-4],[14,-13],[-75,-37],[-25,9],[30,37],[47,14],[7,-7]],[[4440,9399],[21,-13],[12,-8],[4,-69],[-30,-21],[-28,17],[39,17],[-2,15],[-59,-36],[-29,17],[36,22],[36,7],[0,52]],[[5318,9854],[38,23],[-15,17],[33,-3],[8,17],[-14,-44],[-45,-39],[-82,-15],[22,35],[-37,-3],[42,27],[50,-15]],[[4617,9323],[-12,-43],[-43,-4],[-14,-38],[-24,9],[-14,-35],[-31,15],[-24,-11],[-15,0],[30,40],[-4,28],[31,20],[-7,48],[22,39],[29,2],[-4,-49],[14,-5],[-20,-42],[32,36],[17,44],[21,-14],[16,-40]],[[4653,9457],[26,32],[-22,24],[50,-5],[12,13],[-25,14],[6,16],[36,-21],[22,36],[24,-27],[3,-39],[-20,-9],[7,-38],[-53,-7],[-75,-28],[26,22],[-17,17]],[[3846,3534],[-44,36],[-28,38],[12,-41]],[[3786,3567],[-31,-5],[-34,39],[-23,-35],[6,-22],[-97,-1]],[[3468,4056],[17,93],[-31,25],[-12,63]],[[3442,4237],[3,26],[26,28],[-5,45],[-15,3],[-2,34],[-21,37]],[[3563,5092],[12,25],[-31,11],[7,58],[15,22],[82,15],[24,-46],[-12,-14],[17,-25],[12,27],[-7,26],[35,-16],[-9,38],[10,47],[32,-7],[39,7]],[[3789,5260],[-22,9],[-20,40],[1,60],[-21,5],[-3,31],[26,8],[17,25],[-36,62],[-3,44]],[[3815,5521],[16,15],[51,-53],[-2,-35],[85,-62],[34,7],[-1,-44],[-36,-38],[16,-21],[32,14],[31,-30],[5,25],[26,43],[42,4],[27,36],[18,47],[42,-30],[18,19],[8,-42],[40,-49],[27,14],[9,-24],[3,29],[45,-64]],[[4351,5282],[-4,-8],[3,-8]],[[4350,5266],[-37,-9],[8,61],[-15,-10],[11,-24],[-10,-18],[18,-29],[32,-20]],[[4357,5217],[16,-117],[-7,-61],[-22,-25],[-3,-29],[59,-75],[-12,-43],[17,-46],[8,-48],[-20,-75],[15,-35],[1,-43],[24,-19],[9,-58],[-24,-103]],[[4418,4440],[-22,-4],[-14,46],[-22,6],[6,-42],[-84,-46],[-17,-32],[-24,-4],[-25,-24],[-56,-29],[-26,-62],[-23,41],[19,-73],[31,-38],[-15,-45],[46,-113],[23,-9],[20,-49],[34,-49],[14,3],[24,-50]],[[4307,3867],[-12,-67],[-22,18],[-13,-57],[-41,-31],[-33,-40],[28,-75],[-11,-33],[14,-3],[2,-61],[-29,17],[-2,31],[-30,-10],[-35,21],[-2,-28],[-61,-4],[-41,-52],[-31,-2],[-21,33],[-43,16],[5,-37],[-16,-37],[-41,61],[-26,7]],[[3789,5260],[10,-2],[30,-68],[-19,63],[-11,5],[-2,4],[-8,-2]],[[4046,5305],[-3,-14],[-11,3],[11,14],[3,-3]],[[3753,5427],[-9,9],[4,5],[14,1],[-9,-15]],[[4019,5430],[6,-18],[-34,15],[13,19],[15,-16]],[[4259,5477],[27,-18],[-7,-31],[22,-34],[-30,0],[-26,-25],[-17,23],[15,13],[-9,44],[25,28]],[[3718,5489],[-20,6],[7,10],[10,1],[3,-17]],[[3697,5544],[-11,-1],[9,39],[-2,-18],[4,-20]],[[3787,3566],[1,-3]],[[3787,3566],[0,0]],[[1637,5304],[0,-38],[-11,21],[-23,7],[34,10]],[[2051,5326],[18,-26],[-26,0],[11,-38],[3,-60],[14,-18],[-3,-51],[14,-117],[-25,-82],[1,-33],[-20,-51],[2,-49],[-52,16],[-7,-24],[-60,-7],[-18,-37],[-27,-10],[-19,-34],[-28,-7],[-50,-62],[-18,6],[-47,-25],[-14,11],[-47,-28],[30,46],[3,31],[-57,-36],[-6,21],[39,45],[-39,-22],[-39,35],[19,28],[37,24],[3,16],[-62,-8],[-1,21],[33,29],[34,-14],[4,38],[-13,11],[30,19],[8,26],[38,0],[36,20],[-5,30],[-17,-37],[-45,4],[-31,-12],[37,43],[16,50],[-14,1],[23,57],[38,-1],[-1,34],[-77,-3],[3,30],[-32,-13],[11,20],[-26,-2],[-18,47],[37,17],[-6,39],[38,10],[0,27],[-39,-11],[12,23],[-23,76],[19,30],[70,-13],[9,-37],[10,40],[65,-4],[-21,22],[44,45],[16,34],[-61,-7],[-14,21],[27,36],[26,2],[-16,28],[21,61],[54,12],[17,19],[20,-64],[-7,68],[22,5],[-6,21],[50,-45],[-34,-41]],[[1942,5592],[-18,-18],[-16,-72],[-33,-3],[10,-32],[-48,-41],[38,-71],[60,-25],[29,82],[19,-19],[10,-38],[17,-9],[2,-37],[39,17]],[[6102,3005],[30,48],[6,6],[-25,-40],[-11,-14]],[[6420,3126],[16,-4],[22,3],[7,-12],[-45,13]],[[6365,3153],[-46,17],[-14,11],[51,-21],[9,-7]],[[5240,3768],[3,50],[19,31],[4,40],[20,61]],[[5286,3950],[35,-20],[-17,47],[3,54],[-10,44],[52,118],[73,118],[25,4],[15,37],[-15,79],[17,3],[-24,46],[-4,35],[-27,56],[-4,49]],[[5405,4620],[17,35],[26,-17],[29,37],[17,44],[37,1],[52,18],[65,-6],[72,-21],[50,-27],[37,-2],[8,-41],[48,0],[5,-36],[10,38],[29,-12],[15,26],[16,-35],[29,7],[14,-41],[15,43],[29,18],[22,-70],[34,32],[26,-14],[33,14],[24,-49],[20,-19],[11,28],[-14,72],[17,59],[33,70],[33,-8],[25,20],[33,-5]],[[6322,4779],[14,-17],[38,12],[14,66],[64,-21],[30,34],[32,-4],[6,-19],[31,19],[28,-51],[5,-60],[32,-36],[-1,-29],[-28,-9],[20,-85],[-13,-33],[48,-6],[15,-17],[39,5],[20,-52],[22,-89],[-11,-12],[8,-40],[28,-36],[16,22],[30,-1],[19,-38],[13,6],[23,-28],[36,37],[58,23],[19,-36],[14,-58],[31,-49],[18,11],[1,33],[58,-40],[28,-30],[27,15],[17,-36],[26,-1],[27,-50],[35,13],[-8,-36],[11,-58],[-25,-54],[-27,-7],[9,-34],[22,-12],[-28,-29],[-8,-44],[20,-1],[20,-85],[-17,-42],[-9,-78],[-104,4],[-11,-47],[-43,-19],[-17,-87],[2,-52]],[[7046,3411],[-71,-3],[-28,-56],[-8,14],[-28,-18],[-24,-40],[-12,15],[-57,-30],[-32,-4],[-58,-78],[-11,18],[-24,-44],[-30,-29],[8,-66],[19,-70],[32,-82],[17,-20],[24,8],[18,39],[14,-29],[18,27],[50,-10],[-19,-53],[3,-45],[-25,-17],[-20,12],[-22,-15],[-24,32],[-70,-75],[-28,-5],[-33,-25],[-16,-51],[-41,-44],[-27,5],[-38,45],[21,15],[-6,46],[12,39],[-7,45],[-16,25],[-17,-8],[-41,54],[-43,-4],[1,32],[38,48],[102,82],[-14,13],[-4,46],[-11,-28],[-31,49],[-13,-23],[-37,-1],[-33,-16],[-27,15],[-49,59],[21,28],[-48,26],[87,-21],[19,35],[-56,9],[-10,47],[-9,-47],[-42,5],[-55,-12],[-27,-23],[5,-20],[-34,-100],[-40,-71],[-17,7],[-6,-34],[-23,-29],[-10,58],[-4,-94],[14,-3],[3,-42],[-11,-29]],[[6085,2895],[-1,36],[-36,27],[-61,-59],[-51,25],[-15,39]],[[5921,2963],[32,10],[-1,44],[30,49],[2,33],[22,11],[7,50],[-9,21],[1,53],[25,23],[4,-49],[29,35],[15,-34],[13,30],[15,-35],[27,9],[-19,39],[2,79],[-42,38],[5,28],[-5,76],[-17,-12],[-32,69],[13,92],[-13,29],[-19,-12],[-18,49],[-31,10],[-17,22],[-32,4],[-37,57],[-28,6],[-37,-31],[-37,9],[-25,-37]],[[5744,3728],[-35,-12],[-15,-61],[-102,-26],[-16,-34],[-26,-17],[-37,63],[-37,-12],[-51,25],[-47,1],[-27,28],[-27,-40]],[[5324,3643],[-15,46],[-17,-4],[-12,39],[-15,0],[-9,44],[-16,0]],[[6138,3212],[33,-77],[9,14],[-33,70],[-9,-7]],[[6570,3115],[7,19],[30,-25],[20,-33],[-3,-28],[33,35],[-12,-32],[36,-32],[18,-92],[31,-22],[-7,25],[-38,91],[-23,97],[-20,36],[-5,-45],[-18,2],[13,34],[-39,42],[-16,-40],[-6,18],[-36,7],[35,-57]],[[5051,6939],[-14,-4],[-5,0],[7,11],[12,-7]],[[5051,6952],[11,8],[8,-7],[-5,-11],[-14,10]],[[5012,6967],[14,-24],[-6,-10],[-17,19],[9,15]],[[5028,6974],[6,1],[-4,-18],[-7,8],[5,9]],[[4963,6995],[-11,-19],[-6,15],[8,21],[9,-17]],[[4992,7043],[40,-26],[-11,-30],[-17,24],[1,-46],[-31,-4],[-13,53],[31,29]],[[5275,6959],[0,-19],[-6,-1],[-4,22],[10,-2]],[[5185,6979],[-3,-10],[-11,-2],[6,21],[8,-9]],[[5212,6991],[-15,-18],[-6,2],[5,19],[16,-3]],[[5225,6976],[-7,13],[12,10],[-3,-11],[-2,-12]],[[5633,7001],[-8,16],[3,5],[11,-14],[-6,-7]],[[5319,6994],[-17,-54],[-24,0],[-2,52],[43,2]],[[5256,7010],[-22,5],[6,13],[22,-6],[-6,-12]],[[5273,7032],[-7,-11],[-6,8],[10,9],[3,-6]],[[5244,7040],[13,3],[1,-4],[-11,-4],[-3,5]],[[5221,7027],[-19,16],[11,21],[12,-31],[-4,-6]],[[5165,7088],[-2,-18],[-6,5],[-7,18],[15,-5]],[[5150,7185],[-9,17],[6,5],[8,-11],[-5,-11]],[[5122,7841],[13,-13],[18,-9],[-13,-16],[-18,38]],[[5232,7842],[6,10],[15,-7],[-13,-15],[-8,12]],[[5153,7848],[-4,-8],[-11,12],[14,9],[1,-13]],[[5315,7975],[0,-12],[-6,-4],[-7,12],[13,4]],[[5548,8328],[-27,-28],[-8,19],[11,12],[24,-3]],[[5468,8535],[-16,61],[-33,44],[-9,62],[27,35],[1,52],[12,16],[-48,94],[21,72],[-37,18],[14,28],[-7,81],[18,14],[-56,54],[-11,46],[-28,26],[-57,23],[-26,0],[-17,25],[-51,32],[-60,77],[-34,19]],[[6006,9411],[-56,-35],[39,-17],[-38,-80],[23,-93],[71,-34],[39,-70],[40,-38],[-10,-49],[-44,-57],[-48,-84],[-1,-42],[49,-95],[8,-39],[34,-66],[20,-77],[2,-46],[-44,-8],[2,-82],[-15,-25],[28,-9],[-2,-30],[-26,-28],[22,-54],[31,-3],[13,-39],[-24,-17],[8,-50],[59,-48],[-6,-62],[-34,-55],[-25,-14],[58,-77],[37,-23],[45,-50],[3,-21],[36,-58],[-37,-110],[-37,-57],[-31,-31],[-96,-161],[-27,-30],[-38,-65],[-46,-40],[-73,-93],[-38,-57]],[[5877,7092],[-40,-24],[-31,28],[-19,-21],[-77,-29],[-34,21],[-9,-59],[-23,0],[-6,33],[-19,-33],[-34,0],[-3,-17],[-65,-15],[-14,-36],[-12,21],[-85,-32],[-20,0],[-20,-32],[-39,-7],[38,30],[-16,5],[17,27],[-29,6],[-6,13],[-3,-11],[-4,-16],[-4,20],[11,9],[-9,18],[2,32],[-40,-26],[-8,11],[20,36],[-38,2],[-47,40],[-4,28],[-22,-37],[-29,41],[5,70],[-15,43],[18,-2],[12,42],[-6,100],[23,-12],[-20,33],[-18,79],[-15,13],[11,102],[-23,13],[7,54],[-13,21],[16,49],[27,26],[4,32],[21,-11],[-21,49],[44,14],[2,-23],[52,40],[-20,38],[26,8],[18,59],[27,-16],[19,46],[42,23],[1,41],[63,54],[6,37],[40,41],[8,39],[39,52],[34,14],[21,-27],[12,22],[-16,26],[25,-7],[-26,43],[11,36],[5,62],[-30,33],[-45,8],[-16,48],[-16,-10],[-27,15]],[[4672,6214],[-1,-32],[-47,-180],[-8,-60],[-18,-33],[-1,86],[24,91],[11,5],[28,112],[12,11]],[[4913,6391],[14,-7],[-34,-17],[5,19],[15,5]],[[4073,6410],[-8,-26],[-16,-3],[-2,25],[26,4]],[[4079,6461],[2,-33],[-33,-11],[-10,21],[27,34],[14,-11]],[[4649,6477],[-2,-8],[-7,29],[14,-13],[-5,-8]],[[4816,6658],[-5,-11],[-11,-6],[1,12],[15,5]],[[4800,6674],[-9,-16],[-8,5],[5,11],[12,0]],[[4741,6647],[-6,2],[1,36],[8,-19],[-3,-19]],[[4828,6683],[-6,-13],[-7,6],[13,23],[0,-16]],[[4835,6747],[2,-8],[-3,-9],[-19,19],[20,-2]],[[4853,6814],[-14,-31],[-6,17],[9,15],[11,-1]],[[4873,6833],[9,12],[-4,-18],[-6,5],[1,1]],[[4888,6890],[0,-5],[-12,-2],[8,20],[4,-13]],[[4826,7066],[13,-41],[-18,18],[1,36],[4,-13]],[[4787,7693],[7,-1],[-4,-15],[-11,-1],[8,17]],[[5099,7968],[8,6],[-2,-20],[-7,-7],[1,21]],[[5259,8453],[-3,-5],[0,-8],[-10,17],[13,-4]],[[5290,8469],[6,-1],[-5,-13],[-6,12],[5,2]],[[4789,6260],[39,80],[31,31],[5,-21],[25,17],[9,-21],[-31,-25],[-2,-78],[15,-12],[-29,-29],[6,-16],[-38,-31],[-9,-51],[-18,-5],[14,32],[-19,60],[9,33],[-7,36]],[[5468,8535],[-26,-18],[-27,19],[-35,-1],[-28,-30],[-49,40],[-1,-27],[-23,26],[-25,-45],[16,-42],[-69,40],[44,-40],[-36,-1],[10,-34],[-51,-5],[24,-30],[-9,-37],[-50,-86],[-15,-4],[50,-100],[-61,-89],[-19,-71],[-31,-13],[-22,-46],[-26,3],[-36,-39],[-7,-25],[-25,36],[4,-41],[-25,13],[-1,-32],[-27,-45],[-13,9],[-31,-18],[-28,-55],[9,-22],[-44,-25],[-17,14],[13,-55],[-38,-51],[-30,28],[-12,-38],[20,-50],[-17,-72],[5,-64],[-39,-38],[14,-26],[-2,-135],[17,-68],[-14,-12],[43,-15],[7,-36],[32,23],[6,-24],[66,-78],[-26,16],[20,-35],[35,-12],[15,-58],[-18,-33],[28,1],[-43,-41],[-27,-40],[-46,-21],[54,-18],[-7,25],[36,-23],[-7,-14],[-45,3],[15,-47],[-42,-22],[-16,-39],[-17,2],[1,55],[-17,-9],[-2,-62],[-75,-66],[-77,12],[20,-20],[42,3],[17,-32],[-24,-14],[9,-32],[-3,-53],[-21,-53],[-19,-11],[32,-56],[-15,5],[13,-65],[-16,-25],[-9,-56],[13,-35],[-54,-172],[-7,-45],[-21,-46],[-3,20],[-28,13],[-29,-18],[-41,9],[-30,-7],[9,-32],[-32,0],[-30,-58],[-2,-26],[19,-55],[-21,-36],[-33,11],[-68,-24],[-36,22],[-3,42],[14,26],[-15,21],[-47,144],[33,-13],[-20,52],[30,10],[-2,53],[-15,0],[-15,47],[-25,25],[-36,150],[-14,-27],[-2,71],[-23,27],[-2,33],[19,103],[-4,28],[-36,-11],[-10,42],[-21,-26],[6,66],[-18,106],[11,34],[25,-27]],[[5859,6394],[54,-39],[3,40],[-23,47],[-36,-11],[-14,28],[32,64],[0,107],[-8,36]],[[5881,6711],[12,33],[9,7]],[[5902,6751],[5,4]],[[5907,6755],[12,9]],[[5901,6799],[-3,61],[10,27],[33,-37],[16,53],[23,-21],[29,13],[20,47],[116,-34],[2,34],[-29,7],[-12,38],[-93,8],[-23,45],[-23,8],[-19,46],[28,-28],[-3,62],[-29,-5],[-21,-32],[-46,1]],[[6218,9625],[48,-13],[20,-20],[41,0],[-6,46],[30,-20],[-12,39],[15,10],[65,-49],[32,-1],[23,-33],[-29,-21],[-78,20],[-17,-25],[41,6],[17,-21],[62,-9],[-25,-30],[52,23],[22,-6],[-26,-54],[23,-12]],[[6516,9455],[14,38],[90,-4],[27,-17],[67,-9],[8,16],[72,-27],[38,-32],[59,-31],[71,-56],[24,-8],[84,-97],[20,8],[102,-85],[55,-16],[40,-31],[16,-42],[18,16],[39,-30],[-2,-63],[17,-13],[-4,-46],[22,-5],[6,-61],[-20,-56],[-83,-110],[-40,-32],[-84,-42],[-88,-22],[-71,9],[-117,54],[-53,3],[-115,33],[-66,54],[-40,-18],[-30,38],[-38,2],[-35,37],[-5,-27],[-71,67],[-4,32],[-48,18],[-13,-9],[33,-37],[-2,-29],[30,-41],[42,-11],[-27,-46],[38,-1],[47,-22],[-11,-31],[101,-59],[39,-59],[6,-53],[-24,29],[10,-59],[-38,-62],[43,-89],[-13,-18],[26,-33],[-16,-27],[20,-40],[-23,-15],[72,-74],[45,16],[19,-40],[29,-20],[6,-32],[47,-23],[52,-8],[13,-21],[80,38],[10,21],[-20,51],[10,26],[-35,31],[-39,-24],[-25,14],[-43,79],[-20,10],[-14,55],[42,11],[1,51],[21,8],[79,-43],[38,-45],[99,-33],[71,-51],[33,36],[36,-33],[38,-4],[-15,104],[-30,42],[-45,89],[13,56],[51,34],[57,71],[62,20],[58,64],[38,65],[50,-23],[-11,-18],[79,14],[47,-60],[-43,-34],[62,26],[24,-29],[13,-53],[-4,117],[40,98],[-14,30],[15,38],[-23,46],[-53,24],[-3,46],[38,125],[-4,25],[17,99],[-10,22],[-94,76],[18,15],[57,-32],[148,-2],[71,-27],[10,-33],[57,-52],[21,-80],[-80,-20],[-74,-11],[-4,-37],[-33,-17],[-8,-58],[72,-45],[29,-73],[22,-16],[60,12],[1,-17],[92,32],[36,20],[-4,56],[28,65],[-13,31],[49,34],[58,13],[7,37],[33,0],[58,32],[88,65],[40,43],[18,-9],[141,66],[1,-1],[8,-22],[-17,-33],[29,-11],[34,34],[70,-43],[-9,-14],[38,-4],[652,-462],[576,-512],[-2702,-5780],[-24,4],[-20,-11],[-8,-40],[-30,50],[-84,158],[-42,51],[-47,20],[-34,77],[-45,-3],[-21,68],[-78,77],[22,23],[5,42],[34,-30],[-3,-26],[46,35],[24,-15],[-4,69],[-13,-36],[3,62],[24,26],[17,77],[31,29],[21,-30],[13,23],[-29,27],[-20,44],[-17,-4],[-26,86],[34,-13],[41,52],[45,20],[30,38],[21,-5],[1,68],[-37,-20],[-81,-24]],[[6322,4779],[-22,58],[-7,147],[-29,46],[18,50],[37,-2],[38,-30],[37,31],[35,67],[-30,29],[1,43],[-43,29],[-38,-4],[8,72],[-55,47],[-13,60],[-16,12],[12,36],[-45,44],[5,39],[22,26],[-24,72],[14,34],[-4,52],[-16,-1],[-31,54],[-28,17],[-39,-7],[-46,-39],[-13,27],[3,46],[-38,19],[-25,-24],[-21,40],[-37,-10],[-16,26]],[[5916,5885],[7,38],[-9,70],[-30,57],[-9,35],[-18,-7],[22,86],[2,36],[-37,38],[2,27],[-19,-1]],[[6516,9455],[-1,-2],[-47,-33],[41,13],[6,20],[3,1],[-2,1]],[[5957,7030],[10,5],[13,-16],[-11,-4],[-12,15]],[[6797,8127],[-16,19],[7,3],[12,-11],[-3,-11]],[[6776,8351],[5,-40],[-40,25],[2,13],[33,2]],[[6796,8361],[7,-9],[23,-1],[-21,-8],[-9,18]],[[7546,8765],[-21,11],[-3,19],[14,-2],[10,-28]],[[8500,9255],[-42,-21],[43,34],[37,-4],[-38,-9]],[[6618,9500],[-43,1],[-2,9],[24,5],[21,-15]],[[5112,5648],[-51,-85],[61,-17],[17,10],[-6,70],[10,15]],[[5143,5641],[94,-60],[54,8],[25,-45],[-15,-121],[11,-26]],[[5312,5397],[-8,-4],[-331,25]],[[4973,5418],[74,70],[-51,3],[-13,-22]],[[4983,5469],[22,89],[37,0],[30,28],[32,64]],[[5104,5650],[8,-2]],[[4958,5423],[-1,1]],[[4957,5424],[14,22]],[[4971,5446],[-13,-23]],[[7270,8227],[-16,16],[30,4],[7,-16],[0,-24],[-16,16],[23,-30],[-30,0],[-38,33],[14,9],[26,-8]],[[4971,5446],[12,23]],[[4983,5469],[-1,-6],[-11,-17]],[[8179,9480],[32,34],[159,-84],[-6,-6],[-26,-50],[-53,-30],[-74,-14],[-42,48],[10,102]],[[2517,4002],[11,-24],[-24,3],[0,18],[13,3]],[[2610,4417],[26,-23],[-28,-28],[-21,23],[23,28]],[[2233,5113],[3,0],[7,-18],[-13,9],[3,9]],[[2283,5107],[18,1],[-33,-46],[-26,38],[0,33],[33,2],[8,-28]],[[2180,5693],[-25,12],[-1,56],[22,-3],[4,-65]],[[2193,5773],[-12,15],[-9,34],[13,-9],[8,-40]],[[2070,5801],[9,-41],[-25,-6],[-12,30],[-17,-25],[6,44],[35,28],[4,-30]],[[2067,5877],[-5,-19],[-9,-3],[8,24],[6,-2]],[[2109,5891],[1,-23],[-24,-75],[-13,30],[36,68]],[[1983,5968],[-12,16],[27,12],[-14,-18],[-1,-10]],[[2078,6016],[9,-26],[26,-9],[7,-25],[-75,-34],[22,54],[-24,22],[25,28],[10,-10]],[[2018,6010],[-15,-4],[12,19],[16,9],[-13,-24]],[[1927,6117],[-11,-13],[-10,4],[12,21],[9,-12]],[[2051,6125],[-4,-20],[-16,16],[14,15],[6,-11]],[[1930,6231],[17,-31],[-17,-53],[-11,38],[11,46]],[[1937,6253],[9,-18],[-9,-4],[-14,11],[14,11]],[[1948,6300],[4,-40],[-44,23],[8,18],[32,-1]],[[2432,6618],[-7,-24],[-10,26],[9,4],[8,-6]],[[2391,6639],[8,-21],[-14,-11],[-15,26],[21,6]],[[2401,6706],[51,-58],[-15,-12],[-16,21],[-25,-13],[-19,28],[5,30],[19,4]],[[2461,6709],[12,-16],[-9,-5],[-8,22],[5,-1]],[[2415,6717],[7,-13],[-11,-1],[-4,17],[8,-3]],[[2445,6734],[3,-26],[-5,-2],[-6,15],[8,13]],[[2487,6748],[-14,-17],[-10,3],[3,8],[21,6]],[[2424,6763],[9,-25],[-14,2],[-9,19],[14,4]],[[2664,7108],[3,-9],[-11,-2],[-6,16],[14,-5]],[[2628,6990],[-16,-81],[-11,7],[12,92],[-21,-24],[-23,41],[33,4],[-9,47],[-19,-3],[32,35],[-5,-57],[34,12],[-7,-73]],[[2634,7142],[10,-1],[-5,-63],[-13,2],[8,62]],[[2668,7158],[-5,-29],[-16,0],[9,43],[12,-14]],[[2470,4049],[-14,-1],[1,8],[16,16],[-3,-23]],[[2240,5324],[-22,-8],[8,44],[20,39],[21,13],[4,-34],[-31,-54]],[[2156,413],[-1,-9],[-2,9]],[[6462,0],[-12,6],[-16,-1]],[[6434,5],[7,13],[21,-18]],[[6561,89],[-6,-4],[-7,9]],[[6548,94],[-2,3]],[[6548,94],[-2,0],[-7,-1]],[[6539,93],[0,4]],[[6539,97],[0,9],[-2,3]],[[6537,109],[9,-1],[16,11]],[[6562,119],[-1,-3]],[[6561,116],[-11,-5],[11,-22]],[[6544,101],[1,2],[-2,1],[0,-3],[1,0]],[[2849,4580],[16,-6],[50,11],[-7,-71],[-37,-24],[-6,-34],[-20,6],[-49,-33],[-10,-19],[-50,21],[-45,-7],[-27,-19],[-10,27],[-47,-8],[-69,-30],[-6,-26],[-50,11],[-3,-15],[-46,41],[-44,-16],[-26,-34],[1,-38],[-18,-51],[-16,-3],[-42,45],[-66,-13],[-6,-28],[-28,-9],[0,-37],[-16,-27],[-32,46],[-25,-21],[2,30],[28,9],[43,64],[3,26],[26,20],[27,58],[3,56],[21,-5],[21,59],[43,10],[43,-17],[41,1],[1,34],[33,51],[26,66],[-23,-40],[-32,-9],[-23,-45],[-40,0],[-35,62],[-14,-17],[-35,-2],[-12,57],[-32,-12],[-30,-34],[-7,31],[-31,58],[23,27],[28,0],[71,71],[16,73],[-5,101],[-35,-6],[-12,-28],[-28,0],[19,38],[27,27],[23,55],[93,34],[23,-25],[-7,31],[14,17],[-5,29],[22,53],[-16,9],[4,44],[25,53],[-26,27],[-25,-30],[-26,77],[-18,32],[28,102],[20,19],[-41,12],[-3,-33],[-28,-2],[-13,-26],[-23,5],[-26,31],[4,-61],[-55,50],[-11,-16],[11,-48],[-30,59],[13,81],[44,97],[-34,58],[3,50],[12,17],[-7,44],[-15,-67],[-21,18],[-19,-11],[2,-31],[-19,-38],[-3,-74],[-30,-17],[19,124],[-10,60],[22,56],[-18,9],[17,50],[38,16],[-33,4],[23,65],[-45,-59],[-38,33],[12,15],[-36,6],[4,16],[37,-3],[-2,39],[30,107],[-23,21],[-3,62],[21,-13],[-16,44],[-2,41],[22,23],[18,-21],[10,25],[30,-19],[-40,57],[17,-3],[-11,48],[34,9],[-8,21],[20,75],[37,-20],[95,5],[45,22],[44,-4],[-12,-35],[5,-27],[-15,-29],[-96,-100],[4,-34],[28,3],[-52,-91],[74,39],[11,20],[47,-11],[18,9],[44,-10],[66,4],[20,-57],[-25,-43],[-8,-54],[-19,-68],[-25,-38],[-10,-41],[-40,-34],[6,-26],[29,-22],[-23,-25],[-21,3],[-23,-39],[-45,-12],[54,-19],[33,32],[18,-2],[55,-38],[37,-78],[21,-13],[12,-114],[25,-107],[22,-42],[61,-40],[19,-57],[36,-43],[-16,-24],[7,-34],[32,-70],[-20,-6],[-29,32],[13,-33],[38,-39],[21,-69],[-1,-37],[-36,-56],[42,-26],[21,50],[45,0],[34,-12],[42,-42],[14,-79],[-16,-59],[-5,-52],[-43,-55],[-7,-27],[-18,12],[-12,-73],[-47,-15],[27,-7],[-16,-18],[27,-9],[-2,19],[13,-8],[5,-13],[-11,0]],[[2076,6212],[7,-13],[38,-7],[-5,-20],[-35,-44],[-2,46],[-33,-10],[-18,42],[-34,39],[24,13],[-9,29],[29,-26],[8,51],[19,-31],[-1,-50],[12,-18],[-1,31],[8,19],[-4,-29],[-3,-22]],[[1966,6461],[27,-9],[-3,20],[61,62],[12,-46],[-26,-37],[5,-47],[-20,-32],[-50,-50],[-14,21],[29,33],[-30,15],[9,70]],[[1942,5592],[20,-7],[12,41],[23,-5],[31,20],[42,-11],[42,-131],[22,-20],[11,-53],[-7,-34],[-8,52],[-15,-49],[17,-14],[-35,-18],[-20,-54],[-26,17]],[[6575,115],[9,-25],[-23,-1]],[[6561,116],[4,-2],[10,1]],[[6539,93],[-11,-42],[-66,-51]],[[6434,5],[-40,28],[-14,93],[19,-10],[15,31]],[[6414,147],[4,-6],[4,10]],[[6422,151],[4,0]],[[6426,151],[14,-33],[40,27],[27,-1],[4,-44],[28,-3]],[[6546,97],[1,0],[2,-3],[-1,0]],[[1731,1116],[-42,-1],[7,88],[11,64],[-7,31],[18,12],[19,71],[23,121],[0,42],[24,196],[-14,130],[-12,73],[15,64]],[[1923,700],[-42,-47],[-19,-5],[-25,23],[-50,9],[-42,-27],[22,128],[-2,120],[-8,7],[13,64],[-2,47],[-18,40],[-28,-25],[-6,69],[15,13]],[[1731,1116],[1,0],[0,1],[0,1],[19,17],[-8,36],[-11,-53],[-1,-2]],[[5787,216],[1,-7],[-14,-12],[1,19],[12,0]],[[5812,321],[-7,-53],[-1,-54],[-10,47],[18,60]],[[5343,429],[-16,1],[6,49],[16,-41],[-6,-9]],[[5926,492],[-20,-87],[-32,-61],[-11,73],[25,49],[38,26]],[[5617,477],[-5,-11],[-9,6],[8,8],[6,-3]],[[5828,503],[2,-15],[-1,-10],[-8,21],[7,4]],[[5726,537],[-18,-22],[-4,22],[9,-8],[13,8]],[[5879,544],[5,0],[1,-22],[-13,9],[7,13]],[[5510,588],[1,-26],[-25,-11],[4,29],[20,8]],[[5607,573],[-3,-20],[-13,20],[5,18],[11,-18]],[[5808,596],[-30,-27],[15,34],[25,19],[-10,-26]],[[5683,619],[-22,-28],[-3,16],[17,23],[8,-11]],[[5524,660],[12,-24],[-6,-15],[-8,33],[2,6]],[[5784,659],[7,-9],[-2,-18],[-12,0],[7,27]],[[5570,644],[9,33],[12,5],[-6,-37],[-15,-1]],[[5766,700],[8,-24],[-6,0],[-7,21],[5,3]],[[5629,675],[-16,-50],[-12,43],[21,34],[7,-27]],[[5504,704],[5,-2],[1,-19],[-11,1],[5,20]],[[5399,743],[-5,-8],[-14,-3],[10,13],[9,-2]],[[5503,764],[-12,-32],[1,35],[7,13],[4,-16]],[[5601,787],[13,-11],[-7,-14],[-10,-2],[4,27]],[[5558,757],[-9,-10],[-2,10],[7,29],[4,-29]],[[5571,825],[19,-7],[-4,-25],[-24,29],[9,3]],[[5492,835],[2,-17],[-13,-25],[0,24],[11,18]],[[5710,821],[-29,-32],[-9,9],[11,23],[27,0]],[[5393,834],[-4,2],[-4,21],[16,0],[-8,-23]],[[5782,854],[12,-14],[-31,-16],[-24,26],[30,19],[13,-15]],[[5085,881],[26,-34],[-19,-21],[-22,46],[15,9]],[[5545,898],[12,-3],[-4,-50],[-26,57],[18,-4]],[[5397,915],[2,-14],[-9,-11],[-7,7],[14,18]],[[5065,1050],[25,-111],[-32,12],[-12,69],[9,-14],[10,44]],[[5682,1081],[11,-12],[0,-65],[-18,-40],[-16,28],[15,23],[-17,65],[25,1]],[[5084,1099],[-18,-9],[-2,20],[14,44],[6,-55]],[[5514,1163],[12,-22],[-16,-3],[-5,51],[9,-26]],[[5395,1243],[-6,-12],[-7,3],[8,19],[5,-10]],[[5405,1252],[22,-25],[-6,-10],[-9,3],[-7,32]],[[5438,1239],[-2,5],[7,27],[4,-3],[-9,-29]],[[5721,1283],[20,-85],[-19,-12],[-29,14],[-37,44],[2,22],[55,33],[8,-16]],[[4993,1411],[-10,-38],[10,-47],[-34,73],[34,12]],[[5611,1475],[-10,-65],[-17,29],[-17,-15],[-1,43],[28,-9],[17,17]],[[5638,1601],[1,-17],[-11,-7],[-14,23],[24,1]],[[5538,1638],[-30,5],[14,45],[15,-15],[1,-35]],[[5001,1384],[18,-13],[26,52],[-10,43],[38,27],[21,103],[21,22],[0,38]],[[5115,1656],[13,20],[-13,-18]],[[5115,1658],[-8,20],[2,8]],[[5109,1686],[7,14],[10,2]],[[5126,1702],[30,12],[22,-9],[37,64],[31,16],[26,-12],[35,15],[3,40],[18,6]],[[5679,1670],[-10,29],[-47,8],[-56,36],[-26,-42],[-26,28],[-20,-5],[-6,-29],[-26,-27],[-34,14],[-13,-24],[78,-140],[-9,-15],[-15,41],[-28,25],[-25,-12],[9,-33],[24,-23],[0,-46],[-23,31],[-13,42],[-31,16],[-7,-19],[41,-81],[-38,13],[-7,76],[-30,24],[-24,49],[18,14],[-7,24],[-38,-48],[10,-27],[-13,-55],[2,-31],[33,-77],[7,-47],[20,-29],[27,-86],[-46,49],[-9,-55],[25,-32],[-32,-45],[-19,10],[17,-35],[32,-16],[4,-22],[25,-1],[4,-39],[19,-3],[17,-37],[31,-18],[15,-34],[-10,-12],[10,-101],[-6,-28],[-30,46],[-20,63],[-40,-21],[-24,-34],[19,-11],[-2,-53],[16,1],[25,-43],[-51,-29],[7,26],[-46,25],[3,-38],[23,-76],[17,-94],[-10,-18],[20,-77],[-43,64],[-6,38],[-21,-6],[-10,-49],[3,-38],[-18,12],[0,53],[-23,87],[-24,-11],[-7,-70],[-18,21],[-1,43],[-15,54],[13,35],[-15,76],[-48,75],[27,78],[1,27],[26,-19],[18,40],[21,11],[31,-41],[50,-33],[22,-35],[-2,26],[41,20],[-10,18],[-49,41],[-16,-5],[-17,41],[-2,-30],[-44,18],[-52,-31],[-17,30],[-25,-28],[-7,63],[-31,106],[39,21],[-36,30],[-12,-43],[-5,33],[-36,59],[-26,67],[5,25],[-20,19]],[[5076,1025],[5,-18],[-5,17],[0,1]],[[5409,1035],[0,30],[-49,83],[-26,17],[37,41],[16,-39],[17,-34],[30,-25],[24,-2],[18,-42],[-5,-31],[18,-69],[27,0],[-4,-49],[-20,-2],[-39,98],[1,18],[-45,6]],[[5616,182],[32,10],[-6,-42],[12,-19],[50,47],[-3,-67],[-71,-7],[-57,-21],[-40,-2],[-4,45],[-34,27],[-69,11],[-30,16],[9,88],[13,-27],[3,47],[8,-41],[42,13],[9,-60],[51,17],[28,-1],[9,-19],[48,-15]],[[5076,1025],[-6,24],[7,5],[-1,-29]],[[5143,5641],[-5,74],[-17,62],[-2,89]],[[5119,5866],[16,3],[15,39],[86,52],[66,-17],[23,15],[26,-26],[19,16],[47,-4],[45,-26],[38,-1],[50,49],[24,-69],[62,-12],[6,-16],[52,-64],[12,-29],[35,-21]],[[5741,5755],[-16,-90],[39,-17],[-24,-43],[-31,7],[-19,-48],[-40,-26],[-5,-84],[-24,-60],[19,-7],[5,-48],[-22,-2],[-8,43],[-28,-10],[-17,-35],[-24,4],[-8,-48],[-12,6],[-34,-29],[-19,18],[-63,-14],[-18,11]],[[5392,5283],[-6,62],[-64,63],[-10,-11]],[[5104,5650],[19,59],[-11,-61]],[[4281,2970],[0,13],[14,16]],[[4293,3253],[80,-23],[15,-17],[35,62],[23,13],[45,-10],[20,29],[42,-7],[9,46]],[[4562,3346],[20,0],[27,-99]],[[4737,2259],[-11,13],[3,1]],[[4890,2800],[18,16],[22,-11],[-5,-42],[-22,-58],[5,-64],[50,-69],[-44,-21],[27,-53],[1,-56],[-15,13],[-17,-20]],[[4910,2435],[-32,-12],[18,-50],[-19,12],[-25,-28],[-4,-62],[-21,-8],[2,-62],[9,-35],[-13,-21]],[[3590,2493],[-3,-7],[-5,1]],[[5109,1711],[-1,0],[-1,5]],[[5107,1716],[1,-3],[1,-2]],[[5072,1765],[2,-45],[8,-3]],[[5082,1717],[11,3],[14,-4]],[[5107,1716],[-2,-4],[4,-9]],[[5109,1703],[-6,-22],[6,5]],[[5115,1658],[-2,-4],[2,2]],[[5001,1384],[2,42],[-19,56],[-42,45],[0,65],[-19,52],[12,62],[10,10],[-7,66],[9,30],[-14,40],[19,50],[2,63],[-24,10]],[[4930,1975],[-2,30],[2,34]],[[4930,2039],[12,15],[-9,51]],[[4933,2105],[34,90],[14,-52],[27,22]],[[5008,2165],[18,-60],[31,-32],[11,-72],[-4,-20]],[[5064,1981],[-13,-88],[10,-41],[-7,-23],[18,-64]],[[4930,2095],[0,-3],[-1,0]],[[4929,2092],[1,3]],[[6574,117],[1,-2]],[[6562,119],[7,0],[5,-2]],[[6414,147],[1,2]],[[6415,149],[2,-4],[3,6]],[[6420,151],[1,1],[1,-1]],[[6426,151],[2,-2]],[[6428,149],[14,-27],[40,30],[23,2],[9,-28],[23,-17]],[[6428,149],[17,-6],[6,66],[57,-19],[69,39],[62,60],[-2,-13],[-73,-100],[10,-59]],[[6415,149],[3,1],[2,1]],[[4878,3091],[18,22],[22,-8],[32,50],[43,0],[35,-15]],[[5028,3140],[11,-32],[50,-66],[-3,-71],[25,-43],[57,-51],[-15,-43],[18,-16],[-17,-19],[33,-48],[39,-10],[20,-37],[27,60],[38,-42],[-32,-22]],[[5279,2700],[24,-75]],[[5303,2625],[-10,-40]],[[5264,2102],[-9,14],[-79,-33]],[[5176,2083],[23,115],[-44,21],[3,31],[-16,8],[-19,56],[-28,21],[-2,25],[-25,-20],[8,-21],[-37,-77]],[[5039,2242],[0,22],[-25,19],[-21,37],[-35,15],[-48,100]],[[5028,3140],[25,18],[16,-12],[26,38],[33,2],[21,93],[21,29],[14,82],[16,25],[24,103],[31,62],[54,29],[15,34]],[[5744,3728],[21,0],[21,-25],[20,-53],[15,-84],[29,-54],[27,-89],[25,-31],[23,-101],[2,-64],[-18,-117],[9,-101],[-12,-10],[15,-36]],[[6085,2895],[-5,-97],[-5,-11],[-53,-12],[-14,65],[-12,-34],[7,-57],[-22,-31],[20,5],[-30,-70],[3,-89],[-10,-72]],[[5303,2626],[-24,74]],[[4933,2105],[-2,-5],[-1,-5]],[[4929,2092],[-24,-3],[25,-50]],[[4930,1975],[-23,23],[-3,29],[-30,68],[-10,-6],[-14,50],[-18,-10]],[[5039,2242],[-36,-29],[5,-48]],[[3824,3456],[11,-44],[-4,-13]],[[3831,3399],[-12,2],[5,55]],[[3824,3456],[15,40],[-11,27]],[[3828,3523],[13,-3],[5,14]],[[4307,3867],[29,-48],[27,-9],[15,23],[27,-14],[12,51],[13,-4],[7,67],[32,-7],[47,-34],[15,4],[25,-32],[36,-7],[8,17],[49,-20],[9,-31]],[[4658,3823],[-11,-66],[34,-98]],[[4681,3659],[-17,-39],[8,-42],[-31,-10],[-21,21],[-23,-25],[25,-10],[2,-47],[-25,-27],[7,-97],[-23,2],[-21,-39]],[[3929,3347],[-10,35],[-28,-40],[-29,25],[0,21],[-31,11]],[[4658,3823],[25,69],[41,-12],[36,30],[25,34],[13,63],[38,56],[34,8]],[[4870,4071],[14,-34],[24,4],[30,54],[21,-54],[16,-2],[-3,-52],[34,-9],[9,36],[20,23],[43,4],[29,-29],[10,28],[25,14],[63,-20],[22,-45],[59,-39]],[[5240,3768],[-45,-18],[-34,61],[-36,-20],[-36,22],[-34,-12],[-18,-67],[-50,-41],[-28,27],[-17,-32],[-72,-20],[-11,-18],[9,-38],[-65,-22],[-46,-1],[-29,22],[-26,46],[-21,2]],[[3405,4078],[11,29],[-19,65],[31,80],[14,-15]],[[3786,3567],[1,-1]],[[3788,3563],[33,-46],[7,6]],[[3517,3223],[10,12],[-28,17],[-35,-18],[-10,-44]],[[3046,4435],[-7,67]],[[3039,4502],[67,66],[25,13]],[[3229,4579],[11,-25],[-6,25]],[[5176,2083],[-16,-2],[-20,-39],[-16,27],[-37,-36],[-2,-43],[-21,-9]],[[5392,5283],[12,-91],[34,-125],[3,-112],[-6,-19],[-53,-45],[-26,-60],[53,-56],[5,-25],[-14,-66],[5,-64]],[[4870,4071],[-7,45],[-15,7],[-9,56],[-59,28],[-22,-9],[-28,51],[2,26],[-30,3],[-18,31],[-35,11],[11,-52],[-30,-38],[-41,77],[-16,13],[21,25],[-5,36],[-28,1],[-72,41],[-11,-4],[-8,47],[-35,10],[2,-36],[-19,0]],[[4357,5217],[28,-9],[13,51],[-48,7]],[[4351,5282],[18,-5],[46,32],[152,70],[48,73],[42,13],[45,39],[61,20],[49,5],[28,-79],[2,-32],[47,-25],[40,9]],[[4929,5402],[-15,-10],[18,-17],[41,43]],[[4958,5423],[-20,-15]],[[4938,5408],[19,16]],[[4929,5402],[9,6]],[[4938,5408],[-7,-5],[-2,-1]],[[5109,1703],[1,0],[-1,0]],[[5109,1703],[0,0]],[[5126,1702],[-17,44],[0,-35]],[[5082,1717],[11,55],[-21,-7]],[[5916,5885],[-27,-11],[-30,-49],[-6,-35],[-69,9],[-18,-33],[-25,-11]],[[5119,5866],[-9,50],[10,162],[38,52],[3,69],[30,73],[34,12],[66,44],[8,-48],[53,-59],[14,-69],[50,-41],[29,13],[47,60],[4,31],[-12,142]],[[823,7985],[-42,-19],[-14,10],[-30,-31],[21,1],[-19,-41],[-87,-34],[-62,11],[-54,26],[-47,3],[-42,53],[-68,37],[-3,24],[-20,-31],[-47,6],[-31,-10],[-31,8],[-42,-10],[2,72],[18,-29],[38,10],[52,55],[-22,4],[24,44],[-27,-27],[-16,5],[14,52],[41,42],[-66,-51],[-16,23],[2,53],[-143,17],[-6,-17],[-34,3],[-12,35],[47,2],[47,15],[1,18],[30,-8],[21,23],[10,-18],[33,14],[64,-4],[5,45],[-30,-26],[-59,15],[7,19],[68,50],[-12,24],[-29,-20],[-33,35],[-20,-15],[-52,19],[-80,-47],[-7,16],[-65,12],[29,35],[43,-25],[-21,29],[4,43],[75,-46],[-39,37],[-10,41],[33,-11],[-33,34],[3,17],[31,-12],[-17,25],[23,24],[32,-15],[8,-21],[40,-4],[26,-23],[10,-35],[-2,63],[-47,23],[-9,39],[-28,14],[7,22],[63,8],[34,-25],[6,-28],[26,1],[27,-25],[3,-28],[19,4],[26,-29],[4,-36],[-23,-81],[18,11],[-5,-32],[19,-16],[9,-43],[23,91],[26,25],[21,-54],[26,68],[-20,78],[2,15],[37,12],[24,-61],[20,-9],[6,-29],[24,-9],[-9,60],[18,37],[32,-5],[0,24],[25,13],[34,-34],[1,-29],[21,-6],[19,-58],[13,25],[-18,29],[-8,66],[43,-8],[35,-50],[21,7],[23,55],[31,-16],[50,15],[8,26],[-14,61],[58,8],[9,-31],[27,-8],[-8,-29],[44,-38],[9,32],[22,3],[30,31],[26,-8],[-45,-26],[6,-22],[-25,-21],[12,-17],[45,3],[7,-30],[-27,-59],[58,13],[-7,-14],[69,-57],[20,-2],[-21,-56],[25,-14],[4,-56],[-13,-19],[-44,27],[33,-47],[-25,-21],[-2,-26],[-51,-18],[-12,-73],[-20,0],[-26,-24],[-50,-13],[-66,-35],[-41,-49],[-48,-33],[-18,15],[-7,-28],[-23,5]]],"bbox":[-24.540373460134713,34.63473866791714,64.51840875277185,71.1751405875999],"transform":{"scale":[0.008906768898180475,0.003654405632531529],"translate":[-24.540373460134713,34.63473866791714]},"title":"Europe","version":"1.1.4","copyright":"Copyright (c) 2023 Highsoft AS, Based on data from Natural Earth","copyrightShort":"Natural Earth","copyrightUrl":"http://www.naturalearthdata.com"} \ No newline at end of file diff --git a/dev/demo_dashboard_live.ex b/dev/demo_dashboard_live.ex index 665cc36..58f7a09 100644 --- a/dev/demo_dashboard_live.ex +++ b/dev/demo_dashboard_live.ex @@ -65,6 +65,14 @@ defmodule Luminous.Dashboards.DemoDashboardLive do unit: "μCKR", ylabel: "Description" ), + Panel.define( + :europe_map, + "Europe Map", + :map, + [Query.define(:europe_map, Queries)], + description: "This is a panel with the map of Europe", + map: File.read!(Path.expand("../assets/topojson/europe.topo.json", __DIR__)) + ), Panel.define( :multiple_time_series_with_stacking, "Multiple Time Series with Stacking", @@ -288,6 +296,56 @@ defmodule Luminous.Dashboards.DemoDashboardLive do } ) end + + def query(:europe_map, _t, _variables) do + data = %{ + Areas: [ + %{ + "hc-key": "gr", + value: 10.64, + description: "● Greece
10.64 million citizens" + }, + %{ + "hc-key": "de", + value: 83.2, + description: "● Germany
83.2 million citizens" + }, + %{ + "hc-key": "it", + value: 59.11, + description: "● Italy
59.11 million citizens" + } + ], + Pins: [ + %{ + lat: 37.9838, + lon: 23.7275, + description: "Athens
The capital of Greece", + marker: %{symbol: "triangle", width: 16, height: 16}, + url: "https://en.wikipedia.org/wiki/Athens" + }, + %{ + lat: 52.5200, + lon: 13.4050, + description: "Berlin
The capital of Germany", + marker: %{symbol: "circle", width: 16, height: 16}, + url: "https://en.wikipedia.org/wiki/Berlin" + }, + %{ + lat: 44.4268, + lon: 26.1025, + description: "Bucharest
The capital of Romania", + marker: %{symbol: "url(https://upload.wikimedia.org/wikipedia/commons/thumb/7/73/Flag_of_Romania.svg/1200px-Flag_of_Romania.svg.png)", width: 28, height: 20}, + url: "https://en.wikipedia.org/wiki/Bucharest" + } + ] + } + + Query.Result.new( + data, + attrs: %{} + ) + end end @doc false diff --git a/dev/test_dashboard_live.ex b/dev/test_dashboard_live.ex index 1bd82ed..ecb418b 100644 --- a/dev/test_dashboard_live.ex +++ b/dev/test_dashboard_live.ex @@ -77,6 +77,13 @@ defmodule Luminous.Dashboards.TestDashboardLive do "Panel 11 (nil stat)", :stat, [Query.define(:q11, Queries)] + ), + Panel.define( + :p12, + "Panel 12 (map)", + :map, + [Query.define(:q12, Queries)], + map: "foo" ) ], variables: [ @@ -197,6 +204,10 @@ defmodule Luminous.Dashboards.TestDashboardLive do def query(:q11, _time_range, _variables) do Query.Result.new([{"foo", nil}]) end + + def query(:q12, _time_range, _variables) do + Query.Result.new(%{Areas: [%{hc_key: "foo", value: 5, description: "bar"}], Pins: [%{lat: 5, lon: 6}]}) + end end def render(assigns) do diff --git a/dist/luminous.js b/dist/luminous.js index 7457a97..9c7a848 100644 --- a/dist/luminous.js +++ b/dist/luminous.js @@ -1549,9 +1549,11357 @@ var require_hammer = __commonJS({ } }); +// node_modules/highcharts/highcharts.js +var require_highcharts = __commonJS({ + "node_modules/highcharts/highcharts.js"(exports, module2) { + "use strict"; + (function(U, M) { + typeof module2 === "object" && module2.exports ? (M["default"] = M, module2.exports = U.document ? M(U) : M) : typeof define === "function" && define.amd ? define("highcharts/highcharts", function() { + return M(U); + }) : (U.Highcharts && U.Highcharts.error(16, true), U.Highcharts = M(U)); + })(typeof window !== "undefined" ? window : exports, function(U) { + function M(a2, y, I, L) { + a2.hasOwnProperty(y) || (a2[y] = L.apply(null, I), typeof CustomEvent === "function" && U.dispatchEvent(new CustomEvent("HighchartsModuleLoaded", { detail: { path: y, module: a2[y] } }))); + } + var a = {}; + M(a, "Core/Globals.js", [], function() { + var a2; + (function(a3) { + a3.SVG_NS = "http://www.w3.org/2000/svg"; + a3.product = "Highcharts"; + a3.version = "11.1.0"; + a3.win = typeof U !== "undefined" ? U : {}; + a3.doc = a3.win.document; + a3.svg = a3.doc && a3.doc.createElementNS && !!a3.doc.createElementNS(a3.SVG_NS, "svg").createSVGRect; + a3.userAgent = a3.win.navigator && a3.win.navigator.userAgent || ""; + a3.isChrome = a3.userAgent.indexOf("Chrome") !== -1; + a3.isFirefox = a3.userAgent.indexOf("Firefox") !== -1; + a3.isMS = /(edge|msie|trident)/i.test(a3.userAgent) && !a3.win.opera; + a3.isSafari = !a3.isChrome && a3.userAgent.indexOf("Safari") !== -1; + a3.isTouchDevice = /(Mobile|Android|Windows Phone)/.test(a3.userAgent); + a3.isWebKit = a3.userAgent.indexOf("AppleWebKit") !== -1; + a3.deg2rad = 2 * Math.PI / 360; + a3.hasBidiBug = a3.isFirefox && 4 > parseInt(a3.userAgent.split("Firefox/")[1], 10); + a3.hasTouch = !!a3.win.TouchEvent; + a3.marginNames = ["plotTop", "marginRight", "marginBottom", "plotLeft"]; + a3.noop = function() { + }; + a3.supportsPassiveEvents = function() { + let x = false; + if (!a3.isMS) { + const y = Object.defineProperty({}, "passive", { get: function() { + x = true; + } }); + a3.win.addEventListener && a3.win.removeEventListener && (a3.win.addEventListener("testPassive", a3.noop, y), a3.win.removeEventListener("testPassive", a3.noop, y)); + } + return x; + }(); + a3.charts = []; + a3.dateFormats = {}; + a3.seriesTypes = {}; + a3.symbolSizes = {}; + a3.chartCount = 0; + })(a2 || (a2 = {})); + ""; + return a2; + }); + M(a, "Core/Utilities.js", [a["Core/Globals.js"]], function(a2) { + function x(c, b2, f2, k2) { + const n3 = b2 ? "Highcharts error" : "Highcharts warning"; + c === 32 && (c = `${n3}: Deprecated member`); + const r2 = u(c); + let e2 = r2 ? `${n3} #${c}: www.highcharts.com/errors/${c}/` : c.toString(); + if (typeof k2 !== "undefined") { + let c2 = ""; + r2 && (e2 += "?"); + E(k2, function(b3, n4) { + c2 += ` + - ${n4}: ${b3}`; + r2 && (e2 += encodeURI(n4) + "=" + encodeURI(b3)); + }); + e2 += c2; + } + d(a2, "displayError", { chart: f2, code: c, message: e2, params: k2 }, function() { + if (b2) + throw Error(e2); + q.console && x.messages.indexOf(e2) === -1 && console.warn(e2); + }); + x.messages.push(e2); + } + function I(c, b2) { + return parseInt(c, b2 || 10); + } + function L(c) { + return typeof c === "string"; + } + function C(c) { + c = Object.prototype.toString.call(c); + return c === "[object Array]" || c === "[object Array Iterator]"; + } + function z(c, b2) { + return !!c && typeof c === "object" && (!b2 || !C(c)); + } + function H(c) { + return z(c) && typeof c.nodeType === "number"; + } + function B(c) { + const b2 = c && c.constructor; + return !(!z(c, true) || H(c) || !b2 || !b2.name || b2.name === "Object"); + } + function u(c) { + return typeof c === "number" && !isNaN(c) && Infinity > c && -Infinity < c; + } + function v(c) { + return typeof c !== "undefined" && c !== null; + } + function l2(c, b2, f2) { + const n3 = L(b2) && !v(f2); + let d2; + const k2 = (b3, f3) => { + v(b3) ? c.setAttribute(f3, b3) : n3 ? (d2 = c.getAttribute(f3)) || f3 !== "class" || (d2 = c.getAttribute(f3 + "Name")) : c.removeAttribute(f3); + }; + L(b2) ? k2(f2, b2) : E(b2, k2); + return d2; + } + function p(c) { + return C(c) ? c : [c]; + } + function t(c, b2) { + let n3; + c || (c = {}); + for (n3 in b2) + c[n3] = b2[n3]; + return c; + } + function m() { + const c = arguments, b2 = c.length; + for (let n3 = 0; n3 < b2; n3++) { + const b3 = c[n3]; + if (typeof b3 !== "undefined" && b3 !== null) + return b3; + } + } + function h(c, b2) { + a2.isMS && !a2.svg && b2 && v(b2.opacity) && (b2.filter = `alpha(opacity=${100 * b2.opacity})`); + t(c.style, b2); + } + function g(c) { + return Math.pow(10, Math.floor(Math.log(c) / Math.LN10)); + } + function e(c, b2) { + return 1e14 < c ? c : parseFloat(c.toPrecision(b2 || 14)); + } + function w(c, b2, f2) { + let n3; + if (b2 === "width") + return b2 = Math.min(c.offsetWidth, c.scrollWidth), f2 = c.getBoundingClientRect && c.getBoundingClientRect().width, f2 < b2 && f2 >= b2 - 1 && (b2 = Math.floor(f2)), Math.max(0, b2 - (w(c, "padding-left", true) || 0) - (w(c, "padding-right", true) || 0)); + if (b2 === "height") + return Math.max(0, Math.min(c.offsetHeight, c.scrollHeight) - (w(c, "padding-top", true) || 0) - (w(c, "padding-bottom", true) || 0)); + if (c = q.getComputedStyle(c, void 0)) + n3 = c.getPropertyValue(b2), m(f2, b2 !== "opacity") && (n3 = I(n3)); + return n3; + } + function E(c, b2, f2) { + for (const n3 in c) + Object.hasOwnProperty.call(c, n3) && b2.call(f2 || c[n3], c[n3], n3, c); + } + function F(c, b2, f2) { + function n3(b3, n4) { + const f3 = c.removeEventListener; + f3 && f3.call(c, b3, n4, false); + } + function d2(f3) { + let d3, K; + c.nodeName && (b2 ? (d3 = {}, d3[b2] = true) : d3 = f3, E(d3, function(c2, b3) { + if (f3[b3]) + for (K = f3[b3].length; K--; ) + n3(b3, f3[b3][K].fn); + })); + } + var k2 = typeof c === "function" && c.prototype || c; + if (Object.hasOwnProperty.call(k2, "hcEvents")) { + const c2 = k2.hcEvents; + b2 ? (k2 = c2[b2] || [], f2 ? (c2[b2] = k2.filter(function(c3) { + return f2 !== c3.fn; + }), n3(b2, f2)) : (d2(c2), c2[b2] = [])) : (d2(c2), delete k2.hcEvents); + } + } + function d(c, b2, f2, d2) { + f2 = f2 || {}; + if (r.createEvent && (c.dispatchEvent || c.fireEvent && c !== a2)) { + var n3 = r.createEvent("Events"); + n3.initEvent(b2, true, true); + f2 = t(n3, f2); + c.dispatchEvent ? c.dispatchEvent(f2) : c.fireEvent(b2, f2); + } else if (c.hcEvents) { + f2.target || t(f2, { preventDefault: function() { + f2.defaultPrevented = true; + }, target: c, type: b2 }); + n3 = []; + let d3 = c, K = false; + for (; d3.hcEvents; ) + Object.hasOwnProperty.call(d3, "hcEvents") && d3.hcEvents[b2] && (n3.length && (K = true), n3.unshift.apply(n3, d3.hcEvents[b2])), d3 = Object.getPrototypeOf(d3); + K && n3.sort((c2, b3) => c2.order - b3.order); + n3.forEach((b3) => { + b3.fn.call(c, f2) === false && f2.preventDefault(); + }); + } + d2 && !f2.defaultPrevented && d2.call(c, f2); + } + const { charts: k, doc: r, win: q } = a2; + (x || (x = {})).messages = []; + Math.easeInOutSine = function(c) { + return -0.5 * (Math.cos(Math.PI * c) - 1); + }; + var G = Array.prototype.find ? function(c, b2) { + return c.find(b2); + } : function(c, b2) { + let f2; + const n3 = c.length; + for (f2 = 0; f2 < n3; f2++) + if (b2(c[f2], f2)) + return c[f2]; + }; + E({ map: "map", each: "forEach", grep: "filter", reduce: "reduce", some: "some" }, function(c, b2) { + a2[b2] = function(f2) { + x(32, false, void 0, { [`Highcharts.${b2}`]: `use Array.${c}` }); + return Array.prototype[c].apply(f2, [].slice.call(arguments, 1)); + }; + }); + let b; + const f = function() { + const c = Math.random().toString(36).substring(2, 9) + "-"; + let f2 = 0; + return function() { + return "highcharts-" + (b ? "" : c) + f2++; + }; + }(); + q.jQuery && (q.jQuery.fn.highcharts = function() { + const c = [].slice.call(arguments); + if (this[0]) + return c[0] ? (new a2[L(c[0]) ? c.shift() : "Chart"](this[0], c[0], c[1]), this) : k[l2(this[0], "data-highcharts-chart")]; + }); + G = { addEvent: function(c, b2, f2, d2 = {}) { + var n3 = typeof c === "function" && c.prototype || c; + Object.hasOwnProperty.call(n3, "hcEvents") || (n3.hcEvents = {}); + n3 = n3.hcEvents; + a2.Point && c instanceof a2.Point && c.series && c.series.chart && (c.series.chart.runTrackerClick = true); + const k2 = c.addEventListener; + k2 && k2.call(c, b2, f2, a2.supportsPassiveEvents ? { passive: d2.passive === void 0 ? b2.indexOf("touch") !== -1 : d2.passive, capture: false } : false); + n3[b2] || (n3[b2] = []); + n3[b2].push({ fn: f2, order: typeof d2.order === "number" ? d2.order : Infinity }); + n3[b2].sort((c2, b3) => c2.order - b3.order); + return function() { + F(c, b2, f2); + }; + }, arrayMax: function(c) { + let b2 = c.length, f2 = c[0]; + for (; b2--; ) + c[b2] > f2 && (f2 = c[b2]); + return f2; + }, arrayMin: function(c) { + let b2 = c.length, f2 = c[0]; + for (; b2--; ) + c[b2] < f2 && (f2 = c[b2]); + return f2; + }, attr: l2, clamp: function(c, b2, f2) { + return c > b2 ? c < f2 ? c : f2 : b2; + }, clearTimeout: function(c) { + v(c) && clearTimeout(c); + }, correctFloat: e, createElement: function(c, b2, f2, d2, K) { + c = r.createElement(c); + b2 && t(c, b2); + K && h(c, { padding: "0", border: "none", margin: "0" }); + f2 && h(c, f2); + d2 && d2.appendChild(c); + return c; + }, css: h, defined: v, destroyObjectProperties: function(c, b2) { + E(c, function(f2, n3) { + f2 && f2 !== b2 && f2.destroy && f2.destroy(); + delete c[n3]; + }); + }, diffObjects: function(c, b2, f2, d2) { + function n3(b3, c2, K, k3) { + const A = f2 ? c2 : b3; + E(b3, function(f3, q2) { + if (!k3 && d2 && -1 < d2.indexOf(q2) && c2[q2]) { + f3 = p(f3); + K[q2] = []; + for (let b4 = 0; b4 < Math.max(f3.length, c2[q2].length); b4++) + c2[q2][b4] && (f3[b4] === void 0 ? K[q2][b4] = c2[q2][b4] : (K[q2][b4] = {}, n3(f3[b4], c2[q2][b4], K[q2][b4], k3 + 1))); + } else if (z(f3, true) && !f3.nodeType) + K[q2] = C(f3) ? [] : {}, n3(f3, c2[q2] || {}, K[q2], k3 + 1), Object.keys(K[q2]).length !== 0 || q2 === "colorAxis" && k3 === 0 || delete K[q2]; + else if (b3[q2] !== c2[q2] || q2 in b3 && !(q2 in c2)) + K[q2] = A[q2]; + }); + } + const k2 = {}; + n3(c, b2, k2, 0); + return k2; + }, discardElement: function(b2) { + b2 && b2.parentElement && b2.parentElement.removeChild(b2); + }, erase: function(b2, f2) { + let c = b2.length; + for (; c--; ) + if (b2[c] === f2) { + b2.splice(c, 1); + break; + } + }, error: x, extend: t, extendClass: function(b2, f2) { + const c = function() { + }; + c.prototype = new b2(); + t(c.prototype, f2); + return c; + }, find: G, fireEvent: d, getClosestDistance: function(b2, f2) { + const c = !f2; + let d2, n3, k2, q2; + b2.forEach((b3) => { + if (1 < b3.length) + for (q2 = n3 = b3.length - 1; 0 < q2; q2--) + k2 = b3[q2] - b3[q2 - 1], 0 > k2 && !c ? (f2 === null || f2 === void 0 ? void 0 : f2(), f2 = void 0) : k2 && (typeof d2 === "undefined" || k2 < d2) && (d2 = k2); + }); + return d2; + }, getMagnitude: g, getNestedProperty: function(b2, f2) { + for (b2 = b2.split("."); b2.length && v(f2); ) { + const c = b2.shift(); + if (typeof c === "undefined" || c === "__proto__") + return; + if (c === "this") { + let b3; + z(f2) && (b3 = f2["@this"]); + return b3 !== null && b3 !== void 0 ? b3 : f2; + } + f2 = f2[c]; + if (!v(f2) || typeof f2 === "function" || typeof f2.nodeType === "number" || f2 === q) + return; + } + return f2; + }, getStyle: w, inArray: function(b2, f2, d2) { + x(32, false, void 0, { "Highcharts.inArray": "use Array.indexOf" }); + return f2.indexOf(b2, d2); + }, insertItem: function(b2, f2) { + const c = b2.options.index, d2 = f2.length; + let n3; + for (n3 = b2.options.isInternal ? d2 : 0; n3 < d2 + 1; n3++) + if (!f2[n3] || u(c) && c < m(f2[n3].options.index, f2[n3]._i) || f2[n3].options.isInternal) { + f2.splice(n3, 0, b2); + break; + } + return n3; + }, isArray: C, isClass: B, isDOMElement: H, isFunction: function(b2) { + return typeof b2 === "function"; + }, isNumber: u, isObject: z, isString: L, keys: function(b2) { + x(32, false, void 0, { "Highcharts.keys": "use Object.keys" }); + return Object.keys(b2); + }, merge: function() { + let b2, f2 = arguments, d2 = {}; + const k2 = function(b3, c) { + typeof b3 !== "object" && (b3 = {}); + E(c, function(f3, d3) { + d3 !== "__proto__" && d3 !== "constructor" && (!z(f3, true) || B(f3) || H(f3) ? b3[d3] = c[d3] : b3[d3] = k2(b3[d3] || {}, f3)); + }); + return b3; + }; + f2[0] === true && (d2 = f2[1], f2 = Array.prototype.slice.call(f2, 2)); + const K = f2.length; + for (b2 = 0; b2 < K; b2++) + d2 = k2(d2, f2[b2]); + return d2; + }, normalizeTickInterval: function(b2, f2, d2, k2, K) { + let c = b2; + d2 = m(d2, g(b2)); + const n3 = b2 / d2; + f2 || (f2 = K ? [1, 1.2, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10] : [1, 2, 2.5, 5, 10], k2 === false && (d2 === 1 ? f2 = f2.filter(function(b3) { + return b3 % 1 === 0; + }) : 0.1 >= d2 && (f2 = [1 / d2]))); + for (k2 = 0; k2 < f2.length && !(c = f2[k2], K && c * d2 >= b2 || !K && n3 <= (f2[k2] + (f2[k2 + 1] || f2[k2])) / 2); k2++) + ; + return c = e(c * d2, -Math.round(Math.log(1e-3) / Math.LN10)); + }, objectEach: E, offset: function(b2) { + const c = r.documentElement; + b2 = b2.parentElement || b2.parentNode ? b2.getBoundingClientRect() : { + top: 0, + left: 0, + width: 0, + height: 0 + }; + return { top: b2.top + (q.pageYOffset || c.scrollTop) - (c.clientTop || 0), left: b2.left + (q.pageXOffset || c.scrollLeft) - (c.clientLeft || 0), width: b2.width, height: b2.height }; + }, pad: function(b2, f2, d2) { + return Array((f2 || 2) + 1 - String(b2).replace("-", "").length).join(d2 || "0") + b2; + }, pick: m, pInt: I, pushUnique: function(b2, f2) { + return 0 > b2.indexOf(f2) && !!b2.push(f2); + }, relativeLength: function(b2, f2, d2) { + return /%$/.test(b2) ? f2 * parseFloat(b2) / 100 + (d2 || 0) : parseFloat(b2); + }, removeEvent: F, splat: p, stableSort: function(b2, f2) { + const c = b2.length; + let d2, k2; + for (k2 = 0; k2 < c; k2++) + b2[k2].safeI = k2; + b2.sort(function(b3, c2) { + d2 = f2(b3, c2); + return d2 === 0 ? b3.safeI - c2.safeI : d2; + }); + for (k2 = 0; k2 < c; k2++) + delete b2[k2].safeI; + }, syncTimeout: function(b2, f2, d2) { + if (0 < f2) + return setTimeout(b2, f2, d2); + b2.call(0, d2); + return -1; + }, timeUnits: { millisecond: 1, second: 1e3, minute: 6e4, hour: 36e5, day: 864e5, week: 6048e5, month: 24192e5, year: 314496e5 }, uniqueKey: f, useSerialIds: function(c) { + return b = m(c, b); + }, wrap: function(b2, f2, d2) { + const c = b2[f2]; + b2[f2] = function() { + const b3 = arguments, f3 = this; + return d2.apply(this, [function() { + return c.apply(f3, arguments.length ? arguments : b3); + }].concat([].slice.call(arguments))); + }; + } }; + ""; + return G; + }); + M(a, "Core/Chart/ChartDefaults.js", [], function() { + return { + alignThresholds: false, + panning: { enabled: false, type: "x" }, + styledMode: false, + borderRadius: 0, + colorCount: 10, + allowMutatingData: true, + ignoreHiddenSeries: true, + spacing: [10, 10, 15, 10], + resetZoomButton: { theme: { zIndex: 6 }, position: { align: "right", x: -10, y: 10 } }, + reflow: true, + type: "line", + zooming: { singleTouch: false, resetButton: { theme: { zIndex: 6 }, position: { align: "right", x: -10, y: 10 } } }, + width: null, + height: null, + borderColor: "#334eff", + backgroundColor: "#ffffff", + plotBorderColor: "#cccccc" + }; + }); + M(a, "Core/Color/Color.js", [a["Core/Globals.js"], a["Core/Utilities.js"]], function(a2, y) { + const { isNumber: x, merge: L, pInt: C } = y; + class z { + static parse(a3) { + return a3 ? new z(a3) : z.None; + } + constructor(x2) { + this.rgba = [NaN, NaN, NaN, NaN]; + this.input = x2; + const B = a2.Color; + if (B && B !== z) + return new B(x2); + this.init(x2); + } + init(a3) { + let B; + let u; + if (typeof a3 === "object" && typeof a3.stops !== "undefined") + this.stops = a3.stops.map((l3) => new z(l3[1])); + else if (typeof a3 === "string") { + this.input = a3 = z.names[a3.toLowerCase()] || a3; + if (a3.charAt(0) === "#") { + var v = a3.length; + var l2 = parseInt(a3.substr(1), 16); + v === 7 ? B = [(l2 & 16711680) >> 16, (l2 & 65280) >> 8, l2 & 255, 1] : v === 4 && (B = [(l2 & 3840) >> 4 | (l2 & 3840) >> 8, (l2 & 240) >> 4 | l2 & 240, (l2 & 15) << 4 | l2 & 15, 1]); + } + if (!B) + for (l2 = z.parsers.length; l2-- && !B; ) + u = z.parsers[l2], (v = u.regex.exec(a3)) && (B = u.parse(v)); + } + B && (this.rgba = B); + } + get(a3) { + const B = this.input, u = this.rgba; + if (typeof B === "object" && typeof this.stops !== "undefined") { + const v = L(B); + v.stops = [].slice.call(v.stops); + this.stops.forEach((l2, p) => { + v.stops[p] = [ + v.stops[p][0], + l2.get(a3) + ]; + }); + return v; + } + return u && x(u[0]) ? a3 === "rgb" || !a3 && u[3] === 1 ? "rgb(" + u[0] + "," + u[1] + "," + u[2] + ")" : a3 === "a" ? `${u[3]}` : "rgba(" + u.join(",") + ")" : B; + } + brighten(a3) { + const B = this.rgba; + if (this.stops) + this.stops.forEach(function(u) { + u.brighten(a3); + }); + else if (x(a3) && a3 !== 0) + for (let u = 0; 3 > u; u++) + B[u] += C(255 * a3), 0 > B[u] && (B[u] = 0), 255 < B[u] && (B[u] = 255); + return this; + } + setOpacity(a3) { + this.rgba[3] = a3; + return this; + } + tweenTo(a3, B) { + const u = this.rgba, v = a3.rgba; + if (!x(u[0]) || !x(v[0])) + return a3.input || "none"; + a3 = v[3] !== 1 || u[3] !== 1; + return (a3 ? "rgba(" : "rgb(") + Math.round(v[0] + (u[0] - v[0]) * (1 - B)) + "," + Math.round(v[1] + (u[1] - v[1]) * (1 - B)) + "," + Math.round(v[2] + (u[2] - v[2]) * (1 - B)) + (a3 ? "," + (v[3] + (u[3] - v[3]) * (1 - B)) : "") + ")"; + } + } + z.names = { white: "#ffffff", black: "#000000" }; + z.parsers = [{ regex: /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/, parse: function(a3) { + return [C(a3[1]), C(a3[2]), C(a3[3]), parseFloat(a3[4], 10)]; + } }, { regex: /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/, parse: function(a3) { + return [ + C(a3[1]), + C(a3[2]), + C(a3[3]), + 1 + ]; + } }]; + z.None = new z(""); + ""; + return z; + }); + M(a, "Core/Color/Palettes.js", [], function() { + return { colors: "#2caffe #544fc5 #00e272 #fe6a35 #6b8abc #d568fb #2ee0ca #fa4b42 #feb56a #91e8e1".split(" ") }; + }); + M(a, "Core/Time.js", [a["Core/Globals.js"], a["Core/Utilities.js"]], function(a2, y) { + const { win: x } = a2, { defined: L, error: C, extend: z, isObject: H, merge: B, objectEach: u, pad: v, pick: l2, splat: p, timeUnits: t } = y, m = a2.isSafari && x.Intl && x.Intl.DateTimeFormat.prototype.formatRange, h = a2.isSafari && x.Intl && !x.Intl.DateTimeFormat.prototype.formatRange; + class g { + constructor(e) { + this.options = {}; + this.variableTimezone = this.useUTC = false; + this.Date = x.Date; + this.getTimezoneOffset = this.timezoneOffsetFunction(); + this.update(e); + } + get(e, g2) { + if (this.variableTimezone || this.timezoneOffset) { + const h3 = g2.getTime(), m2 = h3 - this.getTimezoneOffset(g2); + g2.setTime(m2); + e = g2["getUTC" + e](); + g2.setTime(h3); + return e; + } + return this.useUTC ? g2["getUTC" + e]() : g2["get" + e](); + } + set(e, g2, h3) { + if (this.variableTimezone || this.timezoneOffset) { + if (e === "Milliseconds" || e === "Seconds" || e === "Minutes" && this.getTimezoneOffset(g2) % 36e5 === 0) + return g2["setUTC" + e](h3); + var w = this.getTimezoneOffset(g2); + w = g2.getTime() - w; + g2.setTime(w); + g2["setUTC" + e](h3); + e = this.getTimezoneOffset(g2); + w = g2.getTime() + e; + return g2.setTime(w); + } + return this.useUTC || m && e === "FullYear" ? g2["setUTC" + e](h3) : g2["set" + e](h3); + } + update(e = {}) { + const g2 = l2(e.useUTC, true); + this.options = e = B(true, this.options, e); + this.Date = e.Date || x.Date || Date; + this.timezoneOffset = (this.useUTC = g2) && e.timezoneOffset || void 0; + this.getTimezoneOffset = this.timezoneOffsetFunction(); + this.variableTimezone = g2 && !(!e.getTimezoneOffset && !e.timezone); + } + makeTime(e, g2, m2, p2, d, k) { + let r, q, w; + this.useUTC ? (r = this.Date.UTC.apply(0, arguments), q = this.getTimezoneOffset(r), r += q, w = this.getTimezoneOffset(r), q !== w ? r += w - q : q - 36e5 !== this.getTimezoneOffset(r - 36e5) || h || (r -= 36e5)) : r = new this.Date(e, g2, l2(m2, 1), l2(p2, 0), l2(d, 0), l2(k, 0)).getTime(); + return r; + } + timezoneOffsetFunction() { + const e = this, g2 = this.options, h3 = g2.getTimezoneOffset, m2 = g2.moment || x.moment; + if (!this.useUTC) + return function(d) { + return 6e4 * new Date(d.toString()).getTimezoneOffset(); + }; + if (g2.timezone) { + if (m2) + return function(d) { + return 6e4 * -m2.tz(d, g2.timezone).utcOffset(); + }; + C(25); + } + return this.useUTC && h3 ? function(d) { + return 6e4 * h3(d.valueOf()); + } : function() { + return 6e4 * (e.timezoneOffset || 0); + }; + } + dateFormat(e, g2, h3) { + if (!L(g2) || isNaN(g2)) + return a2.defaultOptions.lang && a2.defaultOptions.lang.invalidDate || ""; + e = l2(e, "%Y-%m-%d %H:%M:%S"); + const m2 = this; + var d = new this.Date(g2); + const k = this.get("Hours", d), r = this.get("Day", d), q = this.get("Date", d), w = this.get("Month", d), b = this.get("FullYear", d), f = a2.defaultOptions.lang, c = f && f.weekdays, n3 = f && f.shortWeekdays; + d = z({ a: n3 ? n3[r] : c[r].substr(0, 3), A: c[r], d: v(q), e: v(q, 2, " "), w: r, b: f.shortMonths[w], B: f.months[w], m: v(w + 1), o: w + 1, y: b.toString().substr(2, 2), Y: b, H: v(k), k, I: v(k % 12 || 12), l: k % 12 || 12, M: v(this.get("Minutes", d)), p: 12 > k ? "AM" : "PM", P: 12 > k ? "am" : "pm", S: v(d.getSeconds()), L: v(Math.floor(g2 % 1e3), 3) }, a2.dateFormats); + u(d, function(b2, c2) { + for (; e.indexOf("%" + c2) !== -1; ) + e = e.replace("%" + c2, typeof b2 === "function" ? b2.call(m2, g2) : b2); + }); + return h3 ? e.substr(0, 1).toUpperCase() + e.substr(1) : e; + } + resolveDTLFormat(e) { + return H(e, true) ? e : (e = p(e), { + main: e[0], + from: e[1], + to: e[2] + }); + } + getTimeTicks(e, g2, h3, m2) { + const d = this, k = [], r = {}; + var q = new d.Date(g2); + const w = e.unitRange, b = e.count || 1; + let f; + m2 = l2(m2, 1); + if (L(g2)) { + d.set("Milliseconds", q, w >= t.second ? 0 : b * Math.floor(d.get("Milliseconds", q) / b)); + w >= t.second && d.set("Seconds", q, w >= t.minute ? 0 : b * Math.floor(d.get("Seconds", q) / b)); + w >= t.minute && d.set("Minutes", q, w >= t.hour ? 0 : b * Math.floor(d.get("Minutes", q) / b)); + w >= t.hour && d.set("Hours", q, w >= t.day ? 0 : b * Math.floor(d.get("Hours", q) / b)); + w >= t.day && d.set("Date", q, w >= t.month ? 1 : Math.max(1, b * Math.floor(d.get("Date", q) / b))); + if (w >= t.month) { + d.set("Month", q, w >= t.year ? 0 : b * Math.floor(d.get("Month", q) / b)); + var c = d.get("FullYear", q); + } + w >= t.year && d.set("FullYear", q, c - c % b); + w === t.week && (c = d.get("Day", q), d.set("Date", q, d.get("Date", q) - c + m2 + (c < m2 ? -7 : 0))); + c = d.get("FullYear", q); + m2 = d.get("Month", q); + const n3 = d.get("Date", q), e2 = d.get("Hours", q); + g2 = q.getTime(); + !d.variableTimezone && d.useUTC || !L(h3) || (f = h3 - g2 > 4 * t.month || d.getTimezoneOffset(g2) !== d.getTimezoneOffset(h3)); + g2 = q.getTime(); + for (q = 1; g2 < h3; ) + k.push(g2), g2 = w === t.year ? d.makeTime(c + q * b, 0) : w === t.month ? d.makeTime(c, m2 + q * b) : !f || w !== t.day && w !== t.week ? f && w === t.hour && 1 < b ? d.makeTime(c, m2, n3, e2 + q * b) : g2 + w * b : d.makeTime(c, m2, n3 + q * b * (w === t.day ? 1 : 7)), q++; + k.push(g2); + w <= t.hour && 1e4 > k.length && k.forEach(function(b2) { + b2 % 18e5 === 0 && d.dateFormat("%H%M%S%L", b2) === "000000000" && (r[b2] = "day"); + }); + } + k.info = z(e, { higherRanks: r, totalRange: w * b }); + return k; + } + getDateFormat(e, g2, h3, m2) { + const d = this.dateFormat("%m-%d %H:%M:%S.%L", g2), k = { millisecond: 15, second: 12, minute: 9, hour: 6, day: 3 }; + let r, q = "millisecond"; + for (r in t) { + if (e === t.week && +this.dateFormat("%w", g2) === h3 && d.substr(6) === "00:00:00.000") { + r = "week"; + break; + } + if (t[r] > e) { + r = q; + break; + } + if (k[r] && d.substr(k[r]) !== "01-01 00:00:00.000".substr(k[r])) + break; + r !== "week" && (q = r); + } + return this.resolveDTLFormat(m2[r]).main; + } + } + ""; + return g; + }); + M(a, "Core/Defaults.js", [a["Core/Chart/ChartDefaults.js"], a["Core/Color/Color.js"], a["Core/Globals.js"], a["Core/Color/Palettes.js"], a["Core/Time.js"], a["Core/Utilities.js"]], function(a2, y, I, L, C, z) { + const { isTouchDevice: x, svg: B } = I, { merge: u } = z, v = { + colors: L.colors, + symbols: [ + "circle", + "diamond", + "square", + "triangle", + "triangle-down" + ], + lang: { loading: "Loading...", months: "January February March April May June July August September October November December".split(" "), shortMonths: "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "), weekdays: "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), decimalPoint: ".", numericSymbols: "kMGTPE".split(""), resetZoom: "Reset zoom", resetZoomTitle: "Reset zoom level 1:1", thousandsSep: " " }, + global: {}, + time: { + Date: void 0, + getTimezoneOffset: void 0, + timezone: void 0, + timezoneOffset: 0, + useUTC: true + }, + chart: a2, + title: { style: { color: "#333333", fontWeight: "bold" }, text: "Chart title", align: "center", margin: 15, widthAdjust: -44 }, + subtitle: { style: { color: "#666666", fontSize: "0.8em" }, text: "", align: "center", widthAdjust: -44 }, + caption: { margin: 15, style: { color: "#666666", fontSize: "0.8em" }, text: "", align: "left", verticalAlign: "bottom" }, + plotOptions: {}, + legend: { + enabled: true, + align: "center", + alignColumns: true, + className: "highcharts-no-tooltip", + layout: "horizontal", + itemMarginBottom: 2, + itemMarginTop: 2, + labelFormatter: function() { + return this.name; + }, + borderColor: "#999999", + borderRadius: 0, + navigation: { style: { fontSize: "0.8em" }, activeColor: "#0022ff", inactiveColor: "#cccccc" }, + itemStyle: { color: "#333333", cursor: "pointer", fontSize: "0.8em", textDecoration: "none", textOverflow: "ellipsis" }, + itemHoverStyle: { color: "#000000" }, + itemHiddenStyle: { color: "#666666", textDecoration: "line-through" }, + shadow: false, + itemCheckboxStyle: { position: "absolute", width: "13px", height: "13px" }, + squareSymbol: true, + symbolPadding: 5, + verticalAlign: "bottom", + x: 0, + y: 0, + title: { style: { fontSize: "0.8em", fontWeight: "bold" } } + }, + loading: { labelStyle: { fontWeight: "bold", position: "relative", top: "45%" }, style: { position: "absolute", backgroundColor: "#ffffff", opacity: 0.5, textAlign: "center" } }, + tooltip: { + enabled: true, + animation: B, + borderRadius: 3, + dateTimeLabelFormats: { millisecond: "%A, %e %b, %H:%M:%S.%L", second: "%A, %e %b, %H:%M:%S", minute: "%A, %e %b, %H:%M", hour: "%A, %e %b, %H:%M", day: "%A, %e %b %Y", week: "Week from %A, %e %b %Y", month: "%B %Y", year: "%Y" }, + footerFormat: "", + headerShape: "callout", + hideDelay: 500, + padding: 8, + shape: "callout", + shared: false, + snap: x ? 25 : 10, + headerFormat: '{point.key}
', + pointFormat: '\u25CF {series.name}: {point.y}
', + backgroundColor: "#ffffff", + borderWidth: void 0, + shadow: true, + stickOnContact: false, + style: { color: "#333333", cursor: "default", fontSize: "0.8em" }, + useHTML: false + }, + credits: { + enabled: true, + href: "https://www.highcharts.com?credits", + position: { align: "right", x: -10, verticalAlign: "bottom", y: -5 }, + style: { cursor: "pointer", color: "#999999", fontSize: "0.6em" }, + text: "Highcharts.com" + } + }; + v.chart.styledMode = false; + ""; + const l2 = new C(v.time); + a2 = { defaultOptions: v, defaultTime: l2, getOptions: function() { + return v; + }, setOptions: function(a3) { + u(true, v, a3); + if (a3.time || a3.global) + I.time ? I.time.update(u(v.global, v.time, a3.global, a3.time)) : I.time = l2; + return v; + } }; + ""; + return a2; + }); + M(a, "Core/Animation/Fx.js", [a["Core/Color/Color.js"], a["Core/Globals.js"], a["Core/Utilities.js"]], function(a2, y, I) { + const { parse: x } = a2, { win: C } = y, { isNumber: z, objectEach: H } = I; + class B { + constructor(a3, v, l2) { + this.pos = NaN; + this.options = v; + this.elem = a3; + this.prop = l2; + } + dSetter() { + var a3 = this.paths; + const v = a3 && a3[0]; + a3 = a3 && a3[1]; + const l2 = this.now || 0; + let p = []; + if (l2 !== 1 && v && a3) + if (v.length === a3.length && 1 > l2) + for (let t = 0; t < a3.length; t++) { + const m = v[t], h = a3[t], g = []; + for (let e = 0; e < h.length; e++) { + const w = m[e], a4 = h[e]; + z(w) && z(a4) && (h[0] !== "A" || e !== 4 && e !== 5) ? g[e] = w + l2 * (a4 - w) : g[e] = a4; + } + p.push(g); + } + else + p = a3; + else + p = this.toD || []; + this.elem.attr("d", p, void 0, true); + } + update() { + const a3 = this.elem, v = this.prop, l2 = this.now, p = this.options.step; + if (this[v + "Setter"]) + this[v + "Setter"](); + else + a3.attr ? a3.element && a3.attr(v, l2, null, true) : a3.style[v] = l2 + this.unit; + p && p.call(a3, l2, this); + } + run(a3, v, l2) { + const p = this, t = p.options, m = function(e) { + return m.stopped ? false : p.step(e); + }, h = C.requestAnimationFrame || function(e) { + setTimeout(e, 13); + }, g = function() { + for (let e = 0; e < B.timers.length; e++) + B.timers[e]() || B.timers.splice(e--, 1); + B.timers.length && h(g); + }; + a3 !== v || this.elem["forceAnimate:" + this.prop] ? (this.startTime = +new Date(), this.start = a3, this.end = v, this.unit = l2, this.now = this.start, this.pos = 0, m.elem = this.elem, m.prop = this.prop, m() && B.timers.push(m) === 1 && h(g)) : (delete t.curAnim[this.prop], t.complete && Object.keys(t.curAnim).length === 0 && t.complete.call(this.elem)); + } + step(a3) { + const v = +new Date(), l2 = this.options, p = this.elem, t = l2.complete, m = l2.duration, h = l2.curAnim; + let g; + p.attr && !p.element ? a3 = false : a3 || v >= m + this.startTime ? (this.now = this.end, this.pos = 1, this.update(), g = h[this.prop] = true, H(h, function(e) { + e !== true && (g = false); + }), g && t && t.call(p), a3 = false) : (this.pos = l2.easing((v - this.startTime) / m), this.now = this.start + (this.end - this.start) * this.pos, this.update(), a3 = true); + return a3; + } + initPath(a3, v, l2) { + function p(d, k) { + for (; d.length < E; ) { + var r = d[0]; + const q = k[E - d.length]; + q && r[0] === "M" && (d[0] = q[0] === "C" ? ["C", r[1], r[2], r[1], r[2], r[1], r[2]] : ["L", r[1], r[2]]); + d.unshift(r); + g && (r = d.pop(), d.push(d[d.length - 1], r)); + } + } + function t(d, k) { + for (; d.length < E; ) + if (k = d[Math.floor(d.length / e) - 1].slice(), k[0] === "C" && (k[1] = k[5], k[2] = k[6]), g) { + const r = d[Math.floor(d.length / e)].slice(); + d.splice(d.length / 2, 0, k, r); + } else + d.push(k); + } + const m = a3.startX, h = a3.endX; + l2 = l2.slice(); + const g = a3.isArea, e = g ? 2 : 1; + let w, E, F; + v = v && v.slice(); + if (!v) + return [ + l2, + l2 + ]; + if (m && h && h.length) { + for (a3 = 0; a3 < m.length; a3++) + if (m[a3] === h[0]) { + w = a3; + break; + } else if (m[0] === h[h.length - m.length + a3]) { + w = a3; + F = true; + break; + } else if (m[m.length - 1] === h[h.length - m.length + a3]) { + w = m.length - a3; + break; + } + typeof w === "undefined" && (v = []); + } + v.length && z(w) && (E = l2.length + w * e, F ? (p(v, l2), t(l2, v)) : (p(l2, v), t(v, l2))); + return [v, l2]; + } + fillSetter() { + B.prototype.strokeSetter.apply(this, arguments); + } + strokeSetter() { + this.elem.attr(this.prop, x(this.start).tweenTo(x(this.end), this.pos), void 0, true); + } + } + B.timers = []; + return B; + }); + M(a, "Core/Animation/AnimationUtilities.js", [a["Core/Animation/Fx.js"], a["Core/Utilities.js"]], function(a2, y) { + function x(a3) { + return u(a3) ? v({ duration: 500, defer: 0 }, a3) : { duration: a3 ? 500 : 0, defer: 0 }; + } + function L(l3, m) { + let h = a2.timers.length; + for (; h--; ) + a2.timers[h].elem !== l3 || m && m !== a2.timers[h].prop || (a2.timers[h].stopped = true); + } + const { defined: C, getStyle: z, isArray: H, isNumber: B, isObject: u, merge: v, objectEach: l2, pick: p } = y; + return { animate: function(p2, m, h) { + let g, e = "", w, E, F; + u(h) || (F = arguments, h = { duration: F[2], easing: F[3], complete: F[4] }); + B(h.duration) || (h.duration = 400); + h.easing = typeof h.easing === "function" ? h.easing : Math[h.easing] || Math.easeInOutSine; + h.curAnim = v(m); + l2(m, function(d, k) { + L(p2, k); + E = new a2(p2, h, k); + w = void 0; + k === "d" && H(m.d) ? (E.paths = E.initPath(p2, p2.pathArray, m.d), E.toD = m.d, g = 0, w = 1) : p2.attr ? g = p2.attr(k) : (g = parseFloat(z(p2, k)) || 0, k !== "opacity" && (e = "px")); + w || (w = d); + typeof w === "string" && w.match("px") && (w = w.replace(/px/g, "")); + E.run(g, w, e); + }); + }, animObject: x, getDeferredAnimation: function(a3, m, h) { + const g = x(m); + let e = 0, w = 0; + (h ? [h] : a3.series).forEach((h3) => { + h3 = x(h3.options.animation); + e = m && C(m.defer) ? g.defer : Math.max(e, h3.duration + h3.defer); + w = Math.min(g.duration, h3.duration); + }); + a3.renderer.forExport && (e = 0); + return { defer: Math.max(0, e - w), duration: Math.min(e, w) }; + }, setAnimation: function(a3, m) { + m.renderer.globalAnimation = p(a3, m.options.chart.animation, true); + }, stop: L }; + }); + M(a, "Core/Renderer/HTML/AST.js", [a["Core/Globals.js"], a["Core/Utilities.js"]], function(a2, y) { + const { SVG_NS: x, win: L } = a2, { attr: C, createElement: z, css: H, error: B, isFunction: u, isString: v, objectEach: l2, splat: p } = y; + ({ trustedTypes: y } = L); + const t = y && u(y.createPolicy) && y.createPolicy("highcharts", { createHTML: (e) => e }); + y = t ? t.createHTML("") : ""; + try { + var m = !!new DOMParser().parseFromString(y, "text/html"); + } catch (e) { + m = false; + } + const h = m; + class g { + static filterUserAttributes(e) { + l2(e, (h3, m2) => { + let a3 = true; + g.allowedAttributes.indexOf(m2) === -1 && (a3 = false); + ["background", "dynsrc", "href", "lowsrc", "src"].indexOf(m2) !== -1 && (a3 = v(h3) && g.allowedReferences.some((d) => h3.indexOf(d) === 0)); + a3 || (B(33, false, void 0, { "Invalid attribute in config": `${m2}` }), delete e[m2]); + v(h3) && e[m2] && (e[m2] = h3.replace(/ { + g2 = g2.split(":").map((d) => d.trim()); + const h3 = g2.shift(); + h3 && g2.length && (e2[h3.replace(/-([a-z])/g, (d) => d[1].toUpperCase())] = g2.join(":")); + return e2; + }, {}); + } + static setElementHTML(e, h3) { + e.innerHTML = g.emptyHTML; + h3 && new g(h3).addToDOM(e); + } + constructor(e) { + this.nodes = typeof e === "string" ? this.parseMarkup(e) : e; + } + addToDOM(e) { + function h3(e2, m2) { + let d; + p(e2).forEach(function(k) { + var e3 = k.tagName; + const q = k.textContent ? a2.doc.createTextNode(k.textContent) : void 0, w = g.bypassHTMLFiltering; + let b; + if (e3) + if (e3 === "#text") + b = q; + else if (g.allowedTags.indexOf(e3) !== -1 || w) { + e3 = a2.doc.createElementNS(e3 === "svg" ? x : m2.namespaceURI || x, e3); + const f = k.attributes || {}; + l2(k, function(b2, d2) { + d2 !== "tagName" && d2 !== "attributes" && d2 !== "children" && d2 !== "style" && d2 !== "textContent" && (f[d2] = b2); + }); + C(e3, w ? f : g.filterUserAttributes(f)); + k.style && H(e3, k.style); + q && e3.appendChild(q); + h3(k.children || [], e3); + b = e3; + } else + B(33, false, void 0, { "Invalid tagName in config": e3 }); + b && m2.appendChild(b); + d = b; + }); + return d; + } + return h3(this.nodes, e); + } + parseMarkup(e) { + const m2 = []; + e = e.trim().replace(/ style=(["'])/g, " data-style=$1"); + if (h) + e = new DOMParser().parseFromString(t ? t.createHTML(e) : e, "text/html"); + else { + const g2 = z("div"); + g2.innerHTML = e; + e = { body: g2 }; + } + const a3 = (e2, d) => { + var k = e2.nodeName.toLowerCase(); + const r = { tagName: k }; + k === "#text" && (r.textContent = e2.textContent || ""); + if (k = e2.attributes) { + const d2 = {}; + [].forEach.call(k, (k2) => { + k2.name === "data-style" ? r.style = g.parseStyle(k2.value) : d2[k2.name] = k2.value; + }); + r.attributes = d2; + } + if (e2.childNodes.length) { + const d2 = []; + [].forEach.call(e2.childNodes, (k2) => { + a3(k2, d2); + }); + d2.length && (r.children = d2); + } + d.push(r); + }; + [].forEach.call(e.body.childNodes, (e2) => a3(e2, m2)); + return m2; + } + } + g.allowedAttributes = "alt aria-controls aria-describedby aria-expanded aria-haspopup aria-hidden aria-label aria-labelledby aria-live aria-pressed aria-readonly aria-roledescription aria-selected class clip-path color colspan cx cy d dx dy disabled fill flood-color flood-opacity height href id in markerHeight markerWidth offset opacity orient padding paddingLeft paddingRight patternUnits r refX refY role scope slope src startOffset stdDeviation stroke stroke-linecap stroke-width style tableValues result rowspan summary target tabindex text-align text-anchor textAnchor textLength title type valign width x x1 x2 xlink:href y y1 y2 zIndex".split(" "); + g.allowedReferences = "https:// http:// mailto: / ../ ./ #".split(" "); + g.allowedTags = "a abbr b br button caption circle clipPath code dd defs div dl dt em feComponentTransfer feDropShadow feFuncA feFuncB feFuncG feFuncR feGaussianBlur feOffset feMerge feMergeNode filter h1 h2 h3 h4 h5 h6 hr i img li linearGradient marker ol p path pattern pre rect small span stop strong style sub sup svg table text textPath thead title tbody tspan td th tr u ul #text".split(" "); + g.emptyHTML = y; + g.bypassHTMLFiltering = false; + ""; + return g; + }); + M(a, "Core/Templating.js", [a["Core/Defaults.js"], a["Core/Utilities.js"]], function(a2, y) { + function x(h = "", g, e) { + const a3 = /\{([a-zA-Z0-9:\.,;\-\/<>%_@"'= #\(\)]+)\}/g, l3 = /\(([a-zA-Z0-9:\.,;\-\/<>%_@"'= ]+)\)/g, v2 = [], d = /f$/, k = /\.([0-9])/, r = C.lang, q = e && e.time || z, G = e && e.numberFormatter || L, b = (b2 = "") => { + let c2; + return b2 === "true" ? true : b2 === "false" ? false : (c2 = Number(b2)).toString() === b2 ? c2 : B(b2, g); + }; + let f, c, n3 = 0, P; + for (; (f = a3.exec(h)) !== null; ) { + const b2 = l3.exec(f[1]); + b2 && (f = b2, P = true); + c && c.isBlock || (c = { + ctx: g, + expression: f[1], + find: f[0], + isBlock: f[1].charAt(0) === "#", + start: f.index, + startInner: f.index + f[0].length, + length: f[0].length + }); + var D = f[1].split(" ")[0].replace("#", ""); + m[D] && (c.isBlock && D === c.fn && n3++, c.fn || (c.fn = D)); + D = f[1] === "else"; + if (c.isBlock && c.fn && (f[1] === `/${c.fn}` || D)) + if (n3) + D || n3--; + else { + var K = c.startInner; + K = h.substr(K, f.index - K); + c.body === void 0 ? (c.body = K, c.startInner = f.index + f[0].length) : c.elseBody = K; + c.find += K + f[0]; + D || (v2.push(c), c = void 0); + } + else + c.isBlock || v2.push(c); + if (b2 && (c === null || c === void 0 || !c.isBlock)) + break; + } + v2.forEach((c2) => { + const { body: f2, elseBody: n4, expression: K2, fn: e2 } = c2; + var A; + if (e2) { + var a4 = [c2], w = K2.split(" "); + for (A = m[e2].length; A--; ) + a4.unshift(b(w[A + 1])); + A = m[e2].apply(g, a4); + c2.isBlock && typeof A === "boolean" && (A = x(A ? f2 : n4, g)); + } else + a4 = K2.split(":"), A = b(a4.shift() || ""), a4.length && typeof A === "number" && (a4 = a4.join(":"), d.test(a4) ? (w = parseInt((a4.match(k) || ["", "-1"])[1], 10), A !== null && (A = G(A, w, r.decimalPoint, -1 < a4.indexOf(",") ? r.thousandsSep : ""))) : A = q.dateFormat(a4, A)); + h = h.replace(c2.find, p(A, "")); + }); + return P ? x(h, g, e) : h; + } + function L(h, g, e, a3) { + h = +h || 0; + g = +g; + const m2 = C.lang; + var w = (h.toString().split(".")[1] || "").split("e")[0].length; + const d = h.toString().split("e"), k = g; + if (g === -1) + g = Math.min(w, 20); + else if (!v(g)) + g = 2; + else if (g && d[1] && 0 > d[1]) { + var r = g + +d[1]; + 0 <= r ? (d[0] = (+d[0]).toExponential(r).split("e")[0], g = r) : (d[0] = d[0].split(".")[0] || 0, h = 20 > g ? (d[0] * Math.pow(10, d[1])).toFixed(g) : 0, d[1] = 0); + } + r = (Math.abs(d[1] ? d[0] : h) + Math.pow(10, -Math.max(g, w) - 1)).toFixed(g); + w = String(t(r)); + const q = 3 < w.length ? w.length % 3 : 0; + e = p(e, m2.decimalPoint); + a3 = p(a3, m2.thousandsSep); + h = (0 > h ? "-" : "") + (q ? w.substr(0, q) + a3 : ""); + h = 0 > +d[1] && !k ? "0" : h + w.substr(q).replace(/(\d{3})(?=\d)/g, "$1" + a3); + g && (h += e + r.slice(-g)); + d[1] && +h !== 0 && (h += "e" + d[1]); + return h; + } + const { defaultOptions: C, defaultTime: z } = a2, { extend: H, getNestedProperty: B, isArray: u, isNumber: v, isObject: l2, pick: p, pInt: t } = y, m = { add: (h, g) => h + g, divide: (h, g) => g !== 0 ? h / g : "", eq: (h, g) => h == g, each: function(h) { + const g = arguments[arguments.length - 1]; + return u(h) ? h.map((e, a3) => x(g.body, H(l2(e) ? e : { "@this": e }, { "@index": a3, "@first": a3 === 0, "@last": a3 === h.length - 1 }))).join("") : false; + }, ge: (h, g) => h >= g, gt: (h, g) => h > g, "if": (h) => !!h, le: (h, g) => h <= g, lt: (h, g) => h < g, multiply: (h, g) => h * g, ne: (h, g) => h != g, subtract: (h, g) => h - g, unless: (h) => !h }; + return { dateFormat: function(h, g, e) { + return z.dateFormat(h, g, e); + }, format: x, helpers: m, numberFormat: L }; + }); + M(a, "Core/Renderer/RendererUtilities.js", [a["Core/Utilities.js"]], function(a2) { + const { clamp: x, pick: I, stableSort: L } = a2; + var C; + (function(a3) { + function y(a4, u, v) { + const l2 = a4; + var p = l2.reducedLen || u, t = (e2, g2) => (g2.rank || 0) - (e2.rank || 0); + const m = (e2, g2) => e2.target - g2.target; + let h, g = true, e = [], w = 0; + for (h = a4.length; h--; ) + w += a4[h].size; + if (w > p) { + L(a4, t); + for (w = h = 0; w <= p; ) + w += a4[h].size, h++; + e = a4.splice(h - 1, a4.length); + } + L(a4, m); + for (a4 = a4.map((e2) => ({ size: e2.size, targets: [e2.target], align: I(e2.align, 0.5) })); g; ) { + for (h = a4.length; h--; ) + p = a4[h], t = (Math.min.apply(0, p.targets) + Math.max.apply(0, p.targets)) / 2, p.pos = x(t - p.size * p.align, 0, u - p.size); + h = a4.length; + for (g = false; h--; ) + 0 < h && a4[h - 1].pos + a4[h - 1].size > a4[h].pos && (a4[h - 1].size += a4[h].size, a4[h - 1].targets = a4[h - 1].targets.concat(a4[h].targets), a4[h - 1].align = 0.5, a4[h - 1].pos + a4[h - 1].size > u && (a4[h - 1].pos = u - a4[h - 1].size), a4.splice(h, 1), g = true); + } + l2.push.apply(l2, e); + h = 0; + a4.some((e2) => { + let g2 = 0; + return (e2.targets || []).some(() => { + l2[h].pos = e2.pos + g2; + if (typeof v !== "undefined" && Math.abs(l2[h].pos - l2[h].target) > v) + return l2.slice(0, h + 1).forEach((d) => delete d.pos), l2.reducedLen = (l2.reducedLen || u) - 0.1 * u, l2.reducedLen > 0.1 * u && y(l2, u, v), true; + g2 += l2[h].size; + h++; + return false; + }); + }); + L(l2, m); + return l2; + } + a3.distribute = y; + })(C || (C = {})); + return C; + }); + M(a, "Core/Renderer/SVG/SVGElement.js", [ + a["Core/Animation/AnimationUtilities.js"], + a["Core/Color/Color.js"], + a["Core/Globals.js"], + a["Core/Utilities.js"] + ], function(a2, y, I, L) { + const { animate: x, animObject: z, stop: H } = a2, { deg2rad: B, doc: u, svg: v, SVG_NS: l2, win: p } = I, { addEvent: t, attr: m, createElement: h, css: g, defined: e, erase: w, extend: E, fireEvent: F, isArray: d, isFunction: k, isObject: r, isString: q, merge: G, objectEach: b, pick: f, pInt: c, syncTimeout: n3, uniqueKey: P } = L; + class D { + constructor() { + this.element = void 0; + this.onEvents = {}; + this.opacity = 1; + this.renderer = void 0; + this.SVG_NS = l2; + } + _defaultGetter(b2) { + b2 = f(this[b2 + "Value"], this[b2], this.element ? this.element.getAttribute(b2) : null, 0); + /^[\-0-9\.]+$/.test(b2) && (b2 = parseFloat(b2)); + return b2; + } + _defaultSetter(b2, c2, f2) { + f2.setAttribute(c2, b2); + } + add(b2) { + const c2 = this.renderer, f2 = this.element; + let d2; + b2 && (this.parentGroup = b2); + typeof this.textStr !== "undefined" && this.element.nodeName === "text" && c2.buildText(this); + this.added = true; + if (!b2 || b2.handleZ || this.zIndex) + d2 = this.zIndexSetter(); + d2 || (b2 ? b2.element : c2.box).appendChild(f2); + if (this.onAdd) + this.onAdd(); + return this; + } + addClass(b2, c2) { + const f2 = c2 ? "" : this.attr("class") || ""; + b2 = (b2 || "").split(/ /g).reduce(function(b3, c3) { + f2.indexOf(c3) === -1 && b3.push(c3); + return b3; + }, f2 ? [f2] : []).join(" "); + b2 !== f2 && this.attr("class", b2); + return this; + } + afterSetters() { + this.doTransform && (this.updateTransform(), this.doTransform = false); + } + align(b2, c2, d2) { + const k2 = {}; + var n4 = this.renderer, e2 = n4.alignedObjects, A; + let K, g2; + if (b2) { + if (this.alignOptions = b2, this.alignByTranslate = c2, !d2 || q(d2)) + this.alignTo = A = d2 || "renderer", w(e2, this), e2.push(this), d2 = void 0; + } else + b2 = this.alignOptions, c2 = this.alignByTranslate, A = this.alignTo; + d2 = f(d2, n4[A], A === "scrollablePlotBox" ? n4.plotBox : void 0, n4); + A = b2.align; + const a3 = b2.verticalAlign; + n4 = (d2.x || 0) + (b2.x || 0); + e2 = (d2.y || 0) + (b2.y || 0); + A === "right" ? K = 1 : A === "center" && (K = 2); + K && (n4 += (d2.width - (b2.width || 0)) / K); + k2[c2 ? "translateX" : "x"] = Math.round(n4); + a3 === "bottom" ? g2 = 1 : a3 === "middle" && (g2 = 2); + g2 && (e2 += (d2.height - (b2.height || 0)) / g2); + k2[c2 ? "translateY" : "y"] = Math.round(e2); + this[this.placed ? "animate" : "attr"](k2); + this.placed = true; + this.alignAttr = k2; + return this; + } + alignSetter(b2) { + const c2 = { left: "start", center: "middle", right: "end" }; + c2[b2] && (this.alignValue = b2, this.element.setAttribute("text-anchor", c2[b2])); + } + animate(c2, d2, k2) { + const e2 = z(f(d2, this.renderer.globalAnimation, true)); + d2 = e2.defer; + u.hidden && (e2.duration = 0); + e2.duration !== 0 ? (k2 && (e2.complete = k2), n3(() => { + this.element && x(this, c2, e2); + }, d2)) : (this.attr(c2, void 0, k2 || e2.complete), b(c2, function(b2, c3) { + e2.step && e2.step.call(this, b2, { prop: c3, pos: 1, elem: this }); + }, this)); + return this; + } + applyTextOutline(b2) { + const c2 = this.element; + b2.indexOf("contrast") !== -1 && (b2 = b2.replace(/contrast/g, this.renderer.getContrast(c2.style.fill))); + var f2 = b2.split(" "); + b2 = f2[f2.length - 1]; + if ((f2 = f2[0]) && f2 !== "none" && I.svg) { + this.fakeTS = true; + f2 = f2.replace(/(^[\d\.]+)(.*?)$/g, function(b3, c3, f3) { + return 2 * Number(c3) + f3; + }); + this.removeTextOutline(); + const d2 = u.createElementNS(l2, "tspan"); + m(d2, { "class": "highcharts-text-outline", fill: b2, stroke: b2, "stroke-width": f2, "stroke-linejoin": "round" }); + b2 = c2.querySelector("textPath") || c2; + [].forEach.call(b2.childNodes, (b3) => { + const c3 = b3.cloneNode(true); + c3.removeAttribute && ["fill", "stroke", "stroke-width", "stroke"].forEach((b4) => c3.removeAttribute(b4)); + d2.appendChild(c3); + }); + let k2 = 0; + [].forEach.call(b2.querySelectorAll("text tspan"), (b3) => { + k2 += Number(b3.getAttribute("dy")); + }); + f2 = u.createElementNS(l2, "tspan"); + f2.textContent = "\u200B"; + m(f2, { x: Number(c2.getAttribute("x")), dy: -k2 }); + d2.appendChild(f2); + b2.insertBefore(d2, b2.firstChild); + } + } + attr(c2, f2, d2, k2) { + const n4 = this.element, e2 = D.symbolCustomAttribs; + let A, q2, g2 = this, a3, K; + typeof c2 === "string" && typeof f2 !== "undefined" && (A = c2, c2 = {}, c2[A] = f2); + typeof c2 === "string" ? g2 = (this[c2 + "Getter"] || this._defaultGetter).call(this, c2, n4) : (b(c2, function(b2, f3) { + a3 = false; + k2 || H(this, f3); + this.symbolName && e2.indexOf(f3) !== -1 && (q2 || (this.symbolAttr(c2), q2 = true), a3 = true); + !this.rotation || f3 !== "x" && f3 !== "y" || (this.doTransform = true); + a3 || (K = this[f3 + "Setter"] || this._defaultSetter, K.call(this, b2, f3, n4)); + }, this), this.afterSetters()); + d2 && d2.call(this); + return g2; + } + clip(b2) { + return this.attr("clip-path", b2 ? "url(" + this.renderer.url + "#" + b2.id + ")" : "none"); + } + crisp(b2, c2) { + c2 = c2 || b2.strokeWidth || 0; + const f2 = Math.round(c2) % 2 / 2; + b2.x = Math.floor(b2.x || this.x || 0) + f2; + b2.y = Math.floor(b2.y || this.y || 0) + f2; + b2.width = Math.floor((b2.width || this.width || 0) - 2 * f2); + b2.height = Math.floor((b2.height || this.height || 0) - 2 * f2); + e(b2.strokeWidth) && (b2.strokeWidth = c2); + return b2; + } + complexColor(c2, f2, k2) { + const n4 = this.renderer; + let q2, g2, A, a3, r2, K, h3, J, m2, O, w2 = [], l3; + F(this.renderer, "complexColor", { args: arguments }, function() { + c2.radialGradient ? g2 = "radialGradient" : c2.linearGradient && (g2 = "linearGradient"); + if (g2) { + A = c2[g2]; + r2 = n4.gradients; + K = c2.stops; + m2 = k2.radialReference; + d(A) && (c2[g2] = A = { x1: A[0], y1: A[1], x2: A[2], y2: A[3], gradientUnits: "userSpaceOnUse" }); + g2 === "radialGradient" && m2 && !e(A.gradientUnits) && (a3 = A, A = G(A, n4.getRadialAttr(m2, a3), { gradientUnits: "userSpaceOnUse" })); + b(A, function(b2, c3) { + c3 !== "id" && w2.push(c3, b2); + }); + b(K, function(b2) { + w2.push(b2); + }); + w2 = w2.join(","); + if (r2[w2]) + O = r2[w2].attr("id"); + else { + A.id = O = P(); + const b2 = r2[w2] = n4.createElement(g2).attr(A).add(n4.defs); + b2.radAttr = a3; + b2.stops = []; + K.forEach(function(c3) { + c3[1].indexOf("rgba") === 0 ? (q2 = y.parse(c3[1]), h3 = q2.get("rgb"), J = q2.get("a")) : (h3 = c3[1], J = 1); + c3 = n4.createElement("stop").attr({ offset: c3[0], "stop-color": h3, "stop-opacity": J }).add(b2); + b2.stops.push(c3); + }); + } + l3 = "url(" + n4.url + "#" + O + ")"; + k2.setAttribute(f2, l3); + k2.gradient = w2; + c2.toString = function() { + return l3; + }; + } + }); + } + css(f2) { + const d2 = this.styles, k2 = {}, n4 = this.element; + let e2, q2 = !d2; + d2 && b(f2, function(b2, c2) { + d2 && d2[c2] !== b2 && (k2[c2] = b2, q2 = true); + }); + if (q2) { + d2 && (f2 = E(d2, k2)); + f2.width === null || f2.width === "auto" ? delete this.textWidth : n4.nodeName.toLowerCase() === "text" && f2.width && (e2 = this.textWidth = c(f2.width)); + this.styles = f2; + e2 && !v && this.renderer.forExport && delete f2.width; + const b2 = G(f2); + n4.namespaceURI === this.SVG_NS && (["textOutline", "textOverflow", "width"].forEach((c2) => b2 && delete b2[c2]), b2.color && (b2.fill = b2.color)); + g(n4, b2); + } + this.added && (this.element.nodeName === "text" && this.renderer.buildText(this), f2.textOutline && this.applyTextOutline(f2.textOutline)); + return this; + } + dashstyleSetter(b2) { + let d2 = this["stroke-width"]; + d2 === "inherit" && (d2 = 1); + if (b2 = b2 && b2.toLowerCase()) { + const k2 = b2.replace("shortdashdotdot", "3,1,1,1,1,1,").replace("shortdashdot", "3,1,1,1").replace("shortdot", "1,1,").replace("shortdash", "3,1,").replace("longdash", "8,3,").replace(/dot/g, "1,3,").replace("dash", "4,3,").replace(/,$/, "").split(","); + for (b2 = k2.length; b2--; ) + k2[b2] = "" + c(k2[b2]) * f(d2, NaN); + b2 = k2.join(",").replace(/NaN/g, "none"); + this.element.setAttribute("stroke-dasharray", b2); + } + } + destroy() { + const c2 = this; + var f2 = c2.element || {}; + const d2 = c2.renderer; + var k2 = f2.ownerSVGElement; + let n4 = f2.nodeName === "SPAN" && c2.parentGroup || void 0; + f2.onclick = f2.onmouseout = f2.onmouseover = f2.onmousemove = f2.point = null; + H(c2); + if (c2.clipPath && k2) { + const b2 = c2.clipPath; + [].forEach.call(k2.querySelectorAll("[clip-path],[CLIP-PATH]"), function(c3) { + -1 < c3.getAttribute("clip-path").indexOf(b2.element.id) && c3.removeAttribute("clip-path"); + }); + c2.clipPath = b2.destroy(); + } + if (c2.stops) { + for (k2 = 0; k2 < c2.stops.length; k2++) + c2.stops[k2].destroy(); + c2.stops.length = 0; + c2.stops = void 0; + } + for (c2.safeRemoveChild(f2); n4 && n4.div && n4.div.childNodes.length === 0; ) + f2 = n4.parentGroup, c2.safeRemoveChild(n4.div), delete n4.div, n4 = f2; + c2.alignTo && w(d2.alignedObjects, c2); + b(c2, function(b2, f3) { + c2[f3] && c2[f3].parentGroup === c2 && c2[f3].destroy && c2[f3].destroy(); + delete c2[f3]; + }); + } + dSetter(b2, c2, f2) { + d(b2) && (typeof b2[0] === "string" && (b2 = this.renderer.pathToSegments(b2)), this.pathArray = b2, b2 = b2.reduce((b3, c3, f3) => c3 && c3.join ? (f3 ? b3 + " " : "") + c3.join(" ") : (c3 || "").toString(), "")); + /(NaN| {2}|^$)/.test(b2) && (b2 = "M 0 0"); + this[c2] !== b2 && (f2.setAttribute(c2, b2), this[c2] = b2); + } + fadeOut(b2) { + const c2 = this; + c2.animate({ opacity: 0 }, { duration: f(b2, 150), complete: function() { + c2.hide(); + } }); + } + fillSetter(b2, c2, f2) { + typeof b2 === "string" ? f2.setAttribute(c2, b2) : b2 && this.complexColor(b2, c2, f2); + } + getBBox(b2, c2) { + const { alignValue: d2, element: n4, renderer: q2, styles: a3, textStr: A } = this, { cache: r2, cacheKeys: h3 } = q2; + var m2 = n4.namespaceURI === this.SVG_NS; + c2 = f(c2, this.rotation, 0); + var K = q2.styledMode ? n4 && D.prototype.getStyle.call(n4, "font-size") : a3 && a3.fontSize; + let J; + let N; + e(A) && (N = A.toString(), N.indexOf("<") === -1 && (N = N.replace(/[0-9]/g, "0")), N += ["", q2.rootFontSize, K, c2, this.textWidth, d2, a3 && a3.textOverflow, a3 && a3.fontWeight].join()); + N && !b2 && (J = r2[N]); + if (!J) { + if (m2 || q2.forExport) { + try { + var O = this.fakeTS && function(b3) { + const c3 = n4.querySelector(".highcharts-text-outline"); + c3 && g(c3, { display: b3 }); + }; + k(O) && O("none"); + J = n4.getBBox ? E({}, n4.getBBox()) : { width: n4.offsetWidth, height: n4.offsetHeight, x: 0, y: 0 }; + k(O) && O(""); + } catch (fa) { + ""; + } + if (!J || 0 > J.width) + J = { x: 0, y: 0, width: 0, height: 0 }; + } else + J = this.htmlGetBBox(); + O = J.width; + b2 = J.height; + m2 && (J.height = b2 = { "11px,17": 14, "13px,20": 16 }[`${K || ""},${Math.round(b2)}`] || b2); + if (c2) { + m2 = Number(n4.getAttribute("y") || 0) - J.y; + K = { right: 1, center: 0.5 }[d2 || 0] || 0; + var w2 = c2 * B, l3 = (c2 - 90) * B, p2 = O * Math.cos(w2); + c2 = O * Math.sin(w2); + var G2 = Math.cos(l3); + w2 = Math.sin(l3); + O = J.x + K * (O - p2) + m2 * G2; + l3 = O + p2; + G2 = l3 - b2 * G2; + p2 = G2 - p2; + m2 = J.y + m2 - K * c2 + m2 * w2; + K = m2 + c2; + b2 = K - b2 * w2; + c2 = b2 - c2; + J.x = Math.min(O, l3, G2, p2); + J.y = Math.min(m2, K, b2, c2); + J.width = Math.max(O, l3, G2, p2) - J.x; + J.height = Math.max(m2, K, b2, c2) - J.y; + } + } + if (N && (A === "" || 0 < J.height)) { + for (; 250 < h3.length; ) + delete r2[h3.shift()]; + r2[N] || h3.push(N); + r2[N] = J; + } + return J; + } + getStyle(b2) { + return p.getComputedStyle(this.element || this, "").getPropertyValue(b2); + } + hasClass(b2) { + return ("" + this.attr("class")).split(" ").indexOf(b2) !== -1; + } + hide() { + return this.attr({ visibility: "hidden" }); + } + htmlGetBBox() { + return { height: 0, width: 0, x: 0, y: 0 }; + } + init(b2, c2) { + this.element = c2 === "span" ? h(c2) : u.createElementNS(this.SVG_NS, c2); + this.renderer = b2; + F(this, "afterInit"); + } + on(b2, c2) { + const { onEvents: f2 } = this; + if (f2[b2]) + f2[b2](); + f2[b2] = t(this.element, b2, c2); + return this; + } + opacitySetter(b2, c2, f2) { + this.opacity = b2 = Number(Number(b2).toFixed(3)); + f2.setAttribute(c2, b2); + } + removeClass(b2) { + return this.attr("class", ("" + this.attr("class")).replace(q(b2) ? new RegExp(`(^| )${b2}( |$)`) : b2, " ").replace(/ +/g, " ").trim()); + } + removeTextOutline() { + const b2 = this.element.querySelector("tspan.highcharts-text-outline"); + b2 && this.safeRemoveChild(b2); + } + safeRemoveChild(b2) { + const c2 = b2.parentNode; + c2 && c2.removeChild(b2); + } + setRadialReference(b2) { + const c2 = this.element.gradient && this.renderer.gradients[this.element.gradient]; + this.element.radialReference = b2; + c2 && c2.radAttr && c2.animate(this.renderer.getRadialAttr(b2, c2.radAttr)); + return this; + } + setTextPath(b2, c2) { + c2 = G(true, { enabled: true, attributes: { dy: -5, startOffset: "50%", textAnchor: "middle" } }, c2); + const f2 = this.renderer.url, d2 = this.text || this, k2 = d2.textPath, { attributes: n4, enabled: A } = c2; + b2 = b2 || k2 && k2.path; + k2 && k2.undo(); + b2 && A ? (c2 = t(d2, "afterModifyTree", (c3) => { + if (b2 && A) { + let A2 = b2.attr("id"); + A2 || b2.attr("id", A2 = P()); + var k3 = { x: 0, y: 0 }; + e(n4.dx) && (k3.dx = n4.dx, delete n4.dx); + e(n4.dy) && (k3.dy = n4.dy, delete n4.dy); + d2.attr(k3); + this.attr({ transform: "" }); + this.box && (this.box = this.box.destroy()); + k3 = c3.nodes.slice(0); + c3.nodes.length = 0; + c3.nodes[0] = { tagName: "textPath", attributes: E(n4, { "text-anchor": n4.textAnchor, href: `${f2}#${A2}` }), children: k3 }; + } + }), d2.textPath = { path: b2, undo: c2 }) : (d2.attr({ dx: 0, dy: 0 }), delete d2.textPath); + this.added && (d2.textCache = "", this.renderer.buildText(d2)); + return this; + } + shadow(b2) { + var c2; + const { renderer: f2 } = this, d2 = G(((c2 = this.parentGroup) === null || c2 === void 0 ? void 0 : c2.rotation) === 90 ? { offsetX: -1, offsetY: -1 } : {}, r(b2) ? b2 : {}); + c2 = f2.shadowDefinition(d2); + return this.attr({ filter: b2 ? `url(${f2.url}#${c2})` : "none" }); + } + show(b2 = true) { + return this.attr({ visibility: b2 ? "inherit" : "visible" }); + } + ["stroke-widthSetter"](b2, c2, f2) { + this[c2] = b2; + f2.setAttribute(c2, b2); + } + strokeWidth() { + if (!this.renderer.styledMode) + return this["stroke-width"] || 0; + const b2 = this.getStyle("stroke-width"); + let f2 = 0, d2; + b2.indexOf("px") === b2.length - 2 ? f2 = c(b2) : b2 !== "" && (d2 = u.createElementNS(l2, "rect"), m(d2, { width: b2, "stroke-width": 0 }), this.element.parentNode.appendChild(d2), f2 = d2.getBBox().width, d2.parentNode.removeChild(d2)); + return f2; + } + symbolAttr(b2) { + const c2 = this; + D.symbolCustomAttribs.forEach(function(d2) { + c2[d2] = f(b2[d2], c2[d2]); + }); + c2.attr({ d: c2.renderer.symbols[c2.symbolName](c2.x, c2.y, c2.width, c2.height, c2) }); + } + textSetter(b2) { + b2 !== this.textStr && (delete this.textPxLength, this.textStr = b2, this.added && this.renderer.buildText(this)); + } + titleSetter(b2) { + const c2 = this.element, d2 = c2.getElementsByTagName("title")[0] || u.createElementNS(this.SVG_NS, "title"); + c2.insertBefore ? c2.insertBefore(d2, c2.firstChild) : c2.appendChild(d2); + d2.textContent = String(f(b2, "")).replace(/<[^>]*>/g, "").replace(/</g, "<").replace(/>/g, ">"); + } + toFront() { + const b2 = this.element; + b2.parentNode.appendChild(b2); + return this; + } + translate(b2, c2) { + return this.attr({ + translateX: b2, + translateY: c2 + }); + } + updateTransform() { + const { element: b2, matrix: c2, rotation: d2 = 0, scaleX: k2, scaleY: n4, translateX: q2 = 0, translateY: A = 0 } = this, g2 = ["translate(" + q2 + "," + A + ")"]; + e(c2) && g2.push("matrix(" + c2.join(",") + ")"); + d2 && g2.push("rotate(" + d2 + " " + f(this.rotationOriginX, b2.getAttribute("x"), 0) + " " + f(this.rotationOriginY, b2.getAttribute("y") || 0) + ")"); + (e(k2) || e(n4)) && g2.push("scale(" + f(k2, 1) + " " + f(n4, 1) + ")"); + g2.length && !(this.text || this).textPath && b2.setAttribute("transform", g2.join(" ")); + } + visibilitySetter(b2, c2, f2) { + b2 === "inherit" ? f2.removeAttribute(c2) : this[c2] !== b2 && f2.setAttribute(c2, b2); + this[c2] = b2; + } + xGetter(b2) { + this.element.nodeName === "circle" && (b2 === "x" ? b2 = "cx" : b2 === "y" && (b2 = "cy")); + return this._defaultGetter(b2); + } + zIndexSetter(b2, f2) { + var d2 = this.renderer, k2 = this.parentGroup; + const n4 = (k2 || d2).element || d2.box, q2 = this.element; + d2 = n4 === d2.box; + let A = false, g2; + var a3 = this.added; + let r2; + e(b2) ? (q2.setAttribute("data-z-index", b2), b2 = +b2, this[f2] === b2 && (a3 = false)) : e(this[f2]) && q2.removeAttribute("data-z-index"); + this[f2] = b2; + if (a3) { + (b2 = this.zIndex) && k2 && (k2.handleZ = true); + f2 = n4.childNodes; + for (r2 = f2.length - 1; 0 <= r2 && !A; r2--) + if (k2 = f2[r2], a3 = k2.getAttribute("data-z-index"), g2 = !e(a3), k2 !== q2) { + if (0 > b2 && g2 && !d2 && !r2) + n4.insertBefore(q2, f2[r2]), A = true; + else if (c(a3) <= b2 || g2 && (!e(b2) || 0 <= b2)) + n4.insertBefore(q2, f2[r2 + 1]), A = true; + } + A || (n4.insertBefore(q2, f2[d2 ? 3 : 0]), A = true); + } + return A; + } + } + D.symbolCustomAttribs = "anchorX anchorY clockwise end height innerR r start width x y".split(" "); + D.prototype.strokeSetter = D.prototype.fillSetter; + D.prototype.yGetter = D.prototype.xGetter; + D.prototype.matrixSetter = D.prototype.rotationOriginXSetter = D.prototype.rotationOriginYSetter = D.prototype.rotationSetter = D.prototype.scaleXSetter = D.prototype.scaleYSetter = D.prototype.translateXSetter = D.prototype.translateYSetter = D.prototype.verticalAlignSetter = function(b2, c2) { + this[c2] = b2; + this.doTransform = true; + }; + ""; + return D; + }); + M(a, "Core/Renderer/RendererRegistry.js", [a["Core/Globals.js"]], function(a2) { + var x; + (function(x2) { + x2.rendererTypes = {}; + let y; + x2.getRendererType = function(a3 = y) { + return x2.rendererTypes[a3] || x2.rendererTypes[y]; + }; + x2.registerRendererType = function(C, z, H) { + x2.rendererTypes[C] = z; + if (!y || H) + y = C, a2.Renderer = z; + }; + })(x || (x = {})); + return x; + }); + M(a, "Core/Renderer/SVG/SVGLabel.js", [a["Core/Renderer/SVG/SVGElement.js"], a["Core/Utilities.js"]], function(a2, y) { + const { defined: x, extend: L, isNumber: C, merge: z, pick: H, removeEvent: B } = y; + class u extends a2 { + constructor(a3, l2, p, t, m, h, g, e, w, E) { + super(); + this.paddingRightSetter = this.paddingLeftSetter = this.paddingSetter; + this.init(a3, "g"); + this.textStr = l2; + this.x = p; + this.y = t; + this.anchorX = h; + this.anchorY = g; + this.baseline = w; + this.className = E; + this.addClass(E === "button" ? "highcharts-no-tooltip" : "highcharts-label"); + E && this.addClass("highcharts-" + E); + this.text = a3.text(void 0, 0, 0, e).attr({ zIndex: 1 }); + let v; + typeof m === "string" && ((v = /^url\((.*?)\)$/.test(m)) || this.renderer.symbols[m]) && (this.symbolKey = m); + this.bBox = u.emptyBBox; + this.padding = 3; + this.baselineOffset = 0; + this.needsBox = a3.styledMode || v; + this.deferredAttr = {}; + this.alignFactor = 0; + } + alignSetter(a3) { + a3 = { left: 0, center: 0.5, right: 1 }[a3]; + a3 !== this.alignFactor && (this.alignFactor = a3, this.bBox && C(this.xSetting) && this.attr({ x: this.xSetting })); + } + anchorXSetter(a3, l2) { + this.anchorX = a3; + this.boxAttr(l2, Math.round(a3) - this.getCrispAdjust() - this.xSetting); + } + anchorYSetter(a3, l2) { + this.anchorY = a3; + this.boxAttr(l2, a3 - this.ySetting); + } + boxAttr(a3, l2) { + this.box ? this.box.attr(a3, l2) : this.deferredAttr[a3] = l2; + } + css(v) { + if (v) { + const a3 = {}; + v = z(v); + u.textProps.forEach((l2) => { + typeof v[l2] !== "undefined" && (a3[l2] = v[l2], delete v[l2]); + }); + this.text.css(a3); + "fontSize" in a3 || "fontWeight" in a3 ? this.updateTextPadding() : ("width" in a3 || "textOverflow" in a3) && this.updateBoxSize(); + } + return a2.prototype.css.call(this, v); + } + destroy() { + B(this.element, "mouseenter"); + B(this.element, "mouseleave"); + this.text && this.text.destroy(); + this.box && (this.box = this.box.destroy()); + a2.prototype.destroy.call(this); + } + fillSetter(a3, l2) { + a3 && (this.needsBox = true); + this.fill = a3; + this.boxAttr(l2, a3); + } + getBBox() { + this.textStr && this.bBox.width === 0 && this.bBox.height === 0 && this.updateBoxSize(); + const a3 = this.padding, l2 = H(this.paddingLeft, a3); + return { width: this.width, height: this.height, x: this.bBox.x - l2, y: this.bBox.y - a3 }; + } + getCrispAdjust() { + return this.renderer.styledMode && this.box ? this.box.strokeWidth() % 2 / 2 : (this["stroke-width"] ? parseInt(this["stroke-width"], 10) : 0) % 2 / 2; + } + heightSetter(a3) { + this.heightSetting = a3; + } + onAdd() { + this.text.add(this); + this.attr({ text: H(this.textStr, ""), x: this.x || 0, y: this.y || 0 }); + this.box && x(this.anchorX) && this.attr({ anchorX: this.anchorX, anchorY: this.anchorY }); + } + paddingSetter(a3, l2) { + C(a3) ? a3 !== this[l2] && (this[l2] = a3, this.updateTextPadding()) : this[l2] = void 0; + } + rSetter(a3, l2) { + this.boxAttr(l2, a3); + } + strokeSetter(a3, l2) { + this.stroke = a3; + this.boxAttr(l2, a3); + } + ["stroke-widthSetter"](a3, l2) { + a3 && (this.needsBox = true); + this["stroke-width"] = a3; + this.boxAttr(l2, a3); + } + ["text-alignSetter"](a3) { + this.textAlign = a3; + } + textSetter(a3) { + typeof a3 !== "undefined" && this.text.attr({ text: a3 }); + this.updateTextPadding(); + } + updateBoxSize() { + var a3 = this.text; + const l2 = {}, p = this.padding, t = this.bBox = C(this.widthSetting) && C(this.heightSetting) && !this.textAlign || !x(a3.textStr) ? u.emptyBBox : a3.getBBox(); + this.width = this.getPaddedWidth(); + this.height = (this.heightSetting || t.height || 0) + 2 * p; + const m = this.renderer.fontMetrics(a3); + this.baselineOffset = p + Math.min((this.text.firstLineMetrics || m).b, t.height || Infinity); + this.heightSetting && (this.baselineOffset += (this.heightSetting - m.h) / 2); + this.needsBox && !a3.textPath && (this.box || (a3 = this.box = this.symbolKey ? this.renderer.symbol(this.symbolKey) : this.renderer.rect(), a3.addClass((this.className === "button" ? "" : "highcharts-label-box") + (this.className ? " highcharts-" + this.className + "-box" : "")), a3.add(this)), a3 = this.getCrispAdjust(), l2.x = a3, l2.y = (this.baseline ? -this.baselineOffset : 0) + a3, l2.width = Math.round(this.width), l2.height = Math.round(this.height), this.box.attr(L(l2, this.deferredAttr)), this.deferredAttr = {}); + } + updateTextPadding() { + const a3 = this.text; + if (!a3.textPath) { + this.updateBoxSize(); + const l2 = this.baseline ? 0 : this.baselineOffset; + let p = H(this.paddingLeft, this.padding); + x(this.widthSetting) && this.bBox && (this.textAlign === "center" || this.textAlign === "right") && (p += { center: 0.5, right: 1 }[this.textAlign] * (this.widthSetting - this.bBox.width)); + if (p !== a3.x || l2 !== a3.y) + a3.attr("x", p), a3.hasBoxWidthChanged && (this.bBox = a3.getBBox(true)), typeof l2 !== "undefined" && a3.attr("y", l2); + a3.x = p; + a3.y = l2; + } + } + widthSetter(a3) { + this.widthSetting = C(a3) ? a3 : void 0; + } + getPaddedWidth() { + var a3 = this.padding; + const l2 = H(this.paddingLeft, a3); + a3 = H(this.paddingRight, a3); + return (this.widthSetting || this.bBox.width || 0) + l2 + a3; + } + xSetter(a3) { + this.x = a3; + this.alignFactor && (a3 -= this.alignFactor * this.getPaddedWidth(), this["forceAnimate:x"] = true); + this.xSetting = Math.round(a3); + this.attr("translateX", this.xSetting); + } + ySetter(a3) { + this.ySetting = this.y = Math.round(a3); + this.attr("translateY", this.ySetting); + } + } + u.emptyBBox = { width: 0, height: 0, x: 0, y: 0 }; + u.textProps = "color direction fontFamily fontSize fontStyle fontWeight lineHeight textAlign textDecoration textOutline textOverflow whiteSpace width".split(" "); + return u; + }); + M(a, "Core/Renderer/SVG/Symbols.js", [a["Core/Utilities.js"]], function(a2) { + function x(a3, u, v, l2, p) { + const t = []; + if (p) { + const m = p.start || 0, h = H(p.r, v); + v = H(p.r, l2 || v); + l2 = (p.end || 0) - 1e-3; + const g = p.innerR, e = H(p.open, 1e-3 > Math.abs((p.end || 0) - m - 2 * Math.PI)), w = Math.cos(m), E = Math.sin(m), F = Math.cos(l2), d = Math.sin(l2), k = H(p.longArc, 1e-3 > l2 - m - Math.PI ? 0 : 1); + let r = ["A", h, v, 0, k, H(p.clockwise, 1), a3 + h * F, u + v * d]; + r.params = { start: m, end: l2, cx: a3, cy: u }; + t.push(["M", a3 + h * w, u + v * E], r); + C(g) && (r = ["A", g, g, 0, k, C(p.clockwise) ? 1 - p.clockwise : 0, a3 + g * w, u + g * E], r.params = { start: l2, end: m, cx: a3, cy: u }, t.push(e ? ["M", a3 + g * F, u + g * d] : ["L", a3 + g * F, u + g * d], r)); + e || t.push(["Z"]); + } + return t; + } + function I(a3, u, v, l2, p) { + return p && p.r ? L(a3, u, v, l2, p) : [["M", a3, u], ["L", a3 + v, u], ["L", a3 + v, u + l2], ["L", a3, u + l2], ["Z"]]; + } + function L(a3, u, v, l2, p) { + p = (p === null || p === void 0 ? void 0 : p.r) || 0; + return [["M", a3 + p, u], ["L", a3 + v - p, u], ["A", p, p, 0, 0, 1, a3 + v, u + p], ["L", a3 + v, u + l2 - p], ["A", p, p, 0, 0, 1, a3 + v - p, u + l2], ["L", a3 + p, u + l2], ["A", p, p, 0, 0, 1, a3, u + l2 - p], ["L", a3, u + p], ["A", p, p, 0, 0, 1, a3 + p, u], ["Z"]]; + } + const { defined: C, isNumber: z, pick: H } = a2; + return { arc: x, callout: function(a3, u, v, l2, p) { + const t = Math.min(p && p.r || 0, v, l2), m = t + 6, h = p && p.anchorX; + p = p && p.anchorY || 0; + const g = L(a3, u, v, l2, { r: t }); + if (!z(h)) + return g; + a3 + h >= v ? p > u + m && p < u + l2 - m ? g.splice(3, 1, ["L", a3 + v, p - 6], ["L", a3 + v + 6, p], ["L", a3 + v, p + 6], ["L", a3 + v, u + l2 - t]) : g.splice(3, 1, ["L", a3 + v, l2 / 2], ["L", h, p], ["L", a3 + v, l2 / 2], ["L", a3 + v, u + l2 - t]) : 0 >= a3 + h ? p > u + m && p < u + l2 - m ? g.splice(7, 1, ["L", a3, p + 6], ["L", a3 - 6, p], ["L", a3, p - 6], ["L", a3, u + t]) : g.splice(7, 1, ["L", a3, l2 / 2], ["L", h, p], ["L", a3, l2 / 2], ["L", a3, u + t]) : p && p > l2 && h > a3 + m && h < a3 + v - m ? g.splice(5, 1, [ + "L", + h + 6, + u + l2 + ], ["L", h, u + l2 + 6], ["L", h - 6, u + l2], ["L", a3 + t, u + l2]) : p && 0 > p && h > a3 + m && h < a3 + v - m && g.splice(1, 1, ["L", h - 6, u], ["L", h, u - 6], ["L", h + 6, u], ["L", v - t, u]); + return g; + }, circle: function(a3, u, v, l2) { + return x(a3 + v / 2, u + l2 / 2, v / 2, l2 / 2, { start: 0.5 * Math.PI, end: 2.5 * Math.PI, open: false }); + }, diamond: function(a3, u, v, l2) { + return [["M", a3 + v / 2, u], ["L", a3 + v, u + l2 / 2], ["L", a3 + v / 2, u + l2], ["L", a3, u + l2 / 2], ["Z"]]; + }, rect: I, roundedRect: L, square: I, triangle: function(a3, u, v, l2) { + return [["M", a3 + v / 2, u], ["L", a3 + v, u + l2], ["L", a3, u + l2], ["Z"]]; + }, "triangle-down": function(a3, u, v, l2) { + return [[ + "M", + a3, + u + ], ["L", a3 + v, u], ["L", a3 + v / 2, u + l2], ["Z"]]; + } }; + }); + M(a, "Core/Renderer/SVG/TextBuilder.js", [a["Core/Renderer/HTML/AST.js"], a["Core/Globals.js"], a["Core/Utilities.js"]], function(a2, y, I) { + const { doc: x, SVG_NS: C, win: z } = y, { attr: H, extend: B, fireEvent: u, isString: v, objectEach: l2, pick: p } = I; + class t { + constructor(a3) { + const h = a3.styles; + this.renderer = a3.renderer; + this.svgElement = a3; + this.width = a3.textWidth; + this.textLineHeight = h && h.lineHeight; + this.textOutline = h && h.textOutline; + this.ellipsis = !(!h || h.textOverflow !== "ellipsis"); + this.noWrap = !(!h || h.whiteSpace !== "nowrap"); + } + buildSVG() { + const m = this.svgElement, h = m.element; + var g = m.renderer, e = p(m.textStr, "").toString(); + const w = e.indexOf("<") !== -1, l3 = h.childNodes; + g = !m.added && g.box; + const t2 = //g; + var d = [e, this.ellipsis, this.noWrap, this.textLineHeight, this.textOutline, m.getStyle("font-size"), this.width].join(); + if (d !== m.textCache) { + m.textCache = d; + delete m.actualWidth; + for (d = l3.length; d--; ) + h.removeChild(l3[d]); + w || this.ellipsis || this.width || m.textPath || e.indexOf(" ") !== -1 && (!this.noWrap || t2.test(e)) ? e !== "" && (g && g.appendChild(h), e = new a2(e), this.modifyTree(e.nodes), e.addToDOM(h), this.modifyDOM(), this.ellipsis && (h.textContent || "").indexOf("\u2026") !== -1 && m.attr("title", this.unescapeEntities(m.textStr || "", ["<", ">"])), g && g.removeChild(h)) : h.appendChild(x.createTextNode(this.unescapeEntities(e))); + v(this.textOutline) && m.applyTextOutline && m.applyTextOutline(this.textOutline); + } + } + modifyDOM() { + const a3 = this.svgElement, h = H(a3.element, "x"); + a3.firstLineMetrics = void 0; + let g; + for (; g = a3.element.firstChild; ) + if (/^[\s\u200B]*$/.test(g.textContent || " ")) + a3.element.removeChild(g); + else + break; + [].forEach.call(a3.element.querySelectorAll("tspan.highcharts-br"), (e2, d) => { + e2.nextSibling && e2.previousSibling && (d === 0 && e2.previousSibling.nodeType === 1 && (a3.firstLineMetrics = a3.renderer.fontMetrics(e2.previousSibling)), H(e2, { dy: this.getLineHeight(e2.nextSibling), x: h })); + }); + const e = this.width || 0; + if (e) { + var w = (g2, d) => { + var k = g2.textContent || ""; + const r = k.replace(/([^\^])-/g, "$1- ").split(" "); + var q = !this.noWrap && (1 < r.length || 1 < a3.element.childNodes.length); + const m = this.getLineHeight(d); + let b = 0, f = a3.actualWidth; + if (this.ellipsis) + k && this.truncate(g2, k, void 0, 0, Math.max(0, e - 0.8 * m), (b2, f2) => b2.substring(0, f2) + "\u2026"); + else if (q) { + k = []; + for (q = []; d.firstChild && d.firstChild !== g2; ) + q.push(d.firstChild), d.removeChild(d.firstChild); + for (; r.length; ) + r.length && !this.noWrap && 0 < b && (k.push(g2.textContent || ""), g2.textContent = r.join(" ").replace(/- /g, "-")), this.truncate(g2, void 0, r, b === 0 ? f || 0 : 0, e, (b2, f2) => r.slice(0, f2).join(" ").replace(/- /g, "-")), f = a3.actualWidth, b++; + q.forEach((b2) => { + d.insertBefore(b2, g2); + }); + k.forEach((b2) => { + d.insertBefore(x.createTextNode(b2), g2); + b2 = x.createElementNS(C, "tspan"); + b2.textContent = "\u200B"; + H(b2, { dy: m, x: h }); + d.insertBefore(b2, g2); + }); + } + }, l3 = (e2) => { + [].slice.call(e2.childNodes).forEach((d) => { + d.nodeType === z.Node.TEXT_NODE ? w(d, e2) : (d.className.baseVal.indexOf("highcharts-br") !== -1 && (a3.actualWidth = 0), l3(d)); + }); + }; + l3(a3.element); + } + } + getLineHeight(a3) { + a3 = a3.nodeType === z.Node.TEXT_NODE ? a3.parentElement : a3; + return this.textLineHeight ? parseInt(this.textLineHeight.toString(), 10) : this.renderer.fontMetrics(a3 || this.svgElement.element).h; + } + modifyTree(a3) { + const h = (g, e) => { + const { attributes: m = {}, children: l3, style: p2 = {}, tagName: d } = g, k = this.renderer.styledMode; + if (d === "b" || d === "strong") + k ? m["class"] = "highcharts-strong" : p2.fontWeight = "bold"; + else if (d === "i" || d === "em") + k ? m["class"] = "highcharts-emphasized" : p2.fontStyle = "italic"; + p2 && p2.color && (p2.fill = p2.color); + d === "br" ? (m["class"] = "highcharts-br", g.textContent = "\u200B", (e = a3[e + 1]) && e.textContent && (e.textContent = e.textContent.replace(/^ +/gm, ""))) : d === "a" && l3 && l3.some((d2) => d2.tagName === "#text") && (g.children = [{ children: l3, tagName: "tspan" }]); + d !== "#text" && d !== "a" && (g.tagName = "tspan"); + B(g, { attributes: m, style: p2 }); + l3 && l3.filter((d2) => d2.tagName !== "#text").forEach(h); + }; + a3.forEach(h); + u(this.svgElement, "afterModifyTree", { nodes: a3 }); + } + truncate(a3, h, g, e, l3, p2) { + const m = this.svgElement, { rotation: d } = m, k = []; + let r = g ? 1 : 0, q = (h || g || "").length, w = q, b, f; + const c = function(b2, c2) { + b2 = c2 || b2; + if ((c2 = a3.parentNode) && typeof k[b2] === "undefined" && c2.getSubStringLength) + try { + k[b2] = e + c2.getSubStringLength(0, g ? b2 + 1 : b2); + } catch (D) { + ""; + } + return k[b2]; + }; + m.rotation = 0; + f = c(a3.textContent.length); + if (e + f > l3) { + for (; r <= q; ) + w = Math.ceil((r + q) / 2), g && (b = p2(g, w)), f = c(w, b && b.length - 1), r === q ? r = q + 1 : f > l3 ? q = w - 1 : r = w; + q === 0 ? a3.textContent = "" : h && q === h.length - 1 || (a3.textContent = b || p2(h || g, w)); + } + g && g.splice(0, w); + m.actualWidth = f; + m.rotation = d; + } + unescapeEntities(a3, h) { + l2(this.renderer.escapes, function(g, e) { + h && h.indexOf(g) !== -1 || (a3 = a3.toString().replace(new RegExp(g, "g"), e)); + }); + return a3; + } + } + return t; + }); + M(a, "Core/Renderer/SVG/SVGRenderer.js", [ + a["Core/Renderer/HTML/AST.js"], + a["Core/Color/Color.js"], + a["Core/Globals.js"], + a["Core/Renderer/RendererRegistry.js"], + a["Core/Renderer/SVG/SVGElement.js"], + a["Core/Renderer/SVG/SVGLabel.js"], + a["Core/Renderer/SVG/Symbols.js"], + a["Core/Renderer/SVG/TextBuilder.js"], + a["Core/Utilities.js"] + ], function(a2, y, I, L, C, z, H, B, u) { + const { charts: v, deg2rad: l2, doc: p, isFirefox: t, isMS: m, isWebKit: h, noop: g, SVG_NS: e, symbolSizes: w, win: E } = I, { addEvent: F, attr: d, createElement: k, css: r, defined: q, destroyObjectProperties: G, extend: b, isArray: f, isNumber: c, isObject: n3, isString: P, merge: D, pick: K, pInt: x, uniqueKey: T } = u; + let Z; + class V { + constructor(b2, c2, f2, d2, a3, k2, n4) { + this.width = this.url = this.style = this.imgCount = this.height = this.gradients = this.globalAnimation = this.defs = this.chartIndex = this.cacheKeys = this.cache = this.boxWrapper = this.box = this.alignedObjects = void 0; + this.init(b2, c2, f2, d2, a3, k2, n4); + } + init(b2, c2, f2, a3, k2, n4, J) { + const A = this.createElement("svg").attr({ version: "1.1", "class": "highcharts-root" }), e2 = A.element; + J || A.css(this.getStyle(a3)); + b2.appendChild(e2); + d(b2, "dir", "ltr"); + b2.innerHTML.indexOf("xmlns") === -1 && d(e2, "xmlns", this.SVG_NS); + this.box = e2; + this.boxWrapper = A; + this.alignedObjects = []; + this.url = this.getReferenceURL(); + this.createElement("desc").add().element.appendChild(p.createTextNode("Created with Highcharts 11.1.0")); + this.defs = this.createElement("defs").add(); + this.allowHTML = n4; + this.forExport = k2; + this.styledMode = J; + this.gradients = {}; + this.cache = {}; + this.cacheKeys = []; + this.imgCount = 0; + this.rootFontSize = A.getStyle("font-size"); + this.setSize(c2, f2, false); + let q2; + t && b2.getBoundingClientRect && (c2 = function() { + r(b2, { left: 0, top: 0 }); + q2 = b2.getBoundingClientRect(); + r(b2, { left: Math.ceil(q2.left) - q2.left + "px", top: Math.ceil(q2.top) - q2.top + "px" }); + }, c2(), this.unSubPixelFix = F(E, "resize", c2)); + } + definition(b2) { + return new a2([b2]).addToDOM(this.defs.element); + } + getReferenceURL() { + if ((t || h) && p.getElementsByTagName("base").length) { + if (!q(Z)) { + var b2 = T(); + b2 = new a2([{ tagName: "svg", attributes: { width: 8, height: 8 }, children: [{ tagName: "defs", children: [{ tagName: "clipPath", attributes: { id: b2 }, children: [{ tagName: "rect", attributes: { width: 4, height: 4 } }] }] }, { tagName: "rect", attributes: { id: "hitme", width: 8, height: 8, "clip-path": `url(#${b2})`, fill: "rgba(0,0,0,0.001)" } }] }]).addToDOM(p.body); + r(b2, { position: "fixed", top: 0, left: 0, zIndex: 9e5 }); + const c2 = p.elementFromPoint(6, 6); + Z = (c2 && c2.id) === "hitme"; + p.body.removeChild(b2); + } + if (Z) + return E.location.href.split("#")[0].replace(/<[^>]*>/g, "").replace(/([\('\)])/g, "\\$1").replace(/ /g, "%20"); + } + return ""; + } + getStyle(c2) { + return this.style = b({ fontFamily: "Helvetica, Arial, sans-serif", fontSize: "1rem" }, c2); + } + setStyle(b2) { + this.boxWrapper.css(this.getStyle(b2)); + } + isHidden() { + return !this.boxWrapper.getBBox().width; + } + destroy() { + const b2 = this.defs; + this.box = null; + this.boxWrapper = this.boxWrapper.destroy(); + G(this.gradients || {}); + this.gradients = null; + this.defs = b2.destroy(); + this.unSubPixelFix && this.unSubPixelFix(); + return this.alignedObjects = null; + } + createElement(b2) { + const c2 = new this.Element(); + c2.init(this, b2); + return c2; + } + getRadialAttr(b2, c2) { + return { cx: b2[0] - b2[2] / 2 + (c2.cx || 0) * b2[2], cy: b2[1] - b2[2] / 2 + (c2.cy || 0) * b2[2], r: (c2.r || 0) * b2[2] }; + } + shadowDefinition(b2) { + const c2 = [`highcharts-drop-shadow-${this.chartIndex}`, ...Object.keys(b2).map((c3) => b2[c3])].join("-").replace(/[^a-z0-9\-]/g, ""), f2 = D({ + color: "#000000", + offsetX: 1, + offsetY: 1, + opacity: 0.15, + width: 5 + }, b2); + this.defs.element.querySelector(`#${c2}`) || this.definition({ tagName: "filter", attributes: { id: c2 }, children: [{ tagName: "feDropShadow", attributes: { dx: f2.offsetX, dy: f2.offsetY, "flood-color": f2.color, "flood-opacity": Math.min(5 * f2.opacity, 1), stdDeviation: f2.width / 2 } }] }); + return c2; + } + buildText(b2) { + new B(b2).buildSVG(); + } + getContrast(b2) { + b2 = y.parse(b2).rgba.map((b3) => { + b3 /= 255; + return 0.03928 >= b3 ? b3 / 12.92 : Math.pow((b3 + 0.055) / 1.055, 2.4); + }); + b2 = 0.2126 * b2[0] + 0.7152 * b2[1] + 0.0722 * b2[2]; + return 1.05 / (b2 + 0.05) > (b2 + 0.05) / 0.05 ? "#FFFFFF" : "#000000"; + } + button(c2, f2, d2, k2, e2 = {}, q2, J, g2, r2, h3) { + const A = this.label(c2, f2, d2, r2, void 0, void 0, h3, void 0, "button"), O = this.styledMode; + c2 = e2.states || {}; + let N = 0; + e2 = D(e2); + delete e2.states; + const l3 = D({ color: "#333333", cursor: "pointer", fontSize: "0.8em", fontWeight: "normal" }, e2.style); + delete e2.style; + let w2 = a2.filterUserAttributes(e2); + A.attr(D({ padding: 8, r: 2 }, w2)); + let p2, G2, R; + O || (w2 = D({ fill: "#f7f7f7", stroke: "#cccccc", "stroke-width": 1 }, w2), q2 = D(w2, { fill: "#e6e6e6" }, a2.filterUserAttributes(q2 || c2.hover || {})), p2 = q2.style, delete q2.style, J = D(w2, { fill: "#e6e9ff", style: { + color: "#000000", + fontWeight: "bold" + } }, a2.filterUserAttributes(J || c2.select || {})), G2 = J.style, delete J.style, g2 = D(w2, { style: { color: "#cccccc" } }, a2.filterUserAttributes(g2 || c2.disabled || {})), R = g2.style, delete g2.style); + F(A.element, m ? "mouseover" : "mouseenter", function() { + N !== 3 && A.setState(1); + }); + F(A.element, m ? "mouseout" : "mouseleave", function() { + N !== 3 && A.setState(N); + }); + A.setState = function(b2) { + b2 !== 1 && (A.state = N = b2); + A.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-" + [ + "normal", + "hover", + "pressed", + "disabled" + ][b2 || 0]); + O || (A.attr([w2, q2, J, g2][b2 || 0]), b2 = [l3, p2, G2, R][b2 || 0], n3(b2) && A.css(b2)); + }; + O || (A.attr(w2).css(b({ cursor: "default" }, l3)), h3 && A.text.css({ pointerEvents: "none" })); + return A.on("touchstart", (b2) => b2.stopPropagation()).on("click", function(b2) { + N !== 3 && k2.call(A, b2); + }); + } + crispLine(b2, c2, f2 = "round") { + const d2 = b2[0], a3 = b2[1]; + q(d2[1]) && d2[1] === a3[1] && (d2[1] = a3[1] = Math[f2](d2[1]) - c2 % 2 / 2); + q(d2[2]) && d2[2] === a3[2] && (d2[2] = a3[2] = Math[f2](d2[2]) + c2 % 2 / 2); + return b2; + } + path(c2) { + const d2 = this.styledMode ? {} : { fill: "none" }; + f(c2) ? d2.d = c2 : n3(c2) && b(d2, c2); + return this.createElement("path").attr(d2); + } + circle(b2, c2, f2) { + b2 = n3(b2) ? b2 : typeof b2 === "undefined" ? {} : { x: b2, y: c2, r: f2 }; + c2 = this.createElement("circle"); + c2.xSetter = c2.ySetter = function(b3, c3, f3) { + f3.setAttribute("c" + c3, b3); + }; + return c2.attr(b2); + } + arc(b2, c2, f2, d2, a3, k2) { + n3(b2) ? (d2 = b2, c2 = d2.y, f2 = d2.r, b2 = d2.x) : d2 = { innerR: d2, start: a3, end: k2 }; + b2 = this.symbol("arc", b2, c2, f2, f2, d2); + b2.r = f2; + return b2; + } + rect(c2, f2, a3, k2, e2, q2) { + c2 = n3(c2) ? c2 : typeof c2 === "undefined" ? {} : { x: c2, y: f2, r: e2, width: Math.max(a3 || 0, 0), height: Math.max(k2 || 0, 0) }; + const A = this.createElement("rect"); + this.styledMode || (typeof q2 !== "undefined" && (c2["stroke-width"] = q2, b(c2, A.crisp(c2))), c2.fill = "none"); + A.rSetter = function(b2, c3, f3) { + A.r = b2; + d(f3, { rx: b2, ry: b2 }); + }; + A.rGetter = function() { + return A.r || 0; + }; + return A.attr(c2); + } + roundedRect(b2) { + return this.symbol("roundedRect").attr(b2); + } + setSize(b2, c2, f2) { + this.width = b2; + this.height = c2; + this.boxWrapper.animate({ width: b2, height: c2 }, { step: function() { + this.attr({ viewBox: "0 0 " + this.attr("width") + " " + this.attr("height") }); + }, duration: K(f2, true) ? void 0 : 0 }); + this.alignElements(); + } + g(b2) { + const c2 = this.createElement("g"); + return b2 ? c2.attr({ "class": "highcharts-" + b2 }) : c2; + } + image(b2, f2, d2, a3, k2, n4) { + const A = { preserveAspectRatio: "none" }; + c(f2) && (A.x = f2); + c(d2) && (A.y = d2); + c(a3) && (A.width = a3); + c(k2) && (A.height = k2); + const e2 = this.createElement("image").attr(A); + f2 = function(c2) { + e2.attr({ href: b2 }); + n4.call(e2, c2); + }; + n4 ? (e2.attr({ href: "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" }), d2 = new E.Image(), F(d2, "load", f2), d2.src = b2, d2.complete && f2({})) : e2.attr({ href: b2 }); + return e2; + } + symbol(c2, f2, a3, n4, e2, g2) { + const A = this, h3 = /^url\((.*?)\)$/, O = h3.test(c2), m2 = !O && (this.symbols[c2] ? c2 : "circle"), l3 = m2 && this.symbols[m2]; + let D2, G2, P2, t2; + if (l3) + typeof f2 === "number" && (G2 = l3.call(this.symbols, Math.round(f2 || 0), Math.round(a3 || 0), n4 || 0, e2 || 0, g2)), D2 = this.path(G2), A.styledMode || D2.attr("fill", "none"), b(D2, { symbolName: m2 || void 0, x: f2, y: a3, width: n4, height: e2 }), g2 && b(D2, g2); + else if (O) { + P2 = c2.match(h3)[1]; + const b2 = D2 = this.image(P2); + b2.imgwidth = K(g2 && g2.width, w[P2] && w[P2].width); + b2.imgheight = K(g2 && g2.height, w[P2] && w[P2].height); + t2 = (b3) => b3.attr({ width: b3.width, height: b3.height }); + ["width", "height"].forEach(function(c3) { + b2[c3 + "Setter"] = function(b3, c4) { + this[c4] = b3; + const { + alignByTranslate: f3, + element: a4, + width: k2, + height: A2, + imgwidth: n5, + imgheight: e3 + } = this; + b3 = this["img" + c4]; + if (q(b3)) { + let J = 1; + g2 && g2.backgroundSize === "within" && k2 && A2 ? (J = Math.min(k2 / n5, A2 / e3), d(a4, { width: Math.round(n5 * J), height: Math.round(e3 * J) })) : a4 && a4.setAttribute(c4, b3); + f3 || this.translate(((k2 || 0) - n5 * J) / 2, ((A2 || 0) - e3 * J) / 2); + } + }; + }); + q(f2) && b2.attr({ x: f2, y: a3 }); + b2.isImg = true; + q(b2.imgwidth) && q(b2.imgheight) ? t2(b2) : (b2.attr({ width: 0, height: 0 }), k("img", { onload: function() { + const c3 = v[A.chartIndex]; + this.width === 0 && (r(this, { position: "absolute", top: "-999em" }), p.body.appendChild(this)); + w[P2] = { + width: this.width, + height: this.height + }; + b2.imgwidth = this.width; + b2.imgheight = this.height; + b2.element && t2(b2); + this.parentNode && this.parentNode.removeChild(this); + A.imgCount--; + if (!A.imgCount && c3 && !c3.hasLoaded) + c3.onload(); + }, src: P2 }), this.imgCount++); + } + return D2; + } + clipRect(b2, c2, f2, d2) { + const a3 = T() + "-", k2 = this.createElement("clipPath").attr({ id: a3 }).add(this.defs); + b2 = this.rect(b2, c2, f2, d2, 0).add(k2); + b2.id = a3; + b2.clipPath = k2; + b2.count = 0; + return b2; + } + text(b2, c2, f2, d2) { + const a3 = {}; + if (d2 && (this.allowHTML || !this.forExport)) + return this.html(b2, c2, f2); + a3.x = Math.round(c2 || 0); + f2 && (a3.y = Math.round(f2)); + q(b2) && (a3.text = b2); + b2 = this.createElement("text").attr(a3); + if (!d2 || this.forExport && !this.allowHTML) + b2.xSetter = function(b3, c3, f3) { + const d3 = f3.getElementsByTagName("tspan"), a4 = f3.getAttribute(c3); + for (let f4 = 0, k2; f4 < d3.length; f4++) + k2 = d3[f4], k2.getAttribute(c3) === a4 && k2.setAttribute(c3, b3); + f3.setAttribute(c3, b3); + }; + return b2; + } + fontMetrics(b2) { + b2 = x(C.prototype.getStyle.call(b2, "font-size") || 0); + const c2 = 24 > b2 ? b2 + 3 : Math.round(1.2 * b2); + return { h: c2, b: Math.round(0.8 * c2), f: b2 }; + } + rotCorr(b2, c2, f2) { + let d2 = b2; + c2 && f2 && (d2 = Math.max(d2 * Math.cos(c2 * l2), 4)); + return { x: -b2 / 3 * Math.sin(c2 * l2), y: d2 }; + } + pathToSegments(b2) { + const f2 = [], d2 = [], a3 = { A: 8, C: 7, H: 2, L: 3, M: 3, Q: 5, S: 5, T: 3, V: 2 }; + for (let k2 = 0; k2 < b2.length; k2++) + P(d2[0]) && c(b2[k2]) && d2.length === a3[d2[0].toUpperCase()] && b2.splice(k2, 0, d2[0].replace("M", "L").replace("m", "l")), typeof b2[k2] === "string" && (d2.length && f2.push(d2.slice(0)), d2.length = 0), d2.push(b2[k2]); + f2.push(d2.slice(0)); + return f2; + } + label(b2, c2, f2, d2, a3, k2, n4, e2, q2) { + return new z(this, b2, c2, f2, d2, a3, k2, n4, e2, q2); + } + alignElements() { + this.alignedObjects.forEach((b2) => b2.align()); + } + } + b(V.prototype, { + Element: C, + SVG_NS: e, + escapes: { "&": "&", "<": "<", ">": ">", "'": "'", '"': """ }, + symbols: H, + draw: g + }); + L.registerRendererType("svg", V, true); + ""; + return V; + }); + M(a, "Core/Renderer/HTML/HTMLElement.js", [a["Core/Globals.js"], a["Core/Renderer/SVG/SVGElement.js"], a["Core/Utilities.js"]], function(a2, y, I) { + const { isFirefox: x, isMS: C, isWebKit: z, win: H } = a2, { css: B, defined: u, extend: v, pick: l2, pInt: p } = I, t = []; + class m extends y { + static compose(a3) { + if (I.pushUnique(t, a3)) { + const g = m.prototype, e = a3.prototype; + e.getSpanCorrection = g.getSpanCorrection; + e.htmlCss = g.htmlCss; + e.htmlGetBBox = g.htmlGetBBox; + e.htmlUpdateTransform = g.htmlUpdateTransform; + e.setSpanRotation = g.setSpanRotation; + } + return a3; + } + getSpanCorrection(a3, g, e) { + this.xCorr = -a3 * e; + this.yCorr = -g; + } + htmlCss(a3) { + const g = this.element.tagName === "SPAN" && a3 && "width" in a3, e = l2(g && a3.width, void 0); + let h; + g && (delete a3.width, this.textWidth = e, h = true); + a3 && a3.textOverflow === "ellipsis" && (a3.whiteSpace = "nowrap", a3.overflow = "hidden"); + this.styles = v(this.styles, a3); + B(this.element, a3); + h && this.htmlUpdateTransform(); + return this; + } + htmlGetBBox() { + const a3 = this.element; + return { x: a3.offsetLeft, y: a3.offsetTop, width: a3.offsetWidth, height: a3.offsetHeight }; + } + htmlUpdateTransform() { + if (this.added) { + var a3 = this.renderer, g = this.element, e = this.x || 0, m2 = this.y || 0, l3 = this.textAlign || "left", t2 = { left: 0, center: 0.5, right: 1 }[l3], d = this.styles, k = d && d.whiteSpace; + B(g, { marginLeft: this.translateX || 0, marginTop: this.translateY || 0 }); + if (g.tagName === "SPAN") { + d = this.rotation; + const q = this.textWidth && p(this.textWidth), h = [d, l3, g.innerHTML, this.textWidth, this.textAlign].join(); + let b = false; + if (q !== this.oldTextWidth) { + if (this.textPxLength) + var r = this.textPxLength; + else + B(g, { width: "", whiteSpace: k || "nowrap" }), r = g.offsetWidth; + (q > this.oldTextWidth || r > q) && (/[ \-]/.test(g.textContent || g.innerText) || g.style.textOverflow === "ellipsis") && (B(g, { width: r > q || d ? q + "px" : "auto", display: "block", whiteSpace: k || "normal" }), this.oldTextWidth = q, b = true); + } + this.hasBoxWidthChanged = b; + h !== this.cTT && (a3 = a3.fontMetrics(g).b, !u(d) || d === (this.oldRotation || 0) && l3 === this.oldAlign || this.setSpanRotation(d, t2, a3), this.getSpanCorrection(!u(d) && this.textPxLength || g.offsetWidth, a3, t2, d, l3)); + B(g, { left: e + (this.xCorr || 0) + "px", top: m2 + (this.yCorr || 0) + "px" }); + this.cTT = h; + this.oldRotation = d; + this.oldAlign = l3; + } + } else + this.alignOnAdd = true; + } + setSpanRotation(a3, g, e) { + const h = {}, m2 = C && !/Edge/.test(H.navigator.userAgent) ? "-ms-transform" : z ? "-webkit-transform" : x ? "MozTransform" : H.opera ? "-o-transform" : void 0; + m2 && (h[m2] = h.transform = "rotate(" + a3 + "deg)", h[m2 + (x ? "Origin" : "-origin")] = h.transformOrigin = 100 * g + "% " + e + "px", B(this.element, h)); + } + } + return m; + }); + M(a, "Core/Renderer/HTML/HTMLRenderer.js", [ + a["Core/Renderer/HTML/AST.js"], + a["Core/Renderer/SVG/SVGElement.js"], + a["Core/Renderer/SVG/SVGRenderer.js"], + a["Core/Utilities.js"] + ], function(a2, y, I, L) { + const { attr: x, createElement: z, extend: H, pick: B } = L, u = []; + class v extends I { + static compose(a3) { + L.pushUnique(u, a3) && (a3.prototype.html = v.prototype.html); + return a3; + } + html(l2, p, t) { + const m = this.createElement("span"), h = m.element, g = m.renderer, e = function(a3, e2) { + ["opacity", "visibility"].forEach(function(g2) { + a3[g2 + "Setter"] = function(d, k, r) { + const q = a3.div ? a3.div.style : e2; + y.prototype[g2 + "Setter"].call(this, d, k, r); + q && (q[k] = d); + }; + }); + a3.addedSetters = true; + }; + m.textSetter = function(e2) { + e2 !== this.textStr && (delete this.bBox, delete this.oldTextWidth, a2.setElementHTML(this.element, B(e2, "")), this.textStr = e2, m.doTransform = true); + }; + e(m, m.element.style); + m.xSetter = m.ySetter = m.alignSetter = m.rotationSetter = function(a3, e2) { + e2 === "align" ? m.alignValue = m.textAlign = a3 : m[e2] = a3; + m.doTransform = true; + }; + m.afterSetters = function() { + this.doTransform && (this.htmlUpdateTransform(), this.doTransform = false); + }; + m.attr({ text: l2, x: Math.round(p), y: Math.round(t) }).css({ position: "absolute" }); + g.styledMode || m.css({ fontFamily: this.style.fontFamily, fontSize: this.style.fontSize }); + h.style.whiteSpace = "nowrap"; + m.css = m.htmlCss; + m.add = function(a3) { + const l3 = g.box.parentNode, w = []; + let d; + if (this.parentGroup = a3) { + if (d = a3.div, !d) { + for (; a3; ) + w.push(a3), a3 = a3.parentGroup; + w.reverse().forEach(function(a4) { + function k(f, c) { + a4[c] = f; + c === "translateX" ? b.left = f + "px" : b.top = f + "px"; + a4.doTransform = true; + } + const q = x(a4.element, "class"), g2 = a4.styles || {}; + d = a4.div = a4.div || z("div", q ? { className: q } : void 0, { position: "absolute", left: (a4.translateX || 0) + "px", top: (a4.translateY || 0) + "px", display: a4.display, opacity: a4.opacity, visibility: a4.visibility }, d || l3); + const b = d.style; + H(a4, { classSetter: function(b2) { + return function(c) { + this.element.setAttribute("class", c); + b2.className = c; + }; + }(d), css: function(f) { + m.css.call(a4, f); + ["cursor", "pointerEvents"].forEach((c) => { + f[c] && (b[c] = f[c]); + }); + return a4; + }, on: function() { + w[0].div && m.on.apply({ element: w[0].div, onEvents: a4.onEvents }, arguments); + return a4; + }, translateXSetter: k, translateYSetter: k }); + a4.addedSetters || e(a4); + a4.css(g2); + }); + } + } else + d = l3; + d.appendChild(h); + m.added = true; + m.alignOnAdd && m.htmlUpdateTransform(); + return m; + }; + return m; + } + } + return v; + }); + M(a, "Core/Axis/AxisDefaults.js", [], function() { + var a2; + (function(a3) { + a3.defaultXAxisOptions = { + alignTicks: true, + allowDecimals: void 0, + panningEnabled: true, + zIndex: 2, + zoomEnabled: true, + dateTimeLabelFormats: { millisecond: { main: "%H:%M:%S.%L", range: false }, second: { main: "%H:%M:%S", range: false }, minute: { main: "%H:%M", range: false }, hour: { main: "%H:%M", range: false }, day: { main: "%e %b" }, week: { main: "%e %b" }, month: { main: "%b '%y" }, year: { main: "%Y" } }, + endOnTick: false, + gridLineDashStyle: "Solid", + gridZIndex: 1, + labels: { autoRotation: void 0, autoRotationLimit: 80, distance: 15, enabled: true, indentation: 10, overflow: "justify", padding: 5, reserveSpace: void 0, rotation: void 0, staggerLines: 0, step: 0, useHTML: false, zIndex: 7, style: { color: "#333333", cursor: "default", fontSize: "0.8em" } }, + maxPadding: 0.01, + minorGridLineDashStyle: "Solid", + minorTickLength: 2, + minorTickPosition: "outside", + minorTicksPerMajor: 5, + minPadding: 0.01, + offset: void 0, + opposite: false, + reversed: void 0, + reversedStacks: false, + showEmpty: true, + showFirstLabel: true, + showLastLabel: true, + startOfWeek: 1, + startOnTick: false, + tickLength: 10, + tickPixelInterval: 100, + tickmarkPlacement: "between", + tickPosition: "outside", + title: { align: "middle", rotation: 0, useHTML: false, x: 0, y: 0, style: { color: "#666666", fontSize: "0.8em" } }, + type: "linear", + uniqueNames: true, + visible: true, + minorGridLineColor: "#f2f2f2", + minorGridLineWidth: 1, + minorTickColor: "#999999", + lineColor: "#333333", + lineWidth: 1, + gridLineColor: "#e6e6e6", + gridLineWidth: void 0, + tickColor: "#333333" + }; + a3.defaultYAxisOptions = { + reversedStacks: true, + endOnTick: true, + maxPadding: 0.05, + minPadding: 0.05, + tickPixelInterval: 72, + showLastLabel: true, + labels: { x: void 0 }, + startOnTick: true, + title: { rotation: 270, text: "Values" }, + stackLabels: { animation: {}, allowOverlap: false, enabled: false, crop: true, overflow: "justify", formatter: function() { + const { numberFormatter: a4 } = this.axis.chart; + return a4(this.total || 0, -1); + }, style: { color: "#000000", fontSize: "0.7em", fontWeight: "bold", textOutline: "1px contrast" } }, + gridLineWidth: 1, + lineWidth: 0 + }; + a3.defaultLeftAxisOptions = { title: { rotation: 270 } }; + a3.defaultRightAxisOptions = { title: { rotation: 90 } }; + a3.defaultBottomAxisOptions = { labels: { autoRotation: [-45] }, margin: 15, title: { rotation: 0 } }; + a3.defaultTopAxisOptions = { labels: { autoRotation: [-45] }, margin: 15, title: { rotation: 0 } }; + })(a2 || (a2 = {})); + return a2; + }); + M(a, "Core/Foundation.js", [a["Core/Utilities.js"]], function(a2) { + const { addEvent: x, isFunction: I, objectEach: L, removeEvent: C } = a2; + var z; + (function(a3) { + a3.registerEventOptions = function(a4, u) { + a4.eventOptions = a4.eventOptions || {}; + L(u.events, function(v, l2) { + a4.eventOptions[l2] !== v && (a4.eventOptions[l2] && (C(a4, l2, a4.eventOptions[l2]), delete a4.eventOptions[l2]), I(v) && (a4.eventOptions[l2] = v, x(a4, l2, v, { order: 0 }))); + }); + }; + })(z || (z = {})); + return z; + }); + M(a, "Core/Axis/Tick.js", [a["Core/Templating.js"], a["Core/Globals.js"], a["Core/Utilities.js"]], function(a2, y, I) { + const { deg2rad: x } = y, { clamp: C, correctFloat: z, defined: H, destroyObjectProperties: B, extend: u, fireEvent: v, isNumber: l2, merge: p, objectEach: t, pick: m } = I; + class h { + constructor(a3, e, h3, m2, l3) { + this.isNewLabel = this.isNew = true; + this.axis = a3; + this.pos = e; + this.type = h3 || ""; + this.parameters = l3 || {}; + this.tickmarkOffset = this.parameters.tickmarkOffset; + this.options = this.parameters.options; + v(this, "init"); + h3 || m2 || this.addLabel(); + } + addLabel() { + const g = this, e = g.axis; + var h3 = e.options; + const p2 = e.chart; + var t2 = e.categories; + const d = e.logarithmic, k = e.names, r = g.pos, q = m(g.options && g.options.labels, h3.labels); + var G = e.tickPositions; + const b = r === G[0], f = r === G[G.length - 1], c = (!q.step || q.step === 1) && e.tickInterval === 1; + G = G.info; + let n3 = g.label, P, D, K; + t2 = this.parameters.category || (t2 ? m(t2[r], k[r], r) : r); + d && l2(t2) && (t2 = z(d.lin2log(t2))); + e.dateTime && (G ? (D = p2.time.resolveDTLFormat(h3.dateTimeLabelFormats[!h3.grid && G.higherRanks[r] || G.unitName]), P = D.main) : l2(t2) && (P = e.dateTime.getXDateFormat(t2, h3.dateTimeLabelFormats || {}))); + g.isFirst = b; + g.isLast = f; + const x2 = { axis: e, chart: p2, dateTimeLabelFormat: P, isFirst: b, isLast: f, pos: r, tick: g, tickPositionInfo: G, value: t2 }; + v(this, "labelFormat", x2); + const B2 = (b2) => q.formatter ? q.formatter.call(b2, b2) : q.format ? (b2.text = e.defaultLabelFormatter.call(b2, b2), a2.format(q.format, b2, p2)) : e.defaultLabelFormatter.call(b2, b2); + h3 = B2.call(x2, x2); + const y2 = D && D.list; + g.shortenLabel = y2 ? function() { + for (K = 0; K < y2.length; K++) + if (u(x2, { dateTimeLabelFormat: y2[K] }), n3.attr({ text: B2.call(x2, x2) }), n3.getBBox().width < e.getSlotWidth(g) - 2 * q.padding) + return; + n3.attr({ text: "" }); + } : void 0; + c && e._addedPlotLB && g.moveLabel(h3, q); + H(n3) || g.movedLabel ? n3 && n3.textStr !== h3 && !c && (!n3.textWidth || q.style.width || n3.styles.width || n3.css({ width: null }), n3.attr({ text: h3 }), n3.textPxLength = n3.getBBox().width) : (g.label = n3 = g.createLabel({ x: 0, y: 0 }, h3, q), g.rotation = 0); + } + createLabel(a3, e, h3) { + const g = this.axis, m2 = g.chart; + if (a3 = H(e) && h3.enabled ? m2.renderer.text(e, a3.x, a3.y, h3.useHTML).add(g.labelGroup) : null) + m2.styledMode || a3.css(p(h3.style)), a3.textPxLength = a3.getBBox().width; + return a3; + } + destroy() { + B(this, this.axis); + } + getPosition(a3, e, h3, m2) { + const g = this.axis, d = g.chart, k = m2 && d.oldChartHeight || d.chartHeight; + a3 = { x: a3 ? z(g.translate(e + h3, void 0, void 0, m2) + g.transB) : g.left + g.offset + (g.opposite ? (m2 && d.oldChartWidth || d.chartWidth) - g.right - g.left : 0), y: a3 ? k - g.bottom + g.offset - (g.opposite ? g.height : 0) : z(k - g.translate(e + h3, void 0, void 0, m2) - g.transB) }; + a3.y = C(a3.y, -1e5, 1e5); + v(this, "afterGetPosition", { pos: a3 }); + return a3; + } + getLabelPosition(a3, e, h3, l3, p2, d, k, r) { + const q = this.axis, g = q.transA, b = q.isLinked && q.linkedParent ? q.linkedParent.reversed : q.reversed, f = q.staggerLines, c = q.tickRotCorr || { x: 0, y: 0 }, n3 = l3 || q.reserveSpaceDefault ? 0 : -q.labelOffset * (q.labelAlign === "center" ? 0.5 : 1), w = p2.distance, D = {}; + h3 = q.side === 0 ? h3.rotation ? -w : -h3.getBBox().height : q.side === 2 ? c.y + w : Math.cos(h3.rotation * x) * (c.y - h3.getBBox(false, 0).height / 2); + H(p2.y) && (h3 = q.side === 0 && q.horiz ? p2.y + h3 : p2.y); + a3 = a3 + m(p2.x, [0, 1, 0, -1][q.side] * w) + n3 + c.x - (d && l3 ? d * g * (b ? -1 : 1) : 0); + e = e + h3 - (d && !l3 ? d * g * (b ? 1 : -1) : 0); + f && (l3 = k / (r || 1) % f, q.opposite && (l3 = f - l3 - 1), e += q.labelOffset / f * l3); + D.x = a3; + D.y = Math.round(e); + v(this, "afterGetLabelPosition", { pos: D, tickmarkOffset: d, index: k }); + return D; + } + getLabelSize() { + return this.label ? this.label.getBBox()[this.axis.horiz ? "height" : "width"] : 0; + } + getMarkPath(a3, e, h3, m2, l3, d) { + return d.crispLine([["M", a3, e], ["L", a3 + (l3 ? 0 : -h3), e + (l3 ? h3 : 0)]], m2); + } + handleOverflow(a3) { + const e = this.axis, g = e.options.labels, h3 = a3.x; + var l3 = e.chart.chartWidth, d = e.chart.spacing; + const k = m(e.labelLeft, Math.min(e.pos, d[3])); + d = m(e.labelRight, Math.max(e.isRadial ? 0 : e.pos + e.len, l3 - d[1])); + const r = this.label, q = this.rotation, p2 = { left: 0, center: 0.5, right: 1 }[e.labelAlign || r.attr("align")], b = r.getBBox().width, f = e.getSlotWidth(this), c = {}; + let n3 = f, t2 = 1, D; + if (q || g.overflow !== "justify") + 0 > q && h3 - p2 * b < k ? D = Math.round(h3 / Math.cos(q * x) - k) : 0 < q && h3 + p2 * b > d && (D = Math.round((l3 - h3) / Math.cos(q * x))); + else if (l3 = h3 + (1 - p2) * b, h3 - p2 * b < k ? n3 = a3.x + n3 * (1 - p2) - k : l3 > d && (n3 = d - a3.x + n3 * p2, t2 = -1), n3 = Math.min(f, n3), n3 < f && e.labelAlign === "center" && (a3.x += t2 * (f - n3 - p2 * (f - Math.min(b, n3)))), b > n3 || e.autoRotation && (r.styles || {}).width) + D = n3; + D && (this.shortenLabel ? this.shortenLabel() : (c.width = Math.floor(D) + "px", (g.style || {}).textOverflow || (c.textOverflow = "ellipsis"), r.css(c))); + } + moveLabel(a3, e) { + const g = this; + var h3 = g.label; + const m2 = g.axis; + let d = false; + h3 && h3.textStr === a3 ? (g.movedLabel = h3, d = true, delete g.label) : t(m2.ticks, function(k) { + d || k.isNew || k === g || !k.label || k.label.textStr !== a3 || (g.movedLabel = k.label, d = true, k.labelPos = g.movedLabel.xy, delete k.label); + }); + d || !g.labelPos && !h3 || (h3 = g.labelPos || h3.xy, g.movedLabel = g.createLabel(h3, a3, e), g.movedLabel && g.movedLabel.attr({ opacity: 0 })); + } + render(a3, e, h3) { + var g = this.axis, l3 = g.horiz, d = this.pos, k = m(this.tickmarkOffset, g.tickmarkOffset); + d = this.getPosition(l3, d, k, e); + k = d.x; + const r = d.y; + g = l3 && k === g.pos + g.len || !l3 && r === g.pos ? -1 : 1; + l3 = m(h3, this.label && this.label.newOpacity, 1); + h3 = m(h3, 1); + this.isActive = true; + this.renderGridLine(e, h3, g); + this.renderMark(d, h3, g); + this.renderLabel(d, e, l3, a3); + this.isNew = false; + v(this, "afterRender"); + } + renderGridLine(a3, e, h3) { + const g = this.axis, l3 = g.options, d = {}, k = this.pos, r = this.type, q = m(this.tickmarkOffset, g.tickmarkOffset), p2 = g.chart.renderer; + let b = this.gridLine, f = l3.gridLineWidth, c = l3.gridLineColor, n3 = l3.gridLineDashStyle; + this.type === "minor" && (f = l3.minorGridLineWidth, c = l3.minorGridLineColor, n3 = l3.minorGridLineDashStyle); + b || (g.chart.styledMode || (d.stroke = c, d["stroke-width"] = f || 0, d.dashstyle = n3), r || (d.zIndex = 1), a3 && (e = 0), this.gridLine = b = p2.path().attr(d).addClass("highcharts-" + (r ? r + "-" : "") + "grid-line").add(g.gridGroup)); + if (b && (h3 = g.getPlotLinePath({ value: k + q, lineWidth: b.strokeWidth() * h3, force: "pass", old: a3, acrossPanes: false }))) + b[a3 || this.isNew ? "attr" : "animate"]({ d: h3, opacity: e }); + } + renderMark(a3, e, h3) { + const g = this.axis; + var l3 = g.options; + const d = g.chart.renderer, k = this.type, r = g.tickSize(k ? k + "Tick" : "tick"), q = a3.x; + a3 = a3.y; + const p2 = m(l3[k !== "minor" ? "tickWidth" : "minorTickWidth"], !k && g.isXAxis ? 1 : 0); + l3 = l3[k !== "minor" ? "tickColor" : "minorTickColor"]; + let b = this.mark; + const f = !b; + r && (g.opposite && (r[0] = -r[0]), b || (this.mark = b = d.path().addClass("highcharts-" + (k ? k + "-" : "") + "tick").add(g.axisGroup), g.chart.styledMode || b.attr({ stroke: l3, "stroke-width": p2 })), b[f ? "attr" : "animate"]({ d: this.getMarkPath(q, a3, r[0], b.strokeWidth() * h3, g.horiz, d), opacity: e })); + } + renderLabel(a3, e, h3, p2) { + var g = this.axis; + const d = g.horiz, k = g.options, r = this.label, q = k.labels, t2 = q.step; + g = m(this.tickmarkOffset, g.tickmarkOffset); + const b = a3.x; + a3 = a3.y; + let f = true; + r && l2(b) && (r.xy = a3 = this.getLabelPosition(b, a3, r, d, q, g, p2, t2), this.isFirst && !this.isLast && !k.showFirstLabel || this.isLast && !this.isFirst && !k.showLastLabel ? f = false : !d || q.step || q.rotation || e || h3 === 0 || this.handleOverflow(a3), t2 && p2 % t2 && (f = false), f && l2(a3.y) ? (a3.opacity = h3, r[this.isNewLabel ? "attr" : "animate"](a3).show(true), this.isNewLabel = false) : (r.hide(), this.isNewLabel = true)); + } + replaceMovedLabel() { + const a3 = this.label, e = this.axis; + a3 && !this.isNew && (a3.animate({ opacity: 0 }, void 0, a3.destroy), delete this.label); + e.isDirty = true; + this.label = this.movedLabel; + delete this.movedLabel; + } + } + ""; + return h; + }); + M(a, "Core/Axis/Axis.js", [a["Core/Animation/AnimationUtilities.js"], a["Core/Axis/AxisDefaults.js"], a["Core/Color/Color.js"], a["Core/Defaults.js"], a["Core/Foundation.js"], a["Core/Globals.js"], a["Core/Axis/Tick.js"], a["Core/Utilities.js"]], function(a2, y, I, L, C, z, H, B) { + const { animObject: u } = a2, { defaultOptions: v } = L, { registerEventOptions: l2 } = C, { deg2rad: p } = z, { arrayMax: t, arrayMin: m, clamp: h, correctFloat: g, defined: e, destroyObjectProperties: w, erase: x, error: F, extend: d, fireEvent: k, getClosestDistance: r, insertItem: q, isArray: G, isNumber: b, isString: f, merge: c, normalizeTickInterval: n3, objectEach: P, pick: D, relativeLength: K, removeEvent: X, splat: T, syncTimeout: Z } = B, V = (b2, c2) => n3(c2, void 0, void 0, D(b2.options.allowDecimals, 0.5 > c2 || b2.tickAmount !== void 0), !!b2.tickAmount); + class Y { + constructor(b2, c2, f2) { + this.zoomEnabled = this.width = this.visible = this.userOptions = this.translationSlope = this.transB = this.transA = this.top = this.ticks = this.tickRotCorr = this.tickPositions = this.tickmarkOffset = this.tickInterval = this.tickAmount = this.side = this.series = this.right = this.positiveValuesOnly = this.pos = this.pointRangePadding = this.pointRange = this.plotLinesAndBandsGroups = this.plotLinesAndBands = this.paddedTicks = this.overlap = this.options = this.offset = this.names = this.minPixelPadding = this.minorTicks = this.minorTickInterval = this.min = this.maxLabelLength = this.max = this.len = this.left = this.labelFormatter = this.labelEdge = this.isLinked = this.index = this.height = this.hasVisibleSeries = this.hasNames = this.eventOptions = this.coll = this.closestPointRange = this.chart = this.bottom = this.alternateBands = void 0; + this.init(b2, c2, f2); + } + init(c2, f2, a3 = this.coll) { + const d2 = a3 === "xAxis"; + this.chart = c2; + this.horiz = this.isZAxis || (c2.inverted ? !d2 : d2); + this.isXAxis = d2; + this.coll = a3; + k(this, "init", { userOptions: f2 }); + this.opposite = D(f2.opposite, this.opposite); + this.side = D(f2.side, this.side, this.horiz ? this.opposite ? 0 : 2 : this.opposite ? 1 : 3); + this.setOptions(f2); + a3 = this.options; + const A = a3.labels, n4 = a3.type; + this.userOptions = f2; + this.minPixelPadding = 0; + this.reversed = D(a3.reversed, this.reversed); + this.visible = a3.visible; + this.zoomEnabled = a3.zoomEnabled; + this.hasNames = n4 === "category" || a3.categories === true; + this.categories = a3.categories || (this.hasNames ? [] : void 0); + this.names || (this.names = [], this.names.keys = {}); + this.plotLinesAndBandsGroups = {}; + this.positiveValuesOnly = !!this.logarithmic; + this.isLinked = e(a3.linkedTo); + this.ticks = {}; + this.labelEdge = []; + this.minorTicks = {}; + this.plotLinesAndBands = []; + this.alternateBands = {}; + this.len = 0; + this.minRange = this.userMinRange = a3.minRange || a3.maxZoom; + this.range = a3.range; + this.offset = a3.offset || 0; + this.min = this.max = null; + f2 = D(a3.crosshair, T(c2.options.tooltip.crosshairs)[d2 ? 0 : 1]); + this.crosshair = f2 === true ? {} : f2; + c2.axes.indexOf(this) === -1 && (d2 ? c2.axes.splice(c2.xAxis.length, 0, this) : c2.axes.push(this), q(this, c2[this.coll])); + c2.orderItems(this.coll); + this.series = this.series || []; + c2.inverted && !this.isZAxis && d2 && typeof this.reversed === "undefined" && (this.reversed = true); + this.labelRotation = b(A.rotation) ? A.rotation : void 0; + l2(this, a3); + k(this, "afterInit"); + } + setOptions(b2) { + this.options = c(y.defaultXAxisOptions, this.coll === "yAxis" && y.defaultYAxisOptions, [y.defaultTopAxisOptions, y.defaultRightAxisOptions, y.defaultBottomAxisOptions, y.defaultLeftAxisOptions][this.side], c(v[this.coll], b2)); + k(this, "afterSetOptions", { userOptions: b2 }); + } + defaultLabelFormatter(c2) { + var f2 = this.axis; + ({ numberFormatter: c2 } = this.chart); + const a3 = b(this.value) ? this.value : NaN, d2 = f2.chart.time, k2 = this.dateTimeLabelFormat; + var n4 = v.lang; + const A = n4.numericSymbols; + n4 = n4.numericSymbolMagnitude || 1e3; + const e2 = f2.logarithmic ? Math.abs(a3) : f2.tickInterval; + let q2 = A && A.length, g2; + if (f2.categories) + g2 = `${this.value}`; + else if (k2) + g2 = d2.dateFormat(k2, a3); + else if (q2 && 1e3 <= e2) + for (; q2-- && typeof g2 === "undefined"; ) + f2 = Math.pow(n4, q2 + 1), e2 >= f2 && 10 * a3 % f2 === 0 && A[q2] !== null && a3 !== 0 && (g2 = c2(a3 / f2, -1) + A[q2]); + typeof g2 === "undefined" && (g2 = 1e4 <= Math.abs(a3) ? c2(a3, -1) : c2(a3, -1, void 0, "")); + return g2; + } + getSeriesExtremes() { + const c2 = this, f2 = c2.chart; + let a3; + k(this, "getSeriesExtremes", null, function() { + c2.hasVisibleSeries = false; + c2.dataMin = c2.dataMax = c2.threshold = null; + c2.softThreshold = !c2.isXAxis; + c2.series.forEach(function(d2) { + if (d2.visible || !f2.options.chart.ignoreHiddenSeries) { + var k2 = d2.options; + let f3 = k2.threshold, n4, A; + c2.hasVisibleSeries = true; + c2.positiveValuesOnly && 0 >= f3 && (f3 = null); + if (c2.isXAxis) + (k2 = d2.xData) && k2.length && (k2 = c2.logarithmic ? k2.filter((b2) => 0 < b2) : k2, a3 = d2.getXExtremes(k2), n4 = a3.min, A = a3.max, b(n4) || n4 instanceof Date || (k2 = k2.filter(b), a3 = d2.getXExtremes(k2), n4 = a3.min, A = a3.max), k2.length && (c2.dataMin = Math.min(D(c2.dataMin, n4), n4), c2.dataMax = Math.max(D(c2.dataMax, A), A))); + else if (d2 = d2.applyExtremes(), b(d2.dataMin) && (n4 = d2.dataMin, c2.dataMin = Math.min(D(c2.dataMin, n4), n4)), b(d2.dataMax) && (A = d2.dataMax, c2.dataMax = Math.max(D(c2.dataMax, A), A)), e(f3) && (c2.threshold = f3), !k2.softThreshold || c2.positiveValuesOnly) + c2.softThreshold = false; + } + }); + }); + k(this, "afterGetSeriesExtremes"); + } + translate(c2, f2, a3, d2, k2, n4) { + const e2 = this.linkedParent || this, A = d2 && e2.old ? e2.old.min : e2.min; + if (!b(A)) + return NaN; + const q2 = e2.minPixelPadding; + k2 = (e2.isOrdinal || e2.brokenAxis && e2.brokenAxis.hasBreaks || e2.logarithmic && k2) && e2.lin2val; + let J = 1, h3 = 0; + d2 = d2 && e2.old ? e2.old.transA : e2.transA; + d2 || (d2 = e2.transA); + a3 && (J *= -1, h3 = e2.len); + e2.reversed && (J *= -1, h3 -= J * (e2.sector || e2.len)); + f2 ? (n4 = (c2 * J + h3 - q2) / d2 + A, k2 && (n4 = e2.lin2val(n4))) : (k2 && (c2 = e2.val2lin(c2)), c2 = J * (c2 - A) * d2, n4 = (e2.isRadial ? c2 : g(c2)) + h3 + J * q2 + (b(n4) ? d2 * n4 : 0)); + return n4; + } + toPixels(b2, c2) { + return this.translate(b2, false, !this.horiz, void 0, true) + (c2 ? 0 : this.pos); + } + toValue(b2, c2) { + return this.translate(b2 - (c2 ? 0 : this.pos), true, !this.horiz, void 0, true); + } + getPlotLinePath(c2) { + function f2(b2, c3, f3) { + t2 !== "pass" && (b2 < c3 || b2 > f3) && (t2 ? b2 = h(b2, c3, f3) : K2 = true); + return b2; + } + const a3 = this, d2 = a3.chart, n4 = a3.left, e2 = a3.top, A = c2.old, q2 = c2.value, g2 = c2.lineWidth, r2 = A && d2.oldChartHeight || d2.chartHeight, m2 = A && d2.oldChartWidth || d2.chartWidth, l3 = a3.transB; + let p2 = c2.translatedValue, t2 = c2.force, P2, w2, R, Q, K2; + c2 = { value: q2, lineWidth: g2, old: A, force: t2, acrossPanes: c2.acrossPanes, translatedValue: p2 }; + k(this, "getPlotLinePath", c2, function(c3) { + p2 = D(p2, a3.translate(q2, void 0, void 0, A)); + p2 = h(p2, -1e5, 1e5); + P2 = R = Math.round(p2 + l3); + w2 = Q = Math.round(r2 - p2 - l3); + b(p2) ? a3.horiz ? (w2 = e2, Q = r2 - a3.bottom, P2 = R = f2(P2, n4, n4 + a3.width)) : (P2 = n4, R = m2 - a3.right, w2 = Q = f2(w2, e2, e2 + a3.height)) : (K2 = true, t2 = false); + c3.path = K2 && !t2 ? null : d2.renderer.crispLine([["M", P2, w2], ["L", R, Q]], g2 || 1); + }); + return c2.path; + } + getLinearTickPositions(b2, c2, f2) { + const a3 = g(Math.floor(c2 / b2) * b2); + f2 = g(Math.ceil(f2 / b2) * b2); + const d2 = []; + let k2, n4; + g(a3 + b2) === a3 && (n4 = 20); + if (this.single) + return [c2]; + for (c2 = a3; c2 <= f2; ) { + d2.push(c2); + c2 = g(c2 + b2, n4); + if (c2 === k2) + break; + k2 = c2; + } + return d2; + } + getMinorTickInterval() { + const b2 = this.options; + return b2.minorTicks === true ? D(b2.minorTickInterval, "auto") : b2.minorTicks === false ? null : b2.minorTickInterval; + } + getMinorTickPositions() { + var b2 = this.options; + const c2 = this.tickPositions, f2 = this.minorTickInterval; + var a3 = this.pointRangePadding || 0; + const d2 = this.min - a3; + a3 = this.max + a3; + const k2 = a3 - d2; + let n4 = []; + if (k2 && k2 / f2 < this.len / 3) { + const k3 = this.logarithmic; + if (k3) + this.paddedTicks.forEach(function(b3, c3, a4) { + c3 && n4.push.apply(n4, k3.getLogTickPositions(f2, a4[c3 - 1], a4[c3], true)); + }); + else if (this.dateTime && this.getMinorTickInterval() === "auto") + n4 = n4.concat(this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(f2), d2, a3, b2.startOfWeek)); + else + for (b2 = d2 + (c2[0] - d2) % f2; b2 <= a3 && b2 !== n4[0]; b2 += f2) + n4.push(b2); + } + n4.length !== 0 && this.trimTicks(n4); + return n4; + } + adjustForMinRange() { + const b2 = this.options, c2 = this.logarithmic; + let f2 = this.min; + var a3 = this.max; + let d2, k2; + if (this.isXAxis && typeof this.minRange === "undefined" && !c2) + if (e(b2.min) || e(b2.max) || e(b2.floor) || e(b2.ceiling)) + this.minRange = null; + else { + var n4 = r(this.series.map((b3) => { + var c3; + return (b3.xIncrement ? (c3 = b3.xData) === null || c3 === void 0 ? void 0 : c3.slice(0, 2) : b3.xData) || []; + })) || 0; + this.minRange = Math.min(5 * n4, this.dataMax - this.dataMin); + } + a3 - f2 < this.minRange && (n4 = this.dataMax - this.dataMin >= this.minRange, k2 = this.minRange, a3 = (k2 - a3 + f2) / 2, d2 = [f2 - a3, D(b2.min, f2 - a3)], n4 && (d2[2] = c2 ? c2.log2lin(this.dataMin) : this.dataMin), f2 = t(d2), a3 = [f2 + k2, D(b2.max, f2 + k2)], n4 && (a3[2] = c2 ? c2.log2lin(this.dataMax) : this.dataMax), a3 = m(a3), a3 - f2 < k2 && (d2[0] = a3 - k2, d2[1] = D(b2.min, a3 - k2), f2 = t(d2))); + this.min = f2; + this.max = a3; + } + getClosest() { + let b2, c2; + if (this.categories) + c2 = 1; + else { + const f2 = []; + this.series.forEach(function(b3) { + var a3; + const d2 = b3.closestPointRange, k2 = b3.visible || !b3.chart.options.chart.ignoreHiddenSeries; + ((a3 = b3.xData) === null || a3 === void 0 ? void 0 : a3.length) === 1 ? f2.push(b3.xData[0]) : !b3.noSharedTooltip && e(d2) && k2 && (c2 = e(c2) ? Math.min(c2, d2) : d2); + }); + f2.length && (f2.sort((b3, c3) => b3 - c3), b2 = r([f2])); + } + return b2 && c2 ? Math.min(b2, c2) : b2 || c2; + } + nameToX(b2) { + const c2 = G(this.options.categories), f2 = c2 ? this.categories : this.names; + let a3 = b2.options.x, d2; + b2.series.requireSorting = false; + e(a3) || (a3 = this.options.uniqueNames && f2 ? c2 ? f2.indexOf(b2.name) : D(f2.keys[b2.name], -1) : b2.series.autoIncrement()); + a3 === -1 ? !c2 && f2 && (d2 = f2.length) : d2 = a3; + typeof d2 !== "undefined" ? (this.names[d2] = b2.name, this.names.keys[b2.name] = d2) : b2.x && (d2 = b2.x); + return d2; + } + updateNames() { + const b2 = this, c2 = this.names; + 0 < c2.length && (Object.keys(c2.keys).forEach(function(b3) { + delete c2.keys[b3]; + }), c2.length = 0, this.minRange = this.userMinRange, (this.series || []).forEach(function(c3) { + c3.xIncrement = null; + if (!c3.points || c3.isDirtyData) + b2.max = Math.max(b2.max, c3.xData.length - 1), c3.processData(), c3.generatePoints(); + c3.data.forEach(function(f2, a3) { + let d2; + f2 && f2.options && typeof f2.name !== "undefined" && (d2 = b2.nameToX(f2), typeof d2 !== "undefined" && d2 !== f2.x && (f2.x = d2, c3.xData[a3] = d2)); + }); + })); + } + setAxisTranslation() { + const b2 = this, c2 = b2.max - b2.min; + var a3 = b2.linkedParent; + const d2 = !!b2.categories, n4 = b2.isXAxis; + let e2 = b2.axisPointRange || 0, q2, g2 = 0, h3 = 0, r2 = b2.transA; + if (n4 || d2 || e2) + q2 = b2.getClosest(), a3 ? (g2 = a3.minPointOffset, h3 = a3.pointRangePadding) : b2.series.forEach(function(c3) { + const a4 = d2 ? 1 : n4 ? D(c3.options.pointRange, q2, 0) : b2.axisPointRange || 0, k2 = c3.options.pointPlacement; + e2 = Math.max(e2, a4); + if (!b2.single || d2) + c3 = c3.is("xrange") ? !n4 : n4, g2 = Math.max(g2, c3 && f(k2) ? 0 : a4 / 2), h3 = Math.max(h3, c3 && k2 === "on" ? 0 : a4); + }), a3 = b2.ordinal && b2.ordinal.slope && q2 ? b2.ordinal.slope / q2 : 1, b2.minPointOffset = g2 *= a3, b2.pointRangePadding = h3 *= a3, b2.pointRange = Math.min(e2, b2.single && d2 ? 1 : c2), n4 && q2 && (b2.closestPointRange = q2); + b2.translationSlope = b2.transA = r2 = b2.staticScale || b2.len / (c2 + h3 || 1); + b2.transB = b2.horiz ? b2.left : b2.bottom; + b2.minPixelPadding = r2 * g2; + k(this, "afterSetAxisTranslation"); + } + minFromRange() { + return this.max - this.range; + } + setTickInterval(c2) { + var f2 = this.chart; + const a3 = this.logarithmic, d2 = this.options, n4 = this.isXAxis, q2 = this.isLinked, h3 = d2.tickPixelInterval, A = this.categories, r2 = this.softThreshold; + let m2 = d2.maxPadding, l3 = d2.minPadding; + let p2 = b(d2.tickInterval) && 0 <= d2.tickInterval ? d2.tickInterval : void 0, t2 = b(this.threshold) ? this.threshold : null, P2, w2, K2; + this.dateTime || A || q2 || this.getTickAmount(); + w2 = D(this.userMin, d2.min); + K2 = D(this.userMax, d2.max); + if (q2) { + this.linkedParent = f2[this.coll][d2.linkedTo]; + var R = this.linkedParent.getExtremes(); + this.min = D(R.min, R.dataMin); + this.max = D(R.max, R.dataMax); + d2.type !== this.linkedParent.options.type && F(11, 1, f2); + } else + r2 && e(t2) && (this.dataMin >= t2 ? (R = t2, l3 = 0) : this.dataMax <= t2 && (P2 = t2, m2 = 0)), this.min = D(w2, R, this.dataMin), this.max = D(K2, P2, this.dataMax); + a3 && (this.positiveValuesOnly && !c2 && 0 >= Math.min(this.min, D(this.dataMin, this.min)) && F(10, 1, f2), this.min = g(a3.log2lin(this.min), 16), this.max = g(a3.log2lin(this.max), 16)); + this.range && e(this.max) && (this.userMin = this.min = w2 = Math.max(this.dataMin, this.minFromRange()), this.userMax = K2 = this.max, this.range = null); + k(this, "foundExtremes"); + this.beforePadding && this.beforePadding(); + this.adjustForMinRange(); + !b(this.userMin) && b(d2.softMin) && d2.softMin < this.min && (this.min = w2 = d2.softMin); + !b(this.userMax) && b(d2.softMax) && d2.softMax > this.max && (this.max = K2 = d2.softMax); + !(A || this.axisPointRange || this.stacking && this.stacking.usePercentage || q2) && e(this.min) && e(this.max) && (f2 = this.max - this.min) && (!e(w2) && l3 && (this.min -= f2 * l3), !e(K2) && m2 && (this.max += f2 * m2)); + !b(this.userMin) && b(d2.floor) && (this.min = Math.max(this.min, d2.floor)); + !b(this.userMax) && b(d2.ceiling) && (this.max = Math.min(this.max, d2.ceiling)); + r2 && e(this.dataMin) && (t2 = t2 || 0, !e(w2) && this.min < t2 && this.dataMin >= t2 ? this.min = this.options.minRange ? Math.min(t2, this.max - this.minRange) : t2 : !e(K2) && this.max > t2 && this.dataMax <= t2 && (this.max = this.options.minRange ? Math.max(t2, this.min + this.minRange) : t2)); + b(this.min) && b(this.max) && !this.chart.polar && this.min > this.max && (e(this.options.min) ? this.max = this.min : e(this.options.max) && (this.min = this.max)); + this.tickInterval = this.min === this.max || typeof this.min === "undefined" || typeof this.max === "undefined" ? 1 : q2 && this.linkedParent && !p2 && h3 === this.linkedParent.options.tickPixelInterval ? p2 = this.linkedParent.tickInterval : D(p2, this.tickAmount ? (this.max - this.min) / Math.max(this.tickAmount - 1, 1) : void 0, A ? 1 : (this.max - this.min) * h3 / Math.max(this.len, h3)); + if (n4 && !c2) { + const b2 = this.min !== (this.old && this.old.min) || this.max !== (this.old && this.old.max); + this.series.forEach(function(c3) { + c3.forceCrop = c3.forceCropping && c3.forceCropping(); + c3.processData(b2); + }); + k(this, "postProcessData", { hasExtremesChanged: b2 }); + } + this.setAxisTranslation(); + k(this, "initialAxisTranslation"); + this.pointRange && !p2 && (this.tickInterval = Math.max(this.pointRange, this.tickInterval)); + c2 = D(d2.minTickInterval, this.dateTime && !this.series.some((b2) => b2.noSharedTooltip) ? this.closestPointRange : 0); + !p2 && this.tickInterval < c2 && (this.tickInterval = c2); + this.dateTime || this.logarithmic || p2 || (this.tickInterval = V(this, this.tickInterval)); + this.tickAmount || (this.tickInterval = this.unsquish()); + this.setTickPositions(); + } + setTickPositions() { + var c2 = this.options; + const f2 = c2.tickPositions, a3 = c2.tickPositioner; + var d2 = this.getMinorTickInterval(), n4 = this.hasVerticalPanning(), q2 = this.coll === "colorAxis"; + const g2 = (q2 || !n4) && c2.startOnTick; + n4 = (q2 || !n4) && c2.endOnTick; + q2 = []; + let h3; + this.tickmarkOffset = this.categories && c2.tickmarkPlacement === "between" && this.tickInterval === 1 ? 0.5 : 0; + this.minorTickInterval = d2 === "auto" && this.tickInterval ? this.tickInterval / c2.minorTicksPerMajor : d2; + this.single = this.min === this.max && e(this.min) && !this.tickAmount && (parseInt(this.min, 10) === this.min || c2.allowDecimals !== false); + if (f2) + q2 = f2.slice(); + else if (b(this.min) && b(this.max)) { + if (this.ordinal && this.ordinal.positions || !((this.max - this.min) / this.tickInterval > Math.max(2 * this.len, 200))) + if (this.dateTime) + q2 = this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(this.tickInterval, c2.units), this.min, this.max, c2.startOfWeek, this.ordinal && this.ordinal.positions, this.closestPointRange, true); + else if (this.logarithmic) + q2 = this.logarithmic.getLogTickPositions(this.tickInterval, this.min, this.max); + else + for (d2 = c2 = this.tickInterval; d2 <= 2 * c2; ) + if (q2 = this.getLinearTickPositions(this.tickInterval, this.min, this.max), this.tickAmount && q2.length > this.tickAmount) + this.tickInterval = V(this, d2 *= 1.1); + else + break; + else + q2 = [this.min, this.max], F(19, false, this.chart); + q2.length > this.len && (q2 = [q2[0], q2[q2.length - 1]], q2[0] === q2[1] && (q2.length = 1)); + a3 && (this.tickPositions = q2, (h3 = a3.apply(this, [this.min, this.max])) && (q2 = h3)); + } + this.tickPositions = q2; + this.paddedTicks = q2.slice(0); + this.trimTicks(q2, g2, n4); + !this.isLinked && b(this.min) && b(this.max) && (this.single && 2 > q2.length && !this.categories && !this.series.some((b2) => b2.is("heatmap") && b2.options.pointPlacement === "between") && (this.min -= 0.5, this.max += 0.5), f2 || h3 || this.adjustTickAmount()); + k(this, "afterSetTickPositions"); + } + trimTicks(b2, c2, f2) { + const a3 = b2[0], d2 = b2[b2.length - 1], n4 = !this.isOrdinal && this.minPointOffset || 0; + k(this, "trimTicks"); + if (!this.isLinked) { + if (c2 && a3 !== -Infinity) + this.min = a3; + else + for (; this.min - n4 > b2[0]; ) + b2.shift(); + if (f2) + this.max = d2; + else + for (; this.max + n4 < b2[b2.length - 1]; ) + b2.pop(); + b2.length === 0 && e(a3) && !this.options.tickPositions && b2.push((d2 + a3) / 2); + } + } + alignToOthers() { + const c2 = this, f2 = [this], a3 = c2.options, d2 = this.coll === "yAxis" && this.chart.options.chart.alignThresholds, k2 = []; + let n4; + c2.thresholdAlignment = void 0; + if ((this.chart.options.chart.alignTicks !== false && a3.alignTicks || d2) && a3.startOnTick !== false && a3.endOnTick !== false && !c2.logarithmic) { + const b2 = (b3) => { + const { horiz: c3, options: f3 } = b3; + return [c3 ? f3.left : f3.top, f3.width, f3.height, f3.pane].join(); + }, a4 = b2(this); + this.chart[this.coll].forEach(function(d3) { + const { series: k3 } = d3; + k3.length && k3.some((b3) => b3.visible) && d3 !== c2 && b2(d3) === a4 && (n4 = true, f2.push(d3)); + }); + } + if (n4 && d2) { + f2.forEach((f3) => { + f3 = f3.getThresholdAlignment(c2); + b(f3) && k2.push(f3); + }); + const a4 = 1 < k2.length ? k2.reduce((b2, c3) => b2 + c3, 0) / k2.length : void 0; + f2.forEach((b2) => { + b2.thresholdAlignment = a4; + }); + } + return n4; + } + getThresholdAlignment(c2) { + (!b(this.dataMin) || this !== c2 && this.series.some((b2) => b2.isDirty || b2.isDirtyData)) && this.getSeriesExtremes(); + if (b(this.threshold)) + return c2 = h((this.threshold - (this.dataMin || 0)) / ((this.dataMax || 0) - (this.dataMin || 0)), 0, 1), this.options.reversed && (c2 = 1 - c2), c2; + } + getTickAmount() { + const b2 = this.options, c2 = b2.tickPixelInterval; + let f2 = b2.tickAmount; + !e(b2.tickInterval) && !f2 && this.len < c2 && !this.isRadial && !this.logarithmic && b2.startOnTick && b2.endOnTick && (f2 = 2); + !f2 && this.alignToOthers() && (f2 = Math.ceil(this.len / c2) + 1); + 4 > f2 && (this.finalTickAmt = f2, f2 = 5); + this.tickAmount = f2; + } + adjustTickAmount() { + const c2 = this, { finalTickAmt: f2, max: a3, min: d2, options: k2, tickPositions: n4, tickAmount: q2, thresholdAlignment: h3 } = c2, r2 = n4 && n4.length; + var m2 = D(c2.threshold, c2.softThreshold ? 0 : null); + var l3 = c2.tickInterval; + let p2; + b(h3) && (p2 = 0.5 > h3 ? Math.ceil(h3 * (q2 - 1)) : Math.floor(h3 * (q2 - 1)), k2.reversed && (p2 = q2 - 1 - p2)); + if (c2.hasData() && b(d2) && b(a3)) { + const h4 = () => { + c2.transA *= (r2 - 1) / (q2 - 1); + c2.min = k2.startOnTick ? n4[0] : Math.min(d2, n4[0]); + c2.max = k2.endOnTick ? n4[n4.length - 1] : Math.max(a3, n4[n4.length - 1]); + }; + if (b(p2) && b(c2.threshold)) { + for (; n4[p2] !== m2 || n4.length !== q2 || n4[0] > d2 || n4[n4.length - 1] < a3; ) { + n4.length = 0; + for (n4.push(c2.threshold); n4.length < q2; ) + n4[p2] === void 0 || n4[p2] > c2.threshold ? n4.unshift(g(n4[0] - l3)) : n4.push(g(n4[n4.length - 1] + l3)); + if (l3 > 8 * c2.tickInterval) + break; + l3 *= 2; + } + h4(); + } else if (r2 < q2) { + for (; n4.length < q2; ) + n4.length % 2 || d2 === m2 ? n4.push(g(n4[n4.length - 1] + l3)) : n4.unshift(g(n4[0] - l3)); + h4(); + } + if (e(f2)) { + for (l3 = m2 = n4.length; l3--; ) + (f2 === 3 && l3 % 2 === 1 || 2 >= f2 && 0 < l3 && l3 < m2 - 1) && n4.splice(l3, 1); + c2.finalTickAmt = void 0; + } + } + } + setScale() { + let b2 = false, c2 = false; + this.series.forEach(function(f3) { + b2 = b2 || f3.isDirtyData || f3.isDirty; + c2 = c2 || f3.xAxis && f3.xAxis.isDirty || false; + }); + this.setAxisSize(); + const f2 = this.len !== (this.old && this.old.len); + f2 || b2 || c2 || this.isLinked || this.forceRedraw || this.userMin !== (this.old && this.old.userMin) || this.userMax !== (this.old && this.old.userMax) || this.alignToOthers() ? (this.stacking && (this.stacking.resetStacks(), this.stacking.buildStacks()), this.forceRedraw = false, this.userMinRange || (this.minRange = void 0), this.getSeriesExtremes(), this.setTickInterval(), this.isDirty || (this.isDirty = f2 || this.min !== (this.old && this.old.min) || this.max !== (this.old && this.old.max))) : this.stacking && this.stacking.cleanStacks(); + b2 && this.panningState && (this.panningState.isDirty = true); + k(this, "afterSetScale"); + } + setExtremes(b2, c2, f2, a3, n4) { + const e2 = this, q2 = e2.chart; + f2 = D(f2, true); + e2.series.forEach(function(b3) { + delete b3.kdTree; + }); + n4 = d(n4, { min: b2, max: c2 }); + k(e2, "setExtremes", n4, function() { + e2.userMin = b2; + e2.userMax = c2; + e2.eventArgs = n4; + f2 && q2.redraw(a3); + }); + } + zoom(b2, c2) { + const f2 = this, a3 = this.dataMin, d2 = this.dataMax, n4 = this.options, q2 = Math.min(a3, D(n4.min, a3)), g2 = Math.max(d2, D(n4.max, d2)); + b2 = { newMin: b2, newMax: c2 }; + k(this, "zoom", b2, function(b3) { + let c3 = b3.newMin, n5 = b3.newMax; + if (c3 !== f2.min || n5 !== f2.max) + f2.allowZoomOutside || (e(a3) && (c3 < q2 && (c3 = q2), c3 > g2 && (c3 = g2)), e(d2) && (n5 < q2 && (n5 = q2), n5 > g2 && (n5 = g2))), f2.displayBtn = typeof c3 !== "undefined" || typeof n5 !== "undefined", f2.setExtremes(c3, n5, false, void 0, { trigger: "zoom" }); + b3.zoomed = true; + }); + return b2.zoomed; + } + setAxisSize() { + const b2 = this.chart; + var c2 = this.options; + const f2 = c2.offsets || [0, 0, 0, 0], a3 = this.horiz, d2 = this.width = Math.round(K(D(c2.width, b2.plotWidth - f2[3] + f2[1]), b2.plotWidth)), n4 = this.height = Math.round(K(D(c2.height, b2.plotHeight - f2[0] + f2[2]), b2.plotHeight)), k2 = this.top = Math.round(K(D(c2.top, b2.plotTop + f2[0]), b2.plotHeight, b2.plotTop)); + c2 = this.left = Math.round(K(D(c2.left, b2.plotLeft + f2[3]), b2.plotWidth, b2.plotLeft)); + this.bottom = b2.chartHeight - n4 - k2; + this.right = b2.chartWidth - d2 - c2; + this.len = Math.max(a3 ? d2 : n4, 0); + this.pos = a3 ? c2 : k2; + } + getExtremes() { + const b2 = this.logarithmic; + return { min: b2 ? g(b2.lin2log(this.min)) : this.min, max: b2 ? g(b2.lin2log(this.max)) : this.max, dataMin: this.dataMin, dataMax: this.dataMax, userMin: this.userMin, userMax: this.userMax }; + } + getThreshold(b2) { + var c2 = this.logarithmic; + const f2 = c2 ? c2.lin2log(this.min) : this.min; + c2 = c2 ? c2.lin2log(this.max) : this.max; + b2 === null || b2 === -Infinity ? b2 = f2 : b2 === Infinity ? b2 = c2 : f2 > b2 ? b2 = f2 : c2 < b2 && (b2 = c2); + return this.translate(b2, 0, 1, 0, 1); + } + autoLabelAlign(b2) { + const c2 = (D(b2, 0) - 90 * this.side + 720) % 360; + b2 = { align: "center" }; + k(this, "autoLabelAlign", b2, function(b3) { + 15 < c2 && 165 > c2 ? b3.align = "right" : 195 < c2 && 345 > c2 && (b3.align = "left"); + }); + return b2.align; + } + tickSize(b2) { + const c2 = this.options, f2 = D(c2[b2 === "tick" ? "tickWidth" : "minorTickWidth"], b2 === "tick" && this.isXAxis && !this.categories ? 1 : 0); + let a3 = c2[b2 === "tick" ? "tickLength" : "minorTickLength"], d2; + f2 && a3 && (c2[b2 + "Position"] === "inside" && (a3 = -a3), d2 = [a3, f2]); + b2 = { tickSize: d2 }; + k(this, "afterTickSize", b2); + return b2.tickSize; + } + labelMetrics() { + const b2 = this.chart.renderer; + var c2 = this.ticks; + c2 = c2[Object.keys(c2)[0]] || {}; + return this.chart.renderer.fontMetrics(c2.label || c2.movedLabel || b2.box); + } + unsquish() { + const c2 = this.options.labels; + var f2 = this.horiz; + const a3 = this.tickInterval, d2 = this.len / (((this.categories ? 1 : 0) + this.max - this.min) / a3), n4 = c2.rotation, k2 = 0.75 * this.labelMetrics().h, e2 = Math.max(this.max - this.min, 0), q2 = function(b2) { + let c3 = b2 / (d2 || 1); + c3 = 1 < c3 ? Math.ceil(c3) : 1; + c3 * a3 > e2 && b2 !== Infinity && d2 !== Infinity && e2 && (c3 = Math.ceil(e2 / a3)); + return g(c3 * a3); + }; + let h3 = a3, r2, l3 = Number.MAX_VALUE, m2; + if (f2) { + if (c2.staggerLines || (b(n4) ? m2 = [n4] : d2 < c2.autoRotationLimit && (m2 = c2.autoRotation)), m2) { + let b2; + for (const c3 of m2) + if (c3 === n4 || c3 && -90 <= c3 && 90 >= c3) + f2 = q2(Math.abs(k2 / Math.sin(p * c3))), b2 = f2 + Math.abs(c3 / 360), b2 < l3 && (l3 = b2, r2 = c3, h3 = f2); + } + } else + h3 = q2(k2); + this.autoRotation = m2; + this.labelRotation = D(r2, b(n4) ? n4 : 0); + return c2.step ? a3 : h3; + } + getSlotWidth(c2) { + const f2 = this.chart, a3 = this.horiz, d2 = this.options.labels, n4 = Math.max(this.tickPositions.length - (this.categories ? 0 : 1), 1), k2 = f2.margin[3]; + if (c2 && b(c2.slotWidth)) + return c2.slotWidth; + if (a3 && 2 > d2.step) + return d2.rotation ? 0 : (this.staggerLines || 1) * this.len / n4; + if (!a3) { + c2 = d2.style.width; + if (c2 !== void 0) + return parseInt(String(c2), 10); + if (k2) + return k2 - f2.spacing[3]; + } + return 0.33 * f2.chartWidth; + } + renderUnsquish() { + const b2 = this.chart, c2 = b2.renderer, a3 = this.tickPositions, d2 = this.ticks, n4 = this.options.labels, k2 = n4.style, e2 = this.horiz, q2 = this.getSlotWidth(); + var g2 = Math.max(1, Math.round(q2 - 2 * n4.padding)); + const h3 = {}, r2 = this.labelMetrics(), m2 = k2.textOverflow; + let l3, p2, D2 = 0; + f(n4.rotation) || (h3.rotation = n4.rotation || 0); + a3.forEach(function(b3) { + b3 = d2[b3]; + b3.movedLabel && b3.replaceMovedLabel(); + b3 && b3.label && b3.label.textPxLength > D2 && (D2 = b3.label.textPxLength); + }); + this.maxLabelLength = D2; + if (this.autoRotation) + D2 > g2 && D2 > r2.h ? h3.rotation = this.labelRotation : this.labelRotation = 0; + else if (q2 && (l3 = g2, !m2)) + for (p2 = "clip", g2 = a3.length; !e2 && g2--; ) { + var t2 = a3[g2]; + if (t2 = d2[t2].label) + t2.styles && t2.styles.textOverflow === "ellipsis" ? t2.css({ textOverflow: "clip" }) : t2.textPxLength > q2 && t2.css({ width: q2 + "px" }), t2.getBBox().height > this.len / a3.length - (r2.h - r2.f) && (t2.specificTextOverflow = "ellipsis"); + } + h3.rotation && (l3 = D2 > 0.5 * b2.chartHeight ? 0.33 * b2.chartHeight : D2, m2 || (p2 = "ellipsis")); + if (this.labelAlign = n4.align || this.autoLabelAlign(this.labelRotation)) + h3.align = this.labelAlign; + a3.forEach(function(b3) { + const c3 = (b3 = d2[b3]) && b3.label, f2 = k2.width, a4 = {}; + c3 && (c3.attr(h3), b3.shortenLabel ? b3.shortenLabel() : l3 && !f2 && k2.whiteSpace !== "nowrap" && (l3 < c3.textPxLength || c3.element.tagName === "SPAN") ? (a4.width = l3 + "px", m2 || (a4.textOverflow = c3.specificTextOverflow || p2), c3.css(a4)) : c3.styles && c3.styles.width && !a4.width && !f2 && c3.css({ width: null }), delete c3.specificTextOverflow, b3.rotation = h3.rotation); + }, this); + this.tickRotCorr = c2.rotCorr(r2.b, this.labelRotation || 0, this.side !== 0); + } + hasData() { + return this.series.some(function(b2) { + return b2.hasData(); + }) || this.options.showEmpty && e(this.min) && e(this.max); + } + addTitle(b2) { + const f2 = this.chart.renderer, a3 = this.horiz, d2 = this.opposite, n4 = this.options.title, k2 = this.chart.styledMode; + let e2; + this.axisTitle || ((e2 = n4.textAlign) || (e2 = (a3 ? { low: "left", middle: "center", high: "right" } : { low: d2 ? "right" : "left", middle: "center", high: d2 ? "left" : "right" })[n4.align]), this.axisTitle = f2.text(n4.text || "", 0, 0, n4.useHTML).attr({ + zIndex: 7, + rotation: n4.rotation, + align: e2 + }).addClass("highcharts-axis-title"), k2 || this.axisTitle.css(c(n4.style)), this.axisTitle.add(this.axisGroup), this.axisTitle.isNew = true); + k2 || n4.style.width || this.isRadial || this.axisTitle.css({ width: this.len + "px" }); + this.axisTitle[b2 ? "show" : "hide"](b2); + } + generateTick(b2) { + const c2 = this.ticks; + c2[b2] ? c2[b2].addLabel() : c2[b2] = new H(this, b2); + } + getOffset() { + const c2 = this, { chart: f2, horiz: a3, options: d2, side: n4, ticks: q2, tickPositions: g2, coll: h3, axisParent: r2 } = c2, m2 = f2.renderer, l3 = f2.inverted && !c2.isZAxis ? [1, 0, 3, 2][n4] : n4; + var p2 = c2.hasData(); + const t2 = d2.title; + var w2 = d2.labels; + const K2 = b(d2.crossing); + var G2 = f2.axisOffset; + const R = f2.clipOffset, Q = [-1, 1, 1, -1][n4], v2 = d2.className; + let ja, u2 = 0, x2; + var E = 0; + let F2 = 0; + c2.showAxis = ja = p2 || d2.showEmpty; + c2.staggerLines = c2.horiz && w2.staggerLines || void 0; + if (!c2.axisGroup) { + const b2 = (b3, c3, f3) => m2.g(b3).attr({ zIndex: f3 }).addClass(`highcharts-${h3.toLowerCase()}${c3} ` + (this.isRadial ? `highcharts-radial-axis${c3} ` : "") + (v2 || "")).add(r2); + c2.gridGroup = b2("grid", "-grid", d2.gridZIndex); + c2.axisGroup = b2("axis", "", d2.zIndex); + c2.labelGroup = b2("axis-labels", "-labels", w2.zIndex); + } + p2 || c2.isLinked ? (g2.forEach(function(b2) { + c2.generateTick(b2); + }), c2.renderUnsquish(), c2.reserveSpaceDefault = n4 === 0 || n4 === 2 || { 1: "left", 3: "right" }[n4] === c2.labelAlign, D(w2.reserveSpace, K2 ? false : null, c2.labelAlign === "center" ? true : null, c2.reserveSpaceDefault) && g2.forEach(function(b2) { + F2 = Math.max(q2[b2].getLabelSize(), F2); + }), c2.staggerLines && (F2 *= c2.staggerLines), c2.labelOffset = F2 * (c2.opposite ? -1 : 1)) : P(q2, function(b2, c3) { + b2.destroy(); + delete q2[c3]; + }); + t2 && t2.text && t2.enabled !== false && (c2.addTitle(ja), ja && !K2 && t2.reserveSpace !== false && (c2.titleOffset = u2 = c2.axisTitle.getBBox()[a3 ? "height" : "width"], x2 = t2.offset, E = e(x2) ? 0 : D(t2.margin, a3 ? 5 : 10))); + c2.renderLine(); + c2.offset = Q * D(d2.offset, G2[n4] ? G2[n4] + (d2.margin || 0) : 0); + c2.tickRotCorr = c2.tickRotCorr || { x: 0, y: 0 }; + p2 = n4 === 0 ? -c2.labelMetrics().h : n4 === 2 ? c2.tickRotCorr.y : 0; + E = Math.abs(F2) + E; + F2 && (E = E - p2 + Q * (a3 ? D(w2.y, c2.tickRotCorr.y + Q * w2.distance) : D(w2.x, Q * w2.distance))); + c2.axisTitleMargin = D(x2, E); + c2.getMaxLabelDimensions && (c2.maxLabelDimensions = c2.getMaxLabelDimensions(q2, g2)); + h3 !== "colorAxis" && (w2 = this.tickSize("tick"), G2[n4] = Math.max(G2[n4], (c2.axisTitleMargin || 0) + u2 + Q * c2.offset, E, g2 && g2.length && w2 ? w2[0] + Q * c2.offset : 0), G2 = !c2.axisLine || d2.offset ? 0 : 2 * Math.floor(c2.axisLine.strokeWidth() / 2), R[l3] = Math.max(R[l3], G2)); + k(this, "afterGetOffset"); + } + getLinePath(b2) { + const c2 = this.chart, f2 = this.opposite; + var a3 = this.offset; + const d2 = this.horiz, n4 = this.left + (f2 ? this.width : 0) + a3; + a3 = c2.chartHeight - this.bottom - (f2 ? this.height : 0) + a3; + f2 && (b2 *= -1); + return c2.renderer.crispLine([["M", d2 ? this.left : n4, d2 ? a3 : this.top], ["L", d2 ? c2.chartWidth - this.right : n4, d2 ? a3 : c2.chartHeight - this.bottom]], b2); + } + renderLine() { + this.axisLine || (this.axisLine = this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup), this.chart.styledMode || this.axisLine.attr({ stroke: this.options.lineColor, "stroke-width": this.options.lineWidth, zIndex: 7 })); + } + getTitlePosition(b2) { + var c2 = this.horiz, f2 = this.left; + const a3 = this.top; + var d2 = this.len; + const n4 = this.options.title, e2 = c2 ? f2 : a3, q2 = this.opposite, g2 = this.offset, h3 = n4.x, r2 = n4.y, l3 = this.chart.renderer.fontMetrics(b2); + b2 = b2 ? Math.max(b2.getBBox(false, 0).height - l3.h - 1, 0) : 0; + d2 = { low: e2 + (c2 ? 0 : d2), middle: e2 + d2 / 2, high: e2 + (c2 ? d2 : 0) }[n4.align]; + f2 = (c2 ? a3 + this.height : f2) + (c2 ? 1 : -1) * (q2 ? -1 : 1) * (this.axisTitleMargin || 0) + [-b2, b2, l3.f, -b2][this.side]; + c2 = { x: c2 ? d2 + h3 : f2 + (q2 ? this.width : 0) + g2 + h3, y: c2 ? f2 + r2 - (q2 ? this.height : 0) + g2 : d2 + r2 }; + k(this, "afterGetTitlePosition", { titlePosition: c2 }); + return c2; + } + renderMinorTick(b2, c2) { + const f2 = this.minorTicks; + f2[b2] || (f2[b2] = new H(this, b2, "minor")); + c2 && f2[b2].isNew && f2[b2].render(null, true); + f2[b2].render(null, false, 1); + } + renderTick(b2, c2, f2) { + const a3 = this.ticks; + if (!this.isLinked || b2 >= this.min && b2 <= this.max || this.grid && this.grid.isColumn) + a3[b2] || (a3[b2] = new H(this, b2)), f2 && a3[b2].isNew && a3[b2].render(c2, true, -1), a3[b2].render(c2); + } + render() { + const c2 = this, f2 = c2.chart, a3 = c2.logarithmic, d2 = c2.options, n4 = c2.isLinked, e2 = c2.tickPositions, q2 = c2.axisTitle, g2 = c2.ticks, h3 = c2.minorTicks, r2 = c2.alternateBands, l3 = d2.stackLabels, m2 = d2.alternateGridColor; + var p2 = d2.crossing; + const D2 = c2.tickmarkOffset, t2 = c2.axisLine, w2 = c2.showAxis, K2 = u(f2.renderer.globalAnimation); + let Q, G2; + c2.labelEdge.length = 0; + c2.overlap = false; + [g2, h3, r2].forEach(function(b2) { + P(b2, function(b3) { + b3.isActive = false; + }); + }); + if (b(p2)) { + const b2 = this.isXAxis ? f2.yAxis[0] : f2.xAxis[0], a4 = [1, -1, -1, 1][this.side]; + b2 && (p2 = b2.toPixels(p2, true), c2.horiz && (p2 = b2.len - p2), c2.offset = a4 * p2); + } + if (c2.hasData() || n4) { + const n5 = c2.chart.hasRendered && c2.old && b(c2.old.min); + c2.minorTickInterval && !c2.categories && c2.getMinorTickPositions().forEach(function(b2) { + c2.renderMinorTick(b2, n5); + }); + e2.length && (e2.forEach(function(b2, f3) { + c2.renderTick(b2, f3, n5); + }), D2 && (c2.min === 0 || c2.single) && (g2[-1] || (g2[-1] = new H(c2, -1, null, true)), g2[-1].render(-1))); + m2 && e2.forEach(function(b2, d3) { + G2 = typeof e2[d3 + 1] !== "undefined" ? e2[d3 + 1] + D2 : c2.max - D2; + d3 % 2 === 0 && b2 < c2.max && G2 <= c2.max + (f2.polar ? -D2 : D2) && (r2[b2] || (r2[b2] = new z.PlotLineOrBand(c2)), Q = b2 + D2, r2[b2].options = { from: a3 ? a3.lin2log(Q) : Q, to: a3 ? a3.lin2log(G2) : G2, color: m2, className: "highcharts-alternate-grid" }, r2[b2].render(), r2[b2].isActive = true); + }); + c2._addedPlotLB || (c2._addedPlotLB = true, (d2.plotLines || []).concat(d2.plotBands || []).forEach(function(b2) { + c2.addPlotBandOrLine(b2); + })); + } + [g2, h3, r2].forEach(function(b2) { + const c3 = [], a4 = K2.duration; + P(b2, function(b3, f3) { + b3.isActive || (b3.render(f3, false, 0), b3.isActive = false, c3.push(f3)); + }); + Z(function() { + let f3 = c3.length; + for (; f3--; ) + b2[c3[f3]] && !b2[c3[f3]].isActive && (b2[c3[f3]].destroy(), delete b2[c3[f3]]); + }, b2 !== r2 && f2.hasRendered && a4 ? a4 : 0); + }); + t2 && (t2[t2.isPlaced ? "animate" : "attr"]({ d: this.getLinePath(t2.strokeWidth()) }), t2.isPlaced = true, t2[w2 ? "show" : "hide"](w2)); + q2 && w2 && (q2[q2.isNew ? "attr" : "animate"](c2.getTitlePosition(q2)), q2.isNew = false); + l3 && l3.enabled && c2.stacking && c2.stacking.renderStackTotals(); + c2.old = { len: c2.len, max: c2.max, min: c2.min, transA: c2.transA, userMax: c2.userMax, userMin: c2.userMin }; + c2.isDirty = false; + k(this, "afterRender"); + } + redraw() { + this.visible && (this.render(), this.plotLinesAndBands.forEach(function(b2) { + b2.render(); + })); + this.series.forEach(function(b2) { + b2.isDirty = true; + }); + } + getKeepProps() { + return this.keepProps || Y.keepProps; + } + destroy(b2) { + const c2 = this, f2 = c2.plotLinesAndBands, a3 = this.eventOptions; + k(this, "destroy", { keepEvents: b2 }); + b2 || X(c2); + [c2.ticks, c2.minorTicks, c2.alternateBands].forEach(function(b3) { + w(b3); + }); + if (f2) + for (b2 = f2.length; b2--; ) + f2[b2].destroy(); + "axisLine axisTitle axisGroup gridGroup labelGroup cross scrollbar".split(" ").forEach(function(b3) { + c2[b3] && (c2[b3] = c2[b3].destroy()); + }); + for (const b3 in c2.plotLinesAndBandsGroups) + c2.plotLinesAndBandsGroups[b3] = c2.plotLinesAndBandsGroups[b3].destroy(); + P(c2, function(b3, f3) { + c2.getKeepProps().indexOf(f3) === -1 && delete c2[f3]; + }); + this.eventOptions = a3; + } + drawCrosshair(b2, c2) { + const f2 = this.crosshair; + var a3 = D(f2 && f2.snap, true); + const n4 = this.chart; + let q2, g2 = this.cross; + k(this, "drawCrosshair", { e: b2, point: c2 }); + b2 || (b2 = this.cross && this.cross.e); + if (f2 && (e(c2) || !a3) !== false) { + a3 ? e(c2) && (q2 = D(this.coll !== "colorAxis" ? c2.crosshairPos : null, this.isXAxis ? c2.plotX : this.len - c2.plotY)) : q2 = b2 && (this.horiz ? b2.chartX - this.pos : this.len - b2.chartY + this.pos); + if (e(q2)) { + var h3 = { value: c2 && (this.isXAxis ? c2.x : D(c2.stackY, c2.y)), translatedValue: q2 }; + n4.polar && d(h3, { isCrosshair: true, chartX: b2 && b2.chartX, chartY: b2 && b2.chartY, point: c2 }); + h3 = this.getPlotLinePath(h3) || null; + } + if (!e(h3)) { + this.hideCrosshair(); + return; + } + a3 = this.categories && !this.isRadial; + g2 || (this.cross = g2 = n4.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-" + (a3 ? "category " : "thin ") + (f2.className || "")).attr({ zIndex: D(f2.zIndex, 2) }).add(), n4.styledMode || (g2.attr({ stroke: f2.color || (a3 ? I.parse("#ccd3ff").setOpacity(0.25).get() : "#cccccc"), "stroke-width": D(f2.width, 1) }).css({ "pointer-events": "none" }), f2.dashStyle && g2.attr({ dashstyle: f2.dashStyle }))); + g2.show().attr({ d: h3 }); + a3 && !f2.width && g2.attr({ "stroke-width": this.transA }); + this.cross.e = b2; + } else + this.hideCrosshair(); + k(this, "afterDrawCrosshair", { e: b2, point: c2 }); + } + hideCrosshair() { + this.cross && this.cross.hide(); + k(this, "afterHideCrosshair"); + } + hasVerticalPanning() { + const b2 = this.chart.options.chart.panning; + return !!(b2 && b2.enabled && /y/.test(b2.type)); + } + update(b2, f2) { + const a3 = this.chart; + b2 = c(this.userOptions, b2); + this.destroy(true); + this.init(a3, b2); + a3.isDirtyBox = true; + D(f2, true) && a3.redraw(); + } + remove(b2) { + const c2 = this.chart, f2 = this.coll, a3 = this.series; + let d2 = a3.length; + for (; d2--; ) + a3[d2] && a3[d2].remove(false); + x(c2.axes, this); + x(c2[f2] || [], this); + c2.orderItems(f2); + this.destroy(); + c2.isDirtyBox = true; + D(b2, true) && c2.redraw(); + } + setTitle(b2, c2) { + this.update({ title: b2 }, c2); + } + setCategories(b2, c2) { + this.update({ categories: b2 }, c2); + } + } + Y.defaultOptions = y.defaultXAxisOptions; + Y.keepProps = "coll extKey hcEvents names series userMax userMin".split(" "); + ""; + return Y; + }); + M(a, "Core/Axis/DateTimeAxis.js", [a["Core/Utilities.js"]], function(a2) { + const { addEvent: x, getMagnitude: I, normalizeTickInterval: L, timeUnits: C } = a2; + var z; + (function(y) { + function B() { + return this.chart.time.getTimeTicks.apply(this.chart.time, arguments); + } + function u(a3) { + a3.userOptions.type !== "datetime" ? this.dateTime = void 0 : this.dateTime || (this.dateTime = new l2(this)); + } + const v = []; + y.compose = function(l3) { + a2.pushUnique(v, l3) && (l3.keepProps.push("dateTime"), l3.prototype.getTimeTicks = B, x(l3, "init", u)); + return l3; + }; + class l2 { + constructor(a3) { + this.axis = a3; + } + normalizeTimeTickInterval(a3, l3) { + const m = l3 || [["millisecond", [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]], ["second", [1, 2, 5, 10, 15, 30]], ["minute", [1, 2, 5, 10, 15, 30]], ["hour", [1, 2, 3, 4, 6, 8, 12]], ["day", [1, 2]], ["week", [1, 2]], ["month", [1, 2, 3, 4, 6]], ["year", null]]; + l3 = m[m.length - 1]; + let h = C[l3[0]], g = l3[1], e; + for (e = 0; e < m.length && !(l3 = m[e], h = C[l3[0]], g = l3[1], m[e + 1] && a3 <= (h * g[g.length - 1] + C[m[e + 1][0]]) / 2); e++) + ; + h === C.year && a3 < 5 * h && (g = [1, 2, 5]); + a3 = L(a3 / h, g, l3[0] === "year" ? Math.max(I(a3 / h), 1) : 1); + return { unitRange: h, count: a3, unitName: l3[0] }; + } + getXDateFormat(a3, l3) { + const { axis: m } = this, h = m.chart.time; + return m.closestPointRange ? h.getDateFormat(m.closestPointRange, a3, m.options.startOfWeek, l3) || h.resolveDTLFormat(l3.year).main : h.resolveDTLFormat(l3.day).main; + } + } + y.Additions = l2; + })(z || (z = {})); + return z; + }); + M(a, "Core/Axis/LogarithmicAxis.js", [a["Core/Utilities.js"]], function(a2) { + const { addEvent: x, normalizeTickInterval: I, pick: L } = a2; + var C; + (function(y) { + function H(a3) { + let l2 = this.logarithmic; + a3.userOptions.type !== "logarithmic" ? this.logarithmic = void 0 : l2 || (this.logarithmic = new v(this)); + } + function B() { + const a3 = this.logarithmic; + a3 && (this.lin2val = function(l2) { + return a3.lin2log(l2); + }, this.val2lin = function(l2) { + return a3.log2lin(l2); + }); + } + const u = []; + y.compose = function(l2) { + a2.pushUnique(u, l2) && (l2.keepProps.push("logarithmic"), x(l2, "init", H), x(l2, "afterInit", B)); + return l2; + }; + class v { + constructor(a3) { + this.axis = a3; + } + getLogTickPositions(a3, p, t, m) { + const h = this.axis; + var g = h.len, e = h.options; + let l2 = []; + m || (this.minorAutoInterval = void 0); + if (0.5 <= a3) + a3 = Math.round(a3), l2 = h.getLinearTickPositions(a3, p, t); + else if (0.08 <= a3) { + e = Math.floor(p); + let h3, w, d, k, r; + for (g = 0.3 < a3 ? [1, 2, 4] : 0.15 < a3 ? [1, 2, 4, 6, 8] : [1, 2, 3, 4, 5, 6, 7, 8, 9]; e < t + 1 && !r; e++) + for (w = g.length, h3 = 0; h3 < w && !r; h3++) + d = this.log2lin(this.lin2log(e) * g[h3]), d > p && (!m || k <= t) && typeof k !== "undefined" && l2.push(k), k > t && (r = true), k = d; + } else + p = this.lin2log(p), t = this.lin2log(t), a3 = m ? h.getMinorTickInterval() : e.tickInterval, a3 = L(a3 === "auto" ? null : a3, this.minorAutoInterval, e.tickPixelInterval / (m ? 5 : 1) * (t - p) / ((m ? g / h.tickPositions.length : g) || 1)), a3 = I(a3), l2 = h.getLinearTickPositions(a3, p, t).map(this.log2lin), m || (this.minorAutoInterval = a3 / 5); + m || (h.tickInterval = a3); + return l2; + } + lin2log(a3) { + return Math.pow(10, a3); + } + log2lin(a3) { + return Math.log(a3) / Math.LN10; + } + } + y.Additions = v; + })(C || (C = {})); + return C; + }); + M(a, "Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js", [a["Core/Utilities.js"]], function(a2) { + const { erase: x, extend: I, isNumber: L } = a2; + var C; + (function(y) { + function H(a3) { + return this.addPlotBandOrLine(a3, "plotBands"); + } + function B(a3, e) { + const g = this.userOptions; + let l3 = new h(this, a3); + this.visible && (l3 = l3.render()); + if (l3) { + this._addedPlotLB || (this._addedPlotLB = true, (g.plotLines || []).concat(g.plotBands || []).forEach((a4) => { + this.addPlotBandOrLine(a4); + })); + if (e) { + const h3 = g[e] || []; + h3.push(a3); + g[e] = h3; + } + this.plotLinesAndBands.push(l3); + } + return l3; + } + function u(a3) { + return this.addPlotBandOrLine(a3, "plotLines"); + } + function v(a3, e, h3 = this.options) { + const g = this.getPlotLinePath({ value: e, force: true, acrossPanes: h3.acrossPanes }), l3 = [], d = this.horiz; + e = !L(this.min) || !L(this.max) || a3 < this.min && e < this.min || a3 > this.max && e > this.max; + a3 = this.getPlotLinePath({ value: a3, force: true, acrossPanes: h3.acrossPanes }); + h3 = 1; + let k; + if (a3 && g) + for (e && (k = a3.toString() === g.toString(), h3 = 0), e = 0; e < a3.length; e += 2) { + const r = a3[e], q = a3[e + 1], m2 = g[e], b = g[e + 1]; + r[0] !== "M" && r[0] !== "L" || q[0] !== "M" && q[0] !== "L" || m2[0] !== "M" && m2[0] !== "L" || b[0] !== "M" && b[0] !== "L" || (d && m2[1] === r[1] ? (m2[1] += h3, b[1] += h3) : d || m2[2] !== r[2] || (m2[2] += h3, b[2] += h3), l3.push(["M", r[1], r[2]], ["L", q[1], q[2]], ["L", b[1], b[2]], ["L", m2[1], m2[2]], ["Z"])); + l3.isFlat = k; + } + return l3; + } + function l2(a3) { + this.removePlotBandOrLine(a3); + } + function p(a3) { + const e = this.plotLinesAndBands, g = this.options, h3 = this.userOptions; + if (e) { + let l3 = e.length; + for (; l3--; ) + e[l3].id === a3 && e[l3].destroy(); + [ + g.plotLines || [], + h3.plotLines || [], + g.plotBands || [], + h3.plotBands || [] + ].forEach(function(d) { + for (l3 = d.length; l3--; ) + (d[l3] || {}).id === a3 && x(d, d[l3]); + }); + } + } + function t(a3) { + this.removePlotBandOrLine(a3); + } + const m = []; + let h; + y.compose = function(g, e) { + h || (h = g); + a2.pushUnique(m, e) && I(e.prototype, { addPlotBand: H, addPlotLine: u, addPlotBandOrLine: B, getPlotBandPath: v, removePlotBand: l2, removePlotLine: t, removePlotBandOrLine: p }); + return e; + }; + })(C || (C = {})); + return C; + }); + M(a, "Core/Axis/PlotLineOrBand/PlotLineOrBand.js", [a["Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js"], a["Core/Utilities.js"]], function(a2, y) { + const { arrayMax: x, arrayMin: L, defined: C, destroyObjectProperties: z, erase: H, fireEvent: B, merge: u, objectEach: v, pick: l2 } = y; + class p { + static compose(l3) { + return a2.compose(p, l3); + } + constructor(a3, l3) { + this.axis = a3; + l3 && (this.options = l3, this.id = l3.id); + } + render() { + B(this, "render"); + const a3 = this, m = a3.axis, h = m.horiz; + var g = m.logarithmic; + const e = a3.options, p2 = e.color, x2 = l2(e.zIndex, 0), F = e.events, d = {}, k = m.chart.renderer; + let r = e.label, q = a3.label, G = e.to, b = e.from, f = e.value, c = a3.svgElem; + var n3 = []; + const P = C(b) && C(G); + n3 = C(f); + const D = !c, K = { "class": "highcharts-plot-" + (P ? "band " : "line ") + (e.className || "") }; + let X = P ? "bands" : "lines"; + g && (b = g.log2lin(b), G = g.log2lin(G), f = g.log2lin(f)); + m.chart.styledMode || (n3 ? (K.stroke = p2 || "#999999", K["stroke-width"] = l2(e.width, 1), e.dashStyle && (K.dashstyle = e.dashStyle)) : P && (K.fill = p2 || "#e6e9ff", e.borderWidth && (K.stroke = e.borderColor, K["stroke-width"] = e.borderWidth))); + d.zIndex = x2; + X += "-" + x2; + (g = m.plotLinesAndBandsGroups[X]) || (m.plotLinesAndBandsGroups[X] = g = k.g("plot-" + X).attr(d).add()); + D && (a3.svgElem = c = k.path().attr(K).add(g)); + if (n3) + n3 = m.getPlotLinePath({ value: f, lineWidth: c.strokeWidth(), acrossPanes: e.acrossPanes }); + else if (P) + n3 = m.getPlotBandPath(b, G, e); + else + return; + !a3.eventsAdded && F && (v(F, function(b2, f2) { + c.on(f2, function(b3) { + F[f2].apply(a3, [b3]); + }); + }), a3.eventsAdded = true); + (D || !c.d) && n3 && n3.length ? c.attr({ d: n3 }) : c && (n3 ? (c.show(), c.animate({ d: n3 })) : c.d && (c.hide(), q && (a3.label = q = q.destroy()))); + r && (C(r.text) || C(r.formatter)) && n3 && n3.length && 0 < m.width && 0 < m.height && !n3.isFlat ? (r = u({ align: h && P && "center", x: h ? !P && 4 : 10, verticalAlign: !h && P && "middle", y: h ? P ? 16 : 10 : P ? 6 : -4, rotation: h && !P && 90 }, r), this.renderLabel(r, n3, P, x2)) : q && q.hide(); + return a3; + } + renderLabel(a3, l3, h, g) { + const e = this.axis; + var m = e.chart.renderer; + let p2 = this.label; + p2 || (this.label = p2 = m.text(this.getLabelText(a3), 0, 0, a3.useHTML).attr({ align: a3.textAlign || a3.align, rotation: a3.rotation, "class": "highcharts-plot-" + (h ? "band" : "line") + "-label " + (a3.className || ""), zIndex: g }).add(), e.chart.styledMode || p2.css(u({ fontSize: "0.8em", textOverflow: "ellipsis" }, a3.style))); + g = l3.xBounds || [l3[0][1], l3[1][1], h ? l3[2][1] : l3[0][1]]; + l3 = l3.yBounds || [l3[0][2], l3[1][2], h ? l3[2][2] : l3[0][2]]; + h = L(g); + m = L(l3); + p2.align(a3, false, { x: h, y: m, width: x(g) - h, height: x(l3) - m }); + p2.alignValue && p2.alignValue !== "left" || (a3 = a3.clip ? e.width : e.chart.chartWidth, p2.css({ width: (p2.rotation === 90 ? e.height - (p2.alignAttr.y - e.top) : a3 - (p2.alignAttr.x - e.left)) + "px" })); + p2.show(true); + } + getLabelText(a3) { + return C(a3.formatter) ? a3.formatter.call(this) : a3.text; + } + destroy() { + H(this.axis.plotLinesAndBands, this); + delete this.axis; + z(this); + } + } + ""; + ""; + return p; + }); + M(a, "Core/Tooltip.js", [ + a["Core/Templating.js"], + a["Core/Globals.js"], + a["Core/Renderer/RendererUtilities.js"], + a["Core/Renderer/RendererRegistry.js"], + a["Core/Utilities.js"] + ], function(a2, y, I, L, C) { + const { format: x } = a2, { doc: H, isSafari: B } = y, { distribute: u } = I, { addEvent: v, clamp: l2, css: p, discardElement: t, extend: m, fireEvent: h, isArray: g, isNumber: e, isString: w, merge: E, pick: F, splat: d, syncTimeout: k } = C; + class r { + constructor(a3, d2) { + this.allowShared = true; + this.container = void 0; + this.crosshairs = []; + this.distance = 0; + this.isHidden = true; + this.isSticky = false; + this.now = {}; + this.options = {}; + this.outside = false; + this.chart = a3; + this.init(a3, d2); + } + bodyFormatter(a3) { + return a3.map(function(a4) { + const b = a4.series.tooltipOptions; + return (b[(a4.point.formatPrefix || "point") + "Formatter"] || a4.point.tooltipFormatter).call(a4.point, b[(a4.point.formatPrefix || "point") + "Format"] || ""); + }); + } + cleanSplit(a3) { + this.chart.series.forEach(function(d2) { + const b = d2 && d2.tt; + b && (!b.isActive || a3 ? d2.tt = b.destroy() : b.isActive = false); + }); + } + defaultFormatter(a3) { + const k2 = this.points || d(this); + let b; + b = [a3.tooltipFooterHeaderFormatter(k2[0])]; + b = b.concat(a3.bodyFormatter(k2)); + b.push(a3.tooltipFooterHeaderFormatter(k2[0], true)); + return b; + } + destroy() { + this.label && (this.label = this.label.destroy()); + this.split && (this.cleanSplit(true), this.tt && (this.tt = this.tt.destroy())); + this.renderer && (this.renderer = this.renderer.destroy(), t(this.container)); + C.clearTimeout(this.hideTimer); + C.clearTimeout(this.tooltipTimeout); + } + getAnchor(a3, k2) { + var b = this.chart; + const f = b.pointer, c = b.inverted, n3 = b.plotTop; + b = b.plotLeft; + a3 = d(a3); + a3[0].series && a3[0].series.yAxis && !a3[0].series.yAxis.options.reversedStacks && (a3 = a3.slice().reverse()); + if (this.followPointer && k2) + typeof k2.chartX === "undefined" && (k2 = f.normalize(k2)), a3 = [k2.chartX - b, k2.chartY - n3]; + else if (a3[0].tooltipPos) + a3 = a3[0].tooltipPos; + else { + let f2 = 0, d2 = 0; + a3.forEach(function(b2) { + if (b2 = b2.pos(true)) + f2 += b2[0], d2 += b2[1]; + }); + f2 /= a3.length; + d2 /= a3.length; + this.shared && 1 < a3.length && k2 && (c ? f2 = k2.chartX : d2 = k2.chartY); + a3 = [f2 - b, d2 - n3]; + } + return a3.map(Math.round); + } + getClassName(a3, d2, b) { + const f = a3.series, c = f.options; + return [this.options.className, "highcharts-label", b && "highcharts-tooltip-header", d2 ? "highcharts-tooltip-box" : "highcharts-tooltip", !b && "highcharts-color-" + F(a3.colorIndex, f.colorIndex), c && c.className].filter(w).join(" "); + } + getLabel() { + const a3 = this, d2 = this.chart.styledMode, b = this.options, f = this.split && this.allowShared, c = b.style.pointerEvents || (this.shouldStickOnContact() ? "auto" : "none"); + let n3, k2 = this.chart.renderer; + if (this.label) { + var e2 = !this.label.hasClass("highcharts-label"); + (!f && e2 || f && !e2) && this.destroy(); + } + if (!this.label) { + if (this.outside) { + e2 = this.chart.options.chart.style; + const b2 = L.getRendererType(); + this.container = n3 = y.doc.createElement("div"); + n3.className = "highcharts-tooltip-container"; + p(n3, { position: "absolute", top: "1px", pointerEvents: c, zIndex: Math.max(this.options.style.zIndex || 0, (e2 && e2.zIndex || 0) + 3) }); + y.doc.body.appendChild(n3); + this.renderer = k2 = new b2(n3, 0, 0, e2, void 0, void 0, k2.styledMode); + } + f ? this.label = k2.g("tooltip") : (this.label = k2.label("", 0, 0, b.shape, void 0, void 0, b.useHTML, void 0, "tooltip").attr({ padding: b.padding, r: b.borderRadius }), d2 || this.label.attr({ fill: b.backgroundColor, "stroke-width": b.borderWidth || 0 }).css(b.style).css({ pointerEvents: c })); + if (a3.outside) { + const b2 = this.label, { + xSetter: c2, + ySetter: f2 + } = b2; + b2.xSetter = function(f3) { + c2.call(b2, a3.distance); + n3.style.left = f3 + "px"; + }; + b2.ySetter = function(c3) { + f2.call(b2, a3.distance); + n3.style.top = c3 + "px"; + }; + } + this.label.attr({ zIndex: 8 }).shadow(b.shadow).add(); + } + return this.label; + } + getPlayingField() { + const { body: a3, documentElement: d2 } = H, { chart: b, distance: f, outside: c } = this; + return { width: c ? Math.max(a3.scrollWidth, d2.scrollWidth, a3.offsetWidth, d2.offsetWidth, d2.clientWidth) - 2 * f : b.chartWidth, height: c ? Math.max(a3.scrollHeight, d2.scrollHeight, a3.offsetHeight, d2.offsetHeight, d2.clientHeight) : b.chartHeight }; + } + getPosition(a3, d2, b) { + const f = this.chart, c = this.distance, n3 = {}, k2 = f.inverted && b.h || 0, e2 = this.outside; + var q = this.getPlayingField(); + const g2 = q.width, h3 = q.height, r2 = f.pointer.getChartPosition(); + q = (n4) => { + const k3 = n4 === "x"; + return [n4, k3 ? g2 : h3, k3 ? a3 : d2].concat(e2 ? [k3 ? a3 * r2.scaleX : d2 * r2.scaleY, k3 ? r2.left - c + (b.plotX + f.plotLeft) * r2.scaleX : r2.top - c + (b.plotY + f.plotTop) * r2.scaleY, 0, k3 ? g2 : h3] : [k3 ? a3 : d2, k3 ? b.plotX + f.plotLeft : b.plotY + f.plotTop, k3 ? f.plotLeft : f.plotTop, k3 ? f.plotLeft + f.plotWidth : f.plotTop + f.plotHeight]); + }; + let l3 = q("y"), m2 = q("x"), p2; + q = !!b.negative; + !f.polar && f.hoverSeries && f.hoverSeries.yAxis && f.hoverSeries.yAxis.reversed && (q = !q); + const t2 = !this.followPointer && F(b.ttBelow, !f.inverted === q), w2 = function(b2, a4, f2, d3, q2, g3, h4) { + const l4 = e2 ? b2 === "y" ? c * r2.scaleY : c * r2.scaleX : c, m3 = (f2 - d3) / 2, p3 = d3 < q2 - c, J2 = q2 + c + d3 < a4, D = q2 - l4 - f2 + m3; + q2 = q2 + l4 - m3; + if (t2 && J2) + n3[b2] = q2; + else if (!t2 && p3) + n3[b2] = D; + else if (p3) + n3[b2] = Math.min(h4 - d3, 0 > D - k2 ? D : D - k2); + else if (J2) + n3[b2] = Math.max(g3, q2 + k2 + f2 > a4 ? q2 : q2 + k2); + else + return false; + }, G = function(b2, a4, f2, d3, k3) { + let e3; + k3 < c || k3 > a4 - c ? e3 = false : n3[b2] = k3 < f2 / 2 ? 1 : k3 > a4 - d3 / 2 ? a4 - d3 - 2 : k3 - f2 / 2; + return e3; + }, v2 = function(b2) { + const c2 = l3; + l3 = m2; + m2 = c2; + p2 = b2; + }, J = function() { + w2.apply(0, l3) !== false ? G.apply(0, m2) !== false || p2 || (v2(true), J()) : p2 ? n3.x = n3.y = 0 : (v2(true), J()); + }; + (f.inverted || 1 < this.len) && v2(); + J(); + return n3; + } + hide(a3) { + const d2 = this; + C.clearTimeout(this.hideTimer); + a3 = F(a3, this.options.hideDelay); + this.isHidden || (this.hideTimer = k(function() { + d2.getLabel().fadeOut(a3 ? void 0 : a3); + d2.isHidden = true; + }, a3)); + } + init(a3, d2) { + this.chart = a3; + this.options = d2; + this.crosshairs = []; + this.now = { x: 0, y: 0 }; + this.isHidden = true; + this.split = d2.split && !a3.inverted && !a3.polar; + this.shared = d2.shared || this.split; + this.outside = F(d2.outside, !(!a3.scrollablePixelsX && !a3.scrollablePixelsY)); + } + shouldStickOnContact(a3) { + return !(this.followPointer || !this.options.stickOnContact || a3 && !this.chart.pointer.inClass(a3.target, "highcharts-tooltip")); + } + move(a3, d2, b, f) { + const c = this, n3 = c.now, k2 = c.options.animation !== false && !c.isHidden && (1 < Math.abs(a3 - n3.x) || 1 < Math.abs(d2 - n3.y)), e2 = c.followPointer || 1 < c.len; + m(n3, { x: k2 ? (2 * n3.x + a3) / 3 : a3, y: k2 ? (n3.y + d2) / 2 : d2, anchorX: e2 ? void 0 : k2 ? (2 * n3.anchorX + b) / 3 : b, anchorY: e2 ? void 0 : k2 ? (n3.anchorY + f) / 2 : f }); + c.getLabel().attr(n3); + c.drawTracker(); + k2 && (C.clearTimeout(this.tooltipTimeout), this.tooltipTimeout = setTimeout(function() { + c && c.move(a3, d2, b, f); + }, 32)); + } + refresh(a3, k2) { + const b = this.chart, f = this.options, c = b.pointer, n3 = d(a3), e2 = n3[0], q = []; + var r2 = f.format, l3 = f.formatter || this.defaultFormatter; + const m2 = this.shared, p2 = b.styledMode; + let t2 = {}; + if (f.enabled && e2.series) { + C.clearTimeout(this.hideTimer); + this.allowShared = !(!g(a3) && a3.series && a3.series.noSharedTooltip); + this.followPointer = !this.split && e2.series.tooltipOptions.followPointer; + a3 = this.getAnchor(a3, k2); + var v2 = a3[0], G = a3[1]; + m2 && this.allowShared ? (c.applyInactiveState(n3), n3.forEach(function(b2) { + b2.setState("hover"); + q.push(b2.getLabelConfig()); + }), t2 = e2.getLabelConfig(), t2.points = q) : t2 = e2.getLabelConfig(); + this.len = q.length; + r2 = w(r2) ? x(r2, t2, b) : l3.call(t2, this); + l3 = e2.series; + this.distance = F(l3.tooltipOptions.distance, 16); + if (r2 === false) + this.hide(); + else { + if (this.split && this.allowShared) + this.renderSplit(r2, n3); + else { + let d2 = v2, g2 = G; + k2 && c.isDirectTouch && (d2 = k2.chartX - b.plotLeft, g2 = k2.chartY - b.plotTop); + if (b.polar || l3.options.clip === false || n3.some((b2) => c.isDirectTouch || b2.series.shouldShowTooltip(d2, g2))) + k2 = this.getLabel(), f.style.width && !p2 || k2.css({ width: (this.outside ? this.getPlayingField() : b.spacingBox).width + "px" }), k2.attr({ text: r2 && r2.join ? r2.join("") : r2 }), k2.addClass(this.getClassName(e2), true), p2 || k2.attr({ stroke: f.borderColor || e2.color || l3.color || "#666666" }), this.updatePosition({ plotX: v2, plotY: G, negative: e2.negative, ttBelow: e2.ttBelow, h: a3[2] || 0 }); + else { + this.hide(); + return; + } + } + this.isHidden && this.label && this.label.attr({ opacity: 1 }).show(); + this.isHidden = false; + } + h(this, "refresh"); + } + } + renderSplit(a3, d2) { + function b(b2, c2, a4, d3, n4 = true) { + a4 ? (c2 = S ? 0 : z, b2 = l2(b2 - d3 / 2, J.left, J.right - d3 - (f.outside ? W : 0))) : (c2 -= da, b2 = n4 ? b2 - d3 - x2 : b2 + x2, b2 = l2(b2, n4 ? b2 : J.left, J.right)); + return { x: b2, y: c2 }; + } + const f = this, { chart: c, chart: { chartWidth: n3, chartHeight: k2, plotHeight: e2, plotLeft: g2, plotTop: h3, pointer: q, scrollablePixelsY: r2 = 0, scrollablePixelsX: p2, scrollingContainer: { scrollLeft: t2, scrollTop: v2 } = { scrollLeft: 0, scrollTop: 0 }, styledMode: G }, distance: x2, options: E2, options: { positioner: y2 } } = f, J = f.outside && typeof p2 !== "number" ? H.documentElement.getBoundingClientRect() : { + left: t2, + right: t2 + n3, + top: v2, + bottom: v2 + k2 + }, N = f.getLabel(), O = this.renderer || c.renderer, S = !(!c.xAxis[0] || !c.xAxis[0].opposite), { left: W, top: ha } = q.getChartPosition(); + let da = h3 + v2, C2 = 0, z = e2 - r2; + w(a3) && (a3 = [false, a3]); + a3 = a3.slice(0, d2.length + 1).reduce(function(c2, a4, n4) { + if (a4 !== false && a4 !== "") { + n4 = d2[n4 - 1] || { isHeader: true, plotX: d2[0].plotX, plotY: e2, series: {} }; + const D = n4.isHeader; + var k3 = D ? f : n4.series, q2; + { + var r3 = n4; + a4 = a4.toString(); + var m2 = k3.tt; + const { isHeader: b2, series: c3 } = r3; + m2 || (m2 = { padding: E2.padding, r: E2.borderRadius }, G || (m2.fill = E2.backgroundColor, m2["stroke-width"] = (q2 = E2.borderWidth) !== null && q2 !== void 0 ? q2 : 1), m2 = O.label("", 0, 0, E2[b2 ? "headerShape" : "shape"], void 0, void 0, E2.useHTML).addClass(f.getClassName(r3, true, b2)).attr(m2).add(N)); + m2.isActive = true; + m2.attr({ text: a4 }); + G || m2.css(E2.style).attr({ stroke: E2.borderColor || r3.color || c3.color || "#333333" }); + q2 = m2; + } + q2 = k3.tt = q2; + r3 = q2.getBBox(); + k3 = r3.width + q2.strokeWidth(); + D && (C2 = r3.height, z += C2, S && (da -= C2)); + { + const { isHeader: b2, plotX: c3 = 0, plotY: f2 = 0, series: d3 } = n4; + if (b2) { + a4 = g2 + c3; + var p3 = h3 + e2 / 2; + } else { + const { xAxis: b3, yAxis: n5 } = d3; + a4 = b3.pos + l2(c3, -x2, b3.len + x2); + d3.shouldShowTooltip(0, n5.pos - h3 + f2, { ignoreX: true }) && (p3 = n5.pos + f2); + } + a4 = l2(a4, J.left - x2, J.right + x2); + p3 = { anchorX: a4, anchorY: p3 }; + } + const { anchorX: t3, anchorY: Q2 } = p3; + typeof Q2 === "number" ? (p3 = r3.height + 1, r3 = y2 ? y2.call(f, k3, p3, n4) : b(t3, Q2, D, k3), c2.push({ align: y2 ? 0 : void 0, anchorX: t3, anchorY: Q2, boxWidth: k3, point: n4, rank: F(r3.rank, D ? 1 : 0), size: p3, target: r3.y, tt: q2, x: r3.x })) : q2.isActive = false; + } + return c2; + }, []); + !y2 && a3.some((b2) => { + var { outside: c2 } = f; + c2 = (c2 ? W : 0) + b2.anchorX; + return c2 < J.left && c2 + b2.boxWidth < J.right ? true : c2 < W - J.left + b2.boxWidth && J.right - c2 > c2; + }) && (a3 = a3.map((c2) => { + const { x: a4, y: f2 } = b(c2.anchorX, c2.anchorY, c2.point.isHeader, c2.boxWidth, false); + return m(c2, { target: f2, x: a4 }); + })); + f.cleanSplit(); + u(a3, z); + var ca = W, L2 = W; + a3.forEach(function(b2) { + const { x: c2, boxWidth: a4, isHeader: d3 } = b2; + d3 || (f.outside && W + c2 < ca && (ca = W + c2), !d3 && f.outside && ca + a4 > L2 && (L2 = W + c2)); + }); + a3.forEach(function(b2) { + const { x: c2, anchorX: a4, anchorY: d3, pos: n4, point: { isHeader: k3 } } = b2, e3 = { visibility: typeof n4 === "undefined" ? "hidden" : "inherit", x: c2, y: (n4 || 0) + da, anchorX: a4, anchorY: d3 }; + if (f.outside && c2 < a4) { + const b3 = W - ca; + 0 < b3 && (k3 || (e3.x = c2 + b3, e3.anchorX = a4 + b3), k3 && (e3.x = (L2 - ca) / 2, e3.anchorX = a4 + b3)); + } + b2.tt.attr(e3); + }); + const { + container: R, + outside: Q, + renderer: la + } = f; + if (Q && R && la) { + const { width: b2, height: c2, x: a4, y: f2 } = N.getBBox(); + la.setSize(b2 + a4, c2 + f2, false); + R.style.left = ca + "px"; + R.style.top = ha + "px"; + } + B && N.attr({ opacity: N.opacity === 1 ? 0.999 : 1 }); + } + drawTracker() { + if (this.shouldStickOnContact()) { + var a3 = this.chart, d2 = this.label, b = this.shared ? a3.hoverPoints : a3.hoverPoint; + if (d2 && b) { + var f = { x: 0, y: 0, width: 0, height: 0 }; + b = this.getAnchor(b); + var c = d2.getBBox(); + b[0] += a3.plotLeft - d2.translateX; + b[1] += a3.plotTop - d2.translateY; + f.x = Math.min(0, b[0]); + f.y = Math.min(0, b[1]); + f.width = 0 > b[0] ? Math.max(Math.abs(b[0]), c.width - b[0]) : Math.max(Math.abs(b[0]), c.width); + f.height = 0 > b[1] ? Math.max(Math.abs(b[1]), c.height - Math.abs(b[1])) : Math.max(Math.abs(b[1]), c.height); + this.tracker ? this.tracker.attr(f) : (this.tracker = d2.renderer.rect(f).addClass("highcharts-tracker").add(d2), a3.styledMode || this.tracker.attr({ fill: "rgba(0,0,0,0)" })); + } + } else + this.tracker && (this.tracker = this.tracker.destroy()); + } + styledModeFormat(a3) { + return a3.replace('style="font-size: 0.8em"', 'class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g, 'class="highcharts-color-{$1.colorIndex} {series.options.className} {point.options.className}"'); + } + tooltipFooterHeaderFormatter(a3, d2) { + const b = a3.series, f = b.tooltipOptions; + var c = b.xAxis; + const n3 = c && c.dateTime; + c = { isFooter: d2, labelConfig: a3 }; + let k2 = f.xDateFormat, g2 = f[d2 ? "footerFormat" : "headerFormat"]; + h(this, "headerFormatter", c, function(c2) { + n3 && !k2 && e(a3.key) && (k2 = n3.getXDateFormat(a3.key, f.dateTimeLabelFormats)); + n3 && k2 && (a3.point && a3.point.tooltipDateKeys || ["key"]).forEach(function(b2) { + g2 = g2.replace("{point." + b2 + "}", "{point." + b2 + ":" + k2 + "}"); + }); + b.chart.styledMode && (g2 = this.styledModeFormat(g2)); + c2.text = x(g2, { point: a3, series: b }, this.chart); + }); + return c.text; + } + update(a3) { + this.destroy(); + this.init(this.chart, E(true, this.options, a3)); + } + updatePosition(a3) { + const { chart: d2, distance: b, options: f } = this; + var c = d2.pointer; + const n3 = this.getLabel(), { left: k2, top: e2, scaleX: g2, scaleY: h3 } = c.getChartPosition(); + c = (f.positioner || this.getPosition).call(this, n3.width, n3.height, a3); + let q = (a3.plotX || 0) + d2.plotLeft; + a3 = (a3.plotY || 0) + d2.plotTop; + let r2; + if (this.outside) { + f.positioner && (c.x += k2 - b, c.y += e2 - b); + r2 = (f.borderWidth || 0) + 2 * b; + this.renderer.setSize(n3.width + r2, n3.height + r2, false); + if (g2 !== 1 || h3 !== 1) + p(this.container, { transform: `scale(${g2}, ${h3})` }), q *= g2, a3 *= h3; + q += k2 - c.x; + a3 += e2 - c.y; + } + this.move(Math.round(c.x), Math.round(c.y || 0), q, a3); + } + } + (function(a3) { + const d2 = []; + a3.compose = function(b) { + C.pushUnique(d2, b) && v(b, "afterInit", function() { + const b2 = this.chart; + b2.options.tooltip && (b2.tooltip = new a3(b2, b2.options.tooltip)); + }); + }; + })(r || (r = {})); + ""; + return r; + }); + M(a, "Core/Series/Point.js", [ + a["Core/Renderer/HTML/AST.js"], + a["Core/Animation/AnimationUtilities.js"], + a["Core/Defaults.js"], + a["Core/Templating.js"], + a["Core/Utilities.js"] + ], function(a2, y, I, L, C) { + const { animObject: x } = y, { defaultOptions: H } = I, { format: B } = L, { addEvent: u, defined: v, erase: l2, extend: p, fireEvent: t, getNestedProperty: m, isArray: h, isFunction: g, isNumber: e, isObject: w, merge: E, objectEach: F, pick: d, syncTimeout: k, removeEvent: r, uniqueKey: q } = C; + class G { + constructor() { + this.category = void 0; + this.destroyed = false; + this.formatPrefix = "point"; + this.id = void 0; + this.isNull = false; + this.percentage = this.options = this.name = void 0; + this.selected = false; + this.total = this.shapeArgs = this.series = void 0; + this.visible = true; + this.x = void 0; + } + animateBeforeDestroy() { + const b = this, a3 = { x: b.startXPos, opacity: 0 }, c = b.getGraphicalProps(); + c.singular.forEach(function(c2) { + b[c2] = b[c2].animate(c2 === "dataLabel" ? { x: b[c2].startXPos, y: b[c2].startYPos, opacity: 0 } : a3); + }); + c.plural.forEach(function(c2) { + b[c2].forEach(function(c3) { + c3.element && c3.animate(p({ x: b.startXPos }, c3.startYPos ? { x: c3.startXPos, y: c3.startYPos } : {})); + }); + }); + } + applyOptions(b, a3) { + const c = this.series, f = c.options.pointValKey || c.pointValKey; + b = G.prototype.optionsToObject.call(this, b); + p(this, b); + this.options = this.options ? p(this.options, b) : b; + b.group && delete this.group; + b.dataLabels && delete this.dataLabels; + f && (this.y = G.prototype.getNestedProperty.call(this, f)); + this.formatPrefix = (this.isNull = this.isValid && !this.isValid()) ? "null" : "point"; + this.selected && (this.state = "select"); + "name" in this && typeof a3 === "undefined" && c.xAxis && c.xAxis.hasNames && (this.x = c.xAxis.nameToX(this)); + typeof this.x === "undefined" && c ? this.x = typeof a3 === "undefined" ? c.autoIncrement() : a3 : e(b.x) && c.options.relativeXValue && (this.x = c.autoIncrement(b.x)); + return this; + } + destroy() { + if (!this.destroyed) { + const a3 = this; + var b = a3.series; + const c = b.chart; + b = b.options.dataSorting; + const d2 = c.hoverPoints, e2 = x(a3.series.chart.renderer.globalAnimation), g2 = () => { + if (a3.graphic || a3.graphics || a3.dataLabel || a3.dataLabels) + r(a3), a3.destroyElements(); + for (const b2 in a3) + delete a3[b2]; + }; + a3.legendItem && c.legend.destroyItem(a3); + d2 && (a3.setState(), l2(d2, a3), d2.length || (c.hoverPoints = null)); + if (a3 === c.hoverPoint) + a3.onMouseOut(); + b && b.enabled ? (this.animateBeforeDestroy(), k(g2, e2.duration)) : g2(); + c.pointCount--; + } + this.destroyed = true; + } + destroyElements(b) { + const a3 = this; + b = a3.getGraphicalProps(b); + b.singular.forEach(function(b2) { + a3[b2] = a3[b2].destroy(); + }); + b.plural.forEach(function(b2) { + a3[b2].forEach(function(b3) { + b3 && b3.element && b3.destroy(); + }); + delete a3[b2]; + }); + } + firePointEvent(b, a3, c) { + const f = this, d2 = this.series.options; + (d2.point.events[b] || f.options && f.options.events && f.options.events[b]) && f.importEvents(); + b === "click" && d2.allowPointSelect && (c = function(b2) { + f.select && f.select(null, b2.ctrlKey || b2.metaKey || b2.shiftKey); + }); + t(f, b, a3, c); + } + getClassName() { + return "highcharts-point" + (this.selected ? " highcharts-point-select" : "") + (this.negative ? " highcharts-negative" : "") + (this.isNull ? " highcharts-null-point" : "") + (typeof this.colorIndex !== "undefined" ? " highcharts-color-" + this.colorIndex : "") + (this.options.className ? " " + this.options.className : "") + (this.zone && this.zone.className ? " " + this.zone.className.replace("highcharts-negative", "") : ""); + } + getGraphicalProps(b) { + const a3 = this, c = [], d2 = { singular: [], plural: [] }; + let k2, e2; + b = b || { graphic: 1, dataLabel: 1 }; + b.graphic && c.push("graphic"); + b.dataLabel && c.push("dataLabel", "dataLabelPath", "dataLabelUpper", "connector"); + for (e2 = c.length; e2--; ) + k2 = c[e2], a3[k2] && d2.singular.push(k2); + ["graphic", "dataLabel", "connector"].forEach(function(c2) { + const f = c2 + "s"; + b[c2] && a3[f] && d2.plural.push(f); + }); + return d2; + } + getLabelConfig() { + return { x: this.category, y: this.y, color: this.color, colorIndex: this.colorIndex, key: this.name || this.category, series: this.series, point: this, percentage: this.percentage, total: this.total || this.stackTotal }; + } + getNestedProperty(b) { + if (b) + return b.indexOf("custom.") === 0 ? m(b, this.options) : this[b]; + } + getZone() { + var b = this.series; + const a3 = b.zones; + b = b.zoneAxis || "y"; + let c, d2 = 0; + for (c = a3[d2]; this[b] >= c.value; ) + c = a3[++d2]; + this.nonZonedColor || (this.nonZonedColor = this.color); + this.color = c && c.color && !this.options.color ? c.color : this.nonZonedColor; + return c; + } + hasNewShapeType() { + return (this.graphic && (this.graphic.symbolName || this.graphic.element.nodeName)) !== this.shapeType; + } + init(b, a3, c) { + this.series = b; + this.applyOptions(a3, c); + this.id = v(this.id) ? this.id : q(); + this.resolveColor(); + b.chart.pointCount++; + t(this, "afterInit"); + return this; + } + isValid() { + return this.x !== null && e(this.y); + } + optionsToObject(b) { + var a3 = this.series; + const c = a3.options.keys, d2 = c || a3.pointArrayMap || ["y"], k2 = d2.length; + let g2 = {}, q2 = 0, r2 = 0; + if (e(b) || b === null) + g2[d2[0]] = b; + else if (h(b)) + for (!c && b.length > k2 && (a3 = typeof b[0], a3 === "string" ? g2.name = b[0] : a3 === "number" && (g2.x = b[0]), q2++); r2 < k2; ) + c && typeof b[q2] === "undefined" || (0 < d2[r2].indexOf(".") ? G.prototype.setNestedProperty(g2, b[q2], d2[r2]) : g2[d2[r2]] = b[q2]), q2++, r2++; + else + typeof b === "object" && (g2 = b, b.dataLabels && (a3._hasPointLabels = true), b.marker && (a3._hasPointMarkers = true)); + return g2; + } + pos(b, a3 = this.plotY) { + if (!this.destroyed) { + const { plotX: c, series: f } = this, { chart: d2, xAxis: k2, yAxis: g2 } = f; + let h3 = 0, q2 = 0; + if (e(c) && e(a3)) + return b && (h3 = k2 ? k2.pos : d2.plotLeft, q2 = g2 ? g2.pos : d2.plotTop), d2.inverted && k2 && g2 ? [g2.len - a3 + q2, k2.len - c + h3] : [c + h3, a3 + q2]; + } + } + resolveColor() { + const b = this.series; + var a3 = b.chart.styledMode; + let c; + var k2 = b.chart.options.chart.colorCount; + delete this.nonZonedColor; + b.options.colorByPoint ? (a3 || (k2 = b.options.colors || b.chart.options.colors, c = k2[b.colorCounter], k2 = k2.length), a3 = b.colorCounter, b.colorCounter++, b.colorCounter === k2 && (b.colorCounter = 0)) : (a3 || (c = b.color), a3 = b.colorIndex); + this.colorIndex = d(this.options.colorIndex, a3); + this.color = d(this.options.color, c); + } + setNestedProperty(b, a3, c) { + c.split(".").reduce(function(b2, c2, f, d2) { + b2[c2] = d2.length - 1 === f ? a3 : w(b2[c2], true) ? b2[c2] : {}; + return b2[c2]; + }, b); + return b; + } + shouldDraw() { + return !this.isNull; + } + tooltipFormatter(b) { + const a3 = this.series, c = a3.tooltipOptions, k2 = d(c.valueDecimals, ""), e2 = c.valuePrefix || "", g2 = c.valueSuffix || ""; + a3.chart.styledMode && (b = a3.chart.tooltip.styledModeFormat(b)); + (a3.pointArrayMap || ["y"]).forEach(function(c2) { + c2 = "{point." + c2; + if (e2 || g2) + b = b.replace(RegExp(c2 + "}", "g"), e2 + c2 + "}" + g2); + b = b.replace(RegExp(c2 + "}", "g"), c2 + ":,." + k2 + "f}"); + }); + return B(b, { point: this, series: this.series }, a3.chart); + } + update(b, a3, c, k2) { + function f() { + n3.applyOptions(b); + var f2 = g2 && n3.hasMockGraphic; + f2 = n3.y === null ? !f2 : f2; + g2 && f2 && (n3.graphic = g2.destroy(), delete n3.hasMockGraphic); + w(b, true) && (g2 && g2.element && b && b.marker && typeof b.marker.symbol !== "undefined" && (n3.graphic = g2.destroy()), b && b.dataLabels && n3.dataLabel && (n3.dataLabel = n3.dataLabel.destroy()), n3.connector && (n3.connector = n3.connector.destroy())); + r2 = n3.index; + e2.updateParallelArrays(n3, r2); + q2.data[r2] = w(q2.data[r2], true) || w(b, true) ? n3.options : d(b, q2.data[r2]); + e2.isDirty = e2.isDirtyData = true; + !e2.fixedBox && e2.hasCartesianSeries && (h3.isDirtyBox = true); + q2.legendType === "point" && (h3.isDirtyLegend = true); + a3 && h3.redraw(c); + } + const n3 = this, e2 = n3.series, g2 = n3.graphic, h3 = e2.chart, q2 = e2.options; + let r2; + a3 = d(a3, true); + k2 === false ? f() : n3.firePointEvent("update", { options: b }, f); + } + remove(b, a3) { + this.series.removePoint(this.series.data.indexOf(this), b, a3); + } + select(b, a3) { + const c = this, f = c.series, k2 = f.chart; + this.selectedStaging = b = d(b, !c.selected); + c.firePointEvent(b ? "select" : "unselect", { accumulate: a3 }, function() { + c.selected = c.options.selected = b; + f.options.data[f.data.indexOf(c)] = c.options; + c.setState(b && "select"); + a3 || k2.getSelectedPoints().forEach(function(b2) { + const a4 = b2.series; + b2.selected && b2 !== c && (b2.selected = b2.options.selected = false, a4.options.data[a4.data.indexOf(b2)] = b2.options, b2.setState(k2.hoverPoints && a4.options.inactiveOtherPoints ? "inactive" : ""), b2.firePointEvent("unselect")); + }); + }); + delete this.selectedStaging; + } + onMouseOver(b) { + const a3 = this.series.chart, c = a3.pointer; + b = b ? c.normalize(b) : c.getChartCoordinatesFromPoint(this, a3.inverted); + c.runPointActions(b, this); + } + onMouseOut() { + const b = this.series.chart; + this.firePointEvent("mouseOut"); + this.series.options.inactiveOtherPoints || (b.hoverPoints || []).forEach(function(b2) { + b2.setState(); + }); + b.hoverPoints = b.hoverPoint = null; + } + importEvents() { + if (!this.hasImportedEvents) { + const b = this, a3 = E(b.series.options.point, b.options).events; + b.events = a3; + F(a3, function(c, a4) { + g(c) && u(b, a4, c); + }); + this.hasImportedEvents = true; + } + } + setState(b, f) { + const c = this.series; + var k2 = this.state, g2 = c.options.states[b || "normal"] || {}, h3 = H.plotOptions[c.type].marker && c.options.marker; + const q2 = h3 && h3.enabled === false, r2 = h3 && h3.states && h3.states[b || "normal"] || {}, l3 = r2.enabled === false, m2 = this.marker || {}, w2 = c.chart, v2 = h3 && c.markerAttribs; + let G2 = c.halo; + var u2; + let x2; + var E2 = c.stateMarkerGraphic; + b = b || ""; + if (!(b === this.state && !f || this.selected && b !== "select" || g2.enabled === false || b && (l3 || q2 && r2.enabled === false) || b && m2.states && m2.states[b] && m2.states[b].enabled === false)) { + this.state = b; + v2 && (u2 = c.markerAttribs(this, b)); + if (this.graphic && !this.hasMockGraphic) { + k2 && this.graphic.removeClass("highcharts-point-" + k2); + b && this.graphic.addClass("highcharts-point-" + b); + if (!w2.styledMode) { + k2 = c.pointAttribs(this, b); + x2 = d(w2.options.chart.animation, g2.animation); + const a3 = k2.opacity; + c.options.inactiveOtherPoints && e(a3) && ((this.dataLabels || []).forEach(function(b2) { + b2 && !b2.hasClass("highcharts-data-label-hidden") && b2.animate({ opacity: a3 }, x2); + }), this.connector && this.connector.animate({ opacity: a3 }, x2)); + this.graphic.animate(k2, x2); + } + u2 && this.graphic.animate(u2, d(w2.options.chart.animation, r2.animation, h3.animation)); + E2 && E2.hide(); + } else { + if (b && r2) { + h3 = m2.symbol || c.symbol; + E2 && E2.currentSymbol !== h3 && (E2 = E2.destroy()); + if (u2) + if (E2) + E2[f ? "animate" : "attr"]({ x: u2.x, y: u2.y }); + else + h3 && (c.stateMarkerGraphic = E2 = w2.renderer.symbol(h3, u2.x, u2.y, u2.width, u2.height).add(c.markerGroup), E2.currentSymbol = h3); + !w2.styledMode && E2 && this.state !== "inactive" && E2.attr(c.pointAttribs(this, b)); + } + E2 && (E2[b && this.isInside ? "show" : "hide"](), E2.element.point = this, E2.addClass(this.getClassName(), true)); + } + g2 = g2.halo; + u2 = (E2 = this.graphic || E2) && E2.visibility || "inherit"; + g2 && g2.size && E2 && u2 !== "hidden" && !this.isCluster ? (G2 || (c.halo = G2 = w2.renderer.path().add(E2.parentGroup)), G2.show()[f ? "animate" : "attr"]({ d: this.haloPath(g2.size) }), G2.attr({ "class": "highcharts-halo highcharts-color-" + d(this.colorIndex, c.colorIndex) + (this.className ? " " + this.className : ""), visibility: u2, zIndex: -1 }), G2.point = this, w2.styledMode || G2.attr(p({ fill: this.color || c.color, "fill-opacity": g2.opacity }, a2.filterUserAttributes(g2.attributes || {})))) : G2 && G2.point && G2.point.haloPath && G2.animate({ d: G2.point.haloPath(0) }, null, G2.hide); + t(this, "afterSetState", { state: b }); + } + } + haloPath(b) { + const a3 = this.pos(); + return a3 ? this.series.chart.renderer.symbols.circle(Math.floor(a3[0]) - b, a3[1] - b, 2 * b, 2 * b) : []; + } + } + ""; + return G; + }); + M(a, "Core/Pointer.js", [a["Core/Color/Color.js"], a["Core/Globals.js"], a["Core/Utilities.js"]], function(a2, y, I) { + const { parse: x } = a2, { charts: C, noop: z } = y, { addEvent: H, attr: B, css: u, defined: v, extend: l2, find: p, fireEvent: t, isNumber: m, isObject: h, objectEach: g, offset: e, pick: w, splat: E } = I; + class F { + constructor(a3, k) { + this.lastValidTouch = {}; + this.pinchDown = []; + this.runChartClick = false; + this.eventsToUnbind = []; + this.chart = a3; + this.hasDragged = false; + this.options = k; + this.init(a3, k); + } + applyInactiveState(a3) { + let d = [], e2; + (a3 || []).forEach(function(a4) { + e2 = a4.series; + d.push(e2); + e2.linkedParent && d.push(e2.linkedParent); + e2.linkedSeries && (d = d.concat(e2.linkedSeries)); + e2.navigatorSeries && d.push(e2.navigatorSeries); + }); + this.chart.series.forEach(function(a4) { + d.indexOf(a4) === -1 ? a4.setState("inactive", true) : a4.options.inactiveOtherPoints && a4.setAllPointsToState("inactive"); + }); + } + destroy() { + const a3 = this; + this.eventsToUnbind.forEach((a4) => a4()); + this.eventsToUnbind = []; + y.chartCount || (F.unbindDocumentMouseUp && (F.unbindDocumentMouseUp = F.unbindDocumentMouseUp()), F.unbindDocumentTouchEnd && (F.unbindDocumentTouchEnd = F.unbindDocumentTouchEnd())); + clearInterval(a3.tooltipTimeout); + g(a3, function(d, e2) { + a3[e2] = void 0; + }); + } + getSelectionMarkerAttrs(a3, k) { + const d = { args: { chartX: a3, chartY: k }, attrs: {}, shapeType: "rect" }; + t(this, "getSelectionMarkerAttrs", d, (d2) => { + const { chart: e2, mouseDownX: b = 0, mouseDownY: f = 0, zoomHor: c, zoomVert: n3 } = this; + d2 = d2.attrs; + let g2; + d2.x = e2.plotLeft; + d2.y = e2.plotTop; + d2.width = c ? 1 : e2.plotWidth; + d2.height = n3 ? 1 : e2.plotHeight; + c && (g2 = a3 - b, d2.width = Math.abs(g2), d2.x = (0 < g2 ? 0 : g2) + b); + n3 && (g2 = k - f, d2.height = Math.abs(g2), d2.y = (0 < g2 ? 0 : g2) + f); + }); + return d; + } + drag(a3) { + const d = this.chart, e2 = d.options.chart; + var g2 = d.plotLeft; + const l3 = d.plotTop, b = d.plotWidth, f = d.plotHeight, c = this.mouseDownX || 0, n3 = this.mouseDownY || 0, m2 = h(e2.panning) ? e2.panning && e2.panning.enabled : e2.panning, p2 = e2.panKey && a3[e2.panKey + "Key"]; + let t2 = a3.chartX, w2 = a3.chartY, v2 = this.selectionMarker; + if (!v2 || !v2.touch) { + if (t2 < g2 ? t2 = g2 : t2 > g2 + b && (t2 = g2 + b), w2 < l3 ? w2 = l3 : w2 > l3 + f && (w2 = l3 + f), this.hasDragged = Math.sqrt(Math.pow(c - t2, 2) + Math.pow(n3 - w2, 2)), 10 < this.hasDragged) { + g2 = d.isInsidePlot(c - g2, n3 - l3, { visiblePlotOnly: true }); + const { shapeType: b2, attrs: f2 } = this.getSelectionMarkerAttrs(t2, w2); + !d.hasCartesianSeries && !d.mapView || !this.zoomX && !this.zoomY || !g2 || p2 || v2 || (this.selectionMarker = v2 = d.renderer[b2](), v2.attr({ "class": "highcharts-selection-marker", zIndex: 7 }).add(), d.styledMode || v2.attr({ fill: e2.selectionMarkerFill || x("#334eff").setOpacity(0.25).get() })); + v2 && v2.attr(f2); + g2 && !v2 && m2 && d.pan(a3, e2.panning); + } + } + } + dragStart(a3) { + const d = this.chart; + d.mouseIsDown = a3.type; + d.cancelClick = false; + d.mouseDownX = this.mouseDownX = a3.chartX; + d.mouseDownY = this.mouseDownY = a3.chartY; + } + getSelectionBox(a3) { + const d = { args: { marker: a3 }, result: {} }; + t(this, "getSelectionBox", d, (d2) => { + d2.result = { x: a3.attr ? +a3.attr("x") : a3.x, y: a3.attr ? +a3.attr("y") : a3.y, width: a3.attr ? a3.attr("width") : a3.width, height: a3.attr ? a3.attr("height") : a3.height }; + }); + return d.result; + } + drop(a3) { + const d = this, e2 = this.chart, g2 = this.hasPinched; + if (this.selectionMarker) { + const { + x: k, + y: b, + width: f, + height: c + } = this.getSelectionBox(this.selectionMarker), n3 = { originalEvent: a3, xAxis: [], yAxis: [], x: k, y: b, width: f, height: c }; + let h3 = !!e2.mapView; + if (this.hasDragged || g2) + e2.axes.forEach(function(e3) { + if (e3.zoomEnabled && v(e3.min) && (g2 || d[{ xAxis: "zoomX", yAxis: "zoomY" }[e3.coll]]) && m(k) && m(b) && m(f) && m(c)) { + var q = e3.horiz; + const d2 = a3.type === "touchend" ? e3.minPixelPadding : 0, g3 = e3.toValue((q ? k : b) + d2); + q = e3.toValue((q ? k + f : b + c) - d2); + n3[e3.coll].push({ axis: e3, min: Math.min(g3, q), max: Math.max(g3, q) }); + h3 = true; + } + }), h3 && t(e2, "selection", n3, function(b2) { + e2.zoom(l2(b2, g2 ? { animation: false } : null)); + }); + m(e2.index) && (this.selectionMarker = this.selectionMarker.destroy()); + g2 && this.scaleGroups(); + } + e2 && m(e2.index) && (u(e2.container, { cursor: e2._cursor }), e2.cancelClick = 10 < this.hasDragged, e2.mouseIsDown = this.hasDragged = this.hasPinched = false, this.pinchDown = []); + } + findNearestKDPoint(a3, k, e2) { + let d; + a3.forEach(function(a4) { + var b = !(a4.noSharedTooltip && k) && 0 > a4.options.findNearestPointBy.indexOf("y"); + a4 = a4.searchPoint(e2, b); + if ((b = h(a4, true) && a4.series) && !(b = !h(d, true))) { + { + b = d.distX - a4.distX; + const f = d.dist - a4.dist, c = (a4.series.group && a4.series.group.zIndex) - (d.series.group && d.series.group.zIndex); + b = b !== 0 && k ? b : f !== 0 ? f : c !== 0 ? c : d.series.index > a4.series.index ? -1 : 1; + } + b = 0 < b; + } + b && (d = a4); + }); + return d; + } + getChartCoordinatesFromPoint(a3, k) { + var d = a3.series; + const e2 = d.xAxis; + d = d.yAxis; + const g2 = a3.shapeArgs; + if (e2 && d) { + let b = w(a3.clientX, a3.plotX), f = a3.plotY || 0; + a3.isNode && g2 && m(g2.x) && m(g2.y) && (b = g2.x, f = g2.y); + return k ? { chartX: d.len + d.pos - f, chartY: e2.len + e2.pos - b } : { chartX: b + e2.pos, chartY: f + d.pos }; + } + if (g2 && g2.x && g2.y) + return { chartX: g2.x, chartY: g2.y }; + } + getChartPosition() { + if (this.chartPosition) + return this.chartPosition; + var { container: a3 } = this.chart; + const k = e(a3); + this.chartPosition = { left: k.left, top: k.top, scaleX: 1, scaleY: 1 }; + const g2 = a3.offsetWidth; + a3 = a3.offsetHeight; + 2 < g2 && 2 < a3 && (this.chartPosition.scaleX = k.width / g2, this.chartPosition.scaleY = k.height / a3); + return this.chartPosition; + } + getCoordinates(a3) { + const d = { xAxis: [], yAxis: [] }; + this.chart.axes.forEach(function(k) { + d[k.isXAxis ? "xAxis" : "yAxis"].push({ axis: k, value: k.toValue(a3[k.horiz ? "chartX" : "chartY"]) }); + }); + return d; + } + getHoverData(a3, k, e2, g2, l3, b) { + const f = []; + g2 = !(!g2 || !a3); + const c = function(b2) { + return b2.visible && !(!l3 && b2.directTouch) && w(b2.options.enableMouseTracking, true); + }; + let d, q = { chartX: b ? b.chartX : void 0, chartY: b ? b.chartY : void 0, shared: l3 }; + t(this, "beforeGetHoverData", q); + d = k && !k.stickyTracking ? [k] : e2.filter((b2) => b2.stickyTracking && (q.filter || c)(b2)); + const r = g2 || !b ? a3 : this.findNearestKDPoint(d, l3, b); + k = r && r.series; + r && (l3 && !k.noSharedTooltip ? (d = e2.filter(function(b2) { + return q.filter ? q.filter(b2) : c(b2) && !b2.noSharedTooltip; + }), d.forEach(function(b2) { + let c2 = p(b2.points, function(b3) { + return b3.x === r.x && !b3.isNull; + }); + h(c2) && (b2.boosted && b2.boost && (c2 = b2.boost.getPoint(c2)), f.push(c2)); + })) : f.push(r)); + q = { hoverPoint: r }; + t(this, "afterGetHoverData", q); + return { hoverPoint: q.hoverPoint, hoverSeries: k, hoverPoints: f }; + } + getPointFromEvent(a3) { + a3 = a3.target; + let d; + for (; a3 && !d; ) + d = a3.point, a3 = a3.parentNode; + return d; + } + onTrackerMouseOut(a3) { + a3 = a3.relatedTarget; + const d = this.chart.hoverSeries; + this.isDirectTouch = false; + if (!(!d || !a3 || d.stickyTracking || this.inClass(a3, "highcharts-tooltip") || this.inClass(a3, "highcharts-series-" + d.index) && this.inClass(a3, "highcharts-tracker"))) + d.onMouseOut(); + } + inClass(a3, k) { + let d; + for (; a3; ) { + if (d = B(a3, "class")) { + if (d.indexOf(k) !== -1) + return true; + if (d.indexOf("highcharts-container") !== -1) + return false; + } + a3 = a3.parentElement; + } + } + init(a3, k) { + this.options = k; + this.chart = a3; + this.runChartClick = !(!k.chart.events || !k.chart.events.click); + this.pinchDown = []; + this.lastValidTouch = {}; + this.setDOMEvents(); + t(this, "afterInit"); + } + normalize(a3, k) { + var d = a3.touches, e2 = d ? d.length ? d.item(0) : w(d.changedTouches, a3.changedTouches)[0] : a3; + k || (k = this.getChartPosition()); + d = e2.pageX - k.left; + e2 = e2.pageY - k.top; + d /= k.scaleX; + e2 /= k.scaleY; + return l2(a3, { chartX: Math.round(d), chartY: Math.round(e2) }); + } + onContainerClick(a3) { + const d = this.chart, e2 = d.hoverPoint; + a3 = this.normalize(a3); + const g2 = d.plotLeft, h3 = d.plotTop; + d.cancelClick || (e2 && this.inClass(a3.target, "highcharts-tracker") ? (t(e2.series, "click", l2(a3, { point: e2 })), d.hoverPoint && e2.firePointEvent("click", a3)) : (l2(a3, this.getCoordinates(a3)), d.isInsidePlot(a3.chartX - g2, a3.chartY - h3, { visiblePlotOnly: true }) && t(d, "click", a3))); + } + onContainerMouseDown(a3) { + const d = ((a3.buttons || a3.button) & 1) === 1; + a3 = this.normalize(a3); + if (y.isFirefox && a3.button !== 0) + this.onContainerMouseMove(a3); + if (typeof a3.button === "undefined" || d) + this.zoomOption(a3), d && a3.preventDefault && a3.preventDefault(), this.dragStart(a3); + } + onContainerMouseLeave(a3) { + const d = C[w(F.hoverChartIndex, -1)]; + a3 = this.normalize(a3); + d && a3.relatedTarget && !this.inClass(a3.relatedTarget, "highcharts-tooltip") && (d.pointer.reset(), d.pointer.chartPosition = void 0); + } + onContainerMouseEnter(a3) { + delete this.chartPosition; + } + onContainerMouseMove(a3) { + const d = this.chart, e2 = d.tooltip; + a3 = this.normalize(a3); + this.setHoverChartIndex(); + (d.mouseIsDown === "mousedown" || this.touchSelect(a3)) && this.drag(a3); + d.openMenu || !this.inClass(a3.target, "highcharts-tracker") && !d.isInsidePlot(a3.chartX - d.plotLeft, a3.chartY - d.plotTop, { visiblePlotOnly: true }) || e2 && e2.shouldStickOnContact(a3) || (this.inClass(a3.target, "highcharts-no-tooltip") ? this.reset(false, 0) : this.runPointActions(a3)); + } + onDocumentTouchEnd(a3) { + const d = C[w(F.hoverChartIndex, -1)]; + d && d.pointer.drop(a3); + } + onContainerTouchMove(a3) { + if (this.touchSelect(a3)) + this.onContainerMouseMove(a3); + else + this.touch(a3); + } + onContainerTouchStart(a3) { + if (this.touchSelect(a3)) + this.onContainerMouseDown(a3); + else + this.zoomOption(a3), this.touch(a3, true); + } + onDocumentMouseMove(a3) { + const d = this.chart, e2 = d.tooltip, g2 = this.chartPosition; + a3 = this.normalize(a3, g2); + !g2 || d.isInsidePlot(a3.chartX - d.plotLeft, a3.chartY - d.plotTop, { visiblePlotOnly: true }) || e2 && e2.shouldStickOnContact(a3) || this.inClass(a3.target, "highcharts-tracker") || this.reset(); + } + onDocumentMouseUp(a3) { + const d = C[w(F.hoverChartIndex, -1)]; + d && d.pointer.drop(a3); + } + pinch(a3) { + const d = this, e2 = d.chart, g2 = d.pinchDown, h3 = a3.touches || [], b = h3.length, f = d.lastValidTouch, c = d.hasZoom, n3 = {}, m2 = b === 1 && (d.inClass(a3.target, "highcharts-tracker") && e2.runTrackerClick || d.runChartClick), p2 = {}; + var v2 = d.chart.tooltip; + v2 = b === 1 && w(v2 && v2.options.followTouchMove, true); + let u2 = d.selectionMarker; + 1 < b ? d.initiated = true : v2 && (d.initiated = false); + c && d.initiated && !m2 && a3.cancelable !== false && a3.preventDefault(); + [].map.call(h3, function(b2) { + return d.normalize(b2); + }); + a3.type === "touchstart" ? ([].forEach.call(h3, function(b2, a4) { + g2[a4] = { chartX: b2.chartX, chartY: b2.chartY }; + }), f.x = [g2[0].chartX, g2[1] && g2[1].chartX], f.y = [g2[0].chartY, g2[1] && g2[1].chartY], e2.axes.forEach(function(b2) { + if (b2.zoomEnabled) { + const a4 = e2.bounds[b2.horiz ? "h" : "v"], c2 = b2.minPixelPadding, f2 = b2.toPixels(Math.min(w(b2.options.min, b2.dataMin), b2.dataMin)), d2 = b2.toPixels(Math.max(w(b2.options.max, b2.dataMax), b2.dataMax)), n4 = Math.max(f2, d2); + a4.min = Math.min(b2.pos, Math.min(f2, d2) - c2); + a4.max = Math.max(b2.pos + b2.len, n4 + c2); + } + }), d.res = true) : v2 ? this.runPointActions(d.normalize(a3)) : g2.length && (t(e2, "touchpan", { originalEvent: a3 }, () => { + u2 || (d.selectionMarker = u2 = l2({ destroy: z, touch: true }, e2.plotBox)); + d.pinchTranslate(g2, h3, n3, u2, p2, f); + d.hasPinched = c; + d.scaleGroups(n3, p2); + }), d.res && (d.res = false, this.reset(false, 0))); + } + pinchTranslate(a3, e2, g2, h3, l3, b) { + this.zoomHor && this.pinchTranslateDirection(true, a3, e2, g2, h3, l3, b); + this.zoomVert && this.pinchTranslateDirection(false, a3, e2, g2, h3, l3, b); + } + pinchTranslateDirection(a3, e2, g2, h3, l3, b, f, c) { + const d = this.chart, k = a3 ? "x" : "y", q = a3 ? "X" : "Y", m2 = "chart" + q, r = a3 ? "width" : "height", p2 = d["plot" + (a3 ? "Left" : "Top")], t2 = d.inverted, w2 = d.bounds[a3 ? "h" : "v"], v2 = e2.length === 1, u2 = e2[0][m2], x2 = !v2 && e2[1][m2]; + e2 = function() { + typeof N === "number" && 20 < Math.abs(u2 - x2) && (F2 = c || Math.abs(J - N) / Math.abs(u2 - x2)); + E2 = (p2 - J) / F2 + u2; + G = d["plot" + (a3 ? "Width" : "Height")] / F2; + }; + let G, E2, F2 = c || 1, J = g2[0][m2], N = !v2 && g2[1][m2], O; + e2(); + g2 = E2; + g2 < w2.min ? (g2 = w2.min, O = true) : g2 + G > w2.max && (g2 = w2.max - G, O = true); + O ? (J -= 0.8 * (J - f[k][0]), typeof N === "number" && (N -= 0.8 * (N - f[k][1])), e2()) : f[k] = [J, N]; + t2 || (b[k] = E2 - p2, b[r] = G); + b = t2 ? 1 / F2 : F2; + l3[r] = G; + l3[k] = g2; + h3[t2 ? a3 ? "scaleY" : "scaleX" : "scale" + q] = F2; + h3["translate" + q] = b * p2 + (J - b * u2); + } + reset(a3, e2) { + const d = this.chart, k = d.hoverSeries, g2 = d.hoverPoint, b = d.hoverPoints, f = d.tooltip, c = f && f.shared ? b : g2; + a3 && c && E(c).forEach(function(b2) { + b2.series.isCartesian && typeof b2.plotX === "undefined" && (a3 = false); + }); + if (a3) + f && c && E(c).length && (f.refresh(c), f.shared && b ? b.forEach(function(b2) { + b2.setState(b2.state, true); + b2.series.isCartesian && (b2.series.xAxis.crosshair && b2.series.xAxis.drawCrosshair(null, b2), b2.series.yAxis.crosshair && b2.series.yAxis.drawCrosshair(null, b2)); + }) : g2 && (g2.setState(g2.state, true), d.axes.forEach(function(b2) { + b2.crosshair && g2.series[b2.coll] === b2 && b2.drawCrosshair(null, g2); + }))); + else { + if (g2) + g2.onMouseOut(); + b && b.forEach(function(b2) { + b2.setState(); + }); + if (k) + k.onMouseOut(); + f && f.hide(e2); + this.unDocMouseMove && (this.unDocMouseMove = this.unDocMouseMove()); + d.axes.forEach(function(b2) { + b2.hideCrosshair(); + }); + this.hoverX = d.hoverPoints = d.hoverPoint = null; + } + } + runPointActions(a3, e2, g2) { + const d = this.chart, k = d.tooltip && d.tooltip.options.enabled ? d.tooltip : void 0, b = k ? k.shared : false; + let f = e2 || d.hoverPoint, c = f && f.series || d.hoverSeries; + e2 = this.getHoverData(f, c, d.series, (!a3 || a3.type !== "touchmove") && (!!e2 || c && c.directTouch && this.isDirectTouch), b, a3); + f = e2.hoverPoint; + c = e2.hoverSeries; + const n3 = e2.hoverPoints; + e2 = c && c.tooltipOptions.followPointer && !c.tooltipOptions.split; + const h3 = b && c && !c.noSharedTooltip; + if (f && (g2 || f !== d.hoverPoint || k && k.isHidden)) { + (d.hoverPoints || []).forEach(function(b2) { + n3.indexOf(b2) === -1 && b2.setState(); + }); + if (d.hoverSeries !== c) + c.onMouseOver(); + this.applyInactiveState(n3); + (n3 || []).forEach(function(b2) { + b2.setState("hover"); + }); + d.hoverPoint && d.hoverPoint.firePointEvent("mouseOut"); + if (!f.series) + return; + d.hoverPoints = n3; + d.hoverPoint = f; + f.firePointEvent("mouseOver", void 0, () => { + k && f && k.refresh(h3 ? n3 : f, a3); + }); + } else + e2 && k && !k.isHidden && (g2 = k.getAnchor([{}], a3), d.isInsidePlot(g2[0], g2[1], { visiblePlotOnly: true }) && k.updatePosition({ + plotX: g2[0], + plotY: g2[1] + })); + this.unDocMouseMove || (this.unDocMouseMove = H(d.container.ownerDocument, "mousemove", function(b2) { + const a4 = C[F.hoverChartIndex]; + if (a4) + a4.pointer.onDocumentMouseMove(b2); + }), this.eventsToUnbind.push(this.unDocMouseMove)); + d.axes.forEach(function(b2) { + const c2 = w((b2.crosshair || {}).snap, true); + let f2; + c2 && ((f2 = d.hoverPoint) && f2.series[b2.coll] === b2 || (f2 = p(n3, (a4) => a4.series && a4.series[b2.coll] === b2))); + f2 || !c2 ? b2.drawCrosshair(a3, f2) : b2.hideCrosshair(); + }); + } + scaleGroups(a3, e2) { + const d = this.chart; + d.series.forEach(function(k) { + const g2 = a3 || k.getPlotBox(); + k.group && (k.xAxis && k.xAxis.zoomEnabled || d.mapView) && (k.group.attr(g2), k.markerGroup && (k.markerGroup.attr(g2), k.markerGroup.clip(e2 ? d.clipRect : null)), k.dataLabelsGroup && k.dataLabelsGroup.attr(g2)); + }); + d.clipRect.attr(e2 || d.clipBox); + } + setDOMEvents() { + const a3 = this.chart.container, e2 = a3.ownerDocument; + a3.onmousedown = this.onContainerMouseDown.bind(this); + a3.onmousemove = this.onContainerMouseMove.bind(this); + a3.onclick = this.onContainerClick.bind(this); + this.eventsToUnbind.push(H(a3, "mouseenter", this.onContainerMouseEnter.bind(this))); + this.eventsToUnbind.push(H(a3, "mouseleave", this.onContainerMouseLeave.bind(this))); + F.unbindDocumentMouseUp || (F.unbindDocumentMouseUp = H(e2, "mouseup", this.onDocumentMouseUp.bind(this))); + let g2 = this.chart.renderTo.parentElement; + for (; g2 && g2.tagName !== "BODY"; ) + this.eventsToUnbind.push(H(g2, "scroll", () => { + delete this.chartPosition; + })), g2 = g2.parentElement; + y.hasTouch && (this.eventsToUnbind.push(H(a3, "touchstart", this.onContainerTouchStart.bind(this), { passive: false })), this.eventsToUnbind.push(H(a3, "touchmove", this.onContainerTouchMove.bind(this), { passive: false })), F.unbindDocumentTouchEnd || (F.unbindDocumentTouchEnd = H(e2, "touchend", this.onDocumentTouchEnd.bind(this), { passive: false }))); + } + setHoverChartIndex() { + const a3 = this.chart, e2 = y.charts[w(F.hoverChartIndex, -1)]; + if (e2 && e2 !== a3) + e2.pointer.onContainerMouseLeave({ relatedTarget: a3.container }); + e2 && e2.mouseIsDown || (F.hoverChartIndex = a3.index); + } + touch(a3, e2) { + const d = this.chart; + let g2, k; + this.setHoverChartIndex(); + a3.touches.length === 1 ? (a3 = this.normalize(a3), (k = d.isInsidePlot(a3.chartX - d.plotLeft, a3.chartY - d.plotTop, { visiblePlotOnly: true })) && !d.openMenu ? (e2 && this.runPointActions(a3), a3.type === "touchmove" && (e2 = this.pinchDown, g2 = e2[0] ? 4 <= Math.sqrt(Math.pow(e2[0].chartX - a3.chartX, 2) + Math.pow(e2[0].chartY - a3.chartY, 2)) : false), w(g2, true) && this.pinch(a3)) : e2 && this.reset()) : a3.touches.length === 2 && this.pinch(a3); + } + touchSelect(a3) { + return !(!this.chart.zooming.singleTouch || !a3.touches || a3.touches.length !== 1); + } + zoomOption(a3) { + const d = this.chart, e2 = d.inverted; + var g2 = d.zooming.type || ""; + /touch/.test(a3.type) && (g2 = w(d.zooming.pinchType, g2)); + this.zoomX = a3 = /x/.test(g2); + this.zoomY = g2 = /y/.test(g2); + this.zoomHor = a3 && !e2 || g2 && e2; + this.zoomVert = g2 && !e2 || a3 && e2; + this.hasZoom = a3 || g2; + } + } + (function(a3) { + const d = [], e2 = []; + a3.compose = function(d2) { + I.pushUnique(e2, d2) && H(d2, "beforeRender", function() { + this.pointer = new a3(this, this.options); + }); + }; + a3.dissolve = function() { + for (let a4 = 0, e3 = d.length; a4 < e3; ++a4) + d[a4](); + d.length = 0; + }; + })(F || (F = {})); + ""; + return F; + }); + M(a, "Core/Legend/Legend.js", [a["Core/Animation/AnimationUtilities.js"], a["Core/Templating.js"], a["Core/Globals.js"], a["Core/Series/Point.js"], a["Core/Renderer/RendererUtilities.js"], a["Core/Utilities.js"]], function(a2, y, I, L, C, z) { + const { animObject: x, setAnimation: B } = a2, { format: u } = y, { marginNames: v } = I, { distribute: l2 } = C, { addEvent: p, createElement: t, css: m, defined: h, discardElement: g, find: e, fireEvent: w, isNumber: E, merge: F, pick: d, relativeLength: k, stableSort: r, syncTimeout: q } = z; + class G { + constructor(b, a3) { + this.allItems = []; + this.contentGroup = this.box = void 0; + this.display = false; + this.group = void 0; + this.offsetWidth = this.maxLegendWidth = this.maxItemWidth = this.legendWidth = this.legendHeight = this.lastLineHeight = this.lastItemY = this.itemY = this.itemX = this.itemMarginTop = this.itemMarginBottom = this.itemHeight = this.initialItemY = 0; + this.options = void 0; + this.padding = 0; + this.pages = []; + this.proximate = false; + this.scrollGroup = void 0; + this.widthOption = this.totalItemWidth = this.titleHeight = this.symbolWidth = this.symbolHeight = 0; + this.chart = b; + this.init(b, a3); + } + init(b, a3) { + this.chart = b; + this.setOptions(a3); + a3.enabled && (this.render(), p(this.chart, "endResize", function() { + this.legend.positionCheckboxes(); + }), p(this.chart, "render", () => { + this.proximate && (this.proximatePositions(), this.positionItems()); + })); + } + setOptions(b) { + const a3 = d(b.padding, 8); + this.options = b; + this.chart.styledMode || (this.itemStyle = b.itemStyle, this.itemHiddenStyle = F(this.itemStyle, b.itemHiddenStyle)); + this.itemMarginTop = b.itemMarginTop; + this.itemMarginBottom = b.itemMarginBottom; + this.padding = a3; + this.initialItemY = a3 - 5; + this.symbolWidth = d(b.symbolWidth, 16); + this.pages = []; + this.proximate = b.layout === "proximate" && !this.chart.inverted; + this.baseline = void 0; + } + update(b, a3) { + const c = this.chart; + this.setOptions(F(true, this.options, b)); + this.destroy(); + c.isDirtyLegend = c.isDirtyBox = true; + d(a3, true) && c.redraw(); + w(this, "afterUpdate"); + } + colorizeItem(b, a3) { + const { group: c, label: f, line: d2, symbol: e2 } = b.legendItem || {}; + if (c) + c[a3 ? "removeClass" : "addClass"]("highcharts-legend-item-hidden"); + if (!this.chart.styledMode) { + const { itemHiddenStyle: c2 } = this, g2 = c2.color, k2 = a3 ? b.color || g2 : g2, n3 = b.options && b.options.marker; + let h3 = { fill: k2 }; + f === null || f === void 0 ? void 0 : f.css(F(a3 ? this.itemStyle : c2)); + d2 === null || d2 === void 0 ? void 0 : d2.attr({ stroke: k2 }); + e2 && (n3 && e2.isMarker && (h3 = b.pointAttribs(), a3 || (h3.stroke = h3.fill = g2)), e2.attr(h3)); + } + w(this, "afterColorizeItem", { item: b, visible: a3 }); + } + positionItems() { + this.allItems.forEach(this.positionItem, this); + this.chart.isResizing || this.positionCheckboxes(); + } + positionItem(b) { + const { group: a3, x: c = 0, y: d2 = 0 } = b.legendItem || {}; + var e2 = this.options, g2 = e2.symbolPadding; + const k2 = !e2.rtl; + e2 = b.checkbox; + a3 && a3.element && (g2 = { translateX: k2 ? c : this.legendWidth - c - 2 * g2 - 4, translateY: d2 }, a3[h(a3.translateY) ? "animate" : "attr"](g2, void 0, () => { + w(this, "afterPositionItem", { item: b }); + })); + e2 && (e2.x = c, e2.y = d2); + } + destroyItem(b) { + const a3 = b.checkbox, c = b.legendItem || {}; + for (const b2 of ["group", "label", "line", "symbol"]) + c[b2] && (c[b2] = c[b2].destroy()); + a3 && g(a3); + b.legendItem = void 0; + } + destroy() { + for (const b of this.getAllItems()) + this.destroyItem(b); + for (const b of "clipRect up down pager nav box title group".split(" ")) + this[b] && (this[b] = this[b].destroy()); + this.display = null; + } + positionCheckboxes() { + const b = this.group && this.group.alignAttr, a3 = this.clipHeight || this.legendHeight, c = this.titleHeight; + let d2; + b && (d2 = b.translateY, this.allItems.forEach(function(f) { + const e2 = f.checkbox; + let g2; + e2 && (g2 = d2 + c + e2.y + (this.scrollOffset || 0) + 3, m(e2, { left: b.translateX + f.checkboxOffset + e2.x - 20 + "px", top: g2 + "px", display: this.proximate || g2 > d2 - 6 && g2 < d2 + a3 - 6 ? "" : "none" })); + }, this)); + } + renderTitle() { + var b = this.options; + const a3 = this.padding, c = b.title; + let d2 = 0; + c.text && (this.title || (this.title = this.chart.renderer.label(c.text, a3 - 3, a3 - 4, void 0, void 0, void 0, b.useHTML, void 0, "legend-title").attr({ zIndex: 1 }), this.chart.styledMode || this.title.css(c.style), this.title.add(this.group)), c.width || this.title.css({ width: this.maxLegendWidth + "px" }), b = this.title.getBBox(), d2 = b.height, this.offsetWidth = b.width, this.contentGroup.attr({ translateY: d2 })); + this.titleHeight = d2; + } + setText(b) { + const a3 = this.options; + b.legendItem.label.attr({ text: a3.labelFormat ? u(a3.labelFormat, b, this.chart) : a3.labelFormatter.call(b) }); + } + renderItem(b) { + const a3 = b.legendItem = b.legendItem || {}; + var c = this.chart, e2 = c.renderer; + const g2 = this.options, k2 = this.symbolWidth, h3 = g2.symbolPadding || 0, l3 = this.itemStyle, m2 = this.itemHiddenStyle, q2 = g2.layout === "horizontal" ? d(g2.itemDistance, 20) : 0, r2 = !g2.rtl, p2 = !b.series, t2 = !p2 && b.series.drawLegendSymbol ? b.series : b; + var w2 = t2.options; + const v2 = this.createCheckboxForItem && w2 && w2.showCheckbox, u2 = g2.useHTML, x2 = b.options.className; + let J = a3.label; + w2 = k2 + h3 + q2 + (v2 ? 20 : 0); + J || (a3.group = e2.g("legend-item").addClass("highcharts-" + t2.type + "-series highcharts-color-" + b.colorIndex + (x2 ? " " + x2 : "") + (p2 ? " highcharts-series-" + b.index : "")).attr({ zIndex: 1 }).add(this.scrollGroup), a3.label = J = e2.text("", r2 ? k2 + h3 : -h3, this.baseline || 0, u2), c.styledMode || J.css(F(b.visible ? l3 : m2)), J.attr({ align: r2 ? "left" : "right", zIndex: 2 }).add(a3.group), this.baseline || (this.fontMetrics = e2.fontMetrics(J), this.baseline = this.fontMetrics.f + 3 + this.itemMarginTop, J.attr("y", this.baseline), this.symbolHeight = d(g2.symbolHeight, this.fontMetrics.f), g2.squareSymbol && (this.symbolWidth = d(g2.symbolWidth, Math.max(this.symbolHeight, 16)), w2 = this.symbolWidth + h3 + q2 + (v2 ? 20 : 0), r2 && J.attr("x", this.symbolWidth + h3))), t2.drawLegendSymbol(this, b), this.setItemEvents && this.setItemEvents(b, J, u2)); + v2 && !b.checkbox && this.createCheckboxForItem && this.createCheckboxForItem(b); + this.colorizeItem(b, b.visible); + !c.styledMode && l3.width || J.css({ width: (g2.itemWidth || this.widthOption || c.spacingBox.width) - w2 + "px" }); + this.setText(b); + c = J.getBBox(); + e2 = this.fontMetrics && this.fontMetrics.h || 0; + b.itemWidth = b.checkboxOffset = g2.itemWidth || a3.labelWidth || c.width + w2; + this.maxItemWidth = Math.max(this.maxItemWidth, b.itemWidth); + this.totalItemWidth += b.itemWidth; + this.itemHeight = b.itemHeight = Math.round(a3.labelHeight || (c.height > 1.5 * e2 ? c.height : e2)); + } + layoutItem(b) { + var a3 = this.options; + const c = this.padding, e2 = a3.layout === "horizontal", g2 = b.itemHeight, k2 = this.itemMarginBottom, h3 = this.itemMarginTop, l3 = e2 ? d(a3.itemDistance, 20) : 0, m2 = this.maxLegendWidth; + a3 = a3.alignColumns && this.totalItemWidth > m2 ? this.maxItemWidth : b.itemWidth; + const q2 = b.legendItem || {}; + e2 && this.itemX - c + a3 > m2 && (this.itemX = c, this.lastLineHeight && (this.itemY += h3 + this.lastLineHeight + k2), this.lastLineHeight = 0); + this.lastItemY = h3 + this.itemY + k2; + this.lastLineHeight = Math.max(g2, this.lastLineHeight); + q2.x = this.itemX; + q2.y = this.itemY; + e2 ? this.itemX += a3 : (this.itemY += h3 + g2 + k2, this.lastLineHeight = g2); + this.offsetWidth = this.widthOption || Math.max((e2 ? this.itemX - c - (b.checkbox ? 0 : l3) : a3) + c, this.offsetWidth); + } + getAllItems() { + let b = []; + this.chart.series.forEach(function(a3) { + const c = a3 && a3.options; + a3 && d(c.showInLegend, h(c.linkedTo) ? false : void 0, true) && (b = b.concat((a3.legendItem || {}).labels || (c.legendType === "point" ? a3.data : a3))); + }); + w(this, "afterGetAllItems", { allItems: b }); + return b; + } + getAlignment() { + const b = this.options; + return this.proximate ? b.align.charAt(0) + "tv" : b.floating ? "" : b.align.charAt(0) + b.verticalAlign.charAt(0) + b.layout.charAt(0); + } + adjustMargins(b, a3) { + const c = this.chart, f = this.options, e2 = this.getAlignment(); + e2 && [/(lth|ct|rth)/, /(rtv|rm|rbv)/, /(rbh|cb|lbh)/, /(lbv|lm|ltv)/].forEach(function(g2, k2) { + g2.test(e2) && !h(b[k2]) && (c[v[k2]] = Math.max(c[v[k2]], c.legend[(k2 + 1) % 2 ? "legendHeight" : "legendWidth"] + [1, -1, -1, 1][k2] * f[k2 % 2 ? "x" : "y"] + d(f.margin, 12) + a3[k2] + (c.titleOffset[k2] || 0))); + }); + } + proximatePositions() { + const b = this.chart, a3 = [], c = this.options.align === "left"; + this.allItems.forEach(function(d3) { + var f; + var g2 = c; + let k2; + d3.yAxis && (d3.xAxis.options.reversed && (g2 = !g2), d3.points && (f = e(g2 ? d3.points : d3.points.slice(0).reverse(), function(b2) { + return E(b2.plotY); + })), g2 = this.itemMarginTop + d3.legendItem.label.getBBox().height + this.itemMarginBottom, k2 = d3.yAxis.top - b.plotTop, d3.visible ? (f = f ? f.plotY : d3.yAxis.height, f += k2 - 0.3 * g2) : f = k2 + d3.yAxis.height, a3.push({ target: f, size: g2, item: d3 })); + }, this); + let d2; + for (const c2 of l2(a3, b.plotHeight)) + d2 = c2.item.legendItem || {}, E(c2.pos) && (d2.y = b.plotTop - b.spacing[0] + c2.pos); + } + render() { + const b = this.chart, a3 = b.renderer, c = this.options, d2 = this.padding; + var e2 = this.getAllItems(); + let g2, h3 = this.group, l3 = this.box; + this.itemX = d2; + this.itemY = this.initialItemY; + this.lastItemY = this.offsetWidth = 0; + this.widthOption = k(c.width, b.spacingBox.width - d2); + var m2 = b.spacingBox.width - 2 * d2 - c.x; + -1 < ["rm", "lm"].indexOf(this.getAlignment().substring(0, 2)) && (m2 /= 2); + this.maxLegendWidth = this.widthOption || m2; + h3 || (this.group = h3 = a3.g("legend").addClass(c.className || "").attr({ zIndex: 7 }).add(), this.contentGroup = a3.g().attr({ zIndex: 1 }).add(h3), this.scrollGroup = a3.g().add(this.contentGroup)); + this.renderTitle(); + r(e2, (b2, a4) => (b2.options && b2.options.legendIndex || 0) - (a4.options && a4.options.legendIndex || 0)); + c.reversed && e2.reverse(); + this.allItems = e2; + this.display = m2 = !!e2.length; + this.itemHeight = this.totalItemWidth = this.maxItemWidth = this.lastLineHeight = 0; + e2.forEach(this.renderItem, this); + e2.forEach(this.layoutItem, this); + e2 = (this.widthOption || this.offsetWidth) + d2; + g2 = this.lastItemY + this.lastLineHeight + this.titleHeight; + g2 = this.handleOverflow(g2); + g2 += d2; + l3 || (this.box = l3 = a3.rect().addClass("highcharts-legend-box").attr({ r: c.borderRadius }).add(h3)); + b.styledMode || l3.attr({ + stroke: c.borderColor, + "stroke-width": c.borderWidth || 0, + fill: c.backgroundColor || "none" + }).shadow(c.shadow); + if (0 < e2 && 0 < g2) + l3[l3.placed ? "animate" : "attr"](l3.crisp.call({}, { x: 0, y: 0, width: e2, height: g2 }, l3.strokeWidth())); + h3[m2 ? "show" : "hide"](); + b.styledMode && h3.getStyle("display") === "none" && (e2 = g2 = 0); + this.legendWidth = e2; + this.legendHeight = g2; + m2 && this.align(); + this.proximate || this.positionItems(); + w(this, "afterRender"); + } + align(b = this.chart.spacingBox) { + const a3 = this.chart, c = this.options; + let d2 = b.y; + /(lth|ct|rth)/.test(this.getAlignment()) && 0 < a3.titleOffset[0] ? d2 += a3.titleOffset[0] : /(lbh|cb|rbh)/.test(this.getAlignment()) && 0 < a3.titleOffset[2] && (d2 -= a3.titleOffset[2]); + d2 !== b.y && (b = F(b, { y: d2 })); + a3.hasRendered || (this.group.placed = false); + this.group.align(F(c, { width: this.legendWidth, height: this.legendHeight, verticalAlign: this.proximate ? "top" : c.verticalAlign }), true, b); + } + handleOverflow(b) { + const a3 = this, c = this.chart, e2 = c.renderer, g2 = this.options; + var k2 = g2.y; + const h3 = g2.verticalAlign === "top", l3 = this.padding, m2 = g2.maxHeight, q2 = g2.navigation, r2 = d(q2.animation, true), p2 = q2.arrowSize || 12, t2 = this.pages, w2 = this.allItems, v2 = function(b2) { + typeof b2 === "number" ? E2.attr({ height: b2 }) : E2 && (a3.clipRect = E2.destroy(), a3.contentGroup.clip()); + a3.contentGroup.div && (a3.contentGroup.div.style.clip = b2 ? "rect(" + l3 + "px,9999px," + (l3 + b2) + "px,0)" : "auto"); + }, u2 = function(b2) { + a3[b2] = e2.circle(0, 0, 1.3 * p2).translate(p2 / 2, p2 / 2).add(O); + c.styledMode || a3[b2].attr("fill", "rgba(0,0,0,0.0001)"); + return a3[b2]; + }; + let x2, J, N; + k2 = c.spacingBox.height + (h3 ? -k2 : k2) - l3; + let O = this.nav, E2 = this.clipRect; + g2.layout !== "horizontal" || g2.verticalAlign === "middle" || g2.floating || (k2 /= 2); + m2 && (k2 = Math.min(k2, m2)); + t2.length = 0; + b && 0 < k2 && b > k2 && q2.enabled !== false ? (this.clipHeight = x2 = Math.max(k2 - 20 - this.titleHeight - l3, 0), this.currentPage = d(this.currentPage, 1), this.fullHeight = b, w2.forEach((b2, a4) => { + N = b2.legendItem || {}; + b2 = N.y || 0; + const c2 = Math.round(N.label.getBBox().height); + let d2 = t2.length; + if (!d2 || b2 - t2[d2 - 1] > x2 && (J || b2) !== t2[d2 - 1]) + t2.push(J || b2), d2++; + N.pageIx = d2 - 1; + J && ((w2[a4 - 1].legendItem || {}).pageIx = d2 - 1); + a4 === w2.length - 1 && b2 + c2 - t2[d2 - 1] > x2 && b2 > t2[d2 - 1] && (t2.push(b2), N.pageIx = d2); + b2 !== J && (J = b2); + }), E2 || (E2 = a3.clipRect = e2.clipRect(0, l3 - 2, 9999, 0), a3.contentGroup.clip(E2)), v2(x2), O || (this.nav = O = e2.g().attr({ zIndex: 1 }).add(this.group), this.up = e2.symbol("triangle", 0, 0, p2, p2).add(O), u2("upTracker").on("click", function() { + a3.scroll(-1, r2); + }), this.pager = e2.text("", 15, 10).addClass("highcharts-legend-navigation"), !c.styledMode && q2.style && this.pager.css(q2.style), this.pager.add(O), this.down = e2.symbol("triangle-down", 0, 0, p2, p2).add(O), u2("downTracker").on("click", function() { + a3.scroll(1, r2); + })), a3.scroll(0), b = k2) : O && (v2(), this.nav = O.destroy(), this.scrollGroup.attr({ translateY: 1 }), this.clipHeight = 0); + return b; + } + scroll(b, a3) { + const c = this.chart, f = this.pages, e2 = f.length, g2 = this.clipHeight, k2 = this.options.navigation, h3 = this.pager, l3 = this.padding; + let m2 = this.currentPage + b; + m2 > e2 && (m2 = e2); + 0 < m2 && (typeof a3 !== "undefined" && B(a3, c), this.nav.attr({ translateX: l3, translateY: g2 + this.padding + 7 + this.titleHeight, visibility: "inherit" }), [this.up, this.upTracker].forEach(function(b2) { + b2.attr({ "class": m2 === 1 ? "highcharts-legend-nav-inactive" : "highcharts-legend-nav-active" }); + }), h3.attr({ text: m2 + "/" + e2 }), [this.down, this.downTracker].forEach(function(b2) { + b2.attr({ x: 18 + this.pager.getBBox().width, "class": m2 === e2 ? "highcharts-legend-nav-inactive" : "highcharts-legend-nav-active" }); + }, this), c.styledMode || (this.up.attr({ fill: m2 === 1 ? k2.inactiveColor : k2.activeColor }), this.upTracker.css({ cursor: m2 === 1 ? "default" : "pointer" }), this.down.attr({ fill: m2 === e2 ? k2.inactiveColor : k2.activeColor }), this.downTracker.css({ cursor: m2 === e2 ? "default" : "pointer" })), this.scrollOffset = -f[m2 - 1] + this.initialItemY, this.scrollGroup.animate({ translateY: this.scrollOffset }), this.currentPage = m2, this.positionCheckboxes(), b = x(d(a3, c.renderer.globalAnimation, true)), q(() => { + w(this, "afterScroll", { currentPage: m2 }); + }, b.duration)); + } + setItemEvents(b, a3, c) { + const d2 = this, f = b.legendItem || {}, e2 = d2.chart.renderer.boxWrapper, g2 = b instanceof L, k2 = "highcharts-legend-" + (g2 ? "point" : "series") + "-active", h3 = d2.chart.styledMode; + c = c ? [a3, f.symbol] : [f.group]; + const l3 = (a4) => { + d2.allItems.forEach((c2) => { + b !== c2 && [c2].concat(c2.linkedSeries || []).forEach((b2) => { + b2.setState(a4, !g2); + }); + }); + }; + for (const f2 of c) + if (f2) + f2.on("mouseover", function() { + b.visible && l3("inactive"); + b.setState("hover"); + b.visible && e2.addClass(k2); + h3 || a3.css(d2.options.itemHoverStyle); + }).on("mouseout", function() { + d2.chart.styledMode || a3.css(F(b.visible ? d2.itemStyle : d2.itemHiddenStyle)); + l3(""); + e2.removeClass(k2); + b.setState(); + }).on("click", function(a4) { + const c2 = function() { + b.setVisible && b.setVisible(); + l3(b.visible ? "inactive" : ""); + }; + e2.removeClass(k2); + a4 = { browserEvent: a4 }; + b.firePointEvent ? b.firePointEvent("legendItemClick", a4, c2) : w(b, "legendItemClick", a4, c2); + }); + } + createCheckboxForItem(b) { + b.checkbox = t("input", { + type: "checkbox", + className: "highcharts-legend-checkbox", + checked: b.selected, + defaultChecked: b.selected + }, this.options.itemCheckboxStyle, this.chart.container); + p(b.checkbox, "click", function(a3) { + w(b.series || b, "checkboxClick", { checked: a3.target.checked, item: b }, function() { + b.select(); + }); + }); + } + } + (function(b) { + const a3 = []; + b.compose = function(c) { + z.pushUnique(a3, c) && p(c, "beforeMargins", function() { + this.legend = new b(this, this.options.legend); + }); + }; + })(G || (G = {})); + ""; + return G; + }); + M(a, "Core/Legend/LegendSymbol.js", [a["Core/Utilities.js"]], function(a2) { + const { extend: x, merge: I, pick: L } = a2; + var C; + (function(a3) { + a3.lineMarker = function(a4, B) { + B = this.legendItem = this.legendItem || {}; + var u = this.options; + const v = a4.symbolWidth, l2 = a4.symbolHeight, p = l2 / 2, t = this.chart.renderer, m = B.group; + a4 = a4.baseline - Math.round(0.3 * a4.fontMetrics.b); + let h = {}, g = u.marker, e = 0; + this.chart.styledMode || (h = { "stroke-width": Math.min(u.lineWidth || 0, 24) }, u.dashStyle ? h.dashstyle = u.dashStyle : u.linecap !== "square" && (h["stroke-linecap"] = "round")); + B.line = t.path().addClass("highcharts-graph").attr(h).add(m); + h["stroke-linecap"] && (e = Math.min(B.line.strokeWidth(), v) / 2); + v && B.line.attr({ d: [["M", e, a4], ["L", v - e, a4]] }); + g && g.enabled !== false && v && (u = Math.min(L(g.radius, p), p), this.symbol.indexOf("url") === 0 && (g = I(g, { width: l2, height: l2 }), u = 0), B.symbol = B = t.symbol(this.symbol, v / 2 - u, a4 - u, 2 * u, 2 * u, x({ context: "legend" }, g)).addClass("highcharts-point").add(m), B.isMarker = true); + }; + a3.rectangle = function(a4, x2) { + x2 = x2.legendItem || {}; + const u = a4.symbolHeight, v = a4.options.squareSymbol; + x2.symbol = this.chart.renderer.rect(v ? (a4.symbolWidth - u) / 2 : 0, a4.baseline - u + 1, v ? u : a4.symbolWidth, u, L(a4.options.symbolRadius, u / 2)).addClass("highcharts-point").attr({ zIndex: 3 }).add(x2.group); + }; + })(C || (C = {})); + return C; + }); + M(a, "Core/Series/SeriesDefaults.js", [], function() { + return { + lineWidth: 1, + allowPointSelect: false, + crisp: true, + showCheckbox: false, + animation: { duration: 1e3 }, + enableMouseTracking: true, + events: {}, + marker: { enabledThreshold: 2, lineColor: "#ffffff", lineWidth: 0, radius: 4, states: { normal: { animation: true }, hover: { animation: { duration: 150 }, enabled: true, radiusPlus: 2, lineWidthPlus: 1 }, select: { fillColor: "#cccccc", lineColor: "#000000", lineWidth: 2 } } }, + point: { events: {} }, + dataLabels: { animation: {}, align: "center", borderWidth: 0, defer: true, formatter: function() { + const { numberFormatter: a2 } = this.series.chart; + return typeof this.y !== "number" ? "" : a2(this.y, -1); + }, padding: 5, style: { fontSize: "0.7em", fontWeight: "bold", color: "contrast", textOutline: "1px contrast" }, verticalAlign: "bottom", x: 0, y: 0 }, + cropThreshold: 300, + opacity: 1, + pointRange: 0, + softThreshold: true, + states: { + normal: { animation: true }, + hover: { animation: { duration: 150 }, lineWidthPlus: 1, marker: {}, halo: { size: 10, opacity: 0.25 } }, + select: { animation: { duration: 0 } }, + inactive: { animation: { duration: 150 }, opacity: 0.2 } + }, + stickyTracking: true, + turboThreshold: 1e3, + findNearestPointBy: "x" + }; + }); + M(a, "Core/Series/SeriesRegistry.js", [a["Core/Globals.js"], a["Core/Defaults.js"], a["Core/Series/Point.js"], a["Core/Utilities.js"]], function(a2, y, I, L) { + const { defaultOptions: x } = y, { extendClass: z, merge: H } = L; + var B; + (function(u) { + function v(a3, p) { + const l2 = x.plotOptions || {}, m = p.defaultOptions, h = p.prototype; + h.type = a3; + h.pointClass || (h.pointClass = I); + m && (l2[a3] = m); + u.seriesTypes[a3] = p; + } + u.seriesTypes = a2.seriesTypes; + u.registerSeriesType = v; + u.seriesType = function(a3, p, t, m, h) { + const g = x.plotOptions || {}; + p = p || ""; + g[a3] = H(g[p], t); + v(a3, z(u.seriesTypes[p] || function() { + }, m)); + u.seriesTypes[a3].prototype.type = a3; + h && (u.seriesTypes[a3].prototype.pointClass = z(I, h)); + return u.seriesTypes[a3]; + }; + })(B || (B = {})); + return B; + }); + M(a, "Core/Series/Series.js", [ + a["Core/Animation/AnimationUtilities.js"], + a["Core/Defaults.js"], + a["Core/Foundation.js"], + a["Core/Globals.js"], + a["Core/Legend/LegendSymbol.js"], + a["Core/Series/Point.js"], + a["Core/Series/SeriesDefaults.js"], + a["Core/Series/SeriesRegistry.js"], + a["Core/Renderer/SVG/SVGElement.js"], + a["Core/Utilities.js"] + ], function(a2, y, I, L, C, z, H, B, u, v) { + const { animObject: l2, setAnimation: p } = a2, { defaultOptions: t } = y, { registerEventOptions: m } = I, { hasTouch: h, svg: g, win: e } = L, { seriesTypes: w } = B, { + arrayMax: x, + arrayMin: F, + clamp: d, + correctFloat: k, + defined: r, + diffObjects: q, + erase: G, + error: b, + extend: f, + find: c, + fireEvent: n3, + getClosestDistance: P, + getNestedProperty: D, + insertItem: K, + isArray: X, + isNumber: T, + isString: Z, + merge: V, + objectEach: Y, + pick: A, + removeEvent: M2, + splat: ia, + syncTimeout: ba + } = v; + class aa { + constructor() { + this.zones = this.yAxis = this.xAxis = this.userOptions = this.tooltipOptions = this.processedYData = this.processedXData = this.points = this.options = this.linkedSeries = this.index = this.eventsToUnbind = this.eventOptions = this.data = this.chart = this._i = void 0; + } + init(b2, a3) { + n3(this, "init", { options: a3 }); + const c2 = this, d2 = b2.series; + this.eventsToUnbind = []; + c2.chart = b2; + c2.options = c2.setOptions(a3); + a3 = c2.options; + c2.linkedSeries = []; + c2.bindAxes(); + f(c2, { name: a3.name, state: "", visible: a3.visible !== false, selected: a3.selected === true }); + m(this, a3); + const e2 = a3.events; + if (e2 && e2.click || a3.point && a3.point.events && a3.point.events.click || a3.allowPointSelect) + b2.runTrackerClick = true; + c2.getColor(); + c2.getSymbol(); + c2.parallelArrays.forEach(function(b3) { + c2[b3 + "Data"] || (c2[b3 + "Data"] = []); + }); + c2.isCartesian && (b2.hasCartesianSeries = true); + let g2; + d2.length && (g2 = d2[d2.length - 1]); + c2._i = A(g2 && g2._i, -1) + 1; + c2.opacity = c2.options.opacity; + b2.orderItems("series", K(this, d2)); + a3.dataSorting && a3.dataSorting.enabled ? c2.setDataSortingOptions() : c2.points || c2.data || c2.setData(a3.data, false); + n3(this, "afterInit"); + } + is(b2) { + return w[b2] && this instanceof w[b2]; + } + bindAxes() { + const a3 = this, c2 = a3.options, d2 = a3.chart; + let f2; + n3(this, "bindAxes", null, function() { + (a3.axisTypes || []).forEach(function(e2) { + d2[e2].forEach(function(b2) { + f2 = b2.options; + if (A(c2[e2], 0) === b2.index || typeof c2[e2] !== "undefined" && c2[e2] === f2.id) + K(a3, b2.series), a3[e2] = b2, b2.isDirty = true; + }); + a3[e2] || a3.optionalAxis === e2 || b(18, true, d2); + }); + }); + n3(this, "afterBindAxes"); + } + updateParallelArrays(b2, a3, c2) { + const d2 = b2.series, f2 = T(a3) ? function(c3) { + const f3 = c3 === "y" && d2.toYData ? d2.toYData(b2) : b2[c3]; + d2[c3 + "Data"][a3] = f3; + } : function(b3) { + Array.prototype[a3].apply(d2[b3 + "Data"], c2); + }; + d2.parallelArrays.forEach(f2); + } + hasData() { + return this.visible && typeof this.dataMax !== "undefined" && typeof this.dataMin !== "undefined" || this.visible && this.yData && 0 < this.yData.length; + } + autoIncrement(b2) { + var a3 = this.options; + const c2 = a3.pointIntervalUnit, d2 = a3.relativeXValue, f2 = this.chart.time; + let e2 = this.xIncrement, g2; + e2 = A(e2, a3.pointStart, 0); + this.pointInterval = g2 = A(this.pointInterval, a3.pointInterval, 1); + d2 && T(b2) && (g2 *= b2); + c2 && (a3 = new f2.Date(e2), c2 === "day" ? f2.set("Date", a3, f2.get("Date", a3) + g2) : c2 === "month" ? f2.set("Month", a3, f2.get("Month", a3) + g2) : c2 === "year" && f2.set("FullYear", a3, f2.get("FullYear", a3) + g2), g2 = a3.getTime() - e2); + if (d2 && T(b2)) + return e2 + g2; + this.xIncrement = e2 + g2; + return e2; + } + setDataSortingOptions() { + const b2 = this.options; + f(this, { requireSorting: false, sorted: false, enabledDataSorting: true, allowDG: false }); + r(b2.pointRange) || (b2.pointRange = 1); + } + setOptions(b2) { + var a3, c2; + const d2 = this.chart; + var f2 = d2.options.plotOptions, e2 = d2.userOptions || {}; + const g2 = V(b2); + b2 = d2.styledMode; + const k2 = { plotOptions: f2, userOptions: g2 }; + n3(this, "setOptions", k2); + const h3 = k2.plotOptions[this.type]; + e2 = e2.plotOptions || {}; + const l3 = e2.series || {}, m2 = t.plotOptions[this.type] || {}, q2 = e2[this.type] || {}; + this.userOptions = k2.userOptions; + f2 = V(h3, f2.series, q2, g2); + this.tooltipOptions = V(t.tooltip, (a3 = t.plotOptions.series) === null || a3 === void 0 ? void 0 : a3.tooltip, m2 === null || m2 === void 0 ? void 0 : m2.tooltip, d2.userOptions.tooltip, (c2 = e2.series) === null || c2 === void 0 ? void 0 : c2.tooltip, q2.tooltip, g2.tooltip); + this.stickyTracking = A(g2.stickyTracking, q2.stickyTracking, l3.stickyTracking, this.tooltipOptions.shared && !this.noSharedTooltip ? true : f2.stickyTracking); + h3.marker === null && delete f2.marker; + this.zoneAxis = f2.zoneAxis; + c2 = this.zones = (f2.zones || []).slice(); + !f2.negativeColor && !f2.negativeFillColor || f2.zones || (a3 = { value: f2[this.zoneAxis + "Threshold"] || f2.threshold || 0, className: "highcharts-negative" }, b2 || (a3.color = f2.negativeColor, a3.fillColor = f2.negativeFillColor), c2.push(a3)); + c2.length && r(c2[c2.length - 1].value) && c2.push(b2 ? {} : { color: this.color, fillColor: this.fillColor }); + n3(this, "afterSetOptions", { options: f2 }); + return f2; + } + getName() { + return A(this.options.name, "Series " + (this.index + 1)); + } + getCyclic(b2, a3, c2) { + const d2 = this.chart, f2 = `${b2}Index`, e2 = `${b2}Counter`, g2 = (c2 === null || c2 === void 0 ? void 0 : c2.length) || d2.options.chart.colorCount; + if (!a3) { + var k2 = A(b2 === "color" ? this.options.colorIndex : void 0, this[f2]); + r(k2) || (d2.series.length || (d2[e2] = 0), k2 = d2[e2] % g2, d2[e2] += 1); + c2 && (a3 = c2[k2]); + } + typeof k2 !== "undefined" && (this[f2] = k2); + this[b2] = a3; + } + getColor() { + this.chart.styledMode ? this.getCyclic("color") : this.options.colorByPoint ? this.color = "#cccccc" : this.getCyclic("color", this.options.color || t.plotOptions[this.type].color, this.chart.options.colors); + } + getPointsCollection() { + return (this.hasGroupedData ? this.points : this.data) || []; + } + getSymbol() { + this.getCyclic("symbol", this.options.marker.symbol, this.chart.options.symbols); + } + findPointIndex(b2, a3) { + const d2 = b2.id, f2 = b2.x, e2 = this.points; + var g2 = this.options.dataSorting, k2; + let h3, n4; + if (d2) + g2 = this.chart.get(d2), g2 instanceof z && (k2 = g2); + else if (this.linkedParent || this.enabledDataSorting || this.options.relativeXValue) { + if (k2 = (a4) => !a4.touched && a4.index === b2.index, g2 && g2.matchByName ? k2 = (a4) => !a4.touched && a4.name === b2.name : this.options.relativeXValue && (k2 = (a4) => !a4.touched && a4.options.x === b2.x), k2 = c(e2, k2), !k2) + return; + } + k2 && (n4 = k2 && k2.index, typeof n4 !== "undefined" && (h3 = true)); + typeof n4 === "undefined" && T(f2) && (n4 = this.xData.indexOf(f2, a3)); + n4 !== -1 && typeof n4 !== "undefined" && this.cropped && (n4 = n4 >= this.cropStart ? n4 - this.cropStart : n4); + !h3 && T(n4) && e2[n4] && e2[n4].touched && (n4 = void 0); + return n4; + } + updateData(b2, a3) { + const c2 = this.options, d2 = c2.dataSorting, f2 = this.points, e2 = [], g2 = this.requireSorting, k2 = b2.length === f2.length; + let n4, h3, l3, m2 = true; + this.xIncrement = null; + b2.forEach(function(b3, a4) { + var h4 = r(b3) && this.pointClass.prototype.optionsToObject.call({ series: this }, b3) || {}; + const m3 = h4.x; + if (h4.id || T(m3)) { + if (h4 = this.findPointIndex(h4, l3), h4 === -1 || typeof h4 === "undefined" ? e2.push(b3) : f2[h4] && b3 !== c2.data[h4] ? (f2[h4].update(b3, false, null, false), f2[h4].touched = true, g2 && (l3 = h4 + 1)) : f2[h4] && (f2[h4].touched = true), !k2 || a4 !== h4 || d2 && d2.enabled || this.hasDerivedData) + n4 = true; + } else + e2.push(b3); + }, this); + if (n4) + for (b2 = f2.length; b2--; ) + (h3 = f2[b2]) && !h3.touched && h3.remove && h3.remove(false, a3); + else + !k2 || d2 && d2.enabled ? m2 = false : (b2.forEach(function(b3, a4) { + b3 === f2[a4].y || f2[a4].destroyed || f2[a4].update(b3, false, null, false); + }), e2.length = 0); + f2.forEach(function(b3) { + b3 && (b3.touched = false); + }); + if (!m2) + return false; + e2.forEach(function(b3) { + this.addPoint(b3, false, null, null, false); + }, this); + this.xIncrement === null && this.xData && this.xData.length && (this.xIncrement = x(this.xData), this.autoIncrement()); + return true; + } + setData(a3, c2 = true, d2, f2) { + var e2; + const g2 = this, k2 = g2.points, h3 = k2 && k2.length || 0, n4 = g2.options, l3 = g2.chart, m2 = n4.dataSorting, q2 = g2.xAxis, p2 = n4.turboThreshold, r2 = this.xData, t2 = this.yData; + var w2 = g2.pointArrayMap; + w2 = w2 && w2.length; + const J = n4.keys; + let v2, u2 = 0, O = 1, x2 = null; + if (!l3.options.chart.allowMutatingData) { + n4.data && delete g2.options.data; + g2.userOptions.data && delete g2.userOptions.data; + var N = V(true, a3); + } + a3 = N || a3 || []; + N = a3.length; + m2 && m2.enabled && (a3 = this.sortData(a3)); + l3.options.chart.allowMutatingData && f2 !== false && N && h3 && !g2.cropped && !g2.hasGroupedData && g2.visible && !g2.boosted && (v2 = this.updateData(a3, d2)); + if (!v2) { + g2.xIncrement = null; + g2.colorCounter = 0; + this.parallelArrays.forEach(function(b2) { + g2[b2 + "Data"].length = 0; + }); + if (p2 && N > p2) + if (x2 = g2.getFirstValidPoint(a3), T(x2)) + for (d2 = 0; d2 < N; d2++) + r2[d2] = this.autoIncrement(), t2[d2] = a3[d2]; + else if (X(x2)) + if (w2) + if (x2.length === w2) + for (d2 = 0; d2 < N; d2++) + r2[d2] = this.autoIncrement(), t2[d2] = a3[d2]; + else + for (d2 = 0; d2 < N; d2++) + f2 = a3[d2], r2[d2] = f2[0], t2[d2] = f2.slice(1, w2 + 1); + else if (J && (u2 = J.indexOf("x"), O = J.indexOf("y"), u2 = 0 <= u2 ? u2 : 0, O = 0 <= O ? O : 1), x2.length === 1 && (O = 0), u2 === O) + for (d2 = 0; d2 < N; d2++) + r2[d2] = this.autoIncrement(), t2[d2] = a3[d2][O]; + else + for (d2 = 0; d2 < N; d2++) + f2 = a3[d2], r2[d2] = f2[u2], t2[d2] = f2[O]; + else + b(12, false, l3); + else + for (d2 = 0; d2 < N; d2++) + f2 = { series: g2 }, g2.pointClass.prototype.applyOptions.apply(f2, [a3[d2]]), g2.updateParallelArrays(f2, d2); + t2 && Z(t2[0]) && b(14, true, l3); + g2.data = []; + g2.options.data = g2.userOptions.data = a3; + for (d2 = h3; d2--; ) + (e2 = k2[d2]) === null || e2 === void 0 ? void 0 : e2.destroy(); + q2 && (q2.minRange = q2.userMinRange); + g2.isDirty = l3.isDirtyBox = true; + g2.isDirtyData = !!k2; + d2 = false; + } + n4.legendType === "point" && (this.processData(), this.generatePoints()); + c2 && l3.redraw(d2); + } + sortData(b2) { + const a3 = this, c2 = a3.options.dataSorting.sortKey || "y", d2 = function(b3, a4) { + return r(a4) && b3.pointClass.prototype.optionsToObject.call({ series: b3 }, a4) || {}; + }; + b2.forEach(function(c3, f2) { + b2[f2] = d2(a3, c3); + b2[f2].index = f2; + }, this); + b2.concat().sort((b3, a4) => { + b3 = D(c2, b3); + a4 = D(c2, a4); + return a4 < b3 ? -1 : a4 > b3 ? 1 : 0; + }).forEach(function(b3, a4) { + b3.x = a4; + }, this); + a3.linkedSeries && a3.linkedSeries.forEach(function(a4) { + const c3 = a4.options, f2 = c3.data; + c3.dataSorting && c3.dataSorting.enabled || !f2 || (f2.forEach(function(c4, e2) { + f2[e2] = d2(a4, c4); + b2[e2] && (f2[e2].x = b2[e2].x, f2[e2].index = e2); + }), a4.setData(f2, false)); + }); + return b2; + } + getProcessedData(a3) { + const c2 = this; + var d2 = c2.xAxis, f2 = c2.options; + const e2 = f2.cropThreshold, g2 = a3 || c2.getExtremesFromAll || f2.getExtremesFromAll, k2 = d2 === null || d2 === void 0 ? void 0 : d2.logarithmic, h3 = c2.isCartesian; + let n4 = 0; + let l3; + a3 = c2.xData; + f2 = c2.yData; + let m2 = false; + const q2 = a3.length; + if (d2) { + var r2 = d2.getExtremes(); + l3 = r2.min; + r2 = r2.max; + m2 = !(!d2.categories || d2.names.length); + } + if (h3 && c2.sorted && !g2 && (!e2 || q2 > e2 || c2.forceCrop)) { + if (a3[q2 - 1] < l3 || a3[0] > r2) + a3 = [], f2 = []; + else if (c2.yData && (a3[0] < l3 || a3[q2 - 1] > r2)) { + var p2 = this.cropData(c2.xData, c2.yData, l3, r2); + a3 = p2.xData; + f2 = p2.yData; + n4 = p2.start; + p2 = true; + } + } + d2 = P([k2 ? a3.map(k2.log2lin) : a3], () => c2.requireSorting && !m2 && b(15, false, c2.chart)); + return { xData: a3, yData: f2, cropped: p2, cropStart: n4, closestPointRange: d2 }; + } + processData(b2) { + const a3 = this.xAxis; + if (this.isCartesian && !this.isDirty && !a3.isDirty && !this.yAxis.isDirty && !b2) + return false; + b2 = this.getProcessedData(); + this.cropped = b2.cropped; + this.cropStart = b2.cropStart; + this.processedXData = b2.xData; + this.processedYData = b2.yData; + this.closestPointRange = this.basePointRange = b2.closestPointRange; + n3(this, "afterProcessData"); + } + cropData(b2, a3, c2, d2, f2) { + const e2 = b2.length; + let g2, k2 = 0, h3 = e2; + f2 = A(f2, this.cropShoulder); + for (g2 = 0; g2 < e2; g2++) + if (b2[g2] >= c2) { + k2 = Math.max(0, g2 - f2); + break; + } + for (c2 = g2; c2 < e2; c2++) + if (b2[c2] > d2) { + h3 = c2 + f2; + break; + } + return { + xData: b2.slice(k2, h3), + yData: a3.slice(k2, h3), + start: k2, + end: h3 + }; + } + generatePoints() { + var b2 = this.options; + const a3 = this.processedData || b2.data, c2 = this.processedXData, d2 = this.processedYData, e2 = this.pointClass, g2 = c2.length, k2 = this.cropStart || 0, h3 = this.hasGroupedData, l3 = b2.keys, m2 = []; + b2 = b2.dataGrouping && b2.dataGrouping.groupAll ? k2 : 0; + let q2; + let r2, p2, t2 = this.data; + if (!t2 && !h3) { + var w2 = []; + w2.length = a3.length; + t2 = this.data = w2; + } + l3 && h3 && (this.options.keys = false); + for (p2 = 0; p2 < g2; p2++) + w2 = k2 + p2, h3 ? (r2 = new e2().init(this, [c2[p2]].concat(ia(d2[p2]))), r2.dataGroup = this.groupMap[b2 + p2], r2.dataGroup.options && (r2.options = r2.dataGroup.options, f(r2, r2.dataGroup.options), delete r2.dataLabels)) : (r2 = t2[w2]) || typeof a3[w2] === "undefined" || (t2[w2] = r2 = new e2().init(this, a3[w2], c2[p2])), r2 && (r2.index = h3 ? b2 + p2 : w2, m2[p2] = r2); + this.options.keys = l3; + if (t2 && (g2 !== (q2 = t2.length) || h3)) + for (p2 = 0; p2 < q2; p2++) + p2 !== k2 || h3 || (p2 += g2), t2[p2] && (t2[p2].destroyElements(), t2[p2].plotX = void 0); + this.data = t2; + this.points = m2; + n3(this, "afterGeneratePoints"); + } + getXExtremes(b2) { + return { min: F(b2), max: x(b2) }; + } + getExtremes(b2, a3) { + const c2 = this.xAxis; + var d2 = this.yAxis; + const f2 = this.processedXData || this.xData, e2 = [], g2 = this.requireSorting ? this.cropShoulder : 0; + d2 = d2 ? d2.positiveValuesOnly : false; + let k2, h3 = 0, l3 = 0, m2 = 0; + b2 = b2 || this.stackedYData || this.processedYData || []; + const q2 = b2.length; + if (c2) { + var p2 = c2.getExtremes(); + h3 = p2.min; + l3 = p2.max; + } + for (k2 = 0; k2 < q2; k2++) { + var r2 = f2[k2]; + p2 = b2[k2]; + var t2 = (T(p2) || X(p2)) && (p2.length || 0 < p2 || !d2); + r2 = a3 || this.getExtremesFromAll || this.options.getExtremesFromAll || this.cropped || !c2 || (f2[k2 + g2] || r2) >= h3 && (f2[k2 - g2] || r2) <= l3; + if (t2 && r2) + if (t2 = p2.length) + for (; t2--; ) + T(p2[t2]) && (e2[m2++] = p2[t2]); + else + e2[m2++] = p2; + } + b2 = { activeYData: e2, dataMin: F(e2), dataMax: x(e2) }; + n3(this, "afterGetExtremes", { dataExtremes: b2 }); + return b2; + } + applyExtremes() { + const b2 = this.getExtremes(); + this.dataMin = b2.dataMin; + this.dataMax = b2.dataMax; + return b2; + } + getFirstValidPoint(b2) { + const a3 = b2.length; + let c2 = 0, d2 = null; + for (; d2 === null && c2 < a3; ) + d2 = b2[c2], c2++; + return d2; + } + translate() { + var b2; + this.processedXData || this.processData(); + this.generatePoints(); + var a3 = this.options; + const c2 = a3.stacking, f2 = this.xAxis, e2 = f2.categories, g2 = this.enabledDataSorting, h3 = this.yAxis, l3 = this.points, m2 = l3.length, q2 = this.pointPlacementToXValue(), p2 = !!q2, t2 = a3.threshold; + a3 = a3.startFromThreshold ? t2 : 0; + let w2, v2, u2, x2, D2 = Number.MAX_VALUE; + for (w2 = 0; w2 < m2; w2++) { + const n4 = l3[w2], m3 = n4.x; + let J, Q, R = n4.y, O = n4.low; + const E = c2 && ((b2 = h3.stacking) === null || b2 === void 0 ? void 0 : b2.stacks[(this.negStacks && R < (a3 ? 0 : t2) ? "-" : "") + this.stackKey]); + v2 = f2.translate(m3, false, false, false, true, q2); + n4.plotX = T(v2) ? k(d(v2, -1e5, 1e5)) : void 0; + c2 && this.visible && E && E[m3] && (x2 = this.getStackIndicator(x2, m3, this.index), !n4.isNull && x2.key && (J = E[m3], Q = J.points[x2.key]), J && X(Q) && (O = Q[0], R = Q[1], O === a3 && x2.key === E[m3].base && (O = A(T(t2) ? t2 : h3.min)), h3.positiveValuesOnly && r(O) && 0 >= O && (O = void 0), n4.total = n4.stackTotal = A(J.total), n4.percentage = r(n4.y) && J.total ? n4.y / J.total * 100 : void 0, n4.stackY = R, this.irregularWidths || J.setOffset(this.pointXOffset || 0, this.barW || 0, void 0, void 0, void 0, this.xAxis))); + n4.yBottom = r(O) ? d(h3.translate(O, false, true, false, true), -1e5, 1e5) : void 0; + this.dataModify && (R = this.dataModify.modifyValue(R, w2)); + let N; + T(R) && n4.plotX !== void 0 && (N = h3.translate(R, false, true, false, true), N = T(N) ? d(N, -1e5, 1e5) : void 0); + n4.plotY = N; + n4.isInside = this.isPointInside(n4); + n4.clientX = p2 ? k(f2.translate(m3, false, false, false, true, q2)) : v2; + n4.negative = (n4.y || 0) < (t2 || 0); + n4.category = A(e2 && e2[n4.x], n4.x); + n4.isNull || n4.visible === false || (typeof u2 !== "undefined" && (D2 = Math.min(D2, Math.abs(v2 - u2))), u2 = v2); + n4.zone = this.zones.length ? n4.getZone() : void 0; + !n4.graphic && this.group && g2 && (n4.isNew = true); + } + this.closestPointRangePx = D2; + n3(this, "afterTranslate"); + } + getValidPoints(b2, a3, c2) { + const d2 = this.chart; + return (b2 || this.points || []).filter(function(b3) { + const { plotX: f2, plotY: e2 } = b3; + return !c2 && (b3.isNull || !T(e2)) || a3 && !d2.isInsidePlot(f2, e2, { inverted: d2.inverted }) ? false : b3.visible !== false; + }); + } + getClipBox() { + const { chart: b2, xAxis: a3, yAxis: c2 } = this, d2 = V(b2.clipBox); + a3 && a3.len !== b2.plotSizeX && (d2.width = a3.len); + c2 && c2.len !== b2.plotSizeY && (d2.height = c2.len); + return d2; + } + getSharedClipKey() { + return this.sharedClipKey = (this.options.xAxis || 0) + "," + (this.options.yAxis || 0); + } + setClip() { + const { chart: b2, group: a3, markerGroup: c2 } = this, d2 = b2.sharedClips, f2 = b2.renderer, e2 = this.getClipBox(), g2 = this.getSharedClipKey(); + let k2 = d2[g2]; + k2 ? k2.animate(e2) : d2[g2] = k2 = f2.clipRect(e2); + a3 && a3.clip(this.options.clip === false ? void 0 : k2); + c2 && c2.clip(); + } + animate(b2) { + const { chart: a3, group: c2, markerGroup: d2 } = this, f2 = a3.inverted; + var e2 = l2(this.options.animation), g2 = [this.getSharedClipKey(), e2.duration, e2.easing, e2.defer].join(); + let k2 = a3.sharedClips[g2], n4 = a3.sharedClips[g2 + "m"]; + if (b2 && c2) + e2 = this.getClipBox(), k2 ? k2.attr("height", e2.height) : (e2.width = 0, f2 && (e2.x = a3.plotHeight), k2 = a3.renderer.clipRect(e2), a3.sharedClips[g2] = k2, n4 = a3.renderer.clipRect({ x: -99, y: -99, width: f2 ? a3.plotWidth + 199 : 99, height: f2 ? 99 : a3.plotHeight + 199 }), a3.sharedClips[g2 + "m"] = n4), c2.clip(k2), d2 && d2.clip(n4); + else if (k2 && !k2.hasClass("highcharts-animating")) { + g2 = this.getClipBox(); + const b3 = e2.step; + d2 && d2.element.childNodes.length && (e2.step = function(a4, c3) { + b3 && b3.apply(c3, arguments); + c3.prop === "width" && n4 && n4.element && n4.attr(f2 ? "height" : "width", a4 + 99); + }); + k2.addClass("highcharts-animating").animate(g2, e2); + } + } + afterAnimate() { + this.setClip(); + Y(this.chart.sharedClips, (b2, a3, c2) => { + b2 && !this.chart.container.querySelector(`[clip-path="url(#${b2.id})"]`) && (b2.destroy(), delete c2[a3]); + }); + this.finishedAnimating = true; + n3(this, "afterAnimate"); + } + drawPoints(b2 = this.points) { + const a3 = this.chart, c2 = a3.styledMode, { colorAxis: d2, options: f2 } = this, e2 = f2.marker, g2 = this[this.specialGroup || "markerGroup"], k2 = this.xAxis, n4 = A(e2.enabled, !k2 || k2.isRadial ? true : null, this.closestPointRangePx >= e2.enabledThreshold * e2.radius); + let h3, l3, m2, q2; + let p2, r2; + if (e2.enabled !== false || this._hasPointMarkers) + for (h3 = 0; h3 < b2.length; h3++) { + l3 = b2[h3]; + q2 = (m2 = l3.graphic) ? "animate" : "attr"; + var t2 = l3.marker || {}; + p2 = !!l3.marker; + if ((n4 && typeof t2.enabled === "undefined" || t2.enabled) && !l3.isNull && l3.visible !== false) { + const b3 = A(t2.symbol, this.symbol, "rect"); + r2 = this.markerAttribs(l3, l3.selected && "select"); + this.enabledDataSorting && (l3.startXPos = k2.reversed ? -(r2.width || 0) : k2.width); + const f3 = l3.isInside !== false; + !m2 && f3 && (0 < (r2.width || 0) || l3.hasImage) && (l3.graphic = m2 = a3.renderer.symbol(b3, r2.x, r2.y, r2.width, r2.height, p2 ? t2 : e2).add(g2), this.enabledDataSorting && a3.hasRendered && (m2.attr({ x: l3.startXPos }), q2 = "animate")); + m2 && q2 === "animate" && m2[f3 ? "show" : "hide"](f3).animate(r2); + if (m2) + if (t2 = this.pointAttribs(l3, c2 || !l3.selected ? void 0 : "select"), c2) + d2 && m2.css({ fill: t2.fill }); + else + m2[q2](t2); + m2 && m2.addClass(l3.getClassName(), true); + } else + m2 && (l3.graphic = m2.destroy()); + } + } + markerAttribs(b2, a3) { + const c2 = this.options; + var d2 = c2.marker; + const f2 = b2.marker || {}, e2 = f2.symbol || d2.symbol, g2 = {}; + let k2 = A(f2.radius, d2 && d2.radius); + a3 && (d2 = d2.states[a3], a3 = f2.states && f2.states[a3], k2 = A(a3 && a3.radius, d2 && d2.radius, k2 && k2 + (d2 && d2.radiusPlus || 0))); + b2.hasImage = e2 && e2.indexOf("url") === 0; + b2.hasImage && (k2 = 0); + b2 = b2.pos(); + T(k2) && b2 && (g2.x = b2[0] - k2, g2.y = b2[1] - k2, c2.crisp && (g2.x = Math.floor(g2.x))); + k2 && (g2.width = g2.height = 2 * k2); + return g2; + } + pointAttribs(b2, a3) { + var c2 = this.options.marker, d2 = b2 && b2.options; + const f2 = d2 && d2.marker || {}; + var e2 = d2 && d2.color, g2 = b2 && b2.color; + const k2 = b2 && b2.zone && b2.zone.color; + let n4 = this.color; + b2 = A(f2.lineWidth, c2.lineWidth); + d2 = 1; + n4 = e2 || k2 || g2 || n4; + e2 = f2.fillColor || c2.fillColor || n4; + g2 = f2.lineColor || c2.lineColor || n4; + a3 = a3 || "normal"; + c2 = c2.states[a3] || {}; + a3 = f2.states && f2.states[a3] || {}; + b2 = A(a3.lineWidth, c2.lineWidth, b2 + A(a3.lineWidthPlus, c2.lineWidthPlus, 0)); + e2 = a3.fillColor || c2.fillColor || e2; + g2 = a3.lineColor || c2.lineColor || g2; + d2 = A(a3.opacity, c2.opacity, d2); + return { stroke: g2, "stroke-width": b2, fill: e2, opacity: d2 }; + } + destroy(b2) { + const a3 = this, c2 = a3.chart, d2 = /AppleWebKit\/533/.test(e.navigator.userAgent), f2 = a3.data || []; + let g2, k2, h3, l3; + n3(a3, "destroy", { keepEventsForUpdate: b2 }); + this.removeEvents(b2); + (a3.axisTypes || []).forEach(function(b3) { + (l3 = a3[b3]) && l3.series && (G(l3.series, a3), l3.isDirty = l3.forceRedraw = true); + }); + a3.legendItem && a3.chart.legend.destroyItem(a3); + for (k2 = f2.length; k2--; ) + (h3 = f2[k2]) && h3.destroy && h3.destroy(); + a3.clips && a3.clips.forEach((b3) => b3.destroy()); + v.clearTimeout(a3.animationTimeout); + Y(a3, function(b3, a4) { + b3 instanceof u && !b3.survive && (g2 = d2 && a4 === "group" ? "hide" : "destroy", b3[g2]()); + }); + c2.hoverSeries === a3 && (c2.hoverSeries = void 0); + G(c2.series, a3); + c2.orderItems("series"); + Y(a3, function(c3, d3) { + b2 && d3 === "hcEvents" || delete a3[d3]; + }); + } + applyZones() { + const b2 = this, a3 = this.chart, c2 = a3.renderer, f2 = this.zones, e2 = this.clips || [], g2 = this.graph, k2 = this.area, n4 = Math.max(a3.plotWidth, a3.plotHeight), h3 = this[(this.zoneAxis || "y") + "Axis"], l3 = a3.inverted; + let m2, q2, p2, r2, t2, w2, v2, u2, x2, D2, E, G2 = false; + f2.length && (g2 || k2) && h3 && typeof h3.min !== "undefined" ? (t2 = h3.reversed, w2 = h3.horiz, g2 && !this.showLine && g2.hide(), k2 && k2.hide(), r2 = h3.getExtremes(), f2.forEach(function(f3, Q) { + m2 = t2 ? w2 ? a3.plotWidth : 0 : w2 ? 0 : h3.toPixels(r2.min) || 0; + m2 = d(A(q2, m2), 0, n4); + q2 = d(Math.round(h3.toPixels(A(f3.value, r2.max), true) || 0), 0, n4); + G2 && (m2 = q2 = h3.toPixels(r2.max)); + v2 = Math.abs(m2 - q2); + u2 = Math.min(m2, q2); + x2 = Math.max(m2, q2); + h3.isXAxis ? (p2 = { x: l3 ? x2 : u2, y: 0, width: v2, height: n4 }, w2 || (p2.x = a3.plotHeight - p2.x)) : (p2 = { x: 0, y: l3 ? x2 : u2, width: n4, height: v2 }, w2 && (p2.y = a3.plotWidth - p2.y)); + e2[Q] ? e2[Q].animate(p2) : e2[Q] = c2.clipRect(p2); + D2 = b2["zone-area-" + Q]; + E = b2["zone-graph-" + Q]; + g2 && E && E.clip(e2[Q]); + k2 && D2 && D2.clip(e2[Q]); + G2 = f3.value > r2.max; + b2.resetZones && q2 === 0 && (q2 = void 0); + }), this.clips = e2) : b2.visible && (g2 && g2.show(), k2 && k2.show()); + } + plotGroup(b2, a3, c2, d2, f2) { + let e2 = this[b2]; + const g2 = !e2; + c2 = { visibility: c2, zIndex: d2 || 0.1 }; + typeof this.opacity === "undefined" || this.chart.styledMode || this.state === "inactive" || (c2.opacity = this.opacity); + g2 && (this[b2] = e2 = this.chart.renderer.g().add(f2)); + e2.addClass("highcharts-" + a3 + " highcharts-series-" + this.index + " highcharts-" + this.type + "-series " + (r(this.colorIndex) ? "highcharts-color-" + this.colorIndex + " " : "") + (this.options.className || "") + (e2.hasClass("highcharts-tracker") ? " highcharts-tracker" : ""), true); + e2.attr(c2)[g2 ? "attr" : "animate"](this.getPlotBox(a3)); + return e2; + } + getPlotBox(b2) { + let a3 = this.xAxis, c2 = this.yAxis; + const d2 = this.chart; + b2 = d2.inverted && !d2.polar && a3 && this.invertible !== false && b2 === "series"; + d2.inverted && (a3 = c2, c2 = this.xAxis); + return { translateX: a3 ? a3.left : d2.plotLeft, translateY: c2 ? c2.top : d2.plotTop, rotation: b2 ? 90 : 0, rotationOriginX: b2 ? (a3.len - c2.len) / 2 : 0, rotationOriginY: b2 ? (a3.len + c2.len) / 2 : 0, scaleX: b2 ? -1 : 1, scaleY: 1 }; + } + removeEvents(b2) { + b2 || M2(this); + this.eventsToUnbind.length && (this.eventsToUnbind.forEach(function(b3) { + b3(); + }), this.eventsToUnbind.length = 0); + } + render() { + const b2 = this; + var a3 = b2.chart; + const c2 = b2.options, d2 = l2(c2.animation), f2 = b2.visible ? "inherit" : "hidden", e2 = c2.zIndex, g2 = b2.hasRendered; + a3 = a3.seriesGroup; + let k2 = b2.finishedAnimating ? 0 : d2.duration; + n3(this, "render"); + b2.plotGroup("group", "series", f2, e2, a3); + b2.markerGroup = b2.plotGroup("markerGroup", "markers", f2, e2, a3); + c2.clip !== false && b2.setClip(); + b2.animate && k2 && b2.animate(true); + b2.drawGraph && (b2.drawGraph(), b2.applyZones()); + b2.visible && b2.drawPoints(); + b2.drawDataLabels && b2.drawDataLabels(); + b2.redrawPoints && b2.redrawPoints(); + b2.drawTracker && c2.enableMouseTracking && b2.drawTracker(); + b2.animate && k2 && b2.animate(); + g2 || (k2 && d2.defer && (k2 += d2.defer), b2.animationTimeout = ba(function() { + b2.afterAnimate(); + }, k2 || 0)); + b2.isDirty = false; + b2.hasRendered = true; + n3(b2, "afterRender"); + } + redraw() { + const b2 = this.isDirty || this.isDirtyData; + this.translate(); + this.render(); + b2 && delete this.kdTree; + } + searchPoint(b2, a3) { + const c2 = this.xAxis, d2 = this.yAxis, f2 = this.chart.inverted; + return this.searchKDTree({ clientX: f2 ? c2.len - b2.chartY + c2.pos : b2.chartX - c2.pos, plotY: f2 ? d2.len - b2.chartX + d2.pos : b2.chartY - d2.pos }, a3, b2); + } + buildKDTree(b2) { + function a3(b3, d3, f2) { + var e2 = b3 && b3.length; + let g2; + if (e2) + return g2 = c2.kdAxisArray[d3 % f2], b3.sort(function(b4, a4) { + return b4[g2] - a4[g2]; + }), e2 = Math.floor(e2 / 2), { point: b3[e2], left: a3(b3.slice(0, e2), d3 + 1, f2), right: a3(b3.slice(e2 + 1), d3 + 1, f2) }; + } + this.buildingKdTree = true; + const c2 = this, d2 = -1 < c2.options.findNearestPointBy.indexOf("y") ? 2 : 1; + delete c2.kdTree; + ba(function() { + c2.kdTree = a3(c2.getValidPoints(null, !c2.directTouch), d2, d2); + c2.buildingKdTree = false; + }, c2.options.kdNow || b2 && b2.type === "touchstart" ? 0 : 1); + } + searchKDTree(b2, a3, c2) { + function d2(b3, a4, c3, n4) { + const h3 = a4.point; + var l3 = f2.kdAxisArray[c3 % n4]; + let m2 = h3; + var q2 = r(b3[e2]) && r(h3[e2]) ? Math.pow(b3[e2] - h3[e2], 2) : null; + var p2 = r(b3[g2]) && r(h3[g2]) ? Math.pow(b3[g2] - h3[g2], 2) : null; + p2 = (q2 || 0) + (p2 || 0); + h3.dist = r(p2) ? Math.sqrt(p2) : Number.MAX_VALUE; + h3.distX = r(q2) ? Math.sqrt(q2) : Number.MAX_VALUE; + l3 = b3[l3] - h3[l3]; + p2 = 0 > l3 ? "left" : "right"; + q2 = 0 > l3 ? "right" : "left"; + a4[p2] && (p2 = d2(b3, a4[p2], c3 + 1, n4), m2 = p2[k2] < m2[k2] ? p2 : h3); + a4[q2] && Math.sqrt(l3 * l3) < m2[k2] && (b3 = d2(b3, a4[q2], c3 + 1, n4), m2 = b3[k2] < m2[k2] ? b3 : m2); + return m2; + } + const f2 = this, e2 = this.kdAxisArray[0], g2 = this.kdAxisArray[1], k2 = a3 ? "distX" : "dist"; + a3 = -1 < f2.options.findNearestPointBy.indexOf("y") ? 2 : 1; + this.kdTree || this.buildingKdTree || this.buildKDTree(c2); + if (this.kdTree) + return d2(b2, this.kdTree, a3, a3); + } + pointPlacementToXValue() { + const { options: { pointPlacement: b2, pointRange: a3 }, xAxis: c2 } = this; + let d2 = b2; + d2 === "between" && (d2 = c2.reversed ? -0.5 : 0.5); + return T(d2) ? d2 * (a3 || c2.pointRange) : 0; + } + isPointInside(b2) { + const { chart: a3, xAxis: c2, yAxis: d2 } = this; + return typeof b2.plotY !== "undefined" && typeof b2.plotX !== "undefined" && 0 <= b2.plotY && b2.plotY <= (d2 ? d2.len : a3.plotHeight) && 0 <= b2.plotX && b2.plotX <= (c2 ? c2.len : a3.plotWidth); + } + drawTracker() { + const b2 = this, a3 = b2.options, c2 = a3.trackByArea, d2 = [].concat(c2 ? b2.areaPath : b2.graphPath), f2 = b2.chart, e2 = f2.pointer, k2 = f2.renderer, l3 = f2.options.tooltip.snap, m2 = b2.tracker, q2 = function(c3) { + if (a3.enableMouseTracking && f2.hoverSeries !== b2) + b2.onMouseOver(); + }, p2 = "rgba(192,192,192," + (g ? 1e-4 : 2e-3) + ")"; + m2 ? m2.attr({ d: d2 }) : b2.graph && (b2.tracker = k2.path(d2).attr({ visibility: b2.visible ? "inherit" : "hidden", zIndex: 2 }).addClass(c2 ? "highcharts-tracker-area" : "highcharts-tracker-line").add(b2.group), f2.styledMode || b2.tracker.attr({ "stroke-linecap": "round", "stroke-linejoin": "round", stroke: p2, fill: c2 ? p2 : "none", "stroke-width": b2.graph.strokeWidth() + (c2 ? 0 : 2 * l3) }), [ + b2.tracker, + b2.markerGroup, + b2.dataLabelsGroup + ].forEach(function(b3) { + if (b3 && (b3.addClass("highcharts-tracker").on("mouseover", q2).on("mouseout", function(b4) { + e2.onTrackerMouseOut(b4); + }), a3.cursor && !f2.styledMode && b3.css({ cursor: a3.cursor }), h)) + b3.on("touchstart", q2); + })); + n3(this, "afterDrawTracker"); + } + addPoint(b2, a3, c2, d2, f2) { + const e2 = this.options, g2 = this.data, k2 = this.chart; + var h3 = this.xAxis; + h3 = h3 && h3.hasNames && h3.names; + const l3 = e2.data, m2 = this.xData; + let q2, p2; + a3 = A(a3, true); + const r2 = { series: this }; + this.pointClass.prototype.applyOptions.apply(r2, [b2]); + const t2 = r2.x; + p2 = m2.length; + if (this.requireSorting && t2 < m2[p2 - 1]) + for (q2 = true; p2 && m2[p2 - 1] > t2; ) + p2--; + this.updateParallelArrays(r2, "splice", [p2, 0, 0]); + this.updateParallelArrays(r2, p2); + h3 && r2.name && (h3[t2] = r2.name); + l3.splice(p2, 0, b2); + if (q2 || this.processedData) + this.data.splice(p2, 0, null), this.processData(); + e2.legendType === "point" && this.generatePoints(); + c2 && (g2[0] && g2[0].remove ? g2[0].remove(false) : (g2.shift(), this.updateParallelArrays(r2, "shift"), l3.shift())); + f2 !== false && n3(this, "addPoint", { point: r2 }); + this.isDirtyData = this.isDirty = true; + a3 && k2.redraw(d2); + } + removePoint(b2, a3, c2) { + const d2 = this, f2 = d2.data, e2 = f2[b2], g2 = d2.points, k2 = d2.chart, h3 = function() { + g2 && g2.length === f2.length && g2.splice(b2, 1); + f2.splice(b2, 1); + d2.options.data.splice(b2, 1); + d2.updateParallelArrays(e2 || { series: d2 }, "splice", [b2, 1]); + e2 && e2.destroy(); + d2.isDirty = true; + d2.isDirtyData = true; + a3 && k2.redraw(); + }; + p(c2, k2); + a3 = A(a3, true); + e2 ? e2.firePointEvent("remove", null, h3) : h3(); + } + remove(b2, a3, c2, d2) { + function f2() { + e2.destroy(d2); + g2.isDirtyLegend = g2.isDirtyBox = true; + g2.linkSeries(d2); + A(b2, true) && g2.redraw(a3); + } + const e2 = this, g2 = e2.chart; + c2 !== false ? n3(e2, "remove", null, f2) : f2(); + } + update(a3, c2) { + a3 = q(a3, this.userOptions); + n3(this, "update", { options: a3 }); + const d2 = this, e2 = d2.chart; + var g2 = d2.userOptions; + const k2 = d2.initialType || d2.type; + var h3 = e2.options.plotOptions; + const l3 = w[k2].prototype; + var m2 = d2.finishedAnimating && { animation: false }; + const p2 = {}; + let r2, t2 = ["colorIndex", "eventOptions", "navigatorSeries", "symbolIndex", "baseSeries"], v2 = a3.type || g2.type || e2.options.chart.type; + const u2 = !(this.hasDerivedData || v2 && v2 !== this.type || typeof a3.pointStart !== "undefined" || typeof a3.pointInterval !== "undefined" || typeof a3.relativeXValue !== "undefined" || a3.joinBy || a3.mapData || d2.hasOptionChanged("dataGrouping") || d2.hasOptionChanged("pointStart") || d2.hasOptionChanged("pointInterval") || d2.hasOptionChanged("pointIntervalUnit") || d2.hasOptionChanged("keys")); + v2 = v2 || k2; + u2 && (t2.push("data", "isDirtyData", "points", "processedData", "processedXData", "processedYData", "xIncrement", "cropped", "_hasPointMarkers", "_hasPointLabels", "clips", "nodes", "layout", "level", "mapMap", "mapData", "minY", "maxY", "minX", "maxX"), a3.visible !== false && t2.push("area", "graph"), d2.parallelArrays.forEach(function(b2) { + t2.push(b2 + "Data"); + }), a3.data && (a3.dataSorting && f(d2.options.dataSorting, a3.dataSorting), this.setData(a3.data, false))); + a3 = V(g2, m2, { index: typeof g2.index === "undefined" ? d2.index : g2.index, pointStart: A(h3 && h3.series && h3.series.pointStart, g2.pointStart, d2.xData[0]) }, !u2 && { data: d2.options.data }, a3); + u2 && a3.data && (a3.data = d2.options.data); + t2 = ["group", "markerGroup", "dataLabelsGroup", "transformGroup"].concat(t2); + t2.forEach(function(b2) { + t2[b2] = d2[b2]; + delete d2[b2]; + }); + h3 = false; + if (w[v2]) { + if (h3 = v2 !== d2.type, d2.remove(false, false, false, true), h3) + if (Object.setPrototypeOf) + Object.setPrototypeOf(d2, w[v2].prototype); + else { + m2 = Object.hasOwnProperty.call(d2, "hcEvents") && d2.hcEvents; + for (r2 in l3) + d2[r2] = void 0; + f(d2, w[v2].prototype); + m2 ? d2.hcEvents = m2 : delete d2.hcEvents; + } + } else + b(17, true, e2, { missingModuleFor: v2 }); + t2.forEach(function(b2) { + d2[b2] = t2[b2]; + }); + d2.init(e2, a3); + if (u2 && this.points) { + a3 = d2.options; + if (a3.visible === false) + p2.graphic = 1, p2.dataLabel = 1; + else if (!d2._hasPointLabels) { + const { marker: b2, dataLabels: c3 } = a3; + g2 = g2.marker || {}; + !b2 || b2.enabled !== false && g2.symbol === b2.symbol && g2.height === b2.height && g2.width === b2.width || (p2.graphic = 1); + c3 && c3.enabled === false && (p2.dataLabel = 1); + } + for (const b2 of this.points) + b2 && b2.series && (b2.resolveColor(), Object.keys(p2).length && b2.destroyElements(p2), a3.showInLegend === false && b2.legendItem && e2.legend.destroyItem(b2)); + } + d2.initialType = k2; + e2.linkSeries(); + h3 && d2.linkedSeries.length && (d2.isDirtyData = true); + n3(this, "afterUpdate"); + A(c2, true) && e2.redraw(u2 ? void 0 : false); + } + setName(b2) { + this.name = this.options.name = this.userOptions.name = b2; + this.chart.isDirtyLegend = true; + } + hasOptionChanged(b2) { + const a3 = this.options[b2], c2 = this.chart.options.plotOptions, d2 = this.userOptions[b2]; + return d2 ? a3 !== d2 : a3 !== A(c2 && c2[this.type] && c2[this.type][b2], c2 && c2.series && c2.series[b2], a3); + } + onMouseOver() { + const b2 = this.chart, a3 = b2.hoverSeries; + b2.pointer.setHoverChartIndex(); + if (a3 && a3 !== this) + a3.onMouseOut(); + this.options.events.mouseOver && n3(this, "mouseOver"); + this.setState("hover"); + b2.hoverSeries = this; + } + onMouseOut() { + const b2 = this.options, a3 = this.chart, c2 = a3.tooltip, d2 = a3.hoverPoint; + a3.hoverSeries = null; + if (d2) + d2.onMouseOut(); + this && b2.events.mouseOut && n3(this, "mouseOut"); + !c2 || this.stickyTracking || c2.shared && !this.noSharedTooltip || c2.hide(); + a3.series.forEach(function(b3) { + b3.setState("", true); + }); + } + setState(b2, a3) { + const c2 = this; + var d2 = c2.options; + const f2 = c2.graph, e2 = d2.inactiveOtherPoints, g2 = d2.states, k2 = A(g2[b2 || "normal"] && g2[b2 || "normal"].animation, c2.chart.options.chart.animation); + let h3 = d2.lineWidth, n4 = 0, l3 = d2.opacity; + b2 = b2 || ""; + if (c2.state !== b2 && ([c2.group, c2.markerGroup, c2.dataLabelsGroup].forEach(function(a4) { + a4 && (c2.state && a4.removeClass("highcharts-series-" + c2.state), b2 && a4.addClass("highcharts-series-" + b2)); + }), c2.state = b2, !c2.chart.styledMode)) { + if (g2[b2] && g2[b2].enabled === false) + return; + b2 && (h3 = g2[b2].lineWidth || h3 + (g2[b2].lineWidthPlus || 0), l3 = A(g2[b2].opacity, l3)); + if (f2 && !f2.dashstyle && T(h3)) + for (d2 = { "stroke-width": h3 }, f2.animate(d2, k2); c2["zone-graph-" + n4]; ) + c2["zone-graph-" + n4].animate(d2, k2), n4 += 1; + e2 || [c2.group, c2.markerGroup, c2.dataLabelsGroup, c2.labelBySeries].forEach(function(b3) { + b3 && b3.animate({ opacity: l3 }, k2); + }); + } + a3 && e2 && c2.points && c2.setAllPointsToState(b2 || void 0); + } + setAllPointsToState(b2) { + this.points.forEach(function(a3) { + a3.setState && a3.setState(b2); + }); + } + setVisible(b2, a3) { + const c2 = this, d2 = c2.chart, f2 = d2.options.chart.ignoreHiddenSeries, e2 = c2.visible, g2 = (c2.visible = b2 = c2.options.visible = c2.userOptions.visible = typeof b2 === "undefined" ? !e2 : b2) ? "show" : "hide"; + ["group", "dataLabelsGroup", "markerGroup", "tracker", "tt"].forEach(function(b3) { + if (c2[b3]) + c2[b3][g2](); + }); + if (d2.hoverSeries === c2 || (d2.hoverPoint && d2.hoverPoint.series) === c2) + c2.onMouseOut(); + c2.legendItem && d2.legend.colorizeItem(c2, b2); + c2.isDirty = true; + c2.options.stacking && d2.series.forEach(function(b3) { + b3.options.stacking && b3.visible && (b3.isDirty = true); + }); + c2.linkedSeries.forEach(function(a4) { + a4.setVisible(b2, false); + }); + f2 && (d2.isDirtyBox = true); + n3(c2, g2); + a3 !== false && d2.redraw(); + } + show() { + this.setVisible(true); + } + hide() { + this.setVisible(false); + } + select(b2) { + this.selected = b2 = this.options.selected = typeof b2 === "undefined" ? !this.selected : b2; + this.checkbox && (this.checkbox.checked = b2); + n3(this, b2 ? "select" : "unselect"); + } + shouldShowTooltip(b2, a3, c2 = {}) { + c2.series = this; + c2.visiblePlotOnly = true; + return this.chart.isInsidePlot(b2, a3, c2); + } + drawLegendSymbol(b2, a3) { + var c2; + (c2 = C[this.options.legendSymbol || "rectangle"]) === null || c2 === void 0 ? void 0 : c2.call(this, b2, a3); + } + } + aa.defaultOptions = H; + aa.types = B.seriesTypes; + aa.registerType = B.registerSeriesType; + f(aa.prototype, { + axisTypes: ["xAxis", "yAxis"], + coll: "series", + colorCounter: 0, + cropShoulder: 1, + directTouch: false, + isCartesian: true, + kdAxisArray: ["clientX", "plotY"], + parallelArrays: ["x", "y"], + pointClass: z, + requireSorting: true, + sorted: true + }); + B.series = aa; + ""; + ""; + return aa; + }); + M(a, "Core/Chart/Chart.js", [ + a["Core/Animation/AnimationUtilities.js"], + a["Core/Axis/Axis.js"], + a["Core/Defaults.js"], + a["Core/Templating.js"], + a["Core/Foundation.js"], + a["Core/Globals.js"], + a["Core/Renderer/RendererRegistry.js"], + a["Core/Series/Series.js"], + a["Core/Series/SeriesRegistry.js"], + a["Core/Renderer/SVG/SVGRenderer.js"], + a["Core/Time.js"], + a["Core/Utilities.js"], + a["Core/Renderer/HTML/AST.js"] + ], function(a2, y, I, L, C, z, H, B, u, v, l2, p, t) { + const { animate: m, animObject: h, setAnimation: g } = a2, { defaultOptions: e, defaultTime: w } = I, { numberFormat: x } = L, { registerEventOptions: F } = C, { charts: d, doc: k, marginNames: r, svg: q, win: G } = z, { seriesTypes: b } = u, { + addEvent: f, + attr: c, + createElement: n3, + css: P, + defined: D, + diffObjects: K, + discardElement: X, + erase: T, + error: Z, + extend: V, + find: Y, + fireEvent: A, + getStyle: M2, + isArray: ia, + isNumber: ba, + isObject: aa, + isString: J, + merge: N, + objectEach: O, + pick: S, + pInt: W, + relativeLength: ha, + removeEvent: da, + splat: fa, + syncTimeout: ka, + uniqueKey: ca + } = p; + class ea { + static chart(b2, a3, c2) { + return new ea(b2, a3, c2); + } + constructor(b2, a3, c2) { + this.series = this.renderTo = this.renderer = this.pointer = this.pointCount = this.plotWidth = this.plotTop = this.plotLeft = this.plotHeight = this.plotBox = this.options = this.numberFormatter = this.margin = this.labelCollectors = this.isResizing = this.index = this.eventOptions = this.container = this.colorCounter = this.clipBox = this.chartWidth = this.chartHeight = this.bounds = this.axisOffset = this.axes = void 0; + this.sharedClips = {}; + this.zooming = this.yAxis = this.xAxis = this.userOptions = this.titleOffset = this.time = this.symbolCounter = this.spacingBox = this.spacing = void 0; + this.getArgs(b2, a3, c2); + } + getArgs(b2, a3, c2) { + J(b2) || b2.nodeName ? (this.renderTo = b2, this.init(a3, c2)) : this.init(b2, a3); + } + setZoomOptions() { + const b2 = this.options.chart, a3 = b2.zooming; + this.zooming = Object.assign(Object.assign({}, a3), { type: S(b2.zoomType, a3.type), key: S(b2.zoomKey, a3.key), pinchType: S(b2.pinchType, a3.pinchType), singleTouch: S(b2.zoomBySingleTouch, a3.singleTouch, false), resetButton: N(a3.resetButton, b2.resetZoomButton) }); + } + init(b2, a3) { + A(this, "init", { args: arguments }, function() { + const c2 = N(e, b2), f2 = c2.chart; + this.userOptions = V({}, b2); + this.margin = []; + this.spacing = []; + this.bounds = { h: {}, v: {} }; + this.labelCollectors = []; + this.callback = a3; + this.isResizing = 0; + this.options = c2; + this.axes = []; + this.series = []; + this.time = b2.time && Object.keys(b2.time).length ? new l2(b2.time) : z.time; + this.numberFormatter = f2.numberFormatter || x; + this.styledMode = f2.styledMode; + this.hasCartesianSeries = f2.showAxes; + this.index = d.length; + d.push(this); + z.chartCount++; + F(this, f2); + this.xAxis = []; + this.yAxis = []; + this.pointCount = this.colorCounter = this.symbolCounter = 0; + this.setZoomOptions(); + A(this, "afterInit"); + this.firstRender(); + }); + } + initSeries(a3) { + var c2 = this.options.chart; + c2 = a3.type || c2.type; + const d2 = b[c2]; + d2 || Z(17, true, this, { missingModuleFor: c2 }); + c2 = new d2(); + typeof c2.init === "function" && c2.init(this, a3); + return c2; + } + setSeriesData() { + this.getSeriesOrderByLinks().forEach(function(b2) { + b2.points || b2.data || !b2.enabledDataSorting || b2.setData(b2.options.data, false); + }); + } + getSeriesOrderByLinks() { + return this.series.concat().sort(function(b2, a3) { + return b2.linkedSeries.length || a3.linkedSeries.length ? a3.linkedSeries.length - b2.linkedSeries.length : 0; + }); + } + orderItems(b2, a3 = 0) { + const c2 = this[b2], d2 = this.options[b2] = fa(this.options[b2]).slice(); + b2 = this.userOptions[b2] = this.userOptions[b2] ? fa(this.userOptions[b2]).slice() : []; + this.hasRendered && (d2.splice(a3), b2.splice(a3)); + if (c2) { + for (let f2 = a3, e2 = c2.length; f2 < e2; ++f2) + if (a3 = c2[f2]) + a3.index = f2, a3 instanceof B && (a3.name = a3.getName()), a3.options.isInternal || (d2[f2] = a3.options, b2[f2] = a3.userOptions); + } + } + isInsidePlot(b2, a3, c2 = {}) { + const { + inverted: d2, + plotBox: f2, + plotLeft: e2, + plotTop: g2, + scrollablePlotBox: k2 + } = this; + var h3 = 0; + let n4 = 0; + c2.visiblePlotOnly && this.scrollingContainer && ({ scrollLeft: h3, scrollTop: n4 } = this.scrollingContainer); + const l3 = c2.series, m2 = c2.visiblePlotOnly && k2 || f2; + var q2 = c2.inverted ? a3 : b2; + a3 = c2.inverted ? b2 : a3; + b2 = { x: q2, y: a3, isInsidePlot: true, options: c2 }; + if (!c2.ignoreX) { + const a4 = l3 && (d2 && !this.polar ? l3.yAxis : l3.xAxis) || { pos: e2, len: Infinity }; + q2 = c2.paneCoordinates ? a4.pos + q2 : e2 + q2; + q2 >= Math.max(h3 + e2, a4.pos) && q2 <= Math.min(h3 + e2 + m2.width, a4.pos + a4.len) || (b2.isInsidePlot = false); + } + !c2.ignoreY && b2.isInsidePlot && (h3 = !d2 && c2.axis && !c2.axis.isXAxis && c2.axis || l3 && (d2 ? l3.xAxis : l3.yAxis) || { pos: g2, len: Infinity }, c2 = c2.paneCoordinates ? h3.pos + a3 : g2 + a3, c2 >= Math.max(n4 + g2, h3.pos) && c2 <= Math.min(n4 + g2 + m2.height, h3.pos + h3.len) || (b2.isInsidePlot = false)); + A(this, "afterIsInsidePlot", b2); + return b2.isInsidePlot; + } + redraw(b2) { + A(this, "beforeRedraw"); + const a3 = this.hasCartesianSeries ? this.axes : this.colorAxis || [], c2 = this.series, d2 = this.pointer, f2 = this.legend, e2 = this.userOptions.legend, k2 = this.renderer, h3 = k2.isHidden(), n4 = []; + let l3, m2, q2 = this.isDirtyBox, p2 = this.isDirtyLegend, r2; + k2.rootFontSize = k2.boxWrapper.getStyle("font-size"); + this.setResponsive && this.setResponsive(false); + g(this.hasRendered ? b2 : false, this); + h3 && this.temporaryDisplay(); + this.layOutTitles(false); + for (b2 = c2.length; b2--; ) + if (r2 = c2[b2], r2.options.stacking || r2.options.centerInCategory) { + if (m2 = true, r2.isDirty) { + l3 = true; + break; + } + } + if (l3) + for (b2 = c2.length; b2--; ) + r2 = c2[b2], r2.options.stacking && (r2.isDirty = true); + c2.forEach(function(b3) { + b3.isDirty && (b3.options.legendType === "point" ? (typeof b3.updateTotals === "function" && b3.updateTotals(), p2 = true) : e2 && (e2.labelFormatter || e2.labelFormat) && (p2 = true)); + b3.isDirtyData && A(b3, "updatedData"); + }); + p2 && f2 && f2.options.enabled && (f2.render(), this.isDirtyLegend = false); + m2 && this.getStacks(); + a3.forEach(function(b3) { + b3.updateNames(); + b3.setScale(); + }); + this.getMargins(); + a3.forEach(function(b3) { + b3.isDirty && (q2 = true); + }); + a3.forEach(function(b3) { + const a4 = b3.min + "," + b3.max; + b3.extKey !== a4 && (b3.extKey = a4, n4.push(function() { + A(b3, "afterSetExtremes", V(b3.eventArgs, b3.getExtremes())); + delete b3.eventArgs; + })); + (q2 || m2) && b3.redraw(); + }); + q2 && this.drawChartBox(); + A(this, "predraw"); + c2.forEach(function(b3) { + (q2 || b3.isDirty) && b3.visible && b3.redraw(); + b3.isDirtyData = false; + }); + d2 && d2.reset(true); + k2.draw(); + A(this, "redraw"); + A(this, "render"); + h3 && this.temporaryDisplay(true); + n4.forEach(function(b3) { + b3.call(); + }); + } + get(b2) { + function a3(a4) { + return a4.id === b2 || a4.options && a4.options.id === b2; + } + const c2 = this.series; + let d2 = Y(this.axes, a3) || Y(this.series, a3); + for (let b3 = 0; !d2 && b3 < c2.length; b3++) + d2 = Y(c2[b3].points || [], a3); + return d2; + } + getAxes() { + const b2 = this.options; + A(this, "getAxes"); + for (const a3 of ["xAxis", "yAxis"]) { + const c2 = b2[a3] = fa(b2[a3] || {}); + for (const b3 of c2) + new y(this, b3, a3); + } + A(this, "afterGetAxes"); + } + getSelectedPoints() { + return this.series.reduce((b2, a3) => { + a3.getPointsCollection().forEach((a4) => { + S(a4.selectedStaging, a4.selected) && b2.push(a4); + }); + return b2; + }, []); + } + getSelectedSeries() { + return this.series.filter(function(b2) { + return b2.selected; + }); + } + setTitle(b2, a3, c2) { + this.applyDescription("title", b2); + this.applyDescription("subtitle", a3); + this.applyDescription("caption", void 0); + this.layOutTitles(c2); + } + applyDescription(b2, a3) { + const c2 = this, d2 = this.options[b2] = N(this.options[b2], a3); + let f2 = this[b2]; + f2 && a3 && (this[b2] = f2 = f2.destroy()); + d2 && !f2 && (f2 = this.renderer.text(d2.text, 0, 0, d2.useHTML).attr({ + align: d2.align, + "class": "highcharts-" + b2, + zIndex: d2.zIndex || 4 + }).add(), f2.update = function(a4, d3) { + c2.applyDescription(b2, a4); + c2.layOutTitles(d3); + }, this.styledMode || f2.css(V(b2 === "title" ? { fontSize: this.options.isStock ? "1em" : "1.2em" } : {}, d2.style)), this[b2] = f2); + } + layOutTitles(b2 = true) { + const a3 = [0, 0, 0], c2 = this.renderer, d2 = this.spacingBox; + ["title", "subtitle", "caption"].forEach(function(b3) { + const f3 = this[b3], e2 = this.options[b3], g2 = e2.verticalAlign || "top"; + b3 = b3 === "title" ? g2 === "top" ? -3 : 0 : g2 === "top" ? a3[0] + 2 : 0; + if (f3) { + f3.css({ width: (e2.width || d2.width + (e2.widthAdjust || 0)) + "px" }); + const k2 = c2.fontMetrics(f3).b, h3 = Math.round(f3.getBBox(e2.useHTML).height); + f3.align(V({ y: g2 === "bottom" ? k2 : b3 + k2, height: h3 }, e2), false, "spacingBox"); + e2.floating || (g2 === "top" ? a3[0] = Math.ceil(a3[0] + h3) : g2 === "bottom" && (a3[2] = Math.ceil(a3[2] + h3))); + } + }, this); + a3[0] && (this.options.title.verticalAlign || "top") === "top" && (a3[0] += this.options.title.margin); + a3[2] && this.options.caption.verticalAlign === "bottom" && (a3[2] += this.options.caption.margin); + const f2 = !this.titleOffset || this.titleOffset.join(",") !== a3.join(","); + this.titleOffset = a3; + A(this, "afterLayOutTitles"); + !this.isDirtyBox && f2 && (this.isDirtyBox = this.isDirtyLegend = f2, this.hasRendered && b2 && this.isDirtyBox && this.redraw()); + } + getContainerBox() { + return { width: M2(this.renderTo, "width", true) || 0, height: M2(this.renderTo, "height", true) || 0 }; + } + getChartSize() { + var b2 = this.options.chart; + const a3 = b2.width; + b2 = b2.height; + const c2 = this.getContainerBox(); + this.chartWidth = Math.max(0, a3 || c2.width || 600); + this.chartHeight = Math.max(0, ha(b2, this.chartWidth) || (1 < c2.height ? c2.height : 400)); + this.containerBox = c2; + } + temporaryDisplay(b2) { + let a3 = this.renderTo; + if (b2) + for (; a3 && a3.style; ) + a3.hcOrigStyle && (P(a3, a3.hcOrigStyle), delete a3.hcOrigStyle), a3.hcOrigDetached && (k.body.removeChild(a3), a3.hcOrigDetached = false), a3 = a3.parentNode; + else + for (; a3 && a3.style; ) { + k.body.contains(a3) || a3.parentNode || (a3.hcOrigDetached = true, k.body.appendChild(a3)); + if (M2(a3, "display", false) === "none" || a3.hcOricDetached) + a3.hcOrigStyle = { display: a3.style.display, height: a3.style.height, overflow: a3.style.overflow }, b2 = { display: "block", overflow: "hidden" }, a3 !== this.renderTo && (b2.height = 0), P(a3, b2), a3.offsetWidth || a3.style.setProperty("display", "block", "important"); + a3 = a3.parentNode; + if (a3 === k.body) + break; + } + } + setClassName(b2) { + this.container.className = "highcharts-container " + (b2 || ""); + } + getContainer() { + const b2 = this.options, a3 = b2.chart; + var f2 = ca(); + let e2, h3 = this.renderTo; + h3 || (this.renderTo = h3 = a3.renderTo); + J(h3) && (this.renderTo = h3 = k.getElementById(h3)); + h3 || Z(13, true, this); + var l3 = W(c(h3, "data-highcharts-chart")); + ba(l3) && d[l3] && d[l3].hasRendered && d[l3].destroy(); + c(h3, "data-highcharts-chart", this.index); + h3.innerHTML = t.emptyHTML; + a3.skipClone || h3.offsetWidth || this.temporaryDisplay(); + this.getChartSize(); + l3 = this.chartWidth; + const m2 = this.chartHeight; + P(h3, { overflow: "hidden" }); + this.styledMode || (e2 = V({ position: "relative", overflow: "hidden", width: l3 + "px", height: m2 + "px", textAlign: "left", lineHeight: "normal", zIndex: 0, "-webkit-tap-highlight-color": "rgba(0,0,0,0)", userSelect: "none", "touch-action": "manipulation", outline: "none" }, a3.style || {})); + this.container = f2 = n3("div", { id: f2 }, e2, h3); + this._cursor = f2.style.cursor; + this.renderer = new (a3.renderer || !q ? H.getRendererType(a3.renderer) : v)(f2, l3, m2, void 0, a3.forExport, b2.exporting && b2.exporting.allowHTML, this.styledMode); + this.containerBox = this.getContainerBox(); + g(void 0, this); + this.setClassName(a3.className); + if (this.styledMode) + for (const a4 in b2.defs) + this.renderer.definition(b2.defs[a4]); + else + this.renderer.setStyle(a3.style); + this.renderer.chartIndex = this.index; + A(this, "afterGetContainer"); + } + getMargins(b2) { + const { spacing: a3, margin: c2, titleOffset: d2 } = this; + this.resetMargins(); + d2[0] && !D(c2[0]) && (this.plotTop = Math.max(this.plotTop, d2[0] + a3[0])); + d2[2] && !D(c2[2]) && (this.marginBottom = Math.max(this.marginBottom, d2[2] + a3[2])); + this.legend && this.legend.display && this.legend.adjustMargins(c2, a3); + A(this, "getMargins"); + b2 || this.getAxisMargins(); + } + getAxisMargins() { + const b2 = this, a3 = b2.axisOffset = [0, 0, 0, 0], c2 = b2.colorAxis, d2 = b2.margin, f2 = function(b3) { + b3.forEach(function(b4) { + b4.visible && b4.getOffset(); + }); + }; + b2.hasCartesianSeries ? f2(b2.axes) : c2 && c2.length && f2(c2); + r.forEach(function(c3, f3) { + D(d2[f3]) || (b2[c3] += a3[f3]); + }); + b2.setChartSize(); + } + getOptions() { + return K(this.userOptions, e); + } + reflow(b2) { + const a3 = this; + var c2 = a3.options.chart; + c2 = D(c2.width) && D(c2.height); + const d2 = a3.containerBox, f2 = a3.getContainerBox(); + delete a3.pointer.chartPosition; + if (!c2 && !a3.isPrinting && d2 && f2.width) { + if (f2.width !== d2.width || f2.height !== d2.height) + p.clearTimeout(a3.reflowTimeout), a3.reflowTimeout = ka(function() { + a3.container && a3.setSize(void 0, void 0, false); + }, b2 ? 100 : 0); + a3.containerBox = f2; + } + } + setReflow() { + const b2 = this; + var a3 = (a4) => { + var c2; + ((c2 = b2.options) === null || c2 === void 0 ? 0 : c2.chart.reflow) && b2.hasLoaded && b2.reflow(a4); + }; + typeof ResizeObserver === "function" ? new ResizeObserver(a3).observe(b2.renderTo) : (a3 = f(G, "resize", a3), f(this, "destroy", a3)); + } + setSize(b2, a3, c2) { + const d2 = this, f2 = d2.renderer; + d2.isResizing += 1; + g(c2, d2); + c2 = f2.globalAnimation; + d2.oldChartHeight = d2.chartHeight; + d2.oldChartWidth = d2.chartWidth; + typeof b2 !== "undefined" && (d2.options.chart.width = b2); + typeof a3 !== "undefined" && (d2.options.chart.height = a3); + d2.getChartSize(); + d2.styledMode || (c2 ? m : P)(d2.container, { width: d2.chartWidth + "px", height: d2.chartHeight + "px" }, c2); + d2.setChartSize(true); + f2.setSize(d2.chartWidth, d2.chartHeight, c2); + d2.axes.forEach(function(b3) { + b3.isDirty = true; + b3.setScale(); + }); + d2.isDirtyLegend = true; + d2.isDirtyBox = true; + d2.layOutTitles(); + d2.getMargins(); + d2.redraw(c2); + d2.oldChartHeight = null; + A(d2, "resize"); + ka(function() { + d2 && A(d2, "endResize", null, function() { + --d2.isResizing; + }); + }, h(c2).duration); + } + setChartSize(b2) { + var a3 = this.inverted; + const c2 = this.renderer; + var d2 = this.chartWidth, f2 = this.chartHeight; + const e2 = this.options.chart, g2 = this.spacing, k2 = this.clipOffset; + let h3, n4, l3, m2; + this.plotLeft = h3 = Math.round(this.plotLeft); + this.plotTop = n4 = Math.round(this.plotTop); + this.plotWidth = l3 = Math.max(0, Math.round(d2 - h3 - this.marginRight)); + this.plotHeight = m2 = Math.max(0, Math.round(f2 - n4 - this.marginBottom)); + this.plotSizeX = a3 ? m2 : l3; + this.plotSizeY = a3 ? l3 : m2; + this.plotBorderWidth = e2.plotBorderWidth || 0; + this.spacingBox = c2.spacingBox = { x: g2[3], y: g2[0], width: d2 - g2[3] - g2[1], height: f2 - g2[0] - g2[2] }; + this.plotBox = c2.plotBox = { x: h3, y: n4, width: l3, height: m2 }; + a3 = 2 * Math.floor(this.plotBorderWidth / 2); + d2 = Math.ceil(Math.max(a3, k2[3]) / 2); + f2 = Math.ceil(Math.max(a3, k2[0]) / 2); + this.clipBox = { x: d2, y: f2, width: Math.floor(this.plotSizeX - Math.max(a3, k2[1]) / 2 - d2), height: Math.max(0, Math.floor(this.plotSizeY - Math.max(a3, k2[2]) / 2 - f2)) }; + b2 || (this.axes.forEach(function(b3) { + b3.setAxisSize(); + b3.setAxisTranslation(); + }), c2.alignElements()); + A(this, "afterSetChartSize", { skipAxes: b2 }); + } + resetMargins() { + A(this, "resetMargins"); + const b2 = this, a3 = b2.options.chart; + ["margin", "spacing"].forEach(function(c2) { + const d2 = a3[c2], f2 = aa(d2) ? d2 : [d2, d2, d2, d2]; + ["Top", "Right", "Bottom", "Left"].forEach(function(d3, e2) { + b2[c2][e2] = S(a3[c2 + d3], f2[e2]); + }); + }); + r.forEach(function(a4, c2) { + b2[a4] = S(b2.margin[c2], b2.spacing[c2]); + }); + b2.axisOffset = [0, 0, 0, 0]; + b2.clipOffset = [0, 0, 0, 0]; + } + drawChartBox() { + const b2 = this.options.chart, a3 = this.renderer, c2 = this.chartWidth, d2 = this.chartHeight, f2 = this.styledMode, e2 = this.plotBGImage; + var g2 = b2.backgroundColor; + const k2 = b2.plotBackgroundColor, h3 = b2.plotBackgroundImage, n4 = this.plotLeft, l3 = this.plotTop, m2 = this.plotWidth, q2 = this.plotHeight, p2 = this.plotBox, r2 = this.clipRect, t2 = this.clipBox; + let w2 = this.chartBackground, v2 = this.plotBackground, u2 = this.plotBorder, x2, D2, E = "animate"; + w2 || (this.chartBackground = w2 = a3.rect().addClass("highcharts-background").add(), E = "attr"); + if (f2) + x2 = D2 = w2.strokeWidth(); + else { + x2 = b2.borderWidth || 0; + D2 = x2 + (b2.shadow ? 8 : 0); + g2 = { fill: g2 || "none" }; + if (x2 || w2["stroke-width"]) + g2.stroke = b2.borderColor, g2["stroke-width"] = x2; + w2.attr(g2).shadow(b2.shadow); + } + w2[E]({ x: D2 / 2, y: D2 / 2, width: c2 - D2 - x2 % 2, height: d2 - D2 - x2 % 2, r: b2.borderRadius }); + E = "animate"; + v2 || (E = "attr", this.plotBackground = v2 = a3.rect().addClass("highcharts-plot-background").add()); + v2[E](p2); + f2 || (v2.attr({ fill: k2 || "none" }).shadow(b2.plotShadow), h3 && (e2 ? (h3 !== e2.attr("href") && e2.attr("href", h3), e2.animate(p2)) : this.plotBGImage = a3.image(h3, n4, l3, m2, q2).add())); + r2 ? r2.animate({ width: t2.width, height: t2.height }) : this.clipRect = a3.clipRect(t2); + E = "animate"; + u2 || (E = "attr", this.plotBorder = u2 = a3.rect().addClass("highcharts-plot-border").attr({ zIndex: 1 }).add()); + f2 || u2.attr({ stroke: b2.plotBorderColor, "stroke-width": b2.plotBorderWidth || 0, fill: "none" }); + u2[E](u2.crisp({ x: n4, y: l3, width: m2, height: q2 }, -u2.strokeWidth())); + this.isDirtyBox = false; + A(this, "afterDrawChartBox"); + } + propFromSeries() { + const a3 = this, c2 = a3.options.chart, d2 = a3.options.series; + let f2, e2, g2; + ["inverted", "angular", "polar"].forEach(function(k2) { + e2 = b[c2.type]; + g2 = c2[k2] || e2 && e2.prototype[k2]; + for (f2 = d2 && d2.length; !g2 && f2--; ) + (e2 = b[d2[f2].type]) && e2.prototype[k2] && (g2 = true); + a3[k2] = g2; + }); + } + linkSeries(b2) { + const a3 = this, c2 = a3.series; + c2.forEach(function(b3) { + b3.linkedSeries.length = 0; + }); + c2.forEach(function(b3) { + let c3 = b3.options.linkedTo; + J(c3) && (c3 = c3 === ":previous" ? a3.series[b3.index - 1] : a3.get(c3)) && c3.linkedParent !== b3 && (c3.linkedSeries.push(b3), b3.linkedParent = c3, c3.enabledDataSorting && b3.setDataSortingOptions(), b3.visible = S(b3.options.visible, c3.options.visible, b3.visible)); + }); + A(this, "afterLinkSeries", { isUpdating: b2 }); + } + renderSeries() { + this.series.forEach(function(b2) { + b2.translate(); + b2.render(); + }); + } + render() { + const b2 = this.axes, a3 = this.colorAxis, c2 = this.renderer, d2 = function(b3) { + b3.forEach(function(b4) { + b4.visible && b4.render(); + }); + }; + let f2 = 0; + this.setTitle(); + A(this, "beforeMargins"); + this.getStacks && this.getStacks(); + this.getMargins(true); + this.setChartSize(); + const e2 = this.plotWidth; + b2.some(function(b3) { + if (b3.horiz && b3.visible && b3.options.labels.enabled && b3.series.length) + return f2 = 21, true; + }); + const g2 = this.plotHeight = Math.max(this.plotHeight - f2, 0); + b2.forEach(function(b3) { + b3.setScale(); + }); + this.getAxisMargins(); + const k2 = 1.1 < e2 / this.plotWidth, h3 = 1.05 < g2 / this.plotHeight; + if (k2 || h3) + b2.forEach(function(b3) { + (b3.horiz && k2 || !b3.horiz && h3) && b3.setTickInterval(true); + }), this.getMargins(); + this.drawChartBox(); + this.hasCartesianSeries ? d2(b2) : a3 && a3.length && d2(a3); + this.seriesGroup || (this.seriesGroup = c2.g("series-group").attr({ zIndex: 3 }).shadow(this.options.chart.seriesGroupShadow).add()); + this.renderSeries(); + this.addCredits(); + this.setResponsive && this.setResponsive(); + this.hasRendered = true; + } + addCredits(b2) { + const a3 = this, c2 = N(true, this.options.credits, b2); + c2.enabled && !this.credits && (this.credits = this.renderer.text(c2.text + (this.mapCredits || ""), 0, 0).addClass("highcharts-credits").on("click", function() { + c2.href && (G.location.href = c2.href); + }).attr({ align: c2.position.align, zIndex: 8 }), a3.styledMode || this.credits.css(c2.style), this.credits.add().align(c2.position), this.credits.update = function(b3) { + a3.credits = a3.credits.destroy(); + a3.addCredits(b3); + }); + } + destroy() { + const b2 = this, a3 = b2.axes, c2 = b2.series, f2 = b2.container, e2 = f2 && f2.parentNode; + let g2; + A(b2, "destroy"); + b2.renderer.forExport ? T(d, b2) : d[b2.index] = void 0; + z.chartCount--; + b2.renderTo.removeAttribute("data-highcharts-chart"); + da(b2); + for (g2 = a3.length; g2--; ) + a3[g2] = a3[g2].destroy(); + this.scroller && this.scroller.destroy && this.scroller.destroy(); + for (g2 = c2.length; g2--; ) + c2[g2] = c2[g2].destroy(); + "title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" ").forEach(function(a4) { + const c3 = b2[a4]; + c3 && c3.destroy && (b2[a4] = c3.destroy()); + }); + f2 && (f2.innerHTML = t.emptyHTML, da(f2), e2 && X(f2)); + O(b2, function(a4, c3) { + delete b2[c3]; + }); + } + firstRender() { + const b2 = this, a3 = b2.options; + b2.getContainer(); + b2.resetMargins(); + b2.setChartSize(); + b2.propFromSeries(); + b2.getAxes(); + const c2 = ia(a3.series) ? a3.series : []; + a3.series = []; + c2.forEach(function(a4) { + b2.initSeries(a4); + }); + b2.linkSeries(); + b2.setSeriesData(); + A(b2, "beforeRender"); + b2.render(); + b2.pointer.getChartPosition(); + if (!b2.renderer.imgCount && !b2.hasLoaded) + b2.onload(); + b2.temporaryDisplay(true); + } + onload() { + this.callbacks.concat([this.callback]).forEach(function(b2) { + b2 && typeof this.index !== "undefined" && b2.apply(this, [this]); + }, this); + A(this, "load"); + A(this, "render"); + D(this.index) && this.setReflow(); + this.warnIfA11yModuleNotLoaded(); + this.hasLoaded = true; + } + warnIfA11yModuleNotLoaded() { + const { options: b2, title: a3 } = this; + b2 && !this.accessibility && (this.renderer.boxWrapper.attr({ role: "img", "aria-label": (a3 && a3.element.textContent || "").replace(/ a3.pointCount)); + } + pan(b2, a3) { + const c2 = this, d2 = c2.hoverPoints; + a3 = typeof a3 === "object" ? a3 : { enabled: a3, type: "x" }; + const f2 = c2.options.chart; + f2 && f2.panning && (f2.panning = a3); + const e2 = a3.type; + let g2; + A(this, "pan", { originalEvent: b2 }, function() { + d2 && d2.forEach(function(b3) { + b3.setState(); + }); + let a4 = c2.xAxis; + e2 === "xy" ? a4 = a4.concat(c2.yAxis) : e2 === "y" && (a4 = c2.yAxis); + const f3 = {}; + a4.forEach(function(a5) { + if (a5.options.panningEnabled && !a5.options.isInternal) { + var d3 = a5.horiz, k2 = b2[d3 ? "chartX" : "chartY"]; + d3 = d3 ? "mouseDownX" : "mouseDownY"; + var h3 = c2[d3], n4 = a5.minPointOffset || 0, l3 = a5.reversed && !c2.inverted || !a5.reversed && c2.inverted ? -1 : 1, m2 = a5.getExtremes(), q2 = a5.toValue(h3 - k2, true) + n4 * l3, p2 = a5.toValue(h3 + a5.len - k2, true) - (n4 * l3 || a5.isXAxis && a5.pointRangePadding || 0), r2 = p2 < q2; + l3 = a5.hasVerticalPanning(); + h3 = r2 ? p2 : q2; + q2 = r2 ? q2 : p2; + var t2 = a5.panningState; + !l3 || a5.isXAxis || t2 && !t2.isDirty || a5.series.forEach(function(b3) { + var a6 = b3.getProcessedData(true); + a6 = b3.getExtremes(a6.yData, true); + t2 || (t2 = { + startMin: Number.MAX_VALUE, + startMax: -Number.MAX_VALUE + }); + ba(a6.dataMin) && ba(a6.dataMax) && (t2.startMin = Math.min(S(b3.options.threshold, Infinity), a6.dataMin, t2.startMin), t2.startMax = Math.max(S(b3.options.threshold, -Infinity), a6.dataMax, t2.startMax)); + }); + l3 = Math.min(S(t2 && t2.startMin, m2.dataMin), n4 ? m2.min : a5.toValue(a5.toPixels(m2.min) - a5.minPixelPadding)); + p2 = Math.max(S(t2 && t2.startMax, m2.dataMax), n4 ? m2.max : a5.toValue(a5.toPixels(m2.max) + a5.minPixelPadding)); + a5.panningState = t2; + a5.isOrdinal || (n4 = l3 - h3, 0 < n4 && (q2 += n4, h3 = l3), n4 = q2 - p2, 0 < n4 && (q2 = p2, h3 -= n4), a5.series.length && h3 !== m2.min && q2 !== m2.max && h3 >= l3 && q2 <= p2 && (a5.setExtremes(h3, q2, false, false, { trigger: "pan" }), !c2.resetZoomButton && h3 !== l3 && q2 !== p2 && e2.match("y") && (c2.showResetZoom(), a5.displayBtn = false), g2 = true), f3[d3] = k2); + } + }); + O(f3, (b3, a5) => { + c2[a5] = b3; + }); + g2 && c2.redraw(false); + P(c2.container, { cursor: "move" }); + }); + } + } + V(ea.prototype, { + callbacks: [], + collectionsWithInit: { xAxis: [ea.prototype.addAxis, [true]], yAxis: [ea.prototype.addAxis, [false]], series: [ea.prototype.addSeries] }, + collectionsWithUpdate: ["xAxis", "yAxis", "series"], + propsRequireDirtyBox: "backgroundColor borderColor borderWidth borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "), + propsRequireReflow: "margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft".split(" "), + propsRequireUpdateSeries: "chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions time tooltip".split(" ") + }); + ""; + return ea; + }); + M(a, "Extensions/ScrollablePlotArea.js", [a["Core/Animation/AnimationUtilities.js"], a["Core/Axis/Axis.js"], a["Core/Chart/Chart.js"], a["Core/Series/Series.js"], a["Core/Renderer/RendererRegistry.js"], a["Core/Utilities.js"]], function(a2, y, I, L, C, z) { + const { stop: x } = a2, { addEvent: B, createElement: u, defined: v, merge: l2, pick: p } = z; + B(I, "afterSetChartSize", function(a3) { + var m = this.options.chart.scrollablePlotArea, h = m && m.minWidth; + m = m && m.minHeight; + let g; + if (!this.renderer.forExport) { + if (h) { + if (this.scrollablePixelsX = h = Math.max(0, h - this.chartWidth)) + this.scrollablePlotBox = this.renderer.scrollablePlotBox = l2(this.plotBox), this.plotBox.width = this.plotWidth += h, this.inverted ? this.clipBox.height += h : this.clipBox.width += h, g = { 1: { name: "right", value: h } }; + } else + m && (this.scrollablePixelsY = h = Math.max(0, m - this.chartHeight), v(h) && (this.scrollablePlotBox = this.renderer.scrollablePlotBox = l2(this.plotBox), this.plotBox.height = this.plotHeight += h, this.inverted ? this.clipBox.width += h : this.clipBox.height += h, g = { 2: { name: "bottom", value: h } })); + g && !a3.skipAxes && this.axes.forEach(function(a4) { + g[a4.side] ? a4.getPlotLinePath = function() { + let e = g[a4.side].name, h3 = this[e], l3; + this[e] = h3 - g[a4.side].value; + l3 = y.prototype.getPlotLinePath.apply(this, arguments); + this[e] = h3; + return l3; + } : (a4.setAxisSize(), a4.setAxisTranslation()); + }); + } + }); + B(I, "render", function() { + this.scrollablePixelsX || this.scrollablePixelsY ? (this.setUpScrolling && this.setUpScrolling(), this.applyFixed()) : this.fixedDiv && this.applyFixed(); + }); + I.prototype.setUpScrolling = function() { + const a3 = { WebkitOverflowScrolling: "touch", overflowX: "hidden", overflowY: "hidden" }; + this.scrollablePixelsX && (a3.overflowX = "auto"); + this.scrollablePixelsY && (a3.overflowY = "auto"); + this.scrollingParent = u("div", { className: "highcharts-scrolling-parent" }, { position: "relative" }, this.renderTo); + this.scrollingContainer = u("div", { className: "highcharts-scrolling" }, a3, this.scrollingParent); + let l3; + B(this.scrollingContainer, "scroll", () => { + this.pointer && (delete this.pointer.chartPosition, this.hoverPoint && (l3 = this.hoverPoint), this.pointer.runPointActions(void 0, l3, true)); + }); + this.innerContainer = u("div", { className: "highcharts-inner-container" }, null, this.scrollingContainer); + this.innerContainer.appendChild(this.container); + this.setUpScrolling = null; + }; + I.prototype.moveFixedElements = function() { + let a3 = this.container, l3 = this.fixedRenderer, h = ".highcharts-breadcrumbs-group .highcharts-contextbutton .highcharts-credits .highcharts-legend .highcharts-legend-checkbox .highcharts-navigator-series .highcharts-navigator-xaxis .highcharts-navigator-yaxis .highcharts-navigator .highcharts-reset-zoom .highcharts-drillup-button .highcharts-scrollbar .highcharts-subtitle .highcharts-title".split(" "), g; + this.scrollablePixelsX && !this.inverted ? g = ".highcharts-yaxis" : this.scrollablePixelsX && this.inverted ? g = ".highcharts-xaxis" : this.scrollablePixelsY && !this.inverted ? g = ".highcharts-xaxis" : this.scrollablePixelsY && this.inverted && (g = ".highcharts-yaxis"); + g && h.push(`${g}:not(.highcharts-radial-axis)`, `${g}-labels:not(.highcharts-radial-axis-labels)`); + h.forEach(function(e) { + [].forEach.call(a3.querySelectorAll(e), function(a4) { + (a4.namespaceURI === l3.SVG_NS ? l3.box : l3.box.parentNode).appendChild(a4); + a4.style.pointerEvents = "auto"; + }); + }); + }; + I.prototype.applyFixed = function() { + var a3 = !this.fixedDiv, l3 = this.options.chart, h = l3.scrollablePlotArea, g = C.getRendererType(); + a3 ? (this.fixedDiv = u("div", { className: "highcharts-fixed" }, { position: "absolute", overflow: "hidden", pointerEvents: "none", zIndex: (l3.style && l3.style.zIndex || 0) + 2, top: 0 }, null, true), this.scrollingContainer && this.scrollingContainer.parentNode.insertBefore(this.fixedDiv, this.scrollingContainer), this.renderTo.style.overflow = "visible", this.fixedRenderer = l3 = new g(this.fixedDiv, this.chartWidth, this.chartHeight, this.options.chart.style), this.scrollableMask = l3.path().attr({ fill: this.options.chart.backgroundColor || "#fff", "fill-opacity": p(h.opacity, 0.85), zIndex: -1 }).addClass("highcharts-scrollable-mask").add(), B(this, "afterShowResetZoom", this.moveFixedElements), B(this, "afterApplyDrilldown", this.moveFixedElements), B(this, "afterLayOutTitles", this.moveFixedElements)) : this.fixedRenderer.setSize(this.chartWidth, this.chartHeight); + if (this.scrollableDirty || a3) + this.scrollableDirty = false, this.moveFixedElements(); + l3 = this.chartWidth + (this.scrollablePixelsX || 0); + g = this.chartHeight + (this.scrollablePixelsY || 0); + x(this.container); + this.container.style.width = l3 + "px"; + this.container.style.height = g + "px"; + this.renderer.boxWrapper.attr({ width: l3, height: g, viewBox: [0, 0, l3, g].join(" ") }); + this.chartBackground.attr({ width: l3, height: g }); + this.scrollingContainer.style.height = this.chartHeight + "px"; + a3 && (h.scrollPositionX && (this.scrollingContainer.scrollLeft = this.scrollablePixelsX * h.scrollPositionX), h.scrollPositionY && (this.scrollingContainer.scrollTop = this.scrollablePixelsY * h.scrollPositionY)); + g = this.axisOffset; + a3 = this.plotTop - g[0] - 1; + h = this.plotLeft - g[3] - 1; + l3 = this.plotTop + this.plotHeight + g[2] + 1; + g = this.plotLeft + this.plotWidth + g[1] + 1; + let e = this.plotLeft + this.plotWidth - (this.scrollablePixelsX || 0), w = this.plotTop + this.plotHeight - (this.scrollablePixelsY || 0); + a3 = this.scrollablePixelsX ? [["M", 0, a3], ["L", this.plotLeft - 1, a3], ["L", this.plotLeft - 1, l3], ["L", 0, l3], ["Z"], ["M", e, a3], ["L", this.chartWidth, a3], ["L", this.chartWidth, l3], ["L", e, l3], ["Z"]] : this.scrollablePixelsY ? [["M", h, 0], ["L", h, this.plotTop - 1], ["L", g, this.plotTop - 1], ["L", g, 0], ["Z"], ["M", h, w], ["L", h, this.chartHeight], ["L", g, this.chartHeight], [ + "L", + g, + w + ], ["Z"]] : [["M", 0, 0]]; + this.redrawTrigger !== "adjustHeight" && this.scrollableMask.attr({ d: a3 }); + }; + B(y, "afterInit", function() { + this.chart.scrollableDirty = true; + }); + B(L, "show", function() { + this.chart.scrollableDirty = true; + }); + ""; + }); + M(a, "Core/Axis/Stacking/StackItem.js", [a["Core/Templating.js"], a["Core/Series/SeriesRegistry.js"], a["Core/Utilities.js"]], function(a2, y, I) { + const { format: x } = a2, { series: C } = y, { destroyObjectProperties: z, fireEvent: H, isNumber: B, pick: u } = I; + class v { + constructor(a3, p, t, m, h) { + const g = a3.chart.inverted, e = a3.reversed; + this.axis = a3; + a3 = this.isNegative = !!t !== !!e; + this.options = p = p || {}; + this.x = m; + this.cumulative = this.total = null; + this.points = {}; + this.hasValidPoints = false; + this.stack = h; + this.rightCliff = this.leftCliff = 0; + this.alignOptions = { align: p.align || (g ? a3 ? "left" : "right" : "center"), verticalAlign: p.verticalAlign || (g ? "middle" : a3 ? "bottom" : "top"), y: p.y, x: p.x }; + this.textAlign = p.textAlign || (g ? a3 ? "right" : "left" : "center"); + } + destroy() { + z(this, this.axis); + } + render(a3) { + const l2 = this.axis.chart, t = this.options; + var m = t.format; + m = m ? x(m, this, l2) : t.formatter.call(this); + this.label ? this.label.attr({ text: m, visibility: "hidden" }) : (this.label = l2.renderer.label(m, null, void 0, t.shape, void 0, void 0, t.useHTML, false, "stack-labels"), m = { r: t.borderRadius || 0, text: m, padding: u(t.padding, 5), visibility: "hidden" }, l2.styledMode || (m.fill = t.backgroundColor, m.stroke = t.borderColor, m["stroke-width"] = t.borderWidth, this.label.css(t.style || {})), this.label.attr(m), this.label.added || this.label.add(a3)); + this.label.labelrank = l2.plotSizeY; + H(this, "afterRender"); + } + setOffset(a3, p, t, m, h, g) { + const { + alignOptions: e, + axis: l2, + label: v2, + options: x2, + textAlign: d + } = this, k = l2.chart; + t = this.getStackBox({ xOffset: a3, width: p, boxBottom: t, boxTop: m, defaultX: h, xAxis: g }); + var { verticalAlign: r } = e; + if (v2 && t) { + m = v2.getBBox(); + h = v2.padding; + g = u(x2.overflow, "justify") === "justify"; + e.x = x2.x || 0; + e.y = x2.y || 0; + const { x: a4, y: p2 } = this.adjustStackPosition({ labelBox: m, verticalAlign: r, textAlign: d }); + t.x -= a4; + t.y -= p2; + v2.align(e, false, t); + (r = k.isInsidePlot(v2.alignAttr.x + e.x + a4, v2.alignAttr.y + e.y + p2)) || (g = false); + g && C.prototype.justifyDataLabel.call(l2, v2, e, v2.alignAttr, m, t); + v2.attr({ + x: v2.alignAttr.x, + y: v2.alignAttr.y, + rotation: x2.rotation, + rotationOriginX: m.width / 2, + rotationOriginY: m.height / 2 + }); + u(!g && x2.crop, true) && (r = B(v2.x) && B(v2.y) && k.isInsidePlot(v2.x - h + v2.width, v2.y) && k.isInsidePlot(v2.x + h, v2.y)); + v2[r ? "show" : "hide"](); + } + H(this, "afterSetOffset", { xOffset: a3, width: p }); + } + adjustStackPosition({ labelBox: a3, verticalAlign: p, textAlign: t }) { + const l2 = { bottom: 0, middle: 1, top: 2, right: 1, center: 0, left: -1 }; + return { x: a3.width / 2 + a3.width / 2 * l2[t], y: a3.height / 2 * l2[p] }; + } + getStackBox(a3) { + var l2 = this.axis; + const t = l2.chart, { + boxTop: m, + defaultX: h, + xOffset: g, + width: e, + boxBottom: w + } = a3; + var v2 = l2.stacking.usePercentage ? 100 : u(m, this.total, 0); + v2 = l2.toPixels(v2); + a3 = a3.xAxis || t.xAxis[0]; + const x2 = u(h, a3.translate(this.x)) + g; + l2 = l2.toPixels(w || B(l2.min) && l2.logarithmic && l2.logarithmic.lin2log(l2.min) || 0); + l2 = Math.abs(v2 - l2); + const d = this.isNegative; + return t.inverted ? { x: (d ? v2 : v2 - l2) - t.plotLeft, y: a3.height - x2 - e, width: l2, height: e } : { x: x2 + a3.transB - t.plotLeft, y: (d ? v2 - l2 : v2) - t.plotTop, width: e, height: l2 }; + } + } + ""; + return v; + }); + M(a, "Core/Axis/Stacking/StackingAxis.js", [ + a["Core/Animation/AnimationUtilities.js"], + a["Core/Axis/Axis.js"], + a["Core/Series/SeriesRegistry.js"], + a["Core/Axis/Stacking/StackItem.js"], + a["Core/Utilities.js"] + ], function(a2, y, I, L, C) { + function x() { + const b2 = this, a3 = b2.inverted; + b2.yAxis.forEach((b3) => { + b3.stacking && b3.stacking.stacks && b3.hasVisibleSeries && (b3.stacking.oldStacks = b3.stacking.stacks); + }); + b2.series.forEach((c) => { + const d2 = c.xAxis && c.xAxis.options || {}; + !c.options.stacking || c.visible !== true && b2.options.chart.ignoreHiddenSeries !== false || (c.stackKey = [c.type, q(c.options.stack, ""), a3 ? d2.top : d2.left, a3 ? d2.height : d2.width].join()); + }); + } + function H() { + const b2 = this.stacking; + if (b2) { + var a3 = b2.stacks; + r(a3, function(b3, c) { + E(b3); + a3[c] = null; + }); + b2 && b2.stackTotalGroup && b2.stackTotalGroup.destroy(); + } + } + function B() { + this.coll !== "yAxis" || this.stacking || (this.stacking = new G(this)); + } + function u(b2, a3, d2, e2) { + !w(b2) || b2.x !== a3 || e2 && b2.stackKey !== e2 ? b2 = { x: a3, index: 0, key: e2, stackKey: e2 } : b2.index++; + b2.key = [d2, a3, b2.index].join(); + return b2; + } + function v() { + const b2 = this, a3 = b2.stackKey, d2 = b2.yAxis.stacking.stacks, e2 = b2.processedXData, g2 = b2[b2.options.stacking + "Stacker"]; + let k2; + g2 && [a3, "-" + a3].forEach((a4) => { + let c = e2.length; + let f; + for (; c--; ) { + var h3 = e2[c]; + k2 = b2.getStackIndicator(k2, h3, b2.index, a4); + (f = (h3 = d2[a4] && d2[a4][h3]) && h3.points[k2.key]) && g2.call(b2, f, h3, c); + } + }); + } + function l2(b2, a3, d2) { + a3 = a3.total ? 100 / a3.total : 0; + b2[0] = e(b2[0] * a3); + b2[1] = e(b2[1] * a3); + this.stackedYData[d2] = b2[1]; + } + function p() { + const b2 = this.yAxis.stacking; + this.options.centerInCategory && (this.is("column") || this.is("columnrange")) && !this.options.stacking && 1 < this.chart.series.length ? h.setStackedPoints.call(this, "group") : b2 && r(b2.stacks, (a3, d2) => { + d2.slice(-5) === "group" && (r(a3, (b3) => b3.destroy()), delete b2.stacks[d2]); + }); + } + function t(b2) { + var a3 = this.chart; + const f = b2 || this.options.stacking; + if (f && (this.visible === true || a3.options.chart.ignoreHiddenSeries === false)) { + var g2 = this.processedXData, k2 = this.processedYData, h3 = [], l3 = k2.length, m2 = this.options, p2 = m2.threshold, r2 = q(m2.startFromThreshold && p2, 0); + m2 = m2.stack; + b2 = b2 ? `${this.type},${f}` : this.stackKey; + var t2 = "-" + b2, v2 = this.negStacks; + a3 = f === "group" ? a3.yAxis[0] : this.yAxis; + var u2 = a3.stacking.stacks, x2 = a3.stacking.oldStacks, E2, G2; + a3.stacking.stacksTouched += 1; + for (G2 = 0; G2 < l3; G2++) { + var F2 = g2[G2]; + var B2 = k2[G2]; + var y2 = this.getStackIndicator(y2, F2, this.index); + var C2 = y2.key; + var z = (E2 = v2 && B2 < (r2 ? 0 : p2)) ? t2 : b2; + u2[z] || (u2[z] = {}); + u2[z][F2] || (x2[z] && x2[z][F2] ? (u2[z][F2] = x2[z][F2], u2[z][F2].total = null) : u2[z][F2] = new L(a3, a3.options.stackLabels, !!E2, F2, m2)); + z = u2[z][F2]; + B2 !== null ? (z.points[C2] = z.points[this.index] = [q(z.cumulative, r2)], w(z.cumulative) || (z.base = C2), z.touched = a3.stacking.stacksTouched, 0 < y2.index && this.singleStacks === false && (z.points[C2][0] = z.points[this.index + "," + F2 + ",0"][0])) : z.points[C2] = z.points[this.index] = null; + f === "percent" ? (E2 = E2 ? b2 : t2, v2 && u2[E2] && u2[E2][F2] ? (E2 = u2[E2][F2], z.total = E2.total = Math.max(E2.total, z.total) + Math.abs(B2) || 0) : z.total = e(z.total + (Math.abs(B2) || 0))) : f === "group" ? (d(B2) && (B2 = B2[0]), B2 !== null && (z.total = (z.total || 0) + 1)) : z.total = e(z.total + (B2 || 0)); + z.cumulative = f === "group" ? (z.total || 1) - 1 : e(q(z.cumulative, r2) + (B2 || 0)); + B2 !== null && (z.points[C2].push(z.cumulative), h3[G2] = z.cumulative, z.hasValidPoints = true); + } + f === "percent" && (a3.stacking.usePercentage = true); + f !== "group" && (this.stackedYData = h3); + a3.stacking.oldStacks = {}; + } + } + const { getDeferredAnimation: m } = a2, { series: { prototype: h } } = I, { addEvent: g, correctFloat: e, defined: w, destroyObjectProperties: E, fireEvent: F, isArray: d, isNumber: k, objectEach: r, pick: q } = C; + class G { + constructor(b2) { + this.oldStacks = {}; + this.stacks = {}; + this.stacksTouched = 0; + this.axis = b2; + } + buildStacks() { + const b2 = this.axis, a3 = b2.series, d2 = b2.options.reversedStacks, e2 = a3.length; + let g2, k2; + this.usePercentage = false; + for (k2 = e2; k2--; ) + g2 = a3[d2 ? k2 : e2 - k2 - 1], g2.setStackedPoints(), g2.setGroupedPoints(); + for (k2 = 0; k2 < e2; k2++) + a3[k2].modifyStacks(); + F(b2, "afterBuildStacks"); + } + cleanStacks() { + let b2; + this.oldStacks && (b2 = this.stacks = this.oldStacks); + r(b2, function(b3) { + r(b3, function(b4) { + b4.cumulative = b4.total; + }); + }); + } + resetStacks() { + r(this.stacks, (b2) => { + r(b2, (a3, d2) => { + k(a3.touched) && a3.touched < this.stacksTouched ? (a3.destroy(), delete b2[d2]) : (a3.total = null, a3.cumulative = null); + }); + }); + } + renderStackTotals() { + var b2 = this.axis; + const a3 = b2.chart, d2 = a3.renderer, e2 = this.stacks; + b2 = m(a3, b2.options.stackLabels && b2.options.stackLabels.animation || false); + const g2 = this.stackTotalGroup = this.stackTotalGroup || d2.g("stack-labels").attr({ zIndex: 6, opacity: 0 }).add(); + g2.translate(a3.plotLeft, a3.plotTop); + r(e2, function(b3) { + r(b3, function(b4) { + b4.render(g2); + }); + }); + g2.animate({ opacity: 1 }, b2); + } + } + var b; + (function(b2) { + const a3 = []; + b2.compose = function(b3, c, d2) { + C.pushUnique(a3, b3) && (g(b3, "init", B), g(b3, "destroy", H)); + C.pushUnique(a3, c) && (c.prototype.getStacks = x); + C.pushUnique(a3, d2) && (b3 = d2.prototype, b3.getStackIndicator = u, b3.modifyStacks = v, b3.percentStacker = l2, b3.setGroupedPoints = p, b3.setStackedPoints = t); + }; + })(b || (b = {})); + return b; + }); + M(a, "Series/Line/LineSeries.js", [a["Core/Series/Series.js"], a["Core/Series/SeriesRegistry.js"], a["Core/Utilities.js"]], function(a2, y, I) { + const { defined: x, merge: C } = I; + class z extends a2 { + constructor() { + super(...arguments); + this.points = this.options = this.data = void 0; + } + drawGraph() { + const a3 = this, x2 = this.options, u = (this.gappedPath || this.getGraphPath).call(this), v = this.chart.styledMode; + let l2 = [["graph", "highcharts-graph"]]; + v || l2[0].push(x2.lineColor || this.color || "#cccccc", x2.dashStyle); + l2 = a3.getZonesGraphs(l2); + l2.forEach(function(l3, t) { + var m = l3[0]; + let h = a3[m]; + const g = h ? "animate" : "attr"; + h ? (h.endX = a3.preventGraphAnimation ? null : u.xMap, h.animate({ d: u })) : u.length && (a3[m] = h = a3.chart.renderer.path(u).addClass(l3[1]).attr({ zIndex: 1 }).add(a3.group)); + h && !v && (m = { stroke: l3[2], "stroke-width": x2.lineWidth || 0, fill: a3.fillGraph && a3.color || "none" }, l3[3] ? m.dashstyle = l3[3] : x2.linecap !== "square" && (m["stroke-linecap"] = m["stroke-linejoin"] = "round"), h[g](m).shadow(2 > t && x2.shadow)); + h && (h.startX = u.xMap, h.isArea = u.isArea); + }); + } + getGraphPath(a3, B, u) { + const v = this, l2 = v.options, p = [], t = []; + let m, h = l2.step; + a3 = a3 || v.points; + const g = a3.reversed; + g && a3.reverse(); + (h = { right: 1, center: 2 }[h] || h && 3) && g && (h = 4 - h); + a3 = this.getValidPoints(a3, false, !(l2.connectNulls && !B && !u)); + a3.forEach(function(e, g2) { + const w = e.plotX, F = e.plotY, d = a3[g2 - 1], k = e.isNull || typeof F !== "number"; + (e.leftCliff || d && d.rightCliff) && !u && (m = true); + k && !x(B) && 0 < g2 ? m = !l2.connectNulls : k && !B ? m = true : (g2 === 0 || m ? g2 = [["M", e.plotX, e.plotY]] : v.getPointSpline ? g2 = [v.getPointSpline(a3, e, g2)] : h ? (g2 = h === 1 ? [["L", d.plotX, F]] : h === 2 ? [["L", (d.plotX + w) / 2, d.plotY], ["L", (d.plotX + w) / 2, F]] : [["L", w, d.plotY]], g2.push(["L", w, F])) : g2 = [["L", w, F]], t.push(e.x), h && (t.push(e.x), h === 2 && t.push(e.x)), p.push.apply(p, g2), m = false); + }); + p.xMap = t; + return v.graphPath = p; + } + getZonesGraphs(a3) { + this.zones.forEach(function(x2, u) { + u = ["zone-graph-" + u, "highcharts-graph highcharts-zone-graph-" + u + " " + (x2.className || "")]; + this.chart.styledMode || u.push(x2.color || this.color, x2.dashStyle || this.options.dashStyle); + a3.push(u); + }, this); + return a3; + } + } + z.defaultOptions = C(a2.defaultOptions, { legendSymbol: "lineMarker" }); + y.registerSeriesType("line", z); + ""; + return z; + }); + M(a, "Series/Area/AreaSeries.js", [ + a["Core/Color/Color.js"], + a["Core/Series/SeriesRegistry.js"], + a["Core/Utilities.js"] + ], function(a2, y, I) { + const { seriesTypes: { line: x } } = y, { extend: C, merge: z, objectEach: H, pick: B } = I; + class u extends x { + constructor() { + super(...arguments); + this.points = this.options = this.data = void 0; + } + drawGraph() { + this.areaPath = []; + super.drawGraph.apply(this); + const a3 = this, l2 = this.areaPath, p = this.options, t = [["area", "highcharts-area", this.color, p.fillColor]]; + this.zones.forEach(function(l3, h) { + t.push(["zone-area-" + h, "highcharts-area highcharts-zone-area-" + h + " " + l3.className, l3.color || a3.color, l3.fillColor || p.fillColor]); + }); + t.forEach(function(m) { + const h = m[0], g = {}; + let e = a3[h]; + const t2 = e ? "animate" : "attr"; + e ? (e.endX = a3.preventGraphAnimation ? null : l2.xMap, e.animate({ d: l2 })) : (g.zIndex = 0, e = a3[h] = a3.chart.renderer.path(l2).addClass(m[1]).add(a3.group), e.isArea = true); + a3.chart.styledMode || (m[3] ? g.fill = m[3] : (g.fill = m[2], g["fill-opacity"] = B(p.fillOpacity, 0.75))); + e[t2](g); + e.startX = l2.xMap; + e.shiftUnit = p.step ? 2 : 1; + }); + } + getGraphPath(a3) { + var l2 = x.prototype.getGraphPath, p = this.options; + const t = p.stacking, m = this.yAxis, h = [], g = [], e = this.index, w = m.stacking.stacks[this.stackKey], v = p.threshold, u2 = Math.round(m.getThreshold(p.threshold)); + p = B(p.connectNulls, t === "percent"); + var d = function(d2, b, f) { + var c = a3[d2]; + d2 = t && w[c.x].points[e]; + const n3 = c[f + "Null"] || 0; + f = c[f + "Cliff"] || 0; + let l3, q2; + c = true; + f || n3 ? (l3 = (n3 ? d2[0] : d2[1]) + f, q2 = d2[0] + f, c = !!n3) : !t && a3[b] && a3[b].isNull && (l3 = q2 = v); + typeof l3 !== "undefined" && (g.push({ plotX: k, plotY: l3 === null ? u2 : m.getThreshold(l3), isNull: c, isCliff: true }), h.push({ plotX: k, plotY: q2 === null ? u2 : m.getThreshold(q2), doCurve: false })); + }; + let k; + a3 = a3 || this.points; + t && (a3 = this.getStackPoints(a3)); + for (let e2 = 0, b = a3.length; e2 < b; ++e2) { + t || (a3[e2].leftCliff = a3[e2].rightCliff = a3[e2].leftNull = a3[e2].rightNull = void 0); + var r = a3[e2].isNull; + k = B(a3[e2].rectPlotX, a3[e2].plotX); + var q = t ? B(a3[e2].yBottom, u2) : u2; + if (!r || p) + p || d(e2, e2 - 1, "left"), r && !t && p || (g.push(a3[e2]), h.push({ x: e2, plotX: k, plotY: q })), p || d(e2, e2 + 1, "right"); + } + d = l2.call(this, g, true, true); + h.reversed = true; + r = l2.call(this, h, true, true); + (q = r[0]) && q[0] === "M" && (r[0] = ["L", q[1], q[2]]); + r = d.concat(r); + r.length && r.push(["Z"]); + l2 = l2.call(this, g, false, p); + r.xMap = d.xMap; + this.areaPath = r; + return l2; + } + getStackPoints(a3) { + const l2 = this, p = [], t = [], m = this.xAxis, h = this.yAxis, g = h.stacking.stacks[this.stackKey], e = {}, w = h.series, v = w.length, u2 = h.options.reversedStacks ? 1 : -1, d = w.indexOf(l2); + a3 = a3 || this.points; + if (this.options.stacking) { + for (let d2 = 0; d2 < a3.length; d2++) + a3[d2].leftNull = a3[d2].rightNull = void 0, e[a3[d2].x] = a3[d2]; + H(g, function(a4, d2) { + a4.total !== null && t.push(d2); + }); + t.sort(function(a4, d2) { + return a4 - d2; + }); + const k = w.map((a4) => a4.visible); + t.forEach(function(a4, q) { + let r = 0, b, f; + if (e[a4] && !e[a4].isNull) + p.push(e[a4]), [-1, 1].forEach(function(c) { + const h3 = c === 1 ? "rightNull" : "leftNull", m2 = g[t[q + c]]; + let p2 = 0; + if (m2) { + let c2 = d; + for (; 0 <= c2 && c2 < v; ) { + const d2 = w[c2].index; + b = m2.points[d2]; + b || (d2 === l2.index ? e[a4][h3] = true : k[c2] && (f = g[a4].points[d2]) && (p2 -= f[1] - f[0])); + c2 += u2; + } + } + e[a4][c === 1 ? "rightCliff" : "leftCliff"] = p2; + }); + else { + let c = d; + for (; 0 <= c && c < v; ) { + if (b = g[a4].points[w[c].index]) { + r = b[1]; + break; + } + c += u2; + } + r = B(r, 0); + r = h.translate(r, 0, 1, 0, 1); + p.push({ isNull: true, plotX: m.translate(a4, 0, 0, 0, 1), x: a4, plotY: r, yBottom: r }); + } + }); + } + return p; + } + } + u.defaultOptions = z(x.defaultOptions, { threshold: 0, legendSymbol: "rectangle" }); + C(u.prototype, { singleStacks: false }); + y.registerSeriesType("area", u); + ""; + return u; + }); + M(a, "Series/Spline/SplineSeries.js", [a["Core/Series/SeriesRegistry.js"], a["Core/Utilities.js"]], function(a2, y) { + const { line: x } = a2.seriesTypes, { merge: L, pick: C } = y; + class z extends x { + constructor() { + super(...arguments); + this.points = this.options = this.data = void 0; + } + getPointSpline(a3, x2, u) { + const v = x2.plotX || 0, l2 = x2.plotY || 0, p = a3[u - 1]; + u = a3[u + 1]; + let t, m; + let h; + if (p && !p.isNull && p.doCurve !== false && !x2.isCliff && u && !u.isNull && u.doCurve !== false && !x2.isCliff) { + a3 = p.plotY || 0; + var g = u.plotX || 0; + u = u.plotY || 0; + let e = 0; + t = (1.5 * v + (p.plotX || 0)) / 2.5; + m = (1.5 * l2 + a3) / 2.5; + g = (1.5 * v + g) / 2.5; + h = (1.5 * l2 + u) / 2.5; + g !== t && (e = (h - m) * (g - v) / (g - t) + l2 - h); + m += e; + h += e; + m > a3 && m > l2 ? (m = Math.max(a3, l2), h = 2 * l2 - m) : m < a3 && m < l2 && (m = Math.min(a3, l2), h = 2 * l2 - m); + h > u && h > l2 ? (h = Math.max(u, l2), m = 2 * l2 - h) : h < u && h < l2 && (h = Math.min(u, l2), m = 2 * l2 - h); + x2.rightContX = g; + x2.rightContY = h; + } + x2 = ["C", C(p.rightContX, p.plotX, 0), C(p.rightContY, p.plotY, 0), C(t, v, 0), C(m, l2, 0), v, l2]; + p.rightContX = p.rightContY = void 0; + return x2; + } + } + z.defaultOptions = L(x.defaultOptions); + a2.registerSeriesType("spline", z); + ""; + return z; + }); + M(a, "Series/AreaSpline/AreaSplineSeries.js", [a["Series/Spline/SplineSeries.js"], a["Core/Series/SeriesRegistry.js"], a["Core/Utilities.js"]], function(a2, y, I) { + const { area: x, area: { prototype: C } } = y.seriesTypes, { extend: z, merge: H } = I; + class B extends a2 { + constructor() { + super(...arguments); + this.options = this.points = this.data = void 0; + } + } + B.defaultOptions = H(a2.defaultOptions, x.defaultOptions); + z(B.prototype, { getGraphPath: C.getGraphPath, getStackPoints: C.getStackPoints, drawGraph: C.drawGraph }); + y.registerSeriesType("areaspline", B); + ""; + return B; + }); + M(a, "Series/Column/ColumnSeriesDefaults.js", [], function() { + ""; + return { borderRadius: 3, centerInCategory: false, groupPadding: 0.2, marker: null, pointPadding: 0.1, minPointLength: 0, cropThreshold: 50, pointRange: null, states: { hover: { halo: false, brightness: 0.1 }, select: { color: "#cccccc", borderColor: "#000000" } }, dataLabels: { align: void 0, verticalAlign: void 0, y: void 0 }, startFromThreshold: true, stickyTracking: false, tooltip: { distance: 6 }, threshold: 0, borderColor: "#ffffff" }; + }); + M(a, "Series/Column/ColumnSeries.js", [ + a["Core/Animation/AnimationUtilities.js"], + a["Core/Color/Color.js"], + a["Series/Column/ColumnSeriesDefaults.js"], + a["Core/Globals.js"], + a["Core/Series/Series.js"], + a["Core/Series/SeriesRegistry.js"], + a["Core/Utilities.js"] + ], function(a2, y, I, L, C, z, H) { + const { animObject: x } = a2, { parse: u } = y, { hasTouch: v, noop: l2 } = L, { clamp: p, defined: t, extend: m, fireEvent: h, isArray: g, isNumber: e, merge: w, pick: E, objectEach: F } = H; + class d extends C { + constructor() { + super(...arguments); + this.points = this.options = this.group = this.data = this.borderWidth = void 0; + } + animate(a3) { + const d2 = this, e2 = this.yAxis, g2 = e2.pos, b = d2.options, f = this.chart.inverted, c = {}, k = f ? "translateX" : "translateY"; + let h3; + a3 ? (c.scaleY = 1e-3, a3 = p(e2.toPixels(b.threshold), g2, g2 + e2.len), f ? c.translateX = a3 - e2.len : c.translateY = a3, d2.clipBox && d2.setClip(), d2.group.attr(c)) : (h3 = Number(d2.group.attr(k)), d2.group.animate({ scaleY: 1 }, m(x(d2.options.animation), { step: function(b2, a4) { + d2.group && (c[k] = h3 + a4.pos * (g2 - h3), d2.group.attr(c)); + } }))); + } + init(a3, d2) { + super.init.apply(this, arguments); + const e2 = this; + a3 = e2.chart; + a3.hasRendered && a3.series.forEach(function(a4) { + a4.type === e2.type && (a4.isDirty = true); + }); + } + getColumnMetrics() { + const a3 = this; + var d2 = a3.options; + const e2 = a3.xAxis, g2 = a3.yAxis; + var b = e2.options.reversedStacks; + b = e2.reversed && !b || !e2.reversed && b; + const f = {}; + let c, h3 = 0; + d2.grouping === false ? h3 = 1 : a3.chart.series.forEach(function(b2) { + const d3 = b2.yAxis, e3 = b2.options; + let k; + b2.type !== a3.type || !b2.visible && a3.chart.options.chart.ignoreHiddenSeries || g2.len !== d3.len || g2.pos !== d3.pos || (e3.stacking && e3.stacking !== "group" ? (c = b2.stackKey, typeof f[c] === "undefined" && (f[c] = h3++), k = f[c]) : e3.grouping !== false && (k = h3++), b2.columnIndex = k); + }); + const l3 = Math.min(Math.abs(e2.transA) * (e2.ordinal && e2.ordinal.slope || d2.pointRange || e2.closestPointRange || e2.tickInterval || 1), e2.len), m2 = l3 * d2.groupPadding, p2 = (l3 - 2 * m2) / (h3 || 1); + d2 = Math.min(d2.maxPointWidth || e2.len, E(d2.pointWidth, p2 * (1 - 2 * d2.pointPadding))); + a3.columnMetrics = { width: d2, offset: (p2 - d2) / 2 + (m2 + ((a3.columnIndex || 0) + (b ? 1 : 0)) * p2 - l3 / 2) * (b ? -1 : 1), paddedWidth: p2, columnCount: h3 }; + return a3.columnMetrics; + } + crispCol(a3, d2, e2, g2) { + var b = this.borderWidth, f = -(b % 2 ? 0.5 : 0); + b = b % 2 ? 0.5 : 1; + this.options.crisp && (e2 = Math.round(a3 + e2) + f, a3 = Math.round(a3) + f, e2 -= a3); + g2 = Math.round(d2 + g2) + b; + f = 0.5 >= Math.abs(d2) && 0.5 < g2; + d2 = Math.round(d2) + b; + g2 -= d2; + f && g2 && (--d2, g2 += 1); + return { x: a3, y: d2, width: e2, height: g2 }; + } + adjustForMissingColumns(a3, d2, e2, h3) { + const b = this.options.stacking; + if (!e2.isNull && 1 < h3.columnCount) { + const f = this.yAxis.options.reversedStacks; + let c = 0, k = f ? 0 : -h3.columnCount; + F(this.yAxis.stacking && this.yAxis.stacking.stacks, (a4) => { + if (typeof e2.x === "number") { + const d3 = a4[e2.x.toString()]; + d3 && (a4 = d3.points[this.index], b ? (a4 && (c = k), d3.hasValidPoints && (f ? k++ : k--)) : g(a4) && (a4 = Object.keys(d3.points).filter((b2) => !b2.match(",") && d3.points[b2] && 1 < d3.points[b2].length).map(parseFloat).sort((b2, a5) => a5 - b2), c = a4.indexOf(this.index), k = a4.length)); + } + }); + a3 = (e2.plotX || 0) + ((k - 1) * h3.paddedWidth + d2) / 2 - d2 - c * h3.paddedWidth; + } + return a3; + } + translate() { + const a3 = this, d2 = a3.chart, g2 = a3.options; + var l3 = a3.dense = 2 > a3.closestPointRange * a3.xAxis.transA; + l3 = a3.borderWidth = E(g2.borderWidth, l3 ? 0 : 1); + const b = a3.xAxis, f = a3.yAxis, c = g2.threshold, n3 = E(g2.minPointLength, 5), m2 = a3.getColumnMetrics(), w2 = m2.width, v2 = a3.pointXOffset = m2.offset, u2 = a3.dataMin, x2 = a3.dataMax; + let F2 = a3.barW = Math.max(w2, 1 + 2 * l3), y2 = a3.translatedThreshold = f.getThreshold(c); + d2.inverted && (y2 -= 0.5); + g2.pointPadding && (F2 = Math.ceil(F2)); + C.prototype.translate.apply(a3); + a3.points.forEach(function(k) { + const h3 = E(k.yBottom, y2); + var l4 = 999 + Math.abs(h3), q = k.plotX || 0; + l4 = p(k.plotY, -l4, f.len + l4); + let r = Math.min(l4, h3), D = Math.max(l4, h3) - r, z2 = w2, B = q + v2, G = F2; + n3 && Math.abs(D) < n3 && (D = n3, q = !f.reversed && !k.negative || f.reversed && k.negative, e(c) && e(x2) && k.y === c && x2 <= c && (f.min || 0) < c && (u2 !== x2 || (f.max || 0) <= c) && (q = !q, k.negative = !k.negative), r = Math.abs(r - y2) > n3 ? h3 - n3 : y2 - (q ? n3 : 0)); + t(k.options.pointWidth) && (z2 = G = Math.ceil(k.options.pointWidth), B -= Math.round((z2 - w2) / 2)); + g2.centerInCategory && (B = a3.adjustForMissingColumns(B, z2, k, m2)); + k.barX = B; + k.pointWidth = z2; + k.tooltipPos = d2.inverted ? [p(f.len + f.pos - d2.plotLeft - l4, f.pos - d2.plotLeft, f.len + f.pos - d2.plotLeft), b.len + b.pos - d2.plotTop - B - G / 2, D] : [b.left - d2.plotLeft + B + G / 2, p(l4 + f.pos - d2.plotTop, f.pos - d2.plotTop, f.len + f.pos - d2.plotTop), D]; + k.shapeType = a3.pointClass.prototype.shapeType || "roundedRect"; + k.shapeArgs = a3.crispCol(B, k.isNull ? y2 : r, G, k.isNull ? 0 : D); + }); + h(this, "afterColumnTranslate"); + } + drawGraph() { + this.group[this.dense ? "addClass" : "removeClass"]("highcharts-dense-data"); + } + pointAttribs(a3, d2) { + const e2 = this.options; + var g2 = this.pointAttrToOptions || {}, b = g2.stroke || "borderColor"; + const f = g2["stroke-width"] || "borderWidth"; + let c, k = a3 && a3.color || this.color, h3 = a3 && a3[b] || e2[b] || k; + g2 = a3 && a3.options.dashStyle || e2.dashStyle; + let l3 = a3 && a3[f] || e2[f] || this[f] || 0, m2 = E(a3 && a3.opacity, e2.opacity, 1); + a3 && this.zones.length && (c = a3.getZone(), k = a3.options.color || c && (c.color || a3.nonZonedColor) || this.color, c && (h3 = c.borderColor || h3, g2 = c.dashStyle || g2, l3 = c.borderWidth || l3)); + d2 && a3 && (a3 = w(e2.states[d2], a3.options.states && a3.options.states[d2] || {}), d2 = a3.brightness, k = a3.color || typeof d2 !== "undefined" && u(k).brighten(a3.brightness).get() || k, h3 = a3[b] || h3, l3 = a3[f] || l3, g2 = a3.dashStyle || g2, m2 = E(a3.opacity, m2)); + b = { fill: k, stroke: h3, "stroke-width": l3, opacity: m2 }; + g2 && (b.dashstyle = g2); + return b; + } + drawPoints(a3 = this.points) { + const d2 = this, g2 = this.chart, k = d2.options, b = g2.renderer, f = k.animationLimit || 250; + let c; + a3.forEach(function(a4) { + let h3 = a4.graphic, l3 = !!h3, n3 = h3 && g2.pointCount < f ? "animate" : "attr"; + if (e(a4.plotY) && a4.y !== null) { + c = a4.shapeArgs; + h3 && a4.hasNewShapeType() && (h3 = h3.destroy()); + d2.enabledDataSorting && (a4.startXPos = d2.xAxis.reversed ? -(c ? c.width || 0 : 0) : d2.xAxis.width); + h3 || (a4.graphic = h3 = b[a4.shapeType](c).add(a4.group || d2.group)) && d2.enabledDataSorting && g2.hasRendered && g2.pointCount < f && (h3.attr({ x: a4.startXPos }), l3 = true, n3 = "animate"); + if (h3 && l3) + h3[n3](w(c)); + g2.styledMode || h3[n3](d2.pointAttribs(a4, a4.selected && "select")).shadow(a4.allowShadow !== false && k.shadow); + h3 && (h3.addClass(a4.getClassName(), true), h3.attr({ visibility: a4.visible ? "inherit" : "hidden" })); + } else + h3 && (a4.graphic = h3.destroy()); + }); + } + drawTracker(a3 = this.points) { + const d2 = this, e2 = d2.chart, k = e2.pointer, b = function(a4) { + const b2 = k.getPointFromEvent(a4); + typeof b2 !== "undefined" && d2.options.enableMouseTracking && (k.isDirectTouch = true, b2.onMouseOver(a4)); + }; + let f; + a3.forEach(function(a4) { + f = g(a4.dataLabels) ? a4.dataLabels : a4.dataLabel ? [a4.dataLabel] : []; + a4.graphic && (a4.graphic.element.point = a4); + f.forEach(function(b2) { + b2.div ? b2.div.point = a4 : b2.element.point = a4; + }); + }); + d2._hasTracking || (d2.trackerGroups.forEach(function(a4) { + if (d2[a4]) { + d2[a4].addClass("highcharts-tracker").on("mouseover", b).on("mouseout", function(a5) { + k.onTrackerMouseOut(a5); + }); + if (v) + d2[a4].on("touchstart", b); + !e2.styledMode && d2.options.cursor && d2[a4].css({ cursor: d2.options.cursor }); + } + }), d2._hasTracking = true); + h(this, "afterDrawTracker"); + } + remove() { + const a3 = this, d2 = a3.chart; + d2.hasRendered && d2.series.forEach(function(d3) { + d3.type === a3.type && (d3.isDirty = true); + }); + C.prototype.remove.apply(a3, arguments); + } + } + d.defaultOptions = w(C.defaultOptions, I); + m(d.prototype, { cropShoulder: 0, directTouch: true, getSymbol: l2, negStacks: true, trackerGroups: ["group", "dataLabelsGroup"] }); + z.registerSeriesType("column", d); + ""; + return d; + }); + M(a, "Core/Series/DataLabel.js", [a["Core/Animation/AnimationUtilities.js"], a["Core/Templating.js"], a["Core/Utilities.js"]], function(a2, y, I) { + const { getDeferredAnimation: x } = a2, { format: C } = y, { defined: z, extend: H, fireEvent: B, isArray: u, isString: v, merge: l2, objectEach: p, pick: t, splat: m } = I; + var h; + (function(a3) { + function e(a4, d2, c, e2, g2) { + const b = this.chart; + var f = this.isCartesian && b.inverted; + const k2 = this.enabledDataSorting; + var h4 = a4.plotX, l3 = a4.plotY; + const n3 = c.rotation; + var m2 = c.align; + l3 = z(h4) && z(l3) && b.isInsidePlot(h4, Math.round(l3), { inverted: f, paneCoordinates: true, series: this }); + let p2 = t(c.overflow, k2 ? "none" : "justify") === "justify"; + f = this.visible && a4.visible !== false && z(h4) && (a4.series.forceDL || k2 && !p2 || l3 || t(c.inside, !!this.options.stacking) && e2 && b.isInsidePlot(h4, f ? e2.x + 1 : e2.y + e2.height - 1, { inverted: f, paneCoordinates: true, series: this })); + h4 = a4.pos(); + if (f && h4) { + n3 && d2.attr({ align: m2 }); + m2 = d2.getBBox(true); + var q2 = [0, 0]; + var r2 = b.renderer.fontMetrics(d2).b; + e2 = H({ x: h4[0], y: Math.round(h4[1]), width: 0, height: 0 }, e2); + H(c, { width: m2.width, height: m2.height }); + n3 ? (p2 = false, q2 = b.renderer.rotCorr(r2, n3), r2 = { x: e2.x + (c.x || 0) + e2.width / 2 + q2.x, y: e2.y + (c.y || 0) + { top: 0, middle: 0.5, bottom: 1 }[c.verticalAlign] * e2.height }, q2 = [m2.x - Number(d2.attr("x")), m2.y - Number(d2.attr("y"))], k2 && this.xAxis && !p2 && this.setDataLabelStartPos(a4, d2, g2, l3, r2), d2[g2 ? "attr" : "animate"](r2)) : (k2 && this.xAxis && !p2 && this.setDataLabelStartPos(a4, d2, g2, l3, e2), d2.align(c, void 0, e2), r2 = d2.alignAttr); + if (p2 && 0 <= e2.height) + this.justifyDataLabel(d2, c, r2, m2, e2, g2); + else if (t(c.crop, true)) { + let { x: a5, y: c2 } = r2; + a5 += q2[0]; + c2 += q2[1]; + f = b.isInsidePlot(a5, c2, { + paneCoordinates: true, + series: this + }) && b.isInsidePlot(a5 + m2.width, c2 + m2.height, { paneCoordinates: true, series: this }); + } + if (c.shape && !n3) + d2[g2 ? "attr" : "animate"]({ anchorX: h4[0], anchorY: h4[1] }); + } + g2 && k2 && (d2.placed = false); + f || k2 && !p2 ? d2.show() : (d2.hide(), d2.placed = false); + } + function g(a4, d2) { + var b = d2.filter; + return b ? (d2 = b.operator, a4 = a4[b.property], b = b.value, d2 === ">" && a4 > b || d2 === "<" && a4 < b || d2 === ">=" && a4 >= b || d2 === "<=" && a4 <= b || d2 === "==" && a4 == b || d2 === "===" && a4 === b ? true : false) : true; + } + function h3() { + return this.plotGroup("dataLabelsGroup", "data-labels", this.hasRendered ? "inherit" : "hidden", this.options.dataLabels.zIndex || 6); + } + function F(a4) { + const b = this.hasRendered || 0, c = this.initDataLabelsGroup().attr({ opacity: +b }); + !b && c && (this.visible && c.show(), this.options.animation ? c.animate({ opacity: 1 }, a4) : c.attr({ opacity: 1 })); + return c; + } + function d(a4 = this.points) { + var b, c; + const d2 = this, e2 = d2.chart, k2 = d2.options, h4 = e2.renderer, { backgroundColor: l3, plotBackgroundColor: q2 } = e2.options.chart, w = e2.options.plotOptions, E = h4.getContrast(v(q2) && q2 || v(l3) && l3 || "#000000"); + let F2 = k2.dataLabels, A, y3; + var G = m(F2)[0]; + const H2 = G.animation; + G = G.defer ? x(e2, H2, d2) : { defer: 0, duration: 0 }; + F2 = r(r((b = w === null || w === void 0 ? void 0 : w.series) === null || b === void 0 ? void 0 : b.dataLabels, (c = w === null || w === void 0 ? void 0 : w[d2.type]) === null || c === void 0 ? void 0 : c.dataLabels), F2); + B(this, "drawDataLabels"); + if (u(F2) || F2.enabled || d2._hasPointLabels) + y3 = this.initDataLabels(G), a4.forEach((a5) => { + var b2; + const c2 = a5.dataLabels || []; + A = m(r(F2, a5.dlOptions || ((b2 = a5.options) === null || b2 === void 0 ? void 0 : b2.dataLabels))); + A.forEach((b3, f) => { + var l4, m2 = b3.enabled && (!a5.isNull || a5.dataLabelOnNull) && g(a5, b3); + const n3 = a5.connectors ? a5.connectors[f] : a5.connector, q3 = b3.style || {}; + let r2 = {}, w2 = c2[f], u2 = !w2; + const x2 = t(b3.distance, a5.labelDistance); + if (m2) { + var A2 = t(b3[a5.formatPrefix + "Format"], b3.format); + var F3 = a5.getLabelConfig(); + F3 = z(A2) ? C(A2, F3, e2) : (b3[a5.formatPrefix + "Formatter"] || b3.formatter).call(F3, b3); + A2 = b3.rotation; + e2.styledMode || (q3.color = t(b3.color, q3.color, v(d2.color) ? d2.color : void 0, "#000000"), q3.color === "contrast" ? (a5.contrastColor = h4.getContrast(a5.color || d2.color), q3.color = !z(x2) && b3.inside || 0 > (x2 || 0) || k2.stacking ? a5.contrastColor : E) : delete a5.contrastColor, k2.cursor && (q3.cursor = k2.cursor)); + r2 = { r: b3.borderRadius || 0, rotation: A2, padding: b3.padding, zIndex: 1 }; + if (!e2.styledMode) { + const { backgroundColor: c3, borderColor: d3 } = b3; + r2.fill = c3 === "auto" ? a5.color : c3; + r2.stroke = d3 === "auto" ? a5.color : d3; + r2["stroke-width"] = b3.borderWidth; + } + p(r2, (a6, b4) => { + typeof a6 === "undefined" && delete r2[b4]; + }); + } + !w2 || m2 && z(F3) && !!w2.div === !!b3.useHTML && (w2.rotation && b3.rotation || w2.rotation === b3.rotation) || (w2 = void 0, u2 = true, n3 && a5.connector && (a5.connector = a5.connector.destroy(), a5.connectors && (a5.connectors.length === 1 ? delete a5.connectors : delete a5.connectors[f]))); + m2 && z(F3) && (w2 ? r2.text = F3 : (w2 = A2 ? h4.text(F3, 0, 0, b3.useHTML).addClass("highcharts-data-label") : h4.label(F3, 0, 0, b3.shape, void 0, void 0, b3.useHTML, void 0, "data-label")) && w2.addClass(" highcharts-data-label-color-" + a5.colorIndex + " " + (b3.className || "") + (b3.useHTML ? " highcharts-tracker" : "")), w2 && (w2.options = b3, w2.attr(r2), e2.styledMode || w2.css(q3).shadow(b3.shadow), (m2 = b3[a5.formatPrefix + "TextPath"] || b3.textPath) && !b3.useHTML && (w2.setTextPath(((l4 = a5.getDataLabelPath) === null || l4 === void 0 ? void 0 : l4.call(a5, w2)) || a5.graphic, m2), a5.dataLabelPath && !m2.enabled && (a5.dataLabelPath = a5.dataLabelPath.destroy())), w2.added || w2.add(y3), d2.alignDataLabel(a5, w2, b3, void 0, u2), w2.isActive = true, c2[f] && c2[f] !== w2 && c2[f].destroy(), c2[f] = w2)); + }); + for (b2 = c2.length; b2--; ) + c2[b2].isActive ? c2[b2].isActive = false : (c2[b2].destroy(), c2.splice(b2, 1)); + a5.dataLabel = c2[0]; + a5.dataLabels = c2; + }); + B(this, "afterDrawDataLabels"); + } + function k(a4, d2, c, e2, g2, k2) { + const b = this.chart, f = d2.align, h4 = d2.verticalAlign, l3 = a4.box ? 0 : a4.padding || 0; + let { x: m2 = 0, y: n3 = 0 } = d2, p2, q2; + p2 = (c.x || 0) + l3; + 0 > p2 && (f === "right" && 0 <= m2 ? (d2.align = "left", d2.inside = true) : m2 -= p2, q2 = true); + p2 = (c.x || 0) + e2.width - l3; + p2 > b.plotWidth && (f === "left" && 0 >= m2 ? (d2.align = "right", d2.inside = true) : m2 += b.plotWidth - p2, q2 = true); + p2 = c.y + l3; + 0 > p2 && (h4 === "bottom" && 0 <= n3 ? (d2.verticalAlign = "top", d2.inside = true) : n3 -= p2, q2 = true); + p2 = (c.y || 0) + e2.height - l3; + p2 > b.plotHeight && (h4 === "top" && 0 >= n3 ? (d2.verticalAlign = "bottom", d2.inside = true) : n3 += b.plotHeight - p2, q2 = true); + q2 && (d2.x = m2, d2.y = n3, a4.placed = !k2, a4.align(d2, void 0, g2)); + return q2; + } + function r(a4, d2) { + let b = [], f; + if (u(a4) && !u(d2)) + b = a4.map(function(a5) { + return l2(a5, d2); + }); + else if (u(d2) && !u(a4)) + b = d2.map(function(b2) { + return l2(a4, b2); + }); + else if (!u(a4) && !u(d2)) + b = l2(a4, d2); + else if (u(a4) && u(d2)) + for (f = Math.max(a4.length, d2.length); f--; ) + b[f] = l2(a4[f], d2[f]); + return b; + } + function q(a4, d2, c, e2, g2) { + const b = this.chart, f = b.inverted, k2 = this.xAxis, h4 = k2.reversed, l3 = f ? d2.height / 2 : d2.width / 2; + a4 = (a4 = a4.pointWidth) ? a4 / 2 : 0; + d2.startXPos = f ? g2.x : h4 ? -l3 - a4 : k2.width - l3 + a4; + d2.startYPos = f ? h4 ? this.yAxis.height - l3 + a4 : -l3 - a4 : g2.y; + e2 ? d2.visibility === "hidden" && (d2.show(), d2.attr({ opacity: 0 }).animate({ opacity: 1 })) : d2.attr({ opacity: 1 }).animate({ opacity: 0 }, void 0, d2.hide); + b.hasRendered && (c && d2.attr({ x: d2.startXPos, y: d2.startYPos }), d2.placed = true); + } + const y2 = []; + a3.compose = function(a4) { + I.pushUnique(y2, a4) && (a4 = a4.prototype, a4.initDataLabelsGroup = h3, a4.initDataLabels = F, a4.alignDataLabel = e, a4.drawDataLabels = d, a4.justifyDataLabel = k, a4.setDataLabelStartPos = q); + }; + })(h || (h = {})); + ""; + return h; + }); + M(a, "Series/Column/ColumnDataLabel.js", [a["Core/Series/DataLabel.js"], a["Core/Series/SeriesRegistry.js"], a["Core/Utilities.js"]], function(a2, y, I) { + const { series: x } = y, { merge: C, pick: z } = I; + var H; + (function(y2) { + function u(a3, p, t, m, h) { + let g = this.chart.inverted; + var e = a3.series; + let l2 = (e.xAxis ? e.xAxis.len : this.chart.plotSizeX) || 0; + e = (e.yAxis ? e.yAxis.len : this.chart.plotSizeY) || 0; + var v2 = a3.dlBox || a3.shapeArgs; + let u2 = z(a3.below, a3.plotY > z(this.translatedThreshold, e)), d = z(t.inside, !!this.options.stacking); + v2 && (m = C(v2), 0 > m.y && (m.height += m.y, m.y = 0), v2 = m.y + m.height - e, 0 < v2 && v2 < m.height && (m.height -= v2), g && (m = { x: e - m.y - m.height, y: l2 - m.x - m.width, width: m.height, height: m.width }), d || (g ? (m.x += u2 ? 0 : m.width, m.width = 0) : (m.y += u2 ? m.height : 0, m.height = 0))); + t.align = z(t.align, !g || d ? "center" : u2 ? "right" : "left"); + t.verticalAlign = z(t.verticalAlign, g || d ? "middle" : u2 ? "top" : "bottom"); + x.prototype.alignDataLabel.call(this, a3, p, t, m, h); + t.inside && a3.contrastColor && p.css({ color: a3.contrastColor }); + } + const v = []; + y2.compose = function(l2) { + a2.compose(x); + I.pushUnique(v, l2) && (l2.prototype.alignDataLabel = u); + }; + })(H || (H = {})); + return H; + }); + M(a, "Series/Bar/BarSeries.js", [a["Series/Column/ColumnSeries.js"], a["Core/Series/SeriesRegistry.js"], a["Core/Utilities.js"]], function(a2, y, I) { + const { extend: x, merge: C } = I; + class z extends a2 { + constructor() { + super(...arguments); + this.points = this.options = this.data = void 0; + } + } + z.defaultOptions = C(a2.defaultOptions, {}); + x(z.prototype, { inverted: true }); + y.registerSeriesType("bar", z); + ""; + return z; + }); + M(a, "Series/Scatter/ScatterSeriesDefaults.js", [], function() { + ""; + return { lineWidth: 0, findNearestPointBy: "xy", jitter: { x: 0, y: 0 }, marker: { enabled: true }, tooltip: { headerFormat: '\u25CF {series.name}
', pointFormat: "x: {point.x}
y: {point.y}
" } }; + }); + M(a, "Series/Scatter/ScatterSeries.js", [a["Series/Scatter/ScatterSeriesDefaults.js"], a["Core/Series/SeriesRegistry.js"], a["Core/Utilities.js"]], function(a2, y, I) { + const { column: x, line: C } = y.seriesTypes, { addEvent: z, extend: H, merge: B } = I; + class u extends C { + constructor() { + super(...arguments); + this.points = this.options = this.data = void 0; + } + applyJitter() { + const a3 = this, l2 = this.options.jitter, p = this.points.length; + l2 && this.points.forEach(function(t, m) { + ["x", "y"].forEach(function(h, g) { + let e = "plot" + h.toUpperCase(), w, v; + if (l2[h] && !t.isNull) { + var u2 = a3[h + "Axis"]; + v = l2[h] * u2.transA; + u2 && !u2.isLog && (w = Math.max(0, t[e] - v), u2 = Math.min(u2.len, t[e] + v), g = 1e4 * Math.sin(m + g * p), g -= Math.floor(g), t[e] = w + (u2 - w) * g, h === "x" && (t.clientX = t.plotX)); + } + }); + }); + } + drawGraph() { + this.options.lineWidth ? super.drawGraph() : this.graph && (this.graph = this.graph.destroy()); + } + } + u.defaultOptions = B(C.defaultOptions, a2); + H(u.prototype, { drawTracker: x.prototype.drawTracker, sorted: false, requireSorting: false, noSharedTooltip: true, trackerGroups: ["group", "markerGroup", "dataLabelsGroup"], takeOrdinalPosition: false }); + z(u, "afterTranslate", function() { + this.applyJitter(); + }); + y.registerSeriesType("scatter", u); + return u; + }); + M(a, "Series/CenteredUtilities.js", [a["Core/Globals.js"], a["Core/Series/Series.js"], a["Core/Utilities.js"]], function(a2, y, I) { + const { deg2rad: x } = a2, { fireEvent: C, isNumber: z, pick: H, relativeLength: B } = I; + var u; + (function(a3) { + a3.getCenter = function() { + var a4 = this.options, p = this.chart; + const t = 2 * (a4.slicedOffset || 0), m = p.plotWidth - 2 * t, h = p.plotHeight - 2 * t; + var g = a4.center; + const e = Math.min(m, h), w = a4.thickness; + var v = a4.size; + let u2 = a4.innerSize || 0; + typeof v === "string" && (v = parseFloat(v)); + typeof u2 === "string" && (u2 = parseFloat(u2)); + a4 = [H(g[0], "50%"), H(g[1], "50%"), H(v && 0 > v ? void 0 : a4.size, "100%"), H(u2 && 0 > u2 ? void 0 : a4.innerSize || 0, "0%")]; + !p.angular || this instanceof y || (a4[3] = 0); + for (g = 0; 4 > g; ++g) + v = a4[g], p = 2 > g || g === 2 && /%$/.test(v), a4[g] = B(v, [m, h, e, a4[2]][g]) + (p ? t : 0); + a4[3] > a4[2] && (a4[3] = a4[2]); + z(w) && 2 * w < a4[2] && 0 < w && (a4[3] = a4[2] - 2 * w); + C(this, "afterGetCenter", { positions: a4 }); + return a4; + }; + a3.getStartAndEndRadians = function(a4, p) { + a4 = z(a4) ? a4 : 0; + p = z(p) && p > a4 && 360 > p - a4 ? p : a4 + 360; + return { start: x * (a4 + -90), end: x * (p + -90) }; + }; + })(u || (u = {})); + ""; + return u; + }); + M(a, "Series/Pie/PiePoint.js", [a["Core/Animation/AnimationUtilities.js"], a["Core/Series/Point.js"], a["Core/Utilities.js"]], function(a2, y, I) { + const { setAnimation: x } = a2, { addEvent: C, defined: z, extend: H, isNumber: B, pick: u, relativeLength: v } = I; + class l2 extends y { + constructor() { + super(...arguments); + this.series = this.options = this.labelDistance = void 0; + } + getConnectorPath() { + const a3 = this.labelPosition, l3 = this.series.options.dataLabels, m = this.connectorShapes; + let h = l3.connectorShape; + m[h] && (h = m[h]); + return h.call(this, { x: a3.computed.x, y: a3.computed.y, alignment: a3.alignment }, a3.connectorPosition, l3); + } + getTranslate() { + return this.sliced ? this.slicedTranslation : { translateX: 0, translateY: 0 }; + } + haloPath(a3) { + const l3 = this.shapeArgs; + return this.sliced || !this.visible ? [] : this.series.chart.renderer.symbols.arc(l3.x, l3.y, l3.r + a3, l3.r + a3, { innerR: l3.r - 1, start: l3.start, end: l3.end, borderRadius: l3.borderRadius }); + } + init() { + super.init.apply(this, arguments); + this.name = u(this.name, "Slice"); + const a3 = (a4) => { + this.slice(a4.type === "select"); + }; + C(this, "select", a3); + C(this, "unselect", a3); + return this; + } + isValid() { + return B(this.y) && 0 <= this.y; + } + setVisible(a3, l3) { + const m = this.series, h = m.chart, g = m.options.ignoreHiddenPoint; + l3 = u(l3, g); + a3 !== this.visible && (this.visible = this.options.visible = a3 = typeof a3 === "undefined" ? !this.visible : a3, m.options.data[m.data.indexOf(this)] = this.options, ["graphic", "dataLabel", "connector"].forEach((e) => { + if (this[e]) + this[e][a3 ? "show" : "hide"](a3); + }), this.legendItem && h.legend.colorizeItem(this, a3), a3 || this.state !== "hover" || this.setState(""), g && (m.isDirty = true), l3 && h.redraw()); + } + slice(a3, l3, m) { + const h = this.series; + x(m, h.chart); + u(l3, true); + this.sliced = this.options.sliced = z(a3) ? a3 : !this.sliced; + h.options.data[h.data.indexOf(this)] = this.options; + this.graphic && this.graphic.animate(this.getTranslate()); + } + } + H(l2.prototype, { connectorShapes: { fixedOffset: function(a3, l3, m) { + const h = l3.breakAt; + l3 = l3.touchingSliceAt; + return [["M", a3.x, a3.y], m.softConnector ? ["C", a3.x + (a3.alignment === "left" ? -5 : 5), a3.y, 2 * h.x - l3.x, 2 * h.y - l3.y, h.x, h.y] : ["L", h.x, h.y], ["L", l3.x, l3.y]]; + }, straight: function(a3, l3) { + l3 = l3.touchingSliceAt; + return [ + ["M", a3.x, a3.y], + ["L", l3.x, l3.y] + ]; + }, crookedLine: function(a3, l3, m) { + const { breakAt: h, touchingSliceAt: g } = l3; + ({ series: l3 } = this); + const [e, p, t] = l3.center, u2 = t / 2, d = l3.chart.plotWidth, k = l3.chart.plotLeft; + l3 = a3.alignment === "left"; + const { x: r, y: q } = a3; + m.crookDistance ? (a3 = v(m.crookDistance, 1), a3 = l3 ? e + u2 + (d + k - e - u2) * (1 - a3) : k + (e - u2) * a3) : a3 = e + (p - q) * Math.tan((this.angle || 0) - Math.PI / 2); + m = [["M", r, q]]; + (l3 ? a3 <= r && a3 >= h.x : a3 >= r && a3 <= h.x) && m.push(["L", a3, q]); + m.push(["L", h.x, h.y], ["L", g.x, g.y]); + return m; + } } }); + return l2; + }); + M(a, "Series/Pie/PieSeriesDefaults.js", [], function() { + ""; + return { + borderRadius: 3, + center: [null, null], + clip: false, + colorByPoint: true, + dataLabels: { allowOverlap: true, connectorPadding: 5, connectorShape: "crookedLine", crookDistance: void 0, distance: 30, enabled: true, formatter: function() { + return this.point.isNull ? void 0 : this.point.name; + }, softConnector: true, x: 0 }, + fillColor: void 0, + ignoreHiddenPoint: true, + inactiveOtherPoints: true, + legendType: "point", + marker: null, + size: null, + showInLegend: false, + slicedOffset: 10, + stickyTracking: false, + tooltip: { followPointer: true }, + borderColor: "#ffffff", + borderWidth: 1, + lineWidth: void 0, + states: { hover: { brightness: 0.1 } } + }; + }); + M(a, "Series/Pie/PieSeries.js", [a["Series/CenteredUtilities.js"], a["Series/Column/ColumnSeries.js"], a["Core/Globals.js"], a["Series/Pie/PiePoint.js"], a["Series/Pie/PieSeriesDefaults.js"], a["Core/Series/Series.js"], a["Core/Series/SeriesRegistry.js"], a["Core/Renderer/SVG/Symbols.js"], a["Core/Utilities.js"]], function(a2, y, I, L, C, z, H, B, u) { + const { getStartAndEndRadians: v } = a2; + ({ noop: I } = I); + const { clamp: l2, extend: p, fireEvent: t, merge: m, pick: h, relativeLength: g } = u; + class e extends z { + constructor() { + super(...arguments); + this.points = this.options = this.maxLabelDistance = this.data = this.center = void 0; + } + animate(a3) { + const e2 = this, g2 = e2.points, d = e2.startAngleRad; + a3 || g2.forEach(function(a4) { + const g3 = a4.graphic, k = a4.shapeArgs; + g3 && k && (g3.attr({ r: h(a4.startR, e2.center && e2.center[3] / 2), start: d, end: d }), g3.animate({ r: k.r, start: k.start, end: k.end }, e2.options.animation)); + }); + } + drawEmpty() { + const a3 = this.startAngleRad, e2 = this.endAngleRad, g2 = this.options; + let d, k; + this.total === 0 && this.center ? (d = this.center[0], k = this.center[1], this.graph || (this.graph = this.chart.renderer.arc(d, k, this.center[1] / 2, 0, a3, e2).addClass("highcharts-empty-series").add(this.group)), this.graph.attr({ d: B.arc(d, k, this.center[2] / 2, 0, { start: a3, end: e2, innerR: this.center[3] / 2 }) }), this.chart.styledMode || this.graph.attr({ "stroke-width": g2.borderWidth, fill: g2.fillColor || "none", stroke: g2.color || "#cccccc" })) : this.graph && (this.graph = this.graph.destroy()); + } + drawPoints() { + const a3 = this.chart.renderer; + this.points.forEach(function(e2) { + e2.graphic && e2.hasNewShapeType() && (e2.graphic = e2.graphic.destroy()); + e2.graphic || (e2.graphic = a3[e2.shapeType](e2.shapeArgs).add(e2.series.group), e2.delayedRendering = true); + }); + } + generatePoints() { + super.generatePoints(); + this.updateTotals(); + } + getX(a3, e2, g2) { + const d = this.center, k = this.radii ? this.radii[g2.index] || 0 : d[2] / 2; + a3 = Math.asin(l2((a3 - d[1]) / (k + g2.labelDistance), -1, 1)); + return d[0] + (e2 ? -1 : 1) * Math.cos(a3) * (k + g2.labelDistance) + (0 < g2.labelDistance ? (e2 ? -1 : 1) * this.options.dataLabels.padding : 0); + } + hasData() { + return !!this.processedXData.length; + } + redrawPoints() { + const a3 = this, e2 = a3.chart; + let g2, d, k, h3; + this.drawEmpty(); + a3.group && !e2.styledMode && a3.group.shadow(a3.options.shadow); + a3.points.forEach(function(l3) { + const q = {}; + d = l3.graphic; + !l3.isNull && d ? (h3 = l3.shapeArgs, g2 = l3.getTranslate(), e2.styledMode || (k = a3.pointAttribs(l3, l3.selected && "select")), l3.delayedRendering ? (d.setRadialReference(a3.center).attr(h3).attr(g2), e2.styledMode || d.attr(k).attr({ "stroke-linejoin": "round" }), l3.delayedRendering = false) : (d.setRadialReference(a3.center), e2.styledMode || m(true, q, k), m(true, q, h3, g2), d.animate(q)), d.attr({ visibility: l3.visible ? "inherit" : "hidden" }), d.addClass(l3.getClassName(), true)) : d && (l3.graphic = d.destroy()); + }); + } + sortByAngle(a3, e2) { + a3.sort(function(a4, d) { + return typeof a4.angle !== "undefined" && (d.angle - a4.angle) * e2; + }); + } + translate(a3) { + t(this, "translate"); + this.generatePoints(); + var e2 = this.options; + const l3 = e2.slicedOffset, d = l3 + (e2.borderWidth || 0); + var k = v(e2.startAngle, e2.endAngle); + const m2 = this.startAngleRad = k.start; + k = (this.endAngleRad = k.end) - m2; + const q = this.points, p2 = e2.dataLabels.distance; + e2 = e2.ignoreHiddenPoint; + const b = q.length; + let f, c, n3, w = 0; + a3 || (this.center = a3 = this.getCenter()); + for (c = 0; c < b; c++) { + n3 = q[c]; + var u2 = m2 + w * k; + !n3.isValid() || e2 && !n3.visible || (w += n3.percentage / 100); + var x = m2 + w * k; + var y2 = { + x: a3[0], + y: a3[1], + r: a3[2] / 2, + innerR: a3[3] / 2, + start: Math.round(1e3 * u2) / 1e3, + end: Math.round(1e3 * x) / 1e3 + }; + n3.shapeType = "arc"; + n3.shapeArgs = y2; + n3.labelDistance = h(n3.options.dataLabels && n3.options.dataLabels.distance, p2); + n3.labelDistance = g(n3.labelDistance, y2.r); + this.maxLabelDistance = Math.max(this.maxLabelDistance || 0, n3.labelDistance); + x = (x + u2) / 2; + x > 1.5 * Math.PI ? x -= 2 * Math.PI : x < -Math.PI / 2 && (x += 2 * Math.PI); + n3.slicedTranslation = { translateX: Math.round(Math.cos(x) * l3), translateY: Math.round(Math.sin(x) * l3) }; + y2 = Math.cos(x) * a3[2] / 2; + f = Math.sin(x) * a3[2] / 2; + n3.tooltipPos = [a3[0] + 0.7 * y2, a3[1] + 0.7 * f]; + n3.half = x < -Math.PI / 2 || x > Math.PI / 2 ? 1 : 0; + n3.angle = x; + u2 = Math.min(d, n3.labelDistance / 5); + n3.labelPosition = { natural: { x: a3[0] + y2 + Math.cos(x) * n3.labelDistance, y: a3[1] + f + Math.sin(x) * n3.labelDistance }, computed: {}, alignment: 0 > n3.labelDistance ? "center" : n3.half ? "right" : "left", connectorPosition: { breakAt: { x: a3[0] + y2 + Math.cos(x) * u2, y: a3[1] + f + Math.sin(x) * u2 }, touchingSliceAt: { x: a3[0] + y2, y: a3[1] + f } } }; + } + t(this, "afterTranslate"); + } + updateTotals() { + const a3 = this.points, e2 = a3.length, g2 = this.options.ignoreHiddenPoint; + let d, k, h3 = 0; + for (d = 0; d < e2; d++) + k = a3[d], !k.isValid() || g2 && !k.visible || (h3 += k.y); + this.total = h3; + for (d = 0; d < e2; d++) + k = a3[d], k.percentage = 0 < h3 && (k.visible || !g2) ? k.y / h3 * 100 : 0, k.total = h3; + } + } + e.defaultOptions = m(z.defaultOptions, C); + p(e.prototype, { axisTypes: [], directTouch: true, drawGraph: void 0, drawTracker: y.prototype.drawTracker, getCenter: a2.getCenter, getSymbol: I, isCartesian: false, noSharedTooltip: true, pointAttribs: y.prototype.pointAttribs, pointClass: L, requireSorting: false, searchPoint: I, trackerGroups: ["group", "dataLabelsGroup"] }); + H.registerSeriesType("pie", e); + return e; + }); + M(a, "Series/Pie/PieDataLabel.js", [a["Core/Series/DataLabel.js"], a["Core/Globals.js"], a["Core/Renderer/RendererUtilities.js"], a["Core/Series/SeriesRegistry.js"], a["Core/Utilities.js"]], function(a2, y, I, L, C) { + const { noop: x } = y, { distribute: H } = I, { series: B } = L, { arrayMax: u, clamp: v, defined: l2, merge: p, pick: t, relativeLength: m } = C; + var h; + (function(g) { + function e() { + const a3 = this, d2 = a3.data, e2 = a3.chart, g2 = a3.options.dataLabels || {}, b = g2.connectorPadding, f = e2.plotWidth, c = e2.plotHeight, h4 = e2.plotLeft, m2 = Math.round(e2.chartWidth / 3), w = a3.center, v2 = w[2] / 2, x2 = w[1], y3 = [[], []], z2 = [0, 0, 0, 0], F = a3.dataLabelPositioners; + let C2, A, E, I2, L2, M2, J, N, O, S, W, U2; + a3.visible && (g2.enabled || a3._hasPointLabels) && (d2.forEach(function(a4) { + a4.dataLabel && a4.visible && a4.dataLabel.shortened && (a4.dataLabel.attr({ width: "auto" }).css({ width: "auto", textOverflow: "clip" }), a4.dataLabel.shortened = false); + }), B.prototype.drawDataLabels.apply(a3), d2.forEach(function(a4) { + a4.dataLabel && (a4.visible ? (y3[a4.half].push(a4), a4.dataLabel._pos = null, !l2(g2.style.width) && !l2(a4.options.dataLabels && a4.options.dataLabels.style && a4.options.dataLabels.style.width) && a4.dataLabel.getBBox().width > m2 && (a4.dataLabel.css({ width: Math.round(0.7 * m2) + "px" }), a4.dataLabel.shortened = true)) : (a4.dataLabel = a4.dataLabel.destroy(), a4.dataLabels && a4.dataLabels.length === 1 && delete a4.dataLabels)); + }), y3.forEach((d3, k) => { + const m3 = d3.length, n3 = []; + let q, p2 = 0; + if (m3) { + a3.sortByAngle(d3, k - 0.5); + if (0 < a3.maxLabelDistance) { + var r = Math.max(0, x2 - v2 - a3.maxLabelDistance); + q = Math.min(x2 + v2 + a3.maxLabelDistance, e2.plotHeight); + d3.forEach(function(a4) { + 0 < a4.labelDistance && a4.dataLabel && (a4.top = Math.max(0, x2 - v2 - a4.labelDistance), a4.bottom = Math.min(x2 + v2 + a4.labelDistance, e2.plotHeight), p2 = a4.dataLabel.getBBox().height || 21, a4.distributeBox = { target: a4.labelPosition.natural.y - a4.top + p2 / 2, size: p2, rank: a4.y }, n3.push(a4.distributeBox)); + }); + r = q + p2 - r; + H(n3, r, r / 5); + } + for (W = 0; W < m3; W++) { + C2 = d3[W]; + M2 = C2.labelPosition; + I2 = C2.dataLabel; + S = C2.visible === false ? "hidden" : "inherit"; + O = r = M2.natural.y; + n3 && l2(C2.distributeBox) && (typeof C2.distributeBox.pos === "undefined" ? S = "hidden" : (J = C2.distributeBox.size, O = F.radialDistributionY(C2))); + delete C2.positionIndex; + if (g2.justify) + N = F.justify(C2, v2, w); + else + switch (g2.alignTo) { + case "connectors": + N = F.alignToConnectors(d3, k, f, h4); + break; + case "plotEdges": + N = F.alignToPlotEdges(I2, k, f, h4); + break; + default: + N = F.radialDistributionX(a3, C2, O, r); + } + I2._attr = { visibility: S, align: M2.alignment }; + U2 = C2.options.dataLabels || {}; + I2._pos = { x: N + t(U2.x, g2.x) + ({ left: b, right: -b }[M2.alignment] || 0), y: O + t(U2.y, g2.y) - I2.getBBox().height / 2 }; + M2 && (M2.computed.x = N, M2.computed.y = O); + t(g2.crop, true) && (L2 = I2.getBBox().width, r = null, N - L2 < b && k === 1 ? (r = Math.round(L2 - N + b), z2[3] = Math.max(r, z2[3])) : N + L2 > f - b && k === 0 && (r = Math.round(N + L2 - f + b), z2[1] = Math.max(r, z2[1])), 0 > O - J / 2 ? z2[0] = Math.max(Math.round(-O + J / 2), z2[0]) : O + J / 2 > c && (z2[2] = Math.max(Math.round(O + J / 2 - c), z2[2])), I2.sideOverflow = r); + } + } + }), u(z2) === 0 || this.verifyDataLabelOverflow(z2)) && (this.placeDataLabels(), this.points.forEach(function(b2) { + U2 = p(g2, b2.options.dataLabels); + if (A = t(U2.connectorWidth, 1)) { + let c2; + E = b2.connector; + if ((I2 = b2.dataLabel) && I2._pos && b2.visible && 0 < b2.labelDistance) { + S = I2._attr.visibility; + if (c2 = !E) + b2.connector = E = e2.renderer.path().addClass("highcharts-data-label-connector highcharts-color-" + b2.colorIndex + (b2.className ? " " + b2.className : "")).add(a3.dataLabelsGroup), e2.styledMode || E.attr({ "stroke-width": A, stroke: U2.connectorColor || b2.color || "#666666" }); + E[c2 ? "attr" : "animate"]({ d: b2.getConnectorPath() }); + E.attr("visibility", S); + } else + E && (b2.connector = E.destroy()); + } + })); + } + function h3() { + this.points.forEach(function(a3) { + let d2 = a3.dataLabel, e2; + d2 && a3.visible && ((e2 = d2._pos) ? (d2.sideOverflow && (d2._attr.width = Math.max(d2.getBBox().width - d2.sideOverflow, 0), d2.css({ width: d2._attr.width + "px", textOverflow: (this.options.dataLabels.style || {}).textOverflow || "ellipsis" }), d2.shortened = true), d2.attr(d2._attr), d2[d2.moved ? "animate" : "attr"](e2), d2.moved = true) : d2 && d2.attr({ y: -9999 })); + delete a3.distributeBox; + }, this); + } + function y2(a3) { + let d2 = this.center, e2 = this.options, g2 = e2.center, b = e2.minSize || 80, f, c = e2.size !== null; + c || (g2[0] !== null ? f = Math.max(d2[2] - Math.max(a3[1], a3[3]), b) : (f = Math.max(d2[2] - a3[1] - a3[3], b), d2[0] += (a3[3] - a3[1]) / 2), g2[1] !== null ? f = v(f, b, d2[2] - Math.max(a3[0], a3[2])) : (f = v(f, b, d2[2] - a3[0] - a3[2]), d2[1] += (a3[0] - a3[2]) / 2), f < d2[2] ? (d2[2] = f, d2[3] = Math.min(e2.thickness ? Math.max(0, f - 2 * e2.thickness) : Math.max(0, m(e2.innerSize || 0, f)), f), this.translate(d2), this.drawDataLabels && this.drawDataLabels()) : c = true); + return c; + } + const z = [], d = { radialDistributionY: function(a3) { + return a3.top + a3.distributeBox.pos; + }, radialDistributionX: function(a3, d2, e2, g2) { + return a3.getX(e2 < d2.top + 2 || e2 > d2.bottom - 2 ? g2 : e2, d2.half, d2); + }, justify: function(a3, d2, e2) { + return e2[0] + (a3.half ? -1 : 1) * (d2 + a3.labelDistance); + }, alignToPlotEdges: function(a3, d2, e2, g2) { + a3 = a3.getBBox().width; + return d2 ? a3 + g2 : e2 - a3 - g2; + }, alignToConnectors: function(a3, d2, e2, g2) { + let b = 0, f; + a3.forEach(function(a4) { + f = a4.dataLabel.getBBox().width; + f > b && (b = f); + }); + return d2 ? b + g2 : e2 - b - g2; + } }; + g.compose = function(g2) { + a2.compose(B); + C.pushUnique(z, g2) && (g2 = g2.prototype, g2.dataLabelPositioners = d, g2.alignDataLabel = x, g2.drawDataLabels = e, g2.placeDataLabels = h3, g2.verifyDataLabelOverflow = y2); + }; + })(h || (h = {})); + return h; + }); + M(a, "Extensions/OverlappingDataLabels.js", [a["Core/Chart/Chart.js"], a["Core/Utilities.js"]], function(a2, y) { + function x(a3, l2) { + let p, t = false; + a3 && (p = a3.newOpacity, a3.oldOpacity !== p && (a3.alignAttr && a3.placed ? (a3[p ? "removeClass" : "addClass"]("highcharts-data-label-hidden"), t = true, a3.alignAttr.opacity = p, a3[a3.isOld ? "animate" : "attr"](a3.alignAttr, null, function() { + l2.styledMode || a3.css({ pointerEvents: p ? "auto" : "none" }); + }), C(l2, "afterHideOverlappingLabel")) : a3.attr({ opacity: p })), a3.isOld = true); + return t; + } + const { addEvent: L, fireEvent: C, isArray: z, isNumber: H, objectEach: B, pick: u } = y; + L(a2, "render", function() { + let a3 = this, l2 = []; + (this.labelCollectors || []).forEach(function(a4) { + l2 = l2.concat(a4()); + }); + (this.yAxis || []).forEach(function(a4) { + a4.stacking && a4.options.stackLabels && !a4.options.stackLabels.allowOverlap && B(a4.stacking.stacks, function(a5) { + B(a5, function(a6) { + a6.label && l2.push(a6.label); + }); + }); + }); + (this.series || []).forEach(function(p) { + var t = p.options.dataLabels; + p.visible && (t.enabled !== false || p._hasPointLabels) && (t = (m) => m.forEach((h) => { + h.visible && (z(h.dataLabels) ? h.dataLabels : h.dataLabel ? [h.dataLabel] : []).forEach(function(g) { + const e = g.options; + g.labelrank = u(e.labelrank, h.labelrank, h.shapeArgs && h.shapeArgs.height); + e.allowOverlap ? (g.oldOpacity = g.opacity, g.newOpacity = 1, x(g, a3)) : l2.push(g); + }); + }), t(p.nodes || []), t(p.points)); + }); + this.hideOverlappingLabels(l2); + }); + a2.prototype.hideOverlappingLabels = function(a3) { + let l2 = this, p = a3.length, t = l2.renderer; + var m; + let h; + let g, e, w, u2 = false; + var v = function(a4) { + let d, e2; + var g2; + let h3 = a4.box ? 0 : a4.padding || 0, b = g2 = 0, f, c; + if (a4 && (!a4.alignAttr || a4.placed)) + return d = a4.alignAttr || { x: a4.attr("x"), y: a4.attr("y") }, e2 = a4.parentGroup, a4.width || (g2 = a4.getBBox(), a4.width = g2.width, a4.height = g2.height, g2 = t.fontMetrics(a4.element).h), f = a4.width - 2 * h3, (c = { left: "0", center: "0.5", right: "1" }[a4.alignValue]) ? b = +c * f : H(a4.x) && Math.round(a4.x) !== a4.translateX && (b = a4.x - a4.translateX), { x: d.x + (e2.translateX || 0) + h3 - (b || 0), y: d.y + (e2.translateY || 0) + h3 - g2, width: a4.width - 2 * h3, height: a4.height - 2 * h3 }; + }; + for (h = 0; h < p; h++) + if (m = a3[h]) + m.oldOpacity = m.opacity, m.newOpacity = 1, m.absoluteBox = v(m); + a3.sort(function(a4, e2) { + return (e2.labelrank || 0) - (a4.labelrank || 0); + }); + for (h = 0; h < p; h++) + for (e = (v = a3[h]) && v.absoluteBox, m = h + 1; m < p; ++m) + w = (g = a3[m]) && g.absoluteBox, !e || !w || v === g || v.newOpacity === 0 || g.newOpacity === 0 || v.visibility === "hidden" || g.visibility === "hidden" || w.x >= e.x + e.width || w.x + w.width <= e.x || w.y >= e.y + e.height || w.y + w.height <= e.y || ((v.labelrank < g.labelrank ? v : g).newOpacity = 0); + a3.forEach(function(a4) { + x(a4, l2) && (u2 = true); + }); + u2 && C(l2, "afterHideAllOverlappingLabels"); + }; + }); + M(a, "Extensions/BorderRadius.js", [a["Core/Defaults.js"], a["Core/Series/Series.js"], a["Core/Series/SeriesRegistry.js"], a["Core/Renderer/SVG/SVGElement.js"], a["Core/Renderer/SVG/SVGRenderer.js"], a["Core/Utilities.js"]], function(a2, y, I, L, C, z) { + const { defaultOptions: x } = a2; + ({ seriesTypes: a2 } = I); + const { addEvent: B, extend: u, isObject: v, merge: l2, relativeLength: p } = z, t = { + radius: 0, + scope: "stack", + where: void 0 + }, m = (a3, g) => { + v(a3) || (a3 = { radius: a3 || 0 }); + return l2(t, g, a3); + }; + if (L.symbolCustomAttribs.indexOf("borderRadius") === -1) { + L.symbolCustomAttribs.push("borderRadius", "brBoxHeight", "brBoxY"); + const h = C.prototype.symbols.arc; + C.prototype.symbols.arc = function(a3, g2, l3, m2, d = {}) { + a3 = h(a3, g2, l3, m2, d); + const { innerR: e = 0, r = l3, start: q = 0, end: t2 = 0 } = d; + if (d.open || !d.borderRadius) + return a3; + l3 = t2 - q; + g2 = Math.sin(l3 / 2); + d = Math.max(Math.min(p(d.borderRadius || 0, r - e), (r - e) / 2, r * g2 / (1 + g2)), 0); + l3 = Math.min(d, l3 / Math.PI * 2 * e); + for (g2 = a3.length - 1; g2--; ) { + { + let e2 = void 0, h3 = void 0, k = void 0; + m2 = a3; + var b = g2, f = 1 < g2 ? l3 : d, c = m2[b], n3 = m2[b + 1]; + n3[0] === "Z" && (n3 = m2[0]); + c[0] !== "M" && c[0] !== "L" || n3[0] !== "A" ? c[0] !== "A" || n3[0] !== "M" && n3[0] !== "L" || (k = n3, h3 = c) : (k = c, h3 = n3, e2 = true); + if (k && h3 && h3.params) { + c = h3[1]; + var w = h3[5]; + n3 = h3.params; + const { start: a4, end: d2, cx: g3, cy: l4 } = n3; + var u2 = w ? c - f : c + f; + const p2 = u2 ? Math.asin(f / u2) : 0; + w = w ? p2 : -p2; + u2 *= Math.cos(p2); + e2 ? (n3.start = a4 + w, k[1] = g3 + u2 * Math.cos(a4), k[2] = l4 + u2 * Math.sin(a4), m2.splice(b + 1, 0, ["A", f, f, 0, 0, 1, g3 + c * Math.cos(n3.start), l4 + c * Math.sin(n3.start)])) : (n3.end = d2 - w, h3[6] = g3 + c * Math.cos(n3.end), h3[7] = l4 + c * Math.sin(n3.end), m2.splice(b + 1, 0, ["A", f, f, 0, 0, 1, g3 + u2 * Math.cos(d2), l4 + u2 * Math.sin(d2)])); + h3[4] = Math.abs(n3.end - n3.start) < Math.PI ? 0 : 1; + } + } + } + return a3; + }; + const g = C.prototype.symbols.roundedRect; + C.prototype.symbols.roundedRect = function(a3, h3, l3, m2, d = {}) { + const e = g(a3, h3, l3, m2, d), { r: p2 = 0, brBoxHeight: q = m2, brBoxY: t2 = h3 } = d; + var b = h3 - t2, f = t2 + q - (h3 + m2); + d = -0.1 < b - p2 ? 0 : p2; + const c = -0.1 < f - p2 ? 0 : p2; + var n3 = Math.max(d && b, 0); + const u2 = Math.max(c && f, 0); + f = [a3 + d, h3]; + b = [a3 + l3 - d, h3]; + const w = [a3 + l3, h3 + d], v2 = [a3 + l3, h3 + m2 - c], x2 = [a3 + l3 - c, h3 + m2], y2 = [a3 + c, h3 + m2], z2 = [a3, h3 + m2 - c], B2 = [a3, h3 + d]; + if (n3) { + const a4 = Math.sqrt(Math.pow(d, 2) - Math.pow(d - n3, 2)); + f[0] -= a4; + b[0] += a4; + w[1] = B2[1] = h3 + d - n3; + } + m2 < d - n3 && (n3 = Math.sqrt(Math.pow(d, 2) - Math.pow(d - n3 - m2, 2)), w[0] = v2[0] = a3 + l3 - d + n3, x2[0] = Math.min(w[0], x2[0]), y2[0] = Math.max(v2[0], y2[0]), z2[0] = B2[0] = a3 + d - n3, w[1] = B2[1] = h3 + m2); + u2 && (n3 = Math.sqrt(Math.pow(c, 2) - Math.pow(c - u2, 2)), x2[0] += n3, y2[0] -= n3, v2[1] = z2[1] = h3 + m2 - c + u2); + m2 < c - u2 && (m2 = Math.sqrt(Math.pow(c, 2) - Math.pow(c - u2 - m2, 2)), w[0] = v2[0] = a3 + l3 - c + m2, b[0] = Math.min(w[0], b[0]), f[0] = Math.max(v2[0], f[0]), z2[0] = B2[0] = a3 + c - m2, v2[1] = z2[1] = h3); + e.length = 0; + e.push(["M", ...f], ["L", ...b], [ + "A", + d, + d, + 0, + 0, + 1, + ...w + ], ["L", ...v2], ["A", c, c, 0, 0, 1, ...x2], ["L", ...y2], ["A", c, c, 0, 0, 1, ...z2], ["L", ...B2], ["A", d, d, 0, 0, 1, ...f], ["Z"]); + return e; + }; + B(a2.pie, "afterTranslate", function() { + const a3 = m(this.options.borderRadius); + for (const e of this.points) { + const g2 = e.shapeArgs; + g2 && (g2.borderRadius = p(a3.radius, (g2.r || 0) - (g2.innerR || 0))); + } + }); + B(y, "afterColumnTranslate", function() { + var a3, g2; + if (this.options.borderRadius && (!this.chart.is3d || !this.chart.is3d())) { + const { options: e, yAxis: r } = this, q = e.stacking === "percent"; + var h3 = (g2 = (a3 = x.plotOptions) === null || a3 === void 0 ? void 0 : a3[this.type]) === null || g2 === void 0 ? void 0 : g2.borderRadius; + a3 = m(e.borderRadius, v(h3) ? h3 : {}); + g2 = r.options.reversed; + for (const k of this.points) + if ({ shapeArgs: h3 } = k, k.shapeType === "roundedRect" && h3) { + const { width: b = 0, height: f = 0, y: c = 0 } = h3; + var l3 = c, d = f; + a3.scope === "stack" && k.stackTotal && (l3 = r.translate(q ? 100 : k.stackTotal, false, true, false, true), d = r.translate(e.threshold || 0, false, true, false, true), d = this.crispCol(0, Math.min(l3, d), 0, Math.abs(l3 - d)), l3 = d.y, d = d.height); + const m2 = (k.negative ? -1 : 1) * (g2 ? -1 : 1) === -1; + let t2 = a3.where; + !t2 && this.is("waterfall") && Math.abs((k.yBottom || 0) - (this.translatedThreshold || 0)) > this.borderWidth && (t2 = "all"); + t2 || (t2 = "end"); + const v2 = Math.min(p(a3.radius, b), b / 2, t2 === "all" ? f / 2 : Infinity) || 0; + t2 === "end" && (m2 && (l3 -= v2), d += v2); + u(h3, { brBoxHeight: d, brBoxY: l3, r: v2 }); + } + } + }, { order: 9 }); + } + y = { optionsToObject: m }; + ""; + return y; + }); + M(a, "Core/Responsive.js", [a["Core/Utilities.js"]], function(a2) { + const { diffObjects: x, extend: I, find: L, merge: C, pick: z, uniqueKey: H } = a2; + var B; + (function(u) { + function v(a3, l3) { + const h = a3.condition; + (h.callback || function() { + return this.chartWidth <= z(h.maxWidth, Number.MAX_VALUE) && this.chartHeight <= z(h.maxHeight, Number.MAX_VALUE) && this.chartWidth >= z(h.minWidth, 0) && this.chartHeight >= z(h.minHeight, 0); + }).call(this) && l3.push(a3._id); + } + function l2(a3, l3) { + const h = this.options.responsive; + var g = this.currentResponsive; + let e = []; + !l3 && h && h.rules && h.rules.forEach((a4) => { + typeof a4._id === "undefined" && (a4._id = H()); + this.matchResponsiveRule(a4, e); + }, this); + l3 = C(...e.map((a4) => L((h || {}).rules || [], (e2) => e2._id === a4)).map((a4) => a4 && a4.chartOptions)); + l3.isResponsiveOptions = true; + e = e.toString() || void 0; + e !== (g && g.ruleIds) && (g && this.update(g.undoOptions, a3, true), e ? (g = x(l3, this.options, true, this.collectionsWithUpdate), g.isResponsiveOptions = true, this.currentResponsive = { ruleIds: e, mergedOptions: l3, undoOptions: g }, this.update(l3, a3, true)) : this.currentResponsive = void 0); + } + const p = []; + u.compose = function(t) { + a2.pushUnique(p, t) && I(t.prototype, { matchResponsiveRule: v, setResponsive: l2 }); + return t; + }; + })(B || (B = {})); + ""; + ""; + return B; + }); + M(a, "masters/highcharts.src.js", [ + a["Core/Globals.js"], + a["Core/Utilities.js"], + a["Core/Defaults.js"], + a["Core/Animation/Fx.js"], + a["Core/Animation/AnimationUtilities.js"], + a["Core/Renderer/HTML/AST.js"], + a["Core/Templating.js"], + a["Core/Renderer/RendererUtilities.js"], + a["Core/Renderer/SVG/SVGElement.js"], + a["Core/Renderer/SVG/SVGRenderer.js"], + a["Core/Renderer/HTML/HTMLElement.js"], + a["Core/Renderer/HTML/HTMLRenderer.js"], + a["Core/Axis/Axis.js"], + a["Core/Axis/DateTimeAxis.js"], + a["Core/Axis/LogarithmicAxis.js"], + a["Core/Axis/PlotLineOrBand/PlotLineOrBand.js"], + a["Core/Axis/Tick.js"], + a["Core/Tooltip.js"], + a["Core/Series/Point.js"], + a["Core/Pointer.js"], + a["Core/Legend/Legend.js"], + a["Core/Chart/Chart.js"], + a["Core/Axis/Stacking/StackingAxis.js"], + a["Core/Axis/Stacking/StackItem.js"], + a["Core/Series/Series.js"], + a["Core/Series/SeriesRegistry.js"], + a["Series/Column/ColumnSeries.js"], + a["Series/Column/ColumnDataLabel.js"], + a["Series/Pie/PieSeries.js"], + a["Series/Pie/PieDataLabel.js"], + a["Core/Series/DataLabel.js"], + a["Core/Responsive.js"], + a["Core/Color/Color.js"], + a["Core/Time.js"] + ], function(a2, y, I, L, C, z, H, B, u, v, l2, p, t, m, h, g, e, w, E, F, d, k, r, q, G, b, f, c, n3, M2, D, K, U2, T) { + a2.animate = C.animate; + a2.animObject = C.animObject; + a2.getDeferredAnimation = C.getDeferredAnimation; + a2.setAnimation = C.setAnimation; + a2.stop = C.stop; + a2.timers = L.timers; + a2.AST = z; + a2.Axis = t; + a2.Chart = k; + a2.chart = k.chart; + a2.Fx = L; + a2.Legend = d; + a2.PlotLineOrBand = g; + a2.Point = E; + a2.Pointer = F; + a2.Series = G; + a2.StackItem = q; + a2.SVGElement = u; + a2.SVGRenderer = v; + a2.Templating = H; + a2.Tick = e; + a2.Time = T; + a2.Tooltip = w; + a2.Color = U2; + a2.color = U2.parse; + p.compose(v); + l2.compose(u); + F.compose(k); + d.compose(k); + a2.defaultOptions = I.defaultOptions; + a2.getOptions = I.getOptions; + a2.time = I.defaultTime; + a2.setOptions = I.setOptions; + a2.dateFormat = H.dateFormat; + a2.format = H.format; + a2.numberFormat = H.numberFormat; + a2.addEvent = y.addEvent; + a2.arrayMax = y.arrayMax; + a2.arrayMin = y.arrayMin; + a2.attr = y.attr; + a2.clearTimeout = y.clearTimeout; + a2.correctFloat = y.correctFloat; + a2.createElement = y.createElement; + a2.css = y.css; + a2.defined = y.defined; + a2.destroyObjectProperties = y.destroyObjectProperties; + a2.discardElement = y.discardElement; + a2.distribute = B.distribute; + a2.erase = y.erase; + a2.error = y.error; + a2.extend = y.extend; + a2.extendClass = y.extendClass; + a2.find = y.find; + a2.fireEvent = y.fireEvent; + a2.getMagnitude = y.getMagnitude; + a2.getStyle = y.getStyle; + a2.inArray = y.inArray; + a2.isArray = y.isArray; + a2.isClass = y.isClass; + a2.isDOMElement = y.isDOMElement; + a2.isFunction = y.isFunction; + a2.isNumber = y.isNumber; + a2.isObject = y.isObject; + a2.isString = y.isString; + a2.keys = y.keys; + a2.merge = y.merge; + a2.normalizeTickInterval = y.normalizeTickInterval; + a2.objectEach = y.objectEach; + a2.offset = y.offset; + a2.pad = y.pad; + a2.pick = y.pick; + a2.pInt = y.pInt; + a2.relativeLength = y.relativeLength; + a2.removeEvent = y.removeEvent; + a2.seriesType = b.seriesType; + a2.splat = y.splat; + a2.stableSort = y.stableSort; + a2.syncTimeout = y.syncTimeout; + a2.timeUnits = y.timeUnits; + a2.uniqueKey = y.uniqueKey; + a2.useSerialIds = y.useSerialIds; + a2.wrap = y.wrap; + c.compose(f); + D.compose(G); + m.compose(t); + h.compose(t); + M2.compose(n3); + g.compose(t); + K.compose(k); + r.compose(t, k, G); + w.compose(F); + return a2; + }); + a["masters/highcharts.src.js"]._modules = a; + return a["masters/highcharts.src.js"]; + }); + } +}); + +// node_modules/highcharts/modules/map.js +var require_map = __commonJS({ + "node_modules/highcharts/modules/map.js"(exports, module2) { + "use strict"; + (function(a) { + typeof module2 === "object" && module2.exports ? (a["default"] = a, module2.exports = a) : typeof define === "function" && define.amd ? define("highcharts/modules/map", ["highcharts"], function(y) { + a(y); + a.Highcharts = y; + return a; + }) : a(typeof Highcharts !== "undefined" ? Highcharts : void 0); + })(function(a) { + function y(a2, n3, q, z) { + a2.hasOwnProperty(n3) || (a2[n3] = z.apply(null, q), typeof CustomEvent === "function" && window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded", { detail: { path: n3, module: a2[n3] } }))); + } + a = a ? a._modules : {}; + y(a, "Core/Axis/Color/ColorAxisComposition.js", [a["Core/Color/Color.js"], a["Core/Utilities.js"]], function(a2, n3) { + const { parse: q } = a2, { addEvent: g, extend: k, merge: l2, pick: A, splat: w } = n3; + var x; + (function(t) { + function h() { + const b2 = this.options; + this.colorAxis = []; + b2.colorAxis && (b2.colorAxis = w(b2.colorAxis), b2.colorAxis.forEach((b3) => { + new v(this, b3); + })); + } + function a3(b2) { + const u = (u2) => { + u2 = b2.allItems.indexOf(u2); + u2 !== -1 && (this.destroyItem(b2.allItems[u2]), b2.allItems.splice(u2, 1)); + }; + let d2 = [], p2, e2; + (this.chart.colorAxis || []).forEach(function(b3) { + (p2 = b3.options) && p2.showInLegend && (p2.dataClasses && p2.visible ? d2 = d2.concat(b3.getDataClassLegendSymbols()) : p2.visible && d2.push(b3), b3.series.forEach(function(b4) { + if (!b4.options.showInLegend || p2.dataClasses) + b4.options.legendType === "point" ? b4.points.forEach(function(b5) { + u(b5); + }) : u(b4); + })); + }); + for (e2 = d2.length; e2--; ) + b2.allItems.unshift(d2[e2]); + } + function f(b2) { + b2.visible && b2.item.legendColor && b2.item.legendItem.symbol.attr({ fill: b2.item.legendColor }); + } + function c() { + const b2 = this.chart.colorAxis; + b2 && b2.forEach(function(b3, d2, p2) { + b3.update({}, p2); + }); + } + function e() { + (this.chart.colorAxis && this.chart.colorAxis.length || this.colorAttribs) && this.translateColors(); + } + function b() { + const b2 = this.axisTypes; + b2 ? b2.indexOf("colorAxis") === -1 && b2.push("colorAxis") : this.axisTypes = ["colorAxis"]; + } + function d(b2) { + const u = this, d2 = b2 ? "show" : "hide"; + u.visible = u.options.visible = !!b2; + ["graphic", "dataLabel"].forEach(function(b3) { + if (u[b3]) + u[b3][d2](); + }); + this.series.buildKDTree(); + } + function E() { + const b2 = this, u = this.options.nullColor, d2 = this.colorAxis, p2 = this.colorKey; + (this.data.length ? this.data : this.points).forEach((e2) => { + var c2 = e2.getNestedProperty(p2); + (c2 = e2.options.color || (e2.isNull || e2.value === null ? u : d2 && typeof c2 !== "undefined" ? d2.toColor(c2, e2) : e2.color || b2.color)) && e2.color !== c2 && (e2.color = c2, b2.options.legendType === "point" && e2.legendItem && e2.legendItem.label && b2.chart.legend.colorizeItem(e2, e2.visible)); + }); + } + function p(b2) { + const u = b2.prototype.createAxis; + b2.prototype.createAxis = function(b3, d2) { + if (b3 !== "colorAxis") + return u.apply(this, arguments); + const e2 = new v(this, l2(d2.axis, { index: this[b3].length, isX: false })); + this.isDirtyLegend = true; + this.axes.forEach(function(b4) { + b4.series = []; + }); + this.series.forEach(function(b4) { + b4.bindAxes(); + b4.isDirtyData = true; + }); + A(d2.redraw, true) && this.redraw(d2.animation); + return e2; + }; + } + function C() { + this.elem.attr("fill", q(this.start).tweenTo(q(this.end), this.pos), void 0, true); + } + function m() { + this.elem.attr("stroke", q(this.start).tweenTo(q(this.end), this.pos), void 0, true); + } + const r = []; + let v; + t.compose = function(t2, u, B, D, H) { + v || (v = t2); + n3.pushUnique(r, u) && (t2 = u.prototype, t2.collectionsWithUpdate.push("colorAxis"), t2.collectionsWithInit.colorAxis = [t2.addColorAxis], g(u, "afterGetAxes", h), p(u)); + n3.pushUnique(r, B) && (u = B.prototype, u.fillSetter = C, u.strokeSetter = m); + n3.pushUnique(r, D) && (g(D, "afterGetAllItems", a3), g(D, "afterColorizeItem", f), g(D, "afterUpdate", c)); + n3.pushUnique(r, H) && (k(H.prototype, { optionalAxis: "colorAxis", translateColors: E }), k(H.prototype.pointClass.prototype, { setVisible: d }), g(H, "afterTranslate", e, { order: 1 }), g(H, "bindAxes", b)); + }; + t.pointSetVisible = d; + })(x || (x = {})); + return x; + }); + y(a, "Core/Axis/Color/ColorAxisDefaults.js", [], function() { + return { + lineWidth: 0, + minPadding: 0, + maxPadding: 0, + gridLineColor: "#ffffff", + gridLineWidth: 1, + tickPixelInterval: 72, + startOnTick: true, + endOnTick: true, + offset: 0, + marker: { animation: { duration: 50 }, width: 0.01, color: "#999999" }, + labels: { distance: 8, overflow: "justify", rotation: 0 }, + minColor: "#e6e9ff", + maxColor: "#0022ff", + tickLength: 5, + showInLegend: true + }; + }); + y(a, "Core/Axis/Color/ColorAxis.js", [a["Core/Axis/Axis.js"], a["Core/Color/Color.js"], a["Core/Axis/Color/ColorAxisComposition.js"], a["Core/Axis/Color/ColorAxisDefaults.js"], a["Core/Legend/LegendSymbol.js"], a["Core/Series/SeriesRegistry.js"], a["Core/Utilities.js"]], function(a2, n3, q, z, k, l2, A) { + const { parse: g } = n3, { series: x } = l2, { extend: t, isArray: h, isNumber: F, merge: f, pick: c } = A; + class e extends a2 { + static compose(b, d, c2, p) { + q.compose(e, b, d, c2, p); + } + constructor(b, d) { + super(b, d); + this.beforePadding = false; + this.chart = void 0; + this.coll = "colorAxis"; + this.stops = this.options = this.dataClasses = void 0; + this.visible = true; + this.init(b, d); + } + init(b, d) { + var c2 = b.options.legend || {}; + const p = d.layout ? d.layout !== "vertical" : c2.layout !== "vertical", C = d.visible; + c2 = f(e.defaultColorAxisOptions, d, { + showEmpty: false, + title: null, + visible: c2.enabled && C !== false + }); + this.side = d.side || p ? 2 : 1; + this.reversed = d.reversed || !p; + this.opposite = !p; + super.init(b, c2, "colorAxis"); + this.userOptions = d; + h(b.userOptions.colorAxis) && (b.userOptions.colorAxis[this.index] = d); + d.dataClasses && this.initDataClasses(d); + this.initStops(); + this.horiz = p; + this.zoomEnabled = false; + } + initDataClasses(b) { + const d = this.chart, e2 = this.legendItem = this.legendItem || {}, p = b.dataClasses.length, c2 = this.options; + let m, r = 0, v = d.options.chart.colorCount; + this.dataClasses = m = []; + e2.labels = []; + (b.dataClasses || []).forEach(function(b2, u) { + b2 = f(b2); + m.push(b2); + if (d.styledMode || !b2.color) + c2.dataClassColor === "category" ? (d.styledMode || (u = d.options.colors, v = u.length, b2.color = u[r]), b2.colorIndex = r, r++, r === v && (r = 0)) : b2.color = g(c2.minColor).tweenTo(g(c2.maxColor), 2 > p ? 0.5 : u / (p - 1)); + }); + } + hasData() { + return !!(this.tickPositions || []).length; + } + setTickPositions() { + if (!this.dataClasses) + return super.setTickPositions(); + } + initStops() { + this.stops = this.options.stops || [[0, this.options.minColor], [1, this.options.maxColor]]; + this.stops.forEach(function(b) { + b.color = g(b[1]); + }); + } + setOptions(b) { + super.setOptions(b); + this.options.crosshair = this.options.marker; + } + setAxisSize() { + var b = this.legendItem && this.legendItem.symbol; + const d = this.chart; + var c2 = d.options.legend || {}; + let p, f2; + b ? (this.left = c2 = b.attr("x"), this.top = p = b.attr("y"), this.width = f2 = b.attr("width"), this.height = b = b.attr("height"), this.right = d.chartWidth - c2 - f2, this.bottom = d.chartHeight - p - b, this.len = this.horiz ? f2 : b, this.pos = this.horiz ? c2 : p) : this.len = (this.horiz ? c2.symbolWidth : c2.symbolHeight) || e.defaultLegendLength; + } + normalizedValue(b) { + this.logarithmic && (b = this.logarithmic.log2lin(b)); + return 1 - (this.max - b) / (this.max - this.min || 1); + } + toColor(b, d) { + const e2 = this.dataClasses; + var c2 = this.stops; + let f2, m, r, v; + if (e2) + for (v = e2.length; v--; ) { + if (r = e2[v], f2 = r.from, c2 = r.to, (typeof f2 === "undefined" || b >= f2) && (typeof c2 === "undefined" || b <= c2)) { + m = r.color; + d && (d.dataClass = v, d.colorIndex = r.colorIndex); + break; + } + } + else { + b = this.normalizedValue(b); + for (v = c2.length; v-- && !(b > c2[v][0]); ) + ; + f2 = c2[v] || c2[v + 1]; + c2 = c2[v + 1] || f2; + b = 1 - (c2[0] - b) / (c2[0] - f2[0] || 1); + m = f2.color.tweenTo(c2.color, b); + } + return m; + } + getOffset() { + const b = this.legendItem && this.legendItem.group, d = this.chart.axisOffset[this.side]; + if (b) { + this.axisParent = b; + super.getOffset(); + const c2 = this.chart.legend; + c2.allItems.forEach(function(b2) { + b2 instanceof e && b2.drawLegendSymbol(c2, b2); + }); + c2.render(); + this.chart.getMargins(true); + this.added || (this.added = true, this.labelLeft = 0, this.labelRight = this.width); + this.chart.axisOffset[this.side] = d; + } + } + setLegendColor() { + var b = this.reversed, d = b ? 1 : 0; + b = b ? 0 : 1; + d = this.horiz ? [d, 0, b, 0] : [0, b, 0, d]; + this.legendColor = { linearGradient: { + x1: d[0], + y1: d[1], + x2: d[2], + y2: d[3] + }, stops: this.stops }; + } + drawLegendSymbol(b, d) { + var f2; + d = d.legendItem || {}; + const p = b.padding, h3 = b.options, m = this.options.labels, r = c(h3.itemDistance, 10), v = this.horiz, t2 = c(h3.symbolWidth, v ? e.defaultLegendLength : 12), u = c(h3.symbolHeight, v ? 12 : e.defaultLegendLength), B = c(h3.labelPadding, v ? 16 : 30); + this.setLegendColor(); + d.symbol || (d.symbol = this.chart.renderer.symbol("roundedRect", 0, b.baseline - 11, t2, u, { r: (f2 = h3.symbolRadius) !== null && f2 !== void 0 ? f2 : 3 }).attr({ zIndex: 1 }).add(d.group)); + d.labelWidth = t2 + p + (v ? r : c(m.x, m.distance) + this.maxLabelLength); + d.labelHeight = u + p + (v ? B : 0); + } + setState(b) { + this.series.forEach(function(d) { + d.setState(b); + }); + } + setVisible() { + } + getSeriesExtremes() { + const b = this.series; + let d; + let e2, p, f2 = b.length, m, r; + this.dataMin = Infinity; + for (this.dataMax = -Infinity; f2--; ) { + p = b[f2]; + d = p.colorKey = c(p.options.colorKey, p.colorKey, p.pointValKey, p.zoneAxis, "y"); + var v = p.pointArrayMap; + e2 = p[d + "Min"] && p[d + "Max"]; + if (p[d + "Data"]) + var h3 = p[d + "Data"]; + else if (v) { + if (h3 = [], v = v.indexOf(d), m = p.yData, 0 <= v && m) + for (r = 0; r < m.length; r++) + h3.push(c(m[r][v], m[r])); + } else + h3 = p.yData; + e2 ? (p.minColorValue = p[d + "Min"], p.maxColorValue = p[d + "Max"]) : (h3 = x.prototype.getExtremes.call(p, h3), p.minColorValue = h3.dataMin, p.maxColorValue = h3.dataMax); + typeof p.minColorValue !== "undefined" && (this.dataMin = Math.min(this.dataMin, p.minColorValue), this.dataMax = Math.max(this.dataMax, p.maxColorValue)); + e2 || x.prototype.applyExtremes.call(p); + } + } + drawCrosshair(b, d) { + const c2 = this.legendItem || {}, e2 = d && d.plotX, f2 = d && d.plotY, m = this.pos, h3 = this.len; + let v; + d && (v = this.toPixels(d.getNestedProperty(d.series.colorKey)), v < m ? v = m - 2 : v > m + h3 && (v = m + h3 + 2), d.plotX = v, d.plotY = this.len - v, super.drawCrosshair(b, d), d.plotX = e2, d.plotY = f2, this.cross && !this.cross.addedToColorAxis && c2.group && (this.cross.addClass("highcharts-coloraxis-marker").add(c2.group), this.cross.addedToColorAxis = true, this.chart.styledMode || typeof this.crosshair !== "object" || this.cross.attr({ fill: this.crosshair.color }))); + } + getPlotLinePath(b) { + const d = this.left, c2 = b.translatedValue, e2 = this.top; + return F(c2) ? this.horiz ? [["M", c2 - 4, e2 - 6], ["L", c2 + 4, e2 - 6], ["L", c2, e2], ["Z"]] : [["M", d, c2], [ + "L", + d - 6, + c2 + 6 + ], ["L", d - 6, c2 - 6], ["Z"]] : super.getPlotLinePath(b); + } + update(b, d) { + const c2 = this.chart.legend; + this.series.forEach((b2) => { + b2.isDirtyData = true; + }); + (b.dataClasses && c2.allItems || this.dataClasses) && this.destroyItems(); + super.update(b, d); + this.legendItem && this.legendItem.label && (this.setLegendColor(), c2.colorizeItem(this, true)); + } + destroyItems() { + const b = this.chart, d = this.legendItem || {}; + if (d.label) + b.legend.destroyItem(this); + else if (d.labels) + for (const c2 of d.labels) + b.legend.destroyItem(c2); + b.isDirtyLegend = true; + } + destroy() { + this.chart.isDirtyLegend = true; + this.destroyItems(); + super.destroy(...[].slice.call(arguments)); + } + remove(b) { + this.destroyItems(); + super.remove(b); + } + getDataClassLegendSymbols() { + const b = this, d = b.chart, e2 = b.legendItem && b.legendItem.labels || [], f2 = d.options.legend, h3 = c(f2.valueDecimals, -1), m = c(f2.valueSuffix, ""), r = (d2) => b.series.reduce((b2, c2) => { + b2.push(...c2.points.filter((b3) => b3.dataClass === d2)); + return b2; + }, []); + let v; + e2.length || b.dataClasses.forEach((c2, u) => { + const f3 = c2.from, p = c2.to, { numberFormatter: a3 } = d; + let C = true; + v = ""; + typeof f3 === "undefined" ? v = "< " : typeof p === "undefined" && (v = "> "); + typeof f3 !== "undefined" && (v += a3(f3, h3) + m); + typeof f3 !== "undefined" && typeof p !== "undefined" && (v += " - "); + typeof p !== "undefined" && (v += a3(p, h3) + m); + e2.push(t({ chart: d, name: v, options: {}, drawLegendSymbol: k.rectangle, visible: true, isDataClass: true, setState: (b2) => { + for (const c3 of r(u)) + c3.setState(b2); + }, setVisible: function() { + this.visible = C = b.visible = !C; + for (const b2 of r(u)) + b2.setVisible(C); + d.legend.colorizeItem(this, C); + } }, c2)); + }); + return e2; + } + } + e.defaultColorAxisOptions = z; + e.defaultLegendLength = 200; + e.keepProps = ["legendItem"]; + Array.prototype.push.apply(a2.keepProps, e.keepProps); + ""; + return e; + }); + y(a, "Maps/MapNavigationDefaults.js", [a["Core/Defaults.js"], a["Core/Utilities.js"]], function(a2, n3) { + ({ extend: n3 } = n3); + const g = { buttonOptions: { alignTo: "plotBox", align: "left", verticalAlign: "top", x: 0, width: 18, height: 18, padding: 5, style: { color: "#666666", fontSize: "1em", fontWeight: "bold" }, theme: { fill: "#ffffff", stroke: "#e6e6e6", "stroke-width": 1, "text-align": "center" } }, buttons: { zoomIn: { onclick: function() { + this.mapZoom(0.5); + }, text: "+", y: 0 }, zoomOut: { + onclick: function() { + this.mapZoom(2); + }, + text: "-", + y: 28 + } }, mouseWheelSensitivity: 1.1 }; + n3(a2.defaultOptions.lang, { zoomIn: "Zoom in", zoomOut: "Zoom out" }); + return a2.defaultOptions.mapNavigation = g; + }); + y(a, "Maps/MapNavigation.js", [a["Core/Chart/Chart.js"], a["Core/Globals.js"], a["Core/Utilities.js"]], function(a2, n3, q) { + function g(f) { + f && (f.preventDefault && f.preventDefault(), f.stopPropagation && f.stopPropagation(), f.cancelBubble = true); + } + function k(f) { + this.navButtons = []; + this.init(f); + } + const { doc: l2 } = n3, { addEvent: A, extend: w, isNumber: x, merge: t, objectEach: h, pick: F } = q; + k.prototype.init = function(f) { + this.chart = f; + }; + k.prototype.update = function(f) { + let c = this, e = this.chart, b = e.options.mapNavigation, d, a3 = function(b2) { + this.handler.call(e, b2); + g(b2); + }, p = c.navButtons; + f && (b = e.options.mapNavigation = t(e.options.mapNavigation, f)); + for (; p.length; ) + p.pop().destroy(); + F(b.enableButtons, b.enabled) && !e.renderer.forExport && (c.navButtonsGroup || (c.navButtonsGroup = e.renderer.g().attr({ zIndex: 4 }).add()), h(b.buttons, function(f2, m) { + var h3; + f2 = t(b.buttonOptions, f2); + !e.styledMode && f2.theme && (d = f2.theme, d.style = t(f2.theme.style, f2.style)); + const { text: v, width: E = 0, height: u = 0, padding: B = 0 } = f2, D = e.renderer.button(v !== "+" && v !== "-" && v || "", 0, 0, a3, d, void 0, void 0, void 0, m === "zoomIn" ? "topbutton" : "bottombutton").addClass("highcharts-map-navigation highcharts-" + { zoomIn: "zoom-in", zoomOut: "zoom-out" }[m]).attr({ width: E, height: u, title: e.options.lang[m], padding: f2.padding, zIndex: 5 }).add(c.navButtonsGroup); + if (v === "+" || v === "-") { + m = E + 1; + const b2 = [["M", B + 3, B + u / 2], ["L", B + m - 3, B + u / 2]]; + v === "+" && b2.push(["M", B + m / 2, B + 3], ["L", B + m / 2, B + u - 3]); + e.renderer.path(b2).addClass("highcharts-button-symbol").attr(e.styledMode ? {} : { stroke: (h3 = f2.style) === null || h3 === void 0 ? void 0 : h3.color, "stroke-width": 3, "stroke-linecap": "round" }).add(D); + } + D.handler = f2.onclick; + A(D.element, "dblclick", g); + p.push(D); + w(f2, { width: D.width, height: 2 * D.height }); + if (e.hasLoaded) + D.align(f2, false, f2.alignTo); + else { + const b2 = A(e, "load", () => { + D.element && D.align(f2, false, f2.alignTo); + b2(); + }); + } + }), f = function() { + var d2 = e.exportingGroup && e.exportingGroup.getBBox(); + if (d2) { + const e2 = c.navButtonsGroup.getBBox(); + if (!(e2.x >= d2.x + d2.width || e2.x + e2.width <= d2.x || e2.y >= d2.y + d2.height || e2.y + e2.height <= d2.y)) { + const f2 = -e2.y - e2.height + d2.y - 5; + d2 = d2.y + d2.height - e2.y + 5; + c.navButtonsGroup.attr({ translateY: (b.buttonOptions && b.buttonOptions.verticalAlign) === "bottom" ? f2 : d2 }); + } + } + }, e.hasLoaded || A(e, "render", f)); + this.updateEvents(b); + }; + k.prototype.updateEvents = function(f) { + const c = this.chart; + F(f.enableDoubleClickZoom, f.enabled) || f.enableDoubleClickZoomTo ? this.unbindDblClick = this.unbindDblClick || A(c.container, "dblclick", function(e) { + c.pointer.onContainerDblClick(e); + }) : this.unbindDblClick && (this.unbindDblClick = this.unbindDblClick()); + F(f.enableMouseWheelZoom, f.enabled) ? this.unbindMouseWheel = this.unbindMouseWheel || A(c.container, l2.onwheel !== void 0 ? "wheel" : l2.onmousewheel !== void 0 ? "mousewheel" : "DOMMouseScroll", function(e) { + c.pointer.inClass(e.target, "highcharts-no-mousewheel") || (c.pointer.onContainerMouseWheel(e), g(e)); + return false; + }) : this.unbindMouseWheel && (this.unbindMouseWheel = this.unbindMouseWheel()); + }; + w(a2.prototype, { fitToBox: function(f, c) { + [["x", "width"], ["y", "height"]].forEach(function(e) { + const b = e[0]; + e = e[1]; + f[b] + f[e] > c[b] + c[e] && (f[e] > c[e] ? (f[e] = c[e], f[b] = c[b]) : f[b] = c[b] + c[e] - f[e]); + f[e] > c[e] && (f[e] = c[e]); + f[b] < c[b] && (f[b] = c[b]); + }); + return f; + }, mapZoom: function(f, c, e, b, d) { + this.mapView && (x(f) && (f = Math.log(f) / Math.log(0.5)), this.mapView.zoomBy(f, x(c) && x(e) ? this.mapView.projection.inverse([c, e]) : void 0, x(b) && x(d) ? [b, d] : void 0)); + } }); + A(a2, "beforeRender", function() { + this.mapNavigation = new k(this); + this.mapNavigation.update(); + }); + n3.MapNavigation = k; + }); + y(a, "Maps/MapPointer.js", [a["Core/Pointer.js"], a["Core/Utilities.js"]], function(a2, n3) { + const { defined: g, extend: z, pick: k, wrap: l2 } = n3, A = a2.prototype.normalize; + let w = 0, x; + z(a2.prototype, { normalize: function(t, h) { + const a3 = this.chart; + t = A.call(this, t, h); + a3 && a3.mapView && (h = a3.mapView.pixelsToLonLat({ x: t.chartX - a3.plotLeft, y: t.chartY - a3.plotTop })) && z(t, h); + return t; + }, onContainerDblClick: function(a3) { + const h = this.chart; + a3 = this.normalize(a3); + h.options.mapNavigation.enableDoubleClickZoomTo ? h.pointer.inClass(a3.target, "highcharts-tracker") && h.hoverPoint && h.hoverPoint.zoomTo() : h.isInsidePlot(a3.chartX - h.plotLeft, a3.chartY - h.plotTop) && h.mapZoom(0.5, void 0, void 0, a3.chartX, a3.chartY); + }, onContainerMouseWheel: function(a3) { + const h = this.chart; + a3 = this.normalize(a3); + const t = g(a3.wheelDelta) && -a3.wheelDelta / 120 || a3.deltaY || a3.detail; + 1 <= Math.abs(t) && (w += Math.abs(t), x && clearTimeout(x), x = setTimeout(() => { + w = 0; + }, 50)); + 10 > w && h.isInsidePlot(a3.chartX - h.plotLeft, a3.chartY - h.plotTop) && h.mapView && h.mapView.zoomBy((h.options.mapNavigation.mouseWheelSensitivity - 1) * -t, void 0, [a3.chartX, a3.chartY], 1 > Math.abs(t) ? false : void 0); + } }); + l2(a2.prototype, "zoomOption", function(a3) { + const h = this.chart.options.mapNavigation; + k(h.enableTouchZoom, h.enabled) && (this.chart.zooming.pinchType = "xy"); + a3.apply(this, [].slice.call(arguments, 1)); + }); + l2(a2.prototype, "pinchTranslate", function(a3, h, k2, f, c, e, b) { + a3.call(this, h, k2, f, c, e, b); + this.chart.options.chart.type === "map" && this.hasZoom && (a3 = f.scaleX > f.scaleY, this.pinchTranslateDirection(!a3, h, k2, f, c, e, b, a3 ? f.scaleX : f.scaleY)); + }); + }); + y(a, "Series/ColorMapComposition.js", [a["Core/Series/SeriesRegistry.js"], a["Core/Utilities.js"]], function(a2, n3) { + const { column: { prototype: g } } = a2.seriesTypes, { addEvent: z, defined: k } = n3; + var l2; + (function(a3) { + function l3(a4) { + this.moveToTopOnHover && this.graphic && this.graphic.attr({ zIndex: a4 && a4.state === "hover" ? 1 : 0 }); + } + const q = []; + a3.pointMembers = { dataLabelOnNull: true, moveToTopOnHover: true, isValid: function() { + return this.value !== null && this.value !== Infinity && this.value !== -Infinity && (this.value === void 0 || !isNaN(this.value)); + } }; + a3.seriesMembers = { + colorKey: "value", + axisTypes: ["xAxis", "yAxis", "colorAxis"], + parallelArrays: ["x", "y", "value"], + pointArrayMap: ["value"], + trackerGroups: ["group", "markerGroup", "dataLabelsGroup"], + colorAttribs: function(a4) { + const h = {}; + !k(a4.color) || a4.state && a4.state !== "normal" || (h[this.colorProp || "fill"] = a4.color); + return h; + }, + pointAttribs: g.pointAttribs + }; + a3.compose = function(a4) { + const h = a4.prototype.pointClass; + n3.pushUnique(q, h) && z(h, "afterSetState", l3); + return a4; + }; + })(l2 || (l2 = {})); + return l2; + }); + y(a, "Maps/MapSymbols.js", [a["Core/Renderer/SVG/SVGRenderer.js"]], function(a2) { + const { prototype: { symbols: g } } = a2; + g.bottombutton = function(a3, n3, k, l2, A) { + if (A) { + const a4 = (A === null || A === void 0 ? void 0 : A.r) || 0; + A.brBoxY = n3 - a4; + A.brBoxHeight = l2 + a4; + } + return g.roundedRect(a3, n3, k, l2, A); + }; + g.topbutton = function(a3, n3, k, l2, A) { + A && (A.brBoxHeight = l2 + ((A === null || A === void 0 ? void 0 : A.r) || 0)); + return g.roundedRect(a3, n3, k, l2, A); + }; + return g; + }); + y(a, "Core/Chart/MapChart.js", [a["Core/Chart/Chart.js"], a["Core/Defaults.js"], a["Core/Renderer/SVG/SVGRenderer.js"], a["Core/Utilities.js"]], function(a2, n3, q, z) { + const { getOptions: k } = n3, { merge: g, pick: A } = z; + class w extends a2 { + init(a3, t) { + const h = k().credits; + a3 = g({ chart: { panning: { enabled: true, type: "xy" }, type: "map" }, credits: { mapText: A(h.mapText, ' \xA9 {geojson.copyrightShort}'), mapTextFull: A(h.mapTextFull, "{geojson.copyright}") }, mapView: {}, tooltip: { followTouchMove: false } }, a3); + super.init(a3, t); + } + } + (function(a3) { + a3.maps = {}; + a3.mapChart = function(t, h, k2) { + return new a3(t, h, k2); + }; + a3.splitPath = function(a4) { + typeof a4 === "string" && (a4 = a4.replace(/([A-Za-z])/g, " $1 ").replace(/^\s*/, "").replace(/\s*$/, ""), a4 = a4.split(/[ ,;]+/).map((a5) => /[A-za-z]/.test(a5) ? a5 : parseFloat(a5))); + return q.prototype.pathToSegments(a4); + }; + })(w || (w = {})); + return w; + }); + y(a, "Maps/MapUtilities.js", [], function() { + return { boundsFromPath: function(a2) { + let g = -Number.MAX_VALUE, q = Number.MAX_VALUE, z = -Number.MAX_VALUE, k = Number.MAX_VALUE, l2; + a2.forEach((a3) => { + const w = a3[a3.length - 2]; + a3 = a3[a3.length - 1]; + typeof w === "number" && typeof a3 === "number" && (q = Math.min(q, w), g = Math.max(g, w), k = Math.min(k, a3), z = Math.max(z, a3), l2 = true); + }); + if (l2) + return { x1: q, y1: k, x2: g, y2: z }; + }, pointInPolygon: function(a2, n3) { + let g, z, k, l2 = false, A = a2.x, w = a2.y; + a2 = 0; + for (g = n3.length - 1; a2 < n3.length; g = a2++) + z = n3[a2][1] > w, k = n3[g][1] > w, z !== k && A < (n3[g][0] - n3[a2][0]) * (w - n3[a2][1]) / (n3[g][1] - n3[a2][1]) + n3[a2][0] && (l2 = !l2); + return l2; + } }; + }); + y(a, "Series/Map/MapPoint.js", [a["Series/ColorMapComposition.js"], a["Maps/MapUtilities.js"], a["Core/Series/SeriesRegistry.js"], a["Core/Utilities.js"]], function(a2, n3, q, z) { + const { boundsFromPath: k } = n3; + ({ seriesTypes: { scatter: n3 } } = q); + const { extend: l2, isNumber: g, pick: w } = z; + class x extends n3.prototype.pointClass { + constructor() { + super(...arguments); + this.series = this.path = this.options = void 0; + } + static getProjectedPath(a3, h) { + a3.projectedPath || (h && a3.geometry ? (h.hasCoordinates = true, a3.projectedPath = h.path(a3.geometry)) : a3.projectedPath = a3.path); + return a3.projectedPath || []; + } + applyOptions(a3, h) { + const k2 = this.series; + a3 = super.applyOptions.call(this, a3, h); + h = k2.joinBy; + k2.mapData && k2.mapMap && (h = super.getNestedProperty.call(a3, h[1]), (h = typeof h !== "undefined" && k2.mapMap[h]) ? l2(a3, h) : k2.pointArrayMap.indexOf("value") !== -1 && (a3.value = a3.value || null)); + return a3; + } + getProjectedBounds(a3) { + var h = x.getProjectedPath(this, a3); + h = k(h); + var l3 = this.properties; + const f = this.series.chart.mapView; + if (h) { + const c = l3 && l3["hc-middle-lon"], e = l3 && l3["hc-middle-lat"]; + f && g(c) && g(e) ? (a3 = a3.forward([c, e]), h.midX = a3[0], h.midY = a3[1]) : (a3 = l3 && l3["hc-middle-x"], l3 = l3 && l3["hc-middle-y"], h.midX = h.x1 + (h.x2 - h.x1) * w(this.middleX, g(a3) ? a3 : 0.5), a3 = w(this.middleY, g(l3) ? l3 : 0.5), this.geometry || (a3 = 1 - a3), h.midY = h.y2 - (h.y2 - h.y1) * a3); + return h; + } + } + onMouseOver(a3) { + z.clearTimeout(this.colorInterval); + if (!this.isNull && this.visible || this.series.options.nullInteraction) + super.onMouseOver.call(this, a3); + else + this.series.onMouseOut(a3); + } + setVisible(a3) { + const h = a3 ? "show" : "hide"; + this.visible = this.options.visible = !!a3; + if (this.dataLabel) + this.dataLabel[h](); + this.graphic && this.graphic.attr(this.series.pointAttribs(this)); + } + zoomTo(a3) { + const h = this.series.chart, k2 = h.mapView; + var f = this.bounds; + if (k2 && f) { + const e = g(this.insetIndex) && k2.insets[this.insetIndex]; + if (e) { + var c = e.projectedUnitsToPixels({ x: f.x1, y: f.y1 }); + f = e.projectedUnitsToPixels({ x: f.x2, y: f.y2 }); + c = k2.pixelsToProjectedUnits({ x: c.x, y: c.y }); + f = k2.pixelsToProjectedUnits({ + x: f.x, + y: f.y + }); + f = { x1: c.x, y1: c.y, x2: f.x, y2: f.y }; + } + k2.fitToBounds(f, void 0, false); + this.series.isDirty = true; + h.redraw(a3); + } + } + } + l2(x.prototype, { dataLabelOnNull: a2.pointMembers.dataLabelOnNull, moveToTopOnHover: a2.pointMembers.moveToTopOnHover, isValid: a2.pointMembers.isValid }); + return x; + }); + y(a, "Maps/MapViewOptionsDefault.js", [], function() { + return { center: [0, 0], fitToGeometry: void 0, maxZoom: void 0, padding: 0, projection: { name: void 0, parallels: void 0, rotation: void 0 }, zoom: void 0 }; + }); + y(a, "Maps/MapViewInsetsOptionsDefault.js", [], function() { + return { + borderColor: "#cccccc", + borderWidth: 1, + center: [0, 0], + padding: "10%", + relativeTo: "mapBoundingBox", + units: "percent" + }; + }); + y(a, "Extensions/GeoJSON.js", [a["Core/Chart/Chart.js"], a["Core/Templating.js"], a["Core/Globals.js"], a["Core/Utilities.js"]], function(a2, n3, q, z) { + function k(a3, c) { + c || (c = Object.keys(a3.objects)[0]); + c = a3.objects[c]; + if (c["hc-decoded-geojson"]) + return c["hc-decoded-geojson"]; + let e = a3.arcs; + if (a3.transform) { + const { scale: b2, translate: d2 } = a3.transform; + e = a3.arcs.map((a4) => { + let c2 = 0, e2 = 0; + return a4.map((a5) => { + a5 = a5.slice(); + a5[0] = (c2 += a5[0]) * b2[0] + d2[0]; + a5[1] = (e2 += a5[1]) * b2[1] + d2[1]; + return a5; + }); + }); + } + const b = (a4) => typeof a4[0] === "number" ? a4.reduce((b2, a5, d2) => { + let c2 = 0 > a5 ? e[~a5] : e[a5]; + 0 > a5 ? (c2 = c2.slice(0, d2 === 0 ? c2.length : c2.length - 1), c2.reverse()) : d2 && (c2 = c2.slice(1)); + return b2.concat(c2); + }, []) : a4.map(b), d = c.geometries.map((a4) => ({ type: "Feature", properties: a4.properties, geometry: { type: a4.type, coordinates: a4.coordinates || b(a4.arcs) } })); + a3 = { + type: "FeatureCollection", + copyright: a3.copyright, + copyrightShort: a3.copyrightShort, + copyrightUrl: a3.copyrightUrl, + features: d, + "hc-recommended-mapview": c["hc-recommended-mapview"], + bbox: a3.bbox, + title: a3.title + }; + return c["hc-decoded-geojson"] = a3; + } + function l2(a3, c = "map", e) { + const b = []; + a3 = a3.type === "Topology" ? k(a3) : a3; + a3.features.forEach(function(a4) { + var d = a4.geometry || {}, e2 = d.type; + d = d.coordinates; + a4 = a4.properties; + let f; + c !== "map" && c !== "mapbubble" || e2 !== "Polygon" && e2 !== "MultiPolygon" ? c !== "mapline" || e2 !== "LineString" && e2 !== "MultiLineString" ? c === "mappoint" && e2 === "Point" && d.length && (f = { geometry: { coordinates: d, type: e2 } }) : d.length && (f = { geometry: { coordinates: d, type: e2 } }) : d.length && (f = { geometry: { + coordinates: d, + type: e2 + } }); + if (f) { + e2 = a4 && (a4.name || a4.NAME); + d = a4 && a4.lon; + const c2 = a4 && a4.lat; + b.push(t(f, { lat: typeof c2 === "number" ? c2 : void 0, lon: typeof d === "number" ? d : void 0, name: typeof e2 === "string" ? e2 : void 0, properties: a4 })); + } + }); + e && a3.copyrightShort && (e.chart.mapCredits = g(e.chart.options.credits.mapText, { geojson: a3 }), e.chart.mapCreditsFull = g(e.chart.options.credits.mapTextFull, { geojson: a3 })); + return b; + } + const { format: g } = n3, { win: w } = q, { error: x, extend: t, merge: h, wrap: F } = z; + ""; + a2.prototype.transformFromLatLon = function(a3, c) { + var e = this.options.chart.proj4 || w.proj4; + if (e) { + var { jsonmarginX: b = 0, jsonmarginY: d = 0, jsonres: f = 1, scale: h3 = 1, xoffset: k2 = 0, xpan: m = 0, yoffset: r = 0, ypan: v = 0 } = c; + a3 = e(c.crs, [a3.lon, a3.lat]); + e = c.cosAngle || c.rotation && Math.cos(c.rotation); + var l3 = c.sinAngle || c.rotation && Math.sin(c.rotation); + c = c.rotation ? [a3[0] * e + a3[1] * l3, -a3[0] * l3 + a3[1] * e] : a3; + return { x: ((c[0] - k2) * h3 + m) * f + b, y: -(((r - c[1]) * h3 + v) * f - d) }; + } + x(21, false, this); + }; + a2.prototype.transformToLatLon = function(a3, c) { + const e = this.options.chart.proj4 || w.proj4; + if (!e) + x(21, false, this); + else if (a3.y !== null) { + var { + jsonmarginX: b = 0, + jsonmarginY: d = 0, + jsonres: f = 1, + scale: h3 = 1, + xoffset: k2 = 0, + xpan: m = 0, + yoffset: r = 0, + ypan: v = 0 + } = c; + a3 = { x: ((a3.x - b) / f - m) / h3 + k2, y: ((a3.y - d) / f + v) / h3 + r }; + var l3 = c.cosAngle || c.rotation && Math.cos(c.rotation), u = c.sinAngle || c.rotation && Math.sin(c.rotation); + c = e(c.crs, "WGS84", c.rotation ? { x: a3.x * l3 + a3.y * -u, y: a3.x * u + a3.y * l3 } : a3); + return { lat: c.y, lon: c.x }; + } + }; + a2.prototype.fromPointToLatLon = function(a3) { + return this.mapView && this.mapView.projectedUnitsToLonLat(a3); + }; + a2.prototype.fromLatLonToPoint = function(a3) { + return this.mapView && this.mapView.lonLatToProjectedUnits(a3); + }; + F(a2.prototype, "addCredits", function(a3, c) { + c = h(true, this.options.credits, c); + this.mapCredits && (c.href = null); + a3.call(this, c); + this.credits && this.mapCreditsFull && this.credits.attr({ title: this.mapCreditsFull }); + }); + q.geojson = l2; + q.topo2geo = k; + return { geojson: l2, topo2geo: k }; + }); + y(a, "Core/Geometry/PolygonClip.js", [], function() { + const a2 = (a3, k, l2) => (k[0] - a3[0]) * (l2[1] - a3[1]) > (k[1] - a3[1]) * (l2[0] - a3[0]), n3 = (a3, k, l2, g) => { + var w = [a3[0] - k[0], a3[1] - k[1]]; + const q2 = [l2[0] - g[0], l2[1] - g[1]]; + a3 = a3[0] * k[1] - a3[1] * k[0]; + l2 = l2[0] * g[1] - l2[1] * g[0]; + g = 1 / (w[0] * q2[1] - w[1] * q2[0]); + w = [(a3 * q2[0] - l2 * w[0]) * g, (a3 * q2[1] - l2 * w[1]) * g]; + w.isIntersection = true; + return w; + }; + var q; + (function(g) { + g.clipLineString = (a3, l2) => { + const k = []; + a3 = g.clipPolygon(a3, l2, false); + for (l2 = 1; l2 < a3.length; l2++) + a3[l2].isIntersection && a3[l2 - 1].isIntersection && (k.push(a3.splice(0, l2)), l2 = 0), l2 === a3.length - 1 && k.push(a3); + return k; + }; + g.clipPolygon = (k, l2, g2 = true) => { + let q2 = l2[l2.length - 1], x, t, h = k; + for (let w = 0; w < l2.length; w++) { + const f = h; + k = l2[w]; + h = []; + x = g2 ? f[f.length - 1] : f[0]; + for (let c = 0; c < f.length; c++) + t = f[c], a2(q2, k, t) ? (a2(q2, k, x) || h.push(n3(q2, k, x, t)), h.push(t)) : a2(q2, k, x) && h.push(n3(q2, k, x, t)), x = t; + q2 = k; + } + return h; + }; + })(q || (q = {})); + return q; + }); + y(a, "Maps/Projections/LambertConformalConic.js", [], function() { + const a2 = Math.sign || ((a3) => a3 === 0 ? 0 : 0 < a3 ? 1 : -1), n3 = Math.PI / 180, q = Math.PI / 2; + class z { + constructor(k) { + var l2, g = (k.parallels || []).map((a3) => a3 * n3); + const w = g[0] || 0; + g = (l2 = g[1]) !== null && l2 !== void 0 ? l2 : w; + l2 = Math.cos(w); + typeof k.projectedBounds === "object" && (this.projectedBounds = k.projectedBounds); + k = w === g ? Math.sin(w) : Math.log(l2 / Math.cos(g)) / Math.log(Math.tan((q + g) / 2) / Math.tan((q + w) / 2)); + 1e-10 > Math.abs(k) && (k = 1e-10 * (a2(k) || 1)); + this.n = k; + this.c = l2 * Math.pow(Math.tan((q + w) / 2), k) / k; + } + forward(a3) { + var l2 = a3[0] * n3; + const { c: k, n: g, projectedBounds: x } = this; + a3 = a3[1] * n3; + 0 < k ? a3 < -q + 1e-6 && (a3 = -q + 1e-6) : a3 > q - 1e-6 && (a3 = q - 1e-6); + var t = k / Math.pow(Math.tan((q + a3) / 2), g); + a3 = t * Math.sin(g * l2) * 63.78137; + l2 = 63.78137 * (k - t * Math.cos(g * l2)); + t = [a3, l2]; + x && (a3 < x.x1 || a3 > x.x2 || l2 < x.y1 || l2 > x.y2) && (t.outside = true); + return t; + } + inverse(k) { + const l2 = k[0] / 63.78137; + k = k[1] / 63.78137; + const { c: g, n: w } = this; + k = g - k; + const x = a2(w) * Math.sqrt(l2 * l2 + k * k); + let t = Math.atan2(l2, Math.abs(k)) * a2(k); + 0 > k * w && (t -= Math.PI * a2(l2) * a2(k)); + return [t / w / n3, (2 * Math.atan(Math.pow(g / x, 1 / w)) - q) / n3]; + } + } + return z; + }); + y(a, "Maps/Projections/EqualEarth.js", [], function() { + const a2 = Math.sqrt(3) / 2; + class n3 { + constructor() { + this.bounds = { x1: -200.37508342789243, x2: 200.37508342789243, y1: -97.52595454902263, y2: 97.52595454902263 }; + } + forward(g) { + const q = Math.PI / 180, k = Math.asin(a2 * Math.sin(g[1] * q)), l2 = k * k, n4 = l2 * l2 * l2; + return [g[0] * q * Math.cos(k) * 74.03120656864502 / (a2 * (1.340264 + 3 * -0.081106 * l2 + n4 * (7 * 893e-6 + 0.034164 * l2))), 74.03120656864502 * k * (1.340264 + -0.081106 * l2 + n4 * (893e-6 + 3796e-6 * l2))]; + } + inverse(g) { + const q = g[0] / 74.03120656864502; + g = g[1] / 74.03120656864502; + const k = 180 / Math.PI; + let l2 = g; + let n4; + let w; + for (w = 0; 12 > w; ++w) { + var x = l2 * l2; + n4 = x * x * x; + var t = l2 * (1.340264 + -0.081106 * x + n4 * (893e-6 + 3796e-6 * x)) - g; + x = 1.340264 + 3 * -0.081106 * x + n4 * (7 * 893e-6 + 0.034164 * x); + l2 -= t /= x; + if (1e-9 > Math.abs(t)) + break; + } + x = l2 * l2; + return [k * a2 * q * (1.340264 + 3 * -0.081106 * x + x * x * x * (7 * 893e-6 + 0.034164 * x)) / Math.cos(l2), k * Math.asin(Math.sin(l2) / a2)]; + } + } + return n3; + }); + y(a, "Maps/Projections/Miller.js", [], function() { + const a2 = Math.PI / 4, n3 = Math.PI / 180; + class q { + constructor() { + this.bounds = { x1: -200.37508342789243, x2: 200.37508342789243, y1: -146.91480769173063, y2: 146.91480769173063 }; + } + forward(g) { + return [g[0] * n3 * 63.78137, 79.7267125 * Math.log(Math.tan(a2 + 0.4 * g[1] * n3))]; + } + inverse(g) { + return [g[0] / 63.78137 / n3, 2.5 * (Math.atan(Math.exp(g[1] / 63.78137 * 0.8)) - a2) / n3]; + } + } + return q; + }); + y(a, "Maps/Projections/Orthographic.js", [], function() { + const a2 = Math.PI / 180; + class n3 { + constructor() { + this.antimeridianCutting = false; + this.bounds = { + x1: -63.78460826781007, + x2: 63.78460826781007, + y1: -63.78460826781007, + y2: 63.78460826781007 + }; + } + forward(g) { + const n4 = g[0]; + g = g[1] * a2; + g = [Math.cos(g) * Math.sin(n4 * a2) * 63.78460826781007, 63.78460826781007 * Math.sin(g)]; + if (-90 > n4 || 90 < n4) + g.outside = true; + return g; + } + inverse(g) { + const n4 = g[0] / 63.78460826781007; + g = g[1] / 63.78460826781007; + const k = Math.sqrt(n4 * n4 + g * g), l2 = Math.asin(k), q = Math.sin(l2); + return [Math.atan2(n4 * q, k * Math.cos(l2)) / a2, Math.asin(k && g * q / k) / a2]; + } + } + return n3; + }); + y(a, "Maps/Projections/WebMercator.js", [], function() { + const a2 = Math.PI / 180; + class n3 { + constructor() { + this.bounds = { + x1: -200.37508342789243, + x2: 200.37508342789243, + y1: -200.3750834278071, + y2: 200.3750834278071 + }; + this.maxLatitude = 85.0511287798; + } + forward(g) { + var n4 = Math.sin(g[1] * a2); + n4 = [63.78137 * g[0] * a2, 63.78137 * Math.log((1 + n4) / (1 - n4)) / 2]; + 85.0511287798 < Math.abs(g[1]) && (n4.outside = true); + return n4; + } + inverse(g) { + return [g[0] / (63.78137 * a2), (2 * Math.atan(Math.exp(g[1] / 63.78137)) - Math.PI / 2) / a2]; + } + } + return n3; + }); + y(a, "Maps/Projections/ProjectionRegistry.js", [ + a["Maps/Projections/LambertConformalConic.js"], + a["Maps/Projections/EqualEarth.js"], + a["Maps/Projections/Miller.js"], + a["Maps/Projections/Orthographic.js"], + a["Maps/Projections/WebMercator.js"] + ], function(a2, n3, q, z, k) { + return { EqualEarth: n3, LambertConformalConic: a2, Miller: q, Orthographic: z, WebMercator: k }; + }); + y(a, "Maps/Projection.js", [a["Core/Geometry/PolygonClip.js"], a["Maps/Projections/ProjectionRegistry.js"], a["Core/Utilities.js"]], function(a2, n3, q) { + const { clipLineString: g, clipPolygon: k } = a2, { clamp: l2, erase: A } = q, w = 2 * Math.PI / 360, x = (a3) => { + -180 > a3 && (a3 += 360); + 180 < a3 && (a3 -= 360); + return a3; + }; + class t { + static add(a3, g2) { + t.registry[a3] = g2; + } + static greatCircle(a3, g2, f) { + const { + atan2: c, + cos: e, + sin: b, + sqrt: d + } = Math, h = a3[1] * w, p = a3[0] * w, l3 = g2[1] * w, m = g2[0] * w; + var r = l3 - h, v = m - p; + r = b(r / 2) * b(r / 2) + e(h) * e(l3) * b(v / 2) * b(v / 2); + r = 2 * c(d(r), d(1 - r)); + var k2 = Math.round(6371e3 * r / 5e5); + v = []; + f && v.push(a3); + if (1 < k2) + for (a3 = 1 / k2, k2 = a3; 0.999 > k2; k2 += a3) { + var u = b((1 - k2) * r) / b(r); + const a4 = b(k2 * r) / b(r); + var B = u * e(h) * e(p) + a4 * e(l3) * e(m); + const f2 = u * e(h) * b(p) + a4 * e(l3) * b(m); + u = u * b(h) + a4 * b(l3); + u = c(u, d(B * B + f2 * f2)); + B = c(f2, B); + v.push([B / w, u / w]); + } + f && v.push(g2); + return v; + } + static insertGreatCircles(a3) { + let h = a3.length - 1; + for (; h--; ) + if (10 < Math.max(Math.abs(a3[h][0] - a3[h + 1][0]), Math.abs(a3[h][1] - a3[h + 1][1]))) { + const f = t.greatCircle(a3[h], a3[h + 1]); + f.length && a3.splice(h + 1, 0, ...f); + } + } + static toString(a3) { + const { name: h, rotation: f } = a3 || {}; + return [h, f && f.join(",")].join(";"); + } + constructor(a3 = {}) { + this.hasGeoProjection = this.hasCoordinates = false; + this.maxLatitude = 90; + this.options = a3; + const { name: h, projectedBounds: f, rotation: c } = a3; + this.rotator = c ? this.getRotator(c) : void 0; + const e = h ? t.registry[h] : void 0; + e && (this.def = new e(a3)); + const { def: b, rotator: d } = this; + b && (this.maxLatitude = b.maxLatitude || 90, this.hasGeoProjection = true); + d && b ? (this.forward = (a4) => b.forward(d.forward(a4)), this.inverse = (a4) => d.inverse(b.inverse(a4))) : b ? (this.forward = (a4) => b.forward(a4), this.inverse = (a4) => b.inverse(a4)) : d && (this.forward = d.forward, this.inverse = d.inverse); + this.bounds = f === "world" ? b && b.bounds : f; + } + lineIntersectsBounds(a3) { + const { x1: h, x2: f, y1: c, y2: e } = this.bounds || {}, b = (a4, b2, d2) => { + const [c2, e2] = a4; + a4 = b2 ? 0 : 1; + if (typeof d2 === "number" && c2[b2] >= d2 !== e2[b2] >= d2) + return a4 = c2[a4] + (d2 - c2[b2]) / (e2[b2] - c2[b2]) * (e2[a4] - c2[a4]), b2 ? [a4, d2] : [d2, a4]; + }; + let d, g2 = a3[0]; + if (d = b(a3, 0, h)) + g2 = d, a3[1] = d; + else if (d = b(a3, 0, f)) + g2 = d, a3[1] = d; + if (d = b(a3, 1, c)) + g2 = d; + else if (d = b(a3, 1, e)) + g2 = d; + return g2; + } + getRotator(a3) { + const h = a3[0] * w, f = (a3[1] || 0) * w; + a3 = (a3[2] || 0) * w; + const c = Math.cos(f), e = Math.sin(f), b = Math.cos(a3), d = Math.sin(a3); + if (h !== 0 || f !== 0 || a3 !== 0) + return { forward: (a4) => { + var f2 = a4[0] * w + h, g2 = a4[1] * w, m = Math.cos(g2); + a4 = Math.cos(f2) * m; + f2 = Math.sin(f2) * m; + g2 = Math.sin(g2); + m = g2 * c + a4 * e; + return [Math.atan2(f2 * b - m * d, a4 * c - g2 * e) / w, Math.asin(m * b + f2 * d) / w]; + }, inverse: (a4) => { + var f2 = a4[0] * w, g2 = a4[1] * w, m = Math.cos(g2); + a4 = Math.cos(f2) * m; + f2 = Math.sin(f2) * m; + g2 = Math.sin(g2); + m = g2 * b - f2 * d; + return [(Math.atan2(f2 * b + g2 * d, a4 * c + m * e) - h) / w, Math.asin(m * c - a4 * e) / w]; + } }; + } + forward(a3) { + return a3; + } + inverse(a3) { + return a3; + } + cutOnAntimeridian(a3, g2) { + const f = [], c = [a3]; + a3.forEach((b2, d2) => { + let c2 = a3[d2 - 1]; + if (!d2) { + if (!g2) + return; + c2 = a3[a3.length - 1]; + } + const e2 = c2[0]; + var u = b2[0]; + (-90 > e2 || 90 < e2) && (-90 > u || 90 < u) && 0 < e2 !== 0 < u && (u = l2((180 - (e2 + 360) % 360) / ((u + 360) % 360 - (e2 + 360) % 360), 0, 1), f.push({ i: d2, lat: c2[1] + u * (b2[1] - c2[1]), direction: 0 > e2 ? 1 : -1, previousLonLat: c2, lonLat: b2 })); + }); + if (f.length) + if (g2) { + if (f.length % 2 === 1) { + var e = f.slice().sort((a4, b2) => Math.abs(b2.lat) - Math.abs(a4.lat))[0]; + A(f, e); + } + for (var b = f.length - 2; 0 <= b; ) { + var d = f[b].i, h = x(180 + 1e-6 * f[b].direction), p = x(180 - 1e-6 * f[b].direction); + d = a3.splice(d, f[b + 1].i - d, ...t.greatCircle([h, f[b].lat], [h, f[b + 1].lat], true)); + d.push(...t.greatCircle([p, f[b + 1].lat], [p, f[b].lat], true)); + c.push(d); + b -= 2; + } + if (e) + for (d = 0; d < c.length; d++) { + const { direction: a4, lat: f2 } = e; + b = c[d]; + p = b.indexOf(e.lonLat); + if (-1 < p) { + d = (0 > f2 ? -1 : 1) * this.maxLatitude; + var k2 = x(180 + 1e-6 * a4); + h = x(180 - 1e-6 * a4); + const c2 = t.greatCircle([k2, f2], [k2, d], true); + for (k2 += 120 * a4; -180 < k2 && 180 > k2; k2 += 120 * a4) + c2.push([k2, d]); + c2.push(...t.greatCircle([ + h, + d + ], [h, e.lat], true)); + b.splice(p, 0, ...c2); + break; + } + } + } else + for (e = f.length; e--; ) + b = a3.splice(f[e].i, a3.length, [x(180 + 1e-6 * f[e].direction), f[e].lat]), b.unshift([x(180 - 1e-6 * f[e].direction), f[e].lat]), c.push(b); + return c; + } + path(a3) { + const { bounds: h, def: f, rotator: c } = this, e = [], b = a3.type === "Polygon" || a3.type === "MultiPolygon", d = this.hasGeoProjection, l3 = !f || f.antimeridianCutting !== false, p = l3 ? c : void 0, n4 = l3 ? f || this : this; + let m; + h && (m = [[h.x1, h.y1], [h.x2, h.y1], [h.x2, h.y2], [h.x1, h.y2]]); + const r = (a4) => { + a4 = a4.map((a5) => { + if (l3) { + p && (a5 = p.forward(a5)); + let b2 = a5[0]; + 1e-6 > Math.abs(b2 - 180) && (b2 = 180 > b2 ? 179.999999 : 180.000001); + a5 = [b2, a5[1]]; + } + return a5; + }); + let c2 = [a4]; + d && (t.insertGreatCircles(a4), l3 && (c2 = this.cutOnAntimeridian(a4, b))); + c2.forEach((a5) => { + if (!(2 > a5.length)) { + var c3 = false, u = false, f2 = (a6) => { + c3 ? e.push(["L", a6[0], a6[1]]) : (e.push(["M", a6[0], a6[1]]), c3 = true); + }, v = false, p2 = false, r2 = a5.map((a6) => { + a6 = n4.forward(a6); + a6.outside ? v = true : p2 = true; + a6[1] === Infinity ? a6[1] = 1e10 : a6[1] === -Infinity && (a6[1] = -1e10); + return a6; + }); + if (l3) { + b && r2.push(r2[0]); + if (v) { + if (!p2) + return; + if (m) { + if (b) + r2 = k(r2, m); + else if (h) { + g(r2, m).forEach((a6) => { + c3 = false; + a6.forEach(f2); + }); + return; + } + } + } + r2.forEach(f2); + } else + for (let e2 = 0; e2 < r2.length; e2++) { + const g2 = a5[e2], h3 = r2[e2]; + if (h3.outside) + u = true; + else { + if (b && !w2) { + var w2 = g2; + a5.push(g2); + r2.push(h3); + } + u && q2 && (b && d ? t.greatCircle(q2, g2).forEach((a6) => f2(n4.forward(a6))) : c3 = false); + f2(h3); + var q2 = g2; + u = false; + } + } + } + }); + }; + a3.type === "LineString" ? r(a3.coordinates) : a3.type === "MultiLineString" ? a3.coordinates.forEach((a4) => r(a4)) : a3.type === "Polygon" ? (a3.coordinates.forEach((a4) => r(a4)), e.length && e.push(["Z"])) : a3.type === "MultiPolygon" && (a3.coordinates.forEach((a4) => { + a4.forEach((a5) => r(a5)); + }), e.length && e.push(["Z"])); + return e; + } + } + t.registry = n3; + return t; + }); + y(a, "Maps/MapView.js", [a["Maps/MapViewOptionsDefault.js"], a["Maps/MapViewInsetsOptionsDefault.js"], a["Extensions/GeoJSON.js"], a["Core/Chart/MapChart.js"], a["Maps/MapUtilities.js"], a["Maps/Projection.js"], a["Core/Utilities.js"]], function(a2, n3, q, z, k, l2, A) { + const { topo2geo: g } = q, { maps: x } = z, { boundsFromPath: t, pointInPolygon: h } = k, { addEvent: F, clamp: f, fireEvent: c, isArray: e, isNumber: b, isObject: d, isString: E, merge: p, pick: C, relativeLength: m } = A, r = (a3, b2) => { + const { width: c2, height: d2 } = b2; + return Math.log(400.979322 / Math.max((a3.x2 - a3.x1) / (c2 / 256), (a3.y2 - a3.y1) / (d2 / 256))) / Math.log(2); + }; + class v { + static mergeInsets(a3, b2) { + const c2 = (a4) => { + const b3 = {}; + a4.forEach((a5, c3) => { + b3[a5 && a5.id || `i${c3}`] = a5; + }); + return b3; + }, d2 = p(c2(a3), c2(b2)); + return Object.keys(d2).map((a4) => d2[a4]); + } + createInsets() { + const a3 = this.options, b2 = a3.insets; + b2 && b2.forEach((b3) => { + b3 = new G(this, p(a3.insetOptions, b3)); + this.insets.push(b3); + }); + } + constructor(d2, e2) { + this.allowTransformAnimation = true; + this.insets = []; + this.padding = [0, 0, 0, 0]; + this.eventsToUnbind = []; + let u, f2; + if (!(this instanceof G)) { + var g2 = [ + d2.options.chart.map, + ...(d2.options.series || []).map((a4) => a4.mapData) + ].map((a4) => this.getGeoMap(a4)); + const a3 = []; + g2.forEach((b3) => { + if (b3 && (u || (u = b3["hc-recommended-mapview"]), b3.bbox)) { + const [c2, d3, e3, u2] = b3.bbox; + a3.push({ x1: c2, y1: d3, x2: e3, y2: u2 }); + } + }); + const b2 = a3.length && v.compositeBounds(a3); + c(d2, "beforeMapViewInit", { geoBounds: b2 }, function() { + if (b2) { + const { x1: a4, y1: c2, x2: d3, y2: e3 } = b2; + f2 = 180 < d3 - a4 && 90 < e3 - c2 ? { name: "EqualEarth" } : { name: "LambertConformalConic", parallels: [c2, e3], rotation: [-(a4 + d3) / 2] }; + } + }); + this.geoMap = g2[0]; + } + this.userOptions = e2 || {}; + d2.options.mapView && d2.options.mapView.recommendedMapView && (u = d2.options.mapView.recommendedMapView); + g2 = p(a2, { projection: f2 }, u, e2); + const h3 = u && u.insets; + e2 = e2 && e2.insets; + h3 && e2 && (g2.insets = v.mergeInsets(h3, e2)); + this.chart = d2; + this.center = g2.center; + this.options = g2; + this.projection = new l2(g2.projection); + this.playingField = d2.plotBox; + this.zoom = g2.zoom || 0; + this.minZoom = g2.minZoom; + this.createInsets(); + this.eventsToUnbind.push(F(d2, "afterSetChartSize", () => { + this.playingField = this.getField(); + if (this.minZoom === void 0 || this.minZoom === this.zoom) + this.fitToBounds(void 0, void 0, false), !this.chart.hasRendered && b(this.userOptions.zoom) && (this.zoom = this.userOptions.zoom), this.userOptions.center && p(true, this.center, this.userOptions.center); + })); + this.setUpEvents(); + } + fitToBounds(a3, b2, c2 = true, d2) { + const u = a3 || this.getProjectedBounds(); + if (u) { + var f2 = C(b2, a3 ? 0 : this.options.padding); + b2 = this.getField(false); + f2 = e(f2) ? f2 : [f2, f2, f2, f2]; + this.padding = [m(f2[0], b2.height), m(f2[1], b2.width), m(f2[2], b2.height), m(f2[3], b2.width)]; + this.playingField = this.getField(); + b2 = r(u, this.playingField); + a3 || (this.minZoom = b2); + a3 = this.projection.inverse([(u.x2 + u.x1) / 2, (u.y2 + u.y1) / 2]); + this.setView(a3, b2, c2, d2); + } + } + getField(a3 = true) { + a3 = a3 ? this.padding : [0, 0, 0, 0]; + return { x: a3[3], y: a3[0], width: this.chart.plotWidth - a3[1] - a3[3], height: this.chart.plotHeight - a3[0] - a3[2] }; + } + getGeoMap(a3) { + if (E(a3)) + return x[a3] && x[a3].type === "Topology" ? g(x[a3]) : x[a3]; + if (d(a3, true)) { + if (a3.type === "FeatureCollection") + return a3; + if (a3.type === "Topology") + return g(a3); + } + } + getMapBBox() { + const a3 = this.getProjectedBounds(), b2 = this.getScale(); + if (a3) { + const c2 = this.padding, d2 = this.projectedUnitsToPixels({ x: a3.x1, y: a3.y2 }); + return { + width: (a3.x2 - a3.x1) * b2 + c2[1] + c2[3], + height: (a3.y2 - a3.y1) * b2 + c2[0] + c2[2], + x: d2.x - c2[3], + y: d2.y - c2[0] + }; + } + } + getProjectedBounds() { + const a3 = this.projection; + var b2 = this.chart.series.reduce((a4, b3) => { + const c3 = b3.getProjectedBounds && b3.getProjectedBounds(); + c3 && b3.options.affectsMapView !== false && a4.push(c3); + return a4; + }, []), c2 = this.options.fitToGeometry; + return c2 ? (this.fitToGeometryCache || (c2.type === "MultiPoint" ? (c2 = c2.coordinates.map((b3) => a3.forward(b3)), b2 = c2.map((a4) => a4[0]), c2 = c2.map((a4) => a4[1]), this.fitToGeometryCache = { + x1: Math.min.apply(0, b2), + x2: Math.max.apply(0, b2), + y1: Math.min.apply(0, c2), + y2: Math.max.apply(0, c2) + }) : this.fitToGeometryCache = t(a3.path(c2))), this.fitToGeometryCache) : this.projection.bounds || v.compositeBounds(b2); + } + getScale() { + return 256 / 400.979322 * Math.pow(2, this.zoom); + } + getSVGTransform() { + const { x: a3, y: b2, width: c2, height: d2 } = this.playingField, e2 = this.projection.forward(this.center); + var f2 = this.projection.hasCoordinates ? -1 : 1; + const g2 = this.getScale(); + f2 *= g2; + return { scaleX: g2, scaleY: f2, translateX: a3 + c2 / 2 - e2[0] * g2, translateY: b2 + d2 / 2 - e2[1] * f2 }; + } + lonLatToPixels(a3) { + if (a3 = this.lonLatToProjectedUnits(a3)) + return this.projectedUnitsToPixels(a3); + } + lonLatToProjectedUnits(a3) { + const b2 = this.chart, c2 = b2.mapTransforms; + if (c2) { + for (const e2 in c2) + if (Object.hasOwnProperty.call(c2, e2) && c2[e2].hitZone) { + var d2 = b2.transformFromLatLon(a3, c2[e2]); + if (d2 && h(d2, c2[e2].hitZone.coordinates[0])) + return d2; + } + return b2.transformFromLatLon(a3, c2["default"]); + } + for (d2 of this.insets) + if (d2.options.geoBounds && h({ x: a3.lon, y: a3.lat }, d2.options.geoBounds.coordinates[0])) + return a3 = d2.projection.forward([a3.lon, a3.lat]), a3 = d2.projectedUnitsToPixels({ x: a3[0], y: a3[1] }), this.pixelsToProjectedUnits(a3); + a3 = this.projection.forward([a3.lon, a3.lat]); + if (!a3.outside) + return { + x: a3[0], + y: a3[1] + }; + } + projectedUnitsToLonLat(a3) { + var b2 = this.chart; + const c2 = b2.mapTransforms; + if (c2) { + for (const d3 in c2) + if (Object.hasOwnProperty.call(c2, d3) && c2[d3].hitZone && h(a3, c2[d3].hitZone.coordinates[0])) + return b2.transformToLatLon(a3, c2[d3]); + return b2.transformToLatLon(a3, c2["default"]); + } + b2 = this.projectedUnitsToPixels(a3); + for (var d2 of this.insets) + if (d2.hitZone && h(b2, d2.hitZone.coordinates[0])) + return a3 = d2.pixelsToProjectedUnits(b2), d2 = d2.projection.inverse([a3.x, a3.y]), { lon: d2[0], lat: d2[1] }; + d2 = this.projection.inverse([a3.x, a3.y]); + return { + lon: d2[0], + lat: d2[1] + }; + } + redraw(a3) { + this.chart.series.forEach((a4) => { + a4.useMapGeometry && (a4.isDirty = true); + }); + this.chart.redraw(a3); + } + setView(a3, d2, e2 = true, f2) { + a3 && (this.center = a3); + typeof d2 === "number" && (typeof this.minZoom === "number" && (d2 = Math.max(d2, this.minZoom)), typeof this.options.maxZoom === "number" && (d2 = Math.min(d2, this.options.maxZoom)), b(d2) && (this.zoom = d2)); + var g2 = this.getProjectedBounds(); + if (g2) { + a3 = this.projection.forward(this.center); + const { x: b2, y: c2, width: e3, height: f3 } = this.playingField; + d2 = this.getScale(); + var h3 = this.projectedUnitsToPixels({ + x: g2.x1, + y: g2.y1 + }), u = this.projectedUnitsToPixels({ x: g2.x2, y: g2.y2 }); + g2 = [(g2.x1 + g2.x2) / 2, (g2.y1 + g2.y2) / 2]; + if (!this.chart.series.some((a4) => a4.isDrilling)) { + const m2 = h3.x, r2 = u.y; + u = u.x; + h3 = h3.y; + u - m2 < e3 ? a3[0] = g2[0] : m2 < b2 && u < b2 + e3 ? a3[0] += Math.max(m2 - b2, u - e3 - b2) / d2 : u > b2 + e3 && m2 > b2 && (a3[0] += Math.min(u - e3 - b2, m2 - b2) / d2); + h3 - r2 < f3 ? a3[1] = g2[1] : r2 < c2 && h3 < c2 + f3 ? a3[1] -= Math.max(r2 - c2, h3 - f3 - c2) / d2 : h3 > c2 + f3 && r2 > c2 && (a3[1] -= Math.min(h3 - f3 - c2, r2 - c2) / d2); + this.center = this.projection.inverse(a3); + } + this.insets.forEach((a4) => { + a4.options.field && (a4.hitZone = a4.getHitZone(), a4.playingField = a4.getField()); + }); + this.render(); + } + c(this, "afterSetView"); + e2 && this.redraw(f2); + } + projectedUnitsToPixels(a3) { + const b2 = this.getScale(), c2 = this.projection.forward(this.center), d2 = this.playingField; + return { x: d2.x + d2.width / 2 - b2 * (c2[0] - a3.x), y: d2.y + d2.height / 2 + b2 * (c2[1] - a3.y) }; + } + pixelsToLonLat(a3) { + return this.projectedUnitsToLonLat(this.pixelsToProjectedUnits(a3)); + } + pixelsToProjectedUnits(a3) { + const { x: b2, y: c2 } = a3; + a3 = this.getScale(); + const d2 = this.projection.forward(this.center), e2 = this.playingField; + return { x: d2[0] + (b2 - (e2.x + e2.width / 2)) / a3, y: d2[1] - (c2 - (e2.y + e2.height / 2)) / a3 }; + } + setUpEvents() { + const { chart: a3 } = this; + let c2, d2, e2; + const g2 = (g3) => { + var h3 = a3.pointer.pinchDown, m2 = this.projection; + let { mouseDownX: u, mouseDownY: p2 } = a3; + h3.length === 1 && (u = h3[0].chartX, p2 = h3[0].chartY); + if (typeof u === "number" && typeof p2 === "number") { + h3 = `${u},${p2}`; + const { chartX: v2, chartY: k2 } = g3.originalEvent; + h3 !== d2 && (d2 = h3, c2 = this.projection.forward(this.center), e2 = (this.projection.options.rotation || [0, 0]).slice()); + h3 = (h3 = m2.def && m2.def.bounds) && r(h3, this.playingField) || -Infinity; + if (m2.options.name === "Orthographic" && (this.minZoom || Infinity) < 1.3 * h3) { + if (h3 = 440 / (this.getScale() * Math.min(a3.plotWidth, a3.plotHeight)), e2) { + m2 = (u - v2) * h3 - e2[0]; + h3 = f(-e2[1] - (p2 - k2) * h3, -80, 80); + const b2 = this.zoom; + this.update({ projection: { rotation: [-m2, -h3] } }, false); + this.fitToBounds(void 0, void 0, false); + this.zoom = b2; + a3.redraw(false); + } + } else + b(v2) && b(k2) && (m2 = this.getScale(), m2 = this.projection.inverse([c2[0] + (u - v2) / m2, c2[1] - (p2 - k2) / m2 * (this.projection.hasCoordinates ? 1 : -1)]), this.setView(m2, void 0, true, false)); + g3.preventDefault(); + } + }; + F(a3, "pan", g2); + F(a3, "touchpan", g2); + F(a3, "selection", (b2) => { + if (b2.resetSelection) + this.zoomBy(); + else { + const c3 = b2.x - a3.plotLeft, d3 = b2.y - a3.plotTop, { y: e3, x: f2 } = this.pixelsToProjectedUnits({ x: c3, y: d3 }), { y: g3, x: h3 } = this.pixelsToProjectedUnits({ x: c3 + b2.width, y: d3 + b2.height }); + this.fitToBounds({ x1: f2, y1: e3, x2: h3, y2: g3 }, void 0, true, b2.originalEvent.touches ? false : void 0); + /^touch/.test(b2.originalEvent.type) || a3.showResetZoom(); + b2.preventDefault(); + } + }); + } + render() { + this.group || (this.group = this.chart.renderer.g("map-view").attr({ zIndex: 4 }).add()); + } + update(a3, c2 = true, d2) { + var e2 = a3.projection; + e2 = e2 && l2.toString(e2) !== l2.toString(this.options.projection); + let f2 = false; + p(true, this.userOptions, a3); + p(true, this.options, a3); + "insets" in a3 && (this.insets.forEach((a4) => a4.destroy()), this.insets.length = 0, f2 = true); + (e2 || "fitToGeometry" in a3) && delete this.fitToGeometryCache; + if (e2 || f2) + this.chart.series.forEach((a4) => { + const b2 = a4.transformGroups; + a4.clearBounds && a4.clearBounds(); + a4.isDirty = true; + a4.isDirtyData = true; + if (f2 && b2) + for (; 1 < b2.length; ) + (a4 = b2.pop()) && a4.destroy(); + }), e2 && (this.projection = new l2(this.options.projection)), f2 && this.createInsets(), a3.center || !Object.hasOwnProperty.call(a3, "zoom") || b(a3.zoom) || this.fitToBounds(void 0, void 0, false); + a3.center || b(a3.zoom) ? this.setView(this.options.center, a3.zoom, false) : "fitToGeometry" in a3 && this.fitToBounds(void 0, void 0, false); + c2 && this.chart.redraw(d2); + } + zoomBy(a3, b2, c2, d2) { + var e2 = this.chart; + const f2 = this.projection.forward(this.center); + let [g2, h3] = b2 ? this.projection.forward(b2) : []; + if (typeof a3 === "number") { + a3 = this.zoom + a3; + if (c2) { + const [a4, d3] = c2; + c2 = this.getScale(); + b2 = d3 - e2.plotTop - e2.plotHeight / 2; + g2 = f2[0] + (a4 - e2.plotLeft - e2.plotWidth / 2) / c2; + h3 = f2[1] + b2 / c2; + } + if (typeof g2 === "number" && typeof h3 === "number") { + e2 = 1 - Math.pow(2, this.zoom) / Math.pow(2, a3); + var m2 = f2[1] - h3; + f2[0] -= (f2[0] - g2) * e2; + f2[1] += m2 * e2; + m2 = this.projection.inverse(f2); + } + this.setView(m2, a3, void 0, d2); + } else + this.fitToBounds(void 0, void 0, void 0, d2); + } + } + v.compositeBounds = (a3) => { + if (a3.length) + return a3.slice(1).reduce((a4, b2) => { + a4.x1 = Math.min(a4.x1, b2.x1); + a4.y1 = Math.min(a4.y1, b2.y1); + a4.x2 = Math.max(a4.x2, b2.x2); + a4.y2 = Math.max(a4.y2, b2.y2); + return a4; + }, p(a3[0])); + }; + class G extends v { + constructor(a3, b2) { + super(a3.chart, b2); + this.id = b2.id; + this.mapView = a3; + this.options = p(n3, b2); + this.allBounds = []; + this.options.geoBounds && (a3 = a3.projection.path(this.options.geoBounds), this.geoBoundsProjectedBox = t(a3), this.geoBoundsProjectedPolygon = a3.map((a4) => [a4[1] || 0, a4[2] || 0])); + } + getField(a3 = true) { + var c2 = this.hitZone; + if (c2) { + var d2 = a3 ? this.padding : [0, 0, 0, 0]; + c2 = c2.coordinates[0]; + var e2 = c2.map((a4) => a4[0]); + const f2 = c2.map((a4) => a4[1]); + c2 = Math.min.apply(0, e2) + d2[3]; + e2 = Math.max.apply(0, e2) - d2[1]; + const g2 = Math.min.apply(0, f2) + d2[0]; + d2 = Math.max.apply(0, f2) - d2[2]; + if (b(c2) && b(g2)) + return { x: c2, y: g2, width: e2 - c2, height: d2 - g2 }; + } + return super.getField.call(this, a3); + } + getHitZone() { + const { chart: a3, mapView: b2, options: c2 } = this; + var { coordinates: d2 } = c2.field || {}; + if (d2) { + d2 = d2[0]; + if (c2.units === "percent") { + const e2 = c2.relativeTo === "mapBoundingBox" && b2.getMapBBox() || p(a3.plotBox, { x: 0, y: 0 }); + d2 = d2.map((a4) => [m(`${a4[0]}%`, e2.width, e2.x), m(`${a4[1]}%`, e2.height, e2.y)]); + } + return { type: "Polygon", coordinates: [d2] }; + } + } + getProjectedBounds() { + return v.compositeBounds(this.allBounds); + } + isInside(a3) { + const { geoBoundsProjectedBox: b2, geoBoundsProjectedPolygon: c2 } = this; + return !!(b2 && a3.x >= b2.x1 && a3.x <= b2.x2 && a3.y >= b2.y1 && a3.y <= b2.y2 && c2 && h(a3, c2)); + } + render() { + const { chart: a3, mapView: b2, options: c2 } = this; + var d2 = c2.borderPath || c2.field; + if (d2 && b2.group) { + let e2 = true; + this.border || (this.border = a3.renderer.path().addClass("highcharts-mapview-inset-border").add(b2.group), e2 = false); + a3.styledMode || this.border.attr({ stroke: c2.borderColor, "stroke-width": c2.borderWidth }); + const f2 = Math.round(this.border.strokeWidth()) % 2 / 2, g2 = c2.relativeTo === "mapBoundingBox" && b2.getMapBBox() || b2.playingField; + d2 = (d2.coordinates || []).reduce((b3, d3) => d3.reduce((b4, d4, e3) => { + let [h3, r2] = d4; + c2.units === "percent" && (h3 = a3.plotLeft + m(`${h3}%`, g2.width, g2.x), r2 = a3.plotTop + m(`${r2}%`, g2.height, g2.y)); + h3 = Math.floor(h3) + f2; + r2 = Math.floor(r2) + f2; + b4.push(e3 === 0 ? ["M", h3, r2] : ["L", h3, r2]); + return b4; + }, b3), []); + this.border[e2 ? "animate" : "attr"]({ d: d2 }); + } + } + destroy() { + this.border && (this.border = this.border.destroy()); + this.eventsToUnbind.forEach((a3) => a3()); + } + setUpEvents() { + } + } + F(z, "afterInit", function() { + this.mapView = new v(this, this.options.mapView); + }); + return v; + }); + y(a, "Series/Map/MapSeries.js", [ + a["Core/Animation/AnimationUtilities.js"], + a["Series/ColorMapComposition.js"], + a["Series/CenteredUtilities.js"], + a["Core/Globals.js"], + a["Core/Chart/MapChart.js"], + a["Series/Map/MapPoint.js"], + a["Maps/MapView.js"], + a["Core/Series/Series.js"], + a["Core/Series/SeriesRegistry.js"], + a["Core/Renderer/SVG/SVGRenderer.js"], + a["Core/Utilities.js"] + ], function(a2, n3, q, z, k, l2, A, w, x, t, h) { + const { animObject: g, stop: f } = a2; + ({ noop: a2 } = z); + const { splitPath: c } = k, { seriesTypes: { column: e, scatter: b } } = x, { extend: d, find: E, fireEvent: p, getNestedProperty: C, isArray: m, defined: r, isNumber: v, isObject: G, merge: u, objectEach: B, pick: D, splat: H } = h; + class y2 extends b { + constructor() { + super(...arguments); + this.points = this.options = this.joinBy = this.group = this.data = this.chart = void 0; + this.processedData = []; + } + animate(a3) { + const { chart: b2, group: c2 } = this, d2 = g(this.options.animation); + a3 ? c2.attr({ translateX: b2.plotLeft + b2.plotWidth / 2, translateY: b2.plotTop + b2.plotHeight / 2, scaleX: 1e-3, scaleY: 1e-3 }) : c2.animate({ translateX: b2.plotLeft, translateY: b2.plotTop, scaleX: 1, scaleY: 1 }, d2); + } + clearBounds() { + this.points.forEach((a3) => { + delete a3.bounds; + delete a3.insetIndex; + delete a3.projectedPath; + }); + delete this.bounds; + } + doFullTranslate() { + return !(!this.isDirtyData && !this.chart.isResizing && this.hasRendered); + } + drawMapDataLabels() { + w.prototype.drawDataLabels.call(this); + this.dataLabelsGroup && this.dataLabelsGroup.clip(this.chart.clipRect); + } + drawPoints() { + const a3 = this, { chart: b2, group: c2, transformGroups: d2 = [] } = this, { mapView: h3, renderer: m2 } = b2; + h3 && (this.transformGroups = d2, d2[0] || (d2[0] = m2.g().add(c2)), h3.insets.forEach((a4, b3) => { + d2[b3 + 1] || d2.push(m2.g().add(c2)); + }), this.doFullTranslate() && (this.points.forEach((a4) => { + const { graphic: c3, shapeArgs: e2 } = a4; + a4.group = d2[typeof a4.insetIndex === "number" ? a4.insetIndex + 1 : 0]; + c3 && c3.parentGroup !== a4.group && c3.add(a4.group); + e2 && b2.hasRendered && !b2.styledMode && (e2.fill = this.pointAttribs(a4, a4.state).fill); + }), e.prototype.drawPoints.apply(this), this.points.forEach((c3) => { + const d3 = c3.graphic; + if (d3) { + const e2 = d3.animate; + let f2 = ""; + c3.name && (f2 += "highcharts-name-" + c3.name.replace(/ /g, "-").toLowerCase()); + c3.properties && c3.properties["hc-key"] && (f2 += " highcharts-key-" + c3.properties["hc-key"].toString().toLowerCase()); + f2 && d3.addClass(f2); + b2.styledMode && d3.css(this.pointAttribs(c3, c3.selected && "select" || void 0)); + d3.animate = function(c4, f3, g2) { + const h4 = v(c4["stroke-width"]) && !v(d3["stroke-width"]), m3 = v(d3["stroke-width"]) && !v(c4["stroke-width"]); + if (h4 || m3) { + const e3 = D(a3.getStrokeWidth(a3.options), 1) / (b2.mapView && b2.mapView.getScale() || 1); + h4 && (d3["stroke-width"] = e3); + m3 && (c4["stroke-width"] = e3); + } + return e2.call(d3, c4, f3, m3 ? function() { + d3.element.removeAttribute("stroke-width"); + delete d3["stroke-width"]; + g2 && g2.apply(this, arguments); + } : g2); + }; + } + })), d2.forEach((c3, d3) => { + const e2 = (d3 === 0 ? h3 : h3.insets[d3 - 1]).getSVGTransform(), r2 = D(this.getStrokeWidth(this.options), 1), p2 = e2.scaleX, v2 = 0 < e2.scaleY ? 1 : -1, k2 = (b3) => { + (a3.points || []).forEach((a4) => { + const c4 = a4.graphic; + let d4; + c4 && c4["stroke-width"] && (d4 = this.getStrokeWidth(a4.options)) && c4.attr({ "stroke-width": d4 / b3 }); + }); + }; + if (m2.globalAnimation && b2.hasRendered && h3.allowTransformAnimation) { + const a4 = Number(c3.attr("translateX")), b3 = Number(c3.attr("translateY")), f2 = Number(c3.attr("scaleX")), h4 = (d4, g2) => { + d4 = f2 + (p2 - f2) * g2.pos; + c3.attr({ translateX: a4 + (e2.translateX - a4) * g2.pos, translateY: b3 + (e2.translateY - b3) * g2.pos, scaleX: d4, scaleY: d4 * v2, "stroke-width": r2 / d4 }); + k2(d4); + }; + d3 = u(g(m2.globalAnimation)); + const l3 = d3.step; + d3.step = function(a5) { + l3 && l3.apply(this, arguments); + h4.apply(this, arguments); + }; + c3.attr({ animator: 0 }).animate({ animator: 1 }, d3, function() { + typeof m2.globalAnimation !== "boolean" && m2.globalAnimation.complete && m2.globalAnimation.complete({ applyDrilldown: true }); + }); + } else + f(c3), c3.attr(u(e2, { "stroke-width": r2 / p2 })), k2(p2); + }), this.isDrilling || this.drawMapDataLabels()); + } + getProjectedBounds() { + if (!this.bounds && this.chart.mapView) { + const { insets: a3, projection: b2 } = this.chart.mapView, d2 = []; + (this.points || []).forEach(function(e2) { + if (e2.path || e2.geometry) { + typeof e2.path === "string" ? e2.path = c(e2.path) : m(e2.path) && e2.path[0] === "M" && (e2.path = t.prototype.pathToSegments(e2.path)); + if (!e2.bounds) { + let c2 = e2.getProjectedBounds(b2); + if (c2) { + e2.labelrank = D(e2.labelrank, (c2.x2 - c2.x1) * (c2.y2 - c2.y1)); + const { midX: b3, midY: d3 } = c2; + if (a3 && v(b3) && v(d3)) { + const f2 = E(a3, (a4) => a4.isInside({ x: b3, y: d3 })); + f2 && (delete e2.projectedPath, (c2 = e2.getProjectedBounds(f2.projection)) && f2.allBounds.push(c2), e2.insetIndex = a3.indexOf(f2)); + } + e2.bounds = c2; + } + } + e2.bounds && e2.insetIndex === void 0 && d2.push(e2.bounds); + } + }); + this.bounds = A.compositeBounds(d2); + } + return this.bounds; + } + getStrokeWidth(a3) { + const b2 = this.pointAttrToOptions; + return a3[b2 && b2["stroke-width"] || "borderWidth"]; + } + hasData() { + return !!this.processedXData.length; + } + pointAttribs(a3, b2) { + var c2; + const { mapView: d2, styledMode: f2 } = a3.series.chart, g2 = f2 ? this.colorAttribs(a3) : e.prototype.pointAttribs.call(this, a3, b2); + let h3 = this.getStrokeWidth(a3.options); + if (b2) { + b2 = u(this.options.states[b2], a3.options.states && a3.options.states[b2] || {}); + const d3 = this.getStrokeWidth(b2); + r(d3) && (h3 = d3); + g2.stroke = (c2 = b2.borderColor) !== null && c2 !== void 0 ? c2 : a3.color; + } + h3 && d2 && (h3 /= d2.getScale()); + c2 = this.getStrokeWidth(this.options); + g2.dashstyle && d2 && v(c2) && (h3 = c2 / d2.getScale()); + a3.visible || (g2.fill = this.options.nullColor); + r(h3) ? g2["stroke-width"] = h3 : delete g2["stroke-width"]; + g2["stroke-linecap"] = g2["stroke-linejoin"] = this.options.linecap; + return g2; + } + updateData() { + return this.processedData ? false : super.updateData.apply(this, arguments); + } + setData(a3, b2 = true, c2, d2) { + delete this.bounds; + super.setData.call(this, a3, false, void 0, d2); + this.processData(); + this.generatePoints(); + b2 && this.chart.redraw(c2); + } + processData() { + const a3 = this.options, b2 = a3.data; + var c2 = this.chart.options.chart; + const d2 = this.joinBy, e2 = a3.keys || this.pointArrayMap, f2 = [], g2 = {}; + var h3 = this.chart.mapView; + h3 = h3 && (G(a3.mapData, true) ? h3.getGeoMap(a3.mapData) : h3.geoMap); + var r2 = this.chart.mapTransforms; + (this.chart.mapTransforms = r2 = c2.mapTransforms || h3 && h3["hc-transform"] || r2) && B(r2, function(a4) { + a4.rotation && (a4.cosAngle = Math.cos(a4.rotation), a4.sinAngle = Math.sin(a4.rotation)); + }); + let p2; + m(a3.mapData) ? p2 = a3.mapData : h3 && h3.type === "FeatureCollection" && (this.mapTitle = h3.title, p2 = z.geojson(h3, this.type, this)); + const k2 = this.processedData = []; + b2 && b2.forEach(function(c3, f3) { + let h4 = 0; + if (v(c3)) + k2[f3] = { value: c3 }; + else if (m(c3)) { + k2[f3] = {}; + !a3.keys && c3.length > e2.length && typeof c3[0] === "string" && (k2[f3]["hc-key"] = c3[0], ++h4); + for (let a4 = 0; a4 < e2.length; ++a4, ++h4) + e2[a4] && typeof c3[h4] !== "undefined" && (0 < e2[a4].indexOf(".") ? l2.prototype.setNestedProperty(k2[f3], c3[h4], e2[a4]) : k2[f3][e2[a4]] = c3[h4]); + } else + k2[f3] = b2[f3]; + d2 && d2[0] === "_i" && (k2[f3]._i = f3); + }); + if (p2) { + this.mapData = p2; + this.mapMap = {}; + for (r2 = 0; r2 < p2.length; r2++) + c2 = p2[r2], h3 = c2.properties, c2._i = r2, d2[0] && h3 && h3[d2[0]] && (c2[d2[0]] = h3[d2[0]]), g2[c2[d2[0]]] = c2; + this.mapMap = g2; + if (d2[1]) { + const a4 = d2[1]; + k2.forEach(function(b3) { + b3 = C(a4, b3); + g2[b3] && f2.push(g2[b3]); + }); + } + if (a3.allAreas) { + if (d2[1]) { + const a5 = d2[1]; + k2.forEach(function(b3) { + f2.push(C(a5, b3)); + }); + } + const a4 = "|" + f2.map(function(a5) { + return a5 && a5[d2[0]]; + }).join("|") + "|"; + p2.forEach(function(b3) { + d2[0] && a4.indexOf("|" + b3[d2[0]] + "|") !== -1 || k2.push(u(b3, { value: null })); + }); + } + } + this.processedXData = Array(k2.length); + } + setOptions(a3) { + a3 = w.prototype.setOptions.call(this, a3); + let b2 = a3.joinBy; + b2 === null && (b2 = "_i"); + b2 = this.joinBy = H(b2); + b2[1] || (b2[1] = b2[0]); + return a3; + } + translate() { + const a3 = this.doFullTranslate(), b2 = this.chart.mapView, c2 = b2 && b2.projection; + !this.chart.hasRendered || !this.isDirtyData && this.hasRendered || (this.processData(), this.generatePoints(), delete this.bounds, !b2 || b2.userOptions.center || v(b2.userOptions.zoom) || b2.zoom !== b2.minZoom ? this.getProjectedBounds() : b2.fitToBounds(void 0, void 0, false)); + if (b2) { + const d2 = b2.getSVGTransform(); + this.points.forEach(function(e2) { + const f2 = v(e2.insetIndex) && b2.insets[e2.insetIndex].getSVGTransform() || d2; + f2 && e2.bounds && v(e2.bounds.midX) && v(e2.bounds.midY) && (e2.plotX = e2.bounds.midX * f2.scaleX + f2.translateX, e2.plotY = e2.bounds.midY * f2.scaleY + f2.translateY); + a3 && (e2.shapeType = "path", e2.shapeArgs = { d: l2.getProjectedPath(e2, c2) }); + e2.projectedPath && !e2.projectedPath.length ? e2.setVisible(false) : e2.setVisible(true); + }); + } + p(this, "afterTranslate"); + } + } + y2.defaultOptions = u(b.defaultOptions, { + affectsMapView: true, + animation: false, + dataLabels: { crop: false, formatter: function() { + const { numberFormatter: a3 } = this.series.chart, { value: b2 } = this.point; + return v(b2) ? a3(b2, -1) : ""; + }, inside: true, overflow: false, padding: 0, verticalAlign: "middle" }, + linecap: "round", + marker: null, + nullColor: "#f7f7f7", + stickyTracking: false, + tooltip: { followPointer: true, pointFormat: "{point.name}: {point.value}
" }, + turboThreshold: 0, + allAreas: true, + borderColor: "#e6e6e6", + borderWidth: 1, + joinBy: "hc-key", + states: { hover: { halo: void 0, borderColor: "#666666", borderWidth: 2 }, normal: { animation: true }, select: { color: "#cccccc" } }, + legendSymbol: "rectangle" + }); + d(y2.prototype, { + type: "map", + axisTypes: n3.seriesMembers.axisTypes, + colorAttribs: n3.seriesMembers.colorAttribs, + colorKey: n3.seriesMembers.colorKey, + directTouch: true, + drawDataLabels: a2, + drawGraph: a2, + forceDL: true, + getCenter: q.getCenter, + getExtremesFromAll: true, + getSymbol: a2, + isCartesian: false, + parallelArrays: n3.seriesMembers.parallelArrays, + pointArrayMap: n3.seriesMembers.pointArrayMap, + pointClass: l2, + preserveAspectRatio: true, + searchPoint: a2, + trackerGroups: n3.seriesMembers.trackerGroups, + useMapGeometry: true + }); + n3.compose(y2); + x.registerSeriesType("map", y2); + ""; + return y2; + }); + y(a, "Series/MapLine/MapLineSeries.js", [a["Series/Map/MapSeries.js"], a["Core/Series/SeriesRegistry.js"], a["Core/Utilities.js"]], function(a2, n3, q) { + const { extend: g, merge: k } = q; + class l2 extends a2 { + constructor() { + super(...arguments); + this.points = this.options = this.data = void 0; + } + pointAttribs(g2, k2) { + g2 = a2.prototype.pointAttribs.call(this, g2, k2); + g2.fill = this.options.fillColor; + return g2; + } + } + l2.defaultOptions = k(a2.defaultOptions, { lineWidth: 1, fillColor: "none", legendSymbol: "lineMarker" }); + g(l2.prototype, { type: "mapline", colorProp: "stroke", pointAttrToOptions: { stroke: "color", "stroke-width": "lineWidth" } }); + n3.registerSeriesType("mapline", l2); + ""; + return l2; + }); + y(a, "Series/MapPoint/MapPointPoint.js", [a["Core/Series/SeriesRegistry.js"], a["Core/Utilities.js"]], function(a2, n3) { + ({ seriesTypes: { scatter: a2 } } = a2); + const { isNumber: g } = n3; + class z extends a2.prototype.pointClass { + constructor() { + super(...arguments); + this.series = this.options = void 0; + } + isValid() { + return !!(this.options.geometry || g(this.x) && g(this.y) || g(this.options.lon) && g(this.options.lat)); + } + } + return z; + }); + y(a, "Series/MapPoint/MapPointSeries.js", [a["Core/Globals.js"], a["Series/MapPoint/MapPointPoint.js"], a["Core/Series/SeriesRegistry.js"], a["Core/Renderer/SVG/SVGRenderer.js"], a["Core/Utilities.js"]], function(a2, n3, q, z, k) { + ({ noop: a2 } = a2); + const { seriesTypes: { map: g, scatter: A } } = q, { extend: w, fireEvent: x, isNumber: t, merge: h } = k; + class y2 extends A { + constructor() { + super(...arguments); + this.points = this.options = this.data = this.chart = void 0; + this.clearBounds = g.prototype.clearBounds; + } + drawDataLabels() { + super.drawDataLabels(); + this.dataLabelsGroup && this.dataLabelsGroup.clip(this.chart.clipRect); + } + projectPoint(a3) { + const c = this.chart.mapView; + if (c) { + const { geometry: e, lon: b, lat: d } = a3; + a3 = e && e.type === "Point" && e.coordinates; + t(b) && t(d) && (a3 = [b, d]); + if (a3) + return c.lonLatToProjectedUnits({ + lon: a3[0], + lat: a3[1] + }); + } + } + translate() { + const a3 = this.chart.mapView; + this.processedXData || this.processData(); + this.generatePoints(); + this.getProjectedBounds && this.isDirtyData && (delete this.bounds, this.getProjectedBounds()); + if (a3) { + const c = a3.getSVGTransform(), { hasCoordinates: e } = a3.projection; + this.points.forEach((b) => { + let { x: d, y: f } = b; + var h3 = t(b.insetIndex) && a3.insets[b.insetIndex].getSVGTransform() || c; + const g2 = this.projectPoint(b.options) || b.properties && this.projectPoint(b.properties); + let m; + g2 ? (d = g2.x, f = g2.y) : b.bounds && (d = b.bounds.midX, f = b.bounds.midY, h3 && t(d) && t(f) && (b.plotX = d * h3.scaleX + h3.translateX, b.plotY = f * h3.scaleY + h3.translateY, m = true)); + t(d) && t(f) ? m || (h3 = a3.projectedUnitsToPixels({ x: d, y: f }), b.plotX = h3.x, b.plotY = e ? h3.y : this.chart.plotHeight - h3.y) : b.y = b.plotX = b.plotY = void 0; + b.isInside = this.isPointInside(b); + b.zone = this.zones.length ? b.getZone() : void 0; + }); + } + x(this, "afterTranslate"); + } + } + y2.defaultOptions = h(A.defaultOptions, { dataLabels: { crop: false, defer: false, enabled: true, formatter: function() { + return this.point.name; + }, overflow: false, style: { color: "#000000" } }, legendSymbol: "lineMarker" }); + z.prototype.symbols.mapmarker = (a3, c, e, b, d) => { + const f = d && d.context === "legend"; + f ? (a3 += e / 2, d = c + b) : d && typeof d.anchorX === "number" && typeof d.anchorY === "number" ? (a3 = d.anchorX, d = d.anchorY) : (a3 += e / 2, d = c + b / 2, c -= b); + b = f ? b / 3 : b / 2; + return [["M", a3, d], ["C", a3, d, a3 - b, c + 1.5 * b, a3 - b, c + b], ["A", b, b, 1, 1, 1, a3 + b, c + b], ["C", a3 + b, c + 1.5 * b, a3, d, a3, d], ["Z"]]; + }; + w(y2.prototype, { type: "mappoint", axisTypes: ["colorAxis"], forceDL: true, isCartesian: false, pointClass: n3, searchPoint: a2, useMapGeometry: true }); + q.registerSeriesType("mappoint", y2); + ""; + return y2; + }); + y(a, "Series/Bubble/BubbleLegendDefaults.js", [], function() { + return { borderColor: void 0, borderWidth: 2, className: void 0, color: void 0, connectorClassName: void 0, connectorColor: void 0, connectorDistance: 60, connectorWidth: 1, enabled: false, labels: { className: void 0, allowOverlap: false, format: "", formatter: void 0, align: "right", style: { fontSize: "0.9em", color: "#000000" }, x: 0, y: 0 }, maxSize: 60, minSize: 10, legendIndex: 0, ranges: { value: void 0, borderColor: void 0, color: void 0, connectorColor: void 0 }, sizeBy: "area", sizeByAbsoluteValue: false, zIndex: 1, zThreshold: 0 }; + }); + y(a, "Series/Bubble/BubbleLegendItem.js", [a["Core/Color/Color.js"], a["Core/Templating.js"], a["Core/Globals.js"], a["Core/Utilities.js"]], function(a2, n3, q, z) { + const { parse: g } = a2, { noop: l2 } = q, { arrayMax: A, arrayMin: w, isNumber: x, merge: t, pick: h, stableSort: y2 } = z; + class f { + constructor(a3, e) { + this.options = this.symbols = this.visible = this.selected = this.ranges = this.movementX = this.maxLabel = this.legend = this.chart = void 0; + this.setState = l2; + this.init(a3, e); + } + init(a3, e) { + this.options = a3; + this.visible = true; + this.chart = e.chart; + this.legend = e; + } + addToLegend(a3) { + a3.splice(this.options.legendIndex, 0, this); + } + drawLegendSymbol(a3) { + const c = h(a3.options.itemDistance, 20), b = this.legendItem || {}, d = this.options; + var f2 = d.ranges, g2 = d.connectorDistance; + if (f2 && f2.length && x(f2[0].value)) { + y2(f2, function(a4, b2) { + return b2.value - a4.value; + }); + this.ranges = f2; + this.setOptions(); + this.render(); + a3 = this.getMaxLabelSize(); + var k = this.ranges[0].radius; + f2 = 2 * k; + g2 = g2 - k + a3.width; + g2 = 0 < g2 ? g2 : 0; + this.maxLabel = a3; + this.movementX = d.labels.align === "left" ? g2 : 0; + b.labelWidth = f2 + g2 + c; + b.labelHeight = f2 + a3.height / 2; + } else + a3.options.bubbleLegend.autoRanges = true; + } + setOptions() { + const a3 = this.ranges, e = this.options, b = this.chart.series[e.seriesIndex], d = this.legend.baseline, f2 = { zIndex: e.zIndex, "stroke-width": e.borderWidth }, k = { zIndex: e.zIndex, "stroke-width": e.connectorWidth }, l3 = { align: this.legend.options.rtl || e.labels.align === "left" ? "right" : "left", zIndex: e.zIndex }, m = b.options.marker.fillOpacity, r = this.chart.styledMode; + a3.forEach(function(c, p) { + r || (f2.stroke = h(c.borderColor, e.borderColor, b.color), f2.fill = h(c.color, e.color, m !== 1 ? g(b.color).setOpacity(m).get("rgba") : b.color), k.stroke = h(c.connectorColor, e.connectorColor, b.color)); + a3[p].radius = this.getRangeRadius(c.value); + a3[p] = t(a3[p], { center: a3[0].radius - a3[p].radius + d }); + r || t(true, a3[p], { bubbleAttribs: t(f2), connectorAttribs: t(k), labelAttribs: l3 }); + }, this); + } + getRangeRadius(a3) { + const c = this.options; + return this.chart.series[this.options.seriesIndex].getRadius.call(this, c.ranges[c.ranges.length - 1].value, c.ranges[0].value, c.minSize, c.maxSize, a3); + } + render() { + const a3 = this.legendItem || {}, e = this.chart.renderer, b = this.options.zThreshold; + this.symbols || (this.symbols = { + connectors: [], + bubbleItems: [], + labels: [] + }); + a3.symbol = e.g("bubble-legend"); + a3.label = e.g("bubble-legend-item").css(this.legend.itemStyle || {}); + a3.symbol.translateX = 0; + a3.symbol.translateY = 0; + a3.symbol.add(a3.label); + a3.label.add(a3.group); + for (const a4 of this.ranges) + a4.value >= b && this.renderRange(a4); + this.hideOverlappingLabels(); + } + renderRange(a3) { + var c = this.options; + const b = c.labels; + var d = this.chart; + const f2 = d.series[c.seriesIndex], h3 = d.renderer, g2 = this.symbols; + d = g2.labels; + const m = a3.center, r = Math.abs(a3.radius); + var k = c.connectorDistance || 0; + const l3 = b.align, n4 = c.connectorWidth, w2 = this.ranges[0].radius || 0, t2 = m - r - c.borderWidth / 2 + n4 / 2, q2 = h3.styledMode; + k = this.legend.options.rtl || l3 === "left" ? -k : k; + l3 === "center" && (k = 0, c.connectorDistance = 0, a3.labelAttribs.align = "center"); + g2.bubbleItems.push(h3.circle(w2, m + ((t2 % 1 ? 1 : 0.5) - (n4 % 2 ? 0 : 0.5)), r).attr(q2 ? {} : a3.bubbleAttribs).addClass((q2 ? "highcharts-color-" + f2.colorIndex + " " : "") + "highcharts-bubble-legend-symbol " + (c.className || "")).add(this.legendItem.symbol)); + g2.connectors.push(h3.path(h3.crispLine([["M", w2, t2], ["L", w2 + k, t2]], c.connectorWidth)).attr(q2 ? {} : a3.connectorAttribs).addClass((q2 ? "highcharts-color-" + this.options.seriesIndex + " " : "") + "highcharts-bubble-legend-connectors " + (c.connectorClassName || "")).add(this.legendItem.symbol)); + a3 = h3.text(this.formatLabel(a3)).attr(q2 ? {} : a3.labelAttribs).css(q2 ? {} : b.style).addClass("highcharts-bubble-legend-labels " + (c.labels.className || "")).add(this.legendItem.symbol); + c = { x: w2 + k + c.labels.x, y: t2 + c.labels.y + 0.4 * a3.getBBox().height }; + a3.attr(c); + d.push(a3); + a3.placed = true; + a3.alignAttr = c; + } + getMaxLabelSize() { + let a3, e; + this.symbols.labels.forEach(function(b) { + e = b.getBBox(true); + a3 = a3 ? e.width > a3.width ? e : a3 : e; + }); + return a3 || {}; + } + formatLabel(a3) { + var c = this.options; + const b = c.labels.formatter; + c = c.labels.format; + const { numberFormatter: d } = this.chart; + return c ? n3.format(c, a3) : b ? b.call(a3) : d(a3.value, 1); + } + hideOverlappingLabels() { + const a3 = this.chart, e = this.symbols; + !this.options.labels.allowOverlap && e && (a3.hideOverlappingLabels(e.labels), e.labels.forEach(function(a4, d) { + a4.newOpacity ? a4.newOpacity !== a4.oldOpacity && e.connectors[d].show() : e.connectors[d].hide(); + })); + } + getRanges() { + const a3 = this.legend.bubbleLegend, e = a3.options.ranges; + let b, d, f2 = Number.MAX_VALUE, g2 = -Number.MAX_VALUE; + a3.chart.series.forEach(function(a4) { + a4.isBubble && !a4.ignoreSeries && (d = a4.zData.filter(x), d.length && (f2 = h(a4.options.zMin, Math.min(f2, Math.max(w(d), a4.options.displayNegative === false ? a4.options.zThreshold : -Number.MAX_VALUE))), g2 = h(a4.options.zMax, Math.max(g2, A(d))))); + }); + b = f2 === g2 ? [{ value: g2 }] : [{ value: f2 }, { value: (f2 + g2) / 2 }, { value: g2, autoRanges: true }]; + e.length && e[0].radius && b.reverse(); + b.forEach(function(a4, d2) { + e && e[d2] && (b[d2] = t(e[d2], a4)); + }); + return b; + } + predictBubbleSizes() { + var a3 = this.chart, e = a3.legend.options, b = e.floating; + const d = (e = e.layout === "horizontal") ? a3.legend.lastLineHeight : 0, f2 = a3.plotSizeX, g2 = a3.plotSizeY; + var h3 = a3.series[this.options.seriesIndex], m = h3.getPxExtremes(); + a3 = Math.ceil(m.minPxSize); + m = Math.ceil(m.maxPxSize); + const r = Math.min(g2, f2); + h3 = h3.options.maxSize; + if (b || !/%$/.test(h3)) + b = m; + else if (h3 = parseFloat(h3), b = (r + d) * h3 / 100 / (h3 / 100 + 1), e && g2 - b >= f2 || !e && f2 - b >= g2) + b = m; + return [a3, Math.ceil(b)]; + } + updateRanges(a3, e) { + const b = this.legend.options.bubbleLegend; + b.minSize = a3; + b.maxSize = e; + b.ranges = this.getRanges(); + } + correctSizes() { + const a3 = this.legend, e = this.chart.series[this.options.seriesIndex].getPxExtremes(); + 1 < Math.abs(Math.ceil(e.maxPxSize) - this.options.maxSize) && (this.updateRanges(this.options.minSize, e.maxPxSize), a3.render()); + } + } + ""; + return f; + }); + y(a, "Series/Bubble/BubbleLegendComposition.js", [a["Series/Bubble/BubbleLegendDefaults.js"], a["Series/Bubble/BubbleLegendItem.js"], a["Core/Defaults.js"], a["Core/Utilities.js"]], function(a2, n3, q, z) { + function g(a3, d, c2) { + const b = this.legend; + var e2 = 0 <= l2(this); + let h3, g2; + b && b.options.enabled && b.bubbleLegend && b.options.bubbleLegend.autoRanges && e2 ? (h3 = b.bubbleLegend.options, e2 = b.bubbleLegend.predictBubbleSizes(), b.bubbleLegend.updateRanges(e2[0], e2[1]), h3.placed || (b.group.placed = false, b.allItems.forEach((a4) => { + g2 = a4.legendItem || {}; + g2.group && (g2.group.translateY = null); + })), b.render(), this.getMargins(), this.axes.forEach(function(a4) { + a4.visible && a4.render(); + h3.placed || (a4.setScale(), a4.updateNames(), f(a4.ticks, function(a5) { + a5.isNew = true; + a5.isNewLabel = true; + })); + }), h3.placed = true, this.getMargins(), a3.call(this, d, c2), b.bubbleLegend.correctSizes(), t(b, A(b))) : (a3.call(this, d, c2), b && b.options.enabled && b.bubbleLegend && (b.render(), t(b, A(b)))); + } + function l2(a3) { + a3 = a3.series; + let b = 0; + for (; b < a3.length; ) { + if (a3[b] && a3[b].isBubble && a3[b].visible && a3[b].zData.length) + return b; + b++; + } + return -1; + } + function A(a3) { + a3 = a3.allItems; + const b = [], c2 = a3.length; + let e2, f2, h3 = 0; + for (f2 = 0; f2 < c2; f2++) { + var g2 = a3[f2].legendItem || {}; + e2 = (a3[f2 + 1] || {}).legendItem || {}; + g2.labelHeight && (a3[f2].itemHeight = g2.labelHeight); + if (a3[f2] === a3[c2 - 1] || g2.y !== e2.y) { + b.push({ height: 0 }); + g2 = b[b.length - 1]; + for (h3; h3 <= f2; h3++) + a3[h3].itemHeight > g2.height && (g2.height = a3[h3].itemHeight); + g2.step = f2; + } + } + return b; + } + function w(a3) { + const b = this.bubbleLegend, c2 = this.options, e2 = c2.bubbleLegend, f2 = l2(this.chart); + b && b.ranges && b.ranges.length && (e2.ranges.length && (e2.autoRanges = !!e2.ranges[0].autoRanges), this.destroyItem(b)); + 0 <= f2 && c2.enabled && e2.enabled && (e2.seriesIndex = f2, this.bubbleLegend = new n3(e2, this), this.bubbleLegend.addToLegend(a3.allItems)); + } + function x(a3) { + if (a3.defaultPrevented) + return false; + var b = this.chart; + a3 = this.visible; + const c2 = this.chart.legend; + c2 && c2.bubbleLegend && (this.visible = !a3, this.ignoreSeries = a3, b = 0 <= l2(b), c2.bubbleLegend.visible !== b && (c2.update({ bubbleLegend: { enabled: b } }), c2.bubbleLegend.visible = b), this.visible = a3); + } + function t(a3, c2) { + const b = a3.options.rtl; + let d, e2, f2, h3, g2 = 0; + a3.allItems.forEach((a4, m) => { + h3 = a4.legendItem || {}; + if (h3.group) { + d = h3.group.translateX || 0; + e2 = h3.y || 0; + if ((f2 = a4.movementX) || b && a4.ranges) + f2 = b ? d - a4.options.maxSize / 2 : d + f2, h3.group.attr({ translateX: f2 }); + m > c2[g2].step && g2++; + h3.group.attr({ translateY: Math.round(e2 + c2[g2].height / 2) }); + h3.y = e2 + c2[g2].height / 2; + } + }); + } + const { setOptions: h } = q, { addEvent: y2, objectEach: f, wrap: c } = z, e = []; + return { compose: function(b, d, f2) { + z.pushUnique(e, b) && (h({ legend: { bubbleLegend: a2 } }), c(b.prototype, "drawChartBox", g)); + z.pushUnique(e, d) && y2(d, "afterGetAllItems", w); + z.pushUnique(e, f2) && y2(f2, "legendItemClick", x); + } }; + }); + y(a, "Series/Bubble/BubblePoint.js", [a["Core/Series/Point.js"], a["Core/Series/SeriesRegistry.js"], a["Core/Utilities.js"]], function(a2, n3, q) { + ({ seriesTypes: { scatter: { prototype: { pointClass: n3 } } } } = n3); + ({ extend: q } = q); + class g extends n3 { + constructor() { + super(...arguments); + this.series = this.options = void 0; + } + haloPath(g2) { + return a2.prototype.haloPath.call(this, g2 === 0 ? 0 : (this.marker ? this.marker.radius || 0 : 0) + g2); + } + } + q(g.prototype, { ttBelow: false }); + return g; + }); + y(a, "Series/Bubble/BubbleSeries.js", [a["Series/Bubble/BubbleLegendComposition.js"], a["Series/Bubble/BubblePoint.js"], a["Core/Color/Color.js"], a["Core/Globals.js"], a["Core/Series/SeriesRegistry.js"], a["Core/Utilities.js"]], function(a2, n3, q, z, k, l2) { + function g() { + const a3 = this.len, b2 = this.chart, c2 = this.isXAxis, e2 = c2 ? "xData" : "yData", f2 = this.min, h3 = this.max - f2; + let g2 = 0, m2 = a3, k2 = a3 / h3, l3; + this.series.forEach((a4) => { + if (a4.bubblePadding && (a4.visible || !b2.options.chart.ignoreHiddenSeries)) { + l3 = this.allowZoomOutside = true; + const b3 = a4[e2]; + c2 && ((a4.onPoint || a4).getRadii(0, 0, a4), a4.onPoint && (a4.radii = a4.onPoint.radii)); + if (0 < h3) { + let c3 = b3.length; + for (; c3--; ) + if (d(b3[c3]) && this.dataMin <= b3[c3] && b3[c3] <= this.max) { + const d2 = a4.radii && a4.radii[c3] || 0; + g2 = Math.min((b3[c3] - f2) * k2 - d2, g2); + m2 = Math.max((b3[c3] - f2) * k2 + d2, m2); + } + } + } + }); + l3 && 0 < h3 && !this.logarithmic && (m2 -= a3, k2 *= (a3 + Math.max(0, g2) - Math.min(m2, a3)) / a3, [ + ["min", "userMin", g2], + ["max", "userMax", m2] + ].forEach((a4) => { + typeof p(this.options[a4[0]], this[a4[1]]) === "undefined" && (this[a4[0]] += a4[2] / k2); + })); + } + const { parse: w } = q; + ({ noop: q } = z); + const { series: x, seriesTypes: { column: { prototype: t }, scatter: h } } = k, { addEvent: y2, arrayMax: f, arrayMin: c, clamp: e, extend: b, isNumber: d, merge: E, pick: p } = l2, C = []; + class m extends h { + constructor() { + super(...arguments); + this.zData = this.yData = this.radii = this.points = this.options = this.minPxSize = this.maxPxSize = this.data = void 0; + } + static compose(b2, c2, d2, e2) { + a2.compose(c2, d2, e2); + l2.pushUnique(C, b2) && (b2.prototype.beforePadding = g); + } + animate(a3) { + !a3 && this.points.length < this.options.animationLimit && this.points.forEach(function(a4) { + const { graphic: b2 } = a4; + b2 && b2.width && (this.hasRendered || b2.attr({ x: a4.plotX, y: a4.plotY, width: 1, height: 1 }), b2.animate(this.markerAttribs(a4), this.options.animation)); + }, this); + } + getRadii() { + const a3 = this.zData, b2 = this.yData, c2 = []; + let d2, e2, f2, h3 = this.chart.bubbleZExtremes; + const { minPxSize: g2, maxPxSize: m2 } = this.getPxExtremes(); + if (!h3) { + let a4 = Number.MAX_VALUE, b3 = -Number.MAX_VALUE, c3; + this.chart.series.forEach((d3) => { + d3.bubblePadding && (d3.visible || !this.chart.options.chart.ignoreHiddenSeries) && (d3 = (d3.onPoint || d3).getZExtremes()) && (a4 = Math.min(p(a4, d3.zMin), d3.zMin), b3 = Math.max(p(b3, d3.zMax), d3.zMax), c3 = true); + }); + c3 ? (h3 = { zMin: a4, zMax: b3 }, this.chart.bubbleZExtremes = h3) : h3 = { zMin: 0, zMax: 0 }; + } + e2 = 0; + for (d2 = a3.length; e2 < d2; e2++) + f2 = a3[e2], c2.push(this.getRadius(h3.zMin, h3.zMax, g2, m2, f2, b2 && b2[e2])); + this.radii = c2; + } + getRadius(a3, b2, c2, e2, f2, h3) { + const g2 = this.options, m2 = g2.sizeBy !== "width", k2 = g2.zThreshold; + let l3 = b2 - a3, r = 0.5; + if (h3 === null || f2 === null) + return null; + if (d(f2)) { + g2.sizeByAbsoluteValue && (f2 = Math.abs(f2 - k2), l3 = Math.max(b2 - k2, Math.abs(a3 - k2)), a3 = 0); + if (f2 < a3) + return c2 / 2 - 1; + 0 < l3 && (r = (f2 - a3) / l3); + } + m2 && 0 <= r && (r = Math.sqrt(r)); + return Math.ceil(c2 + r * (e2 - c2)) / 2; + } + hasData() { + return !!this.processedXData.length; + } + pointAttribs(a3, b2) { + const c2 = this.options.marker.fillOpacity; + a3 = x.prototype.pointAttribs.call(this, a3, b2); + c2 !== 1 && (a3.fill = w(a3.fill).setOpacity(c2).get("rgba")); + return a3; + } + translate() { + super.translate.call(this); + this.getRadii(); + this.translateBubble(); + } + translateBubble() { + const { data: a3, options: c2, radii: e2 } = this, { minPxSize: f2 } = this.getPxExtremes(); + let h3 = a3.length; + for (; h3--; ) { + const g2 = a3[h3], m2 = e2 ? e2[h3] : 0; + this.zoneAxis === "z" && (g2.negative = (g2.z || 0) < (c2.zThreshold || 0)); + d(m2) && m2 >= f2 / 2 ? (g2.marker = b(g2.marker, { radius: m2, width: 2 * m2, height: 2 * m2 }), g2.dlBox = { x: g2.plotX - m2, y: g2.plotY - m2, width: 2 * m2, height: 2 * m2 }) : (g2.shapeArgs = g2.plotY = g2.dlBox = void 0, g2.isInside = false); + } + } + getPxExtremes() { + const a3 = Math.min(this.chart.plotWidth, this.chart.plotHeight); + var b2 = (b3) => { + let c3; + typeof b3 === "string" && (c3 = /%$/.test(b3), b3 = parseInt(b3, 10)); + return c3 ? a3 * b3 / 100 : b3; + }; + const c2 = b2(p(this.options.minSize, 8)); + b2 = Math.max(b2(p(this.options.maxSize, "20%")), c2); + return { minPxSize: c2, maxPxSize: b2 }; + } + getZExtremes() { + var a3 = this.options; + const b2 = (this.zData || []).filter(d); + if (b2.length) { + const g2 = p(a3.zMin, e(c(b2), a3.displayNegative === false ? a3.zThreshold || 0 : -Number.MAX_VALUE, Number.MAX_VALUE)); + a3 = p(a3.zMax, f(b2)); + if (d(g2) && d(a3)) + return { zMin: g2, zMax: a3 }; + } + } + } + m.defaultOptions = E(h.defaultOptions, { dataLabels: { formatter: function() { + const { numberFormatter: a3 } = this.series.chart, { z: b2 } = this.point; + return d(b2) ? a3(b2, -1) : ""; + }, inside: true, verticalAlign: "middle" }, animationLimit: 250, marker: { + lineColor: null, + lineWidth: 1, + fillOpacity: 0.5, + radius: null, + states: { hover: { radiusPlus: 0 } }, + symbol: "circle" + }, minSize: 8, maxSize: "20%", softThreshold: false, states: { hover: { halo: { size: 5 } } }, tooltip: { pointFormat: "({point.x}, {point.y}), Size: {point.z}" }, turboThreshold: 0, zThreshold: 0, zoneAxis: "z" }); + b(m.prototype, { + alignDataLabel: t.alignDataLabel, + applyZones: q, + bubblePadding: true, + buildKDTree: q, + directTouch: true, + isBubble: true, + pointArrayMap: ["y", "z"], + pointClass: n3, + parallelArrays: ["x", "y", "z"], + trackerGroups: ["group", "dataLabelsGroup"], + specialGroup: "group", + zoneAxis: "z" + }); + y2(m, "updatedData", (a3) => { + delete a3.target.chart.bubbleZExtremes; + }); + y2(m, "remove", (a3) => { + delete a3.target.chart.bubbleZExtremes; + }); + k.registerSeriesType("bubble", m); + ""; + ""; + return m; + }); + y(a, "Series/MapBubble/MapBubblePoint.js", [a["Series/Bubble/BubblePoint.js"], a["Core/Series/SeriesRegistry.js"], a["Core/Utilities.js"]], function(a2, n3, q) { + ({ seriesTypes: { map: { prototype: { pointClass: { prototype: n3 } } } } } = n3); + ({ extend: q } = q); + class g extends a2 { + isValid() { + return typeof this.z === "number"; + } + } + q(g.prototype, { + applyOptions: n3.applyOptions, + getProjectedBounds: n3.getProjectedBounds + }); + return g; + }); + y(a, "Series/MapBubble/MapBubbleSeries.js", [a["Series/Bubble/BubbleSeries.js"], a["Series/MapBubble/MapBubblePoint.js"], a["Core/Series/SeriesRegistry.js"], a["Core/Utilities.js"]], function(a2, n3, q, y2) { + const { seriesTypes: { map: { prototype: g }, mappoint: { prototype: l2 } } } = q, { extend: z, merge: w } = y2; + class x extends a2 { + constructor() { + super(...arguments); + this.points = this.options = this.data = void 0; + this.clearBounds = g.clearBounds; + } + searchPoint(a3, g2) { + return this.searchKDTree({ clientX: a3.chartX - this.chart.plotLeft, plotY: a3.chartY - this.chart.plotTop }, g2, a3); + } + translate() { + l2.translate.call(this); + this.getRadii(); + this.translateBubble(); + } + updateParallelArrays(a3, g2, k) { + super.updateParallelArrays.call(this, a3, g2, k); + a3 = this.processedXData; + g2 = this.xData; + a3 && g2 && (a3.length = g2.length); + } + } + x.defaultOptions = w(a2.defaultOptions, { lineWidth: 0, animationLimit: 500, joinBy: "hc-key", tooltip: { pointFormat: "{point.name}: {point.z}" } }); + z(x.prototype, { + type: "mapbubble", + axisTypes: ["colorAxis"], + getProjectedBounds: g.getProjectedBounds, + isCartesian: false, + pointArrayMap: ["z"], + pointClass: n3, + processData: g.processData, + projectPoint: l2.projectPoint, + setData: g.setData, + setOptions: g.setOptions, + updateData: g.updateData, + useMapGeometry: true, + xyFromShape: true + }); + q.registerSeriesType("mapbubble", x); + ""; + return x; + }); + y(a, "Series/Heatmap/HeatmapPoint.js", [a["Core/Series/SeriesRegistry.js"], a["Core/Utilities.js"]], function(a2, n3) { + ({ seriesTypes: { scatter: { prototype: { pointClass: a2 } } } } = a2); + const { clamp: g, defined: y2, extend: k, pick: l2 } = n3; + class A extends a2 { + constructor() { + super(...arguments); + this.y = this.x = this.value = this.series = this.options = void 0; + } + applyOptions(a3, g2) { + (this.isNull || this.value === null) && delete this.color; + super.applyOptions(a3, g2); + this.formatPrefix = this.isNull || this.value === null ? "null" : "point"; + return this; + } + getCellAttributes() { + var a3 = this.series; + const k2 = a3.options, n4 = (k2.colsize || 1) / 2, h = (k2.rowsize || 1) / 2, q = a3.xAxis, f = a3.yAxis, c = this.options.marker || a3.options.marker; + a3 = a3.pointPlacementToXValue(); + const e = l2(this.pointPadding, k2.pointPadding, 0), b = { x1: g(Math.round(q.len - q.translate(this.x - n4, false, true, false, true, -a3)), -q.len, 2 * q.len), x2: g(Math.round(q.len - q.translate(this.x + n4, false, true, false, true, -a3)), -q.len, 2 * q.len), y1: g(Math.round(f.translate(this.y - h, false, true, false, true)), -f.len, 2 * f.len), y2: g(Math.round(f.translate(this.y + h, false, true, false, true)), -f.len, 2 * f.len) }; + [["width", "x"], ["height", "y"]].forEach(function(a4) { + var d = a4[0]; + a4 = a4[1]; + let g2 = a4 + "1", h3 = a4 + "2"; + const m = Math.abs(b[g2] - b[h3]), k3 = c && c.lineWidth || 0, l3 = Math.abs(b[g2] + b[h3]) / 2; + d = c && c[d]; + y2(d) && d < m && (d = d / 2 + k3 / 2, b[g2] = l3 - d, b[h3] = l3 + d); + if (e) { + if (a4 === "x" && q.reversed || a4 === "y" && !f.reversed) + g2 = h3, h3 = a4 + "1"; + b[g2] += e; + b[h3] -= e; + } + }); + return b; + } + haloPath(a3) { + if (!a3) + return []; + const { x: g2 = 0, y: k2 = 0, width: h = 0, height: l3 = 0 } = this.shapeArgs || {}; + return [["M", g2 - a3, k2 - a3], ["L", g2 - a3, k2 + l3 + a3], ["L", g2 + h + a3, k2 + l3 + a3], ["L", g2 + h + a3, k2 - a3], ["Z"]]; + } + isValid() { + return this.value !== Infinity && this.value !== -Infinity; + } + } + k(A.prototype, { dataLabelOnNull: true, moveToTopOnHover: true, ttBelow: false }); + return A; + }); + y(a, "Series/Heatmap/HeatmapSeries.js", [ + a["Core/Color/Color.js"], + a["Series/ColorMapComposition.js"], + a["Core/Globals.js"], + a["Series/Heatmap/HeatmapPoint.js"], + a["Core/Series/SeriesRegistry.js"], + a["Core/Renderer/SVG/SVGRenderer.js"], + a["Core/Utilities.js"] + ], function(a2, n3, q, y2, k, l2, A) { + const { doc: g } = q, { series: x, seriesTypes: { column: t, scatter: h } } = k, { prototype: { symbols: z } } = l2, { clamp: f, extend: c, fireEvent: e, isNumber: b, merge: d, pick: E, defined: p } = A; + class C extends h { + constructor() { + super(...arguments); + this.points = this.options = this.data = this.context = this.colorAxis = this.canvas = void 0; + this.valueMin = this.valueMax = NaN; + } + drawPoints() { + const a3 = this; + var b2 = a3.options, c2 = b2.marker || {}; + if (b2.interpolation) { + const { image: h3, chart: k2, xAxis: m, yAxis: l3, points: n4 } = a3; + c2 = n4.length - 1; + const { len: r, reversed: v } = m, { len: q2, reversed: u } = l3, { min: t2, max: w } = m.getExtremes(), { min: x2, max: y3 } = l3.getExtremes(), [z2, A2] = [E(b2.colsize, 1), E(b2.rowsize, 1)]; + var d2 = k2.inverted, e2 = z2 / 2; + b2 = m.userOptions.minPadding; + var g2 = p(b2) && !(0 < b2); + b2 = d2 || g2; + e2 = g2 && e2 || 0; + const [B, G, C2] = [t2 - e2, w + 2 * e2, t2 + z2].map((b3) => f(Math.round(m.len - m.translate(b3, false, true, false, true, -a3.pointPlacementToXValue())), -m.len, 2 * m.len)), [F, I] = v ? [G, B] : [B, G]; + e2 = r / C2 / 2 / 2 / 2; + d2 = d2 ? { + width: r, + height: q2, + x: 0, + y: 0 + } : { x: F - e2, width: I - e2, height: q2, y: 0 }; + if (!h3 || a3.isDirtyData) { + const f2 = k2.colorAxis && k2.colorAxis[0]; + e2 = a3.getContext(); + if ((g2 = a3.canvas) && e2 && f2) { + const m2 = g2.width = ~~((w - t2) / z2) + 1, l4 = g2.height = ~~((y3 - x2) / A2) + 1, r2 = m2 * l4, p2 = new Uint8ClampedArray(4 * r2), q3 = m2 - (b2 && 1 || 0), D = l4 - 1; + b2 = (a4) => { + a4 = f2.toColor(a4.value || 0, E(a4)).split(")")[0].split("(")[1].split(",").map((a5) => E(parseFloat(a5), parseInt(a5, 10))); + a4[3] = 255 * E(a4[3], 1); + return a4; + }; + const B2 = v ? (a4) => q3 - a4 : (a4) => a4, G2 = u ? (a4) => D - a4 : (a4) => a4, C3 = (a4, b3) => Math.ceil(m2 * G2(~~((D - 0) / (y3 - x2) * (y3 - b3 - x2))) + B2(~~((q3 - 0) / (w - t2) * (a4 - t2)))); + a3.buildKDTree(); + a3.directTouch = false; + for (let a4 = 0; a4 < r2; a4++) { + const d3 = n4[~~((c2 - 0) / (p2.length - 4) * a4 * 4)], e3 = new Uint8ClampedArray(b2(d3)); + p2.set(e3, 4 * C3(d3.x, d3.y)); + } + e2.putImageData(new ImageData(p2, m2, l4), 0, 0); + h3 ? h3.attr(Object.assign(Object.assign({}, d2), { href: g2.toDataURL() })) : a3.image = k2.renderer.image(g2.toDataURL()).attr(d2).add(a3.group); + } + } else + h3.width === d2.width && h3.height === d2.height || h3.attr(d2); + } else if (c2.enabled || a3._hasPointMarkers) + x.prototype.drawPoints.call(a3), a3.points.forEach((b3) => { + b3.graphic && (b3.graphic[a3.chart.styledMode ? "css" : "animate"](a3.colorAttribs(b3)), b3.value === null && b3.graphic.addClass("highcharts-null-point")); + }); + } + getContext() { + const { canvas: a3, context: b2 } = this; + if (a3 && b2) + b2.clearRect(0, 0, a3.width, a3.height); + else + return this.canvas = g.createElement("canvas"), this.context = this.canvas.getContext("2d") || void 0; + return b2; + } + getExtremes() { + const { dataMin: a3, dataMax: c2 } = x.prototype.getExtremes.call(this, this.valueData); + b(a3) && (this.valueMin = a3); + b(c2) && (this.valueMax = c2); + return x.prototype.getExtremes.call(this); + } + getValidPoints(a3, b2) { + return x.prototype.getValidPoints.call(this, a3, b2, true); + } + hasData() { + return !!this.processedXData.length; + } + init() { + super.init.apply(this, arguments); + const a3 = this.options; + a3.pointRange = E(a3.pointRange, a3.colsize || 1); + this.yAxis.axisPointRange = a3.rowsize || 1; + z.ellipse = z.circle; + a3.marker && b(a3.borderRadius) && (a3.marker.r = a3.borderRadius); + } + markerAttribs(a3, b2) { + const c2 = a3.shapeArgs || {}; + if (a3.hasImage) + return { x: a3.plotX, y: a3.plotY }; + if (b2 && b2 !== "normal") { + var d2 = a3.options.marker || {}; + a3 = this.options.marker || {}; + a3 = a3.states && a3.states[b2] || {}; + d2 = d2.states && d2.states[b2] || {}; + b2 = (d2.width || a3.width || c2.width || 0) + (d2.widthPlus || a3.widthPlus || 0); + a3 = (d2.height || a3.height || c2.height || 0) + (d2.heightPlus || a3.heightPlus || 0); + return { x: (c2.x || 0) + ((c2.width || 0) - b2) / 2, y: (c2.y || 0) + ((c2.height || 0) - a3) / 2, width: b2, height: a3 }; + } + return c2; + } + pointAttribs(b2, c2) { + const e2 = x.prototype.pointAttribs.call(this, b2, c2), f2 = this.options || {}; + var g2 = this.chart.options.plotOptions || {}, h3 = g2.series || {}; + const k2 = g2.heatmap || {}; + g2 = b2 && b2.options.borderColor || f2.borderColor || k2.borderColor || h3.borderColor; + h3 = b2 && b2.options.borderWidth || f2.borderWidth || k2.borderWidth || h3.borderWidth || e2["stroke-width"]; + e2.stroke = b2 && b2.marker && b2.marker.lineColor || f2.marker && f2.marker.lineColor || g2 || this.color; + e2["stroke-width"] = h3; + c2 && c2 !== "normal" && (b2 = d(f2.states && f2.states[c2], f2.marker && f2.marker.states && f2.marker.states[c2], b2 && b2.options.states && b2.options.states[c2] || {}), e2.fill = b2.color || a2.parse(e2.fill).brighten(b2.brightness || 0).get(), e2.stroke = b2.lineColor || e2.stroke); + return e2; + } + translate() { + const { borderRadius: a3, marker: c2 } = this.options, f2 = c2 && c2.symbol || "rect", g2 = z[f2] ? f2 : "rect", h3 = ["circle", "square"].indexOf(g2) !== -1; + this.generatePoints(); + this.points.forEach(function(c3) { + const e2 = c3.getCellAttributes(); + let k2 = Math.min(e2.x1, e2.x2); + var l3 = Math.min(e2.y1, e2.y2); + let m = Math.max(Math.abs(e2.x2 - e2.x1), 0), n4 = Math.max(Math.abs(e2.y2 - e2.y1), 0); + c3.hasImage = (c3.marker && c3.marker.symbol || f2 || "").indexOf("url") === 0; + h3 && (l3 = Math.abs(m - n4), k2 = Math.min(e2.x1, e2.x2) + (m < n4 ? 0 : l3 / 2), l3 = Math.min(e2.y1, e2.y2) + (m < n4 ? l3 / 2 : 0), m = n4 = Math.min(m, n4)); + c3.hasImage && (c3.marker = { width: m, height: n4 }); + c3.plotX = c3.clientX = (e2.x1 + e2.x2) / 2; + c3.plotY = (e2.y1 + e2.y2) / 2; + c3.shapeType = "path"; + c3.shapeArgs = d(true, { + x: k2, + y: l3, + width: m, + height: n4 + }, { d: z[g2](k2, l3, m, n4, { r: b(a3) ? a3 : 0 }) }); + }); + e(this, "afterTranslate"); + } + } + C.defaultOptions = d(h.defaultOptions, { + animation: false, + borderRadius: 0, + borderWidth: 0, + interpolation: false, + nullColor: "#f7f7f7", + dataLabels: { formatter: function() { + const { numberFormatter: a3 } = this.series.chart, { value: c2 } = this.point; + return b(c2) ? a3(c2, -1) : ""; + }, inside: true, verticalAlign: "middle", crop: false, overflow: "allow", padding: 0 }, + marker: { symbol: "rect", radius: 0, lineColor: void 0, states: { hover: { lineWidthPlus: 0 }, select: {} } }, + clip: true, + pointRange: null, + tooltip: { pointFormat: "{point.x}, {point.y}: {point.value}
" }, + states: { hover: { halo: false, brightness: 0.2 } }, + legendSymbol: "rectangle" + }); + c(C.prototype, { axisTypes: n3.seriesMembers.axisTypes, colorKey: n3.seriesMembers.colorKey, directTouch: true, getExtremesFromAll: true, parallelArrays: n3.seriesMembers.parallelArrays, pointArrayMap: ["y", "value"], pointClass: y2, specialGroup: "group", trackerGroups: n3.seriesMembers.trackerGroups, alignDataLabel: t.prototype.alignDataLabel, colorAttribs: n3.seriesMembers.colorAttribs, getSymbol: x.prototype.getSymbol }); + n3.compose(C); + k.registerSeriesType("heatmap", C); + ""; + ""; + return C; + }); + y(a, "masters/modules/map.src.js", [a["Core/Globals.js"], a["Core/Axis/Color/ColorAxis.js"], a["Series/MapBubble/MapBubbleSeries.js"], a["Core/Chart/MapChart.js"], a["Maps/MapView.js"], a["Maps/Projection.js"]], function(a2, n3, q, y2, k, l2) { + a2.ColorAxis = n3; + a2.MapChart = y2; + a2.mapChart = a2.Map = y2.mapChart; + a2.MapView = k; + a2.maps = y2.maps; + a2.Projection = l2; + n3.compose(a2.Chart, a2.Fx, a2.Legend, a2.Series); + q.compose(a2.Axis, a2.Chart, a2.Legend, a2.Series); + }); + }); + } +}); + // js/luminous.js __export(exports, { ChartJSHook: () => chartjs_hook_default, + MapHook: () => map_hook_default, TableHook: () => table_hook_default, TimeRangeHook: () => time_range_hook_default }); @@ -41043,6 +52391,67 @@ function TimeRangeHook() { }; } var time_range_hook_default = TimeRangeHook; + +// js/components/map_hook.js +var import_highcharts = __toModule(require_highcharts()); +var import_map = __toModule(require_map()); +function MapHook() { + this.mounted = function() { + const element_data = this.el.dataset; + (0, import_map.default)(import_highcharts.default); + this.map = import_highcharts.default.mapChart(element_data.mapId, { + chart: { + map: JSON.parse(this.el.dataset.json), + backgroundColor: "rgba(0,0,0,0)", + height: "100%" + }, + title: { text: "" }, + credits: { enabled: false }, + mapNavigation: { + enabled: true + }, + colorAxis: { min: 0 }, + series: [{ + name: this.el.dataset.country, + borderColor: "#A0A0A0", + nullColor: "rgba(200, 200, 200, 0.3)", + states: { + hover: { + color: "#BADA55" + } + }, + tooltip: { + headerFormat: "", + pointFormat: "{point.description}" + }, + dataLabels: { + enabled: false + } + }, { + type: "mappoint", + tooltip: { + headerFormat: "", + pointFormat: "{point.description}" + }, + events: { + click: function(e) { + const url2 = e.target.point.url; + window.open(url2); + } + }, + color: "#030303" + }] + }); + this.handleEvent("panel-" + element_data.componentId + "::refresh-data", this.setMapData()); + }; + this.setMapData = function() { + return (payload) => { + this.map.series[0].setData(payload.Areas); + this.map.series[1].setData(payload.Pins); + }; + }; +} +var map_hook_default = MapHook; /*! * @kurkle/color v0.2.1 * https://github.com/kurkle/color#readme diff --git a/lib/luminous/components.ex b/lib/luminous/components.ex index 67a786b..c454238 100644 --- a/lib/luminous/components.ex +++ b/lib/luminous/components.ex @@ -227,6 +227,40 @@ defmodule Luminous.Components do """ end + def panel(%{panel: %{type: :map}} = assigns) do + ~H""" +
+
+ + +
+
<%= interpolate(@panel.title, @variables) %>
+ <.description panel={@panel}/> +
+
+ +
+
+
+
+
+
+ """ + end + @doc """ This component is responsible for rendering the time range component. It consists of a date range picker and a presets dropdown. diff --git a/lib/luminous/live.ex b/lib/luminous/live.ex index f8f7907..c07a128 100644 --- a/lib/luminous/live.ex +++ b/lib/luminous/live.ex @@ -175,6 +175,21 @@ defmodule Luminous.Live do {:noreply, socket} end + # a table can have only one dataset + def handle_info({_task_ref, {%Panel{type: :map} = panel, datasets}}, + socket + ) do + socket = + socket + |> push_event("#{Panel.dom_id(panel)}::refresh-data", %{ + Areas: datasets[:Areas], + Pins: datasets[:Pins] + }) + |> push_panel_load_event(:end, panel.id) + + {:noreply, socket} + end + # this will be called each time a panel refresh async task terminates def handle_info({:DOWN, _task_ref, :process, _, _}, socket) do {:noreply, socket} diff --git a/lib/luminous/panel.ex b/lib/luminous/panel.ex index d8dc8d8..1978903 100644 --- a/lib/luminous/panel.ex +++ b/lib/luminous/panel.ex @@ -5,7 +5,7 @@ defmodule Luminous.Panel do """ alias Luminous.Query - alias Luminous.Panel.{Chart, Table, Stat} + alias Luminous.Panel.{Chart, Table, Stat, Map} @doc """ transform a query result to view data acc. to the panel type @@ -15,11 +15,12 @@ defmodule Luminous.Panel do @panel_modules %{ chart: Chart, stat: Stat, - table: Table + table: Table, + map: Map } - @type panel_type :: :chart | :stat | :table - defguard is_panel(type) when type in [:chart, :stat, :table] + @type panel_type :: :chart | :stat | :table | :map + defguard is_panel(type) when type in [:chart, :stat, :table, :map] @type t :: %__MODULE__{ id: atom(), @@ -34,7 +35,8 @@ defmodule Luminous.Panel do stacked_y: boolean(), hook: binary(), y_min_value: number(), - y_max_value: number() + y_max_value: number(), + map: binary() } @enforce_keys [:id, :title, :type, :queries, :hook] @@ -51,7 +53,8 @@ defmodule Luminous.Panel do :stacked_x, :stacked_y, :y_min_value, - :y_max_value + :y_max_value, + :map ] @doc """ @@ -59,6 +62,7 @@ defmodule Luminous.Panel do """ @spec define(atom(), binary(), panel_type(), [Query.t()], Keyword.t()) :: t() def define(id, title, type, queries, opts \\ []) when is_panel(type) do + if type == :map and length(queries) > 1, do: raise "Map type only supports one query" %__MODULE__{ id: id, title: title, @@ -74,7 +78,8 @@ defmodule Luminous.Panel do stacked_y: if(Keyword.has_key?(opts, :stacked_y), do: Keyword.get(opts, :stacked_y), else: false), y_min_value: Keyword.get(opts, :y_min_value), - y_max_value: Keyword.get(opts, :y_max_value) + y_max_value: Keyword.get(opts, :y_max_value), + map: Keyword.get(opts, :map) } end @@ -97,5 +102,6 @@ defmodule Luminous.Panel do defp default_panel_type(:chart), do: "ChartJSHook" defp default_panel_type(:table), do: "TableHook" + defp default_panel_type(:map), do: "MapHook" defp default_panel_type(_), do: nil end diff --git a/lib/luminous/panel/map.ex b/lib/luminous/panel/map.ex new file mode 100644 index 0000000..0bf2928 --- /dev/null +++ b/lib/luminous/panel/map.ex @@ -0,0 +1,7 @@ +defmodule Luminous.Panel.Map do + alias Luminous.Query + @behaviour Luminous.Panel + @impl true + + def transform(%Query.Result{rows: rows, attrs: _}), do: rows +end diff --git a/lib/luminous/query.ex b/lib/luminous/query.ex index ff1b132..e069c5d 100644 --- a/lib/luminous/query.ex +++ b/lib/luminous/query.ex @@ -55,6 +55,20 @@ defmodule Luminous.Query do @type value :: number() | Decimal.t() | binary() | nil @type point :: {label(), value()} @type row :: [point()] | map() + @type pin :: %{ + lat: number(), + lon: number(), + description: binary() | nil, + marker: + %{symbol: binary() | nil, width: number() | nil, height: number() | nil} | nil, + url: binary() | nil + } + @type area :: %{ + "hc-key": binary(), + value: number(), + description: binary() | nil + } + @type map_data :: %{Areas: [area()] | nil, Pins: [pin()] | nil} @type t :: %__MODULE__{ rows: row(), attrs: %{binary() => Attributes.t()} @@ -70,7 +84,7 @@ defmodule Luminous.Query do - with a single row, i.e. a list of 2-tuples of the form {label, value} (e.g. in the case of single- or multi- stats) - with a single value (for use in a single-valued stat panel with no label) """ - @spec new([row()] | row() | point() | value(), Keyword.t()) :: t() + @spec new(map_data() | [row()] | row() | point() | value(), Keyword.t()) :: t() def new(_, opts \\ []) def new(rows, opts) when is_list(rows) do diff --git a/test/luminous/live_test.exs b/test/luminous/live_test.exs index d079444..6a16257 100644 --- a/test/luminous/live_test.exs +++ b/test/luminous/live_test.exs @@ -136,6 +136,17 @@ defmodule Luminous.LiveTest do assert_push_event(view, "panel:load:end", %{id: :p1}) assert_push_event(view, "panel:load:end", %{id: :p2}) end + + test "sends the correct data to the map panel", %{conn: conn} do + {:ok, view, _} = live(conn, Routes.test_dashboard_path(conn, :index)) + + assert view |> element("#panel-p12-title") |> render() =~ "Panel 12" + + expected_data = + %{Areas: [%{hc_key: "foo", value: 5, description: "bar"}], Pins: [%{lat: 5, lon: 6}]} + + assert_push_event(view, "panel-p12::refresh-data", ^expected_data) + end end describe "time range" do