renalware-core 2.0.149 → 2.0.156

Sign up to get free protection for your applications and to get access to all the features.
Files changed (520) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +23 -2
  3. data/app/assets/config/renalware/core/manifest.js +1 -0
  4. data/app/assets/images/renalware/icons/align-justify.svg +3 -0
  5. data/app/assets/images/renalware/icons/bar-chart.svg +1 -0
  6. data/app/assets/images/renalware/icons/chart-bar.svg +1 -0
  7. data/app/assets/images/renalware/icons/chart.svg +3 -0
  8. data/app/assets/images/renalware/icons/list-bullet.svg +1 -0
  9. data/app/assets/images/renalware/icons/list.svg +8 -0
  10. data/app/assets/javascripts/renalware/README.md +25 -1
  11. data/app/assets/javascripts/renalware/components/dialogs.js.erb +3 -1
  12. data/app/assets/javascripts/renalware/components/hd.js +2 -2
  13. data/app/assets/javascripts/renalware/components/letters.js +1 -1
  14. data/app/assets/javascripts/renalware/components/masonry.run.js +2 -2
  15. data/app/assets/javascripts/renalware/components/navigation.js +0 -7
  16. data/app/assets/javascripts/renalware/components/patient_menu.js +1 -1
  17. data/app/assets/javascripts/renalware/components/sortable.js +3 -0
  18. data/app/assets/javascripts/renalware/components/toggler.js +1 -1
  19. data/app/assets/javascripts/renalware/core.js.erb +0 -2
  20. data/app/assets/javascripts/renalware/rollup_compiled.css +106315 -0
  21. data/app/assets/javascripts/renalware/rollup_compiled.js +3158 -17
  22. data/app/assets/stylesheets/renalware/base/_variables.scss +1 -0
  23. data/app/assets/stylesheets/renalware/core.scss +1 -0
  24. data/app/assets/stylesheets/renalware/lib/_foundation_and_overrides.scss +1 -620
  25. data/app/assets/stylesheets/renalware/lib/_select2-foundation5-overrides.scss +1 -1
  26. data/app/assets/stylesheets/renalware/modules/_hd.scss +8 -4
  27. data/app/assets/stylesheets/renalware/modules/_medications.scss +9 -9
  28. data/app/assets/stylesheets/renalware/modules/_pathology.scss +8 -1
  29. data/app/assets/stylesheets/renalware/modules/_patients.scss +4 -0
  30. data/app/assets/stylesheets/renalware/modules/_pd.scss +35 -0
  31. data/app/assets/stylesheets/renalware/modules/_users.scss +2 -1
  32. data/app/assets/stylesheets/renalware/partials/_charting.scss +17 -0
  33. data/app/assets/stylesheets/renalware/partials/_forms.scss +16 -1
  34. data/app/assets/stylesheets/renalware/partials/_navigation.scss +15 -12
  35. data/app/assets/stylesheets/renalware/partials/_simple_form.scss +9 -1
  36. data/app/assets/stylesheets/renalware/partials/_tables.scss +15 -8
  37. data/app/assets/stylesheets/renalware/partials/_toggle.scss +0 -66
  38. data/app/assets/stylesheets/renalware/partials/_toggling.scss +18 -0
  39. data/app/assets/stylesheets/renalware/partials/_trix.scss +12 -0
  40. data/app/assets/stylesheets/renalware/partials/_utilities.scss +12 -0
  41. data/app/assets/stylesheets/tailwind/tailwind.css +3 -0
  42. data/app/components/renalware/admissions/active_consult_alert_component.html.slim +4 -0
  43. data/app/components/renalware/admissions/active_consult_alert_component.rb +25 -0
  44. data/app/components/renalware/application_component.rb +2 -1
  45. data/app/components/renalware/article_component.html.slim +5 -0
  46. data/app/components/renalware/article_component.rb +12 -0
  47. data/app/components/renalware/events/{biopsies_component.html.slim → event_list_component.html.slim} +5 -4
  48. data/app/components/renalware/events/event_list_component.rb +82 -0
  49. data/app/components/renalware/hd/administer_prescription_dropdown_component.rb +1 -5
  50. data/app/components/renalware/hd/prescription_last_administration_component.html.slim +0 -1
  51. data/app/components/renalware/hd/prescription_last_administration_component.rb +8 -7
  52. data/app/components/renalware/letters/unread_electronic_ccs_component.rb +1 -0
  53. data/app/components/renalware/medications/tabbed_prescriptions_list_component.html.slim +41 -0
  54. data/app/components/renalware/medications/tabbed_prescriptions_list_component.rb +47 -0
  55. data/app/components/renalware/pathology/chart_component.html.slim +5 -0
  56. data/app/components/renalware/pathology/chart_component.rb +40 -0
  57. data/app/components/renalware/pathology/sparkline_component.html.slim +15 -0
  58. data/app/components/renalware/pathology/sparkline_component.rb +135 -0
  59. data/app/components/renalware/patients/messages_component.html.slim +45 -0
  60. data/app/components/renalware/patients/messages_component.rb +52 -0
  61. data/app/components/renalware/patients/side_menu_component.rb +2 -11
  62. data/app/components/renalware/pd/adequacy_results_component.html.slim +7 -0
  63. data/app/components/renalware/pd/adequacy_results_component.rb +39 -0
  64. data/app/components/renalware/pd/pet_results_component.html.slim +37 -0
  65. data/app/components/renalware/pd/pet_results_component.rb +84 -0
  66. data/app/{views/renalware/surveys/_eq5d_summary_part.html.slim → components/renalware/surveys/eq5d_component.html.slim} +5 -5
  67. data/app/{models/renalware/surveys/eq5d_summary_part.rb → components/renalware/surveys/eq5d_component.rb} +7 -5
  68. data/app/{views/renalware/surveys/_pos_s_summary_part.html.slim → components/renalware/surveys/pos_s_component.html.slim} +6 -9
  69. data/app/{models/renalware/surveys/pos_s_summary_part.rb → components/renalware/surveys/pos_s_component.rb} +9 -5
  70. data/app/components/renalware/system/admin_menu_component.html.slim +3 -1
  71. data/app/components/renalware/system/admin_menu_component.rb +2 -2
  72. data/app/components/renalware/system/article_component.html.slim +3 -0
  73. data/app/components/renalware/system/article_component.rb +9 -0
  74. data/app/components/renalware/users/last_signin_component.html.slim +3 -0
  75. data/app/components/renalware/users/last_signin_component.rb +23 -0
  76. data/app/controllers/renalware/admin/playgrounds_controller.rb +1 -1
  77. data/app/controllers/renalware/admin/users_controller.rb +1 -0
  78. data/app/controllers/renalware/admissions/consults_controller.rb +1 -1
  79. data/app/controllers/renalware/concerns/pdf_renderable.rb +1 -1
  80. data/app/controllers/renalware/drugs/drugs_controller.rb +4 -0
  81. data/app/controllers/renalware/hd/historical_profiles_controller.rb +1 -1
  82. data/app/controllers/renalware/hd/scheduling/diaries_controller.rb +1 -1
  83. data/app/controllers/renalware/medications/prescriptions_controller.rb +6 -3
  84. data/app/controllers/renalware/messaging/internal/messages_controller.rb +14 -5
  85. data/app/controllers/renalware/pathology/charts_controller.rb +21 -0
  86. data/app/controllers/renalware/pathology/current_observation_results_controller.rb +1 -1
  87. data/app/controllers/renalware/pathology/historical_observation_results_controller.rb +1 -1
  88. data/app/controllers/renalware/pathology/nearest_observation_results_controller.rb +52 -0
  89. data/app/controllers/renalware/pathology/observation_descriptions_controller.rb +58 -0
  90. data/app/controllers/renalware/pathology/observation_requests_controller.rb +1 -1
  91. data/app/controllers/renalware/pathology/observations_controller.rb +26 -2
  92. data/app/controllers/renalware/pathology/requests/requests_controller.rb +7 -5
  93. data/app/controllers/renalware/patients/mdms_controller.rb +104 -0
  94. data/app/controllers/renalware/pd/adequacy_completions_controller.rb +18 -0
  95. data/app/controllers/renalware/pd/adequacy_results_controller.rb +98 -0
  96. data/app/controllers/renalware/pd/pet_completions_controller.rb +18 -0
  97. data/app/controllers/renalware/pd/pet_results_controller.rb +122 -0
  98. data/app/controllers/renalware/pd/unified_pet_adequacies_controller.rb +102 -0
  99. data/app/controllers/renalware/renal/aki_alerts_controller.rb +1 -1
  100. data/app/controllers/renalware/renal/registry_preflight_checks_controller.rb +55 -19
  101. data/app/controllers/renalware/system/view_metadata_controller.rb +61 -0
  102. data/app/controllers/renalware/users_controller.rb +25 -0
  103. data/app/documents/renalware/age.rb +3 -1
  104. data/app/helpers/renalware/application_helper.rb +9 -8
  105. data/app/helpers/renalware/article_helper.rb +3 -3
  106. data/app/helpers/renalware/boolean_helper.rb +15 -0
  107. data/app/helpers/renalware/clipboard_helper.rb +2 -3
  108. data/app/helpers/renalware/dashboards_helper.rb +2 -2
  109. data/app/helpers/renalware/definition_list_helper.rb +3 -3
  110. data/app/helpers/renalware/devise_helper.rb +1 -1
  111. data/app/helpers/renalware/drugs_helper.rb +6 -0
  112. data/app/helpers/renalware/form_helper.rb +2 -2
  113. data/app/helpers/renalware/layout_helper.rb +1 -1
  114. data/app/helpers/renalware/letters_helper.rb +1 -1
  115. data/app/helpers/renalware/link_helper.rb +1 -1
  116. data/app/helpers/renalware/mdm_helper.rb +1 -0
  117. data/app/helpers/renalware/navigation_helper.rb +1 -1
  118. data/app/helpers/renalware/patient_helper.rb +2 -2
  119. data/app/helpers/renalware/snippets_helper.rb +9 -10
  120. data/app/helpers/renalware/toggle_helper.rb +6 -6
  121. data/app/helpers/renalware/tooltip_helper.rb +14 -16
  122. data/app/inputs/clock_picker_input.rb +3 -3
  123. data/app/inputs/date_picker_input.rb +3 -3
  124. data/app/inputs/simple_time_input.rb +3 -3
  125. data/app/inputs/trix_editor_input.rb +2 -0
  126. data/app/javascript/renalware/controllers/blas_controller.js +37 -0
  127. data/app/javascript/renalware/controllers/modal_controller.js +137 -0
  128. data/app/javascript/renalware/controllers/pathology/sparklines_controller.js +206 -0
  129. data/app/javascript/renalware/controllers/pd/pet_charts_controller.js +169 -0
  130. data/app/javascript/renalware/controllers/session_controller.js +1 -1
  131. data/app/javascript/renalware/controllers/simple_toggle_controller.js +17 -0
  132. data/app/javascript/renalware/controllers/tabs_controller.js +43 -0
  133. data/app/javascript/renalware/controllers/toggle_controller.js +2 -2
  134. data/app/javascript/renalware/index.js +10 -0
  135. data/app/models/concerns/renalware/patients_ransack_helper.rb +2 -0
  136. data/app/models/concerns/renalware/sortable.rb +49 -0
  137. data/app/models/renalware/accesses/patient.rb +2 -2
  138. data/app/models/renalware/accesses/plan.rb +1 -1
  139. data/app/models/renalware/admissions/request.rb +1 -0
  140. data/app/models/renalware/clinical/body_composition.rb +1 -1
  141. data/app/models/renalware/clinical/dry_weight.rb +1 -1
  142. data/app/models/renalware/clinics/body_surface_area.rb +40 -0
  143. data/app/models/renalware/clinics/clinic_visit.rb +25 -4
  144. data/app/models/renalware/clinics/total_body_water.rb +63 -0
  145. data/app/models/renalware/events/advanced_care_plan.rb +24 -0
  146. data/app/models/renalware/events/clinical_frailty_score.rb +24 -0
  147. data/app/models/renalware/feeds/files/create_feed_file.rb +1 -1
  148. data/app/models/renalware/feeds/hl7_message.rb +1 -0
  149. data/app/models/renalware/hd/patient.rb +1 -1
  150. data/app/models/renalware/hd/preference_set.rb +1 -1
  151. data/app/models/renalware/hd/prescription_last_administration_query.rb +4 -0
  152. data/app/models/renalware/hd/profile.rb +4 -4
  153. data/app/models/renalware/hd/schedule_definition.rb +1 -1
  154. data/app/models/renalware/hd/session.rb +2 -2
  155. data/app/models/renalware/hd/session_forms/batch_compile_pdfs.rb +1 -1
  156. data/app/models/renalware/hd/session_forms/pdf_renderer.rb +1 -1
  157. data/app/models/renalware/hd/sessions/auditable_session_collection.rb +4 -1
  158. data/app/models/renalware/hd/station.rb +2 -1
  159. data/app/models/renalware/letters/description.rb +2 -0
  160. data/app/models/renalware/letters/html_renderer.rb +1 -1
  161. data/app/models/renalware/letters/letter.rb +1 -1
  162. data/app/models/renalware/letters/part/prescriptions.rb +12 -3
  163. data/app/models/renalware/letters/pdf_letter_cache.rb +1 -1
  164. data/app/models/renalware/letters/printing/batch_compile_pdfs.rb +1 -1
  165. data/app/models/renalware/letters/printing/duplex_interleaved_pdf_renderer.rb +1 -1
  166. data/app/models/renalware/letters/recipient_address_pdf_renderer.rb +1 -1
  167. data/app/models/renalware/letters/recipient_params_processor.rb +1 -1
  168. data/app/models/renalware/medications/prescription.rb +0 -4
  169. data/app/models/renalware/messaging/internal/message_form.rb +1 -0
  170. data/app/models/renalware/messaging/internal/message_form_builder.rb +2 -1
  171. data/app/models/renalware/pathology/current_observations_for_descriptions_query.rb +3 -3
  172. data/app/models/renalware/pathology/measurement_unit.rb +13 -0
  173. data/app/models/renalware/pathology/nearest_observations_query.rb +44 -0
  174. data/app/models/renalware/pathology/observation_description.rb +23 -5
  175. data/app/models/renalware/pathology/observation_descriptions_by_code_query.rb +1 -1
  176. data/app/models/renalware/pathology/observation_requests_attributes_builder.rb +45 -5
  177. data/app/models/renalware/pathology/observations_jsonb_serializer.rb +1 -1
  178. data/app/models/renalware/pathology/observations_within_date_range_query.rb +1 -1
  179. data/app/models/renalware/patient.rb +18 -3
  180. data/app/models/renalware/patients/alert.rb +1 -0
  181. data/app/models/renalware/patients/bookmark.rb +2 -2
  182. data/app/models/renalware/patients/ingestion/update_master_patient_index.rb +1 -0
  183. data/app/models/renalware/patients/mdm_menu.rb +41 -0
  184. data/app/models/renalware/patients/mdm_patients_query.rb +1 -1
  185. data/app/models/renalware/patients/patient_hospital_identifiers.rb +1 -0
  186. data/app/models/renalware/patients/search_query.rb +1 -1
  187. data/app/models/renalware/patients/worry.rb +0 -1
  188. data/app/models/renalware/pd.rb +2 -0
  189. data/app/models/renalware/pd/adequacy_calculated_attributes.rb +159 -0
  190. data/app/models/renalware/pd/adequacy_result.rb +76 -0
  191. data/app/models/renalware/pd/apd/glucose_calculator.rb +1 -0
  192. data/app/models/renalware/pd/mdm_patients_query.rb +1 -1
  193. data/app/models/renalware/pd/patient.rb +4 -0
  194. data/app/models/renalware/pd/pet_dextrose_concentration.rb +17 -0
  195. data/app/models/renalware/pd/pet_result.rb +92 -0
  196. data/app/models/renalware/pd/unified_pet_adequacy_form.rb +46 -0
  197. data/app/models/renalware/problems/problem.rb +2 -1
  198. data/app/models/renalware/renal/registry/preflight_checks/missing_esrf_query.rb +50 -0
  199. data/app/models/renalware/snippets/duplicate_snippet_title_generator.rb +1 -0
  200. data/app/models/renalware/snippets/snippet_query.rb +1 -1
  201. data/app/models/renalware/surveys/question.rb +1 -2
  202. data/app/models/renalware/system/column_definition.rb +43 -0
  203. data/app/models/renalware/system/filter_definition.rb +29 -0
  204. data/app/models/renalware/system/update_user.rb +5 -0
  205. data/app/models/renalware/system/version.rb +11 -0
  206. data/app/models/renalware/system/view_metadata.rb +25 -0
  207. data/app/models/renalware/transplants/donation.rb +1 -1
  208. data/app/models/renalware/transplants/donor_followup.rb +0 -1
  209. data/app/models/renalware/transplants/failure_cause_description.rb +1 -1
  210. data/app/models/renalware/transplants/mdm_patients_query.rb +2 -2
  211. data/app/models/renalware/transplants/patient.rb +1 -1
  212. data/app/models/renalware/transplants/recipient_followup.rb +1 -3
  213. data/app/models/renalware/transplants/recipient_workup_builder.rb +1 -0
  214. data/app/models/renalware/transplants/registration.rb +1 -3
  215. data/app/models/renalware/transplants/registration_status.rb +1 -1
  216. data/app/models/renalware/transplants/registrations/wait_list_query.rb +4 -4
  217. data/app/models/renalware/ukrdc/measurement_unit.rb +21 -0
  218. data/app/models/renalware/ukrdc/outgoing/rendering/lab_order.rb +30 -2
  219. data/app/models/renalware/ukrdc/outgoing/rendering/patient_number.rb +1 -1
  220. data/app/models/renalware/ukrdc/paths.rb +1 -1
  221. data/app/models/renalware/ukrdc/treatment_timeline/prepare_tables.rb +1 -1
  222. data/app/models/renalware/ukrdc/treatment_timeline/remap_model_table_names_to_their_prepared_equivalents.rb +1 -1
  223. data/app/models/renalware/user.rb +10 -0
  224. data/app/pdfs/renalware/events/event_pdf.rb +1 -0
  225. data/app/policies/application_policy.rb +1 -1
  226. data/app/policies/renalware/events/advanced_care_plan_policy.rb +10 -0
  227. data/app/policies/renalware/events/clinical_frailty_score_policy.rb +10 -0
  228. data/app/policies/renalware/medications/prescription_policy.rb +35 -0
  229. data/app/policies/renalware/pd/adequacy_result_policy.rb +15 -0
  230. data/app/policies/renalware/pd/pet_result_policy.rb +15 -0
  231. data/app/policies/renalware/renal/registry_preflight_check_policy.rb +4 -0
  232. data/app/policies/renalware/system/view_metadata_policy.rb +17 -0
  233. data/app/presenters/concerns/renalware/accountable_presentation.rb +33 -0
  234. data/app/presenters/renalware/clinical/profile_presenter.rb +1 -0
  235. data/app/presenters/renalware/clinics/visit_presenter.rb +11 -0
  236. data/app/presenters/renalware/events/event_presenter.rb +11 -0
  237. data/app/presenters/renalware/hd/dashboard_presenter.rb +1 -0
  238. data/app/presenters/renalware/hd/profile_presenter.rb +1 -0
  239. data/app/presenters/renalware/hd/scheduling/diary_presenter.rb +1 -0
  240. data/app/presenters/renalware/hd/session_presenter.rb +1 -0
  241. data/app/presenters/renalware/hd/unmet_preferences_presenter.rb +1 -1
  242. data/app/presenters/renalware/mdm_patients_presenter.rb +1 -0
  243. data/app/presenters/renalware/mdm_presenter.rb +11 -0
  244. data/app/presenters/renalware/pathology/results_presenter.rb +1 -2
  245. data/app/presenters/renalware/pd/dashboard_presenter.rb +10 -2
  246. data/app/presenters/renalware/renal/clinical_summary_presenter.rb +9 -6
  247. data/app/presenters/renalware/ukrdc/patient_presenter.rb +1 -0
  248. data/app/presenters/renalware/user_session_presenter.rb +1 -1
  249. data/app/validators/renalware/patients/nhs_number_validator.rb +88 -0
  250. data/app/values/renalware/address.rb +1 -0
  251. data/app/views/renalware/accesses/assessments/show.html.slim +1 -1
  252. data/app/views/renalware/accesses/procedures/show.html.slim +1 -1
  253. data/app/views/renalware/accesses/profiles/show.html.slim +1 -1
  254. data/app/views/renalware/admin/cache/show.html.slim +36 -0
  255. data/app/views/renalware/admin/playgrounds/show.html.slim +5 -6
  256. data/app/views/renalware/admin/users/edit.html.slim +9 -0
  257. data/app/views/renalware/admin/users/index.html.slim +6 -0
  258. data/app/views/renalware/admissions/admissions/_filters.html.slim +8 -16
  259. data/app/views/renalware/clinical/allergies/_list.html.slim +3 -1
  260. data/app/views/renalware/clinical/profiles/show.html.slim +11 -1
  261. data/app/views/renalware/clinics/clinic_visits/_table.html.slim +2 -0
  262. data/app/views/renalware/clinics/clinic_visits/_table_row.html.slim +2 -0
  263. data/app/views/renalware/dashboard/dashboards/show.html.slim +1 -0
  264. data/app/views/renalware/dashboard/letters/_letter.html.slim +1 -1
  265. data/app/views/renalware/directory/people/show.html.slim +1 -1
  266. data/app/views/renalware/events/advanced_care_plans/_cell.html.slim +2 -0
  267. data/app/views/renalware/events/advanced_care_plans/_inputs.html.slim +4 -0
  268. data/app/views/renalware/events/advanced_care_plans/_toggled_cell.html.slim +8 -0
  269. data/app/views/renalware/events/clinical_frailty_score/_cell.html.slim +2 -0
  270. data/app/views/renalware/events/clinical_frailty_score/_inputs.html.slim +4 -0
  271. data/app/views/renalware/events/clinical_frailty_score/_toggled_cell.html.slim +8 -0
  272. data/app/views/renalware/events/events/_table.html.slim +1 -1
  273. data/app/views/renalware/hd/current_profile/_show.html.slim +1 -1
  274. data/app/views/renalware/hd/current_profile/show.html.slim +1 -1
  275. data/app/views/renalware/hd/prescription_administrations/_form.html.slim +2 -0
  276. data/app/views/renalware/hd/protocols/_virology.html.slim +4 -5
  277. data/app/views/renalware/hd/sessions/_show.html.slim +1 -1
  278. data/app/views/renalware/hd/witnesses/_form.html.slim +2 -0
  279. data/app/views/renalware/letters/electronic_receipts/_table.html.slim +1 -1
  280. data/app/views/renalware/letters/letters/_form.html.slim +1 -1
  281. data/app/views/renalware/letters/parts/_prescriptions.html.slim +4 -0
  282. data/app/views/renalware/low_clearance/dashboards/show.html.slim +10 -0
  283. data/app/views/renalware/mdm/_pathology.html.slim +0 -1
  284. data/app/views/renalware/mdm/_prescriptions.html.slim +4 -13
  285. data/app/views/renalware/mdm/prescriptions/_table.html.slim +3 -1
  286. data/app/views/renalware/mdm/show.html.slim +1 -1
  287. data/app/views/renalware/medications/prescriptions/_current_hd.html.slim +13 -0
  288. data/app/views/renalware/medications/prescriptions/_filter_form.html.slim +26 -13
  289. data/app/views/renalware/medications/prescriptions/_form.html.slim +3 -2
  290. data/app/views/renalware/medications/prescriptions/_options.html.slim +3 -3
  291. data/app/views/renalware/medications/prescriptions/_table.html.slim +5 -4
  292. data/app/views/renalware/medications/prescriptions/_tables.html.slim +13 -16
  293. data/app/views/renalware/medications/prescriptions/index.html.slim +5 -4
  294. data/app/views/renalware/messaging/internal/messages/_form.html.slim +3 -0
  295. data/app/views/renalware/messaging/internal/messages/index.html.slim +36 -0
  296. data/app/views/renalware/navigation/_mdms.html.slim +5 -0
  297. data/app/views/renalware/navigation/_menu.html.slim +1 -0
  298. data/app/views/renalware/navigation/_pd.html.slim +5 -0
  299. data/app/views/renalware/navigation/_renal.html.slim +1 -0
  300. data/app/views/renalware/navigation/{_super_admin.html.slim → _super_admin.html.slim.dead} +0 -0
  301. data/app/views/renalware/pathology/charts/show.html.slim +11 -0
  302. data/app/views/renalware/pathology/code_groups/edit.html.slim +5 -5
  303. data/app/views/renalware/pathology/code_groups/index.html.slim +4 -5
  304. data/app/views/renalware/pathology/code_groups/show.html.slim +25 -26
  305. data/app/views/renalware/pathology/current_observation_results/index.html.slim +6 -0
  306. data/app/views/renalware/pathology/historical_observation_results/_table.html.slim +4 -3
  307. data/app/views/renalware/pathology/historical_observation_results/index.html.slim +1 -1
  308. data/app/views/renalware/pathology/observation_descriptions/_filters.html.slim +14 -0
  309. data/app/views/renalware/pathology/observation_descriptions/edit.html.slim +21 -0
  310. data/app/views/renalware/pathology/observation_descriptions/index.html.slim +38 -0
  311. data/app/views/renalware/pathology/observations/_diff.html.slim +1 -1
  312. data/app/views/renalware/pathology/requests/requests/request_form/_crs_form.html.slim +1 -1
  313. data/app/views/renalware/patients/alerts/_list.html.slim +1 -0
  314. data/app/views/renalware/patients/mdms/_filters.html.slim +38 -0
  315. data/app/views/renalware/patients/mdms/_table.html.slim +72 -0
  316. data/app/views/renalware/patients/mdms/show.html.slim +18 -0
  317. data/app/views/renalware/patients/patients/show.html.slim +1 -1
  318. data/app/views/renalware/patients/side_menu/_general.html.slim +4 -0
  319. data/app/views/renalware/patients/worryboard/_filters.html.slim +18 -13
  320. data/app/views/renalware/pd/_exit_site_infections.html.slim +4 -0
  321. data/app/views/renalware/pd/_peritonitis_episodes.html.slim +14 -11
  322. data/app/views/renalware/pd/adequacy_completions/_filters.html.slim +19 -0
  323. data/app/views/renalware/pd/adequacy_completions/index.html.slim +4 -0
  324. data/app/views/renalware/pd/adequacy_results/_form_fields.html.slim +9 -0
  325. data/app/views/renalware/pd/adequacy_results/_table.html.slim +72 -0
  326. data/app/views/renalware/pd/adequacy_results/edit.html.slim +89 -0
  327. data/app/views/renalware/pd/adequacy_results/index.js.erb +1 -0
  328. data/app/views/renalware/pd/adequacy_results/new.html.slim +8 -0
  329. data/app/views/renalware/pd/dashboards/show.html.slim +3 -0
  330. data/app/views/renalware/pd/dashboards/show/_page_actions.html.slim +10 -3
  331. data/app/views/renalware/pd/dashboards/show/_pet_adequacies.html.slim +1 -1
  332. data/app/views/renalware/pd/peritonitis_episodes/show.html.slim +8 -6
  333. data/app/views/renalware/pd/pet_completions/_filters.html.slim +24 -0
  334. data/app/views/renalware/pd/pet_completions/index.html.slim +4 -0
  335. data/app/views/renalware/pd/pet_results/_form_fields.html.slim +12 -0
  336. data/app/views/renalware/pd/pet_results/_pathology_results.html.slim +36 -0
  337. data/app/views/renalware/pd/pet_results/_table.html.slim +62 -0
  338. data/app/views/renalware/pd/pet_results/edit.html.slim +35 -0
  339. data/app/views/renalware/pd/pet_results/index.js.erb +1 -0
  340. data/app/views/renalware/pd/pet_results/new.html.slim +8 -0
  341. data/app/views/renalware/pd/unified_pet_adequacies/_form.html.slim +22 -0
  342. data/app/views/renalware/pd/unified_pet_adequacies/new.html.slim +2 -0
  343. data/app/views/renalware/renal/profiles/show.html.slim +1 -1
  344. data/app/views/renalware/renal/registry_preflight_checks/_filters.html.slim +5 -3
  345. data/app/views/renalware/renal/registry_preflight_checks/_navigation.html.slim +1 -0
  346. data/app/views/renalware/renal/registry_preflight_checks/deaths.html.slim +2 -1
  347. data/app/views/renalware/renal/registry_preflight_checks/missing_esrf.html.slim +12 -0
  348. data/app/views/renalware/renal/registry_preflight_checks/patients.html.slim +1 -2
  349. data/app/views/renalware/shared/_fieldset.html.slim +1 -2
  350. data/app/views/renalware/shared/_magellan_block.html.slim +1 -2
  351. data/app/views/renalware/surveys/dashboards/show.html.slim +2 -2
  352. data/app/views/renalware/system/view_metadata/_columns_table.html.slim +44 -0
  353. data/app/views/renalware/system/view_metadata/_filters_form.html.slim +19 -0
  354. data/app/views/renalware/system/view_metadata/_versions.html.slim +23 -0
  355. data/app/views/renalware/system/view_metadata/edit.html.slim +66 -0
  356. data/app/views/renalware/transplants/donor_workups/show.html.slim +1 -1
  357. data/app/views/renalware/transplants/mdm/_bottom.html.slim +3 -1
  358. data/app/views/renalware/transplants/mdm/_prescriptions.html.slim +6 -22
  359. data/app/views/renalware/transplants/recipient_followups/show.html.slim +1 -1
  360. data/app/views/renalware/transplants/recipient_operations/show.html.slim +1 -1
  361. data/app/views/renalware/transplants/recipient_workups/show.html.slim +1 -1
  362. data/app/views/renalware/transplants/registrations/show.html.slim +1 -1
  363. data/app/views/renalware/users/_filters.html.slim +11 -0
  364. data/app/views/renalware/users/index.html.slim +24 -0
  365. data/config/initializers/core_extensions.rb +2 -2
  366. data/config/initializers/delayed_job.rb +1 -1
  367. data/config/initializers/inflections.rb +9 -0
  368. data/config/initializers/pagy.rb +5 -0
  369. data/config/initializers/wicked_pdf.rb +12 -0
  370. data/config/locales/en-GB.yml +1 -1
  371. data/config/locales/renalware/clinical/allergies.en.yml +1 -0
  372. data/config/locales/renalware/events/advanced_care_plan.en.yml +12 -0
  373. data/config/locales/renalware/events/biopsy.en.yml +2 -0
  374. data/config/locales/renalware/events/clinical_frailty_score.en.yml +16 -0
  375. data/config/locales/renalware/events/clinical_frailty_score_component.en.yml +8 -0
  376. data/config/locales/renalware/medications/tabbed_prescriptions_list_component.yml +15 -0
  377. data/config/locales/renalware/navigation/renal.en.yml +1 -0
  378. data/config/locales/renalware/nhs_number.en.yml +6 -0
  379. data/config/locales/renalware/patients/side_menu.en.yml +1 -0
  380. data/config/locales/renalware/pd/adequacy_result.en.yml +9 -0
  381. data/config/locales/renalware/pd/dashboard.en.yml +3 -0
  382. data/config/locales/renalware/pd/pet_result.en.yml +23 -0
  383. data/config/locales/renalware/renal/registry.en.yml +1 -0
  384. data/config/permissions.yml +1 -0
  385. data/config/routes.rb +1 -0
  386. data/config/routes/messaging.rb +9 -1
  387. data/config/routes/pathology.rb +7 -0
  388. data/config/routes/patients.rb +1 -0
  389. data/config/routes/pd.rb +5 -0
  390. data/config/routes/renal.rb +1 -0
  391. data/config/routes/system.rb +3 -0
  392. data/config/routes/users.rb +3 -0
  393. data/db/functions/convert_to_float_with_explicit_return_v01.sql +18 -0
  394. data/db/functions/generate_secure_id_v01.sql +1 -1
  395. data/db/functions/update_current_observation_set_from_trigger_v05.sql +92 -0
  396. data/db/functions/update_pathology_observations_nresult_from_trigger_v01.sql +13 -0
  397. data/db/migrate/20200122182018_update_patient_current_modalities.rb +7 -0
  398. data/db/migrate/20200122182036_create_transplant_mdm_patients.rb +7 -0
  399. data/db/migrate/20200122190909_create_view_metadata.rb +44 -0
  400. data/db/migrate/20200131133223_create_hd_mdm_patients.rb +7 -0
  401. data/db/migrate/20200205185151_add_columns_to_system_view_metadata.rb +13 -0
  402. data/db/migrate/20200219113324_create_supportive_care_mdm_patients_view.rb +7 -0
  403. data/db/migrate/20200226145010_add_unique_indexes.rb +47 -0
  404. data/db/migrate/20200421082715_add_body_surface_area_to_clinic_visits.rb +8 -0
  405. data/db/migrate/20200421132911_create_pd_pet_dextrose_concentrations.rb +13 -0
  406. data/db/migrate/20200421143546_create_pet_results.rb +66 -0
  407. data/db/migrate/20200427123229_create_adequacy_results.rb +54 -0
  408. data/db/migrate/20200616115709_add_height_weight_to_pd_adequacy_results.rb +8 -0
  409. data/db/migrate/20200618144228_add_feature_flags_to_users.rb +14 -0
  410. data/db/migrate/20200622120232_add_limits_to_path_obs_descriptions.rb +18 -0
  411. data/db/migrate/20200626081248_overload_convert_to_float_function.rb +13 -0
  412. data/db/migrate/20200626090256_add_nresult_to_pathology_observations.rb +29 -0
  413. data/db/migrate/20200628094228_add_prescriber_to_users.rb +14 -0
  414. data/db/migrate/20200812074223_add_public_flag_to_messages.rb +18 -0
  415. data/db/migrate/20200815150303_create_system_versions.rb +16 -0
  416. data/db/migrate/20200817085618_create_pd_mdm_patients.rb +7 -0
  417. data/db/migrate/20200817103930_create_low_clearance_mdm_patients.rb +7 -0
  418. data/db/migrate/20201001144512_update_fn_update_current_obs_set_triggerv05.rb +13 -0
  419. data/db/migrate/20201001145452_add_position_to_letter_descriptions.rb +5 -0
  420. data/db/migrate/20201009090959_make_drug_types_unique.rb +8 -0
  421. data/db/migrate/20201012160414_add_suggested_measurement_unit_to_pathology_observation_descriptions.rb +18 -0
  422. data/db/migrate/20201012171428_create_ukrdc_measurement_units.rb +18 -0
  423. data/db/migrate/20201015160542_add_position_to_drug_types.rb +31 -0
  424. data/db/migrate/20201020155510_add_bmi_to_clinic_visits.rb +28 -0
  425. data/db/migrate/20201020164524_update_pd_mdm_patients_view.rb +7 -0
  426. data/db/migrate/20201020170921_update_hd_mdm_patients_view.rb +7 -0
  427. data/db/migrate/20201020171139_update_low_clearance_mdm_patients_view.rb +7 -0
  428. data/db/migrate/20201021153832_update_supportive_care_mdm_patients_view.rb +7 -0
  429. data/db/migrate/20201021154809_update_transplant_mdm_patients_view.rb +7 -0
  430. data/db/migrate/20201023092859_remove_unused_indexes.rb +20 -0
  431. data/db/seeds/default/events/event_types.csv +2 -0
  432. data/db/seeds/default/system/seeds.rb +1 -0
  433. data/db/seeds/default/system/view_metadata.rb +91 -0
  434. data/db/seeds/default/ukrdc/measurement_units.csv +12 -0
  435. data/db/seeds/default/ukrdc/measurement_units.rb +15 -0
  436. data/db/seeds/default/ukrdc/seeds.rb +1 -0
  437. data/db/triggers/update_pathology_observations_nresult_trigger_v01.sql +11 -0
  438. data/db/views/hd_mdm_patients_v01.sql +69 -0
  439. data/db/views/hd_mdm_patients_v02.sql +70 -0
  440. data/db/views/low_clearance_mdm_patients_v01.sql +38 -0
  441. data/db/views/low_clearance_mdm_patients_v02.sql +39 -0
  442. data/db/views/patient_current_modalities_v02.sql +18 -0
  443. data/db/views/pd_mdm_patients_v01.sql +42 -0
  444. data/db/views/pd_mdm_patients_v02.sql +43 -0
  445. data/db/views/supportive_care_mdm_patients_v01.sql +28 -0
  446. data/db/views/supportive_care_mdm_patients_v02.sql +29 -0
  447. data/db/views/transplant_mdm_patients_v01.sql +46 -0
  448. data/db/views/transplant_mdm_patients_v02.sql +47 -0
  449. data/lib/renalware/configuration.rb +2 -0
  450. data/lib/renalware/engine.rb +6 -4
  451. data/lib/renalware/version_number.rb +10 -0
  452. data/lib/tasks/db.rake +9 -0
  453. data/lib/tasks/pd.rake +28 -0
  454. data/lib/tasks/renalware.rake +7 -1
  455. data/spec/factories/accesses/profiles.rb +1 -0
  456. data/spec/factories/drugs/drug_types.rb +5 -1
  457. data/spec/factories/events/events_types.rb +12 -0
  458. data/spec/factories/messaging/internal/messages.rb +1 -0
  459. data/spec/factories/patients/patients.rb +22 -1
  460. data/spec/factories/patients/practices.rb +1 -1
  461. data/spec/factories/patients/primary_care_physicians.rb +1 -1
  462. data/spec/factories/pd/adequacy_results.rb +16 -0
  463. data/spec/factories/pd/pet_results.rb +9 -0
  464. data/spec/factories/system/users.rb +1 -0
  465. data/spec/factories/system/view_metadata.rb +20 -0
  466. data/spec/support/capybara_helper.rb +2 -4
  467. data/spec/support/letters_spec_helper.rb +1 -1
  468. data/spec/support/matchers/validate_timeliness_of.rb +1 -1
  469. data/spec/support/pathology_spec_helper.rb +1 -2
  470. data/spec/support/policy_spec_helper.rb +12 -0
  471. data/vendor/assets/javascripts/foundation/foundation.alert.js +43 -0
  472. data/vendor/assets/javascripts/foundation/foundation.dropdown.js +468 -0
  473. data/vendor/assets/javascripts/foundation/foundation.js +727 -0
  474. data/vendor/assets/javascripts/foundation/foundation.reveal.js +522 -0
  475. data/vendor/assets/javascripts/foundation/foundation.tab.js +247 -0
  476. data/vendor/assets/javascripts/foundation/foundation.tooltip.js +348 -0
  477. data/vendor/assets/javascripts/foundation/foundation.topbar.js +458 -0
  478. data/vendor/assets/stylesheets/foundation/_functions.scss +156 -0
  479. data/vendor/assets/stylesheets/foundation/components/_alert-boxes.scss +128 -0
  480. data/vendor/assets/stylesheets/foundation/components/_buttons.scss +261 -0
  481. data/vendor/assets/stylesheets/foundation/components/_dropdown-buttons.scss +130 -0
  482. data/vendor/assets/stylesheets/foundation/components/_dropdown.scss +269 -0
  483. data/vendor/assets/stylesheets/foundation/components/_forms.scss +601 -0
  484. data/vendor/assets/stylesheets/foundation/components/_global.scss +566 -0
  485. data/vendor/assets/stylesheets/foundation/components/_grid.scss +292 -0
  486. data/vendor/assets/stylesheets/foundation/components/_labels.scss +106 -0
  487. data/vendor/assets/stylesheets/foundation/components/_pagination.scss +163 -0
  488. data/vendor/assets/stylesheets/foundation/components/_panels.scss +107 -0
  489. data/vendor/assets/stylesheets/foundation/components/_reveal.scss +212 -0
  490. data/vendor/assets/stylesheets/foundation/components/_side-nav.scss +120 -0
  491. data/vendor/assets/stylesheets/foundation/components/_split-buttons.scss +203 -0
  492. data/vendor/assets/stylesheets/foundation/components/_sub-nav.scss +125 -0
  493. data/vendor/assets/stylesheets/foundation/components/_tables.scss +135 -0
  494. data/vendor/assets/stylesheets/foundation/components/_tabs.scss +142 -0
  495. data/vendor/assets/stylesheets/foundation/components/_tooltips.scss +142 -0
  496. data/vendor/assets/stylesheets/foundation/components/_top-bar.scss +745 -0
  497. data/vendor/assets/stylesheets/foundation/components/_type.scss +525 -0
  498. data/vendor/assets/stylesheets/foundation/components/_visibility.scss +425 -0
  499. metadata +273 -85
  500. data/app/components/renalware/events/biopsies_component.rb +0 -20
  501. data/app/views/renalware/pd/infection_organisms/_edit.html.slim.obsolete +0 -16
  502. data/app/views/renalware/transplants/donor_operations/_sections_nav.html.slim +0 -11
  503. data/app/views/renalware/transplants/donor_workups/_sections_nav.html.slim +0 -15
  504. data/app/views/renalware/transplants/recipient_operations/_sections_nav.html.slim +0 -14
  505. data/app/views/renalware/transplants/recipient_workups/_sections_nav.html.slim +0 -15
  506. data/lib/core_extensions/active_record/sort.rb +0 -52
  507. data/lib/renalware/version.rb +0 -5
  508. data/spec/support/pages/accesses/procedure_page.rb +0 -53
  509. data/spec/support/pages/accesses/profile_page.rb +0 -45
  510. data/spec/support/pages/admissions/consults_page.rb +0 -26
  511. data/spec/support/pages/clinical/allergy_page.rb +0 -74
  512. data/spec/support/pages/clinical/profile_page.rb +0 -28
  513. data/spec/support/pages/hd/prescription_administration_dialog.rb +0 -132
  514. data/spec/support/pages/letters/form.rb +0 -63
  515. data/spec/support/pages/letters/mailshots/form.rb +0 -58
  516. data/spec/support/pages/letters/patient_letters.rb +0 -20
  517. data/spec/support/pages/low_clearance/profile_page.rb +0 -70
  518. data/spec/support/pages/medications/home_delivery_dialog.rb +0 -77
  519. data/spec/support/pages/medications/prescription_fom.rb +0 -62
  520. data/spec/support/pages/page_object.rb +0 -10
@@ -1,9 +1,17 @@
1
- function createCommonjsModule(fn, module) {
1
+ function createCommonjsModule(fn, basedir, module) {
2
2
  return module = {
3
- exports: {}
3
+ path: basedir,
4
+ exports: {},
5
+ require: function(path, base) {
6
+ return commonjsRequire(path, base === undefined || base === null ? module.path : base);
7
+ }
4
8
  }, fn(module, module.exports), module.exports;
5
9
  }
6
10
 
11
+ function commonjsRequire() {
12
+ throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
13
+ }
14
+
7
15
  var _global = createCommonjsModule(function(module) {
8
16
  var global = module.exports = typeof window != "undefined" && window.Math == Math ? window : typeof self != "undefined" && self.Math == Math ? self : Function("return this")();
9
17
  if (typeof __g == "number") __g = global;
@@ -16,8 +24,6 @@ var _core = createCommonjsModule(function(module) {
16
24
  if (typeof __e == "number") __e = core;
17
25
  });
18
26
 
19
- var _core_1 = _core.version;
20
-
21
27
  var _isObject = function(it) {
22
28
  return typeof it === "object" ? it !== null : typeof it === "function";
23
29
  };
@@ -934,16 +940,6 @@ var _meta = createCommonjsModule(function(module) {
934
940
  };
935
941
  });
936
942
 
937
- var _meta_1 = _meta.KEY;
938
-
939
- var _meta_2 = _meta.NEED;
940
-
941
- var _meta_3 = _meta.fastKey;
942
-
943
- var _meta_4 = _meta.getWeak;
944
-
945
- var _meta_5 = _meta.onFreeze;
946
-
947
943
  var _validateCollection = function(it, TYPE) {
948
944
  if (!_isObject(it) || it._t !== TYPE) throw TypeError("Incompatible receiver, " + TYPE + " required!");
949
945
  return it;
@@ -3807,6 +3803,37 @@ function _createSuper(Derived) {
3807
3803
  };
3808
3804
  }
3809
3805
 
3806
+ function _toConsumableArray(arr) {
3807
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
3808
+ }
3809
+
3810
+ function _arrayWithoutHoles(arr) {
3811
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
3812
+ }
3813
+
3814
+ function _iterableToArray(iter) {
3815
+ if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
3816
+ }
3817
+
3818
+ function _unsupportedIterableToArray(o, minLen) {
3819
+ if (!o) return;
3820
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
3821
+ var n = Object.prototype.toString.call(o).slice(8, -1);
3822
+ if (n === "Object" && o.constructor) n = o.constructor.name;
3823
+ if (n === "Map" || n === "Set") return Array.from(n);
3824
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
3825
+ }
3826
+
3827
+ function _arrayLikeToArray(arr, len) {
3828
+ if (len == null || len > arr.length) len = arr.length;
3829
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
3830
+ return arr2;
3831
+ }
3832
+
3833
+ function _nonIterableSpread() {
3834
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3835
+ }
3836
+
3810
3837
  var $ = window.$;
3811
3838
 
3812
3839
  var _default = function(_Controller) {
@@ -3822,7 +3849,7 @@ var _default = function(_Controller) {
3822
3849
  event.preventDefault;
3823
3850
  var tbody = event.target.closest("tbody");
3824
3851
  tbody.classList.toggle("toggleable--open");
3825
- $(".grid > .row").masonry("layout");
3852
+ $(".mgrid > .row").masonry("layout");
3826
3853
  }
3827
3854
  }, {
3828
3855
  key: "table",
@@ -3836,7 +3863,7 @@ var _default = function(_Controller) {
3836
3863
  tbodies.forEach(function(tbody) {
3837
3864
  tbody.classList.toggle("toggleable--open", !hide);
3838
3865
  });
3839
- $(".grid > .row").masonry("layout");
3866
+ $(".mgrid > .row").masonry("layout");
3840
3867
  }
3841
3868
  } ]);
3842
3869
  return _default;
@@ -4197,12 +4224,3118 @@ var _default$7 = function(_Controller) {
4197
4224
  }, {
4198
4225
  key: "debug",
4199
4226
  get: function get() {
4200
- return this.data.get("debug");
4227
+ return this.data.get("debug") === "true";
4228
+ }
4229
+ } ]);
4230
+ return _default;
4231
+ }(Controller);
4232
+
4233
+ var _default$8 = function(_Controller) {
4234
+ _inherits(_default, _Controller);
4235
+ var _super = _createSuper(_default);
4236
+ function _default() {
4237
+ _classCallCheck(this, _default);
4238
+ return _super.apply(this, arguments);
4239
+ }
4240
+ _createClass(_default, [ {
4241
+ key: "connect",
4242
+ value: function connect() {
4243
+ this.toggleClass = this.data.get("class") || "hidden";
4244
+ }
4245
+ }, {
4246
+ key: "toggle",
4247
+ value: function toggle(event) {
4248
+ var _this = this;
4249
+ event.preventDefault();
4250
+ this.toggleableTargets.forEach(function(target) {
4251
+ target.classList.toggle(_this.toggleClass);
4252
+ });
4253
+ }
4254
+ } ]);
4255
+ return _default;
4256
+ }(Controller);
4257
+
4258
+ _defineProperty(_default$8, "targets", [ "toggleable" ]);
4259
+
4260
+ var _default$9 = function(_Controller) {
4261
+ _inherits(_default, _Controller);
4262
+ var _super = _createSuper(_default);
4263
+ function _default() {
4264
+ _classCallCheck(this, _default);
4265
+ return _super.apply(this, arguments);
4266
+ }
4267
+ _createClass(_default, [ {
4268
+ key: "connect",
4269
+ value: function connect() {}
4270
+ }, {
4271
+ key: "initialize",
4272
+ value: function initialize() {
4273
+ this.activeTabClasses = (this.data.get("activeTab") || "active").split(" ");
4274
+ this.showTab();
4275
+ }
4276
+ }, {
4277
+ key: "change",
4278
+ value: function change(event) {
4279
+ event.preventDefault();
4280
+ this.index = this.tabTargets.indexOf(event.currentTarget);
4281
+ }
4282
+ }, {
4283
+ key: "showTab",
4284
+ value: function showTab() {
4285
+ var _this = this;
4286
+ this.tabTargets.forEach(function(tab, index) {
4287
+ var panel = _this.panelTargets[index];
4288
+ if (index === _this.index) {
4289
+ var _tab$classList;
4290
+ panel.classList.remove("hidden");
4291
+ (_tab$classList = tab.classList).add.apply(_tab$classList, _toConsumableArray(_this.activeTabClasses));
4292
+ } else {
4293
+ var _tab$classList2;
4294
+ panel.classList.add("hidden");
4295
+ (_tab$classList2 = tab.classList).remove.apply(_tab$classList2, _toConsumableArray(_this.activeTabClasses));
4296
+ }
4297
+ });
4298
+ }
4299
+ }, {
4300
+ key: "index",
4301
+ get: function get() {
4302
+ return parseInt(this.data.get("index") || 0);
4303
+ },
4304
+ set: function set(value) {
4305
+ this.data.set("index", value);
4306
+ this.showTab();
4307
+ }
4308
+ } ]);
4309
+ return _default;
4310
+ }(Controller);
4311
+
4312
+ _defineProperty(_default$9, "targets", [ "tab", "panel" ]);
4313
+
4314
+ var highchartsMore = createCommonjsModule(function(module) {
4315
+ (function(f) {
4316
+ module.exports ? (f["default"] = f, module.exports = f) : f("undefined" !== typeof Highcharts ? Highcharts : void 0);
4317
+ })(function(f) {
4318
+ function E(l, a, c, b) {
4319
+ l.hasOwnProperty(a) || (l[a] = b.apply(null, c));
4320
+ }
4321
+ f = f ? f._modules : {};
4322
+ E(f, "parts-more/Pane.js", [ f["parts/Globals.js"], f["parts/Utilities.js"] ], function(l, a) {
4323
+ function c(d, b, n) {
4324
+ return Math.sqrt(Math.pow(d - n[0], 2) + Math.pow(b - n[1], 2)) < n[2] / 2;
4325
+ }
4326
+ var b = a.addEvent, u = a.extend, v = a.merge, w = a.pick, f = a.splat, y = l.CenteredSeriesMixin;
4327
+ l.Chart.prototype.collectionsWithUpdate.push("pane");
4328
+ a = function() {
4329
+ function d(d, b) {
4330
+ this.options = this.chart = this.center = this.background = void 0;
4331
+ this.coll = "pane";
4332
+ this.defaultOptions = {
4333
+ center: [ "50%", "50%" ],
4334
+ size: "85%",
4335
+ innerSize: "0%",
4336
+ startAngle: 0
4337
+ };
4338
+ this.defaultBackgroundOptions = {
4339
+ shape: "circle",
4340
+ borderWidth: 1,
4341
+ borderColor: "#cccccc",
4342
+ backgroundColor: {
4343
+ linearGradient: {
4344
+ x1: 0,
4345
+ y1: 0,
4346
+ x2: 0,
4347
+ y2: 1
4348
+ },
4349
+ stops: [ [ 0, "#ffffff" ], [ 1, "#e6e6e6" ] ]
4350
+ },
4351
+ from: -Number.MAX_VALUE,
4352
+ innerRadius: 0,
4353
+ to: Number.MAX_VALUE,
4354
+ outerRadius: "105%"
4355
+ };
4356
+ this.init(d, b);
4357
+ }
4358
+ d.prototype.init = function(d, b) {
4359
+ this.chart = b;
4360
+ this.background = [];
4361
+ b.pane.push(this);
4362
+ this.setOptions(d);
4363
+ };
4364
+ d.prototype.setOptions = function(d) {
4365
+ this.options = v(this.defaultOptions, this.chart.angular ? {
4366
+ background: {}
4367
+ } : void 0, d);
4368
+ };
4369
+ d.prototype.render = function() {
4370
+ var d = this.options, b = this.options.background, a = this.chart.renderer;
4371
+ this.group || (this.group = a.g("pane-group").attr({
4372
+ zIndex: d.zIndex || 0
4373
+ }).add());
4374
+ this.updateCenter();
4375
+ if (b) for (b = f(b), d = Math.max(b.length, this.background.length || 0), a = 0; a < d; a++) b[a] && this.axis ? this.renderBackground(v(this.defaultBackgroundOptions, b[a]), a) : this.background[a] && (this.background[a] = this.background[a].destroy(),
4376
+ this.background.splice(a, 1));
4377
+ };
4378
+ d.prototype.renderBackground = function(d, b) {
4379
+ var a = "animate", n = {
4380
+ class: "highcharts-pane " + (d.className || "")
4381
+ };
4382
+ this.chart.styledMode || u(n, {
4383
+ fill: d.backgroundColor,
4384
+ stroke: d.borderColor,
4385
+ "stroke-width": d.borderWidth
4386
+ });
4387
+ this.background[b] || (this.background[b] = this.chart.renderer.path().add(this.group),
4388
+ a = "attr");
4389
+ this.background[b][a]({
4390
+ d: this.axis.getPlotBandPath(d.from, d.to, d)
4391
+ }).attr(n);
4392
+ };
4393
+ d.prototype.updateCenter = function(d) {
4394
+ this.center = (d || this.axis || {}).center = y.getCenter.call(this);
4395
+ };
4396
+ d.prototype.update = function(d, b) {
4397
+ v(!0, this.options, d);
4398
+ v(!0, this.chart.options.pane, d);
4399
+ this.setOptions(this.options);
4400
+ this.render();
4401
+ this.chart.axes.forEach(function(d) {
4402
+ d.pane === this && (d.pane = null, d.update({}, b));
4403
+ }, this);
4404
+ };
4405
+ return d;
4406
+ }();
4407
+ l.Chart.prototype.getHoverPane = function(d) {
4408
+ var b = this, a;
4409
+ d && b.pane.forEach(function(n) {
4410
+ var m = d.chartX - b.plotLeft, t = d.chartY - b.plotTop;
4411
+ c(b.inverted ? t : m, b.inverted ? m : t, n.center) && (a = n);
4412
+ });
4413
+ return a;
4414
+ };
4415
+ b(l.Chart, "afterIsInsidePlot", function(d) {
4416
+ this.polar && (d.isInsidePlot = this.pane.some(function(b) {
4417
+ return c(d.x, d.y, b.center);
4418
+ }));
4419
+ });
4420
+ b(l.Pointer, "beforeGetHoverData", function(d) {
4421
+ var b = this.chart;
4422
+ b.polar && (b.hoverPane = b.getHoverPane(d), d.filter = function(a) {
4423
+ return a.visible && !(!d.shared && a.directTouch) && w(a.options.enableMouseTracking, !0) && (!b.hoverPane || a.xAxis.pane === b.hoverPane);
4424
+ });
4425
+ });
4426
+ b(l.Pointer, "afterGetHoverData", function(d) {
4427
+ var b = this.chart;
4428
+ d.hoverPoint && d.hoverPoint.plotX && d.hoverPoint.plotY && b.hoverPane && !c(d.hoverPoint.plotX, d.hoverPoint.plotY, b.hoverPane.center) && (d.hoverPoint = void 0);
4429
+ });
4430
+ l.Pane = a;
4431
+ return l.Pane;
4432
+ });
4433
+ E(f, "parts-more/RadialAxis.js", [ f["parts/Globals.js"], f["parts/Tick.js"], f["parts/Utilities.js"] ], function(l, a, c) {
4434
+ var b = c.addEvent, u = c.correctFloat, v = c.defined, w = c.extend, f = c.merge, y = c.pick, d = c.pInt, m = c.relativeLength;
4435
+ c = c.wrap;
4436
+ var n = l.Axis, t = l.noop, x = n.prototype, A = a.prototype;
4437
+ var r = {
4438
+ getOffset: t,
4439
+ redraw: function() {
4440
+ this.isDirty = !1;
4441
+ },
4442
+ render: function() {
4443
+ this.isDirty = !1;
4444
+ },
4445
+ createLabelCollector: function() {
4446
+ return !1;
4447
+ },
4448
+ setScale: t,
4449
+ setCategories: t,
4450
+ setTitle: t
4451
+ };
4452
+ var p = {
4453
+ defaultRadialGaugeOptions: {
4454
+ labels: {
4455
+ align: "center",
4456
+ x: 0,
4457
+ y: null
4458
+ },
4459
+ minorGridLineWidth: 0,
4460
+ minorTickInterval: "auto",
4461
+ minorTickLength: 10,
4462
+ minorTickPosition: "inside",
4463
+ minorTickWidth: 1,
4464
+ tickLength: 10,
4465
+ tickPosition: "inside",
4466
+ tickWidth: 2,
4467
+ title: {
4468
+ rotation: 0
4469
+ },
4470
+ zIndex: 2
4471
+ },
4472
+ defaultCircularOptions: {
4473
+ gridLineWidth: 1,
4474
+ labels: {
4475
+ align: null,
4476
+ distance: 15,
4477
+ x: 0,
4478
+ y: null,
4479
+ style: {
4480
+ textOverflow: "none"
4481
+ }
4482
+ },
4483
+ maxPadding: 0,
4484
+ minPadding: 0,
4485
+ showLastLabel: !1,
4486
+ tickLength: 0
4487
+ },
4488
+ defaultRadialOptions: {
4489
+ gridLineInterpolation: "circle",
4490
+ gridLineWidth: 1,
4491
+ labels: {
4492
+ align: "right",
4493
+ x: -3,
4494
+ y: -2
4495
+ },
4496
+ showLastLabel: !1,
4497
+ title: {
4498
+ x: 4,
4499
+ text: null,
4500
+ rotation: 90
4501
+ }
4502
+ },
4503
+ setOptions: function(h) {
4504
+ h = this.options = f(this.defaultOptions, this.defaultPolarOptions, h);
4505
+ h.plotBands || (h.plotBands = []);
4506
+ l.fireEvent(this, "afterSetOptions");
4507
+ },
4508
+ getOffset: function() {
4509
+ x.getOffset.call(this);
4510
+ this.chart.axisOffset[this.side] = 0;
4511
+ },
4512
+ getLinePath: function(h, g, e) {
4513
+ h = this.pane.center;
4514
+ var k = this.chart, p = y(g, h[2] / 2 - this.offset);
4515
+ "undefined" === typeof e && (e = this.horiz ? 0 : this.center && -this.center[3] / 2);
4516
+ e && (p += e);
4517
+ this.isCircular || "undefined" !== typeof g ? (g = this.chart.renderer.symbols.arc(this.left + h[0], this.top + h[1], p, p, {
4518
+ start: this.startAngleRad,
4519
+ end: this.endAngleRad,
4520
+ open: !0,
4521
+ innerR: 0
4522
+ }), g.xBounds = [ this.left + h[0] ], g.yBounds = [ this.top + h[1] - p ]) : (g = this.postTranslate(this.angleRad, p),
4523
+ g = [ "M", this.center[0] + k.plotLeft, this.center[1] + k.plotTop, "L", g.x, g.y ]);
4524
+ return g;
4525
+ },
4526
+ setAxisTranslation: function() {
4527
+ x.setAxisTranslation.call(this);
4528
+ this.center && (this.transA = this.isCircular ? (this.endAngleRad - this.startAngleRad) / (this.max - this.min || 1) : (this.center[2] - this.center[3]) / 2 / (this.max - this.min || 1),
4529
+ this.minPixelPadding = this.isXAxis ? this.transA * this.minPointOffset : 0);
4530
+ },
4531
+ beforeSetTickPositions: function() {
4532
+ this.autoConnect = this.isCircular && "undefined" === typeof y(this.userMax, this.options.max) && u(this.endAngleRad - this.startAngleRad) === u(2 * Math.PI);
4533
+ !this.isCircular && this.chart.inverted && this.max++;
4534
+ this.autoConnect && (this.max += this.categories && 1 || this.pointRange || this.closestPointRange || 0);
4535
+ },
4536
+ setAxisSize: function() {
4537
+ x.setAxisSize.call(this);
4538
+ if (this.isRadial) {
4539
+ this.pane.updateCenter(this);
4540
+ var h = this.center = w([], this.pane.center);
4541
+ if (this.isCircular) this.sector = this.endAngleRad - this.startAngleRad; else {
4542
+ var g = this.postTranslate(this.angleRad, h[3] / 2);
4543
+ h[0] = g.x - this.chart.plotLeft;
4544
+ h[1] = g.y - this.chart.plotTop;
4545
+ }
4546
+ this.len = this.width = this.height = (h[2] - h[3]) * y(this.sector, 1) / 2;
4547
+ }
4548
+ },
4549
+ getPosition: function(h, g) {
4550
+ h = this.translate(h);
4551
+ return this.postTranslate(this.isCircular ? h : this.angleRad, y(this.isCircular ? g : 0 > h ? 0 : h, this.center[2] / 2) - this.offset);
4552
+ },
4553
+ postTranslate: function(h, g) {
4554
+ var e = this.chart, k = this.center;
4555
+ h = this.startAngleRad + h;
4556
+ return {
4557
+ x: e.plotLeft + k[0] + Math.cos(h) * g,
4558
+ y: e.plotTop + k[1] + Math.sin(h) * g
4559
+ };
4560
+ },
4561
+ getPlotBandPath: function(h, g, e) {
4562
+ var k = this.center, p = this.startAngleRad, C = k[2] / 2, q = [ y(e.outerRadius, "100%"), e.innerRadius, y(e.thickness, 10) ], r = Math.min(this.offset, 0), b = /%$/;
4563
+ var a = this.isCircular;
4564
+ if ("polygon" === this.options.gridLineInterpolation) q = this.getPlotLinePath({
4565
+ value: h
4566
+ }).concat(this.getPlotLinePath({
4567
+ value: g,
4568
+ reverse: !0
4569
+ })); else {
4570
+ h = Math.max(h, this.min);
4571
+ g = Math.min(g, this.max);
4572
+ a || (q[0] = this.translate(h), q[1] = this.translate(g));
4573
+ q = q.map(function(e) {
4574
+ b.test(e) && (e = d(e, 10) * C / 100);
4575
+ return e;
4576
+ });
4577
+ if ("circle" !== e.shape && a) h = p + this.translate(h), g = p + this.translate(g); else {
4578
+ h = -Math.PI / 2;
4579
+ g = 1.5 * Math.PI;
4580
+ var n = !0;
4581
+ }
4582
+ q[0] -= r;
4583
+ q[2] -= r;
4584
+ q = this.chart.renderer.symbols.arc(this.left + k[0], this.top + k[1], q[0], q[0], {
4585
+ start: Math.min(h, g),
4586
+ end: Math.max(h, g),
4587
+ innerR: y(q[1], q[0] - q[2]),
4588
+ open: n
4589
+ });
4590
+ a && (a = (g + h) / 2, r = this.left + k[0] + k[2] / 2 * Math.cos(a), q.xBounds = a > -Math.PI / 2 && a < Math.PI / 2 ? [ r, this.chart.plotWidth ] : [ 0, r ],
4591
+ q.yBounds = [ this.top + k[1] + k[2] / 2 * Math.sin(a) ], q.yBounds[0] += a > -Math.PI && 0 > a || a > Math.PI ? -10 : 10);
4592
+ }
4593
+ return q;
4594
+ },
4595
+ getCrosshairPosition: function(h, g, e) {
4596
+ var k = h.value, p = this.pane.center;
4597
+ if (this.isCircular) {
4598
+ if (v(k)) h.point && (d = h.point.shapeArgs || {}, d.start && (k = this.chart.inverted ? this.translate(h.point.rectPlotY, !0) : h.point.x)); else {
4599
+ var d = h.chartX || 0;
4600
+ var q = h.chartY || 0;
4601
+ k = this.translate(Math.atan2(q - e, d - g) - this.startAngleRad, !0);
4602
+ }
4603
+ h = this.getPosition(k);
4604
+ d = h.x;
4605
+ q = h.y;
4606
+ } else v(k) || (d = h.chartX, q = h.chartY), v(d) && v(q) && (e = p[1] + this.chart.plotTop,
4607
+ k = this.translate(Math.min(Math.sqrt(Math.pow(d - g, 2) + Math.pow(q - e, 2)), p[2] / 2) - p[3] / 2, !0));
4608
+ return [ k, d || 0, q || 0 ];
4609
+ },
4610
+ getPlotLinePath: function(h) {
4611
+ var g = this, e = g.pane.center, k = g.chart, p = k.inverted, d = h.value, q = h.reverse, r = g.getPosition(d), b = g.pane.options.background ? g.pane.options.background[0] || g.pane.options.background : {}, a = b.innerRadius || "0%", n = b.outerRadius || "100%";
4612
+ b = e[0] + k.plotLeft;
4613
+ var c = e[1] + k.plotTop, t = r.x, x = r.y, u = g.height;
4614
+ r = e[3] / 2;
4615
+ var v, l;
4616
+ h.isCrosshair && (x = this.getCrosshairPosition(h, b, c), d = x[0], t = x[1], x = x[2]);
4617
+ if (g.isCircular) {
4618
+ q = Math.sqrt(Math.pow(t - b, 2) + Math.pow(x - c, 2));
4619
+ a = "string" === typeof a ? m(a, 1) : a / q;
4620
+ n = "string" === typeof n ? m(n, 1) : n / q;
4621
+ e && r && (e = r / q, a < e && (a = e), n < e && (n = e));
4622
+ var w = [ "M", b + a * (t - b), c - a * (c - x), "L", t - (1 - n) * (t - b), x + (1 - n) * (c - x) ];
4623
+ } else (d = g.translate(d)) && (0 > d || d > u) && (d = 0), "circle" === g.options.gridLineInterpolation ? w = g.getLinePath(0, d, r) : (k[p ? "yAxis" : "xAxis"].forEach(function(e) {
4624
+ e.pane === g.pane && (v = e);
4625
+ }), w = [], e = v.tickPositions, v.autoConnect && (e = e.concat([ e[0] ])), q && (e = [].concat(e).reverse()),
4626
+ d && (d += r), e.forEach(function(e, k) {
4627
+ l = v.getPosition(e, d);
4628
+ w.push(k ? "L" : "M", l.x, l.y);
4629
+ }));
4630
+ return w;
4631
+ },
4632
+ getTitlePosition: function() {
4633
+ var h = this.center, g = this.chart, e = this.options.title;
4634
+ return {
4635
+ x: g.plotLeft + h[0] + (e.x || 0),
4636
+ y: g.plotTop + h[1] - {
4637
+ high: .5,
4638
+ middle: .25,
4639
+ low: 0
4640
+ }[e.align] * h[2] + (e.y || 0)
4641
+ };
4642
+ },
4643
+ createLabelCollector: function() {
4644
+ var h = this;
4645
+ return function() {
4646
+ if (h.isRadial && h.tickPositions && !0 !== h.options.labels.allowOverlap) return h.tickPositions.map(function(g) {
4647
+ return h.ticks[g] && h.ticks[g].label;
4648
+ }).filter(function(g) {
4649
+ return !!g;
4650
+ });
4651
+ };
4652
+ }
4653
+ };
4654
+ b(n, "init", function(h) {
4655
+ var g = this.chart, e = g.inverted, k = g.angular, d = g.polar, b = this.isXAxis, q = this.coll, a = k && b, n, c = g.options;
4656
+ h = h.userOptions.pane || 0;
4657
+ h = this.pane = g.pane && g.pane[h];
4658
+ if ("colorAxis" === q) this.isRadial = !1; else {
4659
+ if (k) {
4660
+ if (w(this, a ? r : p), n = !b) this.defaultPolarOptions = this.defaultRadialGaugeOptions;
4661
+ } else d && (w(this, p), this.defaultPolarOptions = (n = this.horiz) ? this.defaultCircularOptions : f("xAxis" === q ? this.defaultOptions : this.defaultYAxisOptions, this.defaultRadialOptions),
4662
+ e && "yAxis" === q && (this.defaultPolarOptions.stackLabels = this.defaultYAxisOptions.stackLabels));
4663
+ k || d ? (this.isRadial = !0, c.chart.zoomType = null, this.labelCollector || (this.labelCollector = this.createLabelCollector()),
4664
+ this.labelCollector && g.labelCollectors.push(this.labelCollector)) : this.isRadial = !1;
4665
+ h && n && (h.axis = this);
4666
+ this.isCircular = n;
4667
+ }
4668
+ });
4669
+ b(n, "afterInit", function() {
4670
+ var h = this.chart, g = this.options, e = this.pane, k = e && e.options;
4671
+ h.angular && this.isXAxis || !e || !h.angular && !h.polar || (this.angleRad = (g.angle || 0) * Math.PI / 180,
4672
+ this.startAngleRad = (k.startAngle - 90) * Math.PI / 180, this.endAngleRad = (y(k.endAngle, k.startAngle + 360) - 90) * Math.PI / 180,
4673
+ this.offset = g.offset || 0);
4674
+ });
4675
+ b(n, "autoLabelAlign", function(h) {
4676
+ this.isRadial && (h.align = void 0, h.preventDefault());
4677
+ });
4678
+ b(n, "destroy", function() {
4679
+ if (this.chart && this.chart.labelCollectors) {
4680
+ var h = this.chart.labelCollectors.indexOf(this.labelCollector);
4681
+ 0 <= h && this.chart.labelCollectors.splice(h, 1);
4682
+ }
4683
+ });
4684
+ b(a, "afterGetPosition", function(h) {
4685
+ this.axis.getPosition && w(h.pos, this.axis.getPosition(this.pos));
4686
+ });
4687
+ b(a, "afterGetLabelPosition", function(h) {
4688
+ var g = this.axis, e = this.label, k = e.getBBox(), d = g.options.labels, p = d.y, q = 20, r = d.align, b = (g.translate(this.pos) + g.startAngleRad + Math.PI / 2) / Math.PI * 180 % 360, a = Math.round(b), n = "end", c = 0 > a ? a + 360 : a, x = c, t = 0, u = 0, v = null === d.y ? .3 * -k.height : 0;
4689
+ if (g.isRadial) {
4690
+ var l = g.getPosition(this.pos, g.center[2] / 2 + m(y(d.distance, -25), g.center[2] / 2, -g.center[2] / 2));
4691
+ "auto" === d.rotation ? e.attr({
4692
+ rotation: b
4693
+ }) : null === p && (p = g.chart.renderer.fontMetrics(e.styles && e.styles.fontSize).b - k.height / 2);
4694
+ null === r && (g.isCircular ? (k.width > g.len * g.tickInterval / (g.max - g.min) && (q = 0),
4695
+ r = b > q && b < 180 - q ? "left" : b > 180 + q && b < 360 - q ? "right" : "center") : r = "center",
4696
+ e.attr({
4697
+ align: r
4698
+ }));
4699
+ if ("auto" === r && 2 === g.tickPositions.length && g.isCircular) {
4700
+ 90 < c && 180 > c ? c = 180 - c : 270 < c && 360 >= c && (c = 540 - c);
4701
+ 180 < x && 360 >= x && (x = 360 - x);
4702
+ if (g.pane.options.startAngle === a || g.pane.options.startAngle === a + 360 || g.pane.options.startAngle === a - 360) n = "start";
4703
+ r = -90 <= a && 90 >= a || -360 <= a && -270 >= a || 270 <= a && 360 >= a ? "start" === n ? "right" : "left" : "start" === n ? "left" : "right";
4704
+ 70 < x && 110 > x && (r = "center");
4705
+ 15 > c || 180 <= c && 195 > c ? t = .3 * k.height : 15 <= c && 35 >= c ? t = "start" === n ? 0 : .75 * k.height : 195 <= c && 215 >= c ? t = "start" === n ? .75 * k.height : 0 : 35 < c && 90 >= c ? t = "start" === n ? .25 * -k.height : k.height : 215 < c && 270 >= c && (t = "start" === n ? k.height : .25 * -k.height);
4706
+ 15 > x ? u = "start" === n ? .15 * -k.height : .15 * k.height : 165 < x && 180 >= x && (u = "start" === n ? .15 * k.height : .15 * -k.height);
4707
+ e.attr({
4708
+ align: r
4709
+ });
4710
+ e.translate(u, t + v);
4711
+ }
4712
+ h.pos.x = l.x + d.x;
4713
+ h.pos.y = l.y + p;
4714
+ }
4715
+ });
4716
+ c(A, "getMarkPath", function(h, g, e, k, d, p, q) {
4717
+ var r = this.axis;
4718
+ r.isRadial ? (h = r.getPosition(this.pos, r.center[2] / 2 + k), g = [ "M", g, e, "L", h.x, h.y ]) : g = h.call(this, g, e, k, d, p, q);
4719
+ return g;
4720
+ });
4721
+ });
4722
+ E(f, "parts-more/AreaRangeSeries.js", [ f["parts/Globals.js"], f["parts/Point.js"], f["parts/Utilities.js"] ], function(l, a, c) {
4723
+ var b = c.defined, u = c.extend, v = c.isArray, w = c.isNumber, f = c.pick;
4724
+ c = c.seriesType;
4725
+ var y = l.seriesTypes, d = l.Series.prototype, m = a.prototype;
4726
+ c("arearange", "area", {
4727
+ lineWidth: 1,
4728
+ threshold: null,
4729
+ tooltip: {
4730
+ pointFormat: '<span style="color:{series.color}">●</span> {series.name}: <b>{point.low}</b> - <b>{point.high}</b><br/>'
4731
+ },
4732
+ trackByArea: !0,
4733
+ dataLabels: {
4734
+ align: null,
4735
+ verticalAlign: null,
4736
+ xLow: 0,
4737
+ xHigh: 0,
4738
+ yLow: 0,
4739
+ yHigh: 0
4740
+ }
4741
+ }, {
4742
+ pointArrayMap: [ "low", "high" ],
4743
+ pointValKey: "low",
4744
+ deferTranslatePolar: !0,
4745
+ toYData: function(d) {
4746
+ return [ d.low, d.high ];
4747
+ },
4748
+ highToXY: function(d) {
4749
+ var b = this.chart, a = this.xAxis.postTranslate(d.rectPlotX, this.yAxis.len - d.plotHigh);
4750
+ d.plotHighX = a.x - b.plotLeft;
4751
+ d.plotHigh = a.y - b.plotTop;
4752
+ d.plotLowX = d.plotX;
4753
+ },
4754
+ translate: function() {
4755
+ var d = this, b = d.yAxis, a = !!d.modifyValue;
4756
+ y.area.prototype.translate.apply(d);
4757
+ d.points.forEach(function(c) {
4758
+ var r = c.high, p = c.plotY;
4759
+ c.isNull ? c.plotY = null : (c.plotLow = p, c.plotHigh = b.translate(a ? d.modifyValue(r, c) : r, 0, 1, 0, 1),
4760
+ a && (c.yBottom = c.plotHigh));
4761
+ });
4762
+ this.chart.polar && this.points.forEach(function(b) {
4763
+ d.highToXY(b);
4764
+ b.tooltipPos = [ (b.plotHighX + b.plotLowX) / 2, (b.plotHigh + b.plotLow) / 2 ];
4765
+ });
4766
+ },
4767
+ getGraphPath: function(d) {
4768
+ var b = [], a = [], c, r = y.area.prototype.getGraphPath;
4769
+ var p = this.options;
4770
+ var h = this.chart.polar && !1 !== p.connectEnds, g = p.connectNulls, e = p.step;
4771
+ d = d || this.points;
4772
+ for (c = d.length; c--; ) {
4773
+ var k = d[c];
4774
+ k.isNull || h || g || d[c + 1] && !d[c + 1].isNull || a.push({
4775
+ plotX: k.plotX,
4776
+ plotY: k.plotY,
4777
+ doCurve: !1
4778
+ });
4779
+ var B = {
4780
+ polarPlotY: k.polarPlotY,
4781
+ rectPlotX: k.rectPlotX,
4782
+ yBottom: k.yBottom,
4783
+ plotX: f(k.plotHighX, k.plotX),
4784
+ plotY: k.plotHigh,
4785
+ isNull: k.isNull
4786
+ };
4787
+ a.push(B);
4788
+ b.push(B);
4789
+ k.isNull || h || g || d[c - 1] && !d[c - 1].isNull || a.push({
4790
+ plotX: k.plotX,
4791
+ plotY: k.plotY,
4792
+ doCurve: !1
4793
+ });
4794
+ }
4795
+ d = r.call(this, d);
4796
+ e && (!0 === e && (e = "left"), p.step = {
4797
+ left: "right",
4798
+ center: "center",
4799
+ right: "left"
4800
+ }[e]);
4801
+ b = r.call(this, b);
4802
+ a = r.call(this, a);
4803
+ p.step = e;
4804
+ p = [].concat(d, b);
4805
+ this.chart.polar || "M" !== a[0] || (a[0] = "L");
4806
+ this.graphPath = p;
4807
+ this.areaPath = d.concat(a);
4808
+ p.isArea = !0;
4809
+ p.xMap = d.xMap;
4810
+ this.areaPath.xMap = d.xMap;
4811
+ return p;
4812
+ },
4813
+ drawDataLabels: function() {
4814
+ var b = this.points, a = b.length, c, m = [], r = this.options.dataLabels, p, h = this.chart.inverted;
4815
+ if (v(r)) {
4816
+ if (1 < r.length) {
4817
+ var g = r[0];
4818
+ var e = r[1];
4819
+ } else g = r[0], e = {
4820
+ enabled: !1
4821
+ };
4822
+ } else g = u({}, r), g.x = r.xHigh, g.y = r.yHigh, e = u({}, r), e.x = r.xLow, e.y = r.yLow;
4823
+ if (g.enabled || this._hasPointLabels) {
4824
+ for (c = a; c--; ) if (p = b[c]) {
4825
+ var k = g.inside ? p.plotHigh < p.plotLow : p.plotHigh > p.plotLow;
4826
+ p.y = p.high;
4827
+ p._plotY = p.plotY;
4828
+ p.plotY = p.plotHigh;
4829
+ m[c] = p.dataLabel;
4830
+ p.dataLabel = p.dataLabelUpper;
4831
+ p.below = k;
4832
+ h ? g.align || (g.align = k ? "right" : "left") : g.verticalAlign || (g.verticalAlign = k ? "top" : "bottom");
4833
+ }
4834
+ this.options.dataLabels = g;
4835
+ d.drawDataLabels && d.drawDataLabels.apply(this, arguments);
4836
+ for (c = a; c--; ) if (p = b[c]) p.dataLabelUpper = p.dataLabel, p.dataLabel = m[c],
4837
+ delete p.dataLabels, p.y = p.low, p.plotY = p._plotY;
4838
+ }
4839
+ if (e.enabled || this._hasPointLabels) {
4840
+ for (c = a; c--; ) if (p = b[c]) k = e.inside ? p.plotHigh < p.plotLow : p.plotHigh > p.plotLow,
4841
+ p.below = !k, h ? e.align || (e.align = k ? "left" : "right") : e.verticalAlign || (e.verticalAlign = k ? "bottom" : "top");
4842
+ this.options.dataLabels = e;
4843
+ d.drawDataLabels && d.drawDataLabels.apply(this, arguments);
4844
+ }
4845
+ if (g.enabled) for (c = a; c--; ) if (p = b[c]) p.dataLabels = [ p.dataLabelUpper, p.dataLabel ].filter(function(e) {
4846
+ return !!e;
4847
+ });
4848
+ this.options.dataLabels = r;
4849
+ },
4850
+ alignDataLabel: function() {
4851
+ y.column.prototype.alignDataLabel.apply(this, arguments);
4852
+ },
4853
+ drawPoints: function() {
4854
+ var a = this.points.length, c;
4855
+ d.drawPoints.apply(this, arguments);
4856
+ for (c = 0; c < a; ) {
4857
+ var m = this.points[c];
4858
+ m.origProps = {
4859
+ plotY: m.plotY,
4860
+ plotX: m.plotX,
4861
+ isInside: m.isInside,
4862
+ negative: m.negative,
4863
+ zone: m.zone,
4864
+ y: m.y
4865
+ };
4866
+ m.lowerGraphic = m.graphic;
4867
+ m.graphic = m.upperGraphic;
4868
+ m.plotY = m.plotHigh;
4869
+ b(m.plotHighX) && (m.plotX = m.plotHighX);
4870
+ m.y = m.high;
4871
+ m.negative = m.high < (this.options.threshold || 0);
4872
+ m.zone = this.zones.length && m.getZone();
4873
+ this.chart.polar || (m.isInside = m.isTopInside = "undefined" !== typeof m.plotY && 0 <= m.plotY && m.plotY <= this.yAxis.len && 0 <= m.plotX && m.plotX <= this.xAxis.len);
4874
+ c++;
4875
+ }
4876
+ d.drawPoints.apply(this, arguments);
4877
+ for (c = 0; c < a; ) m = this.points[c], m.upperGraphic = m.graphic, m.graphic = m.lowerGraphic,
4878
+ u(m, m.origProps), delete m.origProps, c++;
4879
+ },
4880
+ setStackedPoints: l.noop
4881
+ }, {
4882
+ setState: function() {
4883
+ var d = this.state, a = this.series, c = a.chart.polar;
4884
+ b(this.plotHigh) || (this.plotHigh = a.yAxis.toPixels(this.high, !0));
4885
+ b(this.plotLow) || (this.plotLow = this.plotY = a.yAxis.toPixels(this.low, !0));
4886
+ a.stateMarkerGraphic && (a.lowerStateMarkerGraphic = a.stateMarkerGraphic, a.stateMarkerGraphic = a.upperStateMarkerGraphic);
4887
+ this.graphic = this.upperGraphic;
4888
+ this.plotY = this.plotHigh;
4889
+ c && (this.plotX = this.plotHighX);
4890
+ m.setState.apply(this, arguments);
4891
+ this.state = d;
4892
+ this.plotY = this.plotLow;
4893
+ this.graphic = this.lowerGraphic;
4894
+ c && (this.plotX = this.plotLowX);
4895
+ a.stateMarkerGraphic && (a.upperStateMarkerGraphic = a.stateMarkerGraphic, a.stateMarkerGraphic = a.lowerStateMarkerGraphic,
4896
+ a.lowerStateMarkerGraphic = void 0);
4897
+ m.setState.apply(this, arguments);
4898
+ },
4899
+ haloPath: function() {
4900
+ var d = this.series.chart.polar, a = [];
4901
+ this.plotY = this.plotLow;
4902
+ d && (this.plotX = this.plotLowX);
4903
+ this.isInside && (a = m.haloPath.apply(this, arguments));
4904
+ this.plotY = this.plotHigh;
4905
+ d && (this.plotX = this.plotHighX);
4906
+ this.isTopInside && (a = a.concat(m.haloPath.apply(this, arguments)));
4907
+ return a;
4908
+ },
4909
+ destroyElements: function() {
4910
+ [ "lowerGraphic", "upperGraphic" ].forEach(function(d) {
4911
+ this[d] && (this[d] = this[d].destroy());
4912
+ }, this);
4913
+ this.graphic = null;
4914
+ return m.destroyElements.apply(this, arguments);
4915
+ },
4916
+ isValid: function() {
4917
+ return w(this.low) && w(this.high);
4918
+ }
4919
+ });
4920
+ });
4921
+ E(f, "parts-more/AreaSplineRangeSeries.js", [ f["parts/Globals.js"], f["parts/Utilities.js"] ], function(l, a) {
4922
+ a = a.seriesType;
4923
+ a("areasplinerange", "arearange", null, {
4924
+ getPointSpline: l.seriesTypes.spline.prototype.getPointSpline
4925
+ });
4926
+ });
4927
+ E(f, "parts-more/ColumnRangeSeries.js", [ f["parts/Globals.js"], f["parts/Utilities.js"] ], function(l, a) {
4928
+ var c = a.clamp, b = a.merge, u = a.pick;
4929
+ a = a.seriesType;
4930
+ var v = l.defaultPlotOptions, w = l.noop, f = l.seriesTypes.column.prototype;
4931
+ a("columnrange", "arearange", b(v.column, v.arearange, {
4932
+ pointRange: null,
4933
+ marker: null,
4934
+ states: {
4935
+ hover: {
4936
+ halo: !1
4937
+ }
4938
+ }
4939
+ }), {
4940
+ translate: function() {
4941
+ var a = this, d = a.yAxis, b = a.xAxis, n = b.startAngleRad, v, l = a.chart, w = a.xAxis.isRadial, r = Math.max(l.chartWidth, l.chartHeight) + 999, p;
4942
+ f.translate.apply(a);
4943
+ a.points.forEach(function(h) {
4944
+ var g = h.shapeArgs, e = a.options.minPointLength;
4945
+ h.plotHigh = p = c(d.translate(h.high, 0, 1, 0, 1), -r, r);
4946
+ h.plotLow = c(h.plotY, -r, r);
4947
+ var k = p;
4948
+ var B = u(h.rectPlotY, h.plotY) - p;
4949
+ Math.abs(B) < e ? (e -= B, B += e, k -= e / 2) : 0 > B && (B *= -1, k -= B);
4950
+ w ? (v = h.barX + n, h.shapeType = "arc", h.shapeArgs = a.polarArc(k + B, k, v, v + h.pointWidth)) : (g.height = B,
4951
+ g.y = k, h.tooltipPos = l.inverted ? [ d.len + d.pos - l.plotLeft - k - B / 2, b.len + b.pos - l.plotTop - g.x - g.width / 2, B ] : [ b.left - l.plotLeft + g.x + g.width / 2, d.pos - l.plotTop + k + B / 2, B ]);
4952
+ });
4953
+ },
4954
+ directTouch: !0,
4955
+ trackerGroups: [ "group", "dataLabelsGroup" ],
4956
+ drawGraph: w,
4957
+ getSymbol: w,
4958
+ crispCol: function() {
4959
+ return f.crispCol.apply(this, arguments);
4960
+ },
4961
+ drawPoints: function() {
4962
+ return f.drawPoints.apply(this, arguments);
4963
+ },
4964
+ drawTracker: function() {
4965
+ return f.drawTracker.apply(this, arguments);
4966
+ },
4967
+ getColumnMetrics: function() {
4968
+ return f.getColumnMetrics.apply(this, arguments);
4969
+ },
4970
+ pointAttribs: function() {
4971
+ return f.pointAttribs.apply(this, arguments);
4972
+ },
4973
+ animate: function() {
4974
+ return f.animate.apply(this, arguments);
4975
+ },
4976
+ polarArc: function() {
4977
+ return f.polarArc.apply(this, arguments);
4978
+ },
4979
+ translate3dPoints: function() {
4980
+ return f.translate3dPoints.apply(this, arguments);
4981
+ },
4982
+ translate3dShapes: function() {
4983
+ return f.translate3dShapes.apply(this, arguments);
4984
+ }
4985
+ }, {
4986
+ setState: f.pointClass.prototype.setState
4987
+ });
4988
+ });
4989
+ E(f, "parts-more/ColumnPyramidSeries.js", [ f["parts/Globals.js"], f["parts/Utilities.js"] ], function(l, a) {
4990
+ var c = a.clamp, b = a.pick;
4991
+ a = a.seriesType;
4992
+ var u = l.seriesTypes.column.prototype;
4993
+ a("columnpyramid", "column", {}, {
4994
+ translate: function() {
4995
+ var a = this, l = a.chart, f = a.options, y = a.dense = 2 > a.closestPointRange * a.xAxis.transA;
4996
+ y = a.borderWidth = b(f.borderWidth, y ? 0 : 1);
4997
+ var d = a.yAxis, m = f.threshold, n = a.translatedThreshold = d.getThreshold(m), t = b(f.minPointLength, 5), x = a.getColumnMetrics(), A = x.width, r = a.barW = Math.max(A, 1 + 2 * y), p = a.pointXOffset = x.offset;
4998
+ l.inverted && (n -= .5);
4999
+ f.pointPadding && (r = Math.ceil(r));
5000
+ u.translate.apply(a);
5001
+ a.points.forEach(function(h) {
5002
+ var g = b(h.yBottom, n), e = 999 + Math.abs(g), k = c(h.plotY, -e, d.len + e);
5003
+ e = h.plotX + p;
5004
+ var B = r / 2, C = Math.min(k, g);
5005
+ g = Math.max(k, g) - C;
5006
+ var q;
5007
+ h.barX = e;
5008
+ h.pointWidth = A;
5009
+ h.tooltipPos = l.inverted ? [ d.len + d.pos - l.plotLeft - k, a.xAxis.len - e - B, g ] : [ e + B, k + d.pos - l.plotTop, g ];
5010
+ k = m + (h.total || h.y);
5011
+ "percent" === f.stacking && (k = m + (0 > h.y) ? -100 : 100);
5012
+ k = d.toPixels(k, !0);
5013
+ var F = (q = l.plotHeight - k - (l.plotHeight - n)) ? B * (C - k) / q : 0;
5014
+ var G = q ? B * (C + g - k) / q : 0;
5015
+ q = e - F + B;
5016
+ F = e + F + B;
5017
+ var u = e + G + B;
5018
+ G = e - G + B;
5019
+ var v = C - t;
5020
+ var w = C + g;
5021
+ 0 > h.y && (v = C, w = C + g + t);
5022
+ l.inverted && (u = l.plotWidth - C, q = k - (l.plotWidth - n), F = B * (k - u) / q,
5023
+ G = B * (k - (u - g)) / q, q = e + B + F, F = q - 2 * F, u = e - G + B, G = e + G + B,
5024
+ v = C, w = C + g - t, 0 > h.y && (w = C + g + t));
5025
+ h.shapeType = "path";
5026
+ h.shapeArgs = {
5027
+ x: q,
5028
+ y: v,
5029
+ width: F - q,
5030
+ height: g,
5031
+ d: [ "M", q, v, "L", F, v, u, w, G, w, "Z" ]
5032
+ };
5033
+ });
5034
+ }
5035
+ });
5036
+ });
5037
+ E(f, "parts-more/GaugeSeries.js", [ f["parts/Globals.js"], f["parts/Utilities.js"] ], function(l, a) {
5038
+ var c = a.clamp, b = a.isNumber, u = a.merge, v = a.pick, f = a.pInt;
5039
+ a = a.seriesType;
5040
+ var z = l.Series, y = l.TrackerMixin;
5041
+ a("gauge", "line", {
5042
+ dataLabels: {
5043
+ borderColor: "#cccccc",
5044
+ borderRadius: 3,
5045
+ borderWidth: 1,
5046
+ crop: !1,
5047
+ defer: !1,
5048
+ enabled: !0,
5049
+ verticalAlign: "top",
5050
+ y: 15,
5051
+ zIndex: 2
5052
+ },
5053
+ dial: {},
5054
+ pivot: {},
5055
+ tooltip: {
5056
+ headerFormat: ""
5057
+ },
5058
+ showInLegend: !1
5059
+ }, {
5060
+ angular: !0,
5061
+ directTouch: !0,
5062
+ drawGraph: l.noop,
5063
+ fixedBox: !0,
5064
+ forceDL: !0,
5065
+ noSharedTooltip: !0,
5066
+ trackerGroups: [ "group", "dataLabelsGroup" ],
5067
+ translate: function() {
5068
+ var d = this.yAxis, a = this.options, n = d.center;
5069
+ this.generatePoints();
5070
+ this.points.forEach(function(m) {
5071
+ var l = u(a.dial, m.dial), t = f(v(l.radius, "80%")) * n[2] / 200, r = f(v(l.baseLength, "70%")) * t / 100, p = f(v(l.rearLength, "10%")) * t / 100, h = l.baseWidth || 3, g = l.topWidth || 1, e = a.overshoot, k = d.startAngleRad + d.translate(m.y, null, null, null, !0);
5072
+ if (b(e) || !1 === a.wrap) e = b(e) ? e / 180 * Math.PI : 0, k = c(k, d.startAngleRad - e, d.endAngleRad + e);
5073
+ k = 180 * k / Math.PI;
5074
+ m.shapeType = "path";
5075
+ m.shapeArgs = {
5076
+ d: l.path || [ "M", -p, -h / 2, "L", r, -h / 2, t, -g / 2, t, g / 2, r, h / 2, -p, h / 2, "z" ],
5077
+ translateX: n[0],
5078
+ translateY: n[1],
5079
+ rotation: k
5080
+ };
5081
+ m.plotX = n[0];
5082
+ m.plotY = n[1];
5083
+ });
5084
+ },
5085
+ drawPoints: function() {
5086
+ var d = this, a = d.chart, b = d.yAxis.center, c = d.pivot, l = d.options, f = l.pivot, r = a.renderer;
5087
+ d.points.forEach(function(b) {
5088
+ var h = b.graphic, g = b.shapeArgs, e = g.d, k = u(l.dial, b.dial);
5089
+ h ? (h.animate(g), g.d = e) : b.graphic = r[b.shapeType](g).attr({
5090
+ rotation: g.rotation,
5091
+ zIndex: 1
5092
+ }).addClass("highcharts-dial").add(d.group);
5093
+ if (!a.styledMode) b.graphic[h ? "animate" : "attr"]({
5094
+ stroke: k.borderColor || "none",
5095
+ "stroke-width": k.borderWidth || 0,
5096
+ fill: k.backgroundColor || "#000000"
5097
+ });
5098
+ });
5099
+ c ? c.animate({
5100
+ translateX: b[0],
5101
+ translateY: b[1]
5102
+ }) : (d.pivot = r.circle(0, 0, v(f.radius, 5)).attr({
5103
+ zIndex: 2
5104
+ }).addClass("highcharts-pivot").translate(b[0], b[1]).add(d.group), a.styledMode || d.pivot.attr({
5105
+ "stroke-width": f.borderWidth || 0,
5106
+ stroke: f.borderColor || "#cccccc",
5107
+ fill: f.backgroundColor || "#000000"
5108
+ }));
5109
+ },
5110
+ animate: function(d) {
5111
+ var a = this;
5112
+ d || a.points.forEach(function(d) {
5113
+ var b = d.graphic;
5114
+ b && (b.attr({
5115
+ rotation: 180 * a.yAxis.startAngleRad / Math.PI
5116
+ }), b.animate({
5117
+ rotation: d.shapeArgs.rotation
5118
+ }, a.options.animation));
5119
+ });
5120
+ },
5121
+ render: function() {
5122
+ this.group = this.plotGroup("group", "series", this.visible ? "visible" : "hidden", this.options.zIndex, this.chart.seriesGroup);
5123
+ z.prototype.render.call(this);
5124
+ this.group.clip(this.chart.clipRect);
5125
+ },
5126
+ setData: function(d, a) {
5127
+ z.prototype.setData.call(this, d, !1);
5128
+ this.processData();
5129
+ this.generatePoints();
5130
+ v(a, !0) && this.chart.redraw();
5131
+ },
5132
+ hasData: function() {
5133
+ return !!this.points.length;
5134
+ },
5135
+ drawTracker: y && y.drawTrackerPoint
5136
+ }, {
5137
+ setState: function(d) {
5138
+ this.state = d;
5139
+ }
5140
+ });
5141
+ });
5142
+ E(f, "parts-more/BoxPlotSeries.js", [ f["parts/Globals.js"], f["parts/Utilities.js"] ], function(l, a) {
5143
+ var c = a.pick;
5144
+ a = a.seriesType;
5145
+ var b = l.noop, u = l.seriesTypes;
5146
+ a("boxplot", "column", {
5147
+ threshold: null,
5148
+ tooltip: {
5149
+ pointFormat: '<span style="color:{point.color}">●</span> <b> {series.name}</b><br/>Maximum: {point.high}<br/>Upper quartile: {point.q3}<br/>Median: {point.median}<br/>Lower quartile: {point.q1}<br/>Minimum: {point.low}<br/>'
5150
+ },
5151
+ whiskerLength: "50%",
5152
+ fillColor: "#ffffff",
5153
+ lineWidth: 1,
5154
+ medianWidth: 2,
5155
+ whiskerWidth: 2
5156
+ }, {
5157
+ pointArrayMap: [ "low", "q1", "median", "q3", "high" ],
5158
+ toYData: function(a) {
5159
+ return [ a.low, a.q1, a.median, a.q3, a.high ];
5160
+ },
5161
+ pointValKey: "high",
5162
+ pointAttribs: function() {
5163
+ return {};
5164
+ },
5165
+ drawDataLabels: b,
5166
+ translate: function() {
5167
+ var a = this.yAxis, b = this.pointArrayMap;
5168
+ u.column.prototype.translate.apply(this);
5169
+ this.points.forEach(function(c) {
5170
+ b.forEach(function(b) {
5171
+ null !== c[b] && (c[b + "Plot"] = a.translate(c[b], 0, 1, 0, 1));
5172
+ });
5173
+ c.plotHigh = c.highPlot;
5174
+ });
5175
+ },
5176
+ drawPoints: function() {
5177
+ var a = this, b = a.options, l = a.chart, u = l.renderer, d, m, n, f, x, A, r = 0, p, h, g, e, k = !1 !== a.doQuartiles, B, C = a.options.whiskerLength;
5178
+ a.points.forEach(function(q) {
5179
+ var F = q.graphic, G = F ? "animate" : "attr", K = q.shapeArgs, v = {}, t = {}, H = {}, J = {}, I = q.color || a.color;
5180
+ "undefined" !== typeof q.plotY && (p = K.width, h = Math.floor(K.x), g = h + p,
5181
+ e = Math.round(p / 2), d = Math.floor(k ? q.q1Plot : q.lowPlot), m = Math.floor(k ? q.q3Plot : q.lowPlot),
5182
+ n = Math.floor(q.highPlot), f = Math.floor(q.lowPlot), F || (q.graphic = F = u.g("point").add(a.group),
5183
+ q.stem = u.path().addClass("highcharts-boxplot-stem").add(F), C && (q.whiskers = u.path().addClass("highcharts-boxplot-whisker").add(F)),
5184
+ k && (q.box = u.path(void 0).addClass("highcharts-boxplot-box").add(F)), q.medianShape = u.path(void 0).addClass("highcharts-boxplot-median").add(F)),
5185
+ l.styledMode || (t.stroke = q.stemColor || b.stemColor || I, t["stroke-width"] = c(q.stemWidth, b.stemWidth, b.lineWidth),
5186
+ t.dashstyle = q.stemDashStyle || b.stemDashStyle, q.stem.attr(t), C && (H.stroke = q.whiskerColor || b.whiskerColor || I,
5187
+ H["stroke-width"] = c(q.whiskerWidth, b.whiskerWidth, b.lineWidth), q.whiskers.attr(H)),
5188
+ k && (v.fill = q.fillColor || b.fillColor || I, v.stroke = b.lineColor || I, v["stroke-width"] = b.lineWidth || 0,
5189
+ q.box.attr(v)), J.stroke = q.medianColor || b.medianColor || I, J["stroke-width"] = c(q.medianWidth, b.medianWidth, b.lineWidth),
5190
+ q.medianShape.attr(J)), A = q.stem.strokeWidth() % 2 / 2, r = h + e + A, q.stem[G]({
5191
+ d: [ "M", r, m, "L", r, n, "M", r, d, "L", r, f ]
5192
+ }), k && (A = q.box.strokeWidth() % 2 / 2, d = Math.floor(d) + A, m = Math.floor(m) + A,
5193
+ h += A, g += A, q.box[G]({
5194
+ d: [ "M", h, m, "L", h, d, "L", g, d, "L", g, m, "L", h, m, "z" ]
5195
+ })), C && (A = q.whiskers.strokeWidth() % 2 / 2, n += A, f += A, B = /%$/.test(C) ? e * parseFloat(C) / 100 : C / 2,
5196
+ q.whiskers[G]({
5197
+ d: [ "M", r - B, n, "L", r + B, n, "M", r - B, f, "L", r + B, f ]
5198
+ })), x = Math.round(q.medianPlot), A = q.medianShape.strokeWidth() % 2 / 2, x += A,
5199
+ q.medianShape[G]({
5200
+ d: [ "M", h, x, "L", g, x ]
5201
+ }));
5202
+ });
5203
+ },
5204
+ setStackedPoints: b
5205
+ });
5206
+ });
5207
+ E(f, "parts-more/ErrorBarSeries.js", [ f["parts/Globals.js"], f["parts/Utilities.js"] ], function(l, a) {
5208
+ a = a.seriesType;
5209
+ var c = l.noop, b = l.seriesTypes;
5210
+ a("errorbar", "boxplot", {
5211
+ color: "#000000",
5212
+ grouping: !1,
5213
+ linkedTo: ":previous",
5214
+ tooltip: {
5215
+ pointFormat: '<span style="color:{point.color}">●</span> {series.name}: <b>{point.low}</b> - <b>{point.high}</b><br/>'
5216
+ },
5217
+ whiskerWidth: null
5218
+ }, {
5219
+ type: "errorbar",
5220
+ pointArrayMap: [ "low", "high" ],
5221
+ toYData: function(a) {
5222
+ return [ a.low, a.high ];
5223
+ },
5224
+ pointValKey: "high",
5225
+ doQuartiles: !1,
5226
+ drawDataLabels: b.arearange ? function() {
5227
+ var a = this.pointValKey;
5228
+ b.arearange.prototype.drawDataLabels.call(this);
5229
+ this.data.forEach(function(b) {
5230
+ b.y = b[a];
5231
+ });
5232
+ } : c,
5233
+ getColumnMetrics: function() {
5234
+ return this.linkedParent && this.linkedParent.columnMetrics || b.column.prototype.getColumnMetrics.call(this);
5235
+ }
5236
+ });
5237
+ });
5238
+ E(f, "parts-more/WaterfallSeries.js", [ f["parts/Globals.js"], f["parts/Point.js"], f["parts/Utilities.js"] ], function(l, a, c) {
5239
+ var b = c.addEvent, u = c.arrayMax, f = c.arrayMin, w = c.correctFloat, z = c.isNumber, y = c.objectEach, d = c.pick;
5240
+ c = c.seriesType;
5241
+ var m = l.Axis, n = l.Chart, t = l.Series, x = l.StackItem, A = l.seriesTypes;
5242
+ b(m, "afterInit", function() {
5243
+ this.isXAxis || (this.waterfallStacks = {
5244
+ changed: !1
5245
+ });
5246
+ });
5247
+ b(m, "afterBuildStacks", function() {
5248
+ this.waterfallStacks.changed = !1;
5249
+ delete this.waterfallStacks.alreadyChanged;
5250
+ });
5251
+ b(n, "beforeRedraw", function() {
5252
+ for (var a = this.axes, d = this.series, h = d.length; h--; ) d[h].options.stacking && (a.forEach(function(g) {
5253
+ g.isXAxis || (g.waterfallStacks.changed = !0);
5254
+ }), h = 0);
5255
+ });
5256
+ b(m, "afterRender", function() {
5257
+ var a = this.options.stackLabels;
5258
+ a && a.enabled && this.waterfallStacks && this.renderWaterfallStackTotals();
5259
+ });
5260
+ m.prototype.renderWaterfallStackTotals = function() {
5261
+ var a = this.waterfallStacks, d = this.stackTotalGroup, h = new x(this, this.options.stackLabels, !1, 0, void 0);
5262
+ this.dummyStackItem = h;
5263
+ y(a, function(g) {
5264
+ y(g, function(e) {
5265
+ h.total = e.stackTotal;
5266
+ e.label && (h.label = e.label);
5267
+ x.prototype.render.call(h, d);
5268
+ e.label = h.label;
5269
+ delete h.label;
5270
+ });
5271
+ });
5272
+ h.total = null;
5273
+ };
5274
+ c("waterfall", "column", {
5275
+ dataLabels: {
5276
+ inside: !0
5277
+ },
5278
+ lineWidth: 1,
5279
+ lineColor: "#333333",
5280
+ dashStyle: "Dot",
5281
+ borderColor: "#333333",
5282
+ states: {
5283
+ hover: {
5284
+ lineWidthPlus: 0
5285
+ }
5286
+ }
5287
+ }, {
5288
+ pointValKey: "y",
5289
+ showLine: !0,
5290
+ generatePoints: function() {
5291
+ var a;
5292
+ A.column.prototype.generatePoints.apply(this);
5293
+ var d = 0;
5294
+ for (a = this.points.length; d < a; d++) {
5295
+ var h = this.points[d];
5296
+ var g = this.processedYData[d];
5297
+ if (h.isIntermediateSum || h.isSum) h.y = w(g);
5298
+ }
5299
+ },
5300
+ translate: function() {
5301
+ var a = this.options, b = this.yAxis, h, g = d(a.minPointLength, 5), e = g / 2, k = a.threshold, c = a.stacking, C = b.waterfallStacks[this.stackKey];
5302
+ A.column.prototype.translate.apply(this);
5303
+ var q = h = k;
5304
+ var F = this.points;
5305
+ var m = 0;
5306
+ for (a = F.length; m < a; m++) {
5307
+ var l = F[m];
5308
+ var u = this.processedYData[m];
5309
+ var n = l.shapeArgs;
5310
+ var f = [ 0, u ];
5311
+ var t = l.y;
5312
+ if (c) {
5313
+ if (C) {
5314
+ f = C[m];
5315
+ if ("overlap" === c) {
5316
+ var v = f.stackState[f.stateIndex--];
5317
+ v = 0 <= t ? v : v - t;
5318
+ Object.hasOwnProperty.call(f, "absolutePos") && delete f.absolutePos;
5319
+ Object.hasOwnProperty.call(f, "absoluteNeg") && delete f.absoluteNeg;
5320
+ } else 0 <= t ? (v = f.threshold + f.posTotal, f.posTotal -= t) : (v = f.threshold + f.negTotal,
5321
+ f.negTotal -= t, v -= t), !f.posTotal && Object.hasOwnProperty.call(f, "absolutePos") && (f.posTotal = f.absolutePos,
5322
+ delete f.absolutePos), !f.negTotal && Object.hasOwnProperty.call(f, "absoluteNeg") && (f.negTotal = f.absoluteNeg,
5323
+ delete f.absoluteNeg);
5324
+ l.isSum || (f.connectorThreshold = f.threshold + f.stackTotal);
5325
+ b.reversed ? (u = 0 <= t ? v - t : v + t, t = v) : (u = v, t = v - t);
5326
+ l.below = u <= d(k, 0);
5327
+ n.y = b.translate(u, 0, 1, 0, 1);
5328
+ n.height = Math.abs(n.y - b.translate(t, 0, 1, 0, 1));
5329
+ }
5330
+ if (t = b.dummyStackItem) t.x = m, t.label = C[m].label, t.setOffset(this.pointXOffset || 0, this.barW || 0, this.stackedYNeg[m], this.stackedYPos[m]);
5331
+ } else v = Math.max(q, q + t) + f[0], n.y = b.translate(v, 0, 1, 0, 1), l.isSum ? (n.y = b.translate(f[1], 0, 1, 0, 1),
5332
+ n.height = Math.min(b.translate(f[0], 0, 1, 0, 1), b.len) - n.y) : l.isIntermediateSum ? (0 <= t ? (u = f[1] + h,
5333
+ t = h) : (u = h, t = f[1] + h), b.reversed && (u ^= t, t ^= u, u ^= t), n.y = b.translate(u, 0, 1, 0, 1),
5334
+ n.height = Math.abs(n.y - Math.min(b.translate(t, 0, 1, 0, 1), b.len)), h += f[1]) : (n.height = 0 < u ? b.translate(q, 0, 1, 0, 1) - n.y : b.translate(q, 0, 1, 0, 1) - b.translate(q - u, 0, 1, 0, 1),
5335
+ q += u, l.below = q < d(k, 0)), 0 > n.height && (n.y += n.height, n.height *= -1);
5336
+ l.plotY = n.y = Math.round(n.y) - this.borderWidth % 2 / 2;
5337
+ n.height = Math.max(Math.round(n.height), .001);
5338
+ l.yBottom = n.y + n.height;
5339
+ n.height <= g && !l.isNull ? (n.height = g, n.y -= e, l.plotY = n.y, l.minPointLengthOffset = 0 > l.y ? -e : e) : (l.isNull && (n.width = 0),
5340
+ l.minPointLengthOffset = 0);
5341
+ n = l.plotY + (l.negative ? n.height : 0);
5342
+ this.chart.inverted ? l.tooltipPos[0] = b.len - n : l.tooltipPos[1] = n;
5343
+ }
5344
+ },
5345
+ processData: function(a) {
5346
+ var d = this.options, h = this.yData, g = d.data, e = h.length, k = d.threshold || 0, b, r, q, c, m;
5347
+ for (m = r = b = q = c = 0; m < e; m++) {
5348
+ var n = h[m];
5349
+ var l = g && g[m] ? g[m] : {};
5350
+ "sum" === n || l.isSum ? h[m] = w(r) : "intermediateSum" === n || l.isIntermediateSum ? (h[m] = w(b),
5351
+ b = 0) : (r += n, b += n);
5352
+ q = Math.min(r, q);
5353
+ c = Math.max(r, c);
5354
+ }
5355
+ t.prototype.processData.call(this, a);
5356
+ d.stacking || (this.dataMin = q + k, this.dataMax = c);
5357
+ },
5358
+ toYData: function(a) {
5359
+ return a.isSum ? "sum" : a.isIntermediateSum ? "intermediateSum" : a.y;
5360
+ },
5361
+ updateParallelArrays: function(a, d) {
5362
+ t.prototype.updateParallelArrays.call(this, a, d);
5363
+ if ("sum" === this.yData[0] || "intermediateSum" === this.yData[0]) this.yData[0] = null;
5364
+ },
5365
+ pointAttribs: function(a, d) {
5366
+ var b = this.options.upColor;
5367
+ b && !a.options.color && (a.color = 0 < a.y ? b : null);
5368
+ a = A.column.prototype.pointAttribs.call(this, a, d);
5369
+ delete a.dashstyle;
5370
+ return a;
5371
+ },
5372
+ getGraphPath: function() {
5373
+ return [ "M", 0, 0 ];
5374
+ },
5375
+ getCrispPath: function() {
5376
+ var a = this.data, d = this.yAxis, b = a.length, g = Math.round(this.graph.strokeWidth()) % 2 / 2, e = Math.round(this.borderWidth) % 2 / 2, k = this.xAxis.reversed, c = this.yAxis.reversed, C = this.options.stacking, q = [], m;
5377
+ for (m = 1; m < b; m++) {
5378
+ var n = a[m].shapeArgs;
5379
+ var l = a[m - 1];
5380
+ var f = a[m - 1].shapeArgs;
5381
+ var u = d.waterfallStacks[this.stackKey];
5382
+ var t = 0 < l.y ? -f.height : 0;
5383
+ if (u) {
5384
+ u = u[m - 1];
5385
+ C ? (u = u.connectorThreshold, t = Math.round(d.translate(u, 0, 1, 0, 1) + (c ? t : 0)) - g) : t = f.y + l.minPointLengthOffset + e - g;
5386
+ var v = [ "M", f.x + (k ? 0 : f.width), t, "L", n.x + (k ? n.width : 0), t ];
5387
+ }
5388
+ if (!C && v && 0 > l.y && !c || 0 < l.y && c) v[2] += f.height, v[5] += f.height;
5389
+ q = q.concat(v);
5390
+ }
5391
+ return q;
5392
+ },
5393
+ drawGraph: function() {
5394
+ t.prototype.drawGraph.call(this);
5395
+ this.graph.attr({
5396
+ d: this.getCrispPath()
5397
+ });
5398
+ },
5399
+ setStackedPoints: function() {
5400
+ function a(e, a, k, g) {
5401
+ if (z) for (k; k < z; k++) w.stackState[k] += g; else w.stackState[0] = e, z = w.stackState.length;
5402
+ w.stackState.push(w.stackState[z - 1] + a);
5403
+ }
5404
+ var d = this.options, b = this.yAxis.waterfallStacks, g = d.threshold, e = g || 0, k = e, c = this.stackKey, C = this.xData, q = C.length, m, n, l;
5405
+ this.yAxis.usePercentage = !1;
5406
+ var f = n = l = e;
5407
+ if (this.visible || !this.chart.options.chart.ignoreHiddenSeries) {
5408
+ var u = b.changed;
5409
+ (m = b.alreadyChanged) && 0 > m.indexOf(c) && (u = !0);
5410
+ b[c] || (b[c] = {});
5411
+ m = b[c];
5412
+ for (var t = 0; t < q; t++) {
5413
+ var v = C[t];
5414
+ if (!m[v] || u) m[v] = {
5415
+ negTotal: 0,
5416
+ posTotal: 0,
5417
+ stackTotal: 0,
5418
+ threshold: 0,
5419
+ stateIndex: 0,
5420
+ stackState: [],
5421
+ label: u && m[v] ? m[v].label : void 0
5422
+ };
5423
+ var w = m[v];
5424
+ var x = this.yData[t];
5425
+ 0 <= x ? w.posTotal += x : w.negTotal += x;
5426
+ var y = d.data[t];
5427
+ v = w.absolutePos = w.posTotal;
5428
+ var A = w.absoluteNeg = w.negTotal;
5429
+ w.stackTotal = v + A;
5430
+ var z = w.stackState.length;
5431
+ y && y.isIntermediateSum ? (a(l, n, 0, l), l = n, n = g, e ^= k, k ^= e, e ^= k) : y && y.isSum ? (a(g, f, z),
5432
+ e = g) : (a(e, x, 0, f), y && (f += x, n += x));
5433
+ w.stateIndex++;
5434
+ w.threshold = e;
5435
+ e += w.stackTotal;
5436
+ }
5437
+ b.changed = !1;
5438
+ b.alreadyChanged || (b.alreadyChanged = []);
5439
+ b.alreadyChanged.push(c);
5440
+ }
5441
+ },
5442
+ getExtremes: function() {
5443
+ var a = this.options.stacking;
5444
+ if (a) {
5445
+ var d = this.yAxis;
5446
+ d = d.waterfallStacks;
5447
+ var b = this.stackedYNeg = [];
5448
+ var g = this.stackedYPos = [];
5449
+ "overlap" === a ? y(d[this.stackKey], function(e) {
5450
+ b.push(f(e.stackState));
5451
+ g.push(u(e.stackState));
5452
+ }) : y(d[this.stackKey], function(e) {
5453
+ b.push(e.negTotal + e.threshold);
5454
+ g.push(e.posTotal + e.threshold);
5455
+ });
5456
+ this.dataMin = f(b);
5457
+ this.dataMax = u(g);
5458
+ }
5459
+ }
5460
+ }, {
5461
+ getClassName: function() {
5462
+ var d = a.prototype.getClassName.call(this);
5463
+ this.isSum ? d += " highcharts-sum" : this.isIntermediateSum && (d += " highcharts-intermediate-sum");
5464
+ return d;
5465
+ },
5466
+ isValid: function() {
5467
+ return z(this.y) || this.isSum || this.isIntermediateSum;
5468
+ }
5469
+ });
5470
+ });
5471
+ E(f, "parts-more/PolygonSeries.js", [ f["parts/Globals.js"], f["mixins/legend-symbol.js"], f["parts/Utilities.js"] ], function(l, a, c) {
5472
+ c = c.seriesType;
5473
+ var b = l.Series, f = l.seriesTypes;
5474
+ c("polygon", "scatter", {
5475
+ marker: {
5476
+ enabled: !1,
5477
+ states: {
5478
+ hover: {
5479
+ enabled: !1
5480
+ }
5481
+ }
5482
+ },
5483
+ stickyTracking: !1,
5484
+ tooltip: {
5485
+ followPointer: !0,
5486
+ pointFormat: ""
5487
+ },
5488
+ trackByArea: !0
5489
+ }, {
5490
+ type: "polygon",
5491
+ getGraphPath: function() {
5492
+ for (var a = b.prototype.getGraphPath.call(this), c = a.length + 1; c--; ) (c === a.length || "M" === a[c]) && 0 < c && a.splice(c, 0, "z");
5493
+ return this.areaPath = a;
5494
+ },
5495
+ drawGraph: function() {
5496
+ this.options.fillColor = this.color;
5497
+ f.area.prototype.drawGraph.call(this);
5498
+ },
5499
+ drawLegendSymbol: a.drawRectangle,
5500
+ drawTracker: b.prototype.drawTracker,
5501
+ setStackedPoints: l.noop
5502
+ });
5503
+ });
5504
+ E(f, "parts-more/BubbleLegend.js", [ f["parts/Globals.js"], f["parts/Color.js"], f["parts/Legend.js"], f["parts/Utilities.js"] ], function(l, a, c, b) {
5505
+ var f = a.parse;
5506
+ a = b.addEvent;
5507
+ var v = b.arrayMax, w = b.arrayMin, z = b.isNumber, y = b.merge, d = b.objectEach, m = b.pick, n = b.stableSort, t = b.wrap, x = l.Series, A = l.Chart, r = l.noop, p = l.setOptions;
5508
+ p({
5509
+ legend: {
5510
+ bubbleLegend: {
5511
+ borderColor: void 0,
5512
+ borderWidth: 2,
5513
+ className: void 0,
5514
+ color: void 0,
5515
+ connectorClassName: void 0,
5516
+ connectorColor: void 0,
5517
+ connectorDistance: 60,
5518
+ connectorWidth: 1,
5519
+ enabled: !1,
5520
+ labels: {
5521
+ className: void 0,
5522
+ allowOverlap: !1,
5523
+ format: "",
5524
+ formatter: void 0,
5525
+ align: "right",
5526
+ style: {
5527
+ fontSize: 10,
5528
+ color: void 0
5529
+ },
5530
+ x: 0,
5531
+ y: 0
5532
+ },
5533
+ maxSize: 60,
5534
+ minSize: 10,
5535
+ legendIndex: 0,
5536
+ ranges: {
5537
+ value: void 0,
5538
+ borderColor: void 0,
5539
+ color: void 0,
5540
+ connectorColor: void 0
5541
+ },
5542
+ sizeBy: "area",
5543
+ sizeByAbsoluteValue: !1,
5544
+ zIndex: 1,
5545
+ zThreshold: 0
5546
+ }
5547
+ }
5548
+ });
5549
+ p = function() {
5550
+ function a(a, e) {
5551
+ this.options = this.symbols = this.visible = this.ranges = this.movementX = this.maxLabel = this.legendSymbol = this.legendItemWidth = this.legendItemHeight = this.legendItem = this.legendGroup = this.legend = this.fontMetrics = this.chart = void 0;
5552
+ this.setState = r;
5553
+ this.init(a, e);
5554
+ }
5555
+ a.prototype.init = function(a, e) {
5556
+ this.options = a;
5557
+ this.visible = !0;
5558
+ this.chart = e.chart;
5559
+ this.legend = e;
5560
+ };
5561
+ a.prototype.addToLegend = function(a) {
5562
+ a.splice(this.options.legendIndex, 0, this);
5563
+ };
5564
+ a.prototype.drawLegendSymbol = function(a) {
5565
+ var e = this.chart, k = this.options, d = m(a.options.itemDistance, 20), b = k.ranges;
5566
+ var g = k.connectorDistance;
5567
+ this.fontMetrics = e.renderer.fontMetrics(k.labels.style.fontSize.toString() + "px");
5568
+ b && b.length && z(b[0].value) ? (n(b, function(e, a) {
5569
+ return a.value - e.value;
5570
+ }), this.ranges = b, this.setOptions(), this.render(), e = this.getMaxLabelSize(),
5571
+ b = this.ranges[0].radius, a = 2 * b, g = g - b + e.width, g = 0 < g ? g : 0, this.maxLabel = e,
5572
+ this.movementX = "left" === k.labels.align ? g : 0, this.legendItemWidth = a + g + d,
5573
+ this.legendItemHeight = a + this.fontMetrics.h / 2) : a.options.bubbleLegend.autoRanges = !0;
5574
+ };
5575
+ a.prototype.setOptions = function() {
5576
+ var a = this.ranges, e = this.options, k = this.chart.series[e.seriesIndex], d = this.legend.baseline, b = {
5577
+ "z-index": e.zIndex,
5578
+ "stroke-width": e.borderWidth
5579
+ }, h = {
5580
+ "z-index": e.zIndex,
5581
+ "stroke-width": e.connectorWidth
5582
+ }, c = this.getLabelStyles(), p = k.options.marker.fillOpacity, r = this.chart.styledMode;
5583
+ a.forEach(function(g, q) {
5584
+ r || (b.stroke = m(g.borderColor, e.borderColor, k.color), b.fill = m(g.color, e.color, 1 !== p ? f(k.color).setOpacity(p).get("rgba") : k.color),
5585
+ h.stroke = m(g.connectorColor, e.connectorColor, k.color));
5586
+ a[q].radius = this.getRangeRadius(g.value);
5587
+ a[q] = y(a[q], {
5588
+ center: a[0].radius - a[q].radius + d
5589
+ });
5590
+ r || y(!0, a[q], {
5591
+ bubbleStyle: y(!1, b),
5592
+ connectorStyle: y(!1, h),
5593
+ labelStyle: c
5594
+ });
5595
+ }, this);
5596
+ };
5597
+ a.prototype.getLabelStyles = function() {
5598
+ var a = this.options, e = {}, k = "left" === a.labels.align, b = this.legend.options.rtl;
5599
+ d(a.labels.style, function(a, k) {
5600
+ "color" !== k && "fontSize" !== k && "z-index" !== k && (e[k] = a);
5601
+ });
5602
+ return y(!1, e, {
5603
+ "font-size": a.labels.style.fontSize,
5604
+ fill: m(a.labels.style.color, "#000000"),
5605
+ "z-index": a.zIndex,
5606
+ align: b || k ? "right" : "left"
5607
+ });
5608
+ };
5609
+ a.prototype.getRangeRadius = function(a) {
5610
+ var e = this.options;
5611
+ return this.chart.series[this.options.seriesIndex].getRadius.call(this, e.ranges[e.ranges.length - 1].value, e.ranges[0].value, e.minSize, e.maxSize, a);
5612
+ };
5613
+ a.prototype.render = function() {
5614
+ var a = this.chart.renderer, e = this.options.zThreshold;
5615
+ this.symbols || (this.symbols = {
5616
+ connectors: [],
5617
+ bubbleItems: [],
5618
+ labels: []
5619
+ });
5620
+ this.legendSymbol = a.g("bubble-legend");
5621
+ this.legendItem = a.g("bubble-legend-item");
5622
+ this.legendSymbol.translateX = 0;
5623
+ this.legendSymbol.translateY = 0;
5624
+ this.ranges.forEach(function(a) {
5625
+ a.value >= e && this.renderRange(a);
5626
+ }, this);
5627
+ this.legendSymbol.add(this.legendItem);
5628
+ this.legendItem.add(this.legendGroup);
5629
+ this.hideOverlappingLabels();
5630
+ };
5631
+ a.prototype.renderRange = function(a) {
5632
+ var e = this.options, k = e.labels, b = this.chart.renderer, d = this.symbols, g = d.labels, h = a.center, c = Math.abs(a.radius), p = e.connectorDistance, r = k.align, m = k.style.fontSize;
5633
+ p = this.legend.options.rtl || "left" === r ? -p : p;
5634
+ k = e.connectorWidth;
5635
+ var n = this.ranges[0].radius, l = h - c - e.borderWidth / 2 + k / 2;
5636
+ m = m / 2 - (this.fontMetrics.h - m) / 2;
5637
+ var f = b.styledMode;
5638
+ "center" === r && (p = 0, e.connectorDistance = 0, a.labelStyle.align = "center");
5639
+ r = l + e.labels.y;
5640
+ var u = n + p + e.labels.x;
5641
+ d.bubbleItems.push(b.circle(n, h + ((l % 1 ? 1 : .5) - (k % 2 ? 0 : .5)), c).attr(f ? {} : a.bubbleStyle).addClass((f ? "highcharts-color-" + this.options.seriesIndex + " " : "") + "highcharts-bubble-legend-symbol " + (e.className || "")).add(this.legendSymbol));
5642
+ d.connectors.push(b.path(b.crispLine([ "M", n, l, "L", n + p, l ], e.connectorWidth)).attr(f ? {} : a.connectorStyle).addClass((f ? "highcharts-color-" + this.options.seriesIndex + " " : "") + "highcharts-bubble-legend-connectors " + (e.connectorClassName || "")).add(this.legendSymbol));
5643
+ a = b.text(this.formatLabel(a), u, r + m).attr(f ? {} : a.labelStyle).addClass("highcharts-bubble-legend-labels " + (e.labels.className || "")).add(this.legendSymbol);
5644
+ g.push(a);
5645
+ a.placed = !0;
5646
+ a.alignAttr = {
5647
+ x: u,
5648
+ y: r + m
5649
+ };
5650
+ };
5651
+ a.prototype.getMaxLabelSize = function() {
5652
+ var a, e;
5653
+ this.symbols.labels.forEach(function(k) {
5654
+ e = k.getBBox(!0);
5655
+ a = a ? e.width > a.width ? e : a : e;
5656
+ });
5657
+ return a || {};
5658
+ };
5659
+ a.prototype.formatLabel = function(a) {
5660
+ var e = this.options, k = e.labels.formatter;
5661
+ e = e.labels.format;
5662
+ var d = this.chart.numberFormatter;
5663
+ return e ? b.format(e, a) : k ? k.call(a) : d(a.value, 1);
5664
+ };
5665
+ a.prototype.hideOverlappingLabels = function() {
5666
+ var a = this.chart, e = this.symbols;
5667
+ !this.options.labels.allowOverlap && e && (a.hideOverlappingLabels(e.labels), e.labels.forEach(function(a, b) {
5668
+ a.newOpacity ? a.newOpacity !== a.oldOpacity && e.connectors[b].show() : e.connectors[b].hide();
5669
+ }));
5670
+ };
5671
+ a.prototype.getRanges = function() {
5672
+ var a = this.legend.bubbleLegend, e = a.options.ranges, k, b = Number.MAX_VALUE, d = -Number.MAX_VALUE;
5673
+ a.chart.series.forEach(function(e) {
5674
+ e.isBubble && !e.ignoreSeries && (k = e.zData.filter(z), k.length && (b = m(e.options.zMin, Math.min(b, Math.max(w(k), !1 === e.options.displayNegative ? e.options.zThreshold : -Number.MAX_VALUE))),
5675
+ d = m(e.options.zMax, Math.max(d, v(k)))));
5676
+ });
5677
+ var h = b === d ? [ {
5678
+ value: d
5679
+ } ] : [ {
5680
+ value: b
5681
+ }, {
5682
+ value: (b + d) / 2
5683
+ }, {
5684
+ value: d,
5685
+ autoRanges: !0
5686
+ } ];
5687
+ e.length && e[0].radius && h.reverse();
5688
+ h.forEach(function(a, b) {
5689
+ e && e[b] && (h[b] = y(!1, e[b], a));
5690
+ });
5691
+ return h;
5692
+ };
5693
+ a.prototype.predictBubbleSizes = function() {
5694
+ var a = this.chart, e = this.fontMetrics, b = a.legend.options, d = "horizontal" === b.layout, h = d ? a.legend.lastLineHeight : 0, q = a.plotSizeX, c = a.plotSizeY, p = a.series[this.options.seriesIndex];
5695
+ a = Math.ceil(p.minPxSize);
5696
+ var r = Math.ceil(p.maxPxSize);
5697
+ p = p.options.maxSize;
5698
+ var m = Math.min(c, q);
5699
+ if (b.floating || !/%$/.test(p)) e = r; else if (p = parseFloat(p), e = (m + h - e.h / 2) * p / 100 / (p / 100 + 1),
5700
+ d && c - e >= q || !d && q - e >= c) e = r;
5701
+ return [ a, Math.ceil(e) ];
5702
+ };
5703
+ a.prototype.updateRanges = function(a, e) {
5704
+ var b = this.legend.options.bubbleLegend;
5705
+ b.minSize = a;
5706
+ b.maxSize = e;
5707
+ b.ranges = this.getRanges();
5708
+ };
5709
+ a.prototype.correctSizes = function() {
5710
+ var a = this.legend, e = this.chart.series[this.options.seriesIndex];
5711
+ 1 < Math.abs(Math.ceil(e.maxPxSize) - this.options.maxSize) && (this.updateRanges(this.options.minSize, e.maxPxSize),
5712
+ a.render());
5713
+ };
5714
+ return a;
5715
+ }();
5716
+ a(c, "afterGetAllItems", function(a) {
5717
+ var b = this.bubbleLegend, e = this.options, d = e.bubbleLegend, h = this.chart.getVisibleBubbleSeriesIndex();
5718
+ b && b.ranges && b.ranges.length && (d.ranges.length && (d.autoRanges = !!d.ranges[0].autoRanges),
5719
+ this.destroyItem(b));
5720
+ 0 <= h && e.enabled && d.enabled && (d.seriesIndex = h, this.bubbleLegend = new l.BubbleLegend(d, this),
5721
+ this.bubbleLegend.addToLegend(a.allItems));
5722
+ });
5723
+ A.prototype.getVisibleBubbleSeriesIndex = function() {
5724
+ for (var a = this.series, b = 0; b < a.length; ) {
5725
+ if (a[b] && a[b].isBubble && a[b].visible && a[b].zData.length) return b;
5726
+ b++;
5727
+ }
5728
+ return -1;
5729
+ };
5730
+ c.prototype.getLinesHeights = function() {
5731
+ var a = this.allItems, b = [], e = a.length, d, c = 0;
5732
+ for (d = 0; d < e; d++) if (a[d].legendItemHeight && (a[d].itemHeight = a[d].legendItemHeight),
5733
+ a[d] === a[e - 1] || a[d + 1] && a[d]._legendItemPos[1] !== a[d + 1]._legendItemPos[1]) {
5734
+ b.push({
5735
+ height: 0
5736
+ });
5737
+ var p = b[b.length - 1];
5738
+ for (c; c <= d; c++) a[c].itemHeight > p.height && (p.height = a[c].itemHeight);
5739
+ p.step = d;
5740
+ }
5741
+ return b;
5742
+ };
5743
+ c.prototype.retranslateItems = function(a) {
5744
+ var b, e, d, h = this.options.rtl, c = 0;
5745
+ this.allItems.forEach(function(k, g) {
5746
+ b = k.legendGroup.translateX;
5747
+ e = k._legendItemPos[1];
5748
+ if ((d = k.movementX) || h && k.ranges) d = h ? b - k.options.maxSize / 2 : b + d,
5749
+ k.legendGroup.attr({
5750
+ translateX: d
5751
+ });
5752
+ g > a[c].step && c++;
5753
+ k.legendGroup.attr({
5754
+ translateY: Math.round(e + a[c].height / 2)
5755
+ });
5756
+ k._legendItemPos[1] = e + a[c].height / 2;
5757
+ });
5758
+ };
5759
+ a(x, "legendItemClick", function() {
5760
+ var a = this.chart, b = this.visible, e = this.chart.legend;
5761
+ e && e.bubbleLegend && (this.visible = !b, this.ignoreSeries = b, a = 0 <= a.getVisibleBubbleSeriesIndex(),
5762
+ e.bubbleLegend.visible !== a && (e.update({
5763
+ bubbleLegend: {
5764
+ enabled: a
5765
+ }
5766
+ }), e.bubbleLegend.visible = a), this.visible = b);
5767
+ });
5768
+ t(A.prototype, "drawChartBox", function(a, b, e) {
5769
+ var k = this.legend, h = 0 <= this.getVisibleBubbleSeriesIndex();
5770
+ if (k && k.options.enabled && k.bubbleLegend && k.options.bubbleLegend.autoRanges && h) {
5771
+ var g = k.bubbleLegend.options;
5772
+ h = k.bubbleLegend.predictBubbleSizes();
5773
+ k.bubbleLegend.updateRanges(h[0], h[1]);
5774
+ g.placed || (k.group.placed = !1, k.allItems.forEach(function(e) {
5775
+ e.legendGroup.translateY = null;
5776
+ }));
5777
+ k.render();
5778
+ this.getMargins();
5779
+ this.axes.forEach(function(e) {
5780
+ e.visible && e.render();
5781
+ g.placed || (e.setScale(), e.updateNames(), d(e.ticks, function(e) {
5782
+ e.isNew = !0;
5783
+ e.isNewLabel = !0;
5784
+ }));
5785
+ });
5786
+ g.placed = !0;
5787
+ this.getMargins();
5788
+ a.call(this, b, e);
5789
+ k.bubbleLegend.correctSizes();
5790
+ k.retranslateItems(k.getLinesHeights());
5791
+ } else a.call(this, b, e), k && k.options.enabled && k.bubbleLegend && (k.render(),
5792
+ k.retranslateItems(k.getLinesHeights()));
5793
+ });
5794
+ l.BubbleLegend = p;
5795
+ return l.BubbleLegend;
5796
+ });
5797
+ E(f, "parts-more/BubbleSeries.js", [ f["parts/Globals.js"], f["parts/Color.js"], f["parts/Point.js"], f["parts/Utilities.js"] ], function(l, a, c, b) {
5798
+ var f = a.parse, v = b.arrayMax, w = b.arrayMin, z = b.clamp, y = b.extend, d = b.isNumber, m = b.pick, n = b.pInt;
5799
+ a = b.seriesType;
5800
+ b = l.Axis;
5801
+ var t = l.noop, x = l.Series, A = l.seriesTypes;
5802
+ a("bubble", "scatter", {
5803
+ dataLabels: {
5804
+ formatter: function() {
5805
+ return this.point.z;
5806
+ },
5807
+ inside: !0,
5808
+ verticalAlign: "middle"
5809
+ },
5810
+ animationLimit: 250,
5811
+ marker: {
5812
+ lineColor: null,
5813
+ lineWidth: 1,
5814
+ fillOpacity: .5,
5815
+ radius: null,
5816
+ states: {
5817
+ hover: {
5818
+ radiusPlus: 0
5819
+ }
5820
+ },
5821
+ symbol: "circle"
5822
+ },
5823
+ minSize: 8,
5824
+ maxSize: "20%",
5825
+ softThreshold: !1,
5826
+ states: {
5827
+ hover: {
5828
+ halo: {
5829
+ size: 5
5830
+ }
5831
+ }
5832
+ },
5833
+ tooltip: {
5834
+ pointFormat: "({point.x}, {point.y}), Size: {point.z}"
5835
+ },
5836
+ turboThreshold: 0,
5837
+ zThreshold: 0,
5838
+ zoneAxis: "z"
5839
+ }, {
5840
+ pointArrayMap: [ "y", "z" ],
5841
+ parallelArrays: [ "x", "y", "z" ],
5842
+ trackerGroups: [ "group", "dataLabelsGroup" ],
5843
+ specialGroup: "group",
5844
+ bubblePadding: !0,
5845
+ zoneAxis: "z",
5846
+ directTouch: !0,
5847
+ isBubble: !0,
5848
+ pointAttribs: function(a, b) {
5849
+ var d = this.options.marker.fillOpacity;
5850
+ a = x.prototype.pointAttribs.call(this, a, b);
5851
+ 1 !== d && (a.fill = f(a.fill).setOpacity(d).get("rgba"));
5852
+ return a;
5853
+ },
5854
+ getRadii: function(a, b, d) {
5855
+ var g = this.zData, e = this.yData, k = d.minPxSize, h = d.maxPxSize, c = [];
5856
+ var q = 0;
5857
+ for (d = g.length; q < d; q++) {
5858
+ var p = g[q];
5859
+ c.push(this.getRadius(a, b, k, h, p, e[q]));
5860
+ }
5861
+ this.radii = c;
5862
+ },
5863
+ getRadius: function(a, b, h, g, e, k) {
5864
+ var c = this.options, p = "width" !== c.sizeBy, q = c.zThreshold, r = b - a, m = .5;
5865
+ if (null === k || null === e) return null;
5866
+ if (d(e)) {
5867
+ c.sizeByAbsoluteValue && (e = Math.abs(e - q), r = Math.max(b - q, Math.abs(a - q)),
5868
+ a = 0);
5869
+ if (e < a) return h / 2 - 1;
5870
+ 0 < r && (m = (e - a) / r);
5871
+ }
5872
+ p && 0 <= m && (m = Math.sqrt(m));
5873
+ return Math.ceil(h + m * (g - h)) / 2;
5874
+ },
5875
+ animate: function(a) {
5876
+ !a && this.points.length < this.options.animationLimit && this.points.forEach(function(a) {
5877
+ var b = a.graphic;
5878
+ if (b && b.width) {
5879
+ var d = {
5880
+ x: b.x,
5881
+ y: b.y,
5882
+ width: b.width,
5883
+ height: b.height
5884
+ };
5885
+ b.attr({
5886
+ x: a.plotX,
5887
+ y: a.plotY,
5888
+ width: 1,
5889
+ height: 1
5890
+ });
5891
+ b.animate(d, this.options.animation);
5892
+ }
5893
+ }, this);
5894
+ },
5895
+ hasData: function() {
5896
+ return !!this.processedXData.length;
5897
+ },
5898
+ translate: function() {
5899
+ var a, b = this.data, c = this.radii;
5900
+ A.scatter.prototype.translate.call(this);
5901
+ for (a = b.length; a--; ) {
5902
+ var g = b[a];
5903
+ var e = c ? c[a] : 0;
5904
+ d(e) && e >= this.minPxSize / 2 ? (g.marker = y(g.marker, {
5905
+ radius: e,
5906
+ width: 2 * e,
5907
+ height: 2 * e
5908
+ }), g.dlBox = {
5909
+ x: g.plotX - e,
5910
+ y: g.plotY - e,
5911
+ width: 2 * e,
5912
+ height: 2 * e
5913
+ }) : g.shapeArgs = g.plotY = g.dlBox = void 0;
5914
+ }
5915
+ },
5916
+ alignDataLabel: A.column.prototype.alignDataLabel,
5917
+ buildKDTree: t,
5918
+ applyZones: t
5919
+ }, {
5920
+ haloPath: function(a) {
5921
+ return c.prototype.haloPath.call(this, 0 === a ? 0 : (this.marker ? this.marker.radius || 0 : 0) + a);
5922
+ },
5923
+ ttBelow: !1
5924
+ });
5925
+ b.prototype.beforePadding = function() {
5926
+ var a = this, b = this.len, c = this.chart, g = 0, e = b, k = this.isXAxis, l = k ? "xData" : "yData", f = this.min, q = {}, u = Math.min(c.plotWidth, c.plotHeight), t = Number.MAX_VALUE, x = -Number.MAX_VALUE, y = this.max - f, A = b / y, H = [];
5927
+ this.series.forEach(function(e) {
5928
+ var b = e.options;
5929
+ !e.bubblePadding || !e.visible && c.options.chart.ignoreHiddenSeries || (a.allowZoomOutside = !0,
5930
+ H.push(e), k && ([ "minSize", "maxSize" ].forEach(function(e) {
5931
+ var a = b[e], d = /%$/.test(a);
5932
+ a = n(a);
5933
+ q[e] = d ? u * a / 100 : a;
5934
+ }), e.minPxSize = q.minSize, e.maxPxSize = Math.max(q.maxSize, q.minSize), e = e.zData.filter(d),
5935
+ e.length && (t = m(b.zMin, z(w(e), !1 === b.displayNegative ? b.zThreshold : -Number.MAX_VALUE, t)),
5936
+ x = m(b.zMax, Math.max(x, v(e))))));
5937
+ });
5938
+ H.forEach(function(b) {
5939
+ var c = b[l], h = c.length;
5940
+ k && b.getRadii(t, x, b);
5941
+ if (0 < y) for (;h--; ) if (d(c[h]) && a.dataMin <= c[h] && c[h] <= a.max) {
5942
+ var q = b.radii ? b.radii[h] : 0;
5943
+ g = Math.min((c[h] - f) * A - q, g);
5944
+ e = Math.max((c[h] - f) * A + q, e);
5945
+ }
5946
+ });
5947
+ H.length && 0 < y && !this.isLog && (e -= b, A *= (b + Math.max(0, g) - Math.min(e, b)) / b,
5948
+ [ [ "min", "userMin", g ], [ "max", "userMax", e ] ].forEach(function(e) {
5949
+ "undefined" === typeof m(a.options[e[0]], a[e[1]]) && (a[e[0]] += e[2] / A);
5950
+ }));
5951
+ };
5952
+ });
5953
+ E(f, "modules/networkgraph/integrations.js", [ f["parts/Globals.js"] ], function(l) {
5954
+ l.networkgraphIntegrations = {
5955
+ verlet: {
5956
+ attractiveForceFunction: function(a, c) {
5957
+ return (c - a) / a;
5958
+ },
5959
+ repulsiveForceFunction: function(a, c) {
5960
+ return (c - a) / a * (c > a ? 1 : 0);
5961
+ },
5962
+ barycenter: function() {
5963
+ var a = this.options.gravitationalConstant, c = this.barycenter.xFactor, b = this.barycenter.yFactor;
5964
+ c = (c - (this.box.left + this.box.width) / 2) * a;
5965
+ b = (b - (this.box.top + this.box.height) / 2) * a;
5966
+ this.nodes.forEach(function(a) {
5967
+ a.fixedPosition || (a.plotX -= c / a.mass / a.degree, a.plotY -= b / a.mass / a.degree);
5968
+ });
5969
+ },
5970
+ repulsive: function(a, c, b) {
5971
+ c = c * this.diffTemperature / a.mass / a.degree;
5972
+ a.fixedPosition || (a.plotX += b.x * c, a.plotY += b.y * c);
5973
+ },
5974
+ attractive: function(a, c, b) {
5975
+ var l = a.getMass(), f = -b.x * c * this.diffTemperature;
5976
+ c = -b.y * c * this.diffTemperature;
5977
+ a.fromNode.fixedPosition || (a.fromNode.plotX -= f * l.fromNode / a.fromNode.degree,
5978
+ a.fromNode.plotY -= c * l.fromNode / a.fromNode.degree);
5979
+ a.toNode.fixedPosition || (a.toNode.plotX += f * l.toNode / a.toNode.degree, a.toNode.plotY += c * l.toNode / a.toNode.degree);
5980
+ },
5981
+ integrate: function(a, c) {
5982
+ var b = -a.options.friction, l = a.options.maxSpeed, f = (c.plotX + c.dispX - c.prevX) * b;
5983
+ b *= c.plotY + c.dispY - c.prevY;
5984
+ var w = Math.abs, z = w(f) / (f || 1);
5985
+ w = w(b) / (b || 1);
5986
+ f = z * Math.min(l, Math.abs(f));
5987
+ b = w * Math.min(l, Math.abs(b));
5988
+ c.prevX = c.plotX + c.dispX;
5989
+ c.prevY = c.plotY + c.dispY;
5990
+ c.plotX += f;
5991
+ c.plotY += b;
5992
+ c.temperature = a.vectorLength({
5993
+ x: f,
5994
+ y: b
5995
+ });
5996
+ },
5997
+ getK: function(a) {
5998
+ return Math.pow(a.box.width * a.box.height / a.nodes.length, .5);
5999
+ }
6000
+ },
6001
+ euler: {
6002
+ attractiveForceFunction: function(a, c) {
6003
+ return a * a / c;
6004
+ },
6005
+ repulsiveForceFunction: function(a, c) {
6006
+ return c * c / a;
6007
+ },
6008
+ barycenter: function() {
6009
+ var a = this.options.gravitationalConstant, c = this.barycenter.xFactor, b = this.barycenter.yFactor;
6010
+ this.nodes.forEach(function(f) {
6011
+ if (!f.fixedPosition) {
6012
+ var l = f.getDegree();
6013
+ l *= 1 + l / 2;
6014
+ f.dispX += (c - f.plotX) * a * l / f.degree;
6015
+ f.dispY += (b - f.plotY) * a * l / f.degree;
6016
+ }
6017
+ });
6018
+ },
6019
+ repulsive: function(a, c, b, f) {
6020
+ a.dispX += b.x / f * c / a.degree;
6021
+ a.dispY += b.y / f * c / a.degree;
6022
+ },
6023
+ attractive: function(a, c, b, f) {
6024
+ var l = a.getMass(), u = b.x / f * c;
6025
+ c *= b.y / f;
6026
+ a.fromNode.fixedPosition || (a.fromNode.dispX -= u * l.fromNode / a.fromNode.degree,
6027
+ a.fromNode.dispY -= c * l.fromNode / a.fromNode.degree);
6028
+ a.toNode.fixedPosition || (a.toNode.dispX += u * l.toNode / a.toNode.degree, a.toNode.dispY += c * l.toNode / a.toNode.degree);
6029
+ },
6030
+ integrate: function(a, c) {
6031
+ c.dispX += c.dispX * a.options.friction;
6032
+ c.dispY += c.dispY * a.options.friction;
6033
+ var b = c.temperature = a.vectorLength({
6034
+ x: c.dispX,
6035
+ y: c.dispY
6036
+ });
6037
+ 0 !== b && (c.plotX += c.dispX / b * Math.min(Math.abs(c.dispX), a.temperature),
6038
+ c.plotY += c.dispY / b * Math.min(Math.abs(c.dispY), a.temperature));
6039
+ },
6040
+ getK: function(a) {
6041
+ return Math.pow(a.box.width * a.box.height / a.nodes.length, .3);
6042
+ }
6043
+ }
6044
+ };
6045
+ });
6046
+ E(f, "modules/networkgraph/QuadTree.js", [ f["parts/Globals.js"], f["parts/Utilities.js"] ], function(f, a) {
6047
+ a = a.extend;
6048
+ var c = f.QuadTreeNode = function(a) {
6049
+ this.box = a;
6050
+ this.boxSize = Math.min(a.width, a.height);
6051
+ this.nodes = [];
6052
+ this.body = this.isInternal = !1;
6053
+ this.isEmpty = !0;
6054
+ };
6055
+ a(c.prototype, {
6056
+ insert: function(a, f) {
6057
+ this.isInternal ? this.nodes[this.getBoxPosition(a)].insert(a, f - 1) : (this.isEmpty = !1,
6058
+ this.body ? f ? (this.isInternal = !0, this.divideBox(), !0 !== this.body && (this.nodes[this.getBoxPosition(this.body)].insert(this.body, f - 1),
6059
+ this.body = !0), this.nodes[this.getBoxPosition(a)].insert(a, f - 1)) : (f = new c({
6060
+ top: a.plotX,
6061
+ left: a.plotY,
6062
+ width: .1,
6063
+ height: .1
6064
+ }), f.body = a, f.isInternal = !1, this.nodes.push(f)) : (this.isInternal = !1,
6065
+ this.body = a));
6066
+ },
6067
+ updateMassAndCenter: function() {
6068
+ var a = 0, c = 0, f = 0;
6069
+ this.isInternal ? (this.nodes.forEach(function(b) {
6070
+ b.isEmpty || (a += b.mass, c += b.plotX * b.mass, f += b.plotY * b.mass);
6071
+ }), c /= a, f /= a) : this.body && (a = this.body.mass, c = this.body.plotX, f = this.body.plotY);
6072
+ this.mass = a;
6073
+ this.plotX = c;
6074
+ this.plotY = f;
6075
+ },
6076
+ divideBox: function() {
6077
+ var a = this.box.width / 2, f = this.box.height / 2;
6078
+ this.nodes[0] = new c({
6079
+ left: this.box.left,
6080
+ top: this.box.top,
6081
+ width: a,
6082
+ height: f
6083
+ });
6084
+ this.nodes[1] = new c({
6085
+ left: this.box.left + a,
6086
+ top: this.box.top,
6087
+ width: a,
6088
+ height: f
6089
+ });
6090
+ this.nodes[2] = new c({
6091
+ left: this.box.left + a,
6092
+ top: this.box.top + f,
6093
+ width: a,
6094
+ height: f
6095
+ });
6096
+ this.nodes[3] = new c({
6097
+ left: this.box.left,
6098
+ top: this.box.top + f,
6099
+ width: a,
6100
+ height: f
6101
+ });
6102
+ },
6103
+ getBoxPosition: function(a) {
6104
+ var b = a.plotY < this.box.top + this.box.height / 2;
6105
+ return a.plotX < this.box.left + this.box.width / 2 ? b ? 0 : 3 : b ? 1 : 2;
6106
+ }
6107
+ });
6108
+ f = f.QuadTree = function(a, f, l, w) {
6109
+ this.box = {
6110
+ left: a,
6111
+ top: f,
6112
+ width: l,
6113
+ height: w
6114
+ };
6115
+ this.maxDepth = 25;
6116
+ this.root = new c(this.box, "0");
6117
+ this.root.isInternal = !0;
6118
+ this.root.isRoot = !0;
6119
+ this.root.divideBox();
6120
+ };
6121
+ a(f.prototype, {
6122
+ insertNodes: function(a) {
6123
+ a.forEach(function(a) {
6124
+ this.root.insert(a, this.maxDepth);
6125
+ }, this);
6126
+ },
6127
+ visitNodeRecursive: function(a, c, f) {
6128
+ var b;
6129
+ a || (a = this.root);
6130
+ a === this.root && c && (b = c(a));
6131
+ !1 !== b && (a.nodes.forEach(function(a) {
6132
+ if (a.isInternal) {
6133
+ c && (b = c(a));
6134
+ if (!1 === b) return;
6135
+ this.visitNodeRecursive(a, c, f);
6136
+ } else a.body && c && c(a.body);
6137
+ f && f(a);
6138
+ }, this), a === this.root && f && f(a));
6139
+ },
6140
+ calculateMassAndCenter: function() {
6141
+ this.visitNodeRecursive(null, null, function(a) {
6142
+ a.updateMassAndCenter();
6143
+ });
6144
+ }
6145
+ });
6146
+ });
6147
+ E(f, "modules/networkgraph/layouts.js", [ f["parts/Globals.js"], f["parts/Utilities.js"] ], function(f, a) {
6148
+ var c = a.addEvent, b = a.clamp, l = a.defined, v = a.extend, w = a.isFunction, z = a.pick, y = a.setAnimation;
6149
+ a = f.Chart;
6150
+ f.layouts = {
6151
+ "reingold-fruchterman": function() {}
6152
+ };
6153
+ v(f.layouts["reingold-fruchterman"].prototype, {
6154
+ init: function(a) {
6155
+ this.options = a;
6156
+ this.nodes = [];
6157
+ this.links = [];
6158
+ this.series = [];
6159
+ this.box = {
6160
+ x: 0,
6161
+ y: 0,
6162
+ width: 0,
6163
+ height: 0
6164
+ };
6165
+ this.setInitialRendering(!0);
6166
+ this.integration = f.networkgraphIntegrations[a.integration];
6167
+ this.attractiveForce = z(a.attractiveForce, this.integration.attractiveForceFunction);
6168
+ this.repulsiveForce = z(a.repulsiveForce, this.integration.repulsiveForceFunction);
6169
+ this.approximation = a.approximation;
6170
+ },
6171
+ start: function() {
6172
+ var a = this.series, b = this.options;
6173
+ this.currentStep = 0;
6174
+ this.forces = a[0] && a[0].forces || [];
6175
+ this.initialRendering && (this.initPositions(), a.forEach(function(a) {
6176
+ a.render();
6177
+ }));
6178
+ this.setK();
6179
+ this.resetSimulation(b);
6180
+ b.enableSimulation && this.step();
6181
+ },
6182
+ step: function() {
6183
+ var a = this, b = this.series, c = this.options;
6184
+ a.currentStep++;
6185
+ "barnes-hut" === a.approximation && (a.createQuadTree(), a.quadTree.calculateMassAndCenter());
6186
+ a.forces.forEach(function(b) {
6187
+ a[b + "Forces"](a.temperature);
6188
+ });
6189
+ a.applyLimits(a.temperature);
6190
+ a.temperature = a.coolDown(a.startTemperature, a.diffTemperature, a.currentStep);
6191
+ a.prevSystemTemperature = a.systemTemperature;
6192
+ a.systemTemperature = a.getSystemTemperature();
6193
+ c.enableSimulation && (b.forEach(function(a) {
6194
+ a.chart && a.render();
6195
+ }), a.maxIterations-- && isFinite(a.temperature) && !a.isStable() ? (a.simulation && f.win.cancelAnimationFrame(a.simulation),
6196
+ a.simulation = f.win.requestAnimationFrame(function() {
6197
+ a.step();
6198
+ })) : a.simulation = !1);
6199
+ },
6200
+ stop: function() {
6201
+ this.simulation && f.win.cancelAnimationFrame(this.simulation);
6202
+ },
6203
+ setArea: function(a, b, c, f) {
6204
+ this.box = {
6205
+ left: a,
6206
+ top: b,
6207
+ width: c,
6208
+ height: f
6209
+ };
6210
+ },
6211
+ setK: function() {
6212
+ this.k = this.options.linkLength || this.integration.getK(this);
6213
+ },
6214
+ addElementsToCollection: function(a, b) {
6215
+ a.forEach(function(a) {
6216
+ -1 === b.indexOf(a) && b.push(a);
6217
+ });
6218
+ },
6219
+ removeElementFromCollection: function(a, b) {
6220
+ a = b.indexOf(a);
6221
+ -1 !== a && b.splice(a, 1);
6222
+ },
6223
+ clear: function() {
6224
+ this.nodes.length = 0;
6225
+ this.links.length = 0;
6226
+ this.series.length = 0;
6227
+ this.resetSimulation();
6228
+ },
6229
+ resetSimulation: function() {
6230
+ this.forcedStop = !1;
6231
+ this.systemTemperature = 0;
6232
+ this.setMaxIterations();
6233
+ this.setTemperature();
6234
+ this.setDiffTemperature();
6235
+ },
6236
+ setMaxIterations: function(a) {
6237
+ this.maxIterations = z(a, this.options.maxIterations);
6238
+ },
6239
+ setTemperature: function() {
6240
+ this.temperature = this.startTemperature = Math.sqrt(this.nodes.length);
6241
+ },
6242
+ setDiffTemperature: function() {
6243
+ this.diffTemperature = this.startTemperature / (this.options.maxIterations + 1);
6244
+ },
6245
+ setInitialRendering: function(a) {
6246
+ this.initialRendering = a;
6247
+ },
6248
+ createQuadTree: function() {
6249
+ this.quadTree = new f.QuadTree(this.box.left, this.box.top, this.box.width, this.box.height);
6250
+ this.quadTree.insertNodes(this.nodes);
6251
+ },
6252
+ initPositions: function() {
6253
+ var a = this.options.initialPositions;
6254
+ w(a) ? (a.call(this), this.nodes.forEach(function(a) {
6255
+ l(a.prevX) || (a.prevX = a.plotX);
6256
+ l(a.prevY) || (a.prevY = a.plotY);
6257
+ a.dispX = 0;
6258
+ a.dispY = 0;
6259
+ })) : "circle" === a ? this.setCircularPositions() : this.setRandomPositions();
6260
+ },
6261
+ setCircularPositions: function() {
6262
+ function a(b) {
6263
+ b.linksFrom.forEach(function(b) {
6264
+ r[b.toNode.id] || (r[b.toNode.id] = !0, u.push(b.toNode), a(b.toNode));
6265
+ });
6266
+ }
6267
+ var b = this.box, c = this.nodes, f = 2 * Math.PI / (c.length + 1), l = c.filter(function(a) {
6268
+ return 0 === a.linksTo.length;
6269
+ }), u = [], r = {}, p = this.options.initialPositionRadius;
6270
+ l.forEach(function(b) {
6271
+ u.push(b);
6272
+ a(b);
6273
+ });
6274
+ u.length ? c.forEach(function(a) {
6275
+ -1 === u.indexOf(a) && u.push(a);
6276
+ }) : u = c;
6277
+ u.forEach(function(a, d) {
6278
+ a.plotX = a.prevX = z(a.plotX, b.width / 2 + p * Math.cos(d * f));
6279
+ a.plotY = a.prevY = z(a.plotY, b.height / 2 + p * Math.sin(d * f));
6280
+ a.dispX = 0;
6281
+ a.dispY = 0;
6282
+ });
6283
+ },
6284
+ setRandomPositions: function() {
6285
+ function a(a) {
6286
+ a = a * a / Math.PI;
6287
+ return a -= Math.floor(a);
6288
+ }
6289
+ var b = this.box, c = this.nodes, f = c.length + 1;
6290
+ c.forEach(function(d, c) {
6291
+ d.plotX = d.prevX = z(d.plotX, b.width * a(c));
6292
+ d.plotY = d.prevY = z(d.plotY, b.height * a(f + c));
6293
+ d.dispX = 0;
6294
+ d.dispY = 0;
6295
+ });
6296
+ },
6297
+ force: function(a) {
6298
+ this.integration[a].apply(this, Array.prototype.slice.call(arguments, 1));
6299
+ },
6300
+ barycenterForces: function() {
6301
+ this.getBarycenter();
6302
+ this.force("barycenter");
6303
+ },
6304
+ getBarycenter: function() {
6305
+ var a = 0, b = 0, c = 0;
6306
+ this.nodes.forEach(function(d) {
6307
+ b += d.plotX * d.mass;
6308
+ c += d.plotY * d.mass;
6309
+ a += d.mass;
6310
+ });
6311
+ return this.barycenter = {
6312
+ x: b,
6313
+ y: c,
6314
+ xFactor: b / a,
6315
+ yFactor: c / a
6316
+ };
6317
+ },
6318
+ barnesHutApproximation: function(a, b) {
6319
+ var d = this.getDistXY(a, b), c = this.vectorLength(d);
6320
+ if (a !== b && 0 !== c) if (b.isInternal) {
6321
+ if (b.boxSize / c < this.options.theta && 0 !== c) {
6322
+ var f = this.repulsiveForce(c, this.k);
6323
+ this.force("repulsive", a, f * b.mass, d, c);
6324
+ var l = !1;
6325
+ } else l = !0;
6326
+ } else f = this.repulsiveForce(c, this.k), this.force("repulsive", a, f * b.mass, d, c);
6327
+ return l;
6328
+ },
6329
+ repulsiveForces: function() {
6330
+ var a = this;
6331
+ "barnes-hut" === a.approximation ? a.nodes.forEach(function(b) {
6332
+ a.quadTree.visitNodeRecursive(null, function(d) {
6333
+ return a.barnesHutApproximation(b, d);
6334
+ });
6335
+ }) : a.nodes.forEach(function(b) {
6336
+ a.nodes.forEach(function(d) {
6337
+ if (b !== d && !b.fixedPosition) {
6338
+ var c = a.getDistXY(b, d);
6339
+ var f = a.vectorLength(c);
6340
+ if (0 !== f) {
6341
+ var l = a.repulsiveForce(f, a.k);
6342
+ a.force("repulsive", b, l * d.mass, c, f);
6343
+ }
6344
+ }
6345
+ });
6346
+ });
6347
+ },
6348
+ attractiveForces: function() {
6349
+ var a = this, b, c, f;
6350
+ a.links.forEach(function(d) {
6351
+ d.fromNode && d.toNode && (b = a.getDistXY(d.fromNode, d.toNode), c = a.vectorLength(b),
6352
+ 0 !== c && (f = a.attractiveForce(c, a.k), a.force("attractive", d, f, b, c)));
6353
+ });
6354
+ },
6355
+ applyLimits: function() {
6356
+ var a = this;
6357
+ a.nodes.forEach(function(b) {
6358
+ b.fixedPosition || (a.integration.integrate(a, b), a.applyLimitBox(b, a.box), b.dispX = 0,
6359
+ b.dispY = 0);
6360
+ });
6361
+ },
6362
+ applyLimitBox: function(a, c) {
6363
+ var d = a.radius;
6364
+ a.plotX = b(a.plotX, c.left + d, c.width - d);
6365
+ a.plotY = b(a.plotY, c.top + d, c.height - d);
6366
+ },
6367
+ coolDown: function(a, b, c) {
6368
+ return a - b * c;
6369
+ },
6370
+ isStable: function() {
6371
+ return 1e-5 > Math.abs(this.systemTemperature - this.prevSystemTemperature) || 0 >= this.temperature;
6372
+ },
6373
+ getSystemTemperature: function() {
6374
+ return this.nodes.reduce(function(a, b) {
6375
+ return a + b.temperature;
6376
+ }, 0);
6377
+ },
6378
+ vectorLength: function(a) {
6379
+ return Math.sqrt(a.x * a.x + a.y * a.y);
6380
+ },
6381
+ getDistR: function(a, b) {
6382
+ a = this.getDistXY(a, b);
6383
+ return this.vectorLength(a);
6384
+ },
6385
+ getDistXY: function(a, b) {
6386
+ var c = a.plotX - b.plotX;
6387
+ a = a.plotY - b.plotY;
6388
+ return {
6389
+ x: c,
6390
+ y: a,
6391
+ absX: Math.abs(c),
6392
+ absY: Math.abs(a)
6393
+ };
6394
+ }
6395
+ });
6396
+ c(a, "predraw", function() {
6397
+ this.graphLayoutsLookup && this.graphLayoutsLookup.forEach(function(a) {
6398
+ a.stop();
6399
+ });
6400
+ });
6401
+ c(a, "render", function() {
6402
+ function a(a) {
6403
+ a.maxIterations-- && isFinite(a.temperature) && !a.isStable() && !a.options.enableSimulation && (a.beforeStep && a.beforeStep(),
6404
+ a.step(), c = !1, b = !0);
6405
+ }
6406
+ var b = !1;
6407
+ if (this.graphLayoutsLookup) {
6408
+ y(!1, this);
6409
+ for (this.graphLayoutsLookup.forEach(function(a) {
6410
+ a.start();
6411
+ }); !c; ) {
6412
+ var c = !0;
6413
+ this.graphLayoutsLookup.forEach(a);
6414
+ }
6415
+ b && this.series.forEach(function(a) {
6416
+ a && a.layout && a.render();
6417
+ });
6418
+ }
6419
+ });
6420
+ });
6421
+ E(f, "modules/networkgraph/draggable-nodes.js", [ f["parts/Globals.js"], f["parts/Utilities.js"] ], function(f, a) {
6422
+ var c = a.addEvent;
6423
+ a = f.Chart;
6424
+ f.dragNodesMixin = {
6425
+ onMouseDown: function(a, c) {
6426
+ c = this.chart.pointer.normalize(c);
6427
+ a.fixedPosition = {
6428
+ chartX: c.chartX,
6429
+ chartY: c.chartY,
6430
+ plotX: a.plotX,
6431
+ plotY: a.plotY
6432
+ };
6433
+ a.inDragMode = !0;
6434
+ },
6435
+ onMouseMove: function(a, c) {
6436
+ if (a.fixedPosition && a.inDragMode) {
6437
+ var b = this.chart, f = b.pointer.normalize(c);
6438
+ c = a.fixedPosition.chartX - f.chartX;
6439
+ f = a.fixedPosition.chartY - f.chartY;
6440
+ if (5 < Math.abs(c) || 5 < Math.abs(f)) c = a.fixedPosition.plotX - c, f = a.fixedPosition.plotY - f,
6441
+ b.isInsidePlot(c, f) && (a.plotX = c, a.plotY = f, a.hasDragged = !0, this.redrawHalo(a),
6442
+ this.layout.simulation ? this.layout.resetSimulation() : (this.layout.setInitialRendering(!1),
6443
+ this.layout.enableSimulation ? this.layout.start() : this.layout.setMaxIterations(1),
6444
+ this.chart.redraw(), this.layout.setInitialRendering(!0)));
6445
+ }
6446
+ },
6447
+ onMouseUp: function(a, c) {
6448
+ a.fixedPosition && a.hasDragged && (this.layout.enableSimulation ? this.layout.start() : this.chart.redraw(),
6449
+ a.inDragMode = a.hasDragged = !1, this.options.fixedDraggable || delete a.fixedPosition);
6450
+ },
6451
+ redrawHalo: function(a) {
6452
+ a && this.halo && this.halo.attr({
6453
+ d: a.haloPath(this.options.states.hover.halo.size)
6454
+ });
6455
+ }
6456
+ };
6457
+ c(a, "load", function() {
6458
+ var a = this, f, l, w;
6459
+ a.container && (f = c(a.container, "mousedown", function(b) {
6460
+ var f = a.hoverPoint;
6461
+ f && f.series && f.series.hasDraggableNodes && f.series.options.draggable && (f.series.onMouseDown(f, b),
6462
+ l = c(a.container, "mousemove", function(a) {
6463
+ return f && f.series && f.series.onMouseMove(f, a);
6464
+ }), w = c(a.container.ownerDocument, "mouseup", function(a) {
6465
+ l();
6466
+ w();
6467
+ return f && f.series && f.series.onMouseUp(f, a);
6468
+ }));
6469
+ }));
6470
+ c(a, "destroy", function() {
6471
+ f();
6472
+ });
6473
+ });
6474
+ });
6475
+ E(f, "parts-more/PackedBubbleSeries.js", [ f["parts/Globals.js"], f["parts/Color.js"], f["parts/Point.js"], f["parts/Utilities.js"] ], function(f, a, c, b) {
6476
+ var l = a.parse, v = b.addEvent, w = b.clamp, z = b.defined, y = b.extend;
6477
+ a = b.extendClass;
6478
+ var d = b.fireEvent, m = b.isArray, n = b.isNumber, t = b.merge, x = b.pick;
6479
+ b = b.seriesType;
6480
+ var A = f.Series, r = f.Chart, p = f.layouts["reingold-fruchterman"], h = f.seriesTypes.bubble.prototype.pointClass, g = f.dragNodesMixin;
6481
+ f.networkgraphIntegrations.packedbubble = {
6482
+ repulsiveForceFunction: function(a, b, c, d) {
6483
+ return Math.min(a, (c.marker.radius + d.marker.radius) / 2);
6484
+ },
6485
+ barycenter: function() {
6486
+ var a = this, b = a.options.gravitationalConstant, c = a.box, d = a.nodes, f, g;
6487
+ d.forEach(function(e) {
6488
+ a.options.splitSeries && !e.isParentNode ? (f = e.series.parentNode.plotX, g = e.series.parentNode.plotY) : (f = c.width / 2,
6489
+ g = c.height / 2);
6490
+ e.fixedPosition || (e.plotX -= (e.plotX - f) * b / (e.mass * Math.sqrt(d.length)),
6491
+ e.plotY -= (e.plotY - g) * b / (e.mass * Math.sqrt(d.length)));
6492
+ });
6493
+ },
6494
+ repulsive: function(a, b, c, d) {
6495
+ var e = b * this.diffTemperature / a.mass / a.degree;
6496
+ b = c.x * e;
6497
+ c = c.y * e;
6498
+ a.fixedPosition || (a.plotX += b, a.plotY += c);
6499
+ d.fixedPosition || (d.plotX -= b, d.plotY -= c);
6500
+ },
6501
+ integrate: f.networkgraphIntegrations.verlet.integrate,
6502
+ getK: f.noop
6503
+ };
6504
+ f.layouts.packedbubble = a(p, {
6505
+ beforeStep: function() {
6506
+ this.options.marker && this.series.forEach(function(a) {
6507
+ a && a.calculateParentRadius();
6508
+ });
6509
+ },
6510
+ setCircularPositions: function() {
6511
+ var a = this, b = a.box, c = a.nodes, d = 2 * Math.PI / (c.length + 1), f, g, h = a.options.initialPositionRadius;
6512
+ c.forEach(function(e, c) {
6513
+ a.options.splitSeries && !e.isParentNode ? (f = e.series.parentNode.plotX, g = e.series.parentNode.plotY) : (f = b.width / 2,
6514
+ g = b.height / 2);
6515
+ e.plotX = e.prevX = x(e.plotX, f + h * Math.cos(e.index || c * d));
6516
+ e.plotY = e.prevY = x(e.plotY, g + h * Math.sin(e.index || c * d));
6517
+ e.dispX = 0;
6518
+ e.dispY = 0;
6519
+ });
6520
+ },
6521
+ repulsiveForces: function() {
6522
+ var a = this, b, c, d, f = a.options.bubblePadding;
6523
+ a.nodes.forEach(function(e) {
6524
+ e.degree = e.mass;
6525
+ e.neighbours = 0;
6526
+ a.nodes.forEach(function(k) {
6527
+ b = 0;
6528
+ e === k || e.fixedPosition || !a.options.seriesInteraction && e.series !== k.series || (d = a.getDistXY(e, k),
6529
+ c = a.vectorLength(d) - (e.marker.radius + k.marker.radius + f), 0 > c && (e.degree += .01,
6530
+ e.neighbours++, b = a.repulsiveForce(-c / Math.sqrt(e.neighbours), a.k, e, k)),
6531
+ a.force("repulsive", e, b * k.mass, d, k, c));
6532
+ });
6533
+ });
6534
+ },
6535
+ applyLimitBox: function(a) {
6536
+ if (this.options.splitSeries && !a.isParentNode && this.options.parentNodeLimit) {
6537
+ var e = this.getDistXY(a, a.series.parentNode);
6538
+ var b = a.series.parentNodeRadius - a.marker.radius - this.vectorLength(e);
6539
+ 0 > b && b > -2 * a.marker.radius && (a.plotX -= .01 * e.x, a.plotY -= .01 * e.y);
6540
+ }
6541
+ p.prototype.applyLimitBox.apply(this, arguments);
6542
+ },
6543
+ isStable: function() {
6544
+ return 1e-5 > Math.abs(this.systemTemperature - this.prevSystemTemperature) || 0 >= this.temperature || 0 < this.systemTemperature && .02 > this.systemTemperature / this.nodes.length && this.enableSimulation;
6545
+ }
6546
+ });
6547
+ b("packedbubble", "bubble", {
6548
+ minSize: "10%",
6549
+ maxSize: "50%",
6550
+ sizeBy: "area",
6551
+ zoneAxis: "y",
6552
+ tooltip: {
6553
+ pointFormat: "Value: {point.value}"
6554
+ },
6555
+ draggable: !0,
6556
+ useSimulation: !0,
6557
+ dataLabels: {
6558
+ formatter: function() {
6559
+ return this.point.value;
6560
+ },
6561
+ parentNodeFormatter: function() {
6562
+ return this.name;
6563
+ },
6564
+ parentNodeTextPath: {
6565
+ enabled: !0
6566
+ },
6567
+ padding: 0
6568
+ },
6569
+ layoutAlgorithm: {
6570
+ initialPositions: "circle",
6571
+ initialPositionRadius: 20,
6572
+ bubblePadding: 5,
6573
+ parentNodeLimit: !1,
6574
+ seriesInteraction: !0,
6575
+ dragBetweenSeries: !1,
6576
+ parentNodeOptions: {
6577
+ maxIterations: 400,
6578
+ gravitationalConstant: .03,
6579
+ maxSpeed: 50,
6580
+ initialPositionRadius: 100,
6581
+ seriesInteraction: !0,
6582
+ marker: {
6583
+ fillColor: null,
6584
+ fillOpacity: 1,
6585
+ lineWidth: 1,
6586
+ lineColor: null,
6587
+ symbol: "circle"
6588
+ }
6589
+ },
6590
+ enableSimulation: !0,
6591
+ type: "packedbubble",
6592
+ integration: "packedbubble",
6593
+ maxIterations: 1e3,
6594
+ splitSeries: !1,
6595
+ maxSpeed: 5,
6596
+ gravitationalConstant: .01,
6597
+ friction: -.981
6598
+ }
6599
+ }, {
6600
+ hasDraggableNodes: !0,
6601
+ forces: [ "barycenter", "repulsive" ],
6602
+ pointArrayMap: [ "value" ],
6603
+ pointValKey: "value",
6604
+ isCartesian: !1,
6605
+ requireSorting: !1,
6606
+ directTouch: !0,
6607
+ axisTypes: [],
6608
+ noSharedTooltip: !0,
6609
+ searchPoint: f.noop,
6610
+ accumulateAllPoints: function(a) {
6611
+ var e = a.chart, b = [], c, d;
6612
+ for (c = 0; c < e.series.length; c++) if (a = e.series[c], a.visible || !e.options.chart.ignoreHiddenSeries) for (d = 0; d < a.yData.length; d++) b.push([ null, null, a.yData[d], a.index, d, {
6613
+ id: d,
6614
+ marker: {
6615
+ radius: 0
6616
+ }
6617
+ } ]);
6618
+ return b;
6619
+ },
6620
+ init: function() {
6621
+ A.prototype.init.apply(this, arguments);
6622
+ v(this, "updatedData", function() {
6623
+ this.chart.series.forEach(function(a) {
6624
+ a.type === this.type && (a.isDirty = !0);
6625
+ }, this);
6626
+ });
6627
+ return this;
6628
+ },
6629
+ render: function() {
6630
+ var a = [];
6631
+ A.prototype.render.apply(this, arguments);
6632
+ this.options.dataLabels.allowOverlap || (this.data.forEach(function(e) {
6633
+ m(e.dataLabels) && e.dataLabels.forEach(function(e) {
6634
+ a.push(e);
6635
+ });
6636
+ }), this.options.useSimulation && this.chart.hideOverlappingLabels(a));
6637
+ },
6638
+ setVisible: function() {
6639
+ var a = this;
6640
+ A.prototype.setVisible.apply(a, arguments);
6641
+ a.parentNodeLayout && a.graph ? a.visible ? (a.graph.show(), a.parentNode.dataLabel && a.parentNode.dataLabel.show()) : (a.graph.hide(),
6642
+ a.parentNodeLayout.removeElementFromCollection(a.parentNode, a.parentNodeLayout.nodes),
6643
+ a.parentNode.dataLabel && a.parentNode.dataLabel.hide()) : a.layout && (a.visible ? a.layout.addElementsToCollection(a.points, a.layout.nodes) : a.points.forEach(function(e) {
6644
+ a.layout.removeElementFromCollection(e, a.layout.nodes);
6645
+ }));
6646
+ },
6647
+ drawDataLabels: function() {
6648
+ var a = this.options.dataLabels.textPath, b = this.points;
6649
+ A.prototype.drawDataLabels.apply(this, arguments);
6650
+ this.parentNode && (this.parentNode.formatPrefix = "parentNode", this.points = [ this.parentNode ],
6651
+ this.options.dataLabels.textPath = this.options.dataLabels.parentNodeTextPath, A.prototype.drawDataLabels.apply(this, arguments),
6652
+ this.points = b, this.options.dataLabels.textPath = a);
6653
+ },
6654
+ seriesBox: function() {
6655
+ var a = this.chart, b = Math.max, c = Math.min, d, f = [ a.plotLeft, a.plotLeft + a.plotWidth, a.plotTop, a.plotTop + a.plotHeight ];
6656
+ this.data.forEach(function(a) {
6657
+ z(a.plotX) && z(a.plotY) && a.marker.radius && (d = a.marker.radius, f[0] = c(f[0], a.plotX - d),
6658
+ f[1] = b(f[1], a.plotX + d), f[2] = c(f[2], a.plotY - d), f[3] = b(f[3], a.plotY + d));
6659
+ });
6660
+ return n(f.width / f.height) ? f : null;
6661
+ },
6662
+ calculateParentRadius: function() {
6663
+ var a = this.seriesBox();
6664
+ this.parentNodeRadius = w(Math.sqrt(2 * this.parentNodeMass / Math.PI) + 20, 20, a ? Math.max(Math.sqrt(Math.pow(a.width, 2) + Math.pow(a.height, 2)) / 2 + 20, 20) : Math.sqrt(2 * this.parentNodeMass / Math.PI) + 20);
6665
+ this.parentNode && (this.parentNode.marker.radius = this.parentNode.radius = this.parentNodeRadius);
6666
+ },
6667
+ drawGraph: function() {
6668
+ if (this.layout && this.layout.options.splitSeries) {
6669
+ var a = this.chart, b = this.layout.options.parentNodeOptions.marker;
6670
+ b = {
6671
+ fill: b.fillColor || l(this.color).brighten(.4).get(),
6672
+ opacity: b.fillOpacity,
6673
+ stroke: b.lineColor || this.color,
6674
+ "stroke-width": b.lineWidth
6675
+ };
6676
+ var c = this.visible ? "inherit" : "hidden";
6677
+ this.parentNodesGroup || (this.parentNodesGroup = this.plotGroup("parentNodesGroup", "parentNode", c, .1, a.seriesGroup),
6678
+ this.group.attr({
6679
+ zIndex: 2
6680
+ }));
6681
+ this.calculateParentRadius();
6682
+ c = t({
6683
+ x: this.parentNode.plotX - this.parentNodeRadius,
6684
+ y: this.parentNode.plotY - this.parentNodeRadius,
6685
+ width: 2 * this.parentNodeRadius,
6686
+ height: 2 * this.parentNodeRadius
6687
+ }, b);
6688
+ this.parentNode.graphic || (this.graph = this.parentNode.graphic = a.renderer.symbol(b.symbol).add(this.parentNodesGroup));
6689
+ this.parentNode.graphic.attr(c);
6690
+ }
6691
+ },
6692
+ createParentNodes: function() {
6693
+ var a = this, b = a.chart, c = a.parentNodeLayout, d, f = a.parentNode;
6694
+ a.parentNodeMass = 0;
6695
+ a.points.forEach(function(e) {
6696
+ a.parentNodeMass += Math.PI * Math.pow(e.marker.radius, 2);
6697
+ });
6698
+ a.calculateParentRadius();
6699
+ c.nodes.forEach(function(e) {
6700
+ e.seriesIndex === a.index && (d = !0);
6701
+ });
6702
+ c.setArea(0, 0, b.plotWidth, b.plotHeight);
6703
+ d || (f || (f = new h().init(this, {
6704
+ mass: a.parentNodeRadius / 2,
6705
+ marker: {
6706
+ radius: a.parentNodeRadius
6707
+ },
6708
+ dataLabels: {
6709
+ inside: !1
6710
+ },
6711
+ dataLabelOnNull: !0,
6712
+ degree: a.parentNodeRadius,
6713
+ isParentNode: !0,
6714
+ seriesIndex: a.index
6715
+ })), a.parentNode && (f.plotX = a.parentNode.plotX, f.plotY = a.parentNode.plotY),
6716
+ a.parentNode = f, c.addElementsToCollection([ a ], c.series), c.addElementsToCollection([ f ], c.nodes));
6717
+ },
6718
+ addSeriesLayout: function() {
6719
+ var a = this.options.layoutAlgorithm, b = this.chart.graphLayoutsStorage, c = this.chart.graphLayoutsLookup, d = t(a, a.parentNodeOptions, {
6720
+ enableSimulation: this.layout.options.enableSimulation
6721
+ });
6722
+ var g = b[a.type + "-series"];
6723
+ g || (b[a.type + "-series"] = g = new f.layouts[a.type](), g.init(d), c.splice(g.index, 0, g));
6724
+ this.parentNodeLayout = g;
6725
+ this.createParentNodes();
6726
+ },
6727
+ addLayout: function() {
6728
+ var a = this.options.layoutAlgorithm, b = this.chart.graphLayoutsStorage, c = this.chart.graphLayoutsLookup, d = this.chart.options.chart;
6729
+ b || (this.chart.graphLayoutsStorage = b = {}, this.chart.graphLayoutsLookup = c = []);
6730
+ var g = b[a.type];
6731
+ g || (a.enableSimulation = z(d.forExport) ? !d.forExport : a.enableSimulation, b[a.type] = g = new f.layouts[a.type](),
6732
+ g.init(a), c.splice(g.index, 0, g));
6733
+ this.layout = g;
6734
+ this.points.forEach(function(a) {
6735
+ a.mass = 2;
6736
+ a.degree = 1;
6737
+ a.collisionNmb = 1;
6738
+ });
6739
+ g.setArea(0, 0, this.chart.plotWidth, this.chart.plotHeight);
6740
+ g.addElementsToCollection([ this ], g.series);
6741
+ g.addElementsToCollection(this.points, g.nodes);
6742
+ },
6743
+ deferLayout: function() {
6744
+ var a = this.options.layoutAlgorithm;
6745
+ this.visible && (this.addLayout(), a.splitSeries && this.addSeriesLayout());
6746
+ },
6747
+ translate: function() {
6748
+ var a = this.chart, b = this.data, c = this.index, f, g = this.options.useSimulation;
6749
+ this.processedXData = this.xData;
6750
+ this.generatePoints();
6751
+ z(a.allDataPoints) || (a.allDataPoints = this.accumulateAllPoints(this), this.getPointRadius());
6752
+ if (g) var h = a.allDataPoints; else h = this.placeBubbles(a.allDataPoints), this.options.draggable = !1;
6753
+ for (f = 0; f < h.length; f++) if (h[f][3] === c) {
6754
+ var p = b[h[f][4]];
6755
+ var r = h[f][2];
6756
+ g || (p.plotX = h[f][0] - a.plotLeft + a.diffX, p.plotY = h[f][1] - a.plotTop + a.diffY);
6757
+ p.marker = y(p.marker, {
6758
+ radius: r,
6759
+ width: 2 * r,
6760
+ height: 2 * r
6761
+ });
6762
+ p.radius = r;
6763
+ }
6764
+ g && this.deferLayout();
6765
+ d(this, "afterTranslate");
6766
+ },
6767
+ checkOverlap: function(a, b) {
6768
+ var e = a[0] - b[0], c = a[1] - b[1];
6769
+ return -.001 > Math.sqrt(e * e + c * c) - Math.abs(a[2] + b[2]);
6770
+ },
6771
+ positionBubble: function(a, b, c) {
6772
+ var e = Math.sqrt, d = Math.asin, f = Math.acos, g = Math.pow, k = Math.abs;
6773
+ e = e(g(a[0] - b[0], 2) + g(a[1] - b[1], 2));
6774
+ f = f((g(e, 2) + g(c[2] + b[2], 2) - g(c[2] + a[2], 2)) / (2 * (c[2] + b[2]) * e));
6775
+ d = d(k(a[0] - b[0]) / e);
6776
+ a = (0 > a[1] - b[1] ? 0 : Math.PI) + f + d * (0 > (a[0] - b[0]) * (a[1] - b[1]) ? 1 : -1);
6777
+ return [ b[0] + (b[2] + c[2]) * Math.sin(a), b[1] - (b[2] + c[2]) * Math.cos(a), c[2], c[3], c[4] ];
6778
+ },
6779
+ placeBubbles: function(a) {
6780
+ var b = this.checkOverlap, e = this.positionBubble, c = [], d = 1, f = 0, g = 0;
6781
+ var h = [];
6782
+ var p;
6783
+ a = a.sort(function(a, b) {
6784
+ return b[2] - a[2];
6785
+ });
6786
+ if (a.length) {
6787
+ c.push([ [ 0, 0, a[0][2], a[0][3], a[0][4] ] ]);
6788
+ if (1 < a.length) for (c.push([ [ 0, 0 - a[1][2] - a[0][2], a[1][2], a[1][3], a[1][4] ] ]),
6789
+ p = 2; p < a.length; p++) a[p][2] = a[p][2] || 1, h = e(c[d][f], c[d - 1][g], a[p]),
6790
+ b(h, c[d][0]) ? (c.push([]), g = 0, c[d + 1].push(e(c[d][f], c[d][0], a[p])), d++,
6791
+ f = 0) : 1 < d && c[d - 1][g + 1] && b(h, c[d - 1][g + 1]) ? (g++, c[d].push(e(c[d][f], c[d - 1][g], a[p])),
6792
+ f++) : (f++, c[d].push(h));
6793
+ this.chart.stages = c;
6794
+ this.chart.rawPositions = [].concat.apply([], c);
6795
+ this.resizeRadius();
6796
+ h = this.chart.rawPositions;
6797
+ }
6798
+ return h;
6799
+ },
6800
+ resizeRadius: function() {
6801
+ var a = this.chart, b = a.rawPositions, c = Math.min, d = Math.max, f = a.plotLeft, g = a.plotTop, h = a.plotHeight, p = a.plotWidth, r, l, m;
6802
+ var n = r = Number.POSITIVE_INFINITY;
6803
+ var t = l = Number.NEGATIVE_INFINITY;
6804
+ for (m = 0; m < b.length; m++) {
6805
+ var u = b[m][2];
6806
+ n = c(n, b[m][0] - u);
6807
+ t = d(t, b[m][0] + u);
6808
+ r = c(r, b[m][1] - u);
6809
+ l = d(l, b[m][1] + u);
6810
+ }
6811
+ m = [ t - n, l - r ];
6812
+ c = c.apply([], [ (p - f) / m[0], (h - g) / m[1] ]);
6813
+ if (1e-10 < Math.abs(c - 1)) {
6814
+ for (m = 0; m < b.length; m++) b[m][2] *= c;
6815
+ this.placeBubbles(b);
6816
+ } else a.diffY = h / 2 + g - r - (l - r) / 2, a.diffX = p / 2 + f - n - (t - n) / 2;
6817
+ },
6818
+ calculateZExtremes: function() {
6819
+ var a = this.options.zMin, b = this.options.zMax, c = Infinity, d = -Infinity;
6820
+ if (a && b) return [ a, b ];
6821
+ this.chart.series.forEach(function(a) {
6822
+ a.yData.forEach(function(a) {
6823
+ z(a) && (a > d && (d = a), a < c && (c = a));
6824
+ });
6825
+ });
6826
+ a = x(a, c);
6827
+ b = x(b, d);
6828
+ return [ a, b ];
6829
+ },
6830
+ getPointRadius: function() {
6831
+ var a = this, b = a.chart, c = a.options, d = c.useSimulation, f = Math.min(b.plotWidth, b.plotHeight), g = {}, h = [], p = b.allDataPoints, r, l, m, n;
6832
+ [ "minSize", "maxSize" ].forEach(function(a) {
6833
+ var b = parseInt(c[a], 10), e = /%$/.test(c[a]);
6834
+ g[a] = e ? f * b / 100 : b * Math.sqrt(p.length);
6835
+ });
6836
+ b.minRadius = r = g.minSize / Math.sqrt(p.length);
6837
+ b.maxRadius = l = g.maxSize / Math.sqrt(p.length);
6838
+ var t = d ? a.calculateZExtremes() : [ r, l ];
6839
+ (p || []).forEach(function(b, e) {
6840
+ m = d ? w(b[2], t[0], t[1]) : b[2];
6841
+ n = a.getRadius(t[0], t[1], r, l, m);
6842
+ 0 === n && (n = null);
6843
+ p[e][2] = n;
6844
+ h.push(n);
6845
+ });
6846
+ a.radii = h;
6847
+ },
6848
+ redrawHalo: g.redrawHalo,
6849
+ onMouseDown: g.onMouseDown,
6850
+ onMouseMove: g.onMouseMove,
6851
+ onMouseUp: function(a) {
6852
+ if (a.fixedPosition && !a.removed) {
6853
+ var b, c, e = this.layout, d = this.parentNodeLayout;
6854
+ d && e.options.dragBetweenSeries && d.nodes.forEach(function(d) {
6855
+ a && a.marker && d !== a.series.parentNode && (b = e.getDistXY(a, d), c = e.vectorLength(b) - d.marker.radius - a.marker.radius,
6856
+ 0 > c && (d.series.addPoint(t(a.options, {
6857
+ plotX: a.plotX,
6858
+ plotY: a.plotY
6859
+ }), !1), e.removeElementFromCollection(a, e.nodes), a.remove()));
6860
+ });
6861
+ g.onMouseUp.apply(this, arguments);
6862
+ }
6863
+ },
6864
+ destroy: function() {
6865
+ this.chart.graphLayoutsLookup && this.chart.graphLayoutsLookup.forEach(function(a) {
6866
+ a.removeElementFromCollection(this, a.series);
6867
+ }, this);
6868
+ this.parentNode && (this.parentNodeLayout.removeElementFromCollection(this.parentNode, this.parentNodeLayout.nodes),
6869
+ this.parentNode.dataLabel && (this.parentNode.dataLabel = this.parentNode.dataLabel.destroy()));
6870
+ f.Series.prototype.destroy.apply(this, arguments);
6871
+ },
6872
+ alignDataLabel: f.Series.prototype.alignDataLabel
6873
+ }, {
6874
+ destroy: function() {
6875
+ this.series.layout && this.series.layout.removeElementFromCollection(this, this.series.layout.nodes);
6876
+ return c.prototype.destroy.apply(this, arguments);
6877
+ }
6878
+ });
6879
+ v(r, "beforeRedraw", function() {
6880
+ this.allDataPoints && delete this.allDataPoints;
6881
+ });
6882
+ });
6883
+ E(f, "parts-more/Polar.js", [ f["parts/Globals.js"], f["parts/Utilities.js"], f["parts-more/Pane.js"] ], function(f, a, c) {
6884
+ var b = a.addEvent, l = a.defined, v = a.find, w = a.pick, z = a.splat, y = a.uniqueKey, d = a.wrap, m = f.Series, n = f.seriesTypes, t = m.prototype, x = f.Pointer.prototype;
6885
+ t.searchPointByAngle = function(a) {
6886
+ var b = this.chart, c = this.xAxis.pane.center;
6887
+ return this.searchKDTree({
6888
+ clientX: 180 + -180 / Math.PI * Math.atan2(a.chartX - c[0] - b.plotLeft, a.chartY - c[1] - b.plotTop)
6889
+ });
6890
+ };
6891
+ t.getConnectors = function(a, b, c, d) {
6892
+ var e = d ? 1 : 0;
6893
+ var f = 0 <= b && b <= a.length - 1 ? b : 0 > b ? a.length - 1 + b : 0;
6894
+ b = 0 > f - 1 ? a.length - (1 + e) : f - 1;
6895
+ e = f + 1 > a.length - 1 ? e : f + 1;
6896
+ var g = a[b];
6897
+ e = a[e];
6898
+ var h = g.plotX;
6899
+ g = g.plotY;
6900
+ var p = e.plotX;
6901
+ var r = e.plotY;
6902
+ e = a[f].plotX;
6903
+ f = a[f].plotY;
6904
+ h = (1.5 * e + h) / 2.5;
6905
+ g = (1.5 * f + g) / 2.5;
6906
+ p = (1.5 * e + p) / 2.5;
6907
+ var l = (1.5 * f + r) / 2.5;
6908
+ r = Math.sqrt(Math.pow(h - e, 2) + Math.pow(g - f, 2));
6909
+ var m = Math.sqrt(Math.pow(p - e, 2) + Math.pow(l - f, 2));
6910
+ h = Math.atan2(g - f, h - e);
6911
+ l = Math.PI / 2 + (h + Math.atan2(l - f, p - e)) / 2;
6912
+ Math.abs(h - l) > Math.PI / 2 && (l -= Math.PI);
6913
+ h = e + Math.cos(l) * r;
6914
+ g = f + Math.sin(l) * r;
6915
+ p = e + Math.cos(Math.PI + l) * m;
6916
+ l = f + Math.sin(Math.PI + l) * m;
6917
+ e = {
6918
+ rightContX: p,
6919
+ rightContY: l,
6920
+ leftContX: h,
6921
+ leftContY: g,
6922
+ plotX: e,
6923
+ plotY: f
6924
+ };
6925
+ c && (e.prevPointCont = this.getConnectors(a, b, !1, d));
6926
+ return e;
6927
+ };
6928
+ t.toXY = function(a) {
6929
+ var b = this.chart, c = this.xAxis;
6930
+ var d = this.yAxis;
6931
+ var e = a.plotX, f = a.plotY, l = a.series, r = b.inverted, m = a.y, n = r ? e : d.len - f;
6932
+ r && l && !l.isRadialBar && (a.plotY = f = "number" === typeof m ? d.translate(m) || 0 : 0);
6933
+ a.rectPlotX = e;
6934
+ a.rectPlotY = f;
6935
+ d.center && (n += d.center[3] / 2);
6936
+ d = r ? d.postTranslate(f, n) : c.postTranslate(e, n);
6937
+ a.plotX = a.polarPlotX = d.x - b.plotLeft;
6938
+ a.plotY = a.polarPlotY = d.y - b.plotTop;
6939
+ this.kdByAngle ? (b = (e / Math.PI * 180 + c.pane.options.startAngle) % 360, 0 > b && (b += 360),
6940
+ a.clientX = b) : a.clientX = a.plotX;
6941
+ };
6942
+ n.spline && (d(n.spline.prototype, "getPointSpline", function(a, b, c, d) {
6943
+ this.chart.polar ? d ? (a = this.getConnectors(b, d, !0, this.connectEnds), a = [ "C", a.prevPointCont.rightContX, a.prevPointCont.rightContY, a.leftContX, a.leftContY, a.plotX, a.plotY ]) : a = [ "M", c.plotX, c.plotY ] : a = a.call(this, b, c, d);
6944
+ return a;
6945
+ }), n.areasplinerange && (n.areasplinerange.prototype.getPointSpline = n.spline.prototype.getPointSpline));
6946
+ b(m, "afterTranslate", function() {
6947
+ var a = this.chart;
6948
+ if (a.polar && this.xAxis) {
6949
+ (this.kdByAngle = a.tooltip && a.tooltip.shared) ? this.searchPoint = this.searchPointByAngle : this.options.findNearestPointBy = "xy";
6950
+ if (!this.preventPostTranslate) for (var c = this.points, d = c.length; d--; ) this.toXY(c[d]),
6951
+ !a.hasParallelCoordinates && !this.yAxis.reversed && c[d].y < this.yAxis.min && (c[d].isNull = !0);
6952
+ this.hasClipCircleSetter || (this.hasClipCircleSetter = !!this.eventsToUnbind.push(b(this, "afterRender", function() {
6953
+ if (a.polar) {
6954
+ var b = this.yAxis.pane.center;
6955
+ this.clipCircle ? this.clipCircle.animate({
6956
+ x: b[0],
6957
+ y: b[1],
6958
+ r: b[2] / 2,
6959
+ innerR: b[3] / 2
6960
+ }) : this.clipCircle = a.renderer.clipCircle(b[0], b[1], b[2] / 2, b[3] / 2);
6961
+ this.group.clip(this.clipCircle);
6962
+ this.setClip = f.noop;
6963
+ }
6964
+ })));
6965
+ }
6966
+ }, {
6967
+ order: 2
6968
+ });
6969
+ d(t, "getGraphPath", function(a, b) {
6970
+ var c = this, d;
6971
+ if (this.chart.polar) {
6972
+ b = b || this.points;
6973
+ for (d = 0; d < b.length; d++) if (!b[d].isNull) {
6974
+ var e = d;
6975
+ break;
6976
+ }
6977
+ if (!1 !== this.options.connectEnds && "undefined" !== typeof e) {
6978
+ this.connectEnds = !0;
6979
+ b.splice(b.length, 0, b[e]);
6980
+ var f = !0;
6981
+ }
6982
+ b.forEach(function(a) {
6983
+ "undefined" === typeof a.polarPlotY && c.toXY(a);
6984
+ });
6985
+ }
6986
+ d = a.apply(this, [].slice.call(arguments, 1));
6987
+ f && b.pop();
6988
+ return d;
6989
+ });
6990
+ var A = function(a, b) {
6991
+ var c = this, d = this.chart, e = this.options.animation, k = this.group, p = this.markerGroup, l = this.xAxis.center, m = d.plotLeft, r = d.plotTop, n, t, u, v;
6992
+ if (d.polar) {
6993
+ if (c.isRadialBar) b || (c.startAngleRad = w(c.translatedThreshold, c.xAxis.startAngleRad),
6994
+ f.seriesTypes.pie.prototype.animate.call(c, b)); else {
6995
+ if (d.renderer.isSVG) if (e = f.animObject(e), c.is("column")) {
6996
+ if (!b) {
6997
+ var x = l[3] / 2;
6998
+ c.points.forEach(function(a) {
6999
+ n = a.graphic;
7000
+ u = (t = a.shapeArgs) && t.r;
7001
+ v = t && t.innerR;
7002
+ n && t && (n.attr({
7003
+ r: x,
7004
+ innerR: x
7005
+ }), n.animate({
7006
+ r: u,
7007
+ innerR: v
7008
+ }, c.options.animation));
7009
+ });
7010
+ }
7011
+ } else b ? (a = {
7012
+ translateX: l[0] + m,
7013
+ translateY: l[1] + r,
7014
+ scaleX: .001,
7015
+ scaleY: .001
7016
+ }, k.attr(a), p && p.attr(a)) : (a = {
7017
+ translateX: m,
7018
+ translateY: r,
7019
+ scaleX: 1,
7020
+ scaleY: 1
7021
+ }, k.animate(a, e), p && p.animate(a, e));
7022
+ }
7023
+ } else a.call(this, b);
7024
+ };
7025
+ d(t, "animate", A);
7026
+ n.column && (m = n.arearange.prototype, n = n.column.prototype, n.polarArc = function(a, b, c, d) {
7027
+ var e = this.xAxis.center, f = this.yAxis.len, g = e[3] / 2;
7028
+ b = f - b + g;
7029
+ a = f - w(a, f) + g;
7030
+ this.yAxis.reversed && (0 > b && (b = g), 0 > a && (a = g));
7031
+ return {
7032
+ x: e[0],
7033
+ y: e[1],
7034
+ r: b,
7035
+ innerR: a,
7036
+ start: c,
7037
+ end: d
7038
+ };
7039
+ }, d(n, "animate", A), d(n, "translate", function(b) {
7040
+ var c = this.options, d = c.stacking, g = this.chart, e = this.xAxis, k = this.yAxis, m = k.reversed, r = k.center, n = e.startAngleRad, t = e.endAngleRad - n;
7041
+ this.preventPostTranslate = !0;
7042
+ b.call(this);
7043
+ if (e.isRadial) {
7044
+ b = this.points;
7045
+ e = b.length;
7046
+ var u = k.translate(k.min);
7047
+ var v = k.translate(k.max);
7048
+ c = c.threshold || 0;
7049
+ if (g.inverted && f.isNumber(c)) {
7050
+ var w = k.translate(c);
7051
+ l(w) && (0 > w ? w = 0 : w > t && (w = t), this.translatedThreshold = w + n);
7052
+ }
7053
+ for (;e--; ) {
7054
+ c = b[e];
7055
+ var x = c.barX;
7056
+ var y = c.x;
7057
+ var A = c.y;
7058
+ c.shapeType = "arc";
7059
+ if (g.inverted) {
7060
+ c.plotY = k.translate(A);
7061
+ if (d) {
7062
+ if (A = k.stacks[(0 > A ? "-" : "") + this.stackKey], this.visible && A && A[y] && !c.isNull) {
7063
+ var z = A[y].points[this.getStackIndicator(void 0, y, this.index).key];
7064
+ var D = k.translate(z[0]);
7065
+ z = k.translate(z[1]);
7066
+ l(D) && (D = a.clamp(D, 0, t));
7067
+ }
7068
+ } else D = w, z = c.plotY;
7069
+ D > z && (z = [ D, D = z ][0]);
7070
+ if (!m) {
7071
+ if (D < u) D = u; else if (z > v) z = v; else {
7072
+ if (z < u || D > v) D = z = 0;
7073
+ }
7074
+ } else if (z > u) z = u; else if (D < v) D = v; else if (D > u || z < v) D = z = t;
7075
+ k.min > k.max && (D = z = m ? t : 0);
7076
+ D += n;
7077
+ z += n;
7078
+ r && (c.barX = x += r[3] / 2);
7079
+ y = Math.max(x, 0);
7080
+ A = Math.max(x + c.pointWidth, 0);
7081
+ c.shapeArgs = {
7082
+ x: r && r[0],
7083
+ y: r && r[1],
7084
+ r: A,
7085
+ innerR: y,
7086
+ start: D,
7087
+ end: z
7088
+ };
7089
+ c.opacity = D === z ? 0 : void 0;
7090
+ c.plotY = (l(this.translatedThreshold) && (D < this.translatedThreshold ? D : z)) - n;
7091
+ } else D = x + n, c.shapeArgs = this.polarArc(c.yBottom, c.plotY, D, D + c.pointWidth);
7092
+ this.toXY(c);
7093
+ g.inverted ? (x = k.postTranslate(c.rectPlotY, x + c.pointWidth / 2), c.tooltipPos = [ x.x - g.plotLeft, x.y - g.plotTop ]) : c.tooltipPos = [ c.plotX, c.plotY ];
7094
+ r && (c.ttBelow = c.plotY > r[1]);
7095
+ }
7096
+ }
7097
+ }), n.findAlignments = function(a, b) {
7098
+ null === b.align && (b.align = 20 < a && 160 > a ? "left" : 200 < a && 340 > a ? "right" : "center");
7099
+ null === b.verticalAlign && (b.verticalAlign = 45 > a || 315 < a ? "bottom" : 135 < a && 225 > a ? "top" : "middle");
7100
+ return b;
7101
+ }, m && (m.findAlignments = n.findAlignments), d(n, "alignDataLabel", function(a, b, c, d, e, f) {
7102
+ var g = this.chart, h = w(d.inside, !!this.options.stacking);
7103
+ g.polar ? (a = b.rectPlotX / Math.PI * 180, g.inverted ? (this.forceDL = g.isInsidePlot(b.plotX, Math.round(b.plotY), !1),
7104
+ h && b.shapeArgs ? (e = b.shapeArgs, e = this.yAxis.postTranslate((e.start + e.end) / 2 - this.xAxis.startAngleRad, b.barX + b.pointWidth / 2),
7105
+ e = {
7106
+ x: e.x - g.plotLeft,
7107
+ y: e.y - g.plotTop
7108
+ }) : b.tooltipPos && (e = {
7109
+ x: b.tooltipPos[0],
7110
+ y: b.tooltipPos[1]
7111
+ }), d.align = w(d.align, "center"), d.verticalAlign = w(d.verticalAlign, "middle")) : this.findAlignments && (d = this.findAlignments(a, d)),
7112
+ t.alignDataLabel.call(this, b, c, d, e, f), this.isRadialBar && b.shapeArgs && b.shapeArgs.start === b.shapeArgs.end && c.hide(!0)) : a.call(this, b, c, d, e, f);
7113
+ }));
7114
+ d(x, "getCoordinates", function(a, b) {
7115
+ var c = this.chart, d = {
7116
+ xAxis: [],
7117
+ yAxis: []
7118
+ };
7119
+ c.polar ? c.axes.forEach(function(a) {
7120
+ var e = a.isXAxis, f = a.center;
7121
+ if ("colorAxis" !== a.coll) {
7122
+ var g = b.chartX - f[0] - c.plotLeft;
7123
+ f = b.chartY - f[1] - c.plotTop;
7124
+ d[e ? "xAxis" : "yAxis"].push({
7125
+ axis: a,
7126
+ value: a.translate(e ? Math.PI - Math.atan2(g, f) : Math.sqrt(Math.pow(g, 2) + Math.pow(f, 2)), !0)
7127
+ });
7128
+ }
7129
+ }) : d = a.call(this, b);
7130
+ return d;
7131
+ });
7132
+ f.SVGRenderer.prototype.clipCircle = function(a, b, c, d) {
7133
+ var e = y(), f = this.createElement("clipPath").attr({
7134
+ id: e
7135
+ }).add(this.defs);
7136
+ a = d ? this.arc(a, b, c, d, 0, 2 * Math.PI).add(f) : this.circle(a, b, c).add(f);
7137
+ a.id = e;
7138
+ a.clipPath = f;
7139
+ return a;
7140
+ };
7141
+ b(f.Chart, "getAxes", function() {
7142
+ this.pane || (this.pane = []);
7143
+ z(this.options.pane).forEach(function(a) {
7144
+ new c(a, this);
7145
+ }, this);
7146
+ });
7147
+ b(f.Chart, "afterDrawChartBox", function() {
7148
+ this.pane.forEach(function(a) {
7149
+ a.render();
7150
+ });
7151
+ });
7152
+ b(f.Series, "afterInit", function() {
7153
+ var a = this.chart;
7154
+ a.inverted && a.polar && (this.isRadialSeries = !0, this.is("column") && (this.isRadialBar = !0));
7155
+ });
7156
+ d(f.Chart.prototype, "get", function(a, b) {
7157
+ return v(this.pane, function(a) {
7158
+ return a.options.id === b;
7159
+ }) || a.call(this, b);
7160
+ });
7161
+ });
7162
+ E(f, "masters/highcharts-more.src.js", [], function() {});
7163
+ });
7164
+ });
7165
+
7166
+ var Highcharts$1 = window.Highcharts;
7167
+
7168
+ var $$4 = window.$;
7169
+
7170
+ highchartsMore(Highcharts$1);
7171
+
7172
+ var _default$a = function(_Controller) {
7173
+ _inherits(_default, _Controller);
7174
+ var _super = _createSuper(_default);
7175
+ function _default() {
7176
+ _classCallCheck(this, _default);
7177
+ return _super.apply(this, arguments);
7178
+ }
7179
+ _createClass(_default, [ {
7180
+ key: "connect",
7181
+ value: function connect() {
7182
+ var _this = this;
7183
+ $$4.getJSON(this.data.get("url"), function(data) {
7184
+ Highcharts$1.chart(_this.element, {
7185
+ chart: {
7186
+ scrollablePlotArea: {
7187
+ minWidth: 600,
7188
+ scrollPositionX: 1
7189
+ }
7190
+ },
7191
+ title: {
7192
+ text: "",
7193
+ align: "left"
7194
+ },
7195
+ subtitle: {
7196
+ text: "",
7197
+ align: "left"
7198
+ },
7199
+ xAxis: {
7200
+ title: {
7201
+ text: "D/P creatinine (4hrs)"
7202
+ },
7203
+ type: "linear",
7204
+ labels: {
7205
+ overflow: "justify"
7206
+ },
7207
+ plotBands: [ {
7208
+ from: .3,
7209
+ to: .5,
7210
+ color: "rgba(68, 170, 213, 0.1)",
7211
+ label: {
7212
+ text: "Low",
7213
+ style: {
7214
+ color: "#606060"
7215
+ }
7216
+ }
7217
+ }, {
7218
+ from: .5,
7219
+ to: .65,
7220
+ color: "rgba(0, 0, 0, 0)",
7221
+ label: {
7222
+ text: "Low average",
7223
+ style: {
7224
+ color: "#606060"
7225
+ }
7226
+ }
7227
+ }, {
7228
+ from: .65,
7229
+ to: .82,
7230
+ color: "rgba(68, 170, 213, 0.1)",
7231
+ label: {
7232
+ text: "High average",
7233
+ style: {
7234
+ color: "#606060"
7235
+ }
7236
+ }
7237
+ }, {
7238
+ from: .82,
7239
+ to: 1,
7240
+ color: "rgba(0, 0, 0, 0)",
7241
+ label: {
7242
+ text: "High",
7243
+ style: {
7244
+ color: "#606060"
7245
+ }
7246
+ }
7247
+ } ]
7248
+ },
7249
+ yAxis: {
7250
+ title: {
7251
+ text: "Net Ultrafiltration (mls)"
7252
+ },
7253
+ tickInterval: 200,
7254
+ minorGridLineWidth: 0,
7255
+ gridLineWidth: 0,
7256
+ alternateGridColor: null,
7257
+ floor: -600,
7258
+ plotLines: [ {
7259
+ color: "#BBB",
7260
+ width: 1,
7261
+ value: 0
7262
+ } ]
7263
+ },
7264
+ tooltip: {
7265
+ formatter: function formatter() {
7266
+ return "<br>D_Pcr <b>" + this.x + "</b><br>" + "netUF <b>" + this.y + "</b>";
7267
+ }
7268
+ },
7269
+ plotOptions: {
7270
+ pointStart: .3,
7271
+ line: {
7272
+ dataLabels: {
7273
+ enabled: true,
7274
+ format: "{point.index}",
7275
+ style: {
7276
+ fontSize: "15px"
7277
+ }
7278
+ }
7279
+ },
7280
+ series: {
7281
+ enableMouseTracking: false
7282
+ },
7283
+ dataLabels: {
7284
+ enabled: true,
7285
+ style: {
7286
+ fontWeight: "bold"
7287
+ }
7288
+ }
7289
+ },
7290
+ series: [ {
7291
+ name: "Expected",
7292
+ color: "#00a499",
7293
+ showInLegend: true,
7294
+ type: "polygon",
7295
+ data: [ [ .36, 400 ], [ .36, 1e3 ], [ .5, 1e3 ], [ .9, 600 ], [ .9, 300 ], [ .6, 100 ], [ .36, 400 ] ]
7296
+ }, {
7297
+ name: "Warning",
7298
+ color: "#fff495",
7299
+ showInLegend: true,
7300
+ type: "polygon",
7301
+ data: [ [ .6, 100 ], [ .9, 300 ], [ 1, 200 ], [ 1, -600 ], [ .75, -600 ], [ .6, 100 ] ]
7302
+ }, {
7303
+ color: "#040481",
7304
+ showInLegend: false,
7305
+ enableMouseTracking: true,
7306
+ data: data
7307
+ } ],
7308
+ navigation: {
7309
+ menuItemStyle: {
7310
+ fontSize: "10px"
7311
+ }
7312
+ }
7313
+ });
7314
+ _this.element.style.overflow = "unset";
7315
+ });
7316
+ }
7317
+ } ]);
7318
+ return _default;
7319
+ }(Controller);
7320
+
7321
+ var _default$b = function(_Controller) {
7322
+ _inherits(_default, _Controller);
7323
+ var _super = _createSuper(_default);
7324
+ function _default() {
7325
+ _classCallCheck(this, _default);
7326
+ return _super.apply(this, arguments);
7327
+ }
7328
+ _createClass(_default, [ {
7329
+ key: "connect",
7330
+ value: function connect() {
7331
+ console.log("Not implemented");
4201
7332
  }
4202
7333
  } ]);
4203
7334
  return _default;
4204
7335
  }(Controller);
4205
7336
 
7337
+ _defineProperty(_default$b, "targets", [ "chart" ]);
7338
+
4206
7339
  var application = Application.start();
4207
7340
 
4208
7341
  application.register("toggle", _default);
@@ -4221,4 +7354,12 @@ application.register("charts", _default$6);
4221
7354
 
4222
7355
  application.register("session", _default$7);
4223
7356
 
7357
+ application.register("simple-toggle", _default$8);
7358
+
7359
+ application.register("tabs", _default$9);
7360
+
7361
+ application.register("pd-pet-chart", _default$a);
7362
+
7363
+ application.register("pathology-sparklines", _default$b);
7364
+
4224
7365
  window.Chartkick.use(window.Highcharts);